@akinon/projectzero 2.0.0-beta.11 → 2.0.0-beta.13
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/CHANGELOG.md +104 -21
- package/app-template/.env.example +1 -0
- package/app-template/.github/instructions/account.instructions.md +749 -0
- package/app-template/.github/instructions/checkout.instructions.md +678 -0
- package/app-template/.github/instructions/default.instructions.md +279 -0
- package/app-template/.github/instructions/edge-cases.instructions.md +73 -0
- package/app-template/.github/instructions/routing.instructions.md +603 -0
- package/app-template/.github/instructions/settings.instructions.md +338 -0
- package/app-template/.gitignore +3 -0
- package/app-template/AGENTS.md +7 -0
- package/app-template/CHANGELOG.md +1348 -284
- package/app-template/Procfile +1 -1
- package/app-template/akinon.json +0 -3
- package/app-template/build.sh +10 -0
- package/app-template/docs/advanced-usage.md +101 -0
- package/app-template/docs/sentry-usage.md +35 -0
- package/app-template/next-env.d.ts +1 -0
- package/app-template/{next.config.ts → next.config.mjs} +6 -6
- package/app-template/package.json +58 -51
- package/app-template/postcss.config.mjs +1 -4
- package/app-template/public/locales/en/checkout.json +6 -0
- package/app-template/public/locales/en/common.json +50 -1
- package/app-template/public/locales/en/product.json +62 -1
- package/app-template/public/locales/tr/checkout.json +6 -0
- package/app-template/public/locales/tr/common.json +50 -1
- package/app-template/public/locales/tr/product.json +63 -0
- package/app-template/public/masterpass-javascript-sdk-web.min.js +1 -0
- package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/[...prettyurl]/page.tsx +9 -9
- package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/account/layout.tsx +2 -2
- package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/account/orders/[id]/cancellation/page.tsx +6 -6
- package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/account/orders/[id]/page.tsx +6 -6
- package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/account/page.tsx +1 -1
- package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/account/profile/page.tsx +2 -2
- package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/address/stores/page.tsx +2 -2
- package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/auth/page.tsx +1 -1
- package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/basket/page.tsx +2 -2
- package/app-template/src/app/[pz]/category/[pk]/page.tsx +27 -0
- package/app-template/src/app/[pz]/flat-page/[pk]/page.tsx +23 -0
- package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/forms/[pk]/generate/page.tsx +2 -3
- package/app-template/src/app/[pz]/group-product/[pk]/page.tsx +93 -0
- package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/landing-page/[pk]/page.tsx +2 -4
- package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/layout.tsx +3 -10
- package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/list/page.tsx +2 -4
- package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/not-found.tsx +5 -7
- package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/orders/completed/[token]/page.tsx +6 -4
- package/app-template/src/app/[pz]/product/[pk]/page.tsx +102 -0
- package/app-template/src/app/[pz]/special-page/[pk]/page.tsx +35 -0
- package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/users/email-set-primary/[[...id]]/page.tsx +3 -4
- package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/users/registration/account-confirm-email/[[...id]]/page.tsx +3 -3
- package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/users/reset/[[...id]]/page.tsx +6 -12
- package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/xml-sitemap/[node]/route.ts +2 -2
- package/app-template/src/app/api/auth/[...nextauth]/route.ts +3 -0
- package/app-template/src/app/api/form/[...id]/route.ts +1 -7
- package/app-template/src/app/api/image-proxy/route.ts +1 -0
- package/app-template/src/app/api/product-categories/route.ts +1 -0
- package/app-template/src/app/api/similar-product-list/route.ts +1 -0
- package/app-template/src/app/api/similar-products/route.ts +1 -0
- package/app-template/src/app/api/virtual-try-on/limited-categories/route.ts +1 -0
- package/app-template/src/app/api/virtual-try-on/route.ts +1 -0
- package/app-template/src/assets/globals.scss +4 -133
- package/app-template/src/auth.ts +3 -0
- package/app-template/src/components/__tests__/badge.test.tsx +2 -2
- package/app-template/src/components/__tests__/link.test.tsx +2 -0
- package/app-template/src/components/accordion.tsx +23 -20
- package/app-template/src/components/button.tsx +1 -1
- package/app-template/src/components/carousel-core.tsx +4 -11
- package/app-template/src/components/checkbox.tsx +1 -1
- package/app-template/src/components/currency-select.tsx +1 -0
- package/app-template/src/components/file-input.tsx +27 -7
- package/app-template/src/components/generate-form-fields.tsx +49 -10
- package/app-template/src/components/input.tsx +11 -5
- package/app-template/src/components/modal.tsx +32 -16
- package/app-template/src/components/pagination.tsx +1 -0
- package/app-template/src/components/price.tsx +1 -1
- package/app-template/src/components/pwa-tags.tsx +1 -0
- package/app-template/src/components/select.tsx +39 -27
- package/app-template/src/components/shimmer.tsx +1 -1
- package/app-template/src/components/types/index.ts +25 -1
- package/app-template/src/hooks/use-fav-button.tsx +4 -8
- package/app-template/src/hooks/use-product-cart.ts +77 -0
- package/app-template/src/hooks/use-stock-alert.ts +74 -0
- package/app-template/src/plugins.js +12 -2
- package/app-template/src/redux/middlewares/category.ts +5 -4
- package/app-template/src/redux/store.ts +21 -1
- package/app-template/src/routes/index.ts +2 -1
- package/app-template/src/settings.js +3 -1
- package/app-template/src/types/index.ts +74 -3
- package/app-template/src/types/next-auth.d.ts +2 -2
- package/app-template/src/utils/variant-validation.ts +41 -0
- package/app-template/src/views/account/address-form.tsx +8 -4
- package/app-template/src/views/account/contact-form.tsx +2 -2
- package/app-template/src/views/account/content-header.tsx +4 -3
- package/app-template/src/views/account/faq/faq-tabs.tsx +8 -2
- package/app-template/src/views/account/order.tsx +1 -1
- package/app-template/src/views/account/orders/order-cancellation-item.tsx +1 -1
- package/app-template/src/views/anonymous-tracking/order-detail/index.tsx +1 -1
- package/app-template/src/views/basket/basket-item.tsx +6 -1
- package/app-template/src/views/basket/summary.tsx +16 -0
- package/app-template/src/views/breadcrumb.tsx +2 -2
- package/app-template/src/views/category/category-info.tsx +2 -1
- package/app-template/src/views/category/filters/index.tsx +1 -1
- package/app-template/src/views/checkout/auth.tsx +1 -1
- package/app-template/src/views/checkout/layout/header.tsx +1 -1
- package/app-template/src/views/checkout/steps/payment/options/credit-card/index.tsx +1 -1
- package/app-template/src/views/checkout/steps/payment/options/store-credit.tsx +121 -0
- package/app-template/src/views/checkout/steps/payment/payment-option-buttons.tsx +4 -4
- package/app-template/src/views/checkout/steps/shipping/address-box.tsx +3 -3
- package/app-template/src/views/checkout/steps/shipping/addresses.tsx +1 -1
- package/app-template/src/views/checkout/summary.tsx +12 -2
- package/app-template/src/views/find-in-store/index.tsx +2 -2
- package/app-template/src/views/header/action-menu.tsx +2 -6
- package/app-template/src/views/header/band.tsx +2 -2
- package/app-template/src/views/header/index.tsx +1 -1
- package/app-template/src/views/header/mini-basket.tsx +2 -2
- package/app-template/src/views/header/mobile-menu.tsx +6 -6
- package/app-template/src/views/header/navbar.tsx +1 -1
- package/app-template/src/views/header/pwa-back-button.tsx +1 -1
- package/app-template/src/views/header/search/index.tsx +13 -3
- package/app-template/src/views/header/search/results.tsx +1 -1
- package/app-template/src/views/header/user-menu.tsx +1 -3
- package/app-template/src/views/login/index.tsx +14 -13
- package/app-template/src/views/otp-login/index.tsx +11 -6
- package/app-template/src/views/product/layout.tsx +15 -1
- package/app-template/src/views/product/product-actions.tsx +165 -0
- package/app-template/src/views/product/product-info.tsx +69 -261
- package/app-template/src/views/product/product-share.tsx +56 -0
- package/app-template/src/views/product/product-variants.tsx +26 -0
- package/app-template/src/views/product/slider.tsx +22 -1
- package/app-template/src/views/product-pointer-banner-item.tsx +1 -1
- package/app-template/src/views/register/index.tsx +17 -21
- package/app-template/src/views/sales-contract-modal/index.tsx +17 -17
- package/app-template/src/widgets/footer-info.tsx +1 -1
- package/app-template/src/widgets/footer-menu.tsx +7 -3
- package/app-template/src/widgets/footer-subscription/index.tsx +1 -1
- package/app-template/src/widgets/home-stories-eng.tsx +43 -35
- package/app-template/tailwind.config.js +129 -1
- package/app-template/tsconfig.json +29 -11
- package/codemods/migrate-segments/index.js +591 -0
- package/commands/plugins.ts +62 -14
- package/dist/commands/plugins.js +62 -14
- package/package.json +1 -1
- package/app-template/src/app/[commerce]/[locale]/[currency]/category/[pk]/page.tsx +0 -22
- package/app-template/src/app/[commerce]/[locale]/[currency]/flat-page/[pk]/page.tsx +0 -20
- package/app-template/src/app/[commerce]/[locale]/[currency]/group-product/[pk]/page.tsx +0 -74
- package/app-template/src/app/[commerce]/[locale]/[currency]/product/[pk]/page.tsx +0 -84
- package/app-template/src/app/[commerce]/[locale]/[currency]/special-page/[pk]/page.tsx +0 -27
- package/app-template/src/pages/api/auth/[...nextauth].ts +0 -3
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/account/address/page.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/account/change-email/page.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/account/change-password/page.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/account/contact/page.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/account/coupons/page.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/account/email-verification/page.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/account/faq/page.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/account/favourite-products/page.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/account/my-quotations/page.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/account/orders/[id]/layout.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/account/orders/page.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/anonymous-tracking/page.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/auth/oauth-login/page.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/basket-b2b/page.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/category/[pk]/loading.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/client-root.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/contact-us/page.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/error.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/flat-page/[pk]/loading.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/group-product/[pk]/loading.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/landing-page/[pk]/loading.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/list/loading.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/orders/checkout/page.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/orders/completed/[token]/layout.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/page.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/special-page/[pk]/loading.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/template.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/users/password/reset/page.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/xml-sitemap/route.ts +0 -0
|
@@ -35,5 +35,68 @@
|
|
|
35
35
|
"success_description": "Bedeniniz stoklara tekrar girdiğinde şu adrese bir e-posta göndereceğiz: <Email/>",
|
|
36
36
|
"error_description": "Beklenmeyen bir hata oluştu. Lütfen daha sonra tekrar deneyiniz.",
|
|
37
37
|
"close_button": "KAPAT"
|
|
38
|
+
},
|
|
39
|
+
"virtual_try_on": {
|
|
40
|
+
"title": "Üstünde Dene",
|
|
41
|
+
"title_result": "Üstünde Dene Sonucu",
|
|
42
|
+
"button_text": "Sanal Deneme Kabinine Gir",
|
|
43
|
+
"loading": "Yükleniyor...",
|
|
44
|
+
"upload_title": "Fotoğrafınızı Yükleyin",
|
|
45
|
+
"upload_prompt": "Bir dosya seçin veya buraya sürükleyip bırakın.",
|
|
46
|
+
"upload_requirements": "JPEG/PNG/WebP formatında, maksimum 1MB",
|
|
47
|
+
"instructions": "En iyi sanal deneme deneyimi için net bir fotoğrafınızı yükleyin. Kameraya doğrudan baktığınızdan emin olun.",
|
|
48
|
+
"try_on": "Dene",
|
|
49
|
+
"edit_photo": "Fotoğrafı Düzenle",
|
|
50
|
+
"upload_info": "Uygulamaya uygun fotograf yüklemeniz çok önemlidir.",
|
|
51
|
+
"processing": "İşleniyor...",
|
|
52
|
+
"processing_title": "Birazdan hazır!",
|
|
53
|
+
"processing_message": "En iyi sonucu sunabilmek için fotoğrafınızı işliyoruz. Lütfen bekleyiniz.",
|
|
54
|
+
"result_title": "Sanal Kabin Sonuç",
|
|
55
|
+
"virtual_cabin": "Sanal Kabin",
|
|
56
|
+
"result_placeholder": "Sonucu görmek için fotoğrafınızı yükleyin",
|
|
57
|
+
"error": "Sanal deneme başarısız oldu. Lütfen tekrar deneyin.",
|
|
58
|
+
"error_message": "Modelin net bir şekilde göründüğü daha sade bir arka plana sahip görselle tekrar deneyin.",
|
|
59
|
+
"feedback_prompt": "Sanal deneme sizin için nasıldı?",
|
|
60
|
+
"feedback_like": "Beğendim",
|
|
61
|
+
"feedback_dislike": "Beğenmedim",
|
|
62
|
+
"reset_crop": "Kırpma Sıfırla",
|
|
63
|
+
"retry": "Yeniden Dene",
|
|
64
|
+
"retry_upload": "Tekrar Yükle",
|
|
65
|
+
"click_to_view_details": "Detayları görüntülemek için görsele tıklayın.",
|
|
66
|
+
"back_to_basket": "Sepete Dön",
|
|
67
|
+
"products_listed_count": "Sepetinizdeki ürünlerden Sanal Kabin'de denemeye uygun {{count}} tanesi listelenmiştir.",
|
|
68
|
+
"select_up_to_3": "Devam etmek için en fazla 3 ürünü seçiniz.",
|
|
69
|
+
"select_products": "Ürünleri Seç",
|
|
70
|
+
"no_suitable_products": "Sepetinizde sanal deneme kabini için uygun ürün bulunmuyor.",
|
|
71
|
+
"rule_1": "Arka plan sade ve iyi aydınlatılmış olmalıdır.",
|
|
72
|
+
"rule_2": "Aydınlık, net ve yüksek kaliteli bir görsel seçin.",
|
|
73
|
+
"rule_3": "Üzerinizdeki detaylar net bir şekilde ayırt edilebilir olmalıdır.",
|
|
74
|
+
"rule_4": "Doğrudan kameraya bakın ve yüzünüzü tam karşıdan gösterin.",
|
|
75
|
+
"rule_5": "Fotoğrafı denemek istediğiniz ürüne göre kırpın.",
|
|
76
|
+
"rule_6": "Yalnızca JPEG veya PNG formatındaki görselleri yükleyebilirsiniz.",
|
|
77
|
+
"photo_preview": "Fotoğraf Önizleme",
|
|
78
|
+
"error_title": "Bir Hata Oluştu",
|
|
79
|
+
"example_iamge": "Örnek Görsel",
|
|
80
|
+
"cabin": "Sanal Deneme Kabini",
|
|
81
|
+
"legal": {
|
|
82
|
+
"title": "Açık Rıza Metni",
|
|
83
|
+
"text": "Yükleyeceğim görselin, <strong>yapay zekâ destekli işleme, iyileştirme, analiz ve içerik oluşturma</strong> amaçlarıyla kullanılmasına <strong>açık rıza verdiğimi</strong> beyan ederim.",
|
|
84
|
+
"accept": "Onayla",
|
|
85
|
+
"error": "Lütfen açık rıza metnini onaylayın."
|
|
86
|
+
},
|
|
87
|
+
"multiple_results_title": "Sanal Deneme Sonuçları",
|
|
88
|
+
"multiple_results_subtitle": "{{count}} ürün için deneme tamamlandı",
|
|
89
|
+
"error_incompatible": "Görüntü Uyumlu Değil",
|
|
90
|
+
"error_auto_reported": "Hata otomatik olarak bildirildi",
|
|
91
|
+
"feedback_question": "Sonuç nasıldı?",
|
|
92
|
+
"feedback_success": "Başarılı",
|
|
93
|
+
"feedback_failed": "Başarısız",
|
|
94
|
+
"feedback_thank_you": "Geri bildiriminiz alındı, teşekkürler!",
|
|
95
|
+
"recreate_button": "Yeniden Oluştur",
|
|
96
|
+
"close_button": "Kapat",
|
|
97
|
+
"change_photo": "Değiştir",
|
|
98
|
+
"starting": "Başlatılıyor...",
|
|
99
|
+
"will_start": "için sanal deneme başlatılacak",
|
|
100
|
+
"products_count": "ürün"
|
|
38
101
|
}
|
|
39
102
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function n(o,i,a){function s(e,t){if(!i[e]){if(!o[e]){var r="function"==typeof require&&require;if(!t&&r)return r(e,!0);if(c)return c(e,!0);throw(t=new Error("Cannot find module '"+e+"'")).code="MODULE_NOT_FOUND",t}r=i[e]={exports:{}},o[e][0].call(r.exports,function(t){return s(o[e][1][t]||t)},r,r.exports,n,o,i,a)}return i[e].exports}for(var c="function"==typeof require&&require,t=0;t<a.length;t++)s(a[t]);return s}({1:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,function(t){t=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);r=r.call(t,e||"default");if("object"!==o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"===o(t)?t:String(t)}(n.key),n)}}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;r.default=function(){function t(){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function")}var e,r,n;return e=t,(r=[{key:"encrypt",value:function(t){return T.encrypt(t)}}])&&i(e.prototype,r),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function m(t,e,r){null!=t&&("number"==typeof t?this.fromNumber(t,e,r):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}function g(){return new m(null)}r="Microsoft Internet Explorer"==navigator.appName?(m.prototype.am=function(t,e,r,n,o,i){for(var a=32767&e,s=e>>15;0<=--i;){var c=32767&this[t],u=this[t++]>>15,l=s*c+u*a;o=((c=a*c+((32767&l)<<15)+r[n]+(1073741823&o))>>>30)+(l>>>15)+s*u+(o>>>30),r[n++]=1073741823&c}return o},30):"Netscape"!=navigator.appName?(m.prototype.am=function(t,e,r,n,o,i){for(;0<=--i;){var a=e*this[t++]+r[n]+o;o=Math.floor(a/67108864),r[n++]=67108863&a}return o},26):(m.prototype.am=function(t,e,r,n,o,i){for(var a=16383&e,s=e>>14;0<=--i;){var c=16383&this[t],u=this[t++]>>14,l=s*c+u*a;o=((c=a*c+((16383&l)<<14)+r[n]+o)>>28)+(l>>14)+s*u,r[n++]=268435455&c}return o},28),m.prototype.DB=r,m.prototype.DM=(1<<r)-1,m.prototype.DV=1<<r;m.prototype.FV=Math.pow(2,52),m.prototype.F1=52-r,m.prototype.F2=2*r-52;for(var n="0123456789abcdefghijklmnopqrstuvwxyz",c=new Array,a="0".charCodeAt(0),s=0;s<=9;++s)c[a++]=s;for(a="a".charCodeAt(0),s=10;s<36;++s)c[a++]=s;for(a="A".charCodeAt(0),s=10;s<36;++s)c[a++]=s;function u(t){return n.charAt(t)}function l(t){var e=g();return e.fromInt(t),e}function b(t){var e,r=1;return 0!=(e=t>>>16)&&(t=e,r+=16),0!=(e=t>>8)&&(t=e,r+=8),0!=(e=t>>4)&&(t=e,r+=4),0!=(e=t>>2)&&(t=e,r+=2),0!=(e=t>>1)&&(t=e,r+=1),r}function h(t){this.m=t}function f(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}function p(){this.i=0,this.j=0,this.S=new Array}h.prototype.convert=function(t){return t.s<0||0<=t.compareTo(this.m)?t.mod(this.m):t},h.prototype.revert=function(t){return t},h.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},h.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},h.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},f.prototype.convert=function(t){var e=g();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&0<e.compareTo(m.ZERO)&&this.m.subTo(e,e),e},f.prototype.revert=function(t){var e=g();return t.copyTo(e),this.reduce(e),e},f.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var r=32767&t[e],n=r*this.mpl+((r*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(t[r=e+this.m.t]+=this.m.am(0,n,t,e,0,this.m.t);t[r]>=t.DV;)t[r]-=t.DV,t[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),0<=t.compareTo(this.m)&&t.subTo(this.m,t)},f.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},f.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},m.prototype.copyTo=function(t){for(var e=this.t-1;0<=e;--e)t[e]=this[e];t.t=this.t,t.s=this.s},m.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,0<t?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},m.prototype.fromString=function(t,e){var r;if(16==e)r=4;else if(8==e)r=3;else if(256==e)r=8;else if(2==e)r=1;else if(32==e)r=5;else{if(4!=e)return void this.fromRadix(t,e);r=2}this.t=0,this.s=0;for(var n,o=t.length,i=!1,a=0;0<=--o;){var s=8==r?255&t[o]:(s=o,null==(n=c[(n=t).charCodeAt(s)])?-1:n);s<0?"-"==t.charAt(o)&&(i=!0):(i=!1,0==a?this[this.t++]=s:a+r>this.DB?(this[this.t-1]|=(s&(1<<this.DB-a)-1)<<a,this[this.t++]=s>>this.DB-a):this[this.t-1]|=s<<a,(a+=r)>=this.DB&&(a-=this.DB))}8==r&&0!=(128&t[0])&&(this.s=-1,0<a)&&(this[this.t-1]|=(1<<this.DB-a)-1<<a),this.clamp(),i&&m.ZERO.subTo(this,this)},m.prototype.clamp=function(){for(var t=this.s&this.DM;0<this.t&&this[this.t-1]==t;)--this.t},m.prototype.dlShiftTo=function(t,e){for(var r=this.t-1;0<=r;--r)e[r+t]=this[r];for(r=t-1;0<=r;--r)e[r]=0;e.t=this.t+t,e.s=this.s},m.prototype.drShiftTo=function(t,e){for(var r=t;r<this.t;++r)e[r-t]=this[r];e.t=Math.max(this.t-t,0),e.s=this.s},m.prototype.lShiftTo=function(t,e){for(var r=t%this.DB,n=this.DB-r,o=(1<<n)-1,i=Math.floor(t/this.DB),a=this.s<<r&this.DM,s=this.t-1;0<=s;--s)e[s+i+1]=this[s]>>n|a,a=(this[s]&o)<<r;for(s=i-1;0<=s;--s)e[s]=0;e[i]=a,e.t=this.t+i+1,e.s=this.s,e.clamp()},m.prototype.rShiftTo=function(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t)e.t=0;else{var n=t%this.DB,o=this.DB-n,i=(1<<n)-1;e[0]=this[r]>>n;for(var a=r+1;a<this.t;++a)e[a-r-1]|=(this[a]&i)<<o,e[a-r]=this[a]>>n;0<n&&(e[this.t-r-1]|=(this.s&i)<<o),e.t=this.t-r,e.clamp()}},m.prototype.subTo=function(t,e){for(var r=0,n=0,o=Math.min(t.t,this.t);r<o;)n+=this[r]-t[r],e[r++]=n&this.DM,n>>=this.DB;if(t.t<this.t){for(n-=t.s;r<this.t;)n+=this[r],e[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<t.t;)n-=t[r],e[r++]=n&this.DM,n>>=this.DB;n-=t.s}e.s=n<0?-1:0,n<-1?e[r++]=this.DV+n:0<n&&(e[r++]=n),e.t=r,e.clamp()},m.prototype.multiplyTo=function(t,e){var r=this.abs(),n=t.abs(),o=r.t;for(e.t=o+n.t;0<=--o;)e[o]=0;for(o=0;o<n.t;++o)e[o+r.t]=r.am(0,n[o],e,o,0,r.t);e.s=0,e.clamp(),this.s!=t.s&&m.ZERO.subTo(e,e)},m.prototype.squareTo=function(t){for(var e=this.abs(),r=t.t=2*e.t;0<=--r;)t[r]=0;for(r=0;r<e.t-1;++r){var n=e.am(r,e[r],t,2*r,0,1);(t[r+e.t]+=e.am(r+1,2*e[r],t,2*r+1,n,e.t-r-1))>=e.DV&&(t[r+e.t]-=e.DV,t[r+e.t+1]=1)}0<t.t&&(t[t.t-1]+=e.am(r,e[r],t,2*r,0,1)),t.s=0,t.clamp()},m.prototype.divRemTo=function(t,e,r){var n=t.abs();if(!(n.t<=0)){var o=this.abs();if(o.t<n.t)null!=e&&e.fromInt(0),null!=r&&this.copyTo(r);else{null==r&&(r=g());var i=g(),a=this.s,t=t.s,s=this.DB-b(n[n.t-1]),c=(0<s?(n.lShiftTo(s,i),o.lShiftTo(s,r)):(n.copyTo(i),o.copyTo(r)),i.t),u=i[c-1];if(0!=u){var n=u*(1<<this.F1)+(1<c?i[c-2]>>this.F2:0),l=this.FV/n,h=(1<<this.F1)/n,f=1<<this.F2,p=r.t,d=p-c,v=null==e?g():e;for(i.dlShiftTo(d,v),0<=r.compareTo(v)&&(r[r.t++]=1,r.subTo(v,r)),m.ONE.dlShiftTo(c,v),v.subTo(i,i);i.t<c;)i[i.t++]=0;for(;0<=--d;){var y=r[--p]==u?this.DM:Math.floor(r[p]*l+(r[p-1]+f)*h);if((r[p]+=i.am(0,y,r,d,0,c))<y)for(i.dlShiftTo(d,v),r.subTo(v,r);r[p]<--y;)r.subTo(v,r)}null!=e&&(r.drShiftTo(c,e),a!=t)&&m.ZERO.subTo(e,e),r.t=c,r.clamp(),0<s&&r.rShiftTo(s,r),a<0&&m.ZERO.subTo(r,r)}}}},m.prototype.invDigit=function(){var t,e;return this.t<1||0==(1&(t=this[0]))?0:0<(e=(e=(e=(e=(e=3&t)*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)?this.DV-e:-e},m.prototype.isEven=function(){return 0==(0<this.t?1&this[0]:this.s)},m.prototype.exp=function(t,e){if(4294967295<t||t<1)return m.ONE;var r,n=g(),o=g(),i=e.convert(this),a=b(t)-1;for(i.copyTo(n);0<=--a;)e.sqrTo(n,o),0<(t&1<<a)?e.mulTo(o,i,n):(r=n,n=o,o=r);return e.revert(n)},m.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var r,n=(1<<e)-1,o=!1,i="",a=this.t,s=this.DB-a*this.DB%e;if(0<a--)for(s<this.DB&&0<(r=this[a]>>s)&&(o=!0,i=u(r));0<=a;)s<e?(r=(this[a]&(1<<s)-1)<<e-s,r|=this[--a]>>(s+=this.DB-e)):(r=this[a]>>(s-=e)&n,s<=0&&(s+=this.DB,--a)),(o=0<r?!0:o)&&(i+=u(r));return o?i:"0"},m.prototype.negate=function(){var t=g();return m.ZERO.subTo(this,t),t},m.prototype.abs=function(){return this.s<0?this.negate():this},m.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;if(0!=(e=r-t.t))return this.s<0?-e:e;for(;0<=--r;)if(0!=(e=this[r]-t[r]))return e;return 0},m.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+b(this[this.t-1]^this.s&this.DM)},m.prototype.mod=function(t){var e=g();return this.abs().divRemTo(t,null,e),this.s<0&&0<e.compareTo(m.ZERO)&&t.subTo(e,e),e},m.prototype.modPowInt=function(t,e){return e=new(t<256||e.isEven()?h:f)(e),this.exp(t,e)},m.ZERO=l(0),m.ONE=l(1),p.prototype.init=function(t){for(var e,r,n=0;n<256;++n)this.S[n]=n;for(n=e=0;n<256;++n)e=e+this.S[n]+t[n%t.length]&255,r=this.S[n],this.S[n]=this.S[e],this.S[e]=r;this.i=0,this.j=0},p.prototype.next=function(){var t;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,t=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]};var d,v=256;function y(){var t;t=(new Date).getTime(),w[D++]^=255&t,w[D++]^=t>>8&255,w[D++]^=t>>16&255,w[D++]^=t>>24&255,v<=D&&(D-=v)}if(null==w){var w=new Array,D=0;if(window.crypto&&window.crypto.getRandomValues){var S=new Uint8Array(32);for(window.crypto.getRandomValues(S),j=0;j<32;++j)w[D++]=S[j]}if("Netscape"==navigator.appName&&navigator.appVersion<"5"&&window.crypto)for(var E=window.crypto.random(32),j=0;j<E.length;++j)w[D++]=255&E.charCodeAt(j);for(;D<v;)j=Math.floor(65536*Math.random()),w[D++]=j>>>8,w[D++]=255&j;D=0,y()}function P(){if(null==d){for(y(),(d=new p).init(w),D=0;D<w.length;++D)w[D]=0;D=0}return d.next()}function x(){}function O(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}x.prototype.nextBytes=function(t){for(var e=0;e<t.length;++e)t[e]=P()},O.prototype.doPublic=function(t){return t.modPowInt(this.e,this.n)},O.prototype.setPublic=function(t,e){null!=t&&null!=e&&0<t.length&&0<e.length?(this.n=new m(t,16),this.e=parseInt(e,16)):alert("Invalid RSA public key")},O.prototype.encrypt=function(t){return null==(t=function(t,e){if(e<t.length+11)return alert("Message too long for RSA"),null;for(var r=new Array,n=t.length-1;0<=n&&0<e;){var o=t.charCodeAt(n--);o<128?r[--e]=o:127<o&&o<2048?(r[--e]=63&o|128,r[--e]=o>>6|192):(r[--e]=63&o|128,r[--e]=o>>6&63|128,r[--e]=o>>12|224)}r[--e]=0;for(var i=new x,a=new Array;2<e;){for(a[0]=0;0==a[0];)i.nextBytes(a);r[--e]=a[0]}return r[--e]=2,r[--e]=0,new m(r)}(t,this.n.bitLength()+7>>3))||null==(t=this.doPublic(t))?null:0==(1&(t=t.toString(16)).length)?t:"0"+t};var T=new O;T.setPublic("F619C53A37BAB059C583DA9AC4E2920FFC9D57E00885E82F7A0863DEAC43CE06374E45A1417DAC907C6CAC0AF1DDF1D7152192FED7A1D9255C97BC27E420E0742B95ED3C53C62995F42CB6EEDB7B1FBDD3E4F4A4AA935650DA81E763CA7074690032F6A6AF72802CC50394C2AFA5C9450A990E6F969A38571C8BC9E381125D2BEEC348AF919D7374FF10DC3E0B4367566CE929AD6EA323A475A677EB41C20B42D44E82E8A53DD52334D927394FCADF09","03")},{}],2:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Masterpass=void 0;var n=t("./utils/request.js"),o=t("./services/verifyService.js"),i=t("./services/accountService.js"),a=t("./services/paymentService.js"),t=t("./services/creditService.js");r.Masterpass=window.Masterpass={setEndpoint:n.Rest.setEndpoint,setToken:n.Rest.setToken,setApiVersion:n.Rest.setApiVersion,setLanguage:n.Rest.setLanguage,setMerchantId:n.Rest.setMerchantId,accountService:i.AccountService,verifyService:o.VerifyService,paymentService:a.PaymentService,creditService:t.CreditService}},{"./services/accountService.js":3,"./services/creditService.js":4,"./services/paymentService.js":5,"./services/verifyService.js":6,"./utils/request.js":7}],3:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.AccountService=void 0;var n,o=t("../utils/request.js"),i=(n=t("../libs/rsa.js"))&&n.__esModule?n:{default:n},a=t("../utils/utils.js");var s={endpoint:"/account"},c="/api/Account",u="/api/Card",l="/api/RecurringOrder";r.AccountService={setEndpoint:function(t){s.endpoint=t},addUserId:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=1<arguments.length?arguments[1]:void 0;t=a.Utils.operationParameters(t,["accountKey","currentUserId","newUserId"]),o.Rest.post(s.endpoint+c+"/AddUserId",t,e)},forgotPassword:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=1<arguments.length?arguments[1]:void 0;t=a.Utils.operationParameters(t,["accountKey","lastSixDigitsOfCard","userId","authenticationMethod"]),o.Rest.post(s.endpoint+c+"/ForgotPassword",t,e)},linkToMerchant:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=1<arguments.length?arguments[1]:void 0;t=a.Utils.operationParameters(t,["accountKey","userId"]),o.Rest.put(s.endpoint+c+"/LinkToMerchant",t,e)},updateUserId:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=1<arguments.length?arguments[1]:void 0;t=a.Utils.operationParameters(t,["accountKey","currentUserId","newUserId"]),o.Rest.patch(s.endpoint+c+"/UserId",t,e)},updateUserMsisdn:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=1<arguments.length?arguments[1]:void 0;t=a.Utils.operationParameters(t,["accountKey","userId","newMsisdn"]),o.Rest.patch(s.endpoint+c+"/Msisdn",t,e)},accountAccess:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=1<arguments.length?arguments[1]:void 0;t=a.Utils.operationParameters(t,["accountKey","accountKeyType","userId"]),o.Rest.get(s.endpoint+u,t,e)},addCard:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=1<arguments.length?arguments[1]:void 0,r=t.cardNumber.replace(/\s/g,"");if(!a.Utils.validateCard(r))throw new Error("Kart numarası geçerli değil!");var n=new i.default;t.cardNumber=n.encrypt(r),t.cvv=n.encrypt(t.cvv.replace(/\s/g,"")),t.deviceFingerPrint="",t=a.Utils.operationParameters(t,["accountKey","accountKeyType","userId","requestReferenceNumber","cardNumber","expiryDate","accountAliasName","cardHolderName","cvv","deviceFingerPrint","additionalParams"]),o.Rest.post(s.endpoint+u,t,e)},removeCard:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=1<arguments.length?arguments[1]:void 0;t=a.Utils.operationParameters(t,["accountKey","cardAlias"]),o.Rest.del(s.endpoint+u,t,e)},completeRegistration:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=1<arguments.length?arguments[1]:void 0;(t=a.Utils.operationParameters(t,["accountKey","userId","accountAliasName","isMsisdnValidatedByMerchant"])).token=FlowDirectable.token,o.Rest.post(s.endpoint+"/api/PurchaseAndRegister",t,e)},recurringOrder:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=1<arguments.length?arguments[1]:void 0;t=a.Utils.operationParameters(t,["accountKey","authenticationMethod","amountLimit","requestReferenceNumber","cardAlias","productId","expiryDate"]),o.Rest.post(s.endpoint+l,t,e)},recurringOrderUpdate:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=1<arguments.length?arguments[1]:void 0;t=a.Utils.operationParameters(t,["accountKey","amountLimit","requestReferenceNumber","cardAlias","productId","expiryDate"]),o.Rest.put(s.endpoint+l,t,e)},recurringOrderDelete:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=1<arguments.length?arguments[1]:void 0;t=a.Utils.operationParameters(t,["accountKey","authenticationMethod","authenticationMethod","amountLimit","requestReferenceNumber","cardAlias","productId"]),o.Rest.del(s.endpoint+l,t,e)}}},{"../libs/rsa.js":1,"../utils/request.js":7,"../utils/utils.js":8}],4:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.CreditService=void 0;var n,o=t("../utils/request.js"),i=(n=t("../libs/rsa.js"))&&n.__esModule?n:{default:n},a=t("../utils/utils.js");var s={endpoint:"/credit-bff"};r.CreditService={setEndpoint:function(t){s.endpoint=t},loanGetUrl:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=1<arguments.length?arguments[1]:void 0,r=new i.default;t.cvc=r.encrypt(t.cvc.replace(/\s/g,"")),t.deviceFingerPrint="",t=a.Utils.operationParameters(t,["accountKey","userId","requestReferenceNo","amount","isMsisdnValidatedByMerchant","currencyCode","orderNo","terminalGroupId","cvc","acquirerIcaNumber","loanIssuerIcaNumber","accessToken","campaingCode","basket"]),o.Rest.post(s.endpoint+"/api/Loan/geturl",t,e)},overdraftQuery:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=1<arguments.length?arguments[1]:void 0,r=o.FlowDirectable.uri;o.Rest.get(s.endpoint+r,t,e)}}},{"../libs/rsa.js":1,"../utils/request.js":7,"../utils/utils.js":8}],5:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.PaymentService=void 0;var n,o=t("../utils/request.js"),i=(n=t("../libs/rsa.js"))&&n.__esModule?n:{default:n},a=t("../utils/utils.js");var s={endpoint:"/payment"};r.PaymentService={setEndpoint:function(t){s.endpoint=t},payment:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=1<arguments.length?arguments[1]:void 0;t=a.Utils.operationParameters(t,["accountKey","authenticationMethod","amount","requestReferenceNo","cardAlias","cvc","orderNo","installmentCount","acquirerIcaNumber","terminalGroupId","currencyCode","paymentType","secure3DModel","subMerchant","rewardList","orderDetails","orderProductsDetails","buyerDetails","billDetails","deliveryDetails","otherDetails","mokaSubDealerDetails","terminal","customParameters","additionalParams"]),o.Rest.post(s.endpoint+"/api/Payment/request",t,e)},directPayment:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=1<arguments.length?arguments[1]:void 0,r=t.cardNumber.replace(/\s/g,"");if(!a.Utils.validateCard(r))throw new Error("Kart numarası geçerli değil!");var n=new i.default;t.cardNumber=n.encrypt(r),t.cvc=n.encrypt(t.cvc.replace(/\s/g,"")),t.deviceFingerPrint="",t=a.Utils.operationParameters(t,["accountKey","authenticationMethod","requestReferenceNo","cardNumber","cardHolderName","expiryDate","cvc","cardAlias","amount","orderNo","terminalGroupId","currencyCode","paymentType","acquirerIcaNumber","installmentCount","subMerchant","rewardList","orderDetails","buyerDetails","otherDetails","secure3DModel","mokaSubDealerDetails","deviceFingerPrint","orderProductsDetails","billDetails","deliveryDetails","terminal","customParameters","additionalParams"]),o.Rest.post(s.endpoint+"/api/DirectPayment/request",t,e)},registerAndPurchase:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=1<arguments.length?arguments[1]:void 0,r=t.cardNumber.replace(/\s/g,"");if(!a.Utils.validateCard(r))throw new Error("Kart numarası geçerli değil!");var n=new i.default;t.cardNumber=n.encrypt(r),t.cvc=n.encrypt(t.cvc.replace(/\s/g,"")),t.deviceFingerPrint="",t=a.Utils.operationParameters(t,["accountKey","accountKeyType","merchantUserId","authenticationMethod","requestReferenceNo","orderNo","acquirerIcaNumber","installmentCount","cardAlias","cardNumber","expiryDate","cvc","cardHolderName","amount","deviceFingerPrint","terminalGroupId","currencyCode","paymentType","subMerchant","rewardList","orderDetails","orderProductsDetails","buyerDetails","billDetails","deliveryDetails","otherDetails","secure3DModel","terminal","isMsisdnValidatedByMerchant","mokaSubDealerDetails","customParameters","additionalParams"]),o.Rest.post(s.endpoint+"/api/RegisterAndPurchase",t,e)}}},{"../libs/rsa.js":1,"../utils/request.js":7,"../utils/utils.js":8}],6:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.VerifyService=void 0;var o=t("../utils/request.js");function T(t){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function A(){A=function(){return a};var c,a={},t=Object.prototype,u=t.hasOwnProperty,l=Object.defineProperty||function(t,e,r){t[e]=r.value},e="function"==typeof Symbol?Symbol:{},n=e.iterator||"@@iterator",r=e.asyncIterator||"@@asyncIterator",o=e.toStringTag||"@@toStringTag";function i(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{i({},"")}catch(c){i=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o,i,a,s,e=e&&e.prototype instanceof m?e:m,e=Object.create(e.prototype),n=new x(n||[]);return l(e,"_invoke",{value:(o=t,i=r,a=n,s=f,function(t,e){if(s===d)throw new Error("Generator is already running");if(s===v){if("throw"===t)throw e;return{value:c,done:!0}}for(a.method=t,a.arg=e;;){var r=a.delegate;if(r){r=function t(e,r){var n=r.method,o=e.iterator[n];if(o===c)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=c,t(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;n=h(o,e.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,y;o=n.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=c),r.delegate=null,y):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}(r,a);if(r){if(r===y)continue;return r}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(s===f)throw s=v,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s=d;r=h(o,i,a);if("normal"===r.type){if(s=a.done?v:p,r.arg===y)continue;return{value:r.arg,done:a.done}}"throw"===r.type&&(s=v,a.method="throw",a.arg=r.arg)}})}),e}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}a.wrap=s;var f="suspendedStart",p="suspendedYield",d="executing",v="completed",y={};function m(){}function g(){}function b(){}var e={},w=(i(e,n,function(){return this}),Object.getPrototypeOf),w=w&&w(w(O([]))),D=(w&&w!==t&&u.call(w,n)&&(e=w),b.prototype=m.prototype=Object.create(e));function S(t){["next","throw","return"].forEach(function(e){i(t,e,function(t){return this._invoke(e,t)})})}function E(a,s){var e;l(this,"_invoke",{value:function(r,n){function t(){return new s(function(t,e){!function e(t,r,n,o){var i,t=h(a[t],a,r);if("throw"!==t.type)return(r=(i=t.arg).value)&&"object"==T(r)&&u.call(r,"__await")?s.resolve(r.__await).then(function(t){e("next",t,n,o)},function(t){e("throw",t,n,o)}):s.resolve(r).then(function(t){i.value=t,n(i)},function(t){return e("throw",t,n,o)});o(t.arg)}(r,n,t,e)})}return e=e?e.then(t,t):t()}})}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function O(e){if(e||""===e){var r,t=e[n];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return r=-1,(t=function t(){for(;++r<e.length;)if(u.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=c,t.done=!0,t}).next=t}throw new TypeError(T(e)+" is not iterable")}return l(D,"constructor",{value:g.prototype=b,configurable:!0}),l(b,"constructor",{value:g,configurable:!0}),g.displayName=i(b,o,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,i(t,o,"GeneratorFunction")),t.prototype=Object.create(D),t},a.awrap=function(t){return{__await:t}},S(E.prototype),i(E.prototype,r,function(){return this}),a.AsyncIterator=E,a.async=function(t,e,r,n,o){void 0===o&&(o=Promise);var i=new E(s(t,e,r,n),o);return a.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},S(D),i(D,o,"Generator"),i(D,n,function(){return this}),i(D,"toString",function(){return"[object Generator]"}),a.keys=function(t){var e,r=Object(t),n=[];for(e in r)n.push(e);return n.reverse(),function t(){for(;n.length;){var e=n.pop();if(e in r)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=O,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=c,this.done=!1,this.delegate=null,this.method="next",this.arg=c,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&u.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=c)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var n=this;function t(t,e){return i.type="throw",i.arg=r,n.next=t,e&&(n.method="next",n.arg=c),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var o=this.tryEntries[e],i=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var a=u.call(o,"catchLoc"),s=u.call(o,"finallyLoc");if(a&&s){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;0<=r;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&u.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}var i=(o=o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc?null:o)?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r,n,o=this.tryEntries[e];if(o.tryLoc===t)return"throw"===(r=o.completion).type&&(n=r.arg,P(o)),n}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=c),y}},a}function c(t,e,r,n,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,o)}var i={endpoint:"/user-authorization"},a="/api/Otp";r.VerifyService={setEndpoint:function(t){i.endpoint=t},verifyOtp:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=1<arguments.length?arguments[1]:void 0,r=o.FlowDirectable.uri;t.token=o.FlowDirectable.token,o.Rest.post(r,t,e)},resendOtp:function(){return n.apply(this,arguments)}};function n(){var s;return s=A().mark(function t(){var e,r,n=arguments;return A().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:e=0<n.length&&void 0!==n[0]?n[0]:{},r=1<n.length?n[1]:void 0,o.Rest.post(i.endpoint+a+"/resend",e,r);case 3:case"end":return t.stop()}},t)}),(n=function(){var t=this,a=arguments;return new Promise(function(e,r){var n=s.apply(t,a);function o(t){c(n,e,r,o,i,"next",t)}function i(t){c(n,e,r,o,i,"throw",t)}o(void 0)})}).apply(this,arguments)}},{"../utils/request.js":7}],7:[function(t,e,r){"use strict";function T(t){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function A(){A=function(){return a};var c,a={},t=Object.prototype,u=t.hasOwnProperty,l=Object.defineProperty||function(t,e,r){t[e]=r.value},e="function"==typeof Symbol?Symbol:{},n=e.iterator||"@@iterator",r=e.asyncIterator||"@@asyncIterator",o=e.toStringTag||"@@toStringTag";function i(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{i({},"")}catch(c){i=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o,i,a,s,e=e&&e.prototype instanceof m?e:m,e=Object.create(e.prototype),n=new x(n||[]);return l(e,"_invoke",{value:(o=t,i=r,a=n,s=f,function(t,e){if(s===d)throw new Error("Generator is already running");if(s===v){if("throw"===t)throw e;return{value:c,done:!0}}for(a.method=t,a.arg=e;;){var r=a.delegate;if(r){r=function t(e,r){var n=r.method,o=e.iterator[n];if(o===c)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=c,t(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;n=h(o,e.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,y;o=n.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=c),r.delegate=null,y):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}(r,a);if(r){if(r===y)continue;return r}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(s===f)throw s=v,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s=d;r=h(o,i,a);if("normal"===r.type){if(s=a.done?v:p,r.arg===y)continue;return{value:r.arg,done:a.done}}"throw"===r.type&&(s=v,a.method="throw",a.arg=r.arg)}})}),e}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}a.wrap=s;var f="suspendedStart",p="suspendedYield",d="executing",v="completed",y={};function m(){}function g(){}function b(){}var e={},w=(i(e,n,function(){return this}),Object.getPrototypeOf),w=w&&w(w(O([]))),D=(w&&w!==t&&u.call(w,n)&&(e=w),b.prototype=m.prototype=Object.create(e));function S(t){["next","throw","return"].forEach(function(e){i(t,e,function(t){return this._invoke(e,t)})})}function E(a,s){var e;l(this,"_invoke",{value:function(r,n){function t(){return new s(function(t,e){!function e(t,r,n,o){var i,t=h(a[t],a,r);if("throw"!==t.type)return(r=(i=t.arg).value)&&"object"==T(r)&&u.call(r,"__await")?s.resolve(r.__await).then(function(t){e("next",t,n,o)},function(t){e("throw",t,n,o)}):s.resolve(r).then(function(t){i.value=t,n(i)},function(t){return e("throw",t,n,o)});o(t.arg)}(r,n,t,e)})}return e=e?e.then(t,t):t()}})}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function O(e){if(e||""===e){var r,t=e[n];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return r=-1,(t=function t(){for(;++r<e.length;)if(u.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=c,t.done=!0,t}).next=t}throw new TypeError(T(e)+" is not iterable")}return l(D,"constructor",{value:g.prototype=b,configurable:!0}),l(b,"constructor",{value:g,configurable:!0}),g.displayName=i(b,o,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,i(t,o,"GeneratorFunction")),t.prototype=Object.create(D),t},a.awrap=function(t){return{__await:t}},S(E.prototype),i(E.prototype,r,function(){return this}),a.AsyncIterator=E,a.async=function(t,e,r,n,o){void 0===o&&(o=Promise);var i=new E(s(t,e,r,n),o);return a.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},S(D),i(D,o,"Generator"),i(D,n,function(){return this}),i(D,"toString",function(){return"[object Generator]"}),a.keys=function(t){var e,r=Object(t),n=[];for(e in r)n.push(e);return n.reverse(),function t(){for(;n.length;){var e=n.pop();if(e in r)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=O,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=c,this.done=!1,this.delegate=null,this.method="next",this.arg=c,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&u.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=c)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var n=this;function t(t,e){return i.type="throw",i.arg=r,n.next=t,e&&(n.method="next",n.arg=c),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var o=this.tryEntries[e],i=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var a=u.call(o,"catchLoc"),s=u.call(o,"finallyLoc");if(a&&s){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;0<=r;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&u.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}var i=(o=o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc?null:o)?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r,n,o=this.tryEntries[e];if(o.tryLoc===t)return"throw"===(r=o.completion).type&&(n=r.arg,P(o)),n}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=c),y}},a}function i(e,t){var r,n=Object.keys(e);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(e),t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)),n}function a(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?i(Object(o),!0).forEach(function(t){var e,r;e=n,r=o[t=t],(t=function(t){t=function(t,e){if("object"!==T(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);r=r.call(t,e||"default");if("object"!==T(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"===T(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):i(Object(o)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(o,t))})}return n}function c(t,e,r,n,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,o)}function o(s){return function(){var t=this,a=arguments;return new Promise(function(e,r){var n=s.apply(t,a);function o(t){c(n,e,r,o,i,"next",t)}function i(t){c(n,e,r,o,i,"throw",t)}o(void 0)})}}Object.defineProperty(r,"__esModule",{value:!0}),r.Rest=r.FlowDirectable=void 0;var s={"Content-Type":"application/json","x-channel":"SYS","x-source-channel":"Web",Accept:"application/json"},u={endpoint:""},l={merchantId:"",sdkVersion:"1.0.4",sourceChannel:"Web"},h=r.FlowDirectable=window.FlowDirectable={uri:"",token:"",url3d:"",url3dSuccess:"",url3dFail:""};r.Rest={setToken:function(t){var e;t=null!=(e=null==(e=t.split(" "))?void 0:e[1])?e:t,s.Authorization="Bearer "+t},setEndpoint:function(t){u.endpoint=t},setApiVersion:function(t){s["x-api-version"]=null!=t?t:l.sdkVersion},setLanguage:function(t){s["x-language"]=null!=t?t:"en-US"},setMerchantId:function(t){l.merchantId=t},post:function(t,e,r){return n.apply(this,arguments)},put:function(t,e,r){return d.apply(this,arguments)},patch:function(t,e,r){return v.apply(this,arguments)},del:function(t,e,r){return p.apply(this,arguments)},get:function(t,e,r){return y.apply(this,arguments)}};function f(t,e){h.uri=t.get("content-location")||"",h.token=(null==e?void 0:e.token)||"",h.url3d=(null==e?void 0:e.url3d)||"",h.url3dSuccess=(null==e?void 0:e.url3dSuccess)||"",h.url3dFail=(null==e?void 0:e.url3dFail)||""}function n(){return(n=o(A().mark(function t(e,r,n){var o;return A().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o=a(a({},r),l),o={method:"POST",headers:s,body:JSON.stringify(o)},t.next=4,m(u.endpoint+e,o,n);case 4:case"end":return t.stop()}},t)}))).apply(this,arguments)}function p(){return(p=o(A().mark(function t(e,r,n){var o;return A().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o=a(a({},r),l),o={method:"DELETE",headers:s,body:JSON.stringify(o)},t.next=4,m(u.endpoint+e,o,n);case 4:case"end":return t.stop()}},t)}))).apply(this,arguments)}function d(){return(d=o(A().mark(function t(e,r,n){var o;return A().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o=a(a({},r),l),o={method:"PUT",headers:s,body:JSON.stringify(o)},t.next=4,m(u.endpoint+e,o,n);case 4:case"end":return t.stop()}},t)}))).apply(this,arguments)}function v(){return(v=o(A().mark(function t(e,r,n){var o;return A().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o=a(a({},r),l),o={method:"PATCH",headers:s,body:JSON.stringify(o)},t.next=4,m(u.endpoint+e,o,n);case 4:case"end":return t.stop()}},t)}))).apply(this,arguments)}function y(){return(y=o(A().mark(function t(e,r,n){var o,i;return A().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o=a(a({},r),l),i={method:"GET",headers:s},t.next=4,m(u.endpoint+e+"?"+new URLSearchParams(o),i,n);case 4:case"end":return t.stop()}},t)}))).apply(this,arguments)}function m(){return g.apply(this,arguments)}function g(){return(g=o(A().mark(function t(i,e,r){var a,n;return A().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=a="",t.next=4,fetch(i,e).then(function(){var e=o(A().mark(function t(e){var r,n,o;return A().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.json();case 2:return r=t.sent,a=r.statusCode,e.ok?(n=-1!==i.toLowerCase().indexOf("verify"),o=-1!==i.toLowerCase().indexOf("directpayment/request"),202==r.statusCode?(f(e.headers,r.result),r.token=h.token,r.url3d=h.url3d,r.responseCode=r.result.responseCode):200==r.statusCode&&(n||o)&&f(e.headers,r.result)):(console.error(r.exception),r.responseCode=null==(n=r.exception)?void 0:n.code,r.exception.validationErrors?(o=r.exception.validationErrors.map(function(t){return t.message}),r.description=o.join(", ")):r.description=r.exception.message),t.abrupt("return",r);case 6:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}());case 4:n=t.sent,r&&r(a,n);case 6:case"end":return t.stop()}},t)}))).apply(this,arguments)}},{}],8:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Utils=void 0;r.Utils=window.Utils={formDataToClassObject:function(t,e){var r,n=Object.fromEntries(t.entries()),o=Object.getOwnPropertyNames(new e),i={};for(r in n)o.includes(r)&&(i[r]=n[r]);t=new e;return Object.assign(t,i),t},formDataToJson:function(t){t=new FormData(t);return Object.fromEntries(t.entries())},dataToClassObject:function(t,e){var r,n=Object.getOwnPropertyNames(new e),o={};for(r in t)n.includes(r)&&(o[r]=t[r]);e=new e;return Object.assign(e,o),e},decodeJwt:function(t){var e=(t="Bearer "+(t=null!=(e=null==(e=t.split(" "))?void 0:e[1])?e:t)).split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),t=decodeURIComponent(window.atob(e).split("").map(function(t){return"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(t)},validateCard:function(t){for(var e=t.length,r=1,n=0,o=e-1;0<=o;o--){var i=parseInt(t.charAt(o),10);n+=(r^=1)?2*i%10+Math.floor(2*i/10):i}return n%10==0},operationParameters:function(t,e){for(var r=0,n=Object.keys(t);r<n.length;r++){var o=n[r];e.includes(o)||delete t[o]}return t}}},{}]},{},[2]);
|
package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/[...prettyurl]/page.tsx
RENAMED
|
@@ -78,41 +78,41 @@ export async function generateMetadata(props: PageProps) {
|
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
const commonProps = {
|
|
81
|
-
params: {
|
|
81
|
+
params: Promise.resolve({
|
|
82
82
|
...params,
|
|
83
83
|
pk: prettyUrlResult.pk
|
|
84
|
-
},
|
|
84
|
+
}),
|
|
85
85
|
searchParams: Promise.resolve(searchParams)
|
|
86
86
|
};
|
|
87
87
|
|
|
88
88
|
try {
|
|
89
89
|
if (prettyUrlResult.path.startsWith('/product/')) {
|
|
90
90
|
await import('@product/[pk]/page').then(async (module) => {
|
|
91
|
-
result = await module['generateMetadata']?.(commonProps);
|
|
91
|
+
result = await module['generateMetadata']?.(commonProps as any);
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
if (prettyUrlResult.path.startsWith('/group-product/')) {
|
|
96
96
|
await import('@group-product/[pk]/page').then(async (module) => {
|
|
97
|
-
result = await module['generateMetadata']?.(commonProps);
|
|
97
|
+
result = await module['generateMetadata']?.(commonProps as any);
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
if (prettyUrlResult.path.startsWith('/category/')) {
|
|
102
102
|
await import('@category/[pk]/page').then(async (module) => {
|
|
103
|
-
result = await module['generateMetadata']?.(commonProps);
|
|
103
|
+
result = await module['generateMetadata']?.(commonProps as any);
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
if (prettyUrlResult.path.startsWith('/special-page/')) {
|
|
108
108
|
await import('@special-page/[pk]/page').then(async (module) => {
|
|
109
|
-
result = await module['generateMetadata']?.(commonProps);
|
|
109
|
+
result = await module['generateMetadata']?.(commonProps as any);
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
if (prettyUrlResult.path.startsWith('/flat-page/')) {
|
|
114
114
|
await import('@flat-page/[pk]/page').then(async (module) => {
|
|
115
|
-
result = await module['generateMetadata']?.(commonProps);
|
|
115
|
+
result = await module['generateMetadata']?.(commonProps as any);
|
|
116
116
|
});
|
|
117
117
|
}
|
|
118
118
|
// eslint-disable-next-line no-empty
|
|
@@ -161,8 +161,8 @@ export default async function Page(props) {
|
|
|
161
161
|
...params,
|
|
162
162
|
pk: result.pk
|
|
163
163
|
},
|
|
164
|
-
searchParams:
|
|
165
|
-
};
|
|
164
|
+
searchParams: urlSearchParams
|
|
165
|
+
} as any;
|
|
166
166
|
|
|
167
167
|
if (result.path.startsWith('/category/')) {
|
|
168
168
|
const CategoryPage = (await import('@category/[pk]/page')).default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import AccountBackButton from '@theme/views/account/back-button';
|
|
2
2
|
import AccountMenu from '@theme/views/account/account-menu';
|
|
3
|
-
import {
|
|
3
|
+
import { auth } from 'auth';
|
|
4
4
|
import { ROUTES } from 'routes';
|
|
5
5
|
import { redirect } from '@akinon/next/utils/redirect';
|
|
6
6
|
|
|
@@ -9,7 +9,7 @@ export default async function AccountLayout({
|
|
|
9
9
|
}: {
|
|
10
10
|
children: React.ReactNode;
|
|
11
11
|
}) {
|
|
12
|
-
const session = await
|
|
12
|
+
const session = await auth();
|
|
13
13
|
|
|
14
14
|
if (!session?.user) {
|
|
15
15
|
return redirect(ROUTES.AUTH);
|
|
@@ -18,7 +18,8 @@ import {
|
|
|
18
18
|
Link,
|
|
19
19
|
FileInput
|
|
20
20
|
} from '@theme/components';
|
|
21
|
-
import { useState
|
|
21
|
+
import { useState } from 'react';
|
|
22
|
+
import { useParams } from 'next/navigation';
|
|
22
23
|
import { OrderDetailHeader } from '@theme/views/account/orders/order-detail-header';
|
|
23
24
|
import { OrderCancellationItem } from '@theme/views/account/orders/order-cancellation-item';
|
|
24
25
|
import { useLocalization } from '@akinon/next/hooks';
|
|
@@ -27,9 +28,8 @@ const accountOrderCancellationSchema = yup.object().shape({
|
|
|
27
28
|
return_policy: yup.boolean().oneOf([true], 'This field is required.')
|
|
28
29
|
});
|
|
29
30
|
|
|
30
|
-
const AccountOrderCancellation = (
|
|
31
|
-
const
|
|
32
|
-
|
|
31
|
+
const AccountOrderCancellation = () => {
|
|
32
|
+
const params = useParams<{ id: string }>();
|
|
33
33
|
const { t } = useLocalization();
|
|
34
34
|
const {
|
|
35
35
|
register,
|
|
@@ -50,7 +50,7 @@ const AccountOrderCancellation = ({ params }) => {
|
|
|
50
50
|
data: order,
|
|
51
51
|
isLoading,
|
|
52
52
|
isSuccess: orderSuccess
|
|
53
|
-
} = useGetOrderQuery(
|
|
53
|
+
} = useGetOrderQuery(params.id);
|
|
54
54
|
|
|
55
55
|
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
56
56
|
const [responseMessage, setResponseMessage] = useState({
|
|
@@ -300,7 +300,7 @@ const AccountOrderCancellation = ({ params }) => {
|
|
|
300
300
|
</label>
|
|
301
301
|
{errors.return_policy && (
|
|
302
302
|
<div className="text-sm text-error">
|
|
303
|
-
{errors.return_policy.message}
|
|
303
|
+
{String(errors.return_policy.message)}
|
|
304
304
|
</div>
|
|
305
305
|
)}
|
|
306
306
|
</div>
|
package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/account/orders/[id]/page.tsx
RENAMED
|
@@ -5,7 +5,8 @@ import { Image } from '@akinon/next/components/image';
|
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { SalesContractModal } from '@theme/views/sales-contract-modal';
|
|
7
7
|
import { useGetOrderQuery } from '@akinon/next/data/client/account';
|
|
8
|
-
import { useEffect, useState
|
|
8
|
+
import { useEffect, useState } from 'react';
|
|
9
|
+
import { useParams } from 'next/navigation';
|
|
9
10
|
|
|
10
11
|
import { OrderDetailHeader } from '@theme/views/account/orders/order-detail-header';
|
|
11
12
|
import { ROUTES } from '@theme/routes';
|
|
@@ -13,9 +14,8 @@ import { useLocalization } from '@akinon/next/hooks';
|
|
|
13
14
|
import settings from 'settings';
|
|
14
15
|
import { getOrderStatus } from 'utils';
|
|
15
16
|
|
|
16
|
-
const AccountOrderDetail = (
|
|
17
|
-
const
|
|
18
|
-
|
|
17
|
+
const AccountOrderDetail = () => {
|
|
18
|
+
const { id } = useParams<{ id: string }>();
|
|
19
19
|
const { locale, t } = useLocalization();
|
|
20
20
|
|
|
21
21
|
const localeValue = settings.localization.locales.find(
|
|
@@ -27,7 +27,7 @@ const AccountOrderDetail = ({ params }) => {
|
|
|
27
27
|
isLoading,
|
|
28
28
|
isSuccess,
|
|
29
29
|
isFetching
|
|
30
|
-
} = useGetOrderQuery(
|
|
30
|
+
} = useGetOrderQuery(id);
|
|
31
31
|
const [orderDate, setOrderDate] = useState('');
|
|
32
32
|
|
|
33
33
|
const groupedOrder = [];
|
|
@@ -146,7 +146,7 @@ const AccountOrderDetail = ({ params }) => {
|
|
|
146
146
|
key={index}
|
|
147
147
|
>
|
|
148
148
|
<div className="flex gap-3 mb-5 lg:mb-0">
|
|
149
|
-
<div className="shrink-0">
|
|
149
|
+
<div className="flex-shrink-0">
|
|
150
150
|
<Link
|
|
151
151
|
className="block"
|
|
152
152
|
href={item?.product?.absolute_url}
|
|
@@ -53,7 +53,7 @@ export default function Page() {
|
|
|
53
53
|
<div className="hidden lg:block">
|
|
54
54
|
<div className="bg-gray-150">
|
|
55
55
|
{orderLoading && (
|
|
56
|
-
<SkeletonWrapper className="w-full px-6 mb-12 h-28 items-center justify-center flex-row
|
|
56
|
+
<SkeletonWrapper className="w-full px-6 mb-12 h-28 items-center justify-center !flex-row xl:h-[5.5rem]">
|
|
57
57
|
<Skeleton className="w-[11.375rem] h-16 mr-4 xl:w-[16rem] xl:h-10" />
|
|
58
58
|
<Skeleton className="w-56 h-10 mr-4" />
|
|
59
59
|
<Skeleton className="w-[12.75rem] h-10 xl:w-56" />
|
package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/account/profile/page.tsx
RENAMED
|
@@ -288,9 +288,9 @@ export default function Page() {
|
|
|
288
288
|
/>
|
|
289
289
|
</div>
|
|
290
290
|
</div>
|
|
291
|
-
{errors && (
|
|
291
|
+
{errors?.birthdate?.message && (
|
|
292
292
|
<div className="mt-1 text-sm text-error">
|
|
293
|
-
{errors.birthdate
|
|
293
|
+
{String(errors.birthdate.message)}
|
|
294
294
|
</div>
|
|
295
295
|
)}
|
|
296
296
|
</div>
|
package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/address/stores/page.tsx
RENAMED
|
@@ -122,7 +122,7 @@ export default function Stores() {
|
|
|
122
122
|
|
|
123
123
|
<div className="flex gap-6 mt-4 flex-col md:flex-row">
|
|
124
124
|
{city && (
|
|
125
|
-
<div className="w-full shrink-0 md:w-60 overflow-y-scroll max-h-[36rem]">
|
|
125
|
+
<div className="w-full flex-shrink-0 md:w-60 overflow-y-scroll max-h-[36rem]">
|
|
126
126
|
{cityLoading && (
|
|
127
127
|
<SkeletonWrapper>
|
|
128
128
|
<Skeleton className="w-full h-20" />
|
|
@@ -174,7 +174,7 @@ export default function Stores() {
|
|
|
174
174
|
title={store.name}
|
|
175
175
|
titleClassName="text-xs font-bold"
|
|
176
176
|
iconSize={12}
|
|
177
|
-
className="relative py-3 border-b
|
|
177
|
+
className="relative py-3 border-b justify-center mb-0"
|
|
178
178
|
>
|
|
179
179
|
<div className="text-xs">
|
|
180
180
|
{store.address && (
|
|
@@ -51,7 +51,7 @@ export default function Auth() {
|
|
|
51
51
|
{t('auth.register.mobile_title')}
|
|
52
52
|
</Button>
|
|
53
53
|
</div>
|
|
54
|
-
<div className="w-full flex flex-wrap border
|
|
54
|
+
<div className="w-full flex flex-wrap border md:border-0">
|
|
55
55
|
<div
|
|
56
56
|
className={twMerge(
|
|
57
57
|
clsx('w-full md:block md:w-1/2', {
|
|
@@ -25,7 +25,7 @@ export default function Page() {
|
|
|
25
25
|
}, [basket, isSuccess]);
|
|
26
26
|
|
|
27
27
|
return (
|
|
28
|
-
<div className="max-w-
|
|
28
|
+
<div className="max-w-screen-xl p-4 flex flex-col text-primary-800 lg:p-8 xl:flex-row xl:mx-auto">
|
|
29
29
|
{isLoading && (
|
|
30
30
|
<div className="flex justify-center w-full">
|
|
31
31
|
<LoaderSpinner />
|
|
@@ -62,7 +62,7 @@ export default function Page() {
|
|
|
62
62
|
<Summary basket={basket} />
|
|
63
63
|
</>
|
|
64
64
|
) : (
|
|
65
|
-
<div className="flex flex-col items-center container max-w-
|
|
65
|
+
<div className="flex flex-col items-center container max-w-screen-sm py-4 px-4 xs:py-6 xs:px-6 sm:py-8 sm:px-8 lg:max-w-screen-xl">
|
|
66
66
|
<h1
|
|
67
67
|
className="w-full text-xl font-light text-secondary text-center sm:text-2xl"
|
|
68
68
|
data-testid="basket-empty"
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { getCategoryData } from '@akinon/next/data/server';
|
|
2
|
+
import { withSegmentDefaults } from '@akinon/next/hocs/server';
|
|
3
|
+
import { ResolvedPageProps } from '@akinon/next/types';
|
|
4
|
+
import CategoryLayout from '@theme/views/category/layout';
|
|
5
|
+
import { notFound } from 'next/navigation';
|
|
6
|
+
|
|
7
|
+
async function Page({ params, searchParams }: ResolvedPageProps<{ pk: number }>) {
|
|
8
|
+
try {
|
|
9
|
+
const { data, breadcrumbData } = await getCategoryData({
|
|
10
|
+
pk: params.pk,
|
|
11
|
+
searchParams
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<>
|
|
16
|
+
<CategoryLayout data={data} breadcrumbData={breadcrumbData} />
|
|
17
|
+
</>
|
|
18
|
+
);
|
|
19
|
+
} catch (error: unknown) {
|
|
20
|
+
if ((error as Error & { status?: number })?.status === 404) {
|
|
21
|
+
notFound();
|
|
22
|
+
}
|
|
23
|
+
throw error;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export default withSegmentDefaults(Page, { segmentType: 'page' });
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { getFlatPageData } from '@akinon/next/data/server';
|
|
2
|
+
import { withSegmentDefaults } from '@akinon/next/hocs/server';
|
|
3
|
+
import { ResolvedPageProps } from '@akinon/next/types';
|
|
4
|
+
import { notFound } from 'next/navigation';
|
|
5
|
+
|
|
6
|
+
async function Page({ params }: ResolvedPageProps<{ pk: number }>) {
|
|
7
|
+
try {
|
|
8
|
+
const data = await getFlatPageData({ pk: params.pk });
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<div className="container mx-auto py-6">
|
|
12
|
+
<div
|
|
13
|
+
className="mx-auto prose prose-headings:text-primary"
|
|
14
|
+
dangerouslySetInnerHTML={{ __html: data.flat_page.content }}
|
|
15
|
+
/>
|
|
16
|
+
</div>
|
|
17
|
+
);
|
|
18
|
+
} catch (error) {
|
|
19
|
+
notFound();
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export default withSegmentDefaults(Page, { segmentType: 'page' });
|
package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/forms/[pk]/generate/page.tsx
RENAMED
|
@@ -4,7 +4,6 @@ import { GenerateFormFields } from '@theme/components/generate-form-fields';
|
|
|
4
4
|
|
|
5
5
|
export default async function Page(props) {
|
|
6
6
|
const params = await props.params;
|
|
7
|
-
|
|
8
7
|
const data = await getFormData({ pk: params.pk });
|
|
9
8
|
const { schema, is_active, name, pk } = data;
|
|
10
9
|
|
|
@@ -21,7 +20,7 @@ export default async function Page(props) {
|
|
|
21
20
|
schema={schema}
|
|
22
21
|
allFieldClasses={{
|
|
23
22
|
className:
|
|
24
|
-
'border border-[#d4d4d4] text-[#4a4f54] mt-1.5 h-[38px] p-2.5 text-xs outline-
|
|
23
|
+
'border border-[#d4d4d4] text-[#4a4f54] mt-1.5 h-[38px] p-2.5 text-xs outline-none focus:border-black',
|
|
25
24
|
labelClassName: 'text-[#4a4f54] text-xs',
|
|
26
25
|
wrapperClassName: 'flex flex-col mb-6'
|
|
27
26
|
}}
|
|
@@ -41,7 +40,7 @@ export default async function Page(props) {
|
|
|
41
40
|
formProperties={{
|
|
42
41
|
actionUrl: `/api/form/${pk}/`,
|
|
43
42
|
className:
|
|
44
|
-
'w-[calc(100%-36px)] md:w-[570px] px-[18px] py-[60px] md:p-[100px] border border-[#cbc8c8] border-t-[3px] border-t-[#e95151] mx-auto -mt-[100px] bg-white mb-14'
|
|
43
|
+
'w-[calc(100%-36px)] md:w-[570px] px-[18px] py-[60px] md:p-[100px] border border-[#cbc8c8] border-t-[3px] border-t-[#e95151] mx-auto -mt-[100px] bg-white mb-14',
|
|
45
44
|
}}
|
|
46
45
|
submitButtonText={t('form.form_page.submit_button_text')}
|
|
47
46
|
/>
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import ProductLayout from '@theme/views/product/layout';
|
|
2
|
+
import { ProductGroupInfo } from '@theme/views/product';
|
|
3
|
+
import { getProductData, getWidgetData } from '@akinon/next/data/server';
|
|
4
|
+
import { withSegmentDefaults } from '@akinon/next/hocs/server';
|
|
5
|
+
import { PageProps, ResolvedPageProps, Metadata } from '@akinon/next/types';
|
|
6
|
+
import { generateJsonLd } from '@theme/utils/generate-jsonld';
|
|
7
|
+
import { notFound } from 'next/navigation';
|
|
8
|
+
|
|
9
|
+
export async function generateMetadata(
|
|
10
|
+
props: PageProps<{ pk: number }>
|
|
11
|
+
) {
|
|
12
|
+
const params = await props.params;
|
|
13
|
+
const searchParams = await props.searchParams;
|
|
14
|
+
let result: Metadata = {};
|
|
15
|
+
|
|
16
|
+
try {
|
|
17
|
+
const { data } = await getProductData({
|
|
18
|
+
pk: params.pk,
|
|
19
|
+
searchParams,
|
|
20
|
+
groupProduct: true
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
const product = data?.product;
|
|
24
|
+
|
|
25
|
+
if (!product) {
|
|
26
|
+
return {};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
result = {
|
|
30
|
+
title: product.name,
|
|
31
|
+
description: String(product.attributes?.description),
|
|
32
|
+
twitter: {
|
|
33
|
+
title: product.name,
|
|
34
|
+
description: String(product.attributes?.description)
|
|
35
|
+
},
|
|
36
|
+
openGraph: {
|
|
37
|
+
title: product.name,
|
|
38
|
+
description: String(product.attributes?.description),
|
|
39
|
+
images: product.productimage_set?.map((item) => ({
|
|
40
|
+
url: item.image
|
|
41
|
+
}))
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
} catch (error: unknown) {
|
|
45
|
+
if ((error as Error & { status?: number })?.status === 404) {
|
|
46
|
+
notFound();
|
|
47
|
+
}
|
|
48
|
+
throw error;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return result;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
async function Page({ params, searchParams }: ResolvedPageProps<{ pk: number }>) {
|
|
55
|
+
if (params.pk === undefined || isNaN(Number(params.pk))) {
|
|
56
|
+
notFound();
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
try {
|
|
60
|
+
const [{ data, breadcrumbData }, deliveryReturn] = await Promise.all([
|
|
61
|
+
getProductData({
|
|
62
|
+
pk: params.pk,
|
|
63
|
+
searchParams,
|
|
64
|
+
groupProduct: true
|
|
65
|
+
}),
|
|
66
|
+
getWidgetData({ slug: 'product-delivery-returns' })
|
|
67
|
+
]);
|
|
68
|
+
|
|
69
|
+
const jsonLd = generateJsonLd(data.product);
|
|
70
|
+
|
|
71
|
+
return (
|
|
72
|
+
<>
|
|
73
|
+
<ProductLayout data={data} breadcrumbData={breadcrumbData}>
|
|
74
|
+
<ProductGroupInfo
|
|
75
|
+
data={data}
|
|
76
|
+
deliveryReturn={deliveryReturn?.attributes}
|
|
77
|
+
/>
|
|
78
|
+
</ProductLayout>
|
|
79
|
+
<script
|
|
80
|
+
type="application/ld+json"
|
|
81
|
+
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
|
|
82
|
+
/>
|
|
83
|
+
</>
|
|
84
|
+
);
|
|
85
|
+
} catch (error: unknown) {
|
|
86
|
+
if ((error as Error & { status?: number })?.status === 404) {
|
|
87
|
+
notFound();
|
|
88
|
+
}
|
|
89
|
+
throw error;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export default withSegmentDefaults(Page, { segmentType: 'page' });
|
package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/landing-page/[pk]/page.tsx
RENAMED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { getLandingPageData } from '@akinon/next/data/server';
|
|
2
2
|
import { withSegmentDefaults } from '@akinon/next/hocs/server';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
async function Page(props: PageProps<{ pk: number }>) {
|
|
6
|
-
const params = await props.params;
|
|
3
|
+
import { ResolvedPageProps } from '@akinon/next/types';
|
|
7
4
|
|
|
5
|
+
async function Page({ params }: ResolvedPageProps<{ pk: number }>) {
|
|
8
6
|
const data = await getLandingPageData({ pk: params.pk });
|
|
9
7
|
|
|
10
8
|
const content = data.landing_page;
|
|
@@ -6,7 +6,7 @@ import Footer from '@theme/views/footer';
|
|
|
6
6
|
import Header from '@theme/views/header';
|
|
7
7
|
import RootModal from '@theme/views/root-modal';
|
|
8
8
|
import ClientRoot from './client-root';
|
|
9
|
-
import {
|
|
9
|
+
import { ResolvedRootLayoutProps, Metadata } from '@akinon/next/types';
|
|
10
10
|
import { getSeoData } from '@akinon/next/data/server';
|
|
11
11
|
import PzRoot from '@akinon/next/components/pz-root';
|
|
12
12
|
import MobileAppToggler from '@akinon/next/components/mobile-app-toggler';
|
|
@@ -42,19 +42,12 @@ export async function generateMetadata() {
|
|
|
42
42
|
return result;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
async function RootLayout({
|
|
46
|
-
params,
|
|
47
|
-
locale,
|
|
48
|
-
translations,
|
|
49
|
-
children
|
|
50
|
-
}: RootLayoutProps) {
|
|
51
|
-
const layoutParams = await params;
|
|
52
|
-
|
|
45
|
+
async function RootLayout({ locale, translations, children }: ResolvedRootLayoutProps) {
|
|
53
46
|
return (
|
|
54
47
|
<html lang={locale.isoCode} {...(locale.rtl ? { dir: 'rtl' } : {})}>
|
|
55
48
|
<head />
|
|
56
49
|
<body className="overflow-x-hidden">
|
|
57
|
-
<PzRoot translations={translations} {
|
|
50
|
+
<PzRoot translations={translations} locale={locale.value}>
|
|
58
51
|
<ClientRoot>
|
|
59
52
|
<div className="overflow-x-hidden">
|
|
60
53
|
<MobileAppToggler>
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { getListData } from '@akinon/next/data/server';
|
|
2
2
|
import { withSegmentDefaults } from '@akinon/next/hocs/server';
|
|
3
|
-
import {
|
|
3
|
+
import { ResolvedPageProps } from '@akinon/next/types';
|
|
4
4
|
import CategoryLayout from '@theme/views/category/layout';
|
|
5
5
|
|
|
6
|
-
async function Page(
|
|
7
|
-
const searchParams = await props.searchParams;
|
|
8
|
-
|
|
6
|
+
async function Page({ searchParams }: ResolvedPageProps) {
|
|
9
7
|
const data = await getListData({ searchParams });
|
|
10
8
|
|
|
11
9
|
return (
|