isite 2021.12.6 → 2021.12.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -431,12 +431,8 @@
431
431
  _num[1] = n2;
432
432
  } else if (n4 && parseInt(n4) > 2) {
433
433
  n4 = 5;
434
- n3 = parseInt(n3);
435
- n3 = n3 * 10;
436
434
  _num[1] = n3 + n4;
437
435
  } else {
438
- n3 = parseInt(n3);
439
- n3 = n3 * 10;
440
436
  _num[1] = n3;
441
437
  }
442
438
  }
@@ -1 +1 @@
1
- (function(e,t,n,r){function o(e){return e?("string"!=typeof e&&(e=e.toString()),e.replace(/[\/\\^$*+?.()\[\]{}]/g,"\\$&")):""}function a(e,t){let n="";return d.forEach(r=>{r.n==e&&(n=r.i0[t])}),n}function l(e,t){let n="";return 11==e?d.forEach(r=>{r.n==e&&(n=r.i0[t])}):12==e?d.forEach(r=>{r.n==e&&(n=r.i0[t])}):(d.forEach(r=>{r.n==e[1]&&(n=r.i0[t])}),d.forEach(r=>{r.n==e[0]&&(e[1]>0&&e[0]>1?n+=f.strings.space[t]+f.strings.and[t]:n+="",n+=r.i1[t])})),n}function s(e,t){let n="";d.forEach(r=>{r.n==e[0]&&(n=r.i2[t]+f.strings.space[t])});let r=l(e.substring(1),t);return r&&(n&&(n+=f.strings.and[t]),n+=r),n}function c(e,t){let n="";d.forEach(r=>{r.n==e[0]&&(n=r.i3[t]+f.strings.space[t])});let r=s(e.substring(1),t);return r&&(n&&(n+=f.strings.and[t]),n+=r),n}function u(e,t){let n=l(e.substring(0,2),t)+f.strings.space[t];1==e[0]?n+=f.strings[10][t]+f.strings.space[t]:n+=f.strings[20][t]+f.strings.space[t];let r=s(e.substring(2),t);return r&&(n+=f.strings.and[t]+r),n}if(String.prototype.test||(String.prototype.test=function(e,t="gium"){try{return new RegExp(e,t).test(this)}catch(e){return!1}}),String.prototype.like||(String.prototype.like=function(e){if(!e)return!1;let t=!1;return e.split("|").forEach(e=>{e=e.split("*"),e.forEach((t,n)=>{e[n]=o(t)}),e=e.join(".*"),this.test("^"+e+"$","gium")&&(t=!0)}),t}),String.prototype.contains||(String.prototype.contains=function(e){let t=!1;return e?(e.split("|").forEach(e=>{e&&this.test("^.*"+o(e)+".*$","gium")&&(t=!0)}),t):t}),"object"==typeof SOCIALBROWSER){if(SOCIALBROWSER.var=SOCIALBROWSER.var||{},SOCIALBROWSER.var.white_list=SOCIALBROWSER.var.white_list||[],t.location.hostname){let e=`*${t.location.hostname}*`,n=!1;SOCIALBROWSER.var.white_list.forEach(t=>{t.url==e&&(n=!0)}),n||(SOCIALBROWSER.var.white_list.push({url:e}),SOCIALBROWSER.call("set_var",{name:"white_list",data:SOCIALBROWSER.var.white_list}))}SOCIALBROWSER.var.blocking=SOCIALBROWSER.var.blocking||{},SOCIALBROWSER.var.blocking.block_ads=!1,SOCIALBROWSER.var.blocking.block_empty_iframe=!1,SOCIALBROWSER.var.blocking.remove_external_iframe=!1,SOCIALBROWSER.var.blocking.skip_video_ads=!1,SOCIALBROWSER.var.blocking.popup=SOCIALBROWSER.var.blocking.popup||{},SOCIALBROWSER.var.blocking.popup.allow_external=!0,SOCIALBROWSER.var.blocking.popup.allow_internal=!0,SOCIALBROWSER.var.blocking.javascript=SOCIALBROWSER.var.blocking.javascript||{},SOCIALBROWSER.var.blocking.javascript.block_window_open=!1,SOCIALBROWSER.var.blocking.javascript.block_eval=!1,SOCIALBROWSER.var.blocking.javascript.block_console_output=!1}let f={render:function(e,n){let r=t.querySelector(e);return r?Mustache.render(r.innerHTML,n):""},html:function(e,t){return Mustache.render(e,t)},getUniqueObjects:function(e,t){const n=e.map(e=>e[t]).map((e,t,n)=>n.indexOf(e)===t&&t).filter(t=>e[t]).map(t=>e[t]);return n},$:function(e){let n=t.querySelectorAll(e);return n}},p=999999;f.showModal=function(t){r(t).click(()=>{r("popup").hide()}),p++;let n=f.$(t);if(0===n.length)return;n[0].style.zIndex=p,n[0].style.display="block";let o=n[0].getAttribute("fixed");""!==o&&n[0].addEventListener("click",function(){f.hideModal(t)});let a=f.$(t+" i-control input");a.length>0&&a[0].focus(),f.$(t+" .close").forEach(e=>{e.addEventListener("click",function(){f.hideModal(t)})}),f.$(t+" .modal-header").forEach(t=>{t.addEventListener("click",function(t){t=t||e.event,t.stopPropagation()})}),f.$(t+" .modal-body").forEach(t=>{t.addEventListener("click",function(t){t=t||e.event,t.stopPropagation()})}),f.$(t+" .modal-footer").forEach(t=>{t.addEventListener("click",function(t){t=t||e.event,t.stopPropagation()})})},f.hideModal=function(e){r("popup").hide();let t=f.$(e);t.length>0&&(t[0].style.display="none")},f.eventList=[],f.on=function(e,t){t=t||function(){},f.eventList.push({name:e,callback:t})},f.call=function(e,t){for(var n=0;n<f.eventList.length;n++){var r=f.eventList[n];r.name==e&&r.callback(t)}},f.translate=function(e,t){"string"==typeof e&&(e={text:e,lang:"ar"}),e.url=`https://translate.googleapis.com/translate_a/single?client=gtx&sl=auto&tl=${e.lang}&dt=t&dt=bd&dj=1&q=${e.text}`,f.getData(e,t)},f.getData=function(e,t,n){t=t||function(){},n=n||function(){},"string"==typeof e&&(e={url:e}),e.headers=e.headers||{Accept:"application/json","Content-Type":"application/json"},e.url=f.handle_url(e.url),fetch(e.url,{mode:"cors",method:"get",headers:e.headers}).then(e=>e.json()).then(e=>{t(e)}).catch(e=>{n(e)})},f.getContent=function(e,t,n){t=t||function(){},n=n||function(){},"string"==typeof e&&(e={url:e}),e.url=f.handle_url(e.url),fetch(e.url,{mode:"cors",method:"get"}).then(function(e){return e.text()}).then(function(e){t(e)})},f.handle_url=function(t){if("string"!=typeof t)return t;if(t=t.trim(),t.like("http*")||0===t.indexOf("//")||0===t.indexOf("data:"))t=t;else if(0===t.indexOf("/"))t=e.location.origin+t;else if(t.split("?")[0].split(".").length<3){let n=e.location.pathname.split("/").pop();t=e.location.origin+e.location.pathname.replace(n,"")+t}return t},f.postData=function(n,r,o){r=r||function(){},o=o||function(){},"string"==typeof n&&(n={url:n}),n.data=n.data||n.body,delete n.body,n.data&&"object"==typeof n.data&&(n.data=JSON.stringify(n.data)),n.headers=n.headers||{Accept:"application/json","Content-Type":"application/json"},n.data&&"string"==typeof n.data&&(n.headers["Content-Length"]=n.data.length.toString());try{n.headers.Cookie=t.cookie}catch(o){console.log(o)}n.method="post",n.redirect="follow",n.mode="cors",n.url=f.handle_url(n.url),e.SOCIALBROWSER&&e.SOCIALBROWSER.fetchJson?(console.log(" ( SOCIALBROWSER.fetchJson ) ",n),SOCIALBROWSER.fetchJson(n,e=>{r(e),console.log(" ( SOCIALBROWSER.fetchJson callback ) ",e)})):fetch(n.url,{mode:n.mode,method:n.method,headers:n.headers,body:n.data,redirect:n.redirect}).then(e=>e.json()).then(e=>{r(e)}).catch(e=>{o(e)})},f.typeOf=function(e){return Object.prototype.toString.call(e).slice(8,-1)},f.toDateTime=function(e){return e?new Date(e):new Date},f.toDateX=function(e){let t=f.toDateTime(e);return t.getFullYear()+"-"+(t.getMonth()+1)+"-"+t.getDate()},f.toDateXT=function(e){let t=f.toDateTime(e);return t.getHours()+":"+t.getMinutes()+":"+t.getSeconds()},f.toDateXF=function(e){let t=f.toDateTime(e);return t.getFullYear()+"-"+(t.getMonth()+1)+"-"+t.getDate()+" "+t.getHours()+":"+t.getMinutes()+":"+t.getSeconds()},f.toDateOnly=function(e){let t=f.toDateTime(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0)},f.toDateT=function(e){return f.toDateOnly(e).getTime()},f.toDateF=function(e){return f.toDateTime(e).getTime()},f.addZero=function(e,t){let n=t-e.toString().length;for(let t=0;t<n;t++)e="0"+e.toString();return e},f.addSubZero=function(e,t){let n=t;if(2==e.toString().split(".").length){e.toString().split(".")[1].length;e=e.toString()}else e=e.toString()+".";for(let t=0;t<n;t++)e=e.toString()+0;return e},f.fixed=2,f.to_number=f.toNumber=function(e,t){let n=t||f.fixed,r=0;return e&&(r=parseFloat(e).toFixed(n)),parseFloat(r)},f.to_float=f.toFloat=function(e){return e?parseFloat(e):0},f.to_int=f.toInt=function(e){return e?parseInt(e):0},f.$base64Letter="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",f.$base64Numbers=[];for(let e=11;e<99;e++)e%10!=0&&e%11!=0&&f.$base64Numbers.push(e);f.toJson=(e=>typeof e===n||null===e?"":JSON.stringify(e)),f.fromJson=(e=>"string"!=typeof e?e:JSON.parse(e)),f.toBase64=(e=>typeof e===n||null===e||""===e?"":("string"!=typeof e&&(e=f.toJson(e)),btoa(unescape(encodeURIComponent(e))))),f.fromBase64=(e=>typeof e===n||null===e||""===e?"":decodeURIComponent(o(atob(e)))),f.to123=(e=>{e=f.toBase64(e);let t="";for(let n=0;n<e.length;n++){let r=e[n];t+=f.$base64Numbers[f.$base64Letter.indexOf(r)]}return t}),f.from123=(e=>{let t="";for(let n=0;n<e.length;n++){let r=e[n]+e[n+1],o=f.$base64Numbers.indexOf(parseInt(r));t+=f.$base64Letter[o],n++}return t=f.fromBase64(t),t}),f.typeOf=f.typeof=function(e){return Object.prototype.toString.call(e).slice(8,-1)},f.showTabContent=function(e,n){let r=t.querySelectorAll(".tab-content");for(i=0;i<r.length;i++)r[i].style.display="none";let o=t.querySelectorAll(".tab-link");for(i=0;i<o.length;i++)o[i].className=o[i].className.replace(" active","");t.querySelectorAll(n+".tab-content").forEach(e=>{e.style.display="inline-block"}),e&&(e.currentTarget.className+=" active")},f.showTabs=function(e,t){e&&e.stopPropagation(),r(".main-menu .tabs").hide(),r(t).show(100)},f.toHtmlTable=function(e){if(e===n||null===e)return"";if("Object"==f.typeOf(e)){let t='<table class="table">';for(let n=0;n<Object.getOwnPropertyNames(e).length;n++){let r=Object.getOwnPropertyNames(e)[n];t+="<tr>",t+=`<td><p> ${r} </p></td>`,"Object"==f.typeOf(e[r])||"Array"==f.typeOf(e[r])?t+=`<td><p> ${f.toHtmlTable(e[r])} </p></td>`:t+=`<td><p> ${e[r]} </p></td>`,t+="</tr>"}return t+="</table>",t}if("Array"==f.typeOf(e)){let t='<table class="table">';for(let n=0;n<e.length;n++)"Object"==f.typeOf(e[n])||"Array"==f.typeOf(e[n])?t+=`<tr><td><p>${f.toHtmlTable(e[n])}</p></td></tr>`:t+=`<tr><td><p>${e[n]}</p></td></tr>`;return t+="</table>",t}return""},f.vControles=[],f.validated=function(e){const n={ok:!0,messages:[]};f.vControles.forEach(e=>{e.el.style.border=e.border}),f.vControles=[],e=e||"body";const r=t.querySelectorAll(e+" [v]");return r.forEach(e=>{const t=e.style.border,r=e.getAttribute("v"),o=r.split(" ");o.forEach(r=>{if(r=r.toLowerCase().trim(),"r"===r)"INPUT"!==e.nodeName&&"SELECT"!==e.nodeName||e.value&&!e.value.like("*undefined*")||(f.vControles.push({el:e,border:t}),e.style.border="2px solid #ff1100",n.ok=!1,n.messages.push({en:"Data Is Required",ar:"هذا البيان مطلوب"}));else if(r.like("ml*")){const o=parseInt(r.replace("ml",""));"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName||e.value&&!(e.value.length>o)||(f.vControles.push({el:e,border:t}),e.style.border="2px solid #ff1100",n.ok=!1,n.messages.push({en:"Letter Count Must be <= "+o,ar:"عدد الاحرف يجب ان يكون أقل من أو يساوى "+o}))}else if(r.like("ll*")){const o=parseInt(r.replace("ll",""));"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName||e.value&&!(e.value.length<o)||(f.vControles.push({el:e,border:t}),e.style.border="2px solid #ff1100",n.ok=!1,n.messages.push({en:"Letter Count Must be >= "+o,ar:"عدد الاحرف يجب ان يكون اكبر من أو يساوى "+o}))}else if(r.like("l*")){const o=parseInt(r.replace("l",""));"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName||e.value&&e.value.length===o||(f.vControles.push({el:e,border:t}),e.style.border="2px solid #ff1100",n.ok=!1,n.messages.push({en:"Letter Count Must be = "+o,ar:"عدد الاحرف يجب ان يساوى "+o}))}})}),n};let d=[{n:1,i0:{ar:"واحد"},i1:{ar:"عشرة"},i2:{ar:"مائة"},i3:{ar:"الف"},i4:{ar:"عشرة الاف"}},{n:2,i0:{ar:"اثنان "},i1:{ar:"عشرون"},i2:{ar:"مائتان"},i3:{ar:"الفان"},i4:{ar:"عشرون الف"}},{n:3,i0:{ar:"ثلاثة"},i1:{ar:"ثلاثون"},i2:{ar:"ثلاثمائة"},i3:{ar:"ثلاث الاف"},i4:{ar:"ثلاثون الف"}},{n:4,i0:{ar:"اربعة"},i1:{ar:"اربعون"},i2:{ar:"اربعة مائة"},i3:{ar:"اربعة الاف"},i4:{ar:"اربعون الف"}},{n:5,i0:{ar:"خمسة"},i1:{ar:"خمسون"},i2:{ar:"خمسمائة"},i3:{ar:"خمسة الاف"},i4:{ar:"خمسون الف"}},{n:6,i0:{ar:"ستة"},i1:{ar:"ستون"},i2:{ar:"ستة مائة"},i3:{ar:"ستة الااف"},i4:{ar:"ستون الف"}},{n:7,i0:{ar:"سبعة"},i1:{ar:"سبعون"},i2:{ar:"سبعمائة"},i3:{ar:"سبعة الااف"},i4:{ar:"سبعون الف"}},{n:8,i0:{ar:"ثمانية"},i1:{ar:"ثمانون"},i2:{ar:"ثمانمائة"},i3:{ar:"ثمان الااف"},i4:{ar:"ثمانون الف"}},{n:9,i0:{ar:"تسعة"},i1:{ar:"تسعون"},i2:{ar:"تسعمائة"},i3:{ar:"تسعة الااف"},i4:{ar:"تسعون الف"}},{n:11,i0:{ar:"احدى عشر"}},{n:12,i0:{ar:"اثنى عشر"}}];f.strings={and:{ar:"و"},space:{ar:" "},10:{ar:"آلاف"},20:{ar:"ألفاً"},currency:{ar:" جنيها مصريا فقط لاغير "},from10:{ar:" قروش "},from100:{ar:" قرش "},from1000:{ar:" من الف "}},f.stringfiy=function(e,t){e=e||"",t=t||"ar",e=e.toString().split(".");let n=e[0],r=e[1],o="";if(1==n.length)o=a(n,t);else if(2==n.length)o=l(n,t);else if(3==n.length)o=s(n,t);else if(4==n.length)o=c(n,t);else if(5==n.length)o=u(n,t);else if(6==n.length){o=l(n.substring(0,2),t)+f.strings.space[t],1==n[0]?o+=f.strings[10][t]+f.strings.space[t]:o+=f.strings[20][t]+f.strings.space[t];let e=s(n.substring(2),t);e&&(o+=f.strings.and[t]+e)}let i="";return r&&(1==r.length&&(r+="0"),1==r.length?i=a(r,t)+f.strings.from10[t]:2==r.length?i=l(r,t)+f.strings.from100[t]:3==r.length&&(i=s(r,t)+f.strings.from1000[t])),o+=f.strings.currency[t],i&&(o+=f.strings.space[t]+f.strings.and[t]+f.strings.space[t]+i),o},f.ws=function(t,n){if("WebSocket"in e){"string"==typeof t&&(t={url:t});var r=new WebSocket(t.url);let e={ws:r,options:t,closed:!0,onError:e=>{console.log("server.onError Not Implement ... ")},onClose:function(e){e.wasClean?console.log(`[ws closed] Connection closed cleanly, code=${e.code} reason=${e.reason}`):(console.warn("[ws closed] Connection died"),setTimeout(()=>{f.ws(t,n)},5e3))},onOpen:()=>{console.log("server.onOpen Not Implement ... ")},onMessage:()=>{console.log("server.onMessage Not Implement ... ")},onData:()=>{console.log("server.onData Not Implement ... ")},send:function(e){if(this.closed)return!1;"object"!=typeof e&&(e={type:"text",content:e}),this.ws.send(JSON.stringify(e))}};r.onerror=function(t){e.onError(t)},r.onclose=function(t){e.closed=!0,e.onClose(t)},r.onopen=function(){e.closed=!1,e.onOpen()},r.onmessage=function(t){t instanceof Blob?e.onData(t):e.onMessage(JSON.parse(t.data))},n(e)}else console.error("WebSocket Not Supported")},f.barcode=function(e){if(e&&e.selector&&e.text)return JsBarcode(e.selector,e.selector);console.error("qrcode need {selector , text}")},f.qrcode=function(e){if(!e||!e.selector||!e.text)return void console.error("qrcode need {selector , text}");let n="string"==typeof e.selector?t.querySelector(e.selector):e.selector;return n?(n.innerHTML="",192<=e.text.length<=217&&(e.text=e.text.padEnd(220)),new QRCode(n,{text:e.text,width:e.width||256,height:e.height||256,colorDark:e.colorDark||"#272727",colorLight:e.colorLight||"#ffffff",correctLevel:e.correctLevel||QRCode.CorrectLevel.L})):void 0},e.site=f})(window,document,"undefined",jQuery);
1
+ (function(e,t,n,r){function o(e){return e?("string"!=typeof e&&(e=e.toString()),e.replace(/[\/\\^$*+?.()\[\]{}]/g,"\\$&")):""}function a(e,t){let n="";return d.forEach(r=>{r.n==e&&(n=r.i0[t])}),n}function l(e,t){let n="";return 11==e?d.forEach(r=>{r.n==e&&(n=r.i0[t])}):12==e?d.forEach(r=>{r.n==e&&(n=r.i0[t])}):(d.forEach(r=>{r.n==e[1]&&(n=r.i0[t])}),d.forEach(r=>{r.n==e[0]&&(e[1]>0&&e[0]>1?n+=f.strings.space[t]+f.strings.and[t]:n+="",n+=r.i1[t])})),n}function s(e,t){let n="";d.forEach(r=>{r.n==e[0]&&(n=r.i2[t]+f.strings.space[t])});let r=l(e.substring(1),t);return r&&(n&&(n+=f.strings.and[t]),n+=r),n}function c(e,t){let n="";d.forEach(r=>{r.n==e[0]&&(n=r.i3[t]+f.strings.space[t])});let r=s(e.substring(1),t);return r&&(n&&(n+=f.strings.and[t]),n+=r),n}function u(e,t){let n=l(e.substring(0,2),t)+f.strings.space[t];1==e[0]?n+=f.strings[10][t]+f.strings.space[t]:n+=f.strings[20][t]+f.strings.space[t];let r=s(e.substring(2),t);return r&&(n+=f.strings.and[t]+r),n}if(String.prototype.test||(String.prototype.test=function(e,t="gium"){try{return new RegExp(e,t).test(this)}catch(e){return!1}}),String.prototype.like||(String.prototype.like=function(e){if(!e)return!1;let t=!1;return e.split("|").forEach(e=>{e=e.split("*"),e.forEach((t,n)=>{e[n]=o(t)}),e=e.join(".*"),this.test("^"+e+"$","gium")&&(t=!0)}),t}),String.prototype.contains||(String.prototype.contains=function(e){let t=!1;return e?(e.split("|").forEach(e=>{e&&this.test("^.*"+o(e)+".*$","gium")&&(t=!0)}),t):t}),"object"==typeof SOCIALBROWSER){if(SOCIALBROWSER.var=SOCIALBROWSER.var||{},SOCIALBROWSER.var.white_list=SOCIALBROWSER.var.white_list||[],t.location.hostname){let e=`*${t.location.hostname}*`,n=!1;SOCIALBROWSER.var.white_list.forEach(t=>{t.url==e&&(n=!0)}),n||(SOCIALBROWSER.var.white_list.push({url:e}),SOCIALBROWSER.call("set_var",{name:"white_list",data:SOCIALBROWSER.var.white_list}))}SOCIALBROWSER.var.blocking=SOCIALBROWSER.var.blocking||{},SOCIALBROWSER.var.blocking.block_ads=!1,SOCIALBROWSER.var.blocking.block_empty_iframe=!1,SOCIALBROWSER.var.blocking.remove_external_iframe=!1,SOCIALBROWSER.var.blocking.skip_video_ads=!1,SOCIALBROWSER.var.blocking.popup=SOCIALBROWSER.var.blocking.popup||{},SOCIALBROWSER.var.blocking.popup.allow_external=!0,SOCIALBROWSER.var.blocking.popup.allow_internal=!0,SOCIALBROWSER.var.blocking.javascript=SOCIALBROWSER.var.blocking.javascript||{},SOCIALBROWSER.var.blocking.javascript.block_window_open=!1,SOCIALBROWSER.var.blocking.javascript.block_eval=!1,SOCIALBROWSER.var.blocking.javascript.block_console_output=!1}let f={render:function(e,n){let r=t.querySelector(e);return r?Mustache.render(r.innerHTML,n):""},html:function(e,t){return Mustache.render(e,t)},getUniqueObjects:function(e,t){const n=e.map(e=>e[t]).map((e,t,n)=>n.indexOf(e)===t&&t).filter(t=>e[t]).map(t=>e[t]);return n},$:function(e){let n=t.querySelectorAll(e);return n}},p=999999;f.showModal=function(t){r(t).click(()=>{r("popup").hide()}),p++;let n=f.$(t);if(0===n.length)return;n[0].style.zIndex=p,n[0].style.display="block";let o=n[0].getAttribute("fixed");""!==o&&n[0].addEventListener("click",function(){f.hideModal(t)});let a=f.$(t+" i-control input");a.length>0&&a[0].focus(),f.$(t+" .close").forEach(e=>{e.addEventListener("click",function(){f.hideModal(t)})}),f.$(t+" .modal-header").forEach(t=>{t.addEventListener("click",function(t){t=t||e.event,t.stopPropagation()})}),f.$(t+" .modal-body").forEach(t=>{t.addEventListener("click",function(t){t=t||e.event,t.stopPropagation()})}),f.$(t+" .modal-footer").forEach(t=>{t.addEventListener("click",function(t){t=t||e.event,t.stopPropagation()})})},f.hideModal=function(e){r("popup").hide();let t=f.$(e);t.length>0&&(t[0].style.display="none")},f.eventList=[],f.on=function(e,t){t=t||function(){},f.eventList.push({name:e,callback:t})},f.call=function(e,t){for(var n=0;n<f.eventList.length;n++){var r=f.eventList[n];r.name==e&&r.callback(t)}},f.translate=function(e,t){"string"==typeof e&&(e={text:e,lang:"ar"}),e.url=`https://translate.googleapis.com/translate_a/single?client=gtx&sl=auto&tl=${e.lang}&dt=t&dt=bd&dj=1&q=${e.text}`,f.getData(e,t)},f.getData=function(e,t,n){t=t||function(){},n=n||function(){},"string"==typeof e&&(e={url:e}),e.headers=e.headers||{Accept:"application/json","Content-Type":"application/json"},e.url=f.handle_url(e.url),fetch(e.url,{mode:"cors",method:"get",headers:e.headers}).then(e=>e.json()).then(e=>{t(e)}).catch(e=>{n(e)})},f.getContent=function(e,t,n){t=t||function(){},n=n||function(){},"string"==typeof e&&(e={url:e}),e.url=f.handle_url(e.url),fetch(e.url,{mode:"cors",method:"get"}).then(function(e){return e.text()}).then(function(e){t(e)})},f.handle_url=function(t){if("string"!=typeof t)return t;if(t=t.trim(),t.like("http*")||0===t.indexOf("//")||0===t.indexOf("data:"))t=t;else if(0===t.indexOf("/"))t=e.location.origin+t;else if(t.split("?")[0].split(".").length<3){let n=e.location.pathname.split("/").pop();t=e.location.origin+e.location.pathname.replace(n,"")+t}return t},f.postData=function(n,r,o){r=r||function(){},o=o||function(){},"string"==typeof n&&(n={url:n}),n.data=n.data||n.body,delete n.body,n.data&&"object"==typeof n.data&&(n.data=JSON.stringify(n.data)),n.headers=n.headers||{Accept:"application/json","Content-Type":"application/json"},n.data&&"string"==typeof n.data&&(n.headers["Content-Length"]=n.data.length.toString());try{n.headers.Cookie=t.cookie}catch(o){console.log(o)}n.method="post",n.redirect="follow",n.mode="cors",n.url=f.handle_url(n.url),e.SOCIALBROWSER&&e.SOCIALBROWSER.fetchJson?(console.log(" ( SOCIALBROWSER.fetchJson ) ",n),SOCIALBROWSER.fetchJson(n,e=>{r(e),console.log(" ( SOCIALBROWSER.fetchJson callback ) ",e)})):fetch(n.url,{mode:n.mode,method:n.method,headers:n.headers,body:n.data,redirect:n.redirect}).then(e=>e.json()).then(e=>{r(e)}).catch(e=>{o(e)})},f.typeOf=function(e){return Object.prototype.toString.call(e).slice(8,-1)},f.toDateTime=function(e){return e?new Date(e):new Date},f.toDateX=function(e){let t=f.toDateTime(e);return t.getFullYear()+"-"+(t.getMonth()+1)+"-"+t.getDate()},f.toDateXT=function(e){let t=f.toDateTime(e);return t.getHours()+":"+t.getMinutes()+":"+t.getSeconds()},f.toDateXF=function(e){let t=f.toDateTime(e);return t.getFullYear()+"-"+(t.getMonth()+1)+"-"+t.getDate()+" "+t.getHours()+":"+t.getMinutes()+":"+t.getSeconds()},f.toDateOnly=function(e){let t=f.toDateTime(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0)},f.toDateT=function(e){return f.toDateOnly(e).getTime()},f.toDateF=function(e){return f.toDateTime(e).getTime()},f.addZero=function(e,t){let n=t-e.toString().length;for(let t=0;t<n;t++)e="0"+e.toString();return e},f.addSubZero=function(e,t){let n=t;if(2==e.toString().split(".").length){e.toString().split(".")[1].length;e=e.toString()}else e=e.toString()+".";for(let t=0;t<n;t++)e=e.toString()+0;return e},f.fixed=2,f.to_number=f.toNumber=function(e,t){let n=t||f.fixed,r=0;return e&&(r=parseFloat(e).toFixed(n)),parseFloat(r)},f.to_money=f.toMoney=function(e,t){let n=0;if(e){e=e.toFixed(2).split(".");e[0];let t=e[1];if(t){let n=t[0],r=t[1];r&&parseInt(r)>5?(n=parseInt(n)+1,n*=10,100==n?(n=0,e[0]=parseInt(e[0])+1,e[1]=""):e[1]=n):r&&5==parseInt(r)?e[1]=t:r&&parseInt(r)>2?(r=5,e[1]=n+r):e[1]=n}n=e.join(".")}return parseFloat(n)},f.to_float=f.toFloat=function(e){return e?parseFloat(e):0},f.to_int=f.toInt=function(e){return e?parseInt(e):0},f.$base64Letter="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",f.$base64Numbers=[];for(let e=11;e<99;e++)e%10!=0&&e%11!=0&&f.$base64Numbers.push(e);f.toJson=(e=>typeof e===n||null===e?"":JSON.stringify(e)),f.fromJson=(e=>"string"!=typeof e?e:JSON.parse(e)),f.toBase64=(e=>typeof e===n||null===e||""===e?"":("string"!=typeof e&&(e=f.toJson(e)),btoa(unescape(encodeURIComponent(e))))),f.fromBase64=(e=>typeof e===n||null===e||""===e?"":decodeURIComponent(o(atob(e)))),f.to123=(e=>{e=f.toBase64(e);let t="";for(let n=0;n<e.length;n++){let r=e[n];t+=f.$base64Numbers[f.$base64Letter.indexOf(r)]}return t}),f.from123=(e=>{let t="";for(let n=0;n<e.length;n++){let r=e[n]+e[n+1],o=f.$base64Numbers.indexOf(parseInt(r));t+=f.$base64Letter[o],n++}return t=f.fromBase64(t),t}),f.typeOf=f.typeof=function(e){return Object.prototype.toString.call(e).slice(8,-1)},f.showTabContent=function(e,n){let r=t.querySelectorAll(".tab-content");for(i=0;i<r.length;i++)r[i].style.display="none";let o=t.querySelectorAll(".tab-link");for(i=0;i<o.length;i++)o[i].className=o[i].className.replace(" active","");t.querySelectorAll(n+".tab-content").forEach(e=>{e.style.display="inline-block"}),e&&(e.currentTarget.className+=" active")},f.showTabs=function(e,t){e&&e.stopPropagation(),r(".main-menu .tabs").hide(),r(t).show(100)},f.toHtmlTable=function(e){if(e===n||null===e)return"";if("Object"==f.typeOf(e)){let t='<table class="table">';for(let n=0;n<Object.getOwnPropertyNames(e).length;n++){let r=Object.getOwnPropertyNames(e)[n];t+="<tr>",t+=`<td><p> ${r} </p></td>`,"Object"==f.typeOf(e[r])||"Array"==f.typeOf(e[r])?t+=`<td><p> ${f.toHtmlTable(e[r])} </p></td>`:t+=`<td><p> ${e[r]} </p></td>`,t+="</tr>"}return t+="</table>",t}if("Array"==f.typeOf(e)){let t='<table class="table">';for(let n=0;n<e.length;n++)"Object"==f.typeOf(e[n])||"Array"==f.typeOf(e[n])?t+=`<tr><td><p>${f.toHtmlTable(e[n])}</p></td></tr>`:t+=`<tr><td><p>${e[n]}</p></td></tr>`;return t+="</table>",t}return""},f.vControles=[],f.validated=function(e){const n={ok:!0,messages:[]};f.vControles.forEach(e=>{e.el.style.border=e.border}),f.vControles=[],e=e||"body";const r=t.querySelectorAll(e+" [v]");return r.forEach(e=>{const t=e.style.border,r=e.getAttribute("v"),o=r.split(" ");o.forEach(r=>{if(r=r.toLowerCase().trim(),"r"===r)"INPUT"!==e.nodeName&&"SELECT"!==e.nodeName||e.value&&!e.value.like("*undefined*")||(f.vControles.push({el:e,border:t}),e.style.border="2px solid #ff1100",n.ok=!1,n.messages.push({en:"Data Is Required",ar:"هذا البيان مطلوب"}));else if(r.like("ml*")){const o=parseInt(r.replace("ml",""));"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName||e.value&&!(e.value.length>o)||(f.vControles.push({el:e,border:t}),e.style.border="2px solid #ff1100",n.ok=!1,n.messages.push({en:"Letter Count Must be <= "+o,ar:"عدد الاحرف يجب ان يكون أقل من أو يساوى "+o}))}else if(r.like("ll*")){const o=parseInt(r.replace("ll",""));"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName||e.value&&!(e.value.length<o)||(f.vControles.push({el:e,border:t}),e.style.border="2px solid #ff1100",n.ok=!1,n.messages.push({en:"Letter Count Must be >= "+o,ar:"عدد الاحرف يجب ان يكون اكبر من أو يساوى "+o}))}else if(r.like("l*")){const o=parseInt(r.replace("l",""));"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName||e.value&&e.value.length===o||(f.vControles.push({el:e,border:t}),e.style.border="2px solid #ff1100",n.ok=!1,n.messages.push({en:"Letter Count Must be = "+o,ar:"عدد الاحرف يجب ان يساوى "+o}))}})}),n};let d=[{n:1,i0:{ar:"واحد"},i1:{ar:"عشرة"},i2:{ar:"مائة"},i3:{ar:"الف"},i4:{ar:"عشرة الاف"}},{n:2,i0:{ar:"اثنان "},i1:{ar:"عشرون"},i2:{ar:"مائتان"},i3:{ar:"الفان"},i4:{ar:"عشرون الف"}},{n:3,i0:{ar:"ثلاثة"},i1:{ar:"ثلاثون"},i2:{ar:"ثلاثمائة"},i3:{ar:"ثلاث الاف"},i4:{ar:"ثلاثون الف"}},{n:4,i0:{ar:"اربعة"},i1:{ar:"اربعون"},i2:{ar:"اربعة مائة"},i3:{ar:"اربعة الاف"},i4:{ar:"اربعون الف"}},{n:5,i0:{ar:"خمسة"},i1:{ar:"خمسون"},i2:{ar:"خمسمائة"},i3:{ar:"خمسة الاف"},i4:{ar:"خمسون الف"}},{n:6,i0:{ar:"ستة"},i1:{ar:"ستون"},i2:{ar:"ستة مائة"},i3:{ar:"ستة الااف"},i4:{ar:"ستون الف"}},{n:7,i0:{ar:"سبعة"},i1:{ar:"سبعون"},i2:{ar:"سبعمائة"},i3:{ar:"سبعة الااف"},i4:{ar:"سبعون الف"}},{n:8,i0:{ar:"ثمانية"},i1:{ar:"ثمانون"},i2:{ar:"ثمانمائة"},i3:{ar:"ثمان الااف"},i4:{ar:"ثمانون الف"}},{n:9,i0:{ar:"تسعة"},i1:{ar:"تسعون"},i2:{ar:"تسعمائة"},i3:{ar:"تسعة الااف"},i4:{ar:"تسعون الف"}},{n:11,i0:{ar:"احدى عشر"}},{n:12,i0:{ar:"اثنى عشر"}}];f.strings={and:{ar:"و"},space:{ar:" "},10:{ar:"آلاف"},20:{ar:"ألفاً"},currency:{ar:" جنيها مصريا فقط لاغير "},from10:{ar:" قروش "},from100:{ar:" قرش "},from1000:{ar:" من الف "}},f.stringfiy=function(e,t){e=e||"",t=t||"ar",e=e.toString().split(".");let n=e[0],r=e[1],o="";if(1==n.length)o=a(n,t);else if(2==n.length)o=l(n,t);else if(3==n.length)o=s(n,t);else if(4==n.length)o=c(n,t);else if(5==n.length)o=u(n,t);else if(6==n.length){o=l(n.substring(0,2),t)+f.strings.space[t],1==n[0]?o+=f.strings[10][t]+f.strings.space[t]:o+=f.strings[20][t]+f.strings.space[t];let e=s(n.substring(2),t);e&&(o+=f.strings.and[t]+e)}let i="";return r&&(1==r.length&&(r+="0"),1==r.length?i=a(r,t)+f.strings.from10[t]:2==r.length?i=l(r,t)+f.strings.from100[t]:3==r.length&&(i=s(r,t)+f.strings.from1000[t])),o+=f.strings.currency[t],i&&(o+=f.strings.space[t]+f.strings.and[t]+f.strings.space[t]+i),o},f.ws=function(t,n){if("WebSocket"in e){"string"==typeof t&&(t={url:t});var r=new WebSocket(t.url);let e={ws:r,options:t,closed:!0,onError:e=>{console.log("server.onError Not Implement ... ")},onClose:function(e){e.wasClean?console.log(`[ws closed] Connection closed cleanly, code=${e.code} reason=${e.reason}`):(console.warn("[ws closed] Connection died"),setTimeout(()=>{f.ws(t,n)},5e3))},onOpen:()=>{console.log("server.onOpen Not Implement ... ")},onMessage:()=>{console.log("server.onMessage Not Implement ... ")},onData:()=>{console.log("server.onData Not Implement ... ")},send:function(e){if(this.closed)return!1;"object"!=typeof e&&(e={type:"text",content:e}),this.ws.send(JSON.stringify(e))}};r.onerror=function(t){e.onError(t)},r.onclose=function(t){e.closed=!0,e.onClose(t)},r.onopen=function(){e.closed=!1,e.onOpen()},r.onmessage=function(t){t instanceof Blob?e.onData(t):e.onMessage(JSON.parse(t.data))},n(e)}else console.error("WebSocket Not Supported")},f.barcode=function(e){if(e&&e.selector&&e.text)return JsBarcode(e.selector,e.selector);console.error("qrcode need {selector , text}")},f.qrcode=function(e){if(!e||!e.selector||!e.text)return void console.error("qrcode need {selector , text}");let n="string"==typeof e.selector?t.querySelector(e.selector):e.selector;return n?(n.innerHTML="",192<=e.text.length<=217&&(e.text=e.text.padEnd(220)),new QRCode(n,{text:e.text,width:e.width||256,height:e.height||256,colorDark:e.colorDark||"#000000",colorLight:e.colorLight||"#ffffff",correctLevel:e.correctLevel||QRCode.CorrectLevel.L})):void 0},e.site=f})(window,document,"undefined",jQuery);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isite",
3
- "version": "2021.12.06",
3
+ "version": "2021.12.07",
4
4
  "description": "Create Enterprise Multi-Language Web Site [Fast and Easy] ",
5
5
  "main": "index.js",
6
6
  "repository": {