import{aU as n,aV as t,r as e}from"./index-520dfaee.js";function r(n,t){if(t+="","exact"===n)return"已售"+t;if(t<10)return"销量≤10";{let n=Math.pow(10,t.length-1);return"已售"+parseInt(t/n)*n+"+"}}function a(n,t){if(t+="","exact"===n)return"已兑换"+t;if(t<10)return"已兑换≤10";{let n=Math.pow(10,t.length-1);return"已兑换"+parseInt(t/n)*n+"+"}}function o(n,t){if(t+="","exact"===n)return"库存"+t;if(t<10)return"库存≤10";{let n=Math.pow(10,t.length-1);return"库存 "+parseInt(t/n)*n+"+"}}function u(n){return 1===n.length?n[0]:n.join("~")}function i(t){let e=[];return t.forEach(((t,r)=>{-1!==t.indexOf(".avi")||-1!==t.indexOf(".mp4")?e.push({src:n.cdn(t),type:"video"}):e.push({src:n.cdn(t),type:"image"})})),e}function s(n){return"apply_refund"===n||"groupon_ing"===n||"nocomment"===n||"noget"===n||"nosend"===n?"warning-color":"closed"===n||"groupon_invalid"===n||"cancel"===n||"refund_agree"===n?"danger-color":"completed"===n?"success-color":"unpaid"===n?"info-color":void 0}function c(n,r=""){n=function(n){if((n=n.toString()).indexOf("-")>0)return t(n);if(n.length>10)return t(parseInt(n));if(10===n.length)return t.unix(parseInt(n))}(n),""===r&&(r=t());let a=e(n-r);a.value>0&&setTimeout((()=>{a.value>0&&(a.value-=1e3)}),1e3);let o=t.duration(a.value);return{h:(30*o.months()*24+24*o.days()+o.hours()).toString().padStart(2,"0"),m:o.minutes().toString().padStart(2,"0"),s:o.seconds().toString().padStart(2,"0"),ms:o.$ms}}export{u as a,r as b,a as c,o as d,s as e,i as f,c as u};
