@sectile/core 0.12.0 → 0.13.0
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 +3 -1
- package/dist/adapter-runtime.d.ts +0 -1
- package/dist/adapter-runtime.js +1 -1
- package/dist/adapter-runtime.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ Pure, renderer-neutral interaction semantics with explicit laws, failures, and r
|
|
|
7
7
|
- Ordered structures: sequence, range, grid, and tree
|
|
8
8
|
- Reusable state: cursor, selection, expansion, revision, interaction gates, and finite collection windows
|
|
9
9
|
- Coordination primitives for generation-bound async work, nested layer stacks, and identity-based reordering
|
|
10
|
-
-
|
|
10
|
+
- Bounded geometry algebra, anchored placement calculations, and a generic metric index
|
|
11
11
|
- Composite behavior for selection, navigation, disclosure, editing, forms, and overlays
|
|
12
12
|
- UTF-16-safe text editing, exact decimal expressions, and dimension-checked units
|
|
13
13
|
|
|
@@ -16,3 +16,5 @@ Pure, renderer-neutral interaction semantics with explicit laws, failures, and r
|
|
|
16
16
|
Core modules contain no DOM, terminal, rendering, or styling behavior. Constructors validate their inputs and return typed `Result` values. Accepted transitions are deterministic and failure-atomic; policies make eligibility, boundaries, and ownership explicit.
|
|
17
17
|
|
|
18
18
|
Runtime APIs are exposed through focused package subpaths. The package root contains shared types and has no interaction authority.
|
|
19
|
+
|
|
20
|
+
Core geometry is value-level infrastructure. `@sectile/virtual` owns collection extents, viewport queries, dynamic measurement state, layout strategies, and virtual repair. DOM and other host adapters obtain actual platform measurements and pass that evidence across the boundary; Core never reads host elements.
|
|
@@ -2,7 +2,6 @@ import type { Result, SectileError, StableID } from './shared.js';
|
|
|
2
2
|
import type { CoreErrorCode } from './error-code.js';
|
|
3
3
|
import { type InteractionStateInput } from './interaction.js';
|
|
4
4
|
import { type EventReducer, type RevisionResult, type RevisionSnapshot } from './revision.js';
|
|
5
|
-
export declare function applyControllerEvent<State, Event, Command, Effect, Code extends string>(current: RevisionSnapshot<State>, expectedRevision: number, event: Event, reducer: EventReducer<State, Event, Command, Code>, reconcile: (previous: State, proposed: State) => Result<State, Code>, notify: (previous: State, proposed: State) => void, toEffect: (command: Command) => Effect): RevisionResult<State, Effect, CoreErrorCode | Code>;
|
|
6
5
|
export declare function synchronizeControllerState<State, Code extends string>(current: RevisionSnapshot<State>, state: Result<State, Code>): Result<RevisionSnapshot<State>, CoreErrorCode | Code>;
|
|
7
6
|
export type ControlledFieldCodeName = 'edit-mode' | 'expanded-value' | 'expanded-values' | 'highlighted-value' | 'input-state' | 'open' | 'value';
|
|
8
7
|
type ControlledFieldErrorCode = `controlled-${ControlledFieldCodeName}-required` | `uncontrolled-${ControlledFieldCodeName}-update`;
|
package/dist/adapter-runtime.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{sameStableIDOrder,tryNormalizeStableIDs}from"./identity.js";import{tryCreateSequence}from"./structures/sequence.js";import{tryCreateInteractionState,requireInteraction}from"./interaction.js";import{applyRevisionedEvent,tryCreateRevisionSnapshot,mapRevisionCommands,rejectRevisionInput}from"./revision.js";function applyControllerEvent(current,expectedRevision,event,reducer,reconcile,notify,toEffect){const prepared=prepareControllerEvent(current,expectedRevision,event,reducer,reconcile,toEffect);if(!prepared.result.ok)return prepared.result;notify(current.state,prepared.proposed);return prepared.result}function prepareControllerEvent(current,expectedRevision,event,reducer,reconcile,toEffect){const semantic=applyRevisionedEvent(current,expectedRevision,event,reducer);if(!semantic.ok)return{result:semantic,proposed:current.state};const committed=reconcile(current.state,semantic.snapshot.state);if(!committed.ok){return{result:rejectRevisionInput(current,committed.error),proposed:semantic.snapshot.state}}const snapshot=Object.freeze({revision:semantic.snapshot.revision,state:committed.value});return{result:mapRevisionCommands(Object.freeze({ok:true,snapshot,commands:semantic.commands}),toEffect),proposed:semantic.snapshot.state}}function synchronizeControllerState(current,state){if(!state.ok)return state;if(current.revision===Number.MAX_SAFE_INTEGER){return{ok:false,error:{class:"resource-rejection",code:"revision-ceiling-reached",message:"Controller revision cannot advance beyond the safe-integer ceiling.",details:{revision:current.revision}}}}return tryCreateRevisionSnapshot(state.value,current.revision+1)}function controlledFieldError(controlled,provided,codeName,label){if(controlled===provided)return null;const code=controlled?`controlled-${codeName}-required`:`uncontrolled-${codeName}-update`;return{class:"construction",code,message:controlled?`Controlled ${label} sync requires its external value.`:`Uncontrolled ${label} cannot be synchronized externally.`}}function createSemanticController(options){if(!options.initial.ok)return options.initial;const interaction=tryCreateInteractionState(options.interaction);if(!interaction.ok)return interaction;const snapshot=tryCreateRevisionSnapshot(options.initial.value);if(!snapshot.ok)return snapshot;let current=snapshot.value;return{ok:true,value:Object.freeze({getSnapshot:()=>current,replace:state=>{const next=synchronizeControllerState(current,state);if(next.ok)current=next.value;return next},handle:(event,expectedRevision=current.revision)=>{const permitted=requireInteraction(interaction.value,options.interactionIntent?.(event)??"mutate");if(!permitted.ok)return rejectRevisionInput(current,permitted.error);const previous=current;const prepared=prepareControllerEvent(current,expectedRevision,event,options.reducer,options.reconcile??((_previous,proposed)=>({ok:true,value:proposed})),options.toEffect);if(!prepared.result.ok)return prepared.result;current=prepared.result.snapshot;options.notify?.(previous.state,prepared.proposed);return prepared.result},reject:(code,message,details)=>rejectRevisionInput(current,{class:"transition-rejection",code,message,...details===void 0?{}:{details}})})}}function createHostAdapter(options){const controller=createSemanticController({initial:options.initial,reducer:options.reducer,toEffect:options.project,...options.reconcile===void 0?{}:{reconcile:options.reconcile},...options.notify===void 0?{}:{notify:options.notify},...options.interaction===void 0?{}:{interaction:options.interaction},...options.interactionIntent===void 0?{}:{interactionIntent:options.interactionIntent}});if(!controller.ok)return controller;return{ok:true,value:Object.freeze({getSnapshot:()=>controller.value.getSnapshot(),replace:state=>controller.value.replace(state),handleInput:(input,expectedRevision)=>{const event=options.decode(input);if(event===null)return null;return controller.value.handle(event,expectedRevision)},reject:(code,message,details)=>controller.value.reject(code,message,details)})}}function createControlledComponentController(options){const runtime=createSemanticController({initial:options.initial,reducer:options.reducer,reconcile:(previous,proposed)=>options.create(options.controlled?options.read(previous):options.read(proposed),proposed),notify:(previous,proposed)=>{const before=options.read(previous);const after=options.read(proposed);if(!Object.is(before,after))options.onChange?.(after,before)},toEffect:command=>command,...options.interaction===void 0?{}:{interaction:options.interaction},...options.interactionIntent===void 0?{}:{interactionIntent:options.interactionIntent}});if(!runtime.ok)return runtime;const getSnapshot=()=>runtime.value.getSnapshot();const syncControlledValue=value=>{if(!options.controlled){return{ok:false,error:{class:"construction",code:"uncontrolled-controller-sync",message:"An uncontrolled component cannot be synchronized externally."}}}return runtime.value.replace(options.create(value,getSnapshot().state))};return{ok:true,value:Object.freeze({getSnapshot,syncControlledValue,handle:(event,expectedRevision)=>runtime.value.handle(event,expectedRevision)})}}function createCollectionComponentController(options){let domain=options.domain;const runtime=createSemanticController({initial:options.initial(domain),reducer:(state,event)=>options.reducer(domain,state,event),reconcile:(previous,proposed)=>options.reconcile(domain,previous,proposed),toEffect:command=>command,...options.notify===void 0?{}:{notify:options.notify},...options.interaction===void 0?{}:{interaction:options.interaction},...options.interactionIntent===void 0?{}:{interactionIntent:options.interactionIntent}});if(!runtime.ok)return runtime;const replaceDomain=nextDomain=>{if(Object.is(domain,nextDomain))return{ok:true,value:runtime.value.getSnapshot()};const previous=runtime.value.getSnapshot().state;const next=options.replaceDomain(nextDomain,previous);if(!next.ok)return next;const replaced=runtime.value.replace(next);if(replaced.ok){domain=nextDomain;options.notify?.(previous,replaced.value.state)}return replaced};return{ok:true,value:Object.freeze({getDomain:()=>domain,getSnapshot:()=>runtime.value.getSnapshot(),replaceDomain,replaceState:state=>runtime.value.replace(state),handle:(event,expectedRevision)=>runtime.value.handle(event,expectedRevision)})}}function tryReconcileCollectionIdentities(items,selected,current,disabledItems,mode,options={}){if(mode!=="single"&&mode!=="multiple"){return{ok:false,error:{class:"construction",code:"invalid-selection-mode",message:"Collection selection mode must be single or multiple."}}}const domain=tryCreateSequence(items);if(!domain.ok)return domain;const normalizedSelection=tryNormalizeStableIDs(selected);if(!normalizedSelection.ok)return normalizedSelection;const disabled=tryCreateDisabledIdentitySet(domain.value,disabledItems);if(!disabled.ok)return disabled;const requested=new Set(normalizedSelection.value);const selectedInDomain=domain.value.ids.filter(id=>requested.has(id));const nextSelected=Object.freeze(mode==="single"?selectedInDomain.slice(0,1):selectedInDomain);const nextCurrent=current===null&&options.preserveNullCurrent===true?null:current!==null&&domain.value.contains(current)&&!disabled.value.has(current)?current:nextSelected.find(id=>!disabled.value.has(id))??domain.value.ids.find(id=>!disabled.value.has(id))??null;return{ok:true,value:Object.freeze({selected:nextSelected,current:nextCurrent,selectionChanged:!sameStableIDOrder(selected,nextSelected),currentChanged:current!==nextCurrent})}}function tryCreateDisabledIdentitySet(domain,ids=[]){const disabled=new Set(ids);for(const id of disabled){if(!domain.contains(id)){return{ok:false,error:{class:"construction",code:"disabled-item-outside-domain",message:"Every disabled item must exist in the component domain.",details:{id}}}}}return{ok:true,value:disabled}}function createFacadeConnection(options,construct){const subscribers=new Set;let connection;let active=true;const onUpdate=()=>{if(!active)return;options.onUpdate?.();if(connection===void 0)return;const snapshot=connection.getSnapshot();for(const subscriber of subscribers)subscriber(snapshot)};const constructed=construct({...options,onUpdate});if(!constructed.ok)return constructed;connection=constructed.value;const target=connection;const forwardedMethods=new Map;const inactiveUnsubscribe=()=>void 0;const send=input=>active&&Boolean(callFirst(target,["handleEvent","handleKeyboardInput","handleKeyboardEvent","handleBeforeInput"],input));const update=input=>active?callFirst(target,["syncControlledValues","syncControlledValue","syncWindow"],input):destroyedConnectionResult();const subscribe=listener=>{if(!active)return inactiveUnsubscribe;subscribers.add(listener);return()=>{subscribers.delete(listener)}};const destroy=()=>{if(!active)return;active=false;const disconnect=target["disconnect"];if(typeof disconnect==="function")Reflect.apply(disconnect,target,[]);subscribers.clear()};const facade=new Proxy(target,{get:(_target,property)=>{if(property==="state")return connection?.getSnapshot().state;if(property==="send")return send;if(property==="update")return update;if(property==="subscribe")return subscribe;if(property==="destroy")return destroy;const value=Reflect.get(target,property,target);const ownDescriptor=Reflect.getOwnPropertyDescriptor(target,property);if(ownDescriptor!==void 0&&ownDescriptor.configurable===false)return value;if(typeof value!=="function")return value;const existing=forwardedMethods.get(property);if(existing!==void 0)return existing;const forwarded=(...args)=>{if(active||isPostDestroyRead(property))return Reflect.apply(value,target,args);if(typeof property==="string"&&property.startsWith("handle"))return false;if(typeof property==="string"&&property.startsWith("sync")){return destroyedConnectionResult()}return void 0};forwardedMethods.set(property,forwarded);return forwarded}});return{ok:true,value:facade}}function destroyedConnectionResult(){return{ok:false,error:{class:"resource-rejection",code:"connection-destroyed",message:"A destroyed facade connection cannot be updated."}}}function isPostDestroyRead(property){return property==="getSnapshot"||typeof property==="string"&&property.startsWith("get")}function callFirst(target,names,input){for(const name of names){const method=target[name];if(typeof method==="function")return Reflect.apply(method,target,[input])}throw new TypeError(`The connection does not implement ${names.join(" or ")}.`)}export{applyControllerEvent,controlledFieldError,createCollectionComponentController,createControlledComponentController,createFacadeConnection,createHostAdapter,createSemanticController,synchronizeControllerState,tryCreateDisabledIdentitySet,tryReconcileCollectionIdentities};
|
|
1
|
+
import{sameStableIDOrder,tryNormalizeStableIDs}from"./identity.js";import{tryCreateSequence}from"./structures/sequence.js";import{tryCreateInteractionState,requireInteraction}from"./interaction.js";import{applyRevisionedEvent,tryCreateRevisionSnapshot,mapRevisionCommands,rejectRevisionInput}from"./revision.js";function prepareControllerEvent(current,expectedRevision,event,reducer,reconcile,toEffect){const semantic=applyRevisionedEvent(current,expectedRevision,event,reducer);if(!semantic.ok)return{result:semantic,proposed:current.state};const committed=reconcile(current.state,semantic.snapshot.state);if(!committed.ok){return{result:rejectRevisionInput(current,committed.error),proposed:semantic.snapshot.state}}const snapshot=Object.freeze({revision:semantic.snapshot.revision,state:committed.value});return{result:mapRevisionCommands(Object.freeze({ok:true,snapshot,commands:semantic.commands}),toEffect),proposed:semantic.snapshot.state}}function synchronizeControllerState(current,state){if(!state.ok)return state;if(current.revision===Number.MAX_SAFE_INTEGER){return{ok:false,error:{class:"resource-rejection",code:"revision-ceiling-reached",message:"Controller revision cannot advance beyond the safe-integer ceiling.",details:{revision:current.revision}}}}return tryCreateRevisionSnapshot(state.value,current.revision+1)}function controlledFieldError(controlled,provided,codeName,label){if(controlled===provided)return null;const code=controlled?`controlled-${codeName}-required`:`uncontrolled-${codeName}-update`;return{class:"construction",code,message:controlled?`Controlled ${label} sync requires its external value.`:`Uncontrolled ${label} cannot be synchronized externally.`}}function createSemanticController(options){if(!options.initial.ok)return options.initial;const interaction=tryCreateInteractionState(options.interaction);if(!interaction.ok)return interaction;const snapshot=tryCreateRevisionSnapshot(options.initial.value);if(!snapshot.ok)return snapshot;let current=snapshot.value;return{ok:true,value:Object.freeze({getSnapshot:()=>current,replace:state=>{const next=synchronizeControllerState(current,state);if(next.ok)current=next.value;return next},handle:(event,expectedRevision=current.revision)=>{const permitted=requireInteraction(interaction.value,options.interactionIntent?.(event)??"mutate");if(!permitted.ok)return rejectRevisionInput(current,permitted.error);const previous=current;const prepared=prepareControllerEvent(current,expectedRevision,event,options.reducer,options.reconcile??((_previous,proposed)=>({ok:true,value:proposed})),options.toEffect);if(!prepared.result.ok)return prepared.result;current=prepared.result.snapshot;options.notify?.(previous.state,prepared.proposed);return prepared.result},reject:(code,message,details)=>rejectRevisionInput(current,{class:"transition-rejection",code,message,...details===void 0?{}:{details}})})}}function createHostAdapter(options){const controller=createSemanticController({initial:options.initial,reducer:options.reducer,toEffect:options.project,...options.reconcile===void 0?{}:{reconcile:options.reconcile},...options.notify===void 0?{}:{notify:options.notify},...options.interaction===void 0?{}:{interaction:options.interaction},...options.interactionIntent===void 0?{}:{interactionIntent:options.interactionIntent}});if(!controller.ok)return controller;return{ok:true,value:Object.freeze({getSnapshot:()=>controller.value.getSnapshot(),replace:state=>controller.value.replace(state),handleInput:(input,expectedRevision)=>{const event=options.decode(input);if(event===null)return null;return controller.value.handle(event,expectedRevision)},reject:(code,message,details)=>controller.value.reject(code,message,details)})}}function createControlledComponentController(options){const runtime=createSemanticController({initial:options.initial,reducer:options.reducer,reconcile:(previous,proposed)=>options.create(options.controlled?options.read(previous):options.read(proposed),proposed),notify:(previous,proposed)=>{const before=options.read(previous);const after=options.read(proposed);if(!Object.is(before,after))options.onChange?.(after,before)},toEffect:command=>command,...options.interaction===void 0?{}:{interaction:options.interaction},...options.interactionIntent===void 0?{}:{interactionIntent:options.interactionIntent}});if(!runtime.ok)return runtime;const getSnapshot=()=>runtime.value.getSnapshot();const syncControlledValue=value=>{if(!options.controlled){return{ok:false,error:{class:"construction",code:"uncontrolled-controller-sync",message:"An uncontrolled component cannot be synchronized externally."}}}return runtime.value.replace(options.create(value,getSnapshot().state))};return{ok:true,value:Object.freeze({getSnapshot,syncControlledValue,handle:(event,expectedRevision)=>runtime.value.handle(event,expectedRevision)})}}function createCollectionComponentController(options){let domain=options.domain;const runtime=createSemanticController({initial:options.initial(domain),reducer:(state,event)=>options.reducer(domain,state,event),reconcile:(previous,proposed)=>options.reconcile(domain,previous,proposed),toEffect:command=>command,...options.notify===void 0?{}:{notify:options.notify},...options.interaction===void 0?{}:{interaction:options.interaction},...options.interactionIntent===void 0?{}:{interactionIntent:options.interactionIntent}});if(!runtime.ok)return runtime;const replaceDomain=nextDomain=>{if(Object.is(domain,nextDomain))return{ok:true,value:runtime.value.getSnapshot()};const previous=runtime.value.getSnapshot().state;const next=options.replaceDomain(nextDomain,previous);if(!next.ok)return next;const replaced=runtime.value.replace(next);if(replaced.ok){domain=nextDomain;options.notify?.(previous,replaced.value.state)}return replaced};return{ok:true,value:Object.freeze({getDomain:()=>domain,getSnapshot:()=>runtime.value.getSnapshot(),replaceDomain,replaceState:state=>runtime.value.replace(state),handle:(event,expectedRevision)=>runtime.value.handle(event,expectedRevision)})}}function tryReconcileCollectionIdentities(items,selected,current,disabledItems,mode,options={}){if(mode!=="single"&&mode!=="multiple"){return{ok:false,error:{class:"construction",code:"invalid-selection-mode",message:"Collection selection mode must be single or multiple."}}}const domain=tryCreateSequence(items);if(!domain.ok)return domain;const normalizedSelection=tryNormalizeStableIDs(selected);if(!normalizedSelection.ok)return normalizedSelection;const disabled=tryCreateDisabledIdentitySet(domain.value,disabledItems);if(!disabled.ok)return disabled;const requested=new Set(normalizedSelection.value);const selectedInDomain=domain.value.ids.filter(id=>requested.has(id));const nextSelected=Object.freeze(mode==="single"?selectedInDomain.slice(0,1):selectedInDomain);const nextCurrent=current===null&&options.preserveNullCurrent===true?null:current!==null&&domain.value.contains(current)&&!disabled.value.has(current)?current:nextSelected.find(id=>!disabled.value.has(id))??domain.value.ids.find(id=>!disabled.value.has(id))??null;return{ok:true,value:Object.freeze({selected:nextSelected,current:nextCurrent,selectionChanged:!sameStableIDOrder(selected,nextSelected),currentChanged:current!==nextCurrent})}}function tryCreateDisabledIdentitySet(domain,ids=[]){const disabled=new Set(ids);for(const id of disabled){if(!domain.contains(id)){return{ok:false,error:{class:"construction",code:"disabled-item-outside-domain",message:"Every disabled item must exist in the component domain.",details:{id}}}}}return{ok:true,value:disabled}}function createFacadeConnection(options,construct){const subscribers=new Set;let connection;let active=true;const onUpdate=()=>{if(!active)return;options.onUpdate?.();if(connection===void 0)return;const snapshot=connection.getSnapshot();for(const subscriber of subscribers)subscriber(snapshot)};const constructed=construct({...options,onUpdate});if(!constructed.ok)return constructed;connection=constructed.value;const target=connection;const forwardedMethods=new Map;const inactiveUnsubscribe=()=>void 0;const send=input=>active&&Boolean(callFirst(target,["handleEvent","handleKeyboardInput","handleKeyboardEvent","handleBeforeInput"],input));const update=input=>active?callFirst(target,["syncControlledValues","syncControlledValue","syncWindow"],input):destroyedConnectionResult();const subscribe=listener=>{if(!active)return inactiveUnsubscribe;subscribers.add(listener);return()=>{subscribers.delete(listener)}};const destroy=()=>{if(!active)return;active=false;const disconnect=target["disconnect"];if(typeof disconnect==="function")Reflect.apply(disconnect,target,[]);subscribers.clear()};const facade=new Proxy(target,{get:(_target,property)=>{if(property==="state")return connection?.getSnapshot().state;if(property==="send")return send;if(property==="update")return update;if(property==="subscribe")return subscribe;if(property==="destroy")return destroy;const value=Reflect.get(target,property,target);const ownDescriptor=Reflect.getOwnPropertyDescriptor(target,property);if(ownDescriptor!==void 0&&ownDescriptor.configurable===false)return value;if(typeof value!=="function")return value;const existing=forwardedMethods.get(property);if(existing!==void 0)return existing;const forwarded=(...args)=>{if(active||isPostDestroyRead(property))return Reflect.apply(value,target,args);if(typeof property==="string"&&property.startsWith("handle"))return false;if(typeof property==="string"&&property.startsWith("sync")){return destroyedConnectionResult()}return void 0};forwardedMethods.set(property,forwarded);return forwarded}});return{ok:true,value:facade}}function destroyedConnectionResult(){return{ok:false,error:{class:"resource-rejection",code:"connection-destroyed",message:"A destroyed facade connection cannot be updated."}}}function isPostDestroyRead(property){return property==="getSnapshot"||typeof property==="string"&&property.startsWith("get")}function callFirst(target,names,input){for(const name of names){const method=target[name];if(typeof method==="function")return Reflect.apply(method,target,[input])}throw new TypeError(`The connection does not implement ${names.join(" or ")}.`)}export{controlledFieldError,createCollectionComponentController,createControlledComponentController,createFacadeConnection,createHostAdapter,createSemanticController,synchronizeControllerState,tryCreateDisabledIdentitySet,tryReconcileCollectionIdentities};
|
|
2
2
|
//# sourceMappingURL=adapter-runtime.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/adapter-runtime.ts"],"mappings":"AAEA,OAAS,kBAAmB,0BAA6B,gBACzD,OAAS,sBAAyB,2BAClC,OACE,0BACA,uBAEK,mBACP,OACE,qBACA,0BACA,oBACA,wBAIK,
|
|
1
|
+
{"version":3,"sources":["../src/adapter-runtime.ts"],"mappings":"AAEA,OAAS,kBAAmB,0BAA6B,gBACzD,OAAS,sBAAyB,2BAClC,OACE,0BACA,uBAEK,mBACP,OACE,qBACA,0BACA,oBACA,wBAIK,gBAEP,SAAS,uBACP,QACA,iBACA,MACA,QACA,UACA,SAAsC,CAKtC,MAAM,SAAW,qBAAqB,QAAS,iBAAkB,MAA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