Plugin Directory

Changeset 2431785


Ignore:
Timestamp:
12/04/2020 07:40:25 PM (5 years ago)
Author:
kinging
Message:

Update to version 0.1.0 from GitHub

Location:
ivrita
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • ivrita/assets/banner-772x250.png

    • Property svn:mime-type changed from application/octet-stream to image/png
  • ivrita/assets/icon-256x256.png

    • Property svn:mime-type changed from application/octet-stream to image/png
  • ivrita/tags/0.1.0/js/ivrita.min.js

    r2429718 r2431785  
    1 !function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.Ivrita=n():t.Ivrita=n()}(self,(function(){return(()=>{"use strict";var t={540:(t,n,c)=>{c.d(n,{default:()=>C});var e={ן:"נ",ף:"פ",ך:"כ",ם:"מ",ץ:"צ"},o=Object.keys(e).concat(Object.values(e)),a=Object.keys(e),r=function(t){return Object.keys(e).find((function(n){return e[n]===t}))||t},i=function(t){return e[t]||t},s="[\\\\/.]",u="[א-ת]",l="[\\\\./—־-]",f="'‎\"”׳״",d="[א-ת".concat(f,"]"),h="[".concat(a,"]"),$="^|$|\b|[^א-ת?֐-ֽֿׁ-ׂׄ-ׇׯ-ײשׁ-ﭏ]",y="(?=".concat($,")"),v="(?:".concat($,")"),p=[l,"\\[","\\{","\\(","םן","ןם","יםות","ותים"].join("|"),m=[["א".concat(l,"נשים"),"אנשים","נשים"],["א".concat(l,"נשות"),"אנשי","נשות"],["את".concat(s,"ה"),"אתה","את"],["איש".concat(s,"(?:אש)?ת"),"איש","אשת"],["אשת".concat(s,"איש"),"איש","אשת"],["(גבר|איש)".concat(s,"אישה"),"$1","אישה"],["אח".concat(s,"ות").concat(y),"אח","אחות"],["ל(ו|ה)".concat(s,"ל(ו|ה)").concat(y),"לו","לה"],["ב(ן|ת)".concat(s,"ב(ן|ת)").concat(y),"בן","בת"],["ה(ו|י)א".concat(s,"ה(ו|י)א").concat(y),"הוא","היא"],["אנשי".concat(s,"ות").concat(y),"אנשי","נשות"],["מישהו".concat(s,"י").concat(y),"מישהו","מישהי"],["אחד".concat(s,"(אח)?ת").concat(y),"אחד","אחת"],["אחת".concat(s,"(אח)?ד").concat(y),"אחד","אחת"],["יקיר(י?)".concat(s,"תי").concat(y),"יקירי","יקירתי"],["אהוב(י?)".concat(s,"תי").concat(y),"אהובי","אהובתי"],["צור".concat(s,"י").concat(y),"צור","צרי"]],g=["(א|ס)ובי(י?)קטיב","אחמ([".concat(f,"]?)ש"),"ח([".concat(f,"])כ"),"מ([".concat(f,"])פ"),"מנכ([".concat(f,"]?)ל"),"מפא([".concat(f,"]?)יניק"),"משת([".concat(f,"]?)פ"),"עו([".concat(f,"])(ס|ד)"),"רו([".concat(f,"])ח"),"רשג([".concat(f,"]?)ד"),"א(י?)כפת","אביב","אח","אגרונומ","אדריכל","אוטיסט","אוסטר(ל?)","אופטימ","אחרא","אחיינ","איטלק","אינדיבידואליסט","אירונ","אירופא","אכזר","אלגנט","אלכוהוליסט","אלמונ","אמית","אמריק(א|נ)","אנאלפבית","אנגל","אנוש","אנטישמ","אנליסט","אנרכיסט","אסטרולוג","אסיאת","אפריק(נ|א)","אצנ","אקדמ(א?)","אקטואל","אקטיביסט","אקרא","ארטיסט","אשכנז","אתאיסט","אתיופ","בוגדנ","בולגר","בטחונ","ביביסט","ב(י?)דיונ","בינונ","בינלאומ","בל(א?)גניסט","בלוגר","בלונד","במא","ברב(א?)ר","ברונט","בריט","ברמנ","ג".concat(f,"ובניק"),"ג".concat(f,"ינג").concat(f),"גות","גיטריסט","גר(א?)פ","גרמנ","גרפיקא","דברנ","דוקטורנט","דושבג","דיאטנ","דינ(א?)מ","(י?)הוד","הי(פ?)סטר","היפ","הססנ","הנדסא","הרמונ","וטרינר","זכא","חבר(ו?)ת","חובבנ","חולמנ","חושנ","חילונ","חי(ו|נ)נ","חיפא","חמדנ","חרד","חרד(ת?)","חרמנ","חשמלא","טבח","טבעונ","טורק","טיפוגרפ","טכנא","טרוריסט","טרמפיסט","טרנס","ידידות","יוגיסט","יוונ","יורקר","יזמ","ימא","ימ(י?)נ","ירושלמ","ישראל","כימא","כלכלנ","כרונ","לבנונ","לוחמנ","ליברל","ליכודניק","מאסטר","מוזיק(ל|א)","מומח","מזוכיסט","מזרח","מחזא","מטאליסט","מטרידנ","מילואימניק","מיליארדר","מיליונר","מכונא","מלאכ","מלצר","מפסידנ","מצליחנ","מצפונ","מקצוע(נ?)","מרדנ","מרקסיסט","נגר","נובוריש","נודיסט","נודניק","נוצר","נורא","נורווג","נטורופת","נרקומנ","ס(א?)דיסט","ס(א?)ח","סדרנ","סהרור","סוליד(ר?)","סוציאליסט","סטודנט","סטרייט","סמכות","סנדלר","סנוב","ססגונ","ספונטנ","ספורטיב","ספציפ","ספרד","סקסולוג","סרב","סרטט","עירונ","עיתונא","עממ","עניינ","ענק","עסיס","עקרונ","ערב","ערס","פאנקיסט","פדופיל","פוליטיקא","פולנ","פופול(א?)ר","פופוליסט","פחדנ","פטריוט","פילוסופ","פיזיוטרפיסט","פמיניסט","פסיכופת","פסנתרנ","פציפיסט","פריק","פרופסור","פרסומא","פקח","פשיסט","צבע","צבעונ","צי(ו?)נ","ציבור","ציפלונ","צמחונ","צפונ","צרפת","קדמונ","קוויר","קומוניסט","קומיק(ס?)א","קונדיטור","קוסמטיקא","קופא","קוקסינל","קטלנ","קטנונ","קיבוצניק","קיצונ","קלאס","קלדנ","קלפטומנ","קניינ","קפדנ","קפיטליסט","קריקטוריסט","קצב","רבנ","רוחנ","רוס","רוקיסט","רמא","רפד","רקדנ","ש(ו?)ויונ","שאפתנ","שוביניסט","שווד","שוויצר","שחיינ","שחקנ","שלומיאל","שמאלנ","שמנמנ","שמרנ","שפ","שק(ר|ד)נ","שרמנט","תורכ","תזונא","תחמנ","תסריטא","תצפיתנ","תקציבא","תרבות"];function b(t){return function(t){if(Array.isArray(t))return E(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,n){if(t){if("string"==typeof t)return E(t,n);var c=Object.prototype.toString.call(t).slice(8,-1);return"Object"===c&&t.constructor&&(c=t.constructor.name),"Map"===c||"Set"===c?Array.from(t):"Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?E(t,n):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(t,n){(null==n||n>t.length)&&(n=t.length);for(var c=0,e=new Array(n);c<n;c++)e[c]=t[c];return e}var T="׈",w="׉";const x=[].concat(b(m),b(["האר","הבא","הגב","הדגם","הדלק","הוסף","הועל","הורד","הזמן","הזן","הכנס","הלבש","המלץ","המשך","הסר","הסתר","הפעל","הפקד","הצג","הקלד","הקש","הקשב","הרגש","הרם","השב","השלם","השתק","התמד","התקן"].map((function(t){var n=t.slice(0,t.length-1),c=t.slice(t.length-1),e="(".concat(c,")");return o.includes(c)&&(e="(".concat(r(c),"|").concat(i(c),")")),["".concat(n).concat(e).concat(s,"י").concat(y),"".concat(n).concat(r(c)),"".concat(n,"י").concat(i(c),"י")]}))),b(g.map((function(t){var n=t;return t.includes("(")&&(n=t.replace(new RegExp("\\(.*?\\)"),"$2")),["(".concat(v,")").concat(t,"ים").concat(s,"י?ות").concat(y),"$1".concat(n,"ים"),"$1".concat(n,"יות")]}))),[["(".concat(y,")(").concat(d,"{0,3})י").concat(s,"ת(").concat(d,"{2,})"),"$1$2י$3","$1$2ת$3"],["(".concat(y,")(").concat(d,"{0,3})ת").concat(s,"י(").concat(d,"{2,})"),"$1$2י$3","$1$2ת$3"],["ו".concat(s,"ה").concat(y),"ו","ה"],["ה".concat(s,"ו").concat(y),"ו","ה"],["(".concat(d,")").concat(s,"ה").concat(y),"$1".concat(T),"$1".concat(w,"ה")],["(".concat(d,")ה?").concat(s,"תה").concat(y),"$1ה","$1תה"],["(".concat(d,")יו").concat(s,"י?ה").concat(y),"$1יו","$1יה"],["(".concat(d,")ה").concat(s,"ית").concat(y),"$1ה","$1ית"],["(".concat(d,")י").concat(s,"ות").concat(y),"$1י","$1ות"],["(".concat(d,")ות").concat(s,"י").concat(y),"$1י","$1ות"],["(".concat(d,")").concat(s,"ית").concat(y),"$1".concat(T),"$1".concat(w,"ית")],["(".concat(d,")י").concat(s,"תי").concat(y),"$1י","$1תי"],["(".concat(d,"{4,})אים").concat(s,"י?ות").concat(y),"$1אים","$1איות"],["(".concat(d,")(י)?ים").concat(s,"?(י)?ות").concat(y),"$1$2ים","$1$2$3ות"],["(".concat(d,")(י)?ות").concat(s,"?י?ים").concat(y),"$1$2ים","$1$2ות"],["(".concat(d,")י").concat(s,"ות").concat(y),"$1י","$1ות"],["(".concat(d,")ה").concat(s,"י").concat(y),"$1ה","$1י"],["(".concat(u,"{2,})ו(").concat(d,")").concat(s,"י").concat(y),"$1ו$2","$1$2".concat(w,"י")],["(".concat(d,")").concat(s,"י").concat(y),"$1".concat(T),"$1".concat(w,"י")],["(".concat(d,")(ה)?").concat(s,"ת").concat(y),"$1$2".concat(T),"$1".concat(w,"ת")],["(".concat(d,")ם").concat(s,"?ן").concat(y),"$1ם","$1ן"],["(".concat(d,")ן").concat(s,"?ם").concat(y),"$1ם","$1ן"],["ה(".concat(d,"+)י(").concat(d,")ו").concat(s,"נה"),"ה$1י$2ו","ה$1$2נה"],["(".concat(d,"+)ו").concat(s,"ת(").concat(d,"+)נה"),"$1ו","ת$2נה"],["ת(".concat(d,"+)ו").concat(s,"נה"),"ת$1ו","ת$1נה"],["(".concat(d,")").concat(s,"נה").concat(y),"$1".concat(T),"$1".concat(w,"נה")],["(".concat(d,"+)\\(([ותי]{1,3})\\)([יוהםן]{1,3})").concat(y),"$1$3","$1$2$3"],["(".concat(d,"+)י\\(י\\)(").concat(d,"*)(").concat(h,")").concat(y),"$1י$2$3","$1יי$2$3"],["(".concat(d,"+)\\(י\\)י(").concat(d,"*)(").concat(h,")").concat(y),"$1י$2$3","$1יי$2$3"],["\\(א\\)נשים".concat(y),"אנשים","נשים"],["(".concat(d,"+)ב\\(ת\\)").concat(y),"$1ב","$1בת"],["\\[([^|]*?)\\|([^|]*?)\\|([^|]*?)\\]","$1","$2","$3"],["\\[([^|]*?)\\|([^|]*?)\\]","$1","$2",!0],["ץ".concat(w),"צ","צ"],["ך".concat(w),"כ","כ"],["ן".concat(w),"נ","נ"],["ם".concat(w),"מ","מ"],["ף".concat(w),"פ","פ"],["([^".concat(f,"]+)צ").concat(T),"$1ץ","$1ץ"],["([^".concat(f,"]+)כ").concat(T),"$1ך","$1ך"],["([^".concat(f,"]+)נ").concat(T),"$1ן","$1ן"],["([^".concat(f,"]+)מ").concat(T),"$1ם","$1ם"],["([^".concat(f,"]+)פ").concat(T),"$1ף","$1ף"],["[".concat(T).concat(w,"]"),"",""]]).map((function(t){return t[0]=new RegExp(t[0],"g"),!0===t[3]&&(t[3]="".concat(t[1],"/").concat(t[2])),t}));function S(t,n){(null==n||n>t.length)&&(n=t.length);for(var c=0,e=new Array(n);c<n;c++)e[c]=t[c];return e}var j="__IVRITA_PROTECTED__",M=new RegExp("\\{".concat(j,":(\\d+):").concat(j,"\\}"),"g");function A(t,n){for(var c=0;c<n.length;c++){var e=n[c];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}var O=function(){function t(n){return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),this.node={},this.originalText="",this.currentMode=!1,n instanceof Node&&n.nodeType===Node.TEXT_NODE&&(this.constructor.instances.has(n)?this.constructor.instances.get(n):(this.constructor.instances.set(n,this),this.node=n,void(this.originalText=n.textContent)))}var n,c;return n=t,(c=[{key:"setMode",value:function(t){var n;this.currentMode=t,(n=0===t?this.originalText:3!==t||this.originalText.includes("{")||this.originalText.includes("[")?function(t,n,c){var e=t,o=[];e.includes("{")&&(e=e.replace(/\{(.*?)\}/g,(function(t,n,c){return o[c]=n,"{".concat(j,":").concat(c,":").concat(j,"}")})));return x.forEach((function(t){var c,o,a,r=(a=4,function(t){if(Array.isArray(t))return t}(o=t)||function(t,n){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var c=[],e=!0,o=!1,a=void 0;try{for(var r,i=t[Symbol.iterator]();!(e=(r=i.next()).done)&&(c.push(r.value),!n||c.length!==n);e=!0);}catch(t){o=!0,a=t}finally{try{e||null==i.return||i.return()}finally{if(o)throw a}}return c}}(o,a)||function(t,n){if(t){if("string"==typeof t)return S(t,n);var c=Object.prototype.toString.call(t).slice(8,-1);return"Object"===c&&t.constructor&&(c=t.constructor.name),"Map"===c||"Set"===c?Array.from(t):"Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?S(t,n):void 0}}(o,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=r[0],s=r[1],u=r[2],l=r[3];switch(n){case 2:c=u;break;case 1:c=s;break;case 3:default:l&&(c=l)}void 0!==c&&(e=e.replace(i,c))})),o.length&&(e=e.replace(M,(function(t,n){var c=parseInt(n,10);return o[c]?o[c]:""}))),e}(this.originalText,t):this.originalText)!==this.node.data&&(this.node.data=n)}}])&&A(n.prototype,c),t}();function N(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function F(t,n){for(var c=0;c<n.length;c++){var e=n[c];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}O.instances=new WeakMap;var k=new RegExp(u),I=new RegExp(p),C=function(){function t(){var n=this,c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(N(this,t),this.nodes=new Set,this.elements=[],this.mode=void 0,this.fontFeatureSettings=void 0,c instanceof NodeList)this.elements=Array.from(c);else if(c instanceof HTMLElement)this.elements=[c];else{if(!("function"==typeof jQuery&&c instanceof jQuery&&"function"==typeof c.toArray))throw new Error("Passed argument is not an HTMLElement. Did you mean: 'document.querySelector(\"".concat(c.toString(),"\")'?"));this.elements=c.toArray()}if(1===this.elements.length&&this.constructor.instances.has(this.elements[0])){var o=this.constructor.instances.get(this.elements[0]);return o.registerTextNodes(this.elements[0]),o}this.observer=new MutationObserver(this.onElementChange.bind(this)),this.elements.forEach((function(t){n.observer.observe(t,{childList:!0,subtree:!0,characterData:!0}),n.constructor.instances.set(t,n),n.registerTextNodes(t)})),void 0!==e?this.setMode(e):this.constructor.defaultMode&&this.setMode(this.constructor.defaultMode)}var n,c,e;return n=t,e=[{key:"setDefaultMode",value:function(t){this.defaultMode=t}},{key:"setMode",value:function(t){this.instances.forEach((function(n){return n.setMode(t)}))}}],(c=[{key:"destroy",value:function(){var t=this;this.setMode(0),this.setFontFeatureSettings(!1),this.observer&&this.observer.disconnect(),this.nodes.clear(),this.elements.forEach((function(n){t.constructor.instances.delete(n)}))}},{key:"setMode",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3;return 3===t?this.setFontFeatureSettings(!0):3===this.mode&&this.setFontFeatureSettings(!1),this.constructor.GENDERS.includes(t)?(this.mode=t,this.nodes.forEach((function(n){return n.setMode(t)})),this):this}},{key:"registerTextNodes",value:function(t){for(var n,c=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,{acceptNode:function(t){return O.instances.has(t)||(t.textContent.trim().length>0&&k.test(t.textContent)&&I.test(t.textContent)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP)}});n=c.nextNode();)this.nodes.add(new O(n))}},{key:"onElementChange",value:function(t){var n=this;t.forEach((function(t){Array.from(t.addedNodes).filter((function(t){return t.nodeType===Node.TEXT_NODE})).forEach((function(t){n.nodes.add(new O(t))}))}))}},{key:"setFontFeatureSettings",value:function(t){return this.fontFeatureSettings=t,this.elements.forEach((function(n){var c=n.style.fontFeatureSettings.slice().replace("normal","");t?c.includes("titl")||(c&&(c+=", "),c+='"titl"'):c.includes("titl")&&(c=c.replace(/(, )?"?'?titl"?'?/,"")),c||(c="normal"),n.style.fontFeatureSettings=c})),this}}])&&F(n.prototype,c),e&&F(n,e),t}();C.GENDERS=[0,1,2,3],C.MALE=1,C.FEMALE=2,C.NEUTRAL=3,C.ORIGINAL=0,C.instances=new Map,C.defaultMode=void 0,"function"==typeof jQuery&&(jQuery.fn.ivrita=function(t){return new C(this,t)})}},n={};function c(e){if(n[e])return n[e].exports;var o=n[e]={exports:{}};return t[e](o,o.exports,c),o.exports}return c.d=(t,n)=>{for(var e in n)c.o(n,e)&&!c.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:n[e]})},c.o=(t,n)=>Object.prototype.hasOwnProperty.call(t,n),c(540)})().default}));
     1!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.Ivrita=n():t.Ivrita=n()}(self,(function(){return(()=>{"use strict";var t={540:(t,n,c)=>{c.d(n,{default:()=>I});var e={ן:"נ",ף:"פ",ך:"כ",ם:"מ",ץ:"צ"},o=Object.keys(e).concat(Object.values(e)),a=Object.keys(e),r=function(t){return Object.keys(e).find((function(n){return e[n]===t}))||t},i=function(t){return e[t]||t},s="[\\\\/.]",u="[\\\\./—־-]",l="'‎\"”׳״",f="[א-ת".concat(l,"]"),d="[".concat(a,"]"),h="^|$|\b|[^א-ת".concat(l,"?֐-ֽֿׁ-ׂׄ-ׇׯ-ײשׁ-ﭏ]"),$="(?=".concat(h,")"),y="(?:".concat(h,")"),v=[u,"\\[","\\{","\\(","םן","ןם","יםות","ותים"].join("|"),p=[["א".concat(u,"נשים"),"אנשים","נשים"],["א".concat(u,"נשי(?!ם)"),"אנשי","נשות"],["את".concat(s,"ה"),"אתה","את"],["איש".concat(s,"(?:אש)?ת"),"איש","אשת"],["אשת".concat(s,"איש"),"איש","אשת"],["(גבר|איש)".concat(s,"אישה"),"$1","אישה"],["אח".concat(s,"ות").concat($),"אח","אחות"],["ל(ו|ה)".concat(s,"ל(ו|ה)").concat($),"לו","לה"],["ב(ן|ת)".concat(s,"ב(ן|ת)").concat($),"בן","בת"],["ה(ו|י)א".concat(s,"ה(ו|י)א").concat($),"הוא","היא"],["אנשי".concat(s,"ות").concat($),"אנשי","נשות"],["מישהו".concat(s,"י").concat($),"מישהו","מישהי"],["אחד".concat(s,"(אח)?ת").concat($),"אחד","אחת"],["אחת".concat(s,"(אח)?ד").concat($),"אחד","אחת"],["יקיר(י?)".concat(s,"תי").concat($),"יקירי","יקירתי"],["אהוב(י?)".concat(s,"תי").concat($),"אהובי","אהובתי"],["צור".concat(s,"י").concat($),"צור","צרי"]],m=["(א|ס)ובי(י?)קטיב","אחמ([".concat(l,"]?)ש"),"ח([".concat(l,"])כ"),"מ([".concat(l,"])פ"),"מנכ([".concat(l,"]?)ל"),"מפא([".concat(l,"]?)יניק"),"משת([".concat(l,"]?)פ"),"עו([".concat(l,"])(ס|ד)"),"רו([".concat(l,"])ח"),"רשג([".concat(l,"]?)ד"),"א(י?)כפת","אביב","אח","אגרונומ","אדריכל","אוטיסט","אוסטר(ל?)","אופטימ","אחרא","איטלק","אינדיבידואליסט","אירונ","אירופא","אכזר","אלגנט","אלכוהוליסט","אלמונ","אמית","אמריק(א|נ)","אנאלפבית","אנגל","אנוש","אנטישמ","אנליסט","אנרכיסט","אסטרולוג","אסיאת","אפריק(נ|א)","אצנ","אקדמ(א?)","אקטואל","אקטיביסט","אקרא","ארטיסט","אשכנז","אתאיסט","אתיופ","בוגדנ","בולגר","בטחונ","ביביסט","ב(י?)דיונ","בינונ","בינלאומ","בל(א?)גניסט","בלוגר","בלונד","במא","ברב(א?)ר","ברונט","בריט","ברמנ","ג".concat(l,"ובניק"),"ג".concat(l,"ינג").concat(l),"גות","גיטריסט","גר(א?)פ","גרמנ","גרפיקא","דברנ","דוקטורנט","דושבג","דיאטנ","דינ(א?)מ","(י?)הוד","הי(פ?)סטר","היפ","הססנ","הנדסא","הרמונ","וטרינר","זכא","חבר(ו?)ת","חובבנ","חולמנ","חושנ","חילונ","חי(ו|נ)נ","חיפא","חמדנ","חרד","חרד(ת?)","חרמנ","חשמלא","טבח","טבעונ","טורק","טיפוגרפ","טכנא","טרוריסט","טרמפיסט","טרנס","ידידות","יוגיסט","יוונ","יורקר","יזמ","ימא","ימ(י?)נ","ירושלמ","ישראל","כימא","כלכלנ","כרונ","לבנונ","לוחמנ","ליברל","ליכודניק","מאסטר","מוזיק(ל|א)","מומח","מזוכיסט","מזרח","מחזא","מטאליסט","מטרידנ","מילואימניק","מיליארדר","מיליונר","מכונא","מלאכ","מלצר","מפסידנ","מצליחנ","מצפונ","מקצוע(נ?)","מרדנ","מרקסיסט","נגר","נובוריש","נודיסט","נודניק","נוצר","נורא","נורווג","נטורופת","נרקומנ","ס(א?)דיסט","ס(א?)ח","סדרנ","סהרור","סוליד(ר?)","סוציאליסט","סטודנט","סטרייט","סמכות","סנדלר","סנוב","ססגונ","ספונטנ","ספורטיב","ספציפ","ספרד","סקסולוג","סרב","סרטט","עירונ","עיתונא","עממ","עניינ","ענק","עסיס","עקרונ","ערב","ערס","פאנקיסט","פדופיל","פוליטיקא","פולנ","פופול(א?)ר","פופוליסט","פחדנ","פטריוט","פילוסופ","פיזיוטרפיסט","פמיניסט","פסיכופת","פסנתרנ","פציפיסט","פריק","פרופסור","פרסומא","פקח","פשיסט","צבע","צבעונ","צי(ו?)נ","ציבור","ציפלונ","צמחונ","צפונ","צרפת","קדמונ","קוויר","קומוניסט","קומיק(ס?)א","קונדיטור","קוסמטיקא","קופא","קוקסינל","קטלנ","קטנונ","קיבוצניק","קיצונ","קלאס","קלדנ","קלפטומנ","קניינ","קפדנ","קפיטליסט","קריקטוריסט","קצב","רבנ","רוחנ","רוס","רוקיסט","רמא","רפד","רקדנ","ש(ו?)ויונ","שאפתנ","שוביניסט","שווד","שוויצר","שחיינ","שחקנ","שלומיאל","שמאלנ","שמנמנ","שמרנ","שפ","שק(ר|ד)נ","שרמנט","תורכ","תזונא","תחמנ","תסריטא","תצפיתנ","תקציבא","תרבות"];function g(t){return function(t){if(Array.isArray(t))return b(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,n){if(t){if("string"==typeof t)return b(t,n);var c=Object.prototype.toString.call(t).slice(8,-1);return"Object"===c&&t.constructor&&(c=t.constructor.name),"Map"===c||"Set"===c?Array.from(t):"Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?b(t,n):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(t,n){(null==n||n>t.length)&&(n=t.length);for(var c=0,e=new Array(n);c<n;c++)e[c]=t[c];return e}var E="׈",T="׉";const w=[].concat(g(p),g(["השב","הקשב","הפעל","הרגש","התמד","הרם","הדגם","הלבש","הרבץ","הקלד","התקן"].map((function(t){var n=t.slice(0,t.length-1),c=t.slice(t.length-1),e="(".concat(c,")");return o.includes(c)&&(e="(".concat(r(c),"|").concat(i(c),")")),["".concat(n).concat(e).concat(s,"י").concat($),"".concat(n).concat(r(c)),"".concat(n,"י").concat(i(c),"י")]}))),g(m.map((function(t){var n=t;return t.includes("(")&&(n=t.replace(new RegExp("\\(.*?\\)"),"$2")),["(".concat(y,")").concat(t,"ים").concat(s,"י?ות").concat($),"$1".concat(n,"ים"),"$1".concat(n,"יות")]}))),[["(".concat($,")(").concat(f,"{0,3})י").concat(s,"ת(").concat(f,"{2,})"),"$1$2י$3","$1$2ת$3"],["(".concat($,")(").concat(f,"{0,3})ת").concat(s,"י(").concat(f,"{2,})"),"$1$2י$3","$1$2ת$3"],["ו".concat(s,"ה").concat($),"ו","ה"],["ה".concat(s,"ו").concat($),"ו","ה"],["(".concat(f,")").concat(s,"ה").concat($),"$1".concat(E),"$1".concat(T,"ה")],["(".concat(f,")ה?").concat(s,"תה").concat($),"$1ה","$1תה"],["(".concat(f,")יו").concat(s,"י?ה").concat($),"$1יו","$1יה"],["(".concat(f,")ה").concat(s,"ית").concat($),"$1ה","$1ית"],["(".concat(f,")י").concat(s,"ות").concat($),"$1י","$1ות"],["(".concat(f,")ות").concat(s,"י").concat($),"$1י","$1ות"],["(".concat(f,")").concat(s,"ית").concat($),"$1".concat(E),"$1".concat(T,"ית")],["(".concat(f,")י").concat(s,"תי").concat($),"$1י","$1תי"],["(".concat(f,"{4,})אים").concat(s,"י?ות").concat($),"$1אים","$1איות"],["(".concat(f,")(י)?ים").concat(s,"?(י)?ות").concat($),"$1$2ים","$1$2$3ות"],["(".concat(f,")(י)?ות").concat(s,"?י?ים").concat($),"$1$2ים","$1$2ות"],["(".concat(f,")י").concat(s,"ות").concat($),"$1י","$1ות"],["(".concat(f,")ה").concat(s,"י").concat($),"$1ה","$1י"],["(".concat(f,"{2,})ו(").concat(f,")").concat(s,"י").concat($),"$1ו$2","$1$2".concat(T,"י")],["(".concat(f,")").concat(s,"י").concat($),"$1".concat(E),"$1".concat(T,"י")],["(".concat(f,")(ה)?").concat(s,"ת").concat($),"$1$2".concat(E),"$1".concat(T,"ת")],["(".concat(f,")ם").concat(s,"?ן").concat($),"$1ם","$1ן"],["(".concat(f,")ן").concat(s,"?ם").concat($),"$1ם","$1ן"],["ה(".concat(f,"+)י(").concat(f,")ו").concat(s,"נה"),"ה$1י$2ו","ה$1$2נה"],["(".concat(f,"+)ו").concat(s,"ת(").concat(f,"+)נה"),"$1ו","ת$2נה"],["ת(".concat(f,"+)ו").concat(s,"נה"),"ת$1ו","ת$1נה"],["(".concat(f,")").concat(s,"נה").concat($),"$1".concat(E),"$1".concat(T,"נה")],["(".concat(f,"+)\\(([ותי]{1,3})\\)([יוהםן]{1,3})").concat($),"$1$3","$1$2$3"],["(".concat(f,"+)י\\(י\\)(").concat(f,"*)(").concat(d,")").concat($),"$1י$2$3","$1יי$2$3"],["(".concat(f,"+)\\(י\\)י(").concat(f,"*)(").concat(d,")").concat($),"$1י$2$3","$1יי$2$3"],["\\(א\\)נשים".concat($),"אנשים","נשים"],["(".concat(f,"+)ב\\(ת\\)").concat($),"$1ב","$1בת"],["\\[([^|]*?)\\|([^|]*?)\\|([^|]*?)\\]","$1","$2","$3"],["\\[([^|]*?)\\|([^|]*?)\\]","$1","$2",!0],["ץ".concat(T),"צ","צ"],["ך".concat(T),"כ","כ"],["ן".concat(T),"נ","נ"],["ם".concat(T),"מ","מ"],["ף".concat(T),"פ","פ"],["([^".concat(l,"]+)צ").concat(E),"$1ץ","$1ץ"],["([^".concat(l,"]+)כ").concat(E),"$1ך","$1ך"],["([^".concat(l,"]+)נ").concat(E),"$1ן","$1ן"],["([^".concat(l,"]+)מ").concat(E),"$1ם","$1ם"],["([^".concat(l,"]+)פ").concat(E),"$1ף","$1ף"],["[".concat(E).concat(T,"]"),"",""]]).map((function(t){return t[0]=new RegExp(t[0],"g"),!0===t[3]&&(t[3]="".concat(t[1],"/").concat(t[2])),t}));function x(t,n){(null==n||n>t.length)&&(n=t.length);for(var c=0,e=new Array(n);c<n;c++)e[c]=t[c];return e}var S="__IVRITA_PROTECTED__",j=new RegExp("\\{".concat(S,":(\\d+):").concat(S,"\\}"),"g");function M(t,n){for(var c=0;c<n.length;c++){var e=n[c];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}var A=function(){function t(n){return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),this.node={},this.originalText="",this.currentMode=!1,n instanceof Node&&n.nodeType===Node.TEXT_NODE&&(this.constructor.instances.has(n)?this.constructor.instances.get(n):(this.constructor.instances.set(n,this),this.node=n,void(this.originalText=n.textContent)))}var n,c;return n=t,(c=[{key:"setMode",value:function(t){var n;this.currentMode=t,(n=0===t?this.originalText:3!==t||this.originalText.includes("{")||this.originalText.includes("[")?function(t,n,c){var e=t,o=[];e.includes("{")&&(e=e.replace(/\{(.*?)\}/g,(function(t,n,c){return o[c]=n,"{".concat(S,":").concat(c,":").concat(S,"}")})));return w.forEach((function(t){var c,o,a,r=(a=4,function(t){if(Array.isArray(t))return t}(o=t)||function(t,n){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var c=[],e=!0,o=!1,a=void 0;try{for(var r,i=t[Symbol.iterator]();!(e=(r=i.next()).done)&&(c.push(r.value),!n||c.length!==n);e=!0);}catch(t){o=!0,a=t}finally{try{e||null==i.return||i.return()}finally{if(o)throw a}}return c}}(o,a)||function(t,n){if(t){if("string"==typeof t)return x(t,n);var c=Object.prototype.toString.call(t).slice(8,-1);return"Object"===c&&t.constructor&&(c=t.constructor.name),"Map"===c||"Set"===c?Array.from(t):"Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?x(t,n):void 0}}(o,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=r[0],s=r[1],u=r[2],l=r[3];switch(n){case 2:c=u;break;case 1:c=s;break;case 3:default:l&&(c=l)}void 0!==c&&(e=e.replace(i,c))})),o.length&&(e=e.replace(j,(function(t,n){var c=parseInt(n,10);return o[c]?o[c]:""}))),e}(this.originalText,t):this.originalText)!==this.node.data&&(this.node.data=n)}}])&&M(n.prototype,c),t}();function O(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function N(t,n){for(var c=0;c<n.length;c++){var e=n[c];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}A.instances=new WeakMap;var F=new RegExp("[א-ת]"),k=new RegExp(v),I=function(){function t(){var n=this,c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(O(this,t),this.nodes=new Set,this.elements=[],this.mode=void 0,this.fontFeatureSettings=void 0,c instanceof NodeList)this.elements=Array.from(c);else if(c instanceof HTMLElement)this.elements=[c];else{if(!("function"==typeof jQuery&&c instanceof jQuery&&"function"==typeof c.toArray))throw new Error("Passed argument is not an HTMLElement. Did you mean: 'document.querySelector(\"".concat(c.toString(),"\")'?"));this.elements=c.toArray()}if(1===this.elements.length&&this.constructor.instances.has(this.elements[0])){var o=this.constructor.instances.get(this.elements[0]);return o.registerTextNodes(this.elements[0]),o}this.observer=new MutationObserver(this.onElementChange.bind(this)),this.elements.forEach((function(t){n.observer.observe(t,{childList:!0,subtree:!0,characterData:!0}),n.constructor.instances.set(t,n),n.registerTextNodes(t)})),void 0!==e?this.setMode(e):this.constructor.defaultMode&&this.setMode(this.constructor.defaultMode)}var n,c,e;return n=t,e=[{key:"setDefaultMode",value:function(t){this.defaultMode=t}},{key:"setMode",value:function(t){this.instances.forEach((function(n){return n.setMode(t)}))}}],(c=[{key:"destroy",value:function(){var t=this;this.setMode(0),this.setFontFeatureSettings(!1),this.observer&&this.observer.disconnect(),this.nodes.clear(),this.elements.forEach((function(n){t.constructor.instances.delete(n)}))}},{key:"setMode",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3;return 3===t?this.setFontFeatureSettings(!0):3===this.mode&&this.setFontFeatureSettings(!1),this.constructor.GENDERS.includes(t)?(this.mode=t,this.nodes.forEach((function(n){return n.setMode(t)})),this):this}},{key:"registerTextNodes",value:function(t){for(var n,c=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,{acceptNode:function(t){return A.instances.has(t)||(t.textContent.trim().length>0&&F.test(t.textContent)&&k.test(t.textContent)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP)}});n=c.nextNode();)this.nodes.add(new A(n))}},{key:"onElementChange",value:function(t){var n=this;t.forEach((function(t){Array.from(t.addedNodes).filter((function(t){return t.nodeType===Node.TEXT_NODE})).forEach((function(t){n.nodes.add(new A(t))}))}))}},{key:"setFontFeatureSettings",value:function(t){return this.fontFeatureSettings=t,this.elements.forEach((function(n){var c=n.style.fontFeatureSettings.slice().replace("normal","");t?c.includes("titl")||(c&&(c+=", "),c+='"titl"'):c.includes("titl")&&(c=c.replace(/(, )?"?'?titl"?'?/,"")),c||(c="normal"),n.style.fontFeatureSettings=c})),this}}])&&N(n.prototype,c),e&&N(n,e),t}();I.GENDERS=[0,1,2,3],I.MALE=1,I.FEMALE=2,I.NEUTRAL=3,I.ORIGINAL=0,I.instances=new Map,I.defaultMode=void 0,"function"==typeof jQuery&&(jQuery.fn.ivrita=function(t){return new I(this,t)})}},n={};function c(e){if(n[e])return n[e].exports;var o=n[e]={exports:{}};return t[e](o,o.exports,c),o.exports}return c.d=(t,n)=>{for(var e in n)c.o(n,e)&&!c.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:n[e]})},c.o=(t,n)=>Object.prototype.hasOwnProperty.call(t,n),c(540)})().default}));
  • ivrita/trunk/js/ivrita.min.js

    r2429718 r2431785  
    1 !function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.Ivrita=n():t.Ivrita=n()}(self,(function(){return(()=>{"use strict";var t={540:(t,n,c)=>{c.d(n,{default:()=>C});var e={ן:"נ",ף:"פ",ך:"כ",ם:"מ",ץ:"צ"},o=Object.keys(e).concat(Object.values(e)),a=Object.keys(e),r=function(t){return Object.keys(e).find((function(n){return e[n]===t}))||t},i=function(t){return e[t]||t},s="[\\\\/.]",u="[א-ת]",l="[\\\\./—־-]",f="'‎\"”׳״",d="[א-ת".concat(f,"]"),h="[".concat(a,"]"),$="^|$|\b|[^א-ת?֐-ֽֿׁ-ׂׄ-ׇׯ-ײשׁ-ﭏ]",y="(?=".concat($,")"),v="(?:".concat($,")"),p=[l,"\\[","\\{","\\(","םן","ןם","יםות","ותים"].join("|"),m=[["א".concat(l,"נשים"),"אנשים","נשים"],["א".concat(l,"נשות"),"אנשי","נשות"],["את".concat(s,"ה"),"אתה","את"],["איש".concat(s,"(?:אש)?ת"),"איש","אשת"],["אשת".concat(s,"איש"),"איש","אשת"],["(גבר|איש)".concat(s,"אישה"),"$1","אישה"],["אח".concat(s,"ות").concat(y),"אח","אחות"],["ל(ו|ה)".concat(s,"ל(ו|ה)").concat(y),"לו","לה"],["ב(ן|ת)".concat(s,"ב(ן|ת)").concat(y),"בן","בת"],["ה(ו|י)א".concat(s,"ה(ו|י)א").concat(y),"הוא","היא"],["אנשי".concat(s,"ות").concat(y),"אנשי","נשות"],["מישהו".concat(s,"י").concat(y),"מישהו","מישהי"],["אחד".concat(s,"(אח)?ת").concat(y),"אחד","אחת"],["אחת".concat(s,"(אח)?ד").concat(y),"אחד","אחת"],["יקיר(י?)".concat(s,"תי").concat(y),"יקירי","יקירתי"],["אהוב(י?)".concat(s,"תי").concat(y),"אהובי","אהובתי"],["צור".concat(s,"י").concat(y),"צור","צרי"]],g=["(א|ס)ובי(י?)קטיב","אחמ([".concat(f,"]?)ש"),"ח([".concat(f,"])כ"),"מ([".concat(f,"])פ"),"מנכ([".concat(f,"]?)ל"),"מפא([".concat(f,"]?)יניק"),"משת([".concat(f,"]?)פ"),"עו([".concat(f,"])(ס|ד)"),"רו([".concat(f,"])ח"),"רשג([".concat(f,"]?)ד"),"א(י?)כפת","אביב","אח","אגרונומ","אדריכל","אוטיסט","אוסטר(ל?)","אופטימ","אחרא","אחיינ","איטלק","אינדיבידואליסט","אירונ","אירופא","אכזר","אלגנט","אלכוהוליסט","אלמונ","אמית","אמריק(א|נ)","אנאלפבית","אנגל","אנוש","אנטישמ","אנליסט","אנרכיסט","אסטרולוג","אסיאת","אפריק(נ|א)","אצנ","אקדמ(א?)","אקטואל","אקטיביסט","אקרא","ארטיסט","אשכנז","אתאיסט","אתיופ","בוגדנ","בולגר","בטחונ","ביביסט","ב(י?)דיונ","בינונ","בינלאומ","בל(א?)גניסט","בלוגר","בלונד","במא","ברב(א?)ר","ברונט","בריט","ברמנ","ג".concat(f,"ובניק"),"ג".concat(f,"ינג").concat(f),"גות","גיטריסט","גר(א?)פ","גרמנ","גרפיקא","דברנ","דוקטורנט","דושבג","דיאטנ","דינ(א?)מ","(י?)הוד","הי(פ?)סטר","היפ","הססנ","הנדסא","הרמונ","וטרינר","זכא","חבר(ו?)ת","חובבנ","חולמנ","חושנ","חילונ","חי(ו|נ)נ","חיפא","חמדנ","חרד","חרד(ת?)","חרמנ","חשמלא","טבח","טבעונ","טורק","טיפוגרפ","טכנא","טרוריסט","טרמפיסט","טרנס","ידידות","יוגיסט","יוונ","יורקר","יזמ","ימא","ימ(י?)נ","ירושלמ","ישראל","כימא","כלכלנ","כרונ","לבנונ","לוחמנ","ליברל","ליכודניק","מאסטר","מוזיק(ל|א)","מומח","מזוכיסט","מזרח","מחזא","מטאליסט","מטרידנ","מילואימניק","מיליארדר","מיליונר","מכונא","מלאכ","מלצר","מפסידנ","מצליחנ","מצפונ","מקצוע(נ?)","מרדנ","מרקסיסט","נגר","נובוריש","נודיסט","נודניק","נוצר","נורא","נורווג","נטורופת","נרקומנ","ס(א?)דיסט","ס(א?)ח","סדרנ","סהרור","סוליד(ר?)","סוציאליסט","סטודנט","סטרייט","סמכות","סנדלר","סנוב","ססגונ","ספונטנ","ספורטיב","ספציפ","ספרד","סקסולוג","סרב","סרטט","עירונ","עיתונא","עממ","עניינ","ענק","עסיס","עקרונ","ערב","ערס","פאנקיסט","פדופיל","פוליטיקא","פולנ","פופול(א?)ר","פופוליסט","פחדנ","פטריוט","פילוסופ","פיזיוטרפיסט","פמיניסט","פסיכופת","פסנתרנ","פציפיסט","פריק","פרופסור","פרסומא","פקח","פשיסט","צבע","צבעונ","צי(ו?)נ","ציבור","ציפלונ","צמחונ","צפונ","צרפת","קדמונ","קוויר","קומוניסט","קומיק(ס?)א","קונדיטור","קוסמטיקא","קופא","קוקסינל","קטלנ","קטנונ","קיבוצניק","קיצונ","קלאס","קלדנ","קלפטומנ","קניינ","קפדנ","קפיטליסט","קריקטוריסט","קצב","רבנ","רוחנ","רוס","רוקיסט","רמא","רפד","רקדנ","ש(ו?)ויונ","שאפתנ","שוביניסט","שווד","שוויצר","שחיינ","שחקנ","שלומיאל","שמאלנ","שמנמנ","שמרנ","שפ","שק(ר|ד)נ","שרמנט","תורכ","תזונא","תחמנ","תסריטא","תצפיתנ","תקציבא","תרבות"];function b(t){return function(t){if(Array.isArray(t))return E(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,n){if(t){if("string"==typeof t)return E(t,n);var c=Object.prototype.toString.call(t).slice(8,-1);return"Object"===c&&t.constructor&&(c=t.constructor.name),"Map"===c||"Set"===c?Array.from(t):"Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?E(t,n):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(t,n){(null==n||n>t.length)&&(n=t.length);for(var c=0,e=new Array(n);c<n;c++)e[c]=t[c];return e}var T="׈",w="׉";const x=[].concat(b(m),b(["האר","הבא","הגב","הדגם","הדלק","הוסף","הועל","הורד","הזמן","הזן","הכנס","הלבש","המלץ","המשך","הסר","הסתר","הפעל","הפקד","הצג","הקלד","הקש","הקשב","הרגש","הרם","השב","השלם","השתק","התמד","התקן"].map((function(t){var n=t.slice(0,t.length-1),c=t.slice(t.length-1),e="(".concat(c,")");return o.includes(c)&&(e="(".concat(r(c),"|").concat(i(c),")")),["".concat(n).concat(e).concat(s,"י").concat(y),"".concat(n).concat(r(c)),"".concat(n,"י").concat(i(c),"י")]}))),b(g.map((function(t){var n=t;return t.includes("(")&&(n=t.replace(new RegExp("\\(.*?\\)"),"$2")),["(".concat(v,")").concat(t,"ים").concat(s,"י?ות").concat(y),"$1".concat(n,"ים"),"$1".concat(n,"יות")]}))),[["(".concat(y,")(").concat(d,"{0,3})י").concat(s,"ת(").concat(d,"{2,})"),"$1$2י$3","$1$2ת$3"],["(".concat(y,")(").concat(d,"{0,3})ת").concat(s,"י(").concat(d,"{2,})"),"$1$2י$3","$1$2ת$3"],["ו".concat(s,"ה").concat(y),"ו","ה"],["ה".concat(s,"ו").concat(y),"ו","ה"],["(".concat(d,")").concat(s,"ה").concat(y),"$1".concat(T),"$1".concat(w,"ה")],["(".concat(d,")ה?").concat(s,"תה").concat(y),"$1ה","$1תה"],["(".concat(d,")יו").concat(s,"י?ה").concat(y),"$1יו","$1יה"],["(".concat(d,")ה").concat(s,"ית").concat(y),"$1ה","$1ית"],["(".concat(d,")י").concat(s,"ות").concat(y),"$1י","$1ות"],["(".concat(d,")ות").concat(s,"י").concat(y),"$1י","$1ות"],["(".concat(d,")").concat(s,"ית").concat(y),"$1".concat(T),"$1".concat(w,"ית")],["(".concat(d,")י").concat(s,"תי").concat(y),"$1י","$1תי"],["(".concat(d,"{4,})אים").concat(s,"י?ות").concat(y),"$1אים","$1איות"],["(".concat(d,")(י)?ים").concat(s,"?(י)?ות").concat(y),"$1$2ים","$1$2$3ות"],["(".concat(d,")(י)?ות").concat(s,"?י?ים").concat(y),"$1$2ים","$1$2ות"],["(".concat(d,")י").concat(s,"ות").concat(y),"$1י","$1ות"],["(".concat(d,")ה").concat(s,"י").concat(y),"$1ה","$1י"],["(".concat(u,"{2,})ו(").concat(d,")").concat(s,"י").concat(y),"$1ו$2","$1$2".concat(w,"י")],["(".concat(d,")").concat(s,"י").concat(y),"$1".concat(T),"$1".concat(w,"י")],["(".concat(d,")(ה)?").concat(s,"ת").concat(y),"$1$2".concat(T),"$1".concat(w,"ת")],["(".concat(d,")ם").concat(s,"?ן").concat(y),"$1ם","$1ן"],["(".concat(d,")ן").concat(s,"?ם").concat(y),"$1ם","$1ן"],["ה(".concat(d,"+)י(").concat(d,")ו").concat(s,"נה"),"ה$1י$2ו","ה$1$2נה"],["(".concat(d,"+)ו").concat(s,"ת(").concat(d,"+)נה"),"$1ו","ת$2נה"],["ת(".concat(d,"+)ו").concat(s,"נה"),"ת$1ו","ת$1נה"],["(".concat(d,")").concat(s,"נה").concat(y),"$1".concat(T),"$1".concat(w,"נה")],["(".concat(d,"+)\\(([ותי]{1,3})\\)([יוהםן]{1,3})").concat(y),"$1$3","$1$2$3"],["(".concat(d,"+)י\\(י\\)(").concat(d,"*)(").concat(h,")").concat(y),"$1י$2$3","$1יי$2$3"],["(".concat(d,"+)\\(י\\)י(").concat(d,"*)(").concat(h,")").concat(y),"$1י$2$3","$1יי$2$3"],["\\(א\\)נשים".concat(y),"אנשים","נשים"],["(".concat(d,"+)ב\\(ת\\)").concat(y),"$1ב","$1בת"],["\\[([^|]*?)\\|([^|]*?)\\|([^|]*?)\\]","$1","$2","$3"],["\\[([^|]*?)\\|([^|]*?)\\]","$1","$2",!0],["ץ".concat(w),"צ","צ"],["ך".concat(w),"כ","כ"],["ן".concat(w),"נ","נ"],["ם".concat(w),"מ","מ"],["ף".concat(w),"פ","פ"],["([^".concat(f,"]+)צ").concat(T),"$1ץ","$1ץ"],["([^".concat(f,"]+)כ").concat(T),"$1ך","$1ך"],["([^".concat(f,"]+)נ").concat(T),"$1ן","$1ן"],["([^".concat(f,"]+)מ").concat(T),"$1ם","$1ם"],["([^".concat(f,"]+)פ").concat(T),"$1ף","$1ף"],["[".concat(T).concat(w,"]"),"",""]]).map((function(t){return t[0]=new RegExp(t[0],"g"),!0===t[3]&&(t[3]="".concat(t[1],"/").concat(t[2])),t}));function S(t,n){(null==n||n>t.length)&&(n=t.length);for(var c=0,e=new Array(n);c<n;c++)e[c]=t[c];return e}var j="__IVRITA_PROTECTED__",M=new RegExp("\\{".concat(j,":(\\d+):").concat(j,"\\}"),"g");function A(t,n){for(var c=0;c<n.length;c++){var e=n[c];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}var O=function(){function t(n){return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),this.node={},this.originalText="",this.currentMode=!1,n instanceof Node&&n.nodeType===Node.TEXT_NODE&&(this.constructor.instances.has(n)?this.constructor.instances.get(n):(this.constructor.instances.set(n,this),this.node=n,void(this.originalText=n.textContent)))}var n,c;return n=t,(c=[{key:"setMode",value:function(t){var n;this.currentMode=t,(n=0===t?this.originalText:3!==t||this.originalText.includes("{")||this.originalText.includes("[")?function(t,n,c){var e=t,o=[];e.includes("{")&&(e=e.replace(/\{(.*?)\}/g,(function(t,n,c){return o[c]=n,"{".concat(j,":").concat(c,":").concat(j,"}")})));return x.forEach((function(t){var c,o,a,r=(a=4,function(t){if(Array.isArray(t))return t}(o=t)||function(t,n){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var c=[],e=!0,o=!1,a=void 0;try{for(var r,i=t[Symbol.iterator]();!(e=(r=i.next()).done)&&(c.push(r.value),!n||c.length!==n);e=!0);}catch(t){o=!0,a=t}finally{try{e||null==i.return||i.return()}finally{if(o)throw a}}return c}}(o,a)||function(t,n){if(t){if("string"==typeof t)return S(t,n);var c=Object.prototype.toString.call(t).slice(8,-1);return"Object"===c&&t.constructor&&(c=t.constructor.name),"Map"===c||"Set"===c?Array.from(t):"Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?S(t,n):void 0}}(o,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=r[0],s=r[1],u=r[2],l=r[3];switch(n){case 2:c=u;break;case 1:c=s;break;case 3:default:l&&(c=l)}void 0!==c&&(e=e.replace(i,c))})),o.length&&(e=e.replace(M,(function(t,n){var c=parseInt(n,10);return o[c]?o[c]:""}))),e}(this.originalText,t):this.originalText)!==this.node.data&&(this.node.data=n)}}])&&A(n.prototype,c),t}();function N(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function F(t,n){for(var c=0;c<n.length;c++){var e=n[c];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}O.instances=new WeakMap;var k=new RegExp(u),I=new RegExp(p),C=function(){function t(){var n=this,c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(N(this,t),this.nodes=new Set,this.elements=[],this.mode=void 0,this.fontFeatureSettings=void 0,c instanceof NodeList)this.elements=Array.from(c);else if(c instanceof HTMLElement)this.elements=[c];else{if(!("function"==typeof jQuery&&c instanceof jQuery&&"function"==typeof c.toArray))throw new Error("Passed argument is not an HTMLElement. Did you mean: 'document.querySelector(\"".concat(c.toString(),"\")'?"));this.elements=c.toArray()}if(1===this.elements.length&&this.constructor.instances.has(this.elements[0])){var o=this.constructor.instances.get(this.elements[0]);return o.registerTextNodes(this.elements[0]),o}this.observer=new MutationObserver(this.onElementChange.bind(this)),this.elements.forEach((function(t){n.observer.observe(t,{childList:!0,subtree:!0,characterData:!0}),n.constructor.instances.set(t,n),n.registerTextNodes(t)})),void 0!==e?this.setMode(e):this.constructor.defaultMode&&this.setMode(this.constructor.defaultMode)}var n,c,e;return n=t,e=[{key:"setDefaultMode",value:function(t){this.defaultMode=t}},{key:"setMode",value:function(t){this.instances.forEach((function(n){return n.setMode(t)}))}}],(c=[{key:"destroy",value:function(){var t=this;this.setMode(0),this.setFontFeatureSettings(!1),this.observer&&this.observer.disconnect(),this.nodes.clear(),this.elements.forEach((function(n){t.constructor.instances.delete(n)}))}},{key:"setMode",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3;return 3===t?this.setFontFeatureSettings(!0):3===this.mode&&this.setFontFeatureSettings(!1),this.constructor.GENDERS.includes(t)?(this.mode=t,this.nodes.forEach((function(n){return n.setMode(t)})),this):this}},{key:"registerTextNodes",value:function(t){for(var n,c=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,{acceptNode:function(t){return O.instances.has(t)||(t.textContent.trim().length>0&&k.test(t.textContent)&&I.test(t.textContent)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP)}});n=c.nextNode();)this.nodes.add(new O(n))}},{key:"onElementChange",value:function(t){var n=this;t.forEach((function(t){Array.from(t.addedNodes).filter((function(t){return t.nodeType===Node.TEXT_NODE})).forEach((function(t){n.nodes.add(new O(t))}))}))}},{key:"setFontFeatureSettings",value:function(t){return this.fontFeatureSettings=t,this.elements.forEach((function(n){var c=n.style.fontFeatureSettings.slice().replace("normal","");t?c.includes("titl")||(c&&(c+=", "),c+='"titl"'):c.includes("titl")&&(c=c.replace(/(, )?"?'?titl"?'?/,"")),c||(c="normal"),n.style.fontFeatureSettings=c})),this}}])&&F(n.prototype,c),e&&F(n,e),t}();C.GENDERS=[0,1,2,3],C.MALE=1,C.FEMALE=2,C.NEUTRAL=3,C.ORIGINAL=0,C.instances=new Map,C.defaultMode=void 0,"function"==typeof jQuery&&(jQuery.fn.ivrita=function(t){return new C(this,t)})}},n={};function c(e){if(n[e])return n[e].exports;var o=n[e]={exports:{}};return t[e](o,o.exports,c),o.exports}return c.d=(t,n)=>{for(var e in n)c.o(n,e)&&!c.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:n[e]})},c.o=(t,n)=>Object.prototype.hasOwnProperty.call(t,n),c(540)})().default}));
     1!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.Ivrita=n():t.Ivrita=n()}(self,(function(){return(()=>{"use strict";var t={540:(t,n,c)=>{c.d(n,{default:()=>I});var e={ן:"נ",ף:"פ",ך:"כ",ם:"מ",ץ:"צ"},o=Object.keys(e).concat(Object.values(e)),a=Object.keys(e),r=function(t){return Object.keys(e).find((function(n){return e[n]===t}))||t},i=function(t){return e[t]||t},s="[\\\\/.]",u="[\\\\./—־-]",l="'‎\"”׳״",f="[א-ת".concat(l,"]"),d="[".concat(a,"]"),h="^|$|\b|[^א-ת".concat(l,"?֐-ֽֿׁ-ׂׄ-ׇׯ-ײשׁ-ﭏ]"),$="(?=".concat(h,")"),y="(?:".concat(h,")"),v=[u,"\\[","\\{","\\(","םן","ןם","יםות","ותים"].join("|"),p=[["א".concat(u,"נשים"),"אנשים","נשים"],["א".concat(u,"נשי(?!ם)"),"אנשי","נשות"],["את".concat(s,"ה"),"אתה","את"],["איש".concat(s,"(?:אש)?ת"),"איש","אשת"],["אשת".concat(s,"איש"),"איש","אשת"],["(גבר|איש)".concat(s,"אישה"),"$1","אישה"],["אח".concat(s,"ות").concat($),"אח","אחות"],["ל(ו|ה)".concat(s,"ל(ו|ה)").concat($),"לו","לה"],["ב(ן|ת)".concat(s,"ב(ן|ת)").concat($),"בן","בת"],["ה(ו|י)א".concat(s,"ה(ו|י)א").concat($),"הוא","היא"],["אנשי".concat(s,"ות").concat($),"אנשי","נשות"],["מישהו".concat(s,"י").concat($),"מישהו","מישהי"],["אחד".concat(s,"(אח)?ת").concat($),"אחד","אחת"],["אחת".concat(s,"(אח)?ד").concat($),"אחד","אחת"],["יקיר(י?)".concat(s,"תי").concat($),"יקירי","יקירתי"],["אהוב(י?)".concat(s,"תי").concat($),"אהובי","אהובתי"],["צור".concat(s,"י").concat($),"צור","צרי"]],m=["(א|ס)ובי(י?)קטיב","אחמ([".concat(l,"]?)ש"),"ח([".concat(l,"])כ"),"מ([".concat(l,"])פ"),"מנכ([".concat(l,"]?)ל"),"מפא([".concat(l,"]?)יניק"),"משת([".concat(l,"]?)פ"),"עו([".concat(l,"])(ס|ד)"),"רו([".concat(l,"])ח"),"רשג([".concat(l,"]?)ד"),"א(י?)כפת","אביב","אח","אגרונומ","אדריכל","אוטיסט","אוסטר(ל?)","אופטימ","אחרא","איטלק","אינדיבידואליסט","אירונ","אירופא","אכזר","אלגנט","אלכוהוליסט","אלמונ","אמית","אמריק(א|נ)","אנאלפבית","אנגל","אנוש","אנטישמ","אנליסט","אנרכיסט","אסטרולוג","אסיאת","אפריק(נ|א)","אצנ","אקדמ(א?)","אקטואל","אקטיביסט","אקרא","ארטיסט","אשכנז","אתאיסט","אתיופ","בוגדנ","בולגר","בטחונ","ביביסט","ב(י?)דיונ","בינונ","בינלאומ","בל(א?)גניסט","בלוגר","בלונד","במא","ברב(א?)ר","ברונט","בריט","ברמנ","ג".concat(l,"ובניק"),"ג".concat(l,"ינג").concat(l),"גות","גיטריסט","גר(א?)פ","גרמנ","גרפיקא","דברנ","דוקטורנט","דושבג","דיאטנ","דינ(א?)מ","(י?)הוד","הי(פ?)סטר","היפ","הססנ","הנדסא","הרמונ","וטרינר","זכא","חבר(ו?)ת","חובבנ","חולמנ","חושנ","חילונ","חי(ו|נ)נ","חיפא","חמדנ","חרד","חרד(ת?)","חרמנ","חשמלא","טבח","טבעונ","טורק","טיפוגרפ","טכנא","טרוריסט","טרמפיסט","טרנס","ידידות","יוגיסט","יוונ","יורקר","יזמ","ימא","ימ(י?)נ","ירושלמ","ישראל","כימא","כלכלנ","כרונ","לבנונ","לוחמנ","ליברל","ליכודניק","מאסטר","מוזיק(ל|א)","מומח","מזוכיסט","מזרח","מחזא","מטאליסט","מטרידנ","מילואימניק","מיליארדר","מיליונר","מכונא","מלאכ","מלצר","מפסידנ","מצליחנ","מצפונ","מקצוע(נ?)","מרדנ","מרקסיסט","נגר","נובוריש","נודיסט","נודניק","נוצר","נורא","נורווג","נטורופת","נרקומנ","ס(א?)דיסט","ס(א?)ח","סדרנ","סהרור","סוליד(ר?)","סוציאליסט","סטודנט","סטרייט","סמכות","סנדלר","סנוב","ססגונ","ספונטנ","ספורטיב","ספציפ","ספרד","סקסולוג","סרב","סרטט","עירונ","עיתונא","עממ","עניינ","ענק","עסיס","עקרונ","ערב","ערס","פאנקיסט","פדופיל","פוליטיקא","פולנ","פופול(א?)ר","פופוליסט","פחדנ","פטריוט","פילוסופ","פיזיוטרפיסט","פמיניסט","פסיכופת","פסנתרנ","פציפיסט","פריק","פרופסור","פרסומא","פקח","פשיסט","צבע","צבעונ","צי(ו?)נ","ציבור","ציפלונ","צמחונ","צפונ","צרפת","קדמונ","קוויר","קומוניסט","קומיק(ס?)א","קונדיטור","קוסמטיקא","קופא","קוקסינל","קטלנ","קטנונ","קיבוצניק","קיצונ","קלאס","קלדנ","קלפטומנ","קניינ","קפדנ","קפיטליסט","קריקטוריסט","קצב","רבנ","רוחנ","רוס","רוקיסט","רמא","רפד","רקדנ","ש(ו?)ויונ","שאפתנ","שוביניסט","שווד","שוויצר","שחיינ","שחקנ","שלומיאל","שמאלנ","שמנמנ","שמרנ","שפ","שק(ר|ד)נ","שרמנט","תורכ","תזונא","תחמנ","תסריטא","תצפיתנ","תקציבא","תרבות"];function g(t){return function(t){if(Array.isArray(t))return b(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,n){if(t){if("string"==typeof t)return b(t,n);var c=Object.prototype.toString.call(t).slice(8,-1);return"Object"===c&&t.constructor&&(c=t.constructor.name),"Map"===c||"Set"===c?Array.from(t):"Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?b(t,n):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(t,n){(null==n||n>t.length)&&(n=t.length);for(var c=0,e=new Array(n);c<n;c++)e[c]=t[c];return e}var E="׈",T="׉";const w=[].concat(g(p),g(["השב","הקשב","הפעל","הרגש","התמד","הרם","הדגם","הלבש","הרבץ","הקלד","התקן"].map((function(t){var n=t.slice(0,t.length-1),c=t.slice(t.length-1),e="(".concat(c,")");return o.includes(c)&&(e="(".concat(r(c),"|").concat(i(c),")")),["".concat(n).concat(e).concat(s,"י").concat($),"".concat(n).concat(r(c)),"".concat(n,"י").concat(i(c),"י")]}))),g(m.map((function(t){var n=t;return t.includes("(")&&(n=t.replace(new RegExp("\\(.*?\\)"),"$2")),["(".concat(y,")").concat(t,"ים").concat(s,"י?ות").concat($),"$1".concat(n,"ים"),"$1".concat(n,"יות")]}))),[["(".concat($,")(").concat(f,"{0,3})י").concat(s,"ת(").concat(f,"{2,})"),"$1$2י$3","$1$2ת$3"],["(".concat($,")(").concat(f,"{0,3})ת").concat(s,"י(").concat(f,"{2,})"),"$1$2י$3","$1$2ת$3"],["ו".concat(s,"ה").concat($),"ו","ה"],["ה".concat(s,"ו").concat($),"ו","ה"],["(".concat(f,")").concat(s,"ה").concat($),"$1".concat(E),"$1".concat(T,"ה")],["(".concat(f,")ה?").concat(s,"תה").concat($),"$1ה","$1תה"],["(".concat(f,")יו").concat(s,"י?ה").concat($),"$1יו","$1יה"],["(".concat(f,")ה").concat(s,"ית").concat($),"$1ה","$1ית"],["(".concat(f,")י").concat(s,"ות").concat($),"$1י","$1ות"],["(".concat(f,")ות").concat(s,"י").concat($),"$1י","$1ות"],["(".concat(f,")").concat(s,"ית").concat($),"$1".concat(E),"$1".concat(T,"ית")],["(".concat(f,")י").concat(s,"תי").concat($),"$1י","$1תי"],["(".concat(f,"{4,})אים").concat(s,"י?ות").concat($),"$1אים","$1איות"],["(".concat(f,")(י)?ים").concat(s,"?(י)?ות").concat($),"$1$2ים","$1$2$3ות"],["(".concat(f,")(י)?ות").concat(s,"?י?ים").concat($),"$1$2ים","$1$2ות"],["(".concat(f,")י").concat(s,"ות").concat($),"$1י","$1ות"],["(".concat(f,")ה").concat(s,"י").concat($),"$1ה","$1י"],["(".concat(f,"{2,})ו(").concat(f,")").concat(s,"י").concat($),"$1ו$2","$1$2".concat(T,"י")],["(".concat(f,")").concat(s,"י").concat($),"$1".concat(E),"$1".concat(T,"י")],["(".concat(f,")(ה)?").concat(s,"ת").concat($),"$1$2".concat(E),"$1".concat(T,"ת")],["(".concat(f,")ם").concat(s,"?ן").concat($),"$1ם","$1ן"],["(".concat(f,")ן").concat(s,"?ם").concat($),"$1ם","$1ן"],["ה(".concat(f,"+)י(").concat(f,")ו").concat(s,"נה"),"ה$1י$2ו","ה$1$2נה"],["(".concat(f,"+)ו").concat(s,"ת(").concat(f,"+)נה"),"$1ו","ת$2נה"],["ת(".concat(f,"+)ו").concat(s,"נה"),"ת$1ו","ת$1נה"],["(".concat(f,")").concat(s,"נה").concat($),"$1".concat(E),"$1".concat(T,"נה")],["(".concat(f,"+)\\(([ותי]{1,3})\\)([יוהםן]{1,3})").concat($),"$1$3","$1$2$3"],["(".concat(f,"+)י\\(י\\)(").concat(f,"*)(").concat(d,")").concat($),"$1י$2$3","$1יי$2$3"],["(".concat(f,"+)\\(י\\)י(").concat(f,"*)(").concat(d,")").concat($),"$1י$2$3","$1יי$2$3"],["\\(א\\)נשים".concat($),"אנשים","נשים"],["(".concat(f,"+)ב\\(ת\\)").concat($),"$1ב","$1בת"],["\\[([^|]*?)\\|([^|]*?)\\|([^|]*?)\\]","$1","$2","$3"],["\\[([^|]*?)\\|([^|]*?)\\]","$1","$2",!0],["ץ".concat(T),"צ","צ"],["ך".concat(T),"כ","כ"],["ן".concat(T),"נ","נ"],["ם".concat(T),"מ","מ"],["ף".concat(T),"פ","פ"],["([^".concat(l,"]+)צ").concat(E),"$1ץ","$1ץ"],["([^".concat(l,"]+)כ").concat(E),"$1ך","$1ך"],["([^".concat(l,"]+)נ").concat(E),"$1ן","$1ן"],["([^".concat(l,"]+)מ").concat(E),"$1ם","$1ם"],["([^".concat(l,"]+)פ").concat(E),"$1ף","$1ף"],["[".concat(E).concat(T,"]"),"",""]]).map((function(t){return t[0]=new RegExp(t[0],"g"),!0===t[3]&&(t[3]="".concat(t[1],"/").concat(t[2])),t}));function x(t,n){(null==n||n>t.length)&&(n=t.length);for(var c=0,e=new Array(n);c<n;c++)e[c]=t[c];return e}var S="__IVRITA_PROTECTED__",j=new RegExp("\\{".concat(S,":(\\d+):").concat(S,"\\}"),"g");function M(t,n){for(var c=0;c<n.length;c++){var e=n[c];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}var A=function(){function t(n){return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),this.node={},this.originalText="",this.currentMode=!1,n instanceof Node&&n.nodeType===Node.TEXT_NODE&&(this.constructor.instances.has(n)?this.constructor.instances.get(n):(this.constructor.instances.set(n,this),this.node=n,void(this.originalText=n.textContent)))}var n,c;return n=t,(c=[{key:"setMode",value:function(t){var n;this.currentMode=t,(n=0===t?this.originalText:3!==t||this.originalText.includes("{")||this.originalText.includes("[")?function(t,n,c){var e=t,o=[];e.includes("{")&&(e=e.replace(/\{(.*?)\}/g,(function(t,n,c){return o[c]=n,"{".concat(S,":").concat(c,":").concat(S,"}")})));return w.forEach((function(t){var c,o,a,r=(a=4,function(t){if(Array.isArray(t))return t}(o=t)||function(t,n){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var c=[],e=!0,o=!1,a=void 0;try{for(var r,i=t[Symbol.iterator]();!(e=(r=i.next()).done)&&(c.push(r.value),!n||c.length!==n);e=!0);}catch(t){o=!0,a=t}finally{try{e||null==i.return||i.return()}finally{if(o)throw a}}return c}}(o,a)||function(t,n){if(t){if("string"==typeof t)return x(t,n);var c=Object.prototype.toString.call(t).slice(8,-1);return"Object"===c&&t.constructor&&(c=t.constructor.name),"Map"===c||"Set"===c?Array.from(t):"Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?x(t,n):void 0}}(o,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=r[0],s=r[1],u=r[2],l=r[3];switch(n){case 2:c=u;break;case 1:c=s;break;case 3:default:l&&(c=l)}void 0!==c&&(e=e.replace(i,c))})),o.length&&(e=e.replace(j,(function(t,n){var c=parseInt(n,10);return o[c]?o[c]:""}))),e}(this.originalText,t):this.originalText)!==this.node.data&&(this.node.data=n)}}])&&M(n.prototype,c),t}();function O(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function N(t,n){for(var c=0;c<n.length;c++){var e=n[c];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}A.instances=new WeakMap;var F=new RegExp("[א-ת]"),k=new RegExp(v),I=function(){function t(){var n=this,c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(O(this,t),this.nodes=new Set,this.elements=[],this.mode=void 0,this.fontFeatureSettings=void 0,c instanceof NodeList)this.elements=Array.from(c);else if(c instanceof HTMLElement)this.elements=[c];else{if(!("function"==typeof jQuery&&c instanceof jQuery&&"function"==typeof c.toArray))throw new Error("Passed argument is not an HTMLElement. Did you mean: 'document.querySelector(\"".concat(c.toString(),"\")'?"));this.elements=c.toArray()}if(1===this.elements.length&&this.constructor.instances.has(this.elements[0])){var o=this.constructor.instances.get(this.elements[0]);return o.registerTextNodes(this.elements[0]),o}this.observer=new MutationObserver(this.onElementChange.bind(this)),this.elements.forEach((function(t){n.observer.observe(t,{childList:!0,subtree:!0,characterData:!0}),n.constructor.instances.set(t,n),n.registerTextNodes(t)})),void 0!==e?this.setMode(e):this.constructor.defaultMode&&this.setMode(this.constructor.defaultMode)}var n,c,e;return n=t,e=[{key:"setDefaultMode",value:function(t){this.defaultMode=t}},{key:"setMode",value:function(t){this.instances.forEach((function(n){return n.setMode(t)}))}}],(c=[{key:"destroy",value:function(){var t=this;this.setMode(0),this.setFontFeatureSettings(!1),this.observer&&this.observer.disconnect(),this.nodes.clear(),this.elements.forEach((function(n){t.constructor.instances.delete(n)}))}},{key:"setMode",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3;return 3===t?this.setFontFeatureSettings(!0):3===this.mode&&this.setFontFeatureSettings(!1),this.constructor.GENDERS.includes(t)?(this.mode=t,this.nodes.forEach((function(n){return n.setMode(t)})),this):this}},{key:"registerTextNodes",value:function(t){for(var n,c=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,{acceptNode:function(t){return A.instances.has(t)||(t.textContent.trim().length>0&&F.test(t.textContent)&&k.test(t.textContent)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP)}});n=c.nextNode();)this.nodes.add(new A(n))}},{key:"onElementChange",value:function(t){var n=this;t.forEach((function(t){Array.from(t.addedNodes).filter((function(t){return t.nodeType===Node.TEXT_NODE})).forEach((function(t){n.nodes.add(new A(t))}))}))}},{key:"setFontFeatureSettings",value:function(t){return this.fontFeatureSettings=t,this.elements.forEach((function(n){var c=n.style.fontFeatureSettings.slice().replace("normal","");t?c.includes("titl")||(c&&(c+=", "),c+='"titl"'):c.includes("titl")&&(c=c.replace(/(, )?"?'?titl"?'?/,"")),c||(c="normal"),n.style.fontFeatureSettings=c})),this}}])&&N(n.prototype,c),e&&N(n,e),t}();I.GENDERS=[0,1,2,3],I.MALE=1,I.FEMALE=2,I.NEUTRAL=3,I.ORIGINAL=0,I.instances=new Map,I.defaultMode=void 0,"function"==typeof jQuery&&(jQuery.fn.ivrita=function(t){return new I(this,t)})}},n={};function c(e){if(n[e])return n[e].exports;var o=n[e]={exports:{}};return t[e](o,o.exports,c),o.exports}return c.d=(t,n)=>{for(var e in n)c.o(n,e)&&!c.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:n[e]})},c.o=(t,n)=>Object.prototype.hasOwnProperty.call(t,n),c(540)})().default}));
Note: See TracChangeset for help on using the changeset viewer.