json-conflict-resolver
Version:
A rules-based JSON conflict resolver that parses Git conflict markers, reconstructs ours/theirs, and merges with deterministic strategies — beyond line-based merges.
14 lines • 312 kB
JavaScript
"use strict";var $h=Object.create;var Hn=Object.defineProperty;var kh=Object.getOwnPropertyDescriptor;var Mh=Object.getOwnPropertyNames;var Ph=Object.getPrototypeOf,Nh=Object.prototype.hasOwnProperty;var Rh=(e,t,n)=>t in e?Hn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ca=(e,t)=>()=>(e&&(t=e(e=0)),t);var Qt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),jh=(e,t)=>{for(var n in t)Hn(e,n,{get:t[n],enumerable:!0})},Fh=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Mh(t))!Nh.call(e,o)&&o!==n&&Hn(e,o,{get:()=>t[o],enumerable:!(r=kh(t,o))||r.enumerable});return e};var Zn=(e,t,n)=>(n=e!=null?$h(Ph(e)):{},Fh(t||!e||!e.__esModule?Hn(n,"default",{value:e,enumerable:!0}):n,e));var J=(e,t,n)=>Rh(e,typeof t!="symbol"?t+"":t,n);var Mu=Qt((R0,ku)=>{"use strict";var Ou,no,ro,oo,so,io,Ln,Ci,Bn,ao,Au,co,Dn,lo,uo,fo,Gt,$u,ho,po,Rg;lo=/\/(?![*\/])(?:\[(?:[^\]\\\n\r\u2028\u2029]+|\\.)*\]?|[^\/[\\\n\r\u2028\u2029]+|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/yu;Dn=/--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y;no=/(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]+|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/yu;fo=/(['"])(?:[^'"\\\n\r]+|(?!\1)['"]|\\(?:\r\n|[^]))*(\1)?/y;co=/(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y;Gt=/[`}](?:[^`\\$]+|\\[^]|\$(?!\{))*(`|\$\{)?/y;po=/[\t\v\f\ufeff\p{Zs}]+/yu;Bn=/\r?\n|[\r\u2028\u2029]/y;ao=/\/\*(?:[^*]+|\*(?!\/))*(\*\/)?/y;uo=/\/\/.*/y;Ou=/^#!.*/;oo=/[<>.:={}]|\/(?![\/*])/y;ro=/[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/yu;so=/(['"])(?:[^'"]+|(?!\1)['"])*(\1)?/y;io=/[^<>{}]+/y;ho=/^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/;$u=/^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/;Ln=/^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/;Ci=/^(?:return|throw|yield)$/;Au=RegExp(Bn.source);ku.exports=Rg=function*(e,{jsx:t=!1}={}){var n,r,o,s,i,a,c,l,u,f,d,h,m,p;for({length:a}=e,s=0,i="",p=[{tag:"JS"}],n=[],d=0,h=!1,(c=Ou.exec(e))&&(yield{type:"HashbangComment",value:c[0]},s=c[0].length);s<a;){switch(l=p[p.length-1],l.tag){case"JS":case"JSNonExpressionParen":case"InterpolationInTemplate":case"InterpolationInJSX":if(e[s]==="/"&&(ho.test(i)||Ln.test(i))&&(lo.lastIndex=s,c=lo.exec(e))){s=lo.lastIndex,i=c[0],h=!0,yield{type:"RegularExpressionLiteral",value:c[0],closed:c[1]!==void 0&&c[1]!=="\\"};continue}if(Dn.lastIndex=s,c=Dn.exec(e)){switch(m=c[0],u=Dn.lastIndex,f=m,m){case"(":i==="?NonExpressionParenKeyword"&&p.push({tag:"JSNonExpressionParen",nesting:d}),d++,h=!1;break;case")":d--,h=!0,l.tag==="JSNonExpressionParen"&&d===l.nesting&&(p.pop(),f="?NonExpressionParenEnd",h=!1);break;case"{":Dn.lastIndex=0,o=!$u.test(i)&&(ho.test(i)||Ln.test(i)),n.push(o),h=!1;break;case"}":switch(l.tag){case"InterpolationInTemplate":if(n.length===l.nesting){Gt.lastIndex=s,c=Gt.exec(e),s=Gt.lastIndex,i=c[0],c[1]==="${"?(i="?InterpolationInTemplate",h=!1,yield{type:"TemplateMiddle",value:c[0]}):(p.pop(),h=!0,yield{type:"TemplateTail",value:c[0],closed:c[1]==="`"});continue}break;case"InterpolationInJSX":if(n.length===l.nesting){p.pop(),s+=1,i="}",yield{type:"JSXPunctuator",value:"}"};continue}}h=n.pop(),f=h?"?ExpressionBraceEnd":"}";break;case"]":h=!0;break;case"++":case"--":f=h?"?PostfixIncDec":"?UnaryIncDec";break;case"<":if(t&&(ho.test(i)||Ln.test(i))){p.push({tag:"JSXTag"}),s+=1,i="<",yield{type:"JSXPunctuator",value:m};continue}h=!1;break;default:h=!1}s=u,i=f,yield{type:"Punctuator",value:m};continue}if(no.lastIndex=s,c=no.exec(e)){switch(s=no.lastIndex,f=c[0],c[0]){case"for":case"if":case"while":case"with":i!=="."&&i!=="?."&&(f="?NonExpressionParenKeyword")}i=f,h=!Ln.test(c[0]),yield{type:c[1]==="#"?"PrivateIdentifier":"IdentifierName",value:c[0]};continue}if(fo.lastIndex=s,c=fo.exec(e)){s=fo.lastIndex,i=c[0],h=!0,yield{type:"StringLiteral",value:c[0],closed:c[2]!==void 0};continue}if(co.lastIndex=s,c=co.exec(e)){s=co.lastIndex,i=c[0],h=!0,yield{type:"NumericLiteral",value:c[0]};continue}if(Gt.lastIndex=s,c=Gt.exec(e)){s=Gt.lastIndex,i=c[0],c[1]==="${"?(i="?InterpolationInTemplate",p.push({tag:"InterpolationInTemplate",nesting:n.length}),h=!1,yield{type:"TemplateHead",value:c[0]}):(h=!0,yield{type:"NoSubstitutionTemplate",value:c[0],closed:c[1]==="`"});continue}break;case"JSXTag":case"JSXTagEnd":if(oo.lastIndex=s,c=oo.exec(e)){switch(s=oo.lastIndex,f=c[0],c[0]){case"<":p.push({tag:"JSXTag"});break;case">":p.pop(),i==="/"||l.tag==="JSXTagEnd"?(f="?JSX",h=!0):p.push({tag:"JSXChildren"});break;case"{":p.push({tag:"InterpolationInJSX",nesting:n.length}),f="?InterpolationInJSX",h=!1;break;case"/":i==="<"&&(p.pop(),p[p.length-1].tag==="JSXChildren"&&p.pop(),p.push({tag:"JSXTagEnd"}))}i=f,yield{type:"JSXPunctuator",value:c[0]};continue}if(ro.lastIndex=s,c=ro.exec(e)){s=ro.lastIndex,i=c[0],yield{type:"JSXIdentifier",value:c[0]};continue}if(so.lastIndex=s,c=so.exec(e)){s=so.lastIndex,i=c[0],yield{type:"JSXString",value:c[0],closed:c[2]!==void 0};continue}break;case"JSXChildren":if(io.lastIndex=s,c=io.exec(e)){s=io.lastIndex,i=c[0],yield{type:"JSXText",value:c[0]};continue}switch(e[s]){case"<":p.push({tag:"JSXTag"}),s++,i="<",yield{type:"JSXPunctuator",value:"<"};continue;case"{":p.push({tag:"InterpolationInJSX",nesting:n.length}),s++,i="?InterpolationInJSX",h=!1,yield{type:"JSXPunctuator",value:"{"};continue}}if(po.lastIndex=s,c=po.exec(e)){s=po.lastIndex,yield{type:"WhiteSpace",value:c[0]};continue}if(Bn.lastIndex=s,c=Bn.exec(e)){s=Bn.lastIndex,h=!1,Ci.test(i)&&(i="?NoLineTerminatorHere"),yield{type:"LineTerminatorSequence",value:c[0]};continue}if(ao.lastIndex=s,c=ao.exec(e)){s=ao.lastIndex,Au.test(c[0])&&(h=!1,Ci.test(i)&&(i="?NoLineTerminatorHere")),yield{type:"MultiLineComment",value:c[0],closed:c[1]!==void 0};continue}if(uo.lastIndex=s,c=uo.exec(e)){s=uo.lastIndex,h=!1,yield{type:"SingleLineComment",value:c[0]};continue}r=String.fromCodePoint(e.codePointAt(s)),s+=r.length,i=r,h=!1,yield{type:l.tag.startsWith("JSX")?"JSXInvalid":"Invalid",value:r}}}});function Wn(e,t,n){let r=t-n;r=r<0?-r<<1|1:r<<1;do{let o=r&31;r>>>=5,r>0&&(o|=32),e.write(hf[o])}while(r>0);return t}function df(e){let t=new vy,n=0,r=0,o=0,s=0;for(let i=0;i<e.length;i++){let a=e[i];if(i>0&&t.write(xy),a.length===0)continue;let c=0;for(let l=0;l<a.length;l++){let u=a[l];l>0&&t.write(Sy),c=Wn(t,u[0],c),u.length!==1&&(n=Wn(t,u[1],n),r=Wn(t,u[2],r),o=Wn(t,u[3],o),u.length!==4&&(s=Wn(t,u[4],s)))}}return t.flush()}var Sy,xy,lf,hf,Ty,uf,ff,vy,pf=Ca(()=>{"use strict";Sy=44,xy=59,lf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",hf=new Uint8Array(64),Ty=new Uint8Array(128);for(let e=0;e<lf.length;e++){let t=lf.charCodeAt(e);hf[e]=t,Ty[t]=e}uf=1024*16,ff=typeof TextDecoder!="undefined"?new TextDecoder:typeof Buffer!="undefined"?{decode(e){return Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString()}}:{decode(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}},vy=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(uf)}write(e){let{buffer:t}=this;t[this.pos++]=e,this.pos===uf&&(this.out+=ff.decode(t),this.pos=0)}flush(){let{buffer:e,out:t,pos:n}=this;return n>0?t+ff.decode(e.subarray(0,n)):t}}});var bf={};jh(bf,{Bundle:()=>Bi,SourceMap:()=>Jn,default:()=>Vn});function Ey(){return typeof globalThis!="undefined"&&typeof globalThis.btoa=="function"?e=>globalThis.btoa(unescape(encodeURIComponent(e))):typeof Buffer=="function"?e=>Buffer.from(e,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}function _y(e){let t=e.split(`
`),n=t.filter(s=>/^\t+/.test(s)),r=t.filter(s=>/^ {2,}/.test(s));if(n.length===0&&r.length===0)return null;if(n.length>=r.length)return" ";let o=r.reduce((s,i)=>{let a=/^ +/.exec(i)[0].length;return Math.min(a,s)},1/0);return new Array(o+1).join(" ")}function gf(e,t){let n=e.split(/[/\\]/),r=t.split(/[/\\]/);for(n.pop();n[0]===r[0];)n.shift(),r.shift();if(n.length){let o=n.length;for(;o--;)n[o]=".."}return n.concat(r).join("/")}function yf(e){return Iy.call(e)==="[object Object]"}function Di(e){let t=e.split(`
`),n=[];for(let r=0,o=0;r<t.length;r++)n.push(o),o+=t[r].length+1;return function(o){let s=0,i=n.length;for(;s<i;){let l=s+i>>1;o<n[l]?i=l:s=l+1}let a=s-1,c=o-n[a];return{line:a,column:c}}}var xo,To,Cy,Jn,Iy,Oy,vo,Un,hn,Vn,mf,Bi,wf=Ca(()=>{"use strict";pf();xo=class e{constructor(t){this.bits=t instanceof e?t.bits.slice():[]}add(t){this.bits[t>>5]|=1<<(t&31)}has(t){return!!(this.bits[t>>5]&1<<(t&31))}},To=class e{constructor(t,n,r){this.start=t,this.end=n,this.original=r,this.intro="",this.outro="",this.content=r,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(){let t=new e(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 n=this;for(;n;)t(n),n=n.next}eachPrevious(t){let n=this;for(;n;)t(n),n=n.previous}edit(t,n,r){return this.content=t,r||(this.intro="",this.outro=""),this.storeName=n,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){let n=t-this.start,r=this.original.slice(0,n),o=this.original.slice(n);this.original=r;let s=new e(t,this.end,o);return s.outro=this.outro,this.outro="",this.end=t,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(t){if(this.outro=this.outro.replace(t,""),this.outro.length)return!0;let n=this.content.replace(t,"");if(n.length)return n!==this.content&&(this.split(this.start+n.length).edit("",void 0,!0),this.edited&&this.edit(n,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;let n=this.content.replace(t,"");if(n.length){if(n!==this.content){let r=this.split(this.end-n.length);this.edited&&r.edit(n,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}};Cy=Ey(),Jn=class{constructor(t){this.version=3,this.file=t.file,this.sources=t.sources,this.sourcesContent=t.sourcesContent,this.names=t.names,this.mappings=df(t.mappings),typeof t.x_google_ignoreList!="undefined"&&(this.x_google_ignoreList=t.x_google_ignoreList),typeof t.debugId!="undefined"&&(this.debugId=t.debugId)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+Cy(this.toString())}};Iy=Object.prototype.toString;Oy=/\w/,vo=class{constructor(t){this.hires=t,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(t,n,r,o){if(n.length){let s=n.length-1,i=n.indexOf(`
`,0),a=-1;for(;i>=0&&s>i;){let l=[this.generatedCodeColumn,t,r.line,r.column];o>=0&&l.push(o),this.rawSegments.push(l),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,a=i,i=n.indexOf(`
`,i+1)}let c=[this.generatedCodeColumn,t,r.line,r.column];o>=0&&c.push(o),this.rawSegments.push(c),this.advance(n.slice(a+1))}else this.pending&&(this.rawSegments.push(this.pending),this.advance(n));this.pending=null}addUneditedChunk(t,n,r,o,s){let i=n.start,a=!0,c=!1;for(;i<n.end;){if(r[i]===`
`)o.line+=1,o.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(i)){let l=[this.generatedCodeColumn,t,o.line,o.column];this.hires==="boundary"?Oy.test(r[i])?c||(this.rawSegments.push(l),c=!0):(this.rawSegments.push(l),c=!1):this.rawSegments.push(l)}o.column+=1,this.generatedCodeColumn+=1,a=!1}i+=1}this.pending=null}advance(t){if(!t)return;let n=t.split(`
`);if(n.length>1){for(let r=0;r<n.length-1;r++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0}this.generatedCodeColumn+=n[n.length-1].length}},Un=`
`,hn={insertLeft:!1,insertRight:!1,storeName:!1},Vn=class e{constructor(t,n={}){let r=new To(0,t.length,t);Object.defineProperties(this,{original:{writable:!0,value:t},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:n.filename},indentExclusionRanges:{writable:!0,value:n.indentExclusionRanges},sourcemapLocations:{writable:!0,value:new xo},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:void 0},ignoreList:{writable:!0,value:n.ignoreList},offset:{writable:!0,value:n.offset||0}}),this.byStart[0]=r,this.byEnd[t.length]=r}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,n){if(t=t+this.offset,typeof n!="string")throw new TypeError("inserted content must be a string");this._split(t);let r=this.byEnd[t];return r?r.appendLeft(n):this.intro+=n,this}appendRight(t,n){if(t=t+this.offset,typeof n!="string")throw new TypeError("inserted content must be a string");this._split(t);let r=this.byStart[t];return r?r.appendRight(n):this.outro+=n,this}clone(){let t=new e(this.original,{filename:this.filename,offset:this.offset}),n=this.firstChunk,r=t.firstChunk=t.lastSearchedChunk=n.clone();for(;n;){t.byStart[r.start]=r,t.byEnd[r.end]=r;let o=n.next,s=o&&o.clone();s&&(r.next=s,s.previous=r,r=s),n=o}return t.lastChunk=r,this.indentExclusionRanges&&(t.indentExclusionRanges=this.indentExclusionRanges.slice()),t.sourcemapLocations=new xo(this.sourcemapLocations),t.intro=this.intro,t.outro=this.outro,t}generateDecodedMap(t){t=t||{};let n=0,r=Object.keys(this.storedNames),o=new vo(t.hires),s=Di(this.original);return this.intro&&o.advance(this.intro),this.firstChunk.eachNext(i=>{let a=s(i.start);i.intro.length&&o.advance(i.intro),i.edited?o.addEdit(n,i.content,a,i.storeName?r.indexOf(i.original):-1):o.addUneditedChunk(n,i,this.original,a,this.sourcemapLocations),i.outro.length&&o.advance(i.outro)}),{file:t.file?t.file.split(/[/\\]/).pop():void 0,sources:[t.source?gf(t.file||"",t.source):t.file||""],sourcesContent:t.includeContent?[this.original]:void 0,names:r,mappings:o.raw,x_google_ignoreList:this.ignoreList?[n]:void 0}}generateMap(t){return new Jn(this.generateDecodedMap(t))}_ensureindentStr(){this.indentStr===void 0&&(this.indentStr=_y(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),this.indentStr===null?" ":this.indentStr}indent(t,n){let r=/^[^\r\n]/gm;if(yf(t)&&(n=t,t=void 0),t===void 0&&(this._ensureindentStr(),t=this.indentStr||" "),t==="")return this;n=n||{};let o={};n.exclude&&(typeof n.exclude[0]=="number"?[n.exclude]:n.exclude).forEach(u=>{for(let f=u[0];f<u[1];f+=1)o[f]=!0});let s=n.indentStart!==!1,i=l=>s?`${t}${l}`:(s=!0,l);this.intro=this.intro.replace(r,i);let a=0,c=this.firstChunk;for(;c;){let l=c.end;if(c.edited)o[a]||(c.content=c.content.replace(r,i),c.content.length&&(s=c.content[c.content.length-1]===`
`));else for(a=c.start;a<l;){if(!o[a]){let u=this.original[a];u===`
`?s=!0:u!=="\r"&&s&&(s=!1,a===c.start||(this._splitChunk(c,a),c=c.next),c.prependRight(t))}a+=1}a=c.end,c=c.next}return this.outro=this.outro.replace(r,i),this}insert(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(t,n){return hn.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),hn.insertLeft=!0),this.appendLeft(t,n)}insertRight(t,n){return hn.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),hn.insertRight=!0),this.prependRight(t,n)}move(t,n,r){if(t=t+this.offset,n=n+this.offset,r=r+this.offset,r>=t&&r<=n)throw new Error("Cannot move a selection inside itself");this._split(t),this._split(n),this._split(r);let o=this.byStart[t],s=this.byEnd[n],i=o.previous,a=s.next,c=this.byStart[r];if(!c&&s===this.lastChunk)return this;let l=c?c.previous:this.lastChunk;return i&&(i.next=a),a&&(a.previous=i),l&&(l.next=o),c&&(c.previous=s),o.previous||(this.firstChunk=s.next),s.next||(this.lastChunk=o.previous,this.lastChunk.next=null),o.previous=l,s.next=c||null,l||(this.firstChunk=o),c||(this.lastChunk=s),this}overwrite(t,n,r,o){return o=o||{},this.update(t,n,r,{...o,overwrite:!o.contentOnly})}update(t,n,r,o){if(t=t+this.offset,n=n+this.offset,typeof r!="string")throw new TypeError("replacement content must be a string");if(this.original.length!==0){for(;t<0;)t+=this.original.length;for(;n<0;)n+=this.original.length}if(n>this.original.length)throw new Error("end is out of bounds");if(t===n)throw new Error("Cannot overwrite a zero-length range \u2013 use appendLeft or prependRight instead");this._split(t),this._split(n),o===!0&&(hn.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),hn.storeName=!0),o={storeName:!0});let s=o!==void 0?o.storeName:!1,i=o!==void 0?o.overwrite:!1;if(s){let l=this.original.slice(t,n);Object.defineProperty(this.storedNames,l,{writable:!0,value:!0,enumerable:!0})}let a=this.byStart[t],c=this.byEnd[n];if(a){let l=a;for(;l!==c;){if(l.next!==this.byStart[l.end])throw new Error("Cannot overwrite across a split point");l=l.next,l.edit("",!1)}a.edit(r,s,!i)}else{let l=new To(t,n,"").edit(r,s);c.next=l,l.previous=c}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,n){if(t=t+this.offset,typeof n!="string")throw new TypeError("inserted content must be a string");this._split(t);let r=this.byEnd[t];return r?r.prependLeft(n):this.intro=n+this.intro,this}prependRight(t,n){if(t=t+this.offset,typeof n!="string")throw new TypeError("inserted content must be a string");this._split(t);let r=this.byStart[t];return r?r.prependRight(n):this.outro=n+this.outro,this}remove(t,n){if(t=t+this.offset,n=n+this.offset,this.original.length!==0){for(;t<0;)t+=this.original.length;for(;n<0;)n+=this.original.length}if(t===n)return this;if(t<0||n>this.original.length)throw new Error("Character is out of bounds");if(t>n)throw new Error("end must be greater than start");this._split(t),this._split(n);let r=this.byStart[t];for(;r;)r.intro="",r.outro="",r.edit(""),r=n>r.end?this.byStart[r.end]:null;return this}reset(t,n){if(t=t+this.offset,n=n+this.offset,this.original.length!==0){for(;t<0;)t+=this.original.length;for(;n<0;)n+=this.original.length}if(t===n)return this;if(t<0||n>this.original.length)throw new Error("Character is out of bounds");if(t>n)throw new Error("end must be greater than start");this._split(t),this._split(n);let r=this.byStart[t];for(;r;)r.reset(),r=n>r.end?this.byStart[r.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(Un);if(t!==-1)return this.outro.substr(t+1);let n=this.outro,r=this.lastChunk;do{if(r.outro.length>0){if(t=r.outro.lastIndexOf(Un),t!==-1)return r.outro.substr(t+1)+n;n=r.outro+n}if(r.content.length>0){if(t=r.content.lastIndexOf(Un),t!==-1)return r.content.substr(t+1)+n;n=r.content+n}if(r.intro.length>0){if(t=r.intro.lastIndexOf(Un),t!==-1)return r.intro.substr(t+1)+n;n=r.intro+n}}while(r=r.previous);return t=this.intro.lastIndexOf(Un),t!==-1?this.intro.substr(t+1)+n:this.intro+n}slice(t=0,n=this.original.length-this.offset){if(t=t+this.offset,n=n+this.offset,this.original.length!==0){for(;t<0;)t+=this.original.length;for(;n<0;)n+=this.original.length}let r="",o=this.firstChunk;for(;o&&(o.start>t||o.end<=t);){if(o.start<n&&o.end>=n)return r;o=o.next}if(o&&o.edited&&o.start!==t)throw new Error(`Cannot use replaced character ${t} as slice start anchor.`);let s=o;for(;o;){o.intro&&(s!==o||o.start===t)&&(r+=o.intro);let i=o.start<n&&o.end>=n;if(i&&o.edited&&o.end!==n)throw new Error(`Cannot use replaced character ${n} as slice end anchor.`);let a=s===o?t-o.start:0,c=i?o.content.length+n-o.end:o.content.length;if(r+=o.content.slice(a,c),o.outro&&(!i||o.end===n)&&(r+=o.outro),i)break;o=o.next}return r}snip(t,n){let r=this.clone();return r.remove(0,t),r.remove(n,r.original.length),r}_split(t){if(this.byStart[t]||this.byEnd[t])return;let n=this.lastSearchedChunk,r=n,o=t>n.end;for(;n;){if(n.contains(t))return this._splitChunk(n,t);if(n=o?this.byStart[n.end]:this.byEnd[n.start],n===r)return;r=n}}_splitChunk(t,n){if(t.edited&&t.content.length){let o=Di(this.original)(n);throw new Error(`Cannot split a chunk that has already been edited (${o.line}:${o.column} \u2013 "${t.original}")`)}let r=t.split(n);return this.byEnd[n]=t,this.byStart[n]=r,this.byEnd[r.end]=r,t===this.lastChunk&&(this.lastChunk=r),this.lastSearchedChunk=t,!0}toString(){let t=this.intro,n=this.firstChunk;for(;n;)t+=n.toString(),n=n.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,n=0;do n+=t.intro.length+t.content.length+t.outro.length;while(t=t.next);return n}trimLines(){return this.trim("[\\r\\n]")}trim(t){return this.trimStart(t).trimEnd(t)}trimEndAborted(t){let n=new RegExp((t||"\\s")+"+$");if(this.outro=this.outro.replace(n,""),this.outro.length)return!0;let r=this.lastChunk;do{let o=r.end,s=r.trimEnd(n);if(r.end!==o&&(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(t){return this.trimEndAborted(t),this}trimStartAborted(t){let n=new RegExp("^"+(t||"\\s")+"+");if(this.intro=this.intro.replace(n,""),this.intro.length)return!0;let r=this.firstChunk;do{let o=r.end,s=r.trimStart(n);if(r.end!==o&&(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(t){return this.trimStartAborted(t),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(t,n){function r(s,i){return typeof n=="string"?n.replace(/\$(\$|&|\d+)/g,(a,c)=>c==="$"?"$":c==="&"?s[0]:+c<s.length?s[+c]:`$${c}`):n(...s,s.index,i,s.groups)}function o(s,i){let a,c=[];for(;a=s.exec(i);)c.push(a);return c}if(t.global)o(t,this.original).forEach(i=>{if(i.index!=null){let a=r(i,this.original);a!==i[0]&&this.overwrite(i.index,i.index+i[0].length,a)}});else{let s=this.original.match(t);if(s&&s.index!=null){let i=r(s,this.original);i!==s[0]&&this.overwrite(s.index,s.index+s[0].length,i)}}return this}_replaceString(t,n){let{original:r}=this,o=r.indexOf(t);return o!==-1&&this.overwrite(o,o+t.length,n),this}replace(t,n){return typeof t=="string"?this._replaceString(t,n):this._replaceRegexp(t,n)}_replaceAllString(t,n){let{original:r}=this,o=t.length;for(let s=r.indexOf(t);s!==-1;s=r.indexOf(t,s+o))r.slice(s,s+o)!==n&&this.overwrite(s,s+o,n);return this}replaceAll(t,n){if(typeof t=="string")return this._replaceAllString(t,n);if(!t.global)throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(t,n)}},mf=Object.prototype.hasOwnProperty,Bi=class e{constructor(t={}){this.intro=t.intro||"",this.separator=t.separator!==void 0?t.separator:`
`,this.sources=[],this.uniqueSources=[],this.uniqueSourceIndexByFilename={}}addSource(t){if(t instanceof Vn)return this.addSource({content:t,filename:t.filename,separator:this.separator});if(!yf(t)||!t.content)throw new Error("bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`");if(["filename","ignoreList","indentExclusionRanges","separator"].forEach(n=>{mf.call(t,n)||(t[n]=t.content[n])}),t.separator===void 0&&(t.separator=this.separator),t.filename)if(!mf.call(this.uniqueSourceIndexByFilename,t.filename))this.uniqueSourceIndexByFilename[t.filename]=this.uniqueSources.length,this.uniqueSources.push({filename:t.filename,content:t.content.original});else{let n=this.uniqueSources[this.uniqueSourceIndexByFilename[t.filename]];if(t.content.original!==n.content)throw new Error(`Illegal source: same filename (${t.filename}), different contents`)}return this.sources.push(t),this}append(t,n){return this.addSource({content:new Vn(t),separator:n&&n.separator||""}),this}clone(){let t=new e({intro:this.intro,separator:this.separator});return this.sources.forEach(n=>{t.addSource({filename:n.filename,content:n.content.clone(),separator:n.separator})}),t}generateDecodedMap(t={}){let n=[],r;this.sources.forEach(s=>{Object.keys(s.content.storedNames).forEach(i=>{~n.indexOf(i)||n.push(i)})});let o=new vo(t.hires);return this.intro&&o.advance(this.intro),this.sources.forEach((s,i)=>{i>0&&o.advance(this.separator);let a=s.filename?this.uniqueSourceIndexByFilename[s.filename]:-1,c=s.content,l=Di(c.original);c.intro&&o.advance(c.intro),c.firstChunk.eachNext(u=>{let f=l(u.start);u.intro.length&&o.advance(u.intro),s.filename?u.edited?o.addEdit(a,u.content,f,u.storeName?n.indexOf(u.original):-1):o.addUneditedChunk(a,u,c.original,f,c.sourcemapLocations):o.advance(u.content),u.outro.length&&o.advance(u.outro)}),c.outro&&o.advance(c.outro),s.ignoreList&&a!==-1&&(r===void 0&&(r=[]),r.push(a))}),{file:t.file?t.file.split(/[/\\]/).pop():void 0,sources:this.uniqueSources.map(s=>t.file?gf(t.file,s.filename):s.filename),sourcesContent:this.uniqueSources.map(s=>t.includeContent?s.content:null),names:n,mappings:o.raw,x_google_ignoreList:r}}generateMap(t){return new Jn(this.generateDecodedMap(t))}getIndentString(){let t={};return this.sources.forEach(n=>{let r=n.content._getRawIndentString();r!==null&&(t[r]||(t[r]=0),t[r]+=1)}),Object.keys(t).sort((n,r)=>t[n]-t[r])[0]||" "}indent(t){if(arguments.length||(t=this.getIndentString()),t==="")return this;let n=!this.intro||this.intro.slice(-1)===`
`;return this.sources.forEach((r,o)=>{let s=r.separator!==void 0?r.separator:this.separator,i=n||o>0&&/\r?\n$/.test(s);r.content.indent(t,{exclude:r.indentExclusionRanges,indentStart:i}),n=r.content.lastChar()===`
`}),this.intro&&(this.intro=t+this.intro.replace(/^[^\n]/gm,(r,o)=>o>0?t+r:r)),this}prepend(t){return this.intro=t+this.intro,this}toString(){let t=this.sources.map((n,r)=>{let o=n.separator!==void 0?n.separator:this.separator;return(r>0?o:"")+n.content.toString()}).join("");return this.intro+t}isEmpty(){return!(this.intro.length&&this.intro.trim()||this.sources.some(t=>!t.content.isEmpty()))}length(){return this.sources.reduce((t,n)=>t+n.content.length(),this.intro.length)}trimLines(){return this.trim("[\\r\\n]")}trim(t){return this.trimStart(t).trimEnd(t)}trimStart(t){let n=new RegExp("^"+(t||"\\s")+"+");if(this.intro=this.intro.replace(n,""),!this.intro){let r,o=0;do if(r=this.sources[o++],!r)break;while(!r.content.trimStartAborted(t))}return this}trimEnd(t){let n=new RegExp((t||"\\s")+"+$"),r,o=this.sources.length-1;do if(r=this.sources[o--],!r){this.intro=this.intro.replace(n,"");break}while(!r.content.trimEndAborted(t));return this}}});var Th=Qt(xh=>{"use strict";Object.defineProperty(xh,"__esModule",{value:!0})});var Eh=Qt(vh=>{"use strict";Object.defineProperty(vh,"__esModule",{value:!0});var cT=Symbol("inverted"),lT=Symbol("expectNull"),uT=Symbol("expectUndefined"),fT=Symbol("expectNumber"),hT=Symbol("expectString"),dT=Symbol("expectBoolean"),pT=Symbol("expectVoid"),mT=Symbol("expectFunction"),gT=Symbol("expectObject"),yT=Symbol("expectArray"),bT=Symbol("expectSymbol"),wT=Symbol("expectAny"),ST=Symbol("expectUnknown"),xT=Symbol("expectNever"),TT=Symbol("expectNullable"),vT=Symbol("expectBigInt")});var _h=Qt(Ch=>{"use strict";Object.defineProperty(Ch,"__esModule",{value:!0})});var Oh=Qt(Ih=>{"use strict";Object.defineProperty(Ih,"__esModule",{value:!0});var _T=Symbol("secret"),IT=Symbol("mismatch"),OT=Symbol("avalue")});var Ah=Qt(Se=>{"use strict";var Dw=Se&&Se.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Po=Se&&Se.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Dw(t,e,n)};Object.defineProperty(Se,"__esModule",{value:!0});Se.expectTypeOf=void 0;Po(Th(),Se);Po(Eh(),Se);Po(_h(),Se);Po(Oh(),Se);var xe=()=>!0,Bw=e=>{let t=["parameters","returns","resolves","not","items","constructorParameters","thisParameter","instance","guards","asserts","branded"],n={toBeAny:xe,toBeUnknown:xe,toBeNever:xe,toBeFunction:xe,toBeObject:xe,toBeArray:xe,toBeString:xe,toBeNumber:xe,toBeBoolean:xe,toBeVoid:xe,toBeSymbol:xe,toBeNull:xe,toBeUndefined:xe,toBeNullable:xe,toBeBigInt:xe,toMatchTypeOf:xe,toEqualTypeOf:xe,toBeConstructibleWith:xe,toMatchObjectType:xe,toExtend:xe,map:Se.expectTypeOf,toBeCallableWith:Se.expectTypeOf,extract:Se.expectTypeOf,exclude:Se.expectTypeOf,pick:Se.expectTypeOf,omit:Se.expectTypeOf,toHaveProperty:Se.expectTypeOf,parameter:Se.expectTypeOf};return t.forEach(o=>Object.defineProperty(n,o,{get:()=>(0,Se.expectTypeOf)({})})),n};Se.expectTypeOf=Bw});var Lh={reset:[0,0],bold:[1,22,"\x1B[22m\x1B[1m"],dim:[2,22,"\x1B[22m\x1B[2m"],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]},Dh=Object.entries(Lh);function jo(e){return String(e)}jo.open="";jo.close="";function _a(e=!1){let t=typeof process!="undefined"?process:void 0,n=(t==null?void 0:t.env)||{},r=(t==null?void 0:t.argv)||[];return!("NO_COLOR"in n||r.includes("--no-color"))&&("FORCE_COLOR"in n||r.includes("--color")||(t==null?void 0:t.platform)==="win32"||e&&n.TERM!=="dumb"||"CI"in n)||typeof window!="undefined"&&!!window.chrome}function Ia(e=!1){let t=_a(e),n=(i,a,c,l)=>{let u="",f=0;do u+=i.substring(f,l)+c,f=l+a.length,l=i.indexOf(a,f);while(~l);return u+i.substring(f)},r=(i,a,c=i)=>{let l=u=>{let f=String(u),d=f.indexOf(a,i.length);return~d?i+n(f,a,c,d)+a:i+f+a};return l.open=i,l.close=a,l},o={isColorSupported:t},s=i=>`\x1B[${i}m`;for(let[i,a]of Dh)o[i]=t?r(s(a[0]),s(a[1]),a[2]):jo;return o}var Oa=require("tty"),Bh=process.env.FORCE_TTY!==void 0||(0,Oa.isatty)(1);var he=Ia(Bh);function Wa(e,t){return t.forEach(function(n){n&&typeof n!="string"&&!Array.isArray(n)&&Object.keys(n).forEach(function(r){if(r!=="default"&&!(r in e)){var o=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,o.get?o:{enumerable:!0,get:function(){return n[r]}})}})}),Object.freeze(e)}function qh(e,t){let n=Object.keys(e),r=t===null?n:n.sort(t);if(Object.getOwnPropertySymbols)for(let o of Object.getOwnPropertySymbols(e))Object.getOwnPropertyDescriptor(e,o).enumerable&&r.push(o);return r}function xn(e,t,n,r,o,s,i=": "){let a="",c=0,l=e.next();if(!l.done){a+=t.spacingOuter;let u=n+t.indent;for(;!l.done;){if(a+=u,c++===t.maxWidth){a+="\u2026";break}let f=s(l.value[0],t,u,r,o),d=s(l.value[1],t,u,r,o);a+=f+i+d,l=e.next(),l.done?t.min||(a+=","):a+=`,${t.spacingInner}`}a+=t.spacingOuter+n}return a}function Do(e,t,n,r,o,s){let i="",a=0,c=e.next();if(!c.done){i+=t.spacingOuter;let l=n+t.indent;for(;!c.done;){if(i+=l,a++===t.maxWidth){i+="\u2026";break}i+=s(c.value,t,l,r,o),c=e.next(),c.done?t.min||(i+=","):i+=`,${t.spacingInner}`}i+=t.spacingOuter+n}return i}function rr(e,t,n,r,o,s){let i="";e=e instanceof ArrayBuffer?new DataView(e):e;let a=l=>l instanceof DataView,c=a(e)?e.byteLength:e.length;if(c>0){i+=t.spacingOuter;let l=n+t.indent;for(let u=0;u<c;u++){if(i+=l,u===t.maxWidth){i+="\u2026";break}(a(e)||u in e)&&(i+=s(a(e)?e.getInt8(u):e[u],t,l,r,o)),u<c-1?i+=`,${t.spacingInner}`:t.min||(i+=",")}i+=t.spacingOuter+n}return i}function Bo(e,t,n,r,o,s){let i="",a=qh(e,t.compareKeys);if(a.length>0){i+=t.spacingOuter;let c=n+t.indent;for(let l=0;l<a.length;l++){let u=a[l],f=s(u,t,c,r,o),d=s(e[u],t,c,r,o);i+=`${c+f}: ${d}`,l<a.length-1?i+=`,${t.spacingInner}`:t.min||(i+=",")}i+=t.spacingOuter+n}return i}var zh=typeof Symbol=="function"&&Symbol.for?Symbol.for("jest.asymmetricMatcher"):1267621,Qn=" ",Wh=(e,t,n,r,o,s)=>{let i=e.toString();if(i==="ArrayContaining"||i==="ArrayNotContaining")return++r>t.maxDepth?`[${i}]`:`${i+Qn}[${rr(e.sample,t,n,r,o,s)}]`;if(i==="ObjectContaining"||i==="ObjectNotContaining")return++r>t.maxDepth?`[${i}]`:`${i+Qn}{${Bo(e.sample,t,n,r,o,s)}}`;if(i==="StringMatching"||i==="StringNotMatching"||i==="StringContaining"||i==="StringNotContaining")return i+Qn+s(e.sample,t,n,r,o);if(typeof e.toAsymmetricMatcher!="function")throw new TypeError(`Asymmetric matcher ${e.constructor.name} does not implement toAsymmetricMatcher()`);return e.toAsymmetricMatcher()},Uh=e=>e&&e.$$typeof===zh,Jh={serialize:Wh,test:Uh},Vh=" ",Ua=new Set(["DOMStringMap","NamedNodeMap"]),Kh=/^(?:HTML\w*Collection|NodeList)$/;function Xh(e){return Ua.has(e)||Kh.test(e)}var Gh=e=>e&&e.constructor&&!!e.constructor.name&&Xh(e.constructor.name);function Yh(e){return e.constructor.name==="NamedNodeMap"}var Hh=(e,t,n,r,o,s)=>{let i=e.constructor.name;return++r>t.maxDepth?`[${i}]`:(t.min?"":i+Vh)+(Ua.has(i)?`{${Bo(Yh(e)?[...e].reduce((a,c)=>(a[c.name]=c.value,a),{}):{...e},t,n,r,o,s)}}`:`[${rr([...e],t,n,r,o,s)}]`)},Zh={serialize:Hh,test:Gh};function Ja(e){return e.replaceAll("<","<").replaceAll(">",">")}function qo(e,t,n,r,o,s,i){let a=r+n.indent,c=n.colors;return e.map(l=>{let u=t[l],f=i(u,n,a,o,s);return typeof u!="string"&&(f.includes(`
`)&&(f=n.spacingOuter+a+f+n.spacingOuter+r),f=`{${f}}`),`${n.spacingInner+r+c.prop.open+l+c.prop.close}=${c.value.open}${f}${c.value.close}`}).join("")}function zo(e,t,n,r,o,s){return e.map(i=>t.spacingOuter+n+(typeof i=="string"?Va(i,t):s(i,t,n,r,o))).join("")}function Va(e,t){let n=t.colors.content;return n.open+Ja(e)+n.close}function Qh(e,t){let n=t.colors.comment;return`${n.open}<!--${Ja(e)}-->${n.close}`}function Wo(e,t,n,r,o){let s=r.colors.tag;return`${s.open}<${e}${t&&s.close+t+r.spacingOuter+o+s.open}${n?`>${s.close}${n}${r.spacingOuter}${o}${s.open}</${e}`:`${t&&!r.min?"":" "}/`}>${s.close}`}function Uo(e,t){let n=t.colors.tag;return`${n.open}<${e}${n.close} \u2026${n.open} />${n.close}`}var ed=1,Ka=3,Xa=8,Ga=11,td=/^(?:(?:HTML|SVG)\w*)?Element$/;function nd(e){try{return typeof e.hasAttribute=="function"&&e.hasAttribute("is")}catch{return!1}}function rd(e){let t=e.constructor.name,{nodeType:n,tagName:r}=e,o=typeof r=="string"&&r.includes("-")||nd(e);return n===ed&&(td.test(t)||o)||n===Ka&&t==="Text"||n===Xa&&t==="Comment"||n===Ga&&t==="DocumentFragment"}var od=e=>{var t;return(e==null||(t=e.constructor)===null||t===void 0?void 0:t.name)&&rd(e)};function sd(e){return e.nodeType===Ka}function id(e){return e.nodeType===Xa}function Fo(e){return e.nodeType===Ga}var ad=(e,t,n,r,o,s)=>{if(sd(e))return Va(e.data,t);if(id(e))return Qh(e.data,t);let i=Fo(e)?"DocumentFragment":e.tagName.toLowerCase();return++r>t.maxDepth?Uo(i,t):Wo(i,qo(Fo(e)?[]:Array.from(e.attributes,a=>a.name).sort(),Fo(e)?{}:[...e.attributes].reduce((a,c)=>(a[c.name]=c.value,a),{}),t,n+t.indent,r,o,s),zo(Array.prototype.slice.call(e.childNodes||e.children),t,n+t.indent,r,o,s),t,n)},cd={serialize:ad,test:od},ld="@@__IMMUTABLE_ITERABLE__@@",ud="@@__IMMUTABLE_LIST__@@",fd="@@__IMMUTABLE_KEYED__@@",hd="@@__IMMUTABLE_MAP__@@",Aa="@@__IMMUTABLE_ORDERED__@@",dd="@@__IMMUTABLE_RECORD__@@",pd="@@__IMMUTABLE_SEQ__@@",md="@@__IMMUTABLE_SET__@@",gd="@@__IMMUTABLE_STACK__@@",en=e=>`Immutable.${e}`,sr=e=>`[${e}]`,Sn=" ",$a="\u2026";function yd(e,t,n,r,o,s,i){return++r>t.maxDepth?sr(en(i)):`${en(i)+Sn}{${xn(e.entries(),t,n,r,o,s)}}`}function bd(e){let t=0;return{next(){if(t<e._keys.length){let n=e._keys[t++];return{done:!1,value:[n,e.get(n)]}}return{done:!0,value:void 0}}}}function wd(e,t,n,r,o,s){let i=en(e._name||"Record");return++r>t.maxDepth?sr(i):`${i+Sn}{${xn(bd(e),t,n,r,o,s)}}`}function Sd(e,t,n,r,o,s){let i=en("Seq");return++r>t.maxDepth?sr(i):e[fd]?`${i+Sn}{${e._iter||e._object?xn(e.entries(),t,n,r,o,s):$a}}`:`${i+Sn}[${e._iter||e._array||e._collection||e._iterable?Do(e.values(),t,n,r,o,s):$a}]`}function Lo(e,t,n,r,o,s,i){return++r>t.maxDepth?sr(en(i)):`${en(i)+Sn}[${Do(e.values(),t,n,r,o,s)}]`}var xd=(e,t,n,r,o,s)=>e[hd]?yd(e,t,n,r,o,s,e[Aa]?"OrderedMap":"Map"):e[ud]?Lo(e,t,n,r,o,s,"List"):e[md]?Lo(e,t,n,r,o,s,e[Aa]?"OrderedSet":"Set"):e[gd]?Lo(e,t,n,r,o,s,"Stack"):e[pd]?Sd(e,t,n,r,o,s):wd(e,t,n,r,o,s),Td=e=>e&&(e[ld]===!0||e[dd]===!0),vd={serialize:xd,test:Td};function Ya(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var er={exports:{}},ce={};var ka;function Ed(){if(ka)return ce;ka=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),i=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),d=Symbol.for("react.view_transition"),h=Symbol.for("react.client.reference");function m(p){if(typeof p=="object"&&p!==null){var b=p.$$typeof;switch(b){case e:switch(p=p.type,p){case n:case o:case r:case c:case l:case d:return p;default:switch(p=p&&p.$$typeof,p){case i:case a:case f:case u:return p;case s:return p;default:return b}}case t:return b}}}return ce.ContextConsumer=s,ce.ContextProvider=i,ce.Element=e,ce.ForwardRef=a,ce.Fragment=n,ce.Lazy=f,ce.Memo=u,ce.Portal=t,ce.Profiler=o,ce.StrictMode=r,ce.Suspense=c,ce.SuspenseList=l,ce.isContextConsumer=function(p){return m(p)===s},ce.isContextProvider=function(p){return m(p)===i},ce.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===e},ce.isForwardRef=function(p){return m(p)===a},ce.isFragment=function(p){return m(p)===n},ce.isLazy=function(p){return m(p)===f},ce.isMemo=function(p){return m(p)===u},ce.isPortal=function(p){return m(p)===t},ce.isProfiler=function(p){return m(p)===o},ce.isStrictMode=function(p){return m(p)===r},ce.isSuspense=function(p){return m(p)===c},ce.isSuspenseList=function(p){return m(p)===l},ce.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===n||p===o||p===r||p===c||p===l||typeof p=="object"&&p!==null&&(p.$$typeof===f||p.$$typeof===u||p.$$typeof===i||p.$$typeof===s||p.$$typeof===a||p.$$typeof===h||p.getModuleId!==void 0)},ce.typeOf=m,ce}var le={};var Ma;function Cd(){return Ma||(Ma=1,process.env.NODE_ENV!=="production"&&(function(){function e(p){if(typeof p=="object"&&p!==null){var b=p.$$typeof;switch(b){case t:switch(p=p.type,p){case r:case s:case o:case l:case u:case h:return p;default:switch(p=p&&p.$$typeof,p){case a:case c:case d:case f:return p;case i:return p;default:return b}}case n:return b}}}var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),m=Symbol.for("react.client.reference");le.ContextConsumer=i,le.ContextProvider=a,le.Element=t,le.ForwardRef=c,le.Fragment=r,le.Lazy=d,le.Memo=f,le.Portal=n,le.Profiler=s,le.StrictMode=o,le.Suspense=l,le.SuspenseList=u,le.isContextConsumer=function(p){return e(p)===i},le.isContextProvider=function(p){return e(p)===a},le.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===t},le.isForwardRef=function(p){return e(p)===c},le.isFragment=function(p){return e(p)===r},le.isLazy=function(p){return e(p)===d},le.isMemo=function(p){return e(p)===f},le.isPortal=function(p){return e(p)===n},le.isProfiler=function(p){return e(p)===s},le.isStrictMode=function(p){return e(p)===o},le.isSuspense=function(p){return e(p)===l},le.isSuspenseList=function(p){return e(p)===u},le.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===r||p===s||p===o||p===l||p===u||typeof p=="object"&&p!==null&&(p.$$typeof===d||p.$$typeof===f||p.$$typeof===a||p.$$typeof===i||p.$$typeof===c||p.$$typeof===m||p.getModuleId!==void 0)},le.typeOf=e})()),le}var Pa;function _d(){return Pa||(Pa=1,process.env.NODE_ENV==="production"?er.exports=Ed():er.exports=Cd()),er.exports}var Ha=_d(),Id=Ya(Ha),Od=Wa({__proto__:null,default:Id},[Ha]),tr={exports:{}},se={};var Na;function Ad(){if(Na)return se;Na=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),i=Symbol.for("react.context"),a=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),m;m=Symbol.for("react.module.reference");function p(b){if(typeof b=="object"&&b!==null){var S=b.$$typeof;switch(S){case e:switch(b=b.type,b){case n:case o:case r:case l:case u:return b;default:switch(b=b&&b.$$typeof,b){case a:case i:case c:case d:case f:case s:return b;default:return S}}case t:return S}}}return se.ContextConsumer=i,se.ContextProvider=s,se.Element=e,se.ForwardRef=c,se.Fragment=n,se.Lazy=d,se.Memo=f,se.Portal=t,se.Profiler=o,se.StrictMode=r,se.Suspense=l,se.SuspenseList=u,se.isAsyncMode=function(){return!1},se.isConcurrentMode=function(){return!1},se.isContextConsumer=function(b){return p(b)===i},se.isContextProvider=function(b){return p(b)===s},se.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},se.isForwardRef=function(b){return p(b)===c},se.isFragment=function(b){return p(b)===n},se.isLazy=function(b){return p(b)===d},se.isMemo=function(b){return p(b)===f},se.isPortal=function(b){return p(b)===t},se.isProfiler=function(b){return p(b)===o},se.isStrictMode=function(b){return p(b)===r},se.isSuspense=function(b){return p(b)===l},se.isSuspenseList=function(b){return p(b)===u},se.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===n||b===o||b===r||b===l||b===u||b===h||typeof b=="object"&&b!==null&&(b.$$typeof===d||b.$$typeof===f||b.$$typeof===s||b.$$typeof===i||b.$$typeof===c||b.$$typeof===m||b.getModuleId!==void 0)},se.typeOf=p,se}var ie={};var Ra;function $d(){return Ra||(Ra=1,process.env.NODE_ENV!=="production"&&(function(){var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),i=Symbol.for("react.context"),a=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),m=!1,p=!1,b=!1,S=!1,E=!1,I;I=Symbol.for("react.module.reference");function A(B){return!!(typeof B=="string"||typeof B=="function"||B===n||B===o||E||B===r||B===l||B===u||S||B===h||m||p||b||typeof B=="object"&&B!==null&&(B.$$typeof===d||B.$$typeof===f||B.$$typeof===s||B.$$typeof===i||B.$$typeof===c||B.$$typeof===I||B.getModuleId!==void 0))}function $(B){if(typeof B=="object"&&B!==null){var T=B.$$typeof;switch(T){case e:var _=B.type;switch(_){case n:case o:case r:case l:case u:return _;default:var M=_&&_.$$typeof;switch(M){case a:case i:case c:case d:case f:case s:return M;default:return T}}case t:return T}}}var R=i,k=s,O=e,P=c,U=n,C=d,z=f,oe=t,V=o,Y=r,N=l,X=u,F=!1,fe=!1;function Ce(B){return F||(F=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function Ue(B){return fe||(fe=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function Ae(B){return $(B)===i}function Me(B){return $(B)===s}function Qe(B){return typeof B=="object"&&B!==null&&B.$$typeof===e}function Be(B){return $(B)===c}function Pe(B){return $(B)===n}function Ne(B){return $(B)===d}function xt(B){return $(B)===f}function Xe(B){return $(B)===t}function Ft(B){return $(B)===o}function _e(B){return $(B)===r}function et(B){return $(B)===l}function Yn(B){return $(B)===u}ie.ContextConsumer=R,ie.ContextProvider=k,ie.Element=O,ie.ForwardRef=P,ie.Fragment=U,ie.Lazy=C,ie.Memo=z,ie.Portal=oe,ie.Profiler=V,ie.StrictMode=Y,ie.Suspense=N,ie.SuspenseList=X,ie.isAsyncMode=Ce,ie.isConcurrentMode=Ue,ie.isContextConsumer=Ae,ie.isContextProvider=Me,ie.isElement=Qe,ie.isForwardRef=Be,ie.isFragment=Pe,ie.isLazy=Ne,ie.isMemo=xt,ie.isPortal=Xe,ie.isProfiler=Ft,ie.isStrictMode=_e,ie.isSuspense=et,ie.isSuspenseList=Yn,ie.isValidElementType=A,ie.typeOf=$})()),ie}var ja;function kd(){return ja||(ja=1,process.env.NODE_ENV==="production"?tr.exports=Ad():tr.exports=$d()),tr.exports}var Za=kd(),Md=Ya(Za),Pd=Wa({__proto__:null,default:Md},[Za]),Nd=["isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isPortal","isProfiler","isStrictMode","isSuspense","isSuspenseList","isValidElementType"],Lt=Object.fromEntries(Nd.map(e=>[e,t=>Pd[e](t)||Od[e](t)]));function Qa(e,t=[]){if(Array.isArray(e))for(let n of e)Qa(n,t);else e!=null&&e!==!1&&e!==""&&t.push(e);return t}function Fa(e){let t=e.type;if(typeof t=="string")return t;if(typeof t=="function")return t.displayName||t.name||"Unknown";if(Lt.isFragment(e))return"React.Fragment";if(Lt.isSuspense(e))return"React.Suspense";if(typeof t=="object"&&t!==null){if(Lt.isContextProvider(e))return"Context.Provider";if(Lt.isContextConsumer(e))return"Context.Consumer";if(Lt.isForwardRef(e)){if(t.displayName)return t.displayName;let n=t.render.displayName||t.render.name||"";return n===""?"ForwardRef":`ForwardRef(${n})`}if(Lt.isMemo(e)){let n=t.displayName||t.type.displayName||t.type.name||"";return n===""?"Memo":`Memo(${n})`}}return"UNDEFINED"}function Rd(e){let{props:t}=e;return Object.keys(t).filter(n=>n!=="children"&&t[n]!==void 0).sort()}var jd=(e,t,n,r,o,s)=>++r>t.maxDepth?Uo(Fa(e),t):Wo(Fa(e),qo(Rd(e),e.props,t,n+t.indent,r,o,s),zo(Qa(e.props.children),t,n+t.indent,r,o,s),t,n),Fd=e=>e!=null&&Lt.isElement(e),Ld={serialize:jd,test:Fd},Dd=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.test.json"):245830487;function Bd(e){let{props:t}=e;return t?Object.keys(t).filter(n=>t[n]!==void 0).sort():[]}var qd=(e,t,n,r,o,s)=>++r>t.maxDepth?Uo(e.type,t):Wo(e.type,e.props?qo(Bd(e),e.props,t,n+t.indent,r,o,s):"",e.children?zo(e.children,t,n+t.indent,r,o,s):"",t,n),zd=e=>e&&e.$$typeof===Dd,Wd={serialize:qd,test:zd},ec=Object.prototype.toString,Ud=Date.prototype.toISOString,Jd=Error.prototype.toString,La=RegExp.prototype.toString;function nr(e){return typeof e.constructor=="function"&&e.constructor.name||"Object"}function Vd(e){return typeof window!="undefined"&&e===window}var Kd=/^Symbol\((.*)\)(.*)$/,Xd=/\n/g,or=class extends Error{constructor(t,n){super(t),this.stack=n,this.name=this.constructor.name}};function Gd(e){return e==="[object Array]"||e==="[object ArrayBuffer]"||e==="[object DataView]"||e==="[object Float32Array]"||e==="[object Float64Array]"||e==="[object Int8Array]"||e==="[object Int16Array]"||e==="[object Int32Array]"||e==="[object Uint8Array]"||e==="[object Uint8ClampedArray]"||e==="[object Uint16Array]"||e==="[object Uint32Array]"}function Yd(e){return Object.is(e,-0)?"-0":String(e)}function Hd(e){return`${e}n`}function Da(e,t){return t?`[Function ${e.name||"anonymous"}]`:"[Function]"}function Ba(e){return String(e).replace(Kd,"Symbol($1)")}function qa(e){return`[${Jd.call(e)}]`}function tc(e,t,n,r){if(e===!0||e===!1)return`${e}`;if(e===void 0)return"undefined";if(e===null)return"null";let o=typeof e;if(o==="number")return Yd(e);if(o==="bigint")return Hd(e);if(o==="string")return r?`"${e.replaceAll(/"|\\/g,"\\$&")}"`:`"${e}"`;if(o==="function")return Da(e,t);if(o==="symbol")return Ba(e);let s=ec.call(e);return s==="[object WeakMap]"?"WeakMap {}":s==="[object WeakSet]"?"WeakSet {}":s==="[object Function]"||s==="[object GeneratorFunction]"?Da(e,t):s==="[object Symbol]"?Ba(e):s==="[object Date]"?Number.isNaN(+e)?"Date { NaN }":Ud.call(e):s==="[object Error]"?qa(e):s==="[object RegExp]"?n?La.call(e).replaceAll(/[$()*+.?[\\\]^{|}]/g,"\\$&"