isite 2022.9.25 → 2023.1.2
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.
- package/README.md +2 -2
- package/apps/client-side/site_files/css/images.css +52 -13
- package/apps/client-side/site_files/css/modal.css +1 -1
- package/apps/client-side/site_files/css/table.css +1 -1
- package/apps/client-side/site_files/css/tabs.css +3 -3
- package/apps/client-side/site_files/fonts/helvetica.ttf +0 -0
- package/apps/client-side/site_files/html/directive/i-list.html +1 -1
- package/apps/client-side/site_files/html/require_payments.html +1 -1
- package/apps/client-side/site_files/js/bootstrap-5-directive.js +20 -6
- package/apps/client-side/site_files/js/site.js +9 -8
- package/apps/client-side/site_files/js/site.min.js +1 -1
- package/index.js +14 -3
- package/lib/pdf.js +51 -0
- package/lib/words.js +1 -1
- package/object-options/lib/fn.js +6 -2
- package/object-options/lib/prototype.js +4 -4
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1375,7 +1375,7 @@ site.quee('sync event name 2', { name: 'x2' });
|
|
|
1375
1375
|
- This Framework Free for Education and Supported For Ever
|
|
1376
1376
|
- This Framework Upgraded Arround the Clock
|
|
1377
1377
|
- This Framework Development by One Developer
|
|
1378
|
-
- For Producation Contract what's up (+
|
|
1378
|
+
- For Producation Contract what's up (+966568118373)
|
|
1379
1379
|
|
|
1380
1380
|
# Contact Me
|
|
1381
1381
|
|
|
@@ -1384,4 +1384,4 @@ site.quee('sync event name 2', { name: 'x2' });
|
|
|
1384
1384
|
- Linkedin : https://www.linkedin.com/in/absunstar
|
|
1385
1385
|
- Github : https://github.com/absunstar
|
|
1386
1386
|
- Paypal : https://paypal.me/absunstar
|
|
1387
|
-
- What's up: +
|
|
1387
|
+
- What's up: +966568118373
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
border-radius: 10px;
|
|
5
5
|
}
|
|
6
6
|
.logo {
|
|
7
|
-
width: 48px;
|
|
8
|
-
height: 48px;
|
|
7
|
+
width: 48px !important;
|
|
8
|
+
height: 48px !important;
|
|
9
9
|
border-radius: 5px;
|
|
10
10
|
}
|
|
11
11
|
|
|
@@ -16,8 +16,8 @@ i-image {
|
|
|
16
16
|
border: var(--i-image-border);
|
|
17
17
|
}
|
|
18
18
|
i-image img {
|
|
19
|
-
width:
|
|
20
|
-
height:
|
|
19
|
+
width: auto;
|
|
20
|
+
min-height: 32px;
|
|
21
21
|
object-fit: fill;
|
|
22
22
|
background-size: contain;
|
|
23
23
|
background-position: center;
|
|
@@ -30,23 +30,62 @@ i-image.full img {
|
|
|
30
30
|
padding: 5px;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
i-image.img32 {
|
|
34
|
+
width: 32px !important;
|
|
35
|
+
height: 32px !important;
|
|
36
|
+
min-width: 32px !important;
|
|
37
|
+
min-height: 32px !important;
|
|
38
|
+
padding: 1px !important;
|
|
39
|
+
}
|
|
33
40
|
i-image.img32 img {
|
|
34
|
-
width:
|
|
35
|
-
height:
|
|
41
|
+
width: 30px !important;
|
|
42
|
+
height: 30px !important;
|
|
43
|
+
min-width: 30px !important;
|
|
44
|
+
min-height: 30px !important;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
i-image.img48 {
|
|
48
|
+
width: 48px !important;
|
|
49
|
+
height: 48px !important;
|
|
50
|
+
min-width: 48px !important;
|
|
51
|
+
min-height: 48px !important;
|
|
52
|
+
padding: 2px !important;
|
|
36
53
|
}
|
|
37
|
-
i-image.logo img,
|
|
38
54
|
i-image.img48 img {
|
|
39
|
-
width:
|
|
40
|
-
height:
|
|
55
|
+
width: 44px !important;
|
|
56
|
+
height: 44px !important;
|
|
57
|
+
min-width: 44px !important;
|
|
58
|
+
min-height: 44px !important;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
i-image.img64 {
|
|
62
|
+
width: 64px !important;
|
|
63
|
+
height: 64px !important;
|
|
64
|
+
min-width: 64px !important;
|
|
65
|
+
min-height: 64px !important;
|
|
66
|
+
padding: 2px !important;
|
|
41
67
|
}
|
|
42
68
|
i-image.img64 img {
|
|
43
|
-
width:
|
|
44
|
-
height:
|
|
69
|
+
width: 60px !important;
|
|
70
|
+
height: 60px !important;
|
|
71
|
+
min-width: 60px !important;
|
|
72
|
+
min-height: 60px !important;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
i-image.img128 {
|
|
76
|
+
width: 128px !important;
|
|
77
|
+
height: 128px !important;
|
|
78
|
+
min-width: 128px !important;
|
|
79
|
+
min-height: 128px !important;
|
|
80
|
+
padding: 3px !important;
|
|
45
81
|
}
|
|
46
82
|
i-image.img128 img {
|
|
47
|
-
width:
|
|
48
|
-
height:
|
|
83
|
+
width: 122px !important;
|
|
84
|
+
height: 122px !important;
|
|
85
|
+
min-width: 122px !important;
|
|
86
|
+
min-height: 122px !important;
|
|
49
87
|
}
|
|
88
|
+
|
|
50
89
|
i-image.img256 {
|
|
51
90
|
width: 256px !important;
|
|
52
91
|
height: 256px !important;
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
display: inline-block;
|
|
3
3
|
padding: 5px;
|
|
4
4
|
width: 100%;
|
|
5
|
-
transition: all 0.
|
|
5
|
+
transition: all 0.1s ease;
|
|
6
6
|
}
|
|
7
7
|
.links .tabs{
|
|
8
8
|
display: none;
|
|
9
|
-
transition: all 0.
|
|
9
|
+
transition: all 0.1s ease;
|
|
10
10
|
}
|
|
11
11
|
.links .tabs .tabs-header{
|
|
12
12
|
width: 100%;
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
outline: none;
|
|
30
30
|
cursor: pointer;
|
|
31
31
|
padding: 10px 12px;
|
|
32
|
-
transition: 0.
|
|
32
|
+
transition: 0.1s;
|
|
33
33
|
font-size: var(--tabs-header-link-font-size);
|
|
34
34
|
font-weight: var(--tabs-header-link-font-weight);
|
|
35
35
|
color: var(--tabs-header-link-color);
|
|
Binary file
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
<div class="dropdown-content">
|
|
8
8
|
<div class="padding" ng-show="showSearch">
|
|
9
|
-
<input class="full-width search form-control"
|
|
9
|
+
<input class="full-width search form-control" />
|
|
10
10
|
</div>
|
|
11
11
|
|
|
12
12
|
<div class="dropdown-item row" ng-repeat="item in items | filter:{ $display : ngSearch}" ng-click="updateModel(item)">
|
|
@@ -203,6 +203,7 @@ app.directive('iList', [
|
|
|
203
203
|
ngModel: '=',
|
|
204
204
|
ngSearch: '=',
|
|
205
205
|
ngChange: '&',
|
|
206
|
+
ngGet: '&',
|
|
206
207
|
ngAdd: '&',
|
|
207
208
|
items: '=',
|
|
208
209
|
},
|
|
@@ -228,13 +229,15 @@ app.directive('iList', [
|
|
|
228
229
|
$scope.fa_add = 'fa-plus';
|
|
229
230
|
}
|
|
230
231
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
232
|
+
|
|
233
|
+
if ($scope.ngSearch) {
|
|
234
|
+
$scope.showSearch = !0;
|
|
235
|
+
}
|
|
236
|
+
if ($scope.ngGet) {
|
|
234
237
|
$scope.showSearch = !0;
|
|
235
238
|
}
|
|
236
239
|
|
|
237
|
-
let input = $(element).find('input');
|
|
240
|
+
let input = $(element).find('input.dropdown-text');
|
|
238
241
|
$(element).hover(
|
|
239
242
|
() => {
|
|
240
243
|
$scope.popupElement.css('display', 'block');
|
|
@@ -332,6 +335,17 @@ app.directive('iList', [
|
|
|
332
335
|
}
|
|
333
336
|
});
|
|
334
337
|
|
|
338
|
+
$scope.searchElement.on('input' , ()=>{
|
|
339
|
+
$timeout(() => {
|
|
340
|
+
if ($scope.ngGet) {
|
|
341
|
+
$scope.ngGet({ $search: $scope.searchElement.val() });
|
|
342
|
+
} else if ($scope.ngSearch) {
|
|
343
|
+
$scope.ngSearch = $scope.searchElement.val();
|
|
344
|
+
}
|
|
345
|
+
}, 100);
|
|
346
|
+
})
|
|
347
|
+
|
|
348
|
+
|
|
335
349
|
$scope.updateModel = function (item) {
|
|
336
350
|
$scope.ngModel = $scope.getNgValue(item, $scope.ngValue);
|
|
337
351
|
if ($scope.display2) {
|
|
@@ -985,7 +999,7 @@ app.directive('iTreeview', [
|
|
|
985
999
|
$scope.v_nodes = [];
|
|
986
1000
|
if (nodes) {
|
|
987
1001
|
nodes.forEach((node) => {
|
|
988
|
-
node.$parent_id = node.parent_id || 0;
|
|
1002
|
+
node.$parent_id = node.parent_id || node.parentId || 0;
|
|
989
1003
|
node.v_display = node.v_display || '';
|
|
990
1004
|
node.v_display += node[attrs.display];
|
|
991
1005
|
if (node.$parent_id == 0) {
|
|
@@ -1005,7 +1019,7 @@ app.directive('iTreeview', [
|
|
|
1005
1019
|
v_node.nodes = v_node.nodes || [];
|
|
1006
1020
|
|
|
1007
1021
|
nodes.forEach((node) => {
|
|
1008
|
-
node.$parent_id = node.parent_id || 0;
|
|
1022
|
+
node.$parent_id = node.parent_id || node.parentId || 0;
|
|
1009
1023
|
if (node.$parent_id == v_node.id) {
|
|
1010
1024
|
node.v_display = node.v_display || '';
|
|
1011
1025
|
node.v_display += node[attrs.display];
|
|
@@ -585,14 +585,15 @@
|
|
|
585
585
|
};
|
|
586
586
|
|
|
587
587
|
site.showTabContent = function (e, tabContentSelector) {
|
|
588
|
-
let
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
}
|
|
588
|
+
let parent = document.querySelector(tabContentSelector).parentNode.parentNode;
|
|
589
|
+
|
|
590
|
+
parent.querySelectorAll('.tab-content').forEach((tabContent) => {
|
|
591
|
+
tabContent.style.display = 'none';
|
|
592
|
+
});
|
|
593
|
+
parent.querySelectorAll('.tab-link').forEach((tabLink) => {
|
|
594
|
+
tabLink.className = tabLink.className.replace(' active', '');
|
|
595
|
+
});
|
|
596
|
+
|
|
596
597
|
document.querySelectorAll(tabContentSelector + '.tab-content').forEach((el) => {
|
|
597
598
|
el.style.display = 'block';
|
|
598
599
|
});
|
|
@@ -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 g.forEach(r=>{r.n==e&&(n=r.i0[t])}),n}function s(e,t){let n="";return 11==e?g.forEach(r=>{r.n==e&&(n=r.i0[t])}):12==e?g.forEach(r=>{r.n==e&&(n=r.i0[t])}):(g.forEach(r=>{r.n==e[1]&&(n=r.i0[t])}),g.forEach(r=>{r.n==e[0]&&(e[1]>0&&e[0]>1?n+=p.strings.space[t]+p.strings.and[t]:n+="",n+=r.i1[t])})),n}function l(e,t){let n="";g.forEach(r=>{r.n==e[0]&&(n=r.i2[t]+p.strings.space[t])});let r=s(e.substring(1),t);return r&&(n&&(n+=p.strings.and[t]),n+=r),n}function c(e,t){let n="";g.forEach(r=>{r.n==e[0]&&(n=r.i3[t]+p.strings.space[t])});let r=l(e.substring(1),t);return r&&(n&&(n+=p.strings.and[t]),n+=r),n}function u(e,t){let n=s(e.substring(0,2),t)+p.strings.space[t];1==e[0]?n+=p.strings[10][t]+p.strings.space[t]:n+=p.strings[20][t]+p.strings.space[t];let r=l(e.substring(2),t);return r&&(n+=p.strings.and[t]+r),n}function d(e,t){let n=l(e.substring(0,3),t)+p.strings.space[t];n+=p.strings[100][t]+p.strings.space[t];let r=l(e.substring(3),t);return r&&(n+=p.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}),e.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 p={onLoad:function(e){"loading"!==t.readyState?e():t.addEventListener("DOMContentLoaded",()=>{e()})}};p.zoomNumber=parseInt(localStorage.getItem("zoomNumber")||100),p.zoom=function(e){"+"==e?p.zoomNumber+=25:"-"==e?p.zoomNumber-=25:"0"==e||(p.zoomNumber=100),localStorage.setItem("zoomNumber",p.zoomNumber.toString()),t.body.style.zoom=p.zoomNumber+"%"},p.onLoad(()=>{p.zoom("0")}),p.printerList=[],p.getPrinters=function(){return e.SOCIALBROWSER&&SOCIALBROWSER.currentWindow.webContents.getPrintersAsync?SOCIALBROWSER.currentWindow.webContents.getPrintersAsync().then(e=>{p.printerList=e}):e.SOCIALBROWSER&&SOCIALBROWSER.currentWindow.webContents.getPrinters?p.printerList=SOCIALBROWSER.currentWindow.webContents.getPrinters():fetch("http://127.0.0.1:60080/printers/all").then(e=>e.json()).then(e=>{p.printerList=e.list}).catch(e=>{p.printerList=[]}),p.printerList},p.render=function(e,n){let r=t.querySelector(e);return r?Mustache.render(r.innerHTML,n):""},p.html=function(e,t){return Mustache.render(e,t)},p.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},p.$=function(e){let n=t.querySelectorAll(e);return n},p.modal_z_index=999999,p.showModal=function(t){r(t).click(()=>{r("popup").hide()}),p.modal_z_index++;let n=p.$(t);if(0===n.length)return;n[0].style.zIndex=p.modal_z_index,n[0].style.display="block";let o=n[0].getAttribute("fixed");""!==o&&n[0].addEventListener("click",function(){p.hideModal(t)});let a=p.$(t+" i-control input");a.length>0&&a[0].focus(),p.$(t+" .close").forEach(e=>{e.addEventListener("click",function(){p.hideModal(t)})}),p.$(t+" .modal-header").forEach(t=>{t.addEventListener("click",function(t){t=t||e.event,t.stopPropagation()})}),p.$(t+" .modal-body").forEach(t=>{t.addEventListener("click",function(t){t=t||e.event,t.stopPropagation()})}),p.$(t+" .modal-footer").forEach(t=>{t.addEventListener("click",function(t){t=t||e.event,t.stopPropagation()})})},p.hideModal=function(e){r("popup").hide();let t=p.$(e);t.length>0&&(t[0].style.display="none")},p.eventList=[],p.on=function(e,t){t=t||function(){},p.eventList.push({name:e,callback:t})},p.call=function(e,t){for(var n=0;n<p.eventList.length;n++){var r=p.eventList[n];r.name==e&&r.callback(t)}},p.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}`,p.getData(e,t)},p.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=p.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)})},p.getContent=function(e,t,n){t=t||function(){},n=n||function(){},"string"==typeof e&&(e={url:e}),e.url=p.handle_url(e.url),fetch(e.url,{mode:"cors",method:"get"}).then(function(e){return e.text()}).then(function(e){t(e)})},p.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},p.postData=function(e,n,r){n=n||function(){},r=r||function(){},"string"==typeof e&&(e={url:e}),e.data=e.data||e.body,delete e.body,e.data&&"object"==typeof e.data&&(e.data=JSON.stringify(e.data)),e.headers=e.headers||{Accept:"application/json","Content-Type":"application/json"},e.data&&"string"==typeof e.data&&(e.headers["Content-Length"]=e.data.length.toString());try{e.headers.Cookie=t.cookie}catch(r){console.log(r)}e.method="post",e.redirect="follow",e.mode="cors",e.url=p.handle_url(e.url),fetch(e.url,{mode:e.mode,method:e.method,headers:e.headers,body:e.data,redirect:e.redirect}).then(e=>e.json()).then(e=>{n(e)}).catch(e=>{r(e)})},p.typeOf=function(e){return Object.prototype.toString.call(e).slice(8,-1)},p.toDateTime=function(e){return e?new Date(e):new Date},p.toDateX=function(e){let t=p.toDateTime(e);return t.getFullYear()+"-"+(t.getMonth()+1)+"-"+t.getDate()},p.toDateXT=function(e){let t=p.toDateTime(e);return t.getHours()+":"+t.getMinutes()+":"+t.getSeconds()},p.toDateXF=function(e){let t=p.toDateTime(e);return t.getFullYear()+"-"+(t.getMonth()+1)+"-"+t.getDate()+" "+t.getHours()+":"+t.getMinutes()+":"+t.getSeconds()},p.toDateOnly=function(e){let t=p.toDateTime(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0)},p.toDateT=function(e){return p.toDateOnly(e).getTime()},p.toDateF=function(e){return p.toDateTime(e).getTime()},p.addZero=function(e,t){let n=t-e.toString().length;for(let t=0;t<n;t++)e="0"+e.toString();return e},p.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},p.fixed=3,p.to_number=p.toNumber=function(e,t){let n=t||p.fixed,r=0;return e&&(r=parseFloat(e).toFixed(n)),parseFloat(r)},p.to_money=p.toMoney=function(e,t=!0){let n=0;if(e){e=e.toFixed(2).split(".");e[0];let t=e[1]||"00";if(t){let n=t[0]||"0",r=t[1]||"0";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+"0"}n=e.join(".")}return t?p.to_float(n):(n&&n.endsWith(".")&&(n+="00"),n)},p.to_float=p.toFloat=function(e){return e?parseFloat(e):0},p.to_int=p.toInt=function(e){return e?parseInt(e):0},p.$base64Letter="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",p.$base64Numbers=[];for(let e=11;e<99;e++)e%10!=0&&e%11!=0&&p.$base64Numbers.push(e);p.toJson=(e=>typeof e===n||null===e?"":JSON.stringify(e)),p.fromJson=(e=>"string"!=typeof e?e:JSON.parse(e)),p.toBase64=(e=>typeof e===n||null===e||""===e?"":("string"!=typeof e&&(e=p.toJson(e)),Base64.encode(e))),p.fromBase64=(e=>typeof e===n||null===e||""===e?"":Base64.decode(e)),p.to123=(e=>{e=p.toBase64(e);let t="";for(let n=0;n<e.length;n++){let r=e[n];t+=p.$base64Numbers[p.$base64Letter.indexOf(r)]}return t}),p.from123=(e=>{let t="";for(let n=0;n<e.length;n++){let r=e[n]+e[n+1],o=p.$base64Numbers.indexOf(parseInt(r));t+=p.$base64Letter[o],n++}return t=p.fromBase64(t),t}),p.hide=p.hideObject=function(e){return p.to123(JSON.parse(e))},p.show=p.showObject=function(e){return JSON.parse(p.from123(e))},p.typeOf=p.typeof=function(e){return Object.prototype.toString.call(e).slice(8,-1)},p.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="block"}),e&&(e.currentTarget.className+=" active")},p.showTabs=function(e,t){e&&e.stopPropagation(),r(".main-menu .tabs").hide(),r(t).show(100)},p.toHtmlTable=function(e){if(e===n||null===e)return"";if("Object"==p.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"==p.typeOf(e[r])||"Array"==p.typeOf(e[r])?t+=`<td><p> ${p.toHtmlTable(e[r])} </p></td>`:t+=`<td><p> ${e[r]} </p></td>`,t+="</tr>"}return t+="</table>",t}if("Array"==p.typeOf(e)){let t='<table class="table">';for(let n=0;n<e.length;n++)"Object"==p.typeOf(e[n])||"Array"==p.typeOf(e[n])?t+=`<tr><td><p>${p.toHtmlTable(e[n])}</p></td></tr>`:t+=`<tr><td><p>${e[n]}</p></td></tr>`;return t+="</table>",t}return""},p.resetValidated=function(e){e=e||"body";const n=t.querySelectorAll(e+" [v]");n.forEach(e=>{e.classList.remove("is-invalid"),e.classList.remove("is-valid")})},p.validated=function(e){const n={ok:!0,messages:[]};e=e||"body";const r=t.querySelectorAll(e+" [v]");return r.forEach(e=>{e.classList.remove("is-invalid"),e.classList.remove("is-valid");const t=e.getAttribute("v"),r=t.split(" ");r.forEach(t=>{if(t=t.toLowerCase().trim(),"r"===t)"INPUT"!==e.nodeName&&"SELECT"!==e.nodeName&&"TEXTAREA"!==e.nodeName||e.value&&!e.value.like("*undefined*")?"I-DATETIME"!==e.nodeName||e.getAttribute("value")?"INPUT"!==e.nodeName&&"SELECT"!==e.nodeName&&"TEXTAREA"!==e.nodeName&&"I-DATETIME"!==e.nodeName||e.classList.add("is-valid"):(e.classList.add("is-invalid"),n.ok=!1,n.messages.push({en:"Data Is Required",ar:"هذا البيان مطلوب"})):(e.classList.add("is-invalid"),(f=e.parentNode.querySelector(".invalid-feedback"))&&(p.session&&"en"==p.session.lang?f.innerHTML="Data Is Required":p.session&&"ar"==p.session.lang&&(f.innerHTML="هذا البيان مطلوب")),n.ok=!1,n.messages.push({en:"Data Is Required",ar:"هذا البيان مطلوب"}));else if(t.like("ml*")){const r=parseInt(t.replace("ml",""));"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName||e.value&&!(e.value.length>r)||(e.classList.add("is-invalid"),n.ok=!1,n.messages.push({en:"Letter Count Must be <= "+r,ar:"عدد الاحرف يجب ان يكون أقل من أو يساوى "+r}))}else if(t.like("ll*")){const r=parseInt(t.replace("ll",""));"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName||e.value&&!(e.value.length<r)||(e.classList.add("is-invalid"),n.ok=!1,n.messages.push({en:"Letter Count Must be >= "+r,ar:"عدد الاحرف يجب ان يكون اكبر من أو يساوى "+r}))}else if(t.like("l*")){const r=parseInt(t.replace("l",""));"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName||e.value&&e.value.length===r||(e.classList.add("is-invalid"),n.ok=!1,n.messages.push({en:"Letter Count Must be = "+r,ar:"عدد الاحرف يجب ان يساوى "+r}))}else t.like("e")?"INPUT"!==e.nodeName||e.value&&p.isEmail(e.value)||(e.classList.add("is-invalid"),n.ok=!1,n.messages.push({en:"Write Valid Email address",ar:"اكتب البريد الالكترونى بطريقة صحيحة"})):(t.like("web")||t.like("url"))&&("INPUT"!==e.nodeName||e.value&&p.isURL(e.value)||(e.classList.add("is-invalid"),n.ok=!1,n.messages.push({en:"Write Valid Web address",ar:"اكتب رابط الموقع بطريقة صحيحة"})))})}),n},p.isEmail=function(e){return!!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(e)},p.isURL=function(e){var t=new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i");return!!t.test(encodeURI(e))};let g=[{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:"اثنى عشر"}}];p.strings={and:{ar:"و"},space:{ar:" "},10:{ar:"آلاف"},20:{ar:"ألفاً"},100:{ar:"ألف"},currency:{ar:" جنيها مصريا فقط لاغير "},from10:{ar:" قروش "},from100:{ar:" قرش "},from1000:{ar:" من الف "}},p.stringfiy=function(e,t){e=e||"",t=t||"ar",e=e.toString().split(".");let n=e[0],r=e[1],o="";1==n.length?o=a(n,t):2==n.length?o=s(n,t):3==n.length?o=l(n,t):4==n.length?o=c(n,t):5==n.length?o=u(n,t):6==n.length&&(o=d(n,t));let i="";return r&&(1==r.length&&(r+="0"),1==r.length?i=a(r,t)+p.strings.from10[t]:2==r.length?i=s(r,t)+p.strings.from100[t]:3==r.length&&(i=l(r,t)+p.strings.from1000[t])),o+=p.strings.currency[t],i&&(o+=p.strings.space[t]+p.strings.and[t]+p.strings.space[t]+i),o},p.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(()=>{p.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")},p.hex=function(e){if("string"==typeof e){const t=new TextEncoder;return Array.from(t.encode(e)).map(e=>e.toString(16).padStart(2,"0")).join("")}if("number"==typeof e){let t=e.toString(16);return 1==t.length&&(t="0"+t),t}},p.zakat=function(e){let t="";return e.name&&(t+="01"+p.hex(e.name.length)+p.hex(e.name)),e.vat_number&&(t+="02"+p.hex(e.vat_number.length)+p.hex(e.vat_number)),e.time&&(t+="03"+p.hex(e.time.length)+p.hex(e.time)),e.total&&(t+="04"+p.hex(e.total.length)+p.hex(e.total)),e.vat_total&&(t+="05"+p.hex(e.vat_total.length)+p.hex(e.vat_total)),p.toBase64(t)},p.zakat2=function(e,t){fetch("/x-api/zakat",{method:"POST",body:JSON.stringify(e)}).then(e=>e.json()).then(e=>{t(e)})},p.barcode=function(e){if(e&&e.selector&&e.text)return JsBarcode(e.selector,e.selector,e.options);console.error("qrcode need {selector , text}")},p.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="",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.H})):void 0},e.site=p})(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 p.forEach(r=>{r.n==e&&(n=r.i0[t])}),n}function i(e,t){let n="";return 11==e?p.forEach(r=>{r.n==e&&(n=r.i0[t])}):12==e?p.forEach(r=>{r.n==e&&(n=r.i0[t])}):(p.forEach(r=>{r.n==e[1]&&(n=r.i0[t])}),p.forEach(r=>{r.n==e[0]&&(e[1]>0&&e[0]>1?n+=d.strings.space[t]+d.strings.and[t]:n+="",n+=r.i1[t])})),n}function s(e,t){let n="";p.forEach(r=>{r.n==e[0]&&(n=r.i2[t]+d.strings.space[t])});let r=i(e.substring(1),t);return r&&(n&&(n+=d.strings.and[t]),n+=r),n}function l(e,t){let n="";p.forEach(r=>{r.n==e[0]&&(n=r.i3[t]+d.strings.space[t])});let r=s(e.substring(1),t);return r&&(n&&(n+=d.strings.and[t]),n+=r),n}function c(e,t){let n=i(e.substring(0,2),t)+d.strings.space[t];1==e[0]?n+=d.strings[10][t]+d.strings.space[t]:n+=d.strings[20][t]+d.strings.space[t];let r=s(e.substring(2),t);return r&&(n+=d.strings.and[t]+r),n}function u(e,t){let n=s(e.substring(0,3),t)+d.strings.space[t];n+=d.strings[100][t]+d.strings.space[t];let r=s(e.substring(3),t);return r&&(n+=d.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}),e.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 d={onLoad:function(e){"loading"!==t.readyState?e():t.addEventListener("DOMContentLoaded",()=>{e()})}};d.zoomNumber=parseInt(localStorage.getItem("zoomNumber")||100),d.zoom=function(e){"+"==e?d.zoomNumber+=25:"-"==e?d.zoomNumber-=25:"0"==e||(d.zoomNumber=100),localStorage.setItem("zoomNumber",d.zoomNumber.toString()),t.body.style.zoom=d.zoomNumber+"%"},d.onLoad(()=>{d.zoom("0")}),d.printerList=[],d.getPrinters=function(){return e.SOCIALBROWSER&&SOCIALBROWSER.currentWindow.webContents.getPrintersAsync?SOCIALBROWSER.currentWindow.webContents.getPrintersAsync().then(e=>{d.printerList=e}):e.SOCIALBROWSER&&SOCIALBROWSER.currentWindow.webContents.getPrinters?d.printerList=SOCIALBROWSER.currentWindow.webContents.getPrinters():fetch("http://127.0.0.1:60080/printers/all").then(e=>e.json()).then(e=>{d.printerList=e.list}).catch(e=>{d.printerList=[]}),d.printerList},d.render=function(e,n){let r=t.querySelector(e);return r?Mustache.render(r.innerHTML,n):""},d.html=function(e,t){return Mustache.render(e,t)},d.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},d.$=function(e){let n=t.querySelectorAll(e);return n},d.modal_z_index=999999,d.showModal=function(t){r(t).click(()=>{r("popup").hide()}),d.modal_z_index++;let n=d.$(t);if(0===n.length)return;n[0].style.zIndex=d.modal_z_index,n[0].style.display="block";let o=n[0].getAttribute("fixed");""!==o&&n[0].addEventListener("click",function(){d.hideModal(t)});let a=d.$(t+" i-control input");a.length>0&&a[0].focus(),d.$(t+" .close").forEach(e=>{e.addEventListener("click",function(){d.hideModal(t)})}),d.$(t+" .modal-header").forEach(t=>{t.addEventListener("click",function(t){t=t||e.event,t.stopPropagation()})}),d.$(t+" .modal-body").forEach(t=>{t.addEventListener("click",function(t){t=t||e.event,t.stopPropagation()})}),d.$(t+" .modal-footer").forEach(t=>{t.addEventListener("click",function(t){t=t||e.event,t.stopPropagation()})})},d.hideModal=function(e){r("popup").hide();let t=d.$(e);t.length>0&&(t[0].style.display="none")},d.eventList=[],d.on=function(e,t){t=t||function(){},d.eventList.push({name:e,callback:t})},d.call=function(e,t){for(var n=0;n<d.eventList.length;n++){var r=d.eventList[n];r.name==e&&r.callback(t)}},d.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}`,d.getData(e,t)},d.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=d.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)})},d.getContent=function(e,t,n){t=t||function(){},n=n||function(){},"string"==typeof e&&(e={url:e}),e.url=d.handle_url(e.url),fetch(e.url,{mode:"cors",method:"get"}).then(function(e){return e.text()}).then(function(e){t(e)})},d.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},d.postData=function(e,n,r){n=n||function(){},r=r||function(){},"string"==typeof e&&(e={url:e}),e.data=e.data||e.body,delete e.body,e.data&&"object"==typeof e.data&&(e.data=JSON.stringify(e.data)),e.headers=e.headers||{Accept:"application/json","Content-Type":"application/json"},e.data&&"string"==typeof e.data&&(e.headers["Content-Length"]=e.data.length.toString());try{e.headers.Cookie=t.cookie}catch(r){console.log(r)}e.method="post",e.redirect="follow",e.mode="cors",e.url=d.handle_url(e.url),fetch(e.url,{mode:e.mode,method:e.method,headers:e.headers,body:e.data,redirect:e.redirect}).then(e=>e.json()).then(e=>{n(e)}).catch(e=>{r(e)})},d.typeOf=function(e){return Object.prototype.toString.call(e).slice(8,-1)},d.toDateTime=function(e){return e?new Date(e):new Date},d.toDateX=function(e){let t=d.toDateTime(e);return t.getFullYear()+"-"+(t.getMonth()+1)+"-"+t.getDate()},d.toDateXT=function(e){let t=d.toDateTime(e);return t.getHours()+":"+t.getMinutes()+":"+t.getSeconds()},d.toDateXF=function(e){let t=d.toDateTime(e);return t.getFullYear()+"-"+(t.getMonth()+1)+"-"+t.getDate()+" "+t.getHours()+":"+t.getMinutes()+":"+t.getSeconds()},d.toDateOnly=function(e){let t=d.toDateTime(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0)},d.toDateT=function(e){return d.toDateOnly(e).getTime()},d.toDateF=function(e){return d.toDateTime(e).getTime()},d.addZero=function(e,t){let n=t-e.toString().length;for(let t=0;t<n;t++)e="0"+e.toString();return e},d.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},d.fixed=3,d.to_number=d.toNumber=function(e,t){let n=t||d.fixed,r=0;return e&&(r=parseFloat(e).toFixed(n)),parseFloat(r)},d.to_money=d.toMoney=function(e,t=!0){let n=0;if(e){e=e.toFixed(2).split(".");e[0];let t=e[1]||"00";if(t){let n=t[0]||"0",r=t[1]||"0";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+"0"}n=e.join(".")}return t?d.to_float(n):(n&&n.endsWith(".")&&(n+="00"),n)},d.to_float=d.toFloat=function(e){return e?parseFloat(e):0},d.to_int=d.toInt=function(e){return e?parseInt(e):0},d.$base64Letter="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",d.$base64Numbers=[];for(let e=11;e<99;e++)e%10!=0&&e%11!=0&&d.$base64Numbers.push(e);d.toJson=(e=>typeof e===n||null===e?"":JSON.stringify(e)),d.fromJson=(e=>"string"!=typeof e?e:JSON.parse(e)),d.toBase64=(e=>typeof e===n||null===e||""===e?"":("string"!=typeof e&&(e=d.toJson(e)),Base64.encode(e))),d.fromBase64=(e=>typeof e===n||null===e||""===e?"":Base64.decode(e)),d.to123=(e=>{e=d.toBase64(e);let t="";for(let n=0;n<e.length;n++){let r=e[n];t+=d.$base64Numbers[d.$base64Letter.indexOf(r)]}return t}),d.from123=(e=>{let t="";for(let n=0;n<e.length;n++){let r=e[n]+e[n+1],o=d.$base64Numbers.indexOf(parseInt(r));t+=d.$base64Letter[o],n++}return t=d.fromBase64(t),t}),d.hide=d.hideObject=function(e){return d.to123(JSON.parse(e))},d.show=d.showObject=function(e){return JSON.parse(d.from123(e))},d.typeOf=d.typeof=function(e){return Object.prototype.toString.call(e).slice(8,-1)},d.showTabContent=function(e,n){let r=t.querySelector(n).parentNode.parentNode;r.querySelectorAll(".tab-content").forEach(e=>{e.style.display="none"}),r.querySelectorAll(".tab-link").forEach(e=>{e.className=e.className.replace(" active","")}),t.querySelectorAll(n+".tab-content").forEach(e=>{e.style.display="block"}),e&&(e.currentTarget.className+=" active")},d.showTabs=function(e,t){e&&e.stopPropagation(),r(".main-menu .tabs").hide(),r(t).show(100)},d.toHtmlTable=function(e){if(e===n||null===e)return"";if("Object"==d.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"==d.typeOf(e[r])||"Array"==d.typeOf(e[r])?t+=`<td><p> ${d.toHtmlTable(e[r])} </p></td>`:t+=`<td><p> ${e[r]} </p></td>`,t+="</tr>"}return t+="</table>",t}if("Array"==d.typeOf(e)){let t='<table class="table">';for(let n=0;n<e.length;n++)"Object"==d.typeOf(e[n])||"Array"==d.typeOf(e[n])?t+=`<tr><td><p>${d.toHtmlTable(e[n])}</p></td></tr>`:t+=`<tr><td><p>${e[n]}</p></td></tr>`;return t+="</table>",t}return""},d.resetValidated=function(e){e=e||"body";const n=t.querySelectorAll(e+" [v]");n.forEach(e=>{e.classList.remove("is-invalid"),e.classList.remove("is-valid")})},d.validated=function(e){const n={ok:!0,messages:[]};e=e||"body";const r=t.querySelectorAll(e+" [v]");return r.forEach(e=>{e.classList.remove("is-invalid"),e.classList.remove("is-valid");const t=e.getAttribute("v"),r=t.split(" ");r.forEach(t=>{if(t=t.toLowerCase().trim(),"r"===t)"INPUT"!==e.nodeName&&"SELECT"!==e.nodeName&&"TEXTAREA"!==e.nodeName||e.value&&!e.value.like("*undefined*")?"I-DATETIME"!==e.nodeName||e.getAttribute("value")?"INPUT"!==e.nodeName&&"SELECT"!==e.nodeName&&"TEXTAREA"!==e.nodeName&&"I-DATETIME"!==e.nodeName||e.classList.add("is-valid"):(e.classList.add("is-invalid"),n.ok=!1,n.messages.push({en:"Data Is Required",ar:"هذا البيان مطلوب"})):(e.classList.add("is-invalid"),(f=e.parentNode.querySelector(".invalid-feedback"))&&(d.session&&"en"==d.session.lang?f.innerHTML="Data Is Required":d.session&&"ar"==d.session.lang&&(f.innerHTML="هذا البيان مطلوب")),n.ok=!1,n.messages.push({en:"Data Is Required",ar:"هذا البيان مطلوب"}));else if(t.like("ml*")){const r=parseInt(t.replace("ml",""));"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName||e.value&&!(e.value.length>r)||(e.classList.add("is-invalid"),n.ok=!1,n.messages.push({en:"Letter Count Must be <= "+r,ar:"عدد الاحرف يجب ان يكون أقل من أو يساوى "+r}))}else if(t.like("ll*")){const r=parseInt(t.replace("ll",""));"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName||e.value&&!(e.value.length<r)||(e.classList.add("is-invalid"),n.ok=!1,n.messages.push({en:"Letter Count Must be >= "+r,ar:"عدد الاحرف يجب ان يكون اكبر من أو يساوى "+r}))}else if(t.like("l*")){const r=parseInt(t.replace("l",""));"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName||e.value&&e.value.length===r||(e.classList.add("is-invalid"),n.ok=!1,n.messages.push({en:"Letter Count Must be = "+r,ar:"عدد الاحرف يجب ان يساوى "+r}))}else t.like("e")?"INPUT"!==e.nodeName||e.value&&d.isEmail(e.value)||(e.classList.add("is-invalid"),n.ok=!1,n.messages.push({en:"Write Valid Email address",ar:"اكتب البريد الالكترونى بطريقة صحيحة"})):(t.like("web")||t.like("url"))&&("INPUT"!==e.nodeName||e.value&&d.isURL(e.value)||(e.classList.add("is-invalid"),n.ok=!1,n.messages.push({en:"Write Valid Web address",ar:"اكتب رابط الموقع بطريقة صحيحة"})))})}),n},d.isEmail=function(e){return!!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(e)},d.isURL=function(e){var t=new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i");return!!t.test(encodeURI(e))};let p=[{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:"اثنى عشر"}}];d.strings={and:{ar:"و"},space:{ar:" "},10:{ar:"آلاف"},20:{ar:"ألفاً"},100:{ar:"ألف"},currency:{ar:" جنيها مصريا فقط لاغير "},from10:{ar:" قروش "},from100:{ar:" قرش "},from1000:{ar:" من الف "}},d.stringfiy=function(e,t){e=e||"",t=t||"ar",e=e.toString().split(".");let n=e[0],r=e[1],o="";1==n.length?o=a(n,t):2==n.length?o=i(n,t):3==n.length?o=s(n,t):4==n.length?o=l(n,t):5==n.length?o=c(n,t):6==n.length&&(o=u(n,t));let f="";return r&&(1==r.length&&(r+="0"),1==r.length?f=a(r,t)+d.strings.from10[t]:2==r.length?f=i(r,t)+d.strings.from100[t]:3==r.length&&(f=s(r,t)+d.strings.from1000[t])),o+=d.strings.currency[t],f&&(o+=d.strings.space[t]+d.strings.and[t]+d.strings.space[t]+f),o},d.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(()=>{d.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")},d.hex=function(e){if("string"==typeof e){const t=new TextEncoder;return Array.from(t.encode(e)).map(e=>e.toString(16).padStart(2,"0")).join("")}if("number"==typeof e){let t=e.toString(16);return 1==t.length&&(t="0"+t),t}},d.zakat=function(e){let t="";return e.name&&(t+="01"+d.hex(e.name.length)+d.hex(e.name)),e.vat_number&&(t+="02"+d.hex(e.vat_number.length)+d.hex(e.vat_number)),e.time&&(t+="03"+d.hex(e.time.length)+d.hex(e.time)),e.total&&(t+="04"+d.hex(e.total.length)+d.hex(e.total)),e.vat_total&&(t+="05"+d.hex(e.vat_total.length)+d.hex(e.vat_total)),d.toBase64(t)},d.zakat2=function(e,t){fetch("/x-api/zakat",{method:"POST",body:JSON.stringify(e)}).then(e=>e.json()).then(e=>{t(e)})},d.barcode=function(e){if(e&&e.selector&&e.text)return JsBarcode(e.selector,e.selector,e.options);console.error("qrcode need {selector , text}")},d.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="",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.H})):void 0},e.site=d})(window,document,"undefined",jQuery);
|
package/index.js
CHANGED
|
@@ -3,6 +3,8 @@ module.exports = function init(options) {
|
|
|
3
3
|
|
|
4
4
|
____0.package = require(__dirname + '/package.json');
|
|
5
5
|
|
|
6
|
+
____0.localDir = __dirname;
|
|
7
|
+
____0.cwd = process.cwd();
|
|
6
8
|
____0.lib = {};
|
|
7
9
|
____0._0_a405 = !0; // 4334135645788275237931514658376742387653423921514718526246719191
|
|
8
10
|
____0.strings = [];
|
|
@@ -15,6 +17,7 @@ module.exports = function init(options) {
|
|
|
15
17
|
____0.zlib = require('zlib');
|
|
16
18
|
____0.xlsx = ____0.XLSX = require('xlsx');
|
|
17
19
|
____0.pdf = ____0.PDF = require('pdf-lib');
|
|
20
|
+
____0.fontkit = ____0.FONTKIT = require('@pdf-lib/fontkit');
|
|
18
21
|
____0.querystring = require('querystring');
|
|
19
22
|
____0.formidable = require('formidable');
|
|
20
23
|
____0.mv = require('mv');
|
|
@@ -24,8 +27,16 @@ module.exports = function init(options) {
|
|
|
24
27
|
____0.md5 = ____0.hash = ____0.x0md50x = require('md5');
|
|
25
28
|
____0.nodemailer = require('nodemailer');
|
|
26
29
|
____0.child_process = require('child_process');
|
|
27
|
-
|
|
30
|
+
|
|
28
31
|
____0.setting = {};
|
|
32
|
+
____0.apps = [];
|
|
33
|
+
____0.appList = [];
|
|
34
|
+
____0.addApp = function (app) {
|
|
35
|
+
____0.appList.push(app);
|
|
36
|
+
};
|
|
37
|
+
____0.getApp = function (name) {
|
|
38
|
+
return ____0.appList.find((a) => a.name === name);
|
|
39
|
+
};
|
|
29
40
|
|
|
30
41
|
____0.require = function (file_path) {
|
|
31
42
|
return require(file_path)(____0);
|
|
@@ -197,6 +208,7 @@ module.exports = function init(options) {
|
|
|
197
208
|
require('./lib/integrated.js')(____0);
|
|
198
209
|
require('./lib/browser.js')(____0);
|
|
199
210
|
require('./lib/helper.js')(____0);
|
|
211
|
+
require('./lib/pdf.js')(____0);
|
|
200
212
|
|
|
201
213
|
//Master Pages
|
|
202
214
|
____0.masterPages = [];
|
|
@@ -221,7 +233,6 @@ module.exports = function init(options) {
|
|
|
221
233
|
____0.dashboard = require(__dirname + '/lib/dashboard.js');
|
|
222
234
|
____0.dashboard(____0);
|
|
223
235
|
|
|
224
|
-
____0.apps = [];
|
|
225
236
|
____0.importApps = function (app_dir) {
|
|
226
237
|
if (____0.isFileExistsSync(app_dir) && ____0.fs.lstatSync(app_dir).isDirectory()) {
|
|
227
238
|
____0.fs.readdir(app_dir, (err, files) => {
|
|
@@ -239,7 +250,7 @@ module.exports = function init(options) {
|
|
|
239
250
|
____0.importApp = function (app_path, name2) {
|
|
240
251
|
____0.log('=== Importing App : ' + app_path);
|
|
241
252
|
if (____0.isFileExistsSync(app_path + '/site_files/json/words.json')) {
|
|
242
|
-
____0.words.
|
|
253
|
+
____0.words.addPath(app_path);
|
|
243
254
|
}
|
|
244
255
|
|
|
245
256
|
if (____0.isFileExistsSync(app_path + '/site_files/json/vars.json')) {
|
package/lib/pdf.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
module.exports = function init(____0) {
|
|
2
|
+
____0.fontList = [];
|
|
3
|
+
____0.defaultFontOptions = {
|
|
4
|
+
path: ____0.localDir + '/apps/client-side/site_files/fonts/helvetica.ttf',
|
|
5
|
+
url: 'https://egytag.com/x-fonts/helvetica.ttf',
|
|
6
|
+
};
|
|
7
|
+
____0.initFontKit = function (options, callback) {
|
|
8
|
+
options = options || ____0.defaultFontOptions;
|
|
9
|
+
if ((f = ____0.fontList.find((ff) => (ff.options.url && ff.options.url === options.url) || (ff.options.path && ff.options.path === options.path)))) {
|
|
10
|
+
if (callback) {
|
|
11
|
+
callback(f.font);
|
|
12
|
+
}
|
|
13
|
+
} else {
|
|
14
|
+
if (options.path) {
|
|
15
|
+
let font = ____0.fs.readFileSync(options.path);
|
|
16
|
+
____0.fontList.push({
|
|
17
|
+
options: options,
|
|
18
|
+
font: font,
|
|
19
|
+
});
|
|
20
|
+
if (callback) {
|
|
21
|
+
callback(font);
|
|
22
|
+
}
|
|
23
|
+
} else if (options.url) {
|
|
24
|
+
fetch(options.url)
|
|
25
|
+
.then((res) => res.arrayBuffer())
|
|
26
|
+
.then((font) => {
|
|
27
|
+
____0.fontList.push({
|
|
28
|
+
options: options,
|
|
29
|
+
font: font,
|
|
30
|
+
});
|
|
31
|
+
if (callback) {
|
|
32
|
+
callback(font);
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
____0.loadPDF = function (options, callback) {
|
|
40
|
+
____0.pdf.PDFDocument.load(____0.fs.readFileSync(options.path)).then((doc) => {
|
|
41
|
+
____0.initFontKit(null, (font) => {
|
|
42
|
+
doc.registerFontkit(____0.FONTKIT);
|
|
43
|
+
doc.embedFont(font).then((newFont) => {
|
|
44
|
+
if (callback) {
|
|
45
|
+
callback(doc, newFont);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
};
|
package/lib/words.js
CHANGED
package/object-options/lib/fn.js
CHANGED
|
@@ -177,8 +177,12 @@ exports = module.exports = function init(____0) {
|
|
|
177
177
|
};
|
|
178
178
|
|
|
179
179
|
fn.getContentType = function (path) {
|
|
180
|
-
if (typeof path === undefined)
|
|
181
|
-
|
|
180
|
+
if (typeof path === undefined) {
|
|
181
|
+
return null;
|
|
182
|
+
}
|
|
183
|
+
let ext = ____0.path.extname(path).replace('.', '');
|
|
184
|
+
return ____0.mimeTypes[ext] || 'application/' + ext;
|
|
185
|
+
|
|
182
186
|
if (path.endsWith('.exe')) {
|
|
183
187
|
return 'application/octet-stream';
|
|
184
188
|
} else if (path.endsWith('.txt')) {
|
|
@@ -82,7 +82,7 @@ exports = module.exports = function init(____0) {
|
|
|
82
82
|
}
|
|
83
83
|
if (!Array.prototype.like) {
|
|
84
84
|
Array.prototype.like = function (name) {
|
|
85
|
-
if (
|
|
85
|
+
if (typeof name !== "string") {
|
|
86
86
|
return !1;
|
|
87
87
|
}
|
|
88
88
|
if (name.indexOf('*') !== -1) {
|
|
@@ -99,7 +99,7 @@ exports = module.exports = function init(____0) {
|
|
|
99
99
|
}
|
|
100
100
|
if (!Array.prototype.contains) {
|
|
101
101
|
Array.prototype.contains = function (name) {
|
|
102
|
-
if (
|
|
102
|
+
if (typeof name !== "string") {
|
|
103
103
|
return !1;
|
|
104
104
|
}
|
|
105
105
|
return this.test('^.*' + escape(name) + '.*$', 'gium');
|
|
@@ -119,7 +119,7 @@ exports = module.exports = function init(____0) {
|
|
|
119
119
|
|
|
120
120
|
if (!String.prototype.like) {
|
|
121
121
|
String.prototype.like = function (name) {
|
|
122
|
-
if (
|
|
122
|
+
if (typeof name !== "string") {
|
|
123
123
|
return !1;
|
|
124
124
|
}
|
|
125
125
|
let r = !1;
|
|
@@ -140,7 +140,7 @@ exports = module.exports = function init(____0) {
|
|
|
140
140
|
if (!String.prototype.contains) {
|
|
141
141
|
String.prototype.contains = function (name) {
|
|
142
142
|
let r = !1;
|
|
143
|
-
if (
|
|
143
|
+
if (typeof name !== "string") {
|
|
144
144
|
return r;
|
|
145
145
|
}
|
|
146
146
|
name.split('|').forEach((n) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "isite",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2023.01.02",
|
|
4
4
|
"description": "Create Secure Multi-Language Web Site [Fast and Easy] ",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"license": "UNLICENSED",
|
|
38
38
|
"dependencies": {
|
|
39
|
+
"@pdf-lib/fontkit": "^1.1.1",
|
|
39
40
|
"archiver": "^5.0.2",
|
|
40
41
|
"cheerio": "^1.0.0-rc.12",
|
|
41
42
|
"formidable": "^2.0.1",
|