@ikas/storefront 2.0.61-alpha.5 → 2.0.61
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from'../ext/decode-uri-component/index.js';export{default}from"../node_modules/decode-uri-component/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from'../ext/split-on-first/index.js';export{default}from"../node_modules/split-on-first/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeAutoObservable as e}from"mobx";import"../models/data/blog/index.js";import"../models/data/brand/index.js";import"../models/data/category/index.js";import"../models/data/checkout/index.js";import"../models/data/customer/address/index.js";import"../models/data/customer/index.js";import"../models/data/customer-review/index.js";import"../models/data/html-meta-data/index.js";import"../models/data/image/index.js";import"../models/data/installment-info/index.js";import"../models/data/merchant-settings/index.js";import"../models/data/order/index.js";import"../models/data/order/line-item/index.js";import"../api/product-option-file/index.js";import"../models/data/product/index.js";import"../models/data/variant-type/index.js";import"../models/data/product/variant/index.js";import"../models/data/product/variant/price/index.js";import"../models/data/product-attribute/index.js";import"../models/data/product/attribute-value/index.js";import"../models/data/product-filter/index.js";import"../models/data/variant-type/variant-value/index.js";import"../models/data/order-transaction/index.js";import"../models/data/product-option-set/index.js";import"../models/data/raffle/index.js";import"../models/data/product-campaing/campaign/index.js";import"../models/data/customer-attribute/index.js";import"../models/data/customer-attribute/customer-attribute-sales-channel/index.js";import"../models/theme/theme.js";import"../models/theme/page/index.js";import"../models/theme/component/prop/index.js";import"../models/theme/page/component/prop-value/link.js";import"../models/ui/brand-list/index.js";import"../models/ui/blog-list/index.js";import"../models/ui/blog-category-list/index.js";import"../models/ui/category-list/index.js";import{IkasProductDetail as t}from"../models/ui/product-detail/index.js";import"../models/ui/product-list/index.js";import"../models/ui/product-attribute-detail/index.js";import"../models/ui/product-attribute-list/index.js";import"../models/ui/customer-review-list/index.js";import"../models/ui/customer-review-summary-list/index.js";import"../models/ui/validator/index.js";import"../models/ui/validator/rules/index.js";import"../models/ui/validator/form/login.js";import"../models/ui/validator/form/address.js";import"../models/ui/validator/form/register.js";import"../models/ui/validator/form/contact-form.js";import"../models/ui/validator/form/forgot-password.js";import"../models/ui/validator/form/recover-password.js";import"../models/ui/validator/form/account-info.js";import"../models/ui/validator/form/raffle-form.js";import"../models/ui/validator/form/customer-review.js";import"../models/ui/raffle-list/index.js";import"../models/theme/settings/index.js";import"../models/theme/custom-data/index.js";import{CheckoutStep as r}from"../components/checkout/model.js";import{IkasStorefrontConfig as o}from"../storefront/index.js";var a="undefined"==typeof window,i=function(){function i(){e(this)}return i.pageView=function(e){try{var t={event:"page-view",page:e};return!a&&window.dataLayer&&window.dataLayer.push(t),t}catch(e){console.error(e)}},i.productView=function(e){var t;try{var r={event:"view_item",ecommerce:{items:[n(e)],extraParams:{parent_id:e.product.id,currency:e.selectedVariant.price.currency,url:"https://".concat(window.location.hostname).concat(e.href),item_image:(null===(t=e.selectedVariant.mainImage)||void 0===t?void 0:t.src)||""}}};return!a&&window.dataLayer&&window.dataLayer.push(r),r}catch(e){console.error(e)}},i.addToCart=function(e,r){var i=o.store.cartStore.cart;try{var m={event:"add_to_cart",ecommerce:{items:[e instanceof t?n(e,r):d(e,r)],cart:i}};return!a&&window.dataLayer&&window.dataLayer.push(m),m}catch(e){console.error(e)}},i.removeFromCart=function(e,r){var i=o.store.cartStore.cart;try{var m={event:"remove_from_cart",ecommerce:{items:[e instanceof t?n(e,r):d(e,r)],cart:0===(null==i?void 0:i.itemCount)?null:i}};return!a&&window.dataLayer&&window.dataLayer.push(m),m}catch(e){console.error(e)}},i.beginCheckout=function(e){var t;try{var r={event:"begin_checkout",ecommerce:{items:null===(t=e.cart)||void 0===t?void 0:t.items.map((function(e){return d(e,e.quantity)}))}};return!a&&window.dataLayer&&window.dataLayer.push(r),r}catch(e){console.error(e)}},i.purchase=function(e,t){var r,o,i;try{var n={event:"purchase",ecommerce:{purchase:{transaction_id:t,affiliation:window.location.hostname,value:""+e.totalFinalPrice,tax:""+(null===(r=e.cart)||void 0===r?void 0:r.totalTax),shipping:""+e.shippingTotal,currency:null===(o=e.cart)||void 0===o?void 0:o.currencyCode,coupon:e.couponCode,items:null===(i=e.cart)||void 0===i?void 0:i.items.map((function(e){return d(e,e.quantity)}))}}};return!a&&window.dataLayer&&window.dataLayer.push(n),n}catch(e){console.error(e)}},i.checkoutStep=function(e,t){var o,i="";t===r.INFO?i="checkout_info":t===r.SHIPPING?i="checkout_shipping":t===r.PAYMENT?i="checkout_payment":t===r.SUCCESS&&(i="checkout_success");try{var n={event:i,ecommerce:{items:null===(o=e.cart)||void 0===o?void 0:o.items.map((function(e){return d(e,e.quantity)}))}};return!a&&window.dataLayer&&window.dataLayer.push(n),n}catch(e){console.error(e)}},i.disableHTML=function(){try{!a&&window.dataLayer&&window.dataLayer.push({"gtm.blocklist":["html","customScripts","customPixels","nonGoogleScripts"]})}catch(e){console.error(e)}},i.completeRegistration=function(){try{var e={event:"customer_register"};return!a&&window.dataLayer&&window.dataLayer.push(e),e}catch(e){console.error(e)}},i.search=function(e){try{var t={event:"search",search_string:e};return!a&&window.dataLayer&&window.dataLayer.push(t),t}catch(e){console.error(e)}},i.viewCategory=function(e,t){try{var r={event:"view_category",ecommerce:{category:[{id:e.id,name:e.name,metaData:e.metaData,href:e.href,image:e.image,path:t}]}};return!a&&window.dataLayer&&window.dataLayer.push(r),r}catch(e){console.error(e)}},i.customerLogin=function(e){try{var t={event:"customer_login",email:e};return!a&&window.dataLayer&&window.dataLayer.push(t),t}catch(e){console.error(e)}},i.customerVisit=function(e){try{var t={event:"customer_visit",email:e};return!a&&window.dataLayer&&window.dataLayer.push(t),t}catch(e){console.error(e)}},i}();function n(e,t){var r;return void 0===t&&(t=1),{item_name:e.product.name,item_id:e.selectedVariant.id,price:e.selectedVariant.price.finalPrice,item_brand:(null===(r=e.product.brand)||void 0===r?void 0:r.name)||"",item_category:e.product.categories.length?e.product.categories[0].name:"",item_category_2:e.product.categories.length>1?e.product.categories[1].name:"",item_category_3:e.product.categories.length>2?e.product.categories[2].name:"",item_category_4:e.product.categories.length>3?e.product.categories[3].name:"",item_variant:e.selectedVariant.variantValues.map((function(e){return e.name})).join(" / "),item_list_name:"",item_list_id:"",index:1,quantity:t}}function d(e,t){return void 0===t&&(t=1),{item_name:e.variant.name,item_id:e.variant.id,price:""+e.finalPrice,item_brand:"",item_category:"",item_category_2:"",item_category_3:"",item_category_4:"",item_variant:e.variant.variantValues.map((function(e){return e.variantValueName})).join(" / "),item_list_name:"",item_list_id:"",index:1,quantity:t}}export{i as GoogleTagManager};
|
|
1
|
+
import{makeAutoObservable as e}from"mobx";import"../models/data/blog/index.js";import"../models/data/brand/index.js";import"../models/data/category/index.js";import"../models/data/checkout/index.js";import"../models/data/customer/address/index.js";import"../models/data/customer/index.js";import"../models/data/customer-review/index.js";import"../models/data/html-meta-data/index.js";import"../models/data/image/index.js";import"../models/data/installment-info/index.js";import"../models/data/merchant-settings/index.js";import"../models/data/order/index.js";import"../models/data/order/line-item/index.js";import"../api/product-option-file/index.js";import"../models/data/product/index.js";import"../models/data/variant-type/index.js";import"../models/data/product/variant/index.js";import"../models/data/product/variant/price/index.js";import"../models/data/product-attribute/index.js";import"../models/data/product/attribute-value/index.js";import"../models/data/product-filter/index.js";import"../models/data/variant-type/variant-value/index.js";import"../models/data/order-transaction/index.js";import"../models/data/product-option-set/index.js";import"../models/data/raffle/index.js";import"../models/data/product-campaing/campaign/index.js";import"../models/data/customer-attribute/index.js";import"../models/data/customer-attribute/customer-attribute-sales-channel/index.js";import"../models/theme/theme.js";import"../models/theme/page/index.js";import"../models/theme/component/prop/index.js";import"../models/theme/page/component/prop-value/link.js";import"../models/ui/brand-list/index.js";import"../models/ui/blog-list/index.js";import"../models/ui/blog-category-list/index.js";import"../models/ui/category-list/index.js";import{IkasProductDetail as t}from"../models/ui/product-detail/index.js";import"../models/ui/product-list/index.js";import"../models/ui/product-attribute-detail/index.js";import"../models/ui/product-attribute-list/index.js";import"../models/ui/customer-review-list/index.js";import"../models/ui/customer-review-summary-list/index.js";import"../models/ui/validator/index.js";import"../models/ui/validator/rules/index.js";import"../models/ui/validator/form/login.js";import"../models/ui/validator/form/address.js";import"../models/ui/validator/form/register.js";import"../models/ui/validator/form/contact-form.js";import"../models/ui/validator/form/forgot-password.js";import"../models/ui/validator/form/recover-password.js";import"../models/ui/validator/form/account-info.js";import"../models/ui/validator/form/raffle-form.js";import"../models/ui/validator/form/customer-review.js";import"../models/ui/raffle-list/index.js";import"../models/theme/settings/index.js";import"../models/theme/custom-data/index.js";import{CheckoutStep as r}from"../components/checkout/model.js";import{IkasStorefrontConfig as o}from"../storefront/index.js";var a="undefined"==typeof window,i=function(){function i(){e(this)}return i.pageView=function(e){try{var t={event:"page-view-GTM",page:e};return!a&&window.dataLayer&&window.dataLayer.push(t),t}catch(e){console.error(e)}},i.productView=function(e){var t;try{var r={event:"view_item-GTM",ecommerce:{items:[n(e)],extraParams:{parent_id:e.product.id,currency:e.selectedVariant.price.currency,url:"https://".concat(window.location.hostname).concat(e.href),item_image:(null===(t=e.selectedVariant.mainImage)||void 0===t?void 0:t.src)||""}}};return!a&&window.dataLayer&&window.dataLayer.push(r),r}catch(e){console.error(e)}},i.addToCart=function(e,r){var i=o.store.cartStore.cart;try{var m={event:"add_to_cart-GTM",ecommerce:{items:[e instanceof t?n(e,r):d(e,r)],cart:i}};return!a&&window.dataLayer&&window.dataLayer.push(m),m}catch(e){console.error(e)}},i.removeFromCart=function(e,r){var i=o.store.cartStore.cart;try{var m={event:"remove_from_cart-GTM",ecommerce:{items:[e instanceof t?n(e,r):d(e,r)],cart:0===(null==i?void 0:i.itemCount)?null:i}};return!a&&window.dataLayer&&window.dataLayer.push(m),m}catch(e){console.error(e)}},i.beginCheckout=function(e){var t;try{var r={event:"begin_checkout-GTM",ecommerce:{items:null===(t=e.cart)||void 0===t?void 0:t.items.map((function(e){return d(e,e.quantity)}))}};return!a&&window.dataLayer&&window.dataLayer.push(r),r}catch(e){console.error(e)}},i.purchase=function(e,t){var r,o,i;try{var n={event:"purchase-GTM",ecommerce:{purchase:{transaction_id:t,affiliation:window.location.hostname,value:""+e.totalFinalPrice,tax:""+(null===(r=e.cart)||void 0===r?void 0:r.totalTax),shipping:""+e.shippingTotal,currency:null===(o=e.cart)||void 0===o?void 0:o.currencyCode,coupon:e.couponCode,items:null===(i=e.cart)||void 0===i?void 0:i.items.map((function(e){return d(e,e.quantity)}))}}};return!a&&window.dataLayer&&window.dataLayer.push(n),n}catch(e){console.error(e)}},i.checkoutStep=function(e,t){var o,i="";t===r.INFO?i="checkout_info-GTM":t===r.SHIPPING?i="checkout_shipping-GTM":t===r.PAYMENT?i="checkout_payment-GTM":t===r.SUCCESS&&(i="checkout_success-GTM");try{var n={event:i,ecommerce:{items:null===(o=e.cart)||void 0===o?void 0:o.items.map((function(e){return d(e,e.quantity)}))}};return!a&&window.dataLayer&&window.dataLayer.push(n),n}catch(e){console.error(e)}},i.disableHTML=function(){try{!a&&window.dataLayer&&window.dataLayer.push({"gtm.blocklist":["html","customScripts","customPixels","nonGoogleScripts"]})}catch(e){console.error(e)}},i.completeRegistration=function(){try{var e={event:"customer_register-GTM"};return!a&&window.dataLayer&&window.dataLayer.push(e),e}catch(e){console.error(e)}},i.search=function(e){try{var t={event:"search-GTM",search_string:e};return!a&&window.dataLayer&&window.dataLayer.push(t),t}catch(e){console.error(e)}},i.viewCategory=function(e,t){try{var r={event:"view_category-GTM",ecommerce:{category:[{id:e.id,name:e.name,metaData:e.metaData,href:e.href,image:e.image,path:t}]}};return!a&&window.dataLayer&&window.dataLayer.push(r),r}catch(e){console.error(e)}},i.customerLogin=function(e){try{var t={event:"customer_login-GTM",email:e};return!a&&window.dataLayer&&window.dataLayer.push(t),t}catch(e){console.error(e)}},i.customerVisit=function(e){try{var t={event:"customer_visit-GTM",email:e};return!a&&window.dataLayer&&window.dataLayer.push(t),t}catch(e){console.error(e)}},i}();function n(e,t){var r;return void 0===t&&(t=1),{item_name:e.product.name,item_id:e.selectedVariant.id,price:e.selectedVariant.price.finalPrice,item_brand:(null===(r=e.product.brand)||void 0===r?void 0:r.name)||"",item_category:e.product.categories.length?e.product.categories[0].name:"",item_category_2:e.product.categories.length>1?e.product.categories[1].name:"",item_category_3:e.product.categories.length>2?e.product.categories[2].name:"",item_category_4:e.product.categories.length>3?e.product.categories[3].name:"",item_variant:e.selectedVariant.variantValues.map((function(e){return e.name})).join(" / "),item_list_name:"",item_list_id:"",index:1,quantity:t}}function d(e,t){return void 0===t&&(t=1),{item_name:e.variant.name,item_id:e.variant.id,price:""+e.finalPrice,item_brand:"",item_category:"",item_category_2:"",item_category_3:"",item_category_4:"",item_variant:e.variant.variantValues.map((function(e){return e.variantValueName})).join(" / "),item_list_name:"",item_list_id:"",index:1,quantity:t}}export{i as GoogleTagManager};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as t,__spreadArray as e}from'../../ext/tslib/tslib.es6.js';import*as o from"react";import{observer as r}from"mobx-react-lite";import i from"next/head.js";import"../../models/data/blog/index.js";import{IkasBrand as a}from"../../models/data/brand/index.js";import{IkasCategory as n}from"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import"mobx";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import{IkasMerchantSettings as s}from"../../models/data/merchant-settings/index.js";import"../../models/data/order/index.js";import"../../models/data/order/line-item/index.js";import"../../api/product-option-file/index.js";import"../../models/data/product/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product-attribute/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product-filter/index.js";import"../../models/data/variant-type/variant-value/index.js";import"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/index.js";import"../../models/data/product-campaing/campaign/index.js";import"../../models/data/customer-attribute/index.js";import"../../models/data/customer-attribute/customer-attribute-sales-channel/index.js";import"../../models/theme/theme.js";import{IkasThemePageType as m}from"../../models/theme/page/index.js";import"../../models/theme/component/prop/index.js";import"../../models/theme/page/component/prop-value/link.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/category-list/index.js";import{IkasProductDetail as d}from"../../models/ui/product-detail/index.js";import"../../models/ui/product-list/index.js";import"../../models/ui/product-attribute-detail/index.js";import"../../models/ui/product-attribute-list/index.js";import"../../models/ui/customer-review-list/index.js";import"../../models/ui/customer-review-summary-list/index.js";import"../../models/ui/validator/index.js";import"../../models/ui/validator/rules/index.js";import"../../models/ui/validator/form/login.js";import"../../models/ui/validator/form/address.js";import"../../models/ui/validator/form/register.js";import"../../models/ui/validator/form/contact-form.js";import"../../models/ui/validator/form/forgot-password.js";import"../../models/ui/validator/form/recover-password.js";import"../../models/ui/validator/form/account-info.js";import"../../models/ui/validator/form/raffle-form.js";import"../../models/ui/validator/form/customer-review.js";import"../../models/ui/raffle-list/index.js";import"../../models/theme/settings/index.js";import"../../models/theme/custom-data/index.js";import{IkasStorefrontConfig as
|
|
1
|
+
import{__assign as t,__spreadArray as e}from'../../ext/tslib/tslib.es6.js';import*as o from"react";import{observer as r}from"mobx-react-lite";import i from"next/head.js";import"../../models/data/blog/index.js";import{IkasBrand as a}from"../../models/data/brand/index.js";import{IkasCategory as n}from"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-review/index.js";import"mobx";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/installment-info/index.js";import{IkasMerchantSettings as s}from"../../models/data/merchant-settings/index.js";import"../../models/data/order/index.js";import"../../models/data/order/line-item/index.js";import"../../api/product-option-file/index.js";import"../../models/data/product/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product-attribute/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product-filter/index.js";import"../../models/data/variant-type/variant-value/index.js";import"../../models/data/order-transaction/index.js";import"../../models/data/product-option-set/index.js";import"../../models/data/raffle/index.js";import"../../models/data/product-campaing/campaign/index.js";import"../../models/data/customer-attribute/index.js";import"../../models/data/customer-attribute/customer-attribute-sales-channel/index.js";import"../../models/theme/theme.js";import{IkasThemePageType as m}from"../../models/theme/page/index.js";import"../../models/theme/component/prop/index.js";import"../../models/theme/page/component/prop-value/link.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/category-list/index.js";import{IkasProductDetail as d}from"../../models/ui/product-detail/index.js";import"../../models/ui/product-list/index.js";import"../../models/ui/product-attribute-detail/index.js";import"../../models/ui/product-attribute-list/index.js";import"../../models/ui/customer-review-list/index.js";import"../../models/ui/customer-review-summary-list/index.js";import"../../models/ui/validator/index.js";import"../../models/ui/validator/rules/index.js";import"../../models/ui/validator/form/login.js";import"../../models/ui/validator/form/address.js";import"../../models/ui/validator/form/register.js";import"../../models/ui/validator/form/contact-form.js";import"../../models/ui/validator/form/forgot-password.js";import"../../models/ui/validator/form/recover-password.js";import"../../models/ui/validator/form/account-info.js";import"../../models/ui/validator/form/raffle-form.js";import"../../models/ui/validator/form/customer-review.js";import"../../models/ui/raffle-list/index.js";import"../../models/theme/settings/index.js";import"../../models/theme/custom-data/index.js";import{IkasStorefrontConfig as c}from"../../storefront/index.js";import{IkasPageDataInit as l}from"../../providers/page-data-init.js";import{useRouter as p}from"next/router";var u=r((function(e){var r=e.pageType,u=e.pageTitle,h=e.pageDescription,g=e.canonicals,v=e.disableIndex,j=e.pageSpecificDataStr,x=e.merchantSettingsStr,y=e.addOgpMetas,b=e.productReviewSummary,w=p(),E="undefined"!=typeof window,k="local"===process.env.NEXT_PUBLIC_ENV,V=w.asPath.split("?")[0].replace("/",""),O=c.routings.filter((function(t){return t.id!==c.storefrontRoutingId})),S=c.getCurrentRouting(),C=(null==S?void 0:S.path)?"/"+S.path:"",R=k?"http://localhost:3333":"https://"+c.domain;o.useEffect((function(){document.documentElement.lang=c.getCurrentLocale()}),[r,j]);var L=o.useMemo((function(){if(x)return new s(JSON.parse(x))}),[x]),I=o.useMemo((function(){if(!j)return j;var t=JSON.parse(j);switch(r){case m.PRODUCT:return new d(t.product,t.selectedVariantValues);case m.CATEGORY:return new n(t);case m.BRAND:return new a(t);default:return j}}),[j]),T=o.useMemo((function(){if(I&&I.href)return"".concat(R).concat(I.href)}),[I]),D=o.useMemo((function(){var t,e=[];if(y)if(e.push({property:"og:type",content:"website"}),e.push({property:"og:site_name",content:"https://"+c.domain}),u&&e.push({property:"og:title",content:u}),h&&e.push({property:"og:description",content:h}),e.push({property:"og:url",content:T||(E?window.location.href:"")||"https://".concat(c.domain)}),I&&r===m.PRODUCT){var o=I;o.selectedVariant.mainImage&&e.push({property:"og:image",content:null===(t=o.selectedVariant.mainImage)||void 0===t?void 0:t.src})}else L&&e.push({property:"og:image",content:L.logo.src});return e}),[u,I,T,h,L,y,L]),N=o.useMemo((function(){var e=[];if(L){var o={"@context":"https://schema.org","@type":"Website",url:"https://"+c.domain},i=function(t){var e,o;return{"@context":"https://schema.org","@type":"Store",name:null==t?void 0:t.merchantName,logo:null===(e=null==t?void 0:t.logo)||void 0===e?void 0:e.src,image:null===(o=null==t?void 0:t.logo)||void 0===o?void 0:o.src,url:"https://"+c.domain}}(L);e.push(o),e.push(i)}if(I&&r===m.PRODUCT){var a=I,n=function(e,o){var r,i;try{"undefined"!=typeof window&&l._initProductDetailOnBrowser(e);var a="https://".concat(c.domain).concat(e.href);return t(t({"@context":"https://schema.org/","@type":"Product",name:e.product.name,description:null===(r=e.product.metaData)||void 0===r?void 0:r.description,image:e.selectedVariant.images.map((function(t){return t.src})),productId:e.selectedVariant.id,sku:e.selectedVariant.sku,mpn:e.selectedVariant.barcodeList.length?e.selectedVariant.barcodeList[0]:"",brand:{"@type":"Brand",name:null===(i=e.product.brand)||void 0===i?void 0:i.name}},o&&{aggregateRating:{"@type":"AggregateRating",ratingValue:o.averageStar,reviewCount:o.totalReview}}),{offers:{"@type":"Offer",url:a,priceCurrency:e.selectedVariant.price.currency||"TRY",price:e.selectedVariant.price.finalPrice,priceValidUntil:"",itemCondition:"https://schema.org/NewCondition",availability:e.selectedVariant.stock>0?"https://schema.org/InStock":"https://schema.org/OutOfStock"}})}catch(t){}}(a,b?JSON.parse(b):null);if(n&&e.push(n),a.product.categories.length)(d=f(a.product.categories[0]))&&e.push(d)}if(I&&r===m.CATEGORY){var s=function(t){var e,o,r;try{return{"@context":"http://schema.org","@type":"CollectionPage",url:"https://".concat(c.domain).concat(t.href),name:null===(e=t.metaData)||void 0===e?void 0:e.pageTitle,description:null===(o=t.metaData)||void 0===o?void 0:o.description,image:null===(r=t.image)||void 0===r?void 0:r.src}}catch(t){}}(I),d=f(I);s&&e.push(s),d&&e.push(d)}return e}),[I,L]);return o.createElement(i,null,o.createElement("title",null,u||""),o.createElement("meta",{name:"description",content:h||""}),O.map((function(t){return o.createElement("link",{key:t.id,rel:"alternate",hrefLang:t.locale,href:"".concat(R+(t.path?"/"+t.path:""),"/").concat(V)})})),!!S&&o.createElement("link",{key:"current-routing-hreflang",rel:"alternate",hrefLang:S.locale,href:"".concat(R).concat(C,"/").concat(V)}),!!v&&o.createElement("meta",{name:"robots",content:"noindex"}),!!y&&D.map((function(t,e){return o.createElement("meta",{key:"".concat(t.content,"-").concat(e),property:t.property,content:t.content})})),!!g&&g.map((function(t,e){return o.createElement("link",{key:e+"url",rel:"canonical",href:"".concat(R).concat(C).concat(t)})})),o.createElement("link",{rel:"canonical",href:"".concat(R).concat(C,"/").concat(V)}),!!N.length&&N.map((function(t,e){return o.createElement("script",{key:e,type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(t)}})})))}));function f(t){try{return{"@context":"http://schema.org","@type":"BreadcrumbList",itemListElement:t.path.length?e(e([],t.path.map((function(t,e){return{"@type":"ListItem",position:e+1,name:t.name,item:"https://"+c.domain+t.href}})),!0),[{"@type":"ListItem",position:t.path.length+1,name:t.name,item:"https://"+c.domain+t.href}],!1):[{"@type":"ListItem",position:1,name:t.name,item:"https://"+c.domain+t.href}]}}catch(t){}}export{u as IkasPageHead};
|