!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).efrt={})}(this,(function(t){"use strict";var n=function(t,n){let e=Math.min(t.length,n.length);for(;e>0;){const o=t.slice(0,e);if(o===n.slice(0,e))return o;e-=1}return""},e=function(t){t.sort();for(let n=1;n=e;t-=e,n++,e*=i);for(;n--;){const n=t%i;o=String.fromCharCode((n<10?48:55)+n)+o,t=(t-n)/i}return o},f=function(t){if(void 0!==u[t])return u[t];let n=0,e=1,o=i,s=1;for(;e=0;e--,s*=i){let o=t.charCodeAt(e)-48;o>10&&(o-=7),n+=o*s}return n};const h=";",l=":",d=",",p="!",g=36,a=function(t,n){let e="",o="";t.isTerminal(n)&&(e+=p);const s=t.nodeProps(n);for(let i=0;i=n[r]._g.length&&1===n[n[r]._g]?(u=n[r]._g,e+=o+r+u,o=d):(e+=o+r+u,o="")}return e},y=function(t,n){if(t.visited(n))return;const e=t.nodeProps(n,!0);for(let o=0;o=e&&(e=n[i],o=i+1);return o}(t);for(let n=0;n=0;n--)t.nodes.unshift(c(n)+l+c(t.nodeCount-t.histAbs[n][0]-1));return t.nodes.join(h)},_=new RegExp("[0-9A-Z,;!:|¦]"),C={_d:!0,_v:!0,_c:!0,_g:!0,_n:!0},v={insertWords:function(t){if(void 0!==t){"string"==typeof t&&(t=t.split(/[^a-zA-Z]+/));for(let n=0;n{let i=t.nodes[o];"!"===i[0]&&(n.push(s),i=i.slice(1));const r=i.split(/([A-Z0-9,]+)/g);for(let i=0;it+"¦"+e[t])).join("|")},t.unpack=function(t){if(!t)return{};const n=t.split("|").reduce(((t,n)=>{const e=n.split("¦");return t[e[0]]=e[1],t}),{}),e={};return Object.keys(n).forEach((function(t){const o=x(n[t]);"true"===t&&(t=!0);for(let n=0;n