@polyv/product-ui 1.1.0-rc-20250703.1 → 1.2.0-rc-20250724.2
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/address-edit.cjs.js +7 -3
- package/address-edit.es.js +1175 -1137
- package/address-edit.umd.js +7 -3
- package/address-item.cjs.js +1 -1
- package/address-item.es.js +2 -2
- package/address-item.umd.js +3 -2
- package/address-list.cjs.js +2 -2
- package/address-list.es.js +8 -2
- package/address-list.umd.js +2 -2
- package/big-card-popup.cjs.js +5 -3
- package/big-card-popup.es.js +334 -297
- package/big-card-popup.umd.js +5 -3
- package/index.cjs.js +7 -3
- package/index.es.js +1230 -1159
- package/index.umd.js +7 -3
- package/mobile-product-pendant.cjs.js +2 -2
- package/mobile-product-pendant.es.js +3 -3
- package/mobile-product-pendant.umd.js +2 -2
- package/order-confirm.cjs.js +5 -3
- package/order-confirm.es.js +284 -278
- package/order-confirm.umd.js +5 -3
- package/order-detail.cjs.js +5 -3
- package/order-detail.es.js +284 -278
- package/order-detail.umd.js +5 -3
- package/order-item.cjs.js +1 -1
- package/order-item.es.js +8 -2
- package/order-item.umd.js +3 -2
- package/order-list-popup.cjs.js +5 -3
- package/order-list-popup.es.js +292 -281
- package/order-list-popup.umd.js +5 -3
- package/order-list.cjs.js +2 -2
- package/order-list.es.js +8 -2
- package/order-list.umd.js +2 -2
- package/order-popup.cjs.js +7 -3
- package/order-popup.es.js +1178 -1140
- package/order-popup.umd.js +7 -3
- package/package.json +2 -2
- package/pc-product-pendant.cjs.js +2 -2
- package/pc-product-pendant.es.js +8 -2
- package/pc-product-pendant.umd.js +2 -2
- package/product-button.cjs.js +3 -3
- package/product-button.es.js +23 -9
- package/product-button.umd.js +3 -3
- package/product-detail-popup.cjs.js +5 -3
- package/product-detail-popup.es.js +319 -290
- package/product-detail-popup.umd.js +5 -3
- package/product-detail.cjs.js +5 -3
- package/product-detail.es.js +319 -290
- package/product-detail.umd.js +5 -3
- package/product-iframe-link-popup.cjs.js +5 -3
- package/product-iframe-link-popup.es.js +286 -281
- package/product-iframe-link-popup.umd.js +5 -3
- package/product-item.cjs.js +5 -3
- package/product-item.es.js +327 -294
- package/product-item.umd.js +5 -3
- package/product-list-popup.cjs.js +5 -3
- package/product-list-popup.es.js +337 -297
- package/product-list-popup.umd.js +5 -3
- package/product-list.cjs.js +5 -3
- package/product-list.es.js +337 -297
- package/product-list.umd.js +5 -3
- package/small-card.cjs.js +5 -3
- package/small-card.es.js +324 -291
- package/small-card.umd.js +5 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
!function(){"use strict";try{if("undefined"!=typeof document){var t=document.createElement("style");t.appendChild(document.createTextNode(".plv-product-common-pendant{position:relative;width:36px;height:36px;overflow:hidden;border-radius:4px;cursor:pointer}.plv-product-common-pendant+.plv-product-common-pendant{margin-top:8px}.plv-product-common-pendant__icon{width:100%;height:100%;background-repeat:no-repeat;background-size:100% 100%}.plv-product-common-pendant__text{position:absolute;bottom:7px;left:50%;display:flex;justify-content:center;align-items:center;box-sizing:border-box;min-width:32px;height:12px;padding:0 2px;border-radius:6px;color:#fff;text-align:center;white-space:nowrap;transform:translate(-50%)}.plv-product-common-pendant__text span{font-size:12px}.plv-product-pendant .plv-product-common-pendant__text{font-family:DINPro-Regular,sans-serif}")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();
|
|
2
|
-
"use strict";var t=Object.defineProperty,e=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,o=(e,n,r)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,i=(t,i)=>{for(var s in i||(i={}))n.call(i,s)&&o(t,s,i[s]);if(e)for(var s of e(i))r.call(i,s)&&o(t,s,i[s]);return t},s=(t,e,n)=>o(t,"symbol"!=typeof e?e+"":e,n);const a=require("vue"),u=[{divisor:86400,unit:"days"},{divisor:3600,unit:"hours"},{divisor:60,unit:"minutes"},{divisor:1,unit:"seconds"}];class c{constructor(t,e){if(t|=0,isNaN(t))throw new Error("Total seconds must be a number");this._totalMSecs=1e3*t,this._cb=e}_exec(){if(!this._startTime||null==this._usingMSecs)return;let t=Math.max(0,this._usingMSecs-(Date.now()-this._startTime));if(t>0&&setTimeout((
|
|
2
|
+
"use strict";var t=Object.defineProperty,e=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,o=(e,n,r)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,i=(t,i)=>{for(var s in i||(i={}))n.call(i,s)&&o(t,s,i[s]);if(e)for(var s of e(i))r.call(i,s)&&o(t,s,i[s]);return t},s=(t,e,n)=>o(t,"symbol"!=typeof e?e+"":e,n);const a=require("vue"),u=[{divisor:86400,unit:"days"},{divisor:3600,unit:"hours"},{divisor:60,unit:"minutes"},{divisor:1,unit:"seconds"}];class c{constructor(t,e){if(t|=0,isNaN(t))throw new Error("Total seconds must be a number");this._totalMSecs=1e3*t,this._cb=e}_exec(){if(!this._startTime||null==this._usingMSecs)return;let t=Math.max(0,this._usingMSecs-(Date.now()-this._startTime));if(t>0&&setTimeout(()=>{this._exec()},1e3),this._remainingMSecs=t,t>=0){const e={days:0,hours:0,minutes:0,seconds:0,totalMsecs:t};t=Math.round(t/1e3),u.forEach((n,r)=>{e[n.unit]=t/n.divisor,r===u.length-1?e[n.unit]=Math.round(e[n.unit]):(e[n.unit]=Math.floor(e[n.unit]),t%=n.divisor)}),this._cb(e)}}start(){null==this._usingMSecs&&(this._usingMSecs=this._totalMSecs),this._usingMSecs<=0||(this._startTime=Date.now(),this._exec())}_break(){this._timerId&&clearTimeout(this._timerId),this._startTime=void 0}stop(){this._break(),this._usingMSecs=this._totalMSecs}pause(){this._break(),this._usingMSecs=this._remainingMSecs}}const l=(t={})=>{var e,n;let r=null!=(e=t.second)?e:a.ref(),o=null!=(n=t.endTimestamp)?n:a.ref(),s=t.onCountDownChange,u=t.onCountDownFinish;function l(t={}){var e,n;t.second&&(e=t.second,a.isRef(r)?r.value=a.isRef(e)?e.value:e:r=e||r),t.endTimestamp&&(n=t.endTimestamp,a.isRef(o)?o.value=a.isRef(n)?n.value:n:o=n||o),t.onCountDownChange&&(s=t.onCountDownChange),t.onCountDownFinish&&(u=t.onCountDownFinish)}const d={days:0,hours:0,minutes:0,seconds:0,totalMsecs:0},f=a.ref(i({},d)),p=a.computed(()=>{const t=f.value.totalMsecs/1e3;return parseInt(t.toString())}),v=()=>{const t=a.unref(r),e=a.unref(o);if("number"==typeof t)return t;if("number"==typeof e){const t=(e-Date.now())/1e3;return t<0?0:t}return 0};let y;function m(){f.value=i({},d),g(),y=new c(v(),O),h()}function g(){b(),y=void 0}function h(t,e=!1){t&&l(t),e?m():y?y.start():m()}function b(){y&&y.stop()}function O(t){f.value=t,s&&s(a.unref(f)),0===t.totalMsecs&&u&&u()}return a.onUnmounted(()=>{g()}),{surplusTime:f,surplusSecond:p,computedSecond:v,initCountDown:m,startCountDown:h,resetSurplus:function(){f.value=i({},d)},stopCountDown:b,destroyCountDown:g}};
|
|
3
3
|
/*!
|
|
4
4
|
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
5
5
|
*
|
|
6
6
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
7
7
|
* Released under the MIT License.
|
|
8
|
-
*/function d(t){return"[object Object]"===Object.prototype.toString.call(t)}function f(){return f=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},f.apply(this,arguments)}function p(t,e){if(null==t)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}const v={silent:!1,logLevel:"warn"},y=["validator"],m=Object.prototype,g=m.toString,h=m.hasOwnProperty,b=/^\s*function (\w+)/;function O(t){var e;const n=null!==(e=null==t?void 0:t.type)&&void 0!==e?e:t;if(n){const t=n.toString().match(b);return t?t[1]:""}return""}const w=function(t){var e,n;return!1!==d(t)&&(void 0===(e=t.constructor)||!1!==d(n=e.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))};function j(){}let C=j;if("production"!=={}.NODE_ENV){const t="undefined"!=typeof console;C=t?function(t,e=v.logLevel){!1===v.silent&&console[e](`[VueTypes warn]: ${t}`)}:j}const T=(t,e)=>h.call(t,e),S=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},_=Array.isArray||function(t){return"[object Array]"===g.call(t)},A=t=>"[object Function]"===g.call(t),P=(t,e)=>w(t)&&T(t,"_vueTypes_name")&&(!e||t._vueTypes_name===e),x=t=>w(t)&&(T(t,"type")||["_vueTypes_name","validator","default","required"].some((e=>T(t,e))));function M(t,e){return Object.defineProperty(t.bind(e),"__original",{value:t})}function k(t,e,n=!1){let r,o=!0,i="";r=w(t)?t:{type:t};const s=P(r)?r._vueTypes_name+" - ":"";if(x(r)&&null!==r.type){if(void 0===r.type||!0===r.type)return o;if(!r.required&&null==e)return o;_(r.type)?(o=r.type.some((t=>!0===k(t,e,!0))),i=r.type.map((t=>O(t))).join(" or ")):(i=O(r),o="Array"===i?_(e):"Object"===i?w(e):"String"===i||"Number"===i||"Boolean"===i||"Function"===i?function(t){if(null==t)return"";const e=t.constructor.toString().match(b);return e?e[1].replace(/^Async/,""):""}(e)===i:e instanceof r.type)}if(!o){const t=`${s}value "${e}" should be of type "${i}"`;return!1===n?(C(t),!1):t}if(T(r,"validator")&&A(r.validator)){const t=C,i=[];if(C=t=>{i.push(t)},o=r.validator(e),C=t,!o){const t=(i.length>1?"* ":"")+i.join("\n* ");return i.length=0,!1===n?(C(t),o):t}}return o}function D(t,e){const n=Object.defineProperties(e,{_vueTypes_name:{value:t,writable:!0},isRequired:{get(){return this.required=!0,this}},def:{value(t){return void 0===t?this.type===Boolean||Array.isArray(this.type)&&this.type.includes(Boolean)?void(this.default=void 0):(T(this,"default")&&delete this.default,this):A(t)||!0===k(this,t,!0)?(this.default=_(t)?()=>[...t]:w(t)?()=>Object.assign({},t):t,this):(C(`${this._vueTypes_name} - invalid default value: "${t}"`),this)}}}),{validator:r}=n;return A(r)&&(n.validator=M(r,n)),n}function I(t,e){const n=D(t,e);return Object.defineProperty(n,"validate",{value(t){return A(this.validator)&&C(`${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info:\n${JSON.stringify(this)}`),this.validator=M(t,this),this}})}function G(t,e,n){const r=function(t){const e={};return Object.getOwnPropertyNames(t).forEach((n=>{e[n]=Object.getOwnPropertyDescriptor(t,n)})),Object.defineProperties({},e)}(e);if(r._vueTypes_name=t,!w(n))return r;const{validator:o}=n,i=p(n,y);if(A(o)){let{validator:t}=r;t&&(t=null!==(a=(s=t).__original)&&void 0!==a?a:s),r.validator=M(t?function(e){return t.call(this,e)&&o.call(this,e)}:o,r)}var s,a;return Object.assign(r,i)}function J(t){return t.replace(/^(?!\s*$)/gm," ")}const R=()=>I("any",{}),K=()=>I("function",{type:Function}),E=()=>I("boolean",{type:Boolean}),B=()=>I("string",{type:String}),N=()=>I("number",{type:Number}),U=()=>I("array",{type:Array}),Z=()=>I("object",{type:Object});function F(t,e="custom validation failed"){if("function"!=typeof t)throw new TypeError("[VueTypes error]: You must provide a function as argument");return D(t.name||"<<anonymous function>>",{type:null,validator(n){const r=t(n);return r||C(`${this._vueTypes_name} - ${e}`),r}})}function H(t){if(!_(t))throw new TypeError("[VueTypes error]: You must provide an array as argument.");const e=`oneOf - value should be one of "${t.map((t=>"symbol"==typeof t?t.toString():t)).join('", "')}".`,n={validator(n){const r=-1!==t.indexOf(n);return r||C(e),r}};if(-1===t.indexOf(null)){const e=t.reduce(((t,e)=>{if(null!=e){const n=e.constructor;-1===t.indexOf(n)&&t.push(n)}return t}),[]);e.length>0&&(n.type=e)}return D("oneOf",n)}function q(t){if(!_(t))throw new TypeError("[VueTypes error]: You must provide an array as argument");let e=!1,n=!1,r=[];for(let i=0;i<t.length;i+=1){const o=t[i];if(x(o)){if(A(o.validator)&&(e=!0),P(o,"oneOf")&&o.type){r=r.concat(o.type);continue}if(P(o,"nullable")){n=!0;continue}if(!0===o.type||!o.type){C('oneOfType - invalid usage of "true" and "null" as types.');continue}r=r.concat(o.type)}else r.push(o)}r=r.filter(((t,e)=>r.indexOf(t)===e));const o=!1===n&&r.length>0?r:null;return D("oneOfType",e?{type:o,validator(e){const n=[],r=t.some((t=>{const r=k(t,e,!0);return"string"==typeof r&&n.push(r),!0===r}));return r||C(`oneOfType - provided value does not match any of the ${n.length} passed-in validators:\n${J(n.join("\n"))}`),r}}:{type:o})}function X(t){return D("arrayOf",{type:Array,validator(e){let n="";const r=e.every((e=>(n=k(t,e,!0),!0===n)));return r||C(`arrayOf - value validation error:\n${J(n)}`),r}})}function L(t){return D("instanceOf",{type:t})}function z(t){return D("objectOf",{type:Object,validator(e){let n="";const r=Object.keys(e).every((r=>(n=k(t,e[r],!0),!0===n)));return r||C(`objectOf - value validation error:\n${J(n)}`),r}})}function Q(t){const e=Object.keys(t),n=e.filter((e=>{var n;return!(null===(n=t[e])||void 0===n||!n.required)})),r=D("shape",{type:Object,validator(r){if(!w(r))return!1;const o=Object.keys(r);if(n.length>0&&n.some((t=>-1===o.indexOf(t)))){const t=n.filter((t=>-1===o.indexOf(t)));return C(1===t.length?`shape - required property "${t[0]}" is not defined.`:`shape - required properties "${t.join('", "')}" are not defined.`),!1}return o.every((n=>{if(-1===e.indexOf(n))return!0===this._vueTypes_isLoose||(C(`shape - shape definition does not include a "${n}" property. Allowed keys: "${e.join('", "')}".`),!1);const o=k(t[n],r[n],!0);return"string"==typeof o&&C(`shape - "${n}" property validation error:\n ${J(o)}`),!0===o}))}});return Object.defineProperty(r,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(r,"loose",{get(){return this._vueTypes_isLoose=!0,this}}),r}const Y=["name","validate","getter"],V=(t=>((t=class{static get any(){return R()}static get func(){return K().def(this.defaults.func)}static get bool(){return void 0===this.defaults.bool?E():E().def(this.defaults.bool)}static get string(){return B().def(this.defaults.string)}static get number(){return N().def(this.defaults.number)}static get array(){return U().def(this.defaults.array)}static get object(){return Z().def(this.defaults.object)}static get integer(){return D("integer",{type:Number,validator(t){const e=S(t);return!1===e&&C(`integer - "${t}" is not an integer`),e}}).def(this.defaults.integer)}static get symbol(){return D("symbol",{validator(t){const e="symbol"==typeof t;return!1===e&&C(`symbol - invalid value "${t}"`),e}})}static get nullable(){return Object.defineProperty({type:null,validator(t){const e=null===t;return!1===e&&C("nullable - value should be null"),e}},"_vueTypes_name",{value:"nullable"})}static extend(t){if(C("VueTypes.extend is deprecated. Use the ES6+ method instead. See https://dwightjack.github.io/vue-types/advanced/extending-vue-types.html#extending-namespaced-validators-in-es6 for details."),_(t))return t.forEach((t=>this.extend(t))),this;const{name:e,validate:n=!1,getter:r=!1}=t,o=p(t,Y);if(T(this,e))throw new TypeError(`[VueTypes error]: Type "${e}" already defined`);const{type:i}=o;if(P(i))return delete o.type,Object.defineProperty(this,e,r?{get:()=>G(e,i,o)}:{value(...t){const n=G(e,i,o);return n.validator&&(n.validator=n.validator.bind(n,...t)),n}});let s;return s=r?{get(){const t=Object.assign({},o);return n?I(e,t):D(e,t)},enumerable:!0}:{value(...t){const r=Object.assign({},o);let i;return i=n?I(e,r):D(e,r),r.validator&&(i.validator=r.validator.bind(i,...t)),i},enumerable:!0},Object.defineProperty(this,e,s)}}).defaults={},t.sensibleDefaults=void 0,t.config=v,t.custom=F,t.oneOf=H,t.instanceOf=L,t.oneOfType=q,t.arrayOf=X,t.objectOf=z,t.shape=Q,t.utils={validate:(t,e)=>!0===k(e,t,!0),toType:(t,e,n=!1)=>n?I(t,e):D(t,e)},t))();!function(t={func:()=>{},bool:!0,string:"",number:0,array:()=>[],object:()=>({}),integer:0}){var e;(e=class extends V{static get sensibleDefaults(){return f({},this.defaults)}static set sensibleDefaults(e){this.defaults=!1!==e?f({},!0!==e?e:t):{}}}).defaults=f({},t)}();class W{static get string(){return B().def("")}static get looseString(){return B()}static get number(){return N().def(0)}static get looseNumber(){return N()}static get bool(){return E().def(!0)}static get looseBool(){return q([]).def(void 0)}static get looseElement(){return q([]).def(void 0)}}s(W,"objectType",Z),s(W,"array",(()=>U().def([]))),s(W,"object",Z),s(W,"func",K),s(W,"oneOf",H),s(W,"oneOfType",q),s(W,"enum",B),s(W,"any",R);const $=(()=>{let t;return()=>{if(null==t)try{t=function(){const t=document.createElement("canvas");if(t.getContext&&t.getContext("2d")){const e="image/webp";return 0===t.toDataURL(e).indexOf("data:"+e)}return!1}()||function(){let t=!1;const e=navigator.userAgent,n=/\bOS\s([\d_.]+)\slike\sMac\sOS\sX\b/.exec(e);if(n)t=parseInt(n[1])>=14;else{const n=/\bVersion\/([\d.]+)\sSafari\b/.exec(e);n&&(t=parseInt(n[1])>=16)}return t}()}catch(e){t=!1}return t}})();function tt(t,e){const n=function(t){let e;if("undefined"!=typeof document){const n=document.createElement("a");n.href=t,e=n}else if("function"==typeof URL)try{e=new URL(/^\/\//.test(t)?"https:"+t:t)}catch(n){}return e}(t);if(!n)return t;const r=function(t){const e=(t||"").split("."),n=e[e.length-1];return n?n.toLowerCase():""}(n.pathname.split("/").pop());if(!/\.videocc\.net$/i.test(n.hostname)||"svg"===r)return t;const o=function(t,e){let n="";return null==e.width&&null==e.height||(n+="/resize",e.width&&(n+=",w_"+e.width),e.height&&(n+=",h_"+e.height),n+=",limit_1"),e.allowAVIF&&"gif"!==t?n+="/format,avif":!0===e.allowWebP||"auto"===e.allowWebP&&$()?n+="/format,webp/quality,Q_80":e.allowJPG&&"gif"!==t&&(n+="/format,jpg/quality,Q_80"),n}(r,function(t){var e,n;const r="number"==typeof t?{width:t}:t;return r.allowJPG=null===(e=r.allowJPG)||void 0===e||e,r.allowWebP=null!==(n=r.allowWebP)&&void 0!==n?n:"auto",r}(e));return o&&(n.search=function(t,e){let n=!1;return t=t.replace(/([?&]x-oss-process)(?:=([^&]*))?/,((t,r,o)=>(n=!0,/^image/.test(o)?r+"="+o.replace(/\/(?:resize|format|quality)[^/]*/gi,"")+e:t))),n?t:t+(-1===t.indexOf("?")?"?":"&")+"x-oss-process=image"+e}(n.search,o)),n.href}function et(t,e,n,r,o,i,s,a){var u="function"==typeof t?t.options:t;return e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),{exports:t,options:u}}const nt=et(a.defineComponent({__name:"index",props:{iconUrl:W.string,text:W.string,countdownSecond:W.number,countdownTimestamp:W.number},emits:{"click-pendant":()=>!0},setup(t,{emit:e}){const n=t,{startCountDown:r,stopCountDown:o,resetSurplus:i,surplusSecond:s}=l(),u=a.computed((()=>s.value>0?function(t,e={segments:2,digits:2}){if(t=Number(t),isNaN(t)||t<0)throw new Error('"secs" must be a positive integer');let n=2;"auto"===e.segments&&t>=3600?n=3:"number"==typeof e.segments&&-1!==[2,3].indexOf(e.segments)&&(n=e.segments);let r=0|(e.digits||2);r=Math.max(1,r);const o=new Array(r+1).join("0"),i=[60,1];return 3===n&&i.unshift(3600),i.map((e=>{const n=Math.floor(t/e),i=n.toString().length;return t%=e,(o+n).slice(-Math.max(i,r))})).join(":")}(s.value,{segments:"auto"}):n.text)),c=a.computed((()=>{const t={};return n.iconUrl&&(t.backgroundImage=`url(${tt(n.iconUrl,{width:120})})`),t}));return a.watch((()=>[n.countdownSecond,n.countdownTimestamp]),(()=>{n.countdownSecond?r({second:n.countdownSecond}):n.countdownTimestamp?r({endTimestamp:n.countdownTimestamp}):(o(),i())}),{immediate:!0}),{__sfc:!0,props:n,emit:e,startCountDown:r,stopCountDown:o,resetSurplus:i,surplusSecond:s,pendantText:u,pendantIconStyle:c}}}),(function(){var t=this,e=t._self._c,n=t._self._setupProxy;return e("div",{staticClass:"plv-product-common-pendant",on:{click:function(t){return n.emit("click-pendant")}}},[e("div",{staticClass:"plv-product-common-pendant__icon",style:n.pendantIconStyle}),n.pendantText?e("div",{staticClass:"plv-product-common-pendant__text"},[e("span",[t._v(t._s(n.pendantText))])]):t._e()])}),[]).exports;const rt="__product-event-emitter-key";function ot(){if(window[rt])return window[rt];const t={all:e=e||new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map((function(t){t(n)})),(r=e.get("*"))&&r.slice().map((function(e){e(t,n)}))}};var e;return window[rt]=t,t}var it=(t=>(t.ZH_CN="zh_CN",t.ZH_TW="zh_TW",t.English="en",t.Japanese="ja",t.Korean="ko",t.Russian="ru",t))(it||{});const st="openProductListPopup",at=t=>{const{props:e}=t,{getEmitter:n}=(()=>{const t=a.inject("interactGlobalConfigV2",{globalLang:it.ZH_CN});return{injectData:t,toast:e=>{t.toast&&t.toast(e)},getEmitter:function(){return t.getEmitter?t.getEmitter():ot()},messageBox:e=>t.messageBox?t.messageBox(e):Promise.resolve(!1)}})(),r=a.ref(""),o=a.ref(!1);return{productTotal:r,isCollapsed:o,onClickPendant:function(){n().emit(st)},getProductTotal:function(){return t=this,n=null,o=function*(){const t=yield e.productTarget.getProductList();r.value=String(t.total)},new Promise(((e,r)=>{var i=t=>{try{a(o.next(t))}catch(e){r(e)}},s=t=>{try{a(o.throw(t))}catch(e){r(e)}},a=t=>t.done?e(t.value):Promise.resolve(t.value).then(i,s);a((o=o.apply(t,n)).next())}));var t,n,o},toggleCollapse:function(){o.value=!o.value}}};const ut=et(a.defineComponent({__name:"mobile-product-pendant",props:{productTarget:W.object().isRequired},setup(t){const e=t,{productTotal:n,onClickPendant:r,getProductTotal:o}=at({props:e});return a.onMounted((()=>{o()})),{__sfc:!0,props:e,productTotal:n,onClickPendant:r,getProductTotal:o,pendantIcon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAkFSURBVHic7ZxNbFxX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S8xzUaeSiuoIZXfsANUc5YUtOqjiqsRSS/yTtehfuKXMG2K0c65CeQa3OP9A07TDJtjNzpN0/Od7dZE78LbwIjeyPk7Suz17Ft47paxJxqkH/x8wBED54ps3cVYZmTmK97pfdSgTgBQMD9LD7qTWhuGvMcWCWqp/OpwtOCF7wMBrRQ9cyJIJGN0hNMOn7dMIMTp4xvQ44fthra2TIZ9IJxf+y5gzCHBG2P14A3jBFOj2ASnevdquhmZNgTNyOQdKICaBIn5xiZ8u1w6T65bEPUpsgAUwHHBGDE4IIIjTivsRUukHurG0cV/88Pl3mKL5FCP4gS6z9vlWOO+/AHED7FNAan1R8V+YYwImZhK99+8cMkOldC1NSOp3pOrlbuRZc266XrjcxKBkWDQIQXOslZUpYUY8ybZcJ71XNkYCXAse0xAKQ/jU0oj8H7VDJJJBOXqfLtEWOOz+s3UsBk2ZP6uOHUOzMVSFagMRKZR1JpXtn03fM9k5Et53o1+fvak/0S9e5DIuEnilaFvkVsbysXWK2J4rPDnxnB9nhhrELYWaKzib8y4qoXTECJF6sXEWy0peIE3Piu30vmCMB0TkhW+pNWif8K2L5RxUTBvZn0rviMpJqRr9fmIOXZYrvwqKgCgXju2Kd6GYRK5Uqu2IeSdW95ijsd63mKJaPsLEorCLDebH8vPXtZ6e/aoiVSpWWmEeIq/uGOcLrMaX7bapB3YPhVaQ/L5afr2qm2yfOr4V381v49NcRYglJ7z2rvT7n2Bgq/ETNCXrgiMwySnwHVYR/WSz/cCXPfHMDBLRfE4dZaJ1DMgdyGpn445sSCMWy6rMnFCY2ivQ5J3Hg6wMsXEcEVbzgKtJfFT9/Iff/ujCSkYxkJCMZyf0t/wVfoDB9IXM0sAAAAABJRU5ErkJggg==",CommonPendant:nt}}}),(function(){var t=this,e=t._self._c,n=t._self._setupProxy;return e("div",{staticClass:"plv-product-pendant"},[n.productTotal?e(n.CommonPendant,{attrs:{"icon-url":n.pendantIcon,text:n.productTotal},on:{"click-pendant":n.onClickPendant}}):t._e()],1)}),[]).exports;module.exports=ut,console.log("%c@polyv/product-ui","background:#409EFF;padding: 2px 6px;border-radius: 3px;color: #fff","[component: mobile-product-pendant]","[version: 1.1.0-rc-20250703.1]","[buildTime: 2025-07-03 01:48:03]");
|
|
8
|
+
*/function d(t){return"[object Object]"===Object.prototype.toString.call(t)}function f(){return f=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},f.apply(this,arguments)}function p(t,e){if(null==t)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}const v={silent:!1,logLevel:"warn"},y=["validator"],m=Object.prototype,g=m.toString,h=m.hasOwnProperty,b=/^\s*function (\w+)/;function O(t){var e;const n=null!==(e=null==t?void 0:t.type)&&void 0!==e?e:t;if(n){const t=n.toString().match(b);return t?t[1]:""}return""}const w=function(t){var e,n;return!1!==d(t)&&(void 0===(e=t.constructor)||!1!==d(n=e.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))};function j(){}let C=j;if("production"!=={}.NODE_ENV){const t="undefined"!=typeof console;C=t?function(t,e=v.logLevel){!1===v.silent&&console[e](`[VueTypes warn]: ${t}`)}:j}const T=(t,e)=>h.call(t,e),S=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},_=Array.isArray||function(t){return"[object Array]"===g.call(t)},A=t=>"[object Function]"===g.call(t),P=(t,e)=>w(t)&&T(t,"_vueTypes_name")&&(!e||t._vueTypes_name===e),x=t=>w(t)&&(T(t,"type")||["_vueTypes_name","validator","default","required"].some(e=>T(t,e)));function M(t,e){return Object.defineProperty(t.bind(e),"__original",{value:t})}function k(t,e,n=!1){let r,o=!0,i="";r=w(t)?t:{type:t};const s=P(r)?r._vueTypes_name+" - ":"";if(x(r)&&null!==r.type){if(void 0===r.type||!0===r.type)return o;if(!r.required&&null==e)return o;_(r.type)?(o=r.type.some(t=>!0===k(t,e,!0)),i=r.type.map(t=>O(t)).join(" or ")):(i=O(r),o="Array"===i?_(e):"Object"===i?w(e):"String"===i||"Number"===i||"Boolean"===i||"Function"===i?function(t){if(null==t)return"";const e=t.constructor.toString().match(b);return e?e[1].replace(/^Async/,""):""}(e)===i:e instanceof r.type)}if(!o){const t=`${s}value "${e}" should be of type "${i}"`;return!1===n?(C(t),!1):t}if(T(r,"validator")&&A(r.validator)){const t=C,i=[];if(C=t=>{i.push(t)},o=r.validator(e),C=t,!o){const t=(i.length>1?"* ":"")+i.join("\n* ");return i.length=0,!1===n?(C(t),o):t}}return o}function D(t,e){const n=Object.defineProperties(e,{_vueTypes_name:{value:t,writable:!0},isRequired:{get(){return this.required=!0,this}},def:{value(t){return void 0===t?this.type===Boolean||Array.isArray(this.type)&&this.type.includes(Boolean)?void(this.default=void 0):(T(this,"default")&&delete this.default,this):A(t)||!0===k(this,t,!0)?(this.default=_(t)?()=>[...t]:w(t)?()=>Object.assign({},t):t,this):(C(`${this._vueTypes_name} - invalid default value: "${t}"`),this)}}}),{validator:r}=n;return A(r)&&(n.validator=M(r,n)),n}function I(t,e){const n=D(t,e);return Object.defineProperty(n,"validate",{value(t){return A(this.validator)&&C(`${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info:\n${JSON.stringify(this)}`),this.validator=M(t,this),this}})}function G(t,e,n){const r=function(t){const e={};return Object.getOwnPropertyNames(t).forEach(n=>{e[n]=Object.getOwnPropertyDescriptor(t,n)}),Object.defineProperties({},e)}(e);if(r._vueTypes_name=t,!w(n))return r;const{validator:o}=n,i=p(n,y);if(A(o)){let{validator:t}=r;t&&(t=null!==(a=(s=t).__original)&&void 0!==a?a:s),r.validator=M(t?function(e){return t.call(this,e)&&o.call(this,e)}:o,r)}var s,a;return Object.assign(r,i)}function J(t){return t.replace(/^(?!\s*$)/gm," ")}const R=()=>I("any",{}),K=()=>I("function",{type:Function}),E=()=>I("boolean",{type:Boolean}),B=()=>I("string",{type:String}),N=()=>I("number",{type:Number}),U=()=>I("array",{type:Array}),Z=()=>I("object",{type:Object});function F(t,e="custom validation failed"){if("function"!=typeof t)throw new TypeError("[VueTypes error]: You must provide a function as argument");return D(t.name||"<<anonymous function>>",{type:null,validator(n){const r=t(n);return r||C(`${this._vueTypes_name} - ${e}`),r}})}function H(t){if(!_(t))throw new TypeError("[VueTypes error]: You must provide an array as argument.");const e=`oneOf - value should be one of "${t.map(t=>"symbol"==typeof t?t.toString():t).join('", "')}".`,n={validator(n){const r=-1!==t.indexOf(n);return r||C(e),r}};if(-1===t.indexOf(null)){const e=t.reduce((t,e)=>{if(null!=e){const n=e.constructor;-1===t.indexOf(n)&&t.push(n)}return t},[]);e.length>0&&(n.type=e)}return D("oneOf",n)}function q(t){if(!_(t))throw new TypeError("[VueTypes error]: You must provide an array as argument");let e=!1,n=!1,r=[];for(let i=0;i<t.length;i+=1){const o=t[i];if(x(o)){if(A(o.validator)&&(e=!0),P(o,"oneOf")&&o.type){r=r.concat(o.type);continue}if(P(o,"nullable")){n=!0;continue}if(!0===o.type||!o.type){C('oneOfType - invalid usage of "true" and "null" as types.');continue}r=r.concat(o.type)}else r.push(o)}r=r.filter((t,e)=>r.indexOf(t)===e);const o=!1===n&&r.length>0?r:null;return D("oneOfType",e?{type:o,validator(e){const n=[],r=t.some(t=>{const r=k(t,e,!0);return"string"==typeof r&&n.push(r),!0===r});return r||C(`oneOfType - provided value does not match any of the ${n.length} passed-in validators:\n${J(n.join("\n"))}`),r}}:{type:o})}function X(t){return D("arrayOf",{type:Array,validator(e){let n="";const r=e.every(e=>(n=k(t,e,!0),!0===n));return r||C(`arrayOf - value validation error:\n${J(n)}`),r}})}function L(t){return D("instanceOf",{type:t})}function z(t){return D("objectOf",{type:Object,validator(e){let n="";const r=Object.keys(e).every(r=>(n=k(t,e[r],!0),!0===n));return r||C(`objectOf - value validation error:\n${J(n)}`),r}})}function Q(t){const e=Object.keys(t),n=e.filter(e=>{var n;return!(null===(n=t[e])||void 0===n||!n.required)}),r=D("shape",{type:Object,validator(r){if(!w(r))return!1;const o=Object.keys(r);if(n.length>0&&n.some(t=>-1===o.indexOf(t))){const t=n.filter(t=>-1===o.indexOf(t));return C(1===t.length?`shape - required property "${t[0]}" is not defined.`:`shape - required properties "${t.join('", "')}" are not defined.`),!1}return o.every(n=>{if(-1===e.indexOf(n))return!0===this._vueTypes_isLoose||(C(`shape - shape definition does not include a "${n}" property. Allowed keys: "${e.join('", "')}".`),!1);const o=k(t[n],r[n],!0);return"string"==typeof o&&C(`shape - "${n}" property validation error:\n ${J(o)}`),!0===o})}});return Object.defineProperty(r,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(r,"loose",{get(){return this._vueTypes_isLoose=!0,this}}),r}const Y=["name","validate","getter"],V=(t=>((t=class{static get any(){return R()}static get func(){return K().def(this.defaults.func)}static get bool(){return void 0===this.defaults.bool?E():E().def(this.defaults.bool)}static get string(){return B().def(this.defaults.string)}static get number(){return N().def(this.defaults.number)}static get array(){return U().def(this.defaults.array)}static get object(){return Z().def(this.defaults.object)}static get integer(){return D("integer",{type:Number,validator(t){const e=S(t);return!1===e&&C(`integer - "${t}" is not an integer`),e}}).def(this.defaults.integer)}static get symbol(){return D("symbol",{validator(t){const e="symbol"==typeof t;return!1===e&&C(`symbol - invalid value "${t}"`),e}})}static get nullable(){return Object.defineProperty({type:null,validator(t){const e=null===t;return!1===e&&C("nullable - value should be null"),e}},"_vueTypes_name",{value:"nullable"})}static extend(t){if(C("VueTypes.extend is deprecated. Use the ES6+ method instead. See https://dwightjack.github.io/vue-types/advanced/extending-vue-types.html#extending-namespaced-validators-in-es6 for details."),_(t))return t.forEach(t=>this.extend(t)),this;const{name:e,validate:n=!1,getter:r=!1}=t,o=p(t,Y);if(T(this,e))throw new TypeError(`[VueTypes error]: Type "${e}" already defined`);const{type:i}=o;if(P(i))return delete o.type,Object.defineProperty(this,e,r?{get:()=>G(e,i,o)}:{value(...t){const n=G(e,i,o);return n.validator&&(n.validator=n.validator.bind(n,...t)),n}});let s;return s=r?{get(){const t=Object.assign({},o);return n?I(e,t):D(e,t)},enumerable:!0}:{value(...t){const r=Object.assign({},o);let i;return i=n?I(e,r):D(e,r),r.validator&&(i.validator=r.validator.bind(i,...t)),i},enumerable:!0},Object.defineProperty(this,e,s)}}).defaults={},t.sensibleDefaults=void 0,t.config=v,t.custom=F,t.oneOf=H,t.instanceOf=L,t.oneOfType=q,t.arrayOf=X,t.objectOf=z,t.shape=Q,t.utils={validate:(t,e)=>!0===k(e,t,!0),toType:(t,e,n=!1)=>n?I(t,e):D(t,e)},t))();!function(t={func:()=>{},bool:!0,string:"",number:0,array:()=>[],object:()=>({}),integer:0}){var e;(e=class extends V{static get sensibleDefaults(){return f({},this.defaults)}static set sensibleDefaults(e){this.defaults=!1!==e?f({},!0!==e?e:t):{}}}).defaults=f({},t)}();class W{static get string(){return B().def("")}static get looseString(){return B()}static get number(){return N().def(0)}static get looseNumber(){return N()}static get bool(){return E().def(!0)}static get looseBool(){return q([]).def(void 0)}static get looseElement(){return q([]).def(void 0)}}s(W,"objectType",Z),s(W,"array",()=>U().def([])),s(W,"object",Z),s(W,"func",K),s(W,"oneOf",H),s(W,"oneOfType",q),s(W,"enum",B),s(W,"any",R);const $=(()=>{let t;return()=>{if(null==t)try{t=function(){const t=document.createElement("canvas");if(t.getContext&&t.getContext("2d")){const e="image/webp";return 0===t.toDataURL(e).indexOf("data:"+e)}return!1}()||function(){let t=!1;const e=navigator.userAgent,n=/\bOS\s([\d_.]+)\slike\sMac\sOS\sX\b/.exec(e);if(n)t=parseInt(n[1])>=14;else{const n=/\bVersion\/([\d.]+)\sSafari\b/.exec(e);n&&(t=parseInt(n[1])>=16)}return t}()}catch(e){t=!1}return t}})();function tt(t,e){const n=function(t){let e;if("undefined"!=typeof document){const n=document.createElement("a");n.href=t,e=n}else if("function"==typeof URL)try{e=new URL(/^\/\//.test(t)?"https:"+t:t)}catch(n){}return e}(t);if(!n)return t;const r=function(t){const e=(t||"").split("."),n=e[e.length-1];return n?n.toLowerCase():""}(n.pathname.split("/").pop());if(!/\.videocc\.net$/i.test(n.hostname)||"svg"===r)return t;const o=function(t,e){let n="";return null==e.width&&null==e.height||(n+="/resize",e.width&&(n+=",w_"+e.width),e.height&&(n+=",h_"+e.height),n+=",limit_1"),e.allowAVIF&&"gif"!==t?n+="/format,avif":!0===e.allowWebP||"auto"===e.allowWebP&&$()?n+="/format,webp/quality,Q_80":e.allowJPG&&"gif"!==t&&(n+="/format,jpg/quality,Q_80"),n}(r,function(t){var e,n;const r="number"==typeof t?{width:t}:t;return r.allowJPG=null===(e=r.allowJPG)||void 0===e||e,r.allowWebP=null!==(n=r.allowWebP)&&void 0!==n?n:"auto",r}(e));return o&&(n.search=function(t,e){let n=!1;return t=t.replace(/([?&]x-oss-process)(?:=([^&]*))?/,(t,r,o)=>(n=!0,/^image/.test(o)?r+"="+o.replace(/\/(?:resize|format|quality)[^/]*/gi,"")+e:t)),n?t:t+(-1===t.indexOf("?")?"?":"&")+"x-oss-process=image"+e}(n.search,o)),n.href}function et(t,e,n,r,o,i,s,a){var u="function"==typeof t?t.options:t;return e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),{exports:t,options:u}}const nt=et(a.defineComponent({__name:"index",props:{iconUrl:W.string,text:W.string,countdownSecond:W.number,countdownTimestamp:W.number},emits:{"click-pendant":()=>!0},setup(t,{emit:e}){const n=t,{startCountDown:r,stopCountDown:o,resetSurplus:i,surplusSecond:s}=l(),u=a.computed(()=>s.value>0?function(t,e={segments:2,digits:2}){if(t=Number(t),isNaN(t)||t<0)throw new Error('"secs" must be a positive integer');let n=2;"auto"===e.segments&&t>=3600?n=3:"number"==typeof e.segments&&-1!==[2,3].indexOf(e.segments)&&(n=e.segments);let r=0|(e.digits||2);r=Math.max(1,r);const o=new Array(r+1).join("0"),i=[60,1];return 3===n&&i.unshift(3600),i.map(e=>{const n=Math.floor(t/e),i=n.toString().length;return t%=e,(o+n).slice(-Math.max(i,r))}).join(":")}(s.value,{segments:"auto"}):n.text),c=a.computed(()=>{const t={};return n.iconUrl&&(t.backgroundImage=`url(${tt(n.iconUrl,{width:120})})`),t});return a.watch(()=>[n.countdownSecond,n.countdownTimestamp],()=>{n.countdownSecond?r({second:n.countdownSecond}):n.countdownTimestamp?r({endTimestamp:n.countdownTimestamp}):(o(),i())},{immediate:!0}),{__sfc:!0,props:n,emit:e,startCountDown:r,stopCountDown:o,resetSurplus:i,surplusSecond:s,pendantText:u,pendantIconStyle:c}}}),function(){var t=this,e=t._self._c,n=t._self._setupProxy;return e("div",{staticClass:"plv-product-common-pendant",on:{click:function(t){return n.emit("click-pendant")}}},[e("div",{staticClass:"plv-product-common-pendant__icon",style:n.pendantIconStyle}),n.pendantText?e("div",{staticClass:"plv-product-common-pendant__text"},[e("span",[t._v(t._s(n.pendantText))])]):t._e()])},[]).exports;const rt="__product-event-emitter-key";function ot(){if(window[rt])return window[rt];const t={all:e=e||new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map(function(t){t(n)}),(r=e.get("*"))&&r.slice().map(function(e){e(t,n)})}};var e;return window[rt]=t,t}var it=(t=>(t.ZH_CN="zh_CN",t.ZH_TW="zh_TW",t.English="en",t.Japanese="ja",t.Korean="ko",t.Russian="ru",t))(it||{});const st="openProductListPopup",at=t=>{const{props:e}=t,{getEmitter:n}=(()=>{const t=a.inject("interactGlobalConfigV2",{globalLang:it.ZH_CN});return{injectData:t,toast:e=>{t.toast&&t.toast(e)},getEmitter:function(){return t.getEmitter?t.getEmitter():ot()},messageBox:e=>t.messageBox?t.messageBox(e):Promise.resolve(!1)}})(),r=a.ref(""),o=a.ref(!1);return{productTotal:r,isCollapsed:o,onClickPendant:function(){n().emit(st)},getProductTotal:function(){return t=this,n=null,o=function*(){const t=yield e.productTarget.getProductList();r.value=String(t.total)},new Promise((e,r)=>{var i=t=>{try{a(o.next(t))}catch(e){r(e)}},s=t=>{try{a(o.throw(t))}catch(e){r(e)}},a=t=>t.done?e(t.value):Promise.resolve(t.value).then(i,s);a((o=o.apply(t,n)).next())});var t,n,o},toggleCollapse:function(){o.value=!o.value}}};const ut=et(a.defineComponent({__name:"mobile-product-pendant",props:{productTarget:W.object().isRequired},setup(t){const e=t,{productTotal:n,onClickPendant:r,getProductTotal:o}=at({props:e});return a.onMounted(()=>{o()}),{__sfc:!0,props:e,productTotal:n,onClickPendant:r,getProductTotal:o,pendantIcon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAkFSURBVHic7ZxNbFxXFcd/933MeDy24yRScJuGPhQRNRtiIRCwQLGRgkKLCGpZdIEU1xCpGxqKUmCBcAMCoSKBkZBAdIGlCnVH4+4oCwaJBVBVJGKTolTMgpY4aioXZ2yPZzyXxcybefPe/XozTnDQHGk0951zz7nn/t//nnvnOS8wkpGMZCQjGcn9KmIYZ/nVs3P48jyCCGSERwSyHVUAotP2oE8vO9cyHTD1DSClQpfuJ9O6KpJ1oIJgVfyyUhl0jgMBJC+cXUDIJQRRHxB97ZQuHk01KdCAY+jX5yMVur6Uq0ieFb+qXHGeJL2UnUUuzE1TKP4a+KIWGACvk12SOb0odubIxIUJOKM9HVMCXKEhnhIrlXX9LPvFGSC5cDYi5A8IGVnZYmKOTKGjBKfTsDLMwhw1qFUaYl6sVKr62fbEc+kkF+amCeUrPXCkHRzSyUtHcCSZmqK0S41dEVMmYkoiAvmKy7zBESAKYxcRzGYBQc8cj35+uhRkXd8+nbD72O2zcnFuSdErI9YlJp8+G9Fq/Q0hpo1LKckcr5fQ9toGjfe3CcoFSg9ODbFUeozZfrdGY6NOMB5SOjLpXrjT9pb3IdtSC0xGAFryojM4yUINrP/9Jo33tztXNbZv1Th46oH++BK6RcqBGetv3qK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6GYRK5Uqu2IeSdW95ijsd63mKJaPsLEorCLDebH8vPXtZ6e/aoiVSpWWmEeIq/uGOcLrMaX7bapB3YPhVaQ/L5afr2qm2yfOr4V381v49NcRYglJ7z2rvT7n2Bgq/ETNCXrgiMwySnwHVYR/WSz/cCXPfHMDBLRfE4dZaJ1DMgdyGpn445sSCMWy6rMnFCY2ivQ5J3Hg6wMsXEcEVbzgKtJfFT9/Iff/ujCSkYxkJCMZyf0t/wVfoDB9IXM0sAAAAABJRU5ErkJggg==",CommonPendant:nt}}}),function(){var t=this,e=t._self._c,n=t._self._setupProxy;return e("div",{staticClass:"plv-product-pendant"},[n.productTotal?e(n.CommonPendant,{attrs:{"icon-url":n.pendantIcon,text:n.productTotal&&"0"!==n.productTotal?n.productTotal:""},on:{"click-pendant":n.onClickPendant}}):t._e()],1)},[]).exports;module.exports=ut,console.log("%c@polyv/product-ui","background:#409EFF;padding: 2px 6px;border-radius: 3px;color: #fff","[component: mobile-product-pendant]","[version: 1.2.0-rc-20250724.2]","[buildTime: 2025-07-24 03:57:05]");
|
|
@@ -801,7 +801,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
801
801
|
});
|
|
802
802
|
var _sfc_render = function render2() {
|
|
803
803
|
var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
|
|
804
|
-
return _c("div", { staticClass: "plv-product-pendant" }, [_setup.productTotal ? _c(_setup.CommonPendant, { attrs: { "icon-url": _setup.pendantIcon, "text": _setup.productTotal }, on: { "click-pendant": _setup.onClickPendant } }) : _vm._e()], 1);
|
|
804
|
+
return _c("div", { staticClass: "plv-product-pendant" }, [_setup.productTotal ? _c(_setup.CommonPendant, { attrs: { "icon-url": _setup.pendantIcon, "text": !_setup.productTotal || _setup.productTotal === "0" ? "" : _setup.productTotal }, on: { "click-pendant": _setup.onClickPendant } }) : _vm._e()], 1);
|
|
805
805
|
};
|
|
806
806
|
var _sfc_staticRenderFns = [];
|
|
807
807
|
var __component__ = /* @__PURE__ */ normalizeComponent(
|
|
@@ -815,8 +815,8 @@ console.log(
|
|
|
815
815
|
"%c@polyv/product-ui",
|
|
816
816
|
"background:#409EFF;padding: 2px 6px;border-radius: 3px;color: #fff",
|
|
817
817
|
"[component: mobile-product-pendant]",
|
|
818
|
-
"[version: 1.
|
|
819
|
-
"[buildTime: 2025-07-03
|
|
818
|
+
"[version: 1.2.0-rc-20250724.2]",
|
|
819
|
+
"[buildTime: 2025-07-24 03:57:05]"
|
|
820
820
|
);
|
|
821
821
|
export {
|
|
822
822
|
mobileProductPendant as default
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
!function(){"use strict";try{if("undefined"!=typeof document){var t=document.createElement("style");t.appendChild(document.createTextNode(".plv-product-common-pendant{position:relative;width:36px;height:36px;overflow:hidden;border-radius:4px;cursor:pointer}.plv-product-common-pendant+.plv-product-common-pendant{margin-top:8px}.plv-product-common-pendant__icon{width:100%;height:100%;background-repeat:no-repeat;background-size:100% 100%}.plv-product-common-pendant__text{position:absolute;bottom:7px;left:50%;display:flex;justify-content:center;align-items:center;box-sizing:border-box;min-width:32px;height:12px;padding:0 2px;border-radius:6px;color:#fff;text-align:center;white-space:nowrap;transform:translate(-50%)}.plv-product-common-pendant__text span{font-size:12px}.plv-product-pendant .plv-product-common-pendant__text{font-family:DINPro-Regular,sans-serif}")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();
|
|
2
|
-
!function(e
|
|
2
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("vue")):"function"==typeof define&&define.amd?define(["vue"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).PolyvProductUIMobileProductPendant=e(t.Vue2Module||t.Vue)}(this,function(t){"use strict";var e=Object.defineProperty,n=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,i=(t,n,o)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[n]=o,s=(t,e)=>{for(var s in e||(e={}))o.call(e,s)&&i(t,s,e[s]);if(n)for(var s of n(e))r.call(e,s)&&i(t,s,e[s]);return t},a=(t,e,n)=>i(t,"symbol"!=typeof e?e+"":e,n);const u=[{divisor:86400,unit:"days"},{divisor:3600,unit:"hours"},{divisor:60,unit:"minutes"},{divisor:1,unit:"seconds"}];class c{constructor(t,e){if(t|=0,isNaN(t))throw new Error("Total seconds must be a number");this._totalMSecs=1e3*t,this._cb=e}_exec(){if(!this._startTime||null==this._usingMSecs)return;let t=Math.max(0,this._usingMSecs-(Date.now()-this._startTime));if(t>0&&setTimeout(()=>{this._exec()},1e3),this._remainingMSecs=t,t>=0){const e={days:0,hours:0,minutes:0,seconds:0,totalMsecs:t};t=Math.round(t/1e3),u.forEach((n,o)=>{e[n.unit]=t/n.divisor,o===u.length-1?e[n.unit]=Math.round(e[n.unit]):(e[n.unit]=Math.floor(e[n.unit]),t%=n.divisor)}),this._cb(e)}}start(){null==this._usingMSecs&&(this._usingMSecs=this._totalMSecs),this._usingMSecs<=0||(this._startTime=Date.now(),this._exec())}_break(){this._timerId&&clearTimeout(this._timerId),this._startTime=void 0}stop(){this._break(),this._usingMSecs=this._totalMSecs}pause(){this._break(),this._usingMSecs=this._remainingMSecs}}const l=(e={})=>{var n,o;let r=null!=(n=e.second)?n:t.ref(),i=null!=(o=e.endTimestamp)?o:t.ref(),a=e.onCountDownChange,u=e.onCountDownFinish;function l(e={}){var n,o;e.second&&(n=e.second,t.isRef(r)?r.value=t.isRef(n)?n.value:n:r=n||r),e.endTimestamp&&(o=e.endTimestamp,t.isRef(i)?i.value=t.isRef(o)?o.value:o:i=o||i),e.onCountDownChange&&(a=e.onCountDownChange),e.onCountDownFinish&&(u=e.onCountDownFinish)}const d={days:0,hours:0,minutes:0,seconds:0,totalMsecs:0},f=t.ref(s({},d)),p=t.computed(()=>{const t=f.value.totalMsecs/1e3;return parseInt(t.toString())}),v=()=>{const e=t.unref(r),n=t.unref(i);if("number"==typeof e)return e;if("number"==typeof n){const t=(n-Date.now())/1e3;return t<0?0:t}return 0};let y;function m(){f.value=s({},d),g(),y=new c(v(),O),h()}function g(){b(),y=void 0}function h(t,e=!1){t&&l(t),e?m():y?y.start():m()}function b(){y&&y.stop()}function O(e){f.value=e,a&&a(t.unref(f)),0===e.totalMsecs&&u&&u()}return t.onUnmounted(()=>{g()}),{surplusTime:f,surplusSecond:p,computedSecond:v,initCountDown:m,startCountDown:h,resetSurplus:function(){f.value=s({},d)},stopCountDown:b,destroyCountDown:g}};
|
|
3
3
|
/*!
|
|
4
4
|
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
5
5
|
*
|
|
6
6
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
7
7
|
* Released under the MIT License.
|
|
8
|
-
*/function d(e){return"[object Object]"===Object.prototype.toString.call(e)}function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},f.apply(this,arguments)}function p(e,t){if(null==e)return{};var n={};for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){if(t.indexOf(o)>=0)continue;n[o]=e[o]}return n}const v={silent:!1,logLevel:"warn"},y=["validator"],m=Object.prototype,g=m.toString,h=m.hasOwnProperty,b=/^\s*function (\w+)/;function O(e){var t;const n=null!==(t=null==e?void 0:e.type)&&void 0!==t?t:e;if(n){const e=n.toString().match(b);return e?e[1]:""}return""}const w=function(e){var t,n;return!1!==d(e)&&(void 0===(t=e.constructor)||!1!==d(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))};function j(){}let C=j;if("production"!=={}.NODE_ENV){const e="undefined"!=typeof console;C=e?function(e,t=v.logLevel){!1===v.silent&&console[t](`[VueTypes warn]: ${e}`)}:j}const T=(e,t)=>h.call(e,t),S=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},P=Array.isArray||function(e){return"[object Array]"===g.call(e)},_=e=>"[object Function]"===g.call(e),A=(e,t)=>w(e)&&T(e,"_vueTypes_name")&&(!t||e._vueTypes_name===t),x=e=>w(e)&&(T(e,"type")||["_vueTypes_name","validator","default","required"].some((t=>T(e,t))));function M(e,t){return Object.defineProperty(e.bind(t),"__original",{value:e})}function k(e,t,n=!1){let o,r=!0,i="";o=w(e)?e:{type:e};const s=A(o)?o._vueTypes_name+" - ":"";if(x(o)&&null!==o.type){if(void 0===o.type||!0===o.type)return r;if(!o.required&&null==t)return r;P(o.type)?(r=o.type.some((e=>!0===k(e,t,!0))),i=o.type.map((e=>O(e))).join(" or ")):(i=O(o),r="Array"===i?P(t):"Object"===i?w(t):"String"===i||"Number"===i||"Boolean"===i||"Function"===i?function(e){if(null==e)return"";const t=e.constructor.toString().match(b);return t?t[1].replace(/^Async/,""):""}(t)===i:t instanceof o.type)}if(!r){const e=`${s}value "${t}" should be of type "${i}"`;return!1===n?(C(e),!1):e}if(T(o,"validator")&&_(o.validator)){const e=C,i=[];if(C=e=>{i.push(e)},r=o.validator(t),C=e,!r){const e=(i.length>1?"* ":"")+i.join("\n* ");return i.length=0,!1===n?(C(e),r):e}}return r}function D(e,t){const n=Object.defineProperties(t,{_vueTypes_name:{value:e,writable:!0},isRequired:{get(){return this.required=!0,this}},def:{value(e){return void 0===e?this.type===Boolean||Array.isArray(this.type)&&this.type.includes(Boolean)?void(this.default=void 0):(T(this,"default")&&delete this.default,this):_(e)||!0===k(this,e,!0)?(this.default=P(e)?()=>[...e]:w(e)?()=>Object.assign({},e):e,this):(C(`${this._vueTypes_name} - invalid default value: "${e}"`),this)}}}),{validator:o}=n;return _(o)&&(n.validator=M(o,n)),n}function I(e,t){const n=D(e,t);return Object.defineProperty(n,"validate",{value(e){return _(this.validator)&&C(`${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info:\n${JSON.stringify(this)}`),this.validator=M(e,this),this}})}function G(e,t,n){const o=function(e){const t={};return Object.getOwnPropertyNames(e).forEach((n=>{t[n]=Object.getOwnPropertyDescriptor(e,n)})),Object.defineProperties({},t)}(t);if(o._vueTypes_name=e,!w(n))return o;const{validator:r}=n,i=p(n,y);if(_(r)){let{validator:e}=o;e&&(e=null!==(a=(s=e).__original)&&void 0!==a?a:s),o.validator=M(e?function(t){return e.call(this,t)&&r.call(this,t)}:r,o)}var s,a;return Object.assign(o,i)}function J(e){return e.replace(/^(?!\s*$)/gm," ")}const R=()=>I("any",{}),K=()=>I("function",{type:Function}),E=()=>I("boolean",{type:Boolean}),B=()=>I("string",{type:String}),N=()=>I("number",{type:Number}),U=()=>I("array",{type:Array}),Z=()=>I("object",{type:Object});function F(e,t="custom validation failed"){if("function"!=typeof e)throw new TypeError("[VueTypes error]: You must provide a function as argument");return D(e.name||"<<anonymous function>>",{type:null,validator(n){const o=e(n);return o||C(`${this._vueTypes_name} - ${t}`),o}})}function H(e){if(!P(e))throw new TypeError("[VueTypes error]: You must provide an array as argument.");const t=`oneOf - value should be one of "${e.map((e=>"symbol"==typeof e?e.toString():e)).join('", "')}".`,n={validator(n){const o=-1!==e.indexOf(n);return o||C(t),o}};if(-1===e.indexOf(null)){const t=e.reduce(((e,t)=>{if(null!=t){const n=t.constructor;-1===e.indexOf(n)&&e.push(n)}return e}),[]);t.length>0&&(n.type=t)}return D("oneOf",n)}function q(e){if(!P(e))throw new TypeError("[VueTypes error]: You must provide an array as argument");let t=!1,n=!1,o=[];for(let i=0;i<e.length;i+=1){const r=e[i];if(x(r)){if(_(r.validator)&&(t=!0),A(r,"oneOf")&&r.type){o=o.concat(r.type);continue}if(A(r,"nullable")){n=!0;continue}if(!0===r.type||!r.type){C('oneOfType - invalid usage of "true" and "null" as types.');continue}o=o.concat(r.type)}else o.push(r)}o=o.filter(((e,t)=>o.indexOf(e)===t));const r=!1===n&&o.length>0?o:null;return D("oneOfType",t?{type:r,validator(t){const n=[],o=e.some((e=>{const o=k(e,t,!0);return"string"==typeof o&&n.push(o),!0===o}));return o||C(`oneOfType - provided value does not match any of the ${n.length} passed-in validators:\n${J(n.join("\n"))}`),o}}:{type:r})}function X(e){return D("arrayOf",{type:Array,validator(t){let n="";const o=t.every((t=>(n=k(e,t,!0),!0===n)));return o||C(`arrayOf - value validation error:\n${J(n)}`),o}})}function L(e){return D("instanceOf",{type:e})}function z(e){return D("objectOf",{type:Object,validator(t){let n="";const o=Object.keys(t).every((o=>(n=k(e,t[o],!0),!0===n)));return o||C(`objectOf - value validation error:\n${J(n)}`),o}})}function Q(e){const t=Object.keys(e),n=t.filter((t=>{var n;return!(null===(n=e[t])||void 0===n||!n.required)})),o=D("shape",{type:Object,validator(o){if(!w(o))return!1;const r=Object.keys(o);if(n.length>0&&n.some((e=>-1===r.indexOf(e)))){const e=n.filter((e=>-1===r.indexOf(e)));return C(1===e.length?`shape - required property "${e[0]}" is not defined.`:`shape - required properties "${e.join('", "')}" are not defined.`),!1}return r.every((n=>{if(-1===t.indexOf(n))return!0===this._vueTypes_isLoose||(C(`shape - shape definition does not include a "${n}" property. Allowed keys: "${t.join('", "')}".`),!1);const r=k(e[n],o[n],!0);return"string"==typeof r&&C(`shape - "${n}" property validation error:\n ${J(r)}`),!0===r}))}});return Object.defineProperty(o,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(o,"loose",{get(){return this._vueTypes_isLoose=!0,this}}),o}const V=["name","validate","getter"],Y=(e=>((e=class{static get any(){return R()}static get func(){return K().def(this.defaults.func)}static get bool(){return void 0===this.defaults.bool?E():E().def(this.defaults.bool)}static get string(){return B().def(this.defaults.string)}static get number(){return N().def(this.defaults.number)}static get array(){return U().def(this.defaults.array)}static get object(){return Z().def(this.defaults.object)}static get integer(){return D("integer",{type:Number,validator(e){const t=S(e);return!1===t&&C(`integer - "${e}" is not an integer`),t}}).def(this.defaults.integer)}static get symbol(){return D("symbol",{validator(e){const t="symbol"==typeof e;return!1===t&&C(`symbol - invalid value "${e}"`),t}})}static get nullable(){return Object.defineProperty({type:null,validator(e){const t=null===e;return!1===t&&C("nullable - value should be null"),t}},"_vueTypes_name",{value:"nullable"})}static extend(e){if(C("VueTypes.extend is deprecated. Use the ES6+ method instead. See https://dwightjack.github.io/vue-types/advanced/extending-vue-types.html#extending-namespaced-validators-in-es6 for details."),P(e))return e.forEach((e=>this.extend(e))),this;const{name:t,validate:n=!1,getter:o=!1}=e,r=p(e,V);if(T(this,t))throw new TypeError(`[VueTypes error]: Type "${t}" already defined`);const{type:i}=r;if(A(i))return delete r.type,Object.defineProperty(this,t,o?{get:()=>G(t,i,r)}:{value(...e){const n=G(t,i,r);return n.validator&&(n.validator=n.validator.bind(n,...e)),n}});let s;return s=o?{get(){const e=Object.assign({},r);return n?I(t,e):D(t,e)},enumerable:!0}:{value(...e){const o=Object.assign({},r);let i;return i=n?I(t,o):D(t,o),o.validator&&(i.validator=o.validator.bind(i,...e)),i},enumerable:!0},Object.defineProperty(this,t,s)}}).defaults={},e.sensibleDefaults=void 0,e.config=v,e.custom=F,e.oneOf=H,e.instanceOf=L,e.oneOfType=q,e.arrayOf=X,e.objectOf=z,e.shape=Q,e.utils={validate:(e,t)=>!0===k(t,e,!0),toType:(e,t,n=!1)=>n?I(e,t):D(e,t)},e))();!function(e={func:()=>{},bool:!0,string:"",number:0,array:()=>[],object:()=>({}),integer:0}){var t;(t=class extends Y{static get sensibleDefaults(){return f({},this.defaults)}static set sensibleDefaults(t){this.defaults=!1!==t?f({},!0!==t?t:e):{}}}).defaults=f({},e)}();class W{static get string(){return B().def("")}static get looseString(){return B()}static get number(){return N().def(0)}static get looseNumber(){return N()}static get bool(){return E().def(!0)}static get looseBool(){return q([]).def(void 0)}static get looseElement(){return q([]).def(void 0)}}a(W,"objectType",Z),a(W,"array",(()=>U().def([]))),a(W,"object",Z),a(W,"func",K),a(W,"oneOf",H),a(W,"oneOfType",q),a(W,"enum",B),a(W,"any",R);const $=(()=>{let e;return()=>{if(null==e)try{e=function(){const e=document.createElement("canvas");if(e.getContext&&e.getContext("2d")){const t="image/webp";return 0===e.toDataURL(t).indexOf("data:"+t)}return!1}()||function(){let e=!1;const t=navigator.userAgent,n=/\bOS\s([\d_.]+)\slike\sMac\sOS\sX\b/.exec(t);if(n)e=parseInt(n[1])>=14;else{const n=/\bVersion\/([\d.]+)\sSafari\b/.exec(t);n&&(e=parseInt(n[1])>=16)}return e}()}catch(t){e=!1}return e}})();function ee(e,t){const n=function(e){let t;if("undefined"!=typeof document){const n=document.createElement("a");n.href=e,t=n}else if("function"==typeof URL)try{t=new URL(/^\/\//.test(e)?"https:"+e:e)}catch(n){}return t}(e);if(!n)return e;const o=function(e){const t=(e||"").split("."),n=t[t.length-1];return n?n.toLowerCase():""}(n.pathname.split("/").pop());if(!/\.videocc\.net$/i.test(n.hostname)||"svg"===o)return e;const r=function(e,t){let n="";return null==t.width&&null==t.height||(n+="/resize",t.width&&(n+=",w_"+t.width),t.height&&(n+=",h_"+t.height),n+=",limit_1"),t.allowAVIF&&"gif"!==e?n+="/format,avif":!0===t.allowWebP||"auto"===t.allowWebP&&$()?n+="/format,webp/quality,Q_80":t.allowJPG&&"gif"!==e&&(n+="/format,jpg/quality,Q_80"),n}(o,function(e){var t,n;const o="number"==typeof e?{width:e}:e;return o.allowJPG=null===(t=o.allowJPG)||void 0===t||t,o.allowWebP=null!==(n=o.allowWebP)&&void 0!==n?n:"auto",o}(t));return r&&(n.search=function(e,t){let n=!1;return e=e.replace(/([?&]x-oss-process)(?:=([^&]*))?/,((e,o,r)=>(n=!0,/^image/.test(r)?o+"="+r.replace(/\/(?:resize|format|quality)[^/]*/gi,"")+t:e))),n?e:e+(-1===e.indexOf("?")?"?":"&")+"x-oss-process=image"+t}(n.search,r)),n.href}function te(e,t,n,o,r,i,s,a){var u="function"==typeof e?e.options:e;return t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0),{exports:e,options:u}}const ne=te(e.defineComponent({__name:"index",props:{iconUrl:W.string,text:W.string,countdownSecond:W.number,countdownTimestamp:W.number},emits:{"click-pendant":()=>!0},setup(t,{emit:n}){const o=t,{startCountDown:r,stopCountDown:i,resetSurplus:s,surplusSecond:a}=l(),u=e.computed((()=>a.value>0?function(e,t={segments:2,digits:2}){if(e=Number(e),isNaN(e)||e<0)throw new Error('"secs" must be a positive integer');let n=2;"auto"===t.segments&&e>=3600?n=3:"number"==typeof t.segments&&-1!==[2,3].indexOf(t.segments)&&(n=t.segments);let o=0|(t.digits||2);o=Math.max(1,o);const r=new Array(o+1).join("0"),i=[60,1];return 3===n&&i.unshift(3600),i.map((t=>{const n=Math.floor(e/t),i=n.toString().length;return e%=t,(r+n).slice(-Math.max(i,o))})).join(":")}(a.value,{segments:"auto"}):o.text)),c=e.computed((()=>{const e={};return o.iconUrl&&(e.backgroundImage=`url(${ee(o.iconUrl,{width:120})})`),e}));return e.watch((()=>[o.countdownSecond,o.countdownTimestamp]),(()=>{o.countdownSecond?r({second:o.countdownSecond}):o.countdownTimestamp?r({endTimestamp:o.countdownTimestamp}):(i(),s())}),{immediate:!0}),{__sfc:!0,props:o,emit:n,startCountDown:r,stopCountDown:i,resetSurplus:s,surplusSecond:a,pendantText:u,pendantIconStyle:c}}}),(function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{staticClass:"plv-product-common-pendant",on:{click:function(e){return n.emit("click-pendant")}}},[t("div",{staticClass:"plv-product-common-pendant__icon",style:n.pendantIconStyle}),n.pendantText?t("div",{staticClass:"plv-product-common-pendant__text"},[t("span",[e._v(e._s(n.pendantText))])]):e._e()])}),[]).exports;const oe="__product-event-emitter-key";function re(){if(window[oe])return window[oe];const e={all:t=t||new Map,on:function(e,n){var o=t.get(e);o?o.push(n):t.set(e,[n])},off:function(e,n){var o=t.get(e);o&&(n?o.splice(o.indexOf(n)>>>0,1):t.set(e,[]))},emit:function(e,n){var o=t.get(e);o&&o.slice().map((function(e){e(n)})),(o=t.get("*"))&&o.slice().map((function(t){t(e,n)}))}};var t;return window[oe]=e,e}var ie=(e=>(e.ZH_CN="zh_CN",e.ZH_TW="zh_TW",e.English="en",e.Japanese="ja",e.Korean="ko",e.Russian="ru",e))(ie||{});const se="openProductListPopup",ae=t=>{const{props:n}=t,{getEmitter:o}=(()=>{const t=e.inject("interactGlobalConfigV2",{globalLang:ie.ZH_CN});return{injectData:t,toast:e=>{t.toast&&t.toast(e)},getEmitter:function(){return t.getEmitter?t.getEmitter():re()},messageBox:e=>t.messageBox?t.messageBox(e):Promise.resolve(!1)}})(),r=e.ref(""),i=e.ref(!1);return{productTotal:r,isCollapsed:i,onClickPendant:function(){o().emit(se)},getProductTotal:function(){return e=this,t=null,o=function*(){const e=yield n.productTarget.getProductList();r.value=String(e.total)},new Promise(((n,r)=>{var i=e=>{try{a(o.next(e))}catch(t){r(t)}},s=e=>{try{a(o.throw(e))}catch(t){r(t)}},a=e=>e.done?n(e.value):Promise.resolve(e.value).then(i,s);a((o=o.apply(e,t)).next())}));var e,t,o},toggleCollapse:function(){i.value=!i.value}}};return te(e.defineComponent({__name:"mobile-product-pendant",props:{productTarget:W.object().isRequired},setup(t){const n=t,{productTotal:o,onClickPendant:r,getProductTotal:i}=ae({props:n});return e.onMounted((()=>{i()})),{__sfc:!0,props:n,productTotal:o,onClickPendant:r,getProductTotal:i,pendantIcon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAkFSURBVHic7ZxNbFxXFcd/933MeDy24yRScJuGPhQRNRtiIRCwQLGRgkKLCGpZdIEU1xCpGxqKUmCBcAMCoSKBkZBAdIGlCnVH4+4oCwaJBVBVJGKTolTMgpY4aioXZ2yPZzyXxcybefPe/XozTnDQHGk0951zz7nn/t//nnvnOS8wkpGMZCQjGcn9KmIYZ/nVs3P48jyCCGSERwSyHVUAotP2oE8vO9cyHTD1DSClQpfuJ9O6KpJ1oIJgVfyyUhl0jgMBJC+cXUDIJQRRHxB97ZQuHk01KdCAY+jX5yMVur6Uq0ieFb+qXHGeJL2UnUUuzE1TKP4a+KIWGACvk12SOb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9vlWOO+/AHED7FNAan1R8V+YYwImZhK99+8cMkOldC1NSOp3pOrlbuRZc266XrjcxKBkWDQIQXOslZUpYUY8ybZcJ71XNkYCXAse0xAKQ/jU0oj8H7VDJJJBOXqfLtEWOOz+s3UsBk2ZP6uOHUOzMVSFagMRKZR1JpXtn03fM9k5Et53o1+fvak/0S9e5DIuEnilaFvkVsbysXWK2J4rPDnxnB9nhhrELYWaKzib8y4qoXTECJF6sXEWy0peIE3Piu30vmCMB0TkhW+pNWif8K2L5RxUTBvZn0rviMpJqRr9fmIOXZYrvwqKgCgXju2Kd6GYRK5Uqu2IeSdW95ijsd63mKJaPsLEorCLDebH8vPXtZ6e/aoiVSpWWmEeIq/uGOcLrMaX7bapB3YPhVaQ/L5afr2qm2yfOr4V381v49NcRYglJ7z2rvT7n2Bgq/ETNCXrgiMwySnwHVYR/WSz/cCXPfHMDBLRfE4dZaJ1DMgdyGpn445sSCMWy6rMnFCY2ivQ5J3Hg6wMsXEcEVbzgKtJfFT9/Iff/ujCSkYxkJCMZyf0t/wVfoDB9IXM0sAAAAABJRU5ErkJggg==",CommonPendant:ne}}}),(function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{staticClass:"plv-product-pendant"},[n.productTotal?t(n.CommonPendant,{attrs:{"icon-url":n.pendantIcon,text:n.productTotal},on:{"click-pendant":n.onClickPendant}}):e._e()],1)}),[]).exports})),console.log("%c@polyv/product-ui","background:#409EFF;padding: 2px 6px;border-radius: 3px;color: #fff","[component: mobile-product-pendant]","[version: 1.1.0-rc-20250703.1]","[buildTime: 2025-07-03 01:48:03]");
|
|
8
|
+
*/function d(t){return"[object Object]"===Object.prototype.toString.call(t)}function f(){return f=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},f.apply(this,arguments)}function p(t,e){if(null==t)return{};var n={};for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){if(e.indexOf(o)>=0)continue;n[o]=t[o]}return n}const v={silent:!1,logLevel:"warn"},y=["validator"],m=Object.prototype,g=m.toString,h=m.hasOwnProperty,b=/^\s*function (\w+)/;function O(t){var e;const n=null!==(e=null==t?void 0:t.type)&&void 0!==e?e:t;if(n){const t=n.toString().match(b);return t?t[1]:""}return""}const w=function(t){var e,n;return!1!==d(t)&&(void 0===(e=t.constructor)||!1!==d(n=e.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))};function j(){}let T=j;if("production"!=={}.NODE_ENV){const t="undefined"!=typeof console;T=t?function(t,e=v.logLevel){!1===v.silent&&console[e](`[VueTypes warn]: ${t}`)}:j}const C=(t,e)=>h.call(t,e),S=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},P=Array.isArray||function(t){return"[object Array]"===g.call(t)},_=t=>"[object Function]"===g.call(t),A=(t,e)=>w(t)&&C(t,"_vueTypes_name")&&(!e||t._vueTypes_name===e),x=t=>w(t)&&(C(t,"type")||["_vueTypes_name","validator","default","required"].some(e=>C(t,e)));function M(t,e){return Object.defineProperty(t.bind(e),"__original",{value:t})}function k(t,e,n=!1){let o,r=!0,i="";o=w(t)?t:{type:t};const s=A(o)?o._vueTypes_name+" - ":"";if(x(o)&&null!==o.type){if(void 0===o.type||!0===o.type)return r;if(!o.required&&null==e)return r;P(o.type)?(r=o.type.some(t=>!0===k(t,e,!0)),i=o.type.map(t=>O(t)).join(" or ")):(i=O(o),r="Array"===i?P(e):"Object"===i?w(e):"String"===i||"Number"===i||"Boolean"===i||"Function"===i?function(t){if(null==t)return"";const e=t.constructor.toString().match(b);return e?e[1].replace(/^Async/,""):""}(e)===i:e instanceof o.type)}if(!r){const t=`${s}value "${e}" should be of type "${i}"`;return!1===n?(T(t),!1):t}if(C(o,"validator")&&_(o.validator)){const t=T,i=[];if(T=t=>{i.push(t)},r=o.validator(e),T=t,!r){const t=(i.length>1?"* ":"")+i.join("\n* ");return i.length=0,!1===n?(T(t),r):t}}return r}function D(t,e){const n=Object.defineProperties(e,{_vueTypes_name:{value:t,writable:!0},isRequired:{get(){return this.required=!0,this}},def:{value(t){return void 0===t?this.type===Boolean||Array.isArray(this.type)&&this.type.includes(Boolean)?void(this.default=void 0):(C(this,"default")&&delete this.default,this):_(t)||!0===k(this,t,!0)?(this.default=P(t)?()=>[...t]:w(t)?()=>Object.assign({},t):t,this):(T(`${this._vueTypes_name} - invalid default value: "${t}"`),this)}}}),{validator:o}=n;return _(o)&&(n.validator=M(o,n)),n}function I(t,e){const n=D(t,e);return Object.defineProperty(n,"validate",{value(t){return _(this.validator)&&T(`${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info:\n${JSON.stringify(this)}`),this.validator=M(t,this),this}})}function G(t,e,n){const o=function(t){const e={};return Object.getOwnPropertyNames(t).forEach(n=>{e[n]=Object.getOwnPropertyDescriptor(t,n)}),Object.defineProperties({},e)}(e);if(o._vueTypes_name=t,!w(n))return o;const{validator:r}=n,i=p(n,y);if(_(r)){let{validator:t}=o;t&&(t=null!==(a=(s=t).__original)&&void 0!==a?a:s),o.validator=M(t?function(e){return t.call(this,e)&&r.call(this,e)}:r,o)}var s,a;return Object.assign(o,i)}function J(t){return t.replace(/^(?!\s*$)/gm," ")}const R=()=>I("any",{}),K=()=>I("function",{type:Function}),E=()=>I("boolean",{type:Boolean}),B=()=>I("string",{type:String}),N=()=>I("number",{type:Number}),U=()=>I("array",{type:Array}),Z=()=>I("object",{type:Object});function F(t,e="custom validation failed"){if("function"!=typeof t)throw new TypeError("[VueTypes error]: You must provide a function as argument");return D(t.name||"<<anonymous function>>",{type:null,validator(n){const o=t(n);return o||T(`${this._vueTypes_name} - ${e}`),o}})}function H(t){if(!P(t))throw new TypeError("[VueTypes error]: You must provide an array as argument.");const e=`oneOf - value should be one of "${t.map(t=>"symbol"==typeof t?t.toString():t).join('", "')}".`,n={validator(n){const o=-1!==t.indexOf(n);return o||T(e),o}};if(-1===t.indexOf(null)){const e=t.reduce((t,e)=>{if(null!=e){const n=e.constructor;-1===t.indexOf(n)&&t.push(n)}return t},[]);e.length>0&&(n.type=e)}return D("oneOf",n)}function q(t){if(!P(t))throw new TypeError("[VueTypes error]: You must provide an array as argument");let e=!1,n=!1,o=[];for(let i=0;i<t.length;i+=1){const r=t[i];if(x(r)){if(_(r.validator)&&(e=!0),A(r,"oneOf")&&r.type){o=o.concat(r.type);continue}if(A(r,"nullable")){n=!0;continue}if(!0===r.type||!r.type){T('oneOfType - invalid usage of "true" and "null" as types.');continue}o=o.concat(r.type)}else o.push(r)}o=o.filter((t,e)=>o.indexOf(t)===e);const r=!1===n&&o.length>0?o:null;return D("oneOfType",e?{type:r,validator(e){const n=[],o=t.some(t=>{const o=k(t,e,!0);return"string"==typeof o&&n.push(o),!0===o});return o||T(`oneOfType - provided value does not match any of the ${n.length} passed-in validators:\n${J(n.join("\n"))}`),o}}:{type:r})}function X(t){return D("arrayOf",{type:Array,validator(e){let n="";const o=e.every(e=>(n=k(t,e,!0),!0===n));return o||T(`arrayOf - value validation error:\n${J(n)}`),o}})}function L(t){return D("instanceOf",{type:t})}function z(t){return D("objectOf",{type:Object,validator(e){let n="";const o=Object.keys(e).every(o=>(n=k(t,e[o],!0),!0===n));return o||T(`objectOf - value validation error:\n${J(n)}`),o}})}function Q(t){const e=Object.keys(t),n=e.filter(e=>{var n;return!(null===(n=t[e])||void 0===n||!n.required)}),o=D("shape",{type:Object,validator(o){if(!w(o))return!1;const r=Object.keys(o);if(n.length>0&&n.some(t=>-1===r.indexOf(t))){const t=n.filter(t=>-1===r.indexOf(t));return T(1===t.length?`shape - required property "${t[0]}" is not defined.`:`shape - required properties "${t.join('", "')}" are not defined.`),!1}return r.every(n=>{if(-1===e.indexOf(n))return!0===this._vueTypes_isLoose||(T(`shape - shape definition does not include a "${n}" property. Allowed keys: "${e.join('", "')}".`),!1);const r=k(t[n],o[n],!0);return"string"==typeof r&&T(`shape - "${n}" property validation error:\n ${J(r)}`),!0===r})}});return Object.defineProperty(o,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(o,"loose",{get(){return this._vueTypes_isLoose=!0,this}}),o}const V=["name","validate","getter"],Y=(t=>((t=class{static get any(){return R()}static get func(){return K().def(this.defaults.func)}static get bool(){return void 0===this.defaults.bool?E():E().def(this.defaults.bool)}static get string(){return B().def(this.defaults.string)}static get number(){return N().def(this.defaults.number)}static get array(){return U().def(this.defaults.array)}static get object(){return Z().def(this.defaults.object)}static get integer(){return D("integer",{type:Number,validator(t){const e=S(t);return!1===e&&T(`integer - "${t}" is not an integer`),e}}).def(this.defaults.integer)}static get symbol(){return D("symbol",{validator(t){const e="symbol"==typeof t;return!1===e&&T(`symbol - invalid value "${t}"`),e}})}static get nullable(){return Object.defineProperty({type:null,validator(t){const e=null===t;return!1===e&&T("nullable - value should be null"),e}},"_vueTypes_name",{value:"nullable"})}static extend(t){if(T("VueTypes.extend is deprecated. Use the ES6+ method instead. See https://dwightjack.github.io/vue-types/advanced/extending-vue-types.html#extending-namespaced-validators-in-es6 for details."),P(t))return t.forEach(t=>this.extend(t)),this;const{name:e,validate:n=!1,getter:o=!1}=t,r=p(t,V);if(C(this,e))throw new TypeError(`[VueTypes error]: Type "${e}" already defined`);const{type:i}=r;if(A(i))return delete r.type,Object.defineProperty(this,e,o?{get:()=>G(e,i,r)}:{value(...t){const n=G(e,i,r);return n.validator&&(n.validator=n.validator.bind(n,...t)),n}});let s;return s=o?{get(){const t=Object.assign({},r);return n?I(e,t):D(e,t)},enumerable:!0}:{value(...t){const o=Object.assign({},r);let i;return i=n?I(e,o):D(e,o),o.validator&&(i.validator=o.validator.bind(i,...t)),i},enumerable:!0},Object.defineProperty(this,e,s)}}).defaults={},t.sensibleDefaults=void 0,t.config=v,t.custom=F,t.oneOf=H,t.instanceOf=L,t.oneOfType=q,t.arrayOf=X,t.objectOf=z,t.shape=Q,t.utils={validate:(t,e)=>!0===k(e,t,!0),toType:(t,e,n=!1)=>n?I(t,e):D(t,e)},t))();!function(t={func:()=>{},bool:!0,string:"",number:0,array:()=>[],object:()=>({}),integer:0}){var e;(e=class extends Y{static get sensibleDefaults(){return f({},this.defaults)}static set sensibleDefaults(e){this.defaults=!1!==e?f({},!0!==e?e:t):{}}}).defaults=f({},t)}();class W{static get string(){return B().def("")}static get looseString(){return B()}static get number(){return N().def(0)}static get looseNumber(){return N()}static get bool(){return E().def(!0)}static get looseBool(){return q([]).def(void 0)}static get looseElement(){return q([]).def(void 0)}}a(W,"objectType",Z),a(W,"array",()=>U().def([])),a(W,"object",Z),a(W,"func",K),a(W,"oneOf",H),a(W,"oneOfType",q),a(W,"enum",B),a(W,"any",R);const $=(()=>{let t;return()=>{if(null==t)try{t=function(){const t=document.createElement("canvas");if(t.getContext&&t.getContext("2d")){const e="image/webp";return 0===t.toDataURL(e).indexOf("data:"+e)}return!1}()||function(){let t=!1;const e=navigator.userAgent,n=/\bOS\s([\d_.]+)\slike\sMac\sOS\sX\b/.exec(e);if(n)t=parseInt(n[1])>=14;else{const n=/\bVersion\/([\d.]+)\sSafari\b/.exec(e);n&&(t=parseInt(n[1])>=16)}return t}()}catch(e){t=!1}return t}})();function tt(t,e){const n=function(t){let e;if("undefined"!=typeof document){const n=document.createElement("a");n.href=t,e=n}else if("function"==typeof URL)try{e=new URL(/^\/\//.test(t)?"https:"+t:t)}catch(n){}return e}(t);if(!n)return t;const o=function(t){const e=(t||"").split("."),n=e[e.length-1];return n?n.toLowerCase():""}(n.pathname.split("/").pop());if(!/\.videocc\.net$/i.test(n.hostname)||"svg"===o)return t;const r=function(t,e){let n="";return null==e.width&&null==e.height||(n+="/resize",e.width&&(n+=",w_"+e.width),e.height&&(n+=",h_"+e.height),n+=",limit_1"),e.allowAVIF&&"gif"!==t?n+="/format,avif":!0===e.allowWebP||"auto"===e.allowWebP&&$()?n+="/format,webp/quality,Q_80":e.allowJPG&&"gif"!==t&&(n+="/format,jpg/quality,Q_80"),n}(o,function(t){var e,n;const o="number"==typeof t?{width:t}:t;return o.allowJPG=null===(e=o.allowJPG)||void 0===e||e,o.allowWebP=null!==(n=o.allowWebP)&&void 0!==n?n:"auto",o}(e));return r&&(n.search=function(t,e){let n=!1;return t=t.replace(/([?&]x-oss-process)(?:=([^&]*))?/,(t,o,r)=>(n=!0,/^image/.test(r)?o+"="+r.replace(/\/(?:resize|format|quality)[^/]*/gi,"")+e:t)),n?t:t+(-1===t.indexOf("?")?"?":"&")+"x-oss-process=image"+e}(n.search,r)),n.href}function et(t,e,n,o,r,i,s,a){var u="function"==typeof t?t.options:t;return e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),{exports:t,options:u}}const nt=et(t.defineComponent({__name:"index",props:{iconUrl:W.string,text:W.string,countdownSecond:W.number,countdownTimestamp:W.number},emits:{"click-pendant":()=>!0},setup(e,{emit:n}){const o=e,{startCountDown:r,stopCountDown:i,resetSurplus:s,surplusSecond:a}=l(),u=t.computed(()=>a.value>0?function(t,e={segments:2,digits:2}){if(t=Number(t),isNaN(t)||t<0)throw new Error('"secs" must be a positive integer');let n=2;"auto"===e.segments&&t>=3600?n=3:"number"==typeof e.segments&&-1!==[2,3].indexOf(e.segments)&&(n=e.segments);let o=0|(e.digits||2);o=Math.max(1,o);const r=new Array(o+1).join("0"),i=[60,1];return 3===n&&i.unshift(3600),i.map(e=>{const n=Math.floor(t/e),i=n.toString().length;return t%=e,(r+n).slice(-Math.max(i,o))}).join(":")}(a.value,{segments:"auto"}):o.text),c=t.computed(()=>{const t={};return o.iconUrl&&(t.backgroundImage=`url(${tt(o.iconUrl,{width:120})})`),t});return t.watch(()=>[o.countdownSecond,o.countdownTimestamp],()=>{o.countdownSecond?r({second:o.countdownSecond}):o.countdownTimestamp?r({endTimestamp:o.countdownTimestamp}):(i(),s())},{immediate:!0}),{__sfc:!0,props:o,emit:n,startCountDown:r,stopCountDown:i,resetSurplus:s,surplusSecond:a,pendantText:u,pendantIconStyle:c}}}),function(){var t=this,e=t._self._c,n=t._self._setupProxy;return e("div",{staticClass:"plv-product-common-pendant",on:{click:function(t){return n.emit("click-pendant")}}},[e("div",{staticClass:"plv-product-common-pendant__icon",style:n.pendantIconStyle}),n.pendantText?e("div",{staticClass:"plv-product-common-pendant__text"},[e("span",[t._v(t._s(n.pendantText))])]):t._e()])},[]).exports;const ot="__product-event-emitter-key";function rt(){if(window[ot])return window[ot];const t={all:e=e||new Map,on:function(t,n){var o=e.get(t);o?o.push(n):e.set(t,[n])},off:function(t,n){var o=e.get(t);o&&(n?o.splice(o.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var o=e.get(t);o&&o.slice().map(function(t){t(n)}),(o=e.get("*"))&&o.slice().map(function(e){e(t,n)})}};var e;return window[ot]=t,t}var it=(t=>(t.ZH_CN="zh_CN",t.ZH_TW="zh_TW",t.English="en",t.Japanese="ja",t.Korean="ko",t.Russian="ru",t))(it||{});const st="openProductListPopup",at=e=>{const{props:n}=e,{getEmitter:o}=(()=>{const e=t.inject("interactGlobalConfigV2",{globalLang:it.ZH_CN});return{injectData:e,toast:t=>{e.toast&&e.toast(t)},getEmitter:function(){return e.getEmitter?e.getEmitter():rt()},messageBox:t=>e.messageBox?e.messageBox(t):Promise.resolve(!1)}})(),r=t.ref(""),i=t.ref(!1);return{productTotal:r,isCollapsed:i,onClickPendant:function(){o().emit(st)},getProductTotal:function(){return t=this,e=null,o=function*(){const t=yield n.productTarget.getProductList();r.value=String(t.total)},new Promise((n,r)=>{var i=t=>{try{a(o.next(t))}catch(e){r(e)}},s=t=>{try{a(o.throw(t))}catch(e){r(e)}},a=t=>t.done?n(t.value):Promise.resolve(t.value).then(i,s);a((o=o.apply(t,e)).next())});var t,e,o},toggleCollapse:function(){i.value=!i.value}}};return et(t.defineComponent({__name:"mobile-product-pendant",props:{productTarget:W.object().isRequired},setup(e){const n=e,{productTotal:o,onClickPendant:r,getProductTotal:i}=at({props:n});return t.onMounted(()=>{i()}),{__sfc:!0,props:n,productTotal:o,onClickPendant:r,getProductTotal:i,pendantIcon:"data:image/png;base64,iVB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rjULsNRyM6g+5I5jmM6iB6gIHUGMtUcVZ0h7aOrKYk6kfFJxjLUpD42a2qOKk6sbxKpIIBBf4sl21oKW+wmH12fQfzz2BWS8xzUaeSiuoIZXfsANUc5YUtOqjiqsRSS/yTtehfuKXMG2K0c65CeQa3OP9A07TDJtjNzpN0/Od7dZE78LbwIjeyPk7Suz17Ft47paxJxqkH/x8wBED54ps3cVYZmTmK97pfdSgTgBQMD9LD7qTWhuGvMcWCWqp/OpwtOCF7wMBrRQ9cyJIJGN0hNMOn7dMIMTp4xvQ44fthra2TIZ9IJxf+y5gzCHBG2P14A3jBFOj2ASnevdquhmZNgTNyOQdKICaBIn5xiZ8u1w6T65bEPUpsgAUwHHBGDE4IIIjTivsRUukHurG0cV/88Pl3mKL5FCP4gS6z9vlWOO+/AHED7FNAan1R8V+YYwImZhK99+8cMkOldC1NSOp3pOrlbuRZc266XrjcxKBkWDQIQXOslZUpYUY8ybZcJ71XNkYCXAse0xAKQ/jU0oj8H7VDJJJBOXqfLtEWOOz+s3UsBk2ZP6uOHUOzMVSFagMRKZR1JpXtn03fM9k5Et53o1+fvak/0S9e5DIuEnilaFvkVsbysXWK2J4rPDnxnB9nhhrELYWaKzib8y4qoXTECJF6sXEWy0peIE3Piu30vmCMB0TkhW+pNWif8K2L5RxUTBvZn0rviMpJqRr9fmIOXZYrvwqKgCgXju2Kd6GYRK5Uqu2IeSdW95ijsd63mKJaPsLEorCLDebH8vPXtZ6e/aoiVSpWWmEeIq/uGOcLrMaX7bapB3YPhVaQ/L5afr2qm2yfOr4V381v49NcRYglJ7z2rvT7n2Bgq/ETNCXrgiMwySnwHVYR/WSz/cCXPfHMDBLRfE4dZaJ1DMgdyGpn445sSCMWy6rMnFCY2ivQ5J3Hg6wMsXEcEVbzgKtJfFT9/Iff/ujCSkYxkJCMZyf0t/wVfoDB9IXM0sAAAAABJRU5ErkJggg==",CommonPendant:nt}}}),function(){var t=this,e=t._self._c,n=t._self._setupProxy;return e("div",{staticClass:"plv-product-pendant"},[n.productTotal?e(n.CommonPendant,{attrs:{"icon-url":n.pendantIcon,text:n.productTotal&&"0"!==n.productTotal?n.productTotal:""},on:{"click-pendant":n.onClickPendant}}):t._e()],1)},[]).exports}),console.log("%c@polyv/product-ui","background:#409EFF;padding: 2px 6px;border-radius: 3px;color: #fff","[component: mobile-product-pendant]","[version: 1.2.0-rc-20250724.2]","[buildTime: 2025-07-24 03:57:05]");
|