@powerhousedao/connect 3.2.0-dev.6 → 3.2.0-dev.7
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/dist/assets/{AddDriveModal.CBl4c-xt.js → AddDriveModal.Bbr2l8pg.js} +2 -2
- package/dist/assets/{AddDriveModal.CBl4c-xt.js.map → AddDriveModal.Bbr2l8pg.js.map} +1 -1
- package/dist/assets/{CreateDocumentModal.Dmh3ZGua.js → CreateDocumentModal.AlJtbTUg.js} +2 -2
- package/dist/assets/{CreateDocumentModal.Dmh3ZGua.js.map → CreateDocumentModal.AlJtbTUg.js.map} +1 -1
- package/dist/assets/{DebugSettingsModal.CrxchTh8.js → DebugSettingsModal.lE-1mdeL.js} +2 -2
- package/dist/assets/{DebugSettingsModal.CrxchTh8.js.map → DebugSettingsModal.lE-1mdeL.js.map} +1 -1
- package/dist/assets/{SettingsModal.BarUqtQ-.js → SettingsModal.LqJ3I2dY.js} +2 -2
- package/dist/assets/{SettingsModal.BarUqtQ-.js.map → SettingsModal.LqJ3I2dY.js.map} +1 -1
- package/dist/assets/{app.BsOD-lXF.js → app.VTqbl4SN.js} +5 -5
- package/dist/assets/{app.BsOD-lXF.js.map → app.VTqbl4SN.js.map} +1 -1
- package/dist/assets/{atlas-import.wGPgZoMA.js → atlas-import.pzDvlOkg.js} +2 -2
- package/dist/assets/{atlas-import.wGPgZoMA.js.map → atlas-import.pzDvlOkg.js.map} +1 -1
- package/dist/assets/{connect.config.CLm38tUz.js → connect.config.BKrPqpZJ.js} +2 -2
- package/dist/assets/{connect.config.CLm38tUz.js.map → connect.config.BKrPqpZJ.js.map} +1 -1
- package/dist/assets/{content.D3HKOR6l.js → content.CzKe5qrX.js} +2 -2
- package/dist/assets/{content.D3HKOR6l.js.map → content.CzKe5qrX.js.map} +1 -1
- package/dist/assets/{cookie-banner.QfFgUh45.js → cookie-banner.C1g7edoI.js} +2 -2
- package/dist/assets/{cookie-banner.QfFgUh45.js.map → cookie-banner.C1g7edoI.js.map} +1 -1
- package/dist/assets/{home.oWPM3opR.js → home.Dejd811h.js} +2 -2
- package/dist/assets/{home.oWPM3opR.js.map → home.Dejd811h.js.map} +1 -1
- package/dist/assets/{index.xx2Pj5-D.js → index.B-cqc0my.js} +2 -2
- package/dist/assets/{index.xx2Pj5-D.js.map → index.B-cqc0my.js.map} +1 -1
- package/dist/assets/{index.B1AChJCC.js → index.BkVjnlyo.js} +2 -2
- package/dist/assets/{index.B1AChJCC.js.map → index.BkVjnlyo.js.map} +1 -1
- package/dist/assets/{index.BALtRGZs.js → index.CL997WGg.js} +2 -2
- package/dist/assets/{index.BALtRGZs.js.map → index.CL997WGg.js.map} +1 -1
- package/dist/assets/{index.CqXwlHs5.js → index.CgW9MrEd.js} +2 -2
- package/dist/assets/{index.CqXwlHs5.js.map → index.CgW9MrEd.js.map} +1 -1
- package/dist/assets/{index.CtG2GLTR.js → index.CqiHvHEI.js} +2 -2
- package/dist/assets/{index.CtG2GLTR.js.map → index.CqiHvHEI.js.map} +1 -1
- package/dist/assets/{index.JS7P29Bg.js → index.Da64h2vQ.js} +2 -2
- package/dist/assets/{index.JS7P29Bg.js.map → index.Da64h2vQ.js.map} +1 -1
- package/dist/assets/{index.CaW_4tj2.js → index.LL4eJTNs.js} +3 -3
- package/dist/assets/{index.CaW_4tj2.js.map → index.LL4eJTNs.js.map} +1 -1
- package/dist/assets/{main.Bkm-wiGs.js → main.CWRd9TZM.js} +3 -3
- package/dist/assets/{main.Bkm-wiGs.js.map → main.CWRd9TZM.js.map} +1 -1
- package/dist/assets/{modal.COtKjPC7.js → modal.7v7DsqvJ.js} +3 -3
- package/dist/assets/{modal.COtKjPC7.js.map → modal.7v7DsqvJ.js.map} +1 -1
- package/dist/assets/{modals.5EIGEyoz.js → modals.BjVYHxEq.js} +2 -2
- package/dist/assets/{modals.5EIGEyoz.js.map → modals.BjVYHxEq.js.map} +1 -1
- package/dist/assets/nodefs.CUutxwwQ.js +2 -0
- package/dist/assets/{nodefs.DMn7Exh9.js.map → nodefs.CUutxwwQ.js.map} +1 -1
- package/dist/assets/{opfs-ahp.C3Q22ZKv.js → opfs-ahp.UxTr_8_N.js} +2 -2
- package/dist/assets/{opfs-ahp.C3Q22ZKv.js.map → opfs-ahp.UxTr_8_N.js.map} +1 -1
- package/dist/assets/{registerServiceWorker.D3I25PpA.js → registerServiceWorker.bovghwDf.js} +2 -2
- package/dist/assets/{registerServiceWorker.D3I25PpA.js.map → registerServiceWorker.bovghwDf.js.map} +1 -1
- package/dist/assets/{root.BESo_hdj.js → root.BBZ1eJu-.js} +2 -2
- package/dist/assets/{root.BESo_hdj.js.map → root.BBZ1eJu-.js.map} +1 -1
- package/dist/assets/{useAcceptedCookies.CnUPR1fm.js → useAcceptedCookies.BRFP8YQO.js} +2 -2
- package/dist/assets/{useAcceptedCookies.CnUPR1fm.js.map → useAcceptedCookies.BRFP8YQO.js.map} +1 -1
- package/dist/assets/useConnectConfig.CKApLiWr.js +2 -0
- package/dist/assets/{useConnectConfig.GXRodYuW.js.map → useConnectConfig.CKApLiWr.js.map} +1 -1
- package/dist/assets/{useDefaultDocumentModelEditor.ji384Vtt.js → useDefaultDocumentModelEditor.BE9dVkYi.js} +2 -2
- package/dist/assets/{useDefaultDocumentModelEditor.ji384Vtt.js.map → useDefaultDocumentModelEditor.BE9dVkYi.js.map} +1 -1
- package/dist/assets/{useDocumentDriveServer.CmkRSDng.js → useDocumentDriveServer.D3p_qwnp.js} +2 -2
- package/dist/assets/{useDocumentDriveServer.CmkRSDng.js.map → useDocumentDriveServer.D3p_qwnp.js.map} +1 -1
- package/dist/assets/{useFeatureFlags.B2rj0FVs.js → useFeatureFlags.DGb_90uZ.js} +2 -2
- package/dist/assets/{useFeatureFlags.B2rj0FVs.js.map → useFeatureFlags.DGb_90uZ.js.map} +1 -1
- package/dist/assets/{user.jAwUTdxf.js → user.Dq07wtiY.js} +4 -4
- package/dist/assets/{user.jAwUTdxf.js.map → user.Dq07wtiY.js.map} +1 -1
- package/dist/index.html +1 -1
- package/dist/vite-envs.sh +1 -1
- package/package.json +9 -9
- package/dist/assets/nodefs.DMn7Exh9.js +0 -2
- package/dist/assets/useConnectConfig.GXRodYuW.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var m=Object.defineProperty;var y=(r,t,e)=>t in r?m(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var g=(r,t,e)=>y(r,typeof t!="symbol"?t+"":t,e);import{A as d,D as $}from"./app.
|
|
2
|
-
//# sourceMappingURL=index.
|
|
1
|
+
var m=Object.defineProperty;var y=(r,t,e)=>t in r?m(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var g=(r,t,e)=>y(r,typeof t!="symbol"?t+"":t,e);import{A as d,D as $}from"./app.VTqbl4SN.js";import{e as S,j as v}from"./index.CP03D3n8.js";import"react/jsx-runtime";import"react";import"./connect.config.BKrPqpZJ.js";import"./browser.BkwNmV2Z.js";import"./useFeatureFlags.DGb_90uZ.js";import"./user.Dq07wtiY.js";import"./index.LL4eJTNs.js";import"react-dom/client";import"./app-skeleton.js";import"./useAcceptedCookies.BRFP8YQO.js";import"./useConnectConfig.CKApLiWr.js";import"react-dom";import"./index.CAUjMUXb.js";import"./registerServiceWorker.bovghwDf.js";function w(r,t){const e=[],i=h(r,t,"state.global","global");e.push(...i);const o=e.filter(l=>l.type==="add").length,a=e.filter(l=>l.type==="remove").length,s={global:e.filter(l=>l.scope==="global")};return{totalChanges:e.length,additions:o,removals:a,changesByScope:s,changes:e}}function h(r,t,e,i){const o=[];if(Array.isArray(r)&&Array.isArray(t)){let n=0;for(;n<r.length;n++){const c=r[n];if(!t[n])o.push(...h(c,typeof c=="string"?"":null,`${e}[${n}]`,i));else{const f=h(c,t[n],`${e}[${n}]`,i);o.push(...f)}}for(;n<t.length;n++){const c=t[n];if(!r[n])o.push(...h(typeof c=="string"?"":null,c,`${e}[${n}]`,i));else{const f=h(r[n],c,`${e}[${n}]`,i);o.push(...f)}}return o}if(typeof r!="object"||typeof t!="object"||r===null||t===null){if(r!==t){if(typeof r=="string"&&typeof t=="string")return A(r,t,e,i);o.push({type:"remove",path:e,oldValue:r,scope:i}),o.push({type:"add",path:e,newValue:t,scope:i})}return o}const a=r,s=t,l=Object.keys(a),p=Object.keys(s);for(const n of l)n in s||o.push({type:"remove",path:`${e}.${n}`,oldValue:a[n],scope:i});for(const n of p)if(!(n in a))o.push({type:"add",path:`${e}.${n}`,newValue:s[n],scope:i});else if(a[n]!==s[n]){const c=h(a[n],s[n],`${e}.${n}`,i);o.push(...c)}return o}function A(r,t,e,i){const o=[],a=Math.max(r.length,t.length);for(let s=0;s<a;s++)s>=r.length?o.push({type:"add",path:`${e}[${s}]`,newValue:t[s],scope:i}):s>=t.length?o.push({type:"remove",path:`${e}[${s}]`,oldValue:r[s],scope:i}):r[s]!==t[s]&&(o.push({type:"remove",path:`${e}[${s}]`,oldValue:r[s],scope:i}),o.push({type:"add",path:`${e}[${s}]`,newValue:t[s],scope:i}));return o}class V{constructor(t,e=S(["processor","diff-analytics"])){g(this,"analyticsStore");g(this,"logger");this.analyticsStore=t,this.logger=e}async onStrands(t){if(t.length!==0)for(const e of t){if(e.operations.length===0)continue;const i=e.operations[0],o=d.fromString(`ph/diff/${e.driveId}/${e.documentId}/${e.branch}/${e.scope}`);i.index===0&&await this.clearSource(o);const a=50;for(let s=0;s<e.operations.length;s+=a){const l=e.operations.slice(s,s+a),p=[];for(const n of l){const f=(await v(async()=>w(n.previousState,n.state))).changes.map(u=>this.generateInput(e.driveId,e.documentId,e.branch,e.scope,n.index,u.type,1,o,n.timestamp,u.path));for(p.push(...f);p.length>=a;){const u=p.splice(0,a);await this.analyticsStore.addSeriesValues(u)}}p.length>0&&await this.analyticsStore.addSeriesValues(p)}}}async onDisconnect(){}async clearSource(t){try{await this.analyticsStore.clearSeriesBySource(t,!0)}catch(e){this.logger.error("Failed to clear source",e)}}generateInput(t,e,i,o,a,s,l,p,n,c){const f={},u=c.split("[")[0].replaceAll(".","/");return f.changes=d.fromString(`ph/diff/changes/${s}`),f.document=d.fromString(`ph/diff/document/${e}/${i}/${o}/${a}`),f.path=d.fromString(`ph/diff/path/${u}`),f.drive=d.fromString(`ph/diff/drive/${t}/${e}`),{dimensions:f,metric:"Count",start:$.fromISO(n),source:p,value:l}}}const U=r=>t=>[{processor:new V(r.analyticsStore),filter:{branch:["main"],documentId:["*"],scope:["*"],documentType:["*"]}}];export{U as processorFactory};
|
|
2
|
+
//# sourceMappingURL=index.Da64h2vQ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.JS7P29Bg.js","sources":["../../../../node_modules/.pnpm/@powerhousedao+diff-analyzer@0.0.0-dev.10_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@powerhousedao/diff-analyzer/dist/lib/document-diff.js","../../../../node_modules/.pnpm/@powerhousedao+diff-analyzer@0.0.0-dev.10_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@powerhousedao/diff-analyzer/dist/processors/diff-analytics/index.js","../../../../node_modules/.pnpm/@powerhousedao+diff-analyzer@0.0.0-dev.10_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@powerhousedao/diff-analyzer/dist/processors/index.js"],"sourcesContent":["/**\n * Calculates the difference between two document states\n */\nexport function diffDocumentStates(doc1, doc2) {\n const changes = [];\n // Compare global state\n const globalChanges = diffStateObjects(doc1, doc2, \"state.global\", \"global\");\n changes.push(...globalChanges);\n // Count changes by type\n const additions = changes.filter((c) => c.type === \"add\").length;\n const removals = changes.filter((c) => c.type === \"remove\").length;\n // Group changes by scope\n const changesByScope = {\n global: changes.filter((c) => c.scope === \"global\"),\n };\n return {\n totalChanges: changes.length,\n additions,\n removals,\n changesByScope,\n changes,\n };\n}\n/**\n * Recursively compares two state objects and returns a list of changes\n */\nfunction diffStateObjects(obj1, obj2, path, scope) {\n const changes = [];\n // Handle arrays\n if (Array.isArray(obj1) && Array.isArray(obj2)) {\n let index = 0;\n for (; index < obj1.length; index++) {\n const element = obj1[index];\n if (!obj2[index]) {\n changes.push(...diffStateObjects(element, typeof element === \"string\" ? \"\" : null, `${path}[${index}]`, scope));\n }\n else {\n const elementChanges = diffStateObjects(element, obj2[index], `${path}[${index}]`, scope);\n changes.push(...elementChanges);\n }\n }\n for (; index < obj2.length; index++) {\n const element = obj2[index];\n if (!obj1[index]) {\n changes.push(...diffStateObjects(typeof element === \"string\" ? \"\" : null, element, `${path}[${index}]`, scope));\n }\n else {\n const elementChanges = diffStateObjects(obj1[index], element, `${path}[${index}]`, scope);\n changes.push(...elementChanges);\n }\n }\n return changes;\n }\n // Handle primitive values\n if (typeof obj1 !== \"object\" ||\n typeof obj2 !== \"object\" ||\n obj1 === null ||\n obj2 === null) {\n if (obj1 !== obj2) {\n // Special handling for strings to diff character by character\n if (typeof obj1 === \"string\" && typeof obj2 === \"string\") {\n return diffStateStrings(obj1, obj2, path, scope);\n }\n else {\n // For non-string primitives, treat a change as a remove + add\n changes.push({\n type: \"remove\",\n path,\n oldValue: obj1,\n scope,\n });\n changes.push({\n type: \"add\",\n path,\n newValue: obj2,\n scope,\n });\n }\n }\n return changes;\n }\n // Handle objects\n const obj1Record = obj1;\n const obj2Record = obj2;\n const obj1Keys = Object.keys(obj1Record);\n const obj2Keys = Object.keys(obj2Record);\n // First, check for removed keys\n for (const key of obj1Keys) {\n if (!(key in obj2Record)) {\n // Key was removed\n changes.push({\n type: \"remove\",\n path: `${path}.${key}`,\n oldValue: obj1Record[key],\n scope,\n });\n }\n }\n // Then, check for added keys and modified values\n for (const key of obj2Keys) {\n if (!(key in obj1Record)) {\n // Key was added\n changes.push({\n type: \"add\",\n path: `${path}.${key}`,\n newValue: obj2Record[key],\n scope,\n });\n }\n else if (obj1Record[key] !== obj2Record[key]) {\n // For object changes, recursively diff the objects\n const nestedChanges = diffStateObjects(obj1Record[key], obj2Record[key], `${path}.${key}`, scope);\n changes.push(...nestedChanges);\n }\n }\n return changes;\n}\n/**\n * Compares two strings character by character and returns a list of changes\n */\nfunction diffStateStrings(str1, str2, path, scope) {\n const changes = [];\n const maxLen = Math.max(str1.length, str2.length);\n for (let i = 0; i < maxLen; i++) {\n if (i >= str1.length) {\n // Addition of new character\n changes.push({\n type: \"add\",\n path: `${path}[${i}]`,\n newValue: str2[i],\n scope,\n });\n }\n else if (i >= str2.length) {\n // Removal of character\n changes.push({\n type: \"remove\",\n path: `${path}[${i}]`,\n oldValue: str1[i],\n scope,\n });\n }\n else if (str1[i] !== str2[i]) {\n // Character changed\n changes.push({\n type: \"remove\",\n path: `${path}[${i}]`,\n oldValue: str1[i],\n scope,\n });\n changes.push({\n type: \"add\",\n path: `${path}[${i}]`,\n newValue: str2[i],\n scope,\n });\n }\n }\n return changes;\n}\n/**\n * Generates analytics data from a state diff summary\n */\nexport function generateStateAnalyticsData(diff) {\n return {\n totalChanges: diff.totalChanges,\n changesByType: {\n add: diff.additions,\n remove: diff.removals,\n },\n changesByScope: {\n global: diff.changesByScope.global.length,\n },\n changePaths: diff.changes.map((c) => c.path),\n };\n}\n","import { AnalyticsPath, } from \"@powerhousedao/analytics-engine-core\";\nimport { DateTime } from \"luxon\";\nimport { diffDocumentStates } from \"../../lib/document-diff.js\";\nimport { childLogger } from \"document-drive\";\nimport { runAsapAsync } from \"document-drive/utils/misc\";\nexport class DiffAnalyticsProcessor {\n analyticsStore;\n logger;\n constructor(analyticsStore, logger = childLogger([\"processor\", \"diff-analytics\"])) {\n this.analyticsStore = analyticsStore;\n this.logger = logger;\n //\n }\n async onStrands(strands) {\n if (strands.length === 0) {\n return;\n }\n for (const strand of strands) {\n if (strand.operations.length === 0) {\n continue;\n }\n const firstOp = strand.operations[0];\n const source = AnalyticsPath.fromString(`ph/diff/${strand.driveId}/${strand.documentId}/${strand.branch}/${strand.scope}`);\n if (firstOp.index === 0) {\n await this.clearSource(source);\n }\n const CHUNK_SIZE = 50;\n for (let i = 0; i < strand.operations.length; i += CHUNK_SIZE) {\n const chunk = strand.operations.slice(i, i + CHUNK_SIZE);\n const buffer = [];\n for (const operation of chunk) {\n const diff = await runAsapAsync(async () => diffDocumentStates(operation.previousState, operation.state));\n const inputs = diff.changes.map((change) => this.generateInput(strand.driveId, strand.documentId, strand.branch, strand.scope, operation.index, change.type, 1, source, operation.timestamp, change.path));\n buffer.push(...inputs);\n while (buffer.length >= CHUNK_SIZE) {\n const batch = buffer.splice(0, CHUNK_SIZE);\n await this.analyticsStore.addSeriesValues(batch);\n }\n }\n // Flush any remaining inputs\n if (buffer.length > 0) {\n await this.analyticsStore.addSeriesValues(buffer);\n }\n }\n }\n }\n async onDisconnect() { }\n async clearSource(source) {\n try {\n await this.analyticsStore.clearSeriesBySource(source, true);\n }\n catch (e) {\n this.logger.error(\"Failed to clear source\", e);\n }\n }\n generateInput(driveId, documentId, branch, scope, revision, type, value, source, timestamp, path) {\n const dimensions = {};\n const changePath = path.split(\"[\")[0].replaceAll(\".\", \"/\");\n dimensions.changes = AnalyticsPath.fromString(`ph/diff/changes/${type}`);\n dimensions.document = AnalyticsPath.fromString(`ph/diff/document/${documentId}/${branch}/${scope}/${revision}`);\n dimensions.path = AnalyticsPath.fromString(`ph/diff/path/${changePath}`);\n dimensions.drive = AnalyticsPath.fromString(`ph/diff/drive/${driveId}/${documentId}`);\n return {\n dimensions,\n metric: \"Count\",\n start: DateTime.fromISO(timestamp),\n source,\n value,\n };\n }\n}\n","/**\n * This is a scaffold file meant for customization.\n * Delete the file and run the code generator again to have it reset\n */\nimport { DiffAnalyticsProcessor } from \"./diff-analytics/index.js\";\nexport const processorFactory = (module) => (driveId) => {\n return [\n {\n processor: new DiffAnalyticsProcessor(module.analyticsStore),\n filter: {\n branch: [\"main\"],\n documentId: [\"*\"],\n scope: [\"*\"],\n documentType: [\"*\"],\n },\n },\n ];\n};\n"],"names":["diffDocumentStates","doc1","doc2","changes","globalChanges","diffStateObjects","additions","c","removals","changesByScope","obj1","obj2","path","scope","index","element","elementChanges","diffStateStrings","obj1Record","obj2Record","obj1Keys","obj2Keys","key","nestedChanges","str1","str2","maxLen","i","DiffAnalyticsProcessor","analyticsStore","logger","childLogger","__publicField","strands","strand","firstOp","source","AnalyticsPath","CHUNK_SIZE","chunk","buffer","operation","inputs","runAsapAsync","change","batch","driveId","documentId","branch","revision","type","value","timestamp","dimensions","changePath","DateTime","processorFactory","module"],"mappings":"qqBAGO,SAASA,EAAmBC,EAAMC,EAAM,CAC3C,MAAMC,EAAU,CAAE,EAEZC,EAAgBC,EAAiBJ,EAAMC,EAAM,eAAgB,QAAQ,EAC3EC,EAAQ,KAAK,GAAGC,CAAa,EAE7B,MAAME,EAAYH,EAAQ,OAAQI,GAAMA,EAAE,OAAS,KAAK,EAAE,OACpDC,EAAWL,EAAQ,OAAQI,GAAMA,EAAE,OAAS,QAAQ,EAAE,OAEtDE,EAAiB,CACnB,OAAQN,EAAQ,OAAQI,GAAMA,EAAE,QAAU,QAAQ,CACrD,EACD,MAAO,CACH,aAAcJ,EAAQ,OACtB,UAAAG,EACA,SAAAE,EACA,eAAAC,EACA,QAAAN,CACH,CACL,CAIA,SAASE,EAAiBK,EAAMC,EAAMC,EAAMC,EAAO,CAC/C,MAAMV,EAAU,CAAE,EAElB,GAAI,MAAM,QAAQO,CAAI,GAAK,MAAM,QAAQC,CAAI,EAAG,CAC5C,IAAIG,EAAQ,EACZ,KAAOA,EAAQJ,EAAK,OAAQI,IAAS,CACjC,MAAMC,EAAUL,EAAKI,CAAK,EAC1B,GAAI,CAACH,EAAKG,CAAK,EACXX,EAAQ,KAAK,GAAGE,EAAiBU,EAAS,OAAOA,GAAY,SAAW,GAAK,KAAM,GAAGH,CAAI,IAAIE,CAAK,IAAKD,CAAK,CAAC,MAE7G,CACD,MAAMG,EAAiBX,EAAiBU,EAASJ,EAAKG,CAAK,EAAG,GAAGF,CAAI,IAAIE,CAAK,IAAKD,CAAK,EACxFV,EAAQ,KAAK,GAAGa,CAAc,CAC9C,CACA,CACQ,KAAOF,EAAQH,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mBa,CAAI,EAAE,EACvEG,EAAW,SAAWhB,EAAc,WAAW,oBAAoBU,CAAU,IAAIC,CAAM,IAAInC,CAAK,IAAIoC,CAAQ,EAAE,EAC9GI,EAAW,KAAOhB,EAAc,WAAW,gBAAgBiB,CAAU,EAAE,EACvED,EAAW,MAAQhB,EAAc,WAAW,iBAAiBS,CAAO,IAAIC,CAAU,EAAE,EAC7E,CACH,WAAAM,EACA,OAAQ,QACR,MAAOE,EAAS,QAAQH,CAAS,EACjC,OAAAhB,EACA,MAAAe,CACH,CACT,CACA,CCjEY,MAACK,EAAoBC,GAAYX,GAClC,CACH,CACI,UAAW,IAAIlB,EAAuB6B,EAAO,cAAc,EAC3D,OAAQ,CACJ,OAAQ,CAAC,MAAM,EACf,WAAY,CAAC,GAAG,EAChB,MAAO,CAAC,GAAG,EACX,aAAc,CAAC,GAAG,CACrB,CACJ,CACJ","x_google_ignoreList":[0,1,2]}
|
|
1
|
+
{"version":3,"file":"index.Da64h2vQ.js","sources":["../../../../node_modules/.pnpm/@powerhousedao+diff-analyzer@0.0.0-dev.10_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@powerhousedao/diff-analyzer/dist/lib/document-diff.js","../../../../node_modules/.pnpm/@powerhousedao+diff-analyzer@0.0.0-dev.10_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@powerhousedao/diff-analyzer/dist/processors/diff-analytics/index.js","../../../../node_modules/.pnpm/@powerhousedao+diff-analyzer@0.0.0-dev.10_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@powerhousedao/diff-analyzer/dist/processors/index.js"],"sourcesContent":["/**\n * Calculates the difference between two document states\n */\nexport function diffDocumentStates(doc1, doc2) {\n const changes = [];\n // Compare global state\n const globalChanges = diffStateObjects(doc1, doc2, \"state.global\", \"global\");\n changes.push(...globalChanges);\n // Count changes by type\n const additions = changes.filter((c) => c.type === \"add\").length;\n const removals = changes.filter((c) => c.type === \"remove\").length;\n // Group changes by scope\n const changesByScope = {\n global: changes.filter((c) => c.scope === \"global\"),\n };\n return {\n totalChanges: changes.length,\n additions,\n removals,\n changesByScope,\n changes,\n };\n}\n/**\n * Recursively compares two state objects and returns a list of changes\n */\nfunction diffStateObjects(obj1, obj2, path, scope) {\n const changes = [];\n // Handle arrays\n if (Array.isArray(obj1) && Array.isArray(obj2)) {\n let index = 0;\n for (; index < obj1.length; index++) {\n const element = obj1[index];\n if (!obj2[index]) {\n changes.push(...diffStateObjects(element, typeof element === \"string\" ? \"\" : null, `${path}[${index}]`, scope));\n }\n else {\n const elementChanges = diffStateObjects(element, obj2[index], `${path}[${index}]`, scope);\n changes.push(...elementChanges);\n }\n }\n for (; index < obj2.length; index++) {\n const element = obj2[index];\n if (!obj1[index]) {\n changes.push(...diffStateObjects(typeof element === \"string\" ? \"\" : null, element, `${path}[${index}]`, scope));\n }\n else {\n const elementChanges = diffStateObjects(obj1[index], element, `${path}[${index}]`, scope);\n changes.push(...elementChanges);\n }\n }\n return changes;\n }\n // Handle primitive values\n if (typeof obj1 !== \"object\" ||\n typeof obj2 !== \"object\" ||\n obj1 === null ||\n obj2 === null) {\n if (obj1 !== obj2) {\n // Special handling for strings to diff character by character\n if (typeof obj1 === \"string\" && typeof obj2 === \"string\") {\n return diffStateStrings(obj1, obj2, path, scope);\n }\n else {\n // For non-string primitives, treat a change as a remove + add\n changes.push({\n type: \"remove\",\n path,\n oldValue: obj1,\n scope,\n });\n changes.push({\n type: \"add\",\n path,\n newValue: obj2,\n scope,\n });\n }\n }\n return changes;\n }\n // Handle objects\n const obj1Record = obj1;\n const obj2Record = obj2;\n const obj1Keys = Object.keys(obj1Record);\n const obj2Keys = Object.keys(obj2Record);\n // First, check for removed keys\n for (const key of obj1Keys) {\n if (!(key in obj2Record)) {\n // Key was removed\n changes.push({\n type: \"remove\",\n path: `${path}.${key}`,\n oldValue: obj1Record[key],\n scope,\n });\n }\n }\n // Then, check for added keys and modified values\n for (const key of obj2Keys) {\n if (!(key in obj1Record)) {\n // Key was added\n changes.push({\n type: \"add\",\n path: `${path}.${key}`,\n newValue: obj2Record[key],\n scope,\n });\n }\n else if (obj1Record[key] !== obj2Record[key]) {\n // For object changes, recursively diff the objects\n const nestedChanges = diffStateObjects(obj1Record[key], obj2Record[key], `${path}.${key}`, scope);\n changes.push(...nestedChanges);\n }\n }\n return changes;\n}\n/**\n * Compares two strings character by character and returns a list of changes\n */\nfunction diffStateStrings(str1, str2, path, scope) {\n const changes = [];\n const maxLen = Math.max(str1.length, str2.length);\n for (let i = 0; i < maxLen; i++) {\n if (i >= str1.length) {\n // Addition of new character\n changes.push({\n type: \"add\",\n path: `${path}[${i}]`,\n newValue: str2[i],\n scope,\n });\n }\n else if (i >= str2.length) {\n // Removal of character\n changes.push({\n type: \"remove\",\n path: `${path}[${i}]`,\n oldValue: str1[i],\n scope,\n });\n }\n else if (str1[i] !== str2[i]) {\n // Character changed\n changes.push({\n type: \"remove\",\n path: `${path}[${i}]`,\n oldValue: str1[i],\n scope,\n });\n changes.push({\n type: \"add\",\n path: `${path}[${i}]`,\n newValue: str2[i],\n scope,\n });\n }\n }\n return changes;\n}\n/**\n * Generates analytics data from a state diff summary\n */\nexport function generateStateAnalyticsData(diff) {\n return {\n totalChanges: diff.totalChanges,\n changesByType: {\n add: diff.additions,\n remove: diff.removals,\n },\n changesByScope: {\n global: diff.changesByScope.global.length,\n },\n changePaths: diff.changes.map((c) => c.path),\n };\n}\n","import { AnalyticsPath, } from \"@powerhousedao/analytics-engine-core\";\nimport { DateTime } from \"luxon\";\nimport { diffDocumentStates } from \"../../lib/document-diff.js\";\nimport { childLogger } from \"document-drive\";\nimport { runAsapAsync } from \"document-drive/utils/misc\";\nexport class DiffAnalyticsProcessor {\n analyticsStore;\n logger;\n constructor(analyticsStore, logger = childLogger([\"processor\", \"diff-analytics\"])) {\n this.analyticsStore = analyticsStore;\n this.logger = logger;\n //\n }\n async onStrands(strands) {\n if (strands.length === 0) {\n return;\n }\n for (const strand of strands) {\n if (strand.operations.length === 0) {\n continue;\n }\n const firstOp = strand.operations[0];\n const source = AnalyticsPath.fromString(`ph/diff/${strand.driveId}/${strand.documentId}/${strand.branch}/${strand.scope}`);\n if (firstOp.index === 0) {\n await this.clearSource(source);\n }\n const CHUNK_SIZE = 50;\n for (let i = 0; i < strand.operations.length; i += CHUNK_SIZE) {\n const chunk = strand.operations.slice(i, i + CHUNK_SIZE);\n const buffer = [];\n for (const operation of chunk) {\n const diff = await runAsapAsync(async () => diffDocumentStates(operation.previousState, operation.state));\n const inputs = diff.changes.map((change) => this.generateInput(strand.driveId, strand.documentId, strand.branch, strand.scope, operation.index, change.type, 1, source, operation.timestamp, change.path));\n buffer.push(...inputs);\n while (buffer.length >= CHUNK_SIZE) {\n const batch = buffer.splice(0, CHUNK_SIZE);\n await this.analyticsStore.addSeriesValues(batch);\n }\n }\n // Flush any remaining inputs\n if (buffer.length > 0) {\n await this.analyticsStore.addSeriesValues(buffer);\n }\n }\n }\n }\n async onDisconnect() { }\n async clearSource(source) {\n try {\n await this.analyticsStore.clearSeriesBySource(source, true);\n }\n catch (e) {\n this.logger.error(\"Failed to clear source\", e);\n }\n }\n generateInput(driveId, documentId, branch, scope, revision, type, value, source, timestamp, path) {\n const dimensions = {};\n const changePath = path.split(\"[\")[0].replaceAll(\".\", \"/\");\n dimensions.changes = AnalyticsPath.fromString(`ph/diff/changes/${type}`);\n dimensions.document = AnalyticsPath.fromString(`ph/diff/document/${documentId}/${branch}/${scope}/${revision}`);\n dimensions.path = AnalyticsPath.fromString(`ph/diff/path/${changePath}`);\n dimensions.drive = AnalyticsPath.fromString(`ph/diff/drive/${driveId}/${documentId}`);\n return {\n dimensions,\n metric: \"Count\",\n start: DateTime.fromISO(timestamp),\n source,\n value,\n };\n }\n}\n","/**\n * This is a scaffold file meant for customization.\n * Delete the file and run the code generator again to have it reset\n */\nimport { DiffAnalyticsProcessor } from \"./diff-analytics/index.js\";\nexport const processorFactory = (module) => (driveId) => {\n return [\n {\n processor: new DiffAnalyticsProcessor(module.analyticsStore),\n filter: {\n branch: [\"main\"],\n documentId: [\"*\"],\n scope: [\"*\"],\n documentType: [\"*\"],\n },\n },\n ];\n};\n"],"names":["diffDocumentStates","doc1","doc2","changes","globalChanges","diffStateObjects","additions","c","removals","changesByScope","obj1","obj2","path","scope","index","element","elementChanges","diffStateStrings","obj1Record","obj2Record","obj1Keys","obj2Keys","key","nestedChanges","str1","str2","maxLen","i","DiffAnalyticsProcessor","analyticsStore","logger","childLogger","__publicField","strands","strand","firstOp","source","AnalyticsPath","CHUNK_SIZE","chunk","buffer","operation","inputs","runAsapAsync","change","batch","driveId","documentId","branch","revision","type","value","timestamp","dimensions","changePath","DateTime","processorFactory","module"],"mappings":"qqBAGO,SAASA,EAAmBC,EAAMC,EAAM,CAC3C,MAAMC,EAAU,CAAE,EAEZC,EAAgBC,EAAiBJ,EAAMC,EAAM,eAAgB,QAAQ,EAC3EC,EAAQ,KAAK,GAAGC,CAAa,EAE7B,MAAME,EAAYH,EAAQ,OAAQI,GAAMA,EAAE,OAAS,KAAK,EAAE,OACpDC,EAAWL,EAAQ,OAAQI,GAAMA,EAAE,OAAS,QAAQ,EAAE,OAEtDE,EAAiB,CACnB,OAAQN,EAAQ,OAAQI,GAAMA,EAAE,QAAU,QAAQ,CACrD,EACD,MAAO,CACH,aAAcJ,EAAQ,OACtB,UAAAG,EACA,SAAAE,EACA,eAAAC,EACA,QAAAN,CACH,CACL,CAIA,SAASE,EAAiBK,EAAMC,EAAMC,EAAMC,EAAO,CAC/C,MAAMV,EAAU,CAAE,EAElB,GAAI,MAAM,QAAQO,CAAI,GAAK,MAAM,QAAQC,CAAI,EAAG,CAC5C,IAAIG,EAAQ,EACZ,KAAOA,EAAQJ,EAAK,OAAQI,IAAS,CACjC,MAAMC,EAAUL,EAAKI,CAAK,EAC1B,GAAI,CAACH,EAAKG,CAAK,EACXX,EAAQ,KAAK,GAAGE,EAAiBU,EAAS,OAAOA,GAAY,SAAW,GAAK,KAAM,GAAGH,CAAI,I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QnC,EAAOoC,EAAUC,EAAMC,EAAOf,EAAQgB,EAAWxC,EAAM,CAC9F,MAAMyC,EAAa,CAAE,EACfC,EAAa1C,EAAK,MAAM,GAAG,EAAE,CAAC,EAAE,WAAW,IAAK,GAAG,EACzD,OAAAyC,EAAW,QAAUhB,EAAc,WAAW,mBAAmBa,CAAI,EAAE,EACvEG,EAAW,SAAWhB,EAAc,WAAW,oBAAoBU,CAAU,IAAIC,CAAM,IAAInC,CAAK,IAAIoC,CAAQ,EAAE,EAC9GI,EAAW,KAAOhB,EAAc,WAAW,gBAAgBiB,CAAU,EAAE,EACvED,EAAW,MAAQhB,EAAc,WAAW,iBAAiBS,CAAO,IAAIC,CAAU,EAAE,EAC7E,CACH,WAAAM,EACA,OAAQ,QACR,MAAOE,EAAS,QAAQH,CAAS,EACjC,OAAAhB,EACA,MAAAe,CACH,CACT,CACA,CCjEY,MAACK,EAAoBC,GAAYX,GAClC,CACH,CACI,UAAW,IAAIlB,EAAuB6B,EAAO,cAAc,EAC3D,OAAQ,CACJ,OAAQ,CAAC,MAAM,EACf,WAAY,CAAC,GAAG,EAChB,MAAO,CAAC,GAAG,EACX,aAAc,CAAC,GAAG,CACrB,CACJ,CACJ","x_google_ignoreList":[0,1,2]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./app.
|
|
2
|
-
import{createRoot as ie}from"react-dom/client";import{_ as K}from"./index.CP03D3n8.js";import{jsxs as H,jsx as A}from"react/jsx-runtime";import{useRef as se,createElement as ce,createContext as le,StrictMode as de,Suspense as J,lazy as $}from"react";import{A as ae}from"./app-skeleton.js";const R={},Q=(e,n)=>e.unstable_is?e.unstable_is(n):n===e,X=e=>"init"in e,B=e=>!!e.write,Y=e=>"v"in e||"e"in e,T=e=>{if("e"in e)throw e.e;if((R?"production":void 0)!=="production"&&!("v"in e))throw new Error("[Bug] atom state is not initialized");return e.v},V=new WeakMap,Z=e=>{var n;return x(e)&&!!((n=V.get(e))!=null&&n[0])},fe=e=>{const n=V.get(e);n!=null&&n[0]&&(n[0]=!1,n[1].forEach(o=>o()))},ue=(e,n)=>{let o=V.get(e);if(!o){o=[!0,new Set],V.set(e,o);const d=()=>{o[0]=!1};e.then(d,d)}o[1].add(n)},x=e=>typeof(e==null?void 0:e.then)=="function",ee=(e,n,o)=>{o.p.has(e)||(o.p.add(e),n.then(()=>{o.p.delete(e)},()=>{o.p.delete(e)}))},C=(e,n,o)=>{const d=o(e),p="v"in d,a=d.v;if(x(n))for(const u of d.d.keys())ee(e,n,o(u));d.v=n,delete d.e,(!p||!Object.is(a,d.v))&&(++d.n,x(a)&&fe(a))},k=(e,n,o)=>{var d;const p=new Set;for(const a of((d=o.get(e))==null?void 0:d.t)||[])o.has(a)&&p.add(a);for(const a of n.p)p.add(a);return p},ve=()=>{const e=new Set,n=()=>{e.forEach(o=>o())};return n.add=o=>(e.add(o),()=>{e.delete(o)}),n},G=()=>{const e={},n=new WeakMap,o=d=>{var p,a;(p=n.get(e))==null||p.forEach(u=>u(d)),(a=n.get(d))==null||a.forEach(u=>u())};return o.add=(d,p)=>{const a=d||e,u=(n.has(a)?n:n.set(a,new Set)).get(a);return u.add(p),()=>{u==null||u.delete(p),u.size||n.delete(a)}},o},pe=e=>(e.c||(e.c=G()),e.m||(e.m=G()),e.u||(e.u=G()),e.f||(e.f=ve()),e),_e=Symbol(),Se=(e=new WeakMap,n=new WeakMap,o=new WeakMap,d=new Set,p=new Set,a=new Set,u={},w=(f,...S)=>f.read(...S),E=(f,...S)=>f.write(...S),P=(f,S)=>{var y;return(y=f.unstable_onInit)==null?void 0:y.call(f,S)},b=(f,S)=>{var y;return(y=f.onMount)==null?void 0:y.call(f,S)},...g)=>{const f=g[0]||(t=>{if((R?"production":void 0)!=="production"&&!t)throw new Error("Atom is undefined or null");let l=e.get(t);return l||(l={d:new Map,p:new Set,n:0},e.set(t,l),P==null||P(t,U)),l}),S=g[1]||(()=>{const t=[],l=c=>{try{c()}catch(i){t.push(i)}};do{u.f&&l(u.f);const c=new Set,i=c.add.bind(c);d.forEach(r=>{var s;return(s=n.get(r))==null?void 0:s.l.forEach(i)}),d.clear(),a.forEach(i),a.clear(),p.forEach(i),p.clear(),c.forEach(l),d.size&&y()}while(d.size||a.size||p.size);if(t.length)throw new AggregateError(t)}),y=g[2]||(()=>{const t=[],l=new WeakSet,c=new WeakSet,i=Array.from(d);for(;i.length;){const r=i[i.length-1],s=f(r);if(c.has(r)){i.pop();continue}if(l.has(r)){if(o.get(r)===s.n)t.push([r,s]);else if((R?"production":void 0)!=="production"&&o.has(r))throw new Error("[Bug] invalidated atom exists");c.add(r),i.pop();continue}l.add(r);for(const _ of k(r,s,n))l.has(_)||i.push(_)}for(let r=t.length-1;r>=0;--r){const[s,_]=t[r];let h=!1;for(const z of _.d.keys())if(z!==s&&d.has(z)){h=!0;break}h&&(D(s),L(s)),o.delete(s)}}),D=g[3]||(t=>{var l;const c=f(t);if(Y(c)&&(n.has(t)&&o.get(t)!==c.n||Array.from(c.d).every(([v,O])=>D(v).n===O)))return c;c.d.clear();let i=!0;const r=()=>{n.has(t)&&(L(t),y(),S())},s=v=>{var O;if(Q(t,v)){const q=f(v);if(!Y(q))if(X(v))C(v,v.init,f);else throw new Error("no atom init");return T(q)}const m=D(v);try{return T(m)}finally{c.d.set(v,m.n),Z(c.v)&&ee(t,c.v,m),(O=n.get(v))==null||O.t.add(t),i||r()}};let _,h;const z={get signal(){return _||(_=new AbortController),_.signal},get setSelf(){return(R?"production":void 0)!=="production"&&!B(t)&&console.warn("setSelf function cannot be used with read-only atom"),!h&&B(t)&&(h=(...v)=>{if((R?"production":void 0)!=="production"&&i&&console.warn("setSelf function cannot be called in sync"),!i)try{return I(t,...v)}finally{y(),S()}}),h}},j=c.n;try{const v=w(t,s,z);return C(t,v,f),x(v)&&(ue(v,()=>_==null?void 0:_.abort()),v.then(r,r)),c}catch(v){return delete c.v,c.e=v,++c.n,c}finally{i=!1,j!==c.n&&o.get(t)===j&&(o.set(t,c.n),d.add(t),(l=u.c)==null||l.call(u,t))}}),N=g[4]||(t=>{const l=[t];for(;l.length;){const c=l.pop(),i=f(c);for(const r of k(c,i,n)){const s=f(r);o.set(r,s.n),l.push(r)}}}),I=g[5]||((t,...l)=>{let c=!0;const i=s=>T(D(s)),r=(s,..._)=>{var h;const z=f(s);try{if(Q(t,s)){if(!X(s))throw new Error("atom not writable");const j=z.n,v=_[0];C(s,v,f),L(s),j!==z.n&&(d.add(s),(h=u.c)==null||h.call(u,s),N(s));return}else return I(s,..._)}finally{c||(y(),S())}};try{return E(t,i,r,...l)}finally{c=!1}}),L=g[6]||(t=>{var l;const c=f(t),i=n.get(t);if(i&&!Z(c.v)){for(const[r,s]of c.d)if(!i.d.has(r)){const _=f(r);M(r).t.add(t),i.d.add(r),s!==_.n&&(d.add(r),(l=u.c)==null||l.call(u,r),N(r))}for(const r of i.d||[])if(!c.d.has(r)){i.d.delete(r);const s=W(r);s==null||s.t.delete(t)}}}),M=g[7]||(t=>{var l;const c=f(t);let i=n.get(t);if(!i){D(t);for(const r of c.d.keys())M(r).t.add(t);if(i={l:new Set,d:new Set(c.d.keys()),t:new Set},n.set(t,i),(l=u.m)==null||l.call(u,t),B(t)){const r=()=>{let s=!0;const _=(...h)=>{try{return I(t,...h)}finally{s||(y(),S())}};try{const h=b(t,_);h&&(i.u=()=>{s=!0;try{h()}finally{s=!1}})}finally{s=!1}};p.add(r)}}return i}),W=g[8]||(t=>{var l;const c=f(t);let i=n.get(t);if(i&&!i.l.size&&!Array.from(i.t).some(r=>{var s;return(s=n.get(r))==null?void 0:s.d.has(t)})){i.u&&a.add(i.u),i=void 0,n.delete(t),(l=u.u)==null||l.call(u,t);for(const r of c.d.keys()){const s=W(r);s==null||s.t.delete(t)}return}return i}),oe=[e,n,o,d,p,a,u,w,E,P,b,f,S,y,D,N,I,L,M,W],U={get:t=>T(D(t)),set:(t,...l)=>{try{return I(t,...l)}finally{y(),S()}},sub:(t,l)=>{const i=M(t).l;return i.add(l),S(),()=>{i.delete(l),W(t),S()}}};return Object.defineProperty(U,_e,{value:oe}),U},te=Se,he=pe,we={},ye=()=>{let e=0;const n=he({}),o=new WeakMap,d=new WeakMap,p=te(o,d,void 0,void 0,void 0,void 0,n,void 0,(w,E,P,...b)=>e?P(w,...b):w.write(E,P,...b)),a=new Set;return n.m.add(void 0,w=>{a.add(w);const E=o.get(w);E.m=d.get(w)}),n.u.add(void 0,w=>{a.delete(w);const E=o.get(w);delete E.m}),Object.assign(p,{dev4_get_internal_weak_map:()=>(console.log("Deprecated: Use devstore from the devtools library"),o),dev4_get_mounted_atoms:()=>a,dev4_restore_atoms:w=>{const E={read:()=>null,write:(P,b)=>{++e;try{for(const[g,f]of w)"init"in g&&b(g,f)}finally{--e}}};p.set(E)}})};function ne(){return(we?"production":void 0)!=="production"?ye():te()}const ge=le(void 0);function Ee({children:e,store:n}){const o=se(void 0);return!n&&!o.current&&(o.current=ne()),ce(ge.Provider,{value:n||o.current},e)}var Ae=()=>null;const F=ne();function Pe({children:e}){return H(Ee,{store:F,children:[A(Ae,{store:F}),e]})}const be=$(()=>K(()=>import("./app.
|
|
3
|
-
//# sourceMappingURL=index.
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./app.VTqbl4SN.js","./index.CP03D3n8.js","./connect.config.BKrPqpZJ.js","./browser.BkwNmV2Z.js","./useFeatureFlags.DGb_90uZ.js","./user.Dq07wtiY.js","./useAcceptedCookies.BRFP8YQO.js","./useConnectConfig.CKApLiWr.js","./index.CAUjMUXb.js","./registerServiceWorker.bovghwDf.js","./cookie-banner.C1g7edoI.js","./i18next.CqOP20KE.js","./useTranslation.BpVv6XIW.js","./modal.7v7DsqvJ.js","./Trans.C1fPcAun.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{createRoot as ie}from"react-dom/client";import{_ as K}from"./index.CP03D3n8.js";import{jsxs as H,jsx as A}from"react/jsx-runtime";import{useRef as se,createElement as ce,createContext as le,StrictMode as de,Suspense as J,lazy as $}from"react";import{A as ae}from"./app-skeleton.js";const R={},Q=(e,n)=>e.unstable_is?e.unstable_is(n):n===e,X=e=>"init"in e,B=e=>!!e.write,Y=e=>"v"in e||"e"in e,T=e=>{if("e"in e)throw e.e;if((R?"production":void 0)!=="production"&&!("v"in e))throw new Error("[Bug] atom state is not initialized");return e.v},V=new WeakMap,Z=e=>{var n;return x(e)&&!!((n=V.get(e))!=null&&n[0])},fe=e=>{const n=V.get(e);n!=null&&n[0]&&(n[0]=!1,n[1].forEach(o=>o()))},ue=(e,n)=>{let o=V.get(e);if(!o){o=[!0,new Set],V.set(e,o);const d=()=>{o[0]=!1};e.then(d,d)}o[1].add(n)},x=e=>typeof(e==null?void 0:e.then)=="function",ee=(e,n,o)=>{o.p.has(e)||(o.p.add(e),n.then(()=>{o.p.delete(e)},()=>{o.p.delete(e)}))},C=(e,n,o)=>{const d=o(e),p="v"in d,a=d.v;if(x(n))for(const u of d.d.keys())ee(e,n,o(u));d.v=n,delete d.e,(!p||!Object.is(a,d.v))&&(++d.n,x(a)&&fe(a))},k=(e,n,o)=>{var d;const p=new Set;for(const a of((d=o.get(e))==null?void 0:d.t)||[])o.has(a)&&p.add(a);for(const a of n.p)p.add(a);return p},ve=()=>{const e=new Set,n=()=>{e.forEach(o=>o())};return n.add=o=>(e.add(o),()=>{e.delete(o)}),n},G=()=>{const e={},n=new WeakMap,o=d=>{var p,a;(p=n.get(e))==null||p.forEach(u=>u(d)),(a=n.get(d))==null||a.forEach(u=>u())};return o.add=(d,p)=>{const a=d||e,u=(n.has(a)?n:n.set(a,new Set)).get(a);return u.add(p),()=>{u==null||u.delete(p),u.size||n.delete(a)}},o},pe=e=>(e.c||(e.c=G()),e.m||(e.m=G()),e.u||(e.u=G()),e.f||(e.f=ve()),e),_e=Symbol(),Se=(e=new WeakMap,n=new WeakMap,o=new WeakMap,d=new Set,p=new Set,a=new Set,u={},w=(f,...S)=>f.read(...S),E=(f,...S)=>f.write(...S),P=(f,S)=>{var y;return(y=f.unstable_onInit)==null?void 0:y.call(f,S)},b=(f,S)=>{var y;return(y=f.onMount)==null?void 0:y.call(f,S)},...g)=>{const f=g[0]||(t=>{if((R?"production":void 0)!=="production"&&!t)throw new Error("Atom is undefined or null");let l=e.get(t);return l||(l={d:new Map,p:new Set,n:0},e.set(t,l),P==null||P(t,U)),l}),S=g[1]||(()=>{const t=[],l=c=>{try{c()}catch(i){t.push(i)}};do{u.f&&l(u.f);const c=new Set,i=c.add.bind(c);d.forEach(r=>{var s;return(s=n.get(r))==null?void 0:s.l.forEach(i)}),d.clear(),a.forEach(i),a.clear(),p.forEach(i),p.clear(),c.forEach(l),d.size&&y()}while(d.size||a.size||p.size);if(t.length)throw new AggregateError(t)}),y=g[2]||(()=>{const t=[],l=new WeakSet,c=new WeakSet,i=Array.from(d);for(;i.length;){const r=i[i.length-1],s=f(r);if(c.has(r)){i.pop();continue}if(l.has(r)){if(o.get(r)===s.n)t.push([r,s]);else if((R?"production":void 0)!=="production"&&o.has(r))throw new Error("[Bug] invalidated atom exists");c.add(r),i.pop();continue}l.add(r);for(const _ of k(r,s,n))l.has(_)||i.push(_)}for(let r=t.length-1;r>=0;--r){const[s,_]=t[r];let h=!1;for(const z of _.d.keys())if(z!==s&&d.has(z)){h=!0;break}h&&(D(s),L(s)),o.delete(s)}}),D=g[3]||(t=>{var l;const c=f(t);if(Y(c)&&(n.has(t)&&o.get(t)!==c.n||Array.from(c.d).every(([v,O])=>D(v).n===O)))return c;c.d.clear();let i=!0;const r=()=>{n.has(t)&&(L(t),y(),S())},s=v=>{var O;if(Q(t,v)){const q=f(v);if(!Y(q))if(X(v))C(v,v.init,f);else throw new Error("no atom init");return T(q)}const m=D(v);try{return T(m)}finally{c.d.set(v,m.n),Z(c.v)&&ee(t,c.v,m),(O=n.get(v))==null||O.t.add(t),i||r()}};let _,h;const z={get signal(){return _||(_=new AbortController),_.signal},get setSelf(){return(R?"production":void 0)!=="production"&&!B(t)&&console.warn("setSelf function cannot be used with read-only atom"),!h&&B(t)&&(h=(...v)=>{if((R?"production":void 0)!=="production"&&i&&console.warn("setSelf function cannot be called in sync"),!i)try{return I(t,...v)}finally{y(),S()}}),h}},j=c.n;try{const v=w(t,s,z);return C(t,v,f),x(v)&&(ue(v,()=>_==null?void 0:_.abort()),v.then(r,r)),c}catch(v){return delete c.v,c.e=v,++c.n,c}finally{i=!1,j!==c.n&&o.get(t)===j&&(o.set(t,c.n),d.add(t),(l=u.c)==null||l.call(u,t))}}),N=g[4]||(t=>{const l=[t];for(;l.length;){const c=l.pop(),i=f(c);for(const r of k(c,i,n)){const s=f(r);o.set(r,s.n),l.push(r)}}}),I=g[5]||((t,...l)=>{let c=!0;const i=s=>T(D(s)),r=(s,..._)=>{var h;const z=f(s);try{if(Q(t,s)){if(!X(s))throw new Error("atom not writable");const j=z.n,v=_[0];C(s,v,f),L(s),j!==z.n&&(d.add(s),(h=u.c)==null||h.call(u,s),N(s));return}else return I(s,..._)}finally{c||(y(),S())}};try{return E(t,i,r,...l)}finally{c=!1}}),L=g[6]||(t=>{var l;const c=f(t),i=n.get(t);if(i&&!Z(c.v)){for(const[r,s]of c.d)if(!i.d.has(r)){const _=f(r);M(r).t.add(t),i.d.add(r),s!==_.n&&(d.add(r),(l=u.c)==null||l.call(u,r),N(r))}for(const r of i.d||[])if(!c.d.has(r)){i.d.delete(r);const s=W(r);s==null||s.t.delete(t)}}}),M=g[7]||(t=>{var l;const c=f(t);let i=n.get(t);if(!i){D(t);for(const r of c.d.keys())M(r).t.add(t);if(i={l:new Set,d:new Set(c.d.keys()),t:new Set},n.set(t,i),(l=u.m)==null||l.call(u,t),B(t)){const r=()=>{let s=!0;const _=(...h)=>{try{return I(t,...h)}finally{s||(y(),S())}};try{const h=b(t,_);h&&(i.u=()=>{s=!0;try{h()}finally{s=!1}})}finally{s=!1}};p.add(r)}}return i}),W=g[8]||(t=>{var l;const c=f(t);let i=n.get(t);if(i&&!i.l.size&&!Array.from(i.t).some(r=>{var s;return(s=n.get(r))==null?void 0:s.d.has(t)})){i.u&&a.add(i.u),i=void 0,n.delete(t),(l=u.u)==null||l.call(u,t);for(const r of c.d.keys()){const s=W(r);s==null||s.t.delete(t)}return}return i}),oe=[e,n,o,d,p,a,u,w,E,P,b,f,S,y,D,N,I,L,M,W],U={get:t=>T(D(t)),set:(t,...l)=>{try{return I(t,...l)}finally{y(),S()}},sub:(t,l)=>{const i=M(t).l;return i.add(l),S(),()=>{i.delete(l),W(t),S()}}};return Object.defineProperty(U,_e,{value:oe}),U},te=Se,he=pe,we={},ye=()=>{let e=0;const n=he({}),o=new WeakMap,d=new WeakMap,p=te(o,d,void 0,void 0,void 0,void 0,n,void 0,(w,E,P,...b)=>e?P(w,...b):w.write(E,P,...b)),a=new Set;return n.m.add(void 0,w=>{a.add(w);const E=o.get(w);E.m=d.get(w)}),n.u.add(void 0,w=>{a.delete(w);const E=o.get(w);delete E.m}),Object.assign(p,{dev4_get_internal_weak_map:()=>(console.log("Deprecated: Use devstore from the devtools library"),o),dev4_get_mounted_atoms:()=>a,dev4_restore_atoms:w=>{const E={read:()=>null,write:(P,b)=>{++e;try{for(const[g,f]of w)"init"in g&&b(g,f)}finally{--e}}};p.set(E)}})};function ne(){return(we?"production":void 0)!=="production"?ye():te()}const ge=le(void 0);function Ee({children:e,store:n}){const o=se(void 0);return!n&&!o.current&&(o.current=ne()),ce(ge.Provider,{value:n||o.current},e)}var Ae=()=>null;const F=ne();function Pe({children:e}){return H(Ee,{store:F,children:[A(Ae,{store:F}),e]})}const be=$(()=>K(()=>import("./app.VTqbl4SN.js").then(e=>e.j),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]),import.meta.url)),De=$(()=>K(()=>import("./cookie-banner.C1g7edoI.js"),__vite__mapDeps([10,6,2,1,3,11,12,13,14]),import.meta.url).then(e=>({default:e.CookieBanner}))),ze=$(()=>K(()=>import("./modal.7v7DsqvJ.js"),__vite__mapDeps([13,1]),import.meta.url).then(e=>({default:e.ModalManager}))),Ie=A(de,{children:H(Pe,{children:[A(J,{fallback:A(ae,{}),name:"AppLoader",children:A(be,{})}),A(J,{name:"CookieBanner",children:A(ze,{children:A(De,{})})})]})});function Re(e){ie(e).render(Ie)}const re=document.getElementById("app");if(!re)throw new Error("#app element not found!");Re(re);const Te=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));export{F as a,Te as i};
|
|
3
|
+
//# sourceMappingURL=index.LL4eJTNs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"mappings":";4SAAMA,EAAa,CAACC,EAAMC,IAAMD,EAAK,YAAcA,EAAK,YAAYC,CAAC,EAAIA,IAAMD,EACzEE,EAAmBF,GAAS,SAAUA,EACtCG,EAA0BH,GAAS,CAAC,CAACA,EAAK,MAC1CI,EAA0BC,GAAc,MAAOA,GAAa,MAAOA,EACnEC,EAAmBD,GAAc,CACrC,GAAI,MAAOA,EACT,MAAMA,EAAU,EAElB,IAAKE,EAAkB,aAAuB,UAAY,cAAgB,EAAE,MAAOF,GAC3E,UAAI,MAAM,qCAAqC,EAEvD,OAAOA,EAAU,CACnB,EACMG,MAAsC,QACtCC,EAAoBC,GAAU,CAC9B,IAAAC,EACJ,OAAOC,EAAcF,CAAK,GAAK,CAAC,GAAGC,EAAKH,EAAgB,IAAIE,CAAK,IAAM,MAAgBC,EAAG,CAAC,EAC7F,EACME,GAAgBC,GAAY,CAC1B,MAAAC,EAAeP,EAAgB,IAAIM,CAAO,EAC5CC,GAAgB,MAAgBA,EAAa,CAAC,IAChDA,EAAa,CAAC,EAAI,GAClBA,EAAa,CAAC,EAAE,QAASC,GAAOA,GAAI,EAExC,EACMC,GAAuB,CAACH,EAASI,IAAiB,CAClD,IAAAH,EAAeP,EAAgB,IAAIM,CAAO,EAC9C,GAAI,CAACC,EAAc,CACjBA,EAAe,CAAC,GAA0B,OAAK,EAC/BP,EAAA,IAAIM,EAASC,CAAY,EACzC,MAA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F,CACF,CCfA,IAAII,GAAsE,IAAM,KCPpE,MAACC,EAAYT,GAAW,ECU7B,SAASU,GAAkB,CAAE,SAAAN,GAAY,CAC5C,OAAQO,EAAMR,GAAU,CAAE,MAAOM,EAAW,SAAU,CAACG,EAAKJ,GAAU,CAAE,MAAOC,CAAW,GAAGL,CAAQ,CAAC,CAAE,CAC5G,CCXA,MAAMS,GAAMC,EAAK,IAAMC,EAAA,WAAO,mBAAU,OAAApD,KAAA,0DAAC,EACnCqD,GAAeF,EAAK,UACtB,OAAO,6BAAoB,EAAE,oEAAW,CAAE,QAASG,EAAE,cAAe,CACxE,EAEMC,GAAeJ,EAAK,UACtB,OAAO,qBAAkB,EAAE,kDAAW,CAAE,QAASG,EAAE,cAAe,CACtE,EAEaE,GACTC,EAACC,GACG,UAAAC,EAACZ,GACG,WAACU,EAAAG,EAAA,CAAS,SAAWH,EAAAI,GAAA,CAAY,GAAI,KAAK,YACtC,SAACJ,EAAAP,GAAA,EAAI,CACT,GACAO,EAACG,GAAS,KAAK,eACX,WAACL,GACG,UAAAE,EAACJ,GAAa,GAClB,EACJ,IACJ,CACJ,GCxBJ,SAASS,GAAUC,EAAsB,CAC1BC,GAAAD,CAAO,EAAE,OAAOP,EAAS,CACxC,CAEA,MAAMS,GAAa,SAAS,eAAe,KAAK,EAChD,GAAI,CAACA,GACK,UAAI,MAAM,yBAAyB,EAG7CH,GAAUG,EAAU","names":["isSelfAtom","atom","a","hasInitialValue","isActuallyWritableAtom","isAtomStateInitialized","atomState","returnAtomValue","__vite_import_meta_env__","promiseStateMap","isPendingPromise","value","_a","isPromiseLike","abortPromise","promise","promiseState","fn","registerAbortHandler","abortHandler","settle","p","addPendingPromiseToDependency","dependencyAtomState","setAtomStateValueOrPromise","valueOrPromise","ensureAtomState","hasPrevValue","prevValue","getMountedOrPendingDependents","mountedMap","dependents","atomWithPendingPromise","createStoreHook","callbacks","notify","createStoreHookForAtoms","all","_b","key","fns","initializeStoreHooks","storeHooks","BUILDING_BLOCKS","buildStore","atomStateMap","invalidatedAtoms","changedAtoms","mountCallbacks","unmountCallbacks","atomRead","params","atomWrite","atomOnInit","store","atomOnMount","setAtom","buildingBlockFunctions","flushCallbacks","errors","call","e","add","recomputeInvalidatedAtoms","topSortedReversed","visiting","visited","stack","aState","d","i","hasChangedDeps","dep","readAtomState","mountDependencies","n","isSync","mountDependenciesIfAsync","getter","_a2","aState2","controller","setSelf","options","args","writeAtomState","prevEpochNumber","error","invalidateDependents","dState","setter","args2","mounted","mountAtom","aMounted","unmountAtom","processOnMount","onUnmount","buildingBlocks","listener","listeners","INTERNAL_buildStoreRev1","INTERNAL_initializeStoreHooks","createDevStoreRev4","inRestoreAtom","mountedAtoms","get","set","debugMountedAtoms","values","restoreAtom","_get","createStore","StoreContext","createContext","Provider","children","storeRef","useRef","createElement","DevTools","atomStore","AtomStoreProvider","_jsxs","_jsx","App","lazy","__vitePreload","CookieBanner","m","ModalManager","AppLoader","jsx","StrictMode","jsxs","Suspense","AppSkeleton","renderApp","element","createRoot","AppElement"],"ignoreList":[0,1,2,3],"sources":["../../../../node_modules/.pnpm/jotai@2.12.5_@types+react@18.3.22_react@18.3.1/node_modules/jotai/esm/vanilla/internals.mjs","../../../../node_modules/.pnpm/jotai@2.12.5_@types+react@18.3.22_react@18.3.1/node_modules/jotai/esm/vanilla.mjs","../../../../node_modules/.pnpm/jotai@2.12.5_@types+react@18.3.22_react@18.3.1/node_modules/jotai/esm/react.mjs","../../../../node_modules/.pnpm/jotai-devtools@0.12.0_@types+react@18.3.22_react-dom@18.3.1_react@18.3.1__react@18.3.1__11a9993a008134554007bd080a0f1724/node_modules/jotai-devtools/dist/index.esm.mjs","../../../../packages/common/dist/state/store.js","../../../../packages/common/dist/state/store-provider.js","../../src/components/app-loader.tsx","../../src/index.ts"],"sourcesContent":["const isSelfAtom = (atom, a) => atom.unstable_is ? atom.unstable_is(a) : a === atom;\nconst hasInitialValue = (atom) => \"init\" in atom;\nconst isActuallyWritableAtom = (atom) => !!atom.write;\nconst isAtomStateInitialized = (atomState) => \"v\" in atomState || \"e\" in atomState;\nconst returnAtomValue = (atomState) => {\n if (\"e\" in atomState) {\n throw atomState.e;\n }\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !(\"v\" in atomState)) {\n throw new Error(\"[Bug] atom state is not initialized\");\n }\n return atomState.v;\n};\nconst promiseStateMap = /* @__PURE__ */ new WeakMap();\nconst isPendingPromise = (value) => {\n var _a;\n return isPromiseLike(value) && !!((_a = promiseStateMap.get(value)) == null ? void 0 : _a[0]);\n};\nconst abortPromise = (promise) => {\n const promiseState = promiseStateMap.get(promise);\n if (promiseState == null ? void 0 : promiseState[0]) {\n promiseState[0] = false;\n promiseState[1].forEach((fn) => fn());\n }\n};\nconst registerAbortHandler = (promise, abortHandler) => {\n let promiseState = promiseStateMap.get(promise);\n if (!promiseState) {\n promiseState = [true, /* @__PURE__ */ new Set()];\n promiseStateMap.set(promise, promiseState);\n const settle = () => {\n promiseState[0] = false;\n };\n promise.then(settle, settle);\n }\n promiseState[1].add(abortHandler);\n};\nconst isPromiseLike = (p) => typeof (p == null ? void 0 : p.then) === \"function\";\nconst addPendingPromiseToDependency = (atom, promise, dependencyAtomState) => {\n if (!dependencyAtomState.p.has(atom)) {\n dependencyAtomState.p.add(atom);\n promise.then(\n () => {\n dependencyAtomState.p.delete(atom);\n },\n () => {\n dependencyAtomState.p.delete(atom);\n }\n );\n }\n};\nconst setAtomStateValueOrPromise = (atom, valueOrPromise, ensureAtomState) => {\n const atomState = ensureAtomState(atom);\n const hasPrevValue = \"v\" in atomState;\n const prevValue = atomState.v;\n if (isPromiseLike(valueOrPromise)) {\n for (const a of atomState.d.keys()) {\n addPendingPromiseToDependency(atom, valueOrPromise, ensureAtomState(a));\n }\n }\n atomState.v = valueOrPromise;\n delete atomState.e;\n if (!hasPrevValue || !Object.is(prevValue, atomState.v)) {\n ++atomState.n;\n if (isPromiseLike(prevValue)) {\n abortPromise(prevValue);\n }\n }\n};\nconst getMountedOrPendingDependents = (atom, atomState, mountedMap) => {\n var _a;\n const dependents = /* @__PURE__ */ new Set();\n for (const a of ((_a = mountedMap.get(atom)) == null ? void 0 : _a.t) || []) {\n if (mountedMap.has(a)) {\n dependents.add(a);\n }\n }\n for (const atomWithPendingPromise of atomState.p) {\n dependents.add(atomWithPendingPromise);\n }\n return dependents;\n};\nconst createStoreHook = () => {\n const callbacks = /* @__PURE__ */ new Set();\n const notify = () => {\n callbacks.forEach((fn) => fn());\n };\n notify.add = (fn) => {\n callbacks.add(fn);\n return () => {\n callbacks.delete(fn);\n };\n };\n return notify;\n};\nconst createStoreHookForAtoms = () => {\n const all = {};\n const callbacks = /* @__PURE__ */ new WeakMap();\n const notify = (atom) => {\n var _a, _b;\n (_a = callbacks.get(all)) == null ? void 0 : _a.forEach((fn) => fn(atom));\n (_b = callbacks.get(atom)) == null ? void 0 : _b.forEach((fn) => fn());\n };\n notify.add = (atom, fn) => {\n const key = atom || all;\n const fns = (callbacks.has(key) ? callbacks : callbacks.set(key, /* @__PURE__ */ new Set())).get(key);\n fns.add(fn);\n return () => {\n fns == null ? void 0 : fns.delete(fn);\n if (!fns.size) {\n callbacks.delete(key);\n }\n };\n };\n return notify;\n};\nconst initializeStoreHooks = (storeHooks) => {\n storeHooks.c || (storeHooks.c = createStoreHookForAtoms());\n storeHooks.m || (storeHooks.m = createStoreHookForAtoms());\n storeHooks.u || (storeHooks.u = createStoreHookForAtoms());\n storeHooks.f || (storeHooks.f = createStoreHook());\n return storeHooks;\n};\nconst BUILDING_BLOCKS = Symbol();\nconst getBuildingBlocks = (store) => store[BUILDING_BLOCKS];\nconst buildStore = (atomStateMap = /* @__PURE__ */ new WeakMap(), mountedMap = /* @__PURE__ */ new WeakMap(), invalidatedAtoms = /* @__PURE__ */ new WeakMap(), changedAtoms = /* @__PURE__ */ new Set(), mountCallbacks = /* @__PURE__ */ new Set(), unmountCallbacks = /* @__PURE__ */ new Set(), storeHooks = {}, atomRead = (atom, ...params) => atom.read(...params), atomWrite = (atom, ...params) => atom.write(...params), atomOnInit = (atom, store) => {\n var _a;\n return (_a = atom.unstable_onInit) == null ? void 0 : _a.call(atom, store);\n}, atomOnMount = (atom, setAtom) => {\n var _a;\n return (_a = atom.onMount) == null ? void 0 : _a.call(atom, setAtom);\n}, ...buildingBlockFunctions) => {\n const ensureAtomState = buildingBlockFunctions[0] || ((atom) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !atom) {\n throw new Error(\"Atom is undefined or null\");\n }\n let atomState = atomStateMap.get(atom);\n if (!atomState) {\n atomState = { d: /* @__PURE__ */ new Map(), p: /* @__PURE__ */ new Set(), n: 0 };\n atomStateMap.set(atom, atomState);\n atomOnInit == null ? void 0 : atomOnInit(atom, store);\n }\n return atomState;\n });\n const flushCallbacks = buildingBlockFunctions[1] || (() => {\n const errors = [];\n const call = (fn) => {\n try {\n fn();\n } catch (e) {\n errors.push(e);\n }\n };\n do {\n if (storeHooks.f) {\n call(storeHooks.f);\n }\n const callbacks = /* @__PURE__ */ new Set();\n const add = callbacks.add.bind(callbacks);\n changedAtoms.forEach((atom) => {\n var _a;\n return (_a = mountedMap.get(atom)) == null ? void 0 : _a.l.forEach(add);\n });\n changedAtoms.clear();\n unmountCallbacks.forEach(add);\n unmountCallbacks.clear();\n mountCallbacks.forEach(add);\n mountCallbacks.clear();\n callbacks.forEach(call);\n if (changedAtoms.size) {\n recomputeInvalidatedAtoms();\n }\n } while (changedAtoms.size || unmountCallbacks.size || mountCallbacks.size);\n if (errors.length) {\n throw new AggregateError(errors);\n }\n });\n const recomputeInvalidatedAtoms = buildingBlockFunctions[2] || (() => {\n const topSortedReversed = [];\n const visiting = /* @__PURE__ */ new WeakSet();\n const visited = /* @__PURE__ */ new WeakSet();\n const stack = Array.from(changedAtoms);\n while (stack.length) {\n const a = stack[stack.length - 1];\n const aState = ensureAtomState(a);\n if (visited.has(a)) {\n stack.pop();\n continue;\n }\n if (visiting.has(a)) {\n if (invalidatedAtoms.get(a) === aState.n) {\n topSortedReversed.push([a, aState]);\n } else if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && invalidatedAtoms.has(a)) {\n throw new Error(\"[Bug] invalidated atom exists\");\n }\n visited.add(a);\n stack.pop();\n continue;\n }\n visiting.add(a);\n for (const d of getMountedOrPendingDependents(a, aState, mountedMap)) {\n if (!visiting.has(d)) {\n stack.push(d);\n }\n }\n }\n for (let i = topSortedReversed.length - 1; i >= 0; --i) {\n const [a, aState] = topSortedReversed[i];\n let hasChangedDeps = false;\n for (const dep of aState.d.keys()) {\n if (dep !== a && changedAtoms.has(dep)) {\n hasChangedDeps = true;\n break;\n }\n }\n if (hasChangedDeps) {\n readAtomState(a);\n mountDependencies(a);\n }\n invalidatedAtoms.delete(a);\n }\n });\n const readAtomState = buildingBlockFunctions[3] || ((atom) => {\n var _a;\n const atomState = ensureAtomState(atom);\n if (isAtomStateInitialized(atomState)) {\n if (mountedMap.has(atom) && invalidatedAtoms.get(atom) !== atomState.n) {\n return atomState;\n }\n if (Array.from(atomState.d).every(\n ([a, n]) => (\n // Recursively, read the atom state of the dependency, and\n // check if the atom epoch number is unchanged\n readAtomState(a).n === n\n )\n )) {\n return atomState;\n }\n }\n atomState.d.clear();\n let isSync = true;\n const mountDependenciesIfAsync = () => {\n if (mountedMap.has(atom)) {\n mountDependencies(atom);\n recomputeInvalidatedAtoms();\n flushCallbacks();\n }\n };\n const getter = (a) => {\n var _a2;\n if (isSelfAtom(atom, a)) {\n const aState2 = ensureAtomState(a);\n if (!isAtomStateInitialized(aState2)) {\n if (hasInitialValue(a)) {\n setAtomStateValueOrPromise(a, a.init, ensureAtomState);\n } else {\n throw new Error(\"no atom init\");\n }\n }\n return returnAtomValue(aState2);\n }\n const aState = readAtomState(a);\n try {\n return returnAtomValue(aState);\n } finally {\n atomState.d.set(a, aState.n);\n if (isPendingPromise(atomState.v)) {\n addPendingPromiseToDependency(atom, atomState.v, aState);\n }\n (_a2 = mountedMap.get(a)) == null ? void 0 : _a2.t.add(atom);\n if (!isSync) {\n mountDependenciesIfAsync();\n }\n }\n };\n let controller;\n let setSelf;\n const options = {\n get signal() {\n if (!controller) {\n controller = new AbortController();\n }\n return controller.signal;\n },\n get setSelf() {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !isActuallyWritableAtom(atom)) {\n console.warn(\"setSelf function cannot be used with read-only atom\");\n }\n if (!setSelf && isActuallyWritableAtom(atom)) {\n setSelf = (...args) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && isSync) {\n console.warn(\"setSelf function cannot be called in sync\");\n }\n if (!isSync) {\n try {\n return writeAtomState(atom, ...args);\n } finally {\n recomputeInvalidatedAtoms();\n flushCallbacks();\n }\n }\n };\n }\n return setSelf;\n }\n };\n const prevEpochNumber = atomState.n;\n try {\n const valueOrPromise = atomRead(atom, getter, options);\n setAtomStateValueOrPromise(atom, valueOrPromise, ensureAtomState);\n if (isPromiseLike(valueOrPromise)) {\n registerAbortHandler(valueOrPromise, () => controller == null ? void 0 : controller.abort());\n valueOrPromise.then(\n mountDependenciesIfAsync,\n mountDependenciesIfAsync\n );\n }\n return atomState;\n } catch (error) {\n delete atomState.v;\n atomState.e = error;\n ++atomState.n;\n return atomState;\n } finally {\n isSync = false;\n if (prevEpochNumber !== atomState.n && invalidatedAtoms.get(atom) === prevEpochNumber) {\n invalidatedAtoms.set(atom, atomState.n);\n changedAtoms.add(atom);\n (_a = storeHooks.c) == null ? void 0 : _a.call(storeHooks, atom);\n }\n }\n });\n const invalidateDependents = buildingBlockFunctions[4] || ((atom) => {\n const stack = [atom];\n while (stack.length) {\n const a = stack.pop();\n const aState = ensureAtomState(a);\n for (const d of getMountedOrPendingDependents(a, aState, mountedMap)) {\n const dState = ensureAtomState(d);\n invalidatedAtoms.set(d, dState.n);\n stack.push(d);\n }\n }\n });\n const writeAtomState = buildingBlockFunctions[5] || ((atom, ...args) => {\n let isSync = true;\n const getter = (a) => returnAtomValue(readAtomState(a));\n const setter = (a, ...args2) => {\n var _a;\n const aState = ensureAtomState(a);\n try {\n if (isSelfAtom(atom, a)) {\n if (!hasInitialValue(a)) {\n throw new Error(\"atom not writable\");\n }\n const prevEpochNumber = aState.n;\n const v = args2[0];\n setAtomStateValueOrPromise(a, v, ensureAtomState);\n mountDependencies(a);\n if (prevEpochNumber !== aState.n) {\n changedAtoms.add(a);\n (_a = storeHooks.c) == null ? void 0 : _a.call(storeHooks, a);\n invalidateDependents(a);\n }\n return void 0;\n } else {\n return writeAtomState(a, ...args2);\n }\n } finally {\n if (!isSync) {\n recomputeInvalidatedAtoms();\n flushCallbacks();\n }\n }\n };\n try {\n return atomWrite(atom, getter, setter, ...args);\n } finally {\n isSync = false;\n }\n });\n const mountDependencies = buildingBlockFunctions[6] || ((atom) => {\n var _a;\n const atomState = ensureAtomState(atom);\n const mounted = mountedMap.get(atom);\n if (mounted && !isPendingPromise(atomState.v)) {\n for (const [a, n] of atomState.d) {\n if (!mounted.d.has(a)) {\n const aState = ensureAtomState(a);\n const aMounted = mountAtom(a);\n aMounted.t.add(atom);\n mounted.d.add(a);\n if (n !== aState.n) {\n changedAtoms.add(a);\n (_a = storeHooks.c) == null ? void 0 : _a.call(storeHooks, a);\n invalidateDependents(a);\n }\n }\n }\n for (const a of mounted.d || []) {\n if (!atomState.d.has(a)) {\n mounted.d.delete(a);\n const aMounted = unmountAtom(a);\n aMounted == null ? void 0 : aMounted.t.delete(atom);\n }\n }\n }\n });\n const mountAtom = buildingBlockFunctions[7] || ((atom) => {\n var _a;\n const atomState = ensureAtomState(atom);\n let mounted = mountedMap.get(atom);\n if (!mounted) {\n readAtomState(atom);\n for (const a of atomState.d.keys()) {\n const aMounted = mountAtom(a);\n aMounted.t.add(atom);\n }\n mounted = {\n l: /* @__PURE__ */ new Set(),\n d: new Set(atomState.d.keys()),\n t: /* @__PURE__ */ new Set()\n };\n mountedMap.set(atom, mounted);\n (_a = storeHooks.m) == null ? void 0 : _a.call(storeHooks, atom);\n if (isActuallyWritableAtom(atom)) {\n const processOnMount = () => {\n let isSync = true;\n const setAtom = (...args) => {\n try {\n return writeAtomState(atom, ...args);\n } finally {\n if (!isSync) {\n recomputeInvalidatedAtoms();\n flushCallbacks();\n }\n }\n };\n try {\n const onUnmount = atomOnMount(atom, setAtom);\n if (onUnmount) {\n mounted.u = () => {\n isSync = true;\n try {\n onUnmount();\n } finally {\n isSync = false;\n }\n };\n }\n } finally {\n isSync = false;\n }\n };\n mountCallbacks.add(processOnMount);\n }\n }\n return mounted;\n });\n const unmountAtom = buildingBlockFunctions[8] || ((atom) => {\n var _a;\n const atomState = ensureAtomState(atom);\n let mounted = mountedMap.get(atom);\n if (mounted && !mounted.l.size && !Array.from(mounted.t).some((a) => {\n var _a2;\n return (_a2 = mountedMap.get(a)) == null ? void 0 : _a2.d.has(atom);\n })) {\n if (mounted.u) {\n unmountCallbacks.add(mounted.u);\n }\n mounted = void 0;\n mountedMap.delete(atom);\n (_a = storeHooks.u) == null ? void 0 : _a.call(storeHooks, atom);\n for (const a of atomState.d.keys()) {\n const aMounted = unmountAtom(a);\n aMounted == null ? void 0 : aMounted.t.delete(atom);\n }\n return void 0;\n }\n return mounted;\n });\n const buildingBlocks = [\n // store state\n atomStateMap,\n mountedMap,\n invalidatedAtoms,\n changedAtoms,\n mountCallbacks,\n unmountCallbacks,\n storeHooks,\n // atom interceptors\n atomRead,\n atomWrite,\n atomOnInit,\n atomOnMount,\n // building-block functions\n ensureAtomState,\n flushCallbacks,\n recomputeInvalidatedAtoms,\n readAtomState,\n invalidateDependents,\n writeAtomState,\n mountDependencies,\n mountAtom,\n unmountAtom\n ];\n const store = {\n get: (atom) => returnAtomValue(readAtomState(atom)),\n set: (atom, ...args) => {\n try {\n return writeAtomState(atom, ...args);\n } finally {\n recomputeInvalidatedAtoms();\n flushCallbacks();\n }\n },\n sub: (atom, listener) => {\n const mounted = mountAtom(atom);\n const listeners = mounted.l;\n listeners.add(listener);\n flushCallbacks();\n return () => {\n listeners.delete(listener);\n unmountAtom(atom);\n flushCallbacks();\n };\n }\n };\n Object.defineProperty(store, BUILDING_BLOCKS, { value: buildingBlocks });\n return store;\n};\nconst INTERNAL_buildStoreRev1 = buildStore;\nconst INTERNAL_getBuildingBlocksRev1 = getBuildingBlocks;\nconst INTERNAL_initializeStoreHooks = initializeStoreHooks;\nconst INTERNAL_isSelfAtom = isSelfAtom;\nconst INTERNAL_hasInitialValue = hasInitialValue;\nconst INTERNAL_isActuallyWritableAtom = isActuallyWritableAtom;\nconst INTERNAL_isAtomStateInitialized = isAtomStateInitialized;\nconst INTERNAL_returnAtomValue = returnAtomValue;\nconst INTERNAL_promiseStateMap = promiseStateMap;\nconst INTERNAL_isPendingPromise = isPendingPromise;\nconst INTERNAL_abortPromise = abortPromise;\nconst INTERNAL_registerAbortHandler = registerAbortHandler;\nconst INTERNAL_isPromiseLike = isPromiseLike;\nconst INTERNAL_addPendingPromiseToDependency = addPendingPromiseToDependency;\nconst INTERNAL_setAtomStateValueOrPromise = setAtomStateValueOrPromise;\nconst INTERNAL_getMountedOrPendingDependents = getMountedOrPendingDependents;\n\nexport { INTERNAL_abortPromise, INTERNAL_addPendingPromiseToDependency, INTERNAL_buildStoreRev1, INTERNAL_getBuildingBlocksRev1, INTERNAL_getMountedOrPendingDependents, INTERNAL_hasInitialValue, INTERNAL_initializeStoreHooks, INTERNAL_isActuallyWritableAtom, INTERNAL_isAtomStateInitialized, INTERNAL_isPendingPromise, INTERNAL_isPromiseLike, INTERNAL_isSelfAtom, INTERNAL_promiseStateMap, INTERNAL_registerAbortHandler, INTERNAL_returnAtomValue, INTERNAL_setAtomStateValueOrPromise };\n","import { INTERNAL_buildStoreRev1, INTERNAL_initializeStoreHooks } from 'jotai/vanilla/internals';\n\nlet keyCount = 0;\nfunction atom(read, write) {\n const key = `atom${++keyCount}`;\n const config = {\n toString() {\n return (import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && this.debugLabel ? key + \":\" + this.debugLabel : key;\n }\n };\n if (typeof read === \"function\") {\n config.read = read;\n } else {\n config.init = read;\n config.read = defaultRead;\n config.write = defaultWrite;\n }\n if (write) {\n config.write = write;\n }\n return config;\n}\nfunction defaultRead(get) {\n return get(this);\n}\nfunction defaultWrite(get, set, arg) {\n return set(\n this,\n typeof arg === \"function\" ? arg(get(this)) : arg\n );\n}\n\nconst createDevStoreRev4 = () => {\n let inRestoreAtom = 0;\n const storeHooks = INTERNAL_initializeStoreHooks({});\n const atomStateMap = /* @__PURE__ */ new WeakMap();\n const mountedAtoms = /* @__PURE__ */ new WeakMap();\n const store = INTERNAL_buildStoreRev1(\n atomStateMap,\n mountedAtoms,\n void 0,\n void 0,\n void 0,\n void 0,\n storeHooks,\n void 0,\n (atom, get, set, ...args) => {\n if (inRestoreAtom) {\n return set(atom, ...args);\n }\n return atom.write(get, set, ...args);\n }\n );\n const debugMountedAtoms = /* @__PURE__ */ new Set();\n storeHooks.m.add(void 0, (atom) => {\n debugMountedAtoms.add(atom);\n const atomState = atomStateMap.get(atom);\n atomState.m = mountedAtoms.get(atom);\n });\n storeHooks.u.add(void 0, (atom) => {\n debugMountedAtoms.delete(atom);\n const atomState = atomStateMap.get(atom);\n delete atomState.m;\n });\n const devStore = {\n // store dev methods (these are tentative and subject to change without notice)\n dev4_get_internal_weak_map: () => {\n console.log(\"Deprecated: Use devstore from the devtools library\");\n return atomStateMap;\n },\n dev4_get_mounted_atoms: () => debugMountedAtoms,\n dev4_restore_atoms: (values) => {\n const restoreAtom = {\n read: () => null,\n write: (_get, set) => {\n ++inRestoreAtom;\n try {\n for (const [atom, value] of values) {\n if (\"init\" in atom) {\n set(atom, value);\n }\n }\n } finally {\n --inRestoreAtom;\n }\n }\n };\n store.set(restoreAtom);\n }\n };\n return Object.assign(store, devStore);\n};\nlet overiddenCreateStore;\nfunction INTERNAL_overrideCreateStore(fn) {\n overiddenCreateStore = fn(overiddenCreateStore);\n}\nfunction createStore() {\n if (overiddenCreateStore) {\n return overiddenCreateStore();\n }\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n return createDevStoreRev4();\n }\n return INTERNAL_buildStoreRev1();\n}\nlet defaultStore;\nfunction getDefaultStore() {\n if (!defaultStore) {\n defaultStore = createStore();\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n globalThis.__JOTAI_DEFAULT_STORE__ || (globalThis.__JOTAI_DEFAULT_STORE__ = defaultStore);\n if (globalThis.__JOTAI_DEFAULT_STORE__ !== defaultStore) {\n console.warn(\n \"Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044\"\n );\n }\n }\n }\n return defaultStore;\n}\n\nexport { INTERNAL_overrideCreateStore, atom, createStore, getDefaultStore };\n","'use client';\nimport React, { createContext, useContext, useRef, createElement, useReducer, useEffect, useDebugValue, useCallback } from 'react';\nimport { getDefaultStore, createStore } from 'jotai/vanilla';\nimport { INTERNAL_registerAbortHandler } from 'jotai/vanilla/internals';\n\nconst StoreContext = createContext(\n void 0\n);\nfunction useStore(options) {\n const store = useContext(StoreContext);\n return (options == null ? void 0 : options.store) || store || getDefaultStore();\n}\nfunction Provider({\n children,\n store\n}) {\n const storeRef = useRef(void 0);\n if (!store && !storeRef.current) {\n storeRef.current = createStore();\n }\n return createElement(\n StoreContext.Provider,\n {\n value: store || storeRef.current\n },\n children\n );\n}\n\nconst isPromiseLike = (x) => typeof (x == null ? void 0 : x.then) === \"function\";\nconst attachPromiseStatus = (promise) => {\n if (!promise.status) {\n promise.status = \"pending\";\n promise.then(\n (v) => {\n promise.status = \"fulfilled\";\n promise.value = v;\n },\n (e) => {\n promise.status = \"rejected\";\n promise.reason = e;\n }\n );\n }\n};\nconst use = React.use || // A shim for older React versions\n((promise) => {\n if (promise.status === \"pending\") {\n throw promise;\n } else if (promise.status === \"fulfilled\") {\n return promise.value;\n } else if (promise.status === \"rejected\") {\n throw promise.reason;\n } else {\n attachPromiseStatus(promise);\n throw promise;\n }\n});\nconst continuablePromiseMap = /* @__PURE__ */ new WeakMap();\nconst createContinuablePromise = (promise, getValue) => {\n let continuablePromise = continuablePromiseMap.get(promise);\n if (!continuablePromise) {\n continuablePromise = new Promise((resolve, reject) => {\n let curr = promise;\n const onFulfilled = (me) => (v) => {\n if (curr === me) {\n resolve(v);\n }\n };\n const onRejected = (me) => (e) => {\n if (curr === me) {\n reject(e);\n }\n };\n const onAbort = () => {\n try {\n const nextValue = getValue();\n if (isPromiseLike(nextValue)) {\n continuablePromiseMap.set(nextValue, continuablePromise);\n curr = nextValue;\n nextValue.then(onFulfilled(nextValue), onRejected(nextValue));\n INTERNAL_registerAbortHandler(nextValue, onAbort);\n } else {\n resolve(nextValue);\n }\n } catch (e) {\n reject(e);\n }\n };\n promise.then(onFulfilled(promise), onRejected(promise));\n INTERNAL_registerAbortHandler(promise, onAbort);\n });\n continuablePromiseMap.set(promise, continuablePromise);\n }\n return continuablePromise;\n};\nfunction useAtomValue(atom, options) {\n const { delay, unstable_promiseStatus: promiseStatus = !React.use } = options || {};\n const store = useStore(options);\n const [[valueFromReducer, storeFromReducer, atomFromReducer], rerender] = useReducer(\n (prev) => {\n const nextValue = store.get(atom);\n if (Object.is(prev[0], nextValue) && prev[1] === store && prev[2] === atom) {\n return prev;\n }\n return [nextValue, store, atom];\n },\n void 0,\n () => [store.get(atom), store, atom]\n );\n let value = valueFromReducer;\n if (storeFromReducer !== store || atomFromReducer !== atom) {\n rerender();\n value = store.get(atom);\n }\n useEffect(() => {\n const unsub = store.sub(atom, () => {\n if (promiseStatus) {\n try {\n const value2 = store.get(atom);\n if (isPromiseLike(value2)) {\n attachPromiseStatus(\n createContinuablePromise(value2, () => store.get(atom))\n );\n }\n } catch (e) {\n }\n }\n if (typeof delay === \"number\") {\n setTimeout(rerender, delay);\n return;\n }\n rerender();\n });\n rerender();\n return unsub;\n }, [store, atom, delay, promiseStatus]);\n useDebugValue(value);\n if (isPromiseLike(value)) {\n const promise = createContinuablePromise(value, () => store.get(atom));\n if (promiseStatus) {\n attachPromiseStatus(promise);\n }\n return use(promise);\n }\n return value;\n}\n\nfunction useSetAtom(atom, options) {\n const store = useStore(options);\n const setAtom = useCallback(\n (...args) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !(\"write\" in atom)) {\n throw new Error(\"not writable atom\");\n }\n return store.set(atom, ...args);\n },\n [store, atom]\n );\n return setAtom;\n}\n\nfunction useAtom(atom, options) {\n return [\n useAtomValue(atom, options),\n // We do wrong type assertion here, which results in throwing an error.\n useSetAtom(atom, options)\n ];\n}\n\nexport { Provider, useAtom, useAtomValue, useSetAtom, useStore };\n","import {\n InternalDevTools\n} from \"./chunk-HLGSGNDX.esm.mjs\";\nimport {\n useAtomDevtools,\n useAtomsDebugValue,\n useAtomsDevtools,\n useAtomsSnapshot,\n useGotoAtomsSnapshot\n} from \"./chunk-K3M223F4.esm.mjs\";\n\n// src/index.ts\nvar DevTools = process.env.NODE_ENV !== \"production\" ? InternalDevTools : () => null;\nexport {\n DevTools,\n useAtomDevtools,\n useAtomsDebugValue,\n useAtomsDevtools,\n useAtomsSnapshot,\n useGotoAtomsSnapshot\n};\n","import { createStore } from \"jotai\";\n/** The atom store for the app.\n *\n * All derived hooks should use this store.\n */\nexport const atomStore = createStore();\n//# sourceMappingURL=store.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Provider } from \"jotai\";\nimport { DevTools } from \"jotai-devtools\";\nimport \"jotai-devtools/styles.css\";\nimport { atomStore } from \"./store.js\";\n/** Provides the atom store to the app.\n *\n * This is the top-level provider for the atom store.\n *\n * It is used to provide the atom store to the app.\n *\n * It should only be used once in the app and must appear before any `<Suspense>` boundaries.\n *\n * Includes the Jotai DevTools for debugging.\n */\nexport function AtomStoreProvider({ children }) {\n return (_jsxs(Provider, { store: atomStore, children: [_jsx(DevTools, { store: atomStore }), children] }));\n}\n//# sourceMappingURL=store-provider.js.map","import { lazy, StrictMode, Suspense } from 'react';\nimport '../i18n';\n\nimport { AtomStoreProvider } from '@powerhousedao/common';\nimport { AppSkeleton } from './app-skeleton.js';\n\nconst App = lazy(() => import('./app.js'));\nconst CookieBanner = lazy(() =>\n import('./cookie-banner.js').then(m => ({ default: m.CookieBanner })),\n);\n\nconst ModalManager = lazy(() =>\n import('./modal/modal.js').then(m => ({ default: m.ModalManager })),\n);\n\nexport const AppLoader = (\n <StrictMode>\n <AtomStoreProvider>\n <Suspense fallback={<AppSkeleton />} name=\"AppLoader\">\n <App />\n </Suspense>\n <Suspense name=\"CookieBanner\">\n <ModalManager>\n <CookieBanner />\n </ModalManager>\n </Suspense>\n </AtomStoreProvider>\n </StrictMode>\n);\n","import { createRoot } from 'react-dom/client';\nimport { AppLoader } from './components/app-loader.js';\n\nfunction renderApp(element: HTMLElement) {\n createRoot(element).render(AppLoader);\n}\n\nconst AppElement = document.getElementById('app');\nif (!AppElement) {\n throw new Error('#app element not found!');\n}\n\nrenderApp(AppElement);\n"],"file":"assets/index.CaW_4tj2.js"}
|
|
1
|
+
{"version":3,"mappings":";4SAAMA,EAAa,CAACC,EAAMC,IAAMD,EAAK,YAAcA,EAAK,YAAYC,CAAC,EAAIA,IAAMD,EACzEE,EAAmBF,GAAS,SAAUA,EACtCG,EAA0BH,GAAS,CAAC,CAACA,EAAK,MAC1CI,EAA0BC,GAAc,MAAOA,GAAa,MAAOA,EACnEC,EAAmBD,GAAc,CACrC,GAAI,MAAOA,EACT,MAAMA,EAAU,EAElB,IAAKE,EAAkB,aAAuB,UAAY,cAAgB,EAAE,MAAOF,GAC3E,UAAI,MAAM,qCAAqC,EAEvD,OAAOA,EAAU,CACnB,EACMG,MAAsC,QACtCC,EAAoBC,GAAU,CAC9B,IAAAC,EACJ,OAAOC,EAAcF,CAAK,GAAK,CAAC,GAAGC,EAAKH,EAAgB,IAAIE,CAAK,IAAM,MAAgBC,EAAG,CAAC,EAC7F,EACME,GAAgBC,GAAY,CAC1B,MAAAC,EAAeP,EAAgB,IAAIM,CAAO,EAC5CC,GAAgB,MA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AAwB,CACjC,CCnGA,MAAMY,GAAeC,GACnB,MACF,EAKA,SAASC,GAAS,CAChB,SAAAC,EACA,MAAA9D,CACF,EAAG,CACK,MAAA+D,EAAWC,GAAO,MAAM,EAC9B,MAAI,CAAChE,GAAS,CAAC+D,EAAS,UACtBA,EAAS,QAAUL,GAAY,GAE1BO,GACLN,GAAa,SACb,CACE,MAAO3D,GAAS+D,EAAS,OAC3B,EACAD,CACF,CACF,CCfA,IAAII,GAAsE,IAAM,KCPpE,MAACC,EAAYT,GAAW,ECU7B,SAASU,GAAkB,CAAE,SAAAN,GAAY,CAC5C,OAAQO,EAAMR,GAAU,CAAE,MAAOM,EAAW,SAAU,CAACG,EAAKJ,GAAU,CAAE,MAAOC,CAAW,GAAGL,CAAQ,CAAC,CAAE,CAC5G,CCXA,MAAMS,GAAMC,EAAK,IAAMC,EAAA,WAAO,mBAAU,OAAApD,KAAA,0DAAC,EACnCqD,GAAeF,EAAK,UACtB,OAAO,6BAAoB,EAAE,oEAAW,CAAE,QAASG,EAAE,cAAe,CACxE,EAEMC,GAAeJ,EAAK,UACtB,OAAO,qBAAkB,EAAE,kDAAW,CAAE,QAASG,EAAE,cAAe,CACtE,EAEaE,GACTC,EAACC,GACG,UAAAC,EAACZ,GACG,WAACU,EAAAG,EAAA,CAAS,SAAWH,EAAAI,GAAA,CAAY,GAAI,KAAK,YACtC,SAACJ,EAAAP,GAAA,EAAI,CACT,GACAO,EAACG,GAAS,KAAK,eACX,WAACL,GACG,UAAAE,EAACJ,GAAa,GAClB,EACJ,IACJ,CACJ,GCxBJ,SAASS,GAAUC,EAAsB,CAC1BC,GAAAD,CAAO,EAAE,OAAOP,EAAS,CACxC,CAEA,MAAMS,GAAa,SAAS,eAAe,KAAK,EAChD,GAAI,CAACA,GACK,UAAI,MAAM,yBAAyB,EAG7CH,GAAUG,EAAU","names":["isSelfAtom","atom","a","hasInitialValue","isActuallyWritableAtom","isAtomStateInitialized","atomState","returnAtomValue","__vite_import_meta_env__","promiseStateMap","isPendingPromise","value","_a","isPromiseLike","abortPromise","promise","promiseState","fn","registerAbortHandler","abortHandler","settle","p","addPendingPromiseToDependency","dependencyAtomState","setAtomStateValueOrPromise","valueOrPromise","ensureAtomState","hasPrevValue","prevValue","getMountedOrPendingDependents","mountedMap","dependents","atomWithPendingPromise","createStoreHook","callbacks","notify","createStoreHookForAtoms","all","_b","key","fns","initializeStoreHooks","storeHooks","BUILDING_BLOCKS","buildStore","atomStateMap","invalidatedAtoms","changedAtoms","mountCallbacks","unmountCallbacks","atomRead","params","atomWrite","atomOnInit","store","atomOnMount","setAtom","buildingBlockFunctions","flushCallbacks","errors","call","e","add","recomputeInvalidatedAtoms","topSortedReversed","visiting","visited","stack","aState","d","i","hasChangedDeps","dep","readAtomState","mountDependencies","n","isSync","mountDependenciesIfAsync","getter","_a2","aState2","controller","setSelf","options","args","writeAtomState","prevEpochNumber","error","invalidateDependents","dState","setter","args2","mounted","mountAtom","aMounted","unmountAtom","processOnMount","onUnmount","buildingBlocks","listener","listeners","INTERNAL_buildStoreRev1","INTERNAL_initializeStoreHooks","createDevStoreRev4","inRestoreAtom","mountedAtoms","get","set","debugMountedAtoms","values","restoreAtom","_get","createStore","StoreContext","createContext","Provider","children","storeRef","useRef","createElement","DevTools","atomStore","AtomStoreProvider","_jsxs","_jsx","App","lazy","__vitePreload","CookieBanner","m","ModalManager","AppLoader","jsx","StrictMode","jsxs","Suspense","AppSkeleton","renderApp","element","createRoot","AppElement"],"ignoreList":[0,1,2,3],"sources":["../../../../node_modules/.pnpm/jotai@2.12.5_@types+react@18.3.22_react@18.3.1/node_modules/jotai/esm/vanilla/internals.mjs","../../../../node_modules/.pnpm/jotai@2.12.5_@types+react@18.3.22_react@18.3.1/node_modules/jotai/esm/vanilla.mjs","../../../../node_modules/.pnpm/jotai@2.12.5_@types+react@18.3.22_react@18.3.1/node_modules/jotai/esm/react.mjs","../../../../node_modules/.pnpm/jotai-devtools@0.12.0_@types+react@18.3.22_react-dom@18.3.1_react@18.3.1__react@18.3.1__11a9993a008134554007bd080a0f1724/node_modules/jotai-devtools/dist/index.esm.mjs","../../../../packages/common/dist/state/store.js","../../../../packages/common/dist/state/store-provider.js","../../src/components/app-loader.tsx","../../src/index.ts"],"sourcesContent":["const isSelfAtom = (atom, a) => atom.unstable_is ? atom.unstable_is(a) : a === atom;\nconst hasInitialValue = (atom) => \"init\" in atom;\nconst isActuallyWritableAtom = (atom) => !!atom.write;\nconst isAtomStateInitialized = (atomState) => \"v\" in atomState || \"e\" in atomState;\nconst returnAtomValue = (atomState) => {\n if (\"e\" in atomState) {\n throw atomState.e;\n }\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !(\"v\" in atomState)) {\n throw new Error(\"[Bug] atom state is not initialized\");\n }\n return atomState.v;\n};\nconst promiseStateMap = /* @__PURE__ */ new WeakMap();\nconst isPendingPromise = (value) => {\n var _a;\n return isPromiseLike(value) && !!((_a = promiseStateMap.get(value)) == null ? void 0 : _a[0]);\n};\nconst abortPromise = (promise) => {\n const promiseState = promiseStateMap.get(promise);\n if (promiseState == null ? void 0 : promiseState[0]) {\n promiseState[0] = false;\n promiseState[1].forEach((fn) => fn());\n }\n};\nconst registerAbortHandler = (promise, abortHandler) => {\n let promiseState = promiseStateMap.get(promise);\n if (!promiseState) {\n promiseState = [true, /* @__PURE__ */ new Set()];\n promiseStateMap.set(promise, promiseState);\n const settle = () => {\n promiseState[0] = false;\n };\n promise.then(settle, settle);\n }\n promiseState[1].add(abortHandler);\n};\nconst isPromiseLike = (p) => typeof (p == null ? void 0 : p.then) === \"function\";\nconst addPendingPromiseToDependency = (atom, promise, dependencyAtomState) => {\n if (!dependencyAtomState.p.has(atom)) {\n dependencyAtomState.p.add(atom);\n promise.then(\n () => {\n dependencyAtomState.p.delete(atom);\n },\n () => {\n dependencyAtomState.p.delete(atom);\n }\n );\n }\n};\nconst setAtomStateValueOrPromise = (atom, valueOrPromise, ensureAtomState) => {\n const atomState = ensureAtomState(atom);\n const hasPrevValue = \"v\" in atomState;\n const prevValue = atomState.v;\n if (isPromiseLike(valueOrPromise)) {\n for (const a of atomState.d.keys()) {\n addPendingPromiseToDependency(atom, valueOrPromise, ensureAtomState(a));\n }\n }\n atomState.v = valueOrPromise;\n delete atomState.e;\n if (!hasPrevValue || !Object.is(prevValue, atomState.v)) {\n ++atomState.n;\n if (isPromiseLike(prevValue)) {\n abortPromise(prevValue);\n }\n }\n};\nconst getMountedOrPendingDependents = (atom, atomState, mountedMap) => {\n var _a;\n const dependents = /* @__PURE__ */ new Set();\n for (const a of ((_a = mountedMap.get(atom)) == null ? void 0 : _a.t) || []) {\n if (mountedMap.has(a)) {\n dependents.add(a);\n }\n }\n for (const atomWithPendingPromise of atomState.p) {\n dependents.add(atomWithPendingPromise);\n }\n return dependents;\n};\nconst createStoreHook = () => {\n const callbacks = /* @__PURE__ */ new Set();\n const notify = () => {\n callbacks.forEach((fn) => fn());\n };\n notify.add = (fn) => {\n callbacks.add(fn);\n return () => {\n callbacks.delete(fn);\n };\n };\n return notify;\n};\nconst createStoreHookForAtoms = () => {\n const all = {};\n const callbacks = /* @__PURE__ */ new WeakMap();\n const notify = (atom) => {\n var _a, _b;\n (_a = callbacks.get(all)) == null ? void 0 : _a.forEach((fn) => fn(atom));\n (_b = callbacks.get(atom)) == null ? void 0 : _b.forEach((fn) => fn());\n };\n notify.add = (atom, fn) => {\n const key = atom || all;\n const fns = (callbacks.has(key) ? callbacks : callbacks.set(key, /* @__PURE__ */ new Set())).get(key);\n fns.add(fn);\n return () => {\n fns == null ? void 0 : fns.delete(fn);\n if (!fns.size) {\n callbacks.delete(key);\n }\n };\n };\n return notify;\n};\nconst initializeStoreHooks = (storeHooks) => {\n storeHooks.c || (storeHooks.c = createStoreHookForAtoms());\n storeHooks.m || (storeHooks.m = createStoreHookForAtoms());\n storeHooks.u || (storeHooks.u = createStoreHookForAtoms());\n storeHooks.f || (storeHooks.f = createStoreHook());\n return storeHooks;\n};\nconst BUILDING_BLOCKS = Symbol();\nconst getBuildingBlocks = (store) => store[BUILDING_BLOCKS];\nconst buildStore = (atomStateMap = /* @__PURE__ */ new WeakMap(), mountedMap = /* @__PURE__ */ new WeakMap(), invalidatedAtoms = /* @__PURE__ */ new WeakMap(), changedAtoms = /* @__PURE__ */ new Set(), mountCallbacks = /* @__PURE__ */ new Set(), unmountCallbacks = /* @__PURE__ */ new Set(), storeHooks = {}, atomRead = (atom, ...params) => atom.read(...params), atomWrite = (atom, ...params) => atom.write(...params), atomOnInit = (atom, store) => {\n var _a;\n return (_a = atom.unstable_onInit) == null ? void 0 : _a.call(atom, store);\n}, atomOnMount = (atom, setAtom) => {\n var _a;\n return (_a = atom.onMount) == null ? void 0 : _a.call(atom, setAtom);\n}, ...buildingBlockFunctions) => {\n const ensureAtomState = buildingBlockFunctions[0] || ((atom) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !atom) {\n throw new Error(\"Atom is undefined or null\");\n }\n let atomState = atomStateMap.get(atom);\n if (!atomState) {\n atomState = { d: /* @__PURE__ */ new Map(), p: /* @__PURE__ */ new Set(), n: 0 };\n atomStateMap.set(atom, atomState);\n atomOnInit == null ? void 0 : atomOnInit(atom, store);\n }\n return atomState;\n });\n const flushCallbacks = buildingBlockFunctions[1] || (() => {\n const errors = [];\n const call = (fn) => {\n try {\n fn();\n } catch (e) {\n errors.push(e);\n }\n };\n do {\n if (storeHooks.f) {\n call(storeHooks.f);\n }\n const callbacks = /* @__PURE__ */ new Set();\n const add = callbacks.add.bind(callbacks);\n changedAtoms.forEach((atom) => {\n var _a;\n return (_a = mountedMap.get(atom)) == null ? void 0 : _a.l.forEach(add);\n });\n changedAtoms.clear();\n unmountCallbacks.forEach(add);\n unmountCallbacks.clear();\n mountCallbacks.forEach(add);\n mountCallbacks.clear();\n callbacks.forEach(call);\n if (changedAtoms.size) {\n recomputeInvalidatedAtoms();\n }\n } while (changedAtoms.size || unmountCallbacks.size || mountCallbacks.size);\n if (errors.length) {\n throw new AggregateError(errors);\n }\n });\n const recomputeInvalidatedAtoms = buildingBlockFunctions[2] || (() => {\n const topSortedReversed = [];\n const visiting = /* @__PURE__ */ new WeakSet();\n const visited = /* @__PURE__ */ new WeakSet();\n const stack = Array.from(changedAtoms);\n while (stack.length) {\n const a = stack[stack.length - 1];\n const aState = ensureAtomState(a);\n if (visited.has(a)) {\n stack.pop();\n continue;\n }\n if (visiting.has(a)) {\n if (invalidatedAtoms.get(a) === aState.n) {\n topSortedReversed.push([a, aState]);\n } else if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && invalidatedAtoms.has(a)) {\n throw new Error(\"[Bug] invalidated atom exists\");\n }\n visited.add(a);\n stack.pop();\n continue;\n }\n visiting.add(a);\n for (const d of getMountedOrPendingDependents(a, aState, mountedMap)) {\n if (!visiting.has(d)) {\n stack.push(d);\n }\n }\n }\n for (let i = topSortedReversed.length - 1; i >= 0; --i) {\n const [a, aState] = topSortedReversed[i];\n let hasChangedDeps = false;\n for (const dep of aState.d.keys()) {\n if (dep !== a && changedAtoms.has(dep)) {\n hasChangedDeps = true;\n break;\n }\n }\n if (hasChangedDeps) {\n readAtomState(a);\n mountDependencies(a);\n }\n invalidatedAtoms.delete(a);\n }\n });\n const readAtomState = buildingBlockFunctions[3] || ((atom) => {\n var _a;\n const atomState = ensureAtomState(atom);\n if (isAtomStateInitialized(atomState)) {\n if (mountedMap.has(atom) && invalidatedAtoms.get(atom) !== atomState.n) {\n return atomState;\n }\n if (Array.from(atomState.d).every(\n ([a, n]) => (\n // Recursively, read the atom state of the dependency, and\n // check if the atom epoch number is unchanged\n readAtomState(a).n === n\n )\n )) {\n return atomState;\n }\n }\n atomState.d.clear();\n let isSync = true;\n const mountDependenciesIfAsync = () => {\n if (mountedMap.has(atom)) {\n mountDependencies(atom);\n recomputeInvalidatedAtoms();\n flushCallbacks();\n }\n };\n const getter = (a) => {\n var _a2;\n if (isSelfAtom(atom, a)) {\n const aState2 = ensureAtomState(a);\n if (!isAtomStateInitialized(aState2)) {\n if (hasInitialValue(a)) {\n setAtomStateValueOrPromise(a, a.init, ensureAtomState);\n } else {\n throw new Error(\"no atom init\");\n }\n }\n return returnAtomValue(aState2);\n }\n const aState = readAtomState(a);\n try {\n return returnAtomValue(aState);\n } finally {\n atomState.d.set(a, aState.n);\n if (isPendingPromise(atomState.v)) {\n addPendingPromiseToDependency(atom, atomState.v, aState);\n }\n (_a2 = mountedMap.get(a)) == null ? void 0 : _a2.t.add(atom);\n if (!isSync) {\n mountDependenciesIfAsync();\n }\n }\n };\n let controller;\n let setSelf;\n const options = {\n get signal() {\n if (!controller) {\n controller = new AbortController();\n }\n return controller.signal;\n },\n get setSelf() {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !isActuallyWritableAtom(atom)) {\n console.warn(\"setSelf function cannot be used with read-only atom\");\n }\n if (!setSelf && isActuallyWritableAtom(atom)) {\n setSelf = (...args) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && isSync) {\n console.warn(\"setSelf function cannot be called in sync\");\n }\n if (!isSync) {\n try {\n return writeAtomState(atom, ...args);\n } finally {\n recomputeInvalidatedAtoms();\n flushCallbacks();\n }\n }\n };\n }\n return setSelf;\n }\n };\n const prevEpochNumber = atomState.n;\n try {\n const valueOrPromise = atomRead(atom, getter, options);\n setAtomStateValueOrPromise(atom, valueOrPromise, ensureAtomState);\n if (isPromiseLike(valueOrPromise)) {\n registerAbortHandler(valueOrPromise, () => controller == null ? void 0 : controller.abort());\n valueOrPromise.then(\n mountDependenciesIfAsync,\n mountDependenciesIfAsync\n );\n }\n return atomState;\n } catch (error) {\n delete atomState.v;\n atomState.e = error;\n ++atomState.n;\n return atomState;\n } finally {\n isSync = false;\n if (prevEpochNumber !== atomState.n && invalidatedAtoms.get(atom) === prevEpochNumber) {\n invalidatedAtoms.set(atom, atomState.n);\n changedAtoms.add(atom);\n (_a = storeHooks.c) == null ? void 0 : _a.call(storeHooks, atom);\n }\n }\n });\n const invalidateDependents = buildingBlockFunctions[4] || ((atom) => {\n const stack = [atom];\n while (stack.length) {\n const a = stack.pop();\n const aState = ensureAtomState(a);\n for (const d of getMountedOrPendingDependents(a, aState, mountedMap)) {\n const dState = ensureAtomState(d);\n invalidatedAtoms.set(d, dState.n);\n stack.push(d);\n }\n }\n });\n const writeAtomState = buildingBlockFunctions[5] || ((atom, ...args) => {\n let isSync = true;\n const getter = (a) => returnAtomValue(readAtomState(a));\n const setter = (a, ...args2) => {\n var _a;\n const aState = ensureAtomState(a);\n try {\n if (isSelfAtom(atom, a)) {\n if (!hasInitialValue(a)) {\n throw new Error(\"atom not writable\");\n }\n const prevEpochNumber = aState.n;\n const v = args2[0];\n setAtomStateValueOrPromise(a, v, ensureAtomState);\n mountDependencies(a);\n if (prevEpochNumber !== aState.n) {\n changedAtoms.add(a);\n (_a = storeHooks.c) == null ? void 0 : _a.call(storeHooks, a);\n invalidateDependents(a);\n }\n return void 0;\n } else {\n return writeAtomState(a, ...args2);\n }\n } finally {\n if (!isSync) {\n recomputeInvalidatedAtoms();\n flushCallbacks();\n }\n }\n };\n try {\n return atomWrite(atom, getter, setter, ...args);\n } finally {\n isSync = false;\n }\n });\n const mountDependencies = buildingBlockFunctions[6] || ((atom) => {\n var _a;\n const atomState = ensureAtomState(atom);\n const mounted = mountedMap.get(atom);\n if (mounted && !isPendingPromise(atomState.v)) {\n for (const [a, n] of atomState.d) {\n if (!mounted.d.has(a)) {\n const aState = ensureAtomState(a);\n const aMounted = mountAtom(a);\n aMounted.t.add(atom);\n mounted.d.add(a);\n if (n !== aState.n) {\n changedAtoms.add(a);\n (_a = storeHooks.c) == null ? void 0 : _a.call(storeHooks, a);\n invalidateDependents(a);\n }\n }\n }\n for (const a of mounted.d || []) {\n if (!atomState.d.has(a)) {\n mounted.d.delete(a);\n const aMounted = unmountAtom(a);\n aMounted == null ? void 0 : aMounted.t.delete(atom);\n }\n }\n }\n });\n const mountAtom = buildingBlockFunctions[7] || ((atom) => {\n var _a;\n const atomState = ensureAtomState(atom);\n let mounted = mountedMap.get(atom);\n if (!mounted) {\n readAtomState(atom);\n for (const a of atomState.d.keys()) {\n const aMounted = mountAtom(a);\n aMounted.t.add(atom);\n }\n mounted = {\n l: /* @__PURE__ */ new Set(),\n d: new Set(atomState.d.keys()),\n t: /* @__PURE__ */ new Set()\n };\n mountedMap.set(atom, mounted);\n (_a = storeHooks.m) == null ? void 0 : _a.call(storeHooks, atom);\n if (isActuallyWritableAtom(atom)) {\n const processOnMount = () => {\n let isSync = true;\n const setAtom = (...args) => {\n try {\n return writeAtomState(atom, ...args);\n } finally {\n if (!isSync) {\n recomputeInvalidatedAtoms();\n flushCallbacks();\n }\n }\n };\n try {\n const onUnmount = atomOnMount(atom, setAtom);\n if (onUnmount) {\n mounted.u = () => {\n isSync = true;\n try {\n onUnmount();\n } finally {\n isSync = false;\n }\n };\n }\n } finally {\n isSync = false;\n }\n };\n mountCallbacks.add(processOnMount);\n }\n }\n return mounted;\n });\n const unmountAtom = buildingBlockFunctions[8] || ((atom) => {\n var _a;\n const atomState = ensureAtomState(atom);\n let mounted = mountedMap.get(atom);\n if (mounted && !mounted.l.size && !Array.from(mounted.t).some((a) => {\n var _a2;\n return (_a2 = mountedMap.get(a)) == null ? void 0 : _a2.d.has(atom);\n })) {\n if (mounted.u) {\n unmountCallbacks.add(mounted.u);\n }\n mounted = void 0;\n mountedMap.delete(atom);\n (_a = storeHooks.u) == null ? void 0 : _a.call(storeHooks, atom);\n for (const a of atomState.d.keys()) {\n const aMounted = unmountAtom(a);\n aMounted == null ? void 0 : aMounted.t.delete(atom);\n }\n return void 0;\n }\n return mounted;\n });\n const buildingBlocks = [\n // store state\n atomStateMap,\n mountedMap,\n invalidatedAtoms,\n changedAtoms,\n mountCallbacks,\n unmountCallbacks,\n storeHooks,\n // atom interceptors\n atomRead,\n atomWrite,\n atomOnInit,\n atomOnMount,\n // building-block functions\n ensureAtomState,\n flushCallbacks,\n recomputeInvalidatedAtoms,\n readAtomState,\n invalidateDependents,\n writeAtomState,\n mountDependencies,\n mountAtom,\n unmountAtom\n ];\n const store = {\n get: (atom) => returnAtomValue(readAtomState(atom)),\n set: (atom, ...args) => {\n try {\n return writeAtomState(atom, ...args);\n } finally {\n recomputeInvalidatedAtoms();\n flushCallbacks();\n }\n },\n sub: (atom, listener) => {\n const mounted = mountAtom(atom);\n const listeners = mounted.l;\n listeners.add(listener);\n flushCallbacks();\n return () => {\n listeners.delete(listener);\n unmountAtom(atom);\n flushCallbacks();\n };\n }\n };\n Object.defineProperty(store, BUILDING_BLOCKS, { value: buildingBlocks });\n return store;\n};\nconst INTERNAL_buildStoreRev1 = buildStore;\nconst INTERNAL_getBuildingBlocksRev1 = getBuildingBlocks;\nconst INTERNAL_initializeStoreHooks = initializeStoreHooks;\nconst INTERNAL_isSelfAtom = isSelfAtom;\nconst INTERNAL_hasInitialValue = hasInitialValue;\nconst INTERNAL_isActuallyWritableAtom = isActuallyWritableAtom;\nconst INTERNAL_isAtomStateInitialized = isAtomStateInitialized;\nconst INTERNAL_returnAtomValue = returnAtomValue;\nconst INTERNAL_promiseStateMap = promiseStateMap;\nconst INTERNAL_isPendingPromise = isPendingPromise;\nconst INTERNAL_abortPromise = abortPromise;\nconst INTERNAL_registerAbortHandler = registerAbortHandler;\nconst INTERNAL_isPromiseLike = isPromiseLike;\nconst INTERNAL_addPendingPromiseToDependency = addPendingPromiseToDependency;\nconst INTERNAL_setAtomStateValueOrPromise = setAtomStateValueOrPromise;\nconst INTERNAL_getMountedOrPendingDependents = getMountedOrPendingDependents;\n\nexport { INTERNAL_abortPromise, INTERNAL_addPendingPromiseToDependency, INTERNAL_buildStoreRev1, INTERNAL_getBuildingBlocksRev1, INTERNAL_getMountedOrPendingDependents, INTERNAL_hasInitialValue, INTERNAL_initializeStoreHooks, INTERNAL_isActuallyWritableAtom, INTERNAL_isAtomStateInitialized, INTERNAL_isPendingPromise, INTERNAL_isPromiseLike, INTERNAL_isSelfAtom, INTERNAL_promiseStateMap, INTERNAL_registerAbortHandler, INTERNAL_returnAtomValue, INTERNAL_setAtomStateValueOrPromise };\n","import { INTERNAL_buildStoreRev1, INTERNAL_initializeStoreHooks } from 'jotai/vanilla/internals';\n\nlet keyCount = 0;\nfunction atom(read, write) {\n const key = `atom${++keyCount}`;\n const config = {\n toString() {\n return (import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && this.debugLabel ? key + \":\" + this.debugLabel : key;\n }\n };\n if (typeof read === \"function\") {\n config.read = read;\n } else {\n config.init = read;\n config.read = defaultRead;\n config.write = defaultWrite;\n }\n if (write) {\n config.write = write;\n }\n return config;\n}\nfunction defaultRead(get) {\n return get(this);\n}\nfunction defaultWrite(get, set, arg) {\n return set(\n this,\n typeof arg === \"function\" ? arg(get(this)) : arg\n );\n}\n\nconst createDevStoreRev4 = () => {\n let inRestoreAtom = 0;\n const storeHooks = INTERNAL_initializeStoreHooks({});\n const atomStateMap = /* @__PURE__ */ new WeakMap();\n const mountedAtoms = /* @__PURE__ */ new WeakMap();\n const store = INTERNAL_buildStoreRev1(\n atomStateMap,\n mountedAtoms,\n void 0,\n void 0,\n void 0,\n void 0,\n storeHooks,\n void 0,\n (atom, get, set, ...args) => {\n if (inRestoreAtom) {\n return set(atom, ...args);\n }\n return atom.write(get, set, ...args);\n }\n );\n const debugMountedAtoms = /* @__PURE__ */ new Set();\n storeHooks.m.add(void 0, (atom) => {\n debugMountedAtoms.add(atom);\n const atomState = atomStateMap.get(atom);\n atomState.m = mountedAtoms.get(atom);\n });\n storeHooks.u.add(void 0, (atom) => {\n debugMountedAtoms.delete(atom);\n const atomState = atomStateMap.get(atom);\n delete atomState.m;\n });\n const devStore = {\n // store dev methods (these are tentative and subject to change without notice)\n dev4_get_internal_weak_map: () => {\n console.log(\"Deprecated: Use devstore from the devtools library\");\n return atomStateMap;\n },\n dev4_get_mounted_atoms: () => debugMountedAtoms,\n dev4_restore_atoms: (values) => {\n const restoreAtom = {\n read: () => null,\n write: (_get, set) => {\n ++inRestoreAtom;\n try {\n for (const [atom, value] of values) {\n if (\"init\" in atom) {\n set(atom, value);\n }\n }\n } finally {\n --inRestoreAtom;\n }\n }\n };\n store.set(restoreAtom);\n }\n };\n return Object.assign(store, devStore);\n};\nlet overiddenCreateStore;\nfunction INTERNAL_overrideCreateStore(fn) {\n overiddenCreateStore = fn(overiddenCreateStore);\n}\nfunction createStore() {\n if (overiddenCreateStore) {\n return overiddenCreateStore();\n }\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n return createDevStoreRev4();\n }\n return INTERNAL_buildStoreRev1();\n}\nlet defaultStore;\nfunction getDefaultStore() {\n if (!defaultStore) {\n defaultStore = createStore();\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n globalThis.__JOTAI_DEFAULT_STORE__ || (globalThis.__JOTAI_DEFAULT_STORE__ = defaultStore);\n if (globalThis.__JOTAI_DEFAULT_STORE__ !== defaultStore) {\n console.warn(\n \"Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044\"\n );\n }\n }\n }\n return defaultStore;\n}\n\nexport { INTERNAL_overrideCreateStore, atom, createStore, getDefaultStore };\n","'use client';\nimport React, { createContext, useContext, useRef, createElement, useReducer, useEffect, useDebugValue, useCallback } from 'react';\nimport { getDefaultStore, createStore } from 'jotai/vanilla';\nimport { INTERNAL_registerAbortHandler } from 'jotai/vanilla/internals';\n\nconst StoreContext = createContext(\n void 0\n);\nfunction useStore(options) {\n const store = useContext(StoreContext);\n return (options == null ? void 0 : options.store) || store || getDefaultStore();\n}\nfunction Provider({\n children,\n store\n}) {\n const storeRef = useRef(void 0);\n if (!store && !storeRef.current) {\n storeRef.current = createStore();\n }\n return createElement(\n StoreContext.Provider,\n {\n value: store || storeRef.current\n },\n children\n );\n}\n\nconst isPromiseLike = (x) => typeof (x == null ? void 0 : x.then) === \"function\";\nconst attachPromiseStatus = (promise) => {\n if (!promise.status) {\n promise.status = \"pending\";\n promise.then(\n (v) => {\n promise.status = \"fulfilled\";\n promise.value = v;\n },\n (e) => {\n promise.status = \"rejected\";\n promise.reason = e;\n }\n );\n }\n};\nconst use = React.use || // A shim for older React versions\n((promise) => {\n if (promise.status === \"pending\") {\n throw promise;\n } else if (promise.status === \"fulfilled\") {\n return promise.value;\n } else if (promise.status === \"rejected\") {\n throw promise.reason;\n } else {\n attachPromiseStatus(promise);\n throw promise;\n }\n});\nconst continuablePromiseMap = /* @__PURE__ */ new WeakMap();\nconst createContinuablePromise = (promise, getValue) => {\n let continuablePromise = continuablePromiseMap.get(promise);\n if (!continuablePromise) {\n continuablePromise = new Promise((resolve, reject) => {\n let curr = promise;\n const onFulfilled = (me) => (v) => {\n if (curr === me) {\n resolve(v);\n }\n };\n const onRejected = (me) => (e) => {\n if (curr === me) {\n reject(e);\n }\n };\n const onAbort = () => {\n try {\n const nextValue = getValue();\n if (isPromiseLike(nextValue)) {\n continuablePromiseMap.set(nextValue, continuablePromise);\n curr = nextValue;\n nextValue.then(onFulfilled(nextValue), onRejected(nextValue));\n INTERNAL_registerAbortHandler(nextValue, onAbort);\n } else {\n resolve(nextValue);\n }\n } catch (e) {\n reject(e);\n }\n };\n promise.then(onFulfilled(promise), onRejected(promise));\n INTERNAL_registerAbortHandler(promise, onAbort);\n });\n continuablePromiseMap.set(promise, continuablePromise);\n }\n return continuablePromise;\n};\nfunction useAtomValue(atom, options) {\n const { delay, unstable_promiseStatus: promiseStatus = !React.use } = options || {};\n const store = useStore(options);\n const [[valueFromReducer, storeFromReducer, atomFromReducer], rerender] = useReducer(\n (prev) => {\n const nextValue = store.get(atom);\n if (Object.is(prev[0], nextValue) && prev[1] === store && prev[2] === atom) {\n return prev;\n }\n return [nextValue, store, atom];\n },\n void 0,\n () => [store.get(atom), store, atom]\n );\n let value = valueFromReducer;\n if (storeFromReducer !== store || atomFromReducer !== atom) {\n rerender();\n value = store.get(atom);\n }\n useEffect(() => {\n const unsub = store.sub(atom, () => {\n if (promiseStatus) {\n try {\n const value2 = store.get(atom);\n if (isPromiseLike(value2)) {\n attachPromiseStatus(\n createContinuablePromise(value2, () => store.get(atom))\n );\n }\n } catch (e) {\n }\n }\n if (typeof delay === \"number\") {\n setTimeout(rerender, delay);\n return;\n }\n rerender();\n });\n rerender();\n return unsub;\n }, [store, atom, delay, promiseStatus]);\n useDebugValue(value);\n if (isPromiseLike(value)) {\n const promise = createContinuablePromise(value, () => store.get(atom));\n if (promiseStatus) {\n attachPromiseStatus(promise);\n }\n return use(promise);\n }\n return value;\n}\n\nfunction useSetAtom(atom, options) {\n const store = useStore(options);\n const setAtom = useCallback(\n (...args) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !(\"write\" in atom)) {\n throw new Error(\"not writable atom\");\n }\n return store.set(atom, ...args);\n },\n [store, atom]\n );\n return setAtom;\n}\n\nfunction useAtom(atom, options) {\n return [\n useAtomValue(atom, options),\n // We do wrong type assertion here, which results in throwing an error.\n useSetAtom(atom, options)\n ];\n}\n\nexport { Provider, useAtom, useAtomValue, useSetAtom, useStore };\n","import {\n InternalDevTools\n} from \"./chunk-HLGSGNDX.esm.mjs\";\nimport {\n useAtomDevtools,\n useAtomsDebugValue,\n useAtomsDevtools,\n useAtomsSnapshot,\n useGotoAtomsSnapshot\n} from \"./chunk-K3M223F4.esm.mjs\";\n\n// src/index.ts\nvar DevTools = process.env.NODE_ENV !== \"production\" ? InternalDevTools : () => null;\nexport {\n DevTools,\n useAtomDevtools,\n useAtomsDebugValue,\n useAtomsDevtools,\n useAtomsSnapshot,\n useGotoAtomsSnapshot\n};\n","import { createStore } from \"jotai\";\n/** The atom store for the app.\n *\n * All derived hooks should use this store.\n */\nexport const atomStore = createStore();\n//# sourceMappingURL=store.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Provider } from \"jotai\";\nimport { DevTools } from \"jotai-devtools\";\nimport \"jotai-devtools/styles.css\";\nimport { atomStore } from \"./store.js\";\n/** Provides the atom store to the app.\n *\n * This is the top-level provider for the atom store.\n *\n * It is used to provide the atom store to the app.\n *\n * It should only be used once in the app and must appear before any `<Suspense>` boundaries.\n *\n * Includes the Jotai DevTools for debugging.\n */\nexport function AtomStoreProvider({ children }) {\n return (_jsxs(Provider, { store: atomStore, children: [_jsx(DevTools, { store: atomStore }), children] }));\n}\n//# sourceMappingURL=store-provider.js.map","import { lazy, StrictMode, Suspense } from 'react';\nimport '../i18n';\n\nimport { AtomStoreProvider } from '@powerhousedao/common';\nimport { AppSkeleton } from './app-skeleton.js';\n\nconst App = lazy(() => import('./app.js'));\nconst CookieBanner = lazy(() =>\n import('./cookie-banner.js').then(m => ({ default: m.CookieBanner })),\n);\n\nconst ModalManager = lazy(() =>\n import('./modal/modal.js').then(m => ({ default: m.ModalManager })),\n);\n\nexport const AppLoader = (\n <StrictMode>\n <AtomStoreProvider>\n <Suspense fallback={<AppSkeleton />} name=\"AppLoader\">\n <App />\n </Suspense>\n <Suspense name=\"CookieBanner\">\n <ModalManager>\n <CookieBanner />\n </ModalManager>\n </Suspense>\n </AtomStoreProvider>\n </StrictMode>\n);\n","import { createRoot } from 'react-dom/client';\nimport { AppLoader } from './components/app-loader.js';\n\nfunction renderApp(element: HTMLElement) {\n createRoot(element).render(AppLoader);\n}\n\nconst AppElement = document.getElementById('app');\nif (!AppElement) {\n throw new Error('#app element not found!');\n}\n\nrenderApp(AppElement);\n"],"file":"assets/index.LL4eJTNs.js"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index.
|
|
2
|
-
import{_ as c}from"./index.CP03D3n8.js";import"react";import"react/jsx-runtime";import"react-dom";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))s(e);new MutationObserver(e=>{for(const r of e)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function n(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?r.credentials="include":e.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function s(e){if(e.ep)return;e.ep=!0;const r=n(e);fetch(e.href,r)}})();c(()=>import("./index.
|
|
3
|
-
//# sourceMappingURL=main.
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index.LL4eJTNs.js","./index.CP03D3n8.js","./app-skeleton.js","./browser.BkwNmV2Z.js","./index-B7k827uL.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as c}from"./index.CP03D3n8.js";import"react";import"react/jsx-runtime";import"react-dom";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))s(e);new MutationObserver(e=>{for(const r of e)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function n(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?r.credentials="include":e.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function s(e){if(e.ep)return;e.ep=!0;const r=n(e);fetch(e.href,r)}})();c(()=>import("./index.LL4eJTNs.js").then(i=>i.i),__vite__mapDeps([0,1,2,3,4]),import.meta.url);
|
|
3
|
+
//# sourceMappingURL=main.CWRd9TZM.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"mappings":";8yBA8BA,OAAO,qBAAY,OAAAA,KAAA","names":["n"],"ignoreList":[],"sources":["../../src/renderer.ts"],"sourcesContent":["/**\n * This file will automatically be loaded by vite and run in the \"renderer\" context.\n * To learn more about the differences between the \"main\" and the \"renderer\" context in\n * Electron, visit:\n *\n * https://electronjs.org/docs/tutorial/application-architecture#main-and-renderer-processes\n *\n * By default, Node.js integration in this file is disabled. When enabling Node.js integration\n * in a renderer process, please be aware of potential security implications. You can read\n * more about security risks here:\n *\n * https://electronjs.org/docs/tutorial/security\n *\n * To enable Node.js integration in this file, open up `main.js` and enable the `nodeIntegration`\n * flag:\n *\n * ```\n * // Create the browser window.\n * mainWindow = new BrowserWindow({\n * width: 800,\n * height: 600,\n * webPreferences: {\n * nodeIntegration: true\n * }\n * });\n * ```\n */\n\n// splits app code into separate chunk to avoid circular dependencies\n// eslint-disable-next-line @typescript-eslint/no-floating-promises\nimport('./index.js');\n"],"file":"assets/main.
|
|
1
|
+
{"version":3,"mappings":";8yBA8BA,OAAO,qBAAY,OAAAA,KAAA","names":["n"],"ignoreList":[],"sources":["../../src/renderer.ts"],"sourcesContent":["/**\n * This file will automatically be loaded by vite and run in the \"renderer\" context.\n * To learn more about the differences between the \"main\" and the \"renderer\" context in\n * Electron, visit:\n *\n * https://electronjs.org/docs/tutorial/application-architecture#main-and-renderer-processes\n *\n * By default, Node.js integration in this file is disabled. When enabling Node.js integration\n * in a renderer process, please be aware of potential security implications. You can read\n * more about security risks here:\n *\n * https://electronjs.org/docs/tutorial/security\n *\n * To enable Node.js integration in this file, open up `main.js` and enable the `nodeIntegration`\n * flag:\n *\n * ```\n * // Create the browser window.\n * mainWindow = new BrowserWindow({\n * width: 800,\n * height: 600,\n * webPreferences: {\n * nodeIntegration: true\n * }\n * });\n * ```\n */\n\n// splits app code into separate chunk to avoid circular dependencies\n// eslint-disable-next-line @typescript-eslint/no-floating-promises\nimport('./index.js');\n"],"file":"assets/main.CWRd9TZM.js"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DeleteItemModal.ratA2MX8.js","./useTranslation.BpVv6XIW.js","./index.CP03D3n8.js","./UpgradeDriveModal.DdJGURc3.js","./CreateDocumentModal.
|
|
2
|
-
import{jsxs as P,jsx as m}from"react/jsx-runtime";import h,{lazy as t,useContext as A,useState as a,useCallback as n,useMemo as R,Suspense as I}from"react";import{_ as o}from"./index.CP03D3n8.js";import"react-dom";const L={deleteItem:t(()=>o(()=>import("./DeleteItemModal.ratA2MX8.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(e=>({default:e.DeleteItemModal}))),upgradeDrive:t(()=>o(()=>import("./UpgradeDriveModal.DdJGURc3.js"),__vite__mapDeps([3,1,2]),import.meta.url).then(e=>({default:e.UpgradeDriveModal}))),createDocument:t(()=>o(()=>import("./CreateDocumentModal.
|
|
3
|
-
//# sourceMappingURL=modal.
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DeleteItemModal.ratA2MX8.js","./useTranslation.BpVv6XIW.js","./index.CP03D3n8.js","./UpgradeDriveModal.DdJGURc3.js","./CreateDocumentModal.AlJtbTUg.js","./useDocumentDriveServer.D3p_qwnp.js","./user.Dq07wtiY.js","./connect.config.BKrPqpZJ.js","./browser.BkwNmV2Z.js","./useFeatureFlags.DGb_90uZ.js","./index.LL4eJTNs.js","./app-skeleton.js","./index-B7k827uL.css","./slug.C6xW_7Wm.js","./AddDriveModal.Bbr2l8pg.js","./AddLocalDriveModal.B_i6LFTx.js","./AddRemoteDriveModal.CwLpey-x.js","./DriveSettingsModal.BQnXzAwX.js","./SettingsModal.LqJ3I2dY.js","./i18next.CqOP20KE.js","./useConnectConfig.CKApLiWr.js","./index.CAUjMUXb.js","./useDefaultDocumentModelEditor.BE9dVkYi.js","./ConfirmationModal.D8FB11vn.js","./DeleteDriveModal.CEX-jldf.js","./DebugSettingsModal.lE-1mdeL.js","./registerServiceWorker.bovghwDf.js","./DisclaimerModal.CFmBsHxX.js","./CookiesPolicyModal.W_jQTdDw.js","./Trans.C1fPcAun.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{jsxs as P,jsx as m}from"react/jsx-runtime";import h,{lazy as t,useContext as A,useState as a,useCallback as n,useMemo as R,Suspense as I}from"react";import{_ as o}from"./index.CP03D3n8.js";import"react-dom";const L={deleteItem:t(()=>o(()=>import("./DeleteItemModal.ratA2MX8.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(e=>({default:e.DeleteItemModal}))),upgradeDrive:t(()=>o(()=>import("./UpgradeDriveModal.DdJGURc3.js"),__vite__mapDeps([3,1,2]),import.meta.url).then(e=>({default:e.UpgradeDriveModal}))),createDocument:t(()=>o(()=>import("./CreateDocumentModal.AlJtbTUg.js"),__vite__mapDeps([4,2,5,6,7,8,9,10,11,12,13]),import.meta.url).then(e=>({default:e.CreateDocumentModal}))),addDriveModal:t(()=>o(()=>import("./AddDriveModal.Bbr2l8pg.js"),__vite__mapDeps([14,2,6,7,8]),import.meta.url).then(e=>({default:e.AddDriveModal}))),addLocalDrive:t(()=>o(()=>import("./AddLocalDriveModal.B_i6LFTx.js"),__vite__mapDeps([15,2]),import.meta.url).then(e=>({default:e.AddLocalDriveModal}))),addRemoteDrive:t(()=>o(()=>import("./AddRemoteDriveModal.CwLpey-x.js"),__vite__mapDeps([16,2]),import.meta.url).then(e=>({default:e.AddRemoteDriveModal}))),driveSettings:t(()=>o(()=>import("./DriveSettingsModal.BQnXzAwX.js"),__vite__mapDeps([17,2]),import.meta.url).then(e=>({default:e.DriveSettingsModal}))),settingsModal:t(()=>o(()=>import("./SettingsModal.LqJ3I2dY.js"),__vite__mapDeps([18,19,7,2,8,20,1,21,5,6,9,10,11,12,22]),import.meta.url).then(e=>({default:e.SettingsModal}))),confirmationModal:t(()=>o(()=>import("./ConfirmationModal.D8FB11vn.js"),__vite__mapDeps([23,2]),import.meta.url).then(e=>({default:e.ConfirmationModal}))),deleteDriveModal:t(()=>o(()=>import("./DeleteDriveModal.CEX-jldf.js"),__vite__mapDeps([24,1,2]),import.meta.url).then(e=>({default:e.DeleteDriveModal}))),debugSettingsModal:t(()=>o(()=>import("./DebugSettingsModal.lE-1mdeL.js"),__vite__mapDeps([25,20,7,2,8,26,5,6,9,10,11,12]),import.meta.url).then(e=>({default:e.DebugSettingsModal}))),disclaimerModal:t(()=>o(()=>import("./DisclaimerModal.CFmBsHxX.js"),__vite__mapDeps([27,1,2]),import.meta.url).then(e=>({default:e.DisclaimerModal}))),cookiesPolicy:t(()=>o(()=>import("./CookiesPolicyModal.W_jQTdDw.js"),__vite__mapDeps([28,1,29,2]),import.meta.url).then(e=>({default:e.CookiesPolicyModal})))},u=h.createContext({showModal:()=>{},closeModal:()=>{}}),C=()=>A(u),x=e=>{const{children:s}=e,[p,c]=a(),[l,M]=a(),[D,d]=a(!1),i=n((E,f)=>{d(!0),c(f),M(E)},[]),r=n(()=>{d(!1)},[]),_=l?L[l]:null,v=R(()=>({showModal:i,closeModal:r}),[r,i]);return P(u.Provider,{value:v,children:[s,m(I,{name:"ModalManager",children:_&&m(_,{...p,open:D,onClose:r})})]})};export{u as ModalContext,x as ModalManager,C as useModal};
|
|
3
|
+
//# sourceMappingURL=modal.7v7DsqvJ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"mappings":";sNAEO,MAAMA,EAAS,CAClB,WAAYC,EAAK,IACbC,EAAA,WAAO,+BAAsB,4CAAE,KAAWC,IAAA,CACtC,QAASA,EAAE,iBACb,CACN,EACA,aAAcF,EAAK,IACfC,EAAA,WAAO,iCAAwB,4CAAE,KAAWC,IAAA,CACxC,QAASA,EAAE,mBACb,CACN,EACA,eAAgBF,EAAK,IACjBC,EAAA,WAAO,mCAA0B,gEAAE,KAAWC,IAAA,CAC1C,QAASA,EAAE,qBACb,CACN,EACA,cAAeF,EAAK,IAChBC,EAAA,WAAO,6BAAoB,iDAAE,KAAWC,IAAA,CACpC,QAASA,EAAE,eACb,CACN,EACA,cAAeF,EAAK,IAChBC,EAAA,WAAO,kCAAyB,2CAAE,KAAWC,IAAA,CACzC,QAASA,EAAE,oBACb,CACN,EACA,eAAgBF,EAAK,IACjBC,EAAA,WAAO,mCAA0B,2CAAE,KAAWC,IAAA,CAC1C,QAASA,EA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,KAAO,CAAE,UAAAL,EAAW,WAAAE,IACpB,CAACA,EAAYF,CAAS,CAC1B,EAEA,OACKM,EAAApB,EAAa,SAAb,CAAsB,MAAAkB,EAClB,UAAAZ,EACAe,EAAAC,EAAA,CAAS,KAAK,eACV,SACGL,GAAAI,EAACJ,EAAA,CACI,GAAIV,EACL,KAAAK,EACA,QAASI,CAAA,EAGrB,IACJ,CAER","names":["modals","lazy","__vitePreload","m","ModalContext","React","useModal","useContext","ModalManager","props","children","modalProps","setModalProps","useState","modalType","setModalType","open","setOpen","showModal","useCallback","closeModal","ModalComponent","value","useMemo","jsxs","jsx","Suspense"],"ignoreList":[],"sources":["../../src/components/modal/modals/index.ts","../../src/components/modal/modal.tsx"],"sourcesContent":["import { lazy } from 'react';\n\nexport const modals = {\n deleteItem: lazy(() =>\n import('./DeleteItemModal.js').then(m => ({\n default: m.DeleteItemModal,\n })),\n ),\n upgradeDrive: lazy(() =>\n import('./UpgradeDriveModal.js').then(m => ({\n default: m.UpgradeDriveModal,\n })),\n ),\n createDocument: lazy(() =>\n import('./CreateDocumentModal.js').then(m => ({\n default: m.CreateDocumentModal,\n })),\n ),\n addDriveModal: lazy(() =>\n import('./AddDriveModal.js').then(m => ({\n default: m.AddDriveModal,\n })),\n ),\n addLocalDrive: lazy(() =>\n import('./AddLocalDriveModal.js').then(m => ({\n default: m.AddLocalDriveModal,\n })),\n ),\n addRemoteDrive: lazy(() =>\n import('./AddRemoteDriveModal.js').then(m => ({\n default: m.AddRemoteDriveModal,\n })),\n ),\n driveSettings: lazy(() =>\n import('./DriveSettingsModal.js').then(m => ({\n default: m.DriveSettingsModal,\n })),\n ),\n settingsModal: lazy(() =>\n import('./SettingsModal.js').then(m => ({\n default: m.SettingsModal,\n })),\n ),\n confirmationModal: lazy(() =>\n import('./ConfirmationModal.js').then(m => ({\n default: m.ConfirmationModal,\n })),\n ),\n deleteDriveModal: lazy(() =>\n import('./DeleteDriveModal.js').then(m => ({\n default: m.DeleteDriveModal,\n })),\n ),\n debugSettingsModal: lazy(() =>\n import('./DebugSettingsModal.js').then(m => ({\n default: m.DebugSettingsModal,\n })),\n ),\n disclaimerModal: lazy(() =>\n import('./DisclaimerModal.js').then(m => ({\n default: m.DisclaimerModal,\n })),\n ),\n cookiesPolicy: lazy(() =>\n import('./CookiesPolicyModal.js').then(m => ({\n default: m.CookiesPolicyModal,\n })),\n ),\n} as const;\n\nexport type Modals = typeof modals;\n\nexport type ModalType = keyof Modals;\n\nexport type ModalPropsMapping = {\n [K in ModalType]: React.ComponentProps<Modals[K]>;\n};\n","import React, {\n Suspense,\n useCallback,\n useContext,\n useMemo,\n useState,\n} from 'react';\nimport {\n type ModalPropsMapping,\n type ModalType,\n modals,\n} from './modals/index.js';\n\ntype MapModalProps<T> = {\n [K in keyof T]: Omit<T[K], 'open' | 'onClose'> & { onClose?: () => void };\n};\n\ntype ModalProps = MapModalProps<ModalPropsMapping>;\n\ninterface ModalContextValue {\n showModal: <T extends ModalType>(\n modalType: T,\n props: ModalProps[T],\n ) => void;\n closeModal: () => void;\n}\n\nexport const ModalContext = React.createContext<ModalContextValue>({\n showModal: () => {},\n closeModal: () => {},\n});\n\nexport const useModal = () => {\n const context = useContext(ModalContext);\n return context;\n};\n\nexport const ModalManager: React.FC<{ children?: React.ReactNode }> = props => {\n const { children } = props;\n\n const [modalProps, setModalProps] =\n useState<ModalProps[keyof ModalProps]>();\n const [modalType, setModalType] = useState<ModalType>();\n const [open, setOpen] = useState(false);\n\n const showModal: ModalContextValue['showModal'] = useCallback(\n (modalType, props) => {\n setOpen(true);\n setModalProps(props);\n setModalType(modalType);\n },\n [],\n );\n\n const closeModal: ModalContextValue['closeModal'] = useCallback(() => {\n setOpen(false);\n }, []);\n\n const ModalComponent = modalType ? modals[modalType] : null;\n\n const value = useMemo(\n () => ({ showModal, closeModal }),\n [closeModal, showModal],\n );\n\n return (\n <ModalContext.Provider value={value}>\n {children}\n <Suspense name=\"ModalManager\">\n {ModalComponent && (\n <ModalComponent\n {...(modalProps as any)}\n open={open}\n onClose={closeModal}\n />\n )}\n </Suspense>\n </ModalContext.Provider>\n );\n};\n"],"file":"assets/modal.
|
|
1
|
+
{"version":3,"mappings":";sNAEO,MAAMA,EAAS,CAClB,WAAYC,EAAK,IACbC,EAAA,WAAO,+BAAsB,4CAAE,KAAWC,IAAA,CACtC,QAASA,EAAE,iBACb,CACN,EACA,aAAcF,EAAK,IACfC,EAAA,WAAO,iCAAwB,4CAAE,KAAWC,IAAA,CACxC,QAASA,EAAE,mBACb,CACN,EACA,eAAgBF,EAAK,IACjBC,EAAA,WAAO,mCAA0B,gEAAE,KAAWC,IAAA,CAC1C,QAASA,EAAE,qBACb,CACN,EACA,cAAeF,EAAK,IAChBC,EAAA,WAAO,6BAAoB,iDAAE,KAAWC,IAAA,CACpC,QAASA,EAAE,eACb,CACN,EACA,cAAeF,EAAK,IAChBC,EAAA,WAAO,kCAAyB,2CAAE,KAAWC,IAAA,CACzC,QAASA,EAAE,oBACb,CACN,EACA,eAAgBF,EAAK,IACjBC,EAAA,WAAO,mCAA0B,2CAAE,KAAWC,IAAA,CAC1C,QAASA,EAAE,qBACb,CACN,EACA,cAAeF,EAAK,IAChBC,EAAA,WAAO,kCAAyB,2CAAE,KAAWC,IAAA,CACzC,QAASA,EAAE,oBACb,CACN,EACA,cAAeF,EAAK,IAChBC,EAAA,WAAO,6BAAoB,4EAAE,KAAWC,IAAA,CACpC,QAASA,EAAE,eACb,CACN,EACA,kBAAmBF,EAAK,IACpBC,EAAA,WAAO,iCAAwB,2CAAE,KAAWC,IAAA,CACxC,QAASA,EAAE,mBACb,CACN,EACA,iBAAkBF,EAAK,IACnBC,EAAA,WAAO,gCAAuB,6CAAE,KAAWC,IAAA,CACvC,QAASA,EAAE,kBACb,CACN,EACA,mBAAoBF,EAAK,IACrBC,EAAA,WAAO,kCAAyB,oEAAE,KAAWC,IAAA,CACzC,QAASA,EAAE,oBACb,CACN,EACA,gBAAiBF,EAAK,IAClBC,EAAA,WAAO,+BAAsB,6CAAE,KAAWC,IAAA,CACtC,QAASA,EAAE,iBACb,CACN,EACA,cAAeF,EAAK,IAChBC,EAAA,WAAO,kCAAyB,gDAAE,KAAWC,IAAA,CACzC,QAASA,EAAE,oBACb,EAEV,ECzCaC,EAAeC,EAAM,cAAiC,CAC/D,UAAW,IAAM,CAAC,EAClB,WAAY,IAAM,EACtB,CAAC,EAEYC,EAAW,IACJC,EAAWH,CAAY,EAI9BI,EAAkEC,GAAA,CACrE,MAAE,SAAAC,GAAaD,EAEf,CAACE,EAAYC,CAAa,EAC5BC,EAAuC,EACrC,CAACC,EAAWC,CAAY,EAAIF,EAAoB,EAChD,CAACG,EAAMC,CAAO,EAAIJ,EAAS,EAAK,EAEhCK,EAA4CC,EAC9C,CAACL,EAAWL,IAAU,CAClBQ,EAAQ,EAAI,EACZL,EAAcH,CAAK,EACnBM,EAAaD,CAAS,CAC1B,EACA,EACJ,EAEMM,EAA8CD,EAAY,IAAM,CAClEF,EAAQ,EAAK,CACjB,EAAG,EAAE,EAECI,EAAiBP,EAAYd,EAAOc,CAAS,EAAI,KAEjDQ,EAAQC,EACV,KAAO,CAAE,UAAAL,EAAW,WAAAE,IACpB,CAACA,EAAYF,CAAS,CAC1B,EAEA,OACKM,EAAApB,EAAa,SAAb,CAAsB,MAAAkB,EAClB,UAAAZ,EACAe,EAAAC,EAAA,CAAS,KAAK,eACV,SACGL,GAAAI,EAACJ,EAAA,CACI,GAAIV,EACL,KAAAK,EACA,QAASI,CAAA,EAGrB,IACJ,CAER","names":["modals","lazy","__vitePreload","m","ModalContext","React","useModal","useContext","ModalManager","props","children","modalProps","setModalProps","useState","modalType","setModalType","open","setOpen","showModal","useCallback","closeModal","ModalComponent","value","useMemo","jsxs","jsx","Suspense"],"ignoreList":[],"sources":["../../src/components/modal/modals/index.ts","../../src/components/modal/modal.tsx"],"sourcesContent":["import { lazy } from 'react';\n\nexport const modals = {\n deleteItem: lazy(() =>\n import('./DeleteItemModal.js').then(m => ({\n default: m.DeleteItemModal,\n })),\n ),\n upgradeDrive: lazy(() =>\n import('./UpgradeDriveModal.js').then(m => ({\n default: m.UpgradeDriveModal,\n })),\n ),\n createDocument: lazy(() =>\n import('./CreateDocumentModal.js').then(m => ({\n default: m.CreateDocumentModal,\n })),\n ),\n addDriveModal: lazy(() =>\n import('./AddDriveModal.js').then(m => ({\n default: m.AddDriveModal,\n })),\n ),\n addLocalDrive: lazy(() =>\n import('./AddLocalDriveModal.js').then(m => ({\n default: m.AddLocalDriveModal,\n })),\n ),\n addRemoteDrive: lazy(() =>\n import('./AddRemoteDriveModal.js').then(m => ({\n default: m.AddRemoteDriveModal,\n })),\n ),\n driveSettings: lazy(() =>\n import('./DriveSettingsModal.js').then(m => ({\n default: m.DriveSettingsModal,\n })),\n ),\n settingsModal: lazy(() =>\n import('./SettingsModal.js').then(m => ({\n default: m.SettingsModal,\n })),\n ),\n confirmationModal: lazy(() =>\n import('./ConfirmationModal.js').then(m => ({\n default: m.ConfirmationModal,\n })),\n ),\n deleteDriveModal: lazy(() =>\n import('./DeleteDriveModal.js').then(m => ({\n default: m.DeleteDriveModal,\n })),\n ),\n debugSettingsModal: lazy(() =>\n import('./DebugSettingsModal.js').then(m => ({\n default: m.DebugSettingsModal,\n })),\n ),\n disclaimerModal: lazy(() =>\n import('./DisclaimerModal.js').then(m => ({\n default: m.DisclaimerModal,\n })),\n ),\n cookiesPolicy: lazy(() =>\n import('./CookiesPolicyModal.js').then(m => ({\n default: m.CookiesPolicyModal,\n })),\n ),\n} as const;\n\nexport type Modals = typeof modals;\n\nexport type ModalType = keyof Modals;\n\nexport type ModalPropsMapping = {\n [K in ModalType]: React.ComponentProps<Modals[K]>;\n};\n","import React, {\n Suspense,\n useCallback,\n useContext,\n useMemo,\n useState,\n} from 'react';\nimport {\n type ModalPropsMapping,\n type ModalType,\n modals,\n} from './modals/index.js';\n\ntype MapModalProps<T> = {\n [K in keyof T]: Omit<T[K], 'open' | 'onClose'> & { onClose?: () => void };\n};\n\ntype ModalProps = MapModalProps<ModalPropsMapping>;\n\ninterface ModalContextValue {\n showModal: <T extends ModalType>(\n modalType: T,\n props: ModalProps[T],\n ) => void;\n closeModal: () => void;\n}\n\nexport const ModalContext = React.createContext<ModalContextValue>({\n showModal: () => {},\n closeModal: () => {},\n});\n\nexport const useModal = () => {\n const context = useContext(ModalContext);\n return context;\n};\n\nexport const ModalManager: React.FC<{ children?: React.ReactNode }> = props => {\n const { children } = props;\n\n const [modalProps, setModalProps] =\n useState<ModalProps[keyof ModalProps]>();\n const [modalType, setModalType] = useState<ModalType>();\n const [open, setOpen] = useState(false);\n\n const showModal: ModalContextValue['showModal'] = useCallback(\n (modalType, props) => {\n setOpen(true);\n setModalProps(props);\n setModalType(modalType);\n },\n [],\n );\n\n const closeModal: ModalContextValue['closeModal'] = useCallback(() => {\n setOpen(false);\n }, []);\n\n const ModalComponent = modalType ? modals[modalType] : null;\n\n const value = useMemo(\n () => ({ showModal, closeModal }),\n [closeModal, showModal],\n );\n\n return (\n <ModalContext.Provider value={value}>\n {children}\n <Suspense name=\"ModalManager\">\n {ModalComponent && (\n <ModalComponent\n {...(modalProps as any)}\n open={open}\n onClose={closeModal}\n />\n )}\n </Suspense>\n </ModalContext.Provider>\n );\n};\n"],"file":"assets/modal.7v7DsqvJ.js"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as v}from"./i18next.CqOP20KE.js";import{useCallback as S}from"react";import{u as b}from"./useDocumentDriveServer.
|
|
2
|
-
//# sourceMappingURL=modals.
|
|
1
|
+
import{t as v}from"./i18next.CqOP20KE.js";import{useCallback as S}from"react";import{u as b}from"./useDocumentDriveServer.D3p_qwnp.js";import{m as C}from"./slug.C6xW_7Wm.js";import{ad as T,a8 as A,ac as N,w,a9 as M,k as U,ae as I}from"./index.CP03D3n8.js";import{i as F}from"./user.Dq07wtiY.js";import{useModal as L}from"./modal.7v7DsqvJ.js";function E(){const{getSyncStatus:c}=b();return S(async s=>{const a="readContext"in s,{name:h,icon:d}=s.state.global,{id:t,slug:l}=s.header,{sharingType:u,availableOffline:o}=a?{sharingType:T,availableOffline:!1}:s.state.local,n=u==null?void 0:u.toUpperCase(),r=n==="PRIVATE"?A:n,p=a?void 0:await c(t,r),f=p==="INITIAL_SYNC"?"SYNCING":p,m={id:t,name:h,slug:l||null,kind:N,children:[],nodeMap:{},sharingType:r,syncStatus:f,availableOffline:o,icon:d,parentFolder:null,driveId:t},D=s.state.global.nodes.map(e=>{const i={...e,slug:C(e.name),driveId:t,parentFolder:e.parentFolder||t,kind:e.kind.toUpperCase(),syncStatus:f,sharingType:r};if(i.kind===N)throw new Error("Drive nodes should not be nested");return i.kind===w?i:{...i,children:[]}});for(const e of D)m.nodeMap[e.id]=e;for await(const e of D){if(e.kind===w){const g=a?void 0:await c(e.synchronizationUnits[0].syncId,r),k=g==="INITIAL_SYNC"?"SYNCING":g;e.syncStatus=k}if(e.parentFolder===t){m.children.push(e);continue}const i=m.nodeMap[e.parentFolder];if(i.kind===w)throw new Error(`Parent node ${e.parentFolder} is a file, not a folder`);i.children.push(e),e.syncStatus!==M&&(i.syncStatus=e.syncStatus)}return m},[c])}function G(){const{showModal:c}=L(),{addDrive:y,addRemoteDrive:s}=b(),{setSelectedNode:a}=U(),h=F(),d=E(),t=S(async o=>{try{const n=h.find(f=>f.id===o.appId),r=await y({id:"",slug:"",global:{name:o.name,icon:null},local:{availableOffline:o.availableOffline,sharingType:o.sharingType.toLowerCase(),listeners:[],triggers:[]}},n==null?void 0:n.driveEditor);I(v("notifications.addDriveSuccess"),{type:"connect-success"});const p=await d(r);a(p)}catch(n){console.error(n)}},[y,d,a,v]),l=S(async o=>{try{const n=await s(o.url,{sharingType:o.sharingType,availableOffline:o.availableOffline,listeners:[{block:!0,callInfo:{data:o.url,name:"switchboard-push",transmitterType:"SwitchboardPush"},filter:{branch:["main"],documentId:["*"],documentType:["*"],scope:["global"]},label:"Switchboard Sync",listenerId:"1",system:!0}],triggers:[]});I(v("notifications.addDriveSuccess"),{type:"connect-success"});const r=await d(n);a(r)}catch(n){console.error(n)}},[s,d,a,v]);return S(()=>c("addDriveModal",{onAddLocalDrive:t,onAddRemoteDrive:l}),[t,l,c])}export{E as a,G as u};
|
|
2
|
+
//# sourceMappingURL=modals.BjVYHxEq.js.map
|