diff --git a/assets/js/torch.js b/assets/js/torch.js index fa381cc6..8d60bc5d 100644 --- a/assets/js/torch.js +++ b/assets/js/torch.js @@ -121,19 +121,23 @@ window.onload = () => { .toLocaleString('en-us', { year: 'numeric', month: '2-digit', day: '2-digit' }) .replace(/(\d+)\/(\d+)\/(\d+)/, '$3-$1-$2') + const parseDate = (dateString) => { + const dateParts = dateString.split('-') + if (dateParts.length === 3) { + return new Date(dateParts[0], dateParts[1] - 1, dateParts[2]) + } + } + /* eslint-disable no-new */ slice.call(document.querySelectorAll('.datepicker'), 0).forEach((field) => { - let defaultDate = new Date() - const fieldValue = field.value.split('-') - if (fieldValue.length === 3) { - defaultDate = new Date(fieldValue[0], fieldValue[1] - 1, fieldValue[2]) - } + const defaultDate = parseDate(field.value) || new Date() new Pikaday({ field: field, toString: date => formatDate(date), onSelect: date => (field.value = formatDate(date)), defaultDate: defaultDate, + parse: parseDate, theme: 'torch-datepicker' }) }) diff --git a/assets/package-lock.json b/assets/package-lock.json index 50baa989..7563b93b 100644 --- a/assets/package-lock.json +++ b/assets/package-lock.json @@ -890,6 +890,16 @@ "dev": true, "optional": true }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dev": true, + "optional": true, + "requires": { + "file-uri-to-path": "1.0.0" + } + }, "block-stream": { "version": "0.0.9", "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", @@ -2862,6 +2872,13 @@ "flat-cache": "^2.0.1" } }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "dev": true, + "optional": true + }, "fill-range": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", @@ -7226,6 +7243,7 @@ "dev": true, "optional": true, "requires": { + "bindings": "^1.5.0", "nan": "^2.12.1" } }, diff --git a/priv/static/theme.css b/priv/static/theme.css index 70c803f2..16a1072e 100644 --- a/priv/static/theme.css +++ b/priv/static/theme.css @@ -1,6 +1,6 @@ html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after{content:'';content:none}q:before,q:after{content:'';content:none}table{border-collapse:collapse;border-spacing:0}/*! * Pikaday * Copyright © 2014 David Bushell | BSD & MIT license | https://dbushell.com/ - */.pika-single{z-index:9999;display:block;position:relative;color:#333;background:#fff;border:1px solid #ccc;border-bottom-color:#bbb;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}.pika-single.is-hidden{display:none}.pika-single.is-bound{position:absolute;box-shadow:0 5px 15px -5px rgba(0,0,0,0.5)}.pika-single{*zoom:1}.pika-single:before,.pika-single:after{content:" ";display:table}.pika-single:after{clear:both}.pika-lendar{float:left;width:240px;margin:8px}.pika-title{position:relative;text-align:center}.pika-title select{cursor:pointer;position:absolute;z-index:9998;margin:0;left:0;top:5px;filter:alpha(opacity=0);opacity:0}.pika-label{display:inline-block;*display:inline;position:relative;z-index:9999;overflow:hidden;margin:0;padding:5px 3px;font-size:14px;line-height:20px;font-weight:bold;color:#333;background-color:#fff}.pika-prev,.pika-next{display:block;cursor:pointer;position:relative;outline:none;border:0;padding:0;width:20px;height:30px;text-indent:20px;white-space:nowrap;overflow:hidden;background-color:transparent;background-position:center center;background-repeat:no-repeat;background-size:75% 75%;opacity:.5;*position:absolute;*top:0}.pika-prev:hover,.pika-next:hover{opacity:1}.pika-prev.is-disabled,.pika-next.is-disabled{cursor:default;opacity:.2}.pika-prev,.is-rtl .pika-next{float:left;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAUklEQVR42u3VMQoAIBADQf8Pgj+OD9hG2CtONJB2ymQkKe0HbwAP0xucDiQWARITIDEBEnMgMQ8S8+AqBIl6kKgHiXqQqAeJepBo/z38J/U0uAHlaBkBl9I4GwAAAABJRU5ErkJggg==");*left:0}.pika-next,.is-rtl .pika-prev{float:right;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAU0lEQVR42u3VOwoAMAgE0dwfAnNjU26bYkBCFGwfiL9VVWoO+BJ4Gf3gtsEKKoFBNTCoCAYVwaAiGNQGMUHMkjGbgjk2mIONuXo0nC8XnCf1JXgArVIZAQh5TKYAAAAASUVORK5CYII=");*right:0}.pika-select{display:inline-block;*display:inline}.pika-table{width:100%;border-collapse:collapse;border-spacing:0;border:0}.pika-table th,.pika-table td{width:14.285714285714286%;padding:0}.pika-table th{color:#999;font-size:12px;line-height:25px;font-weight:bold;text-align:center}.pika-table abbr{border-bottom:none;cursor:help}.pika-button{cursor:pointer;display:block;box-sizing:border-box;outline:none;border:0;margin:0;width:100%;padding:5px;color:#666;font-size:12px;line-height:15px;text-align:right;background:#f5f5f5}.is-today .pika-button{color:#3af;font-weight:bold}.is-selected .pika-button{color:#fff;font-weight:bold;background:#3af;box-shadow:inset 0 1px 3px #178fe5;border-radius:3px}.is-disabled .pika-button,.is-outside-current-month .pika-button{color:#999;opacity:.3}.is-disabled .pika-button{pointer-events:none;cursor:default}.pika-button:hover{color:#fff;background:#ff8000;box-shadow:none;border-radius:3px}.pika-button .is-selection-disabled{pointer-events:none;cursor:default}.pika-week{font-size:11px;color:#999}.is-inrange .pika-button{background:#D5E9F7}.is-startrange .pika-button{color:#fff;background:#6CB31D;box-shadow:none;border-radius:3px}.is-endrange .pika-button{color:#fff;background:#33aaff;box-shadow:none;border-radius:3px}html{background:#eee;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:normal;min-height:100vh}html body{min-height:100vh}html a{text-decoration:none}html .torch-container{width:calc(1325px + 15px + 15px);max-width:calc(100% - 30px);margin:0 auto;padding-right:15px;padding-left:15px}section#torch-filters h3,section#torch-header-and-content .header h3,.torch-panel legend{font-size:16px;font-weight:bold;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}section#torch-filters h3,section#torch-header-and-content .header h3,.torch-panel legend{color:#666}section#torch-toolbar a,section#torch-filters button,section#torch-table table td button,form#torch-form .torch-submit-form .torch-submit-button{transition:all 250ms ease-in-out;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;padding:9px 12px;cursor:pointer;background-color:#eee;color:#666;border:1px solid transparent;text-transform:capitalize}section#torch-toolbar a,section#torch-filters button{border-color:rgba(0,0,0,0.1)}section#torch-toolbar a:hover,section#torch-filters button:hover{background-color:#c8c8c8}section#torch-table table td button,form#torch-form .torch-submit-form .torch-submit-button{background-color:#e73536;color:#fff}section#torch-table table td button:hover,form#torch-form .torch-submit-form .torch-submit-button:hover{background-color:#b91617}section#torch-filters .field select,form#torch-form .torch-form-group select{transition:all 350ms ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:0;margin:0;display:block;border:1px solid #d5d5d5;border-radius:0px;padding:9px 25px 9px 10px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;background:url("/torch/down-arrow.png") no-repeat 97% 50% #fff;background-size:17px;background-position:94%;color:#666}section#torch-filters .field select:focus,form#torch-form .torch-form-group select:focus,section#torch-filters .field select:hover,form#torch-form .torch-form-group select:hover{border-color:#666}section#torch-filters .field label{color:#666;padding:10px 0;font-size:14px;display:block}section#torch-filters .field input[type="text"],form#torch-form .torch-form-group input[type="text"],form#torch-form .torch-form-group input[type="password"],form#torch-form .torch-form-group textarea,form#torch-form .torch-form-group input[type="number"]{transition:all 350ms ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;background:none;margin:0;padding:10px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;color:#666;border:1px solid #d5d5d5;display:block;background-color:#fff}section#torch-filters .field input:focus[type="text"],form#torch-form .torch-form-group input:focus[type="text"],form#torch-form .torch-form-group input:focus[type="password"],form#torch-form .torch-form-group textarea:focus,form#torch-form .torch-form-group input:focus[type="number"],section#torch-filters .field input:hover[type="text"],form#torch-form .torch-form-group input:hover[type="text"],form#torch-form .torch-form-group input:hover[type="password"],form#torch-form .torch-form-group textarea:hover,form#torch-form .torch-form-group input:hover[type="number"]{border-color:#666;border-width:1px}section#torch-account-info{background-color:#e73536;text-align:right}section#torch-account-info a{margin:6px 0;display:inline-block;padding:0 10px;border-right:1px solid #fff;color:#fff;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px}section#torch-account-info .torch-container a:last-child{border-right:0px}section#torch-nav{display:-ms-flexbox;display:flex;background-color:#FAFAFA}section#torch-nav .torch-container{display:-ms-flexbox;display:flex}section#torch-nav .torch-logo{padding:6px 0px}section#torch-nav .torch-logo a{display:-ms-flexbox;display:flex}section#torch-nav .torch-logo a h3{color:#e73536;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;text-transform:uppercase;font-size:18px;font-weight:bold;margin:15px 10px}section#torch-nav .torch-logo a:before{content:" ";display:block;background-image:url("/torch/torch-logo.png");width:50px;height:50px;background-size:contain;background-repeat:no-repeat}section#torch-nav .torch-nav{display:-ms-flexbox;display:flex}section#torch-nav .torch-nav a{display:block;font-size:16px;padding:22px 10px 19px 10px;border-bottom:3px solid transparent;color:#a6a6a6}section#torch-nav .torch-nav a:hover{color:#666}section#torch-nav .torch-nav a.active{border-color:#e73536;color:#666}section#torch-table{overflow-x:auto}section#torch-table .torch-no-data{text-transform:capitalize;color:#666}section#torch-table table{color:#666;font-size:14px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;width:100%;background-color:#fff}section#torch-table table th{border-top:1px solid #eee;border-bottom:1px solid #eee;background-color:#FAFAFA;padding:0;color:#666;vertical-align:middle}section#torch-table table th:hover{background-color:#d4d4d4}section#torch-table table th:first-child{border-left:1px solid #eee}section#torch-table table th:last-child{border-right:1px solid #eee}section#torch-table table th .caret{border-left:5px solid transparent;border-right:5px solid transparent;display:inline-block;height:0;margin-left:5px;margin-top:5px;position:absolute;right:10px;top:12px;width:0}section#torch-table table th a,section#torch-table table th span:not(.caret){position:relative;text-decoration:none;color:#666;padding:12px 10px;display:block}section#torch-table table th a.active.desc .caret{border-top:5px solid #666}section#torch-table table th a.active.asc .caret{border-bottom:5px solid #666}section#torch-table table td{overflow:hidden;text-overflow:ellipsis;border-top:1px solid #eee;border-bottom:1px solid #eee;vertical-align:middle;padding:15px 10px;max-width:300px}section#torch-table table td:first-child{border-left:1px solid #eee}section#torch-table table td:last-child{border-right:1px solid #eee}section#torch-table table td a{color:#e73536;text-decoration:none}section#torch-table table td img{max-height:30px;max-width:30px}section#torch-toolbar .torch-container{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end}section#torch-toolbar a{margin-right:20px}section#torch-toolbar a:last-child{margin-right:0px}section#torch-filters{background-color:#FAFAFA;padding:20px}section#torch-filters h3{text-transform:capitalize}section#torch-filters hr{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;border-bottom:1px solid #d5d5d5;margin:20px 0 10px}section#torch-filters .field{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}section#torch-filters .field label{width:100%}section#torch-filters .field select{margin-right:20px;width:calc(35% - 20px)}section#torch-filters .field input[type="text"]{width:65%}section#torch-filters .field input[type="text"].datepicker{width:calc(50% - 10px)}section#torch-filters .field input[type="text"].datepicker.start{margin-right:20px}section#torch-filters button{margin-top:10px}section#torch-filters a{margin-left:20px;color:#e73536}section#torch-pagination ul{display:-ms-flexbox;display:flex}section#torch-pagination li a{display:block;padding:10px 15px;color:#e73536;text-decoration:none;background-color:#fff;border:1px solid #eee;margin-left:-1px}section#torch-pagination li a:hover{background-color:#FAFAFA}section#torch-pagination li a.active{background-color:#e73536;color:#fff}section#torch-pagination li:first-child a{margin-left:0px}section#torch-header-and-content .header{background-color:#FAFAFA;padding:15px 20px;border-top:4px solid #e73536;border-radius:3px;border-bottom:1px solid #eee}section#torch-header-and-content ul{padding:20px;background-color:#fff}section#torch-header-and-content ul li{display:-ms-flexbox;display:flex;padding:10px 0}section#torch-header-and-content ul li .torch-show-label{width:20%;text-align:center}section#torch-header-and-content ul li .torch-show-data{width:80%}form#torch-form{background-color:#fff;padding:20px}form#torch-form .torch-form-error{text-align:center;background-color:#f6bb42;color:#fff;padding:5px;margin-bottom:20px}form#torch-form .torch-form-group{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-bottom:20px}form#torch-form .torch-form-group label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end;font-size:15px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;color:#666;width:calc(30% - 10px);text-align:right;margin-right:20px}form#torch-form .torch-form-group input[type="text"],form#torch-form .torch-form-group input[type="password"],form#torch-form .torch-form-group textarea{width:calc(70% - 10px)}form#torch-form .torch-form-group .help-block{margin-left:calc(30% + 12px);width:70%;text-transform:capitalize;color:#f6bb42;font-size:14px}form#torch-form .torch-submit-form{text-align:right}.torch-panel{max-width:800px;border:2px solid #eee;padding:25px}.torch-panel legend{padding:0 6px}.torch-datepicker .is-today:not(.is-selected) .pika-button{color:#e73536}.torch-datepicker .pika-button:hover{background:#e73536;color:#fff !important}.torch-datepicker .is-selected .pika-button{background:#e73536;box-shadow:none}.torch-datepicker .is-selected .pika-button:hover{background:#e73536}section#torch-flash-messages{margin-bottom:20px}section#torch-flash-messages .torch-flash{padding:8px;text-align:center;color:#fff}section#torch-flash-messages .torch-flash.error{background-color:#f6bb42}section#torch-flash-messages .torch-flash.info{background-color:#4a89dc}section#torch-flash-messages .torch-flash.success{background-color:#70ca63}section#torch-flash-messages .torch-flash .torch-flash-close{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:inherit;border:1px solid #fff;color:#fff;border-radius:50%;width:22px;height:22px;cursor:pointer}section#torch-flash-messages .torch-flash .torch-flash-close:focus{outline:none}body.torch-index section#torch-nav{margin-bottom:20px}body.torch-index section#torch-toolbar{margin-bottom:20px}body.torch-index section#torch-index-content .torch-container{display:-ms-flexbox;display:flex}body.torch-index section#torch-index-content .torch-container section#torch-filters{margin-left:35px;width:calc(30% - 35px);-ms-flex-order:2;order:2}body.torch-index section#torch-index-content .torch-container section#torch-table{width:70%;-ms-flex-order:1;order:1}body.torch-index section#torch-index-content .torch-container section#torch-table table{margin-bottom:20px}body.torch-index section#torch-index-content .torch-container section#torch-pagination{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;margin-bottom:20px}body.torch-show header{margin-bottom:20px}body.torch-show section#torch-toolbar{margin-bottom:20px}body.torch-edit header,body.torch-update header{margin-bottom:20px}body.torch-edit section#torch-toolbar,body.torch-update section#torch-toolbar{margin-bottom:20px}body.torch-new header,body.torch-create header{margin-bottom:20px}body.torch-new section#torch-toolbar,body.torch-create section#torch-toolbar{margin-bottom:20px} + */.pika-single{z-index:9999;display:block;position:relative;color:#333;background:#fff;border:1px solid #ccc;border-bottom-color:#bbb;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}.pika-single.is-hidden{display:none}.pika-single.is-bound{position:absolute;box-shadow:0 5px 15px -5px rgba(0,0,0,0.5)}.pika-single{*zoom:1}.pika-single:before,.pika-single:after{content:" ";display:table}.pika-single:after{clear:both}.pika-lendar{float:left;width:240px;margin:8px}.pika-title{position:relative;text-align:center}.pika-title select{cursor:pointer;position:absolute;z-index:9998;margin:0;left:0;top:5px;filter:alpha(opacity=0);opacity:0}.pika-label{display:inline-block;*display:inline;position:relative;z-index:9999;overflow:hidden;margin:0;padding:5px 3px;font-size:14px;line-height:20px;font-weight:bold;color:#333;background-color:#fff}.pika-prev,.pika-next{display:block;cursor:pointer;position:relative;outline:none;border:0;padding:0;width:20px;height:30px;text-indent:20px;white-space:nowrap;overflow:hidden;background-color:transparent;background-position:center center;background-repeat:no-repeat;background-size:75% 75%;opacity:.5;*position:absolute;*top:0}.pika-prev:hover,.pika-next:hover{opacity:1}.pika-prev.is-disabled,.pika-next.is-disabled{cursor:default;opacity:.2}.pika-prev,.is-rtl .pika-next{float:left;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAUklEQVR42u3VMQoAIBADQf8Pgj+OD9hG2CtONJB2ymQkKe0HbwAP0xucDiQWARITIDEBEnMgMQ8S8+AqBIl6kKgHiXqQqAeJepBo/z38J/U0uAHlaBkBl9I4GwAAAABJRU5ErkJggg==");*left:0}.pika-next,.is-rtl .pika-prev{float:right;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAU0lEQVR42u3VOwoAMAgE0dwfAnNjU26bYkBCFGwfiL9VVWoO+BJ4Gf3gtsEKKoFBNTCoCAYVwaAiGNQGMUHMkjGbgjk2mIONuXo0nC8XnCf1JXgArVIZAQh5TKYAAAAASUVORK5CYII=");*right:0}.pika-select{display:inline-block;*display:inline}.pika-table{width:100%;border-collapse:collapse;border-spacing:0;border:0}.pika-table th,.pika-table td{width:14.285714285714286%;padding:0}.pika-table th{color:#999;font-size:12px;line-height:25px;font-weight:bold;text-align:center}.pika-table abbr{border-bottom:none;cursor:help}.pika-button{cursor:pointer;display:block;box-sizing:border-box;outline:none;border:0;margin:0;width:100%;padding:5px;color:#666;font-size:12px;line-height:15px;text-align:right;background:#f5f5f5}.is-today .pika-button{color:#3af;font-weight:bold}.is-selected .pika-button{color:#fff;font-weight:bold;background:#3af;box-shadow:inset 0 1px 3px #178fe5;border-radius:3px}.is-disabled .pika-button,.is-outside-current-month .pika-button{color:#999;opacity:.3}.is-disabled .pika-button{pointer-events:none;cursor:default}.pika-button:hover{color:#fff;background:#ff8000;box-shadow:none;border-radius:3px}.pika-button .is-selection-disabled{pointer-events:none;cursor:default}.pika-week{font-size:11px;color:#999}.is-inrange .pika-button{background:#D5E9F7}.is-startrange .pika-button{color:#fff;background:#6CB31D;box-shadow:none;border-radius:3px}.is-endrange .pika-button{color:#fff;background:#33aaff;box-shadow:none;border-radius:3px}html{background:#eee;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:normal;min-height:100vh}html body{min-height:100vh}html a{text-decoration:none}html .torch-container{width:calc(1325px + 15px + 15px);max-width:calc(100% - 30px);margin:0 auto;padding-right:15px;padding-left:15px}section#torch-filters h3,section#torch-header-and-content .header h3,.torch-panel legend{font-size:16px;font-weight:bold;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}section#torch-filters h3,section#torch-header-and-content .header h3,.torch-panel legend{color:#666}section#torch-toolbar a,section#torch-filters button,section#torch-table table td button,form#torch-form .torch-submit-form .torch-submit-button{transition:all 250ms ease-in-out;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;padding:9px 12px;cursor:pointer;background-color:#eee;color:#666;border:1px solid transparent;text-transform:capitalize}section#torch-toolbar a,section#torch-filters button{border-color:rgba(0,0,0,0.1)}section#torch-toolbar a:hover,section#torch-filters button:hover{background-color:#c8c8c8}section#torch-table table td button,form#torch-form .torch-submit-form .torch-submit-button{background-color:#e73536;color:#fff}section#torch-table table td button:hover,form#torch-form .torch-submit-form .torch-submit-button:hover{background-color:#b91617}section#torch-filters .field select,form#torch-form .torch-form-group select{transition:all 350ms ease-in-out;-webkit-appearance:none;appearance:none;outline:0;margin:0;display:block;border:1px solid #d5d5d5;border-radius:0px;padding:9px 25px 9px 10px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;background:url("/torch/down-arrow.png") no-repeat 97% 50% #fff;background-size:17px;background-position:94%;color:#666}section#torch-filters .field select:focus,form#torch-form .torch-form-group select:focus,section#torch-filters .field select:hover,form#torch-form .torch-form-group select:hover{border-color:#666}section#torch-filters .field label{color:#666;padding:10px 0;font-size:14px;display:block}section#torch-filters .field input[type="text"],form#torch-form .torch-form-group input[type="text"],form#torch-form .torch-form-group input[type="password"],form#torch-form .torch-form-group textarea,form#torch-form .torch-form-group input[type="number"]{transition:all 350ms ease-in-out;-webkit-appearance:none;appearance:none;outline:none;background:none;margin:0;padding:10px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;color:#666;border:1px solid #d5d5d5;display:block;background-color:#fff}section#torch-filters .field input:focus[type="text"],form#torch-form .torch-form-group input:focus[type="text"],form#torch-form .torch-form-group input:focus[type="password"],form#torch-form .torch-form-group textarea:focus,form#torch-form .torch-form-group input:focus[type="number"],section#torch-filters .field input:hover[type="text"],form#torch-form .torch-form-group input:hover[type="text"],form#torch-form .torch-form-group input:hover[type="password"],form#torch-form .torch-form-group textarea:hover,form#torch-form .torch-form-group input:hover[type="number"]{border-color:#666;border-width:1px}section#torch-account-info{background-color:#e73536;text-align:right}section#torch-account-info a{margin:6px 0;display:inline-block;padding:0 10px;border-right:1px solid #fff;color:#fff;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px}section#torch-account-info .torch-container a:last-child{border-right:0px}section#torch-nav{display:-ms-flexbox;display:flex;background-color:#FAFAFA}section#torch-nav .torch-container{display:-ms-flexbox;display:flex}section#torch-nav .torch-logo{padding:6px 0px}section#torch-nav .torch-logo a{display:-ms-flexbox;display:flex}section#torch-nav .torch-logo a h3{color:#e73536;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;text-transform:uppercase;font-size:18px;font-weight:bold;margin:15px 10px}section#torch-nav .torch-logo a:before{content:" ";display:block;background-image:url("/torch/torch-logo.png");width:50px;height:50px;background-size:contain;background-repeat:no-repeat}section#torch-nav .torch-nav{display:-ms-flexbox;display:flex}section#torch-nav .torch-nav a{display:block;font-size:16px;padding:22px 10px 19px 10px;border-bottom:3px solid transparent;color:#a6a6a6}section#torch-nav .torch-nav a:hover{color:#666}section#torch-nav .torch-nav a.active{border-color:#e73536;color:#666}section#torch-table{overflow-x:auto}section#torch-table .torch-no-data{text-transform:capitalize;color:#666}section#torch-table table{color:#666;font-size:14px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;width:100%;background-color:#fff}section#torch-table table th{border-top:1px solid #eee;border-bottom:1px solid #eee;background-color:#FAFAFA;padding:0;color:#666;vertical-align:middle}section#torch-table table th:hover{background-color:#d4d4d4}section#torch-table table th:first-child{border-left:1px solid #eee}section#torch-table table th:last-child{border-right:1px solid #eee}section#torch-table table th .caret{border-left:5px solid transparent;border-right:5px solid transparent;display:inline-block;height:0;margin-left:5px;margin-top:5px;position:absolute;right:10px;top:12px;width:0}section#torch-table table th a,section#torch-table table th span:not(.caret){position:relative;text-decoration:none;color:#666;padding:12px 10px;display:block}section#torch-table table th a.active.desc .caret{border-top:5px solid #666}section#torch-table table th a.active.asc .caret{border-bottom:5px solid #666}section#torch-table table td{overflow:hidden;text-overflow:ellipsis;border-top:1px solid #eee;border-bottom:1px solid #eee;vertical-align:middle;padding:15px 10px;max-width:300px}section#torch-table table td:first-child{border-left:1px solid #eee}section#torch-table table td:last-child{border-right:1px solid #eee}section#torch-table table td a{color:#e73536;text-decoration:none}section#torch-table table td img{max-height:30px;max-width:30px}section#torch-toolbar .torch-container{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end}section#torch-toolbar a{margin-right:20px}section#torch-toolbar a:last-child{margin-right:0px}section#torch-filters{background-color:#FAFAFA;padding:20px}section#torch-filters h3{text-transform:capitalize}section#torch-filters hr{-webkit-appearance:none;appearance:none;border:none;border-bottom:1px solid #d5d5d5;margin:20px 0 10px}section#torch-filters .field{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}section#torch-filters .field label{width:100%}section#torch-filters .field select{margin-right:20px;width:calc(35% - 20px)}section#torch-filters .field input[type="text"]{width:65%}section#torch-filters .field input[type="text"].datepicker{width:calc(50% - 10px)}section#torch-filters .field input[type="text"].datepicker.start{margin-right:20px}section#torch-filters button{margin-top:10px}section#torch-filters a{margin-left:20px;color:#e73536}section#torch-pagination ul{display:-ms-flexbox;display:flex}section#torch-pagination li a{display:block;padding:10px 15px;color:#e73536;text-decoration:none;background-color:#fff;border:1px solid #eee;margin-left:-1px}section#torch-pagination li a:hover{background-color:#FAFAFA}section#torch-pagination li a.active{background-color:#e73536;color:#fff}section#torch-pagination li:first-child a{margin-left:0px}section#torch-header-and-content .header{background-color:#FAFAFA;padding:15px 20px;border-top:4px solid #e73536;border-radius:3px;border-bottom:1px solid #eee}section#torch-header-and-content ul{padding:20px;background-color:#fff}section#torch-header-and-content ul li{display:-ms-flexbox;display:flex;padding:10px 0}section#torch-header-and-content ul li .torch-show-label{width:20%;text-align:center}section#torch-header-and-content ul li .torch-show-data{width:80%}form#torch-form{background-color:#fff;padding:20px}form#torch-form .torch-form-error{text-align:center;background-color:#f6bb42;color:#fff;padding:5px;margin-bottom:20px}form#torch-form .torch-form-group{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-bottom:20px}form#torch-form .torch-form-group label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end;font-size:15px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;color:#666;width:calc(30% - 10px);text-align:right;margin-right:20px}form#torch-form .torch-form-group input[type="text"],form#torch-form .torch-form-group input[type="password"],form#torch-form .torch-form-group textarea{width:calc(70% - 10px)}form#torch-form .torch-form-group .help-block{margin-left:calc(30% + 12px);width:70%;text-transform:capitalize;color:#f6bb42;font-size:14px}form#torch-form .torch-submit-form{text-align:right}.torch-panel{max-width:800px;border:2px solid #eee;padding:25px}.torch-panel legend{padding:0 6px}.torch-datepicker .is-today:not(.is-selected) .pika-button{color:#e73536}.torch-datepicker .pika-button:hover{background:#e73536;color:#fff !important}.torch-datepicker .is-selected .pika-button{background:#e73536;box-shadow:none}.torch-datepicker .is-selected .pika-button:hover{background:#e73536}section#torch-flash-messages{margin-bottom:20px}section#torch-flash-messages .torch-flash{padding:8px;text-align:center;color:#fff}section#torch-flash-messages .torch-flash.error{background-color:#f6bb42}section#torch-flash-messages .torch-flash.info{background-color:#4a89dc}section#torch-flash-messages .torch-flash.success{background-color:#70ca63}section#torch-flash-messages .torch-flash .torch-flash-close{-webkit-appearance:none;appearance:none;background-color:inherit;border:1px solid #fff;color:#fff;border-radius:50%;width:22px;height:22px;cursor:pointer}section#torch-flash-messages .torch-flash .torch-flash-close:focus{outline:none}body.torch-index section#torch-nav{margin-bottom:20px}body.torch-index section#torch-toolbar{margin-bottom:20px}body.torch-index section#torch-index-content .torch-container{display:-ms-flexbox;display:flex}body.torch-index section#torch-index-content .torch-container section#torch-filters{margin-left:35px;width:calc(30% - 35px);-ms-flex-order:2;order:2}body.torch-index section#torch-index-content .torch-container section#torch-table{width:70%;-ms-flex-order:1;order:1}body.torch-index section#torch-index-content .torch-container section#torch-table table{margin-bottom:20px}body.torch-index section#torch-index-content .torch-container section#torch-pagination{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;margin-bottom:20px}body.torch-show header{margin-bottom:20px}body.torch-show section#torch-toolbar{margin-bottom:20px}body.torch-edit header,body.torch-update header{margin-bottom:20px}body.torch-edit section#torch-toolbar,body.torch-update section#torch-toolbar{margin-bottom:20px}body.torch-new header,body.torch-create header{margin-bottom:20px}body.torch-new section#torch-toolbar,body.torch-create section#torch-toolbar{margin-bottom:20px} /*# sourceMappingURL=theme.css.map*/ \ No newline at end of file diff --git a/priv/static/torch.js b/priv/static/torch.js index 3df2a873..acee6ddf 100644 --- a/priv/static/torch.js +++ b/priv/static/torch.js @@ -4,5 +4,5 @@ * * Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/Pikaday/Pikaday */ -!function(t,a){"use strict";var i;try{i=n(!function(){var e=new Error("Cannot find module 'moment'");throw e.code="MODULE_NOT_FOUND",e}())}catch(e){}e.exports=function(e){var t="function"==typeof e,n=!!window.addEventListener,a=window.document,i=window.setTimeout,o=function(e,t,a,i){n?e.addEventListener(t,a,!!i):e.attachEvent("on"+t,a)},s=function(e,t,a,i){n?e.removeEventListener(t,a,!!i):e.detachEvent("on"+t,a)},r=function(e,t){return-1!==(" "+e.className+" ").indexOf(" "+t+" ")},l=function(e,t){r(e,t)||(e.className=""===e.className?t:e.className+" "+t)},d=function(e,t){var n;e.className=(n=(" "+e.className+" ").replace(" "+t+" "," ")).trim?n.trim():n.replace(/^\s+|\s+$/g,"")},h=function(e){return/Array/.test(Object.prototype.toString.call(e))},u=function(e){return/Date/.test(Object.prototype.toString.call(e))&&!isNaN(e.getTime())},c=function(e){var t=e.getDay();return 0===t||6===t},f=function(e){return e%4==0&&e%100!=0||e%400==0},m=function(e,t){return[31,f(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},g=function(e){u(e)&&e.setHours(0,0,0,0)},p=function(e,t){return e.getTime()===t.getTime()},y=function(e,t,n){var a,i;for(a in t)(i=void 0!==e[a])&&"object"==typeof t[a]&&null!==t[a]&&void 0===t[a].nodeName?u(t[a])?n&&(e[a]=new Date(t[a].getTime())):h(t[a])?n&&(e[a]=t[a].slice(0)):e[a]=y({},t[a],n):!n&&i||(e[a]=t[a]);return e},v=function(e,t,n){var i;a.createEvent?((i=a.createEvent("HTMLEvents")).initEvent(t,!0,!1),i=y(i,n),e.dispatchEvent(i)):a.createEventObject&&(i=a.createEventObject(),i=y(i,n),e.fireEvent("on"+t,i))},b=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},D={field:null,bound:void 0,ariaLabel:"Use the arrow keys to pick a date",position:"bottom left",reposition:!0,format:"YYYY-MM-DD",toString:null,parse:null,defaultDate:null,setDefaultDate:!1,firstDay:0,formatStrict:!1,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,pickWholeWeek:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,enableSelectionDaysInNextAndPreviousMonths:!1,numberOfMonths:1,mainCalendar:"left",container:void 0,blurFieldOnSelect:!0,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},theme:null,events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null,keyboardInput:!0},_=function(e,t,n){for(t+=e.firstDay;t>=7;)t-=7;return n?e.i18n.weekdaysShort[t]:e.i18n.weekdays[t]},w=function(e){var t=[],n="false";if(e.isEmpty){if(!e.showDaysInNextAndPreviousMonths)return'';t.push("is-outside-current-month"),e.enableSelectionDaysInNextAndPreviousMonths||t.push("is-selection-disabled")}return e.isDisabled&&t.push("is-disabled"),e.isToday&&t.push("is-today"),e.isSelected&&(t.push("is-selected"),n="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"),'"},M=function(e,t,n,a){return''+(t?e.reverse():e).join("")+""},k=function(e,t,n,a,i,o){var s,r,l,d,u,c=e._o,f=n===c.minYear,m=n===c.maxYear,g='
',p=!0,y=!0;for(l=[],s=0;s<12;s++)l.push('");for(d='
'+c.i18n.months[a]+'
",h(c.yearRange)?(s=c.yearRange[0],r=c.yearRange[1]+1):(s=n-c.yearRange,r=1+n+c.yearRange),l=[];s=c.minYear&&l.push('");return u='
'+n+c.yearSuffix+'
",c.showMonthAfterYear?g+=u+d:g+=d+u,f&&(0===a||c.minMonth>=a)&&(p=!1),m&&(11===a||c.maxMonth<=a)&&(y=!1),0===t&&(g+='"),t===e._o.numberOfMonths-1&&(g+='"),g+"
"},x=function(s){var l=this,d=l.config(s);l._onMouseDown=function(e){if(l._v){var t=(e=e||window.event).target||e.srcElement;if(t)if(r(t,"is-disabled")||(!r(t,"pika-button")||r(t,"is-empty")||r(t.parentNode,"is-disabled")?r(t,"pika-prev")?l.prevMonth():r(t,"pika-next")&&l.nextMonth():(l.setDate(new Date(t.getAttribute("data-pika-year"),t.getAttribute("data-pika-month"),t.getAttribute("data-pika-day"))),d.bound&&i((function(){l.hide(),d.blurFieldOnSelect&&d.field&&d.field.blur()}),100))),r(t,"pika-select"))l._c=!0;else{if(!e.preventDefault)return e.returnValue=!1,!1;e.preventDefault()}}},l._onChange=function(e){var t=(e=e||window.event).target||e.srcElement;t&&(r(t,"pika-select-month")?l.gotoMonth(t.value):r(t,"pika-select-year")&&l.gotoYear(t.value))},l._onKeyChange=function(e){if(e=e||window.event,l.isVisible())switch(e.keyCode){case 13:case 27:d.field&&d.field.blur();break;case 37:e.preventDefault(),l.adjustDate("subtract",1);break;case 38:l.adjustDate("subtract",7);break;case 39:l.adjustDate("add",1);break;case 40:l.adjustDate("add",7)}},l._onInputChange=function(n){var a;n.firedBy!==l&&(a=d.parse?d.parse(d.field.value,d.format):t?(a=e(d.field.value,d.format,d.formatStrict))&&a.isValid()?a.toDate():null:new Date(Date.parse(d.field.value)),u(a)&&l.setDate(a),l._v||l.show())},l._onInputFocus=function(){l.show()},l._onInputClick=function(){l.show()},l._onInputBlur=function(){var e=a.activeElement;do{if(r(e,"pika-single"))return}while(e=e.parentNode);l._c||(l._b=i((function(){l.hide()}),50)),l._c=!1},l._onClick=function(e){var t=(e=e||window.event).target||e.srcElement,a=t;if(t){!n&&r(t,"pika-select")&&(t.onchange||(t.setAttribute("onchange","return;"),o(t,"change",l._onChange)));do{if(r(a,"pika-single")||a===d.trigger)return}while(a=a.parentNode);l._v&&t!==d.trigger&&a!==d.trigger&&l.hide()}},l.el=a.createElement("div"),l.el.className="pika-single"+(d.isRTL?" is-rtl":"")+(d.theme?" "+d.theme:""),o(l.el,"mousedown",l._onMouseDown,!0),o(l.el,"touchend",l._onMouseDown,!0),o(l.el,"change",l._onChange),d.keyboardInput&&o(a,"keydown",l._onKeyChange),d.field&&(d.container?d.container.appendChild(l.el):d.bound?a.body.appendChild(l.el):d.field.parentNode.insertBefore(l.el,d.field.nextSibling),o(d.field,"change",l._onInputChange),d.defaultDate||(t&&d.field.value?d.defaultDate=e(d.field.value,d.format).toDate():d.defaultDate=new Date(Date.parse(d.field.value)),d.setDefaultDate=!0));var h=d.defaultDate;u(h)?d.setDefaultDate?l.setDate(h,!0):l.gotoDate(h):l.gotoDate(new Date),d.bound?(this.hide(),l.el.className+=" is-bound",o(d.trigger,"click",l._onInputClick),o(d.trigger,"focus",l._onInputFocus),o(d.trigger,"blur",l._onInputBlur)):this.show()};return x.prototype={config:function(e){this._o||(this._o=y({},D,!0));var t=y(this._o,e,!0);t.isRTL=!!t.isRTL,t.field=t.field&&t.field.nodeName?t.field:null,t.theme="string"==typeof t.theme&&t.theme?t.theme:null,t.bound=!!(void 0!==t.bound?t.field&&t.bound:t.field),t.trigger=t.trigger&&t.trigger.nodeName?t.trigger:t.field,t.disableWeekends=!!t.disableWeekends,t.disableDayFn="function"==typeof t.disableDayFn?t.disableDayFn:null;var n=parseInt(t.numberOfMonths,10)||1;if(t.numberOfMonths=n>4?4:n,u(t.minDate)||(t.minDate=!1),u(t.maxDate)||(t.maxDate=!1),t.minDate&&t.maxDate&&t.maxDate100&&(t.yearRange=100);return t},toString:function(n){return n=n||this._o.format,u(this._d)?this._o.toString?this._o.toString(this._d,n):t?e(this._d).format(n):this._d.toDateString():""},getMoment:function(){return t?e(this._d):null},setMoment:function(n,a){t&&e.isMoment(n)&&this.setDate(n.toDate(),a)},getDate:function(){return u(this._d)?new Date(this._d.getTime()):null},setDate:function(e,t){if(!e)return this._d=null,this._o.field&&(this._o.field.value="",v(this._o.field,"change",{firedBy:this})),this.draw();if("string"==typeof e&&(e=new Date(Date.parse(e))),u(e)){var n=this._o.minDate,a=this._o.maxDate;u(n)&&ea&&(e=a),this._d=new Date(e.getTime()),g(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),v(this._o.field,"change",{firedBy:this})),t||"function"!=typeof this._o.onSelect||this._o.onSelect.call(this,this.getDate())}},gotoDate:function(e){var t=!0;if(u(e)){if(this.calendars){var n=new Date(this.calendars[0].year,this.calendars[0].month,1),a=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),i=e.getTime();a.setMonth(a.getMonth()+1),a.setDate(a.getDate()-1),t=i=o&&(this._y=o,!isNaN(r)&&this._m>r&&(this._m=r)),t="pika-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2);for(var d=0;d'+k(this,d,this.calendars[d].year,this.calendars[d].month,this.calendars[0].year,t)+this.render(this.calendars[d].year,this.calendars[d].month,t)+"";this.el.innerHTML=l,n.bound&&"hidden"!==n.field.type&&i((function(){n.trigger.focus()}),1),"function"==typeof this._o.onDraw&&this._o.onDraw(this),n.bound&&n.field.setAttribute("aria-label",n.ariaLabel)}},adjustPosition:function(){var e,t,n,i,o,s,r,h,u,c,f,m;if(!this._o.container){if(this.el.style.position="absolute",t=e=this._o.trigger,n=this.el.offsetWidth,i=this.el.offsetHeight,o=window.innerWidth||a.documentElement.clientWidth,s=window.innerHeight||a.documentElement.clientHeight,r=window.pageYOffset||a.body.scrollTop||a.documentElement.scrollTop,f=!0,m=!0,"function"==typeof e.getBoundingClientRect)h=(c=e.getBoundingClientRect()).left+window.pageXOffset,u=c.bottom+window.pageYOffset;else for(h=t.offsetLeft,u=t.offsetTop+t.offsetHeight;t=t.offsetParent;)h+=t.offsetLeft,u+=t.offsetTop;(this._o.reposition&&h+n>o||this._o.position.indexOf("right")>-1&&h-n+e.offsetWidth>0)&&(h=h-n+e.offsetWidth,f=!1),(this._o.reposition&&u+i>s+r||this._o.position.indexOf("top")>-1&&u-i-e.offsetHeight>0)&&(u=u-i-e.offsetHeight,m=!1),this.el.style.left=h+"px",this.el.style.top=u+"px",l(this.el,f?"left-aligned":"right-aligned"),l(this.el,m?"bottom-aligned":"top-aligned"),d(this.el,f?"right-aligned":"left-aligned"),d(this.el,m?"top-aligned":"bottom-aligned")}},render:function(e,t,n){var a=this._o,i=new Date,o=m(e,t),s=new Date(e,t,1).getDay(),r=[],l=[];g(i),a.firstDay>0&&(s-=a.firstDay)<0&&(s+=7);for(var d=0===t?11:t-1,h=11===t?0:t+1,f=0===t?e-1:e,y=11===t?e+1:e,v=m(f,d),b=o+s,D=b;D>7;)D-=7;b+=7-D;for(var k,x,S,E,R=!1,N=0,C=0;N=o+s,Y=N-s+1,L=t,P=e,W=a.startRange&&p(a.startRange,O),F=a.endRange&&p(a.endRange,O),B=a.startRange&&a.endRange&&a.startRangea.maxDate||a.disableWeekends&&c(O)||a.disableDayFn&&a.disableDayFn(O),isEmpty:j,isStartRange:W,isEndRange:F,isInRange:B,showDaysInNextAndPreviousMonths:a.showDaysInNextAndPreviousMonths,enableSelectionDaysInNextAndPreviousMonths:a.enableSelectionDaysInNextAndPreviousMonths};a.pickWholeWeek&&A&&(R=!0),l.push(w(H)),7==++C&&(a.showWeekNumber&&l.unshift((k=N-s,x=t,S=e,E=void 0,void 0,E=new Date(S,0,1),''+Math.ceil(((new Date(S,x,k)-E)/864e5+E.getDay()+1)/7)+"")),r.push(M(l,a.isRTL,a.pickWholeWeek,R)),l=[],C=0,R=!1)}return function(e,t,n){return''+function(e){var t,n=[];e.showWeekNumber&&n.push("");for(t=0;t<7;t++)n.push('");return""+(e.isRTL?n.reverse():n).join("")+""}(e)+(a=t,""+a.join("")+"
'+_(e,t,!0)+"
");var a}(a,r,n)},isVisible:function(){return this._v},show:function(){this.isVisible()||(this._v=!0,this.draw(),d(this.el,"is-hidden"),this._o.bound&&(o(a,"click",this._onClick),this.adjustPosition()),"function"==typeof this._o.onOpen&&this._o.onOpen.call(this))},hide:function(){var e=this._v;!1!==e&&(this._o.bound&&s(a,"click",this._onClick),this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto",l(this.el,"is-hidden"),this._v=!1,void 0!==e&&"function"==typeof this._o.onClose&&this._o.onClose.call(this))},destroy:function(){var e=this._o;this.hide(),s(this.el,"mousedown",this._onMouseDown,!0),s(this.el,"touchend",this._onMouseDown,!0),s(this.el,"change",this._onChange),e.keyboardInput&&s(a,"keydown",this._onKeyChange),e.field&&(s(e.field,"change",this._onInputChange),e.bound&&(s(e.trigger,"click",this._onInputClick),s(e.trigger,"focus",this._onInputFocus),s(e.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}},x}(i)}()},function(e,t,n){"use strict";n.r(t);var a=n(0),i=n.n(a);!function(){function e(e,t){const n=document.createElement("input");return n.type="hidden",n.name=e,n.value=t,n}function t(t){var n=t.getAttribute("data-confirm");if(n&&!window.confirm(n))return;const a=e("_method",t.getAttribute("data-method")),i=e("_csrf_token",t.getAttribute("data-csrf")),o=document.createElement("form");o.method="get"===t.getAttribute("data-method")?"get":"post",o.action=t.getAttribute("data-to"),o.style.display="hidden",o.appendChild(i),o.appendChild(a),document.body.appendChild(o),o.submit()}window.addEventListener("click",(function(e){for(var n=e.target;n&&n.getAttribute;){if(n.getAttribute("data-method"))return t(n),e.preventDefault(),!1;n=n.parentNode}}),!1)}(),window.onload=()=>{const e=Array.prototype.slice;e.call(document.querySelectorAll(".torch-nav a"),0).forEach(e=>{const t=window.location.href,n=e.getAttribute("href");RegExp(n).test(t)&&e.classList.add("active")}),e.call(document.querySelectorAll("button.torch-flash-close"),0).forEach(e=>{e.addEventListener("click",(function(){const t=e.closest(".torch-flash");t.parentNode.removeChild(t)}))});const t=document.querySelector("form#torch-filters-form");if(!t)return;t.addEventListener("submit",(function(t){t.preventDefault();let n=!0;e.call(this.querySelectorAll(".field"),0).forEach(e=>{const t=e.getElementsByTagName("label")[0].textContent,a=e.getElementsByClassName("start")[0],i=e.getElementsByClassName("end")[0];a&&i&&(""===a.value&&""!==i.value?(window.alert(`Please select a start date for the ${t} field`),n=!1):""===i.value&&""!==a.value&&(window.alert(`Please select an end at date for the ${t} field`),n=!1))}),n&&(e.call(this.querySelectorAll("input, select"),0).forEach(e=>{""===e.value&&(e.disabled=!0)}),t.target.submit())})),e.call(document.querySelectorAll("select.filter-type"),0).forEach(e=>{e.addEventListener("change",e=>{e.target.nextElementSibling.name=e.target.value})});const n=e=>e.toLocaleString("en-us",{year:"numeric",month:"2-digit",day:"2-digit"}).replace(/(\d+)\/(\d+)\/(\d+)/,"$3-$1-$2");e.call(document.querySelectorAll(".datepicker"),0).forEach(e=>{let t=new Date;const a=e.value.split("-");3===a.length&&(t=new Date(a[0],a[1]-1,a[2])),new i.a({field:e,toString:e=>n(e),onSelect:t=>e.value=n(t),defaultDate:t,theme:"torch-datepicker"})}),e.call(document.querySelectorAll(".torch-flash-close"),0).forEach(e=>{e.addEventListener("click",(function(t){let n=e;for(;(n=n.parentElement)&&!(n.matches||n.matchesSelector).call(n,"torch-flash");)n.parentNode.removeChild(n)}))})}}]); +!function(t,a){"use strict";var i;try{i=n(!function(){var e=new Error("Cannot find module 'moment'");throw e.code="MODULE_NOT_FOUND",e}())}catch(e){}e.exports=function(e){var t="function"==typeof e,n=!!window.addEventListener,a=window.document,i=window.setTimeout,o=function(e,t,a,i){n?e.addEventListener(t,a,!!i):e.attachEvent("on"+t,a)},s=function(e,t,a,i){n?e.removeEventListener(t,a,!!i):e.detachEvent("on"+t,a)},r=function(e,t){return-1!==(" "+e.className+" ").indexOf(" "+t+" ")},l=function(e,t){r(e,t)||(e.className=""===e.className?t:e.className+" "+t)},d=function(e,t){var n;e.className=(n=(" "+e.className+" ").replace(" "+t+" "," ")).trim?n.trim():n.replace(/^\s+|\s+$/g,"")},h=function(e){return/Array/.test(Object.prototype.toString.call(e))},u=function(e){return/Date/.test(Object.prototype.toString.call(e))&&!isNaN(e.getTime())},c=function(e){var t=e.getDay();return 0===t||6===t},f=function(e){return e%4==0&&e%100!=0||e%400==0},m=function(e,t){return[31,f(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},g=function(e){u(e)&&e.setHours(0,0,0,0)},p=function(e,t){return e.getTime()===t.getTime()},y=function(e,t,n){var a,i;for(a in t)(i=void 0!==e[a])&&"object"==typeof t[a]&&null!==t[a]&&void 0===t[a].nodeName?u(t[a])?n&&(e[a]=new Date(t[a].getTime())):h(t[a])?n&&(e[a]=t[a].slice(0)):e[a]=y({},t[a],n):!n&&i||(e[a]=t[a]);return e},v=function(e,t,n){var i;a.createEvent?((i=a.createEvent("HTMLEvents")).initEvent(t,!0,!1),i=y(i,n),e.dispatchEvent(i)):a.createEventObject&&(i=a.createEventObject(),i=y(i,n),e.fireEvent("on"+t,i))},b=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},D={field:null,bound:void 0,ariaLabel:"Use the arrow keys to pick a date",position:"bottom left",reposition:!0,format:"YYYY-MM-DD",toString:null,parse:null,defaultDate:null,setDefaultDate:!1,firstDay:0,formatStrict:!1,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,pickWholeWeek:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,enableSelectionDaysInNextAndPreviousMonths:!1,numberOfMonths:1,mainCalendar:"left",container:void 0,blurFieldOnSelect:!0,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},theme:null,events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null,keyboardInput:!0},_=function(e,t,n){for(t+=e.firstDay;t>=7;)t-=7;return n?e.i18n.weekdaysShort[t]:e.i18n.weekdays[t]},w=function(e){var t=[],n="false";if(e.isEmpty){if(!e.showDaysInNextAndPreviousMonths)return'';t.push("is-outside-current-month"),e.enableSelectionDaysInNextAndPreviousMonths||t.push("is-selection-disabled")}return e.isDisabled&&t.push("is-disabled"),e.isToday&&t.push("is-today"),e.isSelected&&(t.push("is-selected"),n="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"),'"},M=function(e,t,n,a){return''+(t?e.reverse():e).join("")+""},k=function(e,t,n,a,i,o){var s,r,l,d,u,c=e._o,f=n===c.minYear,m=n===c.maxYear,g='
',p=!0,y=!0;for(l=[],s=0;s<12;s++)l.push('");for(d='
'+c.i18n.months[a]+'
",h(c.yearRange)?(s=c.yearRange[0],r=c.yearRange[1]+1):(s=n-c.yearRange,r=1+n+c.yearRange),l=[];s=c.minYear&&l.push('");return u='
'+n+c.yearSuffix+'
",c.showMonthAfterYear?g+=u+d:g+=d+u,f&&(0===a||c.minMonth>=a)&&(p=!1),m&&(11===a||c.maxMonth<=a)&&(y=!1),0===t&&(g+='"),t===e._o.numberOfMonths-1&&(g+='"),g+"
"},x=function(s){var l=this,d=l.config(s);l._onMouseDown=function(e){if(l._v){var t=(e=e||window.event).target||e.srcElement;if(t)if(r(t,"is-disabled")||(!r(t,"pika-button")||r(t,"is-empty")||r(t.parentNode,"is-disabled")?r(t,"pika-prev")?l.prevMonth():r(t,"pika-next")&&l.nextMonth():(l.setDate(new Date(t.getAttribute("data-pika-year"),t.getAttribute("data-pika-month"),t.getAttribute("data-pika-day"))),d.bound&&i((function(){l.hide(),d.blurFieldOnSelect&&d.field&&d.field.blur()}),100))),r(t,"pika-select"))l._c=!0;else{if(!e.preventDefault)return e.returnValue=!1,!1;e.preventDefault()}}},l._onChange=function(e){var t=(e=e||window.event).target||e.srcElement;t&&(r(t,"pika-select-month")?l.gotoMonth(t.value):r(t,"pika-select-year")&&l.gotoYear(t.value))},l._onKeyChange=function(e){if(e=e||window.event,l.isVisible())switch(e.keyCode){case 13:case 27:d.field&&d.field.blur();break;case 37:e.preventDefault(),l.adjustDate("subtract",1);break;case 38:l.adjustDate("subtract",7);break;case 39:l.adjustDate("add",1);break;case 40:l.adjustDate("add",7)}},l._onInputChange=function(n){var a;n.firedBy!==l&&(a=d.parse?d.parse(d.field.value,d.format):t?(a=e(d.field.value,d.format,d.formatStrict))&&a.isValid()?a.toDate():null:new Date(Date.parse(d.field.value)),u(a)&&l.setDate(a),l._v||l.show())},l._onInputFocus=function(){l.show()},l._onInputClick=function(){l.show()},l._onInputBlur=function(){var e=a.activeElement;do{if(r(e,"pika-single"))return}while(e=e.parentNode);l._c||(l._b=i((function(){l.hide()}),50)),l._c=!1},l._onClick=function(e){var t=(e=e||window.event).target||e.srcElement,a=t;if(t){!n&&r(t,"pika-select")&&(t.onchange||(t.setAttribute("onchange","return;"),o(t,"change",l._onChange)));do{if(r(a,"pika-single")||a===d.trigger)return}while(a=a.parentNode);l._v&&t!==d.trigger&&a!==d.trigger&&l.hide()}},l.el=a.createElement("div"),l.el.className="pika-single"+(d.isRTL?" is-rtl":"")+(d.theme?" "+d.theme:""),o(l.el,"mousedown",l._onMouseDown,!0),o(l.el,"touchend",l._onMouseDown,!0),o(l.el,"change",l._onChange),d.keyboardInput&&o(a,"keydown",l._onKeyChange),d.field&&(d.container?d.container.appendChild(l.el):d.bound?a.body.appendChild(l.el):d.field.parentNode.insertBefore(l.el,d.field.nextSibling),o(d.field,"change",l._onInputChange),d.defaultDate||(t&&d.field.value?d.defaultDate=e(d.field.value,d.format).toDate():d.defaultDate=new Date(Date.parse(d.field.value)),d.setDefaultDate=!0));var h=d.defaultDate;u(h)?d.setDefaultDate?l.setDate(h,!0):l.gotoDate(h):l.gotoDate(new Date),d.bound?(this.hide(),l.el.className+=" is-bound",o(d.trigger,"click",l._onInputClick),o(d.trigger,"focus",l._onInputFocus),o(d.trigger,"blur",l._onInputBlur)):this.show()};return x.prototype={config:function(e){this._o||(this._o=y({},D,!0));var t=y(this._o,e,!0);t.isRTL=!!t.isRTL,t.field=t.field&&t.field.nodeName?t.field:null,t.theme="string"==typeof t.theme&&t.theme?t.theme:null,t.bound=!!(void 0!==t.bound?t.field&&t.bound:t.field),t.trigger=t.trigger&&t.trigger.nodeName?t.trigger:t.field,t.disableWeekends=!!t.disableWeekends,t.disableDayFn="function"==typeof t.disableDayFn?t.disableDayFn:null;var n=parseInt(t.numberOfMonths,10)||1;if(t.numberOfMonths=n>4?4:n,u(t.minDate)||(t.minDate=!1),u(t.maxDate)||(t.maxDate=!1),t.minDate&&t.maxDate&&t.maxDate100&&(t.yearRange=100);return t},toString:function(n){return n=n||this._o.format,u(this._d)?this._o.toString?this._o.toString(this._d,n):t?e(this._d).format(n):this._d.toDateString():""},getMoment:function(){return t?e(this._d):null},setMoment:function(n,a){t&&e.isMoment(n)&&this.setDate(n.toDate(),a)},getDate:function(){return u(this._d)?new Date(this._d.getTime()):null},setDate:function(e,t){if(!e)return this._d=null,this._o.field&&(this._o.field.value="",v(this._o.field,"change",{firedBy:this})),this.draw();if("string"==typeof e&&(e=new Date(Date.parse(e))),u(e)){var n=this._o.minDate,a=this._o.maxDate;u(n)&&ea&&(e=a),this._d=new Date(e.getTime()),g(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),v(this._o.field,"change",{firedBy:this})),t||"function"!=typeof this._o.onSelect||this._o.onSelect.call(this,this.getDate())}},gotoDate:function(e){var t=!0;if(u(e)){if(this.calendars){var n=new Date(this.calendars[0].year,this.calendars[0].month,1),a=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),i=e.getTime();a.setMonth(a.getMonth()+1),a.setDate(a.getDate()-1),t=i=o&&(this._y=o,!isNaN(r)&&this._m>r&&(this._m=r)),t="pika-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2);for(var d=0;d'+k(this,d,this.calendars[d].year,this.calendars[d].month,this.calendars[0].year,t)+this.render(this.calendars[d].year,this.calendars[d].month,t)+"";this.el.innerHTML=l,n.bound&&"hidden"!==n.field.type&&i((function(){n.trigger.focus()}),1),"function"==typeof this._o.onDraw&&this._o.onDraw(this),n.bound&&n.field.setAttribute("aria-label",n.ariaLabel)}},adjustPosition:function(){var e,t,n,i,o,s,r,h,u,c,f,m;if(!this._o.container){if(this.el.style.position="absolute",t=e=this._o.trigger,n=this.el.offsetWidth,i=this.el.offsetHeight,o=window.innerWidth||a.documentElement.clientWidth,s=window.innerHeight||a.documentElement.clientHeight,r=window.pageYOffset||a.body.scrollTop||a.documentElement.scrollTop,f=!0,m=!0,"function"==typeof e.getBoundingClientRect)h=(c=e.getBoundingClientRect()).left+window.pageXOffset,u=c.bottom+window.pageYOffset;else for(h=t.offsetLeft,u=t.offsetTop+t.offsetHeight;t=t.offsetParent;)h+=t.offsetLeft,u+=t.offsetTop;(this._o.reposition&&h+n>o||this._o.position.indexOf("right")>-1&&h-n+e.offsetWidth>0)&&(h=h-n+e.offsetWidth,f=!1),(this._o.reposition&&u+i>s+r||this._o.position.indexOf("top")>-1&&u-i-e.offsetHeight>0)&&(u=u-i-e.offsetHeight,m=!1),this.el.style.left=h+"px",this.el.style.top=u+"px",l(this.el,f?"left-aligned":"right-aligned"),l(this.el,m?"bottom-aligned":"top-aligned"),d(this.el,f?"right-aligned":"left-aligned"),d(this.el,m?"top-aligned":"bottom-aligned")}},render:function(e,t,n){var a=this._o,i=new Date,o=m(e,t),s=new Date(e,t,1).getDay(),r=[],l=[];g(i),a.firstDay>0&&(s-=a.firstDay)<0&&(s+=7);for(var d=0===t?11:t-1,h=11===t?0:t+1,f=0===t?e-1:e,y=11===t?e+1:e,v=m(f,d),b=o+s,D=b;D>7;)D-=7;b+=7-D;for(var k,x,S,E,R=!1,N=0,C=0;N=o+s,Y=N-s+1,L=t,P=e,W=a.startRange&&p(a.startRange,O),F=a.endRange&&p(a.endRange,O),B=a.startRange&&a.endRange&&a.startRangea.maxDate||a.disableWeekends&&c(O)||a.disableDayFn&&a.disableDayFn(O),isEmpty:j,isStartRange:W,isEndRange:F,isInRange:B,showDaysInNextAndPreviousMonths:a.showDaysInNextAndPreviousMonths,enableSelectionDaysInNextAndPreviousMonths:a.enableSelectionDaysInNextAndPreviousMonths};a.pickWholeWeek&&A&&(R=!0),l.push(w(H)),7==++C&&(a.showWeekNumber&&l.unshift((k=N-s,x=t,S=e,E=void 0,void 0,E=new Date(S,0,1),''+Math.ceil(((new Date(S,x,k)-E)/864e5+E.getDay()+1)/7)+"")),r.push(M(l,a.isRTL,a.pickWholeWeek,R)),l=[],C=0,R=!1)}return function(e,t,n){return''+function(e){var t,n=[];e.showWeekNumber&&n.push("");for(t=0;t<7;t++)n.push('");return""+(e.isRTL?n.reverse():n).join("")+""}(e)+(a=t,""+a.join("")+"
'+_(e,t,!0)+"
");var a}(a,r,n)},isVisible:function(){return this._v},show:function(){this.isVisible()||(this._v=!0,this.draw(),d(this.el,"is-hidden"),this._o.bound&&(o(a,"click",this._onClick),this.adjustPosition()),"function"==typeof this._o.onOpen&&this._o.onOpen.call(this))},hide:function(){var e=this._v;!1!==e&&(this._o.bound&&s(a,"click",this._onClick),this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto",l(this.el,"is-hidden"),this._v=!1,void 0!==e&&"function"==typeof this._o.onClose&&this._o.onClose.call(this))},destroy:function(){var e=this._o;this.hide(),s(this.el,"mousedown",this._onMouseDown,!0),s(this.el,"touchend",this._onMouseDown,!0),s(this.el,"change",this._onChange),e.keyboardInput&&s(a,"keydown",this._onKeyChange),e.field&&(s(e.field,"change",this._onInputChange),e.bound&&(s(e.trigger,"click",this._onInputClick),s(e.trigger,"focus",this._onInputFocus),s(e.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}},x}(i)}()},function(e,t,n){"use strict";n.r(t);var a=n(0),i=n.n(a);!function(){function e(e,t){const n=document.createElement("input");return n.type="hidden",n.name=e,n.value=t,n}function t(t){var n=t.getAttribute("data-confirm");if(n&&!window.confirm(n))return;const a=e("_method",t.getAttribute("data-method")),i=e("_csrf_token",t.getAttribute("data-csrf")),o=document.createElement("form");o.method="get"===t.getAttribute("data-method")?"get":"post",o.action=t.getAttribute("data-to"),o.style.display="hidden",o.appendChild(i),o.appendChild(a),document.body.appendChild(o),o.submit()}window.addEventListener("click",(function(e){for(var n=e.target;n&&n.getAttribute;){if(n.getAttribute("data-method"))return t(n),e.preventDefault(),!1;n=n.parentNode}}),!1)}(),window.onload=()=>{const e=Array.prototype.slice;e.call(document.querySelectorAll(".torch-nav a"),0).forEach(e=>{const t=window.location.href,n=e.getAttribute("href");RegExp(n).test(t)&&e.classList.add("active")}),e.call(document.querySelectorAll("button.torch-flash-close"),0).forEach(e=>{e.addEventListener("click",(function(){const t=e.closest(".torch-flash");t.parentNode.removeChild(t)}))});const t=document.querySelector("form#torch-filters-form");if(!t)return;t.addEventListener("submit",(function(t){t.preventDefault();let n=!0;e.call(this.querySelectorAll(".field"),0).forEach(e=>{const t=e.getElementsByTagName("label")[0].textContent,a=e.getElementsByClassName("start")[0],i=e.getElementsByClassName("end")[0];a&&i&&(""===a.value&&""!==i.value?(window.alert(`Please select a start date for the ${t} field`),n=!1):""===i.value&&""!==a.value&&(window.alert(`Please select an end at date for the ${t} field`),n=!1))}),n&&(e.call(this.querySelectorAll("input, select"),0).forEach(e=>{""===e.value&&(e.disabled=!0)}),t.target.submit())})),e.call(document.querySelectorAll("select.filter-type"),0).forEach(e=>{e.addEventListener("change",e=>{e.target.nextElementSibling.name=e.target.value})});const n=e=>e.toLocaleString("en-us",{year:"numeric",month:"2-digit",day:"2-digit"}).replace(/(\d+)\/(\d+)\/(\d+)/,"$3-$1-$2"),a=e=>{const t=e.split("-");if(3===t.length)return new Date(t[0],t[1]-1,t[2])};e.call(document.querySelectorAll(".datepicker"),0).forEach(e=>{const t=a(e.value)||new Date;new i.a({field:e,toString:e=>n(e),onSelect:t=>e.value=n(t),defaultDate:t,parse:a,theme:"torch-datepicker"})}),e.call(document.querySelectorAll(".torch-flash-close"),0).forEach(e=>{e.addEventListener("click",(function(t){let n=e;for(;(n=n.parentElement)&&!(n.matches||n.matchesSelector).call(n,"torch-flash");)n.parentNode.removeChild(n)}))})}}]); //# sourceMappingURL=torch.js.map \ No newline at end of file diff --git a/priv/static/torch.js.map b/priv/static/torch.js.map index 6395fc93..3fbc0652 100644 --- a/priv/static/torch.js.map +++ b/priv/static/torch.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/pikaday/pikaday.js","webpack:///./js/torch.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","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","root","factory","moment","e","hasMoment","hasEventListeners","window","addEventListener","document","sto","setTimeout","addEvent","el","callback","capture","attachEvent","removeEvent","removeEventListener","detachEvent","hasClass","cn","className","indexOf","addClass","removeClass","str","replace","trim","isArray","obj","test","toString","isDate","isNaN","getTime","isWeekend","date","day","getDay","isLeapYear","year","getDaysInMonth","month","setToStartOfDay","setHours","compareDates","a","b","extend","to","from","overwrite","prop","hasProp","undefined","nodeName","Date","slice","fireEvent","eventName","data","ev","createEvent","initEvent","dispatchEvent","createEventObject","adjustCalendar","calendar","Math","ceil","abs","floor","defaults","field","bound","ariaLabel","position","reposition","format","parse","defaultDate","setDefaultDate","firstDay","formatStrict","minDate","maxDate","yearRange","showWeekNumber","pickWholeWeek","minYear","maxYear","minMonth","maxMonth","startRange","endRange","isRTL","yearSuffix","showMonthAfterYear","showDaysInNextAndPreviousMonths","enableSelectionDaysInNextAndPreviousMonths","numberOfMonths","mainCalendar","container","blurFieldOnSelect","i18n","previousMonth","nextMonth","months","weekdays","weekdaysShort","theme","events","onSelect","onOpen","onClose","onDraw","keyboardInput","renderDayName","opts","abbr","renderDay","arr","ariaSelected","isEmpty","push","isDisabled","isToday","isSelected","hasEvent","isInRange","isStartRange","isEndRange","join","renderRow","days","isRowSelected","reverse","renderTitle","instance","refYear","randId","j","monthHtml","yearHtml","_o","isMinYear","isMaxYear","html","prev","next","Pikaday","options","self","this","config","_onMouseDown","_v","target","event","srcElement","parentNode","prevMonth","setDate","getAttribute","hide","blur","_c","preventDefault","returnValue","_onChange","gotoMonth","gotoYear","_onKeyChange","isVisible","keyCode","adjustDate","_onInputChange","firedBy","isValid","toDate","show","_onInputFocus","_onInputClick","_onInputBlur","pEl","activeElement","_b","_onClick","onchange","setAttribute","trigger","createElement","appendChild","body","insertBefore","nextSibling","defDate","gotoDate","disableWeekends","disableDayFn","nom","parseInt","setMinDate","setMaxDate","fallback","getFullYear","_d","toDateString","getMoment","setMoment","preventOnSelect","isMoment","getDate","draw","min","max","newCalendar","calendars","firstVisibleDate","lastVisibleDate","length","visibleDate","setMonth","getMonth","adjustCalendars","sign","newDay","difference","valueOf","gotoToday","setStartRange","setEndRange","force","_y","_m","random","substr","render","innerHTML","type","focus","adjustPosition","width","height","viewportWidth","viewportHeight","scrollTop","left","top","clientRect","leftAligned","bottomAligned","style","offsetWidth","offsetHeight","innerWidth","documentElement","clientWidth","innerHeight","clientHeight","pageYOffset","getBoundingClientRect","pageXOffset","bottom","offsetLeft","offsetTop","offsetParent","now","before","row","yearOfPreviousMonth","yearOfNextMonth","daysInPreviousMonth","cells","after","y","onejan","isWeekSelected","dayNumber","monthNumber","yearNumber","dayConfig","unshift","weekNum","renderHead","rows","renderTable","v","destroy","removeChild","buildHiddenInput","input","handleLinkClick","link","message","confirm","method","csrf","form","action","display","submit","element","onload","Array","querySelectorAll","forEach","url","location","href","linkTarget","RegExp","classList","add","button","flashMessage","closest","formFilters","querySelector","canSubmit","text","getElementsByTagName","textContent","start","getElementsByClassName","end","alert","disabled","nextElementSibling","formatDate","toLocaleString","fieldValue","split","parentElement","matches","matchesSelector"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,EAAoBkB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EAAOrB,EAAoBU,EAAEe,EAAIE,EAAK,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ACRwF,EAAM8P,UAAW,KAIrBpU,EAAE0J,OAAOgJ,aAIbpP,EAAMtF,KAAKqC,SAASyS,iBAAiB,sBAAuB,GAAGC,QAASzO,IACtEA,EAAMlE,iBAAiB,SAAWJ,IAChCA,EAAE0J,OAAO2K,mBAAmBjW,KAAO4B,EAAE0J,OAAO5K,UAIhD,MAAMwV,EAAarS,GACjBA,EACGsS,eAAe,QAAS,CAAElS,KAAM,UAAWE,MAAO,UAAWL,IAAK,YAClEX,QAAQ,sBAAuB,YAGpC+B,EAAMtF,KAAKqC,SAASyS,iBAAiB,eAAgB,GAAGC,QAASzO,IAC/D,IAAIO,EAAc,IAAIxB,KACtB,MAAMmR,EAAalQ,EAAMxF,MAAM2V,MAAM,KACX,IAAtBD,EAAW/G,SACb5I,EAAc,IAAIxB,KAAKmR,EAAW,GAAIA,EAAW,GAAK,EAAGA,EAAW,KAGtE,IAAIrL,IAAQ,CACV7E,MAAOA,EACP1C,SAAUK,GAAQqS,EAAWrS,GAC7B4E,SAAU5E,GAASqC,EAAMxF,MAAQwV,EAAWrS,GAC5C4C,YAAaA,EACb8B,MAAO,uBAKXrD,EAAMtF,KAAKqC,SAASyS,iBAAiB,sBAAuB,GAAGC,QAASzO,IACtEA,EAAMlE,iBAAiB,SAAS,SAAUJ,GACxC,IAAIS,EAAK6D,EAET,MAAQ7D,EAAKA,EAAGiU,kBAAqBjU,EAAGkU,SAAWlU,EAAGmU,iBAAiB5W,KAAKyC,EAD3D,gBAC6EA,EAAGoJ,WAAWiI,YAAYrR","file":"torch.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 1);\n","/*!\n * Pikaday\n *\n * Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/Pikaday/Pikaday\n */\n\n(function (root, factory)\n{\n 'use strict';\n\n var moment;\n if (typeof exports === 'object') {\n // CommonJS module\n // Load moment.js as an optional dependency\n try { moment = require('moment'); } catch (e) {}\n module.exports = factory(moment);\n } else if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(function (req)\n {\n // Load moment.js as an optional dependency\n var id = 'moment';\n try { moment = req(id); } catch (e) {}\n return factory(moment);\n });\n } else {\n root.Pikaday = factory(root.moment);\n }\n}(this, function (moment)\n{\n 'use strict';\n\n /**\n * feature detection and helper functions\n */\n var hasMoment = typeof moment === 'function',\n\n hasEventListeners = !!window.addEventListener,\n\n document = window.document,\n\n sto = window.setTimeout,\n\n addEvent = function(el, e, callback, capture)\n {\n if (hasEventListeners) {\n el.addEventListener(e, callback, !!capture);\n } else {\n el.attachEvent('on' + e, callback);\n }\n },\n\n removeEvent = function(el, e, callback, capture)\n {\n if (hasEventListeners) {\n el.removeEventListener(e, callback, !!capture);\n } else {\n el.detachEvent('on' + e, callback);\n }\n },\n\n trim = function(str)\n {\n return str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g,'');\n },\n\n hasClass = function(el, cn)\n {\n return (' ' + el.className + ' ').indexOf(' ' + cn + ' ') !== -1;\n },\n\n addClass = function(el, cn)\n {\n if (!hasClass(el, cn)) {\n el.className = (el.className === '') ? cn : el.className + ' ' + cn;\n }\n },\n\n removeClass = function(el, cn)\n {\n el.className = trim((' ' + el.className + ' ').replace(' ' + cn + ' ', ' '));\n },\n\n isArray = function(obj)\n {\n return (/Array/).test(Object.prototype.toString.call(obj));\n },\n\n isDate = function(obj)\n {\n return (/Date/).test(Object.prototype.toString.call(obj)) && !isNaN(obj.getTime());\n },\n\n isWeekend = function(date)\n {\n var day = date.getDay();\n return day === 0 || day === 6;\n },\n\n isLeapYear = function(year)\n {\n // solution by Matti Virkkunen: http://stackoverflow.com/a/4881951\n return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;\n },\n\n getDaysInMonth = function(year, month)\n {\n return [31, isLeapYear(year) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month];\n },\n\n setToStartOfDay = function(date)\n {\n if (isDate(date)) date.setHours(0,0,0,0);\n },\n\n compareDates = function(a,b)\n {\n // weak date comparison (use setToStartOfDay(date) to ensure correct result)\n return a.getTime() === b.getTime();\n },\n\n extend = function(to, from, overwrite)\n {\n var prop, hasProp;\n for (prop in from) {\n hasProp = to[prop] !== undefined;\n if (hasProp && typeof from[prop] === 'object' && from[prop] !== null && from[prop].nodeName === undefined) {\n if (isDate(from[prop])) {\n if (overwrite) {\n to[prop] = new Date(from[prop].getTime());\n }\n }\n else if (isArray(from[prop])) {\n if (overwrite) {\n to[prop] = from[prop].slice(0);\n }\n } else {\n to[prop] = extend({}, from[prop], overwrite);\n }\n } else if (overwrite || !hasProp) {\n to[prop] = from[prop];\n }\n }\n return to;\n },\n\n fireEvent = function(el, eventName, data)\n {\n var ev;\n\n if (document.createEvent) {\n ev = document.createEvent('HTMLEvents');\n ev.initEvent(eventName, true, false);\n ev = extend(ev, data);\n el.dispatchEvent(ev);\n } else if (document.createEventObject) {\n ev = document.createEventObject();\n ev = extend(ev, data);\n el.fireEvent('on' + eventName, ev);\n }\n },\n\n adjustCalendar = function(calendar) {\n if (calendar.month < 0) {\n calendar.year -= Math.ceil(Math.abs(calendar.month)/12);\n calendar.month += 12;\n }\n if (calendar.month > 11) {\n calendar.year += Math.floor(Math.abs(calendar.month)/12);\n calendar.month -= 12;\n }\n return calendar;\n },\n\n /**\n * defaults and localisation\n */\n defaults = {\n\n // bind the picker to a form field\n field: null,\n\n // automatically show/hide the picker on `field` focus (default `true` if `field` is set)\n bound: undefined,\n\n // data-attribute on the input field with an aria assistance tekst (only applied when `bound` is set)\n ariaLabel: 'Use the arrow keys to pick a date',\n\n // position of the datepicker, relative to the field (default to bottom & left)\n // ('bottom' & 'left' keywords are not used, 'top' & 'right' are modifier on the bottom/left position)\n position: 'bottom left',\n\n // automatically fit in the viewport even if it means repositioning from the position option\n reposition: true,\n\n // the default output format for `.toString()` and `field` value\n format: 'YYYY-MM-DD',\n\n // the toString function which gets passed a current date object and format\n // and returns a string\n toString: null,\n\n // used to create date object from current input string\n parse: null,\n\n // the initial date to view when first opened\n defaultDate: null,\n\n // make the `defaultDate` the initial selected value\n setDefaultDate: false,\n\n // first day of week (0: Sunday, 1: Monday etc)\n firstDay: 0,\n\n // the default flag for moment's strict date parsing\n formatStrict: false,\n\n // the minimum/earliest date that can be selected\n minDate: null,\n // the maximum/latest date that can be selected\n maxDate: null,\n\n // number of years either side, or array of upper/lower range\n yearRange: 10,\n\n // show week numbers at head of row\n showWeekNumber: false,\n\n // Week picker mode\n pickWholeWeek: false,\n\n // used internally (don't config outside)\n minYear: 0,\n maxYear: 9999,\n minMonth: undefined,\n maxMonth: undefined,\n\n startRange: null,\n endRange: null,\n\n isRTL: false,\n\n // Additional text to append to the year in the calendar title\n yearSuffix: '',\n\n // Render the month after year in the calendar title\n showMonthAfterYear: false,\n\n // Render days of the calendar grid that fall in the next or previous month\n showDaysInNextAndPreviousMonths: false,\n\n // Allows user to select days that fall in the next or previous month\n enableSelectionDaysInNextAndPreviousMonths: false,\n\n // how many months are visible\n numberOfMonths: 1,\n\n // when numberOfMonths is used, this will help you to choose where the main calendar will be (default `left`, can be set to `right`)\n // only used for the first display or when a selected date is not visible\n mainCalendar: 'left',\n\n // Specify a DOM element to render the calendar in\n container: undefined,\n\n // Blur field when date is selected\n blurFieldOnSelect : true,\n\n // internationalization\n i18n: {\n previousMonth : 'Previous Month',\n nextMonth : 'Next Month',\n months : ['January','February','March','April','May','June','July','August','September','October','November','December'],\n weekdays : ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],\n weekdaysShort : ['Sun','Mon','Tue','Wed','Thu','Fri','Sat']\n },\n\n // Theme Classname\n theme: null,\n\n // events array\n events: [],\n\n // callback function\n onSelect: null,\n onOpen: null,\n onClose: null,\n onDraw: null,\n\n // Enable keyboard input\n keyboardInput: true\n },\n\n\n /**\n * templating functions to abstract HTML rendering\n */\n renderDayName = function(opts, day, abbr)\n {\n day += opts.firstDay;\n while (day >= 7) {\n day -= 7;\n }\n return abbr ? opts.i18n.weekdaysShort[day] : opts.i18n.weekdays[day];\n },\n\n renderDay = function(opts)\n {\n var arr = [];\n var ariaSelected = 'false';\n if (opts.isEmpty) {\n if (opts.showDaysInNextAndPreviousMonths) {\n arr.push('is-outside-current-month');\n\n if(!opts.enableSelectionDaysInNextAndPreviousMonths) {\n arr.push('is-selection-disabled');\n }\n\n } else {\n return '';\n }\n }\n if (opts.isDisabled) {\n arr.push('is-disabled');\n }\n if (opts.isToday) {\n arr.push('is-today');\n }\n if (opts.isSelected) {\n arr.push('is-selected');\n ariaSelected = 'true';\n }\n if (opts.hasEvent) {\n arr.push('has-event');\n }\n if (opts.isInRange) {\n arr.push('is-inrange');\n }\n if (opts.isStartRange) {\n arr.push('is-startrange');\n }\n if (opts.isEndRange) {\n arr.push('is-endrange');\n }\n return '' +\n '' +\n '';\n },\n\n renderWeek = function (d, m, y) {\n // Lifted from http://javascript.about.com/library/blweekyear.htm, lightly modified.\n var onejan = new Date(y, 0, 1),\n weekNum = Math.ceil((((new Date(y, m, d) - onejan) / 86400000) + onejan.getDay()+1)/7);\n return '' + weekNum + '';\n },\n\n renderRow = function(days, isRTL, pickWholeWeek, isRowSelected)\n {\n return '' + (isRTL ? days.reverse() : days).join('') + '';\n },\n\n renderBody = function(rows)\n {\n return '' + rows.join('') + '';\n },\n\n renderHead = function(opts)\n {\n var i, arr = [];\n if (opts.showWeekNumber) {\n arr.push('');\n }\n for (i = 0; i < 7; i++) {\n arr.push('' + renderDayName(opts, i, true) + '');\n }\n return '' + (opts.isRTL ? arr.reverse() : arr).join('') + '';\n },\n\n renderTitle = function(instance, c, year, month, refYear, randId)\n {\n var i, j, arr,\n opts = instance._o,\n isMinYear = year === opts.minYear,\n isMaxYear = year === opts.maxYear,\n html = '
',\n monthHtml,\n yearHtml,\n prev = true,\n next = true;\n\n for (arr = [], i = 0; i < 12; i++) {\n arr.push('');\n }\n\n monthHtml = '
' + opts.i18n.months[month] + '
';\n\n if (isArray(opts.yearRange)) {\n i = opts.yearRange[0];\n j = opts.yearRange[1] + 1;\n } else {\n i = year - opts.yearRange;\n j = 1 + year + opts.yearRange;\n }\n\n for (arr = []; i < j && i <= opts.maxYear; i++) {\n if (i >= opts.minYear) {\n arr.push('');\n }\n }\n yearHtml = '
' + year + opts.yearSuffix + '
';\n\n if (opts.showMonthAfterYear) {\n html += yearHtml + monthHtml;\n } else {\n html += monthHtml + yearHtml;\n }\n\n if (isMinYear && (month === 0 || opts.minMonth >= month)) {\n prev = false;\n }\n\n if (isMaxYear && (month === 11 || opts.maxMonth <= month)) {\n next = false;\n }\n\n if (c === 0) {\n html += '';\n }\n if (c === (instance._o.numberOfMonths - 1) ) {\n html += '';\n }\n\n return html += '
';\n },\n\n renderTable = function(opts, data, randId)\n {\n return '' + renderHead(opts) + renderBody(data) + '
';\n },\n\n\n /**\n * Pikaday constructor\n */\n Pikaday = function(options)\n {\n var self = this,\n opts = self.config(options);\n\n self._onMouseDown = function(e)\n {\n if (!self._v) {\n return;\n }\n e = e || window.event;\n var target = e.target || e.srcElement;\n if (!target) {\n return;\n }\n\n if (!hasClass(target, 'is-disabled')) {\n if (hasClass(target, 'pika-button') && !hasClass(target, 'is-empty') && !hasClass(target.parentNode, 'is-disabled')) {\n self.setDate(new Date(target.getAttribute('data-pika-year'), target.getAttribute('data-pika-month'), target.getAttribute('data-pika-day')));\n if (opts.bound) {\n sto(function() {\n self.hide();\n if (opts.blurFieldOnSelect && opts.field) {\n opts.field.blur();\n }\n }, 100);\n }\n }\n else if (hasClass(target, 'pika-prev')) {\n self.prevMonth();\n }\n else if (hasClass(target, 'pika-next')) {\n self.nextMonth();\n }\n }\n if (!hasClass(target, 'pika-select')) {\n // if this is touch event prevent mouse events emulation\n if (e.preventDefault) {\n e.preventDefault();\n } else {\n e.returnValue = false;\n return false;\n }\n } else {\n self._c = true;\n }\n };\n\n self._onChange = function(e)\n {\n e = e || window.event;\n var target = e.target || e.srcElement;\n if (!target) {\n return;\n }\n if (hasClass(target, 'pika-select-month')) {\n self.gotoMonth(target.value);\n }\n else if (hasClass(target, 'pika-select-year')) {\n self.gotoYear(target.value);\n }\n };\n\n self._onKeyChange = function(e)\n {\n e = e || window.event;\n\n if (self.isVisible()) {\n\n switch(e.keyCode){\n case 13:\n case 27:\n if (opts.field) {\n opts.field.blur();\n }\n break;\n case 37:\n e.preventDefault();\n self.adjustDate('subtract', 1);\n break;\n case 38:\n self.adjustDate('subtract', 7);\n break;\n case 39:\n self.adjustDate('add', 1);\n break;\n case 40:\n self.adjustDate('add', 7);\n break;\n }\n }\n };\n\n self._onInputChange = function(e)\n {\n var date;\n\n if (e.firedBy === self) {\n return;\n }\n if (opts.parse) {\n date = opts.parse(opts.field.value, opts.format);\n } else if (hasMoment) {\n date = moment(opts.field.value, opts.format, opts.formatStrict);\n date = (date && date.isValid()) ? date.toDate() : null;\n }\n else {\n date = new Date(Date.parse(opts.field.value));\n }\n if (isDate(date)) {\n self.setDate(date);\n }\n if (!self._v) {\n self.show();\n }\n };\n\n self._onInputFocus = function()\n {\n self.show();\n };\n\n self._onInputClick = function()\n {\n self.show();\n };\n\n self._onInputBlur = function()\n {\n // IE allows pika div to gain focus; catch blur the input field\n var pEl = document.activeElement;\n do {\n if (hasClass(pEl, 'pika-single')) {\n return;\n }\n }\n while ((pEl = pEl.parentNode));\n\n if (!self._c) {\n self._b = sto(function() {\n self.hide();\n }, 50);\n }\n self._c = false;\n };\n\n self._onClick = function(e)\n {\n e = e || window.event;\n var target = e.target || e.srcElement,\n pEl = target;\n if (!target) {\n return;\n }\n if (!hasEventListeners && hasClass(target, 'pika-select')) {\n if (!target.onchange) {\n target.setAttribute('onchange', 'return;');\n addEvent(target, 'change', self._onChange);\n }\n }\n do {\n if (hasClass(pEl, 'pika-single') || pEl === opts.trigger) {\n return;\n }\n }\n while ((pEl = pEl.parentNode));\n if (self._v && target !== opts.trigger && pEl !== opts.trigger) {\n self.hide();\n }\n };\n\n self.el = document.createElement('div');\n self.el.className = 'pika-single' + (opts.isRTL ? ' is-rtl' : '') + (opts.theme ? ' ' + opts.theme : '');\n\n addEvent(self.el, 'mousedown', self._onMouseDown, true);\n addEvent(self.el, 'touchend', self._onMouseDown, true);\n addEvent(self.el, 'change', self._onChange);\n\n if (opts.keyboardInput) {\n addEvent(document, 'keydown', self._onKeyChange);\n }\n\n if (opts.field) {\n if (opts.container) {\n opts.container.appendChild(self.el);\n } else if (opts.bound) {\n document.body.appendChild(self.el);\n } else {\n opts.field.parentNode.insertBefore(self.el, opts.field.nextSibling);\n }\n addEvent(opts.field, 'change', self._onInputChange);\n\n if (!opts.defaultDate) {\n if (hasMoment && opts.field.value) {\n opts.defaultDate = moment(opts.field.value, opts.format).toDate();\n } else {\n opts.defaultDate = new Date(Date.parse(opts.field.value));\n }\n opts.setDefaultDate = true;\n }\n }\n\n var defDate = opts.defaultDate;\n\n if (isDate(defDate)) {\n if (opts.setDefaultDate) {\n self.setDate(defDate, true);\n } else {\n self.gotoDate(defDate);\n }\n } else {\n self.gotoDate(new Date());\n }\n\n if (opts.bound) {\n this.hide();\n self.el.className += ' is-bound';\n addEvent(opts.trigger, 'click', self._onInputClick);\n addEvent(opts.trigger, 'focus', self._onInputFocus);\n addEvent(opts.trigger, 'blur', self._onInputBlur);\n } else {\n this.show();\n }\n };\n\n\n /**\n * public Pikaday API\n */\n Pikaday.prototype = {\n\n\n /**\n * configure functionality\n */\n config: function(options)\n {\n if (!this._o) {\n this._o = extend({}, defaults, true);\n }\n\n var opts = extend(this._o, options, true);\n\n opts.isRTL = !!opts.isRTL;\n\n opts.field = (opts.field && opts.field.nodeName) ? opts.field : null;\n\n opts.theme = (typeof opts.theme) === 'string' && opts.theme ? opts.theme : null;\n\n opts.bound = !!(opts.bound !== undefined ? opts.field && opts.bound : opts.field);\n\n opts.trigger = (opts.trigger && opts.trigger.nodeName) ? opts.trigger : opts.field;\n\n opts.disableWeekends = !!opts.disableWeekends;\n\n opts.disableDayFn = (typeof opts.disableDayFn) === 'function' ? opts.disableDayFn : null;\n\n var nom = parseInt(opts.numberOfMonths, 10) || 1;\n opts.numberOfMonths = nom > 4 ? 4 : nom;\n\n if (!isDate(opts.minDate)) {\n opts.minDate = false;\n }\n if (!isDate(opts.maxDate)) {\n opts.maxDate = false;\n }\n if ((opts.minDate && opts.maxDate) && opts.maxDate < opts.minDate) {\n opts.maxDate = opts.minDate = false;\n }\n if (opts.minDate) {\n this.setMinDate(opts.minDate);\n }\n if (opts.maxDate) {\n this.setMaxDate(opts.maxDate);\n }\n\n if (isArray(opts.yearRange)) {\n var fallback = new Date().getFullYear() - 10;\n opts.yearRange[0] = parseInt(opts.yearRange[0], 10) || fallback;\n opts.yearRange[1] = parseInt(opts.yearRange[1], 10) || fallback;\n } else {\n opts.yearRange = Math.abs(parseInt(opts.yearRange, 10)) || defaults.yearRange;\n if (opts.yearRange > 100) {\n opts.yearRange = 100;\n }\n }\n\n return opts;\n },\n\n /**\n * return a formatted string of the current selection (using Moment.js if available)\n */\n toString: function(format)\n {\n format = format || this._o.format;\n if (!isDate(this._d)) {\n return '';\n }\n if (this._o.toString) {\n return this._o.toString(this._d, format);\n }\n if (hasMoment) {\n return moment(this._d).format(format);\n }\n return this._d.toDateString();\n },\n\n /**\n * return a Moment.js object of the current selection (if available)\n */\n getMoment: function()\n {\n return hasMoment ? moment(this._d) : null;\n },\n\n /**\n * set the current selection from a Moment.js object (if available)\n */\n setMoment: function(date, preventOnSelect)\n {\n if (hasMoment && moment.isMoment(date)) {\n this.setDate(date.toDate(), preventOnSelect);\n }\n },\n\n /**\n * return a Date object of the current selection\n */\n getDate: function()\n {\n return isDate(this._d) ? new Date(this._d.getTime()) : null;\n },\n\n /**\n * set the current selection\n */\n setDate: function(date, preventOnSelect)\n {\n if (!date) {\n this._d = null;\n\n if (this._o.field) {\n this._o.field.value = '';\n fireEvent(this._o.field, 'change', { firedBy: this });\n }\n\n return this.draw();\n }\n if (typeof date === 'string') {\n date = new Date(Date.parse(date));\n }\n if (!isDate(date)) {\n return;\n }\n\n var min = this._o.minDate,\n max = this._o.maxDate;\n\n if (isDate(min) && date < min) {\n date = min;\n } else if (isDate(max) && date > max) {\n date = max;\n }\n\n this._d = new Date(date.getTime());\n setToStartOfDay(this._d);\n this.gotoDate(this._d);\n\n if (this._o.field) {\n this._o.field.value = this.toString();\n fireEvent(this._o.field, 'change', { firedBy: this });\n }\n if (!preventOnSelect && typeof this._o.onSelect === 'function') {\n this._o.onSelect.call(this, this.getDate());\n }\n },\n\n /**\n * change view to a specific date\n */\n gotoDate: function(date)\n {\n var newCalendar = true;\n\n if (!isDate(date)) {\n return;\n }\n\n if (this.calendars) {\n var firstVisibleDate = new Date(this.calendars[0].year, this.calendars[0].month, 1),\n lastVisibleDate = new Date(this.calendars[this.calendars.length-1].year, this.calendars[this.calendars.length-1].month, 1),\n visibleDate = date.getTime();\n // get the end of the month\n lastVisibleDate.setMonth(lastVisibleDate.getMonth()+1);\n lastVisibleDate.setDate(lastVisibleDate.getDate()-1);\n newCalendar = (visibleDate < firstVisibleDate.getTime() || lastVisibleDate.getTime() < visibleDate);\n }\n\n if (newCalendar) {\n this.calendars = [{\n month: date.getMonth(),\n year: date.getFullYear()\n }];\n if (this._o.mainCalendar === 'right') {\n this.calendars[0].month += 1 - this._o.numberOfMonths;\n }\n }\n\n this.adjustCalendars();\n },\n\n adjustDate: function(sign, days) {\n\n var day = this.getDate() || new Date();\n var difference = parseInt(days)*24*60*60*1000;\n\n var newDay;\n\n if (sign === 'add') {\n newDay = new Date(day.valueOf() + difference);\n } else if (sign === 'subtract') {\n newDay = new Date(day.valueOf() - difference);\n }\n\n this.setDate(newDay);\n },\n\n adjustCalendars: function() {\n this.calendars[0] = adjustCalendar(this.calendars[0]);\n for (var c = 1; c < this._o.numberOfMonths; c++) {\n this.calendars[c] = adjustCalendar({\n month: this.calendars[0].month + c,\n year: this.calendars[0].year\n });\n }\n this.draw();\n },\n\n gotoToday: function()\n {\n this.gotoDate(new Date());\n },\n\n /**\n * change view to a specific month (zero-index, e.g. 0: January)\n */\n gotoMonth: function(month)\n {\n if (!isNaN(month)) {\n this.calendars[0].month = parseInt(month, 10);\n this.adjustCalendars();\n }\n },\n\n nextMonth: function()\n {\n this.calendars[0].month++;\n this.adjustCalendars();\n },\n\n prevMonth: function()\n {\n this.calendars[0].month--;\n this.adjustCalendars();\n },\n\n /**\n * change view to a specific full year (e.g. \"2012\")\n */\n gotoYear: function(year)\n {\n if (!isNaN(year)) {\n this.calendars[0].year = parseInt(year, 10);\n this.adjustCalendars();\n }\n },\n\n /**\n * change the minDate\n */\n setMinDate: function(value)\n {\n if(value instanceof Date) {\n setToStartOfDay(value);\n this._o.minDate = value;\n this._o.minYear = value.getFullYear();\n this._o.minMonth = value.getMonth();\n } else {\n this._o.minDate = defaults.minDate;\n this._o.minYear = defaults.minYear;\n this._o.minMonth = defaults.minMonth;\n this._o.startRange = defaults.startRange;\n }\n\n this.draw();\n },\n\n /**\n * change the maxDate\n */\n setMaxDate: function(value)\n {\n if(value instanceof Date) {\n setToStartOfDay(value);\n this._o.maxDate = value;\n this._o.maxYear = value.getFullYear();\n this._o.maxMonth = value.getMonth();\n } else {\n this._o.maxDate = defaults.maxDate;\n this._o.maxYear = defaults.maxYear;\n this._o.maxMonth = defaults.maxMonth;\n this._o.endRange = defaults.endRange;\n }\n\n this.draw();\n },\n\n setStartRange: function(value)\n {\n this._o.startRange = value;\n },\n\n setEndRange: function(value)\n {\n this._o.endRange = value;\n },\n\n /**\n * refresh the HTML\n */\n draw: function(force)\n {\n if (!this._v && !force) {\n return;\n }\n var opts = this._o,\n minYear = opts.minYear,\n maxYear = opts.maxYear,\n minMonth = opts.minMonth,\n maxMonth = opts.maxMonth,\n html = '',\n randId;\n\n if (this._y <= minYear) {\n this._y = minYear;\n if (!isNaN(minMonth) && this._m < minMonth) {\n this._m = minMonth;\n }\n }\n if (this._y >= maxYear) {\n this._y = maxYear;\n if (!isNaN(maxMonth) && this._m > maxMonth) {\n this._m = maxMonth;\n }\n }\n\n randId = 'pika-title-' + Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 2);\n\n for (var c = 0; c < opts.numberOfMonths; c++) {\n html += '
' + 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) + '
';\n }\n\n this.el.innerHTML = html;\n\n if (opts.bound) {\n if(opts.field.type !== 'hidden') {\n sto(function() {\n opts.trigger.focus();\n }, 1);\n }\n }\n\n if (typeof this._o.onDraw === 'function') {\n this._o.onDraw(this);\n }\n\n if (opts.bound) {\n // let the screen reader user know to use arrow keys\n opts.field.setAttribute('aria-label', opts.ariaLabel);\n }\n },\n\n adjustPosition: function()\n {\n var field, pEl, width, height, viewportWidth, viewportHeight, scrollTop, left, top, clientRect, leftAligned, bottomAligned;\n\n if (this._o.container) return;\n\n this.el.style.position = 'absolute';\n\n field = this._o.trigger;\n pEl = field;\n width = this.el.offsetWidth;\n height = this.el.offsetHeight;\n viewportWidth = window.innerWidth || document.documentElement.clientWidth;\n viewportHeight = window.innerHeight || document.documentElement.clientHeight;\n scrollTop = window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop;\n leftAligned = true;\n bottomAligned = true;\n\n if (typeof field.getBoundingClientRect === 'function') {\n clientRect = field.getBoundingClientRect();\n left = clientRect.left + window.pageXOffset;\n top = clientRect.bottom + window.pageYOffset;\n } else {\n left = pEl.offsetLeft;\n top = pEl.offsetTop + pEl.offsetHeight;\n while((pEl = pEl.offsetParent)) {\n left += pEl.offsetLeft;\n top += pEl.offsetTop;\n }\n }\n\n // default position is bottom & left\n if ((this._o.reposition && left + width > viewportWidth) ||\n (\n this._o.position.indexOf('right') > -1 &&\n left - width + field.offsetWidth > 0\n )\n ) {\n left = left - width + field.offsetWidth;\n leftAligned = false;\n }\n if ((this._o.reposition && top + height > viewportHeight + scrollTop) ||\n (\n this._o.position.indexOf('top') > -1 &&\n top - height - field.offsetHeight > 0\n )\n ) {\n top = top - height - field.offsetHeight;\n bottomAligned = false;\n }\n\n this.el.style.left = left + 'px';\n this.el.style.top = top + 'px';\n\n addClass(this.el, leftAligned ? 'left-aligned' : 'right-aligned');\n addClass(this.el, bottomAligned ? 'bottom-aligned' : 'top-aligned');\n removeClass(this.el, !leftAligned ? 'left-aligned' : 'right-aligned');\n removeClass(this.el, !bottomAligned ? 'bottom-aligned' : 'top-aligned');\n },\n\n /**\n * render HTML for a particular month\n */\n render: function(year, month, randId)\n {\n var opts = this._o,\n now = new Date(),\n days = getDaysInMonth(year, month),\n before = new Date(year, month, 1).getDay(),\n data = [],\n row = [];\n setToStartOfDay(now);\n if (opts.firstDay > 0) {\n before -= opts.firstDay;\n if (before < 0) {\n before += 7;\n }\n }\n var previousMonth = month === 0 ? 11 : month - 1,\n nextMonth = month === 11 ? 0 : month + 1,\n yearOfPreviousMonth = month === 0 ? year - 1 : year,\n yearOfNextMonth = month === 11 ? year + 1 : year,\n daysInPreviousMonth = getDaysInMonth(yearOfPreviousMonth, previousMonth);\n var cells = days + before,\n after = cells;\n while(after > 7) {\n after -= 7;\n }\n cells += 7 - after;\n var isWeekSelected = false;\n for (var i = 0, r = 0; i < cells; i++)\n {\n var day = new Date(year, month, 1 + (i - before)),\n isSelected = isDate(this._d) ? compareDates(day, this._d) : false,\n isToday = compareDates(day, now),\n hasEvent = opts.events.indexOf(day.toDateString()) !== -1 ? true : false,\n isEmpty = i < before || i >= (days + before),\n dayNumber = 1 + (i - before),\n monthNumber = month,\n yearNumber = year,\n isStartRange = opts.startRange && compareDates(opts.startRange, day),\n isEndRange = opts.endRange && compareDates(opts.endRange, day),\n isInRange = opts.startRange && opts.endRange && opts.startRange < day && day < opts.endRange,\n isDisabled = (opts.minDate && day < opts.minDate) ||\n (opts.maxDate && day > opts.maxDate) ||\n (opts.disableWeekends && isWeekend(day)) ||\n (opts.disableDayFn && opts.disableDayFn(day));\n\n if (isEmpty) {\n if (i < before) {\n dayNumber = daysInPreviousMonth + dayNumber;\n monthNumber = previousMonth;\n yearNumber = yearOfPreviousMonth;\n } else {\n dayNumber = dayNumber - days;\n monthNumber = nextMonth;\n yearNumber = yearOfNextMonth;\n }\n }\n\n var dayConfig = {\n day: dayNumber,\n month: monthNumber,\n year: yearNumber,\n hasEvent: hasEvent,\n isSelected: isSelected,\n isToday: isToday,\n isDisabled: isDisabled,\n isEmpty: isEmpty,\n isStartRange: isStartRange,\n isEndRange: isEndRange,\n isInRange: isInRange,\n showDaysInNextAndPreviousMonths: opts.showDaysInNextAndPreviousMonths,\n enableSelectionDaysInNextAndPreviousMonths: opts.enableSelectionDaysInNextAndPreviousMonths\n };\n\n if (opts.pickWholeWeek && isSelected) {\n isWeekSelected = true;\n }\n\n row.push(renderDay(dayConfig));\n\n if (++r === 7) {\n if (opts.showWeekNumber) {\n row.unshift(renderWeek(i - before, month, year));\n }\n data.push(renderRow(row, opts.isRTL, opts.pickWholeWeek, isWeekSelected));\n row = [];\n r = 0;\n isWeekSelected = false;\n }\n }\n return renderTable(opts, data, randId);\n },\n\n isVisible: function()\n {\n return this._v;\n },\n\n show: function()\n {\n if (!this.isVisible()) {\n this._v = true;\n this.draw();\n removeClass(this.el, 'is-hidden');\n if (this._o.bound) {\n addEvent(document, 'click', this._onClick);\n this.adjustPosition();\n }\n if (typeof this._o.onOpen === 'function') {\n this._o.onOpen.call(this);\n }\n }\n },\n\n hide: function()\n {\n var v = this._v;\n if (v !== false) {\n if (this._o.bound) {\n removeEvent(document, 'click', this._onClick);\n }\n this.el.style.position = 'static'; // reset\n this.el.style.left = 'auto';\n this.el.style.top = 'auto';\n addClass(this.el, 'is-hidden');\n this._v = false;\n if (v !== undefined && typeof this._o.onClose === 'function') {\n this._o.onClose.call(this);\n }\n }\n },\n\n /**\n * GAME OVER\n */\n destroy: function()\n {\n var opts = this._o;\n\n this.hide();\n removeEvent(this.el, 'mousedown', this._onMouseDown, true);\n removeEvent(this.el, 'touchend', this._onMouseDown, true);\n removeEvent(this.el, 'change', this._onChange);\n if (opts.keyboardInput) {\n removeEvent(document, 'keydown', this._onKeyChange);\n }\n if (opts.field) {\n removeEvent(opts.field, 'change', this._onInputChange);\n if (opts.bound) {\n removeEvent(opts.trigger, 'click', this._onInputClick);\n removeEvent(opts.trigger, 'focus', this._onInputFocus);\n removeEvent(opts.trigger, 'blur', this._onInputBlur);\n }\n }\n if (this.el.parentNode) {\n this.el.parentNode.removeChild(this.el);\n }\n }\n\n };\n\n return Pikaday;\n}));\n","import Pikaday from 'pikaday'\n\n// Phoenix html copied here since I ran into extensive issues trying to import\n// from the dep.\n;(function () {\n function buildHiddenInput (name, value) {\n const input = document.createElement('input')\n input.type = 'hidden'\n input.name = name\n input.value = value\n return input\n }\n\n function handleLinkClick (link) {\n var message = link.getAttribute('data-confirm')\n if (message && !window.confirm(message)) {\n return\n }\n\n const method = buildHiddenInput('_method', link.getAttribute('data-method'))\n const csrf = buildHiddenInput('_csrf_token', link.getAttribute('data-csrf'))\n const form = document.createElement('form')\n\n form.method = (link.getAttribute('data-method') === 'get') ? 'get' : 'post'\n form.action = link.getAttribute('data-to')\n form.style.display = 'hidden'\n\n form.appendChild(csrf)\n form.appendChild(method)\n document.body.appendChild(form)\n form.submit()\n }\n\n window.addEventListener('click', function (e) {\n var element = e.target\n\n while (element && element.getAttribute) {\n if (element.getAttribute('data-method')) {\n handleLinkClick(element)\n e.preventDefault()\n return false\n } else {\n element = element.parentNode\n }\n }\n }, false)\n})()\n\nwindow.onload = () => {\n const slice = Array.prototype.slice\n\n /*\n * Set active nav link\n */\n slice.call(document.querySelectorAll('.torch-nav a'), 0).forEach((field) => {\n const url = window.location.href\n const linkTarget = field.getAttribute('href')\n const regex = RegExp(linkTarget)\n\n if (regex.test(url)) {\n field.classList.add('active')\n }\n })\n\n /*\n * Flash Messages\n */\n slice.call(document.querySelectorAll('button.torch-flash-close'), 0).forEach((button) => {\n button.addEventListener('click', function () {\n const flashMessage = button.closest('.torch-flash')\n flashMessage.parentNode.removeChild(flashMessage)\n })\n })\n\n /*\n * Prevent empty fields from being submitted, since this breaks Filtrex.\n */\n const formFilters = document.querySelector('form#torch-filters-form')\n if (!formFilters) return\n\n formFilters.addEventListener('submit', function (e) {\n e.preventDefault()\n\n let canSubmit = true\n\n slice.call(this.querySelectorAll('.field'), 0).forEach((field) => {\n const text = field.getElementsByTagName('label')[0].textContent\n const start = field.getElementsByClassName('start')[0]\n const end = field.getElementsByClassName('end')[0]\n\n if (start && end) {\n if (start.value === '' && end.value !== '') {\n window.alert(`Please select a start date for the ${text} field`)\n canSubmit = false\n } else if (end.value === '' && start.value !== '') {\n window.alert(`Please select an end at date for the ${text} field`)\n canSubmit = false\n }\n }\n })\n\n if (canSubmit) {\n slice.call(this.querySelectorAll('input, select'), 0).forEach((field) => {\n if (field.value === '') {\n field.disabled = true\n }\n })\n\n e.target.submit()\n }\n })\n\n slice.call(document.querySelectorAll('select.filter-type'), 0).forEach((field) => {\n field.addEventListener('change', (e) => {\n e.target.nextElementSibling.name = e.target.value\n })\n })\n\n const formatDate = date =>\n date\n .toLocaleString('en-us', { year: 'numeric', month: '2-digit', day: '2-digit' })\n .replace(/(\\d+)\\/(\\d+)\\/(\\d+)/, '$3-$1-$2')\n\n /* eslint-disable no-new */\n slice.call(document.querySelectorAll('.datepicker'), 0).forEach((field) => {\n let defaultDate = new Date()\n const fieldValue = field.value.split('-')\n if (fieldValue.length === 3) {\n defaultDate = new Date(fieldValue[0], fieldValue[1] - 1, fieldValue[2])\n }\n\n new Pikaday({\n field: field,\n toString: date => formatDate(date),\n onSelect: date => (field.value = formatDate(date)),\n defaultDate: defaultDate,\n theme: 'torch-datepicker'\n })\n })\n /* eslint-enable no-new */\n\n slice.call(document.querySelectorAll('.torch-flash-close'), 0).forEach((field) => {\n field.addEventListener('click', function (e) {\n let el = field\n const selector = 'torch-flash'\n while ((el = el.parentElement) && !((el.matches || el.matchesSelector).call(el, selector))) { el.parentNode.removeChild(el) }\n })\n })\n}\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/pikaday/pikaday.js","webpack:///./js/torch.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","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","root","factory","moment","e","hasMoment","hasEventListeners","window","addEventListener","document","sto","setTimeout","addEvent","el","callback","capture","attachEvent","removeEvent","removeEventListener","detachEvent","hasClass","cn","className","indexOf","addClass","removeClass","str","replace","trim","isArray","obj","test","toString","isDate","isNaN","getTime","isWeekend","date","day","getDay","isLeapYear","year","getDaysInMonth","month","setToStartOfDay","setHours","compareDates","a","b","extend","to","from","overwrite","prop","hasProp","undefined","nodeName","Date","slice","fireEvent","eventName","data","ev","createEvent","initEvent","dispatchEvent","createEventObject","adjustCalendar","calendar","Math","ceil","abs","floor","defaults","field","bound","ariaLabel","position","reposition","format","parse","defaultDate","setDefaultDate","firstDay","formatStrict","minDate","maxDate","yearRange","showWeekNumber","pickWholeWeek","minYear","maxYear","minMonth","maxMonth","startRange","endRange","isRTL","yearSuffix","showMonthAfterYear","showDaysInNextAndPreviousMonths","enableSelectionDaysInNextAndPreviousMonths","numberOfMonths","mainCalendar","container","blurFieldOnSelect","i18n","previousMonth","nextMonth","months","weekdays","weekdaysShort","theme","events","onSelect","onOpen","onClose","onDraw","keyboardInput","renderDayName","opts","abbr","renderDay","arr","ariaSelected","isEmpty","push","isDisabled","isToday","isSelected","hasEvent","isInRange","isStartRange","isEndRange","join","renderRow","days","isRowSelected","reverse","renderTitle","instance","refYear","randId","j","monthHtml","yearHtml","_o","isMinYear","isMaxYear","html","prev","next","Pikaday","options","self","this","config","_onMouseDown","_v","target","event","srcElement","parentNode","prevMonth","setDate","getAttribute","hide","blur","_c","preventDefault","returnValue","_onChange","gotoMonth","gotoYear","_onKeyChange","isVisible","keyCode","adjustDate","_onInputChange","firedBy","isValid","toDate","show","_onInputFocus","_onInputClick","_onInputBlur","pEl","activeElement","_b","_onClick","onchange","setAttribute","trigger","createElement","appendChild","body","insertBefore","nextSibling","defDate","gotoDate","disableWeekends","disableDayFn","nom","parseInt","setMinDate","setMaxDate","fallback","getFullYear","_d","toDateString","getMoment","setMoment","preventOnSelect","isMoment","getDate","draw","min","max","newCalendar","calendars","firstVisibleDate","lastVisibleDate","length","visibleDate","setMonth","getMonth","adjustCalendars","sign","newDay","difference","valueOf","gotoToday","setStartRange","setEndRange","force","_y","_m","random","substr","render","innerHTML","type","focus","adjustPosition","width","height","viewportWidth","viewportHeight","scrollTop","left","top","clientRect","leftAligned","bottomAligned","style","offsetWidth","offsetHeight","innerWidth","documentElement","clientWidth","innerHeight","clientHeight","pageYOffset","getBoundingClientRect","pageXOffset","bottom","offsetLeft","offsetTop","offsetParent","now","before","row","yearOfPreviousMonth","yearOfNextMonth","daysInPreviousMonth","cells","after","y","onejan","isWeekSelected","dayNumber","monthNumber","yearNumber","dayConfig","unshift","weekNum","renderHead","rows","renderTable","v","destroy","removeChild","buildHiddenInput","input","handleLinkClick","link","message","confirm","method","csrf","form","action","display","submit","element","onload","Array","querySelectorAll","forEach","url","location","href","linkTarget","RegExp","classList","add","button","flashMessage","closest","formFilters","querySelector","canSubmit","text","getElementsByTagName","textContent","start","getElementsByClassName","end","alert","disabled","nextElementSibling","formatDate","toLocaleString","parseDate","dateString","dateParts","split","parentElement","matches","matchesSelector"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,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AAWL,IAAK,YAClEX,QAAQ,sBAAuB,YAE9BiT,EAAaC,IACjB,MAAMC,EAAYD,EAAWE,MAAM,KACnC,GAAyB,IAArBD,EAAUjH,OACZ,OAAO,IAAIpK,KAAKqR,EAAU,GAAIA,EAAU,GAAK,EAAGA,EAAU,KAK9DpR,EAAMtF,KAAKqC,SAASyS,iBAAiB,eAAgB,GAAGC,QAASzO,IAC/D,MAAMO,EAAc2P,EAAUlQ,EAAMxF,QAAU,IAAIuE,KAElD,IAAI8F,IAAQ,CACV7E,MAAOA,EACP1C,SAAUK,GAAQqS,EAAWrS,GAC7B4E,SAAU5E,GAASqC,EAAMxF,MAAQwV,EAAWrS,GAC5C4C,YAAaA,EACbD,MAAO4P,EACP7N,MAAO,uBAKXrD,EAAMtF,KAAKqC,SAASyS,iBAAiB,sBAAuB,GAAGC,QAASzO,IACtEA,EAAMlE,iBAAiB,SAAS,SAAUJ,GACxC,IAAIS,EAAK6D,EAET,MAAQ7D,EAAKA,EAAGmU,kBAAqBnU,EAAGoU,SAAWpU,EAAGqU,iBAAiB9W,KAAKyC,EAD3D,gBAC6EA,EAAGoJ,WAAWiI,YAAYrR","file":"torch.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 1);\n","/*!\n * Pikaday\n *\n * Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/Pikaday/Pikaday\n */\n\n(function (root, factory)\n{\n 'use strict';\n\n var moment;\n if (typeof exports === 'object') {\n // CommonJS module\n // Load moment.js as an optional dependency\n try { moment = require('moment'); } catch (e) {}\n module.exports = factory(moment);\n } else if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(function (req)\n {\n // Load moment.js as an optional dependency\n var id = 'moment';\n try { moment = req(id); } catch (e) {}\n return factory(moment);\n });\n } else {\n root.Pikaday = factory(root.moment);\n }\n}(this, function (moment)\n{\n 'use strict';\n\n /**\n * feature detection and helper functions\n */\n var hasMoment = typeof moment === 'function',\n\n hasEventListeners = !!window.addEventListener,\n\n document = window.document,\n\n sto = window.setTimeout,\n\n addEvent = function(el, e, callback, capture)\n {\n if (hasEventListeners) {\n el.addEventListener(e, callback, !!capture);\n } else {\n el.attachEvent('on' + e, callback);\n }\n },\n\n removeEvent = function(el, e, callback, capture)\n {\n if (hasEventListeners) {\n el.removeEventListener(e, callback, !!capture);\n } else {\n el.detachEvent('on' + e, callback);\n }\n },\n\n trim = function(str)\n {\n return str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g,'');\n },\n\n hasClass = function(el, cn)\n {\n return (' ' + el.className + ' ').indexOf(' ' + cn + ' ') !== -1;\n },\n\n addClass = function(el, cn)\n {\n if (!hasClass(el, cn)) {\n el.className = (el.className === '') ? cn : el.className + ' ' + cn;\n }\n },\n\n removeClass = function(el, cn)\n {\n el.className = trim((' ' + el.className + ' ').replace(' ' + cn + ' ', ' '));\n },\n\n isArray = function(obj)\n {\n return (/Array/).test(Object.prototype.toString.call(obj));\n },\n\n isDate = function(obj)\n {\n return (/Date/).test(Object.prototype.toString.call(obj)) && !isNaN(obj.getTime());\n },\n\n isWeekend = function(date)\n {\n var day = date.getDay();\n return day === 0 || day === 6;\n },\n\n isLeapYear = function(year)\n {\n // solution by Matti Virkkunen: http://stackoverflow.com/a/4881951\n return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;\n },\n\n getDaysInMonth = function(year, month)\n {\n return [31, isLeapYear(year) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month];\n },\n\n setToStartOfDay = function(date)\n {\n if (isDate(date)) date.setHours(0,0,0,0);\n },\n\n compareDates = function(a,b)\n {\n // weak date comparison (use setToStartOfDay(date) to ensure correct result)\n return a.getTime() === b.getTime();\n },\n\n extend = function(to, from, overwrite)\n {\n var prop, hasProp;\n for (prop in from) {\n hasProp = to[prop] !== undefined;\n if (hasProp && typeof from[prop] === 'object' && from[prop] !== null && from[prop].nodeName === undefined) {\n if (isDate(from[prop])) {\n if (overwrite) {\n to[prop] = new Date(from[prop].getTime());\n }\n }\n else if (isArray(from[prop])) {\n if (overwrite) {\n to[prop] = from[prop].slice(0);\n }\n } else {\n to[prop] = extend({}, from[prop], overwrite);\n }\n } else if (overwrite || !hasProp) {\n to[prop] = from[prop];\n }\n }\n return to;\n },\n\n fireEvent = function(el, eventName, data)\n {\n var ev;\n\n if (document.createEvent) {\n ev = document.createEvent('HTMLEvents');\n ev.initEvent(eventName, true, false);\n ev = extend(ev, data);\n el.dispatchEvent(ev);\n } else if (document.createEventObject) {\n ev = document.createEventObject();\n ev = extend(ev, data);\n el.fireEvent('on' + eventName, ev);\n }\n },\n\n adjustCalendar = function(calendar) {\n if (calendar.month < 0) {\n calendar.year -= Math.ceil(Math.abs(calendar.month)/12);\n calendar.month += 12;\n }\n if (calendar.month > 11) {\n calendar.year += Math.floor(Math.abs(calendar.month)/12);\n calendar.month -= 12;\n }\n return calendar;\n },\n\n /**\n * defaults and localisation\n */\n defaults = {\n\n // bind the picker to a form field\n field: null,\n\n // automatically show/hide the picker on `field` focus (default `true` if `field` is set)\n bound: undefined,\n\n // data-attribute on the input field with an aria assistance tekst (only applied when `bound` is set)\n ariaLabel: 'Use the arrow keys to pick a date',\n\n // position of the datepicker, relative to the field (default to bottom & left)\n // ('bottom' & 'left' keywords are not used, 'top' & 'right' are modifier on the bottom/left position)\n position: 'bottom left',\n\n // automatically fit in the viewport even if it means repositioning from the position option\n reposition: true,\n\n // the default output format for `.toString()` and `field` value\n format: 'YYYY-MM-DD',\n\n // the toString function which gets passed a current date object and format\n // and returns a string\n toString: null,\n\n // used to create date object from current input string\n parse: null,\n\n // the initial date to view when first opened\n defaultDate: null,\n\n // make the `defaultDate` the initial selected value\n setDefaultDate: false,\n\n // first day of week (0: Sunday, 1: Monday etc)\n firstDay: 0,\n\n // the default flag for moment's strict date parsing\n formatStrict: false,\n\n // the minimum/earliest date that can be selected\n minDate: null,\n // the maximum/latest date that can be selected\n maxDate: null,\n\n // number of years either side, or array of upper/lower range\n yearRange: 10,\n\n // show week numbers at head of row\n showWeekNumber: false,\n\n // Week picker mode\n pickWholeWeek: false,\n\n // used internally (don't config outside)\n minYear: 0,\n maxYear: 9999,\n minMonth: undefined,\n maxMonth: undefined,\n\n startRange: null,\n endRange: null,\n\n isRTL: false,\n\n // Additional text to append to the year in the calendar title\n yearSuffix: '',\n\n // Render the month after year in the calendar title\n showMonthAfterYear: false,\n\n // Render days of the calendar grid that fall in the next or previous month\n showDaysInNextAndPreviousMonths: false,\n\n // Allows user to select days that fall in the next or previous month\n enableSelectionDaysInNextAndPreviousMonths: false,\n\n // how many months are visible\n numberOfMonths: 1,\n\n // when numberOfMonths is used, this will help you to choose where the main calendar will be (default `left`, can be set to `right`)\n // only used for the first display or when a selected date is not visible\n mainCalendar: 'left',\n\n // Specify a DOM element to render the calendar in\n container: undefined,\n\n // Blur field when date is selected\n blurFieldOnSelect : true,\n\n // internationalization\n i18n: {\n previousMonth : 'Previous Month',\n nextMonth : 'Next Month',\n months : ['January','February','March','April','May','June','July','August','September','October','November','December'],\n weekdays : ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],\n weekdaysShort : ['Sun','Mon','Tue','Wed','Thu','Fri','Sat']\n },\n\n // Theme Classname\n theme: null,\n\n // events array\n events: [],\n\n // callback function\n onSelect: null,\n onOpen: null,\n onClose: null,\n onDraw: null,\n\n // Enable keyboard input\n keyboardInput: true\n },\n\n\n /**\n * templating functions to abstract HTML rendering\n */\n renderDayName = function(opts, day, abbr)\n {\n day += opts.firstDay;\n while (day >= 7) {\n day -= 7;\n }\n return abbr ? opts.i18n.weekdaysShort[day] : opts.i18n.weekdays[day];\n },\n\n renderDay = function(opts)\n {\n var arr = [];\n var ariaSelected = 'false';\n if (opts.isEmpty) {\n if (opts.showDaysInNextAndPreviousMonths) {\n arr.push('is-outside-current-month');\n\n if(!opts.enableSelectionDaysInNextAndPreviousMonths) {\n arr.push('is-selection-disabled');\n }\n\n } else {\n return '';\n }\n }\n if (opts.isDisabled) {\n arr.push('is-disabled');\n }\n if (opts.isToday) {\n arr.push('is-today');\n }\n if (opts.isSelected) {\n arr.push('is-selected');\n ariaSelected = 'true';\n }\n if (opts.hasEvent) {\n arr.push('has-event');\n }\n if (opts.isInRange) {\n arr.push('is-inrange');\n }\n if (opts.isStartRange) {\n arr.push('is-startrange');\n }\n if (opts.isEndRange) {\n arr.push('is-endrange');\n }\n return '' +\n '' +\n '';\n },\n\n renderWeek = function (d, m, y) {\n // Lifted from http://javascript.about.com/library/blweekyear.htm, lightly modified.\n var onejan = new Date(y, 0, 1),\n weekNum = Math.ceil((((new Date(y, m, d) - onejan) / 86400000) + onejan.getDay()+1)/7);\n return '' + weekNum + '';\n },\n\n renderRow = function(days, isRTL, pickWholeWeek, isRowSelected)\n {\n return '' + (isRTL ? days.reverse() : days).join('') + '';\n },\n\n renderBody = function(rows)\n {\n return '' + rows.join('') + '';\n },\n\n renderHead = function(opts)\n {\n var i, arr = [];\n if (opts.showWeekNumber) {\n arr.push('');\n }\n for (i = 0; i < 7; i++) {\n arr.push('' + renderDayName(opts, i, true) + '');\n }\n return '' + (opts.isRTL ? arr.reverse() : arr).join('') + '';\n },\n\n renderTitle = function(instance, c, year, month, refYear, randId)\n {\n var i, j, arr,\n opts = instance._o,\n isMinYear = year === opts.minYear,\n isMaxYear = year === opts.maxYear,\n html = '
',\n monthHtml,\n yearHtml,\n prev = true,\n next = true;\n\n for (arr = [], i = 0; i < 12; i++) {\n arr.push('');\n }\n\n monthHtml = '
' + opts.i18n.months[month] + '
';\n\n if (isArray(opts.yearRange)) {\n i = opts.yearRange[0];\n j = opts.yearRange[1] + 1;\n } else {\n i = year - opts.yearRange;\n j = 1 + year + opts.yearRange;\n }\n\n for (arr = []; i < j && i <= opts.maxYear; i++) {\n if (i >= opts.minYear) {\n arr.push('');\n }\n }\n yearHtml = '
' + year + opts.yearSuffix + '
';\n\n if (opts.showMonthAfterYear) {\n html += yearHtml + monthHtml;\n } else {\n html += monthHtml + yearHtml;\n }\n\n if (isMinYear && (month === 0 || opts.minMonth >= month)) {\n prev = false;\n }\n\n if (isMaxYear && (month === 11 || opts.maxMonth <= month)) {\n next = false;\n }\n\n if (c === 0) {\n html += '';\n }\n if (c === (instance._o.numberOfMonths - 1) ) {\n html += '';\n }\n\n return html += '
';\n },\n\n renderTable = function(opts, data, randId)\n {\n return '' + renderHead(opts) + renderBody(data) + '
';\n },\n\n\n /**\n * Pikaday constructor\n */\n Pikaday = function(options)\n {\n var self = this,\n opts = self.config(options);\n\n self._onMouseDown = function(e)\n {\n if (!self._v) {\n return;\n }\n e = e || window.event;\n var target = e.target || e.srcElement;\n if (!target) {\n return;\n }\n\n if (!hasClass(target, 'is-disabled')) {\n if (hasClass(target, 'pika-button') && !hasClass(target, 'is-empty') && !hasClass(target.parentNode, 'is-disabled')) {\n self.setDate(new Date(target.getAttribute('data-pika-year'), target.getAttribute('data-pika-month'), target.getAttribute('data-pika-day')));\n if (opts.bound) {\n sto(function() {\n self.hide();\n if (opts.blurFieldOnSelect && opts.field) {\n opts.field.blur();\n }\n }, 100);\n }\n }\n else if (hasClass(target, 'pika-prev')) {\n self.prevMonth();\n }\n else if (hasClass(target, 'pika-next')) {\n self.nextMonth();\n }\n }\n if (!hasClass(target, 'pika-select')) {\n // if this is touch event prevent mouse events emulation\n if (e.preventDefault) {\n e.preventDefault();\n } else {\n e.returnValue = false;\n return false;\n }\n } else {\n self._c = true;\n }\n };\n\n self._onChange = function(e)\n {\n e = e || window.event;\n var target = e.target || e.srcElement;\n if (!target) {\n return;\n }\n if (hasClass(target, 'pika-select-month')) {\n self.gotoMonth(target.value);\n }\n else if (hasClass(target, 'pika-select-year')) {\n self.gotoYear(target.value);\n }\n };\n\n self._onKeyChange = function(e)\n {\n e = e || window.event;\n\n if (self.isVisible()) {\n\n switch(e.keyCode){\n case 13:\n case 27:\n if (opts.field) {\n opts.field.blur();\n }\n break;\n case 37:\n e.preventDefault();\n self.adjustDate('subtract', 1);\n break;\n case 38:\n self.adjustDate('subtract', 7);\n break;\n case 39:\n self.adjustDate('add', 1);\n break;\n case 40:\n self.adjustDate('add', 7);\n break;\n }\n }\n };\n\n self._onInputChange = function(e)\n {\n var date;\n\n if (e.firedBy === self) {\n return;\n }\n if (opts.parse) {\n date = opts.parse(opts.field.value, opts.format);\n } else if (hasMoment) {\n date = moment(opts.field.value, opts.format, opts.formatStrict);\n date = (date && date.isValid()) ? date.toDate() : null;\n }\n else {\n date = new Date(Date.parse(opts.field.value));\n }\n if (isDate(date)) {\n self.setDate(date);\n }\n if (!self._v) {\n self.show();\n }\n };\n\n self._onInputFocus = function()\n {\n self.show();\n };\n\n self._onInputClick = function()\n {\n self.show();\n };\n\n self._onInputBlur = function()\n {\n // IE allows pika div to gain focus; catch blur the input field\n var pEl = document.activeElement;\n do {\n if (hasClass(pEl, 'pika-single')) {\n return;\n }\n }\n while ((pEl = pEl.parentNode));\n\n if (!self._c) {\n self._b = sto(function() {\n self.hide();\n }, 50);\n }\n self._c = false;\n };\n\n self._onClick = function(e)\n {\n e = e || window.event;\n var target = e.target || e.srcElement,\n pEl = target;\n if (!target) {\n return;\n }\n if (!hasEventListeners && hasClass(target, 'pika-select')) {\n if (!target.onchange) {\n target.setAttribute('onchange', 'return;');\n addEvent(target, 'change', self._onChange);\n }\n }\n do {\n if (hasClass(pEl, 'pika-single') || pEl === opts.trigger) {\n return;\n }\n }\n while ((pEl = pEl.parentNode));\n if (self._v && target !== opts.trigger && pEl !== opts.trigger) {\n self.hide();\n }\n };\n\n self.el = document.createElement('div');\n self.el.className = 'pika-single' + (opts.isRTL ? ' is-rtl' : '') + (opts.theme ? ' ' + opts.theme : '');\n\n addEvent(self.el, 'mousedown', self._onMouseDown, true);\n addEvent(self.el, 'touchend', self._onMouseDown, true);\n addEvent(self.el, 'change', self._onChange);\n\n if (opts.keyboardInput) {\n addEvent(document, 'keydown', self._onKeyChange);\n }\n\n if (opts.field) {\n if (opts.container) {\n opts.container.appendChild(self.el);\n } else if (opts.bound) {\n document.body.appendChild(self.el);\n } else {\n opts.field.parentNode.insertBefore(self.el, opts.field.nextSibling);\n }\n addEvent(opts.field, 'change', self._onInputChange);\n\n if (!opts.defaultDate) {\n if (hasMoment && opts.field.value) {\n opts.defaultDate = moment(opts.field.value, opts.format).toDate();\n } else {\n opts.defaultDate = new Date(Date.parse(opts.field.value));\n }\n opts.setDefaultDate = true;\n }\n }\n\n var defDate = opts.defaultDate;\n\n if (isDate(defDate)) {\n if (opts.setDefaultDate) {\n self.setDate(defDate, true);\n } else {\n self.gotoDate(defDate);\n }\n } else {\n self.gotoDate(new Date());\n }\n\n if (opts.bound) {\n this.hide();\n self.el.className += ' is-bound';\n addEvent(opts.trigger, 'click', self._onInputClick);\n addEvent(opts.trigger, 'focus', self._onInputFocus);\n addEvent(opts.trigger, 'blur', self._onInputBlur);\n } else {\n this.show();\n }\n };\n\n\n /**\n * public Pikaday API\n */\n Pikaday.prototype = {\n\n\n /**\n * configure functionality\n */\n config: function(options)\n {\n if (!this._o) {\n this._o = extend({}, defaults, true);\n }\n\n var opts = extend(this._o, options, true);\n\n opts.isRTL = !!opts.isRTL;\n\n opts.field = (opts.field && opts.field.nodeName) ? opts.field : null;\n\n opts.theme = (typeof opts.theme) === 'string' && opts.theme ? opts.theme : null;\n\n opts.bound = !!(opts.bound !== undefined ? opts.field && opts.bound : opts.field);\n\n opts.trigger = (opts.trigger && opts.trigger.nodeName) ? opts.trigger : opts.field;\n\n opts.disableWeekends = !!opts.disableWeekends;\n\n opts.disableDayFn = (typeof opts.disableDayFn) === 'function' ? opts.disableDayFn : null;\n\n var nom = parseInt(opts.numberOfMonths, 10) || 1;\n opts.numberOfMonths = nom > 4 ? 4 : nom;\n\n if (!isDate(opts.minDate)) {\n opts.minDate = false;\n }\n if (!isDate(opts.maxDate)) {\n opts.maxDate = false;\n }\n if ((opts.minDate && opts.maxDate) && opts.maxDate < opts.minDate) {\n opts.maxDate = opts.minDate = false;\n }\n if (opts.minDate) {\n this.setMinDate(opts.minDate);\n }\n if (opts.maxDate) {\n this.setMaxDate(opts.maxDate);\n }\n\n if (isArray(opts.yearRange)) {\n var fallback = new Date().getFullYear() - 10;\n opts.yearRange[0] = parseInt(opts.yearRange[0], 10) || fallback;\n opts.yearRange[1] = parseInt(opts.yearRange[1], 10) || fallback;\n } else {\n opts.yearRange = Math.abs(parseInt(opts.yearRange, 10)) || defaults.yearRange;\n if (opts.yearRange > 100) {\n opts.yearRange = 100;\n }\n }\n\n return opts;\n },\n\n /**\n * return a formatted string of the current selection (using Moment.js if available)\n */\n toString: function(format)\n {\n format = format || this._o.format;\n if (!isDate(this._d)) {\n return '';\n }\n if (this._o.toString) {\n return this._o.toString(this._d, format);\n }\n if (hasMoment) {\n return moment(this._d).format(format);\n }\n return this._d.toDateString();\n },\n\n /**\n * return a Moment.js object of the current selection (if available)\n */\n getMoment: function()\n {\n return hasMoment ? moment(this._d) : null;\n },\n\n /**\n * set the current selection from a Moment.js object (if available)\n */\n setMoment: function(date, preventOnSelect)\n {\n if (hasMoment && moment.isMoment(date)) {\n this.setDate(date.toDate(), preventOnSelect);\n }\n },\n\n /**\n * return a Date object of the current selection\n */\n getDate: function()\n {\n return isDate(this._d) ? new Date(this._d.getTime()) : null;\n },\n\n /**\n * set the current selection\n */\n setDate: function(date, preventOnSelect)\n {\n if (!date) {\n this._d = null;\n\n if (this._o.field) {\n this._o.field.value = '';\n fireEvent(this._o.field, 'change', { firedBy: this });\n }\n\n return this.draw();\n }\n if (typeof date === 'string') {\n date = new Date(Date.parse(date));\n }\n if (!isDate(date)) {\n return;\n }\n\n var min = this._o.minDate,\n max = this._o.maxDate;\n\n if (isDate(min) && date < min) {\n date = min;\n } else if (isDate(max) && date > max) {\n date = max;\n }\n\n this._d = new Date(date.getTime());\n setToStartOfDay(this._d);\n this.gotoDate(this._d);\n\n if (this._o.field) {\n this._o.field.value = this.toString();\n fireEvent(this._o.field, 'change', { firedBy: this });\n }\n if (!preventOnSelect && typeof this._o.onSelect === 'function') {\n this._o.onSelect.call(this, this.getDate());\n }\n },\n\n /**\n * change view to a specific date\n */\n gotoDate: function(date)\n {\n var newCalendar = true;\n\n if (!isDate(date)) {\n return;\n }\n\n if (this.calendars) {\n var firstVisibleDate = new Date(this.calendars[0].year, this.calendars[0].month, 1),\n lastVisibleDate = new Date(this.calendars[this.calendars.length-1].year, this.calendars[this.calendars.length-1].month, 1),\n visibleDate = date.getTime();\n // get the end of the month\n lastVisibleDate.setMonth(lastVisibleDate.getMonth()+1);\n lastVisibleDate.setDate(lastVisibleDate.getDate()-1);\n newCalendar = (visibleDate < firstVisibleDate.getTime() || lastVisibleDate.getTime() < visibleDate);\n }\n\n if (newCalendar) {\n this.calendars = [{\n month: date.getMonth(),\n year: date.getFullYear()\n }];\n if (this._o.mainCalendar === 'right') {\n this.calendars[0].month += 1 - this._o.numberOfMonths;\n }\n }\n\n this.adjustCalendars();\n },\n\n adjustDate: function(sign, days) {\n\n var day = this.getDate() || new Date();\n var difference = parseInt(days)*24*60*60*1000;\n\n var newDay;\n\n if (sign === 'add') {\n newDay = new Date(day.valueOf() + difference);\n } else if (sign === 'subtract') {\n newDay = new Date(day.valueOf() - difference);\n }\n\n this.setDate(newDay);\n },\n\n adjustCalendars: function() {\n this.calendars[0] = adjustCalendar(this.calendars[0]);\n for (var c = 1; c < this._o.numberOfMonths; c++) {\n this.calendars[c] = adjustCalendar({\n month: this.calendars[0].month + c,\n year: this.calendars[0].year\n });\n }\n this.draw();\n },\n\n gotoToday: function()\n {\n this.gotoDate(new Date());\n },\n\n /**\n * change view to a specific month (zero-index, e.g. 0: January)\n */\n gotoMonth: function(month)\n {\n if (!isNaN(month)) {\n this.calendars[0].month = parseInt(month, 10);\n this.adjustCalendars();\n }\n },\n\n nextMonth: function()\n {\n this.calendars[0].month++;\n this.adjustCalendars();\n },\n\n prevMonth: function()\n {\n this.calendars[0].month--;\n this.adjustCalendars();\n },\n\n /**\n * change view to a specific full year (e.g. \"2012\")\n */\n gotoYear: function(year)\n {\n if (!isNaN(year)) {\n this.calendars[0].year = parseInt(year, 10);\n this.adjustCalendars();\n }\n },\n\n /**\n * change the minDate\n */\n setMinDate: function(value)\n {\n if(value instanceof Date) {\n setToStartOfDay(value);\n this._o.minDate = value;\n this._o.minYear = value.getFullYear();\n this._o.minMonth = value.getMonth();\n } else {\n this._o.minDate = defaults.minDate;\n this._o.minYear = defaults.minYear;\n this._o.minMonth = defaults.minMonth;\n this._o.startRange = defaults.startRange;\n }\n\n this.draw();\n },\n\n /**\n * change the maxDate\n */\n setMaxDate: function(value)\n {\n if(value instanceof Date) {\n setToStartOfDay(value);\n this._o.maxDate = value;\n this._o.maxYear = value.getFullYear();\n this._o.maxMonth = value.getMonth();\n } else {\n this._o.maxDate = defaults.maxDate;\n this._o.maxYear = defaults.maxYear;\n this._o.maxMonth = defaults.maxMonth;\n this._o.endRange = defaults.endRange;\n }\n\n this.draw();\n },\n\n setStartRange: function(value)\n {\n this._o.startRange = value;\n },\n\n setEndRange: function(value)\n {\n this._o.endRange = value;\n },\n\n /**\n * refresh the HTML\n */\n draw: function(force)\n {\n if (!this._v && !force) {\n return;\n }\n var opts = this._o,\n minYear = opts.minYear,\n maxYear = opts.maxYear,\n minMonth = opts.minMonth,\n maxMonth = opts.maxMonth,\n html = '',\n randId;\n\n if (this._y <= minYear) {\n this._y = minYear;\n if (!isNaN(minMonth) && this._m < minMonth) {\n this._m = minMonth;\n }\n }\n if (this._y >= maxYear) {\n this._y = maxYear;\n if (!isNaN(maxMonth) && this._m > maxMonth) {\n this._m = maxMonth;\n }\n }\n\n randId = 'pika-title-' + Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 2);\n\n for (var c = 0; c < opts.numberOfMonths; c++) {\n html += '
' + 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) + '
';\n }\n\n this.el.innerHTML = html;\n\n if (opts.bound) {\n if(opts.field.type !== 'hidden') {\n sto(function() {\n opts.trigger.focus();\n }, 1);\n }\n }\n\n if (typeof this._o.onDraw === 'function') {\n this._o.onDraw(this);\n }\n\n if (opts.bound) {\n // let the screen reader user know to use arrow keys\n opts.field.setAttribute('aria-label', opts.ariaLabel);\n }\n },\n\n adjustPosition: function()\n {\n var field, pEl, width, height, viewportWidth, viewportHeight, scrollTop, left, top, clientRect, leftAligned, bottomAligned;\n\n if (this._o.container) return;\n\n this.el.style.position = 'absolute';\n\n field = this._o.trigger;\n pEl = field;\n width = this.el.offsetWidth;\n height = this.el.offsetHeight;\n viewportWidth = window.innerWidth || document.documentElement.clientWidth;\n viewportHeight = window.innerHeight || document.documentElement.clientHeight;\n scrollTop = window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop;\n leftAligned = true;\n bottomAligned = true;\n\n if (typeof field.getBoundingClientRect === 'function') {\n clientRect = field.getBoundingClientRect();\n left = clientRect.left + window.pageXOffset;\n top = clientRect.bottom + window.pageYOffset;\n } else {\n left = pEl.offsetLeft;\n top = pEl.offsetTop + pEl.offsetHeight;\n while((pEl = pEl.offsetParent)) {\n left += pEl.offsetLeft;\n top += pEl.offsetTop;\n }\n }\n\n // default position is bottom & left\n if ((this._o.reposition && left + width > viewportWidth) ||\n (\n this._o.position.indexOf('right') > -1 &&\n left - width + field.offsetWidth > 0\n )\n ) {\n left = left - width + field.offsetWidth;\n leftAligned = false;\n }\n if ((this._o.reposition && top + height > viewportHeight + scrollTop) ||\n (\n this._o.position.indexOf('top') > -1 &&\n top - height - field.offsetHeight > 0\n )\n ) {\n top = top - height - field.offsetHeight;\n bottomAligned = false;\n }\n\n this.el.style.left = left + 'px';\n this.el.style.top = top + 'px';\n\n addClass(this.el, leftAligned ? 'left-aligned' : 'right-aligned');\n addClass(this.el, bottomAligned ? 'bottom-aligned' : 'top-aligned');\n removeClass(this.el, !leftAligned ? 'left-aligned' : 'right-aligned');\n removeClass(this.el, !bottomAligned ? 'bottom-aligned' : 'top-aligned');\n },\n\n /**\n * render HTML for a particular month\n */\n render: function(year, month, randId)\n {\n var opts = this._o,\n now = new Date(),\n days = getDaysInMonth(year, month),\n before = new Date(year, month, 1).getDay(),\n data = [],\n row = [];\n setToStartOfDay(now);\n if (opts.firstDay > 0) {\n before -= opts.firstDay;\n if (before < 0) {\n before += 7;\n }\n }\n var previousMonth = month === 0 ? 11 : month - 1,\n nextMonth = month === 11 ? 0 : month + 1,\n yearOfPreviousMonth = month === 0 ? year - 1 : year,\n yearOfNextMonth = month === 11 ? year + 1 : year,\n daysInPreviousMonth = getDaysInMonth(yearOfPreviousMonth, previousMonth);\n var cells = days + before,\n after = cells;\n while(after > 7) {\n after -= 7;\n }\n cells += 7 - after;\n var isWeekSelected = false;\n for (var i = 0, r = 0; i < cells; i++)\n {\n var day = new Date(year, month, 1 + (i - before)),\n isSelected = isDate(this._d) ? compareDates(day, this._d) : false,\n isToday = compareDates(day, now),\n hasEvent = opts.events.indexOf(day.toDateString()) !== -1 ? true : false,\n isEmpty = i < before || i >= (days + before),\n dayNumber = 1 + (i - before),\n monthNumber = month,\n yearNumber = year,\n isStartRange = opts.startRange && compareDates(opts.startRange, day),\n isEndRange = opts.endRange && compareDates(opts.endRange, day),\n isInRange = opts.startRange && opts.endRange && opts.startRange < day && day < opts.endRange,\n isDisabled = (opts.minDate && day < opts.minDate) ||\n (opts.maxDate && day > opts.maxDate) ||\n (opts.disableWeekends && isWeekend(day)) ||\n (opts.disableDayFn && opts.disableDayFn(day));\n\n if (isEmpty) {\n if (i < before) {\n dayNumber = daysInPreviousMonth + dayNumber;\n monthNumber = previousMonth;\n yearNumber = yearOfPreviousMonth;\n } else {\n dayNumber = dayNumber - days;\n monthNumber = nextMonth;\n yearNumber = yearOfNextMonth;\n }\n }\n\n var dayConfig = {\n day: dayNumber,\n month: monthNumber,\n year: yearNumber,\n hasEvent: hasEvent,\n isSelected: isSelected,\n isToday: isToday,\n isDisabled: isDisabled,\n isEmpty: isEmpty,\n isStartRange: isStartRange,\n isEndRange: isEndRange,\n isInRange: isInRange,\n showDaysInNextAndPreviousMonths: opts.showDaysInNextAndPreviousMonths,\n enableSelectionDaysInNextAndPreviousMonths: opts.enableSelectionDaysInNextAndPreviousMonths\n };\n\n if (opts.pickWholeWeek && isSelected) {\n isWeekSelected = true;\n }\n\n row.push(renderDay(dayConfig));\n\n if (++r === 7) {\n if (opts.showWeekNumber) {\n row.unshift(renderWeek(i - before, month, year));\n }\n data.push(renderRow(row, opts.isRTL, opts.pickWholeWeek, isWeekSelected));\n row = [];\n r = 0;\n isWeekSelected = false;\n }\n }\n return renderTable(opts, data, randId);\n },\n\n isVisible: function()\n {\n return this._v;\n },\n\n show: function()\n {\n if (!this.isVisible()) {\n this._v = true;\n this.draw();\n removeClass(this.el, 'is-hidden');\n if (this._o.bound) {\n addEvent(document, 'click', this._onClick);\n this.adjustPosition();\n }\n if (typeof this._o.onOpen === 'function') {\n this._o.onOpen.call(this);\n }\n }\n },\n\n hide: function()\n {\n var v = this._v;\n if (v !== false) {\n if (this._o.bound) {\n removeEvent(document, 'click', this._onClick);\n }\n this.el.style.position = 'static'; // reset\n this.el.style.left = 'auto';\n this.el.style.top = 'auto';\n addClass(this.el, 'is-hidden');\n this._v = false;\n if (v !== undefined && typeof this._o.onClose === 'function') {\n this._o.onClose.call(this);\n }\n }\n },\n\n /**\n * GAME OVER\n */\n destroy: function()\n {\n var opts = this._o;\n\n this.hide();\n removeEvent(this.el, 'mousedown', this._onMouseDown, true);\n removeEvent(this.el, 'touchend', this._onMouseDown, true);\n removeEvent(this.el, 'change', this._onChange);\n if (opts.keyboardInput) {\n removeEvent(document, 'keydown', this._onKeyChange);\n }\n if (opts.field) {\n removeEvent(opts.field, 'change', this._onInputChange);\n if (opts.bound) {\n removeEvent(opts.trigger, 'click', this._onInputClick);\n removeEvent(opts.trigger, 'focus', this._onInputFocus);\n removeEvent(opts.trigger, 'blur', this._onInputBlur);\n }\n }\n if (this.el.parentNode) {\n this.el.parentNode.removeChild(this.el);\n }\n }\n\n };\n\n return Pikaday;\n}));\n","import Pikaday from 'pikaday'\n\n// Phoenix html copied here since I ran into extensive issues trying to import\n// from the dep.\n;(function () {\n function buildHiddenInput (name, value) {\n const input = document.createElement('input')\n input.type = 'hidden'\n input.name = name\n input.value = value\n return input\n }\n\n function handleLinkClick (link) {\n var message = link.getAttribute('data-confirm')\n if (message && !window.confirm(message)) {\n return\n }\n\n const method = buildHiddenInput('_method', link.getAttribute('data-method'))\n const csrf = buildHiddenInput('_csrf_token', link.getAttribute('data-csrf'))\n const form = document.createElement('form')\n\n form.method = (link.getAttribute('data-method') === 'get') ? 'get' : 'post'\n form.action = link.getAttribute('data-to')\n form.style.display = 'hidden'\n\n form.appendChild(csrf)\n form.appendChild(method)\n document.body.appendChild(form)\n form.submit()\n }\n\n window.addEventListener('click', function (e) {\n var element = e.target\n\n while (element && element.getAttribute) {\n if (element.getAttribute('data-method')) {\n handleLinkClick(element)\n e.preventDefault()\n return false\n } else {\n element = element.parentNode\n }\n }\n }, false)\n})()\n\nwindow.onload = () => {\n const slice = Array.prototype.slice\n\n /*\n * Set active nav link\n */\n slice.call(document.querySelectorAll('.torch-nav a'), 0).forEach((field) => {\n const url = window.location.href\n const linkTarget = field.getAttribute('href')\n const regex = RegExp(linkTarget)\n\n if (regex.test(url)) {\n field.classList.add('active')\n }\n })\n\n /*\n * Flash Messages\n */\n slice.call(document.querySelectorAll('button.torch-flash-close'), 0).forEach((button) => {\n button.addEventListener('click', function () {\n const flashMessage = button.closest('.torch-flash')\n flashMessage.parentNode.removeChild(flashMessage)\n })\n })\n\n /*\n * Prevent empty fields from being submitted, since this breaks Filtrex.\n */\n const formFilters = document.querySelector('form#torch-filters-form')\n if (!formFilters) return\n\n formFilters.addEventListener('submit', function (e) {\n e.preventDefault()\n\n let canSubmit = true\n\n slice.call(this.querySelectorAll('.field'), 0).forEach((field) => {\n const text = field.getElementsByTagName('label')[0].textContent\n const start = field.getElementsByClassName('start')[0]\n const end = field.getElementsByClassName('end')[0]\n\n if (start && end) {\n if (start.value === '' && end.value !== '') {\n window.alert(`Please select a start date for the ${text} field`)\n canSubmit = false\n } else if (end.value === '' && start.value !== '') {\n window.alert(`Please select an end at date for the ${text} field`)\n canSubmit = false\n }\n }\n })\n\n if (canSubmit) {\n slice.call(this.querySelectorAll('input, select'), 0).forEach((field) => {\n if (field.value === '') {\n field.disabled = true\n }\n })\n\n e.target.submit()\n }\n })\n\n slice.call(document.querySelectorAll('select.filter-type'), 0).forEach((field) => {\n field.addEventListener('change', (e) => {\n e.target.nextElementSibling.name = e.target.value\n })\n })\n\n const formatDate = date =>\n date\n .toLocaleString('en-us', { year: 'numeric', month: '2-digit', day: '2-digit' })\n .replace(/(\\d+)\\/(\\d+)\\/(\\d+)/, '$3-$1-$2')\n\n const parseDate = (dateString) => {\n const dateParts = dateString.split('-')\n if (dateParts.length === 3) {\n return new Date(dateParts[0], dateParts[1] - 1, dateParts[2])\n }\n }\n\n /* eslint-disable no-new */\n slice.call(document.querySelectorAll('.datepicker'), 0).forEach((field) => {\n const defaultDate = parseDate(field.value) || new Date()\n\n new Pikaday({\n field: field,\n toString: date => formatDate(date),\n onSelect: date => (field.value = formatDate(date)),\n defaultDate: defaultDate,\n parse: parseDate,\n theme: 'torch-datepicker'\n })\n })\n /* eslint-enable no-new */\n\n slice.call(document.querySelectorAll('.torch-flash-close'), 0).forEach((field) => {\n field.addEventListener('click', function (e) {\n let el = field\n const selector = 'torch-flash'\n while ((el = el.parentElement) && !((el.matches || el.matchesSelector).call(el, selector))) { el.parentNode.removeChild(el) }\n })\n })\n}\n"],"sourceRoot":""} \ No newline at end of file