index of
/
home
/
thefkyzp
/
hulmvisaadvisor.com
/
wp-content
/
plugins
/
surecart
/
dist
/
File: /home/thefkyzp/hulmvisaadvisor.com/wp-content/plugins/surecart/dist/2865.js
"use strict";(self.webpackChunk_surecart_surecart=self.webpackChunk_surecart_surecart||[]).push([[2865],{6402:function(t,e,n){function i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"polite",e=document.createElement("div");e.id="a11y-speak-".concat(t),e.className="a11y-speak-region",e.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),e.setAttribute("aria-live",t),e.setAttribute("aria-relevant","additions text"),e.setAttribute("aria-atomic","true");var n=document.body;return n&&n.appendChild(e),e}n.d(e,{s:function(){return a}});var r,o="";function a(t,e){!function(){for(var t=document.getElementsByClassName("a11y-speak-region"),e=document.getElementById("a11y-speak-intro-text"),n=0;n<t.length;n++)t[n].textContent="";e&&e.setAttribute("hidden","hidden")}(),t=function(t){return t=t.replace(/<[^<>]+>/g," "),o===t&&(t+=" "),o=t,t}(t);var n=document.getElementById("a11y-speak-intro-text"),i=document.getElementById("a11y-speak-assertive"),r=document.getElementById("a11y-speak-polite");i&&"assertive"===e?i.textContent=t:r&&(r.textContent=t),n&&n.removeAttribute("hidden")}r=function(){var t=document.getElementById("a11y-speak-intro-text"),e=document.getElementById("a11y-speak-assertive"),n=document.getElementById("a11y-speak-polite");null===t&&function(){var t=document.createElement("p");t.id="a11y-speak-intro-text",t.className="a11y-speak-intro-text",t.textContent=wp.i18n.__("Notifications"),t.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),t.setAttribute("hidden","hidden");var e=document.body;e&&e.appendChild(t)}(),null===e&&i("assertive"),null===n&&i("polite")},"undefined"!=typeof document&&("complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",r):r())},4493:function(t,e,n){function i(){return"rtl"===document.dir}n.d(e,{i:function(){return i}})},2865:function(t,e,n){n.r(e),n.d(e,{sc_dropdown:function(){return bt},sc_menu:function(){return yt},sc_menu_item:function(){return xt}});var i=n(3029),r=n(2901),o=n(9394),a=n(45),s=n(2284),c=n(4467),l=n(467),u=n(9280),f=n.n(u),d=n(1346),h=n(6402),p=n(4493),m=["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","flipAlignment"],v=["mainAxis","crossAxis","limiter"],g=["apply"];function b(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function y(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?b(Object(n),!0).forEach((function(e){(0,c.A)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function x(t){return t.split("-")[0]}function w(t){return t.split("-")[1]}function k(t){return["top","bottom"].includes(x(t))?"x":"y"}function A(t){return"y"===t?"height":"width"}function _(t,e,n){var i,r=t.reference,o=t.floating,a=r.x+r.width/2-o.width/2,s=r.y+r.height/2-o.height/2,c=k(e),l=A(c),u=r[l]/2-o[l]/2,f="x"===c;switch(x(e)){case"top":i={x:a,y:r.y-o.height};break;case"bottom":i={x:a,y:r.y+r.height};break;case"right":i={x:r.x+r.width,y:s};break;case"left":i={x:r.x-o.width,y:s};break;default:i={x:r.x,y:r.y}}switch(w(e)){case"start":i[c]-=u*(n&&f?-1:1);break;case"end":i[c]+=u*(n&&f?-1:1)}return i}var C=function(){var t=(0,l.A)(f().mark((function t(e,n,i){var r,o,a,l,u,d,h,p,m,v,g,b,x,w,k,A,C,E,O,R,L,P,D,S,T;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=i.placement,o=void 0===r?"bottom":r,a=i.strategy,l=void 0===a?"absolute":a,u=i.middleware,d=void 0===u?[]:u,h=i.platform,t.next=3,null==h.isRTL?void 0:h.isRTL(n);case 3:return p=t.sent,t.next=6,h.getElementRects({reference:e,floating:n,strategy:l});case 6:m=t.sent,v=_(m,o,p),g=v.x,b=v.y,x=o,w={},k=0,A=0;case 12:if(!(A<d.length)){t.next=45;break}return C=d[A],E=C.name,O=C.fn,t.next=16,O({x:g,y:b,initialPlacement:o,placement:x,strategy:l,middlewareData:w,rects:m,platform:h,elements:{reference:e,floating:n}});case 16:if(R=t.sent,L=R.x,P=R.y,D=R.data,S=R.reset,g=null!=L?L:g,b=null!=P?P:b,w=y(y({},w),{},(0,c.A)({},E,y(y({},w[E]),D))),!(S&&k<=50)){t.next=42;break}if(k++,"object"!==(0,s.A)(S)){t.next=40;break}if(S.placement&&(x=S.placement),!S.rects){t.next=37;break}if(!0!==S.rects){t.next=35;break}return t.next=32,h.getElementRects({reference:e,floating:n,strategy:l});case 32:t.t0=t.sent,t.next=36;break;case 35:t.t0=S.rects;case 36:m=t.t0;case 37:T=_(m,x,p),g=T.x,b=T.y;case 40:return A=-1,t.abrupt("continue",42);case 42:A++,t.next=12;break;case 45:return t.abrupt("return",{x:g,y:b,placement:x,strategy:l,middlewareData:w});case 46:case"end":return t.stop()}}),t)})));return function(_x,e,n){return t.apply(this,arguments)}}();function E(t){return y(y({},t),{},{top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height})}function O(t,e){return R.apply(this,arguments)}function R(){return R=(0,l.A)(f().mark((function t(e,n){var i,r,o,a,s,c,l,u,d,h,p,m,v,g,b,x,w,k,A,_,C,O;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===n&&(n={}),r=e.x,o=e.y,a=e.platform,s=e.rects,c=e.elements,l=e.strategy,d=(u=n).boundary,h=void 0===d?"clippingAncestors":d,p=u.rootBoundary,m=void 0===p?"viewport":p,v=u.elementContext,g=void 0===v?"floating":v,b=u.altBoundary,x=void 0!==b&&b,w=u.padding,k="number"!=typeof(f=void 0===w?0:w)?function(t){return y({top:0,right:0,bottom:0,left:0},t)}(f):{top:f,right:f,bottom:f,left:f},A="floating"===g?"reference":"floating",_=c[x?A:g],t.t0=E,t.t1=a,t.next=10,null==a.isElement?void 0:a.isElement(_);case 10:if(t.t2=i=t.sent,null==t.t2){t.next=15;break}t.t3=i,t.next=16;break;case 15:t.t3=!0;case 16:if(!t.t3){t.next=20;break}t.t4=_,t.next=26;break;case 20:if(t.t5=_.contextElement,t.t5){t.next=25;break}return t.next=24,null==a.getDocumentElement?void 0:a.getDocumentElement(c.floating);case 24:t.t5=t.sent;case 25:t.t4=t.t5;case 26:return t.t6=t.t4,t.t7=h,t.t8=m,t.t9=l,t.t10={element:t.t6,boundary:t.t7,rootBoundary:t.t8,strategy:t.t9},t.next=33,t.t1.getClippingRect.call(t.t1,t.t10);case 33:if(t.t11=t.sent,C=(0,t.t0)(t.t11),t.t12=E,!a.convertOffsetParentRelativeRectToViewportRelativeRect){t.next=49;break}return t.t14=a,t.t15="floating"===g?y(y({},s.floating),{},{x:r,y:o}):s.reference,t.next=41,null==a.getOffsetParent?void 0:a.getOffsetParent(c.floating);case 41:return t.t16=t.sent,t.t17=l,t.t18={rect:t.t15,offsetParent:t.t16,strategy:t.t17},t.next=46,t.t14.convertOffsetParentRelativeRectToViewportRelativeRect.call(t.t14,t.t18);case 46:t.t13=t.sent,t.next=50;break;case 49:t.t13=s[g];case 50:return t.t19=t.t13,O=(0,t.t12)(t.t19),t.abrupt("return",{top:C.top-O.top+k.top,bottom:O.bottom-C.bottom+k.bottom,left:C.left-O.left+k.left,right:O.right-C.right+k.right});case 53:case"end":return t.stop()}var f}),t)}))),R.apply(this,arguments)}var L=Math.min,P=Math.max;function D(t,e,n){return P(t,L(e,n))}var S={left:"right",right:"left",bottom:"top",top:"bottom"};function T(t){return t.replace(/left|right|bottom|top/g,(function(t){return S[t]}))}function H(t,e,n){void 0===n&&(n=!1);var i=w(t),r=k(t),o=A(r),a="x"===r?i===(n?"end":"start")?"right":"left":"start"===i?"bottom":"top";return e.reference[o]>e.floating[o]&&(a=T(a)),{main:a,cross:T(a)}}var I={start:"end",end:"start"};function B(t){return t.replace(/start|end/g,(function(t){return I[t]}))}function j(t){var e=T(t);return[B(t),e,B(e)]}function W(t,e){return F.apply(this,arguments)}function F(){return F=(0,l.A)(f().mark((function t(e,n){var i,r,o,a,s,c,l,u,d,h,p,m,v,g;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=e.placement,r=e.platform,o=e.elements,t.next=3,null==r.isRTL?void 0:r.isRTL(o.floating);case 3:return a=t.sent,s=x(i),c=w(i),l="x"===k(i),u=["left","top"].includes(s)?-1:1,d=a&&l?-1:1,h="function"==typeof n?n(e):n,p="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:y({mainAxis:0,crossAxis:0,alignmentAxis:null},h),m=p.mainAxis,v=p.crossAxis,g=p.alignmentAxis,c&&"number"==typeof g&&(v="end"===c?-1*g:g),t.abrupt("return",l?{x:v*d,y:m*u}:{x:m*u,y:v*d});case 13:case"end":return t.stop()}}),t)}))),F.apply(this,arguments)}var z=function(t){return void 0===t&&(t={}),{name:"shift",options:t,fn:function(e){return(0,l.A)(f().mark((function n(){var i,r,o,s,l,u,d,h,p,m,g,b,w,A,_,C,E,R,L,P,S,T,H,I;return f().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=e.x,r=e.y,o=e.placement,l=(s=t).mainAxis,u=void 0===l||l,d=s.crossAxis,h=void 0!==d&&d,p=s.limiter,m=void 0===p?{fn:function(t){return{x:t.x,y:t.y}}}:p,g=(0,a.A)(s,v),b={x:i,y:r},n.next=5,O(e,g);case 5:return w=n.sent,A=k(x(o)),_="x"===A?"y":"x",C=b[A],E=b[_],u&&(R="y"===A?"bottom":"right",L=C+w["y"===A?"top":"left"],P=C-w[R],C=D(L,C,P)),h&&(S="y"===_?"bottom":"right",T=E+w["y"===_?"top":"left"],H=E-w[S],E=D(T,E,H)),I=m.fn(y(y({},e),{},(0,c.A)((0,c.A)({},A,C),_,E))),n.abrupt("return",y(y({},I),{},{data:{x:I.x-i,y:I.y-r}}));case 14:case"end":return n.stop()}}),n)})))()}}},M=function(t){return void 0===t&&(t={}),{name:"size",options:t,fn:function(e){return(0,l.A)(f().mark((function n(){var i,r,o,s,c,l,u,d,h,p,m,v,b,k,A,_,C,E,R;return f().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=e.placement,r=e.rects,o=e.platform,s=e.elements,l=(c=t).apply,u=(0,a.A)(c,g),n.next=4,O(e,u);case 4:if(d=n.sent,h=x(i),p=w(i),"top"!==h&&"bottom"!==h){n.next=26;break}return m=h,n.t0=p,n.next=12,null==o.isRTL?void 0:o.isRTL(s.floating);case 12:if(!n.sent){n.next=16;break}n.t1="start",n.next=17;break;case 16:n.t1="end";case 17:if(n.t2=n.t1,n.t0!==n.t2){n.next=22;break}n.t3="left",n.next=23;break;case 22:n.t3="right";case 23:v=n.t3,n.next=28;break;case 26:v=h,m="end"===p?"top":"bottom";case 28:return b=P(d.left,0),k=P(d.right,0),A=P(d.top,0),_=P(d.bottom,0),C={availableHeight:r.floating.height-(["left","right"].includes(i)?2*(0!==A||0!==_?A+_:P(d.top,d.bottom)):d[m]),availableWidth:r.floating.width-(["top","bottom"].includes(i)?2*(0!==b||0!==k?b+k:P(d.left,d.right)):d[v])},n.next=35,o.getDimensions(s.floating);case 35:return E=n.sent,null==l||l(y(y({},e),C)),n.next=39,o.getDimensions(s.floating);case 39:if(R=n.sent,E.width===R.width&&E.height===R.height){n.next=42;break}return n.abrupt("return",{reset:{rects:!0}});case 42:return n.abrupt("return",{});case 43:case"end":return n.stop()}}),n)})))()}}};function N(t){return t&&t.document&&t.location&&t.alert&&t.setInterval}function V(t){if(null==t)return window;if(!N(t)){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function K(t){return V(t).getComputedStyle(t)}function q(t){return N(t)?"":t?(t.nodeName||"").toLowerCase():""}function U(){var t=navigator.userAgentData;return null!=t&&t.brands?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function X(t){return t instanceof V(t).HTMLElement}function Y(t){return t instanceof V(t).Element}function G(t){return"undefined"!=typeof ShadowRoot&&(t instanceof V(t).ShadowRoot||t instanceof ShadowRoot)}function J(t){var e=K(t),n=e.overflow,i=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+i)}function Q(t){return["table","td","th"].includes(q(t))}function Z(t){var e=/firefox/i.test(U()),n=K(t);return"none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||["transform","perspective"].includes(n.willChange)||e&&"filter"===n.willChange||e&&!!n.filter&&"none"!==n.filter}function $(){return!/^((?!chrome|android).)*safari/i.test(U())}var tt=Math.min,et=Math.max,nt=Math.round;function it(t,e,n){var i,r,o,a;void 0===e&&(e=!1),void 0===n&&(n=!1);var s=t.getBoundingClientRect(),c=1,l=1;e&&X(t)&&(c=t.offsetWidth>0&&nt(s.width)/t.offsetWidth||1,l=t.offsetHeight>0&&nt(s.height)/t.offsetHeight||1);var u=Y(t)?V(t):window,f=!$()&&n,d=(s.left+(f&&null!=(i=null==(r=u.visualViewport)?void 0:r.offsetLeft)?i:0))/c,h=(s.top+(f&&null!=(o=null==(a=u.visualViewport)?void 0:a.offsetTop)?o:0))/l,p=s.width/c,m=s.height/l;return{width:p,height:m,top:h,right:d+p,bottom:h+m,left:d,x:d,y:h}}function rt(t){return(e=t,(e instanceof V(e).Node?t.ownerDocument:t.document)||window.document).documentElement;var e}function ot(t){return Y(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function at(t){return it(rt(t)).left+ot(t).scrollLeft}function st(t,e,n){var i=X(e),r=rt(e),o=it(t,i&&function(t){var e=it(t);return nt(e.width)!==t.offsetWidth||nt(e.height)!==t.offsetHeight}(e),"fixed"===n),a={scrollLeft:0,scrollTop:0},s={x:0,y:0};if(i||!i&&"fixed"!==n)if(("body"!==q(e)||J(r))&&(a=ot(e)),X(e)){var c=it(e,!0);s.x=c.x+e.clientLeft,s.y=c.y+e.clientTop}else r&&(s.x=at(r));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function ct(t){return"html"===q(t)?t:t.assignedSlot||t.parentNode||(G(t)?t.host:null)||rt(t)}function lt(t){return X(t)&&"fixed"!==getComputedStyle(t).position?t.offsetParent:null}function ut(t){for(var e=V(t),n=lt(t);n&&Q(n)&&"static"===getComputedStyle(n).position;)n=lt(n);return n&&("html"===q(n)||"body"===q(n)&&"static"===getComputedStyle(n).position&&!Z(n))?e:n||function(t){var e=ct(t);for(G(e)&&(e=e.host);X(e)&&!["html","body"].includes(q(e));){if(Z(e))return e;e=e.parentNode}return null}(t)||e}function ft(t){if(X(t))return{width:t.offsetWidth,height:t.offsetHeight};var e=it(t);return{width:e.width,height:e.height}}function dt(t){var e=ct(t);return["html","body","#document"].includes(q(e))?t.ownerDocument.body:X(e)&&J(e)?e:dt(e)}function ht(t,e){var n;void 0===e&&(e=[]);var i=dt(t),r=i===(null==(n=t.ownerDocument)?void 0:n.body),o=V(i),a=r?[o].concat(o.visualViewport||[],J(i)?i:[]):i,s=e.concat(a);return r?s:s.concat(ht(a))}function pt(t,e,n){return"viewport"===e?E(function(t,e){var n=V(t),i=rt(t),r=n.visualViewport,o=i.clientWidth,a=i.clientHeight,s=0,c=0;if(r){o=r.width,a=r.height;var l=$();(l||!l&&"fixed"===e)&&(s=r.offsetLeft,c=r.offsetTop)}return{width:o,height:a,x:s,y:c}}(t,n)):Y(e)?function(t,e){var n=it(t,!1,"fixed"===e),i=n.top+t.clientTop,r=n.left+t.clientLeft;return{top:i,left:r,x:r,y:i,right:r+t.clientWidth,bottom:i+t.clientHeight,width:t.clientWidth,height:t.clientHeight}}(e,n):E(function(t){var e,n=rt(t),i=ot(t),r=null==(e=t.ownerDocument)?void 0:e.body,o=et(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=et(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),s=-i.scrollLeft+at(t),c=-i.scrollTop;return"rtl"===K(r||n).direction&&(s+=et(n.clientWidth,r?r.clientWidth:0)-o),{width:o,height:a,x:s,y:c}}(rt(t)))}var mt={getClippingRect:function(t){var e=t.element,n=t.boundary,i=t.rootBoundary,r=t.strategy,a="clippingAncestors"===n?function(t){var e=ht(t),n=["absolute","fixed"].includes(K(t).position)&&X(t)?ut(t):t;return Y(n)?e.filter((function(t){return Y(t)&&function(t,e){var n=null==e.getRootNode?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&G(n)){var i=e;do{if(i&&t===i)return!0;i=i.parentNode||i.host}while(i)}return!1}(t,n)&&"body"!==q(t)})):[]}(e):[].concat(n),s=[].concat((0,o.A)(a),[i]),c=s[0],l=s.reduce((function(t,n){var i=pt(e,n,r);return t.top=et(i.top,t.top),t.right=tt(i.right,t.right),t.bottom=tt(i.bottom,t.bottom),t.left=et(i.left,t.left),t}),pt(e,c,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){var e=t.rect,n=t.offsetParent,i=t.strategy,r=X(n),o=rt(n);if(n===o)return e;var a={scrollLeft:0,scrollTop:0},s={x:0,y:0};if((r||!r&&"fixed"!==i)&&(("body"!==q(n)||J(o))&&(a=ot(n)),X(n))){var c=it(n,!0);s.x=c.x+n.clientLeft,s.y=c.y+n.clientTop}return y(y({},e),{},{x:e.x-a.scrollLeft+s.x,y:e.y-a.scrollTop+s.y})},isElement:Y,getDimensions:ft,getOffsetParent:ut,getDocumentElement:rt,getElementRects:function(t){var e=t.reference,n=t.floating,i=t.strategy;return{reference:st(e,ut(n),i),floating:y(y({},ft(n)),{},{x:0,y:0})}},getClientRects:function(t){return Array.from(t.getClientRects())},isRTL:function(t){return"rtl"===K(t).direction}},vt=0,gt="",bt=function(){return(0,r.A)((function t(e){(0,i.A)(this,t),(0,d.r)(this,e),this.scShow=(0,d.c)(this,"scShow",7),this.scHide=(0,d.c)(this,"scHide",7),this.clickEl=void 0,this.disabled=void 0,this.open=!1,this.position=void 0,this.placement="bottom-start",this.distance=10,this.skidding=0,this.hoist=!1,this.closeOnSelect=!0,this.isVisible=void 0}),[{key:"handleOpenChange",value:function(){this.open?this.show():this.hide()}},{key:"handleOutsideClick",value:function(t){var e=this;t.composedPath().some((function(t){return t===e.el}))||(this.open=!1)}},{key:"startPositioner",value:function(){this.stopPositioner(),this.updatePositioner(),this.positionerCleanup=function(t,e,n,i){void 0===i&&(i={});var r=i,a=r.ancestorScroll,s=void 0===a||a,c=r.ancestorResize,l=void 0===c||c,u=r.elementResize,f=void 0===u||u,d=r.animationFrame,h=void 0!==d&&d,p=s&&!h,m=l&&!h,v=p||m?[].concat((0,o.A)(Y(t)?ht(t):[]),(0,o.A)(ht(e))):[];v.forEach((function(t){p&&t.addEventListener("scroll",n,{passive:!0}),m&&t.addEventListener("resize",n)}));var g,b=null;if(f){var y=!0;b=new ResizeObserver((function(){y||n(),y=!1})),Y(t)&&!h&&b.observe(t),b.observe(e)}var x=h?it(t):null;return h&&function e(){var i=it(t);!x||i.x===x.x&&i.y===x.y&&i.width===x.width&&i.height===x.height||n(),x=i,g=requestAnimationFrame(e)}(),n(),function(){var t;v.forEach((function(t){p&&t.removeEventListener("scroll",n),m&&t.removeEventListener("resize",n)})),null==(t=b)||t.disconnect(),b=null,h&&cancelAnimationFrame(g)}}(this.trigger,this.positioner,this.updatePositioner.bind(this))}},{key:"updatePositioner",value:function(){var t,e,n=this;this.open&&this.trigger&&this.positioner&&function(t,e,n){return C(t,e,y({platform:mt},n))}(this.trigger,this.positioner,{placement:this.placement,middleware:[(e={mainAxis:this.distance,crossAxis:this.skidding},void 0===e&&(e=0),{name:"offset",options:e,fn:function(t){return(0,l.A)(f().mark((function n(){var i,r,o;return f().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=t.x,r=t.y,n.next=3,W(t,e);case 3:return o=n.sent,n.abrupt("return",{x:i+o.x,y:r+o.y,data:o});case 5:case"end":return n.stop()}}),n)})))()}}),(void 0===t&&(t={}),{name:"flip",options:t,fn:function(e){return(0,l.A)(f().mark((function n(){var i,r,s,c,l,u,d,h,p,v,g,b,y,w,k,A,_,C,E,R,L,P,D,S,I,B,W,F,z,M,N,V,K,q,U;return f().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=e.placement,s=e.middlewareData,c=e.rects,l=e.initialPlacement,u=e.platform,d=e.elements,p=(h=t).mainAxis,v=void 0===p||p,g=h.crossAxis,b=void 0===g||g,y=h.fallbackPlacements,w=h.fallbackStrategy,k=void 0===w?"bestFit":w,A=h.flipAlignment,_=void 0===A||A,C=(0,a.A)(h,m),E=x(r),R=E===l,L=y||(R||!_?[T(l)]:j(l)),P=[l].concat((0,o.A)(L)),n.next=8,O(e,C);case 8:if(D=n.sent,S=[],I=(null==(i=s.flip)?void 0:i.overflows)||[],v&&S.push(D[E]),!b){n.next=23;break}return n.t0=H,n.t1=r,n.t2=c,n.next=18,null==u.isRTL?void 0:u.isRTL(d.floating);case 18:n.t3=n.sent,B=(0,n.t0)(n.t1,n.t2,n.t3),W=B.main,F=B.cross,S.push(D[W],D[F]);case 23:if(I=[].concat((0,o.A)(I),[{placement:r,overflows:S}]),S.every((function(t){return t<=0}))){n.next=40;break}if(N=(null!=(z=null==(M=s.flip)?void 0:M.index)?z:0)+1,!(V=P[N])){n.next=29;break}return n.abrupt("return",{data:{index:N,overflows:I},reset:{placement:V}});case 29:K="bottom",n.t4=k,n.next="bestFit"===n.t4?33:"initialPlacement"===n.t4?36:38;break;case 33:return U=null==(q=I.map((function(t){return[t,t.overflows.filter((function(t){return t>0})).reduce((function(t,e){return t+e}),0)]})).sort((function(t,e){return t[1]-e[1]}))[0])?void 0:q[0].placement,U&&(K=U),n.abrupt("break",38);case 36:return K=l,n.abrupt("break",38);case 38:if(r===K){n.next=40;break}return n.abrupt("return",{reset:{placement:K}});case 40:return n.abrupt("return",{});case 41:case"end":return n.stop()}}),n)})))()}}),z(),M({apply:function(t){var e=t.availableWidth,i=t.availableHeight;Object.assign(n.panel.style,{maxWidth:"".concat(e,"px"),maxHeight:"".concat(i,"px")})},padding:8})],strategy:this.hoist?"fixed":"absolute"}).then((function(t){var e=t.x,i=t.y,r=t.placement;n.positioner.setAttribute("data-placement",r),Object.assign(n.positioner.style,{position:n.hoist?"fixed":"absolute",left:"".concat(e,"px"),top:"".concat(i,"px"),right:"auto"})}))}},{key:"stopPositioner",value:function(){this.positionerCleanup&&(this.positionerCleanup(),this.positionerCleanup=void 0,this.positioner.removeAttribute("data-placement"))}},{key:"show",value:function(){(0,h.s)(wp.i18n.__("Menu Selection Dropdown opened. Press Up/Down arrow to toggle between menu items.","surecart"),"assertive"),this.scShow.emit(),this.isVisible||(this.isVisible=!0,this.open=!0,this.startPositioner(),this.panel.focus())}},{key:"hide",value:function(){(0,h.s)(wp.i18n.__("Menu Selection Dropdown closed.","surecart"),"assertive"),this.scHide.emit(),this.isVisible&&(this.stopPositioner(),this.isVisible=!1,this.open=!1,this.el.shadowRoot.querySelector('slot[name="trigger"]').assignedElements({flatten:!0})[0].focus())}},{key:"handleClick",value:function(t){this.closeOnSelect&&t.composedPath().some((function(t){return t.classList&&t.classList.contains("menu-item")}))&&(this.open=!1)}},{key:"componentWillLoad",value:function(){var t=this;document.addEventListener("mousedown",(function(e){return t.handleOutsideClick(e)}))}},{key:"getMenu",value:function(){return this.el.shadowRoot.querySelector("slot").assignedNodes().find((function(t){return"sc-menu"===t.nodeName}))}},{key:"getItems",value:function(){return(0,o.A)(this.el.querySelectorAll("sc-menu-item"))}},{key:"handleHide",value:function(){this.open=!1,vt=0,this.trigger.focus()}},{key:"handleKeyDown",value:function(t){var e=this.getItems();if("Tab"!==t.key){if(["ArrowDown","ArrowUp"].includes(t.key)){if(t.preventDefault(),t.stopImmediatePropagation(),this.open||(this.open=!0),"ArrowDown"===t.key)return"up"==gt&&(vt+=2),vt>e.length-1&&(vt=0),e[vt].setFocus(),gt="down",void vt++;if("ArrowUp"===t.key)return"down"==gt&&(vt-=2),vt<0&&(vt=e.length-1),e[vt].setFocus(),gt="up",void vt--}"Escape"!==t.key?("Enter"===t.key&&(this.open?this.handleHide():(t.stopImmediatePropagation(),t.preventDefault(),this.open=!0)),!t.ctrlKey&&t.metaKey):this.open&&this.handleHide()}else this.open&&this.handleHide()}},{key:"render",value:function(){var t=this;return(0,d.h)("div",{key:"4d4f73d8930ae8922dacb0f8fdea1d3746903520",part:"base",class:{dropdown:!0,"dropdown--open":this.open,"dropdown--disabled":this.disabled}},(0,d.h)("span",{key:"ad07055e901850e9b664b6b0a514c0da686ce3ba",part:"trigger",class:"dropdown__trigger",ref:function(e){return t.trigger=e},onClick:function(){t.disabled||(t.open?t.hide():setTimeout((function(){t.show()}),0))},"aria-expanded":this.open?"true":"false","aria-haspopup":"true"},(0,d.h)("slot",{key:"7e59c61b4a16f5e5dff67d34b3bfba43b5de9944",name:"trigger"})),(0,d.h)("div",{key:"cfb0c9b891472df7d76635cbaf2516af484d85f9",class:"dropdown__positioner",ref:function(e){return t.positioner=e}},(0,d.h)("div",{key:"c088a832441e2f843b764da7fb916c747875cb0c",part:"panel",class:{dropdown__panel:!0,"position--top-left":"top-left"===this.position,"position--top-right":"top-right"===this.position,"position--bottom-left":"bottom-left"===this.position,"position--bottom-right":"bottom-right"===this.position},"aria-orientation":"vertical",tabindex:"-1",onClick:function(e){return t.handleClick(e)},ref:function(e){return t.panel=e}},(0,d.h)("slot",{key:"3b60d5ced9a27357d9f7b7f4b31e8ec8b8e9dbb5"}))))}},{key:"el",get:function(){return(0,d.a)(this)}}],[{key:"watchers",get:function(){return{open:["handleOpenChange"]}}}])}();bt.style=":host{display:inline-block;--panel-height:75vh;--panel-width:11rem}.dropdown{position:relative}.dropdown.dropdown--open .dropdown__positioner{visibility:visible;opacity:1;transform:scale(1)}.dropdown__trigger{display:block;cursor:pointer;border-width:0;outline:none;background-color:unset}.dropdown--disabled,.dropdown--disabled .dropdown__trigger{cursor:not-allowed}.dropdown__positioner{position:absolute;right:0;width:100%;z-index:var(--sc-z-index-dropdown);opacity:0;visibility:hidden;transform:scale(0.9);min-width:var(--panel-width)}.dropdown__panel{transform-origin:top left;box-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);max-height:var(--panel-height);font-family:var(--sc-font-sans);font-size:var(--sc-font-size-medium);font-weight:var(--sc-font-weight-normal);color:var(--color);background-color:var(--sc-panel-background-color);border:solid 1px var(--sc-panel-border-color);border-radius:var(--sc-border-radius-medium);box-shadow:var(--sc-shadow-large);overflow:auto;overscroll-behavior:none;transition:var(--sc-transition-fast) opacity, var(--sc-transition-fast) transform;z-index:5}";var yt=function(){return(0,r.A)((function t(e){(0,i.A)(this,t),(0,d.r)(this,e),this.scSelect=(0,d.c)(this,"scSelect",7),this.items=[],this.ariaLabel=void 0}),[{key:"handleClick",value:function(t){var e=t.target.closest("sc-menu-item");e&&!e.disabled&&this.scSelect.emit({item:e})}},{key:"handleKeyDown",value:function(t){if("Enter"===t.key){var e=this.getCurrentItem();t.preventDefault(),e&&this.scSelect.emit({item:e}),(0,h.s)(wp.i18n.sprintf(wp.i18n.__("Menu %s selected","surecart"),e.textContent),"assertive")}if(" "===t.key&&t.preventDefault(),["ArrowDown","ArrowUp","Home","End"].includes(t.key)){var n=this.getCurrentItem(),i=n?this.items.indexOf(n):0;if(this.items.length)return t.preventDefault(),"ArrowDown"===t.key?i++:"ArrowUp"===t.key?i--:"Home"===t.key?i=0:"End"===t.key&&(i=this.items.length-1),i<0&&(i=0),i>this.items.length-1&&(i=this.items.length-1),void this.setCurrentItem(this.items[i])}}},{key:"getCurrentItem",value:function(){return this.items.find((function(t){return"0"===t.getAttribute("tabindex")}))}},{key:"setCurrentItem",value:(t=(0,l.A)(f().mark((function t(e){var n;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.disabled?this.items[0]:e,this.items.forEach((function(t){t.setAttribute("tabindex",t===n?"0":"-1")}));case 2:case"end":return t.stop()}}),t,this)}))),function(e){return t.apply(this,arguments)})},{key:"syncItems",value:function(){var t=this.el.shadowRoot.querySelector("slot").assignedElements({flatten:!0});this.items=t.filter((function(t){return"sc-menu-item"===t.nodeName}))}},{key:"handleSlotChange",value:function(){this.syncItems()}},{key:"render",value:function(){var t=this;return(0,d.h)("div",{key:"bd4ad225a5e862568cefdb2402203e7a3b581d8f",part:"base",class:"menu",tabindex:"0",onKeyDown:function(e){return t.handleKeyDown(e)}},(0,d.h)("slot",{key:"84d0106d7b13e300e72a78482d4882830fd674da",onSlotchange:function(){return t.handleSlotChange()}}))}},{key:"el",get:function(){return(0,d.a)(this)}}]);var t}();yt.style=":host{display:block}.menu{padding:var(--sc-spacing-x-small) 0}.menu:focus{outline:none}::slotted(sc-input){margin-top:-var(--sc-spacing-x-small)}::slotted(sc-divider){--spacing:var(--sc-spacing-x-small)}";var xt=function(){return(0,r.A)((function t(e){(0,i.A)(this,t),(0,d.r)(this,e),this.hasFocus=!1,this.href=void 0,this.target=void 0,this.checked=!1,this.value="",this.disabled=!1}),[{key:"setFocus",value:(e=(0,l.A)(f().mark((function t(e){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.menuItem.focus(e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})},{key:"setBlur",value:(t=(0,l.A)(f().mark((function t(){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.menuItem.blur();case 1:case"end":return t.stop()}}),t,this)}))),function(){return t.apply(this,arguments)})},{key:"handleBlur",value:function(){this.hasFocus=!1}},{key:"handleFocus",value:function(){this.hasFocus=!0}},{key:"render",value:function(){var t=this,e=this.href?"a":"div";return(0,d.h)(e,{key:"4775f79153017daf5c682d84a89339b1994184f8",ref:function(e){return t.menuItem=e},part:"base",class:{"menu-item":!0,"menu-item--checked":this.checked,"menu-item--disabled":this.disabled,"menu-item--focused":this.hasFocus,"menu-item--is-rtl":(0,p.i)()},href:this.href,role:"menuitem","aria-disabled":this.disabled?"true":"false","aria-checked":this.checked?"true":"false",tabindex:this.disabled?void 0:"0",onFocus:function(){return t.handleFocus()},onBlur:function(){return t.handleBlur()},onMouseEnter:function(){return t.handleFocus()},onMouseLeave:function(){return t.handleBlur()},onKeyDown:function(e){" "!==e.key&&"Spacebar"!==e.key&&"Enter"!==e.key||t.menuItem.click()},"aria-label":this.el.innerText,target:this.target},(0,d.h)("span",{key:"8a98b7a3315939c413d98caa15d837676862783d",part:"checked-icon",class:"menu-item__check"},(0,d.h)("svg",{key:"52ef6e8d571461cedb1a15610ecd236411de249f",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-check",viewBox:"0 0 16 16"},(0,d.h)("path",{key:"a045207ac08d903a39046248325a7a220c1bbb51",d:"M10.97 4.97a.75.75 0 0 1 1.07 1.05l-3.99 4.99a.75.75 0 0 1-1.08.02L4.324 8.384a.75.75 0 1 1 1.06-1.06l2.094 2.093 3.473-4.425a.267.267 0 0 1 .02-.022z"}))),(0,d.h)("span",{key:"99f47c4e9f258924aa65d6fc5a4b594ae91aecb2",part:"prefix",class:"menu-item__prefix"},(0,d.h)("slot",{key:"2e863c48ea8cfa839642c7dba83e0d0c6dc0d5c9",name:"prefix"})),(0,d.h)("span",{key:"23852a38244206f20e235ff6fb5574c8cc3e36f5",part:"label",class:"menu-item__label"},(0,d.h)("slot",{key:"75014cb67852de1096f1bf22f4db0c26c611668a"})),(0,d.h)("span",{key:"ccc147ef2cac980093ebf9b570d37b2fc5a74185",part:"suffix",class:"menu-item__suffix"},(0,d.h)("slot",{key:"30dff090876a3dcbfd726c039bc99c4cfadf8ddf",name:"suffix"})))}},{key:"el",get:function(){return(0,d.a)(this)}}]);var t,e}();xt.style=":host{display:block}.menu-item{position:relative;display:flex;align-items:stretch;font-family:var(--sc-font-sans);font-size:var(--sc-font-size-medium);font-weight:var(--sc-font-weight-normal);line-height:var(--sc-menu-item-line-height, var(--sc-line-height-normal));letter-spacing:var(--sc-letter-spacing-normal);text-align:left;color:var(--sc-menu-item-color, var(--sc-color-gray-700));padding:var(--sc-spacing-xx-small) var(--sc-spacing-x-large);transition:var(--sc-input-transition, var(--sc-transition-medium)) fill, var(--sc-input-transition, var(--sc-transition-medium)) background-color;user-select:none;white-space:var(--sc-menu-item-white-space, nowrap);cursor:pointer;text-decoration:none}.menu-item.menu-item--focused:not(.menu-item--disabled){outline:none;background-color:var(--sc-menu-item-background-focused, var(--sc-color-primary-500));color:var(--sc-color-white)}.menu-item.menu-item--disabled{outline:none;color:var(--sc-color-gray-400);cursor:not-allowed}.menu-item .menu-item__label{flex:1 1 auto}.menu-item .menu-item__prefix{flex:0 0 auto;display:flex;align-items:center}.menu-item .menu-item__prefix ::slotted(*){display:inline-flex;margin-right:var(--sc-spacing-small)}.menu-item .menu-item__suffix{flex:0 0 auto;display:flex;align-items:center}.menu-item .menu-item__suffix ::slotted(*){margin-left:var(--sc-spacing-x-small);text-align:right}.menu-item .menu-item__check{display:flex;position:absolute;left:0.5em;top:0.6em;visibility:hidden;align-items:center;font-size:inherit}.menu-item--checked .menu-item__check{visibility:visible}.menu-item--is-rtl.menu-item{text-align:right}.menu-item--is-rtl.menu-item .menu-item__check{left:auto;right:0.5em}"},45:function(t,e,n){n.d(e,{A:function(){return r}});var i=n(8587);function r(t,e){if(null==t)return{};var n,r,o=(0,i.A)(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)>=0||{}.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}},8587:function(t,e,n){function i(t,e){if(null==t)return{};var n={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.indexOf(i)>=0)continue;n[i]=t[i]}return n}n.d(e,{A:function(){return i}})}}]);