XCloner – Backup and Restore - Version 4.4.1

Version Description

  • minor code review
Download this release

Release Info

Developer watchful
Plugin Icon 128x128 XCloner – Backup and Restore
Version 4.4.1
Comparing to
See all releases

Code changes from version 4.4.0 to 4.4.1

README.txt CHANGED
@@ -5,7 +5,7 @@ Tags: backup, database backup, cloud backup, WordPress backup, WordPress migrati
5
  Requires at least: 5.1
6
  Requires PHP: 7.3
7
  Tested up to: 6.0
8
- Stable tag: 4.4.0
9
 
10
 
11
  XCloner is a backup plugin that allows you to safely back up and restore your WordPress sites. You can send site backups to SFTP, Dropbox, Amazon, Google Drive, Backblaze and other locations.
@@ -117,6 +117,9 @@ Of course, schedules can be adjusted accordingly to how often you update your si
117
 
118
  == Changelog ==
119
 
 
 
 
120
  = 4.4.0 =
121
  * remove remote restore feature to be compliant with WordPress guidelines
122
 
5
  Requires at least: 5.1
6
  Requires PHP: 7.3
7
  Tested up to: 6.0
8
+ Stable tag: 4.4.1
9
 
10
 
11
  XCloner is a backup plugin that allows you to safely back up and restore your WordPress sites. You can send site backups to SFTP, Dropbox, Amazon, Google Drive, Backblaze and other locations.
117
 
118
  == Changelog ==
119
 
120
+ = 4.4.1 =
121
+ * minor code review
122
+
123
  = 4.4.0 =
124
  * remove remote restore feature to be compliant with WordPress guidelines
125
 
admin/class-xcloner-admin.php CHANGED
@@ -122,7 +122,7 @@ class Xcloner_Admin
122
  wp_enqueue_script($this->plugin_name . "_jquery.datatables.respnsive", plugin_dir_url(__FILE__) . 'js/dataTables.responsive.js', array('jquery'));
123
  wp_enqueue_script($this->plugin_name . "_vakata", dirname(plugin_dir_url(__FILE__)) . '/vendor/vakata/jstree/dist/jstree.min.js', array('jquery'));
124
 
125
- wp_enqueue_script($this->plugin_name, dirname(plugin_dir_url(__FILE__)) . '/dist/admin/js/index.min.js', array('jquery'));
126
  }
127
 
128
  public function xcloner_init_page()
122
  wp_enqueue_script($this->plugin_name . "_jquery.datatables.respnsive", plugin_dir_url(__FILE__) . 'js/dataTables.responsive.js', array('jquery'));
123
  wp_enqueue_script($this->plugin_name . "_vakata", dirname(plugin_dir_url(__FILE__)) . '/vendor/vakata/jstree/dist/jstree.min.js', array('jquery'));
124
 
125
+ wp_enqueue_script($this->plugin_name, dirname(plugin_dir_url(__FILE__)) . '/admin/js/index.min.js', array('jquery'));
126
  }
127
 
128
  public function xcloner_init_page()
admin/js/index.js DELETED
@@ -1,10 +0,0 @@
1
- //Third-party Modules
2
- require('./materialize.min.js');
3
-
4
- //XCloner Modules
5
- require('./xcloner-admin');
6
- require('./xcloner-backup-class');
7
- require('./xcloner-manage-backups-class');
8
- require('./xcloner-remote-storage-class');
9
- require('./xcloner-restore-class');
10
- require('./xcloner-scheduler-class');
 
 
 
 
 
 
 
 
 
 
{dist/admin → admin}/js/index.min.js RENAMED
@@ -1,3 +1,8 @@
1
- /*! For license information please see index.min.js.LICENSE.txt */
 
 
 
 
 
2
  !function(e){var t={};function i(n){if(t[n])return t[n].exports;var s=t[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)i.d(n,s,function(t){return e[t]}.bind(null,s));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=4)}([function(e,t,i){"use strict";i.r(t),i.d(t,"error_modal",(function(){return o})),i.d(t,"next_tab",(function(){return r})),i.d(t,"doShortText",(function(){return l})),i.d(t,"show_ajax_error",(function(){return u})),i.d(t,"ID",(function(){return d})),i.d(t,"getUrlParam",(function(){return c}));var n=i(2),s=i(3),a=i(1);let o;document.addEventListener("DOMContentLoaded",(function(){var e=document.querySelector("#error_modal");o=M.Modal.init(e)})),jQuery,jQuery(document).ready((function(){jQuery(".tooltipped").tooltip(),jQuery(".collapsible").collapsible(),jQuery("span.shorten_string").click((function(){jQuery(this).toggleClass("full"),l(jQuery(this))})),jQuery("span.shorten_string").each((function(){l(jQuery(this))})),jQuery("#xcloner_regex_exclude").on("focus",(function(){jQuery("ul.xcloner_regex_exclude_limit li").fadeIn()})),jQuery(".regex_pattern").on("click",(function(){jQuery(this).select()})),jQuery(".btn.system_info_toggle").on("click",(function(){jQuery(".additional_system_info").toggle()})),jQuery("a.download-logger").on("click",(function(e){var t=new a.Xcloner_Manage_Backups,i=jQuery(this).attr("href").substr(1);i&&t.download_backup_by_name(i),e.preventDefault()})),jQuery(".nav-tab-wrapper.content li").on("click",(function(e){jQuery(".nav-tab-wrapper li a").removeClass("nav-tab-active"),jQuery(this).find("a").addClass("nav-tab-active"),jQuery(".nav-tab-wrapper-content .tab-content").removeClass("active"),jQuery(".nav-tab-wrapper-content "+jQuery(this).find("a").attr("href")).addClass("active"),e.preventDefault(),location.hash=jQuery(this).find("a").attr("href")+"_hash"}));var e=window.location.hash;e&&r(e.replace("_hash",""))}));const r=function(e){jQuery(".nav-tab-wrapper").find("li a[href='"+e+"']").trigger("click"),location.hash=e},l=function(e){if(e.hasClass("full"))e.text(e.attr("data-text"));else{var t=e.text(),i=t.length,n=t.substr(0,10),s=t.substr(i-20,i);e.attr("data-text",t).text(n+"..."+s)}},u=function(e,t,i){"undefined"!=typeof xcloner_backup&&xcloner_backup.cancel_backup(),i&&void 0!==i.responseText&&(t=t+": "+i.responseText),jQuery("#error_modal .title").text(e),jQuery("#error_modal .msg").text(t),i&&i.status&&jQuery("#error_modal .status").text(i.status+" "+i.statusText),jQuery("#error_modal .body").text(JSON.stringify(i)),o.open()},d=function(){return"_"+Math.random().toString(36).substr(2,9)},c=function(e){return(location.search.split(e+"=")[1]||"").split("&")[0]};jQuery(document).ready((function(){window.remote_storage=new n.Xcloner_Remote_Storage,window.xcloner_backup=new s.Xcloner_Backup,window.xcloner_manage_backups=new a.Xcloner_Manage_Backups,window.ID=d,window.getUrlParam=c,window.show_ajax_error=u,window.doShortText=l,window.dataTable=null,window.next_tab=r}))},function(e,t,i){"use strict";i.r(t),i.d(t,"Xcloner_Manage_Backups",(function(){return l}));var n,s,a,o,r;i(0);document.addEventListener("DOMContentLoaded",(function(){var e=document.querySelector("#backup_cotent_modal");n=M.Modal.init(e);e=document.querySelector("#backup_encryption_modal");s=M.Modal.init(e);e=document.querySelector("#backup_decryption_modal");a=M.Modal.init(e);e=document.querySelector("#remote_storage_modal");o=M.Modal.init(e);e=document.querySelector("#local_storage_upload_modal");r=M.Modal.init(e)}));class l{constructor(){this.file_counter=0,this.storage_selection="",this.dataTable=""}download_backup_by_name(e){return window.open(XCLONER_AJAXURL+"&action=download_backup_by_name&name="+e+"&storage_selection="+this.storage_selection),!1}delete_backup_by_name(e,t,i){e&&jQuery.ajax({url:XCLONER_AJAXURL,method:"post",data:{action:"delete_backup_by_name",name:e,storage_selection:this.storage_selection},success:function(e){e.finished?i.row(jQuery(t).parents("tr")).remove().draw():alert("There was an error deleting the file")},dataType:"json"})}list_backup_content_callback(e,t=0,i=0){var n=this;e&&jQuery.ajax({url:XCLONER_AJAXURL,method:"post",data:{action:"list_backup_files",file:e,start:t,part:i},success:function(t){if(t.error)return jQuery("#backup_cotent_modal .files-list").addClass("error").prepend(t.message),void jQuery("#backup_cotent_modal .progress > div").addClass("determinate").removeClass(".indeterminate").css("width","100%");var i=[];for(var s in t.files){if(void 0!==t.total_size)parseInt(100*t.start),parseInt(t.total_size);n.file_counter++,i[s]="<li>"+n.file_counter+". <span title='"+t.files[s].mtime+"'>"+t.files[s].path+"</span> ("+t.files[s].size+" bytes)</li>"}jQuery("#backup_cotent_modal .modal-content .files-list").prepend(i.reverse().join("\n")),!t.finished&&jQuery("#backup_cotent_modal").is(":visible")?n.list_backup_content_callback(e,t.start,t.part):jQuery("#backup_cotent_modal .progress > div").addClass("determinate").removeClass(".indeterminate").css("width","100%")},error:function(e,t,i){jQuery("#backup_cotent_modal .files-list").addClass("error").prepend(t+i)},dataType:"json"})}list_backup_content(e){this.file_counter=0,jQuery("#backup_cotent_modal .modal-content .files-list").text("").removeClass("error"),jQuery("#backup_cotent_modal .modal-content .backup-name").text(e),n.open(),jQuery("#backup_cotent_modal .progress > div").removeClass("determinate").addClass("indeterminate"),this.list_backup_content_callback(e)}backup_encryption_callback(e,t=0,i=0,n=0){var s=this;e&&jQuery.ajax({url:XCLONER_AJAXURL,method:"post",data:{action:"backup_encryption",file:e,start:t,part:i,iv:n},success:function(t){if(void 0!==t.total_size){jQuery("#backup_encryption_modal .progress > div").removeClass("indeterminate").addClass("determinate");var i=parseInt(100*t.start)/parseInt(t.total_size);jQuery("#backup_encryption_modal .progress .determinate").css("width",parseInt(i)+"%"),jQuery("#backup_encryption_modal .modal-content .files-list").text("Encrypting "+t.processing_file+" "+parseInt(i)+"%")}if(t.error)return jQuery("#backup_encryption_modal .notice").show(),jQuery("#backup_encryption_modal .files-list").addClass("error").prepend(t.message+" "),void jQuery("#backup_encryption_modal .progress > div").addClass("determinate").removeClass("indeterminate").css("width","100%");!t.finished&&jQuery("#backup_encryption_modal").is(":visible")?s.backup_encryption_callback(e,t.start,t.part,t.iv):(jQuery("#backup_encryption_modal .progress > div").addClass("determinate").removeClass("indeterminate").css("width","100%"),jQuery("#backup_encryption_modal .modal-content .files-list").text("Done Encrypting."),dataTable.ajax.reload())},error:function(e,t,i){jQuery("#backup_encryption_modal .files-list").addClass("error").prepend(t+i)},dataType:"json"})}backup_encryption(e,t=0){this.file_counter=0,jQuery("#backup_encryption_modal .modal-content .backup-name").text(e),s.open(),jQuery("#backup_encryption_modal .progress > div"),jQuery("#backup_encryption_modal .notice").show(),jQuery("#backup_encryption_modal a.btn").attr("onclick","xcloner_manage_backups.backup_encryption('"+e+"', true)"),jQuery("#backup_encryption_modal .modal-content .files-list").text("").removeClass("error"),t&&(jQuery("#backup_encryption_modal .notice").hide(),this.backup_encryption_callback(e))}backup_decryption_callback(e,t=0,i=0,n=0){var s=this,a=jQuery("#backup_decryption_modal #decryption_key").val();e&&jQuery.ajax({url:XCLONER_AJAXURL,method:"post",data:{action:"backup_decryption",file:e,start:t,part:i,iv:n,decryption_key:a},success:function(t){if(t.start||(t.start=0),void 0!==t.total_size){jQuery("#backup_decryption_modal .progress > div").removeClass("indeterminate").addClass("determinate");var i=parseInt(100*t.start)/parseInt(t.total_size);jQuery("#backup_decryption_modal .progress .determinate").css("width",parseInt(i)+"%"),jQuery("#backup_decryption_modal .modal-content .files-list").text("Decrypting "+t.processing_file+" "+parseInt(i)+"%")}if(t.error)return jQuery("#backup_decryption_modal .files-list").addClass("error").prepend(t.message+" "),jQuery("#backup_decryption_modal .progress > div").addClass("determinate").removeClass("indeterminate").css("width","100%"),void jQuery("#backup_decryption_modal .notice").show();!t.finished&&jQuery("#backup_decryption_modal").is(":visible")?s.backup_decryption_callback(e,t.start,t.part,t.iv):(jQuery("#backup_decryption_modal .progress > div").addClass("determinate").removeClass("indeterminate").css("width","100%"),jQuery("#backup_decryption_modal .modal-content .files-list").text("Done Decrypting."),dataTable.ajax.reload())},error:function(e,t,i){jQuery("#backup_decryption_modal .files-list").addClass("error").prepend(t+i)},dataType:"json"})}backup_decryption(e,t=0){this.file_counter=0,jQuery("#backup_decryption_modal .modal-content .backup-name").text(e),a.open(),jQuery("#backup_decryption_modal .progress > div"),jQuery("#backup_decryption_modal .notice").show(),jQuery("#backup_decryption_modal a.btn").attr("onclick","xcloner_manage_backups.backup_decryption('"+e+"', true)"),jQuery("#backup_decryption_modal .modal-content .files-list").text("").removeClass("error"),t&&(jQuery("#backup_decryption_modal .notice").hide(),this.backup_decryption_callback(e))}cloud_upload(e,t){t=t||0,jQuery("#remote_storage_modal").find(".backup_name").text(e),jQuery("#remote_storage_modal").find("input.backup_name").val(e),M.updateTextFields(),jQuery(".col select").formSelect(),o.open(),jQuery("#remote_storage_modal .status").hide(),jQuery(".remote-storage-form").off("submit").on("submit",(function(){jQuery("#remote_storage_modal .status").show(),jQuery("#remote_storage_modal .status .progress .indeterminate").removeClass("determinate").css("width","0%"),jQuery("#remote_storage_modal .status-text").removeClass("error").text("");var i=jQuery("#remote_storage_modal select").val();return e&&jQuery.ajax({url:XCLONER_AJAXURL,method:"post",data:{action:"upload_backup_to_remote",file:e,storage_type:i,delete_after_transfer:t},success:function(e){e.error?jQuery("#remote_storage_modal .status-text").addClass("error").text(e.message):jQuery("#remote_storage_modal .status-text").removeClass("error").text("done"),jQuery("#remote_storage_modal .status .progress .indeterminate").addClass("determinate").css("width","100%")},error:function(e,t,i){jQuery("#remote_storage_modal .status-text").addClass("error").text(t+i)},dataType:"json"}),!1}))}copy_remote_to_local(e){r.open(),jQuery("#local_storage_upload_modal .modal-content .backup-name").text(e),jQuery("#local_storage_upload_modal .status-text").removeClass("error").text(""),jQuery("#local_storage_upload_modal .status .progress .indeterminate").removeClass("determinate").css("width","0%"),e&&jQuery.ajax({url:XCLONER_AJAXURL,method:"post",data:{action:"copy_backup_remote_to_local",file:e,storage_type:this.storage_selection},success:function(e){e.error?jQuery("#local_storage_upload_modal .status-text").addClass("error").text(e.message):jQuery("#local_storage_upload_modal .status-text").removeClass("error").text("done"),jQuery("#local_storage_upload_modal .status .progress .indeterminate").addClass("determinate").css("width","100%")},error:function(e,t,i){jQuery("#local_storage_upload_modal .status-text").addClass("error").text(t+i)},dataType:"json"})}}},function(e,t,i){"use strict";i.r(t),i.d(t,"Xcloner_Remote_Storage",(function(){return n}));class n{constructor(){}toggle_status(e){var t=jQuery(e).attr("name"),i=0;jQuery(e).is(":checked")&&(i=1),t&&jQuery.ajax({url:XCLONER_AJAXURL,method:"post",data:{action:"remote_storage_save_status",id:t,value:i},success:function(e){e.finished||alert("Error changing status")},dataType:"json"})}}},function(e,t,i){"use strict";i.r(t),i.d(t,"Xcloner_Backup",(function(){return n}));class n{constructor(){this.cancel=0,this.params={},this.last_dumpfile="",this.last_backup_file="",this.backup_part=0,this.backup_size_total=0,this.resume={}}get_form_params(){var e=[],t=[];jQuery.each(jQuery("#jstree_database_container").jstree("get_checked",!0),(function(){var t={};t.id=this.id,t.parent=this.parent;var i=e.length;e[i]=t})),jQuery.each(jQuery("#jstree_files_container").jstree("get_checked",!0),(function(){var e={};e.id=this.id,e.parent=this.parent;var i=t.length;t[i]=e}));var i={};return i.table_params=e,i.files_params=t,i.backup_params=jQuery("#generate_backup_form").serializeArray(),i}do_backup_database_callback(e,t,i){if(i.extra&&(this.params.extra=i.extra),i.extra.stats&&(void 0!==i.extra.stats.tables_count&&jQuery(e).find(".table-counter").text(parseInt(i.extra.stats.tables_count)),void 0!==i.extra.stats.database_count&&jQuery(e).find(".database-counter").text(parseInt(i.extra.stats.database_count)),void 0!==i.extra.stats.total_records&&jQuery(e).find(".total-records").text(parseInt(i.extra.stats.total_records))),i.extra.tableName&&jQuery(e).find(".last-logged-table").text(i.extra.databaseName+"."+i.extra.tableName+" ("+i.extra.processedRecords+" records)"),void 0!==i.extra.processedRecords&&!i.extra.startAtRecord&&!i.extra.endDump){var n=parseInt(jQuery(e).find(".total-records").attr("data-processed"))+parseInt(i.extra.processedRecords),s=100*parseInt(n)/parseInt(jQuery(e).find(".total-records").text());jQuery(e).find(".progress .determinate").css("width",s+"%"),jQuery(e).find(".total-records").attr("data-processed",n),jQuery(e).find(".status-body ul.logged-tables").prepend(jQuery("<li>").text(i.extra.databaseName+"."+i.extra.tableName+" ("+i.extra.processedRecords+" records)"))}if(void 0!==i.extra.dumpfile){var a=i.extra.dumpfile+" ("+this.getSize(i.extra.dumpsize,1024)+" KB)";jQuery(this.last_dumpfile).hasClass(i.extra.dumpfile)?jQuery(this.last_dumpfile).html(a):this.last_dumpfile=jQuery("<li>").addClass(i.extra.dumpfile).html(a).prependTo("ul.logged-databases")}if(!i.finished)return this.do_ajax(e,t),!1;jQuery(e).find(".last-logged-table").text("done"),jQuery(e).find(".progress .determinate").css("width","100%"),this.do_backup_files()}do_backup_database(){if(jQuery("#jstree_database_container").length){var e="#generate_backup ul.backup-status li.database-backup";jQuery(e).show(),jQuery(e).find(".collapsible-header").trigger("click"),jQuery(e).find(".total-records").text(0),jQuery(e).find(".total-records").attr("data-processed",0),jQuery(e).find(".table-counter").text(0),jQuery(e).find(".database-counter").text(0),jQuery(e).find(".logged-databases").html(""),jQuery(e).find(".logged-tables").html(""),this.last_dumpfile=0,jQuery(e).find(".progress .determinate").css("width","0%"),this.do_ajax(e,"backup_database",1)}else this.do_backup_files()}do_scan_filesystem_callback(e,t,i){if(i.total_files_num&&jQuery(".file-system .file-counter").text(parseInt(i.total_files_num)+parseInt(jQuery(".file-system .file-counter").text())),i.total_files_size){var n=parseFloat(i.total_files_size)+parseFloat(jQuery(".file-system .file-size-total").text());jQuery(".file-system .file-size-total").text(n.toFixed(2))}if(i.last_logged_file&&jQuery(".file-system .last-logged-file").text(i.last_logged_file),!i.finished)return this.do_ajax(e,t),!1;jQuery(e).find(".progress .indeterminate").removeClass("indeterminate").addClass("determinate").css("width","100%"),jQuery(".file-system .last-logged-file").text("done"),this.do_backup_database()}do_scan_filesystem(){var e="#generate_backup ul.backup-status li.file-system";jQuery(e).show(),jQuery(e+" .status-body").show(),jQuery(e).find(".collapsible-header").trigger("click"),jQuery(".file-system .file-counter").text(0),jQuery(".file-system .last-logged-file").text(""),jQuery(".file-system .file-size-total").text(0),jQuery(".file-system .progress div").removeClass("determinate").addClass("indeterminate").css("width","0%"),this.do_ajax(e,"scan_filesystem",1)}do_backup_files_callback(e,t,i){if(i.extra&&(this.params.extra=i.extra),i.extra&&(void 0!==i.extra.start_at_line&&jQuery(e).find(".file-counter").text(parseInt(i.extra.start_at_line)),void 0!==i.extra.start_at_line&&jQuery(e).find(".file-size-total").text(this.getSize(this.backup_size_total+parseInt(i.extra.backup_size)))),i.extra.processed_file){if(void 0!==i.extra.start_at_byte&&i.extra.start_at_byte)var n=i.extra.start_at_byte;else n=i.extra.processed_file_size;jQuery(e).find(".last-logged-file").text(i.extra.processed_file+" ("+this.getSize(n,1024)+" KB)")}if(void 0!==i.extra.processed_file){var s=i.extra.backup_archive_name_full+" ("+this.getSize(i.extra.backup_size)+") MB";this.backup_part!=i.extra.backup_part&&(this.backup_part=i.extra.backup_part,this.backup_size_total=this.backup_size_total+i.extra.backup_size),jQuery(this.last_backup_file).hasClass(i.extra.backup_archive_name)||(this.last_backup_file=jQuery("<li>").addClass(i.extra.backup_archive_name).html(s).prependTo(jQuery(e).find(".status-body .backup-name"))),jQuery(this.last_backup_file).html(s)}if(i.extra.lines_total){var a=100*parseInt(i.extra.start_at_line)/parseInt(i.extra.lines_total);jQuery(e).find(".progress .determinate").css("width",a+"%")}if(!i.finished)return this.do_ajax(e,t),!1;jQuery(e).find(".last-logged-file").text("done"),jQuery(".backup-done .cloud-upload").attr("href","#"+i.extra.backup_parent),jQuery(".backup-done .download").attr("href","#"+i.extra.backup_parent),jQuery(".backup-done .list-backup-content").attr("href","#"+i.extra.backup_parent),this.do_backup_encryption()||this.do_remote_storage_upload(i.extra.backup_parent)||this.do_backup_done(i.extra.backup_parent)}do_backup_files(){if(this.cancel)return!1;var e="#generate_backup ul.backup-status li.files-backup";jQuery(e).show(),jQuery(e+" .status-body").show(),jQuery(e).find(".collapsible-header").trigger("click"),jQuery(e).find(".file-size-total").text(0),jQuery(e).find(".file-size-total").attr("data-processed",0),jQuery(e).find(".file-counter").text(0),jQuery(e).find(".last-logged-file").text(""),jQuery(e).find(".progress .determinate").css("width","0%"),this.do_ajax(e,"backup_files",1)}do_backup_encryption_callback(e,t,i){if(i.extra&&(this.params.extra=i.extra),jQuery(".backup-encryption .last-logged-file").text("encrypting "+i.processing_file+" ..."),void 0!==i.total_size){jQuery(".backup-encryption .progress > div").removeClass("indeterminate").addClass("determinate");var n=parseInt(100*i.start)/parseInt(i.total_size);jQuery(".backup-encryption .progress .determinate").css("width",parseInt(n)+"%")}return i.error?(jQuery(".backup-encryption .status-body").show(),jQuery(".backup-encryption .status-body").addClass("error").prepend(i.message+" "),void jQuery(".backup-encryption .progress > div").addClass("determinate").removeClass("indeterminate").css("width","100%")):i.finished?(jQuery(e).find(".progress > div").css("width","100%"),jQuery(".backup-encryption .last-logged-file").text("done"),void(this.do_remote_storage_upload(i.processing_file)||this.do_backup_done(i.processing_file))):(this.do_ajax(e,t),!1)}do_backup_encryption(){if(this.cancel)return!1;if(!jQuery("#backup_options #backup_encrypt").is(":checked"))return!1;var e="#generate_backup ul.backup-status li.backup-encryption";return jQuery(e).show(),jQuery(e+" .status-body").show(),jQuery(e).find(".collapsible-header").trigger("click"),jQuery(e).find(".progress .determinate").removeClass("determinate").addClass("indeterminate"),this.do_ajax(e,"backup_encryption",1),!0}do_upload_backup_to_remote_callback(e,t,i){!i||i.error?(jQuery(e).find(".status").text(i.message),jQuery(e).find(".progress .indeterminate").removeClass("indeterminate").addClass("determinate").css("width","0%")):(jQuery(e).find(".status").text("done"),jQuery(e).find(".progress .indeterminate").removeClass("indeterminate").addClass("determinate").css("width","100%")),this.do_backup_done()}do_remote_storage_upload(e){if(this.cancel)return!1;var t=jQuery("#schedule_storage").val();if(!t)return!1;var i=Number(jQuery("#backup_delete_after_remote_transfer").is(":checked"));jQuery("#remote_storage_modal #transfer_storage").val(t);var n="#generate_backup ul.backup-status li.remote-storage-transfer";return jQuery(n).show(),jQuery(n+" .status-body").show(),jQuery(n).find(".collapsible-header").trigger("click"),jQuery(n).find(".progress .determinate").removeClass("determinate").addClass("indeterminate"),this.params.file=e,this.params.storage_type=t,this.params.delete_after_transfer=i,this.do_ajax(n,"upload_backup_to_remote",1),!0}do_backup_done(e){var t="#generate_backup ul.backup-status li.backup-done";jQuery(t).show(),jQuery(t+" .status-body").show(),jQuery(t).find(".collapsible-header").trigger("click"),this.set_cancel(!1),jQuery("#generate_backup .action-buttons a").hide(),jQuery("#generate_backup .action-buttons .start").css("display","inline-block")}do_save_schedule_callback(e,t,i){jQuery("#schedule_backup_success").show()}cancel_backup(){this.set_cancel(!0),jQuery("#generate_backup .action-buttons a").hide(),jQuery("#generate_backup .action-buttons .start").css("display","inline-block"),jQuery("#generate_backup .action-buttons .restart").css("display","inline-block")}restart_backup(){if(this.set_cancel(!1),jQuery("#generate_backup .action-buttons a").hide(),jQuery("#generate_backup .action-buttons .cancel").css("display","inline-block"),this.resume.action)return this.do_ajax(this.resume.elem,this.resume.action,this.resume.params),void(this.resume={});this.start_backup()}start_backup(){this.resume={},this.set_cancel(!1),jQuery("#generate_backup .action-buttons a").hide(),jQuery("#generate_backup .action-buttons .cancel").css("display","inline-block"),this.backup_size_total=0,this.last_backup_file="",this.backup_part=0,jQuery("#generate_backup ul.backup-name li").remove(),jQuery("#generate_backup ul.backup-status > li").hide(),jQuery("#generate_backup .backup-status").show(),this.params=this.get_form_params(),this.do_scan_filesystem()}set_cancel(e){this.cancel=e}get_cancel(e){return this.cancel}init_resume(e,t,i){this.resume.elem=e,this.resume.action=t,this.resume.init=i}do_ajax(e,t,i=0){let n=this.params.hash?this.params.hash:"generate_hash";if(1!=this.cancel){var s="do_"+t+"_callback",a=JSON.stringify(this.params),o=this;jQuery.ajax({url:XCLONER_AJAXURL,dataType:"json",type:"POST",data:{action:t,data:a,init:i,hash:n,API_ID:ID()},error:function(n){show_ajax_error("Communication Error","",n),o.init_resume(e,t,i)}}).done((function(n){if(n.hash&&(o.params.hash=n.hash),void 0!==n.error)return show_ajax_error("Communication Error","",n.error_message),void o.init_resume(e,t,i);o.resume={},o[s](e,t,n)}))}else this.init_resume(e,t,i)}getSize(e,t=1048576){return(e/t).toFixed(2)}}},function(e,t,i){i(5),i(0),i(3),i(1),i(2),i(7),i(8)},function(e,t,i){(function(i){var n,s=function e(t,i,n){null===t&&(t=Function.prototype);var s=Object.getOwnPropertyDescriptor(t,i);if(void 0===s){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,i,n)}if("value"in s)return s.value;var o=s.get;return void 0!==o?o.call(n):void 0},a=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}();function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}window.cash=function(){var e,t=document,i=window,n=Array.prototype,s=n.slice,a=n.filter,o=n.push,r=function(){},l=function(e){return typeof e==typeof r&&e.call},u=function(e){return"string"==typeof e},d=/^#[\w-]*$/,c=/^\.[\w-]*$/,h=/<.+>/,p=/^\w+$/;function v(e,i){return i=i||t,c.test(e)?i.getElementsByClassName(e.slice(1)):p.test(e)?i.getElementsByTagName(e):i.querySelectorAll(e)}function f(i){if(!e){var n=(e=t.implementation.createHTMLDocument(null)).createElement("base");n.href=t.location.href,e.head.appendChild(n)}return e.body.innerHTML=i,e.body.childNodes}function _(e){"loading"!==t.readyState?e():t.addEventListener("DOMContentLoaded",e)}function m(e,n){if(!e)return this;if(e.cash&&e!==i)return e;var s,a=e,o=0;if(u(e))a=d.test(e)?t.getElementById(e.slice(1)):h.test(e)?f(e):v(e,n);else if(l(e))return _(e),this;if(!a)return this;if(a.nodeType||a===i)this[0]=a,this.length=1;else for(s=this.length=a.length;o<s;o++)this[o]=a[o];return this}function y(e,t){return new m(e,t)}var g=y.fn=y.prototype=m.prototype={cash:!0,length:0,push:o,splice:n.splice,map:n.map,init:m};function b(e,t){for(var i=e.length,n=0;n<i&&!1!==t.call(e[n],e[n],n,e);n++);}function k(e,t){var i=e&&(e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector);return!!i&&i.call(e,t)}function w(e){return u(e)?k:e.cash?function(t){return e.is(t)}:function(e,t){return e===t}}function C(e){return y(s.call(e).filter((function(e,t,i){return i.indexOf(e)===t})))}Object.defineProperty(g,"constructor",{value:y}),y.parseHTML=f,y.noop=r,y.isFunction=l,y.isString=u,y.extend=g.extend=function(e){e=e||{};var t=s.call(arguments),i=t.length,n=1;for(1===t.length&&(e=this,n=0);n<i;n++)if(t[n])for(var a in t[n])t[n].hasOwnProperty(a)&&(e[a]=t[n][a]);return e},y.extend({merge:function(e,t){for(var i=+t.length,n=e.length,s=0;s<i;n++,s++)e[n]=t[s];return e.length=n,e},each:b,matches:k,unique:C,isArray:Array.isArray,isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)}});var x=y.uid="_cash"+Date.now();function E(e){return e[x]=e[x]||{}}function M(e,t,i){return E(e)[t]=i}function T(e,t){var i=E(e);return void 0===i[t]&&(i[t]=e.dataset?e.dataset[t]:y(e).attr("data-"+t)),i[t]}function j(e,t){var i=E(e);i?delete i[t]:e.dataset?delete e.dataset[t]:y(e).removeAttr("data-"+name)}g.extend({data:function(e,t){if(u(e))return void 0===t?T(this[0],e):this.each((function(i){return M(i,e,t)}));for(var i in e)this.data(i,e[i]);return this},removeData:function(e){return this.each((function(t){return j(t,e)}))}});var O=/\S+/g;function L(e){return u(e)&&e.match(O)}function D(e,t){return e.classList?e.classList.contains(t):new RegExp("(^| )"+t+"( |$)","gi").test(e.className)}function B(e,t,i){e.classList?e.classList.add(t):i.indexOf(" "+t+" ")&&(e.className+=" "+t)}function $(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(t,"")}g.extend({addClass:function(e){var t=L(e);return t?this.each((function(e){var i=" "+e.className+" ";b(t,(function(t){B(e,t,i)}))})):this},attr:function(e,t){if(e){if(u(e))return void 0===t?this[0]?this[0].getAttribute?this[0].getAttribute(e):this[0][e]:void 0:this.each((function(i){i.setAttribute?i.setAttribute(e,t):i[e]=t}));for(var i in e)this.attr(i,e[i]);return this}},hasClass:function(e){var t=!1,i=L(e);return i&&i.length&&this.each((function(e){return!(t=D(e,i[0]))})),t},prop:function(e,t){if(u(e))return void 0===t?this[0][e]:this.each((function(i){i[e]=t}));for(var i in e)this.prop(i,e[i]);return this},removeAttr:function(e){return this.each((function(t){t.removeAttribute?t.removeAttribute(e):delete t[e]}))},removeClass:function(e){if(!arguments.length)return this.attr("class","");var t=L(e);return t?this.each((function(e){b(t,(function(t){$(e,t)}))})):this},removeProp:function(e){return this.each((function(t){delete t[e]}))},toggleClass:function(e,t){if(void 0!==t)return this[t?"addClass":"removeClass"](e);var i=L(e);return i?this.each((function(e){var t=" "+e.className+" ";b(i,(function(i){D(e,i)?$(e,i):B(e,i,t)}))})):this}}),g.extend({add:function(e,t){return C(y.merge(this,y(e,t)))},each:function(e){return b(this,e),this},eq:function(e){return y(this.get(e))},filter:function(e){if(!e)return this;var t=l(e)?e:w(e);return y(a.call(this,(function(i){return t(i,e)})))},first:function(){return this.eq(0)},get:function(e){return void 0===e?s.call(this):e<0?this[e+this.length]:this[e]},index:function(e){var t=e?y(e)[0]:this[0],i=e?this:y(t).parent().children();return s.call(i).indexOf(t)},last:function(){return this.eq(-1)}});var S,I,Q,A,R=(Q=/(?:^\w|[A-Z]|\b\w)/g,A=/[\s-_]+/g,function(e){return e.replace(Q,(function(e,t){return e[0===t?"toLowerCase":"toUpperCase"]()})).replace(A,"")}),P=(S={},I=document.createElement("div").style,function(e){if(e=R(e),S[e])return S[e];var t=e.charAt(0).toUpperCase()+e.slice(1);return b((e+" "+["webkit","moz","ms","o"].join(t+" ")+t).split(" "),(function(t){if(t in I)return S[t]=e=S[e]=t,!1})),S[e]});function H(e,t){return parseInt(i.getComputedStyle(e[0],null)[t],10)||0}function W(e,t,i){var n=T(e,"_cashEvents")||M(e,"_cashEvents",{});n[t]=n[t]||[],n[t].push(i),e.addEventListener(t,i)}function q(e,t,i){var n,s=T(e,"_cashEvents"),a=s&&s[t];a&&(i?(e.removeEventListener(t,i),(n=a.indexOf(i))>=0&&a.splice(n,1)):(b(a,(function(i){e.removeEventListener(t,i)})),a=[]))}function z(e,t){return"&"+encodeURIComponent(e)+"="+encodeURIComponent(t).replace(/%20/g,"+")}function F(e){var t=[];return b(e.options,(function(e){e.selected&&t.push(e.value)})),t.length?t:null}function N(e){var t=e.selectedIndex;return t>=0?e.options[t].value:null}function X(e){var t=e.type;if(!t)return null;switch(t.toLowerCase()){case"select-one":return N(e);case"select-multiple":return F(e);case"radio":case"checkbox":return e.checked?e.value:null;default:return e.value?e.value:null}}function V(e,t,i){if(i){var n=e.childNodes[0];e.insertBefore(t,n)}else e.appendChild(t)}function Y(e,t,i){var n=u(t);n||!t.length?b(e,n?function(e){return e.insertAdjacentHTML(i?"afterbegin":"beforeend",t)}:function(e,n){return V(e,0===n?t:t.cloneNode(!0),i)}):b(t,(function(t){return Y(e,t,i)}))}y.prefixedProp=P,y.camelCase=R,g.extend({css:function(e,t){if(u(e))return e=P(e),arguments.length>1?this.each((function(i){return i.style[e]=t})):i.getComputedStyle(this[0])[e];for(var n in e)this.css(n,e[n]);return this}}),b(["Width","Height"],(function(e){var t=e.toLowerCase();g[t]=function(){return this[0].getBoundingClientRect()[t]},g["inner"+e]=function(){return this[0]["client"+e]},g["outer"+e]=function(t){return this[0]["offset"+e]+(t?H(this,"margin"+("Width"===e?"Left":"Top"))+H(this,"margin"+("Width"===e?"Right":"Bottom")):0)}})),g.extend({off:function(e,t){return this.each((function(i){return q(i,e,t)}))},on:function(e,t,i,n){var s;if(!u(e)){for(var a in e)this.on(a,t,e[a]);return this}return l(t)&&(i=t,t=null),"ready"===e?(_(i),this):(t&&(s=i,i=function(e){for(var i=e.target;!k(i,t);){if(i===this||null===i)return!1;i=i.parentNode}i&&s.call(i,e)}),this.each((function(t){var s=i;n&&(s=function(){i.apply(this,arguments),q(t,e,s)}),W(t,e,s)})))},one:function(e,t,i){return this.on(e,t,i,!0)},ready:_,trigger:function(e,t){if(document.createEvent){var i=document.createEvent("HTMLEvents");return i.initEvent(e,!0,!1),i=this.extend(i,t),this.each((function(e){return e.dispatchEvent(i)}))}}}),g.extend({serialize:function(){var e="";return b(this[0].elements||this,(function(t){if(!t.disabled&&"FIELDSET"!==t.tagName){var i=t.name;switch(t.type.toLowerCase()){case"file":case"reset":case"submit":case"button":break;case"select-multiple":var n=X(t);null!==n&&b(n,(function(t){e+=z(i,t)}));break;default:var s=X(t);null!==s&&(e+=z(i,s))}}})),e.substr(1)},val:function(e){return void 0===e?X(this[0]):this.each((function(t){return t.value=e}))}}),g.extend({after:function(e){return y(e).insertAfter(this),this},append:function(e){return Y(this,e),this},appendTo:function(e){return Y(y(e),this),this},before:function(e){return y(e).insertBefore(this),this},clone:function(){return y(this.map((function(e){return e.cloneNode(!0)})))},empty:function(){return this.html(""),this},html:function(e){if(void 0===e)return this[0].innerHTML;var t=e.nodeType?e[0].outerHTML:e;return this.each((function(e){return e.innerHTML=t}))},insertAfter:function(e){var t=this;return y(e).each((function(e,i){var n=e.parentNode,s=e.nextSibling;t.each((function(e){n.insertBefore(0===i?e:e.cloneNode(!0),s)}))})),this},insertBefore:function(e){var t=this;return y(e).each((function(e,i){var n=e.parentNode;t.each((function(t){n.insertBefore(0===i?t:t.cloneNode(!0),e)}))})),this},prepend:function(e){return Y(this,e,!0),this},prependTo:function(e){return Y(y(e),this,!0),this},remove:function(){return this.each((function(e){if(e.parentNode)return e.parentNode.removeChild(e)}))},text:function(e){return void 0===e?this[0].textContent:this.each((function(t){return t.textContent=e}))}});var K=t.documentElement;return g.extend({position:function(){var e=this[0];return{left:e.offsetLeft,top:e.offsetTop}},offset:function(){var e=this[0].getBoundingClientRect();return{top:e.top+i.pageYOffset-K.clientTop,left:e.left+i.pageXOffset-K.clientLeft}},offsetParent:function(){return y(this[0].offsetParent)}}),g.extend({children:function(e){var t=[];return this.each((function(e){o.apply(t,e.children)})),t=C(t),e?t.filter((function(t){return k(t,e)})):t},closest:function(e){return!e||this.length<1?y():this.is(e)?this.filter(e):this.parent().closest(e)},is:function(e){if(!e)return!1;var t=!1,i=w(e);return this.each((function(n){return!(t=i(n,e))})),t},find:function(e){if(!e||e.nodeType)return y(e&&this.has(e).length?e:null);var t=[];return this.each((function(i){o.apply(t,v(e,i))})),C(t)},has:function(e){var t=u(e)?function(t){return 0!==v(e,t).length}:function(t){return t.contains(e)};return this.filter(t)},next:function(){return y(this[0].nextElementSibling)},not:function(e){if(!e)return this;var t=w(e);return this.filter((function(i){return!t(i,e)}))},parent:function(){var e=[];return this.each((function(t){t&&t.parentNode&&e.push(t.parentNode)})),C(e)},parents:function(e){var i,n=[];return this.each((function(s){for(i=s;i&&i.parentNode&&i!==t.body.parentNode;)i=i.parentNode,(!e||e&&k(i,e))&&n.push(i)})),C(n)},prev:function(){return y(this[0].previousElementSibling)},siblings:function(e){var t=this.parent().children(e),i=this[0];return t.filter((function(e){return e!==i}))}}),y}();var u=function(){function e(t,i,n){l(this,e),i instanceof Element||console.error(Error(i+" is not an HTML Element"));var s=t.getInstance(i);s&&s.destroy(),this.el=i,this.$el=cash(i)}return a(e,null,[{key:"init",value:function(e,t,i){var n=null;if(t instanceof Element)n=new e(t,i);else if(t&&(t.jquery||t.cash||t instanceof NodeList)){for(var s=[],a=0;a<t.length;a++)s.push(new e(t[a],i));n=s}return n}}]),e}();!function(e){e.Package?M={}:e.M={},M.jQueryLoaded=!!e.jQuery}(window),void 0===(n=function(){return M}.apply(t,[]))||(e.exports=n),M.version="1.0.0",M.keys={TAB:9,ENTER:13,ESC:27,ARROW_UP:38,ARROW_DOWN:40},M.tabPressed=!1,M.keyDown=!1;document.addEventListener("keydown",(function(e){M.keyDown=!0,e.which!==M.keys.TAB&&e.which!==M.keys.ARROW_DOWN&&e.which!==M.keys.ARROW_UP||(M.tabPressed=!0)}),!0),document.addEventListener("keyup",(function(e){M.keyDown=!1,e.which!==M.keys.TAB&&e.which!==M.keys.ARROW_DOWN&&e.which!==M.keys.ARROW_UP||(M.tabPressed=!1)}),!0),document.addEventListener("focus",(function(e){M.keyDown&&document.body.classList.add("keyboard-focused")}),!0),document.addEventListener("blur",(function(e){document.body.classList.remove("keyboard-focused")}),!0),M.initializeJqueryWrapper=function(e,t,i){jQuery.fn[t]=function(n){if(e.prototype[n]){var s=Array.prototype.slice.call(arguments,1);if("get"===n.slice(0,3)){var a=this.first()[0][i];return a[n].apply(a,s)}return this.each((function(){var e=this[i];e[n].apply(e,s)}))}if("object"==typeof n||!n)return e.init(this,arguments[0]),this;jQuery.error("Method "+n+" does not exist on jQuery."+t)}},M.AutoInit=function(e){var t=e||document.body,i={Autocomplete:t.querySelectorAll(".autocomplete:not(.no-autoinit)"),Carousel:t.querySelectorAll(".carousel:not(.no-autoinit)"),Chips:t.querySelectorAll(".chips:not(.no-autoinit)"),Collapsible:t.querySelectorAll(".collapsible:not(.no-autoinit)"),Datepicker:t.querySelectorAll(".datepicker:not(.no-autoinit)"),Dropdown:t.querySelectorAll(".dropdown-trigger:not(.no-autoinit)"),Materialbox:t.querySelectorAll(".materialboxed:not(.no-autoinit)"),Modal:t.querySelectorAll(".modal:not(.no-autoinit)"),Parallax:t.querySelectorAll(".parallax:not(.no-autoinit)"),Pushpin:t.querySelectorAll(".pushpin:not(.no-autoinit)"),ScrollSpy:t.querySelectorAll(".scrollspy:not(.no-autoinit)"),FormSelect:t.querySelectorAll("select:not(.no-autoinit)"),Sidenav:t.querySelectorAll(".sidenav:not(.no-autoinit)"),Tabs:t.querySelectorAll(".tabs:not(.no-autoinit)"),TapTarget:t.querySelectorAll(".tap-target:not(.no-autoinit)"),Timepicker:t.querySelectorAll(".timepicker:not(.no-autoinit)"),Tooltip:t.querySelectorAll(".tooltipped:not(.no-autoinit)"),FloatingActionButton:t.querySelectorAll(".fixed-action-btn:not(.no-autoinit)")};for(var n in i){M[n].init(i[n])}},M.objectSelectorString=function(e){return((e.prop("tagName")||"")+(e.attr("id")||"")+(e.attr("class")||"")).replace(/\s/g,"")},M.guid=function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return function(){return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}}(),M.escapeHash=function(e){return e.replace(/(:|\.|\[|\]|,|=|\/)/g,"\\$1")},M.elementOrParentIsFixed=function(e){var t=$(e),i=t.add(t.parents()),n=!1;return i.each((function(){if("fixed"===$(this).css("position"))return n=!0,!1})),n},M.checkWithinContainer=function(e,t,i){var n={top:!1,right:!1,bottom:!1,left:!1},s=e.getBoundingClientRect(),a=e===document.body?Math.max(s.bottom,window.innerHeight):s.bottom,o=e.scrollLeft,r=e.scrollTop,l=t.left-o,u=t.top-r;return(l<s.left+i||l<i)&&(n.left=!0),(l+t.width>s.right-i||l+t.width>window.innerWidth-i)&&(n.right=!0),(u<s.top+i||u<i)&&(n.top=!0),(u+t.height>a-i||u+t.height>window.innerHeight-i)&&(n.bottom=!0),n},M.checkPossibleAlignments=function(e,t,i,n){var s={top:!0,right:!0,bottom:!0,left:!0,spaceOnTop:null,spaceOnRight:null,spaceOnBottom:null,spaceOnLeft:null},a="visible"===getComputedStyle(t).overflow,o=t.getBoundingClientRect(),r=Math.min(o.height,window.innerHeight),l=Math.min(o.width,window.innerWidth),u=e.getBoundingClientRect(),d=t.scrollLeft,c=t.scrollTop,h=i.left-d,p=i.top-c,v=i.top+u.height-c;return s.spaceOnRight=a?window.innerWidth-(u.left+i.width):l-(h+i.width),s.spaceOnRight<0&&(s.left=!1),s.spaceOnLeft=a?u.right-i.width:h-i.width+u.width,s.spaceOnLeft<0&&(s.right=!1),s.spaceOnBottom=a?window.innerHeight-(u.top+i.height+n):r-(p+i.height+n),s.spaceOnBottom<0&&(s.top=!1),s.spaceOnTop=a?u.bottom-(i.height+n):v-(i.height-n),s.spaceOnTop<0&&(s.bottom=!1),s},M.getOverflowParent=function(e){return null==e?null:e===document.body||"visible"!==getComputedStyle(e).overflow?e:M.getOverflowParent(e.parentElement)},M.getIdFromTrigger=function(e){var t=e.getAttribute("data-target");return t||(t=(t=e.getAttribute("href"))?t.slice(1):""),t},M.getDocumentScrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},M.getDocumentScrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0};var d=Date.now||function(){return(new Date).getTime()};M.throttle=function(e,t,i){var n=void 0,s=void 0,a=void 0,o=null,r=0;i||(i={});var l=function(){r=!1===i.leading?0:d(),o=null,a=e.apply(n,s),n=s=null};return function(){var u=d();r||!1!==i.leading||(r=u);var c=t-(u-r);return n=this,s=arguments,c<=0?(clearTimeout(o),o=null,r=u,a=e.apply(n,s),n=s=null):o||!1===i.trailing||(o=setTimeout(l,c)),a}};var c={scope:{}};c.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,i){if(i.get||i.set)throw new TypeError("ES3 does not support getters and setters.");e!=Array.prototype&&e!=Object.prototype&&(e[t]=i.value)},c.getGlobal=function(e){return"undefined"!=typeof window&&window===e?e:void 0!==i&&null!=i?i:e},c.global=c.getGlobal(this),c.SYMBOL_PREFIX="jscomp_symbol_",c.initSymbol=function(){c.initSymbol=function(){},c.global.Symbol||(c.global.Symbol=c.Symbol)},c.symbolCounter_=0,c.Symbol=function(e){return c.SYMBOL_PREFIX+(e||"")+c.symbolCounter_++},c.initSymbolIterator=function(){c.initSymbol();var e=c.global.Symbol.iterator;e||(e=c.global.Symbol.iterator=c.global.Symbol("iterator")),"function"!=typeof Array.prototype[e]&&c.defineProperty(Array.prototype,e,{configurable:!0,writable:!0,value:function(){return c.arrayIterator(this)}}),c.initSymbolIterator=function(){}},c.arrayIterator=function(e){var t=0;return c.iteratorPrototype((function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}))},c.iteratorPrototype=function(e){return c.initSymbolIterator(),(e={next:e})[c.global.Symbol.iterator]=function(){return this},e},c.array=c.array||{},c.iteratorFromArray=function(e,t){c.initSymbolIterator(),e instanceof String&&(e+="");var i=0,n={next:function(){if(i<e.length){var s=i++;return{value:t(s,e[s]),done:!1}}return n.next=function(){return{done:!0,value:void 0}},n.next()}};return n[Symbol.iterator]=function(){return n},n},c.polyfill=function(e,t,i,n){if(t){for(i=c.global,e=e.split("."),n=0;n<e.length-1;n++){var s=e[n];s in i||(i[s]={}),i=i[s]}(t=t(n=i[e=e[e.length-1]]))!=n&&null!=t&&c.defineProperty(i,e,{configurable:!0,writable:!0,value:t})}},c.polyfill("Array.prototype.keys",(function(e){return e||function(){return c.iteratorFromArray(this,(function(e){return e}))}}),"es6-impl","es3");var h=this;M.anime=function(){function e(e){if(!R.col(e))try{return document.querySelectorAll(e)}catch(e){}}function t(e,t){for(var i=e.length,n=2<=arguments.length?arguments[1]:void 0,s=[],a=0;a<i;a++)if(a in e){var o=e[a];t.call(n,o,a,e)&&s.push(o)}return s}function i(e){return e.reduce((function(e,t){return e.concat(R.arr(t)?i(t):t)}),[])}function n(t){return R.arr(t)?t:(R.str(t)&&(t=e(t)||t),t instanceof NodeList||t instanceof HTMLCollection?[].slice.call(t):[t])}function s(e,t){return e.some((function(e){return e===t}))}function a(e){var t,i={};for(t in e)i[t]=e[t];return i}function o(e,t){var i,n=a(e);for(i in e)n[i]=t.hasOwnProperty(i)?t[i]:e[i];return n}function r(e,t){var i,n=a(e);for(i in t)n[i]=R.und(e[i])?t[i]:e[i];return n}function l(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,i,n){return t+t+i+i+n+n}));var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return"rgba("+(e=parseInt(t[1],16))+","+parseInt(t[2],16)+","+(t=parseInt(t[3],16))+",1)"}function u(e){function t(e,t,i){return 0>i&&(i+=1),1<i&&--i,i<1/6?e+6*(t-e)*i:.5>i?t:i<2/3?e+(t-e)*(2/3-i)*6:e}var i=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(e);e=parseInt(i[1])/360;var n=parseInt(i[2])/100,s=parseInt(i[3])/100;if(i=i[4]||1,0==n)s=n=e=s;else{var a=.5>s?s*(1+n):s+n-s*n,o=2*s-a;s=t(o,a,e+1/3),n=t(o,a,e),e=t(o,a,e-1/3)}return"rgba("+255*s+","+255*n+","+255*e+","+i+")"}function d(e){if(e=/([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(e))return e[2]}function c(e){return-1<e.indexOf("translate")||"perspective"===e?"px":-1<e.indexOf("rotate")||-1<e.indexOf("skew")?"deg":void 0}function p(e,t){return R.fnc(e)?e(t.target,t.id,t.total):e}function v(e,t){if(t in e.style)return getComputedStyle(e).getPropertyValue(t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase())||"0"}function f(e,t){return R.dom(e)&&s(A,t)?"transform":R.dom(e)&&(e.getAttribute(t)||R.svg(e)&&e[t])?"attribute":R.dom(e)&&"transform"!==t&&v(e,t)?"css":null!=e[t]?"object":void 0}function _(e,i){var n=c(i);if(n=-1<i.indexOf("scale")?1:0+n,!(e=e.style.transform))return n;for(var s=[],a=[],o=[],r=/(\w+)\((.+?)\)/g;s=r.exec(e);)a.push(s[1]),o.push(s[2]);return e=t(o,(function(e,t){return a[t]===i})),e.length?e[0]:n}function m(e,t){switch(f(e,t)){case"transform":return _(e,t);case"css":return v(e,t);case"attribute":return e.getAttribute(t)}return e[t]||0}function y(e,t){var i=/^(\*=|\+=|-=)/.exec(e);if(!i)return e;var n=d(e)||0;switch(t=parseFloat(t),e=parseFloat(e.replace(i[0],"")),i[0][0]){case"+":return t+e+n;case"-":return t-e+n;case"*":return t*e+n}}function g(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function b(e){e=e.points;for(var t,i=0,n=0;n<e.numberOfItems;n++){var s=e.getItem(n);0<n&&(i+=g(t,s)),t=s}return i}function k(e){if(e.getTotalLength)return e.getTotalLength();switch(e.tagName.toLowerCase()){case"circle":return 2*Math.PI*e.getAttribute("r");case"rect":return 2*e.getAttribute("width")+2*e.getAttribute("height");case"line":return g({x:e.getAttribute("x1"),y:e.getAttribute("y1")},{x:e.getAttribute("x2"),y:e.getAttribute("y2")});case"polyline":return b(e);case"polygon":var t=e.points;return b(e)+g(t.getItem(t.numberOfItems-1),t.getItem(0))}}function w(e,t){function i(i){return i=void 0===i?0:i,e.el.getPointAtLength(1<=t+i?t+i:0)}var n=i(),s=i(-1),a=i(1);switch(e.property){case"x":return n.x;case"y":return n.y;case"angle":return 180*Math.atan2(a.y-s.y,a.x-s.x)/Math.PI}}function C(e,t){var i,n=/-?\d*\.?\d+/g;if(i=R.pth(e)?e.totalLength:e,R.col(i))if(R.rgb(i)){var s=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(i);i=s?"rgba("+s[1]+",1)":i}else i=R.hex(i)?l(i):R.hsl(i)?u(i):void 0;else s=(s=d(i))?i.substr(0,i.length-s.length):i,i=t&&!/\s/g.test(i)?s+t:s;return{original:i+="",numbers:i.match(n)?i.match(n).map(Number):[0],strings:R.str(e)||t?i.split(n):[]}}function x(e){return t(e=e?i(R.arr(e)?e.map(n):n(e)):[],(function(e,t,i){return i.indexOf(e)===t}))}function E(e){var t=x(e);return t.map((function(e,i){return{target:e,id:i,total:t.length}}))}function M(e,t){var i=a(t);if(R.arr(e)){var s=e.length;2!==s||R.obj(e[0])?R.fnc(t.duration)||(i.duration=t.duration/s):e={value:e}}return n(e).map((function(e,i){return i=i?0:t.delay,e=R.obj(e)&&!R.pth(e)?e:{value:e},R.und(e.delay)&&(e.delay=i),e})).map((function(e){return r(e,i)}))}function T(e,t){var i,n={};for(i in e){var s=p(e[i],t);R.arr(s)&&(s=s.map((function(e){return p(e,t)})),1===s.length&&(s=s[0])),n[i]=s}return n.duration=parseFloat(n.duration),n.delay=parseFloat(n.delay),n}function j(e){return R.arr(e)?P.apply(this,e):H[e]}function O(e,t){var i;return e.tweens.map((function(n){var s=(n=T(n,t)).value,a=m(t.target,e.name),o=i?i.to.original:a,r=(o=R.arr(s)?s[0]:o,y(R.arr(s)?s[1]:s,o));return a=d(r)||d(o)||d(a),n.from=C(o,a),n.to=C(r,a),n.start=i?i.end:e.offset,n.end=n.start+n.delay+n.duration,n.easing=j(n.easing),n.elasticity=(1e3-Math.min(Math.max(n.elasticity,1),999))/1e3,n.isPath=R.pth(s),n.isColor=R.col(n.from.original),n.isColor&&(n.round=1),i=n}))}function L(e,n){return t(i(e.map((function(e){return n.map((function(t){var i=f(e.target,t.name);if(i){var n=O(t,e);t={type:i,property:t.name,animatable:e,tweens:n,duration:n[n.length-1].end,delay:n[0].delay}}else t=void 0;return t}))}))),(function(e){return!R.und(e)}))}function D(e,t,i,n){var s="delay"===e;return t.length?(s?Math.min:Math.max).apply(Math,t.map((function(t){return t[e]}))):s?n.delay:i.offset+n.delay+n.duration}function B(e){var t,i=o(I,e),n=o(Q,e),s=E(e.targets),a=[],l=r(i,n);for(t in e)l.hasOwnProperty(t)||"targets"===t||a.push({name:t,offset:l.offset,tweens:M(e[t],n)});return r(i,{children:[],animatables:s,animations:e=L(s,a),duration:D("duration",e,i,n),delay:D("delay",e,i,n)})}function $(e){function i(){return window.Promise&&new Promise((function(e){return c=e}))}function n(e){return p.reversed?p.duration-e:e}function s(e){for(var i=0,n={},s=p.animations,a=s.length;i<a;){var o=s[i],r=o.animatable,l=(u=o.tweens)[h=u.length-1];h&&(l=t(u,(function(t){return e<t.end}))[0]||l);for(var u=Math.min(Math.max(e-l.start-l.delay,0),l.duration)/l.duration,d=isNaN(u)?1:l.easing(u,l.elasticity),c=(u=l.to.strings,l.round),h=[],f=void 0,_=(f=l.to.numbers.length,0);_<f;_++){var m=void 0,y=(m=l.to.numbers[_],l.from.numbers[_]);m=l.isPath?w(l.value,d*m):y+d*(m-y),c&&(l.isColor&&2<_||(m=Math.round(m*c)/c)),h.push(m)}if(l=u.length)for(f=u[0],d=0;d<l;d++)c=u[d+1],_=h[d],isNaN(_)||(f=c?f+(_+c):f+(_+" "));else f=h[0];W[o.type](r.target,o.property,f,n,r.id),o.currentValue=f,i++}if(i=Object.keys(n).length)for(s=0;s<i;s++)S||(S=v(document.body,"transform")?"transform":"-webkit-transform"),p.animatables[s].target.style[S]=n[s].join(" ");p.currentTime=e,p.progress=e/p.duration*100}function a(e){p[e]&&p[e](p)}function o(){p.remaining&&!0!==p.remaining&&p.remaining--}function r(e){var t=p.duration,r=p.offset,v=r+p.delay,f=p.currentTime,_=p.reversed,m=n(e);if(p.children.length){var y=p.children,g=y.length;if(m>=p.currentTime)for(var b=0;b<g;b++)y[b].seek(m);else for(;g--;)y[g].seek(m)}(m>=v||!t)&&(p.began||(p.began=!0,a("begin")),a("run")),m>r&&m<t?s(m):(m<=r&&0!==f&&(s(0),_&&o()),(m>=t&&f!==t||!t)&&(s(t),_||o())),a("update"),e>=t&&(p.remaining?(u=l,"alternate"===p.direction&&(p.reversed=!p.reversed)):(p.pause(),p.completed||(p.completed=!0,a("complete"),"Promise"in window&&(c(),h=i()))),d=0)}e=void 0===e?{}:e;var l,u,d=0,c=null,h=i(),p=B(e);return p.reset=function(){var e=p.direction,t=p.loop;for(p.currentTime=0,p.progress=0,p.paused=!0,p.began=!1,p.completed=!1,p.reversed="reverse"===e,p.remaining="alternate"===e&&1===t?2:t,s(0),e=p.children.length;e--;)p.children[e].reset()},p.tick=function(e){l=e,u||(u=l),r((d+l-u)*$.speed)},p.seek=function(e){r(n(e))},p.pause=function(){var e=q.indexOf(p);-1<e&&q.splice(e,1),p.paused=!0},p.play=function(){p.paused&&(p.paused=!1,u=0,d=n(p.currentTime),q.push(p),z||F())},p.reverse=function(){p.reversed=!p.reversed,u=0,d=n(p.currentTime)},p.restart=function(){p.pause(),p.reset(),p.play()},p.finished=h,p.reset(),p.autoplay&&p.play(),p}var S,I={update:void 0,begin:void 0,run:void 0,complete:void 0,loop:1,direction:"normal",autoplay:!0,offset:0},Q={duration:1e3,delay:0,easing:"easeOutElastic",elasticity:500,round:0},A="translateX translateY translateZ rotate rotateX rotateY rotateZ scale scaleX scaleY scaleZ skewX skewY perspective".split(" "),R={arr:function(e){return Array.isArray(e)},obj:function(e){return-1<Object.prototype.toString.call(e).indexOf("Object")},pth:function(e){return R.obj(e)&&e.hasOwnProperty("totalLength")},svg:function(e){return e instanceof SVGElement},dom:function(e){return e.nodeType||R.svg(e)},str:function(e){return"string"==typeof e},fnc:function(e){return"function"==typeof e},und:function(e){return void 0===e},hex:function(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e)},rgb:function(e){return/^rgb/.test(e)},hsl:function(e){return/^hsl/.test(e)},col:function(e){return R.hex(e)||R.rgb(e)||R.hsl(e)}},P=function(){function e(e,t,i){return(((1-3*i+3*t)*e+(3*i-6*t))*e+3*t)*e}return function(t,i,n,s){if(0<=t&&1>=t&&0<=n&&1>=n){var a=new Float32Array(11);if(t!==i||n!==s)for(var o=0;11>o;++o)a[o]=e(.1*o,t,n);return function(o){if(t===i&&n===s)return o;if(0===o)return 0;if(1===o)return 1;for(var r=0,l=1;10!==l&&a[l]<=o;++l)r+=.1;--l,l=r+(o-a[l])/(a[l+1]-a[l])*.1;var u=3*(1-3*n+3*t)*l*l+2*(3*n-6*t)*l+3*t;if(.001<=u){for(r=0;4>r&&0!=(u=3*(1-3*n+3*t)*l*l+2*(3*n-6*t)*l+3*t);++r){var d=e(l,t,n)-o;l-=d/u}o=l}else if(0===u)o=l;else{l=r,r+=.1;var c=0;do{0<(u=e(d=l+(r-l)/2,t,n)-o)?r=d:l=d}while(1e-7<Math.abs(u)&&10>++c);o=d}return e(o,i,s)}}}}(),H=function(){function e(e,t){return 0===e||1===e?e:-Math.pow(2,10*(e-1))*Math.sin(2*(e-1-t/(2*Math.PI)*Math.asin(1))*Math.PI/t)}var t,i="Quad Cubic Quart Quint Sine Expo Circ Back Elastic".split(" "),n={In:[[.55,.085,.68,.53],[.55,.055,.675,.19],[.895,.03,.685,.22],[.755,.05,.855,.06],[.47,0,.745,.715],[.95,.05,.795,.035],[.6,.04,.98,.335],[.6,-.28,.735,.045],e],Out:[[.25,.46,.45,.94],[.215,.61,.355,1],[.165,.84,.44,1],[.23,1,.32,1],[.39,.575,.565,1],[.19,1,.22,1],[.075,.82,.165,1],[.175,.885,.32,1.275],function(t,i){return 1-e(1-t,i)}],InOut:[[.455,.03,.515,.955],[.645,.045,.355,1],[.77,0,.175,1],[.86,0,.07,1],[.445,.05,.55,.95],[1,0,0,1],[.785,.135,.15,.86],[.68,-.55,.265,1.55],function(t,i){return.5>t?e(2*t,i)/2:1-e(-2*t+2,i)/2}]},s={linear:P(.25,.25,.75,.75)},a={};for(t in n)a.type=t,n[a.type].forEach(function(e){return function(t,n){s["ease"+e.type+i[n]]=R.fnc(t)?t:P.apply(h,t)}}(a)),a={type:a.type};return s}(),W={css:function(e,t,i){return e.style[t]=i},attribute:function(e,t,i){return e.setAttribute(t,i)},object:function(e,t,i){return e[t]=i},transform:function(e,t,i,n,s){n[s]||(n[s]=[]),n[s].push(t+"("+i+")")}},q=[],z=0,F=function(){function e(){z=requestAnimationFrame(t)}function t(t){var i=q.length;if(i){for(var n=0;n<i;)q[n]&&q[n].tick(t),n++;e()}else cancelAnimationFrame(z),z=0}return e}();return $.version="2.2.0",$.speed=1,$.running=q,$.remove=function(e){e=x(e);for(var t=q.length;t--;)for(var i=q[t],n=i.animations,a=n.length;a--;)s(e,n[a].animatable.target)&&(n.splice(a,1),n.length||i.pause())},$.getValue=m,$.path=function(t,i){var n=R.str(t)?e(t)[0]:t,s=i||100;return function(e){return{el:n,property:e,totalLength:k(n)*(s/100)}}},$.setDashoffset=function(e){var t=k(e);return e.setAttribute("stroke-dasharray",t),t},$.bezier=P,$.easings=H,$.timeline=function(e){var t=$(e);return t.pause(),t.duration=0,t.add=function(i){return t.children.forEach((function(e){e.began=!0,e.completed=!0})),n(i).forEach((function(i){var n=r(i,o(Q,e||{}));n.targets=n.targets||e.targets,i=t.duration;var s=n.offset;n.autoplay=!1,n.direction=t.direction,n.offset=R.und(s)?i:y(s,i),t.began=!0,t.completed=!0,t.seek(n.offset),(n=$(n)).began=!0,n.completed=!0,n.duration>i&&(t.duration=n.duration),t.children.push(n)})),t.seek(0),t.reset(),t.autoplay&&t.restart(),t},t},$.random=function(e,t){return Math.floor(Math.random()*(t-e+1))+e},$}(),function(e,t){"use strict";var i={accordion:!0,onOpenStart:void 0,onOpenEnd:void 0,onCloseStart:void 0,onCloseEnd:void 0,inDuration:300,outDuration:300},n=function(n){function u(t,i){l(this,u);var n=o(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,u,t,i));n.el.M_Collapsible=n,n.options=e.extend({},u.defaults,i),n.$headers=n.$el.children("li").children(".collapsible-header"),n.$headers.attr("tabindex",0),n._setupEventHandlers();var s=n.$el.children("li.active").children(".collapsible-body");return n.options.accordion?s.first().css("display","block"):s.css("display","block"),n}return r(u,n),a(u,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.M_Collapsible=void 0}},{key:"_setupEventHandlers",value:function(){var e=this;this._handleCollapsibleClickBound=this._handleCollapsibleClick.bind(this),this._handleCollapsibleKeydownBound=this._handleCollapsibleKeydown.bind(this),this.el.addEventListener("click",this._handleCollapsibleClickBound),this.$headers.each((function(t){t.addEventListener("keydown",e._handleCollapsibleKeydownBound)}))}},{key:"_removeEventHandlers",value:function(){var e=this;this.el.removeEventListener("click",this._handleCollapsibleClickBound),this.$headers.each((function(t){t.removeEventListener("keydown",e._handleCollapsibleKeydownBound)}))}},{key:"_handleCollapsibleClick",value:function(t){var i=e(t.target).closest(".collapsible-header");if(t.target&&i.length){var n=i.closest(".collapsible");if(n[0]===this.el){var s=i.closest("li"),a=n.children("li"),o=s[0].classList.contains("active"),r=a.index(s);o?this.close(r):this.open(r)}}}},{key:"_handleCollapsibleKeydown",value:function(e){13===e.keyCode&&this._handleCollapsibleClickBound(e)}},{key:"_animateIn",value:function(e){var i=this,n=this.$el.children("li").eq(e);if(n.length){var s=n.children(".collapsible-body");t.remove(s[0]),s.css({display:"block",overflow:"hidden",height:0,paddingTop:"",paddingBottom:""});var a=s.css("padding-top"),o=s.css("padding-bottom"),r=s[0].scrollHeight;s.css({paddingTop:0,paddingBottom:0}),t({targets:s[0],height:r,paddingTop:a,paddingBottom:o,duration:this.options.inDuration,easing:"easeInOutCubic",complete:function(e){s.css({overflow:"",paddingTop:"",paddingBottom:"",height:""}),"function"==typeof i.options.onOpenEnd&&i.options.onOpenEnd.call(i,n[0])}})}}},{key:"_animateOut",value:function(e){var i=this,n=this.$el.children("li").eq(e);if(n.length){var s=n.children(".collapsible-body");t.remove(s[0]),s.css("overflow","hidden"),t({targets:s[0],height:0,paddingTop:0,paddingBottom:0,duration:this.options.outDuration,easing:"easeInOutCubic",complete:function(){s.css({height:"",overflow:"",padding:"",display:""}),"function"==typeof i.options.onCloseEnd&&i.options.onCloseEnd.call(i,n[0])}})}}},{key:"open",value:function(t){var i=this,n=this.$el.children("li").eq(t);if(n.length&&!n[0].classList.contains("active")){if("function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,n[0]),this.options.accordion){var s=this.$el.children("li");this.$el.children("li.active").each((function(t){var n=s.index(e(t));i.close(n)}))}n[0].classList.add("active"),this._animateIn(t)}}},{key:"close",value:function(e){var t=this.$el.children("li").eq(e);t.length&&t[0].classList.contains("active")&&("function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,t[0]),t[0].classList.remove("active"),this._animateOut(e))}}],[{key:"init",value:function(e,t){return s(u.__proto__||Object.getPrototypeOf(u),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Collapsible}},{key:"defaults",get:function(){return i}}]),u}(u);M.Collapsible=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"collapsible","M_Collapsible")}(cash,M.anime),function(e,t){"use strict";var i={alignment:"left",autoFocus:!0,constrainWidth:!0,container:null,coverTrigger:!0,closeOnClick:!0,hover:!1,inDuration:150,outDuration:250,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null,onItemClick:null},n=function(n){function u(t,i){l(this,u);var n=o(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,u,t,i));return n.el.M_Dropdown=n,u._dropdowns.push(n),n.id=M.getIdFromTrigger(t),n.dropdownEl=document.getElementById(n.id),n.$dropdownEl=e(n.dropdownEl),n.options=e.extend({},u.defaults,i),n.isOpen=!1,n.isScrollable=!1,n.isTouchMoving=!1,n.focusedIndex=-1,n.filterQuery=[],n.options.container?e(n.options.container).append(n.dropdownEl):n.$el.after(n.dropdownEl),n._makeDropdownFocusable(),n._resetFilterQueryBound=n._resetFilterQuery.bind(n),n._handleDocumentClickBound=n._handleDocumentClick.bind(n),n._handleDocumentTouchmoveBound=n._handleDocumentTouchmove.bind(n),n._handleDropdownClickBound=n._handleDropdownClick.bind(n),n._handleDropdownKeydownBound=n._handleDropdownKeydown.bind(n),n._handleTriggerKeydownBound=n._handleTriggerKeydown.bind(n),n._setupEventHandlers(),n}return r(u,n),a(u,[{key:"destroy",value:function(){this._resetDropdownStyles(),this._removeEventHandlers(),u._dropdowns.splice(u._dropdowns.indexOf(this),1),this.el.M_Dropdown=void 0}},{key:"_setupEventHandlers",value:function(){this.el.addEventListener("keydown",this._handleTriggerKeydownBound),this.dropdownEl.addEventListener("click",this._handleDropdownClickBound),this.options.hover?(this._handleMouseEnterBound=this._handleMouseEnter.bind(this),this.el.addEventListener("mouseenter",this._handleMouseEnterBound),this._handleMouseLeaveBound=this._handleMouseLeave.bind(this),this.el.addEventListener("mouseleave",this._handleMouseLeaveBound),this.dropdownEl.addEventListener("mouseleave",this._handleMouseLeaveBound)):(this._handleClickBound=this._handleClick.bind(this),this.el.addEventListener("click",this._handleClickBound))}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("keydown",this._handleTriggerKeydownBound),this.dropdownEl.removeEventListener("click",this._handleDropdownClickBound),this.options.hover?(this.el.removeEventListener("mouseenter",this._handleMouseEnterBound),this.el.removeEventListener("mouseleave",this._handleMouseLeaveBound),this.dropdownEl.removeEventListener("mouseleave",this._handleMouseLeaveBound)):this.el.removeEventListener("click",this._handleClickBound)}},{key:"_setupTemporaryEventHandlers",value:function(){document.body.addEventListener("click",this._handleDocumentClickBound,!0),document.body.addEventListener("touchend",this._handleDocumentClickBound),document.body.addEventListener("touchmove",this._handleDocumentTouchmoveBound),this.dropdownEl.addEventListener("keydown",this._handleDropdownKeydownBound)}},{key:"_removeTemporaryEventHandlers",value:function(){document.body.removeEventListener("click",this._handleDocumentClickBound,!0),document.body.removeEventListener("touchend",this._handleDocumentClickBound),document.body.removeEventListener("touchmove",this._handleDocumentTouchmoveBound),this.dropdownEl.removeEventListener("keydown",this._handleDropdownKeydownBound)}},{key:"_handleClick",value:function(e){e.preventDefault(),this.open()}},{key:"_handleMouseEnter",value:function(){this.open()}},{key:"_handleMouseLeave",value:function(t){var i=t.toElement||t.relatedTarget,n=!!e(i).closest(".dropdown-content").length,s=!1,a=e(i).closest(".dropdown-trigger");a.length&&a[0].M_Dropdown&&a[0].M_Dropdown.isOpen&&(s=!0),s||n||this.close()}},{key:"_handleDocumentClick",value:function(t){var i=this,n=e(t.target);this.options.closeOnClick&&n.closest(".dropdown-content").length&&!this.isTouchMoving?setTimeout((function(){i.close()}),0):!n.closest(".dropdown-trigger").length&&n.closest(".dropdown-content").length||setTimeout((function(){i.close()}),0),this.isTouchMoving=!1}},{key:"_handleTriggerKeydown",value:function(e){e.which!==M.keys.ARROW_DOWN&&e.which!==M.keys.ENTER||this.isOpen||(e.preventDefault(),this.open())}},{key:"_handleDocumentTouchmove",value:function(t){e(t.target).closest(".dropdown-content").length&&(this.isTouchMoving=!0)}},{key:"_handleDropdownClick",value:function(t){if("function"==typeof this.options.onItemClick){var i=e(t.target).closest("li")[0];this.options.onItemClick.call(this,i)}}},{key:"_handleDropdownKeydown",value:function(t){if(t.which===M.keys.TAB)t.preventDefault(),this.close();else if(t.which!==M.keys.ARROW_DOWN&&t.which!==M.keys.ARROW_UP||!this.isOpen)if(t.which===M.keys.ENTER&&this.isOpen){var i=this.dropdownEl.children[this.focusedIndex],n=e(i).find("a, button").first();n.length?n[0].click():i&&i.click()}else t.which===M.keys.ESC&&this.isOpen&&(t.preventDefault(),this.close());else{t.preventDefault();var s=t.which===M.keys.ARROW_DOWN?1:-1,a=this.focusedIndex,o=!1;do{if(a+=s,this.dropdownEl.children[a]&&-1!==this.dropdownEl.children[a].tabIndex){o=!0;break}}while(a<this.dropdownEl.children.length&&a>=0);o&&(this.focusedIndex=a,this._focusFocusedItem())}var r=String.fromCharCode(t.which).toLowerCase();if(r&&-1===[9,13,27,38,40].indexOf(t.which)){this.filterQuery.push(r);var l=this.filterQuery.join(""),u=e(this.dropdownEl).find("li").filter((function(t){return 0===e(t).text().toLowerCase().indexOf(l)}))[0];u&&(this.focusedIndex=e(u).index(),this._focusFocusedItem())}this.filterTimeout=setTimeout(this._resetFilterQueryBound,1e3)}},{key:"_resetFilterQuery",value:function(){this.filterQuery=[]}},{key:"_resetDropdownStyles",value:function(){this.$dropdownEl.css({display:"",width:"",height:"",left:"",top:"","transform-origin":"",transform:"",opacity:""})}},{key:"_makeDropdownFocusable",value:function(){this.dropdownEl.tabIndex=0,e(this.dropdownEl).children().each((function(e){e.getAttribute("tabindex")||e.setAttribute("tabindex",0)}))}},{key:"_focusFocusedItem",value:function(){this.focusedIndex>=0&&this.focusedIndex<this.dropdownEl.children.length&&this.options.autoFocus&&this.dropdownEl.children[this.focusedIndex].focus()}},{key:"_getDropdownPosition",value:function(){this.el.offsetParent.getBoundingClientRect();var e=this.el.getBoundingClientRect(),t=this.dropdownEl.getBoundingClientRect(),i=t.height,n=t.width,s=e.left-t.left,a=e.top-t.top,o={left:s,top:a,height:i,width:n},r=this.dropdownEl.offsetParent?this.dropdownEl.offsetParent:this.dropdownEl.parentNode,l=M.checkPossibleAlignments(this.el,r,o,this.options.coverTrigger?0:e.height),u="top",d=this.options.alignment;if(a+=this.options.coverTrigger?0:e.height,this.isScrollable=!1,l.top||(l.bottom?u="bottom":(this.isScrollable=!0,l.spaceOnTop>l.spaceOnBottom?(u="bottom",i+=l.spaceOnTop,a-=l.spaceOnTop):i+=l.spaceOnBottom)),!l[d]){var c="left"===d?"right":"left";l[c]?d=c:l.spaceOnLeft>l.spaceOnRight?(d="right",n+=l.spaceOnLeft,s-=l.spaceOnLeft):(d="left",n+=l.spaceOnRight)}return"bottom"===u&&(a=a-t.height+(this.options.coverTrigger?e.height:0)),"right"===d&&(s=s-t.width+e.width),{x:s,y:a,verticalAlignment:u,horizontalAlignment:d,height:i,width:n}}},{key:"_animateIn",value:function(){var e=this;t.remove(this.dropdownEl),t({targets:this.dropdownEl,opacity:{value:[0,1],easing:"easeOutQuad"},scaleX:[.3,1],scaleY:[.3,1],duration:this.options.inDuration,easing:"easeOutQuint",complete:function(t){e.options.autoFocus&&e.dropdownEl.focus(),"function"==typeof e.options.onOpenEnd&&e.options.onOpenEnd.call(e,e.el)}})}},{key:"_animateOut",value:function(){var e=this;t.remove(this.dropdownEl),t({targets:this.dropdownEl,opacity:{value:0,easing:"easeOutQuint"},scaleX:.3,scaleY:.3,duration:this.options.outDuration,easing:"easeOutQuint",complete:function(t){e._resetDropdownStyles(),"function"==typeof e.options.onCloseEnd&&e.options.onCloseEnd.call(e,e.el)}})}},{key:"_placeDropdown",value:function(){var e=this.options.constrainWidth?this.el.getBoundingClientRect().width:this.dropdownEl.getBoundingClientRect().width;this.dropdownEl.style.width=e+"px";var t=this._getDropdownPosition();this.dropdownEl.style.left=t.x+"px",this.dropdownEl.style.top=t.y+"px",this.dropdownEl.style.height=t.height+"px",this.dropdownEl.style.width=t.width+"px",this.dropdownEl.style.transformOrigin=("left"===t.horizontalAlignment?"0":"100%")+" "+("top"===t.verticalAlignment?"0":"100%")}},{key:"open",value:function(){this.isOpen||(this.isOpen=!0,"function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,this.el),this._resetDropdownStyles(),this.dropdownEl.style.display="block",this._placeDropdown(),this._animateIn(),this._setupTemporaryEventHandlers())}},{key:"close",value:function(){this.isOpen&&(this.isOpen=!1,this.focusedIndex=-1,"function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,this.el),this._animateOut(),this._removeTemporaryEventHandlers(),this.options.autoFocus&&this.el.focus())}},{key:"recalculateDimensions",value:function(){this.isOpen&&(this.$dropdownEl.css({width:"",height:"",left:"",top:"","transform-origin":""}),this._placeDropdown())}}],[{key:"init",value:function(e,t){return s(u.__proto__||Object.getPrototypeOf(u),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Dropdown}},{key:"defaults",get:function(){return i}}]),u}(u);n._dropdowns=[],M.Dropdown=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"dropdown","M_Dropdown")}(cash,M.anime),function(e,t){"use strict";var i={opacity:.5,inDuration:250,outDuration:250,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null,preventScrolling:!0,dismissible:!0,startingTop:"4%",endingTop:"10%"},n=function(n){function u(t,i){l(this,u);var n=o(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,u,t,i));return n.el.M_Modal=n,n.options=e.extend({},u.defaults,i),n.isOpen=!1,n.id=n.$el.attr("id"),n._openingTrigger=void 0,n.$overlay=e('<div class="modal-overlay"></div>'),n.el.tabIndex=0,n._nthModalOpened=0,u._count++,n._setupEventHandlers(),n}return r(u,n),a(u,[{key:"destroy",value:function(){u._count--,this._removeEventHandlers(),this.el.removeAttribute("style"),this.$overlay.remove(),this.el.M_Modal=void 0}},{key:"_setupEventHandlers",value:function(){this._handleOverlayClickBound=this._handleOverlayClick.bind(this),this._handleModalCloseClickBound=this._handleModalCloseClick.bind(this),1===u._count&&document.body.addEventListener("click",this._handleTriggerClick),this.$overlay[0].addEventListener("click",this._handleOverlayClickBound),this.el.addEventListener("click",this._handleModalCloseClickBound)}},{key:"_removeEventHandlers",value:function(){0===u._count&&document.body.removeEventListener("click",this._handleTriggerClick),this.$overlay[0].removeEventListener("click",this._handleOverlayClickBound),this.el.removeEventListener("click",this._handleModalCloseClickBound)}},{key:"_handleTriggerClick",value:function(t){var i=e(t.target).closest(".modal-trigger");if(i.length){var n=M.getIdFromTrigger(i[0]),s=document.getElementById(n).M_Modal;s&&s.open(i),t.preventDefault()}}},{key:"_handleOverlayClick",value:function(){this.options.dismissible&&this.close()}},{key:"_handleModalCloseClick",value:function(t){e(t.target).closest(".modal-close").length&&this.close()}},{key:"_handleKeydown",value:function(e){27===e.keyCode&&this.options.dismissible&&this.close()}},{key:"_handleFocus",value:function(e){this.el.contains(e.target)||this._nthModalOpened!==u._modalsOpen||this.el.focus()}},{key:"_animateIn",value:function(){var i=this;e.extend(this.el.style,{display:"block",opacity:0}),e.extend(this.$overlay[0].style,{display:"block",opacity:0}),t({targets:this.$overlay[0],opacity:this.options.opacity,duration:this.options.inDuration,easing:"easeOutQuad"});var n={targets:this.el,duration:this.options.inDuration,easing:"easeOutCubic",complete:function(){"function"==typeof i.options.onOpenEnd&&i.options.onOpenEnd.call(i,i.el,i._openingTrigger)}};this.el.classList.contains("bottom-sheet")?(e.extend(n,{bottom:0,opacity:1}),t(n)):(e.extend(n,{top:[this.options.startingTop,this.options.endingTop],opacity:1,scaleX:[.8,1],scaleY:[.8,1]}),t(n))}},{key:"_animateOut",value:function(){var i=this;t({targets:this.$overlay[0],opacity:0,duration:this.options.outDuration,easing:"easeOutQuart"});var n={targets:this.el,duration:this.options.outDuration,easing:"easeOutCubic",complete:function(){i.el.style.display="none",i.$overlay.remove(),"function"==typeof i.options.onCloseEnd&&i.options.onCloseEnd.call(i,i.el)}};this.el.classList.contains("bottom-sheet")?(e.extend(n,{bottom:"-100%",opacity:0}),t(n)):(e.extend(n,{top:[this.options.endingTop,this.options.startingTop],opacity:0,scaleX:.8,scaleY:.8}),t(n))}},{key:"open",value:function(e){if(!this.isOpen)return this.isOpen=!0,u._modalsOpen++,this._nthModalOpened=u._modalsOpen,this.$overlay[0].style.zIndex=1e3+2*u._modalsOpen,this.el.style.zIndex=1e3+2*u._modalsOpen+1,this._openingTrigger=e?e[0]:void 0,"function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,this.el,this._openingTrigger),this.options.preventScrolling&&(document.body.style.overflow="hidden"),this.el.classList.add("open"),this.el.insertAdjacentElement("afterend",this.$overlay[0]),this.options.dismissible&&(this._handleKeydownBound=this._handleKeydown.bind(this),this._handleFocusBound=this._handleFocus.bind(this),document.addEventListener("keydown",this._handleKeydownBound),document.addEventListener("focus",this._handleFocusBound,!0)),t.remove(this.el),t.remove(this.$overlay[0]),this._animateIn(),this.el.focus(),this}},{key:"close",value:function(){if(this.isOpen)return this.isOpen=!1,u._modalsOpen--,this._nthModalOpened=0,"function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,this.el),this.el.classList.remove("open"),0===u._modalsOpen&&(document.body.style.overflow=""),this.options.dismissible&&(document.removeEventListener("keydown",this._handleKeydownBound),document.removeEventListener("focus",this._handleFocusBound,!0)),t.remove(this.el),t.remove(this.$overlay[0]),this._animateOut(),this}}],[{key:"init",value:function(e,t){return s(u.__proto__||Object.getPrototypeOf(u),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Modal}},{key:"defaults",get:function(){return i}}]),u}(u);n._modalsOpen=0,n._count=0,M.Modal=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"modal","M_Modal")}(cash,M.anime),function(e,t){"use strict";var i={inDuration:275,outDuration:200,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null},n=function(n){function u(t,i){l(this,u);var n=o(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,u,t,i));return n.el.M_Materialbox=n,n.options=e.extend({},u.defaults,i),n.overlayActive=!1,n.doneAnimating=!0,n.placeholder=e("<div></div>").addClass("material-placeholder"),n.originalWidth=0,n.originalHeight=0,n.originInlineStyles=n.$el.attr("style"),n.caption=n.el.getAttribute("data-caption")||"",n.$el.before(n.placeholder),n.placeholder.append(n.$el),n._setupEventHandlers(),n}return r(u,n),a(u,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.M_Materialbox=void 0,e(this.placeholder).after(this.el).remove(),this.$el.removeAttr("style")}},{key:"_setupEventHandlers",value:function(){this._handleMaterialboxClickBound=this._handleMaterialboxClick.bind(this),this.el.addEventListener("click",this._handleMaterialboxClickBound)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleMaterialboxClickBound)}},{key:"_handleMaterialboxClick",value:function(e){!1===this.doneAnimating||this.overlayActive&&this.doneAnimating?this.close():this.open()}},{key:"_handleWindowScroll",value:function(){this.overlayActive&&this.close()}},{key:"_handleWindowResize",value:function(){this.overlayActive&&this.close()}},{key:"_handleWindowEscape",value:function(e){27===e.keyCode&&this.doneAnimating&&this.overlayActive&&this.close()}},{key:"_makeAncestorsOverflowVisible",value:function(){this.ancestorsChanged=e();for(var t=this.placeholder[0].parentNode;null!==t&&!e(t).is(document);){var i=e(t);"visible"!==i.css("overflow")&&(i.css("overflow","visible"),void 0===this.ancestorsChanged?this.ancestorsChanged=i:this.ancestorsChanged=this.ancestorsChanged.add(i)),t=t.parentNode}}},{key:"_animateImageIn",value:function(){var e=this,i={targets:this.el,height:[this.originalHeight,this.newHeight],width:[this.originalWidth,this.newWidth],left:M.getDocumentScrollLeft()+this.windowWidth/2-this.placeholder.offset().left-this.newWidth/2,top:M.getDocumentScrollTop()+this.windowHeight/2-this.placeholder.offset().top-this.newHeight/2,duration:this.options.inDuration,easing:"easeOutQuad",complete:function(){e.doneAnimating=!0,"function"==typeof e.options.onOpenEnd&&e.options.onOpenEnd.call(e,e.el)}};this.maxWidth=this.$el.css("max-width"),this.maxHeight=this.$el.css("max-height"),"none"!==this.maxWidth&&(i.maxWidth=this.newWidth),"none"!==this.maxHeight&&(i.maxHeight=this.newHeight),t(i)}},{key:"_animateImageOut",value:function(){var e=this,i={targets:this.el,width:this.originalWidth,height:this.originalHeight,left:0,top:0,duration:this.options.outDuration,easing:"easeOutQuad",complete:function(){e.placeholder.css({height:"",width:"",position:"",top:"",left:""}),e.attrWidth&&e.$el.attr("width",e.attrWidth),e.attrHeight&&e.$el.attr("height",e.attrHeight),e.$el.removeAttr("style"),e.originInlineStyles&&e.$el.attr("style",e.originInlineStyles),e.$el.removeClass("active"),e.doneAnimating=!0,e.ancestorsChanged.length&&e.ancestorsChanged.css("overflow",""),"function"==typeof e.options.onCloseEnd&&e.options.onCloseEnd.call(e,e.el)}};t(i)}},{key:"_updateVars",value:function(){this.windowWidth=window.innerWidth,this.windowHeight=window.innerHeight,this.caption=this.el.getAttribute("data-caption")||""}},{key:"open",value:function(){var i=this;this._updateVars(),this.originalWidth=this.el.getBoundingClientRect().width,this.originalHeight=this.el.getBoundingClientRect().height,this.doneAnimating=!1,this.$el.addClass("active"),this.overlayActive=!0,"function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,this.el),this.placeholder.css({width:this.placeholder[0].getBoundingClientRect().width+"px",height:this.placeholder[0].getBoundingClientRect().height+"px",position:"relative",top:0,left:0}),this._makeAncestorsOverflowVisible(),this.$el.css({position:"absolute","z-index":1e3,"will-change":"left, top, width, height"}),this.attrWidth=this.$el.attr("width"),this.attrHeight=this.$el.attr("height"),this.attrWidth&&(this.$el.css("width",this.attrWidth+"px"),this.$el.removeAttr("width")),this.attrHeight&&(this.$el.css("width",this.attrHeight+"px"),this.$el.removeAttr("height")),this.$overlay=e('<div id="materialbox-overlay"></div>').css({opacity:0}).one("click",(function(){i.doneAnimating&&i.close()})),this.$el.before(this.$overlay);var n=this.$overlay[0].getBoundingClientRect();this.$overlay.css({width:this.windowWidth+"px",height:this.windowHeight+"px",left:-1*n.left+"px",top:-1*n.top+"px"}),t.remove(this.el),t.remove(this.$overlay[0]),t({targets:this.$overlay[0],opacity:1,duration:this.options.inDuration,easing:"easeOutQuad"}),""!==this.caption&&(this.$photocaption&&t.remove(this.$photoCaption[0]),this.$photoCaption=e('<div class="materialbox-caption"></div>'),this.$photoCaption.text(this.caption),e("body").append(this.$photoCaption),this.$photoCaption.css({display:"inline"}),t({targets:this.$photoCaption[0],opacity:1,duration:this.options.inDuration,easing:"easeOutQuad"}));var s=0,a=this.originalWidth/this.windowWidth,o=this.originalHeight/this.windowHeight;this.newWidth=0,this.newHeight=0,a>o?(s=this.originalHeight/this.originalWidth,this.newWidth=.9*this.windowWidth,this.newHeight=.9*this.windowWidth*s):(s=this.originalWidth/this.originalHeight,this.newWidth=.9*this.windowHeight*s,this.newHeight=.9*this.windowHeight),this._animateImageIn(),this._handleWindowScrollBound=this._handleWindowScroll.bind(this),this._handleWindowResizeBound=this._handleWindowResize.bind(this),this._handleWindowEscapeBound=this._handleWindowEscape.bind(this),window.addEventListener("scroll",this._handleWindowScrollBound),window.addEventListener("resize",this._handleWindowResizeBound),window.addEventListener("keyup",this._handleWindowEscapeBound)}},{key:"close",value:function(){var e=this;this._updateVars(),this.doneAnimating=!1,"function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,this.el),t.remove(this.el),t.remove(this.$overlay[0]),""!==this.caption&&t.remove(this.$photoCaption[0]),window.removeEventListener("scroll",this._handleWindowScrollBound),window.removeEventListener("resize",this._handleWindowResizeBound),window.removeEventListener("keyup",this._handleWindowEscapeBound),t({targets:this.$overlay[0],opacity:0,duration:this.options.outDuration,easing:"easeOutQuad",complete:function(){e.overlayActive=!1,e.$overlay.remove()}}),this._animateImageOut(),""!==this.caption&&t({targets:this.$photoCaption[0],opacity:0,duration:this.options.outDuration,easing:"easeOutQuad",complete:function(){e.$photoCaption.remove()}})}}],[{key:"init",value:function(e,t){return s(u.__proto__||Object.getPrototypeOf(u),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Materialbox}},{key:"defaults",get:function(){return i}}]),u}(u);M.Materialbox=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"materialbox","M_Materialbox")}(cash,M.anime),function(e){"use strict";var t={responsiveThreshold:0},i=function(i){function n(t,i){l(this,n);var s=o(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,i));return s.el.M_Parallax=s,s.options=e.extend({},n.defaults,i),s._enabled=window.innerWidth>s.options.responsiveThreshold,s.$img=s.$el.find("img").first(),s.$img.each((function(){this.complete&&e(this).trigger("load")})),s._updateParallax(),s._setupEventHandlers(),s._setupStyles(),n._parallaxes.push(s),s}return r(n,i),a(n,[{key:"destroy",value:function(){n._parallaxes.splice(n._parallaxes.indexOf(this),1),this.$img[0].style.transform="",this._removeEventHandlers(),this.$el[0].M_Parallax=void 0}},{key:"_setupEventHandlers",value:function(){this._handleImageLoadBound=this._handleImageLoad.bind(this),this.$img[0].addEventListener("load",this._handleImageLoadBound),0===n._parallaxes.length&&(n._handleScrollThrottled=M.throttle(n._handleScroll,5),window.addEventListener("scroll",n._handleScrollThrottled),n._handleWindowResizeThrottled=M.throttle(n._handleWindowResize,5),window.addEventListener("resize",n._handleWindowResizeThrottled))}},{key:"_removeEventHandlers",value:function(){this.$img[0].removeEventListener("load",this._handleImageLoadBound),0===n._parallaxes.length&&(window.removeEventListener("scroll",n._handleScrollThrottled),window.removeEventListener("resize",n._handleWindowResizeThrottled))}},{key:"_setupStyles",value:function(){this.$img[0].style.opacity=1}},{key:"_handleImageLoad",value:function(){this._updateParallax()}},{key:"_updateParallax",value:function(){var e=this.$el.height()>0?this.el.parentNode.offsetHeight:500,t=this.$img[0].offsetHeight-e,i=this.$el.offset().top+e,n=this.$el.offset().top,s=M.getDocumentScrollTop(),a=window.innerHeight,o=t*((s+a-n)/(e+a));this._enabled?i>s&&n<s+a&&(this.$img[0].style.transform="translate3D(-50%, "+o+"px, 0)"):this.$img[0].style.transform=""}}],[{key:"init",value:function(e,t){return s(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Parallax}},{key:"_handleScroll",value:function(){for(var e=0;e<n._parallaxes.length;e++){var t=n._parallaxes[e];t._updateParallax.call(t)}}},{key:"_handleWindowResize",value:function(){for(var e=0;e<n._parallaxes.length;e++){var t=n._parallaxes[e];t._enabled=window.innerWidth>t.options.responsiveThreshold}}},{key:"defaults",get:function(){return t}}]),n}(u);i._parallaxes=[],M.Parallax=i,M.jQueryLoaded&&M.initializeJqueryWrapper(i,"parallax","M_Parallax")}(cash),function(e,t){"use strict";var i={duration:300,onShow:null,swipeable:!1,responsiveThreshold:1/0},n=function(n){function u(t,i){l(this,u);var n=o(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,u,t,i));return n.el.M_Tabs=n,n.options=e.extend({},u.defaults,i),n.$tabLinks=n.$el.children("li.tab").children("a"),n.index=0,n._setupActiveTabLink(),n.options.swipeable?n._setupSwipeableTabs():n._setupNormalTabs(),n._setTabsAndTabWidth(),n._createIndicator(),n._setupEventHandlers(),n}return r(u,n),a(u,[{key:"destroy",value:function(){this._removeEventHandlers(),this._indicator.parentNode.removeChild(this._indicator),this.options.swipeable?this._teardownSwipeableTabs():this._teardownNormalTabs(),this.$el[0].M_Tabs=void 0}},{key:"_setupEventHandlers",value:function(){this._handleWindowResizeBound=this._handleWindowResize.bind(this),window.addEventListener("resize",this._handleWindowResizeBound),this._handleTabClickBound=this._handleTabClick.bind(this),this.el.addEventListener("click",this._handleTabClickBound)}},{key:"_removeEventHandlers",value:function(){window.removeEventListener("resize",this._handleWindowResizeBound),this.el.removeEventListener("click",this._handleTabClickBound)}},{key:"_handleWindowResize",value:function(){this._setTabsAndTabWidth(),0!==this.tabWidth&&0!==this.tabsWidth&&(this._indicator.style.left=this._calcLeftPos(this.$activeTabLink)+"px",this._indicator.style.right=this._calcRightPos(this.$activeTabLink)+"px")}},{key:"_handleTabClick",value:function(t){var i=this,n=e(t.target).closest("li.tab"),s=e(t.target).closest("a");if(s.length&&s.parent().hasClass("tab"))if(n.hasClass("disabled"))t.preventDefault();else if(!s.attr("target")){this.$activeTabLink.removeClass("active");var a=this.$content;this.$activeTabLink=s,this.$content=e(M.escapeHash(s[0].hash)),this.$tabLinks=this.$el.children("li.tab").children("a"),this.$activeTabLink.addClass("active");var o=this.index;this.index=Math.max(this.$tabLinks.index(s),0),this.options.swipeable?this._tabsCarousel&&this._tabsCarousel.set(this.index,(function(){"function"==typeof i.options.onShow&&i.options.onShow.call(i,i.$content[0])})):this.$content.length&&(this.$content[0].style.display="block",this.$content.addClass("active"),"function"==typeof this.options.onShow&&this.options.onShow.call(this,this.$content[0]),a.length&&!a.is(this.$content)&&(a[0].style.display="none",a.removeClass("active"))),this._setTabsAndTabWidth(),this._animateIndicator(o),t.preventDefault()}}},{key:"_createIndicator",value:function(){var e=this,t=document.createElement("li");t.classList.add("indicator"),this.el.appendChild(t),this._indicator=t,setTimeout((function(){e._indicator.style.left=e._calcLeftPos(e.$activeTabLink)+"px",e._indicator.style.right=e._calcRightPos(e.$activeTabLink)+"px"}),0)}},{key:"_setupActiveTabLink",value:function(){this.$activeTabLink=e(this.$tabLinks.filter('[href="'+location.hash+'"]')),0===this.$activeTabLink.length&&(this.$activeTabLink=this.$el.children("li.tab").children("a.active").first()),0===this.$activeTabLink.length&&(this.$activeTabLink=this.$el.children("li.tab").children("a").first()),this.$tabLinks.removeClass("active"),this.$activeTabLink[0].classList.add("active"),this.index=Math.max(this.$tabLinks.index(this.$activeTabLink),0),this.$activeTabLink.length&&(this.$content=e(M.escapeHash(this.$activeTabLink[0].hash)),this.$content.addClass("active"))}},{key:"_setupSwipeableTabs",value:function(){var t=this;window.innerWidth>this.options.responsiveThreshold&&(this.options.swipeable=!1);var i=e();this.$tabLinks.each((function(t){var n=e(M.escapeHash(t.hash));n.addClass("carousel-item"),i=i.add(n)}));var n=e('<div class="tabs-content carousel carousel-slider"></div>');i.first().before(n),n.append(i),i[0].style.display="";var s=this.$activeTabLink.closest(".tab").index();this._tabsCarousel=M.Carousel.init(n[0],{fullWidth:!0,noWrap:!0,onCycleTo:function(i){var n=t.index;t.index=e(i).index(),t.$activeTabLink.removeClass("active"),t.$activeTabLink=t.$tabLinks.eq(t.index),t.$activeTabLink.addClass("active"),t._animateIndicator(n),"function"==typeof t.options.onShow&&t.options.onShow.call(t,t.$content[0])}}),this._tabsCarousel.set(s)}},{key:"_teardownSwipeableTabs",value:function(){var e=this._tabsCarousel.$el;this._tabsCarousel.destroy(),e.after(e.children()),e.remove()}},{key:"_setupNormalTabs",value:function(){this.$tabLinks.not(this.$activeTabLink).each((function(t){if(t.hash){var i=e(M.escapeHash(t.hash));i.length&&(i[0].style.display="none")}}))}},{key:"_teardownNormalTabs",value:function(){this.$tabLinks.each((function(t){if(t.hash){var i=e(M.escapeHash(t.hash));i.length&&(i[0].style.display="")}}))}},{key:"_setTabsAndTabWidth",value:function(){this.tabsWidth=this.$el.width(),this.tabWidth=Math.max(this.tabsWidth,this.el.scrollWidth)/this.$tabLinks.length}},{key:"_calcRightPos",value:function(e){return Math.ceil(this.tabsWidth-e.position().left-e[0].getBoundingClientRect().width)}},{key:"_calcLeftPos",value:function(e){return Math.floor(e.position().left)}},{key:"updateTabIndicator",value:function(){this._setTabsAndTabWidth(),this._animateIndicator(this.index)}},{key:"_animateIndicator",value:function(e){var i=0,n=0;this.index-e>=0?i=90:n=90;var s={targets:this._indicator,left:{value:this._calcLeftPos(this.$activeTabLink),delay:i},right:{value:this._calcRightPos(this.$activeTabLink),delay:n},duration:this.options.duration,easing:"easeOutQuad"};t.remove(this._indicator),t(s)}},{key:"select",value:function(e){var t=this.$tabLinks.filter('[href="#'+e+'"]');t.length&&t.trigger("click")}}],[{key:"init",value:function(e,t){return s(u.__proto__||Object.getPrototypeOf(u),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Tabs}},{key:"defaults",get:function(){return i}}]),u}(u);M.Tabs=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"tabs","M_Tabs")}(cash,M.anime),function(e,t){"use strict";var i={exitDelay:200,enterDelay:0,html:null,margin:5,inDuration:250,outDuration:200,position:"bottom",transitionMovement:10},n=function(n){function u(t,i){l(this,u);var n=o(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,u,t,i));return n.el.M_Tooltip=n,n.options=e.extend({},u.defaults,i),n.isOpen=!1,n.isHovered=!1,n.isFocused=!1,n._appendTooltipEl(),n._setupEventHandlers(),n}return r(u,n),a(u,[{key:"destroy",value:function(){e(this.tooltipEl).remove(),this._removeEventHandlers(),this.el.M_Tooltip=void 0}},{key:"_appendTooltipEl",value:function(){var e=document.createElement("div");e.classList.add("material-tooltip"),this.tooltipEl=e;var t=document.createElement("div");t.classList.add("tooltip-content"),t.innerHTML=this.options.html,e.appendChild(t),document.body.appendChild(e)}},{key:"_updateTooltipContent",value:function(){this.tooltipEl.querySelector(".tooltip-content").innerHTML=this.options.html}},{key:"_setupEventHandlers",value:function(){this._handleMouseEnterBound=this._handleMouseEnter.bind(this),this._handleMouseLeaveBound=this._handleMouseLeave.bind(this),this._handleFocusBound=this._handleFocus.bind(this),this._handleBlurBound=this._handleBlur.bind(this),this.el.addEventListener("mouseenter",this._handleMouseEnterBound),this.el.addEventListener("mouseleave",this._handleMouseLeaveBound),this.el.addEventListener("focus",this._handleFocusBound,!0),this.el.addEventListener("blur",this._handleBlurBound,!0)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("mouseenter",this._handleMouseEnterBound),this.el.removeEventListener("mouseleave",this._handleMouseLeaveBound),this.el.removeEventListener("focus",this._handleFocusBound,!0),this.el.removeEventListener("blur",this._handleBlurBound,!0)}},{key:"open",value:function(t){this.isOpen||(t=void 0===t||void 0,this.isOpen=!0,this.options=e.extend({},this.options,this._getAttributeOptions()),this._updateTooltipContent(),this._setEnterDelayTimeout(t))}},{key:"close",value:function(){this.isOpen&&(this.isHovered=!1,this.isFocused=!1,this.isOpen=!1,this._setExitDelayTimeout())}},{key:"_setExitDelayTimeout",value:function(){var e=this;clearTimeout(this._exitDelayTimeout),this._exitDelayTimeout=setTimeout((function(){e.isHovered||e.isFocused||e._animateOut()}),this.options.exitDelay)}},{key:"_setEnterDelayTimeout",value:function(e){var t=this;clearTimeout(this._enterDelayTimeout),this._enterDelayTimeout=setTimeout((function(){(t.isHovered||t.isFocused||e)&&t._animateIn()}),this.options.enterDelay)}},{key:"_positionTooltip",value:function(){var t,i=this.el,n=this.tooltipEl,s=i.offsetHeight,a=i.offsetWidth,o=n.offsetHeight,r=n.offsetWidth,l=this.options.margin,u=void 0,d=void 0;this.xMovement=0,this.yMovement=0,u=i.getBoundingClientRect().top+M.getDocumentScrollTop(),d=i.getBoundingClientRect().left+M.getDocumentScrollLeft(),"top"===this.options.position?(u+=-o-l,d+=a/2-r/2,this.yMovement=-this.options.transitionMovement):"right"===this.options.position?(u+=s/2-o/2,d+=a+l,this.xMovement=this.options.transitionMovement):"left"===this.options.position?(u+=s/2-o/2,d+=-r-l,this.xMovement=-this.options.transitionMovement):(u+=s+l,d+=a/2-r/2,this.yMovement=this.options.transitionMovement),t=this._repositionWithinScreen(d,u,r,o),e(n).css({top:t.y+"px",left:t.x+"px"})}},{key:"_repositionWithinScreen",value:function(e,t,i,n){var s=M.getDocumentScrollLeft(),a=M.getDocumentScrollTop(),o=e-s,r=t-a,l={left:o,top:r,width:i,height:n},u=this.options.margin+this.options.transitionMovement,d=M.checkWithinContainer(document.body,l,u);return d.left?o=u:d.right&&(o-=o+i-window.innerWidth),d.top?r=u:d.bottom&&(r-=r+n-window.innerHeight),{x:o+s,y:r+a}}},{key:"_animateIn",value:function(){this._positionTooltip(),this.tooltipEl.style.visibility="visible",t.remove(this.tooltipEl),t({targets:this.tooltipEl,opacity:1,translateX:this.xMovement,translateY:this.yMovement,duration:this.options.inDuration,easing:"easeOutCubic"})}},{key:"_animateOut",value:function(){t.remove(this.tooltipEl),t({targets:this.tooltipEl,opacity:0,translateX:0,translateY:0,duration:this.options.outDuration,easing:"easeOutCubic"})}},{key:"_handleMouseEnter",value:function(){this.isHovered=!0,this.isFocused=!1,this.open(!1)}},{key:"_handleMouseLeave",value:function(){this.isHovered=!1,this.isFocused=!1,this.close()}},{key:"_handleFocus",value:function(){M.tabPressed&&(this.isFocused=!0,this.open(!1))}},{key:"_handleBlur",value:function(){this.isFocused=!1,this.close()}},{key:"_getAttributeOptions",value:function(){var e={},t=this.el.getAttribute("data-tooltip"),i=this.el.getAttribute("data-position");return t&&(e.html=t),i&&(e.position=i),e}}],[{key:"init",value:function(e,t){return s(u.__proto__||Object.getPrototypeOf(u),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Tooltip}},{key:"defaults",get:function(){return i}}]),u}(u);M.Tooltip=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"tooltip","M_Tooltip")}(cash,M.anime),function(e){"use strict";var t=t||{},i=document.querySelectorAll.bind(document);function n(e){var t="";for(var i in e)e.hasOwnProperty(i)&&(t+=i+":"+e[i]+";");return t}var s={duration:750,show:function(e,t){if(2===e.button)return!1;var i=t||this,a=document.createElement("div");a.className="waves-ripple",i.appendChild(a);var o,r,l,u,d,c=(u={top:0,left:0},d=(o=i)&&o.ownerDocument,r=d.documentElement,void 0!==o.getBoundingClientRect&&(u=o.getBoundingClientRect()),l=function(e){return null!==(t=e)&&t===t.window?e:9===e.nodeType&&e.defaultView;var t}(d),{top:u.top+l.pageYOffset-r.clientTop,left:u.left+l.pageXOffset-r.clientLeft}),h=e.pageY-c.top,p=e.pageX-c.left,v="scale("+i.clientWidth/100*10+")";"touches"in e&&(h=e.touches[0].pageY-c.top,p=e.touches[0].pageX-c.left),a.setAttribute("data-hold",Date.now()),a.setAttribute("data-scale",v),a.setAttribute("data-x",p),a.setAttribute("data-y",h);var f={top:h+"px",left:p+"px"};a.className=a.className+" waves-notransition",a.setAttribute("style",n(f)),a.className=a.className.replace("waves-notransition",""),f["-webkit-transform"]=v,f["-moz-transform"]=v,f["-ms-transform"]=v,f["-o-transform"]=v,f.transform=v,f.opacity="1",f["-webkit-transition-duration"]=s.duration+"ms",f["-moz-transition-duration"]=s.duration+"ms",f["-o-transition-duration"]=s.duration+"ms",f["transition-duration"]=s.duration+"ms",f["-webkit-transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",f["-moz-transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",f["-o-transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",f["transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",a.setAttribute("style",n(f))},hide:function(e){a.touchup(e);var t=this,i=(t.clientWidth,null),o=t.getElementsByClassName("waves-ripple");if(!(o.length>0))return!1;var r=(i=o[o.length-1]).getAttribute("data-x"),l=i.getAttribute("data-y"),u=i.getAttribute("data-scale"),d=350-(Date.now()-Number(i.getAttribute("data-hold")));d<0&&(d=0),setTimeout((function(){var e={top:l+"px",left:r+"px",opacity:"0","-webkit-transition-duration":s.duration+"ms","-moz-transition-duration":s.duration+"ms","-o-transition-duration":s.duration+"ms","transition-duration":s.duration+"ms","-webkit-transform":u,"-moz-transform":u,"-ms-transform":u,"-o-transform":u,transform:u};i.setAttribute("style",n(e)),setTimeout((function(){try{t.removeChild(i)}catch(e){return!1}}),s.duration)}),d)},wrapInput:function(e){for(var t=0;t<e.length;t++){var i=e[t];if("input"===i.tagName.toLowerCase()){var n=i.parentNode;if("i"===n.tagName.toLowerCase()&&-1!==n.className.indexOf("waves-effect"))continue;var s=document.createElement("i");s.className=i.className+" waves-input-wrapper";var a=i.getAttribute("style");a||(a=""),s.setAttribute("style",a),i.className="waves-button-input",i.removeAttribute("style"),n.replaceChild(s,i),s.appendChild(i)}}}},a={touches:0,allowEvent:function(e){var t=!0;return"touchstart"===e.type?a.touches+=1:"touchend"===e.type||"touchcancel"===e.type?setTimeout((function(){a.touches>0&&(a.touches-=1)}),500):"mousedown"===e.type&&a.touches>0&&(t=!1),t},touchup:function(e){a.allowEvent(e)}};function o(t){var i=function(e){if(!1===a.allowEvent(e))return null;for(var t=null,i=e.target||e.srcElement;null!==i.parentNode;){if(!(i instanceof SVGElement)&&-1!==i.className.indexOf("waves-effect")){t=i;break}i=i.parentNode}return t}(t);null!==i&&(s.show(t,i),"ontouchstart"in e&&(i.addEventListener("touchend",s.hide,!1),i.addEventListener("touchcancel",s.hide,!1)),i.addEventListener("mouseup",s.hide,!1),i.addEventListener("mouseleave",s.hide,!1),i.addEventListener("dragend",s.hide,!1))}t.displayEffect=function(t){"duration"in(t=t||{})&&(s.duration=t.duration),s.wrapInput(i(".waves-effect")),"ontouchstart"in e&&document.body.addEventListener("touchstart",o,!1),document.body.addEventListener("mousedown",o,!1)},t.attach=function(t){"input"===t.tagName.toLowerCase()&&(s.wrapInput([t]),t=t.parentNode),"ontouchstart"in e&&t.addEventListener("touchstart",o,!1),t.addEventListener("mousedown",o,!1)},e.Waves=t,document.addEventListener("DOMContentLoaded",(function(){t.displayEffect()}),!1)}(window),function(e,t){"use strict";var i={html:"",displayLength:4e3,inDuration:300,outDuration:375,classes:"",completeCallback:null,activationPercent:.8},n=function(){function n(t){l(this,n),this.options=e.extend({},n.defaults,t),this.message=this.options.html,this.panning=!1,this.timeRemaining=this.options.displayLength,0===n._toasts.length&&n._createContainer(),n._toasts.push(this);var i=this._createToast();i.M_Toast=this,this.el=i,this.$el=e(i),this._animateIn(),this._setTimer()}return a(n,[{key:"_createToast",value:function(){var t=document.createElement("div");return t.classList.add("toast"),this.options.classes.length&&e(t).addClass(this.options.classes),("object"==typeof HTMLElement?this.message instanceof HTMLElement:this.message&&"object"==typeof this.message&&null!==this.message&&1===this.message.nodeType&&"string"==typeof this.message.nodeName)?t.appendChild(this.message):this.message.jquery?e(t).append(this.message[0]):t.innerHTML=this.message,n._container.appendChild(t),t}},{key:"_animateIn",value:function(){t({targets:this.el,top:0,opacity:1,duration:this.options.inDuration,easing:"easeOutCubic"})}},{key:"_setTimer",value:function(){var e=this;this.timeRemaining!==1/0&&(this.counterInterval=setInterval((function(){e.panning||(e.timeRemaining-=20),e.timeRemaining<=0&&e.dismiss()}),20))}},{key:"dismiss",value:function(){var e=this;window.clearInterval(this.counterInterval);var i=this.el.offsetWidth*this.options.activationPercent;this.wasSwiped&&(this.el.style.transition="transform .05s, opacity .05s",this.el.style.transform="translateX("+i+"px)",this.el.style.opacity=0),t({targets:this.el,opacity:0,marginTop:-40,duration:this.options.outDuration,easing:"easeOutExpo",complete:function(){"function"==typeof e.options.completeCallback&&e.options.completeCallback(),e.$el.remove(),n._toasts.splice(n._toasts.indexOf(e),1),0===n._toasts.length&&n._removeContainer()}})}}],[{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Toast}},{key:"_createContainer",value:function(){var e=document.createElement("div");e.setAttribute("id","toast-container"),e.addEventListener("touchstart",n._onDragStart),e.addEventListener("touchmove",n._onDragMove),e.addEventListener("touchend",n._onDragEnd),e.addEventListener("mousedown",n._onDragStart),document.addEventListener("mousemove",n._onDragMove),document.addEventListener("mouseup",n._onDragEnd),document.body.appendChild(e),n._container=e}},{key:"_removeContainer",value:function(){document.removeEventListener("mousemove",n._onDragMove),document.removeEventListener("mouseup",n._onDragEnd),e(n._container).remove(),n._container=null}},{key:"_onDragStart",value:function(t){if(t.target&&e(t.target).closest(".toast").length){var i=e(t.target).closest(".toast")[0].M_Toast;i.panning=!0,n._draggedToast=i,i.el.classList.add("panning"),i.el.style.transition="",i.startingXPos=n._xPos(t),i.time=Date.now(),i.xPos=n._xPos(t)}}},{key:"_onDragMove",value:function(e){if(n._draggedToast){e.preventDefault();var t=n._draggedToast;t.deltaX=Math.abs(t.xPos-n._xPos(e)),t.xPos=n._xPos(e),t.velocityX=t.deltaX/(Date.now()-t.time),t.time=Date.now();var i=t.xPos-t.startingXPos,s=t.el.offsetWidth*t.options.activationPercent;t.el.style.transform="translateX("+i+"px)",t.el.style.opacity=1-Math.abs(i/s)}}},{key:"_onDragEnd",value:function(){if(n._draggedToast){var e=n._draggedToast;e.panning=!1,e.el.classList.remove("panning");var t=e.xPos-e.startingXPos,i=e.el.offsetWidth*e.options.activationPercent;Math.abs(t)>i||e.velocityX>1?(e.wasSwiped=!0,e.dismiss()):(e.el.style.transition="transform .2s, opacity .2s",e.el.style.transform="",e.el.style.opacity=""),n._draggedToast=null}}},{key:"_xPos",value:function(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}},{key:"dismissAll",value:function(){for(var e in n._toasts)n._toasts[e].dismiss()}},{key:"defaults",get:function(){return i}}]),n}();n._toasts=[],n._container=null,n._draggedToast=null,M.Toast=n,M.toast=function(e){return new n(e)}}(cash,M.anime),function(e,t){"use strict";var i={edge:"left",draggable:!0,inDuration:250,outDuration:200,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null,preventScrolling:!0},n=function(n){function u(t,i){l(this,u);var n=o(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,u,t,i));return n.el.M_Sidenav=n,n.id=n.$el.attr("id"),n.options=e.extend({},u.defaults,i),n.isOpen=!1,n.isFixed=n.el.classList.contains("sidenav-fixed"),n.isDragged=!1,n.lastWindowWidth=window.innerWidth,n.lastWindowHeight=window.innerHeight,n._createOverlay(),n._createDragTarget(),n._setupEventHandlers(),n._setupClasses(),n._setupFixed(),u._sidenavs.push(n),n}return r(u,n),a(u,[{key:"destroy",value:function(){this._removeEventHandlers(),this._enableBodyScrolling(),this._overlay.parentNode.removeChild(this._overlay),this.dragTarget.parentNode.removeChild(this.dragTarget),this.el.M_Sidenav=void 0,this.el.style.transform="";var e=u._sidenavs.indexOf(this);e>=0&&u._sidenavs.splice(e,1)}},{key:"_createOverlay",value:function(){var e=document.createElement("div");this._closeBound=this.close.bind(this),e.classList.add("sidenav-overlay"),e.addEventListener("click",this._closeBound),document.body.appendChild(e),this._overlay=e}},{key:"_setupEventHandlers",value:function(){0===u._sidenavs.length&&document.body.addEventListener("click",this._handleTriggerClick),this._handleDragTargetDragBound=this._handleDragTargetDrag.bind(this),this._handleDragTargetReleaseBound=this._handleDragTargetRelease.bind(this),this._handleCloseDragBound=this._handleCloseDrag.bind(this),this._handleCloseReleaseBound=this._handleCloseRelease.bind(this),this._handleCloseTriggerClickBound=this._handleCloseTriggerClick.bind(this),this.dragTarget.addEventListener("touchmove",this._handleDragTargetDragBound),this.dragTarget.addEventListener("touchend",this._handleDragTargetReleaseBound),this._overlay.addEventListener("touchmove",this._handleCloseDragBound),this._overlay.addEventListener("touchend",this._handleCloseReleaseBound),this.el.addEventListener("touchmove",this._handleCloseDragBound),this.el.addEventListener("touchend",this._handleCloseReleaseBound),this.el.addEventListener("click",this._handleCloseTriggerClickBound),this.isFixed&&(this._handleWindowResizeBound=this._handleWindowResize.bind(this),window.addEventListener("resize",this._handleWindowResizeBound))}},{key:"_removeEventHandlers",value:function(){1===u._sidenavs.length&&document.body.removeEventListener("click",this._handleTriggerClick),this.dragTarget.removeEventListener("touchmove",this._handleDragTargetDragBound),this.dragTarget.removeEventListener("touchend",this._handleDragTargetReleaseBound),this._overlay.removeEventListener("touchmove",this._handleCloseDragBound),this._overlay.removeEventListener("touchend",this._handleCloseReleaseBound),this.el.removeEventListener("touchmove",this._handleCloseDragBound),this.el.removeEventListener("touchend",this._handleCloseReleaseBound),this.el.removeEventListener("click",this._handleCloseTriggerClickBound),this.isFixed&&window.removeEventListener("resize",this._handleWindowResizeBound)}},{key:"_handleTriggerClick",value:function(t){var i=e(t.target).closest(".sidenav-trigger");if(t.target&&i.length){var n=M.getIdFromTrigger(i[0]),s=document.getElementById(n).M_Sidenav;s&&s.open(i),t.preventDefault()}}},{key:"_startDrag",value:function(e){var i=e.targetTouches[0].clientX;this.isDragged=!0,this._startingXpos=i,this._xPos=this._startingXpos,this._time=Date.now(),this._width=this.el.getBoundingClientRect().width,this._overlay.style.display="block",this._initialScrollTop=this.isOpen?this.el.scrollTop:M.getDocumentScrollTop(),this._verticallyScrolling=!1,t.remove(this.el),t.remove(this._overlay)}},{key:"_dragMoveUpdate",value:function(e){var t=e.targetTouches[0].clientX,i=this.isOpen?this.el.scrollTop:M.getDocumentScrollTop();this.deltaX=Math.abs(this._xPos-t),this._xPos=t,this.velocityX=this.deltaX/(Date.now()-this._time),this._time=Date.now(),this._initialScrollTop!==i&&(this._verticallyScrolling=!0)}},{key:"_handleDragTargetDrag",value:function(e){if(this.options.draggable&&!this._isCurrentlyFixed()&&!this._verticallyScrolling){this.isDragged||this._startDrag(e),this._dragMoveUpdate(e);var t=this._xPos-this._startingXpos,i=t>0?"right":"left";t=Math.min(this._width,Math.abs(t)),this.options.edge===i&&(t=0);var n=t,s="translateX(-100%)";"right"===this.options.edge&&(s="translateX(100%)",n=-n),this.percentOpen=Math.min(1,t/this._width),this.el.style.transform=s+" translateX("+n+"px)",this._overlay.style.opacity=this.percentOpen}}},{key:"_handleDragTargetRelease",value:function(){this.isDragged&&(this.percentOpen>.2?this.open():this._animateOut(),this.isDragged=!1,this._verticallyScrolling=!1)}},{key:"_handleCloseDrag",value:function(e){if(this.isOpen){if(!this.options.draggable||this._isCurrentlyFixed()||this._verticallyScrolling)return;this.isDragged||this._startDrag(e),this._dragMoveUpdate(e);var t=this._xPos-this._startingXpos,i=t>0?"right":"left";t=Math.min(this._width,Math.abs(t)),this.options.edge!==i&&(t=0);var n=-t;"right"===this.options.edge&&(n=-n),this.percentOpen=Math.min(1,1-t/this._width),this.el.style.transform="translateX("+n+"px)",this._overlay.style.opacity=this.percentOpen}}},{key:"_handleCloseRelease",value:function(){this.isOpen&&this.isDragged&&(this.percentOpen>.8?this._animateIn():this.close(),this.isDragged=!1,this._verticallyScrolling=!1)}},{key:"_handleCloseTriggerClick",value:function(t){e(t.target).closest(".sidenav-close").length&&!this._isCurrentlyFixed()&&this.close()}},{key:"_handleWindowResize",value:function(){this.lastWindowWidth!==window.innerWidth&&(window.innerWidth>992?this.open():this.close()),this.lastWindowWidth=window.innerWidth,this.lastWindowHeight=window.innerHeight}},{key:"_setupClasses",value:function(){"right"===this.options.edge&&(this.el.classList.add("right-aligned"),this.dragTarget.classList.add("right-aligned"))}},{key:"_removeClasses",value:function(){this.el.classList.remove("right-aligned"),this.dragTarget.classList.remove("right-aligned")}},{key:"_setupFixed",value:function(){this._isCurrentlyFixed()&&this.open()}},{key:"_isCurrentlyFixed",value:function(){return this.isFixed&&window.innerWidth>992}},{key:"_createDragTarget",value:function(){var e=document.createElement("div");e.classList.add("drag-target"),document.body.appendChild(e),this.dragTarget=e}},{key:"_preventBodyScrolling",value:function(){document.body.style.overflow="hidden"}},{key:"_enableBodyScrolling",value:function(){document.body.style.overflow=""}},{key:"open",value:function(){!0!==this.isOpen&&(this.isOpen=!0,"function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,this.el),this._isCurrentlyFixed()?(t.remove(this.el),t({targets:this.el,translateX:0,duration:0,easing:"easeOutQuad"}),this._enableBodyScrolling(),this._overlay.style.display="none"):(this.options.preventScrolling&&this._preventBodyScrolling(),this.isDragged&&1==this.percentOpen||this._animateIn()))}},{key:"close",value:function(){if(!1!==this.isOpen)if(this.isOpen=!1,"function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,this.el),this._isCurrentlyFixed()){var e="left"===this.options.edge?"-105%":"105%";this.el.style.transform="translateX("+e+")"}else this._enableBodyScrolling(),this.isDragged&&0==this.percentOpen?this._overlay.style.display="none":this._animateOut()}},{key:"_animateIn",value:function(){this._animateSidenavIn(),this._animateOverlayIn()}},{key:"_animateSidenavIn",value:function(){var e=this,i="left"===this.options.edge?-1:1;this.isDragged&&(i="left"===this.options.edge?i+this.percentOpen:i-this.percentOpen),t.remove(this.el),t({targets:this.el,translateX:[100*i+"%",0],duration:this.options.inDuration,easing:"easeOutQuad",complete:function(){"function"==typeof e.options.onOpenEnd&&e.options.onOpenEnd.call(e,e.el)}})}},{key:"_animateOverlayIn",value:function(){var i=0;this.isDragged?i=this.percentOpen:e(this._overlay).css({display:"block"}),t.remove(this._overlay),t({targets:this._overlay,opacity:[i,1],duration:this.options.inDuration,easing:"easeOutQuad"})}},{key:"_animateOut",value:function(){this._animateSidenavOut(),this._animateOverlayOut()}},{key:"_animateSidenavOut",value:function(){var e=this,i="left"===this.options.edge?-1:1,n=0;this.isDragged&&(n="left"===this.options.edge?i+this.percentOpen:i-this.percentOpen),t.remove(this.el),t({targets:this.el,translateX:[100*n+"%",105*i+"%"],duration:this.options.outDuration,easing:"easeOutQuad",complete:function(){"function"==typeof e.options.onCloseEnd&&e.options.onCloseEnd.call(e,e.el)}})}},{key:"_animateOverlayOut",value:function(){var i=this;t.remove(this._overlay),t({targets:this._overlay,opacity:0,duration:this.options.outDuration,easing:"easeOutQuad",complete:function(){e(i._overlay).css("display","none")}})}}],[{key:"init",value:function(e,t){return s(u.__proto__||Object.getPrototypeOf(u),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Sidenav}},{key:"defaults",get:function(){return i}}]),u}(u);n._sidenavs=[],M.Sidenav=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"sidenav","M_Sidenav")}(cash,M.anime),function(e,t){"use strict";var i={throttle:100,scrollOffset:200,activeClass:"active",getActiveElement:function(e){return'a[href="#'+e+'"]'}},n=function(n){function u(t,i){l(this,u);var n=o(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,u,t,i));return n.el.M_ScrollSpy=n,n.options=e.extend({},u.defaults,i),u._elements.push(n),u._count++,u._increment++,n.tickId=-1,n.id=u._increment,n._setupEventHandlers(),n._handleWindowScroll(),n}return r(u,n),a(u,[{key:"destroy",value:function(){u._elements.splice(u._elements.indexOf(this),1),u._elementsInView.splice(u._elementsInView.indexOf(this),1),u._visibleElements.splice(u._visibleElements.indexOf(this.$el),1),u._count--,this._removeEventHandlers(),e(this.options.getActiveElement(this.$el.attr("id"))).removeClass(this.options.activeClass),this.el.M_ScrollSpy=void 0}},{key:"_setupEventHandlers",value:function(){var e=M.throttle(this._handleWindowScroll,200);this._handleThrottledResizeBound=e.bind(this),this._handleWindowScrollBound=this._handleWindowScroll.bind(this),1===u._count&&(window.addEventListener("scroll",this._handleWindowScrollBound),window.addEventListener("resize",this._handleThrottledResizeBound),document.body.addEventListener("click",this._handleTriggerClick))}},{key:"_removeEventHandlers",value:function(){0===u._count&&(window.removeEventListener("scroll",this._handleWindowScrollBound),window.removeEventListener("resize",this._handleThrottledResizeBound),document.body.removeEventListener("click",this._handleTriggerClick))}},{key:"_handleTriggerClick",value:function(i){for(var n=e(i.target),s=u._elements.length-1;s>=0;s--){var a=u._elements[s];if(n.is('a[href="#'+a.$el.attr("id")+'"]')){i.preventDefault();var o=a.$el.offset().top+1;t({targets:[document.documentElement,document.body],scrollTop:o-a.options.scrollOffset,duration:400,easing:"easeOutCubic"});break}}}},{key:"_handleWindowScroll",value:function(){u._ticks++;for(var e=M.getDocumentScrollTop(),t=M.getDocumentScrollLeft(),i=t+window.innerWidth,n=e+window.innerHeight,s=u._findElements(e,i,n,t),a=0;a<s.length;a++){var o=s[a];o.tickId<0&&o._enter(),o.tickId=u._ticks}for(var r=0;r<u._elementsInView.length;r++){var l=u._elementsInView[r],d=l.tickId;d>=0&&d!==u._ticks&&(l._exit(),l.tickId=-1)}u._elementsInView=s}},{key:"_enter",value:function(){u._visibleElements=u._visibleElements.filter((function(e){return 0!=e.height()})),u._visibleElements[0]?(e(this.options.getActiveElement(u._visibleElements[0].attr("id"))).removeClass(this.options.activeClass),u._visibleElements[0][0].M_ScrollSpy&&this.id<u._visibleElements[0][0].M_ScrollSpy.id?u._visibleElements.unshift(this.$el):u._visibleElements.push(this.$el)):u._visibleElements.push(this.$el),e(this.options.getActiveElement(u._visibleElements[0].attr("id"))).addClass(this.options.activeClass)}},{key:"_exit",value:function(){var t=this;u._visibleElements=u._visibleElements.filter((function(e){return 0!=e.height()})),u._visibleElements[0]&&(e(this.options.getActiveElement(u._visibleElements[0].attr("id"))).removeClass(this.options.activeClass),u._visibleElements=u._visibleElements.filter((function(e){return e.attr("id")!=t.$el.attr("id")})),u._visibleElements[0]&&e(this.options.getActiveElement(u._visibleElements[0].attr("id"))).addClass(this.options.activeClass))}}],[{key:"init",value:function(e,t){return s(u.__proto__||Object.getPrototypeOf(u),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_ScrollSpy}},{key:"_findElements",value:function(e,t,i,n){for(var s=[],a=0;a<u._elements.length;a++){var o=u._elements[a],r=e+o.options.scrollOffset||200;if(o.$el.height()>0){var l=o.$el.offset().top,d=o.$el.offset().left,c=d+o.$el.width(),h=l+o.$el.height();!(d>t||c<n||l>i||h<r)&&s.push(o)}}return s}},{key:"defaults",get:function(){return i}}]),u}(u);n._elements=[],n._elementsInView=[],n._visibleElements=[],n._count=0,n._increment=0,n._ticks=0,M.ScrollSpy=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"scrollSpy","M_ScrollSpy")}(cash,M.anime),function(e){"use strict";var t={data:{},limit:1/0,onAutocomplete:null,minLength:1,sortFunction:function(e,t,i){return e.indexOf(i)-t.indexOf(i)}},i=function(i){function n(t,i){l(this,n);var s=o(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,i));return s.el.M_Autocomplete=s,s.options=e.extend({},n.defaults,i),s.isOpen=!1,s.count=0,s.activeIndex=-1,s.oldVal,s.$inputField=s.$el.closest(".input-field"),s.$active=e(),s._mousedown=!1,s._setupDropdown(),s._setupEventHandlers(),s}return r(n,i),a(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this._removeDropdown(),this.el.M_Autocomplete=void 0}},{key:"_setupEventHandlers",value:function(){this._handleInputBlurBound=this._handleInputBlur.bind(this),this._handleInputKeyupAndFocusBound=this._handleInputKeyupAndFocus.bind(this),this._handleInputKeydownBound=this._handleInputKeydown.bind(this),this._handleInputClickBound=this._handleInputClick.bind(this),this._handleContainerMousedownAndTouchstartBound=this._handleContainerMousedownAndTouchstart.bind(this),this._handleContainerMouseupAndTouchendBound=this._handleContainerMouseupAndTouchend.bind(this),this.el.addEventListener("blur",this._handleInputBlurBound),this.el.addEventListener("keyup",this._handleInputKeyupAndFocusBound),this.el.addEventListener("focus",this._handleInputKeyupAndFocusBound),this.el.addEventListener("keydown",this._handleInputKeydownBound),this.el.addEventListener("click",this._handleInputClickBound),this.container.addEventListener("mousedown",this._handleContainerMousedownAndTouchstartBound),this.container.addEventListener("mouseup",this._handleContainerMouseupAndTouchendBound),void 0!==window.ontouchstart&&(this.container.addEventListener("touchstart",this._handleContainerMousedownAndTouchstartBound),this.container.addEventListener("touchend",this._handleContainerMouseupAndTouchendBound))}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("blur",this._handleInputBlurBound),this.el.removeEventListener("keyup",this._handleInputKeyupAndFocusBound),this.el.removeEventListener("focus",this._handleInputKeyupAndFocusBound),this.el.removeEventListener("keydown",this._handleInputKeydownBound),this.el.removeEventListener("click",this._handleInputClickBound),this.container.removeEventListener("mousedown",this._handleContainerMousedownAndTouchstartBound),this.container.removeEventListener("mouseup",this._handleContainerMouseupAndTouchendBound),void 0!==window.ontouchstart&&(this.container.removeEventListener("touchstart",this._handleContainerMousedownAndTouchstartBound),this.container.removeEventListener("touchend",this._handleContainerMouseupAndTouchendBound))}},{key:"_setupDropdown",value:function(){var t=this;this.container=document.createElement("ul"),this.container.id="autocomplete-options-"+M.guid(),e(this.container).addClass("autocomplete-content dropdown-content"),this.$inputField.append(this.container),this.el.setAttribute("data-target",this.container.id),this.dropdown=M.Dropdown.init(this.el,{autoFocus:!1,closeOnClick:!1,coverTrigger:!1,onItemClick:function(i){t.selectOption(e(i))}}),this.el.removeEventListener("click",this.dropdown._handleClickBound)}},{key:"_removeDropdown",value:function(){this.container.parentNode.removeChild(this.container)}},{key:"_handleInputBlur",value:function(){this._mousedown||(this.close(),this._resetAutocomplete())}},{key:"_handleInputKeyupAndFocus",value:function(e){"keyup"===e.type&&(n._keydown=!1),this.count=0;var t=this.el.value.toLowerCase();13!==e.keyCode&&38!==e.keyCode&&40!==e.keyCode&&(this.oldVal===t||!M.tabPressed&&"focus"===e.type||this.open(),this.oldVal=t)}},{key:"_handleInputKeydown",value:function(t){n._keydown=!0;var i=t.keyCode,s=void 0,a=e(this.container).children("li").length;i===M.keys.ENTER&&this.activeIndex>=0?(s=e(this.container).children("li").eq(this.activeIndex)).length&&(this.selectOption(s),t.preventDefault()):i!==M.keys.ARROW_UP&&i!==M.keys.ARROW_DOWN||(t.preventDefault(),i===M.keys.ARROW_UP&&this.activeIndex>0&&this.activeIndex--,i===M.keys.ARROW_DOWN&&this.activeIndex<a-1&&this.activeIndex++,this.$active.removeClass("active"),this.activeIndex>=0&&(this.$active=e(this.container).children("li").eq(this.activeIndex),this.$active.addClass("active")))}},{key:"_handleInputClick",value:function(e){this.open()}},{key:"_handleContainerMousedownAndTouchstart",value:function(e){this._mousedown=!0}},{key:"_handleContainerMouseupAndTouchend",value:function(e){this._mousedown=!1}},{key:"_highlight",value:function(e,t){var i=t.find("img"),n=t.text().toLowerCase().indexOf(""+e.toLowerCase()),s=n+e.length-1,a=t.text().slice(0,n),o=t.text().slice(n,s+1),r=t.text().slice(s+1);t.html("<span>"+a+"<span class='highlight'>"+o+"</span>"+r+"</span>"),i.length&&t.prepend(i)}},{key:"_resetCurrentElement",value:function(){this.activeIndex=-1,this.$active.removeClass("active")}},{key:"_resetAutocomplete",value:function(){e(this.container).empty(),this._resetCurrentElement(),this.oldVal=null,this.isOpen=!1,this._mousedown=!1}},{key:"selectOption",value:function(e){var t=e.text().trim();this.el.value=t,this.$el.trigger("change"),this._resetAutocomplete(),this.close(),"function"==typeof this.options.onAutocomplete&&this.options.onAutocomplete.call(this,t)}},{key:"_renderDropdown",value:function(t,i){var n=this;this._resetAutocomplete();var s=[];for(var a in t)if(t.hasOwnProperty(a)&&-1!==a.toLowerCase().indexOf(i)){if(this.count>=this.options.limit)break;var o={data:t[a],key:a};s.push(o),this.count++}if(this.options.sortFunction){s.sort((function(e,t){return n.options.sortFunction(e.key.toLowerCase(),t.key.toLowerCase(),i.toLowerCase())}))}for(var r=0;r<s.length;r++){var l=s[r],u=e("<li></li>");l.data?u.append('<img src="'+l.data+'" class="right circle"><span>'+l.key+"</span>"):u.append("<span>"+l.key+"</span>"),e(this.container).append(u),this._highlight(i,u)}}},{key:"open",value:function(){var e=this.el.value.toLowerCase();this._resetAutocomplete(),e.length>=this.options.minLength&&(this.isOpen=!0,this._renderDropdown(this.options.data,e)),this.dropdown.isOpen?this.dropdown.recalculateDimensions():this.dropdown.open()}},{key:"close",value:function(){this.dropdown.close()}},{key:"updateData",value:function(e){var t=this.el.value.toLowerCase();this.options.data=e,this.isOpen&&this._renderDropdown(e,t)}}],[{key:"init",value:function(e,t){return s(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Autocomplete}},{key:"defaults",get:function(){return t}}]),n}(u);i._keydown=!1,M.Autocomplete=i,M.jQueryLoaded&&M.initializeJqueryWrapper(i,"autocomplete","M_Autocomplete")}(cash),function(e){M.updateTextFields=function(){e("input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=search], input[type=date], input[type=time], textarea").each((function(t,i){var n=e(this);t.value.length>0||e(t).is(":focus")||t.autofocus||null!==n.attr("placeholder")?n.siblings("label").addClass("active"):t.validity?n.siblings("label").toggleClass("active",!0===t.validity.badInput):n.siblings("label").removeClass("active")}))},M.validate_field=function(e){var t=null!==e.attr("data-length"),i=parseInt(e.attr("data-length")),n=e[0].value.length;0!==n||!1!==e[0].validity.badInput||e.is(":required")?e.hasClass("validate")&&(e.is(":valid")&&t&&n<=i||e.is(":valid")&&!t?(e.removeClass("invalid"),e.addClass("valid")):(e.removeClass("valid"),e.addClass("invalid"))):e.hasClass("validate")&&(e.removeClass("valid"),e.removeClass("invalid"))},M.textareaAutoResize=function(t){if(t instanceof Element&&(t=e(t)),t.length){var i=e(".hiddendiv").first();i.length||(i=e('<div class="hiddendiv common"></div>'),e("body").append(i));var n=t.css("font-family"),s=t.css("font-size"),a=t.css("line-height"),o=t.css("padding-top"),r=t.css("padding-right"),l=t.css("padding-bottom"),u=t.css("padding-left");s&&i.css("font-size",s),n&&i.css("font-family",n),a&&i.css("line-height",a),o&&i.css("padding-top",o),r&&i.css("padding-right",r),l&&i.css("padding-bottom",l),u&&i.css("padding-left",u),t.data("original-height")||t.data("original-height",t.height()),"off"===t.attr("wrap")&&i.css("overflow-wrap","normal").css("white-space","pre"),i.text(t[0].value+"\n");var d=i.html().replace(/\n/g,"<br>");i.html(d),t[0].offsetWidth>0&&t[0].offsetHeight>0?i.css("width",t.width()+"px"):i.css("width",window.innerWidth/2+"px"),t.data("original-height")<=i.innerHeight()?t.css("height",i.innerHeight()+"px"):t[0].value.length<t.data("previous-length")&&t.css("height",t.data("original-height")+"px"),t.data("previous-length",t[0].value.length)}else console.error("No textarea element found")},e(document).ready((function(){var t="input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=search], input[type=date], input[type=time], textarea";e(document).on("change",t,(function(){0===this.value.length&&null===e(this).attr("placeholder")||e(this).siblings("label").addClass("active"),M.validate_field(e(this))})),e(document).ready((function(){M.updateTextFields()})),e(document).on("reset",(function(i){var n=e(i.target);n.is("form")&&(n.find(t).removeClass("valid").removeClass("invalid"),n.find(t).each((function(t){this.value.length&&e(this).siblings("label").removeClass("active")})),setTimeout((function(){n.find("select").each((function(){this.M_FormSelect&&e(this).trigger("change")}))}),0))})),document.addEventListener("focus",(function(i){e(i.target).is(t)&&e(i.target).siblings("label, .prefix").addClass("active")}),!0),document.addEventListener("blur",(function(i){var n=e(i.target);if(n.is(t)){var s=".prefix";0===n[0].value.length&&!0!==n[0].validity.badInput&&null===n.attr("placeholder")&&(s+=", label"),n.siblings(s).removeClass("active"),M.validate_field(n)}}),!0);e(document).on("keyup","input[type=radio], input[type=checkbox]",(function(t){if(t.which===M.keys.TAB)return e(this).addClass("tabbed"),void e(this).one("blur",(function(t){e(this).removeClass("tabbed")}))}));var i=".materialize-textarea";e(i).each((function(){var t=e(this);t.data("original-height",t.height()),t.data("previous-length",this.value.length),M.textareaAutoResize(t)})),e(document).on("keyup",i,(function(){M.textareaAutoResize(e(this))})),e(document).on("keydown",i,(function(){M.textareaAutoResize(e(this))})),e(document).on("change",'.file-field input[type="file"]',(function(){for(var t=e(this).closest(".file-field").find("input.file-path"),i=e(this)[0].files,n=[],s=0;s<i.length;s++)n.push(i[s].name);t[0].value=n.join(", "),t.trigger("change")}))}))}(cash),function(e,t){"use strict";var i={indicators:!0,height:400,duration:500,interval:6e3},n=function(n){function u(i,n){l(this,u);var s=o(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,u,i,n));return s.el.M_Slider=s,s.options=e.extend({},u.defaults,n),s.$slider=s.$el.find(".slides"),s.$slides=s.$slider.children("li"),s.activeIndex=s.$slides.filter((function(t){return e(t).hasClass("active")})).first().index(),-1!=s.activeIndex&&(s.$active=s.$slides.eq(s.activeIndex)),s._setSliderHeight(),s.$slides.find(".caption").each((function(e){s._animateCaptionIn(e,0)})),s.$slides.find("img").each((function(t){var i="data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";e(t).attr("src")!==i&&(e(t).css("background-image",'url("'+e(t).attr("src")+'")'),e(t).attr("src",i))})),s._setupIndicators(),s.$active?s.$active.css("display","block"):(s.$slides.first().addClass("active"),t({targets:s.$slides.first()[0],opacity:1,duration:s.options.duration,easing:"easeOutQuad"}),s.activeIndex=0,s.$active=s.$slides.eq(s.activeIndex),s.options.indicators&&s.$indicators.eq(s.activeIndex).addClass("active")),s.$active.find("img").each((function(e){t({targets:s.$active.find(".caption")[0],opacity:1,translateX:0,translateY:0,duration:s.options.duration,easing:"easeOutQuad"})})),s._setupEventHandlers(),s.start(),s}return r(u,n),a(u,[{key:"destroy",value:function(){this.pause(),this._removeIndicators(),this._removeEventHandlers(),this.el.M_Slider=void 0}},{key:"_setupEventHandlers",value:function(){var e=this;this._handleIntervalBound=this._handleInterval.bind(this),this._handleIndicatorClickBound=this._handleIndicatorClick.bind(this),this.options.indicators&&this.$indicators.each((function(t){t.addEventListener("click",e._handleIndicatorClickBound)}))}},{key:"_removeEventHandlers",value:function(){var e=this;this.options.indicators&&this.$indicators.each((function(t){t.removeEventListener("click",e._handleIndicatorClickBound)}))}},{key:"_handleIndicatorClick",value:function(t){var i=e(t.target).index();this.set(i)}},{key:"_handleInterval",value:function(){var e=this.$slider.find(".active").index();this.$slides.length===e+1?e=0:e+=1,this.set(e)}},{key:"_animateCaptionIn",value:function(i,n){var s={targets:i,opacity:0,duration:n,easing:"easeOutQuad"};e(i).hasClass("center-align")?s.translateY=-100:e(i).hasClass("right-align")?s.translateX=100:e(i).hasClass("left-align")&&(s.translateX=-100),t(s)}},{key:"_setSliderHeight",value:function(){this.$el.hasClass("fullscreen")||(this.options.indicators?this.$el.css("height",this.options.height+40+"px"):this.$el.css("height",this.options.height+"px"),this.$slider.css("height",this.options.height+"px"))}},{key:"_setupIndicators",value:function(){var t=this;this.options.indicators&&(this.$indicators=e('<ul class="indicators"></ul>'),this.$slides.each((function(i,n){var s=e('<li class="indicator-item"></li>');t.$indicators.append(s[0])})),this.$el.append(this.$indicators[0]),this.$indicators=this.$indicators.children("li.indicator-item"))}},{key:"_removeIndicators",value:function(){this.$el.find("ul.indicators").remove()}},{key:"set",value:function(e){var i=this;if(e>=this.$slides.length?e=0:e<0&&(e=this.$slides.length-1),this.activeIndex!=e){this.$active=this.$slides.eq(this.activeIndex);var n=this.$active.find(".caption");this.$active.removeClass("active"),t({targets:this.$active[0],opacity:0,duration:this.options.duration,easing:"easeOutQuad",complete:function(){i.$slides.not(".active").each((function(e){t({targets:e,opacity:0,translateX:0,translateY:0,duration:0,easing:"easeOutQuad"})}))}}),this._animateCaptionIn(n[0],this.options.duration),this.options.indicators&&(this.$indicators.eq(this.activeIndex).removeClass("active"),this.$indicators.eq(e).addClass("active")),t({targets:this.$slides.eq(e)[0],opacity:1,duration:this.options.duration,easing:"easeOutQuad"}),t({targets:this.$slides.eq(e).find(".caption")[0],opacity:1,translateX:0,translateY:0,duration:this.options.duration,delay:this.options.duration,easing:"easeOutQuad"}),this.$slides.eq(e).addClass("active"),this.activeIndex=e,this.start()}}},{key:"pause",value:function(){clearInterval(this.interval)}},{key:"start",value:function(){clearInterval(this.interval),this.interval=setInterval(this._handleIntervalBound,this.options.duration+this.options.interval)}},{key:"next",value:function(){var e=this.activeIndex+1;e>=this.$slides.length?e=0:e<0&&(e=this.$slides.length-1),this.set(e)}},{key:"prev",value:function(){var e=this.activeIndex-1;e>=this.$slides.length?e=0:e<0&&(e=this.$slides.length-1),this.set(e)}}],[{key:"init",value:function(e,t){return s(u.__proto__||Object.getPrototypeOf(u),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Slider}},{key:"defaults",get:function(){return i}}]),u}(u);M.Slider=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"slider","M_Slider")}(cash,M.anime),function(e,t){e(document).on("click",".card",(function(i){if(e(this).children(".card-reveal").length){var n=e(i.target).closest(".card");void 0===n.data("initialOverflow")&&n.data("initialOverflow",void 0===n.css("overflow")?"":n.css("overflow"));var s=e(this).find(".card-reveal");e(i.target).is(e(".card-reveal .card-title"))||e(i.target).is(e(".card-reveal .card-title i"))?t({targets:s[0],translateY:0,duration:225,easing:"easeInOutQuad",complete:function(t){var i=t.animatables[0].target;e(i).css({display:"none"}),n.css("overflow",n.data("initialOverflow"))}}):(e(i.target).is(e(".card .activator"))||e(i.target).is(e(".card .activator i")))&&(n.css("overflow","hidden"),s.css({display:"block"}),t({targets:s[0],translateY:"-100%",duration:300,easing:"easeInOutQuad"}))}}))}(cash,M.anime),function(e){"use strict";var t={data:[],placeholder:"",secondaryPlaceholder:"",autocompleteOptions:{},limit:1/0,onChipAdd:null,onChipSelect:null,onChipDelete:null},i=function(i){function n(t,i){l(this,n);var s=o(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,i));return s.el.M_Chips=s,s.options=e.extend({},n.defaults,i),s.$el.addClass("chips input-field"),s.chipsData=[],s.$chips=e(),s._setupInput(),s.hasAutocomplete=Object.keys(s.options.autocompleteOptions).length>0,s.$input.attr("id")||s.$input.attr("id",M.guid()),s.options.data.length&&(s.chipsData=s.options.data,s._renderChips(s.chipsData)),s.hasAutocomplete&&s._setupAutocomplete(),s._setPlaceholder(),s._setupLabel(),s._setupEventHandlers(),s}return r(n,i),a(n,[{key:"getData",value:function(){return this.chipsData}},{key:"destroy",value:function(){this._removeEventHandlers(),this.$chips.remove(),this.el.M_Chips=void 0}},{key:"_setupEventHandlers",value:function(){this._handleChipClickBound=this._handleChipClick.bind(this),this._handleInputKeydownBound=this._handleInputKeydown.bind(this),this._handleInputFocusBound=this._handleInputFocus.bind(this),this._handleInputBlurBound=this._handleInputBlur.bind(this),this.el.addEventListener("click",this._handleChipClickBound),document.addEventListener("keydown",n._handleChipsKeydown),document.addEventListener("keyup",n._handleChipsKeyup),this.el.addEventListener("blur",n._handleChipsBlur,!0),this.$input[0].addEventListener("focus",this._handleInputFocusBound),this.$input[0].addEventListener("blur",this._handleInputBlurBound),this.$input[0].addEventListener("keydown",this._handleInputKeydownBound)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleChipClickBound),document.removeEventListener("keydown",n._handleChipsKeydown),document.removeEventListener("keyup",n._handleChipsKeyup),this.el.removeEventListener("blur",n._handleChipsBlur,!0),this.$input[0].removeEventListener("focus",this._handleInputFocusBound),this.$input[0].removeEventListener("blur",this._handleInputBlurBound),this.$input[0].removeEventListener("keydown",this._handleInputKeydownBound)}},{key:"_handleChipClick",value:function(t){var i=e(t.target).closest(".chip"),n=e(t.target).is(".close");if(i.length){var s=i.index();n?(this.deleteChip(s),this.$input[0].focus()):this.selectChip(s)}else this.$input[0].focus()}},{key:"_handleInputFocus",value:function(){this.$el.addClass("focus")}},{key:"_handleInputBlur",value:function(){this.$el.removeClass("focus")}},{key:"_handleInputKeydown",value:function(e){if(n._keydown=!0,13===e.keyCode){if(this.hasAutocomplete&&this.autocomplete&&this.autocomplete.isOpen)return;e.preventDefault(),this.addChip({tag:this.$input[0].value}),this.$input[0].value=""}else 8!==e.keyCode&&37!==e.keyCode||""!==this.$input[0].value||!this.chipsData.length||(e.preventDefault(),this.selectChip(this.chipsData.length-1))}},{key:"_renderChip",value:function(t){if(t.tag){var i=document.createElement("div"),n=document.createElement("i");if(i.classList.add("chip"),i.textContent=t.tag,i.setAttribute("tabindex",0),e(n).addClass("material-icons close"),n.textContent="close",t.image){var s=document.createElement("img");s.setAttribute("src",t.image),i.insertBefore(s,i.firstChild)}return i.appendChild(n),i}}},{key:"_renderChips",value:function(){this.$chips.remove();for(var e=0;e<this.chipsData.length;e++){var t=this._renderChip(this.chipsData[e]);this.$el.append(t),this.$chips.add(t)}this.$el.append(this.$input[0])}},{key:"_setupAutocomplete",value:function(){var e=this;this.options.autocompleteOptions.onAutocomplete=function(t){e.addChip({tag:t}),e.$input[0].value="",e.$input[0].focus()},this.autocomplete=M.Autocomplete.init(this.$input[0],this.options.autocompleteOptions)}},{key:"_setupInput",value:function(){this.$input=this.$el.find("input"),this.$input.length||(this.$input=e("<input></input>"),this.$el.append(this.$input)),this.$input.addClass("input")}},{key:"_setupLabel",value:function(){this.$label=this.$el.find("label"),this.$label.length&&this.$label.setAttribute("for",this.$input.attr("id"))}},{key:"_setPlaceholder",value:function(){void 0!==this.chipsData&&!this.chipsData.length&&this.options.placeholder?e(this.$input).prop("placeholder",this.options.placeholder):(void 0===this.chipsData||this.chipsData.length)&&this.options.secondaryPlaceholder&&e(this.$input).prop("placeholder",this.options.secondaryPlaceholder)}},{key:"_isValid",value:function(e){if(e.hasOwnProperty("tag")&&""!==e.tag){for(var t=!1,i=0;i<this.chipsData.length;i++)if(this.chipsData[i].tag===e.tag){t=!0;break}return!t}return!1}},{key:"addChip",value:function(t){if(this._isValid(t)&&!(this.chipsData.length>=this.options.limit)){var i=this._renderChip(t);this.$chips.add(i),this.chipsData.push(t),e(this.$input).before(i),this._setPlaceholder(),"function"==typeof this.options.onChipAdd&&this.options.onChipAdd.call(this,this.$el,i)}}},{key:"deleteChip",value:function(t){var i=this.$chips.eq(t);this.$chips.eq(t).remove(),this.$chips=this.$chips.filter((function(t){return e(t).index()>=0})),this.chipsData.splice(t,1),this._setPlaceholder(),"function"==typeof this.options.onChipDelete&&this.options.onChipDelete.call(this,this.$el,i[0])}},{key:"selectChip",value:function(e){var t=this.$chips.eq(e);this._selectedChip=t,t[0].focus(),"function"==typeof this.options.onChipSelect&&this.options.onChipSelect.call(this,this.$el,t[0])}}],[{key:"init",value:function(e,t){return s(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Chips}},{key:"_handleChipsKeydown",value:function(t){n._keydown=!0;var i=e(t.target).closest(".chips"),s=t.target&&i.length;if(!e(t.target).is("input, textarea")&&s){var a=i[0].M_Chips;if(8===t.keyCode||46===t.keyCode){t.preventDefault();var o=a.chipsData.length;if(a._selectedChip){var r=a._selectedChip.index();a.deleteChip(r),a._selectedChip=null,o=Math.max(r-1,0)}a.chipsData.length&&a.selectChip(o)}else if(37===t.keyCode){if(a._selectedChip){var l=a._selectedChip.index()-1;if(l<0)return;a.selectChip(l)}}else if(39===t.keyCode&&a._selectedChip){var u=a._selectedChip.index()+1;u>=a.chipsData.length?a.$input[0].focus():a.selectChip(u)}}}},{key:"_handleChipsKeyup",value:function(e){n._keydown=!1}},{key:"_handleChipsBlur",value:function(t){n._keydown||(e(t.target).closest(".chips")[0].M_Chips._selectedChip=null)}},{key:"defaults",get:function(){return t}}]),n}(u);i._keydown=!1,M.Chips=i,M.jQueryLoaded&&M.initializeJqueryWrapper(i,"chips","M_Chips"),e(document).ready((function(){e(document.body).on("click",".chip .close",(function(){var t=e(this).closest(".chips");t.length&&t[0].M_Chips||e(this).closest(".chip").remove()}))}))}(cash),function(e){"use strict";var t={top:0,bottom:1/0,offset:0,onPositionChange:null},i=function(i){function n(t,i){l(this,n);var s=o(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,i));return s.el.M_Pushpin=s,s.options=e.extend({},n.defaults,i),s.originalOffset=s.el.offsetTop,n._pushpins.push(s),s._setupEventHandlers(),s._updatePosition(),s}return r(n,i),a(n,[{key:"destroy",value:function(){this.el.style.top=null,this._removePinClasses(),this._removeEventHandlers();var e=n._pushpins.indexOf(this);n._pushpins.splice(e,1)}},{key:"_setupEventHandlers",value:function(){document.addEventListener("scroll",n._updateElements)}},{key:"_removeEventHandlers",value:function(){document.removeEventListener("scroll",n._updateElements)}},{key:"_updatePosition",value:function(){var e=M.getDocumentScrollTop()+this.options.offset;this.options.top<=e&&this.options.bottom>=e&&!this.el.classList.contains("pinned")&&(this._removePinClasses(),this.el.style.top=this.options.offset+"px",this.el.classList.add("pinned"),"function"==typeof this.options.onPositionChange&&this.options.onPositionChange.call(this,"pinned")),e<this.options.top&&!this.el.classList.contains("pin-top")&&(this._removePinClasses(),this.el.style.top=0,this.el.classList.add("pin-top"),"function"==typeof this.options.onPositionChange&&this.options.onPositionChange.call(this,"pin-top")),e>this.options.bottom&&!this.el.classList.contains("pin-bottom")&&(this._removePinClasses(),this.el.classList.add("pin-bottom"),this.el.style.top=this.options.bottom-this.originalOffset+"px","function"==typeof this.options.onPositionChange&&this.options.onPositionChange.call(this,"pin-bottom"))}},{key:"_removePinClasses",value:function(){this.el.classList.remove("pin-top"),this.el.classList.remove("pinned"),this.el.classList.remove("pin-bottom")}}],[{key:"init",value:function(e,t){return s(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Pushpin}},{key:"_updateElements",value:function(){for(var e in n._pushpins){n._pushpins[e]._updatePosition()}}},{key:"defaults",get:function(){return t}}]),n}(u);i._pushpins=[],M.Pushpin=i,M.jQueryLoaded&&M.initializeJqueryWrapper(i,"pushpin","M_Pushpin")}(cash),function(e,t){"use strict";var i={direction:"top",hoverEnabled:!0,toolbarEnabled:!1};e.fn.reverse=[].reverse;var n=function(n){function u(t,i){l(this,u);var n=o(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,u,t,i));return n.el.M_FloatingActionButton=n,n.options=e.extend({},u.defaults,i),n.isOpen=!1,n.$anchor=n.$el.children("a").first(),n.$menu=n.$el.children("ul").first(),n.$floatingBtns=n.$el.find("ul .btn-floating"),n.$floatingBtnsReverse=n.$el.find("ul .btn-floating").reverse(),n.offsetY=0,n.offsetX=0,n.$el.addClass("direction-"+n.options.direction),"top"===n.options.direction?n.offsetY=40:"right"===n.options.direction?n.offsetX=-40:"bottom"===n.options.direction?n.offsetY=-40:n.offsetX=40,n._setupEventHandlers(),n}return r(u,n),a(u,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.M_FloatingActionButton=void 0}},{key:"_setupEventHandlers",value:function(){this._handleFABClickBound=this._handleFABClick.bind(this),this._handleOpenBound=this.open.bind(this),this._handleCloseBound=this.close.bind(this),this.options.hoverEnabled&&!this.options.toolbarEnabled?(this.el.addEventListener("mouseenter",this._handleOpenBound),this.el.addEventListener("mouseleave",this._handleCloseBound)):this.el.addEventListener("click",this._handleFABClickBound)}},{key:"_removeEventHandlers",value:function(){this.options.hoverEnabled&&!this.options.toolbarEnabled?(this.el.removeEventListener("mouseenter",this._handleOpenBound),this.el.removeEventListener("mouseleave",this._handleCloseBound)):this.el.removeEventListener("click",this._handleFABClickBound)}},{key:"_handleFABClick",value:function(){this.isOpen?this.close():this.open()}},{key:"_handleDocumentClick",value:function(t){e(t.target).closest(this.$menu).length||this.close()}},{key:"open",value:function(){this.isOpen||(this.options.toolbarEnabled?this._animateInToolbar():this._animateInFAB(),this.isOpen=!0)}},{key:"close",value:function(){this.isOpen&&(this.options.toolbarEnabled?(window.removeEventListener("scroll",this._handleCloseBound,!0),document.body.removeEventListener("click",this._handleDocumentClickBound,!0),this._animateOutToolbar()):this._animateOutFAB(),this.isOpen=!1)}},{key:"_animateInFAB",value:function(){var e=this;this.$el.addClass("active");var i=0;this.$floatingBtnsReverse.each((function(n){t({targets:n,opacity:1,scale:[.4,1],translateY:[e.offsetY,0],translateX:[e.offsetX,0],duration:275,delay:i,easing:"easeInOutQuad"}),i+=40}))}},{key:"_animateOutFAB",value:function(){var e=this;this.$floatingBtnsReverse.each((function(i){t.remove(i),t({targets:i,opacity:0,scale:.4,translateY:e.offsetY,translateX:e.offsetX,duration:175,easing:"easeOutQuad",complete:function(){e.$el.removeClass("active")}})}))}},{key:"_animateInToolbar",value:function(){var t,i=this,n=window.innerWidth,s=window.innerHeight,a=this.el.getBoundingClientRect(),o=e('<div class="fab-backdrop"></div>'),r=this.$anchor.css("background-color");this.$anchor.append(o),this.offsetX=a.left-n/2+a.width/2,this.offsetY=s-a.bottom,t=n/o[0].clientWidth,this.btnBottom=a.bottom,this.btnLeft=a.left,this.btnWidth=a.width,this.$el.addClass("active"),this.$el.css({"text-align":"center",width:"100%",bottom:0,left:0,transform:"translateX("+this.offsetX+"px)",transition:"none"}),this.$anchor.css({transform:"translateY("+-this.offsetY+"px)",transition:"none"}),o.css({"background-color":r}),setTimeout((function(){i.$el.css({transform:"",transition:"transform .2s cubic-bezier(0.550, 0.085, 0.680, 0.530), background-color 0s linear .2s"}),i.$anchor.css({overflow:"visible",transform:"",transition:"transform .2s"}),setTimeout((function(){i.$el.css({overflow:"hidden","background-color":r}),o.css({transform:"scale("+t+")",transition:"transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)"}),i.$menu.children("li").children("a").css({opacity:1}),i._handleDocumentClickBound=i._handleDocumentClick.bind(i),window.addEventListener("scroll",i._handleCloseBound,!0),document.body.addEventListener("click",i._handleDocumentClickBound,!0)}),100)}),0)}},{key:"_animateOutToolbar",value:function(){var e=this,t=window.innerWidth,i=window.innerHeight,n=this.$el.find(".fab-backdrop"),s=this.$anchor.css("background-color");this.offsetX=this.btnLeft-t/2+this.btnWidth/2,this.offsetY=i-this.btnBottom,this.$el.removeClass("active"),this.$el.css({"background-color":"transparent",transition:"none"}),this.$anchor.css({transition:"none"}),n.css({transform:"scale(0)","background-color":s}),this.$menu.children("li").children("a").css({opacity:""}),setTimeout((function(){n.remove(),e.$el.css({"text-align":"",width:"",bottom:"",left:"",overflow:"","background-color":"",transform:"translate3d("+-e.offsetX+"px,0,0)"}),e.$anchor.css({overflow:"",transform:"translate3d(0,"+e.offsetY+"px,0)"}),setTimeout((function(){e.$el.css({transform:"translate3d(0,0,0)",transition:"transform .2s"}),e.$anchor.css({transform:"translate3d(0,0,0)",transition:"transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)"})}),20)}),200)}}],[{key:"init",value:function(e,t){return s(u.__proto__||Object.getPrototypeOf(u),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_FloatingActionButton}},{key:"defaults",get:function(){return i}}]),u}(u);M.FloatingActionButton=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"floatingActionButton","M_FloatingActionButton")}(cash,M.anime),function(e){"use strict";var t={autoClose:!1,format:"mmm dd, yyyy",parse:null,defaultDate:null,setDefaultDate:!1,disableWeekends:!1,disableDayFn:null,firstDay:0,minDate:null,maxDate:null,yearRange:10,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,container:null,showClearBtn:!1,i18n:{cancel:"Cancel",clear:"Clear",done:"Ok",previousMonth:"‹",nextMonth:"›",months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekdaysAbbrev:["S","M","T","W","T","F","S"]},events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null},i=function(i){function n(t,i){l(this,n);var s=o(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,i));s.el.M_Datepicker=s,s.options=e.extend({},n.defaults,i),i&&i.hasOwnProperty("i18n")&&"object"==typeof i.i18n&&(s.options.i18n=e.extend({},n.defaults.i18n,i.i18n)),s.options.minDate&&s.options.minDate.setHours(0,0,0,0),s.options.maxDate&&s.options.maxDate.setHours(0,0,0,0),s.id=M.guid(),s._setupVariables(),s._insertHTMLIntoDOM(),s._setupModal(),s._setupEventHandlers(),s.options.defaultDate||(s.options.defaultDate=new Date(Date.parse(s.el.value)));var a=s.options.defaultDate;return n._isDate(a)?s.options.setDefaultDate?(s.setDate(a,!0),s.setInputValue()):s.gotoDate(a):s.gotoDate(new Date),s.isOpen=!1,s}return r(n,i),a(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this.modal.destroy(),e(this.modalEl).remove(),this.destroySelects(),this.el.M_Datepicker=void 0}},{key:"destroySelects",value:function(){var e=this.calendarEl.querySelector(".orig-select-year");e&&M.FormSelect.getInstance(e).destroy();var t=this.calendarEl.querySelector(".orig-select-month");t&&M.FormSelect.getInstance(t).destroy()}},{key:"_insertHTMLIntoDOM",value:function(){this.options.showClearBtn&&(e(this.clearBtn).css({visibility:""}),this.clearBtn.innerHTML=this.options.i18n.clear),this.doneBtn.innerHTML=this.options.i18n.done,this.cancelBtn.innerHTML=this.options.i18n.cancel,this.options.container?this.$modalEl.appendTo(this.options.container):this.$modalEl.insertBefore(this.el)}},{key:"_setupModal",value:function(){var e=this;this.modalEl.id="modal-"+this.id,this.modal=M.Modal.init(this.modalEl,{onCloseEnd:function(){e.isOpen=!1}})}},{key:"toString",value:function(e){var t=this;return e=e||this.options.format,n._isDate(this.date)?e.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g).map((function(e){return t.formats[e]?t.formats[e]():e})).join(""):""}},{key:"setDate",value:function(e,t){if(!e)return this.date=null,this._renderDateDisplay(),this.draw();if("string"==typeof e&&(e=new Date(Date.parse(e))),n._isDate(e)){var i=this.options.minDate,s=this.options.maxDate;n._isDate(i)&&e<i?e=i:n._isDate(s)&&e>s&&(e=s),this.date=new Date(e.getTime()),this._renderDateDisplay(),n._setToStartOfDay(this.date),this.gotoDate(this.date),t||"function"!=typeof this.options.onSelect||this.options.onSelect.call(this,this.date)}}},{key:"setInputValue",value:function(){this.el.value=this.toString(),this.$el.trigger("change",{firedBy:this})}},{key:"_renderDateDisplay",value:function(){var e=n._isDate(this.date)?this.date:new Date,t=this.options.i18n,i=t.weekdaysShort[e.getDay()],s=t.monthsShort[e.getMonth()],a=e.getDate();this.yearTextEl.innerHTML=e.getFullYear(),this.dateTextEl.innerHTML=i+", "+s+" "+a}},{key:"gotoDate",value:function(e){var t=!0;if(n._isDate(e)){if(this.calendars){var i=new Date(this.calendars[0].year,this.calendars[0].month,1),s=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),a=e.getTime();s.setMonth(s.getMonth()+1),s.setDate(s.getDate()-1),t=a<i.getTime()||s.getTime()<a}t&&(this.calendars=[{month:e.getMonth(),year:e.getFullYear()}]),this.adjustCalendars()}}},{key:"adjustCalendars",value:function(){this.calendars[0]=this.adjustCalendar(this.calendars[0]),this.draw()}},{key:"adjustCalendar",value:function(e){return e.month<0&&(e.year-=Math.ceil(Math.abs(e.month)/12),e.month+=12),e.month>11&&(e.year+=Math.floor(Math.abs(e.month)/12),e.month-=12),e}},{key:"nextMonth",value:function(){this.calendars[0].month++,this.adjustCalendars()}},{key:"prevMonth",value:function(){this.calendars[0].month--,this.adjustCalendars()}},{key:"render",value:function(e,t,i){var s=this.options,a=new Date,o=n._getDaysInMonth(e,t),r=new Date(e,t,1).getDay(),l=[],u=[];n._setToStartOfDay(a),s.firstDay>0&&(r-=s.firstDay)<0&&(r+=7);for(var d=0===t?11:t-1,c=11===t?0:t+1,h=0===t?e-1:e,p=11===t?e+1:e,v=n._getDaysInMonth(h,d),f=o+r,_=f;_>7;)_-=7;f+=7-_;for(var m=!1,y=0,g=0;y<f;y++){var b=new Date(e,t,y-r+1),k=!!n._isDate(this.date)&&n._compareDates(b,this.date),w=n._compareDates(b,a),C=-1!==s.events.indexOf(b.toDateString()),x=y<r||y>=o+r,E=y-r+1,M=t,T=e,j=s.startRange&&n._compareDates(s.startRange,b),O=s.endRange&&n._compareDates(s.endRange,b),L=s.startRange&&s.endRange&&s.startRange<b&&b<s.endRange;x&&(y<r?(E=v+E,M=d,T=h):(E-=o,M=c,T=p));var D={day:E,month:M,year:T,hasEvent:C,isSelected:k,isToday:w,isDisabled:s.minDate&&b<s.minDate||s.maxDate&&b>s.maxDate||s.disableWeekends&&n._isWeekend(b)||s.disableDayFn&&s.disableDayFn(b),isEmpty:x,isStartRange:j,isEndRange:O,isInRange:L,showDaysInNextAndPreviousMonths:s.showDaysInNextAndPreviousMonths};u.push(this.renderDay(D)),7==++g&&(l.push(this.renderRow(u,s.isRTL,m)),u=[],g=0,m=!1)}return this.renderTable(s,l,i)}},{key:"renderDay",value:function(e){var t=[],i="false";if(e.isEmpty){if(!e.showDaysInNextAndPreviousMonths)return'<td class="is-empty"></td>';t.push("is-outside-current-month"),t.push("is-selection-disabled")}return e.isDisabled&&t.push("is-disabled"),e.isToday&&t.push("is-today"),e.isSelected&&(t.push("is-selected"),i="true"),e.hasEvent&&t.push("has-event"),e.isInRange&&t.push("is-inrange"),e.isStartRange&&t.push("is-startrange"),e.isEndRange&&t.push("is-endrange"),'<td data-day="'+e.day+'" class="'+t.join(" ")+'" aria-selected="'+i+'"><button class="datepicker-day-button" type="button" data-year="'+e.year+'" data-month="'+e.month+'" data-day="'+e.day+'">'+e.day+"</button></td>"}},{key:"renderRow",value:function(e,t,i){return'<tr class="datepicker-row'+(i?" is-selected":"")+'">'+(t?e.reverse():e).join("")+"</tr>"}},{key:"renderTable",value:function(e,t,i){return'<div class="datepicker-table-wrapper"><table cellpadding="0" cellspacing="0" class="datepicker-table" role="grid" aria-labelledby="'+i+'">'+this.renderHead(e)+this.renderBody(t)+"</table></div>"}},{key:"renderHead",value:function(e){var t=void 0,i=[];for(t=0;t<7;t++)i.push('<th scope="col"><abbr title="'+this.renderDayName(e,t)+'">'+this.renderDayName(e,t,!0)+"</abbr></th>");return"<thead><tr>"+(e.isRTL?i.reverse():i).join("")+"</tr></thead>"}},{key:"renderBody",value:function(e){return"<tbody>"+e.join("")+"</tbody>"}},{key:"renderTitle",value:function(t,i,n,s,a,o){var r,l,u=void 0,d=void 0,c=void 0,h=this.options,p=n===h.minYear,v=n===h.maxYear,f='<div id="'+o+'" class="datepicker-controls" role="heading" aria-live="assertive">',_=!0,m=!0;for(c=[],u=0;u<12;u++)c.push('<option value="'+(n===a?u-i:12+u-i)+'"'+(u===s?' selected="selected"':"")+(p&&u<h.minMonth||v&&u>h.maxMonth?'disabled="disabled"':"")+">"+h.i18n.months[u]+"</option>");for(r='<select class="datepicker-select orig-select-month" tabindex="-1">'+c.join("")+"</select>",e.isArray(h.yearRange)?(u=h.yearRange[0],d=h.yearRange[1]+1):(u=n-h.yearRange,d=1+n+h.yearRange),c=[];u<d&&u<=h.maxYear;u++)u>=h.minYear&&c.push('<option value="'+u+'" '+(u===n?'selected="selected"':"")+">"+u+"</option>");l='<select class="datepicker-select orig-select-year" tabindex="-1">'+c.join("")+"</select>";f+='<button class="month-prev'+(_?"":" is-disabled")+'" type="button"><svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"/><path d="M0-.5h24v24H0z" fill="none"/></svg></button>',f+='<div class="selects-container">',h.showMonthAfterYear?f+=l+r:f+=r+l,f+="</div>",p&&(0===s||h.minMonth>=s)&&(_=!1),v&&(11===s||h.maxMonth<=s)&&(m=!1);return(f+='<button class="month-next'+(m?"":" is-disabled")+'" type="button"><svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"/><path d="M0-.25h24v24H0z" fill="none"/></svg></button>')+"</div>"}},{key:"draw",value:function(e){if(this.isOpen||e){var t,i=this.options,n=i.minYear,s=i.maxYear,a=i.minMonth,o=i.maxMonth,r="";this._y<=n&&(this._y=n,!isNaN(a)&&this._m<a&&(this._m=a)),this._y>=s&&(this._y=s,!isNaN(o)&&this._m>o&&(this._m=o)),t="datepicker-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2);for(var l=0;l<1;l++)this._renderDateDisplay(),r+=this.renderTitle(this,l,this.calendars[l].year,this.calendars[l].month,this.calendars[0].year,t)+this.render(this.calendars[l].year,this.calendars[l].month,t);this.destroySelects(),this.calendarEl.innerHTML=r;var u=this.calendarEl.querySelector(".orig-select-year"),d=this.calendarEl.querySelector(".orig-select-month");M.FormSelect.init(u,{classes:"select-year",dropdownOptions:{container:document.body,constrainWidth:!1}}),M.FormSelect.init(d,{classes:"select-month",dropdownOptions:{container:document.body,constrainWidth:!1}}),u.addEventListener("change",this._handleYearChange.bind(this)),d.addEventListener("change",this._handleMonthChange.bind(this)),"function"==typeof this.options.onDraw&&this.options.onDraw(this)}}},{key:"_setupEventHandlers",value:function(){this._handleInputKeydownBound=this._handleInputKeydown.bind(this),this._handleInputClickBound=this._handleInputClick.bind(this),this._handleInputChangeBound=this._handleInputChange.bind(this),this._handleCalendarClickBound=this._handleCalendarClick.bind(this),this._finishSelectionBound=this._finishSelection.bind(this),this._handleMonthChange=this._handleMonthChange.bind(this),this._closeBound=this.close.bind(this),this.el.addEventListener("click",this._handleInputClickBound),this.el.addEventListener("keydown",this._handleInputKeydownBound),this.el.addEventListener("change",this._handleInputChangeBound),this.calendarEl.addEventListener("click",this._handleCalendarClickBound),this.doneBtn.addEventListener("click",this._finishSelectionBound),this.cancelBtn.addEventListener("click",this._closeBound),this.options.showClearBtn&&(this._handleClearClickBound=this._handleClearClick.bind(this),this.clearBtn.addEventListener("click",this._handleClearClickBound))}},{key:"_setupVariables",value:function(){var t=this;this.$modalEl=e(n._template),this.modalEl=this.$modalEl[0],this.calendarEl=this.modalEl.querySelector(".datepicker-calendar"),this.yearTextEl=this.modalEl.querySelector(".year-text"),this.dateTextEl=this.modalEl.querySelector(".date-text"),this.options.showClearBtn&&(this.clearBtn=this.modalEl.querySelector(".datepicker-clear")),this.doneBtn=this.modalEl.querySelector(".datepicker-done"),this.cancelBtn=this.modalEl.querySelector(".datepicker-cancel"),this.formats={d:function(){return t.date.getDate()},dd:function(){var e=t.date.getDate();return(e<10?"0":"")+e},ddd:function(){return t.options.i18n.weekdaysShort[t.date.getDay()]},dddd:function(){return t.options.i18n.weekdays[t.date.getDay()]},m:function(){return t.date.getMonth()+1},mm:function(){var e=t.date.getMonth()+1;return(e<10?"0":"")+e},mmm:function(){return t.options.i18n.monthsShort[t.date.getMonth()]},mmmm:function(){return t.options.i18n.months[t.date.getMonth()]},yy:function(){return(""+t.date.getFullYear()).slice(2)},yyyy:function(){return t.date.getFullYear()}}}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleInputClickBound),this.el.removeEventListener("keydown",this._handleInputKeydownBound),this.el.removeEventListener("change",this._handleInputChangeBound),this.calendarEl.removeEventListener("click",this._handleCalendarClickBound)}},{key:"_handleInputClick",value:function(){this.open()}},{key:"_handleInputKeydown",value:function(e){e.which===M.keys.ENTER&&(e.preventDefault(),this.open())}},{key:"_handleCalendarClick",value:function(t){if(this.isOpen){var i=e(t.target);i.hasClass("is-disabled")||(!i.hasClass("datepicker-day-button")||i.hasClass("is-empty")||i.parent().hasClass("is-disabled")?i.closest(".month-prev").length?this.prevMonth():i.closest(".month-next").length&&this.nextMonth():(this.setDate(new Date(t.target.getAttribute("data-year"),t.target.getAttribute("data-month"),t.target.getAttribute("data-day"))),this.options.autoClose&&this._finishSelection()))}}},{key:"_handleClearClick",value:function(){this.date=null,this.setInputValue(),this.close()}},{key:"_handleMonthChange",value:function(e){this.gotoMonth(e.target.value)}},{key:"_handleYearChange",value:function(e){this.gotoYear(e.target.value)}},{key:"gotoMonth",value:function(e){isNaN(e)||(this.calendars[0].month=parseInt(e,10),this.adjustCalendars())}},{key:"gotoYear",value:function(e){isNaN(e)||(this.calendars[0].year=parseInt(e,10),this.adjustCalendars())}},{key:"_handleInputChange",value:function(e){var t=void 0;e.firedBy!==this&&(t=this.options.parse?this.options.parse(this.el.value,this.options.format):new Date(Date.parse(this.el.value)),n._isDate(t)&&this.setDate(t))}},{key:"renderDayName",value:function(e,t,i){for(t+=e.firstDay;t>=7;)t-=7;return i?e.i18n.weekdaysAbbrev[t]:e.i18n.weekdays[t]}},{key:"_finishSelection",value:function(){this.setInputValue(),this.close()}},{key:"open",value:function(){if(!this.isOpen)return this.isOpen=!0,"function"==typeof this.options.onOpen&&this.options.onOpen.call(this),this.draw(),this.modal.open(),this}},{key:"close",value:function(){if(this.isOpen)return this.isOpen=!1,"function"==typeof this.options.onClose&&this.options.onClose.call(this),this.modal.close(),this}}],[{key:"init",value:function(e,t){return s(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,e,t)}},{key:"_isDate",value:function(e){return/Date/.test(Object.prototype.toString.call(e))&&!isNaN(e.getTime())}},{key:"_isWeekend",value:function(e){var t=e.getDay();return 0===t||6===t}},{key:"_setToStartOfDay",value:function(e){n._isDate(e)&&e.setHours(0,0,0,0)}},{key:"_getDaysInMonth",value:function(e,t){return[31,n._isLeapYear(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]}},{key:"_isLeapYear",value:function(e){return e%4==0&&e%100!=0||e%400==0}},{key:"_compareDates",value:function(e,t){return e.getTime()===t.getTime()}},{key:"_setToStartOfDay",value:function(e){n._isDate(e)&&e.setHours(0,0,0,0)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Datepicker}},{key:"defaults",get:function(){return t}}]),n}(u);i._template=['<div class= "modal datepicker-modal">','<div class="modal-content datepicker-container">','<div class="datepicker-date-display">','<span class="year-text"></span>','<span class="date-text"></span>',"</div>",'<div class="datepicker-calendar-container">','<div class="datepicker-calendar"></div>','<div class="datepicker-footer">','<button class="btn-flat datepicker-clear waves-effect" style="visibility: hidden;" type="button"></button>','<div class="confirmation-btns">','<button class="btn-flat datepicker-cancel waves-effect" type="button"></button>','<button class="btn-flat datepicker-done waves-effect" type="button"></button>',"</div>","</div>","</div>","</div>","</div>"].join(""),M.Datepicker=i,M.jQueryLoaded&&M.initializeJqueryWrapper(i,"datepicker","M_Datepicker")}(cash),function(e){"use strict";var t={dialRadius:135,outerRadius:105,innerRadius:70,tickRadius:20,duration:350,container:null,defaultTime:"now",fromNow:0,showClearBtn:!1,i18n:{cancel:"Cancel",clear:"Clear",done:"Ok"},autoClose:!1,twelveHour:!0,vibrate:!0,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null,onSelect:null},i=function(i){function n(t,i){l(this,n);var s=o(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,i));return s.el.M_Timepicker=s,s.options=e.extend({},n.defaults,i),s.id=M.guid(),s._insertHTMLIntoDOM(),s._setupModal(),s._setupVariables(),s._setupEventHandlers(),s._clockSetup(),s._pickerSetup(),s}return r(n,i),a(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this.modal.destroy(),e(this.modalEl).remove(),this.el.M_Timepicker=void 0}},{key:"_setupEventHandlers",value:function(){this._handleInputKeydownBound=this._handleInputKeydown.bind(this),this._handleInputClickBound=this._handleInputClick.bind(this),this._handleClockClickStartBound=this._handleClockClickStart.bind(this),this._handleDocumentClickMoveBound=this._handleDocumentClickMove.bind(this),this._handleDocumentClickEndBound=this._handleDocumentClickEnd.bind(this),this.el.addEventListener("click",this._handleInputClickBound),this.el.addEventListener("keydown",this._handleInputKeydownBound),this.plate.addEventListener("mousedown",this._handleClockClickStartBound),this.plate.addEventListener("touchstart",this._handleClockClickStartBound),e(this.spanHours).on("click",this.showView.bind(this,"hours")),e(this.spanMinutes).on("click",this.showView.bind(this,"minutes"))}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleInputClickBound),this.el.removeEventListener("keydown",this._handleInputKeydownBound)}},{key:"_handleInputClick",value:function(){this.open()}},{key:"_handleInputKeydown",value:function(e){e.which===M.keys.ENTER&&(e.preventDefault(),this.open())}},{key:"_handleClockClickStart",value:function(e){e.preventDefault();var t=this.plate.getBoundingClientRect(),i=t.left,s=t.top;this.x0=i+this.options.dialRadius,this.y0=s+this.options.dialRadius,this.moved=!1;var a=n._Pos(e);this.dx=a.x-this.x0,this.dy=a.y-this.y0,this.setHand(this.dx,this.dy,!1),document.addEventListener("mousemove",this._handleDocumentClickMoveBound),document.addEventListener("touchmove",this._handleDocumentClickMoveBound),document.addEventListener("mouseup",this._handleDocumentClickEndBound),document.addEventListener("touchend",this._handleDocumentClickEndBound)}},{key:"_handleDocumentClickMove",value:function(e){e.preventDefault();var t=n._Pos(e),i=t.x-this.x0,s=t.y-this.y0;this.moved=!0,this.setHand(i,s,!1,!0)}},{key:"_handleDocumentClickEnd",value:function(t){var i=this;t.preventDefault(),document.removeEventListener("mouseup",this._handleDocumentClickEndBound),document.removeEventListener("touchend",this._handleDocumentClickEndBound);var s=n._Pos(t),a=s.x-this.x0,o=s.y-this.y0;this.moved&&a===this.dx&&o===this.dy&&this.setHand(a,o),"hours"===this.currentView?this.showView("minutes",this.options.duration/2):this.options.autoClose&&(e(this.minutesView).addClass("timepicker-dial-out"),setTimeout((function(){i.done()}),this.options.duration/2)),"function"==typeof this.options.onSelect&&this.options.onSelect.call(this,this.hours,this.minutes),document.removeEventListener("mousemove",this._handleDocumentClickMoveBound),document.removeEventListener("touchmove",this._handleDocumentClickMoveBound)}},{key:"_insertHTMLIntoDOM",value:function(){this.$modalEl=e(n._template),this.modalEl=this.$modalEl[0],this.modalEl.id="modal-"+this.id;var t=document.querySelector(this.options.container);this.options.container&&t?this.$modalEl.appendTo(t):this.$modalEl.insertBefore(this.el)}},{key:"_setupModal",value:function(){var e=this;this.modal=M.Modal.init(this.modalEl,{onOpenStart:this.options.onOpenStart,onOpenEnd:this.options.onOpenEnd,onCloseStart:this.options.onCloseStart,onCloseEnd:function(){"function"==typeof e.options.onCloseEnd&&e.options.onCloseEnd.call(e),e.isOpen=!1}})}},{key:"_setupVariables",value:function(){this.currentView="hours",this.vibrate=navigator.vibrate?"vibrate":navigator.webkitVibrate?"webkitVibrate":null,this._canvas=this.modalEl.querySelector(".timepicker-canvas"),this.plate=this.modalEl.querySelector(".timepicker-plate"),this.hoursView=this.modalEl.querySelector(".timepicker-hours"),this.minutesView=this.modalEl.querySelector(".timepicker-minutes"),this.spanHours=this.modalEl.querySelector(".timepicker-span-hours"),this.spanMinutes=this.modalEl.querySelector(".timepicker-span-minutes"),this.spanAmPm=this.modalEl.querySelector(".timepicker-span-am-pm"),this.footer=this.modalEl.querySelector(".timepicker-footer"),this.amOrPm="PM"}},{key:"_pickerSetup",value:function(){var t=e('<button class="btn-flat timepicker-clear waves-effect" style="visibility: hidden;" type="button" tabindex="'+(this.options.twelveHour?"3":"1")+'">'+this.options.i18n.clear+"</button>").appendTo(this.footer).on("click",this.clear.bind(this));this.options.showClearBtn&&t.css({visibility:""});var i=e('<div class="confirmation-btns"></div>');e('<button class="btn-flat timepicker-close waves-effect" type="button" tabindex="'+(this.options.twelveHour?"3":"1")+'">'+this.options.i18n.cancel+"</button>").appendTo(i).on("click",this.close.bind(this)),e('<button class="btn-flat timepicker-close waves-effect" type="button" tabindex="'+(this.options.twelveHour?"3":"1")+'">'+this.options.i18n.done+"</button>").appendTo(i).on("click",this.done.bind(this)),i.appendTo(this.footer)}},{key:"_clockSetup",value:function(){this.options.twelveHour&&(this.$amBtn=e('<div class="am-btn">AM</div>'),this.$pmBtn=e('<div class="pm-btn">PM</div>'),this.$amBtn.on("click",this._handleAmPmClick.bind(this)).appendTo(this.spanAmPm),this.$pmBtn.on("click",this._handleAmPmClick.bind(this)).appendTo(this.spanAmPm)),this._buildHoursView(),this._buildMinutesView(),this._buildSVGClock()}},{key:"_buildSVGClock",value:function(){var e=this.options.dialRadius,t=this.options.tickRadius,i=2*e,s=n._createSVGEl("svg");s.setAttribute("class","timepicker-svg"),s.setAttribute("width",i),s.setAttribute("height",i);var a=n._createSVGEl("g");a.setAttribute("transform","translate("+e+","+e+")");var o=n._createSVGEl("circle");o.setAttribute("class","timepicker-canvas-bearing"),o.setAttribute("cx",0),o.setAttribute("cy",0),o.setAttribute("r",4);var r=n._createSVGEl("line");r.setAttribute("x1",0),r.setAttribute("y1",0);var l=n._createSVGEl("circle");l.setAttribute("class","timepicker-canvas-bg"),l.setAttribute("r",t),a.appendChild(r),a.appendChild(l),a.appendChild(o),s.appendChild(a),this._canvas.appendChild(s),this.hand=r,this.bg=l,this.bearing=o,this.g=a}},{key:"_buildHoursView",value:function(){var t=e('<div class="timepicker-tick"></div>');if(this.options.twelveHour)for(var i=1;i<13;i+=1){var n=t.clone(),s=i/6*Math.PI,a=this.options.outerRadius;n.css({left:this.options.dialRadius+Math.sin(s)*a-this.options.tickRadius+"px",top:this.options.dialRadius-Math.cos(s)*a-this.options.tickRadius+"px"}),n.html(0===i?"00":i),this.hoursView.appendChild(n[0])}else for(var o=0;o<24;o+=1){var r=t.clone(),l=o/6*Math.PI,u=o>0&&o<13?this.options.innerRadius:this.options.outerRadius;r.css({left:this.options.dialRadius+Math.sin(l)*u-this.options.tickRadius+"px",top:this.options.dialRadius-Math.cos(l)*u-this.options.tickRadius+"px"}),r.html(0===o?"00":o),this.hoursView.appendChild(r[0])}}},{key:"_buildMinutesView",value:function(){for(var t=e('<div class="timepicker-tick"></div>'),i=0;i<60;i+=5){var s=t.clone(),a=i/30*Math.PI;s.css({left:this.options.dialRadius+Math.sin(a)*this.options.outerRadius-this.options.tickRadius+"px",top:this.options.dialRadius-Math.cos(a)*this.options.outerRadius-this.options.tickRadius+"px"}),s.html(n._addLeadingZero(i)),this.minutesView.appendChild(s[0])}}},{key:"_handleAmPmClick",value:function(t){var i=e(t.target);this.amOrPm=i.hasClass("am-btn")?"AM":"PM",this._updateAmPmView()}},{key:"_updateAmPmView",value:function(){this.options.twelveHour&&(this.$amBtn.toggleClass("text-primary","AM"===this.amOrPm),this.$pmBtn.toggleClass("text-primary","PM"===this.amOrPm))}},{key:"_updateTimeFromInput",value:function(){var e=((this.el.value||this.options.defaultTime||"")+"").split(":");if(this.options.twelveHour&&void 0!==e[1]&&(e[1].toUpperCase().indexOf("AM")>0?this.amOrPm="AM":this.amOrPm="PM",e[1]=e[1].replace("AM","").replace("PM","")),"now"===e[0]){var t=new Date(+new Date+this.options.fromNow);e=[t.getHours(),t.getMinutes()],this.options.twelveHour&&(this.amOrPm=e[0]>=12&&e[0]<24?"PM":"AM")}this.hours=+e[0]||0,this.minutes=+e[1]||0,this.spanHours.innerHTML=this.hours,this.spanMinutes.innerHTML=n._addLeadingZero(this.minutes),this._updateAmPmView()}},{key:"showView",value:function(t,i){"minutes"===t&&e(this.hoursView).css("visibility");var n="hours"===t,s=n?this.hoursView:this.minutesView,a=n?this.minutesView:this.hoursView;this.currentView=t,e(this.spanHours).toggleClass("text-primary",n),e(this.spanMinutes).toggleClass("text-primary",!n),a.classList.add("timepicker-dial-out"),e(s).css("visibility","visible").removeClass("timepicker-dial-out"),this.resetClock(i),clearTimeout(this.toggleViewTimer),this.toggleViewTimer=setTimeout((function(){e(a).css("visibility","hidden")}),this.options.duration)}},{key:"resetClock",value:function(t){var i=this.currentView,n=this[i],s="hours"===i,a=n*(Math.PI/(s?6:30)),o=s&&n>0&&n<13?this.options.innerRadius:this.options.outerRadius,r=Math.sin(a)*o,l=-Math.cos(a)*o,u=this;t?(e(this.canvas).addClass("timepicker-canvas-out"),setTimeout((function(){e(u.canvas).removeClass("timepicker-canvas-out"),u.setHand(r,l)}),t)):this.setHand(r,l)}},{key:"setHand",value:function(e,t,i){var s=this,a=Math.atan2(e,-t),o="hours"===this.currentView,r=Math.PI/(o||i?6:30),l=Math.sqrt(e*e+t*t),u=o&&l<(this.options.outerRadius+this.options.innerRadius)/2,d=u?this.options.innerRadius:this.options.outerRadius;this.options.twelveHour&&(d=this.options.outerRadius),a<0&&(a=2*Math.PI+a);var c=Math.round(a/r);a=c*r,this.options.twelveHour?o?0===c&&(c=12):(i&&(c*=5),60===c&&(c=0)):o?(12===c&&(c=0),c=u?0===c?12:c:0===c?0:c+12):(i&&(c*=5),60===c&&(c=0)),this[this.currentView]!==c&&this.vibrate&&this.options.vibrate&&(this.vibrateTimer||(navigator[this.vibrate](10),this.vibrateTimer=setTimeout((function(){s.vibrateTimer=null}),100))),this[this.currentView]=c,o?this.spanHours.innerHTML=c:this.spanMinutes.innerHTML=n._addLeadingZero(c);var h=Math.sin(a)*(d-this.options.tickRadius),p=-Math.cos(a)*(d-this.options.tickRadius),v=Math.sin(a)*d,f=-Math.cos(a)*d;this.hand.setAttribute("x2",h),this.hand.setAttribute("y2",p),this.bg.setAttribute("cx",v),this.bg.setAttribute("cy",f)}},{key:"open",value:function(){this.isOpen||(this.isOpen=!0,this._updateTimeFromInput(),this.showView("hours"),this.modal.open())}},{key:"close",value:function(){this.isOpen&&(this.isOpen=!1,this.modal.close())}},{key:"done",value:function(e,t){var i=this.el.value,s=t?"":n._addLeadingZero(this.hours)+":"+n._addLeadingZero(this.minutes);this.time=s,!t&&this.options.twelveHour&&(s=s+" "+this.amOrPm),this.el.value=s,s!==i&&this.$el.trigger("change"),this.close(),this.el.focus()}},{key:"clear",value:function(){this.done(null,!0)}}],[{key:"init",value:function(e,t){return s(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,e,t)}},{key:"_addLeadingZero",value:function(e){return(e<10?"0":"")+e}},{key:"_createSVGEl",value:function(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}},{key:"_Pos",value:function(e){return e.targetTouches&&e.targetTouches.length>=1?{x:e.targetTouches[0].clientX,y:e.targetTouches[0].clientY}:{x:e.clientX,y:e.clientY}}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Timepicker}},{key:"defaults",get:function(){return t}}]),n}(u);i._template=['<div class= "modal timepicker-modal">','<div class="modal-content timepicker-container">','<div class="timepicker-digital-display">','<div class="timepicker-text-container">','<div class="timepicker-display-column">','<span class="timepicker-span-hours text-primary"></span>',":",'<span class="timepicker-span-minutes"></span>',"</div>",'<div class="timepicker-display-column timepicker-display-am-pm">','<div class="timepicker-span-am-pm"></div>',"</div>","</div>","</div>",'<div class="timepicker-analog-display">','<div class="timepicker-plate">','<div class="timepicker-canvas"></div>','<div class="timepicker-dial timepicker-hours"></div>','<div class="timepicker-dial timepicker-minutes timepicker-dial-out"></div>',"</div>",'<div class="timepicker-footer"></div>',"</div>","</div>","</div>"].join(""),M.Timepicker=i,M.jQueryLoaded&&M.initializeJqueryWrapper(i,"timepicker","M_Timepicker")}(cash),function(e){"use strict";var t={},i=function(i){function n(t,i){l(this,n);var s=o(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,i));return s.el.M_CharacterCounter=s,s.options=e.extend({},n.defaults,i),s.isInvalid=!1,s.isValidLength=!1,s._setupCounter(),s._setupEventHandlers(),s}return r(n,i),a(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.CharacterCounter=void 0,this._removeCounter()}},{key:"_setupEventHandlers",value:function(){this._handleUpdateCounterBound=this.updateCounter.bind(this),this.el.addEventListener("focus",this._handleUpdateCounterBound,!0),this.el.addEventListener("input",this._handleUpdateCounterBound,!0)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("focus",this._handleUpdateCounterBound,!0),this.el.removeEventListener("input",this._handleUpdateCounterBound,!0)}},{key:"_setupCounter",value:function(){this.counterEl=document.createElement("span"),e(this.counterEl).addClass("character-counter").css({float:"right","font-size":"12px",height:1}),this.$el.parent().append(this.counterEl)}},{key:"_removeCounter",value:function(){e(this.counterEl).remove()}},{key:"updateCounter",value:function(){var t=+this.$el.attr("data-length"),i=this.el.value.length;this.isValidLength=i<=t;var n=i;t&&(n+="/"+t,this._validateInput()),e(this.counterEl).html(n)}},{key:"_validateInput",value:function(){this.isValidLength&&this.isInvalid?(this.isInvalid=!1,this.$el.removeClass("invalid")):this.isValidLength||this.isInvalid||(this.isInvalid=!0,this.$el.removeClass("valid"),this.$el.addClass("invalid"))}}],[{key:"init",value:function(e,t){return s(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_CharacterCounter}},{key:"defaults",get:function(){return t}}]),n}(u);M.CharacterCounter=i,M.jQueryLoaded&&M.initializeJqueryWrapper(i,"characterCounter","M_CharacterCounter")}(cash),function(e){"use strict";var t={duration:200,dist:-100,shift:0,padding:0,numVisible:5,fullWidth:!1,indicators:!1,noWrap:!1,onCycleTo:null},i=function(i){function n(t,i){l(this,n);var s=o(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,i));return s.el.M_Carousel=s,s.options=e.extend({},n.defaults,i),s.hasMultipleSlides=s.$el.find(".carousel-item").length>1,s.showIndicators=s.options.indicators&&s.hasMultipleSlides,s.noWrap=s.options.noWrap||!s.hasMultipleSlides,s.pressed=!1,s.dragged=!1,s.offset=s.target=0,s.images=[],s.itemWidth=s.$el.find(".carousel-item").first().innerWidth(),s.itemHeight=s.$el.find(".carousel-item").first().innerHeight(),s.dim=2*s.itemWidth+s.options.padding||1,s._autoScrollBound=s._autoScroll.bind(s),s._trackBound=s._track.bind(s),s.options.fullWidth&&(s.options.dist=0,s._setCarouselHeight(),s.showIndicators&&s.$el.find(".carousel-fixed-item").addClass("with-indicators")),s.$indicators=e('<ul class="indicators"></ul>'),s.$el.find(".carousel-item").each((function(t,i){if(s.images.push(t),s.showIndicators){var n=e('<li class="indicator-item"></li>');0===i&&n[0].classList.add("active"),s.$indicators.append(n)}})),s.showIndicators&&s.$el.append(s.$indicators),s.count=s.images.length,s.options.numVisible=Math.min(s.count,s.options.numVisible),s.xform="transform",["webkit","Moz","O","ms"].every((function(e){var t=e+"Transform";return void 0===document.body.style[t]||(s.xform=t,!1)})),s._setupEventHandlers(),s._scroll(s.offset),s}return r(n,i),a(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.M_Carousel=void 0}},{key:"_setupEventHandlers",value:function(){var e=this;this._handleCarouselTapBound=this._handleCarouselTap.bind(this),this._handleCarouselDragBound=this._handleCarouselDrag.bind(this),this._handleCarouselReleaseBound=this._handleCarouselRelease.bind(this),this._handleCarouselClickBound=this._handleCarouselClick.bind(this),void 0!==window.ontouchstart&&(this.el.addEventListener("touchstart",this._handleCarouselTapBound),this.el.addEventListener("touchmove",this._handleCarouselDragBound),this.el.addEventListener("touchend",this._handleCarouselReleaseBound)),this.el.addEventListener("mousedown",this._handleCarouselTapBound),this.el.addEventListener("mousemove",this._handleCarouselDragBound),this.el.addEventListener("mouseup",this._handleCarouselReleaseBound),this.el.addEventListener("mouseleave",this._handleCarouselReleaseBound),this.el.addEventListener("click",this._handleCarouselClickBound),this.showIndicators&&this.$indicators&&(this._handleIndicatorClickBound=this._handleIndicatorClick.bind(this),this.$indicators.find(".indicator-item").each((function(t,i){t.addEventListener("click",e._handleIndicatorClickBound)})));var t=M.throttle(this._handleResize,200);this._handleThrottledResizeBound=t.bind(this),window.addEventListener("resize",this._handleThrottledResizeBound)}},{key:"_removeEventHandlers",value:function(){var e=this;void 0!==window.ontouchstart&&(this.el.removeEventListener("touchstart",this._handleCarouselTapBound),this.el.removeEventListener("touchmove",this._handleCarouselDragBound),this.el.removeEventListener("touchend",this._handleCarouselReleaseBound)),this.el.removeEventListener("mousedown",this._handleCarouselTapBound),this.el.removeEventListener("mousemove",this._handleCarouselDragBound),this.el.removeEventListener("mouseup",this._handleCarouselReleaseBound),this.el.removeEventListener("mouseleave",this._handleCarouselReleaseBound),this.el.removeEventListener("click",this._handleCarouselClickBound),this.showIndicators&&this.$indicators&&this.$indicators.find(".indicator-item").each((function(t,i){t.removeEventListener("click",e._handleIndicatorClickBound)})),window.removeEventListener("resize",this._handleThrottledResizeBound)}},{key:"_handleCarouselTap",value:function(t){"mousedown"===t.type&&e(t.target).is("img")&&t.preventDefault(),this.pressed=!0,this.dragged=!1,this.verticalDragged=!1,this.reference=this._xpos(t),this.referenceY=this._ypos(t),this.velocity=this.amplitude=0,this.frame=this.offset,this.timestamp=Date.now(),clearInterval(this.ticker),this.ticker=setInterval(this._trackBound,100)}},{key:"_handleCarouselDrag",value:function(e){var t=void 0,i=void 0,n=void 0;if(this.pressed)if(t=this._xpos(e),i=this._ypos(e),n=this.reference-t,Math.abs(this.referenceY-i)<30&&!this.verticalDragged)(n>2||n<-2)&&(this.dragged=!0,this.reference=t,this._scroll(this.offset+n));else{if(this.dragged)return e.preventDefault(),e.stopPropagation(),!1;this.verticalDragged=!0}if(this.dragged)return e.preventDefault(),e.stopPropagation(),!1}},{key:"_handleCarouselRelease",value:function(e){if(this.pressed)return this.pressed=!1,clearInterval(this.ticker),this.target=this.offset,(this.velocity>10||this.velocity<-10)&&(this.amplitude=.9*this.velocity,this.target=this.offset+this.amplitude),this.target=Math.round(this.target/this.dim)*this.dim,this.noWrap&&(this.target>=this.dim*(this.count-1)?this.target=this.dim*(this.count-1):this.target<0&&(this.target=0)),this.amplitude=this.target-this.offset,this.timestamp=Date.now(),requestAnimationFrame(this._autoScrollBound),this.dragged&&(e.preventDefault(),e.stopPropagation()),!1}},{key:"_handleCarouselClick",value:function(t){if(this.dragged)return t.preventDefault(),t.stopPropagation(),!1;if(!this.options.fullWidth){var i=e(t.target).closest(".carousel-item").index();0!==this._wrap(this.center)-i&&(t.preventDefault(),t.stopPropagation()),this._cycleTo(i)}}},{key:"_handleIndicatorClick",value:function(t){t.stopPropagation();var i=e(t.target).closest(".indicator-item");i.length&&this._cycleTo(i.index())}},{key:"_handleResize",value:function(e){this.options.fullWidth?(this.itemWidth=this.$el.find(".carousel-item").first().innerWidth(),this.imageHeight=this.$el.find(".carousel-item.active").height(),this.dim=2*this.itemWidth+this.options.padding,this.offset=2*this.center*this.itemWidth,this.target=this.offset,this._setCarouselHeight(!0)):this._scroll()}},{key:"_setCarouselHeight",value:function(e){var t=this,i=this.$el.find(".carousel-item.active").length?this.$el.find(".carousel-item.active").first():this.$el.find(".carousel-item").first(),n=i.find("img").first();if(n.length)if(n[0].complete){var s=n.height();if(s>0)this.$el.css("height",s+"px");else{var a=n[0].naturalWidth,o=n[0].naturalHeight,r=this.$el.width()/a*o;this.$el.css("height",r+"px")}}else n.one("load",(function(e,i){t.$el.css("height",e.offsetHeight+"px")}));else if(!e){var l=i.height();this.$el.css("height",l+"px")}}},{key:"_xpos",value:function(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}},{key:"_ypos",value:function(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}},{key:"_wrap",value:function(e){return e>=this.count?e%this.count:e<0?this._wrap(this.count+e%this.count):e}},{key:"_track",value:function(){var e,t,i,n;t=(e=Date.now())-this.timestamp,this.timestamp=e,i=this.offset-this.frame,this.frame=this.offset,n=1e3*i/(1+t),this.velocity=.8*n+.2*this.velocity}},{key:"_autoScroll",value:function(){var e=void 0,t=void 0;this.amplitude&&(e=Date.now()-this.timestamp,(t=this.amplitude*Math.exp(-e/this.options.duration))>2||t<-2?(this._scroll(this.target-t),requestAnimationFrame(this._autoScrollBound)):this._scroll(this.target))}},{key:"_scroll",value:function(t){var i=this;this.$el.hasClass("scrolling")||this.el.classList.add("scrolling"),null!=this.scrollingTimeout&&window.clearTimeout(this.scrollingTimeout),this.scrollingTimeout=window.setTimeout((function(){i.$el.removeClass("scrolling")}),this.options.duration);var n,s,a,o,r=void 0,l=void 0,u=void 0,d=void 0,c=void 0,h=void 0,p=this.center,v=1/this.options.numVisible;if(this.offset="number"==typeof t?t:this.offset,this.center=Math.floor((this.offset+this.dim/2)/this.dim),o=-(a=(s=this.offset-this.center*this.dim)<0?1:-1)*s*2/this.dim,n=this.count>>1,this.options.fullWidth?(u="translateX(0)",h=1):(u="translateX("+(this.el.clientWidth-this.itemWidth)/2+"px) ",u+="translateY("+(this.el.clientHeight-this.itemHeight)/2+"px)",h=1-v*o),this.showIndicators){var f=this.center%this.count,_=this.$indicators.find(".indicator-item.active");_.index()!==f&&(_.removeClass("active"),this.$indicators.find(".indicator-item").eq(f)[0].classList.add("active"))}if(!this.noWrap||this.center>=0&&this.center<this.count){l=this.images[this._wrap(this.center)],e(l).hasClass("active")||(this.$el.find(".carousel-item").removeClass("active"),l.classList.add("active"));var m=u+" translateX("+-s/2+"px) translateX("+a*this.options.shift*o*r+"px) translateZ("+this.options.dist*o+"px)";this._updateItemStyle(l,h,0,m)}for(r=1;r<=n;++r){if(this.options.fullWidth?(d=this.options.dist,c=r===n&&s<0?1-o:1):(d=this.options.dist*(2*r+o*a),c=1-v*(2*r+o*a)),!this.noWrap||this.center+r<this.count){l=this.images[this._wrap(this.center+r)];var y=u+" translateX("+(this.options.shift+(this.dim*r-s)/2)+"px) translateZ("+d+"px)";this._updateItemStyle(l,c,-r,y)}if(this.options.fullWidth?(d=this.options.dist,c=r===n&&s>0?1-o:1):(d=this.options.dist*(2*r-o*a),c=1-v*(2*r-o*a)),!this.noWrap||this.center-r>=0){l=this.images[this._wrap(this.center-r)];var g=u+" translateX("+(-this.options.shift+(-this.dim*r-s)/2)+"px) translateZ("+d+"px)";this._updateItemStyle(l,c,-r,g)}}if(!this.noWrap||this.center>=0&&this.center<this.count){l=this.images[this._wrap(this.center)];var b=u+" translateX("+-s/2+"px) translateX("+a*this.options.shift*o+"px) translateZ("+this.options.dist*o+"px)";this._updateItemStyle(l,h,0,b)}var k=this.$el.find(".carousel-item").eq(this._wrap(this.center));p!==this.center&&"function"==typeof this.options.onCycleTo&&this.options.onCycleTo.call(this,k[0],this.dragged),"function"==typeof this.oneTimeCallback&&(this.oneTimeCallback.call(this,k[0],this.dragged),this.oneTimeCallback=null)}},{key:"_updateItemStyle",value:function(e,t,i,n){e.style[this.xform]=n,e.style.zIndex=i,e.style.opacity=t,e.style.visibility="visible"}},{key:"_cycleTo",value:function(e,t){var i=this.center%this.count-e;this.noWrap||(i<0?Math.abs(i+this.count)<Math.abs(i)&&(i+=this.count):i>0&&Math.abs(i-this.count)<i&&(i-=this.count)),this.target=this.dim*Math.round(this.offset/this.dim),i<0?this.target+=this.dim*Math.abs(i):i>0&&(this.target-=this.dim*i),"function"==typeof t&&(this.oneTimeCallback=t),this.offset!==this.target&&(this.amplitude=this.target-this.offset,this.timestamp=Date.now(),requestAnimationFrame(this._autoScrollBound))}},{key:"next",value:function(e){(void 0===e||isNaN(e))&&(e=1);var t=this.center+e;if(t>=this.count||t<0){if(this.noWrap)return;t=this._wrap(t)}this._cycleTo(t)}},{key:"prev",value:function(e){(void 0===e||isNaN(e))&&(e=1);var t=this.center-e;if(t>=this.count||t<0){if(this.noWrap)return;t=this._wrap(t)}this._cycleTo(t)}},{key:"set",value:function(e,t){if((void 0===e||isNaN(e))&&(e=0),e>this.count||e<0){if(this.noWrap)return;e=this._wrap(e)}this._cycleTo(e,t)}}],[{key:"init",value:function(e,t){return s(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Carousel}},{key:"defaults",get:function(){return t}}]),n}(u);M.Carousel=i,M.jQueryLoaded&&M.initializeJqueryWrapper(i,"carousel","M_Carousel")}(cash),function(e){"use strict";var t={onOpen:void 0,onClose:void 0},i=function(i){function n(t,i){l(this,n);var s=o(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,i));return s.el.M_TapTarget=s,s.options=e.extend({},n.defaults,i),s.isOpen=!1,s.$origin=e("#"+s.$el.attr("data-target")),s._setup(),s._calculatePositioning(),s._setupEventHandlers(),s}return r(n,i),a(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.TapTarget=void 0}},{key:"_setupEventHandlers",value:function(){this._handleDocumentClickBound=this._handleDocumentClick.bind(this),this._handleTargetClickBound=this._handleTargetClick.bind(this),this._handleOriginClickBound=this._handleOriginClick.bind(this),this.el.addEventListener("click",this._handleTargetClickBound),this.originEl.addEventListener("click",this._handleOriginClickBound);var e=M.throttle(this._handleResize,200);this._handleThrottledResizeBound=e.bind(this),window.addEventListener("resize",this._handleThrottledResizeBound)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleTargetClickBound),this.originEl.removeEventListener("click",this._handleOriginClickBound),window.removeEventListener("resize",this._handleThrottledResizeBound)}},{key:"_handleTargetClick",value:function(e){this.open()}},{key:"_handleOriginClick",value:function(e){this.close()}},{key:"_handleResize",value:function(e){this._calculatePositioning()}},{key:"_handleDocumentClick",value:function(t){e(t.target).closest(".tap-target-wrapper").length||(this.close(),t.preventDefault(),t.stopPropagation())}},{key:"_setup",value:function(){this.wrapper=this.$el.parent()[0],this.waveEl=e(this.wrapper).find(".tap-target-wave")[0],this.originEl=e(this.wrapper).find(".tap-target-origin")[0],this.contentEl=this.$el.find(".tap-target-content")[0],e(this.wrapper).hasClass(".tap-target-wrapper")||(this.wrapper=document.createElement("div"),this.wrapper.classList.add("tap-target-wrapper"),this.$el.before(e(this.wrapper)),this.wrapper.append(this.el)),this.contentEl||(this.contentEl=document.createElement("div"),this.contentEl.classList.add("tap-target-content"),this.$el.append(this.contentEl)),this.waveEl||(this.waveEl=document.createElement("div"),this.waveEl.classList.add("tap-target-wave"),this.originEl||(this.originEl=this.$origin.clone(!0,!0),this.originEl.addClass("tap-target-origin"),this.originEl.removeAttr("id"),this.originEl.removeAttr("style"),this.originEl=this.originEl[0],this.waveEl.append(this.originEl)),this.wrapper.append(this.waveEl))}},{key:"_calculatePositioning",value:function(){var t="fixed"===this.$origin.css("position");if(!t)for(var i=this.$origin.parents(),n=0;n<i.length&&!(t="fixed"==e(i[n]).css("position"));n++);var s=this.$origin.outerWidth(),a=this.$origin.outerHeight(),o=t?this.$origin.offset().top-M.getDocumentScrollTop():this.$origin.offset().top,r=t?this.$origin.offset().left-M.getDocumentScrollLeft():this.$origin.offset().left,l=window.innerWidth,u=window.innerHeight,d=l/2,c=u/2,h=r<=d,p=r>d,v=o<=c,f=o>c,_=r>=.25*l&&r<=.75*l,m=this.$el.outerWidth(),y=this.$el.outerHeight(),g=o+a/2-y/2,b=r+s/2-m/2,k=t?"fixed":"absolute",w=_?m:m/2+s,C=y/2,x=v?y/2:0,E=h&&!_?m/2-s:0,T=s,j=f?"bottom":"top",O=2*s,L=O,D=y/2-L/2,B=m/2-O/2,$={};$.top=v?g+"px":"",$.right=p?l-b-m+"px":"",$.bottom=f?u-g-y+"px":"",$.left=h?b+"px":"",$.position=k,e(this.wrapper).css($),e(this.contentEl).css({width:w+"px",height:C+"px",top:x+"px",right:"0px",bottom:"0px",left:E+"px",padding:T+"px",verticalAlign:j}),e(this.waveEl).css({top:D+"px",left:B+"px",width:O+"px",height:L+"px"})}},{key:"open",value:function(){this.isOpen||("function"==typeof this.options.onOpen&&this.options.onOpen.call(this,this.$origin[0]),this.isOpen=!0,this.wrapper.classList.add("open"),document.body.addEventListener("click",this._handleDocumentClickBound,!0),document.body.addEventListener("touchend",this._handleDocumentClickBound))}},{key:"close",value:function(){this.isOpen&&("function"==typeof this.options.onClose&&this.options.onClose.call(this,this.$origin[0]),this.isOpen=!1,this.wrapper.classList.remove("open"),document.body.removeEventListener("click",this._handleDocumentClickBound,!0),document.body.removeEventListener("touchend",this._handleDocumentClickBound))}}],[{key:"init",value:function(e,t){return s(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_TapTarget}},{key:"defaults",get:function(){return t}}]),n}(u);M.TapTarget=i,M.jQueryLoaded&&M.initializeJqueryWrapper(i,"tapTarget","M_TapTarget")}(cash),function(e){"use strict";var t={classes:"",dropdownOptions:{}},i=function(i){function n(t,i){l(this,n);var s=o(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,i));return s.$el.hasClass("browser-default")?o(s):(s.el.M_FormSelect=s,s.options=e.extend({},n.defaults,i),s.isMultiple=s.$el.prop("multiple"),s.el.tabIndex=-1,s._keysSelected={},s._valueDict={},s._setupDropdown(),s._setupEventHandlers(),s)}return r(n,i),a(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this._removeDropdown(),this.el.M_FormSelect=void 0}},{key:"_setupEventHandlers",value:function(){var t=this;this._handleSelectChangeBound=this._handleSelectChange.bind(this),this._handleOptionClickBound=this._handleOptionClick.bind(this),this._handleInputClickBound=this._handleInputClick.bind(this),e(this.dropdownOptions).find("li:not(.optgroup)").each((function(e){e.addEventListener("click",t._handleOptionClickBound)})),this.el.addEventListener("change",this._handleSelectChangeBound),this.input.addEventListener("click",this._handleInputClickBound)}},{key:"_removeEventHandlers",value:function(){var t=this;e(this.dropdownOptions).find("li:not(.optgroup)").each((function(e){e.removeEventListener("click",t._handleOptionClickBound)})),this.el.removeEventListener("change",this._handleSelectChangeBound),this.input.removeEventListener("click",this._handleInputClickBound)}},{key:"_handleSelectChange",value:function(e){this._setValueToInput()}},{key:"_handleOptionClick",value:function(t){t.preventDefault();var i=e(t.target).closest("li")[0],n=i.id;if(!e(i).hasClass("disabled")&&!e(i).hasClass("optgroup")&&n.length){var s=!0;if(this.isMultiple){var a=e(this.dropdownOptions).find("li.disabled.selected");a.length&&(a.removeClass("selected"),a.find('input[type="checkbox"]').prop("checked",!1),this._toggleEntryFromArray(a[0].id)),s=this._toggleEntryFromArray(n)}else e(this.dropdownOptions).find("li").removeClass("selected"),e(i).toggleClass("selected",s);e(this._valueDict[n].el).prop("selected")!==s&&(e(this._valueDict[n].el).prop("selected",s),this.$el.trigger("change"))}t.stopPropagation()}},{key:"_handleInputClick",value:function(){this.dropdown&&this.dropdown.isOpen&&(this._setValueToInput(),this._setSelectedStates())}},{key:"_setupDropdown",value:function(){var t=this;this.wrapper=document.createElement("div"),e(this.wrapper).addClass("select-wrapper "+this.options.classes),this.$el.before(e(this.wrapper)),this.wrapper.appendChild(this.el),this.el.disabled&&this.wrapper.classList.add("disabled"),this.$selectOptions=this.$el.children("option, optgroup"),this.dropdownOptions=document.createElement("ul"),this.dropdownOptions.id="select-options-"+M.guid(),e(this.dropdownOptions).addClass("dropdown-content select-dropdown "+(this.isMultiple?"multiple-select-dropdown":"")),this.$selectOptions.length&&this.$selectOptions.each((function(i){if(e(i).is("option")){var n=void 0;n=t.isMultiple?t._appendOptionWithIcon(t.$el,i,"multiple"):t._appendOptionWithIcon(t.$el,i),t._addOptionToValueDict(i,n)}else if(e(i).is("optgroup")){var s=e(i).children("option");e(t.dropdownOptions).append(e('<li class="optgroup"><span>'+i.getAttribute("label")+"</span></li>")[0]),s.each((function(e){var i=t._appendOptionWithIcon(t.$el,e,"optgroup-option");t._addOptionToValueDict(e,i)}))}})),this.$el.after(this.dropdownOptions),this.input=document.createElement("input"),e(this.input).addClass("select-dropdown dropdown-trigger"),this.input.setAttribute("type","text"),this.input.setAttribute("readonly","true"),this.input.setAttribute("data-target",this.dropdownOptions.id),this.el.disabled&&e(this.input).prop("disabled","true"),this.$el.before(this.input),this._setValueToInput();var i=e('<svg class="caret" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');if(this.$el.before(i[0]),!this.el.disabled){var n=e.extend({},this.options.dropdownOptions);n.onOpenEnd=function(i){var n=e(t.dropdownOptions).find(".selected").first();if(n.length&&(M.keyDown=!0,t.dropdown.focusedIndex=n.index(),t.dropdown._focusFocusedItem(),M.keyDown=!1,t.dropdown.isScrollable)){var s=n[0].getBoundingClientRect().top-t.dropdownOptions.getBoundingClientRect().top;s-=t.dropdownOptions.clientHeight/2,t.dropdownOptions.scrollTop=s}},this.isMultiple&&(n.closeOnClick=!1),this.dropdown=M.Dropdown.init(this.input,n)}this._setSelectedStates()}},{key:"_addOptionToValueDict",value:function(e,t){var i=Object.keys(this._valueDict).length,n=this.dropdownOptions.id+i,s={};t.id=n,s.el=e,s.optionEl=t,this._valueDict[n]=s}},{key:"_removeDropdown",value:function(){e(this.wrapper).find(".caret").remove(),e(this.input).remove(),e(this.dropdownOptions).remove(),e(this.wrapper).before(this.$el),e(this.wrapper).remove()}},{key:"_appendOptionWithIcon",value:function(t,i,n){var s=i.disabled?"disabled ":"",a="optgroup-option"===n?"optgroup-option ":"",o=this.isMultiple?'<label><input type="checkbox"'+s+'"/><span>'+i.innerHTML+"</span></label>":i.innerHTML,r=e("<li></li>"),l=e("<span></span>");l.html(o),r.addClass(s+" "+a),r.append(l);var u=i.getAttribute("data-icon");if(u){var d=e('<img alt="" src="'+u+'">');r.prepend(d)}return e(this.dropdownOptions).append(r[0]),r[0]}},{key:"_toggleEntryFromArray",value:function(t){var i=!this._keysSelected.hasOwnProperty(t),n=e(this._valueDict[t].optionEl);return i?this._keysSelected[t]=!0:delete this._keysSelected[t],n.toggleClass("selected",i),n.find('input[type="checkbox"]').prop("checked",i),n.prop("selected",i),i}},{key:"_setValueToInput",value:function(){var t=[];if(this.$el.find("option").each((function(i){if(e(i).prop("selected")){var n=e(i).text();t.push(n)}})),!t.length){var i=this.$el.find("option:disabled").eq(0);i.length&&""===i[0].value&&t.push(i.text())}this.input.value=t.join(", ")}},{key:"_setSelectedStates",value:function(){for(var t in this._keysSelected={},this._valueDict){var i=this._valueDict[t],n=e(i.el).prop("selected");e(i.optionEl).find('input[type="checkbox"]').prop("checked",n),n?(this._activateOption(e(this.dropdownOptions),e(i.optionEl)),this._keysSelected[t]=!0):e(i.optionEl).removeClass("selected")}}},{key:"_activateOption",value:function(t,i){i&&(this.isMultiple||t.find("li.selected").removeClass("selected"),e(i).addClass("selected"))}},{key:"getSelectedValues",value:function(){var e=[];for(var t in this._keysSelected)e.push(this._valueDict[t].el.value);return e}}],[{key:"init",value:function(e,t){return s(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_FormSelect}},{key:"defaults",get:function(){return t}}]),n}(u);M.FormSelect=i,M.jQueryLoaded&&M.initializeJqueryWrapper(i,"formSelect","M_FormSelect")}(cash),function(e,t){"use strict";var i={},n=function(n){function u(t,i){l(this,u);var n=o(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,u,t,i));return n.el.M_Range=n,n.options=e.extend({},u.defaults,i),n._mousedown=!1,n._setupThumb(),n._setupEventHandlers(),n}return r(u,n),a(u,[{key:"destroy",value:function(){this._removeEventHandlers(),this._removeThumb(),this.el.M_Range=void 0}},{key:"_setupEventHandlers",value:function(){this._handleRangeChangeBound=this._handleRangeChange.bind(this),this._handleRangeMousedownTouchstartBound=this._handleRangeMousedownTouchstart.bind(this),this._handleRangeInputMousemoveTouchmoveBound=this._handleRangeInputMousemoveTouchmove.bind(this),this._handleRangeMouseupTouchendBound=this._handleRangeMouseupTouchend.bind(this),this._handleRangeBlurMouseoutTouchleaveBound=this._handleRangeBlurMouseoutTouchleave.bind(this),this.el.addEventListener("change",this._handleRangeChangeBound),this.el.addEventListener("mousedown",this._handleRangeMousedownTouchstartBound),this.el.addEventListener("touchstart",this._handleRangeMousedownTouchstartBound),this.el.addEventListener("input",this._handleRangeInputMousemoveTouchmoveBound),this.el.addEventListener("mousemove",this._handleRangeInputMousemoveTouchmoveBound),this.el.addEventListener("touchmove",this._handleRangeInputMousemoveTouchmoveBound),this.el.addEventListener("mouseup",this._handleRangeMouseupTouchendBound),this.el.addEventListener("touchend",this._handleRangeMouseupTouchendBound),this.el.addEventListener("blur",this._handleRangeBlurMouseoutTouchleaveBound),this.el.addEventListener("mouseout",this._handleRangeBlurMouseoutTouchleaveBound),this.el.addEventListener("touchleave",this._handleRangeBlurMouseoutTouchleaveBound)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("change",this._handleRangeChangeBound),this.el.removeEventListener("mousedown",this._handleRangeMousedownTouchstartBound),this.el.removeEventListener("touchstart",this._handleRangeMousedownTouchstartBound),this.el.removeEventListener("input",this._handleRangeInputMousemoveTouchmoveBound),this.el.removeEventListener("mousemove",this._handleRangeInputMousemoveTouchmoveBound),this.el.removeEventListener("touchmove",this._handleRangeInputMousemoveTouchmoveBound),this.el.removeEventListener("mouseup",this._handleRangeMouseupTouchendBound),this.el.removeEventListener("touchend",this._handleRangeMouseupTouchendBound),this.el.removeEventListener("blur",this._handleRangeBlurMouseoutTouchleaveBound),this.el.removeEventListener("mouseout",this._handleRangeBlurMouseoutTouchleaveBound),this.el.removeEventListener("touchleave",this._handleRangeBlurMouseoutTouchleaveBound)}},{key:"_handleRangeChange",value:function(){e(this.value).html(this.$el.val()),e(this.thumb).hasClass("active")||this._showRangeBubble();var t=this._calcRangeOffset();e(this.thumb).addClass("active").css("left",t+"px")}},{key:"_handleRangeMousedownTouchstart",value:function(t){if(e(this.value).html(this.$el.val()),this._mousedown=!0,this.$el.addClass("active"),e(this.thumb).hasClass("active")||this._showRangeBubble(),"input"!==t.type){var i=this._calcRangeOffset();e(this.thumb).addClass("active").css("left",i+"px")}}},{key:"_handleRangeInputMousemoveTouchmove",value:function(){if(this._mousedown){e(this.thumb).hasClass("active")||this._showRangeBubble();var t=this._calcRangeOffset();e(this.thumb).addClass("active").css("left",t+"px"),e(this.value).html(this.$el.val())}}},{key:"_handleRangeMouseupTouchend",value:function(){this._mousedown=!1,this.$el.removeClass("active")}},{key:"_handleRangeBlurMouseoutTouchleave",value:function(){if(!this._mousedown){var i=7+parseInt(this.$el.css("padding-left"))+"px";e(this.thumb).hasClass("active")&&(t.remove(this.thumb),t({targets:this.thumb,height:0,width:0,top:10,easing:"easeOutQuad",marginLeft:i,duration:100})),e(this.thumb).removeClass("active")}}},{key:"_setupThumb",value:function(){this.thumb=document.createElement("span"),this.value=document.createElement("span"),e(this.thumb).addClass("thumb"),e(this.value).addClass("value"),e(this.thumb).append(this.value),this.$el.after(this.thumb)}},{key:"_removeThumb",value:function(){e(this.thumb).remove()}},{key:"_showRangeBubble",value:function(){var i=-7+parseInt(e(this.thumb).parent().css("padding-left"))+"px";t.remove(this.thumb),t({targets:this.thumb,height:30,width:30,top:-30,marginLeft:i,duration:300,easing:"easeOutQuint"})}},{key:"_calcRangeOffset",value:function(){var e=this.$el.width()-15,t=parseFloat(this.$el.attr("max"))||100,i=parseFloat(this.$el.attr("min"))||0;return(parseFloat(this.$el.val())-i)/(t-i)*e}}],[{key:"init",value:function(e,t){return s(u.__proto__||Object.getPrototypeOf(u),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Range}},{key:"defaults",get:function(){return i}}]),u}(u);M.Range=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"range","M_Range"),n.init(e("input[type=range]"))}(cash,M.anime)}).call(this,i(6))},function(e,t){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(e){"object"==typeof window&&(i=window)}e.exports=i},function(e,t,i){"use strict";i.r(t);var n=i(0);class s{constructor(e){this.steps=["restore-script-upload-step","backup-upload-step","restore-remote-backup-step","restore-remote-database-step","restore-finish-step"],this.ajaxurl=ajaxurl+"?action=restore_backup",this.cancel=!1,this.upload_file_event=new Event("upload_file_event"),this.resume={},this.hash=e,this.file_counter=0,document.addEventListener("backup_upload_finish",(function(e){jQuery(".xcloner-restore .backup-upload-step .toggler").removeClass("cancel")}),!1),document.addEventListener("remote_restore_backup_finish",(function(e){jQuery(".xcloner-restore .restore-remote-backup-step .toggler").removeClass("cancel")}),!1),document.addEventListener("remote_restore_mysql_backup_finish",(function(e){jQuery(".xcloner-restore .restore-remote-database-step .toggler").removeClass("cancel")}),!1),document.addEventListener("xcloner_populate_remote_backup_files_list",(function(e){var t=e.detail.files,i=jQuery(".xcloner-restore #remote_backup_file").val();for(var n in jQuery(".xcloner-restore #remote_backup_file").find("option").not(":first").remove(),t){var s="not-selected";(t[n].selected||i==t[n].path)&&(s="selected"),jQuery(".xcloner-restore #remote_backup_file").append("<option value='"+t[n].path+"' "+s+">"+t[n].path+"("+e.detail.$this.getSize(t[n].size)+" MB)</option>").addClass("file")}}),!1),document.addEventListener("xcloner_populate_remote_mysqldump_files_list",(function(e){var t=e.detail.files,i=jQuery(".xcloner-restore #remote_database_file").val();for(var n in jQuery(".xcloner-restore #remote_database_file").find("option").not(":first").remove(),t){if(t[n].selected||i==t[n].path)var s="selected";else s="not-selected";jQuery(".xcloner-restore #remote_database_file").append("<option value='"+t[n].path+"' "+s+">"+t[n].path+"("+e.detail.$this.getSize(t[n].size)+" MB) "+t[n].timestamp+"</option>").addClass("file")}}),!1),document.addEventListener("xcloner_restore_next_step",(function(e){if(void 0!==e.detail.$this){var t=e.detail.$this;jQuery(".xcloner-restore li."+t.steps[t.set_current_step]).show().find(".collapsible-header").trigger("click")}}),!1),document.addEventListener("xcloner_restore_update_progress",(function(e){void 0!==e.detail.percent&&(jQuery(".xcloner-restore .steps.active .progress").show(),"indeterminate"==e.detail.class&&jQuery(".xcloner-restore .steps.active .progress > div").addClass(e.detail.class).removeClass("determinate"),"determinate"==e.detail.class&&jQuery(".xcloner-restore .steps.active .progress > div").addClass(e.detail.class).removeClass("indeterminate"),100==e.detail.percent?jQuery(".xcloner-restore .steps.active .progress > div").removeClass("indeterminate").addClass("determinate").css("width",e.detail.percent+"%"):jQuery(".xcloner-restore .steps.active .progress .determinate").css("width",e.detail.percent+"%"))}),!1),document.addEventListener("xcloner_restore_display_status_text",(function(e){void 0===e.detail.status&&(e.detail.status="updated"),void 0!==e.detail.message&&jQuery(".xcloner-restore .steps.active .status").html("<div class='"+e.detail.status+"'>"+e.detail.message+"</div>")}),!1),document.addEventListener("remote_restore_update_files_list",(function(e){if(void 0!==e.detail.files&&e.detail.files.length){for(var t=[],i=0;i<e.detail.files.length;i++)t[i]="<li>"+e.detail.files[i]+"</li>";jQuery(".xcloner-restore .restore-remote-backup-step .files-list").is(":hidden")||jQuery(".xcloner-restore .restore-remote-backup-step .files-list").html(t.reverse().join("\n"))}else jQuery.isArray(e.detail.files)||jQuery(".xcloner-restore .restore-remote-backup-step .files-list").html("")}),!1),document.addEventListener("xcloner_restore_display_query_box",(function(e){e.detail.query?(jQuery(".xcloner-restore .query-box").show(),jQuery(".xcloner-restore .query-list").val(e.detail.query)):(jQuery(".xcloner-restore .query-box").hide(),jQuery(".xcloner-restore .query-list").val(""))}),!1),document.addEventListener("xcloner_restore_finish",(function(e){jQuery(".xcloner-restore #xcloner_restore_finish").show(),jQuery(".xcloner-restore #open_target_site a").removeAttr("disabled")}),!1)}get_remote_backup_files_callback(e,t){if(t){var i=e.statusText.files;document.dispatchEvent(new CustomEvent("xcloner_populate_remote_backup_files_list",{detail:{files:i,$this:this}}))}}get_remote_backup_files(){this.set_cancel(!1);var e={};e.local_backup_file=jQuery(".xcloner-restore .backup-upload-step #backup_file").val(),this.do_ajax("get_remote_backup_files_callback","list_backup_archives",e)}get_remote_mysqldump_files_callback(e,t){if(t){var i=e.statusText.files;document.dispatchEvent(new CustomEvent("xcloner_populate_remote_mysqldump_files_list",{detail:{files:i,$this:this}}))}}get_remote_mysqldump_files(){if(this.set_cancel(!1),this.resume.callback="","get_remote_mysqldump_files_callback"==this.resume.callback)return this.do_ajax(this.resume.callback,this.resume.action,this.resume.params),void(this.resume={});var e={};e.backup_file=this.get_backup_file(),this.do_ajax("get_remote_mysqldump_files_callback","list_mysqldump_backups",e)}get_backup_file(){return jQuery(".xcloner-restore #remote_backup_file").val()}remote_restore_backup_file_callback(e,t,i={}){if(!t)return document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text",{detail:{status:"error",message:e.status+" "+e.statusText}})),document.dispatchEvent(new CustomEvent("xcloner_restore_update_progress",{detail:{percent:100}})),void document.dispatchEvent(new CustomEvent("remote_restore_backup_finish"));var n=parseInt(e.statusText.start)+parseInt(e.statusText.processed);if(e.statusText.extracted_files&&document.dispatchEvent(new CustomEvent("remote_restore_update_files_list",{detail:{files:e.statusText.extracted_files}})),!e.statusText.finished)return i.start=e.statusText.start,i.part=e.statusText.part,i.processed=e.statusText.processed,document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text",{detail:{message:"Processing <strong>"+e.statusText.backup_file+"</strong>- processed "+this.getSize(n,1024)+" KB from archive"}})),void this.do_ajax("remote_restore_backup_file_callback","restore_backup_to_path",i);document.dispatchEvent(new CustomEvent("xcloner_restore_update_progress",{detail:{percent:100}})),document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text",{detail:{message:"Done restoring <strong>"+e.statusText.backup_file+"</strong>."}})),document.dispatchEvent(new CustomEvent("remote_restore_backup_finish")),this.cancel=!1}remote_restore_backup_file(e){var t={};if(t.backup_file=e,t.filter_files=jQuery(".xcloner-restore input[name=filter_files]:checked").val(),"remote_restore_backup_file_callback"==this.resume.callback)return this.do_ajax(this.resume.callback,this.resume.action,this.resume.params),void(this.resume={});document.dispatchEvent(new CustomEvent("xcloner_restore_update_progress",{detail:{percent:0,class:"indeterminate"}})),document.dispatchEvent(new CustomEvent("remote_restore_update_files_list",{detail:{files:""}})),this.do_ajax("remote_restore_backup_file_callback","restore_backup_to_path",t)}remote_restore_mysql_backup_file_callback(e,t,i={}){if(!e)return this.set_cancel(!0),void document.dispatchEvent(new CustomEvent("remote_restore_mysql_backup_finish"));if(!t)return this.start=e.statusText.start,document.dispatchEvent(new CustomEvent("xcloner_restore_display_query_box",{detail:{query:e.statusText.query}})),document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text",{detail:{status:"error",message:e.status+" "+e.statusText.message}})),void document.dispatchEvent(new CustomEvent("remote_restore_mysql_backup_finish"));document.dispatchEvent(new CustomEvent("xcloner_restore_display_query_box",{detail:{query:""}})),i.query="";parseInt(e.statusText.start),parseInt(e.statusText.processed);if(!e.statusText.finished){i.start=e.statusText.start,i.processed=e.statusText.processed,this.start=i.start;var n=0;return e.statusText.backup_size&&(n=100*parseInt(e.statusText.start)/parseInt(e.statusText.backup_size)),document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text",{detail:{message:"Processing <strong>"+e.statusText.backup_file+"</strong>- wrote "+this.getSize(e.statusText.start,1024)+" KB of data"}})),document.dispatchEvent(new CustomEvent("xcloner_restore_update_progress",{detail:{percent:n}})),void this.do_ajax("remote_restore_mysql_backup_file_callback","restore_mysql_backup",i)}document.dispatchEvent(new CustomEvent("xcloner_restore_update_progress",{detail:{percent:100}})),document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text",{detail:{message:"Done restoring <strong>"+e.statusText.backup_file+"</strong>."}})),document.dispatchEvent(new CustomEvent("remote_restore_mysql_backup_finish")),this.cancel=!1}remote_restore_mysql_backup_file(e){this.set_cancel(!1);var t={};if(t.mysqldump_file=e,t.query="",t.start=0,jQuery(".xcloner-restore .query-box .query-list").val()&&(t.query=jQuery(".xcloner-restore .query-box .query-list").val(),t.start=this.start),document.dispatchEvent(new CustomEvent("xcloner_restore_display_query_box",{detail:{query:""}})),"remote_restore_mysql_backup_file_callback"==this.resume.callback)return this.do_ajax(this.resume.callback,this.resume.action,this.resume.params),void(this.resume={});this.do_ajax("remote_restore_mysql_backup_file_callback","restore_mysql_backup",t)}restore_finish_callback(e,t,i={}){if(!t)return document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text",{detail:{status:"error",message:e.statusText,$this:this}})),!1;document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text",{detail:{message:e.statusText,$this:this}})),document.dispatchEvent(new CustomEvent("xcloner_restore_finish",{detail:{message:e.statusText,$this:this}}))}restore_finish(){this.set_cancel(!1);var e={};e.backup_archive=jQuery(".xcloner-restore #remote_backup_file").val(),e.delete_backup_temporary_folder=0,e.delete_restore_script=0,e.update_remote_site_url=0,jQuery(".xcloner-restore #delete_backup_temporary_folder").is(":checked")&&(e.delete_backup_temporary_folder=1),jQuery(".xcloner-restore #delete_restore_script").is(":checked")&&(e.delete_restore_script=1),jQuery(".xcloner-restore #update_remote_site_url").is(":checked")&&(e.update_remote_site_url=1),jQuery(".xcloner-restore #delete_backup_archive").is(":checked")&&(e.delete_backup_archive=1),this.do_ajax("restore_finish_callback","restore_finish",e)}upload_backup_file(e){var t={};if(this.set_cancel(!1),"upload_backup_file_callback"==this.resume.callback)return this.do_ajax(this.resume.callback,this.resume.action,this.resume.params),void(this.resume={});t.file=e,t.start=0,document.dispatchEvent(new CustomEvent("backup_upload_start")),document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text",{detail:{message:"Uploading backup 0%"}})),document.dispatchEvent(new CustomEvent("xcloner_restore_update_progress",{detail:{percent:0}})),this.do_ajax("upload_backup_file_callback","restore_upload_backup",t)}upload_backup_file_callback(e,t,i={}){if(!t)return document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text",{detail:{status:"error",message:e.status+" "+e.statusText}})),void document.dispatchEvent(new CustomEvent("xcloner_restore_update_progress",{detail:{percent:100}}));if(e&&(!1!==e.start||e.part<e.total_parts)){var n=0;if(e.total_size){e.start||(e.start=0);var s=parseInt(e.start)+parseInt(e.uploaded_size);n=100*parseInt(s)/parseInt(e.total_size)}var a="";e.part>0&&(a="part "+e.part+" - "),document.dispatchEvent(new CustomEvent("xcloner_restore_update_progress",{detail:{percent:n}})),document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text",{detail:{message:"Uploading backup "+a+parseFloat(n).toFixed(2)+"%"}})),i.start=e.start,i.part=e.part,i.uploaded_size=e.uploaded_size,this.do_ajax("upload_backup_file_callback","restore_upload_backup",i)}else this.cancel=!1,document.dispatchEvent(new CustomEvent("backup_upload_finish")),document.dispatchEvent(new CustomEvent("xcloner_restore_update_progress",{detail:{percent:100}})),document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text",{detail:{message:"Done."}}))}open_target_site(e){var t=jQuery(".xcloner-restore #remote_restore_url").val();t||jQuery(".xcloner-restore #wp_home_url").val(),jQuery(e).attr("href",t)}next_step(e=0){this.set_current_step=jQuery(".xcloner-restore li.active").attr("data-step"),this.set_current_step=parseInt(this.set_current_step)+parseInt(e),document.dispatchEvent(new CustomEvent("xcloner_restore_next_step",{detail:{$this:this}}))}list_backup_content_callback(e,t,i={}){if(e.error)return jQuery("#backup_cotent_modal .files-list").addClass("error").prepend(e.statusText),void jQuery("#backup_cotent_modal .progress > div").addClass("determinate").removeClass(".indeterminate").css("width","100%");var n=[];for(var s in e.files)this.file_counter++,n[s]="<li>"+this.file_counter+". <span title='"+e.files[s].mtime+"'>"+e.files[s].path+"</span> ("+e.files[s].size+" bytes)</li>";jQuery("#backup_cotent_modal .modal-content .files-list").prepend(n.reverse().join("\n")),!e.finished&&jQuery("#backup_cotent_modal").is(":visible")?(i.start=e.start,i.part=e.part,this.do_ajax("list_backup_content_callback","list_backup_files",i)):jQuery("#backup_cotent_modal .progress > div").addClass("determinate").removeClass(".indeterminate").css("width","100%")}list_backup_content(e){this.file_counter=0,jQuery("#backup_cotent_modal .modal-content .files-list").text("").removeClass("error"),jQuery("#backup_cotent_modal .modal-content .backup-name").text(e);var t=document.querySelector("#backup_cotent_modal");M.Modal.init(t).open(),jQuery("#backup_cotent_modal .progress > div").removeClass("determinate").addClass("indeterminate");var i={};i.file=e,i.start=0,i.part=0,this.do_ajax("list_backup_content_callback","list_backup_files",i)}init_resume(){this.resume={},jQuery(".xcloner-restore .steps.active .progress").is(":visible")&&document.dispatchEvent(new CustomEvent("xcloner_restore_update_progress",{detail:{percent:0}})),jQuery(".xcloner-restore .steps.active .status").html()&&document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text",{detail:{message:""}})),document.dispatchEvent(new CustomEvent("remote_restore_update_files_list",{detail:{files:""}}))}do_ajax(e,t="",i={}){if("restore_upload_backup"==t&&(i.action="restore_upload_backup"),i.xcloner_action=t,i.hash=this.hash,i.API_ID=Object(n.ID)(),void 0!==typeof XCLONER_WPNONCE&&(i._wpnonce=XCLONER_WPNONCE),!0===this.cancel)return this.resume.callback=e,this.resume.action=t,void(this.resume.params=i);var s=this;jQuery(".xcloner-restore .steps.active").addClass("active_status"),this.request=jQuery.ajax({url:this.ajaxurl,dataType:"json",type:"POST",crossDomain:!0,data:i,error:function(n,a,o){s.resume.callback=e,s.resume.action=t,s.resume.params=i,document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text",{detail:{status:"error",message:n.status+" "+n.statusText}})),s[e](n,!1)}}).done((function(n){n||(s.resume.callback=e,s.resume.action=t,s.resume.params=i,document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text",{detail:{status:"error",message:"Lost connection with the API, please try and authentificate again"}}))),n&&200!=n.status?n.error?document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text",{detail:{status:"error",message:n.message}})):s[e](n,!1,i):s[e](n,!0,i)}))}set_current_step(e){this.set_current_step=e}set_cancel(e){e&&document.dispatchEvent(new CustomEvent("xcloner_restore_update_progress",{detail:{percent:0,class:"determinate"}})),this.cancel=e}get_cancel(e){return this.cancel}getSize(e,t=1048576){return(e/t).toFixed(2)}}jQuery(document).ready((function(){if("undefined"!=typeof xcloner_auth_key)var e=new s(xcloner_auth_key);else e=new s;e.set_current_step(0),jQuery(".col select").formSelect(),jQuery(".xcloner-restore .upload-backup.cancel").on("click",(function(){e.set_cancel(!0)})),jQuery(".xcloner-restore .upload-backup").on("click",(function(){jQuery(this).hasClass("cancel")?e.set_cancel(!0):e.set_cancel(!1);var t=jQuery(".xcloner-restore #backup_file").val();t?(jQuery(this).parent().toggleClass("cancel"),e.get_cancel()||e.upload_backup_file(t)):document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text",{detail:{status:"error",message:"Please select a backup file from the list above"}}))})),jQuery(".xcloner-restore #skip_upload_backup").on("click",(function(){e.set_cancel(!0),e.next_step()})),jQuery(".xcloner-restore #skip_restore_remote_database_step").on("click",(function(){e.set_cancel(!0),e.next_step()})),jQuery(".xcloner-restore li.steps").on("click",(function(){e.set_current_step=jQuery(this).attr("data-step")-1})),jQuery(".xcloner-restore #skip_remote_backup_step").on("click",(function(){e.set_cancel(!0),e.next_step()})),jQuery(".xcloner-restore .restore-remote-backup-step .collapsible-header").click((function(){e.get_remote_backup_files()})),jQuery(".xcloner-restore .restore-remote-database-step .collapsible-header").click((function(){e.get_remote_mysqldump_files()})),jQuery(".xcloner-restore #remote_backup_file").on("change",(function(){e.init_resume()})),jQuery(".xcloner-restore #backup_file").on("change",(function(){e.init_resume()})),jQuery(".xcloner-restore #restore_finish").click((function(){e.restore_finish()})),jQuery(".xcloner-restore #open_target_site a").click((function(){e.open_target_site(this)})),jQuery(".xcloner-restore #refresh_remote_backup_file").on("click",(function(t){document.dispatchEvent(new CustomEvent("xcloner_restore_update_progress",{detail:{percent:0}})),e.resume={},e.get_remote_backup_files(),t.stopPropagation()})),jQuery(".xcloner-restore #refresh_database_file").on("click",(function(t){document.dispatchEvent(new CustomEvent("xcloner_restore_update_progress",{detail:{percent:0}})),e.resume={},e.get_remote_mysqldump_files(),t.stopPropagation()})),jQuery(".xcloner-restore #toggle_file_restore_display").on("click",(function(e){jQuery(".xcloner-restore .restore-remote-backup-step .files-list").toggle()})),jQuery(".xcloner-restore .restore_remote_mysqldump").on("click",(function(t){jQuery(this).hasClass("cancel")?e.set_cancel(!0):e.set_cancel(!1),this.remote_database_file=jQuery(".xcloner-restore #remote_database_file").val(),this.remote_database_file?(jQuery(this).parent().toggleClass("cancel"),e.get_cancel()||(document.dispatchEvent(new CustomEvent("xcloner_restore_update_progress",{detail:{percent:0,class:"determinate"}})),e.remote_restore_mysql_backup_file(this.remote_database_file))):document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text",{detail:{status:"error",message:"Please select a mysqld backup file from the list"}}))})),jQuery(".xcloner-restore .list-backup-content").on("click",(function(t){var i=jQuery(".xcloner-restore #remote_backup_file").val();i&&e.list_backup_content(i),t.preventDefault()})),jQuery(".xcloner-restore .restore-remote-backup-step .restore_remote_backup").click((function(){e.set_cancel(jQuery(this).hasClass("cancel")),this.backup_file=jQuery(".xcloner-restore #remote_backup_file").val(),this.backup_file?(jQuery(this).parent().toggleClass("cancel"),e.get_cancel()||(document.dispatchEvent(new CustomEvent("xcloner_restore_update_progress",{detail:{percent:0,class:"indeterminate"}})),e.remote_restore_backup_file(this.backup_file))):document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text",{detail:{status:"error",message:"Please select a backup file from the list above"}}))}))}))},function(e,t,i){"use strict";i.r(t);var n,s=i(0);document.addEventListener("DOMContentLoaded",(function(){var e=document.querySelector("#edit_schedule");n=M.Modal.init(e)})),jQuery(document).ready((function(){var e=new class{constructor(){this.edit_modal=jQuery("#edit_schedule")}get_form_params(){}get_schedule_by_id(e){var t=this;e&&jQuery.ajax({url:XCLONER_AJAXURL,data:{action:"get_schedule_by_id",id:e},success:function(i){i.id==e&&t.create_modal(i)},dataType:"json"})}delete_schedule_by_id(e,t,i){e&&jQuery.ajax({url:XCLONER_AJAXURL,data:{action:"delete_schedule_by_id",id:e},success:function(e){jQuery(t).parents("tr").remove(),i.row(jQuery(t).parents("tr")).remove().draw()},dataType:"json"})}create_modal(e){this.edit_modal.find("#schedule_id").text(e.id),1==e.status?this.edit_modal.find("#status").attr("checked","checked"):this.edit_modal.find("#status").removeAttr("checked"),this.edit_modal.find("#schedule_id").text(e.id),this.edit_modal.find("#schedule_id_hidden").val(e.id),this.edit_modal.find("#schedule_name").val(e.name),this.edit_modal.find("#backup_name").val(e.backup_params.backup_name),this.edit_modal.find("#email_notification").val(e.backup_params.email_notification),this.edit_modal.find("#diff_start_date").val(e.backup_params.diff_start_date),this.edit_modal.find('#schedule_frequency>option[value="'+e.recurrence+'"]').prop("selected",!0),this.edit_modal.find('#backup_type>option[value="'+e.backup_type+'"]').prop("selected",!0),this.edit_modal.find('#schedule_storage>option[value="'+e.remote_storage+'"]').prop("selected",!0),this.edit_modal.find("#schedule_start_date").val(e.start_at),void 0!==e.backup_params.backup_encrypt&&1==e.backup_params.backup_encrypt&&this.edit_modal.find("#backup_encrypt").attr("checked","checked"),void 0!==e.backup_params.backup_delete_after_remote_transfer&&1==e.backup_params.backup_delete_after_remote_transfer&&this.edit_modal.find("#backup_delete_after_remote_transfer").attr("checked","checked");var t=jQuery.parseJSON(e.table_params),i="";for(var s in t)for(var a in t[s])i+=s+"."+t[s][a]+"\n";this.edit_modal.find("#table_params").val(i);var o=jQuery.parseJSON(e.excluded_files),r="";for(var a in o)r+=o[a]+"\n";this.edit_modal.find("#excluded_files").val(r),jQuery(".col select").formSelect(),M.updateTextFields(),n.open()}save_schedule(e,t){var i=jQuery(e).serialize();jQuery.ajax({url:XCLONER_AJAXURL,dataType:"json",type:"POST",data:i,error:function(e){alert("Error saving schedule!")}}).done((function(e){void 0===e.error?(n.close(),t.ajax.reload()):alert("Error saving schedule!"+e.error)}))}IsJsonString(e){try{JSON.parse(e)}catch(e){return!1}return!0}};jQuery("select[required]").css({display:"block",height:0,padding:0,width:0,position:"absolute"});let t=jQuery("#scheduled_backups").DataTable({responsive:!0,bFilter:!1,order:[[3,"desc"]],buttons:["selectAll","selectNone"],language:{emptyTable:"No schedules available",buttons:{selectAll:"Select all items",selectNone:"Select none"}},columnDefs:[{targets:"no-sort",orderable:!1},{className:"hide-on-med-and-down",targets:[3,5]}],ajax:XCLONER_AJAXURL+"&action=get_scheduler_list",fnDrawCallback:function(i){jQuery(this).off("click",".edit").on("click",".edit",(function(){var t=jQuery(this).attr("href").substr(1);e.get_schedule_by_id(t)})),jQuery(this).off("click",".delete").on("click",".delete",(function(){var i=jQuery(this).attr("href").substr(1);if(confirm("Are you sure you want to delete it?"))e.delete_schedule_by_id(i,this,t)})),jQuery("span.shorten_string").each((function(){Object(s.doShortText)(jQuery(this))})),jQuery("span.shorten_string").click((function(){jQuery(this).toggleClass("full"),Object(s.doShortText)(jQuery(this))}))}});jQuery("#save_schedule").on("submit",(function(){return e.save_schedule(jQuery(this),t),!1})),"function"==typeof jQuery(".timepicker").pickatime&&jQuery(".timepicker").pickatime({default:"now",min:[7,30],twelvehour:!1,donetext:"OK",autoclose:!1,vibrate:!0}),"function"==typeof jQuery(".timepicker").pickadate&&(jQuery(".datepicker").pickadate({format:"d mmmm yyyy",selectMonths:!0,selectYears:15,min:.1,onSet:function(){}}),jQuery(".datepicker_max_today").pickadate({format:"yyyy-mm-dd",selectMonths:!0,selectYears:15,max:.1,onSet:function(){}}))}))}]);
3
  //# sourceMappingURL=index.min.js.map
1
+ /*!
2
+
3
+ For license information please see index.min.js.LICENSE.txt
4
+
5
+ To view source code please see https://github.com/watchfulli/XCloner-Wordpress/
6
+ */
7
  !function(e){var t={};function i(n){if(t[n])return t[n].exports;var s=t[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)i.d(n,s,function(t){return e[t]}.bind(null,s));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=4)}([function(e,t,i){"use strict";i.r(t),i.d(t,"error_modal",(function(){return o})),i.d(t,"next_tab",(function(){return r})),i.d(t,"doShortText",(function(){return l})),i.d(t,"show_ajax_error",(function(){return u})),i.d(t,"ID",(function(){return d})),i.d(t,"getUrlParam",(function(){return c}));var n=i(2),s=i(3),a=i(1);let o;document.addEventListener("DOMContentLoaded",(function(){var e=document.querySelector("#error_modal");o=M.Modal.init(e)})),jQuery,jQuery(document).ready((function(){jQuery(".tooltipped").tooltip(),jQuery(".collapsible").collapsible(),jQuery("span.shorten_string").click((function(){jQuery(this).toggleClass("full"),l(jQuery(this))})),jQuery("span.shorten_string").each((function(){l(jQuery(this))})),jQuery("#xcloner_regex_exclude").on("focus",(function(){jQuery("ul.xcloner_regex_exclude_limit li").fadeIn()})),jQuery(".regex_pattern").on("click",(function(){jQuery(this).select()})),jQuery(".btn.system_info_toggle").on("click",(function(){jQuery(".additional_system_info").toggle()})),jQuery("a.download-logger").on("click",(function(e){var t=new a.Xcloner_Manage_Backups,i=jQuery(this).attr("href").substr(1);i&&t.download_backup_by_name(i),e.preventDefault()})),jQuery(".nav-tab-wrapper.content li").on("click",(function(e){jQuery(".nav-tab-wrapper li a").removeClass("nav-tab-active"),jQuery(this).find("a").addClass("nav-tab-active"),jQuery(".nav-tab-wrapper-content .tab-content").removeClass("active"),jQuery(".nav-tab-wrapper-content "+jQuery(this).find("a").attr("href")).addClass("active"),e.preventDefault(),location.hash=jQuery(this).find("a").attr("href")+"_hash"}));var e=window.location.hash;e&&r(e.replace("_hash",""))}));const r=function(e){jQuery(".nav-tab-wrapper").find("li a[href='"+e+"']").trigger("click"),location.hash=e},l=function(e){if(e.hasClass("full"))e.text(e.attr("data-text"));else{var t=e.text(),i=t.length,n=t.substr(0,10),s=t.substr(i-20,i);e.attr("data-text",t).text(n+"..."+s)}},u=function(e,t,i){"undefined"!=typeof xcloner_backup&&xcloner_backup.cancel_backup(),i&&void 0!==i.responseText&&(t=t+": "+i.responseText),jQuery("#error_modal .title").text(e),jQuery("#error_modal .msg").text(t),i&&i.status&&jQuery("#error_modal .status").text(i.status+" "+i.statusText),jQuery("#error_modal .body").text(JSON.stringify(i)),o.open()},d=function(){return"_"+Math.random().toString(36).substr(2,9)},c=function(e){return(location.search.split(e+"=")[1]||"").split("&")[0]};jQuery(document).ready((function(){window.remote_storage=new n.Xcloner_Remote_Storage,window.xcloner_backup=new s.Xcloner_Backup,window.xcloner_manage_backups=new a.Xcloner_Manage_Backups,window.ID=d,window.getUrlParam=c,window.show_ajax_error=u,window.doShortText=l,window.dataTable=null,window.next_tab=r}))},function(e,t,i){"use strict";i.r(t),i.d(t,"Xcloner_Manage_Backups",(function(){return l}));var n,s,a,o,r;i(0);document.addEventListener("DOMContentLoaded",(function(){var e=document.querySelector("#backup_cotent_modal");n=M.Modal.init(e);e=document.querySelector("#backup_encryption_modal");s=M.Modal.init(e);e=document.querySelector("#backup_decryption_modal");a=M.Modal.init(e);e=document.querySelector("#remote_storage_modal");o=M.Modal.init(e);e=document.querySelector("#local_storage_upload_modal");r=M.Modal.init(e)}));class l{constructor(){this.file_counter=0,this.storage_selection="",this.dataTable=""}download_backup_by_name(e){return window.open(XCLONER_AJAXURL+"&action=download_backup_by_name&name="+e+"&storage_selection="+this.storage_selection),!1}delete_backup_by_name(e,t,i){e&&jQuery.ajax({url:XCLONER_AJAXURL,method:"post",data:{action:"delete_backup_by_name",name:e,storage_selection:this.storage_selection},success:function(e){e.finished?i.row(jQuery(t).parents("tr")).remove().draw():alert("There was an error deleting the file")},dataType:"json"})}list_backup_content_callback(e,t=0,i=0){var n=this;e&&jQuery.ajax({url:XCLONER_AJAXURL,method:"post",data:{action:"list_backup_files",file:e,start:t,part:i},success:function(t){if(t.error)return jQuery("#backup_cotent_modal .files-list").addClass("error").prepend(t.message),void jQuery("#backup_cotent_modal .progress > div").addClass("determinate").removeClass(".indeterminate").css("width","100%");var i=[];for(var s in t.files){if(void 0!==t.total_size)parseInt(100*t.start),parseInt(t.total_size);n.file_counter++,i[s]="<li>"+n.file_counter+". <span title='"+t.files[s].mtime+"'>"+t.files[s].path+"</span> ("+t.files[s].size+" bytes)</li>"}jQuery("#backup_cotent_modal .modal-content .files-list").prepend(i.reverse().join("\n")),!t.finished&&jQuery("#backup_cotent_modal").is(":visible")?n.list_backup_content_callback(e,t.start,t.part):jQuery("#backup_cotent_modal .progress > div").addClass("determinate").removeClass(".indeterminate").css("width","100%")},error:function(e,t,i){jQuery("#backup_cotent_modal .files-list").addClass("error").prepend(t+i)},dataType:"json"})}list_backup_content(e){this.file_counter=0,jQuery("#backup_cotent_modal .modal-content .files-list").text("").removeClass("error"),jQuery("#backup_cotent_modal .modal-content .backup-name").text(e),n.open(),jQuery("#backup_cotent_modal .progress > div").removeClass("determinate").addClass("indeterminate"),this.list_backup_content_callback(e)}backup_encryption_callback(e,t=0,i=0,n=0){var s=this;e&&jQuery.ajax({url:XCLONER_AJAXURL,method:"post",data:{action:"backup_encryption",file:e,start:t,part:i,iv:n},success:function(t){if(void 0!==t.total_size){jQuery("#backup_encryption_modal .progress > div").removeClass("indeterminate").addClass("determinate");var i=parseInt(100*t.start)/parseInt(t.total_size);jQuery("#backup_encryption_modal .progress .determinate").css("width",parseInt(i)+"%"),jQuery("#backup_encryption_modal .modal-content .files-list").text("Encrypting "+t.processing_file+" "+parseInt(i)+"%")}if(t.error)return jQuery("#backup_encryption_modal .notice").show(),jQuery("#backup_encryption_modal .files-list").addClass("error").prepend(t.message+" "),void jQuery("#backup_encryption_modal .progress > div").addClass("determinate").removeClass("indeterminate").css("width","100%");!t.finished&&jQuery("#backup_encryption_modal").is(":visible")?s.backup_encryption_callback(e,t.start,t.part,t.iv):(jQuery("#backup_encryption_modal .progress > div").addClass("determinate").removeClass("indeterminate").css("width","100%"),jQuery("#backup_encryption_modal .modal-content .files-list").text("Done Encrypting."),dataTable.ajax.reload())},error:function(e,t,i){jQuery("#backup_encryption_modal .files-list").addClass("error").prepend(t+i)},dataType:"json"})}backup_encryption(e,t=0){this.file_counter=0,jQuery("#backup_encryption_modal .modal-content .backup-name").text(e),s.open(),jQuery("#backup_encryption_modal .progress > div"),jQuery("#backup_encryption_modal .notice").show(),jQuery("#backup_encryption_modal a.btn").attr("onclick","xcloner_manage_backups.backup_encryption('"+e+"', true)"),jQuery("#backup_encryption_modal .modal-content .files-list").text("").removeClass("error"),t&&(jQuery("#backup_encryption_modal .notice").hide(),this.backup_encryption_callback(e))}backup_decryption_callback(e,t=0,i=0,n=0){var s=this,a=jQuery("#backup_decryption_modal #decryption_key").val();e&&jQuery.ajax({url:XCLONER_AJAXURL,method:"post",data:{action:"backup_decryption",file:e,start:t,part:i,iv:n,decryption_key:a},success:function(t){if(t.start||(t.start=0),void 0!==t.total_size){jQuery("#backup_decryption_modal .progress > div").removeClass("indeterminate").addClass("determinate");var i=parseInt(100*t.start)/parseInt(t.total_size);jQuery("#backup_decryption_modal .progress .determinate").css("width",parseInt(i)+"%"),jQuery("#backup_decryption_modal .modal-content .files-list").text("Decrypting "+t.processing_file+" "+parseInt(i)+"%")}if(t.error)return jQuery("#backup_decryption_modal .files-list").addClass("error").prepend(t.message+" "),jQuery("#backup_decryption_modal .progress > div").addClass("determinate").removeClass("indeterminate").css("width","100%"),void jQuery("#backup_decryption_modal .notice").show();!t.finished&&jQuery("#backup_decryption_modal").is(":visible")?s.backup_decryption_callback(e,t.start,t.part,t.iv):(jQuery("#backup_decryption_modal .progress > div").addClass("determinate").removeClass("indeterminate").css("width","100%"),jQuery("#backup_decryption_modal .modal-content .files-list").text("Done Decrypting."),dataTable.ajax.reload())},error:function(e,t,i){jQuery("#backup_decryption_modal .files-list").addClass("error").prepend(t+i)},dataType:"json"})}backup_decryption(e,t=0){this.file_counter=0,jQuery("#backup_decryption_modal .modal-content .backup-name").text(e),a.open(),jQuery("#backup_decryption_modal .progress > div"),jQuery("#backup_decryption_modal .notice").show(),jQuery("#backup_decryption_modal a.btn").attr("onclick","xcloner_manage_backups.backup_decryption('"+e+"', true)"),jQuery("#backup_decryption_modal .modal-content .files-list").text("").removeClass("error"),t&&(jQuery("#backup_decryption_modal .notice").hide(),this.backup_decryption_callback(e))}cloud_upload(e,t){t=t||0,jQuery("#remote_storage_modal").find(".backup_name").text(e),jQuery("#remote_storage_modal").find("input.backup_name").val(e),M.updateTextFields(),jQuery(".col select").formSelect(),o.open(),jQuery("#remote_storage_modal .status").hide(),jQuery(".remote-storage-form").off("submit").on("submit",(function(){jQuery("#remote_storage_modal .status").show(),jQuery("#remote_storage_modal .status .progress .indeterminate").removeClass("determinate").css("width","0%"),jQuery("#remote_storage_modal .status-text").removeClass("error").text("");var i=jQuery("#remote_storage_modal select").val();return e&&jQuery.ajax({url:XCLONER_AJAXURL,method:"post",data:{action:"upload_backup_to_remote",file:e,storage_type:i,delete_after_transfer:t},success:function(e){e.error?jQuery("#remote_storage_modal .status-text").addClass("error").text(e.message):jQuery("#remote_storage_modal .status-text").removeClass("error").text("done"),jQuery("#remote_storage_modal .status .progress .indeterminate").addClass("determinate").css("width","100%")},error:function(e,t,i){jQuery("#remote_storage_modal .status-text").addClass("error").text(t+i)},dataType:"json"}),!1}))}copy_remote_to_local(e){r.open(),jQuery("#local_storage_upload_modal .modal-content .backup-name").text(e),jQuery("#local_storage_upload_modal .status-text").removeClass("error").text(""),jQuery("#local_storage_upload_modal .status .progress .indeterminate").removeClass("determinate").css("width","0%"),e&&jQuery.ajax({url:XCLONER_AJAXURL,method:"post",data:{action:"copy_backup_remote_to_local",file:e,storage_type:this.storage_selection},success:function(e){e.error?jQuery("#local_storage_upload_modal .status-text").addClass("error").text(e.message):jQuery("#local_storage_upload_modal .status-text").removeClass("error").text("done"),jQuery("#local_storage_upload_modal .status .progress .indeterminate").addClass("determinate").css("width","100%")},error:function(e,t,i){jQuery("#local_storage_upload_modal .status-text").addClass("error").text(t+i)},dataType:"json"})}}},function(e,t,i){"use strict";i.r(t),i.d(t,"Xcloner_Remote_Storage",(function(){return n}));class n{constructor(){}toggle_status(e){var t=jQuery(e).attr("name"),i=0;jQuery(e).is(":checked")&&(i=1),t&&jQuery.ajax({url:XCLONER_AJAXURL,method:"post",data:{action:"remote_storage_save_status",id:t,value:i},success:function(e){e.finished||alert("Error changing status")},dataType:"json"})}}},function(e,t,i){"use strict";i.r(t),i.d(t,"Xcloner_Backup",(function(){return n}));class n{constructor(){this.cancel=0,this.params={},this.last_dumpfile="",this.last_backup_file="",this.backup_part=0,this.backup_size_total=0,this.resume={}}get_form_params(){var e=[],t=[];jQuery.each(jQuery("#jstree_database_container").jstree("get_checked",!0),(function(){var t={};t.id=this.id,t.parent=this.parent;var i=e.length;e[i]=t})),jQuery.each(jQuery("#jstree_files_container").jstree("get_checked",!0),(function(){var e={};e.id=this.id,e.parent=this.parent;var i=t.length;t[i]=e}));var i={};return i.table_params=e,i.files_params=t,i.backup_params=jQuery("#generate_backup_form").serializeArray(),i}do_backup_database_callback(e,t,i){if(i.extra&&(this.params.extra=i.extra),i.extra.stats&&(void 0!==i.extra.stats.tables_count&&jQuery(e).find(".table-counter").text(parseInt(i.extra.stats.tables_count)),void 0!==i.extra.stats.database_count&&jQuery(e).find(".database-counter").text(parseInt(i.extra.stats.database_count)),void 0!==i.extra.stats.total_records&&jQuery(e).find(".total-records").text(parseInt(i.extra.stats.total_records))),i.extra.tableName&&jQuery(e).find(".last-logged-table").text(i.extra.databaseName+"."+i.extra.tableName+" ("+i.extra.processedRecords+" records)"),void 0!==i.extra.processedRecords&&!i.extra.startAtRecord&&!i.extra.endDump){var n=parseInt(jQuery(e).find(".total-records").attr("data-processed"))+parseInt(i.extra.processedRecords),s=100*parseInt(n)/parseInt(jQuery(e).find(".total-records").text());jQuery(e).find(".progress .determinate").css("width",s+"%"),jQuery(e).find(".total-records").attr("data-processed",n),jQuery(e).find(".status-body ul.logged-tables").prepend(jQuery("<li>").text(i.extra.databaseName+"."+i.extra.tableName+" ("+i.extra.processedRecords+" records)"))}if(void 0!==i.extra.dumpfile){var a=i.extra.dumpfile+" ("+this.getSize(i.extra.dumpsize,1024)+" KB)";jQuery(this.last_dumpfile).hasClass(i.extra.dumpfile)?jQuery(this.last_dumpfile).html(a):this.last_dumpfile=jQuery("<li>").addClass(i.extra.dumpfile).html(a).prependTo("ul.logged-databases")}if(!i.finished)return this.do_ajax(e,t),!1;jQuery(e).find(".last-logged-table").text("done"),jQuery(e).find(".progress .determinate").css("width","100%"),this.do_backup_files()}do_backup_database(){if(jQuery("#jstree_database_container").length){var e="#generate_backup ul.backup-status li.database-backup";jQuery(e).show(),jQuery(e).find(".collapsible-header").trigger("click"),jQuery(e).find(".total-records").text(0),jQuery(e).find(".total-records").attr("data-processed",0),jQuery(e).find(".table-counter").text(0),jQuery(e).find(".database-counter").text(0),jQuery(e).find(".logged-databases").html(""),jQuery(e).find(".logged-tables").html(""),this.last_dumpfile=0,jQuery(e).find(".progress .determinate").css("width","0%"),this.do_ajax(e,"backup_database",1)}else this.do_backup_files()}do_scan_filesystem_callback(e,t,i){if(i.total_files_num&&jQuery(".file-system .file-counter").text(parseInt(i.total_files_num)+parseInt(jQuery(".file-system .file-counter").text())),i.total_files_size){var n=parseFloat(i.total_files_size)+parseFloat(jQuery(".file-system .file-size-total").text());jQuery(".file-system .file-size-total").text(n.toFixed(2))}if(i.last_logged_file&&jQuery(".file-system .last-logged-file").text(i.last_logged_file),!i.finished)return this.do_ajax(e,t),!1;jQuery(e).find(".progress .indeterminate").removeClass("indeterminate").addClass("determinate").css("width","100%"),jQuery(".file-system .last-logged-file").text("done"),this.do_backup_database()}do_scan_filesystem(){var e="#generate_backup ul.backup-status li.file-system";jQuery(e).show(),jQuery(e+" .status-body").show(),jQuery(e).find(".collapsible-header").trigger("click"),jQuery(".file-system .file-counter").text(0),jQuery(".file-system .last-logged-file").text(""),jQuery(".file-system .file-size-total").text(0),jQuery(".file-system .progress div").removeClass("determinate").addClass("indeterminate").css("width","0%"),this.do_ajax(e,"scan_filesystem",1)}do_backup_files_callback(e,t,i){if(i.extra&&(this.params.extra=i.extra),i.extra&&(void 0!==i.extra.start_at_line&&jQuery(e).find(".file-counter").text(parseInt(i.extra.start_at_line)),void 0!==i.extra.start_at_line&&jQuery(e).find(".file-size-total").text(this.getSize(this.backup_size_total+parseInt(i.extra.backup_size)))),i.extra.processed_file){if(void 0!==i.extra.start_at_byte&&i.extra.start_at_byte)var n=i.extra.start_at_byte;else n=i.extra.processed_file_size;jQuery(e).find(".last-logged-file").text(i.extra.processed_file+" ("+this.getSize(n,1024)+" KB)")}if(void 0!==i.extra.processed_file){var s=i.extra.backup_archive_name_full+" ("+this.getSize(i.extra.backup_size)+") MB";this.backup_part!=i.extra.backup_part&&(this.backup_part=i.extra.backup_part,this.backup_size_total=this.backup_size_total+i.extra.backup_size),jQuery(this.last_backup_file).hasClass(i.extra.backup_archive_name)||(this.last_backup_file=jQuery("<li>").addClass(i.extra.backup_archive_name).html(s).prependTo(jQuery(e).find(".status-body .backup-name"))),jQuery(this.last_backup_file).html(s)}if(i.extra.lines_total){var a=100*parseInt(i.extra.start_at_line)/parseInt(i.extra.lines_total);jQuery(e).find(".progress .determinate").css("width",a+"%")}if(!i.finished)return this.do_ajax(e,t),!1;jQuery(e).find(".last-logged-file").text("done"),jQuery(".backup-done .cloud-upload").attr("href","#"+i.extra.backup_parent),jQuery(".backup-done .download").attr("href","#"+i.extra.backup_parent),jQuery(".backup-done .list-backup-content").attr("href","#"+i.extra.backup_parent),this.do_backup_encryption()||this.do_remote_storage_upload(i.extra.backup_parent)||this.do_backup_done(i.extra.backup_parent)}do_backup_files(){if(this.cancel)return!1;var e="#generate_backup ul.backup-status li.files-backup";jQuery(e).show(),jQuery(e+" .status-body").show(),jQuery(e).find(".collapsible-header").trigger("click"),jQuery(e).find(".file-size-total").text(0),jQuery(e).find(".file-size-total").attr("data-processed",0),jQuery(e).find(".file-counter").text(0),jQuery(e).find(".last-logged-file").text(""),jQuery(e).find(".progress .determinate").css("width","0%"),this.do_ajax(e,"backup_files",1)}do_backup_encryption_callback(e,t,i){if(i.extra&&(this.params.extra=i.extra),jQuery(".backup-encryption .last-logged-file").text("encrypting "+i.processing_file+" ..."),void 0!==i.total_size){jQuery(".backup-encryption .progress > div").removeClass("indeterminate").addClass("determinate");var n=parseInt(100*i.start)/parseInt(i.total_size);jQuery(".backup-encryption .progress .determinate").css("width",parseInt(n)+"%")}return i.error?(jQuery(".backup-encryption .status-body").show(),jQuery(".backup-encryption .status-body").addClass("error").prepend(i.message+" "),void jQuery(".backup-encryption .progress > div").addClass("determinate").removeClass("indeterminate").css("width","100%")):i.finished?(jQuery(e).find(".progress > div").css("width","100%"),jQuery(".backup-encryption .last-logged-file").text("done"),void(this.do_remote_storage_upload(i.processing_file)||this.do_backup_done(i.processing_file))):(this.do_ajax(e,t),!1)}do_backup_encryption(){if(this.cancel)return!1;if(!jQuery("#backup_options #backup_encrypt").is(":checked"))return!1;var e="#generate_backup ul.backup-status li.backup-encryption";return jQuery(e).show(),jQuery(e+" .status-body").show(),jQuery(e).find(".collapsible-header").trigger("click"),jQuery(e).find(".progress .determinate").removeClass("determinate").addClass("indeterminate"),this.do_ajax(e,"backup_encryption",1),!0}do_upload_backup_to_remote_callback(e,t,i){!i||i.error?(jQuery(e).find(".status").text(i.message),jQuery(e).find(".progress .indeterminate").removeClass("indeterminate").addClass("determinate").css("width","0%")):(jQuery(e).find(".status").text("done"),jQuery(e).find(".progress .indeterminate").removeClass("indeterminate").addClass("determinate").css("width","100%")),this.do_backup_done()}do_remote_storage_upload(e){if(this.cancel)return!1;var t=jQuery("#schedule_storage").val();if(!t)return!1;var i=Number(jQuery("#backup_delete_after_remote_transfer").is(":checked"));jQuery("#remote_storage_modal #transfer_storage").val(t);var n="#generate_backup ul.backup-status li.remote-storage-transfer";return jQuery(n).show(),jQuery(n+" .status-body").show(),jQuery(n).find(".collapsible-header").trigger("click"),jQuery(n).find(".progress .determinate").removeClass("determinate").addClass("indeterminate"),this.params.file=e,this.params.storage_type=t,this.params.delete_after_transfer=i,this.do_ajax(n,"upload_backup_to_remote",1),!0}do_backup_done(e){var t="#generate_backup ul.backup-status li.backup-done";jQuery(t).show(),jQuery(t+" .status-body").show(),jQuery(t).find(".collapsible-header").trigger("click"),this.set_cancel(!1),jQuery("#generate_backup .action-buttons a").hide(),jQuery("#generate_backup .action-buttons .start").css("display","inline-block")}do_save_schedule_callback(e,t,i){jQuery("#schedule_backup_success").show()}cancel_backup(){this.set_cancel(!0),jQuery("#generate_backup .action-buttons a").hide(),jQuery("#generate_backup .action-buttons .start").css("display","inline-block"),jQuery("#generate_backup .action-buttons .restart").css("display","inline-block")}restart_backup(){if(this.set_cancel(!1),jQuery("#generate_backup .action-buttons a").hide(),jQuery("#generate_backup .action-buttons .cancel").css("display","inline-block"),this.resume.action)return this.do_ajax(this.resume.elem,this.resume.action,this.resume.params),void(this.resume={});this.start_backup()}start_backup(){this.resume={},this.set_cancel(!1),jQuery("#generate_backup .action-buttons a").hide(),jQuery("#generate_backup .action-buttons .cancel").css("display","inline-block"),this.backup_size_total=0,this.last_backup_file="",this.backup_part=0,jQuery("#generate_backup ul.backup-name li").remove(),jQuery("#generate_backup ul.backup-status > li").hide(),jQuery("#generate_backup .backup-status").show(),this.params=this.get_form_params(),this.do_scan_filesystem()}set_cancel(e){this.cancel=e}get_cancel(e){return this.cancel}init_resume(e,t,i){this.resume.elem=e,this.resume.action=t,this.resume.init=i}do_ajax(e,t,i=0){let n=this.params.hash?this.params.hash:"generate_hash";if(1!=this.cancel){var s="do_"+t+"_callback",a=JSON.stringify(this.params),o=this;jQuery.ajax({url:XCLONER_AJAXURL,dataType:"json",type:"POST",data:{action:t,data:a,init:i,hash:n,API_ID:ID()},error:function(n){show_ajax_error("Communication Error","",n),o.init_resume(e,t,i)}}).done((function(n){if(n.hash&&(o.params.hash=n.hash),void 0!==n.error)return show_ajax_error("Communication Error","",n.error_message),void o.init_resume(e,t,i);o.resume={},o[s](e,t,n)}))}else this.init_resume(e,t,i)}getSize(e,t=1048576){return(e/t).toFixed(2)}}},function(e,t,i){i(5),i(0),i(3),i(1),i(2),i(7),i(8)},function(e,t,i){(function(i){var n,s=function e(t,i,n){null===t&&(t=Function.prototype);var s=Object.getOwnPropertyDescriptor(t,i);if(void 0===s){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,i,n)}if("value"in s)return s.value;var o=s.get;return void 0!==o?o.call(n):void 0},a=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}();function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}window.cash=function(){var e,t=document,i=window,n=Array.prototype,s=n.slice,a=n.filter,o=n.push,r=function(){},l=function(e){return typeof e==typeof r&&e.call},u=function(e){return"string"==typeof e},d=/^#[\w-]*$/,c=/^\.[\w-]*$/,h=/<.+>/,p=/^\w+$/;function v(e,i){return i=i||t,c.test(e)?i.getElementsByClassName(e.slice(1)):p.test(e)?i.getElementsByTagName(e):i.querySelectorAll(e)}function f(i){if(!e){var n=(e=t.implementation.createHTMLDocument(null)).createElement("base");n.href=t.location.href,e.head.appendChild(n)}return e.body.innerHTML=i,e.body.childNodes}function _(e){"loading"!==t.readyState?e():t.addEventListener("DOMContentLoaded",e)}function m(e,n){if(!e)return this;if(e.cash&&e!==i)return e;var s,a=e,o=0;if(u(e))a=d.test(e)?t.getElementById(e.slice(1)):h.test(e)?f(e):v(e,n);else if(l(e))return _(e),this;if(!a)return this;if(a.nodeType||a===i)this[0]=a,this.length=1;else for(s=this.length=a.length;o<s;o++)this[o]=a[o];return this}function y(e,t){return new m(e,t)}var g=y.fn=y.prototype=m.prototype={cash:!0,length:0,push:o,splice:n.splice,map:n.map,init:m};function b(e,t){for(var i=e.length,n=0;n<i&&!1!==t.call(e[n],e[n],n,e);n++);}function k(e,t){var i=e&&(e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector);return!!i&&i.call(e,t)}function w(e){return u(e)?k:e.cash?function(t){return e.is(t)}:function(e,t){return e===t}}function C(e){return y(s.call(e).filter((function(e,t,i){return i.indexOf(e)===t})))}Object.defineProperty(g,"constructor",{value:y}),y.parseHTML=f,y.noop=r,y.isFunction=l,y.isString=u,y.extend=g.extend=function(e){e=e||{};var t=s.call(arguments),i=t.length,n=1;for(1===t.length&&(e=this,n=0);n<i;n++)if(t[n])for(var a in t[n])t[n].hasOwnProperty(a)&&(e[a]=t[n][a]);return e},y.extend({merge:function(e,t){for(var i=+t.length,n=e.length,s=0;s<i;n++,s++)e[n]=t[s];return e.length=n,e},each:b,matches:k,unique:C,isArray:Array.isArray,isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)}});var x=y.uid="_cash"+Date.now();function E(e){return e[x]=e[x]||{}}function M(e,t,i){return E(e)[t]=i}function T(e,t){var i=E(e);return void 0===i[t]&&(i[t]=e.dataset?e.dataset[t]:y(e).attr("data-"+t)),i[t]}function j(e,t){var i=E(e);i?delete i[t]:e.dataset?delete e.dataset[t]:y(e).removeAttr("data-"+name)}g.extend({data:function(e,t){if(u(e))return void 0===t?T(this[0],e):this.each((function(i){return M(i,e,t)}));for(var i in e)this.data(i,e[i]);return this},removeData:function(e){return this.each((function(t){return j(t,e)}))}});var O=/\S+/g;function L(e){return u(e)&&e.match(O)}function D(e,t){return e.classList?e.classList.contains(t):new RegExp("(^| )"+t+"( |$)","gi").test(e.className)}function B(e,t,i){e.classList?e.classList.add(t):i.indexOf(" "+t+" ")&&(e.className+=" "+t)}function $(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(t,"")}g.extend({addClass:function(e){var t=L(e);return t?this.each((function(e){var i=" "+e.className+" ";b(t,(function(t){B(e,t,i)}))})):this},attr:function(e,t){if(e){if(u(e))return void 0===t?this[0]?this[0].getAttribute?this[0].getAttribute(e):this[0][e]:void 0:this.each((function(i){i.setAttribute?i.setAttribute(e,t):i[e]=t}));for(var i in e)this.attr(i,e[i]);return this}},hasClass:function(e){var t=!1,i=L(e);return i&&i.length&&this.each((function(e){return!(t=D(e,i[0]))})),t},prop:function(e,t){if(u(e))return void 0===t?this[0][e]:this.each((function(i){i[e]=t}));for(var i in e)this.prop(i,e[i]);return this},removeAttr:function(e){return this.each((function(t){t.removeAttribute?t.removeAttribute(e):delete t[e]}))},removeClass:function(e){if(!arguments.length)return this.attr("class","");var t=L(e);return t?this.each((function(e){b(t,(function(t){$(e,t)}))})):this},removeProp:function(e){return this.each((function(t){delete t[e]}))},toggleClass:function(e,t){if(void 0!==t)return this[t?"addClass":"removeClass"](e);var i=L(e);return i?this.each((function(e){var t=" "+e.className+" ";b(i,(function(i){D(e,i)?$(e,i):B(e,i,t)}))})):this}}),g.extend({add:function(e,t){return C(y.merge(this,y(e,t)))},each:function(e){return b(this,e),this},eq:function(e){return y(this.get(e))},filter:function(e){if(!e)return this;var t=l(e)?e:w(e);return y(a.call(this,(function(i){return t(i,e)})))},first:function(){return this.eq(0)},get:function(e){return void 0===e?s.call(this):e<0?this[e+this.length]:this[e]},index:function(e){var t=e?y(e)[0]:this[0],i=e?this:y(t).parent().children();return s.call(i).indexOf(t)},last:function(){return this.eq(-1)}});var S,I,Q,A,R=(Q=/(?:^\w|[A-Z]|\b\w)/g,A=/[\s-_]+/g,function(e){return e.replace(Q,(function(e,t){return e[0===t?"toLowerCase":"toUpperCase"]()})).replace(A,"")}),P=(S={},I=document.createElement("div").style,function(e){if(e=R(e),S[e])return S[e];var t=e.charAt(0).toUpperCase()+e.slice(1);return b((e+" "+["webkit","moz","ms","o"].join(t+" ")+t).split(" "),(function(t){if(t in I)return S[t]=e=S[e]=t,!1})),S[e]});function H(e,t){return parseInt(i.getComputedStyle(e[0],null)[t],10)||0}function W(e,t,i){var n=T(e,"_cashEvents")||M(e,"_cashEvents",{});n[t]=n[t]||[],n[t].push(i),e.addEventListener(t,i)}function q(e,t,i){var n,s=T(e,"_cashEvents"),a=s&&s[t];a&&(i?(e.removeEventListener(t,i),(n=a.indexOf(i))>=0&&a.splice(n,1)):(b(a,(function(i){e.removeEventListener(t,i)})),a=[]))}function z(e,t){return"&"+encodeURIComponent(e)+"="+encodeURIComponent(t).replace(/%20/g,"+")}function F(e){var t=[];return b(e.options,(function(e){e.selected&&t.push(e.value)})),t.length?t:null}function N(e){var t=e.selectedIndex;return t>=0?e.options[t].value:null}function X(e){var t=e.type;if(!t)return null;switch(t.toLowerCase()){case"select-one":return N(e);case"select-multiple":return F(e);case"radio":case"checkbox":return e.checked?e.value:null;default:return e.value?e.value:null}}function V(e,t,i){if(i){var n=e.childNodes[0];e.insertBefore(t,n)}else e.appendChild(t)}function Y(e,t,i){var n=u(t);n||!t.length?b(e,n?function(e){return e.insertAdjacentHTML(i?"afterbegin":"beforeend",t)}:function(e,n){return V(e,0===n?t:t.cloneNode(!0),i)}):b(t,(function(t){return Y(e,t,i)}))}y.prefixedProp=P,y.camelCase=R,g.extend({css:function(e,t){if(u(e))return e=P(e),arguments.length>1?this.each((function(i){return i.style[e]=t})):i.getComputedStyle(this[0])[e];for(var n in e)this.css(n,e[n]);return this}}),b(["Width","Height"],(function(e){var t=e.toLowerCase();g[t]=function(){return this[0].getBoundingClientRect()[t]},g["inner"+e]=function(){return this[0]["client"+e]},g["outer"+e]=function(t){return this[0]["offset"+e]+(t?H(this,"margin"+("Width"===e?"Left":"Top"))+H(this,"margin"+("Width"===e?"Right":"Bottom")):0)}})),g.extend({off:function(e,t){return this.each((function(i){return q(i,e,t)}))},on:function(e,t,i,n){var s;if(!u(e)){for(var a in e)this.on(a,t,e[a]);return this}return l(t)&&(i=t,t=null),"ready"===e?(_(i),this):(t&&(s=i,i=function(e){for(var i=e.target;!k(i,t);){if(i===this||null===i)return!1;i=i.parentNode}i&&s.call(i,e)}),this.each((function(t){var s=i;n&&(s=function(){i.apply(this,arguments),q(t,e,s)}),W(t,e,s)})))},one:function(e,t,i){return this.on(e,t,i,!0)},ready:_,trigger:function(e,t){if(document.createEvent){var i=document.createEvent("HTMLEvents");return i.initEvent(e,!0,!1),i=this.extend(i,t),this.each((function(e){return e.dispatchEvent(i)}))}}}),g.extend({serialize:function(){var e="";return b(this[0].elements||this,(function(t){if(!t.disabled&&"FIELDSET"!==t.tagName){var i=t.name;switch(t.type.toLowerCase()){case"file":case"reset":case"submit":case"button":break;case"select-multiple":var n=X(t);null!==n&&b(n,(function(t){e+=z(i,t)}));break;default:var s=X(t);null!==s&&(e+=z(i,s))}}})),e.substr(1)},val:function(e){return void 0===e?X(this[0]):this.each((function(t){return t.value=e}))}}),g.extend({after:function(e){return y(e).insertAfter(this),this},append:function(e){return Y(this,e),this},appendTo:function(e){return Y(y(e),this),this},before:function(e){return y(e).insertBefore(this),this},clone:function(){return y(this.map((function(e){return e.cloneNode(!0)})))},empty:function(){return this.html(""),this},html:function(e){if(void 0===e)return this[0].innerHTML;var t=e.nodeType?e[0].outerHTML:e;return this.each((function(e){return e.innerHTML=t}))},insertAfter:function(e){var t=this;return y(e).each((function(e,i){var n=e.parentNode,s=e.nextSibling;t.each((function(e){n.insertBefore(0===i?e:e.cloneNode(!0),s)}))})),this},insertBefore:function(e){var t=this;return y(e).each((function(e,i){var n=e.parentNode;t.each((function(t){n.insertBefore(0===i?t:t.cloneNode(!0),e)}))})),this},prepend:function(e){return Y(this,e,!0),this},prependTo:function(e){return Y(y(e),this,!0),this},remove:function(){return this.each((function(e){if(e.parentNode)return e.parentNode.removeChild(e)}))},text:function(e){return void 0===e?this[0].textContent:this.each((function(t){return t.textContent=e}))}});var K=t.documentElement;return g.extend({position:function(){var e=this[0];return{left:e.offsetLeft,top:e.offsetTop}},offset:function(){var e=this[0].getBoundingClientRect();return{top:e.top+i.pageYOffset-K.clientTop,left:e.left+i.pageXOffset-K.clientLeft}},offsetParent:function(){return y(this[0].offsetParent)}}),g.extend({children:function(e){var t=[];return this.each((function(e){o.apply(t,e.children)})),t=C(t),e?t.filter((function(t){return k(t,e)})):t},closest:function(e){return!e||this.length<1?y():this.is(e)?this.filter(e):this.parent().closest(e)},is:function(e){if(!e)return!1;var t=!1,i=w(e);return this.each((function(n){return!(t=i(n,e))})),t},find:function(e){if(!e||e.nodeType)return y(e&&this.has(e).length?e:null);var t=[];return this.each((function(i){o.apply(t,v(e,i))})),C(t)},has:function(e){var t=u(e)?function(t){return 0!==v(e,t).length}:function(t){return t.contains(e)};return this.filter(t)},next:function(){return y(this[0].nextElementSibling)},not:function(e){if(!e)return this;var t=w(e);return this.filter((function(i){return!t(i,e)}))},parent:function(){var e=[];return this.each((function(t){t&&t.parentNode&&e.push(t.parentNode)})),C(e)},parents:function(e){var i,n=[];return this.each((function(s){for(i=s;i&&i.parentNode&&i!==t.body.parentNode;)i=i.parentNode,(!e||e&&k(i,e))&&n.push(i)})),C(n)},prev:function(){return y(this[0].previousElementSibling)},siblings:function(e){var t=this.parent().children(e),i=this[0];return t.filter((function(e){return e!==i}))}}),y}();var u=function(){function e(t,i,n){l(this,e),i instanceof Element||console.error(Error(i+" is not an HTML Element"));var s=t.getInstance(i);s&&s.destroy(),this.el=i,this.$el=cash(i)}return a(e,null,[{key:"init",value:function(e,t,i){var n=null;if(t instanceof Element)n=new e(t,i);else if(t&&(t.jquery||t.cash||t instanceof NodeList)){for(var s=[],a=0;a<t.length;a++)s.push(new e(t[a],i));n=s}return n}}]),e}();!function(e){e.Package?M={}:e.M={},M.jQueryLoaded=!!e.jQuery}(window),void 0===(n=function(){return M}.apply(t,[]))||(e.exports=n),M.version="1.0.0",M.keys={TAB:9,ENTER:13,ESC:27,ARROW_UP:38,ARROW_DOWN:40},M.tabPressed=!1,M.keyDown=!1;document.addEventListener("keydown",(function(e){M.keyDown=!0,e.which!==M.keys.TAB&&e.which!==M.keys.ARROW_DOWN&&e.which!==M.keys.ARROW_UP||(M.tabPressed=!0)}),!0),document.addEventListener("keyup",(function(e){M.keyDown=!1,e.which!==M.keys.TAB&&e.which!==M.keys.ARROW_DOWN&&e.which!==M.keys.ARROW_UP||(M.tabPressed=!1)}),!0),document.addEventListener("focus",(function(e){M.keyDown&&document.body.classList.add("keyboard-focused")}),!0),document.addEventListener("blur",(function(e){document.body.classList.remove("keyboard-focused")}),!0),M.initializeJqueryWrapper=function(e,t,i){jQuery.fn[t]=function(n){if(e.prototype[n]){var s=Array.prototype.slice.call(arguments,1);if("get"===n.slice(0,3)){var a=this.first()[0][i];return a[n].apply(a,s)}return this.each((function(){var e=this[i];e[n].apply(e,s)}))}if("object"==typeof n||!n)return e.init(this,arguments[0]),this;jQuery.error("Method "+n+" does not exist on jQuery."+t)}},M.AutoInit=function(e){var t=e||document.body,i={Autocomplete:t.querySelectorAll(".autocomplete:not(.no-autoinit)"),Carousel:t.querySelectorAll(".carousel:not(.no-autoinit)"),Chips:t.querySelectorAll(".chips:not(.no-autoinit)"),Collapsible:t.querySelectorAll(".collapsible:not(.no-autoinit)"),Datepicker:t.querySelectorAll(".datepicker:not(.no-autoinit)"),Dropdown:t.querySelectorAll(".dropdown-trigger:not(.no-autoinit)"),Materialbox:t.querySelectorAll(".materialboxed:not(.no-autoinit)"),Modal:t.querySelectorAll(".modal:not(.no-autoinit)"),Parallax:t.querySelectorAll(".parallax:not(.no-autoinit)"),Pushpin:t.querySelectorAll(".pushpin:not(.no-autoinit)"),ScrollSpy:t.querySelectorAll(".scrollspy:not(.no-autoinit)"),FormSelect:t.querySelectorAll("select:not(.no-autoinit)"),Sidenav:t.querySelectorAll(".sidenav:not(.no-autoinit)"),Tabs:t.querySelectorAll(".tabs:not(.no-autoinit)"),TapTarget:t.querySelectorAll(".tap-target:not(.no-autoinit)"),Timepicker:t.querySelectorAll(".timepicker:not(.no-autoinit)"),Tooltip:t.querySelectorAll(".tooltipped:not(.no-autoinit)"),FloatingActionButton:t.querySelectorAll(".fixed-action-btn:not(.no-autoinit)")};for(var n in i){M[n].init(i[n])}},M.objectSelectorString=function(e){return((e.prop("tagName")||"")+(e.attr("id")||"")+(e.attr("class")||"")).replace(/\s/g,"")},M.guid=function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return function(){return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}}(),M.escapeHash=function(e){return e.replace(/(:|\.|\[|\]|,|=|\/)/g,"\\$1")},M.elementOrParentIsFixed=function(e){var t=$(e),i=t.add(t.parents()),n=!1;return i.each((function(){if("fixed"===$(this).css("position"))return n=!0,!1})),n},M.checkWithinContainer=function(e,t,i){var n={top:!1,right:!1,bottom:!1,left:!1},s=e.getBoundingClientRect(),a=e===document.body?Math.max(s.bottom,window.innerHeight):s.bottom,o=e.scrollLeft,r=e.scrollTop,l=t.left-o,u=t.top-r;return(l<s.left+i||l<i)&&(n.left=!0),(l+t.width>s.right-i||l+t.width>window.innerWidth-i)&&(n.right=!0),(u<s.top+i||u<i)&&(n.top=!0),(u+t.height>a-i||u+t.height>window.innerHeight-i)&&(n.bottom=!0),n},M.checkPossibleAlignments=function(e,t,i,n){var s={top:!0,right:!0,bottom:!0,left:!0,spaceOnTop:null,spaceOnRight:null,spaceOnBottom:null,spaceOnLeft:null},a="visible"===getComputedStyle(t).overflow,o=t.getBoundingClientRect(),r=Math.min(o.height,window.innerHeight),l=Math.min(o.width,window.innerWidth),u=e.getBoundingClientRect(),d=t.scrollLeft,c=t.scrollTop,h=i.left-d,p=i.top-c,v=i.top+u.height-c;return s.spaceOnRight=a?window.innerWidth-(u.left+i.width):l-(h+i.width),s.spaceOnRight<0&&(s.left=!1),s.spaceOnLeft=a?u.right-i.width:h-i.width+u.width,s.spaceOnLeft<0&&(s.right=!1),s.spaceOnBottom=a?window.innerHeight-(u.top+i.height+n):r-(p+i.height+n),s.spaceOnBottom<0&&(s.top=!1),s.spaceOnTop=a?u.bottom-(i.height+n):v-(i.height-n),s.spaceOnTop<0&&(s.bottom=!1),s},M.getOverflowParent=function(e){return null==e?null:e===document.body||"visible"!==getComputedStyle(e).overflow?e:M.getOverflowParent(e.parentElement)},M.getIdFromTrigger=function(e){var t=e.getAttribute("data-target");return t||(t=(t=e.getAttribute("href"))?t.slice(1):""),t},M.getDocumentScrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},M.getDocumentScrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0};var d=Date.now||function(){return(new Date).getTime()};M.throttle=function(e,t,i){var n=void 0,s=void 0,a=void 0,o=null,r=0;i||(i={});var l=function(){r=!1===i.leading?0:d(),o=null,a=e.apply(n,s),n=s=null};return function(){var u=d();r||!1!==i.leading||(r=u);var c=t-(u-r);return n=this,s=arguments,c<=0?(clearTimeout(o),o=null,r=u,a=e.apply(n,s),n=s=null):o||!1===i.trailing||(o=setTimeout(l,c)),a}};var c={scope:{}};c.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,i){if(i.get||i.set)throw new TypeError("ES3 does not support getters and setters.");e!=Array.prototype&&e!=Object.prototype&&(e[t]=i.value)},c.getGlobal=function(e){return"undefined"!=typeof window&&window===e?e:void 0!==i&&null!=i?i:e},c.global=c.getGlobal(this),c.SYMBOL_PREFIX="jscomp_symbol_",c.initSymbol=function(){c.initSymbol=function(){},c.global.Symbol||(c.global.Symbol=c.Symbol)},c.symbolCounter_=0,c.Symbol=function(e){return c.SYMBOL_PREFIX+(e||"")+c.symbolCounter_++},c.initSymbolIterator=function(){c.initSymbol();var e=c.global.Symbol.iterator;e||(e=c.global.Symbol.iterator=c.global.Symbol("iterator")),"function"!=typeof Array.prototype[e]&&c.defineProperty(Array.prototype,e,{configurable:!0,writable:!0,value:function(){return c.arrayIterator(this)}}),c.initSymbolIterator=function(){}},c.arrayIterator=function(e){var t=0;return c.iteratorPrototype((function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}))},c.iteratorPrototype=function(e){return c.initSymbolIterator(),(e={next:e})[c.global.Symbol.iterator]=function(){return this},e},c.array=c.array||{},c.iteratorFromArray=function(e,t){c.initSymbolIterator(),e instanceof String&&(e+="");var i=0,n={next:function(){if(i<e.length){var s=i++;return{value:t(s,e[s]),done:!1}}return n.next=function(){return{done:!0,value:void 0}},n.next()}};return n[Symbol.iterator]=function(){return n},n},c.polyfill=function(e,t,i,n){if(t){for(i=c.global,e=e.split("."),n=0;n<e.length-1;n++){var s=e[n];s in i||(i[s]={}),i=i[s]}(t=t(n=i[e=e[e.length-1]]))!=n&&null!=t&&c.defineProperty(i,e,{configurable:!0,writable:!0,value:t})}},c.polyfill("Array.prototype.keys",(function(e){return e||function(){return c.iteratorFromArray(this,(function(e){return e}))}}),"es6-impl","es3");var h=this;M.anime=function(){function e(e){if(!R.col(e))try{return document.querySelectorAll(e)}catch(e){}}function t(e,t){for(var i=e.length,n=2<=arguments.length?arguments[1]:void 0,s=[],a=0;a<i;a++)if(a in e){var o=e[a];t.call(n,o,a,e)&&s.push(o)}return s}function i(e){return e.reduce((function(e,t){return e.concat(R.arr(t)?i(t):t)}),[])}function n(t){return R.arr(t)?t:(R.str(t)&&(t=e(t)||t),t instanceof NodeList||t instanceof HTMLCollection?[].slice.call(t):[t])}function s(e,t){return e.some((function(e){return e===t}))}function a(e){var t,i={};for(t in e)i[t]=e[t];return i}function o(e,t){var i,n=a(e);for(i in e)n[i]=t.hasOwnProperty(i)?t[i]:e[i];return n}function r(e,t){var i,n=a(e);for(i in t)n[i]=R.und(e[i])?t[i]:e[i];return n}function l(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,i,n){return t+t+i+i+n+n}));var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return"rgba("+(e=parseInt(t[1],16))+","+parseInt(t[2],16)+","+(t=parseInt(t[3],16))+",1)"}function u(e){function t(e,t,i){return 0>i&&(i+=1),1<i&&--i,i<1/6?e+6*(t-e)*i:.5>i?t:i<2/3?e+(t-e)*(2/3-i)*6:e}var i=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(e);e=parseInt(i[1])/360;var n=parseInt(i[2])/100,s=parseInt(i[3])/100;if(i=i[4]||1,0==n)s=n=e=s;else{var a=.5>s?s*(1+n):s+n-s*n,o=2*s-a;s=t(o,a,e+1/3),n=t(o,a,e),e=t(o,a,e-1/3)}return"rgba("+255*s+","+255*n+","+255*e+","+i+")"}function d(e){if(e=/([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(e))return e[2]}function c(e){return-1<e.indexOf("translate")||"perspective"===e?"px":-1<e.indexOf("rotate")||-1<e.indexOf("skew")?"deg":void 0}function p(e,t){return R.fnc(e)?e(t.target,t.id,t.total):e}function v(e,t){if(t in e.style)return getComputedStyle(e).getPropertyValue(t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase())||"0"}function f(e,t){return R.dom(e)&&s(A,t)?"transform":R.dom(e)&&(e.getAttribute(t)||R.svg(e)&&e[t])?"attribute":R.dom(e)&&"transform"!==t&&v(e,t)?"css":null!=e[t]?"object":void 0}function _(e,i){var n=c(i);if(n=-1<i.indexOf("scale")?1:0+n,!(e=e.style.transform))return n;for(var s=[],a=[],o=[],r=/(\w+)\((.+?)\)/g;s=r.exec(e);)a.push(s[1]),o.push(s[2]);return e=t(o,(function(e,t){return a[t]===i})),e.length?e[0]:n}function m(e,t){switch(f(e,t)){case"transform":return _(e,t);case"css":return v(e,t);case"attribute":return e.getAttribute(t)}return e[t]||0}function y(e,t){var i=/^(\*=|\+=|-=)/.exec(e);if(!i)return e;var n=d(e)||0;switch(t=parseFloat(t),e=parseFloat(e.replace(i[0],"")),i[0][0]){case"+":return t+e+n;case"-":return t-e+n;case"*":return t*e+n}}function g(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function b(e){e=e.points;for(var t,i=0,n=0;n<e.numberOfItems;n++){var s=e.getItem(n);0<n&&(i+=g(t,s)),t=s}return i}function k(e){if(e.getTotalLength)return e.getTotalLength();switch(e.tagName.toLowerCase()){case"circle":return 2*Math.PI*e.getAttribute("r");case"rect":return 2*e.getAttribute("width")+2*e.getAttribute("height");case"line":return g({x:e.getAttribute("x1"),y:e.getAttribute("y1")},{x:e.getAttribute("x2"),y:e.getAttribute("y2")});case"polyline":return b(e);case"polygon":var t=e.points;return b(e)+g(t.getItem(t.numberOfItems-1),t.getItem(0))}}function w(e,t){function i(i){return i=void 0===i?0:i,e.el.getPointAtLength(1<=t+i?t+i:0)}var n=i(),s=i(-1),a=i(1);switch(e.property){case"x":return n.x;case"y":return n.y;case"angle":return 180*Math.atan2(a.y-s.y,a.x-s.x)/Math.PI}}function C(e,t){var i,n=/-?\d*\.?\d+/g;if(i=R.pth(e)?e.totalLength:e,R.col(i))if(R.rgb(i)){var s=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(i);i=s?"rgba("+s[1]+",1)":i}else i=R.hex(i)?l(i):R.hsl(i)?u(i):void 0;else s=(s=d(i))?i.substr(0,i.length-s.length):i,i=t&&!/\s/g.test(i)?s+t:s;return{original:i+="",numbers:i.match(n)?i.match(n).map(Number):[0],strings:R.str(e)||t?i.split(n):[]}}function x(e){return t(e=e?i(R.arr(e)?e.map(n):n(e)):[],(function(e,t,i){return i.indexOf(e)===t}))}function E(e){var t=x(e);return t.map((function(e,i){return{target:e,id:i,total:t.length}}))}function M(e,t){var i=a(t);if(R.arr(e)){var s=e.length;2!==s||R.obj(e[0])?R.fnc(t.duration)||(i.duration=t.duration/s):e={value:e}}return n(e).map((function(e,i){return i=i?0:t.delay,e=R.obj(e)&&!R.pth(e)?e:{value:e},R.und(e.delay)&&(e.delay=i),e})).map((function(e){return r(e,i)}))}function T(e,t){var i,n={};for(i in e){var s=p(e[i],t);R.arr(s)&&(s=s.map((function(e){return p(e,t)})),1===s.length&&(s=s[0])),n[i]=s}return n.duration=parseFloat(n.duration),n.delay=parseFloat(n.delay),n}function j(e){return R.arr(e)?P.apply(this,e):H[e]}function O(e,t){var i;return e.tweens.map((function(n){var s=(n=T(n,t)).value,a=m(t.target,e.name),o=i?i.to.original:a,r=(o=R.arr(s)?s[0]:o,y(R.arr(s)?s[1]:s,o));return a=d(r)||d(o)||d(a),n.from=C(o,a),n.to=C(r,a),n.start=i?i.end:e.offset,n.end=n.start+n.delay+n.duration,n.easing=j(n.easing),n.elasticity=(1e3-Math.min(Math.max(n.elasticity,1),999))/1e3,n.isPath=R.pth(s),n.isColor=R.col(n.from.original),n.isColor&&(n.round=1),i=n}))}function L(e,n){return t(i(e.map((function(e){return n.map((function(t){var i=f(e.target,t.name);if(i){var n=O(t,e);t={type:i,property:t.name,animatable:e,tweens:n,duration:n[n.length-1].end,delay:n[0].delay}}else t=void 0;return t}))}))),(function(e){return!R.und(e)}))}function D(e,t,i,n){var s="delay"===e;return t.length?(s?Math.min:Math.max).apply(Math,t.map((function(t){return t[e]}))):s?n.delay:i.offset+n.delay+n.duration}function B(e){var t,i=o(I,e),n=o(Q,e),s=E(e.targets),a=[],l=r(i,n);for(t in e)l.hasOwnProperty(t)||"targets"===t||a.push({name:t,offset:l.offset,tweens:M(e[t],n)});return r(i,{children:[],animatables:s,animations:e=L(s,a),duration:D("duration",e,i,n),delay:D("delay",e,i,n)})}function $(e){function i(){return window.Promise&&new Promise((function(e){return c=e}))}function n(e){return p.reversed?p.duration-e:e}function s(e){for(var i=0,n={},s=p.animations,a=s.length;i<a;){var o=s[i],r=o.animatable,l=(u=o.tweens)[h=u.length-1];h&&(l=t(u,(function(t){return e<t.end}))[0]||l);for(var u=Math.min(Math.max(e-l.start-l.delay,0),l.duration)/l.duration,d=isNaN(u)?1:l.easing(u,l.elasticity),c=(u=l.to.strings,l.round),h=[],f=void 0,_=(f=l.to.numbers.length,0);_<f;_++){var m=void 0,y=(m=l.to.numbers[_],l.from.numbers[_]);m=l.isPath?w(l.value,d*m):y+d*(m-y),c&&(l.isColor&&2<_||(m=Math.round(m*c)/c)),h.push(m)}if(l=u.length)for(f=u[0],d=0;d<l;d++)c=u[d+1],_=h[d],isNaN(_)||(f=c?f+(_+c):f+(_+" "));else f=h[0];W[o.type](r.target,o.property,f,n,r.id),o.currentValue=f,i++}if(i=Object.keys(n).length)for(s=0;s<i;s++)S||(S=v(document.body,"transform")?"transform":"-webkit-transform"),p.animatables[s].target.style[S]=n[s].join(" ");p.currentTime=e,p.progress=e/p.duration*100}function a(e){p[e]&&p[e](p)}function o(){p.remaining&&!0!==p.remaining&&p.remaining--}function r(e){var t=p.duration,r=p.offset,v=r+p.delay,f=p.currentTime,_=p.reversed,m=n(e);if(p.children.length){var y=p.children,g=y.length;if(m>=p.currentTime)for(var b=0;b<g;b++)y[b].seek(m);else for(;g--;)y[g].seek(m)}(m>=v||!t)&&(p.began||(p.began=!0,a("begin")),a("run")),m>r&&m<t?s(m):(m<=r&&0!==f&&(s(0),_&&o()),(m>=t&&f!==t||!t)&&(s(t),_||o())),a("update"),e>=t&&(p.remaining?(u=l,"alternate"===p.direction&&(p.reversed=!p.reversed)):(p.pause(),p.completed||(p.completed=!0,a("complete"),"Promise"in window&&(c(),h=i()))),d=0)}e=void 0===e?{}:e;var l,u,d=0,c=null,h=i(),p=B(e);return p.reset=function(){var e=p.direction,t=p.loop;for(p.currentTime=0,p.progress=0,p.paused=!0,p.began=!1,p.completed=!1,p.reversed="reverse"===e,p.remaining="alternate"===e&&1===t?2:t,s(0),e=p.children.length;e--;)p.children[e].reset()},p.tick=function(e){l=e,u||(u=l),r((d+l-u)*$.speed)},p.seek=function(e){r(n(e))},p.pause=function(){var e=q.indexOf(p);-1<e&&q.splice(e,1),p.paused=!0},p.play=function(){p.paused&&(p.paused=!1,u=0,d=n(p.currentTime),q.push(p),z||F())},p.reverse=function(){p.reversed=!p.reversed,u=0,d=n(p.currentTime)},p.restart=function(){p.pause(),p.reset(),p.play()},p.finished=h,p.reset(),p.autoplay&&p.play(),p}var S,I={update:void 0,begin:void 0,run:void 0,complete:void 0,loop:1,direction:"normal",autoplay:!0,offset:0},Q={duration:1e3,delay:0,easing:"easeOutElastic",elasticity:500,round:0},A="translateX translateY translateZ rotate rotateX rotateY rotateZ scale scaleX scaleY scaleZ skewX skewY perspective".split(" "),R={arr:function(e){return Array.isArray(e)},obj:function(e){return-1<Object.prototype.toString.call(e).indexOf("Object")},pth:function(e){return R.obj(e)&&e.hasOwnProperty("totalLength")},svg:function(e){return e instanceof SVGElement},dom:function(e){return e.nodeType||R.svg(e)},str:function(e){return"string"==typeof e},fnc:function(e){return"function"==typeof e},und:function(e){return void 0===e},hex:function(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e)},rgb:function(e){return/^rgb/.test(e)},hsl:function(e){return/^hsl/.test(e)},col:function(e){return R.hex(e)||R.rgb(e)||R.hsl(e)}},P=function(){function e(e,t,i){return(((1-3*i+3*t)*e+(3*i-6*t))*e+3*t)*e}return function(t,i,n,s){if(0<=t&&1>=t&&0<=n&&1>=n){var a=new Float32Array(11);if(t!==i||n!==s)for(var o=0;11>o;++o)a[o]=e(.1*o,t,n);return function(o){if(t===i&&n===s)return o;if(0===o)return 0;if(1===o)return 1;for(var r=0,l=1;10!==l&&a[l]<=o;++l)r+=.1;--l,l=r+(o-a[l])/(a[l+1]-a[l])*.1;var u=3*(1-3*n+3*t)*l*l+2*(3*n-6*t)*l+3*t;if(.001<=u){for(r=0;4>r&&0!=(u=3*(1-3*n+3*t)*l*l+2*(3*n-6*t)*l+3*t);++r){var d=e(l,t,n)-o;l-=d/u}o=l}else if(0===u)o=l;else{l=r,r+=.1;var c=0;do{0<(u=e(d=l+(r-l)/2,t,n)-o)?r=d:l=d}while(1e-7<Math.abs(u)&&10>++c);o=d}return e(o,i,s)}}}}(),H=function(){function e(e,t){return 0===e||1===e?e:-Math.pow(2,10*(e-1))*Math.sin(2*(e-1-t/(2*Math.PI)*Math.asin(1))*Math.PI/t)}var t,i="Quad Cubic Quart Quint Sine Expo Circ Back Elastic".split(" "),n={In:[[.55,.085,.68,.53],[.55,.055,.675,.19],[.895,.03,.685,.22],[.755,.05,.855,.06],[.47,0,.745,.715],[.95,.05,.795,.035],[.6,.04,.98,.335],[.6,-.28,.735,.045],e],Out:[[.25,.46,.45,.94],[.215,.61,.355,1],[.165,.84,.44,1],[.23,1,.32,1],[.39,.575,.565,1],[.19,1,.22,1],[.075,.82,.165,1],[.175,.885,.32,1.275],function(t,i){return 1-e(1-t,i)}],InOut:[[.455,.03,.515,.955],[.645,.045,.355,1],[.77,0,.175,1],[.86,0,.07,1],[.445,.05,.55,.95],[1,0,0,1],[.785,.135,.15,.86],[.68,-.55,.265,1.55],function(t,i){return.5>t?e(2*t,i)/2:1-e(-2*t+2,i)/2}]},s={linear:P(.25,.25,.75,.75)},a={};for(t in n)a.type=t,n[a.type].forEach(function(e){return function(t,n){s["ease"+e.type+i[n]]=R.fnc(t)?t:P.apply(h,t)}}(a)),a={type:a.type};return s}(),W={css:function(e,t,i){return e.style[t]=i},attribute:function(e,t,i){return e.setAttribute(t,i)},object:function(e,t,i){return e[t]=i},transform:function(e,t,i,n,s){n[s]||(n[s]=[]),n[s].push(t+"("+i+")")}},q=[],z=0,F=function(){function e(){z=requestAnimationFrame(t)}function t(t){var i=q.length;if(i){for(var n=0;n<i;)q[n]&&q[n].tick(t),n++;e()}else cancelAnimationFrame(z),z=0}return e}();return $.version="2.2.0",$.speed=1,$.running=q,$.remove=function(e){e=x(e);for(var t=q.length;t--;)for(var i=q[t],n=i.animations,a=n.length;a--;)s(e,n[a].animatable.target)&&(n.splice(a,1),n.length||i.pause())},$.getValue=m,$.path=function(t,i){var n=R.str(t)?e(t)[0]:t,s=i||100;return function(e){return{el:n,property:e,totalLength:k(n)*(s/100)}}},$.setDashoffset=function(e){var t=k(e);return e.setAttribute("stroke-dasharray",t),t},$.bezier=P,$.easings=H,$.timeline=function(e){var t=$(e);return t.pause(),t.duration=0,t.add=function(i){return t.children.forEach((function(e){e.began=!0,e.completed=!0})),n(i).forEach((function(i){var n=r(i,o(Q,e||{}));n.targets=n.targets||e.targets,i=t.duration;var s=n.offset;n.autoplay=!1,n.direction=t.direction,n.offset=R.und(s)?i:y(s,i),t.began=!0,t.completed=!0,t.seek(n.offset),(n=$(n)).began=!0,n.completed=!0,n.duration>i&&(t.duration=n.duration),t.children.push(n)})),t.seek(0),t.reset(),t.autoplay&&t.restart(),t},t},$.random=function(e,t){return Math.floor(Math.random()*(t-e+1))+e},$}(),function(e,t){"use strict";var i={accordion:!0,onOpenStart:void 0,onOpenEnd:void 0,onCloseStart:void 0,onCloseEnd:void 0,inDuration:300,outDuration:300},n=function(n){function u(t,i){l(this,u);var n=o(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,u,t,i));n.el.M_Collapsible=n,n.options=e.extend({},u.defaults,i),n.$headers=n.$el.children("li").children(".collapsible-header"),n.$headers.attr("tabindex",0),n._setupEventHandlers();var s=n.$el.children("li.active").children(".collapsible-body");return n.options.accordion?s.first().css("display","block"):s.css("display","block"),n}return r(u,n),a(u,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.M_Collapsible=void 0}},{key:"_setupEventHandlers",value:function(){var e=this;this._handleCollapsibleClickBound=this._handleCollapsibleClick.bind(this),this._handleCollapsibleKeydownBound=this._handleCollapsibleKeydown.bind(this),this.el.addEventListener("click",this._handleCollapsibleClickBound),this.$headers.each((function(t){t.addEventListener("keydown",e._handleCollapsibleKeydownBound)}))}},{key:"_removeEventHandlers",value:function(){var e=this;this.el.removeEventListener("click",this._handleCollapsibleClickBound),this.$headers.each((function(t){t.removeEventListener("keydown",e._handleCollapsibleKeydownBound)}))}},{key:"_handleCollapsibleClick",value:function(t){var i=e(t.target).closest(".collapsible-header");if(t.target&&i.length){var n=i.closest(".collapsible");if(n[0]===this.el){var s=i.closest("li"),a=n.children("li"),o=s[0].classList.contains("active"),r=a.index(s);o?this.close(r):this.open(r)}}}},{key:"_handleCollapsibleKeydown",value:function(e){13===e.keyCode&&this._handleCollapsibleClickBound(e)}},{key:"_animateIn",value:function(e){var i=this,n=this.$el.children("li").eq(e);if(n.length){var s=n.children(".collapsible-body");t.remove(s[0]),s.css({display:"block",overflow:"hidden",height:0,paddingTop:"",paddingBottom:""});var a=s.css("padding-top"),o=s.css("padding-bottom"),r=s[0].scrollHeight;s.css({paddingTop:0,paddingBottom:0}),t({targets:s[0],height:r,paddingTop:a,paddingBottom:o,duration:this.options.inDuration,easing:"easeInOutCubic",complete:function(e){s.css({overflow:"",paddingTop:"",paddingBottom:"",height:""}),"function"==typeof i.options.onOpenEnd&&i.options.onOpenEnd.call(i,n[0])}})}}},{key:"_animateOut",value:function(e){var i=this,n=this.$el.children("li").eq(e);if(n.length){var s=n.children(".collapsible-body");t.remove(s[0]),s.css("overflow","hidden"),t({targets:s[0],height:0,paddingTop:0,paddingBottom:0,duration:this.options.outDuration,easing:"easeInOutCubic",complete:function(){s.css({height:"",overflow:"",padding:"",display:""}),"function"==typeof i.options.onCloseEnd&&i.options.onCloseEnd.call(i,n[0])}})}}},{key:"open",value:function(t){var i=this,n=this.$el.children("li").eq(t);if(n.length&&!n[0].classList.contains("active")){if("function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,n[0]),this.options.accordion){var s=this.$el.children("li");this.$el.children("li.active").each((function(t){var n=s.index(e(t));i.close(n)}))}n[0].classList.add("active"),this._animateIn(t)}}},{key:"close",value:function(e){var t=this.$el.children("li").eq(e);t.length&&t[0].classList.contains("active")&&("function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,t[0]),t[0].classList.remove("active"),this._animateOut(e))}}],[{key:"init",value:function(e,t){return s(u.__proto__||Object.getPrototypeOf(u),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Collapsible}},{key:"defaults",get:function(){return i}}]),u}(u);M.Collapsible=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"collapsible","M_Collapsible")}(cash,M.anime),function(e,t){"use strict";var i={alignment:"left",autoFocus:!0,constrainWidth:!0,container:null,coverTrigger:!0,closeOnClick:!0,hover:!1,inDuration:150,outDuration:250,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null,onItemClick:null},n=function(n){function u(t,i){l(this,u);var n=o(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,u,t,i));return n.el.M_Dropdown=n,u._dropdowns.push(n),n.id=M.getIdFromTrigger(t),n.dropdownEl=document.getElementById(n.id),n.$dropdownEl=e(n.dropdownEl),n.options=e.extend({},u.defaults,i),n.isOpen=!1,n.isScrollable=!1,n.isTouchMoving=!1,n.focusedIndex=-1,n.filterQuery=[],n.options.container?e(n.options.container).append(n.dropdownEl):n.$el.after(n.dropdownEl),n._makeDropdownFocusable(),n._resetFilterQueryBound=n._resetFilterQuery.bind(n),n._handleDocumentClickBound=n._handleDocumentClick.bind(n),n._handleDocumentTouchmoveBound=n._handleDocumentTouchmove.bind(n),n._handleDropdownClickBound=n._handleDropdownClick.bind(n),n._handleDropdownKeydownBound=n._handleDropdownKeydown.bind(n),n._handleTriggerKeydownBound=n._handleTriggerKeydown.bind(n),n._setupEventHandlers(),n}return r(u,n),a(u,[{key:"destroy",value:function(){this._resetDropdownStyles(),this._removeEventHandlers(),u._dropdowns.splice(u._dropdowns.indexOf(this),1),this.el.M_Dropdown=void 0}},{key:"_setupEventHandlers",value:function(){this.el.addEventListener("keydown",this._handleTriggerKeydownBound),this.dropdownEl.addEventListener("click",this._handleDropdownClickBound),this.options.hover?(this._handleMouseEnterBound=this._handleMouseEnter.bind(this),this.el.addEventListener("mouseenter",this._handleMouseEnterBound),this._handleMouseLeaveBound=this._handleMouseLeave.bind(this),this.el.addEventListener("mouseleave",this._handleMouseLeaveBound),this.dropdownEl.addEventListener("mouseleave",this._handleMouseLeaveBound)):(this._handleClickBound=this._handleClick.bind(this),this.el.addEventListener("click",this._handleClickBound))}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("keydown",this._handleTriggerKeydownBound),this.dropdownEl.removeEventListener("click",this._handleDropdownClickBound),this.options.hover?(this.el.removeEventListener("mouseenter",this._handleMouseEnterBound),this.el.removeEventListener("mouseleave",this._handleMouseLeaveBound),this.dropdownEl.removeEventListener("mouseleave",this._handleMouseLeaveBound)):this.el.removeEventListener("click",this._handleClickBound)}},{key:"_setupTemporaryEventHandlers",value:function(){document.body.addEventListener("click",this._handleDocumentClickBound,!0),document.body.addEventListener("touchend",this._handleDocumentClickBound),document.body.addEventListener("touchmove",this._handleDocumentTouchmoveBound),this.dropdownEl.addEventListener("keydown",this._handleDropdownKeydownBound)}},{key:"_removeTemporaryEventHandlers",value:function(){document.body.removeEventListener("click",this._handleDocumentClickBound,!0),document.body.removeEventListener("touchend",this._handleDocumentClickBound),document.body.removeEventListener("touchmove",this._handleDocumentTouchmoveBound),this.dropdownEl.removeEventListener("keydown",this._handleDropdownKeydownBound)}},{key:"_handleClick",value:function(e){e.preventDefault(),this.open()}},{key:"_handleMouseEnter",value:function(){this.open()}},{key:"_handleMouseLeave",value:function(t){var i=t.toElement||t.relatedTarget,n=!!e(i).closest(".dropdown-content").length,s=!1,a=e(i).closest(".dropdown-trigger");a.length&&a[0].M_Dropdown&&a[0].M_Dropdown.isOpen&&(s=!0),s||n||this.close()}},{key:"_handleDocumentClick",value:function(t){var i=this,n=e(t.target);this.options.closeOnClick&&n.closest(".dropdown-content").length&&!this.isTouchMoving?setTimeout((function(){i.close()}),0):!n.closest(".dropdown-trigger").length&&n.closest(".dropdown-content").length||setTimeout((function(){i.close()}),0),this.isTouchMoving=!1}},{key:"_handleTriggerKeydown",value:function(e){e.which!==M.keys.ARROW_DOWN&&e.which!==M.keys.ENTER||this.isOpen||(e.preventDefault(),this.open())}},{key:"_handleDocumentTouchmove",value:function(t){e(t.target).closest(".dropdown-content").length&&(this.isTouchMoving=!0)}},{key:"_handleDropdownClick",value:function(t){if("function"==typeof this.options.onItemClick){var i=e(t.target).closest("li")[0];this.options.onItemClick.call(this,i)}}},{key:"_handleDropdownKeydown",value:function(t){if(t.which===M.keys.TAB)t.preventDefault(),this.close();else if(t.which!==M.keys.ARROW_DOWN&&t.which!==M.keys.ARROW_UP||!this.isOpen)if(t.which===M.keys.ENTER&&this.isOpen){var i=this.dropdownEl.children[this.focusedIndex],n=e(i).find("a, button").first();n.length?n[0].click():i&&i.click()}else t.which===M.keys.ESC&&this.isOpen&&(t.preventDefault(),this.close());else{t.preventDefault();var s=t.which===M.keys.ARROW_DOWN?1:-1,a=this.focusedIndex,o=!1;do{if(a+=s,this.dropdownEl.children[a]&&-1!==this.dropdownEl.children[a].tabIndex){o=!0;break}}while(a<this.dropdownEl.children.length&&a>=0);o&&(this.focusedIndex=a,this._focusFocusedItem())}var r=String.fromCharCode(t.which).toLowerCase();if(r&&-1===[9,13,27,38,40].indexOf(t.which)){this.filterQuery.push(r);var l=this.filterQuery.join(""),u=e(this.dropdownEl).find("li").filter((function(t){return 0===e(t).text().toLowerCase().indexOf(l)}))[0];u&&(this.focusedIndex=e(u).index(),this._focusFocusedItem())}this.filterTimeout=setTimeout(this._resetFilterQueryBound,1e3)}},{key:"_resetFilterQuery",value:function(){this.filterQuery=[]}},{key:"_resetDropdownStyles",value:function(){this.$dropdownEl.css({display:"",width:"",height:"",left:"",top:"","transform-origin":"",transform:"",opacity:""})}},{key:"_makeDropdownFocusable",value:function(){this.dropdownEl.tabIndex=0,e(this.dropdownEl).children().each((function(e){e.getAttribute("tabindex")||e.setAttribute("tabindex",0)}))}},{key:"_focusFocusedItem",value:function(){this.focusedIndex>=0&&this.focusedIndex<this.dropdownEl.children.length&&this.options.autoFocus&&this.dropdownEl.children[this.focusedIndex].focus()}},{key:"_getDropdownPosition",value:function(){this.el.offsetParent.getBoundingClientRect();var e=this.el.getBoundingClientRect(),t=this.dropdownEl.getBoundingClientRect(),i=t.height,n=t.width,s=e.left-t.left,a=e.top-t.top,o={left:s,top:a,height:i,width:n},r=this.dropdownEl.offsetParent?this.dropdownEl.offsetParent:this.dropdownEl.parentNode,l=M.checkPossibleAlignments(this.el,r,o,this.options.coverTrigger?0:e.height),u="top",d=this.options.alignment;if(a+=this.options.coverTrigger?0:e.height,this.isScrollable=!1,l.top||(l.bottom?u="bottom":(this.isScrollable=!0,l.spaceOnTop>l.spaceOnBottom?(u="bottom",i+=l.spaceOnTop,a-=l.spaceOnTop):i+=l.spaceOnBottom)),!l[d]){var c="left"===d?"right":"left";l[c]?d=c:l.spaceOnLeft>l.spaceOnRight?(d="right",n+=l.spaceOnLeft,s-=l.spaceOnLeft):(d="left",n+=l.spaceOnRight)}return"bottom"===u&&(a=a-t.height+(this.options.coverTrigger?e.height:0)),"right"===d&&(s=s-t.width+e.width),{x:s,y:a,verticalAlignment:u,horizontalAlignment:d,height:i,width:n}}},{key:"_animateIn",value:function(){var e=this;t.remove(this.dropdownEl),t({targets:this.dropdownEl,opacity:{value:[0,1],easing:"easeOutQuad"},scaleX:[.3,1],scaleY:[.3,1],duration:this.options.inDuration,easing:"easeOutQuint",complete:function(t){e.options.autoFocus&&e.dropdownEl.focus(),"function"==typeof e.options.onOpenEnd&&e.options.onOpenEnd.call(e,e.el)}})}},{key:"_animateOut",value:function(){var e=this;t.remove(this.dropdownEl),t({targets:this.dropdownEl,opacity:{value:0,easing:"easeOutQuint"},scaleX:.3,scaleY:.3,duration:this.options.outDuration,easing:"easeOutQuint",complete:function(t){e._resetDropdownStyles(),"function"==typeof e.options.onCloseEnd&&e.options.onCloseEnd.call(e,e.el)}})}},{key:"_placeDropdown",value:function(){var e=this.options.constrainWidth?this.el.getBoundingClientRect().width:this.dropdownEl.getBoundingClientRect().width;this.dropdownEl.style.width=e+"px";var t=this._getDropdownPosition();this.dropdownEl.style.left=t.x+"px",this.dropdownEl.style.top=t.y+"px",this.dropdownEl.style.height=t.height+"px",this.dropdownEl.style.width=t.width+"px",this.dropdownEl.style.transformOrigin=("left"===t.horizontalAlignment?"0":"100%")+" "+("top"===t.verticalAlignment?"0":"100%")}},{key:"open",value:function(){this.isOpen||(this.isOpen=!0,"function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,this.el),this._resetDropdownStyles(),this.dropdownEl.style.display="block",this._placeDropdown(),this._animateIn(),this._setupTemporaryEventHandlers())}},{key:"close",value:function(){this.isOpen&&(this.isOpen=!1,this.focusedIndex=-1,"function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,this.el),this._animateOut(),this._removeTemporaryEventHandlers(),this.options.autoFocus&&this.el.focus())}},{key:"recalculateDimensions",value:function(){this.isOpen&&(this.$dropdownEl.css({width:"",height:"",left:"",top:"","transform-origin":""}),this._placeDropdown())}}],[{key:"init",value:function(e,t){return s(u.__proto__||Object.getPrototypeOf(u),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Dropdown}},{key:"defaults",get:function(){return i}}]),u}(u);n._dropdowns=[],M.Dropdown=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"dropdown","M_Dropdown")}(cash,M.anime),function(e,t){"use strict";var i={opacity:.5,inDuration:250,outDuration:250,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null,preventScrolling:!0,dismissible:!0,startingTop:"4%",endingTop:"10%"},n=function(n){function u(t,i){l(this,u);var n=o(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,u,t,i));return n.el.M_Modal=n,n.options=e.extend({},u.defaults,i),n.isOpen=!1,n.id=n.$el.attr("id"),n._openingTrigger=void 0,n.$overlay=e('<div class="modal-overlay"></div>'),n.el.tabIndex=0,n._nthModalOpened=0,u._count++,n._setupEventHandlers(),n}return r(u,n),a(u,[{key:"destroy",value:function(){u._count--,this._removeEventHandlers(),this.el.removeAttribute("style"),this.$overlay.remove(),this.el.M_Modal=void 0}},{key:"_setupEventHandlers",value:function(){this._handleOverlayClickBound=this._handleOverlayClick.bind(this),this._handleModalCloseClickBound=this._handleModalCloseClick.bind(this),1===u._count&&document.body.addEventListener("click",this._handleTriggerClick),this.$overlay[0].addEventListener("click",this._handleOverlayClickBound),this.el.addEventListener("click",this._handleModalCloseClickBound)}},{key:"_removeEventHandlers",value:function(){0===u._count&&document.body.removeEventListener("click",this._handleTriggerClick),this.$overlay[0].removeEventListener("click",this._handleOverlayClickBound),this.el.removeEventListener("click",this._handleModalCloseClickBound)}},{key:"_handleTriggerClick",value:function(t){var i=e(t.target).closest(".modal-trigger");if(i.length){var n=M.getIdFromTrigger(i[0]),s=document.getElementById(n).M_Modal;s&&s.open(i),t.preventDefault()}}},{key:"_handleOverlayClick",value:function(){this.options.dismissible&&this.close()}},{key:"_handleModalCloseClick",value:function(t){e(t.target).closest(".modal-close").length&&this.close()}},{key:"_handleKeydown",value:function(e){27===e.keyCode&&this.options.dismissible&&this.close()}},{key:"_handleFocus",value:function(e){this.el.contains(e.target)||this._nthModalOpened!==u._modalsOpen||this.el.focus()}},{key:"_animateIn",value:function(){var i=this;e.extend(this.el.style,{display:"block",opacity:0}),e.extend(this.$overlay[0].style,{display:"block",opacity:0}),t({targets:this.$overlay[0],opacity:this.options.opacity,duration:this.options.inDuration,easing:"easeOutQuad"});var n={targets:this.el,duration:this.options.inDuration,easing:"easeOutCubic",complete:function(){"function"==typeof i.options.onOpenEnd&&i.options.onOpenEnd.call(i,i.el,i._openingTrigger)}};this.el.classList.contains("bottom-sheet")?(e.extend(n,{bottom:0,opacity:1}),t(n)):(e.extend(n,{top:[this.options.startingTop,this.options.endingTop],opacity:1,scaleX:[.8,1],scaleY:[.8,1]}),t(n))}},{key:"_animateOut",value:function(){var i=this;t({targets:this.$overlay[0],opacity:0,duration:this.options.outDuration,easing:"easeOutQuart"});var n={targets:this.el,duration:this.options.outDuration,easing:"easeOutCubic",complete:function(){i.el.style.display="none",i.$overlay.remove(),"function"==typeof i.options.onCloseEnd&&i.options.onCloseEnd.call(i,i.el)}};this.el.classList.contains("bottom-sheet")?(e.extend(n,{bottom:"-100%",opacity:0}),t(n)):(e.extend(n,{top:[this.options.endingTop,this.options.startingTop],opacity:0,scaleX:.8,scaleY:.8}),t(n))}},{key:"open",value:function(e){if(!this.isOpen)return this.isOpen=!0,u._modalsOpen++,this._nthModalOpened=u._modalsOpen,this.$overlay[0].style.zIndex=1e3+2*u._modalsOpen,this.el.style.zIndex=1e3+2*u._modalsOpen+1,this._openingTrigger=e?e[0]:void 0,"function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,this.el,this._openingTrigger),this.options.preventScrolling&&(document.body.style.overflow="hidden"),this.el.classList.add("open"),this.el.insertAdjacentElement("afterend",this.$overlay[0]),this.options.dismissible&&(this._handleKeydownBound=this._handleKeydown.bind(this),this._handleFocusBound=this._handleFocus.bind(this),document.addEventListener("keydown",this._handleKeydownBound),document.addEventListener("focus",this._handleFocusBound,!0)),t.remove(this.el),t.remove(this.$overlay[0]),this._animateIn(),this.el.focus(),this}},{key:"close",value:function(){if(this.isOpen)return this.isOpen=!1,u._modalsOpen--,this._nthModalOpened=0,"function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,this.el),this.el.classList.remove("open"),0===u._modalsOpen&&(document.body.style.overflow=""),this.options.dismissible&&(document.removeEventListener("keydown",this._handleKeydownBound),document.removeEventListener("focus",this._handleFocusBound,!0)),t.remove(this.el),t.remove(this.$overlay[0]),this._animateOut(),this}}],[{key:"init",value:function(e,t){return s(u.__proto__||Object.getPrototypeOf(u),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Modal}},{key:"defaults",get:function(){return i}}]),u}(u);n._modalsOpen=0,n._count=0,M.Modal=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"modal","M_Modal")}(cash,M.anime),function(e,t){"use strict";var i={inDuration:275,outDuration:200,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null},n=function(n){function u(t,i){l(this,u);var n=o(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,u,t,i));return n.el.M_Materialbox=n,n.options=e.extend({},u.defaults,i),n.overlayActive=!1,n.doneAnimating=!0,n.placeholder=e("<div></div>").addClass("material-placeholder"),n.originalWidth=0,n.originalHeight=0,n.originInlineStyles=n.$el.attr("style"),n.caption=n.el.getAttribute("data-caption")||"",n.$el.before(n.placeholder),n.placeholder.append(n.$el),n._setupEventHandlers(),n}return r(u,n),a(u,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.M_Materialbox=void 0,e(this.placeholder).after(this.el).remove(),this.$el.removeAttr("style")}},{key:"_setupEventHandlers",value:function(){this._handleMaterialboxClickBound=this._handleMaterialboxClick.bind(this),this.el.addEventListener("click",this._handleMaterialboxClickBound)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleMaterialboxClickBound)}},{key:"_handleMaterialboxClick",value:function(e){!1===this.doneAnimating||this.overlayActive&&this.doneAnimating?this.close():this.open()}},{key:"_handleWindowScroll",value:function(){this.overlayActive&&this.close()}},{key:"_handleWindowResize",value:function(){this.overlayActive&&this.close()}},{key:"_handleWindowEscape",value:function(e){27===e.keyCode&&this.doneAnimating&&this.overlayActive&&this.close()}},{key:"_makeAncestorsOverflowVisible",value:function(){this.ancestorsChanged=e();for(var t=this.placeholder[0].parentNode;null!==t&&!e(t).is(document);){var i=e(t);"visible"!==i.css("overflow")&&(i.css("overflow","visible"),void 0===this.ancestorsChanged?this.ancestorsChanged=i:this.ancestorsChanged=this.ancestorsChanged.add(i)),t=t.parentNode}}},{key:"_animateImageIn",value:function(){var e=this,i={targets:this.el,height:[this.originalHeight,this.newHeight],width:[this.originalWidth,this.newWidth],left:M.getDocumentScrollLeft()+this.windowWidth/2-this.placeholder.offset().left-this.newWidth/2,top:M.getDocumentScrollTop()+this.windowHeight/2-this.placeholder.offset().top-this.newHeight/2,duration:this.options.inDuration,easing:"easeOutQuad",complete:function(){e.doneAnimating=!0,"function"==typeof e.options.onOpenEnd&&e.options.onOpenEnd.call(e,e.el)}};this.maxWidth=this.$el.css("max-width"),this.maxHeight=this.$el.css("max-height"),"none"!==this.maxWidth&&(i.maxWidth=this.newWidth),"none"!==this.maxHeight&&(i.maxHeight=this.newHeight),t(i)}},{key:"_animateImageOut",value:function(){var e=this,i={targets:this.el,width:this.originalWidth,height:this.originalHeight,left:0,top:0,duration:this.options.outDuration,easing:"easeOutQuad",complete:function(){e.placeholder.css({height:"",width:"",position:"",top:"",left:""}),e.attrWidth&&e.$el.attr("width",e.attrWidth),e.attrHeight&&e.$el.attr("height",e.attrHeight),e.$el.removeAttr("style"),e.originInlineStyles&&e.$el.attr("style",e.originInlineStyles),e.$el.removeClass("active"),e.doneAnimating=!0,e.ancestorsChanged.length&&e.ancestorsChanged.css("overflow",""),"function"==typeof e.options.onCloseEnd&&e.options.onCloseEnd.call(e,e.el)}};t(i)}},{key:"_updateVars",value:function(){this.windowWidth=window.innerWidth,this.windowHeight=window.innerHeight,this.caption=this.el.getAttribute("data-caption")||""}},{key:"open",value:function(){var i=this;this._updateVars(),this.originalWidth=this.el.getBoundingClientRect().width,this.originalHeight=this.el.getBoundingClientRect().height,this.doneAnimating=!1,this.$el.addClass("active"),this.overlayActive=!0,"function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,this.el),this.placeholder.css({width:this.placeholder[0].getBoundingClientRect().width+"px",height:this.placeholder[0].getBoundingClientRect().height+"px",position:"relative",top:0,left:0}),this._makeAncestorsOverflowVisible(),this.$el.css({position:"absolute","z-index":1e3,"will-change":"left, top, width, height"}),this.attrWidth=this.$el.attr("width"),this.attrHeight=this.$el.attr("height"),this.attrWidth&&(this.$el.css("width",this.attrWidth+"px"),this.$el.removeAttr("width")),this.attrHeight&&(this.$el.css("width",this.attrHeight+"px"),this.$el.removeAttr("height")),this.$overlay=e('<div id="materialbox-overlay"></div>').css({opacity:0}).one("click",(function(){i.doneAnimating&&i.close()})),this.$el.before(this.$overlay);var n=this.$overlay[0].getBoundingClientRect();this.$overlay.css({width:this.windowWidth+"px",height:this.windowHeight+"px",left:-1*n.left+"px",top:-1*n.top+"px"}),t.remove(this.el),t.remove(this.$overlay[0]),t({targets:this.$overlay[0],opacity:1,duration:this.options.inDuration,easing:"easeOutQuad"}),""!==this.caption&&(this.$photocaption&&t.remove(this.$photoCaption[0]),this.$photoCaption=e('<div class="materialbox-caption"></div>'),this.$photoCaption.text(this.caption),e("body").append(this.$photoCaption),this.$photoCaption.css({display:"inline"}),t({targets:this.$photoCaption[0],opacity:1,duration:this.options.inDuration,easing:"easeOutQuad"}));var s=0,a=this.originalWidth/this.windowWidth,o=this.originalHeight/this.windowHeight;this.newWidth=0,this.newHeight=0,a>o?(s=this.originalHeight/this.originalWidth,this.newWidth=.9*this.windowWidth,this.newHeight=.9*this.windowWidth*s):(s=this.originalWidth/this.originalHeight,this.newWidth=.9*this.windowHeight*s,this.newHeight=.9*this.windowHeight),this._animateImageIn(),this._handleWindowScrollBound=this._handleWindowScroll.bind(this),this._handleWindowResizeBound=this._handleWindowResize.bind(this),this._handleWindowEscapeBound=this._handleWindowEscape.bind(this),window.addEventListener("scroll",this._handleWindowScrollBound),window.addEventListener("resize",this._handleWindowResizeBound),window.addEventListener("keyup",this._handleWindowEscapeBound)}},{key:"close",value:function(){var e=this;this._updateVars(),this.doneAnimating=!1,"function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,this.el),t.remove(this.el),t.remove(this.$overlay[0]),""!==this.caption&&t.remove(this.$photoCaption[0]),window.removeEventListener("scroll",this._handleWindowScrollBound),window.removeEventListener("resize",this._handleWindowResizeBound),window.removeEventListener("keyup",this._handleWindowEscapeBound),t({targets:this.$overlay[0],opacity:0,duration:this.options.outDuration,easing:"easeOutQuad",complete:function(){e.overlayActive=!1,e.$overlay.remove()}}),this._animateImageOut(),""!==this.caption&&t({targets:this.$photoCaption[0],opacity:0,duration:this.options.outDuration,easing:"easeOutQuad",complete:function(){e.$photoCaption.remove()}})}}],[{key:"init",value:function(e,t){return s(u.__proto__||Object.getPrototypeOf(u),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Materialbox}},{key:"defaults",get:function(){return i}}]),u}(u);M.Materialbox=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"materialbox","M_Materialbox")}(cash,M.anime),function(e){"use strict";var t={responsiveThreshold:0},i=function(i){function n(t,i){l(this,n);var s=o(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,i));return s.el.M_Parallax=s,s.options=e.extend({},n.defaults,i),s._enabled=window.innerWidth>s.options.responsiveThreshold,s.$img=s.$el.find("img").first(),s.$img.each((function(){this.complete&&e(this).trigger("load")})),s._updateParallax(),s._setupEventHandlers(),s._setupStyles(),n._parallaxes.push(s),s}return r(n,i),a(n,[{key:"destroy",value:function(){n._parallaxes.splice(n._parallaxes.indexOf(this),1),this.$img[0].style.transform="",this._removeEventHandlers(),this.$el[0].M_Parallax=void 0}},{key:"_setupEventHandlers",value:function(){this._handleImageLoadBound=this._handleImageLoad.bind(this),this.$img[0].addEventListener("load",this._handleImageLoadBound),0===n._parallaxes.length&&(n._handleScrollThrottled=M.throttle(n._handleScroll,5),window.addEventListener("scroll",n._handleScrollThrottled),n._handleWindowResizeThrottled=M.throttle(n._handleWindowResize,5),window.addEventListener("resize",n._handleWindowResizeThrottled))}},{key:"_removeEventHandlers",value:function(){this.$img[0].removeEventListener("load",this._handleImageLoadBound),0===n._parallaxes.length&&(window.removeEventListener("scroll",n._handleScrollThrottled),window.removeEventListener("resize",n._handleWindowResizeThrottled))}},{key:"_setupStyles",value:function(){this.$img[0].style.opacity=1}},{key:"_handleImageLoad",value:function(){this._updateParallax()}},{key:"_updateParallax",value:function(){var e=this.$el.height()>0?this.el.parentNode.offsetHeight:500,t=this.$img[0].offsetHeight-e,i=this.$el.offset().top+e,n=this.$el.offset().top,s=M.getDocumentScrollTop(),a=window.innerHeight,o=t*((s+a-n)/(e+a));this._enabled?i>s&&n<s+a&&(this.$img[0].style.transform="translate3D(-50%, "+o+"px, 0)"):this.$img[0].style.transform=""}}],[{key:"init",value:function(e,t){return s(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Parallax}},{key:"_handleScroll",value:function(){for(var e=0;e<n._parallaxes.length;e++){var t=n._parallaxes[e];t._updateParallax.call(t)}}},{key:"_handleWindowResize",value:function(){for(var e=0;e<n._parallaxes.length;e++){var t=n._parallaxes[e];t._enabled=window.innerWidth>t.options.responsiveThreshold}}},{key:"defaults",get:function(){return t}}]),n}(u);i._parallaxes=[],M.Parallax=i,M.jQueryLoaded&&M.initializeJqueryWrapper(i,"parallax","M_Parallax")}(cash),function(e,t){"use strict";var i={duration:300,onShow:null,swipeable:!1,responsiveThreshold:1/0},n=function(n){function u(t,i){l(this,u);var n=o(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,u,t,i));return n.el.M_Tabs=n,n.options=e.extend({},u.defaults,i),n.$tabLinks=n.$el.children("li.tab").children("a"),n.index=0,n._setupActiveTabLink(),n.options.swipeable?n._setupSwipeableTabs():n._setupNormalTabs(),n._setTabsAndTabWidth(),n._createIndicator(),n._setupEventHandlers(),n}return r(u,n),a(u,[{key:"destroy",value:function(){this._removeEventHandlers(),this._indicator.parentNode.removeChild(this._indicator),this.options.swipeable?this._teardownSwipeableTabs():this._teardownNormalTabs(),this.$el[0].M_Tabs=void 0}},{key:"_setupEventHandlers",value:function(){this._handleWindowResizeBound=this._handleWindowResize.bind(this),window.addEventListener("resize",this._handleWindowResizeBound),this._handleTabClickBound=this._handleTabClick.bind(this),this.el.addEventListener("click",this._handleTabClickBound)}},{key:"_removeEventHandlers",value:function(){window.removeEventListener("resize",this._handleWindowResizeBound),this.el.removeEventListener("click",this._handleTabClickBound)}},{key:"_handleWindowResize",value:function(){this._setTabsAndTabWidth(),0!==this.tabWidth&&0!==this.tabsWidth&&(this._indicator.style.left=this._calcLeftPos(this.$activeTabLink)+"px",this._indicator.style.right=this._calcRightPos(this.$activeTabLink)+"px")}},{key:"_handleTabClick",value:function(t){var i=this,n=e(t.target).closest("li.tab"),s=e(t.target).closest("a");if(s.length&&s.parent().hasClass("tab"))if(n.hasClass("disabled"))t.preventDefault();else if(!s.attr("target")){this.$activeTabLink.removeClass("active");var a=this.$content;this.$activeTabLink=s,this.$content=e(M.escapeHash(s[0].hash)),this.$tabLinks=this.$el.children("li.tab").children("a"),this.$activeTabLink.addClass("active");var o=this.index;this.index=Math.max(this.$tabLinks.index(s),0),this.options.swipeable?this._tabsCarousel&&this._tabsCarousel.set(this.index,(function(){"function"==typeof i.options.onShow&&i.options.onShow.call(i,i.$content[0])})):this.$content.length&&(this.$content[0].style.display="block",this.$content.addClass("active"),"function"==typeof this.options.onShow&&this.options.onShow.call(this,this.$content[0]),a.length&&!a.is(this.$content)&&(a[0].style.display="none",a.removeClass("active"))),this._setTabsAndTabWidth(),this._animateIndicator(o),t.preventDefault()}}},{key:"_createIndicator",value:function(){var e=this,t=document.createElement("li");t.classList.add("indicator"),this.el.appendChild(t),this._indicator=t,setTimeout((function(){e._indicator.style.left=e._calcLeftPos(e.$activeTabLink)+"px",e._indicator.style.right=e._calcRightPos(e.$activeTabLink)+"px"}),0)}},{key:"_setupActiveTabLink",value:function(){this.$activeTabLink=e(this.$tabLinks.filter('[href="'+location.hash+'"]')),0===this.$activeTabLink.length&&(this.$activeTabLink=this.$el.children("li.tab").children("a.active").first()),0===this.$activeTabLink.length&&(this.$activeTabLink=this.$el.children("li.tab").children("a").first()),this.$tabLinks.removeClass("active"),this.$activeTabLink[0].classList.add("active"),this.index=Math.max(this.$tabLinks.index(this.$activeTabLink),0),this.$activeTabLink.length&&(this.$content=e(M.escapeHash(this.$activeTabLink[0].hash)),this.$content.addClass("active"))}},{key:"_setupSwipeableTabs",value:function(){var t=this;window.innerWidth>this.options.responsiveThreshold&&(this.options.swipeable=!1);var i=e();this.$tabLinks.each((function(t){var n=e(M.escapeHash(t.hash));n.addClass("carousel-item"),i=i.add(n)}));var n=e('<div class="tabs-content carousel carousel-slider"></div>');i.first().before(n),n.append(i),i[0].style.display="";var s=this.$activeTabLink.closest(".tab").index();this._tabsCarousel=M.Carousel.init(n[0],{fullWidth:!0,noWrap:!0,onCycleTo:function(i){var n=t.index;t.index=e(i).index(),t.$activeTabLink.removeClass("active"),t.$activeTabLink=t.$tabLinks.eq(t.index),t.$activeTabLink.addClass("active"),t._animateIndicator(n),"function"==typeof t.options.onShow&&t.options.onShow.call(t,t.$content[0])}}),this._tabsCarousel.set(s)}},{key:"_teardownSwipeableTabs",value:function(){var e=this._tabsCarousel.$el;this._tabsCarousel.destroy(),e.after(e.children()),e.remove()}},{key:"_setupNormalTabs",value:function(){this.$tabLinks.not(this.$activeTabLink).each((function(t){if(t.hash){var i=e(M.escapeHash(t.hash));i.length&&(i[0].style.display="none")}}))}},{key:"_teardownNormalTabs",value:function(){this.$tabLinks.each((function(t){if(t.hash){var i=e(M.escapeHash(t.hash));i.length&&(i[0].style.display="")}}))}},{key:"_setTabsAndTabWidth",value:function(){this.tabsWidth=this.$el.width(),this.tabWidth=Math.max(this.tabsWidth,this.el.scrollWidth)/this.$tabLinks.length}},{key:"_calcRightPos",value:function(e){return Math.ceil(this.tabsWidth-e.position().left-e[0].getBoundingClientRect().width)}},{key:"_calcLeftPos",value:function(e){return Math.floor(e.position().left)}},{key:"updateTabIndicator",value:function(){this._setTabsAndTabWidth(),this._animateIndicator(this.index)}},{key:"_animateIndicator",value:function(e){var i=0,n=0;this.index-e>=0?i=90:n=90;var s={targets:this._indicator,left:{value:this._calcLeftPos(this.$activeTabLink),delay:i},right:{value:this._calcRightPos(this.$activeTabLink),delay:n},duration:this.options.duration,easing:"easeOutQuad"};t.remove(this._indicator),t(s)}},{key:"select",value:function(e){var t=this.$tabLinks.filter('[href="#'+e+'"]');t.length&&t.trigger("click")}}],[{key:"init",value:function(e,t){return s(u.__proto__||Object.getPrototypeOf(u),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Tabs}},{key:"defaults",get:function(){return i}}]),u}(u);M.Tabs=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"tabs","M_Tabs")}(cash,M.anime),function(e,t){"use strict";var i={exitDelay:200,enterDelay:0,html:null,margin:5,inDuration:250,outDuration:200,position:"bottom",transitionMovement:10},n=function(n){function u(t,i){l(this,u);var n=o(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,u,t,i));return n.el.M_Tooltip=n,n.options=e.extend({},u.defaults,i),n.isOpen=!1,n.isHovered=!1,n.isFocused=!1,n._appendTooltipEl(),n._setupEventHandlers(),n}return r(u,n),a(u,[{key:"destroy",value:function(){e(this.tooltipEl).remove(),this._removeEventHandlers(),this.el.M_Tooltip=void 0}},{key:"_appendTooltipEl",value:function(){var e=document.createElement("div");e.classList.add("material-tooltip"),this.tooltipEl=e;var t=document.createElement("div");t.classList.add("tooltip-content"),t.innerHTML=this.options.html,e.appendChild(t),document.body.appendChild(e)}},{key:"_updateTooltipContent",value:function(){this.tooltipEl.querySelector(".tooltip-content").innerHTML=this.options.html}},{key:"_setupEventHandlers",value:function(){this._handleMouseEnterBound=this._handleMouseEnter.bind(this),this._handleMouseLeaveBound=this._handleMouseLeave.bind(this),this._handleFocusBound=this._handleFocus.bind(this),this._handleBlurBound=this._handleBlur.bind(this),this.el.addEventListener("mouseenter",this._handleMouseEnterBound),this.el.addEventListener("mouseleave",this._handleMouseLeaveBound),this.el.addEventListener("focus",this._handleFocusBound,!0),this.el.addEventListener("blur",this._handleBlurBound,!0)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("mouseenter",this._handleMouseEnterBound),this.el.removeEventListener("mouseleave",this._handleMouseLeaveBound),this.el.removeEventListener("focus",this._handleFocusBound,!0),this.el.removeEventListener("blur",this._handleBlurBound,!0)}},{key:"open",value:function(t){this.isOpen||(t=void 0===t||void 0,this.isOpen=!0,this.options=e.extend({},this.options,this._getAttributeOptions()),this._updateTooltipContent(),this._setEnterDelayTimeout(t))}},{key:"close",value:function(){this.isOpen&&(this.isHovered=!1,this.isFocused=!1,this.isOpen=!1,this._setExitDelayTimeout())}},{key:"_setExitDelayTimeout",value:function(){var e=this;clearTimeout(this._exitDelayTimeout),this._exitDelayTimeout=setTimeout((function(){e.isHovered||e.isFocused||e._animateOut()}),this.options.exitDelay)}},{key:"_setEnterDelayTimeout",value:function(e){var t=this;clearTimeout(this._enterDelayTimeout),this._enterDelayTimeout=setTimeout((function(){(t.isHovered||t.isFocused||e)&&t._animateIn()}),this.options.enterDelay)}},{key:"_positionTooltip",value:function(){var t,i=this.el,n=this.tooltipEl,s=i.offsetHeight,a=i.offsetWidth,o=n.offsetHeight,r=n.offsetWidth,l=this.options.margin,u=void 0,d=void 0;this.xMovement=0,this.yMovement=0,u=i.getBoundingClientRect().top+M.getDocumentScrollTop(),d=i.getBoundingClientRect().left+M.getDocumentScrollLeft(),"top"===this.options.position?(u+=-o-l,d+=a/2-r/2,this.yMovement=-this.options.transitionMovement):"right"===this.options.position?(u+=s/2-o/2,d+=a+l,this.xMovement=this.options.transitionMovement):"left"===this.options.position?(u+=s/2-o/2,d+=-r-l,this.xMovement=-this.options.transitionMovement):(u+=s+l,d+=a/2-r/2,this.yMovement=this.options.transitionMovement),t=this._repositionWithinScreen(d,u,r,o),e(n).css({top:t.y+"px",left:t.x+"px"})}},{key:"_repositionWithinScreen",value:function(e,t,i,n){var s=M.getDocumentScrollLeft(),a=M.getDocumentScrollTop(),o=e-s,r=t-a,l={left:o,top:r,width:i,height:n},u=this.options.margin+this.options.transitionMovement,d=M.checkWithinContainer(document.body,l,u);return d.left?o=u:d.right&&(o-=o+i-window.innerWidth),d.top?r=u:d.bottom&&(r-=r+n-window.innerHeight),{x:o+s,y:r+a}}},{key:"_animateIn",value:function(){this._positionTooltip(),this.tooltipEl.style.visibility="visible",t.remove(this.tooltipEl),t({targets:this.tooltipEl,opacity:1,translateX:this.xMovement,translateY:this.yMovement,duration:this.options.inDuration,easing:"easeOutCubic"})}},{key:"_animateOut",value:function(){t.remove(this.tooltipEl),t({targets:this.tooltipEl,opacity:0,translateX:0,translateY:0,duration:this.options.outDuration,easing:"easeOutCubic"})}},{key:"_handleMouseEnter",value:function(){this.isHovered=!0,this.isFocused=!1,this.open(!1)}},{key:"_handleMouseLeave",value:function(){this.isHovered=!1,this.isFocused=!1,this.close()}},{key:"_handleFocus",value:function(){M.tabPressed&&(this.isFocused=!0,this.open(!1))}},{key:"_handleBlur",value:function(){this.isFocused=!1,this.close()}},{key:"_getAttributeOptions",value:function(){var e={},t=this.el.getAttribute("data-tooltip"),i=this.el.getAttribute("data-position");return t&&(e.html=t),i&&(e.position=i),e}}],[{key:"init",value:function(e,t){return s(u.__proto__||Object.getPrototypeOf(u),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Tooltip}},{key:"defaults",get:function(){return i}}]),u}(u);M.Tooltip=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"tooltip","M_Tooltip")}(cash,M.anime),function(e){"use strict";var t=t||{},i=document.querySelectorAll.bind(document);function n(e){var t="";for(var i in e)e.hasOwnProperty(i)&&(t+=i+":"+e[i]+";");return t}var s={duration:750,show:function(e,t){if(2===e.button)return!1;var i=t||this,a=document.createElement("div");a.className="waves-ripple",i.appendChild(a);var o,r,l,u,d,c=(u={top:0,left:0},d=(o=i)&&o.ownerDocument,r=d.documentElement,void 0!==o.getBoundingClientRect&&(u=o.getBoundingClientRect()),l=function(e){return null!==(t=e)&&t===t.window?e:9===e.nodeType&&e.defaultView;var t}(d),{top:u.top+l.pageYOffset-r.clientTop,left:u.left+l.pageXOffset-r.clientLeft}),h=e.pageY-c.top,p=e.pageX-c.left,v="scale("+i.clientWidth/100*10+")";"touches"in e&&(h=e.touches[0].pageY-c.top,p=e.touches[0].pageX-c.left),a.setAttribute("data-hold",Date.now()),a.setAttribute("data-scale",v),a.setAttribute("data-x",p),a.setAttribute("data-y",h);var f={top:h+"px",left:p+"px"};a.className=a.className+" waves-notransition",a.setAttribute("style",n(f)),a.className=a.className.replace("waves-notransition",""),f["-webkit-transform"]=v,f["-moz-transform"]=v,f["-ms-transform"]=v,f["-o-transform"]=v,f.transform=v,f.opacity="1",f["-webkit-transition-duration"]=s.duration+"ms",f["-moz-transition-duration"]=s.duration+"ms",f["-o-transition-duration"]=s.duration+"ms",f["transition-duration"]=s.duration+"ms",f["-webkit-transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",f["-moz-transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",f["-o-transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",f["transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",a.setAttribute("style",n(f))},hide:function(e){a.touchup(e);var t=this,i=(t.clientWidth,null),o=t.getElementsByClassName("waves-ripple");if(!(o.length>0))return!1;var r=(i=o[o.length-1]).getAttribute("data-x"),l=i.getAttribute("data-y"),u=i.getAttribute("data-scale"),d=350-(Date.now()-Number(i.getAttribute("data-hold")));d<0&&(d=0),setTimeout((function(){var e={top:l+"px",left:r+"px",opacity:"0","-webkit-transition-duration":s.duration+"ms","-moz-transition-duration":s.duration+"ms","-o-transition-duration":s.duration+"ms","transition-duration":s.duration+"ms","-webkit-transform":u,"-moz-transform":u,"-ms-transform":u,"-o-transform":u,transform:u};i.setAttribute("style",n(e)),setTimeout((function(){try{t.removeChild(i)}catch(e){return!1}}),s.duration)}),d)},wrapInput:function(e){for(var t=0;t<e.length;t++){var i=e[t];if("input"===i.tagName.toLowerCase()){var n=i.parentNode;if("i"===n.tagName.toLowerCase()&&-1!==n.className.indexOf("waves-effect"))continue;var s=document.createElement("i");s.className=i.className+" waves-input-wrapper";var a=i.getAttribute("style");a||(a=""),s.setAttribute("style",a),i.className="waves-button-input",i.removeAttribute("style"),n.replaceChild(s,i),s.appendChild(i)}}}},a={touches:0,allowEvent:function(e){var t=!0;return"touchstart"===e.type?a.touches+=1:"touchend"===e.type||"touchcancel"===e.type?setTimeout((function(){a.touches>0&&(a.touches-=1)}),500):"mousedown"===e.type&&a.touches>0&&(t=!1),t},touchup:function(e){a.allowEvent(e)}};function o(t){var i=function(e){if(!1===a.allowEvent(e))return null;for(var t=null,i=e.target||e.srcElement;null!==i.parentNode;){if(!(i instanceof SVGElement)&&-1!==i.className.indexOf("waves-effect")){t=i;break}i=i.parentNode}return t}(t);null!==i&&(s.show(t,i),"ontouchstart"in e&&(i.addEventListener("touchend",s.hide,!1),i.addEventListener("touchcancel",s.hide,!1)),i.addEventListener("mouseup",s.hide,!1),i.addEventListener("mouseleave",s.hide,!1),i.addEventListener("dragend",s.hide,!1))}t.displayEffect=function(t){"duration"in(t=t||{})&&(s.duration=t.duration),s.wrapInput(i(".waves-effect")),"ontouchstart"in e&&document.body.addEventListener("touchstart",o,!1),document.body.addEventListener("mousedown",o,!1)},t.attach=function(t){"input"===t.tagName.toLowerCase()&&(s.wrapInput([t]),t=t.parentNode),"ontouchstart"in e&&t.addEventListener("touchstart",o,!1),t.addEventListener("mousedown",o,!1)},e.Waves=t,document.addEventListener("DOMContentLoaded",(function(){t.displayEffect()}),!1)}(window),function(e,t){"use strict";var i={html:"",displayLength:4e3,inDuration:300,outDuration:375,classes:"",completeCallback:null,activationPercent:.8},n=function(){function n(t){l(this,n),this.options=e.extend({},n.defaults,t),this.message=this.options.html,this.panning=!1,this.timeRemaining=this.options.displayLength,0===n._toasts.length&&n._createContainer(),n._toasts.push(this);var i=this._createToast();i.M_Toast=this,this.el=i,this.$el=e(i),this._animateIn(),this._setTimer()}return a(n,[{key:"_createToast",value:function(){var t=document.createElement("div");return t.classList.add("toast"),this.options.classes.length&&e(t).addClass(this.options.classes),("object"==typeof HTMLElement?this.message instanceof HTMLElement:this.message&&"object"==typeof this.message&&null!==this.message&&1===this.message.nodeType&&"string"==typeof this.message.nodeName)?t.appendChild(this.message):this.message.jquery?e(t).append(this.message[0]):t.innerHTML=this.message,n._container.appendChild(t),t}},{key:"_animateIn",value:function(){t({targets:this.el,top:0,opacity:1,duration:this.options.inDuration,easing:"easeOutCubic"})}},{key:"_setTimer",value:function(){var e=this;this.timeRemaining!==1/0&&(this.counterInterval=setInterval((function(){e.panning||(e.timeRemaining-=20),e.timeRemaining<=0&&e.dismiss()}),20))}},{key:"dismiss",value:function(){var e=this;window.clearInterval(this.counterInterval);var i=this.el.offsetWidth*this.options.activationPercent;this.wasSwiped&&(this.el.style.transition="transform .05s, opacity .05s",this.el.style.transform="translateX("+i+"px)",this.el.style.opacity=0),t({targets:this.el,opacity:0,marginTop:-40,duration:this.options.outDuration,easing:"easeOutExpo",complete:function(){"function"==typeof e.options.completeCallback&&e.options.completeCallback(),e.$el.remove(),n._toasts.splice(n._toasts.indexOf(e),1),0===n._toasts.length&&n._removeContainer()}})}}],[{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Toast}},{key:"_createContainer",value:function(){var e=document.createElement("div");e.setAttribute("id","toast-container"),e.addEventListener("touchstart",n._onDragStart),e.addEventListener("touchmove",n._onDragMove),e.addEventListener("touchend",n._onDragEnd),e.addEventListener("mousedown",n._onDragStart),document.addEventListener("mousemove",n._onDragMove),document.addEventListener("mouseup",n._onDragEnd),document.body.appendChild(e),n._container=e}},{key:"_removeContainer",value:function(){document.removeEventListener("mousemove",n._onDragMove),document.removeEventListener("mouseup",n._onDragEnd),e(n._container).remove(),n._container=null}},{key:"_onDragStart",value:function(t){if(t.target&&e(t.target).closest(".toast").length){var i=e(t.target).closest(".toast")[0].M_Toast;i.panning=!0,n._draggedToast=i,i.el.classList.add("panning"),i.el.style.transition="",i.startingXPos=n._xPos(t),i.time=Date.now(),i.xPos=n._xPos(t)}}},{key:"_onDragMove",value:function(e){if(n._draggedToast){e.preventDefault();var t=n._draggedToast;t.deltaX=Math.abs(t.xPos-n._xPos(e)),t.xPos=n._xPos(e),t.velocityX=t.deltaX/(Date.now()-t.time),t.time=Date.now();var i=t.xPos-t.startingXPos,s=t.el.offsetWidth*t.options.activationPercent;t.el.style.transform="translateX("+i+"px)",t.el.style.opacity=1-Math.abs(i/s)}}},{key:"_onDragEnd",value:function(){if(n._draggedToast){var e=n._draggedToast;e.panning=!1,e.el.classList.remove("panning");var t=e.xPos-e.startingXPos,i=e.el.offsetWidth*e.options.activationPercent;Math.abs(t)>i||e.velocityX>1?(e.wasSwiped=!0,e.dismiss()):(e.el.style.transition="transform .2s, opacity .2s",e.el.style.transform="",e.el.style.opacity=""),n._draggedToast=null}}},{key:"_xPos",value:function(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}},{key:"dismissAll",value:function(){for(var e in n._toasts)n._toasts[e].dismiss()}},{key:"defaults",get:function(){return i}}]),n}();n._toasts=[],n._container=null,n._draggedToast=null,M.Toast=n,M.toast=function(e){return new n(e)}}(cash,M.anime),function(e,t){"use strict";var i={edge:"left",draggable:!0,inDuration:250,outDuration:200,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null,preventScrolling:!0},n=function(n){function u(t,i){l(this,u);var n=o(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,u,t,i));return n.el.M_Sidenav=n,n.id=n.$el.attr("id"),n.options=e.extend({},u.defaults,i),n.isOpen=!1,n.isFixed=n.el.classList.contains("sidenav-fixed"),n.isDragged=!1,n.lastWindowWidth=window.innerWidth,n.lastWindowHeight=window.innerHeight,n._createOverlay(),n._createDragTarget(),n._setupEventHandlers(),n._setupClasses(),n._setupFixed(),u._sidenavs.push(n),n}return r(u,n),a(u,[{key:"destroy",value:function(){this._removeEventHandlers(),this._enableBodyScrolling(),this._overlay.parentNode.removeChild(this._overlay),this.dragTarget.parentNode.removeChild(this.dragTarget),this.el.M_Sidenav=void 0,this.el.style.transform="";var e=u._sidenavs.indexOf(this);e>=0&&u._sidenavs.splice(e,1)}},{key:"_createOverlay",value:function(){var e=document.createElement("div");this._closeBound=this.close.bind(this),e.classList.add("sidenav-overlay"),e.addEventListener("click",this._closeBound),document.body.appendChild(e),this._overlay=e}},{key:"_setupEventHandlers",value:function(){0===u._sidenavs.length&&document.body.addEventListener("click",this._handleTriggerClick),this._handleDragTargetDragBound=this._handleDragTargetDrag.bind(this),this._handleDragTargetReleaseBound=this._handleDragTargetRelease.bind(this),this._handleCloseDragBound=this._handleCloseDrag.bind(this),this._handleCloseReleaseBound=this._handleCloseRelease.bind(this),this._handleCloseTriggerClickBound=this._handleCloseTriggerClick.bind(this),this.dragTarget.addEventListener("touchmove",this._handleDragTargetDragBound),this.dragTarget.addEventListener("touchend",this._handleDragTargetReleaseBound),this._overlay.addEventListener("touchmove",this._handleCloseDragBound),this._overlay.addEventListener("touchend",this._handleCloseReleaseBound),this.el.addEventListener("touchmove",this._handleCloseDragBound),this.el.addEventListener("touchend",this._handleCloseReleaseBound),this.el.addEventListener("click",this._handleCloseTriggerClickBound),this.isFixed&&(this._handleWindowResizeBound=this._handleWindowResize.bind(this),window.addEventListener("resize",this._handleWindowResizeBound))}},{key:"_removeEventHandlers",value:function(){1===u._sidenavs.length&&document.body.removeEventListener("click",this._handleTriggerClick),this.dragTarget.removeEventListener("touchmove",this._handleDragTargetDragBound),this.dragTarget.removeEventListener("touchend",this._handleDragTargetReleaseBound),this._overlay.removeEventListener("touchmove",this._handleCloseDragBound),this._overlay.removeEventListener("touchend",this._handleCloseReleaseBound),this.el.removeEventListener("touchmove",this._handleCloseDragBound),this.el.removeEventListener("touchend",this._handleCloseReleaseBound),this.el.removeEventListener("click",this._handleCloseTriggerClickBound),this.isFixed&&window.removeEventListener("resize",this._handleWindowResizeBound)}},{key:"_handleTriggerClick",value:function(t){var i=e(t.target).closest(".sidenav-trigger");if(t.target&&i.length){var n=M.getIdFromTrigger(i[0]),s=document.getElementById(n).M_Sidenav;s&&s.open(i),t.preventDefault()}}},{key:"_startDrag",value:function(e){var i=e.targetTouches[0].clientX;this.isDragged=!0,this._startingXpos=i,this._xPos=this._startingXpos,this._time=Date.now(),this._width=this.el.getBoundingClientRect().width,this._overlay.style.display="block",this._initialScrollTop=this.isOpen?this.el.scrollTop:M.getDocumentScrollTop(),this._verticallyScrolling=!1,t.remove(this.el),t.remove(this._overlay)}},{key:"_dragMoveUpdate",value:function(e){var t=e.targetTouches[0].clientX,i=this.isOpen?this.el.scrollTop:M.getDocumentScrollTop();this.deltaX=Math.abs(this._xPos-t),this._xPos=t,this.velocityX=this.deltaX/(Date.now()-this._time),this._time=Date.now(),this._initialScrollTop!==i&&(this._verticallyScrolling=!0)}},{key:"_handleDragTargetDrag",value:function(e){if(this.options.draggable&&!this._isCurrentlyFixed()&&!this._verticallyScrolling){this.isDragged||this._startDrag(e),this._dragMoveUpdate(e);var t=this._xPos-this._startingXpos,i=t>0?"right":"left";t=Math.min(this._width,Math.abs(t)),this.options.edge===i&&(t=0);var n=t,s="translateX(-100%)";"right"===this.options.edge&&(s="translateX(100%)",n=-n),this.percentOpen=Math.min(1,t/this._width),this.el.style.transform=s+" translateX("+n+"px)",this._overlay.style.opacity=this.percentOpen}}},{key:"_handleDragTargetRelease",value:function(){this.isDragged&&(this.percentOpen>.2?this.open():this._animateOut(),this.isDragged=!1,this._verticallyScrolling=!1)}},{key:"_handleCloseDrag",value:function(e){if(this.isOpen){if(!this.options.draggable||this._isCurrentlyFixed()||this._verticallyScrolling)return;this.isDragged||this._startDrag(e),this._dragMoveUpdate(e);var t=this._xPos-this._startingXpos,i=t>0?"right":"left";t=Math.min(this._width,Math.abs(t)),this.options.edge!==i&&(t=0);var n=-t;"right"===this.options.edge&&(n=-n),this.percentOpen=Math.min(1,1-t/this._width),this.el.style.transform="translateX("+n+"px)",this._overlay.style.opacity=this.percentOpen}}},{key:"_handleCloseRelease",value:function(){this.isOpen&&this.isDragged&&(this.percentOpen>.8?this._animateIn():this.close(),this.isDragged=!1,this._verticallyScrolling=!1)}},{key:"_handleCloseTriggerClick",value:function(t){e(t.target).closest(".sidenav-close").length&&!this._isCurrentlyFixed()&&this.close()}},{key:"_handleWindowResize",value:function(){this.lastWindowWidth!==window.innerWidth&&(window.innerWidth>992?this.open():this.close()),this.lastWindowWidth=window.innerWidth,this.lastWindowHeight=window.innerHeight}},{key:"_setupClasses",value:function(){"right"===this.options.edge&&(this.el.classList.add("right-aligned"),this.dragTarget.classList.add("right-aligned"))}},{key:"_removeClasses",value:function(){this.el.classList.remove("right-aligned"),this.dragTarget.classList.remove("right-aligned")}},{key:"_setupFixed",value:function(){this._isCurrentlyFixed()&&this.open()}},{key:"_isCurrentlyFixed",value:function(){return this.isFixed&&window.innerWidth>992}},{key:"_createDragTarget",value:function(){var e=document.createElement("div");e.classList.add("drag-target"),document.body.appendChild(e),this.dragTarget=e}},{key:"_preventBodyScrolling",value:function(){document.body.style.overflow="hidden"}},{key:"_enableBodyScrolling",value:function(){document.body.style.overflow=""}},{key:"open",value:function(){!0!==this.isOpen&&(this.isOpen=!0,"function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,this.el),this._isCurrentlyFixed()?(t.remove(this.el),t({targets:this.el,translateX:0,duration:0,easing:"easeOutQuad"}),this._enableBodyScrolling(),this._overlay.style.display="none"):(this.options.preventScrolling&&this._preventBodyScrolling(),this.isDragged&&1==this.percentOpen||this._animateIn()))}},{key:"close",value:function(){if(!1!==this.isOpen)if(this.isOpen=!1,"function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,this.el),this._isCurrentlyFixed()){var e="left"===this.options.edge?"-105%":"105%";this.el.style.transform="translateX("+e+")"}else this._enableBodyScrolling(),this.isDragged&&0==this.percentOpen?this._overlay.style.display="none":this._animateOut()}},{key:"_animateIn",value:function(){this._animateSidenavIn(),this._animateOverlayIn()}},{key:"_animateSidenavIn",value:function(){var e=this,i="left"===this.options.edge?-1:1;this.isDragged&&(i="left"===this.options.edge?i+this.percentOpen:i-this.percentOpen),t.remove(this.el),t({targets:this.el,translateX:[100*i+"%",0],duration:this.options.inDuration,easing:"easeOutQuad",complete:function(){"function"==typeof e.options.onOpenEnd&&e.options.onOpenEnd.call(e,e.el)}})}},{key:"_animateOverlayIn",value:function(){var i=0;this.isDragged?i=this.percentOpen:e(this._overlay).css({display:"block"}),t.remove(this._overlay),t({targets:this._overlay,opacity:[i,1],duration:this.options.inDuration,easing:"easeOutQuad"})}},{key:"_animateOut",value:function(){this._animateSidenavOut(),this._animateOverlayOut()}},{key:"_animateSidenavOut",value:function(){var e=this,i="left"===this.options.edge?-1:1,n=0;this.isDragged&&(n="left"===this.options.edge?i+this.percentOpen:i-this.percentOpen),t.remove(this.el),t({targets:this.el,translateX:[100*n+"%",105*i+"%"],duration:this.options.outDuration,easing:"easeOutQuad",complete:function(){"function"==typeof e.options.onCloseEnd&&e.options.onCloseEnd.call(e,e.el)}})}},{key:"_animateOverlayOut",value:function(){var i=this;t.remove(this._overlay),t({targets:this._overlay,opacity:0,duration:this.options.outDuration,easing:"easeOutQuad",complete:function(){e(i._overlay).css("display","none")}})}}],[{key:"init",value:function(e,t){return s(u.__proto__||Object.getPrototypeOf(u),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Sidenav}},{key:"defaults",get:function(){return i}}]),u}(u);n._sidenavs=[],M.Sidenav=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"sidenav","M_Sidenav")}(cash,M.anime),function(e,t){"use strict";var i={throttle:100,scrollOffset:200,activeClass:"active",getActiveElement:function(e){return'a[href="#'+e+'"]'}},n=function(n){function u(t,i){l(this,u);var n=o(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,u,t,i));return n.el.M_ScrollSpy=n,n.options=e.extend({},u.defaults,i),u._elements.push(n),u._count++,u._increment++,n.tickId=-1,n.id=u._increment,n._setupEventHandlers(),n._handleWindowScroll(),n}return r(u,n),a(u,[{key:"destroy",value:function(){u._elements.splice(u._elements.indexOf(this),1),u._elementsInView.splice(u._elementsInView.indexOf(this),1),u._visibleElements.splice(u._visibleElements.indexOf(this.$el),1),u._count--,this._removeEventHandlers(),e(this.options.getActiveElement(this.$el.attr("id"))).removeClass(this.options.activeClass),this.el.M_ScrollSpy=void 0}},{key:"_setupEventHandlers",value:function(){var e=M.throttle(this._handleWindowScroll,200);this._handleThrottledResizeBound=e.bind(this),this._handleWindowScrollBound=this._handleWindowScroll.bind(this),1===u._count&&(window.addEventListener("scroll",this._handleWindowScrollBound),window.addEventListener("resize",this._handleThrottledResizeBound),document.body.addEventListener("click",this._handleTriggerClick))}},{key:"_removeEventHandlers",value:function(){0===u._count&&(window.removeEventListener("scroll",this._handleWindowScrollBound),window.removeEventListener("resize",this._handleThrottledResizeBound),document.body.removeEventListener("click",this._handleTriggerClick))}},{key:"_handleTriggerClick",value:function(i){for(var n=e(i.target),s=u._elements.length-1;s>=0;s--){var a=u._elements[s];if(n.is('a[href="#'+a.$el.attr("id")+'"]')){i.preventDefault();var o=a.$el.offset().top+1;t({targets:[document.documentElement,document.body],scrollTop:o-a.options.scrollOffset,duration:400,easing:"easeOutCubic"});break}}}},{key:"_handleWindowScroll",value:function(){u._ticks++;for(var e=M.getDocumentScrollTop(),t=M.getDocumentScrollLeft(),i=t+window.innerWidth,n=e+window.innerHeight,s=u._findElements(e,i,n,t),a=0;a<s.length;a++){var o=s[a];o.tickId<0&&o._enter(),o.tickId=u._ticks}for(var r=0;r<u._elementsInView.length;r++){var l=u._elementsInView[r],d=l.tickId;d>=0&&d!==u._ticks&&(l._exit(),l.tickId=-1)}u._elementsInView=s}},{key:"_enter",value:function(){u._visibleElements=u._visibleElements.filter((function(e){return 0!=e.height()})),u._visibleElements[0]?(e(this.options.getActiveElement(u._visibleElements[0].attr("id"))).removeClass(this.options.activeClass),u._visibleElements[0][0].M_ScrollSpy&&this.id<u._visibleElements[0][0].M_ScrollSpy.id?u._visibleElements.unshift(this.$el):u._visibleElements.push(this.$el)):u._visibleElements.push(this.$el),e(this.options.getActiveElement(u._visibleElements[0].attr("id"))).addClass(this.options.activeClass)}},{key:"_exit",value:function(){var t=this;u._visibleElements=u._visibleElements.filter((function(e){return 0!=e.height()})),u._visibleElements[0]&&(e(this.options.getActiveElement(u._visibleElements[0].attr("id"))).removeClass(this.options.activeClass),u._visibleElements=u._visibleElements.filter((function(e){return e.attr("id")!=t.$el.attr("id")})),u._visibleElements[0]&&e(this.options.getActiveElement(u._visibleElements[0].attr("id"))).addClass(this.options.activeClass))}}],[{key:"init",value:function(e,t){return s(u.__proto__||Object.getPrototypeOf(u),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_ScrollSpy}},{key:"_findElements",value:function(e,t,i,n){for(var s=[],a=0;a<u._elements.length;a++){var o=u._elements[a],r=e+o.options.scrollOffset||200;if(o.$el.height()>0){var l=o.$el.offset().top,d=o.$el.offset().left,c=d+o.$el.width(),h=l+o.$el.height();!(d>t||c<n||l>i||h<r)&&s.push(o)}}return s}},{key:"defaults",get:function(){return i}}]),u}(u);n._elements=[],n._elementsInView=[],n._visibleElements=[],n._count=0,n._increment=0,n._ticks=0,M.ScrollSpy=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"scrollSpy","M_ScrollSpy")}(cash,M.anime),function(e){"use strict";var t={data:{},limit:1/0,onAutocomplete:null,minLength:1,sortFunction:function(e,t,i){return e.indexOf(i)-t.indexOf(i)}},i=function(i){function n(t,i){l(this,n);var s=o(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,i));return s.el.M_Autocomplete=s,s.options=e.extend({},n.defaults,i),s.isOpen=!1,s.count=0,s.activeIndex=-1,s.oldVal,s.$inputField=s.$el.closest(".input-field"),s.$active=e(),s._mousedown=!1,s._setupDropdown(),s._setupEventHandlers(),s}return r(n,i),a(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this._removeDropdown(),this.el.M_Autocomplete=void 0}},{key:"_setupEventHandlers",value:function(){this._handleInputBlurBound=this._handleInputBlur.bind(this),this._handleInputKeyupAndFocusBound=this._handleInputKeyupAndFocus.bind(this),this._handleInputKeydownBound=this._handleInputKeydown.bind(this),this._handleInputClickBound=this._handleInputClick.bind(this),this._handleContainerMousedownAndTouchstartBound=this._handleContainerMousedownAndTouchstart.bind(this),this._handleContainerMouseupAndTouchendBound=this._handleContainerMouseupAndTouchend.bind(this),this.el.addEventListener("blur",this._handleInputBlurBound),this.el.addEventListener("keyup",this._handleInputKeyupAndFocusBound),this.el.addEventListener("focus",this._handleInputKeyupAndFocusBound),this.el.addEventListener("keydown",this._handleInputKeydownBound),this.el.addEventListener("click",this._handleInputClickBound),this.container.addEventListener("mousedown",this._handleContainerMousedownAndTouchstartBound),this.container.addEventListener("mouseup",this._handleContainerMouseupAndTouchendBound),void 0!==window.ontouchstart&&(this.container.addEventListener("touchstart",this._handleContainerMousedownAndTouchstartBound),this.container.addEventListener("touchend",this._handleContainerMouseupAndTouchendBound))}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("blur",this._handleInputBlurBound),this.el.removeEventListener("keyup",this._handleInputKeyupAndFocusBound),this.el.removeEventListener("focus",this._handleInputKeyupAndFocusBound),this.el.removeEventListener("keydown",this._handleInputKeydownBound),this.el.removeEventListener("click",this._handleInputClickBound),this.container.removeEventListener("mousedown",this._handleContainerMousedownAndTouchstartBound),this.container.removeEventListener("mouseup",this._handleContainerMouseupAndTouchendBound),void 0!==window.ontouchstart&&(this.container.removeEventListener("touchstart",this._handleContainerMousedownAndTouchstartBound),this.container.removeEventListener("touchend",this._handleContainerMouseupAndTouchendBound))}},{key:"_setupDropdown",value:function(){var t=this;this.container=document.createElement("ul"),this.container.id="autocomplete-options-"+M.guid(),e(this.container).addClass("autocomplete-content dropdown-content"),this.$inputField.append(this.container),this.el.setAttribute("data-target",this.container.id),this.dropdown=M.Dropdown.init(this.el,{autoFocus:!1,closeOnClick:!1,coverTrigger:!1,onItemClick:function(i){t.selectOption(e(i))}}),this.el.removeEventListener("click",this.dropdown._handleClickBound)}},{key:"_removeDropdown",value:function(){this.container.parentNode.removeChild(this.container)}},{key:"_handleInputBlur",value:function(){this._mousedown||(this.close(),this._resetAutocomplete())}},{key:"_handleInputKeyupAndFocus",value:function(e){"keyup"===e.type&&(n._keydown=!1),this.count=0;var t=this.el.value.toLowerCase();13!==e.keyCode&&38!==e.keyCode&&40!==e.keyCode&&(this.oldVal===t||!M.tabPressed&&"focus"===e.type||this.open(),this.oldVal=t)}},{key:"_handleInputKeydown",value:function(t){n._keydown=!0;var i=t.keyCode,s=void 0,a=e(this.container).children("li").length;i===M.keys.ENTER&&this.activeIndex>=0?(s=e(this.container).children("li").eq(this.activeIndex)).length&&(this.selectOption(s),t.preventDefault()):i!==M.keys.ARROW_UP&&i!==M.keys.ARROW_DOWN||(t.preventDefault(),i===M.keys.ARROW_UP&&this.activeIndex>0&&this.activeIndex--,i===M.keys.ARROW_DOWN&&this.activeIndex<a-1&&this.activeIndex++,this.$active.removeClass("active"),this.activeIndex>=0&&(this.$active=e(this.container).children("li").eq(this.activeIndex),this.$active.addClass("active")))}},{key:"_handleInputClick",value:function(e){this.open()}},{key:"_handleContainerMousedownAndTouchstart",value:function(e){this._mousedown=!0}},{key:"_handleContainerMouseupAndTouchend",value:function(e){this._mousedown=!1}},{key:"_highlight",value:function(e,t){var i=t.find("img"),n=t.text().toLowerCase().indexOf(""+e.toLowerCase()),s=n+e.length-1,a=t.text().slice(0,n),o=t.text().slice(n,s+1),r=t.text().slice(s+1);t.html("<span>"+a+"<span class='highlight'>"+o+"</span>"+r+"</span>"),i.length&&t.prepend(i)}},{key:"_resetCurrentElement",value:function(){this.activeIndex=-1,this.$active.removeClass("active")}},{key:"_resetAutocomplete",value:function(){e(this.container).empty(),this._resetCurrentElement(),this.oldVal=null,this.isOpen=!1,this._mousedown=!1}},{key:"selectOption",value:function(e){var t=e.text().trim();this.el.value=t,this.$el.trigger("change"),this._resetAutocomplete(),this.close(),"function"==typeof this.options.onAutocomplete&&this.options.onAutocomplete.call(this,t)}},{key:"_renderDropdown",value:function(t,i){var n=this;this._resetAutocomplete();var s=[];for(var a in t)if(t.hasOwnProperty(a)&&-1!==a.toLowerCase().indexOf(i)){if(this.count>=this.options.limit)break;var o={data:t[a],key:a};s.push(o),this.count++}if(this.options.sortFunction){s.sort((function(e,t){return n.options.sortFunction(e.key.toLowerCase(),t.key.toLowerCase(),i.toLowerCase())}))}for(var r=0;r<s.length;r++){var l=s[r],u=e("<li></li>");l.data?u.append('<img src="'+l.data+'" class="right circle"><span>'+l.key+"</span>"):u.append("<span>"+l.key+"</span>"),e(this.container).append(u),this._highlight(i,u)}}},{key:"open",value:function(){var e=this.el.value.toLowerCase();this._resetAutocomplete(),e.length>=this.options.minLength&&(this.isOpen=!0,this._renderDropdown(this.options.data,e)),this.dropdown.isOpen?this.dropdown.recalculateDimensions():this.dropdown.open()}},{key:"close",value:function(){this.dropdown.close()}},{key:"updateData",value:function(e){var t=this.el.value.toLowerCase();this.options.data=e,this.isOpen&&this._renderDropdown(e,t)}}],[{key:"init",value:function(e,t){return s(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Autocomplete}},{key:"defaults",get:function(){return t}}]),n}(u);i._keydown=!1,M.Autocomplete=i,M.jQueryLoaded&&M.initializeJqueryWrapper(i,"autocomplete","M_Autocomplete")}(cash),function(e){M.updateTextFields=function(){e("input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=search], input[type=date], input[type=time], textarea").each((function(t,i){var n=e(this);t.value.length>0||e(t).is(":focus")||t.autofocus||null!==n.attr("placeholder")?n.siblings("label").addClass("active"):t.validity?n.siblings("label").toggleClass("active",!0===t.validity.badInput):n.siblings("label").removeClass("active")}))},M.validate_field=function(e){var t=null!==e.attr("data-length"),i=parseInt(e.attr("data-length")),n=e[0].value.length;0!==n||!1!==e[0].validity.badInput||e.is(":required")?e.hasClass("validate")&&(e.is(":valid")&&t&&n<=i||e.is(":valid")&&!t?(e.removeClass("invalid"),e.addClass("valid")):(e.removeClass("valid"),e.addClass("invalid"))):e.hasClass("validate")&&(e.removeClass("valid"),e.removeClass("invalid"))},M.textareaAutoResize=function(t){if(t instanceof Element&&(t=e(t)),t.length){var i=e(".hiddendiv").first();i.length||(i=e('<div class="hiddendiv common"></div>'),e("body").append(i));var n=t.css("font-family"),s=t.css("font-size"),a=t.css("line-height"),o=t.css("padding-top"),r=t.css("padding-right"),l=t.css("padding-bottom"),u=t.css("padding-left");s&&i.css("font-size",s),n&&i.css("font-family",n),a&&i.css("line-height",a),o&&i.css("padding-top",o),r&&i.css("padding-right",r),l&&i.css("padding-bottom",l),u&&i.css("padding-left",u),t.data("original-height")||t.data("original-height",t.height()),"off"===t.attr("wrap")&&i.css("overflow-wrap","normal").css("white-space","pre"),i.text(t[0].value+"\n");var d=i.html().replace(/\n/g,"<br>");i.html(d),t[0].offsetWidth>0&&t[0].offsetHeight>0?i.css("width",t.width()+"px"):i.css("width",window.innerWidth/2+"px"),t.data("original-height")<=i.innerHeight()?t.css("height",i.innerHeight()+"px"):t[0].value.length<t.data("previous-length")&&t.css("height",t.data("original-height")+"px"),t.data("previous-length",t[0].value.length)}else console.error("No textarea element found")},e(document).ready((function(){var t="input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=search], input[type=date], input[type=time], textarea";e(document).on("change",t,(function(){0===this.value.length&&null===e(this).attr("placeholder")||e(this).siblings("label").addClass("active"),M.validate_field(e(this))})),e(document).ready((function(){M.updateTextFields()})),e(document).on("reset",(function(i){var n=e(i.target);n.is("form")&&(n.find(t).removeClass("valid").removeClass("invalid"),n.find(t).each((function(t){this.value.length&&e(this).siblings("label").removeClass("active")})),setTimeout((function(){n.find("select").each((function(){this.M_FormSelect&&e(this).trigger("change")}))}),0))})),document.addEventListener("focus",(function(i){e(i.target).is(t)&&e(i.target).siblings("label, .prefix").addClass("active")}),!0),document.addEventListener("blur",(function(i){var n=e(i.target);if(n.is(t)){var s=".prefix";0===n[0].value.length&&!0!==n[0].validity.badInput&&null===n.attr("placeholder")&&(s+=", label"),n.siblings(s).removeClass("active"),M.validate_field(n)}}),!0);e(document).on("keyup","input[type=radio], input[type=checkbox]",(function(t){if(t.which===M.keys.TAB)return e(this).addClass("tabbed"),void e(this).one("blur",(function(t){e(this).removeClass("tabbed")}))}));var i=".materialize-textarea";e(i).each((function(){var t=e(this);t.data("original-height",t.height()),t.data("previous-length",this.value.length),M.textareaAutoResize(t)})),e(document).on("keyup",i,(function(){M.textareaAutoResize(e(this))})),e(document).on("keydown",i,(function(){M.textareaAutoResize(e(this))})),e(document).on("change",'.file-field input[type="file"]',(function(){for(var t=e(this).closest(".file-field").find("input.file-path"),i=e(this)[0].files,n=[],s=0;s<i.length;s++)n.push(i[s].name);t[0].value=n.join(", "),t.trigger("change")}))}))}(cash),function(e,t){"use strict";var i={indicators:!0,height:400,duration:500,interval:6e3},n=function(n){function u(i,n){l(this,u);var s=o(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,u,i,n));return s.el.M_Slider=s,s.options=e.extend({},u.defaults,n),s.$slider=s.$el.find(".slides"),s.$slides=s.$slider.children("li"),s.activeIndex=s.$slides.filter((function(t){return e(t).hasClass("active")})).first().index(),-1!=s.activeIndex&&(s.$active=s.$slides.eq(s.activeIndex)),s._setSliderHeight(),s.$slides.find(".caption").each((function(e){s._animateCaptionIn(e,0)})),s.$slides.find("img").each((function(t){var i="data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";e(t).attr("src")!==i&&(e(t).css("background-image",'url("'+e(t).attr("src")+'")'),e(t).attr("src",i))})),s._setupIndicators(),s.$active?s.$active.css("display","block"):(s.$slides.first().addClass("active"),t({targets:s.$slides.first()[0],opacity:1,duration:s.options.duration,easing:"easeOutQuad"}),s.activeIndex=0,s.$active=s.$slides.eq(s.activeIndex),s.options.indicators&&s.$indicators.eq(s.activeIndex).addClass("active")),s.$active.find("img").each((function(e){t({targets:s.$active.find(".caption")[0],opacity:1,translateX:0,translateY:0,duration:s.options.duration,easing:"easeOutQuad"})})),s._setupEventHandlers(),s.start(),s}return r(u,n),a(u,[{key:"destroy",value:function(){this.pause(),this._removeIndicators(),this._removeEventHandlers(),this.el.M_Slider=void 0}},{key:"_setupEventHandlers",value:function(){var e=this;this._handleIntervalBound=this._handleInterval.bind(this),this._handleIndicatorClickBound=this._handleIndicatorClick.bind(this),this.options.indicators&&this.$indicators.each((function(t){t.addEventListener("click",e._handleIndicatorClickBound)}))}},{key:"_removeEventHandlers",value:function(){var e=this;this.options.indicators&&this.$indicators.each((function(t){t.removeEventListener("click",e._handleIndicatorClickBound)}))}},{key:"_handleIndicatorClick",value:function(t){var i=e(t.target).index();this.set(i)}},{key:"_handleInterval",value:function(){var e=this.$slider.find(".active").index();this.$slides.length===e+1?e=0:e+=1,this.set(e)}},{key:"_animateCaptionIn",value:function(i,n){var s={targets:i,opacity:0,duration:n,easing:"easeOutQuad"};e(i).hasClass("center-align")?s.translateY=-100:e(i).hasClass("right-align")?s.translateX=100:e(i).hasClass("left-align")&&(s.translateX=-100),t(s)}},{key:"_setSliderHeight",value:function(){this.$el.hasClass("fullscreen")||(this.options.indicators?this.$el.css("height",this.options.height+40+"px"):this.$el.css("height",this.options.height+"px"),this.$slider.css("height",this.options.height+"px"))}},{key:"_setupIndicators",value:function(){var t=this;this.options.indicators&&(this.$indicators=e('<ul class="indicators"></ul>'),this.$slides.each((function(i,n){var s=e('<li class="indicator-item"></li>');t.$indicators.append(s[0])})),this.$el.append(this.$indicators[0]),this.$indicators=this.$indicators.children("li.indicator-item"))}},{key:"_removeIndicators",value:function(){this.$el.find("ul.indicators").remove()}},{key:"set",value:function(e){var i=this;if(e>=this.$slides.length?e=0:e<0&&(e=this.$slides.length-1),this.activeIndex!=e){this.$active=this.$slides.eq(this.activeIndex);var n=this.$active.find(".caption");this.$active.removeClass("active"),t({targets:this.$active[0],opacity:0,duration:this.options.duration,easing:"easeOutQuad",complete:function(){i.$slides.not(".active").each((function(e){t({targets:e,opacity:0,translateX:0,translateY:0,duration:0,easing:"easeOutQuad"})}))}}),this._animateCaptionIn(n[0],this.options.duration),this.options.indicators&&(this.$indicators.eq(this.activeIndex).removeClass("active"),this.$indicators.eq(e).addClass("active")),t({targets:this.$slides.eq(e)[0],opacity:1,duration:this.options.duration,easing:"easeOutQuad"}),t({targets:this.$slides.eq(e).find(".caption")[0],opacity:1,translateX:0,translateY:0,duration:this.options.duration,delay:this.options.duration,easing:"easeOutQuad"}),this.$slides.eq(e).addClass("active"),this.activeIndex=e,this.start()}}},{key:"pause",value:function(){clearInterval(this.interval)}},{key:"start",value:function(){clearInterval(this.interval),this.interval=setInterval(this._handleIntervalBound,this.options.duration+this.options.interval)}},{key:"next",value:function(){var e=this.activeIndex+1;e>=this.$slides.length?e=0:e<0&&(e=this.$slides.length-1),this.set(e)}},{key:"prev",value:function(){var e=this.activeIndex-1;e>=this.$slides.length?e=0:e<0&&(e=this.$slides.length-1),this.set(e)}}],[{key:"init",value:function(e,t){return s(u.__proto__||Object.getPrototypeOf(u),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Slider}},{key:"defaults",get:function(){return i}}]),u}(u);M.Slider=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"slider","M_Slider")}(cash,M.anime),function(e,t){e(document).on("click",".card",(function(i){if(e(this).children(".card-reveal").length){var n=e(i.target).closest(".card");void 0===n.data("initialOverflow")&&n.data("initialOverflow",void 0===n.css("overflow")?"":n.css("overflow"));var s=e(this).find(".card-reveal");e(i.target).is(e(".card-reveal .card-title"))||e(i.target).is(e(".card-reveal .card-title i"))?t({targets:s[0],translateY:0,duration:225,easing:"easeInOutQuad",complete:function(t){var i=t.animatables[0].target;e(i).css({display:"none"}),n.css("overflow",n.data("initialOverflow"))}}):(e(i.target).is(e(".card .activator"))||e(i.target).is(e(".card .activator i")))&&(n.css("overflow","hidden"),s.css({display:"block"}),t({targets:s[0],translateY:"-100%",duration:300,easing:"easeInOutQuad"}))}}))}(cash,M.anime),function(e){"use strict";var t={data:[],placeholder:"",secondaryPlaceholder:"",autocompleteOptions:{},limit:1/0,onChipAdd:null,onChipSelect:null,onChipDelete:null},i=function(i){function n(t,i){l(this,n);var s=o(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,i));return s.el.M_Chips=s,s.options=e.extend({},n.defaults,i),s.$el.addClass("chips input-field"),s.chipsData=[],s.$chips=e(),s._setupInput(),s.hasAutocomplete=Object.keys(s.options.autocompleteOptions).length>0,s.$input.attr("id")||s.$input.attr("id",M.guid()),s.options.data.length&&(s.chipsData=s.options.data,s._renderChips(s.chipsData)),s.hasAutocomplete&&s._setupAutocomplete(),s._setPlaceholder(),s._setupLabel(),s._setupEventHandlers(),s}return r(n,i),a(n,[{key:"getData",value:function(){return this.chipsData}},{key:"destroy",value:function(){this._removeEventHandlers(),this.$chips.remove(),this.el.M_Chips=void 0}},{key:"_setupEventHandlers",value:function(){this._handleChipClickBound=this._handleChipClick.bind(this),this._handleInputKeydownBound=this._handleInputKeydown.bind(this),this._handleInputFocusBound=this._handleInputFocus.bind(this),this._handleInputBlurBound=this._handleInputBlur.bind(this),this.el.addEventListener("click",this._handleChipClickBound),document.addEventListener("keydown",n._handleChipsKeydown),document.addEventListener("keyup",n._handleChipsKeyup),this.el.addEventListener("blur",n._handleChipsBlur,!0),this.$input[0].addEventListener("focus",this._handleInputFocusBound),this.$input[0].addEventListener("blur",this._handleInputBlurBound),this.$input[0].addEventListener("keydown",this._handleInputKeydownBound)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleChipClickBound),document.removeEventListener("keydown",n._handleChipsKeydown),document.removeEventListener("keyup",n._handleChipsKeyup),this.el.removeEventListener("blur",n._handleChipsBlur,!0),this.$input[0].removeEventListener("focus",this._handleInputFocusBound),this.$input[0].removeEventListener("blur",this._handleInputBlurBound),this.$input[0].removeEventListener("keydown",this._handleInputKeydownBound)}},{key:"_handleChipClick",value:function(t){var i=e(t.target).closest(".chip"),n=e(t.target).is(".close");if(i.length){var s=i.index();n?(this.deleteChip(s),this.$input[0].focus()):this.selectChip(s)}else this.$input[0].focus()}},{key:"_handleInputFocus",value:function(){this.$el.addClass("focus")}},{key:"_handleInputBlur",value:function(){this.$el.removeClass("focus")}},{key:"_handleInputKeydown",value:function(e){if(n._keydown=!0,13===e.keyCode){if(this.hasAutocomplete&&this.autocomplete&&this.autocomplete.isOpen)return;e.preventDefault(),this.addChip({tag:this.$input[0].value}),this.$input[0].value=""}else 8!==e.keyCode&&37!==e.keyCode||""!==this.$input[0].value||!this.chipsData.length||(e.preventDefault(),this.selectChip(this.chipsData.length-1))}},{key:"_renderChip",value:function(t){if(t.tag){var i=document.createElement("div"),n=document.createElement("i");if(i.classList.add("chip"),i.textContent=t.tag,i.setAttribute("tabindex",0),e(n).addClass("material-icons close"),n.textContent="close",t.image){var s=document.createElement("img");s.setAttribute("src",t.image),i.insertBefore(s,i.firstChild)}return i.appendChild(n),i}}},{key:"_renderChips",value:function(){this.$chips.remove();for(var e=0;e<this.chipsData.length;e++){var t=this._renderChip(this.chipsData[e]);this.$el.append(t),this.$chips.add(t)}this.$el.append(this.$input[0])}},{key:"_setupAutocomplete",value:function(){var e=this;this.options.autocompleteOptions.onAutocomplete=function(t){e.addChip({tag:t}),e.$input[0].value="",e.$input[0].focus()},this.autocomplete=M.Autocomplete.init(this.$input[0],this.options.autocompleteOptions)}},{key:"_setupInput",value:function(){this.$input=this.$el.find("input"),this.$input.length||(this.$input=e("<input></input>"),this.$el.append(this.$input)),this.$input.addClass("input")}},{key:"_setupLabel",value:function(){this.$label=this.$el.find("label"),this.$label.length&&this.$label.setAttribute("for",this.$input.attr("id"))}},{key:"_setPlaceholder",value:function(){void 0!==this.chipsData&&!this.chipsData.length&&this.options.placeholder?e(this.$input).prop("placeholder",this.options.placeholder):(void 0===this.chipsData||this.chipsData.length)&&this.options.secondaryPlaceholder&&e(this.$input).prop("placeholder",this.options.secondaryPlaceholder)}},{key:"_isValid",value:function(e){if(e.hasOwnProperty("tag")&&""!==e.tag){for(var t=!1,i=0;i<this.chipsData.length;i++)if(this.chipsData[i].tag===e.tag){t=!0;break}return!t}return!1}},{key:"addChip",value:function(t){if(this._isValid(t)&&!(this.chipsData.length>=this.options.limit)){var i=this._renderChip(t);this.$chips.add(i),this.chipsData.push(t),e(this.$input).before(i),this._setPlaceholder(),"function"==typeof this.options.onChipAdd&&this.options.onChipAdd.call(this,this.$el,i)}}},{key:"deleteChip",value:function(t){var i=this.$chips.eq(t);this.$chips.eq(t).remove(),this.$chips=this.$chips.filter((function(t){return e(t).index()>=0})),this.chipsData.splice(t,1),this._setPlaceholder(),"function"==typeof this.options.onChipDelete&&this.options.onChipDelete.call(this,this.$el,i[0])}},{key:"selectChip",value:function(e){var t=this.$chips.eq(e);this._selectedChip=t,t[0].focus(),"function"==typeof this.options.onChipSelect&&this.options.onChipSelect.call(this,this.$el,t[0])}}],[{key:"init",value:function(e,t){return s(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Chips}},{key:"_handleChipsKeydown",value:function(t){n._keydown=!0;var i=e(t.target).closest(".chips"),s=t.target&&i.length;if(!e(t.target).is("input, textarea")&&s){var a=i[0].M_Chips;if(8===t.keyCode||46===t.keyCode){t.preventDefault();var o=a.chipsData.length;if(a._selectedChip){var r=a._selectedChip.index();a.deleteChip(r),a._selectedChip=null,o=Math.max(r-1,0)}a.chipsData.length&&a.selectChip(o)}else if(37===t.keyCode){if(a._selectedChip){var l=a._selectedChip.index()-1;if(l<0)return;a.selectChip(l)}}else if(39===t.keyCode&&a._selectedChip){var u=a._selectedChip.index()+1;u>=a.chipsData.length?a.$input[0].focus():a.selectChip(u)}}}},{key:"_handleChipsKeyup",value:function(e){n._keydown=!1}},{key:"_handleChipsBlur",value:function(t){n._keydown||(e(t.target).closest(".chips")[0].M_Chips._selectedChip=null)}},{key:"defaults",get:function(){return t}}]),n}(u);i._keydown=!1,M.Chips=i,M.jQueryLoaded&&M.initializeJqueryWrapper(i,"chips","M_Chips"),e(document).ready((function(){e(document.body).on("click",".chip .close",(function(){var t=e(this).closest(".chips");t.length&&t[0].M_Chips||e(this).closest(".chip").remove()}))}))}(cash),function(e){"use strict";var t={top:0,bottom:1/0,offset:0,onPositionChange:null},i=function(i){function n(t,i){l(this,n);var s=o(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,i));return s.el.M_Pushpin=s,s.options=e.extend({},n.defaults,i),s.originalOffset=s.el.offsetTop,n._pushpins.push(s),s._setupEventHandlers(),s._updatePosition(),s}return r(n,i),a(n,[{key:"destroy",value:function(){this.el.style.top=null,this._removePinClasses(),this._removeEventHandlers();var e=n._pushpins.indexOf(this);n._pushpins.splice(e,1)}},{key:"_setupEventHandlers",value:function(){document.addEventListener("scroll",n._updateElements)}},{key:"_removeEventHandlers",value:function(){document.removeEventListener("scroll",n._updateElements)}},{key:"_updatePosition",value:function(){var e=M.getDocumentScrollTop()+this.options.offset;this.options.top<=e&&this.options.bottom>=e&&!this.el.classList.contains("pinned")&&(this._removePinClasses(),this.el.style.top=this.options.offset+"px",this.el.classList.add("pinned"),"function"==typeof this.options.onPositionChange&&this.options.onPositionChange.call(this,"pinned")),e<this.options.top&&!this.el.classList.contains("pin-top")&&(this._removePinClasses(),this.el.style.top=0,this.el.classList.add("pin-top"),"function"==typeof this.options.onPositionChange&&this.options.onPositionChange.call(this,"pin-top")),e>this.options.bottom&&!this.el.classList.contains("pin-bottom")&&(this._removePinClasses(),this.el.classList.add("pin-bottom"),this.el.style.top=this.options.bottom-this.originalOffset+"px","function"==typeof this.options.onPositionChange&&this.options.onPositionChange.call(this,"pin-bottom"))}},{key:"_removePinClasses",value:function(){this.el.classList.remove("pin-top"),this.el.classList.remove("pinned"),this.el.classList.remove("pin-bottom")}}],[{key:"init",value:function(e,t){return s(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Pushpin}},{key:"_updateElements",value:function(){for(var e in n._pushpins){n._pushpins[e]._updatePosition()}}},{key:"defaults",get:function(){return t}}]),n}(u);i._pushpins=[],M.Pushpin=i,M.jQueryLoaded&&M.initializeJqueryWrapper(i,"pushpin","M_Pushpin")}(cash),function(e,t){"use strict";var i={direction:"top",hoverEnabled:!0,toolbarEnabled:!1};e.fn.reverse=[].reverse;var n=function(n){function u(t,i){l(this,u);var n=o(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,u,t,i));return n.el.M_FloatingActionButton=n,n.options=e.extend({},u.defaults,i),n.isOpen=!1,n.$anchor=n.$el.children("a").first(),n.$menu=n.$el.children("ul").first(),n.$floatingBtns=n.$el.find("ul .btn-floating"),n.$floatingBtnsReverse=n.$el.find("ul .btn-floating").reverse(),n.offsetY=0,n.offsetX=0,n.$el.addClass("direction-"+n.options.direction),"top"===n.options.direction?n.offsetY=40:"right"===n.options.direction?n.offsetX=-40:"bottom"===n.options.direction?n.offsetY=-40:n.offsetX=40,n._setupEventHandlers(),n}return r(u,n),a(u,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.M_FloatingActionButton=void 0}},{key:"_setupEventHandlers",value:function(){this._handleFABClickBound=this._handleFABClick.bind(this),this._handleOpenBound=this.open.bind(this),this._handleCloseBound=this.close.bind(this),this.options.hoverEnabled&&!this.options.toolbarEnabled?(this.el.addEventListener("mouseenter",this._handleOpenBound),this.el.addEventListener("mouseleave",this._handleCloseBound)):this.el.addEventListener("click",this._handleFABClickBound)}},{key:"_removeEventHandlers",value:function(){this.options.hoverEnabled&&!this.options.toolbarEnabled?(this.el.removeEventListener("mouseenter",this._handleOpenBound),this.el.removeEventListener("mouseleave",this._handleCloseBound)):this.el.removeEventListener("click",this._handleFABClickBound)}},{key:"_handleFABClick",value:function(){this.isOpen?this.close():this.open()}},{key:"_handleDocumentClick",value:function(t){e(t.target).closest(this.$menu).length||this.close()}},{key:"open",value:function(){this.isOpen||(this.options.toolbarEnabled?this._animateInToolbar():this._animateInFAB(),this.isOpen=!0)}},{key:"close",value:function(){this.isOpen&&(this.options.toolbarEnabled?(window.removeEventListener("scroll",this._handleCloseBound,!0),document.body.removeEventListener("click",this._handleDocumentClickBound,!0),this._animateOutToolbar()):this._animateOutFAB(),this.isOpen=!1)}},{key:"_animateInFAB",value:function(){var e=this;this.$el.addClass("active");var i=0;this.$floatingBtnsReverse.each((function(n){t({targets:n,opacity:1,scale:[.4,1],translateY:[e.offsetY,0],translateX:[e.offsetX,0],duration:275,delay:i,easing:"easeInOutQuad"}),i+=40}))}},{key:"_animateOutFAB",value:function(){var e=this;this.$floatingBtnsReverse.each((function(i){t.remove(i),t({targets:i,opacity:0,scale:.4,translateY:e.offsetY,translateX:e.offsetX,duration:175,easing:"easeOutQuad",complete:function(){e.$el.removeClass("active")}})}))}},{key:"_animateInToolbar",value:function(){var t,i=this,n=window.innerWidth,s=window.innerHeight,a=this.el.getBoundingClientRect(),o=e('<div class="fab-backdrop"></div>'),r=this.$anchor.css("background-color");this.$anchor.append(o),this.offsetX=a.left-n/2+a.width/2,this.offsetY=s-a.bottom,t=n/o[0].clientWidth,this.btnBottom=a.bottom,this.btnLeft=a.left,this.btnWidth=a.width,this.$el.addClass("active"),this.$el.css({"text-align":"center",width:"100%",bottom:0,left:0,transform:"translateX("+this.offsetX+"px)",transition:"none"}),this.$anchor.css({transform:"translateY("+-this.offsetY+"px)",transition:"none"}),o.css({"background-color":r}),setTimeout((function(){i.$el.css({transform:"",transition:"transform .2s cubic-bezier(0.550, 0.085, 0.680, 0.530), background-color 0s linear .2s"}),i.$anchor.css({overflow:"visible",transform:"",transition:"transform .2s"}),setTimeout((function(){i.$el.css({overflow:"hidden","background-color":r}),o.css({transform:"scale("+t+")",transition:"transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)"}),i.$menu.children("li").children("a").css({opacity:1}),i._handleDocumentClickBound=i._handleDocumentClick.bind(i),window.addEventListener("scroll",i._handleCloseBound,!0),document.body.addEventListener("click",i._handleDocumentClickBound,!0)}),100)}),0)}},{key:"_animateOutToolbar",value:function(){var e=this,t=window.innerWidth,i=window.innerHeight,n=this.$el.find(".fab-backdrop"),s=this.$anchor.css("background-color");this.offsetX=this.btnLeft-t/2+this.btnWidth/2,this.offsetY=i-this.btnBottom,this.$el.removeClass("active"),this.$el.css({"background-color":"transparent",transition:"none"}),this.$anchor.css({transition:"none"}),n.css({transform:"scale(0)","background-color":s}),this.$menu.children("li").children("a").css({opacity:""}),setTimeout((function(){n.remove(),e.$el.css({"text-align":"",width:"",bottom:"",left:"",overflow:"","background-color":"",transform:"translate3d("+-e.offsetX+"px,0,0)"}),e.$anchor.css({overflow:"",transform:"translate3d(0,"+e.offsetY+"px,0)"}),setTimeout((function(){e.$el.css({transform:"translate3d(0,0,0)",transition:"transform .2s"}),e.$anchor.css({transform:"translate3d(0,0,0)",transition:"transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)"})}),20)}),200)}}],[{key:"init",value:function(e,t){return s(u.__proto__||Object.getPrototypeOf(u),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_FloatingActionButton}},{key:"defaults",get:function(){return i}}]),u}(u);M.FloatingActionButton=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"floatingActionButton","M_FloatingActionButton")}(cash,M.anime),function(e){"use strict";var t={autoClose:!1,format:"mmm dd, yyyy",parse:null,defaultDate:null,setDefaultDate:!1,disableWeekends:!1,disableDayFn:null,firstDay:0,minDate:null,maxDate:null,yearRange:10,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,container:null,showClearBtn:!1,i18n:{cancel:"Cancel",clear:"Clear",done:"Ok",previousMonth:"‹",nextMonth:"›",months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekdaysAbbrev:["S","M","T","W","T","F","S"]},events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null},i=function(i){function n(t,i){l(this,n);var s=o(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,i));s.el.M_Datepicker=s,s.options=e.extend({},n.defaults,i),i&&i.hasOwnProperty("i18n")&&"object"==typeof i.i18n&&(s.options.i18n=e.extend({},n.defaults.i18n,i.i18n)),s.options.minDate&&s.options.minDate.setHours(0,0,0,0),s.options.maxDate&&s.options.maxDate.setHours(0,0,0,0),s.id=M.guid(),s._setupVariables(),s._insertHTMLIntoDOM(),s._setupModal(),s._setupEventHandlers(),s.options.defaultDate||(s.options.defaultDate=new Date(Date.parse(s.el.value)));var a=s.options.defaultDate;return n._isDate(a)?s.options.setDefaultDate?(s.setDate(a,!0),s.setInputValue()):s.gotoDate(a):s.gotoDate(new Date),s.isOpen=!1,s}return r(n,i),a(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this.modal.destroy(),e(this.modalEl).remove(),this.destroySelects(),this.el.M_Datepicker=void 0}},{key:"destroySelects",value:function(){var e=this.calendarEl.querySelector(".orig-select-year");e&&M.FormSelect.getInstance(e).destroy();var t=this.calendarEl.querySelector(".orig-select-month");t&&M.FormSelect.getInstance(t).destroy()}},{key:"_insertHTMLIntoDOM",value:function(){this.options.showClearBtn&&(e(this.clearBtn).css({visibility:""}),this.clearBtn.innerHTML=this.options.i18n.clear),this.doneBtn.innerHTML=this.options.i18n.done,this.cancelBtn.innerHTML=this.options.i18n.cancel,this.options.container?this.$modalEl.appendTo(this.options.container):this.$modalEl.insertBefore(this.el)}},{key:"_setupModal",value:function(){var e=this;this.modalEl.id="modal-"+this.id,this.modal=M.Modal.init(this.modalEl,{onCloseEnd:function(){e.isOpen=!1}})}},{key:"toString",value:function(e){var t=this;return e=e||this.options.format,n._isDate(this.date)?e.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g).map((function(e){return t.formats[e]?t.formats[e]():e})).join(""):""}},{key:"setDate",value:function(e,t){if(!e)return this.date=null,this._renderDateDisplay(),this.draw();if("string"==typeof e&&(e=new Date(Date.parse(e))),n._isDate(e)){var i=this.options.minDate,s=this.options.maxDate;n._isDate(i)&&e<i?e=i:n._isDate(s)&&e>s&&(e=s),this.date=new Date(e.getTime()),this._renderDateDisplay(),n._setToStartOfDay(this.date),this.gotoDate(this.date),t||"function"!=typeof this.options.onSelect||this.options.onSelect.call(this,this.date)}}},{key:"setInputValue",value:function(){this.el.value=this.toString(),this.$el.trigger("change",{firedBy:this})}},{key:"_renderDateDisplay",value:function(){var e=n._isDate(this.date)?this.date:new Date,t=this.options.i18n,i=t.weekdaysShort[e.getDay()],s=t.monthsShort[e.getMonth()],a=e.getDate();this.yearTextEl.innerHTML=e.getFullYear(),this.dateTextEl.innerHTML=i+", "+s+" "+a}},{key:"gotoDate",value:function(e){var t=!0;if(n._isDate(e)){if(this.calendars){var i=new Date(this.calendars[0].year,this.calendars[0].month,1),s=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),a=e.getTime();s.setMonth(s.getMonth()+1),s.setDate(s.getDate()-1),t=a<i.getTime()||s.getTime()<a}t&&(this.calendars=[{month:e.getMonth(),year:e.getFullYear()}]),this.adjustCalendars()}}},{key:"adjustCalendars",value:function(){this.calendars[0]=this.adjustCalendar(this.calendars[0]),this.draw()}},{key:"adjustCalendar",value:function(e){return e.month<0&&(e.year-=Math.ceil(Math.abs(e.month)/12),e.month+=12),e.month>11&&(e.year+=Math.floor(Math.abs(e.month)/12),e.month-=12),e}},{key:"nextMonth",value:function(){this.calendars[0].month++,this.adjustCalendars()}},{key:"prevMonth",value:function(){this.calendars[0].month--,this.adjustCalendars()}},{key:"render",value:function(e,t,i){var s=this.options,a=new Date,o=n._getDaysInMonth(e,t),r=new Date(e,t,1).getDay(),l=[],u=[];n._setToStartOfDay(a),s.firstDay>0&&(r-=s.firstDay)<0&&(r+=7);for(var d=0===t?11:t-1,c=11===t?0:t+1,h=0===t?e-1:e,p=11===t?e+1:e,v=n._getDaysInMonth(h,d),f=o+r,_=f;_>7;)_-=7;f+=7-_;for(var m=!1,y=0,g=0;y<f;y++){var b=new Date(e,t,y-r+1),k=!!n._isDate(this.date)&&n._compareDates(b,this.date),w=n._compareDates(b,a),C=-1!==s.events.indexOf(b.toDateString()),x=y<r||y>=o+r,E=y-r+1,M=t,T=e,j=s.startRange&&n._compareDates(s.startRange,b),O=s.endRange&&n._compareDates(s.endRange,b),L=s.startRange&&s.endRange&&s.startRange<b&&b<s.endRange;x&&(y<r?(E=v+E,M=d,T=h):(E-=o,M=c,T=p));var D={day:E,month:M,year:T,hasEvent:C,isSelected:k,isToday:w,isDisabled:s.minDate&&b<s.minDate||s.maxDate&&b>s.maxDate||s.disableWeekends&&n._isWeekend(b)||s.disableDayFn&&s.disableDayFn(b),isEmpty:x,isStartRange:j,isEndRange:O,isInRange:L,showDaysInNextAndPreviousMonths:s.showDaysInNextAndPreviousMonths};u.push(this.renderDay(D)),7==++g&&(l.push(this.renderRow(u,s.isRTL,m)),u=[],g=0,m=!1)}return this.renderTable(s,l,i)}},{key:"renderDay",value:function(e){var t=[],i="false";if(e.isEmpty){if(!e.showDaysInNextAndPreviousMonths)return'<td class="is-empty"></td>';t.push("is-outside-current-month"),t.push("is-selection-disabled")}return e.isDisabled&&t.push("is-disabled"),e.isToday&&t.push("is-today"),e.isSelected&&(t.push("is-selected"),i="true"),e.hasEvent&&t.push("has-event"),e.isInRange&&t.push("is-inrange"),e.isStartRange&&t.push("is-startrange"),e.isEndRange&&t.push("is-endrange"),'<td data-day="'+e.day+'" class="'+t.join(" ")+'" aria-selected="'+i+'"><button class="datepicker-day-button" type="button" data-year="'+e.year+'" data-month="'+e.month+'" data-day="'+e.day+'">'+e.day+"</button></td>"}},{key:"renderRow",value:function(e,t,i){return'<tr class="datepicker-row'+(i?" is-selected":"")+'">'+(t?e.reverse():e).join("")+"</tr>"}},{key:"renderTable",value:function(e,t,i){return'<div class="datepicker-table-wrapper"><table cellpadding="0" cellspacing="0" class="datepicker-table" role="grid" aria-labelledby="'+i+'">'+this.renderHead(e)+this.renderBody(t)+"</table></div>"}},{key:"renderHead",value:function(e){var t=void 0,i=[];for(t=0;t<7;t++)i.push('<th scope="col"><abbr title="'+this.renderDayName(e,t)+'">'+this.renderDayName(e,t,!0)+"</abbr></th>");return"<thead><tr>"+(e.isRTL?i.reverse():i).join("")+"</tr></thead>"}},{key:"renderBody",value:function(e){return"<tbody>"+e.join("")+"</tbody>"}},{key:"renderTitle",value:function(t,i,n,s,a,o){var r,l,u=void 0,d=void 0,c=void 0,h=this.options,p=n===h.minYear,v=n===h.maxYear,f='<div id="'+o+'" class="datepicker-controls" role="heading" aria-live="assertive">',_=!0,m=!0;for(c=[],u=0;u<12;u++)c.push('<option value="'+(n===a?u-i:12+u-i)+'"'+(u===s?' selected="selected"':"")+(p&&u<h.minMonth||v&&u>h.maxMonth?'disabled="disabled"':"")+">"+h.i18n.months[u]+"</option>");for(r='<select class="datepicker-select orig-select-month" tabindex="-1">'+c.join("")+"</select>",e.isArray(h.yearRange)?(u=h.yearRange[0],d=h.yearRange[1]+1):(u=n-h.yearRange,d=1+n+h.yearRange),c=[];u<d&&u<=h.maxYear;u++)u>=h.minYear&&c.push('<option value="'+u+'" '+(u===n?'selected="selected"':"")+">"+u+"</option>");l='<select class="datepicker-select orig-select-year" tabindex="-1">'+c.join("")+"</select>";f+='<button class="month-prev'+(_?"":" is-disabled")+'" type="button"><svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"/><path d="M0-.5h24v24H0z" fill="none"/></svg></button>',f+='<div class="selects-container">',h.showMonthAfterYear?f+=l+r:f+=r+l,f+="</div>",p&&(0===s||h.minMonth>=s)&&(_=!1),v&&(11===s||h.maxMonth<=s)&&(m=!1);return(f+='<button class="month-next'+(m?"":" is-disabled")+'" type="button"><svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"/><path d="M0-.25h24v24H0z" fill="none"/></svg></button>')+"</div>"}},{key:"draw",value:function(e){if(this.isOpen||e){var t,i=this.options,n=i.minYear,s=i.maxYear,a=i.minMonth,o=i.maxMonth,r="";this._y<=n&&(this._y=n,!isNaN(a)&&this._m<a&&(this._m=a)),this._y>=s&&(this._y=s,!isNaN(o)&&this._m>o&&(this._m=o)),t="datepicker-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2);for(var l=0;l<1;l++)this._renderDateDisplay(),r+=this.renderTitle(this,l,this.calendars[l].year,this.calendars[l].month,this.calendars[0].year,t)+this.render(this.calendars[l].year,this.calendars[l].month,t);this.destroySelects(),this.calendarEl.innerHTML=r;var u=this.calendarEl.querySelector(".orig-select-year"),d=this.calendarEl.querySelector(".orig-select-month");M.FormSelect.init(u,{classes:"select-year",dropdownOptions:{container:document.body,constrainWidth:!1}}),M.FormSelect.init(d,{classes:"select-month",dropdownOptions:{container:document.body,constrainWidth:!1}}),u.addEventListener("change",this._handleYearChange.bind(this)),d.addEventListener("change",this._handleMonthChange.bind(this)),"function"==typeof this.options.onDraw&&this.options.onDraw(this)}}},{key:"_setupEventHandlers",value:function(){this._handleInputKeydownBound=this._handleInputKeydown.bind(this),this._handleInputClickBound=this._handleInputClick.bind(this),this._handleInputChangeBound=this._handleInputChange.bind(this),this._handleCalendarClickBound=this._handleCalendarClick.bind(this),this._finishSelectionBound=this._finishSelection.bind(this),this._handleMonthChange=this._handleMonthChange.bind(this),this._closeBound=this.close.bind(this),this.el.addEventListener("click",this._handleInputClickBound),this.el.addEventListener("keydown",this._handleInputKeydownBound),this.el.addEventListener("change",this._handleInputChangeBound),this.calendarEl.addEventListener("click",this._handleCalendarClickBound),this.doneBtn.addEventListener("click",this._finishSelectionBound),this.cancelBtn.addEventListener("click",this._closeBound),this.options.showClearBtn&&(this._handleClearClickBound=this._handleClearClick.bind(this),this.clearBtn.addEventListener("click",this._handleClearClickBound))}},{key:"_setupVariables",value:function(){var t=this;this.$modalEl=e(n._template),this.modalEl=this.$modalEl[0],this.calendarEl=this.modalEl.querySelector(".datepicker-calendar"),this.yearTextEl=this.modalEl.querySelector(".year-text"),this.dateTextEl=this.modalEl.querySelector(".date-text"),this.options.showClearBtn&&(this.clearBtn=this.modalEl.querySelector(".datepicker-clear")),this.doneBtn=this.modalEl.querySelector(".datepicker-done"),this.cancelBtn=this.modalEl.querySelector(".datepicker-cancel"),this.formats={d:function(){return t.date.getDate()},dd:function(){var e=t.date.getDate();return(e<10?"0":"")+e},ddd:function(){return t.options.i18n.weekdaysShort[t.date.getDay()]},dddd:function(){return t.options.i18n.weekdays[t.date.getDay()]},m:function(){return t.date.getMonth()+1},mm:function(){var e=t.date.getMonth()+1;return(e<10?"0":"")+e},mmm:function(){return t.options.i18n.monthsShort[t.date.getMonth()]},mmmm:function(){return t.options.i18n.months[t.date.getMonth()]},yy:function(){return(""+t.date.getFullYear()).slice(2)},yyyy:function(){return t.date.getFullYear()}}}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleInputClickBound),this.el.removeEventListener("keydown",this._handleInputKeydownBound),this.el.removeEventListener("change",this._handleInputChangeBound),this.calendarEl.removeEventListener("click",this._handleCalendarClickBound)}},{key:"_handleInputClick",value:function(){this.open()}},{key:"_handleInputKeydown",value:function(e){e.which===M.keys.ENTER&&(e.preventDefault(),this.open())}},{key:"_handleCalendarClick",value:function(t){if(this.isOpen){var i=e(t.target);i.hasClass("is-disabled")||(!i.hasClass("datepicker-day-button")||i.hasClass("is-empty")||i.parent().hasClass("is-disabled")?i.closest(".month-prev").length?this.prevMonth():i.closest(".month-next").length&&this.nextMonth():(this.setDate(new Date(t.target.getAttribute("data-year"),t.target.getAttribute("data-month"),t.target.getAttribute("data-day"))),this.options.autoClose&&this._finishSelection()))}}},{key:"_handleClearClick",value:function(){this.date=null,this.setInputValue(),this.close()}},{key:"_handleMonthChange",value:function(e){this.gotoMonth(e.target.value)}},{key:"_handleYearChange",value:function(e){this.gotoYear(e.target.value)}},{key:"gotoMonth",value:function(e){isNaN(e)||(this.calendars[0].month=parseInt(e,10),this.adjustCalendars())}},{key:"gotoYear",value:function(e){isNaN(e)||(this.calendars[0].year=parseInt(e,10),this.adjustCalendars())}},{key:"_handleInputChange",value:function(e){var t=void 0;e.firedBy!==this&&(t=this.options.parse?this.options.parse(this.el.value,this.options.format):new Date(Date.parse(this.el.value)),n._isDate(t)&&this.setDate(t))}},{key:"renderDayName",value:function(e,t,i){for(t+=e.firstDay;t>=7;)t-=7;return i?e.i18n.weekdaysAbbrev[t]:e.i18n.weekdays[t]}},{key:"_finishSelection",value:function(){this.setInputValue(),this.close()}},{key:"open",value:function(){if(!this.isOpen)return this.isOpen=!0,"function"==typeof this.options.onOpen&&this.options.onOpen.call(this),this.draw(),this.modal.open(),this}},{key:"close",value:function(){if(this.isOpen)return this.isOpen=!1,"function"==typeof this.options.onClose&&this.options.onClose.call(this),this.modal.close(),this}}],[{key:"init",value:function(e,t){return s(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,e,t)}},{key:"_isDate",value:function(e){return/Date/.test(Object.prototype.toString.call(e))&&!isNaN(e.getTime())}},{key:"_isWeekend",value:function(e){var t=e.getDay();return 0===t||6===t}},{key:"_setToStartOfDay",value:function(e){n._isDate(e)&&e.setHours(0,0,0,0)}},{key:"_getDaysInMonth",value:function(e,t){return[31,n._isLeapYear(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]}},{key:"_isLeapYear",value:function(e){return e%4==0&&e%100!=0||e%400==0}},{key:"_compareDates",value:function(e,t){return e.getTime()===t.getTime()}},{key:"_setToStartOfDay",value:function(e){n._isDate(e)&&e.setHours(0,0,0,0)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Datepicker}},{key:"defaults",get:function(){return t}}]),n}(u);i._template=['<div class= "modal datepicker-modal">','<div class="modal-content datepicker-container">','<div class="datepicker-date-display">','<span class="year-text"></span>','<span class="date-text"></span>',"</div>",'<div class="datepicker-calendar-container">','<div class="datepicker-calendar"></div>','<div class="datepicker-footer">','<button class="btn-flat datepicker-clear waves-effect" style="visibility: hidden;" type="button"></button>','<div class="confirmation-btns">','<button class="btn-flat datepicker-cancel waves-effect" type="button"></button>','<button class="btn-flat datepicker-done waves-effect" type="button"></button>',"</div>","</div>","</div>","</div>","</div>"].join(""),M.Datepicker=i,M.jQueryLoaded&&M.initializeJqueryWrapper(i,"datepicker","M_Datepicker")}(cash),function(e){"use strict";var t={dialRadius:135,outerRadius:105,innerRadius:70,tickRadius:20,duration:350,container:null,defaultTime:"now",fromNow:0,showClearBtn:!1,i18n:{cancel:"Cancel",clear:"Clear",done:"Ok"},autoClose:!1,twelveHour:!0,vibrate:!0,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null,onSelect:null},i=function(i){function n(t,i){l(this,n);var s=o(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,i));return s.el.M_Timepicker=s,s.options=e.extend({},n.defaults,i),s.id=M.guid(),s._insertHTMLIntoDOM(),s._setupModal(),s._setupVariables(),s._setupEventHandlers(),s._clockSetup(),s._pickerSetup(),s}return r(n,i),a(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this.modal.destroy(),e(this.modalEl).remove(),this.el.M_Timepicker=void 0}},{key:"_setupEventHandlers",value:function(){this._handleInputKeydownBound=this._handleInputKeydown.bind(this),this._handleInputClickBound=this._handleInputClick.bind(this),this._handleClockClickStartBound=this._handleClockClickStart.bind(this),this._handleDocumentClickMoveBound=this._handleDocumentClickMove.bind(this),this._handleDocumentClickEndBound=this._handleDocumentClickEnd.bind(this),this.el.addEventListener("click",this._handleInputClickBound),this.el.addEventListener("keydown",this._handleInputKeydownBound),this.plate.addEventListener("mousedown",this._handleClockClickStartBound),this.plate.addEventListener("touchstart",this._handleClockClickStartBound),e(this.spanHours).on("click",this.showView.bind(this,"hours")),e(this.spanMinutes).on("click",this.showView.bind(this,"minutes"))}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleInputClickBound),this.el.removeEventListener("keydown",this._handleInputKeydownBound)}},{key:"_handleInputClick",value:function(){this.open()}},{key:"_handleInputKeydown",value:function(e){e.which===M.keys.ENTER&&(e.preventDefault(),this.open())}},{key:"_handleClockClickStart",value:function(e){e.preventDefault();var t=this.plate.getBoundingClientRect(),i=t.left,s=t.top;this.x0=i+this.options.dialRadius,this.y0=s+this.options.dialRadius,this.moved=!1;var a=n._Pos(e);this.dx=a.x-this.x0,this.dy=a.y-this.y0,this.setHand(this.dx,this.dy,!1),document.addEventListener("mousemove",this._handleDocumentClickMoveBound),document.addEventListener("touchmove",this._handleDocumentClickMoveBound),document.addEventListener("mouseup",this._handleDocumentClickEndBound),document.addEventListener("touchend",this._handleDocumentClickEndBound)}},{key:"_handleDocumentClickMove",value:function(e){e.preventDefault();var t=n._Pos(e),i=t.x-this.x0,s=t.y-this.y0;this.moved=!0,this.setHand(i,s,!1,!0)}},{key:"_handleDocumentClickEnd",value:function(t){var i=this;t.preventDefault(),document.removeEventListener("mouseup",this._handleDocumentClickEndBound),document.removeEventListener("touchend",this._handleDocumentClickEndBound);var s=n._Pos(t),a=s.x-this.x0,o=s.y-this.y0;this.moved&&a===this.dx&&o===this.dy&&this.setHand(a,o),"hours"===this.currentView?this.showView("minutes",this.options.duration/2):this.options.autoClose&&(e(this.minutesView).addClass("timepicker-dial-out"),setTimeout((function(){i.done()}),this.options.duration/2)),"function"==typeof this.options.onSelect&&this.options.onSelect.call(this,this.hours,this.minutes),document.removeEventListener("mousemove",this._handleDocumentClickMoveBound),document.removeEventListener("touchmove",this._handleDocumentClickMoveBound)}},{key:"_insertHTMLIntoDOM",value:function(){this.$modalEl=e(n._template),this.modalEl=this.$modalEl[0],this.modalEl.id="modal-"+this.id;var t=document.querySelector(this.options.container);this.options.container&&t?this.$modalEl.appendTo(t):this.$modalEl.insertBefore(this.el)}},{key:"_setupModal",value:function(){var e=this;this.modal=M.Modal.init(this.modalEl,{onOpenStart:this.options.onOpenStart,onOpenEnd:this.options.onOpenEnd,onCloseStart:this.options.onCloseStart,onCloseEnd:function(){"function"==typeof e.options.onCloseEnd&&e.options.onCloseEnd.call(e),e.isOpen=!1}})}},{key:"_setupVariables",value:function(){this.currentView="hours",this.vibrate=navigator.vibrate?"vibrate":navigator.webkitVibrate?"webkitVibrate":null,this._canvas=this.modalEl.querySelector(".timepicker-canvas"),this.plate=this.modalEl.querySelector(".timepicker-plate"),this.hoursView=this.modalEl.querySelector(".timepicker-hours"),this.minutesView=this.modalEl.querySelector(".timepicker-minutes"),this.spanHours=this.modalEl.querySelector(".timepicker-span-hours"),this.spanMinutes=this.modalEl.querySelector(".timepicker-span-minutes"),this.spanAmPm=this.modalEl.querySelector(".timepicker-span-am-pm"),this.footer=this.modalEl.querySelector(".timepicker-footer"),this.amOrPm="PM"}},{key:"_pickerSetup",value:function(){var t=e('<button class="btn-flat timepicker-clear waves-effect" style="visibility: hidden;" type="button" tabindex="'+(this.options.twelveHour?"3":"1")+'">'+this.options.i18n.clear+"</button>").appendTo(this.footer).on("click",this.clear.bind(this));this.options.showClearBtn&&t.css({visibility:""});var i=e('<div class="confirmation-btns"></div>');e('<button class="btn-flat timepicker-close waves-effect" type="button" tabindex="'+(this.options.twelveHour?"3":"1")+'">'+this.options.i18n.cancel+"</button>").appendTo(i).on("click",this.close.bind(this)),e('<button class="btn-flat timepicker-close waves-effect" type="button" tabindex="'+(this.options.twelveHour?"3":"1")+'">'+this.options.i18n.done+"</button>").appendTo(i).on("click",this.done.bind(this)),i.appendTo(this.footer)}},{key:"_clockSetup",value:function(){this.options.twelveHour&&(this.$amBtn=e('<div class="am-btn">AM</div>'),this.$pmBtn=e('<div class="pm-btn">PM</div>'),this.$amBtn.on("click",this._handleAmPmClick.bind(this)).appendTo(this.spanAmPm),this.$pmBtn.on("click",this._handleAmPmClick.bind(this)).appendTo(this.spanAmPm)),this._buildHoursView(),this._buildMinutesView(),this._buildSVGClock()}},{key:"_buildSVGClock",value:function(){var e=this.options.dialRadius,t=this.options.tickRadius,i=2*e,s=n._createSVGEl("svg");s.setAttribute("class","timepicker-svg"),s.setAttribute("width",i),s.setAttribute("height",i);var a=n._createSVGEl("g");a.setAttribute("transform","translate("+e+","+e+")");var o=n._createSVGEl("circle");o.setAttribute("class","timepicker-canvas-bearing"),o.setAttribute("cx",0),o.setAttribute("cy",0),o.setAttribute("r",4);var r=n._createSVGEl("line");r.setAttribute("x1",0),r.setAttribute("y1",0);var l=n._createSVGEl("circle");l.setAttribute("class","timepicker-canvas-bg"),l.setAttribute("r",t),a.appendChild(r),a.appendChild(l),a.appendChild(o),s.appendChild(a),this._canvas.appendChild(s),this.hand=r,this.bg=l,this.bearing=o,this.g=a}},{key:"_buildHoursView",value:function(){var t=e('<div class="timepicker-tick"></div>');if(this.options.twelveHour)for(var i=1;i<13;i+=1){var n=t.clone(),s=i/6*Math.PI,a=this.options.outerRadius;n.css({left:this.options.dialRadius+Math.sin(s)*a-this.options.tickRadius+"px",top:this.options.dialRadius-Math.cos(s)*a-this.options.tickRadius+"px"}),n.html(0===i?"00":i),this.hoursView.appendChild(n[0])}else for(var o=0;o<24;o+=1){var r=t.clone(),l=o/6*Math.PI,u=o>0&&o<13?this.options.innerRadius:this.options.outerRadius;r.css({left:this.options.dialRadius+Math.sin(l)*u-this.options.tickRadius+"px",top:this.options.dialRadius-Math.cos(l)*u-this.options.tickRadius+"px"}),r.html(0===o?"00":o),this.hoursView.appendChild(r[0])}}},{key:"_buildMinutesView",value:function(){for(var t=e('<div class="timepicker-tick"></div>'),i=0;i<60;i+=5){var s=t.clone(),a=i/30*Math.PI;s.css({left:this.options.dialRadius+Math.sin(a)*this.options.outerRadius-this.options.tickRadius+"px",top:this.options.dialRadius-Math.cos(a)*this.options.outerRadius-this.options.tickRadius+"px"}),s.html(n._addLeadingZero(i)),this.minutesView.appendChild(s[0])}}},{key:"_handleAmPmClick",value:function(t){var i=e(t.target);this.amOrPm=i.hasClass("am-btn")?"AM":"PM",this._updateAmPmView()}},{key:"_updateAmPmView",value:function(){this.options.twelveHour&&(this.$amBtn.toggleClass("text-primary","AM"===this.amOrPm),this.$pmBtn.toggleClass("text-primary","PM"===this.amOrPm))}},{key:"_updateTimeFromInput",value:function(){var e=((this.el.value||this.options.defaultTime||"")+"").split(":");if(this.options.twelveHour&&void 0!==e[1]&&(e[1].toUpperCase().indexOf("AM")>0?this.amOrPm="AM":this.amOrPm="PM",e[1]=e[1].replace("AM","").replace("PM","")),"now"===e[0]){var t=new Date(+new Date+this.options.fromNow);e=[t.getHours(),t.getMinutes()],this.options.twelveHour&&(this.amOrPm=e[0]>=12&&e[0]<24?"PM":"AM")}this.hours=+e[0]||0,this.minutes=+e[1]||0,this.spanHours.innerHTML=this.hours,this.spanMinutes.innerHTML=n._addLeadingZero(this.minutes),this._updateAmPmView()}},{key:"showView",value:function(t,i){"minutes"===t&&e(this.hoursView).css("visibility");var n="hours"===t,s=n?this.hoursView:this.minutesView,a=n?this.minutesView:this.hoursView;this.currentView=t,e(this.spanHours).toggleClass("text-primary",n),e(this.spanMinutes).toggleClass("text-primary",!n),a.classList.add("timepicker-dial-out"),e(s).css("visibility","visible").removeClass("timepicker-dial-out"),this.resetClock(i),clearTimeout(this.toggleViewTimer),this.toggleViewTimer=setTimeout((function(){e(a).css("visibility","hidden")}),this.options.duration)}},{key:"resetClock",value:function(t){var i=this.currentView,n=this[i],s="hours"===i,a=n*(Math.PI/(s?6:30)),o=s&&n>0&&n<13?this.options.innerRadius:this.options.outerRadius,r=Math.sin(a)*o,l=-Math.cos(a)*o,u=this;t?(e(this.canvas).addClass("timepicker-canvas-out"),setTimeout((function(){e(u.canvas).removeClass("timepicker-canvas-out"),u.setHand(r,l)}),t)):this.setHand(r,l)}},{key:"setHand",value:function(e,t,i){var s=this,a=Math.atan2(e,-t),o="hours"===this.currentView,r=Math.PI/(o||i?6:30),l=Math.sqrt(e*e+t*t),u=o&&l<(this.options.outerRadius+this.options.innerRadius)/2,d=u?this.options.innerRadius:this.options.outerRadius;this.options.twelveHour&&(d=this.options.outerRadius),a<0&&(a=2*Math.PI+a);var c=Math.round(a/r);a=c*r,this.options.twelveHour?o?0===c&&(c=12):(i&&(c*=5),60===c&&(c=0)):o?(12===c&&(c=0),c=u?0===c?12:c:0===c?0:c+12):(i&&(c*=5),60===c&&(c=0)),this[this.currentView]!==c&&this.vibrate&&this.options.vibrate&&(this.vibrateTimer||(navigator[this.vibrate](10),this.vibrateTimer=setTimeout((function(){s.vibrateTimer=null}),100))),this[this.currentView]=c,o?this.spanHours.innerHTML=c:this.spanMinutes.innerHTML=n._addLeadingZero(c);var h=Math.sin(a)*(d-this.options.tickRadius),p=-Math.cos(a)*(d-this.options.tickRadius),v=Math.sin(a)*d,f=-Math.cos(a)*d;this.hand.setAttribute("x2",h),this.hand.setAttribute("y2",p),this.bg.setAttribute("cx",v),this.bg.setAttribute("cy",f)}},{key:"open",value:function(){this.isOpen||(this.isOpen=!0,this._updateTimeFromInput(),this.showView("hours"),this.modal.open())}},{key:"close",value:function(){this.isOpen&&(this.isOpen=!1,this.modal.close())}},{key:"done",value:function(e,t){var i=this.el.value,s=t?"":n._addLeadingZero(this.hours)+":"+n._addLeadingZero(this.minutes);this.time=s,!t&&this.options.twelveHour&&(s=s+" "+this.amOrPm),this.el.value=s,s!==i&&this.$el.trigger("change"),this.close(),this.el.focus()}},{key:"clear",value:function(){this.done(null,!0)}}],[{key:"init",value:function(e,t){return s(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,e,t)}},{key:"_addLeadingZero",value:function(e){return(e<10?"0":"")+e}},{key:"_createSVGEl",value:function(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}},{key:"_Pos",value:function(e){return e.targetTouches&&e.targetTouches.length>=1?{x:e.targetTouches[0].clientX,y:e.targetTouches[0].clientY}:{x:e.clientX,y:e.clientY}}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Timepicker}},{key:"defaults",get:function(){return t}}]),n}(u);i._template=['<div class= "modal timepicker-modal">','<div class="modal-content timepicker-container">','<div class="timepicker-digital-display">','<div class="timepicker-text-container">','<div class="timepicker-display-column">','<span class="timepicker-span-hours text-primary"></span>',":",'<span class="timepicker-span-minutes"></span>',"</div>",'<div class="timepicker-display-column timepicker-display-am-pm">','<div class="timepicker-span-am-pm"></div>',"</div>","</div>","</div>",'<div class="timepicker-analog-display">','<div class="timepicker-plate">','<div class="timepicker-canvas"></div>','<div class="timepicker-dial timepicker-hours"></div>','<div class="timepicker-dial timepicker-minutes timepicker-dial-out"></div>',"</div>",'<div class="timepicker-footer"></div>',"</div>","</div>","</div>"].join(""),M.Timepicker=i,M.jQueryLoaded&&M.initializeJqueryWrapper(i,"timepicker","M_Timepicker")}(cash),function(e){"use strict";var t={},i=function(i){function n(t,i){l(this,n);var s=o(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,i));return s.el.M_CharacterCounter=s,s.options=e.extend({},n.defaults,i),s.isInvalid=!1,s.isValidLength=!1,s._setupCounter(),s._setupEventHandlers(),s}return r(n,i),a(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.CharacterCounter=void 0,this._removeCounter()}},{key:"_setupEventHandlers",value:function(){this._handleUpdateCounterBound=this.updateCounter.bind(this),this.el.addEventListener("focus",this._handleUpdateCounterBound,!0),this.el.addEventListener("input",this._handleUpdateCounterBound,!0)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("focus",this._handleUpdateCounterBound,!0),this.el.removeEventListener("input",this._handleUpdateCounterBound,!0)}},{key:"_setupCounter",value:function(){this.counterEl=document.createElement("span"),e(this.counterEl).addClass("character-counter").css({float:"right","font-size":"12px",height:1}),this.$el.parent().append(this.counterEl)}},{key:"_removeCounter",value:function(){e(this.counterEl).remove()}},{key:"updateCounter",value:function(){var t=+this.$el.attr("data-length"),i=this.el.value.length;this.isValidLength=i<=t;var n=i;t&&(n+="/"+t,this._validateInput()),e(this.counterEl).html(n)}},{key:"_validateInput",value:function(){this.isValidLength&&this.isInvalid?(this.isInvalid=!1,this.$el.removeClass("invalid")):this.isValidLength||this.isInvalid||(this.isInvalid=!0,this.$el.removeClass("valid"),this.$el.addClass("invalid"))}}],[{key:"init",value:function(e,t){return s(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_CharacterCounter}},{key:"defaults",get:function(){return t}}]),n}(u);M.CharacterCounter=i,M.jQueryLoaded&&M.initializeJqueryWrapper(i,"characterCounter","M_CharacterCounter")}(cash),function(e){"use strict";var t={duration:200,dist:-100,shift:0,padding:0,numVisible:5,fullWidth:!1,indicators:!1,noWrap:!1,onCycleTo:null},i=function(i){function n(t,i){l(this,n);var s=o(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,i));return s.el.M_Carousel=s,s.options=e.extend({},n.defaults,i),s.hasMultipleSlides=s.$el.find(".carousel-item").length>1,s.showIndicators=s.options.indicators&&s.hasMultipleSlides,s.noWrap=s.options.noWrap||!s.hasMultipleSlides,s.pressed=!1,s.dragged=!1,s.offset=s.target=0,s.images=[],s.itemWidth=s.$el.find(".carousel-item").first().innerWidth(),s.itemHeight=s.$el.find(".carousel-item").first().innerHeight(),s.dim=2*s.itemWidth+s.options.padding||1,s._autoScrollBound=s._autoScroll.bind(s),s._trackBound=s._track.bind(s),s.options.fullWidth&&(s.options.dist=0,s._setCarouselHeight(),s.showIndicators&&s.$el.find(".carousel-fixed-item").addClass("with-indicators")),s.$indicators=e('<ul class="indicators"></ul>'),s.$el.find(".carousel-item").each((function(t,i){if(s.images.push(t),s.showIndicators){var n=e('<li class="indicator-item"></li>');0===i&&n[0].classList.add("active"),s.$indicators.append(n)}})),s.showIndicators&&s.$el.append(s.$indicators),s.count=s.images.length,s.options.numVisible=Math.min(s.count,s.options.numVisible),s.xform="transform",["webkit","Moz","O","ms"].every((function(e){var t=e+"Transform";return void 0===document.body.style[t]||(s.xform=t,!1)})),s._setupEventHandlers(),s._scroll(s.offset),s}return r(n,i),a(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.M_Carousel=void 0}},{key:"_setupEventHandlers",value:function(){var e=this;this._handleCarouselTapBound=this._handleCarouselTap.bind(this),this._handleCarouselDragBound=this._handleCarouselDrag.bind(this),this._handleCarouselReleaseBound=this._handleCarouselRelease.bind(this),this._handleCarouselClickBound=this._handleCarouselClick.bind(this),void 0!==window.ontouchstart&&(this.el.addEventListener("touchstart",this._handleCarouselTapBound),this.el.addEventListener("touchmove",this._handleCarouselDragBound),this.el.addEventListener("touchend",this._handleCarouselReleaseBound)),this.el.addEventListener("mousedown",this._handleCarouselTapBound),this.el.addEventListener("mousemove",this._handleCarouselDragBound),this.el.addEventListener("mouseup",this._handleCarouselReleaseBound),this.el.addEventListener("mouseleave",this._handleCarouselReleaseBound),this.el.addEventListener("click",this._handleCarouselClickBound),this.showIndicators&&this.$indicators&&(this._handleIndicatorClickBound=this._handleIndicatorClick.bind(this),this.$indicators.find(".indicator-item").each((function(t,i){t.addEventListener("click",e._handleIndicatorClickBound)})));var t=M.throttle(this._handleResize,200);this._handleThrottledResizeBound=t.bind(this),window.addEventListener("resize",this._handleThrottledResizeBound)}},{key:"_removeEventHandlers",value:function(){var e=this;void 0!==window.ontouchstart&&(this.el.removeEventListener("touchstart",this._handleCarouselTapBound),this.el.removeEventListener("touchmove",this._handleCarouselDragBound),this.el.removeEventListener("touchend",this._handleCarouselReleaseBound)),this.el.removeEventListener("mousedown",this._handleCarouselTapBound),this.el.removeEventListener("mousemove",this._handleCarouselDragBound),this.el.removeEventListener("mouseup",this._handleCarouselReleaseBound),this.el.removeEventListener("mouseleave",this._handleCarouselReleaseBound),this.el.removeEventListener("click",this._handleCarouselClickBound),this.showIndicators&&this.$indicators&&this.$indicators.find(".indicator-item").each((function(t,i){t.removeEventListener("click",e._handleIndicatorClickBound)})),window.removeEventListener("resize",this._handleThrottledResizeBound)}},{key:"_handleCarouselTap",value:function(t){"mousedown"===t.type&&e(t.target).is("img")&&t.preventDefault(),this.pressed=!0,this.dragged=!1,this.verticalDragged=!1,this.reference=this._xpos(t),this.referenceY=this._ypos(t),this.velocity=this.amplitude=0,this.frame=this.offset,this.timestamp=Date.now(),clearInterval(this.ticker),this.ticker=setInterval(this._trackBound,100)}},{key:"_handleCarouselDrag",value:function(e){var t=void 0,i=void 0,n=void 0;if(this.pressed)if(t=this._xpos(e),i=this._ypos(e),n=this.reference-t,Math.abs(this.referenceY-i)<30&&!this.verticalDragged)(n>2||n<-2)&&(this.dragged=!0,this.reference=t,this._scroll(this.offset+n));else{if(this.dragged)return e.preventDefault(),e.stopPropagation(),!1;this.verticalDragged=!0}if(this.dragged)return e.preventDefault(),e.stopPropagation(),!1}},{key:"_handleCarouselRelease",value:function(e){if(this.pressed)return this.pressed=!1,clearInterval(this.ticker),this.target=this.offset,(this.velocity>10||this.velocity<-10)&&(this.amplitude=.9*this.velocity,this.target=this.offset+this.amplitude),this.target=Math.round(this.target/this.dim)*this.dim,this.noWrap&&(this.target>=this.dim*(this.count-1)?this.target=this.dim*(this.count-1):this.target<0&&(this.target=0)),this.amplitude=this.target-this.offset,this.timestamp=Date.now(),requestAnimationFrame(this._autoScrollBound),this.dragged&&(e.preventDefault(),e.stopPropagation()),!1}},{key:"_handleCarouselClick",value:function(t){if(this.dragged)return t.preventDefault(),t.stopPropagation(),!1;if(!this.options.fullWidth){var i=e(t.target).closest(".carousel-item").index();0!==this._wrap(this.center)-i&&(t.preventDefault(),t.stopPropagation()),this._cycleTo(i)}}},{key:"_handleIndicatorClick",value:function(t){t.stopPropagation();var i=e(t.target).closest(".indicator-item");i.length&&this._cycleTo(i.index())}},{key:"_handleResize",value:function(e){this.options.fullWidth?(this.itemWidth=this.$el.find(".carousel-item").first().innerWidth(),this.imageHeight=this.$el.find(".carousel-item.active").height(),this.dim=2*this.itemWidth+this.options.padding,this.offset=2*this.center*this.itemWidth,this.target=this.offset,this._setCarouselHeight(!0)):this._scroll()}},{key:"_setCarouselHeight",value:function(e){var t=this,i=this.$el.find(".carousel-item.active").length?this.$el.find(".carousel-item.active").first():this.$el.find(".carousel-item").first(),n=i.find("img").first();if(n.length)if(n[0].complete){var s=n.height();if(s>0)this.$el.css("height",s+"px");else{var a=n[0].naturalWidth,o=n[0].naturalHeight,r=this.$el.width()/a*o;this.$el.css("height",r+"px")}}else n.one("load",(function(e,i){t.$el.css("height",e.offsetHeight+"px")}));else if(!e){var l=i.height();this.$el.css("height",l+"px")}}},{key:"_xpos",value:function(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}},{key:"_ypos",value:function(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}},{key:"_wrap",value:function(e){return e>=this.count?e%this.count:e<0?this._wrap(this.count+e%this.count):e}},{key:"_track",value:function(){var e,t,i,n;t=(e=Date.now())-this.timestamp,this.timestamp=e,i=this.offset-this.frame,this.frame=this.offset,n=1e3*i/(1+t),this.velocity=.8*n+.2*this.velocity}},{key:"_autoScroll",value:function(){var e=void 0,t=void 0;this.amplitude&&(e=Date.now()-this.timestamp,(t=this.amplitude*Math.exp(-e/this.options.duration))>2||t<-2?(this._scroll(this.target-t),requestAnimationFrame(this._autoScrollBound)):this._scroll(this.target))}},{key:"_scroll",value:function(t){var i=this;this.$el.hasClass("scrolling")||this.el.classList.add("scrolling"),null!=this.scrollingTimeout&&window.clearTimeout(this.scrollingTimeout),this.scrollingTimeout=window.setTimeout((function(){i.$el.removeClass("scrolling")}),this.options.duration);var n,s,a,o,r=void 0,l=void 0,u=void 0,d=void 0,c=void 0,h=void 0,p=this.center,v=1/this.options.numVisible;if(this.offset="number"==typeof t?t:this.offset,this.center=Math.floor((this.offset+this.dim/2)/this.dim),o=-(a=(s=this.offset-this.center*this.dim)<0?1:-1)*s*2/this.dim,n=this.count>>1,this.options.fullWidth?(u="translateX(0)",h=1):(u="translateX("+(this.el.clientWidth-this.itemWidth)/2+"px) ",u+="translateY("+(this.el.clientHeight-this.itemHeight)/2+"px)",h=1-v*o),this.showIndicators){var f=this.center%this.count,_=this.$indicators.find(".indicator-item.active");_.index()!==f&&(_.removeClass("active"),this.$indicators.find(".indicator-item").eq(f)[0].classList.add("active"))}if(!this.noWrap||this.center>=0&&this.center<this.count){l=this.images[this._wrap(this.center)],e(l).hasClass("active")||(this.$el.find(".carousel-item").removeClass("active"),l.classList.add("active"));var m=u+" translateX("+-s/2+"px) translateX("+a*this.options.shift*o*r+"px) translateZ("+this.options.dist*o+"px)";this._updateItemStyle(l,h,0,m)}for(r=1;r<=n;++r){if(this.options.fullWidth?(d=this.options.dist,c=r===n&&s<0?1-o:1):(d=this.options.dist*(2*r+o*a),c=1-v*(2*r+o*a)),!this.noWrap||this.center+r<this.count){l=this.images[this._wrap(this.center+r)];var y=u+" translateX("+(this.options.shift+(this.dim*r-s)/2)+"px) translateZ("+d+"px)";this._updateItemStyle(l,c,-r,y)}if(this.options.fullWidth?(d=this.options.dist,c=r===n&&s>0?1-o:1):(d=this.options.dist*(2*r-o*a),c=1-v*(2*r-o*a)),!this.noWrap||this.center-r>=0){l=this.images[this._wrap(this.center-r)];var g=u+" translateX("+(-this.options.shift+(-this.dim*r-s)/2)+"px) translateZ("+d+"px)";this._updateItemStyle(l,c,-r,g)}}if(!this.noWrap||this.center>=0&&this.center<this.count){l=this.images[this._wrap(this.center)];var b=u+" translateX("+-s/2+"px) translateX("+a*this.options.shift*o+"px) translateZ("+this.options.dist*o+"px)";this._updateItemStyle(l,h,0,b)}var k=this.$el.find(".carousel-item").eq(this._wrap(this.center));p!==this.center&&"function"==typeof this.options.onCycleTo&&this.options.onCycleTo.call(this,k[0],this.dragged),"function"==typeof this.oneTimeCallback&&(this.oneTimeCallback.call(this,k[0],this.dragged),this.oneTimeCallback=null)}},{key:"_updateItemStyle",value:function(e,t,i,n){e.style[this.xform]=n,e.style.zIndex=i,e.style.opacity=t,e.style.visibility="visible"}},{key:"_cycleTo",value:function(e,t){var i=this.center%this.count-e;this.noWrap||(i<0?Math.abs(i+this.count)<Math.abs(i)&&(i+=this.count):i>0&&Math.abs(i-this.count)<i&&(i-=this.count)),this.target=this.dim*Math.round(this.offset/this.dim),i<0?this.target+=this.dim*Math.abs(i):i>0&&(this.target-=this.dim*i),"function"==typeof t&&(this.oneTimeCallback=t),this.offset!==this.target&&(this.amplitude=this.target-this.offset,this.timestamp=Date.now(),requestAnimationFrame(this._autoScrollBound))}},{key:"next",value:function(e){(void 0===e||isNaN(e))&&(e=1);var t=this.center+e;if(t>=this.count||t<0){if(this.noWrap)return;t=this._wrap(t)}this._cycleTo(t)}},{key:"prev",value:function(e){(void 0===e||isNaN(e))&&(e=1);var t=this.center-e;if(t>=this.count||t<0){if(this.noWrap)return;t=this._wrap(t)}this._cycleTo(t)}},{key:"set",value:function(e,t){if((void 0===e||isNaN(e))&&(e=0),e>this.count||e<0){if(this.noWrap)return;e=this._wrap(e)}this._cycleTo(e,t)}}],[{key:"init",value:function(e,t){return s(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Carousel}},{key:"defaults",get:function(){return t}}]),n}(u);M.Carousel=i,M.jQueryLoaded&&M.initializeJqueryWrapper(i,"carousel","M_Carousel")}(cash),function(e){"use strict";var t={onOpen:void 0,onClose:void 0},i=function(i){function n(t,i){l(this,n);var s=o(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,i));return s.el.M_TapTarget=s,s.options=e.extend({},n.defaults,i),s.isOpen=!1,s.$origin=e("#"+s.$el.attr("data-target")),s._setup(),s._calculatePositioning(),s._setupEventHandlers(),s}return r(n,i),a(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.TapTarget=void 0}},{key:"_setupEventHandlers",value:function(){this._handleDocumentClickBound=this._handleDocumentClick.bind(this),this._handleTargetClickBound=this._handleTargetClick.bind(this),this._handleOriginClickBound=this._handleOriginClick.bind(this),this.el.addEventListener("click",this._handleTargetClickBound),this.originEl.addEventListener("click",this._handleOriginClickBound);var e=M.throttle(this._handleResize,200);this._handleThrottledResizeBound=e.bind(this),window.addEventListener("resize",this._handleThrottledResizeBound)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleTargetClickBound),this.originEl.removeEventListener("click",this._handleOriginClickBound),window.removeEventListener("resize",this._handleThrottledResizeBound)}},{key:"_handleTargetClick",value:function(e){this.open()}},{key:"_handleOriginClick",value:function(e){this.close()}},{key:"_handleResize",value:function(e){this._calculatePositioning()}},{key:"_handleDocumentClick",value:function(t){e(t.target).closest(".tap-target-wrapper").length||(this.close(),t.preventDefault(),t.stopPropagation())}},{key:"_setup",value:function(){this.wrapper=this.$el.parent()[0],this.waveEl=e(this.wrapper).find(".tap-target-wave")[0],this.originEl=e(this.wrapper).find(".tap-target-origin")[0],this.contentEl=this.$el.find(".tap-target-content")[0],e(this.wrapper).hasClass(".tap-target-wrapper")||(this.wrapper=document.createElement("div"),this.wrapper.classList.add("tap-target-wrapper"),this.$el.before(e(this.wrapper)),this.wrapper.append(this.el)),this.contentEl||(this.contentEl=document.createElement("div"),this.contentEl.classList.add("tap-target-content"),this.$el.append(this.contentEl)),this.waveEl||(this.waveEl=document.createElement("div"),this.waveEl.classList.add("tap-target-wave"),this.originEl||(this.originEl=this.$origin.clone(!0,!0),this.originEl.addClass("tap-target-origin"),this.originEl.removeAttr("id"),this.originEl.removeAttr("style"),this.originEl=this.originEl[0],this.waveEl.append(this.originEl)),this.wrapper.append(this.waveEl))}},{key:"_calculatePositioning",value:function(){var t="fixed"===this.$origin.css("position");if(!t)for(var i=this.$origin.parents(),n=0;n<i.length&&!(t="fixed"==e(i[n]).css("position"));n++);var s=this.$origin.outerWidth(),a=this.$origin.outerHeight(),o=t?this.$origin.offset().top-M.getDocumentScrollTop():this.$origin.offset().top,r=t?this.$origin.offset().left-M.getDocumentScrollLeft():this.$origin.offset().left,l=window.innerWidth,u=window.innerHeight,d=l/2,c=u/2,h=r<=d,p=r>d,v=o<=c,f=o>c,_=r>=.25*l&&r<=.75*l,m=this.$el.outerWidth(),y=this.$el.outerHeight(),g=o+a/2-y/2,b=r+s/2-m/2,k=t?"fixed":"absolute",w=_?m:m/2+s,C=y/2,x=v?y/2:0,E=h&&!_?m/2-s:0,T=s,j=f?"bottom":"top",O=2*s,L=O,D=y/2-L/2,B=m/2-O/2,$={};$.top=v?g+"px":"",$.right=p?l-b-m+"px":"",$.bottom=f?u-g-y+"px":"",$.left=h?b+"px":"",$.position=k,e(this.wrapper).css($),e(this.contentEl).css({width:w+"px",height:C+"px",top:x+"px",right:"0px",bottom:"0px",left:E+"px",padding:T+"px",verticalAlign:j}),e(this.waveEl).css({top:D+"px",left:B+"px",width:O+"px",height:L+"px"})}},{key:"open",value:function(){this.isOpen||("function"==typeof this.options.onOpen&&this.options.onOpen.call(this,this.$origin[0]),this.isOpen=!0,this.wrapper.classList.add("open"),document.body.addEventListener("click",this._handleDocumentClickBound,!0),document.body.addEventListener("touchend",this._handleDocumentClickBound))}},{key:"close",value:function(){this.isOpen&&("function"==typeof this.options.onClose&&this.options.onClose.call(this,this.$origin[0]),this.isOpen=!1,this.wrapper.classList.remove("open"),document.body.removeEventListener("click",this._handleDocumentClickBound,!0),document.body.removeEventListener("touchend",this._handleDocumentClickBound))}}],[{key:"init",value:function(e,t){return s(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_TapTarget}},{key:"defaults",get:function(){return t}}]),n}(u);M.TapTarget=i,M.jQueryLoaded&&M.initializeJqueryWrapper(i,"tapTarget","M_TapTarget")}(cash),function(e){"use strict";var t={classes:"",dropdownOptions:{}},i=function(i){function n(t,i){l(this,n);var s=o(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,i));return s.$el.hasClass("browser-default")?o(s):(s.el.M_FormSelect=s,s.options=e.extend({},n.defaults,i),s.isMultiple=s.$el.prop("multiple"),s.el.tabIndex=-1,s._keysSelected={},s._valueDict={},s._setupDropdown(),s._setupEventHandlers(),s)}return r(n,i),a(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this._removeDropdown(),this.el.M_FormSelect=void 0}},{key:"_setupEventHandlers",value:function(){var t=this;this._handleSelectChangeBound=this._handleSelectChange.bind(this),this._handleOptionClickBound=this._handleOptionClick.bind(this),this._handleInputClickBound=this._handleInputClick.bind(this),e(this.dropdownOptions).find("li:not(.optgroup)").each((function(e){e.addEventListener("click",t._handleOptionClickBound)})),this.el.addEventListener("change",this._handleSelectChangeBound),this.input.addEventListener("click",this._handleInputClickBound)}},{key:"_removeEventHandlers",value:function(){var t=this;e(this.dropdownOptions).find("li:not(.optgroup)").each((function(e){e.removeEventListener("click",t._handleOptionClickBound)})),this.el.removeEventListener("change",this._handleSelectChangeBound),this.input.removeEventListener("click",this._handleInputClickBound)}},{key:"_handleSelectChange",value:function(e){this._setValueToInput()}},{key:"_handleOptionClick",value:function(t){t.preventDefault();var i=e(t.target).closest("li")[0],n=i.id;if(!e(i).hasClass("disabled")&&!e(i).hasClass("optgroup")&&n.length){var s=!0;if(this.isMultiple){var a=e(this.dropdownOptions).find("li.disabled.selected");a.length&&(a.removeClass("selected"),a.find('input[type="checkbox"]').prop("checked",!1),this._toggleEntryFromArray(a[0].id)),s=this._toggleEntryFromArray(n)}else e(this.dropdownOptions).find("li").removeClass("selected"),e(i).toggleClass("selected",s);e(this._valueDict[n].el).prop("selected")!==s&&(e(this._valueDict[n].el).prop("selected",s),this.$el.trigger("change"))}t.stopPropagation()}},{key:"_handleInputClick",value:function(){this.dropdown&&this.dropdown.isOpen&&(this._setValueToInput(),this._setSelectedStates())}},{key:"_setupDropdown",value:function(){var t=this;this.wrapper=document.createElement("div"),e(this.wrapper).addClass("select-wrapper "+this.options.classes),this.$el.before(e(this.wrapper)),this.wrapper.appendChild(this.el),this.el.disabled&&this.wrapper.classList.add("disabled"),this.$selectOptions=this.$el.children("option, optgroup"),this.dropdownOptions=document.createElement("ul"),this.dropdownOptions.id="select-options-"+M.guid(),e(this.dropdownOptions).addClass("dropdown-content select-dropdown "+(this.isMultiple?"multiple-select-dropdown":"")),this.$selectOptions.length&&this.$selectOptions.each((function(i){if(e(i).is("option")){var n=void 0;n=t.isMultiple?t._appendOptionWithIcon(t.$el,i,"multiple"):t._appendOptionWithIcon(t.$el,i),t._addOptionToValueDict(i,n)}else if(e(i).is("optgroup")){var s=e(i).children("option");e(t.dropdownOptions).append(e('<li class="optgroup"><span>'+i.getAttribute("label")+"</span></li>")[0]),s.each((function(e){var i=t._appendOptionWithIcon(t.$el,e,"optgroup-option");t._addOptionToValueDict(e,i)}))}})),this.$el.after(this.dropdownOptions),this.input=document.createElement("input"),e(this.input).addClass("select-dropdown dropdown-trigger"),this.input.setAttribute("type","text"),this.input.setAttribute("readonly","true"),this.input.setAttribute("data-target",this.dropdownOptions.id),this.el.disabled&&e(this.input).prop("disabled","true"),this.$el.before(this.input),this._setValueToInput();var i=e('<svg class="caret" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');if(this.$el.before(i[0]),!this.el.disabled){var n=e.extend({},this.options.dropdownOptions);n.onOpenEnd=function(i){var n=e(t.dropdownOptions).find(".selected").first();if(n.length&&(M.keyDown=!0,t.dropdown.focusedIndex=n.index(),t.dropdown._focusFocusedItem(),M.keyDown=!1,t.dropdown.isScrollable)){var s=n[0].getBoundingClientRect().top-t.dropdownOptions.getBoundingClientRect().top;s-=t.dropdownOptions.clientHeight/2,t.dropdownOptions.scrollTop=s}},this.isMultiple&&(n.closeOnClick=!1),this.dropdown=M.Dropdown.init(this.input,n)}this._setSelectedStates()}},{key:"_addOptionToValueDict",value:function(e,t){var i=Object.keys(this._valueDict).length,n=this.dropdownOptions.id+i,s={};t.id=n,s.el=e,s.optionEl=t,this._valueDict[n]=s}},{key:"_removeDropdown",value:function(){e(this.wrapper).find(".caret").remove(),e(this.input).remove(),e(this.dropdownOptions).remove(),e(this.wrapper).before(this.$el),e(this.wrapper).remove()}},{key:"_appendOptionWithIcon",value:function(t,i,n){var s=i.disabled?"disabled ":"",a="optgroup-option"===n?"optgroup-option ":"",o=this.isMultiple?'<label><input type="checkbox"'+s+'"/><span>'+i.innerHTML+"</span></label>":i.innerHTML,r=e("<li></li>"),l=e("<span></span>");l.html(o),r.addClass(s+" "+a),r.append(l);var u=i.getAttribute("data-icon");if(u){var d=e('<img alt="" src="'+u+'">');r.prepend(d)}return e(this.dropdownOptions).append(r[0]),r[0]}},{key:"_toggleEntryFromArray",value:function(t){var i=!this._keysSelected.hasOwnProperty(t),n=e(this._valueDict[t].optionEl);return i?this._keysSelected[t]=!0:delete this._keysSelected[t],n.toggleClass("selected",i),n.find('input[type="checkbox"]').prop("checked",i),n.prop("selected",i),i}},{key:"_setValueToInput",value:function(){var t=[];if(this.$el.find("option").each((function(i){if(e(i).prop("selected")){var n=e(i).text();t.push(n)}})),!t.length){var i=this.$el.find("option:disabled").eq(0);i.length&&""===i[0].value&&t.push(i.text())}this.input.value=t.join(", ")}},{key:"_setSelectedStates",value:function(){for(var t in this._keysSelected={},this._valueDict){var i=this._valueDict[t],n=e(i.el).prop("selected");e(i.optionEl).find('input[type="checkbox"]').prop("checked",n),n?(this._activateOption(e(this.dropdownOptions),e(i.optionEl)),this._keysSelected[t]=!0):e(i.optionEl).removeClass("selected")}}},{key:"_activateOption",value:function(t,i){i&&(this.isMultiple||t.find("li.selected").removeClass("selected"),e(i).addClass("selected"))}},{key:"getSelectedValues",value:function(){var e=[];for(var t in this._keysSelected)e.push(this._valueDict[t].el.value);return e}}],[{key:"init",value:function(e,t){return s(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_FormSelect}},{key:"defaults",get:function(){return t}}]),n}(u);M.FormSelect=i,M.jQueryLoaded&&M.initializeJqueryWrapper(i,"formSelect","M_FormSelect")}(cash),function(e,t){"use strict";var i={},n=function(n){function u(t,i){l(this,u);var n=o(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,u,t,i));return n.el.M_Range=n,n.options=e.extend({},u.defaults,i),n._mousedown=!1,n._setupThumb(),n._setupEventHandlers(),n}return r(u,n),a(u,[{key:"destroy",value:function(){this._removeEventHandlers(),this._removeThumb(),this.el.M_Range=void 0}},{key:"_setupEventHandlers",value:function(){this._handleRangeChangeBound=this._handleRangeChange.bind(this),this._handleRangeMousedownTouchstartBound=this._handleRangeMousedownTouchstart.bind(this),this._handleRangeInputMousemoveTouchmoveBound=this._handleRangeInputMousemoveTouchmove.bind(this),this._handleRangeMouseupTouchendBound=this._handleRangeMouseupTouchend.bind(this),this._handleRangeBlurMouseoutTouchleaveBound=this._handleRangeBlurMouseoutTouchleave.bind(this),this.el.addEventListener("change",this._handleRangeChangeBound),this.el.addEventListener("mousedown",this._handleRangeMousedownTouchstartBound),this.el.addEventListener("touchstart",this._handleRangeMousedownTouchstartBound),this.el.addEventListener("input",this._handleRangeInputMousemoveTouchmoveBound),this.el.addEventListener("mousemove",this._handleRangeInputMousemoveTouchmoveBound),this.el.addEventListener("touchmove",this._handleRangeInputMousemoveTouchmoveBound),this.el.addEventListener("mouseup",this._handleRangeMouseupTouchendBound),this.el.addEventListener("touchend",this._handleRangeMouseupTouchendBound),this.el.addEventListener("blur",this._handleRangeBlurMouseoutTouchleaveBound),this.el.addEventListener("mouseout",this._handleRangeBlurMouseoutTouchleaveBound),this.el.addEventListener("touchleave",this._handleRangeBlurMouseoutTouchleaveBound)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("change",this._handleRangeChangeBound),this.el.removeEventListener("mousedown",this._handleRangeMousedownTouchstartBound),this.el.removeEventListener("touchstart",this._handleRangeMousedownTouchstartBound),this.el.removeEventListener("input",this._handleRangeInputMousemoveTouchmoveBound),this.el.removeEventListener("mousemove",this._handleRangeInputMousemoveTouchmoveBound),this.el.removeEventListener("touchmove",this._handleRangeInputMousemoveTouchmoveBound),this.el.removeEventListener("mouseup",this._handleRangeMouseupTouchendBound),this.el.removeEventListener("touchend",this._handleRangeMouseupTouchendBound),this.el.removeEventListener("blur",this._handleRangeBlurMouseoutTouchleaveBound),this.el.removeEventListener("mouseout",this._handleRangeBlurMouseoutTouchleaveBound),this.el.removeEventListener("touchleave",this._handleRangeBlurMouseoutTouchleaveBound)}},{key:"_handleRangeChange",value:function(){e(this.value).html(this.$el.val()),e(this.thumb).hasClass("active")||this._showRangeBubble();var t=this._calcRangeOffset();e(this.thumb).addClass("active").css("left",t+"px")}},{key:"_handleRangeMousedownTouchstart",value:function(t){if(e(this.value).html(this.$el.val()),this._mousedown=!0,this.$el.addClass("active"),e(this.thumb).hasClass("active")||this._showRangeBubble(),"input"!==t.type){var i=this._calcRangeOffset();e(this.thumb).addClass("active").css("left",i+"px")}}},{key:"_handleRangeInputMousemoveTouchmove",value:function(){if(this._mousedown){e(this.thumb).hasClass("active")||this._showRangeBubble();var t=this._calcRangeOffset();e(this.thumb).addClass("active").css("left",t+"px"),e(this.value).html(this.$el.val())}}},{key:"_handleRangeMouseupTouchend",value:function(){this._mousedown=!1,this.$el.removeClass("active")}},{key:"_handleRangeBlurMouseoutTouchleave",value:function(){if(!this._mousedown){var i=7+parseInt(this.$el.css("padding-left"))+"px";e(this.thumb).hasClass("active")&&(t.remove(this.thumb),t({targets:this.thumb,height:0,width:0,top:10,easing:"easeOutQuad",marginLeft:i,duration:100})),e(this.thumb).removeClass("active")}}},{key:"_setupThumb",value:function(){this.thumb=document.createElement("span"),this.value=document.createElement("span"),e(this.thumb).addClass("thumb"),e(this.value).addClass("value"),e(this.thumb).append(this.value),this.$el.after(this.thumb)}},{key:"_removeThumb",value:function(){e(this.thumb).remove()}},{key:"_showRangeBubble",value:function(){var i=-7+parseInt(e(this.thumb).parent().css("padding-left"))+"px";t.remove(this.thumb),t({targets:this.thumb,height:30,width:30,top:-30,marginLeft:i,duration:300,easing:"easeOutQuint"})}},{key:"_calcRangeOffset",value:function(){var e=this.$el.width()-15,t=parseFloat(this.$el.attr("max"))||100,i=parseFloat(this.$el.attr("min"))||0;return(parseFloat(this.$el.val())-i)/(t-i)*e}}],[{key:"init",value:function(e,t){return s(u.__proto__||Object.getPrototypeOf(u),"init",this).call(this,this,e,t)}},{key:"getInstance",value:function(e){return(e.jquery?e[0]:e).M_Range}},{key:"defaults",get:function(){return i}}]),u}(u);M.Range=n,M.jQueryLoaded&&M.initializeJqueryWrapper(n,"range","M_Range"),n.init(e("input[type=range]"))}(cash,M.anime)}).call(this,i(6))},function(e,t){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(e){"object"==typeof window&&(i=window)}e.exports=i},function(e,t,i){"use strict";i.r(t);var n=i(0);class s{constructor(e){this.steps=["restore-script-upload-step","backup-upload-step","restore-remote-backup-step","restore-remote-database-step","restore-finish-step"],this.ajaxurl=ajaxurl+"?action=restore_backup",this.cancel=!1,this.upload_file_event=new Event("upload_file_event"),this.resume={},this.hash=e,this.file_counter=0,document.addEventListener("backup_upload_finish",(function(e){jQuery(".xcloner-restore .backup-upload-step .toggler").removeClass("cancel")}),!1),document.addEventListener("remote_restore_backup_finish",(function(e){jQuery(".xcloner-restore .restore-remote-backup-step .toggler").removeClass("cancel")}),!1),document.addEventListener("remote_restore_mysql_backup_finish",(function(e){jQuery(".xcloner-restore .restore-remote-database-step .toggler").removeClass("cancel")}),!1),document.addEventListener("xcloner_populate_remote_backup_files_list",(function(e){var t=e.detail.files,i=jQuery(".xcloner-restore #remote_backup_file").val();for(var n in jQuery(".xcloner-restore #remote_backup_file").find("option").not(":first").remove(),t){var s="not-selected";(t[n].selected||i==t[n].path)&&(s="selected"),jQuery(".xcloner-restore #remote_backup_file").append("<option value='"+t[n].path+"' "+s+">"+t[n].path+"("+e.detail.$this.getSize(t[n].size)+" MB)</option>").addClass("file")}}),!1),document.addEventListener("xcloner_populate_remote_mysqldump_files_list",(function(e){var t=e.detail.files,i=jQuery(".xcloner-restore #remote_database_file").val();for(var n in jQuery(".xcloner-restore #remote_database_file").find("option").not(":first").remove(),t){if(t[n].selected||i==t[n].path)var s="selected";else s="not-selected";jQuery(".xcloner-restore #remote_database_file").append("<option value='"+t[n].path+"' "+s+">"+t[n].path+"("+e.detail.$this.getSize(t[n].size)+" MB) "+t[n].timestamp+"</option>").addClass("file")}}),!1),document.addEventListener("xcloner_restore_next_step",(function(e){if(void 0!==e.detail.$this){var t=e.detail.$this;jQuery(".xcloner-restore li."+t.steps[t.set_current_step]).show().find(".collapsible-header").trigger("click")}}),!1),document.addEventListener("xcloner_restore_update_progress",(function(e){void 0!==e.detail.percent&&(jQuery(".xcloner-restore .steps.active .progress").show(),"indeterminate"==e.detail.class&&jQuery(".xcloner-restore .steps.active .progress > div").addClass(e.detail.class).removeClass("determinate"),"determinate"==e.detail.class&&jQuery(".xcloner-restore .steps.active .progress > div").addClass(e.detail.class).removeClass("indeterminate"),100==e.detail.percent?jQuery(".xcloner-restore .steps.active .progress > div").removeClass("indeterminate").addClass("determinate").css("width",e.detail.percent+"%"):jQuery(".xcloner-restore .steps.active .progress .determinate").css("width",e.detail.percent+"%"))}),!1),document.addEventListener("xcloner_restore_display_status_text",(function(e){void 0===e.detail.status&&(e.detail.status="updated"),void 0!==e.detail.message&&jQuery(".xcloner-restore .steps.active .status").html("<div class='"+e.detail.status+"'>"+e.detail.message+"</div>")}),!1),document.addEventListener("remote_restore_update_files_list",(function(e){if(void 0!==e.detail.files&&e.detail.files.length){for(var t=[],i=0;i<e.detail.files.length;i++)t[i]="<li>"+e.detail.files[i]+"</li>";jQuery(".xcloner-restore .restore-remote-backup-step .files-list").is(":hidden")||jQuery(".xcloner-restore .restore-remote-backup-step .files-list").html(t.reverse().join("\n"))}else jQuery.isArray(e.detail.files)||jQuery(".xcloner-restore .restore-remote-backup-step .files-list").html("")}),!1),document.addEventListener("xcloner_restore_display_query_box",(function(e){e.detail.query?(jQuery(".xcloner-restore .query-box").show(),jQuery(".xcloner-restore .query-list").val(e.detail.query)):(jQuery(".xcloner-restore .query-box").hide(),jQuery(".xcloner-restore .query-list").val(""))}),!1),document.addEventListener("xcloner_restore_finish",(function(e){jQuery(".xcloner-restore #xcloner_restore_finish").show(),jQuery(".xcloner-restore #open_target_site a").removeAttr("disabled")}),!1)}get_remote_backup_files_callback(e,t){if(t){var i=e.statusText.files;document.dispatchEvent(new CustomEvent("xcloner_populate_remote_backup_files_list",{detail:{files:i,$this:this}}))}}get_remote_backup_files(){this.set_cancel(!1);var e={};e.local_backup_file=jQuery(".xcloner-restore .backup-upload-step #backup_file").val(),this.do_ajax("get_remote_backup_files_callback","list_backup_archives",e)}get_remote_mysqldump_files_callback(e,t){if(t){var i=e.statusText.files;document.dispatchEvent(new CustomEvent("xcloner_populate_remote_mysqldump_files_list",{detail:{files:i,$this:this}}))}}get_remote_mysqldump_files(){if(this.set_cancel(!1),this.resume.callback="","get_remote_mysqldump_files_callback"==this.resume.callback)return this.do_ajax(this.resume.callback,this.resume.action,this.resume.params),void(this.resume={});var e={};e.backup_file=this.get_backup_file(),this.do_ajax("get_remote_mysqldump_files_callback","list_mysqldump_backups",e)}get_backup_file(){return jQuery(".xcloner-restore #remote_backup_file").val()}remote_restore_backup_file_callback(e,t,i={}){if(!t)return document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text",{detail:{status:"error",message:e.status+" "+e.statusText}})),document.dispatchEvent(new CustomEvent("xcloner_restore_update_progress",{detail:{percent:100}})),void document.dispatchEvent(new CustomEvent("remote_restore_backup_finish"));var n=parseInt(e.statusText.start)+parseInt(e.statusText.processed);if(e.statusText.extracted_files&&document.dispatchEvent(new CustomEvent("remote_restore_update_files_list",{detail:{files:e.statusText.extracted_files}})),!e.statusText.finished)return i.start=e.statusText.start,i.part=e.statusText.part,i.processed=e.statusText.processed,document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text",{detail:{message:"Processing <strong>"+e.statusText.backup_file+"</strong>- processed "+this.getSize(n,1024)+" KB from archive"}})),void this.do_ajax("remote_restore_backup_file_callback","restore_backup_to_path",i);document.dispatchEvent(new CustomEvent("xcloner_restore_update_progress",{detail:{percent:100}})),document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text",{detail:{message:"Done restoring <strong>"+e.statusText.backup_file+"</strong>."}})),document.dispatchEvent(new CustomEvent("remote_restore_backup_finish")),this.cancel=!1}remote_restore_backup_file(e){var t={};if(t.backup_file=e,t.filter_files=jQuery(".xcloner-restore input[name=filter_files]:checked").val(),"remote_restore_backup_file_callback"==this.resume.callback)return this.do_ajax(this.resume.callback,this.resume.action,this.resume.params),void(this.resume={});document.dispatchEvent(new CustomEvent("xcloner_restore_update_progress",{detail:{percent:0,class:"indeterminate"}})),document.dispatchEvent(new CustomEvent("remote_restore_update_files_list",{detail:{files:""}})),this.do_ajax("remote_restore_backup_file_callback","restore_backup_to_path",t)}remote_restore_mysql_backup_file_callback(e,t,i={}){if(!e)return this.set_cancel(!0),void document.dispatchEvent(new CustomEvent("remote_restore_mysql_backup_finish"));if(!t)return this.start=e.statusText.start,document.dispatchEvent(new CustomEvent("xcloner_restore_display_query_box",{detail:{query:e.statusText.query}})),document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text",{detail:{status:"error",message:e.status+" "+e.statusText.message}})),void document.dispatchEvent(new CustomEvent("remote_restore_mysql_backup_finish"));document.dispatchEvent(new CustomEvent("xcloner_restore_display_query_box",{detail:{query:""}})),i.query="";parseInt(e.statusText.start),parseInt(e.statusText.processed);if(!e.statusText.finished){i.start=e.statusText.start,i.processed=e.statusText.processed,this.start=i.start;var n=0;return e.statusText.backup_size&&(n=100*parseInt(e.statusText.start)/parseInt(e.statusText.backup_size)),document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text",{detail:{message:"Processing <strong>"+e.statusText.backup_file+"</strong>- wrote "+this.getSize(e.statusText.start,1024)+" KB of data"}})),document.dispatchEvent(new CustomEvent("xcloner_restore_update_progress",{detail:{percent:n}})),void this.do_ajax("remote_restore_mysql_backup_file_callback","restore_mysql_backup",i)}document.dispatchEvent(new CustomEvent("xcloner_restore_update_progress",{detail:{percent:100}})),document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text",{detail:{message:"Done restoring <strong>"+e.statusText.backup_file+"</strong>."}})),document.dispatchEvent(new CustomEvent("remote_restore_mysql_backup_finish")),this.cancel=!1}remote_restore_mysql_backup_file(e){this.set_cancel(!1);var t={};if(t.mysqldump_file=e,t.query="",t.start=0,jQuery(".xcloner-restore .query-box .query-list").val()&&(t.query=jQuery(".xcloner-restore .query-box .query-list").val(),t.start=this.start),document.dispatchEvent(new CustomEvent("xcloner_restore_display_query_box",{detail:{query:""}})),"remote_restore_mysql_backup_file_callback"==this.resume.callback)return this.do_ajax(this.resume.callback,this.resume.action,this.resume.params),void(this.resume={});this.do_ajax("remote_restore_mysql_backup_file_callback","restore_mysql_backup",t)}restore_finish_callback(e,t,i={}){if(!t)return document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text",{detail:{status:"error",message:e.statusText,$this:this}})),!1;document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text",{detail:{message:e.statusText,$this:this}})),document.dispatchEvent(new CustomEvent("xcloner_restore_finish",{detail:{message:e.statusText,$this:this}}))}restore_finish(){this.set_cancel(!1);var e={};e.backup_archive=jQuery(".xcloner-restore #remote_backup_file").val(),e.delete_backup_temporary_folder=0,e.delete_restore_script=0,e.update_remote_site_url=0,jQuery(".xcloner-restore #delete_backup_temporary_folder").is(":checked")&&(e.delete_backup_temporary_folder=1),jQuery(".xcloner-restore #delete_restore_script").is(":checked")&&(e.delete_restore_script=1),jQuery(".xcloner-restore #update_remote_site_url").is(":checked")&&(e.update_remote_site_url=1),jQuery(".xcloner-restore #delete_backup_archive").is(":checked")&&(e.delete_backup_archive=1),this.do_ajax("restore_finish_callback","restore_finish",e)}upload_backup_file(e){var t={};if(this.set_cancel(!1),"upload_backup_file_callback"==this.resume.callback)return this.do_ajax(this.resume.callback,this.resume.action,this.resume.params),void(this.resume={});t.file=e,t.start=0,document.dispatchEvent(new CustomEvent("backup_upload_start")),document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text",{detail:{message:"Uploading backup 0%"}})),document.dispatchEvent(new CustomEvent("xcloner_restore_update_progress",{detail:{percent:0}})),this.do_ajax("upload_backup_file_callback","restore_upload_backup",t)}upload_backup_file_callback(e,t,i={}){if(!t)return document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text",{detail:{status:"error",message:e.status+" "+e.statusText}})),void document.dispatchEvent(new CustomEvent("xcloner_restore_update_progress",{detail:{percent:100}}));if(e&&(!1!==e.start||e.part<e.total_parts)){var n=0;if(e.total_size){e.start||(e.start=0);var s=parseInt(e.start)+parseInt(e.uploaded_size);n=100*parseInt(s)/parseInt(e.total_size)}var a="";e.part>0&&(a="part "+e.part+" - "),document.dispatchEvent(new CustomEvent("xcloner_restore_update_progress",{detail:{percent:n}})),document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text",{detail:{message:"Uploading backup "+a+parseFloat(n).toFixed(2)+"%"}})),i.start=e.start,i.part=e.part,i.uploaded_size=e.uploaded_size,this.do_ajax("upload_backup_file_callback","restore_upload_backup",i)}else this.cancel=!1,document.dispatchEvent(new CustomEvent("backup_upload_finish")),document.dispatchEvent(new CustomEvent("xcloner_restore_update_progress",{detail:{percent:100}})),document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text",{detail:{message:"Done."}}))}open_target_site(e){var t=jQuery(".xcloner-restore #remote_restore_url").val();t||jQuery(".xcloner-restore #wp_home_url").val(),jQuery(e).attr("href",t)}next_step(e=0){this.set_current_step=jQuery(".xcloner-restore li.active").attr("data-step"),this.set_current_step=parseInt(this.set_current_step)+parseInt(e),document.dispatchEvent(new CustomEvent("xcloner_restore_next_step",{detail:{$this:this}}))}list_backup_content_callback(e,t,i={}){if(e.error)return jQuery("#backup_cotent_modal .files-list").addClass("error").prepend(e.statusText),void jQuery("#backup_cotent_modal .progress > div").addClass("determinate").removeClass(".indeterminate").css("width","100%");var n=[];for(var s in e.files)this.file_counter++,n[s]="<li>"+this.file_counter+". <span title='"+e.files[s].mtime+"'>"+e.files[s].path+"</span> ("+e.files[s].size+" bytes)</li>";jQuery("#backup_cotent_modal .modal-content .files-list").prepend(n.reverse().join("\n")),!e.finished&&jQuery("#backup_cotent_modal").is(":visible")?(i.start=e.start,i.part=e.part,this.do_ajax("list_backup_content_callback","list_backup_files",i)):jQuery("#backup_cotent_modal .progress > div").addClass("determinate").removeClass(".indeterminate").css("width","100%")}list_backup_content(e){this.file_counter=0,jQuery("#backup_cotent_modal .modal-content .files-list").text("").removeClass("error"),jQuery("#backup_cotent_modal .modal-content .backup-name").text(e);var t=document.querySelector("#backup_cotent_modal");M.Modal.init(t).open(),jQuery("#backup_cotent_modal .progress > div").removeClass("determinate").addClass("indeterminate");var i={};i.file=e,i.start=0,i.part=0,this.do_ajax("list_backup_content_callback","list_backup_files",i)}init_resume(){this.resume={},jQuery(".xcloner-restore .steps.active .progress").is(":visible")&&document.dispatchEvent(new CustomEvent("xcloner_restore_update_progress",{detail:{percent:0}})),jQuery(".xcloner-restore .steps.active .status").html()&&document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text",{detail:{message:""}})),document.dispatchEvent(new CustomEvent("remote_restore_update_files_list",{detail:{files:""}}))}do_ajax(e,t="",i={}){if("restore_upload_backup"==t&&(i.action="restore_upload_backup"),i.xcloner_action=t,i.hash=this.hash,i.API_ID=Object(n.ID)(),void 0!==typeof XCLONER_WPNONCE&&(i._wpnonce=XCLONER_WPNONCE),!0===this.cancel)return this.resume.callback=e,this.resume.action=t,void(this.resume.params=i);var s=this;jQuery(".xcloner-restore .steps.active").addClass("active_status"),this.request=jQuery.ajax({url:this.ajaxurl,dataType:"json",type:"POST",crossDomain:!0,data:i,error:function(n,a,o){s.resume.callback=e,s.resume.action=t,s.resume.params=i,document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text",{detail:{status:"error",message:n.status+" "+n.statusText}})),s[e](n,!1)}}).done((function(n){n||(s.resume.callback=e,s.resume.action=t,s.resume.params=i,document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text",{detail:{status:"error",message:"Lost connection with the API, please try and authentificate again"}}))),n&&200!=n.status?n.error?document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text",{detail:{status:"error",message:n.message}})):s[e](n,!1,i):s[e](n,!0,i)}))}set_current_step(e){this.set_current_step=e}set_cancel(e){e&&document.dispatchEvent(new CustomEvent("xcloner_restore_update_progress",{detail:{percent:0,class:"determinate"}})),this.cancel=e}get_cancel(e){return this.cancel}getSize(e,t=1048576){return(e/t).toFixed(2)}}jQuery(document).ready((function(){if("undefined"!=typeof xcloner_auth_key)var e=new s(xcloner_auth_key);else e=new s;e.set_current_step(0),jQuery(".col select").formSelect(),jQuery(".xcloner-restore .upload-backup.cancel").on("click",(function(){e.set_cancel(!0)})),jQuery(".xcloner-restore .upload-backup").on("click",(function(){jQuery(this).hasClass("cancel")?e.set_cancel(!0):e.set_cancel(!1);var t=jQuery(".xcloner-restore #backup_file").val();t?(jQuery(this).parent().toggleClass("cancel"),e.get_cancel()||e.upload_backup_file(t)):document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text",{detail:{status:"error",message:"Please select a backup file from the list above"}}))})),jQuery(".xcloner-restore #skip_upload_backup").on("click",(function(){e.set_cancel(!0),e.next_step()})),jQuery(".xcloner-restore #skip_restore_remote_database_step").on("click",(function(){e.set_cancel(!0),e.next_step()})),jQuery(".xcloner-restore li.steps").on("click",(function(){e.set_current_step=jQuery(this).attr("data-step")-1})),jQuery(".xcloner-restore #skip_remote_backup_step").on("click",(function(){e.set_cancel(!0),e.next_step()})),jQuery(".xcloner-restore .restore-remote-backup-step .collapsible-header").click((function(){e.get_remote_backup_files()})),jQuery(".xcloner-restore .restore-remote-database-step .collapsible-header").click((function(){e.get_remote_mysqldump_files()})),jQuery(".xcloner-restore #remote_backup_file").on("change",(function(){e.init_resume()})),jQuery(".xcloner-restore #backup_file").on("change",(function(){e.init_resume()})),jQuery(".xcloner-restore #restore_finish").click((function(){e.restore_finish()})),jQuery(".xcloner-restore #open_target_site a").click((function(){e.open_target_site(this)})),jQuery(".xcloner-restore #refresh_remote_backup_file").on("click",(function(t){document.dispatchEvent(new CustomEvent("xcloner_restore_update_progress",{detail:{percent:0}})),e.resume={},e.get_remote_backup_files(),t.stopPropagation()})),jQuery(".xcloner-restore #refresh_database_file").on("click",(function(t){document.dispatchEvent(new CustomEvent("xcloner_restore_update_progress",{detail:{percent:0}})),e.resume={},e.get_remote_mysqldump_files(),t.stopPropagation()})),jQuery(".xcloner-restore #toggle_file_restore_display").on("click",(function(e){jQuery(".xcloner-restore .restore-remote-backup-step .files-list").toggle()})),jQuery(".xcloner-restore .restore_remote_mysqldump").on("click",(function(t){jQuery(this).hasClass("cancel")?e.set_cancel(!0):e.set_cancel(!1),this.remote_database_file=jQuery(".xcloner-restore #remote_database_file").val(),this.remote_database_file?(jQuery(this).parent().toggleClass("cancel"),e.get_cancel()||(document.dispatchEvent(new CustomEvent("xcloner_restore_update_progress",{detail:{percent:0,class:"determinate"}})),e.remote_restore_mysql_backup_file(this.remote_database_file))):document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text",{detail:{status:"error",message:"Please select a mysqld backup file from the list"}}))})),jQuery(".xcloner-restore .list-backup-content").on("click",(function(t){var i=jQuery(".xcloner-restore #remote_backup_file").val();i&&e.list_backup_content(i),t.preventDefault()})),jQuery(".xcloner-restore .restore-remote-backup-step .restore_remote_backup").click((function(){e.set_cancel(jQuery(this).hasClass("cancel")),this.backup_file=jQuery(".xcloner-restore #remote_backup_file").val(),this.backup_file?(jQuery(this).parent().toggleClass("cancel"),e.get_cancel()||(document.dispatchEvent(new CustomEvent("xcloner_restore_update_progress",{detail:{percent:0,class:"indeterminate"}})),e.remote_restore_backup_file(this.backup_file))):document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text",{detail:{status:"error",message:"Please select a backup file from the list above"}}))}))}))},function(e,t,i){"use strict";i.r(t);var n,s=i(0);document.addEventListener("DOMContentLoaded",(function(){var e=document.querySelector("#edit_schedule");n=M.Modal.init(e)})),jQuery(document).ready((function(){var e=new class{constructor(){this.edit_modal=jQuery("#edit_schedule")}get_form_params(){}get_schedule_by_id(e){var t=this;e&&jQuery.ajax({url:XCLONER_AJAXURL,data:{action:"get_schedule_by_id",id:e},success:function(i){i.id==e&&t.create_modal(i)},dataType:"json"})}delete_schedule_by_id(e,t,i){e&&jQuery.ajax({url:XCLONER_AJAXURL,data:{action:"delete_schedule_by_id",id:e},success:function(e){jQuery(t).parents("tr").remove(),i.row(jQuery(t).parents("tr")).remove().draw()},dataType:"json"})}create_modal(e){this.edit_modal.find("#schedule_id").text(e.id),1==e.status?this.edit_modal.find("#status").attr("checked","checked"):this.edit_modal.find("#status").removeAttr("checked"),this.edit_modal.find("#schedule_id").text(e.id),this.edit_modal.find("#schedule_id_hidden").val(e.id),this.edit_modal.find("#schedule_name").val(e.name),this.edit_modal.find("#backup_name").val(e.backup_params.backup_name),this.edit_modal.find("#email_notification").val(e.backup_params.email_notification),this.edit_modal.find("#diff_start_date").val(e.backup_params.diff_start_date),this.edit_modal.find('#schedule_frequency>option[value="'+e.recurrence+'"]').prop("selected",!0),this.edit_modal.find('#backup_type>option[value="'+e.backup_type+'"]').prop("selected",!0),this.edit_modal.find('#schedule_storage>option[value="'+e.remote_storage+'"]').prop("selected",!0),this.edit_modal.find("#schedule_start_date").val(e.start_at),void 0!==e.backup_params.backup_encrypt&&1==e.backup_params.backup_encrypt&&this.edit_modal.find("#backup_encrypt").attr("checked","checked"),void 0!==e.backup_params.backup_delete_after_remote_transfer&&1==e.backup_params.backup_delete_after_remote_transfer&&this.edit_modal.find("#backup_delete_after_remote_transfer").attr("checked","checked");var t=jQuery.parseJSON(e.table_params),i="";for(var s in t)for(var a in t[s])i+=s+"."+t[s][a]+"\n";this.edit_modal.find("#table_params").val(i);var o=jQuery.parseJSON(e.excluded_files),r="";for(var a in o)r+=o[a]+"\n";this.edit_modal.find("#excluded_files").val(r),jQuery(".col select").formSelect(),M.updateTextFields(),n.open()}save_schedule(e,t){var i=jQuery(e).serialize();jQuery.ajax({url:XCLONER_AJAXURL,dataType:"json",type:"POST",data:i,error:function(e){alert("Error saving schedule!")}}).done((function(e){void 0===e.error?(n.close(),t.ajax.reload()):alert("Error saving schedule!"+e.error)}))}IsJsonString(e){try{JSON.parse(e)}catch(e){return!1}return!0}};jQuery("select[required]").css({display:"block",height:0,padding:0,width:0,position:"absolute"});let t=jQuery("#scheduled_backups").DataTable({responsive:!0,bFilter:!1,order:[[3,"desc"]],buttons:["selectAll","selectNone"],language:{emptyTable:"No schedules available",buttons:{selectAll:"Select all items",selectNone:"Select none"}},columnDefs:[{targets:"no-sort",orderable:!1},{className:"hide-on-med-and-down",targets:[3,5]}],ajax:XCLONER_AJAXURL+"&action=get_scheduler_list",fnDrawCallback:function(i){jQuery(this).off("click",".edit").on("click",".edit",(function(){var t=jQuery(this).attr("href").substr(1);e.get_schedule_by_id(t)})),jQuery(this).off("click",".delete").on("click",".delete",(function(){var i=jQuery(this).attr("href").substr(1);if(confirm("Are you sure you want to delete it?"))e.delete_schedule_by_id(i,this,t)})),jQuery("span.shorten_string").each((function(){Object(s.doShortText)(jQuery(this))})),jQuery("span.shorten_string").click((function(){jQuery(this).toggleClass("full"),Object(s.doShortText)(jQuery(this))}))}});jQuery("#save_schedule").on("submit",(function(){return e.save_schedule(jQuery(this),t),!1})),"function"==typeof jQuery(".timepicker").pickatime&&jQuery(".timepicker").pickatime({default:"now",min:[7,30],twelvehour:!1,donetext:"OK",autoclose:!1,vibrate:!0}),"function"==typeof jQuery(".timepicker").pickadate&&(jQuery(".datepicker").pickadate({format:"d mmmm yyyy",selectMonths:!0,selectYears:15,min:.1,onSet:function(){}}),jQuery(".datepicker_max_today").pickadate({format:"yyyy-mm-dd",selectMonths:!0,selectYears:15,max:.1,onSet:function(){}}))}))}]);
8
  //# sourceMappingURL=index.min.js.map
{dist/admin → admin}/js/index.min.js.LICENSE.txt RENAMED
@@ -4,6 +4,8 @@
4
  * MIT License (https://raw.githubusercontent.com/Dogfalo/materialize/master/LICENSE)
5
  */
6
 
 
 
7
  /*! cash-dom 1.3.5, https://github.com/kenwheeler/cash @license MIT */
8
 
9
  /**
4
  * MIT License (https://raw.githubusercontent.com/Dogfalo/materialize/master/LICENSE)
5
  */
6
 
7
+ /*! You can review the source code here: https://github.com/watchfulli/XCloner-Wordpress/ */
8
+
9
  /*! cash-dom 1.3.5, https://github.com/kenwheeler/cash @license MIT */
10
 
11
  /**
admin/js/index.min.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"sources":["webpack:///admin/js/index.min.js"],"names":["modules","installedModules","__webpack_require__","moduleId","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","__webpack_exports__","error_modal","next_tab","doShortText","show_ajax_error","ID","getUrlParam","_xcloner_remote_storage_class__WEBPACK_IMPORTED_MODULE_0__","_xcloner_backup_class__WEBPACK_IMPORTED_MODULE_1__","_xcloner_manage_backups_class__WEBPACK_IMPORTED_MODULE_2__","document","addEventListener","Modalelem","querySelector","M","Modal","init","jQuery","ready","tooltip","collapsible","click","this","toggleClass","each","on","fadeIn","select","toggle","e","xcloner_manage_backups","id","attr","substr","download_backup_by_name","preventDefault","removeClass","find","addClass","location","hash","window","replace","trigger","elem","hasClass","text","text_lenght","length","first","last","title","msg","json","xcloner_backup","cancel_backup","undefined","responseText","status","statusText","JSON","stringify","open","Math","random","toString","search","split","remote_storage","dataTable","Xcloner_Manage_Backups","backup_cotent_modal","backup_encryption_modal","backup_decryption_modal","remote_storage_modal","local_storage_upload_modal","constructor","file_counter","storage_selection","XCLONER_AJAXURL","delete_backup_by_name","ajax","url","method","data","action","success","response","finished","row","parents","remove","draw","alert","dataType","list_backup_content_callback","backup_file","start","part","$this","file","error","prepend","message","css","files_text","files","total_size","parseInt","mtime","path","size","reverse","join","is","xhr","textStatus","list_backup_content","backup_encryption_callback","iv","percent","processing_file","show","reload","backup_encryption","hide","backup_decryption_callback","decryption_key","val","backup_decryption","cloud_upload","delete_after_transfer","updateTextFields","formSelect","off","storage_type","copy_remote_to_local","Xcloner_Remote_Storage","toggle_status","field","Xcloner_Backup","cancel","params","last_dumpfile","last_backup_file","backup_part","backup_size_total","resume","get_form_params","table_params","files_params","jstree","parent","index","$return","backup_params","serializeArray","do_backup_database_callback","extra","stats","tables_count","database_count","total_records","tableName","databaseName","processedRecords","startAtRecord","endDump","records","dumpfile","db_text","getSize","dumpsize","html","prependTo","do_ajax","do_backup_files","do_backup_database","do_scan_filesystem_callback","total_files_num","total_files_size","parseFloat","toFixed","last_logged_file","do_scan_filesystem","do_backup_files_callback","start_at_line","backup_size","processed_file","start_at_byte","processed_size","processed_file_size","backup_text","backup_archive_name_full","backup_archive_name","lines_total","backup_parent","do_backup_encryption","do_remote_storage_upload","do_backup_done","do_backup_encryption_callback","do_upload_backup_to_remote_callback","backup_name","delete_backup_after_transfer","Number","set_cancel","do_save_schedule_callback","restart_backup","start_backup","get_cancel","init_resume","callback","type","API_ID","err","done","error_message","bytes","conv","global","__WEBPACK_AMD_DEFINE_RESULT__","_get","receiver","Function","desc","getOwnPropertyDescriptor","getPrototypeOf","_createClass","defineProperties","target","props","descriptor","configurable","writable","Constructor","protoProps","staticProps","_possibleConstructorReturn","self","ReferenceError","_inherits","subClass","superClass","TypeError","setPrototypeOf","__proto__","_classCallCheck","instance","cash","frag","doc","win","ArrayProto","Array","slice","filter","push","noop","isFunction","item","isString","idMatch","classMatch","htmlMatch","singlet","selector","context","test","getElementsByClassName","getElementsByTagName","querySelectorAll","parseHTML","str","base","implementation","createHTMLDocument","createElement","href","head","appendChild","body","innerHTML","childNodes","onReady","fn","readyState","Init","elems","getElementById","nodeType","splice","map","collection","matches","el","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","getCompareFunction","unique","indexOf","extend","args","arguments","merge","second","len","j","isArray","isNumeric","isNaN","isFinite","uid","Date","now","getDataCache","node","setData","getData","dataset","removeData","removeAttr","v","notWhiteMatch","getClasses","match","classList","contains","RegExp","className","spacedName","add","classes","getAttribute","setAttribute","check","prop","removeAttribute","removeProp","state","eq","comparator","child","children","cache","style","camelRegex","whiteSpace","camelCase","letter","getPrefixedProp","ucProp","charAt","toUpperCase","compute","getComputedStyle","registerEvent","eventName","eventCache","removeEvent","events","removeEventListener","event","encode","encodeURIComponent","getSelectMultiple_","values","options","selected","getSelectSingle_","selectedIndex","getValue","toLowerCase","checked","insertElement","insertBefore","insertContent","insertAdjacentHTML","cloneNode","prefixedProp","lower","getBoundingClientRect","margins","delegate","runOnce","originalCallback","parentNode","finalCallback","apply","one","createEvent","evt","initEvent","dispatchEvent","serialize","query","elements","disabled","tagName","after","insertAfter","append","content","appendTo","before","clone","empty","source","outerHTML","_this","sibling","nextSibling","_this2","removeChild","textContent","docEl","documentElement","position","left","offsetLeft","top","offsetTop","offset","rect","pageYOffset","clientTop","pageXOffset","clientLeft","offsetParent","closest","has","next","nextElementSibling","not","result","prev","previousElementSibling","siblings","factory","Component","classDef","Element","console","Error","ins","getInstance","destroy","$el","els","instances","jquery","NodeList","instancesArr","Package","jQueryLoaded","version","keys","TAB","ENTER","ESC","ARROW_UP","ARROW_DOWN","tabPressed","keyDown","which","initializeJqueryWrapper","plugin","pluginName","classRef","methodOrOptions","AutoInit","root","registry","Autocomplete","Carousel","Chips","Collapsible","Datepicker","Dropdown","Materialbox","Parallax","Pushpin","ScrollSpy","FormSelect","Sidenav","Tabs","TapTarget","Timepicker","Tooltip","FloatingActionButton","objectSelectorString","obj","guid","s4","floor","substring","escapeHash","elementOrParentIsFixed","element","$element","$","$checkElements","isFixed","checkWithinContainer","container","bounding","edges","right","bottom","containerRect","containerBottom","max","innerHeight","scrollLeft","scrollTop","scrolledX","scrolledY","width","innerWidth","height","checkPossibleAlignments","canAlign","spaceOnTop","spaceOnRight","spaceOnBottom","spaceOnLeft","containerAllowsOverflow","overflow","containerHeight","min","containerWidth","elOffsetRect","scrolledYTopEdge","scrolledYBottomEdge","getOverflowParent","parentElement","getIdFromTrigger","getDocumentScrollTop","getDocumentScrollLeft","getTime","throttle","func","wait","timeout","previous","later","leading","remaining","clearTimeout","trailing","setTimeout","$jscomp","scope","set","getGlobal","SYMBOL_PREFIX","initSymbol","symbolCounter_","initSymbolIterator","iterator","arrayIterator","iteratorPrototype","array","iteratorFromArray","String","u","polyfill","$jscomp$this","anime","a","h","col","b","f","k","reduce","concat","arr","HTMLCollection","some","C","D","z","und","T","exec","U","y","V","I","fnc","total","E","getPropertyValue","J","dom","W","svg","X","transform","K","L","F","sqrt","pow","x","points","numberOfItems","getItem","N","getTotalLength","PI","Y","getPointAtLength","atan2","O","pth","totalLength","rgb","hex","hsl","original","numbers","strings","P","Z","aa","duration","delay","ba","ca","A","Q","da","tweens","to","w","from","end","easing","elasticity","isPath","isColor","round","ea","animatable","R","fa","ga","S","targets","animatables","animations","q","Promise","g","reversed","ha","currentValue","H","currentTime","progress","G","seek","began","direction","pause","completed","reset","loop","paused","tick","speed","play","B","ia","restart","autoplay","update","begin","run","complete","SVGElement","Float32Array","abs","sin","asin","In","Out","InOut","linear","forEach","attribute","requestAnimationFrame","cancelAnimationFrame","running","setDashoffset","bezier","easings","timeline","anim","_defaults","accordion","onOpenStart","onOpenEnd","onCloseStart","onCloseEnd","inDuration","outDuration","_Component","_this3","M_Collapsible","defaults","$headers","_setupEventHandlers","$activeBodies","_removeEventHandlers","_this4","_handleCollapsibleClickBound","_handleCollapsibleClick","_handleCollapsibleKeydownBound","_handleCollapsibleKeydown","header","_this5","$header","$collapsible","$collapsibleLi","$collapsibleLis","isActive","close","keyCode","_this6","$body","display","paddingTop","paddingBottom","pTop","pBottom","finalHeight","scrollHeight","_this7","padding","_this8","_animateIn","_animateOut","alignment","autoFocus","constrainWidth","coverTrigger","closeOnClick","hover","onItemClick","_Component2","_this9","M_Dropdown","_dropdowns","dropdownEl","$dropdownEl","isOpen","isScrollable","isTouchMoving","focusedIndex","filterQuery","_makeDropdownFocusable","_resetFilterQueryBound","_resetFilterQuery","_handleDocumentClickBound","_handleDocumentClick","_handleDocumentTouchmoveBound","_handleDocumentTouchmove","_handleDropdownClickBound","_handleDropdownClick","_handleDropdownKeydownBound","_handleDropdownKeydown","_handleTriggerKeydownBound","_handleTriggerKeydown","_resetDropdownStyles","_handleMouseEnterBound","_handleMouseEnter","_handleMouseLeaveBound","_handleMouseLeave","_handleClickBound","_handleClick","toEl","toElement","relatedTarget","leaveToDropdownContent","leaveToActiveDropdownTrigger","$closestTrigger","_this10","$target","itemEl","focusedElement","$activatableElement","newFocusedIndex","foundNewIndex","tabIndex","_focusFocusedItem","fromCharCode","string","newOptionEl","filterTimeout","opacity","focus","triggerBRect","dropdownBRect","idealHeight","idealWidth","idealXPos","idealYPos","dropdownBounds","closestOverflowParent","alignments","verticalAlignment","horizontalAlignment","oppositeAlignment","_this11","scaleX","scaleY","_this12","positionInfo","_getDropdownPosition","transformOrigin","_placeDropdown","_setupTemporaryEventHandlers","_removeTemporaryEventHandlers","preventScrolling","dismissible","startingTop","endingTop","_Component3","_this13","M_Modal","_openingTrigger","$overlay","_nthModalOpened","_count","_handleOverlayClickBound","_handleOverlayClick","_handleModalCloseClickBound","_handleModalCloseClick","_handleTriggerClick","$trigger","modalId","modalInstance","_modalsOpen","_this14","enterAnimOptions","_this15","exitAnimOptions","zIndex","insertAdjacentElement","_handleKeydownBound","_handleKeydown","_handleFocusBound","_handleFocus","_Component4","_this16","M_Materialbox","overlayActive","doneAnimating","placeholder","originalWidth","originalHeight","originInlineStyles","caption","_handleMaterialboxClickBound","_handleMaterialboxClick","ancestorsChanged","ancestor","curr","_this17","animOptions","newHeight","newWidth","windowWidth","windowHeight","maxWidth","maxHeight","_this18","attrWidth","attrHeight","_this19","_updateVars","_makeAncestorsOverflowVisible","overlayOffset","$photocaption","$photoCaption","ratio","widthPercent","heightPercent","_animateImageIn","_handleWindowScrollBound","_handleWindowScroll","_handleWindowResizeBound","_handleWindowResize","_handleWindowEscapeBound","_handleWindowEscape","_this20","_animateImageOut","responsiveThreshold","_Component5","_this21","M_Parallax","_enabled","$img","_updateParallax","_setupStyles","_parallaxes","_handleImageLoadBound","_handleImageLoad","_handleScrollThrottled","_handleScroll","_handleWindowResizeThrottled","offsetHeight","parallaxDist","parallax","parallaxInstance","onShow","swipeable","Infinity","_Component6","_this22","M_Tabs","$tabLinks","_setupActiveTabLink","_setupSwipeableTabs","_setupNormalTabs","_setTabsAndTabWidth","_createIndicator","_indicator","_teardownSwipeableTabs","_teardownNormalTabs","_handleTabClickBound","_handleTabClick","tabWidth","tabsWidth","_calcLeftPos","$activeTabLink","_calcRightPos","_this23","tab","tabLink","$oldContent","$content","prevIndex","_tabsCarousel","_animateIndicator","_this24","indicator","_this25","$tabsContent","link","$currContent","$tabsWrapper","activeTabIndex","fullWidth","noWrap","onCycleTo","scrollWidth","ceil","leftDelay","rightDelay","tabId","exitDelay","enterDelay","margin","transitionMovement","_Component7","_this26","M_Tooltip","isHovered","isFocused","_appendTooltipEl","tooltipEl","tooltipContentEl","_handleBlurBound","_handleBlur","isManual","_getAttributeOptions","_updateTooltipContent","_setEnterDelayTimeout","_setExitDelayTimeout","_this27","_exitDelayTimeout","_this28","_enterDelayTimeout","newCoordinates","origin","originHeight","originWidth","offsetWidth","tooltipHeight","tooltipWidth","targetTop","targetLeft","xMovement","yMovement","_repositionWithinScreen","newX","newY","_positionTooltip","visibility","translateX","translateY","attributeOptions","tooltipTextOption","positionOption","Waves","$$","convertStyle","Effect","button","ripple","docElem","box","pos","ownerDocument","defaultView","getWindow","relativeY","pageY","relativeX","pageX","scale","clientWidth","touches","rippleStyle","TouchHandler","touchup","ripples","wrapInput","wrapper","elementStyle","replaceChild","allowEvent","allow","showEffect","srcElement","getWavesEffectElement","displayEffect","attach","displayLength","completeCallback","activationPercent","Toast","panning","timeRemaining","_toasts","_createContainer","toastElement","_createToast","M_Toast","_setTimer","toast","HTMLElement","nodeName","_container","_this29","counterInterval","setInterval","dismiss","_this30","clearInterval","activationDistance","wasSwiped","transition","marginTop","_removeContainer","_onDragStart","_onDragMove","_onDragEnd","_draggedToast","startingXPos","_xPos","time","xPos","deltaX","velocityX","totalDeltaX","targetTouches","clientX","toastIndex","edge","draggable","_Component8","_this31","M_Sidenav","isDragged","lastWindowWidth","lastWindowHeight","_createOverlay","_createDragTarget","_setupClasses","_setupFixed","_sidenavs","_enableBodyScrolling","_overlay","dragTarget","overlay","_closeBound","_handleDragTargetDragBound","_handleDragTargetDrag","_handleDragTargetReleaseBound","_handleDragTargetRelease","_handleCloseDragBound","_handleCloseDrag","_handleCloseReleaseBound","_handleCloseRelease","_handleCloseTriggerClickBound","_handleCloseTriggerClick","sidenavId","sidenavInstance","_startingXpos","_time","_width","_initialScrollTop","_verticallyScrolling","currentScrollTop","_isCurrentlyFixed","_startDrag","_dragMoveUpdate","dragDirection","transformX","transformPrefix","percentOpen","_preventBodyScrolling","_animateSidenavIn","_animateOverlayIn","_this32","slideOutPercent","_animateSidenavOut","_animateOverlayOut","_this33","endPercent","_this34","scrollOffset","activeClass","getActiveElement","_Component9","_this35","M_ScrollSpy","_elements","_increment","tickId","_elementsInView","_visibleElements","throttledResize","_handleThrottledResizeBound","scrollspy","_ticks","intersections","_findElements","_enter","_i","_scrollspy","_lastTick","_exit","unshift","_this36","hits","currTop","elTop","elLeft","elRight","elBottom","limit","onAutocomplete","minLength","sortFunction","inputString","_Component10","_this37","M_Autocomplete","count","activeIndex","oldVal","$inputField","$active","_mousedown","_setupDropdown","_removeDropdown","_handleInputBlurBound","_handleInputBlur","_handleInputKeyupAndFocusBound","_handleInputKeyupAndFocus","_handleInputKeydownBound","_handleInputKeydown","_handleInputClickBound","_handleInputClick","_handleContainerMousedownAndTouchstartBound","_handleContainerMousedownAndTouchstart","_handleContainerMouseupAndTouchendBound","_handleContainerMouseupAndTouchend","ontouchstart","_this38","dropdown","selectOption","_resetAutocomplete","_keydown","liElement","numItems","img","matchStart","matchEnd","beforeMatch","matchText","afterMatch","_resetCurrentElement","trim","_this39","matchingData","entry","sort","_entry","$autocompleteOption","_highlight","_renderDropdown","recalculateDimensions","autofocus","validity","badInput","validate_field","hasLength","lenAttr","textareaAutoResize","$textarea","hiddenDiv","fontFamily","fontSize","lineHeight","paddingRight","paddingLeft","input_selector","formReset","M_FormSelect","$inputElement","text_area_selector","path_input","file_names","indicators","interval","Slider","_Component11","_this40","M_Slider","$slider","$slides","_setSliderHeight","_animateCaptionIn","placeholderBase64","_setupIndicators","$indicators","_removeIndicators","_this41","_handleIntervalBound","_handleInterval","_handleIndicatorClickBound","_handleIndicatorClick","_this42","currIndex","newActiveIndex","_this43","$indicator","_this44","$caption","newIndex","$card","$cardReveal","secondaryPlaceholder","autocompleteOptions","onChipAdd","onChipSelect","onChipDelete","_Component12","_this45","M_Chips","chipsData","$chips","_setupInput","hasAutocomplete","$input","_renderChips","_setupAutocomplete","_setPlaceholder","_setupLabel","_handleChipClickBound","_handleChipClick","_handleInputFocusBound","_handleInputFocus","_handleChipsKeydown","_handleChipsKeyup","_handleChipsBlur","$chip","clickedClose","deleteChip","selectChip","autocomplete","addChip","tag","chip","renderedChip","closeIcon","image","firstChild","chipEl","_renderChip","_this46","$label","exists","_isValid","chipIndex","_selectedChip","chipsKeydown","currChips","selectIndex","_selectIndex","_selectIndex2","onPositionChange","_Component13","_this47","M_Pushpin","originalOffset","_pushpins","_updatePosition","_removePinClasses","_updateElements","scrolled","elIndex","hoverEnabled","toolbarEnabled","_Component14","_this48","M_FloatingActionButton","$anchor","$menu","$floatingBtns","$floatingBtnsReverse","offsetY","offsetX","_handleFABClickBound","_handleFABClick","_handleOpenBound","_handleCloseBound","_animateInToolbar","_animateInFAB","_animateOutToolbar","_animateOutFAB","_this49","_this50","scaleFactor","_this51","btnRect","backdrop","fabColor","btnBottom","btnLeft","btnWidth","_this52","autoClose","format","parse","defaultDate","setDefaultDate","disableWeekends","disableDayFn","firstDay","minDate","maxDate","yearRange","minYear","maxYear","minMonth","maxMonth","startRange","endRange","isRTL","showMonthAfterYear","showDaysInNextAndPreviousMonths","showClearBtn","i18n","clear","previousMonth","nextMonth","months","monthsShort","weekdays","weekdaysShort","weekdaysAbbrev","onSelect","onOpen","onClose","onDraw","_Component15","_this53","M_Datepicker","setHours","_setupVariables","_insertHTMLIntoDOM","_setupModal","defDate","_isDate","setDate","setInputValue","gotoDate","modal","modalEl","destroySelects","oldYearSelect","calendarEl","oldMonthSelect","clearBtn","doneBtn","cancelBtn","$modalEl","_this54","_this55","date","label","formats","preventOnSelect","_renderDateDisplay","_setToStartOfDay","firedBy","displayDate","day","getDay","month","getMonth","getDate","yearTextEl","getFullYear","dateTextEl","newCalendar","calendars","firstVisibleDate","year","lastVisibleDate","visibleDate","setMonth","adjustCalendars","adjustCalendar","calendar","randId","opts","days","_getDaysInMonth","yearOfPreviousMonth","yearOfNextMonth","daysInPreviousMonth","cells","isWeekSelected","isSelected","_compareDates","isToday","hasEvent","toDateString","isEmpty","dayNumber","monthNumber","yearNumber","isStartRange","isEndRange","isInRange","dayConfig","isDisabled","_isWeekend","renderDay","renderRow","renderTable","ariaSelected","isRowSelected","renderHead","renderBody","renderDayName","rows","refYear","monthHtml","yearHtml","isMinYear","isMaxYear","force","_y","_m","renderTitle","render","yearSelect","monthSelect","dropdownOptions","_handleYearChange","_handleMonthChange","_handleInputChangeBound","_handleInputChange","_handleCalendarClickBound","_handleCalendarClick","_finishSelectionBound","_finishSelection","_handleClearClickBound","_handleClearClick","_this56","_template","dd","ddd","dddd","mm","mmm","mmmm","yy","yyyy","prevMonth","gotoMonth","gotoYear","abbr","_isLeapYear","dialRadius","outerRadius","innerRadius","tickRadius","defaultTime","fromNow","twelveHour","vibrate","_Component16","_this57","M_Timepicker","_clockSetup","_pickerSetup","_handleClockClickStartBound","_handleClockClickStart","_handleDocumentClickMoveBound","_handleDocumentClickMove","_handleDocumentClickEndBound","_handleDocumentClickEnd","plate","spanHours","showView","spanMinutes","clockPlateBR","x0","y0","moved","clickPos","_Pos","dx","dy","setHand","_this58","currentView","minutesView","hours","minutes","containerEl","_this59","navigator","webkitVibrate","_canvas","hoursView","spanAmPm","footer","amOrPm","$clearBtn","confirmationBtnsContainer","$amBtn","$pmBtn","_handleAmPmClick","_buildHoursView","_buildMinutesView","_buildSVGClock","diameter","_createSVGEl","bearing","hand","bg","$tick","radian","radius","cos","_i2","_tick","_radian","_radius","_addLeadingZero","$btnClicked","_updateAmPmView","getHours","getMinutes","view","isHours","nextView","hideView","resetClock","toggleViewTimer","canvas","roundBy5","_this60","unit","inner","vibrateTimer","cx1","cy1","cx2","cy2","_updateTimeFromInput","clearValue","num","createElementNS","clientY","CharacterCounter","_Component17","_this61","M_CharacterCounter","isInvalid","isValidLength","_setupCounter","_removeCounter","_handleUpdateCounterBound","updateCounter","counterEl","float","maxLength","actualLength","counterString","_validateInput","dist","shift","numVisible","_Component18","_this62","M_Carousel","hasMultipleSlides","showIndicators","pressed","dragged","images","itemWidth","itemHeight","dim","_autoScrollBound","_autoScroll","_trackBound","_track","_setCarouselHeight","xform","every","prefix","_scroll","_this63","_handleCarouselTapBound","_handleCarouselTap","_handleCarouselDragBound","_handleCarouselDrag","_handleCarouselReleaseBound","_handleCarouselRelease","_handleCarouselClickBound","_handleCarouselClick","_handleResize","_this64","verticalDragged","reference","_xpos","referenceY","_ypos","velocity","amplitude","frame","timestamp","ticker","delta","stopPropagation","clickedIndex","_wrap","center","_cycleTo","imageHeight","imageOnly","_this65","firstSlide","firstImage","naturalWidth","naturalHeight","adjustedHeight","slideHeight","elapsed","exp","_this66","scrollingTimeout","half","dir","tween","zTranslation","tweenedOpacity","centerTweenedOpacity","lastCenter","numVisibleOffset","clientHeight","diff","activeIndicator","transformString","_updateItemStyle","_transformString","_transformString2","_transformString3","$currItem","oneTimeCallback","_Component19","_this67","M_TapTarget","$origin","_setup","_calculatePositioning","_handleTargetClickBound","_handleTargetClick","_handleOriginClickBound","_handleOriginClick","originEl","waveEl","contentEl","outerWidth","outerHeight","originTop","originLeft","centerX","centerY","isLeft","isRight","isTop","isBottom","isCenterX","tapTargetWidth","tapTargetHeight","tapTargetTop","tapTargetLeft","tapTargetPosition","tapTargetTextWidth","tapTargetTextHeight","tapTargetTextTop","tapTargetTextLeft","tapTargetTextPadding","tapTargetTextAlign","tapTargetWaveWidth","tapTargetWaveHeight","tapTargetWaveTop","tapTargetWaveLeft","tapTargetWrapperCssObj","tapTargetTextRight","tapTargetTextBottom","verticalAlign","_Component20","_this68","isMultiple","_keysSelected","_valueDict","_this69","_handleSelectChangeBound","_handleSelectChange","_handleOptionClickBound","_handleOptionClick","input","_this70","_setValueToInput","option","placeholderOption","_toggleEntryFromArray","_setSelectedStates","_this71","$selectOptions","optionEl","_appendOptionWithIcon","_addOptionToValueDict","selectOptions","dropdownIcon","selectedOption","disabledClass","optgroupClass","multipleCheckbox","liEl","spanEl","iconUrl","imgEl","notAdded","$optionLi","firstDisabled","optionIsSelected","_activateOption","newOption","selectedValues","Range","_Component21","_this72","M_Range","_setupThumb","_removeThumb","_handleRangeChangeBound","_handleRangeChange","_handleRangeMousedownTouchstartBound","_handleRangeMousedownTouchstart","_handleRangeInputMousemoveTouchmoveBound","_handleRangeInputMousemoveTouchmove","_handleRangeMouseupTouchendBound","_handleRangeMouseupTouchend","_handleRangeBlurMouseoutTouchleaveBound","_handleRangeBlurMouseoutTouchleave","thumb","_showRangeBubble","_calcRangeOffset","marginLeft","_xcloner_admin__WEBPACK_IMPORTED_MODULE_0__","Xcloner_Restore","steps","ajaxurl","upload_file_event","Event","detail","original_value","set_current_step","class","get_remote_backup_files_callback","CustomEvent","get_remote_backup_files","local_backup_file","get_remote_mysqldump_files_callback","get_remote_mysqldump_files","get_backup_file","remote_restore_backup_file_callback","processed","extracted_files","remote_restore_backup_file","filter_files","remote_restore_mysql_backup_file_callback","remote_restore_mysql_backup_file","mysqldump_file","restore_finish_callback","restore_finish","backup_archive","delete_backup_temporary_folder","delete_restore_script","update_remote_site_url","delete_backup_archive","upload_backup_file","upload_backup_file_callback","total_parts","uploaded_size","part_text","open_target_site","next_step","inc","xcloner_action","XCLONER_WPNONCE","_wpnonce","request","crossDomain","xcloner_auth_key","xcloner_restore","remote_database_file","edit_schedule_modal_instance","xcloner_scheduler","edit_modal","get_schedule_by_id","create_modal","delete_schedule_by_id","email_notification","diff_start_date","recurrence","backup_type","start_at","backup_encrypt","backup_delete_after_remote_transfer","tables","parseJSON","tables_list","db","excluded_files","exclude_files_list","save_schedule","form","IsJsonString","DataTable","responsive","bFilter","order","buttons","language","emptyTable","selectAll","selectNone","columnDefs","orderable","fnDrawCallback","oSettings","confirm","pickatime","default","twelvehour","donetext","autoclose","pickadate","selectMonths","selectYears","onSet"],"mappings":";;;;;;CACS,SAAUA,GAET,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAJ,EAAQG,GAAUK,KAAKH,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBO,EAAIT,EAGxBE,EAAoBQ,EAAIT,EAGxBC,EAAoBS,EAAI,SAASP,EAASQ,EAAMC,GAC3CX,EAAoBY,EAAEV,EAASQ,IAClCG,OAAOC,eAAeZ,EAASQ,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEX,EAAoBiB,EAAI,SAASf,GACX,oBAAXgB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeZ,EAASgB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeZ,EAAS,aAAc,CAAEkB,OAAO,KAQvDpB,EAAoBqB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQpB,EAAoBoB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFAzB,EAAoBiB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EAAOpB,EAAoBS,EAAEe,EAAIE,EAAK,SAASA,GAAO,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ClC,EAAkBI,sBAC3BryD,EACAT,KACA+C,MAKRpD,OAAO,uBAAuBO,MAAK,WACjC9C,OAAOqyD,EAAyD,YAAhEryD,CAAmEuC,OAAOK,UAE5EL,OAAO,uBAAuBI,OAAM,WAClCJ,OAAOK,MAAMC,YAAY,QACzB7C,OAAOqyD,EAAyD,YAAhEryD,CAAmEuC,OAAOK,aAKhFL,OAAO,kBAAkBQ,GAAG,UAAU,WAGpC,OAFAuyD,EAAkBkB,cAAcj0D,OAAOK,MAAO+C,IAEvC,KAMsC,mBAApCpD,OAAO,eAAek1D,WAC/Bl1D,OAAO,eAAek1D,UAAU,CAC9BC,QAAS,MACTl1C,IAAK,CAAC,EAAG,IACTm1C,YAAY,EACZC,SAAU,KACVC,WAAW,EACXrX,SAAS,IAIkC,mBAApCj+C,OAAO,eAAeu1D,YACjBv1D,OAAO,eAAeu1D,UAAU,CAC5CvhB,OAAQ,cACRwhB,cAAc,EACdC,YAAa,GACbx1C,IAAK,GACLy1C,MAAO,eAKa11D,OAAO,yBAAyBu1D,UAAU,CAC9DvhB,OAAQ,aACRwhB,cAAc,EACdC,YAAa,GACb12C,IAAK,GACL22C,MAAO","file":"./admin/js/index.min.js","sourceRoot":""}
admin/js/materialize.min.js DELETED
@@ -1,12374 +0,0 @@
1
- /*!
2
- * Materialize v1.0.0 (http://materializecss.com)
3
- * Copyright 2014-2017 Materialize
4
- * MIT License (https://raw.githubusercontent.com/Dogfalo/materialize/master/LICENSE)
5
- */
6
- var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
7
-
8
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
9
-
10
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
11
-
12
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
13
-
14
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
15
-
16
- /*! cash-dom 1.3.5, https://github.com/kenwheeler/cash @license MIT */
17
- (function (factory) {
18
- window.cash = factory();
19
- })(function () {
20
- var doc = document,
21
- win = window,
22
- ArrayProto = Array.prototype,
23
- slice = ArrayProto.slice,
24
- filter = ArrayProto.filter,
25
- push = ArrayProto.push;
26
-
27
- var noop = function () {},
28
- isFunction = function (item) {
29
- // @see https://crbug.com/568448
30
- return typeof item === typeof noop && item.call;
31
- },
32
- isString = function (item) {
33
- return typeof item === typeof "";
34
- };
35
-
36
- var idMatch = /^#[\w-]*$/,
37
- classMatch = /^\.[\w-]*$/,
38
- htmlMatch = /<.+>/,
39
- singlet = /^\w+$/;
40
-
41
- function find(selector, context) {
42
- context = context || doc;
43
- var elems = classMatch.test(selector) ? context.getElementsByClassName(selector.slice(1)) : singlet.test(selector) ? context.getElementsByTagName(selector) : context.querySelectorAll(selector);
44
- return elems;
45
- }
46
-
47
- var frag;
48
- function parseHTML(str) {
49
- if (!frag) {
50
- frag = doc.implementation.createHTMLDocument(null);
51
- var base = frag.createElement("base");
52
- base.href = doc.location.href;
53
- frag.head.appendChild(base);
54
- }
55
-
56
- frag.body.innerHTML = str;
57
-
58
- return frag.body.childNodes;
59
- }
60
-
61
- function onReady(fn) {
62
- if (doc.readyState !== "loading") {
63
- fn();
64
- } else {
65
- doc.addEventListener("DOMContentLoaded", fn);
66
- }
67
- }
68
-
69
- function Init(selector, context) {
70
- if (!selector) {
71
- return this;
72
- }
73
-
74
- // If already a cash collection, don't do any further processing
75
- if (selector.cash && selector !== win) {
76
- return selector;
77
- }
78
-
79
- var elems = selector,
80
- i = 0,
81
- length;
82
-
83
- if (isString(selector)) {
84
- elems = idMatch.test(selector) ?
85
- // If an ID use the faster getElementById check
86
- doc.getElementById(selector.slice(1)) : htmlMatch.test(selector) ?
87
- // If HTML, parse it into real elements
88
- parseHTML(selector) :
89
- // else use `find`
90
- find(selector, context);
91
-
92
- // If function, use as shortcut for DOM ready
93
- } else if (isFunction(selector)) {
94
- onReady(selector);return this;
95
- }
96
-
97
- if (!elems) {
98
- return this;
99
- }
100
-
101
- // If a single DOM element is passed in or received via ID, return the single element
102
- if (elems.nodeType || elems === win) {
103
- this[0] = elems;
104
- this.length = 1;
105
- } else {
106
- // Treat like an array and loop through each item.
107
- length = this.length = elems.length;
108
- for (; i < length; i++) {
109
- this[i] = elems[i];
110
- }
111
- }
112
-
113
- return this;
114
- }
115
-
116
- function cash(selector, context) {
117
- return new Init(selector, context);
118
- }
119
-
120
- var fn = cash.fn = cash.prototype = Init.prototype = { // jshint ignore:line
121
- cash: true,
122
- length: 0,
123
- push: push,
124
- splice: ArrayProto.splice,
125
- map: ArrayProto.map,
126
- init: Init
127
- };
128
-
129
- Object.defineProperty(fn, "constructor", { value: cash });
130
-
131
- cash.parseHTML = parseHTML;
132
- cash.noop = noop;
133
- cash.isFunction = isFunction;
134
- cash.isString = isString;
135
-
136
- cash.extend = fn.extend = function (target) {
137
- target = target || {};
138
-
139
- var args = slice.call(arguments),
140
- length = args.length,
141
- i = 1;
142
-
143
- if (args.length === 1) {
144
- target = this;
145
- i = 0;
146
- }
147
-
148
- for (; i < length; i++) {
149
- if (!args[i]) {
150
- continue;
151
- }
152
- for (var key in args[i]) {
153
- if (args[i].hasOwnProperty(key)) {
154
- target[key] = args[i][key];
155
- }
156
- }
157
- }
158
-
159
- return target;
160
- };
161
-
162
- function each(collection, callback) {
163
- var l = collection.length,
164
- i = 0;
165
-
166
- for (; i < l; i++) {
167
- if (callback.call(collection[i], collection[i], i, collection) === false) {
168
- break;
169
- }
170
- }
171
- }
172
-
173
- function matches(el, selector) {
174
- var m = el && (el.matches || el.webkitMatchesSelector || el.mozMatchesSelector || el.msMatchesSelector || el.oMatchesSelector);
175
- return !!m && m.call(el, selector);
176
- }
177
-
178
- function getCompareFunction(selector) {
179
- return (
180
- /* Use browser's `matches` function if string */
181
- isString(selector) ? matches :
182
- /* Match a cash element */
183
- selector.cash ? function (el) {
184
- return selector.is(el);
185
- } :
186
- /* Direct comparison */
187
- function (el, selector) {
188
- return el === selector;
189
- }
190
- );
191
- }
192
-
193
- function unique(collection) {
194
- return cash(slice.call(collection).filter(function (item, index, self) {
195
- return self.indexOf(item) === index;
196
- }));
197
- }
198
-
199
- cash.extend({
200
- merge: function (first, second) {
201
- var len = +second.length,
202
- i = first.length,
203
- j = 0;
204
-
205
- for (; j < len; i++, j++) {
206
- first[i] = second[j];
207
- }
208
-
209
- first.length = i;
210
- return first;
211
- },
212
-
213
- each: each,
214
- matches: matches,
215
- unique: unique,
216
- isArray: Array.isArray,
217
- isNumeric: function (n) {
218
- return !isNaN(parseFloat(n)) && isFinite(n);
219
- }
220
-
221
- });
222
-
223
- var uid = cash.uid = "_cash" + Date.now();
224
-
225
- function getDataCache(node) {
226
- return node[uid] = node[uid] || {};
227
- }
228
-
229
- function setData(node, key, value) {
230
- return getDataCache(node)[key] = value;
231
- }
232
-
233
- function getData(node, key) {
234
- var c = getDataCache(node);
235
- if (c[key] === undefined) {
236
- c[key] = node.dataset ? node.dataset[key] : cash(node).attr("data-" + key);
237
- }
238
- return c[key];
239
- }
240
-
241
- function removeData(node, key) {
242
- var c = getDataCache(node);
243
- if (c) {
244
- delete c[key];
245
- } else if (node.dataset) {
246
- delete node.dataset[key];
247
- } else {
248
- cash(node).removeAttr("data-" + name);
249
- }
250
- }
251
-
252
- fn.extend({
253
- data: function (name, value) {
254
- if (isString(name)) {
255
- return value === undefined ? getData(this[0], name) : this.each(function (v) {
256
- return setData(v, name, value);
257
- });
258
- }
259
-
260
- for (var key in name) {
261
- this.data(key, name[key]);
262
- }
263
-
264
- return this;
265
- },
266
-
267
- removeData: function (key) {
268
- return this.each(function (v) {
269
- return removeData(v, key);
270
- });
271
- }
272
-
273
- });
274
-
275
- var notWhiteMatch = /\S+/g;
276
-
277
- function getClasses(c) {
278
- return isString(c) && c.match(notWhiteMatch);
279
- }
280
-
281
- function hasClass(v, c) {
282
- return v.classList ? v.classList.contains(c) : new RegExp("(^| )" + c + "( |$)", "gi").test(v.className);
283
- }
284
-
285
- function addClass(v, c, spacedName) {
286
- if (v.classList) {
287
- v.classList.add(c);
288
- } else if (spacedName.indexOf(" " + c + " ")) {
289
- v.className += " " + c;
290
- }
291
- }
292
-
293
- function removeClass(v, c) {
294
- if (v.classList) {
295
- v.classList.remove(c);
296
- } else {
297
- v.className = v.className.replace(c, "");
298
- }
299
- }
300
-
301
- fn.extend({
302
- addClass: function (c) {
303
- var classes = getClasses(c);
304
-
305
- return classes ? this.each(function (v) {
306
- var spacedName = " " + v.className + " ";
307
- each(classes, function (c) {
308
- addClass(v, c, spacedName);
309
- });
310
- }) : this;
311
- },
312
-
313
- attr: function (name, value) {
314
- if (!name) {
315
- return undefined;
316
- }
317
-
318
- if (isString(name)) {
319
- if (value === undefined) {
320
- return this[0] ? this[0].getAttribute ? this[0].getAttribute(name) : this[0][name] : undefined;
321
- }
322
-
323
- return this.each(function (v) {
324
- if (v.setAttribute) {
325
- v.setAttribute(name, value);
326
- } else {
327
- v[name] = value;
328
- }
329
- });
330
- }
331
-
332
- for (var key in name) {
333
- this.attr(key, name[key]);
334
- }
335
-
336
- return this;
337
- },
338
-
339
- hasClass: function (c) {
340
- var check = false,
341
- classes = getClasses(c);
342
- if (classes && classes.length) {
343
- this.each(function (v) {
344
- check = hasClass(v, classes[0]);
345
- return !check;
346
- });
347
- }
348
- return check;
349
- },
350
-
351
- prop: function (name, value) {
352
- if (isString(name)) {
353
- return value === undefined ? this[0][name] : this.each(function (v) {
354
- v[name] = value;
355
- });
356
- }
357
-
358
- for (var key in name) {
359
- this.prop(key, name[key]);
360
- }
361
-
362
- return this;
363
- },
364
-
365
- removeAttr: function (name) {
366
- return this.each(function (v) {
367
- if (v.removeAttribute) {
368
- v.removeAttribute(name);
369
- } else {
370
- delete v[name];
371
- }
372
- });
373
- },
374
-
375
- removeClass: function (c) {
376
- if (!arguments.length) {
377
- return this.attr("class", "");
378
- }
379
- var classes = getClasses(c);
380
- return classes ? this.each(function (v) {
381
- each(classes, function (c) {
382
- removeClass(v, c);
383
- });
384
- }) : this;
385
- },
386
-
387
- removeProp: function (name) {
388
- return this.each(function (v) {
389
- delete v[name];
390
- });
391
- },
392
-
393
- toggleClass: function (c, state) {
394
- if (state !== undefined) {
395
- return this[state ? "addClass" : "removeClass"](c);
396
- }
397
- var classes = getClasses(c);
398
- return classes ? this.each(function (v) {
399
- var spacedName = " " + v.className + " ";
400
- each(classes, function (c) {
401
- if (hasClass(v, c)) {
402
- removeClass(v, c);
403
- } else {
404
- addClass(v, c, spacedName);
405
- }
406
- });
407
- }) : this;
408
- } });
409
-
410
- fn.extend({
411
- add: function (selector, context) {
412
- return unique(cash.merge(this, cash(selector, context)));
413
- },
414
-
415
- each: function (callback) {
416
- each(this, callback);
417
- return this;
418
- },
419
-
420
- eq: function (index) {
421
- return cash(this.get(index));
422
- },
423
-
424
- filter: function (selector) {
425
- if (!selector) {
426
- return this;
427
- }
428
-
429
- var comparator = isFunction(selector) ? selector : getCompareFunction(selector);
430
-
431
- return cash(filter.call(this, function (e) {
432
- return comparator(e, selector);
433
- }));
434
- },
435
-
436
- first: function () {
437
- return this.eq(0);
438
- },
439
-
440
- get: function (index) {
441
- if (index === undefined) {
442
- return slice.call(this);
443
- }
444
- return index < 0 ? this[index + this.length] : this[index];
445
- },
446
-
447
- index: function (elem) {
448
- var child = elem ? cash(elem)[0] : this[0],
449
- collection = elem ? this : cash(child).parent().children();
450
- return slice.call(collection).indexOf(child);
451
- },
452
-
453
- last: function () {
454
- return this.eq(-1);
455
- }
456
-
457
- });
458
-
459
- var camelCase = function () {
460
- var camelRegex = /(?:^\w|[A-Z]|\b\w)/g,
461
- whiteSpace = /[\s-_]+/g;
462
- return function (str) {
463
- return str.replace(camelRegex, function (letter, index) {
464
- return letter[index === 0 ? "toLowerCase" : "toUpperCase"]();
465
- }).replace(whiteSpace, "");
466
- };
467
- }();
468
-
469
- var getPrefixedProp = function () {
470
- var cache = {},
471
- doc = document,
472
- div = doc.createElement("div"),
473
- style = div.style;
474
-
475
- return function (prop) {
476
- prop = camelCase(prop);
477
- if (cache[prop]) {
478
- return cache[prop];
479
- }
480
-
481
- var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1),
482
- prefixes = ["webkit", "moz", "ms", "o"],
483
- props = (prop + " " + prefixes.join(ucProp + " ") + ucProp).split(" ");
484
-
485
- each(props, function (p) {
486
- if (p in style) {
487
- cache[p] = prop = cache[prop] = p;
488
- return false;
489
- }
490
- });
491
-
492
- return cache[prop];
493
- };
494
- }();
495
-
496
- cash.prefixedProp = getPrefixedProp;
497
- cash.camelCase = camelCase;
498
-
499
- fn.extend({
500
- css: function (prop, value) {
501
- if (isString(prop)) {
502
- prop = getPrefixedProp(prop);
503
- return arguments.length > 1 ? this.each(function (v) {
504
- return v.style[prop] = value;
505
- }) : win.getComputedStyle(this[0])[prop];
506
- }
507
-
508
- for (var key in prop) {
509
- this.css(key, prop[key]);
510
- }
511
-
512
- return this;
513
- }
514
-
515
- });
516
-
517
- function compute(el, prop) {
518
- return parseInt(win.getComputedStyle(el[0], null)[prop], 10) || 0;
519
- }
520
-
521
- each(["Width", "Height"], function (v) {
522
- var lower = v.toLowerCase();
523
-
524
- fn[lower] = function () {
525
- return this[0].getBoundingClientRect()[lower];
526
- };
527
-
528
- fn["inner" + v] = function () {
529
- return this[0]["client" + v];
530
- };
531
-
532
- fn["outer" + v] = function (margins) {
533
- return this[0]["offset" + v] + (margins ? compute(this, "margin" + (v === "Width" ? "Left" : "Top")) + compute(this, "margin" + (v === "Width" ? "Right" : "Bottom")) : 0);
534
- };
535
- });
536
-
537
- function registerEvent(node, eventName, callback) {
538
- var eventCache = getData(node, "_cashEvents") || setData(node, "_cashEvents", {});
539
- eventCache[eventName] = eventCache[eventName] || [];
540
- eventCache[eventName].push(callback);
541
- node.addEventListener(eventName, callback);
542
- }
543
-
544
- function removeEvent(node, eventName, callback) {
545
- var events = getData(node, "_cashEvents"),
546
- eventCache = events && events[eventName],
547
- index;
548
-
549
- if (!eventCache) {
550
- return;
551
- }
552
-
553
- if (callback) {
554
- node.removeEventListener(eventName, callback);
555
- index = eventCache.indexOf(callback);
556
- if (index >= 0) {
557
- eventCache.splice(index, 1);
558
- }
559
- } else {
560
- each(eventCache, function (event) {
561
- node.removeEventListener(eventName, event);
562
- });
563
- eventCache = [];
564
- }
565
- }
566
-
567
- fn.extend({
568
- off: function (eventName, callback) {
569
- return this.each(function (v) {
570
- return removeEvent(v, eventName, callback);
571
- });
572
- },
573
-
574
- on: function (eventName, delegate, callback, runOnce) {
575
- // jshint ignore:line
576
- var originalCallback;
577
- if (!isString(eventName)) {
578
- for (var key in eventName) {
579
- this.on(key, delegate, eventName[key]);
580
- }
581
- return this;
582
- }
583
-
584
- if (isFunction(delegate)) {
585
- callback = delegate;
586
- delegate = null;
587
- }
588
-
589
- if (eventName === "ready") {
590
- onReady(callback);
591
- return this;
592
- }
593
-
594
- if (delegate) {
595
- originalCallback = callback;
596
- callback = function (e) {
597
- var t = e.target;
598
- while (!matches(t, delegate)) {
599
- if (t === this || t === null) {
600
- return t = false;
601
- }
602
-
603
- t = t.parentNode;
604
- }
605
-
606
- if (t) {
607
- originalCallback.call(t, e);
608
- }
609
- };
610
- }
611
-
612
- return this.each(function (v) {
613
- var finalCallback = callback;
614
- if (runOnce) {
615
- finalCallback = function () {
616
- callback.apply(this, arguments);
617
- removeEvent(v, eventName, finalCallback);
618
- };
619
- }
620
- registerEvent(v, eventName, finalCallback);
621
- });
622
- },
623
-
624
- one: function (eventName, delegate, callback) {
625
- return this.on(eventName, delegate, callback, true);
626
- },
627
-
628
- ready: onReady,
629
-
630
- /**
631
- * Modified
632
- * Triggers browser event
633
- * @param String eventName
634
- * @param Object data - Add properties to event object
635
- */
636
- trigger: function (eventName, data) {
637
- if (document.createEvent) {
638
- var evt = document.createEvent('HTMLEvents');
639
- evt.initEvent(eventName, true, false);
640
- evt = this.extend(evt, data);
641
- return this.each(function (v) {
642
- return v.dispatchEvent(evt);
643
- });
644
- }
645
- }
646
-
647
- });
648
-
649
- function encode(name, value) {
650
- return "&" + encodeURIComponent(name) + "=" + encodeURIComponent(value).replace(/%20/g, "+");
651
- }
652
-
653
- function getSelectMultiple_(el) {
654
- var values = [];
655
- each(el.options, function (o) {
656
- if (o.selected) {
657
- values.push(o.value);
658
- }
659
- });
660
- return values.length ? values : null;
661
- }
662
-
663
- function getSelectSingle_(el) {
664
- var selectedIndex = el.selectedIndex;
665
- return selectedIndex >= 0 ? el.options[selectedIndex].value : null;
666
- }
667
-
668
- function getValue(el) {
669
- var type = el.type;
670
- if (!type) {
671
- return null;
672
- }
673
- switch (type.toLowerCase()) {
674
- case "select-one":
675
- return getSelectSingle_(el);
676
- case "select-multiple":
677
- return getSelectMultiple_(el);
678
- case "radio":
679
- return el.checked ? el.value : null;
680
- case "checkbox":
681
- return el.checked ? el.value : null;
682
- default:
683
- return el.value ? el.value : null;
684
- }
685
- }
686
-
687
- fn.extend({
688
- serialize: function () {
689
- var query = "";
690
-
691
- each(this[0].elements || this, function (el) {
692
- if (el.disabled || el.tagName === "FIELDSET") {
693
- return;
694
- }
695
- var name = el.name;
696
- switch (el.type.toLowerCase()) {
697
- case "file":
698
- case "reset":
699
- case "submit":
700
- case "button":
701
- break;
702
- case "select-multiple":
703
- var values = getValue(el);
704
- if (values !== null) {
705
- each(values, function (value) {
706
- query += encode(name, value);
707
- });
708
- }
709
- break;
710
- default:
711
- var value = getValue(el);
712
- if (value !== null) {
713
- query += encode(name, value);
714
- }
715
- }
716
- });
717
-
718
- return query.substr(1);
719
- },
720
-
721
- val: function (value) {
722
- if (value === undefined) {
723
- return getValue(this[0]);
724
- }
725
-
726
- return this.each(function (v) {
727
- return v.value = value;
728
- });
729
- }
730
-
731
- });
732
-
733
- function insertElement(el, child, prepend) {
734
- if (prepend) {
735
- var first = el.childNodes[0];
736
- el.insertBefore(child, first);
737
- } else {
738
- el.appendChild(child);
739
- }
740
- }
741
-
742
- function insertContent(parent, child, prepend) {
743
- var str = isString(child);
744
-
745
- if (!str && child.length) {
746
- each(child, function (v) {
747
- return insertContent(parent, v, prepend);
748
- });
749
- return;
750
- }
751
-
752
- each(parent, str ? function (v) {
753
- return v.insertAdjacentHTML(prepend ? "afterbegin" : "beforeend", child);
754
- } : function (v, i) {
755
- return insertElement(v, i === 0 ? child : child.cloneNode(true), prepend);
756
- });
757
- }
758
-
759
- fn.extend({
760
- after: function (selector) {
761
- cash(selector).insertAfter(this);
762
- return this;
763
- },
764
-
765
- append: function (content) {
766
- insertContent(this, content);
767
- return this;
768
- },
769
-
770
- appendTo: function (parent) {
771
- insertContent(cash(parent), this);
772
- return this;
773
- },
774
-
775
- before: function (selector) {
776
- cash(selector).insertBefore(this);
777
- return this;
778
- },
779
-
780
- clone: function () {
781
- return cash(this.map(function (v) {
782
- return v.cloneNode(true);
783
- }));
784
- },
785
-
786
- empty: function () {
787
- this.html("");
788
- return this;
789
- },
790
-
791
- html: function (content) {
792
- if (content === undefined) {
793
- return this[0].innerHTML;
794
- }
795
- var source = content.nodeType ? content[0].outerHTML : content;
796
- return this.each(function (v) {
797
- return v.innerHTML = source;
798
- });
799
- },
800
-
801
- insertAfter: function (selector) {
802
- var _this = this;
803
-
804
- cash(selector).each(function (el, i) {
805
- var parent = el.parentNode,
806
- sibling = el.nextSibling;
807
- _this.each(function (v) {
808
- parent.insertBefore(i === 0 ? v : v.cloneNode(true), sibling);
809
- });
810
- });
811
-
812
- return this;
813
- },
814
-
815
- insertBefore: function (selector) {
816
- var _this2 = this;
817
- cash(selector).each(function (el, i) {
818
- var parent = el.parentNode;
819
- _this2.each(function (v) {
820
- parent.insertBefore(i === 0 ? v : v.cloneNode(true), el);
821
- });
822
- });
823
- return this;
824
- },
825
-
826
- prepend: function (content) {
827
- insertContent(this, content, true);
828
- return this;
829
- },
830
-
831
- prependTo: function (parent) {
832
- insertContent(cash(parent), this, true);
833
- return this;
834
- },
835
-
836
- remove: function () {
837
- return this.each(function (v) {
838
- if (!!v.parentNode) {
839
- return v.parentNode.removeChild(v);
840
- }
841
- });
842
- },
843
-
844
- text: function (content) {
845
- if (content === undefined) {
846
- return this[0].textContent;
847
- }
848
- return this.each(function (v) {
849
- return v.textContent = content;
850
- });
851
- }
852
-
853
- });
854
-
855
- var docEl = doc.documentElement;
856
-
857
- fn.extend({
858
- position: function () {
859
- var el = this[0];
860
- return {
861
- left: el.offsetLeft,
862
- top: el.offsetTop
863
- };
864
- },
865
-
866
- offset: function () {
867
- var rect = this[0].getBoundingClientRect();
868
- return {
869
- top: rect.top + win.pageYOffset - docEl.clientTop,
870
- left: rect.left + win.pageXOffset - docEl.clientLeft
871
- };
872
- },
873
-
874
- offsetParent: function () {
875
- return cash(this[0].offsetParent);
876
- }
877
-
878
- });
879
-
880
- fn.extend({
881
- children: function (selector) {
882
- var elems = [];
883
- this.each(function (el) {
884
- push.apply(elems, el.children);
885
- });
886
- elems = unique(elems);
887
-
888
- return !selector ? elems : elems.filter(function (v) {
889
- return matches(v, selector);
890
- });
891
- },
892
-
893
- closest: function (selector) {
894
- if (!selector || this.length < 1) {
895
- return cash();
896
- }
897
- if (this.is(selector)) {
898
- return this.filter(selector);
899
- }
900
- return this.parent().closest(selector);
901
- },
902
-
903
- is: function (selector) {
904
- if (!selector) {
905
- return false;
906
- }
907
-
908
- var match = false,
909
- comparator = getCompareFunction(selector);
910
-
911
- this.each(function (el) {
912
- match = comparator(el, selector);
913
- return !match;
914
- });
915
-
916
- return match;
917
- },
918
-
919
- find: function (selector) {
920
- if (!selector || selector.nodeType) {
921
- return cash(selector && this.has(selector).length ? selector : null);
922
- }
923
-
924
- var elems = [];
925
- this.each(function (el) {
926
- push.apply(elems, find(selector, el));
927
- });
928
-
929
- return unique(elems);
930
- },
931
-
932
- has: function (selector) {
933
- var comparator = isString(selector) ? function (el) {
934
- return find(selector, el).length !== 0;
935
- } : function (el) {
936
- return el.contains(selector);
937
- };
938
-
939
- return this.filter(comparator);
940
- },
941
-
942
- next: function () {
943
- return cash(this[0].nextElementSibling);
944
- },
945
-
946
- not: function (selector) {
947
- if (!selector) {
948
- return this;
949
- }
950
-
951
- var comparator = getCompareFunction(selector);
952
-
953
- return this.filter(function (el) {
954
- return !comparator(el, selector);
955
- });
956
- },
957
-
958
- parent: function () {
959
- var result = [];
960
-
961
- this.each(function (item) {
962
- if (item && item.parentNode) {
963
- result.push(item.parentNode);
964
- }
965
- });
966
-
967
- return unique(result);
968
- },
969
-
970
- parents: function (selector) {
971
- var last,
972
- result = [];
973
-
974
- this.each(function (item) {
975
- last = item;
976
-
977
- while (last && last.parentNode && last !== doc.body.parentNode) {
978
- last = last.parentNode;
979
-
980
- if (!selector || selector && matches(last, selector)) {
981
- result.push(last);
982
- }
983
- }
984
- });
985
-
986
- return unique(result);
987
- },
988
-
989
- prev: function () {
990
- return cash(this[0].previousElementSibling);
991
- },
992
-
993
- siblings: function (selector) {
994
- var collection = this.parent().children(selector),
995
- el = this[0];
996
-
997
- return collection.filter(function (i) {
998
- return i !== el;
999
- });
1000
- }
1001
-
1002
- });
1003
-
1004
- return cash;
1005
- });
1006
- ;
1007
- var Component = function () {
1008
- /**
1009
- * Generic constructor for all components
1010
- * @constructor
1011
- * @param {Element} el
1012
- * @param {Object} options
1013
- */
1014
- function Component(classDef, el, options) {
1015
- _classCallCheck(this, Component);
1016
-
1017
- // Display error if el is valid HTML Element
1018
- if (!(el instanceof Element)) {
1019
- console.error(Error(el + ' is not an HTML Element'));
1020
- }
1021
-
1022
- // If exists, destroy and reinitialize in child
1023
- var ins = classDef.getInstance(el);
1024
- if (!!ins) {
1025
- ins.destroy();
1026
- }
1027
-
1028
- this.el = el;
1029
- this.$el = cash(el);
1030
- }
1031
-
1032
- /**
1033
- * Initializes components
1034
- * @param {class} classDef
1035
- * @param {Element | NodeList | jQuery} els
1036
- * @param {Object} options
1037
- */
1038
-
1039
-
1040
- _createClass(Component, null, [{
1041
- key: "init",
1042
- value: function init(classDef, els, options) {
1043
- var instances = null;
1044
- if (els instanceof Element) {
1045
- instances = new classDef(els, options);
1046
- } else if (!!els && (els.jquery || els.cash || els instanceof NodeList)) {
1047
- var instancesArr = [];
1048
- for (var i = 0; i < els.length; i++) {
1049
- instancesArr.push(new classDef(els[i], options));
1050
- }
1051
- instances = instancesArr;
1052
- }
1053
-
1054
- return instances;
1055
- }
1056
- }]);
1057
-
1058
- return Component;
1059
- }();
1060
-
1061
- ; // Required for Meteor package, the use of window prevents export by Meteor
1062
- (function (window) {
1063
- if (window.Package) {
1064
- M = {};
1065
- } else {
1066
- window.M = {};
1067
- }
1068
-
1069
- // Check for jQuery
1070
- M.jQueryLoaded = !!window.jQuery;
1071
- })(window);
1072
-
1073
- // AMD
1074
- if (typeof define === 'function' && define.amd) {
1075
- define('M', [], function () {
1076
- return M;
1077
- });
1078
-
1079
- // Common JS
1080
- } else if (typeof exports !== 'undefined' && !exports.nodeType) {
1081
- if (typeof module !== 'undefined' && !module.nodeType && module.exports) {
1082
- exports = module.exports = M;
1083
- }
1084
- exports.default = M;
1085
- }
1086
-
1087
- M.version = '1.0.0';
1088
-
1089
- M.keys = {
1090
- TAB: 9,
1091
- ENTER: 13,
1092
- ESC: 27,
1093
- ARROW_UP: 38,
1094
- ARROW_DOWN: 40
1095
- };
1096
-
1097
- /**
1098
- * TabPress Keydown handler
1099
- */
1100
- M.tabPressed = false;
1101
- M.keyDown = false;
1102
- var docHandleKeydown = function (e) {
1103
- M.keyDown = true;
1104
- if (e.which === M.keys.TAB || e.which === M.keys.ARROW_DOWN || e.which === M.keys.ARROW_UP) {
1105
- M.tabPressed = true;
1106
- }
1107
- };
1108
- var docHandleKeyup = function (e) {
1109
- M.keyDown = false;
1110
- if (e.which === M.keys.TAB || e.which === M.keys.ARROW_DOWN || e.which === M.keys.ARROW_UP) {
1111
- M.tabPressed = false;
1112
- }
1113
- };
1114
- var docHandleFocus = function (e) {
1115
- if (M.keyDown) {
1116
- document.body.classList.add('keyboard-focused');
1117
- }
1118
- };
1119
- var docHandleBlur = function (e) {
1120
- document.body.classList.remove('keyboard-focused');
1121
- };
1122
- document.addEventListener('keydown', docHandleKeydown, true);
1123
- document.addEventListener('keyup', docHandleKeyup, true);
1124
- document.addEventListener('focus', docHandleFocus, true);
1125
- document.addEventListener('blur', docHandleBlur, true);
1126
-
1127
- /**
1128
- * Initialize jQuery wrapper for plugin
1129
- * @param {Class} plugin javascript class
1130
- * @param {string} pluginName jQuery plugin name
1131
- * @param {string} classRef Class reference name
1132
- */
1133
- M.initializeJqueryWrapper = function (plugin, pluginName, classRef) {
1134
- jQuery.fn[pluginName] = function (methodOrOptions) {
1135
- // Call plugin method if valid method name is passed in
1136
- if (plugin.prototype[methodOrOptions]) {
1137
- var params = Array.prototype.slice.call(arguments, 1);
1138
-
1139
- // Getter methods
1140
- if (methodOrOptions.slice(0, 3) === 'get') {
1141
- var instance = this.first()[0][classRef];
1142
- return instance[methodOrOptions].apply(instance, params);
1143
- }
1144
-
1145
- // Void methods
1146
- return this.each(function () {
1147
- var instance = this[classRef];
1148
- instance[methodOrOptions].apply(instance, params);
1149
- });
1150
-
1151
- // Initialize plugin if options or no argument is passed in
1152
- } else if (typeof methodOrOptions === 'object' || !methodOrOptions) {
1153
- plugin.init(this, arguments[0]);
1154
- return this;
1155
- }
1156
-
1157
- // Return error if an unrecognized method name is passed in
1158
- jQuery.error("Method " + methodOrOptions + " does not exist on jQuery." + pluginName);
1159
- };
1160
- };
1161
-
1162
- /**
1163
- * Automatically initialize components
1164
- * @param {Element} context DOM Element to search within for components
1165
- */
1166
- M.AutoInit = function (context) {
1167
- // Use document.body if no context is given
1168
- var root = !!context ? context : document.body;
1169
-
1170
- var registry = {
1171
- Autocomplete: root.querySelectorAll('.autocomplete:not(.no-autoinit)'),
1172
- Carousel: root.querySelectorAll('.carousel:not(.no-autoinit)'),
1173
- Chips: root.querySelectorAll('.chips:not(.no-autoinit)'),
1174
- Collapsible: root.querySelectorAll('.collapsible:not(.no-autoinit)'),
1175
- Datepicker: root.querySelectorAll('.datepicker:not(.no-autoinit)'),
1176
- Dropdown: root.querySelectorAll('.dropdown-trigger:not(.no-autoinit)'),
1177
- Materialbox: root.querySelectorAll('.materialboxed:not(.no-autoinit)'),
1178
- Modal: root.querySelectorAll('.modal:not(.no-autoinit)'),
1179
- Parallax: root.querySelectorAll('.parallax:not(.no-autoinit)'),
1180
- Pushpin: root.querySelectorAll('.pushpin:not(.no-autoinit)'),
1181
- ScrollSpy: root.querySelectorAll('.scrollspy:not(.no-autoinit)'),
1182
- FormSelect: root.querySelectorAll('select:not(.no-autoinit)'),
1183
- Sidenav: root.querySelectorAll('.sidenav:not(.no-autoinit)'),
1184
- Tabs: root.querySelectorAll('.tabs:not(.no-autoinit)'),
1185
- TapTarget: root.querySelectorAll('.tap-target:not(.no-autoinit)'),
1186
- Timepicker: root.querySelectorAll('.timepicker:not(.no-autoinit)'),
1187
- Tooltip: root.querySelectorAll('.tooltipped:not(.no-autoinit)'),
1188
- FloatingActionButton: root.querySelectorAll('.fixed-action-btn:not(.no-autoinit)')
1189
- };
1190
-
1191
- for (var pluginName in registry) {
1192
- var plugin = M[pluginName];
1193
- plugin.init(registry[pluginName]);
1194
- }
1195
- };
1196
-
1197
- /**
1198
- * Generate approximated selector string for a jQuery object
1199
- * @param {jQuery} obj jQuery object to be parsed
1200
- * @returns {string}
1201
- */
1202
- M.objectSelectorString = function (obj) {
1203
- var tagStr = obj.prop('tagName') || '';
1204
- var idStr = obj.attr('id') || '';
1205
- var classStr = obj.attr('class') || '';
1206
- return (tagStr + idStr + classStr).replace(/\s/g, '');
1207
- };
1208
-
1209
- // Unique Random ID
1210
- M.guid = function () {
1211
- function s4() {
1212
- return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
1213
- }
1214
- return function () {
1215
- return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();
1216
- };
1217
- }();
1218
-
1219
- /**
1220
- * Escapes hash from special characters
1221
- * @param {string} hash String returned from this.hash
1222
- * @returns {string}
1223
- */
1224
- M.escapeHash = function (hash) {
1225
- return hash.replace(/(:|\.|\[|\]|,|=|\/)/g, '\\$1');
1226
- };
1227
-
1228
- M.elementOrParentIsFixed = function (element) {
1229
- var $element = $(element);
1230
- var $checkElements = $element.add($element.parents());
1231
- var isFixed = false;
1232
- $checkElements.each(function () {
1233
- if ($(this).css('position') === 'fixed') {
1234
- isFixed = true;
1235
- return false;
1236
- }
1237
- });
1238
- return isFixed;
1239
- };
1240
-
1241
- /**
1242
- * @typedef {Object} Edges
1243
- * @property {Boolean} top If the top edge was exceeded
1244
- * @property {Boolean} right If the right edge was exceeded
1245
- * @property {Boolean} bottom If the bottom edge was exceeded
1246
- * @property {Boolean} left If the left edge was exceeded
1247
- */
1248
-
1249
- /**
1250
- * @typedef {Object} Bounding
1251
- * @property {Number} left left offset coordinate
1252
- * @property {Number} top top offset coordinate
1253
- * @property {Number} width
1254
- * @property {Number} height
1255
- */
1256
-
1257
- /**
1258
- * Escapes hash from special characters
1259
- * @param {Element} container Container element that acts as the boundary
1260
- * @param {Bounding} bounding element bounding that is being checked
1261
- * @param {Number} offset offset from edge that counts as exceeding
1262
- * @returns {Edges}
1263
- */
1264
- M.checkWithinContainer = function (container, bounding, offset) {
1265
- var edges = {
1266
- top: false,
1267
- right: false,
1268
- bottom: false,
1269
- left: false
1270
- };
1271
-
1272
- var containerRect = container.getBoundingClientRect();
1273
- // If body element is smaller than viewport, use viewport height instead.
1274
- var containerBottom = container === document.body ? Math.max(containerRect.bottom, window.innerHeight) : containerRect.bottom;
1275
-
1276
- var scrollLeft = container.scrollLeft;
1277
- var scrollTop = container.scrollTop;
1278
-
1279
- var scrolledX = bounding.left - scrollLeft;
1280
- var scrolledY = bounding.top - scrollTop;
1281
-
1282
- // Check for container and viewport for each edge
1283
- if (scrolledX < containerRect.left + offset || scrolledX < offset) {
1284
- edges.left = true;
1285
- }
1286
-
1287
- if (scrolledX + bounding.width > containerRect.right - offset || scrolledX + bounding.width > window.innerWidth - offset) {
1288
- edges.right = true;
1289
- }
1290
-
1291
- if (scrolledY < containerRect.top + offset || scrolledY < offset) {
1292
- edges.top = true;
1293
- }
1294
-
1295
- if (scrolledY + bounding.height > containerBottom - offset || scrolledY + bounding.height > window.innerHeight - offset) {
1296
- edges.bottom = true;
1297
- }
1298
-
1299
- return edges;
1300
- };
1301
-
1302
- M.checkPossibleAlignments = function (el, container, bounding, offset) {
1303
- var canAlign = {
1304
- top: true,
1305
- right: true,
1306
- bottom: true,
1307
- left: true,
1308
- spaceOnTop: null,
1309
- spaceOnRight: null,
1310
- spaceOnBottom: null,
1311
- spaceOnLeft: null
1312
- };
1313
-
1314
- var containerAllowsOverflow = getComputedStyle(container).overflow === 'visible';
1315
- var containerRect = container.getBoundingClientRect();
1316
- var containerHeight = Math.min(containerRect.height, window.innerHeight);
1317
- var containerWidth = Math.min(containerRect.width, window.innerWidth);
1318
- var elOffsetRect = el.getBoundingClientRect();
1319
-
1320
- var scrollLeft = container.scrollLeft;
1321
- var scrollTop = container.scrollTop;
1322
-
1323
- var scrolledX = bounding.left - scrollLeft;
1324
- var scrolledYTopEdge = bounding.top - scrollTop;
1325
- var scrolledYBottomEdge = bounding.top + elOffsetRect.height - scrollTop;
1326
-
1327
- // Check for container and viewport for left
1328
- canAlign.spaceOnRight = !containerAllowsOverflow ? containerWidth - (scrolledX + bounding.width) : window.innerWidth - (elOffsetRect.left + bounding.width);
1329
- if (canAlign.spaceOnRight < 0) {
1330
- canAlign.left = false;
1331
- }
1332
-
1333
- // Check for container and viewport for Right
1334
- canAlign.spaceOnLeft = !containerAllowsOverflow ? scrolledX - bounding.width + elOffsetRect.width : elOffsetRect.right - bounding.width;
1335
- if (canAlign.spaceOnLeft < 0) {
1336
- canAlign.right = false;
1337
- }
1338
-
1339
- // Check for container and viewport for Top
1340
- canAlign.spaceOnBottom = !containerAllowsOverflow ? containerHeight - (scrolledYTopEdge + bounding.height + offset) : window.innerHeight - (elOffsetRect.top + bounding.height + offset);
1341
- if (canAlign.spaceOnBottom < 0) {
1342
- canAlign.top = false;
1343
- }
1344
-
1345
- // Check for container and viewport for Bottom
1346
- canAlign.spaceOnTop = !containerAllowsOverflow ? scrolledYBottomEdge - (bounding.height - offset) : elOffsetRect.bottom - (bounding.height + offset);
1347
- if (canAlign.spaceOnTop < 0) {
1348
- canAlign.bottom = false;
1349
- }
1350
-
1351
- return canAlign;
1352
- };
1353
-
1354
- M.getOverflowParent = function (element) {
1355
- if (element == null) {
1356
- return null;
1357
- }
1358
-
1359
- if (element === document.body || getComputedStyle(element).overflow !== 'visible') {
1360
- return element;
1361
- }
1362
-
1363
- return M.getOverflowParent(element.parentElement);
1364
- };
1365
-
1366
- /**
1367
- * Gets id of component from a trigger
1368
- * @param {Element} trigger trigger
1369
- * @returns {string}
1370
- */
1371
- M.getIdFromTrigger = function (trigger) {
1372
- var id = trigger.getAttribute('data-target');
1373
- if (!id) {
1374
- id = trigger.getAttribute('href');
1375
- if (id) {
1376
- id = id.slice(1);
1377
- } else {
1378
- id = '';
1379
- }
1380
- }
1381
- return id;
1382
- };
1383
-
1384
- /**
1385
- * Multi browser support for document scroll top
1386
- * @returns {Number}
1387
- */
1388
- M.getDocumentScrollTop = function () {
1389
- return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
1390
- };
1391
-
1392
- /**
1393
- * Multi browser support for document scroll left
1394
- * @returns {Number}
1395
- */
1396
- M.getDocumentScrollLeft = function () {
1397
- return window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0;
1398
- };
1399
-
1400
- /**
1401
- * @typedef {Object} Edges
1402
- * @property {Boolean} top If the top edge was exceeded
1403
- * @property {Boolean} right If the right edge was exceeded
1404
- * @property {Boolean} bottom If the bottom edge was exceeded
1405
- * @property {Boolean} left If the left edge was exceeded
1406
- */
1407
-
1408
- /**
1409
- * @typedef {Object} Bounding
1410
- * @property {Number} left left offset coordinate
1411
- * @property {Number} top top offset coordinate
1412
- * @property {Number} width
1413
- * @property {Number} height
1414
- */
1415
-
1416
- /**
1417
- * Get time in ms
1418
- * @license https://raw.github.com/jashkenas/underscore/master/LICENSE
1419
- * @type {function}
1420
- * @return {number}
1421
- */
1422
- var getTime = Date.now || function () {
1423
- return new Date().getTime();
1424
- };
1425
-
1426
- /**
1427
- * Returns a function, that, when invoked, will only be triggered at most once
1428
- * during a given window of time. Normally, the throttled function will run
1429
- * as much as it can, without ever going more than once per `wait` duration;
1430
- * but if you'd like to disable the execution on the leading edge, pass
1431
- * `{leading: false}`. To disable execution on the trailing edge, ditto.
1432
- * @license https://raw.github.com/jashkenas/underscore/master/LICENSE
1433
- * @param {function} func
1434
- * @param {number} wait
1435
- * @param {Object=} options
1436
- * @returns {Function}
1437
- */
1438
- M.throttle = function (func, wait, options) {
1439
- var context = void 0,
1440
- args = void 0,
1441
- result = void 0;
1442
- var timeout = null;
1443
- var previous = 0;
1444
- options || (options = {});
1445
- var later = function () {
1446
- previous = options.leading === false ? 0 : getTime();
1447
- timeout = null;
1448
- result = func.apply(context, args);
1449
- context = args = null;
1450
- };
1451
- return function () {
1452
- var now = getTime();
1453
- if (!previous && options.leading === false) previous = now;
1454
- var remaining = wait - (now - previous);
1455
- context = this;
1456
- args = arguments;
1457
- if (remaining <= 0) {
1458
- clearTimeout(timeout);
1459
- timeout = null;
1460
- previous = now;
1461
- result = func.apply(context, args);
1462
- context = args = null;
1463
- } else if (!timeout && options.trailing !== false) {
1464
- timeout = setTimeout(later, remaining);
1465
- }
1466
- return result;
1467
- };
1468
- };
1469
- ; /*
1470
- v2.2.0
1471
- 2017 Julian Garnier
1472
- Released under the MIT license
1473
- */
1474
- var $jscomp = { scope: {} };$jscomp.defineProperty = "function" == typeof Object.defineProperties ? Object.defineProperty : function (e, r, p) {
1475
- if (p.get || p.set) throw new TypeError("ES3 does not support getters and setters.");e != Array.prototype && e != Object.prototype && (e[r] = p.value);
1476
- };$jscomp.getGlobal = function (e) {
1477
- return "undefined" != typeof window && window === e ? e : "undefined" != typeof global && null != global ? global : e;
1478
- };$jscomp.global = $jscomp.getGlobal(this);$jscomp.SYMBOL_PREFIX = "jscomp_symbol_";
1479
- $jscomp.initSymbol = function () {
1480
- $jscomp.initSymbol = function () {};$jscomp.global.Symbol || ($jscomp.global.Symbol = $jscomp.Symbol);
1481
- };$jscomp.symbolCounter_ = 0;$jscomp.Symbol = function (e) {
1482
- return $jscomp.SYMBOL_PREFIX + (e || "") + $jscomp.symbolCounter_++;
1483
- };
1484
- $jscomp.initSymbolIterator = function () {
1485
- $jscomp.initSymbol();var e = $jscomp.global.Symbol.iterator;e || (e = $jscomp.global.Symbol.iterator = $jscomp.global.Symbol("iterator"));"function" != typeof Array.prototype[e] && $jscomp.defineProperty(Array.prototype, e, { configurable: !0, writable: !0, value: function () {
1486
- return $jscomp.arrayIterator(this);
1487
- } });$jscomp.initSymbolIterator = function () {};
1488
- };$jscomp.arrayIterator = function (e) {
1489
- var r = 0;return $jscomp.iteratorPrototype(function () {
1490
- return r < e.length ? { done: !1, value: e[r++] } : { done: !0 };
1491
- });
1492
- };
1493
- $jscomp.iteratorPrototype = function (e) {
1494
- $jscomp.initSymbolIterator();e = { next: e };e[$jscomp.global.Symbol.iterator] = function () {
1495
- return this;
1496
- };return e;
1497
- };$jscomp.array = $jscomp.array || {};$jscomp.iteratorFromArray = function (e, r) {
1498
- $jscomp.initSymbolIterator();e instanceof String && (e += "");var p = 0,
1499
- m = { next: function () {
1500
- if (p < e.length) {
1501
- var u = p++;return { value: r(u, e[u]), done: !1 };
1502
- }m.next = function () {
1503
- return { done: !0, value: void 0 };
1504
- };return m.next();
1505
- } };m[Symbol.iterator] = function () {
1506
- return m;
1507
- };return m;
1508
- };
1509
- $jscomp.polyfill = function (e, r, p, m) {
1510
- if (r) {
1511
- p = $jscomp.global;e = e.split(".");for (m = 0; m < e.length - 1; m++) {
1512
- var u = e[m];u in p || (p[u] = {});p = p[u];
1513
- }e = e[e.length - 1];m = p[e];r = r(m);r != m && null != r && $jscomp.defineProperty(p, e, { configurable: !0, writable: !0, value: r });
1514
- }
1515
- };$jscomp.polyfill("Array.prototype.keys", function (e) {
1516
- return e ? e : function () {
1517
- return $jscomp.iteratorFromArray(this, function (e) {
1518
- return e;
1519
- });
1520
- };
1521
- }, "es6-impl", "es3");var $jscomp$this = this;
1522
- (function (r) {
1523
- M.anime = r();
1524
- })(function () {
1525
- function e(a) {
1526
- if (!h.col(a)) try {
1527
- return document.querySelectorAll(a);
1528
- } catch (c) {}
1529
- }function r(a, c) {
1530
- for (var d = a.length, b = 2 <= arguments.length ? arguments[1] : void 0, f = [], n = 0; n < d; n++) {
1531
- if (n in a) {
1532
- var k = a[n];c.call(b, k, n, a) && f.push(k);
1533
- }
1534
- }return f;
1535
- }function p(a) {
1536
- return a.reduce(function (a, d) {
1537
- return a.concat(h.arr(d) ? p(d) : d);
1538
- }, []);
1539
- }function m(a) {
1540
- if (h.arr(a)) return a;
1541
- h.str(a) && (a = e(a) || a);return a instanceof NodeList || a instanceof HTMLCollection ? [].slice.call(a) : [a];
1542
- }function u(a, c) {
1543
- return a.some(function (a) {
1544
- return a === c;
1545
- });
1546
- }function C(a) {
1547
- var c = {},
1548
- d;for (d in a) {
1549
- c[d] = a[d];
1550
- }return c;
1551
- }function D(a, c) {
1552
- var d = C(a),
1553
- b;for (b in a) {
1554
- d[b] = c.hasOwnProperty(b) ? c[b] : a[b];
1555
- }return d;
1556
- }function z(a, c) {
1557
- var d = C(a),
1558
- b;for (b in c) {
1559
- d[b] = h.und(a[b]) ? c[b] : a[b];
1560
- }return d;
1561
- }function T(a) {
1562
- a = a.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, function (a, c, d, k) {
1563
- return c + c + d + d + k + k;
1564
- });var c = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);
1565
- a = parseInt(c[1], 16);var d = parseInt(c[2], 16),
1566
- c = parseInt(c[3], 16);return "rgba(" + a + "," + d + "," + c + ",1)";
1567
- }function U(a) {
1568
- function c(a, c, b) {
1569
- 0 > b && (b += 1);1 < b && --b;return b < 1 / 6 ? a + 6 * (c - a) * b : .5 > b ? c : b < 2 / 3 ? a + (c - a) * (2 / 3 - b) * 6 : a;
1570
- }var d = /hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(a) || /hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(a);a = parseInt(d[1]) / 360;var b = parseInt(d[2]) / 100,
1571
- f = parseInt(d[3]) / 100,
1572
- d = d[4] || 1;if (0 == b) f = b = a = f;else {
1573
- var n = .5 > f ? f * (1 + b) : f + b - f * b,
1574
- k = 2 * f - n,
1575
- f = c(k, n, a + 1 / 3),
1576
- b = c(k, n, a);a = c(k, n, a - 1 / 3);
1577
- }return "rgba(" + 255 * f + "," + 255 * b + "," + 255 * a + "," + d + ")";
1578
- }function y(a) {
1579
- if (a = /([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(a)) return a[2];
1580
- }function V(a) {
1581
- if (-1 < a.indexOf("translate") || "perspective" === a) return "px";if (-1 < a.indexOf("rotate") || -1 < a.indexOf("skew")) return "deg";
1582
- }function I(a, c) {
1583
- return h.fnc(a) ? a(c.target, c.id, c.total) : a;
1584
- }function E(a, c) {
1585
- if (c in a.style) return getComputedStyle(a).getPropertyValue(c.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase()) || "0";
1586
- }function J(a, c) {
1587
- if (h.dom(a) && u(W, c)) return "transform";if (h.dom(a) && (a.getAttribute(c) || h.svg(a) && a[c])) return "attribute";if (h.dom(a) && "transform" !== c && E(a, c)) return "css";if (null != a[c]) return "object";
1588
- }function X(a, c) {
1589
- var d = V(c),
1590
- d = -1 < c.indexOf("scale") ? 1 : 0 + d;a = a.style.transform;if (!a) return d;for (var b = [], f = [], n = [], k = /(\w+)\((.+?)\)/g; b = k.exec(a);) {
1591
- f.push(b[1]), n.push(b[2]);
1592
- }a = r(n, function (a, b) {
1593
- return f[b] === c;
1594
- });return a.length ? a[0] : d;
1595
- }function K(a, c) {
1596
- switch (J(a, c)) {case "transform":
1597
- return X(a, c);case "css":
1598
- return E(a, c);case "attribute":
1599
- return a.getAttribute(c);}return a[c] || 0;
1600
- }function L(a, c) {
1601
- var d = /^(\*=|\+=|-=)/.exec(a);if (!d) return a;var b = y(a) || 0;c = parseFloat(c);a = parseFloat(a.replace(d[0], ""));switch (d[0][0]) {case "+":
1602
- return c + a + b;case "-":
1603
- return c - a + b;case "*":
1604
- return c * a + b;}
1605
- }function F(a, c) {
1606
- return Math.sqrt(Math.pow(c.x - a.x, 2) + Math.pow(c.y - a.y, 2));
1607
- }function M(a) {
1608
- a = a.points;for (var c = 0, d, b = 0; b < a.numberOfItems; b++) {
1609
- var f = a.getItem(b);0 < b && (c += F(d, f));d = f;
1610
- }return c;
1611
- }function N(a) {
1612
- if (a.getTotalLength) return a.getTotalLength();switch (a.tagName.toLowerCase()) {case "circle":
1613
- return 2 * Math.PI * a.getAttribute("r");case "rect":
1614
- return 2 * a.getAttribute("width") + 2 * a.getAttribute("height");case "line":
1615
- return F({ x: a.getAttribute("x1"), y: a.getAttribute("y1") }, { x: a.getAttribute("x2"), y: a.getAttribute("y2") });case "polyline":
1616
- return M(a);case "polygon":
1617
- var c = a.points;return M(a) + F(c.getItem(c.numberOfItems - 1), c.getItem(0));}
1618
- }function Y(a, c) {
1619
- function d(b) {
1620
- b = void 0 === b ? 0 : b;return a.el.getPointAtLength(1 <= c + b ? c + b : 0);
1621
- }var b = d(),
1622
- f = d(-1),
1623
- n = d(1);switch (a.property) {case "x":
1624
- return b.x;case "y":
1625
- return b.y;
1626
- case "angle":
1627
- return 180 * Math.atan2(n.y - f.y, n.x - f.x) / Math.PI;}
1628
- }function O(a, c) {
1629
- var d = /-?\d*\.?\d+/g,
1630
- b;b = h.pth(a) ? a.totalLength : a;if (h.col(b)) {
1631
- if (h.rgb(b)) {
1632
- var f = /rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(b);b = f ? "rgba(" + f[1] + ",1)" : b;
1633
- } else b = h.hex(b) ? T(b) : h.hsl(b) ? U(b) : void 0;
1634
- } else f = (f = y(b)) ? b.substr(0, b.length - f.length) : b, b = c && !/\s/g.test(b) ? f + c : f;b += "";return { original: b, numbers: b.match(d) ? b.match(d).map(Number) : [0], strings: h.str(a) || c ? b.split(d) : [] };
1635
- }function P(a) {
1636
- a = a ? p(h.arr(a) ? a.map(m) : m(a)) : [];return r(a, function (a, d, b) {
1637
- return b.indexOf(a) === d;
1638
- });
1639
- }function Z(a) {
1640
- var c = P(a);return c.map(function (a, b) {
1641
- return { target: a, id: b, total: c.length };
1642
- });
1643
- }function aa(a, c) {
1644
- var d = C(c);if (h.arr(a)) {
1645
- var b = a.length;2 !== b || h.obj(a[0]) ? h.fnc(c.duration) || (d.duration = c.duration / b) : a = { value: a };
1646
- }return m(a).map(function (a, b) {
1647
- b = b ? 0 : c.delay;a = h.obj(a) && !h.pth(a) ? a : { value: a };h.und(a.delay) && (a.delay = b);return a;
1648
- }).map(function (a) {
1649
- return z(a, d);
1650
- });
1651
- }function ba(a, c) {
1652
- var d = {},
1653
- b;for (b in a) {
1654
- var f = I(a[b], c);h.arr(f) && (f = f.map(function (a) {
1655
- return I(a, c);
1656
- }), 1 === f.length && (f = f[0]));d[b] = f;
1657
- }d.duration = parseFloat(d.duration);d.delay = parseFloat(d.delay);return d;
1658
- }function ca(a) {
1659
- return h.arr(a) ? A.apply(this, a) : Q[a];
1660
- }function da(a, c) {
1661
- var d;return a.tweens.map(function (b) {
1662
- b = ba(b, c);var f = b.value,
1663
- e = K(c.target, a.name),
1664
- k = d ? d.to.original : e,
1665
- k = h.arr(f) ? f[0] : k,
1666
- w = L(h.arr(f) ? f[1] : f, k),
1667
- e = y(w) || y(k) || y(e);b.from = O(k, e);b.to = O(w, e);b.start = d ? d.end : a.offset;b.end = b.start + b.delay + b.duration;b.easing = ca(b.easing);b.elasticity = (1E3 - Math.min(Math.max(b.elasticity, 1), 999)) / 1E3;b.isPath = h.pth(f);b.isColor = h.col(b.from.original);b.isColor && (b.round = 1);return d = b;
1668
- });
1669
- }function ea(a, c) {
1670
- return r(p(a.map(function (a) {
1671
- return c.map(function (b) {
1672
- var c = J(a.target, b.name);if (c) {
1673
- var d = da(b, a);b = { type: c, property: b.name, animatable: a, tweens: d, duration: d[d.length - 1].end, delay: d[0].delay };
1674
- } else b = void 0;return b;
1675
- });
1676
- })), function (a) {
1677
- return !h.und(a);
1678
- });
1679
- }function R(a, c, d, b) {
1680
- var f = "delay" === a;return c.length ? (f ? Math.min : Math.max).apply(Math, c.map(function (b) {
1681
- return b[a];
1682
- })) : f ? b.delay : d.offset + b.delay + b.duration;
1683
- }function fa(a) {
1684
- var c = D(ga, a),
1685
- d = D(S, a),
1686
- b = Z(a.targets),
1687
- f = [],
1688
- e = z(c, d),
1689
- k;for (k in a) {
1690
- e.hasOwnProperty(k) || "targets" === k || f.push({ name: k, offset: e.offset, tweens: aa(a[k], d) });
1691
- }a = ea(b, f);return z(c, { children: [], animatables: b, animations: a, duration: R("duration", a, c, d), delay: R("delay", a, c, d) });
1692
- }function q(a) {
1693
- function c() {
1694
- return window.Promise && new Promise(function (a) {
1695
- return p = a;
1696
- });
1697
- }function d(a) {
1698
- return g.reversed ? g.duration - a : a;
1699
- }function b(a) {
1700
- for (var b = 0, c = {}, d = g.animations, f = d.length; b < f;) {
1701
- var e = d[b],
1702
- k = e.animatable,
1703
- h = e.tweens,
1704
- n = h.length - 1,
1705
- l = h[n];n && (l = r(h, function (b) {
1706
- return a < b.end;
1707
- })[0] || l);for (var h = Math.min(Math.max(a - l.start - l.delay, 0), l.duration) / l.duration, w = isNaN(h) ? 1 : l.easing(h, l.elasticity), h = l.to.strings, p = l.round, n = [], m = void 0, m = l.to.numbers.length, t = 0; t < m; t++) {
1708
- var x = void 0,
1709
- x = l.to.numbers[t],
1710
- q = l.from.numbers[t],
1711
- x = l.isPath ? Y(l.value, w * x) : q + w * (x - q);p && (l.isColor && 2 < t || (x = Math.round(x * p) / p));n.push(x);
1712
- }if (l = h.length) for (m = h[0], w = 0; w < l; w++) {
1713
- p = h[w + 1], t = n[w], isNaN(t) || (m = p ? m + (t + p) : m + (t + " "));
1714
- } else m = n[0];ha[e.type](k.target, e.property, m, c, k.id);e.currentValue = m;b++;
1715
- }if (b = Object.keys(c).length) for (d = 0; d < b; d++) {
1716
- H || (H = E(document.body, "transform") ? "transform" : "-webkit-transform"), g.animatables[d].target.style[H] = c[d].join(" ");
1717
- }g.currentTime = a;g.progress = a / g.duration * 100;
1718
- }function f(a) {
1719
- if (g[a]) g[a](g);
1720
- }function e() {
1721
- g.remaining && !0 !== g.remaining && g.remaining--;
1722
- }function k(a) {
1723
- var k = g.duration,
1724
- n = g.offset,
1725
- w = n + g.delay,
1726
- r = g.currentTime,
1727
- x = g.reversed,
1728
- q = d(a);if (g.children.length) {
1729
- var u = g.children,
1730
- v = u.length;
1731
- if (q >= g.currentTime) for (var G = 0; G < v; G++) {
1732
- u[G].seek(q);
1733
- } else for (; v--;) {
1734
- u[v].seek(q);
1735
- }
1736
- }if (q >= w || !k) g.began || (g.began = !0, f("begin")), f("run");if (q > n && q < k) b(q);else if (q <= n && 0 !== r && (b(0), x && e()), q >= k && r !== k || !k) b(k), x || e();f("update");a >= k && (g.remaining ? (t = h, "alternate" === g.direction && (g.reversed = !g.reversed)) : (g.pause(), g.completed || (g.completed = !0, f("complete"), "Promise" in window && (p(), m = c()))), l = 0);
1737
- }a = void 0 === a ? {} : a;var h,
1738
- t,
1739
- l = 0,
1740
- p = null,
1741
- m = c(),
1742
- g = fa(a);g.reset = function () {
1743
- var a = g.direction,
1744
- c = g.loop;g.currentTime = 0;g.progress = 0;g.paused = !0;g.began = !1;g.completed = !1;g.reversed = "reverse" === a;g.remaining = "alternate" === a && 1 === c ? 2 : c;b(0);for (a = g.children.length; a--;) {
1745
- g.children[a].reset();
1746
- }
1747
- };g.tick = function (a) {
1748
- h = a;t || (t = h);k((l + h - t) * q.speed);
1749
- };g.seek = function (a) {
1750
- k(d(a));
1751
- };g.pause = function () {
1752
- var a = v.indexOf(g);-1 < a && v.splice(a, 1);g.paused = !0;
1753
- };g.play = function () {
1754
- g.paused && (g.paused = !1, t = 0, l = d(g.currentTime), v.push(g), B || ia());
1755
- };g.reverse = function () {
1756
- g.reversed = !g.reversed;t = 0;l = d(g.currentTime);
1757
- };g.restart = function () {
1758
- g.pause();
1759
- g.reset();g.play();
1760
- };g.finished = m;g.reset();g.autoplay && g.play();return g;
1761
- }var ga = { update: void 0, begin: void 0, run: void 0, complete: void 0, loop: 1, direction: "normal", autoplay: !0, offset: 0 },
1762
- S = { duration: 1E3, delay: 0, easing: "easeOutElastic", elasticity: 500, round: 0 },
1763
- W = "translateX translateY translateZ rotate rotateX rotateY rotateZ scale scaleX scaleY scaleZ skewX skewY perspective".split(" "),
1764
- H,
1765
- h = { arr: function (a) {
1766
- return Array.isArray(a);
1767
- }, obj: function (a) {
1768
- return -1 < Object.prototype.toString.call(a).indexOf("Object");
1769
- },
1770
- pth: function (a) {
1771
- return h.obj(a) && a.hasOwnProperty("totalLength");
1772
- }, svg: function (a) {
1773
- return a instanceof SVGElement;
1774
- }, dom: function (a) {
1775
- return a.nodeType || h.svg(a);
1776
- }, str: function (a) {
1777
- return "string" === typeof a;
1778
- }, fnc: function (a) {
1779
- return "function" === typeof a;
1780
- }, und: function (a) {
1781
- return "undefined" === typeof a;
1782
- }, hex: function (a) {
1783
- return (/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(a)
1784
- );
1785
- }, rgb: function (a) {
1786
- return (/^rgb/.test(a)
1787
- );
1788
- }, hsl: function (a) {
1789
- return (/^hsl/.test(a)
1790
- );
1791
- }, col: function (a) {
1792
- return h.hex(a) || h.rgb(a) || h.hsl(a);
1793
- } },
1794
- A = function () {
1795
- function a(a, d, b) {
1796
- return (((1 - 3 * b + 3 * d) * a + (3 * b - 6 * d)) * a + 3 * d) * a;
1797
- }return function (c, d, b, f) {
1798
- if (0 <= c && 1 >= c && 0 <= b && 1 >= b) {
1799
- var e = new Float32Array(11);if (c !== d || b !== f) for (var k = 0; 11 > k; ++k) {
1800
- e[k] = a(.1 * k, c, b);
1801
- }return function (k) {
1802
- if (c === d && b === f) return k;if (0 === k) return 0;if (1 === k) return 1;for (var h = 0, l = 1; 10 !== l && e[l] <= k; ++l) {
1803
- h += .1;
1804
- }--l;var l = h + (k - e[l]) / (e[l + 1] - e[l]) * .1,
1805
- n = 3 * (1 - 3 * b + 3 * c) * l * l + 2 * (3 * b - 6 * c) * l + 3 * c;if (.001 <= n) {
1806
- for (h = 0; 4 > h; ++h) {
1807
- n = 3 * (1 - 3 * b + 3 * c) * l * l + 2 * (3 * b - 6 * c) * l + 3 * c;if (0 === n) break;var m = a(l, c, b) - k,
1808
- l = l - m / n;
1809
- }k = l;
1810
- } else if (0 === n) k = l;else {
1811
- var l = h,
1812
- h = h + .1,
1813
- g = 0;do {
1814
- m = l + (h - l) / 2, n = a(m, c, b) - k, 0 < n ? h = m : l = m;
1815
- } while (1e-7 < Math.abs(n) && 10 > ++g);k = m;
1816
- }return a(k, d, f);
1817
- };
1818
- }
1819
- };
1820
- }(),
1821
- Q = function () {
1822
- function a(a, b) {
1823
- return 0 === a || 1 === a ? a : -Math.pow(2, 10 * (a - 1)) * Math.sin(2 * (a - 1 - b / (2 * Math.PI) * Math.asin(1)) * Math.PI / b);
1824
- }var c = "Quad Cubic Quart Quint Sine Expo Circ Back Elastic".split(" "),
1825
- d = { In: [[.55, .085, .68, .53], [.55, .055, .675, .19], [.895, .03, .685, .22], [.755, .05, .855, .06], [.47, 0, .745, .715], [.95, .05, .795, .035], [.6, .04, .98, .335], [.6, -.28, .735, .045], a], Out: [[.25, .46, .45, .94], [.215, .61, .355, 1], [.165, .84, .44, 1], [.23, 1, .32, 1], [.39, .575, .565, 1], [.19, 1, .22, 1], [.075, .82, .165, 1], [.175, .885, .32, 1.275], function (b, c) {
1826
- return 1 - a(1 - b, c);
1827
- }], InOut: [[.455, .03, .515, .955], [.645, .045, .355, 1], [.77, 0, .175, 1], [.86, 0, .07, 1], [.445, .05, .55, .95], [1, 0, 0, 1], [.785, .135, .15, .86], [.68, -.55, .265, 1.55], function (b, c) {
1828
- return .5 > b ? a(2 * b, c) / 2 : 1 - a(-2 * b + 2, c) / 2;
1829
- }] },
1830
- b = { linear: A(.25, .25, .75, .75) },
1831
- f = {},
1832
- e;for (e in d) {
1833
- f.type = e, d[f.type].forEach(function (a) {
1834
- return function (d, f) {
1835
- b["ease" + a.type + c[f]] = h.fnc(d) ? d : A.apply($jscomp$this, d);
1836
- };
1837
- }(f)), f = { type: f.type };
1838
- }return b;
1839
- }(),
1840
- ha = { css: function (a, c, d) {
1841
- return a.style[c] = d;
1842
- }, attribute: function (a, c, d) {
1843
- return a.setAttribute(c, d);
1844
- }, object: function (a, c, d) {
1845
- return a[c] = d;
1846
- }, transform: function (a, c, d, b, f) {
1847
- b[f] || (b[f] = []);b[f].push(c + "(" + d + ")");
1848
- } },
1849
- v = [],
1850
- B = 0,
1851
- ia = function () {
1852
- function a() {
1853
- B = requestAnimationFrame(c);
1854
- }function c(c) {
1855
- var b = v.length;if (b) {
1856
- for (var d = 0; d < b;) {
1857
- v[d] && v[d].tick(c), d++;
1858
- }a();
1859
- } else cancelAnimationFrame(B), B = 0;
1860
- }return a;
1861
- }();q.version = "2.2.0";q.speed = 1;q.running = v;q.remove = function (a) {
1862
- a = P(a);for (var c = v.length; c--;) {
1863
- for (var d = v[c], b = d.animations, f = b.length; f--;) {
1864
- u(a, b[f].animatable.target) && (b.splice(f, 1), b.length || d.pause());
1865
- }
1866
- }
1867
- };q.getValue = K;q.path = function (a, c) {
1868
- var d = h.str(a) ? e(a)[0] : a,
1869
- b = c || 100;return function (a) {
1870
- return { el: d, property: a, totalLength: N(d) * (b / 100) };
1871
- };
1872
- };q.setDashoffset = function (a) {
1873
- var c = N(a);a.setAttribute("stroke-dasharray", c);return c;
1874
- };q.bezier = A;q.easings = Q;q.timeline = function (a) {
1875
- var c = q(a);c.pause();c.duration = 0;c.add = function (d) {
1876
- c.children.forEach(function (a) {
1877
- a.began = !0;a.completed = !0;
1878
- });m(d).forEach(function (b) {
1879
- var d = z(b, D(S, a || {}));d.targets = d.targets || a.targets;b = c.duration;var e = d.offset;d.autoplay = !1;d.direction = c.direction;d.offset = h.und(e) ? b : L(e, b);c.began = !0;c.completed = !0;c.seek(d.offset);d = q(d);d.began = !0;d.completed = !0;d.duration > b && (c.duration = d.duration);c.children.push(d);
1880
- });c.seek(0);c.reset();c.autoplay && c.restart();return c;
1881
- };return c;
1882
- };q.random = function (a, c) {
1883
- return Math.floor(Math.random() * (c - a + 1)) + a;
1884
- };return q;
1885
- });
1886
- ;(function ($, anim) {
1887
- 'use strict';
1888
-
1889
- var _defaults = {
1890
- accordion: true,
1891
- onOpenStart: undefined,
1892
- onOpenEnd: undefined,
1893
- onCloseStart: undefined,
1894
- onCloseEnd: undefined,
1895
- inDuration: 300,
1896
- outDuration: 300
1897
- };
1898
-
1899
- /**
1900
- * @class
1901
- *
1902
- */
1903
-
1904
- var Collapsible = function (_Component) {
1905
- _inherits(Collapsible, _Component);
1906
-
1907
- /**
1908
- * Construct Collapsible instance
1909
- * @constructor
1910
- * @param {Element} el
1911
- * @param {Object} options
1912
- */
1913
- function Collapsible(el, options) {
1914
- _classCallCheck(this, Collapsible);
1915
-
1916
- var _this3 = _possibleConstructorReturn(this, (Collapsible.__proto__ || Object.getPrototypeOf(Collapsible)).call(this, Collapsible, el, options));
1917
-
1918
- _this3.el.M_Collapsible = _this3;
1919
-
1920
- /**
1921
- * Options for the collapsible
1922
- * @member Collapsible#options
1923
- * @prop {Boolean} [accordion=false] - Type of the collapsible
1924
- * @prop {Function} onOpenStart - Callback function called before collapsible is opened
1925
- * @prop {Function} onOpenEnd - Callback function called after collapsible is opened
1926
- * @prop {Function} onCloseStart - Callback function called before collapsible is closed
1927
- * @prop {Function} onCloseEnd - Callback function called after collapsible is closed
1928
- * @prop {Number} inDuration - Transition in duration in milliseconds.
1929
- * @prop {Number} outDuration - Transition duration in milliseconds.
1930
- */
1931
- _this3.options = $.extend({}, Collapsible.defaults, options);
1932
-
1933
- // Setup tab indices
1934
- _this3.$headers = _this3.$el.children('li').children('.collapsible-header');
1935
- _this3.$headers.attr('tabindex', 0);
1936
-
1937
- _this3._setupEventHandlers();
1938
-
1939
- // Open first active
1940
- var $activeBodies = _this3.$el.children('li.active').children('.collapsible-body');
1941
- if (_this3.options.accordion) {
1942
- // Handle Accordion
1943
- $activeBodies.first().css('display', 'block');
1944
- } else {
1945
- // Handle Expandables
1946
- $activeBodies.css('display', 'block');
1947
- }
1948
- return _this3;
1949
- }
1950
-
1951
- _createClass(Collapsible, [{
1952
- key: "destroy",
1953
-
1954
-
1955
- /**
1956
- * Teardown component
1957
- */
1958
- value: function destroy() {
1959
- this._removeEventHandlers();
1960
- this.el.M_Collapsible = undefined;
1961
- }
1962
-
1963
- /**
1964
- * Setup Event Handlers
1965
- */
1966
-
1967
- }, {
1968
- key: "_setupEventHandlers",
1969
- value: function _setupEventHandlers() {
1970
- var _this4 = this;
1971
-
1972
- this._handleCollapsibleClickBound = this._handleCollapsibleClick.bind(this);
1973
- this._handleCollapsibleKeydownBound = this._handleCollapsibleKeydown.bind(this);
1974
- this.el.addEventListener('click', this._handleCollapsibleClickBound);
1975
- this.$headers.each(function (header) {
1976
- header.addEventListener('keydown', _this4._handleCollapsibleKeydownBound);
1977
- });
1978
- }
1979
-
1980
- /**
1981
- * Remove Event Handlers
1982
- */
1983
-
1984
- }, {
1985
- key: "_removeEventHandlers",
1986
- value: function _removeEventHandlers() {
1987
- var _this5 = this;
1988
-
1989
- this.el.removeEventListener('click', this._handleCollapsibleClickBound);
1990
- this.$headers.each(function (header) {
1991
- header.removeEventListener('keydown', _this5._handleCollapsibleKeydownBound);
1992
- });
1993
- }
1994
-
1995
- /**
1996
- * Handle Collapsible Click
1997
- * @param {Event} e
1998
- */
1999
-
2000
- }, {
2001
- key: "_handleCollapsibleClick",
2002
- value: function _handleCollapsibleClick(e) {
2003
- var $header = $(e.target).closest('.collapsible-header');
2004
- if (e.target && $header.length) {
2005
- var $collapsible = $header.closest('.collapsible');
2006
- if ($collapsible[0] === this.el) {
2007
- var $collapsibleLi = $header.closest('li');
2008
- var $collapsibleLis = $collapsible.children('li');
2009
- var isActive = $collapsibleLi[0].classList.contains('active');
2010
- var index = $collapsibleLis.index($collapsibleLi);
2011
-
2012
- if (isActive) {
2013
- this.close(index);
2014
- } else {
2015
- this.open(index);
2016
- }
2017
- }
2018
- }
2019
- }
2020
-
2021
- /**
2022
- * Handle Collapsible Keydown
2023
- * @param {Event} e
2024
- */
2025
-
2026
- }, {
2027
- key: "_handleCollapsibleKeydown",
2028
- value: function _handleCollapsibleKeydown(e) {
2029
- if (e.keyCode === 13) {
2030
- this._handleCollapsibleClickBound(e);
2031
- }
2032
- }
2033
-
2034
- /**
2035
- * Animate in collapsible slide
2036
- * @param {Number} index - 0th index of slide
2037
- */
2038
-
2039
- }, {
2040
- key: "_animateIn",
2041
- value: function _animateIn(index) {
2042
- var _this6 = this;
2043
-
2044
- var $collapsibleLi = this.$el.children('li').eq(index);
2045
- if ($collapsibleLi.length) {
2046
- var $body = $collapsibleLi.children('.collapsible-body');
2047
-
2048
- anim.remove($body[0]);
2049
- $body.css({
2050
- display: 'block',
2051
- overflow: 'hidden',
2052
- height: 0,
2053
- paddingTop: '',
2054
- paddingBottom: ''
2055
- });
2056
-
2057
- var pTop = $body.css('padding-top');
2058
- var pBottom = $body.css('padding-bottom');
2059
- var finalHeight = $body[0].scrollHeight;
2060
- $body.css({
2061
- paddingTop: 0,
2062
- paddingBottom: 0
2063
- });
2064
-
2065
- anim({
2066
- targets: $body[0],
2067
- height: finalHeight,
2068
- paddingTop: pTop,
2069
- paddingBottom: pBottom,
2070
- duration: this.options.inDuration,
2071
- easing: 'easeInOutCubic',
2072
- complete: function (anim) {
2073
- $body.css({
2074
- overflow: '',
2075
- paddingTop: '',
2076
- paddingBottom: '',
2077
- height: ''
2078
- });
2079
-
2080
- // onOpenEnd callback
2081
- if (typeof _this6.options.onOpenEnd === 'function') {
2082
- _this6.options.onOpenEnd.call(_this6, $collapsibleLi[0]);
2083
- }
2084
- }
2085
- });
2086
- }
2087
- }
2088
-
2089
- /**
2090
- * Animate out collapsible slide
2091
- * @param {Number} index - 0th index of slide to open
2092
- */
2093
-
2094
- }, {
2095
- key: "_animateOut",
2096
- value: function _animateOut(index) {
2097
- var _this7 = this;
2098
-
2099
- var $collapsibleLi = this.$el.children('li').eq(index);
2100
- if ($collapsibleLi.length) {
2101
- var $body = $collapsibleLi.children('.collapsible-body');
2102
- anim.remove($body[0]);
2103
- $body.css('overflow', 'hidden');
2104
- anim({
2105
- targets: $body[0],
2106
- height: 0,
2107
- paddingTop: 0,
2108
- paddingBottom: 0,
2109
- duration: this.options.outDuration,
2110
- easing: 'easeInOutCubic',
2111
- complete: function () {
2112
- $body.css({
2113
- height: '',
2114
- overflow: '',
2115
- padding: '',
2116
- display: ''
2117
- });
2118
-
2119
- // onCloseEnd callback
2120
- if (typeof _this7.options.onCloseEnd === 'function') {
2121
- _this7.options.onCloseEnd.call(_this7, $collapsibleLi[0]);
2122
- }
2123
- }
2124
- });
2125
- }
2126
- }
2127
-
2128
- /**
2129
- * Open Collapsible
2130
- * @param {Number} index - 0th index of slide
2131
- */
2132
-
2133
- }, {
2134
- key: "open",
2135
- value: function open(index) {
2136
- var _this8 = this;
2137
-
2138
- var $collapsibleLi = this.$el.children('li').eq(index);
2139
- if ($collapsibleLi.length && !$collapsibleLi[0].classList.contains('active')) {
2140
- // onOpenStart callback
2141
- if (typeof this.options.onOpenStart === 'function') {
2142
- this.options.onOpenStart.call(this, $collapsibleLi[0]);
2143
- }
2144
-
2145
- // Handle accordion behavior
2146
- if (this.options.accordion) {
2147
- var $collapsibleLis = this.$el.children('li');
2148
- var $activeLis = this.$el.children('li.active');
2149
- $activeLis.each(function (el) {
2150
- var index = $collapsibleLis.index($(el));
2151
- _this8.close(index);
2152
- });
2153
- }
2154
-
2155
- // Animate in
2156
- $collapsibleLi[0].classList.add('active');
2157
- this._animateIn(index);
2158
- }
2159
- }
2160
-
2161
- /**
2162
- * Close Collapsible
2163
- * @param {Number} index - 0th index of slide
2164
- */
2165
-
2166
- }, {
2167
- key: "close",
2168
- value: function close(index) {
2169
- var $collapsibleLi = this.$el.children('li').eq(index);
2170
- if ($collapsibleLi.length && $collapsibleLi[0].classList.contains('active')) {
2171
- // onCloseStart callback
2172
- if (typeof this.options.onCloseStart === 'function') {
2173
- this.options.onCloseStart.call(this, $collapsibleLi[0]);
2174
- }
2175
-
2176
- // Animate out
2177
- $collapsibleLi[0].classList.remove('active');
2178
- this._animateOut(index);
2179
- }
2180
- }
2181
- }], [{
2182
- key: "init",
2183
- value: function init(els, options) {
2184
- return _get(Collapsible.__proto__ || Object.getPrototypeOf(Collapsible), "init", this).call(this, this, els, options);
2185
- }
2186
-
2187
- /**
2188
- * Get Instance
2189
- */
2190
-
2191
- }, {
2192
- key: "getInstance",
2193
- value: function getInstance(el) {
2194
- var domElem = !!el.jquery ? el[0] : el;
2195
- return domElem.M_Collapsible;
2196
- }
2197
- }, {
2198
- key: "defaults",
2199
- get: function () {
2200
- return _defaults;
2201
- }
2202
- }]);
2203
-
2204
- return Collapsible;
2205
- }(Component);
2206
-
2207
- M.Collapsible = Collapsible;
2208
-
2209
- if (M.jQueryLoaded) {
2210
- M.initializeJqueryWrapper(Collapsible, 'collapsible', 'M_Collapsible');
2211
- }
2212
- })(cash, M.anime);
2213
- ;(function ($, anim) {
2214
- 'use strict';
2215
-
2216
- var _defaults = {
2217
- alignment: 'left',
2218
- autoFocus: true,
2219
- constrainWidth: true,
2220
- container: null,
2221
- coverTrigger: true,
2222
- closeOnClick: true,
2223
- hover: false,
2224
- inDuration: 150,
2225
- outDuration: 250,
2226
- onOpenStart: null,
2227
- onOpenEnd: null,
2228
- onCloseStart: null,
2229
- onCloseEnd: null,
2230
- onItemClick: null
2231
- };
2232
-
2233
- /**
2234
- * @class
2235
- */
2236
-
2237
- var Dropdown = function (_Component2) {
2238
- _inherits(Dropdown, _Component2);
2239
-
2240
- function Dropdown(el, options) {
2241
- _classCallCheck(this, Dropdown);
2242
-
2243
- var _this9 = _possibleConstructorReturn(this, (Dropdown.__proto__ || Object.getPrototypeOf(Dropdown)).call(this, Dropdown, el, options));
2244
-
2245
- _this9.el.M_Dropdown = _this9;
2246
- Dropdown._dropdowns.push(_this9);
2247
-
2248
- _this9.id = M.getIdFromTrigger(el);
2249
- _this9.dropdownEl = document.getElementById(_this9.id);
2250
- _this9.$dropdownEl = $(_this9.dropdownEl);
2251
-
2252
- /**
2253
- * Options for the dropdown
2254
- * @member Dropdown#options
2255
- * @prop {String} [alignment='left'] - Edge which the dropdown is aligned to
2256
- * @prop {Boolean} [autoFocus=true] - Automatically focus dropdown el for keyboard
2257
- * @prop {Boolean} [constrainWidth=true] - Constrain width to width of the button
2258
- * @prop {Element} container - Container element to attach dropdown to (optional)
2259
- * @prop {Boolean} [coverTrigger=true] - Place dropdown over trigger
2260
- * @prop {Boolean} [closeOnClick=true] - Close on click of dropdown item
2261
- * @prop {Boolean} [hover=false] - Open dropdown on hover
2262
- * @prop {Number} [inDuration=150] - Duration of open animation in ms
2263
- * @prop {Number} [outDuration=250] - Duration of close animation in ms
2264
- * @prop {Function} onOpenStart - Function called when dropdown starts opening
2265
- * @prop {Function} onOpenEnd - Function called when dropdown finishes opening
2266
- * @prop {Function} onCloseStart - Function called when dropdown starts closing
2267
- * @prop {Function} onCloseEnd - Function called when dropdown finishes closing
2268
- */
2269
- _this9.options = $.extend({}, Dropdown.defaults, options);
2270
-
2271
- /**
2272
- * Describes open/close state of dropdown
2273
- * @type {Boolean}
2274
- */
2275
- _this9.isOpen = false;
2276
-
2277
- /**
2278
- * Describes if dropdown content is scrollable
2279
- * @type {Boolean}
2280
- */
2281
- _this9.isScrollable = false;
2282
-
2283
- /**
2284
- * Describes if touch moving on dropdown content
2285
- * @type {Boolean}
2286
- */
2287
- _this9.isTouchMoving = false;
2288
-
2289
- _this9.focusedIndex = -1;
2290
- _this9.filterQuery = [];
2291
-
2292
- // Move dropdown-content after dropdown-trigger
2293
- if (!!_this9.options.container) {
2294
- $(_this9.options.container).append(_this9.dropdownEl);
2295
- } else {
2296
- _this9.$el.after(_this9.dropdownEl);
2297
- }
2298
-
2299
- _this9._makeDropdownFocusable();
2300
- _this9._resetFilterQueryBound = _this9._resetFilterQuery.bind(_this9);
2301
- _this9._handleDocumentClickBound = _this9._handleDocumentClick.bind(_this9);
2302
- _this9._handleDocumentTouchmoveBound = _this9._handleDocumentTouchmove.bind(_this9);
2303
- _this9._handleDropdownClickBound = _this9._handleDropdownClick.bind(_this9);
2304
- _this9._handleDropdownKeydownBound = _this9._handleDropdownKeydown.bind(_this9);
2305
- _this9._handleTriggerKeydownBound = _this9._handleTriggerKeydown.bind(_this9);
2306
- _this9._setupEventHandlers();
2307
- return _this9;
2308
- }
2309
-
2310
- _createClass(Dropdown, [{
2311
- key: "destroy",
2312
-
2313
-
2314
- /**
2315
- * Teardown component
2316
- */
2317
- value: function destroy() {
2318
- this._resetDropdownStyles();
2319
- this._removeEventHandlers();
2320
- Dropdown._dropdowns.splice(Dropdown._dropdowns.indexOf(this), 1);
2321
- this.el.M_Dropdown = undefined;
2322
- }
2323
-
2324
- /**
2325
- * Setup Event Handlers
2326
- */
2327
-
2328
- }, {
2329
- key: "_setupEventHandlers",
2330
- value: function _setupEventHandlers() {
2331
- // Trigger keydown handler
2332
- this.el.addEventListener('keydown', this._handleTriggerKeydownBound);
2333
-
2334
- // Item click handler
2335
- this.dropdownEl.addEventListener('click', this._handleDropdownClickBound);
2336
-
2337
- // Hover event handlers
2338
- if (this.options.hover) {
2339
- this._handleMouseEnterBound = this._handleMouseEnter.bind(this);
2340
- this.el.addEventListener('mouseenter', this._handleMouseEnterBound);
2341
- this._handleMouseLeaveBound = this._handleMouseLeave.bind(this);
2342
- this.el.addEventListener('mouseleave', this._handleMouseLeaveBound);
2343
- this.dropdownEl.addEventListener('mouseleave', this._handleMouseLeaveBound);
2344
-
2345
- // Click event handlers
2346
- } else {
2347
- this._handleClickBound = this._handleClick.bind(this);
2348
- this.el.addEventListener('click', this._handleClickBound);
2349
- }
2350
- }
2351
-
2352
- /**
2353
- * Remove Event Handlers
2354
- */
2355
-
2356
- }, {
2357
- key: "_removeEventHandlers",
2358
- value: function _removeEventHandlers() {
2359
- this.el.removeEventListener('keydown', this._handleTriggerKeydownBound);
2360
- this.dropdownEl.removeEventListener('click', this._handleDropdownClickBound);
2361
-
2362
- if (this.options.hover) {
2363
- this.el.removeEventListener('mouseenter', this._handleMouseEnterBound);
2364
- this.el.removeEventListener('mouseleave', this._handleMouseLeaveBound);
2365
- this.dropdownEl.removeEventListener('mouseleave', this._handleMouseLeaveBound);
2366
- } else {
2367
- this.el.removeEventListener('click', this._handleClickBound);
2368
- }
2369
- }
2370
- }, {
2371
- key: "_setupTemporaryEventHandlers",
2372
- value: function _setupTemporaryEventHandlers() {
2373
- // Use capture phase event handler to prevent click
2374
- document.body.addEventListener('click', this._handleDocumentClickBound, true);
2375
- document.body.addEventListener('touchend', this._handleDocumentClickBound);
2376
- document.body.addEventListener('touchmove', this._handleDocumentTouchmoveBound);
2377
- this.dropdownEl.addEventListener('keydown', this._handleDropdownKeydownBound);
2378
- }
2379
- }, {
2380
- key: "_removeTemporaryEventHandlers",
2381
- value: function _removeTemporaryEventHandlers() {
2382
- // Use capture phase event handler to prevent click
2383
- document.body.removeEventListener('click', this._handleDocumentClickBound, true);
2384
- document.body.removeEventListener('touchend', this._handleDocumentClickBound);
2385
- document.body.removeEventListener('touchmove', this._handleDocumentTouchmoveBound);
2386
- this.dropdownEl.removeEventListener('keydown', this._handleDropdownKeydownBound);
2387
- }
2388
- }, {
2389
- key: "_handleClick",
2390
- value: function _handleClick(e) {
2391
- e.preventDefault();
2392
- this.open();
2393
- }
2394
- }, {
2395
- key: "_handleMouseEnter",
2396
- value: function _handleMouseEnter() {
2397
- this.open();
2398
- }
2399
- }, {
2400
- key: "_handleMouseLeave",
2401
- value: function _handleMouseLeave(e) {
2402
- var toEl = e.toElement || e.relatedTarget;
2403
- var leaveToDropdownContent = !!$(toEl).closest('.dropdown-content').length;
2404
- var leaveToActiveDropdownTrigger = false;
2405
-
2406
- var $closestTrigger = $(toEl).closest('.dropdown-trigger');
2407
- if ($closestTrigger.length && !!$closestTrigger[0].M_Dropdown && $closestTrigger[0].M_Dropdown.isOpen) {
2408
- leaveToActiveDropdownTrigger = true;
2409
- }
2410
-
2411
- // Close hover dropdown if mouse did not leave to either active dropdown-trigger or dropdown-content
2412
- if (!leaveToActiveDropdownTrigger && !leaveToDropdownContent) {
2413
- this.close();
2414
- }
2415
- }
2416
- }, {
2417
- key: "_handleDocumentClick",
2418
- value: function _handleDocumentClick(e) {
2419
- var _this10 = this;
2420
-
2421
- var $target = $(e.target);
2422
- if (this.options.closeOnClick && $target.closest('.dropdown-content').length && !this.isTouchMoving) {
2423
- // isTouchMoving to check if scrolling on mobile.
2424
- setTimeout(function () {
2425
- _this10.close();
2426
- }, 0);
2427
- } else if ($target.closest('.dropdown-trigger').length || !$target.closest('.dropdown-content').length) {
2428
- setTimeout(function () {
2429
- _this10.close();
2430
- }, 0);
2431
- }
2432
- this.isTouchMoving = false;
2433
- }
2434
- }, {
2435
- key: "_handleTriggerKeydown",
2436
- value: function _handleTriggerKeydown(e) {
2437
- // ARROW DOWN OR ENTER WHEN SELECT IS CLOSED - open Dropdown
2438
- if ((e.which === M.keys.ARROW_DOWN || e.which === M.keys.ENTER) && !this.isOpen) {
2439
- e.preventDefault();
2440
- this.open();
2441
- }
2442
- }
2443
-
2444
- /**
2445
- * Handle Document Touchmove
2446
- * @param {Event} e
2447
- */
2448
-
2449
- }, {
2450
- key: "_handleDocumentTouchmove",
2451
- value: function _handleDocumentTouchmove(e) {
2452
- var $target = $(e.target);
2453
- if ($target.closest('.dropdown-content').length) {
2454
- this.isTouchMoving = true;
2455
- }
2456
- }
2457
-
2458
- /**
2459
- * Handle Dropdown Click
2460
- * @param {Event} e
2461
- */
2462
-
2463
- }, {
2464
- key: "_handleDropdownClick",
2465
- value: function _handleDropdownClick(e) {
2466
- // onItemClick callback
2467
- if (typeof this.options.onItemClick === 'function') {
2468
- var itemEl = $(e.target).closest('li')[0];
2469
- this.options.onItemClick.call(this, itemEl);
2470
- }
2471
- }
2472
-
2473
- /**
2474
- * Handle Dropdown Keydown
2475
- * @param {Event} e
2476
- */
2477
-
2478
- }, {
2479
- key: "_handleDropdownKeydown",
2480
- value: function _handleDropdownKeydown(e) {
2481
- if (e.which === M.keys.TAB) {
2482
- e.preventDefault();
2483
- this.close();
2484
-
2485
- // Navigate down dropdown list
2486
- } else if ((e.which === M.keys.ARROW_DOWN || e.which === M.keys.ARROW_UP) && this.isOpen) {
2487
- e.preventDefault();
2488
- var direction = e.which === M.keys.ARROW_DOWN ? 1 : -1;
2489
- var newFocusedIndex = this.focusedIndex;
2490
- var foundNewIndex = false;
2491
- do {
2492
- newFocusedIndex = newFocusedIndex + direction;
2493
-
2494
- if (!!this.dropdownEl.children[newFocusedIndex] && this.dropdownEl.children[newFocusedIndex].tabIndex !== -1) {
2495
- foundNewIndex = true;
2496
- break;
2497
- }
2498
- } while (newFocusedIndex < this.dropdownEl.children.length && newFocusedIndex >= 0);
2499
-
2500
- if (foundNewIndex) {
2501
- this.focusedIndex = newFocusedIndex;
2502
- this._focusFocusedItem();
2503
- }
2504
-
2505
- // ENTER selects choice on focused item
2506
- } else if (e.which === M.keys.ENTER && this.isOpen) {
2507
- // Search for <a> and <button>
2508
- var focusedElement = this.dropdownEl.children[this.focusedIndex];
2509
- var $activatableElement = $(focusedElement).find('a, button').first();
2510
-
2511
- // Click a or button tag if exists, otherwise click li tag
2512
- if (!!$activatableElement.length) {
2513
- $activatableElement[0].click();
2514
- } else if (!!focusedElement) {
2515
- focusedElement.click();
2516
- }
2517
-
2518
- // Close dropdown on ESC
2519
- } else if (e.which === M.keys.ESC && this.isOpen) {
2520
- e.preventDefault();
2521
- this.close();
2522
- }
2523
-
2524
- // CASE WHEN USER TYPE LETTERS
2525
- var letter = String.fromCharCode(e.which).toLowerCase(),
2526
- nonLetters = [9, 13, 27, 38, 40];
2527
- if (letter && nonLetters.indexOf(e.which) === -1) {
2528
- this.filterQuery.push(letter);
2529
-
2530
- var string = this.filterQuery.join(''),
2531
- newOptionEl = $(this.dropdownEl).find('li').filter(function (el) {
2532
- return $(el).text().toLowerCase().indexOf(string) === 0;
2533
- })[0];
2534
-
2535
- if (newOptionEl) {
2536
- this.focusedIndex = $(newOptionEl).index();
2537
- this._focusFocusedItem();
2538
- }
2539
- }
2540
-
2541
- this.filterTimeout = setTimeout(this._resetFilterQueryBound, 1000);
2542
- }
2543
-
2544
- /**
2545
- * Setup dropdown
2546
- */
2547
-
2548
- }, {
2549
- key: "_resetFilterQuery",
2550
- value: function _resetFilterQuery() {
2551
- this.filterQuery = [];
2552
- }
2553
- }, {
2554
- key: "_resetDropdownStyles",
2555
- value: function _resetDropdownStyles() {
2556
- this.$dropdownEl.css({
2557
- display: '',
2558
- width: '',
2559
- height: '',
2560
- left: '',
2561
- top: '',
2562
- 'transform-origin': '',
2563
- transform: '',
2564
- opacity: ''
2565
- });
2566
- }
2567
- }, {
2568
- key: "_makeDropdownFocusable",
2569
- value: function _makeDropdownFocusable() {
2570
- // Needed for arrow key navigation
2571
- this.dropdownEl.tabIndex = 0;
2572
-
2573
- // Only set tabindex if it hasn't been set by user
2574
- $(this.dropdownEl).children().each(function (el) {
2575
- if (!el.getAttribute('tabindex')) {
2576
- el.setAttribute('tabindex', 0);
2577
- }
2578
- });
2579
- }
2580
- }, {
2581
- key: "_focusFocusedItem",
2582
- value: function _focusFocusedItem() {
2583
- if (this.focusedIndex >= 0 && this.focusedIndex < this.dropdownEl.children.length && this.options.autoFocus) {
2584
- this.dropdownEl.children[this.focusedIndex].focus();
2585
- }
2586
- }
2587
- }, {
2588
- key: "_getDropdownPosition",
2589
- value: function _getDropdownPosition() {
2590
- var offsetParentBRect = this.el.offsetParent.getBoundingClientRect();
2591
- var triggerBRect = this.el.getBoundingClientRect();
2592
- var dropdownBRect = this.dropdownEl.getBoundingClientRect();
2593
-
2594
- var idealHeight = dropdownBRect.height;
2595
- var idealWidth = dropdownBRect.width;
2596
- var idealXPos = triggerBRect.left - dropdownBRect.left;
2597
- var idealYPos = triggerBRect.top - dropdownBRect.top;
2598
-
2599
- var dropdownBounds = {
2600
- left: idealXPos,
2601
- top: idealYPos,
2602
- height: idealHeight,
2603
- width: idealWidth
2604
- };
2605
-
2606
- // Countainer here will be closest ancestor with overflow: hidden
2607
- var closestOverflowParent = !!this.dropdownEl.offsetParent ? this.dropdownEl.offsetParent : this.dropdownEl.parentNode;
2608
-
2609
- var alignments = M.checkPossibleAlignments(this.el, closestOverflowParent, dropdownBounds, this.options.coverTrigger ? 0 : triggerBRect.height);
2610
-
2611
- var verticalAlignment = 'top';
2612
- var horizontalAlignment = this.options.alignment;
2613
- idealYPos += this.options.coverTrigger ? 0 : triggerBRect.height;
2614
-
2615
- // Reset isScrollable
2616
- this.isScrollable = false;
2617
-
2618
- if (!alignments.top) {
2619
- if (alignments.bottom) {
2620
- verticalAlignment = 'bottom';
2621
- } else {
2622
- this.isScrollable = true;
2623
-
2624
- // Determine which side has most space and cutoff at correct height
2625
- if (alignments.spaceOnTop > alignments.spaceOnBottom) {
2626
- verticalAlignment = 'bottom';
2627
- idealHeight += alignments.spaceOnTop;
2628
- idealYPos -= alignments.spaceOnTop;
2629
- } else {
2630
- idealHeight += alignments.spaceOnBottom;
2631
- }
2632
- }
2633
- }
2634
-
2635
- // If preferred horizontal alignment is possible
2636
- if (!alignments[horizontalAlignment]) {
2637
- var oppositeAlignment = horizontalAlignment === 'left' ? 'right' : 'left';
2638
- if (alignments[oppositeAlignment]) {
2639
- horizontalAlignment = oppositeAlignment;
2640
- } else {
2641
- // Determine which side has most space and cutoff at correct height
2642
- if (alignments.spaceOnLeft > alignments.spaceOnRight) {
2643
- horizontalAlignment = 'right';
2644
- idealWidth += alignments.spaceOnLeft;
2645
- idealXPos -= alignments.spaceOnLeft;
2646
- } else {
2647
- horizontalAlignment = 'left';
2648
- idealWidth += alignments.spaceOnRight;
2649
- }
2650
- }
2651
- }
2652
-
2653
- if (verticalAlignment === 'bottom') {
2654
- idealYPos = idealYPos - dropdownBRect.height + (this.options.coverTrigger ? triggerBRect.height : 0);
2655
- }
2656
- if (horizontalAlignment === 'right') {
2657
- idealXPos = idealXPos - dropdownBRect.width + triggerBRect.width;
2658
- }
2659
- return {
2660
- x: idealXPos,
2661
- y: idealYPos,
2662
- verticalAlignment: verticalAlignment,
2663
- horizontalAlignment: horizontalAlignment,
2664
- height: idealHeight,
2665
- width: idealWidth
2666
- };
2667
- }
2668
-
2669
- /**
2670
- * Animate in dropdown
2671
- */
2672
-
2673
- }, {
2674
- key: "_animateIn",
2675
- value: function _animateIn() {
2676
- var _this11 = this;
2677
-
2678
- anim.remove(this.dropdownEl);
2679
- anim({
2680
- targets: this.dropdownEl,
2681
- opacity: {
2682
- value: [0, 1],
2683
- easing: 'easeOutQuad'
2684
- },
2685
- scaleX: [0.3, 1],
2686
- scaleY: [0.3, 1],
2687
- duration: this.options.inDuration,
2688
- easing: 'easeOutQuint',
2689
- complete: function (anim) {
2690
- if (_this11.options.autoFocus) {
2691
- _this11.dropdownEl.focus();
2692
- }
2693
-
2694
- // onOpenEnd callback
2695
- if (typeof _this11.options.onOpenEnd === 'function') {
2696
- _this11.options.onOpenEnd.call(_this11, _this11.el);
2697
- }
2698
- }
2699
- });
2700
- }
2701
-
2702
- /**
2703
- * Animate out dropdown
2704
- */
2705
-
2706
- }, {
2707
- key: "_animateOut",
2708
- value: function _animateOut() {
2709
- var _this12 = this;
2710
-
2711
- anim.remove(this.dropdownEl);
2712
- anim({
2713
- targets: this.dropdownEl,
2714
- opacity: {
2715
- value: 0,
2716
- easing: 'easeOutQuint'
2717
- },
2718
- scaleX: 0.3,
2719
- scaleY: 0.3,
2720
- duration: this.options.outDuration,
2721
- easing: 'easeOutQuint',
2722
- complete: function (anim) {
2723
- _this12._resetDropdownStyles();
2724
-
2725
- // onCloseEnd callback
2726
- if (typeof _this12.options.onCloseEnd === 'function') {
2727
- _this12.options.onCloseEnd.call(_this12, _this12.el);
2728
- }
2729
- }
2730
- });
2731
- }
2732
-
2733
- /**
2734
- * Place dropdown
2735
- */
2736
-
2737
- }, {
2738
- key: "_placeDropdown",
2739
- value: function _placeDropdown() {
2740
- // Set width before calculating positionInfo
2741
- var idealWidth = this.options.constrainWidth ? this.el.getBoundingClientRect().width : this.dropdownEl.getBoundingClientRect().width;
2742
- this.dropdownEl.style.width = idealWidth + 'px';
2743
-
2744
- var positionInfo = this._getDropdownPosition();
2745
- this.dropdownEl.style.left = positionInfo.x + 'px';
2746
- this.dropdownEl.style.top = positionInfo.y + 'px';
2747
- this.dropdownEl.style.height = positionInfo.height + 'px';
2748
- this.dropdownEl.style.width = positionInfo.width + 'px';
2749
- this.dropdownEl.style.transformOrigin = (positionInfo.horizontalAlignment === 'left' ? '0' : '100%') + " " + (positionInfo.verticalAlignment === 'top' ? '0' : '100%');
2750
- }
2751
-
2752
- /**
2753
- * Open Dropdown
2754
- */
2755
-
2756
- }, {
2757
- key: "open",
2758
- value: function open() {
2759
- if (this.isOpen) {
2760
- return;
2761
- }
2762
- this.isOpen = true;
2763
-
2764
- // onOpenStart callback
2765
- if (typeof this.options.onOpenStart === 'function') {
2766
- this.options.onOpenStart.call(this, this.el);
2767
- }
2768
-
2769
- // Reset styles
2770
- this._resetDropdownStyles();
2771
- this.dropdownEl.style.display = 'block';
2772
-
2773
- this._placeDropdown();
2774
- this._animateIn();
2775
- this._setupTemporaryEventHandlers();
2776
- }
2777
-
2778
- /**
2779
- * Close Dropdown
2780
- */
2781
-
2782
- }, {
2783
- key: "close",
2784
- value: function close() {
2785
- if (!this.isOpen) {
2786
- return;
2787
- }
2788
- this.isOpen = false;
2789
- this.focusedIndex = -1;
2790
-
2791
- // onCloseStart callback
2792
- if (typeof this.options.onCloseStart === 'function') {
2793
- this.options.onCloseStart.call(this, this.el);
2794
- }
2795
-
2796
- this._animateOut();
2797
- this._removeTemporaryEventHandlers();
2798
-
2799
- if (this.options.autoFocus) {
2800
- this.el.focus();
2801
- }
2802
- }
2803
-
2804
- /**
2805
- * Recalculate dimensions
2806
- */
2807
-
2808
- }, {
2809
- key: "recalculateDimensions",
2810
- value: function recalculateDimensions() {
2811
- if (this.isOpen) {
2812
- this.$dropdownEl.css({
2813
- width: '',
2814
- height: '',
2815
- left: '',
2816
- top: '',
2817
- 'transform-origin': ''
2818
- });
2819
- this._placeDropdown();
2820
- }
2821
- }
2822
- }], [{
2823
- key: "init",
2824
- value: function init(els, options) {
2825
- return _get(Dropdown.__proto__ || Object.getPrototypeOf(Dropdown), "init", this).call(this, this, els, options);
2826
- }
2827
-
2828
- /**
2829
- * Get Instance
2830
- */
2831
-
2832
- }, {
2833
- key: "getInstance",
2834
- value: function getInstance(el) {
2835
- var domElem = !!el.jquery ? el[0] : el;
2836
- return domElem.M_Dropdown;
2837
- }
2838
- }, {
2839
- key: "defaults",
2840
- get: function () {
2841
- return _defaults;
2842
- }
2843
- }]);
2844
-
2845
- return Dropdown;
2846
- }(Component);
2847
-
2848
- /**
2849
- * @static
2850
- * @memberof Dropdown
2851
- */
2852
-
2853
-
2854
- Dropdown._dropdowns = [];
2855
-
2856
- M.Dropdown = Dropdown;
2857
-
2858
- if (M.jQueryLoaded) {
2859
- M.initializeJqueryWrapper(Dropdown, 'dropdown', 'M_Dropdown');
2860
- }
2861
- })(cash, M.anime);
2862
- ;(function ($, anim) {
2863
- 'use strict';
2864
-
2865
- var _defaults = {
2866
- opacity: 0.5,
2867
- inDuration: 250,
2868
- outDuration: 250,
2869
- onOpenStart: null,
2870
- onOpenEnd: null,
2871
- onCloseStart: null,
2872
- onCloseEnd: null,
2873
- preventScrolling: true,
2874
- dismissible: true,
2875
- startingTop: '4%',
2876
- endingTop: '10%'
2877
- };
2878
-
2879
- /**
2880
- * @class
2881
- *
2882
- */
2883
-
2884
- var Modal = function (_Component3) {
2885
- _inherits(Modal, _Component3);
2886
-
2887
- /**
2888
- * Construct Modal instance and set up overlay
2889
- * @constructor
2890
- * @param {Element} el
2891
- * @param {Object} options
2892
- */
2893
- function Modal(el, options) {
2894
- _classCallCheck(this, Modal);
2895
-
2896
- var _this13 = _possibleConstructorReturn(this, (Modal.__proto__ || Object.getPrototypeOf(Modal)).call(this, Modal, el, options));
2897
-
2898
- _this13.el.M_Modal = _this13;
2899
-
2900
- /**
2901
- * Options for the modal
2902
- * @member Modal#options
2903
- * @prop {Number} [opacity=0.5] - Opacity of the modal overlay
2904
- * @prop {Number} [inDuration=250] - Length in ms of enter transition
2905
- * @prop {Number} [outDuration=250] - Length in ms of exit transition
2906
- * @prop {Function} onOpenStart - Callback function called before modal is opened
2907
- * @prop {Function} onOpenEnd - Callback function called after modal is opened
2908
- * @prop {Function} onCloseStart - Callback function called before modal is closed
2909
- * @prop {Function} onCloseEnd - Callback function called after modal is closed
2910
- * @prop {Boolean} [dismissible=true] - Allow modal to be dismissed by keyboard or overlay click
2911
- * @prop {String} [startingTop='4%'] - startingTop
2912
- * @prop {String} [endingTop='10%'] - endingTop
2913
- */
2914
- _this13.options = $.extend({}, Modal.defaults, options);
2915
-
2916
- /**
2917
- * Describes open/close state of modal
2918
- * @type {Boolean}
2919
- */
2920
- _this13.isOpen = false;
2921
-
2922
- _this13.id = _this13.$el.attr('id');
2923
- _this13._openingTrigger = undefined;
2924
- _this13.$overlay = $('<div class="modal-overlay"></div>');
2925
- _this13.el.tabIndex = 0;
2926
- _this13._nthModalOpened = 0;
2927
-
2928
- Modal._count++;
2929
- _this13._setupEventHandlers();
2930
- return _this13;
2931
- }
2932
-
2933
- _createClass(Modal, [{
2934
- key: "destroy",
2935
-
2936
-
2937
- /**
2938
- * Teardown component
2939
- */
2940
- value: function destroy() {
2941
- Modal._count--;
2942
- this._removeEventHandlers();
2943
- this.el.removeAttribute('style');
2944
- this.$overlay.remove();
2945
- this.el.M_Modal = undefined;
2946
- }
2947
-
2948
- /**
2949
- * Setup Event Handlers
2950
- */
2951
-
2952
- }, {
2953
- key: "_setupEventHandlers",
2954
- value: function _setupEventHandlers() {
2955
- this._handleOverlayClickBound = this._handleOverlayClick.bind(this);
2956
- this._handleModalCloseClickBound = this._handleModalCloseClick.bind(this);
2957
-
2958
- if (Modal._count === 1) {
2959
- document.body.addEventListener('click', this._handleTriggerClick);
2960
- }
2961
- this.$overlay[0].addEventListener('click', this._handleOverlayClickBound);
2962
- this.el.addEventListener('click', this._handleModalCloseClickBound);
2963
- }
2964
-
2965
- /**
2966
- * Remove Event Handlers
2967
- */
2968
-
2969
- }, {
2970
- key: "_removeEventHandlers",
2971
- value: function _removeEventHandlers() {
2972
- if (Modal._count === 0) {
2973
- document.body.removeEventListener('click', this._handleTriggerClick);
2974
- }
2975
- this.$overlay[0].removeEventListener('click', this._handleOverlayClickBound);
2976
- this.el.removeEventListener('click', this._handleModalCloseClickBound);
2977
- }
2978
-
2979
- /**
2980
- * Handle Trigger Click
2981
- * @param {Event} e
2982
- */
2983
-
2984
- }, {
2985
- key: "_handleTriggerClick",
2986
- value: function _handleTriggerClick(e) {
2987
- var $trigger = $(e.target).closest('.modal-trigger');
2988
- if ($trigger.length) {
2989
- var modalId = M.getIdFromTrigger($trigger[0]);
2990
- var modalInstance = document.getElementById(modalId).M_Modal;
2991
- if (modalInstance) {
2992
- modalInstance.open($trigger);
2993
- }
2994
- e.preventDefault();
2995
- }
2996
- }
2997
-
2998
- /**
2999
- * Handle Overlay Click
3000
- */
3001
-
3002
- }, {
3003
- key: "_handleOverlayClick",
3004
- value: function _handleOverlayClick() {
3005
- if (this.options.dismissible) {
3006
- this.close();
3007
- }
3008
- }
3009
-
3010
- /**
3011
- * Handle Modal Close Click
3012
- * @param {Event} e
3013
- */
3014
-
3015
- }, {
3016
- key: "_handleModalCloseClick",
3017
- value: function _handleModalCloseClick(e) {
3018
- var $closeTrigger = $(e.target).closest('.modal-close');
3019
- if ($closeTrigger.length) {
3020
- this.close();
3021
- }
3022
- }
3023
-
3024
- /**
3025
- * Handle Keydown
3026
- * @param {Event} e
3027
- */
3028
-
3029
- }, {
3030
- key: "_handleKeydown",
3031
- value: function _handleKeydown(e) {
3032
- // ESC key
3033
- if (e.keyCode === 27 && this.options.dismissible) {
3034
- this.close();
3035
- }
3036
- }
3037
-
3038
- /**
3039
- * Handle Focus
3040
- * @param {Event} e
3041
- */
3042
-
3043
- }, {
3044
- key: "_handleFocus",
3045
- value: function _handleFocus(e) {
3046
- // Only trap focus if this modal is the last model opened (prevents loops in nested modals).
3047
- if (!this.el.contains(e.target) && this._nthModalOpened === Modal._modalsOpen) {
3048
- this.el.focus();
3049
- }
3050
- }
3051
-
3052
- /**
3053
- * Animate in modal
3054
- */
3055
-
3056
- }, {
3057
- key: "_animateIn",
3058
- value: function _animateIn() {
3059
- var _this14 = this;
3060
-
3061
- // Set initial styles
3062
- $.extend(this.el.style, {
3063
- display: 'block',
3064
- opacity: 0
3065
- });
3066
- $.extend(this.$overlay[0].style, {
3067
- display: 'block',
3068
- opacity: 0
3069
- });
3070
-
3071
- // Animate overlay
3072
- anim({
3073
- targets: this.$overlay[0],
3074
- opacity: this.options.opacity,
3075
- duration: this.options.inDuration,
3076
- easing: 'easeOutQuad'
3077
- });
3078
-
3079
- // Define modal animation options
3080
- var enterAnimOptions = {
3081
- targets: this.el,
3082
- duration: this.options.inDuration,
3083
- easing: 'easeOutCubic',
3084
- // Handle modal onOpenEnd callback
3085
- complete: function () {
3086
- if (typeof _this14.options.onOpenEnd === 'function') {
3087
- _this14.options.onOpenEnd.call(_this14, _this14.el, _this14._openingTrigger);
3088
- }
3089
- }
3090
- };
3091
-
3092
- // Bottom sheet animation
3093
- if (this.el.classList.contains('bottom-sheet')) {
3094
- $.extend(enterAnimOptions, {
3095
- bottom: 0,
3096
- opacity: 1
3097
- });
3098
- anim(enterAnimOptions);
3099
-
3100
- // Normal modal animation
3101
- } else {
3102
- $.extend(enterAnimOptions, {
3103
- top: [this.options.startingTop, this.options.endingTop],
3104
- opacity: 1,
3105
- scaleX: [0.8, 1],
3106
- scaleY: [0.8, 1]
3107
- });
3108
- anim(enterAnimOptions);
3109
- }
3110
- }
3111
-
3112
- /**
3113
- * Animate out modal
3114
- */
3115
-
3116
- }, {
3117
- key: "_animateOut",
3118
- value: function _animateOut() {
3119
- var _this15 = this;
3120
-
3121
- // Animate overlay
3122
- anim({
3123
- targets: this.$overlay[0],
3124
- opacity: 0,
3125
- duration: this.options.outDuration,
3126
- easing: 'easeOutQuart'
3127
- });
3128
-
3129
- // Define modal animation options
3130
- var exitAnimOptions = {
3131
- targets: this.el,
3132
- duration: this.options.outDuration,
3133
- easing: 'easeOutCubic',
3134
- // Handle modal ready callback
3135
- complete: function () {
3136
- _this15.el.style.display = 'none';
3137
- _this15.$overlay.remove();
3138
-
3139
- // Call onCloseEnd callback
3140
- if (typeof _this15.options.onCloseEnd === 'function') {
3141
- _this15.options.onCloseEnd.call(_this15, _this15.el);
3142
- }
3143
- }
3144
- };
3145
-
3146
- // Bottom sheet animation
3147
- if (this.el.classList.contains('bottom-sheet')) {
3148
- $.extend(exitAnimOptions, {
3149
- bottom: '-100%',
3150
- opacity: 0
3151
- });
3152
- anim(exitAnimOptions);
3153
-
3154
- // Normal modal animation
3155
- } else {
3156
- $.extend(exitAnimOptions, {
3157
- top: [this.options.endingTop, this.options.startingTop],
3158
- opacity: 0,
3159
- scaleX: 0.8,
3160
- scaleY: 0.8
3161
- });
3162
- anim(exitAnimOptions);
3163
- }
3164
- }
3165
-
3166
- /**
3167
- * Open Modal
3168
- * @param {cash} [$trigger]
3169
- */
3170
-
3171
- }, {
3172
- key: "open",
3173
- value: function open($trigger) {
3174
- if (this.isOpen) {
3175
- return;
3176
- }
3177
-
3178
- this.isOpen = true;
3179
- Modal._modalsOpen++;
3180
- this._nthModalOpened = Modal._modalsOpen;
3181
-
3182
- // Set Z-Index based on number of currently open modals
3183
- this.$overlay[0].style.zIndex = 1000 + Modal._modalsOpen * 2;
3184
- this.el.style.zIndex = 1000 + Modal._modalsOpen * 2 + 1;
3185
-
3186
- // Set opening trigger, undefined indicates modal was opened by javascript
3187
- this._openingTrigger = !!$trigger ? $trigger[0] : undefined;
3188
-
3189
- // onOpenStart callback
3190
- if (typeof this.options.onOpenStart === 'function') {
3191
- this.options.onOpenStart.call(this, this.el, this._openingTrigger);
3192
- }
3193
-
3194
- if (this.options.preventScrolling) {
3195
- document.body.style.overflow = 'hidden';
3196
- }
3197
-
3198
- this.el.classList.add('open');
3199
- this.el.insertAdjacentElement('afterend', this.$overlay[0]);
3200
-
3201
- if (this.options.dismissible) {
3202
- this._handleKeydownBound = this._handleKeydown.bind(this);
3203
- this._handleFocusBound = this._handleFocus.bind(this);
3204
- document.addEventListener('keydown', this._handleKeydownBound);
3205
- document.addEventListener('focus', this._handleFocusBound, true);
3206
- }
3207
-
3208
- anim.remove(this.el);
3209
- anim.remove(this.$overlay[0]);
3210
- this._animateIn();
3211
-
3212
- // Focus modal
3213
- this.el.focus();
3214
-
3215
- return this;
3216
- }
3217
-
3218
- /**
3219
- * Close Modal
3220
- */
3221
-
3222
- }, {
3223
- key: "close",
3224
- value: function close() {
3225
- if (!this.isOpen) {
3226
- return;
3227
- }
3228
-
3229
- this.isOpen = false;
3230
- Modal._modalsOpen--;
3231
- this._nthModalOpened = 0;
3232
-
3233
- // Call onCloseStart callback
3234
- if (typeof this.options.onCloseStart === 'function') {
3235
- this.options.onCloseStart.call(this, this.el);
3236
- }
3237
-
3238
- this.el.classList.remove('open');
3239
-
3240
- // Enable body scrolling only if there are no more modals open.
3241
- if (Modal._modalsOpen === 0) {
3242
- document.body.style.overflow = '';
3243
- }
3244
-
3245
- if (this.options.dismissible) {
3246
- document.removeEventListener('keydown', this._handleKeydownBound);
3247
- document.removeEventListener('focus', this._handleFocusBound, true);
3248
- }
3249
-
3250
- anim.remove(this.el);
3251
- anim.remove(this.$overlay[0]);
3252
- this._animateOut();
3253
- return this;
3254
- }
3255
- }], [{
3256
- key: "init",
3257
- value: function init(els, options) {
3258
- return _get(Modal.__proto__ || Object.getPrototypeOf(Modal), "init", this).call(this, this, els, options);
3259
- }
3260
-
3261
- /**
3262
- * Get Instance
3263
- */
3264
-
3265
- }, {
3266
- key: "getInstance",
3267
- value: function getInstance(el) {
3268
- var domElem = !!el.jquery ? el[0] : el;
3269
- return domElem.M_Modal;
3270
- }
3271
- }, {
3272
- key: "defaults",
3273
- get: function () {
3274
- return _defaults;
3275
- }
3276
- }]);
3277
-
3278
- return Modal;
3279
- }(Component);
3280
-
3281
- /**
3282
- * @static
3283
- * @memberof Modal
3284
- */
3285
-
3286
-
3287
- Modal._modalsOpen = 0;
3288
-
3289
- /**
3290
- * @static
3291
- * @memberof Modal
3292
- */
3293
- Modal._count = 0;
3294
-
3295
- M.Modal = Modal;
3296
-
3297
- if (M.jQueryLoaded) {
3298
- M.initializeJqueryWrapper(Modal, 'modal', 'M_Modal');
3299
- }
3300
- })(cash, M.anime);
3301
- ;(function ($, anim) {
3302
- 'use strict';
3303
-
3304
- var _defaults = {
3305
- inDuration: 275,
3306
- outDuration: 200,
3307
- onOpenStart: null,
3308
- onOpenEnd: null,
3309
- onCloseStart: null,
3310
- onCloseEnd: null
3311
- };
3312
-
3313
- /**
3314
- * @class
3315
- *
3316
- */
3317
-
3318
- var Materialbox = function (_Component4) {
3319
- _inherits(Materialbox, _Component4);
3320
-
3321
- /**
3322
- * Construct Materialbox instance
3323
- * @constructor
3324
- * @param {Element} el
3325
- * @param {Object} options
3326
- */
3327
- function Materialbox(el, options) {
3328
- _classCallCheck(this, Materialbox);
3329
-
3330
- var _this16 = _possibleConstructorReturn(this, (Materialbox.__proto__ || Object.getPrototypeOf(Materialbox)).call(this, Materialbox, el, options));
3331
-
3332
- _this16.el.M_Materialbox = _this16;
3333
-
3334
- /**
3335
- * Options for the modal
3336
- * @member Materialbox#options
3337
- * @prop {Number} [inDuration=275] - Length in ms of enter transition
3338
- * @prop {Number} [outDuration=200] - Length in ms of exit transition
3339
- * @prop {Function} onOpenStart - Callback function called before materialbox is opened
3340
- * @prop {Function} onOpenEnd - Callback function called after materialbox is opened
3341
- * @prop {Function} onCloseStart - Callback function called before materialbox is closed
3342
- * @prop {Function} onCloseEnd - Callback function called after materialbox is closed
3343
- */
3344
- _this16.options = $.extend({}, Materialbox.defaults, options);
3345
-
3346
- _this16.overlayActive = false;
3347
- _this16.doneAnimating = true;
3348
- _this16.placeholder = $('<div></div>').addClass('material-placeholder');
3349
- _this16.originalWidth = 0;
3350
- _this16.originalHeight = 0;
3351
- _this16.originInlineStyles = _this16.$el.attr('style');
3352
- _this16.caption = _this16.el.getAttribute('data-caption') || '';
3353
-
3354
- // Wrap
3355
- _this16.$el.before(_this16.placeholder);
3356
- _this16.placeholder.append(_this16.$el);
3357
-
3358
- _this16._setupEventHandlers();
3359
- return _this16;
3360
- }
3361
-
3362
- _createClass(Materialbox, [{
3363
- key: "destroy",
3364
-
3365
-
3366
- /**
3367
- * Teardown component
3368
- */
3369
- value: function destroy() {
3370
- this._removeEventHandlers();
3371
- this.el.M_Materialbox = undefined;
3372
-
3373
- // Unwrap image
3374
- $(this.placeholder).after(this.el).remove();
3375
-
3376
- this.$el.removeAttr('style');
3377
- }
3378
-
3379
- /**
3380
- * Setup Event Handlers
3381
- */
3382
-
3383
- }, {
3384
- key: "_setupEventHandlers",
3385
- value: function _setupEventHandlers() {
3386
- this._handleMaterialboxClickBound = this._handleMaterialboxClick.bind(this);
3387
- this.el.addEventListener('click', this._handleMaterialboxClickBound);
3388
- }
3389
-
3390
- /**
3391
- * Remove Event Handlers
3392
- */
3393
-
3394
- }, {
3395
- key: "_removeEventHandlers",
3396
- value: function _removeEventHandlers() {
3397
- this.el.removeEventListener('click', this._handleMaterialboxClickBound);
3398
- }
3399
-
3400
- /**
3401
- * Handle Materialbox Click
3402
- * @param {Event} e
3403
- */
3404
-
3405
- }, {
3406
- key: "_handleMaterialboxClick",
3407
- value: function _handleMaterialboxClick(e) {
3408
- // If already modal, return to original
3409
- if (this.doneAnimating === false || this.overlayActive && this.doneAnimating) {
3410
- this.close();
3411
- } else {
3412
- this.open();
3413
- }
3414
- }
3415
-
3416
- /**
3417
- * Handle Window Scroll
3418
- */
3419
-
3420
- }, {
3421
- key: "_handleWindowScroll",
3422
- value: function _handleWindowScroll() {
3423
- if (this.overlayActive) {
3424
- this.close();
3425
- }
3426
- }
3427
-
3428
- /**
3429
- * Handle Window Resize
3430
- */
3431
-
3432
- }, {
3433
- key: "_handleWindowResize",
3434
- value: function _handleWindowResize() {
3435
- if (this.overlayActive) {
3436
- this.close();
3437
- }
3438
- }
3439
-
3440
- /**
3441
- * Handle Window Resize
3442
- * @param {Event} e
3443
- */
3444
-
3445
- }, {
3446
- key: "_handleWindowEscape",
3447
- value: function _handleWindowEscape(e) {
3448
- // ESC key
3449
- if (e.keyCode === 27 && this.doneAnimating && this.overlayActive) {
3450
- this.close();
3451
- }
3452
- }
3453
-
3454
- /**
3455
- * Find ancestors with overflow: hidden; and make visible
3456
- */
3457
-
3458
- }, {
3459
- key: "_makeAncestorsOverflowVisible",
3460
- value: function _makeAncestorsOverflowVisible() {
3461
- this.ancestorsChanged = $();
3462
- var ancestor = this.placeholder[0].parentNode;
3463
- while (ancestor !== null && !$(ancestor).is(document)) {
3464
- var curr = $(ancestor);
3465
- if (curr.css('overflow') !== 'visible') {
3466
- curr.css('overflow', 'visible');
3467
- if (this.ancestorsChanged === undefined) {
3468
- this.ancestorsChanged = curr;
3469
- } else {
3470
- this.ancestorsChanged = this.ancestorsChanged.add(curr);
3471
- }
3472
- }
3473
- ancestor = ancestor.parentNode;
3474
- }
3475
- }
3476
-
3477
- /**
3478
- * Animate image in
3479
- */
3480
-
3481
- }, {
3482
- key: "_animateImageIn",
3483
- value: function _animateImageIn() {
3484
- var _this17 = this;
3485
-
3486
- var animOptions = {
3487
- targets: this.el,
3488
- height: [this.originalHeight, this.newHeight],
3489
- width: [this.originalWidth, this.newWidth],
3490
- left: M.getDocumentScrollLeft() + this.windowWidth / 2 - this.placeholder.offset().left - this.newWidth / 2,
3491
- top: M.getDocumentScrollTop() + this.windowHeight / 2 - this.placeholder.offset().top - this.newHeight / 2,
3492
- duration: this.options.inDuration,
3493
- easing: 'easeOutQuad',
3494
- complete: function () {
3495
- _this17.doneAnimating = true;
3496
-
3497
- // onOpenEnd callback
3498
- if (typeof _this17.options.onOpenEnd === 'function') {
3499
- _this17.options.onOpenEnd.call(_this17, _this17.el);
3500
- }
3501
- }
3502
- };
3503
-
3504
- // Override max-width or max-height if needed
3505
- this.maxWidth = this.$el.css('max-width');
3506
- this.maxHeight = this.$el.css('max-height');
3507
- if (this.maxWidth !== 'none') {
3508
- animOptions.maxWidth = this.newWidth;
3509
- }
3510
- if (this.maxHeight !== 'none') {
3511
- animOptions.maxHeight = this.newHeight;
3512
- }
3513
-
3514
- anim(animOptions);
3515
- }
3516
-
3517
- /**
3518
- * Animate image out
3519
- */
3520
-
3521
- }, {
3522
- key: "_animateImageOut",
3523
- value: function _animateImageOut() {
3524
- var _this18 = this;
3525
-
3526
- var animOptions = {
3527
- targets: this.el,
3528
- width: this.originalWidth,
3529
- height: this.originalHeight,
3530
- left: 0,
3531
- top: 0,
3532
- duration: this.options.outDuration,
3533
- easing: 'easeOutQuad',
3534
- complete: function () {
3535
- _this18.placeholder.css({
3536
- height: '',
3537
- width: '',
3538
- position: '',
3539
- top: '',
3540
- left: ''
3541
- });
3542
-
3543
- // Revert to width or height attribute
3544
- if (_this18.attrWidth) {
3545
- _this18.$el.attr('width', _this18.attrWidth);
3546
- }
3547
- if (_this18.attrHeight) {
3548
- _this18.$el.attr('height', _this18.attrHeight);
3549
- }
3550
-
3551
- _this18.$el.removeAttr('style');
3552
- _this18.originInlineStyles && _this18.$el.attr('style', _this18.originInlineStyles);
3553
-
3554
- // Remove class
3555
- _this18.$el.removeClass('active');
3556
- _this18.doneAnimating = true;
3557
-
3558
- // Remove overflow overrides on ancestors
3559
- if (_this18.ancestorsChanged.length) {
3560
- _this18.ancestorsChanged.css('overflow', '');
3561
- }
3562
-
3563
- // onCloseEnd callback
3564
- if (typeof _this18.options.onCloseEnd === 'function') {
3565
- _this18.options.onCloseEnd.call(_this18, _this18.el);
3566
- }
3567
- }
3568
- };
3569
-
3570
- anim(animOptions);
3571
- }
3572
-
3573
- /**
3574
- * Update open and close vars
3575
- */
3576
-
3577
- }, {
3578
- key: "_updateVars",
3579
- value: function _updateVars() {
3580
- this.windowWidth = window.innerWidth;
3581
- this.windowHeight = window.innerHeight;
3582
- this.caption = this.el.getAttribute('data-caption') || '';
3583
- }
3584
-
3585
- /**
3586
- * Open Materialbox
3587
- */
3588
-
3589
- }, {
3590
- key: "open",
3591
- value: function open() {
3592
- var _this19 = this;
3593
-
3594
- this._updateVars();
3595
- this.originalWidth = this.el.getBoundingClientRect().width;
3596
- this.originalHeight = this.el.getBoundingClientRect().height;
3597
-
3598
- // Set states
3599
- this.doneAnimating = false;
3600
- this.$el.addClass('active');
3601
- this.overlayActive = true;
3602
-
3603
- // onOpenStart callback
3604
- if (typeof this.options.onOpenStart === 'function') {
3605
- this.options.onOpenStart.call(this, this.el);
3606
- }
3607
-
3608
- // Set positioning for placeholder
3609
- this.placeholder.css({
3610
- width: this.placeholder[0].getBoundingClientRect().width + 'px',
3611
- height: this.placeholder[0].getBoundingClientRect().height + 'px',
3612
- position: 'relative',
3613
- top: 0,
3614
- left: 0
3615
- });
3616
-
3617
- this._makeAncestorsOverflowVisible();
3618
-
3619
- // Set css on origin
3620
- this.$el.css({
3621
- position: 'absolute',
3622
- 'z-index': 1000,
3623
- 'will-change': 'left, top, width, height'
3624
- });
3625
-
3626
- // Change from width or height attribute to css
3627
- this.attrWidth = this.$el.attr('width');
3628
- this.attrHeight = this.$el.attr('height');
3629
- if (this.attrWidth) {
3630
- this.$el.css('width', this.attrWidth + 'px');
3631
- this.$el.removeAttr('width');
3632
- }
3633
- if (this.attrHeight) {
3634
- this.$el.css('width', this.attrHeight + 'px');
3635
- this.$el.removeAttr('height');
3636
- }
3637
-
3638
- // Add overlay
3639
- this.$overlay = $('<div id="materialbox-overlay"></div>').css({
3640
- opacity: 0
3641
- }).one('click', function () {
3642
- if (_this19.doneAnimating) {
3643
- _this19.close();
3644
- }
3645
- });
3646
-
3647
- // Put before in origin image to preserve z-index layering.
3648
- this.$el.before(this.$overlay);
3649
-
3650
- // Set dimensions if needed
3651
- var overlayOffset = this.$overlay[0].getBoundingClientRect();
3652
- this.$overlay.css({
3653
- width: this.windowWidth + 'px',
3654
- height: this.windowHeight + 'px',
3655
- left: -1 * overlayOffset.left + 'px',
3656
- top: -1 * overlayOffset.top + 'px'
3657
- });
3658
-
3659
- anim.remove(this.el);
3660
- anim.remove(this.$overlay[0]);
3661
-
3662
- // Animate Overlay
3663
- anim({
3664
- targets: this.$overlay[0],
3665
- opacity: 1,
3666
- duration: this.options.inDuration,
3667
- easing: 'easeOutQuad'
3668
- });
3669
-
3670
- // Add and animate caption if it exists
3671
- if (this.caption !== '') {
3672
- if (this.$photocaption) {
3673
- anim.remove(this.$photoCaption[0]);
3674
- }
3675
- this.$photoCaption = $('<div class="materialbox-caption"></div>');
3676
- this.$photoCaption.text(this.caption);
3677
- $('body').append(this.$photoCaption);
3678
- this.$photoCaption.css({ display: 'inline' });
3679
-
3680
- anim({
3681
- targets: this.$photoCaption[0],
3682
- opacity: 1,
3683
- duration: this.options.inDuration,
3684
- easing: 'easeOutQuad'
3685
- });
3686
- }
3687
-
3688
- // Resize Image
3689
- var ratio = 0;
3690
- var widthPercent = this.originalWidth / this.windowWidth;
3691
- var heightPercent = this.originalHeight / this.windowHeight;
3692
- this.newWidth = 0;
3693
- this.newHeight = 0;
3694
-
3695
- if (widthPercent > heightPercent) {
3696
- ratio = this.originalHeight / this.originalWidth;
3697
- this.newWidth = this.windowWidth * 0.9;
3698
- this.newHeight = this.windowWidth * 0.9 * ratio;
3699
- } else {
3700
- ratio = this.originalWidth / this.originalHeight;
3701
- this.newWidth = this.windowHeight * 0.9 * ratio;
3702
- this.newHeight = this.windowHeight * 0.9;
3703
- }
3704
-
3705
- this._animateImageIn();
3706
-
3707
- // Handle Exit triggers
3708
- this._handleWindowScrollBound = this._handleWindowScroll.bind(this);
3709
- this._handleWindowResizeBound = this._handleWindowResize.bind(this);
3710
- this._handleWindowEscapeBound = this._handleWindowEscape.bind(this);
3711
-
3712
- window.addEventListener('scroll', this._handleWindowScrollBound);
3713
- window.addEventListener('resize', this._handleWindowResizeBound);
3714
- window.addEventListener('keyup', this._handleWindowEscapeBound);
3715
- }
3716
-
3717
- /**
3718
- * Close Materialbox
3719
- */
3720
-
3721
- }, {
3722
- key: "close",
3723
- value: function close() {
3724
- var _this20 = this;
3725
-
3726
- this._updateVars();
3727
- this.doneAnimating = false;
3728
-
3729
- // onCloseStart callback
3730
- if (typeof this.options.onCloseStart === 'function') {
3731
- this.options.onCloseStart.call(this, this.el);
3732
- }
3733
-
3734
- anim.remove(this.el);
3735
- anim.remove(this.$overlay[0]);
3736
-
3737
- if (this.caption !== '') {
3738
- anim.remove(this.$photoCaption[0]);
3739
- }
3740
-
3741
- // disable exit handlers
3742
- window.removeEventListener('scroll', this._handleWindowScrollBound);
3743
- window.removeEventListener('resize', this._handleWindowResizeBound);
3744
- window.removeEventListener('keyup', this._handleWindowEscapeBound);
3745
-
3746
- anim({
3747
- targets: this.$overlay[0],
3748
- opacity: 0,
3749
- duration: this.options.outDuration,
3750
- easing: 'easeOutQuad',
3751
- complete: function () {
3752
- _this20.overlayActive = false;
3753
- _this20.$overlay.remove();
3754
- }
3755
- });
3756
-
3757
- this._animateImageOut();
3758
-
3759
- // Remove Caption + reset css settings on image
3760
- if (this.caption !== '') {
3761
- anim({
3762
- targets: this.$photoCaption[0],
3763
- opacity: 0,
3764
- duration: this.options.outDuration,
3765
- easing: 'easeOutQuad',
3766
- complete: function () {
3767
- _this20.$photoCaption.remove();
3768
- }
3769
- });
3770
- }
3771
- }
3772
- }], [{
3773
- key: "init",
3774
- value: function init(els, options) {
3775
- return _get(Materialbox.__proto__ || Object.getPrototypeOf(Materialbox), "init", this).call(this, this, els, options);
3776
- }
3777
-
3778
- /**
3779
- * Get Instance
3780
- */
3781
-
3782
- }, {
3783
- key: "getInstance",
3784
- value: function getInstance(el) {
3785
- var domElem = !!el.jquery ? el[0] : el;
3786
- return domElem.M_Materialbox;
3787
- }
3788
- }, {
3789
- key: "defaults",
3790
- get: function () {
3791
- return _defaults;
3792
- }
3793
- }]);
3794
-
3795
- return Materialbox;
3796
- }(Component);
3797
-
3798
- M.Materialbox = Materialbox;
3799
-
3800
- if (M.jQueryLoaded) {
3801
- M.initializeJqueryWrapper(Materialbox, 'materialbox', 'M_Materialbox');
3802
- }
3803
- })(cash, M.anime);
3804
- ;(function ($) {
3805
- 'use strict';
3806
-
3807
- var _defaults = {
3808
- responsiveThreshold: 0 // breakpoint for swipeable
3809
- };
3810
-
3811
- var Parallax = function (_Component5) {
3812
- _inherits(Parallax, _Component5);
3813
-
3814
- function Parallax(el, options) {
3815
- _classCallCheck(this, Parallax);
3816
-
3817
- var _this21 = _possibleConstructorReturn(this, (Parallax.__proto__ || Object.getPrototypeOf(Parallax)).call(this, Parallax, el, options));
3818
-
3819
- _this21.el.M_Parallax = _this21;
3820
-
3821
- /**
3822
- * Options for the Parallax
3823
- * @member Parallax#options
3824
- * @prop {Number} responsiveThreshold
3825
- */
3826
- _this21.options = $.extend({}, Parallax.defaults, options);
3827
- _this21._enabled = window.innerWidth > _this21.options.responsiveThreshold;
3828
-
3829
- _this21.$img = _this21.$el.find('img').first();
3830
- _this21.$img.each(function () {
3831
- var el = this;
3832
- if (el.complete) $(el).trigger('load');
3833
- });
3834
-
3835
- _this21._updateParallax();
3836
- _this21._setupEventHandlers();
3837
- _this21._setupStyles();
3838
-
3839
- Parallax._parallaxes.push(_this21);
3840
- return _this21;
3841
- }
3842
-
3843
- _createClass(Parallax, [{
3844
- key: "destroy",
3845
-
3846
-
3847
- /**
3848
- * Teardown component
3849
- */
3850
- value: function destroy() {
3851
- Parallax._parallaxes.splice(Parallax._parallaxes.indexOf(this), 1);
3852
- this.$img[0].style.transform = '';
3853
- this._removeEventHandlers();
3854
-
3855
- this.$el[0].M_Parallax = undefined;
3856
- }
3857
- }, {
3858
- key: "_setupEventHandlers",
3859
- value: function _setupEventHandlers() {
3860
- this._handleImageLoadBound = this._handleImageLoad.bind(this);
3861
- this.$img[0].addEventListener('load', this._handleImageLoadBound);
3862
-
3863
- if (Parallax._parallaxes.length === 0) {
3864
- Parallax._handleScrollThrottled = M.throttle(Parallax._handleScroll, 5);
3865
- window.addEventListener('scroll', Parallax._handleScrollThrottled);
3866
-
3867
- Parallax._handleWindowResizeThrottled = M.throttle(Parallax._handleWindowResize, 5);
3868
- window.addEventListener('resize', Parallax._handleWindowResizeThrottled);
3869
- }
3870
- }
3871
- }, {
3872
- key: "_removeEventHandlers",
3873
- value: function _removeEventHandlers() {
3874
- this.$img[0].removeEventListener('load', this._handleImageLoadBound);
3875
-
3876
- if (Parallax._parallaxes.length === 0) {
3877
- window.removeEventListener('scroll', Parallax._handleScrollThrottled);
3878
- window.removeEventListener('resize', Parallax._handleWindowResizeThrottled);
3879
- }
3880
- }
3881
- }, {
3882
- key: "_setupStyles",
3883
- value: function _setupStyles() {
3884
- this.$img[0].style.opacity = 1;
3885
- }
3886
- }, {
3887
- key: "_handleImageLoad",
3888
- value: function _handleImageLoad() {
3889
- this._updateParallax();
3890
- }
3891
- }, {
3892
- key: "_updateParallax",
3893
- value: function _updateParallax() {
3894
- var containerHeight = this.$el.height() > 0 ? this.el.parentNode.offsetHeight : 500;
3895
- var imgHeight = this.$img[0].offsetHeight;
3896
- var parallaxDist = imgHeight - containerHeight;
3897
- var bottom = this.$el.offset().top + containerHeight;
3898
- var top = this.$el.offset().top;
3899
- var scrollTop = M.getDocumentScrollTop();
3900
- var windowHeight = window.innerHeight;
3901
- var windowBottom = scrollTop + windowHeight;
3902
- var percentScrolled = (windowBottom - top) / (containerHeight + windowHeight);
3903
- var parallax = parallaxDist * percentScrolled;
3904
-
3905
- if (!this._enabled) {
3906
- this.$img[0].style.transform = '';
3907
- } else if (bottom > scrollTop && top < scrollTop + windowHeight) {
3908
- this.$img[0].style.transform = "translate3D(-50%, " + parallax + "px, 0)";
3909
- }
3910
- }
3911
- }], [{
3912
- key: "init",
3913
- value: function init(els, options) {
3914
- return _get(Parallax.__proto__ || Object.getPrototypeOf(Parallax), "init", this).call(this, this, els, options);
3915
- }
3916
-
3917
- /**
3918
- * Get Instance
3919
- */
3920
-
3921
- }, {
3922
- key: "getInstance",
3923
- value: function getInstance(el) {
3924
- var domElem = !!el.jquery ? el[0] : el;
3925
- return domElem.M_Parallax;
3926
- }
3927
- }, {
3928
- key: "_handleScroll",
3929
- value: function _handleScroll() {
3930
- for (var i = 0; i < Parallax._parallaxes.length; i++) {
3931
- var parallaxInstance = Parallax._parallaxes[i];
3932
- parallaxInstance._updateParallax.call(parallaxInstance);
3933
- }
3934
- }
3935
- }, {
3936
- key: "_handleWindowResize",
3937
- value: function _handleWindowResize() {
3938
- for (var i = 0; i < Parallax._parallaxes.length; i++) {
3939
- var parallaxInstance = Parallax._parallaxes[i];
3940
- parallaxInstance._enabled = window.innerWidth > parallaxInstance.options.responsiveThreshold;
3941
- }
3942
- }
3943
- }, {
3944
- key: "defaults",
3945
- get: function () {
3946
- return _defaults;
3947
- }
3948
- }]);
3949
-
3950
- return Parallax;
3951
- }(Component);
3952
-
3953
- /**
3954
- * @static
3955
- * @memberof Parallax
3956
- */
3957
-
3958
-
3959
- Parallax._parallaxes = [];
3960
-
3961
- M.Parallax = Parallax;
3962
-
3963
- if (M.jQueryLoaded) {
3964
- M.initializeJqueryWrapper(Parallax, 'parallax', 'M_Parallax');
3965
- }
3966
- })(cash);
3967
- ;(function ($, anim) {
3968
- 'use strict';
3969
-
3970
- var _defaults = {
3971
- duration: 300,
3972
- onShow: null,
3973
- swipeable: false,
3974
- responsiveThreshold: Infinity // breakpoint for swipeable
3975
- };
3976
-
3977
- /**
3978
- * @class
3979
- *
3980
- */
3981
-
3982
- var Tabs = function (_Component6) {
3983
- _inherits(Tabs, _Component6);
3984
-
3985
- /**
3986
- * Construct Tabs instance
3987
- * @constructor
3988
- * @param {Element} el
3989
- * @param {Object} options
3990
- */
3991
- function Tabs(el, options) {
3992
- _classCallCheck(this, Tabs);
3993
-
3994
- var _this22 = _possibleConstructorReturn(this, (Tabs.__proto__ || Object.getPrototypeOf(Tabs)).call(this, Tabs, el, options));
3995
-
3996
- _this22.el.M_Tabs = _this22;
3997
-
3998
- /**
3999
- * Options for the Tabs
4000
- * @member Tabs#options
4001
- * @prop {Number} duration
4002
- * @prop {Function} onShow
4003
- * @prop {Boolean} swipeable
4004
- * @prop {Number} responsiveThreshold
4005
- */
4006
- _this22.options = $.extend({}, Tabs.defaults, options);
4007
-
4008
- // Setup
4009
- _this22.$tabLinks = _this22.$el.children('li.tab').children('a');
4010
- _this22.index = 0;
4011
- _this22._setupActiveTabLink();
4012
-
4013
- // Setup tabs content
4014
- if (_this22.options.swipeable) {
4015
- _this22._setupSwipeableTabs();
4016
- } else {
4017
- _this22._setupNormalTabs();
4018
- }
4019
-
4020
- // Setup tabs indicator after content to ensure accurate widths
4021
- _this22._setTabsAndTabWidth();
4022
- _this22._createIndicator();
4023
-
4024
- _this22._setupEventHandlers();
4025
- return _this22;
4026
- }
4027
-
4028
- _createClass(Tabs, [{
4029
- key: "destroy",
4030
-
4031
-
4032
- /**
4033
- * Teardown component
4034
- */
4035
- value: function destroy() {
4036
- this._removeEventHandlers();
4037
- this._indicator.parentNode.removeChild(this._indicator);
4038
-
4039
- if (this.options.swipeable) {
4040
- this._teardownSwipeableTabs();
4041
- } else {
4042
- this._teardownNormalTabs();
4043
- }
4044
-
4045
- this.$el[0].M_Tabs = undefined;
4046
- }
4047
-
4048
- /**
4049
- * Setup Event Handlers
4050
- */
4051
-
4052
- }, {
4053
- key: "_setupEventHandlers",
4054
- value: function _setupEventHandlers() {
4055
- this._handleWindowResizeBound = this._handleWindowResize.bind(this);
4056
- window.addEventListener('resize', this._handleWindowResizeBound);
4057
-
4058
- this._handleTabClickBound = this._handleTabClick.bind(this);
4059
- this.el.addEventListener('click', this._handleTabClickBound);
4060
- }
4061
-
4062
- /**
4063
- * Remove Event Handlers
4064
- */
4065
-
4066
- }, {
4067
- key: "_removeEventHandlers",
4068
- value: function _removeEventHandlers() {
4069
- window.removeEventListener('resize', this._handleWindowResizeBound);
4070
- this.el.removeEventListener('click', this._handleTabClickBound);
4071
- }
4072
-
4073
- /**
4074
- * Handle window Resize
4075
- */
4076
-
4077
- }, {
4078
- key: "_handleWindowResize",
4079
- value: function _handleWindowResize() {
4080
- this._setTabsAndTabWidth();
4081
-
4082
- if (this.tabWidth !== 0 && this.tabsWidth !== 0) {
4083
- this._indicator.style.left = this._calcLeftPos(this.$activeTabLink) + 'px';
4084
- this._indicator.style.right = this._calcRightPos(this.$activeTabLink) + 'px';
4085
- }
4086
- }
4087
-
4088
- /**
4089
- * Handle tab click
4090
- * @param {Event} e
4091
- */
4092
-
4093
- }, {
4094
- key: "_handleTabClick",
4095
- value: function _handleTabClick(e) {
4096
- var _this23 = this;
4097
-
4098
- var tab = $(e.target).closest('li.tab');
4099
- var tabLink = $(e.target).closest('a');
4100
-
4101
- // Handle click on tab link only
4102
- if (!tabLink.length || !tabLink.parent().hasClass('tab')) {
4103
- return;
4104
- }
4105
-
4106
- if (tab.hasClass('disabled')) {
4107
- e.preventDefault();
4108
- return;
4109
- }
4110
-
4111
- // Act as regular link if target attribute is specified.
4112
- if (!!tabLink.attr('target')) {
4113
- return;
4114
- }
4115
-
4116
- // Make the old tab inactive.
4117
- this.$activeTabLink.removeClass('active');
4118
- var $oldContent = this.$content;
4119
-
4120
- // Update the variables with the new link and content
4121
- this.$activeTabLink = tabLink;
4122
- this.$content = $(M.escapeHash(tabLink[0].hash));
4123
- this.$tabLinks = this.$el.children('li.tab').children('a');
4124
-
4125
- // Make the tab active.
4126
- this.$activeTabLink.addClass('active');
4127
- var prevIndex = this.index;
4128
- this.index = Math.max(this.$tabLinks.index(tabLink), 0);
4129
-
4130
- // Swap content
4131
- if (this.options.swipeable) {
4132
- if (this._tabsCarousel) {
4133
- this._tabsCarousel.set(this.index, function () {
4134
- if (typeof _this23.options.onShow === 'function') {
4135
- _this23.options.onShow.call(_this23, _this23.$content[0]);
4136
- }
4137
- });
4138
- }
4139
- } else {
4140
- if (this.$content.length) {
4141
- this.$content[0].style.display = 'block';
4142
- this.$content.addClass('active');
4143
- if (typeof this.options.onShow === 'function') {
4144
- this.options.onShow.call(this, this.$content[0]);
4145
- }
4146
-
4147
- if ($oldContent.length && !$oldContent.is(this.$content)) {
4148
- $oldContent[0].style.display = 'none';
4149
- $oldContent.removeClass('active');
4150
- }
4151
- }
4152
- }
4153
-
4154
- // Update widths after content is swapped (scrollbar bugfix)
4155
- this._setTabsAndTabWidth();
4156
-
4157
- // Update indicator
4158
- this._animateIndicator(prevIndex);
4159
-
4160
- // Prevent the anchor's default click action
4161
- e.preventDefault();
4162
- }
4163
-
4164
- /**
4165
- * Generate elements for tab indicator.
4166
- */
4167
-
4168
- }, {
4169
- key: "_createIndicator",
4170
- value: function _createIndicator() {
4171
- var _this24 = this;
4172
-
4173
- var indicator = document.createElement('li');
4174
- indicator.classList.add('indicator');
4175
-
4176
- this.el.appendChild(indicator);
4177
- this._indicator = indicator;
4178
-
4179
- setTimeout(function () {
4180
- _this24._indicator.style.left = _this24._calcLeftPos(_this24.$activeTabLink) + 'px';
4181
- _this24._indicator.style.right = _this24._calcRightPos(_this24.$activeTabLink) + 'px';
4182
- }, 0);
4183
- }
4184
-
4185
- /**
4186
- * Setup first active tab link.
4187
- */
4188
-
4189
- }, {
4190
- key: "_setupActiveTabLink",
4191
- value: function _setupActiveTabLink() {
4192
- // If the location.hash matches one of the links, use that as the active tab.
4193
- this.$activeTabLink = $(this.$tabLinks.filter('[href="' + location.hash + '"]'));
4194
-
4195
- // If no match is found, use the first link or any with class 'active' as the initial active tab.
4196
- if (this.$activeTabLink.length === 0) {
4197
- this.$activeTabLink = this.$el.children('li.tab').children('a.active').first();
4198
- }
4199
- if (this.$activeTabLink.length === 0) {
4200
- this.$activeTabLink = this.$el.children('li.tab').children('a').first();
4201
- }
4202
-
4203
- this.$tabLinks.removeClass('active');
4204
- this.$activeTabLink[0].classList.add('active');
4205
-
4206
- this.index = Math.max(this.$tabLinks.index(this.$activeTabLink), 0);
4207
-
4208
- if (this.$activeTabLink.length) {
4209
- this.$content = $(M.escapeHash(this.$activeTabLink[0].hash));
4210
- this.$content.addClass('active');
4211
- }
4212
- }
4213
-
4214
- /**
4215
- * Setup swipeable tabs
4216
- */
4217
-
4218
- }, {
4219
- key: "_setupSwipeableTabs",
4220
- value: function _setupSwipeableTabs() {
4221
- var _this25 = this;
4222
-
4223
- // Change swipeable according to responsive threshold
4224
- if (window.innerWidth > this.options.responsiveThreshold) {
4225
- this.options.swipeable = false;
4226
- }
4227
-
4228
- var $tabsContent = $();
4229
- this.$tabLinks.each(function (link) {
4230
- var $currContent = $(M.escapeHash(link.hash));
4231
- $currContent.addClass('carousel-item');
4232
- $tabsContent = $tabsContent.add($currContent);
4233
- });
4234
-
4235
- var $tabsWrapper = $('<div class="tabs-content carousel carousel-slider"></div>');
4236
- $tabsContent.first().before($tabsWrapper);
4237
- $tabsWrapper.append($tabsContent);
4238
- $tabsContent[0].style.display = '';
4239
-
4240
- // Keep active tab index to set initial carousel slide
4241
- var activeTabIndex = this.$activeTabLink.closest('.tab').index();
4242
-
4243
- this._tabsCarousel = M.Carousel.init($tabsWrapper[0], {
4244
- fullWidth: true,
4245
- noWrap: true,
4246
- onCycleTo: function (item) {
4247
- var prevIndex = _this25.index;
4248
- _this25.index = $(item).index();
4249
- _this25.$activeTabLink.removeClass('active');
4250
- _this25.$activeTabLink = _this25.$tabLinks.eq(_this25.index);
4251
- _this25.$activeTabLink.addClass('active');
4252
- _this25._animateIndicator(prevIndex);
4253
- if (typeof _this25.options.onShow === 'function') {
4254
- _this25.options.onShow.call(_this25, _this25.$content[0]);
4255
- }
4256
- }
4257
- });
4258
-
4259
- // Set initial carousel slide to active tab
4260
- this._tabsCarousel.set(activeTabIndex);
4261
- }
4262
-
4263
- /**
4264
- * Teardown normal tabs.
4265
- */
4266
-
4267
- }, {
4268
- key: "_teardownSwipeableTabs",
4269
- value: function _teardownSwipeableTabs() {
4270
- var $tabsWrapper = this._tabsCarousel.$el;
4271
- this._tabsCarousel.destroy();
4272
-
4273
- // Unwrap
4274
- $tabsWrapper.after($tabsWrapper.children());
4275
- $tabsWrapper.remove();
4276
- }
4277
-
4278
- /**
4279
- * Setup normal tabs.
4280
- */
4281
-
4282
- }, {
4283
- key: "_setupNormalTabs",
4284
- value: function _setupNormalTabs() {
4285
- // Hide Tabs Content
4286
- this.$tabLinks.not(this.$activeTabLink).each(function (link) {
4287
- if (!!link.hash) {
4288
- var $currContent = $(M.escapeHash(link.hash));
4289
- if ($currContent.length) {
4290
- $currContent[0].style.display = 'none';
4291
- }
4292
- }
4293
- });
4294
- }
4295
-
4296
- /**
4297
- * Teardown normal tabs.
4298
- */
4299
-
4300
- }, {
4301
- key: "_teardownNormalTabs",
4302
- value: function _teardownNormalTabs() {
4303
- // show Tabs Content
4304
- this.$tabLinks.each(function (link) {
4305
- if (!!link.hash) {
4306
- var $currContent = $(M.escapeHash(link.hash));
4307
- if ($currContent.length) {
4308
- $currContent[0].style.display = '';
4309
- }
4310
- }
4311
- });
4312
- }
4313
-
4314
- /**
4315
- * set tabs and tab width
4316
- */
4317
-
4318
- }, {
4319
- key: "_setTabsAndTabWidth",
4320
- value: function _setTabsAndTabWidth() {
4321
- this.tabsWidth = this.$el.width();
4322
- this.tabWidth = Math.max(this.tabsWidth, this.el.scrollWidth) / this.$tabLinks.length;
4323
- }
4324
-
4325
- /**
4326
- * Finds right attribute for indicator based on active tab.
4327
- * @param {cash} el
4328
- */
4329
-
4330
- }, {
4331
- key: "_calcRightPos",
4332
- value: function _calcRightPos(el) {
4333
- return Math.ceil(this.tabsWidth - el.position().left - el[0].getBoundingClientRect().width);
4334
- }
4335
-
4336
- /**
4337
- * Finds left attribute for indicator based on active tab.
4338
- * @param {cash} el
4339
- */
4340
-
4341
- }, {
4342
- key: "_calcLeftPos",
4343
- value: function _calcLeftPos(el) {
4344
- return Math.floor(el.position().left);
4345
- }
4346
- }, {
4347
- key: "updateTabIndicator",
4348
- value: function updateTabIndicator() {
4349
- this._setTabsAndTabWidth();
4350
- this._animateIndicator(this.index);
4351
- }
4352
-
4353
- /**
4354
- * Animates Indicator to active tab.
4355
- * @param {Number} prevIndex
4356
- */
4357
-
4358
- }, {
4359
- key: "_animateIndicator",
4360
- value: function _animateIndicator(prevIndex) {
4361
- var leftDelay = 0,
4362
- rightDelay = 0;
4363
-
4364
- if (this.index - prevIndex >= 0) {
4365
- leftDelay = 90;
4366
- } else {
4367
- rightDelay = 90;
4368
- }
4369
-
4370
- // Animate
4371
- var animOptions = {
4372
- targets: this._indicator,
4373
- left: {
4374
- value: this._calcLeftPos(this.$activeTabLink),
4375
- delay: leftDelay
4376
- },
4377
- right: {
4378
- value: this._calcRightPos(this.$activeTabLink),
4379
- delay: rightDelay
4380
- },
4381
- duration: this.options.duration,
4382
- easing: 'easeOutQuad'
4383
- };
4384
- anim.remove(this._indicator);
4385
- anim(animOptions);
4386
- }
4387
-
4388
- /**
4389
- * Select tab.
4390
- * @param {String} tabId
4391
- */
4392
-
4393
- }, {
4394
- key: "select",
4395
- value: function select(tabId) {
4396
- var tab = this.$tabLinks.filter('[href="#' + tabId + '"]');
4397
- if (tab.length) {
4398
- tab.trigger('click');
4399
- }
4400
- }
4401
- }], [{
4402
- key: "init",
4403
- value: function init(els, options) {
4404
- return _get(Tabs.__proto__ || Object.getPrototypeOf(Tabs), "init", this).call(this, this, els, options);
4405
- }
4406
-
4407
- /**
4408
- * Get Instance
4409
- */
4410
-
4411
- }, {
4412
- key: "getInstance",
4413
- value: function getInstance(el) {
4414
- var domElem = !!el.jquery ? el[0] : el;
4415
- return domElem.M_Tabs;
4416
- }
4417
- }, {
4418
- key: "defaults",
4419
- get: function () {
4420
- return _defaults;
4421
- }
4422
- }]);
4423
-
4424
- return Tabs;
4425
- }(Component);
4426
-
4427
- M.Tabs = Tabs;
4428
-
4429
- if (M.jQueryLoaded) {
4430
- M.initializeJqueryWrapper(Tabs, 'tabs', 'M_Tabs');
4431
- }
4432
- })(cash, M.anime);
4433
- ;(function ($, anim) {
4434
- 'use strict';
4435
-
4436
- var _defaults = {
4437
- exitDelay: 200,
4438
- enterDelay: 0,
4439
- html: null,
4440
- margin: 5,
4441
- inDuration: 250,
4442
- outDuration: 200,
4443
- position: 'bottom',
4444
- transitionMovement: 10
4445
- };
4446
-
4447
- /**
4448
- * @class
4449
- *
4450
- */
4451
-
4452
- var Tooltip = function (_Component7) {
4453
- _inherits(Tooltip, _Component7);
4454
-
4455
- /**
4456
- * Construct Tooltip instance
4457
- * @constructor
4458
- * @param {Element} el
4459
- * @param {Object} options
4460
- */
4461
- function Tooltip(el, options) {
4462
- _classCallCheck(this, Tooltip);
4463
-
4464
- var _this26 = _possibleConstructorReturn(this, (Tooltip.__proto__ || Object.getPrototypeOf(Tooltip)).call(this, Tooltip, el, options));
4465
-
4466
- _this26.el.M_Tooltip = _this26;
4467
- _this26.options = $.extend({}, Tooltip.defaults, options);
4468
-
4469
- _this26.isOpen = false;
4470
- _this26.isHovered = false;
4471
- _this26.isFocused = false;
4472
- _this26._appendTooltipEl();
4473
- _this26._setupEventHandlers();
4474
- return _this26;
4475
- }
4476
-
4477
- _createClass(Tooltip, [{
4478
- key: "destroy",
4479
-
4480
-
4481
- /**
4482
- * Teardown component
4483
- */
4484
- value: function destroy() {
4485
- $(this.tooltipEl).remove();
4486
- this._removeEventHandlers();
4487
- this.el.M_Tooltip = undefined;
4488
- }
4489
- }, {
4490
- key: "_appendTooltipEl",
4491
- value: function _appendTooltipEl() {
4492
- var tooltipEl = document.createElement('div');
4493
- tooltipEl.classList.add('material-tooltip');
4494
- this.tooltipEl = tooltipEl;
4495
-
4496
- var tooltipContentEl = document.createElement('div');
4497
- tooltipContentEl.classList.add('tooltip-content');
4498
- tooltipContentEl.innerHTML = this.options.html;
4499
- tooltipEl.appendChild(tooltipContentEl);
4500
- document.body.appendChild(tooltipEl);
4501
- }
4502
- }, {
4503
- key: "_updateTooltipContent",
4504
- value: function _updateTooltipContent() {
4505
- this.tooltipEl.querySelector('.tooltip-content').innerHTML = this.options.html;
4506
- }
4507
- }, {
4508
- key: "_setupEventHandlers",
4509
- value: function _setupEventHandlers() {
4510
- this._handleMouseEnterBound = this._handleMouseEnter.bind(this);
4511
- this._handleMouseLeaveBound = this._handleMouseLeave.bind(this);
4512
- this._handleFocusBound = this._handleFocus.bind(this);
4513
- this._handleBlurBound = this._handleBlur.bind(this);
4514
- this.el.addEventListener('mouseenter', this._handleMouseEnterBound);
4515
- this.el.addEventListener('mouseleave', this._handleMouseLeaveBound);
4516
- this.el.addEventListener('focus', this._handleFocusBound, true);
4517
- this.el.addEventListener('blur', this._handleBlurBound, true);
4518
- }
4519
- }, {
4520
- key: "_removeEventHandlers",
4521
- value: function _removeEventHandlers() {
4522
- this.el.removeEventListener('mouseenter', this._handleMouseEnterBound);
4523
- this.el.removeEventListener('mouseleave', this._handleMouseLeaveBound);
4524
- this.el.removeEventListener('focus', this._handleFocusBound, true);
4525
- this.el.removeEventListener('blur', this._handleBlurBound, true);
4526
- }
4527
- }, {
4528
- key: "open",
4529
- value: function open(isManual) {
4530
- if (this.isOpen) {
4531
- return;
4532
- }
4533
- isManual = isManual === undefined ? true : undefined; // Default value true
4534
- this.isOpen = true;
4535
- // Update tooltip content with HTML attribute options
4536
- this.options = $.extend({}, this.options, this._getAttributeOptions());
4537
- this._updateTooltipContent();
4538
- this._setEnterDelayTimeout(isManual);
4539
- }
4540
- }, {
4541
- key: "close",
4542
- value: function close() {
4543
- if (!this.isOpen) {
4544
- return;
4545
- }
4546
-
4547
- this.isHovered = false;
4548
- this.isFocused = false;
4549
- this.isOpen = false;
4550
- this._setExitDelayTimeout();
4551
- }
4552
-
4553
- /**
4554
- * Create timeout which delays when the tooltip closes
4555
- */
4556
-
4557
- }, {
4558
- key: "_setExitDelayTimeout",
4559
- value: function _setExitDelayTimeout() {
4560
- var _this27 = this;
4561
-
4562
- clearTimeout(this._exitDelayTimeout);
4563
-
4564
- this._exitDelayTimeout = setTimeout(function () {
4565
- if (_this27.isHovered || _this27.isFocused) {
4566
- return;
4567
- }
4568
-
4569
- _this27._animateOut();
4570
- }, this.options.exitDelay);
4571
- }
4572
-
4573
- /**
4574
- * Create timeout which delays when the toast closes
4575
- */
4576
-
4577
- }, {
4578
- key: "_setEnterDelayTimeout",
4579
- value: function _setEnterDelayTimeout(isManual) {
4580
- var _this28 = this;
4581
-
4582
- clearTimeout(this._enterDelayTimeout);
4583
-
4584
- this._enterDelayTimeout = setTimeout(function () {
4585
- if (!_this28.isHovered && !_this28.isFocused && !isManual) {
4586
- return;
4587
- }
4588
-
4589
- _this28._animateIn();
4590
- }, this.options.enterDelay);
4591
- }
4592
- }, {
4593
- key: "_positionTooltip",
4594
- value: function _positionTooltip() {
4595
- var origin = this.el,
4596
- tooltip = this.tooltipEl,
4597
- originHeight = origin.offsetHeight,
4598
- originWidth = origin.offsetWidth,
4599
- tooltipHeight = tooltip.offsetHeight,
4600
- tooltipWidth = tooltip.offsetWidth,
4601
- newCoordinates = void 0,
4602
- margin = this.options.margin,
4603
- targetTop = void 0,
4604
- targetLeft = void 0;
4605
-
4606
- this.xMovement = 0, this.yMovement = 0;
4607
-
4608
- targetTop = origin.getBoundingClientRect().top + M.getDocumentScrollTop();
4609
- targetLeft = origin.getBoundingClientRect().left + M.getDocumentScrollLeft();
4610
-
4611
- if (this.options.position === 'top') {
4612
- targetTop += -tooltipHeight - margin;
4613
- targetLeft += originWidth / 2 - tooltipWidth / 2;
4614
- this.yMovement = -this.options.transitionMovement;
4615
- } else if (this.options.position === 'right') {
4616
- targetTop += originHeight / 2 - tooltipHeight / 2;
4617
- targetLeft += originWidth + margin;
4618
- this.xMovement = this.options.transitionMovement;
4619
- } else if (this.options.position === 'left') {
4620
- targetTop += originHeight / 2 - tooltipHeight / 2;
4621
- targetLeft += -tooltipWidth - margin;
4622
- this.xMovement = -this.options.transitionMovement;
4623
- } else {
4624
- targetTop += originHeight + margin;
4625
- targetLeft += originWidth / 2 - tooltipWidth / 2;
4626
- this.yMovement = this.options.transitionMovement;
4627
- }
4628
-
4629
- newCoordinates = this._repositionWithinScreen(targetLeft, targetTop, tooltipWidth, tooltipHeight);
4630
- $(tooltip).css({
4631
- top: newCoordinates.y + 'px',
4632
- left: newCoordinates.x + 'px'
4633
- });
4634
- }
4635
- }, {
4636
- key: "_repositionWithinScreen",
4637
- value: function _repositionWithinScreen(x, y, width, height) {
4638
- var scrollLeft = M.getDocumentScrollLeft();
4639
- var scrollTop = M.getDocumentScrollTop();
4640
- var newX = x - scrollLeft;
4641
- var newY = y - scrollTop;
4642
-
4643
- var bounding = {
4644
- left: newX,
4645
- top: newY,
4646
- width: width,
4647
- height: height
4648
- };
4649
-
4650
- var offset = this.options.margin + this.options.transitionMovement;
4651
- var edges = M.checkWithinContainer(document.body, bounding, offset);
4652
-
4653
- if (edges.left) {
4654
- newX = offset;
4655
- } else if (edges.right) {
4656
- newX -= newX + width - window.innerWidth;
4657
- }
4658
-
4659
- if (edges.top) {
4660
- newY = offset;
4661
- } else if (edges.bottom) {
4662
- newY -= newY + height - window.innerHeight;
4663
- }
4664
-
4665
- return {
4666
- x: newX + scrollLeft,
4667
- y: newY + scrollTop
4668
- };
4669
- }
4670
- }, {
4671
- key: "_animateIn",
4672
- value: function _animateIn() {
4673
- this._positionTooltip();
4674
- this.tooltipEl.style.visibility = 'visible';
4675
- anim.remove(this.tooltipEl);
4676
- anim({
4677
- targets: this.tooltipEl,
4678
- opacity: 1,
4679
- translateX: this.xMovement,
4680
- translateY: this.yMovement,
4681
- duration: this.options.inDuration,
4682
- easing: 'easeOutCubic'
4683
- });
4684
- }
4685
- }, {
4686
- key: "_animateOut",
4687
- value: function _animateOut() {
4688
- anim.remove(this.tooltipEl);
4689
- anim({
4690
- targets: this.tooltipEl,
4691
- opacity: 0,
4692
- translateX: 0,
4693
- translateY: 0,
4694
- duration: this.options.outDuration,
4695
- easing: 'easeOutCubic'
4696
- });
4697
- }
4698
- }, {
4699
- key: "_handleMouseEnter",
4700
- value: function _handleMouseEnter() {
4701
- this.isHovered = true;
4702
- this.isFocused = false; // Allows close of tooltip when opened by focus.
4703
- this.open(false);
4704
- }
4705
- }, {
4706
- key: "_handleMouseLeave",
4707
- value: function _handleMouseLeave() {
4708
- this.isHovered = false;
4709
- this.isFocused = false; // Allows close of tooltip when opened by focus.
4710
- this.close();
4711
- }
4712
- }, {
4713
- key: "_handleFocus",
4714
- value: function _handleFocus() {
4715
- if (M.tabPressed) {
4716
- this.isFocused = true;
4717
- this.open(false);
4718
- }
4719
- }
4720
- }, {
4721
- key: "_handleBlur",
4722
- value: function _handleBlur() {
4723
- this.isFocused = false;
4724
- this.close();
4725
- }
4726
- }, {
4727
- key: "_getAttributeOptions",
4728
- value: function _getAttributeOptions() {
4729
- var attributeOptions = {};
4730
- var tooltipTextOption = this.el.getAttribute('data-tooltip');
4731
- var positionOption = this.el.getAttribute('data-position');
4732
-
4733
- if (tooltipTextOption) {
4734
- attributeOptions.html = tooltipTextOption;
4735
- }
4736
-
4737
- if (positionOption) {
4738
- attributeOptions.position = positionOption;
4739
- }
4740
- return attributeOptions;
4741
- }
4742
- }], [{
4743
- key: "init",
4744
- value: function init(els, options) {
4745
- return _get(Tooltip.__proto__ || Object.getPrototypeOf(Tooltip), "init", this).call(this, this, els, options);
4746
- }
4747
-
4748
- /**
4749
- * Get Instance
4750
- */
4751
-
4752
- }, {
4753
- key: "getInstance",
4754
- value: function getInstance(el) {
4755
- var domElem = !!el.jquery ? el[0] : el;
4756
- return domElem.M_Tooltip;
4757
- }
4758
- }, {
4759
- key: "defaults",
4760
- get: function () {
4761
- return _defaults;
4762
- }
4763
- }]);
4764
-
4765
- return Tooltip;
4766
- }(Component);
4767
-
4768
- M.Tooltip = Tooltip;
4769
-
4770
- if (M.jQueryLoaded) {
4771
- M.initializeJqueryWrapper(Tooltip, 'tooltip', 'M_Tooltip');
4772
- }
4773
- })(cash, M.anime);
4774
- ; /*!
4775
- * Waves v0.6.4
4776
- * http://fian.my.id/Waves
4777
- *
4778
- * Copyright 2014 Alfiana E. Sibuea and other contributors
4779
- * Released under the MIT license
4780
- * https://github.com/fians/Waves/blob/master/LICENSE
4781
- */
4782
-
4783
- ;(function (window) {
4784
- 'use strict';
4785
-
4786
- var Waves = Waves || {};
4787
- var $$ = document.querySelectorAll.bind(document);
4788
-
4789
- // Find exact position of element
4790
- function isWindow(obj) {
4791
- return obj !== null && obj === obj.window;
4792
- }
4793
-
4794
- function getWindow(elem) {
4795
- return isWindow(elem) ? elem : elem.nodeType === 9 && elem.defaultView;
4796
- }
4797
-
4798
- function offset(elem) {
4799
- var docElem,
4800
- win,
4801
- box = { top: 0, left: 0 },
4802
- doc = elem && elem.ownerDocument;
4803
-
4804
- docElem = doc.documentElement;
4805
-
4806
- if (typeof elem.getBoundingClientRect !== typeof undefined) {
4807
- box = elem.getBoundingClientRect();
4808
- }
4809
- win = getWindow(doc);
4810
- return {
4811
- top: box.top + win.pageYOffset - docElem.clientTop,
4812
- left: box.left + win.pageXOffset - docElem.clientLeft
4813
- };
4814
- }
4815
-
4816
- function convertStyle(obj) {
4817
- var style = '';
4818
-
4819
- for (var a in obj) {
4820
- if (obj.hasOwnProperty(a)) {
4821
- style += a + ':' + obj[a] + ';';
4822
- }
4823
- }
4824
-
4825
- return style;
4826
- }
4827
-
4828
- var Effect = {
4829
-
4830
- // Effect delay
4831
- duration: 750,
4832
-
4833
- show: function (e, element) {
4834
-
4835
- // Disable right click
4836
- if (e.button === 2) {
4837
- return false;
4838
- }
4839
-
4840
- var el = element || this;
4841
-
4842
- // Create ripple
4843
- var ripple = document.createElement('div');
4844
- ripple.className = 'waves-ripple';
4845
- el.appendChild(ripple);
4846
-
4847
- // Get click coordinate and element witdh
4848
- var pos = offset(el);
4849
- var relativeY = e.pageY - pos.top;
4850
- var relativeX = e.pageX - pos.left;
4851
- var scale = 'scale(' + el.clientWidth / 100 * 10 + ')';
4852
-
4853
- // Support for touch devices
4854
- if ('touches' in e) {
4855
- relativeY = e.touches[0].pageY - pos.top;
4856
- relativeX = e.touches[0].pageX - pos.left;
4857
- }
4858
-
4859
- // Attach data to element
4860
- ripple.setAttribute('data-hold', Date.now());
4861
- ripple.setAttribute('data-scale', scale);
4862
- ripple.setAttribute('data-x', relativeX);
4863
- ripple.setAttribute('data-y', relativeY);
4864
-
4865
- // Set ripple position
4866
- var rippleStyle = {
4867
- 'top': relativeY + 'px',
4868
- 'left': relativeX + 'px'
4869
- };
4870
-
4871
- ripple.className = ripple.className + ' waves-notransition';
4872
- ripple.setAttribute('style', convertStyle(rippleStyle));
4873
- ripple.className = ripple.className.replace('waves-notransition', '');
4874
-
4875
- // Scale the ripple
4876
- rippleStyle['-webkit-transform'] = scale;
4877
- rippleStyle['-moz-transform'] = scale;
4878
- rippleStyle['-ms-transform'] = scale;
4879
- rippleStyle['-o-transform'] = scale;
4880
- rippleStyle.transform = scale;
4881
- rippleStyle.opacity = '1';
4882
-
4883
- rippleStyle['-webkit-transition-duration'] = Effect.duration + 'ms';
4884
- rippleStyle['-moz-transition-duration'] = Effect.duration + 'ms';
4885
- rippleStyle['-o-transition-duration'] = Effect.duration + 'ms';
4886
- rippleStyle['transition-duration'] = Effect.duration + 'ms';
4887
-
4888
- rippleStyle['-webkit-transition-timing-function'] = 'cubic-bezier(0.250, 0.460, 0.450, 0.940)';
4889
- rippleStyle['-moz-transition-timing-function'] = 'cubic-bezier(0.250, 0.460, 0.450, 0.940)';
4890
- rippleStyle['-o-transition-timing-function'] = 'cubic-bezier(0.250, 0.460, 0.450, 0.940)';
4891
- rippleStyle['transition-timing-function'] = 'cubic-bezier(0.250, 0.460, 0.450, 0.940)';
4892
-
4893
- ripple.setAttribute('style', convertStyle(rippleStyle));
4894
- },
4895
-
4896
- hide: function (e) {
4897
- TouchHandler.touchup(e);
4898
-
4899
- var el = this;
4900
- var width = el.clientWidth * 1.4;
4901
-
4902
- // Get first ripple
4903
- var ripple = null;
4904
- var ripples = el.getElementsByClassName('waves-ripple');
4905
- if (ripples.length > 0) {
4906
- ripple = ripples[ripples.length - 1];
4907
- } else {
4908
- return false;
4909
- }
4910
-
4911
- var relativeX = ripple.getAttribute('data-x');
4912
- var relativeY = ripple.getAttribute('data-y');
4913
- var scale = ripple.getAttribute('data-scale');
4914
-
4915
- // Get delay beetween mousedown and mouse leave
4916
- var diff = Date.now() - Number(ripple.getAttribute('data-hold'));
4917
- var delay = 350 - diff;
4918
-
4919
- if (delay < 0) {
4920
- delay = 0;
4921
- }
4922
-
4923
- // Fade out ripple after delay
4924
- setTimeout(function () {
4925
- var style = {
4926
- 'top': relativeY + 'px',
4927
- 'left': relativeX + 'px',
4928
- 'opacity': '0',
4929
-
4930
- // Duration
4931
- '-webkit-transition-duration': Effect.duration + 'ms',
4932
- '-moz-transition-duration': Effect.duration + 'ms',
4933
- '-o-transition-duration': Effect.duration + 'ms',
4934
- 'transition-duration': Effect.duration + 'ms',
4935
- '-webkit-transform': scale,
4936
- '-moz-transform': scale,
4937
- '-ms-transform': scale,
4938
- '-o-transform': scale,
4939
- 'transform': scale
4940
- };
4941
-
4942
- ripple.setAttribute('style', convertStyle(style));
4943
-
4944
- setTimeout(function () {
4945
- try {
4946
- el.removeChild(ripple);
4947
- } catch (e) {
4948
- return false;
4949
- }
4950
- }, Effect.duration);
4951
- }, delay);
4952
- },
4953
-
4954
- // Little hack to make <input> can perform waves effect
4955
- wrapInput: function (elements) {
4956
- for (var a = 0; a < elements.length; a++) {
4957
- var el = elements[a];
4958
-
4959
- if (el.tagName.toLowerCase() === 'input') {
4960
- var parent = el.parentNode;
4961
-
4962
- // If input already have parent just pass through
4963
- if (parent.tagName.toLowerCase() === 'i' && parent.className.indexOf('waves-effect') !== -1) {
4964
- continue;
4965
- }
4966
-
4967
- // Put element class and style to the specified parent
4968
- var wrapper = document.createElement('i');
4969
- wrapper.className = el.className + ' waves-input-wrapper';
4970
-
4971
- var elementStyle = el.getAttribute('style');
4972
-
4973
- if (!elementStyle) {
4974
- elementStyle = '';
4975
- }
4976
-
4977
- wrapper.setAttribute('style', elementStyle);
4978
-
4979
- el.className = 'waves-button-input';
4980
- el.removeAttribute('style');
4981
-
4982
- // Put element as child
4983
- parent.replaceChild(wrapper, el);
4984
- wrapper.appendChild(el);
4985
- }
4986
- }
4987
- }
4988
- };
4989
-
4990
- /**
4991
- * Disable mousedown event for 500ms during and after touch
4992
- */
4993
- var TouchHandler = {
4994
- /* uses an integer rather than bool so there's no issues with
4995
- * needing to clear timeouts if another touch event occurred
4996
- * within the 500ms. Cannot mouseup between touchstart and
4997
- * touchend, nor in the 500ms after touchend. */
4998
- touches: 0,
4999
- allowEvent: function (e) {
5000
- var allow = true;
5001
-
5002
- if (e.type === 'touchstart') {
5003
- TouchHandler.touches += 1; //push
5004
- } else if (e.type === 'touchend' || e.type === 'touchcancel') {
5005
- setTimeout(function () {
5006
- if (TouchHandler.touches > 0) {
5007
- TouchHandler.touches -= 1; //pop after 500ms
5008
- }
5009
- }, 500);
5010
- } else if (e.type === 'mousedown' && TouchHandler.touches > 0) {
5011
- allow = false;
5012
- }
5013
-
5014
- return allow;
5015
- },
5016
- touchup: function (e) {
5017
- TouchHandler.allowEvent(e);
5018
- }
5019
- };
5020
-
5021
- /**
5022
- * Delegated click handler for .waves-effect element.
5023
- * returns null when .waves-effect element not in "click tree"
5024
- */
5025
- function getWavesEffectElement(e) {
5026
- if (TouchHandler.allowEvent(e) === false) {
5027
- return null;
5028
- }
5029
-
5030
- var element = null;
5031
- var target = e.target || e.srcElement;
5032
-
5033
- while (target.parentNode !== null) {
5034
- if (!(target instanceof SVGElement) && target.className.indexOf('waves-effect') !== -1) {
5035
- element = target;
5036
- break;
5037
- }
5038
- target = target.parentNode;
5039
- }
5040
- return element;
5041
- }
5042
-
5043
- /**
5044
- * Bubble the click and show effect if .waves-effect elem was found
5045
- */
5046
- function showEffect(e) {
5047
- var element = getWavesEffectElement(e);
5048
-
5049
- if (element !== null) {
5050
- Effect.show(e, element);
5051
-
5052
- if ('ontouchstart' in window) {
5053
- element.addEventListener('touchend', Effect.hide, false);
5054
- element.addEventListener('touchcancel', Effect.hide, false);
5055
- }
5056
-
5057
- element.addEventListener('mouseup', Effect.hide, false);
5058
- element.addEventListener('mouseleave', Effect.hide, false);
5059
- element.addEventListener('dragend', Effect.hide, false);
5060
- }
5061
- }
5062
-
5063
- Waves.displayEffect = function (options) {
5064
- options = options || {};
5065
-
5066
- if ('duration' in options) {
5067
- Effect.duration = options.duration;
5068
- }
5069
-
5070
- //Wrap input inside <i> tag
5071
- Effect.wrapInput($$('.waves-effect'));
5072
-
5073
- if ('ontouchstart' in window) {
5074
- document.body.addEventListener('touchstart', showEffect, false);
5075
- }
5076
-
5077
- document.body.addEventListener('mousedown', showEffect, false);
5078
- };
5079
-
5080
- /**
5081
- * Attach Waves to an input element (or any element which doesn't
5082
- * bubble mouseup/mousedown events).
5083
- * Intended to be used with dynamically loaded forms/inputs, or
5084
- * where the user doesn't want a delegated click handler.
5085
- */
5086
- Waves.attach = function (element) {
5087
- //FUTURE: automatically add waves classes and allow users
5088
- // to specify them with an options param? Eg. light/classic/button
5089
- if (element.tagName.toLowerCase() === 'input') {
5090
- Effect.wrapInput([element]);
5091
- element = element.parentNode;
5092
- }
5093
-
5094
- if ('ontouchstart' in window) {
5095
- element.addEventListener('touchstart', showEffect, false);
5096
- }
5097
-
5098
- element.addEventListener('mousedown', showEffect, false);
5099
- };
5100
-
5101
- window.Waves = Waves;
5102
-
5103
- document.addEventListener('DOMContentLoaded', function () {
5104
- Waves.displayEffect();
5105
- }, false);
5106
- })(window);
5107
- ;(function ($, anim) {
5108
- 'use strict';
5109
-
5110
- var _defaults = {
5111
- html: '',
5112
- displayLength: 4000,
5113
- inDuration: 300,
5114
- outDuration: 375,
5115
- classes: '',
5116
- completeCallback: null,
5117
- activationPercent: 0.8
5118
- };
5119
-
5120
- var Toast = function () {
5121
- function Toast(options) {
5122
- _classCallCheck(this, Toast);
5123
-
5124
- /**
5125
- * Options for the toast
5126
- * @member Toast#options
5127
- */
5128
- this.options = $.extend({}, Toast.defaults, options);
5129
- this.message = this.options.html;
5130
-
5131
- /**
5132
- * Describes current pan state toast
5133
- * @type {Boolean}
5134
- */
5135
- this.panning = false;
5136
-
5137
- /**
5138
- * Time remaining until toast is removed
5139
- */
5140
- this.timeRemaining = this.options.displayLength;
5141
-
5142
- if (Toast._toasts.length === 0) {
5143
- Toast._createContainer();
5144
- }
5145
-
5146
- // Create new toast
5147
- Toast._toasts.push(this);
5148
- var toastElement = this._createToast();
5149
- toastElement.M_Toast = this;
5150
- this.el = toastElement;
5151
- this.$el = $(toastElement);
5152
- this._animateIn();
5153
- this._setTimer();
5154
- }
5155
-
5156
- _createClass(Toast, [{
5157
- key: "_createToast",
5158
-
5159
-
5160
- /**
5161
- * Create toast and append it to toast container
5162
- */
5163
- value: function _createToast() {
5164
- var toast = document.createElement('div');
5165
- toast.classList.add('toast');
5166
-
5167
- // Add custom classes onto toast
5168
- if (!!this.options.classes.length) {
5169
- $(toast).addClass(this.options.classes);
5170
- }
5171
-
5172
- // Set content
5173
- if (typeof HTMLElement === 'object' ? this.message instanceof HTMLElement : this.message && typeof this.message === 'object' && this.message !== null && this.message.nodeType === 1 && typeof this.message.nodeName === 'string') {
5174
- toast.appendChild(this.message);
5175
-
5176
- // Check if it is jQuery object
5177
- } else if (!!this.message.jquery) {
5178
- $(toast).append(this.message[0]);
5179
-
5180
- // Insert as html;
5181
- } else {
5182
- toast.innerHTML = this.message;
5183
- }
5184
-
5185
- // Append toasft
5186
- Toast._container.appendChild(toast);
5187
- return toast;
5188
- }
5189
-
5190
- /**
5191
- * Animate in toast
5192
- */
5193
-
5194
- }, {
5195
- key: "_animateIn",
5196
- value: function _animateIn() {
5197
- // Animate toast in
5198
- anim({
5199
- targets: this.el,
5200
- top: 0,
5201
- opacity: 1,
5202
- duration: this.options.inDuration,
5203
- easing: 'easeOutCubic'
5204
- });
5205
- }
5206
-
5207
- /**
5208
- * Create setInterval which automatically removes toast when timeRemaining >= 0
5209
- * has been reached
5210
- */
5211
-
5212
- }, {
5213
- key: "_setTimer",
5214
- value: function _setTimer() {
5215
- var _this29 = this;
5216
-
5217
- if (this.timeRemaining !== Infinity) {
5218
- this.counterInterval = setInterval(function () {
5219
- // If toast is not being dragged, decrease its time remaining
5220
- if (!_this29.panning) {
5221
- _this29.timeRemaining -= 20;
5222
- }
5223
-
5224
- // Animate toast out
5225
- if (_this29.timeRemaining <= 0) {
5226
- _this29.dismiss();
5227
- }
5228
- }, 20);
5229
- }
5230
- }
5231
-
5232
- /**
5233
- * Dismiss toast with animation
5234
- */
5235
-
5236
- }, {
5237
- key: "dismiss",
5238
- value: function dismiss() {
5239
- var _this30 = this;
5240
-
5241
- window.clearInterval(this.counterInterval);
5242
- var activationDistance = this.el.offsetWidth * this.options.activationPercent;
5243
-
5244
- if (this.wasSwiped) {
5245
- this.el.style.transition = 'transform .05s, opacity .05s';
5246
- this.el.style.transform = "translateX(" + activationDistance + "px)";
5247
- this.el.style.opacity = 0;
5248
- }
5249
-
5250
- anim({
5251
- targets: this.el,
5252
- opacity: 0,
5253
- marginTop: -40,
5254
- duration: this.options.outDuration,
5255
- easing: 'easeOutExpo',
5256
- complete: function () {
5257
- // Call the optional callback
5258
- if (typeof _this30.options.completeCallback === 'function') {
5259
- _this30.options.completeCallback();
5260
- }
5261
- // Remove toast from DOM
5262
- _this30.$el.remove();
5263
- Toast._toasts.splice(Toast._toasts.indexOf(_this30), 1);
5264
- if (Toast._toasts.length === 0) {
5265
- Toast._removeContainer();
5266
- }
5267
- }
5268
- });
5269
- }
5270
- }], [{
5271
- key: "getInstance",
5272
-
5273
-
5274
- /**
5275
- * Get Instance
5276
- */
5277
- value: function getInstance(el) {
5278
- var domElem = !!el.jquery ? el[0] : el;
5279
- return domElem.M_Toast;
5280
- }
5281
-
5282
- /**
5283
- * Append toast container and add event handlers
5284
- */
5285
-
5286
- }, {
5287
- key: "_createContainer",
5288
- value: function _createContainer() {
5289
- var container = document.createElement('div');
5290
- container.setAttribute('id', 'toast-container');
5291
-
5292
- // Add event handler
5293
- container.addEventListener('touchstart', Toast._onDragStart);
5294
- container.addEventListener('touchmove', Toast._onDragMove);
5295
- container.addEventListener('touchend', Toast._onDragEnd);
5296
-
5297
- container.addEventListener('mousedown', Toast._onDragStart);
5298
- document.addEventListener('mousemove', Toast._onDragMove);
5299
- document.addEventListener('mouseup', Toast._onDragEnd);
5300
-
5301
- document.body.appendChild(container);
5302
- Toast._container = container;
5303
- }
5304
-
5305
- /**
5306
- * Remove toast container and event handlers
5307
- */
5308
-
5309
- }, {
5310
- key: "_removeContainer",
5311
- value: function _removeContainer() {
5312
- // Add event handler
5313
- document.removeEventListener('mousemove', Toast._onDragMove);
5314
- document.removeEventListener('mouseup', Toast._onDragEnd);
5315
-
5316
- $(Toast._container).remove();
5317
- Toast._container = null;
5318
- }
5319
-
5320
- /**
5321
- * Begin drag handler
5322
- * @param {Event} e
5323
- */
5324
-
5325
- }, {
5326
- key: "_onDragStart",
5327
- value: function _onDragStart(e) {
5328
- if (e.target && $(e.target).closest('.toast').length) {
5329
- var $toast = $(e.target).closest('.toast');
5330
- var toast = $toast[0].M_Toast;
5331
- toast.panning = true;
5332
- Toast._draggedToast = toast;
5333
- toast.el.classList.add('panning');
5334
- toast.el.style.transition = '';
5335
- toast.startingXPos = Toast._xPos(e);
5336
- toast.time = Date.now();
5337
- toast.xPos = Toast._xPos(e);
5338
- }
5339
- }
5340
-
5341
- /**
5342
- * Drag move handler
5343
- * @param {Event} e
5344
- */
5345
-
5346
- }, {
5347
- key: "_onDragMove",
5348
- value: function _onDragMove(e) {
5349
- if (!!Toast._draggedToast) {
5350
- e.preventDefault();
5351
- var toast = Toast._draggedToast;
5352
- toast.deltaX = Math.abs(toast.xPos - Toast._xPos(e));
5353
- toast.xPos = Toast._xPos(e);
5354
- toast.velocityX = toast.deltaX / (Date.now() - toast.time);
5355
- toast.time = Date.now();
5356
-
5357
- var totalDeltaX = toast.xPos - toast.startingXPos;
5358
- var activationDistance = toast.el.offsetWidth * toast.options.activationPercent;
5359
- toast.el.style.transform = "translateX(" + totalDeltaX + "px)";
5360
- toast.el.style.opacity = 1 - Math.abs(totalDeltaX / activationDistance);
5361
- }
5362
- }
5363
-
5364
- /**
5365
- * End drag handler
5366
- */
5367
-
5368
- }, {
5369
- key: "_onDragEnd",
5370
- value: function _onDragEnd() {
5371
- if (!!Toast._draggedToast) {
5372
- var toast = Toast._draggedToast;
5373
- toast.panning = false;
5374
- toast.el.classList.remove('panning');
5375
-
5376
- var totalDeltaX = toast.xPos - toast.startingXPos;
5377
- var activationDistance = toast.el.offsetWidth * toast.options.activationPercent;
5378
- var shouldBeDismissed = Math.abs(totalDeltaX) > activationDistance || toast.velocityX > 1;
5379
-
5380
- // Remove toast
5381
- if (shouldBeDismissed) {
5382
- toast.wasSwiped = true;
5383
- toast.dismiss();
5384
-
5385
- // Animate toast back to original position
5386
- } else {
5387
- toast.el.style.transition = 'transform .2s, opacity .2s';
5388
- toast.el.style.transform = '';
5389
- toast.el.style.opacity = '';
5390
- }
5391
- Toast._draggedToast = null;
5392
- }
5393
- }
5394
-
5395
- /**
5396
- * Get x position of mouse or touch event
5397
- * @param {Event} e
5398
- */
5399
-
5400
- }, {
5401
- key: "_xPos",
5402
- value: function _xPos(e) {
5403
- if (e.targetTouches && e.targetTouches.length >= 1) {
5404
- return e.targetTouches[0].clientX;
5405
- }
5406
- // mouse event
5407
- return e.clientX;
5408
- }
5409
-
5410
- /**
5411
- * Remove all toasts
5412
- */
5413
-
5414
- }, {
5415
- key: "dismissAll",
5416
- value: function dismissAll() {
5417
- for (var toastIndex in Toast._toasts) {
5418
- Toast._toasts[toastIndex].dismiss();
5419
- }
5420
- }
5421
- }, {
5422
- key: "defaults",
5423
- get: function () {
5424
- return _defaults;
5425
- }
5426
- }]);
5427
-
5428
- return Toast;
5429
- }();
5430
-
5431
- /**
5432
- * @static
5433
- * @memberof Toast
5434
- * @type {Array.<Toast>}
5435
- */
5436
-
5437
-
5438
- Toast._toasts = [];
5439
-
5440
- /**
5441
- * @static
5442
- * @memberof Toast
5443
- */
5444
- Toast._container = null;
5445
-
5446
- /**
5447
- * @static
5448
- * @memberof Toast
5449
- * @type {Toast}
5450
- */
5451
- Toast._draggedToast = null;
5452
-
5453
- M.Toast = Toast;
5454
- M.toast = function (options) {
5455
- return new Toast(options);
5456
- };
5457
- })(cash, M.anime);
5458
- ;(function ($, anim) {
5459
- 'use strict';
5460
-
5461
- var _defaults = {
5462
- edge: 'left',
5463
- draggable: true,
5464
- inDuration: 250,
5465
- outDuration: 200,
5466
- onOpenStart: null,
5467
- onOpenEnd: null,
5468
- onCloseStart: null,
5469
- onCloseEnd: null,
5470
- preventScrolling: true
5471
- };
5472
-
5473
- /**
5474
- * @class
5475
- */
5476
-
5477
- var Sidenav = function (_Component8) {
5478
- _inherits(Sidenav, _Component8);
5479
-
5480
- /**
5481
- * Construct Sidenav instance and set up overlay
5482
- * @constructor
5483
- * @param {Element} el
5484
- * @param {Object} options
5485
- */
5486
- function Sidenav(el, options) {
5487
- _classCallCheck(this, Sidenav);
5488
-
5489
- var _this31 = _possibleConstructorReturn(this, (Sidenav.__proto__ || Object.getPrototypeOf(Sidenav)).call(this, Sidenav, el, options));
5490
-
5491
- _this31.el.M_Sidenav = _this31;
5492
- _this31.id = _this31.$el.attr('id');
5493
-
5494
- /**
5495
- * Options for the Sidenav
5496
- * @member Sidenav#options
5497
- * @prop {String} [edge='left'] - Side of screen on which Sidenav appears
5498
- * @prop {Boolean} [draggable=true] - Allow swipe gestures to open/close Sidenav
5499
- * @prop {Number} [inDuration=250] - Length in ms of enter transition
5500
- * @prop {Number} [outDuration=200] - Length in ms of exit transition
5501
- * @prop {Function} onOpenStart - Function called when sidenav starts entering
5502
- * @prop {Function} onOpenEnd - Function called when sidenav finishes entering
5503
- * @prop {Function} onCloseStart - Function called when sidenav starts exiting
5504
- * @prop {Function} onCloseEnd - Function called when sidenav finishes exiting
5505
- */
5506
- _this31.options = $.extend({}, Sidenav.defaults, options);
5507
-
5508
- /**
5509
- * Describes open/close state of Sidenav
5510
- * @type {Boolean}
5511
- */
5512
- _this31.isOpen = false;
5513
-
5514
- /**
5515
- * Describes if Sidenav is fixed
5516
- * @type {Boolean}
5517
- */
5518
- _this31.isFixed = _this31.el.classList.contains('sidenav-fixed');
5519
-
5520
- /**
5521
- * Describes if Sidenav is being draggeed
5522
- * @type {Boolean}
5523
- */
5524
- _this31.isDragged = false;
5525
-
5526
- // Window size variables for window resize checks
5527
- _this31.lastWindowWidth = window.innerWidth;
5528
- _this31.lastWindowHeight = window.innerHeight;
5529
-
5530
- _this31._createOverlay();
5531
- _this31._createDragTarget();
5532
- _this31._setupEventHandlers();
5533
- _this31._setupClasses();
5534
- _this31._setupFixed();
5535
-
5536
- Sidenav._sidenavs.push(_this31);
5537
- return _this31;
5538
- }
5539
-
5540
- _createClass(Sidenav, [{
5541
- key: "destroy",
5542
-
5543
-
5544
- /**
5545
- * Teardown component
5546
- */
5547
- value: function destroy() {
5548
- this._removeEventHandlers();
5549
- this._enableBodyScrolling();
5550
- this._overlay.parentNode.removeChild(this._overlay);
5551
- this.dragTarget.parentNode.removeChild(this.dragTarget);
5552
- this.el.M_Sidenav = undefined;
5553
- this.el.style.transform = '';
5554
-
5555
- var index = Sidenav._sidenavs.indexOf(this);
5556
- if (index >= 0) {
5557
- Sidenav._sidenavs.splice(index, 1);
5558
- }
5559
- }
5560
- }, {
5561
- key: "_createOverlay",
5562
- value: function _createOverlay() {
5563
- var overlay = document.createElement('div');
5564
- this._closeBound = this.close.bind(this);
5565
- overlay.classList.add('sidenav-overlay');
5566
-
5567
- overlay.addEventListener('click', this._closeBound);
5568
-
5569
- document.body.appendChild(overlay);
5570
- this._overlay = overlay;
5571
- }
5572
- }, {
5573
- key: "_setupEventHandlers",
5574
- value: function _setupEventHandlers() {
5575
- if (Sidenav._sidenavs.length === 0) {
5576
- document.body.addEventListener('click', this._handleTriggerClick);
5577
- }
5578
-
5579
- this._handleDragTargetDragBound = this._handleDragTargetDrag.bind(this);
5580
- this._handleDragTargetReleaseBound = this._handleDragTargetRelease.bind(this);
5581
- this._handleCloseDragBound = this._handleCloseDrag.bind(this);
5582
- this._handleCloseReleaseBound = this._handleCloseRelease.bind(this);
5583
- this._handleCloseTriggerClickBound = this._handleCloseTriggerClick.bind(this);
5584
-
5585
- this.dragTarget.addEventListener('touchmove', this._handleDragTargetDragBound);
5586
- this.dragTarget.addEventListener('touchend', this._handleDragTargetReleaseBound);
5587
- this._overlay.addEventListener('touchmove', this._handleCloseDragBound);
5588
- this._overlay.addEventListener('touchend', this._handleCloseReleaseBound);
5589
- this.el.addEventListener('touchmove', this._handleCloseDragBound);
5590
- this.el.addEventListener('touchend', this._handleCloseReleaseBound);
5591
- this.el.addEventListener('click', this._handleCloseTriggerClickBound);
5592
-
5593
- // Add resize for side nav fixed
5594
- if (this.isFixed) {
5595
- this._handleWindowResizeBound = this._handleWindowResize.bind(this);
5596
- window.addEventListener('resize', this._handleWindowResizeBound);
5597
- }
5598
- }
5599
- }, {
5600
- key: "_removeEventHandlers",
5601
- value: function _removeEventHandlers() {
5602
- if (Sidenav._sidenavs.length === 1) {
5603
- document.body.removeEventListener('click', this._handleTriggerClick);
5604
- }
5605
-
5606
- this.dragTarget.removeEventListener('touchmove', this._handleDragTargetDragBound);
5607
- this.dragTarget.removeEventListener('touchend', this._handleDragTargetReleaseBound);
5608
- this._overlay.removeEventListener('touchmove', this._handleCloseDragBound);
5609
- this._overlay.removeEventListener('touchend', this._handleCloseReleaseBound);
5610
- this.el.removeEventListener('touchmove', this._handleCloseDragBound);
5611
- this.el.removeEventListener('touchend', this._handleCloseReleaseBound);
5612
- this.el.removeEventListener('click', this._handleCloseTriggerClickBound);
5613
-
5614
- // Remove resize for side nav fixed
5615
- if (this.isFixed) {
5616
- window.removeEventListener('resize', this._handleWindowResizeBound);
5617
- }
5618
- }
5619
-
5620
- /**
5621
- * Handle Trigger Click
5622
- * @param {Event} e
5623
- */
5624
-
5625
- }, {
5626
- key: "_handleTriggerClick",
5627
- value: function _handleTriggerClick(e) {
5628
- var $trigger = $(e.target).closest('.sidenav-trigger');
5629
- if (e.target && $trigger.length) {
5630
- var sidenavId = M.getIdFromTrigger($trigger[0]);
5631
-
5632
- var sidenavInstance = document.getElementById(sidenavId).M_Sidenav;
5633
- if (sidenavInstance) {
5634
- sidenavInstance.open($trigger);
5635
- }
5636
- e.preventDefault();
5637
- }
5638
- }
5639
-
5640
- /**
5641
- * Set variables needed at the beggining of drag
5642
- * and stop any current transition.
5643
- * @param {Event} e
5644
- */
5645
-
5646
- }, {
5647
- key: "_startDrag",
5648
- value: function _startDrag(e) {
5649
- var clientX = e.targetTouches[0].clientX;
5650
- this.isDragged = true;
5651
- this._startingXpos = clientX;
5652
- this._xPos = this._startingXpos;
5653
- this._time = Date.now();
5654
- this._width = this.el.getBoundingClientRect().width;
5655
- this._overlay.style.display = 'block';
5656
- this._initialScrollTop = this.isOpen ? this.el.scrollTop : M.getDocumentScrollTop();
5657
- this._verticallyScrolling = false;
5658
- anim.remove(this.el);
5659
- anim.remove(this._overlay);
5660
- }
5661
-
5662
- /**
5663
- * Set variables needed at each drag move update tick
5664
- * @param {Event} e
5665
- */
5666
-
5667
- }, {
5668
- key: "_dragMoveUpdate",
5669
- value: function _dragMoveUpdate(e) {
5670
- var clientX = e.targetTouches[0].clientX;
5671
- var currentScrollTop = this.isOpen ? this.el.scrollTop : M.getDocumentScrollTop();
5672
- this.deltaX = Math.abs(this._xPos - clientX);
5673
- this._xPos = clientX;
5674
- this.velocityX = this.deltaX / (Date.now() - this._time);
5675
- this._time = Date.now();
5676
- if (this._initialScrollTop !== currentScrollTop) {
5677
- this._verticallyScrolling = true;
5678
- }
5679
- }
5680
-
5681
- /**
5682
- * Handles Dragging of Sidenav
5683
- * @param {Event} e
5684
- */
5685
-
5686
- }, {
5687
- key: "_handleDragTargetDrag",
5688
- value: function _handleDragTargetDrag(e) {
5689
- // Check if draggable
5690
- if (!this.options.draggable || this._isCurrentlyFixed() || this._verticallyScrolling) {
5691
- return;
5692
- }
5693
-
5694
- // If not being dragged, set initial drag start variables
5695
- if (!this.isDragged) {
5696
- this._startDrag(e);
5697
- }
5698
-
5699
- // Run touchmove updates
5700
- this._dragMoveUpdate(e);
5701
-
5702
- // Calculate raw deltaX
5703
- var totalDeltaX = this._xPos - this._startingXpos;
5704
-
5705
- // dragDirection is the attempted user drag direction
5706
- var dragDirection = totalDeltaX > 0 ? 'right' : 'left';
5707
-
5708
- // Don't allow totalDeltaX to exceed Sidenav width or be dragged in the opposite direction
5709
- totalDeltaX = Math.min(this._width, Math.abs(totalDeltaX));
5710
- if (this.options.edge === dragDirection) {
5711
- totalDeltaX = 0;
5712
- }
5713
-
5714
- /**
5715
- * transformX is the drag displacement
5716
- * transformPrefix is the initial transform placement
5717
- * Invert values if Sidenav is right edge
5718
- */
5719
- var transformX = totalDeltaX;
5720
- var transformPrefix = 'translateX(-100%)';
5721
- if (this.options.edge === 'right') {
5722
- transformPrefix = 'translateX(100%)';
5723
- transformX = -transformX;
5724
- }
5725
-
5726
- // Calculate open/close percentage of sidenav, with open = 1 and close = 0
5727
- this.percentOpen = Math.min(1, totalDeltaX / this._width);
5728
-
5729
- // Set transform and opacity styles
5730
- this.el.style.transform = transformPrefix + " translateX(" + transformX + "px)";
5731
- this._overlay.style.opacity = this.percentOpen;
5732
- }
5733
-
5734
- /**
5735
- * Handle Drag Target Release
5736
- */
5737
-
5738
- }, {
5739
- key: "_handleDragTargetRelease",
5740
- value: function _handleDragTargetRelease() {
5741
- if (this.isDragged) {
5742
- if (this.percentOpen > 0.2) {
5743
- this.open();
5744
- } else {
5745
- this._animateOut();
5746
- }
5747
-
5748
- this.isDragged = false;
5749
- this._verticallyScrolling = false;
5750
- }
5751
- }
5752
-
5753
- /**
5754
- * Handle Close Drag
5755
- * @param {Event} e
5756
- */
5757
-
5758
- }, {
5759
- key: "_handleCloseDrag",
5760
- value: function _handleCloseDrag(e) {
5761
- if (this.isOpen) {
5762
- // Check if draggable
5763
- if (!this.options.draggable || this._isCurrentlyFixed() || this._verticallyScrolling) {
5764
- return;
5765
- }
5766
-
5767
- // If not being dragged, set initial drag start variables
5768
- if (!this.isDragged) {
5769
- this._startDrag(e);
5770
- }
5771
-
5772
- // Run touchmove updates
5773
- this._dragMoveUpdate(e);
5774
-
5775
- // Calculate raw deltaX
5776
- var totalDeltaX = this._xPos - this._startingXpos;
5777
-
5778
- // dragDirection is the attempted user drag direction
5779
- var dragDirection = totalDeltaX > 0 ? 'right' : 'left';
5780
-
5781
- // Don't allow totalDeltaX to exceed Sidenav width or be dragged in the opposite direction
5782
- totalDeltaX = Math.min(this._width, Math.abs(totalDeltaX));
5783
- if (this.options.edge !== dragDirection) {
5784
- totalDeltaX = 0;
5785
- }
5786
-
5787
- var transformX = -totalDeltaX;
5788
- if (this.options.edge === 'right') {
5789
- transformX = -transformX;
5790
- }
5791
-
5792
- // Calculate open/close percentage of sidenav, with open = 1 and close = 0
5793
- this.percentOpen = Math.min(1, 1 - totalDeltaX / this._width);
5794
-
5795
- // Set transform and opacity styles
5796
- this.el.style.transform = "translateX(" + transformX + "px)";
5797
- this._overlay.style.opacity = this.percentOpen;
5798
- }
5799
- }
5800
-
5801
- /**
5802
- * Handle Close Release
5803
- */
5804
-
5805
- }, {
5806
- key: "_handleCloseRelease",
5807
- value: function _handleCloseRelease() {
5808
- if (this.isOpen && this.isDragged) {
5809
- if (this.percentOpen > 0.8) {
5810
- this._animateIn();
5811
- } else {
5812
- this.close();
5813
- }
5814
-
5815
- this.isDragged = false;
5816
- this._verticallyScrolling = false;
5817
- }
5818
- }
5819
-
5820
- /**
5821
- * Handles closing of Sidenav when element with class .sidenav-close
5822
- */
5823
-
5824
- }, {
5825
- key: "_handleCloseTriggerClick",
5826
- value: function _handleCloseTriggerClick(e) {
5827
- var $closeTrigger = $(e.target).closest('.sidenav-close');
5828
- if ($closeTrigger.length && !this._isCurrentlyFixed()) {
5829
- this.close();
5830
- }
5831
- }
5832
-
5833
- /**
5834
- * Handle Window Resize
5835
- */
5836
-
5837
- }, {
5838
- key: "_handleWindowResize",
5839
- value: function _handleWindowResize() {
5840
- // Only handle horizontal resizes
5841
- if (this.lastWindowWidth !== window.innerWidth) {
5842
- if (window.innerWidth > 992) {
5843
- this.open();
5844
- } else {
5845
- this.close();
5846
- }
5847
- }
5848
-
5849
- this.lastWindowWidth = window.innerWidth;
5850
- this.lastWindowHeight = window.innerHeight;
5851
- }
5852
- }, {
5853
- key: "_setupClasses",
5854
- value: function _setupClasses() {
5855
- if (this.options.edge === 'right') {
5856
- this.el.classList.add('right-aligned');
5857
- this.dragTarget.classList.add('right-aligned');
5858
- }
5859
- }
5860
- }, {
5861
- key: "_removeClasses",
5862
- value: function _removeClasses() {
5863
- this.el.classList.remove('right-aligned');
5864
- this.dragTarget.classList.remove('right-aligned');
5865
- }
5866
- }, {
5867
- key: "_setupFixed",
5868
- value: function _setupFixed() {
5869
- if (this._isCurrentlyFixed()) {
5870
- this.open();
5871
- }
5872
- }
5873
- }, {
5874
- key: "_isCurrentlyFixed",
5875
- value: function _isCurrentlyFixed() {
5876
- return this.isFixed && window.innerWidth > 992;
5877
- }
5878
- }, {
5879
- key: "_createDragTarget",
5880
- value: function _createDragTarget() {
5881
- var dragTarget = document.createElement('div');
5882
- dragTarget.classList.add('drag-target');
5883
- document.body.appendChild(dragTarget);
5884
- this.dragTarget = dragTarget;
5885
- }
5886
- }, {
5887
- key: "_preventBodyScrolling",
5888
- value: function _preventBodyScrolling() {
5889
- var body = document.body;
5890
- body.style.overflow = 'hidden';
5891
- }
5892
- }, {
5893
- key: "_enableBodyScrolling",
5894
- value: function _enableBodyScrolling() {
5895
- var body = document.body;
5896
- body.style.overflow = '';
5897
- }
5898
- }, {
5899
- key: "open",
5900
- value: function open() {
5901
- if (this.isOpen === true) {
5902
- return;
5903
- }
5904
-
5905
- this.isOpen = true;
5906
-
5907
- // Run onOpenStart callback
5908
- if (typeof this.options.onOpenStart === 'function') {
5909
- this.options.onOpenStart.call(this, this.el);
5910
- }
5911
-
5912
- // Handle fixed Sidenav
5913
- if (this._isCurrentlyFixed()) {
5914
- anim.remove(this.el);
5915
- anim({
5916
- targets: this.el,
5917
- translateX: 0,
5918
- duration: 0,
5919
- easing: 'easeOutQuad'
5920
- });
5921
- this._enableBodyScrolling();
5922
- this._overlay.style.display = 'none';
5923
-
5924
- // Handle non-fixed Sidenav
5925
- } else {
5926
- if (this.options.preventScrolling) {
5927
- this._preventBodyScrolling();
5928
- }
5929
-
5930
- if (!this.isDragged || this.percentOpen != 1) {
5931
- this._animateIn();
5932
- }
5933
- }
5934
- }
5935
- }, {
5936
- key: "close",
5937
- value: function close() {
5938
- if (this.isOpen === false) {
5939
- return;
5940
- }
5941
-
5942
- this.isOpen = false;
5943
-
5944
- // Run onCloseStart callback
5945
- if (typeof this.options.onCloseStart === 'function') {
5946
- this.options.onCloseStart.call(this, this.el);
5947
- }
5948
-
5949
- // Handle fixed Sidenav
5950
- if (this._isCurrentlyFixed()) {
5951
- var transformX = this.options.edge === 'left' ? '-105%' : '105%';
5952
- this.el.style.transform = "translateX(" + transformX + ")";
5953
-
5954
- // Handle non-fixed Sidenav
5955
- } else {
5956
- this._enableBodyScrolling();
5957
-
5958
- if (!this.isDragged || this.percentOpen != 0) {
5959
- this._animateOut();
5960
- } else {
5961
- this._overlay.style.display = 'none';
5962
- }
5963
- }
5964
- }
5965
- }, {
5966
- key: "_animateIn",
5967
- value: function _animateIn() {
5968
- this._animateSidenavIn();
5969
- this._animateOverlayIn();
5970
- }
5971
- }, {
5972
- key: "_animateSidenavIn",
5973
- value: function _animateSidenavIn() {
5974
- var _this32 = this;
5975
-
5976
- var slideOutPercent = this.options.edge === 'left' ? -1 : 1;
5977
- if (this.isDragged) {
5978
- slideOutPercent = this.options.edge === 'left' ? slideOutPercent + this.percentOpen : slideOutPercent - this.percentOpen;
5979
- }
5980
-
5981
- anim.remove(this.el);
5982
- anim({
5983
- targets: this.el,
5984
- translateX: [slideOutPercent * 100 + "%", 0],
5985
- duration: this.options.inDuration,
5986
- easing: 'easeOutQuad',
5987
- complete: function () {
5988
- // Run onOpenEnd callback
5989
- if (typeof _this32.options.onOpenEnd === 'function') {
5990
- _this32.options.onOpenEnd.call(_this32, _this32.el);
5991
- }
5992
- }
5993
- });
5994
- }
5995
- }, {
5996
- key: "_animateOverlayIn",
5997
- value: function _animateOverlayIn() {
5998
- var start = 0;
5999
- if (this.isDragged) {
6000
- start = this.percentOpen;
6001
- } else {
6002
- $(this._overlay).css({
6003
- display: 'block'
6004
- });
6005
- }
6006
-
6007
- anim.remove(this._overlay);
6008
- anim({
6009
- targets: this._overlay,
6010
- opacity: [start, 1],
6011
- duration: this.options.inDuration,
6012
- easing: 'easeOutQuad'
6013
- });
6014
- }
6015
- }, {
6016
- key: "_animateOut",
6017
- value: function _animateOut() {
6018
- this._animateSidenavOut();
6019
- this._animateOverlayOut();
6020
- }
6021
- }, {
6022
- key: "_animateSidenavOut",
6023
- value: function _animateSidenavOut() {
6024
- var _this33 = this;
6025
-
6026
- var endPercent = this.options.edge === 'left' ? -1 : 1;
6027
- var slideOutPercent = 0;
6028
- if (this.isDragged) {
6029
- slideOutPercent = this.options.edge === 'left' ? endPercent + this.percentOpen : endPercent - this.percentOpen;
6030
- }
6031
-
6032
- anim.remove(this.el);
6033
- anim({
6034
- targets: this.el,
6035
- translateX: [slideOutPercent * 100 + "%", endPercent * 105 + "%"],
6036
- duration: this.options.outDuration,
6037
- easing: 'easeOutQuad',
6038
- complete: function () {
6039
- // Run onOpenEnd callback
6040
- if (typeof _this33.options.onCloseEnd === 'function') {
6041
- _this33.options.onCloseEnd.call(_this33, _this33.el);
6042
- }
6043
- }
6044
- });
6045
- }
6046
- }, {
6047
- key: "_animateOverlayOut",
6048
- value: function _animateOverlayOut() {
6049
- var _this34 = this;
6050
-
6051
- anim.remove(this._overlay);
6052
- anim({
6053
- targets: this._overlay,
6054
- opacity: 0,
6055
- duration: this.options.outDuration,
6056
- easing: 'easeOutQuad',
6057
- complete: function () {
6058
- $(_this34._overlay).css('display', 'none');
6059
- }
6060
- });
6061
- }
6062
- }], [{
6063
- key: "init",
6064
- value: function init(els, options) {
6065
- return _get(Sidenav.__proto__ || Object.getPrototypeOf(Sidenav), "init", this).call(this, this, els, options);
6066
- }
6067
-
6068
- /**
6069
- * Get Instance
6070
- */
6071
-
6072
- }, {
6073
- key: "getInstance",
6074
- value: function getInstance(el) {
6075
- var domElem = !!el.jquery ? el[0] : el;
6076
- return domElem.M_Sidenav;
6077
- }
6078
- }, {
6079
- key: "defaults",
6080
- get: function () {
6081
- return _defaults;
6082
- }
6083
- }]);
6084
-
6085
- return Sidenav;
6086
- }(Component);
6087
-
6088
- /**
6089
- * @static
6090
- * @memberof Sidenav
6091
- * @type {Array.<Sidenav>}
6092
- */
6093
-
6094
-
6095
- Sidenav._sidenavs = [];
6096
-
6097
- M.Sidenav = Sidenav;
6098
-
6099
- if (M.jQueryLoaded) {
6100
- M.initializeJqueryWrapper(Sidenav, 'sidenav', 'M_Sidenav');
6101
- }
6102
- })(cash, M.anime);
6103
- ;(function ($, anim) {
6104
- 'use strict';
6105
-
6106
- var _defaults = {
6107
- throttle: 100,
6108
- scrollOffset: 200, // offset - 200 allows elements near bottom of page to scroll
6109
- activeClass: 'active',
6110
- getActiveElement: function (id) {
6111
- return 'a[href="#' + id + '"]';
6112
- }
6113
- };
6114
-
6115
- /**
6116
- * @class
6117
- *
6118
- */
6119
-
6120
- var ScrollSpy = function (_Component9) {
6121
- _inherits(ScrollSpy, _Component9);
6122
-
6123
- /**
6124
- * Construct ScrollSpy instance
6125
- * @constructor
6126
- * @param {Element} el
6127
- * @param {Object} options
6128
- */
6129
- function ScrollSpy(el, options) {
6130
- _classCallCheck(this, ScrollSpy);
6131
-
6132
- var _this35 = _possibleConstructorReturn(this, (ScrollSpy.__proto__ || Object.getPrototypeOf(ScrollSpy)).call(this, ScrollSpy, el, options));
6133
-
6134
- _this35.el.M_ScrollSpy = _this35;
6135
-
6136
- /**
6137
- * Options for the modal
6138
- * @member Modal#options
6139
- * @prop {Number} [throttle=100] - Throttle of scroll handler
6140
- * @prop {Number} [scrollOffset=200] - Offset for centering element when scrolled to
6141
- * @prop {String} [activeClass='active'] - Class applied to active elements
6142
- * @prop {Function} [getActiveElement] - Used to find active element
6143
- */
6144
- _this35.options = $.extend({}, ScrollSpy.defaults, options);
6145
-
6146
- // setup
6147
- ScrollSpy._elements.push(_this35);
6148
- ScrollSpy._count++;
6149
- ScrollSpy._increment++;
6150
- _this35.tickId = -1;
6151
- _this35.id = ScrollSpy._increment;
6152
- _this35._setupEventHandlers();
6153
- _this35._handleWindowScroll();
6154
- return _this35;
6155
- }
6156
-
6157
- _createClass(ScrollSpy, [{
6158
- key: "destroy",
6159
-
6160
-
6161
- /**
6162
- * Teardown component
6163
- */
6164
- value: function destroy() {
6165
- ScrollSpy._elements.splice(ScrollSpy._elements.indexOf(this), 1);
6166
- ScrollSpy._elementsInView.splice(ScrollSpy._elementsInView.indexOf(this), 1);
6167
- ScrollSpy._visibleElements.splice(ScrollSpy._visibleElements.indexOf(this.$el), 1);
6168
- ScrollSpy._count--;
6169
- this._removeEventHandlers();
6170
- $(this.options.getActiveElement(this.$el.attr('id'))).removeClass(this.options.activeClass);
6171
- this.el.M_ScrollSpy = undefined;
6172
- }
6173
-
6174
- /**
6175
- * Setup Event Handlers
6176
- */
6177
-
6178
- }, {
6179
- key: "_setupEventHandlers",
6180
- value: function _setupEventHandlers() {
6181
- var throttledResize = M.throttle(this._handleWindowScroll, 200);
6182
- this._handleThrottledResizeBound = throttledResize.bind(this);
6183
- this._handleWindowScrollBound = this._handleWindowScroll.bind(this);
6184
- if (ScrollSpy._count === 1) {
6185
- window.addEventListener('scroll', this._handleWindowScrollBound);
6186
- window.addEventListener('resize', this._handleThrottledResizeBound);
6187
- document.body.addEventListener('click', this._handleTriggerClick);
6188
- }
6189
- }
6190
-
6191
- /**
6192
- * Remove Event Handlers
6193
- */
6194
-
6195
- }, {
6196
- key: "_removeEventHandlers",
6197
- value: function _removeEventHandlers() {
6198
- if (ScrollSpy._count === 0) {
6199
- window.removeEventListener('scroll', this._handleWindowScrollBound);
6200
- window.removeEventListener('resize', this._handleThrottledResizeBound);
6201
- document.body.removeEventListener('click', this._handleTriggerClick);
6202
- }
6203
- }
6204
-
6205
- /**
6206
- * Handle Trigger Click
6207
- * @param {Event} e
6208
- */
6209
-
6210
- }, {
6211
- key: "_handleTriggerClick",
6212
- value: function _handleTriggerClick(e) {
6213
- var $trigger = $(e.target);
6214
- for (var i = ScrollSpy._elements.length - 1; i >= 0; i--) {
6215
- var scrollspy = ScrollSpy._elements[i];
6216
- if ($trigger.is('a[href="#' + scrollspy.$el.attr('id') + '"]')) {
6217
- e.preventDefault();
6218
- var offset = scrollspy.$el.offset().top + 1;
6219
-
6220
- anim({
6221
- targets: [document.documentElement, document.body],
6222
- scrollTop: offset - scrollspy.options.scrollOffset,
6223
- duration: 400,
6224
- easing: 'easeOutCubic'
6225
- });
6226
- break;
6227
- }
6228
- }
6229
- }
6230
-
6231
- /**
6232
- * Handle Window Scroll
6233
- */
6234
-
6235
- }, {
6236
- key: "_handleWindowScroll",
6237
- value: function _handleWindowScroll() {
6238
- // unique tick id
6239
- ScrollSpy._ticks++;
6240
-
6241
- // viewport rectangle
6242
- var top = M.getDocumentScrollTop(),
6243
- left = M.getDocumentScrollLeft(),
6244
- right = left + window.innerWidth,
6245
- bottom = top + window.innerHeight;
6246
-
6247
- // determine which elements are in view
6248
- var intersections = ScrollSpy._findElements(top, right, bottom, left);
6249
- for (var i = 0; i < intersections.length; i++) {
6250
- var scrollspy = intersections[i];
6251
- var lastTick = scrollspy.tickId;
6252
- if (lastTick < 0) {
6253
- // entered into view
6254
- scrollspy._enter();
6255
- }
6256
-
6257
- // update tick id
6258
- scrollspy.tickId = ScrollSpy._ticks;
6259
- }
6260
-
6261
- for (var _i = 0; _i < ScrollSpy._elementsInView.length; _i++) {
6262
- var _scrollspy = ScrollSpy._elementsInView[_i];
6263
- var _lastTick = _scrollspy.tickId;
6264
- if (_lastTick >= 0 && _lastTick !== ScrollSpy._ticks) {
6265
- // exited from view
6266
- _scrollspy._exit();
6267
- _scrollspy.tickId = -1;
6268
- }
6269
- }
6270
-
6271
- // remember elements in view for next tick
6272
- ScrollSpy._elementsInView = intersections;
6273
- }
6274
-
6275
- /**
6276
- * Find elements that are within the boundary
6277
- * @param {number} top
6278
- * @param {number} right
6279
- * @param {number} bottom
6280
- * @param {number} left
6281
- * @return {Array.<ScrollSpy>} A collection of elements
6282
- */
6283
-
6284
- }, {
6285
- key: "_enter",
6286
- value: function _enter() {
6287
- ScrollSpy._visibleElements = ScrollSpy._visibleElements.filter(function (value) {
6288
- return value.height() != 0;
6289
- });
6290
-
6291
- if (ScrollSpy._visibleElements[0]) {
6292
- $(this.options.getActiveElement(ScrollSpy._visibleElements[0].attr('id'))).removeClass(this.options.activeClass);
6293
- if (ScrollSpy._visibleElements[0][0].M_ScrollSpy && this.id < ScrollSpy._visibleElements[0][0].M_ScrollSpy.id) {
6294
- ScrollSpy._visibleElements.unshift(this.$el);
6295
- } else {
6296
- ScrollSpy._visibleElements.push(this.$el);
6297
- }
6298
- } else {
6299
- ScrollSpy._visibleElements.push(this.$el);
6300
- }
6301
-
6302
- $(this.options.getActiveElement(ScrollSpy._visibleElements[0].attr('id'))).addClass(this.options.activeClass);
6303
- }
6304
- }, {
6305
- key: "_exit",
6306
- value: function _exit() {
6307
- var _this36 = this;
6308
-
6309
- ScrollSpy._visibleElements = ScrollSpy._visibleElements.filter(function (value) {
6310
- return value.height() != 0;
6311
- });
6312
-
6313
- if (ScrollSpy._visibleElements[0]) {
6314
- $(this.options.getActiveElement(ScrollSpy._visibleElements[0].attr('id'))).removeClass(this.options.activeClass);
6315
-
6316
- ScrollSpy._visibleElements = ScrollSpy._visibleElements.filter(function (el) {
6317
- return el.attr('id') != _this36.$el.attr('id');
6318
- });
6319
- if (ScrollSpy._visibleElements[0]) {
6320
- // Check if empty
6321
- $(this.options.getActiveElement(ScrollSpy._visibleElements[0].attr('id'))).addClass(this.options.activeClass);
6322
- }
6323
- }
6324
- }
6325
- }], [{
6326
- key: "init",
6327
- value: function init(els, options) {
6328
- return _get(ScrollSpy.__proto__ || Object.getPrototypeOf(ScrollSpy), "init", this).call(this, this, els, options);
6329
- }
6330
-
6331
- /**
6332
- * Get Instance
6333
- */
6334
-
6335
- }, {
6336
- key: "getInstance",
6337
- value: function getInstance(el) {
6338
- var domElem = !!el.jquery ? el[0] : el;
6339
- return domElem.M_ScrollSpy;
6340
- }
6341
- }, {
6342
- key: "_findElements",
6343
- value: function _findElements(top, right, bottom, left) {
6344
- var hits = [];
6345
- for (var i = 0; i < ScrollSpy._elements.length; i++) {
6346
- var scrollspy = ScrollSpy._elements[i];
6347
- var currTop = top + scrollspy.options.scrollOffset || 200;
6348
-
6349
- if (scrollspy.$el.height() > 0) {
6350
- var elTop = scrollspy.$el.offset().top,
6351
- elLeft = scrollspy.$el.offset().left,
6352
- elRight = elLeft + scrollspy.$el.width(),
6353
- elBottom = elTop + scrollspy.$el.height();
6354
-
6355
- var isIntersect = !(elLeft > right || elRight < left || elTop > bottom || elBottom < currTop);
6356
-
6357
- if (isIntersect) {
6358
- hits.push(scrollspy);
6359
- }
6360
- }
6361
- }
6362
- return hits;
6363
- }
6364
- }, {
6365
- key: "defaults",
6366
- get: function () {
6367
- return _defaults;
6368
- }
6369
- }]);
6370
-
6371
- return ScrollSpy;
6372
- }(Component);
6373
-
6374
- /**
6375
- * @static
6376
- * @memberof ScrollSpy
6377
- * @type {Array.<ScrollSpy>}
6378
- */
6379
-
6380
-
6381
- ScrollSpy._elements = [];
6382
-
6383
- /**
6384
- * @static
6385
- * @memberof ScrollSpy
6386
- * @type {Array.<ScrollSpy>}
6387
- */
6388
- ScrollSpy._elementsInView = [];
6389
-
6390
- /**
6391
- * @static
6392
- * @memberof ScrollSpy
6393
- * @type {Array.<cash>}
6394
- */
6395
- ScrollSpy._visibleElements = [];
6396
-
6397
- /**
6398
- * @static
6399
- * @memberof ScrollSpy
6400
- */
6401
- ScrollSpy._count = 0;
6402
-
6403
- /**
6404
- * @static
6405
- * @memberof ScrollSpy
6406
- */
6407
- ScrollSpy._increment = 0;
6408
-
6409
- /**
6410
- * @static
6411
- * @memberof ScrollSpy
6412
- */
6413
- ScrollSpy._ticks = 0;
6414
-
6415
- M.ScrollSpy = ScrollSpy;
6416
-
6417
- if (M.jQueryLoaded) {
6418
- M.initializeJqueryWrapper(ScrollSpy, 'scrollSpy', 'M_ScrollSpy');
6419
- }
6420
- })(cash, M.anime);
6421
- ;(function ($) {
6422
- 'use strict';
6423
-
6424
- var _defaults = {
6425
- data: {}, // Autocomplete data set
6426
- limit: Infinity, // Limit of results the autocomplete shows
6427
- onAutocomplete: null, // Callback for when autocompleted
6428
- minLength: 1, // Min characters before autocomplete starts
6429
- sortFunction: function (a, b, inputString) {
6430
- // Sort function for sorting autocomplete results
6431
- return a.indexOf(inputString) - b.indexOf(inputString);
6432
- }
6433
- };
6434
-
6435
- /**
6436
- * @class
6437
- *
6438
- */
6439
-
6440
- var Autocomplete = function (_Component10) {
6441
- _inherits(Autocomplete, _Component10);
6442
-
6443
- /**
6444
- * Construct Autocomplete instance
6445
- * @constructor
6446
- * @param {Element} el
6447
- * @param {Object} options
6448
- */
6449
- function Autocomplete(el, options) {
6450
- _classCallCheck(this, Autocomplete);
6451
-
6452
- var _this37 = _possibleConstructorReturn(this, (Autocomplete.__proto__ || Object.getPrototypeOf(Autocomplete)).call(this, Autocomplete, el, options));
6453
-
6454
- _this37.el.M_Autocomplete = _this37;
6455
-
6456
- /**
6457
- * Options for the autocomplete
6458
- * @member Autocomplete#options
6459
- * @prop {Number} duration
6460
- * @prop {Number} dist
6461
- * @prop {number} shift
6462
- * @prop {number} padding
6463
- * @prop {Boolean} fullWidth
6464
- * @prop {Boolean} indicators
6465
- * @prop {Boolean} noWrap
6466
- * @prop {Function} onCycleTo
6467
- */
6468
- _this37.options = $.extend({}, Autocomplete.defaults, options);
6469
-
6470
- // Setup
6471
- _this37.isOpen = false;
6472
- _this37.count = 0;
6473
- _this37.activeIndex = -1;
6474
- _this37.oldVal;
6475
- _this37.$inputField = _this37.$el.closest('.input-field');
6476
- _this37.$active = $();
6477
- _this37._mousedown = false;
6478
- _this37._setupDropdown();
6479
-
6480
- _this37._setupEventHandlers();
6481
- return _this37;
6482
- }
6483
-
6484
- _createClass(Autocomplete, [{
6485
- key: "destroy",
6486
-
6487
-
6488
- /**
6489
- * Teardown component
6490
- */
6491
- value: function destroy() {
6492
- this._removeEventHandlers();
6493
- this._removeDropdown();
6494
- this.el.M_Autocomplete = undefined;
6495
- }
6496
-
6497
- /**
6498
- * Setup Event Handlers
6499
- */
6500
-
6501
- }, {
6502
- key: "_setupEventHandlers",
6503
- value: function _setupEventHandlers() {
6504
- this._handleInputBlurBound = this._handleInputBlur.bind(this);
6505
- this._handleInputKeyupAndFocusBound = this._handleInputKeyupAndFocus.bind(this);
6506
- this._handleInputKeydownBound = this._handleInputKeydown.bind(this);
6507
- this._handleInputClickBound = this._handleInputClick.bind(this);
6508
- this._handleContainerMousedownAndTouchstartBound = this._handleContainerMousedownAndTouchstart.bind(this);
6509
- this._handleContainerMouseupAndTouchendBound = this._handleContainerMouseupAndTouchend.bind(this);
6510
-
6511
- this.el.addEventListener('blur', this._handleInputBlurBound);
6512
- this.el.addEventListener('keyup', this._handleInputKeyupAndFocusBound);
6513
- this.el.addEventListener('focus', this._handleInputKeyupAndFocusBound);
6514
- this.el.addEventListener('keydown', this._handleInputKeydownBound);
6515
- this.el.addEventListener('click', this._handleInputClickBound);
6516
- this.container.addEventListener('mousedown', this._handleContainerMousedownAndTouchstartBound);
6517
- this.container.addEventListener('mouseup', this._handleContainerMouseupAndTouchendBound);
6518
-
6519
- if (typeof window.ontouchstart !== 'undefined') {
6520
- this.container.addEventListener('touchstart', this._handleContainerMousedownAndTouchstartBound);
6521
- this.container.addEventListener('touchend', this._handleContainerMouseupAndTouchendBound);
6522
- }
6523
- }
6524
-
6525
- /**
6526
- * Remove Event Handlers
6527
- */
6528
-
6529
- }, {
6530
- key: "_removeEventHandlers",
6531
- value: function _removeEventHandlers() {
6532
- this.el.removeEventListener('blur', this._handleInputBlurBound);
6533
- this.el.removeEventListener('keyup', this._handleInputKeyupAndFocusBound);
6534
- this.el.removeEventListener('focus', this._handleInputKeyupAndFocusBound);
6535
- this.el.removeEventListener('keydown', this._handleInputKeydownBound);
6536
- this.el.removeEventListener('click', this._handleInputClickBound);
6537
- this.container.removeEventListener('mousedown', this._handleContainerMousedownAndTouchstartBound);
6538
- this.container.removeEventListener('mouseup', this._handleContainerMouseupAndTouchendBound);
6539
-
6540
- if (typeof window.ontouchstart !== 'undefined') {
6541
- this.container.removeEventListener('touchstart', this._handleContainerMousedownAndTouchstartBound);
6542
- this.container.removeEventListener('touchend', this._handleContainerMouseupAndTouchendBound);
6543
- }
6544
- }
6545
-
6546
- /**
6547
- * Setup dropdown
6548
- */
6549
-
6550
- }, {
6551
- key: "_setupDropdown",
6552
- value: function _setupDropdown() {
6553
- var _this38 = this;
6554
-
6555
- this.container = document.createElement('ul');
6556
- this.container.id = "autocomplete-options-" + M.guid();
6557
- $(this.container).addClass('autocomplete-content dropdown-content');
6558
- this.$inputField.append(this.container);
6559
- this.el.setAttribute('data-target', this.container.id);
6560
-
6561
- this.dropdown = M.Dropdown.init(this.el, {
6562
- autoFocus: false,
6563
- closeOnClick: false,
6564
- coverTrigger: false,
6565
- onItemClick: function (itemEl) {
6566
- _this38.selectOption($(itemEl));
6567
- }
6568
- });
6569
-
6570
- // Sketchy removal of dropdown click handler
6571
- this.el.removeEventListener('click', this.dropdown._handleClickBound);
6572
- }
6573
-
6574
- /**
6575
- * Remove dropdown
6576
- */
6577
-
6578
- }, {
6579
- key: "_removeDropdown",
6580
- value: function _removeDropdown() {
6581
- this.container.parentNode.removeChild(this.container);
6582
- }
6583
-
6584
- /**
6585
- * Handle Input Blur
6586
- */
6587
-
6588
- }, {
6589
- key: "_handleInputBlur",
6590
- value: function _handleInputBlur() {
6591
- if (!this._mousedown) {
6592
- this.close();
6593
- this._resetAutocomplete();
6594
- }
6595
- }
6596
-
6597
- /**
6598
- * Handle Input Keyup and Focus
6599
- * @param {Event} e
6600
- */
6601
-
6602
- }, {
6603
- key: "_handleInputKeyupAndFocus",
6604
- value: function _handleInputKeyupAndFocus(e) {
6605
- if (e.type === 'keyup') {
6606
- Autocomplete._keydown = false;
6607
- }
6608
-
6609
- this.count = 0;
6610
- var val = this.el.value.toLowerCase();
6611
-
6612
- // Don't capture enter or arrow key usage.
6613
- if (e.keyCode === 13 || e.keyCode === 38 || e.keyCode === 40) {
6614
- return;
6615
- }
6616
-
6617
- // Check if the input isn't empty
6618
- // Check if focus triggered by tab
6619
- if (this.oldVal !== val && (M.tabPressed || e.type !== 'focus')) {
6620
- this.open();
6621
- }
6622
-
6623
- // Update oldVal
6624
- this.oldVal = val;
6625
- }
6626
-
6627
- /**
6628
- * Handle Input Keydown
6629
- * @param {Event} e
6630
- */
6631
-
6632
- }, {
6633
- key: "_handleInputKeydown",
6634
- value: function _handleInputKeydown(e) {
6635
- Autocomplete._keydown = true;
6636
-
6637
- // Arrow keys and enter key usage
6638
- var keyCode = e.keyCode,
6639
- liElement = void 0,
6640
- numItems = $(this.container).children('li').length;
6641
-
6642
- // select element on Enter
6643
- if (keyCode === M.keys.ENTER && this.activeIndex >= 0) {
6644
- liElement = $(this.container).children('li').eq(this.activeIndex);
6645
- if (liElement.length) {
6646
- this.selectOption(liElement);
6647
- e.preventDefault();
6648
- }
6649
- return;
6650
- }
6651
-
6652
- // Capture up and down key
6653
- if (keyCode === M.keys.ARROW_UP || keyCode === M.keys.ARROW_DOWN) {
6654
- e.preventDefault();
6655
-
6656
- if (keyCode === M.keys.ARROW_UP && this.activeIndex > 0) {
6657
- this.activeIndex--;
6658
- }
6659
-
6660
- if (keyCode === M.keys.ARROW_DOWN && this.activeIndex < numItems - 1) {
6661
- this.activeIndex++;
6662
- }
6663
-
6664
- this.$active.removeClass('active');
6665
- if (this.activeIndex >= 0) {
6666
- this.$active = $(this.container).children('li').eq(this.activeIndex);
6667
- this.$active.addClass('active');
6668
- }
6669
- }
6670
- }
6671
-
6672
- /**
6673
- * Handle Input Click
6674
- * @param {Event} e
6675
- */
6676
-
6677
- }, {
6678
- key: "_handleInputClick",
6679
- value: function _handleInputClick(e) {
6680
- this.open();
6681
- }
6682
-
6683
- /**
6684
- * Handle Container Mousedown and Touchstart
6685
- * @param {Event} e
6686
- */
6687
-
6688
- }, {
6689
- key: "_handleContainerMousedownAndTouchstart",
6690
- value: function _handleContainerMousedownAndTouchstart(e) {
6691
- this._mousedown = true;
6692
- }
6693
-
6694
- /**
6695
- * Handle Container Mouseup and Touchend
6696
- * @param {Event} e
6697
- */
6698
-
6699
- }, {
6700
- key: "_handleContainerMouseupAndTouchend",
6701
- value: function _handleContainerMouseupAndTouchend(e) {
6702
- this._mousedown = false;
6703
- }
6704
-
6705
- /**
6706
- * Highlight partial match
6707
- */
6708
-
6709
- }, {
6710
- key: "_highlight",
6711
- value: function _highlight(string, $el) {
6712
- var img = $el.find('img');
6713
- var matchStart = $el.text().toLowerCase().indexOf('' + string.toLowerCase() + ''),
6714
- matchEnd = matchStart + string.length - 1,
6715
- beforeMatch = $el.text().slice(0, matchStart),
6716
- matchText = $el.text().slice(matchStart, matchEnd + 1),
6717
- afterMatch = $el.text().slice(matchEnd + 1);
6718
- $el.html("<span>" + beforeMatch + "<span class='highlight'>" + matchText + "</span>" + afterMatch + "</span>");
6719
- if (img.length) {
6720
- $el.prepend(img);
6721
- }
6722
- }
6723
-
6724
- /**
6725
- * Reset current element position
6726
- */
6727
-
6728
- }, {
6729
- key: "_resetCurrentElement",
6730
- value: function _resetCurrentElement() {
6731
- this.activeIndex = -1;
6732
- this.$active.removeClass('active');
6733
- }
6734
-
6735
- /**
6736
- * Reset autocomplete elements
6737
- */
6738
-
6739
- }, {
6740
- key: "_resetAutocomplete",
6741
- value: function _resetAutocomplete() {
6742
- $(this.container).empty();
6743
- this._resetCurrentElement();
6744
- this.oldVal = null;
6745
- this.isOpen = false;
6746
- this._mousedown = false;
6747
- }
6748
-
6749
- /**
6750
- * Select autocomplete option
6751
- * @param {Element} el Autocomplete option list item element
6752
- */
6753
-
6754
- }, {
6755
- key: "selectOption",
6756
- value: function selectOption(el) {
6757
- var text = el.text().trim();
6758
- this.el.value = text;
6759
- this.$el.trigger('change');
6760
- this._resetAutocomplete();
6761
- this.close();
6762
-
6763
- // Handle onAutocomplete callback.
6764
- if (typeof this.options.onAutocomplete === 'function') {
6765
- this.options.onAutocomplete.call(this, text);
6766
- }
6767
- }
6768
-
6769
- /**
6770
- * Render dropdown content
6771
- * @param {Object} data data set
6772
- * @param {String} val current input value
6773
- */
6774
-
6775
- }, {
6776
- key: "_renderDropdown",
6777
- value: function _renderDropdown(data, val) {
6778
- var _this39 = this;
6779
-
6780
- this._resetAutocomplete();
6781
-
6782
- var matchingData = [];
6783
-
6784
- // Gather all matching data
6785
- for (var key in data) {
6786
- if (data.hasOwnProperty(key) && key.toLowerCase().indexOf(val) !== -1) {
6787
- // Break if past limit
6788
- if (this.count >= this.options.limit) {
6789
- break;
6790
- }
6791
-
6792
- var entry = {
6793
- data: data[key],
6794
- key: key
6795
- };
6796
- matchingData.push(entry);
6797
-
6798
- this.count++;
6799
- }
6800
- }
6801
-
6802
- // Sort
6803
- if (this.options.sortFunction) {
6804
- var sortFunctionBound = function (a, b) {
6805
- return _this39.options.sortFunction(a.key.toLowerCase(), b.key.toLowerCase(), val.toLowerCase());
6806
- };
6807
- matchingData.sort(sortFunctionBound);
6808
- }
6809
-
6810
- // Render
6811
- for (var i = 0; i < matchingData.length; i++) {
6812
- var _entry = matchingData[i];
6813
- var $autocompleteOption = $('<li></li>');
6814
- if (!!_entry.data) {
6815
- $autocompleteOption.append("<img src=\"" + _entry.data + "\" class=\"right circle\"><span>" + _entry.key + "</span>");
6816
- } else {
6817
- $autocompleteOption.append('<span>' + _entry.key + '</span>');
6818
- }
6819
-
6820
- $(this.container).append($autocompleteOption);
6821
- this._highlight(val, $autocompleteOption);
6822
- }
6823
- }
6824
-
6825
- /**
6826
- * Open Autocomplete Dropdown
6827
- */
6828
-
6829
- }, {
6830
- key: "open",
6831
- value: function open() {
6832
- var val = this.el.value.toLowerCase();
6833
-
6834
- this._resetAutocomplete();
6835
-
6836
- if (val.length >= this.options.minLength) {
6837
- this.isOpen = true;
6838
- this._renderDropdown(this.options.data, val);
6839
- }
6840
-
6841
- // Open dropdown
6842
- if (!this.dropdown.isOpen) {
6843
- this.dropdown.open();
6844
- } else {
6845
- // Recalculate dropdown when its already open
6846
- this.dropdown.recalculateDimensions();
6847
- }
6848
- }
6849
-
6850
- /**
6851
- * Close Autocomplete Dropdown
6852
- */
6853
-
6854
- }, {
6855
- key: "close",
6856
- value: function close() {
6857
- this.dropdown.close();
6858
- }
6859
-
6860
- /**
6861
- * Update Data
6862
- * @param {Object} data
6863
- */
6864
-
6865
- }, {
6866
- key: "updateData",
6867
- value: function updateData(data) {
6868
- var val = this.el.value.toLowerCase();
6869
- this.options.data = data;
6870
-
6871
- if (this.isOpen) {
6872
- this._renderDropdown(data, val);
6873
- }
6874
- }
6875
- }], [{
6876
- key: "init",
6877
- value: function init(els, options) {
6878
- return _get(Autocomplete.__proto__ || Object.getPrototypeOf(Autocomplete), "init", this).call(this, this, els, options);
6879
- }
6880
-
6881
- /**
6882
- * Get Instance
6883
- */
6884
-
6885
- }, {
6886
- key: "getInstance",
6887
- value: function getInstance(el) {
6888
- var domElem = !!el.jquery ? el[0] : el;
6889
- return domElem.M_Autocomplete;
6890
- }
6891
- }, {
6892
- key: "defaults",
6893
- get: function () {
6894
- return _defaults;
6895
- }
6896
- }]);
6897
-
6898
- return Autocomplete;
6899
- }(Component);
6900
-
6901
- /**
6902
- * @static
6903
- * @memberof Autocomplete
6904
- */
6905
-
6906
-
6907
- Autocomplete._keydown = false;
6908
-
6909
- M.Autocomplete = Autocomplete;
6910
-
6911
- if (M.jQueryLoaded) {
6912
- M.initializeJqueryWrapper(Autocomplete, 'autocomplete', 'M_Autocomplete');
6913
- }
6914
- })(cash);
6915
- ;(function ($) {
6916
- // Function to update labels of text fields
6917
- M.updateTextFields = function () {
6918
- var input_selector = 'input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=search], input[type=date], input[type=time], textarea';
6919
- $(input_selector).each(function (element, index) {
6920
- var $this = $(this);
6921
- if (element.value.length > 0 || $(element).is(':focus') || element.autofocus || $this.attr('placeholder') !== null) {
6922
- $this.siblings('label').addClass('active');
6923
- } else if (element.validity) {
6924
- $this.siblings('label').toggleClass('active', element.validity.badInput === true);
6925
- } else {
6926
- $this.siblings('label').removeClass('active');
6927
- }
6928
- });
6929
- };
6930
-
6931
- M.validate_field = function (object) {
6932
- var hasLength = object.attr('data-length') !== null;
6933
- var lenAttr = parseInt(object.attr('data-length'));
6934
- var len = object[0].value.length;
6935
-
6936
- if (len === 0 && object[0].validity.badInput === false && !object.is(':required')) {
6937
- if (object.hasClass('validate')) {
6938
- object.removeClass('valid');
6939
- object.removeClass('invalid');
6940
- }
6941
- } else {
6942
- if (object.hasClass('validate')) {
6943
- // Check for character counter attributes
6944
- if (object.is(':valid') && hasLength && len <= lenAttr || object.is(':valid') && !hasLength) {
6945
- object.removeClass('invalid');
6946
- object.addClass('valid');
6947
- } else {
6948
- object.removeClass('valid');
6949
- object.addClass('invalid');
6950
- }
6951
- }
6952
- }
6953
- };
6954
-
6955
- M.textareaAutoResize = function ($textarea) {
6956
- // Wrap if native element
6957
- if ($textarea instanceof Element) {
6958
- $textarea = $($textarea);
6959
- }
6960
-
6961
- if (!$textarea.length) {
6962
- console.error('No textarea element found');
6963
- return;
6964
- }
6965
-
6966
- // Textarea Auto Resize
6967
- var hiddenDiv = $('.hiddendiv').first();
6968
- if (!hiddenDiv.length) {
6969
- hiddenDiv = $('<div class="hiddendiv common"></div>');
6970
- $('body').append(hiddenDiv);
6971
- }
6972
-
6973
- // Set font properties of hiddenDiv
6974
- var fontFamily = $textarea.css('font-family');
6975
- var fontSize = $textarea.css('font-size');
6976
- var lineHeight = $textarea.css('line-height');
6977
-
6978
- // Firefox can't handle padding shorthand.
6979
- var paddingTop = $textarea.css('padding-top');
6980
- var paddingRight = $textarea.css('padding-right');
6981
- var paddingBottom = $textarea.css('padding-bottom');
6982
- var paddingLeft = $textarea.css('padding-left');
6983
-
6984
- if (fontSize) {
6985
- hiddenDiv.css('font-size', fontSize);
6986
- }
6987
- if (fontFamily) {
6988
- hiddenDiv.css('font-family', fontFamily);
6989
- }
6990
- if (lineHeight) {
6991
- hiddenDiv.css('line-height', lineHeight);
6992
- }
6993
- if (paddingTop) {
6994
- hiddenDiv.css('padding-top', paddingTop);
6995
- }
6996
- if (paddingRight) {
6997
- hiddenDiv.css('padding-right', paddingRight);
6998
- }
6999
- if (paddingBottom) {
7000
- hiddenDiv.css('padding-bottom', paddingBottom);
7001
- }
7002
- if (paddingLeft) {
7003
- hiddenDiv.css('padding-left', paddingLeft);
7004
- }
7005
-
7006
- // Set original-height, if none
7007
- if (!$textarea.data('original-height')) {
7008
- $textarea.data('original-height', $textarea.height());
7009
- }
7010
-
7011
- if ($textarea.attr('wrap') === 'off') {
7012
- hiddenDiv.css('overflow-wrap', 'normal').css('white-space', 'pre');
7013
- }
7014
-
7015
- hiddenDiv.text($textarea[0].value + '\n');
7016
- var content = hiddenDiv.html().replace(/\n/g, '<br>');
7017
- hiddenDiv.html(content);
7018
-
7019
- // When textarea is hidden, width goes crazy.
7020
- // Approximate with half of window size
7021
-
7022
- if ($textarea[0].offsetWidth > 0 && $textarea[0].offsetHeight > 0) {
7023
- hiddenDiv.css('width', $textarea.width() + 'px');
7024
- } else {
7025
- hiddenDiv.css('width', window.innerWidth / 2 + 'px');
7026
- }
7027
-
7028
- /**
7029
- * Resize if the new height is greater than the
7030
- * original height of the textarea
7031
- */
7032
- if ($textarea.data('original-height') <= hiddenDiv.innerHeight()) {
7033
- $textarea.css('height', hiddenDiv.innerHeight() + 'px');
7034
- } else if ($textarea[0].value.length < $textarea.data('previous-length')) {
7035
- /**
7036
- * In case the new height is less than original height, it
7037
- * means the textarea has less text than before
7038
- * So we set the height to the original one
7039
- */
7040
- $textarea.css('height', $textarea.data('original-height') + 'px');
7041
- }
7042
- $textarea.data('previous-length', $textarea[0].value.length);
7043
- };
7044
-
7045
- $(document).ready(function () {
7046
- // Text based inputs
7047
- var input_selector = 'input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=search], input[type=date], input[type=time], textarea';
7048
-
7049
- // Add active if form auto complete
7050
- $(document).on('change', input_selector, function () {
7051
- if (this.value.length !== 0 || $(this).attr('placeholder') !== null) {
7052
- $(this).siblings('label').addClass('active');
7053
- }
7054
- M.validate_field($(this));
7055
- });
7056
-
7057
- // Add active if input element has been pre-populated on document ready
7058
- $(document).ready(function () {
7059
- M.updateTextFields();
7060
- });
7061
-
7062
- // HTML DOM FORM RESET handling
7063
- $(document).on('reset', function (e) {
7064
- var formReset = $(e.target);
7065
- if (formReset.is('form')) {
7066
- formReset.find(input_selector).removeClass('valid').removeClass('invalid');
7067
- formReset.find(input_selector).each(function (e) {
7068
- if (this.value.length) {
7069
- $(this).siblings('label').removeClass('active');
7070
- }
7071
- });
7072
-
7073
- // Reset select (after native reset)
7074
- setTimeout(function () {
7075
- formReset.find('select').each(function () {
7076
- // check if initialized
7077
- if (this.M_FormSelect) {
7078
- $(this).trigger('change');
7079
- }
7080
- });
7081
- }, 0);
7082
- }
7083
- });
7084
-
7085
- /**
7086
- * Add active when element has focus
7087
- * @param {Event} e
7088
- */
7089
- document.addEventListener('focus', function (e) {
7090
- if ($(e.target).is(input_selector)) {
7091
- $(e.target).siblings('label, .prefix').addClass('active');
7092
- }
7093
- }, true);
7094
-
7095
- /**
7096
- * Remove active when element is blurred
7097
- * @param {Event} e
7098
- */
7099
- document.addEventListener('blur', function (e) {
7100
- var $inputElement = $(e.target);
7101
- if ($inputElement.is(input_selector)) {
7102
- var selector = '.prefix';
7103
-
7104
- if ($inputElement[0].value.length === 0 && $inputElement[0].validity.badInput !== true && $inputElement.attr('placeholder') === null) {
7105
- selector += ', label';
7106
- }
7107
- $inputElement.siblings(selector).removeClass('active');
7108
- M.validate_field($inputElement);
7109
- }
7110
- }, true);
7111
-
7112
- // Radio and Checkbox focus class
7113
- var radio_checkbox = 'input[type=radio], input[type=checkbox]';
7114
- $(document).on('keyup', radio_checkbox, function (e) {
7115
- // TAB, check if tabbing to radio or checkbox.
7116
- if (e.which === M.keys.TAB) {
7117
- $(this).addClass('tabbed');
7118
- var $this = $(this);
7119
- $this.one('blur', function (e) {
7120
- $(this).removeClass('tabbed');
7121
- });
7122
- return;
7123
- }
7124
- });
7125
-
7126
- var text_area_selector = '.materialize-textarea';
7127
- $(text_area_selector).each(function () {
7128
- var $textarea = $(this);
7129
- /**
7130
- * Resize textarea on document load after storing
7131
- * the original height and the original length
7132
- */
7133
- $textarea.data('original-height', $textarea.height());
7134
- $textarea.data('previous-length', this.value.length);
7135
- M.textareaAutoResize($textarea);
7136
- });
7137
-
7138
- $(document).on('keyup', text_area_selector, function () {
7139
- M.textareaAutoResize($(this));
7140
- });
7141
- $(document).on('keydown', text_area_selector, function () {
7142
- M.textareaAutoResize($(this));
7143
- });
7144
-
7145
- // File Input Path
7146
- $(document).on('change', '.file-field input[type="file"]', function () {
7147
- var file_field = $(this).closest('.file-field');
7148
- var path_input = file_field.find('input.file-path');
7149
- var files = $(this)[0].files;
7150
- var file_names = [];
7151
- for (var i = 0; i < files.length; i++) {
7152
- file_names.push(files[i].name);
7153
- }
7154
- path_input[0].value = file_names.join(', ');
7155
- path_input.trigger('change');
7156
- });
7157
- }); // End of $(document).ready
7158
- })(cash);
7159
- ;(function ($, anim) {
7160
- 'use strict';
7161
-
7162
- var _defaults = {
7163
- indicators: true,
7164
- height: 400,
7165
- duration: 500,
7166
- interval: 6000
7167
- };
7168
-
7169
- /**
7170
- * @class
7171
- *
7172
- */
7173
-
7174
- var Slider = function (_Component11) {
7175
- _inherits(Slider, _Component11);
7176
-
7177
- /**
7178
- * Construct Slider instance and set up overlay
7179
- * @constructor
7180
- * @param {Element} el
7181
- * @param {Object} options
7182
- */
7183
- function Slider(el, options) {
7184
- _classCallCheck(this, Slider);
7185
-
7186
- var _this40 = _possibleConstructorReturn(this, (Slider.__proto__ || Object.getPrototypeOf(Slider)).call(this, Slider, el, options));
7187
-
7188
- _this40.el.M_Slider = _this40;
7189
-
7190
- /**
7191
- * Options for the modal
7192
- * @member Slider#options
7193
- * @prop {Boolean} [indicators=true] - Show indicators
7194
- * @prop {Number} [height=400] - height of slider
7195
- * @prop {Number} [duration=500] - Length in ms of slide transition
7196
- * @prop {Number} [interval=6000] - Length in ms of slide interval
7197
- */
7198
- _this40.options = $.extend({}, Slider.defaults, options);
7199
-
7200
- // setup
7201
- _this40.$slider = _this40.$el.find('.slides');
7202
- _this40.$slides = _this40.$slider.children('li');
7203
- _this40.activeIndex = _this40.$slides.filter(function (item) {
7204
- return $(item).hasClass('active');
7205
- }).first().index();
7206
- if (_this40.activeIndex != -1) {
7207
- _this40.$active = _this40.$slides.eq(_this40.activeIndex);
7208
- }
7209
-
7210
- _this40._setSliderHeight();
7211
-
7212
- // Set initial positions of captions
7213
- _this40.$slides.find('.caption').each(function (el) {
7214
- _this40._animateCaptionIn(el, 0);
7215
- });
7216
-
7217
- // Move img src into background-image
7218
- _this40.$slides.find('img').each(function (el) {
7219
- var placeholderBase64 = 'data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';
7220
- if ($(el).attr('src') !== placeholderBase64) {
7221
- $(el).css('background-image', 'url("' + $(el).attr('src') + '")');
7222
- $(el).attr('src', placeholderBase64);
7223
- }
7224
- });
7225
-
7226
- _this40._setupIndicators();
7227
-
7228
- // Show active slide
7229
- if (_this40.$active) {
7230
- _this40.$active.css('display', 'block');
7231
- } else {
7232
- _this40.$slides.first().addClass('active');
7233
- anim({
7234
- targets: _this40.$slides.first()[0],
7235
- opacity: 1,
7236
- duration: _this40.options.duration,
7237
- easing: 'easeOutQuad'
7238
- });
7239
-
7240
- _this40.activeIndex = 0;
7241
- _this40.$active = _this40.$slides.eq(_this40.activeIndex);
7242
-
7243
- // Update indicators
7244
- if (_this40.options.indicators) {
7245
- _this40.$indicators.eq(_this40.activeIndex).addClass('active');
7246
- }
7247
- }
7248
-
7249
- // Adjust height to current slide
7250
- _this40.$active.find('img').each(function (el) {
7251
- anim({
7252
- targets: _this40.$active.find('.caption')[0],
7253
- opacity: 1,
7254
- translateX: 0,
7255
- translateY: 0,
7256
- duration: _this40.options.duration,
7257
- easing: 'easeOutQuad'
7258
- });
7259
- });
7260
-
7261
- _this40._setupEventHandlers();
7262
-
7263
- // auto scroll
7264
- _this40.start();
7265
- return _this40;
7266
- }
7267
-
7268
- _createClass(Slider, [{
7269
- key: "destroy",
7270
-
7271
-
7272
- /**
7273
- * Teardown component
7274
- */
7275
- value: function destroy() {
7276
- this.pause();
7277
- this._removeIndicators();
7278
- this._removeEventHandlers();
7279
- this.el.M_Slider = undefined;
7280
- }
7281
-
7282
- /**
7283
- * Setup Event Handlers
7284
- */
7285
-
7286
- }, {
7287
- key: "_setupEventHandlers",
7288
- value: function _setupEventHandlers() {
7289
- var _this41 = this;
7290
-
7291
- this._handleIntervalBound = this._handleInterval.bind(this);
7292
- this._handleIndicatorClickBound = this._handleIndicatorClick.bind(this);
7293
-
7294
- if (this.options.indicators) {
7295
- this.$indicators.each(function (el) {
7296
- el.addEventListener('click', _this41._handleIndicatorClickBound);
7297
- });
7298
- }
7299
- }
7300
-
7301
- /**
7302
- * Remove Event Handlers
7303
- */
7304
-
7305
- }, {
7306
- key: "_removeEventHandlers",
7307
- value: function _removeEventHandlers() {
7308
- var _this42 = this;
7309
-
7310
- if (this.options.indicators) {
7311
- this.$indicators.each(function (el) {
7312
- el.removeEventListener('click', _this42._handleIndicatorClickBound);
7313
- });
7314
- }
7315
- }
7316
-
7317
- /**
7318
- * Handle indicator click
7319
- * @param {Event} e
7320
- */
7321
-
7322
- }, {
7323
- key: "_handleIndicatorClick",
7324
- value: function _handleIndicatorClick(e) {
7325
- var currIndex = $(e.target).index();
7326
- this.set(currIndex);
7327
- }
7328
-
7329
- /**
7330
- * Handle Interval
7331
- */
7332
-
7333
- }, {
7334
- key: "_handleInterval",
7335
- value: function _handleInterval() {
7336
- var newActiveIndex = this.$slider.find('.active').index();
7337
- if (this.$slides.length === newActiveIndex + 1) newActiveIndex = 0;
7338
- // loop to start
7339
- else newActiveIndex += 1;
7340
-
7341
- this.set(newActiveIndex);
7342
- }
7343
-
7344
- /**
7345
- * Animate in caption
7346
- * @param {Element} caption
7347
- * @param {Number} duration
7348
- */
7349
-
7350
- }, {
7351
- key: "_animateCaptionIn",
7352
- value: function _animateCaptionIn(caption, duration) {
7353
- var animOptions = {
7354
- targets: caption,
7355
- opacity: 0,
7356
- duration: duration,
7357
- easing: 'easeOutQuad'
7358
- };
7359
-
7360
- if ($(caption).hasClass('center-align')) {
7361
- animOptions.translateY = -100;
7362
- } else if ($(caption).hasClass('right-align')) {
7363
- animOptions.translateX = 100;
7364
- } else if ($(caption).hasClass('left-align')) {
7365
- animOptions.translateX = -100;
7366
- }
7367
-
7368
- anim(animOptions);
7369
- }
7370
-
7371
- /**
7372
- * Set height of slider
7373
- */
7374
-
7375
- }, {
7376
- key: "_setSliderHeight",
7377
- value: function _setSliderHeight() {
7378
- // If fullscreen, do nothing
7379
- if (!this.$el.hasClass('fullscreen')) {
7380
- if (this.options.indicators) {
7381
- // Add height if indicators are present
7382
- this.$el.css('height', this.options.height + 40 + 'px');
7383
- } else {
7384
- this.$el.css('height', this.options.height + 'px');
7385
- }
7386
- this.$slider.css('height', this.options.height + 'px');
7387
- }
7388
- }
7389
-
7390
- /**
7391
- * Setup indicators
7392
- */
7393
-
7394
- }, {
7395
- key: "_setupIndicators",
7396
- value: function _setupIndicators() {
7397
- var _this43 = this;
7398
-
7399
- if (this.options.indicators) {
7400
- this.$indicators = $('<ul class="indicators"></ul>');
7401
- this.$slides.each(function (el, index) {
7402
- var $indicator = $('<li class="indicator-item"></li>');
7403
- _this43.$indicators.append($indicator[0]);
7404
- });
7405
- this.$el.append(this.$indicators[0]);
7406
- this.$indicators = this.$indicators.children('li.indicator-item');
7407
- }
7408
- }
7409
-
7410
- /**
7411
- * Remove indicators
7412
- */
7413
-
7414
- }, {
7415
- key: "_removeIndicators",
7416
- value: function _removeIndicators() {
7417
- this.$el.find('ul.indicators').remove();
7418
- }
7419
-
7420
- /**
7421
- * Cycle to nth item
7422
- * @param {Number} index
7423
- */
7424
-
7425
- }, {
7426
- key: "set",
7427
- value: function set(index) {
7428
- var _this44 = this;
7429
-
7430
- // Wrap around indices.
7431
- if (index >= this.$slides.length) index = 0;else if (index < 0) index = this.$slides.length - 1;
7432
-
7433
- // Only do if index changes
7434
- if (this.activeIndex != index) {
7435
- this.$active = this.$slides.eq(this.activeIndex);
7436
- var $caption = this.$active.find('.caption');
7437
- this.$active.removeClass('active');
7438
-
7439
- anim({
7440
- targets: this.$active[0],
7441
- opacity: 0,
7442
- duration: this.options.duration,
7443
- easing: 'easeOutQuad',
7444
- complete: function () {
7445
- _this44.$slides.not('.active').each(function (el) {
7446
- anim({
7447
- targets: el,
7448
- opacity: 0,
7449
- translateX: 0,
7450
- translateY: 0,
7451
- duration: 0,
7452
- easing: 'easeOutQuad'
7453
- });
7454
- });
7455
- }
7456
- });
7457
-
7458
- this._animateCaptionIn($caption[0], this.options.duration);
7459
-
7460
- // Update indicators
7461
- if (this.options.indicators) {
7462
- this.$indicators.eq(this.activeIndex).removeClass('active');
7463
- this.$indicators.eq(index).addClass('active');
7464
- }
7465
-
7466
- anim({
7467
- targets: this.$slides.eq(index)[0],
7468
- opacity: 1,
7469
- duration: this.options.duration,
7470
- easing: 'easeOutQuad'
7471
- });
7472
-
7473
- anim({
7474
- targets: this.$slides.eq(index).find('.caption')[0],
7475
- opacity: 1,
7476
- translateX: 0,
7477
- translateY: 0,
7478
- duration: this.options.duration,
7479
- delay: this.options.duration,
7480
- easing: 'easeOutQuad'
7481
- });
7482
-
7483
- this.$slides.eq(index).addClass('active');
7484
- this.activeIndex = index;
7485
-
7486
- // Reset interval
7487
- this.start();
7488
- }
7489
- }
7490
-
7491
- /**
7492
- * Pause slider interval
7493
- */
7494
-
7495
- }, {
7496
- key: "pause",
7497
- value: function pause() {
7498
- clearInterval(this.interval);
7499
- }
7500
-
7501
- /**
7502
- * Start slider interval
7503
- */
7504
-
7505
- }, {
7506
- key: "start",
7507
- value: function start() {
7508
- clearInterval(this.interval);
7509
- this.interval = setInterval(this._handleIntervalBound, this.options.duration + this.options.interval);
7510
- }
7511
-
7512
- /**
7513
- * Move to next slide
7514
- */
7515
-
7516
- }, {
7517
- key: "next",
7518
- value: function next() {
7519
- var newIndex = this.activeIndex + 1;
7520
-
7521
- // Wrap around indices.
7522
- if (newIndex >= this.$slides.length) newIndex = 0;else if (newIndex < 0) newIndex = this.$slides.length - 1;
7523
-
7524
- this.set(newIndex);
7525
- }
7526
-
7527
- /**
7528
- * Move to previous slide
7529
- */
7530
-
7531
- }, {
7532
- key: "prev",
7533
- value: function prev() {
7534
- var newIndex = this.activeIndex - 1;
7535
-
7536
- // Wrap around indices.
7537
- if (newIndex >= this.$slides.length) newIndex = 0;else if (newIndex < 0) newIndex = this.$slides.length - 1;
7538
-
7539
- this.set(newIndex);
7540
- }
7541
- }], [{
7542
- key: "init",
7543
- value: function init(els, options) {
7544
- return _get(Slider.__proto__ || Object.getPrototypeOf(Slider), "init", this).call(this, this, els, options);
7545
- }
7546
-
7547
- /**
7548
- * Get Instance
7549
- */
7550
-
7551
- }, {
7552
- key: "getInstance",
7553
- value: function getInstance(el) {
7554
- var domElem = !!el.jquery ? el[0] : el;
7555
- return domElem.M_Slider;
7556
- }
7557
- }, {
7558
- key: "defaults",
7559
- get: function () {
7560
- return _defaults;
7561
- }
7562
- }]);
7563
-
7564
- return Slider;
7565
- }(Component);
7566
-
7567
- M.Slider = Slider;
7568
-
7569
- if (M.jQueryLoaded) {
7570
- M.initializeJqueryWrapper(Slider, 'slider', 'M_Slider');
7571
- }
7572
- })(cash, M.anime);
7573
- ;(function ($, anim) {
7574
- $(document).on('click', '.card', function (e) {
7575
- if ($(this).children('.card-reveal').length) {
7576
- var $card = $(e.target).closest('.card');
7577
- if ($card.data('initialOverflow') === undefined) {
7578
- $card.data('initialOverflow', $card.css('overflow') === undefined ? '' : $card.css('overflow'));
7579
- }
7580
- var $cardReveal = $(this).find('.card-reveal');
7581
- if ($(e.target).is($('.card-reveal .card-title')) || $(e.target).is($('.card-reveal .card-title i'))) {
7582
- // Make Reveal animate down and display none
7583
- anim({
7584
- targets: $cardReveal[0],
7585
- translateY: 0,
7586
- duration: 225,
7587
- easing: 'easeInOutQuad',
7588
- complete: function (anim) {
7589
- var el = anim.animatables[0].target;
7590
- $(el).css({ display: 'none' });
7591
- $card.css('overflow', $card.data('initialOverflow'));
7592
- }
7593
- });
7594
- } else if ($(e.target).is($('.card .activator')) || $(e.target).is($('.card .activator i'))) {
7595
- $card.css('overflow', 'hidden');
7596
- $cardReveal.css({ display: 'block' });
7597
- anim({
7598
- targets: $cardReveal[0],
7599
- translateY: '-100%',
7600
- duration: 300,
7601
- easing: 'easeInOutQuad'
7602
- });
7603
- }
7604
- }
7605
- });
7606
- })(cash, M.anime);
7607
- ;(function ($) {
7608
- 'use strict';
7609
-
7610
- var _defaults = {
7611
- data: [],
7612
- placeholder: '',
7613
- secondaryPlaceholder: '',
7614
- autocompleteOptions: {},
7615
- limit: Infinity,
7616
- onChipAdd: null,
7617
- onChipSelect: null,
7618
- onChipDelete: null
7619
- };
7620
-
7621
- /**
7622
- * @typedef {Object} chip
7623
- * @property {String} tag chip tag string
7624
- * @property {String} [image] chip avatar image string
7625
- */
7626
-
7627
- /**
7628
- * @class
7629
- *
7630
- */
7631
-
7632
- var Chips = function (_Component12) {
7633
- _inherits(Chips, _Component12);
7634
-
7635
- /**
7636
- * Construct Chips instance and set up overlay
7637
- * @constructor
7638
- * @param {Element} el
7639
- * @param {Object} options
7640
- */
7641
- function Chips(el, options) {
7642
- _classCallCheck(this, Chips);
7643
-
7644
- var _this45 = _possibleConstructorReturn(this, (Chips.__proto__ || Object.getPrototypeOf(Chips)).call(this, Chips, el, options));
7645
-
7646
- _this45.el.M_Chips = _this45;
7647
-
7648
- /**
7649
- * Options for the modal
7650
- * @member Chips#options
7651
- * @prop {Array} data
7652
- * @prop {String} placeholder
7653
- * @prop {String} secondaryPlaceholder
7654
- * @prop {Object} autocompleteOptions
7655
- */
7656
- _this45.options = $.extend({}, Chips.defaults, options);
7657
-
7658
- _this45.$el.addClass('chips input-field');
7659
- _this45.chipsData = [];
7660
- _this45.$chips = $();
7661
- _this45._setupInput();
7662
- _this45.hasAutocomplete = Object.keys(_this45.options.autocompleteOptions).length > 0;
7663
-
7664
- // Set input id
7665
- if (!_this45.$input.attr('id')) {
7666
- _this45.$input.attr('id', M.guid());
7667
- }
7668
-
7669
- // Render initial chips
7670
- if (_this45.options.data.length) {
7671
- _this45.chipsData = _this45.options.data;
7672
- _this45._renderChips(_this45.chipsData);
7673
- }
7674
-
7675
- // Setup autocomplete if needed
7676
- if (_this45.hasAutocomplete) {
7677
- _this45._setupAutocomplete();
7678
- }
7679
-
7680
- _this45._setPlaceholder();
7681
- _this45._setupLabel();
7682
- _this45._setupEventHandlers();
7683
- return _this45;
7684
- }
7685
-
7686
- _createClass(Chips, [{
7687
- key: "getData",
7688
-
7689
-
7690
- /**
7691
- * Get Chips Data
7692
- */
7693
- value: function getData() {
7694
- return this.chipsData;
7695
- }
7696
-
7697
- /**
7698
- * Teardown component
7699
- */
7700
-
7701
- }, {
7702
- key: "destroy",
7703
- value: function destroy() {
7704
- this._removeEventHandlers();
7705
- this.$chips.remove();
7706
- this.el.M_Chips = undefined;
7707
- }
7708
-
7709
- /**
7710
- * Setup Event Handlers
7711
- */
7712
-
7713
- }, {
7714
- key: "_setupEventHandlers",
7715
- value: function _setupEventHandlers() {
7716
- this._handleChipClickBound = this._handleChipClick.bind(this);
7717
- this._handleInputKeydownBound = this._handleInputKeydown.bind(this);
7718
- this._handleInputFocusBound = this._handleInputFocus.bind(this);
7719
- this._handleInputBlurBound = this._handleInputBlur.bind(this);
7720
-
7721
- this.el.addEventListener('click', this._handleChipClickBound);
7722
- document.addEventListener('keydown', Chips._handleChipsKeydown);
7723
- document.addEventListener('keyup', Chips._handleChipsKeyup);
7724
- this.el.addEventListener('blur', Chips._handleChipsBlur, true);
7725
- this.$input[0].addEventListener('focus', this._handleInputFocusBound);
7726
- this.$input[0].addEventListener('blur', this._handleInputBlurBound);
7727
- this.$input[0].addEventListener('keydown', this._handleInputKeydownBound);
7728
- }
7729
-
7730
- /**
7731
- * Remove Event Handlers
7732
- */
7733
-
7734
- }, {
7735
- key: "_removeEventHandlers",
7736
- value: function _removeEventHandlers() {
7737
- this.el.removeEventListener('click', this._handleChipClickBound);
7738
- document.removeEventListener('keydown', Chips._handleChipsKeydown);
7739
- document.removeEventListener('keyup', Chips._handleChipsKeyup);
7740
- this.el.removeEventListener('blur', Chips._handleChipsBlur, true);
7741
- this.$input[0].removeEventListener('focus', this._handleInputFocusBound);
7742
- this.$input[0].removeEventListener('blur', this._handleInputBlurBound);
7743
- this.$input[0].removeEventListener('keydown', this._handleInputKeydownBound);
7744
- }
7745
-
7746
- /**
7747
- * Handle Chip Click
7748
- * @param {Event} e
7749
- */
7750
-
7751
- }, {
7752
- key: "_handleChipClick",
7753
- value: function _handleChipClick(e) {
7754
- var $chip = $(e.target).closest('.chip');
7755
- var clickedClose = $(e.target).is('.close');
7756
- if ($chip.length) {
7757
- var index = $chip.index();
7758
- if (clickedClose) {
7759
- // delete chip
7760
- this.deleteChip(index);
7761
- this.$input[0].focus();
7762
- } else {
7763
- // select chip
7764
- this.selectChip(index);
7765
- }
7766
-
7767
- // Default handle click to focus on input
7768
- } else {
7769
- this.$input[0].focus();
7770
- }
7771
- }
7772
-
7773
- /**
7774
- * Handle Chips Keydown
7775
- * @param {Event} e
7776
- */
7777
-
7778
- }, {
7779
- key: "_handleInputFocus",
7780
-
7781
-
7782
- /**
7783
- * Handle Input Focus
7784
- */
7785
- value: function _handleInputFocus() {
7786
- this.$el.addClass('focus');
7787
- }
7788
-
7789
- /**
7790
- * Handle Input Blur
7791
- */
7792
-
7793
- }, {
7794
- key: "_handleInputBlur",
7795
- value: function _handleInputBlur() {
7796
- this.$el.removeClass('focus');
7797
- }
7798
-
7799
- /**
7800
- * Handle Input Keydown
7801
- * @param {Event} e
7802
- */
7803
-
7804
- }, {
7805
- key: "_handleInputKeydown",
7806
- value: function _handleInputKeydown(e) {
7807
- Chips._keydown = true;
7808
-
7809
- // enter
7810
- if (e.keyCode === 13) {
7811
- // Override enter if autocompleting.
7812
- if (this.hasAutocomplete && this.autocomplete && this.autocomplete.isOpen) {
7813
- return;
7814
- }
7815
-
7816
- e.preventDefault();
7817
- this.addChip({
7818
- tag: this.$input[0].value
7819
- });
7820
- this.$input[0].value = '';
7821
-
7822
- // delete or left
7823
- } else if ((e.keyCode === 8 || e.keyCode === 37) && this.$input[0].value === '' && this.chipsData.length) {
7824
- e.preventDefault();
7825
- this.selectChip(this.chipsData.length - 1);
7826
- }
7827
- }
7828
-
7829
- /**
7830
- * Render Chip
7831
- * @param {chip} chip
7832
- * @return {Element}
7833
- */
7834
-
7835
- }, {
7836
- key: "_renderChip",
7837
- value: function _renderChip(chip) {
7838
- if (!chip.tag) {
7839
- return;
7840
- }
7841
-
7842
- var renderedChip = document.createElement('div');
7843
- var closeIcon = document.createElement('i');
7844
- renderedChip.classList.add('chip');
7845
- renderedChip.textContent = chip.tag;
7846
- renderedChip.setAttribute('tabindex', 0);
7847
- $(closeIcon).addClass('material-icons close');
7848
- closeIcon.textContent = 'close';
7849
-
7850
- // attach image if needed
7851
- if (chip.image) {
7852
- var img = document.createElement('img');
7853
- img.setAttribute('src', chip.image);
7854
- renderedChip.insertBefore(img, renderedChip.firstChild);
7855
- }
7856
-
7857
- renderedChip.appendChild(closeIcon);
7858
- return renderedChip;
7859
- }
7860
-
7861
- /**
7862
- * Render Chips
7863
- */
7864
-
7865
- }, {
7866
- key: "_renderChips",
7867
- value: function _renderChips() {
7868
- this.$chips.remove();
7869
- for (var i = 0; i < this.chipsData.length; i++) {
7870
- var chipEl = this._renderChip(this.chipsData[i]);
7871
- this.$el.append(chipEl);
7872
- this.$chips.add(chipEl);
7873
- }
7874
-
7875
- // move input to end
7876
- this.$el.append(this.$input[0]);
7877
- }
7878
-
7879
- /**
7880
- * Setup Autocomplete
7881
- */
7882
-
7883
- }, {
7884
- key: "_setupAutocomplete",
7885
- value: function _setupAutocomplete() {
7886
- var _this46 = this;
7887
-
7888
- this.options.autocompleteOptions.onAutocomplete = function (val) {
7889
- _this46.addChip({
7890
- tag: val
7891
- });
7892
- _this46.$input[0].value = '';
7893
- _this46.$input[0].focus();
7894
- };
7895
-
7896
- this.autocomplete = M.Autocomplete.init(this.$input[0], this.options.autocompleteOptions);
7897
- }
7898
-
7899
- /**
7900
- * Setup Input
7901
- */
7902
-
7903
- }, {
7904
- key: "_setupInput",
7905
- value: function _setupInput() {
7906
- this.$input = this.$el.find('input');
7907
- if (!this.$input.length) {
7908
- this.$input = $('<input></input>');
7909
- this.$el.append(this.$input);
7910
- }
7911
-
7912
- this.$input.addClass('input');
7913
- }
7914
-
7915
- /**
7916
- * Setup Label
7917
- */
7918
-
7919
- }, {
7920
- key: "_setupLabel",
7921
- value: function _setupLabel() {
7922
- this.$label = this.$el.find('label');
7923
- if (this.$label.length) {
7924
- this.$label.setAttribute('for', this.$input.attr('id'));
7925
- }
7926
- }
7927
-
7928
- /**
7929
- * Set placeholder
7930
- */
7931
-
7932
- }, {
7933
- key: "_setPlaceholder",
7934
- value: function _setPlaceholder() {
7935
- if (this.chipsData !== undefined && !this.chipsData.length && this.options.placeholder) {
7936
- $(this.$input).prop('placeholder', this.options.placeholder);
7937
- } else if ((this.chipsData === undefined || !!this.chipsData.length) && this.options.secondaryPlaceholder) {
7938
- $(this.$input).prop('placeholder', this.options.secondaryPlaceholder);
7939
- }
7940
- }
7941
-
7942
- /**
7943
- * Check if chip is valid
7944
- * @param {chip} chip
7945
- */
7946
-
7947
- }, {
7948
- key: "_isValid",
7949
- value: function _isValid(chip) {
7950
- if (chip.hasOwnProperty('tag') && chip.tag !== '') {
7951
- var exists = false;
7952
- for (var i = 0; i < this.chipsData.length; i++) {
7953
- if (this.chipsData[i].tag === chip.tag) {
7954
- exists = true;
7955
- break;
7956
- }
7957
- }
7958
- return !exists;
7959
- }
7960
-
7961
- return false;
7962
- }
7963
-
7964
- /**
7965
- * Add chip
7966
- * @param {chip} chip
7967
- */
7968
-
7969
- }, {
7970
- key: "addChip",
7971
- value: function addChip(chip) {
7972
- if (!this._isValid(chip) || this.chipsData.length >= this.options.limit) {
7973
- return;
7974
- }
7975
-
7976
- var renderedChip = this._renderChip(chip);
7977
- this.$chips.add(renderedChip);
7978
- this.chipsData.push(chip);
7979
- $(this.$input).before(renderedChip);
7980
- this._setPlaceholder();
7981
-
7982
- // fire chipAdd callback
7983
- if (typeof this.options.onChipAdd === 'function') {
7984
- this.options.onChipAdd.call(this, this.$el, renderedChip);
7985
- }
7986
- }
7987
-
7988
- /**
7989
- * Delete chip
7990
- * @param {Number} chip
7991
- */
7992
-
7993
- }, {
7994
- key: "deleteChip",
7995
- value: function deleteChip(chipIndex) {
7996
- var $chip = this.$chips.eq(chipIndex);
7997
- this.$chips.eq(chipIndex).remove();
7998
- this.$chips = this.$chips.filter(function (el) {
7999
- return $(el).index() >= 0;
8000
- });
8001
- this.chipsData.splice(chipIndex, 1);
8002
- this._setPlaceholder();
8003
-
8004
- // fire chipDelete callback
8005
- if (typeof this.options.onChipDelete === 'function') {
8006
- this.options.onChipDelete.call(this, this.$el, $chip[0]);
8007
- }
8008
- }
8009
-
8010
- /**
8011
- * Select chip
8012
- * @param {Number} chip
8013
- */
8014
-
8015
- }, {
8016
- key: "selectChip",
8017
- value: function selectChip(chipIndex) {
8018
- var $chip = this.$chips.eq(chipIndex);
8019
- this._selectedChip = $chip;
8020
- $chip[0].focus();
8021
-
8022
- // fire chipSelect callback
8023
- if (typeof this.options.onChipSelect === 'function') {
8024
- this.options.onChipSelect.call(this, this.$el, $chip[0]);
8025
- }
8026
- }
8027
- }], [{
8028
- key: "init",
8029
- value: function init(els, options) {
8030
- return _get(Chips.__proto__ || Object.getPrototypeOf(Chips), "init", this).call(this, this, els, options);
8031
- }
8032
-
8033
- /**
8034
- * Get Instance
8035
- */
8036
-
8037
- }, {
8038
- key: "getInstance",
8039
- value: function getInstance(el) {
8040
- var domElem = !!el.jquery ? el[0] : el;
8041
- return domElem.M_Chips;
8042
- }
8043
- }, {
8044
- key: "_handleChipsKeydown",
8045
- value: function _handleChipsKeydown(e) {
8046
- Chips._keydown = true;
8047
-
8048
- var $chips = $(e.target).closest('.chips');
8049
- var chipsKeydown = e.target && $chips.length;
8050
-
8051
- // Don't handle keydown inputs on input and textarea
8052
- if ($(e.target).is('input, textarea') || !chipsKeydown) {
8053
- return;
8054
- }
8055
-
8056
- var currChips = $chips[0].M_Chips;
8057
-
8058
- // backspace and delete
8059
- if (e.keyCode === 8 || e.keyCode === 46) {
8060
- e.preventDefault();
8061
-
8062
- var selectIndex = currChips.chipsData.length;
8063
- if (currChips._selectedChip) {
8064
- var index = currChips._selectedChip.index();
8065
- currChips.deleteChip(index);
8066
- currChips._selectedChip = null;
8067
-
8068
- // Make sure selectIndex doesn't go negative
8069
- selectIndex = Math.max(index - 1, 0);
8070
- }
8071
-
8072
- if (currChips.chipsData.length) {
8073
- currChips.selectChip(selectIndex);
8074
- }
8075
-
8076
- // left arrow key
8077
- } else if (e.keyCode === 37) {
8078
- if (currChips._selectedChip) {
8079
- var _selectIndex = currChips._selectedChip.index() - 1;
8080
- if (_selectIndex < 0) {
8081
- return;
8082
- }
8083
- currChips.selectChip(_selectIndex);
8084
- }
8085
-
8086
- // right arrow key
8087
- } else if (e.keyCode === 39) {
8088
- if (currChips._selectedChip) {
8089
- var _selectIndex2 = currChips._selectedChip.index() + 1;
8090
-
8091
- if (_selectIndex2 >= currChips.chipsData.length) {
8092
- currChips.$input[0].focus();
8093
- } else {
8094
- currChips.selectChip(_selectIndex2);
8095
- }
8096
- }
8097
- }
8098
- }
8099
-
8100
- /**
8101
- * Handle Chips Keyup
8102
- * @param {Event} e
8103
- */
8104
-
8105
- }, {
8106
- key: "_handleChipsKeyup",
8107
- value: function _handleChipsKeyup(e) {
8108
- Chips._keydown = false;
8109
- }
8110
-
8111
- /**
8112
- * Handle Chips Blur
8113
- * @param {Event} e
8114
- */
8115
-
8116
- }, {
8117
- key: "_handleChipsBlur",
8118
- value: function _handleChipsBlur(e) {
8119
- if (!Chips._keydown) {
8120
- var $chips = $(e.target).closest('.chips');
8121
- var currChips = $chips[0].M_Chips;
8122
-
8123
- currChips._selectedChip = null;
8124
- }
8125
- }
8126
- }, {
8127
- key: "defaults",
8128
- get: function () {
8129
- return _defaults;
8130
- }
8131
- }]);
8132
-
8133
- return Chips;
8134
- }(Component);
8135
-
8136
- /**
8137
- * @static
8138
- * @memberof Chips
8139
- */
8140
-
8141
-
8142
- Chips._keydown = false;
8143
-
8144
- M.Chips = Chips;
8145
-
8146
- if (M.jQueryLoaded) {
8147
- M.initializeJqueryWrapper(Chips, 'chips', 'M_Chips');
8148
- }
8149
-
8150
- $(document).ready(function () {
8151
- // Handle removal of static chips.
8152
- $(document.body).on('click', '.chip .close', function () {
8153
- var $chips = $(this).closest('.chips');
8154
- if ($chips.length && $chips[0].M_Chips) {
8155
- return;
8156
- }
8157
- $(this).closest('.chip').remove();
8158
- });
8159
- });
8160
- })(cash);
8161
- ;(function ($) {
8162
- 'use strict';
8163
-
8164
- var _defaults = {
8165
- top: 0,
8166
- bottom: Infinity,
8167
- offset: 0,
8168
- onPositionChange: null
8169
- };
8170
-
8171
- /**
8172
- * @class
8173
- *
8174
- */
8175
-
8176
- var Pushpin = function (_Component13) {
8177
- _inherits(Pushpin, _Component13);
8178
-
8179
- /**
8180
- * Construct Pushpin instance
8181
- * @constructor
8182
- * @param {Element} el
8183
- * @param {Object} options
8184
- */
8185
- function Pushpin(el, options) {
8186
- _classCallCheck(this, Pushpin);
8187
-
8188
- var _this47 = _possibleConstructorReturn(this, (Pushpin.__proto__ || Object.getPrototypeOf(Pushpin)).call(this, Pushpin, el, options));
8189
-
8190
- _this47.el.M_Pushpin = _this47;
8191
-
8192
- /**
8193
- * Options for the modal
8194
- * @member Pushpin#options
8195
- */
8196
- _this47.options = $.extend({}, Pushpin.defaults, options);
8197
-
8198
- _this47.originalOffset = _this47.el.offsetTop;
8199
- Pushpin._pushpins.push(_this47);
8200
- _this47._setupEventHandlers();
8201
- _this47._updatePosition();
8202
- return _this47;
8203
- }
8204
-
8205
- _createClass(Pushpin, [{
8206
- key: "destroy",
8207
-
8208
-
8209
- /**
8210
- * Teardown component
8211
- */
8212
- value: function destroy() {
8213
- this.el.style.top = null;
8214
- this._removePinClasses();
8215
- this._removeEventHandlers();
8216
-
8217
- // Remove pushpin Inst
8218
- var index = Pushpin._pushpins.indexOf(this);
8219
- Pushpin._pushpins.splice(index, 1);
8220
- }
8221
- }, {
8222
- key: "_setupEventHandlers",
8223
- value: function _setupEventHandlers() {
8224
- document.addEventListener('scroll', Pushpin._updateElements);
8225
- }
8226
- }, {
8227
- key: "_removeEventHandlers",
8228
- value: function _removeEventHandlers() {
8229
- document.removeEventListener('scroll', Pushpin._updateElements);
8230
- }
8231
- }, {
8232
- key: "_updatePosition",
8233
- value: function _updatePosition() {
8234
- var scrolled = M.getDocumentScrollTop() + this.options.offset;
8235
-
8236
- if (this.options.top <= scrolled && this.options.bottom >= scrolled && !this.el.classList.contains('pinned')) {
8237
- this._removePinClasses();
8238
- this.el.style.top = this.options.offset + "px";
8239
- this.el.classList.add('pinned');
8240
-
8241
- // onPositionChange callback
8242
- if (typeof this.options.onPositionChange === 'function') {
8243
- this.options.onPositionChange.call(this, 'pinned');
8244
- }
8245
- }
8246
-
8247
- // Add pin-top (when scrolled position is above top)
8248
- if (scrolled < this.options.top && !this.el.classList.contains('pin-top')) {
8249
- this._removePinClasses();
8250
- this.el.style.top = 0;
8251
- this.el.classList.add('pin-top');
8252
-
8253
- // onPositionChange callback
8254
- if (typeof this.options.onPositionChange === 'function') {
8255
- this.options.onPositionChange.call(this, 'pin-top');
8256
- }
8257
- }
8258
-
8259
- // Add pin-bottom (when scrolled position is below bottom)
8260
- if (scrolled > this.options.bottom && !this.el.classList.contains('pin-bottom')) {
8261
- this._removePinClasses();
8262
- this.el.classList.add('pin-bottom');
8263
- this.el.style.top = this.options.bottom - this.originalOffset + "px";
8264
-
8265
- // onPositionChange callback
8266
- if (typeof this.options.onPositionChange === 'function') {
8267
- this.options.onPositionChange.call(this, 'pin-bottom');
8268
- }
8269
- }
8270
- }
8271
- }, {
8272
- key: "_removePinClasses",
8273
- value: function _removePinClasses() {
8274
- // IE 11 bug (can't remove multiple classes in one line)
8275
- this.el.classList.remove('pin-top');
8276
- this.el.classList.remove('pinned');
8277
- this.el.classList.remove('pin-bottom');
8278
- }
8279
- }], [{
8280
- key: "init",
8281
- value: function init(els, options) {
8282
- return _get(Pushpin.__proto__ || Object.getPrototypeOf(Pushpin), "init", this).call(this, this, els, options);
8283
- }
8284
-
8285
- /**
8286
- * Get Instance
8287
- */
8288
-
8289
- }, {
8290
- key: "getInstance",
8291
- value: function getInstance(el) {
8292
- var domElem = !!el.jquery ? el[0] : el;
8293
- return domElem.M_Pushpin;
8294
- }
8295
- }, {
8296
- key: "_updateElements",
8297
- value: function _updateElements() {
8298
- for (var elIndex in Pushpin._pushpins) {
8299
- var pInstance = Pushpin._pushpins[elIndex];
8300
- pInstance._updatePosition();
8301
- }
8302
- }
8303
- }, {
8304
- key: "defaults",
8305
- get: function () {
8306
- return _defaults;
8307
- }
8308
- }]);
8309
-
8310
- return Pushpin;
8311
- }(Component);
8312
-
8313
- /**
8314
- * @static
8315
- * @memberof Pushpin
8316
- */
8317
-
8318
-
8319
- Pushpin._pushpins = [];
8320
-
8321
- M.Pushpin = Pushpin;
8322
-
8323
- if (M.jQueryLoaded) {
8324
- M.initializeJqueryWrapper(Pushpin, 'pushpin', 'M_Pushpin');
8325
- }
8326
- })(cash);
8327
- ;(function ($, anim) {
8328
- 'use strict';
8329
-
8330
- var _defaults = {
8331
- direction: 'top',
8332
- hoverEnabled: true,
8333
- toolbarEnabled: false
8334
- };
8335
-
8336
- $.fn.reverse = [].reverse;
8337
-
8338
- /**
8339
- * @class
8340
- *
8341
- */
8342
-
8343
- var FloatingActionButton = function (_Component14) {
8344
- _inherits(FloatingActionButton, _Component14);
8345
-
8346
- /**
8347
- * Construct FloatingActionButton instance
8348
- * @constructor
8349
- * @param {Element} el
8350
- * @param {Object} options
8351
- */
8352
- function FloatingActionButton(el, options) {
8353
- _classCallCheck(this, FloatingActionButton);
8354
-
8355
- var _this48 = _possibleConstructorReturn(this, (FloatingActionButton.__proto__ || Object.getPrototypeOf(FloatingActionButton)).call(this, FloatingActionButton, el, options));
8356
-
8357
- _this48.el.M_FloatingActionButton = _this48;
8358
-
8359
- /**
8360
- * Options for the fab
8361
- * @member FloatingActionButton#options
8362
- * @prop {Boolean} [direction] - Direction fab menu opens
8363
- * @prop {Boolean} [hoverEnabled=true] - Enable hover vs click
8364
- * @prop {Boolean} [toolbarEnabled=false] - Enable toolbar transition
8365
- */
8366
- _this48.options = $.extend({}, FloatingActionButton.defaults, options);
8367
-
8368
- _this48.isOpen = false;
8369
- _this48.$anchor = _this48.$el.children('a').first();
8370
- _this48.$menu = _this48.$el.children('ul').first();
8371
- _this48.$floatingBtns = _this48.$el.find('ul .btn-floating');
8372
- _this48.$floatingBtnsReverse = _this48.$el.find('ul .btn-floating').reverse();
8373
- _this48.offsetY = 0;
8374
- _this48.offsetX = 0;
8375
-
8376
- _this48.$el.addClass("direction-" + _this48.options.direction);
8377
- if (_this48.options.direction === 'top') {
8378
- _this48.offsetY = 40;
8379
- } else if (_this48.options.direction === 'right') {
8380
- _this48.offsetX = -40;
8381
- } else if (_this48.options.direction === 'bottom') {
8382
- _this48.offsetY = -40;
8383
- } else {
8384
- _this48.offsetX = 40;
8385
- }
8386
- _this48._setupEventHandlers();
8387
- return _this48;
8388
- }
8389
-
8390
- _createClass(FloatingActionButton, [{
8391
- key: "destroy",
8392
-
8393
-
8394
- /**
8395
- * Teardown component
8396
- */
8397
- value: function destroy() {
8398
- this._removeEventHandlers();
8399
- this.el.M_FloatingActionButton = undefined;
8400
- }
8401
-
8402
- /**
8403
- * Setup Event Handlers
8404
- */
8405
-
8406
- }, {
8407
- key: "_setupEventHandlers",
8408
- value: function _setupEventHandlers() {
8409
- this._handleFABClickBound = this._handleFABClick.bind(this);
8410
- this._handleOpenBound = this.open.bind(this);
8411
- this._handleCloseBound = this.close.bind(this);
8412
-
8413
- if (this.options.hoverEnabled && !this.options.toolbarEnabled) {
8414
- this.el.addEventListener('mouseenter', this._handleOpenBound);
8415
- this.el.addEventListener('mouseleave', this._handleCloseBound);
8416
- } else {
8417
- this.el.addEventListener('click', this._handleFABClickBound);
8418
- }
8419
- }
8420
-
8421
- /**
8422
- * Remove Event Handlers
8423
- */
8424
-
8425
- }, {
8426
- key: "_removeEventHandlers",
8427
- value: function _removeEventHandlers() {
8428
- if (this.options.hoverEnabled && !this.options.toolbarEnabled) {
8429
- this.el.removeEventListener('mouseenter', this._handleOpenBound);
8430
- this.el.removeEventListener('mouseleave', this._handleCloseBound);
8431
- } else {
8432
- this.el.removeEventListener('click', this._handleFABClickBound);
8433
- }
8434
- }
8435
-
8436
- /**
8437
- * Handle FAB Click
8438
- */
8439
-
8440
- }, {
8441
- key: "_handleFABClick",
8442
- value: function _handleFABClick() {
8443
- if (this.isOpen) {
8444
- this.close();
8445
- } else {
8446
- this.open();
8447
- }
8448
- }
8449
-
8450
- /**
8451
- * Handle Document Click
8452
- * @param {Event} e
8453
- */
8454
-
8455
- }, {
8456
- key: "_handleDocumentClick",
8457
- value: function _handleDocumentClick(e) {
8458
- if (!$(e.target).closest(this.$menu).length) {
8459
- this.close();
8460
- }
8461
- }
8462
-
8463
- /**
8464
- * Open FAB
8465
- */
8466
-
8467
- }, {
8468
- key: "open",
8469
- value: function open() {
8470
- if (this.isOpen) {
8471
- return;
8472
- }
8473
-
8474
- if (this.options.toolbarEnabled) {
8475
- this._animateInToolbar();
8476
- } else {
8477
- this._animateInFAB();
8478
- }
8479
- this.isOpen = true;
8480
- }
8481
-
8482
- /**
8483
- * Close FAB
8484
- */
8485
-
8486
- }, {
8487
- key: "close",
8488
- value: function close() {
8489
- if (!this.isOpen) {
8490
- return;
8491
- }
8492
-
8493
- if (this.options.toolbarEnabled) {
8494
- window.removeEventListener('scroll', this._handleCloseBound, true);
8495
- document.body.removeEventListener('click', this._handleDocumentClickBound, true);
8496
- this._animateOutToolbar();
8497
- } else {
8498
- this._animateOutFAB();
8499
- }
8500
- this.isOpen = false;
8501
- }
8502
-
8503
- /**
8504
- * Classic FAB Menu open
8505
- */
8506
-
8507
- }, {
8508
- key: "_animateInFAB",
8509
- value: function _animateInFAB() {
8510
- var _this49 = this;
8511
-
8512
- this.$el.addClass('active');
8513
-
8514
- var time = 0;
8515
- this.$floatingBtnsReverse.each(function (el) {
8516
- anim({
8517
- targets: el,
8518
- opacity: 1,
8519
- scale: [0.4, 1],
8520
- translateY: [_this49.offsetY, 0],
8521
- translateX: [_this49.offsetX, 0],
8522
- duration: 275,
8523
- delay: time,
8524
- easing: 'easeInOutQuad'
8525
- });
8526
- time += 40;
8527
- });
8528
- }
8529
-
8530
- /**
8531
- * Classic FAB Menu close
8532
- */
8533
-
8534
- }, {
8535
- key: "_animateOutFAB",
8536
- value: function _animateOutFAB() {
8537
- var _this50 = this;
8538
-
8539
- this.$floatingBtnsReverse.each(function (el) {
8540
- anim.remove(el);
8541
- anim({
8542
- targets: el,
8543
- opacity: 0,
8544
- scale: 0.4,
8545
- translateY: _this50.offsetY,
8546
- translateX: _this50.offsetX,
8547
- duration: 175,
8548
- easing: 'easeOutQuad',
8549
- complete: function () {
8550
- _this50.$el.removeClass('active');
8551
- }
8552
- });
8553
- });
8554
- }
8555
-
8556
- /**
8557
- * Toolbar transition Menu open
8558
- */
8559
-
8560
- }, {
8561
- key: "_animateInToolbar",
8562
- value: function _animateInToolbar() {
8563
- var _this51 = this;
8564
-
8565
- var scaleFactor = void 0;
8566
- var windowWidth = window.innerWidth;
8567
- var windowHeight = window.innerHeight;
8568
- var btnRect = this.el.getBoundingClientRect();
8569
- var backdrop = $('<div class="fab-backdrop"></div>');
8570
- var fabColor = this.$anchor.css('background-color');
8571
- this.$anchor.append(backdrop);
8572
-
8573
- this.offsetX = btnRect.left - windowWidth / 2 + btnRect.width / 2;
8574
- this.offsetY = windowHeight - btnRect.bottom;
8575
- scaleFactor = windowWidth / backdrop[0].clientWidth;
8576
- this.btnBottom = btnRect.bottom;
8577
- this.btnLeft = btnRect.left;
8578
- this.btnWidth = btnRect.width;
8579
-
8580
- // Set initial state
8581
- this.$el.addClass('active');
8582
- this.$el.css({
8583
- 'text-align': 'center',
8584
- width: '100%',
8585
- bottom: 0,
8586
- left: 0,
8587
- transform: 'translateX(' + this.offsetX + 'px)',
8588
- transition: 'none'
8589
- });
8590
- this.$anchor.css({
8591
- transform: 'translateY(' + -this.offsetY + 'px)',
8592
- transition: 'none'
8593
- });
8594
- backdrop.css({
8595
- 'background-color': fabColor
8596
- });
8597
-
8598
- setTimeout(function () {
8599
- _this51.$el.css({
8600
- transform: '',
8601
- transition: 'transform .2s cubic-bezier(0.550, 0.085, 0.680, 0.530), background-color 0s linear .2s'
8602
- });
8603
- _this51.$anchor.css({
8604
- overflow: 'visible',
8605
- transform: '',
8606
- transition: 'transform .2s'
8607
- });
8608
-
8609
- setTimeout(function () {
8610
- _this51.$el.css({
8611
- overflow: 'hidden',
8612
- 'background-color': fabColor
8613
- });
8614
- backdrop.css({
8615
- transform: 'scale(' + scaleFactor + ')',
8616
- transition: 'transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)'
8617
- });
8618
- _this51.$menu.children('li').children('a').css({
8619
- opacity: 1
8620
- });
8621
-
8622
- // Scroll to close.
8623
- _this51._handleDocumentClickBound = _this51._handleDocumentClick.bind(_this51);
8624
- window.addEventListener('scroll', _this51._handleCloseBound, true);
8625
- document.body.addEventListener('click', _this51._handleDocumentClickBound, true);
8626
- }, 100);
8627
- }, 0);
8628
- }
8629
-
8630
- /**
8631
- * Toolbar transition Menu close
8632
- */
8633
-
8634
- }, {
8635
- key: "_animateOutToolbar",
8636
- value: function _animateOutToolbar() {
8637
- var _this52 = this;
8638
-
8639
- var windowWidth = window.innerWidth;
8640
- var windowHeight = window.innerHeight;
8641
- var backdrop = this.$el.find('.fab-backdrop');
8642
- var fabColor = this.$anchor.css('background-color');
8643
-
8644
- this.offsetX = this.btnLeft - windowWidth / 2 + this.btnWidth / 2;
8645
- this.offsetY = windowHeight - this.btnBottom;
8646
-
8647
- // Hide backdrop
8648
- this.$el.removeClass('active');
8649
- this.$el.css({
8650
- 'background-color': 'transparent',
8651
- transition: 'none'
8652
- });
8653
- this.$anchor.css({
8654
- transition: 'none'
8655
- });
8656
- backdrop.css({
8657
- transform: 'scale(0)',
8658
- 'background-color': fabColor
8659
- });
8660
- this.$menu.children('li').children('a').css({
8661
- opacity: ''
8662
- });
8663
-
8664
- setTimeout(function () {
8665
- backdrop.remove();
8666
-
8667
- // Set initial state.
8668
- _this52.$el.css({
8669
- 'text-align': '',
8670
- width: '',
8671
- bottom: '',
8672
- left: '',
8673
- overflow: '',
8674
- 'background-color': '',
8675
- transform: 'translate3d(' + -_this52.offsetX + 'px,0,0)'
8676
- });
8677
- _this52.$anchor.css({
8678
- overflow: '',
8679
- transform: 'translate3d(0,' + _this52.offsetY + 'px,0)'
8680
- });
8681
-
8682
- setTimeout(function () {
8683
- _this52.$el.css({
8684
- transform: 'translate3d(0,0,0)',
8685
- transition: 'transform .2s'
8686
- });
8687
- _this52.$anchor.css({
8688
- transform: 'translate3d(0,0,0)',
8689
- transition: 'transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)'
8690
- });
8691
- }, 20);
8692
- }, 200);
8693
- }
8694
- }], [{
8695
- key: "init",
8696
- value: function init(els, options) {
8697
- return _get(FloatingActionButton.__proto__ || Object.getPrototypeOf(FloatingActionButton), "init", this).call(this, this, els, options);
8698
- }
8699
-
8700
- /**
8701
- * Get Instance
8702
- */
8703
-
8704
- }, {
8705
- key: "getInstance",
8706
- value: function getInstance(el) {
8707
- var domElem = !!el.jquery ? el[0] : el;
8708
- return domElem.M_FloatingActionButton;
8709
- }
8710
- }, {
8711
- key: "defaults",
8712
- get: function () {
8713
- return _defaults;
8714
- }
8715
- }]);
8716
-
8717
- return FloatingActionButton;
8718
- }(Component);
8719
-
8720
- M.FloatingActionButton = FloatingActionButton;
8721
-
8722
- if (M.jQueryLoaded) {
8723
- M.initializeJqueryWrapper(FloatingActionButton, 'floatingActionButton', 'M_FloatingActionButton');
8724
- }
8725
- })(cash, M.anime);
8726
- ;(function ($) {
8727
- 'use strict';
8728
-
8729
- var _defaults = {
8730
- // Close when date is selected
8731
- autoClose: false,
8732
-
8733
- // the default output format for the input field value
8734
- format: 'mmm dd, yyyy',
8735
-
8736
- // Used to create date object from current input string
8737
- parse: null,
8738
-
8739
- // The initial date to view when first opened
8740
- defaultDate: null,
8741
-
8742
- // Make the `defaultDate` the initial selected value
8743
- setDefaultDate: false,
8744
-
8745
- disableWeekends: false,
8746
-
8747
- disableDayFn: null,
8748
-
8749
- // First day of week (0: Sunday, 1: Monday etc)
8750
- firstDay: 0,
8751
-
8752
- // The earliest date that can be selected
8753
- minDate: null,
8754
- // Thelatest date that can be selected
8755
- maxDate: null,
8756
-
8757
- // Number of years either side, or array of upper/lower range
8758
- yearRange: 10,
8759
-
8760
- // used internally (don't config outside)
8761
- minYear: 0,
8762
- maxYear: 9999,
8763
- minMonth: undefined,
8764
- maxMonth: undefined,
8765
-
8766
- startRange: null,
8767
- endRange: null,
8768
-
8769
- isRTL: false,
8770
-
8771
- // Render the month after year in the calendar title
8772
- showMonthAfterYear: false,
8773
-
8774
- // Render days of the calendar grid that fall in the next or previous month
8775
- showDaysInNextAndPreviousMonths: false,
8776
-
8777
- // Specify a DOM element to render the calendar in
8778
- container: null,
8779
-
8780
- // Show clear button
8781
- showClearBtn: false,
8782
-
8783
- // internationalization
8784
- i18n: {
8785
- cancel: 'Cancel',
8786
- clear: 'Clear',
8787
- done: 'Ok',
8788
- previousMonth: '‹',
8789
- nextMonth: '›',
8790
- months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
8791
- monthsShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
8792
- weekdays: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
8793
- weekdaysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
8794
- weekdaysAbbrev: ['S', 'M', 'T', 'W', 'T', 'F', 'S']
8795
- },
8796
-
8797
- // events array
8798
- events: [],
8799
-
8800
- // callback function
8801
- onSelect: null,
8802
- onOpen: null,
8803
- onClose: null,
8804
- onDraw: null
8805
- };
8806
-
8807
- /**
8808
- * @class
8809
- *
8810
- */
8811
-
8812
- var Datepicker = function (_Component15) {
8813
- _inherits(Datepicker, _Component15);
8814
-
8815
- /**
8816
- * Construct Datepicker instance and set up overlay
8817
- * @constructor
8818
- * @param {Element} el
8819
- * @param {Object} options
8820
- */
8821
- function Datepicker(el, options) {
8822
- _classCallCheck(this, Datepicker);
8823
-
8824
- var _this53 = _possibleConstructorReturn(this, (Datepicker.__proto__ || Object.getPrototypeOf(Datepicker)).call(this, Datepicker, el, options));
8825
-
8826
- _this53.el.M_Datepicker = _this53;
8827
-
8828
- _this53.options = $.extend({}, Datepicker.defaults, options);
8829
-
8830
- // make sure i18n defaults are not lost when only few i18n option properties are passed
8831
- if (!!options && options.hasOwnProperty('i18n') && typeof options.i18n === 'object') {
8832
- _this53.options.i18n = $.extend({}, Datepicker.defaults.i18n, options.i18n);
8833
- }
8834
-
8835
- // Remove time component from minDate and maxDate options
8836
- if (_this53.options.minDate) _this53.options.minDate.setHours(0, 0, 0, 0);
8837
- if (_this53.options.maxDate) _this53.options.maxDate.setHours(0, 0, 0, 0);
8838
-
8839
- _this53.id = M.guid();
8840
-
8841
- _this53._setupVariables();
8842
- _this53._insertHTMLIntoDOM();
8843
- _this53._setupModal();
8844
-
8845
- _this53._setupEventHandlers();
8846
-
8847
- if (!_this53.options.defaultDate) {
8848
- _this53.options.defaultDate = new Date(Date.parse(_this53.el.value));
8849
- }
8850
-
8851
- var defDate = _this53.options.defaultDate;
8852
- if (Datepicker._isDate(defDate)) {
8853
- if (_this53.options.setDefaultDate) {
8854
- _this53.setDate(defDate, true);
8855
- _this53.setInputValue();
8856
- } else {
8857
- _this53.gotoDate(defDate);
8858
- }
8859
- } else {
8860
- _this53.gotoDate(new Date());
8861
- }
8862
-
8863
- /**
8864
- * Describes open/close state of datepicker
8865
- * @type {Boolean}
8866
- */
8867
- _this53.isOpen = false;
8868
- return _this53;
8869
- }
8870
-
8871
- _createClass(Datepicker, [{
8872
- key: "destroy",
8873
-
8874
-
8875
- /**
8876
- * Teardown component
8877
- */
8878
- value: function destroy() {
8879
- this._removeEventHandlers();
8880
- this.modal.destroy();
8881
- $(this.modalEl).remove();
8882
- this.destroySelects();
8883
- this.el.M_Datepicker = undefined;
8884
- }
8885
- }, {
8886
- key: "destroySelects",
8887
- value: function destroySelects() {
8888
- var oldYearSelect = this.calendarEl.querySelector('.orig-select-year');
8889
- if (oldYearSelect) {
8890
- M.FormSelect.getInstance(oldYearSelect).destroy();
8891
- }
8892
- var oldMonthSelect = this.calendarEl.querySelector('.orig-select-month');
8893
- if (oldMonthSelect) {
8894
- M.FormSelect.getInstance(oldMonthSelect).destroy();
8895
- }
8896
- }
8897
- }, {
8898
- key: "_insertHTMLIntoDOM",
8899
- value: function _insertHTMLIntoDOM() {
8900
- if (this.options.showClearBtn) {
8901
- $(this.clearBtn).css({ visibility: '' });
8902
- this.clearBtn.innerHTML = this.options.i18n.clear;
8903
- }
8904
-
8905
- this.doneBtn.innerHTML = this.options.i18n.done;
8906
- this.cancelBtn.innerHTML = this.options.i18n.cancel;
8907
-
8908
- if (this.options.container) {
8909
- this.$modalEl.appendTo(this.options.container);
8910
- } else {
8911
- this.$modalEl.insertBefore(this.el);
8912
- }
8913
- }
8914
- }, {
8915
- key: "_setupModal",
8916
- value: function _setupModal() {
8917
- var _this54 = this;
8918
-
8919
- this.modalEl.id = 'modal-' + this.id;
8920
- this.modal = M.Modal.init(this.modalEl, {
8921
- onCloseEnd: function () {
8922
- _this54.isOpen = false;
8923
- }
8924
- });
8925
- }
8926
- }, {
8927
- key: "toString",
8928
- value: function toString(format) {
8929
- var _this55 = this;
8930
-
8931
- format = format || this.options.format;
8932
- if (!Datepicker._isDate(this.date)) {
8933
- return '';
8934
- }
8935
-
8936
- var formatArray = format.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g);
8937
- var formattedDate = formatArray.map(function (label) {
8938
- if (_this55.formats[label]) {
8939
- return _this55.formats[label]();
8940
- }
8941
-
8942
- return label;
8943
- }).join('');
8944
- return formattedDate;
8945
- }
8946
- }, {
8947
- key: "setDate",
8948
- value: function setDate(date, preventOnSelect) {
8949
- if (!date) {
8950
- this.date = null;
8951
- this._renderDateDisplay();
8952
- return this.draw();
8953
- }
8954
- if (typeof date === 'string') {
8955
- date = new Date(Date.parse(date));
8956
- }
8957
- if (!Datepicker._isDate(date)) {
8958
- return;
8959
- }
8960
-
8961
- var min = this.options.minDate,
8962
- max = this.options.maxDate;
8963
-
8964
- if (Datepicker._isDate(min) && date < min) {
8965
- date = min;
8966
- } else if (Datepicker._isDate(max) && date > max) {
8967
- date = max;
8968
- }
8969
-
8970
- this.date = new Date(date.getTime());
8971
-
8972
- this._renderDateDisplay();
8973
-
8974
- Datepicker._setToStartOfDay(this.date);
8975
- this.gotoDate(this.date);
8976
-
8977
- if (!preventOnSelect && typeof this.options.onSelect === 'function') {
8978
- this.options.onSelect.call(this, this.date);
8979
- }
8980
- }
8981
- }, {
8982
- key: "setInputValue",
8983
- value: function setInputValue() {
8984
- this.el.value = this.toString();
8985
- this.$el.trigger('change', { firedBy: this });
8986
- }
8987
- }, {
8988
- key: "_renderDateDisplay",
8989
- value: function _renderDateDisplay() {
8990
- var displayDate = Datepicker._isDate(this.date) ? this.date : new Date();
8991
- var i18n = this.options.i18n;
8992
- var day = i18n.weekdaysShort[displayDate.getDay()];
8993
- var month = i18n.monthsShort[displayDate.getMonth()];
8994
- var date = displayDate.getDate();
8995
- this.yearTextEl.innerHTML = displayDate.getFullYear();
8996
- this.dateTextEl.innerHTML = day + ", " + month + " " + date;
8997
- }
8998
-
8999
- /**
9000
- * change view to a specific date
9001
- */
9002
-
9003
- }, {
9004
- key: "gotoDate",
9005
- value: function gotoDate(date) {
9006
- var newCalendar = true;
9007
-
9008
- if (!Datepicker._isDate(date)) {
9009
- return;
9010
- }
9011
-
9012
- if (this.calendars) {
9013
- var firstVisibleDate = new Date(this.calendars[0].year, this.calendars[0].month, 1),
9014
- lastVisibleDate = new Date(this.calendars[this.calendars.length - 1].year, this.calendars[this.calendars.length - 1].month, 1),
9015
- visibleDate = date.getTime();
9016
- // get the end of the month
9017
- lastVisibleDate.setMonth(lastVisibleDate.getMonth() + 1);
9018
- lastVisibleDate.setDate(lastVisibleDate.getDate() - 1);
9019
- newCalendar = visibleDate < firstVisibleDate.getTime() || lastVisibleDate.getTime() < visibleDate;
9020
- }
9021
-
9022
- if (newCalendar) {
9023
- this.calendars = [{
9024
- month: date.getMonth(),
9025
- year: date.getFullYear()
9026
- }];
9027
- }
9028
-
9029
- this.adjustCalendars();
9030
- }
9031
- }, {
9032
- key: "adjustCalendars",
9033
- value: function adjustCalendars() {
9034
- this.calendars[0] = this.adjustCalendar(this.calendars[0]);
9035
- this.draw();
9036
- }
9037
- }, {
9038
- key: "adjustCalendar",
9039
- value: function adjustCalendar(calendar) {
9040
- if (calendar.month < 0) {
9041
- calendar.year -= Math.ceil(Math.abs(calendar.month) / 12);
9042
- calendar.month += 12;
9043
- }
9044
- if (calendar.month > 11) {
9045
- calendar.year += Math.floor(Math.abs(calendar.month) / 12);
9046
- calendar.month -= 12;
9047
- }
9048
- return calendar;
9049
- }
9050
- }, {
9051
- key: "nextMonth",
9052
- value: function nextMonth() {
9053
- this.calendars[0].month++;
9054
- this.adjustCalendars();
9055
- }
9056
- }, {
9057
- key: "prevMonth",
9058
- value: function prevMonth() {
9059
- this.calendars[0].month--;
9060
- this.adjustCalendars();
9061
- }
9062
- }, {
9063
- key: "render",
9064
- value: function render(year, month, randId) {
9065
- var opts = this.options,
9066
- now = new Date(),
9067
- days = Datepicker._getDaysInMonth(year, month),
9068
- before = new Date(year, month, 1).getDay(),
9069
- data = [],
9070
- row = [];
9071
- Datepicker._setToStartOfDay(now);
9072
- if (opts.firstDay > 0) {
9073
- before -= opts.firstDay;
9074
- if (before < 0) {
9075
- before += 7;
9076
- }
9077
- }
9078
- var previousMonth = month === 0 ? 11 : month - 1,
9079
- nextMonth = month === 11 ? 0 : month + 1,
9080
- yearOfPreviousMonth = month === 0 ? year - 1 : year,
9081
- yearOfNextMonth = month === 11 ? year + 1 : year,
9082
- daysInPreviousMonth = Datepicker._getDaysInMonth(yearOfPreviousMonth, previousMonth);
9083
- var cells = days + before,
9084
- after = cells;
9085
- while (after > 7) {
9086
- after -= 7;
9087
- }
9088
- cells += 7 - after;
9089
- var isWeekSelected = false;
9090
- for (var i = 0, r = 0; i < cells; i++) {
9091
- var day = new Date(year, month, 1 + (i - before)),
9092
- isSelected = Datepicker._isDate(this.date) ? Datepicker._compareDates(day, this.date) : false,
9093
- isToday = Datepicker._compareDates(day, now),
9094
- hasEvent = opts.events.indexOf(day.toDateString()) !== -1 ? true : false,
9095
- isEmpty = i < before || i >= days + before,
9096
- dayNumber = 1 + (i - before),
9097
- monthNumber = month,
9098
- yearNumber = year,
9099
- isStartRange = opts.startRange && Datepicker._compareDates(opts.startRange, day),
9100
- isEndRange = opts.endRange && Datepicker._compareDates(opts.endRange, day),
9101
- isInRange = opts.startRange && opts.endRange && opts.startRange < day && day < opts.endRange,
9102
- isDisabled = opts.minDate && day < opts.minDate || opts.maxDate && day > opts.maxDate || opts.disableWeekends && Datepicker._isWeekend(day) || opts.disableDayFn && opts.disableDayFn(day);
9103
-
9104
- if (isEmpty) {
9105
- if (i < before) {
9106
- dayNumber = daysInPreviousMonth + dayNumber;
9107
- monthNumber = previousMonth;
9108
- yearNumber = yearOfPreviousMonth;
9109
- } else {
9110
- dayNumber = dayNumber - days;
9111
- monthNumber = nextMonth;
9112
- yearNumber = yearOfNextMonth;
9113
- }
9114
- }
9115
-
9116
- var dayConfig = {
9117
- day: dayNumber,
9118
- month: monthNumber,
9119
- year: yearNumber,
9120
- hasEvent: hasEvent,
9121
- isSelected: isSelected,
9122
- isToday: isToday,
9123
- isDisabled: isDisabled,
9124
- isEmpty: isEmpty,
9125
- isStartRange: isStartRange,
9126
- isEndRange: isEndRange,
9127
- isInRange: isInRange,
9128
- showDaysInNextAndPreviousMonths: opts.showDaysInNextAndPreviousMonths
9129
- };
9130
-
9131
- row.push(this.renderDay(dayConfig));
9132
-
9133
- if (++r === 7) {
9134
- data.push(this.renderRow(row, opts.isRTL, isWeekSelected));
9135
- row = [];
9136
- r = 0;
9137
- isWeekSelected = false;
9138
- }
9139
- }
9140
- return this.renderTable(opts, data, randId);
9141
- }
9142
- }, {
9143
- key: "renderDay",
9144
- value: function renderDay(opts) {
9145
- var arr = [];
9146
- var ariaSelected = 'false';
9147
- if (opts.isEmpty) {
9148
- if (opts.showDaysInNextAndPreviousMonths) {
9149
- arr.push('is-outside-current-month');
9150
- arr.push('is-selection-disabled');
9151
- } else {
9152
- return '<td class="is-empty"></td>';
9153
- }
9154
- }
9155
- if (opts.isDisabled) {
9156
- arr.push('is-disabled');
9157
- }
9158
-
9159
- if (opts.isToday) {
9160
- arr.push('is-today');
9161
- }
9162
- if (opts.isSelected) {
9163
- arr.push('is-selected');
9164
- ariaSelected = 'true';
9165
- }
9166
- if (opts.hasEvent) {
9167
- arr.push('has-event');
9168
- }
9169
- if (opts.isInRange) {
9170
- arr.push('is-inrange');
9171
- }
9172
- if (opts.isStartRange) {
9173
- arr.push('is-startrange');
9174
- }
9175
- if (opts.isEndRange) {
9176
- arr.push('is-endrange');
9177
- }
9178
- return "<td data-day=\"" + opts.day + "\" class=\"" + arr.join(' ') + "\" aria-selected=\"" + ariaSelected + "\">" + ("<button class=\"datepicker-day-button\" type=\"button\" data-year=\"" + opts.year + "\" data-month=\"" + opts.month + "\" data-day=\"" + opts.day + "\">" + opts.day + "</button>") + '</td>';
9179
- }
9180
- }, {
9181
- key: "renderRow",
9182
- value: function renderRow(days, isRTL, isRowSelected) {
9183
- return '<tr class="datepicker-row' + (isRowSelected ? ' is-selected' : '') + '">' + (isRTL ? days.reverse() : days).join('') + '</tr>';
9184
- }
9185
- }, {
9186
- key: "renderTable",
9187
- value: function renderTable(opts, data, randId) {
9188
- return '<div class="datepicker-table-wrapper"><table cellpadding="0" cellspacing="0" class="datepicker-table" role="grid" aria-labelledby="' + randId + '">' + this.renderHead(opts) + this.renderBody(data) + '</table></div>';
9189
- }
9190
- }, {
9191
- key: "renderHead",
9192
- value: function renderHead(opts) {
9193
- var i = void 0,
9194
- arr = [];
9195
- for (i = 0; i < 7; i++) {
9196
- arr.push("<th scope=\"col\"><abbr title=\"" + this.renderDayName(opts, i) + "\">" + this.renderDayName(opts, i, true) + "</abbr></th>");
9197
- }
9198
- return '<thead><tr>' + (opts.isRTL ? arr.reverse() : arr).join('') + '</tr></thead>';
9199
- }
9200
- }, {
9201
- key: "renderBody",
9202
- value: function renderBody(rows) {
9203
- return '<tbody>' + rows.join('') + '</tbody>';
9204
- }
9205
- }, {
9206
- key: "renderTitle",
9207
- value: function renderTitle(instance, c, year, month, refYear, randId) {
9208
- var i = void 0,
9209
- j = void 0,
9210
- arr = void 0,
9211
- opts = this.options,
9212
- isMinYear = year === opts.minYear,
9213
- isMaxYear = year === opts.maxYear,
9214
- html = '<div id="' + randId + '" class="datepicker-controls" role="heading" aria-live="assertive">',
9215
- monthHtml = void 0,
9216
- yearHtml = void 0,
9217
- prev = true,
9218
- next = true;
9219
-
9220
- for (arr = [], i = 0; i < 12; i++) {
9221
- arr.push('<option value="' + (year === refYear ? i - c : 12 + i - c) + '"' + (i === month ? ' selected="selected"' : '') + (isMinYear && i < opts.minMonth || isMaxYear && i > opts.maxMonth ? 'disabled="disabled"' : '') + '>' + opts.i18n.months[i] + '</option>');
9222
- }
9223
-
9224
- monthHtml = '<select class="datepicker-select orig-select-month" tabindex="-1">' + arr.join('') + '</select>';
9225
-
9226
- if ($.isArray(opts.yearRange)) {
9227
- i = opts.yearRange[0];
9228
- j = opts.yearRange[1] + 1;
9229
- } else {
9230
- i = year - opts.yearRange;
9231
- j = 1 + year + opts.yearRange;
9232
- }
9233
-
9234
- for (arr = []; i < j && i <= opts.maxYear; i++) {
9235
- if (i >= opts.minYear) {
9236
- arr.push("<option value=\"" + i + "\" " + (i === year ? 'selected="selected"' : '') + ">" + i + "</option>");
9237
- }
9238
- }
9239
-
9240
- yearHtml = "<select class=\"datepicker-select orig-select-year\" tabindex=\"-1\">" + arr.join('') + "</select>";
9241
-
9242
- var leftArrow = '<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"/><path d="M0-.5h24v24H0z" fill="none"/></svg>';
9243
- html += "<button class=\"month-prev" + (prev ? '' : ' is-disabled') + "\" type=\"button\">" + leftArrow + "</button>";
9244
-
9245
- html += '<div class="selects-container">';
9246
- if (opts.showMonthAfterYear) {
9247
- html += yearHtml + monthHtml;
9248
- } else {
9249
- html += monthHtml + yearHtml;
9250
- }
9251
- html += '</div>';
9252
-
9253
- if (isMinYear && (month === 0 || opts.minMonth >= month)) {
9254
- prev = false;
9255
- }
9256
-
9257
- if (isMaxYear && (month === 11 || opts.maxMonth <= month)) {
9258
- next = false;
9259
- }
9260
-
9261
- var rightArrow = '<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"/><path d="M0-.25h24v24H0z" fill="none"/></svg>';
9262
- html += "<button class=\"month-next" + (next ? '' : ' is-disabled') + "\" type=\"button\">" + rightArrow + "</button>";
9263
-
9264
- return html += '</div>';
9265
- }
9266
-
9267
- /**
9268
- * refresh the HTML
9269
- */
9270
-
9271
- }, {
9272
- key: "draw",
9273
- value: function draw(force) {
9274
- if (!this.isOpen && !force) {
9275
- return;
9276
- }
9277
- var opts = this.options,
9278
- minYear = opts.minYear,
9279
- maxYear = opts.maxYear,
9280
- minMonth = opts.minMonth,
9281
- maxMonth = opts.maxMonth,
9282
- html = '',
9283
- randId = void 0;
9284
-
9285
- if (this._y <= minYear) {
9286
- this._y = minYear;
9287
- if (!isNaN(minMonth) && this._m < minMonth) {
9288
- this._m = minMonth;
9289
- }
9290
- }
9291
- if (this._y >= maxYear) {
9292
- this._y = maxYear;
9293
- if (!isNaN(maxMonth) && this._m > maxMonth) {
9294
- this._m = maxMonth;
9295
- }
9296
- }
9297
-
9298
- randId = 'datepicker-title-' + Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 2);
9299
-
9300
- for (var c = 0; c < 1; c++) {
9301
- this._renderDateDisplay();
9302
- html += this.renderTitle(this, c, this.calendars[c].year, this.calendars[c].month, this.calendars[0].year, randId) + this.render(this.calendars[c].year, this.calendars[c].month, randId);
9303
- }
9304
-
9305
- this.destroySelects();
9306
-
9307
- this.calendarEl.innerHTML = html;
9308
-
9309
- // Init Materialize Select
9310
- var yearSelect = this.calendarEl.querySelector('.orig-select-year');
9311
- var monthSelect = this.calendarEl.querySelector('.orig-select-month');
9312
- M.FormSelect.init(yearSelect, {
9313
- classes: 'select-year',
9314
- dropdownOptions: { container: document.body, constrainWidth: false }
9315
- });
9316
- M.FormSelect.init(monthSelect, {
9317
- classes: 'select-month',
9318
- dropdownOptions: { container: document.body, constrainWidth: false }
9319
- });
9320
-
9321
- // Add change handlers for select
9322
- yearSelect.addEventListener('change', this._handleYearChange.bind(this));
9323
- monthSelect.addEventListener('change', this._handleMonthChange.bind(this));
9324
-
9325
- if (typeof this.options.onDraw === 'function') {
9326
- this.options.onDraw(this);
9327
- }
9328
- }
9329
-
9330
- /**
9331
- * Setup Event Handlers
9332
- */
9333
-
9334
- }, {
9335
- key: "_setupEventHandlers",
9336
- value: function _setupEventHandlers() {
9337
- this._handleInputKeydownBound = this._handleInputKeydown.bind(this);
9338
- this._handleInputClickBound = this._handleInputClick.bind(this);
9339
- this._handleInputChangeBound = this._handleInputChange.bind(this);
9340
- this._handleCalendarClickBound = this._handleCalendarClick.bind(this);
9341
- this._finishSelectionBound = this._finishSelection.bind(this);
9342
- this._handleMonthChange = this._handleMonthChange.bind(this);
9343
- this._closeBound = this.close.bind(this);
9344
-
9345
- this.el.addEventListener('click', this._handleInputClickBound);
9346
- this.el.addEventListener('keydown', this._handleInputKeydownBound);
9347
- this.el.addEventListener('change', this._handleInputChangeBound);
9348
- this.calendarEl.addEventListener('click', this._handleCalendarClickBound);
9349
- this.doneBtn.addEventListener('click', this._finishSelectionBound);
9350
- this.cancelBtn.addEventListener('click', this._closeBound);
9351
-
9352
- if (this.options.showClearBtn) {
9353
- this._handleClearClickBound = this._handleClearClick.bind(this);
9354
- this.clearBtn.addEventListener('click', this._handleClearClickBound);
9355
- }
9356
- }
9357
- }, {
9358
- key: "_setupVariables",
9359
- value: function _setupVariables() {
9360
- var _this56 = this;
9361
-
9362
- this.$modalEl = $(Datepicker._template);
9363
- this.modalEl = this.$modalEl[0];
9364
-
9365
- this.calendarEl = this.modalEl.querySelector('.datepicker-calendar');
9366
-
9367
- this.yearTextEl = this.modalEl.querySelector('.year-text');
9368
- this.dateTextEl = this.modalEl.querySelector('.date-text');
9369
- if (this.options.showClearBtn) {
9370
- this.clearBtn = this.modalEl.querySelector('.datepicker-clear');
9371
- }
9372
- this.doneBtn = this.modalEl.querySelector('.datepicker-done');
9373
- this.cancelBtn = this.modalEl.querySelector('.datepicker-cancel');
9374
-
9375
- this.formats = {
9376
- d: function () {
9377
- return _this56.date.getDate();
9378
- },
9379
- dd: function () {
9380
- var d = _this56.date.getDate();
9381
- return (d < 10 ? '0' : '') + d;
9382
- },
9383
- ddd: function () {
9384
- return _this56.options.i18n.weekdaysShort[_this56.date.getDay()];
9385
- },
9386
- dddd: function () {
9387
- return _this56.options.i18n.weekdays[_this56.date.getDay()];
9388
- },
9389
- m: function () {
9390
- return _this56.date.getMonth() + 1;
9391
- },
9392
- mm: function () {
9393
- var m = _this56.date.getMonth() + 1;
9394
- return (m < 10 ? '0' : '') + m;
9395
- },
9396
- mmm: function () {
9397
- return _this56.options.i18n.monthsShort[_this56.date.getMonth()];
9398
- },
9399
- mmmm: function () {
9400
- return _this56.options.i18n.months[_this56.date.getMonth()];
9401
- },
9402
- yy: function () {
9403
- return ('' + _this56.date.getFullYear()).slice(2);
9404
- },
9405
- yyyy: function () {
9406
- return _this56.date.getFullYear();
9407
- }
9408
- };
9409
- }
9410
-
9411
- /**
9412
- * Remove Event Handlers
9413
- */
9414
-
9415
- }, {
9416
- key: "_removeEventHandlers",
9417
- value: function _removeEventHandlers() {
9418
- this.el.removeEventListener('click', this._handleInputClickBound);
9419
- this.el.removeEventListener('keydown', this._handleInputKeydownBound);
9420
- this.el.removeEventListener('change', this._handleInputChangeBound);
9421
- this.calendarEl.removeEventListener('click', this._handleCalendarClickBound);
9422
- }
9423
- }, {
9424
- key: "_handleInputClick",
9425
- value: function _handleInputClick() {
9426
- this.open();
9427
- }
9428
- }, {
9429
- key: "_handleInputKeydown",
9430
- value: function _handleInputKeydown(e) {
9431
- if (e.which === M.keys.ENTER) {
9432
- e.preventDefault();
9433
- this.open();
9434
- }
9435
- }
9436
- }, {
9437
- key: "_handleCalendarClick",
9438
- value: function _handleCalendarClick(e) {
9439
- if (!this.isOpen) {
9440
- return;
9441
- }
9442
-
9443
- var $target = $(e.target);
9444
- if (!$target.hasClass('is-disabled')) {
9445
- if ($target.hasClass('datepicker-day-button') && !$target.hasClass('is-empty') && !$target.parent().hasClass('is-disabled')) {
9446
- this.setDate(new Date(e.target.getAttribute('data-year'), e.target.getAttribute('data-month'), e.target.getAttribute('data-day')));
9447
- if (this.options.autoClose) {
9448
- this._finishSelection();
9449
- }
9450
- } else if ($target.closest('.month-prev').length) {
9451
- this.prevMonth();
9452
- } else if ($target.closest('.month-next').length) {
9453
- this.nextMonth();
9454
- }
9455
- }
9456
- }
9457
- }, {
9458
- key: "_handleClearClick",
9459
- value: function _handleClearClick() {
9460
- this.date = null;
9461
- this.setInputValue();
9462
- this.close();
9463
- }
9464
- }, {
9465
- key: "_handleMonthChange",
9466
- value: function _handleMonthChange(e) {
9467
- this.gotoMonth(e.target.value);
9468
- }
9469
- }, {
9470
- key: "_handleYearChange",
9471
- value: function _handleYearChange(e) {
9472
- this.gotoYear(e.target.value);
9473
- }
9474
-
9475
- /**
9476
- * change view to a specific month (zero-index, e.g. 0: January)
9477
- */
9478
-
9479
- }, {
9480
- key: "gotoMonth",
9481
- value: function gotoMonth(month) {
9482
- if (!isNaN(month)) {
9483
- this.calendars[0].month = parseInt(month, 10);
9484
- this.adjustCalendars();
9485
- }
9486
- }
9487
-
9488
- /**
9489
- * change view to a specific full year (e.g. "2012")
9490
- */
9491
-
9492
- }, {
9493
- key: "gotoYear",
9494
- value: function gotoYear(year) {
9495
- if (!isNaN(year)) {
9496
- this.calendars[0].year = parseInt(year, 10);
9497
- this.adjustCalendars();
9498
- }
9499
- }
9500
- }, {
9501
- key: "_handleInputChange",
9502
- value: function _handleInputChange(e) {
9503
- var date = void 0;
9504
-
9505
- // Prevent change event from being fired when triggered by the plugin
9506
- if (e.firedBy === this) {
9507
- return;
9508
- }
9509
- if (this.options.parse) {
9510
- date = this.options.parse(this.el.value, this.options.format);
9511
- } else {
9512
- date = new Date(Date.parse(this.el.value));
9513
- }
9514
-
9515
- if (Datepicker._isDate(date)) {
9516
- this.setDate(date);
9517
- }
9518
- }
9519
- }, {
9520
- key: "renderDayName",
9521
- value: function renderDayName(opts, day, abbr) {
9522
- day += opts.firstDay;
9523
- while (day >= 7) {
9524
- day -= 7;
9525
- }
9526
- return abbr ? opts.i18n.weekdaysAbbrev[day] : opts.i18n.weekdays[day];
9527
- }
9528
-
9529
- /**
9530
- * Set input value to the selected date and close Datepicker
9531
- */
9532
-
9533
- }, {
9534
- key: "_finishSelection",
9535
- value: function _finishSelection() {
9536
- this.setInputValue();
9537
- this.close();
9538
- }
9539
-
9540
- /**
9541
- * Open Datepicker
9542
- */
9543
-
9544
- }, {
9545
- key: "open",
9546
- value: function open() {
9547
- if (this.isOpen) {
9548
- return;
9549
- }
9550
-
9551
- this.isOpen = true;
9552
- if (typeof this.options.onOpen === 'function') {
9553
- this.options.onOpen.call(this);
9554
- }
9555
- this.draw();
9556
- this.modal.open();
9557
- return this;
9558
- }
9559
-
9560
- /**
9561
- * Close Datepicker
9562
- */
9563
-
9564
- }, {
9565
- key: "close",
9566
- value: function close() {
9567
- if (!this.isOpen) {
9568
- return;
9569
- }
9570
-
9571
- this.isOpen = false;
9572
- if (typeof this.options.onClose === 'function') {
9573
- this.options.onClose.call(this);
9574
- }
9575
- this.modal.close();
9576
- return this;
9577
- }
9578
- }], [{
9579
- key: "init",
9580
- value: function init(els, options) {
9581
- return _get(Datepicker.__proto__ || Object.getPrototypeOf(Datepicker), "init", this).call(this, this, els, options);
9582
- }
9583
- }, {
9584
- key: "_isDate",
9585
- value: function _isDate(obj) {
9586
- return (/Date/.test(Object.prototype.toString.call(obj)) && !isNaN(obj.getTime())
9587
- );
9588
- }
9589
- }, {
9590
- key: "_isWeekend",
9591
- value: function _isWeekend(date) {
9592
- var day = date.getDay();
9593
- return day === 0 || day === 6;
9594
- }
9595
- }, {
9596
- key: "_setToStartOfDay",
9597
- value: function _setToStartOfDay(date) {
9598
- if (Datepicker._isDate(date)) date.setHours(0, 0, 0, 0);
9599
- }
9600
- }, {
9601
- key: "_getDaysInMonth",
9602
- value: function _getDaysInMonth(year, month) {
9603
- return [31, Datepicker._isLeapYear(year) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month];
9604
- }
9605
- }, {
9606
- key: "_isLeapYear",
9607
- value: function _isLeapYear(year) {
9608
- // solution by Matti Virkkunen: http://stackoverflow.com/a/4881951
9609
- return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;
9610
- }
9611
- }, {
9612
- key: "_compareDates",
9613
- value: function _compareDates(a, b) {
9614
- // weak date comparison (use setToStartOfDay(date) to ensure correct result)
9615
- return a.getTime() === b.getTime();
9616
- }
9617
- }, {
9618
- key: "_setToStartOfDay",
9619
- value: function _setToStartOfDay(date) {
9620
- if (Datepicker._isDate(date)) date.setHours(0, 0, 0, 0);
9621
- }
9622
-
9623
- /**
9624
- * Get Instance
9625
- */
9626
-
9627
- }, {
9628
- key: "getInstance",
9629
- value: function getInstance(el) {
9630
- var domElem = !!el.jquery ? el[0] : el;
9631
- return domElem.M_Datepicker;
9632
- }
9633
- }, {
9634
- key: "defaults",
9635
- get: function () {
9636
- return _defaults;
9637
- }
9638
- }]);
9639
-
9640
- return Datepicker;
9641
- }(Component);
9642
-
9643
- Datepicker._template = ['<div class= "modal datepicker-modal">', '<div class="modal-content datepicker-container">', '<div class="datepicker-date-display">', '<span class="year-text"></span>', '<span class="date-text"></span>', '</div>', '<div class="datepicker-calendar-container">', '<div class="datepicker-calendar"></div>', '<div class="datepicker-footer">', '<button class="btn-flat datepicker-clear waves-effect" style="visibility: hidden;" type="button"></button>', '<div class="confirmation-btns">', '<button class="btn-flat datepicker-cancel waves-effect" type="button"></button>', '<button class="btn-flat datepicker-done waves-effect" type="button"></button>', '</div>', '</div>', '</div>', '</div>', '</div>'].join('');
9644
-
9645
- M.Datepicker = Datepicker;
9646
-
9647
- if (M.jQueryLoaded) {
9648
- M.initializeJqueryWrapper(Datepicker, 'datepicker', 'M_Datepicker');
9649
- }
9650
- })(cash);
9651
- ;(function ($) {
9652
- 'use strict';
9653
-
9654
- var _defaults = {
9655
- dialRadius: 135,
9656
- outerRadius: 105,
9657
- innerRadius: 70,
9658
- tickRadius: 20,
9659
- duration: 350,
9660
- container: null,
9661
- defaultTime: 'now', // default time, 'now' or '13:14' e.g.
9662
- fromNow: 0, // Millisecond offset from the defaultTime
9663
- showClearBtn: false,
9664
-
9665
- // internationalization
9666
- i18n: {
9667
- cancel: 'Cancel',
9668
- clear: 'Clear',
9669
- done: 'Ok'
9670
- },
9671
-
9672
- autoClose: false, // auto close when minute is selected
9673
- twelveHour: true, // change to 12 hour AM/PM clock from 24 hour
9674
- vibrate: true, // vibrate the device when dragging clock hand
9675
-
9676
- // Callbacks
9677
- onOpenStart: null,
9678
- onOpenEnd: null,
9679
- onCloseStart: null,
9680
- onCloseEnd: null,
9681
- onSelect: null
9682
- };
9683
-
9684
- /**
9685
- * @class
9686
- *
9687
- */
9688
-
9689
- var Timepicker = function (_Component16) {
9690
- _inherits(Timepicker, _Component16);
9691
-
9692
- function Timepicker(el, options) {
9693
- _classCallCheck(this, Timepicker);
9694
-
9695
- var _this57 = _possibleConstructorReturn(this, (Timepicker.__proto__ || Object.getPrototypeOf(Timepicker)).call(this, Timepicker, el, options));
9696
-
9697
- _this57.el.M_Timepicker = _this57;
9698
-
9699
- _this57.options = $.extend({}, Timepicker.defaults, options);
9700
-
9701
- _this57.id = M.guid();
9702
- _this57._insertHTMLIntoDOM();
9703
- _this57._setupModal();
9704
- _this57._setupVariables();
9705
- _this57._setupEventHandlers();
9706
-
9707
- _this57._clockSetup();
9708
- _this57._pickerSetup();
9709
- return _this57;
9710
- }
9711
-
9712
- _createClass(Timepicker, [{
9713
- key: "destroy",
9714
-
9715
-
9716
- /**
9717
- * Teardown component
9718
- */
9719
- value: function destroy() {
9720
- this._removeEventHandlers();
9721
- this.modal.destroy();
9722
- $(this.modalEl).remove();
9723
- this.el.M_Timepicker = undefined;
9724
- }
9725
-
9726
- /**
9727
- * Setup Event Handlers
9728
- */
9729
-
9730
- }, {
9731
- key: "_setupEventHandlers",
9732
- value: function _setupEventHandlers() {
9733
- this._handleInputKeydownBound = this._handleInputKeydown.bind(this);
9734
- this._handleInputClickBound = this._handleInputClick.bind(this);
9735
- this._handleClockClickStartBound = this._handleClockClickStart.bind(this);
9736
- this._handleDocumentClickMoveBound = this._handleDocumentClickMove.bind(this);
9737
- this._handleDocumentClickEndBound = this._handleDocumentClickEnd.bind(this);
9738
-
9739
- this.el.addEventListener('click', this._handleInputClickBound);
9740
- this.el.addEventListener('keydown', this._handleInputKeydownBound);
9741
- this.plate.addEventListener('mousedown', this._handleClockClickStartBound);
9742
- this.plate.addEventListener('touchstart', this._handleClockClickStartBound);
9743
-
9744
- $(this.spanHours).on('click', this.showView.bind(this, 'hours'));
9745
- $(this.spanMinutes).on('click', this.showView.bind(this, 'minutes'));
9746
- }
9747
- }, {
9748
- key: "_removeEventHandlers",
9749
- value: function _removeEventHandlers() {
9750
- this.el.removeEventListener('click', this._handleInputClickBound);
9751
- this.el.removeEventListener('keydown', this._handleInputKeydownBound);
9752
- }
9753
- }, {
9754
- key: "_handleInputClick",
9755
- value: function _handleInputClick() {
9756
- this.open();
9757
- }
9758
- }, {
9759
- key: "_handleInputKeydown",
9760
- value: function _handleInputKeydown(e) {
9761
- if (e.which === M.keys.ENTER) {
9762
- e.preventDefault();
9763
- this.open();
9764
- }
9765
- }
9766
- }, {
9767
- key: "_handleClockClickStart",
9768
- value: function _handleClockClickStart(e) {
9769
- e.preventDefault();
9770
- var clockPlateBR = this.plate.getBoundingClientRect();
9771
- var offset = { x: clockPlateBR.left, y: clockPlateBR.top };
9772
-
9773
- this.x0 = offset.x + this.options.dialRadius;
9774
- this.y0 = offset.y + this.options.dialRadius;
9775
- this.moved = false;
9776
- var clickPos = Timepicker._Pos(e);
9777
- this.dx = clickPos.x - this.x0;
9778
- this.dy = clickPos.y - this.y0;
9779
-
9780
- // Set clock hands
9781
- this.setHand(this.dx, this.dy, false);
9782
-
9783
- // Mousemove on document
9784
- document.addEventListener('mousemove', this._handleDocumentClickMoveBound);
9785
- document.addEventListener('touchmove', this._handleDocumentClickMoveBound);
9786
-
9787
- // Mouseup on document
9788
- document.addEventListener('mouseup', this._handleDocumentClickEndBound);
9789
- document.addEventListener('touchend', this._handleDocumentClickEndBound);
9790
- }
9791
- }, {
9792
- key: "_handleDocumentClickMove",
9793
- value: function _handleDocumentClickMove(e) {
9794
- e.preventDefault();
9795
- var clickPos = Timepicker._Pos(e);
9796
- var x = clickPos.x - this.x0;
9797
- var y = clickPos.y - this.y0;
9798
- this.moved = true;
9799
- this.setHand(x, y, false, true);
9800
- }
9801
- }, {
9802
- key: "_handleDocumentClickEnd",
9803
- value: function _handleDocumentClickEnd(e) {
9804
- var _this58 = this;
9805
-
9806
- e.preventDefault();
9807
- document.removeEventListener('mouseup', this._handleDocumentClickEndBound);
9808
- document.removeEventListener('touchend', this._handleDocumentClickEndBound);
9809
- var clickPos = Timepicker._Pos(e);
9810
- var x = clickPos.x - this.x0;
9811
- var y = clickPos.y - this.y0;
9812
- if (this.moved && x === this.dx && y === this.dy) {
9813
- this.setHand(x, y);
9814
- }
9815
-
9816
- if (this.currentView === 'hours') {
9817
- this.showView('minutes', this.options.duration / 2);
9818
- } else if (this.options.autoClose) {
9819
- $(this.minutesView).addClass('timepicker-dial-out');
9820
- setTimeout(function () {
9821
- _this58.done();
9822
- }, this.options.duration / 2);
9823
- }
9824
-
9825
- if (typeof this.options.onSelect === 'function') {
9826
- this.options.onSelect.call(this, this.hours, this.minutes);
9827
- }
9828
-
9829
- // Unbind mousemove event
9830
- document.removeEventListener('mousemove', this._handleDocumentClickMoveBound);
9831
- document.removeEventListener('touchmove', this._handleDocumentClickMoveBound);
9832
- }
9833
- }, {
9834
- key: "_insertHTMLIntoDOM",
9835
- value: function _insertHTMLIntoDOM() {
9836
- this.$modalEl = $(Timepicker._template);
9837
- this.modalEl = this.$modalEl[0];
9838
- this.modalEl.id = 'modal-' + this.id;
9839
-
9840
- // Append popover to input by default
9841
- var containerEl = document.querySelector(this.options.container);
9842
- if (this.options.container && !!containerEl) {
9843
- this.$modalEl.appendTo(containerEl);
9844
- } else {
9845
- this.$modalEl.insertBefore(this.el);
9846
- }
9847
- }
9848
- }, {
9849
- key: "_setupModal",
9850
- value: function _setupModal() {
9851
- var _this59 = this;
9852
-
9853
- this.modal = M.Modal.init(this.modalEl, {
9854
- onOpenStart: this.options.onOpenStart,
9855
- onOpenEnd: this.options.onOpenEnd,
9856
- onCloseStart: this.options.onCloseStart,
9857
- onCloseEnd: function () {
9858
- if (typeof _this59.options.onCloseEnd === 'function') {
9859
- _this59.options.onCloseEnd.call(_this59);
9860
- }
9861
- _this59.isOpen = false;
9862
- }
9863
- });
9864
- }
9865
- }, {
9866
- key: "_setupVariables",
9867
- value: function _setupVariables() {
9868
- this.currentView = 'hours';
9869
- this.vibrate = navigator.vibrate ? 'vibrate' : navigator.webkitVibrate ? 'webkitVibrate' : null;
9870
-
9871
- this._canvas = this.modalEl.querySelector('.timepicker-canvas');
9872
- this.plate = this.modalEl.querySelector('.timepicker-plate');
9873
-
9874
- this.hoursView = this.modalEl.querySelector('.timepicker-hours');
9875
- this.minutesView = this.modalEl.querySelector('.timepicker-minutes');
9876
- this.spanHours = this.modalEl.querySelector('.timepicker-span-hours');
9877
- this.spanMinutes = this.modalEl.querySelector('.timepicker-span-minutes');
9878
- this.spanAmPm = this.modalEl.querySelector('.timepicker-span-am-pm');
9879
- this.footer = this.modalEl.querySelector('.timepicker-footer');
9880
- this.amOrPm = 'PM';
9881
- }
9882
- }, {
9883
- key: "_pickerSetup",
9884
- value: function _pickerSetup() {
9885
- var $clearBtn = $("<button class=\"btn-flat timepicker-clear waves-effect\" style=\"visibility: hidden;\" type=\"button\" tabindex=\"" + (this.options.twelveHour ? '3' : '1') + "\">" + this.options.i18n.clear + "</button>").appendTo(this.footer).on('click', this.clear.bind(this));
9886
- if (this.options.showClearBtn) {
9887
- $clearBtn.css({ visibility: '' });
9888
- }
9889
-
9890
- var confirmationBtnsContainer = $('<div class="confirmation-btns"></div>');
9891
- $('<button class="btn-flat timepicker-close waves-effect" type="button" tabindex="' + (this.options.twelveHour ? '3' : '1') + '">' + this.options.i18n.cancel + '</button>').appendTo(confirmationBtnsContainer).on('click', this.close.bind(this));
9892
- $('<button class="btn-flat timepicker-close waves-effect" type="button" tabindex="' + (this.options.twelveHour ? '3' : '1') + '">' + this.options.i18n.done + '</button>').appendTo(confirmationBtnsContainer).on('click', this.done.bind(this));
9893
- confirmationBtnsContainer.appendTo(this.footer);
9894
- }
9895
- }, {
9896
- key: "_clockSetup",
9897
- value: function _clockSetup() {
9898
- if (this.options.twelveHour) {
9899
- this.$amBtn = $('<div class="am-btn">AM</div>');
9900
- this.$pmBtn = $('<div class="pm-btn">PM</div>');
9901
- this.$amBtn.on('click', this._handleAmPmClick.bind(this)).appendTo(this.spanAmPm);
9902
- this.$pmBtn.on('click', this._handleAmPmClick.bind(this)).appendTo(this.spanAmPm);
9903
- }
9904
-
9905
- this._buildHoursView();
9906
- this._buildMinutesView();
9907
- this._buildSVGClock();
9908
- }
9909
- }, {
9910
- key: "_buildSVGClock",
9911
- value: function _buildSVGClock() {
9912
- // Draw clock hands and others
9913
- var dialRadius = this.options.dialRadius;
9914
- var tickRadius = this.options.tickRadius;
9915
- var diameter = dialRadius * 2;
9916
-
9917
- var svg = Timepicker._createSVGEl('svg');
9918
- svg.setAttribute('class', 'timepicker-svg');
9919
- svg.setAttribute('width', diameter);
9920
- svg.setAttribute('height', diameter);
9921
- var g = Timepicker._createSVGEl('g');
9922
- g.setAttribute('transform', 'translate(' + dialRadius + ',' + dialRadius + ')');
9923
- var bearing = Timepicker._createSVGEl('circle');
9924
- bearing.setAttribute('class', 'timepicker-canvas-bearing');
9925
- bearing.setAttribute('cx', 0);
9926
- bearing.setAttribute('cy', 0);
9927
- bearing.setAttribute('r', 4);
9928
- var hand = Timepicker._createSVGEl('line');
9929
- hand.setAttribute('x1', 0);
9930
- hand.setAttribute('y1', 0);
9931
- var bg = Timepicker._createSVGEl('circle');
9932
- bg.setAttribute('class', 'timepicker-canvas-bg');
9933
- bg.setAttribute('r', tickRadius);
9934
- g.appendChild(hand);
9935
- g.appendChild(bg);
9936
- g.appendChild(bearing);
9937
- svg.appendChild(g);
9938
- this._canvas.appendChild(svg);
9939
-
9940
- this.hand = hand;
9941
- this.bg = bg;
9942
- this.bearing = bearing;
9943
- this.g = g;
9944
- }
9945
- }, {
9946
- key: "_buildHoursView",
9947
- value: function _buildHoursView() {
9948
- var $tick = $('<div class="timepicker-tick"></div>');
9949
- // Hours view
9950
- if (this.options.twelveHour) {
9951
- for (var i = 1; i < 13; i += 1) {
9952
- var tick = $tick.clone();
9953
- var radian = i / 6 * Math.PI;
9954
- var radius = this.options.outerRadius;
9955
- tick.css({
9956
- left: this.options.dialRadius + Math.sin(radian) * radius - this.options.tickRadius + 'px',
9957
- top: this.options.dialRadius - Math.cos(radian) * radius - this.options.tickRadius + 'px'
9958
- });
9959
- tick.html(i === 0 ? '00' : i);
9960
- this.hoursView.appendChild(tick[0]);
9961
- // tick.on(mousedownEvent, mousedown);
9962
- }
9963
- } else {
9964
- for (var _i2 = 0; _i2 < 24; _i2 += 1) {
9965
- var _tick = $tick.clone();
9966
- var _radian = _i2 / 6 * Math.PI;
9967
- var inner = _i2 > 0 && _i2 < 13;
9968
- var _radius = inner ? this.options.innerRadius : this.options.outerRadius;
9969
- _tick.css({
9970
- left: this.options.dialRadius + Math.sin(_radian) * _radius - this.options.tickRadius + 'px',
9971
- top: this.options.dialRadius - Math.cos(_radian) * _radius - this.options.tickRadius + 'px'
9972
- });
9973
- _tick.html(_i2 === 0 ? '00' : _i2);
9974
- this.hoursView.appendChild(_tick[0]);
9975
- // tick.on(mousedownEvent, mousedown);
9976
- }
9977
- }
9978
- }
9979
- }, {
9980
- key: "_buildMinutesView",
9981
- value: function _buildMinutesView() {
9982
- var $tick = $('<div class="timepicker-tick"></div>');
9983
- // Minutes view
9984
- for (var i = 0; i < 60; i += 5) {
9985
- var tick = $tick.clone();
9986
- var radian = i / 30 * Math.PI;
9987
- tick.css({
9988
- left: this.options.dialRadius + Math.sin(radian) * this.options.outerRadius - this.options.tickRadius + 'px',
9989
- top: this.options.dialRadius - Math.cos(radian) * this.options.outerRadius - this.options.tickRadius + 'px'
9990
- });
9991
- tick.html(Timepicker._addLeadingZero(i));
9992
- this.minutesView.appendChild(tick[0]);
9993
- }
9994
- }
9995
- }, {
9996
- key: "_handleAmPmClick",
9997
- value: function _handleAmPmClick(e) {
9998
- var $btnClicked = $(e.target);
9999
- this.amOrPm = $btnClicked.hasClass('am-btn') ? 'AM' : 'PM';
10000
- this._updateAmPmView();
10001
- }
10002
- }, {
10003
- key: "_updateAmPmView",
10004
- value: function _updateAmPmView() {
10005
- if (this.options.twelveHour) {
10006
- this.$amBtn.toggleClass('text-primary', this.amOrPm === 'AM');
10007
- this.$pmBtn.toggleClass('text-primary', this.amOrPm === 'PM');
10008
- }
10009
- }
10010
- }, {
10011
- key: "_updateTimeFromInput",
10012
- value: function _updateTimeFromInput() {
10013
- // Get the time
10014
- var value = ((this.el.value || this.options.defaultTime || '') + '').split(':');
10015
- if (this.options.twelveHour && !(typeof value[1] === 'undefined')) {
10016
- if (value[1].toUpperCase().indexOf('AM') > 0) {
10017
- this.amOrPm = 'AM';
10018
- } else {
10019
- this.amOrPm = 'PM';
10020
- }
10021
- value[1] = value[1].replace('AM', '').replace('PM', '');
10022
- }
10023
- if (value[0] === 'now') {
10024
- var now = new Date(+new Date() + this.options.fromNow);
10025
- value = [now.getHours(), now.getMinutes()];
10026
- if (this.options.twelveHour) {
10027
- this.amOrPm = value[0] >= 12 && value[0] < 24 ? 'PM' : 'AM';
10028
- }
10029
- }
10030
- this.hours = +value[0] || 0;
10031
- this.minutes = +value[1] || 0;
10032
- this.spanHours.innerHTML = this.hours;
10033
- this.spanMinutes.innerHTML = Timepicker._addLeadingZero(this.minutes);
10034
-
10035
- this._updateAmPmView();
10036
- }
10037
- }, {
10038
- key: "showView",
10039
- value: function showView(view, delay) {
10040
- if (view === 'minutes' && $(this.hoursView).css('visibility') === 'visible') {
10041
- // raiseCallback(this.options.beforeHourSelect);
10042
- }
10043
- var isHours = view === 'hours',
10044
- nextView = isHours ? this.hoursView : this.minutesView,
10045
- hideView = isHours ? this.minutesView : this.hoursView;
10046
- this.currentView = view;
10047
-
10048
- $(this.spanHours).toggleClass('text-primary', isHours);
10049
- $(this.spanMinutes).toggleClass('text-primary', !isHours);
10050
-
10051
- // Transition view
10052
- hideView.classList.add('timepicker-dial-out');
10053
- $(nextView).css('visibility', 'visible').removeClass('timepicker-dial-out');
10054
-
10055
- // Reset clock hand
10056
- this.resetClock(delay);
10057
-
10058
- // After transitions ended
10059
- clearTimeout(this.toggleViewTimer);
10060
- this.toggleViewTimer = setTimeout(function () {
10061
- $(hideView).css('visibility', 'hidden');
10062
- }, this.options.duration);
10063
- }
10064
- }, {
10065
- key: "resetClock",
10066
- value: function resetClock(delay) {
10067
- var view = this.currentView,
10068
- value = this[view],
10069
- isHours = view === 'hours',
10070
- unit = Math.PI / (isHours ? 6 : 30),
10071
- radian = value * unit,
10072
- radius = isHours && value > 0 && value < 13 ? this.options.innerRadius : this.options.outerRadius,
10073
- x = Math.sin(radian) * radius,
10074
- y = -Math.cos(radian) * radius,
10075
- self = this;
10076
-
10077
- if (delay) {
10078
- $(this.canvas).addClass('timepicker-canvas-out');
10079
- setTimeout(function () {
10080
- $(self.canvas).removeClass('timepicker-canvas-out');
10081
- self.setHand(x, y);
10082
- }, delay);
10083
- } else {
10084
- this.setHand(x, y);
10085
- }
10086
- }
10087
- }, {
10088
- key: "setHand",
10089
- value: function setHand(x, y, roundBy5) {
10090
- var _this60 = this;
10091
-
10092
- var radian = Math.atan2(x, -y),
10093
- isHours = this.currentView === 'hours',
10094
- unit = Math.PI / (isHours || roundBy5 ? 6 : 30),
10095
- z = Math.sqrt(x * x + y * y),
10096
- inner = isHours && z < (this.options.outerRadius + this.options.innerRadius) / 2,
10097
- radius = inner ? this.options.innerRadius : this.options.outerRadius;
10098
-
10099
- if (this.options.twelveHour) {
10100
- radius = this.options.outerRadius;
10101
- }
10102
-
10103
- // Radian should in range [0, 2PI]
10104
- if (radian < 0) {
10105
- radian = Math.PI * 2 + radian;
10106
- }
10107
-
10108
- // Get the round value
10109
- var value = Math.round(radian / unit);
10110
-
10111
- // Get the round radian
10112
- radian = value * unit;
10113
-
10114
- // Correct the hours or minutes
10115
- if (this.options.twelveHour) {
10116
- if (isHours) {
10117
- if (value === 0) value = 12;
10118
- } else {
10119
- if (roundBy5) value *= 5;
10120
- if (value === 60) value = 0;
10121
- }
10122
- } else {
10123
- if (isHours) {
10124
- if (value === 12) {
10125
- value = 0;
10126
- }
10127
- value = inner ? value === 0 ? 12 : value : value === 0 ? 0 : value + 12;
10128
- } else {
10129
- if (roundBy5) {
10130
- value *= 5;
10131
- }
10132
- if (value === 60) {
10133
- value = 0;
10134
- }
10135
- }
10136
- }
10137
-
10138
- // Once hours or minutes changed, vibrate the device
10139
- if (this[this.currentView] !== value) {
10140
- if (this.vibrate && this.options.vibrate) {
10141
- // Do not vibrate too frequently
10142
- if (!this.vibrateTimer) {
10143
- navigator[this.vibrate](10);
10144
- this.vibrateTimer = setTimeout(function () {
10145
- _this60.vibrateTimer = null;
10146
- }, 100);
10147
- }
10148
- }
10149
- }
10150
-
10151
- this[this.currentView] = value;
10152
- if (isHours) {
10153
- this['spanHours'].innerHTML = value;
10154
- } else {
10155
- this['spanMinutes'].innerHTML = Timepicker._addLeadingZero(value);
10156
- }
10157
-
10158
- // Set clock hand and others' position
10159
- var cx1 = Math.sin(radian) * (radius - this.options.tickRadius),
10160
- cy1 = -Math.cos(radian) * (radius - this.options.tickRadius),
10161
- cx2 = Math.sin(radian) * radius,
10162
- cy2 = -Math.cos(radian) * radius;
10163
- this.hand.setAttribute('x2', cx1);
10164
- this.hand.setAttribute('y2', cy1);
10165
- this.bg.setAttribute('cx', cx2);
10166
- this.bg.setAttribute('cy', cy2);
10167
- }
10168
- }, {
10169
- key: "open",
10170
- value: function open() {
10171
- if (this.isOpen) {
10172
- return;
10173
- }
10174
-
10175
- this.isOpen = true;
10176
- this._updateTimeFromInput();
10177
- this.showView('hours');
10178
-
10179
- this.modal.open();
10180
- }
10181
- }, {
10182
- key: "close",
10183
- value: function close() {
10184
- if (!this.isOpen) {
10185
- return;
10186
- }
10187
-
10188
- this.isOpen = false;
10189
- this.modal.close();
10190
- }
10191
-
10192
- /**
10193
- * Finish timepicker selection.
10194
- */
10195
-
10196
- }, {
10197
- key: "done",
10198
- value: function done(e, clearValue) {
10199
- // Set input value
10200
- var last = this.el.value;
10201
- var value = clearValue ? '' : Timepicker._addLeadingZero(this.hours) + ':' + Timepicker._addLeadingZero(this.minutes);
10202
- this.time = value;
10203
- if (!clearValue && this.options.twelveHour) {
10204
- value = value + " " + this.amOrPm;
10205
- }
10206
- this.el.value = value;
10207
-
10208
- // Trigger change event
10209
- if (value !== last) {
10210
- this.$el.trigger('change');
10211
- }
10212
-
10213
- this.close();
10214
- this.el.focus();
10215
- }
10216
- }, {
10217
- key: "clear",
10218
- value: function clear() {
10219
- this.done(null, true);
10220
- }
10221
- }], [{
10222
- key: "init",
10223
- value: function init(els, options) {
10224
- return _get(Timepicker.__proto__ || Object.getPrototypeOf(Timepicker), "init", this).call(this, this, els, options);
10225
- }
10226
- }, {
10227
- key: "_addLeadingZero",
10228
- value: function _addLeadingZero(num) {
10229
- return (num < 10 ? '0' : '') + num;
10230
- }
10231
- }, {
10232
- key: "_createSVGEl",
10233
- value: function _createSVGEl(name) {
10234
- var svgNS = 'http://www.w3.org/2000/svg';
10235
- return document.createElementNS(svgNS, name);
10236
- }
10237
-
10238
- /**
10239
- * @typedef {Object} Point
10240
- * @property {number} x The X Coordinate
10241
- * @property {number} y The Y Coordinate
10242
- */
10243
-
10244
- /**
10245
- * Get x position of mouse or touch event
10246
- * @param {Event} e
10247
- * @return {Point} x and y location
10248
- */
10249
-
10250
- }, {
10251
- key: "_Pos",
10252
- value: function _Pos(e) {
10253
- if (e.targetTouches && e.targetTouches.length >= 1) {
10254
- return { x: e.targetTouches[0].clientX, y: e.targetTouches[0].clientY };
10255
- }
10256
- // mouse event
10257
- return { x: e.clientX, y: e.clientY };
10258
- }
10259
-
10260
- /**
10261
- * Get Instance
10262
- */
10263
-
10264
- }, {
10265
- key: "getInstance",
10266
- value: function getInstance(el) {
10267
- var domElem = !!el.jquery ? el[0] : el;
10268
- return domElem.M_Timepicker;
10269
- }
10270
- }, {
10271
- key: "defaults",
10272
- get: function () {
10273
- return _defaults;
10274
- }
10275
- }]);
10276
-
10277
- return Timepicker;
10278
- }(Component);
10279
-
10280
- Timepicker._template = ['<div class= "modal timepicker-modal">', '<div class="modal-content timepicker-container">', '<div class="timepicker-digital-display">', '<div class="timepicker-text-container">', '<div class="timepicker-display-column">', '<span class="timepicker-span-hours text-primary"></span>', ':', '<span class="timepicker-span-minutes"></span>', '</div>', '<div class="timepicker-display-column timepicker-display-am-pm">', '<div class="timepicker-span-am-pm"></div>', '</div>', '</div>', '</div>', '<div class="timepicker-analog-display">', '<div class="timepicker-plate">', '<div class="timepicker-canvas"></div>', '<div class="timepicker-dial timepicker-hours"></div>', '<div class="timepicker-dial timepicker-minutes timepicker-dial-out"></div>', '</div>', '<div class="timepicker-footer"></div>', '</div>', '</div>', '</div>'].join('');
10281
-
10282
- M.Timepicker = Timepicker;
10283
-
10284
- if (M.jQueryLoaded) {
10285
- M.initializeJqueryWrapper(Timepicker, 'timepicker', 'M_Timepicker');
10286
- }
10287
- })(cash);
10288
- ;(function ($) {
10289
- 'use strict';
10290
-
10291
- var _defaults = {};
10292
-
10293
- /**
10294
- * @class
10295
- *
10296
- */
10297
-
10298
- var CharacterCounter = function (_Component17) {
10299
- _inherits(CharacterCounter, _Component17);
10300
-
10301
- /**
10302
- * Construct CharacterCounter instance
10303
- * @constructor
10304
- * @param {Element} el
10305
- * @param {Object} options
10306
- */
10307
- function CharacterCounter(el, options) {
10308
- _classCallCheck(this, CharacterCounter);
10309
-
10310
- var _this61 = _possibleConstructorReturn(this, (CharacterCounter.__proto__ || Object.getPrototypeOf(CharacterCounter)).call(this, CharacterCounter, el, options));
10311
-
10312
- _this61.el.M_CharacterCounter = _this61;
10313
-
10314
- /**
10315
- * Options for the character counter
10316
- */
10317
- _this61.options = $.extend({}, CharacterCounter.defaults, options);
10318
-
10319
- _this61.isInvalid = false;
10320
- _this61.isValidLength = false;
10321
- _this61._setupCounter();
10322
- _this61._setupEventHandlers();
10323
- return _this61;
10324
- }
10325
-
10326
- _createClass(CharacterCounter, [{
10327
- key: "destroy",
10328
-
10329
-
10330
- /**
10331
- * Teardown component
10332
- */
10333
- value: function destroy() {
10334
- this._removeEventHandlers();
10335
- this.el.CharacterCounter = undefined;
10336
- this._removeCounter();
10337
- }
10338
-
10339
- /**
10340
- * Setup Event Handlers
10341
- */
10342
-
10343
- }, {
10344
- key: "_setupEventHandlers",
10345
- value: function _setupEventHandlers() {
10346
- this._handleUpdateCounterBound = this.updateCounter.bind(this);
10347
-
10348
- this.el.addEventListener('focus', this._handleUpdateCounterBound, true);
10349
- this.el.addEventListener('input', this._handleUpdateCounterBound, true);
10350
- }
10351
-
10352
- /**
10353
- * Remove Event Handlers
10354
- */
10355
-
10356
- }, {
10357
- key: "_removeEventHandlers",
10358
- value: function _removeEventHandlers() {
10359
- this.el.removeEventListener('focus', this._handleUpdateCounterBound, true);
10360
- this.el.removeEventListener('input', this._handleUpdateCounterBound, true);
10361
- }
10362
-
10363
- /**
10364
- * Setup counter element
10365
- */
10366
-
10367
- }, {
10368
- key: "_setupCounter",
10369
- value: function _setupCounter() {
10370
- this.counterEl = document.createElement('span');
10371
- $(this.counterEl).addClass('character-counter').css({
10372
- float: 'right',
10373
- 'font-size': '12px',
10374
- height: 1
10375
- });
10376
-
10377
- this.$el.parent().append(this.counterEl);
10378
- }
10379
-
10380
- /**
10381
- * Remove counter element
10382
- */
10383
-
10384
- }, {
10385
- key: "_removeCounter",
10386
- value: function _removeCounter() {
10387
- $(this.counterEl).remove();
10388
- }
10389
-
10390
- /**
10391
- * Update counter
10392
- */
10393
-
10394
- }, {
10395
- key: "updateCounter",
10396
- value: function updateCounter() {
10397
- var maxLength = +this.$el.attr('data-length'),
10398
- actualLength = this.el.value.length;
10399
- this.isValidLength = actualLength <= maxLength;
10400
- var counterString = actualLength;
10401
-
10402
- if (maxLength) {
10403
- counterString += '/' + maxLength;
10404
- this._validateInput();
10405
- }
10406
-
10407
- $(this.counterEl).html(counterString);
10408
- }
10409
-
10410
- /**
10411
- * Add validation classes
10412
- */
10413
-
10414
- }, {
10415
- key: "_validateInput",
10416
- value: function _validateInput() {
10417
- if (this.isValidLength && this.isInvalid) {
10418
- this.isInvalid = false;
10419
- this.$el.removeClass('invalid');
10420
- } else if (!this.isValidLength && !this.isInvalid) {
10421
- this.isInvalid = true;
10422
- this.$el.removeClass('valid');
10423
- this.$el.addClass('invalid');
10424
- }
10425
- }
10426
- }], [{
10427
- key: "init",
10428
- value: function init(els, options) {
10429
- return _get(CharacterCounter.__proto__ || Object.getPrototypeOf(CharacterCounter), "init", this).call(this, this, els, options);
10430
- }
10431
-
10432
- /**
10433
- * Get Instance
10434
- */
10435
-
10436
- }, {
10437
- key: "getInstance",
10438
- value: function getInstance(el) {
10439
- var domElem = !!el.jquery ? el[0] : el;
10440
- return domElem.M_CharacterCounter;
10441
- }
10442
- }, {
10443
- key: "defaults",
10444
- get: function () {
10445
- return _defaults;
10446
- }
10447
- }]);
10448
-
10449
- return CharacterCounter;
10450
- }(Component);
10451
-
10452
- M.CharacterCounter = CharacterCounter;
10453
-
10454
- if (M.jQueryLoaded) {
10455
- M.initializeJqueryWrapper(CharacterCounter, 'characterCounter', 'M_CharacterCounter');
10456
- }
10457
- })(cash);
10458
- ;(function ($) {
10459
- 'use strict';
10460
-
10461
- var _defaults = {
10462
- duration: 200, // ms
10463
- dist: -100, // zoom scale TODO: make this more intuitive as an option
10464
- shift: 0, // spacing for center image
10465
- padding: 0, // Padding between non center items
10466
- numVisible: 5, // Number of visible items in carousel
10467
- fullWidth: false, // Change to full width styles
10468
- indicators: false, // Toggle indicators
10469
- noWrap: false, // Don't wrap around and cycle through items.
10470
- onCycleTo: null // Callback for when a new slide is cycled to.
10471
- };
10472
-
10473
- /**
10474
- * @class
10475
- *
10476
- */
10477
-
10478
- var Carousel = function (_Component18) {
10479
- _inherits(Carousel, _Component18);
10480
-
10481
- /**
10482
- * Construct Carousel instance
10483
- * @constructor
10484
- * @param {Element} el
10485
- * @param {Object} options
10486
- */
10487
- function Carousel(el, options) {
10488
- _classCallCheck(this, Carousel);
10489
-
10490
- var _this62 = _possibleConstructorReturn(this, (Carousel.__proto__ || Object.getPrototypeOf(Carousel)).call(this, Carousel, el, options));
10491
-
10492
- _this62.el.M_Carousel = _this62;
10493
-
10494
- /**
10495
- * Options for the carousel
10496
- * @member Carousel#options
10497
- * @prop {Number} duration
10498
- * @prop {Number} dist
10499
- * @prop {Number} shift
10500
- * @prop {Number} padding
10501
- * @prop {Number} numVisible
10502
- * @prop {Boolean} fullWidth
10503
- * @prop {Boolean} indicators
10504
- * @prop {Boolean} noWrap
10505
- * @prop {Function} onCycleTo
10506
- */
10507
- _this62.options = $.extend({}, Carousel.defaults, options);
10508
-
10509
- // Setup
10510
- _this62.hasMultipleSlides = _this62.$el.find('.carousel-item').length > 1;
10511
- _this62.showIndicators = _this62.options.indicators && _this62.hasMultipleSlides;
10512
- _this62.noWrap = _this62.options.noWrap || !_this62.hasMultipleSlides;
10513
- _this62.pressed = false;
10514
- _this62.dragged = false;
10515
- _this62.offset = _this62.target = 0;
10516
- _this62.images = [];
10517
- _this62.itemWidth = _this62.$el.find('.carousel-item').first().innerWidth();
10518
- _this62.itemHeight = _this62.$el.find('.carousel-item').first().innerHeight();
10519
- _this62.dim = _this62.itemWidth * 2 + _this62.options.padding || 1; // Make sure dim is non zero for divisions.
10520
- _this62._autoScrollBound = _this62._autoScroll.bind(_this62);
10521
- _this62._trackBound = _this62._track.bind(_this62);
10522
-
10523
- // Full Width carousel setup
10524
- if (_this62.options.fullWidth) {
10525
- _this62.options.dist = 0;
10526
- _this62._setCarouselHeight();
10527
-
10528
- // Offset fixed items when indicators.
10529
- if (_this62.showIndicators) {
10530
- _this62.$el.find('.carousel-fixed-item').addClass('with-indicators');
10531
- }
10532
- }
10533
-
10534
- // Iterate through slides
10535
- _this62.$indicators = $('<ul class="indicators"></ul>');
10536
- _this62.$el.find('.carousel-item').each(function (el, i) {
10537
- _this62.images.push(el);
10538
- if (_this62.showIndicators) {
10539
- var $indicator = $('<li class="indicator-item"></li>');
10540
-
10541
- // Add active to first by default.
10542
- if (i === 0) {
10543
- $indicator[0].classList.add('active');
10544
- }
10545
-
10546
- _this62.$indicators.append($indicator);
10547
- }
10548
- });
10549
- if (_this62.showIndicators) {
10550
- _this62.$el.append(_this62.$indicators);
10551
- }
10552
- _this62.count = _this62.images.length;
10553
-
10554
- // Cap numVisible at count
10555
- _this62.options.numVisible = Math.min(_this62.count, _this62.options.numVisible);
10556
-
10557
- // Setup cross browser string
10558
- _this62.xform = 'transform';
10559
- ['webkit', 'Moz', 'O', 'ms'].every(function (prefix) {
10560
- var e = prefix + 'Transform';
10561
- if (typeof document.body.style[e] !== 'undefined') {
10562
- _this62.xform = e;
10563
- return false;
10564
- }
10565
- return true;
10566
- });
10567
-
10568
- _this62._setupEventHandlers();
10569
- _this62._scroll(_this62.offset);
10570
- return _this62;
10571
- }
10572
-
10573
- _createClass(Carousel, [{
10574
- key: "destroy",
10575
-
10576
-
10577
- /**
10578
- * Teardown component
10579
- */
10580
- value: function destroy() {
10581
- this._removeEventHandlers();
10582
- this.el.M_Carousel = undefined;
10583
- }
10584
-
10585
- /**
10586
- * Setup Event Handlers
10587
- */
10588
-
10589
- }, {
10590
- key: "_setupEventHandlers",
10591
- value: function _setupEventHandlers() {
10592
- var _this63 = this;
10593
-
10594
- this._handleCarouselTapBound = this._handleCarouselTap.bind(this);
10595
- this._handleCarouselDragBound = this._handleCarouselDrag.bind(this);
10596
- this._handleCarouselReleaseBound = this._handleCarouselRelease.bind(this);
10597
- this._handleCarouselClickBound = this._handleCarouselClick.bind(this);
10598
-
10599
- if (typeof window.ontouchstart !== 'undefined') {
10600
- this.el.addEventListener('touchstart', this._handleCarouselTapBound);
10601
- this.el.addEventListener('touchmove', this._handleCarouselDragBound);
10602
- this.el.addEventListener('touchend', this._handleCarouselReleaseBound);
10603
- }
10604
-
10605
- this.el.addEventListener('mousedown', this._handleCarouselTapBound);
10606
- this.el.addEventListener('mousemove', this._handleCarouselDragBound);
10607
- this.el.addEventListener('mouseup', this._handleCarouselReleaseBound);
10608
- this.el.addEventListener('mouseleave', this._handleCarouselReleaseBound);
10609
- this.el.addEventListener('click', this._handleCarouselClickBound);
10610
-
10611
- if (this.showIndicators && this.$indicators) {
10612
- this._handleIndicatorClickBound = this._handleIndicatorClick.bind(this);
10613
- this.$indicators.find('.indicator-item').each(function (el, i) {
10614
- el.addEventListener('click', _this63._handleIndicatorClickBound);
10615
- });
10616
- }
10617
-
10618
- // Resize
10619
- var throttledResize = M.throttle(this._handleResize, 200);
10620
- this._handleThrottledResizeBound = throttledResize.bind(this);
10621
-
10622
- window.addEventListener('resize', this._handleThrottledResizeBound);
10623
- }
10624
-
10625
- /**
10626
- * Remove Event Handlers
10627
- */
10628
-
10629
- }, {
10630
- key: "_removeEventHandlers",
10631
- value: function _removeEventHandlers() {
10632
- var _this64 = this;
10633
-
10634
- if (typeof window.ontouchstart !== 'undefined') {
10635
- this.el.removeEventListener('touchstart', this._handleCarouselTapBound);
10636
- this.el.removeEventListener('touchmove', this._handleCarouselDragBound);
10637
- this.el.removeEventListener('touchend', this._handleCarouselReleaseBound);
10638
- }
10639
- this.el.removeEventListener('mousedown', this._handleCarouselTapBound);
10640
- this.el.removeEventListener('mousemove', this._handleCarouselDragBound);
10641
- this.el.removeEventListener('mouseup', this._handleCarouselReleaseBound);
10642
- this.el.removeEventListener('mouseleave', this._handleCarouselReleaseBound);
10643
- this.el.removeEventListener('click', this._handleCarouselClickBound);
10644
-
10645
- if (this.showIndicators && this.$indicators) {
10646
- this.$indicators.find('.indicator-item').each(function (el, i) {
10647
- el.removeEventListener('click', _this64._handleIndicatorClickBound);
10648
- });
10649
- }
10650
-
10651
- window.removeEventListener('resize', this._handleThrottledResizeBound);
10652
- }
10653
-
10654
- /**
10655
- * Handle Carousel Tap
10656
- * @param {Event} e
10657
- */
10658
-
10659
- }, {
10660
- key: "_handleCarouselTap",
10661
- value: function _handleCarouselTap(e) {
10662
- // Fixes firefox draggable image bug
10663
- if (e.type === 'mousedown' && $(e.target).is('img')) {
10664
- e.preventDefault();
10665
- }
10666
- this.pressed = true;
10667
- this.dragged = false;
10668
- this.verticalDragged = false;
10669
- this.reference = this._xpos(e);
10670
- this.referenceY = this._ypos(e);
10671
-
10672
- this.velocity = this.amplitude = 0;
10673
- this.frame = this.offset;
10674
- this.timestamp = Date.now();
10675
- clearInterval(this.ticker);
10676
- this.ticker = setInterval(this._trackBound, 100);
10677
- }
10678
-
10679
- /**
10680
- * Handle Carousel Drag
10681
- * @param {Event} e
10682
- */
10683
-
10684
- }, {
10685
- key: "_handleCarouselDrag",
10686
- value: function _handleCarouselDrag(e) {
10687
- var x = void 0,
10688
- y = void 0,
10689
- delta = void 0,
10690
- deltaY = void 0;
10691
- if (this.pressed) {
10692
- x = this._xpos(e);
10693
- y = this._ypos(e);
10694
- delta = this.reference - x;
10695
- deltaY = Math.abs(this.referenceY - y);
10696
- if (deltaY < 30 && !this.verticalDragged) {
10697
- // If vertical scrolling don't allow dragging.
10698
- if (delta > 2 || delta < -2) {
10699
- this.dragged = true;
10700
- this.reference = x;
10701
- this._scroll(this.offset + delta);
10702
- }
10703
- } else if (this.dragged) {
10704
- // If dragging don't allow vertical scroll.
10705
- e.preventDefault();
10706
- e.stopPropagation();
10707
- return false;
10708
- } else {
10709
- // Vertical scrolling.
10710
- this.verticalDragged = true;
10711
- }
10712
- }
10713
-
10714
- if (this.dragged) {
10715
- // If dragging don't allow vertical scroll.
10716
- e.preventDefault();
10717
- e.stopPropagation();
10718
- return false;
10719
- }
10720
- }
10721
-
10722
- /**
10723
- * Handle Carousel Release
10724
- * @param {Event} e
10725
- */
10726
-
10727
- }, {
10728
- key: "_handleCarouselRelease",
10729
- value: function _handleCarouselRelease(e) {
10730
- if (this.pressed) {
10731
- this.pressed = false;
10732
- } else {
10733
- return;
10734
- }
10735
-
10736
- clearInterval(this.ticker);
10737
- this.target = this.offset;
10738
- if (this.velocity > 10 || this.velocity < -10) {
10739
- this.amplitude = 0.9 * this.velocity;
10740
- this.target = this.offset + this.amplitude;
10741
- }
10742
- this.target = Math.round(this.target / this.dim) * this.dim;
10743
-
10744
- // No wrap of items.
10745
- if (this.noWrap) {
10746
- if (this.target >= this.dim * (this.count - 1)) {
10747
- this.target = this.dim * (this.count - 1);
10748
- } else if (this.target < 0) {
10749
- this.target = 0;
10750
- }
10751
- }
10752
- this.amplitude = this.target - this.offset;
10753
- this.timestamp = Date.now();
10754
- requestAnimationFrame(this._autoScrollBound);
10755
-
10756
- if (this.dragged) {
10757
- e.preventDefault();
10758
- e.stopPropagation();
10759
- }
10760
- return false;
10761
- }
10762
-
10763
- /**
10764
- * Handle Carousel CLick
10765
- * @param {Event} e
10766
- */
10767
-
10768
- }, {
10769
- key: "_handleCarouselClick",
10770
- value: function _handleCarouselClick(e) {
10771
- // Disable clicks if carousel was dragged.
10772
- if (this.dragged) {
10773
- e.preventDefault();
10774
- e.stopPropagation();
10775
- return false;
10776
- } else if (!this.options.fullWidth) {
10777
- var clickedIndex = $(e.target).closest('.carousel-item').index();
10778
- var diff = this._wrap(this.center) - clickedIndex;
10779
-
10780
- // Disable clicks if carousel was shifted by click
10781
- if (diff !== 0) {
10782
- e.preventDefault();
10783
- e.stopPropagation();
10784
- }
10785
- this._cycleTo(clickedIndex);
10786
- }
10787
- }
10788
-
10789
- /**
10790
- * Handle Indicator CLick
10791
- * @param {Event} e
10792
- */
10793
-
10794
- }, {
10795
- key: "_handleIndicatorClick",
10796
- value: function _handleIndicatorClick(e) {
10797
- e.stopPropagation();
10798
-
10799
- var indicator = $(e.target).closest('.indicator-item');
10800
- if (indicator.length) {
10801
- this._cycleTo(indicator.index());
10802
- }
10803
- }
10804
-
10805
- /**
10806
- * Handle Throttle Resize
10807
- * @param {Event} e
10808
- */
10809
-
10810
- }, {
10811
- key: "_handleResize",
10812
- value: function _handleResize(e) {
10813
- if (this.options.fullWidth) {
10814
- this.itemWidth = this.$el.find('.carousel-item').first().innerWidth();
10815
- this.imageHeight = this.$el.find('.carousel-item.active').height();
10816
- this.dim = this.itemWidth * 2 + this.options.padding;
10817
- this.offset = this.center * 2 * this.itemWidth;
10818
- this.target = this.offset;
10819
- this._setCarouselHeight(true);
10820
- } else {
10821
- this._scroll();
10822
- }
10823
- }
10824
-
10825
- /**
10826
- * Set carousel height based on first slide
10827
- * @param {Booleam} imageOnly - true for image slides
10828
- */
10829
-
10830
- }, {
10831
- key: "_setCarouselHeight",
10832
- value: function _setCarouselHeight(imageOnly) {
10833
- var _this65 = this;
10834
-
10835
- var firstSlide = this.$el.find('.carousel-item.active').length ? this.$el.find('.carousel-item.active').first() : this.$el.find('.carousel-item').first();
10836
- var firstImage = firstSlide.find('img').first();
10837
- if (firstImage.length) {
10838
- if (firstImage[0].complete) {
10839
- // If image won't trigger the load event
10840
- var imageHeight = firstImage.height();
10841
- if (imageHeight > 0) {
10842
- this.$el.css('height', imageHeight + 'px');
10843
- } else {
10844
- // If image still has no height, use the natural dimensions to calculate
10845
- var naturalWidth = firstImage[0].naturalWidth;
10846
- var naturalHeight = firstImage[0].naturalHeight;
10847
- var adjustedHeight = this.$el.width() / naturalWidth * naturalHeight;
10848
- this.$el.css('height', adjustedHeight + 'px');
10849
- }
10850
- } else {
10851
- // Get height when image is loaded normally
10852
- firstImage.one('load', function (el, i) {
10853
- _this65.$el.css('height', el.offsetHeight + 'px');
10854
- });
10855
- }
10856
- } else if (!imageOnly) {
10857
- var slideHeight = firstSlide.height();
10858
- this.$el.css('height', slideHeight + 'px');
10859
- }
10860
- }
10861
-
10862
- /**
10863
- * Get x position from event
10864
- * @param {Event} e
10865
- */
10866
-
10867
- }, {
10868
- key: "_xpos",
10869
- value: function _xpos(e) {
10870
- // touch event
10871
- if (e.targetTouches && e.targetTouches.length >= 1) {
10872
- return e.targetTouches[0].clientX;
10873
- }
10874
-
10875
- // mouse event
10876
- return e.clientX;
10877
- }
10878
-
10879
- /**
10880
- * Get y position from event
10881
- * @param {Event} e
10882
- */
10883
-
10884
- }, {
10885
- key: "_ypos",
10886
- value: function _ypos(e) {
10887
- // touch event
10888
- if (e.targetTouches && e.targetTouches.length >= 1) {
10889
- return e.targetTouches[0].clientY;
10890
- }
10891
-
10892
- // mouse event
10893
- return e.clientY;
10894
- }
10895
-
10896
- /**
10897
- * Wrap index
10898
- * @param {Number} x
10899
- */
10900
-
10901
- }, {
10902
- key: "_wrap",
10903
- value: function _wrap(x) {
10904
- return x >= this.count ? x % this.count : x < 0 ? this._wrap(this.count + x % this.count) : x;
10905
- }
10906
-
10907
- /**
10908
- * Tracks scrolling information
10909
- */
10910
-
10911
- }, {
10912
- key: "_track",
10913
- value: function _track() {
10914
- var now = void 0,
10915
- elapsed = void 0,
10916
- delta = void 0,
10917
- v = void 0;
10918
-
10919
- now = Date.now();
10920
- elapsed = now - this.timestamp;
10921
- this.timestamp = now;
10922
- delta = this.offset - this.frame;
10923
- this.frame = this.offset;
10924
-
10925
- v = 1000 * delta / (1 + elapsed);
10926
- this.velocity = 0.8 * v + 0.2 * this.velocity;
10927
- }
10928
-
10929
- /**
10930
- * Auto scrolls to nearest carousel item.
10931
- */
10932
-
10933
- }, {
10934
- key: "_autoScroll",
10935
- value: function _autoScroll() {
10936
- var elapsed = void 0,
10937
- delta = void 0;
10938
-
10939
- if (this.amplitude) {
10940
- elapsed = Date.now() - this.timestamp;
10941
- delta = this.amplitude * Math.exp(-elapsed / this.options.duration);
10942
- if (delta > 2 || delta < -2) {
10943
- this._scroll(this.target - delta);
10944
- requestAnimationFrame(this._autoScrollBound);
10945
- } else {
10946
- this._scroll(this.target);
10947
- }
10948
- }
10949
- }
10950
-
10951
- /**
10952
- * Scroll to target
10953
- * @param {Number} x
10954
- */
10955
-
10956
- }, {
10957
- key: "_scroll",
10958
- value: function _scroll(x) {
10959
- var _this66 = this;
10960
-
10961
- // Track scrolling state
10962
- if (!this.$el.hasClass('scrolling')) {
10963
- this.el.classList.add('scrolling');
10964
- }
10965
- if (this.scrollingTimeout != null) {
10966
- window.clearTimeout(this.scrollingTimeout);
10967
- }
10968
- this.scrollingTimeout = window.setTimeout(function () {
10969
- _this66.$el.removeClass('scrolling');
10970
- }, this.options.duration);
10971
-
10972
- // Start actual scroll
10973
- var i = void 0,
10974
- half = void 0,
10975
- delta = void 0,
10976
- dir = void 0,
10977
- tween = void 0,
10978
- el = void 0,
10979
- alignment = void 0,
10980
- zTranslation = void 0,
10981
- tweenedOpacity = void 0,
10982
- centerTweenedOpacity = void 0;
10983
- var lastCenter = this.center;
10984
- var numVisibleOffset = 1 / this.options.numVisible;
10985
-
10986
- this.offset = typeof x === 'number' ? x : this.offset;
10987
- this.center = Math.floor((this.offset + this.dim / 2) / this.dim);
10988
- delta = this.offset - this.center * this.dim;
10989
- dir = delta < 0 ? 1 : -1;
10990
- tween = -dir * delta * 2 / this.dim;
10991
- half = this.count >> 1;
10992
-
10993
- if (this.options.fullWidth) {
10994
- alignment = 'translateX(0)';
10995
- centerTweenedOpacity = 1;
10996
- } else {
10997
- alignment = 'translateX(' + (this.el.clientWidth - this.itemWidth) / 2 + 'px) ';
10998
- alignment += 'translateY(' + (this.el.clientHeight - this.itemHeight) / 2 + 'px)';
10999
- centerTweenedOpacity = 1 - numVisibleOffset * tween;
11000
- }
11001
-
11002
- // Set indicator active
11003
- if (this.showIndicators) {
11004
- var diff = this.center % this.count;
11005
- var activeIndicator = this.$indicators.find('.indicator-item.active');
11006
- if (activeIndicator.index() !== diff) {
11007
- activeIndicator.removeClass('active');
11008
- this.$indicators.find('.indicator-item').eq(diff)[0].classList.add('active');
11009
- }
11010
- }
11011
-
11012
- // center
11013
- // Don't show wrapped items.
11014
- if (!this.noWrap || this.center >= 0 && this.center < this.count) {
11015
- el = this.images[this._wrap(this.center)];
11016
-
11017
- // Add active class to center item.
11018
- if (!$(el).hasClass('active')) {
11019
- this.$el.find('.carousel-item').removeClass('active');
11020
- el.classList.add('active');
11021
- }
11022
- var transformString = alignment + " translateX(" + -delta / 2 + "px) translateX(" + dir * this.options.shift * tween * i + "px) translateZ(" + this.options.dist * tween + "px)";
11023
- this._updateItemStyle(el, centerTweenedOpacity, 0, transformString);
11024
- }
11025
-
11026
- for (i = 1; i <= half; ++i) {
11027
- // right side
11028
- if (this.options.fullWidth) {
11029
- zTranslation = this.options.dist;
11030
- tweenedOpacity = i === half && delta < 0 ? 1 - tween : 1;
11031
- } else {
11032
- zTranslation = this.options.dist * (i * 2 + tween * dir);
11033
- tweenedOpacity = 1 - numVisibleOffset * (i * 2 + tween * dir);
11034
- }
11035
- // Don't show wrapped items.
11036
- if (!this.noWrap || this.center + i < this.count) {
11037
- el = this.images[this._wrap(this.center + i)];
11038
- var _transformString = alignment + " translateX(" + (this.options.shift + (this.dim * i - delta) / 2) + "px) translateZ(" + zTranslation + "px)";
11039
- this._updateItemStyle(el, tweenedOpacity, -i, _transformString);
11040
- }
11041
-
11042
- // left side
11043
- if (this.options.fullWidth) {
11044
- zTranslation = this.options.dist;
11045
- tweenedOpacity = i === half && delta > 0 ? 1 - tween : 1;
11046
- } else {
11047
- zTranslation = this.options.dist * (i * 2 - tween * dir);
11048
- tweenedOpacity = 1 - numVisibleOffset * (i * 2 - tween * dir);
11049
- }
11050
- // Don't show wrapped items.
11051
- if (!this.noWrap || this.center - i >= 0) {
11052
- el = this.images[this._wrap(this.center - i)];
11053
- var _transformString2 = alignment + " translateX(" + (-this.options.shift + (-this.dim * i - delta) / 2) + "px) translateZ(" + zTranslation + "px)";
11054
- this._updateItemStyle(el, tweenedOpacity, -i, _transformString2);
11055
- }
11056
- }
11057
-
11058
- // center
11059
- // Don't show wrapped items.
11060
- if (!this.noWrap || this.center >= 0 && this.center < this.count) {
11061
- el = this.images[this._wrap(this.center)];
11062
- var _transformString3 = alignment + " translateX(" + -delta / 2 + "px) translateX(" + dir * this.options.shift * tween + "px) translateZ(" + this.options.dist * tween + "px)";
11063
- this._updateItemStyle(el, centerTweenedOpacity, 0, _transformString3);
11064
- }
11065
-
11066
- // onCycleTo callback
11067
- var $currItem = this.$el.find('.carousel-item').eq(this._wrap(this.center));
11068
- if (lastCenter !== this.center && typeof this.options.onCycleTo === 'function') {
11069
- this.options.onCycleTo.call(this, $currItem[0], this.dragged);
11070
- }
11071
-
11072
- // One time callback
11073
- if (typeof this.oneTimeCallback === 'function') {
11074
- this.oneTimeCallback.call(this, $currItem[0], this.dragged);
11075
- this.oneTimeCallback = null;
11076
- }
11077
- }
11078
-
11079
- /**
11080
- * Cycle to target
11081
- * @param {Element} el
11082
- * @param {Number} opacity
11083
- * @param {Number} zIndex
11084
- * @param {String} transform
11085
- */
11086
-
11087
- }, {
11088
- key: "_updateItemStyle",
11089
- value: function _updateItemStyle(el, opacity, zIndex, transform) {
11090
- el.style[this.xform] = transform;
11091
- el.style.zIndex = zIndex;
11092
- el.style.opacity = opacity;
11093
- el.style.visibility = 'visible';
11094
- }
11095
-
11096
- /**
11097
- * Cycle to target
11098
- * @param {Number} n
11099
- * @param {Function} callback
11100
- */
11101
-
11102
- }, {
11103
- key: "_cycleTo",
11104
- value: function _cycleTo(n, callback) {
11105
- var diff = this.center % this.count - n;
11106
-
11107
- // Account for wraparound.
11108
- if (!this.noWrap) {
11109
- if (diff < 0) {
11110
- if (Math.abs(diff + this.count) < Math.abs(diff)) {
11111
- diff += this.count;
11112
- }
11113
- } else if (diff > 0) {
11114
- if (Math.abs(diff - this.count) < diff) {
11115
- diff -= this.count;
11116
- }
11117
- }
11118
- }
11119
-
11120
- this.target = this.dim * Math.round(this.offset / this.dim);
11121
- // Next
11122
- if (diff < 0) {
11123
- this.target += this.dim * Math.abs(diff);
11124
-
11125
- // Prev
11126
- } else if (diff > 0) {
11127
- this.target -= this.dim * diff;
11128
- }
11129
-
11130
- // Set one time callback
11131
- if (typeof callback === 'function') {
11132
- this.oneTimeCallback = callback;
11133
- }
11134
-
11135
- // Scroll
11136
- if (this.offset !== this.target) {
11137
- this.amplitude = this.target - this.offset;
11138
- this.timestamp = Date.now();
11139
- requestAnimationFrame(this._autoScrollBound);
11140
- }
11141
- }
11142
-
11143
- /**
11144
- * Cycle to next item
11145
- * @param {Number} [n]
11146
- */
11147
-
11148
- }, {
11149
- key: "next",
11150
- value: function next(n) {
11151
- if (n === undefined || isNaN(n)) {
11152
- n = 1;
11153
- }
11154
-
11155
- var index = this.center + n;
11156
- if (index >= this.count || index < 0) {
11157
- if (this.noWrap) {
11158
- return;
11159
- }
11160
-
11161
- index = this._wrap(index);
11162
- }
11163
- this._cycleTo(index);
11164
- }
11165
-
11166
- /**
11167
- * Cycle to previous item
11168
- * @param {Number} [n]
11169
- */
11170
-
11171
- }, {
11172
- key: "prev",
11173
- value: function prev(n) {
11174
- if (n === undefined || isNaN(n)) {
11175
- n = 1;
11176
- }
11177
-
11178
- var index = this.center - n;
11179
- if (index >= this.count || index < 0) {
11180
- if (this.noWrap) {
11181
- return;
11182
- }
11183
-
11184
- index = this._wrap(index);
11185
- }
11186
-
11187
- this._cycleTo(index);
11188
- }
11189
-
11190
- /**
11191
- * Cycle to nth item
11192
- * @param {Number} [n]
11193
- * @param {Function} callback
11194
- */
11195
-
11196
- }, {
11197
- key: "set",
11198
- value: function set(n, callback) {
11199
- if (n === undefined || isNaN(n)) {
11200
- n = 0;
11201
- }
11202
-
11203
- if (n > this.count || n < 0) {
11204
- if (this.noWrap) {
11205
- return;
11206
- }
11207
-
11208
- n = this._wrap(n);
11209
- }
11210
-
11211
- this._cycleTo(n, callback);
11212
- }
11213
- }], [{
11214
- key: "init",
11215
- value: function init(els, options) {
11216
- return _get(Carousel.__proto__ || Object.getPrototypeOf(Carousel), "init", this).call(this, this, els, options);
11217
- }
11218
-
11219
- /**
11220
- * Get Instance
11221
- */
11222
-
11223
- }, {
11224
- key: "getInstance",
11225
- value: function getInstance(el) {
11226
- var domElem = !!el.jquery ? el[0] : el;
11227
- return domElem.M_Carousel;
11228
- }
11229
- }, {
11230
- key: "defaults",
11231
- get: function () {
11232
- return _defaults;
11233
- }
11234
- }]);
11235
-
11236
- return Carousel;
11237
- }(Component);
11238
-
11239
- M.Carousel = Carousel;
11240
-
11241
- if (M.jQueryLoaded) {
11242
- M.initializeJqueryWrapper(Carousel, 'carousel', 'M_Carousel');
11243
- }
11244
- })(cash);
11245
- ;(function ($) {
11246
- 'use strict';
11247
-
11248
- var _defaults = {
11249
- onOpen: undefined,
11250
- onClose: undefined
11251
- };
11252
-
11253
- /**
11254
- * @class
11255
- *
11256
- */
11257
-
11258
- var TapTarget = function (_Component19) {
11259
- _inherits(TapTarget, _Component19);
11260
-
11261
- /**
11262
- * Construct TapTarget instance
11263
- * @constructor
11264
- * @param {Element} el
11265
- * @param {Object} options
11266
- */
11267
- function TapTarget(el, options) {
11268
- _classCallCheck(this, TapTarget);
11269
-
11270
- var _this67 = _possibleConstructorReturn(this, (TapTarget.__proto__ || Object.getPrototypeOf(TapTarget)).call(this, TapTarget, el, options));
11271
-
11272
- _this67.el.M_TapTarget = _this67;
11273
-
11274
- /**
11275
- * Options for the select
11276
- * @member TapTarget#options
11277
- * @prop {Function} onOpen - Callback function called when feature discovery is opened
11278
- * @prop {Function} onClose - Callback function called when feature discovery is closed
11279
- */
11280
- _this67.options = $.extend({}, TapTarget.defaults, options);
11281
-
11282
- _this67.isOpen = false;
11283
-
11284
- // setup
11285
- _this67.$origin = $('#' + _this67.$el.attr('data-target'));
11286
- _this67._setup();
11287
-
11288
- _this67._calculatePositioning();
11289
- _this67._setupEventHandlers();
11290
- return _this67;
11291
- }
11292
-
11293
- _createClass(TapTarget, [{
11294
- key: "destroy",
11295
-
11296
-
11297
- /**
11298
- * Teardown component
11299
- */
11300
- value: function destroy() {
11301
- this._removeEventHandlers();
11302
- this.el.TapTarget = undefined;
11303
- }
11304
-
11305
- /**
11306
- * Setup Event Handlers
11307
- */
11308
-
11309
- }, {
11310
- key: "_setupEventHandlers",
11311
- value: function _setupEventHandlers() {
11312
- this._handleDocumentClickBound = this._handleDocumentClick.bind(this);
11313
- this._handleTargetClickBound = this._handleTargetClick.bind(this);
11314
- this._handleOriginClickBound = this._handleOriginClick.bind(this);
11315
-
11316
- this.el.addEventListener('click', this._handleTargetClickBound);
11317
- this.originEl.addEventListener('click', this._handleOriginClickBound);
11318
-
11319
- // Resize
11320
- var throttledResize = M.throttle(this._handleResize, 200);
11321
- this._handleThrottledResizeBound = throttledResize.bind(this);
11322
-
11323
- window.addEventListener('resize', this._handleThrottledResizeBound);
11324
- }
11325
-
11326
- /**
11327
- * Remove Event Handlers
11328
- */
11329
-
11330
- }, {
11331
- key: "_removeEventHandlers",
11332
- value: function _removeEventHandlers() {
11333
- this.el.removeEventListener('click', this._handleTargetClickBound);
11334
- this.originEl.removeEventListener('click', this._handleOriginClickBound);
11335
- window.removeEventListener('resize', this._handleThrottledResizeBound);
11336
- }
11337
-
11338
- /**
11339
- * Handle Target Click
11340
- * @param {Event} e
11341
- */
11342
-
11343
- }, {
11344
- key: "_handleTargetClick",
11345
- value: function _handleTargetClick(e) {
11346
- this.open();
11347
- }
11348
-
11349
- /**
11350
- * Handle Origin Click
11351
- * @param {Event} e
11352
- */
11353
-
11354
- }, {
11355
- key: "_handleOriginClick",
11356
- value: function _handleOriginClick(e) {
11357
- this.close();
11358
- }
11359
-
11360
- /**
11361
- * Handle Resize
11362
- * @param {Event} e
11363
- */
11364
-
11365
- }, {
11366
- key: "_handleResize",
11367
- value: function _handleResize(e) {
11368
- this._calculatePositioning();
11369
- }
11370
-
11371
- /**
11372
- * Handle Resize
11373
- * @param {Event} e
11374
- */
11375
-
11376
- }, {
11377
- key: "_handleDocumentClick",
11378
- value: function _handleDocumentClick(e) {
11379
- if (!$(e.target).closest('.tap-target-wrapper').length) {
11380
- this.close();
11381
- e.preventDefault();
11382
- e.stopPropagation();
11383
- }
11384
- }
11385
-
11386
- /**
11387
- * Setup Tap Target
11388
- */
11389
-
11390
- }, {
11391
- key: "_setup",
11392
- value: function _setup() {
11393
- // Creating tap target
11394
- this.wrapper = this.$el.parent()[0];
11395
- this.waveEl = $(this.wrapper).find('.tap-target-wave')[0];
11396
- this.originEl = $(this.wrapper).find('.tap-target-origin')[0];
11397
- this.contentEl = this.$el.find('.tap-target-content')[0];
11398
-
11399
- // Creating wrapper
11400
- if (!$(this.wrapper).hasClass('.tap-target-wrapper')) {
11401
- this.wrapper = document.createElement('div');
11402
- this.wrapper.classList.add('tap-target-wrapper');
11403
- this.$el.before($(this.wrapper));
11404
- this.wrapper.append(this.el);
11405
- }
11406
-
11407
- // Creating content
11408
- if (!this.contentEl) {
11409
- this.contentEl = document.createElement('div');
11410
- this.contentEl.classList.add('tap-target-content');
11411
- this.$el.append(this.contentEl);
11412
- }
11413
-
11414
- // Creating foreground wave
11415
- if (!this.waveEl) {
11416
- this.waveEl = document.createElement('div');
11417
- this.waveEl.classList.add('tap-target-wave');
11418
-
11419
- // Creating origin
11420
- if (!this.originEl) {
11421
- this.originEl = this.$origin.clone(true, true);
11422
- this.originEl.addClass('tap-target-origin');
11423
- this.originEl.removeAttr('id');
11424
- this.originEl.removeAttr('style');
11425
- this.originEl = this.originEl[0];
11426
- this.waveEl.append(this.originEl);
11427
- }
11428
-
11429
- this.wrapper.append(this.waveEl);
11430
- }
11431
- }
11432
-
11433
- /**
11434
- * Calculate positioning
11435
- */
11436
-
11437
- }, {
11438
- key: "_calculatePositioning",
11439
- value: function _calculatePositioning() {
11440
- // Element or parent is fixed position?
11441
- var isFixed = this.$origin.css('position') === 'fixed';
11442
- if (!isFixed) {
11443
- var parents = this.$origin.parents();
11444
- for (var i = 0; i < parents.length; i++) {
11445
- isFixed = $(parents[i]).css('position') == 'fixed';
11446
- if (isFixed) {
11447
- break;
11448
- }
11449
- }
11450
- }
11451
-
11452
- // Calculating origin
11453
- var originWidth = this.$origin.outerWidth();
11454
- var originHeight = this.$origin.outerHeight();
11455
- var originTop = isFixed ? this.$origin.offset().top - M.getDocumentScrollTop() : this.$origin.offset().top;
11456
- var originLeft = isFixed ? this.$origin.offset().left - M.getDocumentScrollLeft() : this.$origin.offset().left;
11457
-
11458
- // Calculating screen
11459
- var windowWidth = window.innerWidth;
11460
- var windowHeight = window.innerHeight;
11461
- var centerX = windowWidth / 2;
11462
- var centerY = windowHeight / 2;
11463
- var isLeft = originLeft <= centerX;
11464
- var isRight = originLeft > centerX;
11465
- var isTop = originTop <= centerY;
11466
- var isBottom = originTop > centerY;
11467
- var isCenterX = originLeft >= windowWidth * 0.25 && originLeft <= windowWidth * 0.75;
11468
-
11469
- // Calculating tap target
11470
- var tapTargetWidth = this.$el.outerWidth();
11471
- var tapTargetHeight = this.$el.outerHeight();
11472
- var tapTargetTop = originTop + originHeight / 2 - tapTargetHeight / 2;
11473
- var tapTargetLeft = originLeft + originWidth / 2 - tapTargetWidth / 2;
11474
- var tapTargetPosition = isFixed ? 'fixed' : 'absolute';
11475
-
11476
- // Calculating content
11477
- var tapTargetTextWidth = isCenterX ? tapTargetWidth : tapTargetWidth / 2 + originWidth;
11478
- var tapTargetTextHeight = tapTargetHeight / 2;
11479
- var tapTargetTextTop = isTop ? tapTargetHeight / 2 : 0;
11480
- var tapTargetTextBottom = 0;
11481
- var tapTargetTextLeft = isLeft && !isCenterX ? tapTargetWidth / 2 - originWidth : 0;
11482
- var tapTargetTextRight = 0;
11483
- var tapTargetTextPadding = originWidth;
11484
- var tapTargetTextAlign = isBottom ? 'bottom' : 'top';
11485
-
11486
- // Calculating wave
11487
- var tapTargetWaveWidth = originWidth > originHeight ? originWidth * 2 : originWidth * 2;
11488
- var tapTargetWaveHeight = tapTargetWaveWidth;
11489
- var tapTargetWaveTop = tapTargetHeight / 2 - tapTargetWaveHeight / 2;
11490
- var tapTargetWaveLeft = tapTargetWidth / 2 - tapTargetWaveWidth / 2;
11491
-
11492
- // Setting tap target
11493
- var tapTargetWrapperCssObj = {};
11494
- tapTargetWrapperCssObj.top = isTop ? tapTargetTop + 'px' : '';
11495
- tapTargetWrapperCssObj.right = isRight ? windowWidth - tapTargetLeft - tapTargetWidth + 'px' : '';
11496
- tapTargetWrapperCssObj.bottom = isBottom ? windowHeight - tapTargetTop - tapTargetHeight + 'px' : '';
11497
- tapTargetWrapperCssObj.left = isLeft ? tapTargetLeft + 'px' : '';
11498
- tapTargetWrapperCssObj.position = tapTargetPosition;
11499
- $(this.wrapper).css(tapTargetWrapperCssObj);
11500
-
11501
- // Setting content
11502
- $(this.contentEl).css({
11503
- width: tapTargetTextWidth + 'px',
11504
- height: tapTargetTextHeight + 'px',
11505
- top: tapTargetTextTop + 'px',
11506
- right: tapTargetTextRight + 'px',
11507
- bottom: tapTargetTextBottom + 'px',
11508
- left: tapTargetTextLeft + 'px',
11509
- padding: tapTargetTextPadding + 'px',
11510
- verticalAlign: tapTargetTextAlign
11511
- });
11512
-
11513
- // Setting wave
11514
- $(this.waveEl).css({
11515
- top: tapTargetWaveTop + 'px',
11516
- left: tapTargetWaveLeft + 'px',
11517
- width: tapTargetWaveWidth + 'px',
11518
- height: tapTargetWaveHeight + 'px'
11519
- });
11520
- }
11521
-
11522
- /**
11523
- * Open TapTarget
11524
- */
11525
-
11526
- }, {
11527
- key: "open",
11528
- value: function open() {
11529
- if (this.isOpen) {
11530
- return;
11531
- }
11532
-
11533
- // onOpen callback
11534
- if (typeof this.options.onOpen === 'function') {
11535
- this.options.onOpen.call(this, this.$origin[0]);
11536
- }
11537
-
11538
- this.isOpen = true;
11539
- this.wrapper.classList.add('open');
11540
-
11541
- document.body.addEventListener('click', this._handleDocumentClickBound, true);
11542
- document.body.addEventListener('touchend', this._handleDocumentClickBound);
11543
- }
11544
-
11545
- /**
11546
- * Close Tap Target
11547
- */
11548
-
11549
- }, {
11550
- key: "close",
11551
- value: function close() {
11552
- if (!this.isOpen) {
11553
- return;
11554
- }
11555
-
11556
- // onClose callback
11557
- if (typeof this.options.onClose === 'function') {
11558
- this.options.onClose.call(this, this.$origin[0]);
11559
- }
11560
-
11561
- this.isOpen = false;
11562
- this.wrapper.classList.remove('open');
11563
-
11564
- document.body.removeEventListener('click', this._handleDocumentClickBound, true);
11565
- document.body.removeEventListener('touchend', this._handleDocumentClickBound);
11566
- }
11567
- }], [{
11568
- key: "init",
11569
- value: function init(els, options) {
11570
- return _get(TapTarget.__proto__ || Object.getPrototypeOf(TapTarget), "init", this).call(this, this, els, options);
11571
- }
11572
-
11573
- /**
11574
- * Get Instance
11575
- */
11576
-
11577
- }, {
11578
- key: "getInstance",
11579
- value: function getInstance(el) {
11580
- var domElem = !!el.jquery ? el[0] : el;
11581
- return domElem.M_TapTarget;
11582
- }
11583
- }, {
11584
- key: "defaults",
11585
- get: function () {
11586
- return _defaults;
11587
- }
11588
- }]);
11589
-
11590
- return TapTarget;
11591
- }(Component);
11592
-
11593
- M.TapTarget = TapTarget;
11594
-
11595
- if (M.jQueryLoaded) {
11596
- M.initializeJqueryWrapper(TapTarget, 'tapTarget', 'M_TapTarget');
11597
- }
11598
- })(cash);
11599
- ;(function ($) {
11600
- 'use strict';
11601
-
11602
- var _defaults = {
11603
- classes: '',
11604
- dropdownOptions: {}
11605
- };
11606
-
11607
- /**
11608
- * @class
11609
- *
11610
- */
11611
-
11612
- var FormSelect = function (_Component20) {
11613
- _inherits(FormSelect, _Component20);
11614
-
11615
- /**
11616
- * Construct FormSelect instance
11617
- * @constructor
11618
- * @param {Element} el
11619
- * @param {Object} options
11620
- */
11621
- function FormSelect(el, options) {
11622
- _classCallCheck(this, FormSelect);
11623
-
11624
- // Don't init if browser default version
11625
- var _this68 = _possibleConstructorReturn(this, (FormSelect.__proto__ || Object.getPrototypeOf(FormSelect)).call(this, FormSelect, el, options));
11626
-
11627
- if (_this68.$el.hasClass('browser-default')) {
11628
- return _possibleConstructorReturn(_this68);
11629
- }
11630
-
11631
- _this68.el.M_FormSelect = _this68;
11632
-
11633
- /**
11634
- * Options for the select
11635
- * @member FormSelect#options
11636
- */
11637
- _this68.options = $.extend({}, FormSelect.defaults, options);
11638
-
11639
- _this68.isMultiple = _this68.$el.prop('multiple');
11640
-
11641
- // Setup
11642
- _this68.el.tabIndex = -1;
11643
- _this68._keysSelected = {};
11644
- _this68._valueDict = {}; // Maps key to original and generated option element.
11645
- _this68._setupDropdown();
11646
-
11647
- _this68._setupEventHandlers();
11648
- return _this68;
11649
- }
11650
-
11651
- _createClass(FormSelect, [{
11652
- key: "destroy",
11653
-
11654
-
11655
- /**
11656
- * Teardown component
11657
- */
11658
- value: function destroy() {
11659
- this._removeEventHandlers();
11660
- this._removeDropdown();
11661
- this.el.M_FormSelect = undefined;
11662
- }
11663
-
11664
- /**
11665
- * Setup Event Handlers
11666
- */
11667
-
11668
- }, {
11669
- key: "_setupEventHandlers",
11670
- value: function _setupEventHandlers() {
11671
- var _this69 = this;
11672
-
11673
- this._handleSelectChangeBound = this._handleSelectChange.bind(this);
11674
- this._handleOptionClickBound = this._handleOptionClick.bind(this);
11675
- this._handleInputClickBound = this._handleInputClick.bind(this);
11676
-
11677
- $(this.dropdownOptions).find('li:not(.optgroup)').each(function (el) {
11678
- el.addEventListener('click', _this69._handleOptionClickBound);
11679
- });
11680
- this.el.addEventListener('change', this._handleSelectChangeBound);
11681
- this.input.addEventListener('click', this._handleInputClickBound);
11682
- }
11683
-
11684
- /**
11685
- * Remove Event Handlers
11686
- */
11687
-
11688
- }, {
11689
- key: "_removeEventHandlers",
11690
- value: function _removeEventHandlers() {
11691
- var _this70 = this;
11692
-
11693
- $(this.dropdownOptions).find('li:not(.optgroup)').each(function (el) {
11694
- el.removeEventListener('click', _this70._handleOptionClickBound);
11695
- });
11696
- this.el.removeEventListener('change', this._handleSelectChangeBound);
11697
- this.input.removeEventListener('click', this._handleInputClickBound);
11698
- }
11699
-
11700
- /**
11701
- * Handle Select Change
11702
- * @param {Event} e
11703
- */
11704
-
11705
- }, {
11706
- key: "_handleSelectChange",
11707
- value: function _handleSelectChange(e) {
11708
- this._setValueToInput();
11709
- }
11710
-
11711
- /**
11712
- * Handle Option Click
11713
- * @param {Event} e
11714
- */
11715
-
11716
- }, {
11717
- key: "_handleOptionClick",
11718
- value: function _handleOptionClick(e) {
11719
- e.preventDefault();
11720
- var option = $(e.target).closest('li')[0];
11721
- var key = option.id;
11722
- if (!$(option).hasClass('disabled') && !$(option).hasClass('optgroup') && key.length) {
11723
- var selected = true;
11724
-
11725
- if (this.isMultiple) {
11726
- // Deselect placeholder option if still selected.
11727
- var placeholderOption = $(this.dropdownOptions).find('li.disabled.selected');
11728
- if (placeholderOption.length) {
11729
- placeholderOption.removeClass('selected');
11730
- placeholderOption.find('input[type="checkbox"]').prop('checked', false);
11731
- this._toggleEntryFromArray(placeholderOption[0].id);
11732
- }
11733
- selected = this._toggleEntryFromArray(key);
11734
- } else {
11735
- $(this.dropdownOptions).find('li').removeClass('selected');
11736
- $(option).toggleClass('selected', selected);
11737
- }
11738
-
11739
- // Set selected on original select option
11740
- // Only trigger if selected state changed
11741
- var prevSelected = $(this._valueDict[key].el).prop('selected');
11742
- if (prevSelected !== selected) {
11743
- $(this._valueDict[key].el).prop('selected', selected);
11744
- this.$el.trigger('change');
11745
- }
11746
- }
11747
-
11748
- e.stopPropagation();
11749
- }
11750
-
11751
- /**
11752
- * Handle Input Click
11753
- */
11754
-
11755
- }, {
11756
- key: "_handleInputClick",
11757
- value: function _handleInputClick() {
11758
- if (this.dropdown && this.dropdown.isOpen) {
11759
- this._setValueToInput();
11760
- this._setSelectedStates();
11761
- }
11762
- }
11763
-
11764
- /**
11765
- * Setup dropdown
11766
- */
11767
-
11768
- }, {
11769
- key: "_setupDropdown",
11770
- value: function _setupDropdown() {
11771
- var _this71 = this;
11772
-
11773
- this.wrapper = document.createElement('div');
11774
- $(this.wrapper).addClass('select-wrapper ' + this.options.classes);
11775
- this.$el.before($(this.wrapper));
11776
- this.wrapper.appendChild(this.el);
11777
-
11778
- if (this.el.disabled) {
11779
- this.wrapper.classList.add('disabled');
11780
- }
11781
-
11782
- // Create dropdown
11783
- this.$selectOptions = this.$el.children('option, optgroup');
11784
- this.dropdownOptions = document.createElement('ul');
11785
- this.dropdownOptions.id = "select-options-" + M.guid();
11786
- $(this.dropdownOptions).addClass('dropdown-content select-dropdown ' + (this.isMultiple ? 'multiple-select-dropdown' : ''));
11787
-
11788
- // Create dropdown structure.
11789
- if (this.$selectOptions.length) {
11790
- this.$selectOptions.each(function (el) {
11791
- if ($(el).is('option')) {
11792
- // Direct descendant option.
11793
- var optionEl = void 0;
11794
- if (_this71.isMultiple) {
11795
- optionEl = _this71._appendOptionWithIcon(_this71.$el, el, 'multiple');
11796
- } else {
11797
- optionEl = _this71._appendOptionWithIcon(_this71.$el, el);
11798
- }
11799
-
11800
- _this71._addOptionToValueDict(el, optionEl);
11801
- } else if ($(el).is('optgroup')) {
11802
- // Optgroup.
11803
- var selectOptions = $(el).children('option');
11804
- $(_this71.dropdownOptions).append($('<li class="optgroup"><span>' + el.getAttribute('label') + '</span></li>')[0]);
11805
-
11806
- selectOptions.each(function (el) {
11807
- var optionEl = _this71._appendOptionWithIcon(_this71.$el, el, 'optgroup-option');
11808
- _this71._addOptionToValueDict(el, optionEl);
11809
- });
11810
- }
11811
- });
11812
- }
11813
-
11814
- this.$el.after(this.dropdownOptions);
11815
-
11816
- // Add input dropdown
11817
- this.input = document.createElement('input');
11818
- $(this.input).addClass('select-dropdown dropdown-trigger');
11819
- this.input.setAttribute('type', 'text');
11820
- this.input.setAttribute('readonly', 'true');
11821
- this.input.setAttribute('data-target', this.dropdownOptions.id);
11822
- if (this.el.disabled) {
11823
- $(this.input).prop('disabled', 'true');
11824
- }
11825
-
11826
- this.$el.before(this.input);
11827
- this._setValueToInput();
11828
-
11829
- // Add caret
11830
- var dropdownIcon = $('<svg class="caret" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
11831
- this.$el.before(dropdownIcon[0]);
11832
-
11833
- // Initialize dropdown
11834
- if (!this.el.disabled) {
11835
- var dropdownOptions = $.extend({}, this.options.dropdownOptions);
11836
-
11837
- // Add callback for centering selected option when dropdown content is scrollable
11838
- dropdownOptions.onOpenEnd = function (el) {
11839
- var selectedOption = $(_this71.dropdownOptions).find('.selected').first();
11840
-
11841
- if (selectedOption.length) {
11842
- // Focus selected option in dropdown
11843
- M.keyDown = true;
11844
- _this71.dropdown.focusedIndex = selectedOption.index();
11845
- _this71.dropdown._focusFocusedItem();
11846
- M.keyDown = false;
11847
-
11848
- // Handle scrolling to selected option
11849
- if (_this71.dropdown.isScrollable) {
11850
- var scrollOffset = selectedOption[0].getBoundingClientRect().top - _this71.dropdownOptions.getBoundingClientRect().top; // scroll to selected option
11851
- scrollOffset -= _this71.dropdownOptions.clientHeight / 2; // center in dropdown
11852
- _this71.dropdownOptions.scrollTop = scrollOffset;
11853
- }
11854
- }
11855
- };
11856
-
11857
- if (this.isMultiple) {
11858
- dropdownOptions.closeOnClick = false;
11859
- }
11860
- this.dropdown = M.Dropdown.init(this.input, dropdownOptions);
11861
- }
11862
-
11863
- // Add initial selections
11864
- this._setSelectedStates();
11865
- }
11866
-
11867
- /**
11868
- * Add option to value dict
11869
- * @param {Element} el original option element
11870
- * @param {Element} optionEl generated option element
11871
- */
11872
-
11873
- }, {
11874
- key: "_addOptionToValueDict",
11875
- value: function _addOptionToValueDict(el, optionEl) {
11876
- var index = Object.keys(this._valueDict).length;
11877
- var key = this.dropdownOptions.id + index;
11878
- var obj = {};
11879
- optionEl.id = key;
11880
-
11881
- obj.el = el;
11882
- obj.optionEl = optionEl;
11883
- this._valueDict[key] = obj;
11884
- }
11885
-
11886
- /**
11887
- * Remove dropdown
11888
- */
11889
-
11890
- }, {
11891
- key: "_removeDropdown",
11892
- value: function _removeDropdown() {
11893
- $(this.wrapper).find('.caret').remove();
11894
- $(this.input).remove();
11895
- $(this.dropdownOptions).remove();
11896
- $(this.wrapper).before(this.$el);
11897
- $(this.wrapper).remove();
11898
- }
11899
-
11900
- /**
11901
- * Setup dropdown
11902
- * @param {Element} select select element
11903
- * @param {Element} option option element from select
11904
- * @param {String} type
11905
- * @return {Element} option element added
11906
- */
11907
-
11908
- }, {
11909
- key: "_appendOptionWithIcon",
11910
- value: function _appendOptionWithIcon(select, option, type) {
11911
- // Add disabled attr if disabled
11912
- var disabledClass = option.disabled ? 'disabled ' : '';
11913
- var optgroupClass = type === 'optgroup-option' ? 'optgroup-option ' : '';
11914
- var multipleCheckbox = this.isMultiple ? "<label><input type=\"checkbox\"" + disabledClass + "\"/><span>" + option.innerHTML + "</span></label>" : option.innerHTML;
11915
- var liEl = $('<li></li>');
11916
- var spanEl = $('<span></span>');
11917
- spanEl.html(multipleCheckbox);
11918
- liEl.addClass(disabledClass + " " + optgroupClass);
11919
- liEl.append(spanEl);
11920
-
11921
- // add icons
11922
- var iconUrl = option.getAttribute('data-icon');
11923
- if (!!iconUrl) {
11924
- var imgEl = $("<img alt=\"\" src=\"" + iconUrl + "\">");
11925
- liEl.prepend(imgEl);
11926
- }
11927
-
11928
- // Check for multiple type.
11929
- $(this.dropdownOptions).append(liEl[0]);
11930
- return liEl[0];
11931
- }
11932
-
11933
- /**
11934
- * Toggle entry from option
11935
- * @param {String} key Option key
11936
- * @return {Boolean} if entry was added or removed
11937
- */
11938
-
11939
- }, {
11940
- key: "_toggleEntryFromArray",
11941
- value: function _toggleEntryFromArray(key) {
11942
- var notAdded = !this._keysSelected.hasOwnProperty(key);
11943
- var $optionLi = $(this._valueDict[key].optionEl);
11944
-
11945
- if (notAdded) {
11946
- this._keysSelected[key] = true;
11947
- } else {
11948
- delete this._keysSelected[key];
11949
- }
11950
-
11951
- $optionLi.toggleClass('selected', notAdded);
11952
-
11953
- // Set checkbox checked value
11954
- $optionLi.find('input[type="checkbox"]').prop('checked', notAdded);
11955
-
11956
- // use notAdded instead of true (to detect if the option is selected or not)
11957
- $optionLi.prop('selected', notAdded);
11958
-
11959
- return notAdded;
11960
- }
11961
-
11962
- /**
11963
- * Set text value to input
11964
- */
11965
-
11966
- }, {
11967
- key: "_setValueToInput",
11968
- value: function _setValueToInput() {
11969
- var values = [];
11970
- var options = this.$el.find('option');
11971
-
11972
- options.each(function (el) {
11973
- if ($(el).prop('selected')) {
11974
- var text = $(el).text();
11975
- values.push(text);
11976
- }
11977
- });
11978
-
11979
- if (!values.length) {
11980
- var firstDisabled = this.$el.find('option:disabled').eq(0);
11981
- if (firstDisabled.length && firstDisabled[0].value === '') {
11982
- values.push(firstDisabled.text());
11983
- }
11984
- }
11985
-
11986
- this.input.value = values.join(', ');
11987
- }
11988
-
11989
- /**
11990
- * Set selected state of dropdown to match actual select element
11991
- */
11992
-
11993
- }, {
11994
- key: "_setSelectedStates",
11995
- value: function _setSelectedStates() {
11996
- this._keysSelected = {};
11997
-
11998
- for (var key in this._valueDict) {
11999
- var option = this._valueDict[key];
12000
- var optionIsSelected = $(option.el).prop('selected');
12001
- $(option.optionEl).find('input[type="checkbox"]').prop('checked', optionIsSelected);
12002
- if (optionIsSelected) {
12003
- this._activateOption($(this.dropdownOptions), $(option.optionEl));
12004
- this._keysSelected[key] = true;
12005
- } else {
12006
- $(option.optionEl).removeClass('selected');
12007
- }
12008
- }
12009
- }
12010
-
12011
- /**
12012
- * Make option as selected and scroll to selected position
12013
- * @param {jQuery} collection Select options jQuery element
12014
- * @param {Element} newOption element of the new option
12015
- */
12016
-
12017
- }, {
12018
- key: "_activateOption",
12019
- value: function _activateOption(collection, newOption) {
12020
- if (newOption) {
12021
- if (!this.isMultiple) {
12022
- collection.find('li.selected').removeClass('selected');
12023
- }
12024
- var option = $(newOption);
12025
- option.addClass('selected');
12026
- }
12027
- }
12028
-
12029
- /**
12030
- * Get Selected Values
12031
- * @return {Array} Array of selected values
12032
- */
12033
-
12034
- }, {
12035
- key: "getSelectedValues",
12036
- value: function getSelectedValues() {
12037
- var selectedValues = [];
12038
- for (var key in this._keysSelected) {
12039
- selectedValues.push(this._valueDict[key].el.value);
12040
- }
12041
- return selectedValues;
12042
- }
12043
- }], [{
12044
- key: "init",
12045
- value: function init(els, options) {
12046
- return _get(FormSelect.__proto__ || Object.getPrototypeOf(FormSelect), "init", this).call(this, this, els, options);
12047
- }
12048
-
12049
- /**
12050
- * Get Instance
12051
- */
12052
-
12053
- }, {
12054
- key: "getInstance",
12055
- value: function getInstance(el) {
12056
- var domElem = !!el.jquery ? el[0] : el;
12057
- return domElem.M_FormSelect;
12058
- }
12059
- }, {
12060
- key: "defaults",
12061
- get: function () {
12062
- return _defaults;
12063
- }
12064
- }]);
12065
-
12066
- return FormSelect;
12067
- }(Component);
12068
-
12069
- M.FormSelect = FormSelect;
12070
-
12071
- if (M.jQueryLoaded) {
12072
- M.initializeJqueryWrapper(FormSelect, 'formSelect', 'M_FormSelect');
12073
- }
12074
- })(cash);
12075
- ;(function ($, anim) {
12076
- 'use strict';
12077
-
12078
- var _defaults = {};
12079
-
12080
- /**
12081
- * @class
12082
- *
12083
- */
12084
-
12085
- var Range = function (_Component21) {
12086
- _inherits(Range, _Component21);
12087
-
12088
- /**
12089
- * Construct Range instance
12090
- * @constructor
12091
- * @param {Element} el
12092
- * @param {Object} options
12093
- */
12094
- function Range(el, options) {
12095
- _classCallCheck(this, Range);
12096
-
12097
- var _this72 = _possibleConstructorReturn(this, (Range.__proto__ || Object.getPrototypeOf(Range)).call(this, Range, el, options));
12098
-
12099
- _this72.el.M_Range = _this72;
12100
-
12101
- /**
12102
- * Options for the range
12103
- * @member Range#options
12104
- */
12105
- _this72.options = $.extend({}, Range.defaults, options);
12106
-
12107
- _this72._mousedown = false;
12108
-
12109
- // Setup
12110
- _this72._setupThumb();
12111
-
12112
- _this72._setupEventHandlers();
12113
- return _this72;
12114
- }
12115
-
12116
- _createClass(Range, [{
12117
- key: "destroy",
12118
-
12119
-
12120
- /**
12121
- * Teardown component
12122
- */
12123
- value: function destroy() {
12124
- this._removeEventHandlers();
12125
- this._removeThumb();
12126
- this.el.M_Range = undefined;
12127
- }
12128
-
12129
- /**
12130
- * Setup Event Handlers
12131
- */
12132
-
12133
- }, {
12134
- key: "_setupEventHandlers",
12135
- value: function _setupEventHandlers() {
12136
- this._handleRangeChangeBound = this._handleRangeChange.bind(this);
12137
- this._handleRangeMousedownTouchstartBound = this._handleRangeMousedownTouchstart.bind(this);
12138
- this._handleRangeInputMousemoveTouchmoveBound = this._handleRangeInputMousemoveTouchmove.bind(this);
12139
- this._handleRangeMouseupTouchendBound = this._handleRangeMouseupTouchend.bind(this);
12140
- this._handleRangeBlurMouseoutTouchleaveBound = this._handleRangeBlurMouseoutTouchleave.bind(this);
12141
-
12142
- this.el.addEventListener('change', this._handleRangeChangeBound);
12143
-
12144
- this.el.addEventListener('mousedown', this._handleRangeMousedownTouchstartBound);
12145
- this.el.addEventListener('touchstart', this._handleRangeMousedownTouchstartBound);
12146
-
12147
- this.el.addEventListener('input', this._handleRangeInputMousemoveTouchmoveBound);
12148
- this.el.addEventListener('mousemove', this._handleRangeInputMousemoveTouchmoveBound);
12149
- this.el.addEventListener('touchmove', this._handleRangeInputMousemoveTouchmoveBound);
12150
-
12151
- this.el.addEventListener('mouseup', this._handleRangeMouseupTouchendBound);
12152
- this.el.addEventListener('touchend', this._handleRangeMouseupTouchendBound);
12153
-
12154
- this.el.addEventListener('blur', this._handleRangeBlurMouseoutTouchleaveBound);
12155
- this.el.addEventListener('mouseout', this._handleRangeBlurMouseoutTouchleaveBound);
12156
- this.el.addEventListener('touchleave', this._handleRangeBlurMouseoutTouchleaveBound);
12157
- }
12158
-
12159
- /**
12160
- * Remove Event Handlers
12161
- */
12162
-
12163
- }, {
12164
- key: "_removeEventHandlers",
12165
- value: function _removeEventHandlers() {
12166
- this.el.removeEventListener('change', this._handleRangeChangeBound);
12167
-
12168
- this.el.removeEventListener('mousedown', this._handleRangeMousedownTouchstartBound);
12169
- this.el.removeEventListener('touchstart', this._handleRangeMousedownTouchstartBound);
12170
-
12171
- this.el.removeEventListener('input', this._handleRangeInputMousemoveTouchmoveBound);
12172
- this.el.removeEventListener('mousemove', this._handleRangeInputMousemoveTouchmoveBound);
12173
- this.el.removeEventListener('touchmove', this._handleRangeInputMousemoveTouchmoveBound);
12174
-
12175
- this.el.removeEventListener('mouseup', this._handleRangeMouseupTouchendBound);
12176
- this.el.removeEventListener('touchend', this._handleRangeMouseupTouchendBound);
12177
-
12178
- this.el.removeEventListener('blur', this._handleRangeBlurMouseoutTouchleaveBound);
12179
- this.el.removeEventListener('mouseout', this._handleRangeBlurMouseoutTouchleaveBound);
12180
- this.el.removeEventListener('touchleave', this._handleRangeBlurMouseoutTouchleaveBound);
12181
- }
12182
-
12183
- /**
12184
- * Handle Range Change
12185
- * @param {Event} e
12186
- */
12187
-
12188
- }, {
12189
- key: "_handleRangeChange",
12190
- value: function _handleRangeChange() {
12191
- $(this.value).html(this.$el.val());
12192
-
12193
- if (!$(this.thumb).hasClass('active')) {
12194
- this._showRangeBubble();
12195
- }
12196
-
12197
- var offsetLeft = this._calcRangeOffset();
12198
- $(this.thumb).addClass('active').css('left', offsetLeft + 'px');
12199
- }
12200
-
12201
- /**
12202
- * Handle Range Mousedown and Touchstart
12203
- * @param {Event} e
12204
- */
12205
-
12206
- }, {
12207
- key: "_handleRangeMousedownTouchstart",
12208
- value: function _handleRangeMousedownTouchstart(e) {
12209
- // Set indicator value
12210
- $(this.value).html(this.$el.val());
12211
-
12212
- this._mousedown = true;
12213
- this.$el.addClass('active');
12214
-
12215
- if (!$(this.thumb).hasClass('active')) {
12216
- this._showRangeBubble();
12217
- }
12218
-
12219
- if (e.type !== 'input') {
12220
- var offsetLeft = this._calcRangeOffset();
12221
- $(this.thumb).addClass('active').css('left', offsetLeft + 'px');
12222
- }
12223
- }
12224
-
12225
- /**
12226
- * Handle Range Input, Mousemove and Touchmove
12227
- */
12228
-
12229
- }, {
12230
- key: "_handleRangeInputMousemoveTouchmove",
12231
- value: function _handleRangeInputMousemoveTouchmove() {
12232
- if (this._mousedown) {
12233
- if (!$(this.thumb).hasClass('active')) {
12234
- this._showRangeBubble();
12235
- }
12236
-
12237
- var offsetLeft = this._calcRangeOffset();
12238
- $(this.thumb).addClass('active').css('left', offsetLeft + 'px');
12239
- $(this.value).html(this.$el.val());
12240
- }
12241
- }
12242
-
12243
- /**
12244
- * Handle Range Mouseup and Touchend
12245
- */
12246
-
12247
- }, {
12248
- key: "_handleRangeMouseupTouchend",
12249
- value: function _handleRangeMouseupTouchend() {
12250
- this._mousedown = false;
12251
- this.$el.removeClass('active');
12252
- }
12253
-
12254
- /**
12255
- * Handle Range Blur, Mouseout and Touchleave
12256
- */
12257
-
12258
- }, {
12259
- key: "_handleRangeBlurMouseoutTouchleave",
12260
- value: function _handleRangeBlurMouseoutTouchleave() {
12261
- if (!this._mousedown) {
12262
- var paddingLeft = parseInt(this.$el.css('padding-left'));
12263
- var marginLeft = 7 + paddingLeft + 'px';
12264
-
12265
- if ($(this.thumb).hasClass('active')) {
12266
- anim.remove(this.thumb);
12267
- anim({
12268
- targets: this.thumb,
12269
- height: 0,
12270
- width: 0,
12271
- top: 10,
12272
- easing: 'easeOutQuad',
12273
- marginLeft: marginLeft,
12274
- duration: 100
12275
- });
12276
- }
12277
- $(this.thumb).removeClass('active');
12278
- }
12279
- }
12280
-
12281
- /**
12282
- * Setup dropdown
12283
- */
12284
-
12285
- }, {
12286
- key: "_setupThumb",
12287
- value: function _setupThumb() {
12288
- this.thumb = document.createElement('span');
12289
- this.value = document.createElement('span');
12290
- $(this.thumb).addClass('thumb');
12291
- $(this.value).addClass('value');
12292
- $(this.thumb).append(this.value);
12293
- this.$el.after(this.thumb);
12294
- }
12295
-
12296
- /**
12297
- * Remove dropdown
12298
- */
12299
-
12300
- }, {
12301
- key: "_removeThumb",
12302
- value: function _removeThumb() {
12303
- $(this.thumb).remove();
12304
- }
12305
-
12306
- /**
12307
- * morph thumb into bubble
12308
- */
12309
-
12310
- }, {
12311
- key: "_showRangeBubble",
12312
- value: function _showRangeBubble() {
12313
- var paddingLeft = parseInt($(this.thumb).parent().css('padding-left'));
12314
- var marginLeft = -7 + paddingLeft + 'px'; // TODO: fix magic number?
12315
- anim.remove(this.thumb);
12316
- anim({
12317
- targets: this.thumb,
12318
- height: 30,
12319
- width: 30,
12320
- top: -30,
12321
- marginLeft: marginLeft,
12322
- duration: 300,
12323
- easing: 'easeOutQuint'
12324
- });
12325
- }
12326
-
12327
- /**
12328
- * Calculate the offset of the thumb
12329
- * @return {Number} offset in pixels
12330
- */
12331
-
12332
- }, {
12333
- key: "_calcRangeOffset",
12334
- value: function _calcRangeOffset() {
12335
- var width = this.$el.width() - 15;
12336
- var max = parseFloat(this.$el.attr('max')) || 100; // Range default max
12337
- var min = parseFloat(this.$el.attr('min')) || 0; // Range default min
12338
- var percent = (parseFloat(this.$el.val()) - min) / (max - min);
12339
- return percent * width;
12340
- }
12341
- }], [{
12342
- key: "init",
12343
- value: function init(els, options) {
12344
- return _get(Range.__proto__ || Object.getPrototypeOf(Range), "init", this).call(this, this, els, options);
12345
- }
12346
-
12347
- /**
12348
- * Get Instance
12349
- */
12350
-
12351
- }, {
12352
- key: "getInstance",
12353
- value: function getInstance(el) {
12354
- var domElem = !!el.jquery ? el[0] : el;
12355
- return domElem.M_Range;
12356
- }
12357
- }, {
12358
- key: "defaults",
12359
- get: function () {
12360
- return _defaults;
12361
- }
12362
- }]);
12363
-
12364
- return Range;
12365
- }(Component);
12366
-
12367
- M.Range = Range;
12368
-
12369
- if (M.jQueryLoaded) {
12370
- M.initializeJqueryWrapper(Range, 'range', 'M_Range');
12371
- }
12372
-
12373
- Range.init($('input[type=range]'));
12374
- })(cash, M.anime);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/js/xcloner-admin.js DELETED
@@ -1,144 +0,0 @@
1
- export let error_modal;
2
-
3
- document.addEventListener("DOMContentLoaded", function () {
4
- var Modalelem = document.querySelector("#error_modal");
5
- error_modal = M.Modal.init(Modalelem);
6
- });
7
-
8
- (function ($) {
9
- "use strict";
10
-
11
- jQuery(document).ready(function () {
12
- jQuery(".tooltipped").tooltip();
13
- jQuery(".collapsible").collapsible();
14
-
15
- jQuery("span.shorten_string").click(function () {
16
- jQuery(this).toggleClass("full");
17
- doShortText(jQuery(this));
18
- });
19
-
20
- jQuery("span.shorten_string").each(function () {
21
- doShortText(jQuery(this));
22
- });
23
-
24
- jQuery("#xcloner_regex_exclude").on("focus", function () {
25
- jQuery("ul.xcloner_regex_exclude_limit li").fadeIn();
26
- });
27
-
28
- jQuery(".regex_pattern").on("click", function () {
29
- jQuery(this).select();
30
- });
31
-
32
- jQuery(".btn.system_info_toggle").on("click", function () {
33
- jQuery(".additional_system_info").toggle();
34
- });
35
-
36
- jQuery("a.download-logger").on("click", function (e) {
37
- var xcloner_manage_backups = new Xcloner_Manage_Backups();
38
-
39
- var hash = jQuery(this).attr("href");
40
- var id = hash.substr(1);
41
-
42
- if (id) {
43
- xcloner_manage_backups.download_backup_by_name(id);
44
- }
45
-
46
- e.preventDefault();
47
- });
48
-
49
- jQuery(".nav-tab-wrapper.content li").on("click", function (e) {
50
- jQuery(".nav-tab-wrapper li a").removeClass("nav-tab-active");
51
- jQuery(this).find("a").addClass("nav-tab-active");
52
- jQuery(".nav-tab-wrapper-content .tab-content").removeClass("active");
53
- jQuery(
54
- ".nav-tab-wrapper-content " + jQuery(this).find("a").attr("href")
55
- ).addClass("active");
56
-
57
- e.preventDefault();
58
-
59
- location.hash = jQuery(this).find("a").attr("href") + "_hash";
60
- });
61
-
62
- var hash = window.location.hash;
63
- if (hash) {
64
- next_tab(hash.replace("_hash", ""));
65
- }
66
- });
67
- })(jQuery);
68
-
69
- //jQuery( document ).ajaxError(function(err, request) {
70
- //show_ajax_error("dd", "dd12", request)
71
- //});
72
-
73
- export const next_tab = function (hash) {
74
- jQuery(".nav-tab-wrapper")
75
- .find("li a[href='" + hash + "']")
76
- .trigger("click");
77
- location.hash = hash;
78
- };
79
-
80
- export const doShortText = function (elem) {
81
- if (elem.hasClass("full")) {
82
- elem.text(elem.attr("data-text"));
83
- return;
84
- }
85
- var text = elem.text();
86
- var text_lenght = text.length;
87
- var first = text.substr(0, 10);
88
- var last = text.substr(text_lenght - 20, text_lenght);
89
-
90
- elem.attr("data-text", text).text(first + "..." + last);
91
- };
92
-
93
- /** global: xcloner_backup */
94
- export const show_ajax_error = function (title, msg, json) {
95
- //var json = jQuery.parseJSON( body )
96
-
97
- if (typeof xcloner_backup !== "undefined") {
98
- xcloner_backup.cancel_backup();
99
- }
100
-
101
- if (json && json.responseText !== undefined) {
102
- msg = msg + ": " + json.responseText;
103
- }
104
-
105
- jQuery("#error_modal .title").text(title);
106
- jQuery("#error_modal .msg").text(msg);
107
-
108
- if (json && json.status) {
109
- jQuery("#error_modal .status").text(json.status + " " + json.statusText);
110
- }
111
-
112
- jQuery("#error_modal .body").text(JSON.stringify(json));
113
- //var error_modal = jQuery("#error_modal").modal();
114
- error_modal.open();
115
- };
116
-
117
- export const ID = function () {
118
- // Math.random should be unique because of its seeding algorithm.
119
- // Convert it to base 36 (numbers + letters), and grab the first 9 characters
120
- // after the decimal.
121
- return "_" + Math.random().toString(36).substr(2, 9);
122
- };
123
-
124
- export const getUrlParam = function (name) {
125
- return (location.search.split(name + "=")[1] || "").split("&")[0];
126
- };
127
-
128
- import { Xcloner_Remote_Storage } from "./xcloner-remote-storage-class";
129
- import { Xcloner_Backup } from "./xcloner-backup-class";
130
- import { Xcloner_Manage_Backups } from "./xcloner-manage-backups-class";
131
-
132
- jQuery(document).ready(function () {
133
- // define global variables
134
- window.remote_storage = new Xcloner_Remote_Storage();
135
- window.xcloner_backup = new Xcloner_Backup();
136
- window.xcloner_manage_backups = new Xcloner_Manage_Backups();
137
-
138
- window.ID = ID;
139
- window.getUrlParam = getUrlParam;
140
- window.show_ajax_error = show_ajax_error;
141
- window.doShortText = doShortText;
142
- window.dataTable = null;
143
- window.next_tab = next_tab;
144
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/js/xcloner-backup-class.js DELETED
@@ -1,620 +0,0 @@
1
-
2
- export class Xcloner_Backup {
3
- constructor() {
4
- this.cancel = 0;
5
- this.params = {};
6
- this.last_dumpfile = "";
7
- this.last_backup_file = "";
8
- this.backup_part = 0;
9
- this.backup_size_total = 0;
10
- this.resume = {};
11
- }
12
-
13
- get_form_params() {
14
- var table_params = [];
15
- var files_params = [];
16
- var extra = [];
17
-
18
- jQuery.each(
19
- jQuery("#jstree_database_container").jstree("get_checked", true),
20
- function () {
21
- var object = {};
22
- object.id = this.id;
23
- object.parent = this.parent;
24
-
25
- var index = table_params.length;
26
- table_params[index] = object;
27
- }
28
- );
29
-
30
- jQuery.each(
31
- jQuery("#jstree_files_container").jstree("get_checked", true),
32
- function () {
33
- //console.log(this.id+"-"+this.parent);
34
-
35
- var object = {};
36
- object.id = this.id;
37
- object.parent = this.parent;
38
-
39
- var index = files_params.length;
40
- files_params[index] = object;
41
- }
42
- );
43
-
44
- var $return = {};
45
- $return.table_params = table_params;
46
- $return.files_params = files_params;
47
- $return.backup_params = jQuery("#generate_backup_form").serializeArray();
48
-
49
- return $return;
50
- }
51
-
52
- do_backup_database_callback(elem, action, json) {
53
- if (json.extra) this.params.extra = json.extra;
54
-
55
- if (json.extra.stats) {
56
- if (json.extra.stats.tables_count !== undefined) {
57
- jQuery(elem)
58
- .find(".table-counter")
59
- .text(parseInt(json.extra.stats.tables_count));
60
- }
61
-
62
- if (json.extra.stats.database_count !== undefined) {
63
- jQuery(elem)
64
- .find(".database-counter")
65
- .text(parseInt(json.extra.stats.database_count));
66
- }
67
-
68
- if (json.extra.stats.total_records !== undefined) {
69
- jQuery(elem)
70
- .find(".total-records")
71
- .text(parseInt(json.extra.stats.total_records));
72
- }
73
- }
74
-
75
- if (json.extra.tableName) {
76
- jQuery(elem)
77
- .find(".last-logged-table")
78
- .text(
79
- json.extra.databaseName +
80
- "." +
81
- json.extra.tableName +
82
- " (" +
83
- json.extra.processedRecords +
84
- " records)"
85
- );
86
- }
87
-
88
- if (
89
- json.extra.processedRecords !== undefined &&
90
- !json.extra.startAtRecord &&
91
- !json.extra.endDump
92
- ) {
93
- var records =
94
- parseInt(jQuery(elem).find(".total-records").attr("data-processed")) +
95
- parseInt(json.extra.processedRecords);
96
-
97
- var percent =
98
- (100 * parseInt(records)) /
99
- parseInt(jQuery(elem).find(".total-records").text());
100
- jQuery(elem)
101
- .find(".progress .determinate")
102
- .css("width", percent + "%");
103
-
104
- jQuery(elem).find(".total-records").attr("data-processed", records);
105
- jQuery(elem)
106
- .find(".status-body ul.logged-tables")
107
- .prepend(
108
- jQuery("<li>").text(
109
- json.extra.databaseName +
110
- "." +
111
- json.extra.tableName +
112
- " (" +
113
- json.extra.processedRecords +
114
- " records)"
115
- )
116
- );
117
- }
118
-
119
- if (json.extra.dumpfile !== undefined) {
120
- var db_text =
121
- json.extra.dumpfile +
122
- " (" +
123
- this.getSize(json.extra.dumpsize, 1024) +
124
- " KB)";
125
-
126
- if (!jQuery(this.last_dumpfile).hasClass(json.extra.dumpfile)) {
127
- this.last_dumpfile = jQuery("<li>")
128
- .addClass(json.extra.dumpfile)
129
- .html(db_text)
130
- .prependTo("ul.logged-databases");
131
- } else {
132
- jQuery(this.last_dumpfile).html(db_text);
133
- }
134
- }
135
-
136
- if (!json.finished /*&& !this.cancel*/) {
137
- this.do_ajax(elem, action);
138
- return false;
139
- }
140
-
141
- jQuery(elem).find(".last-logged-table").text("done");
142
- jQuery(elem).find(".progress .determinate").css("width", "100%");
143
-
144
- this.do_backup_files();
145
- }
146
-
147
- do_backup_database() {
148
- if (!jQuery("#jstree_database_container").length) {
149
- this.do_backup_files();
150
- return;
151
- }
152
-
153
- /*if(this.cancel)
154
- return false;*/
155
-
156
- var elem = "#generate_backup ul.backup-status li.database-backup";
157
- jQuery(elem).show();
158
- //jQuery(elem + ' .status-body').show();
159
-
160
- jQuery(elem).find(".collapsible-header").trigger("click");
161
-
162
- jQuery(elem).find(".total-records").text(0);
163
- jQuery(elem).find(".total-records").attr("data-processed", 0);
164
- jQuery(elem).find(".table-counter").text(0);
165
- jQuery(elem).find(".database-counter").text(0);
166
- jQuery(elem).find(".logged-databases").html("");
167
- jQuery(elem).find(".logged-tables").html("");
168
-
169
- this.last_dumpfile = 0;
170
-
171
- jQuery(elem).find(".progress .determinate").css("width", "0%");
172
-
173
- this.do_ajax(elem, "backup_database", 1);
174
- }
175
-
176
- do_scan_filesystem_callback(elem, action, json) {
177
- if (json.total_files_num) {
178
- jQuery(".file-system .file-counter").text(
179
- parseInt(json.total_files_num) +
180
- parseInt(jQuery(".file-system .file-counter").text())
181
- );
182
- }
183
-
184
- if (json.total_files_size) {
185
- var size =
186
- parseFloat(json.total_files_size) +
187
- parseFloat(jQuery(".file-system .file-size-total").text());
188
- jQuery(".file-system .file-size-total").text(size.toFixed(2));
189
- }
190
-
191
- if (json.last_logged_file) {
192
- jQuery(".file-system .last-logged-file").text(json.last_logged_file);
193
- }
194
-
195
- if (!json.finished /*&& !this.cancel*/) {
196
- this.do_ajax(elem, action);
197
- return false;
198
- }
199
-
200
- //finished
201
- jQuery(elem)
202
- .find(".progress .indeterminate")
203
- .removeClass("indeterminate")
204
- .addClass("determinate")
205
- .css("width", "100%");
206
- jQuery(".file-system .last-logged-file").text("done");
207
-
208
- //this.do_backup_database();
209
- this.do_backup_database();
210
- }
211
-
212
- do_scan_filesystem() {
213
- /*if(this.cancel)
214
- return false;*/
215
-
216
- var elem = "#generate_backup ul.backup-status li.file-system";
217
- jQuery(elem).show();
218
- jQuery(elem + " .status-body").show();
219
- jQuery(elem).find(".collapsible-header").trigger("click");
220
-
221
- jQuery(".file-system .file-counter").text(0);
222
- jQuery(".file-system .last-logged-file").text("");
223
- jQuery(".file-system .file-size-total").text(0);
224
- jQuery(".file-system .progress div")
225
- .removeClass("determinate")
226
- .addClass("indeterminate")
227
- .css("width", "0%");
228
-
229
- this.do_ajax(elem, "scan_filesystem", 1);
230
- }
231
-
232
- do_backup_files_callback(elem, action, json) {
233
- /*if(this.cancel)
234
- return false;*/
235
-
236
- if (json.extra) {
237
- this.params.extra = json.extra;
238
- }
239
-
240
- if (json.extra) {
241
- if (json.extra.start_at_line !== undefined) {
242
- jQuery(elem)
243
- .find(".file-counter")
244
- .text(parseInt(json.extra.start_at_line));
245
- }
246
-
247
- if (json.extra.start_at_line !== undefined) {
248
- //var prev_backup_size = parseInt(jQuery(elem).find(".file-size-total").attr('data-processed'));
249
- jQuery(elem)
250
- .find(".file-size-total")
251
- .text(
252
- this.getSize(
253
- this.backup_size_total + parseInt(json.extra.backup_size)
254
- )
255
- );
256
- //var backup_size = parseInt(json.extra.backup_size);
257
- }
258
- }
259
-
260
- if (json.extra.processed_file) {
261
- if (json.extra.start_at_byte !== undefined && json.extra.start_at_byte) {
262
- var processed_size = json.extra.start_at_byte;
263
- } else {
264
- var processed_size = json.extra.processed_file_size;
265
- }
266
-
267
- jQuery(elem)
268
- .find(".last-logged-file")
269
- .text(
270
- json.extra.processed_file +
271
- " (" +
272
- this.getSize(processed_size, 1024) +
273
- " KB)"
274
- );
275
- }
276
-
277
- if (json.extra.processed_file !== undefined) {
278
- var backup_text =
279
- json.extra.backup_archive_name_full +
280
- " (" +
281
- this.getSize(json.extra.backup_size) +
282
- ") MB";
283
-
284
- if (this.backup_part != json.extra.backup_part) {
285
- this.backup_part = json.extra.backup_part;
286
- this.backup_size_total =
287
- this.backup_size_total + json.extra.backup_size;
288
- }
289
-
290
- if (
291
- !jQuery(this.last_backup_file).hasClass(json.extra.backup_archive_name)
292
- ) {
293
- this.last_backup_file = jQuery("<li>")
294
- .addClass(json.extra.backup_archive_name)
295
- .html(backup_text)
296
- .prependTo(jQuery(elem).find(".status-body .backup-name"));
297
- }
298
-
299
- jQuery(this.last_backup_file).html(backup_text);
300
- }
301
-
302
- if (json.extra.lines_total) {
303
- var percent =
304
- (100 * parseInt(json.extra.start_at_line)) /
305
- parseInt(json.extra.lines_total);
306
- jQuery(elem)
307
- .find(".progress .determinate")
308
- .css("width", percent + "%");
309
- }
310
-
311
- if (!json.finished /*&& !this.cancel*/) {
312
- this.do_ajax(elem, action);
313
- return false;
314
- }
315
-
316
- jQuery(elem).find(".last-logged-file").text("done");
317
- jQuery(".backup-done .cloud-upload").attr(
318
- "href",
319
- "#" + json.extra.backup_parent
320
- );
321
- jQuery(".backup-done .download").attr(
322
- "href",
323
- "#" + json.extra.backup_parent
324
- );
325
- jQuery(".backup-done .list-backup-content").attr(
326
- "href",
327
- "#" + json.extra.backup_parent
328
- );
329
-
330
- //if (jQuery("#backup_options #backup_encrypt").is(":checked")) {
331
- if (this.do_backup_encryption()) {
332
- return;
333
- }
334
-
335
- if (this.do_remote_storage_upload(json.extra.backup_parent)) {
336
- return;
337
- }
338
-
339
- //this.restart_backup();
340
- this.do_backup_done(json.extra.backup_parent);
341
- }
342
-
343
- do_backup_files() {
344
- if (this.cancel) return false;
345
-
346
- var elem = "#generate_backup ul.backup-status li.files-backup";
347
- jQuery(elem).show();
348
- jQuery(elem + " .status-body").show();
349
- jQuery(elem).find(".collapsible-header").trigger("click");
350
-
351
- jQuery(elem).find(".file-size-total").text(0);
352
- jQuery(elem).find(".file-size-total").attr("data-processed", 0);
353
- jQuery(elem).find(".file-counter").text(0);
354
- jQuery(elem).find(".last-logged-file").text("");
355
-
356
- jQuery(elem).find(".progress .determinate").css("width", "0%");
357
-
358
- this.do_ajax(elem, "backup_files", 1);
359
- }
360
-
361
- do_backup_encryption_callback(elem, action, response) {
362
- if (response.extra) {
363
- this.params.extra = response.extra;
364
- }
365
-
366
- jQuery(".backup-encryption .last-logged-file").text(
367
- "encrypting " + response.processing_file + " ..."
368
- );
369
-
370
- if (response.total_size !== undefined) {
371
- jQuery(".backup-encryption .progress > div")
372
- .removeClass("indeterminate")
373
- .addClass("determinate");
374
- var percent =
375
- parseInt(response.start * 100) / parseInt(response.total_size);
376
- jQuery(".backup-encryption .progress .determinate").css(
377
- "width",
378
- parseInt(percent) + "%"
379
- );
380
- }
381
-
382
- if (response.error) {
383
- jQuery(".backup-encryption .status-body").show();
384
- jQuery(".backup-encryption .status-body")
385
- .addClass("error")
386
- .prepend(response.message + " ");
387
- jQuery(".backup-encryption .progress > div")
388
- .addClass("determinate")
389
- .removeClass("indeterminate")
390
- .css("width", "100%");
391
- return;
392
- }
393
-
394
- if (!response.finished /*&& !this.cancel*/) {
395
- this.do_ajax(elem, action);
396
- return false;
397
- }
398
-
399
- //finished
400
- jQuery(elem).find(".progress > div").css("width", "100%");
401
- jQuery(".backup-encryption .last-logged-file").text("done");
402
-
403
- //this.do_backup_database();
404
- if (this.do_remote_storage_upload(response.processing_file)) {
405
- return;
406
- }
407
-
408
- this.do_backup_done(response.processing_file);
409
- }
410
-
411
- do_backup_encryption() {
412
- if (this.cancel) {
413
- return false;
414
- }
415
-
416
- if (!jQuery("#backup_options #backup_encrypt").is(":checked")) {
417
- return false;
418
- }
419
-
420
- var elem = "#generate_backup ul.backup-status li.backup-encryption";
421
- jQuery(elem).show();
422
- jQuery(elem + " .status-body").show();
423
- jQuery(elem).find(".collapsible-header").trigger("click");
424
-
425
- jQuery(elem).find(".progress .determinate").removeClass('determinate').addClass('indeterminate');
426
-
427
- this.do_ajax(elem, "backup_encryption", 1);
428
-
429
- return true;
430
- }
431
-
432
- do_upload_backup_to_remote_callback(elem, action, response) {
433
-
434
- if(!response || response.error) {
435
- jQuery(elem).find('.status').text(response.message);
436
- jQuery(elem).find(".progress .indeterminate").removeClass('indeterminate').addClass('determinate').css("width", "0%");
437
- }else{
438
- jQuery(elem).find('.status').text('done');
439
- jQuery(elem).find(".progress .indeterminate").removeClass('indeterminate').addClass('determinate').css("width", "100%");
440
- }
441
-
442
- this.do_backup_done();
443
- }
444
-
445
- do_remote_storage_upload(backup_name) {
446
- if (this.cancel) {
447
- return false;
448
- }
449
-
450
- var remote_storage = jQuery("#schedule_storage").val();
451
-
452
- if (!remote_storage) {
453
- return false;
454
- }
455
-
456
- var delete_backup_after_transfer = Number(
457
- jQuery("#backup_delete_after_remote_transfer").is(":checked")
458
- );
459
-
460
- jQuery("#remote_storage_modal #transfer_storage").val(remote_storage);
461
-
462
- var elem = "#generate_backup ul.backup-status li.remote-storage-transfer";
463
- jQuery(elem).show();
464
- jQuery(elem + " .status-body").show();
465
- jQuery(elem).find(".collapsible-header").trigger("click");
466
-
467
- jQuery(elem).find(".progress .determinate").removeClass('determinate').addClass('indeterminate');
468
-
469
- this.params.file =backup_name;
470
- this.params.storage_type= remote_storage;
471
- this.params.delete_after_transfer= delete_backup_after_transfer;
472
-
473
- this.do_ajax(elem, "upload_backup_to_remote", 1);
474
-
475
- return true;
476
- }
477
-
478
- do_backup_done(backup_name) {
479
- var elem = "#generate_backup ul.backup-status li.backup-done";
480
- jQuery(elem).show();
481
- jQuery(elem + " .status-body").show();
482
- jQuery(elem).find(".collapsible-header").trigger("click");
483
-
484
- this.set_cancel(false);
485
- jQuery("#generate_backup .action-buttons a").hide();
486
- jQuery("#generate_backup .action-buttons .start").css(
487
- "display",
488
- "inline-block"
489
- );
490
- }
491
-
492
- do_save_schedule_callback(elem, action, json) {
493
- jQuery("#schedule_backup_success").show();
494
- }
495
-
496
- cancel_backup() {
497
- this.set_cancel(true);
498
- jQuery("#generate_backup .action-buttons a").hide();
499
- jQuery("#generate_backup .action-buttons .start").css(
500
- "display",
501
- "inline-block"
502
- );
503
- jQuery("#generate_backup .action-buttons .restart").css(
504
- "display",
505
- "inline-block"
506
- );
507
-
508
- //this.restart_backup();
509
- }
510
-
511
- restart_backup() {
512
- this.set_cancel(false);
513
-
514
- jQuery("#generate_backup .action-buttons a").hide();
515
- jQuery("#generate_backup .action-buttons .cancel").css(
516
- "display",
517
- "inline-block"
518
- );
519
-
520
- if (this.resume.action) {
521
- //console.log(this.resume.action)
522
- this.do_ajax(this.resume.elem, this.resume.action, this.resume.params);
523
- this.resume = {};
524
- return;
525
- }
526
-
527
- this.start_backup();
528
- }
529
-
530
- start_backup() {
531
- this.resume = {};
532
- this.set_cancel(false);
533
- jQuery("#generate_backup .action-buttons a").hide();
534
- jQuery("#generate_backup .action-buttons .cancel").css(
535
- "display",
536
- "inline-block"
537
- );
538
-
539
- this.backup_size_total = 0;
540
- this.last_backup_file = "";
541
- this.backup_part = 0;
542
- jQuery("#generate_backup ul.backup-name li").remove();
543
-
544
- jQuery("#generate_backup ul.backup-status > li").hide();
545
- jQuery("#generate_backup .backup-status").show();
546
-
547
- this.params = this.get_form_params();
548
-
549
- this.do_scan_filesystem();
550
- }
551
-
552
- set_cancel(status) {
553
- if (status) {
554
- //document.dispatchEvent(new CustomEvent("xcloner_restore_update_progress", {detail: {percent: 0, class: 'determinate' }}));
555
- //jQuery("#generate_backup .collapsible-header.active .progress > div").add
556
- }
557
- this.cancel = status;
558
- }
559
-
560
- get_cancel(status) {
561
- return this.cancel;
562
- }
563
-
564
- init_resume(elem, action, init) {
565
- this.resume.elem = elem;
566
- this.resume.action = action;
567
- this.resume.init = init;
568
- }
569
-
570
- /** global: XCLONER_AJAXURL */
571
- do_ajax(elem, action, init = 0) {
572
-
573
- let hash = !this.params.hash ? 'generate_hash' : this.params.hash;
574
-
575
- if (this.cancel == true) {
576
- this.init_resume(elem, action, init);
577
- return;
578
- }
579
-
580
- var callback = "do_" + action + "_callback";
581
- var data = JSON.stringify(this.params);
582
- var $this = this;
583
-
584
- jQuery
585
- .ajax({
586
- url: XCLONER_AJAXURL,
587
- dataType: "json",
588
- type: "POST",
589
- data: {
590
- action: action,
591
- data: data,
592
- init: init,
593
- hash: hash,
594
- API_ID: ID(),
595
- },
596
- error: function (err) {
597
- show_ajax_error("Communication Error", "", err);
598
- $this.init_resume(elem, action, init);
599
- },
600
- })
601
- .done(function (json) {
602
- if (json.hash) {
603
- $this.params.hash = json.hash;
604
- }
605
- if (json.error !== undefined) {
606
- show_ajax_error("Communication Error", "", json.error_message);
607
- $this.init_resume(elem, action, init);
608
- return;
609
- }
610
-
611
- $this.resume = {};
612
-
613
- $this[callback](elem, action, json);
614
- });
615
- }
616
-
617
- getSize(bytes, conv = 1024 * 1024) {
618
- return (bytes / conv).toFixed(2);
619
- }
620
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/js/xcloner-manage-backups-class.js DELETED
@@ -1,484 +0,0 @@
1
- /** global: XCLONER_AJAXURL */
2
- /** global: Materialize */
3
- import {getUrlParam} from './xcloner-admin.js';
4
-
5
- var backup_cotent_modal;
6
- var backup_encryption_modal;
7
- var backup_decryption_modal;
8
- var remote_storage_modal;
9
- var local_storage_upload_modal;
10
-
11
- document.addEventListener("DOMContentLoaded", function () {
12
- var Modalelem = document.querySelector("#backup_cotent_modal");
13
- backup_cotent_modal = M.Modal.init(Modalelem);
14
-
15
- var Modalelem = document.querySelector("#backup_encryption_modal");
16
- backup_encryption_modal = M.Modal.init(Modalelem);
17
-
18
- var Modalelem = document.querySelector("#backup_decryption_modal");
19
- backup_decryption_modal = M.Modal.init(Modalelem);
20
-
21
- var Modalelem = document.querySelector("#remote_storage_modal");
22
- remote_storage_modal = M.Modal.init(Modalelem);
23
-
24
- var Modalelem = document.querySelector("#local_storage_upload_modal");
25
- local_storage_upload_modal = M.Modal.init(Modalelem);
26
-
27
- });
28
-
29
- export class Xcloner_Manage_Backups {
30
- constructor() {
31
- this.file_counter = 0;
32
- this.storage_selection = "";
33
- this.dataTable = "";
34
- //this.edit_modal = jQuery('.modal').modal();
35
- }
36
-
37
- download_backup_by_name(id) {
38
- window.open(XCLONER_AJAXURL + "&action=download_backup_by_name&name=" + id+"&storage_selection="+this.storage_selection);
39
- return false;
40
- }
41
-
42
- delete_backup_by_name(id, elem, dataTable) {
43
- var $this = this;
44
-
45
- if (id) {
46
- jQuery.ajax({
47
- url: XCLONER_AJAXURL,
48
- method: "post",
49
- data: {
50
- action: "delete_backup_by_name",
51
- name: id,
52
- storage_selection: this.storage_selection,
53
- },
54
- success: function (response) {
55
- if (response.finished) {
56
- dataTable.row(jQuery(elem).parents("tr")).remove().draw();
57
- } else {
58
- alert("There was an error deleting the file");
59
- }
60
- },
61
- dataType: "json",
62
- });
63
- }
64
- }
65
-
66
- list_backup_content_callback(backup_file, start = 0, part = 0) {
67
- var $this = this;
68
-
69
- if (backup_file) {
70
- jQuery.ajax({
71
- url: XCLONER_AJAXURL,
72
- method: "post",
73
- data: {
74
- action: "list_backup_files",
75
- file: backup_file,
76
- start: start,
77
- part: part,
78
- },
79
- success: function (response) {
80
- if (response.error) {
81
- jQuery("#backup_cotent_modal .files-list")
82
- .addClass("error")
83
- .prepend(response.message);
84
- jQuery("#backup_cotent_modal .progress > div")
85
- .addClass("determinate")
86
- .removeClass(".indeterminate")
87
- .css("width", "100%");
88
- return;
89
- }
90
-
91
- var files_text = [];
92
-
93
- for (var i in response.files) {
94
- if (response.total_size !== undefined) {
95
- var percent =
96
- parseInt(response.start * 100) / parseInt(response.total_size);
97
- //jQuery("#backup_cotent_modal .progress .determinate").css('width', percent + "%")
98
- }
99
-
100
- $this.file_counter++;
101
-
102
- files_text[i] =
103
- "<li>" +
104
- ($this.file_counter +
105
- ". <span title='" +
106
- response.files[i].mtime +
107
- "'>" +
108
- response.files[i].path +
109
- "</span> (" +
110
- response.files[i].size +
111
- " bytes)") +
112
- "</li>";
113
- }
114
-
115
- jQuery("#backup_cotent_modal .modal-content .files-list").prepend(
116
- files_text.reverse().join("\n")
117
- );
118
-
119
- if (
120
- !response.finished &&
121
- jQuery("#backup_cotent_modal").is(":visible")
122
- ) {
123
- $this.list_backup_content_callback(
124
- backup_file,
125
- response.start,
126
- response.part
127
- );
128
- } else {
129
- jQuery("#backup_cotent_modal .progress > div")
130
- .addClass("determinate")
131
- .removeClass(".indeterminate")
132
- .css("width", "100%");
133
- }
134
- },
135
- error: function (xhr, textStatus, error) {
136
- jQuery("#backup_cotent_modal .files-list")
137
- .addClass("error")
138
- .prepend(textStatus + error);
139
- },
140
- dataType: "json",
141
- });
142
- }
143
- }
144
-
145
- list_backup_content(backup_file) {
146
- this.file_counter = 0;
147
- jQuery("#backup_cotent_modal .modal-content .files-list")
148
- .text("")
149
- .removeClass("error");
150
- jQuery("#backup_cotent_modal .modal-content .backup-name").text(
151
- backup_file
152
- );
153
- backup_cotent_modal.open();
154
- jQuery("#backup_cotent_modal .progress > div")
155
- .removeClass("determinate")
156
- .addClass("indeterminate");
157
-
158
- this.list_backup_content_callback(backup_file);
159
- }
160
-
161
- backup_encryption_callback(backup_file, start = 0, part = 0, iv = 0) {
162
- var $this = this;
163
-
164
- if (backup_file) {
165
- jQuery.ajax({
166
- url: XCLONER_AJAXURL,
167
- method: "post",
168
- data: {
169
- action: "backup_encryption",
170
- file: backup_file,
171
- start: start,
172
- part: part,
173
- iv: iv,
174
- },
175
- success: function (response) {
176
- if (response.total_size !== undefined) {
177
- jQuery("#backup_encryption_modal .progress > div")
178
- .removeClass("indeterminate")
179
- .addClass("determinate");
180
- var percent =
181
- parseInt(response.start * 100) / parseInt(response.total_size);
182
- jQuery("#backup_encryption_modal .progress .determinate").css(
183
- "width",
184
- parseInt(percent) + "%"
185
- );
186
- jQuery("#backup_encryption_modal .modal-content .files-list").text(
187
- "Encrypting " +
188
- response.processing_file +
189
- " " +
190
- parseInt(percent) +
191
- "%"
192
- );
193
- }
194
-
195
- if (response.error) {
196
- jQuery("#backup_encryption_modal .notice").show();
197
- jQuery("#backup_encryption_modal .files-list")
198
- .addClass("error")
199
- .prepend(response.message + " ");
200
- jQuery("#backup_encryption_modal .progress > div")
201
- .addClass("determinate")
202
- .removeClass("indeterminate")
203
- .css("width", "100%");
204
- return;
205
- }
206
-
207
- if (
208
- !response.finished &&
209
- jQuery("#backup_encryption_modal").is(":visible")
210
- ) {
211
- $this.backup_encryption_callback(
212
- backup_file,
213
- response.start,
214
- response.part,
215
- response.iv
216
- );
217
- } else {
218
- jQuery("#backup_encryption_modal .progress > div")
219
- .addClass("determinate")
220
- .removeClass("indeterminate")
221
- .css("width", "100%");
222
- jQuery("#backup_encryption_modal .modal-content .files-list").text(
223
- "Done Encrypting."
224
- );
225
- dataTable.ajax.reload();
226
- }
227
- },
228
- error: function (xhr, textStatus, error) {
229
- jQuery("#backup_encryption_modal .files-list")
230
- .addClass("error")
231
- .prepend(textStatus + error);
232
- },
233
- dataType: "json",
234
- });
235
- }
236
- }
237
-
238
- backup_encryption(backup_file, start = 0) {
239
- this.file_counter = 0;
240
-
241
- jQuery("#backup_encryption_modal .modal-content .backup-name").text(
242
- backup_file
243
- );
244
- backup_encryption_modal.open();
245
- jQuery("#backup_encryption_modal .progress > div");
246
- jQuery("#backup_encryption_modal .notice").show();
247
-
248
- jQuery("#backup_encryption_modal a.btn").attr(
249
- "onclick",
250
- "xcloner_manage_backups.backup_encryption('" +
251
- backup_file +
252
- "', true)"
253
- );
254
- jQuery("#backup_encryption_modal .modal-content .files-list")
255
- .text("")
256
- .removeClass("error");
257
-
258
- if (start) {
259
- jQuery("#backup_encryption_modal .notice").hide();
260
- this.backup_encryption_callback(backup_file);
261
- }
262
- }
263
-
264
- backup_decryption_callback(backup_file, start = 0, part = 0, iv = 0) {
265
- var $this = this;
266
-
267
- var decryption_key = jQuery(
268
- "#backup_decryption_modal #decryption_key"
269
- ).val();
270
-
271
- if (backup_file) {
272
- jQuery.ajax({
273
- url: XCLONER_AJAXURL,
274
- method: "post",
275
- data: {
276
- action: "backup_decryption",
277
- file: backup_file,
278
- start: start,
279
- part: part,
280
- iv: iv,
281
- decryption_key: decryption_key,
282
- },
283
- success: function (response) {
284
- if (!response.start) {
285
- response.start = 0;
286
- }
287
- if (response.total_size !== undefined) {
288
- jQuery("#backup_decryption_modal .progress > div")
289
- .removeClass("indeterminate")
290
- .addClass("determinate");
291
- var percent =
292
- parseInt(response.start * 100) / parseInt(response.total_size);
293
- jQuery("#backup_decryption_modal .progress .determinate").css(
294
- "width",
295
- parseInt(percent) + "%"
296
- );
297
- jQuery("#backup_decryption_modal .modal-content .files-list").text(
298
- "Decrypting " +
299
- response.processing_file +
300
- " " +
301
- parseInt(percent) +
302
- "%"
303
- );
304
- }
305
-
306
- if (response.error) {
307
- jQuery("#backup_decryption_modal .files-list")
308
- .addClass("error")
309
- .prepend(response.message + " ");
310
- jQuery("#backup_decryption_modal .progress > div")
311
- .addClass("determinate")
312
- .removeClass("indeterminate")
313
- .css("width", "100%");
314
- jQuery("#backup_decryption_modal .notice").show();
315
- return;
316
- }
317
-
318
- if (
319
- !response.finished &&
320
- jQuery("#backup_decryption_modal").is(":visible")
321
- ) {
322
- $this.backup_decryption_callback(
323
- backup_file,
324
- response.start,
325
- response.part,
326
- response.iv
327
- );
328
- } else {
329
- jQuery("#backup_decryption_modal .progress > div")
330
- .addClass("determinate")
331
- .removeClass("indeterminate")
332
- .css("width", "100%");
333
- jQuery("#backup_decryption_modal .modal-content .files-list").text(
334
- "Done Decrypting."
335
- );
336
- dataTable.ajax.reload();
337
- }
338
- },
339
- error: function (xhr, textStatus, error) {
340
- jQuery("#backup_decryption_modal .files-list")
341
- .addClass("error")
342
- .prepend(textStatus + error);
343
- },
344
- dataType: "json",
345
- });
346
- }
347
- }
348
-
349
- backup_decryption(backup_file, start = 0) {
350
- this.file_counter = 0;
351
-
352
- jQuery("#backup_decryption_modal .modal-content .backup-name").text(
353
- backup_file
354
- );
355
- backup_decryption_modal.open();
356
- jQuery("#backup_decryption_modal .progress > div");
357
- jQuery("#backup_decryption_modal .notice").show();
358
-
359
- jQuery("#backup_decryption_modal a.btn").attr(
360
- "onclick",
361
- "xcloner_manage_backups.backup_decryption('" +
362
- backup_file +
363
- "', true)"
364
- );
365
- jQuery("#backup_decryption_modal .modal-content .files-list")
366
- .text("")
367
- .removeClass("error");
368
-
369
- if (start) {
370
- jQuery("#backup_decryption_modal .notice").hide();
371
- this.backup_decryption_callback(backup_file);
372
- }
373
- }
374
-
375
- cloud_upload(backup_file, delete_after_transfer) {
376
- delete_after_transfer = delete_after_transfer || 0;
377
-
378
- jQuery("#remote_storage_modal").find(".backup_name").text(backup_file);
379
- jQuery("#remote_storage_modal").find("input.backup_name").val(backup_file);
380
- M.updateTextFields();
381
- jQuery(".col select").formSelect();
382
- remote_storage_modal.open();
383
- jQuery("#remote_storage_modal .status").hide();
384
-
385
- jQuery(".remote-storage-form")
386
- .off("submit")
387
- .on("submit", function () {
388
- jQuery("#remote_storage_modal .status").show();
389
- jQuery("#remote_storage_modal .status .progress .indeterminate")
390
- .removeClass("determinate")
391
- .css("width", "0%");
392
- jQuery("#remote_storage_modal .status-text")
393
- .removeClass("error")
394
- .text("");
395
-
396
- var storage_type = jQuery("#remote_storage_modal select").val();
397
-
398
- if (backup_file) {
399
- jQuery.ajax({
400
- url: XCLONER_AJAXURL,
401
- method: "post",
402
- data: {
403
- action: "upload_backup_to_remote",
404
- file: backup_file,
405
- storage_type: storage_type,
406
- delete_after_transfer: delete_after_transfer,
407
- },
408
- success: function (response) {
409
- if (response.error) {
410
- jQuery("#remote_storage_modal .status-text")
411
- .addClass("error")
412
- .text(response.message);
413
- } else {
414
- jQuery("#remote_storage_modal .status-text")
415
- .removeClass("error")
416
- .text("done");
417
- }
418
-
419
- jQuery("#remote_storage_modal .status .progress .indeterminate")
420
- .addClass("determinate")
421
- .css("width", "100%");
422
- },
423
- error: function (xhr, textStatus, error) {
424
- jQuery("#remote_storage_modal .status-text")
425
- .addClass("error")
426
- .text(textStatus + error);
427
- },
428
- dataType: "json",
429
- });
430
- }
431
-
432
- return false;
433
- });
434
- }
435
-
436
- copy_remote_to_local(backup_file) {
437
- local_storage_upload_modal.open();
438
- jQuery("#local_storage_upload_modal .modal-content .backup-name").text(
439
- backup_file
440
- );
441
- jQuery("#local_storage_upload_modal .status-text")
442
- .removeClass("error")
443
- .text("");
444
- jQuery("#local_storage_upload_modal .status .progress .indeterminate")
445
- .removeClass("determinate")
446
- .css("width", "0%");
447
-
448
- if (backup_file) {
449
- jQuery.ajax({
450
- url: XCLONER_AJAXURL,
451
- method: "post",
452
- data: {
453
- action: "copy_backup_remote_to_local",
454
- file: backup_file,
455
- storage_type: this.storage_selection,
456
- },
457
- success: function (response) {
458
- if (response.error) {
459
- jQuery("#local_storage_upload_modal .status-text")
460
- .addClass("error")
461
- .text(response.message);
462
- } else {
463
- jQuery("#local_storage_upload_modal .status-text")
464
- .removeClass("error")
465
- .text("done");
466
- }
467
-
468
- jQuery("#local_storage_upload_modal .status .progress .indeterminate")
469
- .addClass("determinate")
470
- .css("width", "100%");
471
- },
472
- error: function (xhr, textStatus, error) {
473
- jQuery("#local_storage_upload_modal .status-text")
474
- .addClass("error")
475
- .text(textStatus + error);
476
- },
477
- dataType: "json",
478
- });
479
- }
480
- }
481
-
482
- //end class
483
- }
484
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/js/xcloner-remote-storage-class.js DELETED
@@ -1,26 +0,0 @@
1
- export class Xcloner_Remote_Storage {
2
- constructor() {}
3
-
4
- /** global: XCLONER_AJAXURL */
5
- toggle_status(elem) {
6
- var field = jQuery(elem).attr("name");
7
- var value = 0;
8
- if (jQuery(elem).is(":checked")) {
9
- value = 1;
10
- }
11
-
12
- if (field) {
13
- jQuery.ajax({
14
- url: XCLONER_AJAXURL,
15
- method: "post",
16
- data: { action: "remote_storage_save_status", id: field, value: value },
17
- success: function (response) {
18
- if (!response.finished) {
19
- alert("Error changing status");
20
- }
21
- },
22
- dataType: "json",
23
- });
24
- }
25
- }
26
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/js/xcloner-restore-class.js DELETED
@@ -1,1166 +0,0 @@
1
- /** global: CustomEvent */
2
- /** global: Event */
3
-
4
- import { ID } from "./xcloner-admin";
5
-
6
- class Xcloner_Restore {
7
- constructor(hash) {
8
- this.steps = [
9
- "restore-script-upload-step",
10
- "backup-upload-step",
11
- "restore-remote-backup-step",
12
- "restore-remote-database-step",
13
- "restore-finish-step",
14
- ];
15
- this.ajaxurl = ajaxurl + "?action=restore_backup";
16
- this.cancel = false;
17
- this.upload_file_event = new Event("upload_file_event");
18
- this.resume = {};
19
- this.hash = hash;
20
- this.file_counter = 0;
21
-
22
- document.addEventListener(
23
- "backup_upload_finish",
24
- function (e) {
25
- jQuery(".xcloner-restore .backup-upload-step .toggler").removeClass(
26
- "cancel"
27
- );
28
- },
29
- false
30
- );
31
-
32
- document.addEventListener(
33
- "remote_restore_backup_finish",
34
- function (e) {
35
- jQuery(
36
- ".xcloner-restore .restore-remote-backup-step .toggler"
37
- ).removeClass("cancel");
38
- },
39
- false
40
- );
41
-
42
- document.addEventListener(
43
- "remote_restore_mysql_backup_finish",
44
- function (e) {
45
- jQuery(
46
- ".xcloner-restore .restore-remote-database-step .toggler"
47
- ).removeClass("cancel");
48
- },
49
- false
50
- );
51
-
52
- document.addEventListener(
53
- "xcloner_populate_remote_backup_files_list",
54
- function (e) {
55
- var files = e.detail.files;
56
- var original_value = jQuery(
57
- ".xcloner-restore #remote_backup_file"
58
- ).val();
59
-
60
- jQuery(".xcloner-restore #remote_backup_file")
61
- .find("option")
62
- .not(":first")
63
- .remove();
64
-
65
- for (var key in files) {
66
- var selected = "not-selected";
67
-
68
- if (files[key].selected || original_value == files[key].path) {
69
- selected = "selected";
70
- }
71
-
72
- jQuery(".xcloner-restore #remote_backup_file")
73
- .append(
74
- "<option value='" +
75
- files[key].path +
76
- "' " +
77
- selected +
78
- ">" +
79
- files[key].path +
80
- "(" +
81
- e.detail.$this.getSize(files[key].size) +
82
- " MB)" +
83
- "</option>"
84
- )
85
- .addClass("file");
86
- }
87
- },
88
- false
89
- );
90
-
91
- document.addEventListener(
92
- "xcloner_populate_remote_mysqldump_files_list",
93
- function (e) {
94
- var files = e.detail.files;
95
- var original_value = jQuery(
96
- ".xcloner-restore #remote_database_file"
97
- ).val();
98
-
99
- jQuery(".xcloner-restore #remote_database_file")
100
- .find("option")
101
- .not(":first")
102
- .remove();
103
-
104
- for (var key in files) {
105
- if (files[key].selected || original_value == files[key].path)
106
- var selected = "selected";
107
- else var selected = "not-selected";
108
-
109
- var option = jQuery(".xcloner-restore #remote_database_file")
110
- .append(
111
- "<option value='" +
112
- files[key].path +
113
- "' " +
114
- selected +
115
- ">" +
116
- files[key].path +
117
- "(" +
118
- e.detail.$this.getSize(files[key].size) +
119
- " MB) " +
120
- files[key].timestamp +
121
- "</option>"
122
- )
123
- .addClass("file");
124
- }
125
- },
126
- false
127
- );
128
-
129
- document.addEventListener(
130
- "xcloner_restore_next_step",
131
- function (e) {
132
- if (e.detail.$this !== undefined) {
133
- var $this = e.detail.$this;
134
- //console.log($this.steps[$this.set_current_step]);
135
- jQuery(".xcloner-restore li." + $this.steps[$this.set_current_step])
136
- .show()
137
- .find(".collapsible-header")
138
- .trigger("click");
139
- //jQuery(".xcloner-restore li."+$this.steps[$this.set_current_step]).addClass('active').show().find(".collapsible-body").show();
140
- }
141
- },
142
- false
143
- );
144
-
145
- document.addEventListener(
146
- "xcloner_restore_update_progress",
147
- function (e) {
148
- if (e.detail.percent !== undefined) {
149
- jQuery(".xcloner-restore .steps.active .progress").show();
150
-
151
- if (e.detail.class == "indeterminate") {
152
- jQuery(".xcloner-restore .steps.active .progress > div")
153
- .addClass(e.detail.class)
154
- .removeClass("determinate");
155
- }
156
-
157
- if (e.detail.class == "determinate") {
158
- jQuery(".xcloner-restore .steps.active .progress > div")
159
- .addClass(e.detail.class)
160
- .removeClass("indeterminate");
161
- }
162
-
163
- if (e.detail.percent == 100) {
164
- jQuery(".xcloner-restore .steps.active .progress > div")
165
- .removeClass("indeterminate")
166
- .addClass("determinate")
167
- .css("width", e.detail.percent + "%");
168
- } else {
169
- jQuery(".xcloner-restore .steps.active .progress .determinate").css(
170
- "width",
171
- e.detail.percent + "%"
172
- );
173
- }
174
- }
175
- },
176
- false
177
- );
178
-
179
- document.addEventListener(
180
- "xcloner_restore_display_status_text",
181
- function (e) {
182
- if (e.detail.status === undefined) e.detail.status = "updated";
183
-
184
- if (e.detail.message !== undefined) {
185
- jQuery(".xcloner-restore .steps.active .status").html(
186
- "<div class='" +
187
- e.detail.status +
188
- "'>" +
189
- e.detail.message +
190
- "</div>"
191
- );
192
- }
193
- },
194
- false
195
- );
196
-
197
- document.addEventListener(
198
- "remote_restore_update_files_list",
199
- function (e) {
200
- if (e.detail.files !== undefined && e.detail.files.length) {
201
- var files_text = [];
202
- for (var i = 0; i < e.detail.files.length; i++) {
203
- files_text[i] = "<li>" + e.detail.files[i] + "</li>";
204
- }
205
- if (
206
- !jQuery(
207
- ".xcloner-restore .restore-remote-backup-step .files-list"
208
- ).is(":hidden")
209
- ) {
210
- jQuery(
211
- ".xcloner-restore .restore-remote-backup-step .files-list"
212
- ).html(files_text.reverse().join("\n"));
213
- }
214
- } else if (!jQuery.isArray(e.detail.files)) {
215
- jQuery(
216
- ".xcloner-restore .restore-remote-backup-step .files-list"
217
- ).html("");
218
- }
219
- },
220
- false
221
- );
222
-
223
- document.addEventListener(
224
- "xcloner_restore_display_query_box",
225
- function (e) {
226
- if (e.detail.query) {
227
- jQuery(".xcloner-restore .query-box").show();
228
- jQuery(".xcloner-restore .query-list").val(e.detail.query);
229
- } else {
230
- jQuery(".xcloner-restore .query-box").hide();
231
- jQuery(".xcloner-restore .query-list").val("");
232
- }
233
- },
234
- false
235
- );
236
-
237
- document.addEventListener(
238
- "xcloner_restore_finish",
239
- function (e) {
240
- jQuery(".xcloner-restore #xcloner_restore_finish").show();
241
- jQuery(".xcloner-restore #open_target_site a").removeAttr("disabled");
242
- },
243
- false
244
- );
245
- }
246
-
247
- get_remote_backup_files_callback(response, status) {
248
- if (status) {
249
- var files = response.statusText.files;
250
- document.dispatchEvent(
251
- new CustomEvent("xcloner_populate_remote_backup_files_list", {
252
- detail: { files: files, $this: this },
253
- })
254
- );
255
- }
256
- }
257
-
258
- get_remote_backup_files() {
259
- this.set_cancel(false);
260
-
261
- var params = {};
262
- params.local_backup_file = jQuery(
263
- ".xcloner-restore .backup-upload-step #backup_file"
264
- ).val();
265
-
266
- this.do_ajax(
267
- "get_remote_backup_files_callback",
268
- "list_backup_archives",
269
- params
270
- );
271
-
272
- }
273
-
274
- get_remote_mysqldump_files_callback(response, status) {
275
- if (status) {
276
- var files = response.statusText.files;
277
- document.dispatchEvent(
278
- new CustomEvent("xcloner_populate_remote_mysqldump_files_list", {
279
- detail: { files: files, $this: this },
280
- })
281
- );
282
- }
283
- }
284
-
285
- get_remote_mysqldump_files() {
286
- this.set_cancel(false);
287
- this.resume.callback = "";
288
-
289
- if (this.resume.callback == "get_remote_mysqldump_files_callback") {
290
- //console.log("do resume");
291
- this.do_ajax(
292
- this.resume.callback,
293
- this.resume.action,
294
- this.resume.params
295
- );
296
- this.resume = {};
297
- return;
298
- }
299
-
300
- var params = {};
301
- params.backup_file = this.get_backup_file();
302
-
303
- //console.log(params)
304
-
305
- this.do_ajax(
306
- "get_remote_mysqldump_files_callback",
307
- "list_mysqldump_backups",
308
- params
309
- );
310
- }
311
-
312
- get_backup_file() {
313
- return jQuery(".xcloner-restore #remote_backup_file").val();
314
- }
315
-
316
- remote_restore_backup_file_callback(response, status, params = {}) {
317
- if (!status) {
318
- document.dispatchEvent(
319
- new CustomEvent("xcloner_restore_display_status_text", {
320
- detail: {
321
- status: "error",
322
- message: response.status + " " + response.statusText,
323
- },
324
- })
325
- );
326
- document.dispatchEvent(
327
- new CustomEvent("xcloner_restore_update_progress", {
328
- detail: { percent: 100 },
329
- })
330
- );
331
- document.dispatchEvent(new CustomEvent("remote_restore_backup_finish"));
332
- return;
333
- }
334
-
335
- var processed =
336
- parseInt(response.statusText.start) +
337
- parseInt(response.statusText.processed);
338
-
339
- if (response.statusText.extracted_files) {
340
- document.dispatchEvent(
341
- new CustomEvent("remote_restore_update_files_list", {
342
- detail: { files: response.statusText.extracted_files },
343
- })
344
- );
345
- }
346
-
347
- if (!response.statusText.finished) {
348
- params.start = response.statusText.start;
349
- params.part = response.statusText.part;
350
- params.processed = response.statusText.processed;
351
-
352
- document.dispatchEvent(
353
- new CustomEvent("xcloner_restore_display_status_text", {
354
- detail: {
355
- message:
356
- "Processing <strong>" +
357
- response.statusText.backup_file +
358
- "</strong>- processed " +
359
- this.getSize(processed, 1024) +
360
- " KB from archive",
361
- },
362
- })
363
- );
364
-
365
- this.do_ajax(
366
- "remote_restore_backup_file_callback",
367
- "restore_backup_to_path",
368
- params
369
- );
370
- return;
371
- }
372
-
373
- document.dispatchEvent(
374
- new CustomEvent("xcloner_restore_update_progress", {
375
- detail: { percent: 100 },
376
- })
377
- );
378
- document.dispatchEvent(
379
- new CustomEvent("xcloner_restore_display_status_text", {
380
- detail: {
381
- message:
382
- "Done restoring <strong>" +
383
- response.statusText.backup_file +
384
- "</strong>.",
385
- },
386
- })
387
- );
388
- document.dispatchEvent(new CustomEvent("remote_restore_backup_finish"));
389
- this.cancel = false;
390
- }
391
-
392
- remote_restore_backup_file(backup_file) {
393
- var params = {};
394
- params.backup_file = backup_file;
395
- params.filter_files = jQuery(".xcloner-restore input[name=filter_files]:checked").val();
396
-
397
- if (this.resume.callback == "remote_restore_backup_file_callback") {
398
- //console.log("do resume");
399
- this.do_ajax(
400
- this.resume.callback,
401
- this.resume.action,
402
- this.resume.params
403
- );
404
- this.resume = {};
405
- return;
406
- } else {
407
- document.dispatchEvent(
408
- new CustomEvent("xcloner_restore_update_progress", {
409
- detail: {
410
- percent: 0,
411
- class: "indeterminate",
412
- },
413
- })
414
- );
415
- }
416
- document.dispatchEvent(
417
- new CustomEvent("remote_restore_update_files_list", {
418
- detail: { files: "" },
419
- })
420
- );
421
- this.do_ajax(
422
- "remote_restore_backup_file_callback",
423
- "restore_backup_to_path",
424
- params
425
- );
426
- }
427
-
428
- remote_restore_mysql_backup_file_callback(
429
- response,
430
- status,
431
- params = {}
432
- ) {
433
- if (!response) {
434
- this.set_cancel(true);
435
-
436
- document.dispatchEvent(
437
- new CustomEvent("remote_restore_mysql_backup_finish")
438
- );
439
- return;
440
- }
441
- if (!status) {
442
- this.start = response.statusText.start;
443
-
444
- document.dispatchEvent(
445
- new CustomEvent("xcloner_restore_display_query_box", {
446
- detail: { query: response.statusText.query },
447
- })
448
- );
449
-
450
- document.dispatchEvent(
451
- new CustomEvent("xcloner_restore_display_status_text", {
452
- detail: {
453
- status: "error",
454
- message: response.status + " " + response.statusText.message,
455
- },
456
- })
457
- );
458
- //document.dispatchEvent(new CustomEvent("xcloner_restore_update_progress", {detail: {percent: 100 }}));
459
- document.dispatchEvent(
460
- new CustomEvent("remote_restore_mysql_backup_finish")
461
- );
462
- //this.set_cancel(true);
463
- return;
464
- }
465
-
466
- document.dispatchEvent(
467
- new CustomEvent("xcloner_restore_display_query_box", {
468
- detail: { query: "" },
469
- })
470
- );
471
- params.query = "";
472
-
473
- var processed =
474
- parseInt(response.statusText.start) +
475
- parseInt(response.statusText.processed);
476
-
477
- if (!response.statusText.finished) {
478
- params.start = response.statusText.start;
479
- params.processed = response.statusText.processed;
480
- this.start = params.start;
481
-
482
- var percent = 0;
483
-
484
- if (response.statusText.backup_size)
485
- percent =
486
- (100 * parseInt(response.statusText.start)) /
487
- parseInt(response.statusText.backup_size);
488
-
489
- document.dispatchEvent(
490
- new CustomEvent("xcloner_restore_display_status_text", {
491
- detail: {
492
- message:
493
- "Processing <strong>" +
494
- response.statusText.backup_file +
495
- "</strong>- wrote " +
496
- this.getSize(response.statusText.start, 1024) +
497
- " KB of data",
498
- },
499
- })
500
- );
501
- document.dispatchEvent(
502
- new CustomEvent("xcloner_restore_update_progress", {
503
- detail: { percent: percent },
504
- })
505
- );
506
-
507
- this.do_ajax(
508
- "remote_restore_mysql_backup_file_callback",
509
- "restore_mysql_backup",
510
- params
511
- );
512
- return;
513
- }
514
-
515
- document.dispatchEvent(
516
- new CustomEvent("xcloner_restore_update_progress", {
517
- detail: { percent: 100 },
518
- })
519
- );
520
- document.dispatchEvent(
521
- new CustomEvent("xcloner_restore_display_status_text", {
522
- detail: {
523
- message:
524
- "Done restoring <strong>" +
525
- response.statusText.backup_file +
526
- "</strong>.",
527
- },
528
- })
529
- );
530
- document.dispatchEvent(
531
- new CustomEvent("remote_restore_mysql_backup_finish")
532
- );
533
- this.cancel = false;
534
- }
535
-
536
- remote_restore_mysql_backup_file(mysqldump_file) {
537
- this.set_cancel(false);
538
-
539
- var params = {};
540
-
541
- //console.log(params)
542
-
543
- params.mysqldump_file = mysqldump_file;
544
- params.query = "";
545
- params.start = 0;
546
-
547
- if (jQuery(".xcloner-restore .query-box .query-list").val()) {
548
- params.query = jQuery(".xcloner-restore .query-box .query-list").val();
549
- params.start = this.start;
550
- }
551
-
552
- document.dispatchEvent(
553
- new CustomEvent("xcloner_restore_display_query_box", {
554
- detail: { query: "" },
555
- })
556
- );
557
-
558
- if (this.resume.callback == "remote_restore_mysql_backup_file_callback") {
559
- //console.log("do resume mysql backup restore");
560
- this.do_ajax(
561
- this.resume.callback,
562
- this.resume.action,
563
- this.resume.params
564
- );
565
- this.resume = {};
566
- return;
567
- }
568
-
569
- this.do_ajax(
570
- "remote_restore_mysql_backup_file_callback",
571
- "restore_mysql_backup",
572
- params
573
- );
574
- }
575
-
576
- restore_finish_callback(response, status, params = {}) {
577
- if (status) {
578
- document.dispatchEvent(
579
- new CustomEvent("xcloner_restore_display_status_text", {
580
- detail: { message: response.statusText, $this: this },
581
- })
582
- );
583
- } else {
584
- document.dispatchEvent(
585
- new CustomEvent("xcloner_restore_display_status_text", {
586
- detail: {
587
- status: "error",
588
- message: response.statusText,
589
- $this: this,
590
- },
591
- })
592
- );
593
- return false;
594
- }
595
-
596
- document.dispatchEvent(
597
- new CustomEvent("xcloner_restore_finish", {
598
- detail: { message: response.statusText, $this: this },
599
- })
600
- );
601
- }
602
-
603
- restore_finish() {
604
- this.set_cancel(false);
605
-
606
- var params = {};
607
-
608
- params.backup_archive = jQuery(
609
- ".xcloner-restore #remote_backup_file"
610
- ).val();
611
-
612
- params.delete_backup_temporary_folder = 0;
613
- params.delete_restore_script = 0;
614
- params.update_remote_site_url = 0;
615
-
616
- if (
617
- jQuery(".xcloner-restore #delete_backup_temporary_folder").is(":checked")
618
- )
619
- params.delete_backup_temporary_folder = 1;
620
-
621
- if (jQuery(".xcloner-restore #delete_restore_script").is(":checked"))
622
- params.delete_restore_script = 1;
623
-
624
- if (jQuery(".xcloner-restore #update_remote_site_url").is(":checked"))
625
- params.update_remote_site_url = 1;
626
-
627
- if (jQuery(".xcloner-restore #delete_backup_archive").is(":checked"))
628
- params.delete_backup_archive = 1;
629
-
630
- this.do_ajax("restore_finish_callback", "restore_finish", params);
631
- }
632
-
633
- upload_backup_file(file) {
634
- var params = {};
635
- this.set_cancel(false);
636
-
637
- if (this.resume.callback == "upload_backup_file_callback") {
638
- this.do_ajax(
639
- this.resume.callback,
640
- this.resume.action,
641
- this.resume.params
642
- );
643
- this.resume = {};
644
- return;
645
- }
646
-
647
- params.file = file;
648
- params.start = 0;
649
-
650
- document.dispatchEvent(new CustomEvent("backup_upload_start"));
651
- document.dispatchEvent(
652
- new CustomEvent("xcloner_restore_display_status_text", {
653
- detail: { message: "Uploading backup 0%" },
654
- })
655
- );
656
- document.dispatchEvent(
657
- new CustomEvent("xcloner_restore_update_progress", {
658
- detail: { percent: 0 },
659
- })
660
- );
661
-
662
- this.do_ajax(
663
- "upload_backup_file_callback",
664
- "restore_upload_backup",
665
- params
666
- );
667
- }
668
-
669
- upload_backup_file_callback(response, status, params = {}) {
670
- if (!status) {
671
- document.dispatchEvent(
672
- new CustomEvent("xcloner_restore_display_status_text", {
673
- detail: {
674
- status: "error",
675
- message: response.status + " " + response.statusText,
676
- },
677
- })
678
- );
679
- document.dispatchEvent(
680
- new CustomEvent("xcloner_restore_update_progress", {
681
- detail: { percent: 100 },
682
- })
683
- );
684
- return;
685
- }
686
-
687
- if (
688
- response &&
689
- (response.start !== false || response.part < response.total_parts)
690
- ) {
691
- var percent = 0;
692
- if (response.total_size) {
693
- if (!response.start) response.start = 0;
694
- var size = parseInt(response.start) + parseInt(response.uploaded_size);
695
- percent = (100 * parseInt(size)) / parseInt(response.total_size);
696
- }
697
-
698
- var part_text = "";
699
- if (response.part > 0) part_text = "part " + response.part + " - ";
700
-
701
- document.dispatchEvent(
702
- new CustomEvent("xcloner_restore_update_progress", {
703
- detail: { percent: percent },
704
- })
705
- );
706
- document.dispatchEvent(
707
- new CustomEvent("xcloner_restore_display_status_text", {
708
- detail: {
709
- message:
710
- "Uploading backup " +
711
- part_text +
712
- parseFloat(percent).toFixed(2) +
713
- "%",
714
- },
715
- })
716
- );
717
-
718
- params.start = response.start;
719
- params.part = response.part;
720
- params.uploaded_size = response.uploaded_size;
721
- this.do_ajax(
722
- "upload_backup_file_callback",
723
- "restore_upload_backup",
724
- params
725
- );
726
- } else {
727
- this.cancel = false;
728
- document.dispatchEvent(new CustomEvent("backup_upload_finish"));
729
- document.dispatchEvent(
730
- new CustomEvent("xcloner_restore_update_progress", {
731
- detail: { percent: 100 },
732
- })
733
- );
734
- document.dispatchEvent(
735
- new CustomEvent("xcloner_restore_display_status_text", {
736
- detail: { message: "Done." },
737
- })
738
- );
739
- }
740
- }
741
-
742
- open_target_site(elem) {
743
- var url = jQuery(".xcloner-restore #remote_restore_url").val();
744
-
745
- if (!url) {
746
- jQuery(".xcloner-restore #wp_home_url").val();
747
- }
748
-
749
- jQuery(elem).attr("href", url);
750
- }
751
-
752
- next_step(inc = 0) {
753
- this.set_current_step = jQuery(".xcloner-restore li.active").attr(
754
- "data-step"
755
- );
756
-
757
- this.set_current_step = parseInt(this.set_current_step) + parseInt(inc);
758
-
759
- document.dispatchEvent(
760
- new CustomEvent("xcloner_restore_next_step", { detail: { $this: this } })
761
- );
762
- }
763
-
764
- list_backup_content_callback(response, status, params = {}) {
765
- if (response.error) {
766
- jQuery("#backup_cotent_modal .files-list")
767
- .addClass("error")
768
- .prepend(response.statusText);
769
- jQuery("#backup_cotent_modal .progress > div")
770
- .addClass("determinate")
771
- .removeClass(".indeterminate")
772
- .css("width", "100%");
773
- return;
774
- }
775
-
776
- var files_text = [];
777
-
778
- for (var i in response.files) {
779
- this.file_counter++;
780
-
781
- files_text[i] =
782
- "<li>" +
783
- (this.file_counter +
784
- ". <span title='" +
785
- response.files[i].mtime +
786
- "'>" +
787
- response.files[i].path +
788
- "</span> (" +
789
- response.files[i].size +
790
- " bytes)") +
791
- "</li>";
792
- }
793
-
794
- jQuery("#backup_cotent_modal .modal-content .files-list").prepend(
795
- files_text.reverse().join("\n")
796
- );
797
- if (!response.finished && jQuery("#backup_cotent_modal").is(":visible")) {
798
- params.start = response.start;
799
- params.part = response.part;
800
- this.do_ajax("list_backup_content_callback", "list_backup_files", params);
801
- } else {
802
- jQuery("#backup_cotent_modal .progress > div")
803
- .addClass("determinate")
804
- .removeClass(".indeterminate")
805
- .css("width", "100%");
806
- }
807
- }
808
-
809
- list_backup_content(backup_file) {
810
- this.file_counter = 0;
811
- jQuery("#backup_cotent_modal .modal-content .files-list")
812
- .text("")
813
- .removeClass("error");
814
- jQuery("#backup_cotent_modal .modal-content .backup-name").text(
815
- backup_file
816
- );
817
-
818
- var Modalelem = document.querySelector("#backup_cotent_modal");
819
- let backup_cotent_modal = M.Modal.init(Modalelem);
820
- backup_cotent_modal.open();
821
-
822
- jQuery("#backup_cotent_modal .progress > div")
823
- .removeClass("determinate")
824
- .addClass("indeterminate");
825
-
826
- //this.list_backup_content_callback(backup_file)
827
- var params = {};
828
- params.file = backup_file;
829
- params.start = 0;
830
- params.part = 0;
831
-
832
- this.do_ajax("list_backup_content_callback", "list_backup_files", params);
833
- }
834
-
835
- init_resume() {
836
- this.resume = {};
837
- if (jQuery(".xcloner-restore .steps.active .progress").is(":visible"))
838
- document.dispatchEvent(
839
- new CustomEvent("xcloner_restore_update_progress", {
840
- detail: { percent: 0 },
841
- })
842
- );
843
- if (jQuery(".xcloner-restore .steps.active .status").html())
844
- document.dispatchEvent(
845
- new CustomEvent("xcloner_restore_display_status_text", {
846
- detail: { message: "" },
847
- })
848
- );
849
- document.dispatchEvent(
850
- new CustomEvent("remote_restore_update_files_list", {
851
- detail: { files: "" },
852
- })
853
- );
854
- }
855
-
856
- /** global: ajaxurl */
857
- do_ajax(callback, action = "", params = {}) {
858
- if (action == "restore_upload_backup") {
859
- params.action = "restore_upload_backup";
860
- }
861
-
862
- params.xcloner_action = action;
863
- params.hash = this.hash;
864
- params.API_ID = ID();
865
- if (typeof XCLONER_WPNONCE !== undefined) {
866
- params._wpnonce = XCLONER_WPNONCE;
867
- }
868
-
869
- if (this.cancel === true) {
870
- this.resume.callback = callback;
871
- this.resume.action = action;
872
- this.resume.params = params;
873
-
874
- //this.request.abort();
875
-
876
- return;
877
- }
878
-
879
- var $this = this;
880
-
881
- jQuery(".xcloner-restore .steps.active").addClass("active_status");
882
-
883
- this.request = jQuery
884
- .ajax({
885
- url: this.ajaxurl,
886
- dataType: "json",
887
- type: "POST",
888
- crossDomain: true,
889
- data: params,
890
- error: function (xhr, status, error) {
891
- $this.resume.callback = callback;
892
- $this.resume.action = action;
893
- $this.resume.params = params;
894
-
895
- document.dispatchEvent(
896
- new CustomEvent("xcloner_restore_display_status_text", {
897
- detail: {
898
- status: "error",
899
- message: xhr.status + " " + xhr.statusText,
900
- },
901
- })
902
- );
903
- $this[callback](xhr, false);
904
- },
905
- })
906
- .done(function (json) {
907
- if (!json) {
908
- $this.resume.callback = callback;
909
- $this.resume.action = action;
910
- $this.resume.params = params;
911
-
912
- document.dispatchEvent(
913
- new CustomEvent("xcloner_restore_display_status_text", {
914
- detail: {
915
- status: "error",
916
- message:
917
- "Lost connection with the API, please try and authentificate again",
918
- },
919
- })
920
- );
921
- }
922
-
923
- if (json && json.status != 200) {
924
- if (json.error) {
925
- document.dispatchEvent(
926
- new CustomEvent("xcloner_restore_display_status_text", {
927
- detail: { status: "error", message: json.message },
928
- })
929
- );
930
- } else {
931
- $this[callback](json, false, params);
932
- }
933
-
934
- return;
935
- }
936
- $this[callback](json, true, params);
937
- });
938
- }
939
-
940
- set_current_step(id) {
941
- this.set_current_step = id;
942
- }
943
-
944
- set_cancel(status) {
945
- if (status) {
946
- //document.dispatchEvent(new CustomEvent("xcloner_restore_display_status_text", {detail: {append : true, message: "Cancelled" }}));
947
- document.dispatchEvent(
948
- new CustomEvent("xcloner_restore_update_progress", {
949
- detail: { percent: 0, class: "determinate" },
950
- })
951
- );
952
- }
953
-
954
- this.cancel = status;
955
- }
956
-
957
- get_cancel(status) {
958
- return this.cancel;
959
- }
960
-
961
- getSize(bytes, conv = 1024 * 1024) {
962
- return (bytes / conv).toFixed(2);
963
- }
964
- }
965
-
966
- //var xcloner_auth_key = "";
967
-
968
- jQuery(document).ready(function () {
969
- if (typeof xcloner_auth_key !== "undefined") {
970
- var xcloner_restore = new Xcloner_Restore(xcloner_auth_key);
971
- } else {
972
- var xcloner_restore = new Xcloner_Restore();
973
- }
974
-
975
- xcloner_restore.set_current_step(0);
976
-
977
- jQuery(".col select").formSelect();
978
-
979
- jQuery(".xcloner-restore .upload-backup.cancel").on("click", function () {
980
- //jQuery(".xcloner-restore #upload_backup").show();
981
- //jQuery(this).hide();
982
- xcloner_restore.set_cancel(true);
983
- });
984
-
985
- jQuery(".xcloner-restore .upload-backup").on("click", function () {
986
- if (jQuery(this).hasClass("cancel")) xcloner_restore.set_cancel(true);
987
- else xcloner_restore.set_cancel(false);
988
-
989
- var backup_file = jQuery(".xcloner-restore #backup_file").val();
990
-
991
- if (backup_file) {
992
- jQuery(this).parent().toggleClass("cancel");
993
-
994
- if (!xcloner_restore.get_cancel())
995
- xcloner_restore.upload_backup_file(backup_file);
996
- } else {
997
- document.dispatchEvent(
998
- new CustomEvent("xcloner_restore_display_status_text", {
999
- detail: {
1000
- status: "error",
1001
- message: "Please select a backup file from the list above",
1002
- },
1003
- })
1004
- );
1005
- }
1006
- });
1007
-
1008
- jQuery(".xcloner-restore #skip_upload_backup").on("click", function () {
1009
- xcloner_restore.set_cancel(true);
1010
- xcloner_restore.next_step();
1011
- });
1012
-
1013
- jQuery(".xcloner-restore #skip_restore_remote_database_step").on(
1014
- "click",
1015
- function () {
1016
- xcloner_restore.set_cancel(true);
1017
- xcloner_restore.next_step();
1018
- }
1019
- );
1020
-
1021
- jQuery(".xcloner-restore li.steps").on("click", function () {
1022
- xcloner_restore.set_current_step = jQuery(this).attr("data-step") - 1;
1023
- });
1024
-
1025
- jQuery(".xcloner-restore #skip_remote_backup_step").on("click", function () {
1026
- xcloner_restore.set_cancel(true);
1027
- xcloner_restore.next_step();
1028
- });
1029
-
1030
- jQuery(
1031
- ".xcloner-restore .restore-remote-backup-step .collapsible-header"
1032
- ).click(function () {
1033
- xcloner_restore.get_remote_backup_files();
1034
- });
1035
-
1036
- jQuery(
1037
- ".xcloner-restore .restore-remote-database-step .collapsible-header"
1038
- ).click(function () {
1039
- xcloner_restore.get_remote_mysqldump_files();
1040
- });
1041
-
1042
- jQuery(".xcloner-restore #remote_backup_file").on("change", function () {
1043
- xcloner_restore.init_resume();
1044
- });
1045
-
1046
- jQuery(".xcloner-restore #backup_file").on("change", function () {
1047
- xcloner_restore.init_resume();
1048
- });
1049
-
1050
- jQuery(".xcloner-restore #restore_finish").click(function () {
1051
- xcloner_restore.restore_finish();
1052
- });
1053
-
1054
- jQuery(".xcloner-restore #open_target_site a").click(function () {
1055
- xcloner_restore.open_target_site(this);
1056
- });
1057
-
1058
- jQuery(".xcloner-restore #refresh_remote_backup_file").on("click", function (
1059
- e
1060
- ) {
1061
- document.dispatchEvent(
1062
- new CustomEvent("xcloner_restore_update_progress", {
1063
- detail: { percent: 0 },
1064
- })
1065
- );
1066
- xcloner_restore.resume = {};
1067
- xcloner_restore.get_remote_backup_files();
1068
- e.stopPropagation();
1069
- });
1070
-
1071
- jQuery(".xcloner-restore #refresh_database_file").on("click", function (e) {
1072
- document.dispatchEvent(
1073
- new CustomEvent("xcloner_restore_update_progress", {
1074
- detail: { percent: 0 },
1075
- })
1076
- );
1077
- xcloner_restore.resume = {};
1078
- xcloner_restore.get_remote_mysqldump_files();
1079
- e.stopPropagation();
1080
- });
1081
-
1082
- jQuery(".xcloner-restore #toggle_file_restore_display").on("click", function (
1083
- e
1084
- ) {
1085
- jQuery(".xcloner-restore .restore-remote-backup-step .files-list").toggle();
1086
- });
1087
-
1088
- jQuery(".xcloner-restore .restore_remote_mysqldump").on("click", function (
1089
- e
1090
- ) {
1091
- if (jQuery(this).hasClass("cancel")) xcloner_restore.set_cancel(true);
1092
- else xcloner_restore.set_cancel(false);
1093
-
1094
- this.remote_database_file = jQuery(
1095
- ".xcloner-restore #remote_database_file"
1096
- ).val();
1097
-
1098
- if (!this.remote_database_file) {
1099
- document.dispatchEvent(
1100
- new CustomEvent("xcloner_restore_display_status_text", {
1101
- detail: {
1102
- status: "error",
1103
- message: "Please select a mysqld backup file from the list",
1104
- },
1105
- })
1106
- );
1107
- return;
1108
- }
1109
-
1110
- jQuery(this).parent().toggleClass("cancel");
1111
-
1112
- if (!xcloner_restore.get_cancel()) {
1113
- document.dispatchEvent(
1114
- new CustomEvent("xcloner_restore_update_progress", {
1115
- detail: { percent: 0, class: "determinate" },
1116
- })
1117
- );
1118
- xcloner_restore.remote_restore_mysql_backup_file(
1119
- this.remote_database_file
1120
- );
1121
- }
1122
- });
1123
-
1124
- jQuery(".xcloner-restore .list-backup-content").on("click", function (e) {
1125
- var id = jQuery(".xcloner-restore #remote_backup_file").val();
1126
-
1127
- if (id) {
1128
- xcloner_restore.list_backup_content(id);
1129
- }
1130
- e.preventDefault();
1131
- });
1132
-
1133
- jQuery(
1134
- ".xcloner-restore .restore-remote-backup-step .restore_remote_backup"
1135
- ).click(function () {
1136
- xcloner_restore.set_cancel(jQuery(this).hasClass("cancel"))
1137
-
1138
- this.backup_file = jQuery(".xcloner-restore #remote_backup_file").val();
1139
-
1140
- if (!this.backup_file) {
1141
- document.dispatchEvent(
1142
- new CustomEvent("xcloner_restore_display_status_text", {
1143
- detail: {
1144
- status: "error",
1145
- message: "Please select a backup file from the list above",
1146
- },
1147
- })
1148
- );
1149
- return;
1150
- }
1151
-
1152
- jQuery(this).parent().toggleClass("cancel");
1153
-
1154
- if (xcloner_restore.get_cancel()) {
1155
- return;
1156
- }
1157
- document.dispatchEvent(
1158
- new CustomEvent("xcloner_restore_update_progress", {
1159
- detail: { percent: 0, class: "indeterminate" },
1160
- })
1161
- );
1162
- xcloner_restore.remote_restore_backup_file(
1163
- this.backup_file,
1164
- );
1165
- });
1166
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
7
- var edit_schedule_modal_instance;
8
-
9
- document.addEventListener('DOMContentLoaded', function() {
10
- var Modalelem = document.querySelector('#edit_schedule');
11
- edit_schedule_modal_instance = M.Modal.init(Modalelem);
12
- });
13
-
14
- jQuery(document).ready(function () {
15
-
16
- class Xcloner_Scheduler {
17
- constructor() {
18
- this.edit_modal = jQuery("#edit_schedule");
19
-
20
- }
21
-
22
- get_form_params() {}
23
-
24
- get_schedule_by_id(id) {
25
- var $this = this;
26
-
27
- if (id) {
28
- jQuery.ajax({
29
- url: XCLONER_AJAXURL,
30
- data: { action: "get_schedule_by_id", id: id},
31
- success: function (response) {
32
- if (response.id == id) {
33
- $this.create_modal(response);
34
- }
35
- },
36
- dataType: "json",
37
- });
38
- }
39
- }
40
-
41
- delete_schedule_by_id(id, elem, dataTable) {
42
- var $this = this;
43
-
44
- if (id) {
45
- jQuery.ajax({
46
- url: XCLONER_AJAXURL,
47
- data: { action: "delete_schedule_by_id", id: id },
48
- success: function (response) {
49
- //window.location = "";
50
- //console.log('schedule deleted');
51
- //alert("Schedule deleted");
52
- jQuery(elem).parents("tr").remove();
53
- dataTable.row(jQuery(elem).parents("tr")).remove().draw();
54
- },
55
- dataType: "json",
56
- });
57
- }
58
- }
59
-
60
- create_modal(response) {
61
- this.edit_modal.find("#schedule_id").text(response.id);
62
-
63
- if (response.status == 1) {
64
- this.edit_modal.find("#status").attr("checked", "checked");
65
- } else {
66
- this.edit_modal.find("#status").removeAttr("checked");
67
- }
68
-
69
- this.edit_modal.find("#schedule_id").text(response.id);
70
- this.edit_modal.find("#schedule_id_hidden").val(response.id);
71
- this.edit_modal.find("#schedule_name").val(response.name);
72
- this.edit_modal
73
- .find("#backup_name")
74
- .val(response.backup_params.backup_name);
75
- this.edit_modal
76
- .find("#email_notification")
77
- .val(response.backup_params.email_notification);
78
- this.edit_modal
79
- .find("#diff_start_date")
80
- .val(response.backup_params.diff_start_date);
81
- this.edit_modal
82
- .find('#schedule_frequency>option[value="' + response.recurrence + '"]')
83
- .prop("selected", true);
84
- this.edit_modal
85
- .find('#backup_type>option[value="' + response.backup_type + '"]')
86
- .prop("selected", true);
87
- this.edit_modal
88
- .find(
89
- '#schedule_storage>option[value="' + response.remote_storage + '"]'
90
- )
91
- .prop("selected", true);
92
- //var date = new Date(response.start_at);
93
- this.edit_modal.find("#schedule_start_date").val(response.start_at);
94
-
95
- if (
96
- response.backup_params.backup_encrypt !== undefined &&
97
- response.backup_params.backup_encrypt == 1
98
- ) {
99
- this.edit_modal.find("#backup_encrypt").attr("checked", "checked");
100
- }
101
-
102
- if (
103
- response.backup_params.backup_delete_after_remote_transfer !== undefined &&
104
- response.backup_params.backup_delete_after_remote_transfer == 1
105
- ) {
106
- this.edit_modal.find("#backup_delete_after_remote_transfer").attr("checked", "checked");
107
- }
108
-
109
- var tables = jQuery.parseJSON(response.table_params);
110
-
111
- var tables_list = "";
112
-
113
- for (var db in tables) {
114
- for (var i in tables[db])
115
- tables_list += db + "." + tables[db][i] + "\n";
116
- }
117
-
118
- this.edit_modal.find("#table_params").val(tables_list);
119
-
120
- var files = jQuery.parseJSON(response.excluded_files);
121
- var exclude_files_list = "";
122
- for (var i in files) {
123
- exclude_files_list += files[i] + "\n";
124
- }
125
-
126
- this.edit_modal.find("#excluded_files").val(exclude_files_list);
127
-
128
- jQuery(".col select").formSelect();
129
-
130
- M.updateTextFields();
131
-
132
- edit_schedule_modal_instance.open();
133
- }
134
-
135
- save_schedule(form, dataTable) {
136
- var data = jQuery(form).serialize();
137
- var $this = this;
138
-
139
- jQuery
140
- .ajax({
141
- url: XCLONER_AJAXURL,
142
- dataType: "json",
143
- type: "POST",
144
- data: data,
145
- error: function (err) {
146
- //show_ajax_error("Communication Error", "", err)
147
- //console.log(err);
148
- alert("Error saving schedule!");
149
- },
150
- })
151
- .done(function (json) {
152
- if (json.error !== undefined) {
153
- alert("Error saving schedule!" + json.error);
154
- return;
155
- }
156
-
157
- edit_schedule_modal_instance.close();
158
- //location.reload();
159
- dataTable.ajax.reload();
160
- });
161
- }
162
-
163
- IsJsonString(str) {
164
- try {
165
- JSON.parse(str);
166
- } catch (e) {
167
- return false;
168
- }
169
- return true;
170
- }
171
-
172
- //end class
173
- }
174
-
175
- var xcloner_scheduler = new Xcloner_Scheduler();
176
-
177
- jQuery("select[required]").css({
178
- display: "block",
179
- height: 0,
180
- padding: 0,
181
- width: 0,
182
- position: "absolute",
183
- });
184
-
185
- let dataTable = jQuery("#scheduled_backups").DataTable({
186
- responsive: true,
187
- bFilter: false,
188
- order: [[3, "desc"]],
189
- buttons: ["selectAll", "selectNone"],
190
- language: {
191
- emptyTable: "No schedules available",
192
- buttons: {
193
- selectAll: "Select all items",
194
- selectNone: "Select none",
195
- },
196
- },
197
- columnDefs: [
198
- { targets: "no-sort", orderable: false },
199
- { className: "hide-on-med-and-down", targets: [3, 5] },
200
- ],
201
- ajax: XCLONER_AJAXURL + "&action=get_scheduler_list",
202
- fnDrawCallback: function (oSettings) {
203
- jQuery(this)
204
- .off("click", ".edit")
205
- .on("click", ".edit", function () {
206
- var hash = jQuery(this).attr("href");
207
- var id = hash.substr(1);
208
- var data = xcloner_scheduler.get_schedule_by_id(id);
209
- });
210
-
211
- jQuery(this)
212
- .off("click", ".delete")
213
- .on("click", ".delete", function () {
214
- var hash = jQuery(this).attr("href");
215
- var id = hash.substr(1);
216
- if (confirm("Are you sure you want to delete it?")) {
217
- var data = xcloner_scheduler.delete_schedule_by_id(
218
- id,
219
- this,
220
- dataTable
221
- );
222
- }
223
- });
224
-
225
- jQuery("span.shorten_string").each(function () {
226
- doShortText(jQuery(this));
227
- });
228
- jQuery("span.shorten_string").click(function () {
229
- jQuery(this).toggleClass("full");
230
- doShortText(jQuery(this));
231
- });
232
- },
233
- });
234
-
235
- jQuery("#save_schedule").on("submit", function () {
236
- xcloner_scheduler.save_schedule(jQuery(this), dataTable);
237
-
238
- return false;
239
- });
240
-
241
- var date_picker;
242
- var date_picker_allowed;
243
-
244
- if (typeof jQuery(".timepicker").pickatime === "function") {
245
- jQuery(".timepicker").pickatime({
246
- default: "now",
247
- min: [7, 30],
248
- twelvehour: false, // change to 12 hour AM/PM clock from 24 hour
249
- donetext: "OK",
250
- autoclose: false,
251
- vibrate: true, // vibrate the device when dragging clock hand
252
- });
253
- }
254
-
255
- if (typeof jQuery(".timepicker").pickadate === "function") {
256
- date_picker = jQuery(".datepicker").pickadate({
257
- format: "d mmmm yyyy",
258
- selectMonths: true, // Creates a dropdown to control month
259
- selectYears: 15, // Creates a dropdown of 15 years to control year
260
- min: +0.1,
261
- onSet: function () {
262
- //this.close();
263
- },
264
- });
265
-
266
- date_picker_allowed = jQuery(".datepicker_max_today").pickadate({
267
- format: "yyyy-mm-dd",
268
- selectMonths: true, // Creates a dropdown to control month
269
- selectYears: 15, // Creates a dropdown of 15 years to control year
270
- max: +0.1,
271
- onSet: function () {
272
- //this.close();
273
- },
274
- });
275
- }
276
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/partials/remote_storage/aws.php CHANGED
@@ -9,9 +9,10 @@ if (!defined('WPINC')) {
9
  <div class="switch right">
10
  <label>
11
  Off
12
- <input type="checkbox" name="xcloner_aws_enable" class="status" value="1" <?php if (get_option("xcloner_aws_enable")) {
13
- echo "checked";
14
- } ?> >
 
15
  <span class="lever"></span>
16
  On
17
  </label>
@@ -36,8 +37,8 @@ if (!defined('WPINC')) {
36
  </div>
37
  <div class=" col s12 m6">
38
  <input placeholder="<?php echo __("S3 Key", 'xcloner-backup-and-restore') ?>" id="aws_key" type="text"
39
- name="xcloner_aws_key" class="validate" value="<?php echo get_option("xcloner_aws_key") ?>"
40
- autocomplete="off">
41
  </div>
42
  </div>
43
 
@@ -47,8 +48,9 @@ if (!defined('WPINC')) {
47
  </div>
48
  <div class=" col s12 m6">
49
  <input placeholder="<?php echo __("S3 Secret", 'xcloner-backup-and-restore') ?>" id="aws_secret" type="text"
50
- name="xcloner_aws_secret" class="validate"
51
- value="<?php echo str_repeat('*', strlen(get_option("xcloner_aws_secret"))) ?>" autocomplete="off">
 
52
  </div>
53
  </div>
54
 
@@ -58,21 +60,19 @@ if (!defined('WPINC')) {
58
  </div>
59
  <div class=" col s12 m6">
60
  <select placeholder="<?php echo __("example: us-east-1", 'xcloner-backup-and-restore') ?>" id="aws_region"
61
- type="text" name="xcloner_aws_region" class="validate"
62
- value="<?php echo get_option("xcloner_aws_region") ?>" autocomplete="off">
63
  <option readonly value="">
64
- <?php echo __("Please Select AWS S3 Region or Leave Unselected for Custom Endpoint") ?></option>
 
65
  <?php
66
- $aws_regions = $remote_storage->get_aws_regions();
67
-
68
- foreach ($aws_regions as $key => $region) {
69
- ?>
70
- <option value="<?php echo $key ?>"
71
- <?php echo($key == get_option('xcloner_aws_region') ? "selected" : "") ?>><?php echo $region ?>
72
- = <?php echo $key ?></option>
73
- <?php
74
- }
75
- ?>
76
  </select>
77
  </div>
78
  </div>
@@ -84,9 +84,9 @@ if (!defined('WPINC')) {
84
  </div>
85
  <div class=" col s12 m6">
86
  <input
87
- placeholder="<?php echo __("S3 EndPoint, leave blank if you want to use the default Amazon AWS Service", 'xcloner-backup-and-restore') ?>"
88
- id="aws_endpoint" type="text" name="xcloner_aws_endpoint" class="validate"
89
- value="<?php echo get_option("xcloner_aws_endpoint") ?>" autocomplete="off">
90
  </div>
91
  </div>
92
  <div class="row">
@@ -95,8 +95,8 @@ if (!defined('WPINC')) {
95
  </div>
96
  <div class=" col s12 m6">
97
  <input placeholder="<?php echo __("S3 Custom Region, ex: af-south-1", 'xcloner-backup-and-restore') ?>"
98
- id="aws_region" type="text" name="xcloner_aws_region" class="validate"
99
- value="<?php echo get_option("xcloner_aws_region") ?>" autocomplete="off">
100
  </div>
101
  </div>
102
  </div>
@@ -107,8 +107,8 @@ if (!defined('WPINC')) {
107
  </div>
108
  <div class=" col s12 m6">
109
  <input placeholder="<?php echo __("S3 Bucket Name", 'xcloner-backup-and-restore') ?>" id="aws_bucket_name"
110
- type="text" name="xcloner_aws_bucket_name" class="validate"
111
- value="<?php echo get_option("xcloner_aws_bucket_name") ?>" autocomplete="off">
112
  </div>
113
  </div>
114
 
@@ -118,27 +118,27 @@ if (!defined('WPINC')) {
118
  </div>
119
  <div class=" col s12 m6">
120
  <input
121
- placeholder="<?php echo __("S3 Prefix, use / ending to define a folder", 'xcloner-backup-and-restore') ?>"
122
- id="aws_prefix" type="text" name="xcloner_aws_prefix" class="validate"
123
- value="<?php echo get_option("xcloner_aws_prefix") ?>" autocomplete="off">
124
  </div>
125
  </div>
126
 
127
- <?=common_cleanup_html('aws')?>
128
 
129
  <div class="row">
130
  <div class="col s6 m4">
131
  <button class="btn waves-effect waves-light" type="submit" name="action" id="action"
132
- value="aws"><?php echo __("Save Settings", 'xcloner-backup-and-restore') ?>
133
  <i class="material-icons right">save</i>
134
  </button>
135
  </div>
136
  <div class="col s6 m4">
137
  <button class="btn waves-effect waves-light orange" type="submit" name="action" id="action" value="aws"
138
- onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore') ?>
139
  <i class="material-icons right">import_export</i>
140
  </button>
141
  </div>
142
  </div>
143
 
144
- </div>
9
  <div class="switch right">
10
  <label>
11
  Off
12
+ <input type="checkbox" name="xcloner_aws_enable" class="status"
13
+ value="1" <?php if (get_option("xcloner_aws_enable")) {
14
+ echo "checked";
15
+ } ?> >
16
  <span class="lever"></span>
17
  On
18
  </label>
37
  </div>
38
  <div class=" col s12 m6">
39
  <input placeholder="<?php echo __("S3 Key", 'xcloner-backup-and-restore') ?>" id="aws_key" type="text"
40
+ name="xcloner_aws_key" class="validate" value="<?php echo esc_attr(get_option("xcloner_aws_key")) ?>"
41
+ autocomplete="off">
42
  </div>
43
  </div>
44
 
48
  </div>
49
  <div class=" col s12 m6">
50
  <input placeholder="<?php echo __("S3 Secret", 'xcloner-backup-and-restore') ?>" id="aws_secret" type="text"
51
+ name="xcloner_aws_secret" class="validate"
52
+ value="<?php echo esc_attr(str_repeat('*', strlen(get_option("xcloner_aws_secret")))) ?>"
53
+ autocomplete="off">
54
  </div>
55
  </div>
56
 
60
  </div>
61
  <div class=" col s12 m6">
62
  <select placeholder="<?php echo __("example: us-east-1", 'xcloner-backup-and-restore') ?>" id="aws_region"
63
+ type="text" name="xcloner_aws_region" class="validate"
64
+ value="<?php echo esc_attr(get_option("xcloner_aws_region")) ?>" autocomplete="off">
65
  <option readonly value="">
66
+ <?php echo __("Please Select AWS S3 Region or Leave Unselected for Custom Endpoint") ?>
67
+ </option>
68
  <?php
69
+ $aws_regions = $remote_storage->get_aws_regions();
70
+ foreach ($aws_regions as $key => $region) { ?>
71
+ <option value="<?php echo esc_attr($key) ?>" <?php echo($key == get_option('xcloner_aws_region') ? "selected" : "") ?>>
72
+ <?php echo esc_html($region) ?>
73
+ = <?php echo esc_html($key) ?>
74
+ </option>
75
+ <?php } ?>
 
 
 
76
  </select>
77
  </div>
78
  </div>
84
  </div>
85
  <div class=" col s12 m6">
86
  <input
87
+ placeholder="<?php echo __("S3 EndPoint, leave blank if you want to use the default Amazon AWS Service", 'xcloner-backup-and-restore') ?>"
88
+ id="aws_endpoint" type="text" name="xcloner_aws_endpoint" class="validate"
89
+ value="<?php echo esc_attr(get_option("xcloner_aws_endpoint")) ?>" autocomplete="off">
90
  </div>
91
  </div>
92
  <div class="row">
95
  </div>
96
  <div class=" col s12 m6">
97
  <input placeholder="<?php echo __("S3 Custom Region, ex: af-south-1", 'xcloner-backup-and-restore') ?>"
98
+ id="aws_region" type="text" name="xcloner_aws_region" class="validate"
99
+ value="<?php echo esc_attr(get_option("xcloner_aws_region")) ?>" autocomplete="off">
100
  </div>
101
  </div>
102
  </div>
107
  </div>
108
  <div class=" col s12 m6">
109
  <input placeholder="<?php echo __("S3 Bucket Name", 'xcloner-backup-and-restore') ?>" id="aws_bucket_name"
110
+ type="text" name="xcloner_aws_bucket_name" class="validate"
111
+ value="<?php echo esc_attr(get_option("xcloner_aws_bucket_name")) ?>" autocomplete="off">
112
  </div>
113
  </div>
114
 
118
  </div>
119
  <div class=" col s12 m6">
120
  <input
121
+ placeholder="<?php echo __("S3 Prefix, use / ending to define a folder", 'xcloner-backup-and-restore') ?>"
122
+ id="aws_prefix" type="text" name="xcloner_aws_prefix" class="validate"
123
+ value="<?php echo esc_attr(get_option("xcloner_aws_prefix")) ?>" autocomplete="off">
124
  </div>
125
  </div>
126
 
127
+ <? echo common_cleanup_html('aws') ?>
128
 
129
  <div class="row">
130
  <div class="col s6 m4">
131
  <button class="btn waves-effect waves-light" type="submit" name="action" id="action"
132
+ value="aws"><?php echo __("Save Settings", 'xcloner-backup-and-restore') ?>
133
  <i class="material-icons right">save</i>
134
  </button>
135
  </div>
136
  <div class="col s6 m4">
137
  <button class="btn waves-effect waves-light orange" type="submit" name="action" id="action" value="aws"
138
+ onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore') ?>
139
  <i class="material-icons right">import_export</i>
140
  </button>
141
  </div>
142
  </div>
143
 
144
+ </div>
admin/partials/remote_storage/azure.php CHANGED
@@ -37,7 +37,7 @@ if (!defined('WPINC')) {
37
  <div class=" col s12 m6">
38
  <input placeholder="<?php echo __("Azure Account Name", 'xcloner-backup-and-restore') ?>"
39
  id="azure_account_name" type="text" name="xcloner_azure_account_name" class="validate"
40
- value="<?php echo get_option("xcloner_azure_account_name") ?>" autocomplete="off">
41
  </div>
42
  </div>
43
 
@@ -49,7 +49,7 @@ if (!defined('WPINC')) {
49
  <div class=" col s12 m6">
50
  <input placeholder="<?php echo __("Azure Api Key", 'xcloner-backup-and-restore') ?>" id="azure_api_key"
51
  type="text" name="xcloner_azure_api_key" class="validate"
52
- value="<?php echo str_repeat('*', strlen(get_option("xcloner_azure_api_key"))) ?>" autocomplete="off">
53
  </div>
54
  </div>
55
 
@@ -60,11 +60,11 @@ if (!defined('WPINC')) {
60
  <div class=" col s12 m6">
61
  <input placeholder="<?php echo __("Azure Container", 'xcloner-backup-and-restore') ?>" id="azure_container"
62
  type="text" name="xcloner_azure_container" class="validate"
63
- value="<?php echo get_option("xcloner_azure_container") ?>">
64
  </div>
65
  </div>
66
 
67
- <?=common_cleanup_html('azure')?>
68
 
69
  <div class="row">
70
  <div class="col s6 m4">
@@ -75,10 +75,11 @@ if (!defined('WPINC')) {
75
  </div>
76
  <div class="col s6 m4">
77
  <button class="btn waves-effect waves-light orange" type="submit" name="action" id="action" value="azure"
78
- onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore') ?>
 
79
  <i class="material-icons right">import_export</i>
80
  </button>
81
  </div>
82
  </div>
83
 
84
- </div>
37
  <div class=" col s12 m6">
38
  <input placeholder="<?php echo __("Azure Account Name", 'xcloner-backup-and-restore') ?>"
39
  id="azure_account_name" type="text" name="xcloner_azure_account_name" class="validate"
40
+ value="<?php echo esc_attr(get_option("xcloner_azure_account_name")) ?>" autocomplete="off">
41
  </div>
42
  </div>
43
 
49
  <div class=" col s12 m6">
50
  <input placeholder="<?php echo __("Azure Api Key", 'xcloner-backup-and-restore') ?>" id="azure_api_key"
51
  type="text" name="xcloner_azure_api_key" class="validate"
52
+ value="<?php echo esc_attr(str_repeat('*', strlen(get_option("xcloner_azure_api_key")))) ?>" autocomplete="off">
53
  </div>
54
  </div>
55
 
60
  <div class=" col s12 m6">
61
  <input placeholder="<?php echo __("Azure Container", 'xcloner-backup-and-restore') ?>" id="azure_container"
62
  type="text" name="xcloner_azure_container" class="validate"
63
+ value="<?php echo esc_attr(get_option("xcloner_azure_container")) ?>">
64
  </div>
65
  </div>
66
 
67
+ <?php echo common_cleanup_html('azure')?>
68
 
69
  <div class="row">
70
  <div class="col s6 m4">
75
  </div>
76
  <div class="col s6 m4">
77
  <button class="btn waves-effect waves-light orange" type="submit" name="action" id="action" value="azure"
78
+ onclick="jQuery('#connection_check').val('1')">
79
+ <?php echo __("Verify", 'xcloner-backup-and-restore') ?>
80
  <i class="material-icons right">import_export</i>
81
  </button>
82
  </div>
83
  </div>
84
 
85
+ </div>
admin/partials/remote_storage/backblaze.php CHANGED
@@ -5,7 +5,8 @@ if (!defined('WPINC')) {
5
  }
6
  ?>
7
  <div class="collapsible-header">
8
- <i class="material-icons">computer</i><?php echo __("Backblaze B2 Storage", 'xcloner-backup-and-restore') ?>
 
9
  <div class="switch right">
10
  <label>
11
  Off
@@ -38,7 +39,7 @@ if (!defined('WPINC')) {
38
  <div class=" col s12 m6">
39
  <input placeholder="<?php echo __("Backblaze KeyID", 'xcloner-backup-and-restore') ?>"
40
  id="backblaze_account_id" type="text" name="xcloner_backblaze_account_id" class="validate"
41
- value="<?php echo get_option("xcloner_backblaze_account_id") ?>" autocomplete="off">
42
  </div>
43
  </div>
44
 
@@ -51,7 +52,7 @@ if (!defined('WPINC')) {
51
  <div class=" col s12 m6">
52
  <input placeholder="<?php echo __("Backblaze applicationKey", 'xcloner-backup-and-restore') ?>"
53
  id="backblaze_application_key" type="text" name="xcloner_backblaze_application_key" class="validate"
54
- value="<?php echo str_repeat('*', strlen(get_option("xcloner_backblaze_application_key"))) ?>"
55
  autocomplete="off">
56
  </div>
57
  </div>
@@ -64,11 +65,11 @@ if (!defined('WPINC')) {
64
  <div class=" col s12 m6">
65
  <input placeholder="<?php echo __("Backblaze Bucket Name", 'xcloner-backup-and-restore') ?>"
66
  id="backblaze_bucket_name" type="text" name="xcloner_backblaze_bucket_name" class="validate"
67
- value="<?php echo get_option("xcloner_backblaze_bucket_name") ?>" autocomplete="off">
68
  </div>
69
  </div>
70
 
71
- <?=common_cleanup_html('backblaze')?>
72
 
73
  <div class="row">
74
  <div class="col s6 m4">
@@ -86,4 +87,4 @@ if (!defined('WPINC')) {
86
  </div>
87
  </div>
88
 
89
- </div>
5
  }
6
  ?>
7
  <div class="collapsible-header">
8
+ <i class="material-icons">computer</i>
9
+ <?php echo __("Backblaze B2 Storage", 'xcloner-backup-and-restore') ?>
10
  <div class="switch right">
11
  <label>
12
  Off
39
  <div class=" col s12 m6">
40
  <input placeholder="<?php echo __("Backblaze KeyID", 'xcloner-backup-and-restore') ?>"
41
  id="backblaze_account_id" type="text" name="xcloner_backblaze_account_id" class="validate"
42
+ value="<?php echo esc_attr(get_option("xcloner_backblaze_account_id")) ?>" autocomplete="off">
43
  </div>
44
  </div>
45
 
52
  <div class=" col s12 m6">
53
  <input placeholder="<?php echo __("Backblaze applicationKey", 'xcloner-backup-and-restore') ?>"
54
  id="backblaze_application_key" type="text" name="xcloner_backblaze_application_key" class="validate"
55
+ value="<?php echo esc_attr(str_repeat('*', strlen(get_option("xcloner_backblaze_application_key")))) ?>"
56
  autocomplete="off">
57
  </div>
58
  </div>
65
  <div class=" col s12 m6">
66
  <input placeholder="<?php echo __("Backblaze Bucket Name", 'xcloner-backup-and-restore') ?>"
67
  id="backblaze_bucket_name" type="text" name="xcloner_backblaze_bucket_name" class="validate"
68
+ value="<?php echo esc_attr(get_option("xcloner_backblaze_bucket_name")) ?>" autocomplete="off">
69
  </div>
70
  </div>
71
 
72
+ <?php echo common_cleanup_html('backblaze')?>
73
 
74
  <div class="row">
75
  <div class="col s6 m4">
87
  </div>
88
  </div>
89
 
90
+ </div>
admin/partials/remote_storage/dropbox.php CHANGED
@@ -38,7 +38,7 @@ if (!defined('WPINC')) {
38
  <div class=" col s12 m6">
39
  <input placeholder="<?php echo __("Dropbox Access Token", 'xcloner-backup-and-restore') ?>"
40
  id="dropbox_access_token" type="text" name="xcloner_dropbox_access_token" class="validate"
41
- value="<?php echo get_option("xcloner_dropbox_access_token") ?>" autocomplete="off">
42
  </div>
43
  </div>
44
 
@@ -50,7 +50,7 @@ if (!defined('WPINC')) {
50
  <div class=" col s12 m6">
51
  <input placeholder="<?php echo __("Dropbox App Secret", 'xcloner-backup-and-restore') ?>"
52
  id="dropbox_app_secret" type="text" name="xcloner_dropbox_app_secret" class="validate"
53
- value="<?php echo str_repeat('*', strlen(get_option("xcloner_dropbox_app_secret"))) ?>"
54
  autocomplete="off">
55
  </div>
56
  </div>
@@ -62,11 +62,11 @@ if (!defined('WPINC')) {
62
  <div class=" col s12 m6">
63
  <input placeholder="<?php echo __("Dropbox Prefix", 'xcloner-backup-and-restore') ?>" id="dropbox_prefix"
64
  type="text" name="xcloner_dropbox_prefix" class="validate"
65
- value="<?php echo get_option("xcloner_dropbox_prefix") ?>">
66
  </div>
67
  </div>
68
 
69
- <?=common_cleanup_html('dropbox')?>
70
 
71
  <div class="row">
72
  <div class="col s6 m4">
@@ -83,4 +83,4 @@ if (!defined('WPINC')) {
83
  </div>
84
  </div>
85
 
86
- </div>
38
  <div class=" col s12 m6">
39
  <input placeholder="<?php echo __("Dropbox Access Token", 'xcloner-backup-and-restore') ?>"
40
  id="dropbox_access_token" type="text" name="xcloner_dropbox_access_token" class="validate"
41
+ value="<?php echo esc_attr(get_option("xcloner_dropbox_access_token")) ?>" autocomplete="off">
42
  </div>
43
  </div>
44
 
50
  <div class=" col s12 m6">
51
  <input placeholder="<?php echo __("Dropbox App Secret", 'xcloner-backup-and-restore') ?>"
52
  id="dropbox_app_secret" type="text" name="xcloner_dropbox_app_secret" class="validate"
53
+ value="<?php echo esc_attr(str_repeat('*', strlen(get_option("xcloner_dropbox_app_secret")))) ?>"
54
  autocomplete="off">
55
  </div>
56
  </div>
62
  <div class=" col s12 m6">
63
  <input placeholder="<?php echo __("Dropbox Prefix", 'xcloner-backup-and-restore') ?>" id="dropbox_prefix"
64
  type="text" name="xcloner_dropbox_prefix" class="validate"
65
+ value="<?php echo esc_attr(get_option("xcloner_dropbox_prefix")) ?>">
66
  </div>
67
  </div>
68
 
69
+ <?php echo common_cleanup_html('dropbox')?>
70
 
71
  <div class="row">
72
  <div class="col s6 m4">
83
  </div>
84
  </div>
85
 
86
+ </div>
admin/partials/remote_storage/ftp.php CHANGED
@@ -25,11 +25,11 @@ if (!defined('WPINC')) {
25
  <div class="col s12 m6">
26
  <input placeholder="<?php echo __("Ftp Hostname", 'xcloner-backup-and-restore') ?>" id="ftp_host"
27
  type="text" name="xcloner_ftp_hostname" class="validate"
28
- value="<?php echo get_option("xcloner_ftp_hostname") ?>">
29
  </div>
30
  <div class=" col s12 m2">
31
  <input placeholder="<?php echo __("Ftp Port", 'xcloner-backup-and-restore') ?>" id="ftp_port" type="text"
32
- name="xcloner_ftp_port" class="validate" value="<?php echo get_option("xcloner_ftp_port", 21) ?>">
33
  </div>
34
  </div>
35
 
@@ -40,7 +40,7 @@ if (!defined('WPINC')) {
40
  <div class=" col s12 m6">
41
  <input placeholder="<?php echo __("Ftp Username", 'xcloner-backup-and-restore') ?>" id="ftp_username"
42
  type="text" name="xcloner_ftp_username" class="validate"
43
- value="<?php echo get_option("xcloner_ftp_username") ?>" autocomplete="off">
44
  </div>
45
  </div>
46
 
@@ -52,7 +52,7 @@ if (!defined('WPINC')) {
52
  <div class=" col s12 m6">
53
  <input placeholder="<?php echo __("Ftp Password", 'xcloner-backup-and-restore') ?>" id="ftp_password"
54
  type="text" name="xcloner_ftp_password" class="validate"
55
- value="<?php echo str_repeat('*', strlen(get_option("xcloner_ftp_password"))) ?>" autocomplete="off">
56
  </div>
57
  </div>
58
 
@@ -63,7 +63,7 @@ if (!defined('WPINC')) {
63
  <div class=" col s12 m6">
64
  <input placeholder="<?php echo __("Ftp Storage Folder", 'xcloner-backup-and-restore') ?>" id="ftp_root"
65
  type="text" name="xcloner_ftp_path" class="validate"
66
- value="<?php echo get_option("xcloner_ftp_path") ?>">
67
  </div>
68
  </div>
69
 
@@ -120,11 +120,11 @@ if (!defined('WPINC')) {
120
  <div class=" col s12 m2">
121
  <input placeholder="<?php echo __("Ftp Timeout", 'xcloner-backup-and-restore') ?>" id="ftp_timeout"
122
  type="text" name="xcloner_ftp_timeout" class="validate"
123
- value="<?php echo get_option("xcloner_ftp_timeout", 30) ?>">
124
  </div>
125
  </div>
126
 
127
- <?=common_cleanup_html('ftp')?>
128
 
129
  <div class="row">
130
  <div class="col s6 m4">
@@ -141,4 +141,4 @@ if (!defined('WPINC')) {
141
  </div>
142
  </div>
143
 
144
- </div>
25
  <div class="col s12 m6">
26
  <input placeholder="<?php echo __("Ftp Hostname", 'xcloner-backup-and-restore') ?>" id="ftp_host"
27
  type="text" name="xcloner_ftp_hostname" class="validate"
28
+ value="<?php echo esc_attr(get_option("xcloner_ftp_hostname")) ?>">
29
  </div>
30
  <div class=" col s12 m2">
31
  <input placeholder="<?php echo __("Ftp Port", 'xcloner-backup-and-restore') ?>" id="ftp_port" type="text"
32
+ name="xcloner_ftp_port" class="validate" value="<?php echo esc_attr(get_option("xcloner_ftp_port", 21)) ?>">
33
  </div>
34
  </div>
35
 
40
  <div class=" col s12 m6">
41
  <input placeholder="<?php echo __("Ftp Username", 'xcloner-backup-and-restore') ?>" id="ftp_username"
42
  type="text" name="xcloner_ftp_username" class="validate"
43
+ value="<?php echo esc_attr(get_option("xcloner_ftp_username")) ?>" autocomplete="off">
44
  </div>
45
  </div>
46
 
52
  <div class=" col s12 m6">
53
  <input placeholder="<?php echo __("Ftp Password", 'xcloner-backup-and-restore') ?>" id="ftp_password"
54
  type="text" name="xcloner_ftp_password" class="validate"
55
+ value="<?php echo esc_attr(str_repeat('*', strlen(get_option("xcloner_ftp_password")))) ?>" autocomplete="off">
56
  </div>
57
  </div>
58
 
63
  <div class=" col s12 m6">
64
  <input placeholder="<?php echo __("Ftp Storage Folder", 'xcloner-backup-and-restore') ?>" id="ftp_root"
65
  type="text" name="xcloner_ftp_path" class="validate"
66
+ value="<?php echo esc_attr(get_option("xcloner_ftp_path")) ?>">
67
  </div>
68
  </div>
69
 
120
  <div class=" col s12 m2">
121
  <input placeholder="<?php echo __("Ftp Timeout", 'xcloner-backup-and-restore') ?>" id="ftp_timeout"
122
  type="text" name="xcloner_ftp_timeout" class="validate"
123
+ value="<?php echo esc_attr(get_option("xcloner_ftp_timeout", 30)) ?>">
124
  </div>
125
  </div>
126
 
127
+ <?php echo common_cleanup_html('ftp')?>
128
 
129
  <div class="row">
130
  <div class="col s6 m4">
141
  </div>
142
  </div>
143
 
144
+ </div>
admin/partials/remote_storage/gdrive.php CHANGED
@@ -46,8 +46,8 @@ if (!defined('WPINC')) {
46
  <div class=" col s12 m6">
47
  <a class="" target="_blank" id="gdrive_authorization_click"
48
  onclick="jQuery('#authentification_code').show()"
49
- href="<?php echo $gdrive_auth_url ?>">
50
- <img src="<?=plugin_dir_url(__DIR__)?>/../../assets/btn_google_signin_dark_pressed_web.png"
51
  alt="<?php echo sprintf(__('Authorize Google Drive', 'xcloner-backup-and-restore')) ?>"/>
52
  </a>
53
  <input type="text" name="authentification_code" id="authentification_code"
@@ -63,8 +63,8 @@ if (!defined('WPINC')) {
63
  <input
64
  placeholder="<?php echo __("Leave blank unless you wish to set up Google Drive integration manually", 'xcloner-backup-and-restore') ?>"
65
  id="gdrive_client_id" type="text" name="xcloner_gdrive_client_id" class="validate"
66
- value="<?php echo get_option("xcloner_gdrive_client_id") ?>"
67
- default-client-id=<?=$remote_storage::GDRIVE_AUTH_WATCHFUL?>>
68
  </div>
69
  </div>
70
 
@@ -75,7 +75,7 @@ if (!defined('WPINC')) {
75
  <div class=" col s12 m6">
76
  <input placeholder="<?php echo __("Google Client Secret", 'xcloner-backup-and-restore') ?>"
77
  id="gdrive_client_secret" type="text" name="xcloner_gdrive_client_secret" class="validate"
78
- value="<?php echo str_repeat('*', strlen(get_option("xcloner_gdrive_client_secret"))) ?>">
79
  </div>
80
  </div>
81
 
@@ -92,11 +92,11 @@ if (!defined('WPINC')) {
92
  <div class=" col s12 m6">
93
  <input placeholder="<?php echo __("Target Folder ID or Root Path", 'xcloner-backup-and-restore') ?>"
94
  id="gdrive_target_folder" type="text" name="xcloner_gdrive_target_folder" class="validate"
95
- value="<?php echo get_option("xcloner_gdrive_target_folder") ?>" autocomplete="off">
96
  </div>
97
  </div>
98
 
99
- <?=common_cleanup_html('gdrive')?>
100
 
101
  <div class="row">
102
  <div class="col s12 m3 label">
@@ -149,7 +149,7 @@ if (!defined('WPINC')) {
149
  </h6>
150
  <h6><?php echo __("PHP 5.5 minimum version is required.") ?></h6>
151
  <br />
152
- <a class="install-now btn" data-slug="xcloner-google-drive" href="<?php echo $url; ?>"
153
  aria-label="Install XCloner Google Drive 1.0.0 now" data-name="XCloner Google Drive 1.0.0">
154
  <?php echo sprintf(__('Install Now', 'xcloner-backup-and-restore')) ?>
155
  </a>
@@ -168,4 +168,4 @@ if (!defined('WPINC')) {
168
 
169
  <?php endif; ?>
170
 
171
- </div>
46
  <div class=" col s12 m6">
47
  <a class="" target="_blank" id="gdrive_authorization_click"
48
  onclick="jQuery('#authentification_code').show()"
49
+ href="<?php echo esc_url($gdrive_auth_url) ?>">
50
+ <img src="<?php echo plugin_dir_url(__DIR__)?>/../../assets/btn_google_signin_dark_pressed_web.png"
51
  alt="<?php echo sprintf(__('Authorize Google Drive', 'xcloner-backup-and-restore')) ?>"/>
52
  </a>
53
  <input type="text" name="authentification_code" id="authentification_code"
63
  <input
64
  placeholder="<?php echo __("Leave blank unless you wish to set up Google Drive integration manually", 'xcloner-backup-and-restore') ?>"
65
  id="gdrive_client_id" type="text" name="xcloner_gdrive_client_id" class="validate"
66
+ value="<?php echo esc_attr(get_option("xcloner_gdrive_client_id")) ?>"
67
+ default-client-id=<?php echo $remote_storage::GDRIVE_AUTH_WATCHFUL?>>
68
  </div>
69
  </div>
70
 
75
  <div class=" col s12 m6">
76
  <input placeholder="<?php echo __("Google Client Secret", 'xcloner-backup-and-restore') ?>"
77
  id="gdrive_client_secret" type="text" name="xcloner_gdrive_client_secret" class="validate"
78
+ value="<?php echo esc_attr(str_repeat('*', strlen(get_option("xcloner_gdrive_client_secret")))) ?>">
79
  </div>
80
  </div>
81
 
92
  <div class=" col s12 m6">
93
  <input placeholder="<?php echo __("Target Folder ID or Root Path", 'xcloner-backup-and-restore') ?>"
94
  id="gdrive_target_folder" type="text" name="xcloner_gdrive_target_folder" class="validate"
95
+ value="<?php echo esc_attr(get_option("xcloner_gdrive_target_folder")) ?>" autocomplete="off">
96
  </div>
97
  </div>
98
 
99
+ <?php echo common_cleanup_html('gdrive')?>
100
 
101
  <div class="row">
102
  <div class="col s12 m3 label">
149
  </h6>
150
  <h6><?php echo __("PHP 5.5 minimum version is required.") ?></h6>
151
  <br />
152
+ <a class="install-now btn" data-slug="xcloner-google-drive" href="<?php echo esc_url($url); ?>"
153
  aria-label="Install XCloner Google Drive 1.0.0 now" data-name="XCloner Google Drive 1.0.0">
154
  <?php echo sprintf(__('Install Now', 'xcloner-backup-and-restore')) ?>
155
  </a>
168
 
169
  <?php endif; ?>
170
 
171
+ </div>
admin/partials/remote_storage/local.php CHANGED
@@ -24,7 +24,7 @@ if (!defined('WPINC')) {
24
  <div class=" col s12 m6">
25
  <input placeholder="<?php echo __("Backup Start Location", 'xcloner-backup-and-restore') ?>" id="aws_key"
26
  type="text" name="xcloner_start_path" class="validate"
27
- value="<?php echo get_option("xcloner_start_path") ?>" autocomplete="off">
28
  </div>
29
  </div>
30
 
@@ -35,11 +35,11 @@ if (!defined('WPINC')) {
35
  <div class=" col s12 m6">
36
  <input placeholder="<?php echo __("Backup Storage Location", 'xcloner-backup-and-restore') ?>" id="aws_key"
37
  type="text" name="xcloner_store_path" class="validate"
38
- value="<?php echo get_option("xcloner_store_path") ?>" autocomplete="off">
39
  </div>
40
  </div>
41
 
42
- <?=common_cleanup_html('local')?>
43
 
44
  <div class="row">
45
  <div class="col s6 m4">
@@ -56,4 +56,4 @@ if (!defined('WPINC')) {
56
  </div>
57
  </div>
58
 
59
- </div>
24
  <div class=" col s12 m6">
25
  <input placeholder="<?php echo __("Backup Start Location", 'xcloner-backup-and-restore') ?>" id="aws_key"
26
  type="text" name="xcloner_start_path" class="validate"
27
+ value="<?php echo esc_attr(get_option("xcloner_start_path")) ?>" autocomplete="off">
28
  </div>
29
  </div>
30
 
35
  <div class=" col s12 m6">
36
  <input placeholder="<?php echo __("Backup Storage Location", 'xcloner-backup-and-restore') ?>" id="aws_key"
37
  type="text" name="xcloner_store_path" class="validate"
38
+ value="<?php echo esc_attr(get_option("xcloner_store_path")) ?>" autocomplete="off">
39
  </div>
40
  </div>
41
 
42
+ <?php echo common_cleanup_html('local')?>
43
 
44
  <div class="row">
45
  <div class="col s6 m4">
56
  </div>
57
  </div>
58
 
59
+ </div>
admin/partials/remote_storage/onedrive.php CHANGED
@@ -38,7 +38,7 @@ if (!defined('WPINC')) {
38
  <div class=" col s12 m6">
39
  <input placeholder="<?php echo __("OneDrive Client ID", 'xcloner-backup-and-restore') ?>"
40
  id="onedrive_client_id" type="text" name="xcloner_onedrive_client_id" class="validate"
41
- value="<?=get_option("xcloner_onedrive_client_id") ?>" autocomplete="off">
42
  </div>
43
  </div>
44
 
@@ -50,7 +50,7 @@ if (!defined('WPINC')) {
50
  <div class=" col s12 m6">
51
  <input placeholder="<?php echo __("OneDrive Client Secret", 'xcloner-backup-and-restore') ?>"
52
  id="onedrive_client_secret" type="text" name="xcloner_onedrive_client_secret" class="validate"
53
- value="<?php echo str_repeat('*', strlen(get_option("xcloner_onedrive_client_secret"))) ?>"
54
  autocomplete="off">
55
  </div>
56
  </div>
@@ -62,7 +62,7 @@ if (!defined('WPINC')) {
62
  <div class=" col s12 m6">
63
  <a class="btn" target="_blank" id="onedrive_authorization_click" onclick="jQuery(this).attr('href', jQuery(this).attr('target_href') + '&client_id=' + jQuery('#onedrive_client_id').val());
64
  jQuery('.onedrive-action').click()" href="#"
65
- target_href="https://login.microsoftonline.com/common/oauth2/v2.0/authorize?scope=offline_access files.readwrite.all files.read files.read.all files.readwrite&response_type=code&redirect_uri=<?=get_admin_url('')?>"><?php echo sprintf(__('Authorize OneDrive', 'xcloner-backup-and-restore')) ?></a>
66
 
67
  </div>
68
  </div>
@@ -74,11 +74,11 @@ if (!defined('WPINC')) {
74
  <div class=" col s12 m6">
75
  <input placeholder="<?php echo __("OneDrive Storage Folder Path", 'xcloner-backup-and-restore') ?>"
76
  id="onedrive_path" type="text" name="xcloner_onedrive_path" class="validate"
77
- value="<?php echo get_option("xcloner_onedrive_path") ?>">
78
  </div>
79
  </div>
80
 
81
- <?=common_cleanup_html('onedrive')?>
82
 
83
  <div class="row">
84
  <div class="col s6 m4">
@@ -95,4 +95,4 @@ if (!defined('WPINC')) {
95
  </div>
96
  </div>
97
 
98
- </div>
38
  <div class=" col s12 m6">
39
  <input placeholder="<?php echo __("OneDrive Client ID", 'xcloner-backup-and-restore') ?>"
40
  id="onedrive_client_id" type="text" name="xcloner_onedrive_client_id" class="validate"
41
+ value="<?php echo esc_attr(get_option("xcloner_onedrive_client_id")) ?>" autocomplete="off">
42
  </div>
43
  </div>
44
 
50
  <div class=" col s12 m6">
51
  <input placeholder="<?php echo __("OneDrive Client Secret", 'xcloner-backup-and-restore') ?>"
52
  id="onedrive_client_secret" type="text" name="xcloner_onedrive_client_secret" class="validate"
53
+ value="<?php echo esc_attr(str_repeat('*', strlen(get_option("xcloner_onedrive_client_secret")))) ?>"
54
  autocomplete="off">
55
  </div>
56
  </div>
62
  <div class=" col s12 m6">
63
  <a class="btn" target="_blank" id="onedrive_authorization_click" onclick="jQuery(this).attr('href', jQuery(this).attr('target_href') + '&client_id=' + jQuery('#onedrive_client_id').val());
64
  jQuery('.onedrive-action').click()" href="#"
65
+ target_href="https://login.microsoftonline.com/common/oauth2/v2.0/authorize?scope=offline_access files.readwrite.all files.read files.read.all files.readwrite&response_type=code&redirect_uri=<?php echo get_admin_url('')?>"><?php echo sprintf(__('Authorize OneDrive', 'xcloner-backup-and-restore')) ?></a>
66
 
67
  </div>
68
  </div>
74
  <div class=" col s12 m6">
75
  <input placeholder="<?php echo __("OneDrive Storage Folder Path", 'xcloner-backup-and-restore') ?>"
76
  id="onedrive_path" type="text" name="xcloner_onedrive_path" class="validate"
77
+ value="<?php echo esc_attr(get_option("xcloner_onedrive_path")) ?>">
78
  </div>
79
  </div>
80
 
81
+ <?php echo common_cleanup_html('onedrive')?>
82
 
83
  <div class="row">
84
  <div class="col s6 m4">
95
  </div>
96
  </div>
97
 
98
+ </div>
admin/partials/remote_storage/sftp.php CHANGED
@@ -26,12 +26,12 @@ if (!defined('WPINC')) {
26
  <div class="col s12 m6">
27
  <input placeholder="<?php echo __("SFTP Hostname", 'xcloner-backup-and-restore') ?>"
28
  id="sftp_host" type="text" name="xcloner_sftp_hostname" class="validate"
29
- value="<?php echo get_option("xcloner_sftp_hostname") ?>">
30
  </div>
31
  <div class=" col s12 m2">
32
  <input placeholder="<?php echo __("SFTP Port", 'xcloner-backup-and-restore') ?>"
33
  id="sftp_port" type="text" name="xcloner_sftp_port" class="validate"
34
- value="<?php echo get_option("xcloner_sftp_port", 22) ?>">
35
  </div>
36
  </div>
37
 
@@ -42,7 +42,7 @@ if (!defined('WPINC')) {
42
  <div class=" col s12 m6">
43
  <input placeholder="<?php echo __("SFTP Username", 'xcloner-backup-and-restore') ?>"
44
  id="sftp_username" type="text" name="xcloner_sftp_username" class="validate"
45
- value="<?php echo get_option("xcloner_sftp_username") ?>" autocomplete="off">
46
  </div>
47
  </div>
48
 
@@ -54,7 +54,7 @@ if (!defined('WPINC')) {
54
  <div class=" col s12 m6">
55
  <input placeholder="<?php echo __("SFTP or Private Key Password", 'xcloner-backup-and-restore') ?>"
56
  id="ftp_spassword" type="text" name="xcloner_sftp_password" class="validate"
57
- value="<?php echo str_repeat('*', strlen(get_option("xcloner_sftp_password"))) ?>"
58
  autocomplete="off">
59
  </div>
60
  </div>
@@ -68,7 +68,7 @@ if (!defined('WPINC')) {
68
  placeholder="<?php echo __("Local Server Path or Contents of the SFTP Private Key RSA File", 'xcloner-backup-and-restore') ?>"
69
  id="sftp_private_key" type="text" name="xcloner_sftp_private_key"
70
  class="validate"
71
- value=""><?php echo get_option("xcloner_sftp_private_key") ?></textarea>
72
  </div>
73
  </div>
74
 
@@ -79,7 +79,7 @@ if (!defined('WPINC')) {
79
  <div class=" col s12 m6">
80
  <input placeholder="<?php echo __("SFTP Storage Folder", 'xcloner-backup-and-restore') ?>"
81
  id="sftp_root" type="text" name="xcloner_sftp_path" class="validate"
82
- value="<?php echo get_option("xcloner_sftp_path") ?>">
83
  </div>
84
  </div>
85
 
@@ -90,11 +90,11 @@ if (!defined('WPINC')) {
90
  <div class=" col s12 m2">
91
  <input placeholder="<?php echo __("SFTP Timeout", 'xcloner-backup-and-restore') ?>"
92
  id="sftp_timeout" type="text" name="xcloner_sftp_timeout" class="validate"
93
- value="<?php echo get_option("xcloner_sftp_timeout", 30) ?>">
94
  </div>
95
  </div>
96
 
97
- <?=common_cleanup_html('sftp')?>
98
 
99
  <div class="row">
100
  <div class="col s6 m4">
@@ -112,4 +112,4 @@ if (!defined('WPINC')) {
112
  </div>
113
  </div>
114
 
115
- </div>
26
  <div class="col s12 m6">
27
  <input placeholder="<?php echo __("SFTP Hostname", 'xcloner-backup-and-restore') ?>"
28
  id="sftp_host" type="text" name="xcloner_sftp_hostname" class="validate"
29
+ value="<?php echo esc_attr(get_option("xcloner_sftp_hostname")) ?>">
30
  </div>
31
  <div class=" col s12 m2">
32
  <input placeholder="<?php echo __("SFTP Port", 'xcloner-backup-and-restore') ?>"
33
  id="sftp_port" type="text" name="xcloner_sftp_port" class="validate"
34
+ value="<?php echo esc_attr(get_option("xcloner_sftp_port", 22)) ?>">
35
  </div>
36
  </div>
37
 
42
  <div class=" col s12 m6">
43
  <input placeholder="<?php echo __("SFTP Username", 'xcloner-backup-and-restore') ?>"
44
  id="sftp_username" type="text" name="xcloner_sftp_username" class="validate"
45
+ value="<?php echo esc_attr(get_option("xcloner_sftp_username")) ?>" autocomplete="off">
46
  </div>
47
  </div>
48
 
54
  <div class=" col s12 m6">
55
  <input placeholder="<?php echo __("SFTP or Private Key Password", 'xcloner-backup-and-restore') ?>"
56
  id="ftp_spassword" type="text" name="xcloner_sftp_password" class="validate"
57
+ value="<?php echo esc_attr(str_repeat('*', strlen(get_option("xcloner_sftp_password")))) ?>"
58
  autocomplete="off">
59
  </div>
60
  </div>
68
  placeholder="<?php echo __("Local Server Path or Contents of the SFTP Private Key RSA File", 'xcloner-backup-and-restore') ?>"
69
  id="sftp_private_key" type="text" name="xcloner_sftp_private_key"
70
  class="validate"
71
+ value=""><?php echo esc_attr(get_option("xcloner_sftp_private_key")) ?></textarea>
72
  </div>
73
  </div>
74
 
79
  <div class=" col s12 m6">
80
  <input placeholder="<?php echo __("SFTP Storage Folder", 'xcloner-backup-and-restore') ?>"
81
  id="sftp_root" type="text" name="xcloner_sftp_path" class="validate"
82
+ value="<?php echo esc_attr(get_option("xcloner_sftp_path")) ?>">
83
  </div>
84
  </div>
85
 
90
  <div class=" col s12 m2">
91
  <input placeholder="<?php echo __("SFTP Timeout", 'xcloner-backup-and-restore') ?>"
92
  id="sftp_timeout" type="text" name="xcloner_sftp_timeout" class="validate"
93
+ value="<?php echo esc_attr(get_option("xcloner_sftp_timeout", 30)) ?>">
94
  </div>
95
  </div>
96
 
97
+ <?php echo common_cleanup_html('sftp')?>
98
 
99
  <div class="row">
100
  <div class="col s6 m4">
112
  </div>
113
  </div>
114
 
115
+ </div>
admin/partials/remote_storage/webdav.php CHANGED
@@ -38,7 +38,7 @@ if (!defined('WPINC')) {
38
  <div class=" col s12 m6">
39
  <input placeholder="<?php echo __("WebDAV Service Url like https://webdav.yandex.com", 'xcloner-backup-and-restore') ?>"
40
  id="webdav_url" type="text" name="xcloner_webdav_url" class="validate"
41
- value="<?php echo get_option("xcloner_webdav_url") ?>" autocomplete="off">
42
  </div>
43
  </div>
44
 
@@ -49,7 +49,7 @@ if (!defined('WPINC')) {
49
  <div class=" col s12 m6">
50
  <input placeholder="<?php echo __("WebDAV Username", 'xcloner-backup-and-restore') ?>"
51
  id="webdav_username" type="text" name="xcloner_webdav_username" class="validate"
52
- value="<?php echo get_option("xcloner_webdav_username") ?>" autocomplete="off">
53
  </div>
54
  </div>
55
 
@@ -61,7 +61,7 @@ if (!defined('WPINC')) {
61
  <input placeholder="<?php echo __("WebDAV Password", 'xcloner-backup-and-restore') ?>"
62
  id="webdav_password" type="text" name="xcloner_webdav_password"
63
  class="validate"
64
- value="<?php echo str_repeat('*', strlen(get_option("xcloner_webdav_password"))) ?>"
65
  autocomplete="off">
66
  </div>
67
  </div>
@@ -74,12 +74,12 @@ if (!defined('WPINC')) {
74
  <input placeholder="<?php echo __("WebDAV Target Path", 'xcloner-backup-and-restore') ?>"
75
  id="webdav_target_folder" type="text" name="xcloner_webdav_target_folder"
76
  class="validate"
77
- value="<?php echo get_option("xcloner_webdav_target_folder") ?>"
78
  autocomplete="off">
79
  </div>
80
  </div>
81
 
82
- <?=common_cleanup_html('webdav')?>
83
 
84
  <div class="row">
85
  <div class="col s6 m4">
@@ -97,4 +97,4 @@ if (!defined('WPINC')) {
97
  </div>
98
  </div>
99
 
100
- </div>
38
  <div class=" col s12 m6">
39
  <input placeholder="<?php echo __("WebDAV Service Url like https://webdav.yandex.com", 'xcloner-backup-and-restore') ?>"
40
  id="webdav_url" type="text" name="xcloner_webdav_url" class="validate"
41
+ value="<?php echo esc_attr(get_option("xcloner_webdav_url")) ?>" autocomplete="off">
42
  </div>
43
  </div>
44
 
49
  <div class=" col s12 m6">
50
  <input placeholder="<?php echo __("WebDAV Username", 'xcloner-backup-and-restore') ?>"
51
  id="webdav_username" type="text" name="xcloner_webdav_username" class="validate"
52
+ value="<?php echo esc_attr(get_option("xcloner_webdav_username")) ?>" autocomplete="off">
53
  </div>
54
  </div>
55
 
61
  <input placeholder="<?php echo __("WebDAV Password", 'xcloner-backup-and-restore') ?>"
62
  id="webdav_password" type="text" name="xcloner_webdav_password"
63
  class="validate"
64
+ value="<?php echo esc_attr(str_repeat('*', strlen(get_option("xcloner_webdav_password")))) ?>"
65
  autocomplete="off">
66
  </div>
67
  </div>
74
  <input placeholder="<?php echo __("WebDAV Target Path", 'xcloner-backup-and-restore') ?>"
75
  id="webdav_target_folder" type="text" name="xcloner_webdav_target_folder"
76
  class="validate"
77
+ value="<?php echo esc_attr(get_option("xcloner_webdav_target_folder")) ?>"
78
  autocomplete="off">
79
  </div>
80
  </div>
81
 
82
+ <?php echo common_cleanup_html('webdav')?>
83
 
84
  <div class="row">
85
  <div class="col s6 m4">
97
  </div>
98
  </div>
99
 
100
+ </div>
admin/partials/xcloner_generate_backups_page.php CHANGED
@@ -13,21 +13,29 @@ $tab = 1;
13
  <div class="col s12">
14
  <ul class="nav-tab-wrapper content">
15
  <li><a href="#backup_options"
16
- class="nav-tab col s12 m3 l2 nav-tab-active"><?php echo $tab . ". " . __('Backup Options', 'xcloner-backup-and-restore') ?></a>
17
  </li>
18
  <?php if ($xcloner_settings->get_enable_mysql_backup()): ?>
19
- <li><a href="#database_options"
20
- class="nav-tab col s12 m3 l2 "><?php echo ++$tab . ". " . __('Database Options', 'xcloner-backup-and-restore') ?></a>
 
 
21
  </li>
22
  <?php endif ?>
23
- <li><a href="#files_options"
24
- class="nav-tab col s12 m3 l2 "><?php echo ++$tab . ". " . __('Files Options', 'xcloner-backup-and-restore') ?></a>
 
 
25
  </li>
26
- <li><a href="#generate_backup"
27
- class="nav-tab col s12 m3 l2 "><?php echo ++$tab . ". " . __('Generate Backup', 'xcloner-backup-and-restore') ?></a>
 
 
28
  </li>
29
- <li><a href="#schedule_backup"
30
- class="nav-tab col s12 m3 l2 "><?php echo ++$tab . ". " . __('Schedule Backup', 'xcloner-backup-and-restore') ?></a>
 
 
31
  </li>
32
  </ul>
33
 
@@ -47,14 +55,17 @@ $tab = 1;
47
  <div class="input-field inline col s12 m10 l6">
48
  <i class="material-icons prefix">input</i>
49
  <input name="backup_name" id="backup_name" type="text"
50
- value=<?php echo $xcloner_settings->get_default_backup_name() ?>>
51
- <label
52
- for="backup_name"><?php echo __('Backup Name', 'xcloner-backup-and-restore') ?></label>
 
53
  </div>
54
  <div class="hide-on-small-only m2">
55
  <a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50"
56
  data-tooltip="<?php echo __('The default backup name, supported tags [time], [hostname], [domain]', 'xcloner-backup-and-restore') ?>"
57
- data-tooltip-id=""><i class="material-icons">help_outline</i></a>
 
 
58
  </div>
59
  </div>
60
 
@@ -62,14 +73,17 @@ $tab = 1;
62
  <div class="input-field inline col s12 m10 l6">
63
  <i class="material-icons prefix">email</i>
64
  <input name="email_notification" id="email_notification" type="text"
65
- value="<?php echo get_option('admin_email'); ?>">
66
- <label
67
- for="email_notification"><?php echo __('Send Email Notification To', 'xcloner-backup-and-restore') ?></label>
 
68
  </div>
69
  <div class="hide-on-small-only m2">
70
  <a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50"
71
  data-tooltip="<?php echo __('If left blank, no notification will be sent', 'xcloner-backup-and-restore') ?>"
72
- data-tooltip-id=""><i class="material-icons">help_outline</i></a>
 
 
73
  </div>
74
  </div>
75
 
@@ -77,24 +91,27 @@ $tab = 1;
77
  <div class="input-field inline col s10 m10 l6">
78
  <i class="material-icons prefix">access_time</i>
79
  <input type="text" id="diff_start_date" class="datepicker_max_today" name="diff_start_date">
80
- <label
81
- for="diff_start_date"><?php echo __('Backup Only Files Modified/Created After', 'xcloner-backup-and-restore') ?></label>
 
82
  </div>
83
  <div class="hide-on-small-only m2">
84
  <a class="btn-floating tooltipped btn-small" data-html="true" data-position="center"
85
  data-delay="50"
86
- data-tooltip="<?php echo __("This option allows you to create a differential backup that will include only <br> changed files since the set date, leave blank to include all files", "xcloner-backup-and-restore") ?>"><i
87
- class="material-icons">help_outline</i></a>
 
88
  </div>
89
  </div>
90
 
91
  <div class="row">
92
  <div class="input-field col s6 m5 l4">
93
  <i class="material-icons prefix">enhanced_encryption</i>
94
- <label
95
- for="backup_comments"><?php echo __('Encrypt Backup', 'xcloner-backup-and-restore') ?></label>
96
-
97
  </div>
 
98
  <div class="input-field col s6 m5 l2">
99
  <div class="switch">
100
  <label>
@@ -109,7 +126,9 @@ $tab = 1;
109
  <div class="hide-on-small-only s12 m2">
110
  <a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50"
111
  data-tooltip="<?php echo __('Enable this option if you want to encrypt the final backup', 'xcloner-backup-and-restore') ?>"
112
- data-tooltip-id=""><i class="material-icons">help_outline</i></a>
 
 
113
  </div>
114
  </div>
115
 
@@ -118,13 +137,16 @@ $tab = 1;
118
  <i class="material-icons prefix">input</i>
119
  <textarea name="backup_comments" id="backup_comments"
120
  class="materialize-textarea"></textarea>
121
- <label
122
- for="backup_comments"><?php echo __('Backup Comments', 'xcloner-backup-and-restore') ?></label>
 
123
  </div>
124
  <div class="hide-on-small-only m2">
125
  <a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50"
126
  data-tooltip="<?php echo __('Some default backup comments that will be stored inside the backup archive', 'xcloner-backup-and-restore') ?>"
127
- data-tooltip-id=""><i class="material-icons">help_outline</i></a>
 
 
128
  </div>
129
  </div>
130
 
@@ -134,10 +156,13 @@ $tab = 1;
134
  <div class="input-field col s12 m10 l6">
135
  <i class="material-icons prefix">swap_horiz</i>
136
  <select name="schedule_storage" id="schedule_storage" class="schedule_storage validate">
137
- <option value="" selected><?php echo __('none', 'xcloner-backup-and-restore') ?>
 
138
  </option>
139
  <?php foreach ($available_storages as $storage => $text): ?>
140
- <option value="<?php echo $storage ?>"><?php echo $text ?></option>
 
 
141
  <?php endforeach ?>
142
  </select>
143
  <label><?php echo __('Send To Remote Storage', 'xcloner-backup-and-restore') ?></label>
@@ -145,15 +170,18 @@ $tab = 1;
145
  <div class="hide-on-small-only m2">
146
  <a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50"
147
  data-tooltip="<?php echo __('Transfer backup to the remote storage destintion once finished.', 'xcloner-backup-and-restore') ?>"
148
- data-tooltip-id=""><i class="material-icons">help_outline</i></a>
 
 
149
  </div>
150
  </div>
151
 
152
  <div class="row" id="delete_remote_storage" style="display:none">
153
  <div class="input-field col s6 m5 l4">
154
  <i class="material-icons prefix">delete</i>
155
- <label
156
- for="backup_comments"><?php echo __('Delete local copy after transfer', 'xcloner-backup-and-restore') ?></label>
 
157
 
158
  </div>
159
  <div class="input-field col s6 m5 l2">
@@ -171,7 +199,9 @@ $tab = 1;
171
  <div class="hide-on-small-only s12 m2">
172
  <a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50"
173
  data-tooltip="<?php echo __('Delete local backup file after transfer', 'xcloner-backup-and-restore') ?>"
174
- data-tooltip-id=""><i class="material-icons">help_outline</i></a>
 
 
175
  </div>
176
  </div>
177
  <?php endif ?>
@@ -192,7 +222,9 @@ $tab = 1;
192
  :
193
  <a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50"
194
  data-tooltip="<?php echo __('Enable the \'Backup only WP tables\' setting if you don\'t want to show all other databases and tables not related to this Wordpress install', 'xcloner-backup-and-restore'); ?>"
195
- data-tooltip-id=""><i class="material-icons">help_outline</i></a>
 
 
196
  </h2>
197
 
198
  <!-- database/tables tree -->
@@ -218,7 +250,9 @@ $tab = 1;
218
  <a class="btn-floating tooltipped btn-small" data-position="bottom" data-delay="50"
219
  data-html="true"
220
  data-tooltip="<?php echo __('You can navigate below through all your site structure(Backup Start Location) to exclude any file/folder you need by clicking the checkbox near it. <br />If the checkobx is disabled, then it matches a Regex Exclude File option and it can\'t be unchecked', 'xcloner-backup-and-restore'); ?>"
221
- data-tooltip-id=""><i class="material-icons">help_outline</i></a>
 
 
222
  </h2>
223
 
224
  <!-- Files System Container -->
@@ -246,15 +280,17 @@ $tab = 1;
246
  <ul class="backup-status collapsible collapsible-accordion" data-collapsible="accordion">
247
  <li class="file-system">
248
  <div class="collapsible-header">
249
- <i
250
- class="material-icons">folder</i><?php echo __('Scanning The File System...', 'xcloner-backup-and-restore') ?>
251
 
252
  <p class="right">
253
  <?php echo sprintf(__('Found %s files (%s)', 'xcloner-backup-and-restore'), '<span class="file-counter">0</span>', '<span class="file-size-total">0</span>MB') ?>
254
  </p>
255
 
256
  <div>
257
- <p class="right"><span class="last-logged-file"></span></p>
 
 
258
  </div>
259
 
260
  <div class="progress">
@@ -266,8 +302,8 @@ $tab = 1;
266
  <?php if ($xcloner_settings->get_enable_mysql_backup()): ?>
267
  <li class="database-backup">
268
  <div class="collapsible-header">
269
- <i
270
- class="material-icons">storage</i><?php echo __('Generating the Mysql Backup...', 'xcloner-backup-and-restore') ?>
271
 
272
  <p class="right">
273
  <?php echo sprintf(__('Found %s tables in %s databases (%s)', 'xcloner-backup-and-restore'), '<span class="table-counter">0</span>', '<span class="database-counter">0</span>', '<span data-processed="0" class="total-records">0</span> records', 'xcloner-backup-and-restore') ?>
@@ -295,15 +331,17 @@ $tab = 1;
295
  <?php endif ?>
296
  <li class="files-backup">
297
  <div class="collapsible-header">
298
- <i
299
- class="material-icons">archive</i><?php echo __('Adding Files to Archive...', 'xcloner-backup-and-restore') ?>
300
 
301
  <p class="right">
302
  <?php echo sprintf(__('Adding %s files (%s)', 'xcloner-backup-and-restore'), '<span class="file-counter">0</span>', '<span data-processed="0" class="file-size-total">0</span>MB') ?>
303
  </p>
304
 
305
  <div>
306
- <p class="right"><span class="last-logged-file"></span></p>
 
 
307
  </div>
308
 
309
  <div class="progress">
@@ -324,10 +362,12 @@ $tab = 1;
324
  </li>
325
  <li class="backup-encryption">
326
  <div class="collapsible-header">
327
- <i
328
- class="material-icons">enhanced_encryption</i><?php echo __('Encrypting Backup Data...', 'xcloner-backup-and-restore') ?>
329
 
330
- <p class="right"><span class="status"></span></p>
 
 
331
 
332
  <div>
333
  <p class="right"><span class="last-logged-file"></span></p>
@@ -364,15 +404,18 @@ $tab = 1;
364
  <p class="right">
365
  <?php if (sizeof($available_storages)): ?>
366
  <a href="#" class="cloud-upload"
367
- title="<?php echo __("Send Backup To Remote Storage", 'xcloner-backup-and-restore') ?>"><i
368
- class="material-icons">swap_horiz</i></a>
 
369
  <?php endif ?>
370
  <a href="#" class="download"
371
- title="<?php echo __("Download Backup", 'xcloner-backup-and-restore') ?>"><i
372
- class="material-icons">file_download</i></a>
 
373
  <a href="#" class="list-backup-content"
374
- title="<?php echo __("List Backup Content", 'xcloner-backup-and-restore') ?>"><i
375
- class="material-icons">folder_open</i></a>
 
376
  </p>
377
  <div class="clear"></div>
378
  <div class="progress">
@@ -382,9 +425,11 @@ $tab = 1;
382
  </div>
383
  <div class="collapsible-body center-align">
384
  <div class="row">
385
- <h5><?php echo __("Thank you for using XCloner.", 'xcloner-backup-and-restore') ?>
 
386
  </h5>
387
- <h6><?php echo sprintf(__("We would love to hear about your experience in the %s.", 'xcloner-backup-and-restore'), '<a href="https://wordpress.org/support/plugin/xcloner-backup-and-restore/reviews/" target="_blank">Wordpress XCloner Reviews Section</a>') ?>
 
388
  </h6>
389
  <a class="twitter-follow-button" href="https://twitter.com/WatchfulDashbrd"
390
  data-show-count="false">Follow @WatchfulDashbrd</a>
@@ -408,9 +453,15 @@ $tab = 1;
408
  <div class="row">
409
  <div id="schedule_backup_success"
410
  class="col s12 l6 updated settings-error notice is-dismissible">
411
- <p><strong><?php echo __('Schedule Saved', 'xcloner-backup-and-restore') ?></strong></p>
412
- <button type="button" class="notice-dismiss"><span
413
- class="screen-reader-text"><?php echo __('(Dismiss this notice.', 'xcloner-backup-and-restore') ?></span>
 
 
 
 
 
 
414
  </button>
415
  </div>
416
  </div>
@@ -418,21 +469,24 @@ $tab = 1;
418
  <div class="row">
419
  <div class="input-field inline col s12 l7">
420
  <input type="text" id="schedule_name" class="" name="schedule_name" required>
421
- <label
422
- for="schedule_name"><?php echo __('Profile Name', 'xcloner-backup-and-restore') ?></label>
 
423
  </div>
424
  </div>
425
 
426
  <div class="row">
427
  <div class="input-field inline col s12 m8 l4">
428
  <input type="text" id="datepicker" class="datepicker" name="schedule_start_date">
429
- <label
430
- for="datepicker"><?php echo __('Schedule Backup To Start On:', 'xcloner-backup-and-restore') ?></label>
 
431
  </div>
432
  <div class="input-field inline col s12 m4 l3">
433
  <input id="timepicker_ampm_dark" class="timepicker" type="text" name="schedule_start_time">
434
- <label
435
- for="timepicker_ampm_dark"><?php echo __('At:', 'xcloner-backup-and-restore') ?></label>
 
436
  </div>
437
  </div>
438
 
@@ -440,25 +494,30 @@ $tab = 1;
440
  <div class="input-field col s12 l7">
441
  <select name="schedule_frequency" id="schedule_frequency" class="validate" required>
442
  <option value="" disabled selected>
443
- <?php echo __('please select', 'xcloner-backup-and-restore') ?></option>
 
444
  <?php
445
  $schedules = $xcloner_scheduler->get_available_intervals();
446
 
447
  foreach ($schedules as $key => $schedule) {
448
  ?>
449
- <option value="<?php echo $key ?>"><?php echo $schedule['display'] ?></option>
 
 
450
  <?php
451
  }
452
  ?>
453
  </select>
454
- <label><?php echo __('Schedule Frequency', 'xcloner-backup-and-restore') ?></label>
 
 
455
  </div>
456
  </div>
457
 
458
  <div class="row">
459
  <div class="col s12 l7">
460
- <button class="right btn waves-effect waves-light submit_schedule" type="submit"
461
- name="action"><?php echo __("Save Schedule", 'xcloner-backup-and-restore') ?>
462
  <i class="material-icons right">send</i>
463
  </button>
464
  </div>
@@ -474,9 +533,9 @@ $tab = 1;
474
  <a title="Online Help" href="https://wordpress.org/support/plugin/xcloner-backup-and-restore" target="_blank"><i
475
  class="material-icons medium right">help</i></a>
476
  <div class="modal-content">
477
- <h4 class="title_line"><span class="title"></span></h4>
478
- <!--<h5 class="title_line"><?php echo __('Message') ?>: <span class="msg.old"></span></h5>-->
479
- <h5><?php echo __('Response Code', 'xcloner-backup-and-restore') ?>: <span class="status"></span></h5>
480
  <textarea class="body" rows="5"></textarea>
481
  </div>
482
  <div class="modal-footer">
@@ -489,7 +548,9 @@ $tab = 1;
489
  <!-- List Backup Content Modal-->
490
  <div id="backup_cotent_modal" class="modal">
491
  <div class="modal-content">
492
- <h4><?php echo sprintf(__("Listing Backup Content ", 'xcloner-backup-and-restore'), "") ?></h4>
 
 
493
  <h5 class="backup-name"></h5>
494
 
495
  <div class="progress">
@@ -504,19 +565,26 @@ $tab = 1;
504
  <form method="POST" class="remote-storage-form">
505
  <input type="hidden" name="file" class="backup_name">
506
  <div class="modal-content">
507
- <h4><?php echo __("Remote Storage Transfer", 'xcloner-backup-and-restore') ?></h4>
 
 
508
  <p>
509
  <?php if (sizeof($available_storages)): ?>
510
  <div class="row">
511
  <div class="col s12 label">
512
- <label><?php echo __(sprintf('Send %s to remote storage', "<span class='backup_name'></span>"), 'xcloner-backup-and-restore') ?></label>
 
 
513
  </div>
514
  <div class="input-field col s8 m10">
515
  <select name="transfer_storage" id="transfer_storage" class="validate" required>
516
- <option value="" selected><?php echo __('please select...', 'xcloner-backup-and-restore') ?>
 
517
  </option>
518
  <?php foreach ($available_storages as $storage => $text): ?>
519
- <option value="<?php echo $storage ?>"><?php echo $text ?></option>
 
 
520
  <?php endforeach ?>
521
  </select>
522
 
@@ -535,7 +603,6 @@ $tab = 1;
535
  </div>
536
  </div>
537
  <?php endif ?>
538
- </p>
539
  </div>
540
  </form>
541
  </div>
13
  <div class="col s12">
14
  <ul class="nav-tab-wrapper content">
15
  <li><a href="#backup_options"
16
+ class="nav-tab col s12 m3 l2 nav-tab-active"><?php echo esc_html($tab) . ". " . __('Backup Options', 'xcloner-backup-and-restore') ?></a>
17
  </li>
18
  <?php if ($xcloner_settings->get_enable_mysql_backup()): ?>
19
+ <li>
20
+ <a href="#database_options" class="nav-tab col s12 m3 l2 ">
21
+ <?php echo esc_html(++$tab) . ". " . __('Database Options', 'xcloner-backup-and-restore') ?>
22
+ </a>
23
  </li>
24
  <?php endif ?>
25
+ <li>
26
+ <a href="#files_options" class="nav-tab col s12 m3 l2 ">
27
+ <?php echo esc_html(++$tab) . ". " . __('Files Options', 'xcloner-backup-and-restore') ?>
28
+ </a>
29
  </li>
30
+ <li>
31
+ <a href="#generate_backup" class="nav-tab col s12 m3 l2 ">
32
+ <?php echo esc_html(++$tab) . ". " . __('Generate Backup', 'xcloner-backup-and-restore') ?>
33
+ </a>
34
  </li>
35
+ <li>
36
+ <a href="#schedule_backup" class="nav-tab col s12 m3 l2 ">
37
+ <?php echo esc_html(++$tab) . ". " . __('Schedule Backup', 'xcloner-backup-and-restore') ?>
38
+ </a>
39
  </li>
40
  </ul>
41
 
55
  <div class="input-field inline col s12 m10 l6">
56
  <i class="material-icons prefix">input</i>
57
  <input name="backup_name" id="backup_name" type="text"
58
+ value=<?php echo esc_attr($xcloner_settings->get_default_backup_name()) ?>>
59
+ <label for="backup_name">
60
+ <?php echo __('Backup Name', 'xcloner-backup-and-restore') ?>
61
+ </label>
62
  </div>
63
  <div class="hide-on-small-only m2">
64
  <a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50"
65
  data-tooltip="<?php echo __('The default backup name, supported tags [time], [hostname], [domain]', 'xcloner-backup-and-restore') ?>"
66
+ data-tooltip-id="">
67
+ <i class="material-icons">help_outline</i>
68
+ </a>
69
  </div>
70
  </div>
71
 
73
  <div class="input-field inline col s12 m10 l6">
74
  <i class="material-icons prefix">email</i>
75
  <input name="email_notification" id="email_notification" type="text"
76
+ value="<?php echo esc_html(get_option('admin_email')); ?>">
77
+ <label for="email_notification">
78
+ <?php echo __('Send Email Notification To', 'xcloner-backup-and-restore') ?>
79
+ </label>
80
  </div>
81
  <div class="hide-on-small-only m2">
82
  <a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50"
83
  data-tooltip="<?php echo __('If left blank, no notification will be sent', 'xcloner-backup-and-restore') ?>"
84
+ data-tooltip-id="">
85
+ <i class="material-icons">help_outline</i>
86
+ </a>
87
  </div>
88
  </div>
89
 
91
  <div class="input-field inline col s10 m10 l6">
92
  <i class="material-icons prefix">access_time</i>
93
  <input type="text" id="diff_start_date" class="datepicker_max_today" name="diff_start_date">
94
+ <label for="diff_start_date">
95
+ <?php echo __('Backup Only Files Modified/Created After', 'xcloner-backup-and-restore') ?>
96
+ </label>
97
  </div>
98
  <div class="hide-on-small-only m2">
99
  <a class="btn-floating tooltipped btn-small" data-html="true" data-position="center"
100
  data-delay="50"
101
+ data-tooltip="<?php echo __("This option allows you to create a differential backup that will include only <br> changed files since the set date, leave blank to include all files", "xcloner-backup-and-restore") ?>">
102
+ <i class="material-icons">help_outline</i>
103
+ </a>
104
  </div>
105
  </div>
106
 
107
  <div class="row">
108
  <div class="input-field col s6 m5 l4">
109
  <i class="material-icons prefix">enhanced_encryption</i>
110
+ <label for="backup_comments">
111
+ <?php echo __('Encrypt Backup', 'xcloner-backup-and-restore') ?>
112
+ </label>
113
  </div>
114
+
115
  <div class="input-field col s6 m5 l2">
116
  <div class="switch">
117
  <label>
126
  <div class="hide-on-small-only s12 m2">
127
  <a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50"
128
  data-tooltip="<?php echo __('Enable this option if you want to encrypt the final backup', 'xcloner-backup-and-restore') ?>"
129
+ data-tooltip-id="">
130
+ <i class="material-icons">help_outline</i>
131
+ </a>
132
  </div>
133
  </div>
134
 
137
  <i class="material-icons prefix">input</i>
138
  <textarea name="backup_comments" id="backup_comments"
139
  class="materialize-textarea"></textarea>
140
+ <label for="backup_comments">
141
+ <?php echo __('Backup Comments', 'xcloner-backup-and-restore') ?>
142
+ </label>
143
  </div>
144
  <div class="hide-on-small-only m2">
145
  <a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50"
146
  data-tooltip="<?php echo __('Some default backup comments that will be stored inside the backup archive', 'xcloner-backup-and-restore') ?>"
147
+ data-tooltip-id="">
148
+ <i class="material-icons">help_outline</i>
149
+ </a>
150
  </div>
151
  </div>
152
 
156
  <div class="input-field col s12 m10 l6">
157
  <i class="material-icons prefix">swap_horiz</i>
158
  <select name="schedule_storage" id="schedule_storage" class="schedule_storage validate">
159
+ <option value="" selected>
160
+ <?php echo __('none', 'xcloner-backup-and-restore') ?>
161
  </option>
162
  <?php foreach ($available_storages as $storage => $text): ?>
163
+ <option value="<?php echo esc_attr($storage) ?>">
164
+ <?php echo esc_html($text) ?>
165
+ </option>
166
  <?php endforeach ?>
167
  </select>
168
  <label><?php echo __('Send To Remote Storage', 'xcloner-backup-and-restore') ?></label>
170
  <div class="hide-on-small-only m2">
171
  <a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50"
172
  data-tooltip="<?php echo __('Transfer backup to the remote storage destintion once finished.', 'xcloner-backup-and-restore') ?>"
173
+ data-tooltip-id="">
174
+ <i class="material-icons">help_outline</i>
175
+ </a>
176
  </div>
177
  </div>
178
 
179
  <div class="row" id="delete_remote_storage" style="display:none">
180
  <div class="input-field col s6 m5 l4">
181
  <i class="material-icons prefix">delete</i>
182
+ <label for="backup_comments">
183
+ <?php echo __('Delete local copy after transfer', 'xcloner-backup-and-restore') ?>
184
+ </label>
185
 
186
  </div>
187
  <div class="input-field col s6 m5 l2">
199
  <div class="hide-on-small-only s12 m2">
200
  <a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50"
201
  data-tooltip="<?php echo __('Delete local backup file after transfer', 'xcloner-backup-and-restore') ?>"
202
+ data-tooltip-id="">
203
+ <i class="material-icons">help_outline</i>
204
+ </a>
205
  </div>
206
  </div>
207
  <?php endif ?>
222
  :
223
  <a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50"
224
  data-tooltip="<?php echo __('Enable the \'Backup only WP tables\' setting if you don\'t want to show all other databases and tables not related to this Wordpress install', 'xcloner-backup-and-restore'); ?>"
225
+ data-tooltip-id="">
226
+ <i class="material-icons">help_outline</i>
227
+ </a>
228
  </h2>
229
 
230
  <!-- database/tables tree -->
250
  <a class="btn-floating tooltipped btn-small" data-position="bottom" data-delay="50"
251
  data-html="true"
252
  data-tooltip="<?php echo __('You can navigate below through all your site structure(Backup Start Location) to exclude any file/folder you need by clicking the checkbox near it. <br />If the checkobx is disabled, then it matches a Regex Exclude File option and it can\'t be unchecked', 'xcloner-backup-and-restore'); ?>"
253
+ data-tooltip-id="">
254
+ <i class="material-icons">help_outline</i>
255
+ </a>
256
  </h2>
257
 
258
  <!-- Files System Container -->
280
  <ul class="backup-status collapsible collapsible-accordion" data-collapsible="accordion">
281
  <li class="file-system">
282
  <div class="collapsible-header">
283
+ <i class="material-icons">folder</i>
284
+ <?php echo __('Scanning The File System...', 'xcloner-backup-and-restore') ?>
285
 
286
  <p class="right">
287
  <?php echo sprintf(__('Found %s files (%s)', 'xcloner-backup-and-restore'), '<span class="file-counter">0</span>', '<span class="file-size-total">0</span>MB') ?>
288
  </p>
289
 
290
  <div>
291
+ <p class="right">
292
+ <span class="last-logged-file"></span>
293
+ </p>
294
  </div>
295
 
296
  <div class="progress">
302
  <?php if ($xcloner_settings->get_enable_mysql_backup()): ?>
303
  <li class="database-backup">
304
  <div class="collapsible-header">
305
+ <i class="material-icons">storage</i>
306
+ <?php echo __('Generating the Mysql Backup...', 'xcloner-backup-and-restore') ?>
307
 
308
  <p class="right">
309
  <?php echo sprintf(__('Found %s tables in %s databases (%s)', 'xcloner-backup-and-restore'), '<span class="table-counter">0</span>', '<span class="database-counter">0</span>', '<span data-processed="0" class="total-records">0</span> records', 'xcloner-backup-and-restore') ?>
331
  <?php endif ?>
332
  <li class="files-backup">
333
  <div class="collapsible-header">
334
+ <i class="material-icons">archive</i>
335
+ <?php echo __('Adding Files to Archive...', 'xcloner-backup-and-restore') ?>
336
 
337
  <p class="right">
338
  <?php echo sprintf(__('Adding %s files (%s)', 'xcloner-backup-and-restore'), '<span class="file-counter">0</span>', '<span data-processed="0" class="file-size-total">0</span>MB') ?>
339
  </p>
340
 
341
  <div>
342
+ <p class="right">
343
+ <span class="last-logged-file"></span>
344
+ </p>
345
  </div>
346
 
347
  <div class="progress">
362
  </li>
363
  <li class="backup-encryption">
364
  <div class="collapsible-header">
365
+ <i class="material-icons">enhanced_encryption</i>
366
+ <?php echo __('Encrypting Backup Data...', 'xcloner-backup-and-restore') ?>
367
 
368
+ <p class="right">
369
+ <span class="status"></span>
370
+ </p>
371
 
372
  <div>
373
  <p class="right"><span class="last-logged-file"></span></p>
404
  <p class="right">
405
  <?php if (sizeof($available_storages)): ?>
406
  <a href="#" class="cloud-upload"
407
+ title="<?php echo __("Send Backup To Remote Storage", 'xcloner-backup-and-restore') ?>">
408
+ <i class="material-icons">swap_horiz</i>
409
+ </a>
410
  <?php endif ?>
411
  <a href="#" class="download"
412
+ title="<?php echo __("Download Backup", 'xcloner-backup-and-restore') ?>">
413
+ <i class="material-icons">file_download</i>
414
+ </a>
415
  <a href="#" class="list-backup-content"
416
+ title="<?php echo __("List Backup Content", 'xcloner-backup-and-restore') ?>">
417
+ <i class="material-icons">folder_open</i>
418
+ </a>
419
  </p>
420
  <div class="clear"></div>
421
  <div class="progress">
425
  </div>
426
  <div class="collapsible-body center-align">
427
  <div class="row">
428
+ <h5>
429
+ <?php echo __("Thank you for using XCloner.", 'xcloner-backup-and-restore') ?>
430
  </h5>
431
+ <h6>
432
+ <?php echo sprintf(__("We would love to hear about your experience in the %s.", 'xcloner-backup-and-restore'), '<a href="https://wordpress.org/support/plugin/xcloner-backup-and-restore/reviews/" target="_blank">Wordpress XCloner Reviews Section</a>') ?>
433
  </h6>
434
  <a class="twitter-follow-button" href="https://twitter.com/WatchfulDashbrd"
435
  data-show-count="false">Follow @WatchfulDashbrd</a>
453
  <div class="row">
454
  <div id="schedule_backup_success"
455
  class="col s12 l6 updated settings-error notice is-dismissible">
456
+ <p>
457
+ <strong>
458
+ <?php echo __('Schedule Saved', 'xcloner-backup-and-restore') ?>
459
+ </strong>
460
+ </p>
461
+ <button type="button" class="notice-dismiss">
462
+ <span class="screen-reader-text">
463
+ <?php echo __('(Dismiss this notice.', 'xcloner-backup-and-restore') ?>
464
+ </span>
465
  </button>
466
  </div>
467
  </div>
469
  <div class="row">
470
  <div class="input-field inline col s12 l7">
471
  <input type="text" id="schedule_name" class="" name="schedule_name" required>
472
+ <label for="schedule_name">
473
+ <?php echo __('Profile Name', 'xcloner-backup-and-restore') ?>
474
+ </label>
475
  </div>
476
  </div>
477
 
478
  <div class="row">
479
  <div class="input-field inline col s12 m8 l4">
480
  <input type="text" id="datepicker" class="datepicker" name="schedule_start_date">
481
+ <label for="datepicker">
482
+ <?php echo __('Schedule Backup To Start On:', 'xcloner-backup-and-restore') ?>
483
+ </label>
484
  </div>
485
  <div class="input-field inline col s12 m4 l3">
486
  <input id="timepicker_ampm_dark" class="timepicker" type="text" name="schedule_start_time">
487
+ <label for="timepicker_ampm_dark">
488
+ <?php echo __('At:', 'xcloner-backup-and-restore') ?>
489
+ </label>
490
  </div>
491
  </div>
492
 
494
  <div class="input-field col s12 l7">
495
  <select name="schedule_frequency" id="schedule_frequency" class="validate" required>
496
  <option value="" disabled selected>
497
+ <?php echo __('please select', 'xcloner-backup-and-restore') ?>
498
+ </option>
499
  <?php
500
  $schedules = $xcloner_scheduler->get_available_intervals();
501
 
502
  foreach ($schedules as $key => $schedule) {
503
  ?>
504
+ <option value="<?php echo esc_attr($key) ?>">
505
+ <?php echo esc_html($schedule['display']) ?>
506
+ </option>
507
  <?php
508
  }
509
  ?>
510
  </select>
511
+ <label>
512
+ <?php echo __('Schedule Frequency', 'xcloner-backup-and-restore') ?>
513
+ </label>
514
  </div>
515
  </div>
516
 
517
  <div class="row">
518
  <div class="col s12 l7">
519
+ <button class="right btn waves-effect waves-light submit_schedule" type="submit" name="action">
520
+ <?php echo __("Save Schedule", 'xcloner-backup-and-restore') ?>
521
  <i class="material-icons right">send</i>
522
  </button>
523
  </div>
533
  <a title="Online Help" href="https://wordpress.org/support/plugin/xcloner-backup-and-restore" target="_blank"><i
534
  class="material-icons medium right">help</i></a>
535
  <div class="modal-content">
536
+ <h5>
537
+ <?php echo __('Response Code', 'xcloner-backup-and-restore') ?>: <span class="status"></span>
538
+ </h5>
539
  <textarea class="body" rows="5"></textarea>
540
  </div>
541
  <div class="modal-footer">
548
  <!-- List Backup Content Modal-->
549
  <div id="backup_cotent_modal" class="modal">
550
  <div class="modal-content">
551
+ <h4>
552
+ <?php echo sprintf(__("Listing Backup Content ", 'xcloner-backup-and-restore'), "") ?>
553
+ </h4>
554
  <h5 class="backup-name"></h5>
555
 
556
  <div class="progress">
565
  <form method="POST" class="remote-storage-form">
566
  <input type="hidden" name="file" class="backup_name">
567
  <div class="modal-content">
568
+ <h4>
569
+ <?php echo __("Remote Storage Transfer", 'xcloner-backup-and-restore') ?>
570
+ </h4>
571
  <p>
572
  <?php if (sizeof($available_storages)): ?>
573
  <div class="row">
574
  <div class="col s12 label">
575
+ <label>
576
+ <?php echo __(sprintf('Send %s to remote storage', "<span class='backup_name'></span>"), 'xcloner-backup-and-restore') ?>
577
+ </label>
578
  </div>
579
  <div class="input-field col s8 m10">
580
  <select name="transfer_storage" id="transfer_storage" class="validate" required>
581
+ <option value="" selected>
582
+ <?php echo __('please select...', 'xcloner-backup-and-restore') ?>
583
  </option>
584
  <?php foreach ($available_storages as $storage => $text): ?>
585
+ <option value="<?php echo esc_attr($storage) ?>">
586
+ <?php echo esc_html($text) ?>
587
+ </option>
588
  <?php endforeach ?>
589
  </select>
590
 
603
  </div>
604
  </div>
605
  <?php endif ?>
 
606
  </div>
607
  </form>
608
  </div>
admin/partials/xcloner_init_page.php CHANGED
@@ -42,7 +42,8 @@ if ($requirements->check_backup_ready_status()) {
42
  <div class="col s12">
43
  <?php if (isset($latest_backup['timestamp']) && $latest_backup['timestamp'] < strtotime("-1 day")): ?>
44
  <div id="setting-error-" class="error settings-error notice is-dismissible">
45
- <p><strong>
 
46
  <?php echo __('Your latest backup is older than 24 hours, please create a new backup to keep your site protected.', 'xcloner-backup-and-restore') ?>
47
  </strong>
48
  </p>
@@ -54,7 +55,8 @@ if ($requirements->check_backup_ready_status()) {
54
 
55
  <?php if (!isset($latest_backup['timestamp'])): ?>
56
  <div id="setting-error-" class="error settings-error notice is-dismissible">
57
- <p><strong>
 
58
  <?php echo __('You have no backup that I could find, please generate a new backup to keep your site protected.', 'xcloner-backup-and-restore') ?>
59
  </strong>
60
  </p>
@@ -66,12 +68,13 @@ if ($requirements->check_backup_ready_status()) {
66
 
67
  <?php if (!$requirements->check_backup_ready_status()): ?>
68
  <div id="setting-error-" class="error settings-error notice is-dismissible">
69
- <p><strong>
 
70
  <?php echo __('Backup system not ready, please check and fix the issues marked in red', 'xcloner-backup-and-restore') ?>
71
  </strong>
72
  </p>
73
- <button type="button" class="notice-dismiss"><span
74
- class="screen-reader-text">Dismiss this notice.</span>
75
  </button>
76
  </div>
77
 
@@ -97,20 +100,20 @@ if ($requirements->check_backup_ready_status()) {
97
  <blockquote>
98
  <?php if (isset($latest_backup)): ?>
99
  <div class="item">
100
- <div class="title"><?php echo __("Backup Name", 'xcloner-backup-and-restore') ?>
101
- :
102
  </div>
103
- <?php echo $latest_backup['basename'] ?>
104
  </div>
105
  <div class="item">
106
  <div class="title">
107
  <?php echo __("Backup Size", 'xcloner-backup-and-restore') ?>:
108
  </div>
109
- <?php echo size_format($latest_backup['size']) ?>
110
  </div>
111
  <div class="item">
112
- <div class="title"><?php echo __("Backup Date", 'xcloner-backup-and-restore') ?>
113
- :
114
  </div>
115
  <?php
116
  echo date($date_format . " " . $time_format, $latest_backup['timestamp'] + (get_option('gmt_offset') * HOUR_IN_SECONDS))
@@ -131,10 +134,12 @@ if ($requirements->check_backup_ready_status()) {
131
  <?php echo __("Total Size", 'xcloner-backup-and-restore') ?>
132
  :
133
  </div>
134
- <?php echo size_format($xcloner_file_system->get_storage_usage()); ?>
135
  </div>
136
  </blockquote>
137
- <h5><?php echo __("Next Scheduled Backup", 'xcloner-backup-and-restore') ?></h5>
 
 
138
  <blockquote>
139
  <div class="item">
140
  <?php
@@ -150,16 +155,14 @@ if ($requirements->check_backup_ready_status()) {
150
  ?>
151
  <?php if (isset($latest_schedule->name)): ?>
152
  <div class="title">
153
- <?php echo __("Schedule Name", 'xcloner-backup-and-restore') ?>
154
- :
155
  </div>
156
- <?php echo $latest_schedule->name; ?>
157
  <?php endif; ?>
158
  </div>
159
  <div class="item">
160
  <div class="title">
161
- <?php echo __("Next Call", 'xcloner-backup-and-restore') ?>
162
- :
163
  </div>
164
  <?php if (isset($latest_schedule->next_run_time)) {
165
  echo date($date_format . " " . $time_format, $latest_schedule->next_run_time);
@@ -176,28 +179,28 @@ if ($requirements->check_backup_ready_status()) {
176
  <?php if ($xcloner_settings->get_xcloner_option('xcloner_enable_log')) : ?>
177
  <li class="active">
178
  <div class="collapsible-header active">
179
- <i
180
- class="material-icons">bug_report</i><?php echo __('XCloner Debugger', 'xcloner-backup-and-restore') ?>
181
  <div class="right">
182
  <a href="#<?php echo $logger_basename = basename($logger->get_main_logger_url()) ?>"
183
- class="download-logger" title="<?php echo $logger_basename ?>">
184
- <span class="shorten_string"><?php echo $logger_basename ?>&nbsp;&nbsp;&nbsp;</span>
 
 
185
  </a>
186
  </div>
187
  </div>
188
  <div class="collapsible-body">
189
  <div class="console" id="xcloner-console"><?php if ($logger_content) {
190
  echo strip_tags(implode("<br />\n", array_reverse($logger_content)), "<br><a>");
191
- } ?></div>
 
192
  </div>
193
  </li>
194
  <script>
195
  jQuery(document).ready(function () {
196
  var objDiv = document.getElementById("xcloner-console");
197
  objDiv.scrollTop = objDiv.scrollHeight;
198
- /*setInterval(function(){
199
- getXclonerLog();
200
- }, 2000);*/
201
  })
202
  </script>
203
  <?php endif; ?>
@@ -212,49 +215,52 @@ if ($requirements->check_backup_ready_status()) {
212
 
213
  <div class="card blue-grey darken-1 z-depth-4 backup-ready">
214
  <div class="card-content white-text">
215
- <span class="card-title"><?php echo __("System Check", 'xcloner-backup-and-restore') ?></span>
 
 
216
  <ul>
217
- <li
218
- class="card-panel <?php echo($requirements->check_xcloner_start_path(1) ? "teal" : "red") ?> lighten-2">
219
- <?php echo __('Backup Start Location', 'xcloner-backup-and-restore') ?>: <span
220
- class="shorten_string "><?php echo $requirements->check_xcloner_start_path(); ?></span>
 
221
  </li>
222
- <li
223
- class="card-panel <?php echo($requirements->check_xcloner_store_path(1) ? "teal" : "red") ?> lighten-2">
224
- <?php echo __('Backup Storage Location', 'xcloner-backup-and-restore') ?>: <span
225
- class="shorten_string"><?php echo $requirements->check_xcloner_store_path(); ?></span>
 
226
  </li>
227
- <li
228
- class="card-panel <?php echo($requirements->check_xcloner_tmp_path(1) ? "teal" : "red") ?> lighten-2">
229
- <?php echo __('Temporary Location', 'xcloner-backup-and-restore') ?>: <span
230
- class="shorten_string"><?php echo $requirements->check_xcloner_tmp_path(); ?></span>
 
231
  </li>
232
-
233
- <li
234
- class="card-panel <?php echo($requirements->check_min_php_version(1) ? "teal" : "red") ?> lighten-2">
235
  <?php echo __('PHP Version Check', 'xcloner-backup-and-restore') ?>
236
- : <?php echo $requirements->check_min_php_version(); ?>
237
  ( >= <?php echo $requirements::MIN_PHP_VERSION ?>)
238
  </li>
239
- <li
240
- class="card-panel <?php echo($requirements->check_backup_ready_status() ? "teal" : "red") ?> lighten-2">
241
  <?php echo($requirements->check_backup_ready_status() ? __('BACKUP READY', 'xcloner-backup-and-restore') : __('Backup not ready, please check above requirements', 'xcloner-backup-and-restore')) ?>
242
- <i
243
- class="material-icons right tiny"><?php echo($requirements->check_backup_ready_status() ? 'thumb_up' : 'thumb_down') ?></i>
 
244
  </li>
245
  </ul>
246
  <ul class="additional_system_info">
247
  <li class="card-panel grey darken-1">
248
- <?php echo __('PHP max_execution_time', 'xcloner-backup-and-restore') ?>
249
- : <?php echo $requirements->get_max_execution_time(); ?>
250
  </li>
251
  <li class="card-panel grey darken-1">
252
- <?php echo __('PHP memory_limit', 'xcloner-backup-and-restore') ?>
253
- : <?php echo $requirements->get_memory_limit(); ?>
254
  </li>
255
  <li class="card-panel grey darken-1">
256
- <?php echo __('PHP open_basedir', 'xcloner-backup-and-restore') ?>
257
- : <?php echo $requirements->get_open_basedir(); ?>
258
  </li>
259
  <?php
260
  $data = array();
@@ -263,22 +269,23 @@ if ($requirements->check_backup_ready_status()) {
263
  }
264
  ?>
265
  <li class="card-panel grey darken-1">
266
- <?php echo __('Reading Time 1MB Block', 'xcloner-backup-and-restore') ?>
267
- : <?php echo(isset($data['reading_time']) ? $data['reading_time'] : __("unknown")); ?>
268
  </li>
269
  <li class="card-panel grey darken-1">
270
- <?php echo __('Writing Time 1MB Block', 'xcloner-backup-and-restore') ?>
271
- : <?php echo(isset($data['writing_time']) ? $data['writing_time'] : __("unknown")); ?>
272
  </li>
273
  <li class="card-panel grey darken-1">
274
- <?php echo __('Free Disk Space', 'xcloner-backup-and-restore') ?>
275
- : <?php echo $requirements->get_free_disk_space();; ?>
276
  </li>
277
  </ul>
278
  </div>
279
  <div class="card-action">
280
- <a class="waves-effect waves-light btn system_info_toggle blue darken-1"><i
281
- class="material-icons left">list</i><?php echo __('Toggle Additional System Info', 'xcloner-backup-and-restore') ?>
 
282
  </a>
283
  </div>
284
  </div>
42
  <div class="col s12">
43
  <?php if (isset($latest_backup['timestamp']) && $latest_backup['timestamp'] < strtotime("-1 day")): ?>
44
  <div id="setting-error-" class="error settings-error notice is-dismissible">
45
+ <p>
46
+ <strong>
47
  <?php echo __('Your latest backup is older than 24 hours, please create a new backup to keep your site protected.', 'xcloner-backup-and-restore') ?>
48
  </strong>
49
  </p>
55
 
56
  <?php if (!isset($latest_backup['timestamp'])): ?>
57
  <div id="setting-error-" class="error settings-error notice is-dismissible">
58
+ <p>
59
+ <strong>
60
  <?php echo __('You have no backup that I could find, please generate a new backup to keep your site protected.', 'xcloner-backup-and-restore') ?>
61
  </strong>
62
  </p>
68
 
69
  <?php if (!$requirements->check_backup_ready_status()): ?>
70
  <div id="setting-error-" class="error settings-error notice is-dismissible">
71
+ <p>
72
+ <strong>
73
  <?php echo __('Backup system not ready, please check and fix the issues marked in red', 'xcloner-backup-and-restore') ?>
74
  </strong>
75
  </p>
76
+ <button type="button" class="notice-dismiss">
77
+ <span class="screen-reader-text">Dismiss this notice.</span>
78
  </button>
79
  </div>
80
 
100
  <blockquote>
101
  <?php if (isset($latest_backup)): ?>
102
  <div class="item">
103
+ <div class="title">
104
+ <?php echo __("Backup Name", 'xcloner-backup-and-restore') ?> :
105
  </div>
106
+ <?php echo esc_html($latest_backup['basename']) ?>
107
  </div>
108
  <div class="item">
109
  <div class="title">
110
  <?php echo __("Backup Size", 'xcloner-backup-and-restore') ?>:
111
  </div>
112
+ <?php echo esc_html(size_format($latest_backup['size'])) ?>
113
  </div>
114
  <div class="item">
115
+ <div class="title">
116
+ <?php echo __("Backup Date", 'xcloner-backup-and-restore') ?> :
117
  </div>
118
  <?php
119
  echo date($date_format . " " . $time_format, $latest_backup['timestamp'] + (get_option('gmt_offset') * HOUR_IN_SECONDS))
134
  <?php echo __("Total Size", 'xcloner-backup-and-restore') ?>
135
  :
136
  </div>
137
+ <?php echo esc_html(size_format($xcloner_file_system->get_storage_usage())); ?>
138
  </div>
139
  </blockquote>
140
+ <h5>
141
+ <?php echo __("Next Scheduled Backup", 'xcloner-backup-and-restore') ?>
142
+ </h5>
143
  <blockquote>
144
  <div class="item">
145
  <?php
155
  ?>
156
  <?php if (isset($latest_schedule->name)): ?>
157
  <div class="title">
158
+ <?php echo __("Schedule Name", 'xcloner-backup-and-restore') ?>:
 
159
  </div>
160
+ <?php echo esc_html($latest_schedule->name); ?>
161
  <?php endif; ?>
162
  </div>
163
  <div class="item">
164
  <div class="title">
165
+ <?php echo __("Next Call", 'xcloner-backup-and-restore') ?>:
 
166
  </div>
167
  <?php if (isset($latest_schedule->next_run_time)) {
168
  echo date($date_format . " " . $time_format, $latest_schedule->next_run_time);
179
  <?php if ($xcloner_settings->get_xcloner_option('xcloner_enable_log')) : ?>
180
  <li class="active">
181
  <div class="collapsible-header active">
182
+ <i class="material-icons">bug_report</i>
183
+ <?php echo __('XCloner Debugger', 'xcloner-backup-and-restore') ?>
184
  <div class="right">
185
  <a href="#<?php echo $logger_basename = basename($logger->get_main_logger_url()) ?>"
186
+ class="download-logger" title="<?php echo esc_attr($logger_basename) ?>">
187
+ <span class="shorten_string">
188
+ <?php echo esc_html($logger_basename) ?>&nbsp;&nbsp;&nbsp;
189
+ </span>
190
  </a>
191
  </div>
192
  </div>
193
  <div class="collapsible-body">
194
  <div class="console" id="xcloner-console"><?php if ($logger_content) {
195
  echo strip_tags(implode("<br />\n", array_reverse($logger_content)), "<br><a>");
196
+ } ?>
197
+ </div>
198
  </div>
199
  </li>
200
  <script>
201
  jQuery(document).ready(function () {
202
  var objDiv = document.getElementById("xcloner-console");
203
  objDiv.scrollTop = objDiv.scrollHeight;
 
 
 
204
  })
205
  </script>
206
  <?php endif; ?>
215
 
216
  <div class="card blue-grey darken-1 z-depth-4 backup-ready">
217
  <div class="card-content white-text">
218
+ <span class="card-title">
219
+ <?php echo __("System Check", 'xcloner-backup-and-restore') ?>
220
+ </span>
221
  <ul>
222
+ <li class="card-panel <?php echo($requirements->check_xcloner_start_path(1) ? "teal" : "red") ?> lighten-2">
223
+ <?php echo __('Backup Start Location', 'xcloner-backup-and-restore') ?>:
224
+ <span class="shorten_string">
225
+ <?php echo esc_html($requirements->check_xcloner_start_path()); ?>
226
+ </span>
227
  </li>
228
+ <li class="card-panel <?php echo($requirements->check_xcloner_store_path(1) ? "teal" : "red") ?> lighten-2">
229
+ <?php echo __('Backup Storage Location', 'xcloner-backup-and-restore') ?>:
230
+ <span class="shorten_string">
231
+ <?php echo esc_html($requirements->check_xcloner_store_path()); ?>
232
+ </span>
233
  </li>
234
+ <li class="card-panel <?php echo($requirements->check_xcloner_tmp_path(1) ? "teal" : "red") ?> lighten-2">
235
+ <?php echo __('Temporary Location', 'xcloner-backup-and-restore') ?>:
236
+ <span class="shorten_string">
237
+ <?php echo esc_html($requirements->check_xcloner_tmp_path()); ?>
238
+ </span>
239
  </li>
240
+ <li class="card-panel <?php echo($requirements->check_min_php_version(1) ? "teal" : "red") ?> lighten-2">
 
 
241
  <?php echo __('PHP Version Check', 'xcloner-backup-and-restore') ?>
242
+ : <?php echo esc_html($requirements->check_min_php_version()); ?>
243
  ( >= <?php echo $requirements::MIN_PHP_VERSION ?>)
244
  </li>
245
+ <li class="card-panel <?php echo($requirements->check_backup_ready_status() ? "teal" : "red") ?> lighten-2">
 
246
  <?php echo($requirements->check_backup_ready_status() ? __('BACKUP READY', 'xcloner-backup-and-restore') : __('Backup not ready, please check above requirements', 'xcloner-backup-and-restore')) ?>
247
+ <i class="material-icons right tiny">
248
+ <?php echo($requirements->check_backup_ready_status() ? 'thumb_up' : 'thumb_down') ?>
249
+ </i>
250
  </li>
251
  </ul>
252
  <ul class="additional_system_info">
253
  <li class="card-panel grey darken-1">
254
+ <?php echo __('PHP max_execution_time', 'xcloner-backup-and-restore') ?>:
255
+ <?php echo esc_html($requirements->get_max_execution_time()); ?>
256
  </li>
257
  <li class="card-panel grey darken-1">
258
+ <?php echo __('PHP memory_limit', 'xcloner-backup-and-restore') ?>:
259
+ <?php echo esc_html($requirements->get_memory_limit()); ?>
260
  </li>
261
  <li class="card-panel grey darken-1">
262
+ <?php echo __('PHP open_basedir', 'xcloner-backup-and-restore') ?>:
263
+ <?php echo esc_html($requirements->get_open_basedir()); ?>
264
  </li>
265
  <?php
266
  $data = array();
269
  }
270
  ?>
271
  <li class="card-panel grey darken-1">
272
+ <?php echo __('Reading Time 1MB Block', 'xcloner-backup-and-restore') ?>:
273
+ <?php echo(isset($data['reading_time']) ? esc_html($data['reading_time']) : __("unknown")); ?>
274
  </li>
275
  <li class="card-panel grey darken-1">
276
+ <?php echo __('Writing Time 1MB Block', 'xcloner-backup-and-restore') ?>:
277
+ <?php echo(isset($data['writing_time']) ? esc_html($data['writing_time']) : __("unknown")); ?>
278
  </li>
279
  <li class="card-panel grey darken-1">
280
+ <?php echo __('Free Disk Space', 'xcloner-backup-and-restore') ?>:
281
+ <?php echo esc_html($requirements->get_free_disk_space()); ?>
282
  </li>
283
  </ul>
284
  </div>
285
  <div class="card-action">
286
+ <a class="waves-effect waves-light btn system_info_toggle blue darken-1">
287
+ <i class="material-icons left">list</i>
288
+ <?php echo __('Toggle Additional System Info', 'xcloner-backup-and-restore') ?>
289
  </a>
290
  </div>
291
  </div>
admin/partials/xcloner_manage_backups_page.php CHANGED
@@ -30,17 +30,20 @@ $available_storages = $xcloner_remote_storage->get_available_storages();
30
  <select name="storage_selection" id="storage_selection" class="validate" required>
31
 
32
  <?php if ($storage_selection): ?>
33
- <option value="" selected><?php echo __('Change To Local Storage...', 'xcloner-backup-and-restore') ?>
 
34
  </option>
35
  <?php else: ?>
36
- <option value="" selected><?php echo __('Change To Remote Storage...', 'xcloner-backup-and-restore') ?>
 
37
  </option>
38
  <?php endif; ?>
39
 
40
  <?php foreach ($available_storages as $storage => $text): ?>
41
- <option value="<?php echo $storage ?>" <?php if ($storage == $storage_selection) {
42
  echo "selected";
43
- } ?>><?php echo $text ?>
 
44
  </option>
45
  <?php endforeach ?>
46
  </select>
@@ -73,8 +76,10 @@ $available_storages = $xcloner_remote_storage->get_available_storages();
73
  </tbody>
74
  </table>
75
 
76
- <a class="waves-effect waves-light btn delete-all"><i
77
- class="material-icons left">delete</i><?php echo __("Delete", 'xcloner-backup-and-restore') ?></a>
 
 
78
  </div>
79
 
80
 
@@ -171,16 +176,19 @@ $available_storages = $xcloner_remote_storage->get_available_storages();
171
  <?php if (sizeof($available_storages)): ?>
172
  <div class="row">
173
  <div class="col s12 label">
174
- <label><?php echo sprintf(
175
- __('Send %s to remote storage', 'xcloner-backup-and-restore'),
176
- "<span class='backup_name'></span>"
177
- ) ?></label>
178
  </div>
179
  <div class="input-field col s8 m10">
180
  <select name="transfer_storage" id="transfer_storage" class="validate" required>
181
- <option value="" selected><?php echo __('please select...', 'xcloner-backup-and-restore') ?></option>
 
 
182
  <?php foreach ($available_storages as $storage => $text): ?>
183
- <option value="<?php echo $storage ?>"><?php echo $text ?></option>
 
 
184
  <?php endforeach ?>
185
  </select>
186
 
30
  <select name="storage_selection" id="storage_selection" class="validate" required>
31
 
32
  <?php if ($storage_selection): ?>
33
+ <option value="" selected>
34
+ <?php echo __('Change To Local Storage...', 'xcloner-backup-and-restore') ?>
35
  </option>
36
  <?php else: ?>
37
+ <option value="" selected>
38
+ <?php echo __('Change To Remote Storage...', 'xcloner-backup-and-restore') ?>
39
  </option>
40
  <?php endif; ?>
41
 
42
  <?php foreach ($available_storages as $storage => $text): ?>
43
+ <option value="<?php echo esc_attr($storage) ?>" <?php if ($storage == $storage_selection) {
44
  echo "selected";
45
+ } ?>>
46
+ <?php echo esc_html($text) ?>
47
  </option>
48
  <?php endforeach ?>
49
  </select>
76
  </tbody>
77
  </table>
78
 
79
+ <a class="waves-effect waves-light btn delete-all">
80
+ <i class="material-icons left">delete</i>
81
+ <?php echo __("Delete", 'xcloner-backup-and-restore') ?>
82
+ </a>
83
  </div>
84
 
85
 
176
  <?php if (sizeof($available_storages)): ?>
177
  <div class="row">
178
  <div class="col s12 label">
179
+ <label>
180
+ <?php echo sprintf(__('Send %s to remote storage', 'xcloner-backup-and-restore'),"<span class='backup_name'></span>") ?>
181
+ </label>
 
182
  </div>
183
  <div class="input-field col s8 m10">
184
  <select name="transfer_storage" id="transfer_storage" class="validate" required>
185
+ <option value="" selected>
186
+ <?php echo __('please select...', 'xcloner-backup-and-restore') ?>
187
+ </option>
188
  <?php foreach ($available_storages as $storage => $text): ?>
189
+ <option value="<?php echo esc_attr($storage) ?>">
190
+ <?php echo esc_html($text) ?>
191
+ </option>
192
  <?php endforeach ?>
193
  </select>
194
 
admin/partials/xcloner_remote_storage_page.php CHANGED
@@ -22,14 +22,15 @@ function common_cleanup_html($type)
22
  <!-- Cleanup by Days -->
23
  <div class="row">
24
  <div class="col s12 m3 label">
25
- <label
26
- for="xcloner_{type}_cleanup_retention_limit_days"><?php echo __("Cleanup by Age", 'xcloner-backup-and-restore') ?></label>
 
27
  </div>
28
  <div class=" col s12 m6">
29
  <input placeholder="<?php echo __("how many days to keep the backups for", 'xcloner-backup-and-restore') ?>"
30
  id="xcloner_{type}cleanup_retention_limit_days" type="text"
31
  name="xcloner_{type}cleanup_retention_limit_days" class="validate"
32
- value="<?php echo get_option("xcloner_".$type."cleanup_retention_limit_days") ?>">
33
  </div>
34
  </div>
35
 
@@ -43,33 +44,35 @@ function common_cleanup_html($type)
43
  <input placeholder="<?php echo __("how many backup files to keep", 'xcloner-backup-and-restore') ?>"
44
  id="xcloner_{type}cleanup_retention_limit_archives" type="number"
45
  name="xcloner_{type}cleanup_retention_limit_archives" class="validate"
46
- value="<?php echo get_option("xcloner_".$type."cleanup_retention_limit_archives") ?>">
47
  </div>
48
  </div>
49
 
50
  <!-- Cleanup by Capacity -->
51
  <div class="row">
52
  <div class="col s12 m3 label">
53
- <label
54
- for="xcloner_{type}_cleanup_capacity_limit"><?php echo __("Cleanup by Capacity(MB)", 'xcloner-backup-and-restore') ?></label>
 
55
  </div>
56
  <div class=" col s12 m6">
57
  <input placeholder="<?php echo __("delete backup over specified limit", 'xcloner-backup-and-restore') ?>"
58
  id="xcloner_{type}cleanup_capacity_limit" type="number" name="xcloner_{type}cleanup_capacity_limit"
59
- class="validate" value="<?php echo get_option("xcloner_".$type."cleanup_capacity_limit") ?>">
60
  </div>
61
  </div>
62
 
63
  <!-- Keep backups taken on days -->
64
  <div class="row">
65
  <div class="col s12 m3 label">
66
- <label
67
- for="xcloner_{type}_cleanup_exclude_days"><?php echo __("Keep backups taken on days", 'xcloner-backup-and-restore') ?></label>
 
68
  </div>
69
  <div class=" col s12 m6">
70
  <input placeholder="<?php echo __("days of month, comma separated", 'xcloner-backup-and-restore') ?>"
71
  id="xcloner_{type}cleanup_exclude_days" type="text" name="xcloner_{type}cleanup_exclude_days"
72
- class="validate" value="<?php echo get_option("xcloner_".$type."cleanup_exclude_days") ?>">
73
  </div>
74
  </div>
75
  <?php
@@ -226,4 +229,4 @@ $common_cleanup_html = ob_get_contents();
226
 
227
 
228
  });
229
- </script>
22
  <!-- Cleanup by Days -->
23
  <div class="row">
24
  <div class="col s12 m3 label">
25
+ <label for="xcloner_{type}_cleanup_retention_limit_days">
26
+ <?php echo __("Cleanup by Age", 'xcloner-backup-and-restore') ?>
27
+ </label>
28
  </div>
29
  <div class=" col s12 m6">
30
  <input placeholder="<?php echo __("how many days to keep the backups for", 'xcloner-backup-and-restore') ?>"
31
  id="xcloner_{type}cleanup_retention_limit_days" type="text"
32
  name="xcloner_{type}cleanup_retention_limit_days" class="validate"
33
+ value="<?php echo esc_attr(get_option("xcloner_".$type."cleanup_retention_limit_days")) ?>">
34
  </div>
35
  </div>
36
 
44
  <input placeholder="<?php echo __("how many backup files to keep", 'xcloner-backup-and-restore') ?>"
45
  id="xcloner_{type}cleanup_retention_limit_archives" type="number"
46
  name="xcloner_{type}cleanup_retention_limit_archives" class="validate"
47
+ value="<?php echo esc_attr(get_option("xcloner_".$type."cleanup_retention_limit_archives")) ?>">
48
  </div>
49
  </div>
50
 
51
  <!-- Cleanup by Capacity -->
52
  <div class="row">
53
  <div class="col s12 m3 label">
54
+ <label for="xcloner_{type}_cleanup_capacity_limit">
55
+ <?php echo __("Cleanup by Capacity(MB)", 'xcloner-backup-and-restore') ?>
56
+ </label>
57
  </div>
58
  <div class=" col s12 m6">
59
  <input placeholder="<?php echo __("delete backup over specified limit", 'xcloner-backup-and-restore') ?>"
60
  id="xcloner_{type}cleanup_capacity_limit" type="number" name="xcloner_{type}cleanup_capacity_limit"
61
+ class="validate" value="<?php echo esc_attr(get_option("xcloner_".$type."cleanup_capacity_limit")) ?>">
62
  </div>
63
  </div>
64
 
65
  <!-- Keep backups taken on days -->
66
  <div class="row">
67
  <div class="col s12 m3 label">
68
+ <label for="xcloner_{type}_cleanup_exclude_days">
69
+ <?php echo __("Keep backups taken on days", 'xcloner-backup-and-restore') ?>
70
+ </label>
71
  </div>
72
  <div class=" col s12 m6">
73
  <input placeholder="<?php echo __("days of month, comma separated", 'xcloner-backup-and-restore') ?>"
74
  id="xcloner_{type}cleanup_exclude_days" type="text" name="xcloner_{type}cleanup_exclude_days"
75
+ class="validate" value="<?php echo esc_attr(get_option("xcloner_".$type."cleanup_exclude_days")) ?>">
76
  </div>
77
  </div>
78
  <?php
229
 
230
 
231
  });
232
+ </script>
admin/partials/xcloner_restore_page.php CHANGED
@@ -56,8 +56,8 @@ $backup_list = $xcloner_file_system->get_latest_backups();
56
  <?php echo __("Please select the target backup file to restore", 'xcloner-backup-and-restore') ?>
57
  </option>
58
  <?php foreach ($backup_list as $backup) : ?>
59
- <option value="<?php echo $backup['file_name'] ?>">
60
- <?php echo ($backup['file_name'] . ' (' . $backup['size'] . ')') ?>
61
  </option>
62
  <?php endforeach; ?>
63
  </select>
56
  <?php echo __("Please select the target backup file to restore", 'xcloner-backup-and-restore') ?>
57
  </option>
58
  <?php foreach ($backup_list as $backup) : ?>
59
+ <option value="<?php echo esc_attr($backup['file_name']) ?>">
60
+ <?php echo esc_html($backup['file_name'] . ' (' . $backup['size'] . ')') ?>
61
  </option>
62
  <?php endforeach; ?>
63
  </select>
dist/admin/js/index.min.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["webpack:///admin/js/index.min.js"],"names":["modules","installedModules","__webpack_require__","moduleId","exports","module","i","l","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","__webpack_exports__","error_modal","next_tab","doShortText","show_ajax_error","ID","getUrlParam","_xcloner_remote_storage_class__WEBPACK_IMPORTED_MODULE_0__","_xcloner_backup_class__WEBPACK_IMPORTED_MODULE_1__","_xcloner_manage_backups_class__WEBPACK_IMPORTED_MODULE_2__","document","addEventListener","Modalelem","querySelector","M","Modal","init","jQuery","ready","tooltip","collapsible","click","this","toggleClass","each","on","fadeIn","select","toggle","e","xcloner_manage_backups","id","attr","substr","download_backup_by_name","preventDefault","removeClass","find","addClass","location","hash","window","replace","trigger","elem","hasClass","text","text_lenght","length","first","last","title","msg","json","xcloner_backup","cancel_backup","undefined","responseText","status","statusText","JSON","stringify","open","Math","random","toString","search","split","remote_storage","dataTable","Xcloner_Manage_Backups","backup_cotent_modal","backup_encryption_modal","backup_decryption_modal","remote_storage_modal","local_storage_upload_modal","constructor","file_counter","storage_selection","XCLONER_AJAXURL","delete_backup_by_name","ajax","url","method","data","action","success","response","finished","row","parents","remove","draw","alert","dataType","list_backup_content_callback","backup_file","start","part","$this","file","error","prepend","message","css","files_text","files","total_size","parseInt","mtime","path","size","reverse","join","is","xhr","textStatus","list_backup_content","backup_encryption_callback","iv","percent","processing_file","show","reload","backup_encryption","hide","backup_decryption_callback","decryption_key","val","backup_decryption","cloud_upload","delete_after_transfer","updateTextFields","formSelect","off","storage_type","copy_remote_to_local","Xcloner_Remote_Storage","toggle_status","field","Xcloner_Backup","cancel","params","last_dumpfile","last_backup_file","backup_part","backup_size_total","resume","get_form_params","table_params","files_params","jstree","parent","index","$return","backup_params","serializeArray","do_backup_database_callback","extra","stats","tables_count","database_count","total_records","tableName","databaseName","processedRecords","startAtRecord","endDump","records","dumpfile","db_text","getSize","dumpsize","html","prependTo","do_ajax","do_backup_files","do_backup_database","do_scan_filesystem_callback","total_files_num","total_files_size","parseFloat","toFixed","last_logged_file","do_scan_filesystem","do_backup_files_callback","start_at_line","backup_size","processed_file","start_at_byte","processed_size","processed_file_size","backup_text","backup_archive_name_full","backup_archive_name","lines_total","backup_parent","do_backup_encryption","do_remote_storage_upload","do_backup_done","do_backup_encryption_callback","do_upload_backup_to_remote_callback","backup_name","delete_backup_after_transfer","Number","set_cancel","do_save_schedule_callback","restart_backup","start_backup","get_cancel","init_resume","callback","type","API_ID","err","done","error_message","bytes","conv","global","__WEBPACK_AMD_DEFINE_RESULT__","_get","receiver","Function","desc","getOwnPropertyDescriptor","getPrototypeOf","_createClass","defineProperties","target","props","descriptor","configurable","writable","Constructor","protoProps","staticProps","_possibleConstructorReturn","self","ReferenceError","_inherits","subClass","superClass","TypeError","setPrototypeOf","__proto__","_classCallCheck","instance","cash","frag","doc","win","ArrayProto","Array","slice","filter","push","noop","isFunction","item","isString","idMatch","classMatch","htmlMatch","singlet","selector","context","test","getElementsByClassName","getElementsByTagName","querySelectorAll","parseHTML","str","base","implementation","createHTMLDocument","createElement","href","head","appendChild","body","innerHTML","childNodes","onReady","fn","readyState","Init","elems","getElementById","nodeType","splice","map","collection","matches","el","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","getCompareFunction","unique","indexOf","extend","args","arguments","merge","second","len","j","isArray","isNumeric","isNaN","isFinite","uid","Date","now","getDataCache","node","setData","getData","dataset","removeData","removeAttr","v","notWhiteMatch","getClasses","match","classList","contains","RegExp","className","spacedName","add","classes","getAttribute","setAttribute","check","prop","removeAttribute","removeProp","state","eq","comparator","child","children","cache","style","camelRegex","whiteSpace","camelCase","letter","getPrefixedProp","ucProp","charAt","toUpperCase","compute","getComputedStyle","registerEvent","eventName","eventCache","removeEvent","events","removeEventListener","event","encode","encodeURIComponent","getSelectMultiple_","values","options","selected","getSelectSingle_","selectedIndex","getValue","toLowerCase","checked","insertElement","insertBefore","insertContent","insertAdjacentHTML","cloneNode","prefixedProp","lower","getBoundingClientRect","margins","delegate","runOnce","originalCallback","parentNode","finalCallback","apply","one","createEvent","evt","initEvent","dispatchEvent","serialize","query","elements","disabled","tagName","after","insertAfter","append","content","appendTo","before","clone","empty","source","outerHTML","_this","sibling","nextSibling","_this2","removeChild","textContent","docEl","documentElement","position","left","offsetLeft","top","offsetTop","offset","rect","pageYOffset","clientTop","pageXOffset","clientLeft","offsetParent","closest","has","next","nextElementSibling","not","result","prev","previousElementSibling","siblings","factory","Component","classDef","Element","console","Error","ins","getInstance","destroy","$el","els","instances","jquery","NodeList","instancesArr","Package","jQueryLoaded","version","keys","TAB","ENTER","ESC","ARROW_UP","ARROW_DOWN","tabPressed","keyDown","which","initializeJqueryWrapper","plugin","pluginName","classRef","methodOrOptions","AutoInit","root","registry","Autocomplete","Carousel","Chips","Collapsible","Datepicker","Dropdown","Materialbox","Parallax","Pushpin","ScrollSpy","FormSelect","Sidenav","Tabs","TapTarget","Timepicker","Tooltip","FloatingActionButton","objectSelectorString","obj","guid","s4","floor","substring","escapeHash","elementOrParentIsFixed","element","$element","$","$checkElements","isFixed","checkWithinContainer","container","bounding","edges","right","bottom","containerRect","containerBottom","max","innerHeight","scrollLeft","scrollTop","scrolledX","scrolledY","width","innerWidth","height","checkPossibleAlignments","canAlign","spaceOnTop","spaceOnRight","spaceOnBottom","spaceOnLeft","containerAllowsOverflow","overflow","containerHeight","min","containerWidth","elOffsetRect","scrolledYTopEdge","scrolledYBottomEdge","getOverflowParent","parentElement","getIdFromTrigger","getDocumentScrollTop","getDocumentScrollLeft","getTime","throttle","func","wait","timeout","previous","later","leading","remaining","clearTimeout","trailing","setTimeout","$jscomp","scope","set","getGlobal","SYMBOL_PREFIX","initSymbol","symbolCounter_","initSymbolIterator","iterator","arrayIterator","iteratorPrototype","array","iteratorFromArray","String","u","polyfill","$jscomp$this","anime","a","h","col","b","f","k","reduce","concat","arr","HTMLCollection","some","C","D","z","und","T","exec","U","y","V","I","fnc","total","E","getPropertyValue","J","dom","W","svg","X","transform","K","L","F","sqrt","pow","x","points","numberOfItems","getItem","N","getTotalLength","PI","Y","getPointAtLength","atan2","O","pth","totalLength","rgb","hex","hsl","original","numbers","strings","P","Z","aa","duration","delay","ba","ca","A","Q","da","tweens","to","w","from","end","easing","elasticity","isPath","isColor","round","ea","animatable","R","fa","ga","S","targets","animatables","animations","q","Promise","g","reversed","ha","currentValue","H","currentTime","progress","G","seek","began","direction","pause","completed","reset","loop","paused","tick","speed","play","B","ia","restart","autoplay","update","begin","run","complete","SVGElement","Float32Array","abs","sin","asin","In","Out","InOut","linear","forEach","attribute","requestAnimationFrame","cancelAnimationFrame","running","setDashoffset","bezier","easings","timeline","anim","_defaults","accordion","onOpenStart","onOpenEnd","onCloseStart","onCloseEnd","inDuration","outDuration","_Component","_this3","M_Collapsible","defaults","$headers","_setupEventHandlers","$activeBodies","_removeEventHandlers","_this4","_handleCollapsibleClickBound","_handleCollapsibleClick","_handleCollapsibleKeydownBound","_handleCollapsibleKeydown","header","_this5","$header","$collapsible","$collapsibleLi","$collapsibleLis","isActive","close","keyCode","_this6","$body","display","paddingTop","paddingBottom","pTop","pBottom","finalHeight","scrollHeight","_this7","padding","_this8","_animateIn","_animateOut","alignment","autoFocus","constrainWidth","coverTrigger","closeOnClick","hover","onItemClick","_Component2","_this9","M_Dropdown","_dropdowns","dropdownEl","$dropdownEl","isOpen","isScrollable","isTouchMoving","focusedIndex","filterQuery","_makeDropdownFocusable","_resetFilterQueryBound","_resetFilterQuery","_handleDocumentClickBound","_handleDocumentClick","_handleDocumentTouchmoveBound","_handleDocumentTouchmove","_handleDropdownClickBound","_handleDropdownClick","_handleDropdownKeydownBound","_handleDropdownKeydown","_handleTriggerKeydownBound","_handleTriggerKeydown","_resetDropdownStyles","_handleMouseEnterBound","_handleMouseEnter","_handleMouseLeaveBound","_handleMouseLeave","_handleClickBound","_handleClick","toEl","toElement","relatedTarget","leaveToDropdownContent","leaveToActiveDropdownTrigger","$closestTrigger","_this10","$target","itemEl","focusedElement","$activatableElement","newFocusedIndex","foundNewIndex","tabIndex","_focusFocusedItem","fromCharCode","string","newOptionEl","filterTimeout","opacity","focus","triggerBRect","dropdownBRect","idealHeight","idealWidth","idealXPos","idealYPos","dropdownBounds","closestOverflowParent","alignments","verticalAlignment","horizontalAlignment","oppositeAlignment","_this11","scaleX","scaleY","_this12","positionInfo","_getDropdownPosition","transformOrigin","_placeDropdown","_setupTemporaryEventHandlers","_removeTemporaryEventHandlers","preventScrolling","dismissible","startingTop","endingTop","_Component3","_this13","M_Modal","_openingTrigger","$overlay","_nthModalOpened","_count","_handleOverlayClickBound","_handleOverlayClick","_handleModalCloseClickBound","_handleModalCloseClick","_handleTriggerClick","$trigger","modalId","modalInstance","_modalsOpen","_this14","enterAnimOptions","_this15","exitAnimOptions","zIndex","insertAdjacentElement","_handleKeydownBound","_handleKeydown","_handleFocusBound","_handleFocus","_Component4","_this16","M_Materialbox","overlayActive","doneAnimating","placeholder","originalWidth","originalHeight","originInlineStyles","caption","_handleMaterialboxClickBound","_handleMaterialboxClick","ancestorsChanged","ancestor","curr","_this17","animOptions","newHeight","newWidth","windowWidth","windowHeight","maxWidth","maxHeight","_this18","attrWidth","attrHeight","_this19","_updateVars","_makeAncestorsOverflowVisible","overlayOffset","$photocaption","$photoCaption","ratio","widthPercent","heightPercent","_animateImageIn","_handleWindowScrollBound","_handleWindowScroll","_handleWindowResizeBound","_handleWindowResize","_handleWindowEscapeBound","_handleWindowEscape","_this20","_animateImageOut","responsiveThreshold","_Component5","_this21","M_Parallax","_enabled","$img","_updateParallax","_setupStyles","_parallaxes","_handleImageLoadBound","_handleImageLoad","_handleScrollThrottled","_handleScroll","_handleWindowResizeThrottled","offsetHeight","parallaxDist","parallax","parallaxInstance","onShow","swipeable","Infinity","_Component6","_this22","M_Tabs","$tabLinks","_setupActiveTabLink","_setupSwipeableTabs","_setupNormalTabs","_setTabsAndTabWidth","_createIndicator","_indicator","_teardownSwipeableTabs","_teardownNormalTabs","_handleTabClickBound","_handleTabClick","tabWidth","tabsWidth","_calcLeftPos","$activeTabLink","_calcRightPos","_this23","tab","tabLink","$oldContent","$content","prevIndex","_tabsCarousel","_animateIndicator","_this24","indicator","_this25","$tabsContent","link","$currContent","$tabsWrapper","activeTabIndex","fullWidth","noWrap","onCycleTo","scrollWidth","ceil","leftDelay","rightDelay","tabId","exitDelay","enterDelay","margin","transitionMovement","_Component7","_this26","M_Tooltip","isHovered","isFocused","_appendTooltipEl","tooltipEl","tooltipContentEl","_handleBlurBound","_handleBlur","isManual","_getAttributeOptions","_updateTooltipContent","_setEnterDelayTimeout","_setExitDelayTimeout","_this27","_exitDelayTimeout","_this28","_enterDelayTimeout","newCoordinates","origin","originHeight","originWidth","offsetWidth","tooltipHeight","tooltipWidth","targetTop","targetLeft","xMovement","yMovement","_repositionWithinScreen","newX","newY","_positionTooltip","visibility","translateX","translateY","attributeOptions","tooltipTextOption","positionOption","Waves","$$","convertStyle","Effect","button","ripple","docElem","box","pos","ownerDocument","defaultView","getWindow","relativeY","pageY","relativeX","pageX","scale","clientWidth","touches","rippleStyle","TouchHandler","touchup","ripples","wrapInput","wrapper","elementStyle","replaceChild","allowEvent","allow","showEffect","srcElement","getWavesEffectElement","displayEffect","attach","displayLength","completeCallback","activationPercent","Toast","panning","timeRemaining","_toasts","_createContainer","toastElement","_createToast","M_Toast","_setTimer","toast","HTMLElement","nodeName","_container","_this29","counterInterval","setInterval","dismiss","_this30","clearInterval","activationDistance","wasSwiped","transition","marginTop","_removeContainer","_onDragStart","_onDragMove","_onDragEnd","_draggedToast","startingXPos","_xPos","time","xPos","deltaX","velocityX","totalDeltaX","targetTouches","clientX","toastIndex","edge","draggable","_Component8","_this31","M_Sidenav","isDragged","lastWindowWidth","lastWindowHeight","_createOverlay","_createDragTarget","_setupClasses","_setupFixed","_sidenavs","_enableBodyScrolling","_overlay","dragTarget","overlay","_closeBound","_handleDragTargetDragBound","_handleDragTargetDrag","_handleDragTargetReleaseBound","_handleDragTargetRelease","_handleCloseDragBound","_handleCloseDrag","_handleCloseReleaseBound","_handleCloseRelease","_handleCloseTriggerClickBound","_handleCloseTriggerClick","sidenavId","sidenavInstance","_startingXpos","_time","_width","_initialScrollTop","_verticallyScrolling","currentScrollTop","_isCurrentlyFixed","_startDrag","_dragMoveUpdate","dragDirection","transformX","transformPrefix","percentOpen","_preventBodyScrolling","_animateSidenavIn","_animateOverlayIn","_this32","slideOutPercent","_animateSidenavOut","_animateOverlayOut","_this33","endPercent","_this34","scrollOffset","activeClass","getActiveElement","_Component9","_this35","M_ScrollSpy","_elements","_increment","tickId","_elementsInView","_visibleElements","throttledResize","_handleThrottledResizeBound","scrollspy","_ticks","intersections","_findElements","_enter","_i","_scrollspy","_lastTick","_exit","unshift","_this36","hits","currTop","elTop","elLeft","elRight","elBottom","limit","onAutocomplete","minLength","sortFunction","inputString","_Component10","_this37","M_Autocomplete","count","activeIndex","oldVal","$inputField","$active","_mousedown","_setupDropdown","_removeDropdown","_handleInputBlurBound","_handleInputBlur","_handleInputKeyupAndFocusBound","_handleInputKeyupAndFocus","_handleInputKeydownBound","_handleInputKeydown","_handleInputClickBound","_handleInputClick","_handleContainerMousedownAndTouchstartBound","_handleContainerMousedownAndTouchstart","_handleContainerMouseupAndTouchendBound","_handleContainerMouseupAndTouchend","ontouchstart","_this38","dropdown","selectOption","_resetAutocomplete","_keydown","liElement","numItems","img","matchStart","matchEnd","beforeMatch","matchText","afterMatch","_resetCurrentElement","trim","_this39","matchingData","entry","sort","_entry","$autocompleteOption","_highlight","_renderDropdown","recalculateDimensions","autofocus","validity","badInput","validate_field","hasLength","lenAttr","textareaAutoResize","$textarea","hiddenDiv","fontFamily","fontSize","lineHeight","paddingRight","paddingLeft","input_selector","formReset","M_FormSelect","$inputElement","text_area_selector","path_input","file_names","indicators","interval","Slider","_Component11","_this40","M_Slider","$slider","$slides","_setSliderHeight","_animateCaptionIn","placeholderBase64","_setupIndicators","$indicators","_removeIndicators","_this41","_handleIntervalBound","_handleInterval","_handleIndicatorClickBound","_handleIndicatorClick","_this42","currIndex","newActiveIndex","_this43","$indicator","_this44","$caption","newIndex","$card","$cardReveal","secondaryPlaceholder","autocompleteOptions","onChipAdd","onChipSelect","onChipDelete","_Component12","_this45","M_Chips","chipsData","$chips","_setupInput","hasAutocomplete","$input","_renderChips","_setupAutocomplete","_setPlaceholder","_setupLabel","_handleChipClickBound","_handleChipClick","_handleInputFocusBound","_handleInputFocus","_handleChipsKeydown","_handleChipsKeyup","_handleChipsBlur","$chip","clickedClose","deleteChip","selectChip","autocomplete","addChip","tag","chip","renderedChip","closeIcon","image","firstChild","chipEl","_renderChip","_this46","$label","exists","_isValid","chipIndex","_selectedChip","chipsKeydown","currChips","selectIndex","_selectIndex","_selectIndex2","onPositionChange","_Component13","_this47","M_Pushpin","originalOffset","_pushpins","_updatePosition","_removePinClasses","_updateElements","scrolled","elIndex","hoverEnabled","toolbarEnabled","_Component14","_this48","M_FloatingActionButton","$anchor","$menu","$floatingBtns","$floatingBtnsReverse","offsetY","offsetX","_handleFABClickBound","_handleFABClick","_handleOpenBound","_handleCloseBound","_animateInToolbar","_animateInFAB","_animateOutToolbar","_animateOutFAB","_this49","_this50","scaleFactor","_this51","btnRect","backdrop","fabColor","btnBottom","btnLeft","btnWidth","_this52","autoClose","format","parse","defaultDate","setDefaultDate","disableWeekends","disableDayFn","firstDay","minDate","maxDate","yearRange","minYear","maxYear","minMonth","maxMonth","startRange","endRange","isRTL","showMonthAfterYear","showDaysInNextAndPreviousMonths","showClearBtn","i18n","clear","previousMonth","nextMonth","months","monthsShort","weekdays","weekdaysShort","weekdaysAbbrev","onSelect","onOpen","onClose","onDraw","_Component15","_this53","M_Datepicker","setHours","_setupVariables","_insertHTMLIntoDOM","_setupModal","defDate","_isDate","setDate","setInputValue","gotoDate","modal","modalEl","destroySelects","oldYearSelect","calendarEl","oldMonthSelect","clearBtn","doneBtn","cancelBtn","$modalEl","_this54","_this55","date","label","formats","preventOnSelect","_renderDateDisplay","_setToStartOfDay","firedBy","displayDate","day","getDay","month","getMonth","getDate","yearTextEl","getFullYear","dateTextEl","newCalendar","calendars","firstVisibleDate","year","lastVisibleDate","visibleDate","setMonth","adjustCalendars","adjustCalendar","calendar","randId","opts","days","_getDaysInMonth","yearOfPreviousMonth","yearOfNextMonth","daysInPreviousMonth","cells","isWeekSelected","isSelected","_compareDates","isToday","hasEvent","toDateString","isEmpty","dayNumber","monthNumber","yearNumber","isStartRange","isEndRange","isInRange","dayConfig","isDisabled","_isWeekend","renderDay","renderRow","renderTable","ariaSelected","isRowSelected","renderHead","renderBody","renderDayName","rows","refYear","monthHtml","yearHtml","isMinYear","isMaxYear","force","_y","_m","renderTitle","render","yearSelect","monthSelect","dropdownOptions","_handleYearChange","_handleMonthChange","_handleInputChangeBound","_handleInputChange","_handleCalendarClickBound","_handleCalendarClick","_finishSelectionBound","_finishSelection","_handleClearClickBound","_handleClearClick","_this56","_template","dd","ddd","dddd","mm","mmm","mmmm","yy","yyyy","prevMonth","gotoMonth","gotoYear","abbr","_isLeapYear","dialRadius","outerRadius","innerRadius","tickRadius","defaultTime","fromNow","twelveHour","vibrate","_Component16","_this57","M_Timepicker","_clockSetup","_pickerSetup","_handleClockClickStartBound","_handleClockClickStart","_handleDocumentClickMoveBound","_handleDocumentClickMove","_handleDocumentClickEndBound","_handleDocumentClickEnd","plate","spanHours","showView","spanMinutes","clockPlateBR","x0","y0","moved","clickPos","_Pos","dx","dy","setHand","_this58","currentView","minutesView","hours","minutes","containerEl","_this59","navigator","webkitVibrate","_canvas","hoursView","spanAmPm","footer","amOrPm","$clearBtn","confirmationBtnsContainer","$amBtn","$pmBtn","_handleAmPmClick","_buildHoursView","_buildMinutesView","_buildSVGClock","diameter","_createSVGEl","bearing","hand","bg","$tick","radian","radius","cos","_i2","_tick","_radian","_radius","_addLeadingZero","$btnClicked","_updateAmPmView","getHours","getMinutes","view","isHours","nextView","hideView","resetClock","toggleViewTimer","canvas","roundBy5","_this60","unit","inner","vibrateTimer","cx1","cy1","cx2","cy2","_updateTimeFromInput","clearValue","num","createElementNS","clientY","CharacterCounter","_Component17","_this61","M_CharacterCounter","isInvalid","isValidLength","_setupCounter","_removeCounter","_handleUpdateCounterBound","updateCounter","counterEl","float","maxLength","actualLength","counterString","_validateInput","dist","shift","numVisible","_Component18","_this62","M_Carousel","hasMultipleSlides","showIndicators","pressed","dragged","images","itemWidth","itemHeight","dim","_autoScrollBound","_autoScroll","_trackBound","_track","_setCarouselHeight","xform","every","prefix","_scroll","_this63","_handleCarouselTapBound","_handleCarouselTap","_handleCarouselDragBound","_handleCarouselDrag","_handleCarouselReleaseBound","_handleCarouselRelease","_handleCarouselClickBound","_handleCarouselClick","_handleResize","_this64","verticalDragged","reference","_xpos","referenceY","_ypos","velocity","amplitude","frame","timestamp","ticker","delta","stopPropagation","clickedIndex","_wrap","center","_cycleTo","imageHeight","imageOnly","_this65","firstSlide","firstImage","naturalWidth","naturalHeight","adjustedHeight","slideHeight","elapsed","exp","_this66","scrollingTimeout","half","dir","tween","zTranslation","tweenedOpacity","centerTweenedOpacity","lastCenter","numVisibleOffset","clientHeight","diff","activeIndicator","transformString","_updateItemStyle","_transformString","_transformString2","_transformString3","$currItem","oneTimeCallback","_Component19","_this67","M_TapTarget","$origin","_setup","_calculatePositioning","_handleTargetClickBound","_handleTargetClick","_handleOriginClickBound","_handleOriginClick","originEl","waveEl","contentEl","outerWidth","outerHeight","originTop","originLeft","centerX","centerY","isLeft","isRight","isTop","isBottom","isCenterX","tapTargetWidth","tapTargetHeight","tapTargetTop","tapTargetLeft","tapTargetPosition","tapTargetTextWidth","tapTargetTextHeight","tapTargetTextTop","tapTargetTextLeft","tapTargetTextPadding","tapTargetTextAlign","tapTargetWaveWidth","tapTargetWaveHeight","tapTargetWaveTop","tapTargetWaveLeft","tapTargetWrapperCssObj","tapTargetTextRight","tapTargetTextBottom","verticalAlign","_Component20","_this68","isMultiple","_keysSelected","_valueDict","_this69","_handleSelectChangeBound","_handleSelectChange","_handleOptionClickBound","_handleOptionClick","input","_this70","_setValueToInput","option","placeholderOption","_toggleEntryFromArray","_setSelectedStates","_this71","$selectOptions","optionEl","_appendOptionWithIcon","_addOptionToValueDict","selectOptions","dropdownIcon","selectedOption","disabledClass","optgroupClass","multipleCheckbox","liEl","spanEl","iconUrl","imgEl","notAdded","$optionLi","firstDisabled","optionIsSelected","_activateOption","newOption","selectedValues","Range","_Component21","_this72","M_Range","_setupThumb","_removeThumb","_handleRangeChangeBound","_handleRangeChange","_handleRangeMousedownTouchstartBound","_handleRangeMousedownTouchstart","_handleRangeInputMousemoveTouchmoveBound","_handleRangeInputMousemoveTouchmove","_handleRangeMouseupTouchendBound","_handleRangeMouseupTouchend","_handleRangeBlurMouseoutTouchleaveBound","_handleRangeBlurMouseoutTouchleave","thumb","_showRangeBubble","_calcRangeOffset","marginLeft","_xcloner_admin__WEBPACK_IMPORTED_MODULE_0__","Xcloner_Restore","steps","ajaxurl","upload_file_event","Event","detail","original_value","set_current_step","class","get_remote_backup_files_callback","CustomEvent","get_remote_backup_files","local_backup_file","get_remote_mysqldump_files_callback","get_remote_mysqldump_files","get_backup_file","remote_restore_backup_file_callback","processed","extracted_files","remote_restore_backup_file","filter_files","remote_restore_mysql_backup_file_callback","remote_restore_mysql_backup_file","mysqldump_file","restore_finish_callback","restore_finish","backup_archive","delete_backup_temporary_folder","delete_restore_script","update_remote_site_url","delete_backup_archive","upload_backup_file","upload_backup_file_callback","total_parts","uploaded_size","part_text","open_target_site","next_step","inc","xcloner_action","XCLONER_WPNONCE","_wpnonce","request","crossDomain","xcloner_auth_key","xcloner_restore","remote_database_file","edit_schedule_modal_instance","xcloner_scheduler","edit_modal","get_schedule_by_id","create_modal","delete_schedule_by_id","email_notification","diff_start_date","recurrence","backup_type","start_at","backup_encrypt","backup_delete_after_remote_transfer","tables","parseJSON","tables_list","db","excluded_files","exclude_files_list","save_schedule","form","IsJsonString","DataTable","responsive","bFilter","order","buttons","language","emptyTable","selectAll","selectNone","columnDefs","orderable","fnDrawCallback","oSettings","confirm","pickatime","default","twelvehour","donetext","autoclose","pickadate","selectMonths","selectYears","onSet"],"mappings":";CAAS,SAAUA,GAET,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAJ,EAAQG,GAAUK,KAAKH,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBO,EAAIT,EAGxBE,EAAoBQ,EAAIT,EAGxBC,EAAoBS,EAAI,SAASP,EAASQ,EAAMC,GAC3CX,EAAoBY,EAAEV,EAASQ,IAClCG,OAAOC,eAAeZ,EAASQ,E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