@tempo-ai/visual-review 0.0.145-staging.2 → 0.0.145

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,18 +1,18 @@
1
1
  exports.tempoRuntimeContract=1;exports.createRuntime=function(__tempoRuntime){const require=__tempoRuntime.require;const module={exports:{}};const exports=module.exports;
2
- var X=Object.defineProperty;var Ot=Object.getOwnPropertyDescriptor;var Rt=Object.getOwnPropertyNames;var Vt=Object.prototype.hasOwnProperty;var a=(n,e)=>X(n,"name",{value:e,configurable:!0});var S=(n,e)=>()=>(n&&(e=n(n=0)),e);var ye=(n,e)=>{for(var t in e)X(n,t,{get:e[t],enumerable:!0})},_t=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Rt(e))!Vt.call(n,i)&&i!==t&&X(n,i,{get:()=>e[i],enumerable:!(r=Ot(e,i))||r.enumerable});return n};var be=n=>_t(X({},"__esModule",{value:!0}),n);function re(n){let e=n;for(;["ParenthesizedExpression","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression","TSInstantiationExpression"].includes(e.type);){let t=e.expression;if(!t)break;e=t}return e}function C(n){let e=re(n);if(["Literal","StringLiteral","NumericLiteral","BooleanLiteral"].includes(e.type)&&(typeof e.value=="string"||typeof e.value=="boolean"||typeof e.value=="number"&&Number.isFinite(e.value)))return e.value;if(e.type==="TemplateLiteral"){let t=e.expressions,r=e.quasis;if(t.length===0&&r.length===1&&typeof r[0]?.value.cooked=="string")return r[0].value.cooked}if(e.type==="UnaryExpression"&&(e.operator==="-"||e.operator==="+")){let t=C(e.argument);if(typeof t=="number")return e.operator==="-"?-t:t}if(e.type==="BinaryExpression"&&["+","-","*","/"].includes(e.operator)){let t=C(e.left),r=C(e.right);if(typeof t!="number"||typeof r!="number")return null;let i=e.operator==="+"?t+r:e.operator==="-"?t-r:e.operator==="*"?t*r:t/r;return Number.isFinite(i)?i:null}return null}var ie=S(()=>{"use strict";a(re,"unwrapLiteralExpression");a(C,"readLiteralExpression")});var $,Se,K=S(()=>{"use strict";ie();ie();$="data-tempo-expr",Se="#slot"});function A(n){let e=5381,t=0;for(let r=0;r<n.length;r++){let i=n.charCodeAt(r);e=(e<<5)+e^i,t=i+(t<<6)+(t<<16)-t|0}return Ee(e)+Ee(t)}function Ee(n){return(n>>>0).toString(16).padStart(8,"0")}var D=S(()=>{"use strict";a(A,"sourceVersionHash");a(Ee,"toHex8")});function B(n,e,t){let r=e-t;r=r<0?-r<<1|1:r<<1;do{let i=r&31;r>>>=5,r>0&&(i|=32),n.write(ke[i])}while(r>0);return e}function Te(n){let e=new Mt,t=0,r=0,i=0,s=0;for(let o=0;o<n.length;o++){let l=n[o];if(o>0&&e.write(It),l.length===0)continue;let u=0;for(let c=0;c<l.length;c++){let d=l[c];c>0&&e.write(At),u=B(e,d[0],u),d.length!==1&&(t=B(e,d[1],t),r=B(e,d[2],r),i=B(e,d[3],i),d.length!==4&&(s=B(e,d[4],s)))}}return e.flush()}var At,It,we,ke,Lt,xe,ve,Mt,Ce=S(()=>{At=44,It=59,we="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ke=new Uint8Array(64),Lt=new Uint8Array(128);for(let n=0;n<we.length;n++){let e=we.charCodeAt(n);ke[n]=e,Lt[e]=n}a(B,"encodeInteger");xe=1024*16,ve=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(n){return Buffer.from(n.buffer,n.byteOffset,n.byteLength).toString()}}:{decode(n){let e="";for(let t=0;t<n.length;t++)e+=String.fromCharCode(n[t]);return e}},Mt=class{static{a(this,"StringWriter")}constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(xe)}write(n){let{buffer:e}=this;e[this.pos++]=n,this.pos===xe&&(this.out+=ve.decode(e),this.pos=0)}flush(){let{buffer:n,out:e,pos:t}=this;return t>0?e+ve.decode(n.subarray(0,t)):e}};a(Te,"encode")});function jt(){return typeof globalThis<"u"&&typeof globalThis.btoa=="function"?n=>globalThis.btoa(unescape(encodeURIComponent(n))):typeof Buffer=="function"?n=>Buffer.from(n,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}function $t(n){let e=n.split(`
3
- `),t=e.filter(s=>/^\t+/.test(s)),r=e.filter(s=>/^ {2,}/.test(s));if(t.length===0&&r.length===0)return null;if(t.length>=r.length)return" ";let i=r.reduce((s,o)=>{let l=/^ +/.exec(o)[0].length;return Math.min(l,s)},1/0);return new Array(i+1).join(" ")}function Dt(n,e){let t=n.split(/[/\\]/),r=e.split(/[/\\]/);for(t.pop();t[0]===r[0];)t.shift(),r.shift();if(t.length){let i=t.length;for(;i--;)t[i]=".."}return t.concat(r).join("/")}function Ut(n){return Bt.call(n)==="[object Object]"}function Ne(n){let e=n.split(`
4
- `),t=[];for(let r=0,i=0;r<e.length;r++)t.push(i),i+=e[r].length+1;return a(function(i){let s=0,o=t.length;for(;s<o;){let c=s+o>>1;i<t[c]?o=c:s=c+1}let l=s-1,u=i-t[l];return{line:l,column:u}},"locate")}var W,z,Ft,se,Bt,Ht,oe,U,I,Y,Oe=S(()=>{Ce();W=class n{static{a(this,"BitSet")}constructor(e){this.bits=e instanceof n?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(e&31)}has(e){return!!(this.bits[e>>5]&1<<(e&31))}},z=class n{static{a(this,"Chunk")}constructor(e,t,r){this.start=e,this.end=t,this.original=r,this.intro="",this.outro="",this.content=r,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(e){this.outro+=e}appendRight(e){this.intro=this.intro+e}clone(){let e=new n(this.start,this.end,this.original);return e.intro=this.intro,e.outro=this.outro,e.content=this.content,e.storeName=this.storeName,e.edited=this.edited,e}contains(e){return this.start<e&&e<this.end}eachNext(e){let t=this;for(;t;)e(t),t=t.next}eachPrevious(e){let t=this;for(;t;)e(t),t=t.previous}edit(e,t,r){return this.content=e,r||(this.intro="",this.outro=""),this.storeName=t,this.edited=!0,this}prependLeft(e){this.outro=e+this.outro}prependRight(e){this.intro=e+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(e){let t=e-this.start,r=this.original.slice(0,t),i=this.original.slice(t);this.original=r;let s=new n(e,this.end,i);return s.outro=this.outro,this.outro="",this.end=e,this.edited?(s.edit("",!1),this.content=""):this.content=r,s.next=this.next,s.next&&(s.next.previous=s),s.previous=this,this.next=s,s}toString(){return this.intro+this.content+this.outro}trimEnd(e){if(this.outro=this.outro.replace(e,""),this.outro.length)return!0;let t=this.content.replace(e,"");if(t.length)return t!==this.content&&(this.split(this.start+t.length).edit("",void 0,!0),this.edited&&this.edit(t,this.storeName,!0)),!0;if(this.edit("",void 0,!0),this.intro=this.intro.replace(e,""),this.intro.length)return!0}trimStart(e){if(this.intro=this.intro.replace(e,""),this.intro.length)return!0;let t=this.content.replace(e,"");if(t.length){if(t!==this.content){let r=this.split(this.end-t.length);this.edited&&r.edit(t,this.storeName,!0),this.edit("",void 0,!0)}return!0}else if(this.edit("",void 0,!0),this.outro=this.outro.replace(e,""),this.outro.length)return!0}};a(jt,"getBtoa");Ft=jt(),se=class{static{a(this,"SourceMap")}constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=Te(e.mappings),typeof e.x_google_ignoreList<"u"&&(this.x_google_ignoreList=e.x_google_ignoreList),typeof e.debugId<"u"&&(this.debugId=e.debugId)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+Ft(this.toString())}};a($t,"guessIndent");a(Dt,"getRelativePath");Bt=Object.prototype.toString;a(Ut,"isObject");a(Ne,"getLocator");Ht=/\w/,oe=class{static{a(this,"Mappings")}constructor(e){this.hires=e,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(e,t,r,i){if(t.length){let s=t.length-1,o=t.indexOf(`
5
- `,0),l=-1;for(;o>=0&&s>o;){let c=[this.generatedCodeColumn,e,r.line,r.column];i>=0&&c.push(i),this.rawSegments.push(c),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,l=o,o=t.indexOf(`
6
- `,o+1)}let u=[this.generatedCodeColumn,e,r.line,r.column];i>=0&&u.push(i),this.rawSegments.push(u),this.advance(t.slice(l+1))}else this.pending&&(this.rawSegments.push(this.pending),this.advance(t));this.pending=null}addUneditedChunk(e,t,r,i,s){let o=t.start,l=!0,u=!1;for(;o<t.end;){if(r[o]===`
7
- `)i.line+=1,i.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,l=!0,u=!1;else{if(this.hires||l||s.has(o)){let c=[this.generatedCodeColumn,e,i.line,i.column];this.hires==="boundary"?Ht.test(r[o])?u||(this.rawSegments.push(c),u=!0):(this.rawSegments.push(c),u=!1):this.rawSegments.push(c)}i.column+=1,this.generatedCodeColumn+=1,l=!1}o+=1}this.pending=null}advance(e){if(!e)return;let t=e.split(`
8
- `);if(t.length>1){for(let r=0;r<t.length-1;r++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0}this.generatedCodeColumn+=t[t.length-1].length}},U=`
9
- `,I={insertLeft:!1,insertRight:!1,storeName:!1},Y=class n{static{a(this,"MagicString")}constructor(e,t={}){let r=new z(0,e.length,e);Object.defineProperties(this,{original:{writable:!0,value:e},outro:{writable:!0,value:""},intro:{writable:!0,value:""},firstChunk:{writable:!0,value:r},lastChunk:{writable:!0,value:r},lastSearchedChunk:{writable:!0,value:r},byStart:{writable:!0,value:{}},byEnd:{writable:!0,value:{}},filename:{writable:!0,value:t.filename},indentExclusionRanges:{writable:!0,value:t.indentExclusionRanges},sourcemapLocations:{writable:!0,value:new W},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:void 0},ignoreList:{writable:!0,value:t.ignoreList},offset:{writable:!0,value:t.offset||0}}),this.byStart[0]=r,this.byEnd[e.length]=r}addSourcemapLocation(e){this.sourcemapLocations.add(e)}append(e){if(typeof e!="string")throw new TypeError("outro content must be a string");return this.outro+=e,this}appendLeft(e,t){if(e=e+this.offset,typeof t!="string")throw new TypeError("inserted content must be a string");this._split(e);let r=this.byEnd[e];return r?r.appendLeft(t):this.intro+=t,this}appendRight(e,t){if(e=e+this.offset,typeof t!="string")throw new TypeError("inserted content must be a string");this._split(e);let r=this.byStart[e];return r?r.appendRight(t):this.outro+=t,this}clone(){let e=new n(this.original,{filename:this.filename,offset:this.offset}),t=this.firstChunk,r=e.firstChunk=e.lastSearchedChunk=t.clone();for(;t;){e.byStart[r.start]=r,e.byEnd[r.end]=r;let i=t.next,s=i&&i.clone();s&&(r.next=s,s.previous=r,r=s),t=i}return e.lastChunk=r,this.indentExclusionRanges&&(e.indentExclusionRanges=this.indentExclusionRanges.slice()),e.sourcemapLocations=new W(this.sourcemapLocations),e.intro=this.intro,e.outro=this.outro,e}generateDecodedMap(e){e=e||{};let t=0,r=Object.keys(this.storedNames),i=new oe(e.hires),s=Ne(this.original);return this.intro&&i.advance(this.intro),this.firstChunk.eachNext(o=>{let l=s(o.start);o.intro.length&&i.advance(o.intro),o.edited?i.addEdit(t,o.content,l,o.storeName?r.indexOf(o.original):-1):i.addUneditedChunk(t,o,this.original,l,this.sourcemapLocations),o.outro.length&&i.advance(o.outro)}),this.outro&&i.advance(this.outro),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:[e.source?Dt(e.file||"",e.source):e.file||""],sourcesContent:e.includeContent?[this.original]:void 0,names:r,mappings:i.raw,x_google_ignoreList:this.ignoreList?[t]:void 0}}generateMap(e){return new se(this.generateDecodedMap(e))}_ensureindentStr(){this.indentStr===void 0&&(this.indentStr=$t(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),this.indentStr===null?" ":this.indentStr}indent(e,t){let r=/^[^\r\n]/gm;if(Ut(e)&&(t=e,e=void 0),e===void 0&&(this._ensureindentStr(),e=this.indentStr||" "),e==="")return this;t=t||{};let i={};t.exclude&&(typeof t.exclude[0]=="number"?[t.exclude]:t.exclude).forEach(d=>{for(let p=d[0];p<d[1];p+=1)i[p]=!0});let s=t.indentStart!==!1,o=a(c=>s?`${e}${c}`:(s=!0,c),"replacer");this.intro=this.intro.replace(r,o);let l=0,u=this.firstChunk;for(;u;){let c=u.end;if(u.edited)i[l]||(u.content=u.content.replace(r,o),u.content.length&&(s=u.content[u.content.length-1]===`
10
- `));else for(l=u.start;l<c;){if(!i[l]){let d=this.original[l];d===`
11
- `?s=!0:d!=="\r"&&s&&(s=!1,l===u.start||(this._splitChunk(u,l),u=u.next),u.prependRight(e))}l+=1}l=u.end,u=u.next}return this.outro=this.outro.replace(r,o),this}insert(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(e,t){return I.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),I.insertLeft=!0),this.appendLeft(e,t)}insertRight(e,t){return I.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),I.insertRight=!0),this.prependRight(e,t)}move(e,t,r){if(e=e+this.offset,t=t+this.offset,r=r+this.offset,r>=e&&r<=t)throw new Error("Cannot move a selection inside itself");this._split(e),this._split(t),this._split(r);let i=this.byStart[e],s=this.byEnd[t],o=i.previous,l=s.next,u=this.byStart[r];if(!u&&s===this.lastChunk)return this;let c=u?u.previous:this.lastChunk;return o&&(o.next=l),l&&(l.previous=o),c&&(c.next=i),u&&(u.previous=s),i.previous||(this.firstChunk=s.next),s.next||(this.lastChunk=i.previous,this.lastChunk.next=null),i.previous=c,s.next=u||null,c||(this.firstChunk=i),u||(this.lastChunk=s),this}overwrite(e,t,r,i){return i=i||{},this.update(e,t,r,{...i,overwrite:!i.contentOnly})}update(e,t,r,i){if(e=e+this.offset,t=t+this.offset,typeof r!="string")throw new TypeError("replacement content must be a string");if(this.original.length!==0){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length}if(t>this.original.length)throw new Error("end is out of bounds");if(e===t)throw new Error("Cannot overwrite a zero-length range \u2013 use appendLeft or prependRight instead");this._split(e),this._split(t),i===!0&&(I.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),I.storeName=!0),i={storeName:!0});let s=i!==void 0?i.storeName:!1,o=i!==void 0?i.overwrite:!1;if(s){let c=this.original.slice(e,t);Object.defineProperty(this.storedNames,c,{writable:!0,value:!0,enumerable:!0})}let l=this.byStart[e],u=this.byEnd[t];if(l){let c=l;for(;c!==u;){if(c.next!==this.byStart[c.end])throw new Error("Cannot overwrite across a split point");c=c.next,c.edit("",!1)}l.edit(r,s,!o)}else{let c=new z(e,t,"").edit(r,s);u.next=c,c.previous=u}return this}prepend(e){if(typeof e!="string")throw new TypeError("outro content must be a string");return this.intro=e+this.intro,this}prependLeft(e,t){if(e=e+this.offset,typeof t!="string")throw new TypeError("inserted content must be a string");this._split(e);let r=this.byEnd[e];return r?r.prependLeft(t):this.intro=t+this.intro,this}prependRight(e,t){if(e=e+this.offset,typeof t!="string")throw new TypeError("inserted content must be a string");this._split(e);let r=this.byStart[e];return r?r.prependRight(t):this.outro=t+this.outro,this}remove(e,t){if(e=e+this.offset,t=t+this.offset,this.original.length!==0){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length}if(e===t)return this;if(e<0||t>this.original.length)throw new Error("Character is out of bounds");if(e>t)throw new Error("end must be greater than start");this._split(e),this._split(t);let r=this.byStart[e];for(;r;)r.intro="",r.outro="",r.edit(""),r=t>r.end?this.byStart[r.end]:null;return this}reset(e,t){if(e=e+this.offset,t=t+this.offset,this.original.length!==0){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length}if(e===t)return this;if(e<0||t>this.original.length)throw new Error("Character is out of bounds");if(e>t)throw new Error("end must be greater than start");this._split(e),this._split(t);let r=this.byStart[e];for(;r;)r.reset(),r=t>r.end?this.byStart[r.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let e=this.lastChunk;do{if(e.outro.length)return e.outro[e.outro.length-1];if(e.content.length)return e.content[e.content.length-1];if(e.intro.length)return e.intro[e.intro.length-1]}while(e=e.previous);return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let e=this.outro.lastIndexOf(U);if(e!==-1)return this.outro.substr(e+1);let t=this.outro,r=this.lastChunk;do{if(r.outro.length>0){if(e=r.outro.lastIndexOf(U),e!==-1)return r.outro.substr(e+1)+t;t=r.outro+t}if(r.content.length>0){if(e=r.content.lastIndexOf(U),e!==-1)return r.content.substr(e+1)+t;t=r.content+t}if(r.intro.length>0){if(e=r.intro.lastIndexOf(U),e!==-1)return r.intro.substr(e+1)+t;t=r.intro+t}}while(r=r.previous);return e=this.intro.lastIndexOf(U),e!==-1?this.intro.substr(e+1)+t:this.intro+t}slice(e=0,t=this.original.length-this.offset){if(e=e+this.offset,t=t+this.offset,this.original.length!==0){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length}let r="",i=this.firstChunk;for(;i&&(i.start>e||i.end<=e);){if(i.start<t&&i.end>=t)return r;i=i.next}if(i&&i.edited&&i.start!==e)throw new Error(`Cannot use replaced character ${e} as slice start anchor.`);let s=i;for(;i;){i.intro&&(s!==i||i.start===e)&&(r+=i.intro);let o=i.start<t&&i.end>=t;if(o&&i.edited&&i.end!==t)throw new Error(`Cannot use replaced character ${t} as slice end anchor.`);let l=s===i?e-i.start:0,u=o?i.content.length+t-i.end:i.content.length;if(r+=i.content.slice(l,u),i.outro&&(!o||i.end===t)&&(r+=i.outro),o)break;i=i.next}return r}snip(e,t){let r=this.clone();return r.remove(0,e),r.remove(t,r.original.length),r}_split(e){if(this.byStart[e]||this.byEnd[e])return;let t=this.lastSearchedChunk,r=t,i=e>t.end;for(;t;){if(t.contains(e))return this._splitChunk(t,e);if(t=i?this.byStart[t.end]:this.byEnd[t.start],t===r)return;r=t}}_splitChunk(e,t){if(e.edited&&e.content.length){let i=Ne(this.original)(t);throw new Error(`Cannot split a chunk that has already been edited (${i.line}:${i.column} \u2013 "${e.original}")`)}let r=e.split(t);return this.byEnd[t]=e,this.byStart[t]=r,this.byEnd[r.end]=r,e===this.lastChunk&&(this.lastChunk=r),this.lastSearchedChunk=e,!0}toString(){let e=this.intro,t=this.firstChunk;for(;t;)e+=t.toString(),t=t.next;return e+this.outro}isEmpty(){let e=this.firstChunk;do if(e.intro.length&&e.intro.trim()||e.content.length&&e.content.trim()||e.outro.length&&e.outro.trim())return!1;while(e=e.next);return!0}length(){let e=this.firstChunk,t=0;do t+=e.intro.length+e.content.length+e.outro.length;while(e=e.next);return t}trimLines(){return this.trim("[\\r\\n]")}trim(e){return this.trimStart(e).trimEnd(e)}trimEndAborted(e){let t=new RegExp((e||"\\s")+"+$");if(this.outro=this.outro.replace(t,""),this.outro.length)return!0;let r=this.lastChunk;do{let i=r.end,s=r.trimEnd(t);if(r.end!==i&&(this.lastChunk===r&&(this.lastChunk=r.next),this.byEnd[r.end]=r,this.byStart[r.next.start]=r.next,this.byEnd[r.next.end]=r.next),s)return!0;r=r.previous}while(r);return!1}trimEnd(e){return this.trimEndAborted(e),this}trimStartAborted(e){let t=new RegExp("^"+(e||"\\s")+"+");if(this.intro=this.intro.replace(t,""),this.intro.length)return!0;let r=this.firstChunk;do{let i=r.end,s=r.trimStart(t);if(r.end!==i&&(r===this.lastChunk&&(this.lastChunk=r.next),this.byEnd[r.end]=r,this.byStart[r.next.start]=r.next,this.byEnd[r.next.end]=r.next),s)return!0;r=r.next}while(r);return!1}trimStart(e){return this.trimStartAborted(e),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(e,t){function r(s,o){return typeof t=="string"?t.replace(/\$(\$|&|\d+)/g,(l,u)=>u==="$"?"$":u==="&"?s[0]:+u<s.length?s[+u]:`$${u}`):t(...s,s.index,o,s.groups)}a(r,"getReplacement");function i(s,o){let l,u=[];for(;l=s.exec(o);)u.push(l);return u}if(a(i,"matchAll"),e.global)i(e,this.original).forEach(o=>{if(o.index!=null){let l=r(o,this.original);l!==o[0]&&this.overwrite(o.index,o.index+o[0].length,l)}});else{let s=this.original.match(e);if(s&&s.index!=null){let o=r(s,this.original);o!==s[0]&&this.overwrite(s.index,s.index+s[0].length,o)}}return this}_replaceString(e,t){let{original:r}=this,i=r.indexOf(e);return i!==-1&&(typeof t=="function"&&(t=t(e,i,r)),e!==t&&this.overwrite(i,i+e.length,t)),this}replace(e,t){return typeof e=="string"?this._replaceString(e,t):this._replaceRegexp(e,t)}_replaceAllString(e,t){let{original:r}=this,i=e.length;for(let s=r.indexOf(e);s!==-1;s=r.indexOf(e,s+i)){let o=r.slice(s,s+i),l=t;typeof t=="function"&&(l=t(o,s,r)),o!==l&&this.overwrite(s,s+i,l)}return this}replaceAll(e,t){if(typeof e=="string")return this._replaceAllString(e,t);if(!e.global)throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(e,t)}}});function ae(n,e='"'){let t=n.split("&").join("&amp;").split('"').join("&quot;").split("<").join("&lt;").split(">").join("&gt;");return e==="'"?t.split("'").join("&#39;"):t}var le=S(()=>{"use strict";a(ae,"escapeVueAttributeValue")});function Re(n){return n.startsWith("--")?n:n.replace(/^-ms-/,"ms-").replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}var Ve=S(()=>{"use strict";a(Re,"camelCaseStyleKey")});var N,_e=S(()=>{"use strict";N=require("vue/compiler-sfc")});function ee(n,e="Component.vue"){let{descriptor:t,errors:r}=(0,N.parse)(n,{filename:e,sourceMap:!1});if(r.length>0)return{kind:"invalid",code:"invalid_vue",message:r.map(c=>c.message).join(`
12
- `)};let i=t.template;if(i?.src)return{kind:"unsupported",code:"unsupported_template",message:`<template src="${i.src}"> is outside this file, so its offsets cannot describe it`};if(i?.lang&&i.lang!=="html")return{kind:"unsupported",code:"unsupported_template",message:`<template lang="${i.lang}"> offsets would describe the generated HTML, not this file`};if(i&&!i.ast)return{kind:"unsupported",code:"unsupported_template",message:"the template has no parsed AST"};let s=new Map,o=!1,l=a((c,d,p)=>{let m=!0;for(let h of c){if(h.type===qt&&(m=!1),h.type!==ue)continue;let f=h.props.map(an);f.some(P=>P.kind==="bind"&&/\$attrs\b/.test(P.expression??""))&&(o=!0);let g=h.loc.start.offset,x=h.loc.end.offset,b=f.length>0?Math.max(...f.map(P=>P.end)):g+1+h.tag.length,T=n.indexOf(">",b)+1,E=h.isSelfClosing===!0,y=!E&&x>T,k=$e(h),R=rn(n,g+1+h.tag.length,f,T),q=d!==null&&(d.vPre||d.inVPre),V=k==="dynamic-element"||sn(h)||h.tag==="template"||R||_(h,nn),F={kind:k,tagName:h.tag,namespace:h.ns===Kt?"svg":h.ns===Wt?"mathml":"html",start:g,end:x,propsEnd:b,props:f,dynamicSlot:dn(h)||Ae(p),expressionSlot:_(h,je)||Ae(p),parentStart:d?.start??null,openingEnd:T,selfClosing:E,childrenStart:y?T:null,childrenEnd:y?g+h.loc.source.lastIndexOf("</"):null,vPre:R,inVPre:q,opensScope:V,scopeOwner:d===null?-1:d.opensScope?d.start:d.scopeOwner,staticSubtree:!1};s.set(g,F);let Ct=l(h.children,F,h),Nt=!R&&f.every(P=>P.kind==="attribute")&&(k==="native-element"||h.tag==="template");F.staticSubtree=Nt&&Ct,F.staticSubtree||(m=!1)}return m},"visit");i?.ast&&l(i.ast.children,null,null);let u=t.scriptSetup?De(t.scriptSetup):null;return{kind:"ok",template:i?{contentStart:i.loc.start.offset,contentEnd:i.loc.end.offset}:null,targets:s,rootFallthrough:pn({descriptor:t,setupBody:u,templateBindsAttrs:o}),script:on(t,u)}}function rn(n,e,t,r){let i=/(?:^|[\s/])v-pre(?=[\s/=>]|$)/,s=e;for(let o of[...t].sort((l,u)=>l.start-u.start)){if(i.test(n.slice(s,o.start)))return!0;s=o.end}return i.test(n.slice(s,r))}function sn(n){return n.tagType===ce&&Me.has(n.tag)}function Pe(n){return{contentStart:n.loc.start.offset,contentEnd:n.loc.end.offset,lang:n.lang??null,src:n.src??null}}function on(n,e){let t=n.scriptSetup,r=[];for(let i of e??[])if(i.type==="ImportDeclaration"&&i.importKind!=="type")for(let s of i.specifiers)s.type==="ImportSpecifier"&&s.importKind==="type"||r.push({local:s.local.name,source:i.source.value,kind:s.type==="ImportDefaultSpecifier"?"default":s.type==="ImportNamespaceSpecifier"?"namespace":"named"});return{setup:t?{...Pe(t),imports:r}:null,classic:n.script?Pe(n.script):null}}function an(n){let e=n.loc.start.offset,t=n.loc.end.offset;if(n.type===Le){let o=n.value?.loc,l=o?.source[0],u=l==='"'||l==="'"?l:null;return{kind:"attribute",name:n.name,value:n.value?n.value.content:!0,start:e,end:t,valueStart:o?o.start.offset+(u?1:0):null,valueEnd:o?o.end.offset-(u?1:0):null,quote:u}}let r=n.rawName??n.loc.source.split("=")[0].trim(),i=n.exp?.type===Z?n.exp.content:void 0,s=n.exp===void 0?{}:{expression:n.exp.loc.source,...i!==void 0&&i!==n.exp.loc.source?{decodedExpression:i}:{}};if(n.name==="bind"){let o=n.arg,l=o?.type===Z&&o.isStatic?o.content:null,u=l==="style"?ln(n):void 0,c=l!==null&&l!=="style"&&l!=="class"?un(n):null;return{kind:"bind",name:l,objectBind:o===void 0,rawName:r,...s,...c?{literal:c}:{},...u===void 0?{}:{styleKeys:u&&u.entries.map(d=>d.key),styleObject:u},start:e,end:t}}return{kind:"directive",name:n.name,rawName:r,...s,start:e,end:t}}function ln(n){let e=n.exp;if(!e||e.type!==Z)return null;let t=e.ast;if(t===void 0&&(t=Fe(e.content)),!t)return null;let r=H(t);if(r.type!=="ObjectExpression")return null;let i=[];for(let d of r.properties){if(d.type==="SpreadElement"||d.computed)return null;if(d.key.type==="Identifier")i.push(d.key.name);else if(d.key.type==="StringLiteral")i.push(Re(d.key.value));else return null}let s=n.loc.source[e.loc.start.offset-n.loc.start.offset-1],o=s==='"'||s==="'"?s:null,l=o===null?null:fn(e.loc.source,e.content),u=a(d=>l&&typeof d=="number"?e.loc.start.offset+l[d-1]:null,"at"),c=r.properties.map((d,p)=>{let m=d.type==="ObjectProperty"?d.value:void 0,h=d.type==="ObjectProperty"&&!d.shorthand&&l?C(d.value):null;return{key:i[p],literal:typeof h=="string"||typeof h=="number"?h:null,start:u(d.start),end:u(d.end),valueStart:u(m?.start),valueEnd:u(m?.end)}});return{start:u(r.start),end:u(r.end),quote:o,entries:c}}function un(n){let e=n.exp;if(!e||e.type!==Z||e.content!==e.loc.source)return null;let t=n.loc.source[e.loc.start.offset-n.loc.start.offset-1];if(t!=='"'&&t!=="'")return null;let r=e.ast;if(r===void 0&&(r=Fe(e.content)),!r)return null;let i=C(r);return typeof i!="string"&&typeof i!="number"?null:{value:i,start:e.loc.start.offset,end:e.loc.end.offset,quote:t}}function fn(n,e){let t=[],r="",i=/&(?:quot|#39|lt|gt|amp);/y;for(let s=0;s<n.length;){i.lastIndex=s;let o=i.exec(n)?.[0];t.push(s),r+=o?cn[o]:n[s],s+=o?o.length:1}return t.push(n.length),r===e?t:null}function Fe(n){try{let t=(0,N.babelParse)(`(${n})`,{plugins:["typescript"]}).program.body[0];return t?.type==="ExpressionStatement"?t.expression:null}catch{return null}}function $e(n){return n.tag==="template"||n.tag==="slot"?"special-element":n.tagType===Xt?"native-element":n.tagType!==ce||Me.has(n.tag)?"special-element":Yt.has(n.tag)?"dynamic-element":"component"}function _(n,e){return n.props.some(t=>t.type!==Le&&e.has(t.name))}function dn(n){return _(n,Zt)}function Ae(n){return n?n.tagType===zt?!0:n.tagType===ce&&_(n,tn):!1}function pn(n){let e=gn(n.descriptor,n.setupBody);if(e==="unknown")return"unknown";if(n.templateBindsAttrs)return"explicit-attrs";if(e===!1)return"inherit-attrs-false";let t=n.descriptor.template?.ast;return t?hn(t.children):"unknown"}function hn(n){let e=[],t=!1;for(let o of n){let l=o.type===Gt,u=o.type===Jt&&o.content.trim()==="";if(l||u)continue;let c=o.type===ue?o:null,d=t&&c!==null&&_(c,en),p=e[e.length-1];d&&p?p.push(o):e.push([o]),t=c!==null&&_(c,Qt)}let[r,...i]=e;if(!r)return"unknown";if(i.length>0)return"multi-root";let s=r.map(mn);return s.includes("list")?"multi-root":s.every(o=>o==="element")?"single-element":s.every(o=>o==="component")?"single-component":"unknown"}function mn(n){if(n.type!==ue)return"other";if(_(n,je))return"list";let e=$e(n);return e==="native-element"?"element":e==="component"?"component":"other"}function gn(n,e){let t=n.scriptSetup?Ie(e,bn):"absent";if(t!=="absent")return t;let r=n.script?Ie(De(n.script),Sn):"absent";return r==="absent"?!0:r}function De(n){if(n.src)return null;try{return(0,N.babelParse)(n.content,{sourceType:"module",plugins:yn(n.lang)}).program.body}catch{return null}}function Ie(n,e){if(n===null)return"unknown";let t=e(n);return t==="absent"||t==="unknown"?t:wn(t)}function yn(n){return n==="ts"?["typescript"]:n==="tsx"?["typescript","jsx"]:n==="jsx"?["jsx"]:[]}function bn(n){let e="absent";for(let t of n){if(t.type!=="ExpressionStatement")continue;let r=H(t.expression);if(r.type!=="CallExpression"||r.callee.type!=="Identifier"||r.callee.name!=="defineOptions")continue;let i=r.arguments[0],s=i&&i.type!=="SpreadElement"?H(i):null;e=s?.type==="ObjectExpression"?s:"unknown"}return e}function Sn(n){for(let e of n){if(e.type==="ExportNamedDeclaration"){if(e.specifiers.some(o=>o.exported.type==="Identifier"&&o.exported.name==="default"))return"unknown";continue}if(e.type!=="ExportDefaultDeclaration")continue;let t=e.declaration;if(!xn(t))return"unknown";let r=H(t);return r.type==="ObjectExpression"?r:En(r)??"unknown"}return"absent"}function En(n){if(n.type!=="CallExpression")return null;let e=n.callee;if((e.type==="Identifier"?e.name:e.type==="MemberExpression"&&!e.computed&&e.property.type==="Identifier"?e.property.name:null)!=="defineComponent")return null;let r=n.arguments[0];if(!r||r.type==="SpreadElement")return null;let i=H(r);return i.type==="ObjectExpression"?i:null}function wn(n){let e="absent",t=!1;for(let r of n.properties){if(r.type==="SpreadElement"||r.computed){e="unknown";continue}let i=r.key.type==="Identifier"?r.key.name:r.key.type==="StringLiteral"?r.key.value:null;(i==="extends"||i==="mixins")&&(t=!0),i==="inheritAttrs"&&(e=r.type==="ObjectProperty"&&r.value.type==="BooleanLiteral"?r.value.value:"unknown")}return e==="absent"&&t?"unknown":e}function xn(n){return n.type!=="FunctionDeclaration"&&n.type!=="ClassDeclaration"&&n.type!=="TSDeclareFunction"&&n.type!=="TSInterfaceDeclaration"&&n.type!=="TSTypeAliasDeclaration"&&n.type!=="TSEnumDeclaration"&&n.type!=="TSModuleDeclaration"}function H(n){let e=n;for(;e.type==="TSAsExpression"||e.type==="TSSatisfiesExpression"||e.type==="TSTypeAssertion"||e.type==="TSNonNullExpression"||e.type==="ParenthesizedExpression";)e=e.expression;return e}var ue,Jt,Gt,Z,qt,Le,Xt,Kt,Wt,ce,zt,Me,Yt,Zt,Qt,en,je,tn,nn,Q,cn,te=S(()=>{"use strict";K();Ve();_e();ue=1,Jt=2,Gt=3,Z=4,qt=5,Le=6,Xt=0,Kt=1,Wt=2,ce=1,zt=3,Me=new Set(["Teleport","teleport","KeepAlive","keep-alive","Transition","transition","TransitionGroup","transition-group","Suspense","suspense","BaseTransition","base-transition"]),Yt=new Set(["component","Component"]),Zt=new Set(["if","else-if","else","for"]),Qt=new Set(["if","else-if"]),en=new Set(["else-if","else"]),je=new Set(["for"]),tn=new Set(["slot"]),nn=new Set(["if","else-if","else","for","slot"]),Q=new Set(["class","style"]);a(ee,"parseVueSource");a(rn,"carriesVPre");a(sn,"isBuiltInComponent");a(Pe,"blockFacts");a(on,"readScriptFacts");a(an,"readProp");a(ln,"boundStyleObject");a(un,"boundLiteral");cn={"&quot;":'"',"&#39;":"'","&lt;":"<","&gt;":">","&amp;":"&"};a(fn,"rawOffsets");a(Fe,"parseWrapped");a($e,"vueTargetKind");a(_,"hasDirective");a(dn,"carriesStructuralDirective");a(Ae,"ownsDynamicSlot");a(pn,"readRootFallthrough");a(hn,"classifyTemplateRoots");a(mn,"classifyRootBranch");a(gn,"readInheritAttrs");a(De,"parseScriptBody");a(Ie,"readScriptInheritAttrs");a(yn,"babelPluginsFor");a(bn,"defineOptionsArgument");a(Sn,"defaultExportOptions");a(En,"defineComponentArgument");a(wn,"readObjectInheritAttrs");a(xn,"isExpression");a(H,"unwrapTypeScript")});var fe,Be,Ue=S(()=>{"use strict";fe="__TEMPO_VUE_SOURCE_REGISTRY__",Be="__tempo_c"});function Ge(n,e){let t={props:Object.create(null)};for(let r of e){if(vn(r)){let o=n.slice(r.start,r.end);t.spread=t.spread?`${t.spread} ${o}`:o;for(let l of Object.keys(t.props))t.props[l]={expression:t.spread};continue}let i=kn(r);if(!i)continue;let s=qe(i.written);t.props[s]=i.value===void 0?{expression:Tn(r)}:{value:i.value}}return t}function vn(n){return n.kind==="bind"&&(n.objectBind||n.name===null)}function kn(n){if(n.kind==="attribute")return He.has(n.name)?null:{prop:n,written:n.name,value:n.value};if(n.kind==="bind")return n.name===null||He.has(n.name)?null:{prop:n,written:n.name,value:n.expression===void 0?void 0:Cn(n.decodedExpression??n.expression)};if(n.name!=="model")return null;let e=/^v-model(?::([^.\s[]+))?/.exec(n.rawName);return e?{prop:n,written:e[1]??"modelValue",value:void 0}:null}function Tn(n){return n.kind!=="attribute"&&n.expression!==void 0?n.decodedExpression??n.expression:n.kind==="attribute"?n.name:n.kind==="bind"&&n.name!==null?qe(n.name):n.rawName}function Cn(n){let e;try{let t=(0,Je.babelParse)(`(${n})`,{sourceType:"module"}).program.body[0];e=t?.type==="ExpressionStatement"?t.expression:void 0}catch{return}return e?de(e):void 0}function de(n){switch(n.type){case"StringLiteral":case"BooleanLiteral":return n.value;case"NumericLiteral":return Number.isFinite(n.value)?n.value:void 0;case"NullLiteral":return null;case"TemplateLiteral":return n.expressions.length===0?n.quasis[0]?.value.cooked??void 0:void 0;case"UnaryExpression":return n.operator==="-"&&n.argument.type==="NumericLiteral"?-n.argument.value:void 0;case"ArrayExpression":{let e=n.elements.map(t=>t&&t.type!=="SpreadElement"?de(t):void 0);return e.includes(void 0)?void 0:e}case"ObjectExpression":{let e=Object.create(null);for(let t of n.properties){if(t.type!=="ObjectProperty"||t.computed)return;let r=t.key.type==="Identifier"?t.key.name:t.key.type==="StringLiteral"?t.key.value:null,i=de(t.value);if(r===null||i===void 0)return;e[r]=i}return e}default:return}}function qe(n){return n.replace(/-(\w)/g,(e,t)=>t.toUpperCase())}var Je,He,Xe=S(()=>{"use strict";D();Je=require("vue/compiler-sfc");le();te();He=new Set(["key","ref","ref_for","ref_key","is","class","style","slot"]);a(Ge,"readVuePassedProps");a(vn,"opensEverything");a(kn,"passedProp");a(Tn,"expressionText");a(Cn,"literalValue");a(de,"literalOf");a(qe,"camelize")});function Ke(n,e){if(n.kind!=="native-element"||n.namespace!=="svg"||Q.has(e.toLowerCase())||Nn.has(e)||e.toLowerCase().startsWith("on")||n.props.some(i=>i.kind==="bind"&&(i.objectBind||i.name===null)))return null;let t=n.props.filter(i=>(i.kind==="attribute"||i.kind==="bind")&&i.name?.toLowerCase()===e.toLowerCase()),r=t.length===1?t[0]:null;return r?.kind!=="bind"||!r.literal||r.name!==e||r.rawName!==`:${e}`&&r.rawName!==`v-bind:${e}`?null:r}var Nn,We=S(()=>{"use strict";te();Nn=new Set(["key","ref","ref_for","ref_key","is"]);a(Ke,"vueLiteralAttribute")});function tt(n){if(!n.filepath||!n.filename||!Number.isSafeInteger(n.modifiedTs)||n.modifiedTs<0||n.sourceVersion==="")return L("invalid_metadata","filename, filepath, a non-negative integer modifiedTs, and a non-empty sourceVersion are required");let e=ee(n.source,n.filename);if(e.kind==="invalid")return L("invalid_source",e.message);if(e.kind==="unsupported")return L("unsupported_template",e.message);let t=new Map;for(let f of e.targets.values()){let g=In(n.source,f);if(g!==null){if(g.kind==="refused")return g;t.set(f.start,g)}}let r=[...t.values()].map(f=>f.removal),i=a(f=>f-r.filter(g=>g.end<=f).reduce((g,x)=>g+x.end-x.start,0),"baseOffset"),s=n.sourceVersion??A(Fn(n.source,r)),o=[],l=[],u=[],c=[],d=0;for(let f of e.targets.values()){let g=f.kind==="native-element",x=f.kind==="component"||f.kind==="dynamic-element";if(!g&&!x)continue;let b=i(f.start),T=g?rt:it,E=f.props.filter(V=>!T(V)),y=_n(f,E,b),k=t.get(f.start);if(g){let V={filepath:n.filepath,position:b,modifiedTs:n.modifiedTs,sourceVersion:s};if(l.push({kind:"host",...y.record}),k){if(!(k.kind==="stamps"&&jn(k.metadata,V)&&k.expressions===y.expressions))return Ze(f.start);c.push(b);continue}o.push({start:f.propsEnd,end:f.propsEnd,replacement:st(V,y.expressions)}),d+=1;continue}let R=An(E);if(R===null)continue;let q=Vn(n.source,E);if(u.push({kind:"component",...y.record,...y.locked,expressions:y.expressions,...q?{literalProps:q}:{}}),k){if(!(k.kind==="marker"&&k.position===b&&k.spelling===R))return Ze(f.start);c.push(b);continue}o.push({start:f.propsEnd,end:f.propsEnd,replacement:ot(R,b)})}let p=new Y(n.source);for(let f of o)p.appendLeft(f.start,f.replacement);let m=p.toString(),h=ee(m,n.filename);return h.kind!=="ok"||h.targets.size!==e.targets.size?L("invalid_output",h.kind==="ok"?"annotation changed the template's tag structure":h.message):{kind:"ok",code:m,map:p.generateMap({source:n.filename,includeContent:!0,hires:!0}),edits:o,elementsAnnotated:d,skippedExistingAnnotations:c,sourceVersion:s,registry:{filename:n.filename,filepath:n.filepath,modifiedTs:n.modifiedTs,sourceVersion:s,components:u,hosts:l,rootFallthrough:e.rootFallthrough}}}function Vn(n,e){let t=e.filter(i=>!(i.kind==="attribute"&&i.name.startsWith("data-tempo-"))),r=Object.entries(Ge(n,t).props).filter(([,i])=>"value"in i).map(([i,s])=>[i,s.value]);return r.length>0?Object.fromEntries(r):void 0}function nt(n,e){let t=`(globalThis.${fe} || (globalThis.${fe} = {}))`;return`${n}
2
+ var ee=Object.defineProperty;var Ut=Object.getOwnPropertyDescriptor;var Bt=Object.getOwnPropertyNames;var Ht=Object.prototype.hasOwnProperty;var l=(n,e)=>ee(n,"name",{value:e,configurable:!0});var w=(n,e)=>()=>(n&&(e=n(n=0)),e);var Te=(n,e)=>{for(var t in e)ee(n,t,{get:e[t],enumerable:!0})},Jt=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Bt(e))!Ht.call(n,i)&&i!==t&&ee(n,i,{get:()=>e[i],enumerable:!(r=Ut(e,i))||r.enumerable});return n};var ke=n=>Jt(ee({},"__esModule",{value:!0}),n);function le(n){let e=n;for(;["ParenthesizedExpression","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression","TSInstantiationExpression"].includes(e.type);){let t=e.expression;if(!t)break;e=t}return e}function P(n){let e=le(n);if(["Literal","StringLiteral","NumericLiteral","BooleanLiteral"].includes(e.type)&&(typeof e.value=="string"||typeof e.value=="boolean"||typeof e.value=="number"&&Number.isFinite(e.value)))return e.value;if(e.type==="TemplateLiteral"){let t=e.expressions,r=e.quasis;if(t.length===0&&r.length===1&&typeof r[0]?.value.cooked=="string")return r[0].value.cooked}if(e.type==="UnaryExpression"&&(e.operator==="-"||e.operator==="+")){let t=P(e.argument);if(typeof t=="number")return e.operator==="-"?-t:t}if(e.type==="BinaryExpression"&&["+","-","*","/"].includes(e.operator)){let t=P(e.left),r=P(e.right);if(typeof t!="number"||typeof r!="number")return null;let i=e.operator==="+"?t+r:e.operator==="-"?t-r:e.operator==="*"?t*r:t/r;return Number.isFinite(i)?i:null}return null}var ae=w(()=>{"use strict";l(le,"unwrapLiteralExpression");l(P,"readLiteralExpression")});var J,Ce,te=w(()=>{"use strict";ae();ae();J="data-tempo-expr",Ce="#slot"});function M(n){let e=5381,t=0;for(let r=0;r<n.length;r++){let i=n.charCodeAt(r);e=(e<<5)+e^i,t=i+(t<<6)+(t<<16)-t|0}return Ne(e)+Ne(t)}function Ne(n){return(n>>>0).toString(16).padStart(8,"0")}var G=w(()=>{"use strict";l(M,"sourceVersionHash");l(Ne,"toHex8")});function q(n,e,t){let r=e-t;r=r<0?-r<<1|1:r<<1;do{let i=r&31;r>>>=5,r>0&&(i|=32),n.write(Ve[i])}while(r>0);return e}function Pe(n){let e=new Wt,t=0,r=0,i=0,s=0;for(let o=0;o<n.length;o++){let a=n[o];if(o>0&&e.write(Xt),a.length===0)continue;let c=0;for(let u=0;u<a.length;u++){let f=a[u];u>0&&e.write(qt),c=q(e,f[0],c),f.length!==1&&(t=q(e,f[1],t),r=q(e,f[2],r),i=q(e,f[3],i),f.length!==4&&(s=q(e,f[4],s)))}}return e.flush()}var qt,Xt,Oe,Ve,Kt,Re,Ae,Wt,_e=w(()=>{qt=44,Xt=59,Oe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ve=new Uint8Array(64),Kt=new Uint8Array(128);for(let n=0;n<Oe.length;n++){let e=Oe.charCodeAt(n);Ve[n]=e,Kt[e]=n}l(q,"encodeInteger");Re=1024*16,Ae=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(n){return Buffer.from(n.buffer,n.byteOffset,n.byteLength).toString()}}:{decode(n){let e="";for(let t=0;t<n.length;t++)e+=String.fromCharCode(n[t]);return e}},Wt=class{static{l(this,"StringWriter")}constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(Re)}write(n){let{buffer:e}=this;e[this.pos++]=n,this.pos===Re&&(this.out+=Ae.decode(e),this.pos=0)}flush(){let{buffer:n,out:e,pos:t}=this;return t>0?e+Ae.decode(n.subarray(0,t)):e}};l(Pe,"encode")});function zt(){return typeof globalThis<"u"&&typeof globalThis.btoa=="function"?n=>globalThis.btoa(unescape(encodeURIComponent(n))):typeof Buffer=="function"?n=>Buffer.from(n,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}function Zt(n){let e=n.split(`
3
+ `),t=e.filter(s=>/^\t+/.test(s)),r=e.filter(s=>/^ {2,}/.test(s));if(t.length===0&&r.length===0)return null;if(t.length>=r.length)return" ";let i=r.reduce((s,o)=>{let a=/^ +/.exec(o)[0].length;return Math.min(a,s)},1/0);return new Array(i+1).join(" ")}function Qt(n,e){let t=n.split(/[/\\]/),r=e.split(/[/\\]/);for(t.pop();t[0]===r[0];)t.shift(),r.shift();if(t.length){let i=t.length;for(;i--;)t[i]=".."}return t.concat(r).join("/")}function tn(n){return en.call(n)==="[object Object]"}function Ie(n){let e=n.split(`
4
+ `),t=[];for(let r=0,i=0;r<e.length;r++)t.push(i),i+=e[r].length+1;return l(function(i){let s=0,o=t.length;for(;s<o;){let u=s+o>>1;i<t[u]?o=u:s=u+1}let a=s-1,c=i-t[a];return{line:a,column:c}},"locate")}var ne,re,Yt,ue,en,nn,ce,X,j,ie,Le=w(()=>{_e();ne=class n{static{l(this,"BitSet")}constructor(e){this.bits=e instanceof n?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(e&31)}has(e){return!!(this.bits[e>>5]&1<<(e&31))}},re=class n{static{l(this,"Chunk")}constructor(e,t,r){this.start=e,this.end=t,this.original=r,this.intro="",this.outro="",this.content=r,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(e){this.outro+=e}appendRight(e){this.intro=this.intro+e}clone(){let e=new n(this.start,this.end,this.original);return e.intro=this.intro,e.outro=this.outro,e.content=this.content,e.storeName=this.storeName,e.edited=this.edited,e}contains(e){return this.start<e&&e<this.end}eachNext(e){let t=this;for(;t;)e(t),t=t.next}eachPrevious(e){let t=this;for(;t;)e(t),t=t.previous}edit(e,t,r){return this.content=e,r||(this.intro="",this.outro=""),this.storeName=t,this.edited=!0,this}prependLeft(e){this.outro=e+this.outro}prependRight(e){this.intro=e+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(e){let t=e-this.start,r=this.original.slice(0,t),i=this.original.slice(t);this.original=r;let s=new n(e,this.end,i);return s.outro=this.outro,this.outro="",this.end=e,this.edited?(s.edit("",!1),this.content=""):this.content=r,s.next=this.next,s.next&&(s.next.previous=s),s.previous=this,this.next=s,s}toString(){return this.intro+this.content+this.outro}trimEnd(e){if(this.outro=this.outro.replace(e,""),this.outro.length)return!0;let t=this.content.replace(e,"");if(t.length)return t!==this.content&&(this.split(this.start+t.length).edit("",void 0,!0),this.edited&&this.edit(t,this.storeName,!0)),!0;if(this.edit("",void 0,!0),this.intro=this.intro.replace(e,""),this.intro.length)return!0}trimStart(e){if(this.intro=this.intro.replace(e,""),this.intro.length)return!0;let t=this.content.replace(e,"");if(t.length){if(t!==this.content){let r=this.split(this.end-t.length);this.edited&&r.edit(t,this.storeName,!0),this.edit("",void 0,!0)}return!0}else if(this.edit("",void 0,!0),this.outro=this.outro.replace(e,""),this.outro.length)return!0}};l(zt,"getBtoa");Yt=zt(),ue=class{static{l(this,"SourceMap")}constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=Pe(e.mappings),typeof e.x_google_ignoreList<"u"&&(this.x_google_ignoreList=e.x_google_ignoreList),typeof e.debugId<"u"&&(this.debugId=e.debugId)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+Yt(this.toString())}};l(Zt,"guessIndent");l(Qt,"getRelativePath");en=Object.prototype.toString;l(tn,"isObject");l(Ie,"getLocator");nn=/\w/,ce=class{static{l(this,"Mappings")}constructor(e){this.hires=e,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(e,t,r,i){if(t.length){let s=t.length-1,o=t.indexOf(`
5
+ `,0),a=-1;for(;o>=0&&s>o;){let u=[this.generatedCodeColumn,e,r.line,r.column];i>=0&&u.push(i),this.rawSegments.push(u),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,a=o,o=t.indexOf(`
6
+ `,o+1)}let c=[this.generatedCodeColumn,e,r.line,r.column];i>=0&&c.push(i),this.rawSegments.push(c),this.advance(t.slice(a+1))}else this.pending&&(this.rawSegments.push(this.pending),this.advance(t));this.pending=null}addUneditedChunk(e,t,r,i,s){let o=t.start,a=!0,c=!1;for(;o<t.end;){if(r[o]===`
7
+ `)i.line+=1,i.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,a=!0,c=!1;else{if(this.hires||a||s.has(o)){let u=[this.generatedCodeColumn,e,i.line,i.column];this.hires==="boundary"?nn.test(r[o])?c||(this.rawSegments.push(u),c=!0):(this.rawSegments.push(u),c=!1):this.rawSegments.push(u)}i.column+=1,this.generatedCodeColumn+=1,a=!1}o+=1}this.pending=null}advance(e){if(!e)return;let t=e.split(`
8
+ `);if(t.length>1){for(let r=0;r<t.length-1;r++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0}this.generatedCodeColumn+=t[t.length-1].length}},X=`
9
+ `,j={insertLeft:!1,insertRight:!1,storeName:!1},ie=class n{static{l(this,"MagicString")}constructor(e,t={}){let r=new re(0,e.length,e);Object.defineProperties(this,{original:{writable:!0,value:e},outro:{writable:!0,value:""},intro:{writable:!0,value:""},firstChunk:{writable:!0,value:r},lastChunk:{writable:!0,value:r},lastSearchedChunk:{writable:!0,value:r},byStart:{writable:!0,value:{}},byEnd:{writable:!0,value:{}},filename:{writable:!0,value:t.filename},indentExclusionRanges:{writable:!0,value:t.indentExclusionRanges},sourcemapLocations:{writable:!0,value:new ne},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:void 0},ignoreList:{writable:!0,value:t.ignoreList},offset:{writable:!0,value:t.offset||0}}),this.byStart[0]=r,this.byEnd[e.length]=r}addSourcemapLocation(e){this.sourcemapLocations.add(e)}append(e){if(typeof e!="string")throw new TypeError("outro content must be a string");return this.outro+=e,this}appendLeft(e,t){if(e=e+this.offset,typeof t!="string")throw new TypeError("inserted content must be a string");this._split(e);let r=this.byEnd[e];return r?r.appendLeft(t):this.intro+=t,this}appendRight(e,t){if(e=e+this.offset,typeof t!="string")throw new TypeError("inserted content must be a string");this._split(e);let r=this.byStart[e];return r?r.appendRight(t):this.outro+=t,this}clone(){let e=new n(this.original,{filename:this.filename,offset:this.offset}),t=this.firstChunk,r=e.firstChunk=e.lastSearchedChunk=t.clone();for(;t;){e.byStart[r.start]=r,e.byEnd[r.end]=r;let i=t.next,s=i&&i.clone();s&&(r.next=s,s.previous=r,r=s),t=i}return e.lastChunk=r,this.indentExclusionRanges&&(e.indentExclusionRanges=this.indentExclusionRanges.slice()),e.sourcemapLocations=new ne(this.sourcemapLocations),e.intro=this.intro,e.outro=this.outro,e}generateDecodedMap(e){e=e||{};let t=0,r=Object.keys(this.storedNames),i=new ce(e.hires),s=Ie(this.original);return this.intro&&i.advance(this.intro),this.firstChunk.eachNext(o=>{let a=s(o.start);o.intro.length&&i.advance(o.intro),o.edited?i.addEdit(t,o.content,a,o.storeName?r.indexOf(o.original):-1):i.addUneditedChunk(t,o,this.original,a,this.sourcemapLocations),o.outro.length&&i.advance(o.outro)}),this.outro&&i.advance(this.outro),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:[e.source?Qt(e.file||"",e.source):e.file||""],sourcesContent:e.includeContent?[this.original]:void 0,names:r,mappings:i.raw,x_google_ignoreList:this.ignoreList?[t]:void 0}}generateMap(e){return new ue(this.generateDecodedMap(e))}_ensureindentStr(){this.indentStr===void 0&&(this.indentStr=Zt(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),this.indentStr===null?" ":this.indentStr}indent(e,t){let r=/^[^\r\n]/gm;if(tn(e)&&(t=e,e=void 0),e===void 0&&(this._ensureindentStr(),e=this.indentStr||" "),e==="")return this;t=t||{};let i={};t.exclude&&(typeof t.exclude[0]=="number"?[t.exclude]:t.exclude).forEach(f=>{for(let h=f[0];h<f[1];h+=1)i[h]=!0});let s=t.indentStart!==!1,o=l(u=>s?`${e}${u}`:(s=!0,u),"replacer");this.intro=this.intro.replace(r,o);let a=0,c=this.firstChunk;for(;c;){let u=c.end;if(c.edited)i[a]||(c.content=c.content.replace(r,o),c.content.length&&(s=c.content[c.content.length-1]===`
10
+ `));else for(a=c.start;a<u;){if(!i[a]){let f=this.original[a];f===`
11
+ `?s=!0:f!=="\r"&&s&&(s=!1,a===c.start||(this._splitChunk(c,a),c=c.next),c.prependRight(e))}a+=1}a=c.end,c=c.next}return this.outro=this.outro.replace(r,o),this}insert(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(e,t){return j.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),j.insertLeft=!0),this.appendLeft(e,t)}insertRight(e,t){return j.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),j.insertRight=!0),this.prependRight(e,t)}move(e,t,r){if(e=e+this.offset,t=t+this.offset,r=r+this.offset,r>=e&&r<=t)throw new Error("Cannot move a selection inside itself");this._split(e),this._split(t),this._split(r);let i=this.byStart[e],s=this.byEnd[t],o=i.previous,a=s.next,c=this.byStart[r];if(!c&&s===this.lastChunk)return this;let u=c?c.previous:this.lastChunk;return o&&(o.next=a),a&&(a.previous=o),u&&(u.next=i),c&&(c.previous=s),i.previous||(this.firstChunk=s.next),s.next||(this.lastChunk=i.previous,this.lastChunk.next=null),i.previous=u,s.next=c||null,u||(this.firstChunk=i),c||(this.lastChunk=s),this}overwrite(e,t,r,i){return i=i||{},this.update(e,t,r,{...i,overwrite:!i.contentOnly})}update(e,t,r,i){if(e=e+this.offset,t=t+this.offset,typeof r!="string")throw new TypeError("replacement content must be a string");if(this.original.length!==0){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length}if(t>this.original.length)throw new Error("end is out of bounds");if(e===t)throw new Error("Cannot overwrite a zero-length range \u2013 use appendLeft or prependRight instead");this._split(e),this._split(t),i===!0&&(j.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),j.storeName=!0),i={storeName:!0});let s=i!==void 0?i.storeName:!1,o=i!==void 0?i.overwrite:!1;if(s){let u=this.original.slice(e,t);Object.defineProperty(this.storedNames,u,{writable:!0,value:!0,enumerable:!0})}let a=this.byStart[e],c=this.byEnd[t];if(a){let u=a;for(;u!==c;){if(u.next!==this.byStart[u.end])throw new Error("Cannot overwrite across a split point");u=u.next,u.edit("",!1)}a.edit(r,s,!o)}else{let u=new re(e,t,"").edit(r,s);c.next=u,u.previous=c}return this}prepend(e){if(typeof e!="string")throw new TypeError("outro content must be a string");return this.intro=e+this.intro,this}prependLeft(e,t){if(e=e+this.offset,typeof t!="string")throw new TypeError("inserted content must be a string");this._split(e);let r=this.byEnd[e];return r?r.prependLeft(t):this.intro=t+this.intro,this}prependRight(e,t){if(e=e+this.offset,typeof t!="string")throw new TypeError("inserted content must be a string");this._split(e);let r=this.byStart[e];return r?r.prependRight(t):this.outro=t+this.outro,this}remove(e,t){if(e=e+this.offset,t=t+this.offset,this.original.length!==0){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length}if(e===t)return this;if(e<0||t>this.original.length)throw new Error("Character is out of bounds");if(e>t)throw new Error("end must be greater than start");this._split(e),this._split(t);let r=this.byStart[e];for(;r;)r.intro="",r.outro="",r.edit(""),r=t>r.end?this.byStart[r.end]:null;return this}reset(e,t){if(e=e+this.offset,t=t+this.offset,this.original.length!==0){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length}if(e===t)return this;if(e<0||t>this.original.length)throw new Error("Character is out of bounds");if(e>t)throw new Error("end must be greater than start");this._split(e),this._split(t);let r=this.byStart[e];for(;r;)r.reset(),r=t>r.end?this.byStart[r.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let e=this.lastChunk;do{if(e.outro.length)return e.outro[e.outro.length-1];if(e.content.length)return e.content[e.content.length-1];if(e.intro.length)return e.intro[e.intro.length-1]}while(e=e.previous);return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let e=this.outro.lastIndexOf(X);if(e!==-1)return this.outro.substr(e+1);let t=this.outro,r=this.lastChunk;do{if(r.outro.length>0){if(e=r.outro.lastIndexOf(X),e!==-1)return r.outro.substr(e+1)+t;t=r.outro+t}if(r.content.length>0){if(e=r.content.lastIndexOf(X),e!==-1)return r.content.substr(e+1)+t;t=r.content+t}if(r.intro.length>0){if(e=r.intro.lastIndexOf(X),e!==-1)return r.intro.substr(e+1)+t;t=r.intro+t}}while(r=r.previous);return e=this.intro.lastIndexOf(X),e!==-1?this.intro.substr(e+1)+t:this.intro+t}slice(e=0,t=this.original.length-this.offset){if(e=e+this.offset,t=t+this.offset,this.original.length!==0){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length}let r="",i=this.firstChunk;for(;i&&(i.start>e||i.end<=e);){if(i.start<t&&i.end>=t)return r;i=i.next}if(i&&i.edited&&i.start!==e)throw new Error(`Cannot use replaced character ${e} as slice start anchor.`);let s=i;for(;i;){i.intro&&(s!==i||i.start===e)&&(r+=i.intro);let o=i.start<t&&i.end>=t;if(o&&i.edited&&i.end!==t)throw new Error(`Cannot use replaced character ${t} as slice end anchor.`);let a=s===i?e-i.start:0,c=o?i.content.length+t-i.end:i.content.length;if(r+=i.content.slice(a,c),i.outro&&(!o||i.end===t)&&(r+=i.outro),o)break;i=i.next}return r}snip(e,t){let r=this.clone();return r.remove(0,e),r.remove(t,r.original.length),r}_split(e){if(this.byStart[e]||this.byEnd[e])return;let t=this.lastSearchedChunk,r=t,i=e>t.end;for(;t;){if(t.contains(e))return this._splitChunk(t,e);if(t=i?this.byStart[t.end]:this.byEnd[t.start],t===r)return;r=t}}_splitChunk(e,t){if(e.edited&&e.content.length){let i=Ie(this.original)(t);throw new Error(`Cannot split a chunk that has already been edited (${i.line}:${i.column} \u2013 "${e.original}")`)}let r=e.split(t);return this.byEnd[t]=e,this.byStart[t]=r,this.byEnd[r.end]=r,e===this.lastChunk&&(this.lastChunk=r),this.lastSearchedChunk=e,!0}toString(){let e=this.intro,t=this.firstChunk;for(;t;)e+=t.toString(),t=t.next;return e+this.outro}isEmpty(){let e=this.firstChunk;do if(e.intro.length&&e.intro.trim()||e.content.length&&e.content.trim()||e.outro.length&&e.outro.trim())return!1;while(e=e.next);return!0}length(){let e=this.firstChunk,t=0;do t+=e.intro.length+e.content.length+e.outro.length;while(e=e.next);return t}trimLines(){return this.trim("[\\r\\n]")}trim(e){return this.trimStart(e).trimEnd(e)}trimEndAborted(e){let t=new RegExp((e||"\\s")+"+$");if(this.outro=this.outro.replace(t,""),this.outro.length)return!0;let r=this.lastChunk;do{let i=r.end,s=r.trimEnd(t);if(r.end!==i&&(this.lastChunk===r&&(this.lastChunk=r.next),this.byEnd[r.end]=r,this.byStart[r.next.start]=r.next,this.byEnd[r.next.end]=r.next),s)return!0;r=r.previous}while(r);return!1}trimEnd(e){return this.trimEndAborted(e),this}trimStartAborted(e){let t=new RegExp("^"+(e||"\\s")+"+");if(this.intro=this.intro.replace(t,""),this.intro.length)return!0;let r=this.firstChunk;do{let i=r.end,s=r.trimStart(t);if(r.end!==i&&(r===this.lastChunk&&(this.lastChunk=r.next),this.byEnd[r.end]=r,this.byStart[r.next.start]=r.next,this.byEnd[r.next.end]=r.next),s)return!0;r=r.next}while(r);return!1}trimStart(e){return this.trimStartAborted(e),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(e,t){function r(s,o){return typeof t=="string"?t.replace(/\$(\$|&|\d+)/g,(a,c)=>c==="$"?"$":c==="&"?s[0]:+c<s.length?s[+c]:`$${c}`):t(...s,s.index,o,s.groups)}l(r,"getReplacement");function i(s,o){let a,c=[];for(;a=s.exec(o);)c.push(a);return c}if(l(i,"matchAll"),e.global)i(e,this.original).forEach(o=>{if(o.index!=null){let a=r(o,this.original);a!==o[0]&&this.overwrite(o.index,o.index+o[0].length,a)}});else{let s=this.original.match(e);if(s&&s.index!=null){let o=r(s,this.original);o!==s[0]&&this.overwrite(s.index,s.index+s[0].length,o)}}return this}_replaceString(e,t){let{original:r}=this,i=r.indexOf(e);return i!==-1&&(typeof t=="function"&&(t=t(e,i,r)),e!==t&&this.overwrite(i,i+e.length,t)),this}replace(e,t){return typeof e=="string"?this._replaceString(e,t):this._replaceRegexp(e,t)}_replaceAllString(e,t){let{original:r}=this,i=e.length;for(let s=r.indexOf(e);s!==-1;s=r.indexOf(e,s+i)){let o=r.slice(s,s+i),a=t;typeof t=="function"&&(a=t(o,s,r)),o!==a&&this.overwrite(s,s+i,a)}return this}replaceAll(e,t){if(typeof e=="string")return this._replaceAllString(e,t);if(!e.global)throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(e,t)}}});function de(n,e='"'){let t=n.split("&").join("&amp;").split('"').join("&quot;").split("<").join("&lt;").split(">").join("&gt;");return e==="'"?t.split("'").join("&#39;"):t}var fe=w(()=>{"use strict";l(de,"escapeVueAttributeValue")});function Me(n){return n.startsWith("--")?n:n.replace(/^-ms-/,"ms-").replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}var je=w(()=>{"use strict";l(Me,"camelCaseStyleKey")});var k,pe=w(()=>{"use strict";k=require("vue/compiler-sfc")});function F(n,e="Component.vue"){let{descriptor:t,errors:r}=(0,k.parse)(n,{filename:e,sourceMap:!1});if(r.length>0)return{kind:"invalid",code:"invalid_vue",message:r.map(u=>u.message).join(`
12
+ `)};let i=t.template;if(i?.src)return{kind:"unsupported",code:"unsupported_template",message:`<template src="${i.src}"> is outside this file, so its offsets cannot describe it`};if(i?.lang&&i.lang!=="html")return{kind:"unsupported",code:"unsupported_template",message:`<template lang="${i.lang}"> offsets would describe the generated HTML, not this file`};if(i&&!i.ast)return{kind:"unsupported",code:"unsupported_template",message:"the template has no parsed AST"};let s=new Map,o=!1,a=l((u,f,h)=>{let m=!0;for(let p of u){if(p.type===on&&(m=!1),p.type!==he)continue;let d=p.props.map(Sn);d.some(V=>V.kind==="bind"&&/\$attrs\b/.test(V.expression??""))&&(o=!0);let g=p.loc.start.offset,S=p.loc.end.offset,E=d.length>0?Math.max(...d.map(V=>V.end)):g+1+p.tag.length,C=n.indexOf(">",E)+1,y=p.isSelfClosing===!0,b=!y&&S>C,x=Ge(p),N=gn(n,g+1+p.tag.length,d,C),I=f!==null&&(f.vPre||f.inVPre),O=x==="dynamic-element"||yn(p)||p.tag==="template"||N||L(p,He),A={kind:x,tagName:p.tag,namespace:p.ns===an?"svg":p.ns===un?"mathml":"html",start:g,end:S,propsEnd:E,props:d,dynamicSlot:Tn(p)||$e(h),expressionSlot:L(p,Be)||$e(h),parentStart:f?.start??null,openingEnd:C,selfClosing:y,childrenStart:b?C:null,childrenEnd:b?g+p.loc.source.lastIndexOf("</"):null,vPre:N,inVPre:I,opensScope:O,scopeOwner:f===null?-1:f.opensScope?f.start:f.scopeOwner,staticSubtree:!1};s.set(g,A);let H=a(p.children,A,p),R=!N&&d.every(V=>V.kind==="attribute")&&(x==="native-element"||p.tag==="template");A.staticSubtree=R&&H,A.staticSubtree||(m=!1)}return m},"visit");i?.ast&&a(i.ast.children,null,null);let c=t.scriptSetup?qe(t.scriptSetup):null;return{kind:"ok",template:i?{contentStart:i.loc.start.offset,contentEnd:i.loc.end.offset}:null,targets:s,rootFallthrough:Cn({descriptor:t,setupBody:c,templateBindsAttrs:o}),script:bn(t,c)}}function gn(n,e,t,r){let i=/(?:^|[\s/])v-pre(?=[\s/=>]|$)/,s=e;for(let o of[...t].sort((a,c)=>a.start-c.start)){if(i.test(n.slice(s,o.start)))return!0;s=o.end}return i.test(n.slice(s,r))}function yn(n){return n.tagType===ge&&Ue.has(n.tag)}function Fe(n){return{contentStart:n.loc.start.offset,contentEnd:n.loc.end.offset,lang:n.lang??null,src:n.src??null}}function bn(n,e){let t=n.scriptSetup,r=[];for(let i of e??[])if(i.type==="ImportDeclaration"&&i.importKind!=="type")for(let s of i.specifiers)s.type==="ImportSpecifier"&&s.importKind==="type"||r.push({local:s.local.name,source:i.source.value,kind:s.type==="ImportDefaultSpecifier"?"default":s.type==="ImportNamespaceSpecifier"?"namespace":"named"});return{setup:t?{...Fe(t),imports:r}:null,classic:n.script?Fe(n.script):null}}function Sn(n){let e=n.loc.start.offset,t=n.loc.end.offset;if(n.type===me){let o=n.value?.loc,a=o?.source[0],c=a==='"'||a==="'"?a:null;return{kind:"attribute",name:n.name,value:n.value?n.value.content:!0,start:e,end:t,valueStart:o?o.start.offset+(c?1:0):null,valueEnd:o?o.end.offset-(c?1:0):null,quote:c}}let r=n.rawName??n.loc.source.split("=")[0].trim(),i=n.exp?.type===K?n.exp.content:void 0,s=n.exp===void 0?{}:{expression:n.exp.loc.source,...i!==void 0&&i!==n.exp.loc.source?{decodedExpression:i}:{}};if(n.name==="bind"){let o=n.arg,a=o?.type===K&&o.isStatic?o.content:null,c=a==="style"?En(n):void 0,u=a!==null&&a!=="style"&&a!=="class"?xn(n):null;return{kind:"bind",name:a,objectBind:o===void 0,rawName:r,...s,...u?{literal:u}:{},...c===void 0?{}:{styleKeys:c&&c.entries.map(f=>f.key),styleObject:c},start:e,end:t}}return{kind:"directive",name:n.name,rawName:r,...s,start:e,end:t}}function En(n){let e=n.exp;if(!e||e.type!==K)return null;let t=e.ast;if(t===void 0&&(t=Je(e.content)),!t)return null;let r=W(t);if(r.type!=="ObjectExpression")return null;let i=[];for(let f of r.properties){if(f.type==="SpreadElement"||f.computed)return null;if(f.key.type==="Identifier")i.push(f.key.name);else if(f.key.type==="StringLiteral")i.push(Me(f.key.value));else return null}let s=n.loc.source[e.loc.start.offset-n.loc.start.offset-1],o=s==='"'||s==="'"?s:null,a=o===null?null:vn(e.loc.source,e.content),c=l(f=>a&&typeof f=="number"?e.loc.start.offset+a[f-1]:null,"at"),u=r.properties.map((f,h)=>{let m=f.type==="ObjectProperty"?f.value:void 0,p=f.type==="ObjectProperty"&&!f.shorthand&&a?P(f.value):null;return{key:i[h],literal:typeof p=="string"||typeof p=="number"?p:null,start:c(f.start),end:c(f.end),valueStart:c(m?.start),valueEnd:c(m?.end)}});return{start:c(r.start),end:c(r.end),quote:o,entries:u}}function xn(n){let e=n.exp;if(!e||e.type!==K||e.content!==e.loc.source)return null;let t=n.loc.source[e.loc.start.offset-n.loc.start.offset-1];if(t!=='"'&&t!=="'")return null;let r=e.ast;if(r===void 0&&(r=Je(e.content)),!r)return null;let i=P(r);return typeof i!="string"&&typeof i!="number"?null:{value:i,start:e.loc.start.offset,end:e.loc.end.offset,quote:t}}function vn(n,e){let t=[],r="",i=/&(?:quot|#39|lt|gt|amp);/y;for(let s=0;s<n.length;){i.lastIndex=s;let o=i.exec(n)?.[0];t.push(s),r+=o?wn[o]:n[s],s+=o?o.length:1}return t.push(n.length),r===e?t:null}function Je(n){try{let t=(0,k.babelParse)(`(${n})`,{plugins:["typescript"]}).program.body[0];return t?.type==="ExpressionStatement"?t.expression:null}catch{return null}}function Ge(n){return n.tag==="template"||n.tag==="slot"?"special-element":n.tagType===ln?"native-element":n.tagType!==ge||Ue.has(n.tag)?"special-element":dn.has(n.tag)?"dynamic-element":"component"}function L(n,e){return n.props.some(t=>t.type!==me&&e.has(t.name))}function Tn(n){return L(n,fn)}function $e(n){return n?n.tagType===cn?!kn(n):n.tagType===ge&&L(n,mn):!1}function kn(n){let e=n.props.filter(i=>i.type!==me&&He.has(i.name)),[t,...r]=e;return!t||r.length>0||t.name!=="slot"||t.exp?!1:!t.arg||t.arg.type===K&&t.arg.isStatic}function Cn(n){let e=Rn(n.descriptor,n.setupBody);if(e==="unknown")return"unknown";if(n.templateBindsAttrs)return"explicit-attrs";if(e===!1)return"inherit-attrs-false";let t=n.descriptor.template?.ast;return t?Nn(t.children):"unknown"}function Nn(n){let e=[],t=!1;for(let o of n){let a=o.type===sn,c=o.type===rn&&o.content.trim()==="";if(a||c)continue;let u=o.type===he?o:null,f=t&&u!==null&&L(u,hn),h=e[e.length-1];f&&h?h.push(o):e.push([o]),t=u!==null&&L(u,pn)}let[r,...i]=e;if(!r)return"unknown";if(i.length>0)return"multi-root";let s=r.map(On);return s.includes("list")?"multi-root":s.every(o=>o==="element")?"single-element":s.every(o=>o==="component")?"single-component":"unknown"}function On(n){if(n.type!==he)return"other";if(L(n,Be))return"list";let e=Ge(n);return e==="native-element"?"element":e==="component"?"component":"other"}function Rn(n,e){let t=n.scriptSetup?De(e,Vn):"absent";if(t!=="absent")return t;let r=n.script?De(qe(n.script),Pn):"absent";return r==="absent"?!0:r}function qe(n){if(n.src)return null;try{return(0,k.babelParse)(n.content,{sourceType:"module",plugins:An(n.lang)}).program.body}catch{return null}}function De(n,e){if(n===null)return"unknown";let t=e(n);return t==="absent"||t==="unknown"?t:In(t)}function An(n){return n==="ts"?["typescript"]:n==="tsx"?["typescript","jsx"]:n==="jsx"?["jsx"]:[]}function Vn(n){let e="absent";for(let t of n){if(t.type!=="ExpressionStatement")continue;let r=W(t.expression);if(r.type!=="CallExpression"||r.callee.type!=="Identifier"||r.callee.name!=="defineOptions")continue;let i=r.arguments[0],s=i&&i.type!=="SpreadElement"?W(i):null;e=s?.type==="ObjectExpression"?s:"unknown"}return e}function Pn(n){for(let e of n){if(e.type==="ExportNamedDeclaration"){if(e.specifiers.some(o=>o.exported.type==="Identifier"&&o.exported.name==="default"))return"unknown";continue}if(e.type!=="ExportDefaultDeclaration")continue;let t=e.declaration;if(!Ln(t))return"unknown";let r=W(t);return r.type==="ObjectExpression"?r:_n(r)??"unknown"}return"absent"}function _n(n){if(n.type!=="CallExpression")return null;let e=n.callee;if((e.type==="Identifier"?e.name:e.type==="MemberExpression"&&!e.computed&&e.property.type==="Identifier"?e.property.name:null)!=="defineComponent")return null;let r=n.arguments[0];if(!r||r.type==="SpreadElement")return null;let i=W(r);return i.type==="ObjectExpression"?i:null}function In(n){let e="absent",t=!1;for(let r of n.properties){if(r.type==="SpreadElement"||r.computed){e="unknown";continue}let i=r.key.type==="Identifier"?r.key.name:r.key.type==="StringLiteral"?r.key.value:null;(i==="extends"||i==="mixins")&&(t=!0),i==="inheritAttrs"&&(e=r.type==="ObjectProperty"&&r.value.type==="BooleanLiteral"?r.value.value:"unknown")}return e==="absent"&&t?"unknown":e}function Ln(n){return n.type!=="FunctionDeclaration"&&n.type!=="ClassDeclaration"&&n.type!=="TSDeclareFunction"&&n.type!=="TSInterfaceDeclaration"&&n.type!=="TSTypeAliasDeclaration"&&n.type!=="TSEnumDeclaration"&&n.type!=="TSModuleDeclaration"}function W(n){let e=n;for(;e.type==="TSAsExpression"||e.type==="TSSatisfiesExpression"||e.type==="TSTypeAssertion"||e.type==="TSNonNullExpression"||e.type==="ParenthesizedExpression";)e=e.expression;return e}var he,rn,sn,K,on,me,ln,an,un,ge,cn,Ue,dn,fn,pn,hn,Be,mn,He,se,wn,z=w(()=>{"use strict";te();je();pe();he=1,rn=2,sn=3,K=4,on=5,me=6,ln=0,an=1,un=2,ge=1,cn=3,Ue=new Set(["Teleport","teleport","KeepAlive","keep-alive","Transition","transition","TransitionGroup","transition-group","Suspense","suspense","BaseTransition","base-transition"]),dn=new Set(["component","Component"]),fn=new Set(["if","else-if","else","for"]),pn=new Set(["if","else-if"]),hn=new Set(["else-if","else"]),Be=new Set(["for"]),mn=new Set(["slot"]),He=new Set(["if","else-if","else","for","slot"]),se=new Set(["class","style"]);l(F,"parseVueSource");l(gn,"carriesVPre");l(yn,"isBuiltInComponent");l(Fe,"blockFacts");l(bn,"readScriptFacts");l(Sn,"readProp");l(En,"boundStyleObject");l(xn,"boundLiteral");wn={"&quot;":'"',"&#39;":"'","&lt;":"<","&gt;":">","&amp;":"&"};l(vn,"rawOffsets");l(Je,"parseWrapped");l(Ge,"vueTargetKind");l(L,"hasDirective");l(Tn,"carriesStructuralDirective");l($e,"ownsDynamicSlot");l(kn,"isPlainSlotTemplate");l(Cn,"readRootFallthrough");l(Nn,"classifyTemplateRoots");l(On,"classifyRootBranch");l(Rn,"readInheritAttrs");l(qe,"parseScriptBody");l(De,"readScriptInheritAttrs");l(An,"babelPluginsFor");l(Vn,"defineOptionsArgument");l(Pn,"defaultExportOptions");l(_n,"defineComponentArgument");l(In,"readObjectInheritAttrs");l(Ln,"isExpression");l(W,"unwrapTypeScript")});var ye,Xe,Ke=w(()=>{"use strict";ye="__TEMPO_VUE_SOURCE_REGISTRY__",Xe="__tempo_c"});function Ye(n,e){let t={props:Object.create(null)};for(let r of e){if(Mn(r)){let o=n.slice(r.start,r.end);t.spread=t.spread?`${t.spread} ${o}`:o;for(let a of Object.keys(t.props))t.props[a]={expression:t.spread};continue}let i=jn(r);if(!i)continue;let s=Ze(i.written);t.props[s]=i.value===void 0?{expression:Fn(r)}:{value:i.value}}return t}function Mn(n){return n.kind==="bind"&&(n.objectBind||n.name===null)}function jn(n){if(n.kind==="attribute")return We.has(n.name)?null:{prop:n,written:n.name,value:n.value};if(n.kind==="bind")return n.name===null||We.has(n.name)?null:{prop:n,written:n.name,value:n.expression===void 0?void 0:$n(n.decodedExpression??n.expression)};if(n.name!=="model")return null;let e=/^v-model(?::([^.\s[]+))?/.exec(n.rawName);return e?{prop:n,written:e[1]??"modelValue",value:void 0}:null}function Fn(n){return n.kind!=="attribute"&&n.expression!==void 0?n.decodedExpression??n.expression:n.kind==="attribute"?n.name:n.kind==="bind"&&n.name!==null?Ze(n.name):n.rawName}function $n(n){let e;try{let t=(0,ze.babelParse)(`(${n})`,{sourceType:"module"}).program.body[0];e=t?.type==="ExpressionStatement"?t.expression:void 0}catch{return}return e?be(e):void 0}function be(n){switch(n.type){case"StringLiteral":case"BooleanLiteral":return n.value;case"NumericLiteral":return Number.isFinite(n.value)?n.value:void 0;case"NullLiteral":return null;case"TemplateLiteral":return n.expressions.length===0?n.quasis[0]?.value.cooked??void 0:void 0;case"UnaryExpression":return n.operator==="-"&&n.argument.type==="NumericLiteral"?-n.argument.value:void 0;case"ArrayExpression":{let e=n.elements.map(t=>t&&t.type!=="SpreadElement"?be(t):void 0);return e.includes(void 0)?void 0:e}case"ObjectExpression":{let e=Object.create(null);for(let t of n.properties){if(t.type!=="ObjectProperty"||t.computed)return;let r=t.key.type==="Identifier"?t.key.name:t.key.type==="StringLiteral"?t.key.value:null,i=be(t.value);if(r===null||i===void 0)return;e[r]=i}return e}default:return}}function Ze(n){return n.replace(/-(\w)/g,(e,t)=>t.toUpperCase())}var ze,We,Qe=w(()=>{"use strict";G();ze=require("vue/compiler-sfc");fe();z();We=new Set(["key","ref","ref_for","ref_key","is","class","style","slot"]);l(Ye,"readVuePassedProps");l(Mn,"opensEverything");l(jn,"passedProp");l(Fn,"expressionText");l($n,"literalValue");l(be,"literalOf");l(Ze,"camelize")});function et(n,e){if(n.kind!=="native-element"||n.namespace!=="svg"||se.has(e.toLowerCase())||Dn.has(e)||e.toLowerCase().startsWith("on")||n.props.some(i=>i.kind==="bind"&&(i.objectBind||i.name===null)))return null;let t=n.props.filter(i=>(i.kind==="attribute"||i.kind==="bind")&&i.name?.toLowerCase()===e.toLowerCase()),r=t.length===1?t[0]:null;return r?.kind!=="bind"||!r.literal||r.name!==e||r.rawName!==`:${e}`&&r.rawName!==`v-bind:${e}`?null:r}var Dn,tt=w(()=>{"use strict";z();Dn=new Set(["key","ref","ref_for","ref_key","is"]);l(et,"vueLiteralAttribute")});function rt(n){let e="default";for(let t of n.props){if(t.type!==zn||t.name!=="name"||!t.value)return null;e=t.value.content}return e}function at(n,e,t){let r=Zn(n,e),i=r?.elements.get(t);if(!r||!i)return{kind:"none"};let s=l(d=>r.elements.get(d)?.node.tagType===Se,"isOutlet"),o=i.list.children.filter(d=>s(d.start));if(o.length===0)return{kind:"none"};let a=l(d=>({kind:"refused",message:`${d}; inserting into it requires AI`}),"refused"),[c]=o,u=l(d=>d.kind==="text"&&nt.test(n.slice(d.start,d.end)),"blank");if(!i.native||o.length>1||i.list.children.some(d=>d!==c&&!u(d)))return a("This element renders a <slot> beside content of its own");let f=r.elements.get(c.start),h=rt(f.node);if(h===null)return a("This element's <slot> takes props or a name from code");if(!nt.test(n.slice(f.openEnd,f.closeStart)))return a("This element's <slot> has fallback content");let m=0;for(let d of r.elements.values()){if(d.node.tagType!==Se)continue;let g=rt(d.node);(g===null||g===h)&&m++}if(m!==1)return a(`The template renders slot "${h}" in more than one place`);let p=F(n,e);if(p.kind!=="ok")return a("The template does not parse");for(let d=p.targets.get(c.start);d;d=d.parentStart===null?void 0:p.targets.get(d.parentStart))if(d.props.some(g=>g.kind==="directive"&&g.name==="for"))return a("This element's <slot> renders once per v-for item");return{kind:"plain",name:h}}function Yn(n,e,t){let{descriptor:r,errors:i}=(0,k.parse)(n,{filename:e,sourceMap:!1,templateParseOptions:{whitespace:t.whitespace,comments:t.comments}});if(i.length>0)return null;let s=r.template;return s&&(s.src||s.lang&&s.lang!=="html")?null:{descriptor:r}}function Zn(n,e){if($.has(n))return $.get(n);let t=Qn(n,e);return $.size>=Wn&&$.delete($.keys().next().value),$.set(n,t),t}function Qn(n,e){let t=Yn(n,e,Kn);if(!t)return null;let{descriptor:r}=t,i={descriptor:r,lists:new Map,elements:new Map,textLists:new Map,showings:new Map},s=r.template;if(!s?.ast)return i;let o=l((a,c,u,f,h)=>{let m=a?.tag??null,p=a===null||a.ns===Xn,d=p&&(m==="textarea"||m==="title")?"rcdata":p&&(m==="script"||m==="style")?"rawtext":"normal",g=h.pre||p&&m==="pre",S={owner:a?.loc.start.offset??-1,ownerTag:m,start:u,end:f,children:[],mode:d,inPre:g,dropsFirstNewline:p&&(m==="pre"||m==="textarea"),node:a?{start:a.loc.start.offset,end:a.loc.end.offset}:{start:-1,end:-1}},E=u,C=l(y=>{y>E&&S.children.push(st(n,E,y,S))},"gap");for(let y of c){let b=y.loc.start.offset;if(C(b),E=y.loc.end.offset,y.type===lt){S.children.push(st(n,b,E,S));continue}if(y.type===Bn){S.children.push({start:b,end:E,kind:"comment",content:y.content,units:null,tag:null,node:{start:b,end:E}});continue}if(y.type===Jn){let R=tr(y);S.children.push(R===null?it(b,E):{start:b,end:E,kind:"literal",content:R,units:null,tag:null,node:{start:b,end:E}});continue}if(y.type!==Un){S.children.push(it(b,E));continue}let x=y,N=x.tagType===Gn&&x.tag!=="template"&&x.tag!=="slot",I=h.slot||x.tagType===Se,O=er(n,x,(R,V,Dt)=>o(x,R,V,Dt,{pre:g,slot:I})),A=x.props.some(R=>R.type===7&&(R.name==="html"||R.name==="text")),H=x.tagType===qn;S.children.push({start:b,end:E,kind:N?"element":H?"component":"boundary",content:null,units:null,tag:N||H?x.tag:null,node:O.list.node}),i.elements.set(b,{...O,native:N,boundaryContent:I||A})}C(f),i.lists.set(S.owner,S);for(let y of S.children)y.kind==="text"&&i.textLists.set(y.start,S);return S},"visit");return o(null,s.ast.children,s.loc.start.offset,s.loc.end.offset,{pre:!1,slot:!1}),i}function er(n,e,t){let r=e.loc.start.offset,i=e.loc.end.offset,s=e.props.reduce((u,f)=>Math.max(u,f.loc.end.offset),r+1+e.tag.length),o=n.indexOf(">",s)+1,a=e.isSelfClosing!==!0&&i>o,c=a?r+e.loc.source.lastIndexOf("</"):o;return{node:e,openEnd:o,closeStart:c,selfClosing:!a,list:t(e.children,o,c)}}function tr(n){let e=n.content;if(e.type!==Hn)return null;let t;try{let i=(0,k.babelParse)(`(${e.content})`,{plugins:["typescript"]}).program.body;if(i.length!==1)return null;t=i[0]}catch{return null}if(t?.type!=="ExpressionStatement")return null;let r=t.expression;if(r.type==="StringLiteral"&&typeof r.value=="string")return r.value.length>0?r.value:null;if(r.type==="NumericLiteral"&&typeof r.value=="number")return Number.isFinite(r.value)?String(r.value):null;if(r.type==="TemplateLiteral"&&r.expressions?.length===0&&r.quasis?.length===1){let i=r.quasis[0].value.cooked;return typeof i=="string"&&i.length>0?i:null}return null}function it(n,e){return{start:n,end:e,kind:"boundary",content:null,units:null,tag:null,node:{start:n,end:e}}}function st(n,e,t,r){let i=nr(n.slice(e,t),e,r);return{start:e,end:t,kind:"text",content:i?i.map(s=>s.text).join(""):null,units:i,tag:null,node:{start:e,end:t}}}function nr(n,e,t){let r=[],i=l((a,c)=>{for(let u=a;u<c;){let f=n.charCodeAt(u),h=n.charCodeAt(u+1),p=u+1<c&&(f===13&&h===10||f>=55296&&f<=56319&&h>=56320&&h<=57343)?2:1;r.push({start:e+u,end:e+u+p,text:n.slice(u,u+p)}),u+=p}},"pushRaw");if(t.mode==="rawtext"||!n.includes("&"))return i(0,n.length),r;let s=n.indexOf("&");i(0,s);let o=s;for(;o<n.length;){let a=n.indexOf("&",o+1),c=a<0?n.length:a,u=n.slice(o,c),f=ot(u,t);if(f===null)return null;let h=-1;for(let p=u.length;p>=0;p--){let d=u.slice(u.length-p);if(!f.endsWith(d))continue;let g=u.slice(0,u.length-p),S=f.slice(0,f.length-p);if(p===u.length||ot(g,t)===S){h=p;break}}if(h<0)return null;let m=o+u.length-h;m>o&&r.push({start:e+o,end:e+m,text:f.slice(0,f.length-h)}),i(m,c),o=c}return r}function ot(n,e){let t=e.mode==="rcdata"?e.ownerTag:"div",r=`${t}\0${n}`;if(Y.has(r))return Y.get(r);let i=null;try{let{descriptor:s}=(0,k.parse)(`<template><${t} v-pre>a${n}</${t}></template>`,{sourceMap:!1,templateParseOptions:{whitespace:"preserve",comments:!0}}),o=s.template?.ast?.children[0]?.children[0];o?.type===lt&&(i=o.content.slice(1))}catch{i=null}return Y.size>2048&&Y.clear(),Y.set(r,i),i}var Un,lt,Bn,Hn,Jn,Gn,qn,Se,Xn,Kn,$,Wn,zn,nt,Y,ut=w(()=>{"use strict";pe();z();Un=1,lt=2,Bn=3,Hn=4,Jn=5,Gn=0,qn=1,Se=2,Xn=0,Kn={whitespace:"preserve",comments:!0},$=new Map,Wn=8,zn=6,nt=/^[ \t\n\r\f]*$/;l(rt,"outletName");l(at,"readVueSlotOutlet");l(Yn,"parseFor");l(Zn,"authoredFile");l(Qn,"buildAuthoredFile");l(er,"elementEntry");l(tr,"literalInterpolation");l(it,"boundaryChild");l(st,"textChild");Y=new Map;l(nr,"textUnits");l(ot,"decodeSegment")});function mt(n){if(!n.filepath||!n.filename||!Number.isSafeInteger(n.modifiedTs)||n.modifiedTs<0||n.sourceVersion==="")return D("invalid_metadata","filename, filepath, a non-negative integer modifiedTs, and a non-empty sourceVersion are required");let e=F(n.source,n.filename);if(e.kind==="invalid")return D("invalid_source",e.message);if(e.kind==="unsupported")return D("unsupported_template",e.message);let t=new Map;for(let d of e.targets.values()){let g=ur(n.source,d);if(g!==null){if(g.kind==="refused")return g;t.set(d.start,g)}}let r=[...t.values()].map(d=>d.removal),i=l(d=>d-r.filter(g=>g.end<=d).reduce((g,S)=>g+S.end-S.start,0),"baseOffset"),s=n.sourceVersion??M(pr(n.source,r)),o=[],a=[],c=[],u=[],f=0;for(let d of e.targets.values()){let g=d.kind==="native-element",S=d.kind==="component"||d.kind==="dynamic-element";if(!g&&!S)continue;let E=i(d.start),C=g?yt:bt,y=d.props.filter(O=>!C(O)),b=or(d,y,E),x=t.get(d.start);if(g){let O={filepath:n.filepath,position:E,modifiedTs:n.modifiedTs,sourceVersion:s},A=n.source.includes("<slot")?at(n.source,n.filename,d.start):null;if(a.push({kind:"host",...b.record,...A?.kind==="plain"?{slot:A.name}:{}}),x){if(!(x.kind==="stamps"&&fr(x.metadata,O)&&x.expressions===b.expressions))return ft(d.start);u.push(E);continue}o.push({start:d.propsEnd,end:d.propsEnd,replacement:St(O,b.expressions)}),f+=1;continue}let N=ar(y);if(N===null)continue;let I=sr(n.source,y);if(c.push({kind:"component",...b.record,...b.locked,expressions:b.expressions,...I?{literalProps:I}:{}}),x){if(!(x.kind==="marker"&&x.position===E&&x.spelling===N))return ft(d.start);u.push(E);continue}o.push({start:d.propsEnd,end:d.propsEnd,replacement:Et(N,E)})}let h=new ie(n.source);for(let d of o)h.appendLeft(d.start,d.replacement);let m=h.toString(),p=F(m,n.filename);return p.kind!=="ok"||p.targets.size!==e.targets.size?D("invalid_output",p.kind==="ok"?"annotation changed the template's tag structure":p.message):{kind:"ok",code:m,map:h.generateMap({source:n.filename,includeContent:!0,hires:!0}),edits:o,elementsAnnotated:f,skippedExistingAnnotations:u,sourceVersion:s,registry:{filename:n.filename,filepath:n.filepath,modifiedTs:n.modifiedTs,sourceVersion:s,components:c,hosts:a,rootFallthrough:e.rootFallthrough}}}function sr(n,e){let t=e.filter(i=>!(i.kind==="attribute"&&i.name.startsWith("data-tempo-"))),r=Object.entries(Ye(n,t).props).filter(([,i])=>"value"in i).map(([i,s])=>[i,s.value]);return r.length>0?Object.fromEntries(r):void 0}function gt(n,e){let t=`(globalThis.${ye} || (globalThis.${ye} = {}))`;return`${n}
13
13
  ;typeof window !== "undefined" && (${t}[${JSON.stringify(e.filepath)}] = ${JSON.stringify(e)});
14
- `}function _n(n,e,t){let r=ze(e,f=>f.kind==="bind"&&f.objectBind),i=ze(e,f=>f.kind==="bind"&&f.name===null&&!f.objectBind),s=r>=0||i>=0,o=new Set;n.expressionSlot&&o.add(Se);let l=new Map,u=new Set;e.forEach((f,g)=>{if(f.kind==="directive"){f.name!=="for"&&o.add(f.rawName);return}if(f.name===null||!Pn(f.name))return;if(f.kind==="bind"){if(f.name==="style"&&Array.isArray(f.styleKeys)){let T=!s&&e.filter(y=>y.kind==="bind"&&y.name==="style").length===1,E=new Map;for(let y of T?f.styleObject?.entries??[]:[])E.set(y.key,y.literal);for(let y of f.styleKeys)(E.get(y)??null)===null&&o.add(`style.${y}`);return}if(Ke(n,f.name))return;u.add(f.name),o.add(Ye(f.name));return}l.set(f.name,f.value);let x=g<r&&!Q.has(f.name),b=g<i;(x||b)&&o.add(Ye(f.name))});let c=l.get("class"),d=l.get("style"),p=n.props.find(f=>f.kind==="attribute"&&f.name==="data-tempo-locked"),m=p?.kind==="attribute"?p.value:void 0,h=[...o].join(" ");return{record:{name:n.tagName,position:t,...typeof c=="string"?{className:c}:{},...typeof d=="string"?{style:d}:{},supportsClassName:!s&&!u.has("class")&&(c===void 0||typeof c=="string"),supportsStyle:!s&&!u.has("style")&&(d===void 0||typeof d=="string")},expressions:h||s?h:void 0,locked:m===!0||m==="true"||m===""?{locked:!0}:m==="false"?{locked:!1}:{}}}function ze(n,e){for(let t=n.length-1;t>=0;t--)if(e(n[t]))return t;return-1}function Pn(n){return!Rn.has(n)&&!n.startsWith("data-tempo-")}function Ye(n){return n==="class"?"className":n}function rt(n){return n.kind!=="directive"&&n.name!==null&&On.has(n.name)}function it(n){return n.kind==="directive"&&Qe.includes(n.rawName)&&et.test(n.expression??"")}function An(n){let e=new Set(n.flatMap(t=>t.kind==="attribute"?[]:[t.rawName]));return Qe.find(t=>!e.has(t))??null}function In(n,e){return e.kind==="native-element"?Ln(n,e):e.kind==="component"||e.kind==="dynamic-element"?Mn(n,e):null}function Ln(n,e){let t=e.props.filter(rt);if(t.length===0)return null;let r=[...pe,...t.length>pe.length?[$]:[]],i=e.props.slice(-t.length),s=i.map(E=>E.kind==="attribute"&&typeof E.value=="string"?E.value:null);if(!(t.length===r.length&&i.every((E,y)=>E===t[y]&&E.kind==="attribute"&&E.name===r[y]&&s[y]!==null)))return J(e.start);let[l,u,c,d,p]=s,m=Number(u),h=Number(c),f=i[0],g=i[i.length-1];if(!l||!d||!Number.isSafeInteger(m)||m<0||!Number.isSafeInteger(h)||h<0)return J(e.start);let x={filepath:l,position:m,modifiedTs:h,sourceVersion:d},b={start:f.start-1,end:g.end,replacement:""};return n.slice(b.start,b.end)!==st(x,p)?J(e.start):{kind:"stamps",metadata:x,expressions:p,removal:b}}function Mn(n,e){let t=e.props.filter(it);if(t.length===0)return null;let r=t[0];if(t.length>1||r!==e.props[e.props.length-1]||r.kind!=="directive")return J(e.start);let i=Number(et.exec(r.expression??"")?.[1]),s={start:r.start-1,end:r.end,replacement:""};return n.slice(s.start,s.end)!==ot(r.rawName,i)?J(e.start):{kind:"marker",spelling:r.rawName,position:i,removal:s}}function jn(n,e){return n.filepath===e.filepath&&n.position===e.position&&n.modifiedTs===e.modifiedTs&&n.sourceVersion===e.sourceVersion}function st(n,e){return[["data-tempo-filepath",n.filepath],["data-tempo-position",String(n.position)],["data-tempo-modifiedts",String(n.modifiedTs)],["data-tempo-source-version",n.sourceVersion],...e===void 0?[]:[[$,e]]].map(([r,i])=>` ${r}="${ae(i)}"`).join("")}function ot(n,e){return` ${n}="function ${Be}${e}(){}"`}function Fn(n,e){let t="",r=0;for(let i of e)t+=n.slice(r,i.start),r=i.end;return t+n.slice(r)}function L(n,e){return{kind:"refused",code:n,message:e}}function J(n){return L("annotation_conflict",`tag at UTF-16 offset ${n} has partial, dynamic, reordered, or conflicting Tempo annotations`)}function Ze(n){return L("annotation_conflict",`existing Tempo annotation at UTF-16 offset ${n} does not exactly match the recovered source identity`)}var pe,On,Qe,et,Rn,at=S(()=>{"use strict";K();D();Oe();le();te();Ue();Xe();We();pe=["data-tempo-filepath","data-tempo-position","data-tempo-modifiedts","data-tempo-source-version"],On=new Set([...pe,$]),Qe=["@vue:before-mount","v-on:vue:before-mount","@vue:beforeMount","v-on:vue:beforeMount"],et=/^function __tempo_c(\d+)\(\)\{\}$/,Rn=new Set(["key","ref","ref_for","ref_key"]);a(tt,"annotateVueSource");a(Vn,"literalPropsOf");a(nt,"appendVueSourceRegistryRecord");a(_n,"authoredFacts");a(ze,"lastIndexWhere");a(Pn,"isRenderedName");a(Ye,"factName");a(rt,"isStampProp");a(it,"isMarkerProp");a(An,"markerSpellingFor");a(In,"readExistingAnnotation");a(Ln,"readExistingStamps");a(Mn,"readExistingMarker");a(jn,"sameStampMetadata");a(st,"serializeStamps");a(ot,"serializeMarker");a(Fn,"removeRanges");a(L,"refused");a(J,"annotationConflict");a(Ze,"identityConflict")});function lt(n,e){let t=(0,w.resolve)(n),r=(0,w.relative)(e.sourceRoot,t);if(!r||/^\.\.(?:[\\/]|$)/.test(r)||(0,w.isAbsolute)(r)||r.split(/[\\/]/).includes("node_modules"))return null;let s=(0,w.relative)(e.root,t).replace(/\\/g,"/");return!s||(0,w.isAbsolute)(s)?null:{absoluteFilename:t,filepath:s}}function ut(n){return Math.trunc((0,M.statSync)(n).mtimeMs)}function ct(n){let e=(0,w.resolve)(n);for(;;){if($n(e))return e;let t=(0,w.dirname)(e);if(t===e)return(0,w.resolve)(n);e=t}}function $n(n){if((0,M.existsSync)((0,w.join)(n,"pnpm-workspace.yaml")))return!0;try{return JSON.parse((0,M.readFileSync)((0,w.join)(n,"package.json"),"utf8"))?.workspaces!=null}catch{return!1}}var M,w,ft=S(()=>{M=require("node:fs"),w=require("node:path");a(lt,"resolveAnnotationIdentity");a(ut,"readModifiedTs");a(ct,"defaultSourceRoot");a($n,"isWorkspaceRoot")});function dt(n,e,t,r){let i=JSON.stringify({file:e,modifiedTs:t,sourceVersion:r});return`${n}
14
+ `}function or(n,e,t){let r=ct(e,d=>d.kind==="bind"&&d.objectBind),i=ct(e,d=>d.kind==="bind"&&d.name===null&&!d.objectBind),s=r>=0||i>=0,o=new Set;n.expressionSlot&&o.add(Ce);let a=new Map,c=new Set;e.forEach((d,g)=>{if(d.kind==="directive"){d.name!=="for"&&o.add(d.rawName);return}if(d.name===null||!lr(d.name))return;if(d.kind==="bind"){if(d.name==="style"&&Array.isArray(d.styleKeys)){let C=!s&&e.filter(b=>b.kind==="bind"&&b.name==="style").length===1,y=new Map;for(let b of C?d.styleObject?.entries??[]:[])y.set(b.key,b.literal);for(let b of d.styleKeys)(y.get(b)??null)===null&&o.add(`style.${b}`);return}if(et(n,d.name))return;c.add(d.name),o.add(dt(d.name));return}a.set(d.name,d.value);let S=g<r&&!se.has(d.name),E=g<i;(S||E)&&o.add(dt(d.name))});let u=a.get("class"),f=a.get("style"),h=n.props.find(d=>d.kind==="attribute"&&d.name==="data-tempo-locked"),m=h?.kind==="attribute"?h.value:void 0,p=[...o].join(" ");return{record:{name:n.tagName,position:t,...typeof u=="string"?{className:u}:{},...typeof f=="string"?{style:f}:{},supportsClassName:!s&&!c.has("class")&&(u===void 0||typeof u=="string"),supportsStyle:!s&&!c.has("style")&&(f===void 0||typeof f=="string")},expressions:p||s?p:void 0,locked:m===!0||m==="true"||m===""?{locked:!0}:m==="false"?{locked:!1}:{}}}function ct(n,e){for(let t=n.length-1;t>=0;t--)if(e(n[t]))return t;return-1}function lr(n){return!ir.has(n)&&!n.startsWith("data-tempo-")}function dt(n){return n==="class"?"className":n}function yt(n){return n.kind!=="directive"&&n.name!==null&&rr.has(n.name)}function bt(n){return n.kind==="directive"&&pt.includes(n.rawName)&&ht.test(n.expression??"")}function ar(n){let e=new Set(n.flatMap(t=>t.kind==="attribute"?[]:[t.rawName]));return pt.find(t=>!e.has(t))??null}function ur(n,e){return e.kind==="native-element"?cr(n,e):e.kind==="component"||e.kind==="dynamic-element"?dr(n,e):null}function cr(n,e){let t=e.props.filter(yt);if(t.length===0)return null;let r=[...Ee,...t.length>Ee.length?[J]:[]],i=e.props.slice(-t.length),s=i.map(y=>y.kind==="attribute"&&typeof y.value=="string"?y.value:null);if(!(t.length===r.length&&i.every((y,b)=>y===t[b]&&y.kind==="attribute"&&y.name===r[b]&&s[b]!==null)))return Z(e.start);let[a,c,u,f,h]=s,m=Number(c),p=Number(u),d=i[0],g=i[i.length-1];if(!a||!f||!Number.isSafeInteger(m)||m<0||!Number.isSafeInteger(p)||p<0)return Z(e.start);let S={filepath:a,position:m,modifiedTs:p,sourceVersion:f},E={start:d.start-1,end:g.end,replacement:""};return n.slice(E.start,E.end)!==St(S,h)?Z(e.start):{kind:"stamps",metadata:S,expressions:h,removal:E}}function dr(n,e){let t=e.props.filter(bt);if(t.length===0)return null;let r=t[0];if(t.length>1||r!==e.props[e.props.length-1]||r.kind!=="directive")return Z(e.start);let i=Number(ht.exec(r.expression??"")?.[1]),s={start:r.start-1,end:r.end,replacement:""};return n.slice(s.start,s.end)!==Et(r.rawName,i)?Z(e.start):{kind:"marker",spelling:r.rawName,position:i,removal:s}}function fr(n,e){return n.filepath===e.filepath&&n.position===e.position&&n.modifiedTs===e.modifiedTs&&n.sourceVersion===e.sourceVersion}function St(n,e){return[["data-tempo-filepath",n.filepath],["data-tempo-position",String(n.position)],["data-tempo-modifiedts",String(n.modifiedTs)],["data-tempo-source-version",n.sourceVersion],...e===void 0?[]:[[J,e]]].map(([r,i])=>` ${r}="${de(i)}"`).join("")}function Et(n,e){return` ${n}="function ${Xe}${e}(){}"`}function pr(n,e){let t="",r=0;for(let i of e)t+=n.slice(r,i.start),r=i.end;return t+n.slice(r)}function D(n,e){return{kind:"refused",code:n,message:e}}function Z(n){return D("annotation_conflict",`tag at UTF-16 offset ${n} has partial, dynamic, reordered, or conflicting Tempo annotations`)}function ft(n){return D("annotation_conflict",`existing Tempo annotation at UTF-16 offset ${n} does not exactly match the recovered source identity`)}var Ee,rr,pt,ht,ir,xt=w(()=>{"use strict";te();G();Le();fe();z();Ke();Qe();tt();ut();Ee=["data-tempo-filepath","data-tempo-position","data-tempo-modifiedts","data-tempo-source-version"],rr=new Set([...Ee,J]),pt=["@vue:before-mount","v-on:vue:before-mount","@vue:beforeMount","v-on:vue:beforeMount"],ht=/^function __tempo_c(\d+)\(\)\{\}$/,ir=new Set(["key","ref","ref_for","ref_key"]);l(mt,"annotateVueSource");l(sr,"literalPropsOf");l(gt,"appendVueSourceRegistryRecord");l(or,"authoredFacts");l(ct,"lastIndexWhere");l(lr,"isRenderedName");l(dt,"factName");l(yt,"isStampProp");l(bt,"isMarkerProp");l(ar,"markerSpellingFor");l(ur,"readExistingAnnotation");l(cr,"readExistingStamps");l(dr,"readExistingMarker");l(fr,"sameStampMetadata");l(St,"serializeStamps");l(Et,"serializeMarker");l(pr,"removeRanges");l(D,"refused");l(Z,"annotationConflict");l(ft,"identityConflict")});function wt(n,e){let t=(0,v.resolve)(n),r=(0,v.relative)(e.sourceRoot,t);if(!r||/^\.\.(?:[\\/]|$)/.test(r)||(0,v.isAbsolute)(r)||r.split(/[\\/]/).includes("node_modules"))return null;let s=(0,v.relative)(e.root,t).replace(/\\/g,"/");return!s||(0,v.isAbsolute)(s)?null:{absoluteFilename:t,filepath:s}}function vt(n){return Math.trunc((0,U.statSync)(n).mtimeMs)}function Tt(n){let e=(0,v.resolve)(n);for(;;){if(hr(e))return e;let t=(0,v.dirname)(e);if(t===e)return(0,v.resolve)(n);e=t}}function hr(n){if((0,U.existsSync)((0,v.join)(n,"pnpm-workspace.yaml")))return!0;try{return JSON.parse((0,U.readFileSync)((0,v.join)(n,"package.json"),"utf8"))?.workspaces!=null}catch{return!1}}var U,v,kt=w(()=>{U=require("node:fs"),v=require("node:path");l(wt,"resolveAnnotationIdentity");l(vt,"readModifiedTs");l(Tt,"defaultSourceRoot");l(hr,"isWorkspaceRoot")});function Ct(n,e,t,r){let i=JSON.stringify({file:e,modifiedTs:t,sourceVersion:r});return`${n}
15
15
  ;typeof window !== "undefined" && (globalThis.__TEMPO_MODULE_VERSIONS__ || (globalThis.__TEMPO_MODULE_VERSIONS__ = [])).push(${i});
16
- `}var pt=S(()=>{K();D();a(dt,"appendModuleVersionRecord")});async function mt(n){let e=(0,v.resolve)(n.appRoot),t=qn(e),r={configFile:t,status:"missing",plugins:[],disabled:[]};if(!t)return[he(r,null,[]),n.compiler.fallback()];let i;try{i=await Xn(t,e)}catch(c){return r.status="failed",r.error=yt(c),console.warn(`[tempo] Could not load the app's Vite config ${t}; component boards render without the app's Vite plugins until it loads: ${r.error}`),[he(r,null,[t]),n.compiler.fallback()]}r.status="loaded";let s=(0,v.resolve)(e,i.config.root??"."),o=zn(n.hostRoot),l=[],u=!1;for(let c of i.plugins){let d=c.name??"",p=Wn(d,n.exclude??[]);if(p){r.plugins.push({name:d,kept:!1,reason:p});continue}r.plugins.push({name:d,kept:!0});let m=d===n.compiler.name;u||=m,l.push(Qn(c,{rootView:m?null:s,isTempoOwned:o,report:r}))}return[he(r,rr(i.config,s),[t,...i.dependencies]),...u?[]:[n.compiler.fallback()],...l]}function qn(n){for(let e of Bn){let t=(0,v.join)(n,e);if((0,j.existsSync)(t))return t}return null}function Xn(n,e){let t=ht.then(()=>Kn(n,e));return ht=t.catch(()=>{}),t}async function Kn(n,e){let t=await __tempoRuntime.import("vite"),r={command:"serve",mode:"development",isSsrBuild:!1,isPreview:!1},i=process.cwd();process.chdir(e);try{let s=await t.loadConfigFromFile(r,n,e,"silent");if(!s)throw new Error(`${n} produced no config`);let o=await gt(s.config.plugins);return{config:s.config,plugins:o,dependencies:s.dependencies.map(l=>(0,v.resolve)(e,l))}}finally{process.chdir(i)}}async function gt(n){let e=await n;return e?Array.isArray(e)?(await Promise.all(e.map(gt))).flat():[e]:[]}function Wn(n,e){let t=a(r=>r!==""&&n.startsWith(r),"matches");for(let r of Un)if(r.names.some(t))return r.reason;return e.some(t)?"listed in exclude":null}function zn(n){let e=(0,v.resolve)(n),t=[e,Yn(e)];return r=>{let i=r.split("?",1)[0]??r;return Gn.test(i)||t.some(s=>Zn(s,i))}}function Yn(n){try{return(0,j.realpathSync)(n)}catch{return n}}function Zn(n,e){let t=(0,v.relative)(n,e);return t===""||!t.startsWith("..")&&!(0,v.isAbsolute)(t)}function Qn(n,e){delete n.transformIndexHtml;let t=!1,r=a((s,o)=>{t=!0;let l=yt(o);e.report.disabled.push({name:n.name,hook:s,error:l}),console.warn(`[tempo] Disabled the app's Vite plugin "${n.name}": its ${s} hook threw: ${l}`)},"disable"),i=n;for(let s of Object.keys(i)){if(s==="apply")continue;let o=i[s],l=er(o);if(!l)continue;let u=Jn.has(s)?e.rootView:null,c=Hn.has(s),d=a(function(...p){if(t||s==="transform"&&e.isTempoOwned(String(p[1])))return;let m;u!==null&&(m=tr(p[0],u),p[0]=m);let h=a(f=>s==="config"&&m?nr(f,m):f,"keepHostRoot");if(!c)return l.apply(this,p);try{let f=l.apply(this,p);return sr(f)?Promise.resolve(f).then(h,g=>r(s,g)):h(f)}catch(f){r(s,f);return}},"wrapped");i[s]=typeof o=="function"?d:{...o,handler:d}}return n}function er(n){if(typeof n=="function")return n;if(n&&typeof n=="object"&&"handler"in n){let{handler:e}=n;if(typeof e=="function")return e}return null}function tr(n,e){return!n||typeof n!="object"?n:new Proxy(n,{get:a((t,r)=>r==="root"?e:Reflect.get(t,r),"get")})}function nr(n,e){if(n===e)return;if(!n||typeof n!="object"||!("root"in n))return n;let{root:t,...r}=n;return r}function he(n,e,t){return{name:"tempo-app-vite-config",config:a(()=>e??void 0,"config"),configResolved(r){for(let i of t){let s=(0,v.resolve)(i).replace(/\\/g,"/");r.configFileDependencies.includes(s)||r.configFileDependencies.push(s)}},configureServer(r){r.middlewares.use(Dn,(i,s)=>{s.statusCode=200,s.setHeader("Cache-Control","no-store"),s.setHeader("Content-Type","application/json; charset=utf-8"),s.end(JSON.stringify(n))})}}}function rr(n,e){let t={envDir:n.envDir===!1?!1:(0,v.resolve)(e,n.envDir??".")};n.envPrefix&&(t.envPrefix=n.envPrefix),n.define&&(t.define=n.define),n.assetsInclude&&(t.assetsInclude=n.assetsInclude);let r={};n.resolve?.alias&&(r.alias=ir(n.resolve.alias,e)),n.resolve?.extensions&&(r.extensions=n.resolve.extensions),Object.keys(r).length>0&&(t.resolve=r);let i={};return n.css?.preprocessorOptions&&(i.preprocessorOptions=n.css.preprocessorOptions),n.css?.modules&&(i.modules=n.css.modules),Object.keys(i).length>0&&(t.css=i),t}function ir(n,e){let t=a(r=>{let i=(0,v.join)(e,r);return r.startsWith("/")&&!(0,j.existsSync)(r)&&(0,j.existsSync)(i)?i.replace(/\\/g,"/"):r},"absolute");return Array.isArray(n)?n.map(r=>({...r,replacement:t(r.replacement)})):Object.fromEntries(Object.entries(n).map(([r,i])=>[r,t(i)]))}function sr(n){return!!n&&typeof n=="object"&&typeof n.then=="function"}function yt(n){return n instanceof Error?n.message:String(n)}var j,v,Dn,Bn,Un,Hn,Jn,Gn,ht,bt=S(()=>{j=require("node:fs"),v=require("node:path"),Dn="/__tempo/app-vite-plugins",Bn=["vite.config.js","vite.config.mjs","vite.config.ts","vite.config.cjs","vite.config.mts","vite.config.cts"],Un=[{names:["tempo-annotate","tempo-vue-source-annotation","tempo-vue-source-records"],reason:"Tempo's own plugin, which the host already runs"},{names:["vite:react","@vitejs/plugin-react","vite-tsconfig-paths","@tailwindcss/vite"],reason:"the host runs its own copy"},{names:["vite:vue-jsx"],reason:"Vue JSX would take .tsx canvas files from React"},{names:["vite-plugin-vue-devtools","vite-plugin-vue-inspector","vite-plugin-inspect","vite-plugin-checker","vite:eslint","vite-plugin-eslint","vite-plugin-stylelint"],reason:"a dev tool"},{names:["vite:html","vite-plugin-html","vite-plugin-pwa"],reason:"serves the app's index.html or service worker"},{names:["vite:basic-ssl","vite:mkcert","vite-plugin-mkcert"],reason:"switches the server to HTTPS"}],Hn=new Set(["config","configResolved","configureServer","buildStart"]),Jn=new Set(["config","configResolved"]),Gn=/\.canvas\.[jt]sx$/;a(mt,"loadAppVitePlugins");a(qn,"findViteConfigFile");ht=Promise.resolve();a(Xn,"loadAppConfig");a(Kn,"loadAppConfigFromAppFolder");a(gt,"flattenPluginOption");a(Wn,"droppedReason");a(zn,"createTempoOwnedModuleMatcher");a(Yn,"realPathOrSelf");a(Zn,"isWithin");a(Qn,"adoptAppPlugin");a(er,"hookHandler");a(tr,"withRoot");a(nr,"withoutRoot");a(he,"createHostSettingsPlugin");a(rr,"hostSettingsFromAppConfig");a(ir,"withAbsoluteAliases");a(sr,"isPromiseLike");a(yt,"errorMessage")});function Et(){let n=new Map,e=a(t=>{let r=[],i=t,s=!1;for(;;){let o=n.get(i);if(o!==void 0){s=o;break}r.push(i);let l=ar(i);if(l!==void 0){s=l?.name===St;break}let u=(0,G.dirname)(i);if(u===i)break;i=u}for(let o of r)n.set(o,s);return s},"nearestPackageIsSdk");return t=>{if(t.replace(/\\/g,"/").includes(or))return!0;let r=t;try{r=ne.realpathSync.native(t)}catch{}return e((0,G.dirname)(r))}}function ar(n){let e;try{e=(0,ne.readFileSync)((0,G.join)(n,"package.json"),"utf8")}catch{return}try{let t=JSON.parse(e);return t&&typeof t=="object"?t:null}catch{return null}}var ne,G,St,or,wt=S(()=>{ne=require("node:fs"),G=require("node:path"),St="tempo-sdk",or=`/node_modules/${St}/`;a(Et,"createSdkFileMatcher");a(ar,"readPackageManifest")});var kt={};ye(kt,{tempoVueAppPlugins:()=>ur,tempoVuePlugin:()=>lr});function lr(n={}){let e=(0,O.resolve)(n.root??process.cwd()),t=(0,O.resolve)(n.sourceRoot??ct(e)),r=n.enabled??!!process.env.TEMPO,i=(n.exclude??[]).map(c=>(0,O.resolve)(c)),s=Et(),o=new Map,l=new Set,u=a(c=>{if(!r||c.startsWith("\0")||!me.test(c))return null;let d=lt(c,{root:e,sourceRoot:t});return!d||s(d.absoluteFilename)||cr(d.absoluteFilename,i)?null:d},"identityFor");return[{name:vt.TEMPO_VUE_ANNOTATION_PLUGIN_NAME,enforce:"pre",api:{enabled:r},transform:{order:"pre",filter:{id:me},handler(c,d){o.delete(d);let p=u(d);if(!p)return;let m;try{m=(0,xt.readFileSync)(p.absoluteFilename,"utf8")}catch{return}let h=a((g,x)=>{let b=`${d}\0${g}`;l.has(b)||(l.add(b),this.warn(`Tempo did not annotate ${p.filepath}: ${x}`))},"warnOnce");if(c!==m){h("drift","an earlier Vite plugin changed the source; put tempoVuePlugin() first");return}let f=tt({source:c,filename:d,filepath:p.filepath,modifiedTs:ut(p.absoluteFilename),sourceVersion:A(m)});if(f.kind==="refused"){f.code!=="invalid_source"&&h(f.code,`${f.code}: ${f.message}`);return}if(o.set(d,f.registry),f.edits.length!==0)return{code:f.code,map:f.map}}}},{name:"tempo-vue-source-records",enforce:"post",hotUpdate:{order:"post",handler(c){if(c.type!=="update"||this.environment.config.consumer!=="client"||!u(c.file)||!o.has(c.file))return;let p=[...this.environment.moduleGraph.getModulesByFile(c.file)??[]].filter(m=>m.id===c.file||m.id?.startsWith(`${c.file}?vue&type=template`));if(p.length)return[...new Set([...c.modules,...p])]}},transform:{filter:{id:me},handler(c,d){let p=o.get(d);if(!p)return;let m=nt(c,p);return{code:dt(m,p.filepath,p.modifiedTs,p.sourceVersion),map:null}}}}]}function ur(n){return mt({hostRoot:n.root,appRoot:n.appRoot,compiler:{name:"vite:vue",fallback:n.vue},exclude:n.exclude})}function cr(n,e){return e.some(t=>{let r=(0,O.relative)(t,n);return r===""||!r.startsWith("..")&&!(0,O.isAbsolute)(r)})}var xt,O,vt,me,Tt=S(()=>{xt=require("node:fs"),O=require("node:path");at();D();vt=require("@tempo-sdk-public/host-identity");ft();pt();bt();wt();me=/\.vue$/;a(lr,"tempoVuePlugin");a(ur,"tempoVueAppPlugins");a(cr,"isUnderAny")});var dr={};ye(dr,{getEntry:()=>fr});module.exports=be(dr);var ge={};function fr(n){if(ge[n])return ge[n];if(n==="vue")return ge[n]=(Tt(),be(kt));throw new Error("Unknown Tempo runtime entry: "+n)}a(fr,"getEntry");0&&(module.exports={getEntry});
16
+ `}var Nt=w(()=>{te();G();l(Ct,"appendModuleVersionRecord")});async function Rt(n){let e=(0,T.resolve)(n.appRoot),t=xr(e),r={configFile:t,status:"missing",plugins:[],disabled:[]};if(!t)return[xe(r,null,[]),n.compiler.fallback()];let i;try{i=await wr(t,e)}catch(u){return r.status="failed",r.error=Vt(u),console.warn(`[tempo] Could not load the app's Vite config ${t}; component boards render without the app's Vite plugins until it loads: ${r.error}`),[xe(r,null,[t]),n.compiler.fallback()]}r.status="loaded";let s=(0,T.resolve)(e,i.config.root??"."),o=kr(n.hostRoot),a=[],c=!1;for(let u of i.plugins){let f=u.name??"",h=Tr(f,n.exclude??[]);if(h){r.plugins.push({name:f,kept:!1,reason:h});continue}r.plugins.push({name:f,kept:!0});let m=f===n.compiler.name;c||=m,a.push(Or(u,{rootView:m?null:s,isTempoOwned:o,report:r}))}return[xe(r,Pr(i.config,s),[t,...i.dependencies]),...c?[]:[n.compiler.fallback()],...a]}function xr(n){for(let e of gr){let t=(0,T.join)(n,e);if((0,B.existsSync)(t))return t}return null}function wr(n,e){let t=Ot.then(()=>vr(n,e));return Ot=t.catch(()=>{}),t}async function vr(n,e){let t=await __tempoRuntime.import("vite"),r={command:"serve",mode:"development",isSsrBuild:!1,isPreview:!1},i=process.cwd();process.chdir(e);try{let s=await t.loadConfigFromFile(r,n,e,"silent");if(!s)throw new Error(`${n} produced no config`);let o=await At(s.config.plugins);return{config:s.config,plugins:o,dependencies:s.dependencies.map(a=>(0,T.resolve)(e,a))}}finally{process.chdir(i)}}async function At(n){let e=await n;return e?Array.isArray(e)?(await Promise.all(e.map(At))).flat():[e]:[]}function Tr(n,e){let t=l(r=>r!==""&&n.startsWith(r),"matches");for(let r of yr)if(r.names.some(t))return r.reason;return e.some(t)?"listed in exclude":null}function kr(n){let e=(0,T.resolve)(n),t=[e,Cr(e)];return r=>{let i=r.split("?",1)[0]??r;return Er.test(i)||t.some(s=>Nr(s,i))}}function Cr(n){try{return(0,B.realpathSync)(n)}catch{return n}}function Nr(n,e){let t=(0,T.relative)(n,e);return t===""||!t.startsWith("..")&&!(0,T.isAbsolute)(t)}function Or(n,e){delete n.transformIndexHtml;let t=!1,r=l((s,o)=>{t=!0;let a=Vt(o);e.report.disabled.push({name:n.name,hook:s,error:a}),console.warn(`[tempo] Disabled the app's Vite plugin "${n.name}": its ${s} hook threw: ${a}`)},"disable"),i=n;for(let s of Object.keys(i)){if(s==="apply")continue;let o=i[s],a=Rr(o);if(!a)continue;let c=Sr.has(s)?e.rootView:null,u=br.has(s),f=l(function(...h){if(t||s==="transform"&&e.isTempoOwned(String(h[1])))return;let m;c!==null&&(m=Ar(h[0],c),h[0]=m);let p=l(d=>s==="config"&&m?Vr(d,m):d,"keepHostRoot");if(!u)return a.apply(this,h);try{let d=a.apply(this,h);return Ir(d)?Promise.resolve(d).then(p,g=>r(s,g)):p(d)}catch(d){r(s,d);return}},"wrapped");i[s]=typeof o=="function"?f:{...o,handler:f}}return n}function Rr(n){if(typeof n=="function")return n;if(n&&typeof n=="object"&&"handler"in n){let{handler:e}=n;if(typeof e=="function")return e}return null}function Ar(n,e){return!n||typeof n!="object"?n:new Proxy(n,{get:l((t,r)=>r==="root"?e:Reflect.get(t,r),"get")})}function Vr(n,e){if(n===e)return;if(!n||typeof n!="object"||!("root"in n))return n;let{root:t,...r}=n;return r}function xe(n,e,t){return{name:"tempo-app-vite-config",config:l(()=>e??void 0,"config"),configResolved(r){for(let i of t){let s=(0,T.resolve)(i).replace(/\\/g,"/");r.configFileDependencies.includes(s)||r.configFileDependencies.push(s)}},configureServer(r){r.middlewares.use(mr,(i,s)=>{s.statusCode=200,s.setHeader("Cache-Control","no-store"),s.setHeader("Content-Type","application/json; charset=utf-8"),s.end(JSON.stringify(n))})}}}function Pr(n,e){let t={envDir:n.envDir===!1?!1:(0,T.resolve)(e,n.envDir??".")};n.envPrefix&&(t.envPrefix=n.envPrefix),n.define&&(t.define=n.define),n.assetsInclude&&(t.assetsInclude=n.assetsInclude);let r={};n.resolve?.alias&&(r.alias=_r(n.resolve.alias,e)),n.resolve?.extensions&&(r.extensions=n.resolve.extensions),Object.keys(r).length>0&&(t.resolve=r);let i={};return n.css?.preprocessorOptions&&(i.preprocessorOptions=n.css.preprocessorOptions),n.css?.modules&&(i.modules=n.css.modules),Object.keys(i).length>0&&(t.css=i),t}function _r(n,e){let t=l(r=>{let i=(0,T.join)(e,r);return r.startsWith("/")&&!(0,B.existsSync)(r)&&(0,B.existsSync)(i)?i.replace(/\\/g,"/"):r},"absolute");return Array.isArray(n)?n.map(r=>({...r,replacement:t(r.replacement)})):Object.fromEntries(Object.entries(n).map(([r,i])=>[r,t(i)]))}function Ir(n){return!!n&&typeof n=="object"&&typeof n.then=="function"}function Vt(n){return n instanceof Error?n.message:String(n)}var B,T,mr,gr,yr,br,Sr,Er,Ot,Pt=w(()=>{B=require("node:fs"),T=require("node:path"),mr="/__tempo/app-vite-plugins",gr=["vite.config.js","vite.config.mjs","vite.config.ts","vite.config.cjs","vite.config.mts","vite.config.cts"],yr=[{names:["tempo-annotate","tempo-vue-source-annotation","tempo-vue-source-records"],reason:"Tempo's own plugin, which the host already runs"},{names:["vite:react","@vitejs/plugin-react","vite-tsconfig-paths","@tailwindcss/vite"],reason:"the host runs its own copy"},{names:["vite:vue-jsx"],reason:"Vue JSX would take .tsx canvas files from React"},{names:["vite-plugin-vue-devtools","vite-plugin-vue-inspector","vite-plugin-inspect","vite-plugin-checker","vite:eslint","vite-plugin-eslint","vite-plugin-stylelint"],reason:"a dev tool"},{names:["vite:html","vite-plugin-html","vite-plugin-pwa"],reason:"serves the app's index.html or service worker"},{names:["vite:basic-ssl","vite:mkcert","vite-plugin-mkcert"],reason:"switches the server to HTTPS"}],br=new Set(["config","configResolved","configureServer","buildStart"]),Sr=new Set(["config","configResolved"]),Er=/\.canvas\.[jt]sx$/;l(Rt,"loadAppVitePlugins");l(xr,"findViteConfigFile");Ot=Promise.resolve();l(wr,"loadAppConfig");l(vr,"loadAppConfigFromAppFolder");l(At,"flattenPluginOption");l(Tr,"droppedReason");l(kr,"createTempoOwnedModuleMatcher");l(Cr,"realPathOrSelf");l(Nr,"isWithin");l(Or,"adoptAppPlugin");l(Rr,"hookHandler");l(Ar,"withRoot");l(Vr,"withoutRoot");l(xe,"createHostSettingsPlugin");l(Pr,"hostSettingsFromAppConfig");l(_r,"withAbsoluteAliases");l(Ir,"isPromiseLike");l(Vt,"errorMessage")});function It(){let n=new Map,e=l(t=>{let r=[],i=t,s=!1;for(;;){let o=n.get(i);if(o!==void 0){s=o;break}r.push(i);let a=Mr(i);if(a!==void 0){s=a?.name===_t;break}let c=(0,Q.dirname)(i);if(c===i)break;i=c}for(let o of r)n.set(o,s);return s},"nearestPackageIsSdk");return t=>{if(t.replace(/\\/g,"/").includes(Lr))return!0;let r=t;try{r=oe.realpathSync.native(t)}catch{}return e((0,Q.dirname)(r))}}function Mr(n){let e;try{e=(0,oe.readFileSync)((0,Q.join)(n,"package.json"),"utf8")}catch{return}try{let t=JSON.parse(e);return t&&typeof t=="object"?t:null}catch{return null}}var oe,Q,_t,Lr,Lt=w(()=>{oe=require("node:fs"),Q=require("node:path"),_t="tempo-sdk",Lr=`/node_modules/${_t}/`;l(It,"createSdkFileMatcher");l(Mr,"readPackageManifest")});var Ft={};Te(Ft,{tempoVueAppPlugins:()=>Fr,tempoVuePlugin:()=>jr});function jr(n={}){let e=(0,_.resolve)(n.root??process.cwd()),t=(0,_.resolve)(n.sourceRoot??Tt(e)),r=n.enabled??!!process.env.TEMPO,i=(n.exclude??[]).map(u=>(0,_.resolve)(u)),s=It(),o=new Map,a=new Set,c=l(u=>{if(!r||u.startsWith("\0")||!we.test(u))return null;let f=wt(u,{root:e,sourceRoot:t});return!f||s(f.absoluteFilename)||$r(f.absoluteFilename,i)?null:f},"identityFor");return[{name:jt.TEMPO_VUE_ANNOTATION_PLUGIN_NAME,enforce:"pre",api:{enabled:r},transform:{order:"pre",filter:{id:we},handler(u,f){o.delete(f);let h=c(f);if(!h)return;let m;try{m=(0,Mt.readFileSync)(h.absoluteFilename,"utf8")}catch{return}let p=l((g,S)=>{let E=`${f}\0${g}`;a.has(E)||(a.add(E),this.warn(`Tempo did not annotate ${h.filepath}: ${S}`))},"warnOnce");if(u!==m){p("drift","an earlier Vite plugin changed the source; put tempoVuePlugin() first");return}let d=mt({source:u,filename:f,filepath:h.filepath,modifiedTs:vt(h.absoluteFilename),sourceVersion:M(m)});if(d.kind==="refused"){d.code!=="invalid_source"&&p(d.code,`${d.code}: ${d.message}`);return}if(o.set(f,d.registry),d.edits.length!==0)return{code:d.code,map:d.map}}}},{name:"tempo-vue-source-records",enforce:"post",hotUpdate:{order:"post",handler(u){if(u.type!=="update"||this.environment.config.consumer!=="client"||!c(u.file)||!o.has(u.file))return;let h=[...this.environment.moduleGraph.getModulesByFile(u.file)??[]].filter(m=>m.id===u.file||m.id?.startsWith(`${u.file}?vue&type=template`));if(h.length)return[...new Set([...u.modules,...h])]}},transform:{filter:{id:we},handler(u,f){let h=o.get(f);if(!h)return;let m=gt(u,h);return{code:Ct(m,h.filepath,h.modifiedTs,h.sourceVersion),map:null}}}}]}function Fr(n){return Rt({hostRoot:n.root,appRoot:n.appRoot,compiler:{name:"vite:vue",fallback:n.vue},exclude:n.exclude})}function $r(n,e){return e.some(t=>{let r=(0,_.relative)(t,n);return r===""||!r.startsWith("..")&&!(0,_.isAbsolute)(r)})}var Mt,_,jt,we,$t=w(()=>{Mt=require("node:fs"),_=require("node:path");xt();G();jt=require("@tempo-sdk-public/host-identity");kt();Nt();Pt();Lt();we=/\.vue$/;l(jr,"tempoVuePlugin");l(Fr,"tempoVueAppPlugins");l($r,"isUnderAny")});var Ur={};Te(Ur,{getEntry:()=>Dr});module.exports=ke(Ur);var ve={};function Dr(n){if(ve[n])return ve[n];if(n==="vue")return ve[n]=($t(),ke(Ft));throw new Error("Unknown Tempo runtime entry: "+n)}l(Dr,"getEntry");0&&(module.exports={getEntry});
17
17
 
18
18
  return module.exports;};
@@ -4,47 +4,47 @@
4
4
  "node": {
5
5
  "index": {
6
6
  "file": "node/core.cjs",
7
- "sha256": "963fe74ef385de8b65f306447c19c02481fdd974e7ee9a10ede0c09451a50cad"
7
+ "sha256": "9ca23c0cca8beb60cccaec26473ea9e1cb9e831ffd0e5cac5d47571394c116d3"
8
8
  },
9
9
  "expo-babel-plugin": {
10
10
  "file": "node/core.cjs",
11
- "sha256": "963fe74ef385de8b65f306447c19c02481fdd974e7ee9a10ede0c09451a50cad"
11
+ "sha256": "9ca23c0cca8beb60cccaec26473ea9e1cb9e831ffd0e5cac5d47571394c116d3"
12
12
  },
13
13
  "flutter-preview-path": {
14
14
  "file": "node/core.cjs",
15
- "sha256": "963fe74ef385de8b65f306447c19c02481fdd974e7ee9a10ede0c09451a50cad"
15
+ "sha256": "9ca23c0cca8beb60cccaec26473ea9e1cb9e831ffd0e5cac5d47571394c116d3"
16
16
  },
17
17
  "nextjs-loader": {
18
18
  "file": "node/core.cjs",
19
- "sha256": "963fe74ef385de8b65f306447c19c02481fdd974e7ee9a10ede0c09451a50cad"
19
+ "sha256": "9ca23c0cca8beb60cccaec26473ea9e1cb9e831ffd0e5cac5d47571394c116d3"
20
20
  },
21
21
  "assets/parser": {
22
22
  "file": "node/core.cjs",
23
- "sha256": "963fe74ef385de8b65f306447c19c02481fdd974e7ee9a10ede0c09451a50cad"
23
+ "sha256": "9ca23c0cca8beb60cccaec26473ea9e1cb9e831ffd0e5cac5d47571394c116d3"
24
24
  },
25
25
  "canvas/parser": {
26
26
  "file": "node/core.cjs",
27
- "sha256": "963fe74ef385de8b65f306447c19c02481fdd974e7ee9a10ede0c09451a50cad"
27
+ "sha256": "9ca23c0cca8beb60cccaec26473ea9e1cb9e831ffd0e5cac5d47571394c116d3"
28
28
  },
29
29
  "vue": {
30
30
  "file": "node/vue.cjs",
31
- "sha256": "1b747bab973f20346797645d6bc5ed4fa2fa53232e39938d7130a4d0ccf57333"
31
+ "sha256": "4a7103e6c749788f486388b3d7432453426e175ac31ebb6dc5177dfb3d90b511"
32
32
  },
33
33
  "svelte": {
34
34
  "file": "node/svelte.cjs",
35
- "sha256": "de6eff965e996c570b4b960d934010ef39bce7d452506c7ad3c86b07215a4111"
35
+ "sha256": "3bc02f29becd6af328309056f06fd531aef00201c8c6fb6e7e4a637d091e27ff"
36
36
  },
37
37
  "astro": {
38
38
  "file": "node/astro.cjs",
39
- "sha256": "4fc4698ccdb433028ccffd88ee00408888830032bb7397c528171636927a7837"
39
+ "sha256": "9c7720a962805b644205b3fa33270268b3d966110c7d076a6040237a287b4bde"
40
40
  },
41
41
  "astro/runtime": {
42
42
  "file": "node/astro.cjs",
43
- "sha256": "4fc4698ccdb433028ccffd88ee00408888830032bb7397c528171636927a7837"
43
+ "sha256": "9c7720a962805b644205b3fa33270268b3d966110c7d076a6040237a287b4bde"
44
44
  },
45
45
  "nuxt": {
46
46
  "file": "node/nuxt.cjs",
47
- "sha256": "18c9c3c492469c232623db4c5a72e7df77188e064e6a7742544e1a1916871be6"
47
+ "sha256": "b210553aa2a2ae3d3990ffe459baa1326e9c4c15539d9f3b86f338736c930a01"
48
48
  }
49
49
  },
50
50
  "browser": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tempo-ai/visual-review",
3
- "version": "0.0.145-staging.2",
3
+ "version": "0.0.145",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/TempoLabsAI/tempo-monorepo.git",
File without changes