HEX
Server: LiteSpeed
System: Linux shams.tasjeel.ae 5.14.0-611.5.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Nov 11 08:09:09 EST 2025 x86_64
User: infowars (1469)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: /home/infowars/www/wp-content/plugins/woocommerce/assets/client/blocks/product-button.js
(globalThis.webpackChunkwebpackWcBlocksMainJsonp=globalThis.webpackChunkwebpackWcBlocksMainJsonp||[]).push([[7409],{7297:(t,e,r)=>{"use strict";r.r(e),r.d(e,{Block:()=>f,default:()=>T});var o=r(6087),s=r(4921),n=r(7723),c=r(8326),i=r(231),a=r(2721),d=r(8537),l=r(6209),u=r(5703),p=r(415),m=r(1616),_=(r(7316),r(619)),b=r(790);const g=({product:t,isDescendantOfAddToCartWithOptions:e,collection:r})=>{const o="woocommerce/product-collection/cart-contents"===r,c="external"===t.type,i=c?t.button_text:t.add_to_cart?.single_text;let a;return a=o?(0,n.__)("Finish checkout","woocommerce"):e?i:t.add_to_cart?.text,(0,b.jsx)("button",{disabled:!1,className:(0,s.A)("wp-block-button__link","wp-element-button","add_to_cart_button","wc-block-components-product-button__button"),style:{},children:c?t.button_text:a||(0,n.__)("Add to cart","woocommerce")})},y=({product:t,isDescendantOfAddToCartWithOptions:e,className:r,style:o,collection:a})=>{const{id:p,permalink:m,add_to_cart:_,has_options:g,is_purchasable:y,is_in_stock:h}=t,{dispatchStoreEvent:w}=(0,c.y)(),{cartQuantity:f,addingToCart:T,addToCart:C}=(0,i.R)(p),E=Number.isFinite(f)&&f>0,S="woocommerce/product-collection/cart-contents"===a,k=!g&&y&&h,v=(0,d.decodeEntities)(_?.description||""),x=S?(0,n.__)("Finish checkout","woocommerce"):(({cartQuantity:t,productCartDetails:e,isDescendantOfAddToCartWithOptions:r})=>Number.isFinite(t)&&t>0?(0,n.sprintf)(/* translators: %s number of products in cart. */ /* translators: %s number of products in cart. */
(0,n._n)("%d in cart","%d in cart",t,"woocommerce"),t):r&&e?.single_text?e?.single_text:e?.text||(0,n.__)("Add to cart","woocommerce"))({cartQuantity:f,productCartDetails:_,isDescendantOfAddToCartWithOptions:e}),A=k&&!S?"button":"a",R={};return S?(R.href=l.Vo,R.rel="nofollow",R.onClick=()=>{w("cart-view-link",{product:t})}):k?R.onClick=async()=>{await C(),w("cart-add-item",{product:t});const{cartRedirectAfterAdd:e}=(0,u.getSetting)("productsSettings");e&&(window.location.href=l.Vo)}:(R.href=m,R.rel="nofollow",R.onClick=()=>{w("product-view-link",{product:t})}),(0,b.jsx)(A,{...R,"aria-label":v,disabled:T,className:(0,s.A)(r,"wp-block-button__link","wp-element-button","add_to_cart_button","wc-block-components-product-button__button",{loading:T,added:E}),style:o,children:x})},h=({className:t,style:e})=>(0,b.jsx)("button",{className:(0,s.A)("wp-block-button__link","wp-element-button","add_to_cart_button","wc-block-components-product-button__button","wc-block-components-product-button__button--placeholder",t),style:e,disabled:!0,children:(0,n.__)("Add to cart","woocommerce")}),w=({className:t,style:e,blockClientId:r,collection:c})=>{const{current:i,registerListener:a,unregisterListener:d}=(0,_.A)();let l;return(0,o.useEffect)((()=>{if(r)return a(r),()=>{d(r)}}),[r,a,d]),l="woocommerce/product-collection/cart-contents"===c?(0,n.__)("Finish checkout","woocommerce"):"external"===i?.slug?(0,n.__)("Buy product","woocommerce"):(0,n.__)("Add to cart","woocommerce"),(0,b.jsx)("button",{className:(0,s.A)("wp-block-button__link","wp-element-button","add_to_cart_button","wc-block-components-product-button__button",t),style:e,disabled:!0,children:l})},f=t=>{const{className:e,textAlign:r,blockClientId:o,collection:n}=t,c=(0,a.p)(t),{parentClassName:i}=(0,p.useInnerBlockLayoutContext)(),{product:d,isLoading:u}=(0,p.useProductDataContext)({product:t.product,isAdmin:t.isAdmin}),m=d?.id&&t.isAdmin&&(0,l.Sc)();return(0,b.jsx)("div",{className:(0,s.A)(e,"wp-block-button","wc-block-components-product-button",{[`${i}__product-add-to-cart`]:i,[`align-${r}`]:r}),children:u?(0,b.jsx)(h,{className:c.className,style:c.style}):(0,b.jsxs)(b.Fragment,{children:[m&&(0,b.jsx)(g,{product:d,isDescendantOfAddToCartWithOptions:t["woocommerce/isDescendantOfAddToCartWithOptions"],collection:n}),!m&&(d&&d?.id?(0,b.jsx)(y,{product:d,style:c.style,className:c.className,isAdmin:t.isAdmin,isDescendantOfAddToCartWithOptions:t["woocommerce/isDescendantOfAddToCartWithOptions"],productEntity:t.product,collection:n}):(0,b.jsx)(w,{style:c.style,className:c.className,isLoading:null!=u&&u,blockClientId:o,collection:n}))]})})},T=(0,m.withProductDataContext)(f)},3042:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var o=r(6209),s=r(3993),n=r(7723);const c=Object.entries(o.iI).reduce(((t,[e,r])=>(t[e]=Object.entries(r).reduce(((t,[e,r])=>(t[e]=(t=>{const e={};return void 0!==t.label&&(e.label=t.label),void 0!==t.required&&(e.required=t.required),void 0!==t.hidden&&(e.hidden=t.hidden),void 0===t.label||t.optionalLabel||(e.optionalLabel=(0,n.sprintf)(/* translators: %s Field label. */ /* translators: %s Field label. */
(0,n.__)("%s (optional)","woocommerce"),t.label)),void 0!==t.optionalLabel&&(e.optionalLabel=t.optionalLabel),t.index&&((0,s.isNumber)(t.index)&&(e.index=t.index),(0,s.isString)(t.index)&&(e.index=parseInt(t.index,10))),t.hidden&&(e.required=!1),e})(r),t)),{}),t)),{}),i=(t,e,r="")=>{const o=r&&void 0!==c[r]?c[r]:{};return t.map((t=>({key:t,...e&&t in e?e[t]:{},...o&&t in o?o[t]:{}}))).sort(((t,e)=>t.index-e.index))}},1379:(t,e,r)=>{"use strict";r.d(e,{U:()=>u});var o=r(6087),s=r(7594),n=r(7143),c=r(876),i=r(2263);const a=t=>{const e=t?.detail;e&&e.preserveCartData||(0,n.dispatch)(s.cartStore).invalidateResolutionForStore()},d=t=>{(t?.persisted||"back_forward"===(0,c.F)())&&(0,n.dispatch)(s.cartStore).invalidateResolutionForStore()},l=()=>{1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},u=()=>{(0,o.useEffect)((()=>((()=>{if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:()=>{}}),window.wcBlocksStoreCartListeners?.count>0)return void window.wcBlocksStoreCartListeners.count++;document.body.addEventListener("wc-blocks_added_to_cart",a),document.body.addEventListener("wc-blocks_removed_from_cart",a),window.addEventListener("pageshow",d);const t=(0,i.f2)("added_to_cart","wc-blocks_added_to_cart"),e=(0,i.f2)("removed_from_cart","wc-blocks_removed_from_cart");window.wcBlocksStoreCartListeners.count=1,window.wcBlocksStoreCartListeners.remove=()=>{document.body.removeEventListener("wc-blocks_added_to_cart",a),document.body.removeEventListener("wc-blocks_removed_from_cart",a),window.removeEventListener("pageshow",d),t(),e()}})(),l)),[])}},6146:(t,e,r)=>{"use strict";r.d(e,{V:()=>y});var o=r(1824),s=r.n(o),n=r(6087),c=r(7594),i=r(7143),a=r(8537),d=r(6504),l=r(1379);const u={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},p={...u,email:""},m={total_items:"",total_items_tax:"",total_fees:"",total_fees_tax:"",total_discount:"",total_discount_tax:"",total_shipping:"",total_shipping_tax:"",total_price:"",total_tax:"",tax_lines:c.EMPTY_TAX_LINES,currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:"",currency_thousand_separator:"",currency_prefix:"",currency_suffix:""},_=t=>Object.fromEntries(Object.entries(t).map((([t,e])=>[t,(0,a.decodeEntities)(e)]))),b=(t,e)=>{const r=(0,d.TU)(_(t));return s()(e.current,r)||(e.current=r),e.current},g={billingAddress:p,billingData:p,cartCoupons:c.EMPTY_CART_COUPONS,cartErrors:c.EMPTY_CART_ERRORS,cartFees:c.EMPTY_CART_FEES,cartHasCalculatedShipping:!1,cartIsLoading:!0,cartItemErrors:c.EMPTY_CART_ITEM_ERRORS,cartItems:c.EMPTY_CART_ITEMS,cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartTotals:m,crossSellsProducts:c.EMPTY_CART_CROSS_SELLS,extensions:c.EMPTY_EXTENSIONS,hasPendingItemsOperations:!1,isLoadingRates:!1,paymentMethods:c.EMPTY_PAYMENT_METHODS,paymentRequirements:c.EMPTY_PAYMENT_REQUIREMENTS,receiveCart:()=>{},receiveCartContents:()=>{},shippingAddress:u,shippingRates:c.EMPTY_SHIPPING_RATES},y=(t={shouldSelect:!0})=>{const{shouldSelect:e}=t,r=(0,n.useRef)(),o=(0,n.useRef)(p),d=(0,n.useRef)(u);(0,l.U)();const{receiveCart:m,receiveCartContents:y}=(0,i.useDispatch)(c.cartStore),{cartData:h,cartErrors:w,cartTotals:f,cartIsLoading:T,isLoadingRates:C,hasPendingItemsOperations:E}=(0,i.useSelect)((t=>{const e=t(c.cartStore),r=!e.hasFinishedResolution("getCartData",[]);return{cartData:e.getCartData(),cartErrors:e.getCartErrors(),cartTotals:e.getCartTotals(),cartIsLoading:r,isLoadingRates:e.isAddressFieldsForShippingRatesUpdating(),hasPendingItemsOperations:e.hasPendingItemsOperations()}}),[]);if(!e)return g;const S=b(h.billingAddress,o),k=h.needsShipping?b(h.shippingAddress,d):S,v={billingAddress:S,billingData:S,cartCoupons:(R=h.coupons,R.length>0?R.map((t=>({...t,label:(0,a.decodeEntities)(t.code)}))):c.EMPTY_CART_COUPONS),cartErrors:w,cartFees:(A=h.fees,A.length>0?A.map((t=>_(t))):c.EMPTY_CART_FEES),cartHasCalculatedShipping:h.hasCalculatedShipping,cartIsLoading:T,cartItemErrors:h.errors,cartItems:h.items,cartItemsCount:h.itemsCount,cartItemsWeight:h.itemsWeight,cartNeedsPayment:h.needsPayment,cartNeedsShipping:h.needsShipping,cartTotals:f,crossSellsProducts:h.crossSells,extensions:h.extensions,hasPendingItemsOperations:E,isLoadingRates:C,paymentMethods:h.paymentMethods,paymentRequirements:h.paymentRequirements,receiveCart:m,receiveCartContents:y,shippingAddress:k,shippingRates:(x=h.shippingRates,x.length>0?x.map((t=>({...t,shipping_rates:t.shipping_rates.length>0?t.shipping_rates.map((t=>_(t))):[]}))):[])};var x,A,R;return r.current&&s()(r.current,v)||(r.current=v),r.current}},231:(t,e,r)=>{"use strict";r.d(e,{R:()=>d});var o=r(6087),s=r(7143),n=r(7594),c=r(8537),i=r(6146);const a=(t,e)=>{const r=t.find((({id:t})=>t===e));return r?r.quantity:0},d=t=>{const{addItemToCart:e}=(0,s.useDispatch)(n.cartStore),{cartItems:r,cartIsLoading:d}=(0,i.V)(),{createErrorNotice:l,removeNotice:u}=(0,s.useDispatch)("core/notices"),[p,m]=(0,o.useState)(!1),_=(0,o.useRef)(a(r,t));return(0,o.useEffect)((()=>{const e=a(r,t);e!==_.current&&(_.current=e)}),[r,t]),{cartQuantity:Number.isFinite(_.current)?_.current:0,addingToCart:p,cartIsLoading:d,addToCart:(r=1)=>(m(!0),e(t,r).then((()=>{u("add-to-cart")})).catch((t=>{l((0,c.decodeEntities)(t.message),{id:"add-to-cart",context:"wc/all-products",isDismissible:!0})})).finally((()=>{m(!1)})))}}},8326:(t,e,r)=>{"use strict";r.d(e,{y:()=>c});var o=r(2619),s=r(7143),n=r(6087);const c=()=>({dispatchStoreEvent:(0,n.useCallback)(((t,e={})=>{try{(0,o.doAction)(`experimental__woocommerce_blocks-${t}`,e)}catch(t){console.error(t)}}),[]),dispatchCheckoutEvent:(0,n.useCallback)(((t,e={})=>{try{(0,o.doAction)(`experimental__woocommerce_blocks-checkout-${t}`,{...e,storeCart:(0,s.select)("wc/store/cart").getCartData()})}catch(t){console.error(t)}}),[])})},2721:(t,e,r)=>{"use strict";r.d(e,{p:()=>i});var o=r(4921),s=r(3993),n=r(1605),c=r(3099);const i=t=>{const e=(t=>{const e=(0,s.isObject)(t)?t:{style:{}};let r=e.style;return(0,s.isString)(r)&&(r=JSON.parse(r)||{}),(0,s.isObject)(r)||(r={}),{...e,style:r}})(t),r=(0,c.BK)(e),i=(0,c.aR)(e),a=(0,c.fo)(e),d=(0,n.x)(e);return{className:(0,o.A)(d.className,r.className,i.className,a.className),style:{...d.style,...r.style,...i.style,...a.style}}}},1605:(t,e,r)=>{"use strict";r.d(e,{x:()=>s});var o=r(3993);const s=t=>{const e=(0,o.isObject)(t.style.typography)?t.style.typography:{},r=(0,o.isString)(e.fontFamily)?e.fontFamily:"";return{className:t.fontFamily?`has-${t.fontFamily}-font-family`:r,style:{fontSize:t.fontSize?`var(--wp--preset--font-size--${t.fontSize})`:e.fontSize,fontStyle:e.fontStyle,fontWeight:e.fontWeight,letterSpacing:e.letterSpacing,lineHeight:e.lineHeight,textDecoration:e.textDecoration,textTransform:e.textTransform}}}},6504:(t,e,r)=>{"use strict";r.d(e,{TU:()=>c});var o=r(3042),s=r(6209),n=r(5703);r(3993),r(8537);const c=t=>{const e=(0,o.A)(s.Hw,n.defaultFields,t.country),r=Object.assign({},t);return e.forEach((({key:e,hidden:o})=>{!0===o&&((t,e)=>t in e)(e,t)&&(r[e]="")})),r}},3099:(t,e,r)=>{"use strict";r.d(e,{BK:()=>d,aR:()=>l,fo:()=>u});var o=r(4921),s=r(7356),n=r(9786),c=r(3993);function i(t={}){const e={};return(0,n.getCSSRules)(t,{selector:""}).forEach((t=>{e[t.key]=t.value})),e}function a(t,e){return t&&e?`has-${(0,s.c)(e)}-${t}`:""}function d(t){const{backgroundColor:e,textColor:r,gradient:s,style:n}=t,d=a("background-color",e),l=a("color",r),u=function(t){if(t)return`has-${t}-gradient-background`}(s),p=u||n?.color?.gradient;return{className:(0,o.A)(l,u,{[d]:!p&&!!d,"has-text-color":r||n?.color?.text,"has-background":e||n?.color?.background||s||n?.color?.gradient,"has-link-color":(0,c.isObject)(n?.elements?.link)?n?.elements?.link?.color:void 0}),style:i({color:n?.color||{}})}}function l(t){const e=t.style?.border||{};return{className:function(t){const{borderColor:e,style:r}=t,s=e?a("border-color",e):"";return(0,o.A)({"has-border-color":!!e||!!r?.border?.color,[s]:!!s})}(t),style:i({border:e})}}function u(t){return{className:void 0,style:i({spacing:t.style?.spacing||{}})}}},876:(t,e,r)=>{"use strict";r.d(e,{F:()=>o});const o=()=>window.performance&&window.performance.getEntriesByType("navigation").length?window.performance.getEntriesByType("navigation")[0].type:""},2263:(t,e,r)=>{"use strict";r.d(e,{f2:()=>s});const o=window.CustomEvent||null,s=(t,e,r=!1,s=!1)=>{if("function"!=typeof jQuery)return()=>{};const n=()=>{((t,{bubbles:e=!1,cancelable:r=!1,element:s,detail:n={}})=>{if(!o)return;s||(s=document.body);const c=new o(t,{bubbles:e,cancelable:r,detail:n});s.dispatchEvent(c)})(e,{bubbles:r,cancelable:s})};return jQuery(document).on(t,n),()=>jQuery(document).off(t,n)}},8132:(t,e,r)=>{"use strict";r.d(e,{EF:()=>o,Ie:()=>c,UI:()=>n,ht:()=>i,j9:()=>s});const o="woocommerce/product-type-template-state",s="SWITCH_PRODUCT_TYPE",n="SET_PRODUCT_TYPES",c="REGISTER_LISTENER",i="UNREGISTER_LISTENER"},1141:(t,e,r)=>{"use strict";r.d(e,{M:()=>a});var o=r(7143),s=r(8132);const n=(0,r(5680).c)(),c={productTypes:{list:n,current:n[0]?.slug},listeners:[]},i={switchProductType:t=>({type:s.j9,current:t}),setProductTypes:t=>({type:s.UI,productTypes:t}),registerListener:t=>({type:s.Ie,listener:t}),unregisterListener:t=>({type:s.ht,listener:t})},a=(0,o.createReduxStore)(s.EF,{reducer:(t=c,e)=>{switch(e.type){case s.UI:return{...t,productTypes:{...t.productTypes,list:e.productTypes||[]}};case s.j9:return{...t,productTypes:{...t.productTypes,current:e.current}};case s.Ie:return{...t,listeners:[...t.listeners,e.listener||""]};case s.ht:return{...t,listeners:t.listeners.filter((t=>t!==e.listener))};default:return t}},actions:i,selectors:{getProductTypes:t=>t.productTypes.list,getCurrentProductType:t=>t.productTypes.list.find((e=>e.slug===t.productTypes.current)),getRegisteredListeners:t=>t.listeners}});(0,o.select)(s.EF)||(0,o.register)(a)},619:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});var o=r(7143),s=r(1141);function n(){const{productTypes:t,current:e,registeredListeners:r}=(0,o.useSelect)((t=>{const{getProductTypes:e,getCurrentProductType:r,getRegisteredListeners:o}=t(s.M);return{productTypes:e(),current:r(),registeredListeners:o()}}),[]),{switchProductType:n,registerListener:c,unregisterListener:i}=(0,o.useDispatch)(s.M);return{productTypes:t,current:e,set:n,registeredListeners:r,registerListener:c,unregisterListener:i}}},5680:(t,e,r)=>{"use strict";r.d(e,{c:()=>s});const o=(0,r(5703).getSetting)("productTypes",{});function s(){return Object.keys(o).map((t=>({slug:t,label:o[t]})))}},7316:()=>{}}]);