-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
1 lines (1 loc) · 18.2 KB
/
script.js
1
!function(){"use strict";function e(a){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(a)}var a,t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n={exports:{}};a=n,function(e,t){a.exports=t.call(e)}((e(t),t),(function(){var a=a||{},t=document.querySelectorAll.bind(document),n=Object.prototype.toString,r="ontouchstart"in window;function i(a){var t=e(a);return"function"===t||"object"===t&&!!a}function l(e){var a,r=n.call(e);return"[object String]"===r?t(e):i(e)&&/^\[object (Array|HTMLCollection|NodeList|Object)\]$/.test(r)&&e.hasOwnProperty("length")?e:i(a=e)&&a.nodeType>0?[e]:[]}function c(a){var t,n,r={top:0,left:0},i=a&&a.ownerDocument;return t=i.documentElement,"undefined"!==e(a.getBoundingClientRect)&&(r=a.getBoundingClientRect()),n=function(e){return null!==(a=e)&&a===a.window?e:9===e.nodeType&&e.defaultView;var a}(i),{top:r.top+n.pageYOffset-t.clientTop,left:r.left+n.pageXOffset-t.clientLeft}}function o(e){var a="";for(var t in e)e.hasOwnProperty(t)&&(a+=t+":"+e[t]+";");return a}var s={duration:750,delay:200,show:function(e,a,t){if(2===e.button)return!1;a=a||this;var n=document.createElement("div");n.className="waves-ripple waves-rippling",a.appendChild(n);var r=c(a),i=0,l=0;"touches"in e&&e.touches.length?(i=e.touches[0].pageY-r.top,l=e.touches[0].pageX-r.left):(i=e.pageY-r.top,l=e.pageX-r.left),l=l>=0?l:0,i=i>=0?i:0;var p="scale("+a.clientWidth/100*3+")",u="translate(0,0)";t&&(u="translate("+t.x+"px, "+t.y+"px)"),n.setAttribute("data-hold",Date.now()),n.setAttribute("data-x",l),n.setAttribute("data-y",i),n.setAttribute("data-scale",p),n.setAttribute("data-translate",u);var d={top:i+"px",left:l+"px"};n.classList.add("waves-notransition"),n.setAttribute("style",o(d)),n.classList.remove("waves-notransition"),d["-webkit-transform"]=p+" "+u,d["-moz-transform"]=p+" "+u,d["-ms-transform"]=p+" "+u,d["-o-transform"]=p+" "+u,d.transform=p+" "+u,d.opacity="1";var g="mousemove"===e.type?2500:s.duration;d["-webkit-transition-duration"]=g+"ms",d["-moz-transition-duration"]=g+"ms",d["-o-transition-duration"]=g+"ms",d["transition-duration"]=g+"ms",n.setAttribute("style",o(d))},hide:function(e,a){for(var t=(a=a||this).getElementsByClassName("waves-rippling"),n=0,i=t.length;n<i;n++)u(e,a,t[n]);r&&(a.removeEventListener("touchend",s.hide),a.removeEventListener("touchcancel",s.hide)),a.removeEventListener("mouseup",s.hide),a.removeEventListener("mouseleave",s.hide)}},p={input:function(e){var a=e.parentNode;if("i"!==a.tagName.toLowerCase()||!a.classList.contains("waves-effect")){var t=document.createElement("i");t.className=e.className+" waves-input-wrapper",e.className="waves-button-input",a.replaceChild(t,e),t.appendChild(e);var n=window.getComputedStyle(e,null),r=n.color,i=n.backgroundColor;t.setAttribute("style","color:"+r+";background:"+i),e.setAttribute("style","background-color:rgba(0,0,0,0);")}},img:function(e){var a=e.parentNode;if("i"!==a.tagName.toLowerCase()||!a.classList.contains("waves-effect")){var t=document.createElement("i");a.replaceChild(t,e),t.appendChild(e)}}};function u(e,a,t){if(t){t.classList.remove("waves-rippling");var n=t.getAttribute("data-x"),r=t.getAttribute("data-y"),i=t.getAttribute("data-scale"),l=t.getAttribute("data-translate"),c=350-(Date.now()-Number(t.getAttribute("data-hold")));c<0&&(c=0),"mousemove"===e.type&&(c=150);var p="mousemove"===e.type?2500:s.duration;setTimeout((function(){var e={top:r+"px",left:n+"px",opacity:"0","-webkit-transition-duration":p+"ms","-moz-transition-duration":p+"ms","-o-transition-duration":p+"ms","transition-duration":p+"ms","-webkit-transform":i+" "+l,"-moz-transform":i+" "+l,"-ms-transform":i+" "+l,"-o-transform":i+" "+l,transform:i+" "+l};t.setAttribute("style",o(e)),setTimeout((function(){try{a.removeChild(t)}catch(e){return!1}}),p)}),c)}}var d={touches:0,allowEvent:function(e){var a=!0;return/^(mousedown|mousemove)$/.test(e.type)&&d.touches&&(a=!1),a},registerEvent:function(e){var a=e.type;"touchstart"===a?d.touches+=1:/^(touchend|touchcancel)$/.test(a)&&setTimeout((function(){d.touches&&(d.touches-=1)}),500)}};function g(e){var a=function(e){if(!1===d.allowEvent(e))return null;for(var a=null,t=e.target||e.srcElement;t.parentElement;){if(!(t instanceof SVGElement)&&t.classList.contains("waves-effect")){a=t;break}t=t.parentElement}return a}(e);if(null!==a){if(a.disabled||a.getAttribute("disabled")||a.classList.contains("disabled"))return;if(d.registerEvent(e),"touchstart"===e.type&&s.delay){var t=!1,n=setTimeout((function(){n=null,s.show(e,a)}),s.delay),i=function(r){n&&(clearTimeout(n),n=null,s.show(e,a)),t||(t=!0,s.hide(r,a)),c()},l=function(e){n&&(clearTimeout(n),n=null),i(e),c()};a.addEventListener("touchmove",l,!1),a.addEventListener("touchend",i,!1),a.addEventListener("touchcancel",i,!1);var c=function(){a.removeEventListener("touchmove",l),a.removeEventListener("touchend",i),a.removeEventListener("touchcancel",i)}}else s.show(e,a),r&&(a.addEventListener("touchend",s.hide,!1),a.addEventListener("touchcancel",s.hide,!1)),a.addEventListener("mouseup",s.hide,!1),a.addEventListener("mouseleave",s.hide,!1)}}return a.init=function(e){var a=document.body;"duration"in(e=e||{})&&(s.duration=e.duration),"delay"in e&&(s.delay=e.delay),r&&(a.addEventListener("touchstart",g,!1),a.addEventListener("touchcancel",d.registerEvent,!1),a.addEventListener("touchend",d.registerEvent,!1)),a.addEventListener("mousedown",g,!1)},a.attach=function(e,a){var t,r;e=l(e),"[object Array]"===n.call(a)&&(a=a.join(" ")),a=a?" "+a:"";for(var i=0,c=e.length;i<c;i++)r=(t=e[i]).tagName.toLowerCase(),-1!==["input","img"].indexOf(r)&&(p[r](t),t=t.parentElement),-1===t.className.indexOf("waves-effect")&&(t.className+=" waves-effect"+a)},a.ripple=function(e,a){var t=(e=l(e)).length;if((a=a||{}).wait=a.wait||0,a.position=a.position||null,t)for(var n,r,i,o={},p=0,u={type:"mousedown",button:1},d=function(e,a){return function(){s.hide(e,a)}};p<t;p++)n=e[p],r=a.position||{x:n.clientWidth/2,y:n.clientHeight/2},i=c(n),o.x=i.left+r.x,o.y=i.top+r.y,u.pageX=o.x,u.pageY=o.y,s.show(u,n),a.wait>=0&&null!==a.wait&&setTimeout(d({type:"mouseup",button:1},n),a.wait)},a.calm=function(e){for(var a={type:"mouseup",button:1},t=0,n=(e=l(e)).length;t<n;t++)s.hide(a,e[t])},a.displayEffect=function(e){console.error("Waves.displayEffect() has been deprecated and will be removed in future version. Please use Waves.init() to initialize Waves effect"),a.init(e)},a}));var r,i,l,c,o=n.exports;function s(e,a){if("!"==e[a]?e[a]="®":"@"==e[a]?e[a]="¯":"#"==e[a]?e[a]="±":"$"==e[a]?e[a]="°":"%"==e[a]?e[a]="²":"^"==e[a]?e[a]="³":"&"==e[a]?e[a]="´":"*"==e[a]?e[a]="µ":e[a]=e[a].toUpperCase(),void 0!==e[a+1])if("+"==e[a+1]&&(e[a]=e[a]+"+",e.splice(a+1,1)),"a"==e[a+1]||"i"==e[a+1]||"u"==e[a+1]||"["==e[a+1]||"e"==e[a+1]||"o"==e[a+1])if("a"==e[a+1])e.splice(a+1,1);else if("u"==e[a+1]){if("S"==e[a]||"P"==e[a]||"V"==e[a])return;e[a+1]="|","N"==e[a]?e[a]="Ø":"K"==e[a]?e[a]="Ñ":"K+"==e[a]?e[a]="Ñ+":"T"==e[a]?e[a]="Ò":"L"==e[a]?e[a]="Ó":"D"==e[a]?e[a]="Ô":"Q"==e[a]&&(e[a]="Õ")}else"["==e[a+1]?(e[a-1]="["+e[a-1],e.splice(a+1,1)):"o"==e[a+1]&&(" "==e[a-1]?e[a-2]="["+e[a-2]:e[a-1]="["+e[a-1]);else{if("r"!=e[a+1]&&"y"!=e[a+1])return;if("N"==e[a]?e[a]="Ø":"K"==e[a]?e[a]="Ñ":"K+"==e[a]?e[a]="Ñ+":"T"==e[a]?e[a]="Ò":"L"==e[a]?e[a]="Ó":"D"==e[a]?e[a]="Ô":"Q"==e[a]&&(e[a]="Õ"),"r"==e[a+1]&&void 0!==e[a+2]&&("a"!=e[a+2]&&"i"!=e[a+2]&&"u"!=e[a+2]&&"["!=e[a+2]&&"e"!=e[a+2]&&"o"!=e[a+2]||("S"==e[a]||"P"==e[a]||"V"==e[a]?e[a+1]="]":e[a+1]="`","a"==e[a+2]?(e.splice(a+2,1),"Ø"==e[a]&&e.splice(a+1,1)):"i"==e[a+2]?"Ø"==e[a]&&e.splice(a+1,1):"u"==e[a+2]?"S"==e[a]||"P"==e[a]||"V"==e[a]?(e[a+1]="(",e.splice(a+2,1)):"Ø"==e[a]?(e[a]="N",e[a+1]=")",e.splice(a+2,1)):(e[a+1]=")",e.splice(a+2,1)):"["==e[a+2]?"Ø"==e[a]?(e[a-1]="["+e[a-1],e[a]="N",e.splice(a+2,1)):(e[a-1]="["+e[a-1],e.splice(a+2,1)):"e"==e[a+2]?"S"==e[a]||"P"==e[a]||"V"==e[a]?(e[a+1]="}",e.splice(a+2,1)):"Ø"==e[a]?(e[a]="Ù",e.splice(a+1,1),e.splice(a+1,1)):(e[a+1]="~",e.splice(a+2,1)):"o"==e[a+2]&&("Ø"==e[a]?(e[a]="N"," "==e[a-1]?e[a-2]="["+e[a-2]:e[a-1]="["+e[a-1]):" "==e[a-1]?e[a-2]="["+e[a-2]:e[a-1]="["+e[a-1]))),"y"==e[a+1]&&void 0!==e[a+2]&&("a"==e[a+2]||"i"==e[a+2]||"u"==e[a+2]||"["==e[a+2]||"e"==e[a+2]||"o"==e[a+2]))if("S"==e[a]||"P"==e[a]||"V"==e[a]?e[a+1]="-":e[a+1]="Â","a"==e[a+2])e.splice(a+2,1);else if("u"==e[a+2]){if("S"==e[a]||"P"==e[a]||"V"==e[a])return;e[a+2]="|"}else"["==e[a+2]?(" "==e[a-1]?e[a-2]="["+e[a-2]:e[a-1]="["+e[a-1],e.splice(a+2,1)):"o"==e[a+2]&&(" "==e[a-1]?e[a-2]="["+e[a-2]:e[a-1]="["+e[a-1])}}function p(e,a){if(void 0!==e[a+1])if("+"==e[a+1]&&(e[a]=e[a]+"+",e.splice(a+1,1)),"a"==e[a+1]||"i"==e[a+1]||"u"==e[a+1]||"["==e[a+1]||"e"==e[a+1]||"o"==e[a+1])if("h"==e[a]&&(e[a]="a"),"a"==e[a+1])e.splice(a+1,1);else if("["==e[a+1])e[a]="["+e[a],e.splice(a+1,1);else if("e"==e[a+1])if("r"==e[a])e[a]="x",e.splice(a+1,1);else{if("l"!=e[a])return;e[a]="X",e.splice(a+1,1)}else{if("o"!=e[a+1])return;e[a]="["+e[a]}else if("r"==e[a+1]||"y"==e[a+1]){if("r"==e[a+1]){if(void 0!==e[a+2]&&("a"==e[a+2]||"i"==e[a+2]||"u"==e[a+2]||"["==e[a+2]||"e"==e[a+2]||"o"==e[a+2]))if(e[a+1]="]","a"==e[a+2])e.splice(a+2,1);else if("u"==e[a+2])e[a+1]="(",e.splice(a+2,1);else if("["==e[a+2])e[a]="["+e[a],e.splice(a+2,1);else if("e"==e[a+2])e[a+1]="}",e.splice(a+2,1);else{if("o"!=e[a+2])return;e[a]="["+e[a]}}else if("y"==e[a+1]&&void 0!==e[a+2]&&("a"==e[a+2]||"i"==e[a+2]||"u"==e[a+2]||"["==e[a+2]||"e"==e[a+2]||"o"==e[a+2]))if(e[a+1]="-","a"==e[a+2])e.splice(a+2,1);else if("["==e[a+2])e[a]="["+e[a],e.splice(a+2,1);else{if("o"!=e[a+2])return;e[a]="["+e[a]}}else if("r"==e[a])e[a]="/";else if("z"==e[a])e[a]="=";else{if("h"==e[a])return;" "==e[a+1]?void 0!==e[a+2]&&("a"!=e[a+2]?"A"!=e[a+2]&&"I"!=e[a+2]&&"U"!=e[a+2]&&"E"!=e[a+2]&&"O"!=e[a+2]?void 0!==e[a+3]&&("a"!=e[a+3]&&"i"!=e[a+3]&&"u"!=e[a+3]&&"["!=e[a+3]&&"e"!=e[a+3]&&"o"!=e[a+3]?(e[a+1]="\\",s(e,a+3)):s(e,a+2)):e[a+1]="\\":e[a+2]="H"):s(e,a+1)}else if("r"==e[a])e[a]="/";else if("z"==e[a])e[a]="=";else if("h"==e[a])return}function u(){var e,a=document.getElementById("javanese_input"),t=document.getElementById("javanese_output"),n=document.getElementById("javanese_reset"),r=document.querySelector(".spinner");a.addEventListener("input",(function(a){a.target.value.length>0&&(clearTimeout(e),r.classList.remove("spinner_hide"),t.classList.add("output_hide"),e=setTimeout((function(){r.classList.add("spinner_hide"),t.classList.remove("output_hide"),t.children[0].innerText=function(e){if(""==e)return"";var a=function(e){var a={rekan:{kh:"k+",f:"p+",v:"p+",dz:"f+",gh:"g+",z:"j+"},murda:{Ny:"^",N:"!",K:"@",T:"#",S:"$",P:"%",G:"&",B:"*"},carakan:{dh:"d",d:"f",th:"q",ny:"v",ng:"z"}},t=e.replace(/[^a-zA-Z|0-9|.|,|`|è|N|K|T|S|P|Ny|G|B|\s]/g,"").replace(/kh|f|v|dz|gh|z/g,(function(e){return a.rekan[e]})).replace(/Ny|N|K|T|S|P|G|B/g,(function(e){return a.murda[e]})).replace(/dh|d|th|ny|ng/g,(function(e){return a.carakan[e]})).replace(/e`|è/g,"[").replace(/(\d{1,})/g,";$1;").replace(/\s{1,}/g," ").trim();-1===t.search(/[a|i|u|[|e|o|r|h|z|;|A|I|U|E|O]$/)&&(t+="\\"),t=t.split(" ");for(var n=0;n<t.length;n++)t[n].startsWith("i")?t[n]=t[n].replace(/^i/,"ai"):t[n].startsWith("u")?t[n]=t[n].replace(/^u/,"au"):t[n].startsWith("[")?t[n]=t[n].replace(/^\[/,"[a"):t[n].startsWith("e")?t[n]=t[n].replace(/^e/,"ae"):t[n].startsWith("o")?t[n]=t[n].replace(/^o/,"[ao"):t[n].startsWith("ai")?t[n]=t[n].replace(/^ai/,"aai"):t[n].startsWith("au")?t[n]=t[n].replace(/^au/,"aau"):t[n].startsWith("a[")?t[n]=t[n].replace(/^\[/,"a[a"):t[n].startsWith("ae")?t[n]=t[n].replace(/^ae/,"aae"):t[n].startsWith("ao")&&(t[n]=t[n].replace(/^ao/,"a[ao"));return t.join(" ")}(e);a=a.split("");for(var t=0;t<a.length;t++)("h"==a[t]||"n"==a[t]||"c"==a[t]||"r"==a[t]||"k"==a[t]||"f"==a[t]||"t"==a[t]||"s"==a[t]||"w"==a[t]||"l"==a[t]||"p"==a[t]||"d"==a[t]||"j"==a[t]||"y"==a[t]||"v"==a[t]||"m"==a[t]||"g"==a[t]||"b"==a[t]||"q"==a[t]||"z"==a[t]||"!"==a[t]||"@"==a[t]||"#"==a[t]||"$"==a[t]||"^"==a[t]||"%"==a[t]||"&"==a[t]||"*"==a[t])&&p(a,t);return(a=a.join("")).replace(/\s/g,"").replace(/\+i/g,"Æ").replace(/\+i=/g,"È").replace(/\+i\//g,"É").replace(/\+i\//g,"É").replace(/\+=/g,"Ê").replace(/\+=\//g,"Ç").replace(/o=/g,"=o").replace(/e=/g,"_")}(a.target.value)}),1e3))})),n.addEventListener("click",(function(){a.value="",t.children[0].innerText=""}))}!function(){var e={carakan:{ha:"a",na:"n",ca:"c",ra:"r",ka:"k",da:"f",ta:"t",sa:"s",wa:"w",la:"l",pa:"p",dha:"d",ja:"j",ya:"y",nya:"v",ma:"m",ga:"g",ba:"b",tha:"q",nga:"z"},sandangan:{wulu:"i",suku:"u",taling:"[",pepet:"e",tarung:"o",layar:"/",wignyan:"h",cecek:"=",pangkon:"\\",pengkal:"-",cakra:"]","cakra + u":"(","cakra keret":"}","pa cerek":"x","nga lelet":"X","pada pangkat":";","pada lungsi":".","pada lingsa":",","adeg - adeg":"?"},murda:{na:"!",ka:"@",ta:"#",sa:"$",pa:"%",nya:"^",ga:"&",ba:"*"},rekan:{kha:"k+","fa/va":"p+",dza:"f+",gha:"g+",za:"j+"},pas_carakan:{ha:"H",na:"N",ca:"C",ra:"R",ka:"K",da:"F",ta:"T",sa:"S",wa:"W",la:"L",pa:"P",dha:"D",ja:"J",ya:"Y",nya:"V",ma:"M",ga:"G",ba:"B",tha:"Q",nga:"Z"},pas_murda:{na:"®",ka:"¯",ta:"±",sa:"°",pa:"²",nya:"³",ga:"´",ba:"µ"},pas_rekan:{kha:"K+","fa/va":"P+",dza:"F+",gha:"G+",za:"J+"},swara:{a:"A",i:"I",u:"U",e:"E",o:"O"},wilangan:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"}},a=document.createDocumentFragment(),t=$(),n=$(),r=$(),i=$(),l=$(),c=$(),o=$(),s=$(),p=$(),u=document.querySelector(".keypad");for(var d in e.carakan){var g=z(d,e.carakan[d]);t.appendChild(g)}for(var f in e.sandangan){var v=z(f,e.sandangan[f]);n.appendChild(v)}for(var h in e.murda){var m=z(h,e.murda[h]);r.appendChild(m)}for(var y in e.rekan){var b=z(y,e.rekan[y]);i.appendChild(b)}for(var w in e.pas_carakan){var k=z(w,e.pas_carakan[w]);l.appendChild(k)}for(var E in e.pas_murda){var L=z(E,e.pas_murda[E]);c.appendChild(L)}for(var C in e.pas_rekan){var _=z(C,e.pas_rekan[C]);o.appendChild(_)}for(var T in e.swara){var x=z(T,e.swara[T]);s.appendChild(x)}for(var A in e.wilangan){var N=z(A,e.wilangan[A]);p.appendChild(N)}function $(){var e=document.createElement("div");return e.setAttribute("class","keypad_wrapper"),e}function S(e){var a=document.createElement("span");return a.setAttribute("class","keypad_title"),a.innerText=e,a}function z(e,a){var t=document.createElement("button"),n=document.createElement("span"),r=document.createElement("span");return t.setAttribute("class","keypad_button"),t.setAttribute("data-key",a),n.innerText=a,r.innerText=e,t.appendChild(n),t.appendChild(r),t}a.appendChild(S("Carakan")),a.appendChild(t),a.appendChild(S("Sandangan")),a.appendChild(n),a.appendChild(S("Murda")),a.appendChild(r),a.appendChild(S("Rekan")),a.appendChild(i),a.appendChild(S("Pasangan Carakan")),a.appendChild(l),a.appendChild(S("Pasangan Murda")),a.appendChild(c),a.appendChild(S("Pasangan Rekan")),a.appendChild(o),a.appendChild(S("Swara")),a.appendChild(s),a.appendChild(S("Wilangan")),a.appendChild(p),u.appendChild(a)}(),u(),function(){var e=document.querySelectorAll(".keypad_button"),a=document.getElementById("latin_output-aksara"),t=document.getElementById("latin_output-latin"),n=document.getElementById("latin_reset"),r=document.getElementById("latin_delete"),i="";function l(){i=i.replace(/([N|C|R|K|F|T|W|L|D|J|Y|M|G|B|Q|Z])u/g,"$1|"),t.innerText=i.replace(/h/g,"~h").replace(/a/g,"ha").replace(/n/g,"na").replace(/c/g,"ca").replace(/r/g,"ra").replace(/k/g,"ka").replace(/d/g,"dha").replace(/f/g,"da").replace(/t/g,"ta").replace(/s/g,"sa").replace(/w/g,"wa").replace(/l/g,"la").replace(/p/g,"pa").replace(/j/g,"ja").replace(/y/g,"ya").replace(/v/g,"nya").replace(/m/g,"ma").replace(/g/g,"ga").replace(/b/g,"ba").replace(/q/g,"tha").replace(/z/g,"nga").replace(/!/g,"na").replace(/@/g,"ka").replace(/#/g,"ta").replace(/\$/g,"sa").replace(/%/g,"pa").replace(/\^/g,"nya").replace(/&/g,"ga").replace(/\*/g,"ba").replace(/ka\+/g,"kha").replace(/pa\+/g,"fa").replace(/da\+/g,"dza").replace(/ga\+/g,"gha").replace(/ja\+/g,"za").replace(/®/g,"#na").replace(/¯/g,"#ka").replace(/±/g,"#ta").replace(/°/g,"#sa").replace(/²/g,"#pa").replace(/³/g,"#nya").replace(/´/g,"#ga").replace(/µ/g,"#ba").replace(/H/g,"#ha").replace(/N/g,"#na").replace(/C/g,"#ca").replace(/R/g,"#ra").replace(/K/g,"#ka").replace(/F/g,"#da").replace(/T/g,"#ta").replace(/S/g,"#sa").replace(/W/g,"#wa").replace(/L/g,"#la").replace(/P/g,"#pa").replace(/D/g,"#dha").replace(/J/g,"#ja").replace(/Y/g,"#ya").replace(/V/g,"#nya").replace(/M/g,"#ma").replace(/G/g,"#ga").replace(/B/g,"#ba").replace(/Q/g,"#tha").replace(/Z/g,"#nga").replace(/#ka\+/g,"#kha").replace(/#pa\+/g,"#fa").replace(/#da\+/g,"#dza").replace(/#ga\+/g,"#gha").replace(/#ja\+/g,"#za").replace(/i/g,"~i").replace(/a~i/g,"i").replace(/u/g,"~u").replace(/a~u/g,"u").replace(/e/g,"~e").replace(/a~e/g,"e").replace(/\[/g,"~è").replace(/~è(\w)a/g,"$1è").replace(/~è(\w)(h|y|g)a/g,"$1$2è").replace(/o/g,"~o").replace(/(\w)è~o/g,"$1o").replace(/\//g,"~r").replace(/(\w+)(a|i|u|e|è|o)~r/g,"$1$2r").replace(/(\w+)(a|i|u|e|è|o)~h/g,"$1$2h").replace(/=/g,"~ng").replace(/(\w+)(a|i|u|e|è|o)~ng/g,"$1$2ng").replace(/\\/g,"~a").replace(/(\w+)(a|i|u|e|è|o)~a/g,"$1").replace(/-/g,"~ya").replace(/(\w+)a~ya/g,"$1ya").replace(/]/g,"~ra").replace(/(\w+)a~ra/g,"$1ra").replace(/\(/g,"~ru").replace(/(\w+)a~ru/g,"$1ru").replace(/\}/g,"~re").replace(/(\w+)a~re/g,"$1re").replace(/x/g,"re").replace(/X/g,"le").replace(/;/g,"~b").replace(/\?/g,"~c").replace(/a#/g,"").replace(/#(\w+)a\|/g,"$1u").replace(/[~]\w+/g,"").replace(/[~]è/g,"").replace(/[#]\w+/g,""),a.innerText=i}e.forEach((function(e){e.addEventListener("click",(function(e){i+=e.currentTarget.getAttribute("data-key"),l()}))})),n.addEventListener("click",(function(){i="",t.innerText="",a.innerText=""})),r.addEventListener("click",(function(){i=i.substr(0,i.length-1),l()}))}(),r=document.getElementById("tab1"),i=document.getElementById("tab2"),l=document.getElementById("tab_btn1"),c=document.getElementById("tab_btn2"),l.addEventListener("click",(function(){r.classList.add("tab_active"),i.classList.remove("tab_active"),l.classList.add("tab_nav-button-active"),c.classList.remove("tab_nav-button-active")})),c.addEventListener("click",(function(){r.classList.remove("tab_active"),i.classList.add("tab_active"),l.classList.remove("tab_nav-button-active"),c.classList.add("tab_nav-button-active")})),o.attach(".button_icon"),o.attach(".tab_nav-button"),o.attach(".keypad_button"),o.init()}();