File: /var/www/vhosts/uyarreklam.com.tr/httpdocs/products-table-frontend.js.tar
build/cart-blocks/cart-line-items--mini-cart-contents-block/products-table-frontend.js 0000644 00000042532 15155420317 0050577 0 ustar 00 var/www/vhosts/uyarreklam.com.tr/httpdocs/wp-content/plugins/woocommerce/packages/woocommerce-blocks (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[8],{112:function(e,t,c){"use strict";var a=c(0),r=c(146),n=c(4),l=c.n(n);c(218);const o=e=>({thousandSeparator:null==e?void 0:e.thousandSeparator,decimalSeparator:null==e?void 0:e.decimalSeparator,fixedDecimalScale:!0,prefix:null==e?void 0:e.prefix,suffix:null==e?void 0:e.suffix,isNumericString:!0});t.a=({className:e,value:t,currency:c,onValueChange:n,displayType:s="text",...i})=>{var u;const m="string"==typeof t?parseInt(t,10):t;if(!Number.isFinite(m))return null;const b=m/10**c.minorUnit;if(!Number.isFinite(b))return null;const p=l()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",e),d=null!==(u=i.decimalScale)&&void 0!==u?u:null==c?void 0:c.minorUnit,O={...i,...o(c),decimalScale:d,value:void 0,currency:void 0,onValueChange:void 0},j=n?e=>{const t=+e.value*10**c.minorUnit;n(t)}:()=>{};return Object(a.createElement)(r.a,{className:p,displayType:s,...O,value:b,onValueChange:j})}},218:function(e,t){},312:function(e,t,c){"use strict";var a=c(0),r=c(22),n=c(4),l=c.n(n);c(313),t.a=({className:e="",disabled:t=!1,name:c,permalink:n="",target:o,rel:s,style:i,onClick:u,...m})=>{const b=l()("wc-block-components-product-name",e);if(t){const e=m;return Object(a.createElement)("span",{className:b,...e,dangerouslySetInnerHTML:{__html:Object(r.decodeEntities)(c)}})}return Object(a.createElement)("a",{className:b,href:n,target:o,...m,dangerouslySetInnerHTML:{__html:Object(r.decodeEntities)(c)},style:i})}},313:function(e,t){},322:function(e,t,c){"use strict";var a=c(0),r=c(4),n=c.n(r);c(380),t.a=({children:e,className:t})=>Object(a.createElement)("div",{className:n()("wc-block-components-product-badge",t)},e)},341:function(e,t,c){"use strict";var a=c(0),r=c(1),n=c(112),l=c(4),o=c.n(l),s=c(38);c(342);const i=({currency:e,maxPrice:t,minPrice:c,priceClassName:l,priceStyle:i={}})=>Object(a.createElement)(a.Fragment,null,Object(a.createElement)("span",{className:"screen-reader-text"},Object(r.sprintf)(/* translators: %1$s min price, %2$s max price */
Object(r.__)("Price between %1$s and %2$s","woocommerce"),Object(s.formatPrice)(c),Object(s.formatPrice)(t))),Object(a.createElement)("span",{"aria-hidden":!0},Object(a.createElement)(n.a,{className:o()("wc-block-components-product-price__value",l),currency:e,value:c,style:i})," — ",Object(a.createElement)(n.a,{className:o()("wc-block-components-product-price__value",l),currency:e,value:t,style:i}))),u=({currency:e,regularPriceClassName:t,regularPriceStyle:c,regularPrice:l,priceClassName:s,priceStyle:i,price:u})=>Object(a.createElement)(a.Fragment,null,Object(a.createElement)("span",{className:"screen-reader-text"},Object(r.__)("Previous price:","woocommerce")),Object(a.createElement)(n.a,{currency:e,renderText:e=>Object(a.createElement)("del",{className:o()("wc-block-components-product-price__regular",t),style:c},e),value:l}),Object(a.createElement)("span",{className:"screen-reader-text"},Object(r.__)("Discounted price:","woocommerce")),Object(a.createElement)(n.a,{currency:e,renderText:e=>Object(a.createElement)("ins",{className:o()("wc-block-components-product-price__value","is-discounted",s),style:i},e),value:u}));t.a=({align:e,className:t,currency:c,format:r="<price/>",maxPrice:l,minPrice:s,price:m,priceClassName:b,priceStyle:p,regularPrice:d,regularPriceClassName:O,regularPriceStyle:j,style:_})=>{const y=o()(t,"price","wc-block-components-product-price",{[`wc-block-components-product-price--align-${e}`]:e});r.includes("<price/>")||(r="<price/>",console.error("Price formats need to include the `<price/>` tag."));const f=d&&m!==d;let g=Object(a.createElement)("span",{className:o()("wc-block-components-product-price__value",b)});return f?g=Object(a.createElement)(u,{currency:c,price:m,priceClassName:b,priceStyle:p,regularPrice:d,regularPriceClassName:O,regularPriceStyle:j}):void 0!==s&&void 0!==l?g=Object(a.createElement)(i,{currency:c,maxPrice:l,minPrice:s,priceClassName:b,priceStyle:p}):m&&(g=Object(a.createElement)(n.a,{className:o()("wc-block-components-product-price__value",b),currency:c,value:m,style:p})),Object(a.createElement)("span",{className:y,style:_},Object(a.createInterpolateElement)(r,{price:g}))}},342:function(e,t){},352:function(e,t,c){"use strict";var a=c(0),r=c(133);const n=e=>e.replace(/<\/?[a-z][^>]*?>/gi,""),l=(e,t)=>e.replace(/[\s|\.\,]+$/i,"")+t;var o=c(136);t.a=({source:e,maxLength:t=15,countType:c="words",className:s="",style:i={}})=>{const u=Object(a.useMemo)((()=>((e,t=15,c="words")=>{const a=Object(r.autop)(e);if(Object(o.count)(a,c)<=t)return a;const s=(e=>{const t=e.indexOf("</p>");return-1===t?e:e.substr(0,t+4)})(a);return Object(o.count)(s,c)<=t?s:"words"===c?((e,t,c="…",a=!0)=>{const o=n(e),s=o.split(" ").splice(0,t).join(" ");return s===o?a?Object(r.autop)(o):o:a?Object(r.autop)(l(s,c)):l(s,c)})(s,t):((e,t,c=!0,a="…",o=!0)=>{const s=n(e),i=s.slice(0,t);if(i===s)return o?Object(r.autop)(s):s;if(c)return Object(r.autop)(l(i,a));const u=i.match(/([\s]+)/g),m=u?u.length:0,b=s.slice(0,t+m);return o?Object(r.autop)(l(b,a)):l(b,a)})(s,t,"characters_including_spaces"===c)})(e,t,c)),[e,t,c]);return Object(a.createElement)(a.RawHTML,{style:i,className:s},u)}},378:function(e,t,c){"use strict";var a=c(0),r=c(22),n=c(2);t.a=({image:e={},fallbackAlt:t=""})=>{const c=e.thumbnail?{src:e.thumbnail,alt:Object(r.decodeEntities)(e.alt)||t||"Product Image"}:{src:n.PLACEHOLDER_IMG_SRC,alt:""};return Object(a.createElement)("img",{...c,alt:c.alt})}},379:function(e,t,c){"use strict";var a=c(0),r=c(1),n=c(322);t.a=()=>Object(a.createElement)(n.a,{className:"wc-block-components-product-backorder-badge"},Object(r.__)("Available on backorder","woocommerce"))},380:function(e,t){},381:function(e,t,c){"use strict";var a=c(0),r=c(1),n=c(322);t.a=({lowStockRemaining:e})=>e?Object(a.createElement)(n.a,{className:"wc-block-components-product-low-stock-badge"},Object(r.sprintf)(/* translators: %d stock amount (number of items in stock for product) */
Object(r.__)("%d left in stock","woocommerce"),e)):null},382:function(e,t){},383:function(e,t){},397:function(e,t,c){"use strict";var a=c(0),r=c(291),n=c(22);c(383);var l=({details:e=[]})=>Array.isArray(e)?0===(e=e.filter((e=>!e.hidden))).length?null:Object(a.createElement)("ul",{className:"wc-block-components-product-details"},e.map((e=>{const t=(null==e?void 0:e.key)||e.name||"",c=(null==e?void 0:e.className)||(t?`wc-block-components-product-details__${Object(r.a)(t)}`:"");return Object(a.createElement)("li",{key:t+(e.display||e.value),className:c},t&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)("span",{className:"wc-block-components-product-details__name"},Object(n.decodeEntities)(t),":")," "),Object(a.createElement)("span",{className:"wc-block-components-product-details__value"},Object(n.decodeEntities)(e.display||e.value)))}))):null,o=c(352),s=c(29),i=({className:e,shortDescription:t="",fullDescription:c=""})=>{const r=t||c;return r?Object(a.createElement)(o.a,{className:e,source:r,maxLength:15,countType:s.p.wordCountType||"words"}):null};c(382),t.a=({shortDescription:e="",fullDescription:t="",itemData:c=[],variation:r=[]})=>Object(a.createElement)("div",{className:"wc-block-components-product-metadata"},Object(a.createElement)(i,{className:"wc-block-components-product-metadata__description",shortDescription:e,fullDescription:t}),Object(a.createElement)(l,{details:c}),Object(a.createElement)(l,{details:r.map((({attribute:e="",value:t})=>({key:e,value:t})))}))},443:function(e,t){},444:function(e,t){},508:function(e,t,c){"use strict";var a=c(0),r=c(4),n=c.n(r),l=c(1),o=c(24),s=c(23),i=c(43);c(444);var u=({className:e,quantity:t=1,minimum:c=1,maximum:r,onChange:u=(()=>{}),step:m=1,itemName:b="",disabled:p})=>{const d=n()("wc-block-components-quantity-selector",e),O=Object(a.useRef)(null),j=Object(a.useRef)(null),_=Object(a.useRef)(null),y=void 0!==r,f=!p&&t-m>=c,g=!p&&(!y||t+m<=r),k=Object(a.useCallback)((e=>{let t=e;y&&(t=Math.min(t,Math.floor(r/m)*m)),t=Math.max(t,Math.ceil(c/m)*m),t=Math.floor(t/m)*m,t!==e&&u(t)}),[y,r,c,u,m]),E=Object(i.b)(k,300);Object(a.useLayoutEffect)((()=>{k(t)}),[t,k]);const v=Object(a.useCallback)((e=>{const c=void 0!==typeof e.key?"ArrowDown"===e.key:e.keyCode===s.DOWN,a=void 0!==typeof e.key?"ArrowUp"===e.key:e.keyCode===s.UP;c&&f&&(e.preventDefault(),u(t-m)),a&&g&&(e.preventDefault(),u(t+m))}),[t,u,g,f,m]);return Object(a.createElement)("div",{className:d},Object(a.createElement)("input",{ref:O,className:"wc-block-components-quantity-selector__input",disabled:p,type:"number",step:m,min:c,max:r,value:t,onKeyDown:v,onChange:e=>{let c=parseInt(e.target.value,10);c=isNaN(c)?t:c,c!==t&&(u(c),E(c))},"aria-label":Object(l.sprintf)(/* translators: %s refers to the item name in the cart. */
Object(l.__)("Quantity of %s in your cart.","woocommerce"),b)}),Object(a.createElement)("button",{ref:j,"aria-label":Object(l.sprintf)(/* translators: %s refers to the item name in the cart. */
Object(l.__)("Reduce quantity of %s","woocommerce"),b),className:"wc-block-components-quantity-selector__button wc-block-components-quantity-selector__button--minus",disabled:!f,onClick:()=>{const e=t-m;u(e),Object(o.speak)(Object(l.sprintf)(/* translators: %s refers to the item's new quantity in the cart. */
Object(l.__)("Quantity reduced to %s.","woocommerce"),e)),k(e)}},"-"),Object(a.createElement)("button",{ref:_,"aria-label":Object(l.sprintf)(/* translators: %s refers to the item's name in the cart. */
Object(l.__)("Increase quantity of %s","woocommerce"),b),disabled:!g,className:"wc-block-components-quantity-selector__button wc-block-components-quantity-selector__button--plus",onClick:()=>{const e=t+m;u(e),Object(o.speak)(Object(l.sprintf)(/* translators: %s refers to the item's new quantity in the cart. */
Object(l.__)("Quantity increased to %s.","woocommerce"),e)),k(e)}},"+"))},m=c(341),b=c(312),p=c(5),d=c(3),O=c(53),j=c(19),_=c(28),y=c(119),f=c(72);var g=c(73),k=c(38),E=c(11),v=c(412),w=c(2),N=c(379),h=c(378),C=c(381),x=c(397),P=c(112),I=c(322),S=({currency:e,saleAmount:t,format:c="<price/>"})=>{if(!t||t<=0)return null;c.includes("<price/>")||(c="<price/>",console.error("Price formats need to include the `<price/>` tag."));const r=Object(l.sprintf)(/* translators: %s will be replaced by the discount amount */
Object(l.__)("Save %s","woocommerce"),c);return Object(a.createElement)(I.a,{className:"wc-block-components-sale-badge"},Object(a.createInterpolateElement)(r,{price:Object(a.createElement)(P.a,{currency:e,value:t})}))};const q=(e,t)=>e.convertPrecision(t.minorUnit).getAmount(),D=e=>Object(E.mustContain)(e,"<price/>");var R=Object(a.forwardRef)((({lineItem:e,onRemove:t=(()=>{}),tabIndex:c},r)=>{const{name:s="",catalog_visibility:P="visible",short_description:I="",description:R="",low_stock_remaining:T=null,show_backorder_badge:A=!1,quantity_limits:F={minimum:1,maximum:99,multiple_of:1,editable:!0},sold_individually:M=!1,permalink:L="",images:U=[],variation:V=[],item_data:$=[],prices:Q={currency_code:"USD",currency_minor_unit:2,currency_symbol:"$",currency_prefix:"$",currency_suffix:"",currency_decimal_separator:".",currency_thousand_separator:",",price:"0",regular_price:"0",sale_price:"0",price_range:null,raw_prices:{precision:6,price:"0",regular_price:"0",sale_price:"0"}},totals:H={currency_code:"USD",currency_minor_unit:2,currency_symbol:"$",currency_prefix:"$",currency_suffix:"",currency_decimal_separator:".",currency_thousand_separator:",",line_subtotal:"0",line_subtotal_tax:"0"},extensions:K}=e,{quantity:B,setItemQuantity:W,removeItem:Y,isPendingDelete:J}=(e=>{const t={key:"",quantity:1};(e=>Object(j.a)(e)&&Object(j.b)(e,"key")&&Object(j.b)(e,"quantity")&&Object(_.a)(e.key)&&Object(y.a)(e.quantity))(e)&&(t.key=e.key,t.quantity=e.quantity);const{key:c="",quantity:r=1}=t,{cartErrors:n}=Object(f.a)(),{__internalIncrementCalculating:l,__internalDecrementCalculating:o}=Object(p.useDispatch)(d.CHECKOUT_STORE_KEY),[s,u]=Object(a.useState)(r),[m]=Object(i.a)(s,400),b=Object(O.a)(m),{removeItemFromCart:g,changeCartItemQuantity:k}=Object(p.useDispatch)(d.CART_STORE_KEY);Object(a.useEffect)((()=>u(r)),[r]);const E=Object(p.useSelect)((e=>{if(!c)return{quantity:!1,delete:!1};const t=e(d.CART_STORE_KEY);return{quantity:t.isItemPendingQuantity(c),delete:t.isItemPendingDelete(c)}}),[c]),v=Object(a.useCallback)((()=>c?g(c).catch((e=>{Object(d.processErrorResponse)(e)})):Promise.resolve(!1)),[c,g]);return Object(a.useEffect)((()=>{c&&Object(y.a)(b)&&Number.isFinite(b)&&b!==m&&k(c,m).catch((e=>{Object(d.processErrorResponse)(e)}))}),[c,k,m,b]),Object(a.useEffect)((()=>(E.delete?l():o(),()=>{E.delete&&o()})),[o,l,E.delete]),Object(a.useEffect)((()=>(E.quantity||m!==s?l():o(),()=>{(E.quantity||m!==s)&&o()})),[l,o,E.quantity,m,s]),{isPendingDelete:E.delete,quantity:s,setItemQuantity:u,removeItem:v,cartItemQuantityErrors:n}})(e),{dispatchStoreEvent:z}=Object(g.a)(),{receiveCart:G,...X}=Object(f.a)(),Z=Object(a.useMemo)((()=>({context:"cart",cartItem:e,cart:X})),[e,X]),ee=Object(k.getCurrencyFromPriceResponse)(Q),te=Object(E.applyCheckoutFilter)({filterName:"itemName",defaultValue:s,extensions:K,arg:Z}),ce=Object(v.a)({amount:parseInt(Q.raw_prices.regular_price,10),precision:Q.raw_prices.precision}),ae=Object(v.a)({amount:parseInt(Q.raw_prices.price,10),precision:Q.raw_prices.precision}),re=ce.subtract(ae),ne=re.multiply(B),le=Object(k.getCurrencyFromPriceResponse)(H);let oe=parseInt(H.line_subtotal,10);Object(w.getSetting)("displayCartPricesIncludingTax",!1)&&(oe+=parseInt(H.line_subtotal_tax,10));const se=Object(v.a)({amount:oe,precision:le.minorUnit}),ie=U.length?U[0]:{},ue="hidden"===P||"search"===P,me=Object(E.applyCheckoutFilter)({filterName:"cartItemClass",defaultValue:"",extensions:K,arg:Z}),be=Object(E.applyCheckoutFilter)({filterName:"cartItemPrice",defaultValue:"<price/>",extensions:K,arg:Z,validation:D}),pe=Object(E.applyCheckoutFilter)({filterName:"subtotalPriceFormat",defaultValue:"<price/>",extensions:K,arg:Z,validation:D}),de=Object(E.applyCheckoutFilter)({filterName:"saleBadgePriceFormat",defaultValue:"<price/>",extensions:K,arg:Z,validation:D}),Oe=Object(E.applyCheckoutFilter)({filterName:"showRemoveItemLink",defaultValue:!0,extensions:K,arg:Z});return Object(a.createElement)("tr",{className:n()("wc-block-cart-items__row",me,{"is-disabled":J}),ref:r,tabIndex:c},Object(a.createElement)("td",{className:"wc-block-cart-item__image","aria-hidden":!Object(j.b)(ie,"alt")||!ie.alt},ue?Object(a.createElement)(h.a,{image:ie,fallbackAlt:te}):Object(a.createElement)("a",{href:L,tabIndex:-1},Object(a.createElement)(h.a,{image:ie,fallbackAlt:te}))),Object(a.createElement)("td",{className:"wc-block-cart-item__product"},Object(a.createElement)("div",{className:"wc-block-cart-item__wrap"},Object(a.createElement)(b.a,{disabled:J||ue,name:te,permalink:L}),A?Object(a.createElement)(N.a,null):!!T&&Object(a.createElement)(C.a,{lowStockRemaining:T}),Object(a.createElement)("div",{className:"wc-block-cart-item__prices"},Object(a.createElement)(m.a,{currency:ee,regularPrice:q(ce,ee),price:q(ae,ee),format:pe})),Object(a.createElement)(S,{currency:ee,saleAmount:q(re,ee),format:de}),Object(a.createElement)(x.a,{shortDescription:I,fullDescription:R,itemData:$,variation:V}),Object(a.createElement)("div",{className:"wc-block-cart-item__quantity"},!M&&!!F.editable&&Object(a.createElement)(u,{disabled:J,quantity:B,minimum:F.minimum,maximum:F.maximum,step:F.multiple_of,onChange:t=>{W(t),z("cart-set-item-quantity",{product:e,quantity:t})},itemName:te}),Oe&&Object(a.createElement)("button",{className:"wc-block-cart-item__remove-link","aria-label":Object(l.sprintf)(/* translators: %s refers to the item's name in the cart. */
Object(l.__)("Remove %s from cart","woocommerce"),te),onClick:()=>{t(),Y(),z("cart-remove-item",{product:e,quantity:B}),Object(o.speak)(Object(l.sprintf)(/* translators: %s refers to the item name in the cart. */
Object(l.__)("%s has been removed from your cart.","woocommerce"),te))},disabled:J},Object(l.__)("Remove item","woocommerce"))))),Object(a.createElement)("td",{className:"wc-block-cart-item__total"},Object(a.createElement)("div",{className:"wc-block-cart-item__total-price-and-sale-badge-wrapper"},Object(a.createElement)(m.a,{currency:le,format:be,price:se.getAmount()}),B>1&&Object(a.createElement)(S,{currency:ee,saleAmount:q(ne,ee),format:de}))))}));c(443);const T=[...Array(3)].map(((_x,e)=>Object(a.createElement)(R,{lineItem:{},key:e}))),A=e=>{const t={};return e.forEach((({key:e})=>{t[e]=Object(a.createRef)()})),t};t.a=({lineItems:e=[],isLoading:t=!1,className:c})=>{const r=Object(a.useRef)(null),o=Object(a.useRef)(A(e));Object(a.useEffect)((()=>{o.current=A(e)}),[e]);const s=e=>()=>{null!=o&&o.current&&e&&o.current[e].current instanceof HTMLElement?o.current[e].current.focus():r.current instanceof HTMLElement&&r.current.focus()},i=t?T:e.map(((t,c)=>{const r=e.length>c+1?e[c+1].key:null;return Object(a.createElement)(R,{key:t.key,lineItem:t,onRemove:s(r),ref:o.current[t.key],tabIndex:-1})}));return Object(a.createElement)("table",{className:n()("wc-block-cart-items",c),ref:r,tabIndex:-1},Object(a.createElement)("thead",null,Object(a.createElement)("tr",{className:"wc-block-cart-items__header"},Object(a.createElement)("th",{className:"wc-block-cart-items__header-image"},Object(a.createElement)("span",null,Object(l.__)("Product","woocommerce"))),Object(a.createElement)("th",{className:"wc-block-cart-items__header-product"},Object(a.createElement)("span",null,Object(l.__)("Details","woocommerce"))),Object(a.createElement)("th",{className:"wc-block-cart-items__header-total"},Object(a.createElement)("span",null,Object(l.__)("Total","woocommerce"))))),Object(a.createElement)("tbody",null,i))}}}]);