diff --git a/CHANGELOG.md b/CHANGELOG.md index b1eaf2d..88e4678 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,11 @@ - Queue and Dequeue commands to contextual menu. - Every part of the current query path at 'Search media library' panel can now be clicked to jump to that node. For ex: for a library filtered by genre with path '[African] > Ali Farka Tour� > Ali & Toumani'; '[African]' And 'Ali Farka Tour�' could be clicked to directly jump to those (like pressing the back button multiple times). ### Changed +- Progress bar text is now cut to ensure it's displayed on a single line. +- Progress bar tooltip now displays the full playing now info (helper2). +- Changed 'Sort by...', 'Rename', 'Add' (Extended controls) and 'Browse to...' (Browse files) popups from native modal popups to HTML ones (should work in more browsers and be future-proof). Colors also change according to theme. +- Simplified 'Search media library' panel UI. +- Simplified 'Sort by...' prompt info. - Clarified the warnings for 'Playlist Tools Menu Entries' (listener and CMD) when the required components are installed but the feature has not been enabled. - Opening the contextual menu now first selects the track at mouse position if there were no tracks selected before or current selection was at other position. i.e. it behaves like foobar2000 selection, only running the contextual menu on current selection if you clicked within it. - Tooltips are now self-hidden if mouse is not moved after 6 secs of being shown. @@ -28,6 +33,8 @@ - Template no longer shows AJAX errors while reloading the web page, as long as it is able to identify the page is unloading. See Mozilla compatibility browser [list](https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event). ### Removed ### Fixed +- 'Flush queue' and 'Run contextual menu' did not respect the disabled state, allowing to click on them while action was disabled. +- 'Sort by...' at 'Extended controls' panel not working in some cases when specifying the sort direction. - Selected track, playing or pause icon overlapping with queue index in some cases. - Scrolling back not working during drag n' drop if already scrolled to a posterior page on the playlist (since original ajquery). - Dynamic colors not being reset when closing/opening the art panel during the same track due to some optimizations included in v0.96. diff --git a/_readme.txt b/_readme.txt index 27730f0..77a19b1 100644 --- a/_readme.txt +++ b/_readme.txt @@ -226,6 +226,13 @@ https://github.com/regorxxx/ajquery-xxx '[African] > Ali Farka Tour� > Ali & Toumani'; '[African]' And 'Ali Farka Tour�' could be clicked to directly jump to those (like pressing the back button multiple times); + cha: Progress bar text is now cut to ensure it's displayed on a single line; + cha: Progress bar tooltip now displays the full playing now info (helper2); + cha: Changed 'Sort by...', 'Rename', 'Add' (Extended controls) and 'Browse to...' (Browse + files) popups from native modal popups to HTML ones (should work in more browsers + and be future-proof). Colors also change according to theme; + cha: Simplified 'Search media library' panel UI; + cha: Simplified 'Sort by...' prompt info; cha: Clarified the warnings for 'Playlist Tools Menu Entries' (listener and CMD) when the required components are installed but the feature has not been enabled; cha: Opening the contextual menu now first selects the track at mouse position if @@ -246,6 +253,10 @@ https://github.com/regorxxx/ajquery-xxx cha: Template no longer shows AJAX errors while reloading the web page, as long as it is able to identify the page is unloading. See Mozilla compatibility browser [list](https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event); + fix: 'Flush queue' and 'Run contextual menu' did not respect the disabled state, allowing + to click on them while action was disabled. + fix: 'Sort by...' at 'Extended controls' panel not working in some cases when specyfing + the sort direction. fix: Selected track, playing or pause icon overlapping with queue index in some cases; fix: Scrolling back not working during drag n' drop if already scrolled to a posterior page on the playlist (since original ajquery); diff --git a/index.html b/index.html index eac5615..72d8838 100644 --- a/index.html +++ b/index.html @@ -13,8 +13,9 @@ + @@ -451,11 +467,11 @@

Playlist Tools

-

Search: ?

+

  ?X

-  Current query path:  +
diff --git a/js/ajquery.js b/js/ajquery.js index 60faff8..04c55eb 100644 --- a/js/ajquery.js +++ b/js/ajquery.js @@ -19,6 +19,10 @@ let brParams = new Object; let keyPressed = {}; let inputHasFocus = false; let bUnloading = false; // See startup.js +let promptfCache = { + sort: '%TITLE%', + contextual: 'Playback Statistics/Rating/5' +} const refreshInterval = 1000; // ms,.data retrieval interval, (not supposed to be changed) const menusPls = [ {id: 'PMME0', type: '', bSelection: false, name: '', description: ''}, @@ -214,6 +218,12 @@ function promptf(msg, value) { return result; } +function promptfV2(msg, value, options = {theme: 'modal_ajquery', dragDrop: true, top: document.documentElement.clientHeight / 3}) { + inputHasFocus = true; + msg = msg.replace(/\n/g, '
'); + return DayPilot.Modal.prompt(msg, value, options).finally(() => inputHasFocus = false); +} + /* This script and many more are available free online at The JavaScript Source!! http://javascript.internet.com Created by: Justas | http://www.webtoolkit.info/ */ @@ -1025,8 +1035,7 @@ function updateTabs() { $("#tabs a:eq(" + i + ")").html(['', fb.playlists[i].name, ''].join('')); } } -// tabs.tabs('select', parseInt(fb.playlistActive)); -// let index = $('#tabs a[href="#simple-tab-2"]').parent().index(); + $("#tabs").tabs("option", "active", parseInt(fb.playlistActive)); settingTabs = false; } @@ -1073,6 +1082,7 @@ function updateAlbumartPalette() { '--background-color-v4': palette.LightMuted.getHex(), '--tabs-color-v1': palette.LightMuted.getHex(), '--tabs-color-v2': palette.LightVibrant.getHex(), + '--modal-main': palette.Vibrant.getHex(), }; const style = Object.keys(colors).map((key) => key + ': ' + colors[key]).join('; '); $(':root').attr('style', style); @@ -1116,8 +1126,8 @@ function updateLibrary() { len = library.queryInfo.length; const currSearch = $('#searchstr').val().length; if (len < 1 && currSearch) {$('#r_btn').html('Filter');} - else if (len < 1 && !currSearch) {$('#r_btn').html('Retrieve list');} - else {$('#r_btn').text('<');} + else if (len < 1 && !currSearch) {$('#r_btn').html('All');} + // else {$('#r_btn').text('<');} const path = []; for (let i = 0; i < len; ++i) { const name = stripXmlEntities.perform(library.queryInfo[i]); @@ -1146,9 +1156,9 @@ function updateUI() { let playingTitle = fb.helper2; $('#playingtitle').html(fb.helper2); // Responsive design - const maxWidth = document.documentElement.clientWidth * 0.75; + const maxWidth = $('#progressbar').width() * 0.88; while ($('#playingtitle').width() > maxWidth) { - playingTitle = playingTitle.substring(0, playingTitle.length - 10) + '...'; + playingTitle = playingTitle.substring(0, playingTitle.length - 4) + '...'; $('#playingtitle').html(playingTitle); } // Pause/play @@ -1736,7 +1746,7 @@ $(function() { }, range: false, min: 1, - max: 1, + max: 1, value: 1 }) @@ -1788,30 +1798,65 @@ $(function() { $('#search_dlg_nav2').insertBefore('#search_dlg'); $('#searchstr').keypress(function(e) { - const currSearch = $('#searchstr').val(); if (e.which == 13) { // Enter + const currSearch = $('#searchstr').val(); searchMediaLibrary(currSearch); + if (currSearch.length) {$('#r_btn').html('Filter');} + else {$('#r_btn').html('All');} } else { if (timeoutId2) { - clearTimeout(timeoutId2); - timeoutId2 = null; + clearTimeout(timeoutId2); + timeoutId2 = null; + } + if (!timeoutId2) { + timeoutId2 = setTimeout(() => { + const currSearch = $('#searchstr').val(); + searchMediaLibrary(currSearch); + if (currSearch.length) {$('#r_btn').html('Filter');} + else {$('#r_btn').html('All');} + }, 500); + } + } + }).keyup(function(e) { + if (e.which == 8) { // Return + if (timeoutId2) { + clearTimeout(timeoutId2); + timeoutId2 = null; } if (!timeoutId2) { - timeoutId2 = setTimeout(() => searchMediaLibrary($('#searchstr').val()), 500); + timeoutId2 = setTimeout(() => { + const currSearch = $('#searchstr').val(); + searchMediaLibrary(currSearch); + if (currSearch.length) {$('#r_btn').html('Filter');} + else {$('#r_btn').html('All');} + }, 500); } } - const query = library ? library.queryInfo.length : null; - if (query === null) {return;} - if (library.queryInfo.length < 1 && currSearch) {$('#r_btn').html('Filter');} - else if(library.queryInfo.length < 1 && !currSearch) {$('#r_btn').html('Retrieve artist list');} - else {$('#r_btn').text('<');} + }).on('focus keyup', function(e) { + if (!$(this).val().length){ + $('#searchstrBttn').css({display: 'none', visibility: 'hidden'}); + } else { + $('#searchstrBttn').css({display: 'inline', visibility: 'visible'}); + } + }); + + $('#searchstrBttn').hover( + function() {$(this).addClass('qr_selected');}, + function() {$(this).removeClass('qr_selected');} + ).click(function(e) { + $('#searchstr').val('').keypress().keyup(); + }); $('#r_btn').click(function(e) { $(this).blur(); const query = $('#searchstr').val().toString(); - if (query && query.length && (!library || library.queryInfo.length === 0)) {retrieveLibraryState('QueryAdvance', query);} - else {retrieveLibraryState('QueryRetrace');} + if (query && query.length && (!library || library.queryInfo.length === 0)) {searchMediaLibrary(currSearch);} + else {$('#querypath_' + 0).click(); retrieveLibraryState('QueryRetrace');} + }); + $('#r_btn2').click(function(e) { + $(this).blur(); + retrieveLibraryState('QueryRetrace'); }); // browse dialog @@ -1824,8 +1869,10 @@ $(function() { }, buttons: { "Browse to..." : function() { - let path = promptf("Browse to:", Url.decode(br.pathcurrent)); - if (path !== null) {retrieveBrowserState(path);} + promptfV2('Browse to:', Url.decode(br.pathcurrent !== '+' ? br.pathcurrent : '')).then((e) => { + const path = e.result; + if (path) {retrieveBrowserState(path);} + }); }, "Enqueue current" : function() { retrieveState(brParams.cmdenqueue); @@ -1836,7 +1883,7 @@ $(function() { "Close": function() { $(this).dialog("close"); } - }, + }, close: function(event, ui) { saveWindowToCookie($(this).attr('id'), false); brOffsets = {}; @@ -2192,8 +2239,10 @@ $(function() { // Buttons $('#CreatePlaylist,#PTCreatePlaylist').click(function(e) { - let name = promptf('Enter new playlist name:', 'New Playlist'); - if (name != null) {command($(this).attr('id').replace('PT',''), name, void(0), true);} + promptfV2('Enter new playlist name:', 'New Playlist').then((e) => { + const name = e.result; + if (name) {command($(this).attr('id').replace('PT',''), name, void(0), true);} + }); }); $('#RemovePlaylist,#PTRemovePlaylist').click(function(e) { @@ -2206,8 +2255,11 @@ $(function() { $('#RenamePlaylist,#PTRenamePlaylist').click(function(e) { if (!$(this).hasClass('ui-state-disabled')) { - let new_name = promptf("Enter new name:", fb.playlists[fb.playlistActive].name); - if (new_name != null) {command('RenamePlaylist', new_name, fb.playlistActive, true);} + const currName = fb.playlists[fb.playlistActive].name; + promptfV2('Enter new name:', currName).then((e) => { + const name = e.result; + if (name && name !== currName) {command('RenamePlaylist', new_name, fb.playlistActive, true);} + }); } }); @@ -2225,7 +2277,9 @@ $(function() { }); $('#FlushQueue,#QueueRandomItems').click(function(e) { - command($(this).attr('id'), void(0), void(0), true); + if (!$(this).hasClass('ui-state-disabled')) { + command($(this).attr('id'), void(0), void(0), true); + } }); $('#Undo,#Redo,#PTUndo,#PTRedo').click(function() { @@ -2300,7 +2354,7 @@ $(function() { $('#progressbar').progressbar({ value: 0 - }) + }) .resizable({ alsoResize: '#tabs', handles: 'e', resize: function(event, ui) { savePlaylistSize(); } }) .hover( function(event) { }, @@ -2309,7 +2363,7 @@ $(function() { function(event) { if (fb && fb.isPlaying == "1") { let t = Math.round((event.pageX - $('#progressbar').offset().left) * fb.itemPlayingLen / ($('#progressbar').width())); - tooltip.show(formatTime(t), event.pageX + 15, $('#progressbar').offset().top - 10); + tooltip.showHTML(fb.helper2 + '
' + formatTime(t), event.pageX + 15, $('#progressbar').offset().top - 10); } }) .click(function(event) { @@ -2333,21 +2387,31 @@ $(function() { // Input sort menu $('#InputSort').click(function(e) { - let sort = promptf('Enter Sort pattern:\n\'ASCENDING BY\' or \'DESCENDING BY\'\nare allowed at the start (ascending by default).', '%title%'); - if (sort != null) { - if (sort.startsWith('ASCENDING BY') || sort.startsWith('ABY')) {command('SortAscending', sort);} - else if (sort.startsWith('DESCENDING BY') || sort.startsWith('DBY')) {command('SortDescending', sort);} - else if (!sort.startsWith('DESCENDING') && !sort.startsWith('ASCENDING')) {command('SortAscending', sort);} - else {return;} - } + promptfV2('Enter Sort pattern: (ascending by default)\n\'ASCENDING BY\' (or \'ABY\') and \'DESCENDING BY\' (or \'DBY\') allowed.', promptfCache.sort).then((e) => { + const sort = e.result; + let bDone = false; + if (sort) { + bDone = true; + if (sort.startsWith('ASCENDING BY') || sort.startsWith('ABY')) {command('SortAscending', sort.replace(/^(ASCENDING BY|ABY) /, ''));} + else if (sort.startsWith('DESCENDING BY') || sort.startsWith('DBY')) {command('SortDescending', sort.replace(/^(DESCENDING BY|DBY) /, ''));} + else if (!sort.startsWith('DESCENDING') && !sort.startsWith('ASCENDING')) {command('SortAscending', sort);} + else {bDone = false;} + } + if (bDone) {promptfCache.sort = sort;} + }); }); // Input contextual menu $('#InputCC').click(function(e) { - let name = promptf('Enter Contextual (full) menu name:\nNote that running playlist-specific commands\nlike Remove, Crop, etc is not possible.', 'Playback Statistics/Rating/5'); - if (name != null) { - const items = selection.toStr(); - command('SelectionCommand', name , items, true); + if (!$(this).hasClass('ui-state-disabled')) { + promptfV2('Enter Contextual (full) menu name:\nNote that running playlist-specific commands\nlike Remove, Crop, etc is not possible.', promptfCache.contextual).then((e) => { + const name = e.result; + if (name) { + const items = selection.toStr(); + command('SelectionCommand', name , items, true); + promptfCache.contextual = name; + } + }); } }); diff --git a/js/daypilot-modal.min.js b/js/daypilot-modal.min.js new file mode 100644 index 0000000..536d2c0 --- /dev/null +++ b/js/daypilot-modal.min.js @@ -0,0 +1,30 @@ +/*! + * @daypilot/modal 3.17.0 + * Apache License 2.0 + * https://modal.daypilot.org/ + * Modified by regorxxx to add noselect class and remove white background on popup parent + * + */ +window.DayPilot=function(t){var e={};function i(n){if(e[n])return e[n].exports;var a=e[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,i),a.l=!0,a.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"u",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.u)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)i.d(n,a,function(e){return t[e]}.bind(null,a));return n},i.n=function(t){var e=t&&t.u?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=0)}([function(t,e,i){t.exports=i(1)},function(t,e,i){"use strict";i.r(e),i.d(e,"Modal",(function(){return b}));const n={};!function(t){if(!t.Searchable){var e=function(t){this.data=[],this.name=null,this.theme="searchable_default",this.g=!1,this.listZIndex=1e5,this.onSelect=null,this._=null,this.I=null,this.M=!1,this.N=null,this.A=null,this.C=[],this.S=null,t=t||{};var e=this,i={selected:{post:function(t){"object"==typeof t&&t.id?e._=t:"string"!=typeof t&&"number"!=typeof t||e.select(t)}}};for(var n in Object.defineProperty(this,"selected",{get:function(){return this._}}),Object.defineProperty(this,"disabled",{get:function(){return this.g},set:function(t){this.g=t,this.N&&(this.N.disabled=t,t&&this.j())}}),t)i[n]||(this[n]=t[n]);for(var n in t)i[n]&&i[n].post(t[n])};e.prototype.select=function(t){return this._=this.data.find((function(e){return e.id===t})),this.k(!1),this},e.prototype.create=function(){var t=this,e=this,i=document.createElement("div");i.className=this.theme+"_main",i.style.position="relative";var n=document.createElement("div");n.className=this.theme+"_icon",n.style.position="absolute",n.style.right="0",n.style.top="0",n.style.bottom="0",n.style.width="20px",n.addEventListener("mousedown",(function(e){e.preventDefault(),t.M?(t.focus(),c()):(d(),h())}));var a=document.createElement("div");a.className=this.theme+"_list",a.style.display="none",a.style.position="absolute",a.style.zIndex=this.listZIndex;var r=document.createElement("input");r.type="hidden",r.name=this.name,r.searchable=e,this.S=r;var o=document.createElement("input");function s(e){var i=t.strategy;"includes"!==t.strategy&&"startsWith"!==t.strategy&&(i="includes"),e=e||i||"includes",a.style.display="",a.style.top=o.offsetHeight+"px",a.style.left="0px",a.style.width=o.offsetWidth+"px",a.innerHTML="",a.addEventListener("mousedown",(function(t){t.preventDefault()})),t.I=null,t.C=[];var n=null;t.data.forEach((function(i){var r=i.name||i.id;if("includes"===e){if(-1===r.toLowerCase().indexOf(o.value.toLowerCase()))return}else if("startsWith"===e&&0!==r.toLowerCase().indexOf(o.value.toLowerCase()))return;var s=document.createElement("div");s.className=t.theme+"_list_item",s.innerText=r,s.item=i,i===t._&&(t.I=s),n||(n=s),s.addEventListener("mousedown",(function(t){m(s),t.preventDefault()})),s.addEventListener("mousemove",(function(e){t.I!==s&&(t.I=s,u({dontScroll:!0}))})),a.appendChild(s),t.C.push(s)})),t.I||(t.I=n),u()}function u(e){var i,n,r,o,s=!(e=e||{}).dontScroll;document.querySelectorAll("."+t.theme+"_list_item_highlight").forEach((function(e){e.className=e.className.replace(t.theme+"_list_item_highlight","")})),t.I&&(t.I.className+=" "+t.theme+"_list_item_highlight",!s||(i=t.I,n=a,r=i.getBoundingClientRect(),o=n.getBoundingClientRect(),r.top>=o.top&&r.bottom<=o.bottom)||t.I.scrollIntoView())}function m(e){var i=e.item;t._=i,t.k(!0),t.H(),h()}function d(){t.j()}function h(){t.M=!0,o.setAttribute("readonly","readonly"),o.focus()}function c(){t.M=!1,o.removeAttribute("readonly"),o.select(),s("all")}return o.type="text",o.className=this.theme+"_input",o.disabled=this.g,o.addEventListener("click",(function(t){c()})),o.addEventListener("focus",(function(t){s("all")})),o.addEventListener("input",(function(t){s()})),o.addEventListener("blur",(function(t){o.removeAttribute("readonly"),d()})),o.addEventListener("keydown",(function(i){if(t.M){if("Enter"===i.key)return;if("Esc"===i.key||"Escape"===i.key)return;c()}if("ArrowDown"===i.key)(n=e.C.indexOf(e.I))+1=0&&(e.I=e.C[n-1]),u()}else"Enter"===i.key?t.I?(i.stopPropagation(),m(t.I)):(i.stopPropagation(),d(),h()):"Esc"!==i.key&&"Escape"!==i.key||(i.stopPropagation(),d(),h())})),this.N=o,this.A=a,this._||(this._=this.data[0],this._&&(o.value=this._.name)),i.appendChild(o),i.appendChild(n),i.appendChild(r),i.appendChild(a),i},e.prototype.j=function(){this.H(),this._?this.N.value=this._.name:(this.N.value="",this.k(!0))},e.prototype.focus=function(){this.M=!0,this.N.setAttribute("readonly","readonly"),this.N.focus(),this.j()},e.prototype.H=function(){this.A.style.display="none"},e.prototype.k=function(t){if(this.S.value=this.selected?this.selected.id:null,this._?this.N.value=this._.name:this.N.value="","function"==typeof this.onSelect){var e={control:this,ui:t};this.onSelect(e)}},t.Searchable=e}}(n);const{Searchable:a}=n;var r={};!function(t){if(void 0===t.Locale){t.Locale=function(t,e){if(this.id=t,this.dayNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],this.dayNamesShort=["Su","Mo","Tu","We","Th","Fr","Sa"],this.monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"],this.monthNamesShort=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],this.datePattern="M/d/yyyy",this.timePattern="H:mm",this.dateTimePattern="M/d/yyyy H:mm",this.timeFormat="Clock12Hours",this.weekStarts=0,e)for(var i in e)this[i]=e[i]},t.Locale.all={},t.Locale.find=function(e){if(!e)return null;var i,n,a,r=e.toLowerCase();return r.length>2&&(n=2,a="-",r=(i=r).substr(0,n)+a+i.substr(n+a.length)),t.Locale.all[r]},t.Locale.register=function(e){t.Locale.all[e.id]=e},t.Locale.register(new t.Locale("ca-es",{dayNames:["diumenge","dilluns","dimarts","dimecres","dijous","divendres","dissabte"],dayNamesShort:["dg","dl","dt","dc","dj","dv","ds"],monthNames:["gener","febrer","març","abril","maig","juny","juliol","agost","setembre","octubre","novembre","desembre",""],monthNamesShort:["gen.","febr.","març","abr.","maig","juny","jul.","ag.","set.","oct.","nov.","des.",""],timePattern:"H:mm",datePattern:"dd/MM/yyyy",dateTimePattern:"dd/MM/yyyy H:mm",timeFormat:"Clock24Hours",weekStarts:1})),t.Locale.register(new t.Locale("cs-cz",{dayNames:["neděle","pondělí","úterý","středa","čtvrtek","pátek","sobota"],dayNamesShort:["ne","po","út","st","čt","pá","so"],monthNames:["leden","únor","březen","duben","květen","červen","červenec","srpen","září","říjen","listopad","prosinec",""],monthNamesShort:["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII",""],timePattern:"H:mm",datePattern:"d. M. yyyy",dateTimePattern:"d. M. yyyy H:mm",timeFormat:"Clock24Hours",weekStarts:1})),t.Locale.register(new t.Locale("da-dk",{dayNames:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],dayNamesShort:["sø","ma","ti","on","to","fr","lø"],monthNames:["januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december",""],monthNamesShort:["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec",""],timePattern:"HH:mm",datePattern:"dd-MM-yyyy",dateTimePattern:"dd-MM-yyyy HH:mm",timeFormat:"Clock24Hours",weekStarts:1})),t.Locale.register(new t.Locale("de-at",{dayNames:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],dayNamesShort:["So","Mo","Di","Mi","Do","Fr","Sa"],monthNames:["Jänner","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],monthNamesShort:["Jän","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""],timePattern:"HH:mm",datePattern:"dd.MM.yyyy",dateTimePattern:"dd.MM.yyyy HH:mm",timeFormat:"Clock24Hours",weekStarts:1})),t.Locale.register(new t.Locale("de-ch",{dayNames:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],dayNamesShort:["So","Mo","Di","Mi","Do","Fr","Sa"],monthNames:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],monthNamesShort:["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""],timePattern:"HH:mm",datePattern:"dd.MM.yyyy",dateTimePattern:"dd.MM.yyyy HH:mm",timeFormat:"Clock24Hours",weekStarts:1})),t.Locale.register(new t.Locale("de-de",{dayNames:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],dayNamesShort:["So","Mo","Di","Mi","Do","Fr","Sa"],monthNames:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],monthNamesShort:["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""],timePattern:"HH:mm",datePattern:"dd.MM.yyyy",dateTimePattern:"dd.MM.yyyy HH:mm",timeFormat:"Clock24Hours",weekStarts:1})),t.Locale.register(new t.Locale("de-lu",{dayNames:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],dayNamesShort:["So","Mo","Di","Mi","Do","Fr","Sa"],monthNames:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],monthNamesShort:["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""],timePattern:"HH:mm",datePattern:"dd.MM.yyyy",dateTimePattern:"dd.MM.yyyy HH:mm",timeFormat:"Clock24Hours",weekStarts:1})),t.Locale.register(new t.Locale("en-au",{dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December",""],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],timePattern:"h:mm tt",datePattern:"d/MM/yyyy",dateTimePattern:"d/MM/yyyy h:mm tt",timeFormat:"Clock12Hours",weekStarts:1})),t.Locale.register(new t.Locale("en-ca",{dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December",""],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],timePattern:"h:mm tt",datePattern:"yyyy-MM-dd",dateTimePattern:"yyyy-MM-dd h:mm tt",timeFormat:"Clock12Hours",weekStarts:0})),t.Locale.register(new t.Locale("en-gb",{dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December",""],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],timePattern:"HH:mm",datePattern:"dd/MM/yyyy",dateTimePattern:"dd/MM/yyyy HH:mm",timeFormat:"Clock24Hours",weekStarts:1})),t.Locale.register(new t.Locale("en-us",{dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December",""],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],timePattern:"h:mm tt",datePattern:"M/d/yyyy",dateTimePattern:"M/d/yyyy h:mm tt",timeFormat:"Clock12Hours",weekStarts:0})),t.Locale.register(new t.Locale("es-es",{dayNames:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],dayNamesShort:["D","L","M","X","J","V","S"],monthNames:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],monthNamesShort:["ene.","feb.","mar.","abr.","may.","jun.","jul.","ago.","sep.","oct.","nov.","dic.",""],timePattern:"H:mm",datePattern:"dd/MM/yyyy",dateTimePattern:"dd/MM/yyyy H:mm",timeFormat:"Clock24Hours",weekStarts:1})),t.Locale.register(new t.Locale("es-mx",{dayNames:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],dayNamesShort:["do.","lu.","ma.","mi.","ju.","vi.","sá."],monthNames:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],monthNamesShort:["ene.","feb.","mar.","abr.","may.","jun.","jul.","ago.","sep.","oct.","nov.","dic.",""],timePattern:"hh:mm tt",datePattern:"dd/MM/yyyy",dateTimePattern:"dd/MM/yyyy hh:mm tt",timeFormat:"Clock12Hours",weekStarts:0})),t.Locale.register(new t.Locale("eu-es",{dayNames:["igandea","astelehena","asteartea","asteazkena","osteguna","ostirala","larunbata"],dayNamesShort:["ig","al","as","az","og","or","lr"],monthNames:["urtarrila","otsaila","martxoa","apirila","maiatza","ekaina","uztaila","abuztua","iraila","urria","azaroa","abendua",""],monthNamesShort:["urt.","ots.","mar.","api.","mai.","eka.","uzt.","abu.","ira.","urr.","aza.","abe.",""],timePattern:"H:mm",datePattern:"yyyy/MM/dd",dateTimePattern:"yyyy/MM/dd H:mm",timeFormat:"Clock24Hours",weekStarts:1})),t.Locale.register(new t.Locale("fi-fi",{dayNames:["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"],dayNamesShort:["su","ma","ti","ke","to","pe","la"],monthNames:["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu",""],monthNamesShort:["tammi","helmi","maalis","huhti","touko","kesä","heinä","elo","syys","loka","marras","joulu",""],timePattern:"H:mm",datePattern:"d.M.yyyy",dateTimePattern:"d.M.yyyy H:mm",timeFormat:"Clock24Hours",weekStarts:1})),t.Locale.register(new t.Locale("fr-be",{dayNames:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],dayNamesShort:["di","lu","ma","me","je","ve","sa"],monthNames:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],monthNamesShort:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""],timePattern:"HH:mm",datePattern:"dd-MM-yy",dateTimePattern:"dd-MM-yy HH:mm",timeFormat:"Clock24Hours",weekStarts:1})),t.Locale.register(new t.Locale("fr-ca",{dayNames:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],dayNamesShort:["di","lu","ma","me","je","ve","sa"],monthNames:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],monthNamesShort:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""],timePattern:"HH:mm",datePattern:"yyyy-MM-dd",dateTimePattern:"yyyy-MM-dd HH:mm",timeFormat:"Clock24Hours",weekStarts:0})),t.Locale.register(new t.Locale("fr-ch",{dayNames:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],dayNamesShort:["di","lu","ma","me","je","ve","sa"],monthNames:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],monthNamesShort:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""],timePattern:"HH:mm",datePattern:"dd.MM.yyyy",dateTimePattern:"dd.MM.yyyy HH:mm",timeFormat:"Clock24Hours",weekStarts:1})),t.Locale.register(new t.Locale("fr-fr",{dayNames:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],dayNamesShort:["di","lu","ma","me","je","ve","sa"],monthNames:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],monthNamesShort:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""],timePattern:"HH:mm",datePattern:"dd/MM/yyyy",dateTimePattern:"dd/MM/yyyy HH:mm",timeFormat:"Clock24Hours",weekStarts:1})),t.Locale.register(new t.Locale("fr-lu",{dayNames:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],dayNamesShort:["di","lu","ma","me","je","ve","sa"],monthNames:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],monthNamesShort:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""],timePattern:"HH:mm",datePattern:"dd/MM/yyyy",dateTimePattern:"dd/MM/yyyy HH:mm",timeFormat:"Clock24Hours",weekStarts:1})),t.Locale.register(new t.Locale("gl-es",{dayNames:["domingo","luns","martes","mércores","xoves","venres","sábado"],dayNamesShort:["do","lu","ma","mé","xo","ve","sá"],monthNames:["xaneiro","febreiro","marzo","abril","maio","xuño","xullo","agosto","setembro","outubro","novembro","decembro",""],monthNamesShort:["xan","feb","mar","abr","maio","xuño","xul","ago","set","out","nov","dec",""],timePattern:"H:mm",datePattern:"dd/MM/yyyy",dateTimePattern:"dd/MM/yyyy H:mm",timeFormat:"Clock24Hours",weekStarts:1})),t.Locale.register(new t.Locale("it-it",{dayNames:["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"],dayNamesShort:["do","lu","ma","me","gi","ve","sa"],monthNames:["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre",""],monthNamesShort:["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic",""],timePattern:"HH:mm",datePattern:"dd/MM/yyyy",dateTimePattern:"dd/MM/yyyy HH:mm",timeFormat:"Clock24Hours",weekStarts:1})),t.Locale.register(new t.Locale("it-ch",{dayNames:["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"],dayNamesShort:["do","lu","ma","me","gi","ve","sa"],monthNames:["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre",""],monthNamesShort:["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic",""],timePattern:"HH:mm",datePattern:"dd.MM.yyyy",dateTimePattern:"dd.MM.yyyy HH:mm",timeFormat:"Clock24Hours",weekStarts:1})),t.Locale.register(new t.Locale("ja-jp",{dayNames:["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],dayNamesShort:["日","月","火","水","木","金","土"],monthNames:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""],monthNamesShort:["1","2","3","4","5","6","7","8","9","10","11","12",""],timePattern:"H:mm",datePattern:"yyyy/MM/dd",dateTimePattern:"yyyy/MM/dd H:mm",timeFormat:"Clock24Hours",weekStarts:0})),t.Locale.register(new t.Locale("ko-kr",{dayNames:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],dayNamesShort:["일","월","화","수","목","금","토"],monthNames:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월",""],monthNamesShort:["1","2","3","4","5","6","7","8","9","10","11","12",""],timePattern:"tt h:mm",datePattern:"yyyy-MM-dd",dateTimePattern:"yyyy-MM-dd tt h:mm",timeFormat:"Clock12Hours",weekStarts:0})),t.Locale.register(new t.Locale("nb-no",{dayNames:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],dayNamesShort:["sø","ma","ti","on","to","fr","lø"],monthNames:["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember",""],monthNamesShort:["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des",""],timePattern:"HH:mm",datePattern:"dd.MM.yyyy",dateTimePattern:"dd.MM.yyyy HH:mm",timeFormat:"Clock24Hours",weekStarts:1})),t.Locale.register(new t.Locale("nl-nl",{dayNames:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],dayNamesShort:["zo","ma","di","wo","do","vr","za"],monthNames:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december",""],monthNamesShort:["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec",""],timePattern:"HH:mm",datePattern:"d-M-yyyy",dateTimePattern:"d-M-yyyy HH:mm",timeFormat:"Clock24Hours",weekStarts:1})),t.Locale.register(new t.Locale("nl-be",{dayNames:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],dayNamesShort:["zo","ma","di","wo","do","vr","za"],monthNames:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december",""],monthNamesShort:["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec",""],timePattern:"H:mm",datePattern:"d/MM/yyyy",dateTimePattern:"d/MM/yyyy H:mm",timeFormat:"Clock24Hours",weekStarts:1})),t.Locale.register(new t.Locale("nn-no",{dayNames:["søndag","måndag","tysdag","onsdag","torsdag","fredag","laurdag"],dayNamesShort:["sø","må","ty","on","to","fr","la"],monthNames:["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember",""],monthNamesShort:["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des",""],timePattern:"HH:mm",datePattern:"dd.MM.yyyy",dateTimePattern:"dd.MM.yyyy HH:mm",timeFormat:"Clock24Hours",weekStarts:1})),t.Locale.register(new t.Locale("pt-br",{dayNames:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"],dayNamesShort:["D","S","T","Q","Q","S","S"],monthNames:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro",""],monthNamesShort:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez",""],timePattern:"HH:mm",datePattern:"dd/MM/yyyy",dateTimePattern:"dd/MM/yyyy HH:mm",timeFormat:"Clock24Hours",weekStarts:0})),t.Locale.register(new t.Locale("pl-pl",{dayNames:["niedziela","poniedziałek","wtorek","środa","czwartek","piątek","sobota"],dayNamesShort:["N","Pn","Wt","Śr","Cz","Pt","So"],monthNames:["styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień",""],monthNamesShort:["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru",""],timePattern:"HH:mm",datePattern:"yyyy-MM-dd",dateTimePattern:"yyyy-MM-dd HH:mm",timeFormat:"Clock24Hours",weekStarts:1})),t.Locale.register(new t.Locale("pt-pt",{dayNames:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"],dayNamesShort:["D","S","T","Q","Q","S","S"],monthNames:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro",""],monthNamesShort:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez",""],timePattern:"HH:mm",datePattern:"dd/MM/yyyy",dateTimePattern:"dd/MM/yyyy HH:mm",timeFormat:"Clock24Hours",weekStarts:0})),t.Locale.register(new t.Locale("ro-ro",{dayNames:["duminică","luni","marți","miercuri","joi","vineri","sâmbătă"],dayNamesShort:["D","L","Ma","Mi","J","V","S"],monthNames:["ianuarie","februarie","martie","aprilie","mai","iunie","iulie","august","septembrie","octombrie","noiembrie","decembrie",""],monthNamesShort:["ian.","feb.","mar.","apr.","mai.","iun.","iul.","aug.","sep.","oct.","nov.","dec.",""],timePattern:"H:mm",datePattern:"dd.MM.yyyy",dateTimePattern:"dd.MM.yyyy H:mm",timeFormat:"Clock24Hours",weekStarts:1})),t.Locale.register(new t.Locale("ru-ru",{dayNames:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"],dayNamesShort:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],monthNames:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь",""],monthNamesShort:["янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек",""],timePattern:"H:mm",datePattern:"dd.MM.yyyy",dateTimePattern:"dd.MM.yyyy H:mm",timeFormat:"Clock24Hours",weekStarts:1})),t.Locale.register(new t.Locale("sk-sk",{dayNames:["nedeľa","pondelok","utorok","streda","štvrtok","piatok","sobota"],dayNamesShort:["ne","po","ut","st","št","pi","so"],monthNames:["január","február","marec","apríl","máj","jún","júl","august","september","október","november","december",""],monthNamesShort:["1","2","3","4","5","6","7","8","9","10","11","12",""],timePattern:"H:mm",datePattern:"d.M.yyyy",dateTimePattern:"d.M.yyyy H:mm",timeFormat:"Clock24Hours",weekStarts:1})),t.Locale.register(new t.Locale("sv-se",{dayNames:["söndag","måndag","tisdag","onsdag","torsdag","fredag","lördag"],dayNamesShort:["sö","må","ti","on","to","fr","lö"],monthNames:["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december",""],monthNamesShort:["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec",""],timePattern:"HH:mm",datePattern:"yyyy-MM-dd",dateTimePattern:"yyyy-MM-dd HH:mm",timeFormat:"Clock24Hours",weekStarts:1})),t.Locale.register(new t.Locale("tr-tr",{dayNames:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"],dayNamesShort:["Pz","Pt","Sa","Ça","Pe","Cu","Ct"],monthNames:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık",""],monthNamesShort:["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara",""],timePattern:"HH:mm",datePattern:"d.M.yyyy",dateTimePattern:"d.M.yyyy HH:mm",timeFormat:"Clock24Hours",weekStarts:1})),t.Locale.register(new t.Locale("zh-cn",{dayNames:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayNamesShort:["日","一","二","三","四","五","六"],monthNames:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""],monthNamesShort:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""],timePattern:"H:mm",datePattern:"yyyy/M/d",dateTimePattern:"yyyy/M/d H:mm",timeFormat:"Clock24Hours",weekStarts:1})),t.Locale.US=t.Locale.find("en-us")}}(r);const{Locale:o}=r,s={Locale:o};!function(t){if(void 0===t.Date){var e=function(t){return null==t};t.Duration=function(e){var i=this,n=864e5,a=36e5,r=6e4,o=1e3;if(2===arguments.length){var s=arguments[0],u=arguments[1];if(!(s instanceof t.Date)&&"string"!=typeof s)throw"DayPilot.Duration(): Invalid start argument, DayPilot.Date expected";if(!(u instanceof t.Date)&&"string"!=typeof u)throw"DayPilot.Duration(): Invalid end argument, DayPilot.Date expected";"string"==typeof s&&(s=new t.Date(s)),"string"==typeof u&&(u=new t.Date(u)),e=u.getTime()-s.getTime()}if(this.ticks=e,t.Date.Cache.DurationCtor[""+e])return t.Date.Cache.DurationCtor[""+e];t.Date.Cache.DurationCtor[""+e]=this,this.toString=function(t){if(!t)return i.days()+"."+i.hours()+":"+i.minutes()+":"+i.seconds()+"."+i.milliseconds();var e=i.minutes();e=(e<10?"0":"")+e;var n=t;return n=(n=(n=(n=(n=(n=n.replace("mm",e)).replace("m",i.minutes())).replace("H",i.hours())).replace("h",i.hours())).replace("d",i.days())).replace("s",i.seconds())},this.totalHours=function(){return i.ticks/a},this.totalDays=function(){return i.ticks/n},this.totalMinutes=function(){return i.ticks/r},this.totalSeconds=function(){return i.ticks/o},this.days=function(){return Math.floor(i.totalDays())},this.hours=function(){var t=i.ticks-i.days()*n;return Math.floor(t/a)},this.minutes=function(){var t=i.ticks-Math.floor(i.totalHours())*a;return Math.floor(t/r)},this.seconds=function(){var t=i.ticks-Math.floor(i.totalMinutes())*r;return Math.floor(t/o)},this.milliseconds=function(){return i.ticks%o}},t.Duration.weeks=function(e){return new t.Duration(1e3*e*60*60*24*7)},t.Duration.days=function(e){return new t.Duration(1e3*e*60*60*24)},t.Duration.hours=function(e){return new t.Duration(1e3*e*60*60)},t.Duration.minutes=function(e){return new t.Duration(1e3*e*60)},t.Duration.seconds=function(e){return new t.Duration(1e3*e)},t.TimeSpan=function(){throw"Please use DayPilot.Duration class instead of DayPilot.TimeSpan."};try{t.TimeSpan.prototype=Object.create(t.Duration.prototype)}catch(t){}t.Date=function(i,a){if(i instanceof t.Date)return i;var r;e(i)&&(i=r=t.DateUtil.fromLocal().getTime());var o=t.Date.Cache.Ctor;if(o[i])return o[i];var s=!1;if("string"==typeof i){try{r=t.DateUtil.fromStringSortable(i,a).getTime()}catch(t){throw new Error("DayPilot.Date - Unable to parse ISO8601 date/time string: "+i)}s=!0}else if("number"==typeof i){if(isNaN(i))throw"Cannot create DayPilot.Date from NaN";r=i}else{if(!(i instanceof Date))throw"Unrecognized parameter: use Date, number or string in ISO 8601 format";r=a?t.DateUtil.fromLocal(i).getTime():i.getTime()}var u=n(r);if(o[u])return o[u];o[u]=this,o[r]=this,s&&u!==i&&t.DateUtil.hasTzSpec(i)&&(o[i]=this),Object.defineProperty?(Object.defineProperty(this,"ticks",{get:function(){return r}}),Object.defineProperty(this,"value",{value:u,writable:!1,enumerable:!0})):(this.ticks=r,this.value=u),t.Date.Config.legacyShowD&&(this.d=new Date(r))},t.Date.Config={},t.Date.Config.legacyShowD=!1,t.Date.Cache={},t.Date.Cache.Parsing={},t.Date.Cache.Ctor={},t.Date.Cache.Ticks={},t.Date.Cache.DurationCtor={},t.Date.Cache.clear=function(){t.Date.Cache.Parsing={},t.Date.Cache.Ctor={},t.Date.Cache.Ticks={},t.Date.Cache.DurationCtor={}},t.Date.prototype.addDays=function(e){return e?new t.Date(this.ticks+24*e*60*60*1e3):this},t.Date.prototype.addHours=function(t){return t?this.addTime(60*t*60*1e3):this},t.Date.prototype.addMilliseconds=function(t){return t?this.addTime(t):this},t.Date.prototype.addMinutes=function(t){return t?this.addTime(60*t*1e3):this},t.Date.prototype.addMonths=function(e){if(!e)return this;var i=new Date(this.ticks),n=i.getUTCFullYear(),a=i.getUTCMonth()+1;if(e>0){for(;e>=12;)e-=12,n++;e>12-a?(n++,a=e-(12-a)):a+=e}else{for(;e<=-12;)e+=12,n--;a+e<=0?(n--,a=12+a+e):a+=e}var r=new Date(i.getTime());r.setUTCDate(1),r.setUTCFullYear(n),r.setUTCMonth(a-1);var o=new t.Date(r).daysInMonth();return r.setUTCDate(Math.min(o,i.getUTCDate())),new t.Date(r)},t.Date.prototype.addSeconds=function(t){return t?this.addTime(1e3*t):this},t.Date.prototype.addTime=function(e){return e?(e instanceof t.Duration&&(e=e.ticks),new t.Date(this.ticks+e)):this},t.Date.prototype.addYears=function(e){var i=new Date(this.ticks),n=new Date(this.ticks),a=this.getYear()+e,r=this.getMonth();n.setUTCDate(1),n.setUTCFullYear(a),n.setUTCMonth(r);var o=new t.Date(n).daysInMonth();return n.setUTCDate(Math.min(o,i.getUTCDate())),new t.Date(n)},t.Date.prototype.dayOfWeek=function(){return new Date(this.ticks).getUTCDay()},t.Date.prototype.getDayOfWeek=function(){return new Date(this.ticks).getUTCDay()},t.Date.prototype.getDayOfYear=function(){var e=this.firstDayOfYear();return t.DateUtil.daysDiff(e,this)+1},t.Date.prototype.daysInMonth=function(){var t=new Date(this.ticks),e=t.getUTCMonth()+1,i=t.getUTCFullYear(),n=[31,28,31,30,31,30,31,31,30,31,30,31];return 2!==e?n[e-1]:i%4!=0||i%100==0&&i%400!=0?n[1]:n[1]+1},t.Date.prototype.daysInYear=function(){var t=this.getYear();return t%4!=0||t%100==0&&t%400!=0?365:366},t.Date.prototype.dayOfYear=function(){return Math.ceil((this.getDatePart().getTime()-this.firstDayOfYear().getTime())/864e5)+1},t.Date.prototype.equals=function(e){if(null===e)return!1;if(e instanceof t.Date)return this===e;throw"The parameter must be a DayPilot.Date object (DayPilot.Date.equals())"},t.Date.prototype.firstDayOfMonth=function(){var e=new Date;return e.setUTCFullYear(this.getYear(),this.getMonth(),1),e.setUTCHours(0),e.setUTCMinutes(0),e.setUTCSeconds(0),e.setUTCMilliseconds(0),new t.Date(e)},t.Date.prototype.firstDayOfYear=function(){var e=this.getYear(),i=new Date;return i.setUTCFullYear(e,0,1),i.setUTCHours(0),i.setUTCMinutes(0),i.setUTCSeconds(0),i.setUTCMilliseconds(0),new t.Date(i)},t.Date.prototype.firstDayOfWeek=function(e){var i=this;if(e instanceof t.Locale)e=e.weekStarts;else if("string"==typeof e&&t.Locale.find(e)){e=t.Locale.find(e).weekStarts}else e=e||0;for(var n=i.dayOfWeek();n!==e;)n=(i=i.addDays(-1)).dayOfWeek();return new t.Date(i)},t.Date.prototype.getDay=function(){return new Date(this.ticks).getUTCDate()},t.Date.prototype.getDatePart=function(){var e=new Date(this.ticks);return e.setUTCHours(0),e.setUTCMinutes(0),e.setUTCSeconds(0),e.setUTCMilliseconds(0),new t.Date(e)},t.Date.prototype.getYear=function(){return new Date(this.ticks).getUTCFullYear()},t.Date.prototype.getHours=function(){return new Date(this.ticks).getUTCHours()},t.Date.prototype.getMilliseconds=function(){return new Date(this.ticks).getUTCMilliseconds()},t.Date.prototype.getMinutes=function(){return new Date(this.ticks).getUTCMinutes()},t.Date.prototype.getMonth=function(){return new Date(this.ticks).getUTCMonth()},t.Date.prototype.getSeconds=function(){return new Date(this.ticks).getUTCSeconds()},t.Date.prototype.getTotalTicks=function(){return this.getTime()},t.Date.prototype.getTime=function(){return this.ticks},t.Date.prototype.getTimePart=function(){var e=this.getDatePart();return t.DateUtil.diff(this,e)},t.Date.prototype.lastDayOfMonth=function(){var e=new Date(this.firstDayOfMonth().getTime()),i=this.daysInMonth();return e.setUTCDate(i),new t.Date(e)},t.Date.prototype.weekNumber=function(){var t=this.firstDayOfYear(),e=(this.getTime()-t.getTime())/864e5;return Math.ceil((e+t.dayOfWeek()+1)/7)},t.Date.prototype.weekNumberISO=function(){var t=!1,e=this.dayOfYear(),i=this.firstDayOfYear().dayOfWeek(),n=this.firstDayOfYear().addYears(1).addDays(-1).dayOfWeek();0===i&&(i=7),0===n&&(n=7);var a=8-i;4!==i&&4!==n||(t=!0);var r=Math.ceil((e-a)/7);return a>=4&&(r+=1),r>52&&!t&&(r=1),0===r&&(r=this.firstDayOfYear().addDays(-1).weekNumberISO()),r},t.Date.prototype.toDateLocal=function(){var t=new Date(this.ticks),e=new Date;return e.setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),e.setHours(t.getUTCHours()),e.setMinutes(t.getUTCMinutes()),e.setSeconds(t.getUTCSeconds()),e.setMilliseconds(t.getUTCMilliseconds()),e},t.Date.prototype.toDate=function(){return new Date(this.ticks)},t.Date.prototype.toJSON=function(){return this.value},t.Date.prototype.toString=function(t,e){return t?new i(t,e).print(this):this.toStringSortable()},t.Date.prototype.toStringSortable=function(){return n(this.ticks)},t.Date.parse=function(t,e,n){return new i(e,n).parse(t)};t.Date.today=function(){return new t.Date(t.DateUtil.localToday(),!0)},t.Date.fromYearMonthDay=function(e,i,n){i=i||1,n=n||1;var a=new Date(0);return a.setUTCFullYear(e),a.setUTCMonth(i-1),a.setUTCDate(n),new t.Date(a)};var i=function(i,n){"string"==typeof n&&(n=t.Locale.find(n));n=n||t.Locale.US;var o=[{seq:"yyyy",expr:"[0-9]{4,4}",str:function(t){return t.getYear()}},{seq:"yy",expr:"[0-9]{2,2}",str:function(t){return t.getYear()%100}},{seq:"mm",expr:"[0-9]{2,2}",str:function(t){var e=t.getMinutes();return e<10?"0"+e:e}},{seq:"m",expr:"[0-9]{1,2}",str:function(t){return t.getMinutes()}},{seq:"HH",expr:"[0-9]{2,2}",str:function(t){var e=t.getHours();return e<10?"0"+e:e}},{seq:"H",expr:"[0-9]{1,2}",str:function(t){return t.getHours()}},{seq:"hh",expr:"[0-9]{2,2}",str:function(t){var e;0===(e=(e=t.getHours())%12)&&(e=12);return e<10?"0"+e:e}},{seq:"h",expr:"[0-9]{1,2}",str:function(t){var e;return 0===(e=(e=t.getHours())%12)&&(e=12),e}},{seq:"ss",expr:"[0-9]{2,2}",str:function(t){var e=t.getSeconds();return e<10?"0"+e:e}},{seq:"s",expr:"[0-9]{1,2}",str:function(t){return t.getSeconds()}},{seq:"MMMM",expr:"[^\\s0-9]*",str:function(t){return n.monthNames[t.getMonth()]},transform:function(t){var e=r(n.monthNames,t,a);return e<0?null:e+1}},{seq:"MMM",expr:"[^\\s0-9]*",str:function(t){return n.monthNamesShort[t.getMonth()]},transform:function(t){var e=r(n.monthNamesShort,t,a);return e<0?null:e+1}},{seq:"MM",expr:"[0-9]{2,2}",str:function(t){var e=t.getMonth()+1;return e<10?"0"+e:e}},{seq:"M",expr:"[0-9]{1,2}",str:function(t){return t.getMonth()+1}},{seq:"dddd",expr:"[^\\s0-9]*",str:function(t){return n.dayNames[t.getDayOfWeek()]}},{seq:"ddd",expr:"[^\\s0-9]*",str:function(t){return n.dayNamesShort[t.getDayOfWeek()]}},{seq:"dd",expr:"[0-9]{2,2}",str:function(t){var e=t.getDay();return e<10?"0"+e:e}},{seq:"%d",expr:"[0-9]{1,2}",str:function(t){return t.getDay()}},{seq:"d",expr:"[0-9]{1,2}",str:function(t){return t.getDay()}},{seq:"tt",expr:"(AM|PM|am|pm)",str:function(t){return t.getHours()<12?"AM":"PM"},transform:function(t){return t.toUpperCase()}}];this.init=function(){this.year=this.findSequence("yyyy"),this.month=this.findSequence("MMMM")||this.findSequence("MMM")||this.findSequence("MM")||this.findSequence("M"),this.day=this.findSequence("dd")||this.findSequence("d"),this.hours=this.findSequence("HH")||this.findSequence("H"),this.minutes=this.findSequence("mm")||this.findSequence("m"),this.seconds=this.findSequence("ss")||this.findSequence("s"),this.ampm=this.findSequence("tt"),this.hours12=this.findSequence("hh")||this.findSequence("h")},this.findSequence=function(t){function e(t){return parseInt(t)}return-1===i.indexOf(t)?null:{findValue:function(n){for(var a=i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),r=null,s=0;s0){var m=u[0],d=e(m);d?r.push(d):r.push(m),a+=m.length,n=i.length<=a}else n=!0}for(var h=0;h12||a<1)return null;var r=this.day.findValue(i),o=t.Date.fromYearMonthDay(n,a).daysInMonth();if(r<1||r>o)return null;var s=this.hours?this.hours.findValue(i):0,u=this.minutes?this.minutes.findValue(i):0,m=this.seconds?this.seconds.findValue(i):0,d=this.ampm?this.ampm.findValue(i):null;if(this.ampm&&this.hours12){var h=this.hours12.findValue(i);if(h<1||h>12)return null;s="PM"===d?12===h?12:h+12:12===h?0:h}if(s<0||s>23)return null;if(u<0||u>59)return null;if(m<0||m>59)return null;var c=new Date;return c.setUTCFullYear(n,a-1,r),c.setUTCHours(s),c.setUTCMinutes(u),c.setUTCSeconds(m),c.setUTCMilliseconds(0),new t.Date(c)},this.init()};t.DateUtil={},t.DateUtil.fromStringSortable=function(e,i){if(!e)throw"Can't create DayPilot.Date from an empty string";var n=e.length,a=10===n,r=19===n;if(!a&&!r&&!(n>19))throw"Invalid string format (use '2010-01-01' or '2010-01-01T00:00:00'): "+e;if(t.Date.Cache.Parsing[e]&&!i)return t.Date.Cache.Parsing[e];var o=e.substring(0,4),s=e.substring(5,7),u=e.substring(8,10),m=new Date(0);if(m.setUTCFullYear(o,s-1,u),a)return t.Date.Cache.Parsing[e]=m,m;var d=e.substring(11,13),h=e.substring(14,16),c=e.substring(17,19);if(m.setUTCHours(d),m.setUTCMinutes(h),m.setUTCSeconds(c),r)return t.Date.Cache.Parsing[e]=m,m;var l=0;if("."===e[19]){var f=parseInt(e.substring(20,23));m.setUTCMilliseconds(f),l=t.DateUtil.getTzOffsetMinutes(e.substring(23))}else l=t.DateUtil.getTzOffsetMinutes(e.substring(19));var v=new t.Date(m);return i||(v=v.addMinutes(-l)),m=v.toDate(),t.Date.Cache.Parsing[e]=m,m},t.DateUtil.getTzOffsetMinutes=function(t){if(e(t)||""===t)return 0;if("Z"===t)return 0;var i=t[0],n=60*parseInt(t.substring(1,3))+parseInt(t.substring(4));if("-"===i)return-n;if("+"===i)return n;throw"Invalid timezone spec: "+t},t.DateUtil.hasTzSpec=function(t){return!!t.indexOf("+")||!!t.indexOf("-")},t.DateUtil.daysDiff=function(e,i){if(e&&i||function(){throw"two parameters required"}(),e=new t.Date(e),i=new t.Date(i),e.getTime()>i.getTime())return null;for(var n=0,a=e.getDatePart(),r=i.getDatePart();ae.getTime()?t:e},t.DateUtil.min=function(t,e){return t.getTime()<",g.onclick=this.R),v.appendChild(g),this.tl=g;var b=document.createElement("div");b.style.position="absolute",b.style.left=this.cellWidth+"px",b.style.top="0px",b.style.width=5*this.cellWidth+"px",b.style.height=this.titleHeight+"px",b.style.lineHeight=this.titleHeight+"px",b.style.textAlign="center",b.setAttribute("unselectable","on"),this.D?b.className=this.P("_title"):b.className=this.P("title"),b.innerHTML=a.locale().monthNames[o.getMonth()]+" "+o.getYear(),v.appendChild(b),this.ti=b;var p=document.createElement("div");p.style.position="absolute",p.style.left=6*this.cellWidth+"px",p.style.top="0px",p.style.width=this.cellWidth+"px",p.style.height=this.titleHeight+"px",p.style.lineHeight=this.titleHeight+"px",p.setAttribute("unselectable","on"),this.D?p.className=this.P("_titleright"):p.className=this.P("titleright"),i.right&&(p.style.cursor="pointer",p.innerHTML=">",p.onclick=this.L),v.appendChild(p),this.tr=p;for(var _=0;_<7;_++){r.cells[_]=[];var I=document.createElement("div");I.style.position="absolute",I.style.left=_*this.cellWidth+"px",I.style.top=this.titleHeight+"px",I.style.width=this.cellWidth+"px",I.style.height=this.dayHeaderHeight+"px",I.style.lineHeight=this.dayHeaderHeight+"px",I.setAttribute("unselectable","on"),this.D?I.className=this.P("_dayheader"):I.className=this.P("dayheader"),I.innerHTML=""+this.G(_)+"",v.appendChild(I),r.days.push(I);for(var M=0;M<6;M++){var w=d.addDays(7*M+_),x=this.U(w)&&"none"!==this.X(),N=w.getMonth()===o.getMonth(),A=w.getTime()o.getTime(),S=document.createElement("div");r.cells[_][M]=S,S.day=w,S.x=_,S.y=M,S.isCurrentMonth=N,this.D?S.className=this.P(N?"_day":"_dayother"):S.className=this.P(N?"day":"dayother"),n.W(S,"cell"),w.getTime()===c.getTime()&&N&&this.W(S,"today"),0!==w.dayOfWeek()&&6!==w.dayOfWeek()||this.W(S,"weekend"),S.style.position="absolute",S.style.left=_*this.cellWidth+"px",S.style.top=M*this.cellHeight+y+"px",S.style.width=this.cellWidth+"px",S.style.height=this.cellHeight+"px",S.style.lineHeight=this.cellHeight+"px";var j=document.createElement("div");j.style.position="absolute",this.D?j.className=w.getTime()===c.getTime()&&N?this.P("_todaybox"):this.P("_daybox"):j.className=w.getTime()===c.getTime()&&N?this.P("todaybox"):this.P("daybox"),n.W(j,"cell_box"),j.style.left="0px",j.style.top="0px",j.style.right="0px",j.style.bottom="0px",S.appendChild(j);var k=null;if(this.cells&&this.cells[w.toStringSortable()]&&(k=this.cells[w.toStringSortable()]).css&&this.W(S,k.css),N||s&&A||u&&C){var H=document.createElement("div");H.innerHTML=w.getDay(),H.style.position="absolute",H.style.left="0px",H.style.top="0px",H.style.right="0px",H.style.bottom="0px",n.W(H,"cell_text"),S.style.cursor="pointer",S.isClickable=!0,k&&k.html&&(H.innerHTML=k.html),S.appendChild(H)}S.setAttribute("unselectable","on"),S.onclick=this.B,S.onmousedown=this.K,S.onmousemove=this.V,x&&(n.q(v,_,M),this.selected.push(S)),v.appendChild(S)}}var D=document.createElement("div");D.style.position="absolute",D.style.left="0px",D.style.top=y-2+"px",D.style.width=7*this.cellWidth+"px",D.style.height="1px",D.style.fontSize="1px",D.style.lineHeight="1px",this.D?D.className=this.P("_line"):D.className=this.P("line"),v.appendChild(D),this.months.push(r)},this.q=function(t,e,i){var a=t.month.cells[e][i];n.W(a,"select")},this.X=function(){return(this.selectMode||"").toLowerCase()},this.$=function(){switch(n.X()){case"day":this.selectionStart=this.selectionDay,this.selectionEnd=this.selectionStart;break;case"week":this.selectionStart=this.selectionDay.firstDayOfWeek(a.weekStarts()),this.selectionEnd=this.selectionStart.addDays(6);break;case"month":this.selectionStart=this.selectionDay.firstDayOfMonth(),this.selectionEnd=this.selectionDay.lastDayOfMonth();break;case"none":this.selectionStart=this.selectionDay,this.selectionEnd=this.selectionStart;break;default:throw"Unknown selectMode value."}},this.select=function(e,i){var n=!0,a=!0;"object"==typeof i?(i.dontFocus&&(n=!1),i.dontNotify&&(a=!1)):"boolean"==typeof i&&(n=!i);var r=this.selectionStart,o=this.selectionEnd;this.selectionStart=new t.Date(e).getDatePart(),this.selectionDay=this.selectionStart;if(n){var s=this.startDate;(this.selectionStart.getTime()this.visibleEnd().getTime())&&(s=this.selectionStart.firstDayOfMonth()),s.toStringSortable()!==this.startDate.toStringSortable()&&!0,this.startDate=s}this.$(),this.O(),this.T(),this.tt(),!a||r.equals(this.selectionStart)&&o.equals(this.selectionEnd)||this.et()},this.update=function(){this.it(),this.$(),this.O(),this.T(),this.tt()},this.G=function(t){var e=t+a.weekStarts();return e>6&&(e-=7),a.locale().dayNamesShort[e]},this.U=function(t){return null!==this.selectionStart&&null!==this.selectionEnd&&(this.selectionStart.getTime()<=t.getTime()&&t.getTime()<=this.selectionEnd.getTime())},this.K=function(t){},this.V=function(t){},this.B=function(t){var e=this.parentNode.month,i=this.x,a=this.y,r=e.cells[i][a].day;if(e.cells[i][a].isClickable){n.clearSelection(),n.selectionDay=r;r=n.selectionDay;switch(n.X()){case"none":n.selectionStart=r,n.selectionEnd=r;break;case"day":var o=e.cells[i][a];n.W(o,"select"),n.selected.push(o),n.selectionStart=o.day,n.selectionEnd=o.day;break;case"week":for(var s=0;s<7;s++)n.W(e.cells[s][a],"select"),n.selected.push(e.cells[s][a]);n.selectionStart=e.cells[0][a].day,n.selectionEnd=e.cells[6][a].day;break;case"month":var u=null,m=null;for(a=0;a<6;a++)for(i=0;i<7;i++){(o=e.cells[i][a])&&(o.day.getYear()===r.getYear()&&o.day.getMonth()===r.getMonth()&&(n.W(o,"select"),n.selected.push(o),null===u&&(u=o.day),m=o.day))}n.selectionStart=u,n.selectionEnd=m;break;default:throw"unknown selectMode"}n.et()}},this.et=function(){var e=n.selectionStart,i=n.selectionEnd.addDays(1),a=t.DateUtil.daysDiff(e,i),r=n.selectionDay;if(n.Z()){var o={};if(o.start=e,o.end=i,o.day=r,o.days=a,o.preventDefault=function(){this.preventDefault.value=!0},"function"==typeof n.onTimeRangeSelect&&(n.nt.apply((function(){n.onTimeRangeSelect(o)})),o.preventDefault.value))return;"function"==typeof n.onTimeRangeSelected&&n.nt.apply((function(){n.onTimeRangeSelected(o)}))}},this.L=function(t){n.rt(n.skipMonths)},this.R=function(t){n.rt(-n.skipMonths)},this.rt=function(t){this.startDate=this.startDate.addMonths(t),this.O(),this.T(),this.tt()},this.visibleStart=function(){return n.startDate.firstDayOfMonth().firstDayOfWeek(a.weekStarts())},this.visibleEnd=function(){return n.startDate.firstDayOfMonth().addMonths(this.showMonths-1).firstDayOfWeek(a.weekStarts()).addDays(42)},this.tt=function(){for(var t=0;t0&&n.x+n.w>t.clientWidth&&(n.w-=n.x+n.w-t.clientWidth),t.scrollTop&&n.y+n.h>t.clientHeight&&(n.h-=n.y+n.h-t.clientHeight)),n.x+=t.offsetLeft,n.y+=t.offsetTop;var a=a();return n.x+=a.x,n.y+=a.y,n}function i(t){try{return t.offsetParent}catch(t){return document.body}}void 0===t.DatePicker&&(t.DatePicker=function(i){this.v="${v}";var n="navigator_"+(new u).getTime(),a=this;this.onShow=null,this.onTimeRangeSelect=null,this.onTimeRangeSelected=null,this.prepare=function(){if(this.locale="en-us",this.target=null,this.targetAlignment="left",this.resetTarget=!0,this.pattern=this.ut.locale().datePattern,this.theme="navigator_default",this.patterns=[],this.zIndex=null,i)for(var t in i)this[t]=i[t];this.init()},this.init=function(){this.date=new t.Date(this.date);var e=this.ct();this.resetTarget&&!e?this.lt(this.date):this.resetTarget||(a.date=e);var i=this.ft();return i&&i.addEventListener("input",(function(){a.date=a.ct(),a.date&&a.navigator.select(a.date,{dontNotify:!0})})),document.addEventListener("mousedown",(function(){a.close()})),this},this.close=function(){this.vt&&(this.vt=!1,this.navigator&&this.navigator.dispose(),this.div.innerHTML="",this.div&&this.div.parentNode===document.body&&document.body.removeChild(this.div))},this.setDate=function(e){this.date=new t.Date(e),this.lt(this.date)},this.ct=function(){var e=this.ft();if(!e)return this.date;var i=null;if(!(i="INPUT"===e.tagName?e.value:e.innerText))return null;for(var n=t.Date.parse(i,a.pattern),r=0;r=t)},e.prototype.save=function(){var t=[];return this.bt.forEach((function(e){var i={};e.cells.forEach((function(t){i[t.id]=t.value})),t.push(i)})),t},e.prototype.load=function(t){if(!("[object Array]"===Object.prototype.toString.call(t)))throw new Error("Array expected");this.data=t,this.Nt(),this.Mt()},e.prototype.At=function(){this.disabled?this.nav.main.classList.add(this.theme+"_disabled"):this.nav.main.classList.remove(this.theme+"_disabled"),this.xt()?this.nav.plus.classList.add(this.theme+"_plus_max"):this.nav.plus.classList.remove(this.theme+"_plus_max")},e.prototype.Nt=function(){var t=this;this.bt=[],this.data.forEach((function(e){var i=t._t(e);t.bt.push(i)}))},e.prototype.Ct=function(t){var e=this.bt.indexOf(t);this.bt.splice(e,1)},e.prototype._t=function(t){var e=this,i={};return i.data=t,i.cells=[],e.item.columns.forEach((function(n){var a=n.id,r=t[a],o=e.St(n);if(void 0===r)if("text"===o)r="";else if("number"===o)r=0;else if("select"===o){var s=n.options;r=s&&s[0].id}var u={};u.id=a,u.value=r,u.type=o,u.data=n,i.cells.push(u)})),i},e.prototype.St=function(t){var e=t.type;return e||(e=t.options?"select":"text"),e},e.prototype.Mt=function(){var t=this;if(this.nav.body.innerHTML="",this.nav.after.innerHTML="",this.bt.forEach((function(e){var i=t.It(e);t.nav.body.appendChild(i)})),0===this.bt.length){var e=t.jt();t.nav.after.appendChild(e)}this.At()},e.prototype.jt=function(){var t=document.createElement("div");return t.className=this.theme+"_empty",t},e.prototype.It=function(t){var e=this,i=document.createElement("div");i.className=e.theme+"_row",t.cells.forEach((function(n){var a=document.createElement("div");a.className=e.theme+"_cell";var r=e.kt(n);if(t.spacer){var o=document.createElement("div");o.style.height="0px",o.style.overflow="hidden",o.appendChild(r),a.appendChild(o)}else a.appendChild(r);i.appendChild(a)}));var n=document.createElement("div");n.classList.add(e.theme+"_cell"),n.classList.add(e.theme+"_rowaction");var a=document.createElement("span");return a.className=this.theme+"_delete",a.addEventListener("click",(function(i){e.disabled||(e.Ct(t),e.Mt(),e.wt())})),t.spacer||n.appendChild(a),i.appendChild(n),i},e.prototype.wt=function(){if("function"==typeof this.onInput){this.onInput({})}},e.prototype.kt=function(t){var e=this,i=t.type;if("text"===i||"number"===i){var n=document.createElement("input");return n.type=i,e.disabled&&(n.disabled=!0),t.value&&(n.value=t.value),n.addEventListener("keyup",(function(n){t.value="number"===i?Number(this.value):this.value,e.wt()})),n}if("select"===i){var a=document.createElement("select");return e.disabled&&(a.disabled=!0),t.data.options.forEach((function(e){var i=document.createElement("option");i.innerText=e.name,i.value=e.id,i.Ht=e.id,a.appendChild(i),t.value===e.id&&i.setAttribute("selected",!0)})),a.addEventListener("change",(function(i){var n=a.options[a.selectedIndex];n&&void 0!==n.Ht&&(t.value=n.Ht),e.wt()})),a}throw new Error("Unsupported item type: "+i)},e.prototype.focus=function(){},t.Table=e}}(l);const{Table:f}=l,v={Date:u,DatePicker:c,Searchable:a,Table:f,Locale:o};!function(t){if(!t.Form){var e=function(t){for(var e in this.form=[],this.data={},this.theme="form_default",this.zIndex=99999,this.locale="en-us",this.plugins={},this.onKey=null,this.bt=[],this.Dt=null,this.canceling=!1,this.Tt=[],this.Pt=[],this.zt=null,t=t||{})this[e]=t[e]};e.prototype.create=function(){return this.load(),this.render(),this.zt},e.prototype.render=function(){var t=this;this.zt=document.createElement("div"),this.bt.forEach((function(e){t.createView(e)})),this.applyState()},e.prototype.createView=function(t){var e=this.theme,i=this,n=document.createElement("div");if(n.className=e+"_form_item "+e+"_form_item_level"+t.level,t.interactive||"title"!==t.type?n.className+=" "+e+"_form_item_"+t.type:n.className+=" "+e+"_form_title",t.data.cssClass&&(n.className+=" "+t.data.cssClass),!t.isValue){var a=document.createElement("div");a.className=e+"_form_item_label",a.innerText=t.text,n.appendChild(a)}var r=this.createInteractive(t);r.onInput=function(t){if(t=t||{},i.Zt(r,{debounce:!t.immediate}),"function"==typeof i.onChange){var e={};e.result=i.serialize(),i.onChange(e)}},r.onBlur=function(){i.canceling||i.Zt(r)},r.apply(t),r.zt=n,r.row=t,r.element&&n.appendChild(r.element),this.Pt.push(r),this.zt.appendChild(n)},e.prototype.validate=function(){var t=this,e=!0;return this.Pt.forEach((function(i){var n=t.Zt(i);e=e&&n})),e},e.prototype.Zt=function(t,e){var i=(e=e||{}).debounce,n=e.silent,a=t.row,r=!0,o="function"==typeof a.data.onValidate?a.data.onValidate:null,s="function"==typeof a.data.validate?a.data.validate:null,u=o||s;if(u){var m={valid:!0};m.value=t.save()[a.field],m.message="Error",m.values=this.serialize(),m.result=this.serialize(),u(m);var d=this.theme+"_form_item_invalid",h=this.theme+"_form_item_invalid_message";if(m.valid)clearTimeout(this.Tt[a.field]),t.Ot&&(t.Ot.remove(),t.Ot=null),t.zt.classList.remove(d);else{function c(){t.Ot&&(t.Ot.remove(),t.Ot=null),t.zt.classList.add(d);var e=document.createElement("div");e.classList.add(h),e.innerText=m.message,t.Ot=e,t.zt.appendChild(e)}if(!n)if(i){clearTimeout(this.Tt[a.field]),this.Tt[a.field]=setTimeout((function(){c()}),1e3)}else c()}r=m.valid}return r},e.prototype.load=function(){var t,e=this;this.form.forEach((function(t){e.processFormItem(t,0)}));try{var i=JSON.stringify(this.data);t=function t(e,i,n){for(var a in i=i||{},n=n||"",e){var r=e[a];"object"==typeof r?"[object Array]"===Object.prototype.toString.call(r)?i[n+a]=r:r&&r.toJSON?i[n+a]=r.toJSON():t(r,i,n+a+"."):i[n+a]=r}return i}(JSON.parse(i))}catch(t){throw new Error("The 'data' object is not serializable (it may contain circular dependencies): "+t)}for(var n in t)this.setValue(n,t[n])},e.prototype.setValue=function(t,e){this.bt.forEach((function(i){i.applyValue(t,e)}))},e.prototype.updateDependentState=function(){var t=this,e=[!0];(this.Dt?this.Dt:this.bt).forEach((function(i){var n=t.updateState(i,{enabled:e[i.level]&&!i.data.disabled});n.isValue&&(e[n.level+1]=n.enabled&&n.checked)}))},e.prototype.processFormItem=function(t,e){var n=this,a=this.getFieldType(t),r=[];if("radio"===a){if(t.name)(o=new i).field=t.id,o.data=t,o.level=e,o.type="label",o.interactive=!1,o.text=t.name,n.bt.push(o),r.push(o);t.options.forEach((function(o){var s=new i;s.field=t.id,s.data=o,s.level=e,s.type=a,s.isValue=!0,s.text=o.name,s.resolved=o.id,n.bt.push(s),r.push(s),o.children&&o.children.forEach((function(t){var i=n.processFormItem(t,e+1);r=r.concat(i)}))}))}else if("title"===a){(o=new i).field=t.id,o.data=t,o.level=e,o.type=a,o.interactive=!1,o.text=t.name,n.bt.push(o),r.push(o)}else if("image"===a){(o=new i).isValue=!0,o.field=t.id,o.data=t,o.level=e,o.type=a,o.interactive=!1,o.text=null,n.bt.push(o),r.push(o)}else if("html"===a){(o=new i).isValue=!0,o.field=t.id,o.data=t,o.level=e,o.type=a,o.interactive=!1,o.text=null,n.bt.push(o),r.push(o)}else if("scrollable"===a){(o=new i).isValue=!0,o.field=t.id,o.data=t,o.level=e,o.type=a,o.interactive=!1,o.text=null,n.bt.push(o),r.push(o)}else{var o;(o=new i).field=t.id,o.data=t,o.level=e,o.type=a,o.text=t.name,o.children=[],n.bt.push(o),r.push(o)}return"checkbox"===a&&(o.isValue=!0,o.resolved=!0,t.children&&t.children.forEach((function(t){var i=n.processFormItem(t,e+1);r=r.concat(i)}))),r},e.prototype.doOnKey=function(t){if("function"==typeof this.onKey){var e={key:t};this.onKey(e)}},e.prototype.createInteractive=function(e){var i=this,r={label:function(){return new n},title:function(){return new n},image:function(){var t=new n,i=document.createElement("img");return i.src=e.data.image,t.element=i,t},html:function(){var t=new n,i=document.createElement("div");return"string"==typeof e.data.text?i.innerText=e.data.text:"string"==typeof e.data.html&&(i.innerHTML=e.data.html),t.element=i,t},scrollable:function(){var t=new n,a=document.createElement("div");a.className=i.theme+"_form_item_scrollable_scroll",e.data.height&&(a.style.height=e.data.height+"px");var r=document.createElement("div");return r.className=i.theme+"_form_item_scrollable_scroll_content","string"==typeof e.data.text?r.innerText=e.data.text:"string"==typeof e.data.html&&(r.innerHTML=e.data.html),a.appendChild(r),t.element=a,t},text:function(){var t=new n;t.apply=function(e){t.row=e;var i=t.element;i.value=e.value,i.disabled=!e.enabled};var a=document.createElement("input");return a.name=e.field,a.type="text",a.autocomplete="off",a.onkeydown=function(t){var e=!1;switch(t.keyCode){case 13:i.doOnKey("Enter");break;case 27:i.doOnKey("Escape");break;default:e=!0}e||(t.preventDefault(),t.stopPropagation())},a.oninput=function(e){t.onInput()},a.onblur=function(e){t.onBlur()},t.element=a,t.canFocus=function(){return!t.element.disabled},t.focus=function(){t.element.focus(),t.element.setSelectionRange(0,t.element.value.length)},t.save=function(){var t={};return t[e.field]=a.value,t},t},textarea:function(){var t=new n;t.apply=function(e){t.row=e;var i=t.element;i.value=e.value,i.disabled=!e.enabled};var a=document.createElement("textarea");return a.name=e.field,e.data.height&&(a.style.height=e.data.height+"px"),a.onkeydown=function(t){var e=!1;switch(t.keyCode){case 13:(t.ctrlKey||t.metaKey)&&i.doOnKey("Enter"),e=!1;break;case 27:i.doOnKey("Escape");break;default:e=!0}e||t.stopPropagation()},a.oninput=function(e){t.onInput()},a.onblur=function(e){t.onBlur()},t.element=a,t.canFocus=function(){return!t.element.disabled},t.focus=function(){t.element.focus(),t.element.setSelectionRange(0,0)},t.save=function(){var t={};return t[e.field]=a.value,t},t},date:function(){var a=new n;a.apply=function(e){a.row=e;var n=a.element,r=a.picker;e.data.dateFormat&&(r.pattern=e.data.dateFormat);var o=e.data.locale||i.locale;o&&(r.locale=o),n.disabled=!e.enabled,r.date=new t.Date(e.value);var s=new t.Date(e.value).toString(e.data.dateFormat||r.pattern,r.locale);n.value=s};var r=document.createElement("input");r.name=e.field;var o=new t.DatePicker({target:r,theme:"navigator_modal",zIndex:i.zIndex+1,resetTarget:!1,targetAlignment:"left",onTimeRangeSelect:function(t){a.onInput({immediate:!0})}});return r.picker=o,r.className=i.theme+"_input_date",r.type="text",r.onkeydown=function(t){var e=!1;switch(t.keyCode){case 13:o.visible?o.close():i.doOnKey("Enter");break;case 27:o.visible?o.close():i.doOnKey("Escape");break;case 9:o.close(),e=!0;break;default:e=!0}e||(t.preventDefault(),t.stopPropagation())},r.onfocus=function(){o.show()},r.onclick=function(){o.show()},r.oninput=function(t){a.onInput()},r.onblur=function(t){a.onBlur()},a.element=r,a.picker=o,a.canFocus=function(){return!a.element.disabled},a.focus=function(){a.element.focus()},a.save=function(){var t=o.date?o.date.toString():null,i={};return i[e.field]=t,i},a},time:function(){return i.Wt(e)},datetime:function(){return i.Jt(e)},select:function(){var t=new n;t.apply=function(e){t.row=e;var i=t.element;i.value=e.value,i.disabled=!e.enabled};var i=document.createElement("select");i.name=e.field;var a=e.data.disableParents||!1;return e.data.options&&e.data.options.forEach&&e.data.options.forEach((function(t){!function t(e,n){for(var r="",o=0;o0){var t=this.list.pop();t&&t.hide()}},t.ModalStatic.remove=function(e){for(var i=t.ModalStatic.list,n=0;n0&&(i[i.length-1].result=e)},t.ModalStatic.displayed=function(e){for(var i=t.ModalStatic.list,n=0;n0){var t=this.list[this.list.length-1];t&&t.stretch()}},t.ModalStatic.last=function(){var e=t.ModalStatic.list;return e.length>0?e[e.length-1]:null};var e="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogICB3aWR0aD0iMTAiCiAgIGhlaWdodD0iMTUiCj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLDUpIj4KICAgIDxwYXRoCiAgICAgICBpZD0icGF0aDMxNzMiCiAgICAgICBzdHlsZT0iZmlsbDpub25lO3N0cm9rZTojOTk5OTk5O3N0cm9rZS13aWR0aDoxLjg1MTk2ODUzO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZSIKICAgICAgIGQ9Ik0gMC45NTQxNDgzOCwwLjY4MTYwMzEgNS4wMzkwNjI1LDUuNDExNTM4NiA5LjEyMzk3NjYsMC42ODE2MDMxIgogICAgICAgIC8+CiAgPC9nPgo8L3N2Zz4K",i=new function(){var t=document.createElement("style");t.setAttribute("type","text/css"),t.styleSheet||t.appendChild(document.createTextNode("")),(document.head||document.getElementsByTagName("head")[0]).appendChild(t);var e=!!t.styleSheet,i={rules:[],commit:function(){try{e&&(t.styleSheet.cssText=this.rules.join("\n"))}catch(t){}},add:function(i,n,a){if(e)this.rules.push(i+"{"+n+"}");else if(t.sheet.insertRule)void 0===a&&(a=t.sheet.cssRules.length),t.sheet.insertRule(i+"{"+n+"}",a);else{if(!t.sheet.addRule)throw"No CSS registration method found";t.sheet.addRule(i,n,a)}}};return i};i.add(".modal_default_main","border: 10px solid #ccc; max-width: 90%;"),i.add(".modal_default_main:focus","outline: none;"),i.add(".modal_default_content","padding: 10px 0px;"),i.add(".modal_default_inner","padding: 20px;"),i.add(".modal_default_input","padding: 10px 0px;"),i.add(".modal_default_buttons","margin-top: 10px;"),i.add(".modal_default_buttons","padding: 10px 0px;"),i.add(".modal_default_form_item","padding: 10px 0px; position: relative;"),i.add(".modal_default_form_item_level1","border-left: 2px solid #ccc; margin-left: 10px; padding-left: 20px;"),i.add(".modal_default_form_item.modal_default_form_title","font-size: 1.5rem; font-weight: bold;"),i.add(".modal_default_form_item input[type=text]","width: 100%; box-sizing: border-box;"),i.add(".modal_default_form_item textarea","width: 100%; height: 200px; box-sizing: border-box;"),i.add(".modal_default_form_item input[type=select]","width: 100%; box-sizing: border-box;"),i.add(".modal_default_form_item label","display: block;"),i.add(".modal_default_form_item select","width: 100%; box-sizing: border-box;"),i.add(".modal_default_form_item_label","margin: 2px 0px;"),i.add(".modal_default_form_item_image img","max-width: 100%; height: auto;"),i.add(".modal_default_form_item_invalid",""),i.add(".modal_default_form_item_invalid_message","position: absolute; right: 0px; top: 9px; background-color: red; color: #ffffff; padding: 2px; border-radius: 2px;"),i.add(".modal_default_background","opacity: 0.5; background-color: #000;"),i.add(".modal_default_ok","padding: 3px; width: 80px;"),i.add(".modal_default_cancel","padding: 3px; width: 80px;"),i.add(".modal_default_form_item_date","position: relative;"),i.add(".modal_default_form_item_date:after","content: ''; position: absolute; right: 7px; top: 50%; margin-top: 3px; width: 10px; height: 15px; background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogICB3aWR0aD0iMTAiCiAgIGhlaWdodD0iMTUiCj4KICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLDUpIj4KICAgIDxyZWN0CiAgICAgICBzdHlsZT0iZmlsbDojY2NjY2NjO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lO3N0cm9rZS13aWR0aDoxLjM4MDM3MzM2O3N0cm9rZS1saW5lY2FwOmJ1dHQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjQ7c3Ryb2tlLWRhc2hhcnJheTpub25lO3N0cm9rZS1vcGFjaXR5OjEiCiAgICAgICBpZD0icmVjdDE5MjgiCiAgICAgICB3aWR0aD0iOS45MTUzMDYxIgogICAgICAgaGVpZ2h0PSIxMS4zNjkzNyIKICAgICAgIHg9IjAuMTE3MTg3NSIKICAgICAgIHk9Ii0zLjAwOTk5NTciCiAgICAgICByeT0iMS4zMTE4NTA1IiAvPgogICAgPHJlY3QKICAgICAgIHN0eWxlPSJmaWxsOiNjY2NjY2M7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOm5vbmU7c3Ryb2tlLXdpZHRoOjEuNTk4MTQwMTI7c3Ryb2tlLWxpbmVjYXA6YnV0dDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6NDtzdHJva2UtZGFzaGFycmF5Om5vbmU7c3Ryb2tlLW9wYWNpdHk6MSIKICAgICAgIGlkPSJyZWN0MTkzMCIKICAgICAgIHdpZHRoPSIxLjUzNDQxMzYiCiAgICAgICBoZWlnaHQ9IjIuMjE5ODI1IgogICAgICAgeD0iMi4xNTU4NDgzIgogICAgICAgeT0iLTQuMzkzNzAwMSIKICAgICAgIHJ5PSIwLjY3MTc4OTE3IiAvPgogICAgPHJlY3QKICAgICAgIHJ5PSIwLjI5NjAxNDciCiAgICAgICB5PSItMS4xNjU4NDY2IgogICAgICAgeD0iMS41MjM5NTA2IgogICAgICAgaGVpZ2h0PSIxLjgyOTkwOTEiCiAgICAgICB3aWR0aD0iMS44MzQyMjUxIgogICAgICAgaWQ9InJlY3QxOTQ4IgogICAgICAgc3R5bGU9ImZpbGw6I2ZmZmZmZjtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZTtzdHJva2Utd2lkdGg6MS40MjE4OTE5MztzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIiAvPgogICAgPHJlY3QKICAgICAgIHJ5PSIwLjY3MTc4OTE3IgogICAgICAgeT0iLTQuMzkzNzAwMSIKICAgICAgIHg9IjYuNDUyNzIzNSIKICAgICAgIGhlaWdodD0iMi4yMTk4MjUiCiAgICAgICB3aWR0aD0iMS41MzQ0MTM2IgogICAgICAgaWQ9InJlY3QyMDAzIgogICAgICAgc3R5bGU9ImZpbGw6I2NjY2NjYztmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZTtzdHJva2Utd2lkdGg6MS41OTgxNDAxMjtzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIiAvPgogICAgPHJlY3QKICAgICAgIHN0eWxlPSJmaWxsOiNmZmZmZmY7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOm5vbmU7c3Ryb2tlLXdpZHRoOjEuNDIxODkxOTM7c3Ryb2tlLWxpbmVjYXA6YnV0dDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6NDtzdHJva2UtZGFzaGFycmF5Om5vbmU7c3Ryb2tlLW9wYWNpdHk6MSIKICAgICAgIGlkPSJyZWN0MjAwNSIKICAgICAgIHdpZHRoPSIxLjgzNDIyNTEiCiAgICAgICBoZWlnaHQ9IjEuODI5OTA5MSIKICAgICAgIHg9IjQuMjE5MjYzMSIKICAgICAgIHk9Ii0xLjE2NTg0NjYiCiAgICAgICByeT0iMC4yOTYwMTQ3IiAvPgogICAgPHJlY3QKICAgICAgIHJ5PSIwLjI5NjAxNDciCiAgICAgICB5PSItMS4xNjU4NDY2IgogICAgICAgeD0iNi45OTI3MDA2IgogICAgICAgaGVpZ2h0PSIxLjgyOTkwOTEiCiAgICAgICB3aWR0aD0iMS44MzQyMjUxIgogICAgICAgaWQ9InJlY3QyMDA3IgogICAgICAgc3R5bGU9ImZpbGw6I2ZmZmZmZjtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZTtzdHJva2Utd2lkdGg6MS40MjE4OTE5MztzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIiAvPgogICAgPHJlY3QKICAgICAgIHN0eWxlPSJmaWxsOiNmZmZmZmY7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOm5vbmU7c3Ryb2tlLXdpZHRoOjEuNDIxODkxOTM7c3Ryb2tlLWxpbmVjYXA6YnV0dDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6NDtzdHJva2UtZGFzaGFycmF5Om5vbmU7c3Ryb2tlLW9wYWNpdHk6MSIKICAgICAgIGlkPSJyZWN0MjAxMyIKICAgICAgIHdpZHRoPSIxLjgzNDIyNTEiCiAgICAgICBoZWlnaHQ9IjEuODI5OTA5MSIKICAgICAgIHg9IjEuNTIzOTUwNiIKICAgICAgIHk9IjEuODAyOTAzNCIKICAgICAgIHJ5PSIwLjI5NjAxNDciIC8+CiAgICA8cmVjdAogICAgICAgcnk9IjAuMjk2MDE0NyIKICAgICAgIHk9IjEuODAyOTAzNCIKICAgICAgIHg9IjQuMjE5MjYzMSIKICAgICAgIGhlaWdodD0iMS44Mjk5MDkxIgogICAgICAgd2lkdGg9IjEuODM0MjI1MSIKICAgICAgIGlkPSJyZWN0MjAxNSIKICAgICAgIHN0eWxlPSJmaWxsOiNmZmZmZmY7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOm5vbmU7c3Ryb2tlLXdpZHRoOjEuNDIxODkxOTM7c3Ryb2tlLWxpbmVjYXA6YnV0dDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6NDtzdHJva2UtZGFzaGFycmF5Om5vbmU7c3Ryb2tlLW9wYWNpdHk6MSIgLz4KICAgIDxyZWN0CiAgICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lO3N0cm9rZS13aWR0aDoxLjQyMTg5MTkzO3N0cm9rZS1saW5lY2FwOmJ1dHQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjQ7c3Ryb2tlLWRhc2hhcnJheTpub25lO3N0cm9rZS1vcGFjaXR5OjEiCiAgICAgICBpZD0icmVjdDIwMTciCiAgICAgICB3aWR0aD0iMS44MzQyMjUxIgogICAgICAgaGVpZ2h0PSIxLjgyOTkwOTEiCiAgICAgICB4PSI2Ljk5MjcwMDYiCiAgICAgICB5PSIxLjgwMjkwMzQiCiAgICAgICByeT0iMC4yOTYwMTQ3IiAvPgogICAgPHJlY3QKICAgICAgIHJ5PSIwLjI5NjAxNDciCiAgICAgICB5PSI0LjczMjU5MDciCiAgICAgICB4PSIxLjU2MzAxMzEiCiAgICAgICBoZWlnaHQ9IjEuODI5OTA5MSIKICAgICAgIHdpZHRoPSIxLjgzNDIyNTEiCiAgICAgICBpZD0icmVjdDIwMTkiCiAgICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lO3N0cm9rZS13aWR0aDoxLjQyMTg5MTkzO3N0cm9rZS1saW5lY2FwOmJ1dHQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjQ7c3Ryb2tlLWRhc2hhcnJheTpub25lO3N0cm9rZS1vcGFjaXR5OjEiIC8+CiAgICA8cmVjdAogICAgICAgc3R5bGU9ImZpbGw6I2ZmZmZmZjtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZTtzdHJva2Utd2lkdGg6MS40MjE4OTE5MztzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIgogICAgICAgaWQ9InJlY3QyMDIxIgogICAgICAgd2lkdGg9IjEuODM0MjI1MSIKICAgICAgIGhlaWdodD0iMS44Mjk5MDkxIgogICAgICAgeD0iNC4yNTgzMjU2IgogICAgICAgeT0iNC43MzI1OTA3IgogICAgICAgcnk9IjAuMjk2MDE0NyIgLz4KICAgIDxyZWN0CiAgICAgICByeT0iMC4yOTYwMTQ3IgogICAgICAgeT0iNC43MzI1OTA3IgogICAgICAgeD0iNy4wMzE3NjMxIgogICAgICAgaGVpZ2h0PSIxLjgyOTkwOTEiCiAgICAgICB3aWR0aD0iMS44MzQyMjUxIgogICAgICAgaWQ9InJlY3QyMDIzIgogICAgICAgc3R5bGU9ImZpbGw6I2ZmZmZmZjtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZTtzdHJva2Utd2lkdGg6MS40MjE4OTE5MztzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIiAvPgogIDwvZz4KPC9zdmc+Cg==)"),-1!==navigator.userAgent.indexOf("Edge")&&i.add(".modal_default_form_item_date input::-ms-clear","display: none;"),i.add(".modal_default_form_item_scrollable_scroll","width: 100%; height: 200px; box-sizing: border-box; border: 1px solid #ccc; overflow-y: auto;"),i.add(".modal_default_form_item_scrollable_scroll_content","padding: 5px;"),i.add(".modal_default_form_item_searchable","position: relative;"),i.add(".modal_default_form_item_searchable_icon",""),i.add(".modal_default_form_item_searchable_icon:after","content:''; position: absolute; right: 5px; top: 50%; margin-top: -8px; width: 10px; height: 15px; background-image:url("+e+");"),i.add(".modal_default_form_item_searchable_list","box-sizing: border-box; border: 1px solid #999; max-height: 150px; overflow-y: auto;"),i.add(".modal_default_form_item_searchable_list_item","background: white; padding: 2px; cursor: default;"),i.add(".modal_default_form_item_searchable_list_item_highlight","background: #ccc;"),i.add(".modal_default_form_item_time","position: relative;"),i.add(".modal_default_form_item_time_icon",""),i.add(".modal_default_form_item_time_icon:after","content:''; position: absolute; right: 5px; top: 50%; margin-top: -8px; width: 10px; height: 15px; background-image:url("+e+");"),i.add(".modal_default_form_item_time_list","box-sizing: border-box; border: 1px solid #999; max-height: 150px; overflow-y: auto;"),i.add(".modal_default_form_item_time_list_item","background: white; padding: 2px; cursor: default;"),i.add(".modal_default_form_item_time_list_item_highlight","background: #ccc;"),i.add(".modal_default_form_item_datetime_parent","display: flex;"),i.add(".modal_default_form_item_datetime .modal_default_form_item_time_main","margin-left: 5px;"),i.add(".modal_default_form_item_datetime input[type='text'].modal_default_input_date ",""),i.add(".modal_default_form_item_tabular_main","margin-top: 10px;"),i.add(".modal_default_form_item_tabular_table","display: table; width: 100%; xbackground-color: #fff; border-collapse: collapse;"),i.add(".modal_default_form_item_tabular_tbody","display: table-row-group;"),i.add(".modal_default_form_item_tabular_row","display: table-row;"),i.add(".modal_default_form_item_tabular_row.modal_default_form_item_tabular_header",""),i.add(".modal_default_form_item_tabular_cell.modal_default_form_item_tabular_rowaction","padding: 0px; width: 23px;"),i.add(".modal_default_form_item_tabular_cell","display: table-cell; border: 0px; padding: 2px 2px 2px 0px; cursor: default; vertical-align: bottom;"),i.add(".modal_default_form_item_tabular_header .modal_default_form_item_tabular_cell","padding-left: 0px; padding-bottom: 0px;"),i.add(".modal_default_form_item_tabular_table input[type=text], .modal_default_form_item_tabular_table input[type=number]","width:100%; box-sizing: border-box;"),i.add(".modal_default_form_item_tabular_table select","width:100%; height:100%; box-sizing: border-box;"),i.add(".modal_default_form_item_tabular_plus","display: inline-block; background-color: #ccc; color: white; width: 20px; height: 20px; border-radius: 10px; box-sizing: border-box; position: relative; margin-left: 3px; margin-top: 3px; cursor: pointer;"),i.add(".modal_default_form_item_tabular_plus:after","content: ''; position: absolute; left: 5px; top: 5px; width: 10px; height: 10px; background-image: url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0nMTAnIGhlaWdodD0nMTAnIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Zyc+PHBhdGggZD0nTSA1LjAgMC41IEwgNS4wIDkuNSBNIDAuNSA1LjAgTCA5LjUgNS4wJyBzdHlsZT0nZmlsbDpub25lO3N0cm9rZTojZmZmZmZmO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbGluZWNhcDpidXR0JyAvPjwvc3ZnPg==\")"),i.add(".modal_default_form_item_tabular_delete","display: inline-block; background-color: #ccc; color: white; width: 20px; height: 20px; border-radius: 10px; box-sizing: border-box; position: relative; margin-left: 3px; margin-top: 3px; cursor: pointer;"),i.add(".modal_default_form_item_tabular_delete:after","content: ''; position: absolute; left: 5px; top: 5px; width: 10px; height: 10px; background-image: url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0nMTAnIGhlaWdodD0nMTAnIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Zyc+PHBhdGggZD0nTSAwLjUgMC41IEwgOS41IDkuNSBNIDAuNSA5LjUgTCA5LjUgMC41JyBzdHlsZT0nZmlsbDpub25lO3N0cm9rZTojZmZmZmZmO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbGluZWNhcDpidXR0JyAvPjwvc3ZnPg==\")"),i.add(".modal_default_form_item_tabular_disabled .modal_default_form_item_tabular_plus","display: none;"),i.add(".modal_default_form_item_tabular_plus_max.modal_default_form_item_tabular_plus","display: none;"),i.add(".modal_default_form_item_tabular_disabled .modal_default_form_item_tabular_delete","visibility: hidden;"),i.add(".modal_default_form_item_tabular_empty","height: 1px; margin: 5px 23px 5px 0px; background-color: #ccc;"),i.add(".modal_default_form_item_tabular_spacer .modal_default_form_item_tabular_cell","padding: 0px;"),i.add(".modal_min_main","border: 1px solid #ccc; max-width: 90%;"),i.add(".modal_min_background","opacity: 0.5; background-color: #000;"),i.add(".modal_min_ok","padding: 3px 10px;"),i.add(".modal_min_cancel","padding: 3px 10px;"),i.add(".navigator_modal_main","border-left: 1px solid #c0c0c0;border-right: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;background-color: white;color: #000000; box-sizing: content-box;"),i.add(".navigator_modal_main *, .navigator_modal_main *:before, .navigator_modal_main *:after","box-sizing: content-box;"),i.add(".navigator_modal_month","font-size: 11px;"),i.add(".navigator_modal_day","color: black;"),i.add(".navigator_modal_weekend","background-color: #f0f0f0;"),i.add(".navigator_modal_dayheader","color: black;"),i.add(".navigator_modal_line","border-bottom: 1px solid #c0c0c0;"),i.add(".navigator_modal_dayother","color: gray;"),i.add(".navigator_modal_todaybox","border: 1px solid red;"),i.add(".navigator_modal_title, .navigator_modal_titleleft, .navigator_modal_titleright","border-top: 1px solid #c0c0c0;border-bottom: 1px solid #c0c0c0;color: #333;background: #f3f3f3;"),i.add(".navigator_modal_busy","font-weight: bold;"),i.add(".navigator_modal_cell","text-align: center;"),i.add(".navigator_modal_select .navigator_modal_cell_box","background-color: #FFE794; opacity: 0.5;"),i.add(".navigator_modal_title","text-align: center;"),i.add(".navigator_modal_titleleft, .navigator_modal_titleright","text-align: center;"),i.add(".navigator_modal_dayheader","text-align: center;"),i.add(".navigator_modal_weeknumber","text-align: center;"),i.add(".navigator_modal_cell_text","cursor: pointer;"),i.commit(),t.Modal=function(e){this.autoFocus=!0,this.focus=null,this.autoStretch=!0,this.autoStretchFirstLoadOnly=!1,this.className=null,this.theme="modal_default",this.disposeOnClose=!0,this.dragDrop=!0,this.loadingHtml=null,this.maxHeight=null,this.scrollWithPage=!0,this.useIframe=!0,this.zIndex=99999,this.left=null,this.width=600,this.top=20,this.height=200,this.locale=null,this.closed=null,this.onClose=null,this.onClosed=null,this.onShow=null;var i=this;this.id="_"+(new Date).getTime()+"n"+10*Math.random(),this.Ft=!1,this.Yt=null,this.Rt=null,this.showHtml=function(e){if(t.ModalStatic.displayed(this))throw"This modal dialog is already displayed.";if(this.div||this.Lt(),this.Et(),this.useIframe){window.setTimeout((i=this,n=e,function(){i.setInnerHTML(i.id+"iframe",n)}),0)}else e.nodeType?this.div.appendChild(e):this.div.innerHTML=e;var i,n;this.Et(),this.Gt(),this.Ut()},this.showUrl=function(e){if(t.ModalStatic.displayed(this))throw"This modal dialog is already displayed.";if(this.useIframe){this.div||this.Lt();var n=this.loadingHtml;n&&(this.iframe.src="about:blank",this.setInnerHTML(this.id+"iframe",n)),this.re(this.iframe,"load",this.Xt),this.iframe.src=e,this.Et(),this.Gt(),this.Ut()}else i.Qt({url:e,success:function(t){var e=t.request.responseText;i.showHtml(e)},error:function(t){i.showHtml("Error loading the modal dialog")}})},this.Ut=function(){if("function"==typeof i.onShow){var t={};t.root=i.Bt(),t.modal=i,i.onShow(t)}},this.Bt=function(){return i.iframe?i.iframe.contentWindow.document:i.div},this.Qt=function(t){var e=new XMLHttpRequest;if(e){var i=t.method||"GET",n=t.success||function(){},a=t.error||function(){},r=t.data,o=t.url;e.open(i,o,!0),e.setRequestHeader("Content-type","text/plain"),e.onreadystatechange=function(){var t;4===e.readyState&&(200===e.status||304===e.status?((t={}).request=e,n(t)):a?((t={}).request=e,a(t)):window.console&&console.log("HTTP error "+e.status))},4!==e.readyState&&("object"==typeof r&&(r=JSON.stringify(r)),e.send(r))}},this.Et=function(){delete this.result;var e=window,n=document,a=e.pageYOffset?e.pageYOffset:n.documentElement&&n.documentElement.scrollTop?n.documentElement.scrollTop:n.body.scrollTop;this.theme&&(this.hideDiv.className=this.theme+"_background"),this.zIndex&&(this.hideDiv.style.zIndex=this.zIndex),this.hideDiv.style.display="",window.setTimeout((function(){i.hideDiv&&(i.hideDiv.onclick=function(){i.hide({backgroundClick:!0})})}),500),this.theme?this.div.className=this.theme+"_main":this.div.className="",this.className&&(this.div.className+=" "+this.className),this.left?this.div.style.left=this.left+"px":this.div.style.marginLeft="-"+Math.floor(this.width/2)+"px",this.div.style.position="absolute",this.div.style.boxSizing="content-box",this.div.style.top=a+this.top+"px",this.div.style.width=this.width+"px",this.zIndex&&(this.div.style.zIndex=this.zIndex),this.height&&(this.useIframe||!this.autoStretch?this.div.style.height=this.height+"px":this.div.style.height=""),this.useIframe&&this.height&&(this.iframe.style.height=this.height+"px"),this.div.style.display="",this.Kt(),t.ModalStatic.remove(this),t.ModalStatic.list.push(this)},this.Xt=function(){i.iframe.contentWindow.modal=i,i.autoStretch&&i.stretch()},this.stretch=function(){if(this.useIframe){for(var t=i.Vt().x-40,e=this.width;ee.clientWidth},this.$t=function(){for(var t=this.iframe.contentWindow.document,e="BackCompat"===t.compatMode?t.body:t.documentElement,i=e.scrollHeight,n=t.body.children,a=0;ae.clientHeight},this.Vt=function(){var t=document;return"CSS1Compat"===t.compatMode&&t.documentElement&&t.documentElement.clientWidth?{x:t.documentElement.clientWidth,y:t.documentElement.clientHeight}:{x:t.body.clientWidth,y:t.body.clientHeight}},this.Gt=function(){this.Ft||(this.re(window,"resize",this.te),this.re(window,"scroll",this.ee),this.dragDrop&&(this.re(document,"mousemove",this.ie),this.re(document,"mouseup",this.ne)),this.Ft=!0)},this.ae=function(){this.ue(window,"resize",this.te),this.ue(window,"scroll",this.ee),this.dragDrop&&(this.ue(document,"mousemove",this.ie),this.ue(document,"mouseup",this.ne)),this.Ft=!1},this.oe=function(t){t.target===i.div&&(t.preventDefault(),i.div.style.cursor="move",i.se(),i.Rt=i.mc(t||window.event),i.Yt={x:i.div.offsetLeft,y:i.div.offsetTop})},this.ie=function(t){if(i.Rt){t=t||window.event;var e=i.mc(t),n=e.x-i.Rt.x,a=e.y-i.Rt.y;i.div.style.marginLeft="0px",i.div.style.top=i.Yt.y+a+"px",i.div.style.left=i.Yt.x+n+"px"}},this.ne=function(t){i.Rt&&(i.me(),i.div.style.cursor=null,i.Rt=null)},this.se=function(){if(this.useIframe){var t=document.createElement("div");t.style.backgroundColor="#ffffff",t.style.filter="alpha(opacity=80)",t.style.opacity="0.80",t.style.width="100%",t.style.height=this.height+"px",t.style.position="absolute",t.style.left="0px",t.style.top="0px",this.div.appendChild(t),this.mask=t}},this.me=function(){this.useIframe&&(this.div.removeChild(this.mask),this.mask=null)},this.te=function(){i.de(),i.Kt()},this.ee=function(){i.de()},this.Kt=function(){if(!i.left&&i.div){var t=i.div.offsetWidth;i.div.style.marginLeft="-"+Math.floor(t/2)+"px"}},this.de=function(){if(i.hideDiv&&i.div&&"none"!==i.hideDiv.style.display&&"none"!==i.div.style.display){var t=i.he.scrollY();i.scrollWithPage||(i.div.style.top=t+i.top+"px")}},this.he={},this.he.container=function(){return i.container||document.body},this.he.scrollY=function(){var t=i.he.container();return t===document.body?window.pageYOffset?window.pageYOffset:document.documentElement&&document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop:t.scrollTop},this.re=function(t,e,i){t.addEventListener?t.addEventListener(e,i,!1):t.attachEvent&&t.attachEvent("on"+e,i)},this.ue=function(t,e,i){t.removeEventListener?t.removeEventListener(e,i,!1):t.detachEvent&&t.detachEvent("on"+e,i)},this.mc=function(t){return t.pageX||t.pageY?{x:t.pageX,y:t.pageY}:{x:t.clientX+document.documentElement.scrollLeft,y:t.clientY+document.documentElement.scrollTop}},this.abs=function(t){for(var e={x:t.offsetLeft,y:t.offsetTop};t.offsetParent;)t=t.offsetParent,e.x+=t.offsetLeft,e.y+=t.offsetTop;return e},this.Lt=function(){var t=i.he.container(),e=t===document.body?"fixed":"absolute",n=document.createElement("div");n.id=this.id+"hide",n.style.position=e,n.style.left="0px",n.style.top="0px",n.style.right="0px",n.style.bottom="0px",n.oncontextmenu=function(){return!1},n.onmousedown=function(){return!1},t.appendChild(n);var a=document.createElement("div");a.id=this.id+"popup",a.style.position=e,a.style.left="50%",a.style.top="0px",a.style.width="50px",a.style.height="50px",this.dragDrop&&(a.onmousedown=this.oe),a.addEventListener("keydown",(function(t){t.stopPropagation()}));var r=null;this.useIframe&&((r=document.createElement("iframe")).id=this.id+"iframe",r.name=this.id+"iframe",r.frameBorder="0",r.style.width="100%",r.style.height="50px",a.appendChild(r)),t.appendChild(a),this.div=a,this.iframe=r,this.hideDiv=n},this.setInnerHTML=function(t,e){var n=window.frames[t],a=n.contentWindow||n.document||n.contentDocument;a.document&&(a=a.document),null==a.body&&a.write(""),e.nodeType?a.body.appendChild(e):a.body.innerHTML=e,i.autoStretch&&(i.autoStretchFirstLoadOnly&&i.ce||(i.stretch(),i.ce=!0))},this.close=function(t){this.result=t,this.hide()},this.closeSerialized=function(){for(var t=i.Bt().querySelectorAll("input, textarea, select"),e={},n=0;n0?t.ModalStatic.list[t.ModalStatic.list.length-1]:parent&&parent.DayPilot&&parent.DayPilot.ModalStatic&&parent.DayPilot.ModalStatic.list[parent.DayPilot.ModalStatic.list.length-1]},t.Modal.Experimental={},t.Modal.Experimental.Form=y,void 0===t.getPromise&&(t.getPromise=function(e){return"undefined"!=typeof Promise?new Promise(e):(t.Promise=function(e){var i=this;this.then=function(i,n){return e(i=i||function(){},n=n||function(){}),t.getPromise(e)},this.catch=function(n){return i.then(null,n),t.getPromise(e)}},new t.Promise(e))})}function a(t,e,i){var n=e.indexOf(".");if(-1!==n){var r=e.substring(0,n);if("__proto__"!==r&&"constructor"!==r){var o=e.substring(n+1),s=t[r];"object"==typeof s&&null!==s||(t[r]={},s=t[r]),a(s,o,i)}}else"__proto__"!==e&&"constructor"!==e&&(t[e]=i)}}(g);const{Modal:b}=g; +/* @license +Copyright (c) 2010 - 2019 Annpoint, s.r.o. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +------------------------------------------------------------------------- + +NOTE: Requires the following acknowledgement (see also NOTICE): + +This product includes DayPilot Modal (https://modal.daypilot.org). + +*/}]); \ No newline at end of file