File manager - Edit - /home/webapp69.cm.in.th/u69319090023/Shop23/_next/static/chunks/11perhnr18y3w.js
Back
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,84026,t=>{"use strict";let e=(0,t.i(56420).default)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);t.s(["ShieldCheck",0,e],84026)},67927,t=>{"use strict";let e=(0,t.i(56420).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);t.s(["ChevronRight",0,e],67927)},79258,t=>{"use strict";let e=(0,t.i(56420).default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);t.s(["Package",0,e],79258)},24071,t=>{"use strict";let e=(0,t.i(56420).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);t.s(["ChevronLeft",0,e],24071)},70387,t=>{"use strict";let e=(0,t.i(56420).default)("credit-card",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);t.s(["CreditCard",0,e],70387)},77071,t=>{"use strict";let e=(0,t.i(56420).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);t.s(["Plus",0,e],77071)},35829,t=>{"use strict";let e=(0,t.i(56420).default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);t.s(["Minus",0,e],35829)},23067,t=>{"use strict";let e=()=>{let t=window.location.pathname;return t.includes("/u69319090023/Shop23")?"/u69319090023/Shop23/api":t.includes("/Shop23")?"/Shop23/api":t.includes("/CMTC SHOP")||t.includes("/CMTC%20SHOP")?"/CMTC%20SHOP/api":"/api"},a=t=>Array.isArray(t)?t.filter(t=>{var e;return t&&t.id&&!((e=t.id)&&(e.startsWith("prod_170000000000")||e.startsWith("prod_tshirt_")||e.startsWith("prod_polo_")||e.startsWith("prod_hoodie_")||e.startsWith("prod_shop_")||e.startsWith("prod_cap_")||e.startsWith("prod_belt_")||e.startsWith("prod_badge_")||e.startsWith("prod_jacket_")||e.startsWith("prod_amulet_")||e.startsWith("prod_bag_")||e.startsWith("prod_backpack_")||!/^prod_\d+$/.test(e)))&&!t.id.startsWith("prod_170000000000")&&"เสื้อเกราะ"!==t.name&&"รถมอเตอร์ไซค์ไฟฟ้า"!==t.name&&"รถมอเตอร์ไซค์"!==t.name}):[],s=()=>{let t=localStorage.getItem("ctc_products"),e=[];if(t)try{e=JSON.parse(t)}catch{e=[]}let s=a(e);return s.length!==e.length&&(e=s,localStorage.setItem("ctc_products",JSON.stringify(e))),e},r=t=>{let e=a(t);localStorage.setItem("ctc_products",JSON.stringify(e)),window.dispatchEvent(new Event("storage"))},i=class{static async getProducts(){let t=s();try{let s=e(),i=await fetch(`${s}/products.php`,{cache:"no-store"});if(i.ok){let e=await i.json();if(e&&e.success&&Array.isArray(e.data)&&e.data.length>0){let s=a(e.data),i=new Map;s.forEach(t=>i.set(t.id,t)),t.forEach(t=>{i.has(t.id)||i.set(t.id,t)});let c=Array.from(i.values());return r(c),c}}}catch(t){}return t}static async getRecommendedProducts(){let t=await this.getProducts();if(!t||0===t.length)return[];let e=t.filter(t=>t.isRecommended);return e.length>=3?e:[...e,...t.filter(t=>!t.isRecommended)]}static async getProductById(t){let a=s(),i=a.find(e=>e.id===t);if(i)return i;try{let s=e(),i=await fetch(`${s}/products.php?id=${encodeURIComponent(t)}`,{cache:"no-store"});if(i.ok){let e=await i.json();if(e&&e.success&&e.data){let s=e.data,i=[s,...a.filter(e=>e.id!==t)];return r(i),s}}}catch{}}static async getProductBySlug(t){let a=s(),i=a.find(e=>e.slug===t);if(i)return i;try{let s=e(),i=await fetch(`${s}/products.php?slug=${encodeURIComponent(t)}`,{cache:"no-store"});if(i.ok){let t=await i.json();if(t&&t.success&&t.data){let e=t.data,s=[e,...a.filter(t=>t.id!==e.id)];return r(s),e}}}catch{}}static async saveProduct(t){let a=s();r(-1!==a.findIndex(e=>e.id===t.id)?a.map(e=>e.id===t.id?t:e):[t,...a]);try{let a=e();await fetch(`${a}/products.php`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}catch(t){console.warn("Backend sync failed, saved locally:",t)}return t}static async deleteProduct(t){r(s().filter(e=>e.id!==t));try{let a=e();await fetch(`${a}/products.php?id=${encodeURIComponent(t)}`,{method:"DELETE"})}catch(t){console.warn("Backend delete sync failed:",t)}return!0}static async updateProducts(t){return r(t),!0}static async updateProductStock(t,a,i){let c=s(),d=c.findIndex(e=>e.id===t);if(-1!==d){c[d].inStock=a,void 0!==i&&(c[d].stockCount=i),r(c);try{let s=e();await fetch(`${s}/products.php`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:t,inStock:a,stockCount:i})})}catch(t){}return!0}return!1}};t.s(["default",0,i])},86563,t=>{"use strict";let e=(0,t.i(56420).default)("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);t.s(["Star",0,e],86563)},11241,t=>{"use strict";let e=(0,t.i(56420).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);t.s(["ArrowLeft",0,e],11241)},76248,t=>{"use strict";let e=(0,t.i(56420).default)("circle-question-mark",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);t.s(["HelpCircle",0,e],76248)}]);
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.23 |
proxy
|
phpinfo
|
Settings