script.io.js 2026.123.955 → 2026.124.153

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.
@@ -59,6 +59,8 @@ Define (Object.type_of, "promise", function (input) { if (arguments.length) retu
59
59
  Define (Object.type_of, "regex", function (input) { if (arguments.length) return Object.type_of (input) === "[object RegExp]"; else return "[object RegExp]"; });
60
60
  Define (Object.type_of, "string", function (input) { if (arguments.length) return Object.type_of (input) === "[object String]"; else return "[object String]"; });
61
61
 
62
+ Define (Object, "length", function (object) { return Object.keys (object).length; });
63
+
62
64
  /**
63
65
  * array
64
66
  *
@@ -71,14 +73,16 @@ Define (Object.type_of, "string", function (input) { if (arguments.length) retur
71
73
 
72
74
  Define (Array.prototype, "json", function () { return JSON.pretty (this); });
73
75
  Define (Array.prototype, "clone", function () { return JSON.parse (JSON.stringify (this)); });
74
- Define (Array.prototype, "exist", function (input, offset) { return this.includes (input, offset); });
76
+ Define (Array.prototype, "exist", function (value, offset) { if (Array.isArray (value)) { for (var i in value) if (this.includes (value [i])) return true; return false; } else return this.includes (value, offset); });
75
77
  Define (Array.prototype, "first", function () { for (var i in this) return this [i]; return undefined; }); Define (Array.prototype, "one", function () { return this.first (); });
76
78
  Define (Array.prototype, "last", function () { var value; for (var i in this) value = this [i]; return value; });
79
+ Define (Array.prototype, "max", function () { return Math.max (... this); });
80
+ Define (Array.prototype, "min", function () { return Math.min (... this); });
77
81
  Define (Array.prototype, "shuffle", function () { var array = this.clone (); var current = array.length, random; while (current !== 0) { random = Math.floor (Math.random () * current); current --; [array [current], array [random]] = [array [random], array [current]]; } return array; });
78
82
  Define (Array.prototype, "limit", function (limit) { return this.clone ().slice (0, limit); });
79
83
  Define (Array.prototype, "page", function (page, limit) { return this.clone ().slice (((page - 1) * (limit || Array.config.page.limit)), (page * (limit || Array.config.page.limit))); });
80
84
  Define (Array.prototype, "distinct", function (key = "id", distinct = []) { return this.filter (function (array) { if (distinct.includes (array [key])) return false; else { distinct.push (array [key]); return true; } }); });
81
- Define (Array.prototype, "implode", function (array) { var data = this.clone (); data.push (... array); return data; });
85
+ Define (Array.prototype, "implode", function (data) { var array = this.clone (); array.push (... data); return array; });
82
86
 
83
87
  Define (Array.prototype, "select", function (filter) {
84
88
  return this.filter (function (array, index) {
@@ -150,6 +154,14 @@ Define (String.prototype, "pop", function (length = 1) { return this.substr (0,
150
154
  Define (String.prototype, "exist", function (input, offset) { return this.includes (input, offset); });
151
155
  Define (String.prototype, "reverse", function () { return this.split ("").reverse ().join (""); });
152
156
  Define (String.prototype, "join", function (string) { return this + string; });
157
+ Define (String.prototype, "shuffle", function () { return this.split ("").shuffle ().join (""); });
158
+
159
+ Define (String, "char", function () {});
160
+ Define (String.char, "small", "abcdefghijklmnopqrstuvwxyz");
161
+ Define (String.char, "big", "ABCDEFGHIJKLMNOPQRSTUVWXYZ");
162
+ Define (String.char, "alpha", {numeric: "abcdefghijklmnopqrstuvwxyz" + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "0123456789"});
163
+ Define (String.char, "space", " ");
164
+ Define (String.char, "underscore", "_");
153
165
 
154
166
  /**
155
167
  * number
@@ -161,6 +173,23 @@ Define (String.prototype, "join", function (string) { return this + string; });
161
173
  * xxx://xxx.xxx.xxx/xxx
162
174
  */
163
175
 
176
+ Define (Number.prototype, "number", function () { return this; });
177
+ Define (Number.prototype, "integer", function () { return parseInt (this); });
178
+ Define (Number.prototype, "string", function () { return this.toString (); });
179
+ Define (Number.prototype, "shuffle", function (number) { return Math.floor (Math.random () * (number - this + 1)) + this; });
180
+
181
+ Define (Number, "format", function (input, separator = ",") {
182
+ var number = input.toString ().split (""), n = [], x = 0;
183
+ number.reverse ();
184
+ for (var i in number) {
185
+ if (x > 2) if ((x = 0) === 0) n.push (separator);
186
+ x ++;
187
+ n.push (number [i]);
188
+ }
189
+ n.reverse ();
190
+ return n.join ("");
191
+ })
192
+
164
193
  /**
165
194
  * date
166
195
  *
@@ -171,10 +200,83 @@ Define (String.prototype, "join", function (string) { return this + string; });
171
200
  * xxx://xxx.xxx.xxx/xxx
172
201
  */
173
202
 
203
+ Define (Date, "io", class {
204
+ constructor (date) {
205
+ if (date instanceof Date) this.date = date;
206
+ else if (date) this.date = new Date (date);
207
+ else this.date = new Date ();
208
+ }
209
+ string () { return this.format ("string"); }
210
+ format (format = "default") {
211
+ var date = {
212
+ "Y": this.year (),
213
+ "M": this.month (), "m": Date.month.name [this.month ()],
214
+ "D": this.day (), "d": Date.month.name [this.week ()], "W": this.week (),
215
+ "H": this.hour (), "h": this.hour ("meredian"),
216
+ "I": this.minute (),
217
+ "S": this.second (),
218
+ "A": this.meredian (),
219
+ }
220
+ format = Date.format [format] || format;
221
+ for (var i in date) format = format.split (i).join (date [i]);
222
+ return format;
223
+ }
224
+ year () { return this.date.getFullYear (); }
225
+ month () { return (this.date.getMonth () + 1).toString ().padStart (2, "0"); }
226
+ day () { return this.date.getDate ().toString ().padStart (2, "0"); }
227
+ week () { return this.date.getDay ().toString ().padStart (2, "0"); }
228
+ hour (meredian) { if (meredian) { var hour = this.date.getHours (); if (this.meredian () === "PM") if (hour === 12) return hour.toString (); else return (hour - 12).toString ().padStart (2, "0"); else return hour.toString ().padStart (2, "0"); } else return this.date.getHours ().toString ().padStart (2, "0"); }
229
+ minute () { return this.date.getMinutes ().toString ().padStart (2, "0"); }
230
+ second () { return this.date.getSeconds ().toString ().padStart (2, "0"); }
231
+ mili () { return this.date.getMilliseconds ().toString ().padStart (3, "0"); }
232
+ meredian () { if (this.date.getHours () > 11) return "PM"; else return "AM"; }
233
+ time () { return this.date.getTime (); }
234
+ });
235
+
236
+ Define (Date, "format", function (format, date) { return new Date.io (date).format (format); });
237
+ Define (Date.format, "string", "Y-M-D");
238
+ Define (Date.format, "number", "YMD");
239
+ Define (Date.format, "default", "m D, Y");
240
+ Define (Date.format, "full", "d, m D, Y - h:I:S A");
241
+
242
+ Define (Date, "month", {
243
+ name: {
244
+ 1: "January", "01": "January",
245
+ 2: "February", "02": "February",
246
+ 3: "March", "03": "March",
247
+ 4: "April", "04": "April",
248
+ 5: "May", "05": "May",
249
+ 6: "June", "06": "June",
250
+ 7: "July", "07": "July",
251
+ 8: "August", "08": "August",
252
+ 9: "September", "09": "September",
253
+ 10: "October",
254
+ 11: "November",
255
+ 12: "December",
256
+ },
257
+ });
258
+
259
+ Define (Date, "day", {
260
+ name: {
261
+ 1: "Monday", "01": "Monday",
262
+ 2: "Tuesday", "02": "Tuesday",
263
+ 3: "Wednesday", "03": "Wednesday",
264
+ 4: "Thursday", "04": "Thursday",
265
+ 5: "Friday", "05": "Friday",
266
+ 6: "Saturday", "06": "Saturday",
267
+ 7: "Sunday", "07": "Sunday",
268
+ },
269
+ });
270
+
174
271
  Define (Date, "time", function () { return Date.now (); });
175
272
  Define (Date, "timeout", function (context, second = 1) { return setTimeout (context, (second * 1000)); });
176
273
  Define (Date.timeout, "clear", function (context) { return clearTimeout (context); });
177
274
 
275
+ Define (Date, "embed", function () {});
276
+ Define (Date.embed, "format", function (input) { if ((input = parseInt (input)) > 3600) return Date.embed.hour (input); else return Date.embed.minute (input); });
277
+ Define (Date.embed, "hour", function (input) { var hour = Math.floor (input / 3600); var minute = Math.floor ((input % 3600) / 60); var second = input % 60; return `${hour}:${String (minute).padStart(2, "0")}:${String (second).padStart(2, "0")}`; });
278
+ Define (Date.embed, "minute", function (input) { var minute = Math.floor (input / 60); var second = input % 60; return `${String (minute).padStart(2, "0")}:${String (second).padStart(2, "0")}`; });
279
+
178
280
  /**
179
281
  * event
180
282
  *
@@ -291,6 +393,67 @@ Define (URL.header, "status", {
291
393
  },
292
394
  });
293
395
 
396
+ /**
397
+ * cookie
398
+ *
399
+ * title
400
+ * description
401
+ * sub description
402
+ *
403
+ * xxx://xxx.xxx.xxx/xxx
404
+ */
405
+
406
+ Function.cookie = function (key, value) {
407
+ var cookie = document.cookie.split (";").map (function (data) { return data.trim ().split ("="); });
408
+ for (var i in cookie) {
409
+ var key = cookie [i][0], value;
410
+ if (key) {
411
+ value = cookie [i][1].trim ();
412
+ Function.cookie.data [key.trim ()] = value;
413
+ }
414
+ }
415
+ }
416
+
417
+ Function.cookie.get = function (key) {
418
+ if (key) return Function.cookie.data [key];
419
+ else return Function.cookie.get (Function.cookie.identity);
420
+ }
421
+
422
+ Function.cookie.delete = function (key) {
423
+ Function.cookie.set (key);
424
+ }
425
+
426
+ Function.cookie.set = function (key, value = "", expire = 0, domain = null, path = "/") {
427
+ if (typeof key === "string") {
428
+ if (expire === null) expire = Function.cookie._expire;
429
+ domain = domain || Function.cookie._domain;
430
+ document.cookie = `${key}=${value};expires=${expire};domain=${domain};path=/;samesite=lax`;
431
+ Function.cookie.data [key] = value;
432
+ }
433
+ else {
434
+ if ("domain" in key) Function.cookie._domain = key.domain;
435
+ if ("expire:day" in key) {
436
+ var expire = new Date ();
437
+ expire.setTime (expire.getTime () + (key ["expire:day"] * 24 * 60 * 60 * 1000));
438
+ Function.cookie._expire = expire.toUTCString ();
439
+ }
440
+ }
441
+ }
442
+
443
+ Function.cookie.start = function (visitor) {
444
+ if (Function.cookie.get (Function.cookie.identity)) {}
445
+ else Function.cookie.set (Function.cookie.identity, Function.unique.id ());
446
+ if (visitor) Function.visitor.cookie (visitor.ip.address, visitor.country.code, visitor.agent);
447
+ Event.emit ("cookie:start", visitor);
448
+ }
449
+
450
+ Function.cookie.id = function () {
451
+ return Function.cookie.get (Function.cookie.identity);
452
+ }
453
+
454
+ Function.cookie.identity = "cookie";
455
+ Function.cookie.data = {}
456
+
294
457
  /**
295
458
  * json
296
459
  *
@@ -331,6 +494,17 @@ Define (JSON.db, "select", class {
331
494
  Define (JSON.db, "file", function (key, value) { if (value) return JSON.db.file.object [key] = value; else return JSON.db.file.object [key] || key; });
332
495
  Define (JSON.db.file, "object", {});
333
496
 
497
+ Define (JSON, "token", function () {});
498
+ Define (JSON.token, "parse", function (token) {
499
+ try {
500
+ if ((token = token.split (".")).length !== 3) throw new Error ("Invalid JWT Structure");
501
+ return JSON.parse (decodeURIComponent (atob (token [1].replace (/-/g, "+").replace (/_/g, "/")).split ("").map (function (c) { return "%" + ("00" + c.charCodeAt (0).toString (16)).slice (-2); }).join ("")));
502
+ }
503
+ catch (e) {
504
+ return {}
505
+ }
506
+ });
507
+
334
508
  /**
335
509
  * path
336
510
  *
@@ -403,16 +577,30 @@ Define (Function.appwrite.db, "select", class {
403
577
  constructor (db, collection) {
404
578
  this.db = db;
405
579
  this.collection = {name: collection, id: Function.appwrite.db.collection (collection), json: this.db.json [collection] || []}
580
+ this.option = {sort: {}, offset: 0, limit: 5000}
581
+ }
582
+ sort (sort) {
583
+ return this;
584
+ }
585
+ limit () {
586
+ if (arguments.length > 1) { this.option.offset = arguments [0]; this.option.limit = arguments [1]; }
587
+ else if (arguments.length) { this.option.offset = 0; this.option.limit = arguments [0]; }
588
+ else { this.option.offset = 0; this.option.limit = 5000; }
589
+ return this;
406
590
  }
407
- find (filter) {
408
- var id;
409
- if (typeof filter !== "object") filter = {id: (id = filter)}
591
+ find (filter = {}) {
592
+ var serial;
593
+ if (typeof filter !== "object") filter = {serial: (serial = filter)}
410
594
  var __ = function (db) {
411
595
  return new Promise (async function (resolve, reject) {
596
+ var data;
412
597
  var error = false;
413
- var database, result, queries;
414
- if (id) queries = [Function.appwrite.api.Query.limit (1)]
415
- else queries = [Function.appwrite.api.Query.limit (5000)]
598
+ var database, result, queries = [];
599
+ if (serial) queries = [Function.appwrite.api.Query.limit (1)]
600
+ else {
601
+ if (db.option.limit) queries.push (Function.appwrite.api.Query.limit (db.option.limit));
602
+ }
603
+ /*
416
604
  try {
417
605
  database = new Function.appwrite.api.Databases (db.db.client);
418
606
  result = await database.listDocuments ({
@@ -422,10 +610,15 @@ Define (Function.appwrite.db, "select", class {
422
610
  total: true,
423
611
  });
424
612
  }
425
- catch (e) { error = true; }
426
- var data = result.documents.map (function (data) { return data; }).select (filter);
427
- data = db.collection.json.select (filter).implode (data);
428
- resolve ({error, data});
613
+ catch (e) { error = true; console.log (e); }
614
+ if (error === false) {
615
+ data = result.documents.map (function (data) { return data; }).select (filter);
616
+ data = db.collection.json.select (filter).implode (data);
617
+ }
618
+ //*/
619
+ setTimeout (function () {
620
+ resolve ({error, data});
621
+ }, 1000)
429
622
  });
430
623
  }
431
624
  return __ (this);
@@ -445,25 +638,6 @@ Define (Function.appwrite.db.collection, "object", {});
445
638
  * xxx://xxx.xxx.xxx/xxx
446
639
  */
447
640
 
448
- /**
449
- * miscellaneous
450
- *
451
- * title
452
- * description
453
- * sub description
454
- *
455
- * xxx://xxx.xxx.xxx/xxx
456
- */
457
-
458
- Define (Function, "unique", function () {});
459
- Define (Function.unique, "id", function () {
460
- return ("xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx").replace (/[xy]/g, function (c) {
461
- const r = (Math.random () * 16) | 0;
462
- const v = c === "x" ? r : (r & 0x3) | 0x8;
463
- return v.toString (16);
464
- });
465
- });
466
-
467
641
  /**
468
642
  * html
469
643
  *
@@ -477,6 +651,7 @@ Define (Function.unique, "id", function () {
477
651
  Define (Function, "html", class {
478
652
  constructor () {
479
653
  this.head = new Function.html.head (this);
654
+ this.config = {}
480
655
  this.var = {
481
656
  "html:attribute": {},
482
657
  title: "UnTitled",
@@ -534,7 +709,9 @@ Define (Function, "html", class {
534
709
  for (var i in this.var.meta) this.head.meta (this.var.meta [i].attribute, this.var.meta [i].prop);
535
710
  this.head.link ({rel: "icon", href: this.var ["favorite.ico"] || "/favicon.ico"});
536
711
  this.head.link ({rel: "canonical", href: this.var.canonical || "/"});
537
- if (this.var.manifest) this.head.link ({rel: "manifest", href: this.var.manifest || "/manifest.json"});
712
+ if (this.config ["manifest.json"]) this.head.link ({rel: "manifest", href: this.var ["manifest.json"] || "/manifest.json"});
713
+ if (this.config ["feed.xml"]) this.head.link ({rel: "alternate", href: "/feed/", type: "application/rss+xml", title: "{{ site:name }} » Feed"});
714
+ if (this.config ["feed.xml:atom"]) this.head.link ({rel: "alternate", href: "/feed/atom/", type: "application/rss+xml", title: "{{ site:name }} » Feed (Atom)"});
538
715
  this.head.link ({rel: "dns-prefetch", href: "https://www.google-analytics.com"});
539
716
  this.head.link ({rel: "dns-prefetch", href: "https://www.googletagmanager.com"});
540
717
  this.head.link ({rel: "preconnect", href: "https://fonts.gstatic.com"}, "crossorigin");
@@ -554,6 +731,7 @@ Define (Function, "html", class {
554
731
  this.head.script ({src: "https://unpkg.com/lodash@4.17.21/core.min.js"});
555
732
  this.head.script ({src: "https://unpkg.com/vue@3.5.27/dist/vue.global.prod.js"});
556
733
  this.head.script ({src: "https://unpkg.com/vue-router@4.6.4/dist/vue-router.global.prod.js"});
734
+ this.head.script ({src: "/test.js?123"});
557
735
  return this;
558
736
  }
559
737
  render (variable = {}) {
@@ -568,6 +746,11 @@ Define (Function, "html", class {
568
746
  for (var i in this.head.data.style) this.markup.push (2, `<style${Function.html.attribute (this.head.data.style [i].attribute, {space: true, prop: this.head.data.style [i].prop})}>${this.head.data.style [i].css}</style>`);
569
747
  this.markup.push (1, `</head>`);
570
748
  this.markup.push (1, `<body>`);
749
+ this.markup.push (0, `<script>
750
+ Function.ajax.get ("/test1.js", { success () { console.log ("ajax") } })
751
+ Function.ajax.get ("/test2.js", { success () { console.log ("ajax") } })
752
+ Function.ajax.get ("/test3.js", { success () { console.log ("ajax") } })
753
+ </script>`);
571
754
  this.markup.push (1, `</body>`);
572
755
  this.markup.push (0, `</html>`);
573
756
  if (this.var.debug) {
@@ -631,15 +814,313 @@ Define (Function.html, "markup", class {
631
814
  * xxx://xxx.xxx.xxx/xxx
632
815
  */
633
816
 
817
+ /**
818
+ * miscellaneous
819
+ *
820
+ * title
821
+ * description
822
+ * sub description
823
+ *
824
+ * xxx://xxx.xxx.xxx/xxx
825
+ */
826
+
827
+ Define (Function, "help", function () {});
828
+
829
+ Define (Function.help, "argument", function () {
830
+ var result = {string: "", number: 0}
831
+ for (var i in arguments) {
832
+ if (typeof arguments [i] === "string") result.string = arguments [i];
833
+ else if (typeof arguments [i] === "number") result.number = arguments [i];
834
+ }
835
+ return result;
836
+ });
837
+
838
+ Define (Function, "unique", function () {});
839
+ Define (Function.unique, "shuffle", function () { return String.char.alpha.numeric.repeat (16).shuffle ().substr (0, 64); });
840
+ Define (Function.unique, "id", function () {
841
+ return ("xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx").replace (/[xy]/g, function (c) {
842
+ const r = (Math.random () * 16) | 0;
843
+ const v = c === "x" ? r : (r & 0x3) | 0x8;
844
+ return v.toString (16);
845
+ });
846
+ });
847
+
848
+ Function.ajax = function () {}
849
+
850
+ Function.ajax.get = function (url, context) {
851
+ return $.ajax ({
852
+ url,
853
+ ... context,
854
+ });
855
+ }
856
+
857
+ Function.ajax.post = function (url, data, context) {
858
+ return $.ajax ({
859
+ url,
860
+ data: JSON.stringify (data),
861
+ type: "POST",
862
+ dataType: "json",
863
+ ... context,
864
+ });
865
+ }
866
+
867
+ Define (Function, "google", function () {});
868
+ Define (Function.google, "icon", function (icon) { if (Function.google.icon.src [icon]) return "&#x" + Function.google.icon.src [icon] + ";"; else return "XXXXXXXXXXXX"; });
869
+ Define (Function.google.icon, "src", {
870
+ home: "e88a", home_app_logo: "e295", home_storage: "f86c", home_lot_device: "e283",
871
+ archive: "e149", article: "ef42",
872
+ folder: "e2c7", folder_off: "eb83",
873
+ bookmark: "e866", bookmark_star: "f454",
874
+ notification: "e7f4", notification_unread: "f4fe", notification_audio: "eec1", notification_setting: "f367",
875
+ chat: "e0b7", chat_unread: "f189", chat_error: "f7ac",
876
+ check: "e5ca", check_circle: "e86c",
877
+ lock: "e897", lock_clock: "ef57",
878
+ visibility: "e8f4", visibility_off: "e8f5", visibility_lock: "f653",
879
+ thumb_up: "e8dc", thumb_up_double: "eefc", thumb_down: "e8db",
880
+ shield: "e9e0", shield_lock: "f686", shield_locked: "f592", shield_toggle: "f2ad", shield_watch: "f30f",
881
+ arrow_circle_down: "f181", arrow_drop_down: "e5c5",
882
+ menu: "e5d2", more: "e619", more_vertical: "e5d4", more_horizontal: "e5d3",
883
+ delete: "e872", delete_auto: "ea4c", delete_forever: "e92b",
884
+ download: "f090", downloading: "f001", cloud_download: "e2c0", cloud_upload: "e2c3",
885
+ calendar_clock: "f540", calendar_check: "f243", calendar_today: "e935", calendar_lock: "f242",
886
+ globe: "e64c", globe_asia: "f799",
887
+ local_activity: "e53f", local_fire_department: "ef55",
888
+ image: "e3f4", animated_image: "f49a",
889
+ photo: "e410", photo_camera: "e412",
890
+ star: "e838", star_s: "f31c",
891
+ male: "e58e", female: "e590", transgender: "e58d",
892
+ arrow_left_alt: "ef7d", arrow_right_alt: "e941",
893
+ light_bulb: "e0f0", light_bulb_x: "f3e3",
894
+ theater: "e8da", movie: "e02c", play_circle: "e1c4", play_arrow: "e037",
895
+ tv: "e333", tv_guide: "e1dc", live_tv: "e639",
896
+ close: "e5cd",
897
+ cookie: "eaac",
898
+ file_video: "eb87",
899
+ mobile_vibrate: "f2cb",
900
+ admin_panel_setting: "ef3d",
901
+ cloud_lock: "f386",
902
+ comedy_mask: "f4d6",
903
+ encrypted: "e593",
904
+ fingerprint: "e90d",
905
+ health_safety: "e1d5",
906
+ security: "e32a",
907
+ recpmend: "e9d2",
908
+ keep: "e6aa",
909
+ favorite: "e87d",
910
+ heart_broken: "eac2",
911
+ password: "f042",
912
+ person_shield: "e384",
913
+ verified_user: "e8e8",
914
+ supervisor_account: "e8d3",
915
+ visibility: "e8f4",
916
+ id_card: "e8f4",
917
+ passkey: "f87f",
918
+ circle: "ef4a",
919
+ dns: "e875",
920
+ eco: "ea35",
921
+ explore: "e87a",
922
+ share_location: "f05f",
923
+ search: "e8b6",
924
+ sms: "e625",
925
+ subscription: "e064",
926
+ editor_choice: "f528",
927
+ search_activity: "f3e5",
928
+ timer_play: "f4ba",
929
+ playlist_play: "e05f",
930
+ hotel_class: "e743",
931
+ description: "e873",
932
+ contact: "e0ba",
933
+ link: "e157",
934
+ health_and_safety: "e1d5",
935
+ setting_accessibility: "f05d",
936
+ safety_check: "ebef",
937
+ admin_panel_setting: "ef3d",
938
+ rss_feed: "e0e5",
939
+ setting: "e8b8",
940
+ recycling: "e760",
941
+ key: "e73c",
942
+ chart_show: "e6e1",
943
+ trending_up: "e8e5",
944
+ auto_read_play: "f216",
945
+ smart_display: "f06a",
946
+ crown: "ecb3",
947
+ trophy: "e71a",
948
+ review: "f054",
949
+ workspace_premium: "e7af",
950
+ card_star: "f375",
951
+ acute: "e4cb",
952
+ person: "e7fd",
953
+ event: "e878",
954
+ date_range: "e916",
955
+ chronic: "ebb2",
956
+ sticker: "e707",
957
+ flash_on: "e3e7",
958
+ trail_length_short: "eb6d",
959
+ slide_show: "e41b",
960
+ bolt: "ea0b",
961
+ speed: "e9e4",
962
+ rocket: "eba5",
963
+ });
964
+
965
+ Function.owl = function () {}
966
+ Function.owl.carousel = function (element, reference, option) {
967
+ option = option || {}
968
+ var padding = option.padding || 0;
969
+ var setting = {
970
+ onTranslated: option ["on:translate"] || function () {},
971
+ gap: (option.gap || 0),
972
+ loop: (option.loop || false),
973
+ center: (option.center || false),
974
+ nav: (option.nav || false), dots: (option ["nav:dot"] || false),
975
+ autoplay: (option.play === "auto" || option.play || false),
976
+ margin: (option.margin || 10),
977
+ autoWidth: (option.width === "auto" || false),
978
+ stagePadding: (option ["stage:padding"] || 0),
979
+ autoplayTimeout: (option.timeout || 10000),
980
+ autoplayHoverPause: true,
981
+ responsive: option.responsive || Function.owl.carousel ["item:default"],
982
+ }
983
+ var el = $ (element).removeClass ("none");
984
+ if (el) {
985
+ if (reference) el.width ($ (reference).width () - setting.gap - padding);
986
+ el.owlCarousel (setting);
987
+ }
988
+ }
989
+
990
+ Function.owl.carousel ["item:default"] = {
991
+ 0: {items: 1},
992
+ 600: {items: 3},
993
+ 1000: {items: 5},
994
+ }
995
+
996
+ Function.owl.carousel ["item:pop"] = {
997
+ 0: {items: 2},
998
+ 600: {items: 4},
999
+ 1000: {items: 6},
1000
+ }
1001
+
1002
+ Function.owl.carousel ["item:best"] = {
1003
+ 0: {items: 1},
1004
+ 600: {items: 2},
1005
+ 1000: {items: 3},
1006
+ }
1007
+
1008
+ Function.owl.carousel ["item:sky"] = {
1009
+ 0: {items: 1},
1010
+ 600: {items: 3},
1011
+ 1000: {items: 4},
1012
+ }
1013
+
1014
+ Function.owl.carousel ["wide"] = {
1015
+ 0: {items: 1},
1016
+ 600: {items: 3},
1017
+ 1000: {items: 3},
1018
+ }
1019
+
1020
+ Function.owl.carousel ["relation"] = {
1021
+ 0: {items: 2},
1022
+ 600: {items: 3},
1023
+ 1000: {items: 3},
1024
+ }
1025
+
1026
+ Function.owl.carousel ["short"] = {
1027
+ 0: {items: 2},
1028
+ 600: {items: 4},
1029
+ 1000: {items: 6},
1030
+ }
1031
+
1032
+ Function.owl.carousel ["flash"] = {
1033
+ 0: {items: 2},
1034
+ 600: {items: 4},
1035
+ 1000: {items: 6},
1036
+ }
1037
+
1038
+ /**
1039
+ * express
1040
+ *
1041
+ * title
1042
+ * description
1043
+ * sub description
1044
+ *
1045
+ * xxx://xxx.xxx.xxx/xxx
1046
+ */
1047
+
1048
+ Define (Function, "express", function () {});
1049
+
1050
+ Define (Function.express, "request", function (app, request, response, next) {
1051
+ request.error = [];
1052
+ if ("url") {
1053
+ request.protocol = request.header ("x-forwarded-proto") || request.protocol || "http";
1054
+ if (false) if (app.config.internet) request.protocol = "https";
1055
+ request.base_url = `${request.protocol}://${request.host}`;
1056
+ request.http = URL.parse (request.canonical = `${request.base_url}${request.url}`);
1057
+ request.domain = request.http.domain;
1058
+ request.param = function param (param) { return request.params [param] || ""; }
1059
+ request.param.query = function param (query) { return request.http.queries [query] || ""; }
1060
+ }
1061
+ if ("visitor") {
1062
+ var ip_address = request.headers ["x-real-ip"] || "127.0.0.1";
1063
+ var country_code = request.headers ["x-vercel-ip-country"] || "";
1064
+ var country_name = "";
1065
+ var country_region = request.headers ["x-vercel-ip-country-region"] || "";
1066
+ var country_city_code = "";
1067
+ var country_city_name = request.headers ["x-vercel-ip-city"] || "";
1068
+ var country_timezone = request.headers ["x-vercel-ip-timezone"] || "";
1069
+ var coordinate_latitude = request.headers ["x-vercel-ip-latitude"] || "";
1070
+ var coordinate_longitude = request.headers ["x-vercel-ip-longitude"] || "";
1071
+ request.visitor = {
1072
+ ip: {address: ip_address},
1073
+ country: {code: country_code, name: country_name, region: country_region, city: {name: country_city_name}, timezone: country_timezone, coordinate: {latitude: coordinate_latitude, longitude: coordinate_longitude}},
1074
+ browser: request.header ("user-agent"),
1075
+ }
1076
+ }
1077
+ request.date = new Date.io ();
1078
+ request.db = function () {}
1079
+ request.instance = function () {}
1080
+ request.theme = function () {}
1081
+ });
1082
+
1083
+ Define (Function.express, "response", function (app, request, response, next) {
1084
+ response.header.set = function (... header) { return response.setHeader (... header); }
1085
+ response.text = function (data) { return response.type ("text").send (data); }
1086
+ response.css = function (data) { return response.type ("css").send (data); }
1087
+ response.js = function (data) { return response.type ("js").send (data); }
1088
+ response.xml = function (data) { return response.type ("xml").send (data); }
1089
+ response.img = function () {}
1090
+ response.img.png = function (data) { return response.type ("image/png").send (data); }
1091
+ response.var = Object.create (null);
1092
+ response.output = new $.html ();
1093
+ // response.html = function (data) { return response.send (data); }
1094
+ if ("error") {
1095
+ response.error = function (data) { return response.status (500).send (data || URL.header.status.code [500]); }
1096
+ response.error.forbidden = function (data) { return response.status (403).send (data || URL.header.status.code [403]); }
1097
+ response.error.exist = function (data) { return response.status (404).send (data || URL.header.status.code [404]); }
1098
+ }
1099
+ response.db = function () {}
1100
+ });
1101
+
1102
+ /**
1103
+ * xxx
1104
+ *
1105
+ * title
1106
+ * description
1107
+ * sub description
1108
+ *
1109
+ * xxx://xxx.xxx.xxx/xxx
1110
+ */
1111
+
634
1112
  Symbol.export = {
635
1113
  define: Object.define,
636
1114
  object: Object, array: Array, string: String, number: Number, function: Function,
637
1115
  date: Date, time: Date.time, event: Event, promise: Promise,
638
1116
  url: URL, serialize: Function.serialize, xml: Function.xml, json: JSON,
1117
+ cookie: Function.cookie,
639
1118
  path: Function.path, file: Function.file, dir: Function.dir,
640
1119
  html: Function.html,
641
1120
  hash: Function.hash, unique: Function.unique,
642
- appwrite: Function.appwrite,
1121
+ help: Function.help, next: function (resolve) { return Promise.resolve (resolve); },
1122
+ ajax: Function.ajax, owl: Function.owl,
1123
+ express: Function.express, appwrite: Function.appwrite, google: Function.google,
643
1124
  }
644
1125
 
645
1126
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "script.io.js",
3
3
  "description": "Hello World",
4
- "version": "2026.123.955",
4
+ "version": "2026.124.153",
5
5
  "author": "Seindi Rahmat Barus <xseindi@gmail.com>",
6
6
  "contributors": [
7
7
  "Seindi Rahmat Barus <xseindi@gmail.com>"