@ordergroove/offers 2.28.0 → 2.28.2-alpha-PR-681-4.1

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/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.28.1](https://github.com/ordergroove/plush-toys/compare/@ordergroove/offers@2.28.0...@ordergroove/offers@2.28.1) (2022-10-10)
7
+
8
+ **Note:** Version bump only for package @ordergroove/offers
9
+
10
+
11
+
12
+
13
+
6
14
  # [2.28.0](https://github.com/ordergroove/plush-toys/compare/@ordergroove/offers@2.27.23...@ordergroove/offers@2.28.0) (2022-10-07)
7
15
 
8
16
 
package/dist/offers.js CHANGED
@@ -107,7 +107,7 @@ var lib=(()=>{var ta=Object.create;var Xe=Object.defineProperty;var ra=Object.ge
107
107
  `}
108
108
  <button ?disabled=${this.disabled} @click="${this.runTests.bind(this)}" class="primary">Run Test</button>
109
109
  </div>
110
- `}};n(Or,"TestWizard");ml=Or});var wu={};Cr(wu,{addOptinChangedCallback:()=>nu,addTemplate:()=>su,autoInit:()=>vu,clear:()=>iu,config:()=>au,default:()=>Ou,disableOptinChangedCallbacks:()=>cu,getOptins:()=>lu,getProductsForPurchasePost:()=>uu,initialize:()=>pu,isReady:()=>ou,offers:()=>x,platform:()=>j,previewMode:()=>du,register:()=>fu,resolveSettings:()=>hu,setAuthUrl:()=>mu,setEnvironment:()=>gu,setLocale:()=>yu,setMerchantId:()=>bu,setPublicPath:()=>_u,setTemplates:()=>Eu,setupCart:()=>xu,setupProduct:()=>Su,setupProducts:()=>Tu,store:()=>Ki});function Pr(t){var e,r=t.Symbol;return typeof r=="function"?r.observable?e=r.observable:(e=r("observable"),r.observable=e):e="@@observable",e}n(Pr,"symbolObservablePonyfill");var Ae;typeof self!="undefined"?Ae=self:typeof window!="undefined"||typeof window!="undefined"?Ae=window:typeof module!="undefined"?Ae=module:Ae=Function("return this")();var aa=Pr(Ae),Rr=aa;var Ar=n(function(){return Math.random().toString(36).substring(7).split("").join(".")},"randomString"),et={INIT:"@@redux/INIT"+Ar(),REPLACE:"@@redux/REPLACE"+Ar(),PROBE_UNKNOWN_ACTION:n(function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Ar()},"PROBE_UNKNOWN_ACTION")};function ca(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}n(ca,"isPlainObject");function Nr(t,e,r){var o;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.");if(typeof e=="function"&&typeof r=="undefined"&&(r=e,e=void 0),typeof r!="undefined"){if(typeof r!="function")throw new Error("Expected the enhancer to be a function.");return r(Nr)(t,e)}if(typeof t!="function")throw new Error("Expected the reducer to be a function.");var s=t,i=e,a=[],c=a,l=!1;function u(){c===a&&(c=a.slice())}n(u,"ensureCanMutateNextListeners");function h(){if(l)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return i}n(h,"getState");function p(f){if(typeof f!="function")throw new Error("Expected the listener to be a function.");if(l)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribelistener for more details.");var E=!0;return u(),c.push(f),n(function(){if(!!E){if(l)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribelistener for more details.");E=!1,u();var b=c.indexOf(f);c.splice(b,1),a=null}},"unsubscribe")}n(p,"subscribe");function m(f){if(!ca(f))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(typeof f.type=="undefined")throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(l)throw new Error("Reducers may not dispatch actions.");try{l=!0,i=s(i,f)}finally{l=!1}for(var E=a=c,w=0;w<E.length;w++){var b=E[w];b()}return f}n(m,"dispatch");function C(f){if(typeof f!="function")throw new Error("Expected the nextReducer to be a function.");s=f,m({type:et.REPLACE})}n(C,"replaceReducer");function _(){var f,E=p;return f={subscribe:n(function(b){if(typeof b!="object"||b===null)throw new TypeError("Expected the observer to be an object.");function g(){b.next&&b.next(h())}n(g,"observeState"),g();var wt=E(g);return{unsubscribe:wt}},"subscribe")},f[Rr]=function(){return this},f}return n(_,"observable"),m({type:et.INIT}),o={dispatch:m,subscribe:p,getState:h,replaceReducer:C},o[Rr]=_,o}n(Nr,"createStore");function la(t,e){var r=e&&e.type,o=r&&'action "'+String(r)+'"'||"an action";return"Given "+o+', reducer "'+t+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}n(la,"getUndefinedStateErrorMessage");function ua(t){Object.keys(t).forEach(function(e){var r=t[e],o=r(void 0,{type:et.INIT});if(typeof o=="undefined")throw new Error('Reducer "'+e+`" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof r(void 0,{type:et.PROBE_UNKNOWN_ACTION()})=="undefined")throw new Error('Reducer "'+e+'" returned undefined when probed with a random type. '+("Don't try to handle "+et.INIT+' or other actions in "redux/*" ')+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.")})}n(ua,"assertReducerShape");function Ct(t){for(var e=Object.keys(t),r={},o=0;o<e.length;o++){var s=e[o];typeof t[s]=="function"&&(r[s]=t[s])}var i=Object.keys(r),a,c;try{ua(r)}catch(l){c=l}return n(function(u,h){if(u===void 0&&(u={}),c)throw c;if(!1)var p;for(var m=!1,C={},_=0;_<i.length;_++){var f=i[_],E=r[f],w=u[f],b=E(w,h);if(typeof b=="undefined"){var g=la(f,h);throw new Error(g)}C[f]=b,m=m||b!==w}return m=m||i.length!==Object.keys(u).length,m?C:u},"combination")}n(Ct,"combineReducers");function pn(t,e){return function(){return e(t.apply(this,arguments))}}n(pn,"bindActionCreator");function dn(t,e){if(typeof t=="function")return pn(t,e);if(typeof t!="object"||t===null)throw new Error("bindActionCreators expected an object or a function, instead received "+(t===null?"null":typeof t)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');var r={};for(var o in t){var s=t[o];typeof s=="function"&&(r[o]=pn(s,e))}return r}n(dn,"bindActionCreators");function pa(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}n(pa,"_defineProperty");function fn(t,e){var r=Object.keys(t);return Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(t)),e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r}n(fn,"ownKeys");function da(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?fn(r,!0).forEach(function(o){pa(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):fn(r).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}n(da,"_objectSpread2");function Ir(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(o){return o}:e.length===1?e[0]:e.reduce(function(o,s){return function(){return o(s.apply(void 0,arguments))}})}n(Ir,"compose");function hn(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(o){return function(){var s=o.apply(void 0,arguments),i=n(function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},"dispatch"),a={getState:s.getState,dispatch:n(function(){return i.apply(void 0,arguments)},"dispatch")},c=e.map(function(l){return l(a)});return i=Ir.apply(void 0,c)(s.dispatch),da({},s,{dispatch:i})}}}n(hn,"applyMiddleware");function mn(t){var e=n(function(o){var s=o.dispatch,i=o.getState;return function(a){return function(c){return typeof c=="function"?c(s,i,t):a(c)}}},"middleware");return e}n(mn,"createThunkMiddleware");var gn=mn();gn.withExtraArgument=mn;var yn=gn;var cs=re(Rt());A();M();var ft="OG_STATE",ls=n(t=>{try{return t===null?void 0:JSON.parse(t)}catch{return}},"safeParseState"),Br=n(()=>window.og&&window.og.previewMode,"isPreviewMode"),us=n(()=>Br()?{}:ls(localStorage.getItem(ft)),"loadState"),fc=n(t=>!t||!t.sessionId?!1:JSON.stringify({sessionId:t.sessionId,optedin:t.optedin,optedout:t.optedout,productOffer:t.productOffer,firstOrderPlaceDate:t.firstOrderPlaceDate,productToSubscribe:t.productToSubscribe}),"serializeState"),ps=n(t=>{if(Br())return;let e=fc(t);e&&localStorage.getItem(ft)!==e&&localStorage.setItem(ft,e)},"saveState"),ds=n(t=>(0,cs.throttle)(500,e=>{if(Br())return;let{key:r,newValue:o}=e;r===ft&&o===null?(t.dispatch({type:oe}),setTimeout(()=>t.dispatch(Zn()),0)):r===ft&&t.dispatch({type:me,newValue:ls(o)})}),"listenLocalStorageChanges");var hs=re(Rt());M();function hc(t,e){return t===e}n(hc,"defaultEqualityCheck");function mc(t,e,r){if(e===null||r===null||e.length!==r.length)return!1;for(var o=e.length,s=0;s<o;s++)if(!t(e[s],r[s]))return!1;return!0}n(mc,"areArgumentsShallowlyEqual");function gc(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:hc,r=null,o=null;return function(){return mc(e,r,arguments)||(o=t.apply(null,arguments)),r=arguments,o}}n(gc,"defaultMemoize");function yc(t){var e=Array.isArray(t[0])?t[0]:t;if(!e.every(function(o){return typeof o=="function"})){var r=e.map(function(o){return typeof o}).join(", ");throw new Error("Selector creators expect all input-selectors to be functions, "+("instead received the following types: ["+r+"]"))}return e}n(yc,"getDependencies");function bc(t){for(var e=arguments.length,r=Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];return function(){for(var s=arguments.length,i=Array(s),a=0;a<s;a++)i[a]=arguments[a];var c=0,l=i.pop(),u=yc(i),h=t.apply(void 0,[function(){return c++,l.apply(null,arguments)}].concat(r)),p=t(function(){for(var m=[],C=u.length,_=0;_<C;_++)m.push(u[_].apply(null,arguments));return h.apply(null,m)});return p.resultFunc=l,p.dependencies=u,p.recomputations=function(){return c},p.resetRecomputations=function(){return c=0},p}}n(bc,"createSelectorCreator");var He=bc(gc);var Se=re(st());ie();ut();U();Se.default.Cache=Map;function _c(t,e){if(t===e)return!0;if(t===null||e===null||t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(t[r]!==e[r])return!1;return!0}n(_c,"arraysEqual");function Ec(t,e,r){let o=lt(r);return j.shopify_selling_plans?Y(t,e,o):o}n(Ec,"resolveFrequency");var N=n((t,e)=>!!(t===e||typeof t=="object"&&typeof e=="object"&&t&&e&&t.id===e.id&&(!(Array.isArray(t.components)&&Array.isArray(e.components))||_c((t.components||[]).sort(),(e.components||[]).sort()))),"isSameProduct"),tr=n(t=>t.optedin||[],"optedinSelector"),fs=n(t=>t.optedout||[],"optedoutSelector"),Gr=n(t=>t.autoshipByDefault||{},"autoshipSelector"),xc=n(t=>t.defaultFrequencies||{},"defaultFrequenciesSelector"),Sc=n(t=>{var e;return((e=t==null?void 0:t.config)==null?void 0:e.frequencies)||[]},"sellingPlansSelector"),Tc=n(t=>{var e;return((e=t==null?void 0:t.config)==null?void 0:e.frequenciesEveryPeriod)||[]},"frequenciesEveryPeriodSelector"),Z=(0,Se.default)(t=>He(tr,fs,Gr,(e,r,o)=>{let s=e.find(i=>N(t,i));return s||(r.find(i=>N(t,i))?!1:t&&o[t.id]?{id:t.id}:!1)}),t=>JSON.stringify(t)),rr=(0,Se.default)(t=>He(tr,e=>{let r=e.find(o=>N(t,o));return r||!1}),t=>JSON.stringify(t)),or=(0,Se.default)(t=>He(fs,e=>e.find(r=>N(t,r))));var J=(0,Se.default)(t=>He(Z(t),e=>e&&e.frequency||null)),Be=(0,Se.default)(t=>He(xc,Sc,Tc,(e,r,o)=>e[R(t)]&&Ec(r,o,e[R(t)])||null)),zr=n(t=>t.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),"kebabCase"),H=n((t,e,r,o)=>({[r]:t.config&&t.config[r]||e&&e.hasAttribute&&e.hasAttribute(zr(r))&&e[r]||e.offer&&typeof(e.offer[r]!=="undefined")&&e.offer[r]||o}),"configSelector"),Ge=n(t=>({templates:t.templates||[]}),"templatesSelector");var vc=n((t,e,r=document)=>r.dispatchEvent(new CustomEvent(t,{detail:e})),"dispatchEvent"),ms=n(t=>({payload:{product:{id:e,components:r}={}}={}}={})=>setTimeout(()=>vc("optin-changed",{productId:e,components:r,optedIn:t}),0),"dispatchOptinChangedEvent"),Oc=[{expressions:[({type:t}={})=>t===q,({type:t}={})=>t===F],fn:ms(!0)},{expressions:[({type:t}={})=>t===k],fn:ms(!1)}],gs=n(t=>e=>r=>{let o=t.getState();Oc.forEach(s=>{s.expressions.some(i=>i(r,o))&&s.fn(r)}),e(r)},"dispatchMiddleware"),ys=n(t=>e=>r=>{var s;let o;switch(r.type){case P:case k:case q:case F:o=new CustomEvent(`og-${r.type.toLowerCase().replace(/_/g,"-")}`,{bubbles:!0,cancelable:!0,detail:r.payload}),(((s=r.payload)==null?void 0:s.offer)||document).dispatchEvent(o);break;default:}(o==null?void 0:o.defaultPrevented)||e(r)},"offerEvents"),bs=n(t=>e=>r=>{e(r);let o=(0,hs.throttle)(500,()=>{ps({...t.getState()})});r.type!==me&&o()},"localStorageMiddleware");A();M();var Wr=n(()=>{let t,e;return[new Promise((r,o)=>{t=r,e=o}),t,e]},"waitFor");function _s(t){let[e,r]=Wr(),[o,s]=Wr(),[i,a]=Wr();o.then(l=>{let{sessionId:u}=t.getState();!u||l&&!u.startsWith(l)?t.dispatch(Mr(l)):a(u)});let c=Promise.all([o,e,i]);return c.then(()=>{var l;window.addEventListener("storage",ds(t)),((l=t.getState().auth)==null?void 0:l.ts)||t.dispatch(Kn())}),l=>async u=>{Fe===u.type||ke===u.type||Ue===u.type?r(u.payload):Ne===u.type?s(u.payload):Ie===u.type?a(u.payload):await c,l(u)}}n(_s,"waitUntilOffersReady");function Es(t,...e){if(window.og&&window.og.store)return window.og.store;let r=window.og&&window.og.previewMode,o=typeof window=="object"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({name:"Ordergroove Offers"}):Ir,s=[_s,yn,gs,ys],i={};if(!r)try{i=us(),s.push(bs)}catch{}let a=o(hn(...s,...e)),c=Nr(t,i,a);return window.og=window.og||{},window.og.store=c,c}n(Es,"makeStore");var wc=Object.defineProperty,nr=n((t,e)=>wc(t,"name",{value:e,configurable:!0}),"i"),Cc=nr(t=>e=>t.indexOf(e.origin)>=0,"createIsMessageAllowed"),xs=["https://rc3.ordergroove.com","https://rc3.stg.ordergroove.com","http://localhost:3000",window.location.origin],Ss=nr(t=>(e,r)=>{xs.forEach(o=>t.postMessage({ogType:e,...r},o))},"createBroadcastMessage");function Yr(t=window.opener,e=window.og){let r=nr(o=>{let s=Cc(xs),i=Ss(o.source),a=o.data.options||{};if(s(o)&&o.data.ogType==="READY"){let c="//static.ordergroove.com/@ordergroove/offers-live-editor/0.6.0/dist/";c.startsWith("//")&&(c=window.location.protocol+c),c.endsWith("/")||(c+="/"),import(`${c}client.js`).then(({initializeClient:l})=>{l({isMessageAllowed:s,broadcastMessage:i,options:a,og:e}),window.removeEventListener("message",r)})}},"handleReady");t&&t!==window&&(window.addEventListener("message",r),Ss(t)("READY"))}n(Yr,"f");nr(Yr,"offersLiveEditor");var sr=null,Pc=n(t=>({dispatch:t}),"defaultMapDispatchToProps"),Ts=n(t=>{if(!sr)throw new Error("Missing redux store.");return sr},"resolveStore"),Rc=n((t,e)=>r=>{let{getState:o,dispatch:s}=Ts(r),i=t?t(o(),r):{},a=e(s,r);Object.assign(r,i,a)},"createRecalcProps"),y=n((t,e=Pc)=>r=>{let s=Rc(t,typeof e=="function"?e:i=>dn(e,i));return class extends r{get store(){return sr}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._storeUnsubscribe=Ts(this).subscribe(()=>s(this)),s(this)}attributeChangedCallback(i,a,c){super.attributeChangedCallback&&super.attributeChangedCallback(i,a,c),this._storeUnsubscribe&&a!==c&&s(this)}disconnectedCallback(){this._storeUnsubscribe(),super.disconnectedCallback&&super.disconnectedCallback()}}},"connect"),vs=n(t=>{sr=t},"setStore");ie();var Jr=n((t={},e=[])=>(t.optedin||[]).map(r=>{let o={product:r.id,subscription_info:{components:r.components||[]},tracking_override:{offer:((t.productOffer||{})[r.id]||[])[0],...ct(r.frequency)}};return t.firstOrderPlaceDate&&t.firstOrderPlaceDate[r.id]&&(o.subscription_info.first_order_place_date=t.firstOrderPlaceDate[r.id]),t.productToSubscribe&&t.productToSubscribe[r.id]&&(o.tracking_override.product=t.productToSubscribe[r.id]),o}).filter(r=>r.tracking_override.offer).filter(r=>e.length?e.includes(r.product):r),"getProductsForPurchasePost");A();O();var ii=re(Zs());O();var Wc=n(t=>{let e=String(t||"").trim().match(/(\d+)\s*([dwm])/);return e?`${e[1]}_${{d:1,w:2,m:3}[e[2]]}`:t},"sanitizeFrequencyString"),Xs=n(t=>t.hasAttribute("product")&&{id:t.getAttribute("product"),...t.hasAttribute("product-components")&&{components:JSON.parse(t.getAttribute("product-components"))}},"buildProduct");var _o=n(t=>{let e=Xs(t);if(!e){let r=t.offer;r&&(e=Xs(r))}return e},"resolveProduct"),Yc=n(t=>{let e=t;for(;e;){if(e.tagName==="OG-OFFER")return e;e=e.nodeType===11?e.host:e.parentNode}},"resolveOffer"),Eo=n(t=>class extends t{get offer(){return Yc(this)}connectedCallback(){super.connectedCallback(),this.offersChangeTemplate=this.offersChangeTemplate.bind(this),this.offer&&this.offer.addEventListener("template-changed",this.offersChangeTemplate)}disconnectedCallback(){super.disconnectedCallback(),this.offer&&this.offer.removeEventListener("template-changed",this.offersChangeTemplate)}offersChangeTemplate(){this._enqueueUpdate()}},"withOfferTemplate"),I=n(t=>class extends Eo(t){get product(){return _o(this)}},"withProduct"),_r=n(t=>class extends t{get childOptions(){let e=[],r=null;return this.querySelectorAll("option").forEach(o=>{let s=Wc(o.value),i=o.innerText.trim();e.push({value:s,text:i}),!r&&o.selected&&(r=s)}),{options:e,isSelected:r}}},"withChildOptions");var Er={};Cr(Er,{autoshipByDefault:()=>Jc,eligibilityGroups:()=>ri,eligible:()=>ei,hasUpcomingOrder:()=>ni,hasUpsellGroup:()=>oi,inStock:()=>xo,optedout:()=>Kc,regularEligible:()=>Xc,subscribed:()=>Qc,subscriptionEligible:()=>ti,upcomingOrderContainsProduct:()=>Zc,upsellEligible:()=>si});var xo=n((t,e)=>(t.inStock||{})[(e.product||{}).id],"inStock"),ei=n((t,e)=>(t.autoshipEligible||{})[(e.product||{}).id]||!1,"eligible"),Jc=n((t,e)=>(t.autoshipByDefault||{})[(e.product||{}).id]||!1,"autoshipByDefault"),ti=n((t,e)=>(t.offerId&&t.offerId!=="0"||!1)&&ei(t,e)&&xo(t,e),"subscriptionEligible"),ri=n((t,e)=>(t.eligibilityGroups||{})[(e.product||{}).id]||null,"eligibilityGroups"),oi=n((t,e)=>{let r=ri(t,e);return r===null||!!r.find(o=>o==="upsell"||o==="impulse_upsell")},"hasUpsellGroup"),Qc=n((t,e)=>rr(e.product)(t),"subscribed"),Kc=n((t,e)=>or(e.product)(t),"optedout"),ni=n(t=>!!(t.nextUpcomingOrder&&t.nextUpcomingOrder.public_id),"hasUpcomingOrder"),Zc=n((t,e)=>(t.nextUpcomingOrder&&t.nextUpcomingOrder.products||[]).includes((e.product||{}).id),"upcomingOrderContainsProduct"),si=n((t,e)=>{var r;return!((r=e.offer)==null?void 0:r.isCart)&&t.offerId&&t.offerId!=="0"&&t.auth&&xo(t,e)&&ni(t)&&oi(t,e)},"upsellEligible"),Xc=n((t,e)=>ti(t,e)&&!si(t,e),"regularEligible");var el=n(t=>t.replace(/(\r\n|\n|\r|\s)+/gm,""),"removeWhitespace"),So=class extends I(T){static get properties(){return{...super.properties,state:{type:Object,attribute:!1},test:{type:String}}}render(){return this.test&&ii.default.parse(el(this.test),r=>Er[r]&&Er[r](this.state,this))?d`
110
+ `}};n(Or,"TestWizard");ml=Or});var wu={};Cr(wu,{addOptinChangedCallback:()=>nu,addTemplate:()=>su,autoInit:()=>vu,clear:()=>iu,config:()=>au,default:()=>Ou,disableOptinChangedCallbacks:()=>cu,getOptins:()=>lu,getProductsForPurchasePost:()=>uu,initialize:()=>pu,isReady:()=>ou,offers:()=>x,platform:()=>j,previewMode:()=>du,register:()=>fu,resolveSettings:()=>hu,setAuthUrl:()=>mu,setEnvironment:()=>gu,setLocale:()=>yu,setMerchantId:()=>bu,setPublicPath:()=>_u,setTemplates:()=>Eu,setupCart:()=>xu,setupProduct:()=>Su,setupProducts:()=>Tu,store:()=>Ki});function Pr(t){var e,r=t.Symbol;return typeof r=="function"?r.observable?e=r.observable:(e=r("observable"),r.observable=e):e="@@observable",e}n(Pr,"symbolObservablePonyfill");var Ae;typeof self!="undefined"?Ae=self:typeof window!="undefined"||typeof window!="undefined"?Ae=window:typeof module!="undefined"?Ae=module:Ae=Function("return this")();var aa=Pr(Ae),Rr=aa;var Ar=n(function(){return Math.random().toString(36).substring(7).split("").join(".")},"randomString"),et={INIT:"@@redux/INIT"+Ar(),REPLACE:"@@redux/REPLACE"+Ar(),PROBE_UNKNOWN_ACTION:n(function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Ar()},"PROBE_UNKNOWN_ACTION")};function ca(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}n(ca,"isPlainObject");function Nr(t,e,r){var o;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.");if(typeof e=="function"&&typeof r=="undefined"&&(r=e,e=void 0),typeof r!="undefined"){if(typeof r!="function")throw new Error("Expected the enhancer to be a function.");return r(Nr)(t,e)}if(typeof t!="function")throw new Error("Expected the reducer to be a function.");var s=t,i=e,a=[],c=a,l=!1;function u(){c===a&&(c=a.slice())}n(u,"ensureCanMutateNextListeners");function h(){if(l)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return i}n(h,"getState");function p(f){if(typeof f!="function")throw new Error("Expected the listener to be a function.");if(l)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribelistener for more details.");var E=!0;return u(),c.push(f),n(function(){if(!!E){if(l)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribelistener for more details.");E=!1,u();var b=c.indexOf(f);c.splice(b,1),a=null}},"unsubscribe")}n(p,"subscribe");function m(f){if(!ca(f))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(typeof f.type=="undefined")throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(l)throw new Error("Reducers may not dispatch actions.");try{l=!0,i=s(i,f)}finally{l=!1}for(var E=a=c,w=0;w<E.length;w++){var b=E[w];b()}return f}n(m,"dispatch");function C(f){if(typeof f!="function")throw new Error("Expected the nextReducer to be a function.");s=f,m({type:et.REPLACE})}n(C,"replaceReducer");function _(){var f,E=p;return f={subscribe:n(function(b){if(typeof b!="object"||b===null)throw new TypeError("Expected the observer to be an object.");function g(){b.next&&b.next(h())}n(g,"observeState"),g();var wt=E(g);return{unsubscribe:wt}},"subscribe")},f[Rr]=function(){return this},f}return n(_,"observable"),m({type:et.INIT}),o={dispatch:m,subscribe:p,getState:h,replaceReducer:C},o[Rr]=_,o}n(Nr,"createStore");function la(t,e){var r=e&&e.type,o=r&&'action "'+String(r)+'"'||"an action";return"Given "+o+', reducer "'+t+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}n(la,"getUndefinedStateErrorMessage");function ua(t){Object.keys(t).forEach(function(e){var r=t[e],o=r(void 0,{type:et.INIT});if(typeof o=="undefined")throw new Error('Reducer "'+e+`" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof r(void 0,{type:et.PROBE_UNKNOWN_ACTION()})=="undefined")throw new Error('Reducer "'+e+'" returned undefined when probed with a random type. '+("Don't try to handle "+et.INIT+' or other actions in "redux/*" ')+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.")})}n(ua,"assertReducerShape");function Ct(t){for(var e=Object.keys(t),r={},o=0;o<e.length;o++){var s=e[o];typeof t[s]=="function"&&(r[s]=t[s])}var i=Object.keys(r),a,c;try{ua(r)}catch(l){c=l}return n(function(u,h){if(u===void 0&&(u={}),c)throw c;if(!1)var p;for(var m=!1,C={},_=0;_<i.length;_++){var f=i[_],E=r[f],w=u[f],b=E(w,h);if(typeof b=="undefined"){var g=la(f,h);throw new Error(g)}C[f]=b,m=m||b!==w}return m=m||i.length!==Object.keys(u).length,m?C:u},"combination")}n(Ct,"combineReducers");function pn(t,e){return function(){return e(t.apply(this,arguments))}}n(pn,"bindActionCreator");function dn(t,e){if(typeof t=="function")return pn(t,e);if(typeof t!="object"||t===null)throw new Error("bindActionCreators expected an object or a function, instead received "+(t===null?"null":typeof t)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');var r={};for(var o in t){var s=t[o];typeof s=="function"&&(r[o]=pn(s,e))}return r}n(dn,"bindActionCreators");function pa(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}n(pa,"_defineProperty");function fn(t,e){var r=Object.keys(t);return Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(t)),e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r}n(fn,"ownKeys");function da(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?fn(r,!0).forEach(function(o){pa(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):fn(r).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}n(da,"_objectSpread2");function Ir(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(o){return o}:e.length===1?e[0]:e.reduce(function(o,s){return function(){return o(s.apply(void 0,arguments))}})}n(Ir,"compose");function hn(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(o){return function(){var s=o.apply(void 0,arguments),i=n(function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},"dispatch"),a={getState:s.getState,dispatch:n(function(){return i.apply(void 0,arguments)},"dispatch")},c=e.map(function(l){return l(a)});return i=Ir.apply(void 0,c)(s.dispatch),da({},s,{dispatch:i})}}}n(hn,"applyMiddleware");function mn(t){var e=n(function(o){var s=o.dispatch,i=o.getState;return function(a){return function(c){return typeof c=="function"?c(s,i,t):a(c)}}},"middleware");return e}n(mn,"createThunkMiddleware");var gn=mn();gn.withExtraArgument=mn;var yn=gn;var cs=re(Rt());A();M();var ft="OG_STATE",ls=n(t=>{try{return t===null?void 0:JSON.parse(t)}catch{return}},"safeParseState"),Br=n(()=>window.og&&window.og.previewMode,"isPreviewMode"),us=n(()=>Br()?{}:ls(localStorage.getItem(ft)),"loadState"),fc=n(t=>!t||!t.sessionId?!1:JSON.stringify({sessionId:t.sessionId,optedin:t.optedin,optedout:t.optedout,productOffer:t.productOffer,firstOrderPlaceDate:t.firstOrderPlaceDate,productToSubscribe:t.productToSubscribe}),"serializeState"),ps=n(t=>{if(Br())return;let e=fc(t);e&&localStorage.getItem(ft)!==e&&localStorage.setItem(ft,e)},"saveState"),ds=n(t=>(0,cs.throttle)(500,e=>{if(Br())return;let{key:r,newValue:o}=e;r===ft&&o===null?(t.dispatch({type:oe}),setTimeout(()=>t.dispatch(Zn()),0)):r===ft&&t.dispatch({type:me,newValue:ls(o)})}),"listenLocalStorageChanges");var hs=re(Rt());M();function hc(t,e){return t===e}n(hc,"defaultEqualityCheck");function mc(t,e,r){if(e===null||r===null||e.length!==r.length)return!1;for(var o=e.length,s=0;s<o;s++)if(!t(e[s],r[s]))return!1;return!0}n(mc,"areArgumentsShallowlyEqual");function gc(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:hc,r=null,o=null;return function(){return mc(e,r,arguments)||(o=t.apply(null,arguments)),r=arguments,o}}n(gc,"defaultMemoize");function yc(t){var e=Array.isArray(t[0])?t[0]:t;if(!e.every(function(o){return typeof o=="function"})){var r=e.map(function(o){return typeof o}).join(", ");throw new Error("Selector creators expect all input-selectors to be functions, "+("instead received the following types: ["+r+"]"))}return e}n(yc,"getDependencies");function bc(t){for(var e=arguments.length,r=Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];return function(){for(var s=arguments.length,i=Array(s),a=0;a<s;a++)i[a]=arguments[a];var c=0,l=i.pop(),u=yc(i),h=t.apply(void 0,[function(){return c++,l.apply(null,arguments)}].concat(r)),p=t(function(){for(var m=[],C=u.length,_=0;_<C;_++)m.push(u[_].apply(null,arguments));return h.apply(null,m)});return p.resultFunc=l,p.dependencies=u,p.recomputations=function(){return c},p.resetRecomputations=function(){return c=0},p}}n(bc,"createSelectorCreator");var He=bc(gc);var Se=re(st());ie();ut();U();Se.default.Cache=Map;function _c(t,e){if(t===e)return!0;if(t===null||e===null||t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(t[r]!==e[r])return!1;return!0}n(_c,"arraysEqual");function Ec(t,e,r){let o=lt(r);return j.shopify_selling_plans?Y(t,e,o):o}n(Ec,"resolveFrequency");var N=n((t,e)=>!!(t===e||typeof t=="object"&&typeof e=="object"&&t&&e&&t.id===e.id&&(!(Array.isArray(t.components)&&Array.isArray(e.components))||_c((t.components||[]).sort(),(e.components||[]).sort()))),"isSameProduct"),tr=n(t=>t.optedin||[],"optedinSelector"),fs=n(t=>t.optedout||[],"optedoutSelector"),Gr=n(t=>t.autoshipByDefault||{},"autoshipSelector"),xc=n(t=>t.defaultFrequencies||{},"defaultFrequenciesSelector"),Sc=n(t=>{var e;return((e=t==null?void 0:t.config)==null?void 0:e.frequencies)||[]},"sellingPlansSelector"),Tc=n(t=>{var e;return((e=t==null?void 0:t.config)==null?void 0:e.frequenciesEveryPeriod)||[]},"frequenciesEveryPeriodSelector"),Z=(0,Se.default)(t=>He(tr,fs,Gr,(e,r,o)=>{let s=e.find(i=>N(t,i));return s||(r.find(i=>N(t,i))?!1:t&&o[t.id]?{id:t.id}:!1)}),t=>JSON.stringify(t)),rr=(0,Se.default)(t=>He(tr,e=>{let r=e.find(o=>N(t,o));return r||!1}),t=>JSON.stringify(t)),or=(0,Se.default)(t=>He(fs,e=>e.find(r=>N(t,r))));var J=(0,Se.default)(t=>He(Z(t),e=>e&&e.frequency||null)),Be=(0,Se.default)(t=>He(xc,Sc,Tc,(e,r,o)=>e[R(t)]&&Ec(r,o,e[R(t)])||null)),zr=n(t=>t.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),"kebabCase"),H=n((t,e,r,o)=>({[r]:t.config&&t.config[r]||e&&e.hasAttribute&&e.hasAttribute(zr(r))&&e[r]||e.offer&&typeof(e.offer[r]!=="undefined")&&e.offer[r]||o}),"configSelector"),Ge=n(t=>({templates:t.templates||[]}),"templatesSelector");var vc=n((t,e,r=document)=>r.dispatchEvent(new CustomEvent(t,{detail:e})),"dispatchEvent"),ms=n(t=>({payload:{product:{id:e,components:r}={}}={}}={})=>setTimeout(()=>vc("optin-changed",{productId:e,components:r,optedIn:t}),0),"dispatchOptinChangedEvent"),Oc=[{expressions:[({type:t}={})=>t===q,({type:t}={})=>t===F],fn:ms(!0)},{expressions:[({type:t}={})=>t===k],fn:ms(!1)}],gs=n(t=>e=>r=>{let o=t.getState();Oc.forEach(s=>{s.expressions.some(i=>i(r,o))&&s.fn(r)}),e(r)},"dispatchMiddleware"),ys=n(t=>e=>r=>{var s;let o;switch(r.type){case P:case k:case q:case F:o=new CustomEvent(`og-${r.type.toLowerCase().replace(/_/g,"-")}`,{bubbles:!0,cancelable:!0,detail:r.payload}),(((s=r.payload)==null?void 0:s.offer)||document).dispatchEvent(o);break;default:}(o==null?void 0:o.defaultPrevented)||e(r)},"offerEvents"),bs=n(t=>e=>r=>{e(r);let o=(0,hs.throttle)(500,()=>{ps({...t.getState()})});r.type!==me&&o()},"localStorageMiddleware");A();M();var Wr=n(()=>{let t,e;return[new Promise((r,o)=>{t=r,e=o}),t,e]},"waitFor");function _s(t){let[e,r]=Wr(),[o,s]=Wr(),[i,a]=Wr();o.then(l=>{let{sessionId:u}=t.getState();!u||l&&!u.startsWith(l)?t.dispatch(Mr(l)):a(u)});let c=Promise.all([o,e,i]);return c.then(()=>{var l;window.addEventListener("storage",ds(t)),((l=t.getState().auth)==null?void 0:l.ts)||t.dispatch(Kn())}),l=>async u=>{Fe===u.type||ke===u.type||Ue===u.type?r(u.payload):Ne===u.type?s(u.payload):Ie===u.type?a(u.payload):await c,l(u)}}n(_s,"waitUntilOffersReady");function Es(t,...e){if(window.og&&window.og.store)return window.og.store;let r=window.og&&window.og.previewMode,o=typeof window=="object"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({name:"Ordergroove Offers"}):Ir,s=[_s,yn,gs,ys],i={};if(!r)try{i=us(),s.push(bs)}catch{}let a=o(hn(...s,...e)),c=Nr(t,i,a);return window.og=window.og||{},window.og.store=c,c}n(Es,"makeStore");var wc=Object.defineProperty,nr=n((t,e)=>wc(t,"name",{value:e,configurable:!0}),"i"),Cc=nr(t=>e=>t.indexOf(e.origin)>=0,"createIsMessageAllowed"),xs=["https://rc3.ordergroove.com","https://rc3.stg.ordergroove.com","http://localhost:3000",window.location.origin],Ss=nr(t=>(e,r)=>{xs.forEach(o=>t.postMessage({ogType:e,...r},o))},"createBroadcastMessage");function Yr(t=window.opener,e=window.og){let r=nr(o=>{let s=Cc(xs),i=Ss(o.source),a=o.data.options||{};if(s(o)&&o.data.ogType==="READY"){let c="//static.ordergroove.com/@ordergroove/offers-live-editor/0.6.1/dist/";c.startsWith("//")&&(c=window.location.protocol+c),c.endsWith("/")||(c+="/"),import(`${c}client.js`).then(({initializeClient:l})=>{l({isMessageAllowed:s,broadcastMessage:i,options:a,og:e}),window.removeEventListener("message",r)})}},"handleReady");t&&t!==window&&(window.addEventListener("message",r),Ss(t)("READY"))}n(Yr,"f");nr(Yr,"offersLiveEditor");var sr=null,Pc=n(t=>({dispatch:t}),"defaultMapDispatchToProps"),Ts=n(t=>{if(!sr)throw new Error("Missing redux store.");return sr},"resolveStore"),Rc=n((t,e)=>r=>{let{getState:o,dispatch:s}=Ts(r),i=t?t(o(),r):{},a=e(s,r);Object.assign(r,i,a)},"createRecalcProps"),y=n((t,e=Pc)=>r=>{let s=Rc(t,typeof e=="function"?e:i=>dn(e,i));return class extends r{get store(){return sr}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._storeUnsubscribe=Ts(this).subscribe(()=>s(this)),s(this)}attributeChangedCallback(i,a,c){super.attributeChangedCallback&&super.attributeChangedCallback(i,a,c),this._storeUnsubscribe&&a!==c&&s(this)}disconnectedCallback(){this._storeUnsubscribe(),super.disconnectedCallback&&super.disconnectedCallback()}}},"connect"),vs=n(t=>{sr=t},"setStore");ie();var Jr=n((t={},e=[])=>(t.optedin||[]).map(r=>{let o={product:r.id,subscription_info:{components:r.components||[]},tracking_override:{offer:((t.productOffer||{})[r.id]||[])[0],...ct(r.frequency)}};return t.firstOrderPlaceDate&&t.firstOrderPlaceDate[r.id]&&(o.subscription_info.first_order_place_date=t.firstOrderPlaceDate[r.id]),t.productToSubscribe&&t.productToSubscribe[r.id]&&(o.tracking_override.product=t.productToSubscribe[r.id]),o}).filter(r=>r.tracking_override.offer).filter(r=>e.length?e.includes(r.product):r),"getProductsForPurchasePost");A();O();var ii=re(Zs());O();var Wc=n(t=>{let e=String(t||"").trim().match(/(\d+)\s*([dwm])/);return e?`${e[1]}_${{d:1,w:2,m:3}[e[2]]}`:t},"sanitizeFrequencyString"),Xs=n(t=>t.hasAttribute("product")&&{id:t.getAttribute("product"),...t.hasAttribute("product-components")&&{components:JSON.parse(t.getAttribute("product-components"))}},"buildProduct");var _o=n(t=>{let e=Xs(t);if(!e){let r=t.offer;r&&(e=Xs(r))}return e},"resolveProduct"),Yc=n(t=>{let e=t;for(;e;){if(e.tagName==="OG-OFFER")return e;e=e.nodeType===11?e.host:e.parentNode}},"resolveOffer"),Eo=n(t=>class extends t{get offer(){return Yc(this)}connectedCallback(){super.connectedCallback(),this.offersChangeTemplate=this.offersChangeTemplate.bind(this),this.offer&&this.offer.addEventListener("template-changed",this.offersChangeTemplate)}disconnectedCallback(){super.disconnectedCallback(),this.offer&&this.offer.removeEventListener("template-changed",this.offersChangeTemplate)}offersChangeTemplate(){this._enqueueUpdate()}},"withOfferTemplate"),I=n(t=>class extends Eo(t){get product(){return _o(this)}},"withProduct"),_r=n(t=>class extends t{get childOptions(){let e=[],r=null;return this.querySelectorAll("option").forEach(o=>{let s=Wc(o.value),i=o.innerText.trim();e.push({value:s,text:i}),!r&&o.selected&&(r=s)}),{options:e,isSelected:r}}},"withChildOptions");var Er={};Cr(Er,{autoshipByDefault:()=>Jc,eligibilityGroups:()=>ri,eligible:()=>ei,hasUpcomingOrder:()=>ni,hasUpsellGroup:()=>oi,inStock:()=>xo,optedout:()=>Kc,regularEligible:()=>Xc,subscribed:()=>Qc,subscriptionEligible:()=>ti,upcomingOrderContainsProduct:()=>Zc,upsellEligible:()=>si});var xo=n((t,e)=>(t.inStock||{})[(e.product||{}).id],"inStock"),ei=n((t,e)=>(t.autoshipEligible||{})[(e.product||{}).id]||!1,"eligible"),Jc=n((t,e)=>(t.autoshipByDefault||{})[(e.product||{}).id]||!1,"autoshipByDefault"),ti=n((t,e)=>(t.offerId&&t.offerId!=="0"||!1)&&ei(t,e)&&xo(t,e),"subscriptionEligible"),ri=n((t,e)=>(t.eligibilityGroups||{})[(e.product||{}).id]||null,"eligibilityGroups"),oi=n((t,e)=>{let r=ri(t,e);return r===null||!!r.find(o=>o==="upsell"||o==="impulse_upsell")},"hasUpsellGroup"),Qc=n((t,e)=>rr(e.product)(t),"subscribed"),Kc=n((t,e)=>or(e.product)(t),"optedout"),ni=n(t=>!!(t.nextUpcomingOrder&&t.nextUpcomingOrder.public_id),"hasUpcomingOrder"),Zc=n((t,e)=>(t.nextUpcomingOrder&&t.nextUpcomingOrder.products||[]).includes((e.product||{}).id),"upcomingOrderContainsProduct"),si=n((t,e)=>{var r;return!((r=e.offer)==null?void 0:r.isCart)&&t.offerId&&t.offerId!=="0"&&t.auth&&xo(t,e)&&ni(t)&&oi(t,e)},"upsellEligible"),Xc=n((t,e)=>ti(t,e)&&!si(t,e),"regularEligible");var el=n(t=>t.replace(/(\r\n|\n|\r|\s)+/gm,""),"removeWhitespace"),So=class extends I(T){static get properties(){return{...super.properties,state:{type:Object,attribute:!1},test:{type:String}}}render(){return this.test&&ii.default.parse(el(this.test),r=>Er[r]&&Er[r](this.state,this))?d`
111
111
  <slot></slot>
112
112
  `:d``}shouldUpdate(e){return e.size&&(this.product&&this.product.id in this.state.autoshipEligible&&this.product.id in this.state.inStock||!this.product.id)}};n(So,"When");var tl=n(t=>({state:t}),"mapStateToProps"),ai=y(tl)(So);O();A();O();ie();var ci={type:Object,converter:{toAttribute(t){return t==null?t:JSON.stringify(t)},fromAttribute(t){return t&&t.match(/[{[]/)?JSON.parse(t):{id:t}}}},fe={type:String,attribute:"default-frequency",converter:{fromAttribute(t){return t&&Dr(t)?t:null}}},xr={type:Boolean,attribute:!0,reflect:!0},Qe={type:Object,attribute:!1};O();var rl=n(t=>class extends t{getOption(e,r=e){let o=zr(e);if(this.hasAttribute(o)){let s=this.getAttribute(o);return s.toString().toLowerCase()==="true"?!0:s.toString().toLowerCase()==="false"?!1:s}if(this.template&&this.template.config&&typeof this.template.config[r]!="undefined")return this.template.config[r];if(this.config&&typeof this.config[r]!="undefined")return this.config[r]}applyTemplate(e){this.template=e;let r=typeof e.markup=="undefined"?this.constructor.initialTemplate:e.markup;r&&this._templateMarkup!==r&&(this._templateMarkup=r,this.innerHTML=r)}refreshTemplate(){if(this._templates&&this._templates.length){let e=this._templates.find(({selector:r})=>{try{return this.matches(r)}catch{return!1}});this.applyTemplate(e||{})}}set templates(e){this._templates=e,this.refreshTemplate()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this.constructor.initialTemplate&&!this.innerHTML.trim()&&(this.innerHTML=this.constructor.initialTemplate)}},"withTemplate"),V=rl(T);var G=class extends I(V){static get properties(){return{subscribed:xr,frequencyMatch:{type:Boolean,reflect:!0,attribute:"frequency-match"},productDefaultFrequency:{type:String},defaultFrequency:{type:String}}}static get styles(){return v`
113
113
  :host {
@@ -734,7 +734,6 @@ var lib=(()=>{var ta=Object.create;var Xe=Object.defineProperty;var ra=Object.ge
734
734
  background-color: var(--og-tooltip-background, #ececec);
735
735
  box-shadow: var(--og-tooltip-box-shadow, 2px 2px 6px rgba(0, 0, 0, 0.28));
736
736
  display: block;
737
- width: 200px;
738
737
  opacity: 0;
739
738
  padding: var(--og-tooltip-padding, 0.5em);
740
739
  text-align: var(--og-tooltip-text-align, left);
@@ -857,6 +856,7 @@ var lib=(()=>{var ta=Object.create;var Xe=Object.defineProperty;var ra=Object.ge
857
856
 
858
857
  .tooltip:hover .content {
859
858
  opacity: 1;
859
+ width: 200px;
860
860
  pointer-events: auto;
861
861
  transform: translateY(0px);
862
862
  }