@absolutejs/absolute 0.20.0-beta.143 → 0.20.0-beta.145
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/changelog.json +40 -0
- package/dist/angular/browser.js.map +2 -2
- package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/angular/index.js +2 -2
- package/dist/angular/index.js.map +10 -10
- package/dist/angular/server.js +2 -2
- package/dist/angular/server.js.map +9 -9
- package/dist/build.js +49 -45
- package/dist/build.js.map +49 -49
- package/dist/cli/{buildDepVendor-e2zz9x78.js → buildDepVendor-g49s8rr1.js} +1 -1
- package/dist/cli/{compile-grhs9tj4.js → compile-351tb63a.js} +2 -2
- package/dist/cli/config/server.js +1 -1
- package/dist/cli/{dev-e4w5nq6y.js → dev-4qz8gk8x.js} +4 -4
- package/dist/cli/{expoProject-kabqa80q.js → expoProject-f3eb0040.js} +1 -1
- package/dist/cli/fmt-819g837b.js +20 -0
- package/dist/cli/{index-cc8eay5y.js → index-1ksy2h3r.js} +4 -4
- package/dist/cli/{index-6vpdsqa1.js → index-3ff5ztt3.js} +5 -1
- package/dist/cli/{index-h078vn9f.js → index-8s6w45zc.js} +1 -1
- package/dist/cli/{index-fezxjrgd.js → index-ezz88cdw.js} +1 -1
- package/dist/cli/{index-nrtt3x67.js → index-snz4z0tq.js} +21 -21
- package/dist/cli/index.js +13 -8
- package/dist/cli/{mobile-p657bkqa.js → mobile-dvahvjeh.js} +3 -3
- package/dist/cli/{patchedBun-541bbnee.js → patchedBun-r3ykvvwz.js} +1 -1
- package/dist/cli/{start-3m7bd02e.js → start-09prwq60.js} +3 -3
- package/dist/client/chunks/{islands-eexr591d.js → islands-rc28k5sx.js} +7 -7
- package/dist/client/chunks/{islands-eexr591d.js.map → islands-rc28k5sx.js.map} +3 -3
- package/dist/client/index.js +2 -2
- package/dist/client/index.js.map +3 -3
- package/dist/dev/client/handlers/angularHmrShim.ts +1 -2
- package/dist/dev/serverBootstrap.js +6 -2
- package/dist/index.js +49 -45
- package/dist/index.js.map +51 -51
- package/dist/islands/browser.js.map +2 -2
- package/dist/islands/index.js.map +5 -5
- package/dist/mobile/browser.js +1 -1
- package/dist/mobile/browser.js.map +4 -4
- package/dist/mobile/index.js +25 -25
- package/dist/mobile/index.js.map +16 -16
- package/dist/mobile/remoteMacAgentEntry.js +2 -2
- package/dist/react/browser.js.map +2 -2
- package/dist/react/components/index.js.map +3 -3
- package/dist/react/hooks/index.js.map +2 -2
- package/dist/react/index.js +2 -2
- package/dist/react/index.js.map +9 -9
- package/dist/react/server.js +2 -2
- package/dist/react/server.js.map +5 -5
- package/dist/src/cli/patchedBun.d.ts +5 -4
- package/dist/src/cli/scripts/fmt.d.ts +1 -0
- package/dist/src/core/prepare.d.ts +256 -1063
- package/dist/src/mobile/nativePackages.d.ts +1 -1
- package/dist/src/plugins/hmr.d.ts +4 -1
- package/dist/svelte/browser.js.map +2 -2
- package/dist/svelte/index.js +2 -2
- package/dist/svelte/index.js.map +10 -10
- package/dist/svelte/server.js +2 -2
- package/dist/svelte/server.js.map +8 -8
- package/dist/types/globals.d.ts +9 -18
- package/dist/types/svelteRouter.ts +1 -2
- package/dist/vue/browser.js.map +2 -2
- package/dist/vue/index.js +2 -2
- package/dist/vue/index.js.map +10 -10
- package/dist/vue/server.js +2 -2
- package/dist/vue/server.js.map +6 -6
- package/package.json +15 -15
- /package/dist/cli/{add-a33ashpx.js → add-kwyqxccz.js} +0 -0
- /package/dist/cli/{doctor-f13ntk9a.js → doctor-4nv2c2j3.js} +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
var _vt=Object.create;var{getPrototypeOf:fvt,defineProperty:JMe,getOwnPropertyNames:pvt}=Object;var UMe=Object.prototype.hasOwnProperty;function dvt(v){return this[v]}var mvt,gvt,hvt=(v,P,M)=>{var z=v!=null&&typeof v==="object";if(z){var ce=P?mvt??=new WeakMap:gvt??=new WeakMap,ve=ce.get(v);if(ve)return ve}M=v!=null?_vt(fvt(v)):{};let qe=P||!v||!v.__esModule||!UMe.call(v,"default")?JMe(M,"default",{value:v,enumerable:!0}):M;if(v&&typeof v==="object"||typeof v==="function"){for(let at of pvt(v))if(!UMe.call(qe,at))JMe(qe,at,{get:dvt.bind(v,at),enumerable:!0})}if(z)ce.set(v,qe);return qe};var W0=(v,P)=>()=>(P||v((P={exports:{}}).exports,P),P.exports);var IT=import.meta.require;var wLe=W0(function(Y1t){var ELe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Y1t.encode=function(v){if(0<=v&&v<ELe.length)return ELe[v];throw TypeError("Must be between 0 and 63: "+v)};Y1t.decode=function(v){var P=65,M=90,z=97,ce=122,ve=48,qe=57,at=43,yt=47,cr=26,vr=52;if(P<=v&&v<=M)return v-P;if(z<=v&&v<=ce)return v-z+cr;if(ve<=v&&v<=qe)return v-ve+vr;if(v==at)return 62;if(v==yt)return 63;return-1}});var m0e=W0(function(nbt){var ALe=wLe(),d0e=5,PLe=1<<d0e,DLe=PLe-1,ILe=PLe;function tbt(v){return v<0?(-v<<1)+1:(v<<1)+0}function rbt(v){var P=(v&1)===1,M=v>>1;return P?-M:M}nbt.encode=function(P){var M="",z,ce=tbt(P);do{if(z=ce&DLe,ce>>>=d0e,ce>0)z|=ILe;M+=ALe.encode(z)}while(ce>0);return M};nbt.decode=function(P,M,z){var ce=P.length,ve=0,qe=0,at,yt;do{if(M>=ce)throw Error("Expected more digits in base 64 VLQ value.");if(yt=ALe.decode(P.charCodeAt(M++)),yt===-1)throw Error("Invalid base64 digit: "+P.charAt(M-1));at=!!(yt&ILe),yt&=DLe,ve=ve+(yt<<qe),qe+=d0e}while(at);z.value=rbt(ve),z.rest=M}});var P7=W0(function(LLe){function abt(v,P,M){if(P in v)return v[P];else if(arguments.length===3)return M;else throw Error('"'+P+'" is a required argument.')}LLe.getArg=abt;var NLe=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,obt=/^data:.+\,.+$/;function mB(v){var P=v.match(NLe);if(!P)return null;return{scheme:P[1],auth:P[2],host:P[3],port:P[4],path:P[5]}}LLe.urlParse=mB;function w7(v){var P="";if(v.scheme)P+=v.scheme+":";if(P+="//",v.auth)P+=v.auth+"@";if(v.host)P+=v.host;if(v.port)P+=":"+v.port;if(v.path)P+=v.path;return P}LLe.urlGenerate=w7;function g0e(v){var P=v,M=mB(v);if(M){if(!M.path)return v;P=M.path}var z=LLe.isAbsolute(P),ce=P.split(/\/+/);for(var ve,qe=0,at=ce.length-1;at>=0;at--)if(ve=ce[at],ve===".")ce.splice(at,1);else if(ve==="..")qe++;else if(qe>0)if(ve==="")ce.splice(at+1,qe),qe=0;else ce.splice(at,2),qe--;if(P=ce.join("/"),P==="")P=z?"/":".";if(M)return M.path=P,w7(M);return P}LLe.normalize=g0e;function OLe(v,P){if(v==="")v=".";if(P==="")P=".";var M=mB(P),z=mB(v);if(z)v=z.path||"/";if(M&&!M.scheme){if(z)M.scheme=z.scheme;return w7(M)}if(M||P.match(obt))return P;if(z&&!z.host&&!z.path)return z.host=P,w7(z);var ce=P.charAt(0)==="/"?P:g0e(v.replace(/\/+$/,"")+"/"+P);if(z)return z.path=ce,w7(z);return ce}LLe.join=OLe;LLe.isAbsolute=function(v){return v.charAt(0)==="/"||NLe.test(v)};function cbt(v,P){if(v==="")v=".";v=v.replace(/\/$/,"");var M=0;while(P.indexOf(v+"/")!==0){var z=v.lastIndexOf("/");if(z<0)return P;if(v=v.slice(0,z),v.match(/^([^\/]+:\/)?\/*$/))return P;++M}return Array(M+1).join("../")+P.substr(v.length+1)}LLe.relative=cbt;var FLe=function(){var v=Object.create(null);return!("__proto__"in v)}();function RLe(v){return v}function lbt(v){if(MLe(v))return"$"+v;return v}LLe.toSetString=FLe?RLe:lbt;function ubt(v){if(MLe(v))return v.slice(1);return v}LLe.fromSetString=FLe?RLe:ubt;function MLe(v){if(!v)return!1;var P=v.length;if(P<9)return!1;if(v.charCodeAt(P-1)!==95||v.charCodeAt(P-2)!==95||v.charCodeAt(P-3)!==111||v.charCodeAt(P-4)!==116||v.charCodeAt(P-5)!==111||v.charCodeAt(P-6)!==114||v.charCodeAt(P-7)!==112||v.charCodeAt(P-8)!==95||v.charCodeAt(P-9)!==95)return!1;for(var M=P-10;M>=0;M--)if(v.charCodeAt(M)!==36)return!1;return!0}function _bt(v,P,M){var z=A7(v.source,P.source);if(z!==0)return z;if(z=v.originalLine-P.originalLine,z!==0)return z;if(z=v.originalColumn-P.originalColumn,z!==0||M)return z;if(z=v.generatedColumn-P.generatedColumn,z!==0)return z;if(z=v.generatedLine-P.generatedLine,z!==0)return z;return A7(v.name,P.name)}LLe.compareByOriginalPositions=_bt;function fbt(v,P,M){var z=v.generatedLine-P.generatedLine;if(z!==0)return z;if(z=v.generatedColumn-P.generatedColumn,z!==0||M)return z;if(z=A7(v.source,P.source),z!==0)return z;if(z=v.originalLine-P.originalLine,z!==0)return z;if(z=v.originalColumn-P.originalColumn,z!==0)return z;return A7(v.name,P.name)}LLe.compareByGeneratedPositionsDeflated=fbt;function A7(v,P){if(v===P)return 0;if(v===null)return 1;if(P===null)return-1;if(v>P)return 1;return-1}function pbt(v,P){var M=v.generatedLine-P.generatedLine;if(M!==0)return M;if(M=v.generatedColumn-P.generatedColumn,M!==0)return M;if(M=A7(v.source,P.source),M!==0)return M;if(M=v.originalLine-P.originalLine,M!==0)return M;if(M=v.originalColumn-P.originalColumn,M!==0)return M;return A7(v.name,P.name)}LLe.compareByGeneratedPositionsInflated=pbt;function dbt(v){return JSON.parse(v.replace(/^\)]}'[^\n]*\n/,""))}LLe.parseSourceMapInput=dbt;function mbt(v,P,M){if(P=P||"",v){if(v[v.length-1]!=="/"&&P[0]!=="/")v+="/";P=v+P}if(M){var z=mB(M);if(!z)throw Error("sourceMapURL could not be parsed");if(z.path){var ce=z.path.lastIndexOf("/");if(ce>=0)z.path=z.path.substring(0,ce+1)}P=OLe(w7(z),P)}return g0e(P)}LLe.computeSourceURL=mbt});var v0e=W0(function(Dbt){var h0e=P7(),y0e=Object.prototype.hasOwnProperty,YN=typeof Map<"u";function dE(){this._array=[],this._set=YN?new Map:Object.create(null)}dE.fromArray=function(P,M){var z=new dE;for(var ce=0,ve=P.length;ce<ve;ce++)z.add(P[ce],M);return z};dE.prototype.size=function(){return YN?this._set.size:Object.getOwnPropertyNames(this._set).length};dE.prototype.add=function(P,M){var z=YN?P:h0e.toSetString(P),ce=YN?this.has(P):y0e.call(this._set,z),ve=this._array.length;if(!ce||M)this._array.push(P);if(!ce)if(YN)this._set.set(P,ve);else this._set[z]=ve};dE.prototype.has=function(P){if(YN)return this._set.has(P);else{var M=h0e.toSetString(P);return y0e.call(this._set,M)}};dE.prototype.indexOf=function(P){if(YN){var M=this._set.get(P);if(M>=0)return M}else{var z=h0e.toSetString(P);if(y0e.call(this._set,z))return this._set[z]}throw Error('"'+P+'" is not in the set.')};dE.prototype.at=function(P){if(P>=0&&P<this._array.length)return this._array[P];throw Error("No element indexed by "+P)};dE.prototype.toArray=function(){return this._array.slice()};Dbt.ArraySet=dE});var BLe=W0(function(Obt){var jLe=P7();function Nbt(v,P){var M=v.generatedLine,z=P.generatedLine,ce=v.generatedColumn,ve=P.generatedColumn;return z>M||z==M&&ve>=ce||jLe.compareByGeneratedPositionsInflated(v,P)<=0}function fY(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}fY.prototype.unsortedForEach=function(P,M){this._array.forEach(P,M)};fY.prototype.add=function(P){if(Nbt(this._last,P))this._last=P,this._array.push(P);else this._sorted=!1,this._array.push(P)};fY.prototype.toArray=function(){if(!this._sorted)this._array.sort(jLe.compareByGeneratedPositionsInflated),this._sorted=!0;return this._array};Obt.MappingList=fY});var b0e=W0(function(Mbt){var gB=m0e(),Qd=P7(),pY=v0e().ArraySet,Rbt=BLe().MappingList;function tS(v){if(!v)v={};this._file=Qd.getArg(v,"file",null),this._sourceRoot=Qd.getArg(v,"sourceRoot",null),this._skipValidation=Qd.getArg(v,"skipValidation",!1),this._sources=new pY,this._names=new pY,this._mappings=new Rbt,this._sourcesContents=null}tS.prototype._version=3;tS.fromSourceMap=function(P){var M=P.sourceRoot,z=new tS({file:P.file,sourceRoot:M});return P.eachMapping(function(ce){var ve={generated:{line:ce.generatedLine,column:ce.generatedColumn}};if(ce.source!=null){if(ve.source=ce.source,M!=null)ve.source=Qd.relative(M,ve.source);if(ve.original={line:ce.originalLine,column:ce.originalColumn},ce.name!=null)ve.name=ce.name}z.addMapping(ve)}),P.sources.forEach(function(ce){var ve=ce;if(M!==null)ve=Qd.relative(M,ce);if(!z._sources.has(ve))z._sources.add(ve);var qe=P.sourceContentFor(ce);if(qe!=null)z.setSourceContent(ce,qe)}),z};tS.prototype.addMapping=function(P){var M=Qd.getArg(P,"generated"),z=Qd.getArg(P,"original",null),ce=Qd.getArg(P,"source",null),ve=Qd.getArg(P,"name",null);if(!this._skipValidation)this._validateMapping(M,z,ce,ve);if(ce!=null){if(ce=String(ce),!this._sources.has(ce))this._sources.add(ce)}if(ve!=null){if(ve=String(ve),!this._names.has(ve))this._names.add(ve)}this._mappings.add({generatedLine:M.line,generatedColumn:M.column,originalLine:z!=null&&z.line,originalColumn:z!=null&&z.column,source:ce,name:ve})};tS.prototype.setSourceContent=function(P,M){var z=P;if(this._sourceRoot!=null)z=Qd.relative(this._sourceRoot,z);if(M!=null){if(!this._sourcesContents)this._sourcesContents=Object.create(null);this._sourcesContents[Qd.toSetString(z)]=M}else if(this._sourcesContents){if(delete this._sourcesContents[Qd.toSetString(z)],Object.keys(this._sourcesContents).length===0)this._sourcesContents=null}};tS.prototype.applySourceMap=function(P,M,z){var ce=M;if(M==null){if(P.file==null)throw Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);ce=P.file}var ve=this._sourceRoot;if(ve!=null)ce=Qd.relative(ve,ce);var qe=new pY,at=new pY;this._mappings.unsortedForEach(function(yt){if(yt.source===ce&&yt.originalLine!=null){var cr=P.originalPositionFor({line:yt.originalLine,column:yt.originalColumn});if(cr.source!=null){if(yt.source=cr.source,z!=null)yt.source=Qd.join(z,yt.source);if(ve!=null)yt.source=Qd.relative(ve,yt.source);if(yt.originalLine=cr.line,yt.originalColumn=cr.column,cr.name!=null)yt.name=cr.name}}var vr=yt.source;if(vr!=null&&!qe.has(vr))qe.add(vr);var Dr=yt.name;if(Dr!=null&&!at.has(Dr))at.add(Dr)},this),this._sources=qe,this._names=at,P.sources.forEach(function(yt){var cr=P.sourceContentFor(yt);if(cr!=null){if(z!=null)yt=Qd.join(z,yt);if(ve!=null)yt=Qd.relative(ve,yt);this.setSourceContent(yt,cr)}},this)};tS.prototype._validateMapping=function(P,M,z,ce){if(M&&typeof M.line!=="number"&&typeof M.column!=="number")throw Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(P&&"line"in P&&"column"in P&&P.line>0&&P.column>=0&&!M&&!z&&!ce)return;else if(P&&"line"in P&&"column"in P&&M&&"line"in M&&"column"in M&&P.line>0&&P.column>=0&&M.line>0&&M.column>=0&&z)return;else throw Error("Invalid mapping: "+JSON.stringify({generated:P,source:z,original:M,name:ce}))};tS.prototype._serializeMappings=function(){var P=0,M=1,z=0,ce=0,ve=0,qe=0,at="",yt,cr,vr,Dr,xe=this._mappings.toArray();for(var Hn=0,Nt=xe.length;Hn<Nt;Hn++){if(cr=xe[Hn],yt="",cr.generatedLine!==M){P=0;while(cr.generatedLine!==M)yt+=";",M++}else if(Hn>0){if(!Qd.compareByGeneratedPositionsInflated(cr,xe[Hn-1]))continue;yt+=","}if(yt+=gB.encode(cr.generatedColumn-P),P=cr.generatedColumn,cr.source!=null){if(Dr=this._sources.indexOf(cr.source),yt+=gB.encode(Dr-qe),qe=Dr,yt+=gB.encode(cr.originalLine-1-ce),ce=cr.originalLine-1,yt+=gB.encode(cr.originalColumn-z),z=cr.originalColumn,cr.name!=null)vr=this._names.indexOf(cr.name),yt+=gB.encode(vr-ve),ve=vr}at+=yt}return at};tS.prototype._generateSourcesContent=function(P,M){return P.map(function(z){if(!this._sourcesContents)return null;if(M!=null)z=Qd.relative(M,z);var ce=Qd.toSetString(z);return Object.prototype.hasOwnProperty.call(this._sourcesContents,ce)?this._sourcesContents[ce]:null},this)};tS.prototype.toJSON=function(){var P={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};if(this._file!=null)P.file=this._file;if(this._sourceRoot!=null)P.sourceRoot=this._sourceRoot;if(this._sourcesContents)P.sourcesContent=this._generateSourcesContent(P.sources,P.sourceRoot);return P};tS.prototype.toString=function(){return JSON.stringify(this.toJSON())};Mbt.SourceMapGenerator=tS});var ULe=W0(function(jbt){jbt.GREATEST_LOWER_BOUND=1;jbt.LEAST_UPPER_BOUND=2;function S0e(v,P,M,z,ce,ve){var qe=Math.floor((P-v)/2)+v,at=ce(M,z[qe],!0);if(at===0)return qe;else if(at>0){if(P-qe>1)return S0e(qe,P,M,z,ce,ve);if(ve==jbt.LEAST_UPPER_BOUND)return P<z.length?P:-1;else return qe}else{if(qe-v>1)return S0e(v,qe,M,z,ce,ve);if(ve==jbt.LEAST_UPPER_BOUND)return qe;else return v<0?-1:v}}jbt.search=function(P,M,z,ce){if(M.length===0)return-1;var ve=S0e(-1,M.length,P,M,z,ce||jbt.GREATEST_LOWER_BOUND);if(ve<0)return-1;while(ve-1>=0){if(z(M[ve],M[ve-1],!0)!==0)break;--ve}return ve}});var zLe=W0(function(Ubt){function x0e(v,P,M){var z=v[P];v[P]=v[M],v[M]=z}function Jbt(v,P){return Math.round(v+Math.random()*(P-v))}function k0e(v,P,M,z){if(M<z){var ce=Jbt(M,z),ve=M-1;x0e(v,ce,z);var qe=v[z];for(var at=M;at<z;at++)if(P(v[at],qe)<=0)ve+=1,x0e(v,ve,at);x0e(v,ve+1,at);var yt=ve+1;k0e(v,P,M,yt-1),k0e(v,P,yt+1,z)}}Ubt.quickSort=function(v,P){k0e(v,P,0,v.length-1)}});var VLe=W0(function(Vbt){var eo=P7(),C0e=ULe(),D7=v0e().ArraySet,Wbt=m0e(),hB=zLe().quickSort;function Gf(v,P){var M=v;if(typeof v==="string")M=eo.parseSourceMapInput(v);return M.sections!=null?new OT(M,P):new eh(M,P)}Gf.fromSourceMap=function(v,P){return eh.fromSourceMap(v,P)};Gf.prototype._version=3;Gf.prototype.__generatedMappings=null;Object.defineProperty(Gf.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){if(!this.__generatedMappings)this._parseMappings(this._mappings,this.sourceRoot);return this.__generatedMappings}});Gf.prototype.__originalMappings=null;Object.defineProperty(Gf.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){if(!this.__originalMappings)this._parseMappings(this._mappings,this.sourceRoot);return this.__originalMappings}});Gf.prototype._charIsMappingSeparator=function(P,M){var z=P.charAt(M);return z===";"||z===","};Gf.prototype._parseMappings=function(P,M){throw Error("Subclasses must implement _parseMappings")};Gf.GENERATED_ORDER=1;Gf.ORIGINAL_ORDER=2;Gf.GREATEST_LOWER_BOUND=1;Gf.LEAST_UPPER_BOUND=2;Gf.prototype.eachMapping=function(P,M,z){var ce=M||null,ve=z||Gf.GENERATED_ORDER,qe;switch(ve){case Gf.GENERATED_ORDER:qe=this._generatedMappings;break;case Gf.ORIGINAL_ORDER:qe=this._originalMappings;break;default:throw Error("Unknown order of iteration.")}var at=this.sourceRoot;qe.map(function(yt){var cr=yt.source===null?null:this._sources.at(yt.source);return cr=eo.computeSourceURL(at,cr,this._sourceMapURL),{source:cr,generatedLine:yt.generatedLine,generatedColumn:yt.generatedColumn,originalLine:yt.originalLine,originalColumn:yt.originalColumn,name:yt.name===null?null:this._names.at(yt.name)}},this).forEach(P,ce)};Gf.prototype.allGeneratedPositionsFor=function(P){var M=eo.getArg(P,"line"),z={source:eo.getArg(P,"source"),originalLine:M,originalColumn:eo.getArg(P,"column",0)};if(z.source=this._findSourceIndex(z.source),z.source<0)return[];var ce=[],ve=this._findMapping(z,this._originalMappings,"originalLine","originalColumn",eo.compareByOriginalPositions,C0e.LEAST_UPPER_BOUND);if(ve>=0){var qe=this._originalMappings[ve];if(P.column===void 0){var at=qe.originalLine;while(qe&&qe.originalLine===at)ce.push({line:eo.getArg(qe,"generatedLine",null),column:eo.getArg(qe,"generatedColumn",null),lastColumn:eo.getArg(qe,"lastGeneratedColumn",null)}),qe=this._originalMappings[++ve]}else{var yt=qe.originalColumn;while(qe&&qe.originalLine===M&&qe.originalColumn==yt)ce.push({line:eo.getArg(qe,"generatedLine",null),column:eo.getArg(qe,"generatedColumn",null),lastColumn:eo.getArg(qe,"lastGeneratedColumn",null)}),qe=this._originalMappings[++ve]}}return ce};Vbt.SourceMapConsumer=Gf;function eh(v,P){var M=v;if(typeof v==="string")M=eo.parseSourceMapInput(v);var z=eo.getArg(M,"version"),ce=eo.getArg(M,"sources"),ve=eo.getArg(M,"names",[]),qe=eo.getArg(M,"sourceRoot",null),at=eo.getArg(M,"sourcesContent",null),yt=eo.getArg(M,"mappings"),cr=eo.getArg(M,"file",null);if(z!=this._version)throw Error("Unsupported version: "+z);if(qe)qe=eo.normalize(qe);ce=ce.map(String).map(eo.normalize).map(function(vr){return qe&&eo.isAbsolute(qe)&&eo.isAbsolute(vr)?eo.relative(qe,vr):vr}),this._names=D7.fromArray(ve.map(String),!0),this._sources=D7.fromArray(ce,!0),this._absoluteSources=this._sources.toArray().map(function(vr){return eo.computeSourceURL(qe,vr,P)}),this.sourceRoot=qe,this.sourcesContent=at,this._mappings=yt,this._sourceMapURL=P,this.file=cr}eh.prototype=Object.create(Gf.prototype);eh.prototype.consumer=Gf;eh.prototype._findSourceIndex=function(v){var P=v;if(this.sourceRoot!=null)P=eo.relative(this.sourceRoot,P);if(this._sources.has(P))return this._sources.indexOf(P);var M;for(M=0;M<this._absoluteSources.length;++M)if(this._absoluteSources[M]==v)return M;return-1};eh.fromSourceMap=function(P,M){var z=Object.create(eh.prototype),ce=z._names=D7.fromArray(P._names.toArray(),!0),ve=z._sources=D7.fromArray(P._sources.toArray(),!0);z.sourceRoot=P._sourceRoot,z.sourcesContent=P._generateSourcesContent(z._sources.toArray(),z.sourceRoot),z.file=P._file,z._sourceMapURL=M,z._absoluteSources=z._sources.toArray().map(function(Hn){return eo.computeSourceURL(z.sourceRoot,Hn,M)});var qe=P._mappings.toArray().slice(),at=z.__generatedMappings=[],yt=z.__originalMappings=[];for(var cr=0,vr=qe.length;cr<vr;cr++){var Dr=qe[cr],xe=new WLe;if(xe.generatedLine=Dr.generatedLine,xe.generatedColumn=Dr.generatedColumn,Dr.source){if(xe.source=ve.indexOf(Dr.source),xe.originalLine=Dr.originalLine,xe.originalColumn=Dr.originalColumn,Dr.name)xe.name=ce.indexOf(Dr.name);yt.push(xe)}at.push(xe)}return hB(z.__originalMappings,eo.compareByOriginalPositions),z};eh.prototype._version=3;Object.defineProperty(eh.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function WLe(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}eh.prototype._parseMappings=function(P,M){var z=1,ce=0,ve=0,qe=0,at=0,yt=0,cr=P.length,vr=0,Dr={},xe={},Hn=[],Nt=[],Ot,os,Pi,Us,$a;while(vr<cr)if(P.charAt(vr)===";")z++,vr++,ce=0;else if(P.charAt(vr)===",")vr++;else{Ot=new WLe,Ot.generatedLine=z;for(Us=vr;Us<cr;Us++)if(this._charIsMappingSeparator(P,Us))break;if(os=P.slice(vr,Us),Pi=Dr[os],Pi)vr+=os.length;else{Pi=[];while(vr<Us)Wbt.decode(P,vr,xe),$a=xe.value,vr=xe.rest,Pi.push($a);if(Pi.length===2)throw Error("Found a source, but no line and column");if(Pi.length===3)throw Error("Found a source and line, but no column");Dr[os]=Pi}if(Ot.generatedColumn=ce+Pi[0],ce=Ot.generatedColumn,Pi.length>1){if(Ot.source=at+Pi[1],at+=Pi[1],Ot.originalLine=ve+Pi[2],ve=Ot.originalLine,Ot.originalLine+=1,Ot.originalColumn=qe+Pi[3],qe=Ot.originalColumn,Pi.length>4)Ot.name=yt+Pi[4],yt+=Pi[4]}if(Nt.push(Ot),typeof Ot.originalLine==="number")Hn.push(Ot)}hB(Nt,eo.compareByGeneratedPositionsDeflated),this.__generatedMappings=Nt,hB(Hn,eo.compareByOriginalPositions),this.__originalMappings=Hn};eh.prototype._findMapping=function(P,M,z,ce,ve,qe){if(P[z]<=0)throw TypeError("Line must be greater than or equal to 1, got "+P[z]);if(P[ce]<0)throw TypeError("Column must be greater than or equal to 0, got "+P[ce]);return C0e.search(P,M,ve,qe)};eh.prototype.computeColumnSpans=function(){for(var P=0;P<this._generatedMappings.length;++P){var M=this._generatedMappings[P];if(P+1<this._generatedMappings.length){var z=this._generatedMappings[P+1];if(M.generatedLine===z.generatedLine){M.lastGeneratedColumn=z.generatedColumn-1;continue}}M.lastGeneratedColumn=1/0}};eh.prototype.originalPositionFor=function(P){var M={generatedLine:eo.getArg(P,"line"),generatedColumn:eo.getArg(P,"column")},z=this._findMapping(M,this._generatedMappings,"generatedLine","generatedColumn",eo.compareByGeneratedPositionsDeflated,eo.getArg(P,"bias",Gf.GREATEST_LOWER_BOUND));if(z>=0){var ce=this._generatedMappings[z];if(ce.generatedLine===M.generatedLine){var ve=eo.getArg(ce,"source",null);if(ve!==null)ve=this._sources.at(ve),ve=eo.computeSourceURL(this.sourceRoot,ve,this._sourceMapURL);var qe=eo.getArg(ce,"name",null);if(qe!==null)qe=this._names.at(qe);return{source:ve,line:eo.getArg(ce,"originalLine",null),column:eo.getArg(ce,"originalColumn",null),name:qe}}}return{source:null,line:null,column:null,name:null}};eh.prototype.hasContentsOfAllSources=function(){if(!this.sourcesContent)return!1;return this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(P){return P==null})};eh.prototype.sourceContentFor=function(P,M){if(!this.sourcesContent)return null;var z=this._findSourceIndex(P);if(z>=0)return this.sourcesContent[z];var ce=P;if(this.sourceRoot!=null)ce=eo.relative(this.sourceRoot,ce);var ve;if(this.sourceRoot!=null&&(ve=eo.urlParse(this.sourceRoot))){var qe=ce.replace(/^file:\/\//,"");if(ve.scheme=="file"&&this._sources.has(qe))return this.sourcesContent[this._sources.indexOf(qe)];if((!ve.path||ve.path=="/")&&this._sources.has("/"+ce))return this.sourcesContent[this._sources.indexOf("/"+ce)]}if(M)return null;else throw Error('"'+ce+'" is not in the SourceMap.')};eh.prototype.generatedPositionFor=function(P){var M=eo.getArg(P,"source");if(M=this._findSourceIndex(M),M<0)return{line:null,column:null,lastColumn:null};var z={source:M,originalLine:eo.getArg(P,"line"),originalColumn:eo.getArg(P,"column")},ce=this._findMapping(z,this._originalMappings,"originalLine","originalColumn",eo.compareByOriginalPositions,eo.getArg(P,"bias",Gf.GREATEST_LOWER_BOUND));if(ce>=0){var ve=this._originalMappings[ce];if(ve.source===z.source)return{line:eo.getArg(ve,"generatedLine",null),column:eo.getArg(ve,"generatedColumn",null),lastColumn:eo.getArg(ve,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};Vbt.BasicSourceMapConsumer=eh;function OT(v,P){var M=v;if(typeof v==="string")M=eo.parseSourceMapInput(v);var z=eo.getArg(M,"version"),ce=eo.getArg(M,"sections");if(z!=this._version)throw Error("Unsupported version: "+z);this._sources=new D7,this._names=new D7;var ve={line:-1,column:0};this._sections=ce.map(function(qe){if(qe.url)throw Error("Support for url field in sections not implemented.");var at=eo.getArg(qe,"offset"),yt=eo.getArg(at,"line"),cr=eo.getArg(at,"column");if(yt<ve.line||yt===ve.line&&cr<ve.column)throw Error("Section offsets must be ordered and non-overlapping.");return ve=at,{generatedOffset:{generatedLine:yt+1,generatedColumn:cr+1},consumer:new Gf(eo.getArg(qe,"map"),P)}})}OT.prototype=Object.create(Gf.prototype);OT.prototype.constructor=Gf;OT.prototype._version=3;Object.defineProperty(OT.prototype,"sources",{get:function(){var v=[];for(var P=0;P<this._sections.length;P++)for(var M=0;M<this._sections[P].consumer.sources.length;M++)v.push(this._sections[P].consumer.sources[M]);return v}});OT.prototype.originalPositionFor=function(P){var M={generatedLine:eo.getArg(P,"line"),generatedColumn:eo.getArg(P,"column")},z=C0e.search(M,this._sections,function(ve,qe){var at=ve.generatedLine-qe.generatedOffset.generatedLine;if(at)return at;return ve.generatedColumn-qe.generatedOffset.generatedColumn}),ce=this._sections[z];if(!ce)return{source:null,line:null,column:null,name:null};return ce.consumer.originalPositionFor({line:M.generatedLine-(ce.generatedOffset.generatedLine-1),column:M.generatedColumn-(ce.generatedOffset.generatedLine===M.generatedLine?ce.generatedOffset.generatedColumn-1:0),bias:P.bias})};OT.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(P){return P.consumer.hasContentsOfAllSources()})};OT.prototype.sourceContentFor=function(P,M){for(var z=0;z<this._sections.length;z++){var ce=this._sections[z],ve=ce.consumer.sourceContentFor(P,!0);if(ve)return ve}if(M)return null;else throw Error('"'+P+'" is not in the SourceMap.')};OT.prototype.generatedPositionFor=function(P){for(var M=0;M<this._sections.length;M++){var z=this._sections[M];if(z.consumer._findSourceIndex(eo.getArg(P,"source"))===-1)continue;var ce=z.consumer.generatedPositionFor(P);if(ce){var ve={line:ce.line+(z.generatedOffset.generatedLine-1),column:ce.column+(z.generatedOffset.generatedLine===ce.line?z.generatedOffset.generatedColumn-1:0)};return ve}}return{line:null,column:null}};OT.prototype._parseMappings=function(P,M){this.__generatedMappings=[],this.__originalMappings=[];for(var z=0;z<this._sections.length;z++){var ce=this._sections[z],ve=ce.consumer._generatedMappings;for(var qe=0;qe<ve.length;qe++){var at=ve[qe],yt=ce.consumer._sources.at(at.source);yt=eo.computeSourceURL(ce.consumer.sourceRoot,yt,this._sourceMapURL),this._sources.add(yt),yt=this._sources.indexOf(yt);var cr=null;if(at.name)cr=ce.consumer._names.at(at.name),this._names.add(cr),cr=this._names.indexOf(cr);var vr={source:yt,generatedLine:at.generatedLine+(ce.generatedOffset.generatedLine-1),generatedColumn:at.generatedColumn+(ce.generatedOffset.generatedLine===at.generatedLine?ce.generatedOffset.generatedColumn-1:0),originalLine:at.originalLine,originalColumn:at.originalColumn,name:cr};if(this.__generatedMappings.push(vr),typeof vr.originalLine==="number")this.__originalMappings.push(vr)}}hB(this.__generatedMappings,eo.compareByGeneratedPositionsDeflated),hB(this.__originalMappings,eo.compareByOriginalPositions)};Vbt.IndexedSourceMapConsumer=OT});var qLe=W0(function(Qbt){var Gbt=b0e().SourceMapGenerator,dY=P7(),Xbt=/(\r?\n)/,Kbt=10,I7="$$$isSourceNode$$$";function S1(v,P,M,z,ce){if(this.children=[],this.sourceContents={},this.line=v==null?null:v,this.column=P==null?null:P,this.source=M==null?null:M,this.name=ce==null?null:ce,this[I7]=!0,z!=null)this.add(z)}S1.fromStringWithSourceMap=function(P,M,z){var ce=new S1,ve=P.split(Xbt),qe=0,at=function(){var xe=Nt(),Hn=Nt()||"";return xe+Hn;function Nt(){return qe<ve.length?ve[qe++]:void 0}},yt=1,cr=0,vr=null;if(M.eachMapping(function(xe){if(vr!==null)if(yt<xe.generatedLine)Dr(vr,at()),yt++,cr=0;else{var Hn=ve[qe]||"",Nt=Hn.substr(0,xe.generatedColumn-cr);ve[qe]=Hn.substr(xe.generatedColumn-cr),cr=xe.generatedColumn,Dr(vr,Nt),vr=xe;return}while(yt<xe.generatedLine)ce.add(at()),yt++;if(cr<xe.generatedColumn){var Hn=ve[qe]||"";ce.add(Hn.substr(0,xe.generatedColumn)),ve[qe]=Hn.substr(xe.generatedColumn),cr=xe.generatedColumn}vr=xe},this),qe<ve.length){if(vr)Dr(vr,at());ce.add(ve.splice(qe).join(""))}return M.sources.forEach(function(xe){var Hn=M.sourceContentFor(xe);if(Hn!=null){if(z!=null)xe=dY.join(z,xe);ce.setSourceContent(xe,Hn)}}),ce;function Dr(xe,Hn){if(xe===null||xe.source===void 0)ce.add(Hn);else{var Nt=z?dY.join(z,xe.source):xe.source;ce.add(new S1(xe.originalLine,xe.originalColumn,Nt,Hn,xe.name))}}};S1.prototype.add=function(P){if(Array.isArray(P))P.forEach(function(M){this.add(M)},this);else if(P[I7]||typeof P==="string"){if(P)this.children.push(P)}else throw TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+P);return this};S1.prototype.prepend=function(P){if(Array.isArray(P))for(var M=P.length-1;M>=0;M--)this.prepend(P[M]);else if(P[I7]||typeof P==="string")this.children.unshift(P);else throw TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+P);return this};S1.prototype.walk=function(P){var M;for(var z=0,ce=this.children.length;z<ce;z++)if(M=this.children[z],M[I7])M.walk(P);else if(M!=="")P(M,{source:this.source,line:this.line,column:this.column,name:this.name})};S1.prototype.join=function(P){var M,z,ce=this.children.length;if(ce>0){M=[];for(z=0;z<ce-1;z++)M.push(this.children[z]),M.push(P);M.push(this.children[z]),this.children=M}return this};S1.prototype.replaceRight=function(P,M){var z=this.children[this.children.length-1];if(z[I7])z.replaceRight(P,M);else if(typeof z==="string")this.children[this.children.length-1]=z.replace(P,M);else this.children.push("".replace(P,M));return this};S1.prototype.setSourceContent=function(P,M){this.sourceContents[dY.toSetString(P)]=M};S1.prototype.walkSourceContents=function(P){for(var M=0,z=this.children.length;M<z;M++)if(this.children[M][I7])this.children[M].walkSourceContents(P);var ce=Object.keys(this.sourceContents);for(var M=0,z=ce.length;M<z;M++)P(dY.fromSetString(ce[M]),this.sourceContents[ce[M]])};S1.prototype.toString=function(){var P="";return this.walk(function(M){P+=M}),P};S1.prototype.toStringWithSourceMap=function(P){var M={code:"",line:1,column:0},z=new Gbt(P),ce=!1,ve=null,qe=null,at=null,yt=null;return this.walk(function(cr,vr){if(M.code+=cr,vr.source!==null&&vr.line!==null&&vr.column!==null){if(ve!==vr.source||qe!==vr.line||at!==vr.column||yt!==vr.name)z.addMapping({source:vr.source,original:{line:vr.line,column:vr.column},generated:{line:M.line,column:M.column},name:vr.name});ve=vr.source,qe=vr.line,at=vr.column,yt=vr.name,ce=!0}else if(ce)z.addMapping({generated:{line:M.line,column:M.column}}),ve=null,ce=!1;for(var Dr=0,xe=cr.length;Dr<xe;Dr++)if(cr.charCodeAt(Dr)===Kbt){if(M.line++,M.column=0,Dr+1===xe)ve=null,ce=!1;else if(ce)z.addMapping({source:vr.source,original:{line:vr.line,column:vr.column},generated:{line:M.line,column:M.column},name:vr.name})}else M.column++}),this.walkSourceContents(function(cr,vr){z.setSourceContent(cr,vr)}),{code:M.code,map:z}};Qbt.SourceNode=S1});var $Le=W0(function(Zbt){Zbt.SourceMapGenerator=b0e().SourceMapGenerator;Zbt.SourceMapConsumer=VLe().SourceMapConsumer;Zbt.SourceNode=qLe().SourceNode});var GLe=W0(function(ZEt,HLe){var nSt=Object.prototype.toString,E0e=typeof Buffer<"u"&&typeof Buffer.alloc==="function"&&typeof Buffer.allocUnsafe==="function"&&typeof Buffer.from==="function";function iSt(v){return nSt.call(v).slice(8,-1)==="ArrayBuffer"}function sSt(v,P,M){P>>>=0;var z=v.byteLength-P;if(z<0)throw RangeError("'offset' is out of bounds");if(M===void 0)M=z;else if(M>>>=0,M>z)throw RangeError("'length' is out of bounds");return E0e?Buffer.from(v.slice(P,P+M)):new Buffer(new Uint8Array(v.slice(P,P+M)))}function aSt(v,P){if(typeof P!=="string"||P==="")P="utf8";if(!Buffer.isEncoding(P))throw TypeError('"encoding" must be a valid string encoding');return E0e?Buffer.from(v,P):new Buffer(v,P)}function oSt(v,P,M){if(typeof v==="number")throw TypeError('"value" argument must not be a number');if(iSt(v))return sSt(v,P,M);if(typeof v==="string")return aSt(v,P);return E0e?Buffer.from(v):new Buffer(v)}HLe.exports=oSt});var r9e=W0(function(ewt,D0e){var cSt=$Le().SourceMapConsumer,w0e=IT("path"),M2;try{if(M2=IT("fs"),!M2.existsSync||!M2.readFileSync)M2=null}catch(v){}var lSt=GLe();function XLe(v,P){return v.require(P)}var KLe=!1,QLe=!1,A0e=!1,yB="auto",ZN={},vB={},uSt=/^data:application\/json[^,]+base64,/,eP=[],tP=[];function I0e(){if(yB==="browser")return!0;if(yB==="node")return!1;return typeof window<"u"&&typeof XMLHttpRequest==="function"&&!(window.require&&window.module&&window.process&&window.process.type==="renderer")}function _St(){return typeof process==="object"&&process!==null&&typeof process.on==="function"}function fSt(){if(typeof process==="object"&&process!==null)return process.version;else return""}function pSt(){if(typeof process==="object"&&process!==null)return process.stderr}function dSt(v){if(typeof process==="object"&&process!==null&&typeof process.exit==="function")return process.exit(v)}function mY(v){return function(P){for(var M=0;M<v.length;M++){var z=v[M](P);if(z)return z}return null}}var N0e=mY(eP);eP.push(function(v){if(v=v.trim(),/^file:/.test(v))v=v.replace(/file:\/\/\/(\w:)?/,function(z,ce){return ce?"":"/"});if(v in ZN)return ZN[v];var P="";try{if(!M2){var M=new XMLHttpRequest;if(M.open("GET",v,!1),M.send(null),M.readyState===4&&M.status===200)P=M.responseText}else if(M2.existsSync(v))P=M2.readFileSync(v,"utf8")}catch(z){}return ZN[v]=P});function P0e(v,P){if(!v)return P;var M=w0e.dirname(v),z=/^\w+:\/\/[^\/]*/.exec(M),ce=z?z[0]:"",ve=M.slice(ce.length);if(ce&&/^\/\w\:/.test(ve))return ce+="/",ce+w0e.resolve(M.slice(ce.length),P).replace(/\\/g,"/");return ce+w0e.resolve(M.slice(ce.length),P)}function mSt(v){var P;if(I0e())try{var M=new XMLHttpRequest;M.open("GET",v,!1),M.send(null),P=M.readyState===4?M.responseText:null;var z=M.getResponseHeader("SourceMap")||M.getResponseHeader("X-SourceMap");if(z)return z}catch(at){}P=N0e(v);var ce=/(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/mg,ve,qe;while(qe=ce.exec(P))ve=qe;if(!ve)return null;return ve[1]}var O0e=mY(tP);tP.push(function(v){var P=mSt(v);if(!P)return null;var M;if(uSt.test(P)){var z=P.slice(P.indexOf(",")+1);M=lSt(z,"base64").toString(),P=v}else P=P0e(v,P),M=N0e(P);if(!M)return null;return{url:P,map:M}});function F0e(v){var P=vB[v.source];if(!P){var M=O0e(v.source);if(M){if(P=vB[v.source]={url:M.url,map:new cSt(M.map)},P.map.sourcesContent)P.map.sources.forEach(function(ce,ve){var qe=P.map.sourcesContent[ve];if(qe){var at=P0e(P.url,ce);ZN[at]=qe}})}else P=vB[v.source]={url:null,map:null}}if(P&&P.map&&typeof P.map.originalPositionFor==="function"){var z=P.map.originalPositionFor(v);if(z.source!==null)return z.source=P0e(P.url,z.source),z}return v}function ZLe(v){var P=/^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(v);if(P){var M=F0e({source:P[2],line:+P[3],column:P[4]-1});return"eval at "+P[1]+" ("+M.source+":"+M.line+":"+(M.column+1)+")"}if(P=/^eval at ([^(]+) \((.+)\)$/.exec(v),P)return"eval at "+P[1]+" ("+ZLe(P[2])+")";return v}function gSt(){var v,P="";if(this.isNative())P="native";else{if(v=this.getScriptNameOrSourceURL(),!v&&this.isEval())P=this.getEvalOrigin(),P+=", ";if(v)P+=v;else P+="<anonymous>";var M=this.getLineNumber();if(M!=null){P+=":"+M;var z=this.getColumnNumber();if(z)P+=":"+z}}var ce="",ve=this.getFunctionName(),qe=!0,at=this.isConstructor(),yt=!(this.isToplevel()||at);if(yt){var cr=this.getTypeName();if(cr==="[object Object]")cr="null";var vr=this.getMethodName();if(ve){if(cr&&ve.indexOf(cr)!=0)ce+=cr+".";if(ce+=ve,vr&&ve.indexOf("."+vr)!=ve.length-vr.length-1)ce+=" [as "+vr+"]"}else ce+=cr+"."+(vr||"<anonymous>")}else if(at)ce+="new "+(ve||"<anonymous>");else if(ve)ce+=ve;else ce+=P,qe=!1;if(qe)ce+=" ("+P+")";return ce}function YLe(v){var P={};return Object.getOwnPropertyNames(Object.getPrototypeOf(v)).forEach(function(M){P[M]=/^(?:is|get)/.test(M)?function(){return v[M].call(v)}:v[M]}),P.toString=gSt,P}function e9e(v,P){if(P===void 0)P={nextPosition:null,curPosition:null};if(v.isNative())return P.curPosition=null,v;var M=v.getFileName()||v.getScriptNameOrSourceURL();if(M){var z=v.getLineNumber(),ce=v.getColumnNumber()-1,ve=/^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/,qe=ve.test(fSt())?0:62;if(z===1&&ce>qe&&!I0e()&&!v.isEval())ce-=qe;var at=F0e({source:M,line:z,column:ce});P.curPosition=at,v=YLe(v);var yt=v.getFunctionName;return v.getFunctionName=function(){if(P.nextPosition==null)return yt();return P.nextPosition.name||yt()},v.getFileName=function(){return at.source},v.getLineNumber=function(){return at.line},v.getColumnNumber=function(){return at.column+1},v.getScriptNameOrSourceURL=function(){return at.source},v}var cr=v.isEval()&&v.getEvalOrigin();if(cr)return cr=ZLe(cr),v=YLe(v),v.getEvalOrigin=function(){return cr},v;return v}function hSt(v,P){if(A0e)ZN={},vB={};var M=v.name||"Error",z=v.message||"",ce=M+": "+z,ve={nextPosition:null,curPosition:null},qe=[];for(var at=P.length-1;at>=0;at--)qe.push(`
|
|
3
3
|
at `+e9e(P[at],ve)),ve.nextPosition=ve.curPosition;return ve.curPosition=ve.nextPosition=null,ce+qe.reverse().join("")}function t9e(v){var P=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(v.stack);if(P){var M=P[1],z=+P[2],ce=+P[3],ve=ZN[M];if(!ve&&M2&&M2.existsSync(M))try{ve=M2.readFileSync(M,"utf8")}catch(at){ve=""}if(ve){var qe=ve.split(/(?:\r\n|\r|\n)/)[z-1];if(qe)return M+":"+z+`
|
|
4
4
|
`+qe+`
|
|
5
|
-
`+Array(ce).join(" ")+"^"}}return null}function ySt(v){var P=t9e(v),M=pSt();if(M&&M._handle&&M._handle.setBlocking)M._handle.setBlocking(!0);if(P)console.error(),console.error(P);console.error(v.stack),dSt(1)}function vSt(){var v=process.emit;process.emit=function(P){if(P==="uncaughtException"){var M=arguments[1]&&arguments[1].stack,z=this.listeners(P).length>0;if(M&&!z)return ySt(arguments[1])}return v.apply(this,arguments)}}var bSt=eP.slice(0),SSt=tP.slice(0);ewt.wrapCallSite=e9e;ewt.getErrorSource=t9e;ewt.mapSourcePosition=F0e;ewt.retrieveSourceMap=O0e;ewt.install=function(v){if(v=v||{},v.environment){if(yB=v.environment,["node","browser","auto"].indexOf(yB)===-1)throw Error("environment "+yB+" was unknown. Available options are {auto, browser, node}")}if(v.retrieveFile){if(v.overrideRetrieveFile)eP.length=0;eP.unshift(v.retrieveFile)}if(v.retrieveSourceMap){if(v.overrideRetrieveSourceMap)tP.length=0;tP.unshift(v.retrieveSourceMap)}if(v.hookRequire&&!I0e()){var P=XLe(D0e,"module"),M=P.prototype._compile;if(!M.__sourceMapSupport)P.prototype._compile=function(ve,qe){return ZN[qe]=ve,vB[qe]=void 0,M.call(this,ve,qe)},P.prototype._compile.__sourceMapSupport=!0}if(!A0e)A0e="emptyCacheBetweenOperations"in v?v.emptyCacheBetweenOperations:!1;if(!KLe)KLe=!0,Error.prepareStackTrace=hSt;if(!QLe){var z="handleUncaughtExceptions"in v?v.handleUncaughtExceptions:!0;try{var ce=XLe(D0e,"worker_threads");if(ce.isMainThread===!1)z=!1}catch(ve){}if(z&&_St())QLe=!0,vSt()}};ewt.resetRetrieveHandlers=function(){eP.length=0,tP.length=0,eP=bSt.slice(0),tP=SSt.slice(0),O0e=mY(tP),N0e=mY(eP)}});var i9e=W0(function(twt,gY){var __dirname="/home/
|
|
5
|
+
`+Array(ce).join(" ")+"^"}}return null}function ySt(v){var P=t9e(v),M=pSt();if(M&&M._handle&&M._handle.setBlocking)M._handle.setBlocking(!0);if(P)console.error(),console.error(P);console.error(v.stack),dSt(1)}function vSt(){var v=process.emit;process.emit=function(P){if(P==="uncaughtException"){var M=arguments[1]&&arguments[1].stack,z=this.listeners(P).length>0;if(M&&!z)return ySt(arguments[1])}return v.apply(this,arguments)}}var bSt=eP.slice(0),SSt=tP.slice(0);ewt.wrapCallSite=e9e;ewt.getErrorSource=t9e;ewt.mapSourcePosition=F0e;ewt.retrieveSourceMap=O0e;ewt.install=function(v){if(v=v||{},v.environment){if(yB=v.environment,["node","browser","auto"].indexOf(yB)===-1)throw Error("environment "+yB+" was unknown. Available options are {auto, browser, node}")}if(v.retrieveFile){if(v.overrideRetrieveFile)eP.length=0;eP.unshift(v.retrieveFile)}if(v.retrieveSourceMap){if(v.overrideRetrieveSourceMap)tP.length=0;tP.unshift(v.retrieveSourceMap)}if(v.hookRequire&&!I0e()){var P=XLe(D0e,"module"),M=P.prototype._compile;if(!M.__sourceMapSupport)P.prototype._compile=function(ve,qe){return ZN[qe]=ve,vB[qe]=void 0,M.call(this,ve,qe)},P.prototype._compile.__sourceMapSupport=!0}if(!A0e)A0e="emptyCacheBetweenOperations"in v?v.emptyCacheBetweenOperations:!1;if(!KLe)KLe=!0,Error.prepareStackTrace=hSt;if(!QLe){var z="handleUncaughtExceptions"in v?v.handleUncaughtExceptions:!0;try{var ce=XLe(D0e,"worker_threads");if(ce.isMainThread===!1)z=!1}catch(ve){}if(z&&_St())QLe=!0,vSt()}};ewt.resetRetrieveHandlers=function(){eP.length=0,tP.length=0,eP=bSt.slice(0),tP=SSt.slice(0),O0e=mY(tP),N0e=mY(eP)}});var i9e=W0(function(twt,gY){var __dirname="/home/runner/work/absolutejs/absolutejs/node_modules/typescript/lib",__filename="/home/runner/work/absolutejs/absolutejs/node_modules/typescript/lib/typescript.js";/*! *****************************************************************************
|
|
6
6
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7
7
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
8
8
|
this file except in compliance with the License. You may obtain a copy of the
|
|
@@ -476,7 +476,7 @@ const promiseRealpath = fs.promises.realpath.bind(fs.promises);
|
|
|
476
476
|
fs.promises.realpath = async (value, options) => remap(await promiseRealpath(value, options));
|
|
477
477
|
`,aLe=(v)=>`exp+${v.toLowerCase().replaceAll(/[^a-z0-9]+/gu,"-")}`,oLe=(v,P,M)=>`${aLe(v)}://expo-development-client/?url=${encodeURIComponent(`http://${P}:${M}`)}`,A1t=(v)=>{let P=Bun.spawnSync(v,{killSignal:"SIGKILL",stderr:"ignore",stdout:"pipe",timeout:30000});return{exitCode:P.exitCode,stdout:P.stdout.toString()}},o0e=(v,P)=>{let M=P(["wslpath","-w",v]);if(M.exitCode!==0||!M.stdout.trim())throw Error(`Could not translate WSL path for Windows: ${v}`);return M.stdout.trim()},P1t=(v,P)=>{let M=Bun.hash(rLe(v)).toString(sLe);return rLe(P,"..","..","ExpoBuilds",M.slice(0,T1t))},D1t=(v,P,M,z,ce)=>{let ve=z([v,"devices"]);if(ve.exitCode!==0)throw Error("Could not inspect devices after the Expo Android build.");let qe=ve.stdout.split(/\r?\n/u).flatMap((vr)=>{let Dr=/^(\S+)\s+device$/u.exec(vr.trim());return Dr?.[1]?[Dr[1]]:[]}),at=ce?qe.find((vr)=>vr===ce):qe.find((vr)=>vr.startsWith("emulator-"))??qe[0];if(!at)throw Error(ce?"The selected Expo Android device is not connected after build.":"Expo Android build completed but no ready device was found.");let yt=(vr,Dr)=>{if(z([v,"-s",at,...vr]).exitCode!==0)throw Error(Dr)};yt(["reverse",`tcp:${M}`,`tcp:${M}`],"Expo Android Metro forwarding failed."),yt(["shell","am","force-stop",P],"Expo Android development-client reset failed.");let cr=()=>yt(["shell","am","start","-a","android.intent.action.VIEW","-d",oLe(P,"localhost",M),P],"Expo Android development-client launch failed.");return cr(),yt(["shell","sleep","1"],"Expo Android development-client readiness pause failed."),cr(),at};var I1t=(v,P,M,z,ce,ve,qe,at="development",yt=[])=>{let cr=o0e(v,ce),vr=P1t(v,P),Dr=o0e(vr,ce),xe=o0e(P,ce),Hn=(el)=>Buffer.from(el,"utf8").toString("base64"),Nt=aLe(M),Ot=Hn(w1t),os=`Local\\AbsoluteJS.Expo.${Bun.hash(vr).toString(sLe)}`,Pi=at==="bundle"?[]:["$adb = Join-Path $androidHome 'platform-tools\\adb.exe'","$deviceDeadline = [DateTime]::UtcNow.AddSeconds(60)","do { $readyDevices = @(& $adb devices) | Where-Object { $_ -match '\\tdevice$' } | ForEach-Object { ($_ -split '\\s+')[0] }; if (-not $readyDevices) { Start-Sleep -Milliseconds 500 } } while (-not $readyDevices -and [DateTime]::UtcNow -lt $deviceDeadline)",...qe?[`$serial = [Text.Encoding]::UTF8.GetString([Convert]::FromBase64String('${Hn(qe)}'))`,"if ($readyDevices -notcontains $serial) { throw 'The selected Expo Android device is not connected after build.' }"]:["$serial = $readyDevices | Where-Object { $_ -like 'emulator-*' } | Select-Object -First 1","if (-not $serial) { $serial = $readyDevices | Select-Object -First 1 }"],"if (-not $serial) { throw 'Expo Android build completed but no ready device was found.' }",...at==="release"?["$apk = Join-Path $mappedProject 'android\\app\\build\\outputs\\apk\\release\\app-release.apk'","$installOutput = Join-Path $env:TEMP ('absolutejs-adb-install-' + [Guid]::NewGuid().ToString('N') + '.out')","$installError = $installOutput + '.err'","$install = Start-Process -FilePath $adb -ArgumentList @('-s', $serial, 'install', '-r', $apk) -NoNewWindow -PassThru -RedirectStandardOutput $installOutput -RedirectStandardError $installError","if (-not $install.WaitForExit(900000)) { $install.Kill(); throw 'Expo Android release installation timed out after 15 minutes.' }","$install.WaitForExit()","$installText = ((Get-Content $installOutput -Raw -ErrorAction SilentlyContinue) + (Get-Content $installError -Raw -ErrorAction SilentlyContinue))","if ($installText) { Write-Output $installText.Trim() }","Remove-Item $installOutput, $installError -Force -ErrorAction SilentlyContinue","if ($install.ExitCode -ne 0 -and $installText -notmatch '(?m)^Success\\r?$') { throw 'Expo Android release installation failed.' }",`$installedPackage = @(& $adb -s $serial shell pm path '${M}')`,"if ($LASTEXITCODE -ne 0 -or $installedPackage -notmatch '^package:') { throw 'Expo Android release package verification failed.' }"]:[],`& $adb -s $serial reverse 'tcp:${ve}' 'tcp:${ve}'`,"if ($LASTEXITCODE -ne 0) { throw 'Expo Android port forwarding failed.' }",`& $adb -s $serial shell am force-stop '${M}'`,"if ($LASTEXITCODE -ne 0) { throw 'Expo Android application reset failed.' }",...at==="development"?[`$developmentUrl = '${Nt}://expo-development-client/?url=' + [Uri]::EscapeDataString('http://localhost:${ve}')`,`& $adb -s $serial shell am start -a android.intent.action.VIEW -d $developmentUrl '${M}'`,"if ($LASTEXITCODE -ne 0) { throw 'Expo Android development-client launch failed.' }","Start-Sleep -Milliseconds 1000",`& $adb -s $serial shell am start -a android.intent.action.VIEW -d $developmentUrl '${M}'`,"if ($LASTEXITCODE -ne 0) { throw 'Expo Android development-client retry failed.' }"]:[`& $adb -s $serial shell monkey -p '${M}' -c android.intent.category.LAUNCHER 1 | Out-Null`,"if ($LASTEXITCODE -ne 0) { throw 'Expo Android release launch failed.' }"]],Us=["$mappedProject = Join-Path ($drive + '\\') (Split-Path -Leaf $directory)","Set-Location $mappedProject","$hook = Join-Path $mappedProject '.absolutejs-preserve-subst.cjs'",`[IO.File]::WriteAllText($hook, [Text.Encoding]::UTF8.GetString([Convert]::FromBase64String('${Ot}')))`,"$env:ABSOLUTE_EXPO_PHYSICAL_ROOT = $directory","$env:ABSOLUTE_EXPO_MAPPED_ROOT = $mappedProject","$env:ABSOLUTE_EXPO_APP_ROOT = $mappedProject",'$env:NODE_OPTIONS = "--require=$hook"',"$env:GRADLE_OPTS = (($env:GRADLE_OPTS + ' -Dorg.gradle.daemon=false').Trim())","$autolinkingCache = Join-Path $mappedProject 'android\\build\\generated\\autolinking'","if ([IO.Directory]::Exists($autolinkingCache)) { [IO.Directory]::Delete($autolinkingCache, $true) }","$reactGeneratedResources = Join-Path $mappedProject 'android\\app\\build\\generated\\res\\react'","if ([IO.Directory]::Exists($reactGeneratedResources)) { [IO.Directory]::Delete($reactGeneratedResources, $true) }",...at==="development"?["$expo = Join-Path $mappedProject 'node_modules\\.bin\\expo.exe'","& $expo @expoArguments","if ($LASTEXITCODE -ne 0) { throw 'Expo Android native build failed.' }"]:["$gradle = Join-Path $mappedProject 'android\\gradlew.bat'","$androidProject = Join-Path $mappedProject 'android'",at==="bundle"?"& $gradle --no-daemon --console=plain -p $androidProject @gradleArguments bundleRelease":"& $gradle --no-daemon --console=plain -p $androidProject assembleRelease","if ($LASTEXITCODE -ne 0) { throw 'Expo Android release compilation failed.' }"],...Pi].join("; "),$a=["$ErrorActionPreference = 'Stop'","$ProgressPreference = 'SilentlyContinue'",`$source = [Text.Encoding]::UTF8.GetString([Convert]::FromBase64String('${Hn(cr)}'))`,`$directory = [Text.Encoding]::UTF8.GetString([Convert]::FromBase64String('${Hn(Dr)}'))`,`$androidHome = [Text.Encoding]::UTF8.GetString([Convert]::FromBase64String('${Hn(xe)}'))`,`$mutexName = [Text.Encoding]::UTF8.GetString([Convert]::FromBase64String('${Hn(os)}'))`,`$expoArguments = @([Text.Encoding]::UTF8.GetString([Convert]::FromBase64String('${Hn(JSON.stringify(z))}')) | ConvertFrom-Json)`,`$gradleArguments = @([Text.Encoding]::UTF8.GetString([Convert]::FromBase64String('${Hn(JSON.stringify(yt))}')) | ConvertFrom-Json)`,"$env:ANDROID_HOME = $androidHome","$env:ANDROID_SDK_ROOT = $androidHome",`$env:NODE_ENV = '${at==="development"?"development":"production"}'`,...qe||at==="bundle"?[]:["$env:ORG_GRADLE_PROJECT_reactNativeArchitectures = 'x86_64'"],"$mutex = [Threading.Mutex]::new($false, $mutexName)","$mutexAcquired = $false","try {","try { $mutexAcquired = $mutex.WaitOne([TimeSpan]::FromMinutes(30)) } catch [Threading.AbandonedMutexException] { $mutexAcquired = $true }","if (-not $mutexAcquired) { throw 'Timed out waiting for another AbsoluteJS Expo Android build to release the managed Windows mirror.' }","New-Item -ItemType Directory -Force -Path $directory | Out-Null",`& robocopy.exe $source $directory /MIR /XD node_modules .expo .git .gradle .cxx .kotlin build /XF bun.lock bun.lockb .absolutejs-preserve-subst.cjs .absolutejs-source-lock.sha256 ${a0e} /NFL /NDL /NJH /NJS /NP`,"$copyExit = $LASTEXITCODE","if ($copyExit -ge 8) { exit $copyExit }","Set-Location $directory",`$buildStamp = Join-Path $directory '${a0e}'`,"Set-Content $buildStamp ([DateTime]::UtcNow.ToString('o')) -NoNewline",`$staleBefore = [DateTime]::UtcNow.AddDays(-${k1t()})`,`Get-ChildItem -LiteralPath (Split-Path -Parent $directory) -Directory -ErrorAction SilentlyContinue | Where-Object { -not [String]::Equals($_.FullName, $directory, [StringComparison]::OrdinalIgnoreCase) -and (Test-Path (Join-Path $_.FullName '.absolutejs-expo-project')) } | ForEach-Object { $stamp = Join-Path $_.FullName '${a0e}'; $lastBuild = if (Test-Path $stamp) { (Get-Item $stamp).LastWriteTimeUtc } else { $_.LastWriteTimeUtc }; if ($lastBuild -lt $staleBefore) { Remove-Item -LiteralPath $_.FullName -Recurse -Force -ErrorAction SilentlyContinue } }`,"$sourceLock = @('bun.lock', 'bun.lockb') | ForEach-Object { Join-Path $source $_ } | Where-Object { Test-Path $_ } | Select-Object -First 1","$sourceLockHash = if ($sourceLock) { (Get-FileHash $sourceLock -Algorithm SHA256).Hash } else { 'none' }","$lockMarker = Join-Path $directory '.absolutejs-source-lock.sha256'","$priorLockHash = if (Test-Path $lockMarker) { (Get-Content $lockMarker -Raw).Trim() } else { '' }","if ($priorLockHash -ne $sourceLockHash) { Remove-Item (Join-Path $directory 'bun.lock'), (Join-Path $directory 'bun.lockb') -Force -ErrorAction SilentlyContinue; Set-Content $lockMarker $sourceLockHash -NoNewline }","$bun = (Get-Command bun.exe -ErrorAction Stop).Source","& $bun install","if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }","$mirrorRoot = Split-Path -Parent $directory","$staleDrives = @(& subst.exe) | ForEach-Object { if ($_ -match '^([A-Z]:)\\\\: => (.+)$' -and [String]::Equals($Matches[2].TrimEnd('\\'), $mirrorRoot.TrimEnd('\\'), [StringComparison]::OrdinalIgnoreCase)) { $Matches[1] } }","foreach ($staleDrive in $staleDrives) { & subst.exe $staleDrive /D | Out-Null }","$drive = @('Z:', 'Y:', 'X:', 'W:', 'V:', 'U:', 'T:') | Where-Object { -not (Test-Path ($_ + '\\')) } | Select-Object -First 1","if (-not $drive) { throw 'AbsoluteJS could not reserve a temporary drive letter for the Expo Android build.' }","& subst.exe $drive $mirrorRoot","if ($LASTEXITCODE -ne 0) { throw 'AbsoluteJS could not create the short Expo Android build path.' }",`try { ${Us} } finally { Set-Location ($env:SystemDrive + '\\'); & subst.exe $drive /D | Out-Null }`,"} finally {","if ($mutexAcquired) { $mutex.ReleaseMutex() }","$mutex.Dispose()","}","exit 0"].join("; ");return["powershell.exe","-NoProfile","-EncodedCommand",Buffer.from($a,"utf16le").toString("base64")]};var N1t=(v)=>({ABSOLUTE_EXPO_DEVELOPMENT:"1",NODE_ENV:"development",...v.certificateAuthorityPath?{ABSOLUTE_EXPO_DEVELOPMENT_CA_PATH:v.certificateAuthorityPath}:{},...v.androidOrigin?{EXPO_PUBLIC_ABSOLUTE_DEV_ANDROID_ORIGIN:v.androidOrigin}:{},...v.iosOrigin?{EXPO_PUBLIC_ABSOLUTE_DEV_IOS_ORIGIN:v.iosOrigin}:{},...v.metroHost?{REACT_NATIVE_PACKAGER_HOSTNAME:v.metroHost}:{}}),cY=async(v)=>{let P=iLe(v,"node_modules",".bin","expo");try{return await g1t(P),P}catch{throw TypeError("Expo dependencies are not installed in the generated shell. Run `absolute mobile init --yes`.")}},nLe=(v,P)=>{if(v.engine!=="expo")throw TypeError("The Expo development controller requires Expo.");if(P.platforms.length===0&&P.metro==="external")throw TypeError("External Expo execution requires a target platform.");if([P.androidOrigin,P.iosOrigin].some((at)=>at&&new URL(at).protocol==="https:")&&!P.certificateAuthorityPath)throw TypeError("Expo HTTPS development requires the AbsoluteJS development CA certificate.");let z=N1t(P),ce={args:["start","--dev-client","--host","localhost","--port",String(P.metroPort)],env:z,role:"metro"},ve=P.platforms.length===0?void 0:{args:["prebuild","--clean","--no-install","--platform",P.platforms.length===2?"all":P.platforms[0]??"all"],env:z,role:"native-prepare"},qe=P.platforms.map((at)=>{let yt=at==="android"?P.androidDevice:P.iosDevice;return{args:[`run:${at}`,"--no-bundler",...yt?["--device",yt]:[]],env:z,platform:at,role:"native-build"}});return{commands:[...ve?[ve]:[],...P.metro==="external"?[]:[ce],...qe],metroPort:P.metroPort,project:v.nativeProjectDirectory}},T7=()=>new DOMException("Expo development aborted.","AbortError"),oY=(v,P)=>{let M=(z)=>{if(!z)return;let ce="";z.on("data",(ve)=>{ce+=ve.toString("utf8");let qe=ce.indexOf(`
|
|
478
478
|
`);while(qe>=0)P(ce.slice(0,qe).replace(/\r$/u,"")),ce=ce.slice(qe+1),qe=ce.indexOf(`
|
|
479
|
-
`)}),z.on("end",()=>{if(ce)P(ce)})};M(v.stdout),M(v.stderr)},KN=async(v)=>{if(v.exitCode!==null||v.killed)return;if(v.kill("SIGTERM"),await Promise.race([new Promise((P)=>v.once("exit",()=>P())),new Promise((P)=>setTimeout(P,S1t))]),v.exitCode===null)v.kill("SIGKILL")},l0e=(v)=>new Promise((P)=>{if(v.exitCode!==null){P(v.exitCode);return}v.once("exit",(M)=>P(M??1))}),dB=async(v,P,M,z)=>{let ce=v(P,M,{cwd:z.cwd,env:z.env??process.env,stdio:["ignore","pipe","pipe"]});oY(ce,z.log);let ve=()=>void KN(ce);z.signal?.addEventListener("abort",ve,{once:!0});let qe=await l0e(ce);if(z.signal?.removeEventListener("abort",ve),z.signal?.aborted)throw T7();return qe};var cLe=async(v)=>{let P=nLe(v.config,v),M=v.executable??await cY(P.project),z=v.spawnProcess??m1t,ce=v.host??XN(),ve=v.capture??A1t,qe=v.log??(()=>{return}),at={},yt=null,cr=async()=>{let li=yt;yt=null,await li?.close()},vr=(li,Xl,Jc={})=>{at[li]=(at[li]??0)+Xl,v.onPhaseTiming?.({durationMs:Xl,phase:li,...Jc})},Dr=(li)=>{v.onStateChange?.(li)};if(v.signal?.aborted)throw T7();let xe=P.commands.find((li)=>li.role==="native-prepare"),Hn=P.commands.find((li)=>li.role==="metro"),Nt=P.commands.filter((li)=>li.role==="native-build"),Ot=async(li)=>{Dr("preparing-native");let Xl=performance.now(),Jc=z(M,li.args,{cwd:P.project,env:{...process.env,...li.env},stdio:["ignore","pipe","pipe"]});oY(Jc,($u)=>{if($u)qe(`[prebuild] ${$u}`)});let pn=()=>void KN(Jc);v.signal?.addEventListener("abort",pn,{once:!0});let vg=await l0e(Jc);if(v.signal?.removeEventListener("abort",pn),v.signal?.aborted)throw T7();if(vg!==0)throw Dr("failed"),Error(`Expo native preparation exited with status ${vg}.`);vr("preparing-native",performance.now()-Xl)};if(xe)await Ot(xe);let os=Hn!==void 0;if(os)Dr("starting-metro");let Pi=performance.now(),Us,$a=0,el=[P.metroPort],of=(li)=>new Promise((Xl,Jc)=>{let pn=!1,vg=!1,$u=setTimeout(()=>{Jc(Error("Expo Metro did not become ready within 120 seconds."))},y1t);oY(li,(kr)=>{if(kr)qe(`[metro] ${kr}`);if(E1t(kr))vg=!0;if(!pn&&/(?:Waiting on|Metro waiting on|Dev server ready)/iu.test(kr))pn=!0,clearTimeout($u),Xl()}),li.once("exit",(kr)=>{if(pn)return;clearTimeout($u),Jc(new c0e(kr??1,vg))})}),ei=async()=>{if(!Hn)return;if(v.signal?.aborted)throw T7();Us=z(M,Hn.args,{cwd:P.project,env:{...process.env,...Hn.env},stdio:["ignore","pipe","pipe"]});try{await of(Us)}catch(li){if(!(li instanceof c0e)||!li.conflict||el.length>=v1t)throw li;await KN(Us);let Jc=await(v.allocateMetroPort??C1t)(el);if(!Number.isSafeInteger(Jc)||Jc<1||Jc>b1t||el.includes(Jc))throw Error("Could not allocate a distinct replacement Metro port.",{cause:li});el.push(Jc),$a+=1,qe("Metro port was claimed during startup; retrying automatically on a new port."),P=nLe(v.config,{...v,metroPort:Jc}),Hn=P.commands.find((pn)=>pn.role==="metro"),Nt=P.commands.filter((pn)=>pn.role==="native-build"),await ei()}},ln=()=>{if(Us)KN(Us)};v.signal?.addEventListener("abort",ln,{once:!0});let u_=async(li)=>{if(v.signal?.aborted)throw T7();let{platform:Xl}=li;if(!Xl)throw TypeError("Expo native build command is missing a platform.");let Jc=Xl==="android"?"building-android":"building-ios";Dr(Jc);let pn=performance.now(),vg=Xl==="android"&&ce==="wsl"?I1t(P.project,v.androidRoot??iY(ce),v.config.appId,li.args,ve,P.metroPort,v.androidDevice):[M,...li.args];if(Xl==="android"&&ce==="wsl")qe("[android] Mirroring native inputs to the Windows host for accelerated Expo build and launch.");let[$u,...kr]=vg;if(!$u)throw Error("Expo native build command is empty.");let rS=z($u,kr,{cwd:P.project,env:{...process.env,...li.env},stdio:["ignore","pipe","pipe"]});oY(rS,(bg)=>{if(bg)qe(`[${Xl}] ${bg}`)});let Gc=()=>void KN(rS);v.signal?.addEventListener("abort",Gc,{once:!0});let Xf=await l0e(rS);if(v.signal?.removeEventListener("abort",Gc),v.signal?.aborted)throw T7();if(Xf!==0)throw Error(`Expo ${Xl} development build exited with status ${Xf}.`);if(Xl==="android"&&ce!=="wsl"){let bg=v.androidRoot??process.env.ANDROID_HOME??process.env.ANDROID_SDK_ROOT??iY(ce),$0=v.androidAdb??iLe(bg,"platform-tools",ce==="windows"?"adb.exe":"adb");D1t($0,v.config.appId,P.metroPort,ve,v.androidDevice),qe("Connected the Expo Android development client to Metro.")}if(Xl==="ios"&&v.certificateAuthorityPath&&v.iosOrigin&&new URL(v.iosOrigin).protocol==="https:"&&!v.iosDevice){Dr("enrolling-trust");let bg=performance.now(),$0={cwd:P.project,signal:v.signal,log:(Wi)=>Wi&&qe(`[ios-trust] ${Wi}`)},U2=await dB(z,"xcrun",["simctl","keychain","booted","add-root-cert",v.certificateAuthorityPath],$0);if(U2!==0)throw Error(`Expo iOS Simulator development CA trust exited with status ${U2}.`);await dB(z,"xcrun",["simctl","terminate","booted",v.config.appId],$0);let uP=await dB(z,"xcrun",["simctl","launch","booted",v.config.appId],$0);if(uP!==0)throw Error(`Expo iOS Simulator relaunch exited with status ${uP}.`);qe("Installed the AbsoluteJS development CA into the Expo iOS Simulator and relaunched the app."),vr("enrolling-trust",performance.now()-bg)}if(Xl==="ios"&&!v.iosDevice){let bg={cwd:P.project,signal:v.signal,log:(U2)=>U2&&qe(`[ios-connect] ${U2}`)};await dB(z,"xcrun",["simctl","terminate","booted",v.config.appId],bg);let $0=await dB(z,"xcrun",["simctl","openurl","booted",oLe(v.config.appId,v.metroHost??"localhost",P.metroPort)],bg);if($0!==0)throw Error(`Expo iOS Simulator Metro connection exited with status ${$0}.`);qe("Connected the Expo iOS Simulator development client to Metro.")}let Ea=performance.now()-pn;at[Jc]=Ea,v.onPhaseTiming?.({durationMs:Ea,phase:Jc})},So=async(li)=>{let[Xl,...Jc]=li;if(!Xl)return;await u_(Xl),await So(Jc)},RT=async()=>{if(!v.iosDevice||!v.certificateAuthorityPath||!v.iosOrigin||new URL(v.iosOrigin).protocol!=="https:")return;Dr("enrolling-trust");let li=performance.now();yt=await(v.startCaEnrollmentServer??sY)({certificateAuthorityPath:v.certificateAuthorityPath,displayHost:new URL(v.iosOrigin).hostname}),qe(`On the iOS device, open ${yt.url}, install the AbsoluteJS development CA profile, then enable it under Settings > General > About > Certificate Trust Settings. This public CA endpoint exists only for this dev session.`),vr("enrolling-trust",performance.now()-li)};try{if(await RT(),await ei(),os)vr("starting-metro",performance.now()-Pi,{...$a>0?{reason:"metro-port-conflict",retryCount:$a}:{}});await So(Nt),Dr("ready");let li=!1,Xl=Promise.resolve(),Jc={metroPort:P.metroPort,platforms:v.platforms,timings:at,close:async()=>{if(li)return;if(li=!0,v.signal?.removeEventListener("abort",ln),await Xl,Us)await KN(Us);await cr(),Dr("closed")},rebuild:()=>{let pn=Xl.then(async()=>{if(li)throw Error("The Expo development session is closed.");if(xe)await Ot(xe);return await So(Nt),Dr("ready"),Jc});return Xl=pn.then(()=>{return},()=>{return}),pn}};return Jc}catch(li){if(v.signal?.removeEventListener("abort",ln),Us)await KN(Us);throw await cr(),Dr("failed"),li}};import{access as JTt,mkdir as V0e,mkdtemp as UTt,readdir as x9e,readFile as xB,rename as TY,rm as kY,writeFile as q0e}from"fs/promises";import{createHash as TB}from"crypto";import{basename as zTt,dirname as kB,join as Gl,relative as W0e,resolve as WTt,sep as VTt}from"path";var O1t="0.8.0",F1t="0.9.3",lY="0.7.1",u0e="0.0.12";var PEt=["@capacitor/core@8.5.0","@capacitor/app@8.1.1","@capacitor/browser@8.0.4","@capacitor/network@8.0.1","@capacitor/preferences@8.0.1","@capacitor/cli@8.5.0","@capacitor/android@8.5.0","@capacitor/ios@8.5.0",`@absolutejs/devices@${lY}`,`@absolutejs/devices-capacitor@${O1t}`],DEt=[`@absolutejs/sync-capacitor@${F1t}`,"@capacitor-community/sqlite@8.1.1"];var IEt=[`@absolutejs/devices@${lY}`,`@absolutejs/devices-expo@${u0e}`];import{readFileSync as R1t}from"fs";import{join as M1t}from"path";var L1t="@absolutejs/auth",lLe="0.76.3",uLe="@absolutejs/auth-expo",_Le="0.0.6",fLe="2.31.0",pLe="@absolutejs/sync-expo",dLe="0.0.4";var j1t=["openid","profile"],B1t="@absolutejs/sync",mLe=(v)=>{try{return JSON.parse(R1t(M1t(v,"package.json"),"utf8"))}catch{return}},gLe=(v,P)=>{if(typeof v!=="object"||v===null)return!1;return[Reflect.get(v,"dependencies"),Reflect.get(v,"devDependencies"),Reflect.get(v,"optionalDependencies"),Reflect.get(v,"peerDependencies")].some((M)=>typeof M==="object"&&M!==null&&Object.hasOwn(M,P))},J1t=(v)=>{let P=v.deepLinkScheme??v.appId.toLowerCase();return{clientId:`absolutejs-native:${v.appId}`,issuer:v.productionOrigin,redirectUri:`${P}://auth/callback`,scopes:[...j1t]}};var _0e=(v)=>gLe(mLe(v),L1t),ZA=(v)=>gLe(mLe(v),B1t),uY=(v,P)=>_0e(v)?J1t(P):void 0;import{readFileSync as q1t}from"fs";import{dirname as $1t,join as kLe,resolve as CLe}from"path";var hLe=Symbol.for("@absolutejs/sync/client-runtime-transport"),yLe=globalThis,U1t=(v)=>typeof v==="object"&&v!==null&&Array.isArray(Reflect.get(v,"installations"))&&Array.isArray(Reflect.get(v,"clients")),MEt=(()=>{let v=yLe[hLe];if(U1t(v))return v;if(typeof v==="object"&&v!==null&&Array.isArray(Reflect.get(v,"installations")))return Reflect.set(v,"clients",[]),v;let P={clients:[],installations:[]};return Object.defineProperty(yLe,hLe,{configurable:!1,enumerable:!1,value:P,writable:!1}),P})();class NT extends Error{code;constructor(v,P){super(P);this.name="SyncLocalDataPolicyError",this.code=v}}class pE extends Error{code;storedVersion;targetVersion;constructor(v,P,M={}){super(P);this.name="SyncLocalStoreSchemaError",this.code=v,this.storedVersion=M.storedVersion,this.targetVersion=M.targetVersion}}var _Y=(v,P)=>{if(!Number.isSafeInteger(v)||v<1)throw new pE("INVALID_PLAN",`${P} must be a positive safe integer`);return v},z1t=(v)=>("components"in v),vLe=(v,P)=>{if(v.length===0||v.trim()!==v||/^\*+$/.test(v)||v.includes("**"))throw new NT("INVALID_POLICY",`${P}.match must be an exact name or a non-empty glob without adjacent wildcards.`)},W1t=(v,P="localData")=>{if(v.maxBytesPerNamespace!==void 0&&(!Number.isSafeInteger(v.maxBytesPerNamespace)||v.maxBytesPerNamespace<1))throw new NT("INVALID_POLICY",`${P}.maxBytesPerNamespace must be a positive safe integer.`);for(let[M,z]of(v.collections??[]).entries()){if(vLe(z.match,`${P}.collections[${M}]`),z.maxAgeMs!==void 0&&(!Number.isSafeInteger(z.maxAgeMs)||z.maxAgeMs<1))throw new NT("INVALID_POLICY",`${P}.collections[${M}].maxAgeMs must be a positive safe integer.`);if(z.persistence==="memory-only"&&z.protection==="required")throw new NT("INVALID_POLICY",`${P}.collections[${M}] cannot require at-rest protection when it is memory-only.`);if(z.sensitivity!==void 0&&z.sensitivity!=="public"&&z.protection!=="required"&&z.persistence!=="memory-only")throw new NT("INVALID_POLICY",`${P}.collections[${M}] declares ${z.sensitivity} data without required protection or memory-only persistence.`)}for(let[M,z]of(v.mutations??[]).entries()){if(vLe(z.match,`${P}.mutations[${M}]`),z.conflict!==void 0&&z.conflict.strategy!=="client-wins"&&z.conflict.strategy!=="manual"&&z.conflict.strategy!=="server-wins")throw new NT("INVALID_POLICY",`${P}.mutations[${M}].conflict.strategy is invalid.`);if(z.conflict?.maxAttempts!==void 0&&(!Number.isSafeInteger(z.conflict.maxAttempts)||z.conflict.maxAttempts<1))throw new NT("INVALID_POLICY",`${P}.mutations[${M}].conflict.maxAttempts must be a positive safe integer.`);if(z.conflict?.maxAttempts!==void 0&&z.conflict.strategy!=="client-wins")throw new NT("INVALID_POLICY",`${P}.mutations[${M}].conflict.maxAttempts is only valid for client-wins.`);if(z.persistence==="memory-only"&&z.protection==="required")throw new NT("INVALID_POLICY",`${P}.mutations[${M}] cannot require at-rest protection when it is memory-only.`);if(z.sensitivity!==void 0&&z.sensitivity!=="public"&&z.protection!=="required"&&z.persistence!=="memory-only")throw new NT("INVALID_POLICY",`${P}.mutations[${M}] declares ${z.sensitivity} arguments without required protection.`)}return v};var V1t=(v={version:1})=>{let P=z1t(v)?[...v.components]:[{...v,id:"@absolutejs/app"}],M=new Set;for(let z of P){if(typeof z.id!=="string"||z.id.trim()!==z.id||z.id.length===0)throw new pE("INVALID_PLAN","Sync schema component id must be non-empty and trimmed");if(M.has(z.id))throw new pE("INVALID_PLAN",`Sync schema component "${z.id}" is declared more than once`);if(M.add(z.id),z.localData)W1t(z.localData,`${z.id}.localData`)}return P.sort((z,ce)=>z.id.localeCompare(ce.id))};var SLe=(v,P={version:1})=>{let M=V1t(P).map((ve)=>{let qe=bLe(ve.version,ve);return{id:ve.id,...bLe(v[ve.id]??qe.minimumCompatibleVersion,ve)}}),z=new Set(M.map((ve)=>ve.id)),ce=Object.keys(v).filter((ve)=>!z.has(ve)).sort();return{components:M,orphanedComponents:ce}};var bLe=(v,P={version:1})=>{_Y(v,"Stored Sync schema version");let M=_Y(P.version,"Target Sync schema version"),z=[...P.migrations??[]].sort((yt,cr)=>yt.toVersion-cr.toVersion),ce=new Set;for(let yt of z){if(_Y(yt.toVersion,"Sync migration toVersion"),ce.has(yt.toVersion))throw new pE("INVALID_PLAN",`Sync migration ${yt.toVersion} is declared more than once`);ce.add(yt.toVersion)}let ve=z[0]?z[0].toVersion-1:M,qe=_Y(P.minimumCompatibleVersion??ve,"Minimum compatible Sync schema version");if(qe>M)throw new pE("INVALID_PLAN","Minimum compatible Sync schema version cannot exceed its target");if(v>M)throw new pE("SCHEMA_TOO_NEW",`Stored Sync schema ${v} is newer than this runtime's schema ${M}`,{storedVersion:v,targetVersion:M});if(v<qe)throw new pE("SCHEMA_TOO_OLD",`Stored Sync schema ${v} is older than the minimum compatible schema ${qe}`,{storedVersion:v,targetVersion:M});let at=[];for(let yt=v+1;yt<=M;yt++){let cr=z.find((vr)=>vr.toVersion===yt);if(cr===void 0)throw new pE("MIGRATION_MISSING",`Sync migration ${yt-1} -> ${yt} is missing`,{storedVersion:v,targetVersion:M});at.push(cr)}return{minimumCompatibleVersion:qe,steps:at,targetVersion:M}};var C7=(v)=>typeof v==="object"&&v!==null&&!Array.isArray(v),f0e=(v)=>{try{let P=JSON.parse(q1t(v,"utf8"));return C7(P)?P:void 0}catch{return}},TLe=(v)=>{let P=Reflect.get(v,"absolutejs");if(!C7(P))return;let M=Reflect.get(P,"sync");if(!C7(M))return;return Reflect.get(M,"localSchema")},H1t=(v,P)=>{let M=CLe(v);while(!0){let z=kLe(M,"node_modules",P,"package.json"),ce=f0e(z);if(ce&&Reflect.get(ce,"name")===P)return z;let ve=$1t(M);if(ve===M)return;M=ve}},bf=(v,P)=>TypeError(`Invalid AbsoluteJS Sync schema metadata for ${v}: ${P}`),k7=(v,P,M)=>{if(typeof v!=="number"||!Number.isSafeInteger(v)||v<1)throw bf(P,`${M} must be a positive safe integer.`);return v},x7=(v,P,M)=>{if(typeof v!=="string"||v.trim()!==v||v.length===0)throw bf(P,`${M} must be a non-empty trimmed string.`);return v},QN=(v,P,M)=>{if(!C7(v))throw bf(P,M);return v},b1=(v,P)=>v[P],p0e=(v,P,M)=>{if(v===null||typeof v==="string"||typeof v==="boolean")return v;if(typeof v==="number"&&Number.isFinite(v))return v;if(Array.isArray(v))return v.map((z)=>p0e(z,P,M));if(C7(v))return Object.fromEntries(Object.entries(v).map(([z,ce])=>[z,p0e(ce,P,M)]));throw bf(P,`${M} must be JSON-safe.`)},G1t=(v,P,M)=>{let z=QN(v,P,`migration operation ${M} must be an object.`),ce=Reflect.get(z,"type"),ve=x7(Reflect.get(z,"collection"),P,`operation ${M}.collection`);if(ce==="delete-collection")return{collection:ve,type:ce};if(ce==="rename-field")return{collection:ve,from:x7(Reflect.get(z,"from"),P,`operation ${M}.from`),to:x7(Reflect.get(z,"to"),P,`operation ${M}.to`),type:ce};let qe=x7(Reflect.get(z,"field"),P,`operation ${M}.field`);if(ce==="remove-field")return{collection:ve,field:qe,type:ce};if(ce==="set-default")return{collection:ve,field:qe,type:ce,value:p0e(Reflect.get(z,"value"),P,`operation ${M}.value`)};throw bf(P,`operation ${M}.type is not supported.`)},X1t=(v,P,M)=>{let z=QN(v,P,`migration ${M} must be an object.`),ce=new Set(["operations","toVersion"]),ve=Object.keys(z).find((yt)=>!ce.has(yt));if(ve)throw bf(P,`migration ${M}.${ve} is not declarative metadata.`);let qe=Reflect.get(z,"operations");if(qe!==void 0&&!Array.isArray(qe))throw bf(P,`migration ${M}.operations must be an array.`);return{operations:(Array.isArray(qe)?qe:[]).map((yt,cr)=>G1t(yt,P,cr)),toVersion:k7(Reflect.get(z,"toVersion"),P,`migration ${M}.toVersion`)}},K1t=(v,P)=>{let M=QN(v,P,"localData must be an object."),z=new Set(["collections","maxBytesPerNamespace","mutations"]),ce=Object.keys(M).find((vr)=>!z.has(vr));if(ce)throw bf(P,`localData.${ce} is not supported.`);let ve=Reflect.get(M,"collections"),qe=Reflect.get(M,"mutations");if(ve!==void 0&&!Array.isArray(ve))throw bf(P,"localData.collections must be an array.");if(qe!==void 0&&!Array.isArray(qe))throw bf(P,"localData.mutations must be an array.");let at=Array.isArray(ve)?ve.map((vr,Dr)=>{let xe=QN(vr,P,`localData.collections[${Dr}] must be an object.`),Hn=new Set(["evictionPriority","match","maxAgeMs","onProtectionUnavailable","persistence","protection","sensitivity"]),Nt=Object.keys(xe).find((ei)=>!Hn.has(ei));if(Nt)throw bf(P,`localData.collections[${Dr}].${Nt} is not supported.`);let Ot=x7(Reflect.get(xe,"match"),P,`localData.collections[${Dr}].match`),os=b1(xe,"persistence"),Pi=b1(xe,"sensitivity"),Us=b1(xe,"protection"),$a=b1(xe,"onProtectionUnavailable"),el=b1(xe,"evictionPriority"),of=b1(xe,"maxAgeMs");if(os!==void 0&&os!=="durable"&&os!=="memory-only")throw bf(P,`localData.collections[${Dr}].persistence is invalid.`);if(Pi!==void 0&&Pi!=="public"&&Pi!=="private"&&Pi!=="secret")throw bf(P,`localData.collections[${Dr}].sensitivity is invalid.`);if(Us!==void 0&&Us!=="none"&&Us!=="required")throw bf(P,`localData.collections[${Dr}].protection is invalid.`);if($a!==void 0&&$a!=="error"&&$a!=="memory-only")throw bf(P,`localData.collections[${Dr}].onProtectionUnavailable is invalid.`);if(el!==void 0&&el!=="critical"&&el!=="normal"&&el!=="disposable")throw bf(P,`localData.collections[${Dr}].evictionPriority is invalid.`);return{match:Ot,...Pi?{sensitivity:Pi}:{},...os?{persistence:os}:{},...Us?{protection:Us}:{},...$a?{onProtectionUnavailable:$a}:{},...el?{evictionPriority:el}:{},...of===void 0?{}:{maxAgeMs:k7(of,P,`localData.collections[${Dr}].maxAgeMs`)}}}):void 0,yt=Array.isArray(qe)?qe.map((vr,Dr)=>{let xe=QN(vr,P,`localData.mutations[${Dr}] must be an object.`),Hn=new Set(["conflict","match","onProtectionUnavailable","persistence","protection","sensitivity"]),Nt=Object.keys(xe).find((of)=>!Hn.has(of));if(Nt)throw bf(P,`localData.mutations[${Dr}].${Nt} is not supported.`);let Ot=b1(xe,"protection"),os=b1(xe,"sensitivity"),Pi=b1(xe,"persistence"),Us=b1(xe,"onProtectionUnavailable"),$a=b1(xe,"conflict"),el;if($a!==void 0){let of=QN($a,P,`localData.mutations[${Dr}].conflict must be an object.`),ei=Object.keys(of).find((So)=>So!=="maxAttempts"&&So!=="strategy");if(ei)throw bf(P,`localData.mutations[${Dr}].conflict.${ei} is not supported.`);let ln=b1(of,"strategy");if(ln!=="client-wins"&&ln!=="manual"&&ln!=="server-wins")throw bf(P,`localData.mutations[${Dr}].conflict.strategy is invalid.`);let u_=b1(of,"maxAttempts");if(u_!==void 0&&ln!=="client-wins")throw bf(P,`localData.mutations[${Dr}].conflict.maxAttempts requires client-wins.`);el={strategy:ln,...u_===void 0?{}:{maxAttempts:k7(u_,P,`localData.mutations[${Dr}].conflict.maxAttempts`)}}}if(Ot!==void 0&&Ot!=="none"&&Ot!=="required")throw bf(P,`localData.mutations[${Dr}].protection is invalid.`);if(os!==void 0&&os!=="public"&&os!=="private"&&os!=="secret")throw bf(P,`localData.mutations[${Dr}].sensitivity is invalid.`);if(Us!==void 0&&Us!=="error"&&Us!=="memory-only")throw bf(P,`localData.mutations[${Dr}].onProtectionUnavailable is invalid.`);if(Pi!==void 0&&Pi!=="durable"&&Pi!=="memory-only")throw bf(P,`localData.mutations[${Dr}].persistence is invalid.`);return{match:x7(Reflect.get(xe,"match"),P,`localData.mutations[${Dr}].match`),...el?{conflict:el}:{},...os?{sensitivity:os}:{},...Us?{onProtectionUnavailable:Us}:{},...Pi?{persistence:Pi}:{},...Ot?{protection:Ot}:{}}}):void 0,cr=Reflect.get(M,"maxBytesPerNamespace");return{...at?{collections:at}:{},...yt?{mutations:yt}:{},...cr===void 0?{}:{maxBytesPerNamespace:k7(cr,P,"localData.maxBytesPerNamespace")}}},xLe=(v,P)=>{let M=QN(P,v,"localSchema must be an object."),z=new Set(["localData","migrations","minimumCompatibleVersion","version"]),ce=Object.keys(M).find((Dr)=>!z.has(Dr));if(ce)throw bf(v,`${ce} is not supported.`);let ve=k7(Reflect.get(M,"version"),v,"version"),qe=Reflect.get(M,"minimumCompatibleVersion"),at=qe===void 0?Math.max(1,ve-2):k7(qe,v,"minimumCompatibleVersion"),yt=Reflect.get(M,"migrations"),cr=Reflect.get(M,"localData");if(yt!==void 0&&!Array.isArray(yt))throw bf(v,"migrations must be an array.");let vr=Array.isArray(yt)?yt:void 0;return{id:v,...cr===void 0?{}:{localData:K1t(cr,v)},minimumCompatibleVersion:at,...Array.isArray(vr)?{migrations:vr.map((Dr,xe)=>X1t(Dr,v,xe))}:{},version:ve}},Q1t=(v)=>[Reflect.get(v,"dependencies"),Reflect.get(v,"optionalDependencies"),Reflect.get(v,"devDependencies"),Reflect.get(v,"peerDependencies")].flatMap((P)=>C7(P)?Object.keys(P):[]).filter((P,M,z)=>z.indexOf(P)===M).sort(),E7=(v)=>{let P=kLe(CLe(v),"package.json"),M=f0e(P);if(!M)return{components:[{id:"@absolutejs/app",minimumCompatibleVersion:1,version:1}],sources:[]};let z=TLe(M),ce=[z===void 0?{id:"@absolutejs/app",minimumCompatibleVersion:1,version:1}:xLe("@absolutejs/app",z)],ve=[{id:"@absolutejs/app",manifestPath:P}];for(let qe of Q1t(M)){let at=H1t(v,qe);if(!at)continue;let yt=f0e(at);if(!yt)continue;let cr=TLe(yt);if(cr===void 0)continue;ce.push(xLe(qe,cr)),ve.push({id:qe,manifestPath:at})}return ce.sort((qe,at)=>qe.id.localeCompare(at.id)),ve.sort((qe,at)=>qe.id.localeCompare(at.id)),SLe({},{components:ce}),{components:ce,sources:ve}};var V0=hvt(i9e());import{existsSync as ASt,readFileSync as R0e}from"fs";import{extname as PSt,join as M0e,relative as DSt,resolve as N7}from"path";import{fileURLToPath as ISt}from"url";var s9e="@absolutejs/devices",NSt=["keyboard","systemBars"],OSt={capacitor:"@absolutejs/devices-capacitor",expo:"@absolutejs/devices-expo"},FSt=new Bun.Glob("**/*.{js,jsx,ts,tsx,svelte,vue}"),RSt=new Set([".absolutejs",".git",".test-builds",".test-shards","build","dist","node_modules","test","tests"]),a9e=/^[A-Za-z_$][\w$]*$/u,MSt=(v)=>new RegExp(`^@absolutejs/devices-${v}/[a-z][a-z0-9-]*$`,"u"),LSt=(v)=>v==="capacitor"?/^@capacitor\/[a-z][a-z0-9-]*@\d+\.\d+\.\d+$/u:/^(?:expo-[a-z][a-z0-9-]*|@react-native-[a-z0-9-]+\/[a-z][a-z0-9-]*)@\d+\.\d+\.\d+$/u,jSt=(v)=>v==="capacitor"?"Capacitor":"Expo",BSt=/^android\.permission\.[A-Z][A-Z0-9_]*$/u,JSt=new Set(["camera","location-always","location-when-in-use","photo-library","photo-library-add"]),USt={NSPrivacyAccessedAPICategoryFileTimestamp:new Set(["C617.1"])},hY=["NSPrivacyAccessedAPICategoryFileTimestamp"],L2=(v)=>typeof v==="object"&&v!==null&&!Array.isArray(v),L0e=(v)=>{let P=JSON.parse(R0e(v,"utf8"));if(!L2(P))throw TypeError(`${v} must contain an object.`);return P},o9e=(v,P)=>{if(typeof v!=="string"||v.length===0)throw TypeError(`${P} must be a non-empty string.`);return v},zSt=(v,P)=>{if(v===void 0)return;if(!L2(v))throw TypeError(`${P} must be an object.`);let{permissions:M}=v;if(!Array.isArray(M)||!M.every((z)=>typeof z==="string"&&BSt.test(z)))throw TypeError(`${P}.permissions must contain Android permission names.`);return[...M]},WSt=(v,P)=>{if(v===void 0)return;if(!L2(v))throw TypeError(`${P} must be an object.`);let M={};for(let z of hY){let ce=v[z];if(ce===void 0)continue;let ve=USt[z];if(!Array.isArray(ce)||ce.length===0||!ce.every((qe)=>typeof qe==="string"&&ve.has(qe)))throw TypeError(`${P} contains an unsupported API or reason.`);M[z]=[...ce]}if(Object.keys(v).some((z)=>!hY.some((ce)=>ce===z)))throw TypeError(`${P} contains an unsupported API or reason.`);return M},VSt=(v,P)=>{if(v===void 0)return;if(!L2(v))throw TypeError(`${P} must be an object.`);let{privacyAccessedApis:M,pushNotifications:z,systemBars:ce,usageDescriptions:ve}=v;if(z!==void 0&&z!==!0)throw TypeError(`${P}.pushNotifications must be true.`);if(ce!==void 0&&ce!==!0)throw TypeError(`${P}.systemBars must be true.`);if(ve!==void 0&&(!Array.isArray(ve)||!ve.every((at)=>typeof at==="string"&&JSt.has(at))))throw TypeError(`${P}.usageDescriptions contains an unsupported purpose.`);let qe=WSt(M,`${P}.privacyAccessedApis`);return{...qe===void 0?{}:{privacyAccessedApis:qe},...z===!0?{pushNotifications:!0}:{},...ce===!0?{systemBars:!0}:{},...ve===void 0?{}:{usageDescriptions:[...ve]}}},qSt=(v,P,M)=>{if(!a9e.test(v))throw TypeError("Device capability names must be identifiers.");if(!L2(P))throw TypeError(`Device capability ${v} must be an object.`);let z=o9e(P.factory,`${v}.factory`),ce=o9e(P.module,`${v}.module`);if(!a9e.test(z))throw TypeError(`${v}.factory must be a JavaScript identifier.`);if(!MSt(M).test(ce))throw TypeError(`${v}.module must be an official devices-${M} subpath.`);if(!Array.isArray(P.packages)||!P.packages.every((yt)=>typeof yt==="string"&&LSt(M).test(yt)))throw TypeError(`${v}.packages must contain exact official ${jSt(M)} package versions.`);let{plugins:ve}=P;if(ve!==void 0&&(!Array.isArray(ve)||!ve.every((yt)=>typeof yt==="string"&&/^expo-[a-z][a-z0-9-]*$/u.test(yt))))throw TypeError(`${v}.plugins must contain Expo config plugin names.`);let qe,{native:at}=P;if(at!==void 0){if(!L2(at))throw TypeError(`${v}.native must be an object.`);let{android:yt,ios:cr}=at,vr=zSt(yt,`${v}.native.android`),Dr=VSt(cr,`${v}.native.ios`);qe={...vr===void 0?{}:{android:{permissions:vr}},...Dr===void 0?{}:{ios:Dr}}}return{factory:z,module:ce,...qe===void 0?{}:{native:qe},...ve===void 0?{}:{plugins:[...ve]},packages:[...P.packages]}},e6=(v)=>{let P=v.capabilities.reduce((M,z)=>{for(let ce of hY){let ve=v.providers[z]?.native?.ios?.privacyAccessedApis?.[ce]??[];if(ve.length===0)continue;let qe=M[ce]??new Set;for(let at of ve)qe.add(at);M[ce]=qe}return M},{});return{androidPermissions:[...new Set(v.capabilities.flatMap((M)=>v.providers[M]?.native?.android?.permissions??[]))].sort(),iosPrivacyAccessedApis:hY.flatMap((M)=>{let z=P[M];return z?[{api:M,reasons:[...z].sort()}]:[]}),iosPushNotifications:v.capabilities.some((M)=>v.providers[M]?.native?.ios?.pushNotifications===!0),iosSystemBars:v.capabilities.some((M)=>v.providers[M]?.native?.ios?.systemBars===!0),iosUsageDescriptions:[...new Set(v.capabilities.flatMap((M)=>v.providers[M]?.native?.ios?.usageDescriptions??[]))].sort()}},$St=(v,P)=>{try{return ISt(import.meta.resolve(`${v}/package.json`))}catch{throw TypeError(`${v} is not installed. Run \`absolute mobile init\` to install the ${P==="expo"?"Expo":"Capacitor"} device adapters.`)}},c9e=(v,P="capacitor")=>{let M=OSt[P],z=M0e(N7(v),"node_modules",M,"package.json");try{R0e(z,"utf8")}catch{z=$St(M,P)}let ce=L0e(z),{absolutejs:ve}=ce,qe=L2(ve)?ve.devices:void 0;if(!L2(qe)||qe.format!==1||qe.provider!==P||!L2(qe.capabilities))throw TypeError(`${M} does not publish supported capability metadata.`);let at=Object.entries(qe.capabilities).map(([yt,cr])=>({name:yt,provider:qSt(yt,cr,P)}));return Object.fromEntries(at.sort((yt,cr)=>yt.name.localeCompare(cr.name)).map(({name:yt,provider:cr})=>[yt,cr]))},HSt=(v)=>v.split("/").some((P)=>RSt.has(P)),GSt=(v,P)=>{let M=new Set,z=new Set,ce=(at)=>{if(V0.default.isImportDeclaration(at)&&V0.default.isStringLiteral(at.moduleSpecifier)&&at.moduleSpecifier.text===s9e&&!at.importClause?.isTypeOnly){let yt=at.importClause?.namedBindings;if(yt&&V0.default.isNamedImports(yt)){for(let cr of yt.elements)if(!cr.isTypeOnly)M.add((cr.propertyName??cr.name).text)}if(yt&&V0.default.isNamespaceImport(yt))z.add(yt.name.text)}if(V0.default.isExportDeclaration(at)&&!at.isTypeOnly&&at.moduleSpecifier!==void 0&&V0.default.isStringLiteral(at.moduleSpecifier)&&at.moduleSpecifier.text===s9e&&at.exportClause&&V0.default.isNamedExports(at.exportClause)){for(let yt of at.exportClause.elements)if(!yt.isTypeOnly)M.add((yt.propertyName??yt.name).text)}if(V0.default.isPropertyAccessExpression(at)&&V0.default.isIdentifier(at.expression)&&z.has(at.expression.text))M.add(at.name.text);V0.default.forEachChild(at,ce)},ve=PSt(P).toLowerCase(),qe=ve===".svelte"||ve===".vue"?[...v.matchAll(/<script\b[^>]*>([\s\S]*?)<\/script\s*>/giu)].map((at)=>at[1]).filter((at)=>at!==void 0):[v];for(let[at,yt]of qe.entries())ce(V0.default.createSourceFile(`${P}#script-${at}`,yt,V0.default.ScriptTarget.Latest,!0,V0.default.ScriptKind.TSX));return M},l9e=(v,P)=>{let M=QSt(P,XSt(v)),z=P.requiredPackages.filter((ve)=>{let qe=ve.lastIndexOf("@"),at=ve.slice(0,qe);if(M.includes(ve))return!1;try{return L0e(M0e(N7(v),"node_modules",at,"package.json")).version!==ve.slice(qe+1)}catch{return!0}}),ce=[...M,...z];if(ce.length>0)throw TypeError(`Device capabilities ${P.capabilities.join(", ")} require ${ce.join(", ")}. Run absolute mobile sync and approve the detected capability plugins.`)},XSt=(v)=>{let P=L0e(M0e(N7(v),"package.json")),M=new Set;for(let z of["dependencies","devDependencies"]){let ce=P[z];if(L2(ce))for(let ve of Object.keys(ce))M.add(ve)}return M},KSt=(v,P=c9e(v))=>{let M=N7(v);if(!ASt(M))return[];let z=new Set(Object.keys(P)),ce=new Set;for(let ve of FSt.scanSync({cwd:M})){let qe=DSt(M,N7(M,ve)).replaceAll("\\","/");if(HSt(qe))continue;let at=R0e(N7(M,qe),"utf8");for(let yt of GSt(at,qe))if(z.has(yt))ce.add(yt)}return[...ce].sort()},QSt=(v,P)=>v.requiredPackages.filter((M)=>{let z=M.slice(0,M.lastIndexOf("@"));return!P.has(z)});var rP=(v,P="capacitor")=>{let M=c9e(v,P),z=KSt(v,M);for(let ve of NSt)if(M[ve]&&!z.includes(ve))z.push(ve);z.sort();let ce={};for(let ve of z){let qe=M[ve];if(qe)ce[ve]=qe}return{capabilities:z,providers:ce,requiredPackages:[...new Set(z.flatMap((ve)=>ce[ve]?.packages??[]))].sort()}};import{createHash as ZSt}from"crypto";var YSt=(v)=>typeof v==="object"&&v!==null&&!Array.isArray(v),j0e=(v)=>{if(Array.isArray(v))return v.map(j0e);if(!YSt(v))return v;return Object.fromEntries(Object.keys(v).sort().map((P)=>[P,j0e(v[P])]))};var u9e=(v)=>JSON.stringify(j0e(v));var eTt=2,tTt=1,rTt=(v)=>({appId:v.config.appId,auth:v.auth??null,deepLinks:{hosts:v.config.deepLinkHosts,...v.config.deepLinkScheme?{scheme:v.config.deepLinkScheme}:{}},deviceCapabilities:v.deviceCapabilities,engine:v.config.engine,...v.config.engine==="expo"?{expoEmbeddedAssetsAbi:1}:{},format:tTt,shellAbi:eTt,syncSchema:v.syncSchema??null,updates:v.config.updates??null}),nTt=(v)=>ZSt("sha256").update(u9e(v)).digest("hex"),yY=(v,P)=>{let M=uY(P,v),z=M!==void 0&&ZA(P),ce=z?E7(P):void 0,ve=rP(P,v.engine),qe=rTt({...M?{auth:M}:{},config:v,deviceCapabilities:ve,...ce?{syncSchema:ce}:{}});return{auth:M,descriptor:qe,deviceCapabilities:ve,fingerprint:nTt(qe),sync:z,syncSchema:ce}};import{join as t6}from"path";var bB=`// Generated by AbsoluteJS. Edit absolute.config.ts, then run absolute mobile sync.
|
|
479
|
+
`)}),z.on("end",()=>{if(ce)P(ce)})};M(v.stdout),M(v.stderr)},KN=async(v)=>{if(v.exitCode!==null||v.killed)return;if(v.kill("SIGTERM"),await Promise.race([new Promise((P)=>v.once("exit",()=>P())),new Promise((P)=>setTimeout(P,S1t))]),v.exitCode===null)v.kill("SIGKILL")},l0e=(v)=>new Promise((P)=>{if(v.exitCode!==null){P(v.exitCode);return}v.once("exit",(M)=>P(M??1))}),dB=async(v,P,M,z)=>{let ce=v(P,M,{cwd:z.cwd,env:z.env??process.env,stdio:["ignore","pipe","pipe"]});oY(ce,z.log);let ve=()=>void KN(ce);z.signal?.addEventListener("abort",ve,{once:!0});let qe=await l0e(ce);if(z.signal?.removeEventListener("abort",ve),z.signal?.aborted)throw T7();return qe};var cLe=async(v)=>{let P=nLe(v.config,v),M=v.executable??await cY(P.project),z=v.spawnProcess??m1t,ce=v.host??XN(),ve=v.capture??A1t,qe=v.log??(()=>{return}),at={},yt=null,cr=async()=>{let li=yt;yt=null,await li?.close()},vr=(li,Xl,Jc={})=>{at[li]=(at[li]??0)+Xl,v.onPhaseTiming?.({durationMs:Xl,phase:li,...Jc})},Dr=(li)=>{v.onStateChange?.(li)};if(v.signal?.aborted)throw T7();let xe=P.commands.find((li)=>li.role==="native-prepare"),Hn=P.commands.find((li)=>li.role==="metro"),Nt=P.commands.filter((li)=>li.role==="native-build"),Ot=async(li)=>{Dr("preparing-native");let Xl=performance.now(),Jc=z(M,li.args,{cwd:P.project,env:{...process.env,...li.env},stdio:["ignore","pipe","pipe"]});oY(Jc,($u)=>{if($u)qe(`[prebuild] ${$u}`)});let pn=()=>void KN(Jc);v.signal?.addEventListener("abort",pn,{once:!0});let vg=await l0e(Jc);if(v.signal?.removeEventListener("abort",pn),v.signal?.aborted)throw T7();if(vg!==0)throw Dr("failed"),Error(`Expo native preparation exited with status ${vg}.`);vr("preparing-native",performance.now()-Xl)};if(xe)await Ot(xe);let os=Hn!==void 0;if(os)Dr("starting-metro");let Pi=performance.now(),Us,$a=0,el=[P.metroPort],of=(li)=>new Promise((Xl,Jc)=>{let pn=!1,vg=!1,$u=setTimeout(()=>{Jc(Error("Expo Metro did not become ready within 120 seconds."))},y1t);oY(li,(kr)=>{if(kr)qe(`[metro] ${kr}`);if(E1t(kr))vg=!0;if(!pn&&/(?:Waiting on|Metro waiting on|Dev server ready)/iu.test(kr))pn=!0,clearTimeout($u),Xl()}),li.once("exit",(kr)=>{if(pn)return;clearTimeout($u),Jc(new c0e(kr??1,vg))})}),ei=async()=>{if(!Hn)return;if(v.signal?.aborted)throw T7();Us=z(M,Hn.args,{cwd:P.project,env:{...process.env,...Hn.env},stdio:["ignore","pipe","pipe"]});try{await of(Us)}catch(li){if(!(li instanceof c0e)||!li.conflict||el.length>=v1t)throw li;await KN(Us);let Jc=await(v.allocateMetroPort??C1t)(el);if(!Number.isSafeInteger(Jc)||Jc<1||Jc>b1t||el.includes(Jc))throw Error("Could not allocate a distinct replacement Metro port.",{cause:li});el.push(Jc),$a+=1,qe("Metro port was claimed during startup; retrying automatically on a new port."),P=nLe(v.config,{...v,metroPort:Jc}),Hn=P.commands.find((pn)=>pn.role==="metro"),Nt=P.commands.filter((pn)=>pn.role==="native-build"),await ei()}},ln=()=>{if(Us)KN(Us)};v.signal?.addEventListener("abort",ln,{once:!0});let u_=async(li)=>{if(v.signal?.aborted)throw T7();let{platform:Xl}=li;if(!Xl)throw TypeError("Expo native build command is missing a platform.");let Jc=Xl==="android"?"building-android":"building-ios";Dr(Jc);let pn=performance.now(),vg=Xl==="android"&&ce==="wsl"?I1t(P.project,v.androidRoot??iY(ce),v.config.appId,li.args,ve,P.metroPort,v.androidDevice):[M,...li.args];if(Xl==="android"&&ce==="wsl")qe("[android] Mirroring native inputs to the Windows host for accelerated Expo build and launch.");let[$u,...kr]=vg;if(!$u)throw Error("Expo native build command is empty.");let rS=z($u,kr,{cwd:P.project,env:{...process.env,...li.env},stdio:["ignore","pipe","pipe"]});oY(rS,(bg)=>{if(bg)qe(`[${Xl}] ${bg}`)});let Gc=()=>void KN(rS);v.signal?.addEventListener("abort",Gc,{once:!0});let Xf=await l0e(rS);if(v.signal?.removeEventListener("abort",Gc),v.signal?.aborted)throw T7();if(Xf!==0)throw Error(`Expo ${Xl} development build exited with status ${Xf}.`);if(Xl==="android"&&ce!=="wsl"){let bg=v.androidRoot??process.env.ANDROID_HOME??process.env.ANDROID_SDK_ROOT??iY(ce),$0=v.androidAdb??iLe(bg,"platform-tools",ce==="windows"?"adb.exe":"adb");D1t($0,v.config.appId,P.metroPort,ve,v.androidDevice),qe("Connected the Expo Android development client to Metro.")}if(Xl==="ios"&&v.certificateAuthorityPath&&v.iosOrigin&&new URL(v.iosOrigin).protocol==="https:"&&!v.iosDevice){Dr("enrolling-trust");let bg=performance.now(),$0={cwd:P.project,signal:v.signal,log:(Wi)=>Wi&&qe(`[ios-trust] ${Wi}`)},U2=await dB(z,"xcrun",["simctl","keychain","booted","add-root-cert",v.certificateAuthorityPath],$0);if(U2!==0)throw Error(`Expo iOS Simulator development CA trust exited with status ${U2}.`);await dB(z,"xcrun",["simctl","terminate","booted",v.config.appId],$0);let uP=await dB(z,"xcrun",["simctl","launch","booted",v.config.appId],$0);if(uP!==0)throw Error(`Expo iOS Simulator relaunch exited with status ${uP}.`);qe("Installed the AbsoluteJS development CA into the Expo iOS Simulator and relaunched the app."),vr("enrolling-trust",performance.now()-bg)}if(Xl==="ios"&&!v.iosDevice){let bg={cwd:P.project,signal:v.signal,log:(U2)=>U2&&qe(`[ios-connect] ${U2}`)};await dB(z,"xcrun",["simctl","terminate","booted",v.config.appId],bg);let $0=await dB(z,"xcrun",["simctl","openurl","booted",oLe(v.config.appId,v.metroHost??"localhost",P.metroPort)],bg);if($0!==0)throw Error(`Expo iOS Simulator Metro connection exited with status ${$0}.`);qe("Connected the Expo iOS Simulator development client to Metro.")}let Ea=performance.now()-pn;at[Jc]=Ea,v.onPhaseTiming?.({durationMs:Ea,phase:Jc})},So=async(li)=>{let[Xl,...Jc]=li;if(!Xl)return;await u_(Xl),await So(Jc)},RT=async()=>{if(!v.iosDevice||!v.certificateAuthorityPath||!v.iosOrigin||new URL(v.iosOrigin).protocol!=="https:")return;Dr("enrolling-trust");let li=performance.now();yt=await(v.startCaEnrollmentServer??sY)({certificateAuthorityPath:v.certificateAuthorityPath,displayHost:new URL(v.iosOrigin).hostname}),qe(`On the iOS device, open ${yt.url}, install the AbsoluteJS development CA profile, then enable it under Settings > General > About > Certificate Trust Settings. This public CA endpoint exists only for this dev session.`),vr("enrolling-trust",performance.now()-li)};try{if(await RT(),await ei(),os)vr("starting-metro",performance.now()-Pi,{...$a>0?{reason:"metro-port-conflict",retryCount:$a}:{}});await So(Nt),Dr("ready");let li=!1,Xl=Promise.resolve(),Jc={metroPort:P.metroPort,platforms:v.platforms,timings:at,close:async()=>{if(li)return;if(li=!0,v.signal?.removeEventListener("abort",ln),await Xl,Us)await KN(Us);await cr(),Dr("closed")},rebuild:()=>{let pn=Xl.then(async()=>{if(li)throw Error("The Expo development session is closed.");if(xe)await Ot(xe);return await So(Nt),Dr("ready"),Jc});return Xl=pn.then(()=>{return},()=>{return}),pn}};return Jc}catch(li){if(v.signal?.removeEventListener("abort",ln),Us)await KN(Us);throw await cr(),Dr("failed"),li}};import{access as JTt,mkdir as V0e,mkdtemp as UTt,readdir as x9e,readFile as xB,rename as TY,rm as kY,writeFile as q0e}from"fs/promises";import{createHash as TB}from"crypto";import{basename as zTt,dirname as kB,join as Gl,relative as W0e,resolve as WTt,sep as VTt}from"path";var O1t="0.8.0",F1t="0.9.4",lY="0.7.1",u0e="0.0.12";var PEt=["@capacitor/core@8.5.0","@capacitor/app@8.1.1","@capacitor/browser@8.0.4","@capacitor/network@8.0.1","@capacitor/preferences@8.0.1","@capacitor/cli@8.5.0","@capacitor/android@8.5.0","@capacitor/ios@8.5.0",`@absolutejs/devices@${lY}`,`@absolutejs/devices-capacitor@${O1t}`],DEt=[`@absolutejs/sync-capacitor@${F1t}`,"@capacitor-community/sqlite@8.1.1"];var IEt=[`@absolutejs/devices@${lY}`,`@absolutejs/devices-expo@${u0e}`];import{readFileSync as R1t}from"fs";import{join as M1t}from"path";var L1t="@absolutejs/auth",lLe="0.76.3",uLe="@absolutejs/auth-expo",_Le="0.0.6",fLe="2.31.0",pLe="@absolutejs/sync-expo",dLe="0.0.4";var j1t=["openid","profile"],B1t="@absolutejs/sync",mLe=(v)=>{try{return JSON.parse(R1t(M1t(v,"package.json"),"utf8"))}catch{return}},gLe=(v,P)=>{if(typeof v!=="object"||v===null)return!1;return[Reflect.get(v,"dependencies"),Reflect.get(v,"devDependencies"),Reflect.get(v,"optionalDependencies"),Reflect.get(v,"peerDependencies")].some((M)=>typeof M==="object"&&M!==null&&Object.hasOwn(M,P))},J1t=(v)=>{let P=v.deepLinkScheme??v.appId.toLowerCase();return{clientId:`absolutejs-native:${v.appId}`,issuer:v.productionOrigin,redirectUri:`${P}://auth/callback`,scopes:[...j1t]}};var _0e=(v)=>gLe(mLe(v),L1t),ZA=(v)=>gLe(mLe(v),B1t),uY=(v,P)=>_0e(v)?J1t(P):void 0;import{readFileSync as q1t}from"fs";import{dirname as $1t,join as kLe,resolve as CLe}from"path";class NT extends Error{code;constructor(v,P){super(P);this.name="SyncLocalDataPolicyError",this.code=v}}class pE extends Error{code;storedVersion;targetVersion;constructor(v,P,M={}){super(P);this.name="SyncLocalStoreSchemaError",this.code=v,this.storedVersion=M.storedVersion,this.targetVersion=M.targetVersion}}var _Y=(v,P)=>{if(!Number.isSafeInteger(v)||v<1)throw new pE("INVALID_PLAN",`${P} must be a positive safe integer`);return v},U1t=(v)=>("components"in v),hLe=(v,P)=>{if(v.length===0||v.trim()!==v||/^\*+$/.test(v)||v.includes("**"))throw new NT("INVALID_POLICY",`${P}.match must be an exact name or a non-empty glob without adjacent wildcards.`)},z1t=(v,P="localData")=>{if(v.maxBytesPerNamespace!==void 0&&(!Number.isSafeInteger(v.maxBytesPerNamespace)||v.maxBytesPerNamespace<1))throw new NT("INVALID_POLICY",`${P}.maxBytesPerNamespace must be a positive safe integer.`);for(let[M,z]of(v.collections??[]).entries()){if(hLe(z.match,`${P}.collections[${M}]`),z.maxAgeMs!==void 0&&(!Number.isSafeInteger(z.maxAgeMs)||z.maxAgeMs<1))throw new NT("INVALID_POLICY",`${P}.collections[${M}].maxAgeMs must be a positive safe integer.`);if(z.persistence==="memory-only"&&z.protection==="required")throw new NT("INVALID_POLICY",`${P}.collections[${M}] cannot require at-rest protection when it is memory-only.`);if(z.sensitivity!==void 0&&z.sensitivity!=="public"&&z.protection!=="required"&&z.persistence!=="memory-only")throw new NT("INVALID_POLICY",`${P}.collections[${M}] declares ${z.sensitivity} data without required protection or memory-only persistence.`)}for(let[M,z]of(v.mutations??[]).entries()){if(hLe(z.match,`${P}.mutations[${M}]`),z.conflict!==void 0&&z.conflict.strategy!=="client-wins"&&z.conflict.strategy!=="manual"&&z.conflict.strategy!=="server-wins")throw new NT("INVALID_POLICY",`${P}.mutations[${M}].conflict.strategy is invalid.`);if(z.conflict?.maxAttempts!==void 0&&(!Number.isSafeInteger(z.conflict.maxAttempts)||z.conflict.maxAttempts<1))throw new NT("INVALID_POLICY",`${P}.mutations[${M}].conflict.maxAttempts must be a positive safe integer.`);if(z.conflict?.maxAttempts!==void 0&&z.conflict.strategy!=="client-wins")throw new NT("INVALID_POLICY",`${P}.mutations[${M}].conflict.maxAttempts is only valid for client-wins.`);if(z.persistence==="memory-only"&&z.protection==="required")throw new NT("INVALID_POLICY",`${P}.mutations[${M}] cannot require at-rest protection when it is memory-only.`);if(z.sensitivity!==void 0&&z.sensitivity!=="public"&&z.protection!=="required"&&z.persistence!=="memory-only")throw new NT("INVALID_POLICY",`${P}.mutations[${M}] declares ${z.sensitivity} arguments without required protection.`)}return v};var W1t=(v={version:1})=>{let P=U1t(v)?[...v.components]:[{...v,id:"@absolutejs/app"}],M=new Set;for(let z of P){if(typeof z.id!=="string"||z.id.trim()!==z.id||z.id.length===0)throw new pE("INVALID_PLAN","Sync schema component id must be non-empty and trimmed");if(M.has(z.id))throw new pE("INVALID_PLAN",`Sync schema component "${z.id}" is declared more than once`);if(M.add(z.id),z.localData)z1t(z.localData,`${z.id}.localData`)}return P.sort((z,ce)=>z.id.localeCompare(ce.id))};var SLe=(v,P={version:1})=>{let M=W1t(P).map((ve)=>{let qe=yLe(ve.version,ve);return{id:ve.id,...yLe(v[ve.id]??qe.minimumCompatibleVersion,ve)}}),z=new Set(M.map((ve)=>ve.id)),ce=Object.keys(v).filter((ve)=>!z.has(ve)).sort();return{components:M,orphanedComponents:ce}};var yLe=(v,P={version:1})=>{_Y(v,"Stored Sync schema version");let M=_Y(P.version,"Target Sync schema version"),z=[...P.migrations??[]].sort((yt,cr)=>yt.toVersion-cr.toVersion),ce=new Set;for(let yt of z){if(_Y(yt.toVersion,"Sync migration toVersion"),ce.has(yt.toVersion))throw new pE("INVALID_PLAN",`Sync migration ${yt.toVersion} is declared more than once`);ce.add(yt.toVersion)}let ve=z[0]?z[0].toVersion-1:M,qe=_Y(P.minimumCompatibleVersion??ve,"Minimum compatible Sync schema version");if(qe>M)throw new pE("INVALID_PLAN","Minimum compatible Sync schema version cannot exceed its target");if(v>M)throw new pE("SCHEMA_TOO_NEW",`Stored Sync schema ${v} is newer than this runtime's schema ${M}`,{storedVersion:v,targetVersion:M});if(v<qe)throw new pE("SCHEMA_TOO_OLD",`Stored Sync schema ${v} is older than the minimum compatible schema ${qe}`,{storedVersion:v,targetVersion:M});let at=[];for(let yt=v+1;yt<=M;yt++){let cr=z.find((vr)=>vr.toVersion===yt);if(cr===void 0)throw new pE("MIGRATION_MISSING",`Sync migration ${yt-1} -> ${yt} is missing`,{storedVersion:v,targetVersion:M});at.push(cr)}return{minimumCompatibleVersion:qe,steps:at,targetVersion:M}};var vLe=Symbol.for("@absolutejs/sync/client-runtime-transport"),bLe=globalThis,V1t=(v)=>typeof v==="object"&&v!==null&&Array.isArray(Reflect.get(v,"installations"))&&Array.isArray(Reflect.get(v,"clients")),MEt=(()=>{let v=bLe[vLe];if(V1t(v))return v;if(typeof v==="object"&&v!==null&&Array.isArray(Reflect.get(v,"installations")))return Reflect.set(v,"clients",[]),v;let P={clients:[],installations:[]};return Object.defineProperty(bLe,vLe,{configurable:!1,enumerable:!1,value:P,writable:!1}),P})();var C7=(v)=>typeof v==="object"&&v!==null&&!Array.isArray(v),f0e=(v)=>{try{let P=JSON.parse(q1t(v,"utf8"));return C7(P)?P:void 0}catch{return}},TLe=(v)=>{let P=Reflect.get(v,"absolutejs");if(!C7(P))return;let M=Reflect.get(P,"sync");if(!C7(M))return;return Reflect.get(M,"localSchema")},H1t=(v,P)=>{let M=CLe(v);while(!0){let z=kLe(M,"node_modules",P,"package.json"),ce=f0e(z);if(ce&&Reflect.get(ce,"name")===P)return z;let ve=$1t(M);if(ve===M)return;M=ve}},bf=(v,P)=>TypeError(`Invalid AbsoluteJS Sync schema metadata for ${v}: ${P}`),k7=(v,P,M)=>{if(typeof v!=="number"||!Number.isSafeInteger(v)||v<1)throw bf(P,`${M} must be a positive safe integer.`);return v},x7=(v,P,M)=>{if(typeof v!=="string"||v.trim()!==v||v.length===0)throw bf(P,`${M} must be a non-empty trimmed string.`);return v},QN=(v,P,M)=>{if(!C7(v))throw bf(P,M);return v},b1=(v,P)=>v[P],p0e=(v,P,M)=>{if(v===null||typeof v==="string"||typeof v==="boolean")return v;if(typeof v==="number"&&Number.isFinite(v))return v;if(Array.isArray(v))return v.map((z)=>p0e(z,P,M));if(C7(v))return Object.fromEntries(Object.entries(v).map(([z,ce])=>[z,p0e(ce,P,M)]));throw bf(P,`${M} must be JSON-safe.`)},G1t=(v,P,M)=>{let z=QN(v,P,`migration operation ${M} must be an object.`),ce=Reflect.get(z,"type"),ve=x7(Reflect.get(z,"collection"),P,`operation ${M}.collection`);if(ce==="delete-collection")return{collection:ve,type:ce};if(ce==="rename-field")return{collection:ve,from:x7(Reflect.get(z,"from"),P,`operation ${M}.from`),to:x7(Reflect.get(z,"to"),P,`operation ${M}.to`),type:ce};let qe=x7(Reflect.get(z,"field"),P,`operation ${M}.field`);if(ce==="remove-field")return{collection:ve,field:qe,type:ce};if(ce==="set-default")return{collection:ve,field:qe,type:ce,value:p0e(Reflect.get(z,"value"),P,`operation ${M}.value`)};throw bf(P,`operation ${M}.type is not supported.`)},X1t=(v,P,M)=>{let z=QN(v,P,`migration ${M} must be an object.`),ce=new Set(["operations","toVersion"]),ve=Object.keys(z).find((yt)=>!ce.has(yt));if(ve)throw bf(P,`migration ${M}.${ve} is not declarative metadata.`);let qe=Reflect.get(z,"operations");if(qe!==void 0&&!Array.isArray(qe))throw bf(P,`migration ${M}.operations must be an array.`);return{operations:(Array.isArray(qe)?qe:[]).map((yt,cr)=>G1t(yt,P,cr)),toVersion:k7(Reflect.get(z,"toVersion"),P,`migration ${M}.toVersion`)}},K1t=(v,P)=>{let M=QN(v,P,"localData must be an object."),z=new Set(["collections","maxBytesPerNamespace","mutations"]),ce=Object.keys(M).find((vr)=>!z.has(vr));if(ce)throw bf(P,`localData.${ce} is not supported.`);let ve=Reflect.get(M,"collections"),qe=Reflect.get(M,"mutations");if(ve!==void 0&&!Array.isArray(ve))throw bf(P,"localData.collections must be an array.");if(qe!==void 0&&!Array.isArray(qe))throw bf(P,"localData.mutations must be an array.");let at=Array.isArray(ve)?ve.map((vr,Dr)=>{let xe=QN(vr,P,`localData.collections[${Dr}] must be an object.`),Hn=new Set(["evictionPriority","match","maxAgeMs","onProtectionUnavailable","persistence","protection","sensitivity"]),Nt=Object.keys(xe).find((ei)=>!Hn.has(ei));if(Nt)throw bf(P,`localData.collections[${Dr}].${Nt} is not supported.`);let Ot=x7(Reflect.get(xe,"match"),P,`localData.collections[${Dr}].match`),os=b1(xe,"persistence"),Pi=b1(xe,"sensitivity"),Us=b1(xe,"protection"),$a=b1(xe,"onProtectionUnavailable"),el=b1(xe,"evictionPriority"),of=b1(xe,"maxAgeMs");if(os!==void 0&&os!=="durable"&&os!=="memory-only")throw bf(P,`localData.collections[${Dr}].persistence is invalid.`);if(Pi!==void 0&&Pi!=="public"&&Pi!=="private"&&Pi!=="secret")throw bf(P,`localData.collections[${Dr}].sensitivity is invalid.`);if(Us!==void 0&&Us!=="none"&&Us!=="required")throw bf(P,`localData.collections[${Dr}].protection is invalid.`);if($a!==void 0&&$a!=="error"&&$a!=="memory-only")throw bf(P,`localData.collections[${Dr}].onProtectionUnavailable is invalid.`);if(el!==void 0&&el!=="critical"&&el!=="normal"&&el!=="disposable")throw bf(P,`localData.collections[${Dr}].evictionPriority is invalid.`);return{match:Ot,...Pi?{sensitivity:Pi}:{},...os?{persistence:os}:{},...Us?{protection:Us}:{},...$a?{onProtectionUnavailable:$a}:{},...el?{evictionPriority:el}:{},...of===void 0?{}:{maxAgeMs:k7(of,P,`localData.collections[${Dr}].maxAgeMs`)}}}):void 0,yt=Array.isArray(qe)?qe.map((vr,Dr)=>{let xe=QN(vr,P,`localData.mutations[${Dr}] must be an object.`),Hn=new Set(["conflict","match","onProtectionUnavailable","persistence","protection","sensitivity"]),Nt=Object.keys(xe).find((of)=>!Hn.has(of));if(Nt)throw bf(P,`localData.mutations[${Dr}].${Nt} is not supported.`);let Ot=b1(xe,"protection"),os=b1(xe,"sensitivity"),Pi=b1(xe,"persistence"),Us=b1(xe,"onProtectionUnavailable"),$a=b1(xe,"conflict"),el;if($a!==void 0){let of=QN($a,P,`localData.mutations[${Dr}].conflict must be an object.`),ei=Object.keys(of).find((So)=>So!=="maxAttempts"&&So!=="strategy");if(ei)throw bf(P,`localData.mutations[${Dr}].conflict.${ei} is not supported.`);let ln=b1(of,"strategy");if(ln!=="client-wins"&&ln!=="manual"&&ln!=="server-wins")throw bf(P,`localData.mutations[${Dr}].conflict.strategy is invalid.`);let u_=b1(of,"maxAttempts");if(u_!==void 0&&ln!=="client-wins")throw bf(P,`localData.mutations[${Dr}].conflict.maxAttempts requires client-wins.`);el={strategy:ln,...u_===void 0?{}:{maxAttempts:k7(u_,P,`localData.mutations[${Dr}].conflict.maxAttempts`)}}}if(Ot!==void 0&&Ot!=="none"&&Ot!=="required")throw bf(P,`localData.mutations[${Dr}].protection is invalid.`);if(os!==void 0&&os!=="public"&&os!=="private"&&os!=="secret")throw bf(P,`localData.mutations[${Dr}].sensitivity is invalid.`);if(Us!==void 0&&Us!=="error"&&Us!=="memory-only")throw bf(P,`localData.mutations[${Dr}].onProtectionUnavailable is invalid.`);if(Pi!==void 0&&Pi!=="durable"&&Pi!=="memory-only")throw bf(P,`localData.mutations[${Dr}].persistence is invalid.`);return{match:x7(Reflect.get(xe,"match"),P,`localData.mutations[${Dr}].match`),...el?{conflict:el}:{},...os?{sensitivity:os}:{},...Us?{onProtectionUnavailable:Us}:{},...Pi?{persistence:Pi}:{},...Ot?{protection:Ot}:{}}}):void 0,cr=Reflect.get(M,"maxBytesPerNamespace");return{...at?{collections:at}:{},...yt?{mutations:yt}:{},...cr===void 0?{}:{maxBytesPerNamespace:k7(cr,P,"localData.maxBytesPerNamespace")}}},xLe=(v,P)=>{let M=QN(P,v,"localSchema must be an object."),z=new Set(["localData","migrations","minimumCompatibleVersion","version"]),ce=Object.keys(M).find((Dr)=>!z.has(Dr));if(ce)throw bf(v,`${ce} is not supported.`);let ve=k7(Reflect.get(M,"version"),v,"version"),qe=Reflect.get(M,"minimumCompatibleVersion"),at=qe===void 0?Math.max(1,ve-2):k7(qe,v,"minimumCompatibleVersion"),yt=Reflect.get(M,"migrations"),cr=Reflect.get(M,"localData");if(yt!==void 0&&!Array.isArray(yt))throw bf(v,"migrations must be an array.");let vr=Array.isArray(yt)?yt:void 0;return{id:v,...cr===void 0?{}:{localData:K1t(cr,v)},minimumCompatibleVersion:at,...Array.isArray(vr)?{migrations:vr.map((Dr,xe)=>X1t(Dr,v,xe))}:{},version:ve}},Q1t=(v)=>[Reflect.get(v,"dependencies"),Reflect.get(v,"optionalDependencies"),Reflect.get(v,"devDependencies"),Reflect.get(v,"peerDependencies")].flatMap((P)=>C7(P)?Object.keys(P):[]).filter((P,M,z)=>z.indexOf(P)===M).sort(),E7=(v)=>{let P=kLe(CLe(v),"package.json"),M=f0e(P);if(!M)return{components:[{id:"@absolutejs/app",minimumCompatibleVersion:1,version:1}],sources:[]};let z=TLe(M),ce=[z===void 0?{id:"@absolutejs/app",minimumCompatibleVersion:1,version:1}:xLe("@absolutejs/app",z)],ve=[{id:"@absolutejs/app",manifestPath:P}];for(let qe of Q1t(M)){let at=H1t(v,qe);if(!at)continue;let yt=f0e(at);if(!yt)continue;let cr=TLe(yt);if(cr===void 0)continue;ce.push(xLe(qe,cr)),ve.push({id:qe,manifestPath:at})}return ce.sort((qe,at)=>qe.id.localeCompare(at.id)),ve.sort((qe,at)=>qe.id.localeCompare(at.id)),SLe({},{components:ce}),{components:ce,sources:ve}};var V0=hvt(i9e());import{existsSync as ASt,readFileSync as R0e}from"fs";import{extname as PSt,join as M0e,relative as DSt,resolve as N7}from"path";import{fileURLToPath as ISt}from"url";var s9e="@absolutejs/devices",NSt=["keyboard","systemBars"],OSt={capacitor:"@absolutejs/devices-capacitor",expo:"@absolutejs/devices-expo"},FSt=new Bun.Glob("**/*.{js,jsx,ts,tsx,svelte,vue}"),RSt=new Set([".absolutejs",".git",".test-builds",".test-shards","build","dist","node_modules","test","tests"]),a9e=/^[A-Za-z_$][\w$]*$/u,MSt=(v)=>new RegExp(`^@absolutejs/devices-${v}/[a-z][a-z0-9-]*$`,"u"),LSt=(v)=>v==="capacitor"?/^@capacitor\/[a-z][a-z0-9-]*@\d+\.\d+\.\d+$/u:/^(?:expo-[a-z][a-z0-9-]*|@react-native-[a-z0-9-]+\/[a-z][a-z0-9-]*)@\d+\.\d+\.\d+$/u,jSt=(v)=>v==="capacitor"?"Capacitor":"Expo",BSt=/^android\.permission\.[A-Z][A-Z0-9_]*$/u,JSt=new Set(["camera","location-always","location-when-in-use","photo-library","photo-library-add"]),USt={NSPrivacyAccessedAPICategoryFileTimestamp:new Set(["C617.1"])},hY=["NSPrivacyAccessedAPICategoryFileTimestamp"],L2=(v)=>typeof v==="object"&&v!==null&&!Array.isArray(v),L0e=(v)=>{let P=JSON.parse(R0e(v,"utf8"));if(!L2(P))throw TypeError(`${v} must contain an object.`);return P},o9e=(v,P)=>{if(typeof v!=="string"||v.length===0)throw TypeError(`${P} must be a non-empty string.`);return v},zSt=(v,P)=>{if(v===void 0)return;if(!L2(v))throw TypeError(`${P} must be an object.`);let{permissions:M}=v;if(!Array.isArray(M)||!M.every((z)=>typeof z==="string"&&BSt.test(z)))throw TypeError(`${P}.permissions must contain Android permission names.`);return[...M]},WSt=(v,P)=>{if(v===void 0)return;if(!L2(v))throw TypeError(`${P} must be an object.`);let M={};for(let z of hY){let ce=v[z];if(ce===void 0)continue;let ve=USt[z];if(!Array.isArray(ce)||ce.length===0||!ce.every((qe)=>typeof qe==="string"&&ve.has(qe)))throw TypeError(`${P} contains an unsupported API or reason.`);M[z]=[...ce]}if(Object.keys(v).some((z)=>!hY.some((ce)=>ce===z)))throw TypeError(`${P} contains an unsupported API or reason.`);return M},VSt=(v,P)=>{if(v===void 0)return;if(!L2(v))throw TypeError(`${P} must be an object.`);let{privacyAccessedApis:M,pushNotifications:z,systemBars:ce,usageDescriptions:ve}=v;if(z!==void 0&&z!==!0)throw TypeError(`${P}.pushNotifications must be true.`);if(ce!==void 0&&ce!==!0)throw TypeError(`${P}.systemBars must be true.`);if(ve!==void 0&&(!Array.isArray(ve)||!ve.every((at)=>typeof at==="string"&&JSt.has(at))))throw TypeError(`${P}.usageDescriptions contains an unsupported purpose.`);let qe=WSt(M,`${P}.privacyAccessedApis`);return{...qe===void 0?{}:{privacyAccessedApis:qe},...z===!0?{pushNotifications:!0}:{},...ce===!0?{systemBars:!0}:{},...ve===void 0?{}:{usageDescriptions:[...ve]}}},qSt=(v,P,M)=>{if(!a9e.test(v))throw TypeError("Device capability names must be identifiers.");if(!L2(P))throw TypeError(`Device capability ${v} must be an object.`);let z=o9e(P.factory,`${v}.factory`),ce=o9e(P.module,`${v}.module`);if(!a9e.test(z))throw TypeError(`${v}.factory must be a JavaScript identifier.`);if(!MSt(M).test(ce))throw TypeError(`${v}.module must be an official devices-${M} subpath.`);if(!Array.isArray(P.packages)||!P.packages.every((yt)=>typeof yt==="string"&&LSt(M).test(yt)))throw TypeError(`${v}.packages must contain exact official ${jSt(M)} package versions.`);let{plugins:ve}=P;if(ve!==void 0&&(!Array.isArray(ve)||!ve.every((yt)=>typeof yt==="string"&&/^expo-[a-z][a-z0-9-]*$/u.test(yt))))throw TypeError(`${v}.plugins must contain Expo config plugin names.`);let qe,{native:at}=P;if(at!==void 0){if(!L2(at))throw TypeError(`${v}.native must be an object.`);let{android:yt,ios:cr}=at,vr=zSt(yt,`${v}.native.android`),Dr=VSt(cr,`${v}.native.ios`);qe={...vr===void 0?{}:{android:{permissions:vr}},...Dr===void 0?{}:{ios:Dr}}}return{factory:z,module:ce,...qe===void 0?{}:{native:qe},...ve===void 0?{}:{plugins:[...ve]},packages:[...P.packages]}},e6=(v)=>{let P=v.capabilities.reduce((M,z)=>{for(let ce of hY){let ve=v.providers[z]?.native?.ios?.privacyAccessedApis?.[ce]??[];if(ve.length===0)continue;let qe=M[ce]??new Set;for(let at of ve)qe.add(at);M[ce]=qe}return M},{});return{androidPermissions:[...new Set(v.capabilities.flatMap((M)=>v.providers[M]?.native?.android?.permissions??[]))].sort(),iosPrivacyAccessedApis:hY.flatMap((M)=>{let z=P[M];return z?[{api:M,reasons:[...z].sort()}]:[]}),iosPushNotifications:v.capabilities.some((M)=>v.providers[M]?.native?.ios?.pushNotifications===!0),iosSystemBars:v.capabilities.some((M)=>v.providers[M]?.native?.ios?.systemBars===!0),iosUsageDescriptions:[...new Set(v.capabilities.flatMap((M)=>v.providers[M]?.native?.ios?.usageDescriptions??[]))].sort()}},$St=(v,P)=>{try{return ISt(import.meta.resolve(`${v}/package.json`))}catch{throw TypeError(`${v} is not installed. Run \`absolute mobile init\` to install the ${P==="expo"?"Expo":"Capacitor"} device adapters.`)}},c9e=(v,P="capacitor")=>{let M=OSt[P],z=M0e(N7(v),"node_modules",M,"package.json");try{R0e(z,"utf8")}catch{z=$St(M,P)}let ce=L0e(z),{absolutejs:ve}=ce,qe=L2(ve)?ve.devices:void 0;if(!L2(qe)||qe.format!==1||qe.provider!==P||!L2(qe.capabilities))throw TypeError(`${M} does not publish supported capability metadata.`);let at=Object.entries(qe.capabilities).map(([yt,cr])=>({name:yt,provider:qSt(yt,cr,P)}));return Object.fromEntries(at.sort((yt,cr)=>yt.name.localeCompare(cr.name)).map(({name:yt,provider:cr})=>[yt,cr]))},HSt=(v)=>v.split("/").some((P)=>RSt.has(P)),GSt=(v,P)=>{let M=new Set,z=new Set,ce=(at)=>{if(V0.default.isImportDeclaration(at)&&V0.default.isStringLiteral(at.moduleSpecifier)&&at.moduleSpecifier.text===s9e&&!at.importClause?.isTypeOnly){let yt=at.importClause?.namedBindings;if(yt&&V0.default.isNamedImports(yt)){for(let cr of yt.elements)if(!cr.isTypeOnly)M.add((cr.propertyName??cr.name).text)}if(yt&&V0.default.isNamespaceImport(yt))z.add(yt.name.text)}if(V0.default.isExportDeclaration(at)&&!at.isTypeOnly&&at.moduleSpecifier!==void 0&&V0.default.isStringLiteral(at.moduleSpecifier)&&at.moduleSpecifier.text===s9e&&at.exportClause&&V0.default.isNamedExports(at.exportClause)){for(let yt of at.exportClause.elements)if(!yt.isTypeOnly)M.add((yt.propertyName??yt.name).text)}if(V0.default.isPropertyAccessExpression(at)&&V0.default.isIdentifier(at.expression)&&z.has(at.expression.text))M.add(at.name.text);V0.default.forEachChild(at,ce)},ve=PSt(P).toLowerCase(),qe=ve===".svelte"||ve===".vue"?[...v.matchAll(/<script\b[^>]*>([\s\S]*?)<\/script\s*>/giu)].map((at)=>at[1]).filter((at)=>at!==void 0):[v];for(let[at,yt]of qe.entries())ce(V0.default.createSourceFile(`${P}#script-${at}`,yt,V0.default.ScriptTarget.Latest,!0,V0.default.ScriptKind.TSX));return M},l9e=(v,P)=>{let M=QSt(P,XSt(v)),z=P.requiredPackages.filter((ve)=>{let qe=ve.lastIndexOf("@"),at=ve.slice(0,qe);if(M.includes(ve))return!1;try{return L0e(M0e(N7(v),"node_modules",at,"package.json")).version!==ve.slice(qe+1)}catch{return!0}}),ce=[...M,...z];if(ce.length>0)throw TypeError(`Device capabilities ${P.capabilities.join(", ")} require ${ce.join(", ")}. Run absolute mobile sync and approve the detected capability plugins.`)},XSt=(v)=>{let P=L0e(M0e(N7(v),"package.json")),M=new Set;for(let z of["dependencies","devDependencies"]){let ce=P[z];if(L2(ce))for(let ve of Object.keys(ce))M.add(ve)}return M},KSt=(v,P=c9e(v))=>{let M=N7(v);if(!ASt(M))return[];let z=new Set(Object.keys(P)),ce=new Set;for(let ve of FSt.scanSync({cwd:M})){let qe=DSt(M,N7(M,ve)).replaceAll("\\","/");if(HSt(qe))continue;let at=R0e(N7(M,qe),"utf8");for(let yt of GSt(at,qe))if(z.has(yt))ce.add(yt)}return[...ce].sort()},QSt=(v,P)=>v.requiredPackages.filter((M)=>{let z=M.slice(0,M.lastIndexOf("@"));return!P.has(z)});var rP=(v,P="capacitor")=>{let M=c9e(v,P),z=KSt(v,M);for(let ve of NSt)if(M[ve]&&!z.includes(ve))z.push(ve);z.sort();let ce={};for(let ve of z){let qe=M[ve];if(qe)ce[ve]=qe}return{capabilities:z,providers:ce,requiredPackages:[...new Set(z.flatMap((ve)=>ce[ve]?.packages??[]))].sort()}};import{createHash as ZSt}from"crypto";var YSt=(v)=>typeof v==="object"&&v!==null&&!Array.isArray(v),j0e=(v)=>{if(Array.isArray(v))return v.map(j0e);if(!YSt(v))return v;return Object.fromEntries(Object.keys(v).sort().map((P)=>[P,j0e(v[P])]))};var u9e=(v)=>JSON.stringify(j0e(v));var eTt=2,tTt=1,rTt=(v)=>({appId:v.config.appId,auth:v.auth??null,deepLinks:{hosts:v.config.deepLinkHosts,...v.config.deepLinkScheme?{scheme:v.config.deepLinkScheme}:{}},deviceCapabilities:v.deviceCapabilities,engine:v.config.engine,...v.config.engine==="expo"?{expoEmbeddedAssetsAbi:1}:{},format:tTt,shellAbi:eTt,syncSchema:v.syncSchema??null,updates:v.config.updates??null}),nTt=(v)=>ZSt("sha256").update(u9e(v)).digest("hex"),yY=(v,P)=>{let M=uY(P,v),z=M!==void 0&&ZA(P),ce=z?E7(P):void 0,ve=rP(P,v.engine),qe=rTt({...M?{auth:M}:{},config:v,deviceCapabilities:ve,...ce?{syncSchema:ce}:{}});return{auth:M,descriptor:qe,deviceCapabilities:ve,fingerprint:nTt(qe),sync:z,syncSchema:ce}};import{join as t6}from"path";var bB=`// Generated by AbsoluteJS. Edit absolute.config.ts, then run absolute mobile sync.
|
|
480
480
|
`,iTt=`<!-- Generated by AbsoluteJS. Edit absolute.config.ts, then run absolute mobile sync. -->
|
|
481
481
|
`,sTt=`${JSON.stringify({android:{modules:["expo.modules.absolutemobileobservability.AbsoluteMobileObservabilityModule"]},apple:{modules:["AbsoluteMobileObservabilityModule"]},platforms:["apple","android"]},null,2)}
|
|
482
482
|
`,aTt=`${bB}Pod::Spec.new do |s|
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
"import { useSyncExternalStore } from 'react';\nimport type { StoreApi } from 'zustand/vanilla';\nimport {\n\tgetIslandStoreServerSnapshot,\n\treadIslandStore,\n\tsubscribeIslandStore,\n\ttype IslandStoreState\n} from '../../client/islandStore';\n\nexport const useIslandStore = <TState extends IslandStoreState, TSelected>(\n\tstore: StoreApi<TState>,\n\tselector: (state: TState) => TSelected\n) =>\n\tuseSyncExternalStore(\n\t\t(listener) =>\n\t\t\tsubscribeIslandStore(store, selector, () => {\n\t\t\t\tlistener();\n\t\t\t}),\n\t\t() => readIslandStore(store, selector),\n\t\t() => getIslandStoreServerSnapshot(store, selector)\n\t);\n",
|
|
12
12
|
"const createStoreImpl = (createState) => {\n let state;\n const listeners = /* @__PURE__ */ new Set();\n const setState = (partial, replace) => {\n const nextState = typeof partial === \"function\" ? partial(state) : partial;\n if (!Object.is(nextState, state)) {\n const previousState = state;\n state = (replace != null ? replace : typeof nextState !== \"object\" || nextState === null) ? nextState : Object.assign({}, state, nextState);\n listeners.forEach((listener) => listener(state, previousState));\n }\n };\n const getState = () => state;\n const getInitialState = () => initialState;\n const subscribe = (listener) => {\n listeners.add(listener);\n return () => listeners.delete(listener);\n };\n const api = { setState, getState, getInitialState, subscribe };\n const initialState = state = createState(setState, getState, api);\n return api;\n};\nconst createStore = ((createState) => createState ? createStoreImpl(createState) : createStoreImpl);\n\nexport { createStore };\n",
|
|
13
13
|
"const reduxImpl = (reducer, initial) => (set, _get, api) => {\n api.dispatch = (action) => {\n set((state) => reducer(state, action), false, action);\n return action;\n };\n api.dispatchFromDevtools = true;\n return { dispatch: (...args) => api.dispatch(...args), ...initial };\n};\nconst redux = reduxImpl;\n\nconst shouldDispatchFromDevtools = (api) => !!api.dispatchFromDevtools && typeof api.dispatch === \"function\";\nconst trackedConnections = /* @__PURE__ */ new Map();\nconst getTrackedConnectionState = (name) => {\n const api = trackedConnections.get(name);\n if (!api) return {};\n return Object.fromEntries(\n Object.entries(api.stores).map(([key, api2]) => [key, api2.getState()])\n );\n};\nconst extractConnectionInformation = (store, extensionConnector, options) => {\n if (store === void 0) {\n return {\n type: \"untracked\",\n connection: extensionConnector.connect(options)\n };\n }\n const existingConnection = trackedConnections.get(options.name);\n if (existingConnection) {\n return { type: \"tracked\", store, ...existingConnection };\n }\n const newConnection = {\n connection: extensionConnector.connect(options),\n stores: {}\n };\n trackedConnections.set(options.name, newConnection);\n return { type: \"tracked\", store, ...newConnection };\n};\nconst removeStoreFromTrackedConnections = (name, store) => {\n if (store === void 0) return;\n const connectionInfo = trackedConnections.get(name);\n if (!connectionInfo) return;\n delete connectionInfo.stores[store];\n if (Object.keys(connectionInfo.stores).length === 0) {\n trackedConnections.delete(name);\n }\n};\nconst findCallerName = (stack) => {\n var _a, _b;\n if (!stack) return void 0;\n const traceLines = stack.split(\"\\n\");\n const apiSetStateLineIndex = traceLines.findIndex(\n (traceLine) => traceLine.includes(\"api.setState\")\n );\n if (apiSetStateLineIndex < 0) return void 0;\n const callerLine = ((_a = traceLines[apiSetStateLineIndex + 1]) == null ? void 0 : _a.trim()) || \"\";\n return (_b = /.+ (.+) .+/.exec(callerLine)) == null ? void 0 : _b[1];\n};\nconst devtoolsImpl = (fn, devtoolsOptions = {}) => (set, get, api) => {\n const { enabled, anonymousActionType, store, ...options } = devtoolsOptions;\n let extensionConnector;\n try {\n extensionConnector = (enabled != null ? enabled : (import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") && window.__REDUX_DEVTOOLS_EXTENSION__;\n } catch (e) {\n }\n if (!extensionConnector) {\n return fn(set, get, api);\n }\n const { connection, ...connectionInformation } = extractConnectionInformation(store, extensionConnector, options);\n let isRecording = true;\n api.setState = ((state, replace, nameOrAction) => {\n const r = set(state, replace);\n if (!isRecording) return r;\n const action = nameOrAction === void 0 ? {\n type: anonymousActionType || findCallerName(new Error().stack) || \"anonymous\"\n } : typeof nameOrAction === \"string\" ? { type: nameOrAction } : nameOrAction;\n if (store === void 0) {\n connection == null ? void 0 : connection.send(action, get());\n return r;\n }\n connection == null ? void 0 : connection.send(\n {\n ...action,\n type: `${store}/${action.type}`\n },\n {\n ...getTrackedConnectionState(options.name),\n [store]: api.getState()\n }\n );\n return r;\n });\n api.devtools = {\n cleanup: () => {\n if (connection && typeof connection.unsubscribe === \"function\") {\n connection.unsubscribe();\n }\n removeStoreFromTrackedConnections(options.name, store);\n }\n };\n const setStateFromDevtools = (...a) => {\n const originalIsRecording = isRecording;\n isRecording = false;\n set(...a);\n isRecording = originalIsRecording;\n };\n const initialState = fn(api.setState, get, api);\n if (connectionInformation.type === \"untracked\") {\n connection == null ? void 0 : connection.init(initialState);\n } else {\n connectionInformation.stores[connectionInformation.store] = api;\n connection == null ? void 0 : connection.init(\n Object.fromEntries(\n Object.entries(connectionInformation.stores).map(([key, store2]) => [\n key,\n key === connectionInformation.store ? initialState : store2.getState()\n ])\n )\n );\n }\n if (shouldDispatchFromDevtools(api)) {\n let didWarnAboutReservedActionType = false;\n const originalDispatch = api.dispatch;\n api.dispatch = (...args) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && args[0].type === \"__setState\" && !didWarnAboutReservedActionType) {\n console.warn(\n '[zustand devtools middleware] \"__setState\" action type is reserved to set state from the devtools. Avoid using it.'\n );\n didWarnAboutReservedActionType = true;\n }\n originalDispatch(...args);\n };\n }\n connection.subscribe((message) => {\n var _a;\n switch (message.type) {\n case \"ACTION\":\n if (typeof message.payload !== \"string\") {\n console.error(\n \"[zustand devtools middleware] Unsupported action format\"\n );\n return;\n }\n return parseJsonThen(\n message.payload,\n (action) => {\n if (action.type === \"__setState\") {\n if (store === void 0) {\n setStateFromDevtools(action.state);\n return;\n }\n if (Object.keys(action.state).length !== 1) {\n console.error(\n `\n [zustand devtools middleware] Unsupported __setState action format.\n When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),\n and value of this only key should be a state object. Example: { \"type\": \"__setState\", \"state\": { \"abc123Store\": { \"foo\": \"bar\" } } }\n `\n );\n }\n const stateFromDevtools = action.state[store];\n if (stateFromDevtools === void 0 || stateFromDevtools === null) {\n return;\n }\n if (JSON.stringify(api.getState()) !== JSON.stringify(stateFromDevtools)) {\n setStateFromDevtools(stateFromDevtools);\n }\n return;\n }\n if (shouldDispatchFromDevtools(api)) {\n api.dispatch(action);\n }\n }\n );\n case \"DISPATCH\":\n switch (message.payload.type) {\n case \"RESET\":\n setStateFromDevtools(initialState);\n if (store === void 0) {\n return connection == null ? void 0 : connection.init(api.getState());\n }\n return connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n case \"COMMIT\":\n if (store === void 0) {\n connection == null ? void 0 : connection.init(api.getState());\n return;\n }\n return connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n case \"ROLLBACK\":\n return parseJsonThen(message.state, (state) => {\n if (store === void 0) {\n setStateFromDevtools(state);\n connection == null ? void 0 : connection.init(api.getState());\n return;\n }\n setStateFromDevtools(state[store]);\n connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n });\n case \"JUMP_TO_STATE\":\n case \"JUMP_TO_ACTION\":\n return parseJsonThen(message.state, (state) => {\n if (store === void 0) {\n setStateFromDevtools(state);\n return;\n }\n if (JSON.stringify(api.getState()) !== JSON.stringify(state[store])) {\n setStateFromDevtools(state[store]);\n }\n });\n case \"IMPORT_STATE\": {\n const { nextLiftedState } = message.payload;\n const lastComputedState = (_a = nextLiftedState.computedStates.slice(-1)[0]) == null ? void 0 : _a.state;\n if (!lastComputedState) return;\n if (store === void 0) {\n setStateFromDevtools(lastComputedState);\n } else {\n setStateFromDevtools(lastComputedState[store]);\n }\n connection == null ? void 0 : connection.send(\n null,\n // FIXME no-any\n nextLiftedState\n );\n return;\n }\n case \"PAUSE_RECORDING\":\n return isRecording = !isRecording;\n }\n return;\n }\n });\n return initialState;\n};\nconst devtools = devtoolsImpl;\nconst parseJsonThen = (stringified, fn) => {\n let parsed;\n try {\n parsed = JSON.parse(stringified);\n } catch (e) {\n console.error(\n \"[zustand devtools middleware] Could not parse the received json\",\n e\n );\n }\n if (parsed !== void 0) fn(parsed);\n};\n\nconst subscribeWithSelectorImpl = (fn) => (set, get, api) => {\n const origSubscribe = api.subscribe;\n api.subscribe = ((selector, optListener, options) => {\n let listener = selector;\n if (optListener) {\n const equalityFn = (options == null ? void 0 : options.equalityFn) || Object.is;\n let currentSlice = selector(api.getState());\n listener = (state) => {\n const nextSlice = selector(state);\n if (!equalityFn(currentSlice, nextSlice)) {\n const previousSlice = currentSlice;\n optListener(currentSlice = nextSlice, previousSlice);\n }\n };\n if (options == null ? void 0 : options.fireImmediately) {\n optListener(currentSlice, currentSlice);\n }\n }\n return origSubscribe(listener);\n });\n const initialState = fn(set, get, api);\n return initialState;\n};\nconst subscribeWithSelector = subscribeWithSelectorImpl;\n\nfunction combine(initialState, create) {\n return (...args) => Object.assign({}, initialState, create(...args));\n}\n\nfunction createJSONStorage(getStorage, options) {\n let storage;\n try {\n storage = getStorage();\n } catch (e) {\n return;\n }\n const persistStorage = {\n getItem: (name) => {\n var _a;\n const parse = (str2) => {\n if (str2 === null) {\n return null;\n }\n return JSON.parse(str2, options == null ? void 0 : options.reviver);\n };\n const str = (_a = storage.getItem(name)) != null ? _a : null;\n if (str instanceof Promise) {\n return str.then(parse);\n }\n return parse(str);\n },\n setItem: (name, newValue) => storage.setItem(name, JSON.stringify(newValue, options == null ? void 0 : options.replacer)),\n removeItem: (name) => storage.removeItem(name)\n };\n return persistStorage;\n}\nconst toThenable = (fn) => (input) => {\n try {\n const result = fn(input);\n if (result instanceof Promise) {\n return result;\n }\n return {\n then(onFulfilled) {\n return toThenable(onFulfilled)(result);\n },\n catch(_onRejected) {\n return this;\n }\n };\n } catch (e) {\n return {\n then(_onFulfilled) {\n return this;\n },\n catch(onRejected) {\n return toThenable(onRejected)(e);\n }\n };\n }\n};\nconst persistImpl = (config, baseOptions) => (set, get, api) => {\n let options = {\n storage: createJSONStorage(() => window.localStorage),\n partialize: (state) => state,\n version: 0,\n merge: (persistedState, currentState) => ({\n ...currentState,\n ...persistedState\n }),\n ...baseOptions\n };\n let hasHydrated = false;\n let hydrationVersion = 0;\n const hydrationListeners = /* @__PURE__ */ new Set();\n const finishHydrationListeners = /* @__PURE__ */ new Set();\n let storage = options.storage;\n if (!storage) {\n return config(\n (...args) => {\n console.warn(\n `[zustand persist middleware] Unable to update item '${options.name}', the given storage is currently unavailable.`\n );\n set(...args);\n },\n get,\n api\n );\n }\n const setItem = () => {\n const state = options.partialize({ ...get() });\n return storage.setItem(options.name, {\n state,\n version: options.version\n });\n };\n const savedSetState = api.setState;\n api.setState = (state, replace) => {\n savedSetState(state, replace);\n return setItem();\n };\n const configResult = config(\n (...args) => {\n set(...args);\n return setItem();\n },\n get,\n api\n );\n api.getInitialState = () => configResult;\n let stateFromStorage;\n const hydrate = () => {\n var _a, _b;\n if (!storage) return;\n const currentVersion = ++hydrationVersion;\n hasHydrated = false;\n hydrationListeners.forEach((cb) => {\n var _a2;\n return cb((_a2 = get()) != null ? _a2 : configResult);\n });\n const postRehydrationCallback = ((_b = options.onRehydrateStorage) == null ? void 0 : _b.call(options, (_a = get()) != null ? _a : configResult)) || void 0;\n return toThenable(storage.getItem.bind(storage))(options.name).then((deserializedStorageValue) => {\n if (deserializedStorageValue) {\n if (typeof deserializedStorageValue.version === \"number\" && deserializedStorageValue.version !== options.version) {\n if (options.migrate) {\n const migration = options.migrate(\n deserializedStorageValue.state,\n deserializedStorageValue.version\n );\n if (migration instanceof Promise) {\n return migration.then((result) => [true, result]);\n }\n return [true, migration];\n }\n console.error(\n `State loaded from storage couldn't be migrated since no migrate function was provided`\n );\n } else {\n return [false, deserializedStorageValue.state];\n }\n }\n return [false, void 0];\n }).then((migrationResult) => {\n var _a2;\n if (currentVersion !== hydrationVersion) {\n return;\n }\n const [migrated, migratedState] = migrationResult;\n stateFromStorage = options.merge(\n migratedState,\n (_a2 = get()) != null ? _a2 : configResult\n );\n set(stateFromStorage, true);\n if (migrated) {\n return setItem();\n }\n }).then(() => {\n if (currentVersion !== hydrationVersion) {\n return;\n }\n postRehydrationCallback == null ? void 0 : postRehydrationCallback(get(), void 0);\n stateFromStorage = get();\n hasHydrated = true;\n finishHydrationListeners.forEach((cb) => cb(stateFromStorage));\n }).catch((e) => {\n if (currentVersion !== hydrationVersion) {\n return;\n }\n postRehydrationCallback == null ? void 0 : postRehydrationCallback(void 0, e);\n });\n };\n api.persist = {\n setOptions: (newOptions) => {\n options = {\n ...options,\n ...newOptions\n };\n if (newOptions.storage) {\n storage = newOptions.storage;\n }\n },\n clearStorage: () => {\n storage == null ? void 0 : storage.removeItem(options.name);\n },\n getOptions: () => options,\n rehydrate: () => hydrate(),\n hasHydrated: () => hasHydrated,\n onHydrate: (cb) => {\n hydrationListeners.add(cb);\n return () => {\n hydrationListeners.delete(cb);\n };\n },\n onFinishHydration: (cb) => {\n finishHydrationListeners.add(cb);\n return () => {\n finishHydrationListeners.delete(cb);\n };\n }\n };\n if (!options.skipHydration) {\n hydrate();\n }\n return stateFromStorage || configResult;\n};\nconst persist = persistImpl;\n\nfunction ssrSafe(config, isSSR = typeof window === \"undefined\") {\n return (set, get, api) => {\n if (!isSSR) {\n return config(set, get, api);\n }\n const ssrSet = () => {\n throw new Error(\"Cannot set state of Zustand store in SSR\");\n };\n api.setState = ssrSet;\n return config(ssrSet, get, api);\n };\n}\n\nexport { combine, createJSONStorage, devtools, persist, redux, subscribeWithSelector, ssrSafe as unstable_ssrSafe };\n",
|
|
14
|
-
"import { createStore, type StateCreator, type StoreApi } from 'zustand/vanilla';\nimport { combine } from 'zustand/middleware';\n\nexport type IslandStoreState = object;\ntype IslandStoreSnapshot = Record<string, unknown>;\ntype IslandStoreShape<\n\tTState extends IslandStoreState,\n\tTActions extends object\n> = Omit<TState, keyof TActions> & TActions;\nexport type IslandStateSnapshot = Record<string, IslandStoreSnapshot>;\ntype AnyIslandStore = StoreApi<object>;\ntype IslandStoreInstance = {\n\tapplyExternalSnapshot: (snapshot: IslandStoreSnapshot) => void;\n\tstore: AnyIslandStore;\n};\n\nexport const ABSOLUTE_ISLAND_STATE = '__ABS_ISLAND_STATE__';\nexport const ABSOLUTE_ISLAND_STORES = '__ABS_ISLAND_STORES__';\n\ndeclare global {\n\tvar __ABS_ISLAND_STATE__: IslandStateSnapshot | undefined;\n\tvar __ABS_ISLAND_STORES__:\n\t\
|
|
14
|
+
"import { createStore, type StateCreator, type StoreApi } from 'zustand/vanilla';\nimport { combine } from 'zustand/middleware';\n\nexport type IslandStoreState = object;\ntype IslandStoreSnapshot = Record<string, unknown>;\ntype IslandStoreShape<\n\tTState extends IslandStoreState,\n\tTActions extends object\n> = Omit<TState, keyof TActions> & TActions;\nexport type IslandStateSnapshot = Record<string, IslandStoreSnapshot>;\ntype AnyIslandStore = StoreApi<object>;\ntype IslandStoreInstance = {\n\tapplyExternalSnapshot: (snapshot: IslandStoreSnapshot) => void;\n\tstore: AnyIslandStore;\n};\n\nexport const ABSOLUTE_ISLAND_STATE = '__ABS_ISLAND_STATE__';\nexport const ABSOLUTE_ISLAND_STORES = '__ABS_ISLAND_STORES__';\n\ndeclare global {\n\tvar __ABS_ISLAND_STATE__: IslandStateSnapshot | undefined;\n\tvar __ABS_ISLAND_STORES__:\n\t\tMap<string, Set<IslandStoreInstance>> | undefined;\n}\n\nconst getIslandStoreSnapshot = () => {\n\tglobalThis.__ABS_ISLAND_STATE__ ??= {};\n\n\treturn globalThis.__ABS_ISLAND_STATE__;\n};\n\nconst getIslandStores = () => {\n\tglobalThis.__ABS_ISLAND_STORES__ ??= new Map();\n\n\treturn globalThis.__ABS_ISLAND_STORES__;\n};\n\nconst isSerializableValue = (value: unknown) =>\n\ttypeof value !== 'function' && value !== undefined;\n\nconst toSerializableState = <T extends object>(state: T) =>\n\tObject.fromEntries(\n\t\tObject.entries(state).filter(([, value]) => isSerializableValue(value))\n\t);\n\nconst applySnapshot = <T extends object>(\n\tstore: StoreApi<T>,\n\tsnapshot: IslandStoreSnapshot | undefined\n) => {\n\tif (!snapshot) {\n\t\treturn;\n\t}\n\n\tstore.setState({\n\t\t...store.getState(),\n\t\t...snapshot\n\t});\n};\n\nconst getPeerStores = (\n\tstoreInstances: Set<IslandStoreInstance>,\n\townerStore: AnyIslandStore\n) => [...storeInstances].filter((peer) => peer.store !== ownerStore);\n\nconst syncIslandSnapshot = <\n\tTState extends IslandStoreState,\n\tTActions extends object\n>(\n\tstoreId: string,\n\tstate: IslandStoreShape<TState, TActions>,\n\tstoreInstances: Set<IslandStoreInstance>,\n\townerStore: AnyIslandStore\n) => {\n\tconst nextSnapshot = toSerializableState(state);\n\tgetIslandStoreSnapshot()[storeId] = nextSnapshot;\n\n\tfor (const peerStore of getPeerStores(storeInstances, ownerStore)) {\n\t\tpeerStore.applyExternalSnapshot(nextSnapshot);\n\t}\n};\n\nexport const createIslandStore = <\n\tTState extends IslandStoreState,\n\tTActions extends object\n>(\n\tstoreId: string,\n\tinitialState: TState,\n\tcreateState: StateCreator<TState, [], [], TActions>\n) => {\n\tconst store = createStore(combine(initialState, createState));\n\tconst stores = getIslandStores();\n\tconst storeInstances =\n\t\tstores.get(storeId) ?? new Set<IslandStoreInstance>();\n\tconst initialSnapshot = getIslandStoreSnapshot()[storeId];\n\tapplySnapshot(store, initialSnapshot);\n\tlet isApplyingExternalSnapshot = false;\n\n\tconst applyExternalSnapshot = (snapshot: IslandStoreSnapshot) => {\n\t\tisApplyingExternalSnapshot = true;\n\t\tapplySnapshot(store, snapshot);\n\t};\n\n\tstoreInstances.add({\n\t\tapplyExternalSnapshot,\n\t\tstore\n\t});\n\tstores.set(storeId, storeInstances);\n\n\tsyncIslandSnapshot(storeId, store.getState(), storeInstances, store);\n\tstore.subscribe((state) => {\n\t\tif (isApplyingExternalSnapshot) {\n\t\t\tisApplyingExternalSnapshot = false;\n\n\t\t\treturn;\n\t\t}\n\n\t\tsyncIslandSnapshot(storeId, state, storeInstances, store);\n\t});\n\n\treturn store;\n};\nexport const getIslandStoreServerSnapshot = <\n\tTState extends IslandStoreState,\n\tTSelected\n>(\n\tstore: StoreApi<TState>,\n\tselector: (state: TState) => TSelected\n) => selector(store.getInitialState());\nconst applySnapshotToStoreInstances = (\n\tstoreId: string,\n\tinstances: Set<IslandStoreInstance>,\n\tsnapshot: IslandStateSnapshot\n) => {\n\tfor (const instance of instances) {\n\t\tinstance.applyExternalSnapshot(snapshot[storeId] ?? {});\n\t}\n};\n\nexport const initializeIslandStores = (state: IslandStateSnapshot) => {\n\tconst currentSnapshot = getIslandStoreSnapshot();\n\tconst nextSnapshot: IslandStateSnapshot = {\n\t\t...state,\n\t\t...currentSnapshot\n\t};\n\n\tglobalThis.__ABS_ISLAND_STATE__ = nextSnapshot;\n\n\tfor (const [storeId, store] of getIslandStores()) {\n\t\tapplySnapshotToStoreInstances(storeId, store, nextSnapshot);\n\t}\n};\nexport const readIslandStore = <TState extends IslandStoreState, TSelected>(\n\tstore: StoreApi<TState>,\n\tselector: (state: TState) => TSelected\n) => selector(store.getState());\nexport const resetIslandStoreForTesting = () => {\n\tdelete globalThis.__ABS_ISLAND_STATE__;\n\tdelete globalThis.__ABS_ISLAND_STORES__;\n};\nexport const subscribeIslandStore = <\n\tTState extends IslandStoreState,\n\tTSelected\n>(\n\tstore: StoreApi<TState>,\n\tselector: (state: TState) => TSelected,\n\tlistener: (value: TSelected) => void\n) => {\n\tlet currentSelection = selector(store.getState());\n\n\treturn store.subscribe((state) => {\n\t\tconst nextSelection = selector(state);\n\t\tif (Object.is(nextSelection, currentSelection)) {\n\t\t\treturn;\n\t\t}\n\n\t\tcurrentSelection = nextSelection;\n\t\tlistener(nextSelection);\n\t});\n};\n"
|
|
15
15
|
],
|
|
16
|
-
"mappings": ";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