(function(t){function e(e){for(var n,r,i=e[0],a=e[1],s=0,c=[];s=0&&Math.floor(e)===e&&isFinite(t)}function f(t){return o(t)&&"function"===typeof t.then&&"function"===typeof t.catch}function h(t){return null==t?"":Array.isArray(t)||l(t)&&t.toString===u?JSON.stringify(t,null,2):String(t)}function v(t){var e=parseFloat(t);return isNaN(e)?t:e}function m(t,e){for(var n=Object.create(null),r=t.split(","),o=0;o-1)return t.splice(n,1)}}var _=Object.prototype.hasOwnProperty;function b(t,e){return _.call(t,e)}function w(t){var e=Object.create(null);return function(n){var r=e[n];return r||(e[n]=t(n))}}var C=/-(\w)/g,O=w((function(t){return t.replace(C,(function(t,e){return e?e.toUpperCase():""}))})),S=w((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),A=/\B([A-Z])/g,$=w((function(t){return t.replace(A,"-$1").toLowerCase()}));function x(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n}function E(t,e){return t.bind(e)}var k=Function.prototype.bind?E:x;function T(t,e){e=e||0;var n=t.length-e,r=new Array(n);while(n--)r[n]=t[n+e];return r}function j(t,e){for(var n in e)t[n]=e[n];return t}function I(t){for(var e={},n=0;n0,nt=Q&&Q.indexOf("edge/")>0,rt=(Q&&Q.indexOf("android"),Q&&/iphone|ipad|ipod|ios/.test(Q)||"ios"===Z),ot=(Q&&/chrome\/\d+/.test(Q),Q&&/phantomjs/.test(Q),Q&&Q.match(/firefox\/(\d+)/)),it={}.watch,at=!1;if(K)try{var st={};Object.defineProperty(st,"passive",{get:function(){at=!0}}),window.addEventListener("test-passive",null,st)}catch(Sa){}var ct=function(){return void 0===G&&(G=!K&&!X&&"undefined"!==typeof t&&(t["process"]&&"server"===t["process"].env.VUE_ENV)),G},ut=K&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function lt(t){return"function"===typeof t&&/native code/.test(t.toString())}var dt,pt="undefined"!==typeof Symbol&<(Symbol)&&"undefined"!==typeof Reflect&<(Reflect.ownKeys);dt="undefined"!==typeof Set&<(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var ft=P,ht=0,vt=function(){this.id=ht++,this.subs=[]};vt.prototype.addSub=function(t){this.subs.push(t)},vt.prototype.removeSub=function(t){y(this.subs,t)},vt.prototype.depend=function(){vt.target&&vt.target.addDep(this)},vt.prototype.notify=function(){var t=this.subs.slice();for(var e=0,n=t.length;e-1)if(i&&!b(o,"default"))a=!1;else if(""===a||a===$(t)){var c=ee(String,o.type);(c<0||s0&&(a=Ee(a,(e||"")+"_"+n),xe(a[0])&&xe(u)&&(l[c]=Ct(u.text+a[0].text),a.shift()),l.push.apply(l,a)):s(a)?xe(u)?l[c]=Ct(u.text+a):""!==a&&l.push(Ct(a)):xe(a)&&xe(u)?l[c]=Ct(u.text+a.text):(i(t._isVList)&&o(a.tag)&&r(a.key)&&o(e)&&(a.key="__vlist"+e+"_"+n+"__"),l.push(a)));return l}function ke(t){var e=t.$options.provide;e&&(t._provided="function"===typeof e?e.call(t):e)}function Te(t){var e=je(t.$options.inject,t);e&&(kt(!1),Object.keys(e).forEach((function(n){Nt(t,n,e[n])})),kt(!0))}function je(t,e){if(t){for(var n=Object.create(null),r=pt?Reflect.ownKeys(t):Object.keys(t),o=0;o0,a=t?!!t.$stable:!i,s=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(a&&r&&r!==n&&s===r.$key&&!i&&!r.$hasNormal)return r;for(var c in o={},t)t[c]&&"$"!==c[0]&&(o[c]=Le(e,c,t[c]))}else o={};for(var u in e)u in o||(o[u]=Re(e,u));return t&&Object.isExtensible(t)&&(t._normalized=o),V(o,"$stable",a),V(o,"$key",s),V(o,"$hasNormal",i),o}function Le(t,e,n){var r=function(){var t=arguments.length?n.apply(null,arguments):n({});t=t&&"object"===typeof t&&!Array.isArray(t)?[t]:$e(t);var e=t&&t[0];return t&&(!e||1===t.length&&e.isComment&&!Ne(e))?void 0:t};return n.proxy&&Object.defineProperty(t,e,{get:r,enumerable:!0,configurable:!0}),r}function Re(t,e){return function(){return t[e]}}function Me(t,e){var n,r,i,a,s;if(Array.isArray(t)||"string"===typeof t)for(n=new Array(t.length),r=0,i=t.length;r1?T(n):n;for(var r=T(arguments,1),o='event handler for "'+t+'"',i=0,a=n.length;idocument.createEvent("Event").timeStamp&&(Yn=function(){return Kn.now()})}function Xn(){var t,e;for(Gn=Yn(),Vn=!0,qn.sort((function(t,e){return t.id-e.id})),zn=0;znzn&&qn[n].id>t.id)n--;qn.splice(n+1,0,t)}else qn.push(t);Hn||(Hn=!0,ve(Xn))}}var nr=0,rr=function(t,e,n,r,o){this.vm=t,o&&(t._watcher=this),t._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++nr,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new dt,this.newDepIds=new dt,this.expression="","function"===typeof e?this.getter=e:(this.getter=J(e),this.getter||(this.getter=P)),this.value=this.lazy?void 0:this.get()};rr.prototype.get=function(){var t;gt(this);var e=this.vm;try{t=this.getter.call(e,e)}catch(Sa){if(!this.user)throw Sa;ne(Sa,e,'getter for watcher "'+this.expression+'"')}finally{this.deep&&ge(t),yt(),this.cleanupDeps()}return t},rr.prototype.addDep=function(t){var e=t.id;this.newDepIds.has(e)||(this.newDepIds.add(e),this.newDeps.push(t),this.depIds.has(e)||t.addSub(this))},rr.prototype.cleanupDeps=function(){var t=this.deps.length;while(t--){var e=this.deps[t];this.newDepIds.has(e.id)||e.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},rr.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():er(this)},rr.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||c(t)||this.deep){var e=this.value;if(this.value=t,this.user){var n='callback for watcher "'+this.expression+'"';re(this.cb,this.vm,[t,e],this.vm,n)}else this.cb.call(this.vm,t,e)}}},rr.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},rr.prototype.depend=function(){var t=this.deps.length;while(t--)this.deps[t].depend()},rr.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||y(this.vm._watchers,this);var t=this.deps.length;while(t--)this.deps[t].removeSub(this);this.active=!1}};var or={enumerable:!0,configurable:!0,get:P,set:P};function ir(t,e,n){or.get=function(){return this[e][n]},or.set=function(t){this[e][n]=t},Object.defineProperty(t,n,or)}function ar(t){t._watchers=[];var e=t.$options;e.props&&sr(t,e.props),e.methods&&vr(t,e.methods),e.data?cr(t):Pt(t._data={},!0),e.computed&&dr(t,e.computed),e.watch&&e.watch!==it&&mr(t,e.watch)}function sr(t,e){var n=t.$options.propsData||{},r=t._props={},o=t.$options._propKeys=[],i=!t.$parent;i||kt(!1);var a=function(i){o.push(i);var a=Kt(i,e,n,t);Nt(r,i,a),i in t||ir(t,"_props",i)};for(var s in e)a(s);kt(!0)}function cr(t){var e=t.$options.data;e=t._data="function"===typeof e?ur(e,t):e||{},l(e)||(e={});var n=Object.keys(e),r=t.$options.props,o=(t.$options.methods,n.length);while(o--){var i=n[o];0,r&&b(r,i)||H(i)||ir(t,"_data",i)}Pt(e,!0)}function ur(t,e){gt();try{return t.call(e,e)}catch(Sa){return ne(Sa,e,"data()"),{}}finally{yt()}}var lr={lazy:!0};function dr(t,e){var n=t._computedWatchers=Object.create(null),r=ct();for(var o in e){var i=e[o],a="function"===typeof i?i:i.get;0,r||(n[o]=new rr(t,a||P,P,lr)),o in t||pr(t,o,i)}}function pr(t,e,n){var r=!ct();"function"===typeof n?(or.get=r?fr(e):hr(n),or.set=P):(or.get=n.get?r&&!1!==n.cache?fr(e):hr(n.get):P,or.set=n.set||P),Object.defineProperty(t,e,or)}function fr(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),vt.target&&e.depend(),e.value}}function hr(t){return function(){return t.call(this,this)}}function vr(t,e){t.$options.props;for(var n in e)t[n]="function"!==typeof e[n]?P:k(e[n],t)}function mr(t,e){for(var n in e){var r=e[n];if(Array.isArray(r))for(var o=0;o-1)return this;var n=T(arguments,1);return n.unshift(this),"function"===typeof t.install?t.install.apply(t,n):"function"===typeof t&&t.apply(null,n),e.push(t),this}}function $r(t){t.mixin=function(t){return this.options=Gt(this.options,t),this}}function xr(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var n=this,r=n.cid,o=t._Ctor||(t._Ctor={});if(o[r])return o[r];var i=t.name||n.options.name;var a=function(t){this._init(t)};return a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.cid=e++,a.options=Gt(n.options,t),a["super"]=n,a.options.props&&Er(a),a.options.computed&&kr(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,F.forEach((function(t){a[t]=n[t]})),i&&(a.options.components[i]=a),a.superOptions=n.options,a.extendOptions=t,a.sealedOptions=j({},a.options),o[r]=a,a}}function Er(t){var e=t.options.props;for(var n in e)ir(t.prototype,"_props",n)}function kr(t){var e=t.options.computed;for(var n in e)pr(t.prototype,n,e[n])}function Tr(t){F.forEach((function(e){t[e]=function(t,n){return n?("component"===e&&l(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&"function"===typeof n&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}}))}function jr(t){return t&&(t.Ctor.options.name||t.tag)}function Ir(t,e){return Array.isArray(t)?t.indexOf(e)>-1:"string"===typeof t?t.split(",").indexOf(e)>-1:!!d(t)&&t.test(e)}function Pr(t,e){var n=t.cache,r=t.keys,o=t._vnode;for(var i in n){var a=n[i];if(a){var s=a.name;s&&!e(s)&&Nr(n,i,r,o)}}}function Nr(t,e,n,r){var o=t[e];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),t[e]=null,y(n,e)}br(Sr),yr(Sr),Tn(Sr),Nn(Sr),bn(Sr);var Dr=[String,RegExp,Array],Lr={name:"keep-alive",abstract:!0,props:{include:Dr,exclude:Dr,max:[String,Number]},methods:{cacheVNode:function(){var t=this,e=t.cache,n=t.keys,r=t.vnodeToCache,o=t.keyToCache;if(r){var i=r.tag,a=r.componentInstance,s=r.componentOptions;e[o]={name:jr(s),tag:i,componentInstance:a},n.push(o),this.max&&n.length>parseInt(this.max)&&Nr(e,n[0],n,this._vnode),this.vnodeToCache=null}}},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)Nr(this.cache,t,this.keys)},mounted:function(){var t=this;this.cacheVNode(),this.$watch("include",(function(e){Pr(t,(function(t){return Ir(e,t)}))})),this.$watch("exclude",(function(e){Pr(t,(function(t){return!Ir(e,t)}))}))},updated:function(){this.cacheVNode()},render:function(){var t=this.$slots.default,e=Sn(t),n=e&&e.componentOptions;if(n){var r=jr(n),o=this,i=o.include,a=o.exclude;if(i&&(!r||!Ir(i,r))||a&&r&&Ir(a,r))return e;var s=this,c=s.cache,u=s.keys,l=null==e.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):e.key;c[l]?(e.componentInstance=c[l].componentInstance,y(u,l),u.push(l)):(this.vnodeToCache=e,this.keyToCache=l),e.data.keepAlive=!0}return e||t&&t[0]}},Rr={KeepAlive:Lr};function Mr(t){var e={get:function(){return W}};Object.defineProperty(t,"config",e),t.util={warn:ft,extend:j,mergeOptions:Gt,defineReactive:Nt},t.set=Dt,t.delete=Lt,t.nextTick=ve,t.observable=function(t){return Pt(t),t},t.options=Object.create(null),F.forEach((function(e){t.options[e+"s"]=Object.create(null)})),t.options._base=t,j(t.options.components,Rr),Ar(t),$r(t),xr(t),Tr(t)}Mr(Sr),Object.defineProperty(Sr.prototype,"$isServer",{get:ct}),Object.defineProperty(Sr.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Sr,"FunctionalRenderContext",{value:Qe}),Sr.version="2.6.14";var Br=m("style,class"),Fr=m("input,textarea,option,select,progress"),qr=function(t,e,n){return"value"===n&&Fr(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},Wr=m("contenteditable,draggable,spellcheck"),Ur=m("events,caret,typing,plaintext-only"),Hr=function(t,e){return Yr(e)||"false"===e?"false":"contenteditable"===t&&Ur(e)?e:"true"},Vr=m("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),zr="http://www.w3.org/1999/xlink",Jr=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},Gr=function(t){return Jr(t)?t.slice(6,t.length):""},Yr=function(t){return null==t||!1===t};function Kr(t){var e=t.data,n=t,r=t;while(o(r.componentInstance))r=r.componentInstance._vnode,r&&r.data&&(e=Xr(r.data,e));while(o(n=n.parent))n&&n.data&&(e=Xr(e,n.data));return Zr(e.staticClass,e.class)}function Xr(t,e){return{staticClass:Qr(t.staticClass,e.staticClass),class:o(t.class)?[t.class,e.class]:e.class}}function Zr(t,e){return o(t)||o(e)?Qr(t,to(e)):""}function Qr(t,e){return t?e?t+" "+e:t:e||""}function to(t){return Array.isArray(t)?eo(t):c(t)?no(t):"string"===typeof t?t:""}function eo(t){for(var e,n="",r=0,i=t.length;r-1?co[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:co[t]=/HTMLUnknownElement/.test(e.toString())}var lo=m("text,number,password,search,email,tel,url");function po(t){if("string"===typeof t){var e=document.querySelector(t);return e||document.createElement("div")}return t}function fo(t,e){var n=document.createElement(t);return"select"!==t||e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n}function ho(t,e){return document.createElementNS(ro[t],e)}function vo(t){return document.createTextNode(t)}function mo(t){return document.createComment(t)}function go(t,e,n){t.insertBefore(e,n)}function yo(t,e){t.removeChild(e)}function _o(t,e){t.appendChild(e)}function bo(t){return t.parentNode}function wo(t){return t.nextSibling}function Co(t){return t.tagName}function Oo(t,e){t.textContent=e}function So(t,e){t.setAttribute(e,"")}var Ao=Object.freeze({createElement:fo,createElementNS:ho,createTextNode:vo,createComment:mo,insertBefore:go,removeChild:yo,appendChild:_o,parentNode:bo,nextSibling:wo,tagName:Co,setTextContent:Oo,setStyleScope:So}),$o={create:function(t,e){xo(e)},update:function(t,e){t.data.ref!==e.data.ref&&(xo(t,!0),xo(e))},destroy:function(t){xo(t,!0)}};function xo(t,e){var n=t.data.ref;if(o(n)){var r=t.context,i=t.componentInstance||t.elm,a=r.$refs;e?Array.isArray(a[n])?y(a[n],i):a[n]===i&&(a[n]=void 0):t.data.refInFor?Array.isArray(a[n])?a[n].indexOf(i)<0&&a[n].push(i):a[n]=[i]:a[n]=i}}var Eo=new _t("",{},[]),ko=["create","activate","update","remove","destroy"];function To(t,e){return t.key===e.key&&t.asyncFactory===e.asyncFactory&&(t.tag===e.tag&&t.isComment===e.isComment&&o(t.data)===o(e.data)&&jo(t,e)||i(t.isAsyncPlaceholder)&&r(e.asyncFactory.error))}function jo(t,e){if("input"!==t.tag)return!0;var n,r=o(n=t.data)&&o(n=n.attrs)&&n.type,i=o(n=e.data)&&o(n=n.attrs)&&n.type;return r===i||lo(r)&&lo(i)}function Io(t,e,n){var r,i,a={};for(r=e;r<=n;++r)i=t[r].key,o(i)&&(a[i]=r);return a}function Po(t){var e,n,a={},c=t.modules,u=t.nodeOps;for(e=0;ev?(d=r(n[y+1])?null:n[y+1].elm,O(t,d,n,h,y,i)):h>y&&A(e,p,v)}function E(t,e,n,r){for(var i=n;i-1?Ho(t,e,n):Vr(e)?Yr(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):Wr(e)?t.setAttribute(e,Hr(e,n)):Jr(e)?Yr(n)?t.removeAttributeNS(zr,Gr(e)):t.setAttributeNS(zr,e,n):Ho(t,e,n)}function Ho(t,e,n){if(Yr(n))t.removeAttribute(e);else{if(tt&&!et&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==n&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}var Vo={create:Wo,update:Wo};function zo(t,e){var n=e.elm,i=e.data,a=t.data;if(!(r(i.staticClass)&&r(i.class)&&(r(a)||r(a.staticClass)&&r(a.class)))){var s=Kr(e),c=n._transitionClasses;o(c)&&(s=Qr(s,to(c))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}var Jo,Go={create:zo,update:zo},Yo="__r",Ko="__c";function Xo(t){if(o(t[Yo])){var e=tt?"change":"input";t[e]=[].concat(t[Yo],t[e]||[]),delete t[Yo]}o(t[Ko])&&(t.change=[].concat(t[Ko],t.change||[]),delete t[Ko])}function Zo(t,e,n){var r=Jo;return function o(){var i=e.apply(null,arguments);null!==i&&ei(t,o,n,r)}}var Qo=se&&!(ot&&Number(ot[1])<=53);function ti(t,e,n,r){if(Qo){var o=Gn,i=e;e=i._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=o||t.timeStamp<=0||t.target.ownerDocument!==document)return i.apply(this,arguments)}}Jo.addEventListener(t,e,at?{capture:n,passive:r}:n)}function ei(t,e,n,r){(r||Jo).removeEventListener(t,e._wrapper||e,n)}function ni(t,e){if(!r(t.data.on)||!r(e.data.on)){var n=e.data.on||{},o=t.data.on||{};Jo=e.elm,Xo(n),we(n,o,ti,ei,Zo,e.context),Jo=void 0}}var ri,oi={create:ni,update:ni};function ii(t,e){if(!r(t.data.domProps)||!r(e.data.domProps)){var n,i,a=e.elm,s=t.data.domProps||{},c=e.data.domProps||{};for(n in o(c.__ob__)&&(c=e.data.domProps=j({},c)),s)n in c||(a[n]="");for(n in c){if(i=c[n],"textContent"===n||"innerHTML"===n){if(e.children&&(e.children.length=0),i===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n&&"PROGRESS"!==a.tagName){a._value=i;var u=r(i)?"":String(i);ai(a,u)&&(a.value=u)}else if("innerHTML"===n&&io(a.tagName)&&r(a.innerHTML)){ri=ri||document.createElement("div"),ri.innerHTML=""+i+"";var l=ri.firstChild;while(a.firstChild)a.removeChild(a.firstChild);while(l.firstChild)a.appendChild(l.firstChild)}else if(i!==s[n])try{a[n]=i}catch(Sa){}}}}function ai(t,e){return!t.composing&&("OPTION"===t.tagName||si(t,e)||ci(t,e))}function si(t,e){var n=!0;try{n=document.activeElement!==t}catch(Sa){}return n&&t.value!==e}function ci(t,e){var n=t.value,r=t._vModifiers;if(o(r)){if(r.number)return v(n)!==v(e);if(r.trim)return n.trim()!==e.trim()}return n!==e}var ui={create:ii,update:ii},li=w((function(t){var e={},n=/;(?![^(]*\))/g,r=/:(.+)/;return t.split(n).forEach((function(t){if(t){var n=t.split(r);n.length>1&&(e[n[0].trim()]=n[1].trim())}})),e}));function di(t){var e=pi(t.style);return t.staticStyle?j(t.staticStyle,e):e}function pi(t){return Array.isArray(t)?I(t):"string"===typeof t?li(t):t}function fi(t,e){var n,r={};if(e){var o=t;while(o.componentInstance)o=o.componentInstance._vnode,o&&o.data&&(n=di(o.data))&&j(r,n)}(n=di(t.data))&&j(r,n);var i=t;while(i=i.parent)i.data&&(n=di(i.data))&&j(r,n);return r}var hi,vi=/^--/,mi=/\s*!important$/,gi=function(t,e,n){if(vi.test(e))t.style.setProperty(e,n);else if(mi.test(n))t.style.setProperty($(e),n.replace(mi,""),"important");else{var r=_i(e);if(Array.isArray(n))for(var o=0,i=n.length;o-1?e.split(Ci).forEach((function(e){return t.classList.add(e)})):t.classList.add(e);else{var n=" "+(t.getAttribute("class")||"")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function Si(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(Ci).forEach((function(e){return t.classList.remove(e)})):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{var n=" "+(t.getAttribute("class")||"")+" ",r=" "+e+" ";while(n.indexOf(r)>=0)n=n.replace(r," ");n=n.trim(),n?t.setAttribute("class",n):t.removeAttribute("class")}}function Ai(t){if(t){if("object"===typeof t){var e={};return!1!==t.css&&j(e,$i(t.name||"v")),j(e,t),e}return"string"===typeof t?$i(t):void 0}}var $i=w((function(t){return{enterClass:t+"-enter",enterToClass:t+"-enter-to",enterActiveClass:t+"-enter-active",leaveClass:t+"-leave",leaveToClass:t+"-leave-to",leaveActiveClass:t+"-leave-active"}})),xi=K&&!et,Ei="transition",ki="animation",Ti="transition",ji="transitionend",Ii="animation",Pi="animationend";xi&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Ti="WebkitTransition",ji="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Ii="WebkitAnimation",Pi="webkitAnimationEnd"));var Ni=K?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function Di(t){Ni((function(){Ni(t)}))}function Li(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),Oi(t,e))}function Ri(t,e){t._transitionClasses&&y(t._transitionClasses,e),Si(t,e)}function Mi(t,e,n){var r=Fi(t,e),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var s=o===Ei?ji:Pi,c=0,u=function(){t.removeEventListener(s,l),n()},l=function(e){e.target===t&&++c>=a&&u()};setTimeout((function(){c0&&(n=Ei,l=a,d=i.length):e===ki?u>0&&(n=ki,l=u,d=c.length):(l=Math.max(a,u),n=l>0?a>u?Ei:ki:null,d=n?n===Ei?i.length:c.length:0);var p=n===Ei&&Bi.test(r[Ti+"Property"]);return{type:n,timeout:l,propCount:d,hasTransform:p}}function qi(t,e){while(t.length1}function Ji(t,e){!0!==e.data.show&&Ui(e)}var Gi=K?{create:Ji,activate:Ji,remove:function(t,e){!0!==t.data.show?Hi(t,e):e()}}:{},Yi=[Vo,Go,oi,ui,wi,Gi],Ki=Yi.concat(qo),Xi=Po({nodeOps:Ao,modules:Ki});et&&document.addEventListener("selectionchange",(function(){var t=document.activeElement;t&&t.vmodel&&ia(t,"input")}));var Zi={inserted:function(t,e,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?Ce(n,"postpatch",(function(){Zi.componentUpdated(t,e,n)})):Qi(t,e,n.context),t._vOptions=[].map.call(t.options,na)):("textarea"===n.tag||lo(t.type))&&(t._vModifiers=e.modifiers,e.modifiers.lazy||(t.addEventListener("compositionstart",ra),t.addEventListener("compositionend",oa),t.addEventListener("change",oa),et&&(t.vmodel=!0)))},componentUpdated:function(t,e,n){if("select"===n.tag){Qi(t,e,n.context);var r=t._vOptions,o=t._vOptions=[].map.call(t.options,na);if(o.some((function(t,e){return!L(t,r[e])}))){var i=t.multiple?e.value.some((function(t){return ea(t,o)})):e.value!==e.oldValue&&ea(e.value,o);i&&ia(t,"change")}}}};function Qi(t,e,n){ta(t,e,n),(tt||nt)&&setTimeout((function(){ta(t,e,n)}),0)}function ta(t,e,n){var r=e.value,o=t.multiple;if(!o||Array.isArray(r)){for(var i,a,s=0,c=t.options.length;s-1,a.selected!==i&&(a.selected=i);else if(L(na(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));o||(t.selectedIndex=-1)}}function ea(t,e){return e.every((function(e){return!L(e,t)}))}function na(t){return"_value"in t?t._value:t.value}function ra(t){t.target.composing=!0}function oa(t){t.target.composing&&(t.target.composing=!1,ia(t.target,"input"))}function ia(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function aa(t){return!t.componentInstance||t.data&&t.data.transition?t:aa(t.componentInstance._vnode)}var sa={bind:function(t,e,n){var r=e.value;n=aa(n);var o=n.data&&n.data.transition,i=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&o?(n.data.show=!0,Ui(n,(function(){t.style.display=i}))):t.style.display=r?i:"none"},update:function(t,e,n){var r=e.value,o=e.oldValue;if(!r!==!o){n=aa(n);var i=n.data&&n.data.transition;i?(n.data.show=!0,r?Ui(n,(function(){t.style.display=t.__vOriginalDisplay})):Hi(n,(function(){t.style.display="none"}))):t.style.display=r?t.__vOriginalDisplay:"none"}},unbind:function(t,e,n,r,o){o||(t.style.display=t.__vOriginalDisplay)}},ca={model:Zi,show:sa},ua={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function la(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?la(Sn(e.children)):t}function da(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var o=n._parentListeners;for(var i in o)e[O(i)]=o[i];return e}function pa(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}function fa(t){while(t=t.parent)if(t.data.transition)return!0}function ha(t,e){return e.key===t.key&&e.tag===t.tag}var va=function(t){return t.tag||Ne(t)},ma=function(t){return"show"===t.name},ga={name:"transition",props:ua,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(va),n.length)){0;var r=this.mode;0;var o=n[0];if(fa(this.$vnode))return o;var i=la(o);if(!i)return o;if(this._leaving)return pa(t,o);var a="__transition-"+this._uid+"-";i.key=null==i.key?i.isComment?a+"comment":a+i.tag:s(i.key)?0===String(i.key).indexOf(a)?i.key:a+i.key:i.key;var c=(i.data||(i.data={})).transition=da(this),u=this._vnode,l=la(u);if(i.data.directives&&i.data.directives.some(ma)&&(i.data.show=!0),l&&l.data&&!ha(i,l)&&!Ne(l)&&(!l.componentInstance||!l.componentInstance._vnode.isComment)){var d=l.data.transition=j({},c);if("out-in"===r)return this._leaving=!0,Ce(d,"afterLeave",(function(){e._leaving=!1,e.$forceUpdate()})),pa(t,o);if("in-out"===r){if(Ne(i))return u;var p,f=function(){p()};Ce(c,"afterEnter",f),Ce(c,"enterCancelled",f),Ce(d,"delayLeave",(function(t){p=t}))}}return o}}},ya=j({tag:String,moveClass:String},ua);delete ya.mode;var _a={props:ya,beforeMount:function(){var t=this,e=this._update;this._update=function(n,r){var o=In(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,o(),e.call(t,n,r)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,o=this.$slots.default||[],i=this.children=[],a=da(this),s=0;s`${t}=${e}`).join("&")}function a(t=[],e=[]){let n="";return t.length&&(n+=`product_stars_ids=${t}&`),e.length&&(n+="collection_stars_ids="+e),Object(o["a"])("/plugins/fetch-stars?"+n)}function s(){return Object(o["a"])("/get-example-widgets")}function c(t={}){return Object(o["a"])("/plugins/product_api?"+i(t))}function u(t={}){return Object(o["a"])("/plugins/shop_api?"+i(t))}function l(t={}){return Object(o["a"])("/plugins/badge_api?"+i(t))}function d(t={}){return Object(o["a"])("/plugins/shop_config?"+i(t))}function p(){return Object(o["c"])("https://cdn.opinew.com/shop-widgets/static/i18n/lang.json").then(t=>JSON.parse(t))}},"3c7c":function(t,e,n){"use strict";n("7f37")},"4de8":function(t,e,n){"use strict";var r=n("7c9b");e["a"]={props:{loadConfig:{type:Object,default:()=>{}}},data(){return{shopConfig:{}}},watch:{loadConfig:{handler(t){const e=JSON.parse(JSON.stringify(this.shopConfig));t&&(Object(r["b"])(t,e),this.$setLocale(e.preferredLanguage||this.$lisan.getLocaleName()||"en"),(e.permissions||{}).qAndA||(e.questionsAndAnswersActive=!1)),this.shopConfig=e},deep:!0,immediate:!0}}}},"56d7":function(t,e,n){"use strict";n.r(e);var r=n("2b0e"),o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"opinew-widget-wrapper",attrs:{"data-platform-product-id":t.prodId}},[t.loadConfig||t.isReviewRequestPage?["sms_unsubscribed"===t.urlParams.type?n("sms-unsubscribed",{staticStyle:{"margin-left":"auto","margin-right":"auto","max-width":"800px"},attrs:{"phone-number":t.urlParams.phoneNumber,"shop-name":t.urlParams.shopName,"shop-domain":t.urlParams.shopDomain}}):t.request?n("review-request",{staticStyle:{"margin-left":"auto","margin-right":"auto","max-width":"1000px"},attrs:{"load-config":t.loadConfig}}):t.badge?n("all-reviews-badge",{attrs:{"load-config":t.loadConfig,"load-badge-info":t.loadBadge}}):t.carousel?n("review-carousel",{attrs:{"load-config":t.loadConfig}}):t.floating?n("floating-widget",{attrs:{"load-config":t.loadConfig,"load-products":t.loadProducts}}):n("shared-app-view",{attrs:{"load-config":t.loadConfig,"load-products":t.loadProducts}})]:t._e()],2)},i=[],a=n("365c"),s=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-card",[n("v-card-title",{staticClass:"headline",attrs:{"primary-title":""}},[t._v(t._s(t.$i("ReviewRequest.smsUnsubscribe.success")))]),n("v-card-text",[t._v(" "+t._s(t.$i("ReviewRequest.smsUnsubscribe.unsubscribedText",[t.phoneNumber]))+" ")]),n("v-divider"),n("v-card-actions",[n("v-spacer"),n("a",{attrs:{href:"https://"+t.shopDomain}},[n("v-btn",{staticClass:"text-white",attrs:{color:"#2a64c9"}},[t._v(t._s(t.$i("ReviewRequest.smsUnsubscribe.goToShop",[t.shopName])))])],1)],1)],1)},c=[],u={name:"App",props:{phoneNumber:{type:String,default:"",required:!0},shopName:{type:String,default:"",required:!0},shopDomain:{type:String,default:"",required:!0}}},l=u,d=(n("dd9e"),n("0c7c")),p=Object(d["a"])(l,s,c,!1,null,"d56a813a",null),f=p.exports,h=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"all-reviews-badge"},[n("div",{staticClass:"opw-w-auto opw-inline-block opw-border opw-border-solid opw-rounded opw-block opw-appearance-none opw-leading-normal opw-mx-4 opw-my-2 opw-font-sans opw-font-normal",style:{"background-color":t.shopConfig.badgeBackgroundColor+" !important","border-color":t.shopConfig.badgeBorderColor}},[n("a",{staticClass:"opw-no-underline",attrs:{href:t.shopConfig.badgeShopReviewsLink,target:"_blank"}},["badgeWideAverage"===t.widgetType?n("div",{staticClass:"opw-py-2 opw-px-4"},[n("div",{staticClass:"opw-flex opw-flex-row"},[n("span",{staticClass:"opw-pr-2 opw-my-auto",style:t.fontStyle("badgeAverageScore"),attrs:{id:"item-star-rating"}},[t._v(t._s(t.averageStars))]),n("div",{staticClass:"opw-my-auto opw-text-center opw-leading-none",style:t.fontStyle("badgePrimary")},[n("review-stars",{attrs:{data:t.starsData}})],1)]),n("p",{staticClass:"opw-text-center",style:t.fontStyle("badgeSecondary","badgeSecondaryTextColor")},[t._v(" "+t._s(t.$i("summaryCard.from"))+" "+t._s(t.totalReviews)+" "+t._s(t.$i("summaryCard.reviews"))+" ")])]):"badgeSmall"===t.widgetType?n("div",{staticClass:"opw-py-2 opw-px-4"},[n("div",{staticClass:"opw-my-auto opw-text-center opw-leading-none",style:t.fontStyle("badgePrimary")},[n("review-stars",{attrs:{data:t.starsData}})],1),n("div",{staticClass:"opw-flex opw-flex-row"},[n("span",{staticClass:"opw-pr-2 opw-my-auto",style:t.fontStyle("badgeAverageScore"),attrs:{id:"item-star-rating"}},[t._v(t._s(t.averageStars))]),n("span",{staticClass:"opw-m-auto",style:t.fontStyle("badgePrimary")},[t._v(t._s(t.$i("reviewsBadge.average")))])]),n("p",{staticClass:"opw-text-center",style:t.fontStyle("badgeSecondary","badgeSecondaryTextColor")},[t._v(" "+t._s(t.totalReviews)+" "+t._s(t.$i("summaryCard.reviews"))+" ")])]):n("div",{staticClass:"opw-pt-2 opw-px-4"},[n("p",{staticClass:"opw-text-center",style:t.fontStyle("badgePrimary")},[t._v(" "+t._s(t.totalReviews)+" "+t._s(t.$i("summaryCard.reviews"))+" ")]),n("div",{staticClass:"opw-my-auto opw-text-center opw-leading-none",style:t.fontStyle("badgeAverageScore")},[n("review-stars",{attrs:{data:t.starsData}})],1)])]),n("div",{staticClass:"opw-text-center opw-border-solid opw-border-0 opw-py-2",style:{"border-color":t.shopConfig.badgeBorderColor,"border-top-width":t.bottomBorder?"1px !important":"0px"}},[n("a",{staticClass:"opw-flex",attrs:{href:t.shopConfig.opinewLink,target:"_blank"}},[n("img",{staticClass:"opw-h-4 opw-mx-auto opw-border-0",attrs:{alt:"Opinew logo",src:t.opinewLogo}})])])])])},v=[],m=function(t,e){var n=e._c;return n("div",e._l(e.props.data.numStars,(function(t){return n("span",{key:t},[e.props.data.averageStars>=t-.5?n("span",{style:{color:e.props.data.starsColor,"font-size":"1.5em"},attrs:{"aria-hidden":"true"}},[e._v("★")]):n("span",{style:{color:e.props.data.starsColor,"font-size":"1.5em"},attrs:{"aria-hidden":"true"}},[e._v("☆")])])})),0)},g=[],y={},_=Object(d["a"])(y,m,g,!0,null,null,null),b=_.exports,w=n("7c9b"),C=n("4de8"),O={name:"AllReviewsBadge",components:{ReviewStars:b},mixins:[C["a"]],props:{loadBadgeInfo:{type:Object,default:()=>({})}},data(){return{opinewLogo:"https://cdn.opinew.com/global/opinew_logo.png",widgetType:"",numStars:5,averageStars:0,totalReviews:0,bottomBorder:!1,shopConfig:{badgeStarsColor:"#ffc617",badgeBorderColor:"#dae1e7",badgeBackgroundColor:"#ffffff",badgeTextColor:"#000000",badgeSecondaryTextColor:"#606f7b",fonts:{badgeAverageScore:null,badgePrimary:null,badgeSecondary:null},badgeShopReviewsLink:"",opinewLink:"http://opinew.com/"}}},methods:{loadPluginJSON(){const t=Object(w["g"])(this.loadBadgeInfo,w["h"]);Object.entries(t).forEach(([t,e])=>{this[t]=e}),this.bottomBorder=["badgeWideAverage","badgeSmall"].includes(this.widgetType)},fontStyle(t,e="badgeTextColor"){return Object(w["d"])({fontSize:this.shopConfig.fonts[t],color:this.shopConfig[e]})}},computed:{starsData(){return{averageStars:this.averageStars,numStars:this.numStars,starsColor:this.shopConfig.badgeStarsColor}}},watch:{loadBadgeInfo:{handler(t){t&&this.loadPluginJSON()},deep:!0}},mounted(){this.loadBadgeInfo&&this.loadPluginJSON()}},S=O,A=(n("3c7c"),Object(d["a"])(S,h,v,!1,null,"1ca38a28",null)),$=A.exports,x=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{ref:"floatingModal"},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.open,expression:"open"}],staticClass:"opw-overlay"},[t.open?n("div",{staticClass:"opw-modal-wrapper",on:{click:function(e){return e.target!==e.currentTarget?null:t.changeModal.apply(null,arguments)}}},[n("div",{staticClass:"opw-modal-spacer"},[n("button",{staticClass:"opw-modal-button",on:{click:t.changeModal}},[n("svg",{attrs:{width:"20",height:"20"}},[n("g",{attrs:{"stroke-width":"3",stroke:"rgba(255, 255, 255, 255)"}},[n("line",{attrs:{x1:"4",y1:"4",x2:"18",y2:"18"}}),n("line",{attrs:{x1:"4",y1:"18",x2:"18",y2:"4"}})])])])]),n("div",{staticClass:"opw-modal-window"},[n("shared-app-view",{attrs:{"load-config":t.loadConfig,"load-products":t.loadProducts}})],1)]):t._e()]),t.shopConfig.displayFloatingWidget?n("span",{staticClass:"opw-cursor-pointer opw-inline-block opw-px-4 opw-py-3 opw-border opw-mt-0 opw-mr-2",style:t.floatingButtonStyle(),on:{click:t.changeModal}},[t._v(" "+t._s(t.$i("general.reviews"))+" ")]):t._e()])},E=[];const k=()=>Promise.all([n.e("opw-request"),n.e("opw-product")]).then(n.bind(null,"04de"));var T={name:"FloatingWidget",mixins:[C["a"]],props:{loadConfig:{type:Object,default:null},loadProducts:{type:Object,default:null}},data(){return{open:this.openedModal}},components:{sharedAppView:k},mounted(){document.body.insertBefore(this.$refs.floatingModal,document.body.firstChild)},methods:{floatingButtonStyle(){return Object(w["d"])({"background-color":this.shopConfig.floatingWidgetButtonBackgroundColor,"border-color":this.shopConfig.floatingWidgetButtonTextColor,"font-size":this.shopConfig.fonts.navbarButtonsFontSize,"z-index":"97",color:this.shopConfig.floatingWidgetButtonTextColor,position:"fixed",transform:"rotate(90deg)","-webkit-transform":"rotate(90deg)","transform-origin":"bottom left","-webkit-transform-origin":"bottom left",padding:"10px",top:"50%",left:"left"===this.shopConfig.floatingWidgetButtonPosition?"0%":"98%"})},changeModal(){this.open=!this.open}}},j=T,I=(n("3004"),Object(d["a"])(j,x,E,!1,null,null,null)),P=I.exports;const N=()=>Promise.all([n.e("opw-request"),n.e("opw-product")]).then(n.bind(null,"04de")),D=()=>n.e("opw-request").then(n.bind(null,"222b")),L=()=>n.e("opw-carousel").then(n.bind(null,"bd23"));var R={props:{productId:{type:String,default:""},domain:{type:String,default:""},all:Boolean,request:Boolean,badge:Boolean,carousel:Boolean,floating:Boolean},name:"App",components:{ReviewRequest:D,SmsUnsubscribed:f,allReviewsBadge:$,reviewCarousel:L,sharedAppView:N,FloatingWidget:P},data(){return{loadProducts:null,loadConfig:null,loadBadge:null,ppId:""}},async mounted(){const t=this.loadConfigJSON();!document.getElementById("opinew_config_container")&&this.domain||await t,this.badge?this.loadBadgeJSON():this.carousel||this.request||this.loadProductsJSON()},computed:{urlParams(){return Object.fromEntries(decodeURI(window.location.search).slice(1).split("&").map(t=>t.split("=")).filter(t=>t[0]).map(([t,e])=>[Object(w["h"])(t),e]))},prodId(){return this.productId||this.ppId},shopKeyObject(){return this.loadConfig&&this.loadConfig.shop&&this.loadConfig.shop.id?{shopId:this.loadConfig.shop.id}:{shopDomain:this.computedShopDomain}},computedShopDomain(){let t=encodeURIComponent(this.domain||window.location.host);return t},isReviewRequestPage(){return this.request&&(this.urlParams.reviewRequestToken||this.urlParams.reviewEditToken)}},methods:{async loadConfigJSON(){const t=document.getElementById("opinew_config_container");if(t)this.loadConfig=t&&Object(w["g"])(JSON.parse(t.getAttribute("data-opwconfig")),w["h"]);else if(!this.isReviewRequestPage){const t=await Object(a["getConfigData"])({shopDomain:this.computedShopDomain});this.loadConfig=t.config}},loadProductsJSON(){const t=this.$el.getRootNode().host,e=t?t.closest("[data-opw-prodreviews]"):this.$el.closest("[data-opw-prodreviews]"),n=e&&e.getAttribute("data-opw-prodreviews");n?this.loadProducts=Object(w["g"])(JSON.parse(e.getAttribute("data-opw-prodreviews")),w["h"]):(this.prodId||this.all)&&this.loadApiProducts()},async loadBadgeJSON(){const t=document.getElementById("badge_plugin_data");if(t){const e=Object(w["g"])(JSON.parse(t.textContent),w["h"]);this.loadBadge={widgetType:e.widgetType,averageStars:e.product.averageStars,totalReviews:e.product.reviewNumber}}else try{const{product:{reviewNumber:t,averageStars:e},widgetType:n}=await Object(a["getBadgeData"])(this.shopKeyObject);this.loadBadge={widgetType:n,averageStars:e,totalReviews:t}}catch(e){console.error("err")}},loadApiProducts(t=1){return this.all?Object(a["getAllProductData"])({...this.shopKeyObject,page:t}).then(t=>{t&&Object.keys(t).length&&(this.loadProducts=t)}):Object(a["getProduct"])({getBy:"platform_product_id",platformProductId:this.prodId,js:1,page:t}).then(t=>{t&&Object.keys(t).length&&(this.loadProducts=t)})}}},M=R,B=(n("034f"),Object(d["a"])(M,o,i,!1,null,null,null)),F=B.exports;var q=n("c9d9");class W{constructor(t=[]){this.queue=[],this.selectors=t,this.handleBodyChange=this.handleBodyChange.bind(this),this.observe=this.observe.bind(this)}observe(){const t={attributes:!1,childList:!0,subtree:!0},e=new MutationObserver(this.handleBodyChange);e.observe(document.body,t)}getfilteredNodes(t){return Array.from(document.querySelectorAll(t)).filter(t=>!this.queue.includes(t.dataset.productId))}handleBodyChange(){this.selectors.forEach(t=>{const[e,n]=t,r=this.getfilteredNodes(e);r&&r.length&&n([...r])})}}var U=W;function H(){const t=document.querySelector("[data-platform-product-id]");return t?t.dataset.platformProductId:""}function V(t){const e=H();return n=>{n.forEach(n=>{const o=n.dataset.productId||e;delete n.dataset.productId,new r["a"]({render:e=>e(F,{props:{productId:o,[t]:!0},attrs:{id:"opinew-plugin"}})}).$mount(n)})}}var z=q["DYNAMIC_NODES"].map(([t,e])=>[t+(t.includes("product-plugin")?q["PRODUCT_ID_SELECTOR"]:""),V(e)]);const{getRates:J}=n("365c"),{STARS_SELECTOR:G,COLLECTION_SELECTOR:Y}=n("c9d9"),K=[];async function X({node:t,collectionIds:e=[],productIds:n=[]}){try{const{productStars:r,collectionStars:o}=await J(n,e);r&&r[n[0]]?t.innerHTML=r[n[0]]||"":o&&o[e[0]]&&(t.innerHTML=o[e[0]]||"")}catch(r){console.error(r)}}async function Z(t=[]){const e=t.filter(t=>[...t.classList].includes(G)),n=t.filter(t=>[...t.classList].includes(Y)),r=e.map(t=>t.dataset.productId),o=n.map(t=>t.dataset.productId);K.splice(0,0,...r,...o);try{const{productStars:t,collectionStars:i}=await J([...new Set(r)],[...new Set(o)]);t&&e.forEach(e=>{e.dataset.productId&&(e.innerHTML=t[e.dataset.productId]||"",delete e.dataset.productId)}),i&&n.forEach(t=>{t.dataset.productId&&(t.innerHTML=i[t.dataset.productId]||"",delete t.dataset.productId)})}catch(i){console.error(i)}}var Q=[[`.${G}[data-product-id],.${Y}[data-product-id]`,Z]],tt=n("f160");const et=()=>{const t=document.querySelector("[data-opw-lang]");return JSON.parse(t&&t.dataset&&t.dataset.opwLang||window.i18n||"{}")},nt=t=>Object.fromEntries(Object.entries(t).reduce((t,[e,n])=>(t.push([e,Object(w["c"])(n)]),t),[]));async function rt(){let t=et();return Object.keys(t).length||(t=await Object(a["getLangData"])()),nt(t)}async function ot(){const t=await rt(),e={async install(e){e.prototype.$i=tt["lisan"].t.bind(tt["lisan"]),e.prototype.$lisan=tt["lisan"],e.prototype.$setLocale=e=>{tt["lisan"].setLocaleName(e),tt["lisan"].add({locale:e,entries:t[e]})};const n=tt["lisan"].getLocaleName()||"en";tt["lisan"].setLocaleName(n),tt["lisan"].add({locale:n,entries:t[n]})}};r["a"].use(e)}const it=!0;window.OPW_WIDGETS_VERSION="1.5.4-0-gf4cd041",it&&window.OPW_PUBLIC_KEY&&(window.OPW_CHECKER_ENDPOINT,1)&&n.e("opw-checker").then(n.t.bind(null,"87db",7)),(async()=>{await ot();for(const[o,i]of q["WIDGET_NODES"]){const t=document.getElementById(o);t&&new r["a"]({render:t=>t(F,{props:{[i]:!0}})}).$mount(t)}const t=new U(z.concat(Q));document.body?t.observe():window.addEventListener("DOMContentLoaded",t.observe);const e=it?'[href*="opinew"]':"";class n extends HTMLElement{constructor(){super(),this.attachStyles=this.attachStyles.bind(this),this.shadowDom=this.attachShadow({mode:"open"}),this.root=document.createElement("div"),this.shadowDom.appendChild(this.root),this.setStyleWatcher()}get type(){return this.getAttribute("type")}get domain(){return this.getAttribute("domain")}get productId(){return this.getAttribute("product-id")}connectedCallback(){if(!this.type)throw new Error("Opinew Plugin: widget type not set");this.type.includes("stars")?this.renderStars():this.renderVue()}scrollToWidget(){const t=-120;let e=document.querySelector('opinew-plugin[type="product"]');if(e){e=e.shadowRoot.querySelector("div.opinew-widget-wrapper");const n=e.getBoundingClientRect().top+window.pageYOffset+t;window.scrollTo({top:n,behavior:"smooth"})}}async renderStars(){if(this.type){await X({node:this.root,[this.type.includes("collection")?"collectionIds":"productIds"]:[this.productId]});const t=this.root.firstElementChild;t&&t.classList.add("opw-cursor-pointer","opw-inline-block"),t&&"product-stars"===this.type&&t.addEventListener("click",this.scrollToWidget)}}async renderVue(){const t=new r["a"]({render:t=>t(F,{props:{[this.type]:!0,productId:this.productId,domain:this.domain}})}).$mount(this.root);this.appRoot=t.$el}attachStyles(t){t.map(t=>[...t.addedNodes]).flat().forEach(t=>{const e=!it||t.href&&t.href.includes("opinew");"stylesheet"===t.rel&&e&&this.shadowDom.insertBefore(t.cloneNode(!0),this.shadowDom.lastElementChild)})}setStyleWatcher(){const t=[...document.querySelectorAll('#opinew_product_plugin_css,link[rel="stylesheet"]'+e)];t.forEach(t=>{this.shadowDom.insertBefore(t.cloneNode(!0),this.shadowDom.lastElementChild)});const n={attributes:!1,childList:!0,subtree:!1},r=new MutationObserver(this.attachStyles);r.observe(document.head,n)}}window.customElements.get("opinew-plugin")||window.customElements.define("opinew-plugin",n)})()},"5c3a":function(t,e,n){},"7c9b":function(t,e,n){"use strict";function r(t){return Object.fromEntries(Object.entries(t).filter(([t,e])=>![null,void 0].includes(e)).map(([t,e])=>[t,e+"!important"]))}function o(t){return t.replace(/_[a-z0-9]/g,t=>t[1].toUpperCase())}function i(t){return t.replace(/([A-Z]+|[0-9]+)/g,"_$1").toLowerCase()}function a(t,e){return t&&Object.fromEntries(Object.entries(t).map(([t,n])=>[e(t),n]))}n.d(e,"d",(function(){return r})),n.d(e,"h",(function(){return o})),n.d(e,"a",(function(){return i})),n.d(e,"f",(function(){return a})),n.d(e,"e",(function(){return s})),n.d(e,"g",(function(){return c})),n.d(e,"b",(function(){return u})),n.d(e,"c",(function(){return l}));const s=t=>"[object Object]"===Object.prototype.toString.apply(t);function c(t,e){return t&&Object.fromEntries(Object.entries(t).map(([t,n])=>{const r=[e(t)];return Array.isArray(n)&&n.every(s)?r.push(n.map(t=>c(t,e))):s(n)?r.push(c(n,e)):r.push(n),r}))}function u(t,e){Object.entries(t).forEach(([t,n])=>{Array.isArray(n)?(e[o(t)]=e[o(t)]||[],n.every(t=>"object"===typeof t)?e[o(t)]=n.map(t=>c(t,o)):e[o(t)]=n):n&&"object"===typeof n?(e[o(t)]=e[o(t)]||{},u(n,e[o(t)])):void 0!==n&&(e[o(t)]=n)})}function l(t){return Object.fromEntries(Object.entries(t).reduce((t,[e,n])=>("string"==typeof n?t.push([e,n]):s(n)&&Object.entries(n).forEach(([n,r])=>t.push([`${e}.${n}`,r])),t),[]))}},"7f37":function(t,e,n){},"8b5d":function(t,e,n){},c8ba:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}t.exports=n},c9d9:function(t,e,n){"use strict";n.r(e),n.d(e,"PRODUCT_ID_SELECTOR",(function(){return r})),n.d(e,"STARS_SELECTOR",(function(){return o})),n.d(e,"COLLECTION_SELECTOR",(function(){return i})),n.d(e,"DYNAMIC_NODES",(function(){return a})),n.d(e,"WIDGET_NODES",(function(){return s})),e["default"]={SERVER_URL:window.OPW_API_ENDPOINT||"https://api.opinew.com",MAX_DISPLAYED_BODY_LENGTH:300,STARS_RANGE:[1,2,3,4,5],EMPTY_STAR:"empty",HALF_STAR:"half",FULL_STAR:"full",WIDGET_THEME_STYLE_CARD:"card",WIDGET_THEME_STYLE_FLAT:"flat",WIDGET_TOP_SECTION_STYLE_DEFAULT:"default",WIDGET_TOP_SECTION_STYLE_CONDENSED:"condensed",WIDGET_TOP_SECTION_STYLE_CLEAN:"clean",WIDGET_TOP_SECTION_STYLE_MINIMAL:"minimal",WIDGET_TOP_SECTION_STYLE_MODERN:"modern",REQUEST_TYPES:{admin:"admin",create:"create",unverified:"unverified",unverifiedCreate:"unverifiedCreate",test:"test"}};const r="[data-product-id]",o="opw-dynamic-stars",i="opw-dynamic-stars-collection",a=[[".opinew-product-plugin-dynamic","prod"],[".opinew-review-request-dynamic","request"],[".opinew-badge-plugin-dynamic","badge"],[".opinew-carousel-plugin-dynamic","carousel"],[".opinew-all-reviews-plugin-dynamic","all"]],s=[["opinew_product_plugin_app","prod"],["opinew_review_request_app","request"],["opinew_badge_plugin_app","badge"],["opinew_carousel_plugin_app","carousel"],["opinew_all_reviews_plugin_app","all"],["opinew_product_floating_widget","floating"]]},dd9e:function(t,e,n){"use strict";n("0779")},e1d2:function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"c",(function(){return l})),n.d(e,"a",(function(){return d})),n.d(e,"b",(function(){return p}));var o=n("7c9b");class i{constructor(){r(this,"requestPromises",{}),r(this,"dataPromises",{})}async getCachedResponse(t){return t in this.requestPromises||(this.requestPromises[t]=fetch(t)),!this.dataPromises[t]&&this.requestPromises[t]&&(this.dataPromises[t]=this.requestPromises[t].then(t=>{if(!t.ok)throw new Error(`Invalid server resp: ${t.statusText} (${t.status})`);return t.json()})),this.dataPromises[t]}async get(t){return this.getCachedResponse(t).then(t=>Object(o["g"])(t,o["h"])).catch(t=>{console.error(t)})}}var a=i;const s=new a;function c(t){const e=window.OPW_API_ENDPOINT||"https://api.opinew.com";return"http"===t.slice(0,4)?t:e+t}async function u(t){if(!t.ok)throw new Error(`Invalid server resp: ${t.statusText} (${t.status})`);return Object(o["g"])(await t.json(),o["h"])}function l(t){return s.getCachedResponse(c(t))}async function d(t,e){let n="";return e&&(n=Object.entries(e).reduce((t,[e,n])=>t+`${e}=${n}&`,"?")),await s.get(c(t+n))}async function p(t,e,n){const r=e instanceof FormData,i=r?{}:{"Content-Type":"application/json"},a=await fetch(c(t),{headers:{...i,...n},method:"POST",body:r?e:JSON.stringify(Object(o["g"])(e,o["a"]))});return u(a)}},f160:function(t,e,n){!function(t,n){n(e)}(0,(function(t){"use strict";var e=function(){return(e=Object.assign||function(t){for(var e,n=1,r=arguments.length;n