@salla.sa/twilight-components 2.14.300 → 2.14.302
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/dist/cjs/{filepond-BScg3EjA.js → filepond-BRWi-MWe.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-C0equ1tk.js → filepond-plugin-file-poster-BeKSlvGr.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-DbSDO39t.js → filepond-plugin-file-validate-size-nonPpUBw.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-oNrCSQ4M.js → filepond-plugin-file-validate-type-BucCOm94.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-CEs1Wvna.js → filepond-plugin-image-edit-GnrEKFw1.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-CR0z9rwJ.js → filepond-plugin-image-exif-orientation-CcyyVfMq.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-QCP0yf11.js → filepond-plugin-image-preview-C9Z27UBx.js} +1 -1
- package/dist/cjs/{index-bUFB5h9D.js → index--gjiun-h.js} +1 -1
- package/dist/cjs/{index-tXQykYB9.js → index-BWcgfy8W.js} +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/salla-accordion_62.cjs.entry.js +10 -12
- package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
- package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-item-offers.cjs.entry.js +1 -1
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +3 -2
- package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-program.cjs.entry.js +1 -1
- package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
- package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-orders.cjs.entry.js +1 -1
- package/dist/cjs/salla-payments.cjs.entry.js +1 -1
- package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
- package/dist/cjs/salla-review-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-reviews-page.cjs.entry.js +1 -1
- package/dist/cjs/salla-reviews.cjs.entry.js +1 -1
- package/dist/cjs/salla-social.cjs.entry.js +1 -1
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
- package/dist/cjs/salla-verify.cjs.entry.js +1 -1
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/twilight.cjs.js +1 -1
- package/dist/collection/components/salla-contacts/salla-contacts.js +2 -1
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-slider.js +1 -3
- package/dist/components/index.js +2 -2
- package/dist/components/salla-contacts.js +2 -1
- package/dist/components/salla-multiple-bundle-product-slider2.js +1 -3
- package/dist/esm/{filepond-DZgILbOT.js → filepond-DIi7VF0c.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-DMXXHQ1L.js → filepond-plugin-file-poster-C7auTp2H.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-uKHV0jNp.js → filepond-plugin-file-validate-size-DqiYtpc2.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-D8hhJ9EB.js → filepond-plugin-file-validate-type-Drt0dfiK.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-0X2RSyN6.js → filepond-plugin-image-edit-B8vrHstP.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-0v28bqEm.js → filepond-plugin-image-exif-orientation-CEFy5_xT.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-rwaj1mis.js → filepond-plugin-image-preview-BJIFb11t.js} +1 -1
- package/dist/esm/{index-Vf9-v4wr.js → index-DKAYrLM1.js} +2 -2
- package/dist/esm/{index-DA5HnTzR.js → index-lg6hKynk.js} +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/salla-accordion_62.entry.js +10 -12
- package/dist/esm/salla-advertisement.entry.js +1 -1
- package/dist/esm/salla-app-install-alert.entry.js +1 -1
- package/dist/esm/salla-apps-icons.entry.js +1 -1
- package/dist/esm/salla-cart-item-offers.entry.js +1 -1
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +3 -2
- package/dist/esm/salla-custom-fields.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js +1 -1
- package/dist/esm/salla-filters.entry.js +1 -1
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm/salla-loyalty-program.entry.js +1 -1
- package/dist/esm/salla-metadata.entry.js +1 -1
- package/dist/esm/salla-notification-item.entry.js +1 -1
- package/dist/esm/salla-notifications.entry.js +1 -1
- package/dist/esm/salla-offer.entry.js +1 -1
- package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-order-details-options.entry.js +1 -1
- package/dist/esm/salla-order-details.entry.js +1 -1
- package/dist/esm/salla-order-summary.entry.js +1 -1
- package/dist/esm/salla-order-totals-card.entry.js +1 -1
- package/dist/esm/salla-orders.entry.js +1 -1
- package/dist/esm/salla-payments.entry.js +1 -1
- package/dist/esm/salla-price-range.entry.js +1 -1
- package/dist/esm/salla-review-card.entry.js +1 -1
- package/dist/esm/salla-reviews-page.entry.js +1 -1
- package/dist/esm/salla-reviews.entry.js +1 -1
- package/dist/esm/salla-social.entry.js +1 -1
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- package/dist/esm/salla-tooltip.entry.js +1 -1
- package/dist/esm/salla-trust-badges.entry.js +1 -1
- package/dist/esm/salla-verify.entry.js +1 -1
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/twilight.js +2 -2
- package/dist/twilight/{p-f54b0939.entry.js → p-02ec6e21.entry.js} +1 -1
- package/dist/twilight/{p-91b68094.entry.js → p-04bf9f1e.entry.js} +1 -1
- package/dist/twilight/{p-a9adb89e.entry.js → p-09e11910.entry.js} +1 -1
- package/dist/twilight/{p-10627275.entry.js → p-0b6606df.entry.js} +1 -1
- package/dist/twilight/{p-81f65a33.entry.js → p-1276c373.entry.js} +1 -1
- package/dist/twilight/{p-7a980667.entry.js → p-1b144eb9.entry.js} +1 -1
- package/dist/twilight/{p-3d92ba5c.entry.js → p-210fdc70.entry.js} +1 -1
- package/dist/twilight/{p-9795c6d0.entry.js → p-407e93bd.entry.js} +1 -1
- package/dist/twilight/{p-70750924.entry.js → p-4f275162.entry.js} +1 -1
- package/dist/twilight/{p-83a0e642.entry.js → p-5143a824.entry.js} +1 -1
- package/dist/twilight/{p-b7ca90d8.entry.js → p-61f7623a.entry.js} +1 -1
- package/dist/twilight/{p-4ba71acf.entry.js → p-6a14e2e4.entry.js} +1 -1
- package/dist/twilight/{p-6d112428.entry.js → p-78f36598.entry.js} +1 -1
- package/dist/twilight/{p-d062aafc.entry.js → p-7ca07684.entry.js} +1 -1
- package/dist/twilight/{p-5426fed3.entry.js → p-824bba69.entry.js} +1 -1
- package/dist/twilight/{p-dfb1f2bb.entry.js → p-83125835.entry.js} +1 -1
- package/dist/twilight/{p-53ad8f04.entry.js → p-933fbd4d.entry.js} +1 -1
- package/dist/twilight/{p-ozyDVWVs.js → p-CF24vbMv.js} +1 -1
- package/dist/twilight/{p--XHnNbTg.js → p-CXXmrPiy.js} +1 -1
- package/dist/twilight/{p-Vf9-v4wr.js → p-DKAYrLM1.js} +1 -1
- package/dist/twilight/{p-BmD3prgX.js → p-DTof2E91.js} +1 -1
- package/dist/twilight/p-Dukd0jtD.js +9 -0
- package/dist/twilight/{p-bb3a0dbc.entry.js → p-a5201709.entry.js} +1 -1
- package/dist/twilight/{p-060b76fc.entry.js → p-a6a38898.entry.js} +1 -1
- package/dist/twilight/{p-97e6602f.entry.js → p-aaba5a2f.entry.js} +1 -1
- package/dist/twilight/{p-65103ff7.entry.js → p-b54bb957.entry.js} +1 -1
- package/dist/twilight/{p-8f3f3530.entry.js → p-ba2ce400.entry.js} +1 -1
- package/dist/twilight/{p-11258ae1.entry.js → p-bf9620c6.entry.js} +1 -1
- package/dist/twilight/{p-151c103f.entry.js → p-c163648b.entry.js} +1 -1
- package/dist/twilight/{p-fadae641.entry.js → p-c786edfa.entry.js} +1 -1
- package/dist/twilight/{p-20c4c8af.entry.js → p-c98d22e3.entry.js} +1 -1
- package/dist/twilight/{p-11e3381f.entry.js → p-da5abb49.entry.js} +1 -1
- package/dist/twilight/{p-4d3071a5.entry.js → p-dbac72c9.entry.js} +1 -1
- package/dist/twilight/{p-c77da76a.entry.js → p-dfb34dbd.entry.js} +1 -1
- package/dist/twilight/{p-f155cb58.entry.js → p-e382c1f5.entry.js} +1 -1
- package/dist/twilight/{p-ddd3cb10.entry.js → p-ee2e2c06.entry.js} +1 -1
- package/dist/twilight/{p-11734c15.entry.js → p-f10f54b7.entry.js} +2 -2
- package/dist/twilight/{p-afeeefb3.entry.js → p-f10f5a36.entry.js} +1 -1
- package/dist/twilight/{p-446bd291.entry.js → p-faddd04f.entry.js} +1 -1
- package/dist/twilight/{p-EFshmXnQ.js → p-hhYSmY98.js} +1 -1
- package/dist/twilight/{p-DUIBkQ0L.js → p-pqbC2f_4.js} +1 -1
- package/dist/twilight/{p-CPQv1htQ.js → p-vQaSX60M.js} +1 -1
- package/dist/twilight/{p-B7BW4Mdj.js → p-zRye1rCZ.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/package.json +5 -5
- package/dist/twilight/p-DQd7LCNI.js +0 -9
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{d as t}from"./p-
|
|
4
|
+
import{d as t}from"./p-DKAYrLM1.js";function n(t,n){return n.forEach((function(n){n&&"string"!=typeof n&&!Array.isArray(n)&&Object.keys(n).forEach((function(e){if("default"!==e&&!(e in t)){var r=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(t,e,r.get?r:{enumerable:!0,get:function(){return n[e]}})}}))})),Object.freeze(t)}var e,r={exports:{}},i=(e||(e=1,r.exports=function(){var t={type:"spring",stiffness:.5,damping:.45,mass:10},n=function(t){return-.5*(Math.cos(Math.PI*t)-1)},e=function(t){var n=Math.min(10/t.width,10/t.height),e=document.createElement("canvas"),i=e.getContext("2d"),o=e.width=Math.ceil(t.width*n),a=e.height=Math.ceil(t.height*n);i.drawImage(t,0,0,o,a);var _=null;try{_=i.getImageData(0,0,o,a).data}catch(t){return null}for(var E=_.length,u=0,I=0,c=0,T=0;T<E;T+=4)u+=_[T]*_[T],I+=_[T+1]*_[T+1],c+=_[T+2]*_[T+2];return{r:u=r(u,E),g:I=r(I,E),b:c=r(c,E)}},r=function(t,n){return Math.floor(Math.sqrt(t/(n/4)))},i=function(t,e,r,i,o){t.width=e,t.height=r;var a=t.getContext("2d"),_=.5*e,E=a.createRadialGradient(_,r+110,r-100,_,r+110,r+100);(function(t,e){for(var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:10,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,_=1-a,E=e.join(","),u=0;u<=o;u++){var I=u/o;t.addColorStop(a+_*I,"rgba(".concat(E,", ").concat(i(I)*r,")"))}})(E,i,o,void 0,8,.4),a.save(),a.translate(-250,0),a.scale(2,1),a.fillStyle=E,a.fillRect(0,0,e,r),a.restore()},o="undefined"!=typeof navigator,a=500,_=200,E=o&&document.createElement("canvas"),u=o&&document.createElement("canvas"),I=o&&document.createElement("canvas"),c=[40,40,40],T=[196,78,71],f=[54,151,99];o&&(i(E,a,_,c,.85),i(u,a,_,T,1),i(I,a,_,f,1));var l=function(n){var r=n.utils.createView({name:"file-poster-overlay",tag:"canvas",ignoreRect:!0,create:function(t){var n,e;(e=t.root.element).width=(n=t.props.template).width,e.height=n.height,e.getContext("2d").drawImage(n,0,0)},mixins:{styles:["opacity"],animations:{opacity:{type:"spring",mass:25}}}}),o=function(t){var n=t.root;n.ref.overlayShadow.opacity=1,n.ref.overlayError.opacity=0,n.ref.overlaySuccess.opacity=0},l=function(t){var n=t.root;n.ref.overlayShadow.opacity=.25,n.ref.overlayError.opacity=1};return n.utils.createView({name:"file-poster-wrapper",create:function(e){var o=e.root,l=e.props,s=o.query("GET_FILE_POSTER_ITEM_OVERLAY_SHADOW_COLOR"),O=o.query("GET_FILE_POSTER_ITEM_OVERLAY_ERROR_COLOR"),R=o.query("GET_FILE_POSTER_ITEM_OVERLAY_SUCCESS_COLOR");s&&s!==c&&i(E,a,_,c=s,.85),O&&O!==T&&i(u,a,_,T=O,1),R&&R!==f&&i(I,a,_,f=R,1);var v=function(n){return n.utils.createView({name:"file-poster",tag:"div",ignoreRect:!0,create:function(t){var n=t.root;n.ref.image=document.createElement("img"),n.element.appendChild(n.ref.image)},write:n.utils.createRoute({DID_FILE_POSTER_LOAD:function(t){var n=t.root,e=t.props,r=e.id,i=n.query("GET_ITEM",{id:e.id});if(i){var o=i.getMetadata("poster");n.ref.image.src=o,n.dispatch("DID_FILE_POSTER_DRAW",{id:r})}}}),mixins:{styles:["scaleX","scaleY","opacity"],animations:{scaleX:t,scaleY:t,opacity:{type:"tween",duration:750}}}})}(n);o.ref.image=o.appendChildView(o.createChildView(v,{id:l.id,scaleX:1.25,scaleY:1.25,opacity:0})),o.ref.overlayShadow=o.appendChildView(o.createChildView(r,{template:E,opacity:0})),o.ref.overlaySuccess=o.appendChildView(o.createChildView(r,{template:I,opacity:0})),o.ref.overlayError=o.appendChildView(o.createChildView(r,{template:u,opacity:0}))},write:n.utils.createRoute({DID_FILE_POSTER_LOAD:function(t){t.root.ref.overlayShadow.opacity=1},DID_FILE_POSTER_DRAW:function(t){var n=t.root.ref.image;n.scaleX=1,n.scaleY=1,n.opacity=1},DID_FILE_POSTER_CONTAINER_CREATE:function(t){var n,r,i,o=t.root,a=t.props.id,_=o.query("GET_ITEM",a);if(_){var E=_.getMetadata("poster"),u=function(t){var n=o.query("GET_FILE_POSTER_CALCULATE_AVERAGE_IMAGE_COLOR")?e(t):null;_.setMetadata("color",n,!0),o.dispatch("DID_FILE_POSTER_LOAD",{id:a,data:t})};n=E,r=function(t,n){var e,r;o.dispatch("DID_FILE_POSTER_CALCULATE_SIZE",{id:a,width:t,height:n}),(e=E,r=o.query("GET_FILE_POSTER_CROSS_ORIGIN_ATTRIBUTE_VALUE"),new Promise((function(t,n){var i=new Image;"string"==typeof crossOrigin&&(i.crossOrigin=r),i.onload=function(){t(i)},i.onerror=function(t){n(t)},i.src=e}))).then(u)},(i=new Image).onload=function(){var t=i.naturalWidth,n=i.naturalHeight;i=null,r(t,n)},i.src=n}},DID_THROW_ITEM_LOAD_ERROR:l,DID_THROW_ITEM_PROCESSING_ERROR:l,DID_THROW_ITEM_INVALID:l,DID_COMPLETE_ITEM_PROCESSING:function(t){var n=t.root;n.ref.overlayShadow.opacity=.25,n.ref.overlaySuccess.opacity=1},DID_START_ITEM_PROCESSING:o,DID_REVERT_ITEM_PROCESSING:o})})},s=function(t){var n=t.addFilter,e=t.utils,r=e.Type,i=e.createRoute,o=l(t);return n("CREATE_VIEW",(function(t){var n=t.view,e=t.query;if((0,t.is)("file")&&e("GET_ALLOW_FILE_POSTER")){var r=function(t,r){var i=r.id,a=e("GET_ITEM",i);a&&a.getMetadata("poster")&&!a.archived&&t.ref.previousPoster!==a.getMetadata("poster")&&(t.ref.previousPoster=a.getMetadata("poster"),e("GET_FILE_POSTER_FILTER_ITEM")(a)&&(t.ref.filePoster&&n.removeChildView(t.ref.filePoster),t.ref.filePoster=n.appendChildView(n.createChildView(o,{id:i})),t.dispatch("DID_FILE_POSTER_CONTAINER_CREATE",{id:i})))},a=function(t){var n=t.root,e=n.query("GET_FILE_POSTER_HEIGHT");if(e)return e;var r=n.query("GET_FILE_POSTER_MIN_HEIGHT"),i=n.query("GET_FILE_POSTER_MAX_HEIGHT");if(r&&n.ref.imageHeight<r)return r;var o=n.rect.element.width*(n.ref.imageHeight/n.ref.imageWidth);return r&&o<r?r:i&&o>i?i:o};n.registerWriter(i({DID_LOAD_ITEM:function(t){r(t.root,t.props)},DID_FILE_POSTER_CALCULATE_SIZE:function(t){var n=t.root,e=t.action;n.ref.filePoster&&(n.ref.imageWidth=e.width,n.ref.imageHeight=e.height,n.ref.shouldUpdatePanelHeight=!0,n.dispatch("KICK"))},DID_UPDATE_ITEM_METADATA:function(t){var n=t.root,e=t.props;/poster/.test(t.action.change.key)&&r(n,e)}},(function(t){var n=t.root;n.ref.filePoster&&(n.rect.element.hidden||n.ref.shouldUpdatePanelHeight&&(n.dispatch("DID_UPDATE_PANEL_HEIGHT",{id:t.props.id,height:a({root:n})}),n.ref.shouldUpdatePanelHeight=!1))})))}})),{options:{allowFilePoster:[!0,r.BOOLEAN],filePosterHeight:[null,r.INT],filePosterMinHeight:[null,r.INT],filePosterMaxHeight:[null,r.INT],filePosterFilterItem:[function(){return!0},r.FUNCTION],filePosterCalculateAverageImageColor:[!1,r.BOOLEAN],filePosterCrossOriginAttributeValue:["Anonymous",r.STRING],filePosterItemOverlayShadowColor:[null,r.ARRAY],filePosterItemOverlayErrorColor:[null,r.ARRAY],filePosterItemOverlaySuccessColor:[null,r.ARRAY]}}};return"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:s})),s}()),r.exports),o=n({__proto__:null,default:t(i)},[i]);
|
|
5
5
|
/*!
|
|
6
6
|
* FilePondPluginFilePoster 2.5.1
|
|
7
7
|
* Licensed under MIT, https://opensource.org/licenses/MIT/
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
import{d as A}from"./p-DKAYrLM1.js";function n(A,n){return n.forEach((function(n){n&&"string"!=typeof n&&!Array.isArray(n)&&Object.keys(n).forEach((function(e){if("default"!==e&&!(e in A)){var r=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(A,e,r.get?r:{enumerable:!0,get:function(){return n[e]}})}}))})),Object.freeze(A)}var e,r={exports:{}},i=(e||(e=1,r.exports=function(){var A=65496,n=65505,e=1165519206,r=18761,i=274,t=65280,o=function(A,n){return A.getUint16(n,arguments.length>2&&void 0!==arguments[2]&&arguments[2])},a=function(A,n){return A.getUint32(n,arguments.length>2&&void 0!==arguments[2]&&arguments[2])},u="undefined"!=typeof window&&void 0!==window.document,f=void 0,d=u?new Image:{};d.onload=function(){return f=d.naturalWidth>d.naturalHeight},d.src="data:image/jpg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/4QA6RXhpZgAATU0AKgAAAAgAAwESAAMAAAABAAYAAAEoAAMAAAABAAIAAAITAAMAAAABAAEAAAAAAAD/2wBDAP//////////////////////////////////////////////////////////////////////////////////////wAALCAABAAIBASIA/8QAJgABAAAAAAAAAAAAAAAAAAAAAxABAAAAAAAAAAAAAAAAAAAAAP/aAAgBAQAAPwBH/9k=";var c=function(u){var d=u.utils,c=d.Type,v=d.isFile;return(0,u.addFilter)("DID_LOAD_ITEM",(function(u,d){var c=d.query;return new Promise((function(d){var w=u.file;if(!(v(w)&&function(A){return/^image\/jpeg/.test(A.type)}(w)&&c("GET_ALLOW_IMAGE_EXIF_ORIENTATION")&&f))return d(u);(function(u){return new Promise((function(f){var d=new FileReader;d.onload=function(u){var d=new DataView(u.target.result);if(o(d,0)===A){for(var c=d.byteLength,v=2;v<c;){var w=o(d,v);if(v+=2,w===n){if(a(d,v+=2)!==e)break;var g=o(d,v+=6)===r;v+=a(d,v+4,g);var l=o(d,v,g);v+=2;for(var p=0;p<l;p++)if(o(d,v+12*p,g)===i)return void f(o(d,v+12*p+8,g))}else{if((w&t)!==t)break;v+=o(d,v)}}f(-1)}else f(-1)},d.readAsArrayBuffer(u.slice(0,65536))}))})(w).then((function(A){u.setMetadata("exif",{orientation:A}),d(u)}))}))})),{options:{allowImageExifOrientation:[!0,c.BOOLEAN]}}};return"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:c})),c}()),r.exports),t=n({__proto__:null,default:A(i)},[i]);
|
|
5
|
+
/*!
|
|
6
|
+
* FilePondPluginImageExifOrientation 1.0.11
|
|
7
|
+
* Licensed under MIT, https://opensource.org/licenses/MIT/
|
|
8
|
+
* Please visit https://pqina.nl/filepond/ for details.
|
|
9
|
+
*/export{t as f}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{e as t,f as i,i as s,d as e,r as a,h as r,a as n}from"./p-
|
|
4
|
+
import{e as t,f as i,i as s,d as e,r as a,h as r,a as n}from"./p-DKAYrLM1.js";import{S as o}from"./p-DiKTtDW5.js";import{H as l}from"./p-Dljb4XCt.js";import"./p-CgtvEd63.js";var c,h,u,f,d,p,v,m,g,w,b,y;function _(){if(w)return g;w=1;var e=i(),a=function(){if(h)return c;h=1;var i=t();return c=function(){return i.Date.now()}}(),r=function(){if(m)return v;m=1;var t=function(){if(p)return d;p=1;var t=function(){if(f)return u;f=1;var t=/\s/;return u=function(i){for(var s=i.length;s--&&t.test(i.charAt(s)););return s}}(),i=/^\s+/;return d=function(s){return s?s.slice(0,t(s)+1).replace(i,""):s}}(),e=i(),a=s(),r=/^[-+]0x[0-9a-f]+$/i,n=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt;return v=function(i){if("number"==typeof i)return i;if(a(i))return NaN;if(e(i)){var s="function"==typeof i.valueOf?i.valueOf():i;i=e(s)?s+"":s}if("string"!=typeof i)return 0===i?i:+i;i=t(i);var c=n.test(i);return c||o.test(i)?l(i.slice(2),c?2:8):r.test(i)?NaN:+i}}(),n=Math.max,o=Math.min;return g=function(t,i,s){var l,c,h,u,f,d,p=0,v=!1,m=!1,g=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function w(i){var s=l,e=c;return l=c=void 0,p=i,u=t.apply(e,s)}function b(t){var s=t-d;return void 0===d||s>=i||s<0||m&&t-p>=h}function y(){var t=a();if(b(t))return _(t);f=setTimeout(y,function(t){var s=i-(t-d);return m?o(s,h-(t-p)):s}(t))}function _(t){return f=void 0,g&&l?w(t):(l=c=void 0,u)}function k(){var t=a(),s=b(t);if(l=arguments,c=this,d=t,s){if(void 0===f)return function(t){return p=t,f=setTimeout(y,i),v?w(t):u}(d);if(m)return clearTimeout(f),f=setTimeout(y,i),w(d)}return void 0===f&&(f=setTimeout(y,i)),u}return i=r(i)||0,e(s)&&(v=!!s.leading,h=(m="maxWait"in s)?n(r(s.maxWait)||0,i):h,g="trailing"in s?!!s.trailing:g),k.cancel=function(){void 0!==f&&clearTimeout(f),p=0,l=d=c=f=void 0},k.flush=function(){return void 0===f?u:_(a())},k},g}var k=e(function(){if(y)return b;y=1;var t=_(),s=i();return b=function(i,e,a){var r=!0,n=!0;if("function"!=typeof i)throw new TypeError("Expected a function");return s(a)&&(r="leading"in a?!!a.leading:r,n="trailing"in a?!!a.trailing:n),t(i,e,{leading:r,maxWait:e,trailing:n})}}());class T{constructor(t){this.grid=t,this.create=()=>{this.mutationObserver.observe(this.grid,{childList:!0});for(const t of Array.from(this.grid.children))this.resizeObserver.observe(t)},this.onContainerMutation=t=>{const i=t.flatMap((t=>Array.from(t.removedNodes))),s=t.flatMap((t=>Array.from(t.addedNodes)));for(const t of i)t instanceof Element&&this.resizeObserver.unobserve(t);for(const t of s)t instanceof Element&&this.resizeObserver.observe(t);i.length>0&&0===s.length&&this.update()},this.onChildrenResize=t=>{t.filter((t=>null!==t.target.parentElement)).length>0&&this.update()},this.update=k((()=>{const t=window.getComputedStyle(this.grid);if(!1===t.getPropertyValue("display").includes("grid"))return void this.clean();const i=function(t){return window.getComputedStyle(t).getPropertyValue("grid-template-columns").trim().split(/\s+(?=(?:[^()]*\([^()]*\))*[^()]*$)/)}(this.grid);if(i.length<=1)return void this.clean();const s=Number.parseFloat(t.getPropertyValue("row-gap").trim())||0,e=Array.from(this.grid.children);for(let t=0;t<i.length;t++){const i=e[t];i?.style.removeProperty("margin-top")}for(let t=0;t<e.length;t++){const a=e[t-i.length],r=e[t];if(void 0!==a&&void 0!==r){const t=a.getBoundingClientRect().bottom;r.style.removeProperty("margin-top");const i=r.getBoundingClientRect().top;if(i-s!==t){const e=Math.round(100*(t-(i-s)+Number.EPSILON))/100;r.style.setProperty("margin-top",`${e}px`)}}}}),32),this.destroy=()=>{this.resizeObserver.disconnect(),this.mutationObserver.disconnect(),this.clean()},this.clean=()=>{for(const t of Array.from(this.grid.children))t.style.removeProperty("margin-top")},this.mutationObserver=new MutationObserver(this.onContainerMutation),this.resizeObserver=new ResizeObserver(this.onChildrenResize),!1===CSS.supports("grid-template-rows","masonry")&&this.create()}[Symbol.dispose](){this.destroy()}}const E=class{constructor(t){a(this,t),this.reviews=[],this.isLoading=!1,this.pagination=null,this.sort="latest"}getUrlParams(){const t=new URLSearchParams(window.location.search);return{sort:t.get("sort")||null,page:Number.parseInt(t.get("page"))||1}}updateUrlParams(t){const i=new URL(window.location.href);for(const[s,e]of Object.entries(t))e?i.searchParams.set(s,e.toString()):i.searchParams.delete(s);window.history.replaceState({},"",i.toString())}fetchReviews(t,i){const s=this.getUrlParams();return salla.api.request("reviews",{params:{type:"products",format:"lite",per_page:8,page:i||s.page||1,sort:t||s.sort||null}})}async initializeMasonry(){const t=this.el.querySelector(".s-reviews-page-grid");if(t)try{new T(t),salla.logger.info("Masonry initialized successfully")}catch(t){salla.logger.error("Masonry initialization failed:",t)}}animateReviewCards(){const t=this.wrapper.querySelectorAll("salla-review-card:not(.animated)");l.animateItems(t)}initiateInfiniteScroll(){this.wrapper?(this.infiniteScroll=salla.infiniteScroll.initiate(this.wrapper,this.wrapper,{path:()=>this.pagination?.links?.next||null,history:!1,scrollThreshold:!1},!0),this.infiniteScroll?.on("request",(()=>{this.isLoading=!0})),this.infiniteScroll?.on("load",(t=>{this.pagination=t.pagination,this.reviews=[...this.reviews,...t.data],this.isLoading=!1,this.updateUrlParams({page:t.pagination.current_page})})),this.infiniteScroll?.on("error",(t=>{salla.logger.error("Error loading more reviews:",t),this.isLoading=!1}))):salla.logger.error("Wrapper is undefined. Cannot initiate infinite scroll.")}componentDidRender(){setTimeout((()=>{requestAnimationFrame(this.animateReviewCards.bind(this))}),176)}async componentWillLoad(){try{await salla.onReady(),this.langTitlesReviews=salla.lang.get("common.titles.reviews"),this.langSorting=salla.lang.get("pages.categories.sorting"),this.placeholderText=salla.lang.choice("pages.rating.reviews",0),this.langLoadMore=salla.lang.get("common.elements.load_more"),this.langSortByTopRating=salla.lang.get("pages.testimonials.sort_by_rating_desc"),this.langSortByMostRecent=salla.lang.get("pages.testimonials.sort_by_date_desc"),this.langSortByLeastRated=salla.lang.get("pages.testimonials.sort_by_rating_asc"),this.langSortByLeastRecent=salla.lang.get("pages.testimonials.sort_by_date_asc");const t=this.getUrlParams(),i=await this.fetchReviews(t.sort);this.sort=t.sort,this.reviews=i.data,this.pagination=i.pagination,this.langRatingReviews=salla.lang.choice("pages.rating.reviews",this.pagination?.total)}catch(t){salla.logger.error("Error loading reviews:",t)}}async handleSorting(t){const i=t.target.value;this.sort=i,this.updateUrlParams({sort:i,page:1});const s=await this.fetchReviews(i,1);this.reviews=s.data,this.pagination=s.pagination}async componentDidLoad(){await this.initializeMasonry(),this.initiateInfiniteScroll(),this.sort=this.getUrlParams().sort||"latest",this.updateUrlParams({sort:this.sort,page:1})}disconnectedCallback(){this.infiniteScroll&&this.infiniteScroll.destroy()}renderSortingOptions(){return[{value:"latest",label:this.langSortByMostRecent},{value:"oldest",label:this.langSortByLeastRecent},{value:"top_rating",label:this.langSortByTopRating},{value:"bottom_rating",label:this.langSortByLeastRated}].map((t=>r("option",{key:t.value,value:t.value,selected:t.value===this.sort},t.label)))}render(){return r("host",{key:"6d478caef9753d4aaf9ab1a5376961b748ec2088"},r("div",{key:"f84c127d660cba0890ba110b4d203e50fc1f2d8d",class:"s-reviews-page-header-wrapper"},r("h2",{key:"6c48e1343deaba4531987aefcc5888fc1e0d77ac",class:"s-reviews-page-title"},this.langTitlesReviews,r("span",{key:"fa9b923d592752b108da63efdf3167b118be65d0",class:"s-reviews-page-count"},"(",this.langRatingReviews,")")),r("div",{key:"52d0dd32e981721eb2529ed5d65769b078ad7538",class:"s-reviews-page-filter-wrapper"},r("label",{key:"0f7fe49f3ac27db63d8992efa2c3c04b3b19367d",class:"s-reviews-page-filter-label",htmlFor:"testimonials-filter"},this.langSorting),r("select",{key:"497563e494b7141c5a64dddc8cf4a202efba3776",onChange:t=>this.handleSorting(t),disabled:!this.reviews.length,class:"s-reviews-page-filter"},this.renderSortingOptions()))),this.reviews.length?r("main",{class:"s-reviews-page-grid",ref:t=>{this.wrapper=t}},this.reviews.map((t=>r("salla-review-card",{key:t.id,review:t})))):r("div",{class:"s-products-list-placeholder"},r("span",{innerHTML:o}),r("p",null,this.placeholderText)),this.pagination?.links?.next&&this.reviews.length?r("div",{class:"s-reviews-page-load-more-container"},r("salla-button",{class:"s-reviews-page-load-more-btn",loading:this.isLoading,onClick:()=>this.infiniteScroll?.loadNextPage(),onKeyUp:()=>this.infiniteScroll?.loadNextPage()},this.langLoadMore)):null)}get el(){return n(this)}};E.style=":host{display:block}";export{E as salla_reviews_page}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as i,h as a}from"./p-
|
|
4
|
+
import{r as i,h as a}from"./p-DKAYrLM1.js";const e=class{constructor(a){i(this,a)}render(){return a("a",{key:"773f4784238c5d6ff060f996891d3b42e21703a0",href:this.notification.url,class:{"s-notifications-item":!0,"s-notifications-item-shadow":!0,"s-notifications-item-read":!this.notification.is_new}},a("span",{key:"9589e70416b9ae04d82331717d29192fcfb2b0ae",class:"s-notifications-item-icon"},a("i",{key:"2a208e20051f33ed305d15f9be13d6165ad577a6",class:{"s-notifications-item-icon sicon-bell-ring":!0,"s-notifications-item-icon-new":this.notification.is_new}})),a("div",{key:"4a94e411048a69a065458c867d792c679bcf5362",class:"s-notifications-item-content"},a("div",{key:"fc9ede08e2e14d7b578f2a36ea7219dff1b9118a",class:"s-notifications-item-content-leading"},a("h4",{key:"812d7fc74046793e2fc53afbd2b4d65445dc7d7a"},this.notification.title),a("p",{key:"7a38966f6755b4261465e7b780b1028a607c6e00"},this.notification.sub_title)),a("span",{key:"ba5058df85b4fe9a685f4ea1f52e333ee9b20b7f",class:"s-notifications-item-content-trailing"},a("i",{key:"c93b353212b21a3cbfca72ff8bacd39738b332ac",class:"sicon-time s-notifications-item-content-trailing-icon"}),a("span",{key:"8206298a9fa03cd100d64b4934622033caebe7fc"},this.notification.date))))}};e.style="";export{e as salla_notification_item}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as e,h as s,H as a}from"./p-
|
|
4
|
+
import{r as e,h as s,H as a}from"./p-DKAYrLM1.js";const r=class{constructor(s){e(this,s),this.dark=!1,this.commercialRegisterLabel="",this.freelanceLabel=""}componentWillLoad(){this.initializeTranslations()}initializeTranslations(){salla.lang.onLoaded((()=>{const e=(e,s,a)=>{salla.helpers.setNested(salla.lang.messages[e],s,a)};e("ar.trans","blocks.footer.commercial_register","السجل التجاري"),e("en.trans","blocks.footer.commercial_register","Commercial Register"),e("ar.trans","blocks.footer.freelance","وثيقة العمل الحر"),e("en.trans","blocks.footer.freelance","Freelance Certificate"),this.commercialRegisterLabel=salla.lang.getWithDefault("blocks.footer.commercial_register","السجل التجاري"),this.freelanceLabel=salla.lang.getWithDefault("blocks.footer.freelance","وثيقة العمل الحر")}))}getBadgeData(){const e=salla.config.get("store.settings.commercial_number"),s=salla.config.get("store.settings.freelance_number");return e?{number:e,label:this.commercialRegisterLabel||"السجل التجاري",imageUrl:salla.url.cdn("images/commercial-register.png",70,70),type:"commercial"}:s?{number:s,label:this.freelanceLabel||"وثيقة العمل الحر",imageUrl:this.dark?salla.url.cdn("images/freelance-white.png"):salla.url.cdn("images/freelance.png"),type:"freelance"}:null}render(){const e=this.getBadgeData();return e?s(a,{class:"s-trust-badges-wrapper "+(this.dark?"dark":"")},s("img",{class:"s-trust-badges-image",width:"55",height:"55",src:e.imageUrl,alt:e.label}),s("div",{class:"s-trust-badges-content"},s("p",{class:"s-trust-badges-label"},e.label),s("b",{class:"s-trust-badges-number"},e.number))):null}};r.style="";export{r as salla_trust_badges}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as s,c as t,h as i,H as e,a as h}from"./p-
|
|
4
|
+
import{r as s,c as t,h as i,H as e,a as h}from"./p-DKAYrLM1.js";import{M as r}from"./p-DmgxDvXL.js";const l=class{constructor(i){s(this,i),this.verified=t(this,"verified"),this.translationLoaded=!1,this.display="modal",this.type="mobile",this.autoReload=!0,this.supportWebAuth=!0,this.resendAfter=30,this.isProfileVerify=!1,salla.lang.onLoaded((()=>{this.translationLoaded=!0,this.title=salla.lang.get("pages.profile.verify_title")+salla.lang.get("common.elements."+this.type),this.modal?.setTitle(this.title)})),"inline"!=this.display?(salla.event.on("profile::verification",(s=>{let t=Array.isArray(s)?s[0]:s;this.isProfileVerify=!0,this.open(t),this.title=salla.lang.get("pages.profile.verify_title")+salla.lang.get("common.elements."+t.type),this.modal?.setTitle(this.title)})),salla.event.on("modalClosed",(()=>{this.resendAfter=0,this.timer.innerHTML="30 : 00"}))):this.modal={open:()=>"",close:()=>"",setTitle:()=>""}}splitNumber(s){this.resetError();let t=s.data||s.target.value;t&&1!==t.length&&this.modifyNext(s.target,t)}modifyNext(s,t){s.value=t[0],t=t.substring(1),s.nextElementSibling&&t.length?this.modifyNext(s.nextElementSibling,t):s.nextElementSibling||0!==t.length?s.nextElementSibling&&0===t.length&&s.nextElementSibling.focus():s.focus()}checkAllInputs(){let s=!0;for(let t=0;t<this.otpInputs.length;t++)""===this.otpInputs[t].value&&(s=!1);return s}handleKeyUp(s){if(this.resetError(),["Alt","Shift","Control","AltGraph","Ctrl"].includes(s.key))return;let t=s.keyCode||s.charCode;s.target.value?(s.target.nextElementSibling?.focus(),s.target.nextElementSibling?.select()):[8,46].includes(t)&&(s.target.previousElementSibling?.focus(),s.target.previousElementSibling?.select()),s.target.value.length>1&&this.splitNumber(s)}handlePaste(s){this.resetError();let t=(salla.helpers.number(s.clipboardData.getData("text"))||"").replace(/[^0-9]/g,"");t=t.substring(0,this.otpInputs.length),this.otpInputs.forEach((s=>s.value="")),this.modifyNext(this.otpInputs[0],t)}handleInput(s){this.resetError(),salla.helpers.inputDigitsOnly(s.target),this.checkAllInputs()&&setTimeout((()=>{this.toggleOTPSubmit()}),100)}resetError(){this.hasError=!1,this.errorMessage=""}handleFocus(s){s.target!==this.firstOtpInput&&(""==this.firstOtpInput?.value&&this.firstOtpInput.focus(),""==s.target.previousElementSibling.value&&s.target.previousElementSibling.focus())}async getCode(){return this.code.value}async open(s){this.data=s,this.data.type=this.data.type||this.type,this.type=this.data.type,this.resendTimer(),this.otpInputs=this.body.querySelectorAll(".s-verify-input"),this.firstOtpInput=this.body.querySelector("#otp-1"),this.reset(),this.resetError(),"modal"==this.display&&this.modal?.setTitle(this.title),this.modal.open(),this.firstOtpInput?.addEventListener("input",(s=>this.splitNumber(s))),setTimeout((()=>this.otpInputs[0].focus()),100)}toggleOTPSubmit(){let s=[];if(this.otpInputs.forEach((t=>t.value&&s.push(t.value))),this.code.value=s.join(""),4===s.length)return this.btn.disable(),void this.btn.click();this.btn.enable()}reset(){this.otpInputs.forEach((s=>s.value="")),this.code.value="",this.otpInputs[0].focus()}resendTimer(){this.resendMessage.style.display="block",this.resend.style.display="none",this.resendAfter=30;let s=setInterval((()=>{this.resendAfter<=0?(clearInterval(s),this.resend.style.display="block",this.resendMessage.style.display="none"):(this.timer.innerHTML=`${this.resendAfter>=10?this.resendAfter:"0"+this.resendAfter} : 00`,this.resendAfter--)}),1e3)}resendCode(){return this.btn.stop().then((()=>this.btn.disable())).then((()=>{this.otpInputs.forEach((s=>s.value="")),this.otpInputs[0].focus()})).then((()=>salla.api.auth.resend(this.data))).finally((()=>this.resendTimer()))}submit(){if(this.code.value.length<4)return this.otpInputs[this.code.value.length].focus(),void salla.log("Trying to submit without 4 digits!");let s={code:this.code.value,...this.data};return this.btn.load().then((()=>this.btn.disable())).then((()=>this.isProfileVerify?salla.profile.verify(s):salla.auth.verify(s,this.supportWebAuth))).then((s=>this.verified.emit(s))).then((()=>this.btn.stop()&&this.btn.disable())).then((()=>this.modal.close())).then((()=>this.autoReload&&window.location.reload())).catch((s=>{this.hasError=!0,this.errorMessage=s.response?.data?.error?.message||salla.lang.get("common.errors.error_occurred"),s.response?salla.logger.error(s):console.log("Unexpected error",s),this.btn.stop()&&this.btn.enable()&&this.reset()}))}render(){return"inline"==this.display?i(e,null,this.myBody()):i("salla-modal",{width:"xs",class:"s-verify",ref:s=>this.modal=s,"modal-title":this.title},i("span",{slot:"icon",class:"s-verify-header-icon",innerHTML:"mobile"==this.type?'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>android-phone</title>\n<path d="M22.667 0h-13.333c-2.941 0-5.333 2.392-5.333 5.333v21.333c0 2.941 2.392 5.333 5.333 5.333h13.333c2.941 0 5.333-2.392 5.333-5.333v-21.333c0-2.941-2.392-5.333-5.333-5.333zM25.333 26.667c0 1.471-1.196 2.667-2.667 2.667h-13.333c-1.471 0-2.667-1.196-2.667-2.667v-2.667h18.667zM25.333 21.333h-18.667v-16c0-1.471 1.196-2.667 2.667-2.667h13.333c1.471 0 2.667 1.196 2.667 2.667zM13.333 28h5.333c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-5.333c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"></path>\n</svg>\n':r}),this.myBody())}myBody(){return i("div",{class:"s-verify-body",ref:s=>this.body=s},i("div",{class:"s-verify-message",innerHTML:salla.lang.get("pages.profile.verify_message")}),i("slot",{name:"mobile"}),i("slot",{name:"email"}),i("input",{type:"hidden",name:"code",maxlength:"4",required:!0,ref:s=>this.code=s}),i("div",{class:{"s-verify-codes":!0,"has-error":this.hasError},dir:"ltr"},[1,2,3,4].map((s=>i("input",{type:"number",autocomplete:"one-time-code",pattern:"[0-9]*",inputmode:"numeric",maxlength:"1",value:"",id:`otp-${s}`,class:{"s-verify-input":!0,"s-has-error":this.hasError},onInput:s=>this.handleInput(s),onPaste:s=>this.handlePaste(s),onKeyUp:s=>this.handleKeyUp(s),onFocus:s=>this.handleFocus(s),required:!0})))),this.hasError&&this.errorMessage?i("span",{class:"s-verify-error-message"},this.errorMessage):"",i("div",{slot:"footer",class:"s-verify-footer"},i("salla-button",{class:"s-verify-submit","loader-position":"center",disabled:!0,onClick:()=>this.submit(),ref:s=>this.btn=s},salla.lang.get("pages.profile.verify")),i("p",{class:"s-verify-resend-message",ref:s=>this.resendMessage=s},salla.lang.get("blocks.header.resend_after"),i("b",{class:"s-verify-timer",ref:s=>this.timer=s})),i("a",{href:"#",class:"s-verify-resend",onClick:()=>this.resendCode(),ref:s=>this.resend=s},salla.lang.get("blocks.comments.submit"))),i("slot",{name:"after-footer"}))}get host(){return h(this)}};l.style="salla-verify{display:block}.s-verify-input{}.s-verify-input::-webkit-outer-spin-button,.s-verify-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.s-verify-input[type=number]{-moz-appearance:textfield}";export{l as salla_verify}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,c as s,h as e,H as i,a}from"./p-
|
|
4
|
+
import{r as t,c as s,h as e,H as i,a}from"./p-DKAYrLM1.js";import{F as l}from"./p-DL4h2bc3.js";import{H as r}from"./p-Dljb4XCt.js";import"./p-CgtvEd63.js";const o=class{constructor(e){t(this,e),this.changed=s(this,"changed"),this.isReady=!1,this.filtersData={},salla.event.on("filters::hidden",(()=>this.host.style.display="none")),salla.lang.onLoaded((()=>{this.apply=salla.lang.get("pages.checkout.apply"),this.reset=salla.lang.get("pages.categories.filters_reset")})),salla.event.on("filters::fetched",(({filters:t})=>{this.host.style.display="";let s={};this.filters=t.map((t=>{if(t.label={category_id:salla.lang.get("common.titles.categories"),brand_id:salla.lang.get("common.titles.brands"),rating:salla.lang.get("pages.categories.filter_rating"),price:salla.lang.get("pages.categories.filter_price")}[t.key]||t.label,"rating"==t.key){t.type=l.VALUES;let{max:s,min:e}=t.values;t.values=[5,4,3,2,1].filter((t=>t>=e||t<=s))}this.filtersData.variants&&t.type==l.VARIANTS&&(s.variants=this.filtersData.variants),this.filtersData[t.key]&&t.type!==l.VARIANTS&&(s[t.key]=this.filtersData[t.key]);let e=new URLSearchParams(window.location.search),i=!1;for(let t of e.keys())if(t.includes("filters")){i=!0;break}if("product.index"==salla.config.get("page.slug")&&0==Object.keys(s).length&&!i){let t=window.location.href,e=salla.config.get("page.id"),i=-1!==t.indexOf("?")?"&":"?",a=t+i+"filters[category_id]="+e;s.category_id=e,window.history.pushState({path:a},"",a)}return t})),this.filtersData=s,this.host.childNodes.forEach((async t=>t.setWidgetHeight&&await t.setWidgetHeight()))}))}async componentWillLoad(){try{const t=new URLSearchParams(window.location.search);this.filtersData=await r.extractFiltersFromUrl(t)}catch(t){console.warn("failed to get filters from URL",t.message)}}async getFilters(){return this.filtersData}async applyFilters(){if(!this.isReady)return;let t=Object.keys(this.filtersData).length>0;setTimeout((()=>{if(t){let t=new URL(window.location.href);for(const[s]of t.searchParams.entries())s.startsWith("filters")&&t.searchParams.delete(s);let s=this.encodeFilters(this.filtersData),e=t.search.split("&").filter((t=>!t.includes("filters"))).join("&");t.search=e?t.search.split("&filters")[0]+"&"+s:`?${s}`,window.history.pushState({},"",t.href)}else{let t=new URL(window.location.href);t.searchParams?.delete("filters"),window.history.pushState({},"",t.toString())}salla.event.emit("salla-filters::changed",this.filtersData),this.changed.emit(this.filtersData)}),300)}encodeFilters(t,s="filters"){const e=[];for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)){const a=t[i],l=s?`${s}[${i}]`:i;if(Array.isArray(a))for(let t=0;t<a.length;t++)e.push(`${l}[${t}]=${a[t]}`);else e.push("object"==typeof a&&null!==a?this.encodeFilters(a,l):`${l}=${a}`)}return e.join("&")}async resetFilters(){return this.removeFiltersQueryParams(),this.filtersData={},this.host.childNodes.forEach((t=>t.reset&&t.reset())),salla.event.emit("salla-filters::reset"),this.applyFilters()}removeFiltersQueryParams(){const t=new URLSearchParams(window.location.search),s=Array.from(t.keys()).filter((t=>!t.startsWith("filters["))).map((s=>`${encodeURIComponent(s)}=${encodeURIComponent(t.get(s))}`)).join("&"),e=s?`${window.location.pathname}?${s}`:window.location.pathname;window.history.pushState({},"",e)}handleOptionChange(t,s,e){s.type===l.RANGE&&(this.filtersData[s.key]=e);let i=t.target.checked;s.type===l.VARIANTS?(this.filtersData.variants=this.filtersData.variants||{},i&&(this.filtersData.variants[s.key]=e),i||delete this.filtersData.variants[s.key]):"radio"==t.target.type?(i&&(this.filtersData[s.key]=e),i||delete this.filtersData[s.key]):"checkbox"==t.target.type&&(this.filtersData[s.key]=this.filtersData[s.key]||[],i&&this.filtersData[s.key].push(e),this.filtersData[s.key]=this.filtersData[s.key].filter((t=>t!=e))),this.applyFilters()}render(){return e(i,{key:"cee91d1495df18bbdbd71625ff85f582fe93f90a"},this.filters?.map((t=>e("salla-filters-widget",{option:t,filtersData:this.filtersData,onChanged:({detail:{event:t,option:s,value:e}})=>{this.handleOptionChange(t,s,e)}}))),this.filters?.length?e("div",{class:"s-filters-footer"},e("salla-button",{color:"gray",fill:"outline",onClick:()=>this.resetFilters()},this.reset)):"")}componentDidLoad(){this.isReady=!0}get host(){return a(this)}};o.style=":host{display:block}.s-rating-stars-small{line-height:12px}.s-filters-radio{background-image:none !important}";export{o as salla_filters}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as s,h as t}from"./p-
|
|
4
|
+
import{r as s,h as t}from"./p-DKAYrLM1.js";import{I as a}from"./p-uTyAzPSy.js";const e=class{constructor(t){s(this,t),this.codeCopied=null,this.noItemFound=!0,this.order_items=[],this.isDigitalCard=s=>"codes"===s.product.type,this.isDigitalProduct=s=>"digital"===s.product.type}async componentWillLoad(){return salla.lang.onLoaded((()=>{this.codes_text=salla.lang.get("pages.thank_you.codes"),this.copy_text=salla.lang.get("common.elements.copy"),this.files_text=salla.lang.get("pages.thank_you.files"),this.download_text=salla.lang.get("pages.thank_you.download")})),await this.getOrderItems()}copyToClipboardHandler(s){if(navigator&&"clipboard"in navigator)try{navigator.clipboard.writeText(s).then((()=>{this.codeCopied=s,this.copyCodeButtonTimeout=setTimeout((()=>{this.codeCopied=null}),3e3)}))}catch(s){salla.loggers.error("copy functionality is not supported by the browser")}}async getOrderItems(){const s=this.orderId||salla.config.get("page.id"),t="Failed to fetch order items";if(!s)throw salla.logger.error(t),new Error(t);try{const{data:{items:t=[]}}=await salla.api.request(`orders/${s}`);t.some((s=>this.isDigitalCard(s)||this.isDigitalProduct(s)))&&(this.order_items=t,this.noItemFound=!1)}catch(s){salla.logger.error(t)}}disconnectedCallback(){this.copyCodeButtonTimeout&&clearTimeout(this.copyCodeButtonTimeout)}render(){return t("ul",{key:"75e332734c187402dcf43b73ae3d464559893203",class:"s-order-summary-wrapper"},this.noItemFound?t("salla-placeholder",{alignment:"center"},t("span",{slot:"title"})):this.order_items.map((s=>this.isDigitalCard(s)?t("li",{key:s.product.id,class:"s-order-summary-item"},t("h2",{class:"s-order-summary-item-title"},this.codes_text," (",s.name,")"),s.codes.map((s=>t("div",{key:s.code,class:"s-order-summary-code-item-wrapper"},t("p",null,t("span",{innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>debit-card-back</title>\n<path d="M30 28h-28c-1.105 0-2-0.895-2-2v0-18c0-1.105 0.895-2 2-2v0h28c1.105 0 2 0.895 2 2v0 18c0 1.105-0.895 2-2 2v0zM30 26v0zM2 8v18h28v-18zM31 14h-30c-0.552 0-1-0.448-1-1s0.448-1 1-1v0h30c0.552 0 1 0.448 1 1s-0.448 1-1 1v0zM11 22h-6c-0.552 0-1-0.448-1-1s0.448-1 1-1v0h6c0.552 0 1 0.448 1 1s-0.448 1-1 1v0zM24 24c-2.209 0-4-1.791-4-4s1.791-4 4-4c2.209 0 4 1.791 4 4v0c0 2.209-1.791 4-4 4v0zM24 18c-1.105 0-2 0.895-2 2s0.895 2 2 2c1.105 0 2-0.895 2-2v0c0-1.105-0.895-2-2-2v0zM20 24c-2.209 0-4-1.791-4-4s1.791-4 4-4v0c0.002 0 0.005 0 0.007 0 1.032 0 1.972 0.398 2.673 1.048l-0.003-0.002c0.191 0.183 0.311 0.439 0.311 0.724 0 0.552-0.448 1-1 1-0.257 0-0.492-0.097-0.669-0.257l0.001 0.001c-0.345-0.319-0.807-0.514-1.315-0.514-0.002 0-0.003 0-0.005 0h0c-1.105 0-2 0.895-2 2s0.895 2 2 2v0c0.002 0 0.004 0 0.007 0 0.508 0 0.971-0.195 1.317-0.515l-0.001 0.001c0.179-0.171 0.422-0.276 0.689-0.276 0.552 0 1 0.448 1 1 0 0.295-0.128 0.56-0.331 0.743l-0.001 0.001c-0.699 0.648-1.638 1.046-2.671 1.046-0.003 0-0.007 0-0.010 0h0.001z"></path>\n</svg>\n'}),t("span",null,s.code)),t("salla-button",{class:"s-order-summary-item-copy-button "+(this.codeCopied===s.code?"copied":""),onClick:()=>this.copyToClipboardHandler(s.code),shape:"link"},t("span",{innerHTML:this.codeCopied===s.code?a:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>swap-stroke</title>\n<path d="M6.667 18.667h-2.667c-0.736 0-1.333-0.597-1.333-1.333v-13.333c0-0.736 0.597-1.333 1.333-1.333h13.333c0.736 0 1.333 0.597 1.333 1.333v2.667c0 0.737 0.596 1.333 1.333 1.333s1.333-0.596 1.333-1.333v-2.667c0-2.205-1.795-4-4-4h-13.333c-2.205 0-4 1.795-4 4v13.333c0 2.205 1.795 4 4 4h2.667c0.737 0 1.333-0.596 1.333-1.333s-0.596-1.333-1.333-1.333zM28 10.667h-13.333c-2.205 0-4 1.795-4 4v13.333c0 2.205 1.795 4 4 4h13.333c2.205 0 4-1.795 4-4v-13.333c0-2.205-1.795-4-4-4zM29.333 28c0 0.736-0.597 1.333-1.333 1.333h-13.333c-0.736 0-1.333-0.597-1.333-1.333v-13.333c0-0.736 0.597-1.333 1.333-1.333h13.333c0.736 0 1.333 0.597 1.333 1.333z"></path>\n</svg>\n'}),t("span",null,this.copy_text)))))):this.isDigitalProduct(s)?t("li",{key:s.product.id,class:"s-order-summary-item"},t("h2",{class:"s-order-summary-item-title"},this.files_text," (",s.name,")"),t("ul",null,s.files.map((s=>t("li",{class:"s-order-summary-digital-item-wrapper"},t("div",null,t("span",{innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>file-archive</title>\n<path d="M17.333 16h-5.333c-0.737 0-1.333 0.597-1.333 1.333v2.667c0 2.205 1.795 4 4 4s4-1.795 4-4v-2.667c0-0.736-0.596-1.333-1.333-1.333zM16 20c0 0.735-0.597 1.333-1.333 1.333s-1.333-0.599-1.333-1.333v-1.333h2.667zM17.333 12h-5.333c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h5.333c0.737 0 1.333-0.597 1.333-1.333s-0.596-1.333-1.333-1.333zM28.943 8.391l-8-8c-0.249-0.251-0.588-0.391-0.943-0.391h-13.333c-2.205 0-4 1.795-4 4v24c0 2.205 1.795 4 4 4h18.667c2.205 0 4-1.795 4-4v-18.667c0-0.353-0.14-0.693-0.391-0.943zM26.667 28c0 0.735-0.597 1.333-1.333 1.333h-18.667c-0.736 0-1.333-0.599-1.333-1.333v-24c0-0.735 0.597-1.333 1.333-1.333h12.781l7.219 7.219zM17.333 8h-5.333c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h5.333c0.737 0 1.333-0.597 1.333-1.333s-0.596-1.333-1.333-1.333zM17.333 4h-5.333c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h5.333c0.737 0 1.333-0.597 1.333-1.333s-0.596-1.333-1.333-1.333z"></path>\n</svg>\n'}),t("span",null,s.name)),t("a",{href:s.url,target:"_blank",class:"s-order-summary-item-download"},t("span",{innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>download</title>\n<path d="M15.056 20.941c0.123 0.124 0.271 0.221 0.435 0.289 0.163 0.067 0.336 0.103 0.509 0.103s0.347-0.036 0.509-0.103c0.164-0.068 0.311-0.165 0.435-0.289l5.332-5.332c0.521-0.521 0.521-1.364 0-1.885s-1.364-0.521-1.885 0l-3.057 3.057v-12.781c0-0.737-0.597-1.333-1.333-1.333s-1.333 0.596-1.333 1.333v12.781l-3.057-3.057c-0.521-0.521-1.364-0.521-1.885 0s-0.521 1.364 0 1.885zM25.333 26.667h-18.667c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333h18.667c0.736 0 1.333-0.596 1.333-1.333s-0.597-1.333-1.333-1.333z"></path>\n</svg>\n'}),t("span",null,this.download_text))))))):null)))}};e.style=":host{display:block}";export{e as salla_order_summary}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as c,h as l,H as t,a as s}from"./p-
|
|
4
|
+
import{r as c,h as l,H as t,a as s}from"./p-DKAYrLM1.js";import{f as i,t as e}from"./p-Dz7o69vX.js";const o=class{constructor(l){c(this,l),this.links=salla.config.get("store.social"),this.iconsList={instagram:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>instagram</title>\n<path d="M23 32h-14c-4.971 0-9-4.029-9-9v0-14c0-4.971 4.029-9 9-9v0h14c4.971 0 9 4.029 9 9v0 14c0 4.971-4.029 9-9 9v0zM9 2c-3.866 0-7 3.134-7 7v0 14c0 3.866 3.134 7 7 7v0h14c3.866 0 7-3.134 7-7v0-14c0-3.866-3.134-7-7-7v0zM16 24c-4.418 0-8-3.582-8-8s3.582-8 8-8c4.418 0 8 3.582 8 8v0c0 4.418-3.582 8-8 8v0zM16 10c-3.314 0-6 2.686-6 6s2.686 6 6 6c3.314 0 6-2.686 6-6v0c0-3.314-2.686-6-6-6v0zM25 9c-1.105 0-2-0.895-2-2s0.895-2 2-2c1.105 0 2 0.895 2 2v0c0 1.105-0.895 2-2 2v0zM25 7v0z"></path>\n</svg>\n',twitter:e,facebook:i,youtube:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>youtube</title>\n<path d="M16 28c-3.666 0-8.376-0.056-10.29-0.162-0.113 0.010-0.244 0.016-0.376 0.016-1.676 0-3.139-0.91-3.922-2.264l-0.012-0.022c-0.97-1.6-1.4-4.248-1.4-8.558s0.436-6.962 1.412-8.6c0.782-1.36 2.227-2.262 3.883-2.262 0.148 0 0.293 0.007 0.437 0.021l-0.018-0.001c1.872-0.124 6.544-0.168 10.286-0.168s8.4 0.044 10.292 0.168c0.124-0.012 0.267-0.019 0.412-0.019 1.656 0 3.101 0.905 3.866 2.247l0.012 0.022c0.982 1.624 1.418 4.27 1.418 8.582 0 4.338-0.438 6.982-1.422 8.6-0.789 1.364-2.241 2.268-3.904 2.268-0.133 0-0.265-0.006-0.395-0.017l0.017 0.001c-1.926 0.092-6.632 0.148-10.296 0.148zM16 8c-3.712 0-8.334 0.042-10.168 0.164-1.688 0.094-2.14 0.306-2.702 1.268-0.756 1.81-1.195 3.913-1.195 6.119 0 0.51 0.024 1.015 0.069 1.513l-0.005-0.064c-0.042 0.435-0.065 0.941-0.065 1.453 0 2.198 0.438 4.294 1.231 6.205l-0.039-0.107c0.566 0.968 1.022 1.184 2.708 1.296 3.29 0.184 17.022 0.184 20.34 0 1.678-0.11 2.132-0.326 2.684-1.28 0.764-1.803 1.208-3.899 1.208-6.1 0-0.513-0.024-1.020-0.071-1.52l0.005 0.064c0.042-0.436 0.065-0.943 0.065-1.455 0-2.203-0.439-4.303-1.235-6.218l0.040 0.107v-0.016c-0.554-0.958-1-1.17-2.684-1.264-1.862-0.122-6.644-0.164-10.186-0.164zM13 23c-0.552 0-1-0.448-1-1v0-10c0 0 0 0 0 0 0-0.552 0.448-1 1-1 0.196 0 0.38 0.057 0.534 0.154l-0.004-0.002 8 5c0.284 0.18 0.47 0.492 0.47 0.848s-0.186 0.668-0.466 0.846l-0.004 0.002-8 5c-0.15 0.095-0.334 0.152-0.53 0.152 0 0 0 0 0 0v0zM14 13.8v6.4l5.114-3.2z"></path>\n</svg>\n',snapchat:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>snapchat</title>\n<path d="M16.186 30h-0.266c-1.843-0.023-3.525-0.693-4.834-1.792l0.012 0.010c-0.476-0.405-1.043-0.72-1.665-0.909l-0.033-0.009c-0.287-0.044-0.617-0.069-0.954-0.069-0.492 0-0.972 0.053-1.434 0.155l0.044-0.008c-0.261 0.061-0.564 0.102-0.875 0.114l-0.009 0c-0.017 0.001-0.036 0.001-0.056 0.001-0.811 0-1.495-0.545-1.705-1.288l-0.003-0.012c-0.076-0.26-0.132-0.506-0.186-0.746-0.961-0.157-1.822-0.412-2.633-0.76l0.073 0.028c-0.667-0.259-1.199-0.745-1.509-1.362l-0.007-0.016c-0.082-0.189-0.135-0.409-0.146-0.64l-0-0.004c-0.002-0.031-0.003-0.067-0.003-0.103 0-0.841 0.614-1.538 1.417-1.668l0.010-0.001c0.822-0.141 1.555-0.438 2.198-0.859l-0.022 0.013c0.611-0.405 1.138-0.872 1.591-1.404l0.009-0.010c0.526-0.595 0.98-1.273 1.337-2.007l0.023-0.053c0.060-0.102 0.107-0.22 0.135-0.346l0.001-0.008c-0.092-0.020-0.73-0.222-0.972-0.298s-0.374-0.12-0.506-0.17c-0.546-0.205-1.016-0.487-1.424-0.839l0.006 0.005c-0.471-0.388-0.768-0.971-0.768-1.624 0-0.126 0.011-0.249 0.032-0.369l-0.002 0.013c0.143-0.644 0.551-1.172 1.1-1.474l0.011-0.006c0.389-0.241 0.861-0.384 1.366-0.384 0.347 0 0.678 0.067 0.982 0.19l-0.018-0.006c0.128 0.060 0.242 0.106 0.344 0.142-0.082-0.573-0.129-1.235-0.129-1.908 0-1.482 0.227-2.91 0.648-4.253l-0.027 0.101c0.512-1.142 1.207-2.114 2.056-2.925l0.004-0.003c0.7-0.664 1.516-1.214 2.413-1.616l0.055-0.022c1.128-0.5 2.444-0.794 3.828-0.8h0.592c1.386 0.007 2.701 0.301 3.893 0.825l-0.063-0.025c0.956 0.42 1.777 0.967 2.485 1.632l-0.005-0.004c0.855 0.815 1.55 1.789 2.039 2.876l0.023 0.058c0.396 1.237 0.625 2.659 0.625 4.135 0 0.658-0.045 1.304-0.133 1.938l0.008-0.073 0.172-0.076c0.303-0.16 0.661-0.253 1.042-0.253 0.374 0 0.728 0.091 1.039 0.251l-0.013-0.006c0.886 0.274 1.528 1.063 1.582 2.008l0 0.006c-0.001 0.602-0.25 1.146-0.65 1.536l-0 0c-0.429 0.408-0.945 0.73-1.516 0.935l-0.030 0.009c-0.144 0.056-0.316 0.112-0.504 0.17-0.367 0.103-0.686 0.235-0.984 0.398l0.024-0.012c0.018 0.030 0.042 0.094 0.086 0.18 0.963 2.174 2.834 3.796 5.118 4.4l0.054 0.012c0.814 0.133 1.427 0.83 1.427 1.671 0 0.036-0.001 0.072-0.003 0.108l0-0.005c-0.012 0.241-0.070 0.465-0.165 0.669l0.005-0.011c-0.319 0.624-0.847 1.103-1.489 1.352l-0.019 0.006c-0.739 0.323-1.6 0.578-2.497 0.724l-0.063 0.008c-0.056 0.264-0.112 0.496-0.186 0.742-0.215 0.747-0.893 1.284-1.696 1.284-0.011 0-0.021-0-0.032-0l0.002 0c-0.328-0.004-0.644-0.042-0.949-0.11l0.031 0.006c-0.404-0.090-0.869-0.142-1.345-0.142-0.353 0-0.7 0.029-1.038 0.083l0.037-0.005c-0.653 0.195-1.218 0.508-1.699 0.917l0.007-0.005c-1.275 1.065-2.916 1.731-4.71 1.788l-0.012 0zM8.444 25.218c0.457 0.001 0.904 0.041 1.339 0.117l-0.047-0.007c0.966 0.232 1.808 0.664 2.516 1.252l-0.010-0.008c0.96 0.829 2.199 1.357 3.56 1.427l0.014 0.001h0.37c1.373-0.070 2.61-0.597 3.576-1.43l-0.008 0.006c0.701-0.583 1.546-1.016 2.474-1.239l0.042-0.009c0.394-0.063 0.849-0.1 1.312-0.1 0.615 0 1.216 0.064 1.795 0.186l-0.057-0.010c0.105 0.023 0.238 0.045 0.372 0.059l0.016 0.001c0.042-0.162 0.076-0.314 0.11-0.47 0.059-0.339 0.156-0.641 0.287-0.924l-0.009 0.023 0.234-0.44 0.492-0.078c0.99-0.119 1.892-0.359 2.738-0.705l-0.070 0.025c0.086-0.040 0.158-0.076 0.216-0.11-2.748-0.86-4.933-2.816-6.081-5.342l-0.025-0.062c-0.184-0.31-0.294-0.684-0.294-1.083 0-0.27 0.050-0.528 0.14-0.765l-0.005 0.015c0.492-0.783 1.284-1.339 2.212-1.507l0.020-0.003c0.14-0.044 0.27-0.084 0.376-0.126 0.327-0.108 0.609-0.272 0.849-0.482l-0.003 0.002c0.074-0.106 0-0.2-0.216-0.284-0.094-0.041-0.203-0.065-0.318-0.066h-0c-0.529 0.242-1.142 0.411-1.786 0.474l-0.024 0.002c-0.313-0-0.612-0.064-0.883-0.18l0.015 0.006-0.628-0.28 0.072-1.272c0.093-0.623 0.146-1.342 0.146-2.074 0-1.269-0.16-2.501-0.46-3.677l0.022 0.103c-0.396-0.896-0.936-1.659-1.598-2.296l-0.002-0.002c-0.541-0.508-1.172-0.928-1.865-1.233l-0.043-0.017c-0.895-0.396-1.939-0.629-3.036-0.634h-0.002l-0.218-1v1h-0.348c-1.105 0.003-2.155 0.237-3.106 0.656l0.050-0.020c-0.733 0.322-1.361 0.742-1.903 1.253l0.003-0.003c-0.663 0.638-1.203 1.398-1.582 2.247l-0.018 0.045c-0.279 1.065-0.44 2.287-0.44 3.547 0 0.704 0.050 1.395 0.147 2.072l-0.009-0.078 0.080 1.372-0.618 0.284c-0.31 0.108-0.666 0.17-1.038 0.17-0.6 0-1.163-0.163-1.645-0.446l0.015 0.008c-0.019-0.001-0.041-0.002-0.064-0.002-0.154 0-0.299 0.039-0.425 0.109l0.005-0.002c-0.063 0.032-0.115 0.078-0.153 0.135l-0.001 0.001c0.258 0.244 0.567 0.435 0.91 0.556l0.018 0.006c0.094 0.036 0.2 0.070 0.32 0.108 0.971 0.167 1.784 0.732 2.282 1.516l0.008 0.014c0.087 0.225 0.137 0.486 0.137 0.758 0 0.403-0.11 0.781-0.303 1.104l0.005-0.010c-0.459 0.983-1.016 1.829-1.677 2.582l0.011-0.012c-0.588 0.687-1.26 1.279-2.004 1.768l-0.036 0.022c-0.689 0.451-1.49 0.805-2.346 1.017l-0.054 0.011c0.060 0.034 0.132 0.072 0.218 0.112 0.776 0.322 1.678 0.561 2.618 0.675l0.050 0.005 0.498 0.078 0.234 0.446c0.116 0.255 0.209 0.553 0.265 0.863l0.003 0.023c0.038 0.164 0.072 0.328 0.118 0.496 0.12-0.014 0.242-0.042 0.378-0.068 0.528-0.12 1.138-0.192 1.762-0.2l0.006-0zM30.244 22.892v0z"></path>\n</svg>\n',tiktok:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>tiktok</title>\n<path d="M29.046 7.029c-3.359 0-6.092-2.733-6.092-6.092 0-0.518-0.42-0.938-0.938-0.938h-5.021c-0.518 0-0.938 0.42-0.938 0.938v20.585c0 1.975-1.606 3.581-3.581 3.581s-3.581-1.606-3.581-3.581c0-1.975 1.606-3.581 3.581-3.581 0.518 0 0.938-0.42 0.938-0.938v-5.021c0-0.518-0.42-0.938-0.938-0.938-5.777 0-10.477 4.7-10.477 10.477s4.7 10.477 10.477 10.477c5.777 0 10.477-4.7 10.477-10.477v-9.112c1.866 0.995 3.942 1.514 6.092 1.514 0.518 0 0.938-0.42 0.938-0.938v-5.021c0-0.518-0.42-0.938-0.938-0.938zM28.108 12.011c-2.001-0.166-3.902-0.866-5.544-2.047-0.285-0.206-0.662-0.234-0.975-0.073s-0.51 0.482-0.51 0.834v10.798c0 4.743-3.859 8.602-8.602 8.602s-8.602-3.859-8.602-8.602c0-4.427 3.361-8.083 7.665-8.552v3.176c-2.563 0.446-4.519 2.687-4.519 5.376 0 3.009 2.447 5.456 5.456 5.456s5.456-2.448 5.456-5.456v-19.648h3.201c0.429 3.645 3.329 6.545 6.974 6.974z"></path>\n</svg>\n'},this.socialSlot=this.host.querySelector('[slot="social-item"]')?.innerHTML||'<a href={link} rel="noopener" target="_blank" title={type} aria-label={type}><span class="s-social-icon">{icon}</span></a>',salla.lang.onLoaded((()=>{this.links=salla.config.get("store.social")}))}getLinksArray(){return this.links?Object.entries(this.links).filter((([c,l])=>!!l&&"whatsapp"!==c)).map((([c,l])=>({type:c,value:l}))):[]}componentWillLoad(){return new Promise((c=>salla.onReady(c)))}render(){const c=this.getLinksArray();return l(t,{key:"8fb321cff071698640111ac5fccfb1fc8e130298"},l("ul",{key:"f00ef1d6ff429614000aba2af50514ea6f27a2f1",class:"s-social-list"},c.map((c=>l("li",{class:"s-social-link"},l("div",{id:"social-slot",innerHTML:this.socialSlot.replace(/\{icon\}/g,this.iconsList[c.type]).replace(/\{type\}/g,c.type).replace(/\{link\}/g,c.value.toString())}))))))}componentDidRender(){this.host.querySelectorAll("#social-slot").forEach((c=>c.replaceWith(c.firstChild))),this.host.querySelector('[slot="social-item"]')?.remove()}get host(){return s(this)}};o.style=":host{display:block}";export{o as salla_social}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as a,h as l,H as t}from"./p-
|
|
4
|
+
import{r as a,h as l,H as t}from"./p-DKAYrLM1.js";import{G as s}from"./p-C0JNGIpa.js";const o=a=>a?new Date(Number(a)).toLocaleDateString(salla.lang.locale,{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric"}):"",r=a=>{if(!a)return"";try{const l=a.toLowerCase(),t=salla.lang.get(`pages.loyalty_program.${l}`);return t===`pages.loyalty_program.${l}`?a:t}catch{return a}},e=class{constructor(l){a(this,l),this.loyaltyPointsArray=[],this.isLoadingLoyalty=!1,this.nextPageUrlLoyalty="",this.handleClick=()=>{this.loadMoreLoyaltyPoints()}}componentWillLoad(){return salla.onReady().then((()=>{this.loadLoyaltyPoints()}))}async loadLoyaltyPoints(){this.isLoadingLoyalty=!0;try{let a="/balance/points?page=1",l=await salla.api.request(a);this.loyaltyPointsArray=l.data,this.nextPageUrlLoyalty=l.cursor.next}catch(a){console.error("Error loading loyalty points transactions",a)}finally{this.isLoadingLoyalty=!1}}async loadMoreLoyaltyPoints(){if(this.nextPageUrlLoyalty){this.isLoadingLoyalty=!0;try{let a=await salla.api.request(this.nextPageUrlLoyalty);this.loyaltyPointsArray=[...this.loyaltyPointsArray,...a.data],this.nextPageUrlLoyalty=a.cursor?.next||""}catch(a){console.error("Error loading more loyalty points",a)}finally{this.isLoadingLoyalty=!1}}}render(){return l(t,{key:"24ab88177569df0ae3c8e9003f8817935413f6f9"},l("div",{key:"1617bdd654819bc8c24a3afd1d4af5cc3a148352"},this.isLoadingLoyalty?l("salla-loading",null):l("div",null,this.loyaltyPointsArray.length>0?l("div",null,l("table",{class:"s-loyalty-program-table"},l("thead",{class:"s-loyalty-program-table-head"},l("tr",{class:"s-loyalty-program-table-head-tr"},l("th",{scope:"col",class:"s-loyalty-program-table-head-tr-th"},salla.lang.get("pages.wallet.points")),l("th",{scope:"col",class:"s-loyalty-program-table-head-tr-th"},salla.lang.get("pages.wallet.date")),l("th",{scope:"col",class:"s-loyalty-program-table-head-tr-th"},salla.lang.get("pages.wallet.expiry_date")),l("th",{scope:"col",class:"s-loyalty-program-table-head-tr-th"},salla.lang.get("common.elements.note")),l("th",{scope:"col",class:"s-loyalty-program-table-head-tr-th"},salla.lang.get("common.elements.status")))),l("tbody",{class:"s-loyalty-program-table-tbody"},this.loyaltyPointsArray.map((a=>l("tr",{class:"s-loyalty-program-table-tbody-tr"},l("td",{class:"s-loyalty-program-table-tbody-tr-td"},"plus"===a?.type?"+":"",a?.points||""," ",salla.lang.get("pages.loyalty_program.point")),l("td",{class:"s-loyalty-program-table-tbody-tr-td"},o(a?.created_at?1e3*Number(a.created_at):void 0)),l("td",{class:"s-loyalty-program-table-tbody-tr-td"},o(a?.points_expire_date)),l("td",{class:"s-loyalty-program-table-tbody-tr-td"},r(a?.key)),l("td",{class:"s-loyalty-program-table-tbody-tr-td"},r(a?.status_key))))))),l("div",{class:"s-infinite-scroll-wrapper"},!!this.nextPageUrlLoyalty&&l("salla-button",{onClick:this.handleClick,loading:this.isLoadingLoyalty},salla.lang.get("common.elements.load_more")))):l("div",null,l("div",{class:"s-loyalty-program-table-empty-state"},l("span",{innerHTML:s}),l("div",{class:"s-loyalty-program-table-placeholder-title"},salla.lang.get("pages.loyalty_program.no_loyality_points_title")),l("div",{class:"s-loyalty-program-table-placeholder-sub-title"},salla.lang.get("pages.loyalty_program.no_loyality_points_sub_title")))))))}};e.style="";export{e as salla_loyalty_program}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,h as e,a as o}from"./p-
|
|
4
|
+
import{r as t,h as e,a as o}from"./p-DKAYrLM1.js";const i=class{constructor(e){t(this,e),this.show=!1,this.targetElement=null}handleMouseOver(t){this.targetElement&&this.targetElement.contains(t.target)&&(this.show=!0)}handleMouseOut(t){this.targetElement&&this.targetElement.contains(t.target)&&(this.show=!1)}componentDidLoad(){this.targetElement=document.getElementById(this.targetId)}render(){return e("div",{key:"46f7eb1a696cc4716525911f374a04bab58c9593",class:"s-tooltip-container"},e("slot",{key:"9e24df4e71a0dac31d5d6b5f9991c14f7e2c6f3c"}),this.show&&e("div",{key:"bc359c1b14e02f1206fe26a62d0cd4ad1b5eb3ed",class:"s-tooltip-item"},this.text))}get el(){return o(this)}};i.style='.s-tooltip-container{position:relative;display:inline-block}.s-tooltip-item{position:absolute;transform:translateX(-39%);background-color:#baf3e6;color:#004d5a;bottom:100%;left:50%;text-align:center;border-radius:5px;z-index:1;white-space:nowrap;opacity:0;transition:opacity 0.3s;pointer-events:none;margin:0 0 16px 8px;padding:12px;max-width:150px;width:190px;white-space:normal;opacity:1}.s-tooltip-item::after{content:"";position:absolute;bottom:-10px;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#baf3e6 transparent transparent transparent}.s-tooltip-item:dir(ltr){transform:translateX(-72%)}';export{i as salla_tooltip}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as a,h as t,H as s,a as l}from"./p-
|
|
4
|
+
import{r as a,h as t,H as s,a as l}from"./p-DKAYrLM1.js";const i=class{constructor(t){a(this,t),this.alertDelay=null,this.data=salla.config.get("store.app_install_prompt"),this.open=!1,this.closing=!1}connectedCallback(){salla.onReady((()=>{if(this.data=salla.config.get("store.app_install_prompt"),this.isMobileOrTabletDevice()){if(!this.data)return salla.logger.error("Failed to retrieve salla-app-install-alert config");this.ctaLink=salla.url.get("app"),this.alertDelay=setTimeout((()=>this.open=!0),3e3)}}))}disconnectedCallback(){clearTimeout(this.alertDelay)}isMobileOrTabletDevice(a=1024){const t=window.innerWidth<=a,s=/Macintosh|Android|iPhone|iPad|iPod/i.test(navigator.userAgent),l="ontouchstart"in window||"ontouchend"in document||navigator.maxTouchPoints>0;return s&&t&&l}closeAlert(){salla.storage.set("app_install_prompt_disabled",!0),this.closing=!0,this.host.addEventListener("animationend",(()=>{this.closing=!1,this.open=!1}),{once:!0})}render(){return this.data?t(s,{class:`s-app-install-alert-wrapper ${this.open?"open":""} ${this.closing?"closing":""}`,position:this.data.position},t("div",null,t("img",{src:this.data.icon,width:"58",height:"58",alt:`${salla.config.get("store.name")}`})),t("div",{class:"s-app-install-alert-content"},t("h2",{class:"s-app-install-alert-title"},this.data.title),t("p",{class:"s-app-install-alert-sub-title"},this.data.sub_title," "," ",t("a",{href:this.ctaLink,target:"_blank","aria-label":"download app",class:"s-app-install-alert-cta"},salla.lang.getWithDefault("blocks.footer.download_app_now","حمله الآن")))),t("button",{class:"s-app-install-alert-cancel-button","aria-label":"close alert",onClick:()=>this.closeAlert()},t("i",{class:"sicon-cancel"}))):null}get host(){return l(this)}};i.style=":host{display:block}";export{i as salla_app_install_alert}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as s,h as i,a as t}from"./p-
|
|
4
|
+
import{r as s,h as i,a as t}from"./p-DKAYrLM1.js";import{I as e}from"./p-uTyAzPSy.js";const r=class{constructor(i){s(this,i),this.currentSlide=0,this.showPurchaseCount=!1,this.startPoint={x:0,y:0},this.isSwiping=!1,this.isRTL="rtl",this.handlePointerDown=s=>{s.isPrimary&&(this.sliderElement?.setPointerCapture(s.pointerId),this.startSwipe(s.clientX,s.clientY),s.preventDefault())},this.handlePointerMove=s=>{this.isSwiping&&s.isPrimary&&s.preventDefault()},this.handlePointerUp=s=>{this.isSwiping&&s.isPrimary&&(this.sliderElement?.releasePointerCapture(s.pointerId),this.endSwipe(s.clientX,s.clientY))},this.handlePointerCancel=s=>{this.isSwiping&&s.isPrimary&&(this.sliderElement?.releasePointerCapture(s.pointerId),this.isSwiping=!1)},this.goToSlide=s=>{this.currentSlide=Math.max(0,Math.min(s,this.images.length-1))}}async componentDidLoad(){await salla.onReady(),this.showPurchaseCount=!!salla.config.get("store.settings.product.total_sold_enabled",!1),this.isRTL=salla.config.get("theme.is_rtl",!0),this.purchasedCount=salla.lang.getWithDefault("blocks.home.reviews.purchased_count",this.isRTL?` تم شراءه ${this.review.product?.sold_quantity} مرة`:`Purchased ${this.review.product.sold_quantity} times`,{count:this.review.product?.sold_quantity}),this.initializeSlider()}disconnectedCallback(){this.removeEventListeners()}get images(){const{review:s}=this;return s?.images?.length>1?s.images.map(((s,i)=>({url:s,alt:"",id:i}))):s?.product?.images||[]}get hasMultipleImages(){return this.images.length>1}get slideTransform(){return`translateX(${100*this.currentSlide*(this.isRTL?1:-1)}%)`}initializeSlider(){this.hasMultipleImages&&(this.sliderElement=this.el.querySelector(".s-review-card-slider-container"),this.sliderElement&&(this.sliderElement.style.touchAction="pan-y pinch-zoom",this.addEventListeners()))}addEventListeners(){this.sliderElement&&(this.sliderElement.addEventListener("pointerdown",this.handlePointerDown,{passive:!1}),this.sliderElement.addEventListener("pointermove",this.handlePointerMove,{passive:!1}),this.sliderElement.addEventListener("pointerup",this.handlePointerUp,{passive:!0}),this.sliderElement.addEventListener("pointercancel",this.handlePointerCancel,{passive:!0}))}removeEventListeners(){this.sliderElement&&(this.sliderElement.removeEventListener("pointerdown",this.handlePointerDown),this.sliderElement.removeEventListener("pointermove",this.handlePointerMove),this.sliderElement.removeEventListener("pointerup",this.handlePointerUp),this.sliderElement.removeEventListener("pointercancel",this.handlePointerCancel))}startSwipe(s,i){this.startPoint={x:s,y:i},this.isSwiping=!0}componentDidRender(){this.removeEventListeners(),this.addEventListeners()}endSwipe(s,i){this.isSwiping=!1,this.processSwipe(s-this.startPoint.x,i-this.startPoint.y)}processSwipe(s,i){if(Math.abs(s)<10||Math.abs(i)>Math.abs(s))return;const t=s<0;(this.isRTL?!t:t)?this.goToNextSlide():this.goToPrevSlide()}goToNextSlide(){this.currentSlide<this.images.length-1&&this.currentSlide++}goToPrevSlide(){this.currentSlide>0&&this.currentSlide--}renderStars(){return Array(5).fill(null).map(((s,t)=>i("span",{key:t,innerHTML:this.review.stars>=t+1?' <svg width="18" height="17" view-box="0 0 18 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M9.00045 13.6951L3.71036 16.6563L4.89186 10.71L0.440918 6.59397L6.4612 5.88017L9.00045 0.375122L11.5396 5.88017L17.5599 6.59397L13.109 10.71L14.2905 16.6563L9.00045 13.6951Z" fill="currentcolor" />\n</svg>':' <svg width="18" height="17" view-box="0 0 18 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M9.00045 13.6951L3.71036 16.6563L4.89186 10.71L0.440918 6.59397L6.4612 5.88017L9.00045 0.375122L11.5396 5.88017L17.5599 6.59397L13.109 10.71L14.2905 16.6563L9.00045 13.6951Z" fill="#DDDDDD" />\n</svg>'})))}renderDots(){return this.images.map((({url:s},t)=>i("button",{key:s||t,type:"button",class:"s-review-card-slider-dot "+(this.currentSlide===t?"active":""),onClick:()=>this.goToSlide(t),"aria-label":`Go to slide ${t+1}`,onPointerDown:()=>this.goToSlide(t)})))}renderSlider(){return this.hasMultipleImages?i("div",{class:"s-review-card-slider-container"},i("div",{class:"s-review-card-slides",style:{transform:this.slideTransform}},this.images.map((s=>i("div",{key:s?.id,class:"s-review-card-slider-slide"},i("img",{src:s.url,alt:s.alt||"Product image",width:275,height:275,loading:"lazy",draggable:!1}))))),i("div",{class:"s-review-card-slider-dots"},this.renderDots())):null}renderSingleImage(){const s=this.review?.product?.image;return!s||this.hasMultipleImages?null:i("img",{src:s.url,alt:s.alt||"Product image",class:"s-review-card-image",width:275,height:275,loading:"lazy",decoding:"async",draggable:!1})}renderHeader(){return i("div",{class:"s-review-card-header"},i("div",{class:"s-review-card-reviewer-name"},i("p",null,this.review?.name),this.review?.has_order&&i("span",{class:"s-review-card-verified-icon",innerHTML:e})),i("div",{class:"s-review-card-stars"},this.renderStars()))}renderProductInfo(){const s=this.review?.product;return s?i("a",{href:this.review?.product?.url,class:"s-review-card-product-container"},i("img",{alt:s.image?.alt||"Product",src:s.image?.url,class:"s-review-card-product-image",width:60,height:60,loading:"lazy",decoding:"async",draggable:!1}),i("div",{class:"s-review-card-product-details"},i("p",{class:"s-review-card-product-details-name"},s.name),this.showPurchaseCount?i("p",{class:"s-review-card-product-details-purchase-count"},i("span",{innerHTML:' <svg width="12" height="17" view-box="0 0 12 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M6 16.2501C9.10658 16.2501 11.625 13.7317 11.625 10.6251C11.625 9.976 11.4523 9.35252 11.25 8.77232C9.99998 10.0075 9.05002 10.6251 8.4 10.6251C11.3966 5.37512 9.75 3.12512 5.25 0.125122C5.625 3.87475 3.15302 5.58043 2.14634 6.52757C1.0559 7.5535 0.375 9.00977 0.375 10.6251C0.375 13.7317 2.89339 16.2501 6 16.2501ZM6.53205 2.92636C8.96333 4.98908 8.97495 6.59185 7.09725 9.88157C6.5265 10.8815 7.2486 12.1251 8.4 12.1251C8.9163 12.1251 9.43807 11.9745 9.98917 11.6789C9.52342 13.4466 7.91393 14.7501 6 14.7501C3.72182 14.7501 1.875 12.9033 1.875 10.6251C1.875 9.47072 2.34959 8.39582 3.17419 7.62002C3.2687 7.53115 3.74812 7.1062 3.76858 7.08782C4.08646 6.8017 4.34835 6.54985 4.60718 6.2727C5.52998 5.28461 6.19283 4.18735 6.53205 2.92636Z" fill="currentcolor" />\n </svg>'}),this.purchasedCount):null)):null}render(){return i("div",{key:"8c2e3500d7844c43e455e707c460a842995eda13",class:"s-review-card-container"},this.renderSlider(),this.renderSingleImage(),a(),i("div",{key:"1b5cb3b515118ab578d2f64202e33ff2a67b3e89",class:"s-review-card-content"},this.renderHeader(),i("p",{key:"784abce956a5ee45aa0d90b5bd5427c2658bcf2c",class:"s-review-card-review-content",innerHTML:this.review?.content}),a(),this.renderProductInfo()))}get el(){return t(this)}},a=()=>i("div",{class:"s-review-card-divider "});r.style=":host{display:block}";export{r as salla_review_card}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as e,c as t,h as i,H as s}from"./p-
|
|
4
|
+
import{r as e,c as t,h as i,H as s}from"./p-DKAYrLM1.js";const a=class{constructor(i){e(this,i),this.prizeItemSelected=t(this,"prizeItemSelected")}onPrizeItemClick(){this.prizeItemSelected.emit(this.item)}render(){return i(s,{key:"1a3463c51bf3e3e250f62b65d3a81815ec465923"},i("div",{key:"03bf4d3e35b10d17a325ca4ef280cb384f3a76f4",onClick:this.onPrizeItemClick.bind(this)},i("img",{key:"a4d319b2daec5cdfec1c85910edea10bc1d1ab6c",class:"s-loyalty-prize-item-image",src:this.item.image,alt:this.item.name}),i("div",{key:"52059fafc318c1f5a6b0289669083476650f8761",class:"s-loyalty-prize-item-title"},this.item.name),i("div",{key:"a3e14e2d1bd86dc3e7dbd2e6c5115e119af965e5",class:"s-loyalty-prize-item-subtitle"},this.item.description),i("div",{key:"55df95c028748c0387dc75dc4ad35c7285c907af",class:"s-loyalty-prize-item-points"},this.item.cost_points," Points")))}};a.style="salla-loyalty-prize-item:hover{box-shadow:0 5px 15px 1px rgba(0, 0, 0, 0.04) !important}";export{a as salla_loyalty_prize_item}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,h as s,a as i}from"./p-
|
|
4
|
+
import{r as t,h as s,a as i}from"./p-DKAYrLM1.js";import{H as n}from"./p-Dljb4XCt.js";import"./p-CgtvEd63.js";const a=class{constructor(s){t(this,s),this.itemPerPage=10,this.no_notifications_trans=salla.lang.get("blocks.header.no_notifications"),this.load_more_text_trans=salla.lang.get("common.elements.load_more"),salla.lang.onLoaded((()=>{this.no_notifications_trans=salla.lang.get("blocks.header.no_notifications"),this.load_more_text_trans=salla.lang.get("common.elements.load_more")}))}loading(t=!0){let s=this.status?.querySelector(".s-button-text");s&&(n.toggleElementClassIf(s,"s-button-hide","s-button-show",(()=>t)),this.btnLoader.style.display=t?"inherit":"none")}getNotificationCard(t){const s=document.createElement("salla-notification-item");return s.notification=t,s.classList.add("s-block"),s}render(){return this.showPlaceholder?s("div",{class:"s-notifications-no-content"},s("salla-placeholder",{alignment:"center"},s("span",{slot:"title"},this.no_notifications_trans))):s("div",{class:"s-notifications-wrapper"},s("div",{class:"s-notifications-container",ref:t=>this.wrapper=t}),this.nextPage&&s("div",{class:"s-infinite-scroll-wrapper",ref:t=>this.status=t},s("button",{onClick:()=>this.loadMore(),class:"s-infinite-scroll-btn s-button-btn s-button-primary"},s("span",{class:"s-button-text s-infinite-scroll-btn-text"},this.loadMoreText??this.load_more_text_trans),s("span",{class:"s-button-loader s-button-loader-center s-infinite-scroll-btn-loader",ref:t=>this.btnLoader=t,style:{display:"none"}}))))}handleResponse(t){return t.map((t=>this.getNotificationCard(t)))}initiateInfiniteScroll(){this.wrapper?(this.infiniteScroll=salla.infiniteScroll.initiate(this.wrapper,this.wrapper,{path:()=>this.nextPage,history:!0,nextPage:this.nextPage,scrollThreshold:!1},!0),this.infiniteScroll?.on("request",(()=>{this.loading()})),this.infiniteScroll?.on("load",(t=>{this.loading(!1),this.pagination=t.pagination,this.nextPage=t.pagination.links?.next||null,this.handleResponse(t.data).forEach((t=>this.wrapper.append(t)));let s=this.host.querySelectorAll("salla-notification-item:not(.animated)");n.animateItems(s)})),this.infiniteScroll?.on("error",(t=>{salla.logger.error("Error loading more comments:",t)}))):salla.logger.error("Wrapper is undefined. Cannot initiate infinite scroll.")}async loadInitialData(){await salla.api.notifications.fetch({per_page:this.itemPerPage}).then((t=>{this.pagination=t.pagination,this.total=t.pagination.total,this.nextPage=t.pagination.links?.next||null,setTimeout((()=>{if(!t.data.length)return this.showPlaceholder=!0;this.handleResponse(t.data).forEach((t=>this.wrapper.append(t))),this.initiateInfiniteScroll();let s=this.wrapper.querySelectorAll("salla-notification-item:not(.animated)");n.animateItems(s)}),100)})).catch((t=>{salla.logger.error(t),this.showPlaceholder=!0,this.loading(!1)}))}async loadMore(){this.infiniteScroll?.loadNextPage()}async componentWillLoad(){await this.loadInitialData()}get host(){return i(this)}};a.style="";export{a as salla_notifications}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,h as s,a as o}from"./p-
|
|
4
|
+
import{r as t,h as s,a as o}from"./p-DKAYrLM1.js";import{H as e}from"./p-Dljb4XCt.js";import"./p-CgtvEd63.js";const r=class{constructor(s){t(this,s),this.orderNumberText=salla.lang.get("pages.thank_you.order_id"),this.totalOrderText=salla.lang.get("pages.orders.total"),this.orderDateText=salla.lang.get("pages.orders.date"),this.orderStatusText=salla.lang.get("pages.orders.status"),this.noOrderText=salla.lang.get("pages.orders.non_orders"),this.load_more_text_trans=salla.lang.get("common.elements.load_more"),this.languageCode=salla.lang.locale,this.orders=[],salla.lang.onLoaded((()=>{this.languageCode=salla.lang.locale,this.orderNumberText=salla.lang.get("pages.thank_you.order_id"),this.totalOrderText=salla.lang.get("pages.orders.total"),this.orderDateText=salla.lang.get("pages.orders.date"),this.orderStatusText=salla.lang.get("pages.orders.status"),this.noOrderText=salla.lang.get("pages.orders.non_orders"),this.load_more_text_trans=salla.lang.get("common.elements.load_more")}))}loading(t=!0){let s=this.status?.querySelector(".s-button-text");s&&(e.toggleElementClassIf(s,"s-button-hide","s-button-show",(()=>t)),this.btnLoader.style.display=t?"inherit":"none")}initiateInfiniteScroll(){this.hasInfiniteScroll&&(this.wrapper?(this.infiniteScroll=salla.infiniteScroll.initiate(this.wrapper,this.wrapper,{path:()=>this.nextPage,history:!1,nextPage:this.nextPage,scrollThreshold:!1},!0),this.infiniteScroll?.on("request",(()=>{this.loading()})),this.infiniteScroll?.on("load",(t=>{this.loading(!1),this.pagination=t.pagination,this.nextPage=t.pagination?.links?.next||null,this.handleResponse(t.data).forEach((t=>{this.wrapper.append(t)}));let s=this.host.querySelectorAll(".s-orders-table-tbody-tr:not(.animated)");e.animateItems(s)})),this.infiniteScroll?.on("error",(t=>{salla.logger.error("Error loading more comments:",t)}))):salla.logger.error("Wrapper is undefined. Cannot initiate infinite scroll."))}async loadMore(){this.infiniteScroll.loadNextPage()}handleResponse(t){return t.map((t=>this.getSingleOrderItem(t)))}async loadInitialData(){const t=new URL(window.location.href);await salla.order.api.fetch({...this.params,types:[""],feedback_status:t.searchParams.get("feedback_status")}).then((t=>{if(this.orders=t.data,this.hasInfiniteScroll=!!t.pagination?.links.next,this.pagination=t.pagination,this.total=t.pagination?.total,this.nextPage=t.pagination?.links?.next||null,!this.orders.length)return this.showPlaceholder=!0,this.loading(!1);setTimeout((()=>{this.handleResponse(t.data).forEach((t=>{this.wrapper.append(t)})),this.initiateInfiniteScroll();let s=this.wrapper.querySelectorAll(".s-orders-table-tbody-tr:not(.animated)");e.animateItems(s)}),100)})).catch((t=>{this.showPlaceholder=!0,this.loading(!1),salla.logger.error(t)}))}getSingleOrderItem(t){const s=document.createElement("tr");s.classList.add("s-orders-table-tbody-tr","s-orders-table-tbody-tr-shadow");const o=document.createElement("td");o.classList.add("s-orders-table-tbody-tr-td");const r=document.createElement("div");r.classList.add("s-orders-table-tbody-tr-td-content");const a=document.createElement("span");a.classList.add("s-orders-mobile-title"),a.textContent=this.orderNumberText+":";const n=document.createElement("span");if(n.classList.add("s-orders-reference-id"),n.textContent="#"+t.reference_id,r.appendChild(a),r.appendChild(n),"buy_as_gift"==t.source){const t=document.createElement("i");t.classList.add("sicon-gift-sharing","s-orders-buy-as-gift-icon"),r.appendChild(t)}const i=document.createElement("a");i.href=t.url,r.appendChild(i);const d=document.createElement("div");d.classList.add("s-orders-copy-to-clipboard-button");const l=document.createElement("salla-button");l.classList.add("relative"),l.setAttribute("color","dark"),l.setAttribute("shape","link"),l.dataset.content=t.reference_id.toString(),l.addEventListener("click",(t=>{e.copyToClipboard(t),e.toggleElementClassIf(l,"copied","code-to-copy",(()=>!0)),setTimeout((()=>{e.toggleElementClassIf(l,"code-to-copy","copied",(()=>!0))}),1e3)}));const c=document.createElement("span");c.textContent="#"+t.reference_id;const h=document.createElement("i");h.classList.add("sicon-swap-stroke","s-orders-copy-to-clipboard-button-icon"),salla.config.get("theme.is_rtl",!0)?(l.appendChild(h),l.appendChild(c)):(l.appendChild(c),l.appendChild(h)),d.appendChild(l),r.appendChild(d),o.appendChild(r),s.appendChild(o);const u=document.createElement("td");u.classList.add("s-orders-table-tbody-tr-td");const b=document.createElement("div");b.classList.add("s-orders-table-tbody-tr-td-content");const m=document.createElement("span");m.classList.add("s-orders-mobile-title"),m.textContent=this.totalOrderText+":";const p=document.createElement("div");p.innerHTML=salla.money(t.total);const y=document.createElement("a");y.href=t.url,b.appendChild(m),b.appendChild(p),b.appendChild(y),u.appendChild(b),s.appendChild(u);const g=document.createElement("td");g.classList.add("s-orders-table-tbody-tr-td");const f=document.createElement("div");f.classList.add("s-orders-table-tbody-tr-td-content");const _=document.createElement("span");_.classList.add("s-orders-mobile-title"),_.textContent=this.orderDateText+":";const v=document.createElement("div");v.textContent=e.formatDateFromString(t.created_at.date,salla.helpers.number,this.languageCode);const k=document.createElement("a");k.href=t.url,f.appendChild(_),f.appendChild(v),f.appendChild(k),g.appendChild(f),s.appendChild(g);const w=document.createElement("td");w.classList.add("s-orders-table-tbody-tr-td");const x=document.createElement("div");x.classList.add("s-orders-table-tbody-tr-td-content");const j=document.createElement("span");j.classList.add("s-orders-mobile-title"),j.textContent=this.orderStatusText+":";const C=document.createElement("span");C.classList.add("s-orders-status-container"),C.style.color=t.status.color;const D=document.createElement("i");D.classList.add(t.status.icon);const I=document.createElement("span");I.textContent=t.status.name,C.appendChild(D),C.appendChild(I),x.appendChild(j),x.appendChild(C);const L=document.createElement("i");L.classList.add("sicon-star2","s-orders-status-rated",t.is_rated?"s-orders-rated-text":"s-orders-unrated-text"),x.appendChild(L);const T=document.createElement("a");return T.href=t.url,x.appendChild(T),w.appendChild(x),s.appendChild(w),s}render(){return this.showPlaceholder?s("div",{class:"s-orders-no-content"},s("i",{class:"sicon-packed-box icon"}),s("p",null,this.noOrderText)):s("div",{class:"s-orders-wrapper"},s("table",{class:"s-orders-table"},s("thead",{class:"s-orders-table-head"},s("tr",{class:"s-orders-table-head-tr"},s("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.orderNumberText),s("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.totalOrderText),s("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.orderDateText),s("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.orderStatusText))),s("tbody",{class:"s-orders-table-tbody",ref:t=>this.wrapper=t})),this.nextPage&&s("div",{class:"s-infinite-scroll-wrapper",ref:t=>this.status=t},s("button",{onClick:()=>this.loadMore(),class:"s-infinite-scroll-btn s-button-btn s-button-primary"},s("span",{class:"s-button-text s-infinite-scroll-btn-text"},this.loadMoreText??this.load_more_text_trans),s("span",{class:"s-button-loader s-button-loader-center s-infinite-scroll-btn-loader",ref:t=>this.btnLoader=t,style:{display:"none"}}))))}componentWillLoad(){return salla.onReady().then((()=>this.loadInitialData())).then((()=>this.initiateInfiniteScroll()))}get host(){return o(this)}};r.style=":host{display:block}";export{r as salla_orders}
|