@nice2dev/testing 1.3.15 → 1.3.16

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,10 +1,10 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var E=44,k=59,b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",v=new Uint8Array(64),L=new Uint8Array(128);for(let u=0;u<b.length;u++){const t=b.charCodeAt(u);v[u]=t,L[t]=u}function c(u,t,e){let i=t-e;i=i<0?-i<<1|1:i<<1;do{let n=i&31;i>>>=5,i>0&&(n|=32),u.write(v[n])}while(i>0);return t}var C=1024*16,y=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(u){return Buffer.from(u.buffer,u.byteOffset,u.byteLength).toString()}}:{decode(u){let t="";for(let e=0;e<u.length;e++)t+=String.fromCharCode(u[e]);return t}},R=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(C)}write(u){const{buffer:t}=this;t[this.pos++]=u,this.pos===C&&(this.out+=y.decode(t),this.pos=0)}flush(){const{buffer:u,out:t,pos:e}=this;return e>0?t+y.decode(u.subarray(0,e)):t}};function _(u){const t=new R;let e=0,i=0,n=0,r=0;for(let s=0;s<u.length;s++){const h=u[s];if(s>0&&t.write(k),h.length===0)continue;let o=0;for(let l=0;l<h.length;l++){const a=h[l];l>0&&t.write(E),o=c(t,a[0],o),a.length!==1&&(e=c(t,a[1],e),i=c(t,a[2],i),n=c(t,a[3],n),a.length!==4&&(r=c(t,a[4],r)))}}return t.flush()}class p{constructor(t){this.bits=t instanceof p?t.bits.slice():[]}add(t){this.bits[t>>5]|=1<<(t&31)}has(t){return!!(this.bits[t>>5]&1<<(t&31))}}class g{constructor(t,e,i){this.start=t,this.end=e,this.original=i,this.intro="",this.outro="",this.content=i,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(t){this.outro+=t}appendRight(t){this.intro=this.intro+t}clone(){const t=new g(this.start,this.end,this.original);return t.intro=this.intro,t.outro=this.outro,t.content=this.content,t.storeName=this.storeName,t.edited=this.edited,t}contains(t){return this.start<t&&t<this.end}eachNext(t){let e=this;for(;e;)t(e),e=e.next}eachPrevious(t){let e=this;for(;e;)t(e),e=e.previous}edit(t,e,i){return this.content=t,i||(this.intro="",this.outro=""),this.storeName=e,this.edited=!0,this}prependLeft(t){this.outro=t+this.outro}prependRight(t){this.intro=t+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(t){const e=t-this.start,i=this.original.slice(0,e),n=this.original.slice(e);this.original=i;const r=new g(t,this.end,n);return r.outro=this.outro,this.outro="",this.end=t,this.edited?(r.edit("",!1),this.content=""):this.content=i,r.next=this.next,r.next&&(r.next.previous=r),r.previous=this,this.next=r,r}toString(){return this.intro+this.content+this.outro}trimEnd(t){if(this.outro=this.outro.replace(t,""),this.outro.length)return!0;const e=this.content.replace(t,"");if(e.length)return e!==this.content&&(this.split(this.start+e.length).edit("",void 0,!0),this.edited&&this.edit(e,this.storeName,!0)),!0;if(this.edit("",void 0,!0),this.intro=this.intro.replace(t,""),this.intro.length)return!0}trimStart(t){if(this.intro=this.intro.replace(t,""),this.intro.length)return!0;const e=this.content.replace(t,"");if(e.length){if(e!==this.content){const i=this.split(this.end-e.length);this.edited&&i.edit(e,this.storeName,!0),this.edit("",void 0,!0)}return!0}else if(this.edit("",void 0,!0),this.outro=this.outro.replace(t,""),this.outro.length)return!0}}function O(){return typeof globalThis<"u"&&typeof globalThis.btoa=="function"?u=>globalThis.btoa(unescape(encodeURIComponent(u))):typeof Buffer=="function"?u=>Buffer.from(u,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}const N=O();class x{constructor(t){this.version=3,this.file=t.file,this.sources=t.sources,this.sourcesContent=t.sourcesContent,this.names=t.names,this.mappings=_(t.mappings),typeof t.x_google_ignoreList<"u"&&(this.x_google_ignoreList=t.x_google_ignoreList),typeof t.debugId<"u"&&(this.debugId=t.debugId)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+N(this.toString())}}function I(u){const t=u.split(`
2
- `),e=t.filter(r=>/^\t+/.test(r)),i=t.filter(r=>/^ {2,}/.test(r));if(e.length===0&&i.length===0)return null;if(e.length>=i.length)return" ";const n=i.reduce((r,s)=>{const h=/^ +/.exec(s)[0].length;return Math.min(h,r)},1/0);return new Array(n+1).join(" ")}function A(u,t){const e=u.split(/[/\\]/),i=t.split(/[/\\]/);for(e.pop();e[0]===i[0];)e.shift(),i.shift();if(e.length){let n=e.length;for(;n--;)e[n]=".."}return e.concat(i).join("/")}const T=Object.prototype.toString;function j(u){return T.call(u)==="[object Object]"}function S(u){const t=u.split(`
3
- `),e=[];for(let i=0,n=0;i<t.length;i++)e.push(n),n+=t[i].length+1;return function(n){let r=0,s=e.length;for(;r<s;){const l=r+s>>1;n<e[l]?s=l:r=l+1}const h=r-1,o=n-e[h];return{line:h,column:o}}}const $=/\w/;class U{constructor(t){this.hires=t,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(t,e,i,n){if(e.length){const r=e.length-1;let s=e.indexOf(`
4
- `,0),h=-1;for(;s>=0&&r>s;){const l=[this.generatedCodeColumn,t,i.line,i.column];n>=0&&l.push(n),this.rawSegments.push(l),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,h=s,s=e.indexOf(`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var k=44,L=59,C="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",x=new Uint8Array(64),R=new Uint8Array(128);for(let l=0;l<C.length;l++){const t=C.charCodeAt(l);x[l]=t,R[t]=l}function c(l,t){do{let e=t&31;t>>>=5,t>0&&(e|=32),l.write(x[e])}while(t>0)}function d(l){return l<0?-l<<1|1:l<<1}var y=1024*16,S=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(l){return Buffer.from(l.buffer,l.byteOffset,l.byteLength).toString()}}:{decode(l){let t="";for(let e=0;e<l.length;e++)t+=String.fromCharCode(l[e]);return t}},_=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(y)}write(l){const{buffer:t}=this;t[this.pos++]=l,this.pos===y&&(this.out+=S.decode(t),this.pos=0)}flush(){const{buffer:l,out:t,pos:e}=this;return e>0?t+S.decode(l.subarray(0,e)):t}};function O(l){const t=new _;let e=0,i=0,n=0,r=0;for(let s=0;s<l.length;s++){const h=l[s];if(s>0&&t.write(L),h.length===0)continue;let o=0;for(let u=0;u<h.length;u++){const a=h[u];u>0&&t.write(k),c(t,d(a[0]-o)),o=a[0],a.length!==1&&(c(t,d(a[1]-e)),c(t,d(a[2]-i)),c(t,d(a[3]-n)),e=a[1],i=a[2],n=a[3],a.length!==4&&(c(t,d(a[4]-r)),r=a[4]))}}return t.flush()}class w{constructor(t){this.bits=t instanceof w?t.bits.slice():[]}add(t){this.bits[t>>5]|=1<<(t&31)}has(t){return!!(this.bits[t>>5]&1<<(t&31))}}class p{constructor(t,e,i){this.start=t,this.end=e,this.original=i,this.intro="",this.outro="",this.content=i,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(t){this.outro+=t}appendRight(t){this.intro=this.intro+t}clone(){const t=new p(this.start,this.end,this.original);return t.intro=this.intro,t.outro=this.outro,t.content=this.content,t.storeName=this.storeName,t.edited=this.edited,t}contains(t){return this.start<t&&t<this.end}eachNext(t){let e=this;for(;e;)t(e),e=e.next}eachPrevious(t){let e=this;for(;e;)t(e),e=e.previous}edit(t,e,i){return this.content=t,i||(this.intro="",this.outro=""),this.storeName=e,this.edited=!0,this}prependLeft(t){this.outro=t+this.outro}prependRight(t){this.intro=t+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(t){const e=t-this.start,i=this.original.slice(0,e),n=this.original.slice(e);this.original=i;const r=new p(t,this.end,n);return r.outro=this.outro,this.outro="",this.end=t,this.edited?(r.edit("",!1),this.content=""):this.content=i,r.next=this.next,r.next&&(r.next.previous=r),r.previous=this,this.next=r,r}toString(){return this.intro+this.content+this.outro}trimEnd(t){if(this.outro=this.outro.replace(t,""),this.outro.length)return!0;const e=this.content.replace(t,"");if(e.length)return e!==this.content&&(this.split(this.start+e.length).edit("",void 0,!0),this.edited&&this.edit(e,this.storeName,!0)),!0;if(this.edit("",void 0,!0),this.intro=this.intro.replace(t,""),this.intro.length)return!0}trimStart(t){if(this.intro=this.intro.replace(t,""),this.intro.length)return!0;const e=this.content.replace(t,"");if(e.length){if(e!==this.content){const i=this.split(this.end-e.length);this.edited&&i.edit(e,this.storeName,!0),this.edit("",void 0,!0)}return!0}else if(this.edit("",void 0,!0),this.outro=this.outro.replace(t,""),this.outro.length)return!0}}function N(){return typeof globalThis<"u"&&typeof globalThis.btoa=="function"?l=>globalThis.btoa(unescape(encodeURIComponent(l))):typeof Buffer=="function"?l=>Buffer.from(l,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}const I=N();class E{constructor(t){this.version=3,this.file=t.file,this.sources=t.sources,this.sourcesContent=t.sourcesContent,this.names=t.names,this.mappings=O(t.mappings),typeof t.x_google_ignoreList<"u"&&(this.x_google_ignoreList=t.x_google_ignoreList),typeof t.debugId<"u"&&(this.debugId=t.debugId)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+I(this.toString())}}function A(l){const t=l.split(`
2
+ `),e=t.filter(r=>/^\t+/.test(r)),i=t.filter(r=>/^ {2,}/.test(r));if(e.length===0&&i.length===0)return null;if(e.length>=i.length)return" ";const n=i.reduce((r,s)=>{const h=/^ +/.exec(s)[0].length;return Math.min(h,r)},1/0);return new Array(n+1).join(" ")}function T(l,t){const e=l.split(/[/\\]/),i=t.split(/[/\\]/);for(e.pop();e[0]===i[0];)e.shift(),i.shift();if(e.length){let n=e.length;for(;n--;)e[n]=".."}return e.concat(i).join("/")}const j=Object.prototype.toString;function $(l){return j.call(l)==="[object Object]"}function v(l){const t=l.split(`
3
+ `),e=[];for(let i=0,n=0;i<t.length;i++)e.push(n),n+=t[i].length+1;return function(n){let r=0,s=e.length;for(;r<s;){const u=r+s>>1;n<e[u]?s=u:r=u+1}const h=r-1,o=n-e[h];return{line:h,column:o}}}const U=/\w/;class M{constructor(t){this.hires=t,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(t,e,i,n){if(e.length){const r=e.length-1;let s=e.indexOf(`
4
+ `,0),h=-1;for(;s>=0&&r>s;){const u=[this.generatedCodeColumn,t,i.line,i.column];n>=0&&u.push(n),this.rawSegments.push(u),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,h=s,s=e.indexOf(`
5
5
  `,s+1)}const o=[this.generatedCodeColumn,t,i.line,i.column];n>=0&&o.push(n),this.rawSegments.push(o),this.advance(e.slice(h+1))}else this.pending&&(this.rawSegments.push(this.pending),this.advance(e));this.pending=null}addUneditedChunk(t,e,i,n,r){let s=e.start,h=!0,o=!1;for(;s<e.end;){if(i[s]===`
6
- `)n.line+=1,n.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,h=!0,o=!1;else{if(this.hires||h||r.has(s)){const l=[this.generatedCodeColumn,t,n.line,n.column];this.hires==="boundary"?$.test(i[s])?o||(this.rawSegments.push(l),o=!0):(this.rawSegments.push(l),o=!1):this.rawSegments.push(l)}n.column+=1,this.generatedCodeColumn+=1,h=!1}s+=1}this.pending=null}advance(t){if(!t)return;const e=t.split(`
7
- `);if(e.length>1){for(let i=0;i<e.length-1;i++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0}this.generatedCodeColumn+=e[e.length-1].length}}const d=`
8
- `,f={insertLeft:!1,insertRight:!1,storeName:!1};class m{constructor(t,e={}){const i=new g(0,t.length,t);Object.defineProperties(this,{original:{writable:!0,value:t},outro:{writable:!0,value:""},intro:{writable:!0,value:""},firstChunk:{writable:!0,value:i},lastChunk:{writable:!0,value:i},lastSearchedChunk:{writable:!0,value:i},byStart:{writable:!0,value:{}},byEnd:{writable:!0,value:{}},filename:{writable:!0,value:e.filename},indentExclusionRanges:{writable:!0,value:e.indentExclusionRanges},sourcemapLocations:{writable:!0,value:new p},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:void 0},ignoreList:{writable:!0,value:e.ignoreList},offset:{writable:!0,value:e.offset||0}}),this.byStart[0]=i,this.byEnd[t.length]=i}addSourcemapLocation(t){this.sourcemapLocations.add(t)}append(t){if(typeof t!="string")throw new TypeError("outro content must be a string");return this.outro+=t,this}appendLeft(t,e){if(t=t+this.offset,typeof e!="string")throw new TypeError("inserted content must be a string");this._split(t);const i=this.byEnd[t];return i?i.appendLeft(e):this.intro+=e,this}appendRight(t,e){if(t=t+this.offset,typeof e!="string")throw new TypeError("inserted content must be a string");this._split(t);const i=this.byStart[t];return i?i.appendRight(e):this.outro+=e,this}clone(){const t=new m(this.original,{filename:this.filename,offset:this.offset});let e=this.firstChunk,i=t.firstChunk=t.lastSearchedChunk=e.clone();for(;e;){t.byStart[i.start]=i,t.byEnd[i.end]=i;const n=e.next,r=n&&n.clone();r&&(i.next=r,r.previous=i,i=r),e=n}return t.lastChunk=i,this.indentExclusionRanges&&(t.indentExclusionRanges=this.indentExclusionRanges.slice()),t.sourcemapLocations=new p(this.sourcemapLocations),t.intro=this.intro,t.outro=this.outro,t}generateDecodedMap(t){t=t||{};const e=0,i=Object.keys(this.storedNames),n=new U(t.hires),r=S(this.original);return this.intro&&n.advance(this.intro),this.firstChunk.eachNext(s=>{const h=r(s.start);s.intro.length&&n.advance(s.intro),s.edited?n.addEdit(e,s.content,h,s.storeName?i.indexOf(s.original):-1):n.addUneditedChunk(e,s,this.original,h,this.sourcemapLocations),s.outro.length&&n.advance(s.outro)}),this.outro&&n.advance(this.outro),{file:t.file?t.file.split(/[/\\]/).pop():void 0,sources:[t.source?A(t.file||"",t.source):t.file||""],sourcesContent:t.includeContent?[this.original]:void 0,names:i,mappings:n.raw,x_google_ignoreList:this.ignoreList?[e]:void 0}}generateMap(t){return new x(this.generateDecodedMap(t))}_ensureindentStr(){this.indentStr===void 0&&(this.indentStr=I(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),this.indentStr===null?" ":this.indentStr}indent(t,e){const i=/^[^\r\n]/gm;if(j(t)&&(e=t,t=void 0),t===void 0&&(this._ensureindentStr(),t=this.indentStr||" "),t==="")return this;e=e||{};const n={};e.exclude&&(typeof e.exclude[0]=="number"?[e.exclude]:e.exclude).forEach(a=>{for(let w=a[0];w<a[1];w+=1)n[w]=!0});let r=e.indentStart!==!1;const s=l=>r?`${t}${l}`:(r=!0,l);this.intro=this.intro.replace(i,s);let h=0,o=this.firstChunk;for(;o;){const l=o.end;if(o.edited)n[h]||(o.content=o.content.replace(i,s),o.content.length&&(r=o.content[o.content.length-1]===`
9
- `));else for(h=o.start;h<l;){if(!n[h]){const a=this.original[h];a===`
10
- `?r=!0:a!=="\r"&&r&&(r=!1,h===o.start||(this._splitChunk(o,h),o=o.next),o.prependRight(t))}h+=1}h=o.end,o=o.next}return this.outro=this.outro.replace(i,s),this}insert(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(t,e){return f.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),f.insertLeft=!0),this.appendLeft(t,e)}insertRight(t,e){return f.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),f.insertRight=!0),this.prependRight(t,e)}move(t,e,i){if(t=t+this.offset,e=e+this.offset,i=i+this.offset,i>=t&&i<=e)throw new Error("Cannot move a selection inside itself");this._split(t),this._split(e),this._split(i);const n=this.byStart[t],r=this.byEnd[e],s=n.previous,h=r.next,o=this.byStart[i];if(!o&&r===this.lastChunk)return this;const l=o?o.previous:this.lastChunk;return s&&(s.next=h),h&&(h.previous=s),l&&(l.next=n),o&&(o.previous=r),n.previous||(this.firstChunk=r.next),r.next||(this.lastChunk=n.previous,this.lastChunk.next=null),n.previous=l,r.next=o||null,l||(this.firstChunk=n),o||(this.lastChunk=r),this}overwrite(t,e,i,n){return n=n||{},this.update(t,e,i,{...n,overwrite:!n.contentOnly})}update(t,e,i,n){if(t=t+this.offset,e=e+this.offset,typeof i!="string")throw new TypeError("replacement content must be a string");if(this.original.length!==0){for(;t<0;)t+=this.original.length;for(;e<0;)e+=this.original.length}if(e>this.original.length)throw new Error("end is out of bounds");if(t===e)throw new Error("Cannot overwrite a zero-length range – use appendLeft or prependRight instead");this._split(t),this._split(e),n===!0&&(f.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),f.storeName=!0),n={storeName:!0});const r=n!==void 0?n.storeName:!1,s=n!==void 0?n.overwrite:!1;if(r){const l=this.original.slice(t,e);Object.defineProperty(this.storedNames,l,{writable:!0,value:!0,enumerable:!0})}const h=this.byStart[t],o=this.byEnd[e];if(h){let l=h;for(;l!==o;){if(l.next!==this.byStart[l.end])throw new Error("Cannot overwrite across a split point");l=l.next,l.edit("",!1)}h.edit(i,r,!s)}else{const l=new g(t,e,"").edit(i,r);o.next=l,l.previous=o}return this}prepend(t){if(typeof t!="string")throw new TypeError("outro content must be a string");return this.intro=t+this.intro,this}prependLeft(t,e){if(t=t+this.offset,typeof e!="string")throw new TypeError("inserted content must be a string");this._split(t);const i=this.byEnd[t];return i?i.prependLeft(e):this.intro=e+this.intro,this}prependRight(t,e){if(t=t+this.offset,typeof e!="string")throw new TypeError("inserted content must be a string");this._split(t);const i=this.byStart[t];return i?i.prependRight(e):this.outro=e+this.outro,this}remove(t,e){if(t=t+this.offset,e=e+this.offset,this.original.length!==0){for(;t<0;)t+=this.original.length;for(;e<0;)e+=this.original.length}if(t===e)return this;if(t<0||e>this.original.length)throw new Error("Character is out of bounds");if(t>e)throw new Error("end must be greater than start");this._split(t),this._split(e);let i=this.byStart[t];for(;i;)i.intro="",i.outro="",i.edit(""),i=e>i.end?this.byStart[i.end]:null;return this}reset(t,e){if(t=t+this.offset,e=e+this.offset,this.original.length!==0){for(;t<0;)t+=this.original.length;for(;e<0;)e+=this.original.length}if(t===e)return this;if(t<0||e>this.original.length)throw new Error("Character is out of bounds");if(t>e)throw new Error("end must be greater than start");this._split(t),this._split(e);let i=this.byStart[t];for(;i;)i.reset(),i=e>i.end?this.byStart[i.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let t=this.lastChunk;do{if(t.outro.length)return t.outro[t.outro.length-1];if(t.content.length)return t.content[t.content.length-1];if(t.intro.length)return t.intro[t.intro.length-1]}while(t=t.previous);return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let t=this.outro.lastIndexOf(d);if(t!==-1)return this.outro.substr(t+1);let e=this.outro,i=this.lastChunk;do{if(i.outro.length>0){if(t=i.outro.lastIndexOf(d),t!==-1)return i.outro.substr(t+1)+e;e=i.outro+e}if(i.content.length>0){if(t=i.content.lastIndexOf(d),t!==-1)return i.content.substr(t+1)+e;e=i.content+e}if(i.intro.length>0){if(t=i.intro.lastIndexOf(d),t!==-1)return i.intro.substr(t+1)+e;e=i.intro+e}}while(i=i.previous);return t=this.intro.lastIndexOf(d),t!==-1?this.intro.substr(t+1)+e:this.intro+e}slice(t=0,e=this.original.length-this.offset){if(t=t+this.offset,e=e+this.offset,this.original.length!==0){for(;t<0;)t+=this.original.length;for(;e<0;)e+=this.original.length}let i="",n=this.firstChunk;for(;n&&(n.start>t||n.end<=t);){if(n.start<e&&n.end>=e)return i;n=n.next}if(n&&n.edited&&n.start!==t)throw new Error(`Cannot use replaced character ${t} as slice start anchor.`);const r=n;for(;n;){n.intro&&(r!==n||n.start===t)&&(i+=n.intro);const s=n.start<e&&n.end>=e;if(s&&n.edited&&n.end!==e)throw new Error(`Cannot use replaced character ${e} as slice end anchor.`);const h=r===n?t-n.start:0,o=s?n.content.length+e-n.end:n.content.length;if(i+=n.content.slice(h,o),n.outro&&(!s||n.end===e)&&(i+=n.outro),s)break;n=n.next}return i}snip(t,e){const i=this.clone();return i.remove(0,t),i.remove(e,i.original.length),i}_split(t){if(this.byStart[t]||this.byEnd[t])return;let e=this.lastSearchedChunk,i=e;const n=t>e.end;for(;e;){if(e.contains(t))return this._splitChunk(e,t);if(e=n?this.byStart[e.end]:this.byEnd[e.start],e===i)return;i=e}}_splitChunk(t,e){if(t.edited&&t.content.length){const n=S(this.original)(e);throw new Error(`Cannot split a chunk that has already been edited (${n.line}:${n.column} – "${t.original}")`)}const i=t.split(e);return this.byEnd[e]=t,this.byStart[e]=i,this.byEnd[i.end]=i,t===this.lastChunk&&(this.lastChunk=i),this.lastSearchedChunk=t,!0}toString(){let t=this.intro,e=this.firstChunk;for(;e;)t+=e.toString(),e=e.next;return t+this.outro}isEmpty(){let t=this.firstChunk;do if(t.intro.length&&t.intro.trim()||t.content.length&&t.content.trim()||t.outro.length&&t.outro.trim())return!1;while(t=t.next);return!0}length(){let t=this.firstChunk,e=0;do e+=t.intro.length+t.content.length+t.outro.length;while(t=t.next);return e}trimLines(){return this.trim("[\\r\\n]")}trim(t){return this.trimStart(t).trimEnd(t)}trimEndAborted(t){const e=new RegExp((t||"\\s")+"+$");if(this.outro=this.outro.replace(e,""),this.outro.length)return!0;let i=this.lastChunk;do{const n=i.end,r=i.trimEnd(e);if(i.end!==n&&(this.lastChunk===i&&(this.lastChunk=i.next),this.byEnd[i.end]=i,this.byStart[i.next.start]=i.next,this.byEnd[i.next.end]=i.next),r)return!0;i=i.previous}while(i);return!1}trimEnd(t){return this.trimEndAborted(t),this}trimStartAborted(t){const e=new RegExp("^"+(t||"\\s")+"+");if(this.intro=this.intro.replace(e,""),this.intro.length)return!0;let i=this.firstChunk;do{const n=i.end,r=i.trimStart(e);if(i.end!==n&&(i===this.lastChunk&&(this.lastChunk=i.next),this.byEnd[i.end]=i,this.byStart[i.next.start]=i.next,this.byEnd[i.next.end]=i.next),r)return!0;i=i.next}while(i);return!1}trimStart(t){return this.trimStartAborted(t),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(t,e){function i(r,s){return typeof e=="string"?e.replace(/\$(\$|&|\d+)/g,(h,o)=>o==="$"?"$":o==="&"?r[0]:+o<r.length?r[+o]:`$${o}`):e(...r,r.index,s,r.groups)}function n(r,s){let h;const o=[];for(;h=r.exec(s);)o.push(h);return o}if(t.global)n(t,this.original).forEach(s=>{if(s.index!=null){const h=i(s,this.original);h!==s[0]&&this.overwrite(s.index,s.index+s[0].length,h)}});else{const r=this.original.match(t);if(r&&r.index!=null){const s=i(r,this.original);s!==r[0]&&this.overwrite(r.index,r.index+r[0].length,s)}}return this}_replaceString(t,e){const{original:i}=this,n=i.indexOf(t);return n!==-1&&(typeof e=="function"&&(e=e(t,n,i)),t!==e&&this.overwrite(n,n+t.length,e)),this}replace(t,e){return typeof t=="string"?this._replaceString(t,e):this._replaceRegexp(t,e)}_replaceAllString(t,e){const{original:i}=this,n=t.length;for(let r=i.indexOf(t);r!==-1;r=i.indexOf(t,r+n)){const s=i.slice(r,r+n);let h=e;typeof e=="function"&&(h=e(s,r,i)),s!==h&&this.overwrite(r,r+n,h)}return this}replaceAll(t,e){if(typeof t=="string")return this._replaceAllString(t,e);if(!t.global)throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(t,e)}}exports.SourceMap=x;exports.default=m;
6
+ `)n.line+=1,n.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,h=!0,o=!1;else{if(this.hires||h||r.has(s)){const u=[this.generatedCodeColumn,t,n.line,n.column];this.hires==="boundary"?U.test(i[s])?o||(this.rawSegments.push(u),o=!0):(this.rawSegments.push(u),o=!1):this.rawSegments.push(u)}n.column+=1,this.generatedCodeColumn+=1,h=!1}s+=1}this.pending=null}advance(t){if(!t)return;const e=t.split(`
7
+ `);if(e.length>1){for(let i=0;i<e.length-1;i++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0}this.generatedCodeColumn+=e[e.length-1].length}}const g=`
8
+ `,f={insertLeft:!1,insertRight:!1,storeName:!1};class b{constructor(t,e={}){const i=new p(0,t.length,t);Object.defineProperties(this,{original:{writable:!0,value:t},outro:{writable:!0,value:""},intro:{writable:!0,value:""},firstChunk:{writable:!0,value:i},lastChunk:{writable:!0,value:i},lastSearchedChunk:{writable:!0,value:i},byStart:{writable:!0,value:{}},byEnd:{writable:!0,value:{}},filename:{writable:!0,value:e.filename},indentExclusionRanges:{writable:!0,value:e.indentExclusionRanges},sourcemapLocations:{writable:!0,value:new w},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:void 0},ignoreList:{writable:!0,value:e.ignoreList},offset:{writable:!0,value:e.offset||0}}),this.byStart[0]=i,this.byEnd[t.length]=i}addSourcemapLocation(t){this.sourcemapLocations.add(t)}append(t){if(typeof t!="string")throw new TypeError("outro content must be a string");return this.outro+=t,this}appendLeft(t,e){if(t=t+this.offset,typeof e!="string")throw new TypeError("inserted content must be a string");this._split(t);const i=this.byEnd[t];return i?i.appendLeft(e):this.intro+=e,this}appendRight(t,e){if(t=t+this.offset,typeof e!="string")throw new TypeError("inserted content must be a string");this._split(t);const i=this.byStart[t];return i?i.appendRight(e):this.outro+=e,this}clone(){const t=new b(this.original,{filename:this.filename,offset:this.offset});let e=this.firstChunk,i=t.firstChunk=t.lastSearchedChunk=e.clone();for(;e;){t.byStart[i.start]=i,t.byEnd[i.end]=i;const n=e.next,r=n&&n.clone();r&&(i.next=r,r.previous=i,i=r),e=n}return t.lastChunk=i,this.indentExclusionRanges&&(t.indentExclusionRanges=this.indentExclusionRanges.slice()),t.sourcemapLocations=new w(this.sourcemapLocations),t.intro=this.intro,t.outro=this.outro,t}generateDecodedMap(t){t=t||{};const e=0,i=Object.keys(this.storedNames),n=new M(t.hires),r=v(this.original);return this.intro&&n.advance(this.intro),this.firstChunk.eachNext(s=>{const h=r(s.start);s.intro.length&&n.advance(s.intro),s.edited?n.addEdit(e,s.content,h,s.storeName?i.indexOf(s.original):-1):n.addUneditedChunk(e,s,this.original,h,this.sourcemapLocations),s.outro.length&&n.advance(s.outro)}),this.outro&&n.advance(this.outro),{file:t.file?t.file.split(/[/\\]/).pop():void 0,sources:[t.source?T(t.file||"",t.source):t.file||""],sourcesContent:t.includeContent?[this.original]:void 0,names:i,mappings:n.raw,x_google_ignoreList:this.ignoreList?[e]:void 0}}generateMap(t){return new E(this.generateDecodedMap(t))}_ensureindentStr(){this.indentStr===void 0&&(this.indentStr=A(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),this.indentStr===null?" ":this.indentStr}indent(t,e){const i=/^[^\r\n]/gm;if($(t)&&(e=t,t=void 0),t===void 0&&(this._ensureindentStr(),t=this.indentStr||" "),t==="")return this;e=e||{};const n={};e.exclude&&(typeof e.exclude[0]=="number"?[e.exclude]:e.exclude).forEach(a=>{for(let m=a[0];m<a[1];m+=1)n[m]=!0});let r=e.indentStart!==!1;const s=u=>r?`${t}${u}`:(r=!0,u);this.intro=this.intro.replace(i,s);let h=0,o=this.firstChunk;for(;o;){const u=o.end;if(o.edited)n[h]||(o.content=o.content.replace(i,s),o.content.length&&(r=o.content[o.content.length-1]===`
9
+ `));else for(h=o.start;h<u;){if(!n[h]){const a=this.original[h];a===`
10
+ `?r=!0:a!=="\r"&&r&&(r=!1,h===o.start||(this._splitChunk(o,h),o=o.next),o.prependRight(t))}h+=1}h=o.end,o=o.next}return this.outro=this.outro.replace(i,s),this}insert(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(t,e){return f.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),f.insertLeft=!0),this.appendLeft(t,e)}insertRight(t,e){return f.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),f.insertRight=!0),this.prependRight(t,e)}move(t,e,i){if(t=t+this.offset,e=e+this.offset,i=i+this.offset,i>=t&&i<=e)throw new Error("Cannot move a selection inside itself");this._split(t),this._split(e),this._split(i);const n=this.byStart[t],r=this.byEnd[e],s=n.previous,h=r.next,o=this.byStart[i];if(!o&&r===this.lastChunk)return this;const u=o?o.previous:this.lastChunk;return s&&(s.next=h),h&&(h.previous=s),u&&(u.next=n),o&&(o.previous=r),n.previous||(this.firstChunk=r.next),r.next||(this.lastChunk=n.previous,this.lastChunk.next=null),n.previous=u,r.next=o||null,u||(this.firstChunk=n),o||(this.lastChunk=r),this}overwrite(t,e,i,n){return n=n||{},this.update(t,e,i,{...n,overwrite:!n.contentOnly})}update(t,e,i,n){if(t=t+this.offset,e=e+this.offset,typeof i!="string")throw new TypeError("replacement content must be a string");if(this.original.length!==0){for(;t<0;)t+=this.original.length;for(;e<0;)e+=this.original.length}if(e>this.original.length)throw new Error("end is out of bounds");if(t===e)throw new Error("Cannot overwrite a zero-length range – use appendLeft or prependRight instead");this._split(t),this._split(e),n===!0&&(f.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),f.storeName=!0),n={storeName:!0});const r=n!==void 0?n.storeName:!1,s=n!==void 0?n.overwrite:!1;if(r){const u=this.original.slice(t,e);Object.defineProperty(this.storedNames,u,{writable:!0,value:!0,enumerable:!0})}const h=this.byStart[t],o=this.byEnd[e];if(h){let u=h;for(;u!==o;){if(u.next!==this.byStart[u.end])throw new Error("Cannot overwrite across a split point");u=u.next,u.edit("",!1)}h.edit(i,r,!s)}else{const u=new p(t,e,"").edit(i,r);o.next=u,u.previous=o}return this}prepend(t){if(typeof t!="string")throw new TypeError("outro content must be a string");return this.intro=t+this.intro,this}prependLeft(t,e){if(t=t+this.offset,typeof e!="string")throw new TypeError("inserted content must be a string");this._split(t);const i=this.byEnd[t];return i?i.prependLeft(e):this.intro=e+this.intro,this}prependRight(t,e){if(t=t+this.offset,typeof e!="string")throw new TypeError("inserted content must be a string");this._split(t);const i=this.byStart[t];return i?i.prependRight(e):this.outro=e+this.outro,this}remove(t,e){if(t=t+this.offset,e=e+this.offset,this.original.length!==0){for(;t<0;)t+=this.original.length;for(;e<0;)e+=this.original.length}if(t===e)return this;if(t<0||e>this.original.length)throw new Error("Character is out of bounds");if(t>e)throw new Error("end must be greater than start");this._split(t),this._split(e);let i=this.byStart[t];for(;i;)i.intro="",i.outro="",i.edit(""),i=e>i.end?this.byStart[i.end]:null;return this}reset(t,e){if(t=t+this.offset,e=e+this.offset,this.original.length!==0){for(;t<0;)t+=this.original.length;for(;e<0;)e+=this.original.length}if(t===e)return this;if(t<0||e>this.original.length)throw new Error("Character is out of bounds");if(t>e)throw new Error("end must be greater than start");this._split(t),this._split(e);let i=this.byStart[t];for(;i;)i.reset(),i=e>i.end?this.byStart[i.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let t=this.lastChunk;do{if(t.outro.length)return t.outro[t.outro.length-1];if(t.content.length)return t.content[t.content.length-1];if(t.intro.length)return t.intro[t.intro.length-1]}while(t=t.previous);return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let t=this.outro.lastIndexOf(g);if(t!==-1)return this.outro.substr(t+1);let e=this.outro,i=this.lastChunk;do{if(i.outro.length>0){if(t=i.outro.lastIndexOf(g),t!==-1)return i.outro.substr(t+1)+e;e=i.outro+e}if(i.content.length>0){if(t=i.content.lastIndexOf(g),t!==-1)return i.content.substr(t+1)+e;e=i.content+e}if(i.intro.length>0){if(t=i.intro.lastIndexOf(g),t!==-1)return i.intro.substr(t+1)+e;e=i.intro+e}}while(i=i.previous);return t=this.intro.lastIndexOf(g),t!==-1?this.intro.substr(t+1)+e:this.intro+e}slice(t=0,e=this.original.length-this.offset){if(t=t+this.offset,e=e+this.offset,this.original.length!==0){for(;t<0;)t+=this.original.length;for(;e<0;)e+=this.original.length}let i="",n=this.firstChunk;for(;n&&(n.start>t||n.end<=t);){if(n.start<e&&n.end>=e)return i;n=n.next}if(n&&n.edited&&n.start!==t)throw new Error(`Cannot use replaced character ${t} as slice start anchor.`);const r=n;for(;n;){n.intro&&(r!==n||n.start===t)&&(i+=n.intro);const s=n.start<e&&n.end>=e;if(s&&n.edited&&n.end!==e)throw new Error(`Cannot use replaced character ${e} as slice end anchor.`);const h=r===n?t-n.start:0,o=s?n.content.length+e-n.end:n.content.length;if(i+=n.content.slice(h,o),n.outro&&(!s||n.end===e)&&(i+=n.outro),s)break;n=n.next}return i}snip(t,e){const i=this.clone();return i.remove(0,t),i.remove(e,i.original.length),i}_split(t){if(this.byStart[t]||this.byEnd[t])return;let e=this.lastSearchedChunk,i=e;const n=t>e.end;for(;e;){if(e.contains(t))return this._splitChunk(e,t);if(e=n?this.byStart[e.end]:this.byEnd[e.start],e===i)return;i=e}}_splitChunk(t,e){if(t.edited&&t.content.length){const n=v(this.original)(e);throw new Error(`Cannot split a chunk that has already been edited (${n.line}:${n.column} – "${t.original}")`)}const i=t.split(e);return this.byEnd[e]=t,this.byStart[e]=i,this.byEnd[i.end]=i,t===this.lastChunk&&(this.lastChunk=i),this.lastSearchedChunk=t,!0}toString(){let t=this.intro,e=this.firstChunk;for(;e;)t+=e.toString(),e=e.next;return t+this.outro}isEmpty(){let t=this.firstChunk;do if(t.intro.length&&t.intro.trim()||t.content.length&&t.content.trim()||t.outro.length&&t.outro.trim())return!1;while(t=t.next);return!0}length(){let t=this.firstChunk,e=0;do e+=t.intro.length+t.content.length+t.outro.length;while(t=t.next);return e}trimLines(){return this.trim("[\\r\\n]")}trim(t){return this.trimStart(t).trimEnd(t)}trimEndAborted(t){const e=new RegExp((t||"\\s")+"+$");if(this.outro=this.outro.replace(e,""),this.outro.length)return!0;let i=this.lastChunk;do{const n=i.end,r=i.trimEnd(e);if(i.end!==n&&(this.lastChunk===i&&(this.lastChunk=i.next),this.byEnd[i.end]=i,this.byStart[i.next.start]=i.next,this.byEnd[i.next.end]=i.next),r)return!0;i=i.previous}while(i);return!1}trimEnd(t){return this.trimEndAborted(t),this}trimStartAborted(t){const e=new RegExp("^"+(t||"\\s")+"+");if(this.intro=this.intro.replace(e,""),this.intro.length)return!0;let i=this.firstChunk;do{const n=i.end,r=i.trimStart(e);if(i.end!==n&&(i===this.lastChunk&&(this.lastChunk=i.next),this.byEnd[i.end]=i,this.byStart[i.next.start]=i.next,this.byEnd[i.next.end]=i.next),r)return!0;i=i.next}while(i);return!1}trimStart(t){return this.trimStartAborted(t),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(t,e){function i(r,s){return typeof e=="string"?e.replace(/\$(\$|&|\d+)/g,(h,o)=>o==="$"?"$":o==="&"?r[0]:+o<r.length?r[+o]:`$${o}`):e(...r,r.index,s,r.groups)}function n(r,s){let h;const o=[];for(;h=r.exec(s);)o.push(h);return o}if(t.global)n(t,this.original).forEach(s=>{if(s.index!=null){const h=i(s,this.original);h!==s[0]&&this.overwrite(s.index,s.index+s[0].length,h)}});else{const r=this.original.match(t);if(r&&r.index!=null){const s=i(r,this.original);s!==r[0]&&this.overwrite(r.index,r.index+r[0].length,s)}}return this}_replaceString(t,e){const{original:i}=this,n=i.indexOf(t);return n!==-1&&(typeof e=="function"&&(e=e(t,n,i)),t!==e&&this.overwrite(n,n+t.length,e)),this}replace(t,e){return typeof t=="string"?this._replaceString(t,e):this._replaceRegexp(t,e)}_replaceAllString(t,e){const{original:i}=this,n=t.length;for(let r=i.indexOf(t);r!==-1;r=i.indexOf(t,r+n)){const s=i.slice(r,r+n);let h=e;typeof e=="function"&&(h=e(s,r,i)),s!==h&&this.overwrite(r,r+n,h)}return this}replaceAll(t,e){if(typeof t=="string")return this._replaceAllString(t,e);if(!t.global)throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(t,e)}}exports.SourceMap=E;exports.default=b;
@@ -1,58 +1,58 @@
1
- var x = 44, E = 59, m = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", S = new Uint8Array(64), k = new Uint8Array(128);
2
- for (let u = 0; u < m.length; u++) {
3
- const t = m.charCodeAt(u);
4
- S[u] = t, k[t] = u;
1
+ var E = 44, k = 59, b = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", v = new Uint8Array(64), L = new Uint8Array(128);
2
+ for (let l = 0; l < b.length; l++) {
3
+ const t = b.charCodeAt(l);
4
+ v[l] = t, L[t] = l;
5
5
  }
6
- function c(u, t, e) {
7
- let i = t - e;
8
- i = i < 0 ? -i << 1 | 1 : i << 1;
6
+ function c(l, t) {
9
7
  do {
10
- let n = i & 31;
11
- i >>>= 5, i > 0 && (n |= 32), u.write(S[n]);
12
- } while (i > 0);
13
- return t;
8
+ let e = t & 31;
9
+ t >>>= 5, t > 0 && (e |= 32), l.write(v[e]);
10
+ } while (t > 0);
14
11
  }
15
- var b = 1024 * 16, C = typeof TextDecoder < "u" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer < "u" ? {
16
- decode(u) {
17
- return Buffer.from(u.buffer, u.byteOffset, u.byteLength).toString();
12
+ function d(l) {
13
+ return l < 0 ? -l << 1 | 1 : l << 1;
14
+ }
15
+ var C = 1024 * 16, y = typeof TextDecoder < "u" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer < "u" ? {
16
+ decode(l) {
17
+ return Buffer.from(l.buffer, l.byteOffset, l.byteLength).toString();
18
18
  }
19
19
  } : {
20
- decode(u) {
20
+ decode(l) {
21
21
  let t = "";
22
- for (let e = 0; e < u.length; e++)
23
- t += String.fromCharCode(u[e]);
22
+ for (let e = 0; e < l.length; e++)
23
+ t += String.fromCharCode(l[e]);
24
24
  return t;
25
25
  }
26
- }, L = class {
26
+ }, R = class {
27
27
  constructor() {
28
- this.pos = 0, this.out = "", this.buffer = new Uint8Array(b);
28
+ this.pos = 0, this.out = "", this.buffer = new Uint8Array(C);
29
29
  }
30
- write(u) {
30
+ write(l) {
31
31
  const { buffer: t } = this;
32
- t[this.pos++] = u, this.pos === b && (this.out += C.decode(t), this.pos = 0);
32
+ t[this.pos++] = l, this.pos === C && (this.out += y.decode(t), this.pos = 0);
33
33
  }
34
34
  flush() {
35
- const { buffer: u, out: t, pos: e } = this;
36
- return e > 0 ? t + C.decode(u.subarray(0, e)) : t;
35
+ const { buffer: l, out: t, pos: e } = this;
36
+ return e > 0 ? t + y.decode(l.subarray(0, e)) : t;
37
37
  }
38
38
  };
39
- function R(u) {
40
- const t = new L();
39
+ function _(l) {
40
+ const t = new R();
41
41
  let e = 0, i = 0, n = 0, r = 0;
42
- for (let s = 0; s < u.length; s++) {
43
- const h = u[s];
44
- if (s > 0 && t.write(E), h.length === 0) continue;
42
+ for (let s = 0; s < l.length; s++) {
43
+ const h = l[s];
44
+ if (s > 0 && t.write(k), h.length === 0) continue;
45
45
  let o = 0;
46
- for (let l = 0; l < h.length; l++) {
47
- const a = h[l];
48
- l > 0 && t.write(x), o = c(t, a[0], o), a.length !== 1 && (e = c(t, a[1], e), i = c(t, a[2], i), n = c(t, a[3], n), a.length !== 4 && (r = c(t, a[4], r)));
46
+ for (let u = 0; u < h.length; u++) {
47
+ const a = h[u];
48
+ u > 0 && t.write(E), c(t, d(a[0] - o)), o = a[0], a.length !== 1 && (c(t, d(a[1] - e)), c(t, d(a[2] - i)), c(t, d(a[3] - n)), e = a[1], i = a[2], n = a[3], a.length !== 4 && (c(t, d(a[4] - r)), r = a[4]));
49
49
  }
50
50
  }
51
51
  return t.flush();
52
52
  }
53
- class p {
53
+ class w {
54
54
  constructor(t) {
55
- this.bits = t instanceof p ? t.bits.slice() : [];
55
+ this.bits = t instanceof w ? t.bits.slice() : [];
56
56
  }
57
57
  add(t) {
58
58
  this.bits[t >> 5] |= 1 << (t & 31);
@@ -61,7 +61,7 @@ class p {
61
61
  return !!(this.bits[t >> 5] & 1 << (t & 31));
62
62
  }
63
63
  }
64
- class g {
64
+ class p {
65
65
  constructor(t, e, i) {
66
66
  this.start = t, this.end = e, this.original = i, this.intro = "", this.outro = "", this.content = i, this.storeName = !1, this.edited = !1, this.previous = null, this.next = null;
67
67
  }
@@ -72,7 +72,7 @@ class g {
72
72
  this.intro = this.intro + t;
73
73
  }
74
74
  clone() {
75
- const t = new g(this.start, this.end, this.original);
75
+ const t = new p(this.start, this.end, this.original);
76
76
  return t.intro = this.intro, t.outro = this.outro, t.content = this.content, t.storeName = this.storeName, t.edited = this.edited, t;
77
77
  }
78
78
  contains(t) {
@@ -103,7 +103,7 @@ class g {
103
103
  split(t) {
104
104
  const e = t - this.start, i = this.original.slice(0, e), n = this.original.slice(e);
105
105
  this.original = i;
106
- const r = new g(t, this.end, n);
106
+ const r = new p(t, this.end, n);
107
107
  return r.outro = this.outro, this.outro = "", this.end = t, this.edited ? (r.edit("", !1), this.content = "") : this.content = i, r.next = this.next, r.next && (r.next.previous = r), r.previous = this, this.next = r, r;
108
108
  }
109
109
  toString() {
@@ -128,25 +128,25 @@ class g {
128
128
  } else if (this.edit("", void 0, !0), this.outro = this.outro.replace(t, ""), this.outro.length) return !0;
129
129
  }
130
130
  }
131
- function _() {
132
- return typeof globalThis < "u" && typeof globalThis.btoa == "function" ? (u) => globalThis.btoa(unescape(encodeURIComponent(u))) : typeof Buffer == "function" ? (u) => Buffer.from(u, "utf-8").toString("base64") : () => {
131
+ function O() {
132
+ return typeof globalThis < "u" && typeof globalThis.btoa == "function" ? (l) => globalThis.btoa(unescape(encodeURIComponent(l))) : typeof Buffer == "function" ? (l) => Buffer.from(l, "utf-8").toString("base64") : () => {
133
133
  throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.");
134
134
  };
135
135
  }
136
- const O = /* @__PURE__ */ _();
137
- class N {
136
+ const N = /* @__PURE__ */ O();
137
+ class I {
138
138
  constructor(t) {
139
- this.version = 3, this.file = t.file, this.sources = t.sources, this.sourcesContent = t.sourcesContent, this.names = t.names, this.mappings = R(t.mappings), typeof t.x_google_ignoreList < "u" && (this.x_google_ignoreList = t.x_google_ignoreList), typeof t.debugId < "u" && (this.debugId = t.debugId);
139
+ this.version = 3, this.file = t.file, this.sources = t.sources, this.sourcesContent = t.sourcesContent, this.names = t.names, this.mappings = _(t.mappings), typeof t.x_google_ignoreList < "u" && (this.x_google_ignoreList = t.x_google_ignoreList), typeof t.debugId < "u" && (this.debugId = t.debugId);
140
140
  }
141
141
  toString() {
142
142
  return JSON.stringify(this);
143
143
  }
144
144
  toUrl() {
145
- return "data:application/json;charset=utf-8;base64," + O(this.toString());
145
+ return "data:application/json;charset=utf-8;base64," + N(this.toString());
146
146
  }
147
147
  }
148
- function I(u) {
149
- const t = u.split(`
148
+ function A(l) {
149
+ const t = l.split(`
150
150
  `), e = t.filter((r) => /^\t+/.test(r)), i = t.filter((r) => /^ {2,}/.test(r));
151
151
  if (e.length === 0 && i.length === 0)
152
152
  return null;
@@ -158,8 +158,8 @@ function I(u) {
158
158
  }, 1 / 0);
159
159
  return new Array(n + 1).join(" ");
160
160
  }
161
- function A(u, t) {
162
- const e = u.split(/[/\\]/), i = t.split(/[/\\]/);
161
+ function T(l, t) {
162
+ const e = l.split(/[/\\]/), i = t.split(/[/\\]/);
163
163
  for (e.pop(); e[0] === i[0]; )
164
164
  e.shift(), i.shift();
165
165
  if (e.length) {
@@ -168,27 +168,27 @@ function A(u, t) {
168
168
  }
169
169
  return e.concat(i).join("/");
170
170
  }
171
- const T = Object.prototype.toString;
172
- function j(u) {
173
- return T.call(u) === "[object Object]";
171
+ const j = Object.prototype.toString;
172
+ function $(l) {
173
+ return j.call(l) === "[object Object]";
174
174
  }
175
- function y(u) {
176
- const t = u.split(`
175
+ function S(l) {
176
+ const t = l.split(`
177
177
  `), e = [];
178
178
  for (let i = 0, n = 0; i < t.length; i++)
179
179
  e.push(n), n += t[i].length + 1;
180
180
  return function(n) {
181
181
  let r = 0, s = e.length;
182
182
  for (; r < s; ) {
183
- const l = r + s >> 1;
184
- n < e[l] ? s = l : r = l + 1;
183
+ const u = r + s >> 1;
184
+ n < e[u] ? s = u : r = u + 1;
185
185
  }
186
186
  const h = r - 1, o = n - e[h];
187
187
  return { line: h, column: o };
188
188
  };
189
189
  }
190
- const $ = /\w/;
191
- class U {
190
+ const U = /\w/;
191
+ class B {
192
192
  constructor(t) {
193
193
  this.hires = t, this.generatedCodeLine = 0, this.generatedCodeColumn = 0, this.raw = [], this.rawSegments = this.raw[this.generatedCodeLine] = [], this.pending = null;
194
194
  }
@@ -198,8 +198,8 @@ class U {
198
198
  let s = e.indexOf(`
199
199
  `, 0), h = -1;
200
200
  for (; s >= 0 && r > s; ) {
201
- const l = [this.generatedCodeColumn, t, i.line, i.column];
202
- n >= 0 && l.push(n), this.rawSegments.push(l), this.generatedCodeLine += 1, this.raw[this.generatedCodeLine] = this.rawSegments = [], this.generatedCodeColumn = 0, h = s, s = e.indexOf(`
201
+ const u = [this.generatedCodeColumn, t, i.line, i.column];
202
+ n >= 0 && u.push(n), this.rawSegments.push(u), this.generatedCodeLine += 1, this.raw[this.generatedCodeLine] = this.rawSegments = [], this.generatedCodeColumn = 0, h = s, s = e.indexOf(`
203
203
  `, s + 1);
204
204
  }
205
205
  const o = [this.generatedCodeColumn, t, i.line, i.column];
@@ -215,8 +215,8 @@ class U {
215
215
  n.line += 1, n.column = 0, this.generatedCodeLine += 1, this.raw[this.generatedCodeLine] = this.rawSegments = [], this.generatedCodeColumn = 0, h = !0, o = !1;
216
216
  else {
217
217
  if (this.hires || h || r.has(s)) {
218
- const l = [this.generatedCodeColumn, t, n.line, n.column];
219
- this.hires === "boundary" ? $.test(i[s]) ? o || (this.rawSegments.push(l), o = !0) : (this.rawSegments.push(l), o = !1) : this.rawSegments.push(l);
218
+ const u = [this.generatedCodeColumn, t, n.line, n.column];
219
+ this.hires === "boundary" ? U.test(i[s]) ? o || (this.rawSegments.push(u), o = !0) : (this.rawSegments.push(u), o = !1) : this.rawSegments.push(u);
220
220
  }
221
221
  n.column += 1, this.generatedCodeColumn += 1, h = !1;
222
222
  }
@@ -236,15 +236,15 @@ class U {
236
236
  this.generatedCodeColumn += e[e.length - 1].length;
237
237
  }
238
238
  }
239
- const d = `
239
+ const g = `
240
240
  `, f = {
241
241
  insertLeft: !1,
242
242
  insertRight: !1,
243
243
  storeName: !1
244
244
  };
245
- class v {
245
+ class x {
246
246
  constructor(t, e = {}) {
247
- const i = new g(0, t.length, t);
247
+ const i = new p(0, t.length, t);
248
248
  Object.defineProperties(this, {
249
249
  original: { writable: !0, value: t },
250
250
  outro: { writable: !0, value: "" },
@@ -256,7 +256,7 @@ class v {
256
256
  byEnd: { writable: !0, value: {} },
257
257
  filename: { writable: !0, value: e.filename },
258
258
  indentExclusionRanges: { writable: !0, value: e.indentExclusionRanges },
259
- sourcemapLocations: { writable: !0, value: new p() },
259
+ sourcemapLocations: { writable: !0, value: new w() },
260
260
  storedNames: { writable: !0, value: {} },
261
261
  indentStr: { writable: !0, value: void 0 },
262
262
  ignoreList: { writable: !0, value: e.ignoreList },
@@ -283,18 +283,18 @@ class v {
283
283
  return i ? i.appendRight(e) : this.outro += e, this;
284
284
  }
285
285
  clone() {
286
- const t = new v(this.original, { filename: this.filename, offset: this.offset });
286
+ const t = new x(this.original, { filename: this.filename, offset: this.offset });
287
287
  let e = this.firstChunk, i = t.firstChunk = t.lastSearchedChunk = e.clone();
288
288
  for (; e; ) {
289
289
  t.byStart[i.start] = i, t.byEnd[i.end] = i;
290
290
  const n = e.next, r = n && n.clone();
291
291
  r && (i.next = r, r.previous = i, i = r), e = n;
292
292
  }
293
- return t.lastChunk = i, this.indentExclusionRanges && (t.indentExclusionRanges = this.indentExclusionRanges.slice()), t.sourcemapLocations = new p(this.sourcemapLocations), t.intro = this.intro, t.outro = this.outro, t;
293
+ return t.lastChunk = i, this.indentExclusionRanges && (t.indentExclusionRanges = this.indentExclusionRanges.slice()), t.sourcemapLocations = new w(this.sourcemapLocations), t.intro = this.intro, t.outro = this.outro, t;
294
294
  }
295
295
  generateDecodedMap(t) {
296
296
  t = t || {};
297
- const e = 0, i = Object.keys(this.storedNames), n = new U(t.hires), r = y(this.original);
297
+ const e = 0, i = Object.keys(this.storedNames), n = new B(t.hires), r = S(this.original);
298
298
  return this.intro && n.advance(this.intro), this.firstChunk.eachNext((s) => {
299
299
  const h = r(s.start);
300
300
  s.intro.length && n.advance(s.intro), s.edited ? n.addEdit(
@@ -306,7 +306,7 @@ class v {
306
306
  }), this.outro && n.advance(this.outro), {
307
307
  file: t.file ? t.file.split(/[/\\]/).pop() : void 0,
308
308
  sources: [
309
- t.source ? A(t.file || "", t.source) : t.file || ""
309
+ t.source ? T(t.file || "", t.source) : t.file || ""
310
310
  ],
311
311
  sourcesContent: t.includeContent ? [this.original] : void 0,
312
312
  names: i,
@@ -315,10 +315,10 @@ class v {
315
315
  };
316
316
  }
317
317
  generateMap(t) {
318
- return new N(this.generateDecodedMap(t));
318
+ return new I(this.generateDecodedMap(t));
319
319
  }
320
320
  _ensureindentStr() {
321
- this.indentStr === void 0 && (this.indentStr = I(this.original));
321
+ this.indentStr === void 0 && (this.indentStr = A(this.original));
322
322
  }
323
323
  _getRawIndentString() {
324
324
  return this._ensureindentStr(), this.indentStr;
@@ -328,24 +328,24 @@ class v {
328
328
  }
329
329
  indent(t, e) {
330
330
  const i = /^[^\r\n]/gm;
331
- if (j(t) && (e = t, t = void 0), t === void 0 && (this._ensureindentStr(), t = this.indentStr || " "), t === "") return this;
331
+ if ($(t) && (e = t, t = void 0), t === void 0 && (this._ensureindentStr(), t = this.indentStr || " "), t === "") return this;
332
332
  e = e || {};
333
333
  const n = {};
334
334
  e.exclude && (typeof e.exclude[0] == "number" ? [e.exclude] : e.exclude).forEach((a) => {
335
- for (let w = a[0]; w < a[1]; w += 1)
336
- n[w] = !0;
335
+ for (let m = a[0]; m < a[1]; m += 1)
336
+ n[m] = !0;
337
337
  });
338
338
  let r = e.indentStart !== !1;
339
- const s = (l) => r ? `${t}${l}` : (r = !0, l);
339
+ const s = (u) => r ? `${t}${u}` : (r = !0, u);
340
340
  this.intro = this.intro.replace(i, s);
341
341
  let h = 0, o = this.firstChunk;
342
342
  for (; o; ) {
343
- const l = o.end;
343
+ const u = o.end;
344
344
  if (o.edited)
345
345
  n[h] || (o.content = o.content.replace(i, s), o.content.length && (r = o.content[o.content.length - 1] === `
346
346
  `));
347
347
  else
348
- for (h = o.start; h < l; ) {
348
+ for (h = o.start; h < u; ) {
349
349
  if (!n[h]) {
350
350
  const a = this.original[h];
351
351
  a === `
@@ -377,8 +377,8 @@ class v {
377
377
  this._split(t), this._split(e), this._split(i);
378
378
  const n = this.byStart[t], r = this.byEnd[e], s = n.previous, h = r.next, o = this.byStart[i];
379
379
  if (!o && r === this.lastChunk) return this;
380
- const l = o ? o.previous : this.lastChunk;
381
- return s && (s.next = h), h && (h.previous = s), l && (l.next = n), o && (o.previous = r), n.previous || (this.firstChunk = r.next), r.next || (this.lastChunk = n.previous, this.lastChunk.next = null), n.previous = l, r.next = o || null, l || (this.firstChunk = n), o || (this.lastChunk = r), this;
380
+ const u = o ? o.previous : this.lastChunk;
381
+ return s && (s.next = h), h && (h.previous = s), u && (u.next = n), o && (o.previous = r), n.previous || (this.firstChunk = r.next), r.next || (this.lastChunk = n.previous, this.lastChunk.next = null), n.previous = u, r.next = o || null, u || (this.firstChunk = n), o || (this.lastChunk = r), this;
382
382
  }
383
383
  overwrite(t, e, i, n) {
384
384
  return n = n || {}, this.update(t, e, i, { ...n, overwrite: !n.contentOnly });
@@ -399,8 +399,8 @@ class v {
399
399
  ), f.storeName = !0), n = { storeName: !0 });
400
400
  const r = n !== void 0 ? n.storeName : !1, s = n !== void 0 ? n.overwrite : !1;
401
401
  if (r) {
402
- const l = this.original.slice(t, e);
403
- Object.defineProperty(this.storedNames, l, {
402
+ const u = this.original.slice(t, e);
403
+ Object.defineProperty(this.storedNames, u, {
404
404
  writable: !0,
405
405
  value: !0,
406
406
  enumerable: !0
@@ -408,16 +408,16 @@ class v {
408
408
  }
409
409
  const h = this.byStart[t], o = this.byEnd[e];
410
410
  if (h) {
411
- let l = h;
412
- for (; l !== o; ) {
413
- if (l.next !== this.byStart[l.end])
411
+ let u = h;
412
+ for (; u !== o; ) {
413
+ if (u.next !== this.byStart[u.end])
414
414
  throw new Error("Cannot overwrite across a split point");
415
- l = l.next, l.edit("", !1);
415
+ u = u.next, u.edit("", !1);
416
416
  }
417
417
  h.edit(i, r, !s);
418
418
  } else {
419
- const l = new g(t, e, "").edit(i, r);
420
- o.next = l, l.previous = o;
419
+ const u = new p(t, e, "").edit(i, r);
420
+ o.next = u, u.previous = o;
421
421
  }
422
422
  return this;
423
423
  }
@@ -476,24 +476,24 @@ class v {
476
476
  return this.intro.length ? this.intro[this.intro.length - 1] : "";
477
477
  }
478
478
  lastLine() {
479
- let t = this.outro.lastIndexOf(d);
479
+ let t = this.outro.lastIndexOf(g);
480
480
  if (t !== -1) return this.outro.substr(t + 1);
481
481
  let e = this.outro, i = this.lastChunk;
482
482
  do {
483
483
  if (i.outro.length > 0) {
484
- if (t = i.outro.lastIndexOf(d), t !== -1) return i.outro.substr(t + 1) + e;
484
+ if (t = i.outro.lastIndexOf(g), t !== -1) return i.outro.substr(t + 1) + e;
485
485
  e = i.outro + e;
486
486
  }
487
487
  if (i.content.length > 0) {
488
- if (t = i.content.lastIndexOf(d), t !== -1) return i.content.substr(t + 1) + e;
488
+ if (t = i.content.lastIndexOf(g), t !== -1) return i.content.substr(t + 1) + e;
489
489
  e = i.content + e;
490
490
  }
491
491
  if (i.intro.length > 0) {
492
- if (t = i.intro.lastIndexOf(d), t !== -1) return i.intro.substr(t + 1) + e;
492
+ if (t = i.intro.lastIndexOf(g), t !== -1) return i.intro.substr(t + 1) + e;
493
493
  e = i.intro + e;
494
494
  }
495
495
  } while (i = i.previous);
496
- return t = this.intro.lastIndexOf(d), t !== -1 ? this.intro.substr(t + 1) + e : this.intro + e;
496
+ return t = this.intro.lastIndexOf(g), t !== -1 ? this.intro.substr(t + 1) + e : this.intro + e;
497
497
  }
498
498
  slice(t = 0, e = this.original.length - this.offset) {
499
499
  if (t = t + this.offset, e = e + this.offset, this.original.length !== 0) {
@@ -538,7 +538,7 @@ class v {
538
538
  }
539
539
  _splitChunk(t, e) {
540
540
  if (t.edited && t.content.length) {
541
- const n = y(this.original)(e);
541
+ const n = S(this.original)(e);
542
542
  throw new Error(
543
543
  `Cannot split a chunk that has already been edited (${n.line}:${n.column} – "${t.original}")`
544
544
  );
@@ -658,6 +658,6 @@ class v {
658
658
  }
659
659
  }
660
660
  export {
661
- N as SourceMap,
662
- v as default
661
+ I as SourceMap,
662
+ x as default
663
663
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nice2dev/testing",
3
- "version": "1.3.15",
3
+ "version": "1.3.16",
4
4
  "description": "Shared testing utilities for Nice2Dev UI libraries",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -43,7 +43,7 @@
43
43
  "typescript": "^5.9.3",
44
44
  "vite": "^6.4.1",
45
45
  "vite-plugin-dts": "^4.5.4",
46
- "vitest": "^4.1.11"
46
+ "vitest": "^4.1.12"
47
47
  },
48
48
  "keywords": [
49
49
  "testing",