html5-infobeamer-dhcp/assets/js/luxon/luxon.es6.min.js

1 line
59 KiB
JavaScript
Raw Normal View History

2024-01-08 21:32:04 +01:00
class e extends Error{}class r extends e{constructor(e){super("Invalid DateTime: "+e.toMessage())}}class n extends e{constructor(e){super("Invalid Interval: "+e.toMessage())}}class s extends e{constructor(e){super("Invalid Duration: "+e.toMessage())}}class N extends e{}class i extends e{constructor(e){super("Invalid unit "+e)}}class o extends e{}class a extends e{constructor(){super("Zone is an abstract class")}}var t="numeric",u="short",l="long";const c={year:t,month:t,day:t},h={year:t,month:u,day:t},d={year:t,month:u,day:t,weekday:u},m={year:t,month:l,day:t},f={year:t,month:l,day:t,weekday:l},y={hour:t,minute:t},g={hour:t,minute:t,second:t},w={hour:t,minute:t,second:t,timeZoneName:u},v={hour:t,minute:t,second:t,timeZoneName:l},p={hour:t,minute:t,hourCycle:"h23"},T={hour:t,minute:t,second:t,hourCycle:"h23"},S={hour:t,minute:t,second:t,hourCycle:"h23",timeZoneName:u},O={hour:t,minute:t,second:t,hourCycle:"h23",timeZoneName:l},b={year:t,month:t,day:t,hour:t,minute:t},k={year:t,month:t,day:t,hour:t,minute:t,second:t},M={year:t,month:u,day:t,hour:t,minute:t},D={year:t,month:u,day:t,hour:t,minute:t,second:t},E={year:t,month:u,day:t,weekday:u,hour:t,minute:t},V={year:t,month:l,day:t,hour:t,minute:t,timeZoneName:u},I={year:t,month:l,day:t,hour:t,minute:t,second:t,timeZoneName:u},x={year:t,month:l,day:t,weekday:l,hour:t,minute:t,timeZoneName:l},C={year:t,month:l,day:t,weekday:l,hour:t,minute:t,second:t,timeZoneName:l};function F(e){return void 0===e}function L(e){return"number"==typeof e}function Z(e){return"number"==typeof e&&e%1==0}function z(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function q(e,r,n){if(0!==e.length)return e.reduce((e,t)=>{t=[r(t),t];return e&&n(e[0],t[0])===e[0]?e:t},null)[1]}function A(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function j(e,t,r){return Z(e)&&t<=e&&e<=r}function _(e,t=2){let r;return r=e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0"),r}function U(e){if(!F(e)&&null!==e&&""!==e)return parseInt(e,10)}function $(e){if(!F(e)&&null!==e&&""!==e)return parseFloat(e)}function H(e){if(!F(e)&&null!==e&&""!==e){e=1e3*parseFloat("0."+e);return Math.floor(e)}}function W(e,t,r=!1){const n=10**t,s=r?Math.trunc:Math.round;return s(e*n)/n}function R(e){return e%4==0&&(e%100!=0||e%400==0)}function J(e){return R(e)?366:365}function P(e,t){var r,n=(r=t-1)-(n=12)*Math.floor(r/n)+1;return 2==n?R(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function Y(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&0<=e.year&&(t=new Date(t),t.setUTCFullYear(t.getUTCFullYear()-1900)),+t}function G(e){var t=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,e=e-1,e=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7;return 4==t||3==e?53:52}function B(e){return 99<e?e:60<e?1900+e:2e3+e}function Q(e,t,r,n=null){const s=new Date(e),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};n&&(i.timeZone=n);t={timeZoneName:t,...i},t=new Intl.DateTimeFormat(r,t).formatToParts(s).find(e=>"timezonename"===e.type.toLowerCase());return t?t.value:null}function K(e,t){let r=parseInt(e,10);Number.isNaN(r)&&(r=0);t=parseInt(t,10)||0,t=r<0||Object.is(r,-0)?-t:t;return 60*r+t}function X(e){var t=Number(e);if("boolean"==typeof e||""===e||Number.isNaN(t))throw new o("Invalid unit value "+e);return t}function ee(e,t){const r={};for(const s in e){var n;!A(e,s)||null!=(n=e[s])&&(r[t(s)]=X(n))}return r}function te(e,t){var r=Math.trunc(Math.abs(e/60)),n=Math.trunc(Math.abs(e%60)),s=0<=e?"+":"-";switch(t){case"short":return s+_(r,2)+":"+_(n,2);case"narrow":return s+r+(0<n?":"+n:"");case"techie":return s+_(r,2)+_(n,2);default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function re(e){return r=e,["hour","minute","second","millisecond"].reduce((e,t)=>(e[t]=r[t],e),{});var r}var ne=/[A-Za-z_+-]{1,256}(:?\/[A-Za-z0-9_+-]{1,256}(\/[A-Za-z0-9_+-]{1,256})?)?/;const se=["January","February","March","April","May","June","July","August","September","Oct