@visulima/vis 1.0.0-alpha.30 → 1.0.0-alpha.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/bin.js +1 -1
- package/dist/binx.js +1 -1
- package/dist/packem_chunks/bin.js +290 -290
- package/dist/packem_chunks/bloom-status.js +1 -1
- package/dist/packem_chunks/bloom-sync.js +1 -1
- package/dist/packem_chunks/config.js +15 -15
- package/dist/packem_chunks/doctor-probe.js +1 -1
- package/dist/packem_chunks/fix.js +1 -1
- package/dist/packem_chunks/handler14.js +1 -1
- package/dist/packem_chunks/handler15.js +1 -1
- package/dist/packem_chunks/handler16.js +1 -1
- package/dist/packem_chunks/handler21.js +1 -1
- package/dist/packem_chunks/handler22.js +1 -1
- package/dist/packem_chunks/handler23.js +1 -1
- package/dist/packem_chunks/handler25.js +1 -1
- package/dist/packem_chunks/handler27.js +1 -1
- package/dist/packem_chunks/handler29.js +1 -1
- package/dist/packem_chunks/handler32.js +1 -1
- package/dist/packem_chunks/handler35.js +1 -1
- package/dist/packem_chunks/handler36.js +1 -1
- package/dist/packem_chunks/handler37.js +1 -1
- package/dist/packem_chunks/handler38.js +1 -1
- package/dist/packem_chunks/handler39.js +1 -1
- package/dist/packem_chunks/handler4.js +1 -1
- package/dist/packem_chunks/handler42.js +1 -1
- package/dist/packem_chunks/handler43.js +1 -1
- package/dist/packem_chunks/handler44.js +1 -1
- package/dist/packem_chunks/handler45.js +1 -1
- package/dist/packem_chunks/handler46.js +1 -1
- package/dist/packem_chunks/handler47.js +1 -1
- package/dist/packem_chunks/handler48.js +1 -1
- package/dist/packem_chunks/handler49.js +1 -1
- package/dist/packem_chunks/handler50.js +1 -1
- package/dist/packem_chunks/handler51.js +37 -37
- package/dist/packem_chunks/handler52.js +1 -1
- package/dist/packem_chunks/heal.js +1 -1
- package/dist/packem_chunks/help-command.js +1 -1
- package/dist/packem_chunks/keys-refresh.js +1 -1
- package/dist/packem_chunks/prune.js +1 -1
- package/dist/packem_chunks/status.js +1 -1
- package/dist/packem_chunks/sync.js +1 -1
- package/dist/packem_chunks/verify-lockfile.js +1 -1
- package/dist/packem_shared/Table-3pFgIUZ2-DABgc6rj.js +12 -0
- package/dist/packem_shared/{advisories-BxXiKFbL.js → advisories-CGKZo9Rx.js} +1 -1
- package/dist/packem_shared/{cyclonedx-BpGVHqSW.js → cyclonedx-BilSFCNY.js} +1 -1
- package/dist/packem_shared/{docker-CTE3s4LW.js → docker-EJiTY0Sz.js} +1 -1
- package/dist/packem_shared/{index-D1xC1Y_R.js → index-BnANMQ7k.js} +1 -1
- package/dist/packem_shared/{index-hoWfZmNo.js → index-K8aQuMvx.js} +1 -1
- package/dist/packem_shared/{lifecycle-CXaqPGAQ.js → lifecycle-Buigdp7P.js} +2 -2
- package/dist/packem_shared/{osv-bloom-DSZcHLsM.js → osv-bloom-0Vu8YRhg.js} +1 -1
- package/dist/packem_shared/{provenance-DkCA8BrN.js → provenance-D8vU1u2L.js} +1 -1
- package/dist/packem_shared/{registry-keys-Mixm4eAY.js → registry-keys-E3cZn4FI.js} +1 -1
- package/dist/packem_shared/{resolve-explicit-D5E72FfN.js → resolve-explicit-cPzwdiEE.js} +1 -1
- package/dist/packem_shared/{s1ngularity-Qxc6tRRI.js → s1ngularity-DBcjspCC.js} +1 -1
- package/dist/packem_shared/{scan-progress-DVtCtI2z.js → scan-progress-CTVVf9WW.js} +1 -1
- package/dist/packem_shared/{signatures-byuFrtAH.js → signatures-ChTfrQvT.js} +1 -1
- package/dist/packem_shared/{typosquats-BiDxQj7R.js → typosquats-acxQ7blw.js} +1 -1
- package/dist/packem_shared/{watch-loop-C31Ar7BX.js → watch-loop-BpA_pxU9.js} +1 -1
- package/index.d.ts +201 -201
- package/index.js +52 -52
- package/package.json +10 -10
- package/dist/packem_shared/Table-DoSoazT6-DwnyTUsA.js +0 -12
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Tc=Object.defineProperty;var l=(e,t)=>Tc(e,"name",{value:t,configurable:!0});import{createRequire as Ic}from"node:module";import{E as _e,q as Ec,e as vr,T as Hc,I as pu}from"../packem_shared/Table-DoSoazT6-DwnyTUsA.js";import{a as Jt,z as Xa,l as Ya,B as Gc,C as Lt,M as cn}from"../packem_shared/readFileSync-DseCu8sg-DEq4Fn3a.js";import{fingerprint as zt,listRules as fu,listRequiredValidators as Fc,scan as gu,scanFiles as Vc,inspectRuleset as zc}from"@visulima/secret-scanner";import{c4 as Sc,c5 as qo,p as Pe}from"./bin.js";import{$ as _r}from"../packem_shared/spinners-f91Rbo99-Bjf3NcO0.js";import{s as Mc,E as Lc}from"./config.js";const Dc=Ic(import.meta.url),Xt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Za=l(e=>{if(typeof Xt<"u"&&Xt.versions&&Xt.versions.node){const[t,n]=Xt.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Xt.getBuiltinModule(e)}return Dc(e)},"__cjs_getBuiltinModule"),{createRequire:Bc}=Za("node:module"),{pathToFileURL:mu}=Za("node:url"),{execFileSync:Kc}=Za("node:child_process");var Jc=Object.defineProperty,eo=l((e,t)=>Jc(e,"name",{value:t,configurable:!0}),"n$17"),Wc=Object.defineProperty,br=eo((e,t)=>Wc(e,"name",{value:t,configurable:!0}),"h");const qc=Bc(import.meta.url),Yt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Rc=br(e=>{if(typeof Yt<"u"&&Yt.versions&&Yt.versions.node){const[t,n]=Yt.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Yt.getBuiltinModule(e)}return qc(e)},"__cjs_getBuiltinModule"),{styleText:Uc}=Rc("node:util");var Qc=Object.defineProperty,to=br((e,t)=>Qc(e,"name",{value:t,configurable:!0}),"r");const _c={error:"✖",info:"ℹ",success:"✓",warning:"⚠"},Zc=to(e=>{const t=[];return e.bold&&t.push("bold"),e.dim&&t.push("dim"),e.italic&&t.push("italic"),e.underline&&t.push("underline"),e.strikethrough&&t.push("strikethrough"),e.color&&t.push(e.color),e.bgColor&&t.push(e.bgColor),t.length===0?n=>n:n=>Uc(t,n)},"resolveStyleToFunction");let vu=class{static{l(this,"a")}static{eo(this,"m")}static{br(this,"Spinner")}static{to(this,"Spinner")}#t=0;#o;#e=!1;#r="";#i="";#f=0;#d=0;#a;#n;#h="";#l;#p;#s;#g;constructor(t={},n){this.#l=t.name??"dots",this.#p=t.verbose!==!1,this.#r=t.prefixText??"",this.#a=n,this.#g={..._c,...t.icons},typeof t.style=="function"?this.#s=t.style:t.style&&(this.#s=Zc(t.style))}get elapsedTime(){return(this.#d||Date.now())-this.#f}get text(){return this.#i}get getText(){return this.#i}set text(t){this.#i=t,this.#e&&(this.#n?this.#n.renderAll():this.#a&&this.#u())}get prefixText(){return this.#r}get getPrefixText(){return this.#r}set prefixText(t){this.#r=t,this.#e&&(this.#n?this.#n.renderAll():this.#a&&this.#u())}get isRunning(){return this.#e}setInteractiveManager(t){this.#a=t}setMultiSpinner(t){this.#n=t}start(t,n){if(this.#e)return this;if(!this.#p)return this;this.#e=!0,this.#f=Date.now(),this.#d=0,this.#t=0,t&&(this.#i=t),n?.prefixText&&(this.#r=n.prefixText);const r=this.#n??this.#a;r&&(this.#n?r.renderAll():(r.hook(),this.#u()));const a=_r(this.#l);return this.#o=setInterval(()=>{this.#e&&(this.#t=(this.#t+1)%a.frames.length,this.#n?this.#n.renderAll():this.#a&&this.#u())},a.interval),this}succeed(t){this.#c("success",t)}failed(t){this.#c("error",t)}warn(t){this.#c("warning",t)}info(t){this.#c("info",t)}pause(){this.#o&&(clearInterval(this.#o),this.#o=void 0)}resume(){if(!this.#e)return;this.#o&&clearInterval(this.#o);const t=_r(this.#l);this.#o=setInterval(()=>{this.#e&&(this.#t=(this.#t+1)%t.frames.length,this.#n?this.#n.renderAll():this.#a&&this.#u())},t.interval)}getFrameOutput(){if(!this.#e&&this.#h)return this.#h;const t=_r(this.#l).frames[this.#t];let n=this.#s?this.#s(t):t;return this.#r&&(n=`${this.#r} ${n}`),this.#i&&(n=`${n} ${this.#i}`),n}#u(){this.#a&&this.#a.update("stdout",[this.getFrameOutput()])}#c(t,n){if(!this.#e||(this.#o&&(clearInterval(this.#o),this.#o=void 0),this.#e=!1,this.#d=Date.now(),!this.#p))return;let r="";const a=this.#g[t];a&&(r=this.#s?this.#s(a):a),this.#r&&(r=`${this.#r} ${r}`),n&&(r=`${r} ${n}`),this.#h=r,(this.#n??this.#a)&&(this.#n?this.#n.renderAll():this.#a&&(this.#a.update("stdout",[r]),this.#a.unhook(!1)))}},DN=class{static{l(this,"T")}static{eo(this,"b")}static{br(this,"MultiSpinner")}static{to(this,"MultiSpinner")}#t=new Map;#o=0;#e;#r=!1;#i;constructor(t={},n){this.#i=t,this.#e=n}setInteractiveManager(t){this.#e=t}create(t,n={}){const r=`spinner_${String(this.#o++)}`,a=new vu({...this.#i,...n});return a.setMultiSpinner(this),this.#t.set(r,a),t&&(a.text=t),a}remove(t){for(const[n,r]of this.#t.entries())if(r===t)return this.#t.delete(n),this.renderAll(),!0;return!1}stop(){for(const t of this.#t.values())t.succeed();this.#t.clear(),this.#r=!1,this.#e&&this.#e.unhook(!1)}clear(){for(const t of this.#t.values())t.succeed();this.#t.clear()}renderAll(){if(!this.#e)return;this.#r||(this.#r=!0,this.#e.hook());const t=[];for(const n of this.#t.values())t.push(n.getFrameOutput());t.length>0&&this.#e.update("stdout",t)}};const Xc={one:{},two:{},three:{},four:{}},Yc={one:{},two:{},three:{}},ed={},td=[],$a={methods:Xc,model:Yc,compute:ed,hooks:td};var nd=Object.defineProperty,bu=l((e,t)=>nd(e,"name",{value:t,configurable:!0}),"s$1o");const rd=bu(e=>Object.prototype.toString.call(e)==="[object Array]","isArray"),ad={compute:bu(function(e){const{world:t}=this,n=t.compute;return typeof e=="string"&&n.hasOwnProperty(e)?n[e](this):rd(e)?e.forEach(r=>{t.compute.hasOwnProperty(r)?n[r](this):console.warn("no compute:",e)}):typeof e=="function"?e(this):console.warn("no compute:",e),this},"compute")};var od=Object.defineProperty,qt=l((e,t)=>od(e,"name",{value:t,configurable:!0}),"o$1V");const id=qt(function(e){return this.fullPointer.forEach((t,n)=>{const r=this.update([t]);e(r,n)}),this},"forEach"),sd=qt(function(e,t){const n=this.fullPointer.map((a,o)=>{const i=this.update([a]),s=e(i,o);return s===void 0?this.none():s});if(n.length===0)return t||this.update([]);if(n[0]!==void 0&&(typeof n[0]=="string"||typeof n[0]=="object"&&(n[0]===null||!n[0].isView)))return n;let r=[];return n.forEach(a=>{r=r.concat(a.fullPointer)}),this.toView(r)},"map"),ud=qt(function(e){let t=this.fullPointer;return t=t.filter((n,r)=>{const a=this.update([n]);return e(a,r)}),this.update(t)},"filter"),ld=qt(function(e){const t=this.fullPointer.find((n,r)=>{const a=this.update([n]);return e(a,r)});return this.update([t])},"find"),cd=qt(function(e){return this.fullPointer.some((t,n)=>{const r=this.update([t]);return e(r,n)})},"some"),dd=qt(function(e=1){let t=this.fullPointer,n=Math.floor(Math.random()*t.length);return n+e>this.length&&(n=this.length-e,n=n<0?0:n),t=t.slice(n,n+e),this.update(t)},"random"),hd={forEach:id,map:sd,filter:ud,find:ld,some:cd,random:dd};var pd=Object.defineProperty,Y=l((e,t)=>pd(e,"name",{value:t,configurable:!0}),"r$1p");const Ie={termList:Y(function(){return this.methods.one.termList(this.docs)},"termList"),terms:Y(function(e){const t=this.match(".");return typeof e=="number"?t.eq(e):t},"terms"),groups:Y(function(e){if(e||e===0)return this.update(this._groups[e]||[]);const t={};return Object.keys(this._groups).forEach(n=>{t[n]=this.update(this._groups[n])}),t},"groups"),eq:Y(function(e){let t=this.pointer;return t||(t=this.docs.map((n,r)=>[r])),t[e]?this.update([t[e]]):this.none()},"eq"),first:Y(function(){return this.eq(0)},"first"),last:Y(function(){const e=this.fullPointer.length-1;return this.eq(e)},"last"),firstTerms:Y(function(){return this.match("^.")},"firstTerms"),lastTerms:Y(function(){return this.match(".$")},"lastTerms"),slice:Y(function(e,t){let n=this.pointer||this.docs.map((r,a)=>[a]);return n=n.slice(e,t),this.update(n)},"slice"),all:Y(function(){return this.update().toView()},"all"),fullSentences:Y(function(){const e=this.fullPointer.map(t=>[t[0]]);return this.update(e).toView()},"fullSentences"),none:Y(function(){return this.update([])},"none"),isDoc:Y(function(e){if(!e||!e.isView)return!1;const t=this.fullPointer,n=e.fullPointer;return!t.length===n.length?!1:t.every((r,a)=>n[a]?r[0]===n[a][0]&&r[1]===n[a][1]&&r[2]===n[a][2]:!1)},"isDoc"),wordCount:Y(function(){return this.docs.reduce((e,t)=>(e+=t.filter(n=>n.text!=="").length,e),0)},"wordCount"),isFull:Y(function(){const e=this.pointer;if(!e)return!0;if(e.length===0||e[0][0]!==0)return!1;let t=0,n=0;return this.document.forEach(r=>t+=r.length),this.docs.forEach(r=>n+=r.length),t===n},"isFull"),getNth:Y(function(e){return typeof e=="number"?this.eq(e):typeof e=="string"?this.if(e):this},"getNth")};Ie.group=Ie.groups;Ie.fullSentence=Ie.fullSentences;Ie.sentence=Ie.fullSentences;Ie.lastTerm=Ie.lastTerms;Ie.firstTerm=Ie.firstTerms;const wa=Object.assign({},Ie,ad,hd);wa.get=wa.eq;var fd=Object.defineProperty,gd=l((e,t)=>fd(e,"name",{value:t,configurable:!0}),"l$1p");let yr=class ar{static{l(this,"h")}static{gd(this,"View")}constructor(t,n,r={}){[["document",t],["world",$a],["_groups",r],["_cache",null],["viewType","View"]].forEach(a=>{Object.defineProperty(this,a[0],{value:a[1],writable:!0})}),this.ptrs=n}get docs(){let t=this.document;return this.ptrs&&(t=$a.methods.one.getDoc(this.ptrs,this.document)),t}get pointer(){return this.ptrs}get methods(){return this.world.methods}get model(){return this.world.model}get hooks(){return this.world.hooks}get isView(){return!0}get found(){return this.docs.length>0}get length(){return this.docs.length}get fullPointer(){const{docs:t,ptrs:n,document:r}=this;return(n||t.map((a,o)=>[o])).map(a=>{let[o,i,s,u,c]=a;return i=i||0,s=s||(r[o]||[]).length,r[o]&&r[o][i]&&(u=u||r[o][i].id,r[o][s-1]&&(c=c||r[o][s-1].id)),[o,i,s,u,c]})}update(t){const n=new ar(this.document,t);if(this._cache&&t&&t.length>0){const r=[];t.forEach((a,o)=>{const[i,s,u]=a;a.length===1?r[o]=this._cache[i]:s===0&&this.document[i].length===u&&(r[o]=this._cache[i])}),r.length>0&&(n._cache=r)}return n.world=this.world,n}toView(t){return new ar(this.document,t||this.pointer)}fromText(t){const{methods:n}=this,r=n.one.tokenize.fromString(t,this.world),a=new ar(r);return a.world=this.world,a.compute(["normal","freeze","lexicon"]),this.world.compute.preTagger&&a.compute("preTagger"),a.compute("unfreeze"),a}clone(){let t=this.document.slice(0);t=t.map(r=>r.map(a=>(a=Object.assign({},a),a.tags=new Set(a.tags),a)));const n=this.update(this.pointer);return n.document=t,n._cache=this._cache,n}};Object.assign(yr.prototype,wa);const md="14.15.0";var vd=Object.defineProperty,Rt=l((e,t)=>vd(e,"name",{value:t,configurable:!0}),"a$1R");const Ro=Rt(function(e){return e&&typeof e=="object"&&!Array.isArray(e)},"isObject"),bd=Rt(function(e){return Object.prototype.toString.call(e)==="[object Array]"},"isArray");function no(e,t){if(Ro(t))for(const n in t)Ro(t[n])?(e[n]||Object.assign(e,{[n]:{}}),no(e[n],t[n])):Object.assign(e,{[n]:t[n]});return e}l(no,"c$1M");Rt(no,"mergeDeep");function yu(e,t){for(const n in t)e[n]=e[n]||{},Object.assign(e[n],t[n]);return e}l(yu,"h$1s");Rt(yu,"mergeQuick");const yd=Rt(function(e,t){const n=e.two.models||{};Object.keys(t).forEach(r=>{t[r].pastTense&&(n.toPast&&(n.toPast.ex[r]=t[r].pastTense),n.fromPast&&(n.fromPast.ex[t[r].pastTense]=r)),t[r].presentTense&&(n.toPresent&&(n.toPresent.ex[r]=t[r].presentTense),n.fromPresent&&(n.fromPresent.ex[t[r].presentTense]=r)),t[r].gerund&&(n.toGerund&&(n.toGerund.ex[r]=t[r].gerund),n.fromGerund&&(n.fromGerund.ex[t[r].gerund]=r)),t[r].comparative&&(n.toComparative&&(n.toComparative.ex[r]=t[r].comparative),n.fromComparative&&(n.fromComparative.ex[t[r].comparative]=r)),t[r].superlative&&(n.toSuperlative&&(n.toSuperlative.ex[r]=t[r].superlative),n.fromSuperlative&&(n.fromSuperlative.ex[t[r].superlative]=r))})},"addIrregulars"),$u=Rt(function(e,t,n,r){if(bd(e)){e.forEach(u=>$u(u,t,n,r));return}const{methods:a,model:o,compute:i,hooks:s}=t;e.methods&&yu(a,e.methods),e.model&&no(o,e.model),e.irregulars&&yd(o,e.irregulars),e.compute&&Object.assign(i,e.compute),s&&(t.hooks=s.concat(e.hooks||[])),e.api&&e.api(n),e.lib&&Object.keys(e.lib).forEach(u=>r[u]=e.lib[u]),e.tags&&r.addTags(e.tags),e.words&&r.addWords(e.words),e.frozen&&r.addWords(e.frozen,!0),e.mutate&&e.mutate(t,r)},"extend");var $d=Object.defineProperty,wd=l((e,t)=>$d(e,"name",{value:t,configurable:!0}),"n$13");const Pd=wd(function(e){const t=process.env?process.env:self.env||{};return t.DEBUG_TAGS=e==="tagger"||e===!0?!0:"",t.DEBUG_MATCH=e==="match"||e===!0?!0:"",t.DEBUG_CHUNKS=e==="chunker"||e===!0?!0:"",this},"verbose");var kd=Object.defineProperty,bn=l((e,t)=>kd(e,"name",{value:t,configurable:!0}),"n$12");const jd=bn(e=>Object.prototype.toString.call(e)==="[object Object]","isObject"),Pa=bn(function(e){return Object.prototype.toString.call(e)==="[object Array]"},"isArray"),Ad=bn(function(e){return e.map(t=>t.terms.map(n=>(Pa(n.tags)&&(n.tags=new Set(n.tags)),n)))},"fromJson"),xd=bn(function(e){return e.map(t=>t.map(n=>({text:n,normal:n,pre:"",post:" ",tags:new Set})))},"preTokenized"),wu=bn(function(e,t,n){const{methods:r}=n,a=new t([]);if(a.world=n,typeof e=="number"&&(e=String(e)),!e)return a;if(typeof e=="string"){const o=r.one.tokenize.fromString(e,n);return new t(o)}if(jd(e)&&e.isView)return new t(e.document,e.ptrs);if(Pa(e)){if(Pa(e[0])){const i=xd(e);return new t(i)}const o=Ad(e);return new t(o)}return a},"inputs");var Cd=Object.defineProperty,Nd=l((e,t)=>Cd(e,"name",{value:t,configurable:!0}),"d$T");const dr=Object.assign({},$a),$=Nd(function(e,t){t&&$.addWords(t);const n=wu(e,yr,dr);return e&&n.compute(dr.hooks),n},"nlp");Object.defineProperty($,"_world",{value:dr,writable:!0});$.tokenize=function(e,t){const{compute:n}=this._world;t&&$.addWords(t);const r=wu(e,yr,dr);return n.contractions&&r.compute(["alias","normal","machine","contractions"]),r};$.plugin=function(e){return $u(e,this._world,yr,this),this};$.extend=$.plugin;$.world=function(){return this._world};$.model=function(){return this._world.model};$.methods=function(){return this._world.methods};$.hooks=function(){return this._world.hooks};$.verbose=Pd;$.version=md;var Od=Object.defineProperty,Td=l((e,t)=>Od(e,"name",{value:t,configurable:!0}),"f$1N");const Id=Td(function(e){return e.map(t=>{const n=new Set;return t.forEach(r=>{r.normal!==""&&n.add(r.normal),r.switch&&n.add(`%${r.switch}%`),r.implicit&&n.add(r.implicit),r.machine&&n.add(r.machine),r.root&&n.add(r.root),r.alias&&r.alias.forEach(o=>n.add(o));const a=Array.from(r.tags);for(let o=0;o<a.length;o+=1)n.add("#"+a[o])}),n})},"createCache"),Dd={one:{cacheDoc:Id}};var Ed=Object.defineProperty,ka=l((e,t)=>Ed(e,"name",{value:t,configurable:!0}),"t$P");const Hd={cache:ka(function(){return this._cache=this.methods.one.cacheDoc(this.document),this},"cache"),uncache:ka(function(){return this._cache=null,this},"uncache")},Gd=ka(function(e){Object.assign(e.prototype,Hd)},"addAPI");var Fd=Object.defineProperty,Vd=l((e,t)=>Fd(e,"name",{value:t,configurable:!0}),"e$1g");const zd={cache:Vd(function(e){e._cache=e.methods.one.cacheDoc(e.document)},"cache")},Sd={api:Gd,compute:zd,methods:Dd};var Bd=Object.defineProperty,Fn=l((e,t)=>Bd(e,"name",{value:t,configurable:!0}),"r$1n");const Md={toLowerCase:Fn(function(){return this.termList().forEach(e=>{e.text=e.text.toLowerCase()}),this},"toLowerCase"),toUpperCase:Fn(function(){return this.termList().forEach(e=>{e.text=e.text.toUpperCase()}),this},"toUpperCase"),toTitleCase:Fn(function(){return this.termList().forEach(e=>{e.text=e.text.replace(/^ *[a-z\u00C0-\u00FF]/,t=>t.toUpperCase())}),this},"toTitleCase"),toCamelCase:Fn(function(){return this.docs.forEach(e=>{e.forEach((t,n)=>{n!==0&&(t.text=t.text.replace(/^ *[a-z\u00C0-\u00FF]/,r=>r.toUpperCase())),n!==e.length-1&&(t.post="")})}),this},"toCamelCase")};var Ld=Object.defineProperty,Xe=l((e,t)=>Ld(e,"name",{value:t,configurable:!0}),"a$1P");const Uo=Xe(e=>new RegExp("^\\p{Lu}[\\p{Ll}'’]","u").test(e)||new RegExp("^\\p{Lu}$","u").test(e),"isTitleCase"),Kd=Xe(e=>e.replace(new RegExp("^\\p{Ll}","u"),t=>t.toUpperCase()),"toTitleCase"),Jd=Xe(e=>e.replace(new RegExp("^\\p{Lu}","u"),t=>t.toLowerCase()),"toLowerCase"),Pu=Xe((e,t,n)=>{if(n.forEach(r=>r.dirty=!0),e){const r=[t,0].concat(n);Array.prototype.splice.apply(e,r)}return e},"spliceArr"),sn=Xe(function(e){const t=/ $/,n=/[-–—]/,r=e[e.length-1];r&&!t.test(r.post)&&!n.test(r.post)&&(r.post+=" ")},"endSpace"),Qo=Xe((e,t,n)=>{const r=/[-.?!,;:)–—'"]/g,a=e[t-1];if(!a)return;const o=a.post;if(r.test(o)){const i=o.match(r).join(""),s=n[n.length-1];s.post=i+s.post,a.post=a.post.replace(r,"")}},"movePunct"),Wd=Xe(function(e,t,n){const r=e[t];if(t!==0||!Uo(r.text))return;n[0].text=Kd(n[0].text);const a=e[t];a.tags.has("ProperNoun")||a.tags.has("Acronym")||Uo(a.text)&&a.text.length>1&&(a.text=Jd(a.text))},"moveTitleCase"),qd=Xe(function(e,t,n,r){const[a,o,i]=t;o===0||i===r[a].length?sn(n):(sn(n),sn([e[t[1]]])),Wd(e,o,n),Pu(e,o,n)},"cleanPrepend"),Rd=Xe(function(e,t,n,r){const[a,,o]=t,i=(r[a]||[]).length;o<i?(Qo(e,o,n),sn(n)):i===o&&(sn(e),Qo(e,o,n),r[a+1]&&(n[n.length-1].post+=" ")),Pu(e,t[2],n),t[4]=n[n.length-1].id},"cleanAppend");var Ud=Object.defineProperty,ku=l((e,t)=>Ud(e,"name",{value:t,configurable:!0}),"a$1O");let en=0;const _o=ku(e=>(e=e.length<3?"0"+e:e,e.length<3?"0"+e:e),"pad3"),ju=ku(function(e){let[t,n]=e.index||[0,0];en+=1,en=en>46655?0:en,t=t>46655?0:t,n=n>1294?0:n;let r=_o(en.toString(36));r+=_o(t.toString(36));let a=n.toString(36);a=a.length<2?"0"+a:a,r+=a;const o=parseInt(Math.random()*36,10);return r+=o.toString(36),e.normal+"|"+r.toUpperCase()},"toId");var Qd=Object.defineProperty,Pt=l((e,t)=>Qd(e,"name",{value:t,configurable:!0}),"r$1k");const Zo=Pt(function(e){e.has("@hasContraction")&&typeof e.contractions=="function"&&e.grow("@hasContraction").contractions().expand()},"expand"),Xo=Pt(e=>Object.prototype.toString.call(e)==="[object Array]","isArray"),_d=Pt(function(e){return e=e.map(t=>(t.id=ju(t),t)),e},"addIds"),Zd=Pt(function(e,t){const{methods:n}=t;return typeof e=="string"?n.one.tokenize.fromString(e,t)[0]:typeof e=="object"&&e.isView?e.clone().docs[0]||[]:Xo(e)?Xo(e[0])?e[0]:e:[]},"getTerms"),Yo=Pt(function(e,t,n){const{document:r,world:a}=t;t.uncache();const o=t.fullPointer,i=t.fullPointer;t.forEach((u,c)=>{const d=u.fullPointer[0],[h]=d,p=r[h];let b=Zd(e,a);b.length!==0&&(b=_d(b),n?(Zo(t.update([d]).firstTerm()),qd(p,d,b,r)):(Zo(t.update([d]).lastTerm()),Rd(p,d,b,r)),r[h]&&r[h][d[1]]&&(d[3]=r[h][d[1]].id),i[c]=d,d[2]+=b.length,o[c]=d)});const s=t.toView(o);return t.ptrs=i,s.compute(["id","index","freeze","lexicon"]),s.world.compute.preTagger&&s.compute("preTagger"),s.compute("unfreeze"),s},"insert"),kt={insertAfter:Pt(function(e){return Yo(e,this,!1)},"insertAfter"),insertBefore:Pt(function(e){return Yo(e,this,!0)},"insertBefore")};kt.append=kt.insertAfter;kt.prepend=kt.insertBefore;kt.insert=kt.insertAfter;var Xd=Object.defineProperty,yn=l((e,t)=>Xd(e,"name",{value:t,configurable:!0}),"f$1M");const Yd=/\$[0-9a-z]+/g,ro={},eh=yn(e=>new RegExp("^\\p{Lu}[\\p{Ll}'’]","u").test(e)||new RegExp("^\\p{Lu}$","u").test(e),"isTitleCase"),th=yn(e=>e.replace(new RegExp("^\\p{Ll}","u"),t=>t.toUpperCase()),"toTitleCase"),nh=yn(e=>e.replace(new RegExp("^\\p{Lu}","u"),t=>t.toLowerCase()),"toLowerCase"),rh=yn(function(e,t,n){return e.forEach(r=>{const a=t(r);r.replaceWith(a,n)}),e},"replaceByFn"),ah=yn(function(e,t){if(typeof e!="string")return e;const n=t.groups();return e=e.replace(Yd,r=>{const a=r.replace(/\$/,"");return n.hasOwnProperty(a)?n[a].text():r}),e},"subDollarSign");ro.replaceWith=function(e,t={}){let n=this.fullPointer;const r=this;if(this.uncache(),typeof e=="function")return rh(r,e,t);const a=r.docs[0];if(!a)return r;const o=t.possessives&&a[a.length-1].tags.has("Possessive"),i=t.case&&eh(a[0].text);e=ah(e,r);const s=this.update(n);n=n.map(p=>p.slice(0,3));const u=(s.docs[0]||[]).map(p=>Array.from(p.tags)),c=s.docs[0][0].pre,d=s.docs[0][s.docs[0].length-1].post;if(typeof e=="string"&&(e=this.fromText(e).compute("id")),r.insertAfter(e),s.has("@hasContraction")&&r.contractions&&r.grow("@hasContraction+").contractions().expand(),r.delete(s),o){const p=r.docs[0],b=p[p.length-1];b.tags.has("Possessive")||(b.text+="'s",b.normal+="'s",b.tags.add("Possessive"))}if(c&&r.docs[0]&&(r.docs[0][0].pre=c),d&&r.docs[0]){const p=r.docs[0][r.docs[0].length-1];p.post.trim()||(p.post=d)}const h=r.toView(n).compute(["index","freeze","lexicon"]);if(h.world.compute.preTagger&&h.compute("preTagger"),h.compute("unfreeze"),t.tags&&h.terms().forEach((p,b)=>{p.tagSafe(u[b])}),!h.docs[0]||!h.docs[0][0])return h;if(t.case){const p=i?th:nh;h.docs[0][0].text=p(h.docs[0][0].text)}return h};ro.replace=function(e,t,n){if(e&&!t)return this.replaceWith(e,n);const r=this.match(e);return r.found?(this.soften(),r.replaceWith(t,n)):this};var oh=Object.defineProperty,Au=l((e,t)=>oh(e,"name",{value:t,configurable:!0}),"r$1j");const ih=Au(function(e,t){const n=e.length-1,r=e[n],a=e[n-t];a&&r&&(a.post+=r.post,a.post=a.post.replace(/ +([.?!,;:])/,"$1"),a.post=a.post.replace(/[,;:]+([.?!])/,"$1"))},"repairPunct"),sh=Au(function(e,t){t.forEach(n=>{const[r,a,o]=n,i=o-a;e[r]&&(o===e[r].length&&o>1&&ih(e[r],i),e[r].splice(a,i))});for(let n=e.length-1;n>=0;n-=1)if(e[n].length===0&&(e.splice(n,1),n===e.length&&e[n-1])){const r=e[n-1],a=r[r.length-1];a&&(a.post=a.post.trimEnd())}return e},"pluckOut");var uh=Object.defineProperty,xu=l((e,t)=>uh(e,"name",{value:t,configurable:!0}),"s$1l");const lh=xu(function(e,t){return e=e.map(n=>{const[r]=n;return t[r]&&t[r].forEach(a=>{const o=a[2]-a[1];n[1]<=a[1]&&n[2]>=a[2]&&(n[2]-=o)}),n}),e.forEach((n,r)=>{if(n[1]===0&&n[2]==0)for(let a=r+1;a<e.length;a+=1)e[a][0]-=1,e[a][0]<0&&(e[a][0]=0)}),e=e.filter(n=>n[2]-n[1]>0),e=e.map(n=>(n[3]=null,n[4]=null,n)),e},"fixPointers"),ja={remove:xu(function(e){const{indexN:t}=this.methods.one.pointer;this.uncache();let n=this.all(),r=this;e&&(n=this,r=this.match(e));const a=!n.ptrs;r.has("@hasContraction")&&r.contractions&&r.grow("@hasContraction").contractions().expand();let o=n.fullPointer;const i=r.fullPointer.reverse(),s=sh(this.document,i),u=t(i);return o=lh(o,u),n.ptrs=o,n.document=s,n.compute("index"),a&&(n.ptrs=void 0),e?n.toView(o):(this.ptrs=[],n.none())},"remove")};ja.delete=ja.remove;var ch=Object.defineProperty,pt=l((e,t)=>ch(e,"name",{value:t,configurable:!0}),"e$1c");const dn={pre:pt(function(e,t){return e===void 0&&this.found?this.docs[0][0].pre:(this.docs.forEach(n=>{const r=n[0];t===!0?r.pre+=e:r.pre=e}),this)},"pre"),post:pt(function(e,t){if(e===void 0){const n=this.docs[this.docs.length-1];return n[n.length-1].post}return this.docs.forEach(n=>{const r=n[n.length-1];t===!0?r.post+=e:r.post=e}),this},"post"),trim:pt(function(){if(!this.found)return this;const e=this.docs,t=e[0][0];t.pre=t.pre.trimStart();const n=e[e.length-1],r=n[n.length-1];return r.post=r.post.trimEnd(),this},"trim"),hyphenate:pt(function(){return this.docs.forEach(e=>{e.forEach((t,n)=>{n!==0&&(t.pre=""),e[n+1]&&(t.post="-")})}),this},"hyphenate"),dehyphenate:pt(function(){const e=/[-–—]/;return this.docs.forEach(t=>{t.forEach(n=>{e.test(n.post)&&(n.post=" ")})}),this},"dehyphenate"),toQuotations:pt(function(e,t){return e=e||'"',t=t||'"',this.docs.forEach(n=>{n[0].pre=e+n[0].pre;const r=n[n.length-1];r.post=t+r.post}),this},"toQuotations"),toParentheses:pt(function(e,t){return e=e||"(",t=t||")",this.docs.forEach(n=>{n[0].pre=e+n[0].pre;const r=n[n.length-1];r.post=t+r.post}),this},"toParentheses")};dn.deHyphenate=dn.dehyphenate;dn.toQuotation=dn.toQuotations;var dh=Object.defineProperty,$n=l((e,t)=>dh(e,"name",{value:t,configurable:!0}),"o$1M");const hh=$n((e,t)=>e.normal<t.normal?-1:e.normal>t.normal?1:0,"alpha"),ph=$n((e,t)=>{const n=e.normal.trim().length,r=t.normal.trim().length;return n<r?1:n>r?-1:0},"length"),fh=$n((e,t)=>e.words<t.words?1:e.words>t.words?-1:0,"wordCount"),gh=$n((e,t)=>e[0]<t[0]?1:e[0]>t[0]?-1:e[1]>t[1]?1:-1,"sequential"),mh=$n(function(e){const t={};return e.forEach(n=>{t[n.normal]=t[n.normal]||0,t[n.normal]+=1}),e.sort((n,r)=>{const a=t[n.normal],o=t[r.normal];return a<o?1:a>o?-1:0}),e},"byFreq"),Zr={alpha:hh,length:ph,wordCount:fh,sequential:gh,byFreq:mh};var vh=Object.defineProperty,$r=l((e,t)=>vh(e,"name",{value:t,configurable:!0}),"a$1L");const bh=new Set(["index","sequence","seq","sequential","chron","chronological"]),yh=new Set(["freq","frequency","topk","repeats"]),$h=new Set(["alpha","alphabetical"]),wh=$r(function(e,t){let n=e.fullPointer;return n=n.sort((r,a)=>(r=e.update([r]),a=e.update([a]),t(r,a))),e.ptrs=n,e},"customSort"),Ph=$r(function(e){const{docs:t,pointer:n}=this;if(this.uncache(),typeof e=="function")return wh(this,e);e=e||"alpha";const r=n||t.map((o,i)=>[i]);let a=t.map((o,i)=>({index:i,words:o.length,normal:o.map(s=>s.machine||s.normal||"").join(" "),pointer:r[i]}));return bh.has(e)&&(e="sequential"),$h.has(e)&&(e="alpha"),yh.has(e)?(a=Zr.byFreq(a),this.update(a.map(o=>o.pointer))):typeof Zr[e]=="function"?(a=a.sort(Zr[e]),this.update(a.map(o=>o.pointer))):this},"sort"),kh=$r(function(){let e=this.pointer||this.docs.map((t,n)=>[n]);return e=[].concat(e),e=e.reverse(),this._cache&&(this._cache=this._cache.reverse()),this.update(e)},"reverse"),jh=$r(function(){const e=new Set;return this.filter(t=>{const n=t.text("machine");return e.has(n)?!1:(e.add(n),!0)})},"unique"),Ah={unique:jh,reverse:kh,sort:Ph};var xh=Object.defineProperty,wr=l((e,t)=>xh(e,"name",{value:t,configurable:!0}),"o$1L");const Ch=wr(e=>Object.prototype.toString.call(e)==="[object Array]","isArray"),Cu=wr(function(e,t){if(e.length>0){const n=e[e.length-1],r=n[n.length-1];/ /.test(r.post)===!1&&(r.post+=" ")}return e=e.concat(t),e},"combineDocs"),Nh=wr(function(e,t){if(e.document===t.document){const n=e.fullPointer.concat(t.fullPointer);return e.toView(n).compute("index")}return t.fullPointer.forEach(n=>{n[0]+=e.document.length}),e.document=Cu(e.document,t.docs),e.all()},"combineViews"),Oh={concat:wr(function(e){if(typeof e=="string"){const t=this.fromText(e);if(!this.found||!this.ptrs)this.document=this.document.concat(t.document);else{const n=this.fullPointer,r=n[n.length-1][0];this.document.splice(r,0,...t.document)}return this.all().compute("index")}if(typeof e=="object"&&e.isView)return Nh(this,e);if(Ch(e)){const t=Cu(this.document,e);return this.document=t,this.all()}return this},"concat")};var Th=Object.defineProperty,Nu=l((e,t)=>Th(e,"name",{value:t,configurable:!0}),"n$$");const Ih=Nu(function(){return this.ptrs=this.fullPointer,this},"harden"),Dh=Nu(function(){let e=this.ptrs;return!e||e.length<1?this:(e=e.map(t=>t.slice(0,3)),this.ptrs=e,this)},"soften"),Eh={harden:Ih,soften:Dh};var Hh=Object.defineProperty,Gh=l((e,t)=>Hh(e,"name",{value:t,configurable:!0}),"r$1g");const Fh=Object.assign({},Md,kt,ro,ja,dn,Ah,Oh,Eh),Vh=Gh(function(e){Object.assign(e.prototype,Fh)},"addAPI");var zh=Object.defineProperty,Sh=l((e,t)=>zh(e,"name",{value:t,configurable:!0}),"d$P");const Bh={id:Sh(function(e){const t=e.docs;for(let n=0;n<t.length;n+=1)for(let r=0;r<t[n].length;r+=1){const a=t[n][r];a.id=a.id||ju(a)}},"id")},Mh={api:Vh,compute:Bh},Lh=[{word:"@",out:["at"]},{word:"arent",out:["are","not"]},{word:"alot",out:["a","lot"]},{word:"brb",out:["be","right","back"]},{word:"cannot",out:["can","not"]},{word:"dun",out:["do","not"]},{word:"can't",out:["can","not"]},{word:"shan't",out:["should","not"]},{word:"won't",out:["will","not"]},{word:"that's",out:["that","is"]},{word:"what's",out:["what","is"]},{word:"let's",out:["let","us"]},{word:"dunno",out:["do","not","know"]},{word:"gonna",out:["going","to"]},{word:"gotta",out:["have","got","to"]},{word:"gimme",out:["give","me"]},{word:"outta",out:["out","of"]},{word:"tryna",out:["trying","to"]},{word:"gtg",out:["got","to","go"]},{word:"im",out:["i","am"]},{word:"imma",out:["I","will"]},{word:"imo",out:["in","my","opinion"]},{word:"irl",out:["in","real","life"]},{word:"ive",out:["i","have"]},{word:"rn",out:["right","now"]},{word:"tbh",out:["to","be","honest"]},{word:"wanna",out:["want","to"]},{word:"c'mere",out:["come","here"]},{word:"c'mon",out:["come","on"]},{word:"shoulda",out:["should","have"]},{word:"coulda",out:["coulda","have"]},{word:"woulda",out:["woulda","have"]},{word:"musta",out:["must","have"]},{word:"tis",out:["it","is"]},{word:"twas",out:["it","was"]},{word:"y'know",out:["you","know"]},{word:"ne'er",out:["never"]},{word:"o'er",out:["over"]},{after:"ll",out:["will"]},{after:"ve",out:["have"]},{after:"re",out:["are"]},{after:"m",out:["am"]},{before:"c",out:["ce"]},{before:"m",out:["me"]},{before:"n",out:["ne"]},{before:"qu",out:["que"]},{before:"s",out:["se"]},{before:"t",out:["tu"]},{word:"shouldnt",out:["should","not"]},{word:"couldnt",out:["could","not"]},{word:"wouldnt",out:["would","not"]},{word:"hasnt",out:["has","not"]},{word:"wasnt",out:["was","not"]},{word:"isnt",out:["is","not"]},{word:"cant",out:["can","not"]},{word:"dont",out:["do","not"]},{word:"wont",out:["will","not"]},{word:"howd",out:["how","did"]},{word:"whatd",out:["what","did"]},{word:"whend",out:["when","did"]},{word:"whered",out:["where","did"]}],Kh={st:!0,nd:!0,rd:!0,th:!0,am:!0,pm:!0,max:!0,"°":!0,s:!0,e:!0,er:!0,ère:!0,ème:!0},Jh={one:{contractions:Lh,numberSuffixes:Kh}};var Wh=Object.defineProperty,qh=l((e,t)=>Wh(e,"name",{value:t,configurable:!0}),"a$1J");const Xr=qh(function(e,t,n){const[r,a]=t;!n||n.length===0||(n=n.map((o,i)=>(o.implicit=o.text,o.machine=o.text,o.pre="",o.post="",o.text="",o.normal="",o.index=[r,a+i],o)),n[0]&&(n[0].pre=e[r][a].pre,n[n.length-1].post=e[r][a].post,n[0].text=e[r][a].text,n[0].normal=e[r][a].normal),e[r].splice(a,1,...n))},"insertContraction");var Rh=Object.defineProperty,Uh=l((e,t)=>Rh(e,"name",{value:t,configurable:!0}),"t$M");const Qh=/'/,_h=new Set(["what","how","when","where","why"]),Zh=new Set(["be","go","start","think","need"]),Xh=new Set(["been","gone"]),Yh=Uh(function(e,t){const n=e[t].normal.split(Qh)[0];if(_h.has(n))return[n,"did"];if(e[t+1]){if(Xh.has(e[t+1].normal))return[n,"had"];if(Zh.has(e[t+1].normal))return[n,"would"]}return null},"_apostropheD");var ep=Object.defineProperty,tp=l((e,t)=>ep(e,"name",{value:t,configurable:!0}),"r$1d");const np=tp(function(e,t){return e[t].normal==="ain't"||e[t].normal==="aint"?null:[e[t].normal.replace(/n't/,""),"not"]},"apostropheT");var rp=Object.defineProperty,ao=l((e,t)=>rp(e,"name",{value:t,configurable:!0}),"s$1h");const oo=/'/,ap=/(e|é|aison|sion|tion)$/,op=/(age|isme|acle|ege|oire)$/,ip=ao((e,t)=>{const n=e[t].normal.split(oo)[1];return n&&n.endsWith("e")?["la",n]:["le",n]},"preL"),sp=ao((e,t)=>{const n=e[t].normal.split(oo)[1];return n&&ap.test(n)&&!op.test(n)?["du",n]:n&&n.endsWith("s")?["des",n]:["de",n]},"preD"),up=ao((e,t)=>["je",e[t].normal.split(oo)[1]],"preJ"),Yr={preJ:up,preL:ip,preD:sp};var lp=Object.defineProperty,cp=l((e,t)=>lp(e,"name",{value:t,configurable:!0}),"u$1F");const dp=/^([0-9.]{1,4}[a-z]{0,2}) ?[-–—] ?([0-9]{1,4}[a-z]{0,2})$/i,hp=/^([0-9]{1,2}(:[0-9][0-9])?(am|pm)?) ?[-–—] ?([0-9]{1,2}(:[0-9][0-9])?(am|pm)?)$/i,pp=/^[0-9]{3}-[0-9]{4}$/,fp=cp(function(e,t){const n=e[t];let r=n.text.match(dp);return r!==null?n.tags.has("PhoneNumber")===!0||pp.test(n.text)?null:[r[1],"to",r[2]]:(r=n.text.match(hp),r!==null?[r[1],"to",r[4]]:null)},"numberRange");var gp=Object.defineProperty,mp=l((e,t)=>gp(e,"name",{value:t,configurable:!0}),"o$1G");const vp=/^([+-]?[0-9][.,0-9]*)([a-z°²³µ/]+)$/,bp=mp(function(e,t,n){const r=n.model.one.numberSuffixes||{},a=e[t].text.match(vp);if(a!==null){const o=a[2].toLowerCase().trim();return r.hasOwnProperty(o)?null:[a[1],o]}return null},"numberUnit");var yp=Object.defineProperty,Ge=l((e,t)=>yp(e,"name",{value:t,configurable:!0}),"i$1K");const ei=/'/,$p=/^[0-9][^-–—]*[-–—].*?[0-9]/,ti=Ge(function(e,t,n,r){const a=t.update();a.document=[e];let o=n+r;n>0&&(n-=1),e[o]&&(o+=1),a.ptrs=[[0,n,o]]},"reTag"),ni={t:Ge((e,t)=>np(e,t),"t"),d:Ge((e,t)=>Yh(e,t),"d")},ri={j:Ge((e,t)=>Yr.preJ(e,t),"j"),l:Ge((e,t)=>Yr.preL(e,t),"l"),d:Ge((e,t)=>Yr.preD(e,t),"d")},wp=Ge(function(e,t,n,r){for(let a=0;a<e.length;a+=1){const o=e[a];if(o.word===t.normal)return o.out;if(r!==null&&r===o.after)return[n].concat(o.out);if(n!==null&&n===o.before&&r&&r.length>2)return o.out.concat(r)}return null},"knownOnes"),ea=Ge(function(e,t){const n=t.fromText(e.join(" "));return n.compute(["id","alias"]),n.docs[0]},"toDocs"),Pp=Ge(function(e,t){for(let n=t+1;n<5&&e[n];n+=1)if(e[n].normal==="been")return["there","has"];return["there","is"]},"thereHas"),kp=Ge(e=>{const{world:t,document:n}=e,{model:r,methods:a}=t,o=r.one.contractions||[];n.forEach((i,s)=>{for(let u=i.length-1;u>=0;u-=1){let c=null,d=null;if(ei.test(i[u].normal)===!0){const p=i[u].normal.split(ei);c=p[0],d=p[1]}let h=wp(o,i[u],c,d);if(!h&&ni.hasOwnProperty(d)&&(h=ni[d](i,u,t)),!h&&ri.hasOwnProperty(c)&&(h=ri[c](i,u)),c==="there"&&d==="s"&&(h=Pp(i,u)),h){h=ea(h,e),Xr(n,[s,u],h),ti(n[s],e,u,h.length);continue}if($p.test(i[u].normal)){h=fp(i,u),h&&(h=ea(h,e),Xr(n,[s,u],h),a.one.setTag(h,"NumberRange",t),h[2]&&h[2].tags.has("Time")&&a.one.setTag([h[0]],"Time",t,null,"time-range"),ti(n[s],e,u,h.length));continue}h=bp(i,u,t),h&&(h=ea(h,e),Xr(n,[s,u],h),a.one.setTag([h[1]],"Unit",t,null,"contraction-unit"))}})},"contractions"),jp={contractions:kp},Ap={model:Jh,compute:jp,hooks:["contractions"]};var xp=Object.defineProperty,Ou=l((e,t)=>xp(e,"name",{value:t,configurable:!0}),"i$1J");const ai=Ou(function(e){const t=e.world,{model:n,methods:r}=e.world,a=r.one.setTag,{frozenLex:o}=n.one,i=n.one._multiCache||{};e.docs.forEach(s=>{for(let u=0;u<s.length;u+=1){const c=s[u],d=c.machine||c.normal;if(i[d]!==void 0&&s[u+1]){const h=u+i[d]-1;for(let p=h;p>u;p-=1){const b=s.slice(u,p+1),x=b.map(G=>G.machine||G.normal).join(" ");if(o.hasOwnProperty(x)===!0){a(b,o[x],t,!1,"1-frozen-multi-lexicon"),b.forEach(G=>G.frozen=!0);continue}}}if(o[d]!==void 0&&o.hasOwnProperty(d)){a([c],o[d],t,!1,"1-freeze-lexicon"),c.frozen=!0;continue}}})},"freeze"),Cp=Ou(function(e){return e.docs.forEach(t=>{t.forEach(n=>{delete n.frozen})}),e},"unfreeze"),Np={frozen:ai,freeze:ai,unfreeze:Cp};var Op=Object.defineProperty,io=l((e,t)=>Op(e,"name",{value:t,configurable:!0}),"t$J");const oi=io(e=>"\x1B[34m"+e+"\x1B[0m","blue"),ii=io(e=>"\x1B[3m\x1B[2m"+e+"\x1B[0m","dim"),si=io(function(e){e.docs.forEach(t=>{console.log(oi(`
|
|
1
|
+
var Tc=Object.defineProperty;var l=(e,t)=>Tc(e,"name",{value:t,configurable:!0});import{createRequire as Ic}from"node:module";import{E as _e,q as Ec,e as vr,T as Hc,I as pu}from"../packem_shared/Table-3pFgIUZ2-DABgc6rj.js";import{a as Jt,z as Xa,l as Ya,B as Gc,C as Lt,M as cn}from"../packem_shared/readFileSync-DseCu8sg-DEq4Fn3a.js";import{fingerprint as zt,listRules as fu,listRequiredValidators as Fc,scan as gu,scanFiles as Vc,inspectRuleset as zc}from"@visulima/secret-scanner";import{c4 as Sc,c5 as qo,p as Pe}from"./bin.js";import{$ as _r}from"../packem_shared/spinners-f91Rbo99-Bjf3NcO0.js";import{s as Mc,E as Lc}from"./config.js";const Dc=Ic(import.meta.url),Xt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Za=l(e=>{if(typeof Xt<"u"&&Xt.versions&&Xt.versions.node){const[t,n]=Xt.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Xt.getBuiltinModule(e)}return Dc(e)},"__cjs_getBuiltinModule"),{createRequire:Bc}=Za("node:module"),{pathToFileURL:mu}=Za("node:url"),{execFileSync:Kc}=Za("node:child_process");var Jc=Object.defineProperty,eo=l((e,t)=>Jc(e,"name",{value:t,configurable:!0}),"n$17"),Wc=Object.defineProperty,br=eo((e,t)=>Wc(e,"name",{value:t,configurable:!0}),"h");const qc=Bc(import.meta.url),Yt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Rc=br(e=>{if(typeof Yt<"u"&&Yt.versions&&Yt.versions.node){const[t,n]=Yt.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Yt.getBuiltinModule(e)}return qc(e)},"__cjs_getBuiltinModule"),{styleText:Uc}=Rc("node:util");var Qc=Object.defineProperty,to=br((e,t)=>Qc(e,"name",{value:t,configurable:!0}),"r");const _c={error:"✖",info:"ℹ",success:"✓",warning:"⚠"},Zc=to(e=>{const t=[];return e.bold&&t.push("bold"),e.dim&&t.push("dim"),e.italic&&t.push("italic"),e.underline&&t.push("underline"),e.strikethrough&&t.push("strikethrough"),e.color&&t.push(e.color),e.bgColor&&t.push(e.bgColor),t.length===0?n=>n:n=>Uc(t,n)},"resolveStyleToFunction");let vu=class{static{l(this,"a")}static{eo(this,"m")}static{br(this,"Spinner")}static{to(this,"Spinner")}#t=0;#o;#e=!1;#r="";#i="";#f=0;#d=0;#a;#n;#h="";#l;#p;#s;#g;constructor(t={},n){this.#l=t.name??"dots",this.#p=t.verbose!==!1,this.#r=t.prefixText??"",this.#a=n,this.#g={..._c,...t.icons},typeof t.style=="function"?this.#s=t.style:t.style&&(this.#s=Zc(t.style))}get elapsedTime(){return(this.#d||Date.now())-this.#f}get text(){return this.#i}get getText(){return this.#i}set text(t){this.#i=t,this.#e&&(this.#n?this.#n.renderAll():this.#a&&this.#u())}get prefixText(){return this.#r}get getPrefixText(){return this.#r}set prefixText(t){this.#r=t,this.#e&&(this.#n?this.#n.renderAll():this.#a&&this.#u())}get isRunning(){return this.#e}setInteractiveManager(t){this.#a=t}setMultiSpinner(t){this.#n=t}start(t,n){if(this.#e)return this;if(!this.#p)return this;this.#e=!0,this.#f=Date.now(),this.#d=0,this.#t=0,t&&(this.#i=t),n?.prefixText&&(this.#r=n.prefixText);const r=this.#n??this.#a;r&&(this.#n?r.renderAll():(r.hook(),this.#u()));const a=_r(this.#l);return this.#o=setInterval(()=>{this.#e&&(this.#t=(this.#t+1)%a.frames.length,this.#n?this.#n.renderAll():this.#a&&this.#u())},a.interval),this}succeed(t){this.#c("success",t)}failed(t){this.#c("error",t)}warn(t){this.#c("warning",t)}info(t){this.#c("info",t)}pause(){this.#o&&(clearInterval(this.#o),this.#o=void 0)}resume(){if(!this.#e)return;this.#o&&clearInterval(this.#o);const t=_r(this.#l);this.#o=setInterval(()=>{this.#e&&(this.#t=(this.#t+1)%t.frames.length,this.#n?this.#n.renderAll():this.#a&&this.#u())},t.interval)}getFrameOutput(){if(!this.#e&&this.#h)return this.#h;const t=_r(this.#l).frames[this.#t];let n=this.#s?this.#s(t):t;return this.#r&&(n=`${this.#r} ${n}`),this.#i&&(n=`${n} ${this.#i}`),n}#u(){this.#a&&this.#a.update("stdout",[this.getFrameOutput()])}#c(t,n){if(!this.#e||(this.#o&&(clearInterval(this.#o),this.#o=void 0),this.#e=!1,this.#d=Date.now(),!this.#p))return;let r="";const a=this.#g[t];a&&(r=this.#s?this.#s(a):a),this.#r&&(r=`${this.#r} ${r}`),n&&(r=`${r} ${n}`),this.#h=r,(this.#n??this.#a)&&(this.#n?this.#n.renderAll():this.#a&&(this.#a.update("stdout",[r]),this.#a.unhook(!1)))}},DN=class{static{l(this,"T")}static{eo(this,"b")}static{br(this,"MultiSpinner")}static{to(this,"MultiSpinner")}#t=new Map;#o=0;#e;#r=!1;#i;constructor(t={},n){this.#i=t,this.#e=n}setInteractiveManager(t){this.#e=t}create(t,n={}){const r=`spinner_${String(this.#o++)}`,a=new vu({...this.#i,...n});return a.setMultiSpinner(this),this.#t.set(r,a),t&&(a.text=t),a}remove(t){for(const[n,r]of this.#t.entries())if(r===t)return this.#t.delete(n),this.renderAll(),!0;return!1}stop(){for(const t of this.#t.values())t.succeed();this.#t.clear(),this.#r=!1,this.#e&&this.#e.unhook(!1)}clear(){for(const t of this.#t.values())t.succeed();this.#t.clear()}renderAll(){if(!this.#e)return;this.#r||(this.#r=!0,this.#e.hook());const t=[];for(const n of this.#t.values())t.push(n.getFrameOutput());t.length>0&&this.#e.update("stdout",t)}};const Xc={one:{},two:{},three:{},four:{}},Yc={one:{},two:{},three:{}},ed={},td=[],$a={methods:Xc,model:Yc,compute:ed,hooks:td};var nd=Object.defineProperty,bu=l((e,t)=>nd(e,"name",{value:t,configurable:!0}),"s$1o");const rd=bu(e=>Object.prototype.toString.call(e)==="[object Array]","isArray"),ad={compute:bu(function(e){const{world:t}=this,n=t.compute;return typeof e=="string"&&n.hasOwnProperty(e)?n[e](this):rd(e)?e.forEach(r=>{t.compute.hasOwnProperty(r)?n[r](this):console.warn("no compute:",e)}):typeof e=="function"?e(this):console.warn("no compute:",e),this},"compute")};var od=Object.defineProperty,qt=l((e,t)=>od(e,"name",{value:t,configurable:!0}),"o$1V");const id=qt(function(e){return this.fullPointer.forEach((t,n)=>{const r=this.update([t]);e(r,n)}),this},"forEach"),sd=qt(function(e,t){const n=this.fullPointer.map((a,o)=>{const i=this.update([a]),s=e(i,o);return s===void 0?this.none():s});if(n.length===0)return t||this.update([]);if(n[0]!==void 0&&(typeof n[0]=="string"||typeof n[0]=="object"&&(n[0]===null||!n[0].isView)))return n;let r=[];return n.forEach(a=>{r=r.concat(a.fullPointer)}),this.toView(r)},"map"),ud=qt(function(e){let t=this.fullPointer;return t=t.filter((n,r)=>{const a=this.update([n]);return e(a,r)}),this.update(t)},"filter"),ld=qt(function(e){const t=this.fullPointer.find((n,r)=>{const a=this.update([n]);return e(a,r)});return this.update([t])},"find"),cd=qt(function(e){return this.fullPointer.some((t,n)=>{const r=this.update([t]);return e(r,n)})},"some"),dd=qt(function(e=1){let t=this.fullPointer,n=Math.floor(Math.random()*t.length);return n+e>this.length&&(n=this.length-e,n=n<0?0:n),t=t.slice(n,n+e),this.update(t)},"random"),hd={forEach:id,map:sd,filter:ud,find:ld,some:cd,random:dd};var pd=Object.defineProperty,Y=l((e,t)=>pd(e,"name",{value:t,configurable:!0}),"r$1p");const Ie={termList:Y(function(){return this.methods.one.termList(this.docs)},"termList"),terms:Y(function(e){const t=this.match(".");return typeof e=="number"?t.eq(e):t},"terms"),groups:Y(function(e){if(e||e===0)return this.update(this._groups[e]||[]);const t={};return Object.keys(this._groups).forEach(n=>{t[n]=this.update(this._groups[n])}),t},"groups"),eq:Y(function(e){let t=this.pointer;return t||(t=this.docs.map((n,r)=>[r])),t[e]?this.update([t[e]]):this.none()},"eq"),first:Y(function(){return this.eq(0)},"first"),last:Y(function(){const e=this.fullPointer.length-1;return this.eq(e)},"last"),firstTerms:Y(function(){return this.match("^.")},"firstTerms"),lastTerms:Y(function(){return this.match(".$")},"lastTerms"),slice:Y(function(e,t){let n=this.pointer||this.docs.map((r,a)=>[a]);return n=n.slice(e,t),this.update(n)},"slice"),all:Y(function(){return this.update().toView()},"all"),fullSentences:Y(function(){const e=this.fullPointer.map(t=>[t[0]]);return this.update(e).toView()},"fullSentences"),none:Y(function(){return this.update([])},"none"),isDoc:Y(function(e){if(!e||!e.isView)return!1;const t=this.fullPointer,n=e.fullPointer;return!t.length===n.length?!1:t.every((r,a)=>n[a]?r[0]===n[a][0]&&r[1]===n[a][1]&&r[2]===n[a][2]:!1)},"isDoc"),wordCount:Y(function(){return this.docs.reduce((e,t)=>(e+=t.filter(n=>n.text!=="").length,e),0)},"wordCount"),isFull:Y(function(){const e=this.pointer;if(!e)return!0;if(e.length===0||e[0][0]!==0)return!1;let t=0,n=0;return this.document.forEach(r=>t+=r.length),this.docs.forEach(r=>n+=r.length),t===n},"isFull"),getNth:Y(function(e){return typeof e=="number"?this.eq(e):typeof e=="string"?this.if(e):this},"getNth")};Ie.group=Ie.groups;Ie.fullSentence=Ie.fullSentences;Ie.sentence=Ie.fullSentences;Ie.lastTerm=Ie.lastTerms;Ie.firstTerm=Ie.firstTerms;const wa=Object.assign({},Ie,ad,hd);wa.get=wa.eq;var fd=Object.defineProperty,gd=l((e,t)=>fd(e,"name",{value:t,configurable:!0}),"l$1p");let yr=class ar{static{l(this,"h")}static{gd(this,"View")}constructor(t,n,r={}){[["document",t],["world",$a],["_groups",r],["_cache",null],["viewType","View"]].forEach(a=>{Object.defineProperty(this,a[0],{value:a[1],writable:!0})}),this.ptrs=n}get docs(){let t=this.document;return this.ptrs&&(t=$a.methods.one.getDoc(this.ptrs,this.document)),t}get pointer(){return this.ptrs}get methods(){return this.world.methods}get model(){return this.world.model}get hooks(){return this.world.hooks}get isView(){return!0}get found(){return this.docs.length>0}get length(){return this.docs.length}get fullPointer(){const{docs:t,ptrs:n,document:r}=this;return(n||t.map((a,o)=>[o])).map(a=>{let[o,i,s,u,c]=a;return i=i||0,s=s||(r[o]||[]).length,r[o]&&r[o][i]&&(u=u||r[o][i].id,r[o][s-1]&&(c=c||r[o][s-1].id)),[o,i,s,u,c]})}update(t){const n=new ar(this.document,t);if(this._cache&&t&&t.length>0){const r=[];t.forEach((a,o)=>{const[i,s,u]=a;a.length===1?r[o]=this._cache[i]:s===0&&this.document[i].length===u&&(r[o]=this._cache[i])}),r.length>0&&(n._cache=r)}return n.world=this.world,n}toView(t){return new ar(this.document,t||this.pointer)}fromText(t){const{methods:n}=this,r=n.one.tokenize.fromString(t,this.world),a=new ar(r);return a.world=this.world,a.compute(["normal","freeze","lexicon"]),this.world.compute.preTagger&&a.compute("preTagger"),a.compute("unfreeze"),a}clone(){let t=this.document.slice(0);t=t.map(r=>r.map(a=>(a=Object.assign({},a),a.tags=new Set(a.tags),a)));const n=this.update(this.pointer);return n.document=t,n._cache=this._cache,n}};Object.assign(yr.prototype,wa);const md="14.15.0";var vd=Object.defineProperty,Rt=l((e,t)=>vd(e,"name",{value:t,configurable:!0}),"a$1R");const Ro=Rt(function(e){return e&&typeof e=="object"&&!Array.isArray(e)},"isObject"),bd=Rt(function(e){return Object.prototype.toString.call(e)==="[object Array]"},"isArray");function no(e,t){if(Ro(t))for(const n in t)Ro(t[n])?(e[n]||Object.assign(e,{[n]:{}}),no(e[n],t[n])):Object.assign(e,{[n]:t[n]});return e}l(no,"c$1M");Rt(no,"mergeDeep");function yu(e,t){for(const n in t)e[n]=e[n]||{},Object.assign(e[n],t[n]);return e}l(yu,"h$1s");Rt(yu,"mergeQuick");const yd=Rt(function(e,t){const n=e.two.models||{};Object.keys(t).forEach(r=>{t[r].pastTense&&(n.toPast&&(n.toPast.ex[r]=t[r].pastTense),n.fromPast&&(n.fromPast.ex[t[r].pastTense]=r)),t[r].presentTense&&(n.toPresent&&(n.toPresent.ex[r]=t[r].presentTense),n.fromPresent&&(n.fromPresent.ex[t[r].presentTense]=r)),t[r].gerund&&(n.toGerund&&(n.toGerund.ex[r]=t[r].gerund),n.fromGerund&&(n.fromGerund.ex[t[r].gerund]=r)),t[r].comparative&&(n.toComparative&&(n.toComparative.ex[r]=t[r].comparative),n.fromComparative&&(n.fromComparative.ex[t[r].comparative]=r)),t[r].superlative&&(n.toSuperlative&&(n.toSuperlative.ex[r]=t[r].superlative),n.fromSuperlative&&(n.fromSuperlative.ex[t[r].superlative]=r))})},"addIrregulars"),$u=Rt(function(e,t,n,r){if(bd(e)){e.forEach(u=>$u(u,t,n,r));return}const{methods:a,model:o,compute:i,hooks:s}=t;e.methods&&yu(a,e.methods),e.model&&no(o,e.model),e.irregulars&&yd(o,e.irregulars),e.compute&&Object.assign(i,e.compute),s&&(t.hooks=s.concat(e.hooks||[])),e.api&&e.api(n),e.lib&&Object.keys(e.lib).forEach(u=>r[u]=e.lib[u]),e.tags&&r.addTags(e.tags),e.words&&r.addWords(e.words),e.frozen&&r.addWords(e.frozen,!0),e.mutate&&e.mutate(t,r)},"extend");var $d=Object.defineProperty,wd=l((e,t)=>$d(e,"name",{value:t,configurable:!0}),"n$13");const Pd=wd(function(e){const t=process.env?process.env:self.env||{};return t.DEBUG_TAGS=e==="tagger"||e===!0?!0:"",t.DEBUG_MATCH=e==="match"||e===!0?!0:"",t.DEBUG_CHUNKS=e==="chunker"||e===!0?!0:"",this},"verbose");var kd=Object.defineProperty,bn=l((e,t)=>kd(e,"name",{value:t,configurable:!0}),"n$12");const jd=bn(e=>Object.prototype.toString.call(e)==="[object Object]","isObject"),Pa=bn(function(e){return Object.prototype.toString.call(e)==="[object Array]"},"isArray"),Ad=bn(function(e){return e.map(t=>t.terms.map(n=>(Pa(n.tags)&&(n.tags=new Set(n.tags)),n)))},"fromJson"),xd=bn(function(e){return e.map(t=>t.map(n=>({text:n,normal:n,pre:"",post:" ",tags:new Set})))},"preTokenized"),wu=bn(function(e,t,n){const{methods:r}=n,a=new t([]);if(a.world=n,typeof e=="number"&&(e=String(e)),!e)return a;if(typeof e=="string"){const o=r.one.tokenize.fromString(e,n);return new t(o)}if(jd(e)&&e.isView)return new t(e.document,e.ptrs);if(Pa(e)){if(Pa(e[0])){const i=xd(e);return new t(i)}const o=Ad(e);return new t(o)}return a},"inputs");var Cd=Object.defineProperty,Nd=l((e,t)=>Cd(e,"name",{value:t,configurable:!0}),"d$T");const dr=Object.assign({},$a),$=Nd(function(e,t){t&&$.addWords(t);const n=wu(e,yr,dr);return e&&n.compute(dr.hooks),n},"nlp");Object.defineProperty($,"_world",{value:dr,writable:!0});$.tokenize=function(e,t){const{compute:n}=this._world;t&&$.addWords(t);const r=wu(e,yr,dr);return n.contractions&&r.compute(["alias","normal","machine","contractions"]),r};$.plugin=function(e){return $u(e,this._world,yr,this),this};$.extend=$.plugin;$.world=function(){return this._world};$.model=function(){return this._world.model};$.methods=function(){return this._world.methods};$.hooks=function(){return this._world.hooks};$.verbose=Pd;$.version=md;var Od=Object.defineProperty,Td=l((e,t)=>Od(e,"name",{value:t,configurable:!0}),"f$1N");const Id=Td(function(e){return e.map(t=>{const n=new Set;return t.forEach(r=>{r.normal!==""&&n.add(r.normal),r.switch&&n.add(`%${r.switch}%`),r.implicit&&n.add(r.implicit),r.machine&&n.add(r.machine),r.root&&n.add(r.root),r.alias&&r.alias.forEach(o=>n.add(o));const a=Array.from(r.tags);for(let o=0;o<a.length;o+=1)n.add("#"+a[o])}),n})},"createCache"),Dd={one:{cacheDoc:Id}};var Ed=Object.defineProperty,ka=l((e,t)=>Ed(e,"name",{value:t,configurable:!0}),"t$P");const Hd={cache:ka(function(){return this._cache=this.methods.one.cacheDoc(this.document),this},"cache"),uncache:ka(function(){return this._cache=null,this},"uncache")},Gd=ka(function(e){Object.assign(e.prototype,Hd)},"addAPI");var Fd=Object.defineProperty,Vd=l((e,t)=>Fd(e,"name",{value:t,configurable:!0}),"e$1g");const zd={cache:Vd(function(e){e._cache=e.methods.one.cacheDoc(e.document)},"cache")},Sd={api:Gd,compute:zd,methods:Dd};var Bd=Object.defineProperty,Fn=l((e,t)=>Bd(e,"name",{value:t,configurable:!0}),"r$1n");const Md={toLowerCase:Fn(function(){return this.termList().forEach(e=>{e.text=e.text.toLowerCase()}),this},"toLowerCase"),toUpperCase:Fn(function(){return this.termList().forEach(e=>{e.text=e.text.toUpperCase()}),this},"toUpperCase"),toTitleCase:Fn(function(){return this.termList().forEach(e=>{e.text=e.text.replace(/^ *[a-z\u00C0-\u00FF]/,t=>t.toUpperCase())}),this},"toTitleCase"),toCamelCase:Fn(function(){return this.docs.forEach(e=>{e.forEach((t,n)=>{n!==0&&(t.text=t.text.replace(/^ *[a-z\u00C0-\u00FF]/,r=>r.toUpperCase())),n!==e.length-1&&(t.post="")})}),this},"toCamelCase")};var Ld=Object.defineProperty,Xe=l((e,t)=>Ld(e,"name",{value:t,configurable:!0}),"a$1P");const Uo=Xe(e=>new RegExp("^\\p{Lu}[\\p{Ll}'’]","u").test(e)||new RegExp("^\\p{Lu}$","u").test(e),"isTitleCase"),Kd=Xe(e=>e.replace(new RegExp("^\\p{Ll}","u"),t=>t.toUpperCase()),"toTitleCase"),Jd=Xe(e=>e.replace(new RegExp("^\\p{Lu}","u"),t=>t.toLowerCase()),"toLowerCase"),Pu=Xe((e,t,n)=>{if(n.forEach(r=>r.dirty=!0),e){const r=[t,0].concat(n);Array.prototype.splice.apply(e,r)}return e},"spliceArr"),sn=Xe(function(e){const t=/ $/,n=/[-–—]/,r=e[e.length-1];r&&!t.test(r.post)&&!n.test(r.post)&&(r.post+=" ")},"endSpace"),Qo=Xe((e,t,n)=>{const r=/[-.?!,;:)–—'"]/g,a=e[t-1];if(!a)return;const o=a.post;if(r.test(o)){const i=o.match(r).join(""),s=n[n.length-1];s.post=i+s.post,a.post=a.post.replace(r,"")}},"movePunct"),Wd=Xe(function(e,t,n){const r=e[t];if(t!==0||!Uo(r.text))return;n[0].text=Kd(n[0].text);const a=e[t];a.tags.has("ProperNoun")||a.tags.has("Acronym")||Uo(a.text)&&a.text.length>1&&(a.text=Jd(a.text))},"moveTitleCase"),qd=Xe(function(e,t,n,r){const[a,o,i]=t;o===0||i===r[a].length?sn(n):(sn(n),sn([e[t[1]]])),Wd(e,o,n),Pu(e,o,n)},"cleanPrepend"),Rd=Xe(function(e,t,n,r){const[a,,o]=t,i=(r[a]||[]).length;o<i?(Qo(e,o,n),sn(n)):i===o&&(sn(e),Qo(e,o,n),r[a+1]&&(n[n.length-1].post+=" ")),Pu(e,t[2],n),t[4]=n[n.length-1].id},"cleanAppend");var Ud=Object.defineProperty,ku=l((e,t)=>Ud(e,"name",{value:t,configurable:!0}),"a$1O");let en=0;const _o=ku(e=>(e=e.length<3?"0"+e:e,e.length<3?"0"+e:e),"pad3"),ju=ku(function(e){let[t,n]=e.index||[0,0];en+=1,en=en>46655?0:en,t=t>46655?0:t,n=n>1294?0:n;let r=_o(en.toString(36));r+=_o(t.toString(36));let a=n.toString(36);a=a.length<2?"0"+a:a,r+=a;const o=parseInt(Math.random()*36,10);return r+=o.toString(36),e.normal+"|"+r.toUpperCase()},"toId");var Qd=Object.defineProperty,Pt=l((e,t)=>Qd(e,"name",{value:t,configurable:!0}),"r$1k");const Zo=Pt(function(e){e.has("@hasContraction")&&typeof e.contractions=="function"&&e.grow("@hasContraction").contractions().expand()},"expand"),Xo=Pt(e=>Object.prototype.toString.call(e)==="[object Array]","isArray"),_d=Pt(function(e){return e=e.map(t=>(t.id=ju(t),t)),e},"addIds"),Zd=Pt(function(e,t){const{methods:n}=t;return typeof e=="string"?n.one.tokenize.fromString(e,t)[0]:typeof e=="object"&&e.isView?e.clone().docs[0]||[]:Xo(e)?Xo(e[0])?e[0]:e:[]},"getTerms"),Yo=Pt(function(e,t,n){const{document:r,world:a}=t;t.uncache();const o=t.fullPointer,i=t.fullPointer;t.forEach((u,c)=>{const d=u.fullPointer[0],[h]=d,p=r[h];let b=Zd(e,a);b.length!==0&&(b=_d(b),n?(Zo(t.update([d]).firstTerm()),qd(p,d,b,r)):(Zo(t.update([d]).lastTerm()),Rd(p,d,b,r)),r[h]&&r[h][d[1]]&&(d[3]=r[h][d[1]].id),i[c]=d,d[2]+=b.length,o[c]=d)});const s=t.toView(o);return t.ptrs=i,s.compute(["id","index","freeze","lexicon"]),s.world.compute.preTagger&&s.compute("preTagger"),s.compute("unfreeze"),s},"insert"),kt={insertAfter:Pt(function(e){return Yo(e,this,!1)},"insertAfter"),insertBefore:Pt(function(e){return Yo(e,this,!0)},"insertBefore")};kt.append=kt.insertAfter;kt.prepend=kt.insertBefore;kt.insert=kt.insertAfter;var Xd=Object.defineProperty,yn=l((e,t)=>Xd(e,"name",{value:t,configurable:!0}),"f$1M");const Yd=/\$[0-9a-z]+/g,ro={},eh=yn(e=>new RegExp("^\\p{Lu}[\\p{Ll}'’]","u").test(e)||new RegExp("^\\p{Lu}$","u").test(e),"isTitleCase"),th=yn(e=>e.replace(new RegExp("^\\p{Ll}","u"),t=>t.toUpperCase()),"toTitleCase"),nh=yn(e=>e.replace(new RegExp("^\\p{Lu}","u"),t=>t.toLowerCase()),"toLowerCase"),rh=yn(function(e,t,n){return e.forEach(r=>{const a=t(r);r.replaceWith(a,n)}),e},"replaceByFn"),ah=yn(function(e,t){if(typeof e!="string")return e;const n=t.groups();return e=e.replace(Yd,r=>{const a=r.replace(/\$/,"");return n.hasOwnProperty(a)?n[a].text():r}),e},"subDollarSign");ro.replaceWith=function(e,t={}){let n=this.fullPointer;const r=this;if(this.uncache(),typeof e=="function")return rh(r,e,t);const a=r.docs[0];if(!a)return r;const o=t.possessives&&a[a.length-1].tags.has("Possessive"),i=t.case&&eh(a[0].text);e=ah(e,r);const s=this.update(n);n=n.map(p=>p.slice(0,3));const u=(s.docs[0]||[]).map(p=>Array.from(p.tags)),c=s.docs[0][0].pre,d=s.docs[0][s.docs[0].length-1].post;if(typeof e=="string"&&(e=this.fromText(e).compute("id")),r.insertAfter(e),s.has("@hasContraction")&&r.contractions&&r.grow("@hasContraction+").contractions().expand(),r.delete(s),o){const p=r.docs[0],b=p[p.length-1];b.tags.has("Possessive")||(b.text+="'s",b.normal+="'s",b.tags.add("Possessive"))}if(c&&r.docs[0]&&(r.docs[0][0].pre=c),d&&r.docs[0]){const p=r.docs[0][r.docs[0].length-1];p.post.trim()||(p.post=d)}const h=r.toView(n).compute(["index","freeze","lexicon"]);if(h.world.compute.preTagger&&h.compute("preTagger"),h.compute("unfreeze"),t.tags&&h.terms().forEach((p,b)=>{p.tagSafe(u[b])}),!h.docs[0]||!h.docs[0][0])return h;if(t.case){const p=i?th:nh;h.docs[0][0].text=p(h.docs[0][0].text)}return h};ro.replace=function(e,t,n){if(e&&!t)return this.replaceWith(e,n);const r=this.match(e);return r.found?(this.soften(),r.replaceWith(t,n)):this};var oh=Object.defineProperty,Au=l((e,t)=>oh(e,"name",{value:t,configurable:!0}),"r$1j");const ih=Au(function(e,t){const n=e.length-1,r=e[n],a=e[n-t];a&&r&&(a.post+=r.post,a.post=a.post.replace(/ +([.?!,;:])/,"$1"),a.post=a.post.replace(/[,;:]+([.?!])/,"$1"))},"repairPunct"),sh=Au(function(e,t){t.forEach(n=>{const[r,a,o]=n,i=o-a;e[r]&&(o===e[r].length&&o>1&&ih(e[r],i),e[r].splice(a,i))});for(let n=e.length-1;n>=0;n-=1)if(e[n].length===0&&(e.splice(n,1),n===e.length&&e[n-1])){const r=e[n-1],a=r[r.length-1];a&&(a.post=a.post.trimEnd())}return e},"pluckOut");var uh=Object.defineProperty,xu=l((e,t)=>uh(e,"name",{value:t,configurable:!0}),"s$1l");const lh=xu(function(e,t){return e=e.map(n=>{const[r]=n;return t[r]&&t[r].forEach(a=>{const o=a[2]-a[1];n[1]<=a[1]&&n[2]>=a[2]&&(n[2]-=o)}),n}),e.forEach((n,r)=>{if(n[1]===0&&n[2]==0)for(let a=r+1;a<e.length;a+=1)e[a][0]-=1,e[a][0]<0&&(e[a][0]=0)}),e=e.filter(n=>n[2]-n[1]>0),e=e.map(n=>(n[3]=null,n[4]=null,n)),e},"fixPointers"),ja={remove:xu(function(e){const{indexN:t}=this.methods.one.pointer;this.uncache();let n=this.all(),r=this;e&&(n=this,r=this.match(e));const a=!n.ptrs;r.has("@hasContraction")&&r.contractions&&r.grow("@hasContraction").contractions().expand();let o=n.fullPointer;const i=r.fullPointer.reverse(),s=sh(this.document,i),u=t(i);return o=lh(o,u),n.ptrs=o,n.document=s,n.compute("index"),a&&(n.ptrs=void 0),e?n.toView(o):(this.ptrs=[],n.none())},"remove")};ja.delete=ja.remove;var ch=Object.defineProperty,pt=l((e,t)=>ch(e,"name",{value:t,configurable:!0}),"e$1c");const dn={pre:pt(function(e,t){return e===void 0&&this.found?this.docs[0][0].pre:(this.docs.forEach(n=>{const r=n[0];t===!0?r.pre+=e:r.pre=e}),this)},"pre"),post:pt(function(e,t){if(e===void 0){const n=this.docs[this.docs.length-1];return n[n.length-1].post}return this.docs.forEach(n=>{const r=n[n.length-1];t===!0?r.post+=e:r.post=e}),this},"post"),trim:pt(function(){if(!this.found)return this;const e=this.docs,t=e[0][0];t.pre=t.pre.trimStart();const n=e[e.length-1],r=n[n.length-1];return r.post=r.post.trimEnd(),this},"trim"),hyphenate:pt(function(){return this.docs.forEach(e=>{e.forEach((t,n)=>{n!==0&&(t.pre=""),e[n+1]&&(t.post="-")})}),this},"hyphenate"),dehyphenate:pt(function(){const e=/[-–—]/;return this.docs.forEach(t=>{t.forEach(n=>{e.test(n.post)&&(n.post=" ")})}),this},"dehyphenate"),toQuotations:pt(function(e,t){return e=e||'"',t=t||'"',this.docs.forEach(n=>{n[0].pre=e+n[0].pre;const r=n[n.length-1];r.post=t+r.post}),this},"toQuotations"),toParentheses:pt(function(e,t){return e=e||"(",t=t||")",this.docs.forEach(n=>{n[0].pre=e+n[0].pre;const r=n[n.length-1];r.post=t+r.post}),this},"toParentheses")};dn.deHyphenate=dn.dehyphenate;dn.toQuotation=dn.toQuotations;var dh=Object.defineProperty,$n=l((e,t)=>dh(e,"name",{value:t,configurable:!0}),"o$1M");const hh=$n((e,t)=>e.normal<t.normal?-1:e.normal>t.normal?1:0,"alpha"),ph=$n((e,t)=>{const n=e.normal.trim().length,r=t.normal.trim().length;return n<r?1:n>r?-1:0},"length"),fh=$n((e,t)=>e.words<t.words?1:e.words>t.words?-1:0,"wordCount"),gh=$n((e,t)=>e[0]<t[0]?1:e[0]>t[0]?-1:e[1]>t[1]?1:-1,"sequential"),mh=$n(function(e){const t={};return e.forEach(n=>{t[n.normal]=t[n.normal]||0,t[n.normal]+=1}),e.sort((n,r)=>{const a=t[n.normal],o=t[r.normal];return a<o?1:a>o?-1:0}),e},"byFreq"),Zr={alpha:hh,length:ph,wordCount:fh,sequential:gh,byFreq:mh};var vh=Object.defineProperty,$r=l((e,t)=>vh(e,"name",{value:t,configurable:!0}),"a$1L");const bh=new Set(["index","sequence","seq","sequential","chron","chronological"]),yh=new Set(["freq","frequency","topk","repeats"]),$h=new Set(["alpha","alphabetical"]),wh=$r(function(e,t){let n=e.fullPointer;return n=n.sort((r,a)=>(r=e.update([r]),a=e.update([a]),t(r,a))),e.ptrs=n,e},"customSort"),Ph=$r(function(e){const{docs:t,pointer:n}=this;if(this.uncache(),typeof e=="function")return wh(this,e);e=e||"alpha";const r=n||t.map((o,i)=>[i]);let a=t.map((o,i)=>({index:i,words:o.length,normal:o.map(s=>s.machine||s.normal||"").join(" "),pointer:r[i]}));return bh.has(e)&&(e="sequential"),$h.has(e)&&(e="alpha"),yh.has(e)?(a=Zr.byFreq(a),this.update(a.map(o=>o.pointer))):typeof Zr[e]=="function"?(a=a.sort(Zr[e]),this.update(a.map(o=>o.pointer))):this},"sort"),kh=$r(function(){let e=this.pointer||this.docs.map((t,n)=>[n]);return e=[].concat(e),e=e.reverse(),this._cache&&(this._cache=this._cache.reverse()),this.update(e)},"reverse"),jh=$r(function(){const e=new Set;return this.filter(t=>{const n=t.text("machine");return e.has(n)?!1:(e.add(n),!0)})},"unique"),Ah={unique:jh,reverse:kh,sort:Ph};var xh=Object.defineProperty,wr=l((e,t)=>xh(e,"name",{value:t,configurable:!0}),"o$1L");const Ch=wr(e=>Object.prototype.toString.call(e)==="[object Array]","isArray"),Cu=wr(function(e,t){if(e.length>0){const n=e[e.length-1],r=n[n.length-1];/ /.test(r.post)===!1&&(r.post+=" ")}return e=e.concat(t),e},"combineDocs"),Nh=wr(function(e,t){if(e.document===t.document){const n=e.fullPointer.concat(t.fullPointer);return e.toView(n).compute("index")}return t.fullPointer.forEach(n=>{n[0]+=e.document.length}),e.document=Cu(e.document,t.docs),e.all()},"combineViews"),Oh={concat:wr(function(e){if(typeof e=="string"){const t=this.fromText(e);if(!this.found||!this.ptrs)this.document=this.document.concat(t.document);else{const n=this.fullPointer,r=n[n.length-1][0];this.document.splice(r,0,...t.document)}return this.all().compute("index")}if(typeof e=="object"&&e.isView)return Nh(this,e);if(Ch(e)){const t=Cu(this.document,e);return this.document=t,this.all()}return this},"concat")};var Th=Object.defineProperty,Nu=l((e,t)=>Th(e,"name",{value:t,configurable:!0}),"n$$");const Ih=Nu(function(){return this.ptrs=this.fullPointer,this},"harden"),Dh=Nu(function(){let e=this.ptrs;return!e||e.length<1?this:(e=e.map(t=>t.slice(0,3)),this.ptrs=e,this)},"soften"),Eh={harden:Ih,soften:Dh};var Hh=Object.defineProperty,Gh=l((e,t)=>Hh(e,"name",{value:t,configurable:!0}),"r$1g");const Fh=Object.assign({},Md,kt,ro,ja,dn,Ah,Oh,Eh),Vh=Gh(function(e){Object.assign(e.prototype,Fh)},"addAPI");var zh=Object.defineProperty,Sh=l((e,t)=>zh(e,"name",{value:t,configurable:!0}),"d$P");const Bh={id:Sh(function(e){const t=e.docs;for(let n=0;n<t.length;n+=1)for(let r=0;r<t[n].length;r+=1){const a=t[n][r];a.id=a.id||ju(a)}},"id")},Mh={api:Vh,compute:Bh},Lh=[{word:"@",out:["at"]},{word:"arent",out:["are","not"]},{word:"alot",out:["a","lot"]},{word:"brb",out:["be","right","back"]},{word:"cannot",out:["can","not"]},{word:"dun",out:["do","not"]},{word:"can't",out:["can","not"]},{word:"shan't",out:["should","not"]},{word:"won't",out:["will","not"]},{word:"that's",out:["that","is"]},{word:"what's",out:["what","is"]},{word:"let's",out:["let","us"]},{word:"dunno",out:["do","not","know"]},{word:"gonna",out:["going","to"]},{word:"gotta",out:["have","got","to"]},{word:"gimme",out:["give","me"]},{word:"outta",out:["out","of"]},{word:"tryna",out:["trying","to"]},{word:"gtg",out:["got","to","go"]},{word:"im",out:["i","am"]},{word:"imma",out:["I","will"]},{word:"imo",out:["in","my","opinion"]},{word:"irl",out:["in","real","life"]},{word:"ive",out:["i","have"]},{word:"rn",out:["right","now"]},{word:"tbh",out:["to","be","honest"]},{word:"wanna",out:["want","to"]},{word:"c'mere",out:["come","here"]},{word:"c'mon",out:["come","on"]},{word:"shoulda",out:["should","have"]},{word:"coulda",out:["coulda","have"]},{word:"woulda",out:["woulda","have"]},{word:"musta",out:["must","have"]},{word:"tis",out:["it","is"]},{word:"twas",out:["it","was"]},{word:"y'know",out:["you","know"]},{word:"ne'er",out:["never"]},{word:"o'er",out:["over"]},{after:"ll",out:["will"]},{after:"ve",out:["have"]},{after:"re",out:["are"]},{after:"m",out:["am"]},{before:"c",out:["ce"]},{before:"m",out:["me"]},{before:"n",out:["ne"]},{before:"qu",out:["que"]},{before:"s",out:["se"]},{before:"t",out:["tu"]},{word:"shouldnt",out:["should","not"]},{word:"couldnt",out:["could","not"]},{word:"wouldnt",out:["would","not"]},{word:"hasnt",out:["has","not"]},{word:"wasnt",out:["was","not"]},{word:"isnt",out:["is","not"]},{word:"cant",out:["can","not"]},{word:"dont",out:["do","not"]},{word:"wont",out:["will","not"]},{word:"howd",out:["how","did"]},{word:"whatd",out:["what","did"]},{word:"whend",out:["when","did"]},{word:"whered",out:["where","did"]}],Kh={st:!0,nd:!0,rd:!0,th:!0,am:!0,pm:!0,max:!0,"°":!0,s:!0,e:!0,er:!0,ère:!0,ème:!0},Jh={one:{contractions:Lh,numberSuffixes:Kh}};var Wh=Object.defineProperty,qh=l((e,t)=>Wh(e,"name",{value:t,configurable:!0}),"a$1J");const Xr=qh(function(e,t,n){const[r,a]=t;!n||n.length===0||(n=n.map((o,i)=>(o.implicit=o.text,o.machine=o.text,o.pre="",o.post="",o.text="",o.normal="",o.index=[r,a+i],o)),n[0]&&(n[0].pre=e[r][a].pre,n[n.length-1].post=e[r][a].post,n[0].text=e[r][a].text,n[0].normal=e[r][a].normal),e[r].splice(a,1,...n))},"insertContraction");var Rh=Object.defineProperty,Uh=l((e,t)=>Rh(e,"name",{value:t,configurable:!0}),"t$M");const Qh=/'/,_h=new Set(["what","how","when","where","why"]),Zh=new Set(["be","go","start","think","need"]),Xh=new Set(["been","gone"]),Yh=Uh(function(e,t){const n=e[t].normal.split(Qh)[0];if(_h.has(n))return[n,"did"];if(e[t+1]){if(Xh.has(e[t+1].normal))return[n,"had"];if(Zh.has(e[t+1].normal))return[n,"would"]}return null},"_apostropheD");var ep=Object.defineProperty,tp=l((e,t)=>ep(e,"name",{value:t,configurable:!0}),"r$1d");const np=tp(function(e,t){return e[t].normal==="ain't"||e[t].normal==="aint"?null:[e[t].normal.replace(/n't/,""),"not"]},"apostropheT");var rp=Object.defineProperty,ao=l((e,t)=>rp(e,"name",{value:t,configurable:!0}),"s$1h");const oo=/'/,ap=/(e|é|aison|sion|tion)$/,op=/(age|isme|acle|ege|oire)$/,ip=ao((e,t)=>{const n=e[t].normal.split(oo)[1];return n&&n.endsWith("e")?["la",n]:["le",n]},"preL"),sp=ao((e,t)=>{const n=e[t].normal.split(oo)[1];return n&&ap.test(n)&&!op.test(n)?["du",n]:n&&n.endsWith("s")?["des",n]:["de",n]},"preD"),up=ao((e,t)=>["je",e[t].normal.split(oo)[1]],"preJ"),Yr={preJ:up,preL:ip,preD:sp};var lp=Object.defineProperty,cp=l((e,t)=>lp(e,"name",{value:t,configurable:!0}),"u$1F");const dp=/^([0-9.]{1,4}[a-z]{0,2}) ?[-–—] ?([0-9]{1,4}[a-z]{0,2})$/i,hp=/^([0-9]{1,2}(:[0-9][0-9])?(am|pm)?) ?[-–—] ?([0-9]{1,2}(:[0-9][0-9])?(am|pm)?)$/i,pp=/^[0-9]{3}-[0-9]{4}$/,fp=cp(function(e,t){const n=e[t];let r=n.text.match(dp);return r!==null?n.tags.has("PhoneNumber")===!0||pp.test(n.text)?null:[r[1],"to",r[2]]:(r=n.text.match(hp),r!==null?[r[1],"to",r[4]]:null)},"numberRange");var gp=Object.defineProperty,mp=l((e,t)=>gp(e,"name",{value:t,configurable:!0}),"o$1G");const vp=/^([+-]?[0-9][.,0-9]*)([a-z°²³µ/]+)$/,bp=mp(function(e,t,n){const r=n.model.one.numberSuffixes||{},a=e[t].text.match(vp);if(a!==null){const o=a[2].toLowerCase().trim();return r.hasOwnProperty(o)?null:[a[1],o]}return null},"numberUnit");var yp=Object.defineProperty,Ge=l((e,t)=>yp(e,"name",{value:t,configurable:!0}),"i$1K");const ei=/'/,$p=/^[0-9][^-–—]*[-–—].*?[0-9]/,ti=Ge(function(e,t,n,r){const a=t.update();a.document=[e];let o=n+r;n>0&&(n-=1),e[o]&&(o+=1),a.ptrs=[[0,n,o]]},"reTag"),ni={t:Ge((e,t)=>np(e,t),"t"),d:Ge((e,t)=>Yh(e,t),"d")},ri={j:Ge((e,t)=>Yr.preJ(e,t),"j"),l:Ge((e,t)=>Yr.preL(e,t),"l"),d:Ge((e,t)=>Yr.preD(e,t),"d")},wp=Ge(function(e,t,n,r){for(let a=0;a<e.length;a+=1){const o=e[a];if(o.word===t.normal)return o.out;if(r!==null&&r===o.after)return[n].concat(o.out);if(n!==null&&n===o.before&&r&&r.length>2)return o.out.concat(r)}return null},"knownOnes"),ea=Ge(function(e,t){const n=t.fromText(e.join(" "));return n.compute(["id","alias"]),n.docs[0]},"toDocs"),Pp=Ge(function(e,t){for(let n=t+1;n<5&&e[n];n+=1)if(e[n].normal==="been")return["there","has"];return["there","is"]},"thereHas"),kp=Ge(e=>{const{world:t,document:n}=e,{model:r,methods:a}=t,o=r.one.contractions||[];n.forEach((i,s)=>{for(let u=i.length-1;u>=0;u-=1){let c=null,d=null;if(ei.test(i[u].normal)===!0){const p=i[u].normal.split(ei);c=p[0],d=p[1]}let h=wp(o,i[u],c,d);if(!h&&ni.hasOwnProperty(d)&&(h=ni[d](i,u,t)),!h&&ri.hasOwnProperty(c)&&(h=ri[c](i,u)),c==="there"&&d==="s"&&(h=Pp(i,u)),h){h=ea(h,e),Xr(n,[s,u],h),ti(n[s],e,u,h.length);continue}if($p.test(i[u].normal)){h=fp(i,u),h&&(h=ea(h,e),Xr(n,[s,u],h),a.one.setTag(h,"NumberRange",t),h[2]&&h[2].tags.has("Time")&&a.one.setTag([h[0]],"Time",t,null,"time-range"),ti(n[s],e,u,h.length));continue}h=bp(i,u,t),h&&(h=ea(h,e),Xr(n,[s,u],h),a.one.setTag([h[1]],"Unit",t,null,"contraction-unit"))}})},"contractions"),jp={contractions:kp},Ap={model:Jh,compute:jp,hooks:["contractions"]};var xp=Object.defineProperty,Ou=l((e,t)=>xp(e,"name",{value:t,configurable:!0}),"i$1J");const ai=Ou(function(e){const t=e.world,{model:n,methods:r}=e.world,a=r.one.setTag,{frozenLex:o}=n.one,i=n.one._multiCache||{};e.docs.forEach(s=>{for(let u=0;u<s.length;u+=1){const c=s[u],d=c.machine||c.normal;if(i[d]!==void 0&&s[u+1]){const h=u+i[d]-1;for(let p=h;p>u;p-=1){const b=s.slice(u,p+1),x=b.map(G=>G.machine||G.normal).join(" ");if(o.hasOwnProperty(x)===!0){a(b,o[x],t,!1,"1-frozen-multi-lexicon"),b.forEach(G=>G.frozen=!0);continue}}}if(o[d]!==void 0&&o.hasOwnProperty(d)){a([c],o[d],t,!1,"1-freeze-lexicon"),c.frozen=!0;continue}}})},"freeze"),Cp=Ou(function(e){return e.docs.forEach(t=>{t.forEach(n=>{delete n.frozen})}),e},"unfreeze"),Np={frozen:ai,freeze:ai,unfreeze:Cp};var Op=Object.defineProperty,io=l((e,t)=>Op(e,"name",{value:t,configurable:!0}),"t$J");const oi=io(e=>"\x1B[34m"+e+"\x1B[0m","blue"),ii=io(e=>"\x1B[3m\x1B[2m"+e+"\x1B[0m","dim"),si=io(function(e){e.docs.forEach(t=>{console.log(oi(`
|
|
2
2
|
┌─────────`)),t.forEach(n=>{let r=` ${ii("│")} `;const a=n.implicit||n.text||"-";n.frozen===!0?r+=`${oi(a)} ❄️`:r+=ii(a),console.log(r)})})},"debug");var Tp=Object.defineProperty,ui=l((e,t)=>Tp(e,"name",{value:t,configurable:!0}),"r$1b");const Ip={compute:Np,mutate:ui(e=>{const t=e.methods.one;t.termMethods.isFrozen=n=>n.frozen===!0,t.debug.freeze=si,t.debug.frozen=si},"mutate"),api:ui(function(e){e.prototype.freeze=function(){return this.docs.forEach(t=>{t.forEach(n=>{n.frozen=!0})}),this},e.prototype.unfreeze=function(){this.compute("unfreeze")},e.prototype.isFrozen=function(){return this.match("@isFrozen+")}},"api"),hooks:["freeze"]};var Dp=Object.defineProperty,Ep=l((e,t)=>Dp(e,"name",{value:t,configurable:!0}),"m$R");const Hp=Ep(function(e,t,n){const{model:r,methods:a}=n,o=a.one.setTag,i=r.one._multiCache||{},{lexicon:s}=r.one||{},u=e[t],c=u.machine||u.normal;if(i[c]!==void 0&&e[t+1]){const d=t+i[c]-1;for(let h=d;h>t;h-=1){const p=e.slice(t,h+1);if(p.length<=1)return!1;const b=p.map(x=>x.machine||x.normal).join(" ");if(s.hasOwnProperty(b)===!0){const x=s[b];return o(p,x,n,!1,"1-multi-lexicon"),x&&x.length===2&&(x[0]==="PhrasalVerb"||x[1]==="PhrasalVerb")&&o([p[1]],"Particle",n,!1,"1-phrasal-particle"),!0}}return!1}return null},"multiWord");var Gp=Object.defineProperty,Fp=l((e,t)=>Gp(e,"name",{value:t,configurable:!0}),"c$1H");const li=/^(under|over|mis|re|un|dis|semi|pre|post)-?/,Vp=new Set(["Verb","Infinitive","PastTense","Gerund","PresentTense","Adjective","Participle"]),zp=Fp(function(e,t,n){const{model:r,methods:a}=n,o=a.one.setTag,{lexicon:i}=r.one,s=e[t],u=s.machine||s.normal;if(i[u]!==void 0&&i.hasOwnProperty(u))return o([s],i[u],n,!1,"1-lexicon"),!0;if(s.alias){const c=s.alias.find(d=>i.hasOwnProperty(d));if(c)return o([s],i[c],n,!1,"1-lexicon-alias"),!0}if(li.test(u)===!0){const c=u.replace(li,"");if(i.hasOwnProperty(c)&&c.length>3&&Vp.has(i[c]))return o([s],i[c],n,!1,"1-lexicon-prefix"),!0}return null},"checkLexicon");var Sp=Object.defineProperty,Bp=l((e,t)=>Sp(e,"name",{value:t,configurable:!0}),"i$1I");const Mp=Bp(function(e){const t=e.world;e.docs.forEach(n=>{for(let r=0;r<n.length;r+=1)if(n[r].tags.size===0){let a=null;a=a||Hp(n,r,t),a=a||zp(n,r,t)}})},"lexicon"),Lp={lexicon:Mp};var Kp=Object.defineProperty,Jp=l((e,t)=>Kp(e,"name",{value:t,configurable:!0}),"s$1e");const Wp=Jp(function(e){const t={},n={};return Object.keys(e).forEach(r=>{const a=e[r];r=r.toLowerCase().trim(),r=r.replace(/'s\b/,"");const o=r.split(/ /);o.length>1&&(n[o[0]]===void 0||o.length>n[o[0]])&&(n[o[0]]=o.length),t[r]=t[r]||a}),delete t[""],delete t[null],delete t[" "],{lex:t,_multi:n}},"expand"),qp={one:{expandLexicon:Wp}};var Rp=Object.defineProperty,Up=l((e,t)=>Rp(e,"name",{value:t,configurable:!0}),"s$1d");const Qp=Up(function(e,t=!1){const n=this.world(),{methods:r,model:a}=n;if(!e)return;if(Object.keys(e).forEach(s=>{typeof e[s]=="string"&&e[s].startsWith("#")&&(e[s]=e[s].replace(/^#/,""))}),t===!0){const{lex:s,_multi:u}=r.one.expandLexicon(e,n);Object.assign(a.one._multiCache,u),Object.assign(a.one.frozenLex,s);return}if(r.two.expandLexicon){const{lex:s,_multi:u}=r.two.expandLexicon(e,n);Object.assign(a.one.lexicon,s),Object.assign(a.one._multiCache,u)}const{lex:o,_multi:i}=r.one.expandLexicon(e,n);Object.assign(a.one.lexicon,o),Object.assign(a.one._multiCache,i)},"addWords"),_p={addWords:Qp},Zp={one:{lexicon:{},_multiCache:{},frozenLex:{}}},Xp={model:Zp,methods:qp,compute:Lp,lib:_p,hooks:["lexicon"]};var Yp=Object.defineProperty,Tu=l((e,t)=>Yp(e,"name",{value:t,configurable:!0}),"p$18");const ef=Tu(function(e,t){const{methods:n,model:r}=t;return n.one.tokenize.splitTerms(e,r).map(a=>n.one.tokenize.splitWhitespace(a,r)).map(a=>a.text.toLowerCase())},"tokenize"),Iu=Tu(function(e,t){const n=[{}],r=[null],a=[0],o=[];let i=0;e.forEach(function(s){let u=0;const c=ef(s,t);for(let d=0;d<c.length;d++){const h=c[d];n[u]&&n[u].hasOwnProperty(h)?u=n[u][h]:(i++,n[u][h]=i,n[i]={},u=i,r[i]=null)}r[u]=[c.length]});for(const s in n[0])i=n[0][s],a[i]=0,o.push(i);for(;o.length;){const s=o.shift(),u=Object.keys(n[s]);for(let c=0;c<u.length;c+=1){const d=u[c],h=n[s][d];for(o.push(h),i=a[s];i>0&&!n[i].hasOwnProperty(d);)i=a[i];if(n.hasOwnProperty(i)){const p=n[i][d];a[h]=p,r[p]&&(r[h]=r[h]||[],r[h]=r[h].concat(r[p]))}else a[h]=0}}return{goNext:n,endAs:r,failTo:a}},"buildTrie");var tf=Object.defineProperty,so=l((e,t)=>tf(e,"name",{value:t,configurable:!0}),"u$1B");const nf=so(function(e,t,n){let r=0;const a=[];for(let o=0;o<e.length;o++){const i=e[o][n.form]||e[o].normal;for(;r>0&&(t.goNext[r]===void 0||!t.goNext[r].hasOwnProperty(i));)r=t.failTo[r]||0;if(t.goNext[r].hasOwnProperty(i)&&(r=t.goNext[r][i],t.endAs[r])){const s=t.endAs[r];for(let u=0;u<s.length;u++){const c=s[u],d=e[o-c+1],[h,p]=d.index;a.push([h,p,p+c,d.id])}}}return a},"scanWords"),rf=so(function(e,t){for(let n=0;n<e.length;n+=1)if(t.has(e[n])===!0)return!1;return!0},"cacheMiss"),af=so(function(e,t,n){let r=[];n.form=n.form||"normal";const a=e.docs;if(!t.goNext||!t.goNext[0])return console.error("Compromise invalid lookup trie"),e.none();const o=Object.keys(t.goNext[0]);for(let i=0;i<a.length;i++){if(e._cache&&e._cache[i]&&rf(o,e._cache[i])===!0)continue;const s=a[i],u=nf(s,t,n);u.length>0&&(r=r.concat(u))}return e.update(r)},"scan");var of=Object.defineProperty,Du=l((e,t)=>of(e,"name",{value:t,configurable:!0}),"r$19");const sf=Du(e=>Object.prototype.toString.call(e)==="[object Object]","isObject");function Eu(e){e.prototype.lookup=function(t,n={}){if(!t)return this.none();typeof t=="string"&&(t=[t]);const r=sf(t)?t:Iu(t,this.world);let a=af(this,r,n);return a=a.settle(),a}}l(Eu,"b$h");Du(Eu,"default");var uf=Object.defineProperty,Hu=l((e,t)=>uf(e,"name",{value:t,configurable:!0}),"u$1A");const ta=Hu((e,t)=>{for(let n=e.length-1;n>=0;n-=1)if(e[n]!==t)return e=e.slice(0,n+1),e;return e},"truncate"),lf=Hu(function(e){return e.goNext=e.goNext.map(t=>{if(Object.keys(t).length!==0)return t}),e.goNext=ta(e.goNext,void 0),e.failTo=ta(e.failTo,0),e.endAs=ta(e.endAs,null),e},"compress");var cf=Object.defineProperty,df=l((e,t)=>cf(e,"name",{value:t,configurable:!0}),"t$H");const Aa={buildTrie:df(function(e){const t=Iu(e,this.world());return lf(t)},"buildTrie")};Aa.compile=Aa.buildTrie;const hf={api:Eu,lib:Aa};var pf=Object.defineProperty,Ut=l((e,t)=>pf(e,"name",{value:t,configurable:!0}),"c$1F");const ci=Ut(function(e,t){return t&&e.forEach(n=>{const r=n[0];t[r]&&(n[0]=t[r][0],n[1]+=t[r][1],n[2]+=t[r][1])}),e},"relPointer"),Gu=Ut(function(e,t){let{ptrs:n}=e;const{byGroup:r}=e;return n=ci(n,t),Object.keys(r).forEach(a=>{r[a]=ci(r[a],t)}),{ptrs:n,byGroup:r}},"fixPointers"),wn=Ut(function(e,t,n){const r=n.methods.one;return typeof e=="number"&&(e=String(e)),typeof e=="string"&&(e=r.killUnicode(e,n),e=r.parseMatch(e,t,n)),e},"parseRegs"),Fu=Ut(e=>Object.prototype.toString.call(e)==="[object Object]","isObject"),Pn=Ut(e=>e&&Fu(e)&&e.isView===!0,"isView"),kn=Ut(e=>e&&Fu(e)&&e.isNet===!0,"isNet");var ff=Object.defineProperty,jn=l((e,t)=>ff(e,"name",{value:t,configurable:!0}),"u$1y");const gf=jn(function(e,t,n){const r=this.methods.one;if(Pn(e))return this.intersection(e);if(kn(e))return this.sweep(e,{tagger:!1}).view.settle();e=wn(e,n,this.world);const a={regs:e,group:t},o=r.match(this.docs,a,this._cache),{ptrs:i,byGroup:s}=Gu(o,this.fullPointer),u=this.toView(i);return u._groups=s,u},"match"),mf=jn(function(e,t,n){const r=this.methods.one;if(Pn(e))return this.intersection(e).eq(0);if(kn(e))return this.sweep(e,{tagger:!1,matchOne:!0}).view;e=wn(e,n,this.world);const a={regs:e,group:t,justOne:!0},o=r.match(this.docs,a,this._cache),{ptrs:i,byGroup:s}=Gu(o,this.fullPointer),u=this.toView(i);return u._groups=s,u},"matchOne"),vf=jn(function(e,t,n){const r=this.methods.one;if(Pn(e))return this.intersection(e).fullPointer.length>0;if(kn(e))return this.sweep(e,{tagger:!1}).view.found;e=wn(e,n,this.world);const a={regs:e,group:t,justOne:!0};return r.match(this.docs,a,this._cache).ptrs.length>0},"has"),bf=jn(function(e,t,n){const r=this.methods.one;if(Pn(e))return this.filter(u=>u.intersection(e).found);if(kn(e)){const u=this.sweep(e,{tagger:!1}).view.settle();return this.if(u)}e=wn(e,n,this.world);const a={regs:e,group:t,justOne:!0};let o=this.fullPointer;const i=this._cache||[];o=o.filter((u,c)=>{const d=this.update([u]);return r.match(d.docs,a,i[c]).ptrs.length>0});const s=this.update(o);return this._cache&&(s._cache=o.map(u=>i[u[0]])),s},"ifFn"),yf=jn(function(e,t,n){const{methods:r}=this,a=r.one;if(Pn(e))return this.filter(s=>!s.intersection(e).found);if(kn(e)){const s=this.sweep(e,{tagger:!1}).view.settle();return this.ifNo(s)}e=wn(e,n,this.world);const o=this._cache||[],i=this.filter((s,u)=>{const c={regs:e,group:t,justOne:!0};return a.match(s.docs,c,o[u]).ptrs.length===0});return this._cache&&(i._cache=i.ptrs.map(s=>o[s[0]])),i},"ifNo"),$f={matchOne:mf,match:gf,has:vf,if:bf,ifNo:yf};var wf=Object.defineProperty,An=l((e,t)=>wf(e,"name",{value:t,configurable:!0}),"h$1h");const Pf=An(function(e,t,n){const{indexN:r}=this.methods.one.pointer,a=[],o=r(this.fullPointer);Object.keys(o).forEach(s=>{const u=o[s].sort((c,d)=>c[1]>d[1]?1:-1)[0];u[1]>0&&a.push([u[0],0,u[1]])});const i=this.toView(a);return e?i.match(e,t,n):i},"before"),kf=An(function(e,t,n){const{indexN:r}=this.methods.one.pointer,a=[],o=r(this.fullPointer),i=this.document;Object.keys(o).forEach(u=>{const c=o[u].sort((p,b)=>p[1]>b[1]?-1:1)[0],[d,,h]=c;h<i[d].length&&a.push([d,h,i[d].length])});const s=this.toView(a);return e?s.match(e,t,n):s},"after"),jf=An(function(e,t,n){typeof e=="string"&&(e=this.world.methods.one.parseMatch(e,n,this.world)),e[e.length-1].end=!0;const r=this.fullPointer;return this.forEach((a,o)=>{const i=a.before(e,t);if(i.found){const s=i.terms();r[o][1]-=s.length,r[o][3]=s.docs[0][0].id}}),this.update(r)},"growLeft"),Af=An(function(e,t,n){typeof e=="string"&&(e=this.world.methods.one.parseMatch(e,n,this.world)),e[0].start=!0;const r=this.fullPointer;return this.forEach((a,o)=>{const i=a.after(e,t);if(i.found){const s=i.terms();r[o][2]+=s.length,r[o][4]=null}}),this.update(r)},"growRight"),xf=An(function(e,t,n){return this.growRight(e,t,n).growLeft(e,t,n)},"grow"),Cf={before:Pf,after:kf,growLeft:jf,growRight:Af,grow:xf};var Nf=Object.defineProperty,Pr=l((e,t)=>Nf(e,"name",{value:t,configurable:!0}),"l$1f");const Vu=Pr(function(e,t){return[e[0],e[1],t[2]]},"combine"),Of=Pr(function(e){return Object.prototype.toString.call(e)==="[object Array]"},"isArray"),uo=Pr((e,t,n)=>typeof e=="string"||Of(e)?t.match(e,n):e||t.none(),"getDoc"),lo=Pr(function(e,t){const[n,r,a]=e;return t.document[n]&&t.document[n][r]&&(e[3]=e[3]||t.document[n][r].id,t.document[n][a-1]&&(e[4]=e[4]||t.document[n][a-1].id)),e},"addIds"),Wt={};Wt.splitOn=function(e,t){const{splitAll:n}=this.methods.one.pointer,r=uo(e,this,t).fullPointer,a=n(this.fullPointer,r);let o=[];return a.forEach(i=>{o.push(i.passthrough),o.push(i.before),o.push(i.match),o.push(i.after)}),o=o.filter(i=>i),o=o.map(i=>lo(i,this)),this.update(o)};Wt.splitBefore=function(e,t){const{splitAll:n}=this.methods.one.pointer,r=uo(e,this,t).fullPointer,a=n(this.fullPointer,r);for(let i=0;i<a.length;i+=1)!a[i].after&&a[i+1]&&a[i+1].before&&a[i].match&&a[i].match[0]===a[i+1].before[0]&&(a[i].after=a[i+1].before,delete a[i+1].before);let o=[];return a.forEach(i=>{o.push(i.passthrough),o.push(i.before),i.match&&i.after?o.push(Vu(i.match,i.after)):o.push(i.match)}),o=o.filter(i=>i),o=o.map(i=>lo(i,this)),this.update(o)};Wt.splitAfter=function(e,t){const{splitAll:n}=this.methods.one.pointer,r=uo(e,this,t).fullPointer,a=n(this.fullPointer,r);let o=[];return a.forEach(i=>{o.push(i.passthrough),i.before&&i.match?o.push(Vu(i.before,i.match)):(o.push(i.before),o.push(i.match)),o.push(i.after)}),o=o.filter(i=>i),o=o.map(i=>lo(i,this)),this.update(o)};Wt.split=Wt.splitAfter;var Tf=Object.defineProperty,hr=l((e,t)=>Tf(e,"name",{value:t,configurable:!0}),"r$18");const If=hr(function(e,t){return!e||!t||e[0]!==t[0]?!1:e[2]===t[1]},"isNeighbour"),di=hr(function(e,t,n){const r=e.world,a=r.methods.one.parseMatch;t=t||".$",n=n||"^.";const o=a(t,{},r),i=a(n,{},r);o[o.length-1].end=!0,i[0].start=!0;const s=e.fullPointer,u=[s[0]];for(let c=1;c<s.length;c+=1){const d=u[u.length-1],h=s[c],p=e.update([d]),b=e.update([h]);If(d,h)&&p.has(o)&&b.has(i)?u[u.length-1]=[d[0],d[1],h[2],d[3],h[4]]:u.push(h)}return e.update(u)},"mergeIf"),Df={joinIf:hr(function(e,t){return di(this,e,t)},"joinIf"),join:hr(function(){return di(this)},"join")};var Ef=Object.defineProperty,Hf=l((e,t)=>Ef(e,"name",{value:t,configurable:!0}),"e$17");const De=Object.assign({},$f,Cf,Wt,Df);De.lookBehind=De.before;De.lookBefore=De.before;De.lookAhead=De.after;De.lookAfter=De.after;De.notIf=De.ifNo;const Gf=Hf(function(e){Object.assign(e.prototype,De)},"matchAPI");var Ff=Object.defineProperty,kr=l((e,t)=>Ff(e,"name",{value:t,configurable:!0}),"o$1B");const Vf=/(?:^|\s)([![^]*(?:<[^<]*>)?\/.*?[^\\/]\/[?\]+*$~]*)(?:\s|$)/,zf=/([!~[^]*(?:<[^<]*>)?\([^)]+[^\\)]\)[?\]+*$~]*)(?:\s|$)/,Sf=/ /g,Bf=kr(e=>/^[![^]*(<[^<]*>)?\(/.test(e)&&/\)[?\]+*$~]*$/.test(e),"isBlock"),hi=kr(e=>/^[![^]*(<[^<]*>)?\//.test(e)&&/\/[?\]+*$~]*$/.test(e),"isReg"),pi=kr(function(e){return e=e.map(t=>t.trim()),e=e.filter(t=>t),e},"cleanUp"),Mf=kr(function(e){const t=e.split(Vf);let n=[];t.forEach(a=>{if(hi(a)){n.push(a);return}n=n.concat(a.split(zf))}),n=pi(n);let r=[];return n.forEach(a=>{Bf(a)||hi(a)?r.push(a):r=r.concat(a.split(Sf))}),r=pi(r),r},"parseBlocks");var Lf=Object.defineProperty,jt=l((e,t)=>Lf(e,"name",{value:t,configurable:!0}),"o$1A");const fi=/\{([0-9]+)?(, *[0-9]*)?\}/,gi=/&&/,Kf=new RegExp(/^<\s*(\S+)\s*>/),mi=jt(e=>e.charAt(0).toUpperCase()+e.substring(1),"titleCase"),be=jt(e=>e.charAt(e.length-1),"end"),ce=jt(e=>e.charAt(0),"start"),St=jt(e=>e.substring(1),"stripStart"),Bt=jt(e=>e.substring(0,e.length-1),"stripEnd"),tn=jt(function(e){return e=St(e),e=Bt(e),e},"stripBoth"),zu=jt(function(e,t){const n={};for(let r=0;r<2;r+=1){if(be(e)==="$"&&(n.end=!0,e=Bt(e)),ce(e)==="^"&&(n.start=!0,e=St(e)),be(e)==="?"&&(n.optional=!0,e=Bt(e)),(ce(e)==="["||be(e)==="]")&&(n.group=null,ce(e)==="["&&(n.groupStart=!0),be(e)==="]"&&(n.groupEnd=!0),e=e.replace(/^\[/,""),e=e.replace(/\]$/,""),ce(e)==="<")){const a=Kf.exec(e);a.length>=2&&(n.group=a[1],e=e.replace(a[0],""))}if(be(e)==="+"&&(n.greedy=!0,e=Bt(e)),e!=="*"&&be(e)==="*"&&e!=="\\*"&&(n.greedy=!0,e=Bt(e)),ce(e)==="!"&&(n.negative=!0,e=St(e)),ce(e)==="~"&&be(e)==="~"&&e.length>2&&(e=tn(e),n.fuzzy=!0,n.min=t.fuzzy||.85,/\(/.test(e)===!1))return n.word=e,n;if(ce(e)==="/"&&be(e)==="/")return e=tn(e),t.caseSensitive&&(n.use="text"),n.regex=new RegExp(e),n;if(fi.test(e)===!0&&(e=e.replace(fi,(a,o,i)=>(i===void 0?(n.min=Number(o),n.max=Number(o)):(i=i.replace(/, */,""),o===void 0?(n.min=0,n.max=Number(i)):(n.min=Number(o),n.max=Number(i||999))),n.greedy=!0,n.min||(n.optional=!0),""))),ce(e)==="("&&be(e)===")"){gi.test(e)?(n.choices=e.split(gi),n.operator="and"):(n.choices=e.split("|"),n.operator="or"),n.choices[0]=St(n.choices[0]);const a=n.choices.length-1;n.choices[a]=Bt(n.choices[a]),n.choices=n.choices.map(o=>o.trim()),n.choices=n.choices.filter(o=>o),n.choices=n.choices.map(o=>o.split(/ /g).map(i=>zu(i,t))),e=""}if(ce(e)==="{"&&be(e)==="}"){if(e=tn(e),n.root=e,/\//.test(e)){const a=n.root.split(/\//);n.root=a[0],n.pos=a[1],n.pos==="adj"&&(n.pos="Adjective"),n.pos=n.pos.charAt(0).toUpperCase()+n.pos.substr(1).toLowerCase(),a[2]!==void 0&&(n.sense=a[2])}return n}if(ce(e)==="<"&&be(e)===">")return e=tn(e),n.chunk=mi(e),n.greedy=!0,n;if(ce(e)==="%"&&be(e)==="%")return e=tn(e),n.switch=e,n}return ce(e)==="#"?(n.tag=St(e),n.tag=mi(n.tag),n):ce(e)==="@"?(n.method=St(e),n):e==="."?(n.anything=!0,n):e==="*"?(n.anything=!0,n.greedy=!0,n.optional=!0,n):(e&&(e=e.replace("\\*","*"),e=e.replace("\\.","."),t.caseSensitive?n.use="text":e=e.toLowerCase(),n.word=e),n)},"parseToken");var Jf=Object.defineProperty,Wf=l((e,t)=>Jf(e,"name",{value:t,configurable:!0}),"c$1D");const qf=/[a-z0-9][-–—][a-z]/i,Rf=Wf(function(e,t){const n=t.model.one.prefixes;for(let r=e.length-1;r>=0;r-=1){const a=e[r];if(a.word&&qf.test(a.word)){let o=a.word.split(/[-–—]/g);if(n.hasOwnProperty(o[0]))continue;o=o.filter(i=>i).reverse(),e.splice(r,1),o.forEach(i=>{const s=Object.assign({},a);s.word=i,e.splice(r,0,s)})}}return e},"splitHyphens");var Uf=Object.defineProperty,jr=l((e,t)=>Uf(e,"name",{value:t,configurable:!0}),"e$16");const vi=jr(function(e,t){const{all:n}=t.methods.two.transform.verb||{},r=e.root;return n?n(r,t.model):[]},"addVerbs"),bi=jr(function(e,t){const{all:n}=t.methods.two.transform.noun||{};return n?n(e.root,t.model):[e.root]},"addNoun"),yi=jr(function(e,t){const{all:n}=t.methods.two.transform.adjective||{};return n?n(e.root,t.model):[e.root]},"addAdjective"),Qf=jr(function(e,t){return e=e.map(n=>{if(n.root)if(t.methods.two&&t.methods.two.transform){let r=[];n.pos?n.pos==="Verb"?r=r.concat(vi(n,t)):n.pos==="Noun"?r=r.concat(bi(n,t)):n.pos==="Adjective"&&(r=r.concat(yi(n,t))):(r=r.concat(vi(n,t)),r=r.concat(bi(n,t)),r=r.concat(yi(n,t))),r=r.filter(a=>a),r.length>0&&(n.operator="or",n.fastOr=new Set(r))}else n.machine=n.root,delete n.id,delete n.root;return n}),e},"inflectRoot");var _f=Object.defineProperty,Ar=l((e,t)=>_f(e,"name",{value:t,configurable:!0}),"f$1t");const Zf=Ar(function(e){let t=0,n=null;for(let r=0;r<e.length;r++){const a=e[r];a.groupStart===!0&&(n=a.group,n===null&&(n=String(t),t+=1)),n!==null&&(a.group=n),a.groupEnd===!0&&(n=null)}return e},"nameGroups"),Xf=Ar(function(e){return e.map(t=>{if(t.choices!==void 0){if(t.operator!=="or"||t.fuzzy===!0)return t;t.choices.every(n=>{if(n.length!==1)return!1;const r=n[0];return r.fuzzy===!0||r.start||r.end?!1:r.word!==void 0&&r.negative!==!0&&r.optional!==!0&&r.method!==!0})===!0&&(t.fastOr=new Set,t.choices.forEach(n=>{t.fastOr.add(n[0].word)}),delete t.choices)}return t})},"doFastOrMode"),Yf=Ar(function(e){return e.map(t=>(t.fuzzy&&t.choices&&t.choices.forEach(n=>{n.length===1&&n[0].word&&(n[0].fuzzy=!0,n[0].min=t.min)}),t))},"fuzzyOr"),eg=Ar(function(e){return e=Zf(e),e=Xf(e),e=Yf(e),e},"postProcess");var tg=Object.defineProperty,ng=l((e,t)=>tg(e,"name",{value:t,configurable:!0}),"m$I");const rg=ng(function(e,t,n){if(e==null||e==="")return[];t=t||{},typeof e=="number"&&(e=String(e));let r=Mf(e);return r=r.map(a=>zu(a,t)),r=Rf(r,n),r=Qf(r,n),r=eg(r,t),r},"syntax");var ag=Object.defineProperty,Su=l((e,t)=>ag(e,"name",{value:t,configurable:!0}),"f$1s");const og=Su(function(e,t){for(const n of t)if(e.has(n))return!0;return!1},"anyIntersection"),ig=Su(function(e,t){for(let n=0;n<e.length;n+=1){const r=e[n];if(!(r.optional===!0||r.negative===!0||r.fuzzy===!0)){if(r.word!==void 0&&t.has(r.word)===!1||r.tag!==void 0&&t.has("#"+r.tag)===!1)return!0;if(r.fastOr&&og(r.fastOr,t)===!1)return!1}}return!1},"failFast");var sg=Object.defineProperty,Bu=l((e,t)=>sg(e,"name",{value:t,configurable:!0}),"g$t");const ug=Bu(function(e,t){const n=e.length,r=t.length;if(n===0)return r;if(r===0)return n;const a=(r>n?r:n)+1;if(Math.abs(n-r)>(a||100))return a||100;const o=[];for(let p=0;p<a;p++)o[p]=[p],o[p].length=a;for(let p=0;p<a;p++)o[0][p]=p;let i,s,u,c,d,h;for(let p=1;p<=n;++p)for(s=e[p-1],i=1;i<=r;++i){if(p===i&&o[p][i]>4)return n;u=t[i-1],c=s===u?0:1,d=o[p-1][i]+1,(h=o[p][i-1]+1)<d&&(d=h),(h=o[p-1][i-1]+c)<d&&(d=h),p>1&&i>1&&s===t[i-2]&&e[p-2]===u&&(h=o[p-2][i-2]+c)<d?o[p][i]=h:o[p][i]=d}return o[n][r]},"editDistance"),lg=Bu(function(e,t,n=3){if(e===t)return 1;if(e.length<n||t.length<n)return 0;const r=ug(e,t),a=Math.max(e.length,t.length);return 1-(a===0?0:r/a)},"fuzzyMatch");var cg=Object.defineProperty,Q=l((e,t)=>cg(e,"name",{value:t,configurable:!0}),"t$G");const dg=/([\u0022\uFF02\u0027\u201C\u2018\u201F\u201B\u201E\u2E42\u201A\u00AB\u2039\u2035\u2036\u2037\u301D\u0060\u301F])/,hg=/([\u0022\uFF02\u0027\u201D\u2019\u00BB\u203A\u2032\u2033\u2034\u301E\u00B4])/,$i=/^[-–—]$/,wi=/ [-–—]{1,3} /,Ee=Q((e,t)=>e.post.indexOf(t)!==-1,"hasPost"),hn={hasQuote:Q(e=>dg.test(e.pre)||hg.test(e.post),"hasQuote"),hasComma:Q(e=>Ee(e,","),"hasComma"),hasPeriod:Q(e=>Ee(e,".")===!0&&Ee(e,"...")===!1,"hasPeriod"),hasExclamation:Q(e=>Ee(e,"!"),"hasExclamation"),hasQuestionMark:Q(e=>Ee(e,"?")||Ee(e,"¿"),"hasQuestionMark"),hasEllipses:Q(e=>Ee(e,"..")||Ee(e,"…"),"hasEllipses"),hasSemicolon:Q(e=>Ee(e,";"),"hasSemicolon"),hasColon:Q(e=>Ee(e,":"),"hasColon"),hasSlash:Q(e=>/\//.test(e.text),"hasSlash"),hasHyphen:Q(e=>$i.test(e.post)||$i.test(e.pre),"hasHyphen"),hasDash:Q(e=>wi.test(e.post)||wi.test(e.pre),"hasDash"),hasContraction:Q(e=>!!e.implicit,"hasContraction"),isAcronym:Q(e=>e.tags.has("Acronym"),"isAcronym"),isKnown:Q(e=>e.tags.size>0,"isKnown"),isTitleCase:Q(e=>new RegExp("^\\p{Lu}[a-z'\\u00C0-\\u00FF]","u").test(e.text),"isTitleCase"),isUpperCase:Q(e=>new RegExp("^\\p{Lu}+$","u").test(e.text),"isUpperCase")};hn.hasQuotation=hn.hasQuote;var pg=Object.defineProperty,co=l((e,t)=>pg(e,"name",{value:t,configurable:!0}),"s$1b");let R=co(function(){},"wrapMatch");const fg=co(function(e,t,n,r){if(t.anything===!0)return!0;if(t.start===!0&&n!==0||t.end===!0&&n!==r-1)return!1;if(t.id!==void 0&&t.id===e.id)return!0;if(t.word!==void 0)return t.use?t.word===e[t.use]:e.machine!==null&&e.machine===t.word||e.alias!==void 0&&e.alias.hasOwnProperty(t.word)||t.fuzzy===!0&&(t.word===e.root||lg(t.word,e.normal)>=t.min)||e.alias&&e.alias.some(a=>a===t.word)?!0:t.word===e.text||t.word===e.normal;if(t.tag!==void 0)return e.tags.has(t.tag)===!0;if(t.method!==void 0)return typeof hn[t.method]=="function"&&hn[t.method](e)===!0;if(t.pre!==void 0)return e.pre&&e.pre.includes(t.pre);if(t.post!==void 0)return e.post&&e.post.includes(t.post);if(t.regex!==void 0){let a=e.normal;return t.use&&(a=e[t.use]),t.regex.test(a)}if(t.chunk!==void 0)return e.chunk===t.chunk;if(t.switch!==void 0)return e.switch===t.switch;if(t.machine!==void 0)return e.normal===t.machine||e.machine===t.machine||e.root===t.machine;if(t.sense!==void 0)return e.sense===t.sense;if(t.fastOr!==void 0){if(t.pos&&!e.tags.has(t.pos))return null;const a=e.root||e.implicit||e.machine||e.normal;return t.fastOr.has(a)||t.fastOr.has(e.text)}return t.choices!==void 0?t.operator==="and"?t.choices.every(a=>R(e,a,n,r)):t.choices.some(a=>R(e,a,n,r)):!1},"doesMatch");R=co(function(e,t,n,r){const a=fg(e,t,n,r);return t.negative===!0?!a:a},"wrapMatch");var gg=Object.defineProperty,ho=l((e,t)=>gg(e,"name",{value:t,configurable:!0}),"i$1A");const mg=ho(function(e,t){const n=Object.assign({},e.regs[e.r],{start:!1,end:!1}),r=e.t;for(;e.t<e.terms.length;e.t+=1){if(t&&R(e.terms[e.t],t,e.start_i+e.t,e.phrase_length))return e.t;const a=e.t-r+1;if(n.max!==void 0&&a===n.max)return e.t;if(R(e.terms[e.t],n,e.start_i+e.t,e.phrase_length)===!1)return n.min!==void 0&&a<n.min?null:e.t}return e.t},"getGreedy"),vg=ho(function(e,t){let n=e.t;if(!t)return e.terms.length;for(;n<e.terms.length;n+=1)if(R(e.terms[n],t,e.start_i+n,e.phrase_length)===!0)return n;return null},"greedyTo"),bg=ho(function(e,t){if(e.end===!0&&e.greedy===!0&&t.start_i+t.t<t.phrase_length-1){const n=Object.assign({},e,{end:!1});if(R(t.terms[t.t],n,t.start_i+t.t,t.phrase_length)===!0)return!0}return!1},"isEndGreedy");var yg=Object.defineProperty,$g=l((e,t)=>yg(e,"name",{value:t,configurable:!0}),"u$1s");const xr=$g(function(e,t){return e.groups[e.inGroup]||(e.groups[e.inGroup]={start:t,length:0}),e.groups[e.inGroup]},"getGroup");var wg=Object.defineProperty,Pg=l((e,t)=>wg(e,"name",{value:t,configurable:!0}),"i$1z");const kg=Pg(function(e){const{regs:t}=e,n=t[e.r],r=vg(e,t[e.r+1]);if(r===null||r===0||n.min!==void 0&&r-e.t<n.min)return null;if(n.max!==void 0&&r-e.t>n.max)return e.t=e.t+n.max,!0;if(e.hasGroup===!0){const a=xr(e,e.t);a.length=r-e.t}return e.t=r,!0},"doAstrix");var jg=Object.defineProperty,po=l((e,t)=>jg(e,"name",{value:t,configurable:!0}),"s$1a");const Ag=po(function(e){return Object.prototype.toString.call(e)==="[object Array]"},"isArray"),Mu=po(function(e,t=0){const n=e.regs[e.r];let r=!1;for(let a=0;a<n.choices.length;a+=1){const o=n.choices[a];if(!Ag(o))return!1;if(r=o.every((i,s)=>{let u=0;const c=e.t+s+t+u;if(e.terms[c]===void 0)return!1;const d=R(e.terms[c],i,c+e.start_i,e.phrase_length);if(d===!0&&i.greedy===!0)for(let h=1;h<e.terms.length;h+=1){const p=e.terms[c+h];if(p)if(R(p,i,e.start_i+h,e.phrase_length)===!0)u+=1;else break}return t+=u,d}),r){t+=o.length;break}}return r&&n.greedy===!0?Mu(e,t):t},"doOrBlock"),xg=po(function(e){let t=0;return e.regs[e.r].choices.every(n=>{const r=n.every((a,o)=>{const i=e.t+o;return e.terms[i]===void 0?!1:R(e.terms[i],a,i,e.phrase_length)});return r===!0&&n.length>t&&(t=n.length),r})===!0?t:!1},"doAndBlock");var Cg=Object.defineProperty,Ng=l((e,t)=>Cg(e,"name",{value:t,configurable:!0}),"i$1y");const Og=Ng(function(e){const{regs:t}=e,n=t[e.r],r=Mu(e);if(r){if(n.negative===!0)return null;if(e.hasGroup===!0){const a=xr(e,e.t);a.length+=r}if(n.end===!0){const a=e.phrase_length;if(e.t+e.start_i+r!==a)return null}return e.t+=r,!0}else if(!n.optional)return null;return!0},"orBlock");var Tg=Object.defineProperty,Ig=l((e,t)=>Tg(e,"name",{value:t,configurable:!0}),"i$1x");const Dg=Ig(function(e){const{regs:t}=e,n=t[e.r],r=xg(e);if(r){if(n.negative===!0)return null;if(e.hasGroup===!0){const a=xr(e,e.t);a.length+=r}if(n.end===!0){const a=e.phrase_length-1;if(e.t+e.start_i!==a)return null}return e.t+=r,!0}else if(!n.optional)return null;return!0},"andBlock");var Eg=Object.defineProperty,Hg=l((e,t)=>Eg(e,"name",{value:t,configurable:!0}),"m$F");const Gg=Hg(function(e,t,n){let r=0;for(let a=e.t;a<e.terms.length;a+=1){let o=R(e.terms[a],t,e.start_i+e.t,e.phrase_length);if(o||n&&(o=R(e.terms[a],n,e.start_i+e.t,e.phrase_length),o)||(r+=1,t.max!==void 0&&r===t.max))break}return r===0||t.min&&t.min>r?!1:(e.t+=r,!0)},"negGreedy");var Fg=Object.defineProperty,Vg=l((e,t)=>Fg(e,"name",{value:t,configurable:!0}),"g$s");const zg=Vg(function(e){const{regs:t}=e,n=t[e.r],r=Object.assign({},n);if(r.negative=!1,R(e.terms[e.t],r,e.start_i+e.t,e.phrase_length))return!1;if(n.optional){const a=t[e.r+1];a&&(R(e.terms[e.t],a,e.start_i+e.t,e.phrase_length)?e.r+=1:a.optional&&t[e.r+2]&&R(e.terms[e.t],t[e.r+2],e.start_i+e.t,e.phrase_length)&&(e.r+=2))}return n.greedy?Gg(e,r,t[e.r+1]):(e.t+=1,!0)},"doNegative");var Sg=Object.defineProperty,Bg=l((e,t)=>Sg(e,"name",{value:t,configurable:!0}),"c$1w");const Mg=Bg(function(e){const{regs:t}=e,n=t[e.r],r=e.terms[e.t],a=R(r,t[e.r+1],e.start_i+e.t,e.phrase_length);if(n.negative||a){const o=e.terms[e.t+1];(!o||!R(o,t[e.r+1],e.start_i+e.t,e.phrase_length))&&(e.r+=1)}},"foundOptional");var Lg=Object.defineProperty,Kg=l((e,t)=>Lg(e,"name",{value:t,configurable:!0}),"e$12");const Jg=Kg(function(e){const{regs:t,phrase_length:n}=e,r=t[e.r];return e.t=mg(e,t[e.r+1]),e.t===null||r.min&&r.min>e.t||r.end===!0&&e.start_i+e.t!==n?null:!0},"greedyMatch");var Wg=Object.defineProperty,qg=l((e,t)=>Wg(e,"name",{value:t,configurable:!0}),"o$1u");const Rg=qg(function(e){const t=e.terms[e.t],n=e.regs[e.r];if(t.implicit&&e.terms[e.t+1]){if(!e.terms[e.t+1].implicit)return;n.word===t.normal&&(e.t+=1),n.method==="hasContraction"&&(e.t+=1)}},"contractionSkip");var Ug=Object.defineProperty,Lu=l((e,t)=>Ug(e,"name",{value:t,configurable:!0}),"e$11");const Qg=Lu(function(e,t){const n=e.regs[e.r],r=xr(e,t);e.t>1&&n.greedy?r.length+=e.t-t:r.length++},"setGroup"),na=Lu(function(e){const{regs:t}=e,n=t[e.r],r=e.terms[e.t],a=e.t;return n.optional&&t[e.r+1]&&n.negative?!0:(n.optional&&t[e.r+1]&&Mg(e),r.implicit&&e.terms[e.t+1]&&Rg(e),e.t+=1,n.end===!0&&e.t!==e.terms.length&&n.greedy!==!0||n.greedy===!0&&!Jg(e)?null:(e.hasGroup===!0&&Qg(e,a),!0))},"simpleMatch");var _g=Object.defineProperty,Zg=l((e,t)=>_g(e,"name",{value:t,configurable:!0}),"s$19");const fo=Zg(function(e,t,n,r){if(e.length===0||t.length===0)return null;const a={t:0,terms:e,r:0,regs:t,groups:{},start_i:n,phrase_length:r,inGroup:null};for(;a.r<t.length;a.r+=1){const s=t[a.r];if(a.hasGroup=!!s.group,a.hasGroup===!0?a.inGroup=s.group:a.inGroup=null,!a.terms[a.t]){if(t.slice(a.r).some(u=>!u.optional)===!1)break;return null}if(s.anything===!0&&s.greedy===!0){if(!kg(a))return null;continue}if(s.choices!==void 0&&s.operator==="or"){if(!Og(a))return null;continue}if(s.choices!==void 0&&s.operator==="and"){if(!Dg(a))return null;continue}if(s.anything===!0){if(s.negative&&s.anything||!na(a))return null;continue}if(bg(s,a)===!0){if(!na(a))return null;continue}if(s.negative){if(!zg(a))return null;continue}if(R(a.terms[a.t],s,a.start_i+a.t,a.phrase_length)===!0){if(!na(a))return null;continue}if(s.optional!==!0)return null}const o=[null,n,a.t+n];if(o[1]===o[2])return null;const i={};return Object.keys(a.groups).forEach(s=>{const u=a.groups[s],c=n+u.start;i[s]=[null,c,c+u.length]}),{pointer:o,groups:i}},"tryHere");var Xg=Object.defineProperty,Yg=l((e,t)=>Xg(e,"name",{value:t,configurable:!0}),"u$1q");const em=Yg(function(e,t){const n=[],r={};return e.length===0?{ptrs:n,byGroup:r}:(typeof t=="number"&&(t=String(t)),t?e.forEach(a=>{a.groups[t]&&n.push(a.groups[t])}):e.forEach(a=>{n.push(a.pointer),Object.keys(a.groups).forEach(o=>{r[o]=r[o]||[],r[o].push(a.groups[o])})}),{ptrs:n,byGroup:r})},"getGroup");var tm=Object.defineProperty,nm=l((e,t)=>tm(e,"name",{value:t,configurable:!0}),"r$16");const rm=nm(function(e,t,n){return e=e.filter(r=>{const[a,o,i]=r.pointer,s=n[a].slice(o,i);for(let u=0;u<s.length;u+=1){const c=s.slice(u);if(fo(c,t,u,s.length)!==null)return!1}return!0}),e},"notIf");var am=Object.defineProperty,go=l((e,t)=>am(e,"name",{value:t,configurable:!0}),"a$1u");const Ku=go(function(e,t){return e.pointer[0]=t,Object.keys(e.groups).forEach(n=>{e.groups[n][0]=t}),e},"addSentence"),om=go(function(e,t,n){let r=fo(e,t,0,e.length);return r?(r=Ku(r,n),r):null},"handleStart"),im=go(function(e,t,n){n=n||[];const{regs:r,group:a,justOne:o}=t;let i=[];if(!r||r.length===0)return{ptrs:[],byGroup:{}};const s=r.filter(u=>u.optional!==!0&&u.negative!==!0).length;e:for(let u=0;u<e.length;u+=1){const c=e[u];if(!(n[u]&&ig(r,n[u]))){if(r[0].start===!0){const d=om(c,r,u,a);d&&i.push(d);continue}for(let d=0;d<c.length;d+=1){const h=c.slice(d);if(h.length<s)break;let p=fo(h,r,d,c.length);if(p){if(p=Ku(p,u),i.push(p),o===!0)break e;const b=p.pointer[2];Math.abs(b-1)>d&&(d=Math.abs(b-1))}}}}return r[r.length-1].end===!0&&(i=i.filter(u=>{const c=u.pointer[0];return e[c].length===u.pointer[2]})),t.notIf&&(i=rm(i,t.notIf,e)),i=em(i,a),i.ptrs.forEach(u=>{const[c,d,h]=u;u[3]=e[c][d].id,u[4]=e[c][h-1].id}),i},"runMatch"),sm={one:{termMethods:hn,parseMatch:rg,match:im}};var um=Object.defineProperty,lm=l((e,t)=>um(e,"name",{value:t,configurable:!0}),"c$1r");const cm={parseMatch:lm(function(e,t){const n=this.world(),r=n.methods.one.killUnicode;return r&&(e=r(e,n)),n.methods.one.parseMatch(e,t,n)},"parseMatch")},dm={api:Gf,methods:sm,lib:cm};var hm=Object.defineProperty,Cr=l((e,t)=>hm(e,"name",{value:t,configurable:!0}),"i$1v");const pm=/^\../,fm=/^#./,gm=Cr(e=>(e=e.replace(/&/g,"&"),e=e.replace(/</g,"<"),e=e.replace(/>/g,">"),e=e.replace(/"/g,"""),e=e.replace(/'/g,"'"),e),"escapeXml"),mm=Cr(function(e){let t="",n="</span>";return e=gm(e),pm.test(e)?t=`<span class="${e.replace(/^\./,"")}"`:fm.test(e)?t=`<span id="${e.replace(/^#/,"")}"`:(t=`<${e}`,n=`</${e}>`),t+=">",{start:t,end:n}},"toTag"),vm=Cr(function(e,t){const n={},r={};return Object.keys(t).forEach(a=>{let o=t[a];const i=mm(a);typeof o=="string"&&(o=e.match(o)),o.docs.forEach(s=>{if(s.every(d=>d.implicit))return;const u=s[0].id;n[u]=n[u]||[],n[u].push(i.start);const c=s[s.length-1].id;r[c]=r[c]||[],r[c].push(i.end)})}),{starts:n,ends:r}},"getIndex"),bm=Cr(function(e){const{starts:t,ends:n}=vm(this,e);let r="";return this.docs.forEach(a=>{for(let o=0;o<a.length;o+=1){const i=a[o];t.hasOwnProperty(i.id)&&(r+=t[i.id].join("")),r+=i.pre||"",r+=i.text||"",n.hasOwnProperty(i.id)&&(r+=n[i.id].join("")),r+=i.post||""}}),r},"html"),ym={html:bm};var $m=Object.defineProperty,Ju=l((e,t)=>$m(e,"name",{value:t,configurable:!0}),"n$T");const Wu=/[,:;)\]*.?~!\u0022\uFF02\u201D\u2019\u00BB\u203A\u2032\u2033\u2034\u301E\u00B4—-]+$/,xa=/^[(['"*~\uFF02\u201C\u2018\u201F\u201B\u201E\u2E42\u201A\u00AB\u2039\u2035\u2036\u2037\u301D\u0060\u301F]+/,wm=/[,:;)('"\u201D\]]/,Pm=/^[-–—]$/,km=/ /,bt=Ju(function(e,t,n=!0){let r="";return e.forEach(a=>{let o=a.pre||"",i=a.post||"";t.punctuation==="some"&&(o=o.replace(xa,""),Pm.test(i)&&(i=" "),i=i.replace(wm,""),i=i.replace(/\?!+/,"?"),i=i.replace(/!+/,"!"),i=i.replace(/\?+/,"?"),i=i.replace(/\.{2,}/,""),a.tags.has("Abbreviation")&&(i=i.replace(/\./,""))),t.whitespace==="some"&&(o=o.replace(/\s/,""),i=i.replace(/\s+/," ")),t.keepPunct||(o=o.replace(xa,""),i==="-"?i=" ":i=i.replace(Wu,""));let s=a[t.form||"text"]||a.normal||"";t.form==="implicit"&&(s=a.implicit||a.text),t.form==="root"&&a.implicit&&(s=a.root||a.implicit||a.normal),(t.form==="machine"||t.form==="implicit"||t.form==="root")&&a.implicit&&(!i||!km.test(i))&&(i+=" "),r+=o+s+i}),n===!1&&(r=r.trim()),t.lowerCase===!0&&(r=r.toLowerCase()),r},"textFromTerms"),jm=Ju(function(e,t){let n="";if(!e||!e[0]||!e[0][0])return n;for(let r=0;r<e.length;r+=1)n+=bt(e[r],t,!0);if(t.keepSpace||(n=n.trim()),t.keepEndPunct===!1){e[0][0].tags.has("Emoticon")||(n=n.replace(xa,""));const r=e[e.length-1];r[r.length-1].tags.has("Emoticon")||(n=n.replace(Wu,"")),n.endsWith("'")&&!n.endsWith("s'")&&(n=n.replace(/'/,""))}return t.cleanWhitespace===!0&&(n=n.trim()),n},"textFromDoc"),st={text:{form:"text"},normal:{whitespace:"some",punctuation:"some",case:"some",unicode:"some",form:"normal"},machine:{keepSpace:!1,whitespace:"some",punctuation:"some",case:"none",unicode:"some",form:"machine"},root:{keepSpace:!1,whitespace:"some",punctuation:"some",case:"some",unicode:"some",form:"root"},implicit:{form:"implicit"}};st.clean=st.normal;st.reduced=st.root;var Am=Object.defineProperty,xm=l((e,t)=>Am(e,"name",{value:t,configurable:!0}),"h$18");const qu=[];let yt=0;for(;yt<64;)qu[yt]=0|Math.sin(++yt%Math.PI)*4294967296;const mo=xm(function(e){let t,n,r,a=decodeURI(encodeURI(e))+"",o=a.length;const i=[t=1732584193,n=4023233417,~t,~n],s=[];for(e=--o/4+2|15,s[--e]=o*8;~o;)s[o>>2]|=a.charCodeAt(o)<<8*o--;for(yt=a=0;yt<e;yt+=16){for(o=i;a<64;o=[r=o[3],t+((r=o[0]+[t&n|~t&r,r&t|~r&n,t^n^r,n^(t|~r)][o=a>>4]+qu[a]+~~s[yt|[a,5*a+1,3*a+5,7*a][o]&15])<<(o=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*o+a++%4])|r>>>-o),t,n])t=o[1]|0,n=o[2];for(a=4;a;)i[--a]+=o[a]}for(e="";a<32;)e+=(i[a>>3]>>(1^a++)*4&15).toString(16);return e},"md5");var Cm=Object.defineProperty,oe=l((e,t)=>Cm(e,"name",{value:t,configurable:!0}),"s$16");const Nm={text:!0,terms:!0},Pi={case:"none",unicode:"some",form:"machine",punctuation:"some"},ra=oe(function(e,t){return Object.assign({},e,t)},"merge"),Ze={text:oe(e=>bt(e,{keepPunct:!0},!1),"text"),normal:oe(e=>bt(e,ra(st.normal,{keepPunct:!0}),!1),"normal"),implicit:oe(e=>bt(e,ra(st.implicit,{keepPunct:!0}),!1),"implicit"),machine:oe(e=>bt(e,Pi,!1),"machine"),root:oe(e=>bt(e,ra(Pi,{form:"root"}),!1),"root"),hash:oe(e=>mo(bt(e,{keepPunct:!0},!1)),"hash"),offset:oe(e=>{const t=Ze.text(e).length;return{index:e[0].offset.index,start:e[0].offset.start,length:t}},"offset"),terms:oe(e=>e.map(t=>{const n=Object.assign({},t);return n.tags=Array.from(t.tags),n}),"terms"),confidence:oe((e,t,n)=>t.eq(n).confidence(),"confidence"),syllables:oe((e,t,n)=>t.eq(n).syllables(),"syllables"),sentence:oe((e,t,n)=>t.eq(n).fullSentence().text(),"sentence"),dirty:oe(e=>e.some(t=>t.dirty===!0),"dirty")};Ze.sentences=Ze.sentence;Ze.clean=Ze.normal;Ze.reduced=Ze.root;const Om=oe(function(e,t){return t=t||{},typeof t=="string"&&(t={}),t=Object.assign({},Nm,t),t.offset&&e.compute("offset"),e.docs.map((n,r)=>{const a={};return Object.keys(t).forEach(o=>{t[o]&&Ze[o]&&(a[o]=Ze[o](n,e,r))}),a})},"toJSON"),Ca={json:oe(function(e){const t=Om(this,e);return typeof e=="number"?t[e]:t},"json")};Ca.data=Ca.json;var Tm=Object.defineProperty,Ru=l((e,t)=>Tm(e,"name",{value:t,configurable:!0}),"i$1t");const Im=Ru(()=>typeof window<"u"&&window.document,"isClientSide"),Dm=Ru(function(e){const t=this.methods.one.debug||{};return e&&t.hasOwnProperty(e)?(t[e](this),this):Im()?(t.clientSide(this),this):(t.tags(this),this)},"debug");var Em=Object.defineProperty,vo=l((e,t)=>Em(e,"name",{value:t,configurable:!0}),"f$1n");const Hm=vo(function(e){const t=e.pre||"",n=e.post||"";return t+e.text+n},"toText"),Gm=vo(function(e,t){const n={};return Object.keys(t).forEach(r=>{e.match(r).fullPointer.forEach(a=>{n[a[3]]={fn:t[r],end:a[2]}})}),n},"findStarts"),Uu=vo(function(e,t){const n=Gm(e,t);let r="";return e.docs.forEach((a,o)=>{for(let i=0;i<a.length;i+=1){const s=a[i];if(n.hasOwnProperty(s.id)){const{fn:u,end:c}=n[s.id],d=e.update([[o,i,c]]);r+=a[i].pre||"",r+=u(d),i=c-1,r+=a[i].post||""}else r+=Hm(s)}}),r},"wrap");var Fm=Object.defineProperty,Nr=l((e,t)=>Fm(e,"name",{value:t,configurable:!0}),"i$1s");const Vm=Nr(e=>Object.prototype.toString.call(e)==="[object Object]","isObject"),zm=Nr(function(e){const t={};return e.forEach(n=>{t[n]=t[n]||0,t[n]+=1}),Object.keys(t).map(n=>({normal:n,count:t[n]})).sort((n,r)=>n.count>r.count?-1:0)},"topk"),Sm=Nr(function(e){if(Vm(e))return Uu(this,e);if(e==="text")return this.text();if(e==="normal")return this.text("normal");if(e==="root")return this.text("root");if(e==="machine"||e==="reduced")return this.text("machine");if(e==="hash"||e==="md5")return mo(this.text());if(e==="json")return this.json();if(e==="offset"||e==="offsets")return this.compute("offset"),this.json({offset:!0});if(e==="array")return this.docs.map(t=>t.reduce((n,r)=>n+r.pre+r.text+r.post,"").trim()).filter(t=>t);if(e==="freq"||e==="frequency"||e==="topk")return zm(this.json({normal:!0}).map(t=>t.normal));if(e==="terms"){let t=[];return this.docs.forEach(n=>{let r=n.map(a=>a.text);r=r.filter(a=>a),t=t.concat(r)}),t}return e==="tags"?this.docs.map(t=>t.reduce((n,r)=>(n[r.implicit||r.normal]=Array.from(r.tags),n),{})):e==="debug"?this.debug():this.text()},"out"),Bm={debug:Dm,out:Sm,wrap:Nr(function(e){return Uu(this,e)},"wrap")};var Mm=Object.defineProperty,Qu=l((e,t)=>Mm(e,"name",{value:t,configurable:!0}),"n$P");const Lm=Qu(e=>Object.prototype.toString.call(e)==="[object Object]","isObject"),Km={text:Qu(function(e){let t={};if(e&&typeof e=="string"&&st.hasOwnProperty(e)?t=Object.assign({},st[e]):e&&Lm(e)&&(t=Object.assign({},e)),t.keepSpace===void 0&&!this.isFull()&&(t.keepSpace=!1),t.keepEndPunct===void 0&&this.pointer){const n=this.pointer[0];n&&n[1]?t.keepEndPunct=!1:t.keepEndPunct=!0}return t.keepPunct===void 0&&(t.keepPunct=!0),t.keepSpace===void 0&&(t.keepSpace=!0),jm(this.docs,t)},"text")};var Jm=Object.defineProperty,Wm=l((e,t)=>Jm(e,"name",{value:t,configurable:!0}),"o$1r");const qm=Object.assign({},Bm,Km,Ca,ym),Rm=Wm(function(e){Object.assign(e.prototype,qm)},"addAPI");var Um=Object.defineProperty,Qm=l((e,t)=>Um(e,"name",{value:t,configurable:!0}),"l$15");const _m=Qm(function(e){console.log("%c -=-=- ","background-color:#6699cc;"),e.forEach(t=>{console.groupCollapsed(t.text());const n=t.docs[0].map(r=>{let a=r.text||"-";r.implicit&&(a="["+r.implicit+"]");const o="["+Array.from(r.tags).join(", ")+"]";return{text:a,tags:o}});console.table(n,["text","tags"]),console.groupEnd()})},"logClientSide");var Zm=Object.defineProperty,Se=l((e,t)=>Zm(e,"name",{value:t,configurable:!0}),"m$C");const Be="\x1B[0m",pe={green:Se(e=>"\x1B[32m"+e+Be,"green"),red:Se(e=>"\x1B[31m"+e+Be,"red"),blue:Se(e=>"\x1B[34m"+e+Be,"blue"),magenta:Se(e=>"\x1B[35m"+e+Be,"magenta"),cyan:Se(e=>"\x1B[36m"+e+Be,"cyan"),yellow:Se(e=>"\x1B[33m"+e+Be,"yellow"),black:Se(e=>"\x1B[30m"+e+Be,"black"),dim:Se(e=>"\x1B[2m"+e+Be,"dim"),i:Se(e=>"\x1B[3m"+e+Be,"i")};var Xm=Object.defineProperty,_u=l((e,t)=>Xm(e,"name",{value:t,configurable:!0}),"i$1q");const Ym=_u(function(e,t){return t.one.tagSet&&(e=e.map(n=>{if(!t.one.tagSet.hasOwnProperty(n))return n;const r=t.one.tagSet[n].color||"blue";return pe[r](n)})),e.join(", ")},"tagString"),e0=_u(function(e){const{docs:t,model:n}=e;t.length===0&&console.log(pe.blue(`
|
|
3
3
|
──────`)),t.forEach(r=>{console.log(pe.blue(`
|
|
4
4
|
┌─────────`)),r.forEach(a=>{const o=[...a.tags||[]];let i=a.text||"-";a.sense&&(i=`{${a.normal}/${a.sense}}`),a.implicit&&(i="["+a.implicit+"]"),i=pe.yellow(i);let s="'"+i+"'";if(a.reference){const c=e.update([a.reference]).text("normal");s+=` - ${pe.dim(pe.i("["+c+"]"))}`}s=s.padEnd(18);const u=pe.blue(" │ ")+pe.i(s)+" - "+Ym(o,n);console.log(u)})}),console.log(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var U=Object.defineProperty;var I=(t,e)=>U(t,"name",{value:e,configurable:!0});import{createRequire as A}from"node:module";import{j as O,E as v,T as G,I as j,e as F}from"../packem_shared/Table-
|
|
1
|
+
var U=Object.defineProperty;var I=(t,e)=>U(t,"name",{value:e,configurable:!0});import{createRequire as A}from"node:module";import{j as O,E as v,T as G,I as j,e as F}from"../packem_shared/Table-3pFgIUZ2-DABgc6rj.js";import{z as D}from"../packem_shared/readFileSync-DseCu8sg-DEq4Fn3a.js";import{readLastRunSummary as K}from"@visulima/task-runner";import{r as H,a as M,b as V,c as z}from"../packem_shared/ai-fix-BkPUHA0z.js";import{F as q,p as u}from"./bin.js";const L=A(import.meta.url),b=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,T=I(t=>{if(typeof b<"u"&&b.versions&&b.versions.node){const[e,o]=b.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return b.getBuiltinModule(t)}return L(t)},"__cjs_getBuiltinModule"),{spawn:k}=T("node:child_process"),{readFile:J}=T("node:fs/promises");var Q=Object.defineProperty,g=I((t,e)=>Q(t,"name",{value:e,configurable:!0}),"i");const W=g(t=>{if(!t)return;const e=/^refs\/pull\/(\d+)\//.exec(t);return e?Number.parseInt(e[1],10):void 0},"parsePrNumberFromGithubRef"),Y=g(async t=>{if(!t)return{prNumber:void 0,sha:void 0};try{const e=await J(t,"utf8"),o=JSON.parse(e),r=o.pull_request?.number??o.issue?.number??o.number,i=o.pull_request?.head?.sha;return{prNumber:r,sha:i}}catch{return{prNumber:void 0,sha:void 0}}},"readPrNumberFromGithubEvent"),Z=g(async t=>{const e=W(t.GITHUB_REF),{prNumber:o,sha:r}=e===void 0?await Y(t.GITHUB_EVENT_PATH):{prNumber:e,sha:void 0};return{apiBaseUrl:void 0,buildId:void 0,buildNumber:void 0,prNumber:e??o,provider:"github-actions",repo:t.GITHUB_REPOSITORY,sha:r??t.GITHUB_SHA,token:t.GITHUB_TOKEN}},"detectGithubActions"),X=g(t=>{const e=t.CI_MERGE_REQUEST_IID,o=e!==void 0&&e!==""?Number.parseInt(e,10):void 0,r=t.CI_API_V4_URL,i=t.GITLAB_TOKEN??t.CI_TOKEN;return{apiBaseUrl:r,buildId:void 0,buildNumber:void 0,prNumber:Number.isFinite(o)?o:void 0,provider:"gitlab-ci",repo:t.CI_PROJECT_ID??t.CI_PROJECT_PATH,sha:t.CI_COMMIT_SHA,token:i}},"detectGitlabCi"),ee=g(t=>{const e=t.BUILDKITE_PULL_REQUEST,o=e!==void 0&&e!==""&&e!=="false"?Number.parseInt(e,10):void 0,r=t.BUILDKITE_BUILD_NUMBER,i=r!==void 0&&r!==""?Number.parseInt(r,10):void 0,n=t.BUILDKITE_ORGANIZATION_SLUG,a=t.BUILDKITE_PIPELINE_SLUG,s=n!==void 0&&n!==""&&a!==void 0&&a!==""?`${n}/${a}`:void 0;return{apiBaseUrl:(t.BUILDKITE_API_BASE_URL??"https://api.buildkite.com").replace(/\/+$/,""),buildId:t.BUILDKITE_BUILD_ID,buildNumber:Number.isFinite(i)?i:void 0,prNumber:Number.isFinite(o)?o:void 0,provider:"buildkite",repo:s,sha:t.BUILDKITE_COMMIT,token:t.BUILDKITE_API_TOKEN}},"detectBuildkite"),te=g(async(t=process.env)=>t.GITHUB_ACTIONS==="true"?await Z(t):t.GITLAB_CI==="true"?X(t):t.BUILDKITE==="true"?ee(t):{apiBaseUrl:void 0,buildId:void 0,buildNumber:void 0,prNumber:void 0,provider:"unknown",repo:void 0,sha:void 0,token:void 0},"detectCiContext");var oe=Object.defineProperty,h=I((t,e)=>oe(t,"name",{value:e,configurable:!0}),"p");const re=h((t,e,o,r)=>new Promise(i=>{const n=["pr","comment",String(e),"--body-file","-"];r&&n.push("--repo",r);const a=k(t,n,{stdio:["pipe","ignore","pipe"]});let s="";a.stderr?.setEncoding("utf8"),a.stderr?.on("data",d=>{s+=d}),a.once("error",()=>{i({exitCode:127,stderr:s})}),a.once("close",d=>{i({exitCode:d??-1,stderr:s})}),a.stdin?.on("error",()=>{}),a.stdin?.end(o)}),"runGhComment"),ie=h(async(t,e,o,r,i)=>{const n=`https://api.github.com/repos/${e}/issues/${String(o)}/comments`;try{const a=await t(n,{body:JSON.stringify({body:r}),headers:{Accept:"application/vnd.github+json",Authorization:`Bearer ${i}`,"Content-Type":"application/json","X-GitHub-Api-Version":"2022-11-28"},method:"POST"});if(!a.ok){const s=await a.text().catch(()=>"");return{error:`GitHub REST returned ${String(a.status)}: ${s.slice(0,500)}`,ok:!1}}return{ok:!0}}catch(a){return{error:a instanceof Error?a.message:String(a),ok:!1}}},"postViaGithubRest"),ne=h(async(t,e,o,r,i,n)=>{const a=encodeURIComponent(o),s=`${e.replace(/\/+$/,"")}/projects/${a}/merge_requests/${String(r)}/notes`;try{const d=await t(s,{body:JSON.stringify({body:i}),headers:{"Content-Type":"application/json","PRIVATE-TOKEN":n},method:"POST"});if(!d.ok){const p=await d.text().catch(()=>"");return{error:`GitLab REST returned ${String(d.status)}: ${p.slice(0,500)}`,ok:!1}}return{ok:!0}}catch(d){return{error:d instanceof Error?d.message:String(d),ok:!1}}},"postViaGitlabRest"),ae=h((t,e,o,r)=>new Promise(i=>{const n=k(t,["annotate","--style",o,"--context",r],{stdio:["pipe","ignore","pipe"]});let a="";n.stderr?.setEncoding("utf8"),n.stderr?.on("data",s=>{a+=s}),n.once("error",()=>{i({exitCode:127,stderr:a})}),n.once("close",s=>{i({exitCode:s??-1,stderr:a})}),n.stdin?.on("error",()=>{}),n.stdin?.end(e)}),"runBuildkiteAnnotate"),se=h(async(t,e,o,r,i,n,a,s)=>{const[d,p]=o.split("/",2);if(!d||!p)return{error:`Buildkite repo identifier \`${o}\` is not in {org}/{pipeline} form.`,ok:!1};const m=`${e}/v2/organizations/${encodeURIComponent(d)}/pipelines/${encodeURIComponent(p)}/builds/${String(r)}/annotations`;try{const c=await t(m,{body:JSON.stringify({body:i,context:a,style:n}),headers:{Authorization:`Bearer ${s}`,"Content-Type":"application/json"},method:"POST"});if(!c.ok){const l=await c.text().catch(()=>"");return{error:`Buildkite REST returned ${String(c.status)}: ${l.slice(0,500)}`,ok:!1}}return{ok:!0}}catch(c){return{error:c instanceof Error?c.message:String(c),ok:!1}}},"postViaBuildkiteRest"),de=h(async(t,e,o,r)=>{const i=e.buildId?`vis-ai-heal-${e.buildId}`:"vis-ai-heal",n="info",a=await ae(o,t,n,i);if(a.exitCode===0)return{method:"buildkite-cli",posted:!0};if(!e.apiBaseUrl||!e.repo||e.buildNumber===void 0||!e.token){const d=[];return e.repo||d.push("BUILDKITE_ORGANIZATION_SLUG / BUILDKITE_PIPELINE_SLUG"),e.buildNumber===void 0&&d.push("BUILDKITE_BUILD_NUMBER"),e.token||d.push("BUILDKITE_API_TOKEN (with `write_build_annotations` scope)"),{error:`buildkite-agent annotate exited ${String(a.exitCode)} (${a.stderr.trim().slice(0,200)}); cannot fall back to REST without ${d.join(", ")}`,method:"buildkite-cli",posted:!1}}const s=await se(r,e.apiBaseUrl,e.repo,e.buildNumber,t,n,i,e.token);return s.ok?{method:"rest",posted:!0}:{error:`buildkite-agent annotate exited ${String(a.exitCode)}; REST fallback also failed: ${s.error??"unknown"}`,method:"rest",posted:!1}},"postBuildkiteAnnotation"),pe=h(async(t,e,o,r)=>{if(e.prNumber===void 0)return{method:"skipped",posted:!1};const i=await re(o,e.prNumber,t,e.repo);if(i.exitCode===0)return{method:"gh-cli",posted:!0};if(!e.repo||!e.token)return{error:`gh exited ${String(i.exitCode)} (${i.stderr.trim().slice(0,200)}); cannot fall back to REST without GITHUB_REPOSITORY + GITHUB_TOKEN`,method:"gh-cli",posted:!1};const n=await ie(r,e.repo,e.prNumber,t,e.token);return n.ok?{method:"rest",posted:!0}:{error:`gh exited ${String(i.exitCode)}; REST fallback also failed: ${n.error??"unknown"}`,method:"rest",posted:!1}},"postGithubComment"),ce=h(async(t,e,o)=>{if(e.prNumber===void 0)return{method:"skipped",posted:!1};if(!e.apiBaseUrl||!e.repo)return{error:"GitLab CI context is missing CI_API_V4_URL or CI_PROJECT_ID; cannot post note.",method:"rest",posted:!1};if(!e.token)return{error:"GitLab CI context has no token. CI_JOB_TOKEN cannot post MR notes — set GITLAB_TOKEN to a personal/project access token with `api` scope.",method:"rest",posted:!1};const r=await ne(o,e.apiBaseUrl,e.repo,e.prNumber,t,e.token);return r.ok?{method:"rest",posted:!0}:{error:r.error,method:"rest",posted:!1}},"postGitlabComment"),ue=h(async t=>{const{body:e,buildkiteAgentBin:o="buildkite-agent",context:r,fetchImpl:i=globalThis.fetch,ghBin:n="gh"}=t;return r.provider==="github-actions"?await pe(e,r,n,i):r.provider==="gitlab-ci"?await ce(e,r,i):r.provider==="buildkite"?await de(e,r,o,i):{method:"skipped",posted:!1}},"postPrComment");var le=Object.defineProperty,f=I((t,e)=>le(t,"name",{value:e,configurable:!0}),"l");const C=f(t=>{let e=0,o=0;for(const r of t)r.status==="applied"?e+=1:o+=1;return{applied:e,failed:o}},"summarizeApply"),_=f((t,e,o)=>{const r=H(t,e,o),i=D(t,r);return i===""||i.startsWith("..")?r:i},"formatDisplayPath"),fe=f((t,e,o,r)=>new Promise(i=>{const n=process.argv[1];if(!n){i({exitCode:-1,stderr:"Cannot locate vis bin (process.argv[1] missing).",stdout:""});return}const a=[n,"run",o,"--projects",e,"--no-cache","--summarize","--fail-fast"],s=k(process.execPath,a,{cwd:t,env:{...process.env,NO_COLOR:"1"},stdio:["ignore","pipe","pipe"]});let d="",p="";const m=setTimeout(()=>{s.kill("SIGTERM"),setTimeout(()=>s.kill("SIGKILL"),2e3).unref()},r);s.stdout?.setEncoding("utf8"),s.stdout?.on("data",c=>{d+=c}),s.stderr?.setEncoding("utf8"),s.stderr?.on("data",c=>{p+=c}),s.once("error",c=>{clearTimeout(m),i({exitCode:-1,stderr:c.message,stdout:d})}),s.once("close",c=>{clearTimeout(m),i({exitCode:c??-1,stderr:p,stdout:d})})}),"validateFixByRerun"),me=6e4,y=f(t=>{let e=0;const o=t.match(/`{3,}/g);if(o)for(const r of o)e=Math.max(e,r.length);return"`".repeat(Math.max(3,e+1))},"pickFence"),$=f((t,e,o)=>{if(t.patches.length===0)return"_No patches proposed._";const r=[];for(const[i,n]of t.patches.entries()){const a=_(e,o,n.file),s=[`**[${String(i+1)}] \`${a}\`**`];n.reason&&s.push(`_${n.reason}_`);const d=y(`${n.oldString}
|
|
2
2
|
${n.newString}`);s.push(`${d}diff`);for(const p of n.oldString.split(`
|
|
3
3
|
`))s.push(`- ${p}`);for(const p of n.newString.split(`
|
|
4
4
|
`))s.push(`+ ${p}`);s.push(d),r.push(s.join(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Ke=Object.defineProperty;var m=(e,t)=>Ke(e,"name",{value:t,configurable:!0});import{createRequire as Ze}from"node:module";import{B as et,M as U,r as V,j as tt,I as N,N as w,q as W,e as z}from"../packem_shared/Table-
|
|
1
|
+
var Ke=Object.defineProperty;var m=(e,t)=>Ke(e,"name",{value:t,configurable:!0});import{createRequire as Ze}from"node:module";import{B as et,M as U,r as V,j as tt,I as N,N as w,q as W,e as z}from"../packem_shared/Table-3pFgIUZ2-DABgc6rj.js";import{h as it,E as R,c as L,b as ne}from"../packem_shared/index-K8aQuMvx.js";const Qe=Ze(import.meta.url),M=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Xe=m(e=>{if(typeof M<"u"&&M.versions&&M.versions.node){const[t,n]=M.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return M.getBuiltinModule(e)}return Qe(e)},"__cjs_getBuiltinModule"),{createRequire:nt}=Xe("node:module");var rt=Object.defineProperty,ot=m((e,t)=>rt(e,"name",{value:t,configurable:!0}),"f$2"),at=Object.defineProperty,st=ot((e,t)=>at(e,"name",{value:t,configurable:!0}),"s"),lt=Object.defineProperty,ct=st((e,t)=>lt(e,"name",{value:t,configurable:!0}),"a");const ut=/^#?([a-f\d]{3}|[a-f\d]{6})$/i,re=ct(e=>{let[,t]=ut.exec(e)??[];const n=t?t.length:0;if(n===3){const r=t.charAt(0),o=t.charAt(1),a=t.charAt(2);t=r+r+o+o+a+a}else if(n!==6)return[0,0,0];const i=Number.parseInt(t,16);return[i>>16&255,i>>8&255,i&255]},"convertHexToRgb");var dt=Object.defineProperty,ht=m((e,t)=>dt(e,"name",{value:t,configurable:!0}),"o$1"),ft=Object.defineProperty,pt=ht((e,t)=>ft(e,"name",{value:t,configurable:!0}),"s"),gt=Object.defineProperty,fe=pt((e,t)=>gt(e,"name",{value:t,configurable:!0}),"e");const Me=fe((e,t,n)=>e===t&&t===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/51)+6*Math.round(t/51)+Math.round(n/51),"rgbToAnsi256"),oe=fe(e=>{let t,n,i;if(e<8)return 30+e;if(e<16)return 90+(e-8);if(e>=232)t=n=i=((e-232)*10+8)/255;else{e-=16;const a=e%36;t=Math.floor(e/36)/5,n=Math.floor(a/6)/5,i=a%6/5}const r=Math.max(t,n,i)*2;if(r===0)return 30;const o=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(t));return r===2?o+60:o},"ansi256To16"),we=fe((e,t,n)=>oe(Me(e,t,n)),"rgbToAnsi16");var mt=Object.defineProperty,Re=m((e,t)=>mt(e,"name",{value:t,configurable:!0}),"m"),bt=Object.defineProperty,P=Re((e,t)=>bt(e,"name",{value:t,configurable:!0}),"u"),wt=Object.defineProperty,yt=P((e,t)=>wt(e,"name",{value:t,configurable:!0}),"e");function J({onlyFirst:e=!1}={}){const t="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(t,e?void 0:"g")}m(J,"$$3");Re(J,"j");P(J,"t$1");yt(J,"ansiRegex");var $t=Object.defineProperty,vt=P((e,t)=>$t(e,"name",{value:t,configurable:!0}),"n$1");const A=vt((e,t,n)=>t>e?t:Math.min(e,n),"clamp");var Nt=Object.defineProperty,y=P((e,t)=>Nt(e,"name",{value:t,configurable:!0}),"b");const p=39,g=49,ye=10,ae=et(),ke={close:"",open:""},l=ae>0?(e,t)=>({close:`\x1B[${String(t)}m`,open:`\x1B[${String(e)}m`}):()=>ke,$e=y(e=>(t,n,i)=>e(Me(Number(t),Number(n),Number(i))),"createRgbFunction"),ve=y(e=>t=>{const[n,i,r]=re(t);return e(n,i,r)},"createHexFunction");let se=y(e=>l(`38;5;${String(e)}`,p),"createAnsi256"),le=y(e=>l(`48;5;${String(e)}`,g),"createBgAnsi256"),D=y((e,t,n)=>l(`38;2;${String(e)};${String(t)};${String(n)}`,p),"createRgb"),Y=y((e,t,n)=>l(`48;2;${String(e)};${String(t)};${String(n)}`,g),"createBgRgb");ae===1?(se=y(e=>l(oe(Number(e)),p),"createAnsi256"),le=y(e=>l(oe(Number(e))+ye,g),"createBgAnsi256"),D=y((e,t,n)=>l(we(Number(e),Number(t),Number(n)),p),"createRgb"),Y=y((e,t,n)=>l(we(Number(e),Number(t),Number(n))+ye,g),"createBgRgb")):ae===2&&(D=$e(se),Y=$e(le));const Ne={bold:l(1,22),dim:l(2,22),hidden:l(8,28),inverse:l(7,27),italic:l(3,23),overline:l(53,55),reset:l(0,0),strike:l(9,29),strikethrough:l(9,29),underline:l(4,24),visible:ke},Oe={bgBlack:l(40,g),bgBlackBright:l(100,g),bgBlue:l(44,g),bgBlueBright:l(104,g),bgCyan:l(46,g),bgCyanBright:l(106,g),bgGray:l(100,g),bgGreen:l(42,g),bgGreenBright:l(102,g),bgGrey:l(100,g),bgMagenta:l(45,g),bgMagentaBright:l(105,g),bgRed:l(41,g),bgRedBright:l(101,g),bgWhite:l(47,g),bgWhiteBright:l(107,g),bgYellow:l(43,g),bgYellowBright:l(103,g),black:l(30,p),blackBright:l(90,p),blue:l(34,p),blueBright:l(94,p),cyan:l(36,p),cyanBright:l(96,p),gray:l(90,p),green:l(32,p),greenBright:l(92,p),grey:l(90,p),magenta:l(35,p),magentaBright:l(95,p),red:l(31,p),redBright:l(91,p),white:l(37,p),whiteBright:l(97,p),yellow:l(33,p),yellowBright:l(93,p)},Ae={bg:y(e=>le(A(e,0,255)),"bg"),bgHex:ve(Y),bgRgb:y((e,t,n)=>Y(A(e,0,255),A(t,0,255),A(n,0,255)),"bgRgb"),fg:y(e=>se(A(e,0,255)),"fg"),hex:ve(D),rgb:y((e,t,n)=>D(A(e,0,255),A(t,0,255),A(n,0,255)),"rgb")};var Ot=Object.defineProperty,At=P((e,t)=>Ot(e,"name",{value:t,configurable:!0}),"s");const St=At((e,t,n)=>{if(t==="")return e;let i=e.indexOf(t);if(i<0)return e;const r=t.length;let o=0,a="";for(;~i;)a+=e.slice(o,i)+n,o=i+r,i=e.indexOf(t,o);return a+e.slice(o)},"stringReplaceAll");var jt=Object.defineProperty,T=P((e,t)=>jt(e,"name",{value:t,configurable:!0}),"a");const S={};let ce=null;const xt=T((e,t,n)=>{if(!e)return"";let i;if(e.raw===void 0?i=String(e):i=String.raw(e,...t),i.includes("\x1B"))for(let r=n;r;r=r.props)i=St(i,r.close,r.open);return i.includes(`
|
|
2
2
|
`)&&(i=i.replace(/(\r*\n)/g,`${n.closeStack}$1${n.openStack}`)),n.openStack+i+n.closeStack},"wrapText"),ue=T(({props:e},{close:t,open:n})=>{const i=(e?.openStack??"")+n,r=t+(e?.closeStack??""),o=T((a,...s)=>xt(a,s,o.props),"style");return Object.setPrototypeOf(o,ce),o.props={close:t,closeStack:r,open:n,openStack:i,props:e},o.open=i,o.close=r,o},"createStyle"),Et=T(function(){const e=T(t=>String(t),"self");e.strip=t=>t.replaceAll(J(),"");for(const t in Oe)S[t]={get(){const n=ue(this,Oe[t]);return Object.defineProperty(this,t,{value:n}),n}};for(const t in Ne)S[t]={get(){const n=ue(this,Ne[t]);return Object.defineProperty(this,t,{value:n}),n}};return ce=Object.defineProperties({},S),Object.setPrototypeOf(e,ce),e},"Colorize");for(const e in Ae)S[e]={get(){return(...t)=>ue(this,Ae[e](...t))}};S.ansi256=S.fg;S.bgAnsi256=S.bg;var It=Object.defineProperty,Bt=m((e,t)=>It(e,"name",{value:t,configurable:!0}),"g"),Wt=Object.defineProperty,K=Bt((e,t)=>Wt(e,"name",{value:t,configurable:!0}),"i"),Pt=Object.defineProperty,Mt=K((e,t)=>Pt(e,"name",{value:t,configurable:!0}),"n");const Ce=Mt(e=>(t,...n)=>{if(!Array.isArray(t)||!Array.isArray(t.raw))throw new TypeError("A tagged template literal must be provided");const i=[t.raw[0]];for(let r=1;r<t.raw.length;r+=1)i.push(String(n[r-1]).replaceAll(/[{}\\]/g,String.raw`\$&`),String(t.raw[r]));return e(i.join(""))},"makeColorizeTemplate");var Rt=Object.defineProperty,kt=K((e,t)=>Rt(e,"name",{value:t,configurable:!0}),"e$1");const Ct=new Map([["0","\0"],["\\","\\"],["a","\x07"],["b","\b"],["e","\x1B"],["f","\f"],["n",`
|
|
3
3
|
`],["r","\r"],["t"," "],["v","\v"]]),Te=kt(e=>{const t=e.startsWith("u"),n=e[1]==="{";return t&&!n&&e.length===5||e.startsWith("x")&&e.length===3?String.fromCodePoint(Number.parseInt(e.slice(1),16)):t&&n?String.fromCodePoint(Number.parseInt(e.slice(2,-1),16)):Ct.get(e)??e},"unescape");var Tt=Object.defineProperty,Z=K((e,t)=>Tt(e,"name",{value:t,configurable:!0}),"u");const _t=/\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.)|\{(~)?(#?[\w:]+(?:\([^)]*\))?(?:\.#?[\w:]+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n))|(\})|((?:.|[\r\n\f])+?)/gi,Se=/(?:^|\.)(?:(\w+)(?:\(([^)]*)\))?|#(?=[:a-f\d]{2,})([a-f\d]{6})?(?::([a-f\d]{6}))?)/gi,Lt=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,Ft=/\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.)|([^\\])/gi,Ut=/\s*,\s*/,Vt=Z((e,t)=>{const n=[],i=t.trim().split(Ut);let r;for(const o of i){const a=Number(o);if(!Number.isNaN(a))n.push(a);else if(r=Lt.exec(o))n.push(r[2].replaceAll(Ft,(s,c,u)=>c?Te(c):u));else throw new Error(`Invalid template style argument: ${o} (in style '${e}')`)}return n},"parseArguments"),qt=Z(e=>{Se.lastIndex=0;const t=[];let n;for(;(n=Se.exec(e))!==null;){const i=n[1];n[2]?t.push([i,...Vt(i,n[2])]):n[3]||n[4]?(n[3]&&t.push(["rgb",...re(n[3])]),n[4]&&t.push(["bgRgb",...re(n[4])])):t.push([i])}return t},"parseStyle"),je=Z((e,t)=>{const n={};for(const r of t)for(const o of r.styles)n[o[0]]=r.inverse?void 0:o.slice(1);let i=e;for(const[r,o]of Object.entries(n))if(Array.isArray(o)){if(!(r in i))throw new Error(`Unknown style: ${r}`);i=o.length>0?i[r](...o):i[r]}return i},"buildStyle"),_e=Z(e=>t=>{const n=[],i=[];let r=[];if(t.replaceAll(_t,(o,a,s,c,u,d)=>{if(a)r.push(Te(a));else if(c){const f=r.join("");r=[],i.push(n.length===0?f:je(e,n)(f)),n.push({inverse:s,styles:qt(c)})}else if(u){if(n.length===0)throw new Error("Found extraneous } in template literal");i.push(je(e,n)(r.join(""))),r=[],n.pop()}else r.push(d)}),i.push(r.join("")),n.length>0)throw new Error(`template literal is missing ${String(n.length)} closing bracket${n.length===1?"":"s"} (\`}\`)`);return i.join("")},"makeTemplate");var Gt=Object.defineProperty,Ht=K((e,t)=>Gt(e,"name",{value:t,configurable:!0}),"e");const zt=new Et;Ht(e=>Ce(_e(e)),"makeTaggedTemplate");const Dt=_e(zt),Yt=Ce(Dt);var Jt=Object.defineProperty,h=m((e,t)=>Jt(e,"name",{value:t,configurable:!0}),"a");const Kt=nt(import.meta.url),B=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Q=h(e=>{if(typeof B<"u"&&B.versions&&B.versions.node){const[t,n]=B.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return B.getBuiltinModule(e)}return Kt(e)},"R"),x=B,{execFileSync:Zt}=Q("node:child_process"),C=Q("node:fs"),Qt=Q("node:tty"),Xt=Q("node:os"),en=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],tn=12288,nn=65510,rn=[12288,12288,65281,65376,65504,65510],on=8361,an=65518,sn=[8361,8361,65377,65470,65474,65479,65482,65487,65490,65495,65498,65500,65512,65518],ln=32,cn=10630,un=[32,126,162,163,165,166,172,172,175,175,10214,10221,10629,10630],dn=4352,hn=262141,Le=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141],_=h((e,t)=>{let n=0,i=Math.floor(e.length/2)-1;for(;n<=i;){const r=Math.floor((n+i)/2),o=r*2;if(t<e[o])i=r-1;else if(t>e[o+1])n=r+1;else return!0}return!1},"$"),xe=19968,[fn,pn]=Fe(Le);function Fe(e){let t=e[0],n=e[1];for(let i=0;i<e.length;i+=2){const r=e[i],o=e[i+1];if(xe>=r&&xe<=o)return[r,o];o-r>n-t&&(t=r,n=o)}return[t,n]}m(Fe,"Wt");h(Fe,"N1");const gn=h(e=>e<161||e>1114109?!1:_(en,e),"I1"),mn=h(e=>e<tn||e>nn?!1:_(rn,e),"W1"),bn=h(e=>e<on||e>an?!1:_(sn,e),"$1"),wn=h(e=>e<ln||e>cn?!1:_(un,e),"O1"),yn=h(e=>e>=fn&&e<=pn?!0:e<dn||e>hn?!1:_(Le,e),"x1");function Ue(e){return gn(e)?"ambiguous":mn(e)?"fullwidth":bn(e)?"halfwidth":wn(e)?"narrow":yn(e)?"wide":"neutral"}m(Ue,"Mt");h(Ue,"E1");function Ve(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}m(Ve,"St");h(Ve,"v1");function pe(e){return Ve(e),Ue(e)}m(pe,"q");h(pe,"Y");const Ee=new Map,F=/(?:[\u0020-\u007E\u00A0-\u00FF](?!\uFE0F)){1,1000}/y,q=h(e=>e>=32&&e<=126?"latin":e===8203||e===8204||e===8205||e===8288?"zero":e<=31||e>=127&&e<=159?"control":e>=160&&e<=255||e>=9472&&e<=9599?"latin":e>=4352&&e<=4607||e>=11904&&e<=40959||e>=44032&&e<=55215||e>=63744&&e<=64255||e>=65280&&e<=65519&&!(e>=65377&&e<=65439)||e>=12352&&e<=12543?"wide":e===8230?"latin":"other","A"),$n=h((e,t)=>{const n=Math.floor(e/65536),i=e%65536;let r=Ee.get(n);if(r||(r=new Map,Ee.set(n,r)),r.has(i))return r.get(i);let o;if(q(e)==="latin")o=t.width.regular;else if(q(e)==="control")o=t.width.control;else if(q(e)==="wide")o=t.width.wide;else switch(pe(e)){case"ambiguous":{o=t.width.ambiguousIsNarrow?t.width.regular:t.width.wide;break}case"fullwidth":{o=t.width.fullWidth;break}case"wide":{o=t.width.wide;break}default:o=t.width.regular}return r.set(i,o),o},"A1"),vn=h(e=>e>=768&&e<=879||e>=6832&&e<=6911||e>=7616&&e<=7679||e>=8400&&e<=8447||e>=65056&&e<=65071||e>=917760&&e<=917999||e>=65024&&e<=65039||e>=3633&&e<=3642||e>=3655&&e<=3662||e>=3761&&e<=3769||e>=3771&&e<=3772||e>=3784&&e<=3789||e>=2304&&e<=2307||e>=2362&&e<=2383||e>=2385&&e<=2391||e>=2402&&e<=2403||e>=2433&&e<=2435||e>=2492&&e<=2500||e>=2509&&e<=2509||e>=2561&&e<=2563||e>=2620&&e<=2637||e>=1611&&e<=1631||e>=1648&&e<=1648||e>=1750&&e<=1773||e>=2276&&e<=2302||e>=1425&&e<=1469||e>=1471&&e<=1471||e>=1473&&e<=1474||e>=1476&&e<=1477||e>=1479&&e<=1479||e>=3893&&e<=3893||e>=3895&&e<=3895||e>=3897&&e<=3897||e>=3953&&e<=3966||e>=3968&&e<=3972||e>=3974&&e<=3975?!0:e>=768&&e<=777||e>=803&&e<=803,"M1"),de=h((e,t={})=>{if(!e||e.length===0)return{ellipsed:!1,index:0,truncated:!1,width:0};const n={truncation:{countAnsiEscapeCodes:t.countAnsiEscapeCodes??!1,ellipsis:t.ellipsis??"",ellipsisWidth:t.ellipsisWidth??(t.ellipsis?de(t.ellipsis,{...t,ellipsis:"",ellipsisWidth:0,limit:Number.POSITIVE_INFINITY}).width:0),limit:t.limit??Number.POSITIVE_INFINITY},width:{ambiguousIsNarrow:t.ambiguousIsNarrow??!1,ansi:t.ansiWidth??0,control:t.controlWidth??0,emoji:t.emojiWidth??2,fullWidth:t.fullWidth??2,halfWidth:t.halfWidth??1,regular:t.regularWidth??1,tab:t.tabWidth??8,wide:t.wideWidth??2}},i=Math.max(0,n.truncation.limit-n.truncation.ellipsisWidth),{length:r}=e,o=r>1e4;let a=0,s=0,c=r,u=!1;const d=e.includes("\x1B")||e.includes("");for(;a<r;){if(d&&(e[a]==="\x1B"||e[a]==="")){if(e.startsWith("\x1B]8;;",a)){const v="\x1B]8;;\x07",j=v.length,X=e.indexOf("\x07",a+5);if(X!==-1){const ee=e.indexOf(v,X+1);if(ee!==-1){const Ye=ee+j,Je=e.slice(X+1,ee).replace(R,""),be=de(Je,{ambiguousIsNarrow:n.width.ambiguousIsNarrow,ansiWidth:n.width.ansi,controlWidth:n.width.control,countAnsiEscapeCodes:!1,ellipsis:n.truncation.ellipsis,ellipsisWidth:n.truncation.ellipsisWidth,emojiWidth:n.width.emoji,fullWidth:n.width.fullWidth,halfWidth:n.width.halfWidth,limit:Math.max(0,i-s),regularWidth:n.width.regular,tabWidth:n.width.tab,wideWidth:n.width.wide}),te=be.width;if(be.truncated)u=!0,c=Math.min(c,a);else if(s+te>i&&(c=Math.min(c,a),u=!0,s+te>n.truncation.limit))break;if(s+=te,a=Ye,u&&s>=n.truncation.limit)break;continue}}}if(R.lastIndex=a,R.test(e)){const v=R.lastIndex-a,j=n.truncation.countAnsiEscapeCodes?v:n.width.ansi;if(s+j>i&&(c=Math.min(c,a),s+j>n.truncation.limit)){u=!0;break}s+=j,a=R.lastIndex;continue}}const O=e.codePointAt(a);if(O===8203||O===65279||O>=8288&&O<=8292){a+=1;continue}if(O===9){if(s+n.width.tab>i&&(c=Math.min(c,a),s+n.width.tab>n.truncation.limit)){u=!0;break}s+=n.width.tab,a+=1;continue}if(F.lastIndex=a,F.test(e)){const v=(F.lastIndex-a)*n.width.regular;if(s+v>i){const j=Math.floor((i-s)/n.width.regular);if(c=Math.min(c,a+j),s+v>n.truncation.limit){u=!0;break}}s+=v,a=F.lastIndex;continue}if((O<=31||O>=127&&O<=159)&&(L.lastIndex=a,L.test(e))){const v=(L.lastIndex-a)*n.width.control;if(s+v>i&&(c=Math.min(c,a+Math.floor((i-s)/n.width.control)),s+v>n.truncation.limit)){u=!0;break}s+=v,a=L.lastIndex;continue}if(ne.lastIndex=a,ne.test(e)){if(s+n.width.emoji>i&&(c=Math.min(c,a),s+n.width.emoji>n.truncation.limit)){u=!0;break}s+=n.width.emoji,a=ne.lastIndex;continue}const I=e.codePointAt(a)??0;if(vn(I)){a+=I>65535?2:1;continue}let $;if(o)$=$n(I,n);else switch(q(I)){case"control":{$=n.width.control;break}case"latin":{$=n.width.regular;break}case"wide":{$=n.width.wide;break}case"zero":{$=0;break}default:switch(pe(I)){case"ambiguous":{$=n.width.ambiguousIsNarrow?n.width.regular:n.width.wide;break}case"fullwidth":{$=n.width.fullWidth;break}case"wide":{$=n.width.wide;break}default:$=n.width.regular}}if(s+$>i&&(c=Math.min(c,a),s+$>n.truncation.limit)){u=!0;break}s+=$,a+=I>65535?2:1}let f=s,me=!1;return u&&n.truncation.limit>=n.truncation.ellipsisWidth&&(f=n.truncation.limit,me=!0),{ellipsed:me,index:u?c:r,truncated:u,width:f}},"C"),Nn=h((e,t={})=>de(e,{...t,ellipsis:"",ellipsisWidth:0,limit:Number.POSITIVE_INFINITY}).width,"_1"),qe=80,Ge=24,he=h((e,t,{shell:n,env:i}={})=>Zt(e,t,{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:500,shell:n,env:i}).trim(),"B"),G=h((e,t)=>({columns:Number.parseInt(e,10),rows:Number.parseInt(t,10)}),"M"),He=h((e,t)=>{const{columns:n,rows:i}=G(e,t);if(!(Number.isNaN(n)||Number.isNaN(i))&&!(n===qe&&i===Ge))return{columns:n,rows:i}},"K"),On=h(()=>{if(x.platform!=="linux")return!0;try{const e=C.readFileSync("/proc/self/stat","utf8"),t=e.lastIndexOf(") ");if(t===-1)return!1;const n=e.slice(t+2).trim().split(/\s+/),i=Number.parseInt(n[2],10),r=Number.parseInt(n[5],10);return Number.isNaN(i)||Number.isNaN(r)||r<=0?!1:i===r}catch{return!1}},"R1");function ze(){const{env:e,stdout:t,stderr:n}=x;if(t?.columns&&t?.rows)return G(t.columns,t.rows);if(n?.columns&&n?.rows)return G(n.columns,n.rows);if(e.COLUMNS&&e.LINES)return G(e.COLUMNS,e.LINES);const i={columns:qe,rows:Ge};return x.platform==="win32"?ie()??i:x.platform==="darwin"?Ie()??ie()??i:Ie()??ie()??An()??i}m(ze,"Tt");h(ze,"S1");const Ie=h(()=>{try{const e=x.platform==="darwin"?C.constants.O_EVTONLY|C.constants.O_NONBLOCK:C.constants.O_NONBLOCK,{columns:t,rows:n}=Qt.WriteStream(C.openSync("/dev/tty",e));return{columns:t,rows:n}}catch{}},"H"),ie=h(()=>{try{const e=he("tput",["cols"],{env:{TERM:"dumb",...x.env}}),t=he("tput",["lines"],{env:{TERM:"dumb",...x.env}});if(e&&t)return He(e,t)}catch{}},"T"),An=h(()=>{try{if(!On())return;const e=he("resize",["-u"]).match(/\d+/g);if(e.length===2)return He(e[0],e[1])}catch{}},"k1"),k=new Map,Sn=500,b=h(e=>{if(!e||e==="")return"";const t=k.get(e);if(t!==void 0)return t;const n=Yt(Object.assign([],{raw:[e]}));if(k.size>=Sn){const i=k.keys().next().value;i!==void 0&&k.delete(i)}return k.set(e,n),n},"u"),H=h(()=>{const e=it().CEREBRO_TERMINAL_WIDTH;if(e===void 0)return;const t=Number.parseInt(e,10);if(!(Number.isNaN(t)||t<=0))return t},"_");let De=class{static{m(this,"G")}static{h(this,"U")}lines;constructor(){this.lines=[]}add(e){this.lines.push(e)}toString(){return this.lines.join(Xt.EOL)}header(e){this.add(tt(e)),this.lines.push("")}};const jn=h(e=>e!==void 0&&e>0?e:ze().columns,"L1"),xn=h((e,t,n,i)=>{if(e.length===0||e.some(u=>u.length!==2))return;let r=0;for(const u of e){const d=u[0];if(d===void 0)continue;const f=Nn(d);f>r&&(r=f)}if(r===0)return;const o=n+i,a=r+o,s=20+o;if(a+s>t)return;const c=t-a;return[a,c]},"T1");class En extends De{static{m(this,"Ft")}static{h(this,"C1")}constructor(t){if(super(),t.header&&this.header(b(t.header)),t.content){if(t.raw)if(Array.isArray(t.content)&&t.content.every(n=>typeof n=="string"))t.content.forEach(n=>{Array.isArray(n)?n.forEach(i=>{this.add(b(i))}):this.add(b(n))});else if(typeof t.content=="string")this.add(b(t.content));else throw new TypeError("Invalid raw content, must be a string or array of strings.");else this.add(this.getContentLines(t.content));this.add("")}}getContentLines(t){if(typeof t=="string"){const n=U({showHeader:!1,style:{border:V,paddingLeft:4,paddingRight:1},terminalWidth:H(),truncateOverflow:!1,wordWrap:!0});return n.addRow([b(t)]),n.toString()}if(Array.isArray(t)&&t.every(n=>typeof n=="string"||Array.isArray(n)&&n.every(i=>typeof i=="string"))){const n=jn(H()),i=h(s=>Array.isArray(s)?s.map(c=>b(c)):[b(s)],"t"),r=t.map(s=>i(s)),o=xn(r,n,4,1),a=U({columnWidths:o,showHeader:!1,style:{border:V,paddingLeft:4,paddingRight:1},terminalWidth:n,truncateOverflow:!1,wordWrap:!0});return r.forEach(s=>{o!==void 0&&s.length===2?a.addRow([{content:s[0],wordWrap:!1},s[1]]):a.addRow(s)}),a.toString()}if(typeof t=="object"){const n=t;if(!n.options||!n.data)throw new Error(`Must have an "options" or "data" property
|
|
4
4
|
${JSON.stringify(t)}`);const i=U({showHeader:!1,style:{border:V,paddingLeft:4,paddingRight:1},terminalWidth:H(),truncateOverflow:!1,wordWrap:!0});return n.data.forEach(r=>{Array.isArray(r)?i.addRow(r.map(o=>b(o))):i.addRow([b(r)])}),i.toString()}throw new Error(`invalid input - 'content' must be a string, array of strings or a object:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var i=Object.defineProperty;var a=(r,e)=>i(r,"name",{value:e,configurable:!0});import{p as s}from"./bin.js";import{c as o,f as c}from"../packem_shared/registry-keys-
|
|
1
|
+
var i=Object.defineProperty;var a=(r,e)=>i(r,"name",{value:e,configurable:!0});import{p as s}from"./bin.js";import{c as o,f as c}from"../packem_shared/registry-keys-E3cZn4FI.js";var n=Object.defineProperty,f=a((r,e)=>n(r,"name",{value:e,configurable:!0}),"n");const g=f(async({options:r})=>{if(r.clear){const t=o();if(r.json){process.stdout.write(`${JSON.stringify({cleared:t,refetched:!1},void 0,2)}
|
|
2
2
|
`);return}s.success(t?"Cleared cached npm signing keys.":"No cached npm signing keys to clear.");return}const e=await c({forceRefresh:!0});if(e===void 0){if(r.json){process.stdout.write(`${JSON.stringify({cleared:!1,error:"fetch-failed",refetched:!1},void 0,2)}
|
|
3
3
|
`),process.exitCode=1;return}s.error("Failed to fetch npm signing keys (network error and no cached keys available)."),process.exitCode=1;return}if(r.json){process.stdout.write(`${JSON.stringify({cleared:!1,fromCache:e.fromCache,keyCount:e.keys.length,refetched:!e.fromCache,stale:e.stale??!1},void 0,2)}
|
|
4
4
|
`);return}if(e.fromCache&&e.stale===!0){s.warn(`Network fetch failed — falling back to expired cache (${String(e.keys.length)} keys).`);return}s.success(`Refreshed npm signing keys (${String(e.keys.length)} keys).`)},"execute");export{g as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var d=Object.defineProperty;var u=(r,o)=>d(r,"name",{value:o,configurable:!0});import{p as s}from"./bin.js";import{r as m}from"../packem_shared/advisories-
|
|
1
|
+
var d=Object.defineProperty;var u=(r,o)=>d(r,"name",{value:o,configurable:!0});import{p as s}from"./bin.js";import{r as m}from"../packem_shared/advisories-CGKZo9Rx.js";var p=Object.defineProperty,l=u((r,o)=>p(r,"name",{value:o,configurable:!0}),"a");const v=l(async({fs:r,logger:o,options:t,workspaceRoot:n})=>{if(!n)throw new Error("Could not determine workspace root. Run this command inside a workspace.");const e=t.db??m(n),a=t.format==="json";if(!t.force){s.warn(`Prune is destructive. Will remove: ${e}`),s.info("Re-run with --force to proceed."),a&&process.stdout.write(`${JSON.stringify({dbPath:e,reason:"needs --force",removed:!1})}
|
|
2
2
|
`);return}const f=[e,`${e}-wal`,`${e}-shm`,`${e}-journal`],i=[];for(const c of f)try{await r.rm(c,{force:!0}),i.push(c)}catch{}if(a){process.stdout.write(`${JSON.stringify({dbPath:e,files:i,removed:!0})}
|
|
3
3
|
`);return}s.success(`Removed ${e}.`)},"execute"),b=v;export{b as advisoriesPruneExecute};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var l=Object.defineProperty;var c=(s,e)=>l(s,"name",{value:e,configurable:!0});import{e as v,E as f,I as p}from"../packem_shared/Table-
|
|
1
|
+
var l=Object.defineProperty;var c=(s,e)=>l(s,"name",{value:e,configurable:!0});import{e as v,E as f,I as p}from"../packem_shared/Table-3pFgIUZ2-DABgc6rj.js";import{p as r}from"./bin.js";import{r as g,g as h}from"../packem_shared/advisories-CGKZo9Rx.js";var $=Object.defineProperty,i=c((s,e)=>$(s,"name",{value:e,configurable:!0}),"a");const B=i(s=>{if(s===0)return"0 B";const e=["B","KB","MB","GB"],a=Math.min(Math.floor(Math.log(s)/Math.log(1024)),e.length-1),o=s/1024**a;return`${o.toFixed(o<10&&a>0?1:0)} ${e[a]}`},"formatBytes"),w=i(s=>{if(!s)return"never";const e=Date.parse(s);if(Number.isNaN(e))return s;const a=Date.now()-e;if(a<0)return s;const o=Math.floor(a/6e4);if(o<1)return"just now";if(o<60)return`${o}m ago`;const t=Math.floor(o/60);return t<24?`${t}h ago`:`${Math.floor(t/24)}d ago`},"formatRelative"),S=i(async({logger:s,options:e,workspaceRoot:a})=>{if(!a)throw new Error("Could not determine workspace root. Run this command inside a workspace.");const o=e.db??g(a),t=await h(a,o);if(e.format==="json"){process.stdout.write(`${JSON.stringify({dbPath:o,ecosystems:t.ecosystems.map(n=>({advisoryCount:n.advisoryCount,lastSyncIso:n.lastSyncIso,manifestEtag:n.manifestEtag??null,name:n.name})),exists:t.exists,schemaVersion:t.schemaVersion,sizeBytes:t.sizeBytes},void 0,2)}
|
|
2
2
|
`);return}if(r.info(`DB: ${o}`),!t.exists){r.warn(`No advisory DB yet. Run ${v("vis advisories sync")} to populate.`);return}if(r.info(`Schema: v${t.schemaVersion} Size: ${B(t.sizeBytes)}`),t.ecosystems.length===0){r.warn("DB exists but contains no ecosystems. Run `vis advisories sync`.");return}r.info(""),r.info("Ecosystem Advisories Last sync ETag"),r.info(f("────────── ────────── ───────────────── ──────"));for(const n of t.ecosystems){const m=n.name.padEnd(10),u=n.advisoryCount.toLocaleString().padStart(10),d=`${n.lastSyncIso||"never"} (${w(n.lastSyncIso)})`.padEnd(19),y=n.manifestEtag??f("—");r.info(`${p(m)} ${u} ${d} ${y}`)}},"execute"),D=S;export{D as advisoriesStatusExecute};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var w=Object.defineProperty;var y=(e,o)=>w(e,"name",{value:o,configurable:!0});import{E as $}from"../packem_shared/Table-
|
|
1
|
+
var w=Object.defineProperty;var y=(e,o)=>w(e,"name",{value:o,configurable:!0});import{E as $}from"../packem_shared/Table-3pFgIUZ2-DABgc6rj.js";import{p as l}from"./bin.js";import{s as D}from"../packem_shared/scan-progress-CTVVf9WW.js";import{s as b,D as S}from"../packem_shared/advisories-CGKZo9Rx.js";var E=Object.defineProperty,c=y((e,o)=>E(e,"name",{value:o,configurable:!0}),"c");const P=c(e=>e?.security?.audit?.advisories??{},"readAdvisoriesConfig"),k=c(e=>e?e.split(",").map(o=>o.trim()).filter(o=>o.length>0):["npm"],"parseEcosystems"),x=c(async({logger:e,options:o,visConfig:g,workspaceRoot:d})=>{if(!d)throw new Error("Could not determine workspace root. Run this command inside a workspace.");const u=o.format==="json",m=P(g),f=o.source??m.source??S,p=k(o.ecosystem),v=p.map(s=>({id:s,label:`Sync ${s} advisories`})),n=D(v,{live:!u}),i=[];try{for(const s of p){n.start(s);const r=Date.now();try{const t=await b({allowedHosts:m.allowedHosts,dbPath:o.db,ecosystem:s,force:!!o.force,source:f,workspaceRoot:d});i.push({ecosystem:s,result:t}),t.upToDate?n.finish(s,"ok",`up to date · ${h(Date.now()-r)}`):n.finish(s,"ok",`${t.advisoriesIngested.toLocaleString()} advisories · ${h(t.durationMs)}`)}catch(t){const a=t instanceof Error?t.message:String(t);i.push({ecosystem:s,error:a}),n.finish(s,"error",a)}}}finally{n.stop()}if(u){const s={ecosystems:i.map(r=>({advisoriesIngested:r.result?.advisoriesIngested??0,dbPath:r.result?.dbPath??null,durationMs:r.result?.durationMs??0,ecosystem:r.ecosystem,error:r.error??null,upToDate:r.result?.upToDate??!1})),source:f};process.stdout.write(`${JSON.stringify(s,void 0,2)}
|
|
2
2
|
`)}else{const s=i.filter(a=>a.error),r=i.filter(a=>a.result),t=r[0];t?.result?.dbPath&&l.info($(`DB: ${t.result.dbPath}`)),s.length===0?l.success(`Synced ${r.length} ecosystem${r.length===1?"":"s"}.`):l.error(`${s.length} ecosystem${s.length===1?"":"s"} failed to sync.`)}i.some(s=>s.error)&&(process.exitCode=1)},"execute"),h=c(e=>e>=1e3?`${(e/1e3).toFixed(1)}s`:`${Math.round(e)}ms`,"formatDuration"),O=x;export{O as advisoriesSyncExecute};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var $=Object.defineProperty;var k=(e,o)=>$(e,"name",{value:o,configurable:!0});import{p}from"./bin.js";import{A as S}from"../packem_shared/pm-runner-DmKT2FqF.js";import{r as v,l as x,L as C}from"../packem_shared/dependency-scan-BUbOcMwX.js";import{B as M,M as h,l as L}from"../packem_shared/readFileSync-DseCu8sg-DEq4Fn3a.js";import{S as E}from"../packem_shared/lockfile-CrT86D6d.js";import{e as P}from"../packem_shared/index-
|
|
1
|
+
var $=Object.defineProperty;var k=(e,o)=>$(e,"name",{value:o,configurable:!0});import{p}from"./bin.js";import{A as S}from"../packem_shared/pm-runner-DmKT2FqF.js";import{r as v,l as x,L as C}from"../packem_shared/dependency-scan-BUbOcMwX.js";import{B as M,M as h,l as L}from"../packem_shared/readFileSync-DseCu8sg-DEq4Fn3a.js";import{S as E}from"../packem_shared/lockfile-CrT86D6d.js";import{e as P}from"../packem_shared/index-BnANMQ7k.js";var D=Object.defineProperty,m=k((e,o)=>D(e,"name",{value:o,configurable:!0}),"r");const V=m(e=>{const o=e.trim();return o===""?!1:/^(?:git\+|git:\/\/|git@|ssh:\/\/)/i.test(o)||/^(?:github|gitlab|bitbucket|gist):/i.test(o)||/^[\w.-]+\/[\w.-]+(?:#.+)?$/.test(o)&&!o.includes("@")?!0:/^https?:\/\//i.test(o)},"isExoticSpecifier"),N=m((e,o)=>{for(const s of o)if(s===e||s.endsWith("*")&&e.startsWith(s.slice(0,-1)))return!0;return!1},"matchesAllow"),O=m((e,o,s={})=>{const t=v(e,o);if(!t)return[];let i;try{i=M(h(e,t.file))}catch{return[]}const n=E(i,t.type);if(n.length===0)return[];const c=s.allow??[],l=[],f=new Set;for(const r of n){const a=`${r.name}@${r.version}`;for(const g of[r.dependencies,r.optionalDependencies])if(g){for(const[u,w]of Object.entries(g))if(!N(u,c))for(const y of w){if(!V(y))continue;const b=`${a}->${u}@${y}`;f.has(b)||(f.add(b),l.push({declaredBy:a,packageName:u,source:y}))}}}return l.sort((r,a)=>r.packageName.localeCompare(a.packageName)||r.declaredBy.localeCompare(a.declaredBy))},"scanExoticSubdeps");var R=Object.defineProperty,d=k((e,o)=>R(e,"name",{value:o,configurable:!0}),"n");const j=new Set(["firstSeen","publisherChange"]),B=d(e=>e.severity==="block"&&e.acceptedRisk===void 0,"isGatingDecision"),A=d(e=>{const o=e.security?.policies?.firstSeen?.minutes,s=typeof o=="number"&&o>0,t=e.security?.policies?.publisherChange?.mode==="no-downgrade",i=e.security?.blockExoticSubdeps===!0;return s||t||i},"anyPolicyConfigured"),F=d(async e=>{const{offline:o=!1,packageManager:s,visConfig:t,workspaceRoot:i}=e,n=Date.now();if(!A(t))return{decisions:[],durationMs:Date.now()-n,entryCount:0,exoticViolations:[],lockfileMissing:!1,status:"skipped"};const c=v(i,s);if(!c||!L(h(i,c.file)))return{decisions:[],durationMs:Date.now()-n,entryCount:0,exoticViolations:[],lockfileMissing:!0,status:"fail"};const l=x(i,s,{includeDev:!0}),f=l.length,r=await P({offline:o,packageManager:s,packages:l,workspaceRoot:i},"install",{enabledPolicies:new Set(j),visConfig:t}),a=t.security?.blockExoticSubdeps===!0?O(i,s,{allow:t.security.exoticSubdepsAllow}):[],g=r.some(u=>B(u))||a.length>0;return{decisions:r,durationMs:Date.now()-n,entryCount:f,exoticViolations:a,lockfileMissing:!1,status:g?"fail":"pass"}},"verifyLockfile"),W=d(e=>e<1e3?`${String(e)}ms`:`${(e/1e3).toFixed(1)}s`,"formatElapsed"),G=d(e=>{if(e.status==="skipped")return["– Lockfile supply-chain verification skipped (no firstSeen / publisherChange / blockExoticSubdeps policy configured)"];if(e.lockfileMissing)return["✗ Lockfile supply-chain verification failed — no lockfile found, the resolved closure cannot be attested"];const o=`(${String(e.entryCount)} ${e.entryCount===1?"entry":"entries"}, ${W(e.durationMs)})`;if(e.status==="pass")return[`✓ Lockfile passes supply-chain policies ${o}`];const s=[`✗ Lockfile failed supply-chain policy check ${o}`];for(const t of e.decisions)t.severity==="block"&&t.acceptedRisk===void 0&&s.push(` [${t.policy}] ${t.reason}`);for(const t of e.exoticViolations)s.push(` [blockExoticSubdeps] ${t.packageName} pulled from exotic source by ${t.declaredBy}: ${t.source}`);return s},"formatLockfileVerification");var I=Object.defineProperty,J=k((e,o)=>I(e,"name",{value:o,configurable:!0}),"a");const U=J(async({options:e,visConfig:o,workspaceRoot:s})=>{const t=s??process.cwd(),i=S(t);if(!C[i.name]){p.warn(`Package manager '${i.name}' has no lockfile vis can verify.`);return}const n=await F({offline:!!e.offline,packageManager:i.name,visConfig:o??{},workspaceRoot:t});if(e.json){process.stdout.write(`${JSON.stringify(n,void 0,2)}
|
|
2
2
|
`),n.status==="fail"&&(process.exitCode=1);return}const[c,...l]=G(n);if(n.status==="skipped"){p.info(c);return}if(n.status==="pass"){p.success(c);return}p.error(c);for(const f of l)p.error(f);process.exitCode=1},"execute");export{U as default};
|