UNPKG

hebrew-transliteration

Version:
376 lines (375 loc) 18.7 kB
var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); var __publicField = (obj, key, value) => { __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); return value; }; var schema_exports = {}; __export(schema_exports, { SBL: () => SBL, Schema: () => Schema }); module.exports = __toCommonJS(schema_exports); class Schema { constructor(schema) { __publicField(this, "VOCAL_SHEVA"); __publicField(this, "HATAF_SEGOL"); __publicField(this, "HATAF_PATAH"); __publicField(this, "HATAF_QAMATS"); __publicField(this, "HIRIQ"); __publicField(this, "TSERE"); __publicField(this, "SEGOL"); __publicField(this, "PATAH"); __publicField(this, "QAMATS"); __publicField(this, "HOLAM"); __publicField(this, "HOLAM_HASER"); __publicField(this, "QUBUTS"); __publicField(this, "DAGESH"); __publicField(this, "DAGESH_CHAZAQ"); __publicField(this, "MAQAF"); __publicField(this, "PASEQ"); __publicField(this, "SOF_PASUQ"); __publicField(this, "QAMATS_QATAN"); __publicField(this, "FURTIVE_PATAH"); __publicField(this, "HIRIQ_YOD"); __publicField(this, "TSERE_YOD"); __publicField(this, "SEGOL_YOD"); __publicField(this, "SHUREQ"); __publicField(this, "HOLAM_VAV"); __publicField(this, "QAMATS_HE"); __publicField(this, "PATAH_HE"); __publicField(this, "SEGOL_HE"); __publicField(this, "TSERE_HE"); __publicField(this, "MS_SUFX"); __publicField(this, "ALEF"); __publicField(this, "BET"); __publicField(this, "BET_DAGESH"); __publicField(this, "GIMEL"); __publicField(this, "GIMEL_DAGESH"); __publicField(this, "DALET"); __publicField(this, "DALET_DAGESH"); __publicField(this, "HE"); __publicField(this, "VAV"); __publicField(this, "ZAYIN"); __publicField(this, "HET"); __publicField(this, "TET"); __publicField(this, "YOD"); __publicField(this, "FINAL_KAF"); __publicField(this, "KAF"); __publicField(this, "KAF_DAGESH"); __publicField(this, "LAMED"); __publicField(this, "FINAL_MEM"); __publicField(this, "MEM"); __publicField(this, "FINAL_NUN"); __publicField(this, "NUN"); __publicField(this, "SAMEKH"); __publicField(this, "AYIN"); __publicField(this, "FINAL_PE"); __publicField(this, "PE"); __publicField(this, "PE_DAGESH"); __publicField(this, "FINAL_TSADI"); __publicField(this, "TSADI"); __publicField(this, "QOF"); __publicField(this, "RESH"); __publicField(this, "SHIN"); __publicField(this, "SIN"); __publicField(this, "TAV"); __publicField(this, "TAV_DAGESH"); __publicField(this, "ADDITIONAL_FEATURES"); __publicField(this, "DIVINE_NAME"); __publicField(this, "DIVINE_NAME_ELOHIM"); __publicField(this, "SYLLABLE_SEPARATOR"); __publicField(this, "STRESS_MARKER"); __publicField(this, "allowNoNiqqud"); __publicField(this, "article"); __publicField(this, "holemHaser"); __publicField(this, "ketivQeres"); __publicField(this, "longVowels"); __publicField(this, "qametsQatan"); __publicField(this, "shevaAfterMeteg"); __publicField(this, "shevaWithMeteg"); __publicField(this, "sqnmlvy"); __publicField(this, "strict"); __publicField(this, "wawShureq"); this.VOCAL_SHEVA = schema.VOCAL_SHEVA; this.HATAF_SEGOL = schema.HATAF_SEGOL; this.HATAF_PATAH = schema.HATAF_PATAH; this.HATAF_QAMATS = schema.HATAF_QAMATS; this.HIRIQ = schema.HIRIQ; this.TSERE = schema.TSERE; this.SEGOL = schema.SEGOL; this.PATAH = schema.PATAH; this.QAMATS = schema.QAMATS; this.HOLAM = schema.HOLAM; this.HOLAM_HASER = schema.HOLAM_HASER; this.QUBUTS = schema.QUBUTS; this.DAGESH = schema.DAGESH; this.DAGESH_CHAZAQ = schema.DAGESH_CHAZAQ; this.MAQAF = schema.MAQAF; this.PASEQ = schema.PASEQ; this.SOF_PASUQ = schema.SOF_PASUQ; this.QAMATS_QATAN = schema.QAMATS_QATAN; this.FURTIVE_PATAH = schema.FURTIVE_PATAH; this.HIRIQ_YOD = schema.HIRIQ_YOD; this.TSERE_YOD = schema.TSERE_YOD; this.SEGOL_YOD = schema.SEGOL_YOD; this.SHUREQ = schema.SHUREQ; this.HOLAM_VAV = schema.HOLAM_VAV; this.QAMATS_HE = schema.QAMATS_HE; this.PATAH_HE = schema.PATAH_HE; this.SEGOL_HE = schema.SEGOL_HE; this.TSERE_HE = schema.TSERE_HE; this.MS_SUFX = schema.MS_SUFX; this.ALEF = schema.ALEF; this.BET_DAGESH = schema.BET_DAGESH; this.BET = schema.BET; this.GIMEL = schema.GIMEL; this.GIMEL_DAGESH = schema.GIMEL_DAGESH; this.DALET = schema.DALET; this.DALET_DAGESH = schema.DALET_DAGESH; this.HE = schema.HE; this.VAV = schema.VAV; this.ZAYIN = schema.ZAYIN; this.HET = schema.HET; this.TET = schema.TET; this.YOD = schema.YOD; this.FINAL_KAF = schema.FINAL_KAF; this.KAF = schema.KAF; this.KAF_DAGESH = schema.KAF_DAGESH; this.LAMED = schema.LAMED; this.FINAL_MEM = schema.FINAL_MEM; this.MEM = schema.MEM; this.FINAL_NUN = schema.FINAL_NUN; this.NUN = schema.NUN; this.SAMEKH = schema.SAMEKH; this.AYIN = schema.AYIN; this.FINAL_PE = schema.FINAL_PE; this.PE = schema.PE; this.PE_DAGESH = schema.PE_DAGESH; this.FINAL_TSADI = schema.FINAL_TSADI; this.TSADI = schema.TSADI; this.QOF = schema.QOF; this.RESH = schema.RESH; this.SHIN = schema.SHIN; this.SIN = schema.SIN; this.TAV = schema.TAV; this.TAV_DAGESH = schema.TAV_DAGESH; this.DIVINE_NAME = schema.DIVINE_NAME; this.DIVINE_NAME_ELOHIM = schema.DIVINE_NAME_ELOHIM; this.SYLLABLE_SEPARATOR = schema.SYLLABLE_SEPARATOR; this.ADDITIONAL_FEATURES = schema.ADDITIONAL_FEATURES; this.STRESS_MARKER = schema.STRESS_MARKER; this.longVowels = schema.longVowels; this.qametsQatan = schema.qametsQatan; this.sqnmlvy = schema.sqnmlvy; this.shevaAfterMeteg = schema.shevaAfterMeteg; this.shevaWithMeteg = schema.shevaWithMeteg; this.wawShureq = schema.wawShureq; this.article = schema.article; this.allowNoNiqqud = schema.allowNoNiqqud; this.strict = schema.strict; this.holemHaser = schema.holemHaser; this.ketivQeres = schema.ketivQeres; } } class SBL extends Schema { constructor(schema) { var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha, _ia, _ja, _ka, _la, _ma, _na, _oa, _pa, _qa, _ra, _sa, _ta, _ua, _va, _wa, _xa, _ya, _za, _Aa, _Ba, _Ca, _Da, _Ea, _Fa, _Ga, _Ha, _Ia, _Ja, _Ka, _La, _Ma, _Na, _Oa, _Pa, _Qa, _Ra, _Sa, _Ta, _Ua, _Va, _Wa, _Xa, _Ya, _Za, __a, _$a, _ab, _bb, _cb, _db, _eb, _fb, _gb, _hb, _ib, _jb, _kb, _lb, _mb, _nb, _ob, _pb, _qb, _rb, _sb, _tb, _ub, _vb, _wb, _xb, _yb, _zb, _Ab, _Bb, _Cb, _Db, _Eb, _Fb, _Gb, _Hb, _Ib, _Jb, _Kb, _Lb, _Mb, _Nb, _Ob, _Pb, _Qb, _Rb, _Sb, _Tb, _Ub, _Vb; super({ VOCAL_SHEVA: (_a = schema.VOCAL_SHEVA) != null ? _a : "\u0259", HATAF_SEGOL: (_b = schema.HATAF_SEGOL) != null ? _b : "\u0115", HATAF_PATAH: (_c = schema.HATAF_PATAH) != null ? _c : "\u0103", HATAF_QAMATS: (_d = schema.HATAF_QAMATS) != null ? _d : "\u014F", HIRIQ: (_e = schema.HIRIQ) != null ? _e : "i", TSERE: (_f = schema.TSERE) != null ? _f : "\u0113", SEGOL: (_g = schema.SEGOL) != null ? _g : "e", PATAH: (_h = schema.PATAH) != null ? _h : "a", QAMATS: (_i = schema.QAMATS) != null ? _i : "\u0101", HOLAM: (_j = schema.HOLAM) != null ? _j : "\u014D", HOLAM_HASER: (_k = schema.HOLAM_HASER) != null ? _k : "\u014D", QUBUTS: (_l = schema.QUBUTS) != null ? _l : "u", DAGESH: (_m = schema.DAGESH) != null ? _m : "", DAGESH_CHAZAQ: (_n = schema.DAGESH_CHAZAQ) != null ? _n : true, MAQAF: (_o = schema.MAQAF) != null ? _o : "-", PASEQ: (_p = schema.PASEQ) != null ? _p : "", SOF_PASUQ: (_q = schema.SOF_PASUQ) != null ? _q : "", QAMATS_QATAN: (_r = schema.QAMATS_QATAN) != null ? _r : "o", FURTIVE_PATAH: (_s = schema.FURTIVE_PATAH) != null ? _s : "a", HIRIQ_YOD: (_t = schema.HIRIQ_YOD) != null ? _t : "\xEE", TSERE_YOD: (_u = schema.TSERE_YOD) != null ? _u : "\xEA", SEGOL_YOD: (_v = schema.SEGOL_YOD) != null ? _v : "\xEA", SHUREQ: (_w = schema.SHUREQ) != null ? _w : "\xFB", HOLAM_VAV: (_x = schema.HOLAM_VAV) != null ? _x : "\xF4", QAMATS_HE: (_y = schema.QAMATS_HE) != null ? _y : "\xE2", PATAH_HE: (_z = schema.PATAH_HE) != null ? _z : void 0, SEGOL_HE: (_A = schema.SEGOL_HE) != null ? _A : void 0, TSERE_HE: (_B = schema.TSERE_HE) != null ? _B : void 0, MS_SUFX: (_C = schema.MS_SUFX) != null ? _C : "\u0101yw", ALEF: (_D = schema.ALEF) != null ? _D : "\u02BE", BET: (_E = schema.BET) != null ? _E : "b", BET_DAGESH: (_F = schema.BET_DAGESH) != null ? _F : void 0, GIMEL: (_G = schema.GIMEL) != null ? _G : "g", GIMEL_DAGESH: (_H = schema.GIMEL_DAGESH) != null ? _H : void 0, DALET: (_I = schema.DALET) != null ? _I : "d", DALET_DAGESH: (_J = schema.DALET_DAGESH) != null ? _J : void 0, HE: (_K = schema.HE) != null ? _K : "h", VAV: (_L = schema.VAV) != null ? _L : "w", ZAYIN: (_M = schema.ZAYIN) != null ? _M : "z", HET: (_N = schema.HET) != null ? _N : "\u1E25", TET: (_O = schema.TET) != null ? _O : "\u1E6D", YOD: (_P = schema.YOD) != null ? _P : "y", FINAL_KAF: (_Q = schema.FINAL_KAF) != null ? _Q : "k", KAF: (_R = schema.KAF) != null ? _R : "k", KAF_DAGESH: (_S = schema.KAF_DAGESH) != null ? _S : void 0, LAMED: (_T = schema.LAMED) != null ? _T : "l", FINAL_MEM: (_U = schema.FINAL_MEM) != null ? _U : "m", MEM: (_V = schema.MEM) != null ? _V : "m", FINAL_NUN: (_W = schema.FINAL_NUN) != null ? _W : "n", NUN: (_X = schema.NUN) != null ? _X : "n", SAMEKH: (_Y = schema.SAMEKH) != null ? _Y : "s", AYIN: (_Z = schema.AYIN) != null ? _Z : "\u02BF", FINAL_PE: (__ = schema.FINAL_PE) != null ? __ : "p", PE: (_$ = schema.PE) != null ? _$ : "p", PE_DAGESH: (_aa = schema.PE_DAGESH) != null ? _aa : void 0, FINAL_TSADI: (_ba = schema.FINAL_TSADI) != null ? _ba : "\u1E63", TSADI: (_ca = schema.TSADI) != null ? _ca : "\u1E63", QOF: (_da = schema.QOF) != null ? _da : "q", RESH: (_ea = schema.RESH) != null ? _ea : "r", SHIN: (_fa = schema.SHIN) != null ? _fa : "\u0161", SIN: (_ga = schema.SIN) != null ? _ga : "\u015B", TAV: (_ha = schema.TAV) != null ? _ha : "t", TAV_DAGESH: (_ia = schema.TAV_DAGESH) != null ? _ia : void 0, DIVINE_NAME: (_ja = schema.DIVINE_NAME) != null ? _ja : "yhwh", DIVINE_NAME_ELOHIM: (_ka = schema.DIVINE_NAME_ELOHIM) != null ? _ka : void 0, SYLLABLE_SEPARATOR: (_la = schema.SYLLABLE_SEPARATOR) != null ? _la : void 0, ADDITIONAL_FEATURES: (_ma = schema.ADDITIONAL_FEATURES) != null ? _ma : void 0, STRESS_MARKER: (_na = schema.STRESS_MARKER) != null ? _na : void 0, longVowels: (_oa = schema.longVowels) != null ? _oa : true, qametsQatan: (_pa = schema.qametsQatan) != null ? _pa : true, shevaAfterMeteg: (_qa = schema.shevaAfterMeteg) != null ? _qa : true, shevaWithMeteg: (_ra = schema.shevaWithMeteg) != null ? _ra : false, sqnmlvy: (_sa = schema.sqnmlvy) != null ? _sa : true, wawShureq: (_ta = schema.wawShureq) != null ? _ta : true, article: (_ua = schema.article) != null ? _ua : true, allowNoNiqqud: (_va = schema.allowNoNiqqud) != null ? _va : true, strict: (_wa = schema.strict) != null ? _wa : false, holemHaser: schema.holemHaser || "remove", ketivQeres: schema.ketivQeres || void 0 }); this.VOCAL_SHEVA = (_xa = schema.VOCAL_SHEVA) != null ? _xa : "\u0259"; this.HATAF_SEGOL = (_ya = schema.HATAF_SEGOL) != null ? _ya : "\u0115"; this.HATAF_PATAH = (_za = schema.HATAF_PATAH) != null ? _za : "\u0103"; this.HATAF_QAMATS = (_Aa = schema.HATAF_QAMATS) != null ? _Aa : "\u014F"; this.HIRIQ = (_Ba = schema.HIRIQ) != null ? _Ba : "i"; this.TSERE = (_Ca = schema.TSERE) != null ? _Ca : "\u0113"; this.SEGOL = (_Da = schema.SEGOL) != null ? _Da : "e"; this.PATAH = (_Ea = schema.PATAH) != null ? _Ea : "a"; this.QAMATS = (_Fa = schema.QAMATS) != null ? _Fa : "\u0101"; this.HOLAM = (_Ga = schema.HOLAM) != null ? _Ga : "\u014D"; this.HOLAM_HASER = (_Ha = schema.HOLAM_HASER) != null ? _Ha : "\u014D"; this.QUBUTS = (_Ia = schema.QUBUTS) != null ? _Ia : "u"; this.DAGESH = (_Ja = schema.DAGESH) != null ? _Ja : ""; this.DAGESH_CHAZAQ = (_Ka = schema.DAGESH_CHAZAQ) != null ? _Ka : true; this.MAQAF = (_La = schema.MAQAF) != null ? _La : "-"; this.PASEQ = (_Ma = schema.PASEQ) != null ? _Ma : ""; this.SOF_PASUQ = (_Na = schema.SOF_PASUQ) != null ? _Na : ""; this.QAMATS_QATAN = (_Oa = schema.QAMATS_QATAN) != null ? _Oa : "o"; this.FURTIVE_PATAH = (_Pa = schema.FURTIVE_PATAH) != null ? _Pa : "a"; this.HIRIQ_YOD = (_Qa = schema.HIRIQ_YOD) != null ? _Qa : "\xEE"; this.TSERE_YOD = (_Ra = schema.TSERE_YOD) != null ? _Ra : "\xEA"; this.SEGOL_YOD = (_Sa = schema.SEGOL_YOD) != null ? _Sa : "\xEA"; this.SHUREQ = (_Ta = schema.SHUREQ) != null ? _Ta : "\xFB"; this.HOLAM_VAV = (_Ua = schema.HOLAM_VAV) != null ? _Ua : "\xF4"; this.QAMATS_HE = (_Va = schema.QAMATS_HE) != null ? _Va : "\xE2"; this.PATAH_HE = (_Wa = schema.PATAH_HE) != null ? _Wa : void 0; this.SEGOL_HE = (_Xa = schema.SEGOL_HE) != null ? _Xa : void 0; this.TSERE_HE = (_Ya = schema.TSERE_HE) != null ? _Ya : void 0; this.MS_SUFX = (_Za = schema.MS_SUFX) != null ? _Za : "\u0101yw"; this.ALEF = (__a = schema.ALEF) != null ? __a : "\u02BE"; this.BET = (_$a = schema.BET) != null ? _$a : "b"; this.BET_DAGESH = (_ab = schema.BET_DAGESH) != null ? _ab : void 0; this.GIMEL = (_bb = schema.GIMEL) != null ? _bb : "g"; this.GIMEL_DAGESH = (_cb = schema.GIMEL_DAGESH) != null ? _cb : void 0; this.DALET = (_db = schema.DALET) != null ? _db : "d"; this.DALET_DAGESH = (_eb = schema.DALET_DAGESH) != null ? _eb : void 0; this.HE = (_fb = schema.HE) != null ? _fb : "h"; this.VAV = (_gb = schema.VAV) != null ? _gb : "w"; this.ZAYIN = (_hb = schema.ZAYIN) != null ? _hb : "z"; this.HET = (_ib = schema.HET) != null ? _ib : "\u1E25"; this.TET = (_jb = schema.TET) != null ? _jb : "\u1E6D"; this.YOD = (_kb = schema.YOD) != null ? _kb : "y"; this.FINAL_KAF = (_lb = schema.FINAL_KAF) != null ? _lb : "k"; this.KAF = (_mb = schema.KAF) != null ? _mb : "k"; this.KAF_DAGESH = (_nb = schema.KAF_DAGESH) != null ? _nb : void 0; this.LAMED = (_ob = schema.LAMED) != null ? _ob : "l"; this.FINAL_MEM = (_pb = schema.FINAL_MEM) != null ? _pb : "m"; this.MEM = (_qb = schema.MEM) != null ? _qb : "m"; this.FINAL_NUN = (_rb = schema.FINAL_NUN) != null ? _rb : "n"; this.NUN = (_sb = schema.NUN) != null ? _sb : "n"; this.SAMEKH = (_tb = schema.SAMEKH) != null ? _tb : "s"; this.AYIN = (_ub = schema.AYIN) != null ? _ub : "\u02BF"; this.FINAL_PE = (_vb = schema.FINAL_PE) != null ? _vb : "p"; this.PE = (_wb = schema.PE) != null ? _wb : "p"; this.PE_DAGESH = (_xb = schema.PE_DAGESH) != null ? _xb : void 0; this.FINAL_TSADI = (_yb = schema.FINAL_TSADI) != null ? _yb : "\u1E63"; this.TSADI = (_zb = schema.TSADI) != null ? _zb : "\u1E63"; this.QOF = (_Ab = schema.QOF) != null ? _Ab : "q"; this.RESH = (_Bb = schema.RESH) != null ? _Bb : "r"; this.SHIN = (_Cb = schema.SHIN) != null ? _Cb : "\u0161"; this.SIN = (_Db = schema.SIN) != null ? _Db : "\u015B"; this.TAV = (_Eb = schema.TAV) != null ? _Eb : "t"; this.TAV_DAGESH = (_Fb = schema.TAV_DAGESH) != null ? _Fb : void 0; this.DIVINE_NAME = (_Gb = schema.DIVINE_NAME) != null ? _Gb : "yhwh"; this.DIVINE_NAME_ELOHIM = (_Hb = schema.DIVINE_NAME_ELOHIM) != null ? _Hb : void 0; this.SYLLABLE_SEPARATOR = (_Ib = schema.SYLLABLE_SEPARATOR) != null ? _Ib : void 0; this.ADDITIONAL_FEATURES = (_Jb = schema.ADDITIONAL_FEATURES) != null ? _Jb : [ { FEATURE: "syllable", HEBREW: /[\u{05B4}\u{05BB}]/u, TRANSLITERATION: (syllable, heb, schema2) => { const hasMater = syllable.clusters.some((cluster) => cluster.isMater); if (syllable.isAccented && !hasMater) { const macron = "\u0304"; const output = syllable.hasVowelName("HIRIQ") ? schema2["HIRIQ"] + macron : schema2["QUBUTS"] + macron; return syllable.text.replace(heb, output.normalize("NFC")); } return syllable.text; } } ]; this.STRESS_MARKER = (_Kb = schema.STRESS_MARKER) != null ? _Kb : void 0; this.longVowels = (_Lb = schema.longVowels) != null ? _Lb : true; this.qametsQatan = (_Mb = schema.qametsQatan) != null ? _Mb : true; this.shevaAfterMeteg = (_Nb = schema.shevaAfterMeteg) != null ? _Nb : true; this.shevaWithMeteg = (_Ob = schema.shevaWithMeteg) != null ? _Ob : false; this.sqnmlvy = (_Pb = schema.sqnmlvy) != null ? _Pb : true; this.wawShureq = (_Qb = schema.wawShureq) != null ? _Qb : true; this.article = (_Rb = schema.article) != null ? _Rb : true; this.allowNoNiqqud = (_Sb = schema.allowNoNiqqud) != null ? _Sb : true; this.strict = (_Tb = schema.strict) != null ? _Tb : false; this.holemHaser = (_Ub = schema.holemHaser) != null ? _Ub : "remove"; this.ketivQeres = (_Vb = schema.ketivQeres) != null ? _Vb : void 0; } } // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { SBL, Schema }); //# sourceMappingURL=schema.js.map