@docx-editor.dev/core 2.1.3 → 2.2.1
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/README.md +4 -5
- package/dist/automation.cjs +1 -1
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.js +1 -1
- package/dist/{chunk-TBBXCC7D.js → chunk-2QPRJAHK.js} +3 -3
- package/dist/chunk-3JENXX7Q.cjs +2 -0
- package/dist/chunk-5WEA7SIG.cjs +12 -0
- package/dist/chunk-73X5I53C.cjs +2 -0
- package/dist/chunk-7D2CP2J7.js +2 -0
- package/dist/{chunk-O2WQY7IT.cjs → chunk-C3YJR64Q.cjs} +5 -5
- package/dist/chunk-EWRKYYUA.js +12 -0
- package/dist/{chunk-PC76F2HR.cjs → chunk-GLHPDILJ.cjs} +1 -1
- package/dist/{chunk-REZUWYB7.js → chunk-GRGRIDHF.js} +1 -1
- package/dist/{chunk-HBL3NNH5.cjs → chunk-MIUELYVA.cjs} +1 -1
- package/dist/chunk-PD4BVZW5.js +12 -0
- package/dist/chunk-PEIEVTWR.js +2 -0
- package/dist/chunk-QIFQTG57.cjs +10 -0
- package/dist/chunk-RFO2O56I.js +10 -0
- package/dist/chunk-SAUKKJWZ.cjs +12 -0
- package/dist/chunk-WKZR6YPE.js +1 -0
- package/dist/contracts/editor.cjs +1 -1
- package/dist/contracts/editor.d.cts +3 -3
- package/dist/contracts/editor.d.ts +3 -3
- package/dist/contracts/editor.js +1 -1
- package/dist/contracts/interaction.d.cts +4 -4
- package/dist/contracts/interaction.d.ts +4 -4
- package/dist/{editor-BGBZn9c9.d.cts → editor-25RmHnxu.d.cts} +64 -2
- package/dist/{editor-DQRRxKMG.d.ts → editor-C8oaTHr3.d.ts} +64 -2
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +86 -11
- package/dist/editor.d.cts +52 -12
- package/dist/editor.d.ts +52 -12
- package/dist/editor.js +1 -1
- package/dist/{index-BzqHsd4Y.d.ts → index-BWiuzoVN.d.ts} +33 -6
- package/dist/{index-DptRpcqa.d.cts → index-Beyo2mTa.d.cts} +33 -6
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.cts +97 -63
- package/dist/layout.d.ts +97 -63
- package/dist/layout.js +1 -1
- package/dist/output.cjs +1 -1
- package/dist/output.d.cts +4 -101
- package/dist/output.d.ts +4 -101
- package/dist/output.js +1 -1
- package/dist/{review-reads-CsoXSvUg.d.ts → review-reads-CMAqdMnE.d.ts} +1 -1
- package/dist/{review-reads-qW0jvdF1.d.cts → review-reads-D3r3tnoo.d.cts} +1 -1
- package/dist/{semantic-cell-selection-DwLB71fF.d.cts → semantic-cell-selection-CI3loBKq.d.cts} +2 -2
- package/dist/{semantic-cell-selection-D_8RbPII.d.ts → semantic-cell-selection-Cx8P64j2.d.ts} +2 -2
- package/dist/{semantic-interaction-DqcEonqD.d.cts → semantic-interaction-B4HrJFQ2.d.cts} +1 -1
- package/dist/{semantic-interaction-CXH2wFqi.d.ts → semantic-interaction-unGpRNCk.d.ts} +1 -1
- package/dist/semantic-paint-BBNaqr1s.d.ts +133 -0
- package/dist/semantic-paint-DdGGra4m.d.cts +133 -0
- package/dist/{semantic-records-zTC0_1zi.d.ts → semantic-records-BC4bIKKL.d.ts} +28 -32
- package/dist/{semantic-records-COVFW5aS.d.cts → semantic-records-DC6V1U3T.d.cts} +28 -32
- package/dist/{shaped-measurer-CZXL-a6v.d.ts → shaped-measurer-ChSWkuAT.d.ts} +1 -1
- package/dist/{shaped-measurer-AFnFxoot.d.cts → shaped-measurer-SIqZp-Ty.d.cts} +1 -1
- package/dist/store.cjs +1 -1
- package/dist/store.d.cts +36 -15
- package/dist/store.d.ts +36 -15
- package/dist/store.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-2DTQDAN7.js +0 -2
- package/dist/chunk-3HEU7MHP.js +0 -12
- package/dist/chunk-3JKQE4QJ.cjs +0 -2
- package/dist/chunk-6WIIHJFY.js +0 -1
- package/dist/chunk-BZK64YU3.cjs +0 -10
- package/dist/chunk-EDLUMMQN.cjs +0 -12
- package/dist/chunk-JQFDLZXQ.cjs +0 -2
- package/dist/chunk-QRAUDDVY.js +0 -2
- package/dist/chunk-STCITBJK.js +0 -12
- package/dist/chunk-TSXT537P.cjs +0 -12
- package/dist/chunk-Y7TA7TPF.js +0 -10
- package/dist/semantic-paint-drawings-B5Wk2so5.d.ts +0 -21
- package/dist/semantic-paint-drawings-x8g44lD_.d.cts +0 -21
package/dist/chunk-2DTQDAN7.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {t,u,G,w as w$1,B as B$1,A,z,vc,Ac,Ea,Ca,Ha,Aa,o,ca,me,ke,Fa,Ja,ie,Ga,yb,_e as _e$1,Ue as Ue$1,Qe,Me as Me$1,Eb,Ra,ba,Hc,la,q as q$1,ua,wa,Yb,jc,Jb,Lb,va,ka,pa,oa}from'./chunk-Y7TA7TPF.js';import {strFromU8,strToU8}from'fflate';var wt=["extension","capability","command","query","schema","dependencyKey","runtimePort","result","origin"],_t=/^[a-z0-9]+(?:-[a-z0-9]+)*(?:\.[a-z0-9]+(?:-[a-z0-9]+)*)+$/,$t=/^@[a-z0-9.-]+\/[a-z0-9.-]+(?:#[a-z0-9]+(?:[/._-][a-z0-9]+)*)?$/;function et(e){return _t.test(e)||$t.test(e)}function W(e,t){if(!et(e))throw new Error(`invalid ${t??"registry"} id ${JSON.stringify(e)}: must be reverse-domain (dev.docx-editor.core.x) or package-owned (@scope/pkg#kind/name)`)}var At=/^(\d+)\.(\d+)\.(\d+)$/;function k(e){let t=At.exec(e);if(!t)throw new Error(`invalid semantic version: ${JSON.stringify(e)}`);return {major:Number(t[1]),minor:Number(t[2]),patch:Number(t[3])}}function Y(e,t){return e.major!==t.major?e.major<t.major?-1:1:e.minor!==t.minor?e.minor<t.minor?-1:1:e.patch!==t.patch?e.patch<t.patch?-1:1:0}function J(e,t){let r=k(e),n=t.trim();if(n==="*")return true;if(n.startsWith("^")){let o=k(n.slice(1));return Y(r,o)<0?false:o.major>0?r.major===o.major:o.minor>0?r.major===0&&r.minor===o.minor:r.major===0&&r.minor===0}if(n.includes(" ")){let o=n.split(/\s+/);if(o.length!==2)throw new Error(`unsupported version range: ${JSON.stringify(t)}`);let s=true;for(let a of o){let i=a.startsWith(">=")?">=":a.startsWith("<")?"<":null;if(!i)throw new Error(`unsupported version range: ${JSON.stringify(t)}`);let d=k(a.slice(i.length)),l=Y(r,d);i===">="?s=s&&l>=0:s=s&&l<0;}return s}return Y(r,k(n))===0}var h=class extends Error{constructor(r,n,o=[]){super(n);this.code=r;this.responsible=o;this.name="RegistryError";}code;responsible},Se=(e,t)=>`${e}:${t}`;function Dt(e,t={}){let r=new Map;for(let l of e){if(W(l.id,"extension"),tt(l.version,l.id),r.has(l.id))throw new h("duplicate-extension",`duplicate extension id ${l.id}`,[l.id]);r.set(l.id,l);for(let c of l.contributions)W(c.id,c.kind),tt(c.version,`${l.id} \u2192 ${c.id}`),c.replaces&&Mt(c.replaces.targetRange,`${l.id} \u2192 replaces ${c.replaces.targetId}`);}for(let l of e){for(let c of l.dependencies??[])if(!r.has(c))throw new h("missing-dependency",`${l.id} requires missing extension ${c}`,[l.id,c]);for(let c of l.conflicts??[])if(r.has(c)){let p=[l.id,c].sort();throw new h("conflict",`extensions ${p[0]} and ${p[1]} conflict`,p)}}Ft(r);let n=new Set(t.availablePorts??[]);for(let l of e)for(let c of l.contributions)c.kind==="runtimePort"&&n.add(c.id);for(let l of e)for(let c of l.requiredPorts??[])if(!n.has(c))throw new h("missing-port",`${l.id} requires unavailable port ${c}`,[l.id,c]);let o=new Map,s=new Map,a=new Map;for(let l of e)for(let c of l.contributions){let p=Se(c.kind,c.id);if(c.replaces){let u=Se(c.kind,c.replaces.targetId),m=a.get(u)??[];m.push({ext:l.id,c}),a.set(u,m);continue}if(s.has(p)){let u=[o.get(p),l.id].sort();throw new h("id-collision",`${c.kind} id ${c.id} registered by both ${u[0]} and ${u[1]}`,u)}s.set(p,c),o.set(p,l.id);}let i=new Map(s);for(let[l,c]of a){let p=s.get(l);if(!p){let f=c[0];throw new h("replacement-target-missing",`${f.ext} replaces missing target ${f.c.replaces.targetId}`,[f.ext,f.c.replaces.targetId])}let u=p.replaceable??{kind:"none"};for(let{ext:f,c:y}of c){if(!J(p.version,y.replaces.targetRange))throw new h("replacement-version-mismatch",`${f} replaces ${y.replaces.targetId}@${p.version} outside range ${y.replaces.targetRange}`,[f,y.replaces.targetId]);if(u.kind==="none")throw new h("unauthorized-replacement",`${y.replaces.targetId} does not authorize replacement (attempted by ${f})`,[f,y.replaces.targetId])}let m=Lt(p,c);i.set(l,m);}return {extensions:r,contributions:i,get:(l,c)=>i.get(Se(l,c))}}function Lt(e,t){let r=e.replaceable??{kind:"none"};if(t.length===1)return t[0].c;if(r.kind==="priority"){let o=[...t].sort((i,d)=>(d.c.replaces.priority??0)-(i.c.replaces.priority??0)),s=o[0].c.replaces.priority??0,a=o.filter(i=>(i.c.replaces.priority??0)===s);if(a.length>1){let i=a.map(d=>d.ext).sort();throw new h("ambiguous-replacement",`multiple replacers of ${e.id} share top priority ${s}: ${i.join(", ")}`,i)}return o[0].c}let n=t.map(o=>o.ext).sort();throw new h("ambiguous-replacement",`multiple replacers of ${e.id}: ${n.join(", ")}`,n)}function Ft(e){let o=new Map,s=[],a=i=>{o.set(i,1),s.push(i);let d=[...e.get(i)?.dependencies??[]].sort();for(let l of d){let c=o.get(l)??0;if(c===1){let p=s.indexOf(l),u=[...s.slice(p),l];throw new h("dependency-cycle",`dependency cycle: ${u.join(" -> ")}`,u)}c===0&&a(l);}s.pop(),o.set(i,2);};for(let i of [...e.keys()].sort())(o.get(i)??0)===0&&a(i);}function tt(e,t){try{k(e);}catch{throw new h("invalid-version",`invalid version ${JSON.stringify(e)} in ${t}`,[t])}}function Mt(e,t){try{J("0.0.0",e);}catch{throw new h("invalid-version",`invalid version range ${JSON.stringify(e)} in ${t}`,[t])}}var v=class extends Error{constructor(t){super(t),this.name="BudgetError";}},F=class e{constructor(t,r){this.label=t;this.capacity=r;this.used=new G(`${t}.budget`,r);}label;capacity;used;children=new Set;activeReservations=0;cleanups=[];disposed=false;carveAmount=0;parent;get inUse(){return this.used.current}get available(){return this.used.remaining}get isDisposed(){return this.disposed}reserve(t){this.assertLive(),this.used.add(t),this.activeReservations+=1;let r=false,n=this;return {amount:t,get released(){return r},release(){r||(r=true,n.used.release(t),n.activeReservations-=1);}}}child(t,r){this.assertLive(),this.used.add(r);let n=new e(t,r);return n.parent=this,n.carveAmount=r,this.children.add(n),n}onRelease(t){this.assertLive(),this.cleanups.push(t);}dispose(){if(this.disposed)return;if(this.children.size>0)throw new v(`${this.label}: cannot release with ${this.children.size} child budget(s) outstanding`);if(this.activeReservations>0)throw new v(`${this.label}: cannot release with ${this.activeReservations} reservation(s) outstanding`);let t=[];for(let r=this.cleanups.length-1;r>=0;r--)try{this.cleanups[r]();}catch(n){t.push(n);}if(this.disposed=true,this.parent&&(this.parent.children.delete(this),this.parent.used.release(this.carveAmount),this.parent=void 0),t.length>0)throw new v(`${this.label}: ${t.length} cleanup error(s); first: ${String(t[0])}`)}assertLive(){if(this.disposed)throw new v(`${this.label}: budget already released`)}};var q=class extends Error{constructor(r,n){super(n?`cancelled: ${n}`:"cancelled");this.derivedOnly=r;this.name="CancellationError";}derivedOnly},M=class{_cancelled=false;_phase="pre-publication";_reason;cancel(t){this._cancelled=true,t!==void 0&&(this._reason=t);}markPublished(){this._phase="post-publication";}get isCancelled(){return this._cancelled}get phase(){return this._phase}get isPublished(){return this._phase==="post-publication"}get derivedOnly(){return this._cancelled&&this._phase==="post-publication"}get token(){let t=this;return {get isCancelled(){return t._cancelled},get phase(){return t._phase},get derivedOnly(){return t.derivedOnly},checkpoint(){if(t._cancelled)throw new q(t.derivedOnly,t._reason)}}}};var Q=class extends Error{constructor(r){super(`runtime port not available: ${r}`);this.portId=r;this.name="PortResolutionError";}portId},Te=class{ports=new Map;provide(t,r){return this.ports.set(t,r),this}has(t){return this.ports.has(t)}resolve(t){if(!this.ports.has(t))throw new Q(t);return this.ports.get(t)}missing(t){return t.filter(r=>!this.ports.has(r))}availablePorts(){return [...this.ports.keys()]}clock(){return this.resolve(w$1.clock)}identity(){return this.resolve(w$1.identity)}},we=class{constructor(t=0,r=1){this.step=r;this.t=t;}step;t;now(){let t=this.t;return this.t+=this.step,t}},_e=class{constructor(t="id"){this.prefix=t;}prefix;n=0;newId(){return this.n+=1,`${this.prefix}-${this.n}`}};function Bt(e){let t=B$1(e.limits),r=Object.freeze({...e.config??{}}),n=e.capacity??t.maxDecompressedBytes,o=e.id??"op",s={id:o,limits:t,config:r,ports:e.ports,budget:new F(`op:${o}`,n),cancellation:new M};return Object.freeze(s)}function Ht(e){e.budget.dispose();}var Ae=Object.freeze({maxRecursionDepth:{unit:"depth",phase:"xml-parse"},maxElementCount:{unit:"count",phase:"xml-parse"},maxPartCount:{unit:"count",phase:"package-read"},maxDecompressedBytes:{unit:"bytes",phase:"package-read"},maxCompressedBytes:{unit:"bytes",phase:"package-read"},maxCompressionRatio:{unit:"ratio",phase:"package-read"},maxChunkBytes:{unit:"bytes",phase:"package-read"},maxPaginationPasses:{unit:"passes",phase:"layout"},maxQueueDepth:{unit:"count",phase:"output"}}),rt=Object.keys(Ae);function Ut(e,t){return new G(`${Ae[t].phase}:${t}`,e[t])}var $e=class{counter;current=0;peak=0;constructor(t){this.counter=new G("memory",t);}allocate(t){this.counter.add(t),this.current+=t,this.current>this.peak&&(this.peak=this.current);}free(t){this.counter.release(t),this.current=Math.max(0,this.current-t);}get currentBytes(){return this.current}get peakBytes(){return this.peak}reset(){this.counter.release(this.current),this.current=0;}};function Vt(){for(let e of rt){let t=A[e],r=z[e];if(!Number.isFinite(t)||t<=0)throw new Error(`default ${e} must be finite > 0`);if(!Number.isFinite(r)||r<=0)throw new Error(`ceiling ${e} must be finite > 0`);if(t>r)throw new Error(`default ${e} exceeds ceiling`)}}function B(e,t=new Set){let r=new WeakSet,n=o=>{if(o===null)return "null";let s=typeof o;if(s==="boolean")return o?"true":"false";if(s==="number"){let a=o;if(!Number.isFinite(a))throw new Error(`non-finite number is not comparable: ${a}`);return Object.is(a,-0)?"0":String(a)}if(s==="string")return JSON.stringify(o);if(s==="bigint")return `${o.toString()}n`;if(Array.isArray(o))return `[${o.map(n).join(",")}]`;if(s==="object"){let a=o;if(r.has(a))throw new Error("cannot canonicalize a cyclic structure");r.add(a);let d=Object.keys(a).filter(l=>!t.has(l)).sort().map(l=>`${JSON.stringify(l)}:${n(a[l])}`).join(",");return r.delete(a),`{${d}}`}throw new Error(`unsupported value type in comparator input: ${s}`)};return n(e)}function De(e,t){let r=B(e,t),n=0xcbf29ce484222325n,o=0x100000001b3n,s=0xffffffffffffffffn;for(let a=0;a<r.length;a++)n^=BigInt(r.charCodeAt(a)),n=n*o&s;return n.toString(16).padStart(16,"0")}var R="dev.docx-editor.core.comparator",Le={authoredState:{id:`${R}.authored-state`,mode:"canonical-exact",ephemera:["revision","provenance","producedAt","commitId"],note:"canonical normalized authored records; ephemera excluded"},anchor:{id:`${R}.anchor`,mode:"exact",ephemera:[],note:"internal anchor identity/affinity compares exactly"},yjsStateVector:{id:`${R}.yjs-state-vector`,mode:"sync-optimization-only",ephemera:[],note:"exchange optimization only; never proves update or delete-set coverage"},shapedRun:{id:`${R}.shaped-run`,mode:"exact",ephemera:[],note:"glyph ids, clusters, and fixed-point advances compare exactly"},paginationFingerprint:{id:`${R}.pagination-fingerprint`,mode:"exact",ephemera:[],note:"page/column boundaries, break causes, fixed-point geometry compare exactly"},semanticTree:{id:`${R}.semantic-tree`,mode:"exact",ephemera:[],note:"reading order, roles, headings, alt text compare exactly"},hitTest:{id:`${R}.hit-test`,mode:"exact",ephemera:[],note:"resolved hit target and cluster affinity compare exactly"},pdfSemantics:{id:`${R}.pdf-semantics`,mode:"canonical-exact",ephemera:["objectNumber","producer","creationDate","modDate","subsetTag"],note:"canonical semantic PDF objects; container ephemera excluded"},rasterCheckpoint:{id:`${R}.raster-checkpoint`,mode:"tolerance",ephemera:[],note:"documented unavoidable raster comparison; explicit tolerance only"},benchmarkEvidence:{id:`${R}.benchmark-evidence`,mode:"sync-optimization-only",ephemera:[],note:"diagnostic evidence, not an equivalence basis"}};function Fe(e,t,r,n={}){let o=Le[e];switch(o.mode){case "sync-optimization-only":throw new Error(`${o.id} is not an equivalence basis (${o.note})`);case "tolerance":{if(n.epsilon===void 0)throw new Error(`${o.id} requires an explicit epsilon`);return {equal:nt(t,r,n.epsilon)}}case "exact":case "canonical-exact":{let s=o.mode==="canonical-exact"?new Set(o.ephemera):new Set,a=B(t,s),i=B(r,s);return a===i?{equal:true}:{equal:false,left:a,right:i}}}}function Me(e,t){let r=Le[e];if(r.mode==="tolerance"||r.mode==="sync-optimization-only")throw new Error(`${r.id} has no canonical fingerprint (${r.mode})`);let n=r.mode==="canonical-exact"?new Set(r.ephemera):void 0;return De(t,n)}function nt(e,t,r){return typeof e=="number"&&typeof t=="number"?Number.isFinite(e)&&Number.isFinite(t)&&Math.abs(e-t)<=r:Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((n,o)=>nt(n,t[o],r)):false}var it=new Set([...t,...u]),ot=/^[0-9a-f]{16}$/,Xt=/^[0-9a-f]*$/;function Be(e){let t=[],r=o=>t.push(o);e.formatVersion!==1&&r(`unsupported formatVersion ${e.formatVersion}`),e.documentId||r("documentId is required"),e.source.kind==="docx"&&!/^[0-9a-f]{64}$/.test(e.source.sha256)&&r("docx source requires a 64-hex sha256");let n=-1;e.steps.forEach((o,s)=>{let a=`step[${s}]`;it.has(o.origin)||r(`${a}: unknown origin ${o.origin}`),(!Number.isInteger(o.baseRevision)||o.baseRevision<0)&&r(`${a}: baseRevision must be a non-negative integer`),o.baseRevision<n&&r(`${a}: baseRevision regressed below ${n}`);let i=o.expect;i.outcome==="applied"?(i.committedRevision===void 0?r(`${a}: applied step needs committedRevision`):i.committedRevision<=o.baseRevision?r(`${a}: committedRevision ${i.committedRevision} must exceed baseRevision ${o.baseRevision}`):n=i.committedRevision,i.modelChange&&jt(i.modelChange,a,r)):(i.committedRevision!==void 0&&r(`${a}: ${i.outcome} step must not commit a revision`),i.authoredStateHash!==void 0&&r(`${a}: ${i.outcome} step must not change authored state`)),i.authoredStateHash!==void 0&&!ot.test(i.authoredStateHash)&&r(`${a}: authoredStateHash must be 16-hex`),i.outputHash!==void 0&&!ot.test(i.outputHash)&&r(`${a}: outputHash must be 16-hex`);});for(let o of [...e.snapshots??[],...e.updates??[]])o.documentId!==e.documentId&&r(`envelope documentId ${o.documentId} != ${e.documentId}`),Xt.test(o.bytesHex)||r("envelope bytesHex must be hex"),o.bytesHex.length!==o.byteLength*2&&r(`envelope byteLength ${o.byteLength} disagrees with ${o.bytesHex.length/2} decoded bytes`);return {valid:t.length===0,errors:t}}function jt(e,t,r){it.has(e.origin)||r(`${t}: modelChange origin ${e.origin} unknown`),e.toRevision<=e.fromRevision&&r(`${t}: modelChange revision must advance`);}function Kt(e,t){let r=Be(e);if(!r.valid)return {ok:false,mismatches:r.errors};let n=[];return t.init(e),e.steps.forEach((o,s)=>{let a=`step[${s}]`,i=t.applyStep(o),d=o.expect;if(i.outcome!==d.outcome){n.push(`${a}: outcome ${i.outcome} != expected ${d.outcome}`);return}if(d.outcome==="applied"&&(i.committedRevision!==d.committedRevision&&n.push(`${a}: revision ${i.committedRevision} != expected ${d.committedRevision}`),d.authoredStateHash!==void 0))if(i.authoredState===void 0)n.push(`${a}: store returned no authored state to hash`);else {Fe("authoredState",i.authoredState,i.authoredState).equal||n.push(`${a}: authored state is not self-consistent`);let c=at(i.authoredState);c!==d.authoredStateHash&&n.push(`${a}: authoredStateHash ${c} != expected ${d.authoredStateHash}`);}}),{ok:n.length===0,mismatches:n}}function at(e){return Me("authoredState",e)}var Gt=new Map([["embedRegular","regular"],["embedBold","bold"],["embedItalic","italic"],["embedBoldItalic","boldItalic"]]),zt=32;function ct(e,t){let r=t.replace(/[^0-9a-fA-F]/g,"");if(r.length!==32)return null;let n=new Uint8Array(16);for(let a=0;a<16;a+=1){let i=Number.parseInt(r.slice(a*2,a*2+2),16);if(Number.isNaN(i))return null;n[15-a]=i;}let o=new Uint8Array(e),s=Math.min(zt,o.length);for(let a=0;a<s;a+=1)o[a]=o[a]^n[a%16];return o}var He=(e,t)=>{if(!(e.kind==="textValue"||!("attributes"in e))){for(let r of e.attributes??[])if(r.localName===t)return r.value}},st=e=>e.kind==="textValue"?[]:e.children??[],lt=e=>e.kind==="textValue"||!("localName"in e)?"":e.localName;function Wt(e,t,r){for(let n of e.relationships.get(t)??[]){if(n.id!==r)continue;if(n.targetMode==="External")return null;let o=q$1(t,n.rawTarget);return o.ok?o.partName:null}return null}function Yt(e,t,r={}){if(!t)return [];let n=r.maxFontBytes??16*1024*1024,o=r.maxFonts??64,s=[],a=new Map,i=d=>{if(!(s.length>=o)){if(lt(d)==="font"){let l=He(d,"name");if(l&&l.length<=128)for(let c of st(d)){if(s.length>=o)return;let p=Gt.get(lt(c));if(!p)continue;let u=He(c,"id"),m=He(c,"fontKey");if(!u||!m)continue;let f=Wt(e,t.name,u);if(!f)continue;let y=e.partBytes.get(f);if(!y||y.length===0||y.length>n)continue;let g=a.get(f);if(g){s.push({family:l,style:p,bytes:g,partName:f});continue}let O=ct(y,m);O&&(a.set(f,O),s.push({family:l,style:p,bytes:O,partName:f}));}}for(let l of st(d))i(l);}};return i(t.root),s}function dt(e){if(e.kind!=="textValue")for(let t of e.children){if(t.kind==="textValue")continue;if(t.kind==="hyperlink"){let n=Ra(t);if(n!==void 0&&n.length>0)return n}let r=dt(t);if(r!==void 0)return r}}function Jt(e){let t="",r=false,n=o=>{if(!(r||o.kind==="textValue")){if(o.kind==="tab"||o.localName==="ptab"||o.localName==="tab"){r=true;return}if(o.kind==="text"||o.localName==="t"){for(let s of o.children)s.kind==="textValue"&&(t+=s.value);return}for(let s of o.children)n(s);}};return n(e),Ac(t)}function qt(e,t,r,n){let o=r.filter(d=>{if(n.has(d.blockId))return false;let l=d.level+1;return l>=t.instruction.outlineStart&&l<=t.instruction.outlineEnd}),s=new Set(o.map(d=>d.blockId)),a=vc(e),i=new Map;for(let d of o){let l=Ac(d.text),c=i.get(l);c?c.push(d.blockId):i.set(l,[d.blockId]);}return t.resultParagraphIds.map(d=>{let l=Ea(e,d);if(!l||l.kind==="textValue")return null;let c=dt(l),p=c===void 0?void 0:a.get(c);if(p&&s.has(p.paragraphId)){let f=i.get(Ac(o.find(g=>g.blockId===p.paragraphId)?.text??"")),y=f?.indexOf(p.paragraphId)??-1;return f&&y>=0&&f.splice(y,1),p.paragraphId}let u=Jt(l);if(u.length===0)return null;let m=i.get(u);return !m||m.length===0?null:m.shift()??null})}function C(e){return e.namespaceUri===la?e.localName:`{${e.namespaceUri}}${e.localName}`}function I(e){let t=[];for(let r of e.attributes)t.push(r.namespaceUri===""||r.namespaceUri===la?`${r.localName}=${r.value}`:`{${r.namespaceUri}}${r.localName}=${r.value}`);return t.sort(),t}function ut(e,t){let r=I(e),n=r.length>0?`${C(e)}(${r.join(",")})`:C(e);if(t>=ba)return n;let o=[];for(let s of e.children){if(s.kind==="textValue"){s.value!==""&&o.push(`#${s.value}`);continue}o.push(ut(s,t+1));}return o.sort(),o.length>0?`${n}[${o.join(",")}]`:n}function pt(e){if(!e)return [];let t=[];for(let r of e.children)r.namespaceUri===la&&t.push(ut(r,1));return t.sort(),t}function Ue(e){if(e.kind==="textValue")return e.value;if(e.kind==="tab")return " ";if(e.kind==="hardBreak")return Yb(e);if(e.kind==="drawing")return jc();if(e.kind==="runProperties"||e.kind==="paragraphProperties"||e.kind==="generic")return "";if(e.kind==="hyperlink"||Jb(e)){let r="",n=e.kind==="hyperlink"?e.children:Lb(e)??[];for(let o of n)r+=Ue(o);return r}let t="";for(let r of e.children)t+=Ue(r);return t}function x(e,t){let r=new Map(e);for(let n of t.namespaceBindings)r.set(n.prefix,n.namespaceUri);return r}function H(e,t){try{return va(e,t)}catch(r){if(r instanceof pa&&r.reason==="undeclared-prefix")return `generic-refusal:undeclared-prefix:{${e.namespaceUri}}${e.localName}`;throw r}}function Ve(e,t,r=ua){if(e.kind==="textValue")return;if(e.kind==="runProperties"||e.kind==="paragraphProperties"){let o=x(r,e),s=[];for(let a of e.children)a.namespaceUri!==la&&s.push(H(a,o));s.sort(),t.push(...s);return}if(e.kind==="generic"){t.push(H(e,r));return}if(Jb(e)){t.push(wa(e));return}if(e.kind==="bookmarkStart"||e.kind==="bookmarkEnd"){t.push(va(e,r));return}if(e.kind==="drawing"){t.push(mt(e));return}if(ka(e.kind))return;let n=x(r,e);for(let o of e.children)Ve(o,t,n);}function Qt(e){return `hyperlink(${e.attributes.map(r=>`${r.namespaceUri}|${r.localName}=${r.value}`).sort().join(",")})`}function Zt(e){for(let t of e.children)if(t.kind==="pictureBlipFill")for(let r of t.children){if(r.kind!=="pictureBlip")continue;let n=r.attributes.find(s=>s.localName==="embed"&&s.namespaceUri===oa)?.value,o=r.attributes.find(s=>s.localName==="link"&&s.namespaceUri===oa)?.value;if(n!==void 0)return `embed=${n}`;if(o!==void 0)return `link=${o}`}}function Z(e,t,r){if(e.kind==="textValue")return `#${e.value}`;if(t>=ba)return C(e);let n=x(r,e);if(e.kind==="generic")return H(e,n);let o=I(e),s=o.length>0?`${C(e)}(${o.join(",")})`:C(e),a=[];for(let i of e.children)i.kind!=="textValue"&&a.push(Z(i,t+1,n));return a.sort(),a.length>0?`${s}[${a.join(",")}]`:s}function er(e,t,r){let n=x(r,e),o=[];for(let s of e.children)if(s.kind!=="textValue"){if(s.kind==="pictureBlipFill"){let a=s.children,i=a.find(l=>l.kind==="pictureBlip"),d=a.filter(l=>l.kind!=="pictureBlip").map(l=>Z(l,t+1,n));if(d.sort(),i&&i.kind==="pictureBlip"){let l=I(i),c=l.length>0?`pictureBlip(${l.join(",")})`:"pictureBlip";o.push(d.length>0?`${c}[${d.join(",")}]`:c);}else for(let l of a)o.push(Z(l,t+1,n));continue}o.push(Z(s,t+1,n));}return o.sort(),o}function Xe(e,t,r){if(e.kind==="textValue")return `#${e.value}`;if(t>=ba)return C(e);let n=x(r,e);if(e.kind==="drawingDocPr"){let i=I(e);return i.length>0?`docPr(${i.join(",")})`:"docPr"}if(e.kind==="picture"){let i=Zt(e),d=er(e,t+1,n),l=i===void 0?"picture":`picture(${i})`;return d.length>0?`${l}[${d.join(",")}]`:l}let o=I(e),s=o.length>0?`${C(e)}(${o.join(",")})`:C(e),a=[];for(let i of e.children){if(i.kind==="picture"){a.push(Xe(i,t+1,n));continue}if(i.kind==="generic"){a.push(H(i,n));continue}i.kind!=="textValue"&&a.push(Xe(i,t+1,n));}return a.length>0?`${s}[${a.join(",")}]`:s}function mt(e){let t=x(ua,e),r=e.children.find(i=>i.kind==="inlineDrawing"||i.kind==="anchoredDrawing");if(!r||r.kind==="textValue")return `drawing(${I(e).join(",")})`;let n=x(t,r),o=I(r),s=o.length>0?`${r.kind}(${o.join(",")})`:r.kind,a=[];for(let i of r.children){if(i.kind==="generic"){a.push(H(i,n));continue}i.kind!=="textValue"&&a.push(Xe(i,1,n));}return a.length>0?`drawing[${s};${a.join(";")}]`:`drawing[${s}]`}function tr(e,t,r){let n=e.children.find(c=>c.kind==="paragraphProperties"),o=[],s="",a=[],i=x(ua,e),d=(c,p)=>{if(c.kind==="run"){let u=x(p,c),m=c.children.find(f=>f.kind==="runProperties");o.push(pt(m)),s+=Ue(c);for(let f of c.children)Ve(f,a,u);return}if(c.kind==="drawing"){a.push(mt(c));return}if(c.kind==="hyperlink"){a.push(Qt(c));let u=x(p,c);for(let m of c.children)d(m,u);return}if(c.kind==="contentControl"){a.push(wa({...c,children:c.children.filter(m=>m.kind!=="contentControlContent")}));let u=x(p,c);for(let m of c.children){if(m.kind!=="contentControlContent")continue;let f=x(u,m);for(let y of m.children)d(y,f);}return}Ve(c,a,p);};for(let c of e.children)d(c,i);let l=Hc(e);return {ordinal:t,path:r,paraId:l===null?null:l.toUpperCase(),text:s,paragraphProperties:pt(n),runProperties:o,genericStructure:a}}function rr(e){if(e.localName==="hdr"||e.localName==="ftr"||e.kind==="body")return e;for(let t of e.children)if(t.kind!=="textValue"&&(t.kind==="body"||t.localName==="hdr"||t.localName==="ftr"))return t;return e}function ft(e,t,r,n,o,s){if(s>ba)return;let a=0;for(let i of e.children){if(i.kind==="textValue"){i.value.trim()!==""&&o.push(`${t}/#text ${i.value}`);continue}let d=t===""?String(a):`${t}/${a}`;if(a+=1,i.kind==="paragraph"){r.push(i),n.push(d),o.push(`${d} p`);continue}let l=I(i);o.push(l.length>0?`${d} ${C(i)}(${l.join(",")})`:`${d} ${C(i)}`),ft(i,d,r,n,o,s+1);}}function yt(e){let t=rr(e.root),r=[],n=[],o=[];ft(t,"",r,n,o,0);let s=r.map((a,i)=>tr(a,i,n[i]));return {partName:e.name,paragraphs:s,structure:o}}function nr(e){let t=[];for(let r of e){let n=yt(r);n&&t.push(n);}return {stories:t}}function or(e,t){let r=[],n=(s,a,i)=>{r.push({path:s,before:JSON.stringify(a)??"undefined",after:JSON.stringify(i)??"undefined"});};e.stories.length!==t.stories.length&&n("stories.length",e.stories.length,t.stories.length);let o=Math.min(e.stories.length,t.stories.length);for(let s=0;s<o;s+=1){let a=e.stories[s],i=t.stories[s],d=p=>`${a.partName}${p}`;a.paragraphs.length!==i.paragraphs.length&&n(d(".paragraphs.length"),a.paragraphs.length,i.paragraphs.length);let l=Math.min(a.paragraphs.length,i.paragraphs.length);for(let p=0;p<l;p+=1){let u=a.paragraphs[p],m=i.paragraphs[p];u.text!==m.text&&n(d(`.p[${p}].text`),u.text,m.text),u.path!==m.path&&n(d(`.p[${p}].path`),u.path,m.path),u.paraId!==m.paraId&&n(d(`.p[${p}].paraId`),u.paraId,m.paraId),JSON.stringify(u.paragraphProperties)!==JSON.stringify(m.paragraphProperties)&&n(d(`.p[${p}].paragraphProperties`),u.paragraphProperties,m.paragraphProperties),JSON.stringify(u.runProperties)!==JSON.stringify(m.runProperties)&&n(d(`.p[${p}].runProperties`),u.runProperties,m.runProperties),JSON.stringify(u.genericStructure)!==JSON.stringify(m.genericStructure)&&n(d(`.p[${p}].genericStructure`),u.genericStructure,m.genericStructure);}a.structure.length!==i.structure.length&&n(d(".structure.length"),a.structure.length,i.structure.length);let c=Math.min(a.structure.length,i.structure.length);for(let p=0;p<c;p+=1)a.structure[p]!==i.structure[p]&&n(d(`.structure[${p}]`),a.structure[p],i.structure[p]);}return r}var U="http://schemas.openxmlformats.org/wordprocessingml/2006/main",sr="http://schemas.openxmlformats.org/package/2006/relationships",gt="http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering",w="application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml",lr="application/vnd.openxmlformats-package.relationships+xml",cr="http://schemas.openxmlformats.org/package/2006/content-types",ht="/[Content_Types].xml",P="/word/numbering.xml",xt=[{text:"\uF0B7",font:"Symbol"},{text:"o",font:"Courier New"},{text:"\uF0A7",font:"Wingdings"}],Nt=["decimal","lowerLetter","lowerRoman"],je=9;function Pt(e,t){let r=720*(t+1),n='<w:start w:val="1"/>';if(e==="bullet"){let a=xt[t%xt.length];return `<w:lvl w:ilvl="${t}">${n}<w:numFmt w:val="bullet"/><w:lvlText w:val="${a.text}"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="${r}" w:hanging="360"/></w:pPr><w:rPr><w:rFonts w:ascii="${a.font}" w:hAnsi="${a.font}" w:hint="default"/></w:rPr></w:lvl>`}let o=Nt[t%Nt.length],s=o==="lowerRoman";return `<w:lvl w:ilvl="${t}">${n}<w:numFmt w:val="${o}"/><w:lvlText w:val="%${t+1}."/><w:lvlJc w:val="${s?"right":"left"}"/><w:pPr><w:ind w:left="${r}" w:hanging="${s?180:360}"/></w:pPr></w:lvl>`}function dr(e,t){let r=Array.from({length:je},(n,o)=>Pt(e,o)).join("");return `<w:abstractNum w:abstractNumId="${t}"><w:multiLevelType w:val="${e==="bullet"?"hybridMultilevel":"multilevel"}"/>${r}</w:abstractNum>`}function pr(){let e=Aa(`<w:numbering xmlns:w="${U}"></w:numbering>`,{name:P,contentType:w});return e.ok?e.part:null}var b=(e,t)=>{let r=[];for(let n of e.children)n.kind==="textValue"||n.localName!==t||n.namespaceUri===U&&r.push(n);return r},N=(e,t)=>e.attributes.find(r=>r.localName===t)?.value;function Et(e,t){let r=Aa(`<w:numbering xmlns:w="${U}">${e}</w:numbering>`,{name:P,contentType:w});if(!r.ok)return null;let n=[];for(let o of r.part.root.children)o.kind!=="textValue"&&n.push(o);if(n.length!==t.length)return null;for(let o=0;o<t.length;o+=1){let s=n[o],a=t[o];if(s.namespaceUri!==U||s.localName!==a.localName||a.attribute&&N(s,a.attribute.localName)!==a.attribute.value)return null}return n}var Ot=["numPicBullet","abstractNum","num","numIdMacAtCleanup"];function Rt(e,t,r){let n=t.indexOf(r);if(n===-1)return e.length;let o=0;return e.forEach((s,a)=>{if(s.kind==="textValue")return;let i=t.indexOf(s.localName);i!==-1&&i<=n&&(o=a+1);}),o}function Ct(e,t){let r=0;for(let n of e){let o=N(n,t);!o||!/^\d{1,9}$/.test(o)||(r=Math.max(r,Number(o)));}return r+1}function ur(e,t){let r=e.parts.get(P),n=r??pr();if(!n)return null;let o=n.root,s=b(o,"abstractNum"),a=b(o,"num"),i=t==="bullet"?"bullet":"decimal";for(let O of a){let _=N(O,"numId"),ze=b(O,"abstractNumId")[0],We=ze?N(ze,"val"):void 0;if(!_||!We)continue;let Ye=s.find(V=>N(V,"abstractNumId")===We);if(!Ye)continue;let Je=b(Ye,"lvl").find(V=>N(V,"ilvl")==="0"||N(V,"ilvl")===void 0),qe=Je?b(Je,"numFmt")[0]:void 0;if(qe&&N(qe,"val")===i)return {pkg:e,numId:_}}let d=Ct(s,"abstractNumId"),l=Ct(a,"numId"),c=Et(dr(t,d)+`<w:num w:numId="${l}"><w:abstractNumId w:val="${d}"/></w:num>`,[{localName:"abstractNum",attribute:{localName:"abstractNumId",value:String(d)}},{localName:"num",attribute:{localName:"numId",value:String(l)}}]);if(!c)return null;let p=Ca(n),[u,m]=c.map(O=>ee(O,p));if(!u||!m)return null;let f=Ha(n,o.id,Rt(o.children,Ot,"abstractNum"),[u]);if(!f.ok)return null;let y=Ha(f.part,o.id,Rt(f.part.root.children,Ot,"num"),[m]);if(!y.ok)return null;let g=Object.freeze({...e,parts:new Map([...e.parts,[P,y.part]])});if(!r){let O=gr(g);if(!O)return null;let _=Or(O);if(!_)return null;g=_;}return {pkg:g,numId:String(l)}}var mr=["nsid","multiLevelType","tmpl","name","styleLink","numStyleLink","lvl"];function It(e){let t=N(e,"ilvl");return t===void 0||!/^\d{1,9}$/.test(t)?null:Number(t)}function fr(e,t){let r=0;return e.forEach((n,o)=>{if(n.kind!=="textValue"){if(n.localName==="lvl"&&n.namespaceUri===U){(It(n)??0)<t&&(r=o+1);return}mr.includes(n.localName)&&(r=o+1);}}),r}function yr(e,t,r,n){if(!Number.isInteger(r)||r<0||r>=je||t.length===0||t.length>64)return null;let o=e.parts.get(P);if(!o)return null;let s=o.root,a=b(s,"num").find(f=>N(f,"numId")===t),i=a?b(a,"abstractNumId")[0]:void 0,d=i?N(i,"val"):void 0;if(!d)return null;let l=b(s,"abstractNum").find(f=>N(f,"abstractNumId")===d);if(!l||b(l,"numStyleLink").length>0)return null;let c=b(l,"lvl");if(c.some(f=>It(f)===r))return e;if(c.length>=je)return null;let p=Et(Pt(n,r),[{localName:"lvl",attribute:{localName:"ilvl",value:String(r)}}]);if(!p)return null;let u=Ca(o),m=Ha(o,l.id,fr(l.children,r),[ee(p[0],u)]);return m.ok?Object.freeze({...e,parts:new Map([...e.parts,[P,m.part]])}):null}function ee(e,t){return e.kind==="textValue"?{...e,id:t()}:{...e,id:t(),children:e.children.map(r=>ee(r,t))}}function gr(e){let t=e.mainDocumentPart,r=hr(t),n=e.parts.get(r),o=xr(e),s=Aa(`<Relationships xmlns="${sr}"><Relationship Id="${o}" Type="${gt}" Target="numbering.xml"/></Relationships>`,{name:r,contentType:lr});if(!s.ok)return null;let a=e.relationships.get(t)??[],i={ownerPart:t,id:o,type:gt,rawTarget:"numbering.xml",targetMode:"Internal",order:a.reduce((u,m)=>Math.max(u,m.order),-1)+1},d=new Map([...e.relationships,[t,[...a,i]]]);if(!n)return Object.freeze({...e,parts:new Map([...e.parts,[r,s.part]]),relationships:d});let l=Ca(n),c=s.part.root.children[0];if(!c)return null;let p=Ha(n,n.root.id,n.root.children.length,[ee(c,l)]);return p.ok?Object.freeze({...e,parts:new Map([...e.parts,[r,p.part]]),relationships:d}):null}function hr(e){let t=e.lastIndexOf("/");return `${e.slice(0,t)}/_rels/${e.slice(t+1)}.rels`}function xr(e){let t=0;for(let r of e.relationships.values())for(let n of r){let o=/^rId(\d{1,9})$/.exec(n.id);o&&(t=Math.max(t,Number(o[1])));}for(let r of e.externalTargets){let n=/^rId(\d{1,9})$/.exec(r.id);n&&(t=Math.max(t,Number(n[1])));}return `rId${t+1}`}var Nr=`<Override PartName="${P}" ContentType="${w}"/>`;function Or(e){let t=e.contentTypes.overrides.get(o(P));if(t===w)return e;if(t!==void 0)return null;let r=e.partBytes.get(ht);if(!r)return null;let n=strFromU8(r),o$1=bt(n);if(!o$1)return null;let s=n.lastIndexOf(`</${o$1.rootName}>`);if(s===-1)return null;let a=n.slice(0,s)+Nr+n.slice(s),i=bt(a);if(!i||i.rootName!==o$1.rootName)return null;let d=[...o$1.children,kt("Override",{PartName:P,ContentType:w})];return i.children.length!==d.length||i.children.some((l,c)=>l!==d[c])?null:Object.freeze({...e,partBytes:new Map([...e.partBytes,[ht,strToU8(a)]]),contentTypes:Object.freeze({defaults:e.contentTypes.defaults,overrides:new Map([...e.contentTypes.overrides,[o(P),w]])})})}function bt(e){let t=ca(e);if(!t.ok)return null;let r=t.nodes.filter(i=>i.type==="element");if(r.length!==1)return null;let n=r[0],o=n.name.indexOf(":"),s=o===-1?"":n.name.slice(0,o);if(n.name.slice(o+1)!=="Types"||n.attributes[s?`xmlns:${s}`:"xmlns"]!==cr)return null;let a=[];for(let i of n.children)i.type==="element"&&a.push(kt(i.name,i.attributes));return {rootName:n.name,children:a}}function kt(e,t){let r=Object.entries(t).map(([n,o])=>`${n}=${o}`).sort();return [e,...r].join("")}var vt=Object.freeze({trackRevisions:false,restrictedToTrackedChanges:false,doNotTrackMoves:false,doNotTrackFormatting:false});function Rr(e){return e!=null&&e.kind!=="textValue"}function St(e,t){for(let r of e.children)if(r.kind!=="textValue"&&r.namespaceUri===la&&r.localName===t)return r;return null}function Ge(e,t){for(let r of e.attributes)if(r.namespaceUri===la&&r.localName===t)return r.value}function Ke(e,t){let r=St(e,t);if(!r)return false;let n=Ge(r,"val");return n===void 0?true:n!=="0"&&n!=="false"&&n!=="off"}function Cr(e){if(!Rr(e))return vt;let t=St(e,"documentProtection"),r=t===null?void 0:Ge(t,"enforcement"),n=r!==void 0&&r!=="0"&&r!=="false"&&r!=="off";return {trackRevisions:Ke(e,"trackRevisions"),restrictedToTrackedChanges:n&&t!==null&&Ge(t,"edit")==="trackedChanges",doNotTrackMoves:Ke(e,"doNotTrackMoves"),doNotTrackFormatting:Ke(e,"doNotTrackFormatting")}}function br(e,t){let r=e.parts.get(t.storyPartName);if(!r)return {ok:false,reason:`no story part named ${t.storyPartName}`};let n=[];for(let d of me(r.root)){let l=ke(d.node).tag;if(l===void 0||l.length===0)continue;let c=t.decide(l);c!=="keep"&&n.push({nodeId:d.node.id,policy:c});}let o=r,s=0,a=0;for(let{nodeId:d,policy:l}of n){let c=Fa(o,d);if(!c)continue;if(l==="remove"){let g=Ja(o,d,{deferValidation:true});if(!g.ok)return {ok:false,reason:`a node could not be removed: ${Tt(g)}`};o=g.part,a+=1;continue}let p=c.children.find(g=>g.id===d);if(!p)continue;let u=ie(p),m=u?u.children:[],f=c.children.flatMap(g=>g.id===d?m:[g]),y=Ga(o,c.id,f,{deferValidation:true});if(!y.ok)return {ok:false,reason:`a node could not be unwrapped: ${Tt(y)}`};o=y.part,s+=1;}let i=o===r?e:yb(e,o);if(!i.parts.has(t.storyPartName))return {ok:false,reason:"the story went missing during the export"};for(let d of t.namespaces)for(let l of Er(i,t.storyPartName,d)){let c=_e$1(i,l.itemId),p=Ue$1(i,l.partName,c);if(p.pkg===i&&p.removed.length===0&&!Pr(i,l.partName,c))return {ok:false,reason:`the payloads in ${d} could not be removed`};if(i=p.pkg,c.size>0)continue;let u=Ir(i,l);if(!u.ok)return {ok:false,reason:`the payload store for ${d} could not be removed`};i=u.pkg;}return {ok:true,pkg:i,unwrapped:s,removed:a}}function Pr(e,t,r){return Qe(e,t).every(n=>r.has(n.id))}function Tt(e){return e.issues.map(t=>t.code).join(", ")||"the edit was refused"}function Er(e,t,r){return Me$1(e,t).filter(n=>n.namespaceUri===r)}function Ir(e,t){let r=Eb(e,t.partName);if(!r.ok)return {pkg:e,ok:false};let n=Eb(r.pkg,t.propsPartName);return n.ok?{pkg:n.pkg,ok:true}:{pkg:e,ok:false}}
|
|
2
|
-
export{Fe as A,Me as B,Be as C,Kt as D,at as E,ct as F,Yt as G,qt as H,yt as I,nr as J,or as K,ur as L,yr as M,vt as N,Cr as O,br as P,wt as a,et as b,W as c,k as d,Y as e,J as f,h as g,Dt as h,v as i,F as j,q as k,M as l,Q as m,Te as n,we as o,_e as p,Bt as q,Ht as r,Ae as s,rt as t,Ut as u,$e as v,Vt as w,B as x,De as y,Le as z};
|