@synnaxlabs/pluto 0.43.0 → 0.43.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/dist/{Item-BrHZi6Fl.cjs → Item-CB5c--eX.cjs} +1 -1
  2. package/dist/{Item-BgUwEjzV.js → Item-LAMTj0X2.js} +2 -2
  3. package/dist/{Link-Bngd8rrL.cjs → Link-CPnT8Xp9.cjs} +1 -1
  4. package/dist/{Link-y133HE5v.js → Link-DcudTtgT.js} +1 -1
  5. package/dist/{Provider-CAR23fYq.js → Provider-CLPfWTcl.js} +2 -2
  6. package/dist/{Provider-B1j7nPL9.cjs → Provider-s70PZ9lg.cjs} +1 -1
  7. package/dist/{Text-P0b041la.js → Text-BiWcjO1i.js} +1 -1
  8. package/dist/{Text-CLsJyQGy.cjs → Text-Dw0NDc2A.cjs} +1 -1
  9. package/dist/{Text-Ddc0C5JU.cjs → Text-bSIbkBIL.cjs} +1 -1
  10. package/dist/{Text-B1uUpUKk.js → Text-wL3te5S6.js} +3 -3
  11. package/dist/{Toggle-BC1o8qt5.js → Toggle-CbzT5wR_.js} +2 -2
  12. package/dist/{Toggle-D-vvd8lz.cjs → Toggle-CpDGR6M6.cjs} +1 -1
  13. package/dist/button.cjs +1 -1
  14. package/dist/button.js +1 -1
  15. package/dist/color.cjs +1 -1
  16. package/dist/color.js +1 -1
  17. package/dist/{eraser-CupVBBBp.js → eraser-BJxXs5KS.js} +2 -2
  18. package/dist/{eraser-C0Kv4_kL.cjs → eraser-CGxyWj3B.cjs} +2 -2
  19. package/dist/ether.cjs +1 -1
  20. package/dist/ether.js +6 -6
  21. package/dist/{external-8zJ3fvo2.js → external-5nVYtLDI.js} +4 -4
  22. package/dist/{external-firJ8w9n.js → external-69bqTAcN.js} +3 -3
  23. package/dist/{external-Ds5GDIp9.cjs → external-B-B5ro_s.cjs} +1 -1
  24. package/dist/{external-D38Y0J6S.cjs → external-B3Mtbu36.cjs} +1 -1
  25. package/dist/{external-DHw0SdIj.cjs → external-BgwS5D0j.cjs} +1 -1
  26. package/dist/{external-BYsOdgw5.js → external-Bn3A7Rew.js} +3 -3
  27. package/dist/{external-BgKH42un.cjs → external-Bojct8Fy.cjs} +1 -1
  28. package/dist/{external-CKag7gXR.js → external-C6mmYO7R.js} +4 -4
  29. package/dist/{external-BmeMUsxr.js → external-CnkWbciu.js} +2 -2
  30. package/dist/{external-D8mHEAIG.cjs → external-Cxwmal3D.cjs} +1 -1
  31. package/dist/{external-DuvwfKLw.js → external-Dm9rg2x7.js} +2 -2
  32. package/dist/{external-DlyrUZhP.cjs → external-EvgywGSS.cjs} +1 -1
  33. package/dist/{external-D1gwMWza.cjs → external-MJ2UMa_L.cjs} +1 -1
  34. package/dist/{external-Cjnx793K.js → external-UeyJ6mPv.js} +6 -6
  35. package/dist/{external-CjTwWT6m.cjs → external-V0yO0q2n.cjs} +1 -1
  36. package/dist/{external-IsogMmdT.cjs → external-cDUxSE0v.cjs} +1 -1
  37. package/dist/{external-BDh272rT.js → external-cJGWYB3x.js} +1 -1
  38. package/dist/{external-ZV7pEm55.js → external-fwvNilmo.js} +1 -1
  39. package/dist/{font-Cy9UYjyY.js → font-Csp00pQP.js} +2 -2
  40. package/dist/{font-C5EV9fq1.cjs → font-ifUcrCey.cjs} +1 -1
  41. package/dist/{fontString-CUy7T-OR.cjs → fontString-BWECl_1B.cjs} +1 -1
  42. package/dist/{fontString-CynarMI1.js → fontString-ap-NPnCD.js} +1 -1
  43. package/dist/header.cjs +1 -1
  44. package/dist/header.js +1 -1
  45. package/dist/index.cjs +1 -1
  46. package/dist/index.js +177 -183
  47. package/dist/input.cjs +1 -1
  48. package/dist/input.js +1 -1
  49. package/dist/list.cjs +1 -1
  50. package/dist/list.js +1 -1
  51. package/dist/menu.cjs +1 -1
  52. package/dist/menu.js +1 -1
  53. package/dist/{provider-B8IM-N4g.cjs → provider-YWPkhTn6.cjs} +28 -28
  54. package/dist/{provider-CQqS-teQ.js → provider-gW90qzEG.js} +4439 -4409
  55. package/dist/src/aether/aether/aether.d.ts.map +1 -1
  56. package/dist/src/channel/LinePlot.d.ts +2 -2
  57. package/dist/src/channel/LinePlot.d.ts.map +1 -1
  58. package/dist/src/vis/lineplot/LinePlot.d.ts.map +1 -1
  59. package/dist/src/vis/lineplot/aether/LinePlot.d.ts.map +1 -1
  60. package/dist/src/vis/lineplot/range/Provider.d.ts.map +1 -1
  61. package/dist/src/vis/lineplot/range/aether/provider.d.ts +2 -2
  62. package/dist/src/vis/lineplot/range/aether/provider.d.ts.map +1 -1
  63. package/dist/tabs.cjs +1 -1
  64. package/dist/tabs.js +1 -1
  65. package/dist/theming.cjs +1 -1
  66. package/dist/theming.js +2 -2
  67. package/dist/tree.cjs +1 -1
  68. package/dist/tree.js +1 -1
  69. package/dist/{value-BVL4mfhG.cjs → value--TYeJRXm.cjs} +4 -4
  70. package/dist/{value-DLy5XRhS.js → value-dkHk-BsO.js} +27 -27
  71. package/package.json +4 -4
@@ -1,4 +1,4 @@
1
- "use strict";const Me=require("./jsx-runtime-CITbqOLs.cjs"),we=require("./css-C7rJrqRi.cjs"),wr=require("react"),ir=require("./Divider-D74_FAXn.cjs"),Ln=require("./Toggle-D-vvd8lz.cjs"),Hs=require("./useVirtualCursorDragWebKit-CUbBopD6.cjs"),Wo=require("./Text-Ddc0C5JU.cjs"),NN=require("./Center-DE_BtCCX.cjs"),Oi=require("./Pack-80N7XB5O.cjs"),En=require("./Space-ByFmfiTa.cjs");require("./Stack-BbwDtaE6.cjs");const nh=require("./Dropdown-BpoU-xVd.cjs"),AN=require("./hooks-B92WH57y.cjs");require("./state-DwM4WaEw.cjs");const Sa=require("./Text-CLsJyQGy.cjs");require("./provider-B8IM-N4g.cjs");const CN=require("./DateTime-DC19AIGq.cjs"),ah=require("./WithIcon-CCnlO2LC.cjs"),EN=require("./Text-DTPuORh0.cjs"),SN=require("./Provider-B1j7nPL9.cjs");require("./eraser-C0Kv4_kL.cjs");const Pb=e=>e.preventDefault(),MN=e=>e.stopPropagation(),kb="cursor-style",ih=(e,t=document.head)=>{Ob();const r=document.createElement("style");r.innerHTML=`*{cursor: ${e} !important;}`,r.id=kb,t.appendChild(r)},Ob=()=>{const e=document.getElementById(kb);e!=null&&e.remove()},oh=(e,t,r,n,a)=>{const{x:i,y:o}=n??we.K.construct(we.Pt.dims(a));if(we.Pt.width(t)>i&&we.Pt.width(t)>we.Pt.height(t)){const s=we.Pt.signedWidth(t)<0?i:-i;e+=(we.Pt.signedWidth(t)+s)*r.x,ih("ew-resize")}if(we.Pt.height(t)>o&&we.Pt.height(t)>we.Pt.width(t)){const s=we.Pt.signedHeight(t)<0?o:-o;e+=(we.Pt.signedHeight(t)+s)*r.y,ih("ns-resize")}return e},ic=({direction:e,className:t,dragScale:r={x:10,y:1},dragThreshold:n=15,dragDirection:a,onChange:i,value:o,size:s,resetValue:u,onDragEnd:l,...c})=>{const f=wr.useRef({dragging:!1,curr:o,prev:o}),m=wr.useRef(null);f.current.dragging||(f.current.prev=o);const d=wr.useMemo(()=>{const y=we.K.construct(r);return a==="x"?we.K.construct(y.x,0):a==="y"?we.K.construct(0,y.y):y},[r,a]),p=wr.useMemo(()=>n!=null?we.K.construct(n):null,[n]);Hs.useVirtualCursorDragWebKit({ref:m,onMove:wr.useCallback(y=>{if(m.current==null)return;let b=f.current.prev;f.current.dragging=!0,b=oh(b,y,d,p,we.Pt.construct(m.current)),f.current.curr=b,i(b)},[i,d,p]),onEnd:wr.useCallback((y,b)=>{var g;if(m.current==null)return;let D=f.current.prev;D=oh(D,y,d,p,we.Pt.construct(m.current)),f.current.prev=D,f.current.dragging=!1,Ob(),l==null||l(D),(g=c.onBlur)==null||g.call(c)},[c.onBlur,l,d,p])});const h=wr.useCallback(()=>{i(u??f.current.prev)},[i,u]);return Me.jsxRuntimeExports.jsx(Ln.Icon,{ref:m,variant:"outlined",className:we.CSS(we.CSS.BE("input","drag-btn"),we.CSS.dir(e),t),tabIndex:-1,onDoubleClick:h,onClick:Pb,...c,children:Me.jsxRuntimeExports.jsx(ir.y4.Drag,{})})},TN={x:Number(we.d.HOUR.valueOf()),y:Number(we.d.days(.75).valueOf())},$b=({value:e,onChange:t})=>{const r=new we.d(e,"UTC");wr.useLayoutEffect(()=>{const i=r.sub(we.d.utcOffset);if(i.remainder(we.d.DAY).isZero)return;const o=i.sub(i.remainder(we.d.DAY));t(Number(new we.d(o,"local").valueOf()))},[e]);const n=i=>{let o;if(typeof i=="number")o=new we.d(i,"UTC");else{if(i.length===0)return;o=new we.d(i,"local")}t(Number(o.valueOf()))};return{value:r.fString("ISODate","local"),onChange:n}},FN=({ref:e,onChange:t,value:r,className:n,showDragHandle:a=!0,children:i,...o})=>{const{value:s,onChange:u}=$b({value:r,onChange:t});return Me.jsxRuntimeExports.jsxs(Wo.Text,{ref:e,value:s,className:we.CSS(we.CSS.B("input-date"),n),onChange:u,type:"date",...o,children:[a&&Me.jsxRuntimeExports.jsx(ic,{value:r,onChange:u,dragScale:TN}),i]})};let PN={one:{},two:{},three:{},four:{}},kN={one:{},two:{},three:{}},ON={},$N=[];const If={methods:PN,model:kN,compute:ON,hooks:$N},_N=e=>Object.prototype.toString.call(e)==="[object Array]",BN={compute:function(e){const{world:t}=this,r=t.compute;return typeof e=="string"&&r.hasOwnProperty(e)?r[e](this):_N(e)?e.forEach(n=>{t.compute.hasOwnProperty(n)?r[n](this):console.warn("no compute:",e)}):typeof e=="function"?e(this):console.warn("no compute:",e),this}},IN=function(e){return this.fullPointer.forEach((r,n)=>{let a=this.update([r]);e(a,n)}),this},zN=function(e,t){let n=this.fullPointer.map((i,o)=>{let s=this.update([i]),u=e(s,o);return u===void 0?this.none():u});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 a=[];return n.forEach(i=>{a=a.concat(i.fullPointer)}),this.toView(a)},jN=function(e){let t=this.fullPointer;return t=t.filter((n,a)=>{let i=this.update([n]);return e(i,a)}),this.update(t)},qN=function(e){let r=this.fullPointer.find((n,a)=>{let i=this.update([n]);return e(i,a)});return this.update([r])},RN=function(e){return this.fullPointer.some((r,n)=>{let a=this.update([r]);return e(a,n)})},LN=function(e=1){let t=this.fullPointer,r=Math.floor(Math.random()*t.length);return r+e>this.length&&(r=this.length-e,r=r<0?0:r),t=t.slice(r,r+e),this.update(t)},HN={forEach:IN,map:zN,filter:jN,find:qN,some:RN,random:LN},Vn={termList:function(){return this.methods.one.termList(this.docs)},terms:function(e){let t=this.match(".");return typeof e=="number"?t.eq(e):t},groups:function(e){if(e||e===0)return this.update(this._groups[e]||[]);let t={};return Object.keys(this._groups).forEach(r=>{t[r]=this.update(this._groups[r])}),t},eq:function(e){let t=this.pointer;return t||(t=this.docs.map((r,n)=>[n])),t[e]?this.update([t[e]]):this.none()},first:function(){return this.eq(0)},last:function(){let e=this.fullPointer.length-1;return this.eq(e)},firstTerms:function(){return this.match("^.")},lastTerms:function(){return this.match(".$")},slice:function(e,t){let r=this.pointer||this.docs.map((n,a)=>[a]);return r=r.slice(e,t),this.update(r)},all:function(){return this.update().toView()},fullSentences:function(){let e=this.fullPointer.map(t=>[t[0]]);return this.update(e).toView()},none:function(){return this.update([])},isDoc:function(e){if(!e||!e.isView)return!1;let t=this.fullPointer,r=e.fullPointer;return!t.length===r.length?!1:t.every((n,a)=>r[a]?n[0]===r[a][0]&&n[1]===r[a][1]&&n[2]===r[a][2]:!1)},wordCount:function(){return this.docs.reduce((e,t)=>(e+=t.filter(r=>r.text!=="").length,e),0)},isFull:function(){let e=this.pointer;if(!e)return!0;if(e.length===0||e[0][0]!==0)return!1;let t=0,r=0;return this.document.forEach(n=>t+=n.length),this.docs.forEach(n=>r+=n.length),t===r},getNth:function(e){return typeof e=="number"?this.eq(e):typeof e=="string"?this.if(e):this}};Vn.group=Vn.groups;Vn.fullSentence=Vn.fullSentences;Vn.sentence=Vn.fullSentences;Vn.lastTerm=Vn.lastTerms;Vn.firstTerm=Vn.firstTerms;const zf=Object.assign({},Vn,BN,HN);zf.get=zf.eq;class ti{constructor(t,r,n={}){[["document",t],["world",If],["_groups",n],["_cache",null],["viewType","View"]].forEach(i=>{Object.defineProperty(this,i[0],{value:i[1],writable:!0})}),this.ptrs=r}get docs(){let t=this.document;return this.ptrs&&(t=If.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(){let{docs:t,ptrs:r,document:n}=this;return(r||t.map((i,o)=>[o])).map(i=>{let[o,s,u,l,c]=i;return s=s||0,u=u||(n[o]||[]).length,n[o]&&n[o][s]&&(l=l||n[o][s].id,n[o][u-1]&&(c=c||n[o][u-1].id)),[o,s,u,l,c]})}update(t){let r=new ti(this.document,t);if(this._cache&&t&&t.length>0){let n=[];t.forEach((a,i)=>{let[o,s,u]=a;a.length===1?n[i]=this._cache[o]:s===0&&this.document[o].length===u&&(n[i]=this._cache[o])}),n.length>0&&(r._cache=n)}return r.world=this.world,r}toView(t){return new ti(this.document,t||this.pointer)}fromText(t){const{methods:r}=this;let n=r.one.tokenize.fromString(t,this.world),a=new ti(n);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(n=>n.map(a=>(a=Object.assign({},a),a.tags=new Set(a.tags),a)));let r=this.update(this.pointer);return r.document=t,r._cache=this._cache,r}}Object.assign(ti.prototype,zf);const GN="14.14.4",sh=function(e){return e&&typeof e=="object"&&!Array.isArray(e)};function _b(e,t){if(sh(t))for(const r in t)sh(t[r])?(e[r]||Object.assign(e,{[r]:{}}),_b(e[r],t[r])):Object.assign(e,{[r]:t[r]});return e}function VN(e,t){for(const r in t)e[r]=e[r]||{},Object.assign(e[r],t[r]);return e}const UN=function(e,t){let r=e.two.models||{};Object.keys(t).forEach(n=>{t[n].pastTense&&(r.toPast&&(r.toPast.ex[n]=t[n].pastTense),r.fromPast&&(r.fromPast.ex[t[n].pastTense]=n)),t[n].presentTense&&(r.toPresent&&(r.toPresent.ex[n]=t[n].presentTense),r.fromPresent&&(r.fromPresent.ex[t[n].presentTense]=n)),t[n].gerund&&(r.toGerund&&(r.toGerund.ex[n]=t[n].gerund),r.fromGerund&&(r.fromGerund.ex[t[n].gerund]=n)),t[n].comparative&&(r.toComparative&&(r.toComparative.ex[n]=t[n].comparative),r.fromComparative&&(r.fromComparative.ex[t[n].comparative]=n)),t[n].superlative&&(r.toSuperlative&&(r.toSuperlative.ex[n]=t[n].superlative),r.fromSuperlative&&(r.fromSuperlative.ex[t[n].superlative]=n))})},WN=function(e,t,r,n){const{methods:a,model:i,compute:o,hooks:s}=t;e.methods&&VN(a,e.methods),e.model&&_b(i,e.model),e.irregulars&&UN(i,e.irregulars),e.compute&&Object.assign(o,e.compute),s&&(t.hooks=s.concat(e.hooks||[])),e.api&&e.api(r),e.lib&&Object.keys(e.lib).forEach(u=>n[u]=e.lib[u]),e.tags&&n.addTags(e.tags),e.words&&n.addWords(e.words),e.frozen&&n.addWords(e.frozen,!0),e.mutate&&e.mutate(t,n)},JN=function(e){const t=typeof process>"u"||!process.env?self.env||{}:process.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},KN=e=>Object.prototype.toString.call(e)==="[object Object]",jf=function(e){return Object.prototype.toString.call(e)==="[object Array]"},YN=function(e){return e.map(t=>t.terms.map(r=>(jf(r.tags)&&(r.tags=new Set(r.tags)),r)))},ZN=function(e){return e.map(t=>t.map(r=>({text:r,normal:r,pre:"",post:" ",tags:new Set})))},Bb=function(e,t,r){const{methods:n}=r;let a=new t([]);if(a.world=r,typeof e=="number"&&(e=String(e)),!e)return a;if(typeof e=="string"){let i=n.one.tokenize.fromString(e,r);return new t(i)}if(KN(e)&&e.isView)return new t(e.document,e.ptrs);if(jf(e)){if(jf(e[0])){let o=ZN(e);return new t(o)}let i=YN(e);return new t(i)}return a};let Ml=Object.assign({},If);const tt=function(e,t){t&&tt.addWords(t);let r=Bb(e,ti,Ml);return e&&r.compute(Ml.hooks),r};Object.defineProperty(tt,"_world",{value:Ml,writable:!0});tt.tokenize=function(e,t){const{compute:r}=this._world;t&&tt.addWords(t);let n=Bb(e,ti,Ml);return r.contractions&&n.compute(["alias","normal","machine","contractions"]),n};tt.plugin=function(e){return WN(e,this._world,ti,this),this};tt.extend=tt.plugin;tt.world=function(){return this._world};tt.model=function(){return this._world.model};tt.methods=function(){return this._world.methods};tt.hooks=function(){return this._world.hooks};tt.verbose=JN;tt.version=GN;const QN=function(e){return e.map(r=>{let n=new Set;return r.forEach(a=>{a.normal!==""&&n.add(a.normal),a.switch&&n.add(`%${a.switch}%`),a.implicit&&n.add(a.implicit),a.machine&&n.add(a.machine),a.root&&n.add(a.root),a.alias&&a.alias.forEach(o=>n.add(o));let i=Array.from(a.tags);for(let o=0;o<i.length;o+=1)n.add("#"+i[o])}),n})},XN={one:{cacheDoc:QN}},eA={cache:function(){return this._cache=this.methods.one.cacheDoc(this.document),this},uncache:function(){return this._cache=null,this}},tA=function(e){Object.assign(e.prototype,eA)},rA={cache:function(e){e._cache=e.methods.one.cacheDoc(e.document)}},nA={api:tA,compute:rA,methods:XN},aA={toLowerCase:function(){return this.termList().forEach(e=>{e.text=e.text.toLowerCase()}),this},toUpperCase:function(){return this.termList().forEach(e=>{e.text=e.text.toUpperCase()}),this},toTitleCase:function(){return this.termList().forEach(e=>{e.text=e.text.replace(/^ *[a-z\u00C0-\u00FF]/,t=>t.toUpperCase())}),this},toCamelCase:function(){return this.docs.forEach(e=>{e.forEach((t,r)=>{r!==0&&(t.text=t.text.replace(/^ *[a-z\u00C0-\u00FF]/,n=>n.toUpperCase())),r!==e.length-1&&(t.post="")})}),this}},uh=e=>new RegExp("^\\p{Lu}[\\p{Ll}'’]","u").test(e)||new RegExp("^\\p{Lu}$","u").test(e),iA=e=>e.replace(new RegExp("^\\p{Ll}","u"),t=>t.toUpperCase()),oA=e=>e.replace(new RegExp("^\\p{Lu}","u"),t=>t.toLowerCase()),Ib=(e,t,r)=>{if(r.forEach(n=>n.dirty=!0),e){let n=[t,0].concat(r);Array.prototype.splice.apply(e,n)}return e},Mo=function(e){const t=/ $/,r=/[-–—]/;let n=e[e.length-1];n&&!t.test(n.post)&&!r.test(n.post)&&(n.post+=" ")},lh=(e,t,r)=>{const n=/[-.?!,;:)–—'"]/g;let a=e[t-1];if(!a)return;let i=a.post;if(n.test(i)){let o=i.match(n).join(""),s=r[r.length-1];s.post=o+s.post,a.post=a.post.replace(n,"")}},sA=function(e,t,r){let n=e[t];if(t!==0||!uh(n.text))return;r[0].text=iA(r[0].text);let a=e[t];a.tags.has("ProperNoun")||a.tags.has("Acronym")||uh(a.text)&&a.text.length>1&&(a.text=oA(a.text))},uA=function(e,t,r,n){let[a,i,o]=t;i===0||o===n[a].length?Mo(r):(Mo(r),Mo([e[t[1]]])),sA(e,i,r),Ib(e,i,r)},lA=function(e,t,r,n){let[a,,i]=t,o=(n[a]||[]).length;i<o?(lh(e,i,r),Mo(r)):o===i&&(Mo(e),lh(e,i,r),n[a+1]&&(r[r.length-1].post+=" ")),Ib(e,t[2],r),t[4]=r[r.length-1].id};let cs=0;const ch=e=>(e=e.length<3?"0"+e:e,e.length<3?"0"+e:e),zb=function(e){let[t,r]=e.index||[0,0];cs+=1,cs=cs>46655?0:cs,t=t>46655?0:t,r=r>1294?0:r;let n=ch(cs.toString(36));n+=ch(t.toString(36));let a=r.toString(36);a=a.length<2?"0"+a:a,n+=a;let i=parseInt(Math.random()*36,10);return n+=i.toString(36),e.normal+"|"+n.toUpperCase()},fh=function(e){e.has("@hasContraction")&&typeof e.contractions=="function"&&e.grow("@hasContraction").contractions().expand()},mh=e=>Object.prototype.toString.call(e)==="[object Array]",cA=function(e){return e=e.map(t=>(t.id=zb(t),t)),e},fA=function(e,t){const{methods:r}=t;return typeof e=="string"?r.one.tokenize.fromString(e,t)[0]:typeof e=="object"&&e.isView?e.clone().docs[0]||[]:mh(e)?mh(e[0])?e[0]:e:[]},dh=function(e,t,r){const{document:n,world:a}=t;t.uncache();let i=t.fullPointer,o=t.fullPointer;t.forEach((u,l)=>{let c=u.fullPointer[0],[f]=c,m=n[f],d=fA(e,a);d.length!==0&&(d=cA(d),r?(fh(t.update([c]).firstTerm()),uA(m,c,d,n)):(fh(t.update([c]).lastTerm()),lA(m,c,d,n)),n[f]&&n[f][c[1]]&&(c[3]=n[f][c[1]].id),o[l]=c,c[2]+=d.length,i[l]=c)});let s=t.toView(i);return t.ptrs=o,s.compute(["id","index","freeze","lexicon"]),s.world.compute.preTagger&&s.compute("preTagger"),s.compute("unfreeze"),s},Hi={insertAfter:function(e){return dh(e,this,!1)},insertBefore:function(e){return dh(e,this,!0)}};Hi.append=Hi.insertAfter;Hi.prepend=Hi.insertBefore;Hi.insert=Hi.insertAfter;const mA=/\$[0-9a-z]+/g,Km={},dA=e=>new RegExp("^\\p{Lu}[\\p{Ll}'’]","u").test(e)||new RegExp("^\\p{Lu}$","u").test(e),hA=e=>e.replace(new RegExp("^\\p{Ll}","u"),t=>t.toUpperCase()),pA=e=>e.replace(new RegExp("^\\p{Lu}","u"),t=>t.toLowerCase()),gA=function(e,t,r){return e.forEach(n=>{let a=t(n);n.replaceWith(a,r)}),e},vA=function(e,t){if(typeof e!="string")return e;let r=t.groups();return e=e.replace(mA,n=>{let a=n.replace(/\$/,"");return r.hasOwnProperty(a)?r[a].text():n}),e};Km.replaceWith=function(e,t={}){let r=this.fullPointer,n=this;if(this.uncache(),typeof e=="function")return gA(n,e,t);let a=n.docs[0];if(!a)return n;let i=t.possessives&&a[a.length-1].tags.has("Possessive"),o=t.case&&dA(a[0].text);e=vA(e,n);let s=this.update(r);r=r.map(m=>m.slice(0,3));let u=(s.docs[0]||[]).map(m=>Array.from(m.tags)),l=s.docs[0][0].pre,c=s.docs[0][s.docs[0].length-1].post;if(typeof e=="string"&&(e=this.fromText(e).compute("id")),n.insertAfter(e),s.has("@hasContraction")&&n.contractions&&n.grow("@hasContraction+").contractions().expand(),n.delete(s),i){let m=n.docs[0],d=m[m.length-1];d.tags.has("Possessive")||(d.text+="'s",d.normal+="'s",d.tags.add("Possessive"))}if(l&&n.docs[0]&&(n.docs[0][0].pre=l),c&&n.docs[0]){let m=n.docs[0][n.docs[0].length-1];m.post.trim()||(m.post=c)}let f=n.toView(r).compute(["index","freeze","lexicon"]);if(f.world.compute.preTagger&&f.compute("preTagger"),f.compute("unfreeze"),t.tags&&f.terms().forEach((m,d)=>{m.tagSafe(u[d])}),!f.docs[0]||!f.docs[0][0])return f;if(t.case){let m=o?hA:pA;f.docs[0][0].text=m(f.docs[0][0].text)}return f};Km.replace=function(e,t,r){if(e&&!t)return this.replaceWith(e,r);let n=this.match(e);return n.found?(this.soften(),n.replaceWith(t,r)):this};const yA=function(e,t){let r=e.length-1,n=e[r],a=e[r-t];a&&n&&(a.post+=n.post,a.post=a.post.replace(/ +([.?!,;:])/,"$1"),a.post=a.post.replace(/[,;:]+([.?!])/,"$1"))},bA=function(e,t){t.forEach(r=>{let[n,a,i]=r,o=i-a;e[n]&&(i===e[n].length&&i>1&&yA(e[n],o),e[n].splice(a,o))});for(let r=e.length-1;r>=0;r-=1)if(e[r].length===0&&(e.splice(r,1),r===e.length&&e[r-1])){let n=e[r-1],a=n[n.length-1];a&&(a.post=a.post.trimEnd())}return e},wA=function(e,t){return e=e.map(r=>{let[n]=r;return t[n]&&t[n].forEach(a=>{let i=a[2]-a[1];r[1]<=a[1]&&r[2]>=a[2]&&(r[2]-=i)}),r}),e.forEach((r,n)=>{if(r[1]===0&&r[2]==0)for(let a=n+1;a<e.length;a+=1)e[a][0]-=1,e[a][0]<0&&(e[a][0]=0)}),e=e.filter(r=>r[2]-r[1]>0),e=e.map(r=>(r[3]=null,r[4]=null,r)),e},qf={remove:function(e){const{indexN:t}=this.methods.one.pointer;this.uncache();let r=this.all(),n=this;e&&(r=this,n=this.match(e));let a=!r.ptrs;n.has("@hasContraction")&&n.contractions&&n.grow("@hasContraction").contractions().expand();let i=r.fullPointer,o=n.fullPointer.reverse(),s=bA(this.document,o),u=t(o);return i=wA(i,u),r.ptrs=i,r.document=s,r.compute("index"),a&&(r.ptrs=void 0),e?r.toView(i):(this.ptrs=[],r.none())}};qf.delete=qf.remove;const Ts={pre:function(e,t){return e===void 0&&this.found?this.docs[0][0].pre:(this.docs.forEach(r=>{let n=r[0];t===!0?n.pre+=e:n.pre=e}),this)},post:function(e,t){if(e===void 0){let r=this.docs[this.docs.length-1];return r[r.length-1].post}return this.docs.forEach(r=>{let n=r[r.length-1];t===!0?n.post+=e:n.post=e}),this},trim:function(){if(!this.found)return this;let e=this.docs,t=e[0][0];t.pre=t.pre.trimStart();let r=e[e.length-1],n=r[r.length-1];return n.post=n.post.trimEnd(),this},hyphenate:function(){return this.docs.forEach(e=>{e.forEach((t,r)=>{r!==0&&(t.pre=""),e[r+1]&&(t.post="-")})}),this},dehyphenate:function(){const e=/[-–—]/;return this.docs.forEach(t=>{t.forEach(r=>{e.test(r.post)&&(r.post=" ")})}),this},toQuotations:function(e,t){return e=e||'"',t=t||'"',this.docs.forEach(r=>{r[0].pre=e+r[0].pre;let n=r[r.length-1];n.post=t+n.post}),this},toParentheses:function(e,t){return e=e||"(",t=t||")",this.docs.forEach(r=>{r[0].pre=e+r[0].pre;let n=r[r.length-1];n.post=t+n.post}),this}};Ts.deHyphenate=Ts.dehyphenate;Ts.toQuotation=Ts.toQuotations;const xA=(e,t)=>e.normal<t.normal?-1:e.normal>t.normal?1:0,DA=(e,t)=>{let r=e.normal.trim().length,n=t.normal.trim().length;return r<n?1:r>n?-1:0},NA=(e,t)=>e.words<t.words?1:e.words>t.words?-1:0,AA=(e,t)=>e[0]<t[0]?1:e[0]>t[0]?-1:e[1]>t[1]?1:-1,CA=function(e){let t={};return e.forEach(r=>{t[r.normal]=t[r.normal]||0,t[r.normal]+=1}),e.sort((r,n)=>{let a=t[r.normal],i=t[n.normal];return a<i?1:a>i?-1:0}),e},_c={alpha:xA,length:DA,wordCount:NA,sequential:AA,byFreq:CA},EA=new Set(["index","sequence","seq","sequential","chron","chronological"]),SA=new Set(["freq","frequency","topk","repeats"]),MA=new Set(["alpha","alphabetical"]),TA=function(e,t){let r=e.fullPointer;return r=r.sort((n,a)=>(n=e.update([n]),a=e.update([a]),t(n,a))),e.ptrs=r,e},FA=function(e){let{docs:t,pointer:r}=this;if(this.uncache(),typeof e=="function")return TA(this,e);e=e||"alpha";let n=r||t.map((i,o)=>[o]),a=t.map((i,o)=>({index:o,words:i.length,normal:i.map(s=>s.machine||s.normal||"").join(" "),pointer:n[o]}));return EA.has(e)&&(e="sequential"),MA.has(e)&&(e="alpha"),SA.has(e)?(a=_c.byFreq(a),this.update(a.map(i=>i.pointer))):typeof _c[e]=="function"?(a=a.sort(_c[e]),this.update(a.map(i=>i.pointer))):this},PA=function(){let e=this.pointer||this.docs.map((t,r)=>[r]);return e=[].concat(e),e=e.reverse(),this._cache&&(this._cache=this._cache.reverse()),this.update(e)},kA=function(){let e=new Set;return this.filter(r=>{let n=r.text("machine");return e.has(n)?!1:(e.add(n),!0)})},OA={unique:kA,reverse:PA,sort:FA},$A=e=>Object.prototype.toString.call(e)==="[object Array]",jb=function(e,t){if(e.length>0){let r=e[e.length-1],n=r[r.length-1];/ /.test(n.post)===!1&&(n.post+=" ")}return e=e.concat(t),e},_A=function(e,t){if(e.document===t.document){let n=e.fullPointer.concat(t.fullPointer);return e.toView(n).compute("index")}return t.fullPointer.forEach(n=>{n[0]+=e.document.length}),e.document=jb(e.document,t.docs),e.all()},BA={concat:function(e){if(typeof e=="string"){let t=this.fromText(e);if(!this.found||!this.ptrs)this.document=this.document.concat(t.document);else{let r=this.fullPointer,n=r[r.length-1][0];this.document.splice(n,0,...t.document)}return this.all().compute("index")}if(typeof e=="object"&&e.isView)return _A(this,e);if($A(e)){let t=jb(this.document,e);return this.document=t,this.all()}return this}},IA=function(){return this.ptrs=this.fullPointer,this},zA=function(){let e=this.ptrs;return!e||e.length<1?this:(e=e.map(t=>t.slice(0,3)),this.ptrs=e,this)},jA={harden:IA,soften:zA},qA=Object.assign({},aA,Hi,Km,qf,Ts,OA,BA,jA),RA=function(e){Object.assign(e.prototype,qA)},LA={id:function(e){let t=e.docs;for(let r=0;r<t.length;r+=1)for(let n=0;n<t[r].length;n+=1){let a=t[r][n];a.id=a.id||zb(a)}}},HA={api:RA,compute:LA},GA=[{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"]}],rn=!0,VA={st:rn,nd:rn,rd:rn,th:rn,am:rn,pm:rn,max:rn,"°":rn,s:rn,e:rn,er:rn,ère:rn,ème:rn},UA={one:{contractions:GA,numberSuffixes:VA}},Bc=function(e,t,r){let[n,a]=t;!r||r.length===0||(r=r.map((i,o)=>(i.implicit=i.text,i.machine=i.text,i.pre="",i.post="",i.text="",i.normal="",i.index=[n,a+o],i)),r[0]&&(r[0].pre=e[n][a].pre,r[r.length-1].post=e[n][a].post,r[0].text=e[n][a].text,r[0].normal=e[n][a].normal),e[n].splice(a,1,...r))},WA=/'/,JA=new Set(["what","how","when","where","why"]),KA=new Set(["be","go","start","think","need"]),YA=new Set(["been","gone"]),ZA=function(e,t){let r=e[t].normal.split(WA)[0];if(JA.has(r))return[r,"did"];if(e[t+1]){if(YA.has(e[t+1].normal))return[r,"had"];if(KA.has(e[t+1].normal))return[r,"would"]}return null},QA=function(e,t){return e[t].normal==="ain't"||e[t].normal==="aint"?null:[e[t].normal.replace(/n't/,""),"not"]},Ym=/'/,XA=/(e|é|aison|sion|tion)$/,e3=/(age|isme|acle|ege|oire)$/,t3=(e,t)=>{let r=e[t].normal.split(Ym)[1];return r&&r.endsWith("e")?["la",r]:["le",r]},r3=(e,t)=>{let r=e[t].normal.split(Ym)[1];return r&&XA.test(r)&&!e3.test(r)?["du",r]:r&&r.endsWith("s")?["des",r]:["de",r]},n3=(e,t)=>["je",e[t].normal.split(Ym)[1]],Ic={preJ:n3,preL:t3,preD:r3},a3=/^([0-9.]{1,4}[a-z]{0,2}) ?[-–—] ?([0-9]{1,4}[a-z]{0,2})$/i,i3=/^([0-9]{1,2}(:[0-9][0-9])?(am|pm)?) ?[-–—] ?([0-9]{1,2}(:[0-9][0-9])?(am|pm)?)$/i,o3=/^[0-9]{3}-[0-9]{4}$/,s3=function(e,t){let r=e[t],n=r.text.match(a3);return n!==null?r.tags.has("PhoneNumber")===!0||o3.test(r.text)?null:[n[1],"to",n[2]]:(n=r.text.match(i3),n!==null?[n[1],"to",n[4]]:null)},u3=/^([+-]?[0-9][.,0-9]*)([a-z°²³µ/]+)$/,l3=function(e,t,r){const n=r.model.one.numberSuffixes||{};let i=e[t].text.match(u3);if(i!==null){let o=i[2].toLowerCase().trim();return n.hasOwnProperty(o)?null:[i[1],o]}return null},hh=/'/,c3=/^[0-9][^-–—]*[-–—].*?[0-9]/,ph=function(e,t,r,n){let a=t.update();a.document=[e];let i=r+n;r>0&&(r-=1),e[i]&&(i+=1),a.ptrs=[[0,r,i]]},gh={t:(e,t)=>QA(e,t),d:(e,t)=>ZA(e,t)},vh={j:(e,t)=>Ic.preJ(e,t),l:(e,t)=>Ic.preL(e,t),d:(e,t)=>Ic.preD(e,t)},f3=function(e,t,r,n){for(let a=0;a<e.length;a+=1){let i=e[a];if(i.word===t.normal)return i.out;if(n!==null&&n===i.after)return[r].concat(i.out);if(r!==null&&r===i.before&&n&&n.length>2)return i.out.concat(n)}return null},zc=function(e,t){let r=t.fromText(e.join(" "));return r.compute(["id","alias"]),r.docs[0]},m3=function(e,t){for(let r=t+1;r<5&&e[r];r+=1)if(e[r].normal==="been")return["there","has"];return["there","is"]},d3=e=>{let{world:t,document:r}=e;const{model:n,methods:a}=t;let i=n.one.contractions||[];r.forEach((o,s)=>{for(let u=o.length-1;u>=0;u-=1){let l=null,c=null;if(hh.test(o[u].normal)===!0){let m=o[u].normal.split(hh);l=m[0],c=m[1]}let f=f3(i,o[u],l,c);if(!f&&gh.hasOwnProperty(c)&&(f=gh[c](o,u,t)),!f&&vh.hasOwnProperty(l)&&(f=vh[l](o,u)),l==="there"&&c==="s"&&(f=m3(o,u)),f){f=zc(f,e),Bc(r,[s,u],f),ph(r[s],e,u,f.length);continue}if(c3.test(o[u].normal)){f=s3(o,u),f&&(f=zc(f,e),Bc(r,[s,u],f),a.one.setTag(f,"NumberRange",t),f[2]&&f[2].tags.has("Time")&&a.one.setTag([f[0]],"Time",t,null,"time-range"),ph(r[s],e,u,f.length));continue}f=l3(o,u,t),f&&(f=zc(f,e),Bc(r,[s,u],f),a.one.setTag([f[1]],"Unit",t,null,"contraction-unit"))}})},h3={contractions:d3},p3={model:UA,compute:h3,hooks:["contractions"]},yh=function(e){const t=e.world,{model:r,methods:n}=e.world,a=n.one.setTag,{frozenLex:i}=r.one,o=r.one._multiCache||{};e.docs.forEach(s=>{for(let u=0;u<s.length;u+=1){let l=s[u],c=l.machine||l.normal;if(o[c]!==void 0&&s[u+1]){let f=u+o[c]-1;for(let m=f;m>u;m-=1){let d=s.slice(u,m+1),p=d.map(h=>h.machine||h.normal).join(" ");if(i.hasOwnProperty(p)===!0){a(d,i[p],t,!1,"1-frozen-multi-lexicon"),d.forEach(h=>h.frozen=!0);continue}}}if(i[c]!==void 0&&i.hasOwnProperty(c)){a([l],i[c],t,!1,"1-freeze-lexicon"),l.frozen=!0;continue}}})},g3=function(e){return e.docs.forEach(t=>{t.forEach(r=>{delete r.frozen})}),e},v3={frozen:yh,freeze:yh,unfreeze:g3},bh=e=>"\x1B[34m"+e+"\x1B[0m",wh=e=>"\x1B[3m\x1B[2m"+e+"\x1B[0m",xh=function(e){e.docs.forEach(t=>{console.log(bh(`
1
+ "use strict";const Me=require("./jsx-runtime-CITbqOLs.cjs"),we=require("./css-C7rJrqRi.cjs"),wr=require("react"),ir=require("./Divider-D74_FAXn.cjs"),Ln=require("./Toggle-CpDGR6M6.cjs"),Hs=require("./useVirtualCursorDragWebKit-CUbBopD6.cjs"),Wo=require("./Text-bSIbkBIL.cjs"),NN=require("./Center-DE_BtCCX.cjs"),Oi=require("./Pack-80N7XB5O.cjs"),En=require("./Space-ByFmfiTa.cjs");require("./Stack-BbwDtaE6.cjs");const nh=require("./Dropdown-BpoU-xVd.cjs"),AN=require("./hooks-B92WH57y.cjs");require("./state-DwM4WaEw.cjs");const Sa=require("./Text-Dw0NDc2A.cjs");require("./provider-YWPkhTn6.cjs");const CN=require("./DateTime-DC19AIGq.cjs"),ah=require("./WithIcon-CCnlO2LC.cjs"),EN=require("./Text-DTPuORh0.cjs"),SN=require("./Provider-s70PZ9lg.cjs");require("./eraser-CGxyWj3B.cjs");const Pb=e=>e.preventDefault(),MN=e=>e.stopPropagation(),kb="cursor-style",ih=(e,t=document.head)=>{Ob();const r=document.createElement("style");r.innerHTML=`*{cursor: ${e} !important;}`,r.id=kb,t.appendChild(r)},Ob=()=>{const e=document.getElementById(kb);e!=null&&e.remove()},oh=(e,t,r,n,a)=>{const{x:i,y:o}=n??we.K.construct(we.Pt.dims(a));if(we.Pt.width(t)>i&&we.Pt.width(t)>we.Pt.height(t)){const s=we.Pt.signedWidth(t)<0?i:-i;e+=(we.Pt.signedWidth(t)+s)*r.x,ih("ew-resize")}if(we.Pt.height(t)>o&&we.Pt.height(t)>we.Pt.width(t)){const s=we.Pt.signedHeight(t)<0?o:-o;e+=(we.Pt.signedHeight(t)+s)*r.y,ih("ns-resize")}return e},ic=({direction:e,className:t,dragScale:r={x:10,y:1},dragThreshold:n=15,dragDirection:a,onChange:i,value:o,size:s,resetValue:u,onDragEnd:l,...c})=>{const f=wr.useRef({dragging:!1,curr:o,prev:o}),m=wr.useRef(null);f.current.dragging||(f.current.prev=o);const d=wr.useMemo(()=>{const y=we.K.construct(r);return a==="x"?we.K.construct(y.x,0):a==="y"?we.K.construct(0,y.y):y},[r,a]),p=wr.useMemo(()=>n!=null?we.K.construct(n):null,[n]);Hs.useVirtualCursorDragWebKit({ref:m,onMove:wr.useCallback(y=>{if(m.current==null)return;let b=f.current.prev;f.current.dragging=!0,b=oh(b,y,d,p,we.Pt.construct(m.current)),f.current.curr=b,i(b)},[i,d,p]),onEnd:wr.useCallback((y,b)=>{var g;if(m.current==null)return;let D=f.current.prev;D=oh(D,y,d,p,we.Pt.construct(m.current)),f.current.prev=D,f.current.dragging=!1,Ob(),l==null||l(D),(g=c.onBlur)==null||g.call(c)},[c.onBlur,l,d,p])});const h=wr.useCallback(()=>{i(u??f.current.prev)},[i,u]);return Me.jsxRuntimeExports.jsx(Ln.Icon,{ref:m,variant:"outlined",className:we.CSS(we.CSS.BE("input","drag-btn"),we.CSS.dir(e),t),tabIndex:-1,onDoubleClick:h,onClick:Pb,...c,children:Me.jsxRuntimeExports.jsx(ir.y4.Drag,{})})},TN={x:Number(we.d.HOUR.valueOf()),y:Number(we.d.days(.75).valueOf())},$b=({value:e,onChange:t})=>{const r=new we.d(e,"UTC");wr.useLayoutEffect(()=>{const i=r.sub(we.d.utcOffset);if(i.remainder(we.d.DAY).isZero)return;const o=i.sub(i.remainder(we.d.DAY));t(Number(new we.d(o,"local").valueOf()))},[e]);const n=i=>{let o;if(typeof i=="number")o=new we.d(i,"UTC");else{if(i.length===0)return;o=new we.d(i,"local")}t(Number(o.valueOf()))};return{value:r.fString("ISODate","local"),onChange:n}},FN=({ref:e,onChange:t,value:r,className:n,showDragHandle:a=!0,children:i,...o})=>{const{value:s,onChange:u}=$b({value:r,onChange:t});return Me.jsxRuntimeExports.jsxs(Wo.Text,{ref:e,value:s,className:we.CSS(we.CSS.B("input-date"),n),onChange:u,type:"date",...o,children:[a&&Me.jsxRuntimeExports.jsx(ic,{value:r,onChange:u,dragScale:TN}),i]})};let PN={one:{},two:{},three:{},four:{}},kN={one:{},two:{},three:{}},ON={},$N=[];const If={methods:PN,model:kN,compute:ON,hooks:$N},_N=e=>Object.prototype.toString.call(e)==="[object Array]",BN={compute:function(e){const{world:t}=this,r=t.compute;return typeof e=="string"&&r.hasOwnProperty(e)?r[e](this):_N(e)?e.forEach(n=>{t.compute.hasOwnProperty(n)?r[n](this):console.warn("no compute:",e)}):typeof e=="function"?e(this):console.warn("no compute:",e),this}},IN=function(e){return this.fullPointer.forEach((r,n)=>{let a=this.update([r]);e(a,n)}),this},zN=function(e,t){let n=this.fullPointer.map((i,o)=>{let s=this.update([i]),u=e(s,o);return u===void 0?this.none():u});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 a=[];return n.forEach(i=>{a=a.concat(i.fullPointer)}),this.toView(a)},jN=function(e){let t=this.fullPointer;return t=t.filter((n,a)=>{let i=this.update([n]);return e(i,a)}),this.update(t)},qN=function(e){let r=this.fullPointer.find((n,a)=>{let i=this.update([n]);return e(i,a)});return this.update([r])},RN=function(e){return this.fullPointer.some((r,n)=>{let a=this.update([r]);return e(a,n)})},LN=function(e=1){let t=this.fullPointer,r=Math.floor(Math.random()*t.length);return r+e>this.length&&(r=this.length-e,r=r<0?0:r),t=t.slice(r,r+e),this.update(t)},HN={forEach:IN,map:zN,filter:jN,find:qN,some:RN,random:LN},Vn={termList:function(){return this.methods.one.termList(this.docs)},terms:function(e){let t=this.match(".");return typeof e=="number"?t.eq(e):t},groups:function(e){if(e||e===0)return this.update(this._groups[e]||[]);let t={};return Object.keys(this._groups).forEach(r=>{t[r]=this.update(this._groups[r])}),t},eq:function(e){let t=this.pointer;return t||(t=this.docs.map((r,n)=>[n])),t[e]?this.update([t[e]]):this.none()},first:function(){return this.eq(0)},last:function(){let e=this.fullPointer.length-1;return this.eq(e)},firstTerms:function(){return this.match("^.")},lastTerms:function(){return this.match(".$")},slice:function(e,t){let r=this.pointer||this.docs.map((n,a)=>[a]);return r=r.slice(e,t),this.update(r)},all:function(){return this.update().toView()},fullSentences:function(){let e=this.fullPointer.map(t=>[t[0]]);return this.update(e).toView()},none:function(){return this.update([])},isDoc:function(e){if(!e||!e.isView)return!1;let t=this.fullPointer,r=e.fullPointer;return!t.length===r.length?!1:t.every((n,a)=>r[a]?n[0]===r[a][0]&&n[1]===r[a][1]&&n[2]===r[a][2]:!1)},wordCount:function(){return this.docs.reduce((e,t)=>(e+=t.filter(r=>r.text!=="").length,e),0)},isFull:function(){let e=this.pointer;if(!e)return!0;if(e.length===0||e[0][0]!==0)return!1;let t=0,r=0;return this.document.forEach(n=>t+=n.length),this.docs.forEach(n=>r+=n.length),t===r},getNth:function(e){return typeof e=="number"?this.eq(e):typeof e=="string"?this.if(e):this}};Vn.group=Vn.groups;Vn.fullSentence=Vn.fullSentences;Vn.sentence=Vn.fullSentences;Vn.lastTerm=Vn.lastTerms;Vn.firstTerm=Vn.firstTerms;const zf=Object.assign({},Vn,BN,HN);zf.get=zf.eq;class ti{constructor(t,r,n={}){[["document",t],["world",If],["_groups",n],["_cache",null],["viewType","View"]].forEach(i=>{Object.defineProperty(this,i[0],{value:i[1],writable:!0})}),this.ptrs=r}get docs(){let t=this.document;return this.ptrs&&(t=If.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(){let{docs:t,ptrs:r,document:n}=this;return(r||t.map((i,o)=>[o])).map(i=>{let[o,s,u,l,c]=i;return s=s||0,u=u||(n[o]||[]).length,n[o]&&n[o][s]&&(l=l||n[o][s].id,n[o][u-1]&&(c=c||n[o][u-1].id)),[o,s,u,l,c]})}update(t){let r=new ti(this.document,t);if(this._cache&&t&&t.length>0){let n=[];t.forEach((a,i)=>{let[o,s,u]=a;a.length===1?n[i]=this._cache[o]:s===0&&this.document[o].length===u&&(n[i]=this._cache[o])}),n.length>0&&(r._cache=n)}return r.world=this.world,r}toView(t){return new ti(this.document,t||this.pointer)}fromText(t){const{methods:r}=this;let n=r.one.tokenize.fromString(t,this.world),a=new ti(n);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(n=>n.map(a=>(a=Object.assign({},a),a.tags=new Set(a.tags),a)));let r=this.update(this.pointer);return r.document=t,r._cache=this._cache,r}}Object.assign(ti.prototype,zf);const GN="14.14.4",sh=function(e){return e&&typeof e=="object"&&!Array.isArray(e)};function _b(e,t){if(sh(t))for(const r in t)sh(t[r])?(e[r]||Object.assign(e,{[r]:{}}),_b(e[r],t[r])):Object.assign(e,{[r]:t[r]});return e}function VN(e,t){for(const r in t)e[r]=e[r]||{},Object.assign(e[r],t[r]);return e}const UN=function(e,t){let r=e.two.models||{};Object.keys(t).forEach(n=>{t[n].pastTense&&(r.toPast&&(r.toPast.ex[n]=t[n].pastTense),r.fromPast&&(r.fromPast.ex[t[n].pastTense]=n)),t[n].presentTense&&(r.toPresent&&(r.toPresent.ex[n]=t[n].presentTense),r.fromPresent&&(r.fromPresent.ex[t[n].presentTense]=n)),t[n].gerund&&(r.toGerund&&(r.toGerund.ex[n]=t[n].gerund),r.fromGerund&&(r.fromGerund.ex[t[n].gerund]=n)),t[n].comparative&&(r.toComparative&&(r.toComparative.ex[n]=t[n].comparative),r.fromComparative&&(r.fromComparative.ex[t[n].comparative]=n)),t[n].superlative&&(r.toSuperlative&&(r.toSuperlative.ex[n]=t[n].superlative),r.fromSuperlative&&(r.fromSuperlative.ex[t[n].superlative]=n))})},WN=function(e,t,r,n){const{methods:a,model:i,compute:o,hooks:s}=t;e.methods&&VN(a,e.methods),e.model&&_b(i,e.model),e.irregulars&&UN(i,e.irregulars),e.compute&&Object.assign(o,e.compute),s&&(t.hooks=s.concat(e.hooks||[])),e.api&&e.api(r),e.lib&&Object.keys(e.lib).forEach(u=>n[u]=e.lib[u]),e.tags&&n.addTags(e.tags),e.words&&n.addWords(e.words),e.frozen&&n.addWords(e.frozen,!0),e.mutate&&e.mutate(t,n)},JN=function(e){const t=typeof process>"u"||!process.env?self.env||{}:process.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},KN=e=>Object.prototype.toString.call(e)==="[object Object]",jf=function(e){return Object.prototype.toString.call(e)==="[object Array]"},YN=function(e){return e.map(t=>t.terms.map(r=>(jf(r.tags)&&(r.tags=new Set(r.tags)),r)))},ZN=function(e){return e.map(t=>t.map(r=>({text:r,normal:r,pre:"",post:" ",tags:new Set})))},Bb=function(e,t,r){const{methods:n}=r;let a=new t([]);if(a.world=r,typeof e=="number"&&(e=String(e)),!e)return a;if(typeof e=="string"){let i=n.one.tokenize.fromString(e,r);return new t(i)}if(KN(e)&&e.isView)return new t(e.document,e.ptrs);if(jf(e)){if(jf(e[0])){let o=ZN(e);return new t(o)}let i=YN(e);return new t(i)}return a};let Ml=Object.assign({},If);const tt=function(e,t){t&&tt.addWords(t);let r=Bb(e,ti,Ml);return e&&r.compute(Ml.hooks),r};Object.defineProperty(tt,"_world",{value:Ml,writable:!0});tt.tokenize=function(e,t){const{compute:r}=this._world;t&&tt.addWords(t);let n=Bb(e,ti,Ml);return r.contractions&&n.compute(["alias","normal","machine","contractions"]),n};tt.plugin=function(e){return WN(e,this._world,ti,this),this};tt.extend=tt.plugin;tt.world=function(){return this._world};tt.model=function(){return this._world.model};tt.methods=function(){return this._world.methods};tt.hooks=function(){return this._world.hooks};tt.verbose=JN;tt.version=GN;const QN=function(e){return e.map(r=>{let n=new Set;return r.forEach(a=>{a.normal!==""&&n.add(a.normal),a.switch&&n.add(`%${a.switch}%`),a.implicit&&n.add(a.implicit),a.machine&&n.add(a.machine),a.root&&n.add(a.root),a.alias&&a.alias.forEach(o=>n.add(o));let i=Array.from(a.tags);for(let o=0;o<i.length;o+=1)n.add("#"+i[o])}),n})},XN={one:{cacheDoc:QN}},eA={cache:function(){return this._cache=this.methods.one.cacheDoc(this.document),this},uncache:function(){return this._cache=null,this}},tA=function(e){Object.assign(e.prototype,eA)},rA={cache:function(e){e._cache=e.methods.one.cacheDoc(e.document)}},nA={api:tA,compute:rA,methods:XN},aA={toLowerCase:function(){return this.termList().forEach(e=>{e.text=e.text.toLowerCase()}),this},toUpperCase:function(){return this.termList().forEach(e=>{e.text=e.text.toUpperCase()}),this},toTitleCase:function(){return this.termList().forEach(e=>{e.text=e.text.replace(/^ *[a-z\u00C0-\u00FF]/,t=>t.toUpperCase())}),this},toCamelCase:function(){return this.docs.forEach(e=>{e.forEach((t,r)=>{r!==0&&(t.text=t.text.replace(/^ *[a-z\u00C0-\u00FF]/,n=>n.toUpperCase())),r!==e.length-1&&(t.post="")})}),this}},uh=e=>new RegExp("^\\p{Lu}[\\p{Ll}'’]","u").test(e)||new RegExp("^\\p{Lu}$","u").test(e),iA=e=>e.replace(new RegExp("^\\p{Ll}","u"),t=>t.toUpperCase()),oA=e=>e.replace(new RegExp("^\\p{Lu}","u"),t=>t.toLowerCase()),Ib=(e,t,r)=>{if(r.forEach(n=>n.dirty=!0),e){let n=[t,0].concat(r);Array.prototype.splice.apply(e,n)}return e},Mo=function(e){const t=/ $/,r=/[-–—]/;let n=e[e.length-1];n&&!t.test(n.post)&&!r.test(n.post)&&(n.post+=" ")},lh=(e,t,r)=>{const n=/[-.?!,;:)–—'"]/g;let a=e[t-1];if(!a)return;let i=a.post;if(n.test(i)){let o=i.match(n).join(""),s=r[r.length-1];s.post=o+s.post,a.post=a.post.replace(n,"")}},sA=function(e,t,r){let n=e[t];if(t!==0||!uh(n.text))return;r[0].text=iA(r[0].text);let a=e[t];a.tags.has("ProperNoun")||a.tags.has("Acronym")||uh(a.text)&&a.text.length>1&&(a.text=oA(a.text))},uA=function(e,t,r,n){let[a,i,o]=t;i===0||o===n[a].length?Mo(r):(Mo(r),Mo([e[t[1]]])),sA(e,i,r),Ib(e,i,r)},lA=function(e,t,r,n){let[a,,i]=t,o=(n[a]||[]).length;i<o?(lh(e,i,r),Mo(r)):o===i&&(Mo(e),lh(e,i,r),n[a+1]&&(r[r.length-1].post+=" ")),Ib(e,t[2],r),t[4]=r[r.length-1].id};let cs=0;const ch=e=>(e=e.length<3?"0"+e:e,e.length<3?"0"+e:e),zb=function(e){let[t,r]=e.index||[0,0];cs+=1,cs=cs>46655?0:cs,t=t>46655?0:t,r=r>1294?0:r;let n=ch(cs.toString(36));n+=ch(t.toString(36));let a=r.toString(36);a=a.length<2?"0"+a:a,n+=a;let i=parseInt(Math.random()*36,10);return n+=i.toString(36),e.normal+"|"+n.toUpperCase()},fh=function(e){e.has("@hasContraction")&&typeof e.contractions=="function"&&e.grow("@hasContraction").contractions().expand()},mh=e=>Object.prototype.toString.call(e)==="[object Array]",cA=function(e){return e=e.map(t=>(t.id=zb(t),t)),e},fA=function(e,t){const{methods:r}=t;return typeof e=="string"?r.one.tokenize.fromString(e,t)[0]:typeof e=="object"&&e.isView?e.clone().docs[0]||[]:mh(e)?mh(e[0])?e[0]:e:[]},dh=function(e,t,r){const{document:n,world:a}=t;t.uncache();let i=t.fullPointer,o=t.fullPointer;t.forEach((u,l)=>{let c=u.fullPointer[0],[f]=c,m=n[f],d=fA(e,a);d.length!==0&&(d=cA(d),r?(fh(t.update([c]).firstTerm()),uA(m,c,d,n)):(fh(t.update([c]).lastTerm()),lA(m,c,d,n)),n[f]&&n[f][c[1]]&&(c[3]=n[f][c[1]].id),o[l]=c,c[2]+=d.length,i[l]=c)});let s=t.toView(i);return t.ptrs=o,s.compute(["id","index","freeze","lexicon"]),s.world.compute.preTagger&&s.compute("preTagger"),s.compute("unfreeze"),s},Hi={insertAfter:function(e){return dh(e,this,!1)},insertBefore:function(e){return dh(e,this,!0)}};Hi.append=Hi.insertAfter;Hi.prepend=Hi.insertBefore;Hi.insert=Hi.insertAfter;const mA=/\$[0-9a-z]+/g,Km={},dA=e=>new RegExp("^\\p{Lu}[\\p{Ll}'’]","u").test(e)||new RegExp("^\\p{Lu}$","u").test(e),hA=e=>e.replace(new RegExp("^\\p{Ll}","u"),t=>t.toUpperCase()),pA=e=>e.replace(new RegExp("^\\p{Lu}","u"),t=>t.toLowerCase()),gA=function(e,t,r){return e.forEach(n=>{let a=t(n);n.replaceWith(a,r)}),e},vA=function(e,t){if(typeof e!="string")return e;let r=t.groups();return e=e.replace(mA,n=>{let a=n.replace(/\$/,"");return r.hasOwnProperty(a)?r[a].text():n}),e};Km.replaceWith=function(e,t={}){let r=this.fullPointer,n=this;if(this.uncache(),typeof e=="function")return gA(n,e,t);let a=n.docs[0];if(!a)return n;let i=t.possessives&&a[a.length-1].tags.has("Possessive"),o=t.case&&dA(a[0].text);e=vA(e,n);let s=this.update(r);r=r.map(m=>m.slice(0,3));let u=(s.docs[0]||[]).map(m=>Array.from(m.tags)),l=s.docs[0][0].pre,c=s.docs[0][s.docs[0].length-1].post;if(typeof e=="string"&&(e=this.fromText(e).compute("id")),n.insertAfter(e),s.has("@hasContraction")&&n.contractions&&n.grow("@hasContraction+").contractions().expand(),n.delete(s),i){let m=n.docs[0],d=m[m.length-1];d.tags.has("Possessive")||(d.text+="'s",d.normal+="'s",d.tags.add("Possessive"))}if(l&&n.docs[0]&&(n.docs[0][0].pre=l),c&&n.docs[0]){let m=n.docs[0][n.docs[0].length-1];m.post.trim()||(m.post=c)}let f=n.toView(r).compute(["index","freeze","lexicon"]);if(f.world.compute.preTagger&&f.compute("preTagger"),f.compute("unfreeze"),t.tags&&f.terms().forEach((m,d)=>{m.tagSafe(u[d])}),!f.docs[0]||!f.docs[0][0])return f;if(t.case){let m=o?hA:pA;f.docs[0][0].text=m(f.docs[0][0].text)}return f};Km.replace=function(e,t,r){if(e&&!t)return this.replaceWith(e,r);let n=this.match(e);return n.found?(this.soften(),n.replaceWith(t,r)):this};const yA=function(e,t){let r=e.length-1,n=e[r],a=e[r-t];a&&n&&(a.post+=n.post,a.post=a.post.replace(/ +([.?!,;:])/,"$1"),a.post=a.post.replace(/[,;:]+([.?!])/,"$1"))},bA=function(e,t){t.forEach(r=>{let[n,a,i]=r,o=i-a;e[n]&&(i===e[n].length&&i>1&&yA(e[n],o),e[n].splice(a,o))});for(let r=e.length-1;r>=0;r-=1)if(e[r].length===0&&(e.splice(r,1),r===e.length&&e[r-1])){let n=e[r-1],a=n[n.length-1];a&&(a.post=a.post.trimEnd())}return e},wA=function(e,t){return e=e.map(r=>{let[n]=r;return t[n]&&t[n].forEach(a=>{let i=a[2]-a[1];r[1]<=a[1]&&r[2]>=a[2]&&(r[2]-=i)}),r}),e.forEach((r,n)=>{if(r[1]===0&&r[2]==0)for(let a=n+1;a<e.length;a+=1)e[a][0]-=1,e[a][0]<0&&(e[a][0]=0)}),e=e.filter(r=>r[2]-r[1]>0),e=e.map(r=>(r[3]=null,r[4]=null,r)),e},qf={remove:function(e){const{indexN:t}=this.methods.one.pointer;this.uncache();let r=this.all(),n=this;e&&(r=this,n=this.match(e));let a=!r.ptrs;n.has("@hasContraction")&&n.contractions&&n.grow("@hasContraction").contractions().expand();let i=r.fullPointer,o=n.fullPointer.reverse(),s=bA(this.document,o),u=t(o);return i=wA(i,u),r.ptrs=i,r.document=s,r.compute("index"),a&&(r.ptrs=void 0),e?r.toView(i):(this.ptrs=[],r.none())}};qf.delete=qf.remove;const Ts={pre:function(e,t){return e===void 0&&this.found?this.docs[0][0].pre:(this.docs.forEach(r=>{let n=r[0];t===!0?n.pre+=e:n.pre=e}),this)},post:function(e,t){if(e===void 0){let r=this.docs[this.docs.length-1];return r[r.length-1].post}return this.docs.forEach(r=>{let n=r[r.length-1];t===!0?n.post+=e:n.post=e}),this},trim:function(){if(!this.found)return this;let e=this.docs,t=e[0][0];t.pre=t.pre.trimStart();let r=e[e.length-1],n=r[r.length-1];return n.post=n.post.trimEnd(),this},hyphenate:function(){return this.docs.forEach(e=>{e.forEach((t,r)=>{r!==0&&(t.pre=""),e[r+1]&&(t.post="-")})}),this},dehyphenate:function(){const e=/[-–—]/;return this.docs.forEach(t=>{t.forEach(r=>{e.test(r.post)&&(r.post=" ")})}),this},toQuotations:function(e,t){return e=e||'"',t=t||'"',this.docs.forEach(r=>{r[0].pre=e+r[0].pre;let n=r[r.length-1];n.post=t+n.post}),this},toParentheses:function(e,t){return e=e||"(",t=t||")",this.docs.forEach(r=>{r[0].pre=e+r[0].pre;let n=r[r.length-1];n.post=t+n.post}),this}};Ts.deHyphenate=Ts.dehyphenate;Ts.toQuotation=Ts.toQuotations;const xA=(e,t)=>e.normal<t.normal?-1:e.normal>t.normal?1:0,DA=(e,t)=>{let r=e.normal.trim().length,n=t.normal.trim().length;return r<n?1:r>n?-1:0},NA=(e,t)=>e.words<t.words?1:e.words>t.words?-1:0,AA=(e,t)=>e[0]<t[0]?1:e[0]>t[0]?-1:e[1]>t[1]?1:-1,CA=function(e){let t={};return e.forEach(r=>{t[r.normal]=t[r.normal]||0,t[r.normal]+=1}),e.sort((r,n)=>{let a=t[r.normal],i=t[n.normal];return a<i?1:a>i?-1:0}),e},_c={alpha:xA,length:DA,wordCount:NA,sequential:AA,byFreq:CA},EA=new Set(["index","sequence","seq","sequential","chron","chronological"]),SA=new Set(["freq","frequency","topk","repeats"]),MA=new Set(["alpha","alphabetical"]),TA=function(e,t){let r=e.fullPointer;return r=r.sort((n,a)=>(n=e.update([n]),a=e.update([a]),t(n,a))),e.ptrs=r,e},FA=function(e){let{docs:t,pointer:r}=this;if(this.uncache(),typeof e=="function")return TA(this,e);e=e||"alpha";let n=r||t.map((i,o)=>[o]),a=t.map((i,o)=>({index:o,words:i.length,normal:i.map(s=>s.machine||s.normal||"").join(" "),pointer:n[o]}));return EA.has(e)&&(e="sequential"),MA.has(e)&&(e="alpha"),SA.has(e)?(a=_c.byFreq(a),this.update(a.map(i=>i.pointer))):typeof _c[e]=="function"?(a=a.sort(_c[e]),this.update(a.map(i=>i.pointer))):this},PA=function(){let e=this.pointer||this.docs.map((t,r)=>[r]);return e=[].concat(e),e=e.reverse(),this._cache&&(this._cache=this._cache.reverse()),this.update(e)},kA=function(){let e=new Set;return this.filter(r=>{let n=r.text("machine");return e.has(n)?!1:(e.add(n),!0)})},OA={unique:kA,reverse:PA,sort:FA},$A=e=>Object.prototype.toString.call(e)==="[object Array]",jb=function(e,t){if(e.length>0){let r=e[e.length-1],n=r[r.length-1];/ /.test(n.post)===!1&&(n.post+=" ")}return e=e.concat(t),e},_A=function(e,t){if(e.document===t.document){let n=e.fullPointer.concat(t.fullPointer);return e.toView(n).compute("index")}return t.fullPointer.forEach(n=>{n[0]+=e.document.length}),e.document=jb(e.document,t.docs),e.all()},BA={concat:function(e){if(typeof e=="string"){let t=this.fromText(e);if(!this.found||!this.ptrs)this.document=this.document.concat(t.document);else{let r=this.fullPointer,n=r[r.length-1][0];this.document.splice(n,0,...t.document)}return this.all().compute("index")}if(typeof e=="object"&&e.isView)return _A(this,e);if($A(e)){let t=jb(this.document,e);return this.document=t,this.all()}return this}},IA=function(){return this.ptrs=this.fullPointer,this},zA=function(){let e=this.ptrs;return!e||e.length<1?this:(e=e.map(t=>t.slice(0,3)),this.ptrs=e,this)},jA={harden:IA,soften:zA},qA=Object.assign({},aA,Hi,Km,qf,Ts,OA,BA,jA),RA=function(e){Object.assign(e.prototype,qA)},LA={id:function(e){let t=e.docs;for(let r=0;r<t.length;r+=1)for(let n=0;n<t[r].length;n+=1){let a=t[r][n];a.id=a.id||zb(a)}}},HA={api:RA,compute:LA},GA=[{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"]}],rn=!0,VA={st:rn,nd:rn,rd:rn,th:rn,am:rn,pm:rn,max:rn,"°":rn,s:rn,e:rn,er:rn,ère:rn,ème:rn},UA={one:{contractions:GA,numberSuffixes:VA}},Bc=function(e,t,r){let[n,a]=t;!r||r.length===0||(r=r.map((i,o)=>(i.implicit=i.text,i.machine=i.text,i.pre="",i.post="",i.text="",i.normal="",i.index=[n,a+o],i)),r[0]&&(r[0].pre=e[n][a].pre,r[r.length-1].post=e[n][a].post,r[0].text=e[n][a].text,r[0].normal=e[n][a].normal),e[n].splice(a,1,...r))},WA=/'/,JA=new Set(["what","how","when","where","why"]),KA=new Set(["be","go","start","think","need"]),YA=new Set(["been","gone"]),ZA=function(e,t){let r=e[t].normal.split(WA)[0];if(JA.has(r))return[r,"did"];if(e[t+1]){if(YA.has(e[t+1].normal))return[r,"had"];if(KA.has(e[t+1].normal))return[r,"would"]}return null},QA=function(e,t){return e[t].normal==="ain't"||e[t].normal==="aint"?null:[e[t].normal.replace(/n't/,""),"not"]},Ym=/'/,XA=/(e|é|aison|sion|tion)$/,e3=/(age|isme|acle|ege|oire)$/,t3=(e,t)=>{let r=e[t].normal.split(Ym)[1];return r&&r.endsWith("e")?["la",r]:["le",r]},r3=(e,t)=>{let r=e[t].normal.split(Ym)[1];return r&&XA.test(r)&&!e3.test(r)?["du",r]:r&&r.endsWith("s")?["des",r]:["de",r]},n3=(e,t)=>["je",e[t].normal.split(Ym)[1]],Ic={preJ:n3,preL:t3,preD:r3},a3=/^([0-9.]{1,4}[a-z]{0,2}) ?[-–—] ?([0-9]{1,4}[a-z]{0,2})$/i,i3=/^([0-9]{1,2}(:[0-9][0-9])?(am|pm)?) ?[-–—] ?([0-9]{1,2}(:[0-9][0-9])?(am|pm)?)$/i,o3=/^[0-9]{3}-[0-9]{4}$/,s3=function(e,t){let r=e[t],n=r.text.match(a3);return n!==null?r.tags.has("PhoneNumber")===!0||o3.test(r.text)?null:[n[1],"to",n[2]]:(n=r.text.match(i3),n!==null?[n[1],"to",n[4]]:null)},u3=/^([+-]?[0-9][.,0-9]*)([a-z°²³µ/]+)$/,l3=function(e,t,r){const n=r.model.one.numberSuffixes||{};let i=e[t].text.match(u3);if(i!==null){let o=i[2].toLowerCase().trim();return n.hasOwnProperty(o)?null:[i[1],o]}return null},hh=/'/,c3=/^[0-9][^-–—]*[-–—].*?[0-9]/,ph=function(e,t,r,n){let a=t.update();a.document=[e];let i=r+n;r>0&&(r-=1),e[i]&&(i+=1),a.ptrs=[[0,r,i]]},gh={t:(e,t)=>QA(e,t),d:(e,t)=>ZA(e,t)},vh={j:(e,t)=>Ic.preJ(e,t),l:(e,t)=>Ic.preL(e,t),d:(e,t)=>Ic.preD(e,t)},f3=function(e,t,r,n){for(let a=0;a<e.length;a+=1){let i=e[a];if(i.word===t.normal)return i.out;if(n!==null&&n===i.after)return[r].concat(i.out);if(r!==null&&r===i.before&&n&&n.length>2)return i.out.concat(n)}return null},zc=function(e,t){let r=t.fromText(e.join(" "));return r.compute(["id","alias"]),r.docs[0]},m3=function(e,t){for(let r=t+1;r<5&&e[r];r+=1)if(e[r].normal==="been")return["there","has"];return["there","is"]},d3=e=>{let{world:t,document:r}=e;const{model:n,methods:a}=t;let i=n.one.contractions||[];r.forEach((o,s)=>{for(let u=o.length-1;u>=0;u-=1){let l=null,c=null;if(hh.test(o[u].normal)===!0){let m=o[u].normal.split(hh);l=m[0],c=m[1]}let f=f3(i,o[u],l,c);if(!f&&gh.hasOwnProperty(c)&&(f=gh[c](o,u,t)),!f&&vh.hasOwnProperty(l)&&(f=vh[l](o,u)),l==="there"&&c==="s"&&(f=m3(o,u)),f){f=zc(f,e),Bc(r,[s,u],f),ph(r[s],e,u,f.length);continue}if(c3.test(o[u].normal)){f=s3(o,u),f&&(f=zc(f,e),Bc(r,[s,u],f),a.one.setTag(f,"NumberRange",t),f[2]&&f[2].tags.has("Time")&&a.one.setTag([f[0]],"Time",t,null,"time-range"),ph(r[s],e,u,f.length));continue}f=l3(o,u,t),f&&(f=zc(f,e),Bc(r,[s,u],f),a.one.setTag([f[1]],"Unit",t,null,"contraction-unit"))}})},h3={contractions:d3},p3={model:UA,compute:h3,hooks:["contractions"]},yh=function(e){const t=e.world,{model:r,methods:n}=e.world,a=n.one.setTag,{frozenLex:i}=r.one,o=r.one._multiCache||{};e.docs.forEach(s=>{for(let u=0;u<s.length;u+=1){let l=s[u],c=l.machine||l.normal;if(o[c]!==void 0&&s[u+1]){let f=u+o[c]-1;for(let m=f;m>u;m-=1){let d=s.slice(u,m+1),p=d.map(h=>h.machine||h.normal).join(" ");if(i.hasOwnProperty(p)===!0){a(d,i[p],t,!1,"1-frozen-multi-lexicon"),d.forEach(h=>h.frozen=!0);continue}}}if(i[c]!==void 0&&i.hasOwnProperty(c)){a([l],i[c],t,!1,"1-freeze-lexicon"),l.frozen=!0;continue}}})},g3=function(e){return e.docs.forEach(t=>{t.forEach(r=>{delete r.frozen})}),e},v3={frozen:yh,freeze:yh,unfreeze:g3},bh=e=>"\x1B[34m"+e+"\x1B[0m",wh=e=>"\x1B[3m\x1B[2m"+e+"\x1B[0m",xh=function(e){e.docs.forEach(t=>{console.log(bh(`
2
2
  ┌─────────`)),t.forEach(r=>{let n=` ${wh("│")} `,a=r.implicit||r.text||"-";r.frozen===!0?n+=`${bh(a)} ❄️`:n+=wh(a),console.log(n)})})},y3={compute:v3,mutate:e=>{const t=e.methods.one;t.termMethods.isFrozen=r=>r.frozen===!0,t.debug.freeze=xh,t.debug.frozen=xh},api:function(e){e.prototype.freeze=function(){return this.docs.forEach(t=>{t.forEach(r=>{r.frozen=!0})}),this},e.prototype.unfreeze=function(){this.compute("unfreeze")},e.prototype.isFrozen=function(){return this.match("@isFrozen+")}},hooks:["freeze"]},b3=function(e,t,r){const{model:n,methods:a}=r,i=a.one.setTag,o=n.one._multiCache||{},{lexicon:s}=n.one||{};let u=e[t],l=u.machine||u.normal;if(o[l]!==void 0&&e[t+1]){let c=t+o[l]-1;for(let f=c;f>t;f-=1){let m=e.slice(t,f+1);if(m.length<=1)return!1;let d=m.map(p=>p.machine||p.normal).join(" ");if(s.hasOwnProperty(d)===!0){let p=s[d];return i(m,p,r,!1,"1-multi-lexicon"),p&&p.length===2&&(p[0]==="PhrasalVerb"||p[1]==="PhrasalVerb")&&i([m[1]],"Particle",r,!1,"1-phrasal-particle"),!0}}return!1}return null},Dh=/^(under|over|mis|re|un|dis|semi|pre|post)-?/,w3=new Set(["Verb","Infinitive","PastTense","Gerund","PresentTense","Adjective","Participle"]),x3=function(e,t,r){const{model:n,methods:a}=r,i=a.one.setTag,{lexicon:o}=n.one;let s=e[t],u=s.machine||s.normal;if(o[u]!==void 0&&o.hasOwnProperty(u))return i([s],o[u],r,!1,"1-lexicon"),!0;if(s.alias){let l=s.alias.find(c=>o.hasOwnProperty(c));if(l)return i([s],o[l],r,!1,"1-lexicon-alias"),!0}if(Dh.test(u)===!0){let l=u.replace(Dh,"");if(o.hasOwnProperty(l)&&l.length>3&&w3.has(o[l]))return i([s],o[l],r,!1,"1-lexicon-prefix"),!0}return null},D3=function(e){const t=e.world;e.docs.forEach(r=>{for(let n=0;n<r.length;n+=1)if(r[n].tags.size===0){let a=null;a=a||b3(r,n,t),a=a||x3(r,n,t)}})},N3={lexicon:D3},A3=function(e){let t={},r={};return Object.keys(e).forEach(n=>{let a=e[n];n=n.toLowerCase().trim(),n=n.replace(/'s\b/,"");let i=n.split(/ /);i.length>1&&(r[i[0]]===void 0||i.length>r[i[0]])&&(r[i[0]]=i.length),t[n]=t[n]||a}),delete t[""],delete t[null],delete t[" "],{lex:t,_multi:r}},C3={one:{expandLexicon:A3}},E3=function(e,t=!1){const r=this.world(),{methods:n,model:a}=r;if(!e)return;if(Object.keys(e).forEach(s=>{typeof e[s]=="string"&&e[s].startsWith("#")&&(e[s]=e[s].replace(/^#/,""))}),t===!0){let{lex:s,_multi:u}=n.one.expandLexicon(e,r);Object.assign(a.one._multiCache,u),Object.assign(a.one.frozenLex,s);return}if(n.two.expandLexicon){let{lex:s,_multi:u}=n.two.expandLexicon(e,r);Object.assign(a.one.lexicon,s),Object.assign(a.one._multiCache,u)}let{lex:i,_multi:o}=n.one.expandLexicon(e,r);Object.assign(a.one.lexicon,i),Object.assign(a.one._multiCache,o)},S3={addWords:E3},M3={one:{lexicon:{},_multiCache:{},frozenLex:{}}},T3={model:M3,methods:C3,compute:N3,lib:S3,hooks:["lexicon"]},F3=function(e,t){const{methods:r,model:n}=t;return r.one.tokenize.splitTerms(e,n).map(i=>r.one.tokenize.splitWhitespace(i,n)).map(i=>i.text.toLowerCase())},qb=function(e,t){let r=[{}],n=[null],a=[0],i=[],o=0;e.forEach(function(s){let u=0,l=F3(s,t);for(let c=0;c<l.length;c++){let f=l[c];r[u]&&r[u].hasOwnProperty(f)?u=r[u][f]:(o++,r[u][f]=o,r[o]={},u=o,n[o]=null)}n[u]=[l.length]});for(let s in r[0])o=r[0][s],a[o]=0,i.push(o);for(;i.length;){let s=i.shift(),u=Object.keys(r[s]);for(let l=0;l<u.length;l+=1){let c=u[l],f=r[s][c];for(i.push(f),o=a[s];o>0&&!r[o].hasOwnProperty(c);)o=a[o];if(r.hasOwnProperty(o)){let m=r[o][c];a[f]=m,n[m]&&(n[f]=n[f]||[],n[f]=n[f].concat(n[m]))}else a[f]=0}}return{goNext:r,endAs:n,failTo:a}},P3=function(e,t,r){let n=0,a=[];for(let i=0;i<e.length;i++){let o=e[i][r.form]||e[i].normal;for(;n>0&&(t.goNext[n]===void 0||!t.goNext[n].hasOwnProperty(o));)n=t.failTo[n]||0;if(t.goNext[n].hasOwnProperty(o)&&(n=t.goNext[n][o],t.endAs[n])){let s=t.endAs[n];for(let u=0;u<s.length;u++){let l=s[u],c=e[i-l+1],[f,m]=c.index;a.push([f,m,m+l,c.id])}}}return a},k3=function(e,t){for(let r=0;r<e.length;r+=1)if(t.has(e[r])===!0)return!1;return!0},O3=function(e,t,r){let n=[];r.form=r.form||"normal";let a=e.docs;if(!t.goNext||!t.goNext[0])return console.error("Compromise invalid lookup trie"),e.none();let i=Object.keys(t.goNext[0]);for(let o=0;o<a.length;o++){if(e._cache&&e._cache[o]&&k3(i,e._cache[o])===!0)continue;let s=a[o],u=P3(s,t,r);u.length>0&&(n=n.concat(u))}return e.update(n)},$3=e=>Object.prototype.toString.call(e)==="[object Object]";function _3(e){e.prototype.lookup=function(t,r={}){if(!t)return this.none();typeof t=="string"&&(t=[t]);let n=$3(t)?t:qb(t,this.world),a=O3(this,n,r);return a=a.settle(),a}}const jc=(e,t)=>{for(let r=e.length-1;r>=0;r-=1)if(e[r]!==t)return e=e.slice(0,r+1),e;return e},B3=function(e){return e.goNext=e.goNext.map(t=>{if(Object.keys(t).length!==0)return t}),e.goNext=jc(e.goNext,void 0),e.failTo=jc(e.failTo,0),e.endAs=jc(e.endAs,null),e},Rf={buildTrie:function(e){const t=qb(e,this.world());return B3(t)}};Rf.compile=Rf.buildTrie;const I3={api:_3,lib:Rf},Nh=function(e,t){return t&&e.forEach(r=>{let n=r[0];t[n]&&(r[0]=t[n][0],r[1]+=t[n][1],r[2]+=t[n][1])}),e},Rb=function(e,t){let{ptrs:r,byGroup:n}=e;return r=Nh(r,t),Object.keys(n).forEach(a=>{n[a]=Nh(n[a],t)}),{ptrs:r,byGroup:n}},Gs=function(e,t,r){const n=r.methods.one;return typeof e=="number"&&(e=String(e)),typeof e=="string"&&(e=n.killUnicode(e,r),e=n.parseMatch(e,t,r)),e},Lb=e=>Object.prototype.toString.call(e)==="[object Object]",Vs=e=>e&&Lb(e)&&e.isView===!0,Us=e=>e&&Lb(e)&&e.isNet===!0,z3=function(e,t,r){const n=this.methods.one;if(Vs(e))return this.intersection(e);if(Us(e))return this.sweep(e,{tagger:!1}).view.settle();e=Gs(e,r,this.world);let a={regs:e,group:t},i=n.match(this.docs,a,this._cache),{ptrs:o,byGroup:s}=Rb(i,this.fullPointer),u=this.toView(o);return u._groups=s,u},j3=function(e,t,r){const n=this.methods.one;if(Vs(e))return this.intersection(e).eq(0);if(Us(e))return this.sweep(e,{tagger:!1,matchOne:!0}).view;e=Gs(e,r,this.world);let a={regs:e,group:t,justOne:!0},i=n.match(this.docs,a,this._cache),{ptrs:o,byGroup:s}=Rb(i,this.fullPointer),u=this.toView(o);return u._groups=s,u},q3=function(e,t,r){const n=this.methods.one;if(Vs(e))return this.intersection(e).fullPointer.length>0;if(Us(e))return this.sweep(e,{tagger:!1}).view.found;e=Gs(e,r,this.world);let a={regs:e,group:t,justOne:!0};return n.match(this.docs,a,this._cache).ptrs.length>0},R3=function(e,t,r){const n=this.methods.one;if(Vs(e))return this.filter(u=>u.intersection(e).found);if(Us(e)){let u=this.sweep(e,{tagger:!1}).view.settle();return this.if(u)}e=Gs(e,r,this.world);let a={regs:e,group:t,justOne:!0},i=this.fullPointer,o=this._cache||[];i=i.filter((u,l)=>{let c=this.update([u]);return n.match(c.docs,a,o[l]).ptrs.length>0});let s=this.update(i);return this._cache&&(s._cache=i.map(u=>o[u[0]])),s},L3=function(e,t,r){const{methods:n}=this,a=n.one;if(Vs(e))return this.filter(s=>!s.intersection(e).found);if(Us(e)){let s=this.sweep(e,{tagger:!1}).view.settle();return this.ifNo(s)}e=Gs(e,r,this.world);let i=this._cache||[],o=this.filter((s,u)=>{let l={regs:e,group:t,justOne:!0};return a.match(s.docs,l,i[u]).ptrs.length===0});return this._cache&&(o._cache=o.ptrs.map(s=>i[s[0]])),o},H3={matchOne:j3,match:z3,has:q3,if:R3,ifNo:L3},G3=function(e,t,r){const{indexN:n}=this.methods.one.pointer;let a=[],i=n(this.fullPointer);Object.keys(i).forEach(s=>{let u=i[s].sort((l,c)=>l[1]>c[1]?1:-1)[0];u[1]>0&&a.push([u[0],0,u[1]])});let o=this.toView(a);return e?o.match(e,t,r):o},V3=function(e,t,r){const{indexN:n}=this.methods.one.pointer;let a=[],i=n(this.fullPointer),o=this.document;Object.keys(i).forEach(u=>{let l=i[u].sort((m,d)=>m[1]>d[1]?-1:1)[0],[c,,f]=l;f<o[c].length&&a.push([c,f,o[c].length])});let s=this.toView(a);return e?s.match(e,t,r):s},U3=function(e,t,r){typeof e=="string"&&(e=this.world.methods.one.parseMatch(e,r,this.world)),e[e.length-1].end=!0;let n=this.fullPointer;return this.forEach((a,i)=>{let o=a.before(e,t);if(o.found){let s=o.terms();n[i][1]-=s.length,n[i][3]=s.docs[0][0].id}}),this.update(n)},W3=function(e,t,r){typeof e=="string"&&(e=this.world.methods.one.parseMatch(e,r,this.world)),e[0].start=!0;let n=this.fullPointer;return this.forEach((a,i)=>{let o=a.after(e,t);if(o.found){let s=o.terms();n[i][2]+=s.length,n[i][4]=null}}),this.update(n)},J3=function(e,t,r){return this.growRight(e,t,r).growLeft(e,t,r)},K3={before:G3,after:V3,growLeft:U3,growRight:W3,grow:J3},Hb=function(e,t){return[e[0],e[1],t[2]]},Y3=function(e){return Object.prototype.toString.call(e)==="[object Array]"},Zm=(e,t,r)=>typeof e=="string"||Y3(e)?t.match(e,r):e||t.none(),Qm=function(e,t){let[r,n,a]=e;return t.document[r]&&t.document[r][n]&&(e[3]=e[3]||t.document[r][n].id,t.document[r][a-1]&&(e[4]=e[4]||t.document[r][a-1].id)),e},Io={};Io.splitOn=function(e,t){const{splitAll:r}=this.methods.one.pointer;let n=Zm(e,this,t).fullPointer,a=r(this.fullPointer,n),i=[];return a.forEach(o=>{i.push(o.passthrough),i.push(o.before),i.push(o.match),i.push(o.after)}),i=i.filter(o=>o),i=i.map(o=>Qm(o,this)),this.update(i)};Io.splitBefore=function(e,t){const{splitAll:r}=this.methods.one.pointer;let n=Zm(e,this,t).fullPointer,a=r(this.fullPointer,n);for(let o=0;o<a.length;o+=1)!a[o].after&&a[o+1]&&a[o+1].before&&a[o].match&&a[o].match[0]===a[o+1].before[0]&&(a[o].after=a[o+1].before,delete a[o+1].before);let i=[];return a.forEach(o=>{i.push(o.passthrough),i.push(o.before),o.match&&o.after?i.push(Hb(o.match,o.after)):i.push(o.match)}),i=i.filter(o=>o),i=i.map(o=>Qm(o,this)),this.update(i)};Io.splitAfter=function(e,t){const{splitAll:r}=this.methods.one.pointer;let n=Zm(e,this,t).fullPointer,a=r(this.fullPointer,n),i=[];return a.forEach(o=>{i.push(o.passthrough),o.before&&o.match?i.push(Hb(o.before,o.match)):(i.push(o.before),i.push(o.match)),i.push(o.after)}),i=i.filter(o=>o),i=i.map(o=>Qm(o,this)),this.update(i)};Io.split=Io.splitAfter;const Z3=function(e,t){return!e||!t||e[0]!==t[0]?!1:e[2]===t[1]},Ah=function(e,t,r){const n=e.world,a=n.methods.one.parseMatch;t=t||".$",r=r||"^.";let i=a(t,{},n),o=a(r,{},n);i[i.length-1].end=!0,o[0].start=!0;let s=e.fullPointer,u=[s[0]];for(let l=1;l<s.length;l+=1){let c=u[u.length-1],f=s[l],m=e.update([c]),d=e.update([f]);Z3(c,f)&&m.has(i)&&d.has(o)?u[u.length-1]=[c[0],c[1],f[2],c[3],f[4]]:u.push(f)}return e.update(u)},Q3={joinIf:function(e,t){return Ah(this,e,t)},join:function(){return Ah(this)}},Un=Object.assign({},H3,K3,Io,Q3);Un.lookBehind=Un.before;Un.lookBefore=Un.before;Un.lookAhead=Un.after;Un.lookAfter=Un.after;Un.notIf=Un.ifNo;const X3=function(e){Object.assign(e.prototype,Un)},eC=/(?:^|\s)([![^]*(?:<[^<]*>)?\/.*?[^\\/]\/[?\]+*$~]*)(?:\s|$)/,tC=/([!~[^]*(?:<[^<]*>)?\([^)]+[^\\)]\)[?\]+*$~]*)(?:\s|$)/,rC=/ /g,nC=e=>/^[![^]*(<[^<]*>)?\(/.test(e)&&/\)[?\]+*$~]*$/.test(e),Ch=e=>/^[![^]*(<[^<]*>)?\//.test(e)&&/\/[?\]+*$~]*$/.test(e),Eh=function(e){return e=e.map(t=>t.trim()),e=e.filter(t=>t),e},aC=function(e){let t=e.split(eC),r=[];t.forEach(a=>{if(Ch(a)){r.push(a);return}r=r.concat(a.split(tC))}),r=Eh(r);let n=[];return r.forEach(a=>{nC(a)||Ch(a)?n.push(a):n=n.concat(a.split(rC))}),n=Eh(n),n},Sh=/\{([0-9]+)?(, *[0-9]*)?\}/,Mh=/&&/,iC=new RegExp(/^<\s*(\S+)\s*>/),Th=e=>e.charAt(0).toUpperCase()+e.substring(1),dn=e=>e.charAt(e.length-1),nn=e=>e.charAt(0),Co=e=>e.substring(1),Eo=e=>e.substring(0,e.length-1),fs=function(e){return e=Co(e),e=Eo(e),e},Gb=function(e,t){let r={};for(let n=0;n<2;n+=1){if(dn(e)==="$"&&(r.end=!0,e=Eo(e)),nn(e)==="^"&&(r.start=!0,e=Co(e)),dn(e)==="?"&&(r.optional=!0,e=Eo(e)),(nn(e)==="["||dn(e)==="]")&&(r.group=null,nn(e)==="["&&(r.groupStart=!0),dn(e)==="]"&&(r.groupEnd=!0),e=e.replace(/^\[/,""),e=e.replace(/\]$/,""),nn(e)==="<")){const a=iC.exec(e);a.length>=2&&(r.group=a[1],e=e.replace(a[0],""))}if(dn(e)==="+"&&(r.greedy=!0,e=Eo(e)),e!=="*"&&dn(e)==="*"&&e!=="\\*"&&(r.greedy=!0,e=Eo(e)),nn(e)==="!"&&(r.negative=!0,e=Co(e)),nn(e)==="~"&&dn(e)==="~"&&e.length>2&&(e=fs(e),r.fuzzy=!0,r.min=t.fuzzy||.85,/\(/.test(e)===!1))return r.word=e,r;if(nn(e)==="/"&&dn(e)==="/")return e=fs(e),t.caseSensitive&&(r.use="text"),r.regex=new RegExp(e),r;if(Sh.test(e)===!0&&(e=e.replace(Sh,(a,i,o)=>(o===void 0?(r.min=Number(i),r.max=Number(i)):(o=o.replace(/, */,""),i===void 0?(r.min=0,r.max=Number(o)):(r.min=Number(i),r.max=Number(o||999))),r.greedy=!0,r.min||(r.optional=!0),""))),nn(e)==="("&&dn(e)===")"){Mh.test(e)?(r.choices=e.split(Mh),r.operator="and"):(r.choices=e.split("|"),r.operator="or"),r.choices[0]=Co(r.choices[0]);let a=r.choices.length-1;r.choices[a]=Eo(r.choices[a]),r.choices=r.choices.map(i=>i.trim()),r.choices=r.choices.filter(i=>i),r.choices=r.choices.map(i=>i.split(/ /g).map(o=>Gb(o,t))),e=""}if(nn(e)==="{"&&dn(e)==="}"){if(e=fs(e),r.root=e,/\//.test(e)){let a=r.root.split(/\//);r.root=a[0],r.pos=a[1],r.pos==="adj"&&(r.pos="Adjective"),r.pos=r.pos.charAt(0).toUpperCase()+r.pos.substr(1).toLowerCase(),a[2]!==void 0&&(r.sense=a[2])}return r}if(nn(e)==="<"&&dn(e)===">")return e=fs(e),r.chunk=Th(e),r.greedy=!0,r;if(nn(e)==="%"&&dn(e)==="%")return e=fs(e),r.switch=e,r}return nn(e)==="#"?(r.tag=Co(e),r.tag=Th(r.tag),r):nn(e)==="@"?(r.method=Co(e),r):e==="."?(r.anything=!0,r):e==="*"?(r.anything=!0,r.greedy=!0,r.optional=!0,r):(e&&(e=e.replace("\\*","*"),e=e.replace("\\.","."),t.caseSensitive?r.use="text":e=e.toLowerCase(),r.word=e),r)},oC=/[a-z0-9][-–—][a-z]/i,sC=function(e,t){let r=t.model.one.prefixes;for(let n=e.length-1;n>=0;n-=1){let a=e[n];if(a.word&&oC.test(a.word)){let i=a.word.split(/[-–—]/g);if(r.hasOwnProperty(i[0]))continue;i=i.filter(o=>o).reverse(),e.splice(n,1),i.forEach(o=>{let s=Object.assign({},a);s.word=o,e.splice(n,0,s)})}}return e},Fh=function(e,t){let{all:r}=t.methods.two.transform.verb||{},n=e.root;return r?r(n,t.model):[]},Ph=function(e,t){let{all:r}=t.methods.two.transform.noun||{};return r?r(e.root,t.model):[e.root]},kh=function(e,t){let{all:r}=t.methods.two.transform.adjective||{};return r?r(e.root,t.model):[e.root]},uC=function(e,t){return e=e.map(r=>{if(r.root)if(t.methods.two&&t.methods.two.transform){let n=[];r.pos?r.pos==="Verb"?n=n.concat(Fh(r,t)):r.pos==="Noun"?n=n.concat(Ph(r,t)):r.pos==="Adjective"&&(n=n.concat(kh(r,t))):(n=n.concat(Fh(r,t)),n=n.concat(Ph(r,t)),n=n.concat(kh(r,t))),n=n.filter(a=>a),n.length>0&&(r.operator="or",r.fastOr=new Set(n))}else r.machine=r.root,delete r.id,delete r.root;return r}),e},lC=function(e){let t=0,r=null;for(let n=0;n<e.length;n++){const a=e[n];a.groupStart===!0&&(r=a.group,r===null&&(r=String(t),t+=1)),r!==null&&(a.group=r),a.groupEnd===!0&&(r=null)}return e},cC=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;let a=n[0];return a.fuzzy===!0||a.start||a.end?!1:a.word!==void 0&&a.negative!==!0&&a.optional!==!0&&a.method!==!0})===!0&&(t.fastOr=new Set,t.choices.forEach(n=>{t.fastOr.add(n[0].word)}),delete t.choices)}return t})},fC=function(e){return e.map(t=>(t.fuzzy&&t.choices&&t.choices.forEach(r=>{r.length===1&&r[0].word&&(r[0].fuzzy=!0,r[0].min=t.min)}),t))},mC=function(e){return e=lC(e),e=cC(e),e=fC(e),e},dC=function(e,t,r){if(e==null||e==="")return[];t=t||{},typeof e=="number"&&(e=String(e));let n=aC(e);return n=n.map(a=>Gb(a,t)),n=sC(n,r),n=uC(n,r),n=mC(n),n},hC=function(e,t){for(let r of t)if(e.has(r))return!0;return!1},pC=function(e,t){for(let r=0;r<e.length;r+=1){let n=e[r];if(!(n.optional===!0||n.negative===!0||n.fuzzy===!0)){if(n.word!==void 0&&t.has(n.word)===!1||n.tag!==void 0&&t.has("#"+n.tag)===!1)return!0;if(n.fastOr&&hC(n.fastOr,t)===!1)return!1}}return!1},gC=function(e,t){let r=e.length,n=t.length;if(r===0)return n;if(n===0)return r;let a=(n>r?n:r)+1;if(Math.abs(r-n)>(a||100))return a||100;let i=[];for(let m=0;m<a;m++)i[m]=[m],i[m].length=a;for(let m=0;m<a;m++)i[0][m]=m;let o,s,u,l,c,f;for(let m=1;m<=r;++m)for(s=e[m-1],o=1;o<=n;++o){if(m===o&&i[m][o]>4)return r;u=t[o-1],l=s===u?0:1,c=i[m-1][o]+1,(f=i[m][o-1]+1)<c&&(c=f),(f=i[m-1][o-1]+l)<c&&(c=f),m>1&&o>1&&s===t[o-2]&&e[m-2]===u&&(f=i[m-2][o-2]+l)<c?i[m][o]=f:i[m][o]=c}return i[r][n]},vC=function(e,t,r=3){if(e===t)return 1;if(e.length<r||t.length<r)return 0;const n=gC(e,t);let a=Math.max(e.length,t.length);return 1-(a===0?0:n/a)},yC=/([\u0022\uFF02\u0027\u201C\u2018\u201F\u201B\u201E\u2E42\u201A\u00AB\u2039\u2035\u2036\u2037\u301D\u0060\u301F])/,bC=/([\u0022\uFF02\u0027\u201D\u2019\u00BB\u203A\u2032\u2033\u2034\u301E\u00B4])/,Oh=/^[-–—]$/,$h=/ [-–—]{1,3} /,ea=(e,t)=>e.post.indexOf(t)!==-1,Fs={hasQuote:e=>yC.test(e.pre)||bC.test(e.post),hasComma:e=>ea(e,","),hasPeriod:e=>ea(e,".")===!0&&ea(e,"...")===!1,hasExclamation:e=>ea(e,"!"),hasQuestionMark:e=>ea(e,"?")||ea(e,"¿"),hasEllipses:e=>ea(e,"..")||ea(e,"…"),hasSemicolon:e=>ea(e,";"),hasColon:e=>ea(e,":"),hasSlash:e=>/\//.test(e.text),hasHyphen:e=>Oh.test(e.post)||Oh.test(e.pre),hasDash:e=>$h.test(e.post)||$h.test(e.pre),hasContraction:e=>!!e.implicit,isAcronym:e=>e.tags.has("Acronym"),isKnown:e=>e.tags.size>0,isTitleCase:e=>new RegExp("^\\p{Lu}[a-z'\\u00C0-\\u00FF]","u").test(e.text),isUpperCase:e=>new RegExp("^\\p{Lu}+$","u").test(e.text)};Fs.hasQuotation=Fs.hasQuote;let gr=function(){};const wC=function(e,t,r,n){if(t.anything===!0)return!0;if(t.start===!0&&r!==0||t.end===!0&&r!==n-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||vC(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 Fs[t.method]=="function"&&Fs[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;let 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=>gr(e,a,r,n)):t.choices.some(a=>gr(e,a,r,n)):!1};gr=function(e,t,r,n){let a=wC(e,t,r,n);return t.negative===!0?!a:a};const xC=function(e,t){let r=Object.assign({},e.regs[e.r],{start:!1,end:!1}),n=e.t;for(;e.t<e.terms.length;e.t+=1){if(t&&gr(e.terms[e.t],t,e.start_i+e.t,e.phrase_length))return e.t;let a=e.t-n+1;if(r.max!==void 0&&a===r.max)return e.t;if(gr(e.terms[e.t],r,e.start_i+e.t,e.phrase_length)===!1)return r.min!==void 0&&a<r.min?null:e.t}return e.t},DC=function(e,t){let r=e.t;if(!t)return e.terms.length;for(;r<e.terms.length;r+=1)if(gr(e.terms[r],t,e.start_i+r,e.phrase_length)===!0)return r;return null},NC=function(e,t){if(e.end===!0&&e.greedy===!0&&t.start_i+t.t<t.phrase_length-1){let r=Object.assign({},e,{end:!1});if(gr(t.terms[t.t],r,t.start_i+t.t,t.phrase_length)===!0)return!0}return!1},oc=function(e,t){return e.groups[e.inGroup]||(e.groups[e.inGroup]={start:t,length:0}),e.groups[e.inGroup]},AC=function(e){let{regs:t}=e,r=t[e.r],n=DC(e,t[e.r+1]);if(n===null||n===0||r.min!==void 0&&n-e.t<r.min)return null;if(r.max!==void 0&&n-e.t>r.max)return e.t=e.t+r.max,!0;if(e.hasGroup===!0){const a=oc(e,e.t);a.length=n-e.t}return e.t=n,!0},CC=function(e){return Object.prototype.toString.call(e)==="[object Array]"},Vb=function(e,t=0){let r=e.regs[e.r],n=!1;for(let a=0;a<r.choices.length;a+=1){let i=r.choices[a];if(!CC(i))return!1;if(n=i.every((o,s)=>{let u=0,l=e.t+s+t+u;if(e.terms[l]===void 0)return!1;let c=gr(e.terms[l],o,l+e.start_i,e.phrase_length);if(c===!0&&o.greedy===!0)for(let f=1;f<e.terms.length;f+=1){let m=e.terms[l+f];if(m)if(gr(m,o,e.start_i+f,e.phrase_length)===!0)u+=1;else break}return t+=u,c}),n){t+=i.length;break}}return n&&r.greedy===!0?Vb(e,t):t},EC=function(e){let t=0;return e.regs[e.r].choices.every(a=>{let i=a.every((o,s)=>{let u=e.t+s;return e.terms[u]===void 0?!1:gr(e.terms[u],o,u,e.phrase_length)});return i===!0&&a.length>t&&(t=a.length),i})===!0?t:!1},SC=function(e){const{regs:t}=e;let r=t[e.r],n=Vb(e);if(n){if(r.negative===!0)return null;if(e.hasGroup===!0){const a=oc(e,e.t);a.length+=n}if(r.end===!0){let a=e.phrase_length;if(e.t+e.start_i+n!==a)return null}return e.t+=n,!0}else if(!r.optional)return null;return!0},MC=function(e){const{regs:t}=e;let r=t[e.r],n=EC(e);if(n){if(r.negative===!0)return null;if(e.hasGroup===!0){const a=oc(e,e.t);a.length+=n}if(r.end===!0){let a=e.phrase_length-1;if(e.t+e.start_i!==a)return null}return e.t+=n,!0}else if(!r.optional)return null;return!0},TC=function(e,t,r){let n=0;for(let a=e.t;a<e.terms.length;a+=1){let i=gr(e.terms[a],t,e.start_i+e.t,e.phrase_length);if(i||r&&(i=gr(e.terms[a],r,e.start_i+e.t,e.phrase_length),i)||(n+=1,t.max!==void 0&&n===t.max))break}return n===0||t.min&&t.min>n?!1:(e.t+=n,!0)},FC=function(e){const{regs:t}=e;let r=t[e.r],n=Object.assign({},r);if(n.negative=!1,gr(e.terms[e.t],n,e.start_i+e.t,e.phrase_length))return!1;if(r.optional){let i=t[e.r+1];i&&(gr(e.terms[e.t],i,e.start_i+e.t,e.phrase_length)?e.r+=1:i.optional&&t[e.r+2]&&gr(e.terms[e.t],t[e.r+2],e.start_i+e.t,e.phrase_length)&&(e.r+=2))}return r.greedy?TC(e,n,t[e.r+1]):(e.t+=1,!0)},PC=function(e){const{regs:t}=e;let r=t[e.r],n=e.terms[e.t],a=gr(n,t[e.r+1],e.start_i+e.t,e.phrase_length);if(r.negative||a){let i=e.terms[e.t+1];(!i||!gr(i,t[e.r+1],e.start_i+e.t,e.phrase_length))&&(e.r+=1)}},kC=function(e){const{regs:t,phrase_length:r}=e;let n=t[e.r];return e.t=xC(e,t[e.r+1]),e.t===null||n.min&&n.min>e.t||n.end===!0&&e.start_i+e.t!==r?null:!0},OC=function(e){let t=e.terms[e.t],r=e.regs[e.r];if(t.implicit&&e.terms[e.t+1]){if(!e.terms[e.t+1].implicit)return;r.word===t.normal&&(e.t+=1),r.method==="hasContraction"&&(e.t+=1)}},$C=function(e,t){let r=e.regs[e.r];const n=oc(e,t);e.t>1&&r.greedy?n.length+=e.t-t:n.length++},qc=function(e){const{regs:t}=e;let r=t[e.r],n=e.terms[e.t],a=e.t;return r.optional&&t[e.r+1]&&r.negative?!0:(r.optional&&t[e.r+1]&&PC(e),n.implicit&&e.terms[e.t+1]&&OC(e),e.t+=1,r.end===!0&&e.t!==e.terms.length&&r.greedy!==!0||r.greedy===!0&&!kC(e)?null:(e.hasGroup===!0&&$C(e,a),!0))},Xm=function(e,t,r,n){if(e.length===0||t.length===0)return null;let a={t:0,terms:e,r:0,regs:t,groups:{},start_i:r,phrase_length:n,inGroup:null};for(;a.r<t.length;a.r+=1){let 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(c=>!c.optional)===!1)break;return null}if(s.anything===!0&&s.greedy===!0){if(!AC(a))return null;continue}if(s.choices!==void 0&&s.operator==="or"){if(!SC(a))return null;continue}if(s.choices!==void 0&&s.operator==="and"){if(!MC(a))return null;continue}if(s.anything===!0){if(s.negative&&s.anything||!qc(a))return null;continue}if(NC(s,a)===!0){if(!qc(a))return null;continue}if(s.negative){if(!FC(a))return null;continue}if(gr(a.terms[a.t],s,a.start_i+a.t,a.phrase_length)===!0){if(!qc(a))return null;continue}if(s.optional!==!0)return null}let i=[null,r,a.t+r];if(i[1]===i[2])return null;let o={};return Object.keys(a.groups).forEach(s=>{let u=a.groups[s],l=r+u.start;o[s]=[null,l,l+u.length]}),{pointer:i,groups:o}},_C=function(e,t){let r=[],n={};return e.length===0?{ptrs:r,byGroup:n}:(typeof t=="number"&&(t=String(t)),t?e.forEach(a=>{a.groups[t]&&r.push(a.groups[t])}):e.forEach(a=>{r.push(a.pointer),Object.keys(a.groups).forEach(i=>{n[i]=n[i]||[],n[i].push(a.groups[i])})}),{ptrs:r,byGroup:n})},BC=function(e,t,r){return e=e.filter(n=>{let[a,i,o]=n.pointer,s=r[a].slice(i,o);for(let u=0;u<s.length;u+=1){let l=s.slice(u);if(Xm(l,t,u,s.length)!==null)return!1}return!0}),e},Ub=function(e,t){return e.pointer[0]=t,Object.keys(e.groups).forEach(r=>{e.groups[r][0]=t}),e},IC=function(e,t,r){let n=Xm(e,t,0,e.length);return n?(n=Ub(n,r),n):null},zC=function(e,t,r){r=r||[];let{regs:n,group:a,justOne:i}=t,o=[];if(!n||n.length===0)return{ptrs:[],byGroup:{}};const s=n.filter(u=>u.optional!==!0&&u.negative!==!0).length;e:for(let u=0;u<e.length;u+=1){let l=e[u];if(!(r[u]&&pC(n,r[u]))){if(n[0].start===!0){let c=IC(l,n,u);c&&o.push(c);continue}for(let c=0;c<l.length;c+=1){let f=l.slice(c);if(f.length<s)break;let m=Xm(f,n,c,l.length);if(m){if(m=Ub(m,u),o.push(m),i===!0)break e;let d=m.pointer[2];Math.abs(d-1)>c&&(c=Math.abs(d-1))}}}}return n[n.length-1].end===!0&&(o=o.filter(u=>{let l=u.pointer[0];return e[l].length===u.pointer[2]})),t.notIf&&(o=BC(o,t.notIf,e)),o=_C(o,a),o.ptrs.forEach(u=>{let[l,c,f]=u;u[3]=e[l][c].id,u[4]=e[l][f-1].id}),o},jC={one:{termMethods:Fs,parseMatch:dC,match:zC}},qC={parseMatch:function(e,t){const r=this.world();let n=r.methods.one.killUnicode;return n&&(e=n(e,r)),r.methods.one.parseMatch(e,t,r)}},RC={api:X3,methods:jC,lib:qC},LC=/^\../,HC=/^#./,GC=e=>(e=e.replace(/&/g,"&amp;"),e=e.replace(/</g,"&lt;"),e=e.replace(/>/g,"&gt;"),e=e.replace(/"/g,"&quot;"),e=e.replace(/'/g,"&apos;"),e),VC=function(e){let t="",r="</span>";return e=GC(e),LC.test(e)?t=`<span class="${e.replace(/^\./,"")}"`:HC.test(e)?t=`<span id="${e.replace(/^#/,"")}"`:(t=`<${e}`,r=`</${e}>`),t+=">",{start:t,end:r}},UC=function(e,t){let r={},n={};return Object.keys(t).forEach(a=>{let i=t[a],o=VC(a);typeof i=="string"&&(i=e.match(i)),i.docs.forEach(s=>{if(s.every(c=>c.implicit))return;let u=s[0].id;r[u]=r[u]||[],r[u].push(o.start);let l=s[s.length-1].id;n[l]=n[l]||[],n[l].push(o.end)})}),{starts:r,ends:n}},WC=function(e){let{starts:t,ends:r}=UC(this,e),n="";return this.docs.forEach(a=>{for(let i=0;i<a.length;i+=1){let o=a[i];t.hasOwnProperty(o.id)&&(n+=t[o.id].join("")),n+=o.pre||"",n+=o.text||"",r.hasOwnProperty(o.id)&&(n+=r[o.id].join("")),n+=o.post||""}}),n},JC={html:WC},Wb=/[,:;)\]*.?~!\u0022\uFF02\u201D\u2019\u00BB\u203A\u2032\u2033\u2034\u301E\u00B4—-]+$/,Lf=/^[(['"*~\uFF02\u201C\u2018\u201F\u201B\u201E\u2E42\u201A\u00AB\u2039\u2035\u2036\u2037\u301D\u0060\u301F]+/,KC=/[,:;)('"\u201D\]]/,YC=/^[-–—]$/,ZC=/ /,Mi=function(e,t,r=!0){let n="";return e.forEach(a=>{let i=a.pre||"",o=a.post||"";t.punctuation==="some"&&(i=i.replace(Lf,""),YC.test(o)&&(o=" "),o=o.replace(KC,""),o=o.replace(/\?!+/,"?"),o=o.replace(/!+/,"!"),o=o.replace(/\?+/,"?"),o=o.replace(/\.{2,}/,""),a.tags.has("Abbreviation")&&(o=o.replace(/\./,""))),t.whitespace==="some"&&(i=i.replace(/\s/,""),o=o.replace(/\s+/," ")),t.keepPunct||(i=i.replace(Lf,""),o==="-"?o=" ":o=o.replace(Wb,""));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&&(!o||!ZC.test(o))&&(o+=" "),n+=i+s+o}),r===!1&&(n=n.trim()),t.lowerCase===!0&&(n=n.toLowerCase()),n},QC=function(e,t){let r="";if(!e||!e[0]||!e[0][0])return r;for(let n=0;n<e.length;n+=1)r+=Mi(e[n],t,!0);if(t.keepSpace||(r=r.trim()),t.keepEndPunct===!1){e[0][0].tags.has("Emoticon")||(r=r.replace(Lf,""));let n=e[e.length-1];n[n.length-1].tags.has("Emoticon")||(r=r.replace(Wb,"")),r.endsWith("'")&&!r.endsWith("s'")&&(r=r.replace(/'/,""))}return t.cleanWhitespace===!0&&(r=r.trim()),r},ai={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"}};ai.clean=ai.normal;ai.reduced=ai.root;let Jb=[],$i=0;for(;$i<64;)Jb[$i]=0|Math.sin(++$i%Math.PI)*4294967296;const ed=function(e){let t,r,n,a=[t=1732584193,r=4023233417,~t,~r],i=[],o=decodeURI(encodeURI(e))+"€",s=o.length;for(e=--s/4+2|15,i[--e]=s*8;~s;)i[s>>2]|=o.charCodeAt(s)<<8*s--;for($i=o=0;$i<e;$i+=16){for(s=a;o<64;s=[n=s[3],t+((n=s[0]+[t&r|~t&n,n&t|~n&r,t^r^n,r^(t|~n)][s=o>>4]+Jb[o]+~~i[$i|[o,5*o+1,3*o+5,7*o][s]&15])<<(s=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*s+o++%4])|n>>>-s),t,r])t=s[1]|0,r=s[2];for(o=4;o;)a[--o]+=s[o]}for(e="";o<32;)e+=(a[o>>3]>>(1^o++)*4&15).toString(16);return e},XC={text:!0,terms:!0};let _h={case:"none",unicode:"some",form:"machine",punctuation:"some"};const Rc=function(e,t){return Object.assign({},e,t)},$a={text:e=>Mi(e,{keepPunct:!0},!1),normal:e=>Mi(e,Rc(ai.normal,{keepPunct:!0}),!1),implicit:e=>Mi(e,Rc(ai.implicit,{keepPunct:!0}),!1),machine:e=>Mi(e,_h,!1),root:e=>Mi(e,Rc(_h,{form:"root"}),!1),hash:e=>ed(Mi(e,{keepPunct:!0},!1)),offset:e=>{let t=$a.text(e).length;return{index:e[0].offset.index,start:e[0].offset.start,length:t}},terms:e=>e.map(t=>{let r=Object.assign({},t);return r.tags=Array.from(t.tags),r}),confidence:(e,t,r)=>t.eq(r).confidence(),syllables:(e,t,r)=>t.eq(r).syllables(),sentence:(e,t,r)=>t.eq(r).fullSentence().text(),dirty:e=>e.some(t=>t.dirty===!0)};$a.sentences=$a.sentence;$a.clean=$a.normal;$a.reduced=$a.root;const eE=function(e,t){return t=t||{},typeof t=="string"&&(t={}),t=Object.assign({},XC,t),t.offset&&e.compute("offset"),e.docs.map((r,n)=>{let a={};return Object.keys(t).forEach(i=>{t[i]&&$a[i]&&(a[i]=$a[i](r,e,n))}),a})},Hf={json:function(e){let t=eE(this,e);return typeof e=="number"?t[e]:t}};Hf.data=Hf.json;const tE=()=>typeof window<"u"&&window.document,rE=function(e){let t=this.methods.one.debug||{};return e&&t.hasOwnProperty(e)?(t[e](this),this):tE()?(t.clientSide(this),this):(t.tags(this),this)},nE=function(e){let t=e.pre||"",r=e.post||"";return t+e.text+r},aE=function(e,t){let r={};return Object.keys(t).forEach(n=>{e.match(n).fullPointer.forEach(i=>{r[i[3]]={fn:t[n],end:i[2]}})}),r},Kb=function(e,t){let r=aE(e,t),n="";return e.docs.forEach((a,i)=>{for(let o=0;o<a.length;o+=1){let s=a[o];if(r.hasOwnProperty(s.id)){let{fn:u,end:l}=r[s.id],c=e.update([[i,o,l]]);n+=a[o].pre||"",n+=u(c),o=l-1,n+=a[o].post||""}else n+=nE(s)}}),n},iE=e=>Object.prototype.toString.call(e)==="[object Object]",oE=function(e){let 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,a)=>n.count>a.count?-1:0)},sE=function(e){if(iE(e))return Kb(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 ed(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(r=>r.reduce((n,a)=>n+a.pre+a.text+a.post,"").trim()).filter(r=>r);if(e==="freq"||e==="frequency"||e==="topk")return oE(this.json({normal:!0}).map(t=>t.normal));if(e==="terms"){let t=[];return this.docs.forEach(r=>{let n=r.map(a=>a.text);n=n.filter(a=>a),t=t.concat(n)}),t}return e==="tags"?this.docs.map(t=>t.reduce((r,n)=>(r[n.implicit||n.normal]=Array.from(n.tags),r),{})):e==="debug"?this.debug():this.text()},uE={debug:rE,out:sE,wrap:function(e){return Kb(this,e)}},lE=e=>Object.prototype.toString.call(e)==="[object Object]",cE={text:function(e){let t={};if(e&&typeof e=="string"&&ai.hasOwnProperty(e)?t=Object.assign({},ai[e]):e&&lE(e)&&(t=Object.assign({},e)),t.keepSpace===void 0&&!this.isFull()&&(t.keepSpace=!1),t.keepEndPunct===void 0&&this.pointer){let r=this.pointer[0];r&&r[1]?t.keepEndPunct=!1:t.keepEndPunct=!0}return t.keepPunct===void 0&&(t.keepPunct=!0),t.keepSpace===void 0&&(t.keepSpace=!0),QC(this.docs,t)}},fE=Object.assign({},uE,cE,Hf,JC),mE=function(e){Object.assign(e.prototype,fE)},dE=function(e){console.log("%c -=-=- ","background-color:#6699cc;"),e.forEach(t=>{console.groupCollapsed(t.text());let n=t.docs[0].map(a=>{let i=a.text||"-";a.implicit&&(i="["+a.implicit+"]");let o="["+Array.from(a.tags).join(", ")+"]";return{text:i,tags:o}});console.table(n,["text","tags"]),console.groupEnd()})},ma="\x1B[0m",sn={green:e=>"\x1B[32m"+e+ma,red:e=>"\x1B[31m"+e+ma,blue:e=>"\x1B[34m"+e+ma,magenta:e=>"\x1B[35m"+e+ma,cyan:e=>"\x1B[36m"+e+ma,yellow:e=>"\x1B[33m"+e+ma,black:e=>"\x1B[30m"+e+ma,dim:e=>"\x1B[2m"+e+ma,i:e=>"\x1B[3m"+e+ma},hE=function(e,t){return t.one.tagSet&&(e=e.map(r=>{if(!t.one.tagSet.hasOwnProperty(r))return r;const n=t.one.tagSet[r].color||"blue";return sn[n](r)})),e.join(", ")},pE=function(e){let{docs:t,model:r}=e;t.length===0&&console.log(sn.blue(`
3
3
  ──────`)),t.forEach(n=>{console.log(sn.blue(`
4
4
  ┌─────────`)),n.forEach(a=>{let i=[...a.tags||[]],o=a.text||"-";a.sense&&(o=`{${a.normal}/${a.sense}}`),a.implicit&&(o="["+a.implicit+"]"),o=sn.yellow(o);let s="'"+o+"'";if(a.reference){let l=e.update([a.reference]).text("normal");s+=` - ${sn.dim(sn.i("["+l+"]"))}`}s=s.padEnd(18);let u=sn.blue(" │ ")+sn.i(s)+" - "+hE(i,r);console.log(u)})}),console.log(`
@@ -1,5 +1,5 @@
1
1
  import { C as e, a as t, b as a, u as o } from "./ContextMenu-DLM5eLLG.js";
2
- import { C as s, D as n, I as r, a as u, b as m, M as C, u as T } from "./Item-BgUwEjzV.js";
2
+ import { C as s, D as n, I as r, a as u, b as m, M as C, u as T } from "./Item-LAMTj0X2.js";
3
3
  const E = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4
4
  __proto__: null,
5
5
  CONTEXT_SELECTED: e,
@@ -3,7 +3,7 @@ import { C as r } from "./css-DjQu2Qyf.js";
3
3
  import { createContext as f, use as v, isValidElement as j, Fragment as h } from "react";
4
4
  import "./Stack-D50qN0Vu.js";
5
5
  import { S as m } from "./Space-DxHm2ok7.js";
6
- import { I as B, B as S } from "./Toggle-BC1o8qt5.js";
6
+ import { I as B, B as S } from "./Toggle-CbzT5wR_.js";
7
7
  import { D as b, W as z } from "./WithIcon-B7VPBqA2.js";
8
8
  import "./Divider-CDFHLK9U.js";
9
9
  import { a as d } from "./state-DAFH2z9y.js";
@@ -1,5 +1,5 @@
1
- import { f as i } from "./fontString-CynarMI1.js";
2
- import { a as o } from "./Provider-CAR23fYq.js";
1
+ import { f as i } from "./fontString-ap-NPnCD.js";
2
+ import { a as o } from "./Provider-CLPfWTcl.js";
3
3
  const n = (t) => {
4
4
  const { theme: s } = o(), e = s.typography[t];
5
5
  return {
@@ -1 +1 @@
1
- "use strict";const i=require("./fontString-CUy7T-OR.cjs"),r=require("./Provider-B1j7nPL9.cjs"),n=t=>{const{theme:e}=r.useContext(),s=e.typography[t];return{...s,toString:()=>i.fontString(e,{level:t}),baseSize:e.sizes.base,lineHeightPx:s.lineHeight*e.sizes.base,sizePx:s.size*e.sizes.base}};exports.useTypography=n;
1
+ "use strict";const i=require("./fontString-BWECl_1B.cjs"),r=require("./Provider-s70PZ9lg.cjs"),n=t=>{const{theme:e}=r.useContext(),s=e.typography[t];return{...s,toString:()=>i.fontString(e,{level:t}),baseSize:e.sizes.base,lineHeightPx:s.lineHeight*e.sizes.base,sizePx:s.size*e.sizes.base}};exports.useTypography=n;
@@ -1 +1 @@
1
- "use strict";require("./css-C7rJrqRi.cjs");const g=require("./state-DwM4WaEw.cjs"),v=require("./provider-B8IM-N4g.cjs"),i=[{weight:200,style:"light",value:"Inter 200, sans-serif"},{weight:300,value:"Inter Threee, sans-serif"},{weight:400,value:"Inter Four, sans-serif"},{weight:500,value:"Inter Five, sans-serif"},{weight:600,value:"Inter Six, sans-serif"},{weight:700,value:"Inter Seven, sans-serif"},{weight:800,value:"Inter Eight, sans-serif"},{weight:900,style:"bold",value:"Inter Nine, sans-serif"}],y=s=>i.find((t,e)=>e===i.length-1?!0:typeof s=="number"?s>=t.weight&&s<i[e+1].weight:t.style===s),p=(s,{level:t,weight:e,code:l})=>{const{typography:r,sizes:{base:u}}=s;let n=r.family;if(l)n=r.codeFamily;else if(e!=null){const o=y(e);o!=null?n=o.value:n="Inter Light, sans-serif"}const f=r[v.isComponentSize(t)?g.ComponentSizeLevels[t]:t].size,a=(u*f).toFixed(1),[h,c]=n.split(", ");return e!=null?` ${e} ${a}px ${h}, ${c}`:` ${a}px ${n}`};exports.fontString=p;
1
+ "use strict";require("./css-C7rJrqRi.cjs");const g=require("./state-DwM4WaEw.cjs"),v=require("./provider-YWPkhTn6.cjs"),i=[{weight:200,style:"light",value:"Inter 200, sans-serif"},{weight:300,value:"Inter Threee, sans-serif"},{weight:400,value:"Inter Four, sans-serif"},{weight:500,value:"Inter Five, sans-serif"},{weight:600,value:"Inter Six, sans-serif"},{weight:700,value:"Inter Seven, sans-serif"},{weight:800,value:"Inter Eight, sans-serif"},{weight:900,style:"bold",value:"Inter Nine, sans-serif"}],y=s=>i.find((t,e)=>e===i.length-1?!0:typeof s=="number"?s>=t.weight&&s<i[e+1].weight:t.style===s),p=(s,{level:t,weight:e,code:l})=>{const{typography:r,sizes:{base:u}}=s;let n=r.family;if(l)n=r.codeFamily;else if(e!=null){const o=y(e);o!=null?n=o.value:n="Inter Light, sans-serif"}const f=r[v.isComponentSize(t)?g.ComponentSizeLevels[t]:t].size,a=(u*f).toFixed(1),[h,c]=n.split(", ");return e!=null?` ${e} ${a}px ${h}, ${c}`:` ${a}px ${n}`};exports.fontString=p;
@@ -1,6 +1,6 @@
1
1
  import "./css-DjQu2Qyf.js";
2
2
  import { C as p } from "./state-DAFH2z9y.js";
3
- import { i as c } from "./provider-CQqS-teQ.js";
3
+ import { i as c } from "./provider-gW90qzEG.js";
4
4
  const r = [
5
5
  { weight: 200, style: "light", value: "Inter 200, sans-serif" },
6
6
  { weight: 300, value: "Inter Threee, sans-serif" },
package/dist/header.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./external-DHw0SdIj.cjs");exports.Header=e.external;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./external-BgwS5D0j.cjs");exports.Header=e.external;
package/dist/header.js CHANGED
@@ -1,4 +1,4 @@
1
- import { e as a } from "./external-ZV7pEm55.js";
1
+ import { e as a } from "./external-fwvNilmo.js";
2
2
  export {
3
3
  a as Header
4
4
  };