const o=[15,30,45,60,1440],r=60*24;function E(u){return u>=r&&u%r===0}function l(u){if(!o.includes(u)&&!E(u))throw new RangeError(`\u9519\u8BEF\u7684scale\u503C\uFF0C\u8F93\u5165\u503C\u4E3A${u},\u53EF\u7528\u7684scale\u503C\u4E3A${o.join(",")},\u6216\u8005\u4E3A1440\u7684\u6574\u6570\u500D`);return!0}function F(u,t=60){l(t);let n,e=u.clone(),i=t/60;return t>60?(n=Math.floor(u.hour()/i),e=e.hour(n*i).minute(0).second(0)):(n=Math.floor(u.minute()/t),e=e.minute(n*t).second(0)),e}function c(u,t,n=60){if(u.isAfter(t))throw new TypeError("\u9519\u8BEF\u7684\u53C2\u6570\u987A\u5E8F\uFF0C\u51FD\u6570calcScalesAbout2Times\u7684\u7B2C\u4E00\u4E2A\u65F6\u95F4\u53C2\u6570\u5FC5\u987B\u5927\u4E8E\u7B2C\u4E8C\u4E2A\u65F6\u95F4\u53C2\u6570");l(n);let e=F(u,n),i=0;for(;!e.isAfter(t);)i++,e=e.add(n,"minute");return i}export{r as M,c,F as g,E as i};
