From: Kilian Saffran Date: Fri, 13 Nov 2020 08:48:23 +0000 (+0100) Subject: v20201113 X-Git-Url: http://cloud.dks.lu/git/?a=commitdiff_plain;h=HEAD;p=dks_lu.git v20201113 --- diff --git a/.gitignore b/.gitignore index 3be2b6f..acb79d3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ cms/lib/perl5 apps/lib website/lib/vendor/* +OLD/* \ No newline at end of file diff --git a/admin/.htaccess b/admin/.htaccess new file mode 100644 index 0000000..0969f29 --- /dev/null +++ b/admin/.htaccess @@ -0,0 +1,9 @@ + +RewriteEngine on +DirectoryIndex index.php index.html +php_flag display_startup_errors on +php_flag display_errors on +php_flag html_errors on +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule "^(.*)$" "index.php" [NC,L,QSA] \ No newline at end of file diff --git a/admin/css/fonts/appicons.svg b/admin/css/fonts/appicons.svg new file mode 100644 index 0000000..c8119b9 --- /dev/null +++ b/admin/css/fonts/appicons.svg @@ -0,0 +1,57 @@ + + + +Generated by IcoMoon + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/admin/css/fonts/appicons.ttf b/admin/css/fonts/appicons.ttf new file mode 100644 index 0000000..a58825b Binary files /dev/null and b/admin/css/fonts/appicons.ttf differ diff --git a/admin/css/fonts/appicons.woff b/admin/css/fonts/appicons.woff new file mode 100644 index 0000000..49aa7a3 Binary files /dev/null and b/admin/css/fonts/appicons.woff differ diff --git a/admin/css/icons.css b/admin/css/icons.css new file mode 100644 index 0000000..4732276 --- /dev/null +++ b/admin/css/icons.css @@ -0,0 +1,167 @@ +@font-face { + font-family: 'appicons'; + src: + url('fonts/appicons.ttf?o5pwnj') format('truetype'), + url('fonts/appicons.woff?o5pwnj') format('woff'), + url('fonts/appicons.svg?o5pwnj#appicons') format('svg'); + font-weight: normal; + font-style: normal; + font-display: block; +} + +[class^="icon-"], [class*=" icon-"] { + /* use !important to prevent issues with browser extensions that change fonts */ + font-family: 'appicons' !important; + speak: never; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + + /* Better Font Rendering =========== */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.icon-list:before { + content: "\e900"; +} +.icon-menu:before { + content: "\e901"; +} +.icon-mport:before { + content: "\e902"; +} +.icon-export:before { + content: "\e903"; +} +.icon-add:before { + content: "\e904"; +} +.icon-trash:before { + content: "\e905"; +} +.icon-close:before { + content: "\e906"; +} +.icon-back:before { + content: "\e907"; +} +.icon-next:before { + content: "\e908"; +} +.icon-back2:before { + content: "\e909"; +} +.icon-next2:before { + content: "\e90a"; +} +.icon-user:before { + content: "\e90b"; +} +.icon-usergroup:before { + content: "\e90c"; +} +.icon-edituser:before { + content: "\e90d"; +} +.icon-userconfig:before { + content: "\e90e"; +} +.icon-options:before { + content: "\e90f"; +} +.icon-info:before { + content: "\e910"; +} +.icon-help:before { + content: "\e911"; +} +.icon-filter:before { + content: "\e912"; +} +.icon-print:before { + content: "\e913"; +} +.icon-email:before { + content: "\e914"; +} +.icon-phone:before { + content: "\e915"; +} +.icon-video:before { + content: "\e916"; +} +.icon-website:before { + content: "\e917"; +} +.icon-edit:before { + content: "\e918"; +} +.icon-pdf:before { + content: "\e919"; +} +.icon-categories:before { + content: "\e91a"; +} +.icon-duplicate:before { + content: "\e91b"; +} +.icon-search:before { + content: "\e91c"; +} +.icon-image:before { + content: "\e91d"; +} +.icon-music:before { + content: "\e91e"; +} +.icon-location:before { + content: "\e91f"; +} +.icon-camera:before { + content: "\e920"; +} +.icon-sync:before { + content: "\e921"; +} +.icon-badge:before { + content: "\e922"; +} +.icon-cart:before { + content: "\e923"; +} +.icon-home:before { + content: "\e924"; +} +.icon-alert:before { + content: "\e925"; +} +.icon-dataset:before { + content: "\e926"; +} +.icon-new:before { + content: "\e927"; +} +.icon-acrobat:before { + content: "\e928"; +} +.icon-agreement:before { + content: "\e929"; +} +.icon-agreement2:before { + content: "\e92a"; +} +.icon-shop:before { + content: "\e92b"; +} +.icon-calendar:before { + content: "\e92c"; +} +.icon-today:before { + content: "\e92d"; +} +.icon-certificate:before { + content: "\e92e"; +} diff --git a/admin/css/theme.css b/admin/css/theme.css new file mode 100644 index 0000000..7d36c92 --- /dev/null +++ b/admin/css/theme.css @@ -0,0 +1,1054 @@ +/* W3PRO.CSS 4.13 June 2019 by Jan Egil and Borge Refsnes */ +html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit} +/* Extract from normalize.css by Nicolas Gallagher and Jonathan Neal git.io/normalize */ +html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0} +html,body {-webkit-user-select: none;-ms-user-select: none;user-select: none;-moz-user-select:none;} +article,aside,details,figcaption,figure,footer,header,main,menu,nav,section{display:block}summary{display:list-item} +audio,canvas,progress,video{display:inline-block}progress{vertical-align:baseline} +audio:not([controls]){display:none;height:0}[hidden],template{display:none} +a{background-color:transparent}a:active,a:hover{outline-width:0} +abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted} +b,strong{font-weight:bolder}dfn{font-style:italic}mark{background:#ff0;color:#000} +small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline} +sub{bottom:-0.25em}sup{top:-0.5em}figure{margin:1em 40px}img{border-style:none} +code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}hr{box-sizing:content-box;height:0;overflow:visible} +button,input,select,textarea,optgroup{font:inherit;margin:0}optgroup{font-weight:bold} +button,input{overflow:visible}button,select{text-transform:none} +button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button} +button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0} +button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText} +fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em} +legend{color:inherit;display:table;max-width:100%;padding:0;white-space:normal}textarea{overflow:auto} +[type=checkbox],[type=radio]{padding:0} +[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto} +[type=search]{-webkit-appearance:textfield;outline-offset:-2px} +[type=search]::-webkit-search-decoration{-webkit-appearance:none} +::-webkit-file-upload-button{-webkit-appearance:button;font:inherit} +/* End extract */ +/* html,body { + background-color: #52638e; +} */ +html,body{font-family:Verdana,sans-serif;font-size:10pt;line-height:1.5}html{overflow-x:hidden} +h1{font-size:36px}h2{font-size:30px}h3{font-size:24px}h4{font-size:20px}h5{font-size:18px}h6{font-size:16px}.serif{font-family:serif} +h1,h2,h3,h4,h5,h6{font-family:"Segoe UI",Arial,sans-serif;font-weight:400;margin: 0}.wide{letter-spacing:4px} +hr{border:0;border-top:1px solid #eee;margin:20px 0} +.img{max-width:100%;height:auto; vertical-align:middle}a{color:inherit} +.table,.table-all{border-collapse:collapse;border-spacing:0;width:100%;display:table}.table-all{border:1px solid #ccc} +.bordered tr,.table-all tr{border-bottom:1px solid #ddd}.striped tbody tr:nth-child(even){background-color:#f1f1f1} +.table-all tr:nth-child(odd){background-color:#fff}.table-all tr:nth-child(even){background-color:#f1f1f1} +.hoverable tbody tr:hover,.ul.hoverable li:hover{background-color:#ccc}.centered tr th,.centered tr td{text-align:center} +.table td,.table th,.table-all td,.table-all th{padding:8px 8px;display:table-cell;text-align:left;vertical-align:top} +.table th:first-child,.table td:first-child,.table-all th:first-child,.table-all td:first-child{padding-left:16px} +.btn,.button{border:none;display:inline-block;padding:8px 16px;vertical-align:middle;overflow:hidden;text-decoration:none;color:inherit;background-color:inherit;text-align:center;cursor:pointer;white-space:nowrap} +.btn:hover{box-shadow:0 8px 16px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19)} +.btn,.button{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none} +.disabled,.btn:disabled,.button:disabled{cursor:not-allowed;background-color: #e6e6e6}.disabled *,:disabled *{pointer-events:none} +.btn.disabled:hover,.btn:disabled:hover{box-shadow:none} +.badge,.tag{background-color:#000;color:#fff;display:inline-block;padding-left:8px;padding-right:8px;text-align:center}.badge{border-radius:50%} +.ul{list-style-type:none;padding:0;margin:0}.ul li{padding:8px 16px;border-bottom:1px solid #ddd}.ul li:last-child{border-bottom:none} +.tooltip,.display-container{position:relative}.tooltip .text{display:none}.tooltip:hover .text{display:inline-block} +.ripple:active{opacity:0.5}.ripple{transition:opacity 0s} +.input{padding:6px;display:block;border: 1px solid #ccc;width:100%;background-color: #fff; }/*#e8f0fe*/ +.select{padding:2px 0; display:block;width:100%;border:1px solid #ccc;background-color: #fff;} +.dropdown-click,.dropdown-hover{position:relative;display:inline-block;cursor:pointer} +.dropdown-hover:hover .dropdown-content{display:block; } +.dropdown-hover:first-child,.dropdown-click:hover{background-color:#ccc;color:#000} +.dropdown-hover:hover > .button:first-child,.dropdown-click:hover > .button:first-child{background-color:#ccc;color:#000} +.dropdown-content{cursor:auto;color:#000;background-color:#fff;display:none;position:absolute;min-width:160px;margin:0;padding:0;z-index:1} +.check,.radio{width:24px;height:24px;position:relative;top:6px} +.sidebar{height:100%;width:160px;background-color:#fff;position:fixed!important;z-index:1;overflow:auto} +.bar-block .dropdown-hover,.bar-block .dropdown-click{width:100%} +.bar-block .dropdown-hover .dropdown-content,.bar-block .dropdown-click .dropdown-content{min-width:100%} +.bar-block .dropdown-hover .button,.bar-block .dropdown-click .button{width:100%;text-align:left;padding:8px 16px} +.main,#main{transition:margin-left .4s} +.modal{z-index:3;display:none;padding-top:100px;position:fixed;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:rgb(0,0,0);background-color:rgba(0,0,0,0.4)} +.modal-content{margin:auto;background-color:#fff;position:relative;padding:0;outline:0;width:600px} +.bar{width:100%}.center .bar{display:inline-block;width:auto} +.bar .bar-item{padding:8px 16px;float:left;width:auto;border:none;display:block;outline:0} +.bar .dropdown-hover,.bar .dropdown-click{position:static;float:left} +.bar .button{white-space:normal} +.bar-block .bar-item{width:100%;display:block;padding:8px 16px;text-align:left;border:none;white-space:normal;float:none;outline:0} +.bar-block.center .bar-item{text-align:center}.block{display:block;width:100%} +.responsive{display:block;overflow-x:auto} +.container:after,.container:before,.datapanel:after,.datapanel:before,.row:after,.row:before,.row-padding:after,.row-padding:before, +.cell-row:before,.cell-row:after,.clear:after,.clear:before,.bar:before,.bar:after{content:"";display:table;clear:both} +.col,.half,.third,.twothird,.threequarter,.quarter,.fifth,.twofifth,.threefifth,.fourfifth{float:left;width:100%} +.col.s1{width:8.33333%}.col.s2{width:16.66666%}.col.s3{width:24.99999%}.col.s4{width:33.33333%} +.col.s5{width:41.66666%}.col.s6{width:49.99999%}.col.s7{width:58.33333%}.col.s8{width:66.66666%} +.col.s9{width:74.99999%}.col.s10{width:83.33333%}.col.s11{width:91.66666%}.col.s12{width:99.99999%} +@media (min-width:601px){.col.m1{width:8.33333%}.col.m2{width:16.66666%}.col.m3,.quarter{width:24.99999%}.col.m4,.third{width:33.33333%}.fifth{width:20%;min-width:100px} +.col.m5{width:41.66666%}.col.m6,.half{width:49.99999%}.col.m7{width:58.33333%}.col.m8,.twothird{width:66.66666%} +.col.m9,.threequarter{width:74.99999%}.col.m10{width:83.33333%}.col.m11{width:91.66666%}.col.m12{width:99.99999%}.twofifth{width:40%}.threefifth{width:60%}.fourfifth{width:80%}} +@media (min-width:993px){.col.l1{width:8.33333%}.col.l2{width:16.66666%}.col.l3{width:24.99999%}.col.l4{width:33.33333%} +.col.l5{width:41.66666%}.col.l6{width:49.99999%}.col.l7{width:58.33333%}.col.l8{width:66.66666%} +.col.l9{width:74.99999%}.col.l10{width:83.33333%}.col.l11{width:91.66666%}.col.l12{width:99.99999%}} +.rest{overflow:hidden}.stretch{margin-left:-16px;margin-right:-16px} +.content,.auto{margin-left:auto;margin-right:auto}.content{max-width:980px}.auto{max-width:1140px} +.cell-row{display:table;width:100%}.cell{display:table-cell;vertical-align: top;} +.cell-top{vertical-align:top}.cell-middle{vertical-align:middle}.cell-bottom{vertical-align:bottom} +.hide{display:none!important}.show-block,.show{display:block!important}.show-inline-block{display:inline-block!important} +@media (max-width:1205px){.auto{max-width:95%}} +@media (max-width:600px){.modal-content{margin:0 10px;width:auto!important}.modal{padding-top:30px} +.dropdown-hover.mobile .dropdown-content,.dropdown-click.mobile .dropdown-content{position:relative} +.hide-small{display:none!important}.mobile{display:block;width:100%!important}.bar-item.mobile,.dropdown-hover.mobile,.dropdown-click.mobile{text-align:center} +.dropdown-hover.mobile,.dropdown-hover.mobile .btn,.dropdown-hover.mobile .button,.dropdown-click.mobile,.dropdown-click.mobile .btn,.dropdown-click.mobile .button{width:100%}} +@media (max-width:768px){.modal-content{width:500px}.modal{padding-top:50px}} +@media (min-width:993px){.modal-content{width:900px}.hide-large{display:none!important}.sidebar.collapse{display:block!important}} +@media (max-width:992px) and (min-width:601px){.hide-medium{display:none!important}} +@media (max-width:992px){.sidebar.collapse{display:none}.main{margin-left:0!important;margin-right:0!important}.auto{max-width:100%}} +.top,.bottom{position:fixed;width:100%;z-index:1}.top{top:0}.bottom{bottom:0} +.overlay{position:fixed;display:none;width:100%;height:100%;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,0.5);z-index:2} +.display-topleft{position:absolute;left:0;top:0}.display-topright{position:absolute;right:0;top:0} +.display-bottomleft{position:absolute;left:0;bottom:0}.display-bottomright{position:absolute;right:0;bottom:0} +.display-middle{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%)} +.display-left{position:absolute;top:50%;left:0%;transform:translate(0%,-50%);-ms-transform:translate(-0%,-50%)} +.display-right{position:absolute;top:50%;right:0%;transform:translate(0%,-50%);-ms-transform:translate(0%,-50%)} +.display-topmiddle{position:absolute;left:50%;top:0;transform:translate(-50%,0%);-ms-transform:translate(-50%,0%)} +.display-bottommiddle{position:absolute;left:50%;bottom:0;transform:translate(-50%,0%);-ms-transform:translate(-50%,0%)} +.display-container:hover .display-hover{display:block}.display-container:hover span.display-hover{display:inline-block}.display-hover{display:none} +.display-position{position:absolute} +.circle{border-radius:50%} +.round-small{border-radius:2px}.round,.round-medium{border-radius:4px}.round-large{border-radius:8px}.round-xlarge{border-radius:16px}.round-xxlarge{border-radius:32px} +.row-padding,.row-padding>.half,.row-padding>.third,.row-padding>.twothird,.row-padding>.threequarter,.row-padding>.quarter,.row-padding>.col{padding:0 8px} +.container,.datapanel{padding:0.01em 8px}.datapanel{margin-top:8px;margin-bottom:8px} +.code,.codespan{font-family:Consolas,"courier new";font-size:16px} +.code{width:auto;background-color:#fff;padding:8px 12px;border-left:4px solid #4CAF50;word-wrap:break-word} +.codespan{color:crimson;background-color:#f1f1f1;padding-left:4px;padding-right:4px;font-size:110%} +.card,.card-2{box-shadow:0 2px 5px 0 rgba(0,0,0,0.16)} +.card-4,.hover-shadow:hover{box-shadow:0 4px 10px 0 rgba(0,0,0,0.2),0 4px 20px 0 rgba(0,0,0,0.19)} +.spin{animation:spin 2s infinite linear}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}} +.animate-fading{animation:fading 2s infinite}@keyframes fading{0%{opacity:0}50%{opacity:1}100%{opacity:0}} +.animate-opacity{animation:opac 0.8s}@keyframes opac{from{opacity:0} to{opacity:1}} +.animate-top{position:relative;animation:animatetop 1s}@keyframes animatetop{from{top:-300px;opacity:0} to{top:0;opacity:1}} +.animate-left{position:relative;animation:animateleft 0.4s}@keyframes animateleft{from{left:-300px;opacity:0} to{left:0;opacity:1}} +.animate-right{position:relative;animation:animateright 0.4s}@keyframes animateright{from{right:-300px;opacity:0} to{right:0;opacity:1}} +.animate-bottom{position:relative;animation:animatebottom 1s}@keyframes animatebottom{from{bottom:-300px;opacity:0} to{bottom:0;opacity:1}} +.animate-zoom {animation:animatezoom 0.6s}@keyframes animatezoom{from{transform:scale(0)} to{transform:scale(1)}} +.animate-input{transition:width 0.4s ease-in-out}.animate-input:focus{width:100%!important} +.opacity,.hover-opacity:hover{opacity:0.60}.opacity-off,.hover-opacity-off:hover{opacity:1} +.opacity-max{opacity:0.25}.opacity-min{opacity:0.75} +.greyscale-max,.grayscale-max,.hover-greyscale:hover,.hover-grayscale:hover{filter:grayscale(100%)} +.greyscale,.grayscale{filter:grayscale(75%)}.greyscale-min,.grayscale-min{filter:grayscale(50%)} +.sepia{filter:sepia(75%)}.sepia-max,.hover-sepia:hover{filter:sepia(100%)}.sepia-min{filter:sepia(50%)} +.tiny{font-size:10px!important}.small{font-size:12px!important}.medium{font-size:15px!important}.large{font-size:18px!important} +.xlarge{font-size:24px!important}.xxlarge{font-size:36px!important}.xxxlarge{font-size:48px!important}.jumbo{font-size:64px!important} +.left-align{text-align:left!important}.right-align{text-align:right!important}.justify{text-align:justify!important}.center{text-align:center!important} +.border-0{border:0!important}.border{border:1px solid #ccc!important} +.border-top{border-top:1px solid #ccc!important}.border-bottom{border-bottom:1px solid #ccc!important} +.border-left{border-left:1px solid #ccc!important}.border-right{border-right:1px solid #ccc!important} +.topbar{border-top:6px solid #ccc!important}.bottombar{border-bottom:6px solid #ccc!important} +.leftbar{border-left:6px solid #ccc!important}.rightbar{border-right:6px solid #ccc!important} +.section,.code{margin-top:16px!important;margin-bottom:16px!important} +.margin{margin:16px!important}.margin-top{margin-top:16px!important}.margin-bottom{margin-bottom:16px!important} +.margin-left{margin-left:16px!important}.margin-right{margin-right:16px!important} +.padding-small{padding:4px 8px!important}.padding{padding:8px 16px!important}.padding-large{padding:12px 24px!important} +.padding-16{padding-top:16px!important;padding-bottom:16px!important}.padding-24{padding-top:24px!important;padding-bottom:24px!important} +.padding-32{padding-top:32px!important;padding-bottom:32px!important}.padding-48{padding-top:48px!important;padding-bottom:48px!important} +.padding-64{padding-top:64px!important;padding-bottom:64px!important} +.left{float:left!important}.right{float:right!important} +.button:hover{color:#fff!important;background-color:#343434!important} +.transparent,.hover-none:hover{background-color:transparent!important} +.hover-none:hover{box-shadow:none!important} +/* DEFAULT COLORS */ +.amber,.hover-amber:hover{color:#000!important;background-color:#ffc107!important} +.aqua,.hover-aqua:hover{color:#000!important;background-color:#00ffff!important} +.blue,.hover-blue:hover{color:#fff!important;background-color:#2196F3!important} +.light-blue,.hover-light-blue:hover{color:#000!important;background-color:#87CEEB!important} +.brown,.hover-brown:hover{color:#fff!important;background-color:#795548!important} +.cyan,.hover-cyan:hover{color:#000!important;background-color:#00bcd4!important} +.blue-grey,.hover-blue-grey:hover{color:#fff!important;background-color:#607d8b!important} +.green,.hover-green:hover{color:#fff!important;background-color:#4CAF50!important} +.light-green,.hover-light-green:hover{color:#000!important;background-color:#8bc34a!important} +.indigo,.hover-indigo:hover{color:#fff!important;background-color:#3f51b5!important} +.khaki,.hover-khaki:hover{color:#000!important;background-color:#f0e68c!important} +.lime,.hover-lime:hover{color:#000!important;background-color:#cddc39!important} +.orange,.hover-orange:hover{color:#000!important;background-color:#ff9800!important} +.deep-orange,.hover-deep-orange:hover{color:#fff!important;background-color:#ff5722!important} +.pink,.hover-pink:hover{color:#fff!important;background-color:#e91e63!important} +.purple,.hover-purple:hover{color:#fff!important;background-color:#9c27b0!important} +.deep-purple,.hover-deep-purple:hover{color:#fff!important;background-color:#673ab7!important} +.red,.hover-red:hover{color:#fff!important;background-color:#f44336!important} +.sand,.hover-sand:hover{color:#000!important;background-color:#fdf5e6!important} +.teal,.hover-teal:hover{color:#fff!important;background-color:#009688!important} +.yellow,.hover-yellow:hover{color:#000!important;background-color:#ffeb3b!important} +.white,.hover-white:hover{color:#000!important;background-color:#fff!important} +.black,.hover-black:hover{color:#fff!important;background-color:#000!important} +.grey,.hover-grey:hover{color:#000!important;background-color:#9e9e9e!important} +.light-grey,.hover-light-grey:hover{color:#000!important;background-color:#f1f1f1!important} +.dark-grey,.hover-dark-grey:hover{color:#fff!important;background-color:#616161!important} +.pale-red,.hover-pale-red:hover{color:#000!important;background-color:#ffe7e7!important}.pale-green,.hover-pale-green:hover{color:#000!important;background-color:#e7ffe7!important} +.pale-yellow,.hover-pale-yellow:hover{color:#000!important;background-color:#ffffd7!important}.pale-blue,.hover-pale-blue:hover{color:#000!important;background-color:#e7ffff!important} +.text-align-right { text-align: right;} +.text-amber,.hover-text-amber:hover{color:#ffc107!important} +.text-aqua,.hover-text-aqua:hover{color:#00ffff!important} +.text-blue,.hover-text-blue:hover{color:#2196F3!important} +.text-light-blue,.hover-text-light-blue:hover{color:#87CEEB!important} +.text-brown,.hover-text-brown:hover{color:#795548!important} +.text-cyan,.hover-text-cyan:hover{color:#00bcd4!important} +.text-blue-grey,.hover-text-blue-grey:hover{color:#607d8b!important} +.text-green,.hover-text-green:hover{color:#4CAF50!important} +.text-light-green,.hover-text-light-green:hover{color:#8bc34a!important} +.text-indigo,.hover-text-indigo:hover{color:#3f51b5!important} +.text-khaki,.hover-text-khaki:hover{color:#b4aa50!important} +.text-lime,.hover-text-lime:hover{color:#cddc39!important} +.text-orange,.hover-text-orange:hover{color:#ff9800!important} +.text-deep-orange,.hover-text-deep-orange:hover{color:#ff5722!important} +.text-pink,.hover-text-pink:hover{color:#e91e63!important} +.text-purple,.hover-text-purple:hover{color:#9c27b0!important} +.text-deep-purple,.hover-text-deep-purple:hover{color:#673ab7!important} +.text-red,.hover-text-red:hover{color:#f44336!important} +.text-sand,.hover-text-sand:hover{color:#fdf5e6!important} +.text-teal,.hover-text-teal:hover{color:#009688!important} +.text-yellow,.hover-text-yellow:hover{color:#d2be0e!important} +.text-white,.hover-text-white:hover{color:#fff!important} +.text-black,.hover-text-black:hover{color:#000!important} +.text-grey,.hover-text-grey:hover{color:#757575!important} +.text-light-grey,.hover-text-light-grey:hover{color:#f1f1f1!important} +.text-dark-grey,.hover-text-dark-grey:hover{color:#3a3a3a!important} +.border-amber,.hover-border-amber:hover{border-color:#ffc107!important} +.border-aqua,.hover-border-aqua:hover{border-color:#00ffff!important} +.border-blue,.hover-border-blue:hover{border-color:#2196F3!important} +.border-light-blue,.hover-border-light-blue:hover{border-color:#87CEEB!important} +.border-brown,.hover-border-brown:hover{border-color:#795548!important} +.border-cyan,.hover-border-cyan:hover{border-color:#00bcd4!important} +.border-blue-grey,.hover-blue-grey:hover{border-color:#607d8b!important} +.border-green,.hover-border-green:hover{border-color:#4CAF50!important} +.border-light-green,.hover-border-light-green:hover{border-color:#8bc34a!important} +.border-indigo,.hover-border-indigo:hover{border-color:#3f51b5!important} +.border-khaki,.hover-border-khaki:hover{border-color:#f0e68c!important} +.border-lime,.hover-border-lime:hover{border-color:#cddc39!important} +.border-orange,.hover-border-orange:hover{border-color:#ff9800!important} +.border-deep-orange,.hover-border-deep-orange:hover{border-color:#ff5722!important} +.border-pink,.hover-border-pink:hover{border-color:#e91e63!important} +.border-purple,.hover-border-purple:hover{border-color:#9c27b0!important} +.border-deep-purple,.hover-border-deep-purple:hover{border-color:#673ab7!important} +.border-red,.hover-border-red:hover{border-color:#f44336!important} +.border-sand,.hover-border-sand:hover{border-color:#fdf5e6!important} +.border-teal,.hover-border-teal:hover{border-color:#009688!important} +.border-yellow,.hover-border-yellow:hover{border-color:#ffeb3b!important} +.border-white,.hover-border-white:hover{border-color:#fff!important} +.border-black,.hover-border-black:hover{border-color:#000!important} +.border-grey,.hover-border-grey:hover{border-color:#9e9e9e!important} +.border-light-grey,.hover-border-light-grey:hover{border-color:#f1f1f1!important} +.border-dark-grey,.hover-border-dark-grey:hover{border-color:#616161!important} +.border-pale-red,.hover-border-pale-red:hover{border-color:#ffe7e7!important}.border-pale-green,.hover-border-pale-green:hover{border-color:#e7ffe7!important} +.border-pale-yellow,.hover-border-pale-yellow:hover{border-color:#ffffd7!important}.border-pale-blue,.hover-border-pale-blue:hover{border-color:#e7ffff!important} +/* DEFAULT THEME */ +.theme-l5 {color:#000 !important; background-color:#f6f8fc !important} +.theme-l4 {color:#000 !important; background-color:#e1e9f6 !important} +.theme-l3 {color:#000 !important; background-color:#c3d3ed !important} +.theme-l2 {color:#000 !important; background-color:#a5bee4 !important} +.theme-l1 {color:#fff !important; background-color:#88a8db !important} +.theme-d1 {color:#fff !important; background-color:#5180cb !important} +.theme-d2 {color:#fff !important; background-color:#3a6fc3 !important} +.theme-d3 {color:#fff !important; background-color:#3361aa !important} +.theme-d4 {color:#fff !important; background-color:#2c5392 !important} +.theme-d5 {color:#fff !important; background-color:#24457a !important} + +.theme-light {color:#000 !important; background-color:#f6f8fc !important} +.theme-dark {color:#fff !important; background-color:#24457a !important} +.theme-action {color:#fff !important; background-color:#24457a !important} + +.theme {color:#fff !important; background-color:#6a92d3 !important} +.text-theme {color:#6a92d3 !important} +.border-theme {border-color:#6a92d3 !important} + +.hover-theme:hover {color:#fff !important; background-color:#6a92d3 !important} +.hover-text-theme:hover {color:#6a92d3 !important} +.hover-border-theme:hover {border-color:#6a92d3 !important} + +/* .label { color: #000; font-size: 8pt;} */ +/* #main {margin-left: 210px;} */ +/* @media (max-width:768px){ + #sidebar { display: none;} + #main { margin-left: 0px;} +} */ + +.info-panel { + padding: 3px; + color: #ff4500; + border: 1px solid #ff4500; + background-color: #f89774; +} + +.error-panel { + padding: 3px; + color: #ff0000; + border: 1px solid #ff0000; + background-color: #fcb2b2; +} + +.table { + table-layout: fixed; +} + +.text-line-through { text-decoration: line-through; } + +#snackbar { + visibility: hidden; + min-width: 250px; + margin-left: -125px; + background-color: #333; + color: #fff; + text-align: center; + + padding: 16px; + position: fixed; + z-index: 1; + left: 50%; + bottom: 30px; + font-size: 17px; +} + +#snackbar.show { + visibility: visible; + -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s; + animation: fadein 0.5s, fadeout 0.5s 2.5s; +} + +@-webkit-keyframes fadein { + from {bottom: 0; opacity: 0;} + to {bottom: 30px; opacity: 1;} +} + +@keyframes fadein { + from {bottom: 0; opacity: 0;} + to {bottom: 30px; opacity: 1;} +} + +@-webkit-keyframes fadeout { + from {bottom: 30px; opacity: 1;} + to {bottom: 0; opacity: 0;} +} + +@keyframes fadeout { + from {bottom: 30px; opacity: 1;} + to {bottom: 0; opacity: 0;} +} + +.tabulator-header-filter > input { + background-color: #fff; + border: 1px solid #ccc; + font-weight: normal; +} + +.readonly { + pointer-events:none; + color: #000!important; + background-color: #d3d3d3!important; +} + + + +.right-side-bg { + background: url("../img/bg1.jpg"); + background-size: cover; + min-height: 100vh; +} + + + + +/* .mceContentBody { + background: #fff; + color:#000; +} */ + +/* .tabulator-row-even { + background-color: #757575; +} */ + + +button +{ + background-color: #f4f4f4; + border: 1pt solid #cccccc; + font-size: 10pt; + color: #000; + line-height: 1line; + text-align: center; +} +button:hover +{ + background-color: #343434; +} +button:pressed +{ + background-color: #343434; +} +button:focus +{ + background-color: #343434; +} + + + + +header +{ + background-color: #fff; + box-sizing: border-box; +} + + +.actionbtn { + background-color: #293146; + color: #fff; +} + +::-webkit-input-placeholder +{ + color: rgba(60.3922%,60.3922%,60.3922%,1); +} + + +textarea +{ + background-color: #fff; + border-top-color: rgba(80%,80%,80%,1); + border-right-color: rgba(80%,80%,80%,1); + border-bottom-color: rgba(80%,80%,80%,1); + border-left-color: rgba(80%,80%,80%,1); + border-top-style: solid; + border-right-style: solid; + border-bottom-style: solid; + border-left-style: solid; + border-top-width: 1pt; + border-right-width: 1pt; + border-bottom-width: 1pt; + border-left-width: 1pt; + font-size: 11pt; + color: #000; + line-height: 1line; + text-align: left; + /* margin-top: 0.88em; + margin-right: 0.75em; + margin-bottom: 0.63em; + margin-left: 0.75em; + top: 0pt; + right: 30pt; + bottom: 0pt; + left: 0pt; + position: absolute; + box-sizing: border-box; */ +} +textarea:focus +{ + border-top-color: rgba(0%,43.9216%,81.1765%,1); + border-right-color: rgba(0%,43.9216%,81.1765%,1); + border-bottom-color: rgba(0%,43.9216%,81.1765%,1); + border-left-color: rgba(0%,43.9216%,81.1765%,1); +} +textarea:placeholder +{ + color: rgba(80%,80%,80%,1); +} +/* textarea .text +{ + +} */ +textarea .scrollbar_track +{ + width: 30pt; + top: 0pt; + right: 0pt; + bottom: 0pt; + position: absolute; + box-sizing: border-box; +} + + +footer +{ + background-color: #fff; + box-sizing: border-box; +} + + +div.group_container +{ + background-color: #e3e3e3; + border-top-color: rgba(80%,80%,80%,1); + border-right-color: rgba(80%,80%,80%,1); + border-bottom-color: rgba(80%,80%,80%,1); + border-left-color: rgba(80%,80%,80%,1); + border-top-style: solid; + border-right-style: solid; + border-bottom-style: solid; + border-left-style: solid; + border-top-width: 1pt; + border-right-width: 1pt; + border-bottom-width: 1pt; + border-left-width: 1pt; + padding-top: 4px; + padding-bottom: 8px; +} + +/* Custom Styles */ +.ListView_Default +{ + + background-color: rgba(0%,0%,0%,0); + border-top-style: none; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + + color: #000; + text-align: left; + margin-top: 2pt; + margin-right: 2pt; + margin-bottom: 2pt; + margin-left: 2pt; +} + + +button.btnNavigation +{ + + background-color: rgba(0%,0%,0%,0); + + font-family: -fm-font-family(Arial,Arial-BoldMT); + font-weight: bold; + font-size: 10pt; + color: #fff; + padding-top: 0pt; + padding-right: 0pt; + padding-bottom: 0pt; + padding-left: 0pt; +} + +div.PageListHeader +{ + border-top-color: rgba(80%,80%,80%,1); + border-right-color: rgba(80%,80%,80%,1); + border-bottom-color: rgba(80%,80%,80%,1); + border-left-color: rgba(80%,80%,80%,1); + border-top-style: solid; + border-right-style: solid; + border-bottom-style: solid; + border-left-style: solid; + border-top-width: 1pt; + border-right-width: 1pt; + border-bottom-width: 1pt; + border-left-width: 1pt; + color: #fff; + -fm-text-vertical-align: center; +} +div.PageListHeader .inner_border +{ + padding-top: 5pt; + padding-right: 5pt; + padding-bottom: 5pt; + padding-left: 5pt; +} + +.moduletoolbar +{ + background-color: #293146; + color: #fff; +} + +div.BodySectionHeader +{ + font-family: -fm-font-family(Arial,Arial-BoldMT); + font-weight: bold; +} + + +div.PageHeadTitle +{ + font-size: 18pt; + color: #fff; +} + +div.SubHeadTitle +{ + font-size: 13pt; + color: #fff; +} + +div.SectionHeader +{ + + background-color: rgba(22.3529%,26.6667%,38.4314%,1); + +} + +button.toolbarbtn +{ + border: 0.5px solid #c6c6c6; + background-color: rgba(0%,0%,0%,0); + color: #fff; +} +button.toolbarbtn:hover +{ + + background-color: #343434; + color: #fff; +} +button.toolbarbtn:pressed +{ + + background-color: rgba(20.3922%,20.3922%,20.3922%,1); + color: #fff; +} +button.toolbarbtn:focus +{ + border-top-color: rgba(80%,80%,80%,1); + border-right-color: rgba(80%,80%,80%,1); + border-bottom-color: rgba(80%,80%,80%,1); + border-left-color: rgba(80%,80%,80%,1); +} + + +a.toolbarbtn +{ + border: 0.5px solid #c6c6c6; + background-color: rgba(0%,0%,0%,0); + color: #fff; + text-align: center; + text-decoration: unset; +} +a.toolbarbtn:hover +{ + + background-color: rgba(20.3922%,20.3922%,20.3922%,1); + color: #fff; +} +a.toolbarbtn:pressed +{ + background-color: rgba(20.3922%,20.3922%,20.3922%,1); + color: #fff; +} +a.toolbarbtn:focus +{ + border-top-color: rgba(80%,80%,80%,1); + border-right-color: rgba(80%,80%,80%,1); + border-bottom-color: rgba(80%,80%,80%,1); + border-left-color: rgba(80%,80%,80%,1); +} + +button.bodybtn +{ + border: 0.5px solid #c6c6c6; + + background-color: rgba(0%,0%,0%,0); + + color: #000; +} +button.bodybtn:hover +{ + + background-color: rgba(20.3922%,20.3922%,20.3922%,1); + color: #fff; +} +button.bodybtn:pressed +{ + + background-color: rgba(20.3922%,20.3922%,20.3922%,1); + color: #fff; +} +button.bodybtn:focus +{ + border-top-color: rgba(80%,80%,80%,1); + border-right-color: rgba(80%,80%,80%,1); + border-bottom-color: rgba(80%,80%,80%,1); + border-left-color: rgba(80%,80%,80%,1); +} + + +a.bodybtn +{ + border: 0.5px solid #c6c6c6; + + background-color: rgba(0%,0%,0%,0); + + color: #000; + text-align: center; + text-decoration: unset; +} +a.bodybtn:hover +{ + + background-color: rgba(20.3922%,20.3922%,20.3922%,1); + color: #fff; +} +a.bodybtn:pressed +{ + background-color: rgba(20.3922%,20.3922%,20.3922%,1); + color: #fff; +} +a.bodybtn:focus +{ + border-top-color: rgba(80%,80%,80%,1); + border-right-color: rgba(80%,80%,80%,1); + border-bottom-color: rgba(80%,80%,80%,1); + border-left-color: rgba(80%,80%,80%,1); +} + + +div.ListView_Header +{ + border-top-color: rgba(80%,80%,80%,1); + border-right-color: rgba(80%,80%,80%,1); + border-bottom-color: rgba(80%,80%,80%,1); + border-left-color: rgba(80%,80%,80%,1); + border-top-style: solid; + border-right-style: solid; + border-bottom-style: solid; + border-left-style: solid; + border-top-width: 1pt; + border-right-width: 1pt; + border-bottom-width: 1pt; + border-left-width: 1pt; + font-weight: normal; + color: #fff; + -fm-text-vertical-align: center; +} +div.ListView_Header .inner_border +{ + padding-top: 2pt; + padding-right: 2pt; + padding-bottom: 2pt; + padding-left: 2pt; +} + +div.toolbar +{ + + background-color: rgba(32.1569%,38.8235%,55.6863%,1); + +} + +div.sectiontoolbar +{ + margin-top: 8px; + margin-bottom: 8px; + background-color: rgb(97, 98, 100); + +} + +div.FooterLabel +{ + color: #fff; +} + +button.Buttom_BodyNav:hover +{ + + background-color: rgb(141, 141, 141); + + /* color: #fff; */ +} + + +::-webkit-scrollbar { +-webkit-appearance: none; +width: 10px; +} + +::-webkit-scrollbar-track { + background-color: rgba(80%, 80%, 80%, .5); +} + +::-webkit-scrollbar-thumb { +border-radius: 0px; +background-color: rgba(0, 0, 0, .5); +-webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5); +} + +div.portaltextheader { + padding: 2px; + border: 1px solid white; +} + + + + + +select { + /* -webkit-appearance: none; */ + display: block; + color: #000; + line-height: 1line; + text-align: left; + padding: 3.5px; + width: 100%; + max-width: 100%; + box-sizing: border-box; + margin: 0; + border: 1px solid #cccccc; + /* box-shadow: 0 1px 0 1px rgba(0,0,0,.04); */ + border-radius: 0px; + font-weight: normal; + font-size: 11pt; + background-color: #fff; + /* background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E'), + linear-gradient(to bottom, #fff 0%,#fff 100%); + background-repeat: no-repeat, repeat; + background-position: right .7em top 50%, 0 0; + background-size: .65em auto, 100%; */ +} + + +/* option { + appearance: none; + border: 1px solid 0070cf; + padding: 2px; +} */ +select:focus +{ + border: 1px solid #3a6fc3; + border-radius: unset; +} + + +::-webkit-select-placeholder +{ + color: #9a9a9a; +} + +div.DataFooter{ + background: #384462; +} +.input-sum{padding:2px;display:block;border: 1px solid #ccc;width:100%;background-color: #4D4D4D; } + + +.currency-sum {padding:2px;display:block;border: 1px solid #ccc;width:100%;background-color: #4D4D4D;} + +.currency-sum,.currency-sum:read-only { + display: block; + color: #fff; + padding: 2px; + padding-right: 12px; + width: 100%; + max-width: 100%; + box-sizing: border-box; + margin: 0; + border: 1px solid #ccc; + border-radius: unset; + -moz-appearance: none; + -webkit-appearance: none; + appearance: none; + background-color: #4D4D4D; + background-image: url('data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22225%22%20height=%22300%22%3E%3Cpath%20fill=%22white%22%20stroke=%22none%22%20d=%22m%20224.99996,16.22698%20-8.11342,36.41161%20q%20-24.14255,-19.78892%20-54.61741,-19.78892%20-41.3588,0%20-65.00658,23.74671%20-23.647774,23.7467%20-28.397115,53.23215%20l%20134.960355,0%20-5.14505,26.71508%20-132.981532,0%20-0.395848,7.71771%200.395848,18.20566%20127.242642,0%20-5.14505,26.71508%20-117.941954,0%20q%207.519719,40.17154%2032.552754,59.06997%2025.03303,18.89844%2056.49745,18.89844%2037.20302,0%2057.98149,-19.59107%20l%200,40.9631%20Q%20192.34828,300%20162.26913,300%2053.034301,300%2030.474864,189.18206%20l%20-30.474864,0%205.738751,-26.71508%2020.580475,0%20q%20-0.395708,-4.74934%20-0.395708,-17.80995%20l%200,-8.11342%20-25.923518,0%205.738751,-26.71508%2023.152999,0%20Q%2039.181988,55.21112%2076.583149,27.60556%20113.98417,0%20163.06069,0%20199.868,0%20224.99996,16.22698%20z%22%20/%3E%3C/svg%3E'); + background-repeat: no-repeat, repeat; + background-position: right 2px top 50%, 0 0; + background-size: 9px auto, 100%; +} + + + + +/* input[type=date]::-webkit-inner-spin-button, +input[type=date]::-webkit-outer-spin-button { + display: none; +} */ + +:focus { + outline: unset; +} + +input +{ + background-color: #ffffff; + border: 1px solid #cccccc; + font-weight: normal; + font-size: 11pt; + color: #000000; + line-height: 1line; + text-align: left; + width:100%; + padding:2px; + display:block; + border-radius: unset; +} +/* input:focus +{ + border: #0070cf; +} */ + +input:focus { + border: 1px solid #3a6fc3; + border-radius: unset; +} + +input[readonly=true]{ + color: #000!important; + background-color: #d3d3d3!important; +} + +input[type=number]::-webkit-inner-spin-button, +input[type=number]::-webkit-outer-spin-button { + -webkit-appearance: none; + margin: 0; +} +/* input[type=checkbox]{ + appearance: none; + display:inline-block; + font-size: 24px!important; + border: 1px solid green; +} */ + +input[class=currency] { + padding: 2px; + padding-right: 12px; + text-align: right; + background-image: url('data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22225%22%20height=%22300%22%3E%3Cpath%20stroke=%22none%22%20d=%22m%20224.99996,16.22698%20-8.11342,36.41161%20q%20-24.14255,-19.78892%20-54.61741,-19.78892%20-41.3588,0%20-65.00658,23.74671%20-23.647774,23.7467%20-28.397115,53.23215%20l%20134.960355,0%20-5.14505,26.71508%20-132.981532,0%20-0.395848,7.71771%200.395848,18.20566%20127.242642,0%20-5.14505,26.71508%20-117.941954,0%20q%207.519719,40.17154%2032.552754,59.06997%2025.03303,18.89844%2056.49745,18.89844%2037.20302,0%2057.98149,-19.59107%20l%200,40.9631%20Q%20192.34828,300%20162.26913,300%2053.034301,300%2030.474864,189.18206%20l%20-30.474864,0%205.738751,-26.71508%2020.580475,0%20q%20-0.395708,-4.74934%20-0.395708,-17.80995%20l%200,-8.11342%20-25.923518,0%205.738751,-26.71508%2023.152999,0%20Q%2039.181988,55.21112%2076.583149,27.60556%20113.98417,0%20163.06069,0%20199.868,0%20224.99996,16.22698%20z%22%20/%3E%0A%3C/svg%3E'), + linear-gradient(to bottom, #fff 0%,#fff 100%); + background-repeat: no-repeat, repeat; + background-position: right 2px top 50%, 0 0; + background-size: 9px auto, 100%; +} + +input[class=currency]:read-only { + background-image: url('data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22225%22%20height=%22300%22%3E%3Cpath%20stroke=%22none%22%20d=%22m%20224.99996,16.22698%20-8.11342,36.41161%20q%20-24.14255,-19.78892%20-54.61741,-19.78892%20-41.3588,0%20-65.00658,23.74671%20-23.647774,23.7467%20-28.397115,53.23215%20l%20134.960355,0%20-5.14505,26.71508%20-132.981532,0%20-0.395848,7.71771%200.395848,18.20566%20127.242642,0%20-5.14505,26.71508%20-117.941954,0%20q%207.519719,40.17154%2032.552754,59.06997%2025.03303,18.89844%2056.49745,18.89844%2037.20302,0%2057.98149,-19.59107%20l%200,40.9631%20Q%20192.34828,300%20162.26913,300%2053.034301,300%2030.474864,189.18206%20l%20-30.474864,0%205.738751,-26.71508%2020.580475,0%20q%20-0.395708,-4.74934%20-0.395708,-17.80995%20l%200,-8.11342%20-25.923518,0%205.738751,-26.71508%2023.152999,0%20Q%2039.181988,55.21112%2076.583149,27.60556%20113.98417,0%20163.06069,0%20199.868,0%20224.99996,16.22698%20z%22%20/%3E%0A%3C/svg%3E'), + linear-gradient(to bottom, #d3d3d3 0%,#d3d3d3 100%); +} + +input[class=percent] { + padding: 2px; + padding-right: 12px; + text-align: right; + background-image: url('data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22256%22%20height=%22232%22%20version=%221.0%22%3E%3Cg%20transform=%22translate(-112.3674,-128.3649)%22%3E%3Cpath%20style=%22fill:black;fill-opacity:1;stroke:none%22%20d=%22M%20317.1674,257.53698%20C%20308.53463,257.53708%20301.73774,261.20839%20296.77671,268.55094%20C%20291.91449,275.89365%20289.48349,286.1138%20289.48368,299.2114%20C%20289.48349,312.11067%20291.91449,322.2812%20296.77671,329.72303%20C%20301.73774,337.06568%20308.53463,340.737%20317.1674,340.73698%20C%20325.60128,340.737%20332.24934,337.06568%20337.11159,329.72303%20C%20342.07258,322.2812%20344.5532,312.11067%20344.55345,299.2114%20C%20344.5532,286.21302%20342.07258,276.04249%20337.11159,268.69977%20C%20332.24934,261.25801%20325.60128,257.53708%20317.1674,257.53698%20M%20317.1674,238.63466%20C%20332.84469,238.63477%20345.29739,244.09213%20354.52554,255.00675%20C%20363.75318,265.92157%20368.36713,280.65644%20368.3674,299.2114%20C%20368.36713,317.76648%20363.70357,332.50135%20354.37671,343.41605%20C%20345.14855,354.23156%20332.74546,359.6393%20317.1674,359.63931%20C%20301.29123,359.6393%20288.7393,354.23156%20279.51159,343.41605%20C%20270.28351,332.50135%20265.66956,317.76648%20265.66973,299.2114%20C%20265.66956,280.55721%20270.28351,265.82234%20279.51159,255.00675%20C%20288.83853,244.09213%20301.39045,238.63477%20317.1674,238.63466%20M%20163.5674,147.9928%20C%20155.03401,147.993%20148.28673,151.71393%20143.32554,159.15559%20C%20138.46349,166.49841%20136.03248,176.61933%20136.03252,189.51838%20C%20136.03248,202.61621%20138.46349,212.83635%20143.32554,220.17884%20C%20148.18751,227.52161%20154.93479,231.19292%20163.5674,231.1928%20C%20172.19989,231.19292%20178.94717,227.52161%20183.80926,220.17884%20C%20188.77041,212.83635%20191.25103,202.61621%20191.25113,189.51838%20C%20191.25103,176.71856%20188.77041,166.59764%20183.80926,159.15559%20C%20178.84794,151.71393%20172.10066,147.993%20163.5674,147.9928%20M%20297.9674,129.09047%20L%20321.78136,129.09047%20L%20182.7674,359.63931%20L%20158.95345,359.63931%20L%20297.9674,129.09047%20M%20163.5674,129.09047%20C%20179.24484,129.0907%20191.74715,134.54806%20201.07438,145.46256%20C%20210.4014,156.27827%20215.06496,170.96352%20215.06508,189.51838%20C%20215.06496,208.27201%20210.4014,223.05649%20201.07438,233.87187%20C%20191.84638,244.68748%20179.34406,250.09523%20163.5674,250.09512%20C%20147.79061,250.09523%20135.28829,244.68748%20126.06043,233.87187%20C%20116.93172,222.95727%20112.36739,208.17279%20112.3674,189.51838%20C%20112.36739,171.06275%20116.98134,156.37749%20126.20926,145.46256%20C%20135.43713,134.54806%20147.88983,129.0907%20163.5674,129.09047%22%20/%3E%3C/g%3E%3C/svg%3E'), + linear-gradient(to bottom, #fff 0%,#fff 100%); + background-repeat: no-repeat, repeat; + background-position: right 2px top 50%, 0 0; + background-size: 9px auto, 100%; +} + + +label { + height: 12.8px!important; + color: #000; + font-size: 8pt; +} + + + +input[type="checkbox"] { + display: block; + -webkit-appearance:none;/* Hides the default checkbox style */ + height:29.66px; + width:29.66px; + cursor:pointer; + position:relative; + -webkit-transition: .15s; + border-radius: unset; + border: 1px solid #cccccc; + background-color:#fff; + } + + input[type="checkbox"]:checked { + background-color:#9ABCEA; + } + + input[type="checkbox"]:before, input[type="checkbox"]:checked:before { + position:absolute; + top:0; + left:0; + width:100%; + height:100%; + line-height:2em; + text-align:center; + color:#000; + content: ''; + } + + input[type="checkbox"]:checked:before { + font-size: 11pt; + content: '✔'; + } + + input[type="checkbox"]:hover:before { + background:rgba(255,255,255,0.3); + } + + + body.mceContentBody { + background:#e8f0fe; + color:#000; +} + +/* .mceContentBody { + background: #e8f0fe; + color:#000; +} */ + +/* .tabulator-row-even { + background-color: #757575; +} */ + +:focus { + outline: 1px solid #607d8b; +} + +.modal-content > header { + background-color: #293146; + color: #fff; + padding:8px!important; + margin-bottom: 10px; +} + +.modal-content > header > h2 { + font-size: 13pt; +} + +.modal-content > footer { + + /* padding:0.01em 8px; */ + text-align:right!important; + color:#000!important; + background-color:#c6c6c6!important; + margin-top: 6px; + padding-top:8px!important; + padding-bottom:8px!important; +} + +.modal-content > header:after,.modal-content > header:before,.modal-content > footer:after,.modal-content > footer:before { + content:"";display:table;clear:both +} + +span[class^="icon"]::after { + content: "\A"; + white-space: pre; +} + +.inlinebtn { + position: relative; + height: 28px; + margin-top: -28px; + margin-left: -20px; + padding: 4px 8px; + border: 0!important; + float: right; +} + +#loader { + position: absolute; + left: 50%; + top: 50%; + z-index: 1; + width: 150px; + height: 150px; + margin: -75px 0 0 -75px; + border: 16px solid #f3f3f3; + border-radius: 50%; + border-top: 16px solid #3498db; + width: 120px; + height: 120px; + -webkit-animation: spin 2s linear infinite; + animation: spin 2s linear infinite; +} + +@-webkit-keyframes spin { + 0% { -webkit-transform: rotate(0deg); } + 100% { -webkit-transform: rotate(360deg); } +} + +@keyframes spin { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } +} + diff --git a/admin/db.php b/admin/db.php new file mode 100644 index 0000000..e3b2681 --- /dev/null +++ b/admin/db.php @@ -0,0 +1,59 @@ +getSession($vars["sid"]); + // if (!isset($vars["session"]["id_session"])){ + // $vars["sid"] = ""; + // } + } + $params = array(); + if (isset($_POST) && count($_POST) > 0){ + $params = $_POST; + } elseif (isset($_GET)){ + $params = $_GET; + } + $html["params"] = $params; + if(count($vars["session"]) == 0) { + header('Content-Type: application/json'); + echo json_encode($html); + exit(1); + } + if (isset($params["get"])){ + if (strpos($params["get"], 'gallery_') === 0) { + + } elseif (strpos($params["get"], 'rdv_') === 0){ + + } elseif (strpos($params["get"], 'website_') === 0){ + + } elseif (strpos($params["get"], 'users_') === 0){ + + } elseif (strpos($params["get"], 'template_') === 0){ + $tmpl = new templates($cfg["sitetemplatepath"]); + if ($params["get"] == "template_files"){ + $html["files"] = $tmpl->gettemplatefiles(); + } + elseif ($params["get"] == "template_media"){ + $html["files"] = $tmpl->getmediafiles(); + } + } + + } elseif (isset($params["fn"])){ + + + } elseif(isset($params["save"])){ + + } + header('Content-Type: application/json'); + echo json_encode($html); +?> \ No newline at end of file diff --git a/admin/img/POT-logo.png b/admin/img/POT-logo.png new file mode 100644 index 0000000..e2c8028 Binary files /dev/null and b/admin/img/POT-logo.png differ diff --git a/admin/img/applogo.png b/admin/img/applogo.png new file mode 100644 index 0000000..b82da90 Binary files /dev/null and b/admin/img/applogo.png differ diff --git a/admin/img/bg1.jpg b/admin/img/bg1.jpg new file mode 100644 index 0000000..80c5326 Binary files /dev/null and b/admin/img/bg1.jpg differ diff --git a/admin/img/favicon/android-icon-144x144.png b/admin/img/favicon/android-icon-144x144.png new file mode 100644 index 0000000..7fbdb59 Binary files /dev/null and b/admin/img/favicon/android-icon-144x144.png differ diff --git a/admin/img/favicon/android-icon-192x192.png b/admin/img/favicon/android-icon-192x192.png new file mode 100644 index 0000000..01c2cfc Binary files /dev/null and b/admin/img/favicon/android-icon-192x192.png differ diff --git a/admin/img/favicon/android-icon-36x36.png b/admin/img/favicon/android-icon-36x36.png new file mode 100644 index 0000000..c5144c1 Binary files /dev/null and b/admin/img/favicon/android-icon-36x36.png differ diff --git a/admin/img/favicon/android-icon-48x48.png b/admin/img/favicon/android-icon-48x48.png new file mode 100644 index 0000000..e515672 Binary files /dev/null and b/admin/img/favicon/android-icon-48x48.png differ diff --git a/admin/img/favicon/android-icon-72x72.png b/admin/img/favicon/android-icon-72x72.png new file mode 100644 index 0000000..bde7f5f Binary files /dev/null and b/admin/img/favicon/android-icon-72x72.png differ diff --git a/admin/img/favicon/android-icon-96x96.png b/admin/img/favicon/android-icon-96x96.png new file mode 100644 index 0000000..af43b21 Binary files /dev/null and b/admin/img/favicon/android-icon-96x96.png differ diff --git a/admin/img/favicon/apple-icon-114x114.png b/admin/img/favicon/apple-icon-114x114.png new file mode 100644 index 0000000..12f42e1 Binary files /dev/null and b/admin/img/favicon/apple-icon-114x114.png differ diff --git a/admin/img/favicon/apple-icon-120x120.png b/admin/img/favicon/apple-icon-120x120.png new file mode 100644 index 0000000..cababd5 Binary files /dev/null and b/admin/img/favicon/apple-icon-120x120.png differ diff --git a/admin/img/favicon/apple-icon-144x144.png b/admin/img/favicon/apple-icon-144x144.png new file mode 100644 index 0000000..89f9182 Binary files /dev/null and b/admin/img/favicon/apple-icon-144x144.png differ diff --git a/admin/img/favicon/apple-icon-152x152.png b/admin/img/favicon/apple-icon-152x152.png new file mode 100644 index 0000000..3843942 Binary files /dev/null and b/admin/img/favicon/apple-icon-152x152.png differ diff --git a/admin/img/favicon/apple-icon-180x180.png b/admin/img/favicon/apple-icon-180x180.png new file mode 100644 index 0000000..363c190 Binary files /dev/null and b/admin/img/favicon/apple-icon-180x180.png differ diff --git a/admin/img/favicon/apple-icon-57x57.png b/admin/img/favicon/apple-icon-57x57.png new file mode 100644 index 0000000..00952f2 Binary files /dev/null and b/admin/img/favicon/apple-icon-57x57.png differ diff --git a/admin/img/favicon/apple-icon-60x60.png b/admin/img/favicon/apple-icon-60x60.png new file mode 100644 index 0000000..60589f6 Binary files /dev/null and b/admin/img/favicon/apple-icon-60x60.png differ diff --git a/admin/img/favicon/apple-icon-72x72.png b/admin/img/favicon/apple-icon-72x72.png new file mode 100644 index 0000000..bde7f5f Binary files /dev/null and b/admin/img/favicon/apple-icon-72x72.png differ diff --git a/admin/img/favicon/apple-icon-76x76.png b/admin/img/favicon/apple-icon-76x76.png new file mode 100644 index 0000000..0dedab8 Binary files /dev/null and b/admin/img/favicon/apple-icon-76x76.png differ diff --git a/admin/img/favicon/apple-icon-precomposed.png b/admin/img/favicon/apple-icon-precomposed.png new file mode 100644 index 0000000..01c2cfc Binary files /dev/null and b/admin/img/favicon/apple-icon-precomposed.png differ diff --git a/admin/img/favicon/apple-icon.png b/admin/img/favicon/apple-icon.png new file mode 100644 index 0000000..01c2cfc Binary files /dev/null and b/admin/img/favicon/apple-icon.png differ diff --git a/admin/img/favicon/browserconfig.xml b/admin/img/favicon/browserconfig.xml new file mode 100644 index 0000000..c554148 --- /dev/null +++ b/admin/img/favicon/browserconfig.xml @@ -0,0 +1,2 @@ + +#ffffff \ No newline at end of file diff --git a/admin/img/favicon/favicon-16x16.png b/admin/img/favicon/favicon-16x16.png new file mode 100644 index 0000000..82491e2 Binary files /dev/null and b/admin/img/favicon/favicon-16x16.png differ diff --git a/admin/img/favicon/favicon-32x32.png b/admin/img/favicon/favicon-32x32.png new file mode 100644 index 0000000..9a97d71 Binary files /dev/null and b/admin/img/favicon/favicon-32x32.png differ diff --git a/admin/img/favicon/favicon-96x96.png b/admin/img/favicon/favicon-96x96.png new file mode 100644 index 0000000..aa085fe Binary files /dev/null and b/admin/img/favicon/favicon-96x96.png differ diff --git a/admin/img/favicon/favicon.ico b/admin/img/favicon/favicon.ico new file mode 100644 index 0000000..c15bc10 Binary files /dev/null and b/admin/img/favicon/favicon.ico differ diff --git a/admin/img/favicon/manifest.json b/admin/img/favicon/manifest.json new file mode 100644 index 0000000..dd3947d --- /dev/null +++ b/admin/img/favicon/manifest.json @@ -0,0 +1,40 @@ +{ + "name": "OldBell", + "icons": [ + { + "src": "android-icon-36x36.png", + "sizes": "36x36", + "type": "image/png" + }, + { + "src": "android-icon-48x48.png", + "sizes": "48x48", + "type": "image/png" + }, + { + "src": "android-icon-72x72.png", + "sizes": "72x72", + "type": "image/png" + }, + { + "src": "android-icon-96x96.png", + "sizes": "96x96", + "type": "image/png" + }, + { + "src": "android-icon-144x144.png", + "sizes": "144x144", + "type": "image/png" + }, + { + "src": "android-icon-192x192.png", + "sizes": "192x192", + "type": "image/png" + } + ], + "lang": "fr-FR", + "start_url": "http://dks-laptop/oldbell_lu/index.html", + "display": "standalone", + "background_color": "white", + "theme_color": "white" +} \ No newline at end of file diff --git a/admin/img/favicon/ms-icon-144x144.png b/admin/img/favicon/ms-icon-144x144.png new file mode 100644 index 0000000..dabb8ae Binary files /dev/null and b/admin/img/favicon/ms-icon-144x144.png differ diff --git a/admin/img/favicon/ms-icon-150x150.png b/admin/img/favicon/ms-icon-150x150.png new file mode 100644 index 0000000..2392f7b Binary files /dev/null and b/admin/img/favicon/ms-icon-150x150.png differ diff --git a/admin/img/favicon/ms-icon-310x310.png b/admin/img/favicon/ms-icon-310x310.png new file mode 100644 index 0000000..156de84 Binary files /dev/null and b/admin/img/favicon/ms-icon-310x310.png differ diff --git a/admin/img/favicon/ms-icon-70x70.png b/admin/img/favicon/ms-icon-70x70.png new file mode 100644 index 0000000..c604174 Binary files /dev/null and b/admin/img/favicon/ms-icon-70x70.png differ diff --git a/admin/img/logo_512.png b/admin/img/logo_512.png new file mode 100644 index 0000000..37e2068 Binary files /dev/null and b/admin/img/logo_512.png differ diff --git a/admin/img/potbg.jpg b/admin/img/potbg.jpg new file mode 100644 index 0000000..5167072 Binary files /dev/null and b/admin/img/potbg.jpg differ diff --git a/admin/img/poticon512.png b/admin/img/poticon512.png new file mode 100644 index 0000000..bce391c Binary files /dev/null and b/admin/img/poticon512.png differ diff --git a/admin/img/potlogowhite.svg b/admin/img/potlogowhite.svg new file mode 100644 index 0000000..7c2ec3b --- /dev/null +++ b/admin/img/potlogowhite.svg @@ -0,0 +1,133 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/admin/img/pottop.png b/admin/img/pottop.png new file mode 100644 index 0000000..5f159c5 Binary files /dev/null and b/admin/img/pottop.png differ diff --git a/admin/img/toplogo.png b/admin/img/toplogo.png new file mode 100644 index 0000000..37e2068 Binary files /dev/null and b/admin/img/toplogo.png differ diff --git a/admin/index.php b/admin/index.php new file mode 100644 index 0000000..1ae2770 --- /dev/null +++ b/admin/index.php @@ -0,0 +1,121 @@ + 0){ + for ($i=0;$i<$abslen;$i++){ + $vars["abspath"] .= "../"; + } + + } + $vars["contenttype"] = "text/html"; + if (substr($vars["page"],-3) == "css"){ + $vars["contenttype"] = "text/css"; + } elseif (substr($vars["page"],-2) == "js"){ + $vars["contenttype"] = "text/javascript"; + } + + $vars["sid"] = ""; + if (isset($_COOKIE[$cfg["cookie"]])){ + $vars["sid"] = $_COOKIE[$cfg["cookie"]]; + } + $db = new database($cfg["db"]); + $sess = new session($db); + $vars["session"] = array(); + if ($vars["sid"] != ""){ + $vars["session"] = $sess->getSession($vars["sid"]); + } + if (count($postdata) > 0){ + if (isset($postdata["btnlogin"])){ + $vars["session"] = $sess->checkLogin($postdata["login"],$postdata["password"]); + //setcookie( $name, $value, $expire, $path, $domain, $secure, $httponly ) + setcookie($cfg["cookie"], $vars["session"]["id_session"], null, "/", null, false, true ); + } + } + if(count($vars["session"]) == 0) { + $vars["skeleton"] = 'login.html'; + if (($vars["page"] != 'login/forgotpassword.html') && ($vars["page"] != 'login/message.html')){ + $vars["page"] = 'login/login.html'; + } + } + + if (($vars["skeleton"] != 'login.html') && (!file_exists($cfg["templatepath"].'/pages/'.$vars["page"].'.mustache'))){ + if (substr($vars["page"],0,5) == "login"){ + $vars["page"] = "home.html"; + } else { + $vars["origpage"] =$vars["page"]; + $vars["page"] = 'error.html'; + } + + // $vars["skeleton"] = 'login.html'; + // $vars["page"] = 'login/login.html'; + } + if (file_exists($cfg["templatepath"].'/pages/'.$vars["page"].'.json')){ + + $tmpdata = file_get_contents($cfg["templatepath"].'/pages/'.$vars["page"].'.json'); + try { + $vars["data"] = json_decode($tmpdata,true); + foreach ($vars["data"] as $key => $value) { + if ($value["sql"]){ + if ($value["sqltype"] == "query"){ + $vars["data"][$key] = $db->query($value["sql"]); + } elseif ($value["sqltype"] == "queryarray"){ + $vars["data"][$key] = $db->queryarray($value["sql"]); + } + } + } + } catch(JsonException $je){ + error_log("JSON ERROR: ".$je->getMessage()); + } + + } + header('Content-Type: '.$vars["contenttype"]); + $vars["page"] = 'pages/'.$vars["page"]; + $m = new Mustache_Engine(array( + 'loader' => new Mustache_Loader_FilesystemLoader($cfg["templatepath"]), + 'partials_loader' => new Mustache_Loader_FilesystemLoader($cfg["templatepath"].'/blocks'), + 'escape' => function($value) { + return $value; + }, + 'entity_flags' => ENT_HTML5 + )); + if ($vars["contenttype"] == "text/html"){ + $vars["pagedata"] = $m->render($vars["page"],$vars); + $mainsite = $m->render($vars['skeleton'],$vars); + echo $mainsite; + $vars["pagedata"]= ""; + } else { + $mainsite = $m->render($vars["page"],$vars); + echo $mainsite; + } + + echo "
".print_r($vars)."
"; +?> \ No newline at end of file diff --git a/admin/js/app.js b/admin/js/app.js new file mode 100644 index 0000000..0677538 --- /dev/null +++ b/admin/js/app.js @@ -0,0 +1,78 @@ +let myapp = { + loadpage: function(modulepage, modulename) { + location.href=modulepage; + }, + togglemenu: function (idmenu){ + var mnu = document.getElementById(idmenu); + if (mnu.style.display == 'none'){ + mnu.style.display = 'block'; + } else { + mnu.style.display = 'none'; + } + }, + logout: function() { + postData(location.href, { "logout": "1" }).then (data => { location.href = 'login.html';}); + }, + reloadpage() { }, + changedataset: function(){}, + getCurrentSchemata: function(){ + return schemata; + }, + changedataset: function(){ + let csel = document.getElementById("current_schemata").value; + schemata = csel; + postData("db.cgi",{"fn":"setsessiondata","params":{"schemata":csel}}).then(data => { + document.getElementById("current_schemata").dataset.selected = csel; + }); + }, + setschemata(data){ + }, + reload_page: function() { + location.href = location.href; + }, + viewpanel: function(pnlname){ + let panels = document.getElementsByClassName("panel"); + let toolbars = document.getElementsByClassName("paneltoolbar"); + currentview = pnlname; + for (let p=0;p { + if (aftercallback){ + aftercallback(data.result); + form.formsaved({}); + } else { + form.formsaved(data.result); + } + }); + return false; +}, +saveformdata: function(flds,aftercallback,clientschema){ + flds["fn"] ="saveform"; + flds["schemata"]=clientschema; + if (clientschema == null){ + flds["schemata"]=schemata; + } + delete flds["null"]; + postData("db.cgi",flds).then(data => { + if (aftercallback){ + aftercallback(data.result); + form.formsaved({}); + } else { + form.formsaved(data.result); + } + }); + return false; +}, +formsaved: function(data){ + var sb = document.getElementById("snackbar"); + sb.className="show green"; + sb.innerHTML = 'Les données ont été sauvegardées!'; + setTimeout(function(){ sb.className = sb.className.replace("show green", ""); }, 3000); + return false; +}, +getformcontent: function(frmid,dataflds){ + var frm = document.getElementById("frm_" + frmid); + var flds = {}; + // if (dataflds){ + // flds = dataflds; + // } + for (var i = 0; i < frm.elements.length; i++) { + var field = frm.elements[i]; + if ((field.getAttribute("name") != 'null') && (field.tagName == "INPUT" || field.tagName == "SELECT" || field.tagName == "TEXTAREA")){ + if (field.classList.contains("tagedit")){ + var fvalue=field.value.trim(); + var ndata = null; + if (fvalue != ""){ + ndata = fvalue.split(","); + } + flds[field.getAttribute("name")] = ndata; + }else if (field.tagName == "TEXTAREA" ){ + if (field.classList.contains("richeditarea")){ + flds[field.getAttribute("name")] = tinymce.get(field.id).getContent(); + } else { + flds[field.getAttribute("name")] = field.innerHTML; + } + }else if (field.type == "checkbox" ){ + if (field.checked){ + flds[field.getAttribute("name")] = "1"; + } else { + flds[field.getAttribute("name")] = ""; + } + } + else if (field.tagName == "SELECT" && field.multiple == true){ + flds[field.getAttribute("name")] = dataflds[field.getAttribute("id")].selected(); + } + else if (field.tagName == "SELECT"){ + flds[field.getAttribute("name")] = dataflds[field.getAttribute("id")].selected(); + } + else { + flds[field.getAttribute("name")] = field.value; + } + } + } + return flds; +}, +cleanform: function(frmname){ + var frm = document.getElementById("frm_" + frmname); + for (var f in frm){ + if (frm[f] && frm[f].id){ + if (frm[f].tagName == 'INPUT'){ + if (frm[f].type == "checkbox"){ + frm[f].checked = false; + } else if (frm[f].classList.contains("datefield")){ + if (frm[f]._flatpickr){ frm[f]._flatpickr.clear(); } + } + // else if (frm[f].classList.contains("choices__input")){ + // if (choice[frmname][frm[f].id]){ + // choice[frmname][frm[f].id].removeActiveItems(); + // } + // } + else { + frm[f].value = ""; + } + } + if (frm[f].tagName == 'SELECT'){ + if (frm[f].multiple == true){ + if (frm[f].classList.contains("choices__input")){ + choice[frmname][frm[f].id].removeActiveItems(); + } + } else { + frm[f].value = ""; + } + + } + if (frm[f].tagName == 'TEXTAREA'){ + if (frm[f].classList.contains("richeditarea")){ + tinymce.get(frm[f].id).setContent(""); + } else { + frm[f].innerHTML = ""; + } + } + } + } + return false; +}, +cleanform2: function(frmname,choices){ + var frm = document.getElementById("frm_" + frmname); + for (var f in frm){ + if (frm[f] && frm[f].id){ + if (frm[f].tagName == 'INPUT'){ + if (frm[f].type == "checkbox"){ + frm[f].checked = false; + } else if (frm[f].classList.contains("datefield")){ + if (frm[f]._flatpickr){ frm[f]._flatpickr.clear(); } + } + // else if (frm[f].classList.contains("choices__input")){ + // if (choices[frm[f].id]){ + // choices[frm[f].id].removeActiveItems(); + // } + // } + else { + frm[f].value = ""; + } + } + if (frm[f].tagName == 'SELECT'){ + if (frm[f].multiple == true){ + if (frm[f].classList.contains("choices__input")){ + choices[frm[f].id].removeActiveItems(); + } + } else { + frm[f].value = ""; + } + + } + if (frm[f].tagName == 'TEXTAREA'){ + if (frm[f].classList.contains("richeditarea")){ + tinymce.get(frm[f].id).setContent(""); + } else { + frm[f].innerHTML = ""; + } + } + } + } + return false; +}, +fillformbydataclass2: function(dataclass,choices,data,onblur){ + var frm = document.getElementsByClassName('data_'+ dataclass); + //console.log("frmdata",frm); + if (data){ + for (var f in frm){ + //console.log("field",frm[f].id); + if (frm[f].id){ + frm[f].dataset.id=data['id']; + } + if (data[frm[f].id]){ + + if (frm[f].tagName == 'INPUT'){ + if (frm[f].type == "checkbox"){ + if (data[frm[f].id] == "1"){ + frm[f].checked = true; + } else { + frm[f].checked = false; + } + } + else if (frm[f].classList.contains("datefield")){ + frm[f]._flatpickr.setDate(data[frm[f].id]); + } + else if (frm[f].classList.contains("timefield")){ + frm[f].value = timecalc.StringToTime(data[frm[f].id]); + } + else { + frm[f].value=data[frm[f].id]; + } + } + if (frm[f].tagName == 'SELECT'){ + if (frm[f].multiple == true){ + + choices[frm[f].id].set(JSON.parse(data[frm[f].id])); + } else { + frm[f].value=data[frm[f].id]; + } + } + } + } + } +}, +fillselectlist: function(obj,data,vidcol,vvalcol){ + var sellist = []; + let csel = obj.value; + if (data){ + for (var i in data){ + sellist.push({value:data[i][vidcol],text:data[i][vvalcol]}); + } + } + obj.setData(sellist); + if (obj.select.element.dataset.selected && obj.select.element.dataset.selected != ""){ + obj.set(obj.select.element.dataset.selected); + } + return false; +}, +savefield: function(obj,callback){ + fdata = obj.dataset; + fdata["save"] = "field"; + fdata["schemata"] = schemata; + if (obj.tagName == 'INPUT' || obj.tagName == 'SELECT' || obj.tagName == 'TEXTAREA'){ + if (obj.type == 'checkbox' || obj.type == 'radio'){ + if (obj.checked == true){ + fdata["value"] = 1; + } else { + fdata["value"] = null; + } + }else { + fdata["value"] = obj.value; + } + } + postData("db.cgi",fdata).then(data => { if (callback){callback(data);}}); + return false; +}, +saveschemafield: function(obj,schema){ + fdata = obj.dataset; + fdata["save"] = "field"; + fdata["schemata"] = schema; + if (obj.tagName == 'INPUT' || obj.tagName == 'SELECT' || obj.tagName == 'TEXTAREA'){ + if (obj.type == 'checkbox' || obj.type == 'radio'){ + if (obj.checked == true){ + fdata["value"] = 1; + } else { + fdata["value"] = null; + } + }else { + fdata["value"] = obj.value; + } + } + postData("db.cgi",fdata).then(data => { }); + return false; +}, +cleanfield: function(objid){ + document.getElementById(objid).value=''; +} + + +} \ No newline at end of file diff --git a/admin/js/modules/galleries.js b/admin/js/modules/galleries.js new file mode 100644 index 0000000..5869ce1 --- /dev/null +++ b/admin/js/modules/galleries.js @@ -0,0 +1,20 @@ +let galleries = { + tbl: null, + init: function(){ + console.log("Init Galleries!"); + galleries.tbl= new Tabulator("#tbl_galleries",{ + height: "calc(100vh - 60px)", + layout: "fitColumns", + responsiveLayout:true, + selectable: 1, + rowContext:function(e, row){ e.preventDefault(); }, + columns: [ + {title: "Gallerie", field: "name"}, + ] + }); + galleries.gettbldata(); + }, + gettbldata: function(){ + // postData() + } +} \ No newline at end of file diff --git a/website/js/vendor/flatpickr/utils/polyfills.d.ts b/admin/js/modules/home.js similarity index 100% rename from website/js/vendor/flatpickr/utils/polyfills.d.ts rename to admin/js/modules/home.js diff --git a/admin/js/modules/rendezvous.js b/admin/js/modules/rendezvous.js new file mode 100644 index 0000000..e69de29 diff --git a/admin/js/modules/shop.js b/admin/js/modules/shop.js new file mode 100644 index 0000000..e69de29 diff --git a/admin/js/modules/users.js b/admin/js/modules/users.js new file mode 100644 index 0000000..e69de29 diff --git a/admin/js/modules/websites.js b/admin/js/modules/websites.js new file mode 100644 index 0000000..e69de29 diff --git a/admin/js/report.js b/admin/js/report.js new file mode 100644 index 0000000..97733df --- /dev/null +++ b/admin/js/report.js @@ -0,0 +1,13 @@ +var report ={ + generate: function(repname,filename,data){ + showdataloaddlg("Création PDF encours","Attendez s.v.p.");//closedataloaddlg(); + postData("report.cgi",{"generate":repname,"file": filename + ".pdf","data":data}).then(data => {closedataloaddlg();;report.openreport(data.result)}).catch(e => {closedataloaddlg();}); + return false; + }, + openreport(data){ + + if (data && data.file){ + window.open(api + "report.cgi?open=" + encodeURIComponent(data.file)); + } + } +} \ No newline at end of file diff --git a/admin/js/request.js b/admin/js/request.js new file mode 100644 index 0000000..bf0a98f --- /dev/null +++ b/admin/js/request.js @@ -0,0 +1,56 @@ +var api = location.origin + location.pathname.substring(0,location.pathname.lastIndexOf('/')) + '/'; +console.log(api); +// var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){var t="";var n,r,i,s,o,u,a;var f=0;e=Base64._utf8_encode(e);while(f>2;o=(n&3)<<4|r>>4;u=(r&15)<<2|i>>6;a=i&63;if(isNaN(r)){u=a=64}else if(isNaN(i)){a=64}t=t+this._keyStr.charAt(s)+this._keyStr.charAt(o)+this._keyStr.charAt(u)+this._keyStr.charAt(a)}return t},decode:function(e){var t="";var n,r,i;var s,o,u,a;var f=0;e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(f>4;r=(o&15)<<4|u>>2;i=(u&3)<<6|a;t=t+String.fromCharCode(n);if(u!=64){t=t+String.fromCharCode(r)}if(a!=64){t=t+String.fromCharCode(i)}}t=Base64._utf8_decode(t);return t},_utf8_encode:function(e){e=e.replace(/\r\n/g,"\n");var t="";for(var n=0;n127&&r<2048){t+=String.fromCharCode(r>>6|192);t+=String.fromCharCode(r&63|128)}else{t+=String.fromCharCode(r>>12|224);t+=String.fromCharCode(r>>6&63|128);t+=String.fromCharCode(r&63|128)}}return t},_utf8_decode:function(e){var t="";var n=0;var r=c1=c2=0;while(n191&&r<224){c2=e.charCodeAt(n+1);t+=String.fromCharCode((r&31)<<6|c2&63);n+=2}else{c2=e.charCodeAt(n+1);c3=e.charCodeAt(n+2);t+=String.fromCharCode((r&15)<<12|(c2&63)<<6|c3&63);n+=3}}return t}} + +async function postData(url = '', data = {}) { + const response = await fetch(api + url, { + method: 'POST', + mode: 'same-origin', + cache: 'no-cache', + credentials: 'same-origin', + headers: { + 'Content-Type': 'application/json' + + }, + redirect: 'follow', + referrerPolicy: 'strict-origin', + body: JSON.stringify(data) + }); + + return response.json(); +} + +// var report ={ +// generate: function(repname,filename,data){ +// showdataloaddlg("Création PDF encours","Attendez s.v.p."); +// postData("report.cgi",{"generate":repname,"file": filename + ".pdf","data":data}).then (data => {closedataloaddlg();report.openreport(data);}); +// return false; +// }, +// openreport(data){ +// if (data && data.file){ +// window.open(api + "report.cgi?open=" + encodeURIComponent(data.file)); +// } +// } +// } + +// async function syncData(url,username,password, data = {}) { +// //var decodedString = Base64.decode(encodedString); +// let hh = {}; +// hh['Content-Type'] = 'application/json'; +// if ((username != null) && (username != '')){ +// hh['Authorization'] = Base64.encode(username + ":" + password); +// } +// const response = await fetch(url, { +// method: 'POST', +// mode: 'cors', +// cache: 'no-cache', +// credentials: 'omit', +// headers: hh, +// redirect: 'follow', +// referrerPolicy: 'strict-origin', +// body: JSON.stringify(data) +// }); + +// return response.json(); +// } + diff --git a/admin/js/timecalc.js b/admin/js/timecalc.js new file mode 100644 index 0000000..72425a2 --- /dev/null +++ b/admin/js/timecalc.js @@ -0,0 +1,128 @@ +let timecalc = { + MinutesToTime:function (minutes) { + minutes = parseInt(minutes); + if ((minutes == null) || (minutes == 0)){ return "00:00";}; + let hours = parseInt(minutes/60); + + let restminutes = minutes-(hours*60); + // console.log(hours + " : " + restminutes); + return timecalc.lpad(hours,2,'0') + ":"+ timecalc.lpad(restminutes,2,'0'); + }, + TimeToMinutes:function (strtime){ + let hours = parseInt(strtime.substring(0,2)) * 60; + let minutes = parseInt(strtime.substring(3,5)); + return hours+minutes; + }, + lpad: function(str, length,padString) { + let xstr = str.toString(); + while (xstr.length < length){xstr = padString + xstr}; + return xstr; + }, + mondayBefore: function(sdate){ + if (sdate == null){ + sdate=new Date(); + } + let day = sdate.getDay(); + let prevMonday = new Date(); + if(sdate.getDay() == 0){ + prevMonday = new Date().setDate(sdate.getDate() - 0); + } + else{ + prevMonday = new Date().setDate(sdate.getDate() - day); + } + return new Date(prevMonday); + }, + sundayAfter: function(sdate){ + let nextSunday = new Date(); + }, + StringToTime: function(strin){ + strin = strin.toString().substring(0,5); + strin = strin.replace(/\D/g,''); + //console.log("StT:",strin); + if (strin.length == 0){ return "";} + if (strin.length <= 2){ + if (strin > "23") {return ""} else { + //console.log("xtime",timecalc.lpad(strin,2,'0')+":00"); + return timecalc.lpad(strin,2,'0')+":00"; + } + } else if (strin.length == 3){ + let hours = strin.substring(0,1); + let minutes = strin.substring(1,3); + if (minutes > "59"){ return "";} + return timecalc.lpad(hours,2,'0')+ ":"+ timecalc.lpad(minutes,2,'0'); + } else if (strin.length == 4){ + let hours = strin.substring(0,2); + let minutes = strin.substring(2,4); + if ((hours > "23") || (minutes > "59")){return "";} + return timecalc.lpad(hours,2,'0')+ ":"+ timecalc.lpad(minutes,2,'0'); + } + return ""; + }, + StringToInterval: function(strin){ + let minus = ""; + if (strin.startsWith('-')){ + minus = '-'; + } + if (strin.indexOf(":") > 0){ + let spl = strin.split(":"); + hours = spl[0].replace(/\D/g,''); + if (hours == ""){ + hours = "0"; + } + minutes = spl[1].replace(/\D/g,''); + if (minutes > "59"){ + minutes = "0"; + } + return minus + hours + ":" + timecalc.lpad(minutes,2,'0'); + } + if (strin == ""){ return "";} + strin = strin.replace(/\D/g,''); + return minus + strin + ":00"; + + }, + MinutesToInterval: function(minutes){ + if ((minutes == null) || (minutes == "")){ return "0:00";} + let prep =""; + if (minutes < 0){ + prep = "-"; + minutes = minutes * -1; + } + let hours = parseInt(minutes/60); + let restminutes = minutes-(hours*60); + restminutes = Math.round(restminutes); + return prep+hours+ ":"+ timecalc.lpad(restminutes,2,'0'); + }, + IntervalToMinutes: function(strin){ + if (strin == "" || strin == null){ + return 0; + } + let mult = 1; + if (strin.startsWith("-")){ + mult = -1; + strin = strin.replace(/-/g,''); + } + let spl = strin.split(":"); + let hours = parseInt(spl[0]) * 60; + let minutes = parseInt(spl[1]); + return (hours+minutes) * mult; + }, + validateTime(obj){ + obj.value = timecalc.StringToTime(obj.value); + return false; + }, + validateInterval(obj){ + obj.value = timecalc.StringToInterval(obj.value); + return false; + }, + copyInterval(obj,idobjout,factor){ + if (factor){ + let mval = timecalc.IntervalToMinutes(obj.value) * factor; + document.getElementById(idobjout).value = timecalc.MinutesToInterval(mval); + }else { + document.getElementById(idobjout).value=obj.value; + } + if (document.getElementById(idobjout).value == '0:00'){ + document.getElementById(idobjout).value = ''; + } + } +} diff --git a/website/js/vendor/flatpickr/flatpickr.css b/admin/js/vendors/flatpickr/flatpickr.css similarity index 100% rename from website/js/vendor/flatpickr/flatpickr.css rename to admin/js/vendors/flatpickr/flatpickr.css diff --git a/website/js/vendor/flatpickr/flatpickr.js b/admin/js/vendors/flatpickr/flatpickr.js similarity index 99% rename from website/js/vendor/flatpickr/flatpickr.js rename to admin/js/vendors/flatpickr/flatpickr.js index 59bb267..a94e6ac 100644 --- a/website/js/vendor/flatpickr/flatpickr.js +++ b/admin/js/vendors/flatpickr/flatpickr.js @@ -5,38 +5,38 @@ (global = global || self, global.flatpickr = factory()); }(this, (function () { 'use strict'; - /*! ***************************************************************************** - Copyright (c) Microsoft Corporation. - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. - ***************************************************************************** */ - - var __assign = function() { - __assign = Object.assign || function __assign(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); - }; - - function __spreadArrays() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; + /*! ***************************************************************************** + Copyright (c) Microsoft Corporation. + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + ***************************************************************************** */ + + var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); + }; + + function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; } var HOOKS = [ diff --git a/website/js/vendor/flatpickr/flatpickr.min.css b/admin/js/vendors/flatpickr/flatpickr.min.css similarity index 100% rename from website/js/vendor/flatpickr/flatpickr.min.css rename to admin/js/vendors/flatpickr/flatpickr.min.css diff --git a/website/js/vendor/flatpickr/flatpickr.min.js b/admin/js/vendors/flatpickr/flatpickr.min.js similarity index 100% rename from website/js/vendor/flatpickr/flatpickr.min.js rename to admin/js/vendors/flatpickr/flatpickr.min.js diff --git a/website/js/vendor/flatpickr/ie.css b/admin/js/vendors/flatpickr/ie.css similarity index 100% rename from website/js/vendor/flatpickr/ie.css rename to admin/js/vendors/flatpickr/ie.css diff --git a/website/js/vendor/flatpickr/index.d.ts b/admin/js/vendors/flatpickr/index.d.ts similarity index 100% rename from website/js/vendor/flatpickr/index.d.ts rename to admin/js/vendors/flatpickr/index.d.ts diff --git a/website/js/vendor/flatpickr/l10n/de.d.ts b/admin/js/vendors/flatpickr/l10n/de.d.ts similarity index 100% rename from website/js/vendor/flatpickr/l10n/de.d.ts rename to admin/js/vendors/flatpickr/l10n/de.d.ts diff --git a/website/js/vendor/flatpickr/l10n/de.js b/admin/js/vendors/flatpickr/l10n/de.js similarity index 100% rename from website/js/vendor/flatpickr/l10n/de.js rename to admin/js/vendors/flatpickr/l10n/de.js diff --git a/website/js/vendor/flatpickr/l10n/default.d.ts b/admin/js/vendors/flatpickr/l10n/default.d.ts similarity index 100% rename from website/js/vendor/flatpickr/l10n/default.d.ts rename to admin/js/vendors/flatpickr/l10n/default.d.ts diff --git a/website/js/vendor/flatpickr/l10n/default.js b/admin/js/vendors/flatpickr/l10n/default.js similarity index 100% rename from website/js/vendor/flatpickr/l10n/default.js rename to admin/js/vendors/flatpickr/l10n/default.js diff --git a/website/js/vendor/flatpickr/l10n/fr.d.ts b/admin/js/vendors/flatpickr/l10n/fr.d.ts similarity index 100% rename from website/js/vendor/flatpickr/l10n/fr.d.ts rename to admin/js/vendors/flatpickr/l10n/fr.d.ts diff --git a/website/js/vendor/flatpickr/l10n/fr.js b/admin/js/vendors/flatpickr/l10n/fr.js similarity index 100% rename from website/js/vendor/flatpickr/l10n/fr.js rename to admin/js/vendors/flatpickr/l10n/fr.js diff --git a/website/js/vendor/flatpickr/l10n/index.d.ts b/admin/js/vendors/flatpickr/l10n/index.d.ts similarity index 100% rename from website/js/vendor/flatpickr/l10n/index.d.ts rename to admin/js/vendors/flatpickr/l10n/index.d.ts diff --git a/website/js/vendor/flatpickr/l10n/index.js b/admin/js/vendors/flatpickr/l10n/index.js similarity index 100% rename from website/js/vendor/flatpickr/l10n/index.js rename to admin/js/vendors/flatpickr/l10n/index.js diff --git a/website/js/vendor/flatpickr/plugins/confirmDate/confirmDate.css b/admin/js/vendors/flatpickr/plugins/confirmDate/confirmDate.css similarity index 100% rename from website/js/vendor/flatpickr/plugins/confirmDate/confirmDate.css rename to admin/js/vendors/flatpickr/plugins/confirmDate/confirmDate.css diff --git a/website/js/vendor/flatpickr/plugins/confirmDate/confirmDate.d.ts b/admin/js/vendors/flatpickr/plugins/confirmDate/confirmDate.d.ts similarity index 100% rename from website/js/vendor/flatpickr/plugins/confirmDate/confirmDate.d.ts rename to admin/js/vendors/flatpickr/plugins/confirmDate/confirmDate.d.ts diff --git a/website/js/vendor/flatpickr/plugins/confirmDate/confirmDate.js b/admin/js/vendors/flatpickr/plugins/confirmDate/confirmDate.js similarity index 99% rename from website/js/vendor/flatpickr/plugins/confirmDate/confirmDate.js rename to admin/js/vendors/flatpickr/plugins/confirmDate/confirmDate.js index 9f8379e..8c55a4e 100644 --- a/website/js/vendor/flatpickr/plugins/confirmDate/confirmDate.js +++ b/admin/js/vendors/flatpickr/plugins/confirmDate/confirmDate.js @@ -4,30 +4,30 @@ (global = global || self, global.confirmDatePlugin = factory()); }(this, (function () { 'use strict'; - /*! ***************************************************************************** - Copyright (c) Microsoft Corporation. - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. - ***************************************************************************** */ - - var __assign = function() { - __assign = Object.assign || function __assign(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); + /*! ***************************************************************************** + Copyright (c) Microsoft Corporation. + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + ***************************************************************************** */ + + var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); }; function getEventTarget(event) { diff --git a/website/js/vendor/flatpickr/plugins/labelPlugin/labelPlugin.d.ts b/admin/js/vendors/flatpickr/plugins/labelPlugin/labelPlugin.d.ts similarity index 100% rename from website/js/vendor/flatpickr/plugins/labelPlugin/labelPlugin.d.ts rename to admin/js/vendors/flatpickr/plugins/labelPlugin/labelPlugin.d.ts diff --git a/website/js/vendor/flatpickr/plugins/labelPlugin/labelPlugin.js b/admin/js/vendors/flatpickr/plugins/labelPlugin/labelPlugin.js similarity index 100% rename from website/js/vendor/flatpickr/plugins/labelPlugin/labelPlugin.js rename to admin/js/vendors/flatpickr/plugins/labelPlugin/labelPlugin.js diff --git a/website/js/vendor/flatpickr/plugins/minMaxTimePlugin.d.ts b/admin/js/vendors/flatpickr/plugins/minMaxTimePlugin.d.ts similarity index 100% rename from website/js/vendor/flatpickr/plugins/minMaxTimePlugin.d.ts rename to admin/js/vendors/flatpickr/plugins/minMaxTimePlugin.d.ts diff --git a/website/js/vendor/flatpickr/plugins/minMaxTimePlugin.js b/admin/js/vendors/flatpickr/plugins/minMaxTimePlugin.js similarity index 100% rename from website/js/vendor/flatpickr/plugins/minMaxTimePlugin.js rename to admin/js/vendors/flatpickr/plugins/minMaxTimePlugin.js diff --git a/website/js/vendor/flatpickr/plugins/momentPlugin.d.ts b/admin/js/vendors/flatpickr/plugins/momentPlugin.d.ts similarity index 100% rename from website/js/vendor/flatpickr/plugins/momentPlugin.d.ts rename to admin/js/vendors/flatpickr/plugins/momentPlugin.d.ts diff --git a/website/js/vendor/flatpickr/plugins/momentPlugin.js b/admin/js/vendors/flatpickr/plugins/momentPlugin.js similarity index 100% rename from website/js/vendor/flatpickr/plugins/momentPlugin.js rename to admin/js/vendors/flatpickr/plugins/momentPlugin.js diff --git a/website/js/vendor/flatpickr/plugins/monthSelect/index.d.ts b/admin/js/vendors/flatpickr/plugins/monthSelect/index.d.ts similarity index 100% rename from website/js/vendor/flatpickr/plugins/monthSelect/index.d.ts rename to admin/js/vendors/flatpickr/plugins/monthSelect/index.d.ts diff --git a/website/js/vendor/flatpickr/plugins/monthSelect/index.js b/admin/js/vendors/flatpickr/plugins/monthSelect/index.js similarity index 99% rename from website/js/vendor/flatpickr/plugins/monthSelect/index.js rename to admin/js/vendors/flatpickr/plugins/monthSelect/index.js index 3e140a4..87f7629 100644 --- a/website/js/vendor/flatpickr/plugins/monthSelect/index.js +++ b/admin/js/vendors/flatpickr/plugins/monthSelect/index.js @@ -4,30 +4,30 @@ (global = global || self, global.monthSelectPlugin = factory()); }(this, (function () { 'use strict'; - /*! ***************************************************************************** - Copyright (c) Microsoft Corporation. - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. - ***************************************************************************** */ - - var __assign = function() { - __assign = Object.assign || function __assign(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); + /*! ***************************************************************************** + Copyright (c) Microsoft Corporation. + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + ***************************************************************************** */ + + var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); }; var monthToStr = function (monthNumber, shorthand, locale) { return locale.months[shorthand ? "shorthand" : "longhand"][monthNumber]; }; diff --git a/website/js/vendor/flatpickr/plugins/monthSelect/style.css b/admin/js/vendors/flatpickr/plugins/monthSelect/style.css similarity index 100% rename from website/js/vendor/flatpickr/plugins/monthSelect/style.css rename to admin/js/vendors/flatpickr/plugins/monthSelect/style.css diff --git a/website/js/vendor/flatpickr/plugins/monthSelect/tests.spec.d.ts b/admin/js/vendors/flatpickr/plugins/monthSelect/tests.spec.d.ts similarity index 100% rename from website/js/vendor/flatpickr/plugins/monthSelect/tests.spec.d.ts rename to admin/js/vendors/flatpickr/plugins/monthSelect/tests.spec.d.ts diff --git a/website/js/vendor/flatpickr/plugins/rangePlugin.d.ts b/admin/js/vendors/flatpickr/plugins/rangePlugin.d.ts similarity index 100% rename from website/js/vendor/flatpickr/plugins/rangePlugin.d.ts rename to admin/js/vendors/flatpickr/plugins/rangePlugin.d.ts diff --git a/website/js/vendor/flatpickr/plugins/rangePlugin.js b/admin/js/vendors/flatpickr/plugins/rangePlugin.js similarity index 100% rename from website/js/vendor/flatpickr/plugins/rangePlugin.js rename to admin/js/vendors/flatpickr/plugins/rangePlugin.js diff --git a/website/js/vendor/flatpickr/plugins/scrollPlugin.d.ts b/admin/js/vendors/flatpickr/plugins/scrollPlugin.d.ts similarity index 100% rename from website/js/vendor/flatpickr/plugins/scrollPlugin.d.ts rename to admin/js/vendors/flatpickr/plugins/scrollPlugin.d.ts diff --git a/website/js/vendor/flatpickr/plugins/scrollPlugin.js b/admin/js/vendors/flatpickr/plugins/scrollPlugin.js similarity index 100% rename from website/js/vendor/flatpickr/plugins/scrollPlugin.js rename to admin/js/vendors/flatpickr/plugins/scrollPlugin.js diff --git a/website/js/vendor/flatpickr/plugins/weekSelect/weekSelect.d.ts b/admin/js/vendors/flatpickr/plugins/weekSelect/weekSelect.d.ts similarity index 100% rename from website/js/vendor/flatpickr/plugins/weekSelect/weekSelect.d.ts rename to admin/js/vendors/flatpickr/plugins/weekSelect/weekSelect.d.ts diff --git a/website/js/vendor/flatpickr/plugins/weekSelect/weekSelect.js b/admin/js/vendors/flatpickr/plugins/weekSelect/weekSelect.js similarity index 100% rename from website/js/vendor/flatpickr/plugins/weekSelect/weekSelect.js rename to admin/js/vendors/flatpickr/plugins/weekSelect/weekSelect.js diff --git a/website/js/vendor/flatpickr/themes/airbnb.css b/admin/js/vendors/flatpickr/themes/airbnb.css similarity index 100% rename from website/js/vendor/flatpickr/themes/airbnb.css rename to admin/js/vendors/flatpickr/themes/airbnb.css diff --git a/website/js/vendor/flatpickr/types/globals.d.ts b/admin/js/vendors/flatpickr/types/globals.d.ts similarity index 100% rename from website/js/vendor/flatpickr/types/globals.d.ts rename to admin/js/vendors/flatpickr/types/globals.d.ts diff --git a/website/js/vendor/flatpickr/types/instance.d.ts b/admin/js/vendors/flatpickr/types/instance.d.ts similarity index 100% rename from website/js/vendor/flatpickr/types/instance.d.ts rename to admin/js/vendors/flatpickr/types/instance.d.ts diff --git a/website/js/vendor/flatpickr/types/locale.d.ts b/admin/js/vendors/flatpickr/types/locale.d.ts similarity index 100% rename from website/js/vendor/flatpickr/types/locale.d.ts rename to admin/js/vendors/flatpickr/types/locale.d.ts diff --git a/website/js/vendor/flatpickr/types/options.d.ts b/admin/js/vendors/flatpickr/types/options.d.ts similarity index 100% rename from website/js/vendor/flatpickr/types/options.d.ts rename to admin/js/vendors/flatpickr/types/options.d.ts diff --git a/website/js/vendor/flatpickr/typings.d.ts b/admin/js/vendors/flatpickr/typings.d.ts similarity index 100% rename from website/js/vendor/flatpickr/typings.d.ts rename to admin/js/vendors/flatpickr/typings.d.ts diff --git a/website/js/vendor/flatpickr/utils/dates.d.ts b/admin/js/vendors/flatpickr/utils/dates.d.ts similarity index 100% rename from website/js/vendor/flatpickr/utils/dates.d.ts rename to admin/js/vendors/flatpickr/utils/dates.d.ts diff --git a/website/js/vendor/flatpickr/utils/dom.d.ts b/admin/js/vendors/flatpickr/utils/dom.d.ts similarity index 100% rename from website/js/vendor/flatpickr/utils/dom.d.ts rename to admin/js/vendors/flatpickr/utils/dom.d.ts diff --git a/website/js/vendor/flatpickr/utils/formatting.d.ts b/admin/js/vendors/flatpickr/utils/formatting.d.ts similarity index 100% rename from website/js/vendor/flatpickr/utils/formatting.d.ts rename to admin/js/vendors/flatpickr/utils/formatting.d.ts diff --git a/website/js/vendor/flatpickr/utils/index.d.ts b/admin/js/vendors/flatpickr/utils/index.d.ts similarity index 100% rename from website/js/vendor/flatpickr/utils/index.d.ts rename to admin/js/vendors/flatpickr/utils/index.d.ts diff --git a/admin/js/vendors/flatpickr/utils/polyfills.d.ts b/admin/js/vendors/flatpickr/utils/polyfills.d.ts new file mode 100644 index 0000000..e69de29 diff --git a/admin/js/vendors/moment/locales.js b/admin/js/vendors/moment/locales.js new file mode 100644 index 0000000..caabe6a --- /dev/null +++ b/admin/js/vendors/moment/locales.js @@ -0,0 +1,12105 @@ +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + //! moment.js locale configuration + + moment.defineLocale('af', { + months: 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'), + weekdays: 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split( + '_' + ), + weekdaysShort: 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'), + weekdaysMin: 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'), + meridiemParse: /vm|nm/i, + isPM: function (input) { + return /^nm$/i.test(input); + }, + meridiem: function (hours, minutes, isLower) { + if (hours < 12) { + return isLower ? 'vm' : 'VM'; + } else { + return isLower ? 'nm' : 'NM'; + } + }, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Vandag om] LT', + nextDay: '[Môre om] LT', + nextWeek: 'dddd [om] LT', + lastDay: '[Gister om] LT', + lastWeek: '[Laas] dddd [om] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'oor %s', + past: '%s gelede', + s: "'n paar sekondes", + ss: '%d sekondes', + m: "'n minuut", + mm: '%d minute', + h: "'n uur", + hh: '%d ure', + d: "'n dag", + dd: '%d dae', + M: "'n maand", + MM: '%d maande', + y: "'n jaar", + yy: '%d jaar', + }, + dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, + ordinal: function (number) { + return ( + number + + (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de') + ); // Thanks to Joris Röling : https://github.com/jjupiter + }, + week: { + dow: 1, // Maandag is die eerste dag van die week. + doy: 4, // Die week wat die 4de Januarie bevat is die eerste week van die jaar. + }, + }); + + //! moment.js locale configuration + + var pluralForm = function (n) { + return n === 0 + ? 0 + : n === 1 + ? 1 + : n === 2 + ? 2 + : n % 100 >= 3 && n % 100 <= 10 + ? 3 + : n % 100 >= 11 + ? 4 + : 5; + }, + plurals = { + s: [ + 'أقل من ثانية', + 'ثانية واحدة', + ['ثانيتان', 'ثانيتين'], + '%d ثوان', + '%d ثانية', + '%d ثانية', + ], + m: [ + 'أقل من دقيقة', + 'دقيقة واحدة', + ['دقيقتان', 'دقيقتين'], + '%d دقائق', + '%d دقيقة', + '%d دقيقة', + ], + h: [ + 'أقل من ساعة', + 'ساعة واحدة', + ['ساعتان', 'ساعتين'], + '%d ساعات', + '%d ساعة', + '%d ساعة', + ], + d: [ + 'أقل من يوم', + 'يوم واحد', + ['يومان', 'يومين'], + '%d أيام', + '%d يومًا', + '%d يوم', + ], + M: [ + 'أقل من شهر', + 'شهر واحد', + ['شهران', 'شهرين'], + '%d أشهر', + '%d شهرا', + '%d شهر', + ], + y: [ + 'أقل من عام', + 'عام واحد', + ['عامان', 'عامين'], + '%d أعوام', + '%d عامًا', + '%d عام', + ], + }, + pluralize = function (u) { + return function (number, withoutSuffix, string, isFuture) { + var f = pluralForm(number), + str = plurals[u][pluralForm(number)]; + if (f === 2) { + str = str[withoutSuffix ? 0 : 1]; + } + return str.replace(/%d/i, number); + }; + }, + months = [ + 'جانفي', + 'فيفري', + 'مارس', + 'أفريل', + 'ماي', + 'جوان', + 'جويلية', + 'أوت', + 'سبتمبر', + 'أكتوبر', + 'نوفمبر', + 'ديسمبر', + ]; + + moment.defineLocale('ar-dz', { + months: months, + monthsShort: months, + weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'D/\u200FM/\u200FYYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + meridiemParse: /ص|م/, + isPM: function (input) { + return 'م' === input; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'ص'; + } else { + return 'م'; + } + }, + calendar: { + sameDay: '[اليوم عند الساعة] LT', + nextDay: '[غدًا عند الساعة] LT', + nextWeek: 'dddd [عند الساعة] LT', + lastDay: '[أمس عند الساعة] LT', + lastWeek: 'dddd [عند الساعة] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'بعد %s', + past: 'منذ %s', + s: pluralize('s'), + ss: pluralize('s'), + m: pluralize('m'), + mm: pluralize('m'), + h: pluralize('h'), + hh: pluralize('h'), + d: pluralize('d'), + dd: pluralize('d'), + M: pluralize('M'), + MM: pluralize('M'), + y: pluralize('y'), + yy: pluralize('y'), + }, + postformat: function (string) { + return string.replace(/,/g, '،'); + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('ar-kw', { + months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split( + '_' + ), + monthsShort: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split( + '_' + ), + weekdays: 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort: 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[اليوم على الساعة] LT', + nextDay: '[غدا على الساعة] LT', + nextWeek: 'dddd [على الساعة] LT', + lastDay: '[أمس على الساعة] LT', + lastWeek: 'dddd [على الساعة] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'في %s', + past: 'منذ %s', + s: 'ثوان', + ss: '%d ثانية', + m: 'دقيقة', + mm: '%d دقائق', + h: 'ساعة', + hh: '%d ساعات', + d: 'يوم', + dd: '%d أيام', + M: 'شهر', + MM: '%d أشهر', + y: 'سنة', + yy: '%d سنوات', + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 12, // The week that contains Jan 12th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '0': '0', + }, + pluralForm$1 = function (n) { + return n === 0 + ? 0 + : n === 1 + ? 1 + : n === 2 + ? 2 + : n % 100 >= 3 && n % 100 <= 10 + ? 3 + : n % 100 >= 11 + ? 4 + : 5; + }, + plurals$1 = { + s: [ + 'أقل من ثانية', + 'ثانية واحدة', + ['ثانيتان', 'ثانيتين'], + '%d ثوان', + '%d ثانية', + '%d ثانية', + ], + m: [ + 'أقل من دقيقة', + 'دقيقة واحدة', + ['دقيقتان', 'دقيقتين'], + '%d دقائق', + '%d دقيقة', + '%d دقيقة', + ], + h: [ + 'أقل من ساعة', + 'ساعة واحدة', + ['ساعتان', 'ساعتين'], + '%d ساعات', + '%d ساعة', + '%d ساعة', + ], + d: [ + 'أقل من يوم', + 'يوم واحد', + ['يومان', 'يومين'], + '%d أيام', + '%d يومًا', + '%d يوم', + ], + M: [ + 'أقل من شهر', + 'شهر واحد', + ['شهران', 'شهرين'], + '%d أشهر', + '%d شهرا', + '%d شهر', + ], + y: [ + 'أقل من عام', + 'عام واحد', + ['عامان', 'عامين'], + '%d أعوام', + '%d عامًا', + '%d عام', + ], + }, + pluralize$1 = function (u) { + return function (number, withoutSuffix, string, isFuture) { + var f = pluralForm$1(number), + str = plurals$1[u][pluralForm$1(number)]; + if (f === 2) { + str = str[withoutSuffix ? 0 : 1]; + } + return str.replace(/%d/i, number); + }; + }, + months$1 = [ + 'يناير', + 'فبراير', + 'مارس', + 'أبريل', + 'مايو', + 'يونيو', + 'يوليو', + 'أغسطس', + 'سبتمبر', + 'أكتوبر', + 'نوفمبر', + 'ديسمبر', + ]; + + moment.defineLocale('ar-ly', { + months: months$1, + monthsShort: months$1, + weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'D/\u200FM/\u200FYYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + meridiemParse: /ص|م/, + isPM: function (input) { + return 'م' === input; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'ص'; + } else { + return 'م'; + } + }, + calendar: { + sameDay: '[اليوم عند الساعة] LT', + nextDay: '[غدًا عند الساعة] LT', + nextWeek: 'dddd [عند الساعة] LT', + lastDay: '[أمس عند الساعة] LT', + lastWeek: 'dddd [عند الساعة] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'بعد %s', + past: 'منذ %s', + s: pluralize$1('s'), + ss: pluralize$1('s'), + m: pluralize$1('m'), + mm: pluralize$1('m'), + h: pluralize$1('h'), + hh: pluralize$1('h'), + d: pluralize$1('d'), + dd: pluralize$1('d'), + M: pluralize$1('M'), + MM: pluralize$1('M'), + y: pluralize$1('y'), + yy: pluralize$1('y'), + }, + preparse: function (string) { + return string.replace(/،/g, ','); + }, + postformat: function (string) { + return string + .replace(/\d/g, function (match) { + return symbolMap[match]; + }) + .replace(/,/g, '،'); + }, + week: { + dow: 6, // Saturday is the first day of the week. + doy: 12, // The week that contains Jan 12th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('ar-ma', { + months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split( + '_' + ), + monthsShort: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split( + '_' + ), + weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort: 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[اليوم على الساعة] LT', + nextDay: '[غدا على الساعة] LT', + nextWeek: 'dddd [على الساعة] LT', + lastDay: '[أمس على الساعة] LT', + lastWeek: 'dddd [على الساعة] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'في %s', + past: 'منذ %s', + s: 'ثوان', + ss: '%d ثانية', + m: 'دقيقة', + mm: '%d دقائق', + h: 'ساعة', + hh: '%d ساعات', + d: 'يوم', + dd: '%d أيام', + M: 'شهر', + MM: '%d أشهر', + y: 'سنة', + yy: '%d سنوات', + }, + week: { + dow: 6, // Saturday is the first day of the week. + doy: 12, // The week that contains Jan 12th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap$1 = { + '1': '١', + '2': '٢', + '3': '٣', + '4': '٤', + '5': '٥', + '6': '٦', + '7': '٧', + '8': '٨', + '9': '٩', + '0': '٠', + }, + numberMap = { + '١': '1', + '٢': '2', + '٣': '3', + '٤': '4', + '٥': '5', + '٦': '6', + '٧': '7', + '٨': '8', + '٩': '9', + '٠': '0', + }; + + moment.defineLocale('ar-sa', { + months: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split( + '_' + ), + monthsShort: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split( + '_' + ), + weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + meridiemParse: /ص|م/, + isPM: function (input) { + return 'م' === input; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'ص'; + } else { + return 'م'; + } + }, + calendar: { + sameDay: '[اليوم على الساعة] LT', + nextDay: '[غدا على الساعة] LT', + nextWeek: 'dddd [على الساعة] LT', + lastDay: '[أمس على الساعة] LT', + lastWeek: 'dddd [على الساعة] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'في %s', + past: 'منذ %s', + s: 'ثوان', + ss: '%d ثانية', + m: 'دقيقة', + mm: '%d دقائق', + h: 'ساعة', + hh: '%d ساعات', + d: 'يوم', + dd: '%d أيام', + M: 'شهر', + MM: '%d أشهر', + y: 'سنة', + yy: '%d سنوات', + }, + preparse: function (string) { + return string + .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { + return numberMap[match]; + }) + .replace(/،/g, ','); + }, + postformat: function (string) { + return string + .replace(/\d/g, function (match) { + return symbolMap$1[match]; + }) + .replace(/,/g, '،'); + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('ar-tn', { + months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split( + '_' + ), + monthsShort: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split( + '_' + ), + weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[اليوم على الساعة] LT', + nextDay: '[غدا على الساعة] LT', + nextWeek: 'dddd [على الساعة] LT', + lastDay: '[أمس على الساعة] LT', + lastWeek: 'dddd [على الساعة] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'في %s', + past: 'منذ %s', + s: 'ثوان', + ss: '%d ثانية', + m: 'دقيقة', + mm: '%d دقائق', + h: 'ساعة', + hh: '%d ساعات', + d: 'يوم', + dd: '%d أيام', + M: 'شهر', + MM: '%d أشهر', + y: 'سنة', + yy: '%d سنوات', + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap$2 = { + '1': '١', + '2': '٢', + '3': '٣', + '4': '٤', + '5': '٥', + '6': '٦', + '7': '٧', + '8': '٨', + '9': '٩', + '0': '٠', + }, + numberMap$1 = { + '١': '1', + '٢': '2', + '٣': '3', + '٤': '4', + '٥': '5', + '٦': '6', + '٧': '7', + '٨': '8', + '٩': '9', + '٠': '0', + }, + pluralForm$2 = function (n) { + return n === 0 + ? 0 + : n === 1 + ? 1 + : n === 2 + ? 2 + : n % 100 >= 3 && n % 100 <= 10 + ? 3 + : n % 100 >= 11 + ? 4 + : 5; + }, + plurals$2 = { + s: [ + 'أقل من ثانية', + 'ثانية واحدة', + ['ثانيتان', 'ثانيتين'], + '%d ثوان', + '%d ثانية', + '%d ثانية', + ], + m: [ + 'أقل من دقيقة', + 'دقيقة واحدة', + ['دقيقتان', 'دقيقتين'], + '%d دقائق', + '%d دقيقة', + '%d دقيقة', + ], + h: [ + 'أقل من ساعة', + 'ساعة واحدة', + ['ساعتان', 'ساعتين'], + '%d ساعات', + '%d ساعة', + '%d ساعة', + ], + d: [ + 'أقل من يوم', + 'يوم واحد', + ['يومان', 'يومين'], + '%d أيام', + '%d يومًا', + '%d يوم', + ], + M: [ + 'أقل من شهر', + 'شهر واحد', + ['شهران', 'شهرين'], + '%d أشهر', + '%d شهرا', + '%d شهر', + ], + y: [ + 'أقل من عام', + 'عام واحد', + ['عامان', 'عامين'], + '%d أعوام', + '%d عامًا', + '%d عام', + ], + }, + pluralize$2 = function (u) { + return function (number, withoutSuffix, string, isFuture) { + var f = pluralForm$2(number), + str = plurals$2[u][pluralForm$2(number)]; + if (f === 2) { + str = str[withoutSuffix ? 0 : 1]; + } + return str.replace(/%d/i, number); + }; + }, + months$2 = [ + 'يناير', + 'فبراير', + 'مارس', + 'أبريل', + 'مايو', + 'يونيو', + 'يوليو', + 'أغسطس', + 'سبتمبر', + 'أكتوبر', + 'نوفمبر', + 'ديسمبر', + ]; + + moment.defineLocale('ar', { + months: months$2, + monthsShort: months$2, + weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'D/\u200FM/\u200FYYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + meridiemParse: /ص|م/, + isPM: function (input) { + return 'م' === input; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'ص'; + } else { + return 'م'; + } + }, + calendar: { + sameDay: '[اليوم عند الساعة] LT', + nextDay: '[غدًا عند الساعة] LT', + nextWeek: 'dddd [عند الساعة] LT', + lastDay: '[أمس عند الساعة] LT', + lastWeek: 'dddd [عند الساعة] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'بعد %s', + past: 'منذ %s', + s: pluralize$2('s'), + ss: pluralize$2('s'), + m: pluralize$2('m'), + mm: pluralize$2('m'), + h: pluralize$2('h'), + hh: pluralize$2('h'), + d: pluralize$2('d'), + dd: pluralize$2('d'), + M: pluralize$2('M'), + MM: pluralize$2('M'), + y: pluralize$2('y'), + yy: pluralize$2('y'), + }, + preparse: function (string) { + return string + .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { + return numberMap$1[match]; + }) + .replace(/،/g, ','); + }, + postformat: function (string) { + return string + .replace(/\d/g, function (match) { + return symbolMap$2[match]; + }) + .replace(/,/g, '،'); + }, + week: { + dow: 6, // Saturday is the first day of the week. + doy: 12, // The week that contains Jan 12th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var suffixes = { + 1: '-inci', + 5: '-inci', + 8: '-inci', + 70: '-inci', + 80: '-inci', + 2: '-nci', + 7: '-nci', + 20: '-nci', + 50: '-nci', + 3: '-üncü', + 4: '-üncü', + 100: '-üncü', + 6: '-ncı', + 9: '-uncu', + 10: '-uncu', + 30: '-uncu', + 60: '-ıncı', + 90: '-ıncı', + }; + + moment.defineLocale('az', { + months: 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split( + '_' + ), + monthsShort: 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'), + weekdays: 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split( + '_' + ), + weekdaysShort: 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'), + weekdaysMin: 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[bugün saat] LT', + nextDay: '[sabah saat] LT', + nextWeek: '[gələn həftə] dddd [saat] LT', + lastDay: '[dünən] LT', + lastWeek: '[keçən həftə] dddd [saat] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s sonra', + past: '%s əvvəl', + s: 'bir neçə saniyə', + ss: '%d saniyə', + m: 'bir dəqiqə', + mm: '%d dəqiqə', + h: 'bir saat', + hh: '%d saat', + d: 'bir gün', + dd: '%d gün', + M: 'bir ay', + MM: '%d ay', + y: 'bir il', + yy: '%d il', + }, + meridiemParse: /gecə|səhər|gündüz|axşam/, + isPM: function (input) { + return /^(gündüz|axşam)$/.test(input); + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'gecə'; + } else if (hour < 12) { + return 'səhər'; + } else if (hour < 17) { + return 'gündüz'; + } else { + return 'axşam'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/, + ordinal: function (number) { + if (number === 0) { + // special case for zero + return number + '-ıncı'; + } + var a = number % 10, + b = (number % 100) - a, + c = number >= 100 ? 100 : null; + return number + (suffixes[a] || suffixes[b] || suffixes[c]); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function plural(word, num) { + var forms = word.split('_'); + return num % 10 === 1 && num % 100 !== 11 + ? forms[0] + : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) + ? forms[1] + : forms[2]; + } + function relativeTimeWithPlural(number, withoutSuffix, key) { + var format = { + ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд', + mm: withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін', + hh: withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін', + dd: 'дзень_дні_дзён', + MM: 'месяц_месяцы_месяцаў', + yy: 'год_гады_гадоў', + }; + if (key === 'm') { + return withoutSuffix ? 'хвіліна' : 'хвіліну'; + } else if (key === 'h') { + return withoutSuffix ? 'гадзіна' : 'гадзіну'; + } else { + return number + ' ' + plural(format[key], +number); + } + } + + moment.defineLocale('be', { + months: { + format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split( + '_' + ), + standalone: 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split( + '_' + ), + }, + monthsShort: 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split( + '_' + ), + weekdays: { + format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split( + '_' + ), + standalone: 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split( + '_' + ), + isFormat: /\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/, + }, + weekdaysShort: 'нд_пн_ат_ср_чц_пт_сб'.split('_'), + weekdaysMin: 'нд_пн_ат_ср_чц_пт_сб'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY г.', + LLL: 'D MMMM YYYY г., HH:mm', + LLLL: 'dddd, D MMMM YYYY г., HH:mm', + }, + calendar: { + sameDay: '[Сёння ў] LT', + nextDay: '[Заўтра ў] LT', + lastDay: '[Учора ў] LT', + nextWeek: function () { + return '[У] dddd [ў] LT'; + }, + lastWeek: function () { + switch (this.day()) { + case 0: + case 3: + case 5: + case 6: + return '[У мінулую] dddd [ў] LT'; + case 1: + case 2: + case 4: + return '[У мінулы] dddd [ў] LT'; + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'праз %s', + past: '%s таму', + s: 'некалькі секунд', + m: relativeTimeWithPlural, + mm: relativeTimeWithPlural, + h: relativeTimeWithPlural, + hh: relativeTimeWithPlural, + d: 'дзень', + dd: relativeTimeWithPlural, + M: 'месяц', + MM: relativeTimeWithPlural, + y: 'год', + yy: relativeTimeWithPlural, + }, + meridiemParse: /ночы|раніцы|дня|вечара/, + isPM: function (input) { + return /^(дня|вечара)$/.test(input); + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'ночы'; + } else if (hour < 12) { + return 'раніцы'; + } else if (hour < 17) { + return 'дня'; + } else { + return 'вечара'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}-(і|ы|га)/, + ordinal: function (number, period) { + switch (period) { + case 'M': + case 'd': + case 'DDD': + case 'w': + case 'W': + return (number % 10 === 2 || number % 10 === 3) && + number % 100 !== 12 && + number % 100 !== 13 + ? number + '-і' + : number + '-ы'; + case 'D': + return number + '-га'; + default: + return number; + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('bg', { + months: 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split( + '_' + ), + monthsShort: 'яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'), + weekdays: 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split( + '_' + ), + weekdaysShort: 'нед_пон_вто_сря_чет_пет_съб'.split('_'), + weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'), + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'D.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY H:mm', + LLLL: 'dddd, D MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[Днес в] LT', + nextDay: '[Утре в] LT', + nextWeek: 'dddd [в] LT', + lastDay: '[Вчера в] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + case 3: + case 6: + return '[Миналата] dddd [в] LT'; + case 1: + case 2: + case 4: + case 5: + return '[Миналия] dddd [в] LT'; + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'след %s', + past: 'преди %s', + s: 'няколко секунди', + ss: '%d секунди', + m: 'минута', + mm: '%d минути', + h: 'час', + hh: '%d часа', + d: 'ден', + dd: '%d дена', + M: 'месец', + MM: '%d месеца', + y: 'година', + yy: '%d години', + }, + dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/, + ordinal: function (number) { + var lastDigit = number % 10, + last2Digits = number % 100; + if (number === 0) { + return number + '-ев'; + } else if (last2Digits === 0) { + return number + '-ен'; + } else if (last2Digits > 10 && last2Digits < 20) { + return number + '-ти'; + } else if (lastDigit === 1) { + return number + '-ви'; + } else if (lastDigit === 2) { + return number + '-ри'; + } else if (lastDigit === 7 || lastDigit === 8) { + return number + '-ми'; + } else { + return number + '-ти'; + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('bm', { + months: 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo'.split( + '_' + ), + monthsShort: 'Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des'.split('_'), + weekdays: 'Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'), + weekdaysShort: 'Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib'.split('_'), + weekdaysMin: 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'MMMM [tile] D [san] YYYY', + LLL: 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm', + LLLL: 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm', + }, + calendar: { + sameDay: '[Bi lɛrɛ] LT', + nextDay: '[Sini lɛrɛ] LT', + nextWeek: 'dddd [don lɛrɛ] LT', + lastDay: '[Kunu lɛrɛ] LT', + lastWeek: 'dddd [tɛmɛnen lɛrɛ] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s kɔnɔ', + past: 'a bɛ %s bɔ', + s: 'sanga dama dama', + ss: 'sekondi %d', + m: 'miniti kelen', + mm: 'miniti %d', + h: 'lɛrɛ kelen', + hh: 'lɛrɛ %d', + d: 'tile kelen', + dd: 'tile %d', + M: 'kalo kelen', + MM: 'kalo %d', + y: 'san kelen', + yy: 'san %d', + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap$3 = { + '1': '১', + '2': '২', + '3': '৩', + '4': '৪', + '5': '৫', + '6': '৬', + '7': '৭', + '8': '৮', + '9': '৯', + '0': '০', + }, + numberMap$2 = { + '১': '1', + '২': '2', + '৩': '3', + '৪': '4', + '৫': '5', + '৬': '6', + '৭': '7', + '৮': '8', + '৯': '9', + '০': '0', + }; + + moment.defineLocale('bn', { + months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split( + '_' + ), + monthsShort: 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split( + '_' + ), + weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split( + '_' + ), + weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'), + weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'), + longDateFormat: { + LT: 'A h:mm সময়', + LTS: 'A h:mm:ss সময়', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm সময়', + LLLL: 'dddd, D MMMM YYYY, A h:mm সময়', + }, + calendar: { + sameDay: '[আজ] LT', + nextDay: '[আগামীকাল] LT', + nextWeek: 'dddd, LT', + lastDay: '[গতকাল] LT', + lastWeek: '[গত] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s পরে', + past: '%s আগে', + s: 'কয়েক সেকেন্ড', + ss: '%d সেকেন্ড', + m: 'এক মিনিট', + mm: '%d মিনিট', + h: 'এক ঘন্টা', + hh: '%d ঘন্টা', + d: 'এক দিন', + dd: '%d দিন', + M: 'এক মাস', + MM: '%d মাস', + y: 'এক বছর', + yy: '%d বছর', + }, + preparse: function (string) { + return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) { + return numberMap$2[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$3[match]; + }); + }, + meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if ( + (meridiem === 'রাত' && hour >= 4) || + (meridiem === 'দুপুর' && hour < 5) || + meridiem === 'বিকাল' + ) { + return hour + 12; + } else { + return hour; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'রাত'; + } else if (hour < 10) { + return 'সকাল'; + } else if (hour < 17) { + return 'দুপুর'; + } else if (hour < 20) { + return 'বিকাল'; + } else { + return 'রাত'; + } + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap$4 = { + '1': '༡', + '2': '༢', + '3': '༣', + '4': '༤', + '5': '༥', + '6': '༦', + '7': '༧', + '8': '༨', + '9': '༩', + '0': '༠', + }, + numberMap$3 = { + '༡': '1', + '༢': '2', + '༣': '3', + '༤': '4', + '༥': '5', + '༦': '6', + '༧': '7', + '༨': '8', + '༩': '9', + '༠': '0', + }; + + moment.defineLocale('bo', { + months: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split( + '_' + ), + monthsShort: 'ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12'.split( + '_' + ), + monthsShortRegex: /^(ཟླ་\d{1,2})/, + monthsParseExact: true, + weekdays: 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split( + '_' + ), + weekdaysShort: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split( + '_' + ), + weekdaysMin: 'ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན'.split('_'), + longDateFormat: { + LT: 'A h:mm', + LTS: 'A h:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm', + LLLL: 'dddd, D MMMM YYYY, A h:mm', + }, + calendar: { + sameDay: '[དི་རིང] LT', + nextDay: '[སང་ཉིན] LT', + nextWeek: '[བདུན་ཕྲག་རྗེས་མ], LT', + lastDay: '[ཁ་སང] LT', + lastWeek: '[བདུན་ཕྲག་མཐའ་མ] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s ལ་', + past: '%s སྔན་ལ', + s: 'ལམ་སང', + ss: '%d སྐར་ཆ།', + m: 'སྐར་མ་གཅིག', + mm: '%d སྐར་མ', + h: 'ཆུ་ཚོད་གཅིག', + hh: '%d ཆུ་ཚོད', + d: 'ཉིན་གཅིག', + dd: '%d ཉིན་', + M: 'ཟླ་བ་གཅིག', + MM: '%d ཟླ་བ', + y: 'ལོ་གཅིག', + yy: '%d ལོ', + }, + preparse: function (string) { + return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) { + return numberMap$3[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$4[match]; + }); + }, + meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if ( + (meridiem === 'མཚན་མོ' && hour >= 4) || + (meridiem === 'ཉིན་གུང' && hour < 5) || + meridiem === 'དགོང་དག' + ) { + return hour + 12; + } else { + return hour; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'མཚན་མོ'; + } else if (hour < 10) { + return 'ཞོགས་ཀས'; + } else if (hour < 17) { + return 'ཉིན་གུང'; + } else if (hour < 20) { + return 'དགོང་དག'; + } else { + return 'མཚན་མོ'; + } + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function relativeTimeWithMutation(number, withoutSuffix, key) { + var format = { + mm: 'munutenn', + MM: 'miz', + dd: 'devezh', + }; + return number + ' ' + mutation(format[key], number); + } + function specialMutationForYears(number) { + switch (lastNumber(number)) { + case 1: + case 3: + case 4: + case 5: + case 9: + return number + ' bloaz'; + default: + return number + ' vloaz'; + } + } + function lastNumber(number) { + if (number > 9) { + return lastNumber(number % 10); + } + return number; + } + function mutation(text, number) { + if (number === 2) { + return softMutation(text); + } + return text; + } + function softMutation(text) { + var mutationTable = { + m: 'v', + b: 'v', + d: 'z', + }; + if (mutationTable[text.charAt(0)] === undefined) { + return text; + } + return mutationTable[text.charAt(0)] + text.substring(1); + } + + var monthsParse = [ + /^gen/i, + /^c[ʼ\']hwe/i, + /^meu/i, + /^ebr/i, + /^mae/i, + /^(mez|eve)/i, + /^gou/i, + /^eos/i, + /^gwe/i, + /^her/i, + /^du/i, + /^ker/i, + ], + monthsRegex = /^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i, + monthsStrictRegex = /^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i, + monthsShortStrictRegex = /^(gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i, + fullWeekdaysParse = [ + /^sul/i, + /^lun/i, + /^meurzh/i, + /^merc[ʼ\']her/i, + /^yaou/i, + /^gwener/i, + /^sadorn/i, + ], + shortWeekdaysParse = [ + /^Sul/i, + /^Lun/i, + /^Meu/i, + /^Mer/i, + /^Yao/i, + /^Gwe/i, + /^Sad/i, + ], + minWeekdaysParse = [ + /^Su/i, + /^Lu/i, + /^Me([^r]|$)/i, + /^Mer/i, + /^Ya/i, + /^Gw/i, + /^Sa/i, + ]; + + moment.defineLocale('br', { + months: 'Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split( + '_' + ), + monthsShort: 'Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'), + weekdays: 'Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn'.split('_'), + weekdaysShort: 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'), + weekdaysMin: 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'), + weekdaysParse: minWeekdaysParse, + fullWeekdaysParse: fullWeekdaysParse, + shortWeekdaysParse: shortWeekdaysParse, + minWeekdaysParse: minWeekdaysParse, + + monthsRegex: monthsRegex, + monthsShortRegex: monthsRegex, + monthsStrictRegex: monthsStrictRegex, + monthsShortStrictRegex: monthsShortStrictRegex, + monthsParse: monthsParse, + longMonthsParse: monthsParse, + shortMonthsParse: monthsParse, + + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D [a viz] MMMM YYYY', + LLL: 'D [a viz] MMMM YYYY HH:mm', + LLLL: 'dddd, D [a viz] MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Hiziv da] LT', + nextDay: '[Warcʼhoazh da] LT', + nextWeek: 'dddd [da] LT', + lastDay: '[Decʼh da] LT', + lastWeek: 'dddd [paset da] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'a-benn %s', + past: '%s ʼzo', + s: 'un nebeud segondennoù', + ss: '%d eilenn', + m: 'ur vunutenn', + mm: relativeTimeWithMutation, + h: 'un eur', + hh: '%d eur', + d: 'un devezh', + dd: relativeTimeWithMutation, + M: 'ur miz', + MM: relativeTimeWithMutation, + y: 'ur bloaz', + yy: specialMutationForYears, + }, + dayOfMonthOrdinalParse: /\d{1,2}(añ|vet)/, + ordinal: function (number) { + var output = number === 1 ? 'añ' : 'vet'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + meridiemParse: /a.m.|g.m./, // goude merenn | a-raok merenn + isPM: function (token) { + return token === 'g.m.'; + }, + meridiem: function (hour, minute, isLower) { + return hour < 12 ? 'a.m.' : 'g.m.'; + }, + }); + + //! moment.js locale configuration + + function translate(number, withoutSuffix, key) { + var result = number + ' '; + switch (key) { + case 'ss': + if (number === 1) { + result += 'sekunda'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'sekunde'; + } else { + result += 'sekundi'; + } + return result; + case 'm': + return withoutSuffix ? 'jedna minuta' : 'jedne minute'; + case 'mm': + if (number === 1) { + result += 'minuta'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'minute'; + } else { + result += 'minuta'; + } + return result; + case 'h': + return withoutSuffix ? 'jedan sat' : 'jednog sata'; + case 'hh': + if (number === 1) { + result += 'sat'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'sata'; + } else { + result += 'sati'; + } + return result; + case 'dd': + if (number === 1) { + result += 'dan'; + } else { + result += 'dana'; + } + return result; + case 'MM': + if (number === 1) { + result += 'mjesec'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'mjeseca'; + } else { + result += 'mjeseci'; + } + return result; + case 'yy': + if (number === 1) { + result += 'godina'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'godine'; + } else { + result += 'godina'; + } + return result; + } + } + + moment.defineLocale('bs', { + months: 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split( + '_' + ), + monthsShort: 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split( + '_' + ), + weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'), + weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[danas u] LT', + nextDay: '[sutra u] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[u] [nedjelju] [u] LT'; + case 3: + return '[u] [srijedu] [u] LT'; + case 6: + return '[u] [subotu] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[u] dddd [u] LT'; + } + }, + lastDay: '[jučer u] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + case 3: + return '[prošlu] dddd [u] LT'; + case 6: + return '[prošle] [subote] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[prošli] dddd [u] LT'; + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'za %s', + past: 'prije %s', + s: 'par sekundi', + ss: translate, + m: translate, + mm: translate, + h: translate, + hh: translate, + d: 'dan', + dd: translate, + M: 'mjesec', + MM: translate, + y: 'godinu', + yy: translate, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('ca', { + months: { + standalone: 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split( + '_' + ), + format: "de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split( + '_' + ), + isFormat: /D[oD]?(\s)+MMMM/, + }, + monthsShort: 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split( + '_' + ), + weekdaysShort: 'dg._dl._dt._dc._dj._dv._ds.'.split('_'), + weekdaysMin: 'dg_dl_dt_dc_dj_dv_ds'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM [de] YYYY', + ll: 'D MMM YYYY', + LLL: 'D MMMM [de] YYYY [a les] H:mm', + lll: 'D MMM YYYY, H:mm', + LLLL: 'dddd D MMMM [de] YYYY [a les] H:mm', + llll: 'ddd D MMM YYYY, H:mm', + }, + calendar: { + sameDay: function () { + return '[avui a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT'; + }, + nextDay: function () { + return '[demà a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT'; + }, + nextWeek: function () { + return 'dddd [a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT'; + }, + lastDay: function () { + return '[ahir a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT'; + }, + lastWeek: function () { + return ( + '[el] dddd [passat a ' + + (this.hours() !== 1 ? 'les' : 'la') + + '] LT' + ); + }, + sameElse: 'L', + }, + relativeTime: { + future: "d'aquí %s", + past: 'fa %s', + s: 'uns segons', + ss: '%d segons', + m: 'un minut', + mm: '%d minuts', + h: 'una hora', + hh: '%d hores', + d: 'un dia', + dd: '%d dies', + M: 'un mes', + MM: '%d mesos', + y: 'un any', + yy: '%d anys', + }, + dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/, + ordinal: function (number, period) { + var output = + number === 1 + ? 'r' + : number === 2 + ? 'n' + : number === 3 + ? 'r' + : number === 4 + ? 't' + : 'è'; + if (period === 'w' || period === 'W') { + output = 'a'; + } + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var months$3 = 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split( + '_' + ), + monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_'), + monthsParse$1 = [ + /^led/i, + /^úno/i, + /^bře/i, + /^dub/i, + /^kvě/i, + /^(čvn|červen$|června)/i, + /^(čvc|červenec|července)/i, + /^srp/i, + /^zář/i, + /^říj/i, + /^lis/i, + /^pro/i, + ], + // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched. + // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'. + monthsRegex$1 = /^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i; + + function plural$1(n) { + return n > 1 && n < 5 && ~~(n / 10) !== 1; + } + function translate$1(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + switch (key) { + case 's': // a few seconds / in a few seconds / a few seconds ago + return withoutSuffix || isFuture ? 'pár sekund' : 'pár sekundami'; + case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago + if (withoutSuffix || isFuture) { + return result + (plural$1(number) ? 'sekundy' : 'sekund'); + } else { + return result + 'sekundami'; + } + case 'm': // a minute / in a minute / a minute ago + return withoutSuffix ? 'minuta' : isFuture ? 'minutu' : 'minutou'; + case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago + if (withoutSuffix || isFuture) { + return result + (plural$1(number) ? 'minuty' : 'minut'); + } else { + return result + 'minutami'; + } + case 'h': // an hour / in an hour / an hour ago + return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou'; + case 'hh': // 9 hours / in 9 hours / 9 hours ago + if (withoutSuffix || isFuture) { + return result + (plural$1(number) ? 'hodiny' : 'hodin'); + } else { + return result + 'hodinami'; + } + case 'd': // a day / in a day / a day ago + return withoutSuffix || isFuture ? 'den' : 'dnem'; + case 'dd': // 9 days / in 9 days / 9 days ago + if (withoutSuffix || isFuture) { + return result + (plural$1(number) ? 'dny' : 'dní'); + } else { + return result + 'dny'; + } + case 'M': // a month / in a month / a month ago + return withoutSuffix || isFuture ? 'měsíc' : 'měsícem'; + case 'MM': // 9 months / in 9 months / 9 months ago + if (withoutSuffix || isFuture) { + return result + (plural$1(number) ? 'měsíce' : 'měsíců'); + } else { + return result + 'měsíci'; + } + case 'y': // a year / in a year / a year ago + return withoutSuffix || isFuture ? 'rok' : 'rokem'; + case 'yy': // 9 years / in 9 years / 9 years ago + if (withoutSuffix || isFuture) { + return result + (plural$1(number) ? 'roky' : 'let'); + } else { + return result + 'lety'; + } + } + } + + moment.defineLocale('cs', { + months: months$3, + monthsShort: monthsShort, + monthsRegex: monthsRegex$1, + monthsShortRegex: monthsRegex$1, + // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched. + // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'. + monthsStrictRegex: /^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i, + monthsShortStrictRegex: /^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i, + monthsParse: monthsParse$1, + longMonthsParse: monthsParse$1, + shortMonthsParse: monthsParse$1, + weekdays: 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'), + weekdaysShort: 'ne_po_út_st_čt_pá_so'.split('_'), + weekdaysMin: 'ne_po_út_st_čt_pá_so'.split('_'), + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd D. MMMM YYYY H:mm', + l: 'D. M. YYYY', + }, + calendar: { + sameDay: '[dnes v] LT', + nextDay: '[zítra v] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[v neděli v] LT'; + case 1: + case 2: + return '[v] dddd [v] LT'; + case 3: + return '[ve středu v] LT'; + case 4: + return '[ve čtvrtek v] LT'; + case 5: + return '[v pátek v] LT'; + case 6: + return '[v sobotu v] LT'; + } + }, + lastDay: '[včera v] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[minulou neděli v] LT'; + case 1: + case 2: + return '[minulé] dddd [v] LT'; + case 3: + return '[minulou středu v] LT'; + case 4: + case 5: + return '[minulý] dddd [v] LT'; + case 6: + return '[minulou sobotu v] LT'; + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'za %s', + past: 'před %s', + s: translate$1, + ss: translate$1, + m: translate$1, + mm: translate$1, + h: translate$1, + hh: translate$1, + d: translate$1, + dd: translate$1, + M: translate$1, + MM: translate$1, + y: translate$1, + yy: translate$1, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('cv', { + months: 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split( + '_' + ), + monthsShort: 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'), + weekdays: 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split( + '_' + ), + weekdaysShort: 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'), + weekdaysMin: 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD-MM-YYYY', + LL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]', + LLL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm', + LLLL: 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm', + }, + calendar: { + sameDay: '[Паян] LT [сехетре]', + nextDay: '[Ыран] LT [сехетре]', + lastDay: '[Ӗнер] LT [сехетре]', + nextWeek: '[Ҫитес] dddd LT [сехетре]', + lastWeek: '[Иртнӗ] dddd LT [сехетре]', + sameElse: 'L', + }, + relativeTime: { + future: function (output) { + var affix = /сехет$/i.exec(output) + ? 'рен' + : /ҫул$/i.exec(output) + ? 'тан' + : 'ран'; + return output + affix; + }, + past: '%s каялла', + s: 'пӗр-ик ҫеккунт', + ss: '%d ҫеккунт', + m: 'пӗр минут', + mm: '%d минут', + h: 'пӗр сехет', + hh: '%d сехет', + d: 'пӗр кун', + dd: '%d кун', + M: 'пӗр уйӑх', + MM: '%d уйӑх', + y: 'пӗр ҫул', + yy: '%d ҫул', + }, + dayOfMonthOrdinalParse: /\d{1,2}-мӗш/, + ordinal: '%d-мӗш', + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('cy', { + months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split( + '_' + ), + monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split( + '_' + ), + weekdays: 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split( + '_' + ), + weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'), + weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'), + weekdaysParseExact: true, + // time formats are the same as en-gb + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Heddiw am] LT', + nextDay: '[Yfory am] LT', + nextWeek: 'dddd [am] LT', + lastDay: '[Ddoe am] LT', + lastWeek: 'dddd [diwethaf am] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'mewn %s', + past: '%s yn ôl', + s: 'ychydig eiliadau', + ss: '%d eiliad', + m: 'munud', + mm: '%d munud', + h: 'awr', + hh: '%d awr', + d: 'diwrnod', + dd: '%d diwrnod', + M: 'mis', + MM: '%d mis', + y: 'blwyddyn', + yy: '%d flynedd', + }, + dayOfMonthOrdinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/, + // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh + ordinal: function (number) { + var b = number, + output = '', + lookup = [ + '', + 'af', + 'il', + 'ydd', + 'ydd', + 'ed', + 'ed', + 'ed', + 'fed', + 'fed', + 'fed', // 1af to 10fed + 'eg', + 'fed', + 'eg', + 'eg', + 'fed', + 'eg', + 'eg', + 'fed', + 'eg', + 'fed', // 11eg to 20fed + ]; + if (b > 20) { + if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) { + output = 'fed'; // not 30ain, 70ain or 90ain + } else { + output = 'ain'; + } + } else if (b > 0) { + output = lookup[b]; + } + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('da', { + months: 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split( + '_' + ), + monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'), + weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'), + weekdaysShort: 'søn_man_tir_ons_tor_fre_lør'.split('_'), + weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY HH:mm', + LLLL: 'dddd [d.] D. MMMM YYYY [kl.] HH:mm', + }, + calendar: { + sameDay: '[i dag kl.] LT', + nextDay: '[i morgen kl.] LT', + nextWeek: 'på dddd [kl.] LT', + lastDay: '[i går kl.] LT', + lastWeek: '[i] dddd[s kl.] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'om %s', + past: '%s siden', + s: 'få sekunder', + ss: '%d sekunder', + m: 'et minut', + mm: '%d minutter', + h: 'en time', + hh: '%d timer', + d: 'en dag', + dd: '%d dage', + M: 'en måned', + MM: '%d måneder', + y: 'et år', + yy: '%d år', + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function processRelativeTime(number, withoutSuffix, key, isFuture) { + var format = { + m: ['eine Minute', 'einer Minute'], + h: ['eine Stunde', 'einer Stunde'], + d: ['ein Tag', 'einem Tag'], + dd: [number + ' Tage', number + ' Tagen'], + w: ['eine Woche', 'einer Woche'], + M: ['ein Monat', 'einem Monat'], + MM: [number + ' Monate', number + ' Monaten'], + y: ['ein Jahr', 'einem Jahr'], + yy: [number + ' Jahre', number + ' Jahren'], + }; + return withoutSuffix ? format[key][0] : format[key][1]; + } + + moment.defineLocale('de-at', { + months: 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split( + '_' + ), + monthsShort: 'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split( + '_' + ), + weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'), + weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY HH:mm', + LLLL: 'dddd, D. MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[heute um] LT [Uhr]', + sameElse: 'L', + nextDay: '[morgen um] LT [Uhr]', + nextWeek: 'dddd [um] LT [Uhr]', + lastDay: '[gestern um] LT [Uhr]', + lastWeek: '[letzten] dddd [um] LT [Uhr]', + }, + relativeTime: { + future: 'in %s', + past: 'vor %s', + s: 'ein paar Sekunden', + ss: '%d Sekunden', + m: processRelativeTime, + mm: '%d Minuten', + h: processRelativeTime, + hh: '%d Stunden', + d: processRelativeTime, + dd: processRelativeTime, + w: processRelativeTime, + ww: '%d Wochen', + M: processRelativeTime, + MM: processRelativeTime, + y: processRelativeTime, + yy: processRelativeTime, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function processRelativeTime$1(number, withoutSuffix, key, isFuture) { + var format = { + m: ['eine Minute', 'einer Minute'], + h: ['eine Stunde', 'einer Stunde'], + d: ['ein Tag', 'einem Tag'], + dd: [number + ' Tage', number + ' Tagen'], + w: ['eine Woche', 'einer Woche'], + M: ['ein Monat', 'einem Monat'], + MM: [number + ' Monate', number + ' Monaten'], + y: ['ein Jahr', 'einem Jahr'], + yy: [number + ' Jahre', number + ' Jahren'], + }; + return withoutSuffix ? format[key][0] : format[key][1]; + } + + moment.defineLocale('de-ch', { + months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split( + '_' + ), + monthsShort: 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split( + '_' + ), + weekdaysShort: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), + weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY HH:mm', + LLLL: 'dddd, D. MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[heute um] LT [Uhr]', + sameElse: 'L', + nextDay: '[morgen um] LT [Uhr]', + nextWeek: 'dddd [um] LT [Uhr]', + lastDay: '[gestern um] LT [Uhr]', + lastWeek: '[letzten] dddd [um] LT [Uhr]', + }, + relativeTime: { + future: 'in %s', + past: 'vor %s', + s: 'ein paar Sekunden', + ss: '%d Sekunden', + m: processRelativeTime$1, + mm: '%d Minuten', + h: processRelativeTime$1, + hh: '%d Stunden', + d: processRelativeTime$1, + dd: processRelativeTime$1, + w: processRelativeTime$1, + ww: '%d Wochen', + M: processRelativeTime$1, + MM: processRelativeTime$1, + y: processRelativeTime$1, + yy: processRelativeTime$1, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function processRelativeTime$2(number, withoutSuffix, key, isFuture) { + var format = { + m: ['eine Minute', 'einer Minute'], + h: ['eine Stunde', 'einer Stunde'], + d: ['ein Tag', 'einem Tag'], + dd: [number + ' Tage', number + ' Tagen'], + w: ['eine Woche', 'einer Woche'], + M: ['ein Monat', 'einem Monat'], + MM: [number + ' Monate', number + ' Monaten'], + y: ['ein Jahr', 'einem Jahr'], + yy: [number + ' Jahre', number + ' Jahren'], + }; + return withoutSuffix ? format[key][0] : format[key][1]; + } + + moment.defineLocale('de', { + months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split( + '_' + ), + monthsShort: 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split( + '_' + ), + weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'), + weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY HH:mm', + LLLL: 'dddd, D. MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[heute um] LT [Uhr]', + sameElse: 'L', + nextDay: '[morgen um] LT [Uhr]', + nextWeek: 'dddd [um] LT [Uhr]', + lastDay: '[gestern um] LT [Uhr]', + lastWeek: '[letzten] dddd [um] LT [Uhr]', + }, + relativeTime: { + future: 'in %s', + past: 'vor %s', + s: 'ein paar Sekunden', + ss: '%d Sekunden', + m: processRelativeTime$2, + mm: '%d Minuten', + h: processRelativeTime$2, + hh: '%d Stunden', + d: processRelativeTime$2, + dd: processRelativeTime$2, + w: processRelativeTime$2, + ww: '%d Wochen', + M: processRelativeTime$2, + MM: processRelativeTime$2, + y: processRelativeTime$2, + yy: processRelativeTime$2, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var months$4 = [ + 'ޖެނުއަރީ', + 'ފެބްރުއަރީ', + 'މާރިޗު', + 'އޭޕްރީލު', + 'މޭ', + 'ޖޫން', + 'ޖުލައި', + 'އޯގަސްޓު', + 'ސެޕްޓެމްބަރު', + 'އޮކްޓޯބަރު', + 'ނޮވެމްބަރު', + 'ޑިސެމްބަރު', + ], + weekdays = [ + 'އާދިއްތަ', + 'ހޯމަ', + 'އަންގާރަ', + 'ބުދަ', + 'ބުރާސްފަތި', + 'ހުކުރު', + 'ހޮނިހިރު', + ]; + + moment.defineLocale('dv', { + months: months$4, + monthsShort: months$4, + weekdays: weekdays, + weekdaysShort: weekdays, + weekdaysMin: 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'D/M/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + meridiemParse: /މކ|މފ/, + isPM: function (input) { + return 'މފ' === input; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'މކ'; + } else { + return 'މފ'; + } + }, + calendar: { + sameDay: '[މިއަދު] LT', + nextDay: '[މާދަމާ] LT', + nextWeek: 'dddd LT', + lastDay: '[އިއްޔެ] LT', + lastWeek: '[ފާއިތުވި] dddd LT', + sameElse: 'L', + }, + relativeTime: { + future: 'ތެރޭގައި %s', + past: 'ކުރިން %s', + s: 'ސިކުންތުކޮޅެއް', + ss: 'd% ސިކުންތު', + m: 'މިނިޓެއް', + mm: 'މިނިޓު %d', + h: 'ގަޑިއިރެއް', + hh: 'ގަޑިއިރު %d', + d: 'ދުވަހެއް', + dd: 'ދުވަސް %d', + M: 'މަހެއް', + MM: 'މަސް %d', + y: 'އަހަރެއް', + yy: 'އަހަރު %d', + }, + preparse: function (string) { + return string.replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/,/g, '،'); + }, + week: { + dow: 7, // Sunday is the first day of the week. + doy: 12, // The week that contains Jan 12th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function isFunction(input) { + return ( + (typeof Function !== 'undefined' && input instanceof Function) || + Object.prototype.toString.call(input) === '[object Function]' + ); + } + + moment.defineLocale('el', { + monthsNominativeEl: 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split( + '_' + ), + monthsGenitiveEl: 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split( + '_' + ), + months: function (momentToFormat, format) { + if (!momentToFormat) { + return this._monthsNominativeEl; + } else if ( + typeof format === 'string' && + /D/.test(format.substring(0, format.indexOf('MMMM'))) + ) { + // if there is a day number before 'MMMM' + return this._monthsGenitiveEl[momentToFormat.month()]; + } else { + return this._monthsNominativeEl[momentToFormat.month()]; + } + }, + monthsShort: 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'), + weekdays: 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split( + '_' + ), + weekdaysShort: 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'), + weekdaysMin: 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'), + meridiem: function (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'μμ' : 'ΜΜ'; + } else { + return isLower ? 'πμ' : 'ΠΜ'; + } + }, + isPM: function (input) { + return (input + '').toLowerCase()[0] === 'μ'; + }, + meridiemParse: /[ΠΜ]\.?Μ?\.?/i, + longDateFormat: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY h:mm A', + LLLL: 'dddd, D MMMM YYYY h:mm A', + }, + calendarEl: { + sameDay: '[Σήμερα {}] LT', + nextDay: '[Αύριο {}] LT', + nextWeek: 'dddd [{}] LT', + lastDay: '[Χθες {}] LT', + lastWeek: function () { + switch (this.day()) { + case 6: + return '[το προηγούμενο] dddd [{}] LT'; + default: + return '[την προηγούμενη] dddd [{}] LT'; + } + }, + sameElse: 'L', + }, + calendar: function (key, mom) { + var output = this._calendarEl[key], + hours = mom && mom.hours(); + if (isFunction(output)) { + output = output.apply(mom); + } + return output.replace('{}', hours % 12 === 1 ? 'στη' : 'στις'); + }, + relativeTime: { + future: 'σε %s', + past: '%s πριν', + s: 'λίγα δευτερόλεπτα', + ss: '%d δευτερόλεπτα', + m: 'ένα λεπτό', + mm: '%d λεπτά', + h: 'μία ώρα', + hh: '%d ώρες', + d: 'μία μέρα', + dd: '%d μέρες', + M: 'ένας μήνας', + MM: '%d μήνες', + y: 'ένας χρόνος', + yy: '%d χρόνια', + }, + dayOfMonthOrdinalParse: /\d{1,2}η/, + ordinal: '%dη', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4st is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('en-au', { + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( + '_' + ), + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY h:mm A', + LLLL: 'dddd, D MMMM YYYY h:mm A', + }, + calendar: { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('en-ca', { + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( + '_' + ), + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'YYYY-MM-DD', + LL: 'MMMM D, YYYY', + LLL: 'MMMM D, YYYY h:mm A', + LLLL: 'dddd, MMMM D, YYYY h:mm A', + }, + calendar: { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('en-gb', { + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( + '_' + ), + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('en-ie', { + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( + '_' + ), + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('en-il', { + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( + '_' + ), + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('en-in', { + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( + '_' + ), + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY h:mm A', + LLLL: 'dddd, D MMMM YYYY h:mm A', + }, + calendar: { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 1st is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('en-nz', { + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( + '_' + ), + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY h:mm A', + LLLL: 'dddd, D MMMM YYYY h:mm A', + }, + calendar: { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('en-sg', { + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( + '_' + ), + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('eo', { + months: 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split( + '_' + ), + monthsShort: 'jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec'.split('_'), + weekdays: 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'), + weekdaysShort: 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'), + weekdaysMin: 'di_lu_ma_me_ĵa_ve_sa'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY-MM-DD', + LL: '[la] D[-an de] MMMM, YYYY', + LLL: '[la] D[-an de] MMMM, YYYY HH:mm', + LLLL: 'dddd[n], [la] D[-an de] MMMM, YYYY HH:mm', + llll: 'ddd, [la] D[-an de] MMM, YYYY HH:mm', + }, + meridiemParse: /[ap]\.t\.m/i, + isPM: function (input) { + return input.charAt(0).toLowerCase() === 'p'; + }, + meridiem: function (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'p.t.m.' : 'P.T.M.'; + } else { + return isLower ? 'a.t.m.' : 'A.T.M.'; + } + }, + calendar: { + sameDay: '[Hodiaŭ je] LT', + nextDay: '[Morgaŭ je] LT', + nextWeek: 'dddd[n je] LT', + lastDay: '[Hieraŭ je] LT', + lastWeek: '[pasintan] dddd[n je] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'post %s', + past: 'antaŭ %s', + s: 'kelkaj sekundoj', + ss: '%d sekundoj', + m: 'unu minuto', + mm: '%d minutoj', + h: 'unu horo', + hh: '%d horoj', + d: 'unu tago', //ne 'diurno', ĉar estas uzita por proksimumo + dd: '%d tagoj', + M: 'unu monato', + MM: '%d monatoj', + y: 'unu jaro', + yy: '%d jaroj', + }, + dayOfMonthOrdinalParse: /\d{1,2}a/, + ordinal: '%da', + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split( + '_' + ), + monthsShort$1 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'), + monthsParse$2 = [ + /^ene/i, + /^feb/i, + /^mar/i, + /^abr/i, + /^may/i, + /^jun/i, + /^jul/i, + /^ago/i, + /^sep/i, + /^oct/i, + /^nov/i, + /^dic/i, + ], + monthsRegex$2 = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; + + moment.defineLocale('es-do', { + months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split( + '_' + ), + monthsShort: function (m, format) { + if (!m) { + return monthsShortDot; + } else if (/-MMM-/.test(format)) { + return monthsShort$1[m.month()]; + } else { + return monthsShortDot[m.month()]; + } + }, + monthsRegex: monthsRegex$2, + monthsShortRegex: monthsRegex$2, + monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, + monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, + monthsParse: monthsParse$2, + longMonthsParse: monthsParse$2, + shortMonthsParse: monthsParse$2, + weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), + weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), + weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'DD/MM/YYYY', + LL: 'D [de] MMMM [de] YYYY', + LLL: 'D [de] MMMM [de] YYYY h:mm A', + LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A', + }, + calendar: { + sameDay: function () { + return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + nextDay: function () { + return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + nextWeek: function () { + return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + lastDay: function () { + return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + lastWeek: function () { + return ( + '[el] dddd [pasado a la' + + (this.hours() !== 1 ? 's' : '') + + '] LT' + ); + }, + sameElse: 'L', + }, + relativeTime: { + future: 'en %s', + past: 'hace %s', + s: 'unos segundos', + ss: '%d segundos', + m: 'un minuto', + mm: '%d minutos', + h: 'una hora', + hh: '%d horas', + d: 'un día', + dd: '%d días', + M: 'un mes', + MM: '%d meses', + y: 'un año', + yy: '%d años', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var monthsShortDot$1 = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split( + '_' + ), + monthsShort$2 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'), + monthsParse$3 = [ + /^ene/i, + /^feb/i, + /^mar/i, + /^abr/i, + /^may/i, + /^jun/i, + /^jul/i, + /^ago/i, + /^sep/i, + /^oct/i, + /^nov/i, + /^dic/i, + ], + monthsRegex$3 = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; + + moment.defineLocale('es-us', { + months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split( + '_' + ), + monthsShort: function (m, format) { + if (!m) { + return monthsShortDot$1; + } else if (/-MMM-/.test(format)) { + return monthsShort$2[m.month()]; + } else { + return monthsShortDot$1[m.month()]; + } + }, + monthsRegex: monthsRegex$3, + monthsShortRegex: monthsRegex$3, + monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, + monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, + monthsParse: monthsParse$3, + longMonthsParse: monthsParse$3, + shortMonthsParse: monthsParse$3, + weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), + weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), + weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'MM/DD/YYYY', + LL: 'D [de] MMMM [de] YYYY', + LLL: 'D [de] MMMM [de] YYYY h:mm A', + LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A', + }, + calendar: { + sameDay: function () { + return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + nextDay: function () { + return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + nextWeek: function () { + return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + lastDay: function () { + return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + lastWeek: function () { + return ( + '[el] dddd [pasado a la' + + (this.hours() !== 1 ? 's' : '') + + '] LT' + ); + }, + sameElse: 'L', + }, + relativeTime: { + future: 'en %s', + past: 'hace %s', + s: 'unos segundos', + ss: '%d segundos', + m: 'un minuto', + mm: '%d minutos', + h: 'una hora', + hh: '%d horas', + d: 'un día', + dd: '%d días', + M: 'un mes', + MM: '%d meses', + y: 'un año', + yy: '%d años', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var monthsShortDot$2 = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split( + '_' + ), + monthsShort$3 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'), + monthsParse$4 = [ + /^ene/i, + /^feb/i, + /^mar/i, + /^abr/i, + /^may/i, + /^jun/i, + /^jul/i, + /^ago/i, + /^sep/i, + /^oct/i, + /^nov/i, + /^dic/i, + ], + monthsRegex$4 = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; + + moment.defineLocale('es', { + months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split( + '_' + ), + monthsShort: function (m, format) { + if (!m) { + return monthsShortDot$2; + } else if (/-MMM-/.test(format)) { + return monthsShort$3[m.month()]; + } else { + return monthsShortDot$2[m.month()]; + } + }, + monthsRegex: monthsRegex$4, + monthsShortRegex: monthsRegex$4, + monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, + monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, + monthsParse: monthsParse$4, + longMonthsParse: monthsParse$4, + shortMonthsParse: monthsParse$4, + weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), + weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), + weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D [de] MMMM [de] YYYY', + LLL: 'D [de] MMMM [de] YYYY H:mm', + LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm', + }, + calendar: { + sameDay: function () { + return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + nextDay: function () { + return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + nextWeek: function () { + return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + lastDay: function () { + return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + lastWeek: function () { + return ( + '[el] dddd [pasado a la' + + (this.hours() !== 1 ? 's' : '') + + '] LT' + ); + }, + sameElse: 'L', + }, + relativeTime: { + future: 'en %s', + past: 'hace %s', + s: 'unos segundos', + ss: '%d segundos', + m: 'un minuto', + mm: '%d minutos', + h: 'una hora', + hh: '%d horas', + d: 'un día', + dd: '%d días', + M: 'un mes', + MM: '%d meses', + y: 'un año', + yy: '%d años', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + invalidDate: 'Fecha inválida', + }); + + //! moment.js locale configuration + + function processRelativeTime$3(number, withoutSuffix, key, isFuture) { + var format = { + s: ['mõne sekundi', 'mõni sekund', 'paar sekundit'], + ss: [number + 'sekundi', number + 'sekundit'], + m: ['ühe minuti', 'üks minut'], + mm: [number + ' minuti', number + ' minutit'], + h: ['ühe tunni', 'tund aega', 'üks tund'], + hh: [number + ' tunni', number + ' tundi'], + d: ['ühe päeva', 'üks päev'], + M: ['kuu aja', 'kuu aega', 'üks kuu'], + MM: [number + ' kuu', number + ' kuud'], + y: ['ühe aasta', 'aasta', 'üks aasta'], + yy: [number + ' aasta', number + ' aastat'], + }; + if (withoutSuffix) { + return format[key][2] ? format[key][2] : format[key][1]; + } + return isFuture ? format[key][0] : format[key][1]; + } + + moment.defineLocale('et', { + months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split( + '_' + ), + monthsShort: 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split( + '_' + ), + weekdays: 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split( + '_' + ), + weekdaysShort: 'P_E_T_K_N_R_L'.split('_'), + weekdaysMin: 'P_E_T_K_N_R_L'.split('_'), + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[Täna,] LT', + nextDay: '[Homme,] LT', + nextWeek: '[Järgmine] dddd LT', + lastDay: '[Eile,] LT', + lastWeek: '[Eelmine] dddd LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s pärast', + past: '%s tagasi', + s: processRelativeTime$3, + ss: processRelativeTime$3, + m: processRelativeTime$3, + mm: processRelativeTime$3, + h: processRelativeTime$3, + hh: processRelativeTime$3, + d: processRelativeTime$3, + dd: '%d päeva', + M: processRelativeTime$3, + MM: processRelativeTime$3, + y: processRelativeTime$3, + yy: processRelativeTime$3, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('eu', { + months: 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split( + '_' + ), + monthsShort: 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split( + '_' + ), + weekdaysShort: 'ig._al._ar._az._og._ol._lr.'.split('_'), + weekdaysMin: 'ig_al_ar_az_og_ol_lr'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY-MM-DD', + LL: 'YYYY[ko] MMMM[ren] D[a]', + LLL: 'YYYY[ko] MMMM[ren] D[a] HH:mm', + LLLL: 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm', + l: 'YYYY-M-D', + ll: 'YYYY[ko] MMM D[a]', + lll: 'YYYY[ko] MMM D[a] HH:mm', + llll: 'ddd, YYYY[ko] MMM D[a] HH:mm', + }, + calendar: { + sameDay: '[gaur] LT[etan]', + nextDay: '[bihar] LT[etan]', + nextWeek: 'dddd LT[etan]', + lastDay: '[atzo] LT[etan]', + lastWeek: '[aurreko] dddd LT[etan]', + sameElse: 'L', + }, + relativeTime: { + future: '%s barru', + past: 'duela %s', + s: 'segundo batzuk', + ss: '%d segundo', + m: 'minutu bat', + mm: '%d minutu', + h: 'ordu bat', + hh: '%d ordu', + d: 'egun bat', + dd: '%d egun', + M: 'hilabete bat', + MM: '%d hilabete', + y: 'urte bat', + yy: '%d urte', + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap$5 = { + '1': '۱', + '2': '۲', + '3': '۳', + '4': '۴', + '5': '۵', + '6': '۶', + '7': '۷', + '8': '۸', + '9': '۹', + '0': '۰', + }, + numberMap$4 = { + '۱': '1', + '۲': '2', + '۳': '3', + '۴': '4', + '۵': '5', + '۶': '6', + '۷': '7', + '۸': '8', + '۹': '9', + '۰': '0', + }; + + moment.defineLocale('fa', { + months: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split( + '_' + ), + monthsShort: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split( + '_' + ), + weekdays: 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split( + '_' + ), + weekdaysShort: 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split( + '_' + ), + weekdaysMin: 'ی_د_س_چ_پ_ج_ش'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + meridiemParse: /قبل از ظهر|بعد از ظهر/, + isPM: function (input) { + return /بعد از ظهر/.test(input); + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'قبل از ظهر'; + } else { + return 'بعد از ظهر'; + } + }, + calendar: { + sameDay: '[امروز ساعت] LT', + nextDay: '[فردا ساعت] LT', + nextWeek: 'dddd [ساعت] LT', + lastDay: '[دیروز ساعت] LT', + lastWeek: 'dddd [پیش] [ساعت] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'در %s', + past: '%s پیش', + s: 'چند ثانیه', + ss: '%d ثانیه', + m: 'یک دقیقه', + mm: '%d دقیقه', + h: 'یک ساعت', + hh: '%d ساعت', + d: 'یک روز', + dd: '%d روز', + M: 'یک ماه', + MM: '%d ماه', + y: 'یک سال', + yy: '%d سال', + }, + preparse: function (string) { + return string + .replace(/[۰-۹]/g, function (match) { + return numberMap$4[match]; + }) + .replace(/،/g, ','); + }, + postformat: function (string) { + return string + .replace(/\d/g, function (match) { + return symbolMap$5[match]; + }) + .replace(/,/g, '،'); + }, + dayOfMonthOrdinalParse: /\d{1,2}م/, + ordinal: '%dم', + week: { + dow: 6, // Saturday is the first day of the week. + doy: 12, // The week that contains Jan 12th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var numbersPast = 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split( + ' ' + ), + numbersFuture = [ + 'nolla', + 'yhden', + 'kahden', + 'kolmen', + 'neljän', + 'viiden', + 'kuuden', + numbersPast[7], + numbersPast[8], + numbersPast[9], + ]; + function translate$2(number, withoutSuffix, key, isFuture) { + var result = ''; + switch (key) { + case 's': + return isFuture ? 'muutaman sekunnin' : 'muutama sekunti'; + case 'ss': + result = isFuture ? 'sekunnin' : 'sekuntia'; + break; + case 'm': + return isFuture ? 'minuutin' : 'minuutti'; + case 'mm': + result = isFuture ? 'minuutin' : 'minuuttia'; + break; + case 'h': + return isFuture ? 'tunnin' : 'tunti'; + case 'hh': + result = isFuture ? 'tunnin' : 'tuntia'; + break; + case 'd': + return isFuture ? 'päivän' : 'päivä'; + case 'dd': + result = isFuture ? 'päivän' : 'päivää'; + break; + case 'M': + return isFuture ? 'kuukauden' : 'kuukausi'; + case 'MM': + result = isFuture ? 'kuukauden' : 'kuukautta'; + break; + case 'y': + return isFuture ? 'vuoden' : 'vuosi'; + case 'yy': + result = isFuture ? 'vuoden' : 'vuotta'; + break; + } + result = verbalNumber(number, isFuture) + ' ' + result; + return result; + } + function verbalNumber(number, isFuture) { + return number < 10 + ? isFuture + ? numbersFuture[number] + : numbersPast[number] + : number; + } + + moment.defineLocale('fi', { + months: 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split( + '_' + ), + monthsShort: 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split( + '_' + ), + weekdays: 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split( + '_' + ), + weekdaysShort: 'su_ma_ti_ke_to_pe_la'.split('_'), + weekdaysMin: 'su_ma_ti_ke_to_pe_la'.split('_'), + longDateFormat: { + LT: 'HH.mm', + LTS: 'HH.mm.ss', + L: 'DD.MM.YYYY', + LL: 'Do MMMM[ta] YYYY', + LLL: 'Do MMMM[ta] YYYY, [klo] HH.mm', + LLLL: 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm', + l: 'D.M.YYYY', + ll: 'Do MMM YYYY', + lll: 'Do MMM YYYY, [klo] HH.mm', + llll: 'ddd, Do MMM YYYY, [klo] HH.mm', + }, + calendar: { + sameDay: '[tänään] [klo] LT', + nextDay: '[huomenna] [klo] LT', + nextWeek: 'dddd [klo] LT', + lastDay: '[eilen] [klo] LT', + lastWeek: '[viime] dddd[na] [klo] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s päästä', + past: '%s sitten', + s: translate$2, + ss: translate$2, + m: translate$2, + mm: translate$2, + h: translate$2, + hh: translate$2, + d: translate$2, + dd: translate$2, + M: translate$2, + MM: translate$2, + y: translate$2, + yy: translate$2, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('fil', { + months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split( + '_' + ), + monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'), + weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split( + '_' + ), + weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'), + weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'MM/D/YYYY', + LL: 'MMMM D, YYYY', + LLL: 'MMMM D, YYYY HH:mm', + LLLL: 'dddd, MMMM DD, YYYY HH:mm', + }, + calendar: { + sameDay: 'LT [ngayong araw]', + nextDay: '[Bukas ng] LT', + nextWeek: 'LT [sa susunod na] dddd', + lastDay: 'LT [kahapon]', + lastWeek: 'LT [noong nakaraang] dddd', + sameElse: 'L', + }, + relativeTime: { + future: 'sa loob ng %s', + past: '%s ang nakalipas', + s: 'ilang segundo', + ss: '%d segundo', + m: 'isang minuto', + mm: '%d minuto', + h: 'isang oras', + hh: '%d oras', + d: 'isang araw', + dd: '%d araw', + M: 'isang buwan', + MM: '%d buwan', + y: 'isang taon', + yy: '%d taon', + }, + dayOfMonthOrdinalParse: /\d{1,2}/, + ordinal: function (number) { + return number; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('fo', { + months: 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split( + '_' + ), + monthsShort: 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'), + weekdays: 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split( + '_' + ), + weekdaysShort: 'sun_mán_týs_mik_hós_frí_ley'.split('_'), + weekdaysMin: 'su_má_tý_mi_hó_fr_le'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D. MMMM, YYYY HH:mm', + }, + calendar: { + sameDay: '[Í dag kl.] LT', + nextDay: '[Í morgin kl.] LT', + nextWeek: 'dddd [kl.] LT', + lastDay: '[Í gjár kl.] LT', + lastWeek: '[síðstu] dddd [kl] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'um %s', + past: '%s síðani', + s: 'fá sekund', + ss: '%d sekundir', + m: 'ein minuttur', + mm: '%d minuttir', + h: 'ein tími', + hh: '%d tímar', + d: 'ein dagur', + dd: '%d dagar', + M: 'ein mánaður', + MM: '%d mánaðir', + y: 'eitt ár', + yy: '%d ár', + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('fr-ca', { + months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split( + '_' + ), + monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), + weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), + weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY-MM-DD', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Aujourd’hui à] LT', + nextDay: '[Demain à] LT', + nextWeek: 'dddd [à] LT', + lastDay: '[Hier à] LT', + lastWeek: 'dddd [dernier à] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'dans %s', + past: 'il y a %s', + s: 'quelques secondes', + ss: '%d secondes', + m: 'une minute', + mm: '%d minutes', + h: 'une heure', + hh: '%d heures', + d: 'un jour', + dd: '%d jours', + M: 'un mois', + MM: '%d mois', + y: 'un an', + yy: '%d ans', + }, + dayOfMonthOrdinalParse: /\d{1,2}(er|e)/, + ordinal: function (number, period) { + switch (period) { + // Words with masculine grammatical gender: mois, trimestre, jour + default: + case 'M': + case 'Q': + case 'D': + case 'DDD': + case 'd': + return number + (number === 1 ? 'er' : 'e'); + + // Words with feminine grammatical gender: semaine + case 'w': + case 'W': + return number + (number === 1 ? 're' : 'e'); + } + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('fr-ch', { + months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split( + '_' + ), + monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), + weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), + weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Aujourd’hui à] LT', + nextDay: '[Demain à] LT', + nextWeek: 'dddd [à] LT', + lastDay: '[Hier à] LT', + lastWeek: 'dddd [dernier à] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'dans %s', + past: 'il y a %s', + s: 'quelques secondes', + ss: '%d secondes', + m: 'une minute', + mm: '%d minutes', + h: 'une heure', + hh: '%d heures', + d: 'un jour', + dd: '%d jours', + M: 'un mois', + MM: '%d mois', + y: 'un an', + yy: '%d ans', + }, + dayOfMonthOrdinalParse: /\d{1,2}(er|e)/, + ordinal: function (number, period) { + switch (period) { + // Words with masculine grammatical gender: mois, trimestre, jour + default: + case 'M': + case 'Q': + case 'D': + case 'DDD': + case 'd': + return number + (number === 1 ? 'er' : 'e'); + + // Words with feminine grammatical gender: semaine + case 'w': + case 'W': + return number + (number === 1 ? 're' : 'e'); + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var monthsStrictRegex$1 = /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i, + monthsShortStrictRegex$1 = /(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i, + monthsRegex$5 = /(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i, + monthsParse$5 = [ + /^janv/i, + /^févr/i, + /^mars/i, + /^avr/i, + /^mai/i, + /^juin/i, + /^juil/i, + /^août/i, + /^sept/i, + /^oct/i, + /^nov/i, + /^déc/i, + ]; + + moment.defineLocale('fr', { + months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split( + '_' + ), + monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split( + '_' + ), + monthsRegex: monthsRegex$5, + monthsShortRegex: monthsRegex$5, + monthsStrictRegex: monthsStrictRegex$1, + monthsShortStrictRegex: monthsShortStrictRegex$1, + monthsParse: monthsParse$5, + longMonthsParse: monthsParse$5, + shortMonthsParse: monthsParse$5, + weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), + weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), + weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Aujourd’hui à] LT', + nextDay: '[Demain à] LT', + nextWeek: 'dddd [à] LT', + lastDay: '[Hier à] LT', + lastWeek: 'dddd [dernier à] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'dans %s', + past: 'il y a %s', + s: 'quelques secondes', + ss: '%d secondes', + m: 'une minute', + mm: '%d minutes', + h: 'une heure', + hh: '%d heures', + d: 'un jour', + dd: '%d jours', + M: 'un mois', + MM: '%d mois', + y: 'un an', + yy: '%d ans', + }, + dayOfMonthOrdinalParse: /\d{1,2}(er|)/, + ordinal: function (number, period) { + switch (period) { + // TODO: Return 'e' when day of month > 1. Move this case inside + // block for masculine words below. + // See https://github.com/moment/moment/issues/3375 + case 'D': + return number + (number === 1 ? 'er' : ''); + + // Words with masculine grammatical gender: mois, trimestre, jour + default: + case 'M': + case 'Q': + case 'DDD': + case 'd': + return number + (number === 1 ? 'er' : 'e'); + + // Words with feminine grammatical gender: semaine + case 'w': + case 'W': + return number + (number === 1 ? 're' : 'e'); + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var monthsShortWithDots = 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split( + '_' + ), + monthsShortWithoutDots = 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split( + '_' + ); + + moment.defineLocale('fy', { + months: 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split( + '_' + ), + monthsShort: function (m, format) { + if (!m) { + return monthsShortWithDots; + } else if (/-MMM-/.test(format)) { + return monthsShortWithoutDots[m.month()]; + } else { + return monthsShortWithDots[m.month()]; + } + }, + monthsParseExact: true, + weekdays: 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split( + '_' + ), + weekdaysShort: 'si._mo._ti._wo._to._fr._so.'.split('_'), + weekdaysMin: 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD-MM-YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[hjoed om] LT', + nextDay: '[moarn om] LT', + nextWeek: 'dddd [om] LT', + lastDay: '[juster om] LT', + lastWeek: '[ôfrûne] dddd [om] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'oer %s', + past: '%s lyn', + s: 'in pear sekonden', + ss: '%d sekonden', + m: 'ien minút', + mm: '%d minuten', + h: 'ien oere', + hh: '%d oeren', + d: 'ien dei', + dd: '%d dagen', + M: 'ien moanne', + MM: '%d moannen', + y: 'ien jier', + yy: '%d jierren', + }, + dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, + ordinal: function (number) { + return ( + number + + (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de') + ); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var months$5 = [ + 'Eanáir', + 'Feabhra', + 'Márta', + 'Aibreán', + 'Bealtaine', + 'Meitheamh', + 'Iúil', + 'Lúnasa', + 'Meán Fómhair', + 'Deireadh Fómhair', + 'Samhain', + 'Nollaig', + ], + monthsShort$4 = [ + 'Ean', + 'Feabh', + 'Márt', + 'Aib', + 'Beal', + 'Meith', + 'Iúil', + 'Lún', + 'M.F.', + 'D.F.', + 'Samh', + 'Noll', + ], + weekdays$1 = [ + 'Dé Domhnaigh', + 'Dé Luain', + 'Dé Máirt', + 'Dé Céadaoin', + 'Déardaoin', + 'Dé hAoine', + 'Dé Sathairn', + ], + weekdaysShort = ['Domh', 'Luan', 'Máirt', 'Céad', 'Déar', 'Aoine', 'Sath'], + weekdaysMin = ['Do', 'Lu', 'Má', 'Cé', 'Dé', 'A', 'Sa']; + + moment.defineLocale('ga', { + months: months$5, + monthsShort: monthsShort$4, + monthsParseExact: true, + weekdays: weekdays$1, + weekdaysShort: weekdaysShort, + weekdaysMin: weekdaysMin, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Inniu ag] LT', + nextDay: '[Amárach ag] LT', + nextWeek: 'dddd [ag] LT', + lastDay: '[Inné ag] LT', + lastWeek: 'dddd [seo caite] [ag] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'i %s', + past: '%s ó shin', + s: 'cúpla soicind', + ss: '%d soicind', + m: 'nóiméad', + mm: '%d nóiméad', + h: 'uair an chloig', + hh: '%d uair an chloig', + d: 'lá', + dd: '%d lá', + M: 'mí', + MM: '%d míonna', + y: 'bliain', + yy: '%d bliain', + }, + dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/, + ordinal: function (number) { + var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var months$6 = [ + 'Am Faoilleach', + 'An Gearran', + 'Am Màrt', + 'An Giblean', + 'An Cèitean', + 'An t-Ògmhios', + 'An t-Iuchar', + 'An Lùnastal', + 'An t-Sultain', + 'An Dàmhair', + 'An t-Samhain', + 'An Dùbhlachd', + ], + monthsShort$5 = [ + 'Faoi', + 'Gear', + 'Màrt', + 'Gibl', + 'Cèit', + 'Ògmh', + 'Iuch', + 'Lùn', + 'Sult', + 'Dàmh', + 'Samh', + 'Dùbh', + ], + weekdays$2 = [ + 'Didòmhnaich', + 'Diluain', + 'Dimàirt', + 'Diciadain', + 'Diardaoin', + 'Dihaoine', + 'Disathairne', + ], + weekdaysShort$1 = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis'], + weekdaysMin$1 = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa']; + + moment.defineLocale('gd', { + months: months$6, + monthsShort: monthsShort$5, + monthsParseExact: true, + weekdays: weekdays$2, + weekdaysShort: weekdaysShort$1, + weekdaysMin: weekdaysMin$1, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[An-diugh aig] LT', + nextDay: '[A-màireach aig] LT', + nextWeek: 'dddd [aig] LT', + lastDay: '[An-dè aig] LT', + lastWeek: 'dddd [seo chaidh] [aig] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'ann an %s', + past: 'bho chionn %s', + s: 'beagan diogan', + ss: '%d diogan', + m: 'mionaid', + mm: '%d mionaidean', + h: 'uair', + hh: '%d uairean', + d: 'latha', + dd: '%d latha', + M: 'mìos', + MM: '%d mìosan', + y: 'bliadhna', + yy: '%d bliadhna', + }, + dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/, + ordinal: function (number) { + var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('gl', { + months: 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split( + '_' + ), + monthsShort: 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'), + weekdaysShort: 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'), + weekdaysMin: 'do_lu_ma_mé_xo_ve_sá'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D [de] MMMM [de] YYYY', + LLL: 'D [de] MMMM [de] YYYY H:mm', + LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm', + }, + calendar: { + sameDay: function () { + return '[hoxe ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT'; + }, + nextDay: function () { + return '[mañá ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT'; + }, + nextWeek: function () { + return 'dddd [' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT'; + }, + lastDay: function () { + return '[onte ' + (this.hours() !== 1 ? 'á' : 'a') + '] LT'; + }, + lastWeek: function () { + return ( + '[o] dddd [pasado ' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT' + ); + }, + sameElse: 'L', + }, + relativeTime: { + future: function (str) { + if (str.indexOf('un') === 0) { + return 'n' + str; + } + return 'en ' + str; + }, + past: 'hai %s', + s: 'uns segundos', + ss: '%d segundos', + m: 'un minuto', + mm: '%d minutos', + h: 'unha hora', + hh: '%d horas', + d: 'un día', + dd: '%d días', + M: 'un mes', + MM: '%d meses', + y: 'un ano', + yy: '%d anos', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function processRelativeTime$4(number, withoutSuffix, key, isFuture) { + var format = { + s: ['थोडया सॅकंडांनी', 'थोडे सॅकंड'], + ss: [number + ' सॅकंडांनी', number + ' सॅकंड'], + m: ['एका मिणटान', 'एक मिनूट'], + mm: [number + ' मिणटांनी', number + ' मिणटां'], + h: ['एका वरान', 'एक वर'], + hh: [number + ' वरांनी', number + ' वरां'], + d: ['एका दिसान', 'एक दीस'], + dd: [number + ' दिसांनी', number + ' दीस'], + M: ['एका म्हयन्यान', 'एक म्हयनो'], + MM: [number + ' म्हयन्यानी', number + ' म्हयने'], + y: ['एका वर्सान', 'एक वर्स'], + yy: [number + ' वर्सांनी', number + ' वर्सां'], + }; + return isFuture ? format[key][0] : format[key][1]; + } + + moment.defineLocale('gom-deva', { + months: { + standalone: 'जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split( + '_' + ), + format: 'जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या'.split( + '_' + ), + isFormat: /MMMM(\s)+D[oD]?/, + }, + monthsShort: 'जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार'.split('_'), + weekdaysShort: 'आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.'.split('_'), + weekdaysMin: 'आ_सो_मं_बु_ब्रे_सु_शे'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'A h:mm [वाजतां]', + LTS: 'A h:mm:ss [वाजतां]', + L: 'DD-MM-YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY A h:mm [वाजतां]', + LLLL: 'dddd, MMMM Do, YYYY, A h:mm [वाजतां]', + llll: 'ddd, D MMM YYYY, A h:mm [वाजतां]', + }, + calendar: { + sameDay: '[आयज] LT', + nextDay: '[फाल्यां] LT', + nextWeek: '[फुडलो] dddd[,] LT', + lastDay: '[काल] LT', + lastWeek: '[फाटलो] dddd[,] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s', + past: '%s आदीं', + s: processRelativeTime$4, + ss: processRelativeTime$4, + m: processRelativeTime$4, + mm: processRelativeTime$4, + h: processRelativeTime$4, + hh: processRelativeTime$4, + d: processRelativeTime$4, + dd: processRelativeTime$4, + M: processRelativeTime$4, + MM: processRelativeTime$4, + y: processRelativeTime$4, + yy: processRelativeTime$4, + }, + dayOfMonthOrdinalParse: /\d{1,2}(वेर)/, + ordinal: function (number, period) { + switch (period) { + // the ordinal 'वेर' only applies to day of the month + case 'D': + return number + 'वेर'; + default: + case 'M': + case 'Q': + case 'DDD': + case 'd': + case 'w': + case 'W': + return number; + } + }, + week: { + dow: 0, // Sunday is the first day of the week + doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4) + }, + meridiemParse: /राती|सकाळीं|दनपारां|सांजे/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'राती') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'सकाळीं') { + return hour; + } else if (meridiem === 'दनपारां') { + return hour > 12 ? hour : hour + 12; + } else if (meridiem === 'सांजे') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'राती'; + } else if (hour < 12) { + return 'सकाळीं'; + } else if (hour < 16) { + return 'दनपारां'; + } else if (hour < 20) { + return 'सांजे'; + } else { + return 'राती'; + } + }, + }); + + //! moment.js locale configuration + + function processRelativeTime$5(number, withoutSuffix, key, isFuture) { + var format = { + s: ['thoddea sekondamni', 'thodde sekond'], + ss: [number + ' sekondamni', number + ' sekond'], + m: ['eka mintan', 'ek minut'], + mm: [number + ' mintamni', number + ' mintam'], + h: ['eka voran', 'ek vor'], + hh: [number + ' voramni', number + ' voram'], + d: ['eka disan', 'ek dis'], + dd: [number + ' disamni', number + ' dis'], + M: ['eka mhoinean', 'ek mhoino'], + MM: [number + ' mhoineamni', number + ' mhoine'], + y: ['eka vorsan', 'ek voros'], + yy: [number + ' vorsamni', number + ' vorsam'], + }; + return isFuture ? format[key][0] : format[key][1]; + } + + moment.defineLocale('gom-latn', { + months: { + standalone: 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split( + '_' + ), + format: 'Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea'.split( + '_' + ), + isFormat: /MMMM(\s)+D[oD]?/, + }, + monthsShort: 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split( + '_' + ), + monthsParseExact: true, + weekdays: "Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split('_'), + weekdaysShort: 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'), + weekdaysMin: 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'A h:mm [vazta]', + LTS: 'A h:mm:ss [vazta]', + L: 'DD-MM-YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY A h:mm [vazta]', + LLLL: 'dddd, MMMM Do, YYYY, A h:mm [vazta]', + llll: 'ddd, D MMM YYYY, A h:mm [vazta]', + }, + calendar: { + sameDay: '[Aiz] LT', + nextDay: '[Faleam] LT', + nextWeek: '[Fuddlo] dddd[,] LT', + lastDay: '[Kal] LT', + lastWeek: '[Fattlo] dddd[,] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s', + past: '%s adim', + s: processRelativeTime$5, + ss: processRelativeTime$5, + m: processRelativeTime$5, + mm: processRelativeTime$5, + h: processRelativeTime$5, + hh: processRelativeTime$5, + d: processRelativeTime$5, + dd: processRelativeTime$5, + M: processRelativeTime$5, + MM: processRelativeTime$5, + y: processRelativeTime$5, + yy: processRelativeTime$5, + }, + dayOfMonthOrdinalParse: /\d{1,2}(er)/, + ordinal: function (number, period) { + switch (period) { + // the ordinal 'er' only applies to day of the month + case 'D': + return number + 'er'; + default: + case 'M': + case 'Q': + case 'DDD': + case 'd': + case 'w': + case 'W': + return number; + } + }, + week: { + dow: 0, // Sunday is the first day of the week + doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4) + }, + meridiemParse: /rati|sokallim|donparam|sanje/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'rati') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'sokallim') { + return hour; + } else if (meridiem === 'donparam') { + return hour > 12 ? hour : hour + 12; + } else if (meridiem === 'sanje') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'rati'; + } else if (hour < 12) { + return 'sokallim'; + } else if (hour < 16) { + return 'donparam'; + } else if (hour < 20) { + return 'sanje'; + } else { + return 'rati'; + } + }, + }); + + //! moment.js locale configuration + + var symbolMap$6 = { + '1': '૧', + '2': '૨', + '3': '૩', + '4': '૪', + '5': '૫', + '6': '૬', + '7': '૭', + '8': '૮', + '9': '૯', + '0': '૦', + }, + numberMap$5 = { + '૧': '1', + '૨': '2', + '૩': '3', + '૪': '4', + '૫': '5', + '૬': '6', + '૭': '7', + '૮': '8', + '૯': '9', + '૦': '0', + }; + + moment.defineLocale('gu', { + months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split( + '_' + ), + monthsShort: 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split( + '_' + ), + weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'), + weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'), + longDateFormat: { + LT: 'A h:mm વાગ્યે', + LTS: 'A h:mm:ss વાગ્યે', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm વાગ્યે', + LLLL: 'dddd, D MMMM YYYY, A h:mm વાગ્યે', + }, + calendar: { + sameDay: '[આજ] LT', + nextDay: '[કાલે] LT', + nextWeek: 'dddd, LT', + lastDay: '[ગઇકાલે] LT', + lastWeek: '[પાછલા] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s મા', + past: '%s પહેલા', + s: 'અમુક પળો', + ss: '%d સેકંડ', + m: 'એક મિનિટ', + mm: '%d મિનિટ', + h: 'એક કલાક', + hh: '%d કલાક', + d: 'એક દિવસ', + dd: '%d દિવસ', + M: 'એક મહિનો', + MM: '%d મહિનો', + y: 'એક વર્ષ', + yy: '%d વર્ષ', + }, + preparse: function (string) { + return string.replace(/[૧૨૩૪૫૬૭૮૯૦]/g, function (match) { + return numberMap$5[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$6[match]; + }); + }, + // Gujarati notation for meridiems are quite fuzzy in practice. While there exists + // a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati. + meridiemParse: /રાત|બપોર|સવાર|સાંજ/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'રાત') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'સવાર') { + return hour; + } else if (meridiem === 'બપોર') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'સાંજ') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'રાત'; + } else if (hour < 10) { + return 'સવાર'; + } else if (hour < 17) { + return 'બપોર'; + } else if (hour < 20) { + return 'સાંજ'; + } else { + return 'રાત'; + } + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('he', { + months: 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split( + '_' + ), + monthsShort: 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split( + '_' + ), + weekdays: 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'), + weekdaysShort: 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'), + weekdaysMin: 'א_ב_ג_ד_ה_ו_ש'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D [ב]MMMM YYYY', + LLL: 'D [ב]MMMM YYYY HH:mm', + LLLL: 'dddd, D [ב]MMMM YYYY HH:mm', + l: 'D/M/YYYY', + ll: 'D MMM YYYY', + lll: 'D MMM YYYY HH:mm', + llll: 'ddd, D MMM YYYY HH:mm', + }, + calendar: { + sameDay: '[היום ב־]LT', + nextDay: '[מחר ב־]LT', + nextWeek: 'dddd [בשעה] LT', + lastDay: '[אתמול ב־]LT', + lastWeek: '[ביום] dddd [האחרון בשעה] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'בעוד %s', + past: 'לפני %s', + s: 'מספר שניות', + ss: '%d שניות', + m: 'דקה', + mm: '%d דקות', + h: 'שעה', + hh: function (number) { + if (number === 2) { + return 'שעתיים'; + } + return number + ' שעות'; + }, + d: 'יום', + dd: function (number) { + if (number === 2) { + return 'יומיים'; + } + return number + ' ימים'; + }, + M: 'חודש', + MM: function (number) { + if (number === 2) { + return 'חודשיים'; + } + return number + ' חודשים'; + }, + y: 'שנה', + yy: function (number) { + if (number === 2) { + return 'שנתיים'; + } else if (number % 10 === 0 && number !== 10) { + return number + ' שנה'; + } + return number + ' שנים'; + }, + }, + meridiemParse: /אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i, + isPM: function (input) { + return /^(אחה"צ|אחרי הצהריים|בערב)$/.test(input); + }, + meridiem: function (hour, minute, isLower) { + if (hour < 5) { + return 'לפנות בוקר'; + } else if (hour < 10) { + return 'בבוקר'; + } else if (hour < 12) { + return isLower ? 'לפנה"צ' : 'לפני הצהריים'; + } else if (hour < 18) { + return isLower ? 'אחה"צ' : 'אחרי הצהריים'; + } else { + return 'בערב'; + } + }, + }); + + //! moment.js locale configuration + + var symbolMap$7 = { + '1': '१', + '2': '२', + '3': '३', + '4': '४', + '5': '५', + '6': '६', + '7': '७', + '8': '८', + '9': '९', + '0': '०', + }, + numberMap$6 = { + '१': '1', + '२': '2', + '३': '3', + '४': '4', + '५': '5', + '६': '6', + '७': '7', + '८': '8', + '९': '9', + '०': '0', + }; + + moment.defineLocale('hi', { + months: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split( + '_' + ), + monthsShort: 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'), + weekdaysShort: 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'), + weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'), + longDateFormat: { + LT: 'A h:mm बजे', + LTS: 'A h:mm:ss बजे', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm बजे', + LLLL: 'dddd, D MMMM YYYY, A h:mm बजे', + }, + calendar: { + sameDay: '[आज] LT', + nextDay: '[कल] LT', + nextWeek: 'dddd, LT', + lastDay: '[कल] LT', + lastWeek: '[पिछले] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s में', + past: '%s पहले', + s: 'कुछ ही क्षण', + ss: '%d सेकंड', + m: 'एक मिनट', + mm: '%d मिनट', + h: 'एक घंटा', + hh: '%d घंटे', + d: 'एक दिन', + dd: '%d दिन', + M: 'एक महीने', + MM: '%d महीने', + y: 'एक वर्ष', + yy: '%d वर्ष', + }, + preparse: function (string) { + return string.replace(/[१२३४५६७८९०]/g, function (match) { + return numberMap$6[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$7[match]; + }); + }, + // Hindi notation for meridiems are quite fuzzy in practice. While there exists + // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi. + meridiemParse: /रात|सुबह|दोपहर|शाम/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'रात') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'सुबह') { + return hour; + } else if (meridiem === 'दोपहर') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'शाम') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'रात'; + } else if (hour < 10) { + return 'सुबह'; + } else if (hour < 17) { + return 'दोपहर'; + } else if (hour < 20) { + return 'शाम'; + } else { + return 'रात'; + } + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function translate$3(number, withoutSuffix, key) { + var result = number + ' '; + switch (key) { + case 'ss': + if (number === 1) { + result += 'sekunda'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'sekunde'; + } else { + result += 'sekundi'; + } + return result; + case 'm': + return withoutSuffix ? 'jedna minuta' : 'jedne minute'; + case 'mm': + if (number === 1) { + result += 'minuta'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'minute'; + } else { + result += 'minuta'; + } + return result; + case 'h': + return withoutSuffix ? 'jedan sat' : 'jednog sata'; + case 'hh': + if (number === 1) { + result += 'sat'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'sata'; + } else { + result += 'sati'; + } + return result; + case 'dd': + if (number === 1) { + result += 'dan'; + } else { + result += 'dana'; + } + return result; + case 'MM': + if (number === 1) { + result += 'mjesec'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'mjeseca'; + } else { + result += 'mjeseci'; + } + return result; + case 'yy': + if (number === 1) { + result += 'godina'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'godine'; + } else { + result += 'godina'; + } + return result; + } + } + + moment.defineLocale('hr', { + months: { + format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split( + '_' + ), + standalone: 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split( + '_' + ), + }, + monthsShort: 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split( + '_' + ), + weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'), + weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'Do MMMM YYYY', + LLL: 'Do MMMM YYYY H:mm', + LLLL: 'dddd, Do MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[danas u] LT', + nextDay: '[sutra u] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[u] [nedjelju] [u] LT'; + case 3: + return '[u] [srijedu] [u] LT'; + case 6: + return '[u] [subotu] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[u] dddd [u] LT'; + } + }, + lastDay: '[jučer u] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[prošlu] [nedjelju] [u] LT'; + case 3: + return '[prošlu] [srijedu] [u] LT'; + case 6: + return '[prošle] [subote] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[prošli] dddd [u] LT'; + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'za %s', + past: 'prije %s', + s: 'par sekundi', + ss: translate$3, + m: translate$3, + mm: translate$3, + h: translate$3, + hh: translate$3, + d: 'dan', + dd: translate$3, + M: 'mjesec', + MM: translate$3, + y: 'godinu', + yy: translate$3, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split( + ' ' + ); + function translate$4(number, withoutSuffix, key, isFuture) { + var num = number; + switch (key) { + case 's': + return isFuture || withoutSuffix + ? 'néhány másodperc' + : 'néhány másodperce'; + case 'ss': + return num + (isFuture || withoutSuffix) + ? ' másodperc' + : ' másodperce'; + case 'm': + return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce'); + case 'mm': + return num + (isFuture || withoutSuffix ? ' perc' : ' perce'); + case 'h': + return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája'); + case 'hh': + return num + (isFuture || withoutSuffix ? ' óra' : ' órája'); + case 'd': + return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja'); + case 'dd': + return num + (isFuture || withoutSuffix ? ' nap' : ' napja'); + case 'M': + return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja'); + case 'MM': + return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja'); + case 'y': + return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve'); + case 'yy': + return num + (isFuture || withoutSuffix ? ' év' : ' éve'); + } + return ''; + } + function week(isFuture) { + return ( + (isFuture ? '' : '[múlt] ') + + '[' + + weekEndings[this.day()] + + '] LT[-kor]' + ); + } + + moment.defineLocale('hu', { + months: 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split( + '_' + ), + monthsShort: 'jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec'.split( + '_' + ), + weekdays: 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'), + weekdaysShort: 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'), + weekdaysMin: 'v_h_k_sze_cs_p_szo'.split('_'), + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'YYYY.MM.DD.', + LL: 'YYYY. MMMM D.', + LLL: 'YYYY. MMMM D. H:mm', + LLLL: 'YYYY. MMMM D., dddd H:mm', + }, + meridiemParse: /de|du/i, + isPM: function (input) { + return input.charAt(1).toLowerCase() === 'u'; + }, + meridiem: function (hours, minutes, isLower) { + if (hours < 12) { + return isLower === true ? 'de' : 'DE'; + } else { + return isLower === true ? 'du' : 'DU'; + } + }, + calendar: { + sameDay: '[ma] LT[-kor]', + nextDay: '[holnap] LT[-kor]', + nextWeek: function () { + return week.call(this, true); + }, + lastDay: '[tegnap] LT[-kor]', + lastWeek: function () { + return week.call(this, false); + }, + sameElse: 'L', + }, + relativeTime: { + future: '%s múlva', + past: '%s', + s: translate$4, + ss: translate$4, + m: translate$4, + mm: translate$4, + h: translate$4, + hh: translate$4, + d: translate$4, + dd: translate$4, + M: translate$4, + MM: translate$4, + y: translate$4, + yy: translate$4, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('hy-am', { + months: { + format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split( + '_' + ), + standalone: 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split( + '_' + ), + }, + monthsShort: 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'), + weekdays: 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split( + '_' + ), + weekdaysShort: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'), + weekdaysMin: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY թ.', + LLL: 'D MMMM YYYY թ., HH:mm', + LLLL: 'dddd, D MMMM YYYY թ., HH:mm', + }, + calendar: { + sameDay: '[այսօր] LT', + nextDay: '[վաղը] LT', + lastDay: '[երեկ] LT', + nextWeek: function () { + return 'dddd [օրը ժամը] LT'; + }, + lastWeek: function () { + return '[անցած] dddd [օրը ժամը] LT'; + }, + sameElse: 'L', + }, + relativeTime: { + future: '%s հետո', + past: '%s առաջ', + s: 'մի քանի վայրկյան', + ss: '%d վայրկյան', + m: 'րոպե', + mm: '%d րոպե', + h: 'ժամ', + hh: '%d ժամ', + d: 'օր', + dd: '%d օր', + M: 'ամիս', + MM: '%d ամիս', + y: 'տարի', + yy: '%d տարի', + }, + meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/, + isPM: function (input) { + return /^(ցերեկվա|երեկոյան)$/.test(input); + }, + meridiem: function (hour) { + if (hour < 4) { + return 'գիշերվա'; + } else if (hour < 12) { + return 'առավոտվա'; + } else if (hour < 17) { + return 'ցերեկվա'; + } else { + return 'երեկոյան'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}|\d{1,2}-(ին|րդ)/, + ordinal: function (number, period) { + switch (period) { + case 'DDD': + case 'w': + case 'W': + case 'DDDo': + if (number === 1) { + return number + '-ին'; + } + return number + '-րդ'; + default: + return number; + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('id', { + months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des'.split('_'), + weekdays: 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'), + weekdaysShort: 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'), + weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'), + longDateFormat: { + LT: 'HH.mm', + LTS: 'HH.mm.ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY [pukul] HH.mm', + LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm', + }, + meridiemParse: /pagi|siang|sore|malam/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'pagi') { + return hour; + } else if (meridiem === 'siang') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'sore' || meridiem === 'malam') { + return hour + 12; + } + }, + meridiem: function (hours, minutes, isLower) { + if (hours < 11) { + return 'pagi'; + } else if (hours < 15) { + return 'siang'; + } else if (hours < 19) { + return 'sore'; + } else { + return 'malam'; + } + }, + calendar: { + sameDay: '[Hari ini pukul] LT', + nextDay: '[Besok pukul] LT', + nextWeek: 'dddd [pukul] LT', + lastDay: '[Kemarin pukul] LT', + lastWeek: 'dddd [lalu pukul] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'dalam %s', + past: '%s yang lalu', + s: 'beberapa detik', + ss: '%d detik', + m: 'semenit', + mm: '%d menit', + h: 'sejam', + hh: '%d jam', + d: 'sehari', + dd: '%d hari', + M: 'sebulan', + MM: '%d bulan', + y: 'setahun', + yy: '%d tahun', + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function plural$2(n) { + if (n % 100 === 11) { + return true; + } else if (n % 10 === 1) { + return false; + } + return true; + } + function translate$5(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + switch (key) { + case 's': + return withoutSuffix || isFuture + ? 'nokkrar sekúndur' + : 'nokkrum sekúndum'; + case 'ss': + if (plural$2(number)) { + return ( + result + + (withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum') + ); + } + return result + 'sekúnda'; + case 'm': + return withoutSuffix ? 'mínúta' : 'mínútu'; + case 'mm': + if (plural$2(number)) { + return ( + result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum') + ); + } else if (withoutSuffix) { + return result + 'mínúta'; + } + return result + 'mínútu'; + case 'hh': + if (plural$2(number)) { + return ( + result + + (withoutSuffix || isFuture + ? 'klukkustundir' + : 'klukkustundum') + ); + } + return result + 'klukkustund'; + case 'd': + if (withoutSuffix) { + return 'dagur'; + } + return isFuture ? 'dag' : 'degi'; + case 'dd': + if (plural$2(number)) { + if (withoutSuffix) { + return result + 'dagar'; + } + return result + (isFuture ? 'daga' : 'dögum'); + } else if (withoutSuffix) { + return result + 'dagur'; + } + return result + (isFuture ? 'dag' : 'degi'); + case 'M': + if (withoutSuffix) { + return 'mánuður'; + } + return isFuture ? 'mánuð' : 'mánuði'; + case 'MM': + if (plural$2(number)) { + if (withoutSuffix) { + return result + 'mánuðir'; + } + return result + (isFuture ? 'mánuði' : 'mánuðum'); + } else if (withoutSuffix) { + return result + 'mánuður'; + } + return result + (isFuture ? 'mánuð' : 'mánuði'); + case 'y': + return withoutSuffix || isFuture ? 'ár' : 'ári'; + case 'yy': + if (plural$2(number)) { + return result + (withoutSuffix || isFuture ? 'ár' : 'árum'); + } + return result + (withoutSuffix || isFuture ? 'ár' : 'ári'); + } + } + + moment.defineLocale('is', { + months: 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split( + '_' + ), + monthsShort: 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'), + weekdays: 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split( + '_' + ), + weekdaysShort: 'sun_mán_þri_mið_fim_fös_lau'.split('_'), + weekdaysMin: 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'), + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY [kl.] H:mm', + LLLL: 'dddd, D. MMMM YYYY [kl.] H:mm', + }, + calendar: { + sameDay: '[í dag kl.] LT', + nextDay: '[á morgun kl.] LT', + nextWeek: 'dddd [kl.] LT', + lastDay: '[í gær kl.] LT', + lastWeek: '[síðasta] dddd [kl.] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'eftir %s', + past: 'fyrir %s síðan', + s: translate$5, + ss: translate$5, + m: translate$5, + mm: translate$5, + h: 'klukkustund', + hh: translate$5, + d: translate$5, + dd: translate$5, + M: translate$5, + MM: translate$5, + y: translate$5, + yy: translate$5, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('it-ch', { + months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split( + '_' + ), + monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'), + weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split( + '_' + ), + weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'), + weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Oggi alle] LT', + nextDay: '[Domani alle] LT', + nextWeek: 'dddd [alle] LT', + lastDay: '[Ieri alle] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[la scorsa] dddd [alle] LT'; + default: + return '[lo scorso] dddd [alle] LT'; + } + }, + sameElse: 'L', + }, + relativeTime: { + future: function (s) { + return (/^[0-9].+$/.test(s) ? 'tra' : 'in') + ' ' + s; + }, + past: '%s fa', + s: 'alcuni secondi', + ss: '%d secondi', + m: 'un minuto', + mm: '%d minuti', + h: "un'ora", + hh: '%d ore', + d: 'un giorno', + dd: '%d giorni', + M: 'un mese', + MM: '%d mesi', + y: 'un anno', + yy: '%d anni', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('it', { + months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split( + '_' + ), + monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'), + weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split( + '_' + ), + weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'), + weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: function () { + return ( + '[Oggi a' + + (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") + + ']LT' + ); + }, + nextDay: function () { + return ( + '[Domani a' + + (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") + + ']LT' + ); + }, + nextWeek: function () { + return ( + 'dddd [a' + + (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") + + ']LT' + ); + }, + lastDay: function () { + return ( + '[Ieri a' + + (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") + + ']LT' + ); + }, + lastWeek: function () { + switch (this.day()) { + case 0: + return ( + '[La scorsa] dddd [a' + + (this.hours() > 1 + ? 'lle ' + : this.hours() === 0 + ? ' ' + : "ll'") + + ']LT' + ); + default: + return ( + '[Lo scorso] dddd [a' + + (this.hours() > 1 + ? 'lle ' + : this.hours() === 0 + ? ' ' + : "ll'") + + ']LT' + ); + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'tra %s', + past: '%s fa', + s: 'alcuni secondi', + ss: '%d secondi', + m: 'un minuto', + mm: '%d minuti', + h: "un'ora", + hh: '%d ore', + d: 'un giorno', + dd: '%d giorni', + M: 'un mese', + MM: '%d mesi', + y: 'un anno', + yy: '%d anni', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('ja', { + eras: [ + { + since: '2019-05-01', + offset: 1, + name: '令和', + narrow: '㋿', + abbr: 'R', + }, + { + since: '1989-01-08', + until: '2019-04-30', + offset: 1, + name: '平成', + narrow: '㍻', + abbr: 'H', + }, + { + since: '1926-12-25', + until: '1989-01-07', + offset: 1, + name: '昭和', + narrow: '㍼', + abbr: 'S', + }, + { + since: '1912-07-30', + until: '1926-12-24', + offset: 1, + name: '大正', + narrow: '㍽', + abbr: 'T', + }, + { + since: '1873-01-01', + until: '1912-07-29', + offset: 6, + name: '明治', + narrow: '㍾', + abbr: 'M', + }, + { + since: '0001-01-01', + until: '1873-12-31', + offset: 1, + name: '西暦', + narrow: 'AD', + abbr: 'AD', + }, + { + since: '0000-12-31', + until: -Infinity, + offset: 1, + name: '紀元前', + narrow: 'BC', + abbr: 'BC', + }, + ], + eraYearOrdinalRegex: /(元|\d+)年/, + eraYearOrdinalParse: function (input, match) { + return match[1] === '元' ? 1 : parseInt(match[1] || input, 10); + }, + months: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'), + monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split( + '_' + ), + weekdays: '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'), + weekdaysShort: '日_月_火_水_木_金_土'.split('_'), + weekdaysMin: '日_月_火_水_木_金_土'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY/MM/DD', + LL: 'YYYY年M月D日', + LLL: 'YYYY年M月D日 HH:mm', + LLLL: 'YYYY年M月D日 dddd HH:mm', + l: 'YYYY/MM/DD', + ll: 'YYYY年M月D日', + lll: 'YYYY年M月D日 HH:mm', + llll: 'YYYY年M月D日(ddd) HH:mm', + }, + meridiemParse: /午前|午後/i, + isPM: function (input) { + return input === '午後'; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return '午前'; + } else { + return '午後'; + } + }, + calendar: { + sameDay: '[今日] LT', + nextDay: '[明日] LT', + nextWeek: function (now) { + if (now.week() !== this.week()) { + return '[来週]dddd LT'; + } else { + return 'dddd LT'; + } + }, + lastDay: '[昨日] LT', + lastWeek: function (now) { + if (this.week() !== now.week()) { + return '[先週]dddd LT'; + } else { + return 'dddd LT'; + } + }, + sameElse: 'L', + }, + dayOfMonthOrdinalParse: /\d{1,2}日/, + ordinal: function (number, period) { + switch (period) { + case 'y': + return number === 1 ? '元年' : number + '年'; + case 'd': + case 'D': + case 'DDD': + return number + '日'; + default: + return number; + } + }, + relativeTime: { + future: '%s後', + past: '%s前', + s: '数秒', + ss: '%d秒', + m: '1分', + mm: '%d分', + h: '1時間', + hh: '%d時間', + d: '1日', + dd: '%d日', + M: '1ヶ月', + MM: '%dヶ月', + y: '1年', + yy: '%d年', + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('jv', { + months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'), + weekdays: 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'), + weekdaysShort: 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'), + weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'), + longDateFormat: { + LT: 'HH.mm', + LTS: 'HH.mm.ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY [pukul] HH.mm', + LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm', + }, + meridiemParse: /enjing|siyang|sonten|ndalu/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'enjing') { + return hour; + } else if (meridiem === 'siyang') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'sonten' || meridiem === 'ndalu') { + return hour + 12; + } + }, + meridiem: function (hours, minutes, isLower) { + if (hours < 11) { + return 'enjing'; + } else if (hours < 15) { + return 'siyang'; + } else if (hours < 19) { + return 'sonten'; + } else { + return 'ndalu'; + } + }, + calendar: { + sameDay: '[Dinten puniko pukul] LT', + nextDay: '[Mbenjang pukul] LT', + nextWeek: 'dddd [pukul] LT', + lastDay: '[Kala wingi pukul] LT', + lastWeek: 'dddd [kepengker pukul] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'wonten ing %s', + past: '%s ingkang kepengker', + s: 'sawetawis detik', + ss: '%d detik', + m: 'setunggal menit', + mm: '%d menit', + h: 'setunggal jam', + hh: '%d jam', + d: 'sedinten', + dd: '%d dinten', + M: 'sewulan', + MM: '%d wulan', + y: 'setaun', + yy: '%d taun', + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('ka', { + months: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split( + '_' + ), + monthsShort: 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'), + weekdays: { + standalone: 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split( + '_' + ), + format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split( + '_' + ), + isFormat: /(წინა|შემდეგ)/, + }, + weekdaysShort: 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'), + weekdaysMin: 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[დღეს] LT[-ზე]', + nextDay: '[ხვალ] LT[-ზე]', + lastDay: '[გუშინ] LT[-ზე]', + nextWeek: '[შემდეგ] dddd LT[-ზე]', + lastWeek: '[წინა] dddd LT-ზე', + sameElse: 'L', + }, + relativeTime: { + future: function (s) { + return s.replace(/(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/, function ( + $0, + $1, + $2 + ) { + return $2 === 'ი' ? $1 + 'ში' : $1 + $2 + 'ში'; + }); + }, + past: function (s) { + if (/(წამი|წუთი|საათი|დღე|თვე)/.test(s)) { + return s.replace(/(ი|ე)$/, 'ის წინ'); + } + if (/წელი/.test(s)) { + return s.replace(/წელი$/, 'წლის წინ'); + } + return s; + }, + s: 'რამდენიმე წამი', + ss: '%d წამი', + m: 'წუთი', + mm: '%d წუთი', + h: 'საათი', + hh: '%d საათი', + d: 'დღე', + dd: '%d დღე', + M: 'თვე', + MM: '%d თვე', + y: 'წელი', + yy: '%d წელი', + }, + dayOfMonthOrdinalParse: /0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/, + ordinal: function (number) { + if (number === 0) { + return number; + } + if (number === 1) { + return number + '-ლი'; + } + if ( + number < 20 || + (number <= 100 && number % 20 === 0) || + number % 100 === 0 + ) { + return 'მე-' + number; + } + return number + '-ე'; + }, + week: { + dow: 1, + doy: 7, + }, + }); + + //! moment.js locale configuration + + var suffixes$1 = { + 0: '-ші', + 1: '-ші', + 2: '-ші', + 3: '-ші', + 4: '-ші', + 5: '-ші', + 6: '-шы', + 7: '-ші', + 8: '-ші', + 9: '-шы', + 10: '-шы', + 20: '-шы', + 30: '-шы', + 40: '-шы', + 50: '-ші', + 60: '-шы', + 70: '-ші', + 80: '-ші', + 90: '-шы', + 100: '-ші', + }; + + moment.defineLocale('kk', { + months: 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split( + '_' + ), + monthsShort: 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'), + weekdays: 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split( + '_' + ), + weekdaysShort: 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'), + weekdaysMin: 'жк_дй_сй_ср_бй_жм_сн'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Бүгін сағат] LT', + nextDay: '[Ертең сағат] LT', + nextWeek: 'dddd [сағат] LT', + lastDay: '[Кеше сағат] LT', + lastWeek: '[Өткен аптаның] dddd [сағат] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s ішінде', + past: '%s бұрын', + s: 'бірнеше секунд', + ss: '%d секунд', + m: 'бір минут', + mm: '%d минут', + h: 'бір сағат', + hh: '%d сағат', + d: 'бір күн', + dd: '%d күн', + M: 'бір ай', + MM: '%d ай', + y: 'бір жыл', + yy: '%d жыл', + }, + dayOfMonthOrdinalParse: /\d{1,2}-(ші|шы)/, + ordinal: function (number) { + var a = number % 10, + b = number >= 100 ? 100 : null; + return number + (suffixes$1[number] || suffixes$1[a] || suffixes$1[b]); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap$8 = { + '1': '១', + '2': '២', + '3': '៣', + '4': '៤', + '5': '៥', + '6': '៦', + '7': '៧', + '8': '៨', + '9': '៩', + '0': '០', + }, + numberMap$7 = { + '១': '1', + '២': '2', + '៣': '3', + '៤': '4', + '៥': '5', + '៦': '6', + '៧': '7', + '៨': '8', + '៩': '9', + '០': '0', + }; + + moment.defineLocale('km', { + months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split( + '_' + ), + monthsShort: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split( + '_' + ), + weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'), + weekdaysShort: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'), + weekdaysMin: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + meridiemParse: /ព្រឹក|ល្ងាច/, + isPM: function (input) { + return input === 'ល្ងាច'; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'ព្រឹក'; + } else { + return 'ល្ងាច'; + } + }, + calendar: { + sameDay: '[ថ្ងៃនេះ ម៉ោង] LT', + nextDay: '[ស្អែក ម៉ោង] LT', + nextWeek: 'dddd [ម៉ោង] LT', + lastDay: '[ម្សិលមិញ ម៉ោង] LT', + lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%sទៀត', + past: '%sមុន', + s: 'ប៉ុន្មានវិនាទី', + ss: '%d វិនាទី', + m: 'មួយនាទី', + mm: '%d នាទី', + h: 'មួយម៉ោង', + hh: '%d ម៉ោង', + d: 'មួយថ្ងៃ', + dd: '%d ថ្ងៃ', + M: 'មួយខែ', + MM: '%d ខែ', + y: 'មួយឆ្នាំ', + yy: '%d ឆ្នាំ', + }, + dayOfMonthOrdinalParse: /ទី\d{1,2}/, + ordinal: 'ទី%d', + preparse: function (string) { + return string.replace(/[១២៣៤៥៦៧៨៩០]/g, function (match) { + return numberMap$7[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$8[match]; + }); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap$9 = { + '1': '೧', + '2': '೨', + '3': '೩', + '4': '೪', + '5': '೫', + '6': '೬', + '7': '೭', + '8': '೮', + '9': '೯', + '0': '೦', + }, + numberMap$8 = { + '೧': '1', + '೨': '2', + '೩': '3', + '೪': '4', + '೫': '5', + '೬': '6', + '೭': '7', + '೮': '8', + '೯': '9', + '೦': '0', + }; + + moment.defineLocale('kn', { + months: 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split( + '_' + ), + monthsShort: 'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split( + '_' + ), + weekdaysShort: 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'), + weekdaysMin: 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'), + longDateFormat: { + LT: 'A h:mm', + LTS: 'A h:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm', + LLLL: 'dddd, D MMMM YYYY, A h:mm', + }, + calendar: { + sameDay: '[ಇಂದು] LT', + nextDay: '[ನಾಳೆ] LT', + nextWeek: 'dddd, LT', + lastDay: '[ನಿನ್ನೆ] LT', + lastWeek: '[ಕೊನೆಯ] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s ನಂತರ', + past: '%s ಹಿಂದೆ', + s: 'ಕೆಲವು ಕ್ಷಣಗಳು', + ss: '%d ಸೆಕೆಂಡುಗಳು', + m: 'ಒಂದು ನಿಮಿಷ', + mm: '%d ನಿಮಿಷ', + h: 'ಒಂದು ಗಂಟೆ', + hh: '%d ಗಂಟೆ', + d: 'ಒಂದು ದಿನ', + dd: '%d ದಿನ', + M: 'ಒಂದು ತಿಂಗಳು', + MM: '%d ತಿಂಗಳು', + y: 'ಒಂದು ವರ್ಷ', + yy: '%d ವರ್ಷ', + }, + preparse: function (string) { + return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) { + return numberMap$8[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$9[match]; + }); + }, + meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'ರಾತ್ರಿ') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') { + return hour; + } else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'ಸಂಜೆ') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'ರಾತ್ರಿ'; + } else if (hour < 10) { + return 'ಬೆಳಿಗ್ಗೆ'; + } else if (hour < 17) { + return 'ಮಧ್ಯಾಹ್ನ'; + } else if (hour < 20) { + return 'ಸಂಜೆ'; + } else { + return 'ರಾತ್ರಿ'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}(ನೇ)/, + ordinal: function (number) { + return number + 'ನೇ'; + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('ko', { + months: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'), + monthsShort: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split( + '_' + ), + weekdays: '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'), + weekdaysShort: '일_월_화_수_목_금_토'.split('_'), + weekdaysMin: '일_월_화_수_목_금_토'.split('_'), + longDateFormat: { + LT: 'A h:mm', + LTS: 'A h:mm:ss', + L: 'YYYY.MM.DD.', + LL: 'YYYY년 MMMM D일', + LLL: 'YYYY년 MMMM D일 A h:mm', + LLLL: 'YYYY년 MMMM D일 dddd A h:mm', + l: 'YYYY.MM.DD.', + ll: 'YYYY년 MMMM D일', + lll: 'YYYY년 MMMM D일 A h:mm', + llll: 'YYYY년 MMMM D일 dddd A h:mm', + }, + calendar: { + sameDay: '오늘 LT', + nextDay: '내일 LT', + nextWeek: 'dddd LT', + lastDay: '어제 LT', + lastWeek: '지난주 dddd LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s 후', + past: '%s 전', + s: '몇 초', + ss: '%d초', + m: '1분', + mm: '%d분', + h: '한 시간', + hh: '%d시간', + d: '하루', + dd: '%d일', + M: '한 달', + MM: '%d달', + y: '일 년', + yy: '%d년', + }, + dayOfMonthOrdinalParse: /\d{1,2}(일|월|주)/, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '일'; + case 'M': + return number + '월'; + case 'w': + case 'W': + return number + '주'; + default: + return number; + } + }, + meridiemParse: /오전|오후/, + isPM: function (token) { + return token === '오후'; + }, + meridiem: function (hour, minute, isUpper) { + return hour < 12 ? '오전' : '오후'; + }, + }); + + //! moment.js locale configuration + + var symbolMap$a = { + '1': '١', + '2': '٢', + '3': '٣', + '4': '٤', + '5': '٥', + '6': '٦', + '7': '٧', + '8': '٨', + '9': '٩', + '0': '٠', + }, + numberMap$9 = { + '١': '1', + '٢': '2', + '٣': '3', + '٤': '4', + '٥': '5', + '٦': '6', + '٧': '7', + '٨': '8', + '٩': '9', + '٠': '0', + }, + months$7 = [ + 'کانونی دووەم', + 'شوبات', + 'ئازار', + 'نیسان', + 'ئایار', + 'حوزەیران', + 'تەمموز', + 'ئاب', + 'ئەیلوول', + 'تشرینی یەكەم', + 'تشرینی دووەم', + 'كانونی یەکەم', + ]; + + moment.defineLocale('ku', { + months: months$7, + monthsShort: months$7, + weekdays: 'یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌'.split( + '_' + ), + weekdaysShort: 'یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌'.split( + '_' + ), + weekdaysMin: 'ی_د_س_چ_پ_ه_ش'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + meridiemParse: /ئێواره‌|به‌یانی/, + isPM: function (input) { + return /ئێواره‌/.test(input); + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'به‌یانی'; + } else { + return 'ئێواره‌'; + } + }, + calendar: { + sameDay: '[ئه‌مرۆ كاتژمێر] LT', + nextDay: '[به‌یانی كاتژمێر] LT', + nextWeek: 'dddd [كاتژمێر] LT', + lastDay: '[دوێنێ كاتژمێر] LT', + lastWeek: 'dddd [كاتژمێر] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'له‌ %s', + past: '%s', + s: 'چه‌ند چركه‌یه‌ك', + ss: 'چركه‌ %d', + m: 'یه‌ك خوله‌ك', + mm: '%d خوله‌ك', + h: 'یه‌ك كاتژمێر', + hh: '%d كاتژمێر', + d: 'یه‌ك ڕۆژ', + dd: '%d ڕۆژ', + M: 'یه‌ك مانگ', + MM: '%d مانگ', + y: 'یه‌ك ساڵ', + yy: '%d ساڵ', + }, + preparse: function (string) { + return string + .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { + return numberMap$9[match]; + }) + .replace(/،/g, ','); + }, + postformat: function (string) { + return string + .replace(/\d/g, function (match) { + return symbolMap$a[match]; + }) + .replace(/,/g, '،'); + }, + week: { + dow: 6, // Saturday is the first day of the week. + doy: 12, // The week that contains Jan 12th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var suffixes$2 = { + 0: '-чү', + 1: '-чи', + 2: '-чи', + 3: '-чү', + 4: '-чү', + 5: '-чи', + 6: '-чы', + 7: '-чи', + 8: '-чи', + 9: '-чу', + 10: '-чу', + 20: '-чы', + 30: '-чу', + 40: '-чы', + 50: '-чү', + 60: '-чы', + 70: '-чи', + 80: '-чи', + 90: '-чу', + 100: '-чү', + }; + + moment.defineLocale('ky', { + months: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split( + '_' + ), + monthsShort: 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split( + '_' + ), + weekdays: 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split( + '_' + ), + weekdaysShort: 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'), + weekdaysMin: 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Бүгүн саат] LT', + nextDay: '[Эртең саат] LT', + nextWeek: 'dddd [саат] LT', + lastDay: '[Кечээ саат] LT', + lastWeek: '[Өткөн аптанын] dddd [күнү] [саат] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s ичинде', + past: '%s мурун', + s: 'бирнече секунд', + ss: '%d секунд', + m: 'бир мүнөт', + mm: '%d мүнөт', + h: 'бир саат', + hh: '%d саат', + d: 'бир күн', + dd: '%d күн', + M: 'бир ай', + MM: '%d ай', + y: 'бир жыл', + yy: '%d жыл', + }, + dayOfMonthOrdinalParse: /\d{1,2}-(чи|чы|чү|чу)/, + ordinal: function (number) { + var a = number % 10, + b = number >= 100 ? 100 : null; + return number + (suffixes$2[number] || suffixes$2[a] || suffixes$2[b]); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function processRelativeTime$6(number, withoutSuffix, key, isFuture) { + var format = { + m: ['eng Minutt', 'enger Minutt'], + h: ['eng Stonn', 'enger Stonn'], + d: ['een Dag', 'engem Dag'], + M: ['ee Mount', 'engem Mount'], + y: ['ee Joer', 'engem Joer'], + }; + return withoutSuffix ? format[key][0] : format[key][1]; + } + function processFutureTime(string) { + var number = string.substr(0, string.indexOf(' ')); + if (eifelerRegelAppliesToNumber(number)) { + return 'a ' + string; + } + return 'an ' + string; + } + function processPastTime(string) { + var number = string.substr(0, string.indexOf(' ')); + if (eifelerRegelAppliesToNumber(number)) { + return 'viru ' + string; + } + return 'virun ' + string; + } + /** + * Returns true if the word before the given number loses the '-n' ending. + * e.g. 'an 10 Deeg' but 'a 5 Deeg' + * + * @param number {integer} + * @returns {boolean} + */ + function eifelerRegelAppliesToNumber(number) { + number = parseInt(number, 10); + if (isNaN(number)) { + return false; + } + if (number < 0) { + // Negative Number --> always true + return true; + } else if (number < 10) { + // Only 1 digit + if (4 <= number && number <= 7) { + return true; + } + return false; + } else if (number < 100) { + // 2 digits + var lastDigit = number % 10, + firstDigit = number / 10; + if (lastDigit === 0) { + return eifelerRegelAppliesToNumber(firstDigit); + } + return eifelerRegelAppliesToNumber(lastDigit); + } else if (number < 10000) { + // 3 or 4 digits --> recursively check first digit + while (number >= 10) { + number = number / 10; + } + return eifelerRegelAppliesToNumber(number); + } else { + // Anything larger than 4 digits: recursively check first n-3 digits + number = number / 1000; + return eifelerRegelAppliesToNumber(number); + } + } + + moment.defineLocale('lb', { + months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split( + '_' + ), + monthsShort: 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split( + '_' + ), + weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'), + weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm [Auer]', + LTS: 'H:mm:ss [Auer]', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm [Auer]', + LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]', + }, + calendar: { + sameDay: '[Haut um] LT', + sameElse: 'L', + nextDay: '[Muer um] LT', + nextWeek: 'dddd [um] LT', + lastDay: '[Gëschter um] LT', + lastWeek: function () { + // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule + switch (this.day()) { + case 2: + case 4: + return '[Leschten] dddd [um] LT'; + default: + return '[Leschte] dddd [um] LT'; + } + }, + }, + relativeTime: { + future: processFutureTime, + past: processPastTime, + s: 'e puer Sekonnen', + ss: '%d Sekonnen', + m: processRelativeTime$6, + mm: '%d Minutten', + h: processRelativeTime$6, + hh: '%d Stonnen', + d: processRelativeTime$6, + dd: '%d Deeg', + M: processRelativeTime$6, + MM: '%d Méint', + y: processRelativeTime$6, + yy: '%d Joer', + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('lo', { + months: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split( + '_' + ), + monthsShort: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split( + '_' + ), + weekdays: 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'), + weekdaysShort: 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'), + weekdaysMin: 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'ວັນdddd D MMMM YYYY HH:mm', + }, + meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/, + isPM: function (input) { + return input === 'ຕອນແລງ'; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'ຕອນເຊົ້າ'; + } else { + return 'ຕອນແລງ'; + } + }, + calendar: { + sameDay: '[ມື້ນີ້ເວລາ] LT', + nextDay: '[ມື້ອື່ນເວລາ] LT', + nextWeek: '[ວັນ]dddd[ໜ້າເວລາ] LT', + lastDay: '[ມື້ວານນີ້ເວລາ] LT', + lastWeek: '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'ອີກ %s', + past: '%sຜ່ານມາ', + s: 'ບໍ່ເທົ່າໃດວິນາທີ', + ss: '%d ວິນາທີ', + m: '1 ນາທີ', + mm: '%d ນາທີ', + h: '1 ຊົ່ວໂມງ', + hh: '%d ຊົ່ວໂມງ', + d: '1 ມື້', + dd: '%d ມື້', + M: '1 ເດືອນ', + MM: '%d ເດືອນ', + y: '1 ປີ', + yy: '%d ປີ', + }, + dayOfMonthOrdinalParse: /(ທີ່)\d{1,2}/, + ordinal: function (number) { + return 'ທີ່' + number; + }, + }); + + //! moment.js locale configuration + + var units = { + ss: 'sekundė_sekundžių_sekundes', + m: 'minutė_minutės_minutę', + mm: 'minutės_minučių_minutes', + h: 'valanda_valandos_valandą', + hh: 'valandos_valandų_valandas', + d: 'diena_dienos_dieną', + dd: 'dienos_dienų_dienas', + M: 'mėnuo_mėnesio_mėnesį', + MM: 'mėnesiai_mėnesių_mėnesius', + y: 'metai_metų_metus', + yy: 'metai_metų_metus', + }; + function translateSeconds(number, withoutSuffix, key, isFuture) { + if (withoutSuffix) { + return 'kelios sekundės'; + } else { + return isFuture ? 'kelių sekundžių' : 'kelias sekundes'; + } + } + function translateSingular(number, withoutSuffix, key, isFuture) { + return withoutSuffix + ? forms(key)[0] + : isFuture + ? forms(key)[1] + : forms(key)[2]; + } + function special(number) { + return number % 10 === 0 || (number > 10 && number < 20); + } + function forms(key) { + return units[key].split('_'); + } + function translate$6(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + if (number === 1) { + return ( + result + translateSingular(number, withoutSuffix, key[0], isFuture) + ); + } else if (withoutSuffix) { + return result + (special(number) ? forms(key)[1] : forms(key)[0]); + } else { + if (isFuture) { + return result + forms(key)[1]; + } else { + return result + (special(number) ? forms(key)[1] : forms(key)[2]); + } + } + } + moment.defineLocale('lt', { + months: { + format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split( + '_' + ), + standalone: 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split( + '_' + ), + isFormat: /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/, + }, + monthsShort: 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'), + weekdays: { + format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split( + '_' + ), + standalone: 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split( + '_' + ), + isFormat: /dddd HH:mm/, + }, + weekdaysShort: 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'), + weekdaysMin: 'S_P_A_T_K_Pn_Š'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY-MM-DD', + LL: 'YYYY [m.] MMMM D [d.]', + LLL: 'YYYY [m.] MMMM D [d.], HH:mm [val.]', + LLLL: 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]', + l: 'YYYY-MM-DD', + ll: 'YYYY [m.] MMMM D [d.]', + lll: 'YYYY [m.] MMMM D [d.], HH:mm [val.]', + llll: 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]', + }, + calendar: { + sameDay: '[Šiandien] LT', + nextDay: '[Rytoj] LT', + nextWeek: 'dddd LT', + lastDay: '[Vakar] LT', + lastWeek: '[Praėjusį] dddd LT', + sameElse: 'L', + }, + relativeTime: { + future: 'po %s', + past: 'prieš %s', + s: translateSeconds, + ss: translate$6, + m: translateSingular, + mm: translate$6, + h: translateSingular, + hh: translate$6, + d: translateSingular, + dd: translate$6, + M: translateSingular, + MM: translate$6, + y: translateSingular, + yy: translate$6, + }, + dayOfMonthOrdinalParse: /\d{1,2}-oji/, + ordinal: function (number) { + return number + '-oji'; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var units$1 = { + ss: 'sekundes_sekundēm_sekunde_sekundes'.split('_'), + m: 'minūtes_minūtēm_minūte_minūtes'.split('_'), + mm: 'minūtes_minūtēm_minūte_minūtes'.split('_'), + h: 'stundas_stundām_stunda_stundas'.split('_'), + hh: 'stundas_stundām_stunda_stundas'.split('_'), + d: 'dienas_dienām_diena_dienas'.split('_'), + dd: 'dienas_dienām_diena_dienas'.split('_'), + M: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'), + MM: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'), + y: 'gada_gadiem_gads_gadi'.split('_'), + yy: 'gada_gadiem_gads_gadi'.split('_'), + }; + /** + * @param withoutSuffix boolean true = a length of time; false = before/after a period of time. + */ + function format(forms, number, withoutSuffix) { + if (withoutSuffix) { + // E.g. "21 minūte", "3 minūtes". + return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3]; + } else { + // E.g. "21 minūtes" as in "pēc 21 minūtes". + // E.g. "3 minūtēm" as in "pēc 3 minūtēm". + return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1]; + } + } + function relativeTimeWithPlural$1(number, withoutSuffix, key) { + return number + ' ' + format(units$1[key], number, withoutSuffix); + } + function relativeTimeWithSingular(number, withoutSuffix, key) { + return format(units$1[key], number, withoutSuffix); + } + function relativeSeconds(number, withoutSuffix) { + return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm'; + } + + moment.defineLocale('lv', { + months: 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split( + '_' + ), + monthsShort: 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'), + weekdays: 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split( + '_' + ), + weekdaysShort: 'Sv_P_O_T_C_Pk_S'.split('_'), + weekdaysMin: 'Sv_P_O_T_C_Pk_S'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY.', + LL: 'YYYY. [gada] D. MMMM', + LLL: 'YYYY. [gada] D. MMMM, HH:mm', + LLLL: 'YYYY. [gada] D. MMMM, dddd, HH:mm', + }, + calendar: { + sameDay: '[Šodien pulksten] LT', + nextDay: '[Rīt pulksten] LT', + nextWeek: 'dddd [pulksten] LT', + lastDay: '[Vakar pulksten] LT', + lastWeek: '[Pagājušā] dddd [pulksten] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'pēc %s', + past: 'pirms %s', + s: relativeSeconds, + ss: relativeTimeWithPlural$1, + m: relativeTimeWithSingular, + mm: relativeTimeWithPlural$1, + h: relativeTimeWithSingular, + hh: relativeTimeWithPlural$1, + d: relativeTimeWithSingular, + dd: relativeTimeWithPlural$1, + M: relativeTimeWithSingular, + MM: relativeTimeWithPlural$1, + y: relativeTimeWithSingular, + yy: relativeTimeWithPlural$1, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var translator = { + words: { + //Different grammatical cases + ss: ['sekund', 'sekunda', 'sekundi'], + m: ['jedan minut', 'jednog minuta'], + mm: ['minut', 'minuta', 'minuta'], + h: ['jedan sat', 'jednog sata'], + hh: ['sat', 'sata', 'sati'], + dd: ['dan', 'dana', 'dana'], + MM: ['mjesec', 'mjeseca', 'mjeseci'], + yy: ['godina', 'godine', 'godina'], + }, + correctGrammaticalCase: function (number, wordKey) { + return number === 1 + ? wordKey[0] + : number >= 2 && number <= 4 + ? wordKey[1] + : wordKey[2]; + }, + translate: function (number, withoutSuffix, key) { + var wordKey = translator.words[key]; + if (key.length === 1) { + return withoutSuffix ? wordKey[0] : wordKey[1]; + } else { + return ( + number + + ' ' + + translator.correctGrammaticalCase(number, wordKey) + ); + } + }, + }; + + moment.defineLocale('me', { + months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split( + '_' + ), + monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split( + '_' + ), + weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'), + weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[danas u] LT', + nextDay: '[sjutra u] LT', + + nextWeek: function () { + switch (this.day()) { + case 0: + return '[u] [nedjelju] [u] LT'; + case 3: + return '[u] [srijedu] [u] LT'; + case 6: + return '[u] [subotu] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[u] dddd [u] LT'; + } + }, + lastDay: '[juče u] LT', + lastWeek: function () { + var lastWeekDays = [ + '[prošle] [nedjelje] [u] LT', + '[prošlog] [ponedjeljka] [u] LT', + '[prošlog] [utorka] [u] LT', + '[prošle] [srijede] [u] LT', + '[prošlog] [četvrtka] [u] LT', + '[prošlog] [petka] [u] LT', + '[prošle] [subote] [u] LT', + ]; + return lastWeekDays[this.day()]; + }, + sameElse: 'L', + }, + relativeTime: { + future: 'za %s', + past: 'prije %s', + s: 'nekoliko sekundi', + ss: translator.translate, + m: translator.translate, + mm: translator.translate, + h: translator.translate, + hh: translator.translate, + d: 'dan', + dd: translator.translate, + M: 'mjesec', + MM: translator.translate, + y: 'godinu', + yy: translator.translate, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('mi', { + months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split( + '_' + ), + monthsShort: 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split( + '_' + ), + monthsRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i, + monthsStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i, + monthsShortRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i, + monthsShortStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i, + weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'), + weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'), + weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY [i] HH:mm', + LLLL: 'dddd, D MMMM YYYY [i] HH:mm', + }, + calendar: { + sameDay: '[i teie mahana, i] LT', + nextDay: '[apopo i] LT', + nextWeek: 'dddd [i] LT', + lastDay: '[inanahi i] LT', + lastWeek: 'dddd [whakamutunga i] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'i roto i %s', + past: '%s i mua', + s: 'te hēkona ruarua', + ss: '%d hēkona', + m: 'he meneti', + mm: '%d meneti', + h: 'te haora', + hh: '%d haora', + d: 'he ra', + dd: '%d ra', + M: 'he marama', + MM: '%d marama', + y: 'he tau', + yy: '%d tau', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('mk', { + months: 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split( + '_' + ), + monthsShort: 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'), + weekdays: 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split( + '_' + ), + weekdaysShort: 'нед_пон_вто_сре_чет_пет_саб'.split('_'), + weekdaysMin: 'нe_пo_вт_ср_че_пе_сa'.split('_'), + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'D.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY H:mm', + LLLL: 'dddd, D MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[Денес во] LT', + nextDay: '[Утре во] LT', + nextWeek: '[Во] dddd [во] LT', + lastDay: '[Вчера во] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + case 3: + case 6: + return '[Изминатата] dddd [во] LT'; + case 1: + case 2: + case 4: + case 5: + return '[Изминатиот] dddd [во] LT'; + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'за %s', + past: 'пред %s', + s: 'неколку секунди', + ss: '%d секунди', + m: 'една минута', + mm: '%d минути', + h: 'еден час', + hh: '%d часа', + d: 'еден ден', + dd: '%d дена', + M: 'еден месец', + MM: '%d месеци', + y: 'една година', + yy: '%d години', + }, + dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/, + ordinal: function (number) { + var lastDigit = number % 10, + last2Digits = number % 100; + if (number === 0) { + return number + '-ев'; + } else if (last2Digits === 0) { + return number + '-ен'; + } else if (last2Digits > 10 && last2Digits < 20) { + return number + '-ти'; + } else if (lastDigit === 1) { + return number + '-ви'; + } else if (lastDigit === 2) { + return number + '-ри'; + } else if (lastDigit === 7 || lastDigit === 8) { + return number + '-ми'; + } else { + return number + '-ти'; + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('ml', { + months: 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split( + '_' + ), + monthsShort: 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split( + '_' + ), + weekdaysShort: 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'), + weekdaysMin: 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'), + longDateFormat: { + LT: 'A h:mm -നു', + LTS: 'A h:mm:ss -നു', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm -നു', + LLLL: 'dddd, D MMMM YYYY, A h:mm -നു', + }, + calendar: { + sameDay: '[ഇന്ന്] LT', + nextDay: '[നാളെ] LT', + nextWeek: 'dddd, LT', + lastDay: '[ഇന്നലെ] LT', + lastWeek: '[കഴിഞ്ഞ] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s കഴിഞ്ഞ്', + past: '%s മുൻപ്', + s: 'അൽപ നിമിഷങ്ങൾ', + ss: '%d സെക്കൻഡ്', + m: 'ഒരു മിനിറ്റ്', + mm: '%d മിനിറ്റ്', + h: 'ഒരു മണിക്കൂർ', + hh: '%d മണിക്കൂർ', + d: 'ഒരു ദിവസം', + dd: '%d ദിവസം', + M: 'ഒരു മാസം', + MM: '%d മാസം', + y: 'ഒരു വർഷം', + yy: '%d വർഷം', + }, + meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if ( + (meridiem === 'രാത്രി' && hour >= 4) || + meridiem === 'ഉച്ച കഴിഞ്ഞ്' || + meridiem === 'വൈകുന്നേരം' + ) { + return hour + 12; + } else { + return hour; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'രാത്രി'; + } else if (hour < 12) { + return 'രാവിലെ'; + } else if (hour < 17) { + return 'ഉച്ച കഴിഞ്ഞ്'; + } else if (hour < 20) { + return 'വൈകുന്നേരം'; + } else { + return 'രാത്രി'; + } + }, + }); + + //! moment.js locale configuration + + function translate$7(number, withoutSuffix, key, isFuture) { + switch (key) { + case 's': + return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын'; + case 'ss': + return number + (withoutSuffix ? ' секунд' : ' секундын'); + case 'm': + case 'mm': + return number + (withoutSuffix ? ' минут' : ' минутын'); + case 'h': + case 'hh': + return number + (withoutSuffix ? ' цаг' : ' цагийн'); + case 'd': + case 'dd': + return number + (withoutSuffix ? ' өдөр' : ' өдрийн'); + case 'M': + case 'MM': + return number + (withoutSuffix ? ' сар' : ' сарын'); + case 'y': + case 'yy': + return number + (withoutSuffix ? ' жил' : ' жилийн'); + default: + return number; + } + } + + moment.defineLocale('mn', { + months: 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split( + '_' + ), + monthsShort: '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба'.split('_'), + weekdaysShort: 'Ням_Дав_Мяг_Лха_Пүр_Баа_Бям'.split('_'), + weekdaysMin: 'Ня_Да_Мя_Лх_Пү_Ба_Бя'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY-MM-DD', + LL: 'YYYY оны MMMMын D', + LLL: 'YYYY оны MMMMын D HH:mm', + LLLL: 'dddd, YYYY оны MMMMын D HH:mm', + }, + meridiemParse: /ҮӨ|ҮХ/i, + isPM: function (input) { + return input === 'ҮХ'; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'ҮӨ'; + } else { + return 'ҮХ'; + } + }, + calendar: { + sameDay: '[Өнөөдөр] LT', + nextDay: '[Маргааш] LT', + nextWeek: '[Ирэх] dddd LT', + lastDay: '[Өчигдөр] LT', + lastWeek: '[Өнгөрсөн] dddd LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s дараа', + past: '%s өмнө', + s: translate$7, + ss: translate$7, + m: translate$7, + mm: translate$7, + h: translate$7, + hh: translate$7, + d: translate$7, + dd: translate$7, + M: translate$7, + MM: translate$7, + y: translate$7, + yy: translate$7, + }, + dayOfMonthOrdinalParse: /\d{1,2} өдөр/, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + ' өдөр'; + default: + return number; + } + }, + }); + + //! moment.js locale configuration + + var symbolMap$b = { + '1': '१', + '2': '२', + '3': '३', + '4': '४', + '5': '५', + '6': '६', + '7': '७', + '8': '८', + '9': '९', + '0': '०', + }, + numberMap$a = { + '१': '1', + '२': '2', + '३': '3', + '४': '4', + '५': '5', + '६': '6', + '७': '7', + '८': '8', + '९': '9', + '०': '0', + }; + + function relativeTimeMr(number, withoutSuffix, string, isFuture) { + var output = ''; + if (withoutSuffix) { + switch (string) { + case 's': + output = 'काही सेकंद'; + break; + case 'ss': + output = '%d सेकंद'; + break; + case 'm': + output = 'एक मिनिट'; + break; + case 'mm': + output = '%d मिनिटे'; + break; + case 'h': + output = 'एक तास'; + break; + case 'hh': + output = '%d तास'; + break; + case 'd': + output = 'एक दिवस'; + break; + case 'dd': + output = '%d दिवस'; + break; + case 'M': + output = 'एक महिना'; + break; + case 'MM': + output = '%d महिने'; + break; + case 'y': + output = 'एक वर्ष'; + break; + case 'yy': + output = '%d वर्षे'; + break; + } + } else { + switch (string) { + case 's': + output = 'काही सेकंदां'; + break; + case 'ss': + output = '%d सेकंदां'; + break; + case 'm': + output = 'एका मिनिटा'; + break; + case 'mm': + output = '%d मिनिटां'; + break; + case 'h': + output = 'एका तासा'; + break; + case 'hh': + output = '%d तासां'; + break; + case 'd': + output = 'एका दिवसा'; + break; + case 'dd': + output = '%d दिवसां'; + break; + case 'M': + output = 'एका महिन्या'; + break; + case 'MM': + output = '%d महिन्यां'; + break; + case 'y': + output = 'एका वर्षा'; + break; + case 'yy': + output = '%d वर्षां'; + break; + } + } + return output.replace(/%d/i, number); + } + + moment.defineLocale('mr', { + months: 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split( + '_' + ), + monthsShort: 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'), + weekdaysShort: 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'), + weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'), + longDateFormat: { + LT: 'A h:mm वाजता', + LTS: 'A h:mm:ss वाजता', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm वाजता', + LLLL: 'dddd, D MMMM YYYY, A h:mm वाजता', + }, + calendar: { + sameDay: '[आज] LT', + nextDay: '[उद्या] LT', + nextWeek: 'dddd, LT', + lastDay: '[काल] LT', + lastWeek: '[मागील] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%sमध्ये', + past: '%sपूर्वी', + s: relativeTimeMr, + ss: relativeTimeMr, + m: relativeTimeMr, + mm: relativeTimeMr, + h: relativeTimeMr, + hh: relativeTimeMr, + d: relativeTimeMr, + dd: relativeTimeMr, + M: relativeTimeMr, + MM: relativeTimeMr, + y: relativeTimeMr, + yy: relativeTimeMr, + }, + preparse: function (string) { + return string.replace(/[१२३४५६७८९०]/g, function (match) { + return numberMap$a[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$b[match]; + }); + }, + meridiemParse: /पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'पहाटे' || meridiem === 'सकाळी') { + return hour; + } else if ( + meridiem === 'दुपारी' || + meridiem === 'सायंकाळी' || + meridiem === 'रात्री' + ) { + return hour >= 12 ? hour : hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour >= 0 && hour < 6) { + return 'पहाटे'; + } else if (hour < 12) { + return 'सकाळी'; + } else if (hour < 17) { + return 'दुपारी'; + } else if (hour < 20) { + return 'सायंकाळी'; + } else { + return 'रात्री'; + } + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('ms-my', { + months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'), + weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'), + weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'), + weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'), + longDateFormat: { + LT: 'HH.mm', + LTS: 'HH.mm.ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY [pukul] HH.mm', + LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm', + }, + meridiemParse: /pagi|tengahari|petang|malam/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'pagi') { + return hour; + } else if (meridiem === 'tengahari') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'petang' || meridiem === 'malam') { + return hour + 12; + } + }, + meridiem: function (hours, minutes, isLower) { + if (hours < 11) { + return 'pagi'; + } else if (hours < 15) { + return 'tengahari'; + } else if (hours < 19) { + return 'petang'; + } else { + return 'malam'; + } + }, + calendar: { + sameDay: '[Hari ini pukul] LT', + nextDay: '[Esok pukul] LT', + nextWeek: 'dddd [pukul] LT', + lastDay: '[Kelmarin pukul] LT', + lastWeek: 'dddd [lepas pukul] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'dalam %s', + past: '%s yang lepas', + s: 'beberapa saat', + ss: '%d saat', + m: 'seminit', + mm: '%d minit', + h: 'sejam', + hh: '%d jam', + d: 'sehari', + dd: '%d hari', + M: 'sebulan', + MM: '%d bulan', + y: 'setahun', + yy: '%d tahun', + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('ms', { + months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'), + weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'), + weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'), + weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'), + longDateFormat: { + LT: 'HH.mm', + LTS: 'HH.mm.ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY [pukul] HH.mm', + LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm', + }, + meridiemParse: /pagi|tengahari|petang|malam/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'pagi') { + return hour; + } else if (meridiem === 'tengahari') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'petang' || meridiem === 'malam') { + return hour + 12; + } + }, + meridiem: function (hours, minutes, isLower) { + if (hours < 11) { + return 'pagi'; + } else if (hours < 15) { + return 'tengahari'; + } else if (hours < 19) { + return 'petang'; + } else { + return 'malam'; + } + }, + calendar: { + sameDay: '[Hari ini pukul] LT', + nextDay: '[Esok pukul] LT', + nextWeek: 'dddd [pukul] LT', + lastDay: '[Kelmarin pukul] LT', + lastWeek: 'dddd [lepas pukul] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'dalam %s', + past: '%s yang lepas', + s: 'beberapa saat', + ss: '%d saat', + m: 'seminit', + mm: '%d minit', + h: 'sejam', + hh: '%d jam', + d: 'sehari', + dd: '%d hari', + M: 'sebulan', + MM: '%d bulan', + y: 'setahun', + yy: '%d tahun', + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('mt', { + months: 'Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru'.split( + '_' + ), + monthsShort: 'Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ'.split('_'), + weekdays: 'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt'.split( + '_' + ), + weekdaysShort: 'Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib'.split('_'), + weekdaysMin: 'Ħa_Tn_Tl_Er_Ħa_Ġi_Si'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Illum fil-]LT', + nextDay: '[Għada fil-]LT', + nextWeek: 'dddd [fil-]LT', + lastDay: '[Il-bieraħ fil-]LT', + lastWeek: 'dddd [li għadda] [fil-]LT', + sameElse: 'L', + }, + relativeTime: { + future: 'f’ %s', + past: '%s ilu', + s: 'ftit sekondi', + ss: '%d sekondi', + m: 'minuta', + mm: '%d minuti', + h: 'siegħa', + hh: '%d siegħat', + d: 'ġurnata', + dd: '%d ġranet', + M: 'xahar', + MM: '%d xhur', + y: 'sena', + yy: '%d sni', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap$c = { + '1': '၁', + '2': '၂', + '3': '၃', + '4': '၄', + '5': '၅', + '6': '၆', + '7': '၇', + '8': '၈', + '9': '၉', + '0': '၀', + }, + numberMap$b = { + '၁': '1', + '၂': '2', + '၃': '3', + '၄': '4', + '၅': '5', + '၆': '6', + '၇': '7', + '၈': '8', + '၉': '9', + '၀': '0', + }; + + moment.defineLocale('my', { + months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split( + '_' + ), + monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'), + weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split( + '_' + ), + weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'), + weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'), + + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[ယနေ.] LT [မှာ]', + nextDay: '[မနက်ဖြန်] LT [မှာ]', + nextWeek: 'dddd LT [မှာ]', + lastDay: '[မနေ.က] LT [မှာ]', + lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]', + sameElse: 'L', + }, + relativeTime: { + future: 'လာမည့် %s မှာ', + past: 'လွန်ခဲ့သော %s က', + s: 'စက္ကန်.အနည်းငယ်', + ss: '%d စက္ကန့်', + m: 'တစ်မိနစ်', + mm: '%d မိနစ်', + h: 'တစ်နာရီ', + hh: '%d နာရီ', + d: 'တစ်ရက်', + dd: '%d ရက်', + M: 'တစ်လ', + MM: '%d လ', + y: 'တစ်နှစ်', + yy: '%d နှစ်', + }, + preparse: function (string) { + return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) { + return numberMap$b[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$c[match]; + }); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('nb', { + months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split( + '_' + ), + monthsShort: 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'), + weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'), + weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY [kl.] HH:mm', + LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm', + }, + calendar: { + sameDay: '[i dag kl.] LT', + nextDay: '[i morgen kl.] LT', + nextWeek: 'dddd [kl.] LT', + lastDay: '[i går kl.] LT', + lastWeek: '[forrige] dddd [kl.] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'om %s', + past: '%s siden', + s: 'noen sekunder', + ss: '%d sekunder', + m: 'ett minutt', + mm: '%d minutter', + h: 'en time', + hh: '%d timer', + d: 'en dag', + dd: '%d dager', + M: 'en måned', + MM: '%d måneder', + y: 'ett år', + yy: '%d år', + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap$d = { + '1': '१', + '2': '२', + '3': '३', + '4': '४', + '5': '५', + '6': '६', + '7': '७', + '8': '८', + '9': '९', + '0': '०', + }, + numberMap$c = { + '१': '1', + '२': '2', + '३': '3', + '४': '4', + '५': '5', + '६': '6', + '७': '7', + '८': '8', + '९': '9', + '०': '0', + }; + + moment.defineLocale('ne', { + months: 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split( + '_' + ), + monthsShort: 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split( + '_' + ), + weekdaysShort: 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'), + weekdaysMin: 'आ._सो._मं._बु._बि._शु._श.'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'Aको h:mm बजे', + LTS: 'Aको h:mm:ss बजे', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, Aको h:mm बजे', + LLLL: 'dddd, D MMMM YYYY, Aको h:mm बजे', + }, + preparse: function (string) { + return string.replace(/[१२३४५६७८९०]/g, function (match) { + return numberMap$c[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$d[match]; + }); + }, + meridiemParse: /राति|बिहान|दिउँसो|साँझ/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'राति') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'बिहान') { + return hour; + } else if (meridiem === 'दिउँसो') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'साँझ') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 3) { + return 'राति'; + } else if (hour < 12) { + return 'बिहान'; + } else if (hour < 16) { + return 'दिउँसो'; + } else if (hour < 20) { + return 'साँझ'; + } else { + return 'राति'; + } + }, + calendar: { + sameDay: '[आज] LT', + nextDay: '[भोलि] LT', + nextWeek: '[आउँदो] dddd[,] LT', + lastDay: '[हिजो] LT', + lastWeek: '[गएको] dddd[,] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%sमा', + past: '%s अगाडि', + s: 'केही क्षण', + ss: '%d सेकेण्ड', + m: 'एक मिनेट', + mm: '%d मिनेट', + h: 'एक घण्टा', + hh: '%d घण्टा', + d: 'एक दिन', + dd: '%d दिन', + M: 'एक महिना', + MM: '%d महिना', + y: 'एक बर्ष', + yy: '%d बर्ष', + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var monthsShortWithDots$1 = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split( + '_' + ), + monthsShortWithoutDots$1 = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split( + '_' + ), + monthsParse$6 = [ + /^jan/i, + /^feb/i, + /^maart|mrt.?$/i, + /^apr/i, + /^mei$/i, + /^jun[i.]?$/i, + /^jul[i.]?$/i, + /^aug/i, + /^sep/i, + /^okt/i, + /^nov/i, + /^dec/i, + ], + monthsRegex$6 = /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i; + + moment.defineLocale('nl-be', { + months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split( + '_' + ), + monthsShort: function (m, format) { + if (!m) { + return monthsShortWithDots$1; + } else if (/-MMM-/.test(format)) { + return monthsShortWithoutDots$1[m.month()]; + } else { + return monthsShortWithDots$1[m.month()]; + } + }, + + monthsRegex: monthsRegex$6, + monthsShortRegex: monthsRegex$6, + monthsStrictRegex: /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i, + monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i, + + monthsParse: monthsParse$6, + longMonthsParse: monthsParse$6, + shortMonthsParse: monthsParse$6, + + weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split( + '_' + ), + weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'), + weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[vandaag om] LT', + nextDay: '[morgen om] LT', + nextWeek: 'dddd [om] LT', + lastDay: '[gisteren om] LT', + lastWeek: '[afgelopen] dddd [om] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'over %s', + past: '%s geleden', + s: 'een paar seconden', + ss: '%d seconden', + m: 'één minuut', + mm: '%d minuten', + h: 'één uur', + hh: '%d uur', + d: 'één dag', + dd: '%d dagen', + M: 'één maand', + MM: '%d maanden', + y: 'één jaar', + yy: '%d jaar', + }, + dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, + ordinal: function (number) { + return ( + number + + (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de') + ); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var monthsShortWithDots$2 = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split( + '_' + ), + monthsShortWithoutDots$2 = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split( + '_' + ), + monthsParse$7 = [ + /^jan/i, + /^feb/i, + /^maart|mrt.?$/i, + /^apr/i, + /^mei$/i, + /^jun[i.]?$/i, + /^jul[i.]?$/i, + /^aug/i, + /^sep/i, + /^okt/i, + /^nov/i, + /^dec/i, + ], + monthsRegex$7 = /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i; + + moment.defineLocale('nl', { + months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split( + '_' + ), + monthsShort: function (m, format) { + if (!m) { + return monthsShortWithDots$2; + } else if (/-MMM-/.test(format)) { + return monthsShortWithoutDots$2[m.month()]; + } else { + return monthsShortWithDots$2[m.month()]; + } + }, + + monthsRegex: monthsRegex$7, + monthsShortRegex: monthsRegex$7, + monthsStrictRegex: /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i, + monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i, + + monthsParse: monthsParse$7, + longMonthsParse: monthsParse$7, + shortMonthsParse: monthsParse$7, + + weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split( + '_' + ), + weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'), + weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD-MM-YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[vandaag om] LT', + nextDay: '[morgen om] LT', + nextWeek: 'dddd [om] LT', + lastDay: '[gisteren om] LT', + lastWeek: '[afgelopen] dddd [om] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'over %s', + past: '%s geleden', + s: 'een paar seconden', + ss: '%d seconden', + m: 'één minuut', + mm: '%d minuten', + h: 'één uur', + hh: '%d uur', + d: 'één dag', + dd: '%d dagen', + M: 'één maand', + MM: '%d maanden', + y: 'één jaar', + yy: '%d jaar', + }, + dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, + ordinal: function (number) { + return ( + number + + (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de') + ); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('nn', { + months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split( + '_' + ), + monthsShort: 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'), + weekdaysShort: 'su._må._ty._on._to._fr._lau.'.split('_'), + weekdaysMin: 'su_må_ty_on_to_fr_la'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY [kl.] H:mm', + LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm', + }, + calendar: { + sameDay: '[I dag klokka] LT', + nextDay: '[I morgon klokka] LT', + nextWeek: 'dddd [klokka] LT', + lastDay: '[I går klokka] LT', + lastWeek: '[Føregåande] dddd [klokka] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'om %s', + past: '%s sidan', + s: 'nokre sekund', + ss: '%d sekund', + m: 'eit minutt', + mm: '%d minutt', + h: 'ein time', + hh: '%d timar', + d: 'ein dag', + dd: '%d dagar', + M: 'ein månad', + MM: '%d månader', + y: 'eit år', + yy: '%d år', + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('oc-lnc', { + months: { + standalone: 'genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre'.split( + '_' + ), + format: "de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre".split( + '_' + ), + isFormat: /D[oD]?(\s)+MMMM/, + }, + monthsShort: 'gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte'.split( + '_' + ), + weekdaysShort: 'dg._dl._dm._dc._dj._dv._ds.'.split('_'), + weekdaysMin: 'dg_dl_dm_dc_dj_dv_ds'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM [de] YYYY', + ll: 'D MMM YYYY', + LLL: 'D MMMM [de] YYYY [a] H:mm', + lll: 'D MMM YYYY, H:mm', + LLLL: 'dddd D MMMM [de] YYYY [a] H:mm', + llll: 'ddd D MMM YYYY, H:mm', + }, + calendar: { + sameDay: '[uèi a] LT', + nextDay: '[deman a] LT', + nextWeek: 'dddd [a] LT', + lastDay: '[ièr a] LT', + lastWeek: 'dddd [passat a] LT', + sameElse: 'L', + }, + relativeTime: { + future: "d'aquí %s", + past: 'fa %s', + s: 'unas segondas', + ss: '%d segondas', + m: 'una minuta', + mm: '%d minutas', + h: 'una ora', + hh: '%d oras', + d: 'un jorn', + dd: '%d jorns', + M: 'un mes', + MM: '%d meses', + y: 'un an', + yy: '%d ans', + }, + dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/, + ordinal: function (number, period) { + var output = + number === 1 + ? 'r' + : number === 2 + ? 'n' + : number === 3 + ? 'r' + : number === 4 + ? 't' + : 'è'; + if (period === 'w' || period === 'W') { + output = 'a'; + } + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, + }, + }); + + //! moment.js locale configuration + + var symbolMap$e = { + '1': '੧', + '2': '੨', + '3': '੩', + '4': '੪', + '5': '੫', + '6': '੬', + '7': '੭', + '8': '੮', + '9': '੯', + '0': '੦', + }, + numberMap$d = { + '੧': '1', + '੨': '2', + '੩': '3', + '੪': '4', + '੫': '5', + '੬': '6', + '੭': '7', + '੮': '8', + '੯': '9', + '੦': '0', + }; + + moment.defineLocale('pa-in', { + // There are months name as per Nanakshahi Calendar but they are not used as rigidly in modern Punjabi. + months: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split( + '_' + ), + monthsShort: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split( + '_' + ), + weekdays: 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split( + '_' + ), + weekdaysShort: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'), + weekdaysMin: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'), + longDateFormat: { + LT: 'A h:mm ਵਜੇ', + LTS: 'A h:mm:ss ਵਜੇ', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm ਵਜੇ', + LLLL: 'dddd, D MMMM YYYY, A h:mm ਵਜੇ', + }, + calendar: { + sameDay: '[ਅਜ] LT', + nextDay: '[ਕਲ] LT', + nextWeek: '[ਅਗਲਾ] dddd, LT', + lastDay: '[ਕਲ] LT', + lastWeek: '[ਪਿਛਲੇ] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s ਵਿੱਚ', + past: '%s ਪਿਛਲੇ', + s: 'ਕੁਝ ਸਕਿੰਟ', + ss: '%d ਸਕਿੰਟ', + m: 'ਇਕ ਮਿੰਟ', + mm: '%d ਮਿੰਟ', + h: 'ਇੱਕ ਘੰਟਾ', + hh: '%d ਘੰਟੇ', + d: 'ਇੱਕ ਦਿਨ', + dd: '%d ਦਿਨ', + M: 'ਇੱਕ ਮਹੀਨਾ', + MM: '%d ਮਹੀਨੇ', + y: 'ਇੱਕ ਸਾਲ', + yy: '%d ਸਾਲ', + }, + preparse: function (string) { + return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) { + return numberMap$d[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$e[match]; + }); + }, + // Punjabi notation for meridiems are quite fuzzy in practice. While there exists + // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi. + meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'ਰਾਤ') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'ਸਵੇਰ') { + return hour; + } else if (meridiem === 'ਦੁਪਹਿਰ') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'ਸ਼ਾਮ') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'ਰਾਤ'; + } else if (hour < 10) { + return 'ਸਵੇਰ'; + } else if (hour < 17) { + return 'ਦੁਪਹਿਰ'; + } else if (hour < 20) { + return 'ਸ਼ਾਮ'; + } else { + return 'ਰਾਤ'; + } + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var monthsNominative = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split( + '_' + ), + monthsSubjective = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split( + '_' + ); + function plural$3(n) { + return n % 10 < 5 && n % 10 > 1 && ~~(n / 10) % 10 !== 1; + } + function translate$8(number, withoutSuffix, key) { + var result = number + ' '; + switch (key) { + case 'ss': + return result + (plural$3(number) ? 'sekundy' : 'sekund'); + case 'm': + return withoutSuffix ? 'minuta' : 'minutę'; + case 'mm': + return result + (plural$3(number) ? 'minuty' : 'minut'); + case 'h': + return withoutSuffix ? 'godzina' : 'godzinę'; + case 'hh': + return result + (plural$3(number) ? 'godziny' : 'godzin'); + case 'MM': + return result + (plural$3(number) ? 'miesiące' : 'miesięcy'); + case 'yy': + return result + (plural$3(number) ? 'lata' : 'lat'); + } + } + + moment.defineLocale('pl', { + months: function (momentToFormat, format) { + if (!momentToFormat) { + return monthsNominative; + } else if (format === '') { + // Hack: if format empty we know this is used to generate + // RegExp by moment. Give then back both valid forms of months + // in RegExp ready format. + return ( + '(' + + monthsSubjective[momentToFormat.month()] + + '|' + + monthsNominative[momentToFormat.month()] + + ')' + ); + } else if (/D MMMM/.test(format)) { + return monthsSubjective[momentToFormat.month()]; + } else { + return monthsNominative[momentToFormat.month()]; + } + }, + monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'), + weekdays: 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split( + '_' + ), + weekdaysShort: 'ndz_pon_wt_śr_czw_pt_sob'.split('_'), + weekdaysMin: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Dziś o] LT', + nextDay: '[Jutro o] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[W niedzielę o] LT'; + + case 2: + return '[We wtorek o] LT'; + + case 3: + return '[W środę o] LT'; + + case 6: + return '[W sobotę o] LT'; + + default: + return '[W] dddd [o] LT'; + } + }, + lastDay: '[Wczoraj o] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[W zeszłą niedzielę o] LT'; + case 3: + return '[W zeszłą środę o] LT'; + case 6: + return '[W zeszłą sobotę o] LT'; + default: + return '[W zeszły] dddd [o] LT'; + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'za %s', + past: '%s temu', + s: 'kilka sekund', + ss: translate$8, + m: translate$8, + mm: translate$8, + h: translate$8, + hh: translate$8, + d: '1 dzień', + dd: '%d dni', + M: 'miesiąc', + MM: translate$8, + y: 'rok', + yy: translate$8, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('pt-br', { + months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split( + '_' + ), + monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'), + weekdays: 'domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado'.split( + '_' + ), + weekdaysShort: 'dom_seg_ter_qua_qui_sex_sáb'.split('_'), + weekdaysMin: 'do_2ª_3ª_4ª_5ª_6ª_sá'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D [de] MMMM [de] YYYY', + LLL: 'D [de] MMMM [de] YYYY [às] HH:mm', + LLLL: 'dddd, D [de] MMMM [de] YYYY [às] HH:mm', + }, + calendar: { + sameDay: '[Hoje às] LT', + nextDay: '[Amanhã às] LT', + nextWeek: 'dddd [às] LT', + lastDay: '[Ontem às] LT', + lastWeek: function () { + return this.day() === 0 || this.day() === 6 + ? '[Último] dddd [às] LT' // Saturday + Sunday + : '[Última] dddd [às] LT'; // Monday - Friday + }, + sameElse: 'L', + }, + relativeTime: { + future: 'em %s', + past: 'há %s', + s: 'poucos segundos', + ss: '%d segundos', + m: 'um minuto', + mm: '%d minutos', + h: 'uma hora', + hh: '%d horas', + d: 'um dia', + dd: '%d dias', + M: 'um mês', + MM: '%d meses', + y: 'um ano', + yy: '%d anos', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + }); + + //! moment.js locale configuration + + moment.defineLocale('pt', { + months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split( + '_' + ), + monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'), + weekdays: 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split( + '_' + ), + weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'), + weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D [de] MMMM [de] YYYY', + LLL: 'D [de] MMMM [de] YYYY HH:mm', + LLLL: 'dddd, D [de] MMMM [de] YYYY HH:mm', + }, + calendar: { + sameDay: '[Hoje às] LT', + nextDay: '[Amanhã às] LT', + nextWeek: 'dddd [às] LT', + lastDay: '[Ontem às] LT', + lastWeek: function () { + return this.day() === 0 || this.day() === 6 + ? '[Último] dddd [às] LT' // Saturday + Sunday + : '[Última] dddd [às] LT'; // Monday - Friday + }, + sameElse: 'L', + }, + relativeTime: { + future: 'em %s', + past: 'há %s', + s: 'segundos', + ss: '%d segundos', + m: 'um minuto', + mm: '%d minutos', + h: 'uma hora', + hh: '%d horas', + d: 'um dia', + dd: '%d dias', + M: 'um mês', + MM: '%d meses', + y: 'um ano', + yy: '%d anos', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function relativeTimeWithPlural$2(number, withoutSuffix, key) { + var format = { + ss: 'secunde', + mm: 'minute', + hh: 'ore', + dd: 'zile', + MM: 'luni', + yy: 'ani', + }, + separator = ' '; + if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) { + separator = ' de '; + } + return number + separator + format[key]; + } + + moment.defineLocale('ro', { + months: 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split( + '_' + ), + monthsShort: 'ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'), + weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'), + weekdaysMin: 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'), + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY H:mm', + LLLL: 'dddd, D MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[azi la] LT', + nextDay: '[mâine la] LT', + nextWeek: 'dddd [la] LT', + lastDay: '[ieri la] LT', + lastWeek: '[fosta] dddd [la] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'peste %s', + past: '%s în urmă', + s: 'câteva secunde', + ss: relativeTimeWithPlural$2, + m: 'un minut', + mm: relativeTimeWithPlural$2, + h: 'o oră', + hh: relativeTimeWithPlural$2, + d: 'o zi', + dd: relativeTimeWithPlural$2, + M: 'o lună', + MM: relativeTimeWithPlural$2, + y: 'un an', + yy: relativeTimeWithPlural$2, + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function plural$4(word, num) { + var forms = word.split('_'); + return num % 10 === 1 && num % 100 !== 11 + ? forms[0] + : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) + ? forms[1] + : forms[2]; + } + function relativeTimeWithPlural$3(number, withoutSuffix, key) { + var format = { + ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд', + mm: withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут', + hh: 'час_часа_часов', + dd: 'день_дня_дней', + MM: 'месяц_месяца_месяцев', + yy: 'год_года_лет', + }; + if (key === 'm') { + return withoutSuffix ? 'минута' : 'минуту'; + } else { + return number + ' ' + plural$4(format[key], +number); + } + } + var monthsParse$8 = [ + /^янв/i, + /^фев/i, + /^мар/i, + /^апр/i, + /^ма[йя]/i, + /^июн/i, + /^июл/i, + /^авг/i, + /^сен/i, + /^окт/i, + /^ноя/i, + /^дек/i, + ]; + + // http://new.gramota.ru/spravka/rules/139-prop : § 103 + // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637 + // CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753 + moment.defineLocale('ru', { + months: { + format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split( + '_' + ), + standalone: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split( + '_' + ), + }, + monthsShort: { + // по CLDR именно "июл." и "июн.", но какой смысл менять букву на точку? + format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split( + '_' + ), + standalone: 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split( + '_' + ), + }, + weekdays: { + standalone: 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split( + '_' + ), + format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split( + '_' + ), + isFormat: /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/, + }, + weekdaysShort: 'вс_пн_вт_ср_чт_пт_сб'.split('_'), + weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'), + monthsParse: monthsParse$8, + longMonthsParse: monthsParse$8, + shortMonthsParse: monthsParse$8, + + // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки + monthsRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i, + + // копия предыдущего + monthsShortRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i, + + // полные названия с падежами + monthsStrictRegex: /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i, + + // Выражение, которое соответствует только сокращённым формам + monthsShortStrictRegex: /^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY г.', + LLL: 'D MMMM YYYY г., H:mm', + LLLL: 'dddd, D MMMM YYYY г., H:mm', + }, + calendar: { + sameDay: '[Сегодня, в] LT', + nextDay: '[Завтра, в] LT', + lastDay: '[Вчера, в] LT', + nextWeek: function (now) { + if (now.week() !== this.week()) { + switch (this.day()) { + case 0: + return '[В следующее] dddd, [в] LT'; + case 1: + case 2: + case 4: + return '[В следующий] dddd, [в] LT'; + case 3: + case 5: + case 6: + return '[В следующую] dddd, [в] LT'; + } + } else { + if (this.day() === 2) { + return '[Во] dddd, [в] LT'; + } else { + return '[В] dddd, [в] LT'; + } + } + }, + lastWeek: function (now) { + if (now.week() !== this.week()) { + switch (this.day()) { + case 0: + return '[В прошлое] dddd, [в] LT'; + case 1: + case 2: + case 4: + return '[В прошлый] dddd, [в] LT'; + case 3: + case 5: + case 6: + return '[В прошлую] dddd, [в] LT'; + } + } else { + if (this.day() === 2) { + return '[Во] dddd, [в] LT'; + } else { + return '[В] dddd, [в] LT'; + } + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'через %s', + past: '%s назад', + s: 'несколько секунд', + ss: relativeTimeWithPlural$3, + m: relativeTimeWithPlural$3, + mm: relativeTimeWithPlural$3, + h: 'час', + hh: relativeTimeWithPlural$3, + d: 'день', + dd: relativeTimeWithPlural$3, + M: 'месяц', + MM: relativeTimeWithPlural$3, + y: 'год', + yy: relativeTimeWithPlural$3, + }, + meridiemParse: /ночи|утра|дня|вечера/i, + isPM: function (input) { + return /^(дня|вечера)$/.test(input); + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'ночи'; + } else if (hour < 12) { + return 'утра'; + } else if (hour < 17) { + return 'дня'; + } else { + return 'вечера'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}-(й|го|я)/, + ordinal: function (number, period) { + switch (period) { + case 'M': + case 'd': + case 'DDD': + return number + '-й'; + case 'D': + return number + '-го'; + case 'w': + case 'W': + return number + '-я'; + default: + return number; + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var months$8 = [ + 'جنوري', + 'فيبروري', + 'مارچ', + 'اپريل', + 'مئي', + 'جون', + 'جولاءِ', + 'آگسٽ', + 'سيپٽمبر', + 'آڪٽوبر', + 'نومبر', + 'ڊسمبر', + ], + days = ['آچر', 'سومر', 'اڱارو', 'اربع', 'خميس', 'جمع', 'ڇنڇر']; + + moment.defineLocale('sd', { + months: months$8, + monthsShort: months$8, + weekdays: days, + weekdaysShort: days, + weekdaysMin: days, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd، D MMMM YYYY HH:mm', + }, + meridiemParse: /صبح|شام/, + isPM: function (input) { + return 'شام' === input; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'صبح'; + } + return 'شام'; + }, + calendar: { + sameDay: '[اڄ] LT', + nextDay: '[سڀاڻي] LT', + nextWeek: 'dddd [اڳين هفتي تي] LT', + lastDay: '[ڪالهه] LT', + lastWeek: '[گزريل هفتي] dddd [تي] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s پوء', + past: '%s اڳ', + s: 'چند سيڪنڊ', + ss: '%d سيڪنڊ', + m: 'هڪ منٽ', + mm: '%d منٽ', + h: 'هڪ ڪلاڪ', + hh: '%d ڪلاڪ', + d: 'هڪ ڏينهن', + dd: '%d ڏينهن', + M: 'هڪ مهينو', + MM: '%d مهينا', + y: 'هڪ سال', + yy: '%d سال', + }, + preparse: function (string) { + return string.replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/,/g, '،'); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('se', { + months: 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split( + '_' + ), + monthsShort: 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split( + '_' + ), + weekdays: 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split( + '_' + ), + weekdaysShort: 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'), + weekdaysMin: 's_v_m_g_d_b_L'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'MMMM D. [b.] YYYY', + LLL: 'MMMM D. [b.] YYYY [ti.] HH:mm', + LLLL: 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm', + }, + calendar: { + sameDay: '[otne ti] LT', + nextDay: '[ihttin ti] LT', + nextWeek: 'dddd [ti] LT', + lastDay: '[ikte ti] LT', + lastWeek: '[ovddit] dddd [ti] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s geažes', + past: 'maŋit %s', + s: 'moadde sekunddat', + ss: '%d sekunddat', + m: 'okta minuhta', + mm: '%d minuhtat', + h: 'okta diimmu', + hh: '%d diimmut', + d: 'okta beaivi', + dd: '%d beaivvit', + M: 'okta mánnu', + MM: '%d mánut', + y: 'okta jahki', + yy: '%d jagit', + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + /*jshint -W100*/ + moment.defineLocale('si', { + months: 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split( + '_' + ), + monthsShort: 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split( + '_' + ), + weekdays: 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split( + '_' + ), + weekdaysShort: 'ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන'.split('_'), + weekdaysMin: 'ඉ_ස_අ_බ_බ්‍ර_සි_සෙ'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'a h:mm', + LTS: 'a h:mm:ss', + L: 'YYYY/MM/DD', + LL: 'YYYY MMMM D', + LLL: 'YYYY MMMM D, a h:mm', + LLLL: 'YYYY MMMM D [වැනි] dddd, a h:mm:ss', + }, + calendar: { + sameDay: '[අද] LT[ට]', + nextDay: '[හෙට] LT[ට]', + nextWeek: 'dddd LT[ට]', + lastDay: '[ඊයේ] LT[ට]', + lastWeek: '[පසුගිය] dddd LT[ට]', + sameElse: 'L', + }, + relativeTime: { + future: '%sකින්', + past: '%sකට පෙර', + s: 'තත්පර කිහිපය', + ss: 'තත්පර %d', + m: 'මිනිත්තුව', + mm: 'මිනිත්තු %d', + h: 'පැය', + hh: 'පැය %d', + d: 'දිනය', + dd: 'දින %d', + M: 'මාසය', + MM: 'මාස %d', + y: 'වසර', + yy: 'වසර %d', + }, + dayOfMonthOrdinalParse: /\d{1,2} වැනි/, + ordinal: function (number) { + return number + ' වැනි'; + }, + meridiemParse: /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./, + isPM: function (input) { + return input === 'ප.ව.' || input === 'පස් වරු'; + }, + meridiem: function (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'ප.ව.' : 'පස් වරු'; + } else { + return isLower ? 'පෙ.ව.' : 'පෙර වරු'; + } + }, + }); + + //! moment.js locale configuration + + var months$9 = 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split( + '_' + ), + monthsShort$6 = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_'); + function plural$5(n) { + return n > 1 && n < 5; + } + function translate$9(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + switch (key) { + case 's': // a few seconds / in a few seconds / a few seconds ago + return withoutSuffix || isFuture ? 'pár sekúnd' : 'pár sekundami'; + case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago + if (withoutSuffix || isFuture) { + return result + (plural$5(number) ? 'sekundy' : 'sekúnd'); + } else { + return result + 'sekundami'; + } + case 'm': // a minute / in a minute / a minute ago + return withoutSuffix ? 'minúta' : isFuture ? 'minútu' : 'minútou'; + case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago + if (withoutSuffix || isFuture) { + return result + (plural$5(number) ? 'minúty' : 'minút'); + } else { + return result + 'minútami'; + } + case 'h': // an hour / in an hour / an hour ago + return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou'; + case 'hh': // 9 hours / in 9 hours / 9 hours ago + if (withoutSuffix || isFuture) { + return result + (plural$5(number) ? 'hodiny' : 'hodín'); + } else { + return result + 'hodinami'; + } + case 'd': // a day / in a day / a day ago + return withoutSuffix || isFuture ? 'deň' : 'dňom'; + case 'dd': // 9 days / in 9 days / 9 days ago + if (withoutSuffix || isFuture) { + return result + (plural$5(number) ? 'dni' : 'dní'); + } else { + return result + 'dňami'; + } + case 'M': // a month / in a month / a month ago + return withoutSuffix || isFuture ? 'mesiac' : 'mesiacom'; + case 'MM': // 9 months / in 9 months / 9 months ago + if (withoutSuffix || isFuture) { + return result + (plural$5(number) ? 'mesiace' : 'mesiacov'); + } else { + return result + 'mesiacmi'; + } + case 'y': // a year / in a year / a year ago + return withoutSuffix || isFuture ? 'rok' : 'rokom'; + case 'yy': // 9 years / in 9 years / 9 years ago + if (withoutSuffix || isFuture) { + return result + (plural$5(number) ? 'roky' : 'rokov'); + } else { + return result + 'rokmi'; + } + } + } + + moment.defineLocale('sk', { + months: months$9, + monthsShort: monthsShort$6, + weekdays: 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'), + weekdaysShort: 'ne_po_ut_st_št_pi_so'.split('_'), + weekdaysMin: 'ne_po_ut_st_št_pi_so'.split('_'), + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd D. MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[dnes o] LT', + nextDay: '[zajtra o] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[v nedeľu o] LT'; + case 1: + case 2: + return '[v] dddd [o] LT'; + case 3: + return '[v stredu o] LT'; + case 4: + return '[vo štvrtok o] LT'; + case 5: + return '[v piatok o] LT'; + case 6: + return '[v sobotu o] LT'; + } + }, + lastDay: '[včera o] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[minulú nedeľu o] LT'; + case 1: + case 2: + return '[minulý] dddd [o] LT'; + case 3: + return '[minulú stredu o] LT'; + case 4: + case 5: + return '[minulý] dddd [o] LT'; + case 6: + return '[minulú sobotu o] LT'; + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'za %s', + past: 'pred %s', + s: translate$9, + ss: translate$9, + m: translate$9, + mm: translate$9, + h: translate$9, + hh: translate$9, + d: translate$9, + dd: translate$9, + M: translate$9, + MM: translate$9, + y: translate$9, + yy: translate$9, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function processRelativeTime$7(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + switch (key) { + case 's': + return withoutSuffix || isFuture + ? 'nekaj sekund' + : 'nekaj sekundami'; + case 'ss': + if (number === 1) { + result += withoutSuffix ? 'sekundo' : 'sekundi'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah'; + } else { + result += 'sekund'; + } + return result; + case 'm': + return withoutSuffix ? 'ena minuta' : 'eno minuto'; + case 'mm': + if (number === 1) { + result += withoutSuffix ? 'minuta' : 'minuto'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'minuti' : 'minutama'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'minute' : 'minutami'; + } else { + result += withoutSuffix || isFuture ? 'minut' : 'minutami'; + } + return result; + case 'h': + return withoutSuffix ? 'ena ura' : 'eno uro'; + case 'hh': + if (number === 1) { + result += withoutSuffix ? 'ura' : 'uro'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'uri' : 'urama'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'ure' : 'urami'; + } else { + result += withoutSuffix || isFuture ? 'ur' : 'urami'; + } + return result; + case 'd': + return withoutSuffix || isFuture ? 'en dan' : 'enim dnem'; + case 'dd': + if (number === 1) { + result += withoutSuffix || isFuture ? 'dan' : 'dnem'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'dni' : 'dnevoma'; + } else { + result += withoutSuffix || isFuture ? 'dni' : 'dnevi'; + } + return result; + case 'M': + return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem'; + case 'MM': + if (number === 1) { + result += withoutSuffix || isFuture ? 'mesec' : 'mesecem'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'meseca' : 'mesecema'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'mesece' : 'meseci'; + } else { + result += withoutSuffix || isFuture ? 'mesecev' : 'meseci'; + } + return result; + case 'y': + return withoutSuffix || isFuture ? 'eno leto' : 'enim letom'; + case 'yy': + if (number === 1) { + result += withoutSuffix || isFuture ? 'leto' : 'letom'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'leti' : 'letoma'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'leta' : 'leti'; + } else { + result += withoutSuffix || isFuture ? 'let' : 'leti'; + } + return result; + } + } + + moment.defineLocale('sl', { + months: 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split( + '_' + ), + monthsShort: 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'), + weekdaysShort: 'ned._pon._tor._sre._čet._pet._sob.'.split('_'), + weekdaysMin: 'ne_po_to_sr_če_pe_so'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD. MM. YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[danes ob] LT', + nextDay: '[jutri ob] LT', + + nextWeek: function () { + switch (this.day()) { + case 0: + return '[v] [nedeljo] [ob] LT'; + case 3: + return '[v] [sredo] [ob] LT'; + case 6: + return '[v] [soboto] [ob] LT'; + case 1: + case 2: + case 4: + case 5: + return '[v] dddd [ob] LT'; + } + }, + lastDay: '[včeraj ob] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[prejšnjo] [nedeljo] [ob] LT'; + case 3: + return '[prejšnjo] [sredo] [ob] LT'; + case 6: + return '[prejšnjo] [soboto] [ob] LT'; + case 1: + case 2: + case 4: + case 5: + return '[prejšnji] dddd [ob] LT'; + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'čez %s', + past: 'pred %s', + s: processRelativeTime$7, + ss: processRelativeTime$7, + m: processRelativeTime$7, + mm: processRelativeTime$7, + h: processRelativeTime$7, + hh: processRelativeTime$7, + d: processRelativeTime$7, + dd: processRelativeTime$7, + M: processRelativeTime$7, + MM: processRelativeTime$7, + y: processRelativeTime$7, + yy: processRelativeTime$7, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('sq', { + months: 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split( + '_' + ), + monthsShort: 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'), + weekdays: 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split( + '_' + ), + weekdaysShort: 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'), + weekdaysMin: 'D_H_Ma_Më_E_P_Sh'.split('_'), + weekdaysParseExact: true, + meridiemParse: /PD|MD/, + isPM: function (input) { + return input.charAt(0) === 'M'; + }, + meridiem: function (hours, minutes, isLower) { + return hours < 12 ? 'PD' : 'MD'; + }, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Sot në] LT', + nextDay: '[Nesër në] LT', + nextWeek: 'dddd [në] LT', + lastDay: '[Dje në] LT', + lastWeek: 'dddd [e kaluar në] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'në %s', + past: '%s më parë', + s: 'disa sekonda', + ss: '%d sekonda', + m: 'një minutë', + mm: '%d minuta', + h: 'një orë', + hh: '%d orë', + d: 'një ditë', + dd: '%d ditë', + M: 'një muaj', + MM: '%d muaj', + y: 'një vit', + yy: '%d vite', + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var translator$1 = { + words: { + //Different grammatical cases + ss: ['секунда', 'секунде', 'секунди'], + m: ['један минут', 'једне минуте'], + mm: ['минут', 'минуте', 'минута'], + h: ['један сат', 'једног сата'], + hh: ['сат', 'сата', 'сати'], + dd: ['дан', 'дана', 'дана'], + MM: ['месец', 'месеца', 'месеци'], + yy: ['година', 'године', 'година'], + }, + correctGrammaticalCase: function (number, wordKey) { + return number === 1 + ? wordKey[0] + : number >= 2 && number <= 4 + ? wordKey[1] + : wordKey[2]; + }, + translate: function (number, withoutSuffix, key) { + var wordKey = translator$1.words[key]; + if (key.length === 1) { + return withoutSuffix ? wordKey[0] : wordKey[1]; + } else { + return ( + number + + ' ' + + translator$1.correctGrammaticalCase(number, wordKey) + ); + } + }, + }; + + moment.defineLocale('sr-cyrl', { + months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split( + '_' + ), + monthsShort: 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'), + weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'), + weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[данас у] LT', + nextDay: '[сутра у] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[у] [недељу] [у] LT'; + case 3: + return '[у] [среду] [у] LT'; + case 6: + return '[у] [суботу] [у] LT'; + case 1: + case 2: + case 4: + case 5: + return '[у] dddd [у] LT'; + } + }, + lastDay: '[јуче у] LT', + lastWeek: function () { + var lastWeekDays = [ + '[прошле] [недеље] [у] LT', + '[прошлог] [понедељка] [у] LT', + '[прошлог] [уторка] [у] LT', + '[прошле] [среде] [у] LT', + '[прошлог] [четвртка] [у] LT', + '[прошлог] [петка] [у] LT', + '[прошле] [суботе] [у] LT', + ]; + return lastWeekDays[this.day()]; + }, + sameElse: 'L', + }, + relativeTime: { + future: 'за %s', + past: 'пре %s', + s: 'неколико секунди', + ss: translator$1.translate, + m: translator$1.translate, + mm: translator$1.translate, + h: translator$1.translate, + hh: translator$1.translate, + d: 'дан', + dd: translator$1.translate, + M: 'месец', + MM: translator$1.translate, + y: 'годину', + yy: translator$1.translate, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var translator$2 = { + words: { + //Different grammatical cases + ss: ['sekunda', 'sekunde', 'sekundi'], + m: ['jedan minut', 'jedne minute'], + mm: ['minut', 'minute', 'minuta'], + h: ['jedan sat', 'jednog sata'], + hh: ['sat', 'sata', 'sati'], + dd: ['dan', 'dana', 'dana'], + MM: ['mesec', 'meseca', 'meseci'], + yy: ['godina', 'godine', 'godina'], + }, + correctGrammaticalCase: function (number, wordKey) { + return number === 1 + ? wordKey[0] + : number >= 2 && number <= 4 + ? wordKey[1] + : wordKey[2]; + }, + translate: function (number, withoutSuffix, key) { + var wordKey = translator$2.words[key]; + if (key.length === 1) { + return withoutSuffix ? wordKey[0] : wordKey[1]; + } else { + return ( + number + + ' ' + + translator$2.correctGrammaticalCase(number, wordKey) + ); + } + }, + }; + + moment.defineLocale('sr', { + months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split( + '_' + ), + monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split( + '_' + ), + weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'), + weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[danas u] LT', + nextDay: '[sutra u] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[u] [nedelju] [u] LT'; + case 3: + return '[u] [sredu] [u] LT'; + case 6: + return '[u] [subotu] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[u] dddd [u] LT'; + } + }, + lastDay: '[juče u] LT', + lastWeek: function () { + var lastWeekDays = [ + '[prošle] [nedelje] [u] LT', + '[prošlog] [ponedeljka] [u] LT', + '[prošlog] [utorka] [u] LT', + '[prošle] [srede] [u] LT', + '[prošlog] [četvrtka] [u] LT', + '[prošlog] [petka] [u] LT', + '[prošle] [subote] [u] LT', + ]; + return lastWeekDays[this.day()]; + }, + sameElse: 'L', + }, + relativeTime: { + future: 'za %s', + past: 'pre %s', + s: 'nekoliko sekundi', + ss: translator$2.translate, + m: translator$2.translate, + mm: translator$2.translate, + h: translator$2.translate, + hh: translator$2.translate, + d: 'dan', + dd: translator$2.translate, + M: 'mesec', + MM: translator$2.translate, + y: 'godinu', + yy: translator$2.translate, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('ss', { + months: "Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split( + '_' + ), + monthsShort: 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'), + weekdays: 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split( + '_' + ), + weekdaysShort: 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'), + weekdaysMin: 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY h:mm A', + LLLL: 'dddd, D MMMM YYYY h:mm A', + }, + calendar: { + sameDay: '[Namuhla nga] LT', + nextDay: '[Kusasa nga] LT', + nextWeek: 'dddd [nga] LT', + lastDay: '[Itolo nga] LT', + lastWeek: 'dddd [leliphelile] [nga] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'nga %s', + past: 'wenteka nga %s', + s: 'emizuzwana lomcane', + ss: '%d mzuzwana', + m: 'umzuzu', + mm: '%d emizuzu', + h: 'lihora', + hh: '%d emahora', + d: 'lilanga', + dd: '%d emalanga', + M: 'inyanga', + MM: '%d tinyanga', + y: 'umnyaka', + yy: '%d iminyaka', + }, + meridiemParse: /ekuseni|emini|entsambama|ebusuku/, + meridiem: function (hours, minutes, isLower) { + if (hours < 11) { + return 'ekuseni'; + } else if (hours < 15) { + return 'emini'; + } else if (hours < 19) { + return 'entsambama'; + } else { + return 'ebusuku'; + } + }, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'ekuseni') { + return hour; + } else if (meridiem === 'emini') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') { + if (hour === 0) { + return 0; + } + return hour + 12; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}/, + ordinal: '%d', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('sv', { + months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split( + '_' + ), + monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'), + weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'), + weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'), + weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY-MM-DD', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY [kl.] HH:mm', + LLLL: 'dddd D MMMM YYYY [kl.] HH:mm', + lll: 'D MMM YYYY HH:mm', + llll: 'ddd D MMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Idag] LT', + nextDay: '[Imorgon] LT', + lastDay: '[Igår] LT', + nextWeek: '[På] dddd LT', + lastWeek: '[I] dddd[s] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'om %s', + past: 'för %s sedan', + s: 'några sekunder', + ss: '%d sekunder', + m: 'en minut', + mm: '%d minuter', + h: 'en timme', + hh: '%d timmar', + d: 'en dag', + dd: '%d dagar', + M: 'en månad', + MM: '%d månader', + y: 'ett år', + yy: '%d år', + }, + dayOfMonthOrdinalParse: /\d{1,2}(\:e|\:a)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? ':e' + : b === 1 + ? ':a' + : b === 2 + ? ':a' + : b === 3 + ? ':e' + : ':e'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('sw', { + months: 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'), + weekdays: 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split( + '_' + ), + weekdaysShort: 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'), + weekdaysMin: 'J2_J3_J4_J5_Al_Ij_J1'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'hh:mm A', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[leo saa] LT', + nextDay: '[kesho saa] LT', + nextWeek: '[wiki ijayo] dddd [saat] LT', + lastDay: '[jana] LT', + lastWeek: '[wiki iliyopita] dddd [saat] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s baadaye', + past: 'tokea %s', + s: 'hivi punde', + ss: 'sekunde %d', + m: 'dakika moja', + mm: 'dakika %d', + h: 'saa limoja', + hh: 'masaa %d', + d: 'siku moja', + dd: 'siku %d', + M: 'mwezi mmoja', + MM: 'miezi %d', + y: 'mwaka mmoja', + yy: 'miaka %d', + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap$f = { + '1': '௧', + '2': '௨', + '3': '௩', + '4': '௪', + '5': '௫', + '6': '௬', + '7': '௭', + '8': '௮', + '9': '௯', + '0': '௦', + }, + numberMap$e = { + '௧': '1', + '௨': '2', + '௩': '3', + '௪': '4', + '௫': '5', + '௬': '6', + '௭': '7', + '௮': '8', + '௯': '9', + '௦': '0', + }; + + moment.defineLocale('ta', { + months: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split( + '_' + ), + monthsShort: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split( + '_' + ), + weekdays: 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split( + '_' + ), + weekdaysShort: 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split( + '_' + ), + weekdaysMin: 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, HH:mm', + LLLL: 'dddd, D MMMM YYYY, HH:mm', + }, + calendar: { + sameDay: '[இன்று] LT', + nextDay: '[நாளை] LT', + nextWeek: 'dddd, LT', + lastDay: '[நேற்று] LT', + lastWeek: '[கடந்த வாரம்] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s இல்', + past: '%s முன்', + s: 'ஒரு சில விநாடிகள்', + ss: '%d விநாடிகள்', + m: 'ஒரு நிமிடம்', + mm: '%d நிமிடங்கள்', + h: 'ஒரு மணி நேரம்', + hh: '%d மணி நேரம்', + d: 'ஒரு நாள்', + dd: '%d நாட்கள்', + M: 'ஒரு மாதம்', + MM: '%d மாதங்கள்', + y: 'ஒரு வருடம்', + yy: '%d ஆண்டுகள்', + }, + dayOfMonthOrdinalParse: /\d{1,2}வது/, + ordinal: function (number) { + return number + 'வது'; + }, + preparse: function (string) { + return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) { + return numberMap$e[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$f[match]; + }); + }, + // refer http://ta.wikipedia.org/s/1er1 + meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/, + meridiem: function (hour, minute, isLower) { + if (hour < 2) { + return ' யாமம்'; + } else if (hour < 6) { + return ' வைகறை'; // வைகறை + } else if (hour < 10) { + return ' காலை'; // காலை + } else if (hour < 14) { + return ' நண்பகல்'; // நண்பகல் + } else if (hour < 18) { + return ' எற்பாடு'; // எற்பாடு + } else if (hour < 22) { + return ' மாலை'; // மாலை + } else { + return ' யாமம்'; + } + }, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'யாமம்') { + return hour < 2 ? hour : hour + 12; + } else if (meridiem === 'வைகறை' || meridiem === 'காலை') { + return hour; + } else if (meridiem === 'நண்பகல்') { + return hour >= 10 ? hour : hour + 12; + } else { + return hour + 12; + } + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('te', { + months: 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split( + '_' + ), + monthsShort: 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split( + '_' + ), + weekdaysShort: 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'), + weekdaysMin: 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'), + longDateFormat: { + LT: 'A h:mm', + LTS: 'A h:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm', + LLLL: 'dddd, D MMMM YYYY, A h:mm', + }, + calendar: { + sameDay: '[నేడు] LT', + nextDay: '[రేపు] LT', + nextWeek: 'dddd, LT', + lastDay: '[నిన్న] LT', + lastWeek: '[గత] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s లో', + past: '%s క్రితం', + s: 'కొన్ని క్షణాలు', + ss: '%d సెకన్లు', + m: 'ఒక నిమిషం', + mm: '%d నిమిషాలు', + h: 'ఒక గంట', + hh: '%d గంటలు', + d: 'ఒక రోజు', + dd: '%d రోజులు', + M: 'ఒక నెల', + MM: '%d నెలలు', + y: 'ఒక సంవత్సరం', + yy: '%d సంవత్సరాలు', + }, + dayOfMonthOrdinalParse: /\d{1,2}వ/, + ordinal: '%dవ', + meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'రాత్రి') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'ఉదయం') { + return hour; + } else if (meridiem === 'మధ్యాహ్నం') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'సాయంత్రం') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'రాత్రి'; + } else if (hour < 10) { + return 'ఉదయం'; + } else if (hour < 17) { + return 'మధ్యాహ్నం'; + } else if (hour < 20) { + return 'సాయంత్రం'; + } else { + return 'రాత్రి'; + } + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('tet', { + months: 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru'.split( + '_' + ), + monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'), + weekdays: 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu'.split('_'), + weekdaysShort: 'Dom_Seg_Ters_Kua_Kint_Sest_Sab'.split('_'), + weekdaysMin: 'Do_Seg_Te_Ku_Ki_Ses_Sa'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Ohin iha] LT', + nextDay: '[Aban iha] LT', + nextWeek: 'dddd [iha] LT', + lastDay: '[Horiseik iha] LT', + lastWeek: 'dddd [semana kotuk] [iha] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'iha %s', + past: '%s liuba', + s: 'segundu balun', + ss: 'segundu %d', + m: 'minutu ida', + mm: 'minutu %d', + h: 'oras ida', + hh: 'oras %d', + d: 'loron ida', + dd: 'loron %d', + M: 'fulan ida', + MM: 'fulan %d', + y: 'tinan ida', + yy: 'tinan %d', + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var suffixes$3 = { + 0: '-ум', + 1: '-ум', + 2: '-юм', + 3: '-юм', + 4: '-ум', + 5: '-ум', + 6: '-ум', + 7: '-ум', + 8: '-ум', + 9: '-ум', + 10: '-ум', + 12: '-ум', + 13: '-ум', + 20: '-ум', + 30: '-юм', + 40: '-ум', + 50: '-ум', + 60: '-ум', + 70: '-ум', + 80: '-ум', + 90: '-ум', + 100: '-ум', + }; + + moment.defineLocale('tg', { + months: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split( + '_' + ), + monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'), + weekdays: 'якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе'.split( + '_' + ), + weekdaysShort: 'яшб_дшб_сшб_чшб_пшб_ҷум_шнб'.split('_'), + weekdaysMin: 'яш_дш_сш_чш_пш_ҷм_шб'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Имрӯз соати] LT', + nextDay: '[Пагоҳ соати] LT', + lastDay: '[Дирӯз соати] LT', + nextWeek: 'dddd[и] [ҳафтаи оянда соати] LT', + lastWeek: 'dddd[и] [ҳафтаи гузашта соати] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'баъди %s', + past: '%s пеш', + s: 'якчанд сония', + m: 'як дақиқа', + mm: '%d дақиқа', + h: 'як соат', + hh: '%d соат', + d: 'як рӯз', + dd: '%d рӯз', + M: 'як моҳ', + MM: '%d моҳ', + y: 'як сол', + yy: '%d сол', + }, + meridiemParse: /шаб|субҳ|рӯз|бегоҳ/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'шаб') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'субҳ') { + return hour; + } else if (meridiem === 'рӯз') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'бегоҳ') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'шаб'; + } else if (hour < 11) { + return 'субҳ'; + } else if (hour < 16) { + return 'рӯз'; + } else if (hour < 19) { + return 'бегоҳ'; + } else { + return 'шаб'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}-(ум|юм)/, + ordinal: function (number) { + var a = number % 10, + b = number >= 100 ? 100 : null; + return number + (suffixes$3[number] || suffixes$3[a] || suffixes$3[b]); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 1th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('th', { + months: 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split( + '_' + ), + monthsShort: 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'), + weekdaysShort: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference + weekdaysMin: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY เวลา H:mm', + LLLL: 'วันddddที่ D MMMM YYYY เวลา H:mm', + }, + meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/, + isPM: function (input) { + return input === 'หลังเที่ยง'; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'ก่อนเที่ยง'; + } else { + return 'หลังเที่ยง'; + } + }, + calendar: { + sameDay: '[วันนี้ เวลา] LT', + nextDay: '[พรุ่งนี้ เวลา] LT', + nextWeek: 'dddd[หน้า เวลา] LT', + lastDay: '[เมื่อวานนี้ เวลา] LT', + lastWeek: '[วัน]dddd[ที่แล้ว เวลา] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'อีก %s', + past: '%sที่แล้ว', + s: 'ไม่กี่วินาที', + ss: '%d วินาที', + m: '1 นาที', + mm: '%d นาที', + h: '1 ชั่วโมง', + hh: '%d ชั่วโมง', + d: '1 วัน', + dd: '%d วัน', + M: '1 เดือน', + MM: '%d เดือน', + y: '1 ปี', + yy: '%d ปี', + }, + }); + + //! moment.js locale configuration + + var suffixes$4 = { + 1: "'inji", + 5: "'inji", + 8: "'inji", + 70: "'inji", + 80: "'inji", + 2: "'nji", + 7: "'nji", + 20: "'nji", + 50: "'nji", + 3: "'ünji", + 4: "'ünji", + 100: "'ünji", + 6: "'njy", + 9: "'unjy", + 10: "'unjy", + 30: "'unjy", + 60: "'ynjy", + 90: "'ynjy", + }; + + moment.defineLocale('tk', { + months: 'Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr'.split( + '_' + ), + monthsShort: 'Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek'.split('_'), + weekdays: 'Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe'.split( + '_' + ), + weekdaysShort: 'Ýek_Duş_Siş_Çar_Pen_Ann_Şen'.split('_'), + weekdaysMin: 'Ýk_Dş_Sş_Çr_Pn_An_Şn'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[bugün sagat] LT', + nextDay: '[ertir sagat] LT', + nextWeek: '[indiki] dddd [sagat] LT', + lastDay: '[düýn] LT', + lastWeek: '[geçen] dddd [sagat] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s soň', + past: '%s öň', + s: 'birnäçe sekunt', + m: 'bir minut', + mm: '%d minut', + h: 'bir sagat', + hh: '%d sagat', + d: 'bir gün', + dd: '%d gün', + M: 'bir aý', + MM: '%d aý', + y: 'bir ýyl', + yy: '%d ýyl', + }, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'Do': + case 'DD': + return number; + default: + if (number === 0) { + // special case for zero + return number + "'unjy"; + } + var a = number % 10, + b = (number % 100) - a, + c = number >= 100 ? 100 : null; + return number + (suffixes$4[a] || suffixes$4[b] || suffixes$4[c]); + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('tl-ph', { + months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split( + '_' + ), + monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'), + weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split( + '_' + ), + weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'), + weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'MM/D/YYYY', + LL: 'MMMM D, YYYY', + LLL: 'MMMM D, YYYY HH:mm', + LLLL: 'dddd, MMMM DD, YYYY HH:mm', + }, + calendar: { + sameDay: 'LT [ngayong araw]', + nextDay: '[Bukas ng] LT', + nextWeek: 'LT [sa susunod na] dddd', + lastDay: 'LT [kahapon]', + lastWeek: 'LT [noong nakaraang] dddd', + sameElse: 'L', + }, + relativeTime: { + future: 'sa loob ng %s', + past: '%s ang nakalipas', + s: 'ilang segundo', + ss: '%d segundo', + m: 'isang minuto', + mm: '%d minuto', + h: 'isang oras', + hh: '%d oras', + d: 'isang araw', + dd: '%d araw', + M: 'isang buwan', + MM: '%d buwan', + y: 'isang taon', + yy: '%d taon', + }, + dayOfMonthOrdinalParse: /\d{1,2}/, + ordinal: function (number) { + return number; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_'); + + function translateFuture(output) { + var time = output; + time = + output.indexOf('jaj') !== -1 + ? time.slice(0, -3) + 'leS' + : output.indexOf('jar') !== -1 + ? time.slice(0, -3) + 'waQ' + : output.indexOf('DIS') !== -1 + ? time.slice(0, -3) + 'nem' + : time + ' pIq'; + return time; + } + + function translatePast(output) { + var time = output; + time = + output.indexOf('jaj') !== -1 + ? time.slice(0, -3) + 'Hu’' + : output.indexOf('jar') !== -1 + ? time.slice(0, -3) + 'wen' + : output.indexOf('DIS') !== -1 + ? time.slice(0, -3) + 'ben' + : time + ' ret'; + return time; + } + + function translate$a(number, withoutSuffix, string, isFuture) { + var numberNoun = numberAsNoun(number); + switch (string) { + case 'ss': + return numberNoun + ' lup'; + case 'mm': + return numberNoun + ' tup'; + case 'hh': + return numberNoun + ' rep'; + case 'dd': + return numberNoun + ' jaj'; + case 'MM': + return numberNoun + ' jar'; + case 'yy': + return numberNoun + ' DIS'; + } + } + + function numberAsNoun(number) { + var hundred = Math.floor((number % 1000) / 100), + ten = Math.floor((number % 100) / 10), + one = number % 10, + word = ''; + if (hundred > 0) { + word += numbersNouns[hundred] + 'vatlh'; + } + if (ten > 0) { + word += (word !== '' ? ' ' : '') + numbersNouns[ten] + 'maH'; + } + if (one > 0) { + word += (word !== '' ? ' ' : '') + numbersNouns[one]; + } + return word === '' ? 'pagh' : word; + } + + moment.defineLocale('tlh', { + months: 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split( + '_' + ), + monthsShort: 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split( + '_' + ), + weekdaysShort: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split( + '_' + ), + weekdaysMin: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split( + '_' + ), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[DaHjaj] LT', + nextDay: '[wa’leS] LT', + nextWeek: 'LLL', + lastDay: '[wa’Hu’] LT', + lastWeek: 'LLL', + sameElse: 'L', + }, + relativeTime: { + future: translateFuture, + past: translatePast, + s: 'puS lup', + ss: translate$a, + m: 'wa’ tup', + mm: translate$a, + h: 'wa’ rep', + hh: translate$a, + d: 'wa’ jaj', + dd: translate$a, + M: 'wa’ jar', + MM: translate$a, + y: 'wa’ DIS', + yy: translate$a, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var suffixes$5 = { + 1: "'inci", + 5: "'inci", + 8: "'inci", + 70: "'inci", + 80: "'inci", + 2: "'nci", + 7: "'nci", + 20: "'nci", + 50: "'nci", + 3: "'üncü", + 4: "'üncü", + 100: "'üncü", + 6: "'ncı", + 9: "'uncu", + 10: "'uncu", + 30: "'uncu", + 60: "'ıncı", + 90: "'ıncı", + }; + + moment.defineLocale('tr', { + months: 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split( + '_' + ), + monthsShort: 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'), + weekdays: 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split( + '_' + ), + weekdaysShort: 'Paz_Pts_Sal_Çar_Per_Cum_Cts'.split('_'), + weekdaysMin: 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'), + meridiem: function (hours, minutes, isLower) { + if (hours < 12) { + return isLower ? 'öö' : 'ÖÖ'; + } else { + return isLower ? 'ös' : 'ÖS'; + } + }, + meridiemParse: /öö|ÖÖ|ös|ÖS/, + isPM: function (input) { + return input === 'ös' || input === 'ÖS'; + }, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[bugün saat] LT', + nextDay: '[yarın saat] LT', + nextWeek: '[gelecek] dddd [saat] LT', + lastDay: '[dün] LT', + lastWeek: '[geçen] dddd [saat] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s sonra', + past: '%s önce', + s: 'birkaç saniye', + ss: '%d saniye', + m: 'bir dakika', + mm: '%d dakika', + h: 'bir saat', + hh: '%d saat', + d: 'bir gün', + dd: '%d gün', + M: 'bir ay', + MM: '%d ay', + y: 'bir yıl', + yy: '%d yıl', + }, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'Do': + case 'DD': + return number; + default: + if (number === 0) { + // special case for zero + return number + "'ıncı"; + } + var a = number % 10, + b = (number % 100) - a, + c = number >= 100 ? 100 : null; + return number + (suffixes$5[a] || suffixes$5[b] || suffixes$5[c]); + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + // After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals. + // This is currently too difficult (maybe even impossible) to add. + moment.defineLocale('tzl', { + months: 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split( + '_' + ), + monthsShort: 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'), + weekdays: 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'), + weekdaysShort: 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'), + weekdaysMin: 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'), + longDateFormat: { + LT: 'HH.mm', + LTS: 'HH.mm.ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM [dallas] YYYY', + LLL: 'D. MMMM [dallas] YYYY HH.mm', + LLLL: 'dddd, [li] D. MMMM [dallas] YYYY HH.mm', + }, + meridiemParse: /d\'o|d\'a/i, + isPM: function (input) { + return "d'o" === input.toLowerCase(); + }, + meridiem: function (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? "d'o" : "D'O"; + } else { + return isLower ? "d'a" : "D'A"; + } + }, + calendar: { + sameDay: '[oxhi à] LT', + nextDay: '[demà à] LT', + nextWeek: 'dddd [à] LT', + lastDay: '[ieiri à] LT', + lastWeek: '[sür el] dddd [lasteu à] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'osprei %s', + past: 'ja%s', + s: processRelativeTime$8, + ss: processRelativeTime$8, + m: processRelativeTime$8, + mm: processRelativeTime$8, + h: processRelativeTime$8, + hh: processRelativeTime$8, + d: processRelativeTime$8, + dd: processRelativeTime$8, + M: processRelativeTime$8, + MM: processRelativeTime$8, + y: processRelativeTime$8, + yy: processRelativeTime$8, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + function processRelativeTime$8(number, withoutSuffix, key, isFuture) { + var format = { + s: ['viensas secunds', "'iensas secunds"], + ss: [number + ' secunds', '' + number + ' secunds'], + m: ["'n míut", "'iens míut"], + mm: [number + ' míuts', '' + number + ' míuts'], + h: ["'n þora", "'iensa þora"], + hh: [number + ' þoras', '' + number + ' þoras'], + d: ["'n ziua", "'iensa ziua"], + dd: [number + ' ziuas', '' + number + ' ziuas'], + M: ["'n mes", "'iens mes"], + MM: [number + ' mesen', '' + number + ' mesen'], + y: ["'n ar", "'iens ar"], + yy: [number + ' ars', '' + number + ' ars'], + }; + return isFuture + ? format[key][0] + : withoutSuffix + ? format[key][0] + : format[key][1]; + } + + //! moment.js locale configuration + + moment.defineLocale('tzm-latn', { + months: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split( + '_' + ), + monthsShort: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split( + '_' + ), + weekdays: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'), + weekdaysShort: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'), + weekdaysMin: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[asdkh g] LT', + nextDay: '[aska g] LT', + nextWeek: 'dddd [g] LT', + lastDay: '[assant g] LT', + lastWeek: 'dddd [g] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'dadkh s yan %s', + past: 'yan %s', + s: 'imik', + ss: '%d imik', + m: 'minuḍ', + mm: '%d minuḍ', + h: 'saɛa', + hh: '%d tassaɛin', + d: 'ass', + dd: '%d ossan', + M: 'ayowr', + MM: '%d iyyirn', + y: 'asgas', + yy: '%d isgasn', + }, + week: { + dow: 6, // Saturday is the first day of the week. + doy: 12, // The week that contains Jan 12th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('tzm', { + months: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split( + '_' + ), + monthsShort: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split( + '_' + ), + weekdays: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'), + weekdaysShort: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'), + weekdaysMin: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[ⴰⵙⴷⵅ ⴴ] LT', + nextDay: '[ⴰⵙⴽⴰ ⴴ] LT', + nextWeek: 'dddd [ⴴ] LT', + lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT', + lastWeek: 'dddd [ⴴ] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s', + past: 'ⵢⴰⵏ %s', + s: 'ⵉⵎⵉⴽ', + ss: '%d ⵉⵎⵉⴽ', + m: 'ⵎⵉⵏⵓⴺ', + mm: '%d ⵎⵉⵏⵓⴺ', + h: 'ⵙⴰⵄⴰ', + hh: '%d ⵜⴰⵙⵙⴰⵄⵉⵏ', + d: 'ⴰⵙⵙ', + dd: '%d oⵙⵙⴰⵏ', + M: 'ⴰⵢoⵓⵔ', + MM: '%d ⵉⵢⵢⵉⵔⵏ', + y: 'ⴰⵙⴳⴰⵙ', + yy: '%d ⵉⵙⴳⴰⵙⵏ', + }, + week: { + dow: 6, // Saturday is the first day of the week. + doy: 12, // The week that contains Jan 12th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('ug-cn', { + months: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split( + '_' + ), + monthsShort: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split( + '_' + ), + weekdays: 'يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە'.split( + '_' + ), + weekdaysShort: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'), + weekdaysMin: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY-MM-DD', + LL: 'YYYY-يىلىM-ئاينىڭD-كۈنى', + LLL: 'YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm', + LLLL: 'dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm', + }, + meridiemParse: /يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if ( + meridiem === 'يېرىم كېچە' || + meridiem === 'سەھەر' || + meridiem === 'چۈشتىن بۇرۇن' + ) { + return hour; + } else if (meridiem === 'چۈشتىن كېيىن' || meridiem === 'كەچ') { + return hour + 12; + } else { + return hour >= 11 ? hour : hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + var hm = hour * 100 + minute; + if (hm < 600) { + return 'يېرىم كېچە'; + } else if (hm < 900) { + return 'سەھەر'; + } else if (hm < 1130) { + return 'چۈشتىن بۇرۇن'; + } else if (hm < 1230) { + return 'چۈش'; + } else if (hm < 1800) { + return 'چۈشتىن كېيىن'; + } else { + return 'كەچ'; + } + }, + calendar: { + sameDay: '[بۈگۈن سائەت] LT', + nextDay: '[ئەتە سائەت] LT', + nextWeek: '[كېلەركى] dddd [سائەت] LT', + lastDay: '[تۆنۈگۈن] LT', + lastWeek: '[ئالدىنقى] dddd [سائەت] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s كېيىن', + past: '%s بۇرۇن', + s: 'نەچچە سېكونت', + ss: '%d سېكونت', + m: 'بىر مىنۇت', + mm: '%d مىنۇت', + h: 'بىر سائەت', + hh: '%d سائەت', + d: 'بىر كۈن', + dd: '%d كۈن', + M: 'بىر ئاي', + MM: '%d ئاي', + y: 'بىر يىل', + yy: '%d يىل', + }, + + dayOfMonthOrdinalParse: /\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '-كۈنى'; + case 'w': + case 'W': + return number + '-ھەپتە'; + default: + return number; + } + }, + preparse: function (string) { + return string.replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/,/g, '،'); + }, + week: { + // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效 + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 1st is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function plural$6(word, num) { + var forms = word.split('_'); + return num % 10 === 1 && num % 100 !== 11 + ? forms[0] + : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) + ? forms[1] + : forms[2]; + } + function relativeTimeWithPlural$4(number, withoutSuffix, key) { + var format = { + ss: withoutSuffix ? 'секунда_секунди_секунд' : 'секунду_секунди_секунд', + mm: withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин', + hh: withoutSuffix ? 'година_години_годин' : 'годину_години_годин', + dd: 'день_дні_днів', + MM: 'місяць_місяці_місяців', + yy: 'рік_роки_років', + }; + if (key === 'm') { + return withoutSuffix ? 'хвилина' : 'хвилину'; + } else if (key === 'h') { + return withoutSuffix ? 'година' : 'годину'; + } else { + return number + ' ' + plural$6(format[key], +number); + } + } + function weekdaysCaseReplace(m, format) { + var weekdays = { + nominative: 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split( + '_' + ), + accusative: 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split( + '_' + ), + genitive: 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split( + '_' + ), + }, + nounCase; + + if (m === true) { + return weekdays['nominative'] + .slice(1, 7) + .concat(weekdays['nominative'].slice(0, 1)); + } + if (!m) { + return weekdays['nominative']; + } + + nounCase = /(\[[ВвУу]\]) ?dddd/.test(format) + ? 'accusative' + : /\[?(?:минулої|наступної)? ?\] ?dddd/.test(format) + ? 'genitive' + : 'nominative'; + return weekdays[nounCase][m.day()]; + } + function processHoursFunction(str) { + return function () { + return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT'; + }; + } + + moment.defineLocale('uk', { + months: { + format: 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split( + '_' + ), + standalone: 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split( + '_' + ), + }, + monthsShort: 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split( + '_' + ), + weekdays: weekdaysCaseReplace, + weekdaysShort: 'нд_пн_вт_ср_чт_пт_сб'.split('_'), + weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY р.', + LLL: 'D MMMM YYYY р., HH:mm', + LLLL: 'dddd, D MMMM YYYY р., HH:mm', + }, + calendar: { + sameDay: processHoursFunction('[Сьогодні '), + nextDay: processHoursFunction('[Завтра '), + lastDay: processHoursFunction('[Вчора '), + nextWeek: processHoursFunction('[У] dddd ['), + lastWeek: function () { + switch (this.day()) { + case 0: + case 3: + case 5: + case 6: + return processHoursFunction('[Минулої] dddd [').call(this); + case 1: + case 2: + case 4: + return processHoursFunction('[Минулого] dddd [').call(this); + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'за %s', + past: '%s тому', + s: 'декілька секунд', + ss: relativeTimeWithPlural$4, + m: relativeTimeWithPlural$4, + mm: relativeTimeWithPlural$4, + h: 'годину', + hh: relativeTimeWithPlural$4, + d: 'день', + dd: relativeTimeWithPlural$4, + M: 'місяць', + MM: relativeTimeWithPlural$4, + y: 'рік', + yy: relativeTimeWithPlural$4, + }, + // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason + meridiemParse: /ночі|ранку|дня|вечора/, + isPM: function (input) { + return /^(дня|вечора)$/.test(input); + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'ночі'; + } else if (hour < 12) { + return 'ранку'; + } else if (hour < 17) { + return 'дня'; + } else { + return 'вечора'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}-(й|го)/, + ordinal: function (number, period) { + switch (period) { + case 'M': + case 'd': + case 'DDD': + case 'w': + case 'W': + return number + '-й'; + case 'D': + return number + '-го'; + default: + return number; + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var months$a = [ + 'جنوری', + 'فروری', + 'مارچ', + 'اپریل', + 'مئی', + 'جون', + 'جولائی', + 'اگست', + 'ستمبر', + 'اکتوبر', + 'نومبر', + 'دسمبر', + ], + days$1 = ['اتوار', 'پیر', 'منگل', 'بدھ', 'جمعرات', 'جمعہ', 'ہفتہ']; + + moment.defineLocale('ur', { + months: months$a, + monthsShort: months$a, + weekdays: days$1, + weekdaysShort: days$1, + weekdaysMin: days$1, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd، D MMMM YYYY HH:mm', + }, + meridiemParse: /صبح|شام/, + isPM: function (input) { + return 'شام' === input; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'صبح'; + } + return 'شام'; + }, + calendar: { + sameDay: '[آج بوقت] LT', + nextDay: '[کل بوقت] LT', + nextWeek: 'dddd [بوقت] LT', + lastDay: '[گذشتہ روز بوقت] LT', + lastWeek: '[گذشتہ] dddd [بوقت] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s بعد', + past: '%s قبل', + s: 'چند سیکنڈ', + ss: '%d سیکنڈ', + m: 'ایک منٹ', + mm: '%d منٹ', + h: 'ایک گھنٹہ', + hh: '%d گھنٹے', + d: 'ایک دن', + dd: '%d دن', + M: 'ایک ماہ', + MM: '%d ماہ', + y: 'ایک سال', + yy: '%d سال', + }, + preparse: function (string) { + return string.replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/,/g, '،'); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('uz-latn', { + months: 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split( + '_' + ), + monthsShort: 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'), + weekdays: 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split( + '_' + ), + weekdaysShort: 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'), + weekdaysMin: 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'D MMMM YYYY, dddd HH:mm', + }, + calendar: { + sameDay: '[Bugun soat] LT [da]', + nextDay: '[Ertaga] LT [da]', + nextWeek: 'dddd [kuni soat] LT [da]', + lastDay: '[Kecha soat] LT [da]', + lastWeek: "[O'tgan] dddd [kuni soat] LT [da]", + sameElse: 'L', + }, + relativeTime: { + future: 'Yaqin %s ichida', + past: 'Bir necha %s oldin', + s: 'soniya', + ss: '%d soniya', + m: 'bir daqiqa', + mm: '%d daqiqa', + h: 'bir soat', + hh: '%d soat', + d: 'bir kun', + dd: '%d kun', + M: 'bir oy', + MM: '%d oy', + y: 'bir yil', + yy: '%d yil', + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('uz', { + months: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split( + '_' + ), + monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'), + weekdays: 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'), + weekdaysShort: 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'), + weekdaysMin: 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'D MMMM YYYY, dddd HH:mm', + }, + calendar: { + sameDay: '[Бугун соат] LT [да]', + nextDay: '[Эртага] LT [да]', + nextWeek: 'dddd [куни соат] LT [да]', + lastDay: '[Кеча соат] LT [да]', + lastWeek: '[Утган] dddd [куни соат] LT [да]', + sameElse: 'L', + }, + relativeTime: { + future: 'Якин %s ичида', + past: 'Бир неча %s олдин', + s: 'фурсат', + ss: '%d фурсат', + m: 'бир дакика', + mm: '%d дакика', + h: 'бир соат', + hh: '%d соат', + d: 'бир кун', + dd: '%d кун', + M: 'бир ой', + MM: '%d ой', + y: 'бир йил', + yy: '%d йил', + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('vi', { + months: 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split( + '_' + ), + monthsShort: 'Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split( + '_' + ), + weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'), + weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'), + weekdaysParseExact: true, + meridiemParse: /sa|ch/i, + isPM: function (input) { + return /^ch$/i.test(input); + }, + meridiem: function (hours, minutes, isLower) { + if (hours < 12) { + return isLower ? 'sa' : 'SA'; + } else { + return isLower ? 'ch' : 'CH'; + } + }, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM [năm] YYYY', + LLL: 'D MMMM [năm] YYYY HH:mm', + LLLL: 'dddd, D MMMM [năm] YYYY HH:mm', + l: 'DD/M/YYYY', + ll: 'D MMM YYYY', + lll: 'D MMM YYYY HH:mm', + llll: 'ddd, D MMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Hôm nay lúc] LT', + nextDay: '[Ngày mai lúc] LT', + nextWeek: 'dddd [tuần tới lúc] LT', + lastDay: '[Hôm qua lúc] LT', + lastWeek: 'dddd [tuần trước lúc] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s tới', + past: '%s trước', + s: 'vài giây', + ss: '%d giây', + m: 'một phút', + mm: '%d phút', + h: 'một giờ', + hh: '%d giờ', + d: 'một ngày', + dd: '%d ngày', + M: 'một tháng', + MM: '%d tháng', + y: 'một năm', + yy: '%d năm', + }, + dayOfMonthOrdinalParse: /\d{1,2}/, + ordinal: function (number) { + return number; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('x-pseudo', { + months: 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split( + '_' + ), + monthsShort: 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split( + '_' + ), + weekdaysShort: 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'), + weekdaysMin: 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[T~ódá~ý át] LT', + nextDay: '[T~ómó~rró~w át] LT', + nextWeek: 'dddd [át] LT', + lastDay: '[Ý~ést~érdá~ý át] LT', + lastWeek: '[L~ást] dddd [át] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'í~ñ %s', + past: '%s á~gó', + s: 'á ~féw ~sécó~ñds', + ss: '%d s~écóñ~ds', + m: 'á ~míñ~úté', + mm: '%d m~íñú~tés', + h: 'á~ñ hó~úr', + hh: '%d h~óúrs', + d: 'á ~dáý', + dd: '%d d~áýs', + M: 'á ~móñ~th', + MM: '%d m~óñt~hs', + y: 'á ~ýéár', + yy: '%d ý~éárs', + }, + dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('yo', { + months: 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split( + '_' + ), + monthsShort: 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'), + weekdays: 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'), + weekdaysShort: 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'), + weekdaysMin: 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'), + longDateFormat: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY h:mm A', + LLLL: 'dddd, D MMMM YYYY h:mm A', + }, + calendar: { + sameDay: '[Ònì ni] LT', + nextDay: '[Ọ̀la ni] LT', + nextWeek: "dddd [Ọsẹ̀ tón'bọ] [ni] LT", + lastDay: '[Àna ni] LT', + lastWeek: 'dddd [Ọsẹ̀ tólọ́] [ni] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'ní %s', + past: '%s kọjá', + s: 'ìsẹjú aayá die', + ss: 'aayá %d', + m: 'ìsẹjú kan', + mm: 'ìsẹjú %d', + h: 'wákati kan', + hh: 'wákati %d', + d: 'ọjọ́ kan', + dd: 'ọjọ́ %d', + M: 'osù kan', + MM: 'osù %d', + y: 'ọdún kan', + yy: 'ọdún %d', + }, + dayOfMonthOrdinalParse: /ọjọ́\s\d{1,2}/, + ordinal: 'ọjọ́ %d', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('zh-cn', { + months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split( + '_' + ), + monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split( + '_' + ), + weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'), + weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'), + weekdaysMin: '日_一_二_三_四_五_六'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY/MM/DD', + LL: 'YYYY年M月D日', + LLL: 'YYYY年M月D日Ah点mm分', + LLLL: 'YYYY年M月D日ddddAh点mm分', + l: 'YYYY/M/D', + ll: 'YYYY年M月D日', + lll: 'YYYY年M月D日 HH:mm', + llll: 'YYYY年M月D日dddd HH:mm', + }, + meridiemParse: /凌晨|早上|上午|中午|下午|晚上/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') { + return hour; + } else if (meridiem === '下午' || meridiem === '晚上') { + return hour + 12; + } else { + // '中午' + return hour >= 11 ? hour : hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + var hm = hour * 100 + minute; + if (hm < 600) { + return '凌晨'; + } else if (hm < 900) { + return '早上'; + } else if (hm < 1130) { + return '上午'; + } else if (hm < 1230) { + return '中午'; + } else if (hm < 1800) { + return '下午'; + } else { + return '晚上'; + } + }, + calendar: { + sameDay: '[今天]LT', + nextDay: '[明天]LT', + nextWeek: function (now) { + if (now.week() !== this.week()) { + return '[下]dddLT'; + } else { + return '[本]dddLT'; + } + }, + lastDay: '[昨天]LT', + lastWeek: function (now) { + if (this.week() !== now.week()) { + return '[上]dddLT'; + } else { + return '[本]dddLT'; + } + }, + sameElse: 'L', + }, + dayOfMonthOrdinalParse: /\d{1,2}(日|月|周)/, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '日'; + case 'M': + return number + '月'; + case 'w': + case 'W': + return number + '周'; + default: + return number; + } + }, + relativeTime: { + future: '%s后', + past: '%s前', + s: '几秒', + ss: '%d 秒', + m: '1 分钟', + mm: '%d 分钟', + h: '1 小时', + hh: '%d 小时', + d: '1 天', + dd: '%d 天', + M: '1 个月', + MM: '%d 个月', + y: '1 年', + yy: '%d 年', + }, + week: { + // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效 + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('zh-hk', { + months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split( + '_' + ), + monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split( + '_' + ), + weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'), + weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'), + weekdaysMin: '日_一_二_三_四_五_六'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY/MM/DD', + LL: 'YYYY年M月D日', + LLL: 'YYYY年M月D日 HH:mm', + LLLL: 'YYYY年M月D日dddd HH:mm', + l: 'YYYY/M/D', + ll: 'YYYY年M月D日', + lll: 'YYYY年M月D日 HH:mm', + llll: 'YYYY年M月D日dddd HH:mm', + }, + meridiemParse: /凌晨|早上|上午|中午|下午|晚上/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') { + return hour; + } else if (meridiem === '中午') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === '下午' || meridiem === '晚上') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + var hm = hour * 100 + minute; + if (hm < 600) { + return '凌晨'; + } else if (hm < 900) { + return '早上'; + } else if (hm < 1200) { + return '上午'; + } else if (hm === 1200) { + return '中午'; + } else if (hm < 1800) { + return '下午'; + } else { + return '晚上'; + } + }, + calendar: { + sameDay: '[今天]LT', + nextDay: '[明天]LT', + nextWeek: '[下]ddddLT', + lastDay: '[昨天]LT', + lastWeek: '[上]ddddLT', + sameElse: 'L', + }, + dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '日'; + case 'M': + return number + '月'; + case 'w': + case 'W': + return number + '週'; + default: + return number; + } + }, + relativeTime: { + future: '%s後', + past: '%s前', + s: '幾秒', + ss: '%d 秒', + m: '1 分鐘', + mm: '%d 分鐘', + h: '1 小時', + hh: '%d 小時', + d: '1 天', + dd: '%d 天', + M: '1 個月', + MM: '%d 個月', + y: '1 年', + yy: '%d 年', + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('zh-mo', { + months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split( + '_' + ), + monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split( + '_' + ), + weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'), + weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'), + weekdaysMin: '日_一_二_三_四_五_六'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'YYYY年M月D日', + LLL: 'YYYY年M月D日 HH:mm', + LLLL: 'YYYY年M月D日dddd HH:mm', + l: 'D/M/YYYY', + ll: 'YYYY年M月D日', + lll: 'YYYY年M月D日 HH:mm', + llll: 'YYYY年M月D日dddd HH:mm', + }, + meridiemParse: /凌晨|早上|上午|中午|下午|晚上/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') { + return hour; + } else if (meridiem === '中午') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === '下午' || meridiem === '晚上') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + var hm = hour * 100 + minute; + if (hm < 600) { + return '凌晨'; + } else if (hm < 900) { + return '早上'; + } else if (hm < 1130) { + return '上午'; + } else if (hm < 1230) { + return '中午'; + } else if (hm < 1800) { + return '下午'; + } else { + return '晚上'; + } + }, + calendar: { + sameDay: '[今天] LT', + nextDay: '[明天] LT', + nextWeek: '[下]dddd LT', + lastDay: '[昨天] LT', + lastWeek: '[上]dddd LT', + sameElse: 'L', + }, + dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '日'; + case 'M': + return number + '月'; + case 'w': + case 'W': + return number + '週'; + default: + return number; + } + }, + relativeTime: { + future: '%s內', + past: '%s前', + s: '幾秒', + ss: '%d 秒', + m: '1 分鐘', + mm: '%d 分鐘', + h: '1 小時', + hh: '%d 小時', + d: '1 天', + dd: '%d 天', + M: '1 個月', + MM: '%d 個月', + y: '1 年', + yy: '%d 年', + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('zh-tw', { + months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split( + '_' + ), + monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split( + '_' + ), + weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'), + weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'), + weekdaysMin: '日_一_二_三_四_五_六'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY/MM/DD', + LL: 'YYYY年M月D日', + LLL: 'YYYY年M月D日 HH:mm', + LLLL: 'YYYY年M月D日dddd HH:mm', + l: 'YYYY/M/D', + ll: 'YYYY年M月D日', + lll: 'YYYY年M月D日 HH:mm', + llll: 'YYYY年M月D日dddd HH:mm', + }, + meridiemParse: /凌晨|早上|上午|中午|下午|晚上/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') { + return hour; + } else if (meridiem === '中午') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === '下午' || meridiem === '晚上') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + var hm = hour * 100 + minute; + if (hm < 600) { + return '凌晨'; + } else if (hm < 900) { + return '早上'; + } else if (hm < 1130) { + return '上午'; + } else if (hm < 1230) { + return '中午'; + } else if (hm < 1800) { + return '下午'; + } else { + return '晚上'; + } + }, + calendar: { + sameDay: '[今天] LT', + nextDay: '[明天] LT', + nextWeek: '[下]dddd LT', + lastDay: '[昨天] LT', + lastWeek: '[上]dddd LT', + sameElse: 'L', + }, + dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '日'; + case 'M': + return number + '月'; + case 'w': + case 'W': + return number + '週'; + default: + return number; + } + }, + relativeTime: { + future: '%s後', + past: '%s前', + s: '幾秒', + ss: '%d 秒', + m: '1 分鐘', + mm: '%d 分鐘', + h: '1 小時', + hh: '%d 小時', + d: '1 天', + dd: '%d 天', + M: '1 個月', + MM: '%d 個月', + y: '1 年', + yy: '%d 年', + }, + }); + + moment.locale('en'); + + return moment; + +}))); diff --git a/admin/js/vendors/moment/locales.min.js b/admin/js/vendors/moment/locales.min.js new file mode 100644 index 0000000..56da071 --- /dev/null +++ b/admin/js/vendors/moment/locales.min.js @@ -0,0 +1,2 @@ +!function(e,a){"object"==typeof exports&&"undefined"!=typeof module&&"function"==typeof require?a(require("../moment")):"function"==typeof define&&define.amd?define(["../moment"],a):a(e.moment)}(this,function(e){"use strict";e.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiemParse:/vm|nm/i,isPM:function(e){return/^nm$/i.test(e)},meridiem:function(e,a,_){return e<12?_?"vm":"VM":_?"nm":"NM"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[M\xf4re om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",ss:"%d sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||20<=e?"ste":"de")},week:{dow:1,doy:4}});function r(e){return 0===e?0:1===e?1:2===e?2:3<=e%100&&e%100<=10?3:11<=e%100?4:5}function a(n){return function(e,a,_,s){var d=r(e),t=i[n][r(e)];return 2===d&&(t=t[a?0:1]),t.replace(/%d/i,e)}}var i={s:["\u0623\u0642\u0644 \u0645\u0646 \u062b\u0627\u0646\u064a\u0629","\u062b\u0627\u0646\u064a\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062b\u0627\u0646\u064a\u062a\u0627\u0646","\u062b\u0627\u0646\u064a\u062a\u064a\u0646"],"%d \u062b\u0648\u0627\u0646","%d \u062b\u0627\u0646\u064a\u0629","%d \u062b\u0627\u0646\u064a\u0629"],m:["\u0623\u0642\u0644 \u0645\u0646 \u062f\u0642\u064a\u0642\u0629","\u062f\u0642\u064a\u0642\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062f\u0642\u064a\u0642\u062a\u0627\u0646","\u062f\u0642\u064a\u0642\u062a\u064a\u0646"],"%d \u062f\u0642\u0627\u0626\u0642","%d \u062f\u0642\u064a\u0642\u0629","%d \u062f\u0642\u064a\u0642\u0629"],h:["\u0623\u0642\u0644 \u0645\u0646 \u0633\u0627\u0639\u0629","\u0633\u0627\u0639\u0629 \u0648\u0627\u062d\u062f\u0629",["\u0633\u0627\u0639\u062a\u0627\u0646","\u0633\u0627\u0639\u062a\u064a\u0646"],"%d \u0633\u0627\u0639\u0627\u062a","%d \u0633\u0627\u0639\u0629","%d \u0633\u0627\u0639\u0629"],d:["\u0623\u0642\u0644 \u0645\u0646 \u064a\u0648\u0645","\u064a\u0648\u0645 \u0648\u0627\u062d\u062f",["\u064a\u0648\u0645\u0627\u0646","\u064a\u0648\u0645\u064a\u0646"],"%d \u0623\u064a\u0627\u0645","%d \u064a\u0648\u0645\u064b\u0627","%d \u064a\u0648\u0645"],M:["\u0623\u0642\u0644 \u0645\u0646 \u0634\u0647\u0631","\u0634\u0647\u0631 \u0648\u0627\u062d\u062f",["\u0634\u0647\u0631\u0627\u0646","\u0634\u0647\u0631\u064a\u0646"],"%d \u0623\u0634\u0647\u0631","%d \u0634\u0647\u0631\u0627","%d \u0634\u0647\u0631"],y:["\u0623\u0642\u0644 \u0645\u0646 \u0639\u0627\u0645","\u0639\u0627\u0645 \u0648\u0627\u062d\u062f",["\u0639\u0627\u0645\u0627\u0646","\u0639\u0627\u0645\u064a\u0646"],"%d \u0623\u0639\u0648\u0627\u0645","%d \u0639\u0627\u0645\u064b\u0627","%d \u0639\u0627\u0645"]},_=["\u062c\u0627\u0646\u0641\u064a","\u0641\u064a\u0641\u0631\u064a","\u0645\u0627\u0631\u0633","\u0623\u0641\u0631\u064a\u0644","\u0645\u0627\u064a","\u062c\u0648\u0627\u0646","\u062c\u0648\u064a\u0644\u064a\u0629","\u0623\u0648\u062a","\u0633\u0628\u062a\u0645\u0628\u0631","\u0623\u0643\u062a\u0648\u0628\u0631","\u0646\u0648\u0641\u0645\u0628\u0631","\u062f\u064a\u0633\u0645\u0628\u0631"];e.defineLocale("ar-dz",{months:_,monthsShort:_,weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/\u200fM/\u200fYYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(e){return"\u0645"===e},meridiem:function(e,a,_){return e<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u064b\u0627 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0628\u0639\u062f %s",past:"\u0645\u0646\u0630 %s",s:a("s"),ss:a("s"),m:a("m"),mm:a("m"),h:a("h"),hh:a("h"),d:a("d"),dd:a("d"),M:a("M"),MM:a("M"),y:a("y"),yy:a("y")},postformat:function(e){return e.replace(/,/g,"\u060c")},week:{dow:0,doy:4}}),e.defineLocale("ar-kw",{months:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648\u0632_\u063a\u0634\u062a_\u0634\u062a\u0646\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062f\u062c\u0646\u0628\u0631".split("_"),monthsShort:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648\u0632_\u063a\u0634\u062a_\u0634\u062a\u0646\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062f\u062c\u0646\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062a\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0627\u062d\u062f_\u0627\u062a\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},week:{dow:0,doy:12}});function m(e){return 0===e?0:1===e?1:2===e?2:3<=e%100&&e%100<=10?3:11<=e%100?4:5}function s(n){return function(e,a,_,s){var d=m(e),t=o[n][m(e)];return 2===d&&(t=t[a?0:1]),t.replace(/%d/i,e)}}var d={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"},o={s:["\u0623\u0642\u0644 \u0645\u0646 \u062b\u0627\u0646\u064a\u0629","\u062b\u0627\u0646\u064a\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062b\u0627\u0646\u064a\u062a\u0627\u0646","\u062b\u0627\u0646\u064a\u062a\u064a\u0646"],"%d \u062b\u0648\u0627\u0646","%d \u062b\u0627\u0646\u064a\u0629","%d \u062b\u0627\u0646\u064a\u0629"],m:["\u0623\u0642\u0644 \u0645\u0646 \u062f\u0642\u064a\u0642\u0629","\u062f\u0642\u064a\u0642\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062f\u0642\u064a\u0642\u062a\u0627\u0646","\u062f\u0642\u064a\u0642\u062a\u064a\u0646"],"%d \u062f\u0642\u0627\u0626\u0642","%d \u062f\u0642\u064a\u0642\u0629","%d \u062f\u0642\u064a\u0642\u0629"],h:["\u0623\u0642\u0644 \u0645\u0646 \u0633\u0627\u0639\u0629","\u0633\u0627\u0639\u0629 \u0648\u0627\u062d\u062f\u0629",["\u0633\u0627\u0639\u062a\u0627\u0646","\u0633\u0627\u0639\u062a\u064a\u0646"],"%d \u0633\u0627\u0639\u0627\u062a","%d \u0633\u0627\u0639\u0629","%d \u0633\u0627\u0639\u0629"],d:["\u0623\u0642\u0644 \u0645\u0646 \u064a\u0648\u0645","\u064a\u0648\u0645 \u0648\u0627\u062d\u062f",["\u064a\u0648\u0645\u0627\u0646","\u064a\u0648\u0645\u064a\u0646"],"%d \u0623\u064a\u0627\u0645","%d \u064a\u0648\u0645\u064b\u0627","%d \u064a\u0648\u0645"],M:["\u0623\u0642\u0644 \u0645\u0646 \u0634\u0647\u0631","\u0634\u0647\u0631 \u0648\u0627\u062d\u062f",["\u0634\u0647\u0631\u0627\u0646","\u0634\u0647\u0631\u064a\u0646"],"%d \u0623\u0634\u0647\u0631","%d \u0634\u0647\u0631\u0627","%d \u0634\u0647\u0631"],y:["\u0623\u0642\u0644 \u0645\u0646 \u0639\u0627\u0645","\u0639\u0627\u0645 \u0648\u0627\u062d\u062f",["\u0639\u0627\u0645\u0627\u0646","\u0639\u0627\u0645\u064a\u0646"],"%d \u0623\u0639\u0648\u0627\u0645","%d \u0639\u0627\u0645\u064b\u0627","%d \u0639\u0627\u0645"]},t=["\u064a\u0646\u0627\u064a\u0631","\u0641\u0628\u0631\u0627\u064a\u0631","\u0645\u0627\u0631\u0633","\u0623\u0628\u0631\u064a\u0644","\u0645\u0627\u064a\u0648","\u064a\u0648\u0646\u064a\u0648","\u064a\u0648\u0644\u064a\u0648","\u0623\u063a\u0633\u0637\u0633","\u0633\u0628\u062a\u0645\u0628\u0631","\u0623\u0643\u062a\u0648\u0628\u0631","\u0646\u0648\u0641\u0645\u0628\u0631","\u062f\u064a\u0633\u0645\u0628\u0631"];e.defineLocale("ar-ly",{months:t,monthsShort:t,weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/\u200fM/\u200fYYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(e){return"\u0645"===e},meridiem:function(e,a,_){return e<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u064b\u0627 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0628\u0639\u062f %s",past:"\u0645\u0646\u0630 %s",s:s("s"),ss:s("s"),m:s("m"),mm:s("m"),h:s("h"),hh:s("h"),d:s("d"),dd:s("d"),M:s("M"),MM:s("M"),y:s("y"),yy:s("y")},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return d[e]}).replace(/,/g,"\u060c")},week:{dow:6,doy:12}}),e.defineLocale("ar-ma",{months:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648\u0632_\u063a\u0634\u062a_\u0634\u062a\u0646\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062f\u062c\u0646\u0628\u0631".split("_"),monthsShort:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648\u0632_\u063a\u0634\u062a_\u0634\u062a\u0646\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062f\u062c\u0646\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0627\u062d\u062f_\u0627\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},week:{dow:6,doy:12}});var n={1:"\u0661",2:"\u0662",3:"\u0663",4:"\u0664",5:"\u0665",6:"\u0666",7:"\u0667",8:"\u0668",9:"\u0669",0:"\u0660"},u={"\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u0660":"0"};e.defineLocale("ar-sa",{months:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a\u0648_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648_\u0623\u063a\u0633\u0637\u0633_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),monthsShort:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a\u0648_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648_\u0623\u063a\u0633\u0637\u0633_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(e){return"\u0645"===e},meridiem:function(e,a,_){return e<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},preparse:function(e){return e.replace(/[\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\u0660]/g,function(e){return u[e]}).replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return n[e]}).replace(/,/g,"\u060c")},week:{dow:0,doy:6}}),e.defineLocale("ar-tn",{months:"\u062c\u0627\u0646\u0641\u064a_\u0641\u064a\u0641\u0631\u064a_\u0645\u0627\u0631\u0633_\u0623\u0641\u0631\u064a\u0644_\u0645\u0627\u064a_\u062c\u0648\u0627\u0646_\u062c\u0648\u064a\u0644\u064a\u0629_\u0623\u0648\u062a_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),monthsShort:"\u062c\u0627\u0646\u0641\u064a_\u0641\u064a\u0641\u0631\u064a_\u0645\u0627\u0631\u0633_\u0623\u0641\u0631\u064a\u0644_\u0645\u0627\u064a_\u062c\u0648\u0627\u0646_\u062c\u0648\u064a\u0644\u064a\u0629_\u0623\u0648\u062a_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},week:{dow:1,doy:4}});function l(e){return 0===e?0:1===e?1:2===e?2:3<=e%100&&e%100<=10?3:11<=e%100?4:5}function M(n){return function(e,a,_,s){var d=l(e),t=h[n][l(e)];return 2===d&&(t=t[a?0:1]),t.replace(/%d/i,e)}}var L={1:"\u0661",2:"\u0662",3:"\u0663",4:"\u0664",5:"\u0665",6:"\u0666",7:"\u0667",8:"\u0668",9:"\u0669",0:"\u0660"},Y={"\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u0660":"0"},h={s:["\u0623\u0642\u0644 \u0645\u0646 \u062b\u0627\u0646\u064a\u0629","\u062b\u0627\u0646\u064a\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062b\u0627\u0646\u064a\u062a\u0627\u0646","\u062b\u0627\u0646\u064a\u062a\u064a\u0646"],"%d \u062b\u0648\u0627\u0646","%d \u062b\u0627\u0646\u064a\u0629","%d \u062b\u0627\u0646\u064a\u0629"],m:["\u0623\u0642\u0644 \u0645\u0646 \u062f\u0642\u064a\u0642\u0629","\u062f\u0642\u064a\u0642\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062f\u0642\u064a\u0642\u062a\u0627\u0646","\u062f\u0642\u064a\u0642\u062a\u064a\u0646"],"%d \u062f\u0642\u0627\u0626\u0642","%d \u062f\u0642\u064a\u0642\u0629","%d \u062f\u0642\u064a\u0642\u0629"],h:["\u0623\u0642\u0644 \u0645\u0646 \u0633\u0627\u0639\u0629","\u0633\u0627\u0639\u0629 \u0648\u0627\u062d\u062f\u0629",["\u0633\u0627\u0639\u062a\u0627\u0646","\u0633\u0627\u0639\u062a\u064a\u0646"],"%d \u0633\u0627\u0639\u0627\u062a","%d \u0633\u0627\u0639\u0629","%d \u0633\u0627\u0639\u0629"],d:["\u0623\u0642\u0644 \u0645\u0646 \u064a\u0648\u0645","\u064a\u0648\u0645 \u0648\u0627\u062d\u062f",["\u064a\u0648\u0645\u0627\u0646","\u064a\u0648\u0645\u064a\u0646"],"%d \u0623\u064a\u0627\u0645","%d \u064a\u0648\u0645\u064b\u0627","%d \u064a\u0648\u0645"],M:["\u0623\u0642\u0644 \u0645\u0646 \u0634\u0647\u0631","\u0634\u0647\u0631 \u0648\u0627\u062d\u062f",["\u0634\u0647\u0631\u0627\u0646","\u0634\u0647\u0631\u064a\u0646"],"%d \u0623\u0634\u0647\u0631","%d \u0634\u0647\u0631\u0627","%d \u0634\u0647\u0631"],y:["\u0623\u0642\u0644 \u0645\u0646 \u0639\u0627\u0645","\u0639\u0627\u0645 \u0648\u0627\u062d\u062f",["\u0639\u0627\u0645\u0627\u0646","\u0639\u0627\u0645\u064a\u0646"],"%d \u0623\u0639\u0648\u0627\u0645","%d \u0639\u0627\u0645\u064b\u0627","%d \u0639\u0627\u0645"]},y=["\u064a\u0646\u0627\u064a\u0631","\u0641\u0628\u0631\u0627\u064a\u0631","\u0645\u0627\u0631\u0633","\u0623\u0628\u0631\u064a\u0644","\u0645\u0627\u064a\u0648","\u064a\u0648\u0646\u064a\u0648","\u064a\u0648\u0644\u064a\u0648","\u0623\u063a\u0633\u0637\u0633","\u0633\u0628\u062a\u0645\u0628\u0631","\u0623\u0643\u062a\u0648\u0628\u0631","\u0646\u0648\u0641\u0645\u0628\u0631","\u062f\u064a\u0633\u0645\u0628\u0631"];e.defineLocale("ar",{months:y,monthsShort:y,weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/\u200fM/\u200fYYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(e){return"\u0645"===e},meridiem:function(e,a,_){return e<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u064b\u0627 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0628\u0639\u062f %s",past:"\u0645\u0646\u0630 %s",s:M("s"),ss:M("s"),m:M("m"),mm:M("m"),h:M("h"),hh:M("h"),d:M("d"),dd:M("d"),M:M("M"),MM:M("M"),y:M("y"),yy:M("y")},preparse:function(e){return e.replace(/[\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\u0660]/g,function(e){return Y[e]}).replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return L[e]}).replace(/,/g,"\u060c")},week:{dow:6,doy:12}});var c={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-\xfcnc\xfc",4:"-\xfcnc\xfc",100:"-\xfcnc\xfc",6:"-nc\u0131",9:"-uncu",10:"-uncu",30:"-uncu",60:"-\u0131nc\u0131",90:"-\u0131nc\u0131"};function k(e,a,_){var s,d;return"m"===_?a?"\u0445\u0432\u0456\u043b\u0456\u043d\u0430":"\u0445\u0432\u0456\u043b\u0456\u043d\u0443":"h"===_?a?"\u0433\u0430\u0434\u0437\u0456\u043d\u0430":"\u0433\u0430\u0434\u0437\u0456\u043d\u0443":e+" "+(s=+e,d={ss:a?"\u0441\u0435\u043a\u0443\u043d\u0434\u0430_\u0441\u0435\u043a\u0443\u043d\u0434\u044b_\u0441\u0435\u043a\u0443\u043d\u0434":"\u0441\u0435\u043a\u0443\u043d\u0434\u0443_\u0441\u0435\u043a\u0443\u043d\u0434\u044b_\u0441\u0435\u043a\u0443\u043d\u0434",mm:a?"\u0445\u0432\u0456\u043b\u0456\u043d\u0430_\u0445\u0432\u0456\u043b\u0456\u043d\u044b_\u0445\u0432\u0456\u043b\u0456\u043d":"\u0445\u0432\u0456\u043b\u0456\u043d\u0443_\u0445\u0432\u0456\u043b\u0456\u043d\u044b_\u0445\u0432\u0456\u043b\u0456\u043d",hh:a?"\u0433\u0430\u0434\u0437\u0456\u043d\u0430_\u0433\u0430\u0434\u0437\u0456\u043d\u044b_\u0433\u0430\u0434\u0437\u0456\u043d":"\u0433\u0430\u0434\u0437\u0456\u043d\u0443_\u0433\u0430\u0434\u0437\u0456\u043d\u044b_\u0433\u0430\u0434\u0437\u0456\u043d",dd:"\u0434\u0437\u0435\u043d\u044c_\u0434\u043d\u0456_\u0434\u0437\u0451\u043d",MM:"\u043c\u0435\u0441\u044f\u0446_\u043c\u0435\u0441\u044f\u0446\u044b_\u043c\u0435\u0441\u044f\u0446\u0430\u045e",yy:"\u0433\u043e\u0434_\u0433\u0430\u0434\u044b_\u0433\u0430\u0434\u043e\u045e"}[_].split("_"),s%10==1&&s%100!=11?d[0]:2<=s%10&&s%10<=4&&(s%100<10||20<=s%100)?d[1]:d[2])}e.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ert\u0259si_\xc7\u0259r\u015f\u0259nb\u0259 ax\u015fam\u0131_\xc7\u0259r\u015f\u0259nb\u0259_C\xfcm\u0259 ax\u015fam\u0131_C\xfcm\u0259_\u015e\u0259nb\u0259".split("_"),weekdaysShort:"Baz_BzE_\xc7Ax_\xc7\u0259r_CAx_C\xfcm_\u015e\u0259n".split("_"),weekdaysMin:"Bz_BE_\xc7A_\xc7\u0259_CA_C\xfc_\u015e\u0259".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bug\xfcn saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[g\u0259l\u0259n h\u0259ft\u0259] dddd [saat] LT",lastDay:"[d\xfcn\u0259n] LT",lastWeek:"[ke\xe7\u0259n h\u0259ft\u0259] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s \u0259vv\u0259l",s:"bir ne\xe7\u0259 saniy\u0259",ss:"%d saniy\u0259",m:"bir d\u0259qiq\u0259",mm:"%d d\u0259qiq\u0259",h:"bir saat",hh:"%d saat",d:"bir g\xfcn",dd:"%d g\xfcn",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gec\u0259|s\u0259h\u0259r|g\xfcnd\xfcz|ax\u015fam/,isPM:function(e){return/^(g\xfcnd\xfcz|ax\u015fam)$/.test(e)},meridiem:function(e,a,_){return e<4?"gec\u0259":e<12?"s\u0259h\u0259r":e<17?"g\xfcnd\xfcz":"ax\u015fam"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0131nc\u0131|inci|nci|\xfcnc\xfc|nc\u0131|uncu)/,ordinal:function(e){if(0===e)return e+"-\u0131nc\u0131";var a=e%10;return e+(c[a]||c[e%100-a]||c[100<=e?100:null])},week:{dow:1,doy:7}}),e.defineLocale("be",{months:{format:"\u0441\u0442\u0443\u0434\u0437\u0435\u043d\u044f_\u043b\u044e\u0442\u0430\u0433\u0430_\u0441\u0430\u043a\u0430\u0432\u0456\u043a\u0430_\u043a\u0440\u0430\u0441\u0430\u0432\u0456\u043a\u0430_\u0442\u0440\u0430\u045e\u043d\u044f_\u0447\u044d\u0440\u0432\u0435\u043d\u044f_\u043b\u0456\u043f\u0435\u043d\u044f_\u0436\u043d\u0456\u045e\u043d\u044f_\u0432\u0435\u0440\u0430\u0441\u043d\u044f_\u043a\u0430\u0441\u0442\u0440\u044b\u0447\u043d\u0456\u043a\u0430_\u043b\u0456\u0441\u0442\u0430\u043f\u0430\u0434\u0430_\u0441\u043d\u0435\u0436\u043d\u044f".split("_"),standalone:"\u0441\u0442\u0443\u0434\u0437\u0435\u043d\u044c_\u043b\u044e\u0442\u044b_\u0441\u0430\u043a\u0430\u0432\u0456\u043a_\u043a\u0440\u0430\u0441\u0430\u0432\u0456\u043a_\u0442\u0440\u0430\u0432\u0435\u043d\u044c_\u0447\u044d\u0440\u0432\u0435\u043d\u044c_\u043b\u0456\u043f\u0435\u043d\u044c_\u0436\u043d\u0456\u0432\u0435\u043d\u044c_\u0432\u0435\u0440\u0430\u0441\u0435\u043d\u044c_\u043a\u0430\u0441\u0442\u0440\u044b\u0447\u043d\u0456\u043a_\u043b\u0456\u0441\u0442\u0430\u043f\u0430\u0434_\u0441\u043d\u0435\u0436\u0430\u043d\u044c".split("_")},monthsShort:"\u0441\u0442\u0443\u0434_\u043b\u044e\u0442_\u0441\u0430\u043a_\u043a\u0440\u0430\u0441_\u0442\u0440\u0430\u0432_\u0447\u044d\u0440\u0432_\u043b\u0456\u043f_\u0436\u043d\u0456\u0432_\u0432\u0435\u0440_\u043a\u0430\u0441\u0442_\u043b\u0456\u0441\u0442_\u0441\u043d\u0435\u0436".split("_"),weekdays:{format:"\u043d\u044f\u0434\u0437\u0435\u043b\u044e_\u043f\u0430\u043d\u044f\u0434\u0437\u0435\u043b\u0430\u043a_\u0430\u045e\u0442\u043e\u0440\u0430\u043a_\u0441\u0435\u0440\u0430\u0434\u0443_\u0447\u0430\u0446\u0432\u0435\u0440_\u043f\u044f\u0442\u043d\u0456\u0446\u0443_\u0441\u0443\u0431\u043e\u0442\u0443".split("_"),standalone:"\u043d\u044f\u0434\u0437\u0435\u043b\u044f_\u043f\u0430\u043d\u044f\u0434\u0437\u0435\u043b\u0430\u043a_\u0430\u045e\u0442\u043e\u0440\u0430\u043a_\u0441\u0435\u0440\u0430\u0434\u0430_\u0447\u0430\u0446\u0432\u0435\u0440_\u043f\u044f\u0442\u043d\u0456\u0446\u0430_\u0441\u0443\u0431\u043e\u0442\u0430".split("_"),isFormat:/\[ ?[\u0423\u0443\u045e] ?(?:\u043c\u0456\u043d\u0443\u043b\u0443\u044e|\u043d\u0430\u0441\u0442\u0443\u043f\u043d\u0443\u044e)? ?\] ?dddd/},weekdaysShort:"\u043d\u0434_\u043f\u043d_\u0430\u0442_\u0441\u0440_\u0447\u0446_\u043f\u0442_\u0441\u0431".split("_"),weekdaysMin:"\u043d\u0434_\u043f\u043d_\u0430\u0442_\u0441\u0440_\u0447\u0446_\u043f\u0442_\u0441\u0431".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0433.",LLL:"D MMMM YYYY \u0433., HH:mm",LLLL:"dddd, D MMMM YYYY \u0433., HH:mm"},calendar:{sameDay:"[\u0421\u0451\u043d\u043d\u044f \u045e] LT",nextDay:"[\u0417\u0430\u045e\u0442\u0440\u0430 \u045e] LT",lastDay:"[\u0423\u0447\u043e\u0440\u0430 \u045e] LT",nextWeek:function(){return"[\u0423] dddd [\u045e] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[\u0423 \u043c\u0456\u043d\u0443\u043b\u0443\u044e] dddd [\u045e] LT";case 1:case 2:case 4:return"[\u0423 \u043c\u0456\u043d\u0443\u043b\u044b] dddd [\u045e] LT"}},sameElse:"L"},relativeTime:{future:"\u043f\u0440\u0430\u0437 %s",past:"%s \u0442\u0430\u043c\u0443",s:"\u043d\u0435\u043a\u0430\u043b\u044c\u043a\u0456 \u0441\u0435\u043a\u0443\u043d\u0434",m:k,mm:k,h:k,hh:k,d:"\u0434\u0437\u0435\u043d\u044c",dd:k,M:"\u043c\u0435\u0441\u044f\u0446",MM:k,y:"\u0433\u043e\u0434",yy:k},meridiemParse:/\u043d\u043e\u0447\u044b|\u0440\u0430\u043d\u0456\u0446\u044b|\u0434\u043d\u044f|\u0432\u0435\u0447\u0430\u0440\u0430/,isPM:function(e){return/^(\u0434\u043d\u044f|\u0432\u0435\u0447\u0430\u0440\u0430)$/.test(e)},meridiem:function(e,a,_){return e<4?"\u043d\u043e\u0447\u044b":e<12?"\u0440\u0430\u043d\u0456\u0446\u044b":e<17?"\u0434\u043d\u044f":"\u0432\u0435\u0447\u0430\u0440\u0430"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0456|\u044b|\u0433\u0430)/,ordinal:function(e,a){switch(a){case"M":case"d":case"DDD":case"w":case"W":return e%10!=2&&e%10!=3||e%100==12||e%100==13?e+"-\u044b":e+"-\u0456";case"D":return e+"-\u0433\u0430";default:return e}},week:{dow:1,doy:7}}),e.defineLocale("bg",{months:"\u044f\u043d\u0443\u0430\u0440\u0438_\u0444\u0435\u0432\u0440\u0443\u0430\u0440\u0438_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0438\u043b_\u043c\u0430\u0439_\u044e\u043d\u0438_\u044e\u043b\u0438_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043f\u0442\u0435\u043c\u0432\u0440\u0438_\u043e\u043a\u0442\u043e\u043c\u0432\u0440\u0438_\u043d\u043e\u0435\u043c\u0432\u0440\u0438_\u0434\u0435\u043a\u0435\u043c\u0432\u0440\u0438".split("_"),monthsShort:"\u044f\u043d\u0443_\u0444\u0435\u0432_\u043c\u0430\u0440_\u0430\u043f\u0440_\u043c\u0430\u0439_\u044e\u043d\u0438_\u044e\u043b\u0438_\u0430\u0432\u0433_\u0441\u0435\u043f_\u043e\u043a\u0442_\u043d\u043e\u0435_\u0434\u0435\u043a".split("_"),weekdays:"\u043d\u0435\u0434\u0435\u043b\u044f_\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a_\u0432\u0442\u043e\u0440\u043d\u0438\u043a_\u0441\u0440\u044f\u0434\u0430_\u0447\u0435\u0442\u0432\u044a\u0440\u0442\u044a\u043a_\u043f\u0435\u0442\u044a\u043a_\u0441\u044a\u0431\u043e\u0442\u0430".split("_"),weekdaysShort:"\u043d\u0435\u0434_\u043f\u043e\u043d_\u0432\u0442\u043e_\u0441\u0440\u044f_\u0447\u0435\u0442_\u043f\u0435\u0442_\u0441\u044a\u0431".split("_"),weekdaysMin:"\u043d\u0434_\u043f\u043d_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043f\u0442_\u0441\u0431".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[\u0414\u043d\u0435\u0441 \u0432] LT",nextDay:"[\u0423\u0442\u0440\u0435 \u0432] LT",nextWeek:"dddd [\u0432] LT",lastDay:"[\u0412\u0447\u0435\u0440\u0430 \u0432] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[\u041c\u0438\u043d\u0430\u043b\u0430\u0442\u0430] dddd [\u0432] LT";case 1:case 2:case 4:case 5:return"[\u041c\u0438\u043d\u0430\u043b\u0438\u044f] dddd [\u0432] LT"}},sameElse:"L"},relativeTime:{future:"\u0441\u043b\u0435\u0434 %s",past:"\u043f\u0440\u0435\u0434\u0438 %s",s:"\u043d\u044f\u043a\u043e\u043b\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434\u0438",ss:"%d \u0441\u0435\u043a\u0443\u043d\u0434\u0438",m:"\u043c\u0438\u043d\u0443\u0442\u0430",mm:"%d \u043c\u0438\u043d\u0443\u0442\u0438",h:"\u0447\u0430\u0441",hh:"%d \u0447\u0430\u0441\u0430",d:"\u0434\u0435\u043d",dd:"%d \u0434\u0435\u043d\u0430",M:"\u043c\u0435\u0441\u0435\u0446",MM:"%d \u043c\u0435\u0441\u0435\u0446\u0430",y:"\u0433\u043e\u0434\u0438\u043d\u0430",yy:"%d \u0433\u043e\u0434\u0438\u043d\u0438"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0435\u0432|\u0435\u043d|\u0442\u0438|\u0432\u0438|\u0440\u0438|\u043c\u0438)/,ordinal:function(e){var a=e%10,_=e%100;return 0===e?e+"-\u0435\u0432":0==_?e+"-\u0435\u043d":10<_&&_<20?e+"-\u0442\u0438":1==a?e+"-\u0432\u0438":2==a?e+"-\u0440\u0438":7==a||8==a?e+"-\u043c\u0438":e+"-\u0442\u0438"},week:{dow:1,doy:7}}),e.defineLocale("bm",{months:"Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_M\u025bkalo_Zuw\u025bnkalo_Zuluyekalo_Utikalo_S\u025btanburukalo_\u0254kut\u0254burukalo_Nowanburukalo_Desanburukalo".split("_"),monthsShort:"Zan_Few_Mar_Awi_M\u025b_Zuw_Zul_Uti_S\u025bt_\u0254ku_Now_Des".split("_"),weekdays:"Kari_Nt\u025bn\u025bn_Tarata_Araba_Alamisa_Juma_Sibiri".split("_"),weekdaysShort:"Kar_Nt\u025b_Tar_Ara_Ala_Jum_Sib".split("_"),weekdaysMin:"Ka_Nt_Ta_Ar_Al_Ju_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"MMMM [tile] D [san] YYYY",LLL:"MMMM [tile] D [san] YYYY [l\u025br\u025b] HH:mm",LLLL:"dddd MMMM [tile] D [san] YYYY [l\u025br\u025b] HH:mm"},calendar:{sameDay:"[Bi l\u025br\u025b] LT",nextDay:"[Sini l\u025br\u025b] LT",nextWeek:"dddd [don l\u025br\u025b] LT",lastDay:"[Kunu l\u025br\u025b] LT",lastWeek:"dddd [t\u025bm\u025bnen l\u025br\u025b] LT",sameElse:"L"},relativeTime:{future:"%s k\u0254n\u0254",past:"a b\u025b %s b\u0254",s:"sanga dama dama",ss:"sekondi %d",m:"miniti kelen",mm:"miniti %d",h:"l\u025br\u025b kelen",hh:"l\u025br\u025b %d",d:"tile kelen",dd:"tile %d",M:"kalo kelen",MM:"kalo %d",y:"san kelen",yy:"san %d"},week:{dow:1,doy:4}});var D={1:"\u09e7",2:"\u09e8",3:"\u09e9",4:"\u09ea",5:"\u09eb",6:"\u09ec",7:"\u09ed",8:"\u09ee",9:"\u09ef",0:"\u09e6"},p={"\u09e7":"1","\u09e8":"2","\u09e9":"3","\u09ea":"4","\u09eb":"5","\u09ec":"6","\u09ed":"7","\u09ee":"8","\u09ef":"9","\u09e6":"0"};e.defineLocale("bn",{months:"\u099c\u09be\u09a8\u09c1\u09df\u09be\u09b0\u09bf_\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1\u09df\u09be\u09b0\u09bf_\u09ae\u09be\u09b0\u09cd\u099a_\u098f\u09aa\u09cd\u09b0\u09bf\u09b2_\u09ae\u09c7_\u099c\u09c1\u09a8_\u099c\u09c1\u09b2\u09be\u0987_\u0986\u0997\u09b8\u09cd\u099f_\u09b8\u09c7\u09aa\u09cd\u099f\u09c7\u09ae\u09cd\u09ac\u09b0_\u0985\u0995\u09cd\u099f\u09cb\u09ac\u09b0_\u09a8\u09ad\u09c7\u09ae\u09cd\u09ac\u09b0_\u09a1\u09bf\u09b8\u09c7\u09ae\u09cd\u09ac\u09b0".split("_"),monthsShort:"\u099c\u09be\u09a8\u09c1_\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1_\u09ae\u09be\u09b0\u09cd\u099a_\u098f\u09aa\u09cd\u09b0\u09bf\u09b2_\u09ae\u09c7_\u099c\u09c1\u09a8_\u099c\u09c1\u09b2\u09be\u0987_\u0986\u0997\u09b8\u09cd\u099f_\u09b8\u09c7\u09aa\u09cd\u099f_\u0985\u0995\u09cd\u099f\u09cb_\u09a8\u09ad\u09c7_\u09a1\u09bf\u09b8\u09c7".split("_"),weekdays:"\u09b0\u09ac\u09bf\u09ac\u09be\u09b0_\u09b8\u09cb\u09ae\u09ac\u09be\u09b0_\u09ae\u0999\u09cd\u0997\u09b2\u09ac\u09be\u09b0_\u09ac\u09c1\u09a7\u09ac\u09be\u09b0_\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf\u09ac\u09be\u09b0_\u09b6\u09c1\u0995\u09cd\u09b0\u09ac\u09be\u09b0_\u09b6\u09a8\u09bf\u09ac\u09be\u09b0".split("_"),weekdaysShort:"\u09b0\u09ac\u09bf_\u09b8\u09cb\u09ae_\u09ae\u0999\u09cd\u0997\u09b2_\u09ac\u09c1\u09a7_\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf_\u09b6\u09c1\u0995\u09cd\u09b0_\u09b6\u09a8\u09bf".split("_"),weekdaysMin:"\u09b0\u09ac\u09bf_\u09b8\u09cb\u09ae_\u09ae\u0999\u09cd\u0997\u09b2_\u09ac\u09c1\u09a7_\u09ac\u09c3\u09b9_\u09b6\u09c1\u0995\u09cd\u09b0_\u09b6\u09a8\u09bf".split("_"),longDateFormat:{LT:"A h:mm \u09b8\u09ae\u09df",LTS:"A h:mm:ss \u09b8\u09ae\u09df",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u09b8\u09ae\u09df",LLLL:"dddd, D MMMM YYYY, A h:mm \u09b8\u09ae\u09df"},calendar:{sameDay:"[\u0986\u099c] LT",nextDay:"[\u0986\u0997\u09be\u09ae\u09c0\u0995\u09be\u09b2] LT",nextWeek:"dddd, LT",lastDay:"[\u0997\u09a4\u0995\u09be\u09b2] LT",lastWeek:"[\u0997\u09a4] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u09aa\u09b0\u09c7",past:"%s \u0986\u0997\u09c7",s:"\u0995\u09df\u09c7\u0995 \u09b8\u09c7\u0995\u09c7\u09a8\u09cd\u09a1",ss:"%d \u09b8\u09c7\u0995\u09c7\u09a8\u09cd\u09a1",m:"\u098f\u0995 \u09ae\u09bf\u09a8\u09bf\u099f",mm:"%d \u09ae\u09bf\u09a8\u09bf\u099f",h:"\u098f\u0995 \u0998\u09a8\u09cd\u099f\u09be",hh:"%d \u0998\u09a8\u09cd\u099f\u09be",d:"\u098f\u0995 \u09a6\u09bf\u09a8",dd:"%d \u09a6\u09bf\u09a8",M:"\u098f\u0995 \u09ae\u09be\u09b8",MM:"%d \u09ae\u09be\u09b8",y:"\u098f\u0995 \u09ac\u099b\u09b0",yy:"%d \u09ac\u099b\u09b0"},preparse:function(e){return e.replace(/[\u09e7\u09e8\u09e9\u09ea\u09eb\u09ec\u09ed\u09ee\u09ef\u09e6]/g,function(e){return p[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return D[e]})},meridiemParse:/\u09b0\u09be\u09a4|\u09b8\u0995\u09be\u09b2|\u09a6\u09c1\u09aa\u09c1\u09b0|\u09ac\u09bf\u0995\u09be\u09b2|\u09b0\u09be\u09a4/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u09b0\u09be\u09a4"===a&&4<=e||"\u09a6\u09c1\u09aa\u09c1\u09b0"===a&&e<5||"\u09ac\u09bf\u0995\u09be\u09b2"===a?e+12:e},meridiem:function(e,a,_){return e<4?"\u09b0\u09be\u09a4":e<10?"\u09b8\u0995\u09be\u09b2":e<17?"\u09a6\u09c1\u09aa\u09c1\u09b0":e<20?"\u09ac\u09bf\u0995\u09be\u09b2":"\u09b0\u09be\u09a4"},week:{dow:0,doy:6}});var T={1:"\u0f21",2:"\u0f22",3:"\u0f23",4:"\u0f24",5:"\u0f25",6:"\u0f26",7:"\u0f27",8:"\u0f28",9:"\u0f29",0:"\u0f20"},f={"\u0f21":"1","\u0f22":"2","\u0f23":"3","\u0f24":"4","\u0f25":"5","\u0f26":"6","\u0f27":"7","\u0f28":"8","\u0f29":"9","\u0f20":"0"};function g(e,a,_){var s;return e+" "+(s={mm:"munutenn",MM:"miz",dd:"devezh"}[_],2!==e?s:function(e){var a={m:"v",b:"v",d:"z"};return void 0!==a[e.charAt(0)]?a[e.charAt(0)]+e.substring(1):e}(s))}e.defineLocale("bo",{months:"\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f44\u0f0b\u0f54\u0f7c_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f66\u0f74\u0f58\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f5e\u0f72\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f63\u0f94\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0fb2\u0f74\u0f42\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f62\u0f92\u0fb1\u0f51\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f42\u0f74\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f45\u0f72\u0f42\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54".split("_"),monthsShort:"\u0f5f\u0fb3\u0f0b1_\u0f5f\u0fb3\u0f0b2_\u0f5f\u0fb3\u0f0b3_\u0f5f\u0fb3\u0f0b4_\u0f5f\u0fb3\u0f0b5_\u0f5f\u0fb3\u0f0b6_\u0f5f\u0fb3\u0f0b7_\u0f5f\u0fb3\u0f0b8_\u0f5f\u0fb3\u0f0b9_\u0f5f\u0fb3\u0f0b10_\u0f5f\u0fb3\u0f0b11_\u0f5f\u0fb3\u0f0b12".split("_"),monthsShortRegex:/^(\u0f5f\u0fb3\u0f0b\d{1,2})/,monthsParseExact:!0,weekdays:"\u0f42\u0f5f\u0f60\u0f0b\u0f49\u0f72\u0f0b\u0f58\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f5f\u0fb3\u0f0b\u0f56\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f58\u0f72\u0f42\u0f0b\u0f51\u0f58\u0f62\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f63\u0fb7\u0f42\u0f0b\u0f54\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f55\u0f74\u0f62\u0f0b\u0f56\u0f74_\u0f42\u0f5f\u0f60\u0f0b\u0f54\u0f0b\u0f66\u0f44\u0f66\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f66\u0fa4\u0f7a\u0f53\u0f0b\u0f54\u0f0b".split("_"),weekdaysShort:"\u0f49\u0f72\u0f0b\u0f58\u0f0b_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b_\u0f58\u0f72\u0f42\u0f0b\u0f51\u0f58\u0f62\u0f0b_\u0f63\u0fb7\u0f42\u0f0b\u0f54\u0f0b_\u0f55\u0f74\u0f62\u0f0b\u0f56\u0f74_\u0f54\u0f0b\u0f66\u0f44\u0f66\u0f0b_\u0f66\u0fa4\u0f7a\u0f53\u0f0b\u0f54\u0f0b".split("_"),weekdaysMin:"\u0f49\u0f72_\u0f5f\u0fb3_\u0f58\u0f72\u0f42_\u0f63\u0fb7\u0f42_\u0f55\u0f74\u0f62_\u0f66\u0f44\u0f66_\u0f66\u0fa4\u0f7a\u0f53".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[\u0f51\u0f72\u0f0b\u0f62\u0f72\u0f44] LT",nextDay:"[\u0f66\u0f44\u0f0b\u0f49\u0f72\u0f53] LT",nextWeek:"[\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f55\u0fb2\u0f42\u0f0b\u0f62\u0f97\u0f7a\u0f66\u0f0b\u0f58], LT",lastDay:"[\u0f41\u0f0b\u0f66\u0f44] LT",lastWeek:"[\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f55\u0fb2\u0f42\u0f0b\u0f58\u0f50\u0f60\u0f0b\u0f58] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0f63\u0f0b",past:"%s \u0f66\u0f94\u0f53\u0f0b\u0f63",s:"\u0f63\u0f58\u0f0b\u0f66\u0f44",ss:"%d \u0f66\u0f90\u0f62\u0f0b\u0f46\u0f0d",m:"\u0f66\u0f90\u0f62\u0f0b\u0f58\u0f0b\u0f42\u0f45\u0f72\u0f42",mm:"%d \u0f66\u0f90\u0f62\u0f0b\u0f58",h:"\u0f46\u0f74\u0f0b\u0f5a\u0f7c\u0f51\u0f0b\u0f42\u0f45\u0f72\u0f42",hh:"%d \u0f46\u0f74\u0f0b\u0f5a\u0f7c\u0f51",d:"\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f45\u0f72\u0f42",dd:"%d \u0f49\u0f72\u0f53\u0f0b",M:"\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f45\u0f72\u0f42",MM:"%d \u0f5f\u0fb3\u0f0b\u0f56",y:"\u0f63\u0f7c\u0f0b\u0f42\u0f45\u0f72\u0f42",yy:"%d \u0f63\u0f7c"},preparse:function(e){return e.replace(/[\u0f21\u0f22\u0f23\u0f24\u0f25\u0f26\u0f27\u0f28\u0f29\u0f20]/g,function(e){return f[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return T[e]})},meridiemParse:/\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c|\u0f5e\u0f7c\u0f42\u0f66\u0f0b\u0f40\u0f66|\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f74\u0f44|\u0f51\u0f42\u0f7c\u0f44\u0f0b\u0f51\u0f42|\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c"===a&&4<=e||"\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f74\u0f44"===a&&e<5||"\u0f51\u0f42\u0f7c\u0f44\u0f0b\u0f51\u0f42"===a?e+12:e},meridiem:function(e,a,_){return e<4?"\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c":e<10?"\u0f5e\u0f7c\u0f42\u0f66\u0f0b\u0f40\u0f66":e<17?"\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f74\u0f44":e<20?"\u0f51\u0f42\u0f7c\u0f44\u0f0b\u0f51\u0f42":"\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c"},week:{dow:0,doy:6}});var w=[/^gen/i,/^c[\u02bc\']hwe/i,/^meu/i,/^ebr/i,/^mae/i,/^(mez|eve)/i,/^gou/i,/^eos/i,/^gwe/i,/^her/i,/^du/i,/^ker/i],H=/^(genver|c[\u02bc\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[\u02bc\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,b=[/^Su/i,/^Lu/i,/^Me([^r]|$)/i,/^Mer/i,/^Ya/i,/^Gw/i,/^Sa/i];function v(e,a,_){var s=e+" ";switch(_){case"ss":return s+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi";case"m":return a?"jedna minuta":"jedne minute";case"mm":return s+=1!==e&&(2===e||3===e||4===e)?"minute":"minuta";case"h":return a?"jedan sat":"jednog sata";case"hh":return s+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";case"dd":return s+=1===e?"dan":"dana";case"MM":return s+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";case"yy":return s+=1!==e&&(2===e||3===e||4===e)?"godine":"godina"}}e.defineLocale("br",{months:"Genver_C\u02bchwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_C\u02bchwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Merc\u02bcher_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),weekdaysParse:b,fullWeekdaysParse:[/^sul/i,/^lun/i,/^meurzh/i,/^merc[\u02bc\']her/i,/^yaou/i,/^gwener/i,/^sadorn/i],shortWeekdaysParse:[/^Sul/i,/^Lun/i,/^Meu/i,/^Mer/i,/^Yao/i,/^Gwe/i,/^Sad/i],minWeekdaysParse:b,monthsRegex:H,monthsShortRegex:H,monthsStrictRegex:/^(genver|c[\u02bc\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,monthsShortStrictRegex:/^(gen|c[\u02bc\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,monthsParse:w,longMonthsParse:w,shortMonthsParse:w,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY HH:mm",LLLL:"dddd, D [a viz] MMMM YYYY HH:mm"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warc\u02bchoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Dec\u02bch da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s \u02bczo",s:"un nebeud segondenno\xf9",ss:"%d eilenn",m:"ur vunutenn",mm:g,h:"un eur",hh:"%d eur",d:"un devezh",dd:g,M:"ur miz",MM:g,y:"ur bloaz",yy:function(e){switch(function e(a){if(9>> 0, + i; + + for (i = 0; i < len; i++) { + if (i in t && fun.call(this, t[i], i, t)) { + return true; + } + } + + return false; + }; + } + + function isValid(m) { + if (m._isValid == null) { + var flags = getParsingFlags(m), + parsedParts = some.call(flags.parsedDateParts, function (i) { + return i != null; + }), + isNowValid = + !isNaN(m._d.getTime()) && + flags.overflow < 0 && + !flags.empty && + !flags.invalidEra && + !flags.invalidMonth && + !flags.invalidWeekday && + !flags.weekdayMismatch && + !flags.nullInput && + !flags.invalidFormat && + !flags.userInvalidated && + (!flags.meridiem || (flags.meridiem && parsedParts)); + + if (m._strict) { + isNowValid = + isNowValid && + flags.charsLeftOver === 0 && + flags.unusedTokens.length === 0 && + flags.bigHour === undefined; + } + + if (Object.isFrozen == null || !Object.isFrozen(m)) { + m._isValid = isNowValid; + } else { + return isNowValid; + } + } + return m._isValid; + } + + function createInvalid(flags) { + var m = createUTC(NaN); + if (flags != null) { + extend(getParsingFlags(m), flags); + } else { + getParsingFlags(m).userInvalidated = true; + } + + return m; + } + + // Plugins that add properties should also add the key here (null value), + // so we can properly clone ourselves. + var momentProperties = (hooks.momentProperties = []), + updateInProgress = false; + + function copyConfig(to, from) { + var i, prop, val; + + if (!isUndefined(from._isAMomentObject)) { + to._isAMomentObject = from._isAMomentObject; + } + if (!isUndefined(from._i)) { + to._i = from._i; + } + if (!isUndefined(from._f)) { + to._f = from._f; + } + if (!isUndefined(from._l)) { + to._l = from._l; + } + if (!isUndefined(from._strict)) { + to._strict = from._strict; + } + if (!isUndefined(from._tzm)) { + to._tzm = from._tzm; + } + if (!isUndefined(from._isUTC)) { + to._isUTC = from._isUTC; + } + if (!isUndefined(from._offset)) { + to._offset = from._offset; + } + if (!isUndefined(from._pf)) { + to._pf = getParsingFlags(from); + } + if (!isUndefined(from._locale)) { + to._locale = from._locale; + } + + if (momentProperties.length > 0) { + for (i = 0; i < momentProperties.length; i++) { + prop = momentProperties[i]; + val = from[prop]; + if (!isUndefined(val)) { + to[prop] = val; + } + } + } + + return to; + } + + // Moment prototype object + function Moment(config) { + copyConfig(this, config); + this._d = new Date(config._d != null ? config._d.getTime() : NaN); + if (!this.isValid()) { + this._d = new Date(NaN); + } + // Prevent infinite loop in case updateOffset creates new moment + // objects. + if (updateInProgress === false) { + updateInProgress = true; + hooks.updateOffset(this); + updateInProgress = false; + } + } + + function isMoment(obj) { + return ( + obj instanceof Moment || (obj != null && obj._isAMomentObject != null) + ); + } + + function warn(msg) { + if ( + hooks.suppressDeprecationWarnings === false && + typeof console !== 'undefined' && + console.warn + ) { + console.warn('Deprecation warning: ' + msg); + } + } + + function deprecate(msg, fn) { + var firstTime = true; + + return extend(function () { + if (hooks.deprecationHandler != null) { + hooks.deprecationHandler(null, msg); + } + if (firstTime) { + var args = [], + arg, + i, + key; + for (i = 0; i < arguments.length; i++) { + arg = ''; + if (typeof arguments[i] === 'object') { + arg += '\n[' + i + '] '; + for (key in arguments[0]) { + if (hasOwnProp(arguments[0], key)) { + arg += key + ': ' + arguments[0][key] + ', '; + } + } + arg = arg.slice(0, -2); // Remove trailing comma and space + } else { + arg = arguments[i]; + } + args.push(arg); + } + warn( + msg + + '\nArguments: ' + + Array.prototype.slice.call(args).join('') + + '\n' + + new Error().stack + ); + firstTime = false; + } + return fn.apply(this, arguments); + }, fn); + } + + var deprecations = {}; + + function deprecateSimple(name, msg) { + if (hooks.deprecationHandler != null) { + hooks.deprecationHandler(name, msg); + } + if (!deprecations[name]) { + warn(msg); + deprecations[name] = true; + } + } + + hooks.suppressDeprecationWarnings = false; + hooks.deprecationHandler = null; + + function isFunction(input) { + return ( + (typeof Function !== 'undefined' && input instanceof Function) || + Object.prototype.toString.call(input) === '[object Function]' + ); + } + + function set(config) { + var prop, i; + for (i in config) { + if (hasOwnProp(config, i)) { + prop = config[i]; + if (isFunction(prop)) { + this[i] = prop; + } else { + this['_' + i] = prop; + } + } + } + this._config = config; + // Lenient ordinal parsing accepts just a number in addition to + // number + (possibly) stuff coming from _dayOfMonthOrdinalParse. + // TODO: Remove "ordinalParse" fallback in next major release. + this._dayOfMonthOrdinalParseLenient = new RegExp( + (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + + '|' + + /\d{1,2}/.source + ); + } + + function mergeConfigs(parentConfig, childConfig) { + var res = extend({}, parentConfig), + prop; + for (prop in childConfig) { + if (hasOwnProp(childConfig, prop)) { + if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) { + res[prop] = {}; + extend(res[prop], parentConfig[prop]); + extend(res[prop], childConfig[prop]); + } else if (childConfig[prop] != null) { + res[prop] = childConfig[prop]; + } else { + delete res[prop]; + } + } + } + for (prop in parentConfig) { + if ( + hasOwnProp(parentConfig, prop) && + !hasOwnProp(childConfig, prop) && + isObject(parentConfig[prop]) + ) { + // make sure changes to properties don't modify parent config + res[prop] = extend({}, res[prop]); + } + } + return res; + } + + function Locale(config) { + if (config != null) { + this.set(config); + } + } + + var keys; + + if (Object.keys) { + keys = Object.keys; + } else { + keys = function (obj) { + var i, + res = []; + for (i in obj) { + if (hasOwnProp(obj, i)) { + res.push(i); + } + } + return res; + }; + } + + var defaultCalendar = { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L', + }; + + function calendar(key, mom, now) { + var output = this._calendar[key] || this._calendar['sameElse']; + return isFunction(output) ? output.call(mom, now) : output; + } + + function zeroFill(number, targetLength, forceSign) { + var absNumber = '' + Math.abs(number), + zerosToFill = targetLength - absNumber.length, + sign = number >= 0; + return ( + (sign ? (forceSign ? '+' : '') : '-') + + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + + absNumber + ); + } + + var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g, + localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, + formatFunctions = {}, + formatTokenFunctions = {}; + + // token: 'M' + // padded: ['MM', 2] + // ordinal: 'Mo' + // callback: function () { this.month() + 1 } + function addFormatToken(token, padded, ordinal, callback) { + var func = callback; + if (typeof callback === 'string') { + func = function () { + return this[callback](); + }; + } + if (token) { + formatTokenFunctions[token] = func; + } + if (padded) { + formatTokenFunctions[padded[0]] = function () { + return zeroFill(func.apply(this, arguments), padded[1], padded[2]); + }; + } + if (ordinal) { + formatTokenFunctions[ordinal] = function () { + return this.localeData().ordinal( + func.apply(this, arguments), + token + ); + }; + } + } + + function removeFormattingTokens(input) { + if (input.match(/\[[\s\S]/)) { + return input.replace(/^\[|\]$/g, ''); + } + return input.replace(/\\/g, ''); + } + + function makeFormatFunction(format) { + var array = format.match(formattingTokens), + i, + length; + + for (i = 0, length = array.length; i < length; i++) { + if (formatTokenFunctions[array[i]]) { + array[i] = formatTokenFunctions[array[i]]; + } else { + array[i] = removeFormattingTokens(array[i]); + } + } + + return function (mom) { + var output = '', + i; + for (i = 0; i < length; i++) { + output += isFunction(array[i]) + ? array[i].call(mom, format) + : array[i]; + } + return output; + }; + } + + // format date using native date object + function formatMoment(m, format) { + if (!m.isValid()) { + return m.localeData().invalidDate(); + } + + format = expandFormat(format, m.localeData()); + formatFunctions[format] = + formatFunctions[format] || makeFormatFunction(format); + + return formatFunctions[format](m); + } + + function expandFormat(format, locale) { + var i = 5; + + function replaceLongDateFormatTokens(input) { + return locale.longDateFormat(input) || input; + } + + localFormattingTokens.lastIndex = 0; + while (i >= 0 && localFormattingTokens.test(format)) { + format = format.replace( + localFormattingTokens, + replaceLongDateFormatTokens + ); + localFormattingTokens.lastIndex = 0; + i -= 1; + } + + return format; + } + + var defaultLongDateFormat = { + LTS: 'h:mm:ss A', + LT: 'h:mm A', + L: 'MM/DD/YYYY', + LL: 'MMMM D, YYYY', + LLL: 'MMMM D, YYYY h:mm A', + LLLL: 'dddd, MMMM D, YYYY h:mm A', + }; + + function longDateFormat(key) { + var format = this._longDateFormat[key], + formatUpper = this._longDateFormat[key.toUpperCase()]; + + if (format || !formatUpper) { + return format; + } + + this._longDateFormat[key] = formatUpper + .match(formattingTokens) + .map(function (tok) { + if ( + tok === 'MMMM' || + tok === 'MM' || + tok === 'DD' || + tok === 'dddd' + ) { + return tok.slice(1); + } + return tok; + }) + .join(''); + + return this._longDateFormat[key]; + } + + var defaultInvalidDate = 'Invalid date'; + + function invalidDate() { + return this._invalidDate; + } + + var defaultOrdinal = '%d', + defaultDayOfMonthOrdinalParse = /\d{1,2}/; + + function ordinal(number) { + return this._ordinal.replace('%d', number); + } + + var defaultRelativeTime = { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + w: 'a week', + ww: '%d weeks', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + }; + + function relativeTime(number, withoutSuffix, string, isFuture) { + var output = this._relativeTime[string]; + return isFunction(output) + ? output(number, withoutSuffix, string, isFuture) + : output.replace(/%d/i, number); + } + + function pastFuture(diff, output) { + var format = this._relativeTime[diff > 0 ? 'future' : 'past']; + return isFunction(format) ? format(output) : format.replace(/%s/i, output); + } + + var aliases = {}; + + function addUnitAlias(unit, shorthand) { + var lowerCase = unit.toLowerCase(); + aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit; + } + + function normalizeUnits(units) { + return typeof units === 'string' + ? aliases[units] || aliases[units.toLowerCase()] + : undefined; + } + + function normalizeObjectUnits(inputObject) { + var normalizedInput = {}, + normalizedProp, + prop; + + for (prop in inputObject) { + if (hasOwnProp(inputObject, prop)) { + normalizedProp = normalizeUnits(prop); + if (normalizedProp) { + normalizedInput[normalizedProp] = inputObject[prop]; + } + } + } + + return normalizedInput; + } + + var priorities = {}; + + function addUnitPriority(unit, priority) { + priorities[unit] = priority; + } + + function getPrioritizedUnits(unitsObj) { + var units = [], + u; + for (u in unitsObj) { + if (hasOwnProp(unitsObj, u)) { + units.push({ unit: u, priority: priorities[u] }); + } + } + units.sort(function (a, b) { + return a.priority - b.priority; + }); + return units; + } + + function isLeapYear(year) { + return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; + } + + function absFloor(number) { + if (number < 0) { + // -0 -> 0 + return Math.ceil(number) || 0; + } else { + return Math.floor(number); + } + } + + function toInt(argumentForCoercion) { + var coercedNumber = +argumentForCoercion, + value = 0; + + if (coercedNumber !== 0 && isFinite(coercedNumber)) { + value = absFloor(coercedNumber); + } + + return value; + } + + function makeGetSet(unit, keepTime) { + return function (value) { + if (value != null) { + set$1(this, unit, value); + hooks.updateOffset(this, keepTime); + return this; + } else { + return get(this, unit); + } + }; + } + + function get(mom, unit) { + return mom.isValid() + ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() + : NaN; + } + + function set$1(mom, unit, value) { + if (mom.isValid() && !isNaN(value)) { + if ( + unit === 'FullYear' && + isLeapYear(mom.year()) && + mom.month() === 1 && + mom.date() === 29 + ) { + value = toInt(value); + mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit]( + value, + mom.month(), + daysInMonth(value, mom.month()) + ); + } else { + mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); + } + } + } + + // MOMENTS + + function stringGet(units) { + units = normalizeUnits(units); + if (isFunction(this[units])) { + return this[units](); + } + return this; + } + + function stringSet(units, value) { + if (typeof units === 'object') { + units = normalizeObjectUnits(units); + var prioritized = getPrioritizedUnits(units), + i; + for (i = 0; i < prioritized.length; i++) { + this[prioritized[i].unit](units[prioritized[i].unit]); + } + } else { + units = normalizeUnits(units); + if (isFunction(this[units])) { + return this[units](value); + } + } + return this; + } + + var match1 = /\d/, // 0 - 9 + match2 = /\d\d/, // 00 - 99 + match3 = /\d{3}/, // 000 - 999 + match4 = /\d{4}/, // 0000 - 9999 + match6 = /[+-]?\d{6}/, // -999999 - 999999 + match1to2 = /\d\d?/, // 0 - 99 + match3to4 = /\d\d\d\d?/, // 999 - 9999 + match5to6 = /\d\d\d\d\d\d?/, // 99999 - 999999 + match1to3 = /\d{1,3}/, // 0 - 999 + match1to4 = /\d{1,4}/, // 0 - 9999 + match1to6 = /[+-]?\d{1,6}/, // -999999 - 999999 + matchUnsigned = /\d+/, // 0 - inf + matchSigned = /[+-]?\d+/, // -inf - inf + matchOffset = /Z|[+-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z + matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z + matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123 + // any word (or two) characters or numbers including two/three word month in arabic. + // includes scottish gaelic two word and hyphenated months + matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i, + regexes; + + regexes = {}; + + function addRegexToken(token, regex, strictRegex) { + regexes[token] = isFunction(regex) + ? regex + : function (isStrict, localeData) { + return isStrict && strictRegex ? strictRegex : regex; + }; + } + + function getParseRegexForToken(token, config) { + if (!hasOwnProp(regexes, token)) { + return new RegExp(unescapeFormat(token)); + } + + return regexes[token](config._strict, config._locale); + } + + // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript + function unescapeFormat(s) { + return regexEscape( + s + .replace('\\', '') + .replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function ( + matched, + p1, + p2, + p3, + p4 + ) { + return p1 || p2 || p3 || p4; + }) + ); + } + + function regexEscape(s) { + return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); + } + + var tokens = {}; + + function addParseToken(token, callback) { + var i, + func = callback; + if (typeof token === 'string') { + token = [token]; + } + if (isNumber(callback)) { + func = function (input, array) { + array[callback] = toInt(input); + }; + } + for (i = 0; i < token.length; i++) { + tokens[token[i]] = func; + } + } + + function addWeekParseToken(token, callback) { + addParseToken(token, function (input, array, config, token) { + config._w = config._w || {}; + callback(input, config._w, config, token); + }); + } + + function addTimeToArrayFromToken(token, input, config) { + if (input != null && hasOwnProp(tokens, token)) { + tokens[token](input, config._a, config, token); + } + } + + var YEAR = 0, + MONTH = 1, + DATE = 2, + HOUR = 3, + MINUTE = 4, + SECOND = 5, + MILLISECOND = 6, + WEEK = 7, + WEEKDAY = 8; + + function mod(n, x) { + return ((n % x) + x) % x; + } + + var indexOf; + + if (Array.prototype.indexOf) { + indexOf = Array.prototype.indexOf; + } else { + indexOf = function (o) { + // I know + var i; + for (i = 0; i < this.length; ++i) { + if (this[i] === o) { + return i; + } + } + return -1; + }; + } + + function daysInMonth(year, month) { + if (isNaN(year) || isNaN(month)) { + return NaN; + } + var modMonth = mod(month, 12); + year += (month - modMonth) / 12; + return modMonth === 1 + ? isLeapYear(year) + ? 29 + : 28 + : 31 - ((modMonth % 7) % 2); + } + + // FORMATTING + + addFormatToken('M', ['MM', 2], 'Mo', function () { + return this.month() + 1; + }); + + addFormatToken('MMM', 0, 0, function (format) { + return this.localeData().monthsShort(this, format); + }); + + addFormatToken('MMMM', 0, 0, function (format) { + return this.localeData().months(this, format); + }); + + // ALIASES + + addUnitAlias('month', 'M'); + + // PRIORITY + + addUnitPriority('month', 8); + + // PARSING + + addRegexToken('M', match1to2); + addRegexToken('MM', match1to2, match2); + addRegexToken('MMM', function (isStrict, locale) { + return locale.monthsShortRegex(isStrict); + }); + addRegexToken('MMMM', function (isStrict, locale) { + return locale.monthsRegex(isStrict); + }); + + addParseToken(['M', 'MM'], function (input, array) { + array[MONTH] = toInt(input) - 1; + }); + + addParseToken(['MMM', 'MMMM'], function (input, array, config, token) { + var month = config._locale.monthsParse(input, token, config._strict); + // if we didn't find a month name, mark the date as invalid. + if (month != null) { + array[MONTH] = month; + } else { + getParsingFlags(config).invalidMonth = input; + } + }); + + // LOCALES + + var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ), + defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split( + '_' + ), + MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/, + defaultMonthsShortRegex = matchWord, + defaultMonthsRegex = matchWord; + + function localeMonths(m, format) { + if (!m) { + return isArray(this._months) + ? this._months + : this._months['standalone']; + } + return isArray(this._months) + ? this._months[m.month()] + : this._months[ + (this._months.isFormat || MONTHS_IN_FORMAT).test(format) + ? 'format' + : 'standalone' + ][m.month()]; + } + + function localeMonthsShort(m, format) { + if (!m) { + return isArray(this._monthsShort) + ? this._monthsShort + : this._monthsShort['standalone']; + } + return isArray(this._monthsShort) + ? this._monthsShort[m.month()] + : this._monthsShort[ + MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone' + ][m.month()]; + } + + function handleStrictParse(monthName, format, strict) { + var i, + ii, + mom, + llc = monthName.toLocaleLowerCase(); + if (!this._monthsParse) { + // this is not used + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + for (i = 0; i < 12; ++i) { + mom = createUTC([2000, i]); + this._shortMonthsParse[i] = this.monthsShort( + mom, + '' + ).toLocaleLowerCase(); + this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase(); + } + } + + if (strict) { + if (format === 'MMM') { + ii = indexOf.call(this._shortMonthsParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._longMonthsParse, llc); + return ii !== -1 ? ii : null; + } + } else { + if (format === 'MMM') { + ii = indexOf.call(this._shortMonthsParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._longMonthsParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._longMonthsParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._shortMonthsParse, llc); + return ii !== -1 ? ii : null; + } + } + } + + function localeMonthsParse(monthName, format, strict) { + var i, mom, regex; + + if (this._monthsParseExact) { + return handleStrictParse.call(this, monthName, format, strict); + } + + if (!this._monthsParse) { + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + } + + // TODO: add sorting + // Sorting makes sure if one month (or abbr) is a prefix of another + // see sorting in computeMonthsParse + for (i = 0; i < 12; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, i]); + if (strict && !this._longMonthsParse[i]) { + this._longMonthsParse[i] = new RegExp( + '^' + this.months(mom, '').replace('.', '') + '$', + 'i' + ); + this._shortMonthsParse[i] = new RegExp( + '^' + this.monthsShort(mom, '').replace('.', '') + '$', + 'i' + ); + } + if (!strict && !this._monthsParse[i]) { + regex = + '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); + this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); + } + // test the regex + if ( + strict && + format === 'MMMM' && + this._longMonthsParse[i].test(monthName) + ) { + return i; + } else if ( + strict && + format === 'MMM' && + this._shortMonthsParse[i].test(monthName) + ) { + return i; + } else if (!strict && this._monthsParse[i].test(monthName)) { + return i; + } + } + } + + // MOMENTS + + function setMonth(mom, value) { + var dayOfMonth; + + if (!mom.isValid()) { + // No op + return mom; + } + + if (typeof value === 'string') { + if (/^\d+$/.test(value)) { + value = toInt(value); + } else { + value = mom.localeData().monthsParse(value); + // TODO: Another silent failure? + if (!isNumber(value)) { + return mom; + } + } + } + + dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value)); + mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth); + return mom; + } + + function getSetMonth(value) { + if (value != null) { + setMonth(this, value); + hooks.updateOffset(this, true); + return this; + } else { + return get(this, 'Month'); + } + } + + function getDaysInMonth() { + return daysInMonth(this.year(), this.month()); + } + + function monthsShortRegex(isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, '_monthsRegex')) { + computeMonthsParse.call(this); + } + if (isStrict) { + return this._monthsShortStrictRegex; + } else { + return this._monthsShortRegex; + } + } else { + if (!hasOwnProp(this, '_monthsShortRegex')) { + this._monthsShortRegex = defaultMonthsShortRegex; + } + return this._monthsShortStrictRegex && isStrict + ? this._monthsShortStrictRegex + : this._monthsShortRegex; + } + } + + function monthsRegex(isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, '_monthsRegex')) { + computeMonthsParse.call(this); + } + if (isStrict) { + return this._monthsStrictRegex; + } else { + return this._monthsRegex; + } + } else { + if (!hasOwnProp(this, '_monthsRegex')) { + this._monthsRegex = defaultMonthsRegex; + } + return this._monthsStrictRegex && isStrict + ? this._monthsStrictRegex + : this._monthsRegex; + } + } + + function computeMonthsParse() { + function cmpLenRev(a, b) { + return b.length - a.length; + } + + var shortPieces = [], + longPieces = [], + mixedPieces = [], + i, + mom; + for (i = 0; i < 12; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, i]); + shortPieces.push(this.monthsShort(mom, '')); + longPieces.push(this.months(mom, '')); + mixedPieces.push(this.months(mom, '')); + mixedPieces.push(this.monthsShort(mom, '')); + } + // Sorting makes sure if one month (or abbr) is a prefix of another it + // will match the longer piece. + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + for (i = 0; i < 12; i++) { + shortPieces[i] = regexEscape(shortPieces[i]); + longPieces[i] = regexEscape(longPieces[i]); + } + for (i = 0; i < 24; i++) { + mixedPieces[i] = regexEscape(mixedPieces[i]); + } + + this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._monthsShortRegex = this._monthsRegex; + this._monthsStrictRegex = new RegExp( + '^(' + longPieces.join('|') + ')', + 'i' + ); + this._monthsShortStrictRegex = new RegExp( + '^(' + shortPieces.join('|') + ')', + 'i' + ); + } + + // FORMATTING + + addFormatToken('Y', 0, 0, function () { + var y = this.year(); + return y <= 9999 ? zeroFill(y, 4) : '+' + y; + }); + + addFormatToken(0, ['YY', 2], 0, function () { + return this.year() % 100; + }); + + addFormatToken(0, ['YYYY', 4], 0, 'year'); + addFormatToken(0, ['YYYYY', 5], 0, 'year'); + addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); + + // ALIASES + + addUnitAlias('year', 'y'); + + // PRIORITIES + + addUnitPriority('year', 1); + + // PARSING + + addRegexToken('Y', matchSigned); + addRegexToken('YY', match1to2, match2); + addRegexToken('YYYY', match1to4, match4); + addRegexToken('YYYYY', match1to6, match6); + addRegexToken('YYYYYY', match1to6, match6); + + addParseToken(['YYYYY', 'YYYYYY'], YEAR); + addParseToken('YYYY', function (input, array) { + array[YEAR] = + input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input); + }); + addParseToken('YY', function (input, array) { + array[YEAR] = hooks.parseTwoDigitYear(input); + }); + addParseToken('Y', function (input, array) { + array[YEAR] = parseInt(input, 10); + }); + + // HELPERS + + function daysInYear(year) { + return isLeapYear(year) ? 366 : 365; + } + + // HOOKS + + hooks.parseTwoDigitYear = function (input) { + return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); + }; + + // MOMENTS + + var getSetYear = makeGetSet('FullYear', true); + + function getIsLeapYear() { + return isLeapYear(this.year()); + } + + function createDate(y, m, d, h, M, s, ms) { + // can't just apply() to create a date: + // https://stackoverflow.com/q/181348 + var date; + // the date constructor remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + date = new Date(y + 400, m, d, h, M, s, ms); + if (isFinite(date.getFullYear())) { + date.setFullYear(y); + } + } else { + date = new Date(y, m, d, h, M, s, ms); + } + + return date; + } + + function createUTCDate(y) { + var date, args; + // the Date.UTC function remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + args = Array.prototype.slice.call(arguments); + // preserve leap years using a full 400 year cycle, then reset + args[0] = y + 400; + date = new Date(Date.UTC.apply(null, args)); + if (isFinite(date.getUTCFullYear())) { + date.setUTCFullYear(y); + } + } else { + date = new Date(Date.UTC.apply(null, arguments)); + } + + return date; + } + + // start-of-first-week - start-of-year + function firstWeekOffset(year, dow, doy) { + var // first-week day -- which january is always in the first week (4 for iso, 1 for other) + fwd = 7 + dow - doy, + // first-week day local weekday -- which local weekday is fwd + fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7; + + return -fwdlw + fwd - 1; + } + + // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday + function dayOfYearFromWeeks(year, week, weekday, dow, doy) { + var localWeekday = (7 + weekday - dow) % 7, + weekOffset = firstWeekOffset(year, dow, doy), + dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, + resYear, + resDayOfYear; + + if (dayOfYear <= 0) { + resYear = year - 1; + resDayOfYear = daysInYear(resYear) + dayOfYear; + } else if (dayOfYear > daysInYear(year)) { + resYear = year + 1; + resDayOfYear = dayOfYear - daysInYear(year); + } else { + resYear = year; + resDayOfYear = dayOfYear; + } + + return { + year: resYear, + dayOfYear: resDayOfYear, + }; + } + + function weekOfYear(mom, dow, doy) { + var weekOffset = firstWeekOffset(mom.year(), dow, doy), + week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, + resWeek, + resYear; + + if (week < 1) { + resYear = mom.year() - 1; + resWeek = week + weeksInYear(resYear, dow, doy); + } else if (week > weeksInYear(mom.year(), dow, doy)) { + resWeek = week - weeksInYear(mom.year(), dow, doy); + resYear = mom.year() + 1; + } else { + resYear = mom.year(); + resWeek = week; + } + + return { + week: resWeek, + year: resYear, + }; + } + + function weeksInYear(year, dow, doy) { + var weekOffset = firstWeekOffset(year, dow, doy), + weekOffsetNext = firstWeekOffset(year + 1, dow, doy); + return (daysInYear(year) - weekOffset + weekOffsetNext) / 7; + } + + // FORMATTING + + addFormatToken('w', ['ww', 2], 'wo', 'week'); + addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); + + // ALIASES + + addUnitAlias('week', 'w'); + addUnitAlias('isoWeek', 'W'); + + // PRIORITIES + + addUnitPriority('week', 5); + addUnitPriority('isoWeek', 5); + + // PARSING + + addRegexToken('w', match1to2); + addRegexToken('ww', match1to2, match2); + addRegexToken('W', match1to2); + addRegexToken('WW', match1to2, match2); + + addWeekParseToken(['w', 'ww', 'W', 'WW'], function ( + input, + week, + config, + token + ) { + week[token.substr(0, 1)] = toInt(input); + }); + + // HELPERS + + // LOCALES + + function localeWeek(mom) { + return weekOfYear(mom, this._week.dow, this._week.doy).week; + } + + var defaultLocaleWeek = { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }; + + function localeFirstDayOfWeek() { + return this._week.dow; + } + + function localeFirstDayOfYear() { + return this._week.doy; + } + + // MOMENTS + + function getSetWeek(input) { + var week = this.localeData().week(this); + return input == null ? week : this.add((input - week) * 7, 'd'); + } + + function getSetISOWeek(input) { + var week = weekOfYear(this, 1, 4).week; + return input == null ? week : this.add((input - week) * 7, 'd'); + } + + // FORMATTING + + addFormatToken('d', 0, 'do', 'day'); + + addFormatToken('dd', 0, 0, function (format) { + return this.localeData().weekdaysMin(this, format); + }); + + addFormatToken('ddd', 0, 0, function (format) { + return this.localeData().weekdaysShort(this, format); + }); + + addFormatToken('dddd', 0, 0, function (format) { + return this.localeData().weekdays(this, format); + }); + + addFormatToken('e', 0, 0, 'weekday'); + addFormatToken('E', 0, 0, 'isoWeekday'); + + // ALIASES + + addUnitAlias('day', 'd'); + addUnitAlias('weekday', 'e'); + addUnitAlias('isoWeekday', 'E'); + + // PRIORITY + addUnitPriority('day', 11); + addUnitPriority('weekday', 11); + addUnitPriority('isoWeekday', 11); + + // PARSING + + addRegexToken('d', match1to2); + addRegexToken('e', match1to2); + addRegexToken('E', match1to2); + addRegexToken('dd', function (isStrict, locale) { + return locale.weekdaysMinRegex(isStrict); + }); + addRegexToken('ddd', function (isStrict, locale) { + return locale.weekdaysShortRegex(isStrict); + }); + addRegexToken('dddd', function (isStrict, locale) { + return locale.weekdaysRegex(isStrict); + }); + + addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) { + var weekday = config._locale.weekdaysParse(input, token, config._strict); + // if we didn't get a weekday name, mark the date as invalid + if (weekday != null) { + week.d = weekday; + } else { + getParsingFlags(config).invalidWeekday = input; + } + }); + + addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) { + week[token] = toInt(input); + }); + + // HELPERS + + function parseWeekday(input, locale) { + if (typeof input !== 'string') { + return input; + } + + if (!isNaN(input)) { + return parseInt(input, 10); + } + + input = locale.weekdaysParse(input); + if (typeof input === 'number') { + return input; + } + + return null; + } + + function parseIsoWeekday(input, locale) { + if (typeof input === 'string') { + return locale.weekdaysParse(input) % 7 || 7; + } + return isNaN(input) ? null : input; + } + + // LOCALES + function shiftWeekdays(ws, n) { + return ws.slice(n, 7).concat(ws.slice(0, n)); + } + + var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( + '_' + ), + defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + defaultWeekdaysRegex = matchWord, + defaultWeekdaysShortRegex = matchWord, + defaultWeekdaysMinRegex = matchWord; + + function localeWeekdays(m, format) { + var weekdays = isArray(this._weekdays) + ? this._weekdays + : this._weekdays[ + m && m !== true && this._weekdays.isFormat.test(format) + ? 'format' + : 'standalone' + ]; + return m === true + ? shiftWeekdays(weekdays, this._week.dow) + : m + ? weekdays[m.day()] + : weekdays; + } + + function localeWeekdaysShort(m) { + return m === true + ? shiftWeekdays(this._weekdaysShort, this._week.dow) + : m + ? this._weekdaysShort[m.day()] + : this._weekdaysShort; + } + + function localeWeekdaysMin(m) { + return m === true + ? shiftWeekdays(this._weekdaysMin, this._week.dow) + : m + ? this._weekdaysMin[m.day()] + : this._weekdaysMin; + } + + function handleStrictParse$1(weekdayName, format, strict) { + var i, + ii, + mom, + llc = weekdayName.toLocaleLowerCase(); + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._shortWeekdaysParse = []; + this._minWeekdaysParse = []; + + for (i = 0; i < 7; ++i) { + mom = createUTC([2000, 1]).day(i); + this._minWeekdaysParse[i] = this.weekdaysMin( + mom, + '' + ).toLocaleLowerCase(); + this._shortWeekdaysParse[i] = this.weekdaysShort( + mom, + '' + ).toLocaleLowerCase(); + this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase(); + } + } + + if (strict) { + if (format === 'dddd') { + ii = indexOf.call(this._weekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format === 'ddd') { + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } + } else { + if (format === 'dddd') { + ii = indexOf.call(this._weekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._shortWeekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format === 'ddd') { + ii = indexOf.call(this._shortWeekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._weekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._weekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } + } + } + + function localeWeekdaysParse(weekdayName, format, strict) { + var i, mom, regex; + + if (this._weekdaysParseExact) { + return handleStrictParse$1.call(this, weekdayName, format, strict); + } + + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._minWeekdaysParse = []; + this._shortWeekdaysParse = []; + this._fullWeekdaysParse = []; + } + + for (i = 0; i < 7; i++) { + // make the regex if we don't have it already + + mom = createUTC([2000, 1]).day(i); + if (strict && !this._fullWeekdaysParse[i]) { + this._fullWeekdaysParse[i] = new RegExp( + '^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', + 'i' + ); + this._shortWeekdaysParse[i] = new RegExp( + '^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', + 'i' + ); + this._minWeekdaysParse[i] = new RegExp( + '^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', + 'i' + ); + } + if (!this._weekdaysParse[i]) { + regex = + '^' + + this.weekdays(mom, '') + + '|^' + + this.weekdaysShort(mom, '') + + '|^' + + this.weekdaysMin(mom, ''); + this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); + } + // test the regex + if ( + strict && + format === 'dddd' && + this._fullWeekdaysParse[i].test(weekdayName) + ) { + return i; + } else if ( + strict && + format === 'ddd' && + this._shortWeekdaysParse[i].test(weekdayName) + ) { + return i; + } else if ( + strict && + format === 'dd' && + this._minWeekdaysParse[i].test(weekdayName) + ) { + return i; + } else if (!strict && this._weekdaysParse[i].test(weekdayName)) { + return i; + } + } + } + + // MOMENTS + + function getSetDayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); + if (input != null) { + input = parseWeekday(input, this.localeData()); + return this.add(input - day, 'd'); + } else { + return day; + } + } + + function getSetLocaleDayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; + return input == null ? weekday : this.add(input - weekday, 'd'); + } + + function getSetISODayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + + // behaves the same as moment#day except + // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) + // as a setter, sunday should belong to the previous week. + + if (input != null) { + var weekday = parseIsoWeekday(input, this.localeData()); + return this.day(this.day() % 7 ? weekday : weekday - 7); + } else { + return this.day() || 7; + } + } + + function weekdaysRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + if (isStrict) { + return this._weekdaysStrictRegex; + } else { + return this._weekdaysRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysRegex')) { + this._weekdaysRegex = defaultWeekdaysRegex; + } + return this._weekdaysStrictRegex && isStrict + ? this._weekdaysStrictRegex + : this._weekdaysRegex; + } + } + + function weekdaysShortRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + if (isStrict) { + return this._weekdaysShortStrictRegex; + } else { + return this._weekdaysShortRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysShortRegex')) { + this._weekdaysShortRegex = defaultWeekdaysShortRegex; + } + return this._weekdaysShortStrictRegex && isStrict + ? this._weekdaysShortStrictRegex + : this._weekdaysShortRegex; + } + } + + function weekdaysMinRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + if (isStrict) { + return this._weekdaysMinStrictRegex; + } else { + return this._weekdaysMinRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysMinRegex')) { + this._weekdaysMinRegex = defaultWeekdaysMinRegex; + } + return this._weekdaysMinStrictRegex && isStrict + ? this._weekdaysMinStrictRegex + : this._weekdaysMinRegex; + } + } + + function computeWeekdaysParse() { + function cmpLenRev(a, b) { + return b.length - a.length; + } + + var minPieces = [], + shortPieces = [], + longPieces = [], + mixedPieces = [], + i, + mom, + minp, + shortp, + longp; + for (i = 0; i < 7; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, 1]).day(i); + minp = regexEscape(this.weekdaysMin(mom, '')); + shortp = regexEscape(this.weekdaysShort(mom, '')); + longp = regexEscape(this.weekdays(mom, '')); + minPieces.push(minp); + shortPieces.push(shortp); + longPieces.push(longp); + mixedPieces.push(minp); + mixedPieces.push(shortp); + mixedPieces.push(longp); + } + // Sorting makes sure if one weekday (or abbr) is a prefix of another it + // will match the longer piece. + minPieces.sort(cmpLenRev); + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + + this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._weekdaysShortRegex = this._weekdaysRegex; + this._weekdaysMinRegex = this._weekdaysRegex; + + this._weekdaysStrictRegex = new RegExp( + '^(' + longPieces.join('|') + ')', + 'i' + ); + this._weekdaysShortStrictRegex = new RegExp( + '^(' + shortPieces.join('|') + ')', + 'i' + ); + this._weekdaysMinStrictRegex = new RegExp( + '^(' + minPieces.join('|') + ')', + 'i' + ); + } + + // FORMATTING + + function hFormat() { + return this.hours() % 12 || 12; + } + + function kFormat() { + return this.hours() || 24; + } + + addFormatToken('H', ['HH', 2], 0, 'hour'); + addFormatToken('h', ['hh', 2], 0, hFormat); + addFormatToken('k', ['kk', 2], 0, kFormat); + + addFormatToken('hmm', 0, 0, function () { + return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2); + }); + + addFormatToken('hmmss', 0, 0, function () { + return ( + '' + + hFormat.apply(this) + + zeroFill(this.minutes(), 2) + + zeroFill(this.seconds(), 2) + ); + }); + + addFormatToken('Hmm', 0, 0, function () { + return '' + this.hours() + zeroFill(this.minutes(), 2); + }); + + addFormatToken('Hmmss', 0, 0, function () { + return ( + '' + + this.hours() + + zeroFill(this.minutes(), 2) + + zeroFill(this.seconds(), 2) + ); + }); + + function meridiem(token, lowercase) { + addFormatToken(token, 0, 0, function () { + return this.localeData().meridiem( + this.hours(), + this.minutes(), + lowercase + ); + }); + } + + meridiem('a', true); + meridiem('A', false); + + // ALIASES + + addUnitAlias('hour', 'h'); + + // PRIORITY + addUnitPriority('hour', 13); + + // PARSING + + function matchMeridiem(isStrict, locale) { + return locale._meridiemParse; + } + + addRegexToken('a', matchMeridiem); + addRegexToken('A', matchMeridiem); + addRegexToken('H', match1to2); + addRegexToken('h', match1to2); + addRegexToken('k', match1to2); + addRegexToken('HH', match1to2, match2); + addRegexToken('hh', match1to2, match2); + addRegexToken('kk', match1to2, match2); + + addRegexToken('hmm', match3to4); + addRegexToken('hmmss', match5to6); + addRegexToken('Hmm', match3to4); + addRegexToken('Hmmss', match5to6); + + addParseToken(['H', 'HH'], HOUR); + addParseToken(['k', 'kk'], function (input, array, config) { + var kInput = toInt(input); + array[HOUR] = kInput === 24 ? 0 : kInput; + }); + addParseToken(['a', 'A'], function (input, array, config) { + config._isPm = config._locale.isPM(input); + config._meridiem = input; + }); + addParseToken(['h', 'hh'], function (input, array, config) { + array[HOUR] = toInt(input); + getParsingFlags(config).bigHour = true; + }); + addParseToken('hmm', function (input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); + getParsingFlags(config).bigHour = true; + }); + addParseToken('hmmss', function (input, array, config) { + var pos1 = input.length - 4, + pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); + getParsingFlags(config).bigHour = true; + }); + addParseToken('Hmm', function (input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); + }); + addParseToken('Hmmss', function (input, array, config) { + var pos1 = input.length - 4, + pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); + }); + + // LOCALES + + function localeIsPM(input) { + // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays + // Using charAt should be more compatible. + return (input + '').toLowerCase().charAt(0) === 'p'; + } + + var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i, + // Setting the hour should keep the time, because the user explicitly + // specified which hour they want. So trying to maintain the same hour (in + // a new timezone) makes sense. Adding/subtracting hours does not follow + // this rule. + getSetHour = makeGetSet('Hours', true); + + function localeMeridiem(hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'pm' : 'PM'; + } else { + return isLower ? 'am' : 'AM'; + } + } + + var baseConfig = { + calendar: defaultCalendar, + longDateFormat: defaultLongDateFormat, + invalidDate: defaultInvalidDate, + ordinal: defaultOrdinal, + dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse, + relativeTime: defaultRelativeTime, + + months: defaultLocaleMonths, + monthsShort: defaultLocaleMonthsShort, + + week: defaultLocaleWeek, + + weekdays: defaultLocaleWeekdays, + weekdaysMin: defaultLocaleWeekdaysMin, + weekdaysShort: defaultLocaleWeekdaysShort, + + meridiemParse: defaultLocaleMeridiemParse, + }; + + // internal storage for locale config files + var locales = {}, + localeFamilies = {}, + globalLocale; + + function commonPrefix(arr1, arr2) { + var i, + minl = Math.min(arr1.length, arr2.length); + for (i = 0; i < minl; i += 1) { + if (arr1[i] !== arr2[i]) { + return i; + } + } + return minl; + } + + function normalizeLocale(key) { + return key ? key.toLowerCase().replace('_', '-') : key; + } + + // pick the locale from the array + // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each + // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root + function chooseLocale(names) { + var i = 0, + j, + next, + locale, + split; + + while (i < names.length) { + split = normalizeLocale(names[i]).split('-'); + j = split.length; + next = normalizeLocale(names[i + 1]); + next = next ? next.split('-') : null; + while (j > 0) { + locale = loadLocale(split.slice(0, j).join('-')); + if (locale) { + return locale; + } + if ( + next && + next.length >= j && + commonPrefix(split, next) >= j - 1 + ) { + //the next array item is better than a shallower substring of this one + break; + } + j--; + } + i++; + } + return globalLocale; + } + + function loadLocale(name) { + var oldLocale = null, + aliasedRequire; + // TODO: Find a better way to register and load all the locales in Node + if ( + locales[name] === undefined && + typeof module !== 'undefined' && + module && + module.exports + ) { + try { + oldLocale = globalLocale._abbr; + aliasedRequire = require; + aliasedRequire('./locale/' + name); + getSetGlobalLocale(oldLocale); + } catch (e) { + // mark as not found to avoid repeating expensive file require call causing high CPU + // when trying to find en-US, en_US, en-us for every format call + locales[name] = null; // null means not found + } + } + return locales[name]; + } + + // This function will load locale and then set the global locale. If + // no arguments are passed in, it will simply return the current global + // locale key. + function getSetGlobalLocale(key, values) { + var data; + if (key) { + if (isUndefined(values)) { + data = getLocale(key); + } else { + data = defineLocale(key, values); + } + + if (data) { + // moment.duration._locale = moment._locale = data; + globalLocale = data; + } else { + if (typeof console !== 'undefined' && console.warn) { + //warn user if arguments are passed but the locale could not be set + console.warn( + 'Locale ' + key + ' not found. Did you forget to load it?' + ); + } + } + } + + return globalLocale._abbr; + } + + function defineLocale(name, config) { + if (config !== null) { + var locale, + parentConfig = baseConfig; + config.abbr = name; + if (locales[name] != null) { + deprecateSimple( + 'defineLocaleOverride', + 'use moment.updateLocale(localeName, config) to change ' + + 'an existing locale. moment.defineLocale(localeName, ' + + 'config) should only be used for creating a new locale ' + + 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.' + ); + parentConfig = locales[name]._config; + } else if (config.parentLocale != null) { + if (locales[config.parentLocale] != null) { + parentConfig = locales[config.parentLocale]._config; + } else { + locale = loadLocale(config.parentLocale); + if (locale != null) { + parentConfig = locale._config; + } else { + if (!localeFamilies[config.parentLocale]) { + localeFamilies[config.parentLocale] = []; + } + localeFamilies[config.parentLocale].push({ + name: name, + config: config, + }); + return null; + } + } + } + locales[name] = new Locale(mergeConfigs(parentConfig, config)); + + if (localeFamilies[name]) { + localeFamilies[name].forEach(function (x) { + defineLocale(x.name, x.config); + }); + } + + // backwards compat for now: also set the locale + // make sure we set the locale AFTER all child locales have been + // created, so we won't end up with the child locale set. + getSetGlobalLocale(name); + + return locales[name]; + } else { + // useful for testing + delete locales[name]; + return null; + } + } + + function updateLocale(name, config) { + if (config != null) { + var locale, + tmpLocale, + parentConfig = baseConfig; + + if (locales[name] != null && locales[name].parentLocale != null) { + // Update existing child locale in-place to avoid memory-leaks + locales[name].set(mergeConfigs(locales[name]._config, config)); + } else { + // MERGE + tmpLocale = loadLocale(name); + if (tmpLocale != null) { + parentConfig = tmpLocale._config; + } + config = mergeConfigs(parentConfig, config); + if (tmpLocale == null) { + // updateLocale is called for creating a new locale + // Set abbr so it will have a name (getters return + // undefined otherwise). + config.abbr = name; + } + locale = new Locale(config); + locale.parentLocale = locales[name]; + locales[name] = locale; + } + + // backwards compat for now: also set the locale + getSetGlobalLocale(name); + } else { + // pass null for config to unupdate, useful for tests + if (locales[name] != null) { + if (locales[name].parentLocale != null) { + locales[name] = locales[name].parentLocale; + if (name === getSetGlobalLocale()) { + getSetGlobalLocale(name); + } + } else if (locales[name] != null) { + delete locales[name]; + } + } + } + return locales[name]; + } + + // returns locale data + function getLocale(key) { + var locale; + + if (key && key._locale && key._locale._abbr) { + key = key._locale._abbr; + } + + if (!key) { + return globalLocale; + } + + if (!isArray(key)) { + //short-circuit everything else + locale = loadLocale(key); + if (locale) { + return locale; + } + key = [key]; + } + + return chooseLocale(key); + } + + function listLocales() { + return keys(locales); + } + + function checkOverflow(m) { + var overflow, + a = m._a; + + if (a && getParsingFlags(m).overflow === -2) { + overflow = + a[MONTH] < 0 || a[MONTH] > 11 + ? MONTH + : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) + ? DATE + : a[HOUR] < 0 || + a[HOUR] > 24 || + (a[HOUR] === 24 && + (a[MINUTE] !== 0 || + a[SECOND] !== 0 || + a[MILLISECOND] !== 0)) + ? HOUR + : a[MINUTE] < 0 || a[MINUTE] > 59 + ? MINUTE + : a[SECOND] < 0 || a[SECOND] > 59 + ? SECOND + : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 + ? MILLISECOND + : -1; + + if ( + getParsingFlags(m)._overflowDayOfYear && + (overflow < YEAR || overflow > DATE) + ) { + overflow = DATE; + } + if (getParsingFlags(m)._overflowWeeks && overflow === -1) { + overflow = WEEK; + } + if (getParsingFlags(m)._overflowWeekday && overflow === -1) { + overflow = WEEKDAY; + } + + getParsingFlags(m).overflow = overflow; + } + + return m; + } + + // iso 8601 regex + // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00) + var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, + basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, + tzRegex = /Z|[+-]\d\d(?::?\d\d)?/, + isoDates = [ + ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], + ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], + ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], + ['GGGG-[W]WW', /\d{4}-W\d\d/, false], + ['YYYY-DDD', /\d{4}-\d{3}/], + ['YYYY-MM', /\d{4}-\d\d/, false], + ['YYYYYYMMDD', /[+-]\d{10}/], + ['YYYYMMDD', /\d{8}/], + ['GGGG[W]WWE', /\d{4}W\d{3}/], + ['GGGG[W]WW', /\d{4}W\d{2}/, false], + ['YYYYDDD', /\d{7}/], + ['YYYYMM', /\d{6}/, false], + ['YYYY', /\d{4}/, false], + ], + // iso time formats and regexes + isoTimes = [ + ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], + ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/], + ['HH:mm:ss', /\d\d:\d\d:\d\d/], + ['HH:mm', /\d\d:\d\d/], + ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/], + ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/], + ['HHmmss', /\d\d\d\d\d\d/], + ['HHmm', /\d\d\d\d/], + ['HH', /\d\d/], + ], + aspNetJsonRegex = /^\/?Date\((-?\d+)/i, + // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3 + rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/, + obsOffsets = { + UT: 0, + GMT: 0, + EDT: -4 * 60, + EST: -5 * 60, + CDT: -5 * 60, + CST: -6 * 60, + MDT: -6 * 60, + MST: -7 * 60, + PDT: -7 * 60, + PST: -8 * 60, + }; + + // date from iso format + function configFromISO(config) { + var i, + l, + string = config._i, + match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), + allowTime, + dateFormat, + timeFormat, + tzFormat; + + if (match) { + getParsingFlags(config).iso = true; + + for (i = 0, l = isoDates.length; i < l; i++) { + if (isoDates[i][1].exec(match[1])) { + dateFormat = isoDates[i][0]; + allowTime = isoDates[i][2] !== false; + break; + } + } + if (dateFormat == null) { + config._isValid = false; + return; + } + if (match[3]) { + for (i = 0, l = isoTimes.length; i < l; i++) { + if (isoTimes[i][1].exec(match[3])) { + // match[2] should be 'T' or space + timeFormat = (match[2] || ' ') + isoTimes[i][0]; + break; + } + } + if (timeFormat == null) { + config._isValid = false; + return; + } + } + if (!allowTime && timeFormat != null) { + config._isValid = false; + return; + } + if (match[4]) { + if (tzRegex.exec(match[4])) { + tzFormat = 'Z'; + } else { + config._isValid = false; + return; + } + } + config._f = dateFormat + (timeFormat || '') + (tzFormat || ''); + configFromStringAndFormat(config); + } else { + config._isValid = false; + } + } + + function extractFromRFC2822Strings( + yearStr, + monthStr, + dayStr, + hourStr, + minuteStr, + secondStr + ) { + var result = [ + untruncateYear(yearStr), + defaultLocaleMonthsShort.indexOf(monthStr), + parseInt(dayStr, 10), + parseInt(hourStr, 10), + parseInt(minuteStr, 10), + ]; + + if (secondStr) { + result.push(parseInt(secondStr, 10)); + } + + return result; + } + + function untruncateYear(yearStr) { + var year = parseInt(yearStr, 10); + if (year <= 49) { + return 2000 + year; + } else if (year <= 999) { + return 1900 + year; + } + return year; + } + + function preprocessRFC2822(s) { + // Remove comments and folding whitespace and replace multiple-spaces with a single space + return s + .replace(/\([^)]*\)|[\n\t]/g, ' ') + .replace(/(\s\s+)/g, ' ') + .replace(/^\s\s*/, '') + .replace(/\s\s*$/, ''); + } + + function checkWeekday(weekdayStr, parsedInput, config) { + if (weekdayStr) { + // TODO: Replace the vanilla JS Date object with an independent day-of-week check. + var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr), + weekdayActual = new Date( + parsedInput[0], + parsedInput[1], + parsedInput[2] + ).getDay(); + if (weekdayProvided !== weekdayActual) { + getParsingFlags(config).weekdayMismatch = true; + config._isValid = false; + return false; + } + } + return true; + } + + function calculateOffset(obsOffset, militaryOffset, numOffset) { + if (obsOffset) { + return obsOffsets[obsOffset]; + } else if (militaryOffset) { + // the only allowed military tz is Z + return 0; + } else { + var hm = parseInt(numOffset, 10), + m = hm % 100, + h = (hm - m) / 100; + return h * 60 + m; + } + } + + // date and time from ref 2822 format + function configFromRFC2822(config) { + var match = rfc2822.exec(preprocessRFC2822(config._i)), + parsedArray; + if (match) { + parsedArray = extractFromRFC2822Strings( + match[4], + match[3], + match[2], + match[5], + match[6], + match[7] + ); + if (!checkWeekday(match[1], parsedArray, config)) { + return; + } + + config._a = parsedArray; + config._tzm = calculateOffset(match[8], match[9], match[10]); + + config._d = createUTCDate.apply(null, config._a); + config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); + + getParsingFlags(config).rfc2822 = true; + } else { + config._isValid = false; + } + } + + // date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict + function configFromString(config) { + var matched = aspNetJsonRegex.exec(config._i); + if (matched !== null) { + config._d = new Date(+matched[1]); + return; + } + + configFromISO(config); + if (config._isValid === false) { + delete config._isValid; + } else { + return; + } + + configFromRFC2822(config); + if (config._isValid === false) { + delete config._isValid; + } else { + return; + } + + if (config._strict) { + config._isValid = false; + } else { + // Final attempt, use Input Fallback + hooks.createFromInputFallback(config); + } + } + + hooks.createFromInputFallback = deprecate( + 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + + 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + + 'discouraged and will be removed in an upcoming major release. Please refer to ' + + 'http://momentjs.com/guides/#/warnings/js-date/ for more info.', + function (config) { + config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); + } + ); + + // Pick the first defined of two or three arguments. + function defaults(a, b, c) { + if (a != null) { + return a; + } + if (b != null) { + return b; + } + return c; + } + + function currentDateArray(config) { + // hooks is actually the exported moment object + var nowValue = new Date(hooks.now()); + if (config._useUTC) { + return [ + nowValue.getUTCFullYear(), + nowValue.getUTCMonth(), + nowValue.getUTCDate(), + ]; + } + return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()]; + } + + // convert an array to a date. + // the array should mirror the parameters below + // note: all values past the year are optional and will default to the lowest possible value. + // [year, month, day , hour, minute, second, millisecond] + function configFromArray(config) { + var i, + date, + input = [], + currentDate, + expectedWeekday, + yearToUse; + + if (config._d) { + return; + } + + currentDate = currentDateArray(config); + + //compute day of the year from weeks and weekdays + if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { + dayOfYearFromWeekInfo(config); + } + + //if the day of the year is set, figure out what it is + if (config._dayOfYear != null) { + yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); + + if ( + config._dayOfYear > daysInYear(yearToUse) || + config._dayOfYear === 0 + ) { + getParsingFlags(config)._overflowDayOfYear = true; + } + + date = createUTCDate(yearToUse, 0, config._dayOfYear); + config._a[MONTH] = date.getUTCMonth(); + config._a[DATE] = date.getUTCDate(); + } + + // Default to current date. + // * if no year, month, day of month are given, default to today + // * if day of month is given, default month and year + // * if month is given, default only year + // * if year is given, don't default anything + for (i = 0; i < 3 && config._a[i] == null; ++i) { + config._a[i] = input[i] = currentDate[i]; + } + + // Zero out whatever was not defaulted, including time + for (; i < 7; i++) { + config._a[i] = input[i] = + config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i]; + } + + // Check for 24:00:00.000 + if ( + config._a[HOUR] === 24 && + config._a[MINUTE] === 0 && + config._a[SECOND] === 0 && + config._a[MILLISECOND] === 0 + ) { + config._nextDay = true; + config._a[HOUR] = 0; + } + + config._d = (config._useUTC ? createUTCDate : createDate).apply( + null, + input + ); + expectedWeekday = config._useUTC + ? config._d.getUTCDay() + : config._d.getDay(); + + // Apply timezone offset from input. The actual utcOffset can be changed + // with parseZone. + if (config._tzm != null) { + config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); + } + + if (config._nextDay) { + config._a[HOUR] = 24; + } + + // check for mismatching day of week + if ( + config._w && + typeof config._w.d !== 'undefined' && + config._w.d !== expectedWeekday + ) { + getParsingFlags(config).weekdayMismatch = true; + } + } + + function dayOfYearFromWeekInfo(config) { + var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek; + + w = config._w; + if (w.GG != null || w.W != null || w.E != null) { + dow = 1; + doy = 4; + + // TODO: We need to take the current isoWeekYear, but that depends on + // how we interpret now (local, utc, fixed offset). So create + // a now version of current config (take local/utc/offset flags, and + // create now). + weekYear = defaults( + w.GG, + config._a[YEAR], + weekOfYear(createLocal(), 1, 4).year + ); + week = defaults(w.W, 1); + weekday = defaults(w.E, 1); + if (weekday < 1 || weekday > 7) { + weekdayOverflow = true; + } + } else { + dow = config._locale._week.dow; + doy = config._locale._week.doy; + + curWeek = weekOfYear(createLocal(), dow, doy); + + weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); + + // Default to current week. + week = defaults(w.w, curWeek.week); + + if (w.d != null) { + // weekday -- low day numbers are considered next week + weekday = w.d; + if (weekday < 0 || weekday > 6) { + weekdayOverflow = true; + } + } else if (w.e != null) { + // local weekday -- counting starts from beginning of week + weekday = w.e + dow; + if (w.e < 0 || w.e > 6) { + weekdayOverflow = true; + } + } else { + // default to beginning of week + weekday = dow; + } + } + if (week < 1 || week > weeksInYear(weekYear, dow, doy)) { + getParsingFlags(config)._overflowWeeks = true; + } else if (weekdayOverflow != null) { + getParsingFlags(config)._overflowWeekday = true; + } else { + temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy); + config._a[YEAR] = temp.year; + config._dayOfYear = temp.dayOfYear; + } + } + + // constant that refers to the ISO standard + hooks.ISO_8601 = function () {}; + + // constant that refers to the RFC 2822 form + hooks.RFC_2822 = function () {}; + + // date from string and format string + function configFromStringAndFormat(config) { + // TODO: Move this to another part of the creation flow to prevent circular deps + if (config._f === hooks.ISO_8601) { + configFromISO(config); + return; + } + if (config._f === hooks.RFC_2822) { + configFromRFC2822(config); + return; + } + config._a = []; + getParsingFlags(config).empty = true; + + // This array is used to make a Date, either with `new Date` or `Date.UTC` + var string = '' + config._i, + i, + parsedInput, + tokens, + token, + skipped, + stringLength = string.length, + totalParsedInputLength = 0, + era; + + tokens = + expandFormat(config._f, config._locale).match(formattingTokens) || []; + + for (i = 0; i < tokens.length; i++) { + token = tokens[i]; + parsedInput = (string.match(getParseRegexForToken(token, config)) || + [])[0]; + if (parsedInput) { + skipped = string.substr(0, string.indexOf(parsedInput)); + if (skipped.length > 0) { + getParsingFlags(config).unusedInput.push(skipped); + } + string = string.slice( + string.indexOf(parsedInput) + parsedInput.length + ); + totalParsedInputLength += parsedInput.length; + } + // don't parse if it's not a known token + if (formatTokenFunctions[token]) { + if (parsedInput) { + getParsingFlags(config).empty = false; + } else { + getParsingFlags(config).unusedTokens.push(token); + } + addTimeToArrayFromToken(token, parsedInput, config); + } else if (config._strict && !parsedInput) { + getParsingFlags(config).unusedTokens.push(token); + } + } + + // add remaining unparsed input length to the string + getParsingFlags(config).charsLeftOver = + stringLength - totalParsedInputLength; + if (string.length > 0) { + getParsingFlags(config).unusedInput.push(string); + } + + // clear _12h flag if hour is <= 12 + if ( + config._a[HOUR] <= 12 && + getParsingFlags(config).bigHour === true && + config._a[HOUR] > 0 + ) { + getParsingFlags(config).bigHour = undefined; + } + + getParsingFlags(config).parsedDateParts = config._a.slice(0); + getParsingFlags(config).meridiem = config._meridiem; + // handle meridiem + config._a[HOUR] = meridiemFixWrap( + config._locale, + config._a[HOUR], + config._meridiem + ); + + // handle era + era = getParsingFlags(config).era; + if (era !== null) { + config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]); + } + + configFromArray(config); + checkOverflow(config); + } + + function meridiemFixWrap(locale, hour, meridiem) { + var isPm; + + if (meridiem == null) { + // nothing to do + return hour; + } + if (locale.meridiemHour != null) { + return locale.meridiemHour(hour, meridiem); + } else if (locale.isPM != null) { + // Fallback + isPm = locale.isPM(meridiem); + if (isPm && hour < 12) { + hour += 12; + } + if (!isPm && hour === 12) { + hour = 0; + } + return hour; + } else { + // this is not supposed to happen + return hour; + } + } + + // date from string and array of format strings + function configFromStringAndArray(config) { + var tempConfig, + bestMoment, + scoreToBeat, + i, + currentScore, + validFormatFound, + bestFormatIsValid = false; + + if (config._f.length === 0) { + getParsingFlags(config).invalidFormat = true; + config._d = new Date(NaN); + return; + } + + for (i = 0; i < config._f.length; i++) { + currentScore = 0; + validFormatFound = false; + tempConfig = copyConfig({}, config); + if (config._useUTC != null) { + tempConfig._useUTC = config._useUTC; + } + tempConfig._f = config._f[i]; + configFromStringAndFormat(tempConfig); + + if (isValid(tempConfig)) { + validFormatFound = true; + } + + // if there is any input that was not parsed add a penalty for that format + currentScore += getParsingFlags(tempConfig).charsLeftOver; + + //or tokens + currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; + + getParsingFlags(tempConfig).score = currentScore; + + if (!bestFormatIsValid) { + if ( + scoreToBeat == null || + currentScore < scoreToBeat || + validFormatFound + ) { + scoreToBeat = currentScore; + bestMoment = tempConfig; + if (validFormatFound) { + bestFormatIsValid = true; + } + } + } else { + if (currentScore < scoreToBeat) { + scoreToBeat = currentScore; + bestMoment = tempConfig; + } + } + } + + extend(config, bestMoment || tempConfig); + } + + function configFromObject(config) { + if (config._d) { + return; + } + + var i = normalizeObjectUnits(config._i), + dayOrDate = i.day === undefined ? i.date : i.day; + config._a = map( + [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond], + function (obj) { + return obj && parseInt(obj, 10); + } + ); + + configFromArray(config); + } + + function createFromConfig(config) { + var res = new Moment(checkOverflow(prepareConfig(config))); + if (res._nextDay) { + // Adding is smart enough around DST + res.add(1, 'd'); + res._nextDay = undefined; + } + + return res; + } + + function prepareConfig(config) { + var input = config._i, + format = config._f; + + config._locale = config._locale || getLocale(config._l); + + if (input === null || (format === undefined && input === '')) { + return createInvalid({ nullInput: true }); + } + + if (typeof input === 'string') { + config._i = input = config._locale.preparse(input); + } + + if (isMoment(input)) { + return new Moment(checkOverflow(input)); + } else if (isDate(input)) { + config._d = input; + } else if (isArray(format)) { + configFromStringAndArray(config); + } else if (format) { + configFromStringAndFormat(config); + } else { + configFromInput(config); + } + + if (!isValid(config)) { + config._d = null; + } + + return config; + } + + function configFromInput(config) { + var input = config._i; + if (isUndefined(input)) { + config._d = new Date(hooks.now()); + } else if (isDate(input)) { + config._d = new Date(input.valueOf()); + } else if (typeof input === 'string') { + configFromString(config); + } else if (isArray(input)) { + config._a = map(input.slice(0), function (obj) { + return parseInt(obj, 10); + }); + configFromArray(config); + } else if (isObject(input)) { + configFromObject(config); + } else if (isNumber(input)) { + // from milliseconds + config._d = new Date(input); + } else { + hooks.createFromInputFallback(config); + } + } + + function createLocalOrUTC(input, format, locale, strict, isUTC) { + var c = {}; + + if (format === true || format === false) { + strict = format; + format = undefined; + } + + if (locale === true || locale === false) { + strict = locale; + locale = undefined; + } + + if ( + (isObject(input) && isObjectEmpty(input)) || + (isArray(input) && input.length === 0) + ) { + input = undefined; + } + // object construction must be done this way. + // https://github.com/moment/moment/issues/1423 + c._isAMomentObject = true; + c._useUTC = c._isUTC = isUTC; + c._l = locale; + c._i = input; + c._f = format; + c._strict = strict; + + return createFromConfig(c); + } + + function createLocal(input, format, locale, strict) { + return createLocalOrUTC(input, format, locale, strict, false); + } + + var prototypeMin = deprecate( + 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', + function () { + var other = createLocal.apply(null, arguments); + if (this.isValid() && other.isValid()) { + return other < this ? this : other; + } else { + return createInvalid(); + } + } + ), + prototypeMax = deprecate( + 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', + function () { + var other = createLocal.apply(null, arguments); + if (this.isValid() && other.isValid()) { + return other > this ? this : other; + } else { + return createInvalid(); + } + } + ); + + // Pick a moment m from moments so that m[fn](other) is true for all + // other. This relies on the function fn to be transitive. + // + // moments should either be an array of moment objects or an array, whose + // first element is an array of moment objects. + function pickBy(fn, moments) { + var res, i; + if (moments.length === 1 && isArray(moments[0])) { + moments = moments[0]; + } + if (!moments.length) { + return createLocal(); + } + res = moments[0]; + for (i = 1; i < moments.length; ++i) { + if (!moments[i].isValid() || moments[i][fn](res)) { + res = moments[i]; + } + } + return res; + } + + // TODO: Use [].sort instead? + function min() { + var args = [].slice.call(arguments, 0); + + return pickBy('isBefore', args); + } + + function max() { + var args = [].slice.call(arguments, 0); + + return pickBy('isAfter', args); + } + + var now = function () { + return Date.now ? Date.now() : +new Date(); + }; + + var ordering = [ + 'year', + 'quarter', + 'month', + 'week', + 'day', + 'hour', + 'minute', + 'second', + 'millisecond', + ]; + + function isDurationValid(m) { + var key, + unitHasDecimal = false, + i; + for (key in m) { + if ( + hasOwnProp(m, key) && + !( + indexOf.call(ordering, key) !== -1 && + (m[key] == null || !isNaN(m[key])) + ) + ) { + return false; + } + } + + for (i = 0; i < ordering.length; ++i) { + if (m[ordering[i]]) { + if (unitHasDecimal) { + return false; // only allow non-integers for smallest unit + } + if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) { + unitHasDecimal = true; + } + } + } + + return true; + } + + function isValid$1() { + return this._isValid; + } + + function createInvalid$1() { + return createDuration(NaN); + } + + function Duration(duration) { + var normalizedInput = normalizeObjectUnits(duration), + years = normalizedInput.year || 0, + quarters = normalizedInput.quarter || 0, + months = normalizedInput.month || 0, + weeks = normalizedInput.week || normalizedInput.isoWeek || 0, + days = normalizedInput.day || 0, + hours = normalizedInput.hour || 0, + minutes = normalizedInput.minute || 0, + seconds = normalizedInput.second || 0, + milliseconds = normalizedInput.millisecond || 0; + + this._isValid = isDurationValid(normalizedInput); + + // representation for dateAddRemove + this._milliseconds = + +milliseconds + + seconds * 1e3 + // 1000 + minutes * 6e4 + // 1000 * 60 + hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978 + // Because of dateAddRemove treats 24 hours as different from a + // day when working around DST, we need to store them separately + this._days = +days + weeks * 7; + // It is impossible to translate months into days without knowing + // which months you are are talking about, so we have to store + // it separately. + this._months = +months + quarters * 3 + years * 12; + + this._data = {}; + + this._locale = getLocale(); + + this._bubble(); + } + + function isDuration(obj) { + return obj instanceof Duration; + } + + function absRound(number) { + if (number < 0) { + return Math.round(-1 * number) * -1; + } else { + return Math.round(number); + } + } + + // compare two arrays, return the number of differences + function compareArrays(array1, array2, dontConvert) { + var len = Math.min(array1.length, array2.length), + lengthDiff = Math.abs(array1.length - array2.length), + diffs = 0, + i; + for (i = 0; i < len; i++) { + if ( + (dontConvert && array1[i] !== array2[i]) || + (!dontConvert && toInt(array1[i]) !== toInt(array2[i])) + ) { + diffs++; + } + } + return diffs + lengthDiff; + } + + // FORMATTING + + function offset(token, separator) { + addFormatToken(token, 0, 0, function () { + var offset = this.utcOffset(), + sign = '+'; + if (offset < 0) { + offset = -offset; + sign = '-'; + } + return ( + sign + + zeroFill(~~(offset / 60), 2) + + separator + + zeroFill(~~offset % 60, 2) + ); + }); + } + + offset('Z', ':'); + offset('ZZ', ''); + + // PARSING + + addRegexToken('Z', matchShortOffset); + addRegexToken('ZZ', matchShortOffset); + addParseToken(['Z', 'ZZ'], function (input, array, config) { + config._useUTC = true; + config._tzm = offsetFromString(matchShortOffset, input); + }); + + // HELPERS + + // timezone chunker + // '+10:00' > ['10', '00'] + // '-1530' > ['-15', '30'] + var chunkOffset = /([\+\-]|\d\d)/gi; + + function offsetFromString(matcher, string) { + var matches = (string || '').match(matcher), + chunk, + parts, + minutes; + + if (matches === null) { + return null; + } + + chunk = matches[matches.length - 1] || []; + parts = (chunk + '').match(chunkOffset) || ['-', 0, 0]; + minutes = +(parts[1] * 60) + toInt(parts[2]); + + return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes; + } + + // Return a moment from input, that is local/utc/zone equivalent to model. + function cloneWithOffset(input, model) { + var res, diff; + if (model._isUTC) { + res = model.clone(); + diff = + (isMoment(input) || isDate(input) + ? input.valueOf() + : createLocal(input).valueOf()) - res.valueOf(); + // Use low-level api, because this fn is low-level api. + res._d.setTime(res._d.valueOf() + diff); + hooks.updateOffset(res, false); + return res; + } else { + return createLocal(input).local(); + } + } + + function getDateOffset(m) { + // On Firefox.24 Date#getTimezoneOffset returns a floating point. + // https://github.com/moment/moment/pull/1871 + return -Math.round(m._d.getTimezoneOffset()); + } + + // HOOKS + + // This function will be called whenever a moment is mutated. + // It is intended to keep the offset in sync with the timezone. + hooks.updateOffset = function () {}; + + // MOMENTS + + // keepLocalTime = true means only change the timezone, without + // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--> + // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset + // +0200, so we adjust the time as needed, to be valid. + // + // Keeping the time actually adds/subtracts (one hour) + // from the actual represented time. That is why we call updateOffset + // a second time. In case it wants us to change the offset again + // _changeInProgress == true case, then we have to adjust, because + // there is no such time in the given timezone. + function getSetOffset(input, keepLocalTime, keepMinutes) { + var offset = this._offset || 0, + localAdjust; + if (!this.isValid()) { + return input != null ? this : NaN; + } + if (input != null) { + if (typeof input === 'string') { + input = offsetFromString(matchShortOffset, input); + if (input === null) { + return this; + } + } else if (Math.abs(input) < 16 && !keepMinutes) { + input = input * 60; + } + if (!this._isUTC && keepLocalTime) { + localAdjust = getDateOffset(this); + } + this._offset = input; + this._isUTC = true; + if (localAdjust != null) { + this.add(localAdjust, 'm'); + } + if (offset !== input) { + if (!keepLocalTime || this._changeInProgress) { + addSubtract( + this, + createDuration(input - offset, 'm'), + 1, + false + ); + } else if (!this._changeInProgress) { + this._changeInProgress = true; + hooks.updateOffset(this, true); + this._changeInProgress = null; + } + } + return this; + } else { + return this._isUTC ? offset : getDateOffset(this); + } + } + + function getSetZone(input, keepLocalTime) { + if (input != null) { + if (typeof input !== 'string') { + input = -input; + } + + this.utcOffset(input, keepLocalTime); + + return this; + } else { + return -this.utcOffset(); + } + } + + function setOffsetToUTC(keepLocalTime) { + return this.utcOffset(0, keepLocalTime); + } + + function setOffsetToLocal(keepLocalTime) { + if (this._isUTC) { + this.utcOffset(0, keepLocalTime); + this._isUTC = false; + + if (keepLocalTime) { + this.subtract(getDateOffset(this), 'm'); + } + } + return this; + } + + function setOffsetToParsedOffset() { + if (this._tzm != null) { + this.utcOffset(this._tzm, false, true); + } else if (typeof this._i === 'string') { + var tZone = offsetFromString(matchOffset, this._i); + if (tZone != null) { + this.utcOffset(tZone); + } else { + this.utcOffset(0, true); + } + } + return this; + } + + function hasAlignedHourOffset(input) { + if (!this.isValid()) { + return false; + } + input = input ? createLocal(input).utcOffset() : 0; + + return (this.utcOffset() - input) % 60 === 0; + } + + function isDaylightSavingTime() { + return ( + this.utcOffset() > this.clone().month(0).utcOffset() || + this.utcOffset() > this.clone().month(5).utcOffset() + ); + } + + function isDaylightSavingTimeShifted() { + if (!isUndefined(this._isDSTShifted)) { + return this._isDSTShifted; + } + + var c = {}, + other; + + copyConfig(c, this); + c = prepareConfig(c); + + if (c._a) { + other = c._isUTC ? createUTC(c._a) : createLocal(c._a); + this._isDSTShifted = + this.isValid() && compareArrays(c._a, other.toArray()) > 0; + } else { + this._isDSTShifted = false; + } + + return this._isDSTShifted; + } + + function isLocal() { + return this.isValid() ? !this._isUTC : false; + } + + function isUtcOffset() { + return this.isValid() ? this._isUTC : false; + } + + function isUtc() { + return this.isValid() ? this._isUTC && this._offset === 0 : false; + } + + // ASP.NET json date format regex + var aspNetRegex = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, + // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html + // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere + // and further modified to allow for strings containing both week and day + isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; + + function createDuration(input, key) { + var duration = input, + // matching against regexp is expensive, do it on demand + match = null, + sign, + ret, + diffRes; + + if (isDuration(input)) { + duration = { + ms: input._milliseconds, + d: input._days, + M: input._months, + }; + } else if (isNumber(input) || !isNaN(+input)) { + duration = {}; + if (key) { + duration[key] = +input; + } else { + duration.milliseconds = +input; + } + } else if ((match = aspNetRegex.exec(input))) { + sign = match[1] === '-' ? -1 : 1; + duration = { + y: 0, + d: toInt(match[DATE]) * sign, + h: toInt(match[HOUR]) * sign, + m: toInt(match[MINUTE]) * sign, + s: toInt(match[SECOND]) * sign, + ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match + }; + } else if ((match = isoRegex.exec(input))) { + sign = match[1] === '-' ? -1 : 1; + duration = { + y: parseIso(match[2], sign), + M: parseIso(match[3], sign), + w: parseIso(match[4], sign), + d: parseIso(match[5], sign), + h: parseIso(match[6], sign), + m: parseIso(match[7], sign), + s: parseIso(match[8], sign), + }; + } else if (duration == null) { + // checks for null or undefined + duration = {}; + } else if ( + typeof duration === 'object' && + ('from' in duration || 'to' in duration) + ) { + diffRes = momentsDifference( + createLocal(duration.from), + createLocal(duration.to) + ); + + duration = {}; + duration.ms = diffRes.milliseconds; + duration.M = diffRes.months; + } + + ret = new Duration(duration); + + if (isDuration(input) && hasOwnProp(input, '_locale')) { + ret._locale = input._locale; + } + + if (isDuration(input) && hasOwnProp(input, '_isValid')) { + ret._isValid = input._isValid; + } + + return ret; + } + + createDuration.fn = Duration.prototype; + createDuration.invalid = createInvalid$1; + + function parseIso(inp, sign) { + // We'd normally use ~~inp for this, but unfortunately it also + // converts floats to ints. + // inp may be undefined, so careful calling replace on it. + var res = inp && parseFloat(inp.replace(',', '.')); + // apply sign while we're at it + return (isNaN(res) ? 0 : res) * sign; + } + + function positiveMomentsDifference(base, other) { + var res = {}; + + res.months = + other.month() - base.month() + (other.year() - base.year()) * 12; + if (base.clone().add(res.months, 'M').isAfter(other)) { + --res.months; + } + + res.milliseconds = +other - +base.clone().add(res.months, 'M'); + + return res; + } + + function momentsDifference(base, other) { + var res; + if (!(base.isValid() && other.isValid())) { + return { milliseconds: 0, months: 0 }; + } + + other = cloneWithOffset(other, base); + if (base.isBefore(other)) { + res = positiveMomentsDifference(base, other); + } else { + res = positiveMomentsDifference(other, base); + res.milliseconds = -res.milliseconds; + res.months = -res.months; + } + + return res; + } + + // TODO: remove 'name' arg after deprecation is removed + function createAdder(direction, name) { + return function (val, period) { + var dur, tmp; + //invert the arguments, but complain about it + if (period !== null && !isNaN(+period)) { + deprecateSimple( + name, + 'moment().' + + name + + '(period, number) is deprecated. Please use moment().' + + name + + '(number, period). ' + + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.' + ); + tmp = val; + val = period; + period = tmp; + } + + dur = createDuration(val, period); + addSubtract(this, dur, direction); + return this; + }; + } + + function addSubtract(mom, duration, isAdding, updateOffset) { + var milliseconds = duration._milliseconds, + days = absRound(duration._days), + months = absRound(duration._months); + + if (!mom.isValid()) { + // No op + return; + } + + updateOffset = updateOffset == null ? true : updateOffset; + + if (months) { + setMonth(mom, get(mom, 'Month') + months * isAdding); + } + if (days) { + set$1(mom, 'Date', get(mom, 'Date') + days * isAdding); + } + if (milliseconds) { + mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding); + } + if (updateOffset) { + hooks.updateOffset(mom, days || months); + } + } + + var add = createAdder(1, 'add'), + subtract = createAdder(-1, 'subtract'); + + function isString(input) { + return typeof input === 'string' || input instanceof String; + } + + // type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined + function isMomentInput(input) { + return ( + isMoment(input) || + isDate(input) || + isString(input) || + isNumber(input) || + isNumberOrStringArray(input) || + isMomentInputObject(input) || + input === null || + input === undefined + ); + } + + function isMomentInputObject(input) { + var objectTest = isObject(input) && !isObjectEmpty(input), + propertyTest = false, + properties = [ + 'years', + 'year', + 'y', + 'months', + 'month', + 'M', + 'days', + 'day', + 'd', + 'dates', + 'date', + 'D', + 'hours', + 'hour', + 'h', + 'minutes', + 'minute', + 'm', + 'seconds', + 'second', + 's', + 'milliseconds', + 'millisecond', + 'ms', + ], + i, + property; + + for (i = 0; i < properties.length; i += 1) { + property = properties[i]; + propertyTest = propertyTest || hasOwnProp(input, property); + } + + return objectTest && propertyTest; + } + + function isNumberOrStringArray(input) { + var arrayTest = isArray(input), + dataTypeTest = false; + if (arrayTest) { + dataTypeTest = + input.filter(function (item) { + return !isNumber(item) && isString(input); + }).length === 0; + } + return arrayTest && dataTypeTest; + } + + function isCalendarSpec(input) { + var objectTest = isObject(input) && !isObjectEmpty(input), + propertyTest = false, + properties = [ + 'sameDay', + 'nextDay', + 'lastDay', + 'nextWeek', + 'lastWeek', + 'sameElse', + ], + i, + property; + + for (i = 0; i < properties.length; i += 1) { + property = properties[i]; + propertyTest = propertyTest || hasOwnProp(input, property); + } + + return objectTest && propertyTest; + } + + function getCalendarFormat(myMoment, now) { + var diff = myMoment.diff(now, 'days', true); + return diff < -6 + ? 'sameElse' + : diff < -1 + ? 'lastWeek' + : diff < 0 + ? 'lastDay' + : diff < 1 + ? 'sameDay' + : diff < 2 + ? 'nextDay' + : diff < 7 + ? 'nextWeek' + : 'sameElse'; + } + + function calendar$1(time, formats) { + // Support for single parameter, formats only overload to the calendar function + if (arguments.length === 1) { + if (isMomentInput(arguments[0])) { + time = arguments[0]; + formats = undefined; + } else if (isCalendarSpec(arguments[0])) { + formats = arguments[0]; + time = undefined; + } + } + // We want to compare the start of today, vs this. + // Getting start-of-today depends on whether we're local/utc/offset or not. + var now = time || createLocal(), + sod = cloneWithOffset(now, this).startOf('day'), + format = hooks.calendarFormat(this, sod) || 'sameElse', + output = + formats && + (isFunction(formats[format]) + ? formats[format].call(this, now) + : formats[format]); + + return this.format( + output || this.localeData().calendar(format, this, createLocal(now)) + ); + } + + function clone() { + return new Moment(this); + } + + function isAfter(input, units) { + var localInput = isMoment(input) ? input : createLocal(input); + if (!(this.isValid() && localInput.isValid())) { + return false; + } + units = normalizeUnits(units) || 'millisecond'; + if (units === 'millisecond') { + return this.valueOf() > localInput.valueOf(); + } else { + return localInput.valueOf() < this.clone().startOf(units).valueOf(); + } + } + + function isBefore(input, units) { + var localInput = isMoment(input) ? input : createLocal(input); + if (!(this.isValid() && localInput.isValid())) { + return false; + } + units = normalizeUnits(units) || 'millisecond'; + if (units === 'millisecond') { + return this.valueOf() < localInput.valueOf(); + } else { + return this.clone().endOf(units).valueOf() < localInput.valueOf(); + } + } + + function isBetween(from, to, units, inclusivity) { + var localFrom = isMoment(from) ? from : createLocal(from), + localTo = isMoment(to) ? to : createLocal(to); + if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) { + return false; + } + inclusivity = inclusivity || '()'; + return ( + (inclusivity[0] === '(' + ? this.isAfter(localFrom, units) + : !this.isBefore(localFrom, units)) && + (inclusivity[1] === ')' + ? this.isBefore(localTo, units) + : !this.isAfter(localTo, units)) + ); + } + + function isSame(input, units) { + var localInput = isMoment(input) ? input : createLocal(input), + inputMs; + if (!(this.isValid() && localInput.isValid())) { + return false; + } + units = normalizeUnits(units) || 'millisecond'; + if (units === 'millisecond') { + return this.valueOf() === localInput.valueOf(); + } else { + inputMs = localInput.valueOf(); + return ( + this.clone().startOf(units).valueOf() <= inputMs && + inputMs <= this.clone().endOf(units).valueOf() + ); + } + } + + function isSameOrAfter(input, units) { + return this.isSame(input, units) || this.isAfter(input, units); + } + + function isSameOrBefore(input, units) { + return this.isSame(input, units) || this.isBefore(input, units); + } + + function diff(input, units, asFloat) { + var that, zoneDelta, output; + + if (!this.isValid()) { + return NaN; + } + + that = cloneWithOffset(input, this); + + if (!that.isValid()) { + return NaN; + } + + zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4; + + units = normalizeUnits(units); + + switch (units) { + case 'year': + output = monthDiff(this, that) / 12; + break; + case 'month': + output = monthDiff(this, that); + break; + case 'quarter': + output = monthDiff(this, that) / 3; + break; + case 'second': + output = (this - that) / 1e3; + break; // 1000 + case 'minute': + output = (this - that) / 6e4; + break; // 1000 * 60 + case 'hour': + output = (this - that) / 36e5; + break; // 1000 * 60 * 60 + case 'day': + output = (this - that - zoneDelta) / 864e5; + break; // 1000 * 60 * 60 * 24, negate dst + case 'week': + output = (this - that - zoneDelta) / 6048e5; + break; // 1000 * 60 * 60 * 24 * 7, negate dst + default: + output = this - that; + } + + return asFloat ? output : absFloor(output); + } + + function monthDiff(a, b) { + if (a.date() < b.date()) { + // end-of-month calculations work correct when the start month has more + // days than the end month. + return -monthDiff(b, a); + } + // difference in months + var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()), + // b is in (anchor - 1 month, anchor + 1 month) + anchor = a.clone().add(wholeMonthDiff, 'months'), + anchor2, + adjust; + + if (b - anchor < 0) { + anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); + // linear across the month + adjust = (b - anchor) / (anchor - anchor2); + } else { + anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); + // linear across the month + adjust = (b - anchor) / (anchor2 - anchor); + } + + //check for negative zero, return zero if negative zero + return -(wholeMonthDiff + adjust) || 0; + } + + hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'; + hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]'; + + function toString() { + return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); + } + + function toISOString(keepOffset) { + if (!this.isValid()) { + return null; + } + var utc = keepOffset !== true, + m = utc ? this.clone().utc() : this; + if (m.year() < 0 || m.year() > 9999) { + return formatMoment( + m, + utc + ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' + : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ' + ); + } + if (isFunction(Date.prototype.toISOString)) { + // native implementation is ~50x faster, use it when we can + if (utc) { + return this.toDate().toISOString(); + } else { + return new Date(this.valueOf() + this.utcOffset() * 60 * 1000) + .toISOString() + .replace('Z', formatMoment(m, 'Z')); + } + } + return formatMoment( + m, + utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ' + ); + } + + /** + * Return a human readable representation of a moment that can + * also be evaluated to get a new moment which is the same + * + * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects + */ + function inspect() { + if (!this.isValid()) { + return 'moment.invalid(/* ' + this._i + ' */)'; + } + var func = 'moment', + zone = '', + prefix, + year, + datetime, + suffix; + if (!this.isLocal()) { + func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone'; + zone = 'Z'; + } + prefix = '[' + func + '("]'; + year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY'; + datetime = '-MM-DD[T]HH:mm:ss.SSS'; + suffix = zone + '[")]'; + + return this.format(prefix + year + datetime + suffix); + } + + function format(inputString) { + if (!inputString) { + inputString = this.isUtc() + ? hooks.defaultFormatUtc + : hooks.defaultFormat; + } + var output = formatMoment(this, inputString); + return this.localeData().postformat(output); + } + + function from(time, withoutSuffix) { + if ( + this.isValid() && + ((isMoment(time) && time.isValid()) || createLocal(time).isValid()) + ) { + return createDuration({ to: this, from: time }) + .locale(this.locale()) + .humanize(!withoutSuffix); + } else { + return this.localeData().invalidDate(); + } + } + + function fromNow(withoutSuffix) { + return this.from(createLocal(), withoutSuffix); + } + + function to(time, withoutSuffix) { + if ( + this.isValid() && + ((isMoment(time) && time.isValid()) || createLocal(time).isValid()) + ) { + return createDuration({ from: this, to: time }) + .locale(this.locale()) + .humanize(!withoutSuffix); + } else { + return this.localeData().invalidDate(); + } + } + + function toNow(withoutSuffix) { + return this.to(createLocal(), withoutSuffix); + } + + // If passed a locale key, it will set the locale for this + // instance. Otherwise, it will return the locale configuration + // variables for this instance. + function locale(key) { + var newLocaleData; + + if (key === undefined) { + return this._locale._abbr; + } else { + newLocaleData = getLocale(key); + if (newLocaleData != null) { + this._locale = newLocaleData; + } + return this; + } + } + + var lang = deprecate( + 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', + function (key) { + if (key === undefined) { + return this.localeData(); + } else { + return this.locale(key); + } + } + ); + + function localeData() { + return this._locale; + } + + var MS_PER_SECOND = 1000, + MS_PER_MINUTE = 60 * MS_PER_SECOND, + MS_PER_HOUR = 60 * MS_PER_MINUTE, + MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR; + + // actual modulo - handles negative numbers (for dates before 1970): + function mod$1(dividend, divisor) { + return ((dividend % divisor) + divisor) % divisor; + } + + function localStartOfDate(y, m, d) { + // the date constructor remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + return new Date(y + 400, m, d) - MS_PER_400_YEARS; + } else { + return new Date(y, m, d).valueOf(); + } + } + + function utcStartOfDate(y, m, d) { + // Date.UTC remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS; + } else { + return Date.UTC(y, m, d); + } + } + + function startOf(units) { + var time, startOfDate; + units = normalizeUnits(units); + if (units === undefined || units === 'millisecond' || !this.isValid()) { + return this; + } + + startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; + + switch (units) { + case 'year': + time = startOfDate(this.year(), 0, 1); + break; + case 'quarter': + time = startOfDate( + this.year(), + this.month() - (this.month() % 3), + 1 + ); + break; + case 'month': + time = startOfDate(this.year(), this.month(), 1); + break; + case 'week': + time = startOfDate( + this.year(), + this.month(), + this.date() - this.weekday() + ); + break; + case 'isoWeek': + time = startOfDate( + this.year(), + this.month(), + this.date() - (this.isoWeekday() - 1) + ); + break; + case 'day': + case 'date': + time = startOfDate(this.year(), this.month(), this.date()); + break; + case 'hour': + time = this._d.valueOf(); + time -= mod$1( + time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), + MS_PER_HOUR + ); + break; + case 'minute': + time = this._d.valueOf(); + time -= mod$1(time, MS_PER_MINUTE); + break; + case 'second': + time = this._d.valueOf(); + time -= mod$1(time, MS_PER_SECOND); + break; + } + + this._d.setTime(time); + hooks.updateOffset(this, true); + return this; + } + + function endOf(units) { + var time, startOfDate; + units = normalizeUnits(units); + if (units === undefined || units === 'millisecond' || !this.isValid()) { + return this; + } + + startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; + + switch (units) { + case 'year': + time = startOfDate(this.year() + 1, 0, 1) - 1; + break; + case 'quarter': + time = + startOfDate( + this.year(), + this.month() - (this.month() % 3) + 3, + 1 + ) - 1; + break; + case 'month': + time = startOfDate(this.year(), this.month() + 1, 1) - 1; + break; + case 'week': + time = + startOfDate( + this.year(), + this.month(), + this.date() - this.weekday() + 7 + ) - 1; + break; + case 'isoWeek': + time = + startOfDate( + this.year(), + this.month(), + this.date() - (this.isoWeekday() - 1) + 7 + ) - 1; + break; + case 'day': + case 'date': + time = startOfDate(this.year(), this.month(), this.date() + 1) - 1; + break; + case 'hour': + time = this._d.valueOf(); + time += + MS_PER_HOUR - + mod$1( + time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), + MS_PER_HOUR + ) - + 1; + break; + case 'minute': + time = this._d.valueOf(); + time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1; + break; + case 'second': + time = this._d.valueOf(); + time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1; + break; + } + + this._d.setTime(time); + hooks.updateOffset(this, true); + return this; + } + + function valueOf() { + return this._d.valueOf() - (this._offset || 0) * 60000; + } + + function unix() { + return Math.floor(this.valueOf() / 1000); + } + + function toDate() { + return new Date(this.valueOf()); + } + + function toArray() { + var m = this; + return [ + m.year(), + m.month(), + m.date(), + m.hour(), + m.minute(), + m.second(), + m.millisecond(), + ]; + } + + function toObject() { + var m = this; + return { + years: m.year(), + months: m.month(), + date: m.date(), + hours: m.hours(), + minutes: m.minutes(), + seconds: m.seconds(), + milliseconds: m.milliseconds(), + }; + } + + function toJSON() { + // new Date(NaN).toJSON() === null + return this.isValid() ? this.toISOString() : null; + } + + function isValid$2() { + return isValid(this); + } + + function parsingFlags() { + return extend({}, getParsingFlags(this)); + } + + function invalidAt() { + return getParsingFlags(this).overflow; + } + + function creationData() { + return { + input: this._i, + format: this._f, + locale: this._locale, + isUTC: this._isUTC, + strict: this._strict, + }; + } + + addFormatToken('N', 0, 0, 'eraAbbr'); + addFormatToken('NN', 0, 0, 'eraAbbr'); + addFormatToken('NNN', 0, 0, 'eraAbbr'); + addFormatToken('NNNN', 0, 0, 'eraName'); + addFormatToken('NNNNN', 0, 0, 'eraNarrow'); + + addFormatToken('y', ['y', 1], 'yo', 'eraYear'); + addFormatToken('y', ['yy', 2], 0, 'eraYear'); + addFormatToken('y', ['yyy', 3], 0, 'eraYear'); + addFormatToken('y', ['yyyy', 4], 0, 'eraYear'); + + addRegexToken('N', matchEraAbbr); + addRegexToken('NN', matchEraAbbr); + addRegexToken('NNN', matchEraAbbr); + addRegexToken('NNNN', matchEraName); + addRegexToken('NNNNN', matchEraNarrow); + + addParseToken(['N', 'NN', 'NNN', 'NNNN', 'NNNNN'], function ( + input, + array, + config, + token + ) { + var era = config._locale.erasParse(input, token, config._strict); + if (era) { + getParsingFlags(config).era = era; + } else { + getParsingFlags(config).invalidEra = input; + } + }); + + addRegexToken('y', matchUnsigned); + addRegexToken('yy', matchUnsigned); + addRegexToken('yyy', matchUnsigned); + addRegexToken('yyyy', matchUnsigned); + addRegexToken('yo', matchEraYearOrdinal); + + addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR); + addParseToken(['yo'], function (input, array, config, token) { + var match; + if (config._locale._eraYearOrdinalRegex) { + match = input.match(config._locale._eraYearOrdinalRegex); + } + + if (config._locale.eraYearOrdinalParse) { + array[YEAR] = config._locale.eraYearOrdinalParse(input, match); + } else { + array[YEAR] = parseInt(input, 10); + } + }); + + function localeEras(m, format) { + var i, + l, + date, + eras = this._eras || getLocale('en')._eras; + for (i = 0, l = eras.length; i < l; ++i) { + switch (typeof eras[i].since) { + case 'string': + // truncate time + date = hooks(eras[i].since).startOf('day'); + eras[i].since = date.valueOf(); + break; + } + + switch (typeof eras[i].until) { + case 'undefined': + eras[i].until = +Infinity; + break; + case 'string': + // truncate time + date = hooks(eras[i].until).startOf('day').valueOf(); + eras[i].until = date.valueOf(); + break; + } + } + return eras; + } + + function localeErasParse(eraName, format, strict) { + var i, + l, + eras = this.eras(), + name, + abbr, + narrow; + eraName = eraName.toUpperCase(); + + for (i = 0, l = eras.length; i < l; ++i) { + name = eras[i].name.toUpperCase(); + abbr = eras[i].abbr.toUpperCase(); + narrow = eras[i].narrow.toUpperCase(); + + if (strict) { + switch (format) { + case 'N': + case 'NN': + case 'NNN': + if (abbr === eraName) { + return eras[i]; + } + break; + + case 'NNNN': + if (name === eraName) { + return eras[i]; + } + break; + + case 'NNNNN': + if (narrow === eraName) { + return eras[i]; + } + break; + } + } else if ([name, abbr, narrow].indexOf(eraName) >= 0) { + return eras[i]; + } + } + } + + function localeErasConvertYear(era, year) { + var dir = era.since <= era.until ? +1 : -1; + if (year === undefined) { + return hooks(era.since).year(); + } else { + return hooks(era.since).year() + (year - era.offset) * dir; + } + } + + function getEraName() { + var i, + l, + val, + eras = this.localeData().eras(); + for (i = 0, l = eras.length; i < l; ++i) { + // truncate time + val = this.clone().startOf('day').valueOf(); + + if (eras[i].since <= val && val <= eras[i].until) { + return eras[i].name; + } + if (eras[i].until <= val && val <= eras[i].since) { + return eras[i].name; + } + } + + return ''; + } + + function getEraNarrow() { + var i, + l, + val, + eras = this.localeData().eras(); + for (i = 0, l = eras.length; i < l; ++i) { + // truncate time + val = this.clone().startOf('day').valueOf(); + + if (eras[i].since <= val && val <= eras[i].until) { + return eras[i].narrow; + } + if (eras[i].until <= val && val <= eras[i].since) { + return eras[i].narrow; + } + } + + return ''; + } + + function getEraAbbr() { + var i, + l, + val, + eras = this.localeData().eras(); + for (i = 0, l = eras.length; i < l; ++i) { + // truncate time + val = this.clone().startOf('day').valueOf(); + + if (eras[i].since <= val && val <= eras[i].until) { + return eras[i].abbr; + } + if (eras[i].until <= val && val <= eras[i].since) { + return eras[i].abbr; + } + } + + return ''; + } + + function getEraYear() { + var i, + l, + dir, + val, + eras = this.localeData().eras(); + for (i = 0, l = eras.length; i < l; ++i) { + dir = eras[i].since <= eras[i].until ? +1 : -1; + + // truncate time + val = this.clone().startOf('day').valueOf(); + + if ( + (eras[i].since <= val && val <= eras[i].until) || + (eras[i].until <= val && val <= eras[i].since) + ) { + return ( + (this.year() - hooks(eras[i].since).year()) * dir + + eras[i].offset + ); + } + } + + return this.year(); + } + + function erasNameRegex(isStrict) { + if (!hasOwnProp(this, '_erasNameRegex')) { + computeErasParse.call(this); + } + return isStrict ? this._erasNameRegex : this._erasRegex; + } + + function erasAbbrRegex(isStrict) { + if (!hasOwnProp(this, '_erasAbbrRegex')) { + computeErasParse.call(this); + } + return isStrict ? this._erasAbbrRegex : this._erasRegex; + } + + function erasNarrowRegex(isStrict) { + if (!hasOwnProp(this, '_erasNarrowRegex')) { + computeErasParse.call(this); + } + return isStrict ? this._erasNarrowRegex : this._erasRegex; + } + + function matchEraAbbr(isStrict, locale) { + return locale.erasAbbrRegex(isStrict); + } + + function matchEraName(isStrict, locale) { + return locale.erasNameRegex(isStrict); + } + + function matchEraNarrow(isStrict, locale) { + return locale.erasNarrowRegex(isStrict); + } + + function matchEraYearOrdinal(isStrict, locale) { + return locale._eraYearOrdinalRegex || matchUnsigned; + } + + function computeErasParse() { + var abbrPieces = [], + namePieces = [], + narrowPieces = [], + mixedPieces = [], + i, + l, + eras = this.eras(); + + for (i = 0, l = eras.length; i < l; ++i) { + namePieces.push(regexEscape(eras[i].name)); + abbrPieces.push(regexEscape(eras[i].abbr)); + narrowPieces.push(regexEscape(eras[i].narrow)); + + mixedPieces.push(regexEscape(eras[i].name)); + mixedPieces.push(regexEscape(eras[i].abbr)); + mixedPieces.push(regexEscape(eras[i].narrow)); + } + + this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i'); + this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i'); + this._erasNarrowRegex = new RegExp( + '^(' + narrowPieces.join('|') + ')', + 'i' + ); + } + + // FORMATTING + + addFormatToken(0, ['gg', 2], 0, function () { + return this.weekYear() % 100; + }); + + addFormatToken(0, ['GG', 2], 0, function () { + return this.isoWeekYear() % 100; + }); + + function addWeekYearFormatToken(token, getter) { + addFormatToken(0, [token, token.length], 0, getter); + } + + addWeekYearFormatToken('gggg', 'weekYear'); + addWeekYearFormatToken('ggggg', 'weekYear'); + addWeekYearFormatToken('GGGG', 'isoWeekYear'); + addWeekYearFormatToken('GGGGG', 'isoWeekYear'); + + // ALIASES + + addUnitAlias('weekYear', 'gg'); + addUnitAlias('isoWeekYear', 'GG'); + + // PRIORITY + + addUnitPriority('weekYear', 1); + addUnitPriority('isoWeekYear', 1); + + // PARSING + + addRegexToken('G', matchSigned); + addRegexToken('g', matchSigned); + addRegexToken('GG', match1to2, match2); + addRegexToken('gg', match1to2, match2); + addRegexToken('GGGG', match1to4, match4); + addRegexToken('gggg', match1to4, match4); + addRegexToken('GGGGG', match1to6, match6); + addRegexToken('ggggg', match1to6, match6); + + addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function ( + input, + week, + config, + token + ) { + week[token.substr(0, 2)] = toInt(input); + }); + + addWeekParseToken(['gg', 'GG'], function (input, week, config, token) { + week[token] = hooks.parseTwoDigitYear(input); + }); + + // MOMENTS + + function getSetWeekYear(input) { + return getSetWeekYearHelper.call( + this, + input, + this.week(), + this.weekday(), + this.localeData()._week.dow, + this.localeData()._week.doy + ); + } + + function getSetISOWeekYear(input) { + return getSetWeekYearHelper.call( + this, + input, + this.isoWeek(), + this.isoWeekday(), + 1, + 4 + ); + } + + function getISOWeeksInYear() { + return weeksInYear(this.year(), 1, 4); + } + + function getISOWeeksInISOWeekYear() { + return weeksInYear(this.isoWeekYear(), 1, 4); + } + + function getWeeksInYear() { + var weekInfo = this.localeData()._week; + return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); + } + + function getWeeksInWeekYear() { + var weekInfo = this.localeData()._week; + return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy); + } + + function getSetWeekYearHelper(input, week, weekday, dow, doy) { + var weeksTarget; + if (input == null) { + return weekOfYear(this, dow, doy).year; + } else { + weeksTarget = weeksInYear(input, dow, doy); + if (week > weeksTarget) { + week = weeksTarget; + } + return setWeekAll.call(this, input, week, weekday, dow, doy); + } + } + + function setWeekAll(weekYear, week, weekday, dow, doy) { + var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), + date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear); + + this.year(date.getUTCFullYear()); + this.month(date.getUTCMonth()); + this.date(date.getUTCDate()); + return this; + } + + // FORMATTING + + addFormatToken('Q', 0, 'Qo', 'quarter'); + + // ALIASES + + addUnitAlias('quarter', 'Q'); + + // PRIORITY + + addUnitPriority('quarter', 7); + + // PARSING + + addRegexToken('Q', match1); + addParseToken('Q', function (input, array) { + array[MONTH] = (toInt(input) - 1) * 3; + }); + + // MOMENTS + + function getSetQuarter(input) { + return input == null + ? Math.ceil((this.month() + 1) / 3) + : this.month((input - 1) * 3 + (this.month() % 3)); + } + + // FORMATTING + + addFormatToken('D', ['DD', 2], 'Do', 'date'); + + // ALIASES + + addUnitAlias('date', 'D'); + + // PRIORITY + addUnitPriority('date', 9); + + // PARSING + + addRegexToken('D', match1to2); + addRegexToken('DD', match1to2, match2); + addRegexToken('Do', function (isStrict, locale) { + // TODO: Remove "ordinalParse" fallback in next major release. + return isStrict + ? locale._dayOfMonthOrdinalParse || locale._ordinalParse + : locale._dayOfMonthOrdinalParseLenient; + }); + + addParseToken(['D', 'DD'], DATE); + addParseToken('Do', function (input, array) { + array[DATE] = toInt(input.match(match1to2)[0]); + }); + + // MOMENTS + + var getSetDayOfMonth = makeGetSet('Date', true); + + // FORMATTING + + addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); + + // ALIASES + + addUnitAlias('dayOfYear', 'DDD'); + + // PRIORITY + addUnitPriority('dayOfYear', 4); + + // PARSING + + addRegexToken('DDD', match1to3); + addRegexToken('DDDD', match3); + addParseToken(['DDD', 'DDDD'], function (input, array, config) { + config._dayOfYear = toInt(input); + }); + + // HELPERS + + // MOMENTS + + function getSetDayOfYear(input) { + var dayOfYear = + Math.round( + (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5 + ) + 1; + return input == null ? dayOfYear : this.add(input - dayOfYear, 'd'); + } + + // FORMATTING + + addFormatToken('m', ['mm', 2], 0, 'minute'); + + // ALIASES + + addUnitAlias('minute', 'm'); + + // PRIORITY + + addUnitPriority('minute', 14); + + // PARSING + + addRegexToken('m', match1to2); + addRegexToken('mm', match1to2, match2); + addParseToken(['m', 'mm'], MINUTE); + + // MOMENTS + + var getSetMinute = makeGetSet('Minutes', false); + + // FORMATTING + + addFormatToken('s', ['ss', 2], 0, 'second'); + + // ALIASES + + addUnitAlias('second', 's'); + + // PRIORITY + + addUnitPriority('second', 15); + + // PARSING + + addRegexToken('s', match1to2); + addRegexToken('ss', match1to2, match2); + addParseToken(['s', 'ss'], SECOND); + + // MOMENTS + + var getSetSecond = makeGetSet('Seconds', false); + + // FORMATTING + + addFormatToken('S', 0, 0, function () { + return ~~(this.millisecond() / 100); + }); + + addFormatToken(0, ['SS', 2], 0, function () { + return ~~(this.millisecond() / 10); + }); + + addFormatToken(0, ['SSS', 3], 0, 'millisecond'); + addFormatToken(0, ['SSSS', 4], 0, function () { + return this.millisecond() * 10; + }); + addFormatToken(0, ['SSSSS', 5], 0, function () { + return this.millisecond() * 100; + }); + addFormatToken(0, ['SSSSSS', 6], 0, function () { + return this.millisecond() * 1000; + }); + addFormatToken(0, ['SSSSSSS', 7], 0, function () { + return this.millisecond() * 10000; + }); + addFormatToken(0, ['SSSSSSSS', 8], 0, function () { + return this.millisecond() * 100000; + }); + addFormatToken(0, ['SSSSSSSSS', 9], 0, function () { + return this.millisecond() * 1000000; + }); + + // ALIASES + + addUnitAlias('millisecond', 'ms'); + + // PRIORITY + + addUnitPriority('millisecond', 16); + + // PARSING + + addRegexToken('S', match1to3, match1); + addRegexToken('SS', match1to3, match2); + addRegexToken('SSS', match1to3, match3); + + var token, getSetMillisecond; + for (token = 'SSSS'; token.length <= 9; token += 'S') { + addRegexToken(token, matchUnsigned); + } + + function parseMs(input, array) { + array[MILLISECOND] = toInt(('0.' + input) * 1000); + } + + for (token = 'S'; token.length <= 9; token += 'S') { + addParseToken(token, parseMs); + } + + getSetMillisecond = makeGetSet('Milliseconds', false); + + // FORMATTING + + addFormatToken('z', 0, 0, 'zoneAbbr'); + addFormatToken('zz', 0, 0, 'zoneName'); + + // MOMENTS + + function getZoneAbbr() { + return this._isUTC ? 'UTC' : ''; + } + + function getZoneName() { + return this._isUTC ? 'Coordinated Universal Time' : ''; + } + + var proto = Moment.prototype; + + proto.add = add; + proto.calendar = calendar$1; + proto.clone = clone; + proto.diff = diff; + proto.endOf = endOf; + proto.format = format; + proto.from = from; + proto.fromNow = fromNow; + proto.to = to; + proto.toNow = toNow; + proto.get = stringGet; + proto.invalidAt = invalidAt; + proto.isAfter = isAfter; + proto.isBefore = isBefore; + proto.isBetween = isBetween; + proto.isSame = isSame; + proto.isSameOrAfter = isSameOrAfter; + proto.isSameOrBefore = isSameOrBefore; + proto.isValid = isValid$2; + proto.lang = lang; + proto.locale = locale; + proto.localeData = localeData; + proto.max = prototypeMax; + proto.min = prototypeMin; + proto.parsingFlags = parsingFlags; + proto.set = stringSet; + proto.startOf = startOf; + proto.subtract = subtract; + proto.toArray = toArray; + proto.toObject = toObject; + proto.toDate = toDate; + proto.toISOString = toISOString; + proto.inspect = inspect; + if (typeof Symbol !== 'undefined' && Symbol.for != null) { + proto[Symbol.for('nodejs.util.inspect.custom')] = function () { + return 'Moment<' + this.format() + '>'; + }; + } + proto.toJSON = toJSON; + proto.toString = toString; + proto.unix = unix; + proto.valueOf = valueOf; + proto.creationData = creationData; + proto.eraName = getEraName; + proto.eraNarrow = getEraNarrow; + proto.eraAbbr = getEraAbbr; + proto.eraYear = getEraYear; + proto.year = getSetYear; + proto.isLeapYear = getIsLeapYear; + proto.weekYear = getSetWeekYear; + proto.isoWeekYear = getSetISOWeekYear; + proto.quarter = proto.quarters = getSetQuarter; + proto.month = getSetMonth; + proto.daysInMonth = getDaysInMonth; + proto.week = proto.weeks = getSetWeek; + proto.isoWeek = proto.isoWeeks = getSetISOWeek; + proto.weeksInYear = getWeeksInYear; + proto.weeksInWeekYear = getWeeksInWeekYear; + proto.isoWeeksInYear = getISOWeeksInYear; + proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear; + proto.date = getSetDayOfMonth; + proto.day = proto.days = getSetDayOfWeek; + proto.weekday = getSetLocaleDayOfWeek; + proto.isoWeekday = getSetISODayOfWeek; + proto.dayOfYear = getSetDayOfYear; + proto.hour = proto.hours = getSetHour; + proto.minute = proto.minutes = getSetMinute; + proto.second = proto.seconds = getSetSecond; + proto.millisecond = proto.milliseconds = getSetMillisecond; + proto.utcOffset = getSetOffset; + proto.utc = setOffsetToUTC; + proto.local = setOffsetToLocal; + proto.parseZone = setOffsetToParsedOffset; + proto.hasAlignedHourOffset = hasAlignedHourOffset; + proto.isDST = isDaylightSavingTime; + proto.isLocal = isLocal; + proto.isUtcOffset = isUtcOffset; + proto.isUtc = isUtc; + proto.isUTC = isUtc; + proto.zoneAbbr = getZoneAbbr; + proto.zoneName = getZoneName; + proto.dates = deprecate( + 'dates accessor is deprecated. Use date instead.', + getSetDayOfMonth + ); + proto.months = deprecate( + 'months accessor is deprecated. Use month instead', + getSetMonth + ); + proto.years = deprecate( + 'years accessor is deprecated. Use year instead', + getSetYear + ); + proto.zone = deprecate( + 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', + getSetZone + ); + proto.isDSTShifted = deprecate( + 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', + isDaylightSavingTimeShifted + ); + + function createUnix(input) { + return createLocal(input * 1000); + } + + function createInZone() { + return createLocal.apply(null, arguments).parseZone(); + } + + function preParsePostFormat(string) { + return string; + } + + var proto$1 = Locale.prototype; + + proto$1.calendar = calendar; + proto$1.longDateFormat = longDateFormat; + proto$1.invalidDate = invalidDate; + proto$1.ordinal = ordinal; + proto$1.preparse = preParsePostFormat; + proto$1.postformat = preParsePostFormat; + proto$1.relativeTime = relativeTime; + proto$1.pastFuture = pastFuture; + proto$1.set = set; + proto$1.eras = localeEras; + proto$1.erasParse = localeErasParse; + proto$1.erasConvertYear = localeErasConvertYear; + proto$1.erasAbbrRegex = erasAbbrRegex; + proto$1.erasNameRegex = erasNameRegex; + proto$1.erasNarrowRegex = erasNarrowRegex; + + proto$1.months = localeMonths; + proto$1.monthsShort = localeMonthsShort; + proto$1.monthsParse = localeMonthsParse; + proto$1.monthsRegex = monthsRegex; + proto$1.monthsShortRegex = monthsShortRegex; + proto$1.week = localeWeek; + proto$1.firstDayOfYear = localeFirstDayOfYear; + proto$1.firstDayOfWeek = localeFirstDayOfWeek; + + proto$1.weekdays = localeWeekdays; + proto$1.weekdaysMin = localeWeekdaysMin; + proto$1.weekdaysShort = localeWeekdaysShort; + proto$1.weekdaysParse = localeWeekdaysParse; + + proto$1.weekdaysRegex = weekdaysRegex; + proto$1.weekdaysShortRegex = weekdaysShortRegex; + proto$1.weekdaysMinRegex = weekdaysMinRegex; + + proto$1.isPM = localeIsPM; + proto$1.meridiem = localeMeridiem; + + function get$1(format, index, field, setter) { + var locale = getLocale(), + utc = createUTC().set(setter, index); + return locale[field](utc, format); + } + + function listMonthsImpl(format, index, field) { + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + + if (index != null) { + return get$1(format, index, field, 'month'); + } + + var i, + out = []; + for (i = 0; i < 12; i++) { + out[i] = get$1(format, i, field, 'month'); + } + return out; + } + + // () + // (5) + // (fmt, 5) + // (fmt) + // (true) + // (true, 5) + // (true, fmt, 5) + // (true, fmt) + function listWeekdaysImpl(localeSorted, format, index, field) { + if (typeof localeSorted === 'boolean') { + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + } else { + format = localeSorted; + index = format; + localeSorted = false; + + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + } + + var locale = getLocale(), + shift = localeSorted ? locale._week.dow : 0, + i, + out = []; + + if (index != null) { + return get$1(format, (index + shift) % 7, field, 'day'); + } + + for (i = 0; i < 7; i++) { + out[i] = get$1(format, (i + shift) % 7, field, 'day'); + } + return out; + } + + function listMonths(format, index) { + return listMonthsImpl(format, index, 'months'); + } + + function listMonthsShort(format, index) { + return listMonthsImpl(format, index, 'monthsShort'); + } + + function listWeekdays(localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdays'); + } + + function listWeekdaysShort(localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort'); + } + + function listWeekdaysMin(localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin'); + } + + getSetGlobalLocale('en', { + eras: [ + { + since: '0001-01-01', + until: +Infinity, + offset: 1, + name: 'Anno Domini', + narrow: 'AD', + abbr: 'AD', + }, + { + since: '0000-12-31', + until: -Infinity, + offset: 1, + name: 'Before Christ', + narrow: 'BC', + abbr: 'BC', + }, + ], + dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, + ordinal: function (number) { + var b = number % 10, + output = + toInt((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + }); + + // Side effect imports + + hooks.lang = deprecate( + 'moment.lang is deprecated. Use moment.locale instead.', + getSetGlobalLocale + ); + hooks.langData = deprecate( + 'moment.langData is deprecated. Use moment.localeData instead.', + getLocale + ); + + var mathAbs = Math.abs; + + function abs() { + var data = this._data; + + this._milliseconds = mathAbs(this._milliseconds); + this._days = mathAbs(this._days); + this._months = mathAbs(this._months); + + data.milliseconds = mathAbs(data.milliseconds); + data.seconds = mathAbs(data.seconds); + data.minutes = mathAbs(data.minutes); + data.hours = mathAbs(data.hours); + data.months = mathAbs(data.months); + data.years = mathAbs(data.years); + + return this; + } + + function addSubtract$1(duration, input, value, direction) { + var other = createDuration(input, value); + + duration._milliseconds += direction * other._milliseconds; + duration._days += direction * other._days; + duration._months += direction * other._months; + + return duration._bubble(); + } + + // supports only 2.0-style add(1, 's') or add(duration) + function add$1(input, value) { + return addSubtract$1(this, input, value, 1); + } + + // supports only 2.0-style subtract(1, 's') or subtract(duration) + function subtract$1(input, value) { + return addSubtract$1(this, input, value, -1); + } + + function absCeil(number) { + if (number < 0) { + return Math.floor(number); + } else { + return Math.ceil(number); + } + } + + function bubble() { + var milliseconds = this._milliseconds, + days = this._days, + months = this._months, + data = this._data, + seconds, + minutes, + hours, + years, + monthsFromDays; + + // if we have a mix of positive and negative values, bubble down first + // check: https://github.com/moment/moment/issues/2166 + if ( + !( + (milliseconds >= 0 && days >= 0 && months >= 0) || + (milliseconds <= 0 && days <= 0 && months <= 0) + ) + ) { + milliseconds += absCeil(monthsToDays(months) + days) * 864e5; + days = 0; + months = 0; + } + + // The following code bubbles up values, see the tests for + // examples of what that means. + data.milliseconds = milliseconds % 1000; + + seconds = absFloor(milliseconds / 1000); + data.seconds = seconds % 60; + + minutes = absFloor(seconds / 60); + data.minutes = minutes % 60; + + hours = absFloor(minutes / 60); + data.hours = hours % 24; + + days += absFloor(hours / 24); + + // convert days to months + monthsFromDays = absFloor(daysToMonths(days)); + months += monthsFromDays; + days -= absCeil(monthsToDays(monthsFromDays)); + + // 12 months -> 1 year + years = absFloor(months / 12); + months %= 12; + + data.days = days; + data.months = months; + data.years = years; + + return this; + } + + function daysToMonths(days) { + // 400 years have 146097 days (taking into account leap year rules) + // 400 years have 12 months === 4800 + return (days * 4800) / 146097; + } + + function monthsToDays(months) { + // the reverse of daysToMonths + return (months * 146097) / 4800; + } + + function as(units) { + if (!this.isValid()) { + return NaN; + } + var days, + months, + milliseconds = this._milliseconds; + + units = normalizeUnits(units); + + if (units === 'month' || units === 'quarter' || units === 'year') { + days = this._days + milliseconds / 864e5; + months = this._months + daysToMonths(days); + switch (units) { + case 'month': + return months; + case 'quarter': + return months / 3; + case 'year': + return months / 12; + } + } else { + // handle milliseconds separately because of floating point math errors (issue #1867) + days = this._days + Math.round(monthsToDays(this._months)); + switch (units) { + case 'week': + return days / 7 + milliseconds / 6048e5; + case 'day': + return days + milliseconds / 864e5; + case 'hour': + return days * 24 + milliseconds / 36e5; + case 'minute': + return days * 1440 + milliseconds / 6e4; + case 'second': + return days * 86400 + milliseconds / 1000; + // Math.floor prevents floating point math errors here + case 'millisecond': + return Math.floor(days * 864e5) + milliseconds; + default: + throw new Error('Unknown unit ' + units); + } + } + } + + // TODO: Use this.as('ms')? + function valueOf$1() { + if (!this.isValid()) { + return NaN; + } + return ( + this._milliseconds + + this._days * 864e5 + + (this._months % 12) * 2592e6 + + toInt(this._months / 12) * 31536e6 + ); + } + + function makeAs(alias) { + return function () { + return this.as(alias); + }; + } + + var asMilliseconds = makeAs('ms'), + asSeconds = makeAs('s'), + asMinutes = makeAs('m'), + asHours = makeAs('h'), + asDays = makeAs('d'), + asWeeks = makeAs('w'), + asMonths = makeAs('M'), + asQuarters = makeAs('Q'), + asYears = makeAs('y'); + + function clone$1() { + return createDuration(this); + } + + function get$2(units) { + units = normalizeUnits(units); + return this.isValid() ? this[units + 's']() : NaN; + } + + function makeGetter(name) { + return function () { + return this.isValid() ? this._data[name] : NaN; + }; + } + + var milliseconds = makeGetter('milliseconds'), + seconds = makeGetter('seconds'), + minutes = makeGetter('minutes'), + hours = makeGetter('hours'), + days = makeGetter('days'), + months = makeGetter('months'), + years = makeGetter('years'); + + function weeks() { + return absFloor(this.days() / 7); + } + + var round = Math.round, + thresholds = { + ss: 44, // a few seconds to seconds + s: 45, // seconds to minute + m: 45, // minutes to hour + h: 22, // hours to day + d: 26, // days to month/week + w: null, // weeks to month + M: 11, // months to year + }; + + // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize + function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { + return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); + } + + function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) { + var duration = createDuration(posNegDuration).abs(), + seconds = round(duration.as('s')), + minutes = round(duration.as('m')), + hours = round(duration.as('h')), + days = round(duration.as('d')), + months = round(duration.as('M')), + weeks = round(duration.as('w')), + years = round(duration.as('y')), + a = + (seconds <= thresholds.ss && ['s', seconds]) || + (seconds < thresholds.s && ['ss', seconds]) || + (minutes <= 1 && ['m']) || + (minutes < thresholds.m && ['mm', minutes]) || + (hours <= 1 && ['h']) || + (hours < thresholds.h && ['hh', hours]) || + (days <= 1 && ['d']) || + (days < thresholds.d && ['dd', days]); + + if (thresholds.w != null) { + a = + a || + (weeks <= 1 && ['w']) || + (weeks < thresholds.w && ['ww', weeks]); + } + a = a || + (months <= 1 && ['M']) || + (months < thresholds.M && ['MM', months]) || + (years <= 1 && ['y']) || ['yy', years]; + + a[2] = withoutSuffix; + a[3] = +posNegDuration > 0; + a[4] = locale; + return substituteTimeAgo.apply(null, a); + } + + // This function allows you to set the rounding function for relative time strings + function getSetRelativeTimeRounding(roundingFunction) { + if (roundingFunction === undefined) { + return round; + } + if (typeof roundingFunction === 'function') { + round = roundingFunction; + return true; + } + return false; + } + + // This function allows you to set a threshold for relative time strings + function getSetRelativeTimeThreshold(threshold, limit) { + if (thresholds[threshold] === undefined) { + return false; + } + if (limit === undefined) { + return thresholds[threshold]; + } + thresholds[threshold] = limit; + if (threshold === 's') { + thresholds.ss = limit - 1; + } + return true; + } + + function humanize(argWithSuffix, argThresholds) { + if (!this.isValid()) { + return this.localeData().invalidDate(); + } + + var withSuffix = false, + th = thresholds, + locale, + output; + + if (typeof argWithSuffix === 'object') { + argThresholds = argWithSuffix; + argWithSuffix = false; + } + if (typeof argWithSuffix === 'boolean') { + withSuffix = argWithSuffix; + } + if (typeof argThresholds === 'object') { + th = Object.assign({}, thresholds, argThresholds); + if (argThresholds.s != null && argThresholds.ss == null) { + th.ss = argThresholds.s - 1; + } + } + + locale = this.localeData(); + output = relativeTime$1(this, !withSuffix, th, locale); + + if (withSuffix) { + output = locale.pastFuture(+this, output); + } + + return locale.postformat(output); + } + + var abs$1 = Math.abs; + + function sign(x) { + return (x > 0) - (x < 0) || +x; + } + + function toISOString$1() { + // for ISO strings we do not use the normal bubbling rules: + // * milliseconds bubble up until they become hours + // * days do not bubble at all + // * months bubble up until they become years + // This is because there is no context-free conversion between hours and days + // (think of clock changes) + // and also not between days and months (28-31 days per month) + if (!this.isValid()) { + return this.localeData().invalidDate(); + } + + var seconds = abs$1(this._milliseconds) / 1000, + days = abs$1(this._days), + months = abs$1(this._months), + minutes, + hours, + years, + s, + total = this.asSeconds(), + totalSign, + ymSign, + daysSign, + hmsSign; + + if (!total) { + // this is the same as C#'s (Noda) and python (isodate)... + // but not other JS (goog.date) + return 'P0D'; + } + + // 3600 seconds -> 60 minutes -> 1 hour + minutes = absFloor(seconds / 60); + hours = absFloor(minutes / 60); + seconds %= 60; + minutes %= 60; + + // 12 months -> 1 year + years = absFloor(months / 12); + months %= 12; + + // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js + s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : ''; + + totalSign = total < 0 ? '-' : ''; + ymSign = sign(this._months) !== sign(total) ? '-' : ''; + daysSign = sign(this._days) !== sign(total) ? '-' : ''; + hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : ''; + + return ( + totalSign + + 'P' + + (years ? ymSign + years + 'Y' : '') + + (months ? ymSign + months + 'M' : '') + + (days ? daysSign + days + 'D' : '') + + (hours || minutes || seconds ? 'T' : '') + + (hours ? hmsSign + hours + 'H' : '') + + (minutes ? hmsSign + minutes + 'M' : '') + + (seconds ? hmsSign + s + 'S' : '') + ); + } + + var proto$2 = Duration.prototype; + + proto$2.isValid = isValid$1; + proto$2.abs = abs; + proto$2.add = add$1; + proto$2.subtract = subtract$1; + proto$2.as = as; + proto$2.asMilliseconds = asMilliseconds; + proto$2.asSeconds = asSeconds; + proto$2.asMinutes = asMinutes; + proto$2.asHours = asHours; + proto$2.asDays = asDays; + proto$2.asWeeks = asWeeks; + proto$2.asMonths = asMonths; + proto$2.asQuarters = asQuarters; + proto$2.asYears = asYears; + proto$2.valueOf = valueOf$1; + proto$2._bubble = bubble; + proto$2.clone = clone$1; + proto$2.get = get$2; + proto$2.milliseconds = milliseconds; + proto$2.seconds = seconds; + proto$2.minutes = minutes; + proto$2.hours = hours; + proto$2.days = days; + proto$2.weeks = weeks; + proto$2.months = months; + proto$2.years = years; + proto$2.humanize = humanize; + proto$2.toISOString = toISOString$1; + proto$2.toString = toISOString$1; + proto$2.toJSON = toISOString$1; + proto$2.locale = locale; + proto$2.localeData = localeData; + + proto$2.toIsoString = deprecate( + 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', + toISOString$1 + ); + proto$2.lang = lang; + + // FORMATTING + + addFormatToken('X', 0, 0, 'unix'); + addFormatToken('x', 0, 0, 'valueOf'); + + // PARSING + + addRegexToken('x', matchSigned); + addRegexToken('X', matchTimestamp); + addParseToken('X', function (input, array, config) { + config._d = new Date(parseFloat(input) * 1000); + }); + addParseToken('x', function (input, array, config) { + config._d = new Date(toInt(input)); + }); + + //! moment.js + + hooks.version = '2.28.0'; + + setHookCallback(createLocal); + + hooks.fn = proto; + hooks.min = min; + hooks.max = max; + hooks.now = now; + hooks.utc = createUTC; + hooks.unix = createUnix; + hooks.months = listMonths; + hooks.isDate = isDate; + hooks.locale = getSetGlobalLocale; + hooks.invalid = createInvalid; + hooks.duration = createDuration; + hooks.isMoment = isMoment; + hooks.weekdays = listWeekdays; + hooks.parseZone = createInZone; + hooks.localeData = getLocale; + hooks.isDuration = isDuration; + hooks.monthsShort = listMonthsShort; + hooks.weekdaysMin = listWeekdaysMin; + hooks.defineLocale = defineLocale; + hooks.updateLocale = updateLocale; + hooks.locales = listLocales; + hooks.weekdaysShort = listWeekdaysShort; + hooks.normalizeUnits = normalizeUnits; + hooks.relativeTimeRounding = getSetRelativeTimeRounding; + hooks.relativeTimeThreshold = getSetRelativeTimeThreshold; + hooks.calendarFormat = getCalendarFormat; + hooks.prototype = proto; + + // currently HTML5 input type only supports 24-hour formats + hooks.HTML5_FMT = { + DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // + DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // + DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // + DATE: 'YYYY-MM-DD', // + TIME: 'HH:mm', // + TIME_SECONDS: 'HH:mm:ss', // + TIME_MS: 'HH:mm:ss.SSS', // + WEEK: 'GGGG-[W]WW', // + MONTH: 'YYYY-MM', // + }; + + //! moment.js locale configuration + + hooks.defineLocale('af', { + months: 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'), + weekdays: 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split( + '_' + ), + weekdaysShort: 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'), + weekdaysMin: 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'), + meridiemParse: /vm|nm/i, + isPM: function (input) { + return /^nm$/i.test(input); + }, + meridiem: function (hours, minutes, isLower) { + if (hours < 12) { + return isLower ? 'vm' : 'VM'; + } else { + return isLower ? 'nm' : 'NM'; + } + }, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Vandag om] LT', + nextDay: '[Môre om] LT', + nextWeek: 'dddd [om] LT', + lastDay: '[Gister om] LT', + lastWeek: '[Laas] dddd [om] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'oor %s', + past: '%s gelede', + s: "'n paar sekondes", + ss: '%d sekondes', + m: "'n minuut", + mm: '%d minute', + h: "'n uur", + hh: '%d ure', + d: "'n dag", + dd: '%d dae', + M: "'n maand", + MM: '%d maande', + y: "'n jaar", + yy: '%d jaar', + }, + dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, + ordinal: function (number) { + return ( + number + + (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de') + ); // Thanks to Joris Röling : https://github.com/jjupiter + }, + week: { + dow: 1, // Maandag is die eerste dag van die week. + doy: 4, // Die week wat die 4de Januarie bevat is die eerste week van die jaar. + }, + }); + + //! moment.js locale configuration + + var pluralForm = function (n) { + return n === 0 + ? 0 + : n === 1 + ? 1 + : n === 2 + ? 2 + : n % 100 >= 3 && n % 100 <= 10 + ? 3 + : n % 100 >= 11 + ? 4 + : 5; + }, + plurals = { + s: [ + 'أقل من ثانية', + 'ثانية واحدة', + ['ثانيتان', 'ثانيتين'], + '%d ثوان', + '%d ثانية', + '%d ثانية', + ], + m: [ + 'أقل من دقيقة', + 'دقيقة واحدة', + ['دقيقتان', 'دقيقتين'], + '%d دقائق', + '%d دقيقة', + '%d دقيقة', + ], + h: [ + 'أقل من ساعة', + 'ساعة واحدة', + ['ساعتان', 'ساعتين'], + '%d ساعات', + '%d ساعة', + '%d ساعة', + ], + d: [ + 'أقل من يوم', + 'يوم واحد', + ['يومان', 'يومين'], + '%d أيام', + '%d يومًا', + '%d يوم', + ], + M: [ + 'أقل من شهر', + 'شهر واحد', + ['شهران', 'شهرين'], + '%d أشهر', + '%d شهرا', + '%d شهر', + ], + y: [ + 'أقل من عام', + 'عام واحد', + ['عامان', 'عامين'], + '%d أعوام', + '%d عامًا', + '%d عام', + ], + }, + pluralize = function (u) { + return function (number, withoutSuffix, string, isFuture) { + var f = pluralForm(number), + str = plurals[u][pluralForm(number)]; + if (f === 2) { + str = str[withoutSuffix ? 0 : 1]; + } + return str.replace(/%d/i, number); + }; + }, + months$1 = [ + 'جانفي', + 'فيفري', + 'مارس', + 'أفريل', + 'ماي', + 'جوان', + 'جويلية', + 'أوت', + 'سبتمبر', + 'أكتوبر', + 'نوفمبر', + 'ديسمبر', + ]; + + hooks.defineLocale('ar-dz', { + months: months$1, + monthsShort: months$1, + weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'D/\u200FM/\u200FYYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + meridiemParse: /ص|م/, + isPM: function (input) { + return 'م' === input; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'ص'; + } else { + return 'م'; + } + }, + calendar: { + sameDay: '[اليوم عند الساعة] LT', + nextDay: '[غدًا عند الساعة] LT', + nextWeek: 'dddd [عند الساعة] LT', + lastDay: '[أمس عند الساعة] LT', + lastWeek: 'dddd [عند الساعة] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'بعد %s', + past: 'منذ %s', + s: pluralize('s'), + ss: pluralize('s'), + m: pluralize('m'), + mm: pluralize('m'), + h: pluralize('h'), + hh: pluralize('h'), + d: pluralize('d'), + dd: pluralize('d'), + M: pluralize('M'), + MM: pluralize('M'), + y: pluralize('y'), + yy: pluralize('y'), + }, + postformat: function (string) { + return string.replace(/,/g, '،'); + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('ar-kw', { + months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split( + '_' + ), + monthsShort: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split( + '_' + ), + weekdays: 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort: 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[اليوم على الساعة] LT', + nextDay: '[غدا على الساعة] LT', + nextWeek: 'dddd [على الساعة] LT', + lastDay: '[أمس على الساعة] LT', + lastWeek: 'dddd [على الساعة] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'في %s', + past: 'منذ %s', + s: 'ثوان', + ss: '%d ثانية', + m: 'دقيقة', + mm: '%d دقائق', + h: 'ساعة', + hh: '%d ساعات', + d: 'يوم', + dd: '%d أيام', + M: 'شهر', + MM: '%d أشهر', + y: 'سنة', + yy: '%d سنوات', + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 12, // The week that contains Jan 12th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '0': '0', + }, + pluralForm$1 = function (n) { + return n === 0 + ? 0 + : n === 1 + ? 1 + : n === 2 + ? 2 + : n % 100 >= 3 && n % 100 <= 10 + ? 3 + : n % 100 >= 11 + ? 4 + : 5; + }, + plurals$1 = { + s: [ + 'أقل من ثانية', + 'ثانية واحدة', + ['ثانيتان', 'ثانيتين'], + '%d ثوان', + '%d ثانية', + '%d ثانية', + ], + m: [ + 'أقل من دقيقة', + 'دقيقة واحدة', + ['دقيقتان', 'دقيقتين'], + '%d دقائق', + '%d دقيقة', + '%d دقيقة', + ], + h: [ + 'أقل من ساعة', + 'ساعة واحدة', + ['ساعتان', 'ساعتين'], + '%d ساعات', + '%d ساعة', + '%d ساعة', + ], + d: [ + 'أقل من يوم', + 'يوم واحد', + ['يومان', 'يومين'], + '%d أيام', + '%d يومًا', + '%d يوم', + ], + M: [ + 'أقل من شهر', + 'شهر واحد', + ['شهران', 'شهرين'], + '%d أشهر', + '%d شهرا', + '%d شهر', + ], + y: [ + 'أقل من عام', + 'عام واحد', + ['عامان', 'عامين'], + '%d أعوام', + '%d عامًا', + '%d عام', + ], + }, + pluralize$1 = function (u) { + return function (number, withoutSuffix, string, isFuture) { + var f = pluralForm$1(number), + str = plurals$1[u][pluralForm$1(number)]; + if (f === 2) { + str = str[withoutSuffix ? 0 : 1]; + } + return str.replace(/%d/i, number); + }; + }, + months$2 = [ + 'يناير', + 'فبراير', + 'مارس', + 'أبريل', + 'مايو', + 'يونيو', + 'يوليو', + 'أغسطس', + 'سبتمبر', + 'أكتوبر', + 'نوفمبر', + 'ديسمبر', + ]; + + hooks.defineLocale('ar-ly', { + months: months$2, + monthsShort: months$2, + weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'D/\u200FM/\u200FYYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + meridiemParse: /ص|م/, + isPM: function (input) { + return 'م' === input; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'ص'; + } else { + return 'م'; + } + }, + calendar: { + sameDay: '[اليوم عند الساعة] LT', + nextDay: '[غدًا عند الساعة] LT', + nextWeek: 'dddd [عند الساعة] LT', + lastDay: '[أمس عند الساعة] LT', + lastWeek: 'dddd [عند الساعة] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'بعد %s', + past: 'منذ %s', + s: pluralize$1('s'), + ss: pluralize$1('s'), + m: pluralize$1('m'), + mm: pluralize$1('m'), + h: pluralize$1('h'), + hh: pluralize$1('h'), + d: pluralize$1('d'), + dd: pluralize$1('d'), + M: pluralize$1('M'), + MM: pluralize$1('M'), + y: pluralize$1('y'), + yy: pluralize$1('y'), + }, + preparse: function (string) { + return string.replace(/،/g, ','); + }, + postformat: function (string) { + return string + .replace(/\d/g, function (match) { + return symbolMap[match]; + }) + .replace(/,/g, '،'); + }, + week: { + dow: 6, // Saturday is the first day of the week. + doy: 12, // The week that contains Jan 12th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('ar-ma', { + months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split( + '_' + ), + monthsShort: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split( + '_' + ), + weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort: 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[اليوم على الساعة] LT', + nextDay: '[غدا على الساعة] LT', + nextWeek: 'dddd [على الساعة] LT', + lastDay: '[أمس على الساعة] LT', + lastWeek: 'dddd [على الساعة] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'في %s', + past: 'منذ %s', + s: 'ثوان', + ss: '%d ثانية', + m: 'دقيقة', + mm: '%d دقائق', + h: 'ساعة', + hh: '%d ساعات', + d: 'يوم', + dd: '%d أيام', + M: 'شهر', + MM: '%d أشهر', + y: 'سنة', + yy: '%d سنوات', + }, + week: { + dow: 6, // Saturday is the first day of the week. + doy: 12, // The week that contains Jan 12th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap$1 = { + '1': '١', + '2': '٢', + '3': '٣', + '4': '٤', + '5': '٥', + '6': '٦', + '7': '٧', + '8': '٨', + '9': '٩', + '0': '٠', + }, + numberMap = { + '١': '1', + '٢': '2', + '٣': '3', + '٤': '4', + '٥': '5', + '٦': '6', + '٧': '7', + '٨': '8', + '٩': '9', + '٠': '0', + }; + + hooks.defineLocale('ar-sa', { + months: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split( + '_' + ), + monthsShort: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split( + '_' + ), + weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + meridiemParse: /ص|م/, + isPM: function (input) { + return 'م' === input; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'ص'; + } else { + return 'م'; + } + }, + calendar: { + sameDay: '[اليوم على الساعة] LT', + nextDay: '[غدا على الساعة] LT', + nextWeek: 'dddd [على الساعة] LT', + lastDay: '[أمس على الساعة] LT', + lastWeek: 'dddd [على الساعة] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'في %s', + past: 'منذ %s', + s: 'ثوان', + ss: '%d ثانية', + m: 'دقيقة', + mm: '%d دقائق', + h: 'ساعة', + hh: '%d ساعات', + d: 'يوم', + dd: '%d أيام', + M: 'شهر', + MM: '%d أشهر', + y: 'سنة', + yy: '%d سنوات', + }, + preparse: function (string) { + return string + .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { + return numberMap[match]; + }) + .replace(/،/g, ','); + }, + postformat: function (string) { + return string + .replace(/\d/g, function (match) { + return symbolMap$1[match]; + }) + .replace(/,/g, '،'); + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('ar-tn', { + months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split( + '_' + ), + monthsShort: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split( + '_' + ), + weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[اليوم على الساعة] LT', + nextDay: '[غدا على الساعة] LT', + nextWeek: 'dddd [على الساعة] LT', + lastDay: '[أمس على الساعة] LT', + lastWeek: 'dddd [على الساعة] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'في %s', + past: 'منذ %s', + s: 'ثوان', + ss: '%d ثانية', + m: 'دقيقة', + mm: '%d دقائق', + h: 'ساعة', + hh: '%d ساعات', + d: 'يوم', + dd: '%d أيام', + M: 'شهر', + MM: '%d أشهر', + y: 'سنة', + yy: '%d سنوات', + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap$2 = { + '1': '١', + '2': '٢', + '3': '٣', + '4': '٤', + '5': '٥', + '6': '٦', + '7': '٧', + '8': '٨', + '9': '٩', + '0': '٠', + }, + numberMap$1 = { + '١': '1', + '٢': '2', + '٣': '3', + '٤': '4', + '٥': '5', + '٦': '6', + '٧': '7', + '٨': '8', + '٩': '9', + '٠': '0', + }, + pluralForm$2 = function (n) { + return n === 0 + ? 0 + : n === 1 + ? 1 + : n === 2 + ? 2 + : n % 100 >= 3 && n % 100 <= 10 + ? 3 + : n % 100 >= 11 + ? 4 + : 5; + }, + plurals$2 = { + s: [ + 'أقل من ثانية', + 'ثانية واحدة', + ['ثانيتان', 'ثانيتين'], + '%d ثوان', + '%d ثانية', + '%d ثانية', + ], + m: [ + 'أقل من دقيقة', + 'دقيقة واحدة', + ['دقيقتان', 'دقيقتين'], + '%d دقائق', + '%d دقيقة', + '%d دقيقة', + ], + h: [ + 'أقل من ساعة', + 'ساعة واحدة', + ['ساعتان', 'ساعتين'], + '%d ساعات', + '%d ساعة', + '%d ساعة', + ], + d: [ + 'أقل من يوم', + 'يوم واحد', + ['يومان', 'يومين'], + '%d أيام', + '%d يومًا', + '%d يوم', + ], + M: [ + 'أقل من شهر', + 'شهر واحد', + ['شهران', 'شهرين'], + '%d أشهر', + '%d شهرا', + '%d شهر', + ], + y: [ + 'أقل من عام', + 'عام واحد', + ['عامان', 'عامين'], + '%d أعوام', + '%d عامًا', + '%d عام', + ], + }, + pluralize$2 = function (u) { + return function (number, withoutSuffix, string, isFuture) { + var f = pluralForm$2(number), + str = plurals$2[u][pluralForm$2(number)]; + if (f === 2) { + str = str[withoutSuffix ? 0 : 1]; + } + return str.replace(/%d/i, number); + }; + }, + months$3 = [ + 'يناير', + 'فبراير', + 'مارس', + 'أبريل', + 'مايو', + 'يونيو', + 'يوليو', + 'أغسطس', + 'سبتمبر', + 'أكتوبر', + 'نوفمبر', + 'ديسمبر', + ]; + + hooks.defineLocale('ar', { + months: months$3, + monthsShort: months$3, + weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'D/\u200FM/\u200FYYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + meridiemParse: /ص|م/, + isPM: function (input) { + return 'م' === input; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'ص'; + } else { + return 'م'; + } + }, + calendar: { + sameDay: '[اليوم عند الساعة] LT', + nextDay: '[غدًا عند الساعة] LT', + nextWeek: 'dddd [عند الساعة] LT', + lastDay: '[أمس عند الساعة] LT', + lastWeek: 'dddd [عند الساعة] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'بعد %s', + past: 'منذ %s', + s: pluralize$2('s'), + ss: pluralize$2('s'), + m: pluralize$2('m'), + mm: pluralize$2('m'), + h: pluralize$2('h'), + hh: pluralize$2('h'), + d: pluralize$2('d'), + dd: pluralize$2('d'), + M: pluralize$2('M'), + MM: pluralize$2('M'), + y: pluralize$2('y'), + yy: pluralize$2('y'), + }, + preparse: function (string) { + return string + .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { + return numberMap$1[match]; + }) + .replace(/،/g, ','); + }, + postformat: function (string) { + return string + .replace(/\d/g, function (match) { + return symbolMap$2[match]; + }) + .replace(/,/g, '،'); + }, + week: { + dow: 6, // Saturday is the first day of the week. + doy: 12, // The week that contains Jan 12th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var suffixes = { + 1: '-inci', + 5: '-inci', + 8: '-inci', + 70: '-inci', + 80: '-inci', + 2: '-nci', + 7: '-nci', + 20: '-nci', + 50: '-nci', + 3: '-üncü', + 4: '-üncü', + 100: '-üncü', + 6: '-ncı', + 9: '-uncu', + 10: '-uncu', + 30: '-uncu', + 60: '-ıncı', + 90: '-ıncı', + }; + + hooks.defineLocale('az', { + months: 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split( + '_' + ), + monthsShort: 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'), + weekdays: 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split( + '_' + ), + weekdaysShort: 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'), + weekdaysMin: 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[bugün saat] LT', + nextDay: '[sabah saat] LT', + nextWeek: '[gələn həftə] dddd [saat] LT', + lastDay: '[dünən] LT', + lastWeek: '[keçən həftə] dddd [saat] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s sonra', + past: '%s əvvəl', + s: 'bir neçə saniyə', + ss: '%d saniyə', + m: 'bir dəqiqə', + mm: '%d dəqiqə', + h: 'bir saat', + hh: '%d saat', + d: 'bir gün', + dd: '%d gün', + M: 'bir ay', + MM: '%d ay', + y: 'bir il', + yy: '%d il', + }, + meridiemParse: /gecə|səhər|gündüz|axşam/, + isPM: function (input) { + return /^(gündüz|axşam)$/.test(input); + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'gecə'; + } else if (hour < 12) { + return 'səhər'; + } else if (hour < 17) { + return 'gündüz'; + } else { + return 'axşam'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/, + ordinal: function (number) { + if (number === 0) { + // special case for zero + return number + '-ıncı'; + } + var a = number % 10, + b = (number % 100) - a, + c = number >= 100 ? 100 : null; + return number + (suffixes[a] || suffixes[b] || suffixes[c]); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function plural(word, num) { + var forms = word.split('_'); + return num % 10 === 1 && num % 100 !== 11 + ? forms[0] + : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) + ? forms[1] + : forms[2]; + } + function relativeTimeWithPlural(number, withoutSuffix, key) { + var format = { + ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд', + mm: withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін', + hh: withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін', + dd: 'дзень_дні_дзён', + MM: 'месяц_месяцы_месяцаў', + yy: 'год_гады_гадоў', + }; + if (key === 'm') { + return withoutSuffix ? 'хвіліна' : 'хвіліну'; + } else if (key === 'h') { + return withoutSuffix ? 'гадзіна' : 'гадзіну'; + } else { + return number + ' ' + plural(format[key], +number); + } + } + + hooks.defineLocale('be', { + months: { + format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split( + '_' + ), + standalone: 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split( + '_' + ), + }, + monthsShort: 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split( + '_' + ), + weekdays: { + format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split( + '_' + ), + standalone: 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split( + '_' + ), + isFormat: /\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/, + }, + weekdaysShort: 'нд_пн_ат_ср_чц_пт_сб'.split('_'), + weekdaysMin: 'нд_пн_ат_ср_чц_пт_сб'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY г.', + LLL: 'D MMMM YYYY г., HH:mm', + LLLL: 'dddd, D MMMM YYYY г., HH:mm', + }, + calendar: { + sameDay: '[Сёння ў] LT', + nextDay: '[Заўтра ў] LT', + lastDay: '[Учора ў] LT', + nextWeek: function () { + return '[У] dddd [ў] LT'; + }, + lastWeek: function () { + switch (this.day()) { + case 0: + case 3: + case 5: + case 6: + return '[У мінулую] dddd [ў] LT'; + case 1: + case 2: + case 4: + return '[У мінулы] dddd [ў] LT'; + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'праз %s', + past: '%s таму', + s: 'некалькі секунд', + m: relativeTimeWithPlural, + mm: relativeTimeWithPlural, + h: relativeTimeWithPlural, + hh: relativeTimeWithPlural, + d: 'дзень', + dd: relativeTimeWithPlural, + M: 'месяц', + MM: relativeTimeWithPlural, + y: 'год', + yy: relativeTimeWithPlural, + }, + meridiemParse: /ночы|раніцы|дня|вечара/, + isPM: function (input) { + return /^(дня|вечара)$/.test(input); + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'ночы'; + } else if (hour < 12) { + return 'раніцы'; + } else if (hour < 17) { + return 'дня'; + } else { + return 'вечара'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}-(і|ы|га)/, + ordinal: function (number, period) { + switch (period) { + case 'M': + case 'd': + case 'DDD': + case 'w': + case 'W': + return (number % 10 === 2 || number % 10 === 3) && + number % 100 !== 12 && + number % 100 !== 13 + ? number + '-і' + : number + '-ы'; + case 'D': + return number + '-га'; + default: + return number; + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('bg', { + months: 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split( + '_' + ), + monthsShort: 'яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'), + weekdays: 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split( + '_' + ), + weekdaysShort: 'нед_пон_вто_сря_чет_пет_съб'.split('_'), + weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'), + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'D.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY H:mm', + LLLL: 'dddd, D MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[Днес в] LT', + nextDay: '[Утре в] LT', + nextWeek: 'dddd [в] LT', + lastDay: '[Вчера в] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + case 3: + case 6: + return '[Миналата] dddd [в] LT'; + case 1: + case 2: + case 4: + case 5: + return '[Миналия] dddd [в] LT'; + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'след %s', + past: 'преди %s', + s: 'няколко секунди', + ss: '%d секунди', + m: 'минута', + mm: '%d минути', + h: 'час', + hh: '%d часа', + d: 'ден', + dd: '%d дена', + M: 'месец', + MM: '%d месеца', + y: 'година', + yy: '%d години', + }, + dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/, + ordinal: function (number) { + var lastDigit = number % 10, + last2Digits = number % 100; + if (number === 0) { + return number + '-ев'; + } else if (last2Digits === 0) { + return number + '-ен'; + } else if (last2Digits > 10 && last2Digits < 20) { + return number + '-ти'; + } else if (lastDigit === 1) { + return number + '-ви'; + } else if (lastDigit === 2) { + return number + '-ри'; + } else if (lastDigit === 7 || lastDigit === 8) { + return number + '-ми'; + } else { + return number + '-ти'; + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('bm', { + months: 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo'.split( + '_' + ), + monthsShort: 'Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des'.split('_'), + weekdays: 'Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'), + weekdaysShort: 'Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib'.split('_'), + weekdaysMin: 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'MMMM [tile] D [san] YYYY', + LLL: 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm', + LLLL: 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm', + }, + calendar: { + sameDay: '[Bi lɛrɛ] LT', + nextDay: '[Sini lɛrɛ] LT', + nextWeek: 'dddd [don lɛrɛ] LT', + lastDay: '[Kunu lɛrɛ] LT', + lastWeek: 'dddd [tɛmɛnen lɛrɛ] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s kɔnɔ', + past: 'a bɛ %s bɔ', + s: 'sanga dama dama', + ss: 'sekondi %d', + m: 'miniti kelen', + mm: 'miniti %d', + h: 'lɛrɛ kelen', + hh: 'lɛrɛ %d', + d: 'tile kelen', + dd: 'tile %d', + M: 'kalo kelen', + MM: 'kalo %d', + y: 'san kelen', + yy: 'san %d', + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap$3 = { + '1': '১', + '2': '২', + '3': '৩', + '4': '৪', + '5': '৫', + '6': '৬', + '7': '৭', + '8': '৮', + '9': '৯', + '0': '০', + }, + numberMap$2 = { + '১': '1', + '২': '2', + '৩': '3', + '৪': '4', + '৫': '5', + '৬': '6', + '৭': '7', + '৮': '8', + '৯': '9', + '০': '0', + }; + + hooks.defineLocale('bn', { + months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split( + '_' + ), + monthsShort: 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split( + '_' + ), + weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split( + '_' + ), + weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'), + weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'), + longDateFormat: { + LT: 'A h:mm সময়', + LTS: 'A h:mm:ss সময়', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm সময়', + LLLL: 'dddd, D MMMM YYYY, A h:mm সময়', + }, + calendar: { + sameDay: '[আজ] LT', + nextDay: '[আগামীকাল] LT', + nextWeek: 'dddd, LT', + lastDay: '[গতকাল] LT', + lastWeek: '[গত] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s পরে', + past: '%s আগে', + s: 'কয়েক সেকেন্ড', + ss: '%d সেকেন্ড', + m: 'এক মিনিট', + mm: '%d মিনিট', + h: 'এক ঘন্টা', + hh: '%d ঘন্টা', + d: 'এক দিন', + dd: '%d দিন', + M: 'এক মাস', + MM: '%d মাস', + y: 'এক বছর', + yy: '%d বছর', + }, + preparse: function (string) { + return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) { + return numberMap$2[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$3[match]; + }); + }, + meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if ( + (meridiem === 'রাত' && hour >= 4) || + (meridiem === 'দুপুর' && hour < 5) || + meridiem === 'বিকাল' + ) { + return hour + 12; + } else { + return hour; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'রাত'; + } else if (hour < 10) { + return 'সকাল'; + } else if (hour < 17) { + return 'দুপুর'; + } else if (hour < 20) { + return 'বিকাল'; + } else { + return 'রাত'; + } + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap$4 = { + '1': '༡', + '2': '༢', + '3': '༣', + '4': '༤', + '5': '༥', + '6': '༦', + '7': '༧', + '8': '༨', + '9': '༩', + '0': '༠', + }, + numberMap$3 = { + '༡': '1', + '༢': '2', + '༣': '3', + '༤': '4', + '༥': '5', + '༦': '6', + '༧': '7', + '༨': '8', + '༩': '9', + '༠': '0', + }; + + hooks.defineLocale('bo', { + months: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split( + '_' + ), + monthsShort: 'ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12'.split( + '_' + ), + monthsShortRegex: /^(ཟླ་\d{1,2})/, + monthsParseExact: true, + weekdays: 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split( + '_' + ), + weekdaysShort: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split( + '_' + ), + weekdaysMin: 'ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན'.split('_'), + longDateFormat: { + LT: 'A h:mm', + LTS: 'A h:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm', + LLLL: 'dddd, D MMMM YYYY, A h:mm', + }, + calendar: { + sameDay: '[དི་རིང] LT', + nextDay: '[སང་ཉིན] LT', + nextWeek: '[བདུན་ཕྲག་རྗེས་མ], LT', + lastDay: '[ཁ་སང] LT', + lastWeek: '[བདུན་ཕྲག་མཐའ་མ] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s ལ་', + past: '%s སྔན་ལ', + s: 'ལམ་སང', + ss: '%d སྐར་ཆ།', + m: 'སྐར་མ་གཅིག', + mm: '%d སྐར་མ', + h: 'ཆུ་ཚོད་གཅིག', + hh: '%d ཆུ་ཚོད', + d: 'ཉིན་གཅིག', + dd: '%d ཉིན་', + M: 'ཟླ་བ་གཅིག', + MM: '%d ཟླ་བ', + y: 'ལོ་གཅིག', + yy: '%d ལོ', + }, + preparse: function (string) { + return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) { + return numberMap$3[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$4[match]; + }); + }, + meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if ( + (meridiem === 'མཚན་མོ' && hour >= 4) || + (meridiem === 'ཉིན་གུང' && hour < 5) || + meridiem === 'དགོང་དག' + ) { + return hour + 12; + } else { + return hour; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'མཚན་མོ'; + } else if (hour < 10) { + return 'ཞོགས་ཀས'; + } else if (hour < 17) { + return 'ཉིན་གུང'; + } else if (hour < 20) { + return 'དགོང་དག'; + } else { + return 'མཚན་མོ'; + } + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function relativeTimeWithMutation(number, withoutSuffix, key) { + var format = { + mm: 'munutenn', + MM: 'miz', + dd: 'devezh', + }; + return number + ' ' + mutation(format[key], number); + } + function specialMutationForYears(number) { + switch (lastNumber(number)) { + case 1: + case 3: + case 4: + case 5: + case 9: + return number + ' bloaz'; + default: + return number + ' vloaz'; + } + } + function lastNumber(number) { + if (number > 9) { + return lastNumber(number % 10); + } + return number; + } + function mutation(text, number) { + if (number === 2) { + return softMutation(text); + } + return text; + } + function softMutation(text) { + var mutationTable = { + m: 'v', + b: 'v', + d: 'z', + }; + if (mutationTable[text.charAt(0)] === undefined) { + return text; + } + return mutationTable[text.charAt(0)] + text.substring(1); + } + + var monthsParse = [ + /^gen/i, + /^c[ʼ\']hwe/i, + /^meu/i, + /^ebr/i, + /^mae/i, + /^(mez|eve)/i, + /^gou/i, + /^eos/i, + /^gwe/i, + /^her/i, + /^du/i, + /^ker/i, + ], + monthsRegex$1 = /^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i, + monthsStrictRegex = /^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i, + monthsShortStrictRegex = /^(gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i, + fullWeekdaysParse = [ + /^sul/i, + /^lun/i, + /^meurzh/i, + /^merc[ʼ\']her/i, + /^yaou/i, + /^gwener/i, + /^sadorn/i, + ], + shortWeekdaysParse = [ + /^Sul/i, + /^Lun/i, + /^Meu/i, + /^Mer/i, + /^Yao/i, + /^Gwe/i, + /^Sad/i, + ], + minWeekdaysParse = [ + /^Su/i, + /^Lu/i, + /^Me([^r]|$)/i, + /^Mer/i, + /^Ya/i, + /^Gw/i, + /^Sa/i, + ]; + + hooks.defineLocale('br', { + months: 'Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split( + '_' + ), + monthsShort: 'Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'), + weekdays: 'Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn'.split('_'), + weekdaysShort: 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'), + weekdaysMin: 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'), + weekdaysParse: minWeekdaysParse, + fullWeekdaysParse: fullWeekdaysParse, + shortWeekdaysParse: shortWeekdaysParse, + minWeekdaysParse: minWeekdaysParse, + + monthsRegex: monthsRegex$1, + monthsShortRegex: monthsRegex$1, + monthsStrictRegex: monthsStrictRegex, + monthsShortStrictRegex: monthsShortStrictRegex, + monthsParse: monthsParse, + longMonthsParse: monthsParse, + shortMonthsParse: monthsParse, + + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D [a viz] MMMM YYYY', + LLL: 'D [a viz] MMMM YYYY HH:mm', + LLLL: 'dddd, D [a viz] MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Hiziv da] LT', + nextDay: '[Warcʼhoazh da] LT', + nextWeek: 'dddd [da] LT', + lastDay: '[Decʼh da] LT', + lastWeek: 'dddd [paset da] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'a-benn %s', + past: '%s ʼzo', + s: 'un nebeud segondennoù', + ss: '%d eilenn', + m: 'ur vunutenn', + mm: relativeTimeWithMutation, + h: 'un eur', + hh: '%d eur', + d: 'un devezh', + dd: relativeTimeWithMutation, + M: 'ur miz', + MM: relativeTimeWithMutation, + y: 'ur bloaz', + yy: specialMutationForYears, + }, + dayOfMonthOrdinalParse: /\d{1,2}(añ|vet)/, + ordinal: function (number) { + var output = number === 1 ? 'añ' : 'vet'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + meridiemParse: /a.m.|g.m./, // goude merenn | a-raok merenn + isPM: function (token) { + return token === 'g.m.'; + }, + meridiem: function (hour, minute, isLower) { + return hour < 12 ? 'a.m.' : 'g.m.'; + }, + }); + + //! moment.js locale configuration + + function translate(number, withoutSuffix, key) { + var result = number + ' '; + switch (key) { + case 'ss': + if (number === 1) { + result += 'sekunda'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'sekunde'; + } else { + result += 'sekundi'; + } + return result; + case 'm': + return withoutSuffix ? 'jedna minuta' : 'jedne minute'; + case 'mm': + if (number === 1) { + result += 'minuta'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'minute'; + } else { + result += 'minuta'; + } + return result; + case 'h': + return withoutSuffix ? 'jedan sat' : 'jednog sata'; + case 'hh': + if (number === 1) { + result += 'sat'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'sata'; + } else { + result += 'sati'; + } + return result; + case 'dd': + if (number === 1) { + result += 'dan'; + } else { + result += 'dana'; + } + return result; + case 'MM': + if (number === 1) { + result += 'mjesec'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'mjeseca'; + } else { + result += 'mjeseci'; + } + return result; + case 'yy': + if (number === 1) { + result += 'godina'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'godine'; + } else { + result += 'godina'; + } + return result; + } + } + + hooks.defineLocale('bs', { + months: 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split( + '_' + ), + monthsShort: 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split( + '_' + ), + weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'), + weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[danas u] LT', + nextDay: '[sutra u] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[u] [nedjelju] [u] LT'; + case 3: + return '[u] [srijedu] [u] LT'; + case 6: + return '[u] [subotu] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[u] dddd [u] LT'; + } + }, + lastDay: '[jučer u] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + case 3: + return '[prošlu] dddd [u] LT'; + case 6: + return '[prošle] [subote] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[prošli] dddd [u] LT'; + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'za %s', + past: 'prije %s', + s: 'par sekundi', + ss: translate, + m: translate, + mm: translate, + h: translate, + hh: translate, + d: 'dan', + dd: translate, + M: 'mjesec', + MM: translate, + y: 'godinu', + yy: translate, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('ca', { + months: { + standalone: 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split( + '_' + ), + format: "de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split( + '_' + ), + isFormat: /D[oD]?(\s)+MMMM/, + }, + monthsShort: 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split( + '_' + ), + weekdaysShort: 'dg._dl._dt._dc._dj._dv._ds.'.split('_'), + weekdaysMin: 'dg_dl_dt_dc_dj_dv_ds'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM [de] YYYY', + ll: 'D MMM YYYY', + LLL: 'D MMMM [de] YYYY [a les] H:mm', + lll: 'D MMM YYYY, H:mm', + LLLL: 'dddd D MMMM [de] YYYY [a les] H:mm', + llll: 'ddd D MMM YYYY, H:mm', + }, + calendar: { + sameDay: function () { + return '[avui a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT'; + }, + nextDay: function () { + return '[demà a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT'; + }, + nextWeek: function () { + return 'dddd [a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT'; + }, + lastDay: function () { + return '[ahir a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT'; + }, + lastWeek: function () { + return ( + '[el] dddd [passat a ' + + (this.hours() !== 1 ? 'les' : 'la') + + '] LT' + ); + }, + sameElse: 'L', + }, + relativeTime: { + future: "d'aquí %s", + past: 'fa %s', + s: 'uns segons', + ss: '%d segons', + m: 'un minut', + mm: '%d minuts', + h: 'una hora', + hh: '%d hores', + d: 'un dia', + dd: '%d dies', + M: 'un mes', + MM: '%d mesos', + y: 'un any', + yy: '%d anys', + }, + dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/, + ordinal: function (number, period) { + var output = + number === 1 + ? 'r' + : number === 2 + ? 'n' + : number === 3 + ? 'r' + : number === 4 + ? 't' + : 'è'; + if (period === 'w' || period === 'W') { + output = 'a'; + } + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var months$4 = 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split( + '_' + ), + monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_'), + monthsParse$1 = [ + /^led/i, + /^úno/i, + /^bře/i, + /^dub/i, + /^kvě/i, + /^(čvn|červen$|června)/i, + /^(čvc|červenec|července)/i, + /^srp/i, + /^zář/i, + /^říj/i, + /^lis/i, + /^pro/i, + ], + // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched. + // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'. + monthsRegex$2 = /^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i; + + function plural$1(n) { + return n > 1 && n < 5 && ~~(n / 10) !== 1; + } + function translate$1(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + switch (key) { + case 's': // a few seconds / in a few seconds / a few seconds ago + return withoutSuffix || isFuture ? 'pár sekund' : 'pár sekundami'; + case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago + if (withoutSuffix || isFuture) { + return result + (plural$1(number) ? 'sekundy' : 'sekund'); + } else { + return result + 'sekundami'; + } + case 'm': // a minute / in a minute / a minute ago + return withoutSuffix ? 'minuta' : isFuture ? 'minutu' : 'minutou'; + case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago + if (withoutSuffix || isFuture) { + return result + (plural$1(number) ? 'minuty' : 'minut'); + } else { + return result + 'minutami'; + } + case 'h': // an hour / in an hour / an hour ago + return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou'; + case 'hh': // 9 hours / in 9 hours / 9 hours ago + if (withoutSuffix || isFuture) { + return result + (plural$1(number) ? 'hodiny' : 'hodin'); + } else { + return result + 'hodinami'; + } + case 'd': // a day / in a day / a day ago + return withoutSuffix || isFuture ? 'den' : 'dnem'; + case 'dd': // 9 days / in 9 days / 9 days ago + if (withoutSuffix || isFuture) { + return result + (plural$1(number) ? 'dny' : 'dní'); + } else { + return result + 'dny'; + } + case 'M': // a month / in a month / a month ago + return withoutSuffix || isFuture ? 'měsíc' : 'měsícem'; + case 'MM': // 9 months / in 9 months / 9 months ago + if (withoutSuffix || isFuture) { + return result + (plural$1(number) ? 'měsíce' : 'měsíců'); + } else { + return result + 'měsíci'; + } + case 'y': // a year / in a year / a year ago + return withoutSuffix || isFuture ? 'rok' : 'rokem'; + case 'yy': // 9 years / in 9 years / 9 years ago + if (withoutSuffix || isFuture) { + return result + (plural$1(number) ? 'roky' : 'let'); + } else { + return result + 'lety'; + } + } + } + + hooks.defineLocale('cs', { + months: months$4, + monthsShort: monthsShort, + monthsRegex: monthsRegex$2, + monthsShortRegex: monthsRegex$2, + // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched. + // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'. + monthsStrictRegex: /^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i, + monthsShortStrictRegex: /^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i, + monthsParse: monthsParse$1, + longMonthsParse: monthsParse$1, + shortMonthsParse: monthsParse$1, + weekdays: 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'), + weekdaysShort: 'ne_po_út_st_čt_pá_so'.split('_'), + weekdaysMin: 'ne_po_út_st_čt_pá_so'.split('_'), + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd D. MMMM YYYY H:mm', + l: 'D. M. YYYY', + }, + calendar: { + sameDay: '[dnes v] LT', + nextDay: '[zítra v] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[v neděli v] LT'; + case 1: + case 2: + return '[v] dddd [v] LT'; + case 3: + return '[ve středu v] LT'; + case 4: + return '[ve čtvrtek v] LT'; + case 5: + return '[v pátek v] LT'; + case 6: + return '[v sobotu v] LT'; + } + }, + lastDay: '[včera v] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[minulou neděli v] LT'; + case 1: + case 2: + return '[minulé] dddd [v] LT'; + case 3: + return '[minulou středu v] LT'; + case 4: + case 5: + return '[minulý] dddd [v] LT'; + case 6: + return '[minulou sobotu v] LT'; + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'za %s', + past: 'před %s', + s: translate$1, + ss: translate$1, + m: translate$1, + mm: translate$1, + h: translate$1, + hh: translate$1, + d: translate$1, + dd: translate$1, + M: translate$1, + MM: translate$1, + y: translate$1, + yy: translate$1, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('cv', { + months: 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split( + '_' + ), + monthsShort: 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'), + weekdays: 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split( + '_' + ), + weekdaysShort: 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'), + weekdaysMin: 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD-MM-YYYY', + LL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]', + LLL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm', + LLLL: 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm', + }, + calendar: { + sameDay: '[Паян] LT [сехетре]', + nextDay: '[Ыран] LT [сехетре]', + lastDay: '[Ӗнер] LT [сехетре]', + nextWeek: '[Ҫитес] dddd LT [сехетре]', + lastWeek: '[Иртнӗ] dddd LT [сехетре]', + sameElse: 'L', + }, + relativeTime: { + future: function (output) { + var affix = /сехет$/i.exec(output) + ? 'рен' + : /ҫул$/i.exec(output) + ? 'тан' + : 'ран'; + return output + affix; + }, + past: '%s каялла', + s: 'пӗр-ик ҫеккунт', + ss: '%d ҫеккунт', + m: 'пӗр минут', + mm: '%d минут', + h: 'пӗр сехет', + hh: '%d сехет', + d: 'пӗр кун', + dd: '%d кун', + M: 'пӗр уйӑх', + MM: '%d уйӑх', + y: 'пӗр ҫул', + yy: '%d ҫул', + }, + dayOfMonthOrdinalParse: /\d{1,2}-мӗш/, + ordinal: '%d-мӗш', + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('cy', { + months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split( + '_' + ), + monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split( + '_' + ), + weekdays: 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split( + '_' + ), + weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'), + weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'), + weekdaysParseExact: true, + // time formats are the same as en-gb + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Heddiw am] LT', + nextDay: '[Yfory am] LT', + nextWeek: 'dddd [am] LT', + lastDay: '[Ddoe am] LT', + lastWeek: 'dddd [diwethaf am] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'mewn %s', + past: '%s yn ôl', + s: 'ychydig eiliadau', + ss: '%d eiliad', + m: 'munud', + mm: '%d munud', + h: 'awr', + hh: '%d awr', + d: 'diwrnod', + dd: '%d diwrnod', + M: 'mis', + MM: '%d mis', + y: 'blwyddyn', + yy: '%d flynedd', + }, + dayOfMonthOrdinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/, + // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh + ordinal: function (number) { + var b = number, + output = '', + lookup = [ + '', + 'af', + 'il', + 'ydd', + 'ydd', + 'ed', + 'ed', + 'ed', + 'fed', + 'fed', + 'fed', // 1af to 10fed + 'eg', + 'fed', + 'eg', + 'eg', + 'fed', + 'eg', + 'eg', + 'fed', + 'eg', + 'fed', // 11eg to 20fed + ]; + if (b > 20) { + if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) { + output = 'fed'; // not 30ain, 70ain or 90ain + } else { + output = 'ain'; + } + } else if (b > 0) { + output = lookup[b]; + } + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('da', { + months: 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split( + '_' + ), + monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'), + weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'), + weekdaysShort: 'søn_man_tir_ons_tor_fre_lør'.split('_'), + weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY HH:mm', + LLLL: 'dddd [d.] D. MMMM YYYY [kl.] HH:mm', + }, + calendar: { + sameDay: '[i dag kl.] LT', + nextDay: '[i morgen kl.] LT', + nextWeek: 'på dddd [kl.] LT', + lastDay: '[i går kl.] LT', + lastWeek: '[i] dddd[s kl.] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'om %s', + past: '%s siden', + s: 'få sekunder', + ss: '%d sekunder', + m: 'et minut', + mm: '%d minutter', + h: 'en time', + hh: '%d timer', + d: 'en dag', + dd: '%d dage', + M: 'en måned', + MM: '%d måneder', + y: 'et år', + yy: '%d år', + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function processRelativeTime(number, withoutSuffix, key, isFuture) { + var format = { + m: ['eine Minute', 'einer Minute'], + h: ['eine Stunde', 'einer Stunde'], + d: ['ein Tag', 'einem Tag'], + dd: [number + ' Tage', number + ' Tagen'], + w: ['eine Woche', 'einer Woche'], + M: ['ein Monat', 'einem Monat'], + MM: [number + ' Monate', number + ' Monaten'], + y: ['ein Jahr', 'einem Jahr'], + yy: [number + ' Jahre', number + ' Jahren'], + }; + return withoutSuffix ? format[key][0] : format[key][1]; + } + + hooks.defineLocale('de-at', { + months: 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split( + '_' + ), + monthsShort: 'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split( + '_' + ), + weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'), + weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY HH:mm', + LLLL: 'dddd, D. MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[heute um] LT [Uhr]', + sameElse: 'L', + nextDay: '[morgen um] LT [Uhr]', + nextWeek: 'dddd [um] LT [Uhr]', + lastDay: '[gestern um] LT [Uhr]', + lastWeek: '[letzten] dddd [um] LT [Uhr]', + }, + relativeTime: { + future: 'in %s', + past: 'vor %s', + s: 'ein paar Sekunden', + ss: '%d Sekunden', + m: processRelativeTime, + mm: '%d Minuten', + h: processRelativeTime, + hh: '%d Stunden', + d: processRelativeTime, + dd: processRelativeTime, + w: processRelativeTime, + ww: '%d Wochen', + M: processRelativeTime, + MM: processRelativeTime, + y: processRelativeTime, + yy: processRelativeTime, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function processRelativeTime$1(number, withoutSuffix, key, isFuture) { + var format = { + m: ['eine Minute', 'einer Minute'], + h: ['eine Stunde', 'einer Stunde'], + d: ['ein Tag', 'einem Tag'], + dd: [number + ' Tage', number + ' Tagen'], + w: ['eine Woche', 'einer Woche'], + M: ['ein Monat', 'einem Monat'], + MM: [number + ' Monate', number + ' Monaten'], + y: ['ein Jahr', 'einem Jahr'], + yy: [number + ' Jahre', number + ' Jahren'], + }; + return withoutSuffix ? format[key][0] : format[key][1]; + } + + hooks.defineLocale('de-ch', { + months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split( + '_' + ), + monthsShort: 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split( + '_' + ), + weekdaysShort: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), + weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY HH:mm', + LLLL: 'dddd, D. MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[heute um] LT [Uhr]', + sameElse: 'L', + nextDay: '[morgen um] LT [Uhr]', + nextWeek: 'dddd [um] LT [Uhr]', + lastDay: '[gestern um] LT [Uhr]', + lastWeek: '[letzten] dddd [um] LT [Uhr]', + }, + relativeTime: { + future: 'in %s', + past: 'vor %s', + s: 'ein paar Sekunden', + ss: '%d Sekunden', + m: processRelativeTime$1, + mm: '%d Minuten', + h: processRelativeTime$1, + hh: '%d Stunden', + d: processRelativeTime$1, + dd: processRelativeTime$1, + w: processRelativeTime$1, + ww: '%d Wochen', + M: processRelativeTime$1, + MM: processRelativeTime$1, + y: processRelativeTime$1, + yy: processRelativeTime$1, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function processRelativeTime$2(number, withoutSuffix, key, isFuture) { + var format = { + m: ['eine Minute', 'einer Minute'], + h: ['eine Stunde', 'einer Stunde'], + d: ['ein Tag', 'einem Tag'], + dd: [number + ' Tage', number + ' Tagen'], + w: ['eine Woche', 'einer Woche'], + M: ['ein Monat', 'einem Monat'], + MM: [number + ' Monate', number + ' Monaten'], + y: ['ein Jahr', 'einem Jahr'], + yy: [number + ' Jahre', number + ' Jahren'], + }; + return withoutSuffix ? format[key][0] : format[key][1]; + } + + hooks.defineLocale('de', { + months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split( + '_' + ), + monthsShort: 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split( + '_' + ), + weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'), + weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY HH:mm', + LLLL: 'dddd, D. MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[heute um] LT [Uhr]', + sameElse: 'L', + nextDay: '[morgen um] LT [Uhr]', + nextWeek: 'dddd [um] LT [Uhr]', + lastDay: '[gestern um] LT [Uhr]', + lastWeek: '[letzten] dddd [um] LT [Uhr]', + }, + relativeTime: { + future: 'in %s', + past: 'vor %s', + s: 'ein paar Sekunden', + ss: '%d Sekunden', + m: processRelativeTime$2, + mm: '%d Minuten', + h: processRelativeTime$2, + hh: '%d Stunden', + d: processRelativeTime$2, + dd: processRelativeTime$2, + w: processRelativeTime$2, + ww: '%d Wochen', + M: processRelativeTime$2, + MM: processRelativeTime$2, + y: processRelativeTime$2, + yy: processRelativeTime$2, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var months$5 = [ + 'ޖެނުއަރީ', + 'ފެބްރުއަރީ', + 'މާރިޗު', + 'އޭޕްރީލު', + 'މޭ', + 'ޖޫން', + 'ޖުލައި', + 'އޯގަސްޓު', + 'ސެޕްޓެމްބަރު', + 'އޮކްޓޯބަރު', + 'ނޮވެމްބަރު', + 'ޑިސެމްބަރު', + ], + weekdays = [ + 'އާދިއްތަ', + 'ހޯމަ', + 'އަންގާރަ', + 'ބުދަ', + 'ބުރާސްފަތި', + 'ހުކުރު', + 'ހޮނިހިރު', + ]; + + hooks.defineLocale('dv', { + months: months$5, + monthsShort: months$5, + weekdays: weekdays, + weekdaysShort: weekdays, + weekdaysMin: 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'D/M/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + meridiemParse: /މކ|މފ/, + isPM: function (input) { + return 'މފ' === input; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'މކ'; + } else { + return 'މފ'; + } + }, + calendar: { + sameDay: '[މިއަދު] LT', + nextDay: '[މާދަމާ] LT', + nextWeek: 'dddd LT', + lastDay: '[އިއްޔެ] LT', + lastWeek: '[ފާއިތުވި] dddd LT', + sameElse: 'L', + }, + relativeTime: { + future: 'ތެރޭގައި %s', + past: 'ކުރިން %s', + s: 'ސިކުންތުކޮޅެއް', + ss: 'd% ސިކުންތު', + m: 'މިނިޓެއް', + mm: 'މިނިޓު %d', + h: 'ގަޑިއިރެއް', + hh: 'ގަޑިއިރު %d', + d: 'ދުވަހެއް', + dd: 'ދުވަސް %d', + M: 'މަހެއް', + MM: 'މަސް %d', + y: 'އަހަރެއް', + yy: 'އަހަރު %d', + }, + preparse: function (string) { + return string.replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/,/g, '،'); + }, + week: { + dow: 7, // Sunday is the first day of the week. + doy: 12, // The week that contains Jan 12th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function isFunction$1(input) { + return ( + (typeof Function !== 'undefined' && input instanceof Function) || + Object.prototype.toString.call(input) === '[object Function]' + ); + } + + hooks.defineLocale('el', { + monthsNominativeEl: 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split( + '_' + ), + monthsGenitiveEl: 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split( + '_' + ), + months: function (momentToFormat, format) { + if (!momentToFormat) { + return this._monthsNominativeEl; + } else if ( + typeof format === 'string' && + /D/.test(format.substring(0, format.indexOf('MMMM'))) + ) { + // if there is a day number before 'MMMM' + return this._monthsGenitiveEl[momentToFormat.month()]; + } else { + return this._monthsNominativeEl[momentToFormat.month()]; + } + }, + monthsShort: 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'), + weekdays: 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split( + '_' + ), + weekdaysShort: 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'), + weekdaysMin: 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'), + meridiem: function (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'μμ' : 'ΜΜ'; + } else { + return isLower ? 'πμ' : 'ΠΜ'; + } + }, + isPM: function (input) { + return (input + '').toLowerCase()[0] === 'μ'; + }, + meridiemParse: /[ΠΜ]\.?Μ?\.?/i, + longDateFormat: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY h:mm A', + LLLL: 'dddd, D MMMM YYYY h:mm A', + }, + calendarEl: { + sameDay: '[Σήμερα {}] LT', + nextDay: '[Αύριο {}] LT', + nextWeek: 'dddd [{}] LT', + lastDay: '[Χθες {}] LT', + lastWeek: function () { + switch (this.day()) { + case 6: + return '[το προηγούμενο] dddd [{}] LT'; + default: + return '[την προηγούμενη] dddd [{}] LT'; + } + }, + sameElse: 'L', + }, + calendar: function (key, mom) { + var output = this._calendarEl[key], + hours = mom && mom.hours(); + if (isFunction$1(output)) { + output = output.apply(mom); + } + return output.replace('{}', hours % 12 === 1 ? 'στη' : 'στις'); + }, + relativeTime: { + future: 'σε %s', + past: '%s πριν', + s: 'λίγα δευτερόλεπτα', + ss: '%d δευτερόλεπτα', + m: 'ένα λεπτό', + mm: '%d λεπτά', + h: 'μία ώρα', + hh: '%d ώρες', + d: 'μία μέρα', + dd: '%d μέρες', + M: 'ένας μήνας', + MM: '%d μήνες', + y: 'ένας χρόνος', + yy: '%d χρόνια', + }, + dayOfMonthOrdinalParse: /\d{1,2}η/, + ordinal: '%dη', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4st is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('en-au', { + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( + '_' + ), + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY h:mm A', + LLLL: 'dddd, D MMMM YYYY h:mm A', + }, + calendar: { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('en-ca', { + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( + '_' + ), + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'YYYY-MM-DD', + LL: 'MMMM D, YYYY', + LLL: 'MMMM D, YYYY h:mm A', + LLLL: 'dddd, MMMM D, YYYY h:mm A', + }, + calendar: { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('en-gb', { + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( + '_' + ), + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('en-ie', { + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( + '_' + ), + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('en-il', { + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( + '_' + ), + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('en-in', { + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( + '_' + ), + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY h:mm A', + LLLL: 'dddd, D MMMM YYYY h:mm A', + }, + calendar: { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 1st is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('en-nz', { + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( + '_' + ), + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY h:mm A', + LLLL: 'dddd, D MMMM YYYY h:mm A', + }, + calendar: { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('en-sg', { + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( + '_' + ), + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('eo', { + months: 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split( + '_' + ), + monthsShort: 'jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec'.split('_'), + weekdays: 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'), + weekdaysShort: 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'), + weekdaysMin: 'di_lu_ma_me_ĵa_ve_sa'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY-MM-DD', + LL: '[la] D[-an de] MMMM, YYYY', + LLL: '[la] D[-an de] MMMM, YYYY HH:mm', + LLLL: 'dddd[n], [la] D[-an de] MMMM, YYYY HH:mm', + llll: 'ddd, [la] D[-an de] MMM, YYYY HH:mm', + }, + meridiemParse: /[ap]\.t\.m/i, + isPM: function (input) { + return input.charAt(0).toLowerCase() === 'p'; + }, + meridiem: function (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'p.t.m.' : 'P.T.M.'; + } else { + return isLower ? 'a.t.m.' : 'A.T.M.'; + } + }, + calendar: { + sameDay: '[Hodiaŭ je] LT', + nextDay: '[Morgaŭ je] LT', + nextWeek: 'dddd[n je] LT', + lastDay: '[Hieraŭ je] LT', + lastWeek: '[pasintan] dddd[n je] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'post %s', + past: 'antaŭ %s', + s: 'kelkaj sekundoj', + ss: '%d sekundoj', + m: 'unu minuto', + mm: '%d minutoj', + h: 'unu horo', + hh: '%d horoj', + d: 'unu tago', //ne 'diurno', ĉar estas uzita por proksimumo + dd: '%d tagoj', + M: 'unu monato', + MM: '%d monatoj', + y: 'unu jaro', + yy: '%d jaroj', + }, + dayOfMonthOrdinalParse: /\d{1,2}a/, + ordinal: '%da', + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split( + '_' + ), + monthsShort$1 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'), + monthsParse$2 = [ + /^ene/i, + /^feb/i, + /^mar/i, + /^abr/i, + /^may/i, + /^jun/i, + /^jul/i, + /^ago/i, + /^sep/i, + /^oct/i, + /^nov/i, + /^dic/i, + ], + monthsRegex$3 = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; + + hooks.defineLocale('es-do', { + months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split( + '_' + ), + monthsShort: function (m, format) { + if (!m) { + return monthsShortDot; + } else if (/-MMM-/.test(format)) { + return monthsShort$1[m.month()]; + } else { + return monthsShortDot[m.month()]; + } + }, + monthsRegex: monthsRegex$3, + monthsShortRegex: monthsRegex$3, + monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, + monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, + monthsParse: monthsParse$2, + longMonthsParse: monthsParse$2, + shortMonthsParse: monthsParse$2, + weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), + weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), + weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'DD/MM/YYYY', + LL: 'D [de] MMMM [de] YYYY', + LLL: 'D [de] MMMM [de] YYYY h:mm A', + LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A', + }, + calendar: { + sameDay: function () { + return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + nextDay: function () { + return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + nextWeek: function () { + return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + lastDay: function () { + return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + lastWeek: function () { + return ( + '[el] dddd [pasado a la' + + (this.hours() !== 1 ? 's' : '') + + '] LT' + ); + }, + sameElse: 'L', + }, + relativeTime: { + future: 'en %s', + past: 'hace %s', + s: 'unos segundos', + ss: '%d segundos', + m: 'un minuto', + mm: '%d minutos', + h: 'una hora', + hh: '%d horas', + d: 'un día', + dd: '%d días', + M: 'un mes', + MM: '%d meses', + y: 'un año', + yy: '%d años', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var monthsShortDot$1 = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split( + '_' + ), + monthsShort$2 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'), + monthsParse$3 = [ + /^ene/i, + /^feb/i, + /^mar/i, + /^abr/i, + /^may/i, + /^jun/i, + /^jul/i, + /^ago/i, + /^sep/i, + /^oct/i, + /^nov/i, + /^dic/i, + ], + monthsRegex$4 = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; + + hooks.defineLocale('es-us', { + months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split( + '_' + ), + monthsShort: function (m, format) { + if (!m) { + return monthsShortDot$1; + } else if (/-MMM-/.test(format)) { + return monthsShort$2[m.month()]; + } else { + return monthsShortDot$1[m.month()]; + } + }, + monthsRegex: monthsRegex$4, + monthsShortRegex: monthsRegex$4, + monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, + monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, + monthsParse: monthsParse$3, + longMonthsParse: monthsParse$3, + shortMonthsParse: monthsParse$3, + weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), + weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), + weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'MM/DD/YYYY', + LL: 'D [de] MMMM [de] YYYY', + LLL: 'D [de] MMMM [de] YYYY h:mm A', + LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A', + }, + calendar: { + sameDay: function () { + return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + nextDay: function () { + return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + nextWeek: function () { + return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + lastDay: function () { + return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + lastWeek: function () { + return ( + '[el] dddd [pasado a la' + + (this.hours() !== 1 ? 's' : '') + + '] LT' + ); + }, + sameElse: 'L', + }, + relativeTime: { + future: 'en %s', + past: 'hace %s', + s: 'unos segundos', + ss: '%d segundos', + m: 'un minuto', + mm: '%d minutos', + h: 'una hora', + hh: '%d horas', + d: 'un día', + dd: '%d días', + M: 'un mes', + MM: '%d meses', + y: 'un año', + yy: '%d años', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var monthsShortDot$2 = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split( + '_' + ), + monthsShort$3 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'), + monthsParse$4 = [ + /^ene/i, + /^feb/i, + /^mar/i, + /^abr/i, + /^may/i, + /^jun/i, + /^jul/i, + /^ago/i, + /^sep/i, + /^oct/i, + /^nov/i, + /^dic/i, + ], + monthsRegex$5 = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; + + hooks.defineLocale('es', { + months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split( + '_' + ), + monthsShort: function (m, format) { + if (!m) { + return monthsShortDot$2; + } else if (/-MMM-/.test(format)) { + return monthsShort$3[m.month()]; + } else { + return monthsShortDot$2[m.month()]; + } + }, + monthsRegex: monthsRegex$5, + monthsShortRegex: monthsRegex$5, + monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, + monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, + monthsParse: monthsParse$4, + longMonthsParse: monthsParse$4, + shortMonthsParse: monthsParse$4, + weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), + weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), + weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D [de] MMMM [de] YYYY', + LLL: 'D [de] MMMM [de] YYYY H:mm', + LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm', + }, + calendar: { + sameDay: function () { + return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + nextDay: function () { + return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + nextWeek: function () { + return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + lastDay: function () { + return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + lastWeek: function () { + return ( + '[el] dddd [pasado a la' + + (this.hours() !== 1 ? 's' : '') + + '] LT' + ); + }, + sameElse: 'L', + }, + relativeTime: { + future: 'en %s', + past: 'hace %s', + s: 'unos segundos', + ss: '%d segundos', + m: 'un minuto', + mm: '%d minutos', + h: 'una hora', + hh: '%d horas', + d: 'un día', + dd: '%d días', + M: 'un mes', + MM: '%d meses', + y: 'un año', + yy: '%d años', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + invalidDate: 'Fecha inválida', + }); + + //! moment.js locale configuration + + function processRelativeTime$3(number, withoutSuffix, key, isFuture) { + var format = { + s: ['mõne sekundi', 'mõni sekund', 'paar sekundit'], + ss: [number + 'sekundi', number + 'sekundit'], + m: ['ühe minuti', 'üks minut'], + mm: [number + ' minuti', number + ' minutit'], + h: ['ühe tunni', 'tund aega', 'üks tund'], + hh: [number + ' tunni', number + ' tundi'], + d: ['ühe päeva', 'üks päev'], + M: ['kuu aja', 'kuu aega', 'üks kuu'], + MM: [number + ' kuu', number + ' kuud'], + y: ['ühe aasta', 'aasta', 'üks aasta'], + yy: [number + ' aasta', number + ' aastat'], + }; + if (withoutSuffix) { + return format[key][2] ? format[key][2] : format[key][1]; + } + return isFuture ? format[key][0] : format[key][1]; + } + + hooks.defineLocale('et', { + months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split( + '_' + ), + monthsShort: 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split( + '_' + ), + weekdays: 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split( + '_' + ), + weekdaysShort: 'P_E_T_K_N_R_L'.split('_'), + weekdaysMin: 'P_E_T_K_N_R_L'.split('_'), + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[Täna,] LT', + nextDay: '[Homme,] LT', + nextWeek: '[Järgmine] dddd LT', + lastDay: '[Eile,] LT', + lastWeek: '[Eelmine] dddd LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s pärast', + past: '%s tagasi', + s: processRelativeTime$3, + ss: processRelativeTime$3, + m: processRelativeTime$3, + mm: processRelativeTime$3, + h: processRelativeTime$3, + hh: processRelativeTime$3, + d: processRelativeTime$3, + dd: '%d päeva', + M: processRelativeTime$3, + MM: processRelativeTime$3, + y: processRelativeTime$3, + yy: processRelativeTime$3, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('eu', { + months: 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split( + '_' + ), + monthsShort: 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split( + '_' + ), + weekdaysShort: 'ig._al._ar._az._og._ol._lr.'.split('_'), + weekdaysMin: 'ig_al_ar_az_og_ol_lr'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY-MM-DD', + LL: 'YYYY[ko] MMMM[ren] D[a]', + LLL: 'YYYY[ko] MMMM[ren] D[a] HH:mm', + LLLL: 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm', + l: 'YYYY-M-D', + ll: 'YYYY[ko] MMM D[a]', + lll: 'YYYY[ko] MMM D[a] HH:mm', + llll: 'ddd, YYYY[ko] MMM D[a] HH:mm', + }, + calendar: { + sameDay: '[gaur] LT[etan]', + nextDay: '[bihar] LT[etan]', + nextWeek: 'dddd LT[etan]', + lastDay: '[atzo] LT[etan]', + lastWeek: '[aurreko] dddd LT[etan]', + sameElse: 'L', + }, + relativeTime: { + future: '%s barru', + past: 'duela %s', + s: 'segundo batzuk', + ss: '%d segundo', + m: 'minutu bat', + mm: '%d minutu', + h: 'ordu bat', + hh: '%d ordu', + d: 'egun bat', + dd: '%d egun', + M: 'hilabete bat', + MM: '%d hilabete', + y: 'urte bat', + yy: '%d urte', + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap$5 = { + '1': '۱', + '2': '۲', + '3': '۳', + '4': '۴', + '5': '۵', + '6': '۶', + '7': '۷', + '8': '۸', + '9': '۹', + '0': '۰', + }, + numberMap$4 = { + '۱': '1', + '۲': '2', + '۳': '3', + '۴': '4', + '۵': '5', + '۶': '6', + '۷': '7', + '۸': '8', + '۹': '9', + '۰': '0', + }; + + hooks.defineLocale('fa', { + months: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split( + '_' + ), + monthsShort: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split( + '_' + ), + weekdays: 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split( + '_' + ), + weekdaysShort: 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split( + '_' + ), + weekdaysMin: 'ی_د_س_چ_پ_ج_ش'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + meridiemParse: /قبل از ظهر|بعد از ظهر/, + isPM: function (input) { + return /بعد از ظهر/.test(input); + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'قبل از ظهر'; + } else { + return 'بعد از ظهر'; + } + }, + calendar: { + sameDay: '[امروز ساعت] LT', + nextDay: '[فردا ساعت] LT', + nextWeek: 'dddd [ساعت] LT', + lastDay: '[دیروز ساعت] LT', + lastWeek: 'dddd [پیش] [ساعت] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'در %s', + past: '%s پیش', + s: 'چند ثانیه', + ss: '%d ثانیه', + m: 'یک دقیقه', + mm: '%d دقیقه', + h: 'یک ساعت', + hh: '%d ساعت', + d: 'یک روز', + dd: '%d روز', + M: 'یک ماه', + MM: '%d ماه', + y: 'یک سال', + yy: '%d سال', + }, + preparse: function (string) { + return string + .replace(/[۰-۹]/g, function (match) { + return numberMap$4[match]; + }) + .replace(/،/g, ','); + }, + postformat: function (string) { + return string + .replace(/\d/g, function (match) { + return symbolMap$5[match]; + }) + .replace(/,/g, '،'); + }, + dayOfMonthOrdinalParse: /\d{1,2}م/, + ordinal: '%dم', + week: { + dow: 6, // Saturday is the first day of the week. + doy: 12, // The week that contains Jan 12th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var numbersPast = 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split( + ' ' + ), + numbersFuture = [ + 'nolla', + 'yhden', + 'kahden', + 'kolmen', + 'neljän', + 'viiden', + 'kuuden', + numbersPast[7], + numbersPast[8], + numbersPast[9], + ]; + function translate$2(number, withoutSuffix, key, isFuture) { + var result = ''; + switch (key) { + case 's': + return isFuture ? 'muutaman sekunnin' : 'muutama sekunti'; + case 'ss': + result = isFuture ? 'sekunnin' : 'sekuntia'; + break; + case 'm': + return isFuture ? 'minuutin' : 'minuutti'; + case 'mm': + result = isFuture ? 'minuutin' : 'minuuttia'; + break; + case 'h': + return isFuture ? 'tunnin' : 'tunti'; + case 'hh': + result = isFuture ? 'tunnin' : 'tuntia'; + break; + case 'd': + return isFuture ? 'päivän' : 'päivä'; + case 'dd': + result = isFuture ? 'päivän' : 'päivää'; + break; + case 'M': + return isFuture ? 'kuukauden' : 'kuukausi'; + case 'MM': + result = isFuture ? 'kuukauden' : 'kuukautta'; + break; + case 'y': + return isFuture ? 'vuoden' : 'vuosi'; + case 'yy': + result = isFuture ? 'vuoden' : 'vuotta'; + break; + } + result = verbalNumber(number, isFuture) + ' ' + result; + return result; + } + function verbalNumber(number, isFuture) { + return number < 10 + ? isFuture + ? numbersFuture[number] + : numbersPast[number] + : number; + } + + hooks.defineLocale('fi', { + months: 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split( + '_' + ), + monthsShort: 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split( + '_' + ), + weekdays: 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split( + '_' + ), + weekdaysShort: 'su_ma_ti_ke_to_pe_la'.split('_'), + weekdaysMin: 'su_ma_ti_ke_to_pe_la'.split('_'), + longDateFormat: { + LT: 'HH.mm', + LTS: 'HH.mm.ss', + L: 'DD.MM.YYYY', + LL: 'Do MMMM[ta] YYYY', + LLL: 'Do MMMM[ta] YYYY, [klo] HH.mm', + LLLL: 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm', + l: 'D.M.YYYY', + ll: 'Do MMM YYYY', + lll: 'Do MMM YYYY, [klo] HH.mm', + llll: 'ddd, Do MMM YYYY, [klo] HH.mm', + }, + calendar: { + sameDay: '[tänään] [klo] LT', + nextDay: '[huomenna] [klo] LT', + nextWeek: 'dddd [klo] LT', + lastDay: '[eilen] [klo] LT', + lastWeek: '[viime] dddd[na] [klo] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s päästä', + past: '%s sitten', + s: translate$2, + ss: translate$2, + m: translate$2, + mm: translate$2, + h: translate$2, + hh: translate$2, + d: translate$2, + dd: translate$2, + M: translate$2, + MM: translate$2, + y: translate$2, + yy: translate$2, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('fil', { + months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split( + '_' + ), + monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'), + weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split( + '_' + ), + weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'), + weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'MM/D/YYYY', + LL: 'MMMM D, YYYY', + LLL: 'MMMM D, YYYY HH:mm', + LLLL: 'dddd, MMMM DD, YYYY HH:mm', + }, + calendar: { + sameDay: 'LT [ngayong araw]', + nextDay: '[Bukas ng] LT', + nextWeek: 'LT [sa susunod na] dddd', + lastDay: 'LT [kahapon]', + lastWeek: 'LT [noong nakaraang] dddd', + sameElse: 'L', + }, + relativeTime: { + future: 'sa loob ng %s', + past: '%s ang nakalipas', + s: 'ilang segundo', + ss: '%d segundo', + m: 'isang minuto', + mm: '%d minuto', + h: 'isang oras', + hh: '%d oras', + d: 'isang araw', + dd: '%d araw', + M: 'isang buwan', + MM: '%d buwan', + y: 'isang taon', + yy: '%d taon', + }, + dayOfMonthOrdinalParse: /\d{1,2}/, + ordinal: function (number) { + return number; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('fo', { + months: 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split( + '_' + ), + monthsShort: 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'), + weekdays: 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split( + '_' + ), + weekdaysShort: 'sun_mán_týs_mik_hós_frí_ley'.split('_'), + weekdaysMin: 'su_má_tý_mi_hó_fr_le'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D. MMMM, YYYY HH:mm', + }, + calendar: { + sameDay: '[Í dag kl.] LT', + nextDay: '[Í morgin kl.] LT', + nextWeek: 'dddd [kl.] LT', + lastDay: '[Í gjár kl.] LT', + lastWeek: '[síðstu] dddd [kl] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'um %s', + past: '%s síðani', + s: 'fá sekund', + ss: '%d sekundir', + m: 'ein minuttur', + mm: '%d minuttir', + h: 'ein tími', + hh: '%d tímar', + d: 'ein dagur', + dd: '%d dagar', + M: 'ein mánaður', + MM: '%d mánaðir', + y: 'eitt ár', + yy: '%d ár', + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('fr-ca', { + months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split( + '_' + ), + monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), + weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), + weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY-MM-DD', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Aujourd’hui à] LT', + nextDay: '[Demain à] LT', + nextWeek: 'dddd [à] LT', + lastDay: '[Hier à] LT', + lastWeek: 'dddd [dernier à] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'dans %s', + past: 'il y a %s', + s: 'quelques secondes', + ss: '%d secondes', + m: 'une minute', + mm: '%d minutes', + h: 'une heure', + hh: '%d heures', + d: 'un jour', + dd: '%d jours', + M: 'un mois', + MM: '%d mois', + y: 'un an', + yy: '%d ans', + }, + dayOfMonthOrdinalParse: /\d{1,2}(er|e)/, + ordinal: function (number, period) { + switch (period) { + // Words with masculine grammatical gender: mois, trimestre, jour + default: + case 'M': + case 'Q': + case 'D': + case 'DDD': + case 'd': + return number + (number === 1 ? 'er' : 'e'); + + // Words with feminine grammatical gender: semaine + case 'w': + case 'W': + return number + (number === 1 ? 're' : 'e'); + } + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('fr-ch', { + months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split( + '_' + ), + monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), + weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), + weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Aujourd’hui à] LT', + nextDay: '[Demain à] LT', + nextWeek: 'dddd [à] LT', + lastDay: '[Hier à] LT', + lastWeek: 'dddd [dernier à] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'dans %s', + past: 'il y a %s', + s: 'quelques secondes', + ss: '%d secondes', + m: 'une minute', + mm: '%d minutes', + h: 'une heure', + hh: '%d heures', + d: 'un jour', + dd: '%d jours', + M: 'un mois', + MM: '%d mois', + y: 'un an', + yy: '%d ans', + }, + dayOfMonthOrdinalParse: /\d{1,2}(er|e)/, + ordinal: function (number, period) { + switch (period) { + // Words with masculine grammatical gender: mois, trimestre, jour + default: + case 'M': + case 'Q': + case 'D': + case 'DDD': + case 'd': + return number + (number === 1 ? 'er' : 'e'); + + // Words with feminine grammatical gender: semaine + case 'w': + case 'W': + return number + (number === 1 ? 're' : 'e'); + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var monthsStrictRegex$1 = /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i, + monthsShortStrictRegex$1 = /(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i, + monthsRegex$6 = /(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i, + monthsParse$5 = [ + /^janv/i, + /^févr/i, + /^mars/i, + /^avr/i, + /^mai/i, + /^juin/i, + /^juil/i, + /^août/i, + /^sept/i, + /^oct/i, + /^nov/i, + /^déc/i, + ]; + + hooks.defineLocale('fr', { + months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split( + '_' + ), + monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split( + '_' + ), + monthsRegex: monthsRegex$6, + monthsShortRegex: monthsRegex$6, + monthsStrictRegex: monthsStrictRegex$1, + monthsShortStrictRegex: monthsShortStrictRegex$1, + monthsParse: monthsParse$5, + longMonthsParse: monthsParse$5, + shortMonthsParse: monthsParse$5, + weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), + weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), + weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Aujourd’hui à] LT', + nextDay: '[Demain à] LT', + nextWeek: 'dddd [à] LT', + lastDay: '[Hier à] LT', + lastWeek: 'dddd [dernier à] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'dans %s', + past: 'il y a %s', + s: 'quelques secondes', + ss: '%d secondes', + m: 'une minute', + mm: '%d minutes', + h: 'une heure', + hh: '%d heures', + d: 'un jour', + dd: '%d jours', + M: 'un mois', + MM: '%d mois', + y: 'un an', + yy: '%d ans', + }, + dayOfMonthOrdinalParse: /\d{1,2}(er|)/, + ordinal: function (number, period) { + switch (period) { + // TODO: Return 'e' when day of month > 1. Move this case inside + // block for masculine words below. + // See https://github.com/moment/moment/issues/3375 + case 'D': + return number + (number === 1 ? 'er' : ''); + + // Words with masculine grammatical gender: mois, trimestre, jour + default: + case 'M': + case 'Q': + case 'DDD': + case 'd': + return number + (number === 1 ? 'er' : 'e'); + + // Words with feminine grammatical gender: semaine + case 'w': + case 'W': + return number + (number === 1 ? 're' : 'e'); + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var monthsShortWithDots = 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split( + '_' + ), + monthsShortWithoutDots = 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split( + '_' + ); + + hooks.defineLocale('fy', { + months: 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split( + '_' + ), + monthsShort: function (m, format) { + if (!m) { + return monthsShortWithDots; + } else if (/-MMM-/.test(format)) { + return monthsShortWithoutDots[m.month()]; + } else { + return monthsShortWithDots[m.month()]; + } + }, + monthsParseExact: true, + weekdays: 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split( + '_' + ), + weekdaysShort: 'si._mo._ti._wo._to._fr._so.'.split('_'), + weekdaysMin: 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD-MM-YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[hjoed om] LT', + nextDay: '[moarn om] LT', + nextWeek: 'dddd [om] LT', + lastDay: '[juster om] LT', + lastWeek: '[ôfrûne] dddd [om] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'oer %s', + past: '%s lyn', + s: 'in pear sekonden', + ss: '%d sekonden', + m: 'ien minút', + mm: '%d minuten', + h: 'ien oere', + hh: '%d oeren', + d: 'ien dei', + dd: '%d dagen', + M: 'ien moanne', + MM: '%d moannen', + y: 'ien jier', + yy: '%d jierren', + }, + dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, + ordinal: function (number) { + return ( + number + + (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de') + ); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var months$6 = [ + 'Eanáir', + 'Feabhra', + 'Márta', + 'Aibreán', + 'Bealtaine', + 'Meitheamh', + 'Iúil', + 'Lúnasa', + 'Meán Fómhair', + 'Deireadh Fómhair', + 'Samhain', + 'Nollaig', + ], + monthsShort$4 = [ + 'Ean', + 'Feabh', + 'Márt', + 'Aib', + 'Beal', + 'Meith', + 'Iúil', + 'Lún', + 'M.F.', + 'D.F.', + 'Samh', + 'Noll', + ], + weekdays$1 = [ + 'Dé Domhnaigh', + 'Dé Luain', + 'Dé Máirt', + 'Dé Céadaoin', + 'Déardaoin', + 'Dé hAoine', + 'Dé Sathairn', + ], + weekdaysShort = ['Domh', 'Luan', 'Máirt', 'Céad', 'Déar', 'Aoine', 'Sath'], + weekdaysMin = ['Do', 'Lu', 'Má', 'Cé', 'Dé', 'A', 'Sa']; + + hooks.defineLocale('ga', { + months: months$6, + monthsShort: monthsShort$4, + monthsParseExact: true, + weekdays: weekdays$1, + weekdaysShort: weekdaysShort, + weekdaysMin: weekdaysMin, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Inniu ag] LT', + nextDay: '[Amárach ag] LT', + nextWeek: 'dddd [ag] LT', + lastDay: '[Inné ag] LT', + lastWeek: 'dddd [seo caite] [ag] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'i %s', + past: '%s ó shin', + s: 'cúpla soicind', + ss: '%d soicind', + m: 'nóiméad', + mm: '%d nóiméad', + h: 'uair an chloig', + hh: '%d uair an chloig', + d: 'lá', + dd: '%d lá', + M: 'mí', + MM: '%d míonna', + y: 'bliain', + yy: '%d bliain', + }, + dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/, + ordinal: function (number) { + var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var months$7 = [ + 'Am Faoilleach', + 'An Gearran', + 'Am Màrt', + 'An Giblean', + 'An Cèitean', + 'An t-Ògmhios', + 'An t-Iuchar', + 'An Lùnastal', + 'An t-Sultain', + 'An Dàmhair', + 'An t-Samhain', + 'An Dùbhlachd', + ], + monthsShort$5 = [ + 'Faoi', + 'Gear', + 'Màrt', + 'Gibl', + 'Cèit', + 'Ògmh', + 'Iuch', + 'Lùn', + 'Sult', + 'Dàmh', + 'Samh', + 'Dùbh', + ], + weekdays$2 = [ + 'Didòmhnaich', + 'Diluain', + 'Dimàirt', + 'Diciadain', + 'Diardaoin', + 'Dihaoine', + 'Disathairne', + ], + weekdaysShort$1 = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis'], + weekdaysMin$1 = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa']; + + hooks.defineLocale('gd', { + months: months$7, + monthsShort: monthsShort$5, + monthsParseExact: true, + weekdays: weekdays$2, + weekdaysShort: weekdaysShort$1, + weekdaysMin: weekdaysMin$1, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[An-diugh aig] LT', + nextDay: '[A-màireach aig] LT', + nextWeek: 'dddd [aig] LT', + lastDay: '[An-dè aig] LT', + lastWeek: 'dddd [seo chaidh] [aig] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'ann an %s', + past: 'bho chionn %s', + s: 'beagan diogan', + ss: '%d diogan', + m: 'mionaid', + mm: '%d mionaidean', + h: 'uair', + hh: '%d uairean', + d: 'latha', + dd: '%d latha', + M: 'mìos', + MM: '%d mìosan', + y: 'bliadhna', + yy: '%d bliadhna', + }, + dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/, + ordinal: function (number) { + var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('gl', { + months: 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split( + '_' + ), + monthsShort: 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'), + weekdaysShort: 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'), + weekdaysMin: 'do_lu_ma_mé_xo_ve_sá'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D [de] MMMM [de] YYYY', + LLL: 'D [de] MMMM [de] YYYY H:mm', + LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm', + }, + calendar: { + sameDay: function () { + return '[hoxe ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT'; + }, + nextDay: function () { + return '[mañá ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT'; + }, + nextWeek: function () { + return 'dddd [' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT'; + }, + lastDay: function () { + return '[onte ' + (this.hours() !== 1 ? 'á' : 'a') + '] LT'; + }, + lastWeek: function () { + return ( + '[o] dddd [pasado ' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT' + ); + }, + sameElse: 'L', + }, + relativeTime: { + future: function (str) { + if (str.indexOf('un') === 0) { + return 'n' + str; + } + return 'en ' + str; + }, + past: 'hai %s', + s: 'uns segundos', + ss: '%d segundos', + m: 'un minuto', + mm: '%d minutos', + h: 'unha hora', + hh: '%d horas', + d: 'un día', + dd: '%d días', + M: 'un mes', + MM: '%d meses', + y: 'un ano', + yy: '%d anos', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function processRelativeTime$4(number, withoutSuffix, key, isFuture) { + var format = { + s: ['थोडया सॅकंडांनी', 'थोडे सॅकंड'], + ss: [number + ' सॅकंडांनी', number + ' सॅकंड'], + m: ['एका मिणटान', 'एक मिनूट'], + mm: [number + ' मिणटांनी', number + ' मिणटां'], + h: ['एका वरान', 'एक वर'], + hh: [number + ' वरांनी', number + ' वरां'], + d: ['एका दिसान', 'एक दीस'], + dd: [number + ' दिसांनी', number + ' दीस'], + M: ['एका म्हयन्यान', 'एक म्हयनो'], + MM: [number + ' म्हयन्यानी', number + ' म्हयने'], + y: ['एका वर्सान', 'एक वर्स'], + yy: [number + ' वर्सांनी', number + ' वर्सां'], + }; + return isFuture ? format[key][0] : format[key][1]; + } + + hooks.defineLocale('gom-deva', { + months: { + standalone: 'जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split( + '_' + ), + format: 'जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या'.split( + '_' + ), + isFormat: /MMMM(\s)+D[oD]?/, + }, + monthsShort: 'जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार'.split('_'), + weekdaysShort: 'आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.'.split('_'), + weekdaysMin: 'आ_सो_मं_बु_ब्रे_सु_शे'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'A h:mm [वाजतां]', + LTS: 'A h:mm:ss [वाजतां]', + L: 'DD-MM-YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY A h:mm [वाजतां]', + LLLL: 'dddd, MMMM Do, YYYY, A h:mm [वाजतां]', + llll: 'ddd, D MMM YYYY, A h:mm [वाजतां]', + }, + calendar: { + sameDay: '[आयज] LT', + nextDay: '[फाल्यां] LT', + nextWeek: '[फुडलो] dddd[,] LT', + lastDay: '[काल] LT', + lastWeek: '[फाटलो] dddd[,] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s', + past: '%s आदीं', + s: processRelativeTime$4, + ss: processRelativeTime$4, + m: processRelativeTime$4, + mm: processRelativeTime$4, + h: processRelativeTime$4, + hh: processRelativeTime$4, + d: processRelativeTime$4, + dd: processRelativeTime$4, + M: processRelativeTime$4, + MM: processRelativeTime$4, + y: processRelativeTime$4, + yy: processRelativeTime$4, + }, + dayOfMonthOrdinalParse: /\d{1,2}(वेर)/, + ordinal: function (number, period) { + switch (period) { + // the ordinal 'वेर' only applies to day of the month + case 'D': + return number + 'वेर'; + default: + case 'M': + case 'Q': + case 'DDD': + case 'd': + case 'w': + case 'W': + return number; + } + }, + week: { + dow: 0, // Sunday is the first day of the week + doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4) + }, + meridiemParse: /राती|सकाळीं|दनपारां|सांजे/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'राती') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'सकाळीं') { + return hour; + } else if (meridiem === 'दनपारां') { + return hour > 12 ? hour : hour + 12; + } else if (meridiem === 'सांजे') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'राती'; + } else if (hour < 12) { + return 'सकाळीं'; + } else if (hour < 16) { + return 'दनपारां'; + } else if (hour < 20) { + return 'सांजे'; + } else { + return 'राती'; + } + }, + }); + + //! moment.js locale configuration + + function processRelativeTime$5(number, withoutSuffix, key, isFuture) { + var format = { + s: ['thoddea sekondamni', 'thodde sekond'], + ss: [number + ' sekondamni', number + ' sekond'], + m: ['eka mintan', 'ek minut'], + mm: [number + ' mintamni', number + ' mintam'], + h: ['eka voran', 'ek vor'], + hh: [number + ' voramni', number + ' voram'], + d: ['eka disan', 'ek dis'], + dd: [number + ' disamni', number + ' dis'], + M: ['eka mhoinean', 'ek mhoino'], + MM: [number + ' mhoineamni', number + ' mhoine'], + y: ['eka vorsan', 'ek voros'], + yy: [number + ' vorsamni', number + ' vorsam'], + }; + return isFuture ? format[key][0] : format[key][1]; + } + + hooks.defineLocale('gom-latn', { + months: { + standalone: 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split( + '_' + ), + format: 'Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea'.split( + '_' + ), + isFormat: /MMMM(\s)+D[oD]?/, + }, + monthsShort: 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split( + '_' + ), + monthsParseExact: true, + weekdays: "Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split('_'), + weekdaysShort: 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'), + weekdaysMin: 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'A h:mm [vazta]', + LTS: 'A h:mm:ss [vazta]', + L: 'DD-MM-YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY A h:mm [vazta]', + LLLL: 'dddd, MMMM Do, YYYY, A h:mm [vazta]', + llll: 'ddd, D MMM YYYY, A h:mm [vazta]', + }, + calendar: { + sameDay: '[Aiz] LT', + nextDay: '[Faleam] LT', + nextWeek: '[Fuddlo] dddd[,] LT', + lastDay: '[Kal] LT', + lastWeek: '[Fattlo] dddd[,] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s', + past: '%s adim', + s: processRelativeTime$5, + ss: processRelativeTime$5, + m: processRelativeTime$5, + mm: processRelativeTime$5, + h: processRelativeTime$5, + hh: processRelativeTime$5, + d: processRelativeTime$5, + dd: processRelativeTime$5, + M: processRelativeTime$5, + MM: processRelativeTime$5, + y: processRelativeTime$5, + yy: processRelativeTime$5, + }, + dayOfMonthOrdinalParse: /\d{1,2}(er)/, + ordinal: function (number, period) { + switch (period) { + // the ordinal 'er' only applies to day of the month + case 'D': + return number + 'er'; + default: + case 'M': + case 'Q': + case 'DDD': + case 'd': + case 'w': + case 'W': + return number; + } + }, + week: { + dow: 0, // Sunday is the first day of the week + doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4) + }, + meridiemParse: /rati|sokallim|donparam|sanje/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'rati') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'sokallim') { + return hour; + } else if (meridiem === 'donparam') { + return hour > 12 ? hour : hour + 12; + } else if (meridiem === 'sanje') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'rati'; + } else if (hour < 12) { + return 'sokallim'; + } else if (hour < 16) { + return 'donparam'; + } else if (hour < 20) { + return 'sanje'; + } else { + return 'rati'; + } + }, + }); + + //! moment.js locale configuration + + var symbolMap$6 = { + '1': '૧', + '2': '૨', + '3': '૩', + '4': '૪', + '5': '૫', + '6': '૬', + '7': '૭', + '8': '૮', + '9': '૯', + '0': '૦', + }, + numberMap$5 = { + '૧': '1', + '૨': '2', + '૩': '3', + '૪': '4', + '૫': '5', + '૬': '6', + '૭': '7', + '૮': '8', + '૯': '9', + '૦': '0', + }; + + hooks.defineLocale('gu', { + months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split( + '_' + ), + monthsShort: 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split( + '_' + ), + weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'), + weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'), + longDateFormat: { + LT: 'A h:mm વાગ્યે', + LTS: 'A h:mm:ss વાગ્યે', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm વાગ્યે', + LLLL: 'dddd, D MMMM YYYY, A h:mm વાગ્યે', + }, + calendar: { + sameDay: '[આજ] LT', + nextDay: '[કાલે] LT', + nextWeek: 'dddd, LT', + lastDay: '[ગઇકાલે] LT', + lastWeek: '[પાછલા] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s મા', + past: '%s પહેલા', + s: 'અમુક પળો', + ss: '%d સેકંડ', + m: 'એક મિનિટ', + mm: '%d મિનિટ', + h: 'એક કલાક', + hh: '%d કલાક', + d: 'એક દિવસ', + dd: '%d દિવસ', + M: 'એક મહિનો', + MM: '%d મહિનો', + y: 'એક વર્ષ', + yy: '%d વર્ષ', + }, + preparse: function (string) { + return string.replace(/[૧૨૩૪૫૬૭૮૯૦]/g, function (match) { + return numberMap$5[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$6[match]; + }); + }, + // Gujarati notation for meridiems are quite fuzzy in practice. While there exists + // a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati. + meridiemParse: /રાત|બપોર|સવાર|સાંજ/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'રાત') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'સવાર') { + return hour; + } else if (meridiem === 'બપોર') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'સાંજ') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'રાત'; + } else if (hour < 10) { + return 'સવાર'; + } else if (hour < 17) { + return 'બપોર'; + } else if (hour < 20) { + return 'સાંજ'; + } else { + return 'રાત'; + } + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('he', { + months: 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split( + '_' + ), + monthsShort: 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split( + '_' + ), + weekdays: 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'), + weekdaysShort: 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'), + weekdaysMin: 'א_ב_ג_ד_ה_ו_ש'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D [ב]MMMM YYYY', + LLL: 'D [ב]MMMM YYYY HH:mm', + LLLL: 'dddd, D [ב]MMMM YYYY HH:mm', + l: 'D/M/YYYY', + ll: 'D MMM YYYY', + lll: 'D MMM YYYY HH:mm', + llll: 'ddd, D MMM YYYY HH:mm', + }, + calendar: { + sameDay: '[היום ב־]LT', + nextDay: '[מחר ב־]LT', + nextWeek: 'dddd [בשעה] LT', + lastDay: '[אתמול ב־]LT', + lastWeek: '[ביום] dddd [האחרון בשעה] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'בעוד %s', + past: 'לפני %s', + s: 'מספר שניות', + ss: '%d שניות', + m: 'דקה', + mm: '%d דקות', + h: 'שעה', + hh: function (number) { + if (number === 2) { + return 'שעתיים'; + } + return number + ' שעות'; + }, + d: 'יום', + dd: function (number) { + if (number === 2) { + return 'יומיים'; + } + return number + ' ימים'; + }, + M: 'חודש', + MM: function (number) { + if (number === 2) { + return 'חודשיים'; + } + return number + ' חודשים'; + }, + y: 'שנה', + yy: function (number) { + if (number === 2) { + return 'שנתיים'; + } else if (number % 10 === 0 && number !== 10) { + return number + ' שנה'; + } + return number + ' שנים'; + }, + }, + meridiemParse: /אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i, + isPM: function (input) { + return /^(אחה"צ|אחרי הצהריים|בערב)$/.test(input); + }, + meridiem: function (hour, minute, isLower) { + if (hour < 5) { + return 'לפנות בוקר'; + } else if (hour < 10) { + return 'בבוקר'; + } else if (hour < 12) { + return isLower ? 'לפנה"צ' : 'לפני הצהריים'; + } else if (hour < 18) { + return isLower ? 'אחה"צ' : 'אחרי הצהריים'; + } else { + return 'בערב'; + } + }, + }); + + //! moment.js locale configuration + + var symbolMap$7 = { + '1': '१', + '2': '२', + '3': '३', + '4': '४', + '5': '५', + '6': '६', + '7': '७', + '8': '८', + '9': '९', + '0': '०', + }, + numberMap$6 = { + '१': '1', + '२': '2', + '३': '3', + '४': '4', + '५': '5', + '६': '6', + '७': '7', + '८': '8', + '९': '9', + '०': '0', + }; + + hooks.defineLocale('hi', { + months: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split( + '_' + ), + monthsShort: 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'), + weekdaysShort: 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'), + weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'), + longDateFormat: { + LT: 'A h:mm बजे', + LTS: 'A h:mm:ss बजे', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm बजे', + LLLL: 'dddd, D MMMM YYYY, A h:mm बजे', + }, + calendar: { + sameDay: '[आज] LT', + nextDay: '[कल] LT', + nextWeek: 'dddd, LT', + lastDay: '[कल] LT', + lastWeek: '[पिछले] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s में', + past: '%s पहले', + s: 'कुछ ही क्षण', + ss: '%d सेकंड', + m: 'एक मिनट', + mm: '%d मिनट', + h: 'एक घंटा', + hh: '%d घंटे', + d: 'एक दिन', + dd: '%d दिन', + M: 'एक महीने', + MM: '%d महीने', + y: 'एक वर्ष', + yy: '%d वर्ष', + }, + preparse: function (string) { + return string.replace(/[१२३४५६७८९०]/g, function (match) { + return numberMap$6[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$7[match]; + }); + }, + // Hindi notation for meridiems are quite fuzzy in practice. While there exists + // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi. + meridiemParse: /रात|सुबह|दोपहर|शाम/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'रात') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'सुबह') { + return hour; + } else if (meridiem === 'दोपहर') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'शाम') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'रात'; + } else if (hour < 10) { + return 'सुबह'; + } else if (hour < 17) { + return 'दोपहर'; + } else if (hour < 20) { + return 'शाम'; + } else { + return 'रात'; + } + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function translate$3(number, withoutSuffix, key) { + var result = number + ' '; + switch (key) { + case 'ss': + if (number === 1) { + result += 'sekunda'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'sekunde'; + } else { + result += 'sekundi'; + } + return result; + case 'm': + return withoutSuffix ? 'jedna minuta' : 'jedne minute'; + case 'mm': + if (number === 1) { + result += 'minuta'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'minute'; + } else { + result += 'minuta'; + } + return result; + case 'h': + return withoutSuffix ? 'jedan sat' : 'jednog sata'; + case 'hh': + if (number === 1) { + result += 'sat'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'sata'; + } else { + result += 'sati'; + } + return result; + case 'dd': + if (number === 1) { + result += 'dan'; + } else { + result += 'dana'; + } + return result; + case 'MM': + if (number === 1) { + result += 'mjesec'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'mjeseca'; + } else { + result += 'mjeseci'; + } + return result; + case 'yy': + if (number === 1) { + result += 'godina'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'godine'; + } else { + result += 'godina'; + } + return result; + } + } + + hooks.defineLocale('hr', { + months: { + format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split( + '_' + ), + standalone: 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split( + '_' + ), + }, + monthsShort: 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split( + '_' + ), + weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'), + weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'Do MMMM YYYY', + LLL: 'Do MMMM YYYY H:mm', + LLLL: 'dddd, Do MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[danas u] LT', + nextDay: '[sutra u] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[u] [nedjelju] [u] LT'; + case 3: + return '[u] [srijedu] [u] LT'; + case 6: + return '[u] [subotu] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[u] dddd [u] LT'; + } + }, + lastDay: '[jučer u] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[prošlu] [nedjelju] [u] LT'; + case 3: + return '[prošlu] [srijedu] [u] LT'; + case 6: + return '[prošle] [subote] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[prošli] dddd [u] LT'; + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'za %s', + past: 'prije %s', + s: 'par sekundi', + ss: translate$3, + m: translate$3, + mm: translate$3, + h: translate$3, + hh: translate$3, + d: 'dan', + dd: translate$3, + M: 'mjesec', + MM: translate$3, + y: 'godinu', + yy: translate$3, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split( + ' ' + ); + function translate$4(number, withoutSuffix, key, isFuture) { + var num = number; + switch (key) { + case 's': + return isFuture || withoutSuffix + ? 'néhány másodperc' + : 'néhány másodperce'; + case 'ss': + return num + (isFuture || withoutSuffix) + ? ' másodperc' + : ' másodperce'; + case 'm': + return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce'); + case 'mm': + return num + (isFuture || withoutSuffix ? ' perc' : ' perce'); + case 'h': + return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája'); + case 'hh': + return num + (isFuture || withoutSuffix ? ' óra' : ' órája'); + case 'd': + return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja'); + case 'dd': + return num + (isFuture || withoutSuffix ? ' nap' : ' napja'); + case 'M': + return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja'); + case 'MM': + return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja'); + case 'y': + return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve'); + case 'yy': + return num + (isFuture || withoutSuffix ? ' év' : ' éve'); + } + return ''; + } + function week(isFuture) { + return ( + (isFuture ? '' : '[múlt] ') + + '[' + + weekEndings[this.day()] + + '] LT[-kor]' + ); + } + + hooks.defineLocale('hu', { + months: 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split( + '_' + ), + monthsShort: 'jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec'.split( + '_' + ), + weekdays: 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'), + weekdaysShort: 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'), + weekdaysMin: 'v_h_k_sze_cs_p_szo'.split('_'), + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'YYYY.MM.DD.', + LL: 'YYYY. MMMM D.', + LLL: 'YYYY. MMMM D. H:mm', + LLLL: 'YYYY. MMMM D., dddd H:mm', + }, + meridiemParse: /de|du/i, + isPM: function (input) { + return input.charAt(1).toLowerCase() === 'u'; + }, + meridiem: function (hours, minutes, isLower) { + if (hours < 12) { + return isLower === true ? 'de' : 'DE'; + } else { + return isLower === true ? 'du' : 'DU'; + } + }, + calendar: { + sameDay: '[ma] LT[-kor]', + nextDay: '[holnap] LT[-kor]', + nextWeek: function () { + return week.call(this, true); + }, + lastDay: '[tegnap] LT[-kor]', + lastWeek: function () { + return week.call(this, false); + }, + sameElse: 'L', + }, + relativeTime: { + future: '%s múlva', + past: '%s', + s: translate$4, + ss: translate$4, + m: translate$4, + mm: translate$4, + h: translate$4, + hh: translate$4, + d: translate$4, + dd: translate$4, + M: translate$4, + MM: translate$4, + y: translate$4, + yy: translate$4, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('hy-am', { + months: { + format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split( + '_' + ), + standalone: 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split( + '_' + ), + }, + monthsShort: 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'), + weekdays: 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split( + '_' + ), + weekdaysShort: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'), + weekdaysMin: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY թ.', + LLL: 'D MMMM YYYY թ., HH:mm', + LLLL: 'dddd, D MMMM YYYY թ., HH:mm', + }, + calendar: { + sameDay: '[այսօր] LT', + nextDay: '[վաղը] LT', + lastDay: '[երեկ] LT', + nextWeek: function () { + return 'dddd [օրը ժամը] LT'; + }, + lastWeek: function () { + return '[անցած] dddd [օրը ժամը] LT'; + }, + sameElse: 'L', + }, + relativeTime: { + future: '%s հետո', + past: '%s առաջ', + s: 'մի քանի վայրկյան', + ss: '%d վայրկյան', + m: 'րոպե', + mm: '%d րոպե', + h: 'ժամ', + hh: '%d ժամ', + d: 'օր', + dd: '%d օր', + M: 'ամիս', + MM: '%d ամիս', + y: 'տարի', + yy: '%d տարի', + }, + meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/, + isPM: function (input) { + return /^(ցերեկվա|երեկոյան)$/.test(input); + }, + meridiem: function (hour) { + if (hour < 4) { + return 'գիշերվա'; + } else if (hour < 12) { + return 'առավոտվա'; + } else if (hour < 17) { + return 'ցերեկվա'; + } else { + return 'երեկոյան'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}|\d{1,2}-(ին|րդ)/, + ordinal: function (number, period) { + switch (period) { + case 'DDD': + case 'w': + case 'W': + case 'DDDo': + if (number === 1) { + return number + '-ին'; + } + return number + '-րդ'; + default: + return number; + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('id', { + months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des'.split('_'), + weekdays: 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'), + weekdaysShort: 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'), + weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'), + longDateFormat: { + LT: 'HH.mm', + LTS: 'HH.mm.ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY [pukul] HH.mm', + LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm', + }, + meridiemParse: /pagi|siang|sore|malam/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'pagi') { + return hour; + } else if (meridiem === 'siang') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'sore' || meridiem === 'malam') { + return hour + 12; + } + }, + meridiem: function (hours, minutes, isLower) { + if (hours < 11) { + return 'pagi'; + } else if (hours < 15) { + return 'siang'; + } else if (hours < 19) { + return 'sore'; + } else { + return 'malam'; + } + }, + calendar: { + sameDay: '[Hari ini pukul] LT', + nextDay: '[Besok pukul] LT', + nextWeek: 'dddd [pukul] LT', + lastDay: '[Kemarin pukul] LT', + lastWeek: 'dddd [lalu pukul] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'dalam %s', + past: '%s yang lalu', + s: 'beberapa detik', + ss: '%d detik', + m: 'semenit', + mm: '%d menit', + h: 'sejam', + hh: '%d jam', + d: 'sehari', + dd: '%d hari', + M: 'sebulan', + MM: '%d bulan', + y: 'setahun', + yy: '%d tahun', + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function plural$2(n) { + if (n % 100 === 11) { + return true; + } else if (n % 10 === 1) { + return false; + } + return true; + } + function translate$5(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + switch (key) { + case 's': + return withoutSuffix || isFuture + ? 'nokkrar sekúndur' + : 'nokkrum sekúndum'; + case 'ss': + if (plural$2(number)) { + return ( + result + + (withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum') + ); + } + return result + 'sekúnda'; + case 'm': + return withoutSuffix ? 'mínúta' : 'mínútu'; + case 'mm': + if (plural$2(number)) { + return ( + result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum') + ); + } else if (withoutSuffix) { + return result + 'mínúta'; + } + return result + 'mínútu'; + case 'hh': + if (plural$2(number)) { + return ( + result + + (withoutSuffix || isFuture + ? 'klukkustundir' + : 'klukkustundum') + ); + } + return result + 'klukkustund'; + case 'd': + if (withoutSuffix) { + return 'dagur'; + } + return isFuture ? 'dag' : 'degi'; + case 'dd': + if (plural$2(number)) { + if (withoutSuffix) { + return result + 'dagar'; + } + return result + (isFuture ? 'daga' : 'dögum'); + } else if (withoutSuffix) { + return result + 'dagur'; + } + return result + (isFuture ? 'dag' : 'degi'); + case 'M': + if (withoutSuffix) { + return 'mánuður'; + } + return isFuture ? 'mánuð' : 'mánuði'; + case 'MM': + if (plural$2(number)) { + if (withoutSuffix) { + return result + 'mánuðir'; + } + return result + (isFuture ? 'mánuði' : 'mánuðum'); + } else if (withoutSuffix) { + return result + 'mánuður'; + } + return result + (isFuture ? 'mánuð' : 'mánuði'); + case 'y': + return withoutSuffix || isFuture ? 'ár' : 'ári'; + case 'yy': + if (plural$2(number)) { + return result + (withoutSuffix || isFuture ? 'ár' : 'árum'); + } + return result + (withoutSuffix || isFuture ? 'ár' : 'ári'); + } + } + + hooks.defineLocale('is', { + months: 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split( + '_' + ), + monthsShort: 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'), + weekdays: 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split( + '_' + ), + weekdaysShort: 'sun_mán_þri_mið_fim_fös_lau'.split('_'), + weekdaysMin: 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'), + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY [kl.] H:mm', + LLLL: 'dddd, D. MMMM YYYY [kl.] H:mm', + }, + calendar: { + sameDay: '[í dag kl.] LT', + nextDay: '[á morgun kl.] LT', + nextWeek: 'dddd [kl.] LT', + lastDay: '[í gær kl.] LT', + lastWeek: '[síðasta] dddd [kl.] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'eftir %s', + past: 'fyrir %s síðan', + s: translate$5, + ss: translate$5, + m: translate$5, + mm: translate$5, + h: 'klukkustund', + hh: translate$5, + d: translate$5, + dd: translate$5, + M: translate$5, + MM: translate$5, + y: translate$5, + yy: translate$5, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('it-ch', { + months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split( + '_' + ), + monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'), + weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split( + '_' + ), + weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'), + weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Oggi alle] LT', + nextDay: '[Domani alle] LT', + nextWeek: 'dddd [alle] LT', + lastDay: '[Ieri alle] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[la scorsa] dddd [alle] LT'; + default: + return '[lo scorso] dddd [alle] LT'; + } + }, + sameElse: 'L', + }, + relativeTime: { + future: function (s) { + return (/^[0-9].+$/.test(s) ? 'tra' : 'in') + ' ' + s; + }, + past: '%s fa', + s: 'alcuni secondi', + ss: '%d secondi', + m: 'un minuto', + mm: '%d minuti', + h: "un'ora", + hh: '%d ore', + d: 'un giorno', + dd: '%d giorni', + M: 'un mese', + MM: '%d mesi', + y: 'un anno', + yy: '%d anni', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('it', { + months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split( + '_' + ), + monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'), + weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split( + '_' + ), + weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'), + weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: function () { + return ( + '[Oggi a' + + (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") + + ']LT' + ); + }, + nextDay: function () { + return ( + '[Domani a' + + (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") + + ']LT' + ); + }, + nextWeek: function () { + return ( + 'dddd [a' + + (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") + + ']LT' + ); + }, + lastDay: function () { + return ( + '[Ieri a' + + (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") + + ']LT' + ); + }, + lastWeek: function () { + switch (this.day()) { + case 0: + return ( + '[La scorsa] dddd [a' + + (this.hours() > 1 + ? 'lle ' + : this.hours() === 0 + ? ' ' + : "ll'") + + ']LT' + ); + default: + return ( + '[Lo scorso] dddd [a' + + (this.hours() > 1 + ? 'lle ' + : this.hours() === 0 + ? ' ' + : "ll'") + + ']LT' + ); + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'tra %s', + past: '%s fa', + s: 'alcuni secondi', + ss: '%d secondi', + m: 'un minuto', + mm: '%d minuti', + h: "un'ora", + hh: '%d ore', + d: 'un giorno', + dd: '%d giorni', + M: 'un mese', + MM: '%d mesi', + y: 'un anno', + yy: '%d anni', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('ja', { + eras: [ + { + since: '2019-05-01', + offset: 1, + name: '令和', + narrow: '㋿', + abbr: 'R', + }, + { + since: '1989-01-08', + until: '2019-04-30', + offset: 1, + name: '平成', + narrow: '㍻', + abbr: 'H', + }, + { + since: '1926-12-25', + until: '1989-01-07', + offset: 1, + name: '昭和', + narrow: '㍼', + abbr: 'S', + }, + { + since: '1912-07-30', + until: '1926-12-24', + offset: 1, + name: '大正', + narrow: '㍽', + abbr: 'T', + }, + { + since: '1873-01-01', + until: '1912-07-29', + offset: 6, + name: '明治', + narrow: '㍾', + abbr: 'M', + }, + { + since: '0001-01-01', + until: '1873-12-31', + offset: 1, + name: '西暦', + narrow: 'AD', + abbr: 'AD', + }, + { + since: '0000-12-31', + until: -Infinity, + offset: 1, + name: '紀元前', + narrow: 'BC', + abbr: 'BC', + }, + ], + eraYearOrdinalRegex: /(元|\d+)年/, + eraYearOrdinalParse: function (input, match) { + return match[1] === '元' ? 1 : parseInt(match[1] || input, 10); + }, + months: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'), + monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split( + '_' + ), + weekdays: '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'), + weekdaysShort: '日_月_火_水_木_金_土'.split('_'), + weekdaysMin: '日_月_火_水_木_金_土'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY/MM/DD', + LL: 'YYYY年M月D日', + LLL: 'YYYY年M月D日 HH:mm', + LLLL: 'YYYY年M月D日 dddd HH:mm', + l: 'YYYY/MM/DD', + ll: 'YYYY年M月D日', + lll: 'YYYY年M月D日 HH:mm', + llll: 'YYYY年M月D日(ddd) HH:mm', + }, + meridiemParse: /午前|午後/i, + isPM: function (input) { + return input === '午後'; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return '午前'; + } else { + return '午後'; + } + }, + calendar: { + sameDay: '[今日] LT', + nextDay: '[明日] LT', + nextWeek: function (now) { + if (now.week() !== this.week()) { + return '[来週]dddd LT'; + } else { + return 'dddd LT'; + } + }, + lastDay: '[昨日] LT', + lastWeek: function (now) { + if (this.week() !== now.week()) { + return '[先週]dddd LT'; + } else { + return 'dddd LT'; + } + }, + sameElse: 'L', + }, + dayOfMonthOrdinalParse: /\d{1,2}日/, + ordinal: function (number, period) { + switch (period) { + case 'y': + return number === 1 ? '元年' : number + '年'; + case 'd': + case 'D': + case 'DDD': + return number + '日'; + default: + return number; + } + }, + relativeTime: { + future: '%s後', + past: '%s前', + s: '数秒', + ss: '%d秒', + m: '1分', + mm: '%d分', + h: '1時間', + hh: '%d時間', + d: '1日', + dd: '%d日', + M: '1ヶ月', + MM: '%dヶ月', + y: '1年', + yy: '%d年', + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('jv', { + months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'), + weekdays: 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'), + weekdaysShort: 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'), + weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'), + longDateFormat: { + LT: 'HH.mm', + LTS: 'HH.mm.ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY [pukul] HH.mm', + LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm', + }, + meridiemParse: /enjing|siyang|sonten|ndalu/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'enjing') { + return hour; + } else if (meridiem === 'siyang') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'sonten' || meridiem === 'ndalu') { + return hour + 12; + } + }, + meridiem: function (hours, minutes, isLower) { + if (hours < 11) { + return 'enjing'; + } else if (hours < 15) { + return 'siyang'; + } else if (hours < 19) { + return 'sonten'; + } else { + return 'ndalu'; + } + }, + calendar: { + sameDay: '[Dinten puniko pukul] LT', + nextDay: '[Mbenjang pukul] LT', + nextWeek: 'dddd [pukul] LT', + lastDay: '[Kala wingi pukul] LT', + lastWeek: 'dddd [kepengker pukul] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'wonten ing %s', + past: '%s ingkang kepengker', + s: 'sawetawis detik', + ss: '%d detik', + m: 'setunggal menit', + mm: '%d menit', + h: 'setunggal jam', + hh: '%d jam', + d: 'sedinten', + dd: '%d dinten', + M: 'sewulan', + MM: '%d wulan', + y: 'setaun', + yy: '%d taun', + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('ka', { + months: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split( + '_' + ), + monthsShort: 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'), + weekdays: { + standalone: 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split( + '_' + ), + format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split( + '_' + ), + isFormat: /(წინა|შემდეგ)/, + }, + weekdaysShort: 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'), + weekdaysMin: 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[დღეს] LT[-ზე]', + nextDay: '[ხვალ] LT[-ზე]', + lastDay: '[გუშინ] LT[-ზე]', + nextWeek: '[შემდეგ] dddd LT[-ზე]', + lastWeek: '[წინა] dddd LT-ზე', + sameElse: 'L', + }, + relativeTime: { + future: function (s) { + return s.replace(/(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/, function ( + $0, + $1, + $2 + ) { + return $2 === 'ი' ? $1 + 'ში' : $1 + $2 + 'ში'; + }); + }, + past: function (s) { + if (/(წამი|წუთი|საათი|დღე|თვე)/.test(s)) { + return s.replace(/(ი|ე)$/, 'ის წინ'); + } + if (/წელი/.test(s)) { + return s.replace(/წელი$/, 'წლის წინ'); + } + return s; + }, + s: 'რამდენიმე წამი', + ss: '%d წამი', + m: 'წუთი', + mm: '%d წუთი', + h: 'საათი', + hh: '%d საათი', + d: 'დღე', + dd: '%d დღე', + M: 'თვე', + MM: '%d თვე', + y: 'წელი', + yy: '%d წელი', + }, + dayOfMonthOrdinalParse: /0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/, + ordinal: function (number) { + if (number === 0) { + return number; + } + if (number === 1) { + return number + '-ლი'; + } + if ( + number < 20 || + (number <= 100 && number % 20 === 0) || + number % 100 === 0 + ) { + return 'მე-' + number; + } + return number + '-ე'; + }, + week: { + dow: 1, + doy: 7, + }, + }); + + //! moment.js locale configuration + + var suffixes$1 = { + 0: '-ші', + 1: '-ші', + 2: '-ші', + 3: '-ші', + 4: '-ші', + 5: '-ші', + 6: '-шы', + 7: '-ші', + 8: '-ші', + 9: '-шы', + 10: '-шы', + 20: '-шы', + 30: '-шы', + 40: '-шы', + 50: '-ші', + 60: '-шы', + 70: '-ші', + 80: '-ші', + 90: '-шы', + 100: '-ші', + }; + + hooks.defineLocale('kk', { + months: 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split( + '_' + ), + monthsShort: 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'), + weekdays: 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split( + '_' + ), + weekdaysShort: 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'), + weekdaysMin: 'жк_дй_сй_ср_бй_жм_сн'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Бүгін сағат] LT', + nextDay: '[Ертең сағат] LT', + nextWeek: 'dddd [сағат] LT', + lastDay: '[Кеше сағат] LT', + lastWeek: '[Өткен аптаның] dddd [сағат] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s ішінде', + past: '%s бұрын', + s: 'бірнеше секунд', + ss: '%d секунд', + m: 'бір минут', + mm: '%d минут', + h: 'бір сағат', + hh: '%d сағат', + d: 'бір күн', + dd: '%d күн', + M: 'бір ай', + MM: '%d ай', + y: 'бір жыл', + yy: '%d жыл', + }, + dayOfMonthOrdinalParse: /\d{1,2}-(ші|шы)/, + ordinal: function (number) { + var a = number % 10, + b = number >= 100 ? 100 : null; + return number + (suffixes$1[number] || suffixes$1[a] || suffixes$1[b]); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap$8 = { + '1': '១', + '2': '២', + '3': '៣', + '4': '៤', + '5': '៥', + '6': '៦', + '7': '៧', + '8': '៨', + '9': '៩', + '0': '០', + }, + numberMap$7 = { + '១': '1', + '២': '2', + '៣': '3', + '៤': '4', + '៥': '5', + '៦': '6', + '៧': '7', + '៨': '8', + '៩': '9', + '០': '0', + }; + + hooks.defineLocale('km', { + months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split( + '_' + ), + monthsShort: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split( + '_' + ), + weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'), + weekdaysShort: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'), + weekdaysMin: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + meridiemParse: /ព្រឹក|ល្ងាច/, + isPM: function (input) { + return input === 'ល្ងាច'; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'ព្រឹក'; + } else { + return 'ល្ងាច'; + } + }, + calendar: { + sameDay: '[ថ្ងៃនេះ ម៉ោង] LT', + nextDay: '[ស្អែក ម៉ោង] LT', + nextWeek: 'dddd [ម៉ោង] LT', + lastDay: '[ម្សិលមិញ ម៉ោង] LT', + lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%sទៀត', + past: '%sមុន', + s: 'ប៉ុន្មានវិនាទី', + ss: '%d វិនាទី', + m: 'មួយនាទី', + mm: '%d នាទី', + h: 'មួយម៉ោង', + hh: '%d ម៉ោង', + d: 'មួយថ្ងៃ', + dd: '%d ថ្ងៃ', + M: 'មួយខែ', + MM: '%d ខែ', + y: 'មួយឆ្នាំ', + yy: '%d ឆ្នាំ', + }, + dayOfMonthOrdinalParse: /ទី\d{1,2}/, + ordinal: 'ទី%d', + preparse: function (string) { + return string.replace(/[១២៣៤៥៦៧៨៩០]/g, function (match) { + return numberMap$7[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$8[match]; + }); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap$9 = { + '1': '೧', + '2': '೨', + '3': '೩', + '4': '೪', + '5': '೫', + '6': '೬', + '7': '೭', + '8': '೮', + '9': '೯', + '0': '೦', + }, + numberMap$8 = { + '೧': '1', + '೨': '2', + '೩': '3', + '೪': '4', + '೫': '5', + '೬': '6', + '೭': '7', + '೮': '8', + '೯': '9', + '೦': '0', + }; + + hooks.defineLocale('kn', { + months: 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split( + '_' + ), + monthsShort: 'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split( + '_' + ), + weekdaysShort: 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'), + weekdaysMin: 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'), + longDateFormat: { + LT: 'A h:mm', + LTS: 'A h:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm', + LLLL: 'dddd, D MMMM YYYY, A h:mm', + }, + calendar: { + sameDay: '[ಇಂದು] LT', + nextDay: '[ನಾಳೆ] LT', + nextWeek: 'dddd, LT', + lastDay: '[ನಿನ್ನೆ] LT', + lastWeek: '[ಕೊನೆಯ] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s ನಂತರ', + past: '%s ಹಿಂದೆ', + s: 'ಕೆಲವು ಕ್ಷಣಗಳು', + ss: '%d ಸೆಕೆಂಡುಗಳು', + m: 'ಒಂದು ನಿಮಿಷ', + mm: '%d ನಿಮಿಷ', + h: 'ಒಂದು ಗಂಟೆ', + hh: '%d ಗಂಟೆ', + d: 'ಒಂದು ದಿನ', + dd: '%d ದಿನ', + M: 'ಒಂದು ತಿಂಗಳು', + MM: '%d ತಿಂಗಳು', + y: 'ಒಂದು ವರ್ಷ', + yy: '%d ವರ್ಷ', + }, + preparse: function (string) { + return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) { + return numberMap$8[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$9[match]; + }); + }, + meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'ರಾತ್ರಿ') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') { + return hour; + } else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'ಸಂಜೆ') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'ರಾತ್ರಿ'; + } else if (hour < 10) { + return 'ಬೆಳಿಗ್ಗೆ'; + } else if (hour < 17) { + return 'ಮಧ್ಯಾಹ್ನ'; + } else if (hour < 20) { + return 'ಸಂಜೆ'; + } else { + return 'ರಾತ್ರಿ'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}(ನೇ)/, + ordinal: function (number) { + return number + 'ನೇ'; + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('ko', { + months: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'), + monthsShort: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split( + '_' + ), + weekdays: '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'), + weekdaysShort: '일_월_화_수_목_금_토'.split('_'), + weekdaysMin: '일_월_화_수_목_금_토'.split('_'), + longDateFormat: { + LT: 'A h:mm', + LTS: 'A h:mm:ss', + L: 'YYYY.MM.DD.', + LL: 'YYYY년 MMMM D일', + LLL: 'YYYY년 MMMM D일 A h:mm', + LLLL: 'YYYY년 MMMM D일 dddd A h:mm', + l: 'YYYY.MM.DD.', + ll: 'YYYY년 MMMM D일', + lll: 'YYYY년 MMMM D일 A h:mm', + llll: 'YYYY년 MMMM D일 dddd A h:mm', + }, + calendar: { + sameDay: '오늘 LT', + nextDay: '내일 LT', + nextWeek: 'dddd LT', + lastDay: '어제 LT', + lastWeek: '지난주 dddd LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s 후', + past: '%s 전', + s: '몇 초', + ss: '%d초', + m: '1분', + mm: '%d분', + h: '한 시간', + hh: '%d시간', + d: '하루', + dd: '%d일', + M: '한 달', + MM: '%d달', + y: '일 년', + yy: '%d년', + }, + dayOfMonthOrdinalParse: /\d{1,2}(일|월|주)/, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '일'; + case 'M': + return number + '월'; + case 'w': + case 'W': + return number + '주'; + default: + return number; + } + }, + meridiemParse: /오전|오후/, + isPM: function (token) { + return token === '오후'; + }, + meridiem: function (hour, minute, isUpper) { + return hour < 12 ? '오전' : '오후'; + }, + }); + + //! moment.js locale configuration + + var symbolMap$a = { + '1': '١', + '2': '٢', + '3': '٣', + '4': '٤', + '5': '٥', + '6': '٦', + '7': '٧', + '8': '٨', + '9': '٩', + '0': '٠', + }, + numberMap$9 = { + '١': '1', + '٢': '2', + '٣': '3', + '٤': '4', + '٥': '5', + '٦': '6', + '٧': '7', + '٨': '8', + '٩': '9', + '٠': '0', + }, + months$8 = [ + 'کانونی دووەم', + 'شوبات', + 'ئازار', + 'نیسان', + 'ئایار', + 'حوزەیران', + 'تەمموز', + 'ئاب', + 'ئەیلوول', + 'تشرینی یەكەم', + 'تشرینی دووەم', + 'كانونی یەکەم', + ]; + + hooks.defineLocale('ku', { + months: months$8, + monthsShort: months$8, + weekdays: 'یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌'.split( + '_' + ), + weekdaysShort: 'یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌'.split( + '_' + ), + weekdaysMin: 'ی_د_س_چ_پ_ه_ش'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + meridiemParse: /ئێواره‌|به‌یانی/, + isPM: function (input) { + return /ئێواره‌/.test(input); + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'به‌یانی'; + } else { + return 'ئێواره‌'; + } + }, + calendar: { + sameDay: '[ئه‌مرۆ كاتژمێر] LT', + nextDay: '[به‌یانی كاتژمێر] LT', + nextWeek: 'dddd [كاتژمێر] LT', + lastDay: '[دوێنێ كاتژمێر] LT', + lastWeek: 'dddd [كاتژمێر] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'له‌ %s', + past: '%s', + s: 'چه‌ند چركه‌یه‌ك', + ss: 'چركه‌ %d', + m: 'یه‌ك خوله‌ك', + mm: '%d خوله‌ك', + h: 'یه‌ك كاتژمێر', + hh: '%d كاتژمێر', + d: 'یه‌ك ڕۆژ', + dd: '%d ڕۆژ', + M: 'یه‌ك مانگ', + MM: '%d مانگ', + y: 'یه‌ك ساڵ', + yy: '%d ساڵ', + }, + preparse: function (string) { + return string + .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { + return numberMap$9[match]; + }) + .replace(/،/g, ','); + }, + postformat: function (string) { + return string + .replace(/\d/g, function (match) { + return symbolMap$a[match]; + }) + .replace(/,/g, '،'); + }, + week: { + dow: 6, // Saturday is the first day of the week. + doy: 12, // The week that contains Jan 12th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var suffixes$2 = { + 0: '-чү', + 1: '-чи', + 2: '-чи', + 3: '-чү', + 4: '-чү', + 5: '-чи', + 6: '-чы', + 7: '-чи', + 8: '-чи', + 9: '-чу', + 10: '-чу', + 20: '-чы', + 30: '-чу', + 40: '-чы', + 50: '-чү', + 60: '-чы', + 70: '-чи', + 80: '-чи', + 90: '-чу', + 100: '-чү', + }; + + hooks.defineLocale('ky', { + months: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split( + '_' + ), + monthsShort: 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split( + '_' + ), + weekdays: 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split( + '_' + ), + weekdaysShort: 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'), + weekdaysMin: 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Бүгүн саат] LT', + nextDay: '[Эртең саат] LT', + nextWeek: 'dddd [саат] LT', + lastDay: '[Кечээ саат] LT', + lastWeek: '[Өткөн аптанын] dddd [күнү] [саат] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s ичинде', + past: '%s мурун', + s: 'бирнече секунд', + ss: '%d секунд', + m: 'бир мүнөт', + mm: '%d мүнөт', + h: 'бир саат', + hh: '%d саат', + d: 'бир күн', + dd: '%d күн', + M: 'бир ай', + MM: '%d ай', + y: 'бир жыл', + yy: '%d жыл', + }, + dayOfMonthOrdinalParse: /\d{1,2}-(чи|чы|чү|чу)/, + ordinal: function (number) { + var a = number % 10, + b = number >= 100 ? 100 : null; + return number + (suffixes$2[number] || suffixes$2[a] || suffixes$2[b]); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function processRelativeTime$6(number, withoutSuffix, key, isFuture) { + var format = { + m: ['eng Minutt', 'enger Minutt'], + h: ['eng Stonn', 'enger Stonn'], + d: ['een Dag', 'engem Dag'], + M: ['ee Mount', 'engem Mount'], + y: ['ee Joer', 'engem Joer'], + }; + return withoutSuffix ? format[key][0] : format[key][1]; + } + function processFutureTime(string) { + var number = string.substr(0, string.indexOf(' ')); + if (eifelerRegelAppliesToNumber(number)) { + return 'a ' + string; + } + return 'an ' + string; + } + function processPastTime(string) { + var number = string.substr(0, string.indexOf(' ')); + if (eifelerRegelAppliesToNumber(number)) { + return 'viru ' + string; + } + return 'virun ' + string; + } + /** + * Returns true if the word before the given number loses the '-n' ending. + * e.g. 'an 10 Deeg' but 'a 5 Deeg' + * + * @param number {integer} + * @returns {boolean} + */ + function eifelerRegelAppliesToNumber(number) { + number = parseInt(number, 10); + if (isNaN(number)) { + return false; + } + if (number < 0) { + // Negative Number --> always true + return true; + } else if (number < 10) { + // Only 1 digit + if (4 <= number && number <= 7) { + return true; + } + return false; + } else if (number < 100) { + // 2 digits + var lastDigit = number % 10, + firstDigit = number / 10; + if (lastDigit === 0) { + return eifelerRegelAppliesToNumber(firstDigit); + } + return eifelerRegelAppliesToNumber(lastDigit); + } else if (number < 10000) { + // 3 or 4 digits --> recursively check first digit + while (number >= 10) { + number = number / 10; + } + return eifelerRegelAppliesToNumber(number); + } else { + // Anything larger than 4 digits: recursively check first n-3 digits + number = number / 1000; + return eifelerRegelAppliesToNumber(number); + } + } + + hooks.defineLocale('lb', { + months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split( + '_' + ), + monthsShort: 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split( + '_' + ), + weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'), + weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm [Auer]', + LTS: 'H:mm:ss [Auer]', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm [Auer]', + LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]', + }, + calendar: { + sameDay: '[Haut um] LT', + sameElse: 'L', + nextDay: '[Muer um] LT', + nextWeek: 'dddd [um] LT', + lastDay: '[Gëschter um] LT', + lastWeek: function () { + // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule + switch (this.day()) { + case 2: + case 4: + return '[Leschten] dddd [um] LT'; + default: + return '[Leschte] dddd [um] LT'; + } + }, + }, + relativeTime: { + future: processFutureTime, + past: processPastTime, + s: 'e puer Sekonnen', + ss: '%d Sekonnen', + m: processRelativeTime$6, + mm: '%d Minutten', + h: processRelativeTime$6, + hh: '%d Stonnen', + d: processRelativeTime$6, + dd: '%d Deeg', + M: processRelativeTime$6, + MM: '%d Méint', + y: processRelativeTime$6, + yy: '%d Joer', + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('lo', { + months: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split( + '_' + ), + monthsShort: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split( + '_' + ), + weekdays: 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'), + weekdaysShort: 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'), + weekdaysMin: 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'ວັນdddd D MMMM YYYY HH:mm', + }, + meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/, + isPM: function (input) { + return input === 'ຕອນແລງ'; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'ຕອນເຊົ້າ'; + } else { + return 'ຕອນແລງ'; + } + }, + calendar: { + sameDay: '[ມື້ນີ້ເວລາ] LT', + nextDay: '[ມື້ອື່ນເວລາ] LT', + nextWeek: '[ວັນ]dddd[ໜ້າເວລາ] LT', + lastDay: '[ມື້ວານນີ້ເວລາ] LT', + lastWeek: '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'ອີກ %s', + past: '%sຜ່ານມາ', + s: 'ບໍ່ເທົ່າໃດວິນາທີ', + ss: '%d ວິນາທີ', + m: '1 ນາທີ', + mm: '%d ນາທີ', + h: '1 ຊົ່ວໂມງ', + hh: '%d ຊົ່ວໂມງ', + d: '1 ມື້', + dd: '%d ມື້', + M: '1 ເດືອນ', + MM: '%d ເດືອນ', + y: '1 ປີ', + yy: '%d ປີ', + }, + dayOfMonthOrdinalParse: /(ທີ່)\d{1,2}/, + ordinal: function (number) { + return 'ທີ່' + number; + }, + }); + + //! moment.js locale configuration + + var units = { + ss: 'sekundė_sekundžių_sekundes', + m: 'minutė_minutės_minutę', + mm: 'minutės_minučių_minutes', + h: 'valanda_valandos_valandą', + hh: 'valandos_valandų_valandas', + d: 'diena_dienos_dieną', + dd: 'dienos_dienų_dienas', + M: 'mėnuo_mėnesio_mėnesį', + MM: 'mėnesiai_mėnesių_mėnesius', + y: 'metai_metų_metus', + yy: 'metai_metų_metus', + }; + function translateSeconds(number, withoutSuffix, key, isFuture) { + if (withoutSuffix) { + return 'kelios sekundės'; + } else { + return isFuture ? 'kelių sekundžių' : 'kelias sekundes'; + } + } + function translateSingular(number, withoutSuffix, key, isFuture) { + return withoutSuffix + ? forms(key)[0] + : isFuture + ? forms(key)[1] + : forms(key)[2]; + } + function special(number) { + return number % 10 === 0 || (number > 10 && number < 20); + } + function forms(key) { + return units[key].split('_'); + } + function translate$6(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + if (number === 1) { + return ( + result + translateSingular(number, withoutSuffix, key[0], isFuture) + ); + } else if (withoutSuffix) { + return result + (special(number) ? forms(key)[1] : forms(key)[0]); + } else { + if (isFuture) { + return result + forms(key)[1]; + } else { + return result + (special(number) ? forms(key)[1] : forms(key)[2]); + } + } + } + hooks.defineLocale('lt', { + months: { + format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split( + '_' + ), + standalone: 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split( + '_' + ), + isFormat: /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/, + }, + monthsShort: 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'), + weekdays: { + format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split( + '_' + ), + standalone: 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split( + '_' + ), + isFormat: /dddd HH:mm/, + }, + weekdaysShort: 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'), + weekdaysMin: 'S_P_A_T_K_Pn_Š'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY-MM-DD', + LL: 'YYYY [m.] MMMM D [d.]', + LLL: 'YYYY [m.] MMMM D [d.], HH:mm [val.]', + LLLL: 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]', + l: 'YYYY-MM-DD', + ll: 'YYYY [m.] MMMM D [d.]', + lll: 'YYYY [m.] MMMM D [d.], HH:mm [val.]', + llll: 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]', + }, + calendar: { + sameDay: '[Šiandien] LT', + nextDay: '[Rytoj] LT', + nextWeek: 'dddd LT', + lastDay: '[Vakar] LT', + lastWeek: '[Praėjusį] dddd LT', + sameElse: 'L', + }, + relativeTime: { + future: 'po %s', + past: 'prieš %s', + s: translateSeconds, + ss: translate$6, + m: translateSingular, + mm: translate$6, + h: translateSingular, + hh: translate$6, + d: translateSingular, + dd: translate$6, + M: translateSingular, + MM: translate$6, + y: translateSingular, + yy: translate$6, + }, + dayOfMonthOrdinalParse: /\d{1,2}-oji/, + ordinal: function (number) { + return number + '-oji'; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var units$1 = { + ss: 'sekundes_sekundēm_sekunde_sekundes'.split('_'), + m: 'minūtes_minūtēm_minūte_minūtes'.split('_'), + mm: 'minūtes_minūtēm_minūte_minūtes'.split('_'), + h: 'stundas_stundām_stunda_stundas'.split('_'), + hh: 'stundas_stundām_stunda_stundas'.split('_'), + d: 'dienas_dienām_diena_dienas'.split('_'), + dd: 'dienas_dienām_diena_dienas'.split('_'), + M: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'), + MM: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'), + y: 'gada_gadiem_gads_gadi'.split('_'), + yy: 'gada_gadiem_gads_gadi'.split('_'), + }; + /** + * @param withoutSuffix boolean true = a length of time; false = before/after a period of time. + */ + function format$1(forms, number, withoutSuffix) { + if (withoutSuffix) { + // E.g. "21 minūte", "3 minūtes". + return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3]; + } else { + // E.g. "21 minūtes" as in "pēc 21 minūtes". + // E.g. "3 minūtēm" as in "pēc 3 minūtēm". + return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1]; + } + } + function relativeTimeWithPlural$1(number, withoutSuffix, key) { + return number + ' ' + format$1(units$1[key], number, withoutSuffix); + } + function relativeTimeWithSingular(number, withoutSuffix, key) { + return format$1(units$1[key], number, withoutSuffix); + } + function relativeSeconds(number, withoutSuffix) { + return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm'; + } + + hooks.defineLocale('lv', { + months: 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split( + '_' + ), + monthsShort: 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'), + weekdays: 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split( + '_' + ), + weekdaysShort: 'Sv_P_O_T_C_Pk_S'.split('_'), + weekdaysMin: 'Sv_P_O_T_C_Pk_S'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY.', + LL: 'YYYY. [gada] D. MMMM', + LLL: 'YYYY. [gada] D. MMMM, HH:mm', + LLLL: 'YYYY. [gada] D. MMMM, dddd, HH:mm', + }, + calendar: { + sameDay: '[Šodien pulksten] LT', + nextDay: '[Rīt pulksten] LT', + nextWeek: 'dddd [pulksten] LT', + lastDay: '[Vakar pulksten] LT', + lastWeek: '[Pagājušā] dddd [pulksten] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'pēc %s', + past: 'pirms %s', + s: relativeSeconds, + ss: relativeTimeWithPlural$1, + m: relativeTimeWithSingular, + mm: relativeTimeWithPlural$1, + h: relativeTimeWithSingular, + hh: relativeTimeWithPlural$1, + d: relativeTimeWithSingular, + dd: relativeTimeWithPlural$1, + M: relativeTimeWithSingular, + MM: relativeTimeWithPlural$1, + y: relativeTimeWithSingular, + yy: relativeTimeWithPlural$1, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var translator = { + words: { + //Different grammatical cases + ss: ['sekund', 'sekunda', 'sekundi'], + m: ['jedan minut', 'jednog minuta'], + mm: ['minut', 'minuta', 'minuta'], + h: ['jedan sat', 'jednog sata'], + hh: ['sat', 'sata', 'sati'], + dd: ['dan', 'dana', 'dana'], + MM: ['mjesec', 'mjeseca', 'mjeseci'], + yy: ['godina', 'godine', 'godina'], + }, + correctGrammaticalCase: function (number, wordKey) { + return number === 1 + ? wordKey[0] + : number >= 2 && number <= 4 + ? wordKey[1] + : wordKey[2]; + }, + translate: function (number, withoutSuffix, key) { + var wordKey = translator.words[key]; + if (key.length === 1) { + return withoutSuffix ? wordKey[0] : wordKey[1]; + } else { + return ( + number + + ' ' + + translator.correctGrammaticalCase(number, wordKey) + ); + } + }, + }; + + hooks.defineLocale('me', { + months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split( + '_' + ), + monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split( + '_' + ), + weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'), + weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[danas u] LT', + nextDay: '[sjutra u] LT', + + nextWeek: function () { + switch (this.day()) { + case 0: + return '[u] [nedjelju] [u] LT'; + case 3: + return '[u] [srijedu] [u] LT'; + case 6: + return '[u] [subotu] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[u] dddd [u] LT'; + } + }, + lastDay: '[juče u] LT', + lastWeek: function () { + var lastWeekDays = [ + '[prošle] [nedjelje] [u] LT', + '[prošlog] [ponedjeljka] [u] LT', + '[prošlog] [utorka] [u] LT', + '[prošle] [srijede] [u] LT', + '[prošlog] [četvrtka] [u] LT', + '[prošlog] [petka] [u] LT', + '[prošle] [subote] [u] LT', + ]; + return lastWeekDays[this.day()]; + }, + sameElse: 'L', + }, + relativeTime: { + future: 'za %s', + past: 'prije %s', + s: 'nekoliko sekundi', + ss: translator.translate, + m: translator.translate, + mm: translator.translate, + h: translator.translate, + hh: translator.translate, + d: 'dan', + dd: translator.translate, + M: 'mjesec', + MM: translator.translate, + y: 'godinu', + yy: translator.translate, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('mi', { + months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split( + '_' + ), + monthsShort: 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split( + '_' + ), + monthsRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i, + monthsStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i, + monthsShortRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i, + monthsShortStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i, + weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'), + weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'), + weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY [i] HH:mm', + LLLL: 'dddd, D MMMM YYYY [i] HH:mm', + }, + calendar: { + sameDay: '[i teie mahana, i] LT', + nextDay: '[apopo i] LT', + nextWeek: 'dddd [i] LT', + lastDay: '[inanahi i] LT', + lastWeek: 'dddd [whakamutunga i] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'i roto i %s', + past: '%s i mua', + s: 'te hēkona ruarua', + ss: '%d hēkona', + m: 'he meneti', + mm: '%d meneti', + h: 'te haora', + hh: '%d haora', + d: 'he ra', + dd: '%d ra', + M: 'he marama', + MM: '%d marama', + y: 'he tau', + yy: '%d tau', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('mk', { + months: 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split( + '_' + ), + monthsShort: 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'), + weekdays: 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split( + '_' + ), + weekdaysShort: 'нед_пон_вто_сре_чет_пет_саб'.split('_'), + weekdaysMin: 'нe_пo_вт_ср_че_пе_сa'.split('_'), + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'D.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY H:mm', + LLLL: 'dddd, D MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[Денес во] LT', + nextDay: '[Утре во] LT', + nextWeek: '[Во] dddd [во] LT', + lastDay: '[Вчера во] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + case 3: + case 6: + return '[Изминатата] dddd [во] LT'; + case 1: + case 2: + case 4: + case 5: + return '[Изминатиот] dddd [во] LT'; + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'за %s', + past: 'пред %s', + s: 'неколку секунди', + ss: '%d секунди', + m: 'една минута', + mm: '%d минути', + h: 'еден час', + hh: '%d часа', + d: 'еден ден', + dd: '%d дена', + M: 'еден месец', + MM: '%d месеци', + y: 'една година', + yy: '%d години', + }, + dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/, + ordinal: function (number) { + var lastDigit = number % 10, + last2Digits = number % 100; + if (number === 0) { + return number + '-ев'; + } else if (last2Digits === 0) { + return number + '-ен'; + } else if (last2Digits > 10 && last2Digits < 20) { + return number + '-ти'; + } else if (lastDigit === 1) { + return number + '-ви'; + } else if (lastDigit === 2) { + return number + '-ри'; + } else if (lastDigit === 7 || lastDigit === 8) { + return number + '-ми'; + } else { + return number + '-ти'; + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('ml', { + months: 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split( + '_' + ), + monthsShort: 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split( + '_' + ), + weekdaysShort: 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'), + weekdaysMin: 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'), + longDateFormat: { + LT: 'A h:mm -നു', + LTS: 'A h:mm:ss -നു', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm -നു', + LLLL: 'dddd, D MMMM YYYY, A h:mm -നു', + }, + calendar: { + sameDay: '[ഇന്ന്] LT', + nextDay: '[നാളെ] LT', + nextWeek: 'dddd, LT', + lastDay: '[ഇന്നലെ] LT', + lastWeek: '[കഴിഞ്ഞ] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s കഴിഞ്ഞ്', + past: '%s മുൻപ്', + s: 'അൽപ നിമിഷങ്ങൾ', + ss: '%d സെക്കൻഡ്', + m: 'ഒരു മിനിറ്റ്', + mm: '%d മിനിറ്റ്', + h: 'ഒരു മണിക്കൂർ', + hh: '%d മണിക്കൂർ', + d: 'ഒരു ദിവസം', + dd: '%d ദിവസം', + M: 'ഒരു മാസം', + MM: '%d മാസം', + y: 'ഒരു വർഷം', + yy: '%d വർഷം', + }, + meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if ( + (meridiem === 'രാത്രി' && hour >= 4) || + meridiem === 'ഉച്ച കഴിഞ്ഞ്' || + meridiem === 'വൈകുന്നേരം' + ) { + return hour + 12; + } else { + return hour; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'രാത്രി'; + } else if (hour < 12) { + return 'രാവിലെ'; + } else if (hour < 17) { + return 'ഉച്ച കഴിഞ്ഞ്'; + } else if (hour < 20) { + return 'വൈകുന്നേരം'; + } else { + return 'രാത്രി'; + } + }, + }); + + //! moment.js locale configuration + + function translate$7(number, withoutSuffix, key, isFuture) { + switch (key) { + case 's': + return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын'; + case 'ss': + return number + (withoutSuffix ? ' секунд' : ' секундын'); + case 'm': + case 'mm': + return number + (withoutSuffix ? ' минут' : ' минутын'); + case 'h': + case 'hh': + return number + (withoutSuffix ? ' цаг' : ' цагийн'); + case 'd': + case 'dd': + return number + (withoutSuffix ? ' өдөр' : ' өдрийн'); + case 'M': + case 'MM': + return number + (withoutSuffix ? ' сар' : ' сарын'); + case 'y': + case 'yy': + return number + (withoutSuffix ? ' жил' : ' жилийн'); + default: + return number; + } + } + + hooks.defineLocale('mn', { + months: 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split( + '_' + ), + monthsShort: '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба'.split('_'), + weekdaysShort: 'Ням_Дав_Мяг_Лха_Пүр_Баа_Бям'.split('_'), + weekdaysMin: 'Ня_Да_Мя_Лх_Пү_Ба_Бя'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY-MM-DD', + LL: 'YYYY оны MMMMын D', + LLL: 'YYYY оны MMMMын D HH:mm', + LLLL: 'dddd, YYYY оны MMMMын D HH:mm', + }, + meridiemParse: /ҮӨ|ҮХ/i, + isPM: function (input) { + return input === 'ҮХ'; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'ҮӨ'; + } else { + return 'ҮХ'; + } + }, + calendar: { + sameDay: '[Өнөөдөр] LT', + nextDay: '[Маргааш] LT', + nextWeek: '[Ирэх] dddd LT', + lastDay: '[Өчигдөр] LT', + lastWeek: '[Өнгөрсөн] dddd LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s дараа', + past: '%s өмнө', + s: translate$7, + ss: translate$7, + m: translate$7, + mm: translate$7, + h: translate$7, + hh: translate$7, + d: translate$7, + dd: translate$7, + M: translate$7, + MM: translate$7, + y: translate$7, + yy: translate$7, + }, + dayOfMonthOrdinalParse: /\d{1,2} өдөр/, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + ' өдөр'; + default: + return number; + } + }, + }); + + //! moment.js locale configuration + + var symbolMap$b = { + '1': '१', + '2': '२', + '3': '३', + '4': '४', + '5': '५', + '6': '६', + '7': '७', + '8': '८', + '9': '९', + '0': '०', + }, + numberMap$a = { + '१': '1', + '२': '2', + '३': '3', + '४': '4', + '५': '5', + '६': '6', + '७': '7', + '८': '8', + '९': '9', + '०': '0', + }; + + function relativeTimeMr(number, withoutSuffix, string, isFuture) { + var output = ''; + if (withoutSuffix) { + switch (string) { + case 's': + output = 'काही सेकंद'; + break; + case 'ss': + output = '%d सेकंद'; + break; + case 'm': + output = 'एक मिनिट'; + break; + case 'mm': + output = '%d मिनिटे'; + break; + case 'h': + output = 'एक तास'; + break; + case 'hh': + output = '%d तास'; + break; + case 'd': + output = 'एक दिवस'; + break; + case 'dd': + output = '%d दिवस'; + break; + case 'M': + output = 'एक महिना'; + break; + case 'MM': + output = '%d महिने'; + break; + case 'y': + output = 'एक वर्ष'; + break; + case 'yy': + output = '%d वर्षे'; + break; + } + } else { + switch (string) { + case 's': + output = 'काही सेकंदां'; + break; + case 'ss': + output = '%d सेकंदां'; + break; + case 'm': + output = 'एका मिनिटा'; + break; + case 'mm': + output = '%d मिनिटां'; + break; + case 'h': + output = 'एका तासा'; + break; + case 'hh': + output = '%d तासां'; + break; + case 'd': + output = 'एका दिवसा'; + break; + case 'dd': + output = '%d दिवसां'; + break; + case 'M': + output = 'एका महिन्या'; + break; + case 'MM': + output = '%d महिन्यां'; + break; + case 'y': + output = 'एका वर्षा'; + break; + case 'yy': + output = '%d वर्षां'; + break; + } + } + return output.replace(/%d/i, number); + } + + hooks.defineLocale('mr', { + months: 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split( + '_' + ), + monthsShort: 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'), + weekdaysShort: 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'), + weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'), + longDateFormat: { + LT: 'A h:mm वाजता', + LTS: 'A h:mm:ss वाजता', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm वाजता', + LLLL: 'dddd, D MMMM YYYY, A h:mm वाजता', + }, + calendar: { + sameDay: '[आज] LT', + nextDay: '[उद्या] LT', + nextWeek: 'dddd, LT', + lastDay: '[काल] LT', + lastWeek: '[मागील] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%sमध्ये', + past: '%sपूर्वी', + s: relativeTimeMr, + ss: relativeTimeMr, + m: relativeTimeMr, + mm: relativeTimeMr, + h: relativeTimeMr, + hh: relativeTimeMr, + d: relativeTimeMr, + dd: relativeTimeMr, + M: relativeTimeMr, + MM: relativeTimeMr, + y: relativeTimeMr, + yy: relativeTimeMr, + }, + preparse: function (string) { + return string.replace(/[१२३४५६७८९०]/g, function (match) { + return numberMap$a[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$b[match]; + }); + }, + meridiemParse: /पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'पहाटे' || meridiem === 'सकाळी') { + return hour; + } else if ( + meridiem === 'दुपारी' || + meridiem === 'सायंकाळी' || + meridiem === 'रात्री' + ) { + return hour >= 12 ? hour : hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour >= 0 && hour < 6) { + return 'पहाटे'; + } else if (hour < 12) { + return 'सकाळी'; + } else if (hour < 17) { + return 'दुपारी'; + } else if (hour < 20) { + return 'सायंकाळी'; + } else { + return 'रात्री'; + } + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('ms-my', { + months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'), + weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'), + weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'), + weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'), + longDateFormat: { + LT: 'HH.mm', + LTS: 'HH.mm.ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY [pukul] HH.mm', + LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm', + }, + meridiemParse: /pagi|tengahari|petang|malam/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'pagi') { + return hour; + } else if (meridiem === 'tengahari') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'petang' || meridiem === 'malam') { + return hour + 12; + } + }, + meridiem: function (hours, minutes, isLower) { + if (hours < 11) { + return 'pagi'; + } else if (hours < 15) { + return 'tengahari'; + } else if (hours < 19) { + return 'petang'; + } else { + return 'malam'; + } + }, + calendar: { + sameDay: '[Hari ini pukul] LT', + nextDay: '[Esok pukul] LT', + nextWeek: 'dddd [pukul] LT', + lastDay: '[Kelmarin pukul] LT', + lastWeek: 'dddd [lepas pukul] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'dalam %s', + past: '%s yang lepas', + s: 'beberapa saat', + ss: '%d saat', + m: 'seminit', + mm: '%d minit', + h: 'sejam', + hh: '%d jam', + d: 'sehari', + dd: '%d hari', + M: 'sebulan', + MM: '%d bulan', + y: 'setahun', + yy: '%d tahun', + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('ms', { + months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'), + weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'), + weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'), + weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'), + longDateFormat: { + LT: 'HH.mm', + LTS: 'HH.mm.ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY [pukul] HH.mm', + LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm', + }, + meridiemParse: /pagi|tengahari|petang|malam/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'pagi') { + return hour; + } else if (meridiem === 'tengahari') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'petang' || meridiem === 'malam') { + return hour + 12; + } + }, + meridiem: function (hours, minutes, isLower) { + if (hours < 11) { + return 'pagi'; + } else if (hours < 15) { + return 'tengahari'; + } else if (hours < 19) { + return 'petang'; + } else { + return 'malam'; + } + }, + calendar: { + sameDay: '[Hari ini pukul] LT', + nextDay: '[Esok pukul] LT', + nextWeek: 'dddd [pukul] LT', + lastDay: '[Kelmarin pukul] LT', + lastWeek: 'dddd [lepas pukul] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'dalam %s', + past: '%s yang lepas', + s: 'beberapa saat', + ss: '%d saat', + m: 'seminit', + mm: '%d minit', + h: 'sejam', + hh: '%d jam', + d: 'sehari', + dd: '%d hari', + M: 'sebulan', + MM: '%d bulan', + y: 'setahun', + yy: '%d tahun', + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('mt', { + months: 'Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru'.split( + '_' + ), + monthsShort: 'Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ'.split('_'), + weekdays: 'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt'.split( + '_' + ), + weekdaysShort: 'Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib'.split('_'), + weekdaysMin: 'Ħa_Tn_Tl_Er_Ħa_Ġi_Si'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Illum fil-]LT', + nextDay: '[Għada fil-]LT', + nextWeek: 'dddd [fil-]LT', + lastDay: '[Il-bieraħ fil-]LT', + lastWeek: 'dddd [li għadda] [fil-]LT', + sameElse: 'L', + }, + relativeTime: { + future: 'f’ %s', + past: '%s ilu', + s: 'ftit sekondi', + ss: '%d sekondi', + m: 'minuta', + mm: '%d minuti', + h: 'siegħa', + hh: '%d siegħat', + d: 'ġurnata', + dd: '%d ġranet', + M: 'xahar', + MM: '%d xhur', + y: 'sena', + yy: '%d sni', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap$c = { + '1': '၁', + '2': '၂', + '3': '၃', + '4': '၄', + '5': '၅', + '6': '၆', + '7': '၇', + '8': '၈', + '9': '၉', + '0': '၀', + }, + numberMap$b = { + '၁': '1', + '၂': '2', + '၃': '3', + '၄': '4', + '၅': '5', + '၆': '6', + '၇': '7', + '၈': '8', + '၉': '9', + '၀': '0', + }; + + hooks.defineLocale('my', { + months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split( + '_' + ), + monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'), + weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split( + '_' + ), + weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'), + weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'), + + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[ယနေ.] LT [မှာ]', + nextDay: '[မနက်ဖြန်] LT [မှာ]', + nextWeek: 'dddd LT [မှာ]', + lastDay: '[မနေ.က] LT [မှာ]', + lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]', + sameElse: 'L', + }, + relativeTime: { + future: 'လာမည့် %s မှာ', + past: 'လွန်ခဲ့သော %s က', + s: 'စက္ကန်.အနည်းငယ်', + ss: '%d စက္ကန့်', + m: 'တစ်မိနစ်', + mm: '%d မိနစ်', + h: 'တစ်နာရီ', + hh: '%d နာရီ', + d: 'တစ်ရက်', + dd: '%d ရက်', + M: 'တစ်လ', + MM: '%d လ', + y: 'တစ်နှစ်', + yy: '%d နှစ်', + }, + preparse: function (string) { + return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) { + return numberMap$b[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$c[match]; + }); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('nb', { + months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split( + '_' + ), + monthsShort: 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'), + weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'), + weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY [kl.] HH:mm', + LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm', + }, + calendar: { + sameDay: '[i dag kl.] LT', + nextDay: '[i morgen kl.] LT', + nextWeek: 'dddd [kl.] LT', + lastDay: '[i går kl.] LT', + lastWeek: '[forrige] dddd [kl.] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'om %s', + past: '%s siden', + s: 'noen sekunder', + ss: '%d sekunder', + m: 'ett minutt', + mm: '%d minutter', + h: 'en time', + hh: '%d timer', + d: 'en dag', + dd: '%d dager', + M: 'en måned', + MM: '%d måneder', + y: 'ett år', + yy: '%d år', + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap$d = { + '1': '१', + '2': '२', + '3': '३', + '4': '४', + '5': '५', + '6': '६', + '7': '७', + '8': '८', + '9': '९', + '0': '०', + }, + numberMap$c = { + '१': '1', + '२': '2', + '३': '3', + '४': '4', + '५': '5', + '६': '6', + '७': '7', + '८': '8', + '९': '9', + '०': '0', + }; + + hooks.defineLocale('ne', { + months: 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split( + '_' + ), + monthsShort: 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split( + '_' + ), + weekdaysShort: 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'), + weekdaysMin: 'आ._सो._मं._बु._बि._शु._श.'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'Aको h:mm बजे', + LTS: 'Aको h:mm:ss बजे', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, Aको h:mm बजे', + LLLL: 'dddd, D MMMM YYYY, Aको h:mm बजे', + }, + preparse: function (string) { + return string.replace(/[१२३४५६७८९०]/g, function (match) { + return numberMap$c[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$d[match]; + }); + }, + meridiemParse: /राति|बिहान|दिउँसो|साँझ/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'राति') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'बिहान') { + return hour; + } else if (meridiem === 'दिउँसो') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'साँझ') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 3) { + return 'राति'; + } else if (hour < 12) { + return 'बिहान'; + } else if (hour < 16) { + return 'दिउँसो'; + } else if (hour < 20) { + return 'साँझ'; + } else { + return 'राति'; + } + }, + calendar: { + sameDay: '[आज] LT', + nextDay: '[भोलि] LT', + nextWeek: '[आउँदो] dddd[,] LT', + lastDay: '[हिजो] LT', + lastWeek: '[गएको] dddd[,] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%sमा', + past: '%s अगाडि', + s: 'केही क्षण', + ss: '%d सेकेण्ड', + m: 'एक मिनेट', + mm: '%d मिनेट', + h: 'एक घण्टा', + hh: '%d घण्टा', + d: 'एक दिन', + dd: '%d दिन', + M: 'एक महिना', + MM: '%d महिना', + y: 'एक बर्ष', + yy: '%d बर्ष', + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var monthsShortWithDots$1 = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split( + '_' + ), + monthsShortWithoutDots$1 = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split( + '_' + ), + monthsParse$6 = [ + /^jan/i, + /^feb/i, + /^maart|mrt.?$/i, + /^apr/i, + /^mei$/i, + /^jun[i.]?$/i, + /^jul[i.]?$/i, + /^aug/i, + /^sep/i, + /^okt/i, + /^nov/i, + /^dec/i, + ], + monthsRegex$7 = /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i; + + hooks.defineLocale('nl-be', { + months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split( + '_' + ), + monthsShort: function (m, format) { + if (!m) { + return monthsShortWithDots$1; + } else if (/-MMM-/.test(format)) { + return monthsShortWithoutDots$1[m.month()]; + } else { + return monthsShortWithDots$1[m.month()]; + } + }, + + monthsRegex: monthsRegex$7, + monthsShortRegex: monthsRegex$7, + monthsStrictRegex: /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i, + monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i, + + monthsParse: monthsParse$6, + longMonthsParse: monthsParse$6, + shortMonthsParse: monthsParse$6, + + weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split( + '_' + ), + weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'), + weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[vandaag om] LT', + nextDay: '[morgen om] LT', + nextWeek: 'dddd [om] LT', + lastDay: '[gisteren om] LT', + lastWeek: '[afgelopen] dddd [om] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'over %s', + past: '%s geleden', + s: 'een paar seconden', + ss: '%d seconden', + m: 'één minuut', + mm: '%d minuten', + h: 'één uur', + hh: '%d uur', + d: 'één dag', + dd: '%d dagen', + M: 'één maand', + MM: '%d maanden', + y: 'één jaar', + yy: '%d jaar', + }, + dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, + ordinal: function (number) { + return ( + number + + (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de') + ); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var monthsShortWithDots$2 = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split( + '_' + ), + monthsShortWithoutDots$2 = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split( + '_' + ), + monthsParse$7 = [ + /^jan/i, + /^feb/i, + /^maart|mrt.?$/i, + /^apr/i, + /^mei$/i, + /^jun[i.]?$/i, + /^jul[i.]?$/i, + /^aug/i, + /^sep/i, + /^okt/i, + /^nov/i, + /^dec/i, + ], + monthsRegex$8 = /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i; + + hooks.defineLocale('nl', { + months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split( + '_' + ), + monthsShort: function (m, format) { + if (!m) { + return monthsShortWithDots$2; + } else if (/-MMM-/.test(format)) { + return monthsShortWithoutDots$2[m.month()]; + } else { + return monthsShortWithDots$2[m.month()]; + } + }, + + monthsRegex: monthsRegex$8, + monthsShortRegex: monthsRegex$8, + monthsStrictRegex: /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i, + monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i, + + monthsParse: monthsParse$7, + longMonthsParse: monthsParse$7, + shortMonthsParse: monthsParse$7, + + weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split( + '_' + ), + weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'), + weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD-MM-YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[vandaag om] LT', + nextDay: '[morgen om] LT', + nextWeek: 'dddd [om] LT', + lastDay: '[gisteren om] LT', + lastWeek: '[afgelopen] dddd [om] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'over %s', + past: '%s geleden', + s: 'een paar seconden', + ss: '%d seconden', + m: 'één minuut', + mm: '%d minuten', + h: 'één uur', + hh: '%d uur', + d: 'één dag', + dd: '%d dagen', + M: 'één maand', + MM: '%d maanden', + y: 'één jaar', + yy: '%d jaar', + }, + dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, + ordinal: function (number) { + return ( + number + + (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de') + ); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('nn', { + months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split( + '_' + ), + monthsShort: 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'), + weekdaysShort: 'su._må._ty._on._to._fr._lau.'.split('_'), + weekdaysMin: 'su_må_ty_on_to_fr_la'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY [kl.] H:mm', + LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm', + }, + calendar: { + sameDay: '[I dag klokka] LT', + nextDay: '[I morgon klokka] LT', + nextWeek: 'dddd [klokka] LT', + lastDay: '[I går klokka] LT', + lastWeek: '[Føregåande] dddd [klokka] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'om %s', + past: '%s sidan', + s: 'nokre sekund', + ss: '%d sekund', + m: 'eit minutt', + mm: '%d minutt', + h: 'ein time', + hh: '%d timar', + d: 'ein dag', + dd: '%d dagar', + M: 'ein månad', + MM: '%d månader', + y: 'eit år', + yy: '%d år', + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('oc-lnc', { + months: { + standalone: 'genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre'.split( + '_' + ), + format: "de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre".split( + '_' + ), + isFormat: /D[oD]?(\s)+MMMM/, + }, + monthsShort: 'gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte'.split( + '_' + ), + weekdaysShort: 'dg._dl._dm._dc._dj._dv._ds.'.split('_'), + weekdaysMin: 'dg_dl_dm_dc_dj_dv_ds'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM [de] YYYY', + ll: 'D MMM YYYY', + LLL: 'D MMMM [de] YYYY [a] H:mm', + lll: 'D MMM YYYY, H:mm', + LLLL: 'dddd D MMMM [de] YYYY [a] H:mm', + llll: 'ddd D MMM YYYY, H:mm', + }, + calendar: { + sameDay: '[uèi a] LT', + nextDay: '[deman a] LT', + nextWeek: 'dddd [a] LT', + lastDay: '[ièr a] LT', + lastWeek: 'dddd [passat a] LT', + sameElse: 'L', + }, + relativeTime: { + future: "d'aquí %s", + past: 'fa %s', + s: 'unas segondas', + ss: '%d segondas', + m: 'una minuta', + mm: '%d minutas', + h: 'una ora', + hh: '%d oras', + d: 'un jorn', + dd: '%d jorns', + M: 'un mes', + MM: '%d meses', + y: 'un an', + yy: '%d ans', + }, + dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/, + ordinal: function (number, period) { + var output = + number === 1 + ? 'r' + : number === 2 + ? 'n' + : number === 3 + ? 'r' + : number === 4 + ? 't' + : 'è'; + if (period === 'w' || period === 'W') { + output = 'a'; + } + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, + }, + }); + + //! moment.js locale configuration + + var symbolMap$e = { + '1': '੧', + '2': '੨', + '3': '੩', + '4': '੪', + '5': '੫', + '6': '੬', + '7': '੭', + '8': '੮', + '9': '੯', + '0': '੦', + }, + numberMap$d = { + '੧': '1', + '੨': '2', + '੩': '3', + '੪': '4', + '੫': '5', + '੬': '6', + '੭': '7', + '੮': '8', + '੯': '9', + '੦': '0', + }; + + hooks.defineLocale('pa-in', { + // There are months name as per Nanakshahi Calendar but they are not used as rigidly in modern Punjabi. + months: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split( + '_' + ), + monthsShort: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split( + '_' + ), + weekdays: 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split( + '_' + ), + weekdaysShort: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'), + weekdaysMin: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'), + longDateFormat: { + LT: 'A h:mm ਵਜੇ', + LTS: 'A h:mm:ss ਵਜੇ', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm ਵਜੇ', + LLLL: 'dddd, D MMMM YYYY, A h:mm ਵਜੇ', + }, + calendar: { + sameDay: '[ਅਜ] LT', + nextDay: '[ਕਲ] LT', + nextWeek: '[ਅਗਲਾ] dddd, LT', + lastDay: '[ਕਲ] LT', + lastWeek: '[ਪਿਛਲੇ] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s ਵਿੱਚ', + past: '%s ਪਿਛਲੇ', + s: 'ਕੁਝ ਸਕਿੰਟ', + ss: '%d ਸਕਿੰਟ', + m: 'ਇਕ ਮਿੰਟ', + mm: '%d ਮਿੰਟ', + h: 'ਇੱਕ ਘੰਟਾ', + hh: '%d ਘੰਟੇ', + d: 'ਇੱਕ ਦਿਨ', + dd: '%d ਦਿਨ', + M: 'ਇੱਕ ਮਹੀਨਾ', + MM: '%d ਮਹੀਨੇ', + y: 'ਇੱਕ ਸਾਲ', + yy: '%d ਸਾਲ', + }, + preparse: function (string) { + return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) { + return numberMap$d[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$e[match]; + }); + }, + // Punjabi notation for meridiems are quite fuzzy in practice. While there exists + // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi. + meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'ਰਾਤ') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'ਸਵੇਰ') { + return hour; + } else if (meridiem === 'ਦੁਪਹਿਰ') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'ਸ਼ਾਮ') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'ਰਾਤ'; + } else if (hour < 10) { + return 'ਸਵੇਰ'; + } else if (hour < 17) { + return 'ਦੁਪਹਿਰ'; + } else if (hour < 20) { + return 'ਸ਼ਾਮ'; + } else { + return 'ਰਾਤ'; + } + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var monthsNominative = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split( + '_' + ), + monthsSubjective = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split( + '_' + ); + function plural$3(n) { + return n % 10 < 5 && n % 10 > 1 && ~~(n / 10) % 10 !== 1; + } + function translate$8(number, withoutSuffix, key) { + var result = number + ' '; + switch (key) { + case 'ss': + return result + (plural$3(number) ? 'sekundy' : 'sekund'); + case 'm': + return withoutSuffix ? 'minuta' : 'minutę'; + case 'mm': + return result + (plural$3(number) ? 'minuty' : 'minut'); + case 'h': + return withoutSuffix ? 'godzina' : 'godzinę'; + case 'hh': + return result + (plural$3(number) ? 'godziny' : 'godzin'); + case 'MM': + return result + (plural$3(number) ? 'miesiące' : 'miesięcy'); + case 'yy': + return result + (plural$3(number) ? 'lata' : 'lat'); + } + } + + hooks.defineLocale('pl', { + months: function (momentToFormat, format) { + if (!momentToFormat) { + return monthsNominative; + } else if (format === '') { + // Hack: if format empty we know this is used to generate + // RegExp by moment. Give then back both valid forms of months + // in RegExp ready format. + return ( + '(' + + monthsSubjective[momentToFormat.month()] + + '|' + + monthsNominative[momentToFormat.month()] + + ')' + ); + } else if (/D MMMM/.test(format)) { + return monthsSubjective[momentToFormat.month()]; + } else { + return monthsNominative[momentToFormat.month()]; + } + }, + monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'), + weekdays: 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split( + '_' + ), + weekdaysShort: 'ndz_pon_wt_śr_czw_pt_sob'.split('_'), + weekdaysMin: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Dziś o] LT', + nextDay: '[Jutro o] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[W niedzielę o] LT'; + + case 2: + return '[We wtorek o] LT'; + + case 3: + return '[W środę o] LT'; + + case 6: + return '[W sobotę o] LT'; + + default: + return '[W] dddd [o] LT'; + } + }, + lastDay: '[Wczoraj o] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[W zeszłą niedzielę o] LT'; + case 3: + return '[W zeszłą środę o] LT'; + case 6: + return '[W zeszłą sobotę o] LT'; + default: + return '[W zeszły] dddd [o] LT'; + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'za %s', + past: '%s temu', + s: 'kilka sekund', + ss: translate$8, + m: translate$8, + mm: translate$8, + h: translate$8, + hh: translate$8, + d: '1 dzień', + dd: '%d dni', + M: 'miesiąc', + MM: translate$8, + y: 'rok', + yy: translate$8, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('pt-br', { + months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split( + '_' + ), + monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'), + weekdays: 'domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado'.split( + '_' + ), + weekdaysShort: 'dom_seg_ter_qua_qui_sex_sáb'.split('_'), + weekdaysMin: 'do_2ª_3ª_4ª_5ª_6ª_sá'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D [de] MMMM [de] YYYY', + LLL: 'D [de] MMMM [de] YYYY [às] HH:mm', + LLLL: 'dddd, D [de] MMMM [de] YYYY [às] HH:mm', + }, + calendar: { + sameDay: '[Hoje às] LT', + nextDay: '[Amanhã às] LT', + nextWeek: 'dddd [às] LT', + lastDay: '[Ontem às] LT', + lastWeek: function () { + return this.day() === 0 || this.day() === 6 + ? '[Último] dddd [às] LT' // Saturday + Sunday + : '[Última] dddd [às] LT'; // Monday - Friday + }, + sameElse: 'L', + }, + relativeTime: { + future: 'em %s', + past: 'há %s', + s: 'poucos segundos', + ss: '%d segundos', + m: 'um minuto', + mm: '%d minutos', + h: 'uma hora', + hh: '%d horas', + d: 'um dia', + dd: '%d dias', + M: 'um mês', + MM: '%d meses', + y: 'um ano', + yy: '%d anos', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + }); + + //! moment.js locale configuration + + hooks.defineLocale('pt', { + months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split( + '_' + ), + monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'), + weekdays: 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split( + '_' + ), + weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'), + weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D [de] MMMM [de] YYYY', + LLL: 'D [de] MMMM [de] YYYY HH:mm', + LLLL: 'dddd, D [de] MMMM [de] YYYY HH:mm', + }, + calendar: { + sameDay: '[Hoje às] LT', + nextDay: '[Amanhã às] LT', + nextWeek: 'dddd [às] LT', + lastDay: '[Ontem às] LT', + lastWeek: function () { + return this.day() === 0 || this.day() === 6 + ? '[Último] dddd [às] LT' // Saturday + Sunday + : '[Última] dddd [às] LT'; // Monday - Friday + }, + sameElse: 'L', + }, + relativeTime: { + future: 'em %s', + past: 'há %s', + s: 'segundos', + ss: '%d segundos', + m: 'um minuto', + mm: '%d minutos', + h: 'uma hora', + hh: '%d horas', + d: 'um dia', + dd: '%d dias', + M: 'um mês', + MM: '%d meses', + y: 'um ano', + yy: '%d anos', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function relativeTimeWithPlural$2(number, withoutSuffix, key) { + var format = { + ss: 'secunde', + mm: 'minute', + hh: 'ore', + dd: 'zile', + MM: 'luni', + yy: 'ani', + }, + separator = ' '; + if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) { + separator = ' de '; + } + return number + separator + format[key]; + } + + hooks.defineLocale('ro', { + months: 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split( + '_' + ), + monthsShort: 'ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'), + weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'), + weekdaysMin: 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'), + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY H:mm', + LLLL: 'dddd, D MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[azi la] LT', + nextDay: '[mâine la] LT', + nextWeek: 'dddd [la] LT', + lastDay: '[ieri la] LT', + lastWeek: '[fosta] dddd [la] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'peste %s', + past: '%s în urmă', + s: 'câteva secunde', + ss: relativeTimeWithPlural$2, + m: 'un minut', + mm: relativeTimeWithPlural$2, + h: 'o oră', + hh: relativeTimeWithPlural$2, + d: 'o zi', + dd: relativeTimeWithPlural$2, + M: 'o lună', + MM: relativeTimeWithPlural$2, + y: 'un an', + yy: relativeTimeWithPlural$2, + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function plural$4(word, num) { + var forms = word.split('_'); + return num % 10 === 1 && num % 100 !== 11 + ? forms[0] + : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) + ? forms[1] + : forms[2]; + } + function relativeTimeWithPlural$3(number, withoutSuffix, key) { + var format = { + ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд', + mm: withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут', + hh: 'час_часа_часов', + dd: 'день_дня_дней', + MM: 'месяц_месяца_месяцев', + yy: 'год_года_лет', + }; + if (key === 'm') { + return withoutSuffix ? 'минута' : 'минуту'; + } else { + return number + ' ' + plural$4(format[key], +number); + } + } + var monthsParse$8 = [ + /^янв/i, + /^фев/i, + /^мар/i, + /^апр/i, + /^ма[йя]/i, + /^июн/i, + /^июл/i, + /^авг/i, + /^сен/i, + /^окт/i, + /^ноя/i, + /^дек/i, + ]; + + // http://new.gramota.ru/spravka/rules/139-prop : § 103 + // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637 + // CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753 + hooks.defineLocale('ru', { + months: { + format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split( + '_' + ), + standalone: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split( + '_' + ), + }, + monthsShort: { + // по CLDR именно "июл." и "июн.", но какой смысл менять букву на точку? + format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split( + '_' + ), + standalone: 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split( + '_' + ), + }, + weekdays: { + standalone: 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split( + '_' + ), + format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split( + '_' + ), + isFormat: /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/, + }, + weekdaysShort: 'вс_пн_вт_ср_чт_пт_сб'.split('_'), + weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'), + monthsParse: monthsParse$8, + longMonthsParse: monthsParse$8, + shortMonthsParse: monthsParse$8, + + // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки + monthsRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i, + + // копия предыдущего + monthsShortRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i, + + // полные названия с падежами + monthsStrictRegex: /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i, + + // Выражение, которое соответствует только сокращённым формам + monthsShortStrictRegex: /^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY г.', + LLL: 'D MMMM YYYY г., H:mm', + LLLL: 'dddd, D MMMM YYYY г., H:mm', + }, + calendar: { + sameDay: '[Сегодня, в] LT', + nextDay: '[Завтра, в] LT', + lastDay: '[Вчера, в] LT', + nextWeek: function (now) { + if (now.week() !== this.week()) { + switch (this.day()) { + case 0: + return '[В следующее] dddd, [в] LT'; + case 1: + case 2: + case 4: + return '[В следующий] dddd, [в] LT'; + case 3: + case 5: + case 6: + return '[В следующую] dddd, [в] LT'; + } + } else { + if (this.day() === 2) { + return '[Во] dddd, [в] LT'; + } else { + return '[В] dddd, [в] LT'; + } + } + }, + lastWeek: function (now) { + if (now.week() !== this.week()) { + switch (this.day()) { + case 0: + return '[В прошлое] dddd, [в] LT'; + case 1: + case 2: + case 4: + return '[В прошлый] dddd, [в] LT'; + case 3: + case 5: + case 6: + return '[В прошлую] dddd, [в] LT'; + } + } else { + if (this.day() === 2) { + return '[Во] dddd, [в] LT'; + } else { + return '[В] dddd, [в] LT'; + } + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'через %s', + past: '%s назад', + s: 'несколько секунд', + ss: relativeTimeWithPlural$3, + m: relativeTimeWithPlural$3, + mm: relativeTimeWithPlural$3, + h: 'час', + hh: relativeTimeWithPlural$3, + d: 'день', + dd: relativeTimeWithPlural$3, + M: 'месяц', + MM: relativeTimeWithPlural$3, + y: 'год', + yy: relativeTimeWithPlural$3, + }, + meridiemParse: /ночи|утра|дня|вечера/i, + isPM: function (input) { + return /^(дня|вечера)$/.test(input); + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'ночи'; + } else if (hour < 12) { + return 'утра'; + } else if (hour < 17) { + return 'дня'; + } else { + return 'вечера'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}-(й|го|я)/, + ordinal: function (number, period) { + switch (period) { + case 'M': + case 'd': + case 'DDD': + return number + '-й'; + case 'D': + return number + '-го'; + case 'w': + case 'W': + return number + '-я'; + default: + return number; + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var months$9 = [ + 'جنوري', + 'فيبروري', + 'مارچ', + 'اپريل', + 'مئي', + 'جون', + 'جولاءِ', + 'آگسٽ', + 'سيپٽمبر', + 'آڪٽوبر', + 'نومبر', + 'ڊسمبر', + ], + days$1 = ['آچر', 'سومر', 'اڱارو', 'اربع', 'خميس', 'جمع', 'ڇنڇر']; + + hooks.defineLocale('sd', { + months: months$9, + monthsShort: months$9, + weekdays: days$1, + weekdaysShort: days$1, + weekdaysMin: days$1, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd، D MMMM YYYY HH:mm', + }, + meridiemParse: /صبح|شام/, + isPM: function (input) { + return 'شام' === input; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'صبح'; + } + return 'شام'; + }, + calendar: { + sameDay: '[اڄ] LT', + nextDay: '[سڀاڻي] LT', + nextWeek: 'dddd [اڳين هفتي تي] LT', + lastDay: '[ڪالهه] LT', + lastWeek: '[گزريل هفتي] dddd [تي] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s پوء', + past: '%s اڳ', + s: 'چند سيڪنڊ', + ss: '%d سيڪنڊ', + m: 'هڪ منٽ', + mm: '%d منٽ', + h: 'هڪ ڪلاڪ', + hh: '%d ڪلاڪ', + d: 'هڪ ڏينهن', + dd: '%d ڏينهن', + M: 'هڪ مهينو', + MM: '%d مهينا', + y: 'هڪ سال', + yy: '%d سال', + }, + preparse: function (string) { + return string.replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/,/g, '،'); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('se', { + months: 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split( + '_' + ), + monthsShort: 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split( + '_' + ), + weekdays: 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split( + '_' + ), + weekdaysShort: 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'), + weekdaysMin: 's_v_m_g_d_b_L'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'MMMM D. [b.] YYYY', + LLL: 'MMMM D. [b.] YYYY [ti.] HH:mm', + LLLL: 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm', + }, + calendar: { + sameDay: '[otne ti] LT', + nextDay: '[ihttin ti] LT', + nextWeek: 'dddd [ti] LT', + lastDay: '[ikte ti] LT', + lastWeek: '[ovddit] dddd [ti] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s geažes', + past: 'maŋit %s', + s: 'moadde sekunddat', + ss: '%d sekunddat', + m: 'okta minuhta', + mm: '%d minuhtat', + h: 'okta diimmu', + hh: '%d diimmut', + d: 'okta beaivi', + dd: '%d beaivvit', + M: 'okta mánnu', + MM: '%d mánut', + y: 'okta jahki', + yy: '%d jagit', + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + /*jshint -W100*/ + hooks.defineLocale('si', { + months: 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split( + '_' + ), + monthsShort: 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split( + '_' + ), + weekdays: 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split( + '_' + ), + weekdaysShort: 'ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන'.split('_'), + weekdaysMin: 'ඉ_ස_අ_බ_බ්‍ර_සි_සෙ'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'a h:mm', + LTS: 'a h:mm:ss', + L: 'YYYY/MM/DD', + LL: 'YYYY MMMM D', + LLL: 'YYYY MMMM D, a h:mm', + LLLL: 'YYYY MMMM D [වැනි] dddd, a h:mm:ss', + }, + calendar: { + sameDay: '[අද] LT[ට]', + nextDay: '[හෙට] LT[ට]', + nextWeek: 'dddd LT[ට]', + lastDay: '[ඊයේ] LT[ට]', + lastWeek: '[පසුගිය] dddd LT[ට]', + sameElse: 'L', + }, + relativeTime: { + future: '%sකින්', + past: '%sකට පෙර', + s: 'තත්පර කිහිපය', + ss: 'තත්පර %d', + m: 'මිනිත්තුව', + mm: 'මිනිත්තු %d', + h: 'පැය', + hh: 'පැය %d', + d: 'දිනය', + dd: 'දින %d', + M: 'මාසය', + MM: 'මාස %d', + y: 'වසර', + yy: 'වසර %d', + }, + dayOfMonthOrdinalParse: /\d{1,2} වැනි/, + ordinal: function (number) { + return number + ' වැනි'; + }, + meridiemParse: /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./, + isPM: function (input) { + return input === 'ප.ව.' || input === 'පස් වරු'; + }, + meridiem: function (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'ප.ව.' : 'පස් වරු'; + } else { + return isLower ? 'පෙ.ව.' : 'පෙර වරු'; + } + }, + }); + + //! moment.js locale configuration + + var months$a = 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split( + '_' + ), + monthsShort$6 = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_'); + function plural$5(n) { + return n > 1 && n < 5; + } + function translate$9(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + switch (key) { + case 's': // a few seconds / in a few seconds / a few seconds ago + return withoutSuffix || isFuture ? 'pár sekúnd' : 'pár sekundami'; + case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago + if (withoutSuffix || isFuture) { + return result + (plural$5(number) ? 'sekundy' : 'sekúnd'); + } else { + return result + 'sekundami'; + } + case 'm': // a minute / in a minute / a minute ago + return withoutSuffix ? 'minúta' : isFuture ? 'minútu' : 'minútou'; + case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago + if (withoutSuffix || isFuture) { + return result + (plural$5(number) ? 'minúty' : 'minút'); + } else { + return result + 'minútami'; + } + case 'h': // an hour / in an hour / an hour ago + return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou'; + case 'hh': // 9 hours / in 9 hours / 9 hours ago + if (withoutSuffix || isFuture) { + return result + (plural$5(number) ? 'hodiny' : 'hodín'); + } else { + return result + 'hodinami'; + } + case 'd': // a day / in a day / a day ago + return withoutSuffix || isFuture ? 'deň' : 'dňom'; + case 'dd': // 9 days / in 9 days / 9 days ago + if (withoutSuffix || isFuture) { + return result + (plural$5(number) ? 'dni' : 'dní'); + } else { + return result + 'dňami'; + } + case 'M': // a month / in a month / a month ago + return withoutSuffix || isFuture ? 'mesiac' : 'mesiacom'; + case 'MM': // 9 months / in 9 months / 9 months ago + if (withoutSuffix || isFuture) { + return result + (plural$5(number) ? 'mesiace' : 'mesiacov'); + } else { + return result + 'mesiacmi'; + } + case 'y': // a year / in a year / a year ago + return withoutSuffix || isFuture ? 'rok' : 'rokom'; + case 'yy': // 9 years / in 9 years / 9 years ago + if (withoutSuffix || isFuture) { + return result + (plural$5(number) ? 'roky' : 'rokov'); + } else { + return result + 'rokmi'; + } + } + } + + hooks.defineLocale('sk', { + months: months$a, + monthsShort: monthsShort$6, + weekdays: 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'), + weekdaysShort: 'ne_po_ut_st_št_pi_so'.split('_'), + weekdaysMin: 'ne_po_ut_st_št_pi_so'.split('_'), + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd D. MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[dnes o] LT', + nextDay: '[zajtra o] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[v nedeľu o] LT'; + case 1: + case 2: + return '[v] dddd [o] LT'; + case 3: + return '[v stredu o] LT'; + case 4: + return '[vo štvrtok o] LT'; + case 5: + return '[v piatok o] LT'; + case 6: + return '[v sobotu o] LT'; + } + }, + lastDay: '[včera o] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[minulú nedeľu o] LT'; + case 1: + case 2: + return '[minulý] dddd [o] LT'; + case 3: + return '[minulú stredu o] LT'; + case 4: + case 5: + return '[minulý] dddd [o] LT'; + case 6: + return '[minulú sobotu o] LT'; + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'za %s', + past: 'pred %s', + s: translate$9, + ss: translate$9, + m: translate$9, + mm: translate$9, + h: translate$9, + hh: translate$9, + d: translate$9, + dd: translate$9, + M: translate$9, + MM: translate$9, + y: translate$9, + yy: translate$9, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function processRelativeTime$7(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + switch (key) { + case 's': + return withoutSuffix || isFuture + ? 'nekaj sekund' + : 'nekaj sekundami'; + case 'ss': + if (number === 1) { + result += withoutSuffix ? 'sekundo' : 'sekundi'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah'; + } else { + result += 'sekund'; + } + return result; + case 'm': + return withoutSuffix ? 'ena minuta' : 'eno minuto'; + case 'mm': + if (number === 1) { + result += withoutSuffix ? 'minuta' : 'minuto'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'minuti' : 'minutama'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'minute' : 'minutami'; + } else { + result += withoutSuffix || isFuture ? 'minut' : 'minutami'; + } + return result; + case 'h': + return withoutSuffix ? 'ena ura' : 'eno uro'; + case 'hh': + if (number === 1) { + result += withoutSuffix ? 'ura' : 'uro'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'uri' : 'urama'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'ure' : 'urami'; + } else { + result += withoutSuffix || isFuture ? 'ur' : 'urami'; + } + return result; + case 'd': + return withoutSuffix || isFuture ? 'en dan' : 'enim dnem'; + case 'dd': + if (number === 1) { + result += withoutSuffix || isFuture ? 'dan' : 'dnem'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'dni' : 'dnevoma'; + } else { + result += withoutSuffix || isFuture ? 'dni' : 'dnevi'; + } + return result; + case 'M': + return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem'; + case 'MM': + if (number === 1) { + result += withoutSuffix || isFuture ? 'mesec' : 'mesecem'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'meseca' : 'mesecema'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'mesece' : 'meseci'; + } else { + result += withoutSuffix || isFuture ? 'mesecev' : 'meseci'; + } + return result; + case 'y': + return withoutSuffix || isFuture ? 'eno leto' : 'enim letom'; + case 'yy': + if (number === 1) { + result += withoutSuffix || isFuture ? 'leto' : 'letom'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'leti' : 'letoma'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'leta' : 'leti'; + } else { + result += withoutSuffix || isFuture ? 'let' : 'leti'; + } + return result; + } + } + + hooks.defineLocale('sl', { + months: 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split( + '_' + ), + monthsShort: 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'), + weekdaysShort: 'ned._pon._tor._sre._čet._pet._sob.'.split('_'), + weekdaysMin: 'ne_po_to_sr_če_pe_so'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD. MM. YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[danes ob] LT', + nextDay: '[jutri ob] LT', + + nextWeek: function () { + switch (this.day()) { + case 0: + return '[v] [nedeljo] [ob] LT'; + case 3: + return '[v] [sredo] [ob] LT'; + case 6: + return '[v] [soboto] [ob] LT'; + case 1: + case 2: + case 4: + case 5: + return '[v] dddd [ob] LT'; + } + }, + lastDay: '[včeraj ob] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[prejšnjo] [nedeljo] [ob] LT'; + case 3: + return '[prejšnjo] [sredo] [ob] LT'; + case 6: + return '[prejšnjo] [soboto] [ob] LT'; + case 1: + case 2: + case 4: + case 5: + return '[prejšnji] dddd [ob] LT'; + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'čez %s', + past: 'pred %s', + s: processRelativeTime$7, + ss: processRelativeTime$7, + m: processRelativeTime$7, + mm: processRelativeTime$7, + h: processRelativeTime$7, + hh: processRelativeTime$7, + d: processRelativeTime$7, + dd: processRelativeTime$7, + M: processRelativeTime$7, + MM: processRelativeTime$7, + y: processRelativeTime$7, + yy: processRelativeTime$7, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('sq', { + months: 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split( + '_' + ), + monthsShort: 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'), + weekdays: 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split( + '_' + ), + weekdaysShort: 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'), + weekdaysMin: 'D_H_Ma_Më_E_P_Sh'.split('_'), + weekdaysParseExact: true, + meridiemParse: /PD|MD/, + isPM: function (input) { + return input.charAt(0) === 'M'; + }, + meridiem: function (hours, minutes, isLower) { + return hours < 12 ? 'PD' : 'MD'; + }, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Sot në] LT', + nextDay: '[Nesër në] LT', + nextWeek: 'dddd [në] LT', + lastDay: '[Dje në] LT', + lastWeek: 'dddd [e kaluar në] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'në %s', + past: '%s më parë', + s: 'disa sekonda', + ss: '%d sekonda', + m: 'një minutë', + mm: '%d minuta', + h: 'një orë', + hh: '%d orë', + d: 'një ditë', + dd: '%d ditë', + M: 'një muaj', + MM: '%d muaj', + y: 'një vit', + yy: '%d vite', + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var translator$1 = { + words: { + //Different grammatical cases + ss: ['секунда', 'секунде', 'секунди'], + m: ['један минут', 'једне минуте'], + mm: ['минут', 'минуте', 'минута'], + h: ['један сат', 'једног сата'], + hh: ['сат', 'сата', 'сати'], + dd: ['дан', 'дана', 'дана'], + MM: ['месец', 'месеца', 'месеци'], + yy: ['година', 'године', 'година'], + }, + correctGrammaticalCase: function (number, wordKey) { + return number === 1 + ? wordKey[0] + : number >= 2 && number <= 4 + ? wordKey[1] + : wordKey[2]; + }, + translate: function (number, withoutSuffix, key) { + var wordKey = translator$1.words[key]; + if (key.length === 1) { + return withoutSuffix ? wordKey[0] : wordKey[1]; + } else { + return ( + number + + ' ' + + translator$1.correctGrammaticalCase(number, wordKey) + ); + } + }, + }; + + hooks.defineLocale('sr-cyrl', { + months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split( + '_' + ), + monthsShort: 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'), + weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'), + weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[данас у] LT', + nextDay: '[сутра у] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[у] [недељу] [у] LT'; + case 3: + return '[у] [среду] [у] LT'; + case 6: + return '[у] [суботу] [у] LT'; + case 1: + case 2: + case 4: + case 5: + return '[у] dddd [у] LT'; + } + }, + lastDay: '[јуче у] LT', + lastWeek: function () { + var lastWeekDays = [ + '[прошле] [недеље] [у] LT', + '[прошлог] [понедељка] [у] LT', + '[прошлог] [уторка] [у] LT', + '[прошле] [среде] [у] LT', + '[прошлог] [четвртка] [у] LT', + '[прошлог] [петка] [у] LT', + '[прошле] [суботе] [у] LT', + ]; + return lastWeekDays[this.day()]; + }, + sameElse: 'L', + }, + relativeTime: { + future: 'за %s', + past: 'пре %s', + s: 'неколико секунди', + ss: translator$1.translate, + m: translator$1.translate, + mm: translator$1.translate, + h: translator$1.translate, + hh: translator$1.translate, + d: 'дан', + dd: translator$1.translate, + M: 'месец', + MM: translator$1.translate, + y: 'годину', + yy: translator$1.translate, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var translator$2 = { + words: { + //Different grammatical cases + ss: ['sekunda', 'sekunde', 'sekundi'], + m: ['jedan minut', 'jedne minute'], + mm: ['minut', 'minute', 'minuta'], + h: ['jedan sat', 'jednog sata'], + hh: ['sat', 'sata', 'sati'], + dd: ['dan', 'dana', 'dana'], + MM: ['mesec', 'meseca', 'meseci'], + yy: ['godina', 'godine', 'godina'], + }, + correctGrammaticalCase: function (number, wordKey) { + return number === 1 + ? wordKey[0] + : number >= 2 && number <= 4 + ? wordKey[1] + : wordKey[2]; + }, + translate: function (number, withoutSuffix, key) { + var wordKey = translator$2.words[key]; + if (key.length === 1) { + return withoutSuffix ? wordKey[0] : wordKey[1]; + } else { + return ( + number + + ' ' + + translator$2.correctGrammaticalCase(number, wordKey) + ); + } + }, + }; + + hooks.defineLocale('sr', { + months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split( + '_' + ), + monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split( + '_' + ), + weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'), + weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[danas u] LT', + nextDay: '[sutra u] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[u] [nedelju] [u] LT'; + case 3: + return '[u] [sredu] [u] LT'; + case 6: + return '[u] [subotu] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[u] dddd [u] LT'; + } + }, + lastDay: '[juče u] LT', + lastWeek: function () { + var lastWeekDays = [ + '[prošle] [nedelje] [u] LT', + '[prošlog] [ponedeljka] [u] LT', + '[prošlog] [utorka] [u] LT', + '[prošle] [srede] [u] LT', + '[prošlog] [četvrtka] [u] LT', + '[prošlog] [petka] [u] LT', + '[prošle] [subote] [u] LT', + ]; + return lastWeekDays[this.day()]; + }, + sameElse: 'L', + }, + relativeTime: { + future: 'za %s', + past: 'pre %s', + s: 'nekoliko sekundi', + ss: translator$2.translate, + m: translator$2.translate, + mm: translator$2.translate, + h: translator$2.translate, + hh: translator$2.translate, + d: 'dan', + dd: translator$2.translate, + M: 'mesec', + MM: translator$2.translate, + y: 'godinu', + yy: translator$2.translate, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('ss', { + months: "Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split( + '_' + ), + monthsShort: 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'), + weekdays: 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split( + '_' + ), + weekdaysShort: 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'), + weekdaysMin: 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY h:mm A', + LLLL: 'dddd, D MMMM YYYY h:mm A', + }, + calendar: { + sameDay: '[Namuhla nga] LT', + nextDay: '[Kusasa nga] LT', + nextWeek: 'dddd [nga] LT', + lastDay: '[Itolo nga] LT', + lastWeek: 'dddd [leliphelile] [nga] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'nga %s', + past: 'wenteka nga %s', + s: 'emizuzwana lomcane', + ss: '%d mzuzwana', + m: 'umzuzu', + mm: '%d emizuzu', + h: 'lihora', + hh: '%d emahora', + d: 'lilanga', + dd: '%d emalanga', + M: 'inyanga', + MM: '%d tinyanga', + y: 'umnyaka', + yy: '%d iminyaka', + }, + meridiemParse: /ekuseni|emini|entsambama|ebusuku/, + meridiem: function (hours, minutes, isLower) { + if (hours < 11) { + return 'ekuseni'; + } else if (hours < 15) { + return 'emini'; + } else if (hours < 19) { + return 'entsambama'; + } else { + return 'ebusuku'; + } + }, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'ekuseni') { + return hour; + } else if (meridiem === 'emini') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') { + if (hour === 0) { + return 0; + } + return hour + 12; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}/, + ordinal: '%d', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('sv', { + months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split( + '_' + ), + monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'), + weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'), + weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'), + weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY-MM-DD', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY [kl.] HH:mm', + LLLL: 'dddd D MMMM YYYY [kl.] HH:mm', + lll: 'D MMM YYYY HH:mm', + llll: 'ddd D MMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Idag] LT', + nextDay: '[Imorgon] LT', + lastDay: '[Igår] LT', + nextWeek: '[På] dddd LT', + lastWeek: '[I] dddd[s] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'om %s', + past: 'för %s sedan', + s: 'några sekunder', + ss: '%d sekunder', + m: 'en minut', + mm: '%d minuter', + h: 'en timme', + hh: '%d timmar', + d: 'en dag', + dd: '%d dagar', + M: 'en månad', + MM: '%d månader', + y: 'ett år', + yy: '%d år', + }, + dayOfMonthOrdinalParse: /\d{1,2}(\:e|\:a)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? ':e' + : b === 1 + ? ':a' + : b === 2 + ? ':a' + : b === 3 + ? ':e' + : ':e'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('sw', { + months: 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'), + weekdays: 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split( + '_' + ), + weekdaysShort: 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'), + weekdaysMin: 'J2_J3_J4_J5_Al_Ij_J1'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'hh:mm A', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[leo saa] LT', + nextDay: '[kesho saa] LT', + nextWeek: '[wiki ijayo] dddd [saat] LT', + lastDay: '[jana] LT', + lastWeek: '[wiki iliyopita] dddd [saat] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s baadaye', + past: 'tokea %s', + s: 'hivi punde', + ss: 'sekunde %d', + m: 'dakika moja', + mm: 'dakika %d', + h: 'saa limoja', + hh: 'masaa %d', + d: 'siku moja', + dd: 'siku %d', + M: 'mwezi mmoja', + MM: 'miezi %d', + y: 'mwaka mmoja', + yy: 'miaka %d', + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap$f = { + '1': '௧', + '2': '௨', + '3': '௩', + '4': '௪', + '5': '௫', + '6': '௬', + '7': '௭', + '8': '௮', + '9': '௯', + '0': '௦', + }, + numberMap$e = { + '௧': '1', + '௨': '2', + '௩': '3', + '௪': '4', + '௫': '5', + '௬': '6', + '௭': '7', + '௮': '8', + '௯': '9', + '௦': '0', + }; + + hooks.defineLocale('ta', { + months: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split( + '_' + ), + monthsShort: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split( + '_' + ), + weekdays: 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split( + '_' + ), + weekdaysShort: 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split( + '_' + ), + weekdaysMin: 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, HH:mm', + LLLL: 'dddd, D MMMM YYYY, HH:mm', + }, + calendar: { + sameDay: '[இன்று] LT', + nextDay: '[நாளை] LT', + nextWeek: 'dddd, LT', + lastDay: '[நேற்று] LT', + lastWeek: '[கடந்த வாரம்] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s இல்', + past: '%s முன்', + s: 'ஒரு சில விநாடிகள்', + ss: '%d விநாடிகள்', + m: 'ஒரு நிமிடம்', + mm: '%d நிமிடங்கள்', + h: 'ஒரு மணி நேரம்', + hh: '%d மணி நேரம்', + d: 'ஒரு நாள்', + dd: '%d நாட்கள்', + M: 'ஒரு மாதம்', + MM: '%d மாதங்கள்', + y: 'ஒரு வருடம்', + yy: '%d ஆண்டுகள்', + }, + dayOfMonthOrdinalParse: /\d{1,2}வது/, + ordinal: function (number) { + return number + 'வது'; + }, + preparse: function (string) { + return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) { + return numberMap$e[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$f[match]; + }); + }, + // refer http://ta.wikipedia.org/s/1er1 + meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/, + meridiem: function (hour, minute, isLower) { + if (hour < 2) { + return ' யாமம்'; + } else if (hour < 6) { + return ' வைகறை'; // வைகறை + } else if (hour < 10) { + return ' காலை'; // காலை + } else if (hour < 14) { + return ' நண்பகல்'; // நண்பகல் + } else if (hour < 18) { + return ' எற்பாடு'; // எற்பாடு + } else if (hour < 22) { + return ' மாலை'; // மாலை + } else { + return ' யாமம்'; + } + }, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'யாமம்') { + return hour < 2 ? hour : hour + 12; + } else if (meridiem === 'வைகறை' || meridiem === 'காலை') { + return hour; + } else if (meridiem === 'நண்பகல்') { + return hour >= 10 ? hour : hour + 12; + } else { + return hour + 12; + } + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('te', { + months: 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split( + '_' + ), + monthsShort: 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split( + '_' + ), + weekdaysShort: 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'), + weekdaysMin: 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'), + longDateFormat: { + LT: 'A h:mm', + LTS: 'A h:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm', + LLLL: 'dddd, D MMMM YYYY, A h:mm', + }, + calendar: { + sameDay: '[నేడు] LT', + nextDay: '[రేపు] LT', + nextWeek: 'dddd, LT', + lastDay: '[నిన్న] LT', + lastWeek: '[గత] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s లో', + past: '%s క్రితం', + s: 'కొన్ని క్షణాలు', + ss: '%d సెకన్లు', + m: 'ఒక నిమిషం', + mm: '%d నిమిషాలు', + h: 'ఒక గంట', + hh: '%d గంటలు', + d: 'ఒక రోజు', + dd: '%d రోజులు', + M: 'ఒక నెల', + MM: '%d నెలలు', + y: 'ఒక సంవత్సరం', + yy: '%d సంవత్సరాలు', + }, + dayOfMonthOrdinalParse: /\d{1,2}వ/, + ordinal: '%dవ', + meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'రాత్రి') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'ఉదయం') { + return hour; + } else if (meridiem === 'మధ్యాహ్నం') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'సాయంత్రం') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'రాత్రి'; + } else if (hour < 10) { + return 'ఉదయం'; + } else if (hour < 17) { + return 'మధ్యాహ్నం'; + } else if (hour < 20) { + return 'సాయంత్రం'; + } else { + return 'రాత్రి'; + } + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('tet', { + months: 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru'.split( + '_' + ), + monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'), + weekdays: 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu'.split('_'), + weekdaysShort: 'Dom_Seg_Ters_Kua_Kint_Sest_Sab'.split('_'), + weekdaysMin: 'Do_Seg_Te_Ku_Ki_Ses_Sa'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Ohin iha] LT', + nextDay: '[Aban iha] LT', + nextWeek: 'dddd [iha] LT', + lastDay: '[Horiseik iha] LT', + lastWeek: 'dddd [semana kotuk] [iha] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'iha %s', + past: '%s liuba', + s: 'segundu balun', + ss: 'segundu %d', + m: 'minutu ida', + mm: 'minutu %d', + h: 'oras ida', + hh: 'oras %d', + d: 'loron ida', + dd: 'loron %d', + M: 'fulan ida', + MM: 'fulan %d', + y: 'tinan ida', + yy: 'tinan %d', + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var suffixes$3 = { + 0: '-ум', + 1: '-ум', + 2: '-юм', + 3: '-юм', + 4: '-ум', + 5: '-ум', + 6: '-ум', + 7: '-ум', + 8: '-ум', + 9: '-ум', + 10: '-ум', + 12: '-ум', + 13: '-ум', + 20: '-ум', + 30: '-юм', + 40: '-ум', + 50: '-ум', + 60: '-ум', + 70: '-ум', + 80: '-ум', + 90: '-ум', + 100: '-ум', + }; + + hooks.defineLocale('tg', { + months: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split( + '_' + ), + monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'), + weekdays: 'якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе'.split( + '_' + ), + weekdaysShort: 'яшб_дшб_сшб_чшб_пшб_ҷум_шнб'.split('_'), + weekdaysMin: 'яш_дш_сш_чш_пш_ҷм_шб'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Имрӯз соати] LT', + nextDay: '[Пагоҳ соати] LT', + lastDay: '[Дирӯз соати] LT', + nextWeek: 'dddd[и] [ҳафтаи оянда соати] LT', + lastWeek: 'dddd[и] [ҳафтаи гузашта соати] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'баъди %s', + past: '%s пеш', + s: 'якчанд сония', + m: 'як дақиқа', + mm: '%d дақиқа', + h: 'як соат', + hh: '%d соат', + d: 'як рӯз', + dd: '%d рӯз', + M: 'як моҳ', + MM: '%d моҳ', + y: 'як сол', + yy: '%d сол', + }, + meridiemParse: /шаб|субҳ|рӯз|бегоҳ/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'шаб') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'субҳ') { + return hour; + } else if (meridiem === 'рӯз') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'бегоҳ') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'шаб'; + } else if (hour < 11) { + return 'субҳ'; + } else if (hour < 16) { + return 'рӯз'; + } else if (hour < 19) { + return 'бегоҳ'; + } else { + return 'шаб'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}-(ум|юм)/, + ordinal: function (number) { + var a = number % 10, + b = number >= 100 ? 100 : null; + return number + (suffixes$3[number] || suffixes$3[a] || suffixes$3[b]); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 1th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('th', { + months: 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split( + '_' + ), + monthsShort: 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'), + weekdaysShort: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference + weekdaysMin: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY เวลา H:mm', + LLLL: 'วันddddที่ D MMMM YYYY เวลา H:mm', + }, + meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/, + isPM: function (input) { + return input === 'หลังเที่ยง'; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'ก่อนเที่ยง'; + } else { + return 'หลังเที่ยง'; + } + }, + calendar: { + sameDay: '[วันนี้ เวลา] LT', + nextDay: '[พรุ่งนี้ เวลา] LT', + nextWeek: 'dddd[หน้า เวลา] LT', + lastDay: '[เมื่อวานนี้ เวลา] LT', + lastWeek: '[วัน]dddd[ที่แล้ว เวลา] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'อีก %s', + past: '%sที่แล้ว', + s: 'ไม่กี่วินาที', + ss: '%d วินาที', + m: '1 นาที', + mm: '%d นาที', + h: '1 ชั่วโมง', + hh: '%d ชั่วโมง', + d: '1 วัน', + dd: '%d วัน', + M: '1 เดือน', + MM: '%d เดือน', + y: '1 ปี', + yy: '%d ปี', + }, + }); + + //! moment.js locale configuration + + var suffixes$4 = { + 1: "'inji", + 5: "'inji", + 8: "'inji", + 70: "'inji", + 80: "'inji", + 2: "'nji", + 7: "'nji", + 20: "'nji", + 50: "'nji", + 3: "'ünji", + 4: "'ünji", + 100: "'ünji", + 6: "'njy", + 9: "'unjy", + 10: "'unjy", + 30: "'unjy", + 60: "'ynjy", + 90: "'ynjy", + }; + + hooks.defineLocale('tk', { + months: 'Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr'.split( + '_' + ), + monthsShort: 'Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek'.split('_'), + weekdays: 'Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe'.split( + '_' + ), + weekdaysShort: 'Ýek_Duş_Siş_Çar_Pen_Ann_Şen'.split('_'), + weekdaysMin: 'Ýk_Dş_Sş_Çr_Pn_An_Şn'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[bugün sagat] LT', + nextDay: '[ertir sagat] LT', + nextWeek: '[indiki] dddd [sagat] LT', + lastDay: '[düýn] LT', + lastWeek: '[geçen] dddd [sagat] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s soň', + past: '%s öň', + s: 'birnäçe sekunt', + m: 'bir minut', + mm: '%d minut', + h: 'bir sagat', + hh: '%d sagat', + d: 'bir gün', + dd: '%d gün', + M: 'bir aý', + MM: '%d aý', + y: 'bir ýyl', + yy: '%d ýyl', + }, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'Do': + case 'DD': + return number; + default: + if (number === 0) { + // special case for zero + return number + "'unjy"; + } + var a = number % 10, + b = (number % 100) - a, + c = number >= 100 ? 100 : null; + return number + (suffixes$4[a] || suffixes$4[b] || suffixes$4[c]); + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('tl-ph', { + months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split( + '_' + ), + monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'), + weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split( + '_' + ), + weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'), + weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'MM/D/YYYY', + LL: 'MMMM D, YYYY', + LLL: 'MMMM D, YYYY HH:mm', + LLLL: 'dddd, MMMM DD, YYYY HH:mm', + }, + calendar: { + sameDay: 'LT [ngayong araw]', + nextDay: '[Bukas ng] LT', + nextWeek: 'LT [sa susunod na] dddd', + lastDay: 'LT [kahapon]', + lastWeek: 'LT [noong nakaraang] dddd', + sameElse: 'L', + }, + relativeTime: { + future: 'sa loob ng %s', + past: '%s ang nakalipas', + s: 'ilang segundo', + ss: '%d segundo', + m: 'isang minuto', + mm: '%d minuto', + h: 'isang oras', + hh: '%d oras', + d: 'isang araw', + dd: '%d araw', + M: 'isang buwan', + MM: '%d buwan', + y: 'isang taon', + yy: '%d taon', + }, + dayOfMonthOrdinalParse: /\d{1,2}/, + ordinal: function (number) { + return number; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_'); + + function translateFuture(output) { + var time = output; + time = + output.indexOf('jaj') !== -1 + ? time.slice(0, -3) + 'leS' + : output.indexOf('jar') !== -1 + ? time.slice(0, -3) + 'waQ' + : output.indexOf('DIS') !== -1 + ? time.slice(0, -3) + 'nem' + : time + ' pIq'; + return time; + } + + function translatePast(output) { + var time = output; + time = + output.indexOf('jaj') !== -1 + ? time.slice(0, -3) + 'Hu’' + : output.indexOf('jar') !== -1 + ? time.slice(0, -3) + 'wen' + : output.indexOf('DIS') !== -1 + ? time.slice(0, -3) + 'ben' + : time + ' ret'; + return time; + } + + function translate$a(number, withoutSuffix, string, isFuture) { + var numberNoun = numberAsNoun(number); + switch (string) { + case 'ss': + return numberNoun + ' lup'; + case 'mm': + return numberNoun + ' tup'; + case 'hh': + return numberNoun + ' rep'; + case 'dd': + return numberNoun + ' jaj'; + case 'MM': + return numberNoun + ' jar'; + case 'yy': + return numberNoun + ' DIS'; + } + } + + function numberAsNoun(number) { + var hundred = Math.floor((number % 1000) / 100), + ten = Math.floor((number % 100) / 10), + one = number % 10, + word = ''; + if (hundred > 0) { + word += numbersNouns[hundred] + 'vatlh'; + } + if (ten > 0) { + word += (word !== '' ? ' ' : '') + numbersNouns[ten] + 'maH'; + } + if (one > 0) { + word += (word !== '' ? ' ' : '') + numbersNouns[one]; + } + return word === '' ? 'pagh' : word; + } + + hooks.defineLocale('tlh', { + months: 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split( + '_' + ), + monthsShort: 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split( + '_' + ), + weekdaysShort: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split( + '_' + ), + weekdaysMin: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split( + '_' + ), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[DaHjaj] LT', + nextDay: '[wa’leS] LT', + nextWeek: 'LLL', + lastDay: '[wa’Hu’] LT', + lastWeek: 'LLL', + sameElse: 'L', + }, + relativeTime: { + future: translateFuture, + past: translatePast, + s: 'puS lup', + ss: translate$a, + m: 'wa’ tup', + mm: translate$a, + h: 'wa’ rep', + hh: translate$a, + d: 'wa’ jaj', + dd: translate$a, + M: 'wa’ jar', + MM: translate$a, + y: 'wa’ DIS', + yy: translate$a, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var suffixes$5 = { + 1: "'inci", + 5: "'inci", + 8: "'inci", + 70: "'inci", + 80: "'inci", + 2: "'nci", + 7: "'nci", + 20: "'nci", + 50: "'nci", + 3: "'üncü", + 4: "'üncü", + 100: "'üncü", + 6: "'ncı", + 9: "'uncu", + 10: "'uncu", + 30: "'uncu", + 60: "'ıncı", + 90: "'ıncı", + }; + + hooks.defineLocale('tr', { + months: 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split( + '_' + ), + monthsShort: 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'), + weekdays: 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split( + '_' + ), + weekdaysShort: 'Paz_Pts_Sal_Çar_Per_Cum_Cts'.split('_'), + weekdaysMin: 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'), + meridiem: function (hours, minutes, isLower) { + if (hours < 12) { + return isLower ? 'öö' : 'ÖÖ'; + } else { + return isLower ? 'ös' : 'ÖS'; + } + }, + meridiemParse: /öö|ÖÖ|ös|ÖS/, + isPM: function (input) { + return input === 'ös' || input === 'ÖS'; + }, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[bugün saat] LT', + nextDay: '[yarın saat] LT', + nextWeek: '[gelecek] dddd [saat] LT', + lastDay: '[dün] LT', + lastWeek: '[geçen] dddd [saat] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s sonra', + past: '%s önce', + s: 'birkaç saniye', + ss: '%d saniye', + m: 'bir dakika', + mm: '%d dakika', + h: 'bir saat', + hh: '%d saat', + d: 'bir gün', + dd: '%d gün', + M: 'bir ay', + MM: '%d ay', + y: 'bir yıl', + yy: '%d yıl', + }, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'Do': + case 'DD': + return number; + default: + if (number === 0) { + // special case for zero + return number + "'ıncı"; + } + var a = number % 10, + b = (number % 100) - a, + c = number >= 100 ? 100 : null; + return number + (suffixes$5[a] || suffixes$5[b] || suffixes$5[c]); + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + // After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals. + // This is currently too difficult (maybe even impossible) to add. + hooks.defineLocale('tzl', { + months: 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split( + '_' + ), + monthsShort: 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'), + weekdays: 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'), + weekdaysShort: 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'), + weekdaysMin: 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'), + longDateFormat: { + LT: 'HH.mm', + LTS: 'HH.mm.ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM [dallas] YYYY', + LLL: 'D. MMMM [dallas] YYYY HH.mm', + LLLL: 'dddd, [li] D. MMMM [dallas] YYYY HH.mm', + }, + meridiemParse: /d\'o|d\'a/i, + isPM: function (input) { + return "d'o" === input.toLowerCase(); + }, + meridiem: function (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? "d'o" : "D'O"; + } else { + return isLower ? "d'a" : "D'A"; + } + }, + calendar: { + sameDay: '[oxhi à] LT', + nextDay: '[demà à] LT', + nextWeek: 'dddd [à] LT', + lastDay: '[ieiri à] LT', + lastWeek: '[sür el] dddd [lasteu à] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'osprei %s', + past: 'ja%s', + s: processRelativeTime$8, + ss: processRelativeTime$8, + m: processRelativeTime$8, + mm: processRelativeTime$8, + h: processRelativeTime$8, + hh: processRelativeTime$8, + d: processRelativeTime$8, + dd: processRelativeTime$8, + M: processRelativeTime$8, + MM: processRelativeTime$8, + y: processRelativeTime$8, + yy: processRelativeTime$8, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + function processRelativeTime$8(number, withoutSuffix, key, isFuture) { + var format = { + s: ['viensas secunds', "'iensas secunds"], + ss: [number + ' secunds', '' + number + ' secunds'], + m: ["'n míut", "'iens míut"], + mm: [number + ' míuts', '' + number + ' míuts'], + h: ["'n þora", "'iensa þora"], + hh: [number + ' þoras', '' + number + ' þoras'], + d: ["'n ziua", "'iensa ziua"], + dd: [number + ' ziuas', '' + number + ' ziuas'], + M: ["'n mes", "'iens mes"], + MM: [number + ' mesen', '' + number + ' mesen'], + y: ["'n ar", "'iens ar"], + yy: [number + ' ars', '' + number + ' ars'], + }; + return isFuture + ? format[key][0] + : withoutSuffix + ? format[key][0] + : format[key][1]; + } + + //! moment.js locale configuration + + hooks.defineLocale('tzm-latn', { + months: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split( + '_' + ), + monthsShort: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split( + '_' + ), + weekdays: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'), + weekdaysShort: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'), + weekdaysMin: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[asdkh g] LT', + nextDay: '[aska g] LT', + nextWeek: 'dddd [g] LT', + lastDay: '[assant g] LT', + lastWeek: 'dddd [g] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'dadkh s yan %s', + past: 'yan %s', + s: 'imik', + ss: '%d imik', + m: 'minuḍ', + mm: '%d minuḍ', + h: 'saɛa', + hh: '%d tassaɛin', + d: 'ass', + dd: '%d ossan', + M: 'ayowr', + MM: '%d iyyirn', + y: 'asgas', + yy: '%d isgasn', + }, + week: { + dow: 6, // Saturday is the first day of the week. + doy: 12, // The week that contains Jan 12th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('tzm', { + months: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split( + '_' + ), + monthsShort: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split( + '_' + ), + weekdays: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'), + weekdaysShort: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'), + weekdaysMin: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[ⴰⵙⴷⵅ ⴴ] LT', + nextDay: '[ⴰⵙⴽⴰ ⴴ] LT', + nextWeek: 'dddd [ⴴ] LT', + lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT', + lastWeek: 'dddd [ⴴ] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s', + past: 'ⵢⴰⵏ %s', + s: 'ⵉⵎⵉⴽ', + ss: '%d ⵉⵎⵉⴽ', + m: 'ⵎⵉⵏⵓⴺ', + mm: '%d ⵎⵉⵏⵓⴺ', + h: 'ⵙⴰⵄⴰ', + hh: '%d ⵜⴰⵙⵙⴰⵄⵉⵏ', + d: 'ⴰⵙⵙ', + dd: '%d oⵙⵙⴰⵏ', + M: 'ⴰⵢoⵓⵔ', + MM: '%d ⵉⵢⵢⵉⵔⵏ', + y: 'ⴰⵙⴳⴰⵙ', + yy: '%d ⵉⵙⴳⴰⵙⵏ', + }, + week: { + dow: 6, // Saturday is the first day of the week. + doy: 12, // The week that contains Jan 12th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('ug-cn', { + months: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split( + '_' + ), + monthsShort: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split( + '_' + ), + weekdays: 'يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە'.split( + '_' + ), + weekdaysShort: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'), + weekdaysMin: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY-MM-DD', + LL: 'YYYY-يىلىM-ئاينىڭD-كۈنى', + LLL: 'YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm', + LLLL: 'dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm', + }, + meridiemParse: /يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if ( + meridiem === 'يېرىم كېچە' || + meridiem === 'سەھەر' || + meridiem === 'چۈشتىن بۇرۇن' + ) { + return hour; + } else if (meridiem === 'چۈشتىن كېيىن' || meridiem === 'كەچ') { + return hour + 12; + } else { + return hour >= 11 ? hour : hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + var hm = hour * 100 + minute; + if (hm < 600) { + return 'يېرىم كېچە'; + } else if (hm < 900) { + return 'سەھەر'; + } else if (hm < 1130) { + return 'چۈشتىن بۇرۇن'; + } else if (hm < 1230) { + return 'چۈش'; + } else if (hm < 1800) { + return 'چۈشتىن كېيىن'; + } else { + return 'كەچ'; + } + }, + calendar: { + sameDay: '[بۈگۈن سائەت] LT', + nextDay: '[ئەتە سائەت] LT', + nextWeek: '[كېلەركى] dddd [سائەت] LT', + lastDay: '[تۆنۈگۈن] LT', + lastWeek: '[ئالدىنقى] dddd [سائەت] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s كېيىن', + past: '%s بۇرۇن', + s: 'نەچچە سېكونت', + ss: '%d سېكونت', + m: 'بىر مىنۇت', + mm: '%d مىنۇت', + h: 'بىر سائەت', + hh: '%d سائەت', + d: 'بىر كۈن', + dd: '%d كۈن', + M: 'بىر ئاي', + MM: '%d ئاي', + y: 'بىر يىل', + yy: '%d يىل', + }, + + dayOfMonthOrdinalParse: /\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '-كۈنى'; + case 'w': + case 'W': + return number + '-ھەپتە'; + default: + return number; + } + }, + preparse: function (string) { + return string.replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/,/g, '،'); + }, + week: { + // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效 + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 1st is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function plural$6(word, num) { + var forms = word.split('_'); + return num % 10 === 1 && num % 100 !== 11 + ? forms[0] + : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) + ? forms[1] + : forms[2]; + } + function relativeTimeWithPlural$4(number, withoutSuffix, key) { + var format = { + ss: withoutSuffix ? 'секунда_секунди_секунд' : 'секунду_секунди_секунд', + mm: withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин', + hh: withoutSuffix ? 'година_години_годин' : 'годину_години_годин', + dd: 'день_дні_днів', + MM: 'місяць_місяці_місяців', + yy: 'рік_роки_років', + }; + if (key === 'm') { + return withoutSuffix ? 'хвилина' : 'хвилину'; + } else if (key === 'h') { + return withoutSuffix ? 'година' : 'годину'; + } else { + return number + ' ' + plural$6(format[key], +number); + } + } + function weekdaysCaseReplace(m, format) { + var weekdays = { + nominative: 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split( + '_' + ), + accusative: 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split( + '_' + ), + genitive: 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split( + '_' + ), + }, + nounCase; + + if (m === true) { + return weekdays['nominative'] + .slice(1, 7) + .concat(weekdays['nominative'].slice(0, 1)); + } + if (!m) { + return weekdays['nominative']; + } + + nounCase = /(\[[ВвУу]\]) ?dddd/.test(format) + ? 'accusative' + : /\[?(?:минулої|наступної)? ?\] ?dddd/.test(format) + ? 'genitive' + : 'nominative'; + return weekdays[nounCase][m.day()]; + } + function processHoursFunction(str) { + return function () { + return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT'; + }; + } + + hooks.defineLocale('uk', { + months: { + format: 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split( + '_' + ), + standalone: 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split( + '_' + ), + }, + monthsShort: 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split( + '_' + ), + weekdays: weekdaysCaseReplace, + weekdaysShort: 'нд_пн_вт_ср_чт_пт_сб'.split('_'), + weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY р.', + LLL: 'D MMMM YYYY р., HH:mm', + LLLL: 'dddd, D MMMM YYYY р., HH:mm', + }, + calendar: { + sameDay: processHoursFunction('[Сьогодні '), + nextDay: processHoursFunction('[Завтра '), + lastDay: processHoursFunction('[Вчора '), + nextWeek: processHoursFunction('[У] dddd ['), + lastWeek: function () { + switch (this.day()) { + case 0: + case 3: + case 5: + case 6: + return processHoursFunction('[Минулої] dddd [').call(this); + case 1: + case 2: + case 4: + return processHoursFunction('[Минулого] dddd [').call(this); + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'за %s', + past: '%s тому', + s: 'декілька секунд', + ss: relativeTimeWithPlural$4, + m: relativeTimeWithPlural$4, + mm: relativeTimeWithPlural$4, + h: 'годину', + hh: relativeTimeWithPlural$4, + d: 'день', + dd: relativeTimeWithPlural$4, + M: 'місяць', + MM: relativeTimeWithPlural$4, + y: 'рік', + yy: relativeTimeWithPlural$4, + }, + // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason + meridiemParse: /ночі|ранку|дня|вечора/, + isPM: function (input) { + return /^(дня|вечора)$/.test(input); + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'ночі'; + } else if (hour < 12) { + return 'ранку'; + } else if (hour < 17) { + return 'дня'; + } else { + return 'вечора'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}-(й|го)/, + ordinal: function (number, period) { + switch (period) { + case 'M': + case 'd': + case 'DDD': + case 'w': + case 'W': + return number + '-й'; + case 'D': + return number + '-го'; + default: + return number; + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var months$b = [ + 'جنوری', + 'فروری', + 'مارچ', + 'اپریل', + 'مئی', + 'جون', + 'جولائی', + 'اگست', + 'ستمبر', + 'اکتوبر', + 'نومبر', + 'دسمبر', + ], + days$2 = ['اتوار', 'پیر', 'منگل', 'بدھ', 'جمعرات', 'جمعہ', 'ہفتہ']; + + hooks.defineLocale('ur', { + months: months$b, + monthsShort: months$b, + weekdays: days$2, + weekdaysShort: days$2, + weekdaysMin: days$2, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd، D MMMM YYYY HH:mm', + }, + meridiemParse: /صبح|شام/, + isPM: function (input) { + return 'شام' === input; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'صبح'; + } + return 'شام'; + }, + calendar: { + sameDay: '[آج بوقت] LT', + nextDay: '[کل بوقت] LT', + nextWeek: 'dddd [بوقت] LT', + lastDay: '[گذشتہ روز بوقت] LT', + lastWeek: '[گذشتہ] dddd [بوقت] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s بعد', + past: '%s قبل', + s: 'چند سیکنڈ', + ss: '%d سیکنڈ', + m: 'ایک منٹ', + mm: '%d منٹ', + h: 'ایک گھنٹہ', + hh: '%d گھنٹے', + d: 'ایک دن', + dd: '%d دن', + M: 'ایک ماہ', + MM: '%d ماہ', + y: 'ایک سال', + yy: '%d سال', + }, + preparse: function (string) { + return string.replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/,/g, '،'); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('uz-latn', { + months: 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split( + '_' + ), + monthsShort: 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'), + weekdays: 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split( + '_' + ), + weekdaysShort: 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'), + weekdaysMin: 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'D MMMM YYYY, dddd HH:mm', + }, + calendar: { + sameDay: '[Bugun soat] LT [da]', + nextDay: '[Ertaga] LT [da]', + nextWeek: 'dddd [kuni soat] LT [da]', + lastDay: '[Kecha soat] LT [da]', + lastWeek: "[O'tgan] dddd [kuni soat] LT [da]", + sameElse: 'L', + }, + relativeTime: { + future: 'Yaqin %s ichida', + past: 'Bir necha %s oldin', + s: 'soniya', + ss: '%d soniya', + m: 'bir daqiqa', + mm: '%d daqiqa', + h: 'bir soat', + hh: '%d soat', + d: 'bir kun', + dd: '%d kun', + M: 'bir oy', + MM: '%d oy', + y: 'bir yil', + yy: '%d yil', + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('uz', { + months: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split( + '_' + ), + monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'), + weekdays: 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'), + weekdaysShort: 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'), + weekdaysMin: 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'D MMMM YYYY, dddd HH:mm', + }, + calendar: { + sameDay: '[Бугун соат] LT [да]', + nextDay: '[Эртага] LT [да]', + nextWeek: 'dddd [куни соат] LT [да]', + lastDay: '[Кеча соат] LT [да]', + lastWeek: '[Утган] dddd [куни соат] LT [да]', + sameElse: 'L', + }, + relativeTime: { + future: 'Якин %s ичида', + past: 'Бир неча %s олдин', + s: 'фурсат', + ss: '%d фурсат', + m: 'бир дакика', + mm: '%d дакика', + h: 'бир соат', + hh: '%d соат', + d: 'бир кун', + dd: '%d кун', + M: 'бир ой', + MM: '%d ой', + y: 'бир йил', + yy: '%d йил', + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('vi', { + months: 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split( + '_' + ), + monthsShort: 'Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split( + '_' + ), + weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'), + weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'), + weekdaysParseExact: true, + meridiemParse: /sa|ch/i, + isPM: function (input) { + return /^ch$/i.test(input); + }, + meridiem: function (hours, minutes, isLower) { + if (hours < 12) { + return isLower ? 'sa' : 'SA'; + } else { + return isLower ? 'ch' : 'CH'; + } + }, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM [năm] YYYY', + LLL: 'D MMMM [năm] YYYY HH:mm', + LLLL: 'dddd, D MMMM [năm] YYYY HH:mm', + l: 'DD/M/YYYY', + ll: 'D MMM YYYY', + lll: 'D MMM YYYY HH:mm', + llll: 'ddd, D MMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Hôm nay lúc] LT', + nextDay: '[Ngày mai lúc] LT', + nextWeek: 'dddd [tuần tới lúc] LT', + lastDay: '[Hôm qua lúc] LT', + lastWeek: 'dddd [tuần trước lúc] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s tới', + past: '%s trước', + s: 'vài giây', + ss: '%d giây', + m: 'một phút', + mm: '%d phút', + h: 'một giờ', + hh: '%d giờ', + d: 'một ngày', + dd: '%d ngày', + M: 'một tháng', + MM: '%d tháng', + y: 'một năm', + yy: '%d năm', + }, + dayOfMonthOrdinalParse: /\d{1,2}/, + ordinal: function (number) { + return number; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('x-pseudo', { + months: 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split( + '_' + ), + monthsShort: 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split( + '_' + ), + weekdaysShort: 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'), + weekdaysMin: 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[T~ódá~ý át] LT', + nextDay: '[T~ómó~rró~w át] LT', + nextWeek: 'dddd [át] LT', + lastDay: '[Ý~ést~érdá~ý át] LT', + lastWeek: '[L~ást] dddd [át] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'í~ñ %s', + past: '%s á~gó', + s: 'á ~féw ~sécó~ñds', + ss: '%d s~écóñ~ds', + m: 'á ~míñ~úté', + mm: '%d m~íñú~tés', + h: 'á~ñ hó~úr', + hh: '%d h~óúrs', + d: 'á ~dáý', + dd: '%d d~áýs', + M: 'á ~móñ~th', + MM: '%d m~óñt~hs', + y: 'á ~ýéár', + yy: '%d ý~éárs', + }, + dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('yo', { + months: 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split( + '_' + ), + monthsShort: 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'), + weekdays: 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'), + weekdaysShort: 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'), + weekdaysMin: 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'), + longDateFormat: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY h:mm A', + LLLL: 'dddd, D MMMM YYYY h:mm A', + }, + calendar: { + sameDay: '[Ònì ni] LT', + nextDay: '[Ọ̀la ni] LT', + nextWeek: "dddd [Ọsẹ̀ tón'bọ] [ni] LT", + lastDay: '[Àna ni] LT', + lastWeek: 'dddd [Ọsẹ̀ tólọ́] [ni] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'ní %s', + past: '%s kọjá', + s: 'ìsẹjú aayá die', + ss: 'aayá %d', + m: 'ìsẹjú kan', + mm: 'ìsẹjú %d', + h: 'wákati kan', + hh: 'wákati %d', + d: 'ọjọ́ kan', + dd: 'ọjọ́ %d', + M: 'osù kan', + MM: 'osù %d', + y: 'ọdún kan', + yy: 'ọdún %d', + }, + dayOfMonthOrdinalParse: /ọjọ́\s\d{1,2}/, + ordinal: 'ọjọ́ %d', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('zh-cn', { + months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split( + '_' + ), + monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split( + '_' + ), + weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'), + weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'), + weekdaysMin: '日_一_二_三_四_五_六'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY/MM/DD', + LL: 'YYYY年M月D日', + LLL: 'YYYY年M月D日Ah点mm分', + LLLL: 'YYYY年M月D日ddddAh点mm分', + l: 'YYYY/M/D', + ll: 'YYYY年M月D日', + lll: 'YYYY年M月D日 HH:mm', + llll: 'YYYY年M月D日dddd HH:mm', + }, + meridiemParse: /凌晨|早上|上午|中午|下午|晚上/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') { + return hour; + } else if (meridiem === '下午' || meridiem === '晚上') { + return hour + 12; + } else { + // '中午' + return hour >= 11 ? hour : hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + var hm = hour * 100 + minute; + if (hm < 600) { + return '凌晨'; + } else if (hm < 900) { + return '早上'; + } else if (hm < 1130) { + return '上午'; + } else if (hm < 1230) { + return '中午'; + } else if (hm < 1800) { + return '下午'; + } else { + return '晚上'; + } + }, + calendar: { + sameDay: '[今天]LT', + nextDay: '[明天]LT', + nextWeek: function (now) { + if (now.week() !== this.week()) { + return '[下]dddLT'; + } else { + return '[本]dddLT'; + } + }, + lastDay: '[昨天]LT', + lastWeek: function (now) { + if (this.week() !== now.week()) { + return '[上]dddLT'; + } else { + return '[本]dddLT'; + } + }, + sameElse: 'L', + }, + dayOfMonthOrdinalParse: /\d{1,2}(日|月|周)/, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '日'; + case 'M': + return number + '月'; + case 'w': + case 'W': + return number + '周'; + default: + return number; + } + }, + relativeTime: { + future: '%s后', + past: '%s前', + s: '几秒', + ss: '%d 秒', + m: '1 分钟', + mm: '%d 分钟', + h: '1 小时', + hh: '%d 小时', + d: '1 天', + dd: '%d 天', + M: '1 个月', + MM: '%d 个月', + y: '1 年', + yy: '%d 年', + }, + week: { + // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效 + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('zh-hk', { + months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split( + '_' + ), + monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split( + '_' + ), + weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'), + weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'), + weekdaysMin: '日_一_二_三_四_五_六'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY/MM/DD', + LL: 'YYYY年M月D日', + LLL: 'YYYY年M月D日 HH:mm', + LLLL: 'YYYY年M月D日dddd HH:mm', + l: 'YYYY/M/D', + ll: 'YYYY年M月D日', + lll: 'YYYY年M月D日 HH:mm', + llll: 'YYYY年M月D日dddd HH:mm', + }, + meridiemParse: /凌晨|早上|上午|中午|下午|晚上/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') { + return hour; + } else if (meridiem === '中午') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === '下午' || meridiem === '晚上') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + var hm = hour * 100 + minute; + if (hm < 600) { + return '凌晨'; + } else if (hm < 900) { + return '早上'; + } else if (hm < 1200) { + return '上午'; + } else if (hm === 1200) { + return '中午'; + } else if (hm < 1800) { + return '下午'; + } else { + return '晚上'; + } + }, + calendar: { + sameDay: '[今天]LT', + nextDay: '[明天]LT', + nextWeek: '[下]ddddLT', + lastDay: '[昨天]LT', + lastWeek: '[上]ddddLT', + sameElse: 'L', + }, + dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '日'; + case 'M': + return number + '月'; + case 'w': + case 'W': + return number + '週'; + default: + return number; + } + }, + relativeTime: { + future: '%s後', + past: '%s前', + s: '幾秒', + ss: '%d 秒', + m: '1 分鐘', + mm: '%d 分鐘', + h: '1 小時', + hh: '%d 小時', + d: '1 天', + dd: '%d 天', + M: '1 個月', + MM: '%d 個月', + y: '1 年', + yy: '%d 年', + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('zh-mo', { + months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split( + '_' + ), + monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split( + '_' + ), + weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'), + weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'), + weekdaysMin: '日_一_二_三_四_五_六'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'YYYY年M月D日', + LLL: 'YYYY年M月D日 HH:mm', + LLLL: 'YYYY年M月D日dddd HH:mm', + l: 'D/M/YYYY', + ll: 'YYYY年M月D日', + lll: 'YYYY年M月D日 HH:mm', + llll: 'YYYY年M月D日dddd HH:mm', + }, + meridiemParse: /凌晨|早上|上午|中午|下午|晚上/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') { + return hour; + } else if (meridiem === '中午') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === '下午' || meridiem === '晚上') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + var hm = hour * 100 + minute; + if (hm < 600) { + return '凌晨'; + } else if (hm < 900) { + return '早上'; + } else if (hm < 1130) { + return '上午'; + } else if (hm < 1230) { + return '中午'; + } else if (hm < 1800) { + return '下午'; + } else { + return '晚上'; + } + }, + calendar: { + sameDay: '[今天] LT', + nextDay: '[明天] LT', + nextWeek: '[下]dddd LT', + lastDay: '[昨天] LT', + lastWeek: '[上]dddd LT', + sameElse: 'L', + }, + dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '日'; + case 'M': + return number + '月'; + case 'w': + case 'W': + return number + '週'; + default: + return number; + } + }, + relativeTime: { + future: '%s內', + past: '%s前', + s: '幾秒', + ss: '%d 秒', + m: '1 分鐘', + mm: '%d 分鐘', + h: '1 小時', + hh: '%d 小時', + d: '1 天', + dd: '%d 天', + M: '1 個月', + MM: '%d 個月', + y: '1 年', + yy: '%d 年', + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('zh-tw', { + months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split( + '_' + ), + monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split( + '_' + ), + weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'), + weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'), + weekdaysMin: '日_一_二_三_四_五_六'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY/MM/DD', + LL: 'YYYY年M月D日', + LLL: 'YYYY年M月D日 HH:mm', + LLLL: 'YYYY年M月D日dddd HH:mm', + l: 'YYYY/M/D', + ll: 'YYYY年M月D日', + lll: 'YYYY年M月D日 HH:mm', + llll: 'YYYY年M月D日dddd HH:mm', + }, + meridiemParse: /凌晨|早上|上午|中午|下午|晚上/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') { + return hour; + } else if (meridiem === '中午') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === '下午' || meridiem === '晚上') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + var hm = hour * 100 + minute; + if (hm < 600) { + return '凌晨'; + } else if (hm < 900) { + return '早上'; + } else if (hm < 1130) { + return '上午'; + } else if (hm < 1230) { + return '中午'; + } else if (hm < 1800) { + return '下午'; + } else { + return '晚上'; + } + }, + calendar: { + sameDay: '[今天] LT', + nextDay: '[明天] LT', + nextWeek: '[下]dddd LT', + lastDay: '[昨天] LT', + lastWeek: '[上]dddd LT', + sameElse: 'L', + }, + dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '日'; + case 'M': + return number + '月'; + case 'w': + case 'W': + return number + '週'; + default: + return number; + } + }, + relativeTime: { + future: '%s後', + past: '%s前', + s: '幾秒', + ss: '%d 秒', + m: '1 分鐘', + mm: '%d 分鐘', + h: '1 小時', + hh: '%d 小時', + d: '1 天', + dd: '%d 天', + M: '1 個月', + MM: '%d 個月', + y: '1 年', + yy: '%d 年', + }, + }); + + hooks.locale('en'); + + return hooks; + +}))); diff --git a/admin/js/vendors/moment/moment-with-locales.min.js b/admin/js/vendors/moment/moment-with-locales.min.js new file mode 100644 index 0000000..f1f8aba --- /dev/null +++ b/admin/js/vendors/moment/moment-with-locales.min.js @@ -0,0 +1,2 @@ +!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a():"function"==typeof define&&define.amd?define(a):e.moment=a()}(this,function(){"use strict";var e,n;function M(){return e.apply(null,arguments)}function _(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function h(e,a){return Object.prototype.hasOwnProperty.call(e,a)}function o(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;for(var a in e)if(h(e,a))return;return 1}function r(e){return void 0===e}function m(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function d(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function u(e,a){for(var t=[],s=0;s>>0,s=0;sFe(e)?(r=e+1,d-Fe(e)):(r=e,d);return{year:r,dayOfYear:_}}function Ce(e,a,t){var s,n,r=Je(e.year(),a,t),d=Math.floor((e.dayOfYear()-r-1)/7)+1;return d<1?s=d+Ie(n=e.year()-1,a,t):d>Ie(e.year(),a,t)?(s=d-Ie(e.year(),a,t),n=e.year()+1):(n=e.year(),s=d),{week:s,year:n}}function Ie(e,a,t){var s=Je(e,a,t),n=Je(e+1,a,t);return(Fe(e)-s+n)/7}W("w",["ww",2],"wo","week"),W("W",["WW",2],"Wo","isoWeek"),z("week","w"),z("isoWeek","W"),C("week",5),C("isoWeek",5),le("w",ae),le("ww",ae,$),le("W",ae),le("WW",ae,$),Ye(["w","ww","W","WW"],function(e,a,t,s){a[s.substr(0,1)]=G(e)});function Ue(e,a){return e.slice(a,7).concat(e.slice(0,a))}W("d",0,"do","day"),W("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),W("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),W("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),W("e",0,0,"weekday"),W("E",0,0,"isoWeekday"),z("day","d"),z("weekday","e"),z("isoWeekday","E"),C("day",11),C("weekday",11),C("isoWeekday",11),le("d",ae),le("e",ae),le("E",ae),le("dd",function(e,a){return a.weekdaysMinRegex(e)}),le("ddd",function(e,a){return a.weekdaysShortRegex(e)}),le("dddd",function(e,a){return a.weekdaysRegex(e)}),Ye(["dd","ddd","dddd"],function(e,a,t,s){var n=t._locale.weekdaysParse(e,s,t._strict);null!=n?a.d=n:L(t).invalidWeekday=e}),Ye(["d","e","E"],function(e,a,t,s){a[s]=G(e)});var Ge="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ve="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Be="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ke=ue,qe=ue,Ze=ue;function $e(){function e(e,a){return a.length-e.length}for(var a,t,s,n,r=[],d=[],_=[],i=[],o=0;o<7;o++)a=c([2e3,1]).day(o),t=he(this.weekdaysMin(a,"")),s=he(this.weekdaysShort(a,"")),n=he(this.weekdays(a,"")),r.push(t),d.push(s),_.push(n),i.push(t),i.push(s),i.push(n);r.sort(e),d.sort(e),_.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+_.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Qe(){return this.hours()%12||12}function Xe(e,a){W(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),a)})}function ea(e,a){return a._meridiemParse}W("H",["HH",2],0,"hour"),W("h",["hh",2],0,Qe),W("k",["kk",2],0,function(){return this.hours()||24}),W("hmm",0,0,function(){return""+Qe.apply(this)+S(this.minutes(),2)}),W("hmmss",0,0,function(){return""+Qe.apply(this)+S(this.minutes(),2)+S(this.seconds(),2)}),W("Hmm",0,0,function(){return""+this.hours()+S(this.minutes(),2)}),W("Hmmss",0,0,function(){return""+this.hours()+S(this.minutes(),2)+S(this.seconds(),2)}),Xe("a",!0),Xe("A",!1),z("hour","h"),C("hour",13),le("a",ea),le("A",ea),le("H",ae),le("h",ae),le("k",ae),le("HH",ae,$),le("hh",ae,$),le("kk",ae,$),le("hmm",te),le("hmmss",se),le("Hmm",te),le("Hmmss",se),Le(["H","HH"],De),Le(["k","kk"],function(e,a,t){var s=G(e);a[De]=24===s?0:s}),Le(["a","A"],function(e,a,t){t._isPm=t._locale.isPM(e),t._meridiem=e}),Le(["h","hh"],function(e,a,t){a[De]=G(e),L(t).bigHour=!0}),Le("hmm",function(e,a,t){var s=e.length-2;a[De]=G(e.substr(0,s)),a[Te]=G(e.substr(s)),L(t).bigHour=!0}),Le("hmmss",function(e,a,t){var s=e.length-4,n=e.length-2;a[De]=G(e.substr(0,s)),a[Te]=G(e.substr(s,2)),a[ge]=G(e.substr(n)),L(t).bigHour=!0}),Le("Hmm",function(e,a,t){var s=e.length-2;a[De]=G(e.substr(0,s)),a[Te]=G(e.substr(s))}),Le("Hmmss",function(e,a,t){var s=e.length-4,n=e.length-2;a[De]=G(e.substr(0,s)),a[Te]=G(e.substr(s,2)),a[ge]=G(e.substr(n))});var aa=V("Hours",!0);var ta,sa={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Se,monthsShort:je,week:{dow:0,doy:6},weekdays:Ge,weekdaysMin:Be,weekdaysShort:Ve,meridiemParse:/[ap]\.?m?\.?/i},na={},ra={};function da(e){return e?e.toLowerCase().replace("_","-"):e}function _a(e){for(var a,t,s,n,r=0;r=a&&function(e,a){for(var t=Math.min(e.length,a.length),s=0;s=a-1)break;a--}r++}return ta}function ia(a){var e;if(void 0===na[a]&&"undefined"!=typeof module&&module&&module.exports)try{e=ta._abbr,require("./locale/"+a),oa(e)}catch(e){na[a]=null}return na[a]}function oa(e,a){var t;return e&&((t=r(a)?ua(e):ma(e,a))?ta=t:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),ta._abbr}function ma(e,a){if(null===a)return delete na[e],null;var t,s=sa;if(a.abbr=e,null!=na[e])w("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=na[e]._config;else if(null!=a.parentLocale)if(null!=na[a.parentLocale])s=na[a.parentLocale]._config;else{if(null==(t=ia(a.parentLocale)))return ra[a.parentLocale]||(ra[a.parentLocale]=[]),ra[a.parentLocale].push({name:e,config:a}),null;s=t._config}return na[e]=new H(b(s,a)),ra[e]&&ra[e].forEach(function(e){ma(e.name,e.config)}),oa(e),na[e]}function ua(e){var a;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return ta;if(!_(e)){if(a=ia(e))return a;e=[e]}return _a(e)}function la(e){var a,t=e._a;return t&&-2===L(e).overflow&&(a=t[pe]<0||11He(t[fe],t[pe])?ke:t[De]<0||24Ie(t,r,d)?L(e)._overflowWeeks=!0:null!=i?L(e)._overflowWeekday=!0:(_=Re(t,s,n,r,d),e._a[fe]=_.year,e._dayOfYear=_.dayOfYear)}(e),null!=e._dayOfYear&&(r=ga(e._a[fe],s[fe]),(e._dayOfYear>Fe(r)||0===e._dayOfYear)&&(L(e)._overflowDayOfYear=!0),t=Ne(r,0,e._dayOfYear),e._a[pe]=t.getUTCMonth(),e._a[ke]=t.getUTCDate()),a=0;a<3&&null==e._a[a];++a)e._a[a]=i[a]=s[a];for(;a<7;a++)e._a[a]=i[a]=null==e._a[a]?2===a?1:0:e._a[a];24===e._a[De]&&0===e._a[Te]&&0===e._a[ge]&&0===e._a[we]&&(e._nextDay=!0,e._a[De]=0),e._d=(e._useUTC?Ne:function(e,a,t,s,n,r,d){var _;return e<100&&0<=e?(_=new Date(e+400,a,t,s,n,r,d),isFinite(_.getFullYear())&&_.setFullYear(e)):_=new Date(e,a,t,s,n,r,d),_}).apply(null,i),n=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[De]=24),e._w&&void 0!==e._w.d&&e._w.d!==n&&(L(e).weekdayMismatch=!0)}}function va(e){if(e._f!==M.ISO_8601)if(e._f!==M.RFC_2822){e._a=[],L(e).empty=!0;for(var a,t,s,n,r,d,_,i=""+e._i,o=i.length,m=0,u=E(e._f,e._locale).match(j)||[],l=0;lt.valueOf():t.valueOf()"}),yt.toJSON=function(){return this.isValid()?this.toISOString():null},yt.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},yt.unix=function(){return Math.floor(this.valueOf()/1e3)},yt.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},yt.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},yt.eraName=function(){for(var e,a=this.localeData().eras(),t=0,s=a.length;tthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},yt.isLocal=function(){return!!this.isValid()&&!this._isUTC},yt.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},yt.isUtc=Ca,yt.isUTC=Ca,yt.zoneAbbr=function(){return this._isUTC?"UTC":""},yt.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},yt.dates=t("dates accessor is deprecated. Use date instead.",lt),yt.months=t("months accessor is deprecated. Use month instead",Ae),yt.years=t("years accessor is deprecated. Use year instead",ze),yt.zone=t("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,a){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,a),this):-this.utcOffset()}),yt.isDSTShifted=t("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!r(this._isDSTShifted))return this._isDSTShifted;var e,a={};return p(a,this),(a=ba(a))._a?(e=(a._isUTC?c:Sa)(a._a),this._isDSTShifted=this.isValid()&&0>> 0, + i; + + for (i = 0; i < len; i++) { + if (i in t && fun.call(this, t[i], i, t)) { + return true; + } + } + + return false; + }; + } + + function isValid(m) { + if (m._isValid == null) { + var flags = getParsingFlags(m), + parsedParts = some.call(flags.parsedDateParts, function (i) { + return i != null; + }), + isNowValid = + !isNaN(m._d.getTime()) && + flags.overflow < 0 && + !flags.empty && + !flags.invalidEra && + !flags.invalidMonth && + !flags.invalidWeekday && + !flags.weekdayMismatch && + !flags.nullInput && + !flags.invalidFormat && + !flags.userInvalidated && + (!flags.meridiem || (flags.meridiem && parsedParts)); + + if (m._strict) { + isNowValid = + isNowValid && + flags.charsLeftOver === 0 && + flags.unusedTokens.length === 0 && + flags.bigHour === undefined; + } + + if (Object.isFrozen == null || !Object.isFrozen(m)) { + m._isValid = isNowValid; + } else { + return isNowValid; + } + } + return m._isValid; + } + + function createInvalid(flags) { + var m = createUTC(NaN); + if (flags != null) { + extend(getParsingFlags(m), flags); + } else { + getParsingFlags(m).userInvalidated = true; + } + + return m; + } + + // Plugins that add properties should also add the key here (null value), + // so we can properly clone ourselves. + var momentProperties = (hooks.momentProperties = []), + updateInProgress = false; + + function copyConfig(to, from) { + var i, prop, val; + + if (!isUndefined(from._isAMomentObject)) { + to._isAMomentObject = from._isAMomentObject; + } + if (!isUndefined(from._i)) { + to._i = from._i; + } + if (!isUndefined(from._f)) { + to._f = from._f; + } + if (!isUndefined(from._l)) { + to._l = from._l; + } + if (!isUndefined(from._strict)) { + to._strict = from._strict; + } + if (!isUndefined(from._tzm)) { + to._tzm = from._tzm; + } + if (!isUndefined(from._isUTC)) { + to._isUTC = from._isUTC; + } + if (!isUndefined(from._offset)) { + to._offset = from._offset; + } + if (!isUndefined(from._pf)) { + to._pf = getParsingFlags(from); + } + if (!isUndefined(from._locale)) { + to._locale = from._locale; + } + + if (momentProperties.length > 0) { + for (i = 0; i < momentProperties.length; i++) { + prop = momentProperties[i]; + val = from[prop]; + if (!isUndefined(val)) { + to[prop] = val; + } + } + } + + return to; + } + + // Moment prototype object + function Moment(config) { + copyConfig(this, config); + this._d = new Date(config._d != null ? config._d.getTime() : NaN); + if (!this.isValid()) { + this._d = new Date(NaN); + } + // Prevent infinite loop in case updateOffset creates new moment + // objects. + if (updateInProgress === false) { + updateInProgress = true; + hooks.updateOffset(this); + updateInProgress = false; + } + } + + function isMoment(obj) { + return ( + obj instanceof Moment || (obj != null && obj._isAMomentObject != null) + ); + } + + function warn(msg) { + if ( + hooks.suppressDeprecationWarnings === false && + typeof console !== 'undefined' && + console.warn + ) { + console.warn('Deprecation warning: ' + msg); + } + } + + function deprecate(msg, fn) { + var firstTime = true; + + return extend(function () { + if (hooks.deprecationHandler != null) { + hooks.deprecationHandler(null, msg); + } + if (firstTime) { + var args = [], + arg, + i, + key; + for (i = 0; i < arguments.length; i++) { + arg = ''; + if (typeof arguments[i] === 'object') { + arg += '\n[' + i + '] '; + for (key in arguments[0]) { + if (hasOwnProp(arguments[0], key)) { + arg += key + ': ' + arguments[0][key] + ', '; + } + } + arg = arg.slice(0, -2); // Remove trailing comma and space + } else { + arg = arguments[i]; + } + args.push(arg); + } + warn( + msg + + '\nArguments: ' + + Array.prototype.slice.call(args).join('') + + '\n' + + new Error().stack + ); + firstTime = false; + } + return fn.apply(this, arguments); + }, fn); + } + + var deprecations = {}; + + function deprecateSimple(name, msg) { + if (hooks.deprecationHandler != null) { + hooks.deprecationHandler(name, msg); + } + if (!deprecations[name]) { + warn(msg); + deprecations[name] = true; + } + } + + hooks.suppressDeprecationWarnings = false; + hooks.deprecationHandler = null; + + function isFunction(input) { + return ( + (typeof Function !== 'undefined' && input instanceof Function) || + Object.prototype.toString.call(input) === '[object Function]' + ); + } + + function set(config) { + var prop, i; + for (i in config) { + if (hasOwnProp(config, i)) { + prop = config[i]; + if (isFunction(prop)) { + this[i] = prop; + } else { + this['_' + i] = prop; + } + } + } + this._config = config; + // Lenient ordinal parsing accepts just a number in addition to + // number + (possibly) stuff coming from _dayOfMonthOrdinalParse. + // TODO: Remove "ordinalParse" fallback in next major release. + this._dayOfMonthOrdinalParseLenient = new RegExp( + (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + + '|' + + /\d{1,2}/.source + ); + } + + function mergeConfigs(parentConfig, childConfig) { + var res = extend({}, parentConfig), + prop; + for (prop in childConfig) { + if (hasOwnProp(childConfig, prop)) { + if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) { + res[prop] = {}; + extend(res[prop], parentConfig[prop]); + extend(res[prop], childConfig[prop]); + } else if (childConfig[prop] != null) { + res[prop] = childConfig[prop]; + } else { + delete res[prop]; + } + } + } + for (prop in parentConfig) { + if ( + hasOwnProp(parentConfig, prop) && + !hasOwnProp(childConfig, prop) && + isObject(parentConfig[prop]) + ) { + // make sure changes to properties don't modify parent config + res[prop] = extend({}, res[prop]); + } + } + return res; + } + + function Locale(config) { + if (config != null) { + this.set(config); + } + } + + var keys; + + if (Object.keys) { + keys = Object.keys; + } else { + keys = function (obj) { + var i, + res = []; + for (i in obj) { + if (hasOwnProp(obj, i)) { + res.push(i); + } + } + return res; + }; + } + + var defaultCalendar = { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L', + }; + + function calendar(key, mom, now) { + var output = this._calendar[key] || this._calendar['sameElse']; + return isFunction(output) ? output.call(mom, now) : output; + } + + function zeroFill(number, targetLength, forceSign) { + var absNumber = '' + Math.abs(number), + zerosToFill = targetLength - absNumber.length, + sign = number >= 0; + return ( + (sign ? (forceSign ? '+' : '') : '-') + + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + + absNumber + ); + } + + var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g, + localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, + formatFunctions = {}, + formatTokenFunctions = {}; + + // token: 'M' + // padded: ['MM', 2] + // ordinal: 'Mo' + // callback: function () { this.month() + 1 } + function addFormatToken(token, padded, ordinal, callback) { + var func = callback; + if (typeof callback === 'string') { + func = function () { + return this[callback](); + }; + } + if (token) { + formatTokenFunctions[token] = func; + } + if (padded) { + formatTokenFunctions[padded[0]] = function () { + return zeroFill(func.apply(this, arguments), padded[1], padded[2]); + }; + } + if (ordinal) { + formatTokenFunctions[ordinal] = function () { + return this.localeData().ordinal( + func.apply(this, arguments), + token + ); + }; + } + } + + function removeFormattingTokens(input) { + if (input.match(/\[[\s\S]/)) { + return input.replace(/^\[|\]$/g, ''); + } + return input.replace(/\\/g, ''); + } + + function makeFormatFunction(format) { + var array = format.match(formattingTokens), + i, + length; + + for (i = 0, length = array.length; i < length; i++) { + if (formatTokenFunctions[array[i]]) { + array[i] = formatTokenFunctions[array[i]]; + } else { + array[i] = removeFormattingTokens(array[i]); + } + } + + return function (mom) { + var output = '', + i; + for (i = 0; i < length; i++) { + output += isFunction(array[i]) + ? array[i].call(mom, format) + : array[i]; + } + return output; + }; + } + + // format date using native date object + function formatMoment(m, format) { + if (!m.isValid()) { + return m.localeData().invalidDate(); + } + + format = expandFormat(format, m.localeData()); + formatFunctions[format] = + formatFunctions[format] || makeFormatFunction(format); + + return formatFunctions[format](m); + } + + function expandFormat(format, locale) { + var i = 5; + + function replaceLongDateFormatTokens(input) { + return locale.longDateFormat(input) || input; + } + + localFormattingTokens.lastIndex = 0; + while (i >= 0 && localFormattingTokens.test(format)) { + format = format.replace( + localFormattingTokens, + replaceLongDateFormatTokens + ); + localFormattingTokens.lastIndex = 0; + i -= 1; + } + + return format; + } + + var defaultLongDateFormat = { + LTS: 'h:mm:ss A', + LT: 'h:mm A', + L: 'MM/DD/YYYY', + LL: 'MMMM D, YYYY', + LLL: 'MMMM D, YYYY h:mm A', + LLLL: 'dddd, MMMM D, YYYY h:mm A', + }; + + function longDateFormat(key) { + var format = this._longDateFormat[key], + formatUpper = this._longDateFormat[key.toUpperCase()]; + + if (format || !formatUpper) { + return format; + } + + this._longDateFormat[key] = formatUpper + .match(formattingTokens) + .map(function (tok) { + if ( + tok === 'MMMM' || + tok === 'MM' || + tok === 'DD' || + tok === 'dddd' + ) { + return tok.slice(1); + } + return tok; + }) + .join(''); + + return this._longDateFormat[key]; + } + + var defaultInvalidDate = 'Invalid date'; + + function invalidDate() { + return this._invalidDate; + } + + var defaultOrdinal = '%d', + defaultDayOfMonthOrdinalParse = /\d{1,2}/; + + function ordinal(number) { + return this._ordinal.replace('%d', number); + } + + var defaultRelativeTime = { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + w: 'a week', + ww: '%d weeks', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + }; + + function relativeTime(number, withoutSuffix, string, isFuture) { + var output = this._relativeTime[string]; + return isFunction(output) + ? output(number, withoutSuffix, string, isFuture) + : output.replace(/%d/i, number); + } + + function pastFuture(diff, output) { + var format = this._relativeTime[diff > 0 ? 'future' : 'past']; + return isFunction(format) ? format(output) : format.replace(/%s/i, output); + } + + var aliases = {}; + + function addUnitAlias(unit, shorthand) { + var lowerCase = unit.toLowerCase(); + aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit; + } + + function normalizeUnits(units) { + return typeof units === 'string' + ? aliases[units] || aliases[units.toLowerCase()] + : undefined; + } + + function normalizeObjectUnits(inputObject) { + var normalizedInput = {}, + normalizedProp, + prop; + + for (prop in inputObject) { + if (hasOwnProp(inputObject, prop)) { + normalizedProp = normalizeUnits(prop); + if (normalizedProp) { + normalizedInput[normalizedProp] = inputObject[prop]; + } + } + } + + return normalizedInput; + } + + var priorities = {}; + + function addUnitPriority(unit, priority) { + priorities[unit] = priority; + } + + function getPrioritizedUnits(unitsObj) { + var units = [], + u; + for (u in unitsObj) { + if (hasOwnProp(unitsObj, u)) { + units.push({ unit: u, priority: priorities[u] }); + } + } + units.sort(function (a, b) { + return a.priority - b.priority; + }); + return units; + } + + function isLeapYear(year) { + return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; + } + + function absFloor(number) { + if (number < 0) { + // -0 -> 0 + return Math.ceil(number) || 0; + } else { + return Math.floor(number); + } + } + + function toInt(argumentForCoercion) { + var coercedNumber = +argumentForCoercion, + value = 0; + + if (coercedNumber !== 0 && isFinite(coercedNumber)) { + value = absFloor(coercedNumber); + } + + return value; + } + + function makeGetSet(unit, keepTime) { + return function (value) { + if (value != null) { + set$1(this, unit, value); + hooks.updateOffset(this, keepTime); + return this; + } else { + return get(this, unit); + } + }; + } + + function get(mom, unit) { + return mom.isValid() + ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() + : NaN; + } + + function set$1(mom, unit, value) { + if (mom.isValid() && !isNaN(value)) { + if ( + unit === 'FullYear' && + isLeapYear(mom.year()) && + mom.month() === 1 && + mom.date() === 29 + ) { + value = toInt(value); + mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit]( + value, + mom.month(), + daysInMonth(value, mom.month()) + ); + } else { + mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); + } + } + } + + // MOMENTS + + function stringGet(units) { + units = normalizeUnits(units); + if (isFunction(this[units])) { + return this[units](); + } + return this; + } + + function stringSet(units, value) { + if (typeof units === 'object') { + units = normalizeObjectUnits(units); + var prioritized = getPrioritizedUnits(units), + i; + for (i = 0; i < prioritized.length; i++) { + this[prioritized[i].unit](units[prioritized[i].unit]); + } + } else { + units = normalizeUnits(units); + if (isFunction(this[units])) { + return this[units](value); + } + } + return this; + } + + var match1 = /\d/, // 0 - 9 + match2 = /\d\d/, // 00 - 99 + match3 = /\d{3}/, // 000 - 999 + match4 = /\d{4}/, // 0000 - 9999 + match6 = /[+-]?\d{6}/, // -999999 - 999999 + match1to2 = /\d\d?/, // 0 - 99 + match3to4 = /\d\d\d\d?/, // 999 - 9999 + match5to6 = /\d\d\d\d\d\d?/, // 99999 - 999999 + match1to3 = /\d{1,3}/, // 0 - 999 + match1to4 = /\d{1,4}/, // 0 - 9999 + match1to6 = /[+-]?\d{1,6}/, // -999999 - 999999 + matchUnsigned = /\d+/, // 0 - inf + matchSigned = /[+-]?\d+/, // -inf - inf + matchOffset = /Z|[+-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z + matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z + matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123 + // any word (or two) characters or numbers including two/three word month in arabic. + // includes scottish gaelic two word and hyphenated months + matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i, + regexes; + + regexes = {}; + + function addRegexToken(token, regex, strictRegex) { + regexes[token] = isFunction(regex) + ? regex + : function (isStrict, localeData) { + return isStrict && strictRegex ? strictRegex : regex; + }; + } + + function getParseRegexForToken(token, config) { + if (!hasOwnProp(regexes, token)) { + return new RegExp(unescapeFormat(token)); + } + + return regexes[token](config._strict, config._locale); + } + + // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript + function unescapeFormat(s) { + return regexEscape( + s + .replace('\\', '') + .replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function ( + matched, + p1, + p2, + p3, + p4 + ) { + return p1 || p2 || p3 || p4; + }) + ); + } + + function regexEscape(s) { + return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); + } + + var tokens = {}; + + function addParseToken(token, callback) { + var i, + func = callback; + if (typeof token === 'string') { + token = [token]; + } + if (isNumber(callback)) { + func = function (input, array) { + array[callback] = toInt(input); + }; + } + for (i = 0; i < token.length; i++) { + tokens[token[i]] = func; + } + } + + function addWeekParseToken(token, callback) { + addParseToken(token, function (input, array, config, token) { + config._w = config._w || {}; + callback(input, config._w, config, token); + }); + } + + function addTimeToArrayFromToken(token, input, config) { + if (input != null && hasOwnProp(tokens, token)) { + tokens[token](input, config._a, config, token); + } + } + + var YEAR = 0, + MONTH = 1, + DATE = 2, + HOUR = 3, + MINUTE = 4, + SECOND = 5, + MILLISECOND = 6, + WEEK = 7, + WEEKDAY = 8; + + function mod(n, x) { + return ((n % x) + x) % x; + } + + var indexOf; + + if (Array.prototype.indexOf) { + indexOf = Array.prototype.indexOf; + } else { + indexOf = function (o) { + // I know + var i; + for (i = 0; i < this.length; ++i) { + if (this[i] === o) { + return i; + } + } + return -1; + }; + } + + function daysInMonth(year, month) { + if (isNaN(year) || isNaN(month)) { + return NaN; + } + var modMonth = mod(month, 12); + year += (month - modMonth) / 12; + return modMonth === 1 + ? isLeapYear(year) + ? 29 + : 28 + : 31 - ((modMonth % 7) % 2); + } + + // FORMATTING + + addFormatToken('M', ['MM', 2], 'Mo', function () { + return this.month() + 1; + }); + + addFormatToken('MMM', 0, 0, function (format) { + return this.localeData().monthsShort(this, format); + }); + + addFormatToken('MMMM', 0, 0, function (format) { + return this.localeData().months(this, format); + }); + + // ALIASES + + addUnitAlias('month', 'M'); + + // PRIORITY + + addUnitPriority('month', 8); + + // PARSING + + addRegexToken('M', match1to2); + addRegexToken('MM', match1to2, match2); + addRegexToken('MMM', function (isStrict, locale) { + return locale.monthsShortRegex(isStrict); + }); + addRegexToken('MMMM', function (isStrict, locale) { + return locale.monthsRegex(isStrict); + }); + + addParseToken(['M', 'MM'], function (input, array) { + array[MONTH] = toInt(input) - 1; + }); + + addParseToken(['MMM', 'MMMM'], function (input, array, config, token) { + var month = config._locale.monthsParse(input, token, config._strict); + // if we didn't find a month name, mark the date as invalid. + if (month != null) { + array[MONTH] = month; + } else { + getParsingFlags(config).invalidMonth = input; + } + }); + + // LOCALES + + var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ), + defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split( + '_' + ), + MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/, + defaultMonthsShortRegex = matchWord, + defaultMonthsRegex = matchWord; + + function localeMonths(m, format) { + if (!m) { + return isArray(this._months) + ? this._months + : this._months['standalone']; + } + return isArray(this._months) + ? this._months[m.month()] + : this._months[ + (this._months.isFormat || MONTHS_IN_FORMAT).test(format) + ? 'format' + : 'standalone' + ][m.month()]; + } + + function localeMonthsShort(m, format) { + if (!m) { + return isArray(this._monthsShort) + ? this._monthsShort + : this._monthsShort['standalone']; + } + return isArray(this._monthsShort) + ? this._monthsShort[m.month()] + : this._monthsShort[ + MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone' + ][m.month()]; + } + + function handleStrictParse(monthName, format, strict) { + var i, + ii, + mom, + llc = monthName.toLocaleLowerCase(); + if (!this._monthsParse) { + // this is not used + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + for (i = 0; i < 12; ++i) { + mom = createUTC([2000, i]); + this._shortMonthsParse[i] = this.monthsShort( + mom, + '' + ).toLocaleLowerCase(); + this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase(); + } + } + + if (strict) { + if (format === 'MMM') { + ii = indexOf.call(this._shortMonthsParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._longMonthsParse, llc); + return ii !== -1 ? ii : null; + } + } else { + if (format === 'MMM') { + ii = indexOf.call(this._shortMonthsParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._longMonthsParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._longMonthsParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._shortMonthsParse, llc); + return ii !== -1 ? ii : null; + } + } + } + + function localeMonthsParse(monthName, format, strict) { + var i, mom, regex; + + if (this._monthsParseExact) { + return handleStrictParse.call(this, monthName, format, strict); + } + + if (!this._monthsParse) { + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + } + + // TODO: add sorting + // Sorting makes sure if one month (or abbr) is a prefix of another + // see sorting in computeMonthsParse + for (i = 0; i < 12; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, i]); + if (strict && !this._longMonthsParse[i]) { + this._longMonthsParse[i] = new RegExp( + '^' + this.months(mom, '').replace('.', '') + '$', + 'i' + ); + this._shortMonthsParse[i] = new RegExp( + '^' + this.monthsShort(mom, '').replace('.', '') + '$', + 'i' + ); + } + if (!strict && !this._monthsParse[i]) { + regex = + '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); + this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); + } + // test the regex + if ( + strict && + format === 'MMMM' && + this._longMonthsParse[i].test(monthName) + ) { + return i; + } else if ( + strict && + format === 'MMM' && + this._shortMonthsParse[i].test(monthName) + ) { + return i; + } else if (!strict && this._monthsParse[i].test(monthName)) { + return i; + } + } + } + + // MOMENTS + + function setMonth(mom, value) { + var dayOfMonth; + + if (!mom.isValid()) { + // No op + return mom; + } + + if (typeof value === 'string') { + if (/^\d+$/.test(value)) { + value = toInt(value); + } else { + value = mom.localeData().monthsParse(value); + // TODO: Another silent failure? + if (!isNumber(value)) { + return mom; + } + } + } + + dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value)); + mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth); + return mom; + } + + function getSetMonth(value) { + if (value != null) { + setMonth(this, value); + hooks.updateOffset(this, true); + return this; + } else { + return get(this, 'Month'); + } + } + + function getDaysInMonth() { + return daysInMonth(this.year(), this.month()); + } + + function monthsShortRegex(isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, '_monthsRegex')) { + computeMonthsParse.call(this); + } + if (isStrict) { + return this._monthsShortStrictRegex; + } else { + return this._monthsShortRegex; + } + } else { + if (!hasOwnProp(this, '_monthsShortRegex')) { + this._monthsShortRegex = defaultMonthsShortRegex; + } + return this._monthsShortStrictRegex && isStrict + ? this._monthsShortStrictRegex + : this._monthsShortRegex; + } + } + + function monthsRegex(isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, '_monthsRegex')) { + computeMonthsParse.call(this); + } + if (isStrict) { + return this._monthsStrictRegex; + } else { + return this._monthsRegex; + } + } else { + if (!hasOwnProp(this, '_monthsRegex')) { + this._monthsRegex = defaultMonthsRegex; + } + return this._monthsStrictRegex && isStrict + ? this._monthsStrictRegex + : this._monthsRegex; + } + } + + function computeMonthsParse() { + function cmpLenRev(a, b) { + return b.length - a.length; + } + + var shortPieces = [], + longPieces = [], + mixedPieces = [], + i, + mom; + for (i = 0; i < 12; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, i]); + shortPieces.push(this.monthsShort(mom, '')); + longPieces.push(this.months(mom, '')); + mixedPieces.push(this.months(mom, '')); + mixedPieces.push(this.monthsShort(mom, '')); + } + // Sorting makes sure if one month (or abbr) is a prefix of another it + // will match the longer piece. + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + for (i = 0; i < 12; i++) { + shortPieces[i] = regexEscape(shortPieces[i]); + longPieces[i] = regexEscape(longPieces[i]); + } + for (i = 0; i < 24; i++) { + mixedPieces[i] = regexEscape(mixedPieces[i]); + } + + this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._monthsShortRegex = this._monthsRegex; + this._monthsStrictRegex = new RegExp( + '^(' + longPieces.join('|') + ')', + 'i' + ); + this._monthsShortStrictRegex = new RegExp( + '^(' + shortPieces.join('|') + ')', + 'i' + ); + } + + // FORMATTING + + addFormatToken('Y', 0, 0, function () { + var y = this.year(); + return y <= 9999 ? zeroFill(y, 4) : '+' + y; + }); + + addFormatToken(0, ['YY', 2], 0, function () { + return this.year() % 100; + }); + + addFormatToken(0, ['YYYY', 4], 0, 'year'); + addFormatToken(0, ['YYYYY', 5], 0, 'year'); + addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); + + // ALIASES + + addUnitAlias('year', 'y'); + + // PRIORITIES + + addUnitPriority('year', 1); + + // PARSING + + addRegexToken('Y', matchSigned); + addRegexToken('YY', match1to2, match2); + addRegexToken('YYYY', match1to4, match4); + addRegexToken('YYYYY', match1to6, match6); + addRegexToken('YYYYYY', match1to6, match6); + + addParseToken(['YYYYY', 'YYYYYY'], YEAR); + addParseToken('YYYY', function (input, array) { + array[YEAR] = + input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input); + }); + addParseToken('YY', function (input, array) { + array[YEAR] = hooks.parseTwoDigitYear(input); + }); + addParseToken('Y', function (input, array) { + array[YEAR] = parseInt(input, 10); + }); + + // HELPERS + + function daysInYear(year) { + return isLeapYear(year) ? 366 : 365; + } + + // HOOKS + + hooks.parseTwoDigitYear = function (input) { + return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); + }; + + // MOMENTS + + var getSetYear = makeGetSet('FullYear', true); + + function getIsLeapYear() { + return isLeapYear(this.year()); + } + + function createDate(y, m, d, h, M, s, ms) { + // can't just apply() to create a date: + // https://stackoverflow.com/q/181348 + var date; + // the date constructor remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + date = new Date(y + 400, m, d, h, M, s, ms); + if (isFinite(date.getFullYear())) { + date.setFullYear(y); + } + } else { + date = new Date(y, m, d, h, M, s, ms); + } + + return date; + } + + function createUTCDate(y) { + var date, args; + // the Date.UTC function remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + args = Array.prototype.slice.call(arguments); + // preserve leap years using a full 400 year cycle, then reset + args[0] = y + 400; + date = new Date(Date.UTC.apply(null, args)); + if (isFinite(date.getUTCFullYear())) { + date.setUTCFullYear(y); + } + } else { + date = new Date(Date.UTC.apply(null, arguments)); + } + + return date; + } + + // start-of-first-week - start-of-year + function firstWeekOffset(year, dow, doy) { + var // first-week day -- which january is always in the first week (4 for iso, 1 for other) + fwd = 7 + dow - doy, + // first-week day local weekday -- which local weekday is fwd + fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7; + + return -fwdlw + fwd - 1; + } + + // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday + function dayOfYearFromWeeks(year, week, weekday, dow, doy) { + var localWeekday = (7 + weekday - dow) % 7, + weekOffset = firstWeekOffset(year, dow, doy), + dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, + resYear, + resDayOfYear; + + if (dayOfYear <= 0) { + resYear = year - 1; + resDayOfYear = daysInYear(resYear) + dayOfYear; + } else if (dayOfYear > daysInYear(year)) { + resYear = year + 1; + resDayOfYear = dayOfYear - daysInYear(year); + } else { + resYear = year; + resDayOfYear = dayOfYear; + } + + return { + year: resYear, + dayOfYear: resDayOfYear, + }; + } + + function weekOfYear(mom, dow, doy) { + var weekOffset = firstWeekOffset(mom.year(), dow, doy), + week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, + resWeek, + resYear; + + if (week < 1) { + resYear = mom.year() - 1; + resWeek = week + weeksInYear(resYear, dow, doy); + } else if (week > weeksInYear(mom.year(), dow, doy)) { + resWeek = week - weeksInYear(mom.year(), dow, doy); + resYear = mom.year() + 1; + } else { + resYear = mom.year(); + resWeek = week; + } + + return { + week: resWeek, + year: resYear, + }; + } + + function weeksInYear(year, dow, doy) { + var weekOffset = firstWeekOffset(year, dow, doy), + weekOffsetNext = firstWeekOffset(year + 1, dow, doy); + return (daysInYear(year) - weekOffset + weekOffsetNext) / 7; + } + + // FORMATTING + + addFormatToken('w', ['ww', 2], 'wo', 'week'); + addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); + + // ALIASES + + addUnitAlias('week', 'w'); + addUnitAlias('isoWeek', 'W'); + + // PRIORITIES + + addUnitPriority('week', 5); + addUnitPriority('isoWeek', 5); + + // PARSING + + addRegexToken('w', match1to2); + addRegexToken('ww', match1to2, match2); + addRegexToken('W', match1to2); + addRegexToken('WW', match1to2, match2); + + addWeekParseToken(['w', 'ww', 'W', 'WW'], function ( + input, + week, + config, + token + ) { + week[token.substr(0, 1)] = toInt(input); + }); + + // HELPERS + + // LOCALES + + function localeWeek(mom) { + return weekOfYear(mom, this._week.dow, this._week.doy).week; + } + + var defaultLocaleWeek = { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }; + + function localeFirstDayOfWeek() { + return this._week.dow; + } + + function localeFirstDayOfYear() { + return this._week.doy; + } + + // MOMENTS + + function getSetWeek(input) { + var week = this.localeData().week(this); + return input == null ? week : this.add((input - week) * 7, 'd'); + } + + function getSetISOWeek(input) { + var week = weekOfYear(this, 1, 4).week; + return input == null ? week : this.add((input - week) * 7, 'd'); + } + + // FORMATTING + + addFormatToken('d', 0, 'do', 'day'); + + addFormatToken('dd', 0, 0, function (format) { + return this.localeData().weekdaysMin(this, format); + }); + + addFormatToken('ddd', 0, 0, function (format) { + return this.localeData().weekdaysShort(this, format); + }); + + addFormatToken('dddd', 0, 0, function (format) { + return this.localeData().weekdays(this, format); + }); + + addFormatToken('e', 0, 0, 'weekday'); + addFormatToken('E', 0, 0, 'isoWeekday'); + + // ALIASES + + addUnitAlias('day', 'd'); + addUnitAlias('weekday', 'e'); + addUnitAlias('isoWeekday', 'E'); + + // PRIORITY + addUnitPriority('day', 11); + addUnitPriority('weekday', 11); + addUnitPriority('isoWeekday', 11); + + // PARSING + + addRegexToken('d', match1to2); + addRegexToken('e', match1to2); + addRegexToken('E', match1to2); + addRegexToken('dd', function (isStrict, locale) { + return locale.weekdaysMinRegex(isStrict); + }); + addRegexToken('ddd', function (isStrict, locale) { + return locale.weekdaysShortRegex(isStrict); + }); + addRegexToken('dddd', function (isStrict, locale) { + return locale.weekdaysRegex(isStrict); + }); + + addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) { + var weekday = config._locale.weekdaysParse(input, token, config._strict); + // if we didn't get a weekday name, mark the date as invalid + if (weekday != null) { + week.d = weekday; + } else { + getParsingFlags(config).invalidWeekday = input; + } + }); + + addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) { + week[token] = toInt(input); + }); + + // HELPERS + + function parseWeekday(input, locale) { + if (typeof input !== 'string') { + return input; + } + + if (!isNaN(input)) { + return parseInt(input, 10); + } + + input = locale.weekdaysParse(input); + if (typeof input === 'number') { + return input; + } + + return null; + } + + function parseIsoWeekday(input, locale) { + if (typeof input === 'string') { + return locale.weekdaysParse(input) % 7 || 7; + } + return isNaN(input) ? null : input; + } + + // LOCALES + function shiftWeekdays(ws, n) { + return ws.slice(n, 7).concat(ws.slice(0, n)); + } + + var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( + '_' + ), + defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + defaultWeekdaysRegex = matchWord, + defaultWeekdaysShortRegex = matchWord, + defaultWeekdaysMinRegex = matchWord; + + function localeWeekdays(m, format) { + var weekdays = isArray(this._weekdays) + ? this._weekdays + : this._weekdays[ + m && m !== true && this._weekdays.isFormat.test(format) + ? 'format' + : 'standalone' + ]; + return m === true + ? shiftWeekdays(weekdays, this._week.dow) + : m + ? weekdays[m.day()] + : weekdays; + } + + function localeWeekdaysShort(m) { + return m === true + ? shiftWeekdays(this._weekdaysShort, this._week.dow) + : m + ? this._weekdaysShort[m.day()] + : this._weekdaysShort; + } + + function localeWeekdaysMin(m) { + return m === true + ? shiftWeekdays(this._weekdaysMin, this._week.dow) + : m + ? this._weekdaysMin[m.day()] + : this._weekdaysMin; + } + + function handleStrictParse$1(weekdayName, format, strict) { + var i, + ii, + mom, + llc = weekdayName.toLocaleLowerCase(); + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._shortWeekdaysParse = []; + this._minWeekdaysParse = []; + + for (i = 0; i < 7; ++i) { + mom = createUTC([2000, 1]).day(i); + this._minWeekdaysParse[i] = this.weekdaysMin( + mom, + '' + ).toLocaleLowerCase(); + this._shortWeekdaysParse[i] = this.weekdaysShort( + mom, + '' + ).toLocaleLowerCase(); + this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase(); + } + } + + if (strict) { + if (format === 'dddd') { + ii = indexOf.call(this._weekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format === 'ddd') { + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } + } else { + if (format === 'dddd') { + ii = indexOf.call(this._weekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._shortWeekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format === 'ddd') { + ii = indexOf.call(this._shortWeekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._weekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._weekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } + } + } + + function localeWeekdaysParse(weekdayName, format, strict) { + var i, mom, regex; + + if (this._weekdaysParseExact) { + return handleStrictParse$1.call(this, weekdayName, format, strict); + } + + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._minWeekdaysParse = []; + this._shortWeekdaysParse = []; + this._fullWeekdaysParse = []; + } + + for (i = 0; i < 7; i++) { + // make the regex if we don't have it already + + mom = createUTC([2000, 1]).day(i); + if (strict && !this._fullWeekdaysParse[i]) { + this._fullWeekdaysParse[i] = new RegExp( + '^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', + 'i' + ); + this._shortWeekdaysParse[i] = new RegExp( + '^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', + 'i' + ); + this._minWeekdaysParse[i] = new RegExp( + '^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', + 'i' + ); + } + if (!this._weekdaysParse[i]) { + regex = + '^' + + this.weekdays(mom, '') + + '|^' + + this.weekdaysShort(mom, '') + + '|^' + + this.weekdaysMin(mom, ''); + this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); + } + // test the regex + if ( + strict && + format === 'dddd' && + this._fullWeekdaysParse[i].test(weekdayName) + ) { + return i; + } else if ( + strict && + format === 'ddd' && + this._shortWeekdaysParse[i].test(weekdayName) + ) { + return i; + } else if ( + strict && + format === 'dd' && + this._minWeekdaysParse[i].test(weekdayName) + ) { + return i; + } else if (!strict && this._weekdaysParse[i].test(weekdayName)) { + return i; + } + } + } + + // MOMENTS + + function getSetDayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); + if (input != null) { + input = parseWeekday(input, this.localeData()); + return this.add(input - day, 'd'); + } else { + return day; + } + } + + function getSetLocaleDayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; + return input == null ? weekday : this.add(input - weekday, 'd'); + } + + function getSetISODayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + + // behaves the same as moment#day except + // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) + // as a setter, sunday should belong to the previous week. + + if (input != null) { + var weekday = parseIsoWeekday(input, this.localeData()); + return this.day(this.day() % 7 ? weekday : weekday - 7); + } else { + return this.day() || 7; + } + } + + function weekdaysRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + if (isStrict) { + return this._weekdaysStrictRegex; + } else { + return this._weekdaysRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysRegex')) { + this._weekdaysRegex = defaultWeekdaysRegex; + } + return this._weekdaysStrictRegex && isStrict + ? this._weekdaysStrictRegex + : this._weekdaysRegex; + } + } + + function weekdaysShortRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + if (isStrict) { + return this._weekdaysShortStrictRegex; + } else { + return this._weekdaysShortRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysShortRegex')) { + this._weekdaysShortRegex = defaultWeekdaysShortRegex; + } + return this._weekdaysShortStrictRegex && isStrict + ? this._weekdaysShortStrictRegex + : this._weekdaysShortRegex; + } + } + + function weekdaysMinRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + if (isStrict) { + return this._weekdaysMinStrictRegex; + } else { + return this._weekdaysMinRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysMinRegex')) { + this._weekdaysMinRegex = defaultWeekdaysMinRegex; + } + return this._weekdaysMinStrictRegex && isStrict + ? this._weekdaysMinStrictRegex + : this._weekdaysMinRegex; + } + } + + function computeWeekdaysParse() { + function cmpLenRev(a, b) { + return b.length - a.length; + } + + var minPieces = [], + shortPieces = [], + longPieces = [], + mixedPieces = [], + i, + mom, + minp, + shortp, + longp; + for (i = 0; i < 7; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, 1]).day(i); + minp = regexEscape(this.weekdaysMin(mom, '')); + shortp = regexEscape(this.weekdaysShort(mom, '')); + longp = regexEscape(this.weekdays(mom, '')); + minPieces.push(minp); + shortPieces.push(shortp); + longPieces.push(longp); + mixedPieces.push(minp); + mixedPieces.push(shortp); + mixedPieces.push(longp); + } + // Sorting makes sure if one weekday (or abbr) is a prefix of another it + // will match the longer piece. + minPieces.sort(cmpLenRev); + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + + this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._weekdaysShortRegex = this._weekdaysRegex; + this._weekdaysMinRegex = this._weekdaysRegex; + + this._weekdaysStrictRegex = new RegExp( + '^(' + longPieces.join('|') + ')', + 'i' + ); + this._weekdaysShortStrictRegex = new RegExp( + '^(' + shortPieces.join('|') + ')', + 'i' + ); + this._weekdaysMinStrictRegex = new RegExp( + '^(' + minPieces.join('|') + ')', + 'i' + ); + } + + // FORMATTING + + function hFormat() { + return this.hours() % 12 || 12; + } + + function kFormat() { + return this.hours() || 24; + } + + addFormatToken('H', ['HH', 2], 0, 'hour'); + addFormatToken('h', ['hh', 2], 0, hFormat); + addFormatToken('k', ['kk', 2], 0, kFormat); + + addFormatToken('hmm', 0, 0, function () { + return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2); + }); + + addFormatToken('hmmss', 0, 0, function () { + return ( + '' + + hFormat.apply(this) + + zeroFill(this.minutes(), 2) + + zeroFill(this.seconds(), 2) + ); + }); + + addFormatToken('Hmm', 0, 0, function () { + return '' + this.hours() + zeroFill(this.minutes(), 2); + }); + + addFormatToken('Hmmss', 0, 0, function () { + return ( + '' + + this.hours() + + zeroFill(this.minutes(), 2) + + zeroFill(this.seconds(), 2) + ); + }); + + function meridiem(token, lowercase) { + addFormatToken(token, 0, 0, function () { + return this.localeData().meridiem( + this.hours(), + this.minutes(), + lowercase + ); + }); + } + + meridiem('a', true); + meridiem('A', false); + + // ALIASES + + addUnitAlias('hour', 'h'); + + // PRIORITY + addUnitPriority('hour', 13); + + // PARSING + + function matchMeridiem(isStrict, locale) { + return locale._meridiemParse; + } + + addRegexToken('a', matchMeridiem); + addRegexToken('A', matchMeridiem); + addRegexToken('H', match1to2); + addRegexToken('h', match1to2); + addRegexToken('k', match1to2); + addRegexToken('HH', match1to2, match2); + addRegexToken('hh', match1to2, match2); + addRegexToken('kk', match1to2, match2); + + addRegexToken('hmm', match3to4); + addRegexToken('hmmss', match5to6); + addRegexToken('Hmm', match3to4); + addRegexToken('Hmmss', match5to6); + + addParseToken(['H', 'HH'], HOUR); + addParseToken(['k', 'kk'], function (input, array, config) { + var kInput = toInt(input); + array[HOUR] = kInput === 24 ? 0 : kInput; + }); + addParseToken(['a', 'A'], function (input, array, config) { + config._isPm = config._locale.isPM(input); + config._meridiem = input; + }); + addParseToken(['h', 'hh'], function (input, array, config) { + array[HOUR] = toInt(input); + getParsingFlags(config).bigHour = true; + }); + addParseToken('hmm', function (input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); + getParsingFlags(config).bigHour = true; + }); + addParseToken('hmmss', function (input, array, config) { + var pos1 = input.length - 4, + pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); + getParsingFlags(config).bigHour = true; + }); + addParseToken('Hmm', function (input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); + }); + addParseToken('Hmmss', function (input, array, config) { + var pos1 = input.length - 4, + pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); + }); + + // LOCALES + + function localeIsPM(input) { + // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays + // Using charAt should be more compatible. + return (input + '').toLowerCase().charAt(0) === 'p'; + } + + var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i, + // Setting the hour should keep the time, because the user explicitly + // specified which hour they want. So trying to maintain the same hour (in + // a new timezone) makes sense. Adding/subtracting hours does not follow + // this rule. + getSetHour = makeGetSet('Hours', true); + + function localeMeridiem(hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'pm' : 'PM'; + } else { + return isLower ? 'am' : 'AM'; + } + } + + var baseConfig = { + calendar: defaultCalendar, + longDateFormat: defaultLongDateFormat, + invalidDate: defaultInvalidDate, + ordinal: defaultOrdinal, + dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse, + relativeTime: defaultRelativeTime, + + months: defaultLocaleMonths, + monthsShort: defaultLocaleMonthsShort, + + week: defaultLocaleWeek, + + weekdays: defaultLocaleWeekdays, + weekdaysMin: defaultLocaleWeekdaysMin, + weekdaysShort: defaultLocaleWeekdaysShort, + + meridiemParse: defaultLocaleMeridiemParse, + }; + + // internal storage for locale config files + var locales = {}, + localeFamilies = {}, + globalLocale; + + function commonPrefix(arr1, arr2) { + var i, + minl = Math.min(arr1.length, arr2.length); + for (i = 0; i < minl; i += 1) { + if (arr1[i] !== arr2[i]) { + return i; + } + } + return minl; + } + + function normalizeLocale(key) { + return key ? key.toLowerCase().replace('_', '-') : key; + } + + // pick the locale from the array + // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each + // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root + function chooseLocale(names) { + var i = 0, + j, + next, + locale, + split; + + while (i < names.length) { + split = normalizeLocale(names[i]).split('-'); + j = split.length; + next = normalizeLocale(names[i + 1]); + next = next ? next.split('-') : null; + while (j > 0) { + locale = loadLocale(split.slice(0, j).join('-')); + if (locale) { + return locale; + } + if ( + next && + next.length >= j && + commonPrefix(split, next) >= j - 1 + ) { + //the next array item is better than a shallower substring of this one + break; + } + j--; + } + i++; + } + return globalLocale; + } + + function loadLocale(name) { + var oldLocale = null, + aliasedRequire; + // TODO: Find a better way to register and load all the locales in Node + if ( + locales[name] === undefined && + typeof module !== 'undefined' && + module && + module.exports + ) { + try { + oldLocale = globalLocale._abbr; + aliasedRequire = require; + aliasedRequire('./locale/' + name); + getSetGlobalLocale(oldLocale); + } catch (e) { + // mark as not found to avoid repeating expensive file require call causing high CPU + // when trying to find en-US, en_US, en-us for every format call + locales[name] = null; // null means not found + } + } + return locales[name]; + } + + // This function will load locale and then set the global locale. If + // no arguments are passed in, it will simply return the current global + // locale key. + function getSetGlobalLocale(key, values) { + var data; + if (key) { + if (isUndefined(values)) { + data = getLocale(key); + } else { + data = defineLocale(key, values); + } + + if (data) { + // moment.duration._locale = moment._locale = data; + globalLocale = data; + } else { + if (typeof console !== 'undefined' && console.warn) { + //warn user if arguments are passed but the locale could not be set + console.warn( + 'Locale ' + key + ' not found. Did you forget to load it?' + ); + } + } + } + + return globalLocale._abbr; + } + + function defineLocale(name, config) { + if (config !== null) { + var locale, + parentConfig = baseConfig; + config.abbr = name; + if (locales[name] != null) { + deprecateSimple( + 'defineLocaleOverride', + 'use moment.updateLocale(localeName, config) to change ' + + 'an existing locale. moment.defineLocale(localeName, ' + + 'config) should only be used for creating a new locale ' + + 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.' + ); + parentConfig = locales[name]._config; + } else if (config.parentLocale != null) { + if (locales[config.parentLocale] != null) { + parentConfig = locales[config.parentLocale]._config; + } else { + locale = loadLocale(config.parentLocale); + if (locale != null) { + parentConfig = locale._config; + } else { + if (!localeFamilies[config.parentLocale]) { + localeFamilies[config.parentLocale] = []; + } + localeFamilies[config.parentLocale].push({ + name: name, + config: config, + }); + return null; + } + } + } + locales[name] = new Locale(mergeConfigs(parentConfig, config)); + + if (localeFamilies[name]) { + localeFamilies[name].forEach(function (x) { + defineLocale(x.name, x.config); + }); + } + + // backwards compat for now: also set the locale + // make sure we set the locale AFTER all child locales have been + // created, so we won't end up with the child locale set. + getSetGlobalLocale(name); + + return locales[name]; + } else { + // useful for testing + delete locales[name]; + return null; + } + } + + function updateLocale(name, config) { + if (config != null) { + var locale, + tmpLocale, + parentConfig = baseConfig; + + if (locales[name] != null && locales[name].parentLocale != null) { + // Update existing child locale in-place to avoid memory-leaks + locales[name].set(mergeConfigs(locales[name]._config, config)); + } else { + // MERGE + tmpLocale = loadLocale(name); + if (tmpLocale != null) { + parentConfig = tmpLocale._config; + } + config = mergeConfigs(parentConfig, config); + if (tmpLocale == null) { + // updateLocale is called for creating a new locale + // Set abbr so it will have a name (getters return + // undefined otherwise). + config.abbr = name; + } + locale = new Locale(config); + locale.parentLocale = locales[name]; + locales[name] = locale; + } + + // backwards compat for now: also set the locale + getSetGlobalLocale(name); + } else { + // pass null for config to unupdate, useful for tests + if (locales[name] != null) { + if (locales[name].parentLocale != null) { + locales[name] = locales[name].parentLocale; + if (name === getSetGlobalLocale()) { + getSetGlobalLocale(name); + } + } else if (locales[name] != null) { + delete locales[name]; + } + } + } + return locales[name]; + } + + // returns locale data + function getLocale(key) { + var locale; + + if (key && key._locale && key._locale._abbr) { + key = key._locale._abbr; + } + + if (!key) { + return globalLocale; + } + + if (!isArray(key)) { + //short-circuit everything else + locale = loadLocale(key); + if (locale) { + return locale; + } + key = [key]; + } + + return chooseLocale(key); + } + + function listLocales() { + return keys(locales); + } + + function checkOverflow(m) { + var overflow, + a = m._a; + + if (a && getParsingFlags(m).overflow === -2) { + overflow = + a[MONTH] < 0 || a[MONTH] > 11 + ? MONTH + : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) + ? DATE + : a[HOUR] < 0 || + a[HOUR] > 24 || + (a[HOUR] === 24 && + (a[MINUTE] !== 0 || + a[SECOND] !== 0 || + a[MILLISECOND] !== 0)) + ? HOUR + : a[MINUTE] < 0 || a[MINUTE] > 59 + ? MINUTE + : a[SECOND] < 0 || a[SECOND] > 59 + ? SECOND + : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 + ? MILLISECOND + : -1; + + if ( + getParsingFlags(m)._overflowDayOfYear && + (overflow < YEAR || overflow > DATE) + ) { + overflow = DATE; + } + if (getParsingFlags(m)._overflowWeeks && overflow === -1) { + overflow = WEEK; + } + if (getParsingFlags(m)._overflowWeekday && overflow === -1) { + overflow = WEEKDAY; + } + + getParsingFlags(m).overflow = overflow; + } + + return m; + } + + // iso 8601 regex + // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00) + var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, + basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, + tzRegex = /Z|[+-]\d\d(?::?\d\d)?/, + isoDates = [ + ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], + ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], + ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], + ['GGGG-[W]WW', /\d{4}-W\d\d/, false], + ['YYYY-DDD', /\d{4}-\d{3}/], + ['YYYY-MM', /\d{4}-\d\d/, false], + ['YYYYYYMMDD', /[+-]\d{10}/], + ['YYYYMMDD', /\d{8}/], + ['GGGG[W]WWE', /\d{4}W\d{3}/], + ['GGGG[W]WW', /\d{4}W\d{2}/, false], + ['YYYYDDD', /\d{7}/], + ['YYYYMM', /\d{6}/, false], + ['YYYY', /\d{4}/, false], + ], + // iso time formats and regexes + isoTimes = [ + ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], + ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/], + ['HH:mm:ss', /\d\d:\d\d:\d\d/], + ['HH:mm', /\d\d:\d\d/], + ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/], + ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/], + ['HHmmss', /\d\d\d\d\d\d/], + ['HHmm', /\d\d\d\d/], + ['HH', /\d\d/], + ], + aspNetJsonRegex = /^\/?Date\((-?\d+)/i, + // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3 + rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/, + obsOffsets = { + UT: 0, + GMT: 0, + EDT: -4 * 60, + EST: -5 * 60, + CDT: -5 * 60, + CST: -6 * 60, + MDT: -6 * 60, + MST: -7 * 60, + PDT: -7 * 60, + PST: -8 * 60, + }; + + // date from iso format + function configFromISO(config) { + var i, + l, + string = config._i, + match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), + allowTime, + dateFormat, + timeFormat, + tzFormat; + + if (match) { + getParsingFlags(config).iso = true; + + for (i = 0, l = isoDates.length; i < l; i++) { + if (isoDates[i][1].exec(match[1])) { + dateFormat = isoDates[i][0]; + allowTime = isoDates[i][2] !== false; + break; + } + } + if (dateFormat == null) { + config._isValid = false; + return; + } + if (match[3]) { + for (i = 0, l = isoTimes.length; i < l; i++) { + if (isoTimes[i][1].exec(match[3])) { + // match[2] should be 'T' or space + timeFormat = (match[2] || ' ') + isoTimes[i][0]; + break; + } + } + if (timeFormat == null) { + config._isValid = false; + return; + } + } + if (!allowTime && timeFormat != null) { + config._isValid = false; + return; + } + if (match[4]) { + if (tzRegex.exec(match[4])) { + tzFormat = 'Z'; + } else { + config._isValid = false; + return; + } + } + config._f = dateFormat + (timeFormat || '') + (tzFormat || ''); + configFromStringAndFormat(config); + } else { + config._isValid = false; + } + } + + function extractFromRFC2822Strings( + yearStr, + monthStr, + dayStr, + hourStr, + minuteStr, + secondStr + ) { + var result = [ + untruncateYear(yearStr), + defaultLocaleMonthsShort.indexOf(monthStr), + parseInt(dayStr, 10), + parseInt(hourStr, 10), + parseInt(minuteStr, 10), + ]; + + if (secondStr) { + result.push(parseInt(secondStr, 10)); + } + + return result; + } + + function untruncateYear(yearStr) { + var year = parseInt(yearStr, 10); + if (year <= 49) { + return 2000 + year; + } else if (year <= 999) { + return 1900 + year; + } + return year; + } + + function preprocessRFC2822(s) { + // Remove comments and folding whitespace and replace multiple-spaces with a single space + return s + .replace(/\([^)]*\)|[\n\t]/g, ' ') + .replace(/(\s\s+)/g, ' ') + .replace(/^\s\s*/, '') + .replace(/\s\s*$/, ''); + } + + function checkWeekday(weekdayStr, parsedInput, config) { + if (weekdayStr) { + // TODO: Replace the vanilla JS Date object with an independent day-of-week check. + var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr), + weekdayActual = new Date( + parsedInput[0], + parsedInput[1], + parsedInput[2] + ).getDay(); + if (weekdayProvided !== weekdayActual) { + getParsingFlags(config).weekdayMismatch = true; + config._isValid = false; + return false; + } + } + return true; + } + + function calculateOffset(obsOffset, militaryOffset, numOffset) { + if (obsOffset) { + return obsOffsets[obsOffset]; + } else if (militaryOffset) { + // the only allowed military tz is Z + return 0; + } else { + var hm = parseInt(numOffset, 10), + m = hm % 100, + h = (hm - m) / 100; + return h * 60 + m; + } + } + + // date and time from ref 2822 format + function configFromRFC2822(config) { + var match = rfc2822.exec(preprocessRFC2822(config._i)), + parsedArray; + if (match) { + parsedArray = extractFromRFC2822Strings( + match[4], + match[3], + match[2], + match[5], + match[6], + match[7] + ); + if (!checkWeekday(match[1], parsedArray, config)) { + return; + } + + config._a = parsedArray; + config._tzm = calculateOffset(match[8], match[9], match[10]); + + config._d = createUTCDate.apply(null, config._a); + config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); + + getParsingFlags(config).rfc2822 = true; + } else { + config._isValid = false; + } + } + + // date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict + function configFromString(config) { + var matched = aspNetJsonRegex.exec(config._i); + if (matched !== null) { + config._d = new Date(+matched[1]); + return; + } + + configFromISO(config); + if (config._isValid === false) { + delete config._isValid; + } else { + return; + } + + configFromRFC2822(config); + if (config._isValid === false) { + delete config._isValid; + } else { + return; + } + + if (config._strict) { + config._isValid = false; + } else { + // Final attempt, use Input Fallback + hooks.createFromInputFallback(config); + } + } + + hooks.createFromInputFallback = deprecate( + 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + + 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + + 'discouraged and will be removed in an upcoming major release. Please refer to ' + + 'http://momentjs.com/guides/#/warnings/js-date/ for more info.', + function (config) { + config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); + } + ); + + // Pick the first defined of two or three arguments. + function defaults(a, b, c) { + if (a != null) { + return a; + } + if (b != null) { + return b; + } + return c; + } + + function currentDateArray(config) { + // hooks is actually the exported moment object + var nowValue = new Date(hooks.now()); + if (config._useUTC) { + return [ + nowValue.getUTCFullYear(), + nowValue.getUTCMonth(), + nowValue.getUTCDate(), + ]; + } + return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()]; + } + + // convert an array to a date. + // the array should mirror the parameters below + // note: all values past the year are optional and will default to the lowest possible value. + // [year, month, day , hour, minute, second, millisecond] + function configFromArray(config) { + var i, + date, + input = [], + currentDate, + expectedWeekday, + yearToUse; + + if (config._d) { + return; + } + + currentDate = currentDateArray(config); + + //compute day of the year from weeks and weekdays + if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { + dayOfYearFromWeekInfo(config); + } + + //if the day of the year is set, figure out what it is + if (config._dayOfYear != null) { + yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); + + if ( + config._dayOfYear > daysInYear(yearToUse) || + config._dayOfYear === 0 + ) { + getParsingFlags(config)._overflowDayOfYear = true; + } + + date = createUTCDate(yearToUse, 0, config._dayOfYear); + config._a[MONTH] = date.getUTCMonth(); + config._a[DATE] = date.getUTCDate(); + } + + // Default to current date. + // * if no year, month, day of month are given, default to today + // * if day of month is given, default month and year + // * if month is given, default only year + // * if year is given, don't default anything + for (i = 0; i < 3 && config._a[i] == null; ++i) { + config._a[i] = input[i] = currentDate[i]; + } + + // Zero out whatever was not defaulted, including time + for (; i < 7; i++) { + config._a[i] = input[i] = + config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i]; + } + + // Check for 24:00:00.000 + if ( + config._a[HOUR] === 24 && + config._a[MINUTE] === 0 && + config._a[SECOND] === 0 && + config._a[MILLISECOND] === 0 + ) { + config._nextDay = true; + config._a[HOUR] = 0; + } + + config._d = (config._useUTC ? createUTCDate : createDate).apply( + null, + input + ); + expectedWeekday = config._useUTC + ? config._d.getUTCDay() + : config._d.getDay(); + + // Apply timezone offset from input. The actual utcOffset can be changed + // with parseZone. + if (config._tzm != null) { + config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); + } + + if (config._nextDay) { + config._a[HOUR] = 24; + } + + // check for mismatching day of week + if ( + config._w && + typeof config._w.d !== 'undefined' && + config._w.d !== expectedWeekday + ) { + getParsingFlags(config).weekdayMismatch = true; + } + } + + function dayOfYearFromWeekInfo(config) { + var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek; + + w = config._w; + if (w.GG != null || w.W != null || w.E != null) { + dow = 1; + doy = 4; + + // TODO: We need to take the current isoWeekYear, but that depends on + // how we interpret now (local, utc, fixed offset). So create + // a now version of current config (take local/utc/offset flags, and + // create now). + weekYear = defaults( + w.GG, + config._a[YEAR], + weekOfYear(createLocal(), 1, 4).year + ); + week = defaults(w.W, 1); + weekday = defaults(w.E, 1); + if (weekday < 1 || weekday > 7) { + weekdayOverflow = true; + } + } else { + dow = config._locale._week.dow; + doy = config._locale._week.doy; + + curWeek = weekOfYear(createLocal(), dow, doy); + + weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); + + // Default to current week. + week = defaults(w.w, curWeek.week); + + if (w.d != null) { + // weekday -- low day numbers are considered next week + weekday = w.d; + if (weekday < 0 || weekday > 6) { + weekdayOverflow = true; + } + } else if (w.e != null) { + // local weekday -- counting starts from beginning of week + weekday = w.e + dow; + if (w.e < 0 || w.e > 6) { + weekdayOverflow = true; + } + } else { + // default to beginning of week + weekday = dow; + } + } + if (week < 1 || week > weeksInYear(weekYear, dow, doy)) { + getParsingFlags(config)._overflowWeeks = true; + } else if (weekdayOverflow != null) { + getParsingFlags(config)._overflowWeekday = true; + } else { + temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy); + config._a[YEAR] = temp.year; + config._dayOfYear = temp.dayOfYear; + } + } + + // constant that refers to the ISO standard + hooks.ISO_8601 = function () {}; + + // constant that refers to the RFC 2822 form + hooks.RFC_2822 = function () {}; + + // date from string and format string + function configFromStringAndFormat(config) { + // TODO: Move this to another part of the creation flow to prevent circular deps + if (config._f === hooks.ISO_8601) { + configFromISO(config); + return; + } + if (config._f === hooks.RFC_2822) { + configFromRFC2822(config); + return; + } + config._a = []; + getParsingFlags(config).empty = true; + + // This array is used to make a Date, either with `new Date` or `Date.UTC` + var string = '' + config._i, + i, + parsedInput, + tokens, + token, + skipped, + stringLength = string.length, + totalParsedInputLength = 0, + era; + + tokens = + expandFormat(config._f, config._locale).match(formattingTokens) || []; + + for (i = 0; i < tokens.length; i++) { + token = tokens[i]; + parsedInput = (string.match(getParseRegexForToken(token, config)) || + [])[0]; + if (parsedInput) { + skipped = string.substr(0, string.indexOf(parsedInput)); + if (skipped.length > 0) { + getParsingFlags(config).unusedInput.push(skipped); + } + string = string.slice( + string.indexOf(parsedInput) + parsedInput.length + ); + totalParsedInputLength += parsedInput.length; + } + // don't parse if it's not a known token + if (formatTokenFunctions[token]) { + if (parsedInput) { + getParsingFlags(config).empty = false; + } else { + getParsingFlags(config).unusedTokens.push(token); + } + addTimeToArrayFromToken(token, parsedInput, config); + } else if (config._strict && !parsedInput) { + getParsingFlags(config).unusedTokens.push(token); + } + } + + // add remaining unparsed input length to the string + getParsingFlags(config).charsLeftOver = + stringLength - totalParsedInputLength; + if (string.length > 0) { + getParsingFlags(config).unusedInput.push(string); + } + + // clear _12h flag if hour is <= 12 + if ( + config._a[HOUR] <= 12 && + getParsingFlags(config).bigHour === true && + config._a[HOUR] > 0 + ) { + getParsingFlags(config).bigHour = undefined; + } + + getParsingFlags(config).parsedDateParts = config._a.slice(0); + getParsingFlags(config).meridiem = config._meridiem; + // handle meridiem + config._a[HOUR] = meridiemFixWrap( + config._locale, + config._a[HOUR], + config._meridiem + ); + + // handle era + era = getParsingFlags(config).era; + if (era !== null) { + config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]); + } + + configFromArray(config); + checkOverflow(config); + } + + function meridiemFixWrap(locale, hour, meridiem) { + var isPm; + + if (meridiem == null) { + // nothing to do + return hour; + } + if (locale.meridiemHour != null) { + return locale.meridiemHour(hour, meridiem); + } else if (locale.isPM != null) { + // Fallback + isPm = locale.isPM(meridiem); + if (isPm && hour < 12) { + hour += 12; + } + if (!isPm && hour === 12) { + hour = 0; + } + return hour; + } else { + // this is not supposed to happen + return hour; + } + } + + // date from string and array of format strings + function configFromStringAndArray(config) { + var tempConfig, + bestMoment, + scoreToBeat, + i, + currentScore, + validFormatFound, + bestFormatIsValid = false; + + if (config._f.length === 0) { + getParsingFlags(config).invalidFormat = true; + config._d = new Date(NaN); + return; + } + + for (i = 0; i < config._f.length; i++) { + currentScore = 0; + validFormatFound = false; + tempConfig = copyConfig({}, config); + if (config._useUTC != null) { + tempConfig._useUTC = config._useUTC; + } + tempConfig._f = config._f[i]; + configFromStringAndFormat(tempConfig); + + if (isValid(tempConfig)) { + validFormatFound = true; + } + + // if there is any input that was not parsed add a penalty for that format + currentScore += getParsingFlags(tempConfig).charsLeftOver; + + //or tokens + currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; + + getParsingFlags(tempConfig).score = currentScore; + + if (!bestFormatIsValid) { + if ( + scoreToBeat == null || + currentScore < scoreToBeat || + validFormatFound + ) { + scoreToBeat = currentScore; + bestMoment = tempConfig; + if (validFormatFound) { + bestFormatIsValid = true; + } + } + } else { + if (currentScore < scoreToBeat) { + scoreToBeat = currentScore; + bestMoment = tempConfig; + } + } + } + + extend(config, bestMoment || tempConfig); + } + + function configFromObject(config) { + if (config._d) { + return; + } + + var i = normalizeObjectUnits(config._i), + dayOrDate = i.day === undefined ? i.date : i.day; + config._a = map( + [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond], + function (obj) { + return obj && parseInt(obj, 10); + } + ); + + configFromArray(config); + } + + function createFromConfig(config) { + var res = new Moment(checkOverflow(prepareConfig(config))); + if (res._nextDay) { + // Adding is smart enough around DST + res.add(1, 'd'); + res._nextDay = undefined; + } + + return res; + } + + function prepareConfig(config) { + var input = config._i, + format = config._f; + + config._locale = config._locale || getLocale(config._l); + + if (input === null || (format === undefined && input === '')) { + return createInvalid({ nullInput: true }); + } + + if (typeof input === 'string') { + config._i = input = config._locale.preparse(input); + } + + if (isMoment(input)) { + return new Moment(checkOverflow(input)); + } else if (isDate(input)) { + config._d = input; + } else if (isArray(format)) { + configFromStringAndArray(config); + } else if (format) { + configFromStringAndFormat(config); + } else { + configFromInput(config); + } + + if (!isValid(config)) { + config._d = null; + } + + return config; + } + + function configFromInput(config) { + var input = config._i; + if (isUndefined(input)) { + config._d = new Date(hooks.now()); + } else if (isDate(input)) { + config._d = new Date(input.valueOf()); + } else if (typeof input === 'string') { + configFromString(config); + } else if (isArray(input)) { + config._a = map(input.slice(0), function (obj) { + return parseInt(obj, 10); + }); + configFromArray(config); + } else if (isObject(input)) { + configFromObject(config); + } else if (isNumber(input)) { + // from milliseconds + config._d = new Date(input); + } else { + hooks.createFromInputFallback(config); + } + } + + function createLocalOrUTC(input, format, locale, strict, isUTC) { + var c = {}; + + if (format === true || format === false) { + strict = format; + format = undefined; + } + + if (locale === true || locale === false) { + strict = locale; + locale = undefined; + } + + if ( + (isObject(input) && isObjectEmpty(input)) || + (isArray(input) && input.length === 0) + ) { + input = undefined; + } + // object construction must be done this way. + // https://github.com/moment/moment/issues/1423 + c._isAMomentObject = true; + c._useUTC = c._isUTC = isUTC; + c._l = locale; + c._i = input; + c._f = format; + c._strict = strict; + + return createFromConfig(c); + } + + function createLocal(input, format, locale, strict) { + return createLocalOrUTC(input, format, locale, strict, false); + } + + var prototypeMin = deprecate( + 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', + function () { + var other = createLocal.apply(null, arguments); + if (this.isValid() && other.isValid()) { + return other < this ? this : other; + } else { + return createInvalid(); + } + } + ), + prototypeMax = deprecate( + 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', + function () { + var other = createLocal.apply(null, arguments); + if (this.isValid() && other.isValid()) { + return other > this ? this : other; + } else { + return createInvalid(); + } + } + ); + + // Pick a moment m from moments so that m[fn](other) is true for all + // other. This relies on the function fn to be transitive. + // + // moments should either be an array of moment objects or an array, whose + // first element is an array of moment objects. + function pickBy(fn, moments) { + var res, i; + if (moments.length === 1 && isArray(moments[0])) { + moments = moments[0]; + } + if (!moments.length) { + return createLocal(); + } + res = moments[0]; + for (i = 1; i < moments.length; ++i) { + if (!moments[i].isValid() || moments[i][fn](res)) { + res = moments[i]; + } + } + return res; + } + + // TODO: Use [].sort instead? + function min() { + var args = [].slice.call(arguments, 0); + + return pickBy('isBefore', args); + } + + function max() { + var args = [].slice.call(arguments, 0); + + return pickBy('isAfter', args); + } + + var now = function () { + return Date.now ? Date.now() : +new Date(); + }; + + var ordering = [ + 'year', + 'quarter', + 'month', + 'week', + 'day', + 'hour', + 'minute', + 'second', + 'millisecond', + ]; + + function isDurationValid(m) { + var key, + unitHasDecimal = false, + i; + for (key in m) { + if ( + hasOwnProp(m, key) && + !( + indexOf.call(ordering, key) !== -1 && + (m[key] == null || !isNaN(m[key])) + ) + ) { + return false; + } + } + + for (i = 0; i < ordering.length; ++i) { + if (m[ordering[i]]) { + if (unitHasDecimal) { + return false; // only allow non-integers for smallest unit + } + if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) { + unitHasDecimal = true; + } + } + } + + return true; + } + + function isValid$1() { + return this._isValid; + } + + function createInvalid$1() { + return createDuration(NaN); + } + + function Duration(duration) { + var normalizedInput = normalizeObjectUnits(duration), + years = normalizedInput.year || 0, + quarters = normalizedInput.quarter || 0, + months = normalizedInput.month || 0, + weeks = normalizedInput.week || normalizedInput.isoWeek || 0, + days = normalizedInput.day || 0, + hours = normalizedInput.hour || 0, + minutes = normalizedInput.minute || 0, + seconds = normalizedInput.second || 0, + milliseconds = normalizedInput.millisecond || 0; + + this._isValid = isDurationValid(normalizedInput); + + // representation for dateAddRemove + this._milliseconds = + +milliseconds + + seconds * 1e3 + // 1000 + minutes * 6e4 + // 1000 * 60 + hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978 + // Because of dateAddRemove treats 24 hours as different from a + // day when working around DST, we need to store them separately + this._days = +days + weeks * 7; + // It is impossible to translate months into days without knowing + // which months you are are talking about, so we have to store + // it separately. + this._months = +months + quarters * 3 + years * 12; + + this._data = {}; + + this._locale = getLocale(); + + this._bubble(); + } + + function isDuration(obj) { + return obj instanceof Duration; + } + + function absRound(number) { + if (number < 0) { + return Math.round(-1 * number) * -1; + } else { + return Math.round(number); + } + } + + // compare two arrays, return the number of differences + function compareArrays(array1, array2, dontConvert) { + var len = Math.min(array1.length, array2.length), + lengthDiff = Math.abs(array1.length - array2.length), + diffs = 0, + i; + for (i = 0; i < len; i++) { + if ( + (dontConvert && array1[i] !== array2[i]) || + (!dontConvert && toInt(array1[i]) !== toInt(array2[i])) + ) { + diffs++; + } + } + return diffs + lengthDiff; + } + + // FORMATTING + + function offset(token, separator) { + addFormatToken(token, 0, 0, function () { + var offset = this.utcOffset(), + sign = '+'; + if (offset < 0) { + offset = -offset; + sign = '-'; + } + return ( + sign + + zeroFill(~~(offset / 60), 2) + + separator + + zeroFill(~~offset % 60, 2) + ); + }); + } + + offset('Z', ':'); + offset('ZZ', ''); + + // PARSING + + addRegexToken('Z', matchShortOffset); + addRegexToken('ZZ', matchShortOffset); + addParseToken(['Z', 'ZZ'], function (input, array, config) { + config._useUTC = true; + config._tzm = offsetFromString(matchShortOffset, input); + }); + + // HELPERS + + // timezone chunker + // '+10:00' > ['10', '00'] + // '-1530' > ['-15', '30'] + var chunkOffset = /([\+\-]|\d\d)/gi; + + function offsetFromString(matcher, string) { + var matches = (string || '').match(matcher), + chunk, + parts, + minutes; + + if (matches === null) { + return null; + } + + chunk = matches[matches.length - 1] || []; + parts = (chunk + '').match(chunkOffset) || ['-', 0, 0]; + minutes = +(parts[1] * 60) + toInt(parts[2]); + + return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes; + } + + // Return a moment from input, that is local/utc/zone equivalent to model. + function cloneWithOffset(input, model) { + var res, diff; + if (model._isUTC) { + res = model.clone(); + diff = + (isMoment(input) || isDate(input) + ? input.valueOf() + : createLocal(input).valueOf()) - res.valueOf(); + // Use low-level api, because this fn is low-level api. + res._d.setTime(res._d.valueOf() + diff); + hooks.updateOffset(res, false); + return res; + } else { + return createLocal(input).local(); + } + } + + function getDateOffset(m) { + // On Firefox.24 Date#getTimezoneOffset returns a floating point. + // https://github.com/moment/moment/pull/1871 + return -Math.round(m._d.getTimezoneOffset()); + } + + // HOOKS + + // This function will be called whenever a moment is mutated. + // It is intended to keep the offset in sync with the timezone. + hooks.updateOffset = function () {}; + + // MOMENTS + + // keepLocalTime = true means only change the timezone, without + // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--> + // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset + // +0200, so we adjust the time as needed, to be valid. + // + // Keeping the time actually adds/subtracts (one hour) + // from the actual represented time. That is why we call updateOffset + // a second time. In case it wants us to change the offset again + // _changeInProgress == true case, then we have to adjust, because + // there is no such time in the given timezone. + function getSetOffset(input, keepLocalTime, keepMinutes) { + var offset = this._offset || 0, + localAdjust; + if (!this.isValid()) { + return input != null ? this : NaN; + } + if (input != null) { + if (typeof input === 'string') { + input = offsetFromString(matchShortOffset, input); + if (input === null) { + return this; + } + } else if (Math.abs(input) < 16 && !keepMinutes) { + input = input * 60; + } + if (!this._isUTC && keepLocalTime) { + localAdjust = getDateOffset(this); + } + this._offset = input; + this._isUTC = true; + if (localAdjust != null) { + this.add(localAdjust, 'm'); + } + if (offset !== input) { + if (!keepLocalTime || this._changeInProgress) { + addSubtract( + this, + createDuration(input - offset, 'm'), + 1, + false + ); + } else if (!this._changeInProgress) { + this._changeInProgress = true; + hooks.updateOffset(this, true); + this._changeInProgress = null; + } + } + return this; + } else { + return this._isUTC ? offset : getDateOffset(this); + } + } + + function getSetZone(input, keepLocalTime) { + if (input != null) { + if (typeof input !== 'string') { + input = -input; + } + + this.utcOffset(input, keepLocalTime); + + return this; + } else { + return -this.utcOffset(); + } + } + + function setOffsetToUTC(keepLocalTime) { + return this.utcOffset(0, keepLocalTime); + } + + function setOffsetToLocal(keepLocalTime) { + if (this._isUTC) { + this.utcOffset(0, keepLocalTime); + this._isUTC = false; + + if (keepLocalTime) { + this.subtract(getDateOffset(this), 'm'); + } + } + return this; + } + + function setOffsetToParsedOffset() { + if (this._tzm != null) { + this.utcOffset(this._tzm, false, true); + } else if (typeof this._i === 'string') { + var tZone = offsetFromString(matchOffset, this._i); + if (tZone != null) { + this.utcOffset(tZone); + } else { + this.utcOffset(0, true); + } + } + return this; + } + + function hasAlignedHourOffset(input) { + if (!this.isValid()) { + return false; + } + input = input ? createLocal(input).utcOffset() : 0; + + return (this.utcOffset() - input) % 60 === 0; + } + + function isDaylightSavingTime() { + return ( + this.utcOffset() > this.clone().month(0).utcOffset() || + this.utcOffset() > this.clone().month(5).utcOffset() + ); + } + + function isDaylightSavingTimeShifted() { + if (!isUndefined(this._isDSTShifted)) { + return this._isDSTShifted; + } + + var c = {}, + other; + + copyConfig(c, this); + c = prepareConfig(c); + + if (c._a) { + other = c._isUTC ? createUTC(c._a) : createLocal(c._a); + this._isDSTShifted = + this.isValid() && compareArrays(c._a, other.toArray()) > 0; + } else { + this._isDSTShifted = false; + } + + return this._isDSTShifted; + } + + function isLocal() { + return this.isValid() ? !this._isUTC : false; + } + + function isUtcOffset() { + return this.isValid() ? this._isUTC : false; + } + + function isUtc() { + return this.isValid() ? this._isUTC && this._offset === 0 : false; + } + + // ASP.NET json date format regex + var aspNetRegex = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, + // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html + // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere + // and further modified to allow for strings containing both week and day + isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; + + function createDuration(input, key) { + var duration = input, + // matching against regexp is expensive, do it on demand + match = null, + sign, + ret, + diffRes; + + if (isDuration(input)) { + duration = { + ms: input._milliseconds, + d: input._days, + M: input._months, + }; + } else if (isNumber(input) || !isNaN(+input)) { + duration = {}; + if (key) { + duration[key] = +input; + } else { + duration.milliseconds = +input; + } + } else if ((match = aspNetRegex.exec(input))) { + sign = match[1] === '-' ? -1 : 1; + duration = { + y: 0, + d: toInt(match[DATE]) * sign, + h: toInt(match[HOUR]) * sign, + m: toInt(match[MINUTE]) * sign, + s: toInt(match[SECOND]) * sign, + ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match + }; + } else if ((match = isoRegex.exec(input))) { + sign = match[1] === '-' ? -1 : 1; + duration = { + y: parseIso(match[2], sign), + M: parseIso(match[3], sign), + w: parseIso(match[4], sign), + d: parseIso(match[5], sign), + h: parseIso(match[6], sign), + m: parseIso(match[7], sign), + s: parseIso(match[8], sign), + }; + } else if (duration == null) { + // checks for null or undefined + duration = {}; + } else if ( + typeof duration === 'object' && + ('from' in duration || 'to' in duration) + ) { + diffRes = momentsDifference( + createLocal(duration.from), + createLocal(duration.to) + ); + + duration = {}; + duration.ms = diffRes.milliseconds; + duration.M = diffRes.months; + } + + ret = new Duration(duration); + + if (isDuration(input) && hasOwnProp(input, '_locale')) { + ret._locale = input._locale; + } + + if (isDuration(input) && hasOwnProp(input, '_isValid')) { + ret._isValid = input._isValid; + } + + return ret; + } + + createDuration.fn = Duration.prototype; + createDuration.invalid = createInvalid$1; + + function parseIso(inp, sign) { + // We'd normally use ~~inp for this, but unfortunately it also + // converts floats to ints. + // inp may be undefined, so careful calling replace on it. + var res = inp && parseFloat(inp.replace(',', '.')); + // apply sign while we're at it + return (isNaN(res) ? 0 : res) * sign; + } + + function positiveMomentsDifference(base, other) { + var res = {}; + + res.months = + other.month() - base.month() + (other.year() - base.year()) * 12; + if (base.clone().add(res.months, 'M').isAfter(other)) { + --res.months; + } + + res.milliseconds = +other - +base.clone().add(res.months, 'M'); + + return res; + } + + function momentsDifference(base, other) { + var res; + if (!(base.isValid() && other.isValid())) { + return { milliseconds: 0, months: 0 }; + } + + other = cloneWithOffset(other, base); + if (base.isBefore(other)) { + res = positiveMomentsDifference(base, other); + } else { + res = positiveMomentsDifference(other, base); + res.milliseconds = -res.milliseconds; + res.months = -res.months; + } + + return res; + } + + // TODO: remove 'name' arg after deprecation is removed + function createAdder(direction, name) { + return function (val, period) { + var dur, tmp; + //invert the arguments, but complain about it + if (period !== null && !isNaN(+period)) { + deprecateSimple( + name, + 'moment().' + + name + + '(period, number) is deprecated. Please use moment().' + + name + + '(number, period). ' + + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.' + ); + tmp = val; + val = period; + period = tmp; + } + + dur = createDuration(val, period); + addSubtract(this, dur, direction); + return this; + }; + } + + function addSubtract(mom, duration, isAdding, updateOffset) { + var milliseconds = duration._milliseconds, + days = absRound(duration._days), + months = absRound(duration._months); + + if (!mom.isValid()) { + // No op + return; + } + + updateOffset = updateOffset == null ? true : updateOffset; + + if (months) { + setMonth(mom, get(mom, 'Month') + months * isAdding); + } + if (days) { + set$1(mom, 'Date', get(mom, 'Date') + days * isAdding); + } + if (milliseconds) { + mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding); + } + if (updateOffset) { + hooks.updateOffset(mom, days || months); + } + } + + var add = createAdder(1, 'add'), + subtract = createAdder(-1, 'subtract'); + + function isString(input) { + return typeof input === 'string' || input instanceof String; + } + + // type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined + function isMomentInput(input) { + return ( + isMoment(input) || + isDate(input) || + isString(input) || + isNumber(input) || + isNumberOrStringArray(input) || + isMomentInputObject(input) || + input === null || + input === undefined + ); + } + + function isMomentInputObject(input) { + var objectTest = isObject(input) && !isObjectEmpty(input), + propertyTest = false, + properties = [ + 'years', + 'year', + 'y', + 'months', + 'month', + 'M', + 'days', + 'day', + 'd', + 'dates', + 'date', + 'D', + 'hours', + 'hour', + 'h', + 'minutes', + 'minute', + 'm', + 'seconds', + 'second', + 's', + 'milliseconds', + 'millisecond', + 'ms', + ], + i, + property; + + for (i = 0; i < properties.length; i += 1) { + property = properties[i]; + propertyTest = propertyTest || hasOwnProp(input, property); + } + + return objectTest && propertyTest; + } + + function isNumberOrStringArray(input) { + var arrayTest = isArray(input), + dataTypeTest = false; + if (arrayTest) { + dataTypeTest = + input.filter(function (item) { + return !isNumber(item) && isString(input); + }).length === 0; + } + return arrayTest && dataTypeTest; + } + + function isCalendarSpec(input) { + var objectTest = isObject(input) && !isObjectEmpty(input), + propertyTest = false, + properties = [ + 'sameDay', + 'nextDay', + 'lastDay', + 'nextWeek', + 'lastWeek', + 'sameElse', + ], + i, + property; + + for (i = 0; i < properties.length; i += 1) { + property = properties[i]; + propertyTest = propertyTest || hasOwnProp(input, property); + } + + return objectTest && propertyTest; + } + + function getCalendarFormat(myMoment, now) { + var diff = myMoment.diff(now, 'days', true); + return diff < -6 + ? 'sameElse' + : diff < -1 + ? 'lastWeek' + : diff < 0 + ? 'lastDay' + : diff < 1 + ? 'sameDay' + : diff < 2 + ? 'nextDay' + : diff < 7 + ? 'nextWeek' + : 'sameElse'; + } + + function calendar$1(time, formats) { + // Support for single parameter, formats only overload to the calendar function + if (arguments.length === 1) { + if (isMomentInput(arguments[0])) { + time = arguments[0]; + formats = undefined; + } else if (isCalendarSpec(arguments[0])) { + formats = arguments[0]; + time = undefined; + } + } + // We want to compare the start of today, vs this. + // Getting start-of-today depends on whether we're local/utc/offset or not. + var now = time || createLocal(), + sod = cloneWithOffset(now, this).startOf('day'), + format = hooks.calendarFormat(this, sod) || 'sameElse', + output = + formats && + (isFunction(formats[format]) + ? formats[format].call(this, now) + : formats[format]); + + return this.format( + output || this.localeData().calendar(format, this, createLocal(now)) + ); + } + + function clone() { + return new Moment(this); + } + + function isAfter(input, units) { + var localInput = isMoment(input) ? input : createLocal(input); + if (!(this.isValid() && localInput.isValid())) { + return false; + } + units = normalizeUnits(units) || 'millisecond'; + if (units === 'millisecond') { + return this.valueOf() > localInput.valueOf(); + } else { + return localInput.valueOf() < this.clone().startOf(units).valueOf(); + } + } + + function isBefore(input, units) { + var localInput = isMoment(input) ? input : createLocal(input); + if (!(this.isValid() && localInput.isValid())) { + return false; + } + units = normalizeUnits(units) || 'millisecond'; + if (units === 'millisecond') { + return this.valueOf() < localInput.valueOf(); + } else { + return this.clone().endOf(units).valueOf() < localInput.valueOf(); + } + } + + function isBetween(from, to, units, inclusivity) { + var localFrom = isMoment(from) ? from : createLocal(from), + localTo = isMoment(to) ? to : createLocal(to); + if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) { + return false; + } + inclusivity = inclusivity || '()'; + return ( + (inclusivity[0] === '(' + ? this.isAfter(localFrom, units) + : !this.isBefore(localFrom, units)) && + (inclusivity[1] === ')' + ? this.isBefore(localTo, units) + : !this.isAfter(localTo, units)) + ); + } + + function isSame(input, units) { + var localInput = isMoment(input) ? input : createLocal(input), + inputMs; + if (!(this.isValid() && localInput.isValid())) { + return false; + } + units = normalizeUnits(units) || 'millisecond'; + if (units === 'millisecond') { + return this.valueOf() === localInput.valueOf(); + } else { + inputMs = localInput.valueOf(); + return ( + this.clone().startOf(units).valueOf() <= inputMs && + inputMs <= this.clone().endOf(units).valueOf() + ); + } + } + + function isSameOrAfter(input, units) { + return this.isSame(input, units) || this.isAfter(input, units); + } + + function isSameOrBefore(input, units) { + return this.isSame(input, units) || this.isBefore(input, units); + } + + function diff(input, units, asFloat) { + var that, zoneDelta, output; + + if (!this.isValid()) { + return NaN; + } + + that = cloneWithOffset(input, this); + + if (!that.isValid()) { + return NaN; + } + + zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4; + + units = normalizeUnits(units); + + switch (units) { + case 'year': + output = monthDiff(this, that) / 12; + break; + case 'month': + output = monthDiff(this, that); + break; + case 'quarter': + output = monthDiff(this, that) / 3; + break; + case 'second': + output = (this - that) / 1e3; + break; // 1000 + case 'minute': + output = (this - that) / 6e4; + break; // 1000 * 60 + case 'hour': + output = (this - that) / 36e5; + break; // 1000 * 60 * 60 + case 'day': + output = (this - that - zoneDelta) / 864e5; + break; // 1000 * 60 * 60 * 24, negate dst + case 'week': + output = (this - that - zoneDelta) / 6048e5; + break; // 1000 * 60 * 60 * 24 * 7, negate dst + default: + output = this - that; + } + + return asFloat ? output : absFloor(output); + } + + function monthDiff(a, b) { + if (a.date() < b.date()) { + // end-of-month calculations work correct when the start month has more + // days than the end month. + return -monthDiff(b, a); + } + // difference in months + var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()), + // b is in (anchor - 1 month, anchor + 1 month) + anchor = a.clone().add(wholeMonthDiff, 'months'), + anchor2, + adjust; + + if (b - anchor < 0) { + anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); + // linear across the month + adjust = (b - anchor) / (anchor - anchor2); + } else { + anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); + // linear across the month + adjust = (b - anchor) / (anchor2 - anchor); + } + + //check for negative zero, return zero if negative zero + return -(wholeMonthDiff + adjust) || 0; + } + + hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'; + hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]'; + + function toString() { + return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); + } + + function toISOString(keepOffset) { + if (!this.isValid()) { + return null; + } + var utc = keepOffset !== true, + m = utc ? this.clone().utc() : this; + if (m.year() < 0 || m.year() > 9999) { + return formatMoment( + m, + utc + ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' + : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ' + ); + } + if (isFunction(Date.prototype.toISOString)) { + // native implementation is ~50x faster, use it when we can + if (utc) { + return this.toDate().toISOString(); + } else { + return new Date(this.valueOf() + this.utcOffset() * 60 * 1000) + .toISOString() + .replace('Z', formatMoment(m, 'Z')); + } + } + return formatMoment( + m, + utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ' + ); + } + + /** + * Return a human readable representation of a moment that can + * also be evaluated to get a new moment which is the same + * + * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects + */ + function inspect() { + if (!this.isValid()) { + return 'moment.invalid(/* ' + this._i + ' */)'; + } + var func = 'moment', + zone = '', + prefix, + year, + datetime, + suffix; + if (!this.isLocal()) { + func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone'; + zone = 'Z'; + } + prefix = '[' + func + '("]'; + year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY'; + datetime = '-MM-DD[T]HH:mm:ss.SSS'; + suffix = zone + '[")]'; + + return this.format(prefix + year + datetime + suffix); + } + + function format(inputString) { + if (!inputString) { + inputString = this.isUtc() + ? hooks.defaultFormatUtc + : hooks.defaultFormat; + } + var output = formatMoment(this, inputString); + return this.localeData().postformat(output); + } + + function from(time, withoutSuffix) { + if ( + this.isValid() && + ((isMoment(time) && time.isValid()) || createLocal(time).isValid()) + ) { + return createDuration({ to: this, from: time }) + .locale(this.locale()) + .humanize(!withoutSuffix); + } else { + return this.localeData().invalidDate(); + } + } + + function fromNow(withoutSuffix) { + return this.from(createLocal(), withoutSuffix); + } + + function to(time, withoutSuffix) { + if ( + this.isValid() && + ((isMoment(time) && time.isValid()) || createLocal(time).isValid()) + ) { + return createDuration({ from: this, to: time }) + .locale(this.locale()) + .humanize(!withoutSuffix); + } else { + return this.localeData().invalidDate(); + } + } + + function toNow(withoutSuffix) { + return this.to(createLocal(), withoutSuffix); + } + + // If passed a locale key, it will set the locale for this + // instance. Otherwise, it will return the locale configuration + // variables for this instance. + function locale(key) { + var newLocaleData; + + if (key === undefined) { + return this._locale._abbr; + } else { + newLocaleData = getLocale(key); + if (newLocaleData != null) { + this._locale = newLocaleData; + } + return this; + } + } + + var lang = deprecate( + 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', + function (key) { + if (key === undefined) { + return this.localeData(); + } else { + return this.locale(key); + } + } + ); + + function localeData() { + return this._locale; + } + + var MS_PER_SECOND = 1000, + MS_PER_MINUTE = 60 * MS_PER_SECOND, + MS_PER_HOUR = 60 * MS_PER_MINUTE, + MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR; + + // actual modulo - handles negative numbers (for dates before 1970): + function mod$1(dividend, divisor) { + return ((dividend % divisor) + divisor) % divisor; + } + + function localStartOfDate(y, m, d) { + // the date constructor remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + return new Date(y + 400, m, d) - MS_PER_400_YEARS; + } else { + return new Date(y, m, d).valueOf(); + } + } + + function utcStartOfDate(y, m, d) { + // Date.UTC remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS; + } else { + return Date.UTC(y, m, d); + } + } + + function startOf(units) { + var time, startOfDate; + units = normalizeUnits(units); + if (units === undefined || units === 'millisecond' || !this.isValid()) { + return this; + } + + startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; + + switch (units) { + case 'year': + time = startOfDate(this.year(), 0, 1); + break; + case 'quarter': + time = startOfDate( + this.year(), + this.month() - (this.month() % 3), + 1 + ); + break; + case 'month': + time = startOfDate(this.year(), this.month(), 1); + break; + case 'week': + time = startOfDate( + this.year(), + this.month(), + this.date() - this.weekday() + ); + break; + case 'isoWeek': + time = startOfDate( + this.year(), + this.month(), + this.date() - (this.isoWeekday() - 1) + ); + break; + case 'day': + case 'date': + time = startOfDate(this.year(), this.month(), this.date()); + break; + case 'hour': + time = this._d.valueOf(); + time -= mod$1( + time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), + MS_PER_HOUR + ); + break; + case 'minute': + time = this._d.valueOf(); + time -= mod$1(time, MS_PER_MINUTE); + break; + case 'second': + time = this._d.valueOf(); + time -= mod$1(time, MS_PER_SECOND); + break; + } + + this._d.setTime(time); + hooks.updateOffset(this, true); + return this; + } + + function endOf(units) { + var time, startOfDate; + units = normalizeUnits(units); + if (units === undefined || units === 'millisecond' || !this.isValid()) { + return this; + } + + startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; + + switch (units) { + case 'year': + time = startOfDate(this.year() + 1, 0, 1) - 1; + break; + case 'quarter': + time = + startOfDate( + this.year(), + this.month() - (this.month() % 3) + 3, + 1 + ) - 1; + break; + case 'month': + time = startOfDate(this.year(), this.month() + 1, 1) - 1; + break; + case 'week': + time = + startOfDate( + this.year(), + this.month(), + this.date() - this.weekday() + 7 + ) - 1; + break; + case 'isoWeek': + time = + startOfDate( + this.year(), + this.month(), + this.date() - (this.isoWeekday() - 1) + 7 + ) - 1; + break; + case 'day': + case 'date': + time = startOfDate(this.year(), this.month(), this.date() + 1) - 1; + break; + case 'hour': + time = this._d.valueOf(); + time += + MS_PER_HOUR - + mod$1( + time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), + MS_PER_HOUR + ) - + 1; + break; + case 'minute': + time = this._d.valueOf(); + time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1; + break; + case 'second': + time = this._d.valueOf(); + time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1; + break; + } + + this._d.setTime(time); + hooks.updateOffset(this, true); + return this; + } + + function valueOf() { + return this._d.valueOf() - (this._offset || 0) * 60000; + } + + function unix() { + return Math.floor(this.valueOf() / 1000); + } + + function toDate() { + return new Date(this.valueOf()); + } + + function toArray() { + var m = this; + return [ + m.year(), + m.month(), + m.date(), + m.hour(), + m.minute(), + m.second(), + m.millisecond(), + ]; + } + + function toObject() { + var m = this; + return { + years: m.year(), + months: m.month(), + date: m.date(), + hours: m.hours(), + minutes: m.minutes(), + seconds: m.seconds(), + milliseconds: m.milliseconds(), + }; + } + + function toJSON() { + // new Date(NaN).toJSON() === null + return this.isValid() ? this.toISOString() : null; + } + + function isValid$2() { + return isValid(this); + } + + function parsingFlags() { + return extend({}, getParsingFlags(this)); + } + + function invalidAt() { + return getParsingFlags(this).overflow; + } + + function creationData() { + return { + input: this._i, + format: this._f, + locale: this._locale, + isUTC: this._isUTC, + strict: this._strict, + }; + } + + addFormatToken('N', 0, 0, 'eraAbbr'); + addFormatToken('NN', 0, 0, 'eraAbbr'); + addFormatToken('NNN', 0, 0, 'eraAbbr'); + addFormatToken('NNNN', 0, 0, 'eraName'); + addFormatToken('NNNNN', 0, 0, 'eraNarrow'); + + addFormatToken('y', ['y', 1], 'yo', 'eraYear'); + addFormatToken('y', ['yy', 2], 0, 'eraYear'); + addFormatToken('y', ['yyy', 3], 0, 'eraYear'); + addFormatToken('y', ['yyyy', 4], 0, 'eraYear'); + + addRegexToken('N', matchEraAbbr); + addRegexToken('NN', matchEraAbbr); + addRegexToken('NNN', matchEraAbbr); + addRegexToken('NNNN', matchEraName); + addRegexToken('NNNNN', matchEraNarrow); + + addParseToken(['N', 'NN', 'NNN', 'NNNN', 'NNNNN'], function ( + input, + array, + config, + token + ) { + var era = config._locale.erasParse(input, token, config._strict); + if (era) { + getParsingFlags(config).era = era; + } else { + getParsingFlags(config).invalidEra = input; + } + }); + + addRegexToken('y', matchUnsigned); + addRegexToken('yy', matchUnsigned); + addRegexToken('yyy', matchUnsigned); + addRegexToken('yyyy', matchUnsigned); + addRegexToken('yo', matchEraYearOrdinal); + + addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR); + addParseToken(['yo'], function (input, array, config, token) { + var match; + if (config._locale._eraYearOrdinalRegex) { + match = input.match(config._locale._eraYearOrdinalRegex); + } + + if (config._locale.eraYearOrdinalParse) { + array[YEAR] = config._locale.eraYearOrdinalParse(input, match); + } else { + array[YEAR] = parseInt(input, 10); + } + }); + + function localeEras(m, format) { + var i, + l, + date, + eras = this._eras || getLocale('en')._eras; + for (i = 0, l = eras.length; i < l; ++i) { + switch (typeof eras[i].since) { + case 'string': + // truncate time + date = hooks(eras[i].since).startOf('day'); + eras[i].since = date.valueOf(); + break; + } + + switch (typeof eras[i].until) { + case 'undefined': + eras[i].until = +Infinity; + break; + case 'string': + // truncate time + date = hooks(eras[i].until).startOf('day').valueOf(); + eras[i].until = date.valueOf(); + break; + } + } + return eras; + } + + function localeErasParse(eraName, format, strict) { + var i, + l, + eras = this.eras(), + name, + abbr, + narrow; + eraName = eraName.toUpperCase(); + + for (i = 0, l = eras.length; i < l; ++i) { + name = eras[i].name.toUpperCase(); + abbr = eras[i].abbr.toUpperCase(); + narrow = eras[i].narrow.toUpperCase(); + + if (strict) { + switch (format) { + case 'N': + case 'NN': + case 'NNN': + if (abbr === eraName) { + return eras[i]; + } + break; + + case 'NNNN': + if (name === eraName) { + return eras[i]; + } + break; + + case 'NNNNN': + if (narrow === eraName) { + return eras[i]; + } + break; + } + } else if ([name, abbr, narrow].indexOf(eraName) >= 0) { + return eras[i]; + } + } + } + + function localeErasConvertYear(era, year) { + var dir = era.since <= era.until ? +1 : -1; + if (year === undefined) { + return hooks(era.since).year(); + } else { + return hooks(era.since).year() + (year - era.offset) * dir; + } + } + + function getEraName() { + var i, + l, + val, + eras = this.localeData().eras(); + for (i = 0, l = eras.length; i < l; ++i) { + // truncate time + val = this.startOf('day').valueOf(); + + if (eras[i].since <= val && val <= eras[i].until) { + return eras[i].name; + } + if (eras[i].until <= val && val <= eras[i].since) { + return eras[i].name; + } + } + + return ''; + } + + function getEraNarrow() { + var i, + l, + val, + eras = this.localeData().eras(); + for (i = 0, l = eras.length; i < l; ++i) { + // truncate time + val = this.startOf('day').valueOf(); + + if (eras[i].since <= val && val <= eras[i].until) { + return eras[i].narrow; + } + if (eras[i].until <= val && val <= eras[i].since) { + return eras[i].narrow; + } + } + + return ''; + } + + function getEraAbbr() { + var i, + l, + val, + eras = this.localeData().eras(); + for (i = 0, l = eras.length; i < l; ++i) { + // truncate time + val = this.startOf('day').valueOf(); + + if (eras[i].since <= val && val <= eras[i].until) { + return eras[i].abbr; + } + if (eras[i].until <= val && val <= eras[i].since) { + return eras[i].abbr; + } + } + + return ''; + } + + function getEraYear() { + var i, + l, + dir, + val, + eras = this.localeData().eras(); + for (i = 0, l = eras.length; i < l; ++i) { + dir = eras[i].since <= eras[i].until ? +1 : -1; + + // truncate time + val = this.startOf('day').valueOf(); + + if ( + (eras[i].since <= val && val <= eras[i].until) || + (eras[i].until <= val && val <= eras[i].since) + ) { + return ( + (this.year() - hooks(eras[i].since).year()) * dir + + eras[i].offset + ); + } + } + + return this.year(); + } + + function erasNameRegex(isStrict) { + if (!hasOwnProp(this, '_erasNameRegex')) { + computeErasParse.call(this); + } + return isStrict ? this._erasNameRegex : this._erasRegex; + } + + function erasAbbrRegex(isStrict) { + if (!hasOwnProp(this, '_erasAbbrRegex')) { + computeErasParse.call(this); + } + return isStrict ? this._erasAbbrRegex : this._erasRegex; + } + + function erasNarrowRegex(isStrict) { + if (!hasOwnProp(this, '_erasNarrowRegex')) { + computeErasParse.call(this); + } + return isStrict ? this._erasNarrowRegex : this._erasRegex; + } + + function matchEraAbbr(isStrict, locale) { + return locale.erasAbbrRegex(isStrict); + } + + function matchEraName(isStrict, locale) { + return locale.erasNameRegex(isStrict); + } + + function matchEraNarrow(isStrict, locale) { + return locale.erasNarrowRegex(isStrict); + } + + function matchEraYearOrdinal(isStrict, locale) { + return locale._eraYearOrdinalRegex || matchUnsigned; + } + + function computeErasParse() { + var abbrPieces = [], + namePieces = [], + narrowPieces = [], + mixedPieces = [], + i, + l, + eras = this.eras(); + + for (i = 0, l = eras.length; i < l; ++i) { + namePieces.push(regexEscape(eras[i].name)); + abbrPieces.push(regexEscape(eras[i].abbr)); + narrowPieces.push(regexEscape(eras[i].narrow)); + + mixedPieces.push(regexEscape(eras[i].name)); + mixedPieces.push(regexEscape(eras[i].abbr)); + mixedPieces.push(regexEscape(eras[i].narrow)); + } + + this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i'); + this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i'); + this._erasNarrowRegex = new RegExp( + '^(' + narrowPieces.join('|') + ')', + 'i' + ); + } + + // FORMATTING + + addFormatToken(0, ['gg', 2], 0, function () { + return this.weekYear() % 100; + }); + + addFormatToken(0, ['GG', 2], 0, function () { + return this.isoWeekYear() % 100; + }); + + function addWeekYearFormatToken(token, getter) { + addFormatToken(0, [token, token.length], 0, getter); + } + + addWeekYearFormatToken('gggg', 'weekYear'); + addWeekYearFormatToken('ggggg', 'weekYear'); + addWeekYearFormatToken('GGGG', 'isoWeekYear'); + addWeekYearFormatToken('GGGGG', 'isoWeekYear'); + + // ALIASES + + addUnitAlias('weekYear', 'gg'); + addUnitAlias('isoWeekYear', 'GG'); + + // PRIORITY + + addUnitPriority('weekYear', 1); + addUnitPriority('isoWeekYear', 1); + + // PARSING + + addRegexToken('G', matchSigned); + addRegexToken('g', matchSigned); + addRegexToken('GG', match1to2, match2); + addRegexToken('gg', match1to2, match2); + addRegexToken('GGGG', match1to4, match4); + addRegexToken('gggg', match1to4, match4); + addRegexToken('GGGGG', match1to6, match6); + addRegexToken('ggggg', match1to6, match6); + + addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function ( + input, + week, + config, + token + ) { + week[token.substr(0, 2)] = toInt(input); + }); + + addWeekParseToken(['gg', 'GG'], function (input, week, config, token) { + week[token] = hooks.parseTwoDigitYear(input); + }); + + // MOMENTS + + function getSetWeekYear(input) { + return getSetWeekYearHelper.call( + this, + input, + this.week(), + this.weekday(), + this.localeData()._week.dow, + this.localeData()._week.doy + ); + } + + function getSetISOWeekYear(input) { + return getSetWeekYearHelper.call( + this, + input, + this.isoWeek(), + this.isoWeekday(), + 1, + 4 + ); + } + + function getISOWeeksInYear() { + return weeksInYear(this.year(), 1, 4); + } + + function getISOWeeksInISOWeekYear() { + return weeksInYear(this.isoWeekYear(), 1, 4); + } + + function getWeeksInYear() { + var weekInfo = this.localeData()._week; + return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); + } + + function getWeeksInWeekYear() { + var weekInfo = this.localeData()._week; + return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy); + } + + function getSetWeekYearHelper(input, week, weekday, dow, doy) { + var weeksTarget; + if (input == null) { + return weekOfYear(this, dow, doy).year; + } else { + weeksTarget = weeksInYear(input, dow, doy); + if (week > weeksTarget) { + week = weeksTarget; + } + return setWeekAll.call(this, input, week, weekday, dow, doy); + } + } + + function setWeekAll(weekYear, week, weekday, dow, doy) { + var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), + date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear); + + this.year(date.getUTCFullYear()); + this.month(date.getUTCMonth()); + this.date(date.getUTCDate()); + return this; + } + + // FORMATTING + + addFormatToken('Q', 0, 'Qo', 'quarter'); + + // ALIASES + + addUnitAlias('quarter', 'Q'); + + // PRIORITY + + addUnitPriority('quarter', 7); + + // PARSING + + addRegexToken('Q', match1); + addParseToken('Q', function (input, array) { + array[MONTH] = (toInt(input) - 1) * 3; + }); + + // MOMENTS + + function getSetQuarter(input) { + return input == null + ? Math.ceil((this.month() + 1) / 3) + : this.month((input - 1) * 3 + (this.month() % 3)); + } + + // FORMATTING + + addFormatToken('D', ['DD', 2], 'Do', 'date'); + + // ALIASES + + addUnitAlias('date', 'D'); + + // PRIORITY + addUnitPriority('date', 9); + + // PARSING + + addRegexToken('D', match1to2); + addRegexToken('DD', match1to2, match2); + addRegexToken('Do', function (isStrict, locale) { + // TODO: Remove "ordinalParse" fallback in next major release. + return isStrict + ? locale._dayOfMonthOrdinalParse || locale._ordinalParse + : locale._dayOfMonthOrdinalParseLenient; + }); + + addParseToken(['D', 'DD'], DATE); + addParseToken('Do', function (input, array) { + array[DATE] = toInt(input.match(match1to2)[0]); + }); + + // MOMENTS + + var getSetDayOfMonth = makeGetSet('Date', true); + + // FORMATTING + + addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); + + // ALIASES + + addUnitAlias('dayOfYear', 'DDD'); + + // PRIORITY + addUnitPriority('dayOfYear', 4); + + // PARSING + + addRegexToken('DDD', match1to3); + addRegexToken('DDDD', match3); + addParseToken(['DDD', 'DDDD'], function (input, array, config) { + config._dayOfYear = toInt(input); + }); + + // HELPERS + + // MOMENTS + + function getSetDayOfYear(input) { + var dayOfYear = + Math.round( + (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5 + ) + 1; + return input == null ? dayOfYear : this.add(input - dayOfYear, 'd'); + } + + // FORMATTING + + addFormatToken('m', ['mm', 2], 0, 'minute'); + + // ALIASES + + addUnitAlias('minute', 'm'); + + // PRIORITY + + addUnitPriority('minute', 14); + + // PARSING + + addRegexToken('m', match1to2); + addRegexToken('mm', match1to2, match2); + addParseToken(['m', 'mm'], MINUTE); + + // MOMENTS + + var getSetMinute = makeGetSet('Minutes', false); + + // FORMATTING + + addFormatToken('s', ['ss', 2], 0, 'second'); + + // ALIASES + + addUnitAlias('second', 's'); + + // PRIORITY + + addUnitPriority('second', 15); + + // PARSING + + addRegexToken('s', match1to2); + addRegexToken('ss', match1to2, match2); + addParseToken(['s', 'ss'], SECOND); + + // MOMENTS + + var getSetSecond = makeGetSet('Seconds', false); + + // FORMATTING + + addFormatToken('S', 0, 0, function () { + return ~~(this.millisecond() / 100); + }); + + addFormatToken(0, ['SS', 2], 0, function () { + return ~~(this.millisecond() / 10); + }); + + addFormatToken(0, ['SSS', 3], 0, 'millisecond'); + addFormatToken(0, ['SSSS', 4], 0, function () { + return this.millisecond() * 10; + }); + addFormatToken(0, ['SSSSS', 5], 0, function () { + return this.millisecond() * 100; + }); + addFormatToken(0, ['SSSSSS', 6], 0, function () { + return this.millisecond() * 1000; + }); + addFormatToken(0, ['SSSSSSS', 7], 0, function () { + return this.millisecond() * 10000; + }); + addFormatToken(0, ['SSSSSSSS', 8], 0, function () { + return this.millisecond() * 100000; + }); + addFormatToken(0, ['SSSSSSSSS', 9], 0, function () { + return this.millisecond() * 1000000; + }); + + // ALIASES + + addUnitAlias('millisecond', 'ms'); + + // PRIORITY + + addUnitPriority('millisecond', 16); + + // PARSING + + addRegexToken('S', match1to3, match1); + addRegexToken('SS', match1to3, match2); + addRegexToken('SSS', match1to3, match3); + + var token, getSetMillisecond; + for (token = 'SSSS'; token.length <= 9; token += 'S') { + addRegexToken(token, matchUnsigned); + } + + function parseMs(input, array) { + array[MILLISECOND] = toInt(('0.' + input) * 1000); + } + + for (token = 'S'; token.length <= 9; token += 'S') { + addParseToken(token, parseMs); + } + + getSetMillisecond = makeGetSet('Milliseconds', false); + + // FORMATTING + + addFormatToken('z', 0, 0, 'zoneAbbr'); + addFormatToken('zz', 0, 0, 'zoneName'); + + // MOMENTS + + function getZoneAbbr() { + return this._isUTC ? 'UTC' : ''; + } + + function getZoneName() { + return this._isUTC ? 'Coordinated Universal Time' : ''; + } + + var proto = Moment.prototype; + + proto.add = add; + proto.calendar = calendar$1; + proto.clone = clone; + proto.diff = diff; + proto.endOf = endOf; + proto.format = format; + proto.from = from; + proto.fromNow = fromNow; + proto.to = to; + proto.toNow = toNow; + proto.get = stringGet; + proto.invalidAt = invalidAt; + proto.isAfter = isAfter; + proto.isBefore = isBefore; + proto.isBetween = isBetween; + proto.isSame = isSame; + proto.isSameOrAfter = isSameOrAfter; + proto.isSameOrBefore = isSameOrBefore; + proto.isValid = isValid$2; + proto.lang = lang; + proto.locale = locale; + proto.localeData = localeData; + proto.max = prototypeMax; + proto.min = prototypeMin; + proto.parsingFlags = parsingFlags; + proto.set = stringSet; + proto.startOf = startOf; + proto.subtract = subtract; + proto.toArray = toArray; + proto.toObject = toObject; + proto.toDate = toDate; + proto.toISOString = toISOString; + proto.inspect = inspect; + if (typeof Symbol !== 'undefined' && Symbol.for != null) { + proto[Symbol.for('nodejs.util.inspect.custom')] = function () { + return 'Moment<' + this.format() + '>'; + }; + } + proto.toJSON = toJSON; + proto.toString = toString; + proto.unix = unix; + proto.valueOf = valueOf; + proto.creationData = creationData; + proto.eraName = getEraName; + proto.eraNarrow = getEraNarrow; + proto.eraAbbr = getEraAbbr; + proto.eraYear = getEraYear; + proto.year = getSetYear; + proto.isLeapYear = getIsLeapYear; + proto.weekYear = getSetWeekYear; + proto.isoWeekYear = getSetISOWeekYear; + proto.quarter = proto.quarters = getSetQuarter; + proto.month = getSetMonth; + proto.daysInMonth = getDaysInMonth; + proto.week = proto.weeks = getSetWeek; + proto.isoWeek = proto.isoWeeks = getSetISOWeek; + proto.weeksInYear = getWeeksInYear; + proto.weeksInWeekYear = getWeeksInWeekYear; + proto.isoWeeksInYear = getISOWeeksInYear; + proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear; + proto.date = getSetDayOfMonth; + proto.day = proto.days = getSetDayOfWeek; + proto.weekday = getSetLocaleDayOfWeek; + proto.isoWeekday = getSetISODayOfWeek; + proto.dayOfYear = getSetDayOfYear; + proto.hour = proto.hours = getSetHour; + proto.minute = proto.minutes = getSetMinute; + proto.second = proto.seconds = getSetSecond; + proto.millisecond = proto.milliseconds = getSetMillisecond; + proto.utcOffset = getSetOffset; + proto.utc = setOffsetToUTC; + proto.local = setOffsetToLocal; + proto.parseZone = setOffsetToParsedOffset; + proto.hasAlignedHourOffset = hasAlignedHourOffset; + proto.isDST = isDaylightSavingTime; + proto.isLocal = isLocal; + proto.isUtcOffset = isUtcOffset; + proto.isUtc = isUtc; + proto.isUTC = isUtc; + proto.zoneAbbr = getZoneAbbr; + proto.zoneName = getZoneName; + proto.dates = deprecate( + 'dates accessor is deprecated. Use date instead.', + getSetDayOfMonth + ); + proto.months = deprecate( + 'months accessor is deprecated. Use month instead', + getSetMonth + ); + proto.years = deprecate( + 'years accessor is deprecated. Use year instead', + getSetYear + ); + proto.zone = deprecate( + 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', + getSetZone + ); + proto.isDSTShifted = deprecate( + 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', + isDaylightSavingTimeShifted + ); + + function createUnix(input) { + return createLocal(input * 1000); + } + + function createInZone() { + return createLocal.apply(null, arguments).parseZone(); + } + + function preParsePostFormat(string) { + return string; + } + + var proto$1 = Locale.prototype; + + proto$1.calendar = calendar; + proto$1.longDateFormat = longDateFormat; + proto$1.invalidDate = invalidDate; + proto$1.ordinal = ordinal; + proto$1.preparse = preParsePostFormat; + proto$1.postformat = preParsePostFormat; + proto$1.relativeTime = relativeTime; + proto$1.pastFuture = pastFuture; + proto$1.set = set; + proto$1.eras = localeEras; + proto$1.erasParse = localeErasParse; + proto$1.erasConvertYear = localeErasConvertYear; + proto$1.erasAbbrRegex = erasAbbrRegex; + proto$1.erasNameRegex = erasNameRegex; + proto$1.erasNarrowRegex = erasNarrowRegex; + + proto$1.months = localeMonths; + proto$1.monthsShort = localeMonthsShort; + proto$1.monthsParse = localeMonthsParse; + proto$1.monthsRegex = monthsRegex; + proto$1.monthsShortRegex = monthsShortRegex; + proto$1.week = localeWeek; + proto$1.firstDayOfYear = localeFirstDayOfYear; + proto$1.firstDayOfWeek = localeFirstDayOfWeek; + + proto$1.weekdays = localeWeekdays; + proto$1.weekdaysMin = localeWeekdaysMin; + proto$1.weekdaysShort = localeWeekdaysShort; + proto$1.weekdaysParse = localeWeekdaysParse; + + proto$1.weekdaysRegex = weekdaysRegex; + proto$1.weekdaysShortRegex = weekdaysShortRegex; + proto$1.weekdaysMinRegex = weekdaysMinRegex; + + proto$1.isPM = localeIsPM; + proto$1.meridiem = localeMeridiem; + + function get$1(format, index, field, setter) { + var locale = getLocale(), + utc = createUTC().set(setter, index); + return locale[field](utc, format); + } + + function listMonthsImpl(format, index, field) { + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + + if (index != null) { + return get$1(format, index, field, 'month'); + } + + var i, + out = []; + for (i = 0; i < 12; i++) { + out[i] = get$1(format, i, field, 'month'); + } + return out; + } + + // () + // (5) + // (fmt, 5) + // (fmt) + // (true) + // (true, 5) + // (true, fmt, 5) + // (true, fmt) + function listWeekdaysImpl(localeSorted, format, index, field) { + if (typeof localeSorted === 'boolean') { + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + } else { + format = localeSorted; + index = format; + localeSorted = false; + + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + } + + var locale = getLocale(), + shift = localeSorted ? locale._week.dow : 0, + i, + out = []; + + if (index != null) { + return get$1(format, (index + shift) % 7, field, 'day'); + } + + for (i = 0; i < 7; i++) { + out[i] = get$1(format, (i + shift) % 7, field, 'day'); + } + return out; + } + + function listMonths(format, index) { + return listMonthsImpl(format, index, 'months'); + } + + function listMonthsShort(format, index) { + return listMonthsImpl(format, index, 'monthsShort'); + } + + function listWeekdays(localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdays'); + } + + function listWeekdaysShort(localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort'); + } + + function listWeekdaysMin(localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin'); + } + + getSetGlobalLocale('en', { + eras: [ + { + since: '0001-01-01', + until: +Infinity, + offset: 1, + name: 'Anno Domini', + narrow: 'AD', + abbr: 'AD', + }, + { + since: '0000-12-31', + until: -Infinity, + offset: 1, + name: 'Before Christ', + narrow: 'BC', + abbr: 'BC', + }, + ], + dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, + ordinal: function (number) { + var b = number % 10, + output = + toInt((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + }); + + // Side effect imports + + hooks.lang = deprecate( + 'moment.lang is deprecated. Use moment.locale instead.', + getSetGlobalLocale + ); + hooks.langData = deprecate( + 'moment.langData is deprecated. Use moment.localeData instead.', + getLocale + ); + + var mathAbs = Math.abs; + + function abs() { + var data = this._data; + + this._milliseconds = mathAbs(this._milliseconds); + this._days = mathAbs(this._days); + this._months = mathAbs(this._months); + + data.milliseconds = mathAbs(data.milliseconds); + data.seconds = mathAbs(data.seconds); + data.minutes = mathAbs(data.minutes); + data.hours = mathAbs(data.hours); + data.months = mathAbs(data.months); + data.years = mathAbs(data.years); + + return this; + } + + function addSubtract$1(duration, input, value, direction) { + var other = createDuration(input, value); + + duration._milliseconds += direction * other._milliseconds; + duration._days += direction * other._days; + duration._months += direction * other._months; + + return duration._bubble(); + } + + // supports only 2.0-style add(1, 's') or add(duration) + function add$1(input, value) { + return addSubtract$1(this, input, value, 1); + } + + // supports only 2.0-style subtract(1, 's') or subtract(duration) + function subtract$1(input, value) { + return addSubtract$1(this, input, value, -1); + } + + function absCeil(number) { + if (number < 0) { + return Math.floor(number); + } else { + return Math.ceil(number); + } + } + + function bubble() { + var milliseconds = this._milliseconds, + days = this._days, + months = this._months, + data = this._data, + seconds, + minutes, + hours, + years, + monthsFromDays; + + // if we have a mix of positive and negative values, bubble down first + // check: https://github.com/moment/moment/issues/2166 + if ( + !( + (milliseconds >= 0 && days >= 0 && months >= 0) || + (milliseconds <= 0 && days <= 0 && months <= 0) + ) + ) { + milliseconds += absCeil(monthsToDays(months) + days) * 864e5; + days = 0; + months = 0; + } + + // The following code bubbles up values, see the tests for + // examples of what that means. + data.milliseconds = milliseconds % 1000; + + seconds = absFloor(milliseconds / 1000); + data.seconds = seconds % 60; + + minutes = absFloor(seconds / 60); + data.minutes = minutes % 60; + + hours = absFloor(minutes / 60); + data.hours = hours % 24; + + days += absFloor(hours / 24); + + // convert days to months + monthsFromDays = absFloor(daysToMonths(days)); + months += monthsFromDays; + days -= absCeil(monthsToDays(monthsFromDays)); + + // 12 months -> 1 year + years = absFloor(months / 12); + months %= 12; + + data.days = days; + data.months = months; + data.years = years; + + return this; + } + + function daysToMonths(days) { + // 400 years have 146097 days (taking into account leap year rules) + // 400 years have 12 months === 4800 + return (days * 4800) / 146097; + } + + function monthsToDays(months) { + // the reverse of daysToMonths + return (months * 146097) / 4800; + } + + function as(units) { + if (!this.isValid()) { + return NaN; + } + var days, + months, + milliseconds = this._milliseconds; + + units = normalizeUnits(units); + + if (units === 'month' || units === 'quarter' || units === 'year') { + days = this._days + milliseconds / 864e5; + months = this._months + daysToMonths(days); + switch (units) { + case 'month': + return months; + case 'quarter': + return months / 3; + case 'year': + return months / 12; + } + } else { + // handle milliseconds separately because of floating point math errors (issue #1867) + days = this._days + Math.round(monthsToDays(this._months)); + switch (units) { + case 'week': + return days / 7 + milliseconds / 6048e5; + case 'day': + return days + milliseconds / 864e5; + case 'hour': + return days * 24 + milliseconds / 36e5; + case 'minute': + return days * 1440 + milliseconds / 6e4; + case 'second': + return days * 86400 + milliseconds / 1000; + // Math.floor prevents floating point math errors here + case 'millisecond': + return Math.floor(days * 864e5) + milliseconds; + default: + throw new Error('Unknown unit ' + units); + } + } + } + + // TODO: Use this.as('ms')? + function valueOf$1() { + if (!this.isValid()) { + return NaN; + } + return ( + this._milliseconds + + this._days * 864e5 + + (this._months % 12) * 2592e6 + + toInt(this._months / 12) * 31536e6 + ); + } + + function makeAs(alias) { + return function () { + return this.as(alias); + }; + } + + var asMilliseconds = makeAs('ms'), + asSeconds = makeAs('s'), + asMinutes = makeAs('m'), + asHours = makeAs('h'), + asDays = makeAs('d'), + asWeeks = makeAs('w'), + asMonths = makeAs('M'), + asQuarters = makeAs('Q'), + asYears = makeAs('y'); + + function clone$1() { + return createDuration(this); + } + + function get$2(units) { + units = normalizeUnits(units); + return this.isValid() ? this[units + 's']() : NaN; + } + + function makeGetter(name) { + return function () { + return this.isValid() ? this._data[name] : NaN; + }; + } + + var milliseconds = makeGetter('milliseconds'), + seconds = makeGetter('seconds'), + minutes = makeGetter('minutes'), + hours = makeGetter('hours'), + days = makeGetter('days'), + months = makeGetter('months'), + years = makeGetter('years'); + + function weeks() { + return absFloor(this.days() / 7); + } + + var round = Math.round, + thresholds = { + ss: 44, // a few seconds to seconds + s: 45, // seconds to minute + m: 45, // minutes to hour + h: 22, // hours to day + d: 26, // days to month/week + w: null, // weeks to month + M: 11, // months to year + }; + + // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize + function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { + return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); + } + + function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) { + var duration = createDuration(posNegDuration).abs(), + seconds = round(duration.as('s')), + minutes = round(duration.as('m')), + hours = round(duration.as('h')), + days = round(duration.as('d')), + months = round(duration.as('M')), + weeks = round(duration.as('w')), + years = round(duration.as('y')), + a = + (seconds <= thresholds.ss && ['s', seconds]) || + (seconds < thresholds.s && ['ss', seconds]) || + (minutes <= 1 && ['m']) || + (minutes < thresholds.m && ['mm', minutes]) || + (hours <= 1 && ['h']) || + (hours < thresholds.h && ['hh', hours]) || + (days <= 1 && ['d']) || + (days < thresholds.d && ['dd', days]); + + if (thresholds.w != null) { + a = + a || + (weeks <= 1 && ['w']) || + (weeks < thresholds.w && ['ww', weeks]); + } + a = a || + (months <= 1 && ['M']) || + (months < thresholds.M && ['MM', months]) || + (years <= 1 && ['y']) || ['yy', years]; + + a[2] = withoutSuffix; + a[3] = +posNegDuration > 0; + a[4] = locale; + return substituteTimeAgo.apply(null, a); + } + + // This function allows you to set the rounding function for relative time strings + function getSetRelativeTimeRounding(roundingFunction) { + if (roundingFunction === undefined) { + return round; + } + if (typeof roundingFunction === 'function') { + round = roundingFunction; + return true; + } + return false; + } + + // This function allows you to set a threshold for relative time strings + function getSetRelativeTimeThreshold(threshold, limit) { + if (thresholds[threshold] === undefined) { + return false; + } + if (limit === undefined) { + return thresholds[threshold]; + } + thresholds[threshold] = limit; + if (threshold === 's') { + thresholds.ss = limit - 1; + } + return true; + } + + function humanize(argWithSuffix, argThresholds) { + if (!this.isValid()) { + return this.localeData().invalidDate(); + } + + var withSuffix = false, + th = thresholds, + locale, + output; + + if (typeof argWithSuffix === 'object') { + argThresholds = argWithSuffix; + argWithSuffix = false; + } + if (typeof argWithSuffix === 'boolean') { + withSuffix = argWithSuffix; + } + if (typeof argThresholds === 'object') { + th = Object.assign({}, thresholds, argThresholds); + if (argThresholds.s != null && argThresholds.ss == null) { + th.ss = argThresholds.s - 1; + } + } + + locale = this.localeData(); + output = relativeTime$1(this, !withSuffix, th, locale); + + if (withSuffix) { + output = locale.pastFuture(+this, output); + } + + return locale.postformat(output); + } + + var abs$1 = Math.abs; + + function sign(x) { + return (x > 0) - (x < 0) || +x; + } + + function toISOString$1() { + // for ISO strings we do not use the normal bubbling rules: + // * milliseconds bubble up until they become hours + // * days do not bubble at all + // * months bubble up until they become years + // This is because there is no context-free conversion between hours and days + // (think of clock changes) + // and also not between days and months (28-31 days per month) + if (!this.isValid()) { + return this.localeData().invalidDate(); + } + + var seconds = abs$1(this._milliseconds) / 1000, + days = abs$1(this._days), + months = abs$1(this._months), + minutes, + hours, + years, + s, + total = this.asSeconds(), + totalSign, + ymSign, + daysSign, + hmsSign; + + if (!total) { + // this is the same as C#'s (Noda) and python (isodate)... + // but not other JS (goog.date) + return 'P0D'; + } + + // 3600 seconds -> 60 minutes -> 1 hour + minutes = absFloor(seconds / 60); + hours = absFloor(minutes / 60); + seconds %= 60; + minutes %= 60; + + // 12 months -> 1 year + years = absFloor(months / 12); + months %= 12; + + // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js + s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : ''; + + totalSign = total < 0 ? '-' : ''; + ymSign = sign(this._months) !== sign(total) ? '-' : ''; + daysSign = sign(this._days) !== sign(total) ? '-' : ''; + hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : ''; + + return ( + totalSign + + 'P' + + (years ? ymSign + years + 'Y' : '') + + (months ? ymSign + months + 'M' : '') + + (days ? daysSign + days + 'D' : '') + + (hours || minutes || seconds ? 'T' : '') + + (hours ? hmsSign + hours + 'H' : '') + + (minutes ? hmsSign + minutes + 'M' : '') + + (seconds ? hmsSign + s + 'S' : '') + ); + } + + var proto$2 = Duration.prototype; + + proto$2.isValid = isValid$1; + proto$2.abs = abs; + proto$2.add = add$1; + proto$2.subtract = subtract$1; + proto$2.as = as; + proto$2.asMilliseconds = asMilliseconds; + proto$2.asSeconds = asSeconds; + proto$2.asMinutes = asMinutes; + proto$2.asHours = asHours; + proto$2.asDays = asDays; + proto$2.asWeeks = asWeeks; + proto$2.asMonths = asMonths; + proto$2.asQuarters = asQuarters; + proto$2.asYears = asYears; + proto$2.valueOf = valueOf$1; + proto$2._bubble = bubble; + proto$2.clone = clone$1; + proto$2.get = get$2; + proto$2.milliseconds = milliseconds; + proto$2.seconds = seconds; + proto$2.minutes = minutes; + proto$2.hours = hours; + proto$2.days = days; + proto$2.weeks = weeks; + proto$2.months = months; + proto$2.years = years; + proto$2.humanize = humanize; + proto$2.toISOString = toISOString$1; + proto$2.toString = toISOString$1; + proto$2.toJSON = toISOString$1; + proto$2.locale = locale; + proto$2.localeData = localeData; + + proto$2.toIsoString = deprecate( + 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', + toISOString$1 + ); + proto$2.lang = lang; + + // FORMATTING + + addFormatToken('X', 0, 0, 'unix'); + addFormatToken('x', 0, 0, 'valueOf'); + + // PARSING + + addRegexToken('x', matchSigned); + addRegexToken('X', matchTimestamp); + addParseToken('X', function (input, array, config) { + config._d = new Date(parseFloat(input) * 1000); + }); + addParseToken('x', function (input, array, config) { + config._d = new Date(toInt(input)); + }); + + //! moment.js + + hooks.version = '2.27.0'; + + setHookCallback(createLocal); + + hooks.fn = proto; + hooks.min = min; + hooks.max = max; + hooks.now = now; + hooks.utc = createUTC; + hooks.unix = createUnix; + hooks.months = listMonths; + hooks.isDate = isDate; + hooks.locale = getSetGlobalLocale; + hooks.invalid = createInvalid; + hooks.duration = createDuration; + hooks.isMoment = isMoment; + hooks.weekdays = listWeekdays; + hooks.parseZone = createInZone; + hooks.localeData = getLocale; + hooks.isDuration = isDuration; + hooks.monthsShort = listMonthsShort; + hooks.weekdaysMin = listWeekdaysMin; + hooks.defineLocale = defineLocale; + hooks.updateLocale = updateLocale; + hooks.locales = listLocales; + hooks.weekdaysShort = listWeekdaysShort; + hooks.normalizeUnits = normalizeUnits; + hooks.relativeTimeRounding = getSetRelativeTimeRounding; + hooks.relativeTimeThreshold = getSetRelativeTimeThreshold; + hooks.calendarFormat = getCalendarFormat; + hooks.prototype = proto; + + // currently HTML5 input type only supports 24-hour formats + hooks.HTML5_FMT = { + DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // + DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // + DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // + DATE: 'YYYY-MM-DD', // + TIME: 'HH:mm', // + TIME_SECONDS: 'HH:mm:ss', // + TIME_MS: 'HH:mm:ss.SSS', // + WEEK: 'GGGG-[W]WW', // + MONTH: 'YYYY-MM', // + }; + + return hooks; + +}))); diff --git a/admin/js/vendors/moment/moment.min.js b/admin/js/vendors/moment/moment.min.js new file mode 100644 index 0000000..36f8628 --- /dev/null +++ b/admin/js/vendors/moment/moment.min.js @@ -0,0 +1,2 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";var e,i;function f(){return e.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function u(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function m(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;for(var t in e)if(m(e,t))return;return 1}function r(e){return void 0===e}function h(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function a(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){for(var n=[],s=0;s>>0,s=0;sFe(e)?(r=e+1,a-Fe(e)):(r=e,a);return{year:r,dayOfYear:o}}function Ae(e,t,n){var s,i,r=Ge(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?s=a+je(i=e.year()-1,t,n):a>je(e.year(),t,n)?(s=a-je(e.year(),t,n),i=e.year()+1):(i=e.year(),s=a),{week:s,year:i}}function je(e,t,n){var s=Ge(e,t,n),i=Ge(e+1,t,n);return(Fe(e)-s+i)/7}C("w",["ww",2],"wo","week"),C("W",["WW",2],"Wo","isoWeek"),L("week","w"),L("isoWeek","W"),A("week",5),A("isoWeek",5),ce("w",te),ce("ww",te,Q),ce("W",te),ce("WW",te,Q),ge(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=Z(e)});function Ie(e,t){return e.slice(t,7).concat(e.slice(0,t))}C("d",0,"do","day"),C("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),C("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),C("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),C("e",0,0,"weekday"),C("E",0,0,"isoWeekday"),L("day","d"),L("weekday","e"),L("isoWeekday","E"),A("day",11),A("weekday",11),A("isoWeekday",11),ce("d",te),ce("e",te),ce("E",te),ce("dd",function(e,t){return t.weekdaysMinRegex(e)}),ce("ddd",function(e,t){return t.weekdaysShortRegex(e)}),ce("dddd",function(e,t){return t.weekdaysRegex(e)}),ge(["dd","ddd","dddd"],function(e,t,n,s){var i=n._locale.weekdaysParse(e,s,n._strict);null!=i?t.d=i:y(n).invalidWeekday=e}),ge(["d","e","E"],function(e,t,n,s){t[s]=Z(e)});var Ze="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ze="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),$e="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),qe=de,Be=de,Je=de;function Qe(){function e(e,t){return t.length-e.length}for(var t,n,s,i,r=[],a=[],o=[],u=[],l=0;l<7;l++)t=_([2e3,1]).day(l),n=me(this.weekdaysMin(t,"")),s=me(this.weekdaysShort(t,"")),i=me(this.weekdays(t,"")),r.push(n),a.push(s),o.push(i),u.push(n),u.push(s),u.push(i);r.sort(e),a.sort(e),o.sort(e),u.sort(e),this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Xe(){return this.hours()%12||12}function Ke(e,t){C(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function et(e,t){return t._meridiemParse}C("H",["HH",2],0,"hour"),C("h",["hh",2],0,Xe),C("k",["kk",2],0,function(){return this.hours()||24}),C("hmm",0,0,function(){return""+Xe.apply(this)+T(this.minutes(),2)}),C("hmmss",0,0,function(){return""+Xe.apply(this)+T(this.minutes(),2)+T(this.seconds(),2)}),C("Hmm",0,0,function(){return""+this.hours()+T(this.minutes(),2)}),C("Hmmss",0,0,function(){return""+this.hours()+T(this.minutes(),2)+T(this.seconds(),2)}),Ke("a",!0),Ke("A",!1),L("hour","h"),A("hour",13),ce("a",et),ce("A",et),ce("H",te),ce("h",te),ce("k",te),ce("HH",te,Q),ce("hh",te,Q),ce("kk",te,Q),ce("hmm",ne),ce("hmmss",se),ce("Hmm",ne),ce("Hmmss",se),ye(["H","HH"],Me),ye(["k","kk"],function(e,t,n){var s=Z(e);t[Me]=24===s?0:s}),ye(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ye(["h","hh"],function(e,t,n){t[Me]=Z(e),y(n).bigHour=!0}),ye("hmm",function(e,t,n){var s=e.length-2;t[Me]=Z(e.substr(0,s)),t[De]=Z(e.substr(s)),y(n).bigHour=!0}),ye("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[Me]=Z(e.substr(0,s)),t[De]=Z(e.substr(s,2)),t[Se]=Z(e.substr(i)),y(n).bigHour=!0}),ye("Hmm",function(e,t,n){var s=e.length-2;t[Me]=Z(e.substr(0,s)),t[De]=Z(e.substr(s))}),ye("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[Me]=Z(e.substr(0,s)),t[De]=Z(e.substr(s,2)),t[Se]=Z(e.substr(i))});var tt=z("Hours",!0);var nt,st={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Te,monthsShort:Ne,week:{dow:0,doy:6},weekdays:Ze,weekdaysMin:$e,weekdaysShort:ze,meridiemParse:/[ap]\.?m?\.?/i},it={},rt={};function at(e){return e?e.toLowerCase().replace("_","-"):e}function ot(e){for(var t,n,s,i,r=0;r=t&&function(e,t){for(var n=Math.min(e.length,t.length),s=0;s=t-1)break;t--}r++}return nt}function ut(t){var e;if(void 0===it[t]&&"undefined"!=typeof module&&module&&module.exports)try{e=nt._abbr,require("./locale/"+t),lt(e)}catch(e){it[t]=null}return it[t]}function lt(e,t){var n;return e&&((n=r(t)?dt(e):ht(e,t))?nt=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),nt._abbr}function ht(e,t){if(null===t)return delete it[e],null;var n,s=st;if(t.abbr=e,null!=it[e])Y("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=it[e]._config;else if(null!=t.parentLocale)if(null!=it[t.parentLocale])s=it[t.parentLocale]._config;else{if(null==(n=ut(t.parentLocale)))return rt[t.parentLocale]||(rt[t.parentLocale]=[]),rt[t.parentLocale].push({name:e,config:t}),null;s=n._config}return it[e]=new x(b(s,t)),rt[e]&&rt[e].forEach(function(e){ht(e.name,e.config)}),lt(e),it[e]}function dt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return nt;if(!o(e)){if(t=ut(e))return t;e=[e]}return ot(e)}function ct(e){var t,n=e._a;return n&&-2===y(e).overflow&&(t=n[ve]<0||11xe(n[pe],n[ve])?ke:n[Me]<0||24je(n,r,a)?y(e)._overflowWeeks=!0:null!=u?y(e)._overflowWeekday=!0:(o=Ee(n,s,i,r,a),e._a[pe]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(r=St(e._a[pe],s[pe]),(e._dayOfYear>Fe(r)||0===e._dayOfYear)&&(y(e)._overflowDayOfYear=!0),n=Ve(r,0,e._dayOfYear),e._a[ve]=n.getUTCMonth(),e._a[ke]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=u[t]=s[t];for(;t<7;t++)e._a[t]=u[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Me]&&0===e._a[De]&&0===e._a[Se]&&0===e._a[Ye]&&(e._nextDay=!0,e._a[Me]=0),e._d=(e._useUTC?Ve:function(e,t,n,s,i,r,a){var o;return e<100&&0<=e?(o=new Date(e+400,t,n,s,i,r,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,s,i,r,a),o}).apply(null,u),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Me]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(y(e).weekdayMismatch=!0)}}function Ot(e){if(e._f!==f.ISO_8601)if(e._f!==f.RFC_2822){e._a=[],y(e).empty=!0;for(var t,n,s,i,r,a,o,u=""+e._i,l=u.length,h=0,d=H(e._f,e._locale).match(N)||[],c=0;cn.valueOf():n.valueOf()"}),pn.toJSON=function(){return this.isValid()?this.toISOString():null},pn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},pn.unix=function(){return Math.floor(this.valueOf()/1e3)},pn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},pn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},pn.eraName=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;nthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},pn.isLocal=function(){return!!this.isValid()&&!this._isUTC},pn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},pn.isUtc=At,pn.isUTC=At,pn.zoneAbbr=function(){return this._isUTC?"UTC":""},pn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},pn.dates=n("dates accessor is deprecated. Use date instead.",fn),pn.months=n("months accessor is deprecated. Use month instead",Ue),pn.years=n("years accessor is deprecated. Use year instead",Le),pn.zone=n("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),pn.isDSTShifted=n("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!r(this._isDSTShifted))return this._isDSTShifted;var e,t={};return v(t,this),(t=bt(t))._a?(e=(t._isUTC?_:Tt)(t._a),this._isDSTShifted=this.isValid()&&0cBottom&&(container.scrollTop+=eBottom-cBottom)}function putContent(el,currentPosition,isOpen){var height=el.offsetHeight,rect=el.getBoundingClientRect(),elemTop=isOpen?rect.top:rect.top-height,elemBottom=isOpen?rect.bottom:rect.bottom+height;return elemTop<=0?"below":elemBottom>=window.innerHeight?"above":isOpen?currentPosition:"below"}function debounce(func,wait,immediate){var timeout;return void 0===wait&&(wait=100),void 0===immediate&&(immediate=!1),function(){for(var args=[],_i=0;_i[^<>]*'+originalTextFoundByRegex+"")}function kebabCase(str){var result=str.replace(/[A-Z\u00C0-\u00D6\u00D8-\u00DE]/g,(function(match){return"-"+match.toLowerCase()}));return str[0]===str[0].toUpperCase()?result.substring(1):result}exports.__esModule=!0,exports.hasClassInTree=hasClassInTree,exports.ensureElementInView=ensureElementInView,exports.putContent=putContent,exports.debounce=debounce,exports.isValueInArrayOfObjects=isValueInArrayOfObjects,exports.highlight=highlight,exports.kebabCase=kebabCase,function(){var w=window;function CustomEvent(event,params){params=params||{bubbles:!1,cancelable:!1,detail:void 0};var evt=document.createEvent("CustomEvent");return evt.initCustomEvent(event,params.bubbles,params.cancelable,params.detail),evt}"function"!=typeof w.CustomEvent&&(CustomEvent.prototype=w.Event.prototype,w.CustomEvent=CustomEvent)}()},function(module,exports,__webpack_require__){"use strict";exports.__esModule=!0;var Data=function(){function Data(info){this.contentOpen=!1,this.contentPosition="below",this.isOnChangeEnabled=!0,this.main=info.main,this.searchValue="",this.data=[],this.filtered=null,this.parseSelectData(),this.setSelectedFromSelect()}return Data.prototype.newOption=function(info){return{id:info.id?info.id:String(Math.floor(1e8*Math.random())),value:info.value?info.value:"",text:info.text?info.text:"",innerHTML:info.innerHTML?info.innerHTML:"",selected:!!info.selected&&info.selected,display:void 0===info.display||info.display,disabled:!!info.disabled&&info.disabled,placeholder:!!info.placeholder&&info.placeholder,class:info.class?info.class:void 0,data:info.data?info.data:{},mandatory:!!info.mandatory&&info.mandatory}},Data.prototype.add=function(data){this.data.push({id:String(Math.floor(1e8*Math.random())),value:data.value,text:data.text,innerHTML:"",selected:!1,display:!0,disabled:!1,placeholder:!1,class:void 0,mandatory:data.mandatory,data:{}})},Data.prototype.parseSelectData=function(){this.data=[];for(var nodes,_i=0,nodes_1=this.main.select.element.childNodes;_i:not(.tabulator-print-fullscreen){display:none!important}.tabulator-print-table{border-collapse:collapse}.tabulator-print-table .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #aaa;border-bottom:2px solid #aaa}.tabulator-print-table .tabulator-print-table-group{box-sizing:border-box;border-bottom:1px solid #999;border-right:1px solid #aaa;border-top:1px solid #999;padding:5px;padding-left:10px;background:#ccc;font-weight:700;min-width:100%}.tabulator-print-table .tabulator-print-table-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator-print-table .tabulator-print-table-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;border-bottom:0}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-1 td{padding-left:30px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-2 td{padding-left:50px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-3 td{padding-left:70px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-4 td{padding-left:90px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-5 td{padding-left:110px!important}.tabulator-print-table .tabulator-print-table-group .tabulator-group-toggle{display:inline-block}.tabulator-print-table .tabulator-print-table-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #666;vertical-align:middle}.tabulator-print-table .tabulator-print-table-group span{margin-left:10px;color:#d00}.tabulator-print-table .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #333;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-print-table .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#333}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333} +/*# sourceMappingURL=tabulator.min.css.map */ diff --git a/admin/js/vendors/tabulator/css/tabulator.min.css.map b/admin/js/vendors/tabulator/css/tabulator.min.css.map new file mode 100644 index 0000000..47a4c5c --- /dev/null +++ b/admin/js/vendors/tabulator/css/tabulator.min.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["tabulator.scss"],"names":[],"mappings":"AA0CA,WACC,kBAAkB,AAElB,sBAxCgB,AA0ChB,sBA3CqB,AA6CrB,eA3Ca,AA4Cb,gBAAgB,AAChB,gBAAe,AAMf,uBAAwB,CAwfxB,AAvgBD,iFAoBI,cAAc,CACd,AArBJ,0CA0BE,oBAAqB,CACrB,AA3BF,kCA8BE,yBAAiB,AAAjB,qBAAiB,AAAjB,gBAAiB,CACjB,AA/BF,6BAmCE,kBAAiB,AACjB,sBAAsB,AAEtB,WAAU,AAEV,6BAtEwB,AAuExB,yBA1E4B,AA2E5B,WA1EmB,AA2EnB,gBAAgB,AAEhB,mBAAmB,AACnB,gBAAe,AAEf,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAmPpB,AAtSF,qDAsDG,YAAY,CACZ,AAvDH,4CA2DG,qBAAoB,AACpB,kBAAiB,AACjB,sBAAqB,AACrB,4BA7FoB,AA8FpB,mBAhG2B,AAiG3B,gBAAe,AACf,sBAAsB,AACtB,eAAgB,CAqLhB,AAvPH,6DAqEI,kBAAkB,AAClB,sBApGsB,AAqGtB,mBAA8C,AAC9C,mBAAoB,CACpB,AAzEJ,mEA6EI,sBAAqB,AACrB,kBAAkB,AAClB,WAAW,CAgDX,AA/HJ,iGAmFK,aAAc,CAMd,AAzFL,uGAsFM,eAAe,AACf,UAAW,CACX,AAxFN,wFA6FK,sBAAqB,AACrB,WAAW,AAEX,mBAAmB,AACnB,gBAAgB,AAChB,uBAAuB,AACvB,qBAAqB,CAarB,AAhHL,gHAuGM,sBAAsB,AACtB,WAAW,AAEX,sBAAqB,AAErB,YAAW,AAEX,eAAgB,CAChB,AA/GN,oFAoHK,qBAAqB,AACrB,kBAAkB,AAClB,QAAO,AACP,UAAS,AACT,QAAQ,AACR,SAAS,AACT,kCAAkC,AAClC,mCAAmC,AACnC,4BArJmB,CAsJnB,AA7HL,0FAsIK,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AAEb,0BAxKkB,AAyKlB,gBAAgB,AAEhB,iBAAiB,CACjB,AA7IL,0FAmJK,YAAa,CACb,AApJL,qEAyJI,kBAAkB,AAClB,sBAAsB,AACtB,eAAc,AACd,WAAU,AACV,iBAAkB,CAiBlB,AA9KJ,8EAiKK,qBAAsB,CACtB,AAlKL,yEAqKK,cAAe,CACf,AAtKL,sFA0KM,QAAS,AACT,QAAS,CACT,AA5KN,oFAmLK,kBAAkB,CAClB,AApLL,qEAuLK,eAAc,AACd,wBAAoD,CACpD,AAzLL,uHA6LM,gBAAgB,AAChB,4BAvNkB,CAwNlB,AA/LN,sHAoMM,gBAAgB,AAChB,4BA/NgB,CAgOhB,AAtMN,uHA2MM,0BArOgB,AAsOhB,kBAAmB,CACnB,AA7MN,+GAqNM,uBAAyB,AAAzB,yBAAyB,AACzB,uBAAuB,AAEvB,oBAAY,AAAZ,aAAY,AACZ,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,sBAAsB,CACtB,AA3NN,oHAgOM,wBAAyB,CACzB,AAjON,2GAsOM,gBAAe,AACf,gBAAgB,CAChB,AAxON,uIA4OO,gBAAe,AACf,mBAAmB,CACnB,AA9OP,uGAmPM,qBAAqB,CACrB,AApPN,+CA0PG,qBAAqB,AACrB,kBAAkB,AAIlB,UAAW,CASX,AAxQH,qEAkQI,2BAtRgB,CAuRhB,AAnQJ,sEAsQI,0BA1RgB,CA2RhB,AAvQJ,qDA4QG,sBAAqB,AACrB,eAAc,AAEd,6BAAyD,AAUzD,0BA7SiB,AA8SjB,6BAzToB,AA2TpB,eAAgB,CAChB,AA7RH,oEAkRI,4BAAyD,CAKzD,AAvRJ,iGAqRK,YAAa,CACb,AAtRL,2DAgSG,cAAc,CAKd,AArSH,iEAmSI,YAAa,CACb,AApSJ,kCA0SE,kBAAiB,AACjB,WAAU,AACV,mBAAmB,AACnB,cAAa,AACb,gCAAiC,CAyDjC,AAvWF,wCAiTG,YAAa,CACb,AAlTH,yDAsTG,sBAAqB,AACrB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAOlB,UAAU,CAYV,AA3UH,wFA2TI,gBAAe,AACf,cAAc,CACd,AA7TJ,8DAkUI,qBAAqB,AAErB,cAAa,AACb,aAAY,AAEZ,WAAU,AACV,gBAAiB,AACjB,cAAe,CACf,AA1UJ,mDA+UG,kBAAiB,AACjB,qBAAoB,AACpB,sBAvWqB,AAwWrB,mBAAmB,AACnB,iBAAgB,AAChB,UAvWe,CAyXf,AAtWH,kFAyVK,gBAAiB,AACjB,4BAAwD,CASxD,AAnWL,sGA6VM,4BAjXc,CAkXd,AA9VN,yGAiWM,yBArXc,CAsXd,AAlWN,6BA6WE,iBAAgB,AAChB,0BApXwB,AAqXxB,yBAxX4B,AAyX5B,iBAAiB,AACjB,WAzXmB,AA0XnB,gBAAgB,AAChB,mBAAkB,AAClB,qBAAgB,AAAhB,iBAAgB,AAEhB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAgFpB,AAzcF,qDA4XG,sBAAqB,AACrB,wBAAuB,AACvB,sBAA2B,AAE3B,gBAAgB,AAEhB,6BAAyD,AAUzD,6BAhaiB,AAiajB,0BAjaiB,AAmajB,eAAgB,CAMhB,AArZH,oEAqYI,4BAAyD,CAKzD,AA1YJ,iGAwYK,YAAa,CACb,AAzYL,gEAkZI,mBAAkB,AAClB,kBAAkB,CAClB,AApZJ,kDAwZG,WAhakB,AAialB,oBAAmB,AACnB,oBAAmB,AACnB,iBAAiB,CACjB,AA5ZH,kDAgaG,qBAAoB,AAEpB,aAAY,AACZ,gBAAe,AAEf,sBA5aoB,AA6apB,iBAAiB,CACjB,AAvaH,8CA0aG,YAAY,CACZ,AA3aH,6CA+aG,qBAAoB,AAEpB,aAAY,AACZ,gBAAe,AAEf,sBA3boB,AA4bpB,kBAAiB,AAEjB,6BAA+B,CAiB/B,AAxcH,oDA0bI,UA/bmB,CAgcnB,AA3bJ,sDA8bI,UAAU,CACV,AA/bJ,kEAmcK,eAAc,AACd,0BAAyB,AACzB,UAAU,CACV,AAtcL,wCA6cE,kBAAiB,AACjB,QAAO,AACP,MAAK,AACL,SAAQ,AACR,SAAS,CAUT,AA3dF,6CAodG,OAAM,AACN,UAAU,CACV,AAtdH,8CAydG,gBAAgB,CAChB,AA1dH,6BAgeE,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAElB,MAAK,AACL,OAAM,AACN,YAAW,AAEX,YAAW,AACX,WAAU,AACV,0BAAyB,AACzB,iBAAiB,CA2BjB,AAtgBF,mDA+eG,qBAAoB,AAEpB,cAAa,AACb,kBAAiB,AAEjB,mBAAkB,AAElB,gBAAe,AACf,gBAAgB,AAChB,cAAc,CAad,AArgBH,qEA4fI,sBAAqB,AACrB,UAAU,CACV,AA9fJ,mEAkgBI,sBAAqB,AACrB,aAAa,CACb,AAMJ,eACC,kBAAkB,AAClB,sBAAsB,AACtB,gBAA0C,AAC1C,qBApiBuB,CAo5BvB,AApXD,kCAQE,wBAviB4B,CAwiB5B,AATF,0CAYE,sBAxiBsB,AAyiBtB,cAAe,CACf,AAdF,kCAiBE,wBA3iB6B,CA4iB7B,AAlBF,wCAqBE,yBA9iBkC,AA+iBlC,cAAe,CACf,AAvBF,oCA0BE,sBAAqB,AACrB,eAAe,CACf,AA5BF,gCA+BE,kBAAkB,AAElB,0BA/jBkB,AAgkBlB,6BAhkBkB,AAkkBlB,oBAAoB,AACpB,UAAU,CACV,AAtCF,4CA0CE,kBAAiB,AACjB,QAAO,AACP,SAAQ,AACR,OAAM,AACN,UAAU,CAUV,AAxDF,iDAiDG,MAAK,AACL,WAAW,CACX,AAnDH,kDAsDG,gBAAgB,CAChB,AAvDH,iCA2DE,qBAAqB,AACrB,kBAAkB,AAElB,yBAAyB,AAEzB,UAAW,CASX,AAzEF,uDAmEG,2BAjmBiB,CAkmBjB,AApEH,wDAuEG,0BArmBiB,CAsmBjB,AAxEH,8CA4EE,sBAAqB,AAErB,YAAW,AAEX,0BA9mBkB,AA+mBlB,4BA/mBkB,CAkoBlB,AApGF,oDAoFG,YAAY,CACZ,AArFH,oDAwFG,cAtoBW,CAipBX,AAnGH,0DA4FK,iBAAkB,CAKlB,AAjGL,wEA+FM,kBAAkB,CAClB,AAhGN,+BAwGE,qBAAoB,AACpB,kBAAkB,AAClB,sBAAqB,AACrB,YAAW,AACX,4BA1oBkB,AA2oBlB,sBAAqB,AACrB,mBAAkB,AAClB,gBAAe,AACf,sBAAsB,CAyLtB,AAzSF,iDAmHG,yBA1oBkB,AA2oBlB,SAAU,CAMV,AA1HH,+GAuHI,WAAU,AACV,sBAAsB,CACtB,AAzHJ,yDA6HG,qBAnpBgB,CA0pBhB,AApIH,+HA+HI,WAAU,AACV,uBAAsB,AAEtB,UAxpBe,CAypBf,AAnIJ,6EAyII,YAAa,CACb,AA1IJ,oDA+IG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,uBAAsB,AAEtB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAcpB,AApKH,8EA0JI,SAAS,CAST,AAnKJ,wGA8JK,WAAU,AACV,WAAU,AACV,eAAc,AACd,eAAe,CACf,AAlKL,2DAuKG,qBAAoB,AACpB,sBAAqB,AAErB,WAAU,AACV,UAAS,AAET,gBAAe,AACf,iBAAgB,AAEhB,8BAA6B,AAE7B,2BAhtBiB,AAitBjB,4BAjtBiB,CAktBjB,AApLH,4DAwLG,2BAAmB,AAAnB,oBAAmB,AACnB,qBAAsB,AAAtB,uBAAsB,AACtB,sBAAkB,AAAlB,mBAAkB,AAClB,sBAAqB,AAErB,YAAW,AACX,WAAU,AAEV,iBAAgB,AAEhB,sBA/tBe,AAguBf,kBAAiB,AACjB,0BAA4B,AAE5B,eAAe,CAmDf,AAzPH,kEAyMI,eAAc,AACd,yBAA4B,CAC5B,AA3MJ,kGA8MI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,sBAAuB,CAavB,AAjOJ,wGAuNK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eA5vBa,CA6vBb,AAhOL,gGAoOI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,eAvwBc,CAoxBd,AAvPJ,sGA6OK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eAlxBa,CAmxBb,AAtPL,qEA4PG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,uBAAsB,AAEtB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,oBAAoB,AAEpB,YAAW,AACX,WAAU,AAEV,mBAAkB,AAClB,gBAAe,AAEf,WA3yBqB,AA4yBrB,gBAAgB,AAChB,eAAe,CAmBf,AAhSH,2EAgRI,UAAU,CACV,AAjRJ,sHAqRK,eAAe,CACf,AAtRL,sOA8RI,YAAY,CACZ,AA/RJ,wDAmSG,qBAAqB,AACrB,YAAW,AACX,WAAU,AAEV,kBAAkB,CAClB,AAxSH,+BA6SE,sBAAqB,AACrB,6BAA4B,AAC5B,4BA70BkB,AA80BlB,0BAAyB,AACzB,YAAW,AACX,kBAAiB,AACjB,gBAAe,AACf,gBAAgB,AAEhB,cAAe,CA4Df,AAlXF,qCAyTG,eAAc,AACd,+BAA+B,CAC/B,AA3TH,wEAgUI,kBAAiB,AACjB,kCAAkC,AAClC,mCAAmC,AACnC,0BAv2BkB,AAw2BlB,eAAgB,CAChB,AArUJ,uDA0UG,iBAAiB,CACjB,AA3UH,uDA8UG,iBAAiB,CACjB,AA/UH,uDAkVG,iBAAiB,CACjB,AAnVH,uDAsVG,iBAAiB,CACjB,AAvVH,uDA0VG,kBAAkB,CAClB,AA3VH,uDA8VG,oBAAqB,CACrB,AA/VH,gDAmWG,qBAAqB,AACrB,QAAQ,AACR,SAAS,AACT,kBAAiB,AACjB,iCAAiC,AACjC,oCAAoC,AACpC,eAAe,AACf,2BA94BmB,AA+4BnB,qBAAqB,CACrB,AA5WH,oCA+WG,iBAAgB,AAChB,UAAU,CACV,AAKH,gBACC,kBAAkB,AAClB,qBAAoB,AACpB,sBAAqB,AAErB,gBA35BuB,AA45BvB,sBA15BmB,AA25BnB,oCAAuC,AAEvC,eA76Ba,AA+6Bb,gBAAe,AACf,iCAAiC,AAEjC,aAAc,CAqBd,AAnCD,qCAkBE,iBAAgB,AAEhB,yBAAiB,AAAjB,qBAAiB,AAAjB,gBAAiB,CAUjB,AA9BF,kEAuBG,UAAW,CACX,AAxBH,8EA2BG,eAAe,AACf,kBAj7B2B,CAk7B3B,AA7BH,0CAiCE,yBAr7BkB,CAs7BlB,AAGF,4BACC,kBAAkB,AAClB,qBAAoB,AACpB,sBAAqB,AAErB,iBAAgB,AAEhB,gBAl8BuB,AAm8BvB,sBAj8BmB,AAm8BnB,eAn9Ba,AAq9Bb,gBAAe,AACf,iCAAiC,AAEjC,aAAc,CA4Cd,AA3DD,6DAkBE,YAAW,AAEX,UA58BgB,CAi+BhB,AAzCF,oEAuBG,WAl9BqB,AAm9BrB,kBA18BkB,CA+8BlB,AA7BH,4EA2BI,oCAt9BoB,CAu9BpB,AA5BJ,qEAgCG,yBAl9BkB,CAm9BlB,AAjCH,mEAoCG,eAAc,AAEd,WAj+BqB,AAk+BrB,kBAz9BkB,CA09BlB,AAxCH,+DA4CE,YAAW,AAEX,WAt+BgB,AAu+BhB,iBAAkB,CAClB,AAhDF,8DAmDE,6BA5+BkB,AA8+BlB,YAAW,AACX,gBAAe,AAEf,WAh/BgB,AAi/BhB,eAAgB,CAChB,AAKF,4BACC,kBAAkB,AAClB,MAAK,AACL,SAAQ,AACR,OAAM,AACN,QAAO,AAEP,aAAc,CACd,AAED,uEACC,sBAAuB,CACvB,AAED,uBACC,wBAAyB,CAwKzB,AAzKD,mDAIE,qBAAoB,AACpB,sBAAqB,AAErB,WAAU,AACV,UAAS,AAET,gBAAe,AACf,iBAAgB,AAEhB,8BAA6B,AAE7B,2BArhCkB,AAshClB,4BAthCkB,CAuhClB,AAjBF,oDAqBE,sBAAqB,AACrB,6BAA4B,AAC5B,4BA7hCkB,AA8hClB,0BAAyB,AACzB,YAAW,AACX,kBAAiB,AACjB,gBAAe,AACf,gBAAgB,AAEhB,cAAe,CAsEf,AApGF,0DAiCG,eAAc,AACd,+BAA+B,CAC/B,AAnCH,6FAwCI,kBAAiB,AACjB,kCAAkC,AAClC,mCAAmC,AACnC,0BAvjCkB,AAwjClB,eAAgB,CAChB,AA7CJ,+EAmDI,2BAA4B,CAC5B,AApDJ,+EAyDI,2BAA4B,CAC5B,AA1DJ,+EA+DI,2BAA4B,CAC5B,AAhEJ,+EAqEI,2BAA4B,CAC5B,AAtEJ,+EA2EI,4BAA6B,CAC7B,AA5EJ,4EAgFG,oBAAqB,CACrB,AAjFH,qEAqFG,qBAAqB,AACrB,QAAQ,AACR,SAAS,AACT,kBAAiB,AACjB,iCAAiC,AACjC,oCAAoC,AACpC,eAAe,AACf,2BAxmCmB,AAymCnB,qBAAqB,CACrB,AA9FH,yDAiGG,iBAAgB,AAChB,UAAU,CACV,AAnGH,oDAwGE,2BAAmB,AAAnB,oBAAmB,AACnB,qBAAsB,AAAtB,uBAAsB,AACtB,sBAAkB,AAAlB,mBAAkB,AAClB,sBAAqB,AAErB,YAAW,AACX,WAAU,AAEV,iBAAgB,AAEhB,sBAvnCgB,AAwnChB,kBAAiB,AACjB,0BAA4B,AAE5B,eAAe,CAkDf,AAxKF,0DAyHG,eAAc,AACd,yBAA4B,CAC5B,AA3HH,0FA8HG,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,sBAAuB,CAavB,AAjJH,gGAuII,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eAppCc,CAqpCd,AAhJJ,wFAoJG,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,eA/pCe,CA4qCf,AAvKH,8FA6JI,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eA1qCc,CA2qCd","file":"tabulator.min.css","sourcesContent":["/* Tabulator v4.7.0 (c) Oliver Folkerd */\n\n\r\n//Main Theme Variables\r\n$backgroundColor: #888 !default; //background color of tabulator\r\n$borderColor:#999 !default; //border to tabulator\r\n$textSize:14px !default; //table text size\r\n\r\n//header themeing\r\n$headerBackgroundColor:#e6e6e6 !default; //border to tabulator\r\n$headerTextColor:#555 !default; //header text colour\r\n$headerBorderColor:#aaa !default; //header border color\r\n$headerSeperatorColor:#999 !default; //header bottom seperator color\r\n$headerMargin:4px !default; //padding round header\r\n\r\n//column header arrows\r\n$sortArrowActive: #666 !default;\r\n$sortArrowInactive: #bbb !default;\r\n\r\n//row themeing\r\n$rowBackgroundColor:#fff !default; //table row background color\r\n$rowAltBackgroundColor:#EFEFEF !default; //table row background color\r\n$rowBorderColor:#aaa !default; //table border color\r\n$rowTextColor:#333 !default; //table text color\r\n$rowHoverBackground:#bbb !default; //row background color on hover\r\n\r\n$rowSelectedBackground: #9ABCEA !default; //row background color when selected\r\n$rowSelectedBackgroundHover: #769BCC !default;//row background color when selected and hovered\r\n\r\n$editBoxColor:#1D68CD !default; //border color for edit boxes\r\n$errorColor:#dd0000 !default; //error indication\r\n\r\n//footer themeing\r\n$footerBackgroundColor:#e6e6e6 !default; //border to tabulator\r\n$footerTextColor:#555 !default; //footer text colour\r\n$footerBorderColor:#aaa !default; //footer border color\r\n$footerSeperatorColor:#999 !default; //footer bottom seperator color\r\n$footerActiveColor:#d00 !default; //footer bottom active text color\r\n\r\n\r\n\r\n//Tabulator Containing Element\r\n.tabulator{\r\n\tposition: relative;\r\n\r\n\tborder: 1px solid $borderColor;\r\n\r\n\tbackground-color: $backgroundColor;\r\n\r\n\tfont-size:$textSize;\r\n\ttext-align: left;\r\n\toverflow:hidden;\r\n\r\n\t-webkit-transform: translatez(0);\r\n\t-moz-transform: translatez(0);\r\n\t-ms-transform: translatez(0);\r\n\t-o-transform: translatez(0);\r\n\ttransform: translatez(0);\r\n\r\n\t&[tabulator-layout=\"fitDataFill\"]{\r\n\t\t.tabulator-tableHolder{\r\n\t\t\t.tabulator-table{\r\n\t\t\t\tmin-width:100%;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t&[tabulator-layout=\"fitDataTable\"]{\r\n\t\tdisplay: inline-block;\r\n\t}\r\n\r\n\t&.tabulator-block-select{\r\n\t\tuser-select: none;\r\n\t}\r\n\r\n\t//column header containing element\r\n\t.tabulator-header{\r\n\t\tposition:relative;\r\n\t\tbox-sizing: border-box;\r\n\r\n\t\twidth:100%;\r\n\r\n\t\tborder-bottom:1px solid $headerSeperatorColor;\r\n\t\tbackground-color: $headerBackgroundColor;\r\n\t\tcolor: $headerTextColor;\r\n\t\tfont-weight:bold;\r\n\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:hidden;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t&.tabulator-header-hidden{\r\n\t\t\tdisplay:none;\r\n\t\t}\r\n\r\n\t\t//individual column header element\r\n\t\t.tabulator-col{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition:relative;\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tborder-right:1px solid $headerBorderColor;\r\n\t\t\tbackground:$headerBackgroundColor;\r\n\t\t\ttext-align:left;\r\n\t\t\tvertical-align: bottom;\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&.tabulator-moving{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tborder:1px solid $headerSeperatorColor;\r\n\t\t\t\tbackground:darken($headerBackgroundColor, 10%);\r\n\t\t\t\tpointer-events: none;\r\n\t\t\t}\r\n\r\n\t\t\t//hold content of column header\r\n\t\t\t.tabulator-col-content{\r\n\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tpadding:4px;\r\n\r\n\t\t\t\t//header menu button\r\n\t\t\t\t.tabulator-header-menu-button{\r\n\t\t\t\t\tpadding: 0 8px;\r\n\r\n\t\t\t\t\t&:hover{\r\n\t\t\t\t\t\tcursor: pointer;\r\n\t\t\t\t\t\topacity: .6;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//hold title of column header\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\twhite-space: nowrap;\r\n\t\t\t\t\toverflow: hidden;\r\n\t\t\t\t\ttext-overflow: ellipsis;\r\n\t\t\t\t\tvertical-align:bottom;\r\n\r\n\t\t\t\t\t//element to hold title editor\r\n\t\t\t\t\t.tabulator-title-editor{\r\n\t\t\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\t\tborder:1px solid #999;\r\n\r\n\t\t\t\t\t\tpadding:1px;\r\n\r\n\t\t\t\t\t\tbackground: #fff;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//column sorter arrow\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tdisplay: inline-block;\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\ttop:9px;\r\n\t\t\t\t\tright:8px;\r\n\t\t\t\t\twidth: 0;\r\n\t\t\t\t\theight: 0;\r\n\t\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\t//complex header column group\r\n\t\t\t&.tabulator-col-group{\r\n\r\n\t\t\t\t//gelement to hold sub columns in column group\r\n\t\t\t\t.tabulator-col-group-cols{\r\n\t\t\t\t\tposition:relative;\r\n\t\t\t\t\tdisplay: flex;\r\n\r\n\t\t\t\t\tborder-top:1px solid $headerBorderColor;\r\n\t\t\t\t\toverflow: hidden;\r\n\r\n\t\t\t\t\tmargin-right:-1px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//hide left resize handle on first column\r\n\t\t\t&:first-child{\r\n\t\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//header filter containing element\r\n\t\t\t.tabulator-header-filter{\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\tmargin-top:2px;\r\n\t\t\t\twidth:100%;\r\n\t\t\t\ttext-align: center;\r\n\r\n\t\t\t\t//styling adjustment for inbuilt editors\r\n\t\t\t\ttextarea{\r\n\t\t\t\t\theight:auto !important;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tsvg{\r\n\t\t\t\t\tmargin-top: 3px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tinput{\r\n\t\t\t\t\t&::-ms-clear {\r\n\t\t\t\t\t\twidth : 0;\r\n\t\t\t\t\t\theight: 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//styling child elements for sortable columns\r\n\t\t\t&.tabulator-sortable{\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tpadding-right:25px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground-color:darken($headerBackgroundColor, 10%);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"none\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"asc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowActive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"desc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\t\t\tborder-bottom: none;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\t\t\t&.tabulator-col-vertical{\r\n\t\t\t\t.tabulator-col-content{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\twriting-mode: vertical-rl;\r\n\t\t\t\t\t\ttext-orientation: mixed;\r\n\r\n\t\t\t\t\t\tdisplay:flex;\r\n\t\t\t\t\t\talign-items:center;\r\n\t\t\t\t\t\tjustify-content:center;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.tabulator-col-vertical-flip{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\ttransform: rotate(180deg);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.tabulator-sortable{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\t\tpadding-top:20px;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.tabulator-col-vertical-flip{\r\n\t\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\t\t\tpadding-bottom:20px;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\t\tright:calc(50% - 6px);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\tposition: absolute;\r\n\r\n\t\t\t// background-color: inherit;\r\n\r\n\t\t\tz-index: 10;\r\n\r\n\t\t\t&.tabulator-frozen-left{\r\n\t\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-frozen-right{\r\n\t\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tmin-width:600%;\r\n\r\n\t\t\tbackground:lighten($headerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:lighten($headerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\t\t\tborder-bottom:1px solid $headerBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen-rows-holder{\r\n\t\t\tmin-width:600%;\r\n\r\n\t\t\t&:empty{\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//scrolling element to hold table\r\n\t.tabulator-tableHolder{\r\n\t\tposition:relative;\r\n\t\twidth:100%;\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:auto;\r\n\t\t-webkit-overflow-scrolling: touch;\r\n\r\n\t\t&:focus{\r\n\t\t\toutline: none;\r\n\t\t}\r\n\r\n\t\t//default placeholder element\r\n\t\t.tabulator-placeholder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tdisplay: flex;\r\n\t\t\talign-items:center;\r\n\r\n\t\t\t&[tabulator-render-mode=\"virtual\"]{\r\n\t\t\t\tmin-height:100%;\r\n\t\t\t\tmin-width:100%;\r\n\t\t\t}\r\n\r\n\t\t\twidth:100%;\r\n\r\n\t\t\tspan{\r\n\t\t\t\tdisplay: inline-block;\r\n\r\n\t\t\t\tmargin:0 auto;\r\n\t\t\t\tpadding:10px;\r\n\r\n\t\t\t\tcolor:#ccc;\r\n\t\t\t\tfont-weight: bold;\r\n\t\t\t\tfont-size: 20px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//element to hold table rows\r\n\t\t.tabulator-table{\r\n\t\t\tposition:relative;\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tbackground-color:$rowBackgroundColor;\r\n\t\t\twhite-space: nowrap;\r\n\t\t\toverflow:visible;\r\n\t\t\tcolor:$rowTextColor;\r\n\r\n\t\t\t//row element\r\n\t\t\t.tabulator-row{\r\n\t\t\t\t&.tabulator-calcs{\r\n\t\t\t\t\tfont-weight: bold;\r\n\t\t\t\t\tbackground:darken($rowAltBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t\t&.tabulator-calcs-top{\r\n\t\t\t\t\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.tabulator-calcs-bottom{\r\n\t\t\t\t\t\tborder-top:2px solid $rowBorderColor;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n\r\n\r\n\r\n\t//footer element\r\n\t.tabulator-footer{\r\n\t\tpadding:5px 10px;\r\n\t\tborder-top:1px solid $footerSeperatorColor;\r\n\t\tbackground-color: $footerBackgroundColor;\r\n\t\ttext-align: right;\r\n\t\tcolor: $footerTextColor;\r\n\t\tfont-weight:bold;\r\n\t\twhite-space:nowrap;\r\n\t\tuser-select:none;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\twidth:calc(100% + 20px);\r\n\t\t\tmargin:-5px -10px 5px -10px;\r\n\r\n\t\t\ttext-align: left;\r\n\r\n\t\t\tbackground:lighten($footerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:lighten($footerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-bottom:1px solid $rowBorderColor;\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&:only-child{\r\n\t\t\t\tmargin-bottom:-5px;\r\n\t\t\t\tborder-bottom:none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-paginator{\r\n\t\t\tcolor: $footerTextColor;\r\n\t\t\tfont-family:inherit;\r\n\t\t\tfont-weight:inherit;\r\n\t\t\tfont-size:inherit;\r\n\t\t}\r\n\r\n\t\t//pagination container element\r\n\t\t.tabulator-page-size{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 5px;\r\n\t\t\tpadding:2px 5px;\r\n\r\n\t\t\tborder:1px solid $footerBorderColor;\r\n\t\t\tborder-radius:3px;\r\n\t\t}\r\n\r\n\t\t.tabulator-pages{\r\n\t\t\tmargin:0 7px;\r\n\t\t}\r\n\r\n\t\t//pagination button\r\n\t\t.tabulator-page{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 2px;\r\n\t\t\tpadding:2px 5px;\r\n\r\n\t\t\tborder:1px solid $footerBorderColor;\r\n\t\t\tborder-radius:3px;\r\n\r\n\t\t\tbackground:rgba(255,255,255,.2);\r\n\r\n\t\t\t&.active{\r\n\t\t\t\tcolor:$footerActiveColor;\r\n\t\t\t}\r\n\r\n\t\t\t&:disabled{\r\n\t\t\t\topacity:.5;\r\n\t\t\t}\r\n\r\n\t\t\t&:not(.disabled){\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground:rgba(0,0,0,.2);\r\n\t\t\t\t\tcolor:#fff;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//column resize handles\r\n\t.tabulator-col-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\ttop:0;\r\n\t\tbottom:0;\r\n\t\twidth:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\tleft:0;\r\n\t\t\tright:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ew-resize;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//holding div that contains loader and covers tabulator element to prevent interaction\r\n\t.tabulator-loader{\r\n\t\tposition:absolute;\r\n\t\tdisplay: flex;\r\n\t\talign-items:center;\r\n\r\n\t\ttop:0;\r\n\t\tleft:0;\r\n\t\tz-index:100;\r\n\r\n\t\theight:100%;\r\n\t\twidth:100%;\r\n\t\tbackground:rgba(0,0,0,.4);\r\n\t\ttext-align:center;\r\n\r\n\t\t//loading message element\r\n\t\t.tabulator-loader-msg{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 auto;\r\n\t\t\tpadding:10px 20px;\r\n\r\n\t\t\tborder-radius:10px;\r\n\r\n\t\t\tbackground:#fff;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:16px;\r\n\r\n\t\t\t//loading message\r\n\t\t\t&.tabulator-loading{\r\n\t\t\t\tborder:4px solid #333;\r\n\t\t\t\tcolor:#000;\r\n\t\t\t}\r\n\r\n\t\t\t//error message\r\n\t\t\t&.tabulator-error{\r\n\t\t\t\tborder:4px solid #D00;\r\n\t\t\t\tcolor:#590000;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n//row element\r\n.tabulator-row{\r\n\tposition: relative;\r\n\tbox-sizing: border-box;\r\n\tmin-height:$textSize + ($headerMargin * 2);\r\n\tbackground-color: $rowBackgroundColor;\r\n\r\n\r\n\t&.tabulator-row-even{\r\n\t\tbackground-color: $rowAltBackgroundColor;\r\n\t}\r\n\r\n\t&.tabulator-selectable:hover{\r\n\t\tbackground-color:$rowHoverBackground;\r\n\t\tcursor: pointer;\r\n\t}\r\n\r\n\t&.tabulator-selected{\r\n\t\tbackground-color:$rowSelectedBackground;\r\n\t}\r\n\r\n\t&.tabulator-selected:hover{\r\n\t\tbackground-color:$rowSelectedBackgroundHover;\r\n\t\tcursor: pointer;\r\n\t}\r\n\r\n\t&.tabulator-row-moving{\r\n\t\tborder:1px solid #000;\r\n\t\tbackground:#fff;\r\n\t}\r\n\r\n\t&.tabulator-moving{\r\n\t\tposition: absolute;\r\n\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\tpointer-events: none;\r\n\t\tz-index:15;\r\n\t}\r\n\r\n\t//row resize handles\r\n\t.tabulator-row-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\tbottom:0;\r\n\t\tleft:0;\r\n\t\theight:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\ttop:0;\r\n\t\t\tbottom:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ns-resize;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-frozen{\r\n\t\tdisplay: inline-block;\r\n\t\tposition: absolute;\r\n\r\n\t\tbackground-color: inherit;\r\n\r\n\t\tz-index: 10;\r\n\r\n\t\t&.tabulator-frozen-left{\r\n\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t}\r\n\r\n\t\t&.tabulator-frozen-right{\r\n\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-responsive-collapse{\r\n\t\tbox-sizing:border-box;\r\n\r\n\t\tpadding:5px;\r\n\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\t&:empty{\r\n\t\t\tdisplay:none;\r\n\t\t}\r\n\r\n\t\ttable{\r\n\t\t\tfont-size:$textSize;\r\n\r\n\t\t\ttr{\r\n\t\t\t\ttd{\r\n\t\t\t\t\tposition: relative;\r\n\r\n\t\t\t\t\t&:first-of-type{\r\n\t\t\t\t\t\tpadding-right:10px;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//cell element\r\n\t.tabulator-cell{\r\n\t\tdisplay:inline-block;\r\n\t\tposition: relative;\r\n\t\tbox-sizing:border-box;\r\n\t\tpadding:4px;\r\n\t\tborder-right:1px solid $rowBorderColor;\r\n\t\tvertical-align:middle;\r\n\t\twhite-space:nowrap;\r\n\t\toverflow:hidden;\r\n\t\ttext-overflow:ellipsis;\r\n\r\n\t\t&.tabulator-editing{\r\n\t\t\tborder:1px solid $editBoxColor;\r\n\t\t\tpadding: 0;\r\n\r\n\t\t\tinput, select{\r\n\t\t\t\tborder:1px;\r\n\t\t\t\tbackground:transparent;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-validation-fail{\r\n\t\t\tborder:1px solid $errorColor;\r\n\t\t\tinput, select{\r\n\t\t\t\tborder:1px;\r\n\t\t\t\tbackground:transparent;\r\n\r\n\t\t\t\tcolor: $errorColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//hide left resize handle on first column\r\n\t\t&:first-child{\r\n\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//movable row handle\r\n\t\t&.tabulator-row-handle{\r\n\t\t\tdisplay: inline-flex;\r\n\t\t\talign-items:center;\r\n\t\t\tjustify-content:center;\r\n\r\n\t\t\t-moz-user-select: none;\r\n\t\t\t-khtml-user-select: none;\r\n\t\t\t-webkit-user-select: none;\r\n\t\t\t-o-user-select: none;\r\n\r\n\t\t\t//handle holder\r\n\t\t\t.tabulator-row-handle-box{\r\n\t\t\t\twidth:80%;\r\n\r\n\t\t\t\t//Hamburger element\r\n\t\t\t\t.tabulator-row-handle-bar{\r\n\t\t\t\t\twidth:100%;\r\n\t\t\t\t\theight:3px;\r\n\t\t\t\t\tmargin-top:2px;\r\n\t\t\t\t\tbackground:#666;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-branch{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tvertical-align:middle;\r\n\r\n\t\t\theight:9px;\r\n\t\t\twidth:7px;\r\n\r\n\t\t\tmargin-top:-9px;\r\n\t\t\tmargin-right:5px;\r\n\r\n\t\t\tborder-bottom-left-radius:1px;\r\n\r\n\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-control{\r\n\r\n\t\t\tdisplay:inline-flex;\r\n\t\t\tjustify-content:center;\r\n\t\t\talign-items:center;\r\n\t\t\tvertical-align:middle;\r\n\r\n\t\t\theight:11px;\r\n\t\t\twidth:11px;\r\n\r\n\t\t\tmargin-right:5px;\r\n\r\n\t\t\tborder:1px solid $rowTextColor;\r\n\t\t\tborder-radius:2px;\r\n\t\t\tbackground:rgba(0, 0, 0, .1);\r\n\r\n\t\t\toverflow:hidden;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\tcursor:pointer;\r\n\t\t\t\tbackground:rgba(0, 0, 0, .2);\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control-collapse{\r\n\t\t\t\tdisplay:inline-block;\r\n\t\t\t\tposition: relative;\r\n\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 1px;\r\n\r\n\t\t\t\tbackground: transparent;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tcontent: \"\";\r\n\t\t\t\t\tleft: -3px;\r\n\t\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\t\theight: 1px;\r\n\t\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control-expand{\r\n\t\t\t\tdisplay:inline-block;\r\n\t\t\t\tposition: relative;\r\n\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 1px;\r\n\r\n\t\t\t\tbackground: $rowTextColor;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tcontent: \"\";\r\n\t\t\t\t\tleft: -3px;\r\n\t\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\t\theight: 1px;\r\n\t\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t.tabulator-responsive-collapse-toggle{\r\n\t\t\tdisplay: inline-flex;\r\n\t\t\talign-items:center;\r\n\t\t\tjustify-content:center;\r\n\r\n\t\t\t-moz-user-select: none;\r\n\t\t\t-khtml-user-select: none;\r\n\t\t\t-webkit-user-select: none;\r\n\t\t\t-o-user-select: none;\r\n\r\n\t\t\theight:15px;\r\n\t\t\twidth:15px;\r\n\r\n\t\t\tborder-radius:20px;\r\n\t\t\tbackground:#666;\r\n\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:1.1em;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\topacity:.7;\r\n\t\t\t}\r\n\r\n\t\t\t&.open{\r\n\t\t\t\t.tabulator-responsive-collapse-toggle-close{\r\n\t\t\t\t\tdisplay:initial;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.tabulator-responsive-collapse-toggle-open{\r\n\t\t\t\t\tdisplay:none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-responsive-collapse-toggle-close{\r\n\t\t\t\tdisplay:none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-traffic-light{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\theight:14px;\r\n\t\t\twidth:14px;\r\n\r\n\t\t\tborder-radius:14px;\r\n\t\t}\r\n\t}\r\n\r\n\t//row grouping element\r\n\t&.tabulator-group{\r\n\t\tbox-sizing:border-box;\r\n\t\tborder-bottom:1px solid #999;\r\n\t\tborder-right:1px solid $rowBorderColor;\r\n\t\tborder-top:1px solid #999;\r\n\t\tpadding:5px;\r\n\t\tpadding-left:10px;\r\n\t\tbackground:#ccc;\r\n\t\tfont-weight:bold;\r\n\r\n\t\tmin-width: 100%;\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\t\t\tbackground-color:rgba(0,0,0,.1);\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-visible{\r\n\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-right:10px;\r\n\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\tborder-bottom: 0;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-1{\r\n\t\t\tpadding-left:30px;\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-2{\r\n\t\t\tpadding-left:50px;\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-3{\r\n\t\t\tpadding-left:70px;\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-4{\r\n\t\t\tpadding-left:90px;\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-5{\r\n\t\t\tpadding-left:110px;\r\n\t\t}\r\n\r\n\t\t.tabulator-group-toggle{\r\n\t\t\tdisplay: inline-block;\r\n\t\t}\r\n\r\n\t\t//sorting arrow\r\n\t\t.tabulator-arrow{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\twidth: 0;\r\n\t\t\theight: 0;\r\n\t\t\tmargin-right:16px;\r\n\t\t\tborder-top: 6px solid transparent;\r\n\t\t\tborder-bottom: 6px solid transparent;\r\n\t\t\tborder-right: 0;\r\n\t\t\tborder-left: 6px solid $sortArrowActive;\r\n\t\t\tvertical-align:middle;\r\n\t\t}\r\n\r\n\t\tspan{\r\n\t\t\tmargin-left:10px;\r\n\t\t\tcolor:#d00;\r\n\t\t}\r\n\t}\r\n\r\n}\r\n\r\n.tabulator-menu{\r\n\tposition: absolute;\r\n\tdisplay:inline-block;\r\n\tbox-sizing:border-box;\r\n\r\n\tbackground:$rowBackgroundColor;\r\n\tborder:1px solid $rowBorderColor;\r\n\tbox-shadow: 0 0 5px 0 rgba(0, 0, 0, .2);\r\n\r\n\tfont-size:$textSize;\r\n\r\n\toverflow-y:auto;\r\n\t-webkit-overflow-scrolling: touch;\r\n\r\n\tz-index: 10000;\r\n\r\n\t.tabulator-menu-item{\r\n\r\n\t\tpadding:5px 10px;\r\n\r\n\t\tuser-select: none;\r\n\r\n\t\t&.tabulator-menu-item-disabled{\r\n\t\t\topacity: .5;\r\n\t\t}\r\n\r\n\t\t&:not(.tabulator-menu-item-disabled):hover{\r\n\t\t\tcursor: pointer;\r\n\t\t\tbackground: $rowAltBackgroundColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-menu-separator{\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t}\r\n}\r\n\r\n.tabulator-edit-select-list{\r\n\tposition: absolute;\r\n\tdisplay:inline-block;\r\n\tbox-sizing:border-box;\r\n\r\n\tmax-height:200px;\r\n\r\n\tbackground:$rowBackgroundColor;\r\n\tborder:1px solid $rowBorderColor;\r\n\r\n\tfont-size:$textSize;\r\n\r\n\toverflow-y:auto;\r\n\t-webkit-overflow-scrolling: touch;\r\n\r\n\tz-index: 10000;\r\n\r\n\t.tabulator-edit-select-list-item{\r\n\t\tpadding:4px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\r\n\t\t&.active{\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tbackground:$editBoxColor;\r\n\r\n\t\t\t&.focused{\r\n\t\t\t\toutline:1px solid rgba($rowBackgroundColor, .5);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.focused{\r\n\t\t\toutline:1px solid $editBoxColor;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tbackground:$editBoxColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-edit-select-list-notice{\r\n\t\tpadding:4px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\t\ttext-align: center;\r\n\t}\r\n\r\n\t.tabulator-edit-select-list-group{\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\tpadding:4px;\r\n\t\tpadding-top:6px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\t\tfont-weight:bold;\r\n\t}\r\n}\r\n\r\n// Table print styling\r\n\r\n.tabulator-print-fullscreen{\r\n\tposition: absolute;\r\n\ttop:0;\r\n\tbottom:0;\r\n\tleft:0;\r\n\tright:0;\r\n\r\n\tz-index: 10000;\r\n}\r\n\r\nbody.tabulator-print-fullscreen-hide>*:not(.tabulator-print-fullscreen){\r\n\tdisplay:none !important;\r\n}\r\n\r\n.tabulator-print-table{\r\n\tborder-collapse: collapse;\r\n\r\n\t.tabulator-data-tree-branch{\r\n\t\tdisplay:inline-block;\r\n\t\tvertical-align:middle;\r\n\r\n\t\theight:9px;\r\n\t\twidth:7px;\r\n\r\n\t\tmargin-top:-9px;\r\n\t\tmargin-right:5px;\r\n\r\n\t\tborder-bottom-left-radius:1px;\r\n\r\n\t\tborder-left:2px solid $rowBorderColor;\r\n\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t}\r\n\r\n\t//row grouping element\r\n\t.tabulator-print-table-group{\r\n\t\tbox-sizing:border-box;\r\n\t\tborder-bottom:1px solid #999;\r\n\t\tborder-right:1px solid $rowBorderColor;\r\n\t\tborder-top:1px solid #999;\r\n\t\tpadding:5px;\r\n\t\tpadding-left:10px;\r\n\t\tbackground:#ccc;\r\n\t\tfont-weight:bold;\r\n\r\n\t\tmin-width: 100%;\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\t\t\tbackground-color:rgba(0,0,0,.1);\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-visible{\r\n\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-right:10px;\r\n\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\tborder-bottom: 0;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-1{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:30px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-2{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:50px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-3{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:70px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-4{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:90px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-5{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:110px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-group-toggle{\r\n\t\t\tdisplay: inline-block;\r\n\t\t}\r\n\r\n\t\t//sorting arrow\r\n\t\t.tabulator-arrow{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\twidth: 0;\r\n\t\t\theight: 0;\r\n\t\t\tmargin-right:16px;\r\n\t\t\tborder-top: 6px solid transparent;\r\n\t\t\tborder-bottom: 6px solid transparent;\r\n\t\t\tborder-right: 0;\r\n\t\t\tborder-left: 6px solid $sortArrowActive;\r\n\t\t\tvertical-align:middle;\r\n\t\t}\r\n\r\n\t\tspan{\r\n\t\t\tmargin-left:10px;\r\n\t\t\tcolor:#d00;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-data-tree-control{\r\n\r\n\t\tdisplay:inline-flex;\r\n\t\tjustify-content:center;\r\n\t\talign-items:center;\r\n\t\tvertical-align:middle;\r\n\r\n\t\theight:11px;\r\n\t\twidth:11px;\r\n\r\n\t\tmargin-right:5px;\r\n\r\n\t\tborder:1px solid $rowTextColor;\r\n\t\tborder-radius:2px;\r\n\t\tbackground:rgba(0, 0, 0, .1);\r\n\r\n\t\toverflow:hidden;\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\t\t\tbackground:rgba(0, 0, 0, .2);\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-control-collapse{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition: relative;\r\n\r\n\t\t\theight: 7px;\r\n\t\t\twidth: 1px;\r\n\r\n\t\t\tbackground: transparent;\r\n\r\n\t\t\t&:after {\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tcontent: \"\";\r\n\t\t\t\tleft: -3px;\r\n\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\theight: 1px;\r\n\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-control-expand{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition: relative;\r\n\r\n\t\t\theight: 7px;\r\n\t\t\twidth: 1px;\r\n\r\n\t\t\tbackground: $rowTextColor;\r\n\r\n\t\t\t&:after {\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tcontent: \"\";\r\n\t\t\t\tleft: -3px;\r\n\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\theight: 1px;\r\n\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n"]} \ No newline at end of file diff --git a/website/js/vendor/tabulator/css/tabulator_site.css b/admin/js/vendors/tabulator/css/tabulator_site.css similarity index 84% rename from website/js/vendor/tabulator/css/tabulator_site.css rename to admin/js/vendors/tabulator/css/tabulator_site.css index fc14e20..7139757 100644 --- a/website/js/vendor/tabulator/css/tabulator_site.css +++ b/admin/js/vendors/tabulator/css/tabulator_site.css @@ -1,7 +1,7 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ .tabulator { position: relative; - border-bottom: 5px solid #222; + border-bottom: 5px solid #293146; background-color: #fff; font-size: 14px; text-align: left; @@ -32,8 +32,8 @@ position: relative; box-sizing: border-box; width: 100%; - border-bottom: 3px solid rgba(32.1569%,38.8235%,55.6863%,1); - background-color: #222; + /* border-bottom: 3px solid #003268; */ + background-color: #293146; color: #fff; font-weight: bold; white-space: nowrap; @@ -53,7 +53,7 @@ position: relative; box-sizing: border-box; border-right: 1px solid #aaa; - background-color: #222; + background-color: #293146; text-align: left; vertical-align: bottom; overflow: hidden; @@ -61,7 +61,7 @@ .tabulator .tabulator-header .tabulator-col.tabulator-moving { position: absolute; - border: 1px solid rgba(32.1569%,38.8235%,55.6863%,1); + /* border: 1px solid #3FB449; */ background: #090909; pointer-events: none; } @@ -81,10 +81,6 @@ opacity: .6; } -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title-holder { - position: relative; -} - .tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title { box-sizing: border-box; width: 100%; @@ -102,22 +98,11 @@ background: #fff; } -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-header-menu-button + .tabulator-title-editor { - width: calc(100% - 22px); -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter { - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; +.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { + display: inline-block; position: absolute; - top: 0; - bottom: 0; - right: 4px; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { + top: 14px; + right: 8px; width: 0; height: 0; border-left: 6px solid transparent; @@ -168,32 +153,19 @@ background-color: #090909; } -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-col-sorter { - color: #bbb; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-arrow { border-top: none; border-bottom: 6px solid #bbb; } -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-col-sorter { - color: rgba(32.1569%,38.8235%,55.6863%,1); -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-arrow { border-top: none; - border-bottom: 6px solid rgba(32.1569%,38.8235%,55.6863%,1); -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-col-sorter { - color: rgba(32.1569%,38.8235%,55.6863%,1); + /* border-bottom: 6px solid #3FB449; */ } -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { +.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-arrow { + border-top: 6px solid #3FB449; border-bottom: none; - border-top: 6px solid rgba(32.1569%,38.8235%,55.6863%,1); - color: rgba(32.1569%,38.8235%,55.6863%,1); } .tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title { @@ -223,13 +195,8 @@ padding-bottom: 20px; } -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-sorter { - -ms-flex-pack: center; - justify-content: center; - left: 0; - right: 0; - top: 4px; - bottom: auto; +.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow { + right: calc(50% - 6px); } .tabulator .tabulator-header .tabulator-frozen { @@ -300,7 +267,7 @@ display: inline-block; margin: 0 auto; padding: 10px; - color: rgba(32.1569%,38.8235%,55.6863%,1); + color: #3FB449; font-weight: bold; font-size: 20px; } @@ -323,10 +290,10 @@ .tabulator .tabulator-footer { padding: 5px 10px; padding-top: 8px; - border-top: 3px solid rgba(32.1569%,38.8235%,55.6863%,1); - background-color: #222; + /* border-top: 3px solid #3FB449; */ + background-color: #293146; text-align: right; - color: #222; + color: #293146; font-weight: bold; white-space: nowrap; -ms-user-select: none; @@ -384,14 +351,14 @@ border: 1px solid #aaa; border-radius: 3px; background: #fff; - color: #222; + color: #293146; font-family: inherit; font-weight: inherit; font-size: inherit; } .tabulator .tabulator-footer .tabulator-page.active { - color: rgba(32.1569%,38.8235%,55.6863%,1); + /* color: #3FB449; */ } .tabulator .tabulator-footer .tabulator-page:disabled { @@ -604,7 +571,7 @@ width: 100%; height: 3px; margin-top: 2px; - background: rgba(32.1569%,38.8235%,55.6863%,1); + background: #3FB449; } .tabulator-row .tabulator-cell .tabulator-data-tree-branch { @@ -724,10 +691,10 @@ box-sizing: border-box; border-right: 1px solid #aaa; border-top: 1px solid #000; - border-bottom: 2px solid rgba(32.1569%,38.8235%,55.6863%,1); + /* border-bottom: 2px solid #3FB449; */ padding: 5px; padding-left: 10px; - background: #222; + background: #293146; color: #fff; font-weight: bold; min-width: 100%; @@ -742,7 +709,7 @@ margin-right: 10px; border-left: 6px solid transparent; border-right: 6px solid transparent; - border-top: 6px solid rgba(32.1569%,38.8235%,55.6863%,1); + border-top: 6px solid #bbb; border-bottom: 0; } @@ -778,13 +745,13 @@ border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-right: 0; - border-left: 6px solid rgba(32.1569%,38.8235%,55.6863%,1); + border-left: 6px solid #bbb; vertical-align: middle; } .tabulator-row.tabulator-group span { margin-left: 10px; - color: rgba(32.1569%,38.8235%,55.6863%,1); + color: #bbb; } .tabulator-menu { @@ -871,66 +838,6 @@ font-weight: bold; } -.tabulator.tabulator-ltr { - direction: ltr; -} - -.tabulator.tabulator-rtl { - text-align: initial; - direction: rtl; -} - -.tabulator.tabulator-rtl .tabulator-header .tabulator-col { - text-align: initial; - border-left: 1px solid #aaa; - border-right: initial; -} - -.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { - margin-right: initial; - margin-left: -1px; -} - -.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { - padding-right: 0; - padding-left: 25px; -} - -.tabulator.tabulator-rtl .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { - left: 8px; - right: initial; -} - -.tabulator.tabulator-rtl .tabulator-row .tabulator-cell { - border-right: initial; - border-left: 1px solid #aaa; -} - -.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-branch { - margin-right: initial; - margin-left: 5px; - border-bottom-left-radius: initial; - border-bottom-right-radius: 1px; - border-left: initial; - border-right: 2px solid #aaa; -} - -.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-control { - margin-right: initial; - margin-left: 5px; -} - -.tabulator.tabulator-rtl .tabulator-col-resize-handle { - position: absolute; - left: 0; - right: auto; -} - -.tabulator.tabulator-rtl .tabulator-col-resize-handle.prev { - right: 0; - left: auto; -} - .tabulator-print-fullscreen { position: absolute; top: 0; @@ -952,10 +859,10 @@ body.tabulator-print-fullscreen-hide > *:not(.tabulator-print-fullscreen) { box-sizing: border-box; border-right: 1px solid #aaa; border-top: 1px solid #000; - border-bottom: 2px solid rgba(32.1569%,38.8235%,55.6863%,1); + border-bottom: 2px solid #3FB449; padding: 5px; padding-left: 10px; - background: #222; + background: #293146; color: #fff; font-weight: bold; min-width: 100%; @@ -970,7 +877,7 @@ body.tabulator-print-fullscreen-hide > *:not(.tabulator-print-fullscreen) { margin-right: 10px; border-left: 6px solid transparent; border-right: 6px solid transparent; - border-top: 6px solid rgba(32.1569%,38.8235%,55.6863%,1); + border-top: 6px solid #3FB449; border-bottom: 0; } @@ -1006,13 +913,13 @@ body.tabulator-print-fullscreen-hide > *:not(.tabulator-print-fullscreen) { border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-right: 0; - border-left: 6px solid rgba(32.1569%,38.8235%,55.6863%,1); + border-left: 6px solid #3FB449; vertical-align: middle; } .tabulator-print-table .tabulator-print-table-group span { margin-left: 10px; - color: rgba(32.1569%,38.8235%,55.6863%,1); + color: #3FB449; } .tabulator-print-table .tabulator-data-tree-branch { diff --git a/admin/js/vendors/tabulator/css/tabulator_site.min.css b/admin/js/vendors/tabulator/css/tabulator_site.min.css new file mode 100644 index 0000000..67f5443 --- /dev/null +++ b/admin/js/vendors/tabulator/css/tabulator_site.min.css @@ -0,0 +1 @@ +.tabulator{position:relative;border-bottom:5px solid #293146;background-color:#fff;font-size:14px;text-align:left;overflow:hidden;-ms-transform:translatez(0);transform:translatez(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableHolder .tabulator-table{min-width:100%}.tabulator[tabulator-layout=fitDataTable]{display:inline-block}.tabulator[tabulator-layout=fitColumns] .tabulator-row .tabulator-cell:last-of-type{border-right:none}.tabulator.tabulator-block-select{-webkit-user-select:none;-ms-user-select:none;user-select:none}.tabulator .tabulator-header{position:relative;box-sizing:border-box;width:100%;background-color:#293146;color:#fff;font-weight:700;white-space:nowrap;overflow:hidden;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-header.tabulator-header-hidden{display:none}.tabulator .tabulator-header .tabulator-col{display:inline-block;position:relative;box-sizing:border-box;border-right:1px solid #aaa;background-color:#293146;text-align:left;vertical-align:bottom;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-moving{position:absolute;background:#090909;pointer-events:none}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{box-sizing:border-box;position:relative;padding:8px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button{padding:0 8px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button:hover{cursor:pointer;opacity:.6}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{box-sizing:border-box;width:100%;border:1px solid #999;padding:1px;background:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{display:inline-block;position:absolute;top:14px;right:8px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{position:relative;display:-ms-flexbox;display:flex;border-top:1px solid #aaa;overflow:hidden;margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{position:relative;box-sizing:border-box;margin-top:2px;width:100%;text-align:center}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto!important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear{width:0;height:0}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{cursor:pointer;background-color:#090909}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-arrow{border-top:none}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-arrow{border-top:6px solid #3fb449;border-bottom:none}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title{-ms-writing-mode:tb-rl;writing-mode:vertical-rl;text-orientation:mixed;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title{-ms-transform:rotate(180deg);transform:rotate(180deg)}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title{padding-right:0;padding-top:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title{padding-right:0;padding-bottom:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow{right:calc(50% - 6px)}.tabulator .tabulator-header .tabulator-frozen{display:inline-block;position:absolute;z-index:10}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #aaa}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #aaa}.tabulator .tabulator-header .tabulator-calcs-holder{box-sizing:border-box;min-width:600%;background:#3c3c3c!important;border-top:1px solid #aaa;overflow:hidden}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{background:#3c3c3c!important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-header .tabulator-frozen-rows-holder{min-width:600%}.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty{display:none}.tabulator .tabulator-tableHolder{position:relative;width:100%;white-space:nowrap;overflow:auto;-webkit-overflow-scrolling:touch}.tabulator .tabulator-tableHolder:focus{outline:0}.tabulator .tabulator-tableHolder .tabulator-placeholder{box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=virtual]{min-height:100%;min-width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder span{display:inline-block;margin:0 auto;padding:10px;color:#3fb449;font-weight:700;font-size:20px}.tabulator .tabulator-tableHolder .tabulator-table{position:relative;display:inline-block;background-color:#fff;white-space:nowrap;overflow:visible;color:#333}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs{font-weight:700;background:#484848!important;color:#fff}.tabulator .tabulator-footer{padding:5px 10px;padding-top:8px;background-color:#293146;text-align:right;color:#293146;font-weight:700;white-space:nowrap;-ms-user-select:none;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-footer .tabulator-calcs-holder{box-sizing:border-box;width:calc(100% + 20px);margin:-8px -10px 8px -10px;text-align:left;background:#3c3c3c!important;border-bottom:1px solid #aaa;overflow:hidden}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{background:#3c3c3c!important;color:#fff!important}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{margin-bottom:-5px;border-bottom:none}.tabulator .tabulator-footer .tabulator-paginator label{color:#fff}.tabulator .tabulator-footer .tabulator-page-size{display:inline-block;margin:0 5px;padding:2px 5px;border:1px solid #aaa;border-radius:3px}.tabulator .tabulator-footer .tabulator-pages{margin:0 7px}.tabulator .tabulator-footer .tabulator-page{display:inline-block;margin:0 2px;padding:2px 5px;border:1px solid #aaa;border-radius:3px;background:#fff;color:#293146;font-family:inherit;font-weight:inherit;font-size:inherit}.tabulator .tabulator-footer .tabulator-page:disabled{opacity:.5}.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover{cursor:pointer;background:rgba(0,0,0,.2);color:#fff}.tabulator .tabulator-col-resize-handle{position:absolute;right:0;top:0;bottom:0;width:5px}.tabulator .tabulator-col-resize-handle.prev{left:0;right:auto}.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}.tabulator .tabulator-loader{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;z-index:100;height:100%;width:100%;background:rgba(0,0,0,.4);text-align:center}.tabulator .tabulator-loader .tabulator-loader-msg{display:inline-block;margin:0 auto;padding:10px 20px;border-radius:10px;background:#fff;font-weight:700;font-size:16px}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading{border:4px solid #333;color:#000}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error{border:4px solid #d00;color:#590000}.tabulator-row{position:relative;box-sizing:border-box;min-height:22px;background-color:#fff}.tabulator-row.tabulator-row-even{background-color:#efefef}.tabulator-row.tabulator-selectable:hover{background-color:#bbb;cursor:pointer}.tabulator-row.tabulator-selected{background-color:#9abcea}.tabulator-row.tabulator-selected:hover{background-color:#769bcc;cursor:pointer}.tabulator-row.tabulator-row-moving{border:1px solid #000;background:#fff}.tabulator-row.tabulator-moving{position:absolute;border-top:1px solid #aaa;border-bottom:1px solid #aaa;pointer-events:none!important;z-index:15}.tabulator-row .tabulator-row-resize-handle{position:absolute;right:0;bottom:0;left:0;height:5px}.tabulator-row .tabulator-row-resize-handle.prev{top:0;bottom:auto}.tabulator-row .tabulator-row-resize-handle:hover{cursor:ns-resize}.tabulator-row .tabulator-frozen{display:inline-block;position:absolute;background-color:inherit;z-index:10}.tabulator-row .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #aaa}.tabulator-row .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #aaa}.tabulator-row .tabulator-responsive-collapse{box-sizing:border-box;padding:5px;border-top:1px solid #aaa;border-bottom:1px solid #aaa}.tabulator-row .tabulator-responsive-collapse:empty{display:none}.tabulator-row .tabulator-responsive-collapse table{font-size:14px}.tabulator-row .tabulator-responsive-collapse table tr td{position:relative}.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type{padding-right:10px}.tabulator-row .tabulator-cell{display:inline-block;position:relative;box-sizing:border-box;padding:6px;border-right:1px solid #aaa;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #1d68cd;padding:0}.tabulator-row .tabulator-cell.tabulator-editing input,.tabulator-row .tabulator-cell.tabulator-editing select{border:1px;background:0 0}.tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #d00}.tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator-row .tabulator-cell.tabulator-validation-fail select{border:1px;background:0 0;color:#d00}.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator-row .tabulator-cell.tabulator-row-handle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{width:100%;height:3px;margin-top:2px;background:#3fb449}.tabulator-row .tabulator-cell .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #aaa;border-bottom:2px solid #aaa}.tabulator-row .tabulator-cell .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #333;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:0 0}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;height:15px;width:15px;border-radius:20px;background:#666;color:#fff;font-weight:700;font-size:1.1em}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover{opacity:.7}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close{display:initial}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open{display:none}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close{display:none}.tabulator-row .tabulator-cell .tabulator-traffic-light{display:inline-block;height:14px;width:14px;border-radius:14px}.tabulator-row.tabulator-group{box-sizing:border-box;border-right:1px solid #aaa;border-top:1px solid #000;padding:5px;padding-left:10px;background:#293146;color:#fff;font-weight:700;min-width:100%}.tabulator-row.tabulator-group:hover{cursor:pointer;background-color:#090909}.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #bbb;border-bottom:0}.tabulator-row.tabulator-group.tabulator-group-level-1{padding-left:30px}.tabulator-row.tabulator-group.tabulator-group-level-2{padding-left:50px}.tabulator-row.tabulator-group.tabulator-group-level-3{padding-left:70px}.tabulator-row.tabulator-group.tabulator-group-level-4{padding-left:90px}.tabulator-row.tabulator-group.tabulator-group-level-5{padding-left:110px}.tabulator-row.tabulator-group .tabulator-group-toggle{display:inline-block}.tabulator-row.tabulator-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #bbb;vertical-align:middle}.tabulator-row.tabulator-group span{margin-left:10px;color:#bbb}.tabulator-menu{position:absolute;display:inline-block;box-sizing:border-box;background:#fff;border:1px solid #aaa;box-shadow:0 0 5px 0 rgba(0,0,0,.2);font-size:14px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:10000}.tabulator-menu .tabulator-menu-item{padding:5px 10px;-webkit-user-select:none;-ms-user-select:none;user-select:none}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-disabled{opacity:.5}.tabulator-menu .tabulator-menu-item:not(.tabulator-menu-item-disabled):hover{cursor:pointer;background:#efefef}.tabulator-menu .tabulator-menu-separator{border-top:1px solid #aaa}.tabulator-edit-select-list{position:absolute;display:inline-block;box-sizing:border-box;max-height:200px;background:#fff;border:1px solid #aaa;font-size:14px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:10000}.tabulator-edit-select-list .tabulator-edit-select-list-item{padding:4px;color:#333}.tabulator-edit-select-list .tabulator-edit-select-list-item.active{color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-item.active.focused{outline:1px solid rgba(255,255,255,.5)}.tabulator-edit-select-list .tabulator-edit-select-list-item.focused{outline:1px solid #1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-item:hover{cursor:pointer;color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-notice{padding:4px;color:#333;text-align:center}.tabulator-edit-select-list .tabulator-edit-select-list-group{border-bottom:1px solid #aaa;padding:4px;padding-top:6px;color:#333;font-weight:700}.tabulator-print-fullscreen{position:absolute;top:0;bottom:0;left:0;right:0;z-index:10000}body.tabulator-print-fullscreen-hide>:not(.tabulator-print-fullscreen){display:none!important}.tabulator-print-table{border-collapse:collapse}.tabulator-print-table .tabulator-print-table-group{box-sizing:border-box;border-right:1px solid #aaa;border-top:1px solid #000;border-bottom:2px solid #3fb449;padding:5px;padding-left:10px;background:#293146;color:#fff;font-weight:700;min-width:100%}.tabulator-print-table .tabulator-print-table-group:hover{cursor:pointer;background-color:#090909}.tabulator-print-table .tabulator-print-table-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #3fb449;border-bottom:0}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-1 td{padding-left:30px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-2 td{padding-left:50px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-3 td{padding-left:70px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-4 td{padding-left:90px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-5 td{padding-left:110px!important}.tabulator-print-table .tabulator-print-table-group .tabulator-group-toggle{display:inline-block}.tabulator-print-table .tabulator-print-table-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #3fb449;vertical-align:middle}.tabulator-print-table .tabulator-print-table-group span{margin-left:10px;color:#3fb449}.tabulator-print-table .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #aaa;border-bottom:2px solid #aaa}.tabulator-print-table .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #333;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-print-table .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:0 0}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#333}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333} \ No newline at end of file diff --git a/admin/js/vendors/tabulator/css/tabulator_site.min.css.map b/admin/js/vendors/tabulator/css/tabulator_site.min.css.map new file mode 100644 index 0000000..6970f0b --- /dev/null +++ b/admin/js/vendors/tabulator/css/tabulator_site.min.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["tabulator_site.scss"],"names":[],"mappings":"AAyCA,WACC,kBAAkB,AAElB,6BAvCgB,AAyChB,sBA1CqB,AA4CrB,eA1Ca,AA2Cb,gBAAgB,AAChB,gBAAe,AAMf,uBAAwB,CAigBxB,AAhhBD,iFAoBI,cAAc,CACd,AArBJ,0CA0BE,oBAAqB,CACrB,AA3BF,oFAiCK,iBAAkB,CAClB,AAlCL,kCAyCE,yBAAiB,AAAjB,qBAAiB,AAAjB,gBAAiB,CACjB,AA1CF,6BA8CE,kBAAiB,AACjB,sBAAsB,AAEtB,WAAU,AAEV,gCAhF2B,AAiF3B,sBApFyB,AAqFzB,WApFmB,AAqFnB,gBAAgB,AAEhB,mBAAmB,AACnB,gBAAe,AAEf,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAmPpB,AAjTF,qDAiEG,YAAY,CACZ,AAlEH,4CAsEG,qBAAoB,AAEpB,kBAAiB,AACjB,sBAAqB,AACrB,4BAxGoB,AAyGpB,sBA3GwB,AA4GxB,gBAAe,AACf,sBAAsB,AACtB,eAAgB,CAqLhB,AAnQH,6DAiFI,kBAAkB,AAClB,yBA/GyB,AAgHzB,mBAA8C,AAC9C,mBAAoB,CACpB,AArFJ,mEAyFI,sBAAqB,AACrB,kBAAkB,AAClB,WAAW,CAgDX,AA3IJ,iGA+FK,aAAc,CAMd,AArGL,uGAkGM,eAAe,AACf,UAAW,CACX,AApGN,wFAyGK,sBAAqB,AACrB,WAAW,AAEX,mBAAmB,AACnB,gBAAgB,AAChB,uBAAuB,AACvB,qBAAqB,CAarB,AA5HL,gHAmHM,sBAAsB,AACtB,WAAW,AAEX,sBAAqB,AAErB,YAAW,AAEX,eAAgB,CAChB,AA3HN,oFAgIK,qBAAqB,AACrB,kBAAkB,AAClB,SAAQ,AACR,UAAS,AACT,QAAQ,AACR,SAAS,AACT,kCAAkC,AAClC,mCAAmC,AACnC,4BAhKmB,CAiKnB,AAzIL,0FAkJK,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AAEb,0BAnLkB,AAoLlB,gBAAgB,AAEhB,iBAAiB,CACjB,AAzJL,0FA+JK,YAAa,CACb,AAhKL,qEAqKI,kBAAkB,AAClB,sBAAsB,AACtB,eAAc,AACd,WAAU,AACV,iBAAkB,CAiBlB,AA1LJ,8EA6KK,qBAAsB,CACtB,AA9KL,yEAiLK,cAAe,CACf,AAlLL,sFAsLO,QAAS,AACT,QAAS,CACV,AAxLN,oFA+LK,kBAAkB,CAClB,AAhML,qEAmMK,eAAc,AACd,wBAAoD,CACpD,AArML,uHAyMM,gBAAgB,AAChB,4BAlOkB,CAmOlB,AA3MN,sHAgNM,gBAAgB,AAChB,+BA1OmB,CA2OnB,AAlNN,uHAuNM,6BAhPmB,AAiPnB,kBAAmB,CACnB,AAzNN,+GAgOM,uBAAyB,AAAzB,yBAAyB,AACzB,uBAAuB,AAEvB,oBAAY,AAAZ,aAAY,AACZ,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,sBAAsB,CACtB,AAtON,oHA2OM,wBAAyB,CACzB,AA5ON,2GAiPM,gBAAe,AACf,gBAAgB,CAChB,AAnPN,uIAuPO,gBAAe,AACf,mBAAmB,CACnB,AAzPP,uGA8PM,qBAAqB,CACrB,AA/PN,+CAsQG,qBAAqB,AACrB,kBAAkB,AAIlB,UAAW,CASX,AApRH,qEA8QI,2BAjSgB,CAkShB,AA/QJ,sEAkRI,0BArSgB,CAsShB,AAnRJ,qDAuRG,sBAAqB,AACrB,eAAc,AAEd,6BAA0D,AAU1D,0BAvTiB,AA0TjB,eAAgB,CAChB,AAxSH,oEA6RI,4BAA0D,CAK1D,AAlSJ,iGAgSK,YAAa,CACb,AAjSL,2DA2SG,cAAc,CAKd,AAhTH,iEA8SI,YAAa,CACb,AA/SJ,kCAqTE,kBAAiB,AACjB,WAAU,AACV,mBAAmB,AACnB,cAAa,AACb,gCAAiC,CAgDjC,AAzWF,wCA4TG,YAAa,CACb,AA7TH,yDAiUG,sBAAqB,AACrB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAOlB,UAAU,CAYV,AAtVH,wFAsUI,gBAAe,AACf,cAAc,CACd,AAxUJ,8DA6UI,qBAAqB,AAErB,cAAa,AACb,aAAY,AAEZ,cA/WyB,AAgXzB,gBAAiB,AACjB,cAAe,CACf,AArVJ,mDA0VG,kBAAiB,AACjB,qBAAoB,AACpB,sBAjXqB,AAkXrB,mBAAmB,AACnB,iBAAgB,AAChB,UAjXe,CA0Xf,AAxWH,kFAmWK,gBAAiB,AACjB,6BAA0D,AAC1D,UApYgB,CAqYhB,AAtWL,6BA8WE,iBAAgB,AAChB,gBAAe,AACf,6BArX2B,AAsX3B,sBAzXyB,AA0XzB,iBAAgB,AAChB,WA1XmB,AA2XnB,gBAAgB,AAChB,mBAAkB,AAClB,qBAAgB,AAAhB,iBAAgB,AAEhB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAuFpB,AAldF,qDA8XG,sBAAqB,AACrB,wBAAuB,AACvB,sBAA2B,AAE3B,gBAAgB,AAEhB,6BAA0D,AAY1D,6BAnaiB,AAqajB,eAAgB,CAMhB,AAxZH,oEAuYI,6BAA0D,AAC1D,oBAAiC,CAKjC,AA7YJ,iGA2YK,YAAa,CACb,AA5YL,gEAqZI,mBAAkB,AAClB,kBAAkB,CAClB,AAvZJ,wDA6ZI,UAAU,CACV,AA9ZJ,kDAmaG,qBAAoB,AAEpB,aAAY,AACZ,gBAAe,AAEf,sBA9aoB,AA+apB,iBAAiB,CACjB,AA1aH,8CA8aG,YAAY,CACZ,AA/aH,6CAmbG,qBAAoB,AAEpB,aAAY,AACZ,gBAAe,AAEf,sBA9boB,AA+bpB,kBAAiB,AAEjB,gBAAe,AAEf,WApckB,AAqclB,oBAAmB,AACnB,oBAAmB,AACnB,iBAAiB,CAiBjB,AAjdH,oDAmcI,aAxcyB,CAyczB,AApcJ,sDAucI,UAAU,CACV,AAxcJ,kEA4cK,eAAc,AACd,0BAAyB,AACzB,UAAU,CACV,AA/cL,wCAsdE,kBAAiB,AACjB,QAAO,AACP,MAAK,AACL,SAAQ,AACR,SAAS,CAUT,AApeF,6CA6dG,OAAM,AACN,UAAU,CACV,AA/dH,8CAkeG,gBAAgB,CAChB,AAneH,6BAyeE,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAElB,MAAK,AACL,OAAM,AACN,YAAW,AAEX,YAAW,AACX,WAAU,AACV,0BAAyB,AACzB,iBAAiB,CA2BjB,AA/gBF,mDAwfG,qBAAoB,AAEpB,cAAa,AACb,kBAAiB,AAEjB,mBAAkB,AAElB,gBAAe,AACf,gBAAgB,AAChB,cAAc,CAad,AA9gBH,qEAqgBI,sBAAqB,AACrB,UAAU,CACV,AAvgBJ,mEA2gBI,sBAAqB,AACrB,aAAa,CACb,AAMJ,eACC,kBAAkB,AAClB,sBAAsB,AACtB,gBAA0C,AAC1C,qBA5iBuB,CA45BvB,AApXD,kCAQE,wBA/iB4B,CAgjB5B,AATF,0CAYE,sBAhjBsB,AAijBtB,cAAe,CACf,AAdF,kCAiBE,wBAnjB6B,CAojB7B,AAlBF,wCAqBE,yBAtjBkC,AAujBlC,cAAe,CACf,AAvBF,oCA0BE,sBAAqB,AACrB,eAAe,CACf,AA5BF,gCA+BE,kBAAkB,AAElB,0BAvkBkB,AAwkBlB,6BAxkBkB,AA0kBlB,8BAA+B,AAC/B,UAAU,CACV,AAtCF,4CA0CE,kBAAiB,AACjB,QAAO,AACP,SAAQ,AACR,OAAM,AACN,UAAU,CAUV,AAxDF,iDAiDG,MAAK,AACL,WAAW,CACX,AAnDH,kDAsDG,gBAAgB,CAChB,AAvDH,iCA2DE,qBAAqB,AACrB,kBAAkB,AAElB,yBAAyB,AAEzB,UAAW,CASX,AAzEF,uDAmEG,2BAzmBiB,CA0mBjB,AApEH,wDAuEG,0BA7mBiB,CA8mBjB,AAxEH,8CA4EE,sBAAqB,AAErB,YAAW,AAEX,0BAtnBkB,AAunBlB,4BAvnBkB,CA0oBlB,AApGF,oDAoFG,YAAY,CACZ,AArFH,oDAwFG,cA9oBW,CAypBX,AAnGH,0DA4FK,iBAAkB,CAKlB,AAjGL,wEA+FM,kBAAkB,CAClB,AAhGN,+BAwGE,qBAAoB,AACpB,kBAAkB,AAClB,sBAAqB,AACrB,YAAW,AACX,4BAlpBkB,AAmpBlB,sBAAqB,AACrB,mBAAkB,AAClB,gBAAe,AACf,sBAAsB,CA0LtB,AA1SF,iDAoHG,yBAnpBkB,AAopBlB,SAAU,CAMV,AA3HH,+GAwHI,WAAU,AACV,sBAAsB,CACtB,AA1HJ,yDA8HG,qBA5pBgB,CAmqBhB,AArIH,+HAgII,WAAU,AACV,uBAAsB,AAEtB,UAjqBe,CAkqBf,AApIJ,6EA0II,YAAa,CACb,AA3IJ,oDAiJG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAElB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAcpB,AArKH,8EA2JI,SAAS,CAST,AApKJ,wGA+JK,WAAU,AACV,WAAU,AACV,eAAc,AACd,kBA9sBoB,CA+sBpB,AAnKL,2DAwKG,qBAAoB,AACpB,sBAAqB,AAErB,WAAU,AACV,UAAS,AAET,gBAAe,AACf,iBAAgB,AAEhB,8BAA6B,AAE7B,2BAztBiB,AA0tBjB,4BA1tBiB,CA2tBjB,AArLH,4DAyLG,2BAAmB,AAAnB,oBAAmB,AACnB,qBAAsB,AAAtB,uBAAsB,AACtB,sBAAkB,AAAlB,mBAAkB,AAClB,sBAAqB,AAErB,YAAW,AACX,WAAU,AAEV,iBAAgB,AAEhB,sBAxuBe,AAyuBf,kBAAiB,AACjB,0BAA4B,AAE5B,eAAe,CAmDf,AA1PH,kEA0MI,eAAc,AACd,yBAA4B,CAC5B,AA5MJ,kGA+MI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,sBAAuB,CAavB,AAlOJ,wGAwNK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eArwBa,CAswBb,AAjOL,gGAqOI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,eAhxBc,CA6xBd,AAxPJ,sGA8OK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eA3xBa,CA4xBb,AAvPL,qEA6PG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,uBAAsB,AAEtB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,oBAAoB,AAEpB,YAAW,AACX,WAAU,AAEV,mBAAkB,AAClB,gBAAe,AAEf,WApzBqB,AAqzBrB,gBAAgB,AAChB,eAAe,CAmBf,AAjSH,2EAiRI,UAAU,CACV,AAlRJ,sHAsRK,eAAe,CACf,AAvRL,sOA+RI,YAAY,CACZ,AAhSJ,wDAoSG,qBAAqB,AACrB,YAAW,AACX,WAAU,AAEV,kBAAkB,CAClB,AAzSH,+BA8SE,sBAAqB,AACrB,4BAr1BkB,AAs1BlB,0BAAyB,AACzB,gCAj2B2B,AAk2B3B,YAAW,AACX,kBAAiB,AACjB,gBAv2ByB,AAw2BzB,WAv2BmB,AAw2BnB,gBAAgB,AAEhB,cAAe,CA0Df,AAlXF,qCA2TG,eAAc,AACd,wBAAoD,CACpD,AA7TH,wEAiUI,kBAAiB,AACjB,kCAAkC,AAClC,mCAAmC,AACnC,6BAh3BqB,AAi3BrB,eAAgB,CAChB,AAtUJ,uDA0UG,iBAAiB,CACjB,AA3UH,uDA8UG,iBAAiB,CACjB,AA/UH,uDAkVG,iBAAiB,CACjB,AAnVH,uDAsVG,iBAAiB,CACjB,AAvVH,uDA0VG,kBAAkB,CAClB,AA3VH,uDA8VG,oBAAqB,CACrB,AA/VH,gDAmWG,qBAAqB,AACrB,QAAQ,AACR,SAAS,AACT,kBAAiB,AACjB,iCAAiC,AACjC,oCAAoC,AACpC,eAAe,AACf,8BAt5BsB,AAu5BtB,qBAAqB,CACrB,AA5WH,oCA+WG,iBAAgB,AAChB,aAh6B0B,CAi6B1B,AAKH,gBACC,kBAAkB,AAClB,qBAAoB,AACpB,sBAAqB,AAErB,gBAn6BuB,AAo6BvB,sBAl6BmB,AAm6BnB,oCAAuC,AAEvC,eAr7Ba,AAu7Bb,gBAAe,AACf,iCAAiC,AAEjC,aAAc,CAqBd,AAnCD,qCAkBE,iBAAgB,AAEhB,yBAAiB,AAAjB,qBAAiB,AAAjB,gBAAiB,CAUjB,AA9BF,kEAuBG,UAAW,CACX,AAxBH,8EA2BG,eAAe,AACf,kBAz7B2B,CA07B3B,AA7BH,0CAiCE,yBA77BkB,CA87BlB,AAGF,4BACC,kBAAkB,AAClB,qBAAoB,AACpB,sBAAqB,AAErB,iBAAgB,AAEhB,gBA18BuB,AA28BvB,sBAz8BmB,AA28BnB,eA39Ba,AA69Bb,gBAAe,AACf,iCAAiC,AAEjC,aAAc,CA6Cd,AA5DD,6DAkBE,YAAW,AAEX,UAp9BgB,CA0+BhB,AA1CF,oEAuBG,WA19BqB,AA29BrB,kBAl9BkB,CAu9BlB,AA7BH,4EA2BI,oCA99BoB,CA+9BpB,AA5BJ,qEAgCG,yBA19BkB,CA29BlB,AAjCH,mEAqCG,eAAc,AAEd,WA1+BqB,AA2+BrB,kBAl+BkB,CAm+BlB,AAzCH,+DA6CE,YAAW,AAEX,WA/+BgB,AAg/BhB,iBAAkB,CAClB,AAjDF,8DAoDE,6BAr/BkB,AAu/BlB,YAAW,AACX,gBAAe,AAEf,WAz/BgB,AA0/BhB,eAAgB,CAChB,AAKF,4BACC,kBAAkB,AAClB,MAAK,AACL,SAAQ,AACR,OAAM,AACN,QAAO,AAEP,aAAc,CACd,AAED,uEACC,sBAAuB,CACvB,AAED,uBACC,wBAAyB,CAsKzB,AAvKD,oDAKE,sBAAqB,AACrB,4BArhCkB,AAshClB,0BAAyB,AACzB,gCAjiC2B,AAkiC3B,YAAW,AACX,kBAAiB,AACjB,gBAviCyB,AAwiCzB,WAviCmB,AAwiCnB,gBAAgB,AAEhB,cAAe,CAmEf,AAlFF,0DAkBG,eAAc,AACd,wBAAoD,CACpD,AApBH,6FAwBI,kBAAiB,AACjB,kCAAkC,AAClC,mCAAmC,AACnC,6BAhjCqB,AAijCrB,eAAgB,CAChB,AA7BJ,+EAkCI,2BAA4B,CAC5B,AAnCJ,+EAwCI,2BAA4B,CAC5B,AAzCJ,+EA8CI,2BAA4B,CAC5B,AA/CJ,+EAoDI,2BAA4B,CAC5B,AArDJ,+EA0DI,4BAA6B,CAC7B,AA3DJ,4EA8DG,oBAAqB,CACrB,AA/DH,qEAmEG,qBAAqB,AACrB,QAAQ,AACR,SAAS,AACT,kBAAiB,AACjB,iCAAiC,AACjC,oCAAoC,AACpC,eAAe,AACf,8BA/lCsB,AAgmCtB,qBAAqB,CACrB,AA5EH,yDA+EG,iBAAgB,AAChB,aAzmC0B,CA0mC1B,AAjFH,mDAqFE,qBAAoB,AACpB,sBAAqB,AAErB,WAAU,AACV,UAAS,AAET,gBAAe,AACf,iBAAgB,AAEhB,8BAA6B,AAE7B,2BA/mCkB,AAgnClB,4BAhnCkB,CAinClB,AAlGF,oDAsGE,2BAAmB,AAAnB,oBAAmB,AACnB,qBAAsB,AAAtB,uBAAsB,AACtB,sBAAkB,AAAlB,mBAAkB,AAClB,sBAAqB,AAErB,YAAW,AACX,WAAU,AAEV,iBAAgB,AAEhB,sBA9nCgB,AA+nChB,kBAAiB,AACjB,0BAA4B,AAE5B,eAAe,CAkDf,AAtKF,0DAuHG,eAAc,AACd,yBAA4B,CAC5B,AAzHH,0FA4HG,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,sBAAuB,CAavB,AA/IH,gGAqII,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eA3pCc,CA4pCd,AA9IJ,wFAkJG,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,eAtqCe,CAmrCf,AArKH,8FA2JI,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eAjrCc,CAkrCd","file":"tabulator_site.min.css","sourcesContent":["/* Tabulator v4.7.0 (c) Oliver Folkerd */\n\n\r\n//Main Theme Variables\r\n$backgroundColor: #fff !default; //background color of tabulator\r\n$borderColor:#222 !default; //border to tabulator\r\n$textSize:14px !default; //table text size\r\n\r\n//header themeing\r\n$headerBackgroundColor:#222 !default; //border to tabulator\r\n$headerTextColor:#fff !default; //header text colour\r\n$headerBorderColor:#aaa !default; //header border color\r\n$headerSeperatorColor:#3FB449 !default; //header bottom seperator color\r\n$headerMargin:4px !default; //padding round header\r\n\r\n//column header arrows\r\n$sortArrowActive: #3FB449 !default;\r\n$sortArrowInactive: #bbb !default;\r\n\r\n//row themeing\r\n$rowBackgroundColor:#fff !default; //table row background color\r\n$rowAltBackgroundColor:#EFEFEF !default; //table row background color\r\n$rowBorderColor:#aaa !default; //table border color\r\n$rowTextColor:#333 !default; //table text color\r\n$rowHoverBackground:#bbb !default; //row background color on hover\r\n\r\n$rowSelectedBackground: #9ABCEA !default; //row background color when selected\r\n$rowSelectedBackgroundHover: #769BCC !default;//row background color when selected and hovered\r\n\r\n$editBoxColor:#1D68CD !default; //border color for edit boxes\r\n$errorColor:#dd0000 !default; //error indication\r\n\r\n//footer themeing\r\n$footerBackgroundColor:#222 !default; //border to tabulator\r\n$footerTextColor:#222 !default; //footer text colour\r\n$footerBorderColor:#aaa !default; //footer border color\r\n$footerSeperatorColor:#3FB449 !default; //footer bottom seperator color\r\n$footerActiveColor:$footerSeperatorColor !default; //footer bottom active text color\r\n\r\n\r\n//Tabulator Containing Element\r\n.tabulator{\r\n\tposition: relative;\r\n\r\n\tborder-bottom: 5px solid $borderColor;\r\n\r\n\tbackground-color: $backgroundColor;\r\n\r\n\tfont-size:$textSize;\r\n\ttext-align: left;\r\n\toverflow:hidden;\r\n\r\n\t-webkit-transform: translatez(0);\r\n\t-moz-transform: translatez(0);\r\n\t-ms-transform: translatez(0);\r\n\t-o-transform: translatez(0);\r\n\ttransform: translatez(0);\r\n\r\n\t&[tabulator-layout=\"fitDataFill\"]{\r\n\t\t.tabulator-tableHolder{\r\n\t\t\t.tabulator-table{\r\n\t\t\t\tmin-width:100%;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t&[tabulator-layout=\"fitDataTable\"]{\r\n\t\tdisplay: inline-block;\r\n\t}\r\n\r\n\t&[tabulator-layout=\"fitColumns\"]{\r\n\t\t.tabulator-row{\r\n\t\t\t.tabulator-cell{\r\n\t\t\t\t&:last-of-type{\r\n\t\t\t\t\tborder-right: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t&.tabulator-block-select{\r\n\t\tuser-select: none;\r\n\t}\r\n\r\n\t//column header containing element\r\n\t.tabulator-header{\r\n\t\tposition:relative;\r\n\t\tbox-sizing: border-box;\r\n\r\n\t\twidth:100%;\r\n\r\n\t\tborder-bottom:3px solid $headerSeperatorColor;\r\n\t\tbackground-color: $headerBackgroundColor;\r\n\t\tcolor: $headerTextColor;\r\n\t\tfont-weight:bold;\r\n\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:hidden;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t&.tabulator-header-hidden{\r\n\t\t\tdisplay:none;\r\n\t\t}\r\n\r\n\t\t//individual column header element\r\n\t\t.tabulator-col{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tposition:relative;\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tborder-right:1px solid $headerBorderColor;\r\n\t\t\tbackground-color: $headerBackgroundColor;\r\n\t\t\ttext-align:left;\r\n\t\t\tvertical-align: bottom;\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&.tabulator-moving{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tborder:1px solid $headerSeperatorColor;\r\n\t\t\t\tbackground:darken($headerBackgroundColor, 10%);\r\n\t\t\t\tpointer-events: none;\r\n\t\t\t}\r\n\r\n\t\t\t//hold content of column header\r\n\t\t\t.tabulator-col-content{\r\n\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tpadding:8px;\r\n\r\n\t\t\t\t//header menu button\r\n\t\t\t\t.tabulator-header-menu-button{\r\n\t\t\t\t\tpadding: 0 8px;\r\n\r\n\t\t\t\t\t&:hover{\r\n\t\t\t\t\t\tcursor: pointer;\r\n\t\t\t\t\t\topacity: .6;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//hold title of column header\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\twhite-space: nowrap;\r\n\t\t\t\t\toverflow: hidden;\r\n\t\t\t\t\ttext-overflow: ellipsis;\r\n\t\t\t\t\tvertical-align:bottom;\r\n\r\n\t\t\t\t\t//element to hold title editor\r\n\t\t\t\t\t.tabulator-title-editor{\r\n\t\t\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\t\tborder:1px solid #999;\r\n\r\n\t\t\t\t\t\tpadding:1px;\r\n\r\n\t\t\t\t\t\tbackground: #fff;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//column sorter arrow\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tdisplay: inline-block;\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\ttop:14px;\r\n\t\t\t\t\tright:8px;\r\n\t\t\t\t\twidth: 0;\r\n\t\t\t\t\theight: 0;\r\n\t\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\t//complex header column group\r\n\t\t\t&.tabulator-col-group{\r\n\r\n\t\t\t\t//gelement to hold sub columns in column group\r\n\t\t\t\t.tabulator-col-group-cols{\r\n\t\t\t\t\tposition:relative;\r\n\t\t\t\t\tdisplay: flex;\r\n\r\n\t\t\t\t\tborder-top:1px solid $headerBorderColor;\r\n\t\t\t\t\toverflow: hidden;\r\n\r\n\t\t\t\t\tmargin-right:-1px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//hide left resize handle on first column\r\n\t\t\t&:first-child{\r\n\t\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//header filter containing element\r\n\t\t\t.tabulator-header-filter{\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\tmargin-top:2px;\r\n\t\t\t\twidth:100%;\r\n\t\t\t\ttext-align: center;\r\n\r\n\t\t\t\t//styling adjustment for inbuilt editors\r\n\t\t\t\ttextarea{\r\n\t\t\t\t\theight:auto !important;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tsvg{\r\n\t\t\t\t\tmargin-top: 3px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tinput{\r\n\t\t\t\t\t&::-ms-clear {\r\n\t\t\t\t\t width : 0;\r\n\t\t\t\t\t height: 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//styling child elements for sortable columns\r\n\t\t\t&.tabulator-sortable{\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tpadding-right:25px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground-color:darken($headerBackgroundColor, 10%);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"none\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"asc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowActive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"desc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\t\t\tborder-bottom: none;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-col-vertical{\r\n\t\t\t\t.tabulator-col-content{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\twriting-mode: vertical-rl;\r\n\t\t\t\t\t\ttext-orientation: mixed;\r\n\r\n\t\t\t\t\t\tdisplay:flex;\r\n\t\t\t\t\t\talign-items:center;\r\n\t\t\t\t\t\tjustify-content:center;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.tabulator-col-vertical-flip{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\ttransform: rotate(180deg);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.tabulator-sortable{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\t\tpadding-top:20px;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.tabulator-col-vertical-flip{\r\n\t\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\t\t\tpadding-bottom:20px;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\t\tright:calc(50% - 6px);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\tposition: absolute;\r\n\r\n\t\t\t// background-color: inherit;\r\n\r\n\t\t\tz-index: 10;\r\n\r\n\t\t\t&.tabulator-frozen-left{\r\n\t\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-frozen-right{\r\n\t\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tmin-width:600%;\r\n\r\n\t\t\tbackground:lighten($headerBackgroundColor, 10%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:lighten($headerBackgroundColor, 10%) !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\t\t\t// border-bottom:1px solid $headerBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen-rows-holder{\r\n\t\t\tmin-width:600%;\r\n\r\n\t\t\t&:empty{\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//scrolling element to hold table\r\n\t.tabulator-tableHolder{\r\n\t\tposition:relative;\r\n\t\twidth:100%;\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:auto;\r\n\t\t-webkit-overflow-scrolling: touch;\r\n\r\n\t\t&:focus{\r\n\t\t\toutline: none;\r\n\t\t}\r\n\r\n\t\t//default placeholder element\r\n\t\t.tabulator-placeholder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tdisplay: flex;\r\n\t\t\talign-items:center;\r\n\r\n\t\t\t&[tabulator-render-mode=\"virtual\"]{\r\n\t\t\t\tmin-height:100%;\r\n\t\t\t\tmin-width:100%;\r\n\t\t\t}\r\n\r\n\t\t\twidth:100%;\r\n\r\n\t\t\tspan{\r\n\t\t\t\tdisplay: inline-block;\r\n\r\n\t\t\t\tmargin:0 auto;\r\n\t\t\t\tpadding:10px;\r\n\r\n\t\t\t\tcolor:$headerSeperatorColor;\r\n\t\t\t\tfont-weight: bold;\r\n\t\t\t\tfont-size: 20px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//element to hold table rows\r\n\t\t.tabulator-table{\r\n\t\t\tposition:relative;\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tbackground-color:$rowBackgroundColor;\r\n\t\t\twhite-space: nowrap;\r\n\t\t\toverflow:visible;\r\n\t\t\tcolor:$rowTextColor;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\t&.tabulator-calcs{\r\n\t\t\t\t\tfont-weight: bold;\r\n\t\t\t\t\tbackground:lighten($headerBackgroundColor, 15%) !important;\r\n\t\t\t\t\tcolor:$headerTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//footer element\r\n\t.tabulator-footer{\r\n\t\tpadding:5px 10px;\r\n\t\tpadding-top:8px;\r\n\t\tborder-top:3px solid $footerSeperatorColor;\r\n\t\tbackground-color: $footerBackgroundColor;\r\n\t\ttext-align:right;\r\n\t\tcolor: $footerTextColor;\r\n\t\tfont-weight:bold;\r\n\t\twhite-space:nowrap;\r\n\t\tuser-select:none;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\twidth:calc(100% + 20px);\r\n\t\t\tmargin:-8px -10px 8px -10px;\r\n\r\n\t\t\ttext-align: left;\r\n\r\n\t\t\tbackground:lighten($footerBackgroundColor, 10%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:lighten($footerBackgroundColor, 10%) !important;\r\n\t\t\t\tcolor:$headerTextColor !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// border-top:1px solid $rowBorderColor;\r\n\t\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&:only-child{\r\n\t\t\t\tmargin-bottom:-5px;\r\n\t\t\t\tborder-bottom:none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//pagination container element\r\n\t\t.tabulator-paginator{\r\n\t\t\tlabel{\r\n\t\t\t\tcolor:#fff;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//page size select element\r\n\t\t.tabulator-page-size{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 5px;\r\n\t\t\tpadding:2px 5px;\r\n\r\n\t\t\tborder:1px solid $footerBorderColor;\r\n\t\t\tborder-radius:3px;\r\n\t\t}\r\n\r\n\t\t//pagination container element\r\n\t\t.tabulator-pages{\r\n\t\t\tmargin:0 7px;\r\n\t\t}\r\n\r\n\t\t//pagination button\r\n\t\t.tabulator-page{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 2px;\r\n\t\t\tpadding:2px 5px;\r\n\r\n\t\t\tborder:1px solid $footerBorderColor;\r\n\t\t\tborder-radius:3px;\r\n\r\n\t\t\tbackground:#fff;\r\n\r\n\t\t\tcolor: $footerTextColor;\r\n\t\t\tfont-family:inherit;\r\n\t\t\tfont-weight:inherit;\r\n\t\t\tfont-size:inherit;\r\n\r\n\t\t\t&.active{\r\n\t\t\t\tcolor:$footerActiveColor;\r\n\t\t\t}\r\n\r\n\t\t\t&:disabled{\r\n\t\t\t\topacity:.5;\r\n\t\t\t}\r\n\r\n\t\t\t&:not(.disabled){\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground:rgba(0,0,0,.2);\r\n\t\t\t\t\tcolor:#fff;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//column resize handles\r\n\t.tabulator-col-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\ttop:0;\r\n\t\tbottom:0;\r\n\t\twidth:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\tleft:0;\r\n\t\t\tright:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ew-resize;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//holding div that contains loader and covers tabulator element to prevent interaction\r\n\t.tabulator-loader{\r\n\t\tposition:absolute;\r\n\t\tdisplay: flex;\r\n\t\talign-items:center;\r\n\r\n\t\ttop:0;\r\n\t\tleft:0;\r\n\t\tz-index:100;\r\n\r\n\t\theight:100%;\r\n\t\twidth:100%;\r\n\t\tbackground:rgba(0,0,0,.4);\r\n\t\ttext-align:center;\r\n\r\n\t\t//loading message element\r\n\t\t.tabulator-loader-msg{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 auto;\r\n\t\t\tpadding:10px 20px;\r\n\r\n\t\t\tborder-radius:10px;\r\n\r\n\t\t\tbackground:#fff;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:16px;\r\n\r\n\t\t\t//loading message\r\n\t\t\t&.tabulator-loading{\r\n\t\t\t\tborder:4px solid #333;\r\n\t\t\t\tcolor:#000;\r\n\t\t\t}\r\n\r\n\t\t\t//error message\r\n\t\t\t&.tabulator-error{\r\n\t\t\t\tborder:4px solid #D00;\r\n\t\t\t\tcolor:#590000;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n//row element\r\n.tabulator-row{\r\n\tposition: relative;\r\n\tbox-sizing: border-box;\r\n\tmin-height:$textSize + ($headerMargin * 2);\r\n\tbackground-color: $rowBackgroundColor;\r\n\r\n\r\n\t&.tabulator-row-even{\r\n\t\tbackground-color: $rowAltBackgroundColor;\r\n\t}\r\n\r\n\t&.tabulator-selectable:hover{\r\n\t\tbackground-color:$rowHoverBackground;\r\n\t\tcursor: pointer;\r\n\t}\r\n\r\n\t&.tabulator-selected{\r\n\t\tbackground-color:$rowSelectedBackground;\r\n\t}\r\n\r\n\t&.tabulator-selected:hover{\r\n\t\tbackground-color:$rowSelectedBackgroundHover;\r\n\t\tcursor: pointer;\r\n\t}\r\n\r\n\t&.tabulator-row-moving{\r\n\t\tborder:1px solid #000;\r\n\t\tbackground:#fff;\r\n\t}\r\n\r\n\t&.tabulator-moving{\r\n\t\tposition: absolute;\r\n\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\tpointer-events: none !important;\r\n\t\tz-index:15;\r\n\t}\r\n\r\n\t//row resize handles\r\n\t.tabulator-row-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\tbottom:0;\r\n\t\tleft:0;\r\n\t\theight:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\ttop:0;\r\n\t\t\tbottom:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ns-resize;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-frozen{\r\n\t\tdisplay: inline-block;\r\n\t\tposition: absolute;\r\n\r\n\t\tbackground-color: inherit;\r\n\r\n\t\tz-index: 10;\r\n\r\n\t\t&.tabulator-frozen-left{\r\n\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t}\r\n\r\n\t\t&.tabulator-frozen-right{\r\n\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-responsive-collapse{\r\n\t\tbox-sizing:border-box;\r\n\r\n\t\tpadding:5px;\r\n\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\t&:empty{\r\n\t\t\tdisplay:none;\r\n\t\t}\r\n\r\n\t\ttable{\r\n\t\t\tfont-size:$textSize;\r\n\r\n\t\t\ttr{\r\n\t\t\t\ttd{\r\n\t\t\t\t\tposition: relative;\r\n\r\n\t\t\t\t\t&:first-of-type{\r\n\t\t\t\t\t\tpadding-right:10px;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//cell element\r\n\t.tabulator-cell{\r\n\t\tdisplay:inline-block;\r\n\t\tposition: relative;\r\n\t\tbox-sizing:border-box;\r\n\t\tpadding:6px;\r\n\t\tborder-right:1px solid $rowBorderColor;\r\n\t\tvertical-align:middle;\r\n\t\twhite-space:nowrap;\r\n\t\toverflow:hidden;\r\n\t\ttext-overflow:ellipsis;\r\n\r\n\r\n\t\t&.tabulator-editing{\r\n\t\t\tborder:1px solid $editBoxColor;\r\n\t\t\tpadding: 0;\r\n\r\n\t\t\tinput, select{\r\n\t\t\t\tborder:1px;\r\n\t\t\t\tbackground:transparent;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-validation-fail{\r\n\t\t\tborder:1px solid $errorColor;\r\n\t\t\tinput, select{\r\n\t\t\t\tborder:1px;\r\n\t\t\t\tbackground:transparent;\r\n\r\n\t\t\t\tcolor: $errorColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//hide left resize handle on first column\r\n\t\t&:first-child{\r\n\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//movable row handle\r\n\t\t&.tabulator-row-handle{\r\n\r\n\t\t\tdisplay: inline-flex;\r\n\t\t\talign-items:center;\r\n\r\n\t\t\t-moz-user-select: none;\r\n\t\t\t-khtml-user-select: none;\r\n\t\t\t-webkit-user-select: none;\r\n\t\t\t-o-user-select: none;\r\n\r\n\t\t\t//handle holder\r\n\t\t\t.tabulator-row-handle-box{\r\n\t\t\t\twidth:80%;\r\n\r\n\t\t\t\t//Hamburger element\r\n\t\t\t\t.tabulator-row-handle-bar{\r\n\t\t\t\t\twidth:100%;\r\n\t\t\t\t\theight:3px;\r\n\t\t\t\t\tmargin-top:2px;\r\n\t\t\t\t\tbackground:$sortArrowActive;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-branch{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tvertical-align:middle;\r\n\r\n\t\t\theight:9px;\r\n\t\t\twidth:7px;\r\n\r\n\t\t\tmargin-top:-9px;\r\n\t\t\tmargin-right:5px;\r\n\r\n\t\t\tborder-bottom-left-radius:1px;\r\n\r\n\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-control{\r\n\r\n\t\t\tdisplay:inline-flex;\r\n\t\t\tjustify-content:center;\r\n\t\t\talign-items:center;\r\n\t\t\tvertical-align:middle;\r\n\r\n\t\t\theight:11px;\r\n\t\t\twidth:11px;\r\n\r\n\t\t\tmargin-right:5px;\r\n\r\n\t\t\tborder:1px solid $rowTextColor;\r\n\t\t\tborder-radius:2px;\r\n\t\t\tbackground:rgba(0, 0, 0, .1);\r\n\r\n\t\t\toverflow:hidden;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\tcursor:pointer;\r\n\t\t\t\tbackground:rgba(0, 0, 0, .2);\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control-collapse{\r\n\t\t\t\tdisplay:inline-block;\r\n\t\t\t\tposition: relative;\r\n\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 1px;\r\n\r\n\t\t\t\tbackground: transparent;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tcontent: \"\";\r\n\t\t\t\t\tleft: -3px;\r\n\t\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\t\theight: 1px;\r\n\t\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control-expand{\r\n\t\t\t\tdisplay:inline-block;\r\n\t\t\t\tposition: relative;\r\n\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 1px;\r\n\r\n\t\t\t\tbackground: $rowTextColor;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tcontent: \"\";\r\n\t\t\t\t\tleft: -3px;\r\n\t\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\t\theight: 1px;\r\n\t\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t.tabulator-responsive-collapse-toggle{\r\n\t\t\tdisplay: inline-flex;\r\n\t\t\talign-items:center;\r\n\t\t\tjustify-content:center;\r\n\r\n\t\t\t-moz-user-select: none;\r\n\t\t\t-khtml-user-select: none;\r\n\t\t\t-webkit-user-select: none;\r\n\t\t\t-o-user-select: none;\r\n\r\n\t\t\theight:15px;\r\n\t\t\twidth:15px;\r\n\r\n\t\t\tborder-radius:20px;\r\n\t\t\tbackground:#666;\r\n\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:1.1em;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\topacity:.7;\r\n\t\t\t}\r\n\r\n\t\t\t&.open{\r\n\t\t\t\t.tabulator-responsive-collapse-toggle-close{\r\n\t\t\t\t\tdisplay:initial;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.tabulator-responsive-collapse-toggle-open{\r\n\t\t\t\t\tdisplay:none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-responsive-collapse-toggle-close{\r\n\t\t\t\tdisplay:none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-traffic-light{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\theight:14px;\r\n\t\t\twidth:14px;\r\n\r\n\t\t\tborder-radius:14px;\r\n\t\t}\r\n\t}\r\n\r\n\t//row grouping element\r\n\t&.tabulator-group{\r\n\t\tbox-sizing:border-box;\r\n\t\tborder-right:1px solid $rowBorderColor;\r\n\t\tborder-top:1px solid #000;\r\n\t\tborder-bottom:2px solid $headerSeperatorColor;\r\n\t\tpadding:5px;\r\n\t\tpadding-left:10px;\r\n\t\tbackground:$headerBackgroundColor;\r\n\t\tcolor:$headerTextColor;\r\n\t\tfont-weight:bold;\r\n\r\n\t\tmin-width: 100%;\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\t\t\tbackground-color:darken($headerBackgroundColor, 10%);\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-visible{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-right:10px;\r\n\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\tborder-bottom: 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-1{\r\n\t\t\tpadding-left:30px;\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-2{\r\n\t\t\tpadding-left:50px;\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-3{\r\n\t\t\tpadding-left:70px;\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-4{\r\n\t\t\tpadding-left:90px;\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-5{\r\n\t\t\tpadding-left:110px;\r\n\t\t}\r\n\r\n\t\t.tabulator-group-toggle{\r\n\t\t\tdisplay: inline-block;\r\n\t\t}\r\n\r\n\t\t//sorting arrow\r\n\t\t.tabulator-arrow{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\twidth: 0;\r\n\t\t\theight: 0;\r\n\t\t\tmargin-right:16px;\r\n\t\t\tborder-top: 6px solid transparent;\r\n\t\t\tborder-bottom: 6px solid transparent;\r\n\t\t\tborder-right: 0;\r\n\t\t\tborder-left: 6px solid $sortArrowActive;\r\n\t\t\tvertical-align:middle;\r\n\t\t}\r\n\r\n\t\tspan{\r\n\t\t\tmargin-left:10px;\r\n\t\t\tcolor:$headerSeperatorColor;\r\n\t\t}\r\n\t}\r\n\r\n}\r\n\r\n.tabulator-menu{\r\n\tposition: absolute;\r\n\tdisplay:inline-block;\r\n\tbox-sizing:border-box;\r\n\r\n\tbackground:$rowBackgroundColor;\r\n\tborder:1px solid $rowBorderColor;\r\n\tbox-shadow: 0 0 5px 0 rgba(0, 0, 0, .2);\r\n\r\n\tfont-size:$textSize;\r\n\r\n\toverflow-y:auto;\r\n\t-webkit-overflow-scrolling: touch;\r\n\r\n\tz-index: 10000;\r\n\r\n\t.tabulator-menu-item{\r\n\r\n\t\tpadding:5px 10px;\r\n\r\n\t\tuser-select: none;\r\n\r\n\t\t&.tabulator-menu-item-disabled{\r\n\t\t\topacity: .5;\r\n\t\t}\r\n\r\n\t\t&:not(.tabulator-menu-item-disabled):hover{\r\n\t\t\tcursor: pointer;\r\n\t\t\tbackground: $rowAltBackgroundColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-menu-separator{\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t}\r\n}\r\n\r\n.tabulator-edit-select-list{\r\n\tposition: absolute;\r\n\tdisplay:inline-block;\r\n\tbox-sizing:border-box;\r\n\r\n\tmax-height:200px;\r\n\r\n\tbackground:$rowBackgroundColor;\r\n\tborder:1px solid $rowBorderColor;\r\n\r\n\tfont-size:$textSize;\r\n\r\n\toverflow-y:auto;\r\n\t-webkit-overflow-scrolling: touch;\r\n\r\n\tz-index: 10000;\r\n\r\n\t.tabulator-edit-select-list-item{\r\n\t\tpadding:4px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\r\n\t\t&.active{\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tbackground:$editBoxColor;\r\n\r\n\t\t\t&.focused{\r\n\t\t\t\toutline:1px solid rgba($rowBackgroundColor, .5);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.focused{\r\n\t\t\toutline:1px solid $editBoxColor;\r\n\t\t}\r\n\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tbackground:$editBoxColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-edit-select-list-notice{\r\n\t\tpadding:4px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\t\ttext-align: center;\r\n\t}\r\n\r\n\t.tabulator-edit-select-list-group{\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\tpadding:4px;\r\n\t\tpadding-top:6px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\t\tfont-weight:bold;\r\n\t}\r\n}\r\n\r\n// Table print styling\r\n\r\n.tabulator-print-fullscreen{\r\n\tposition: absolute;\r\n\ttop:0;\r\n\tbottom:0;\r\n\tleft:0;\r\n\tright:0;\r\n\r\n\tz-index: 10000;\r\n}\r\n\r\nbody.tabulator-print-fullscreen-hide>*:not(.tabulator-print-fullscreen){\r\n\tdisplay:none !important;\r\n}\r\n\r\n.tabulator-print-table{\r\n\tborder-collapse: collapse;\r\n\r\n\t//row grouping element\r\n\t.tabulator-print-table-group{\r\n\t\tbox-sizing:border-box;\r\n\t\tborder-right:1px solid $rowBorderColor;\r\n\t\tborder-top:1px solid #000;\r\n\t\tborder-bottom:2px solid $headerSeperatorColor;\r\n\t\tpadding:5px;\r\n\t\tpadding-left:10px;\r\n\t\tbackground:$headerBackgroundColor;\r\n\t\tcolor:$headerTextColor;\r\n\t\tfont-weight:bold;\r\n\r\n\t\tmin-width: 100%;\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\t\t\tbackground-color:darken($headerBackgroundColor, 10%);\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-visible{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-right:10px;\r\n\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\tborder-bottom: 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-1{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:30px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-2{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:50px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-3{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:70px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-4{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:90px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-5{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:110px !important;\r\n\t\t\t}\r\n\t\t}\r\n\t\t.tabulator-group-toggle{\r\n\t\t\tdisplay: inline-block;\r\n\t\t}\r\n\r\n\t\t//sorting arrow\r\n\t\t.tabulator-arrow{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\twidth: 0;\r\n\t\t\theight: 0;\r\n\t\t\tmargin-right:16px;\r\n\t\t\tborder-top: 6px solid transparent;\r\n\t\t\tborder-bottom: 6px solid transparent;\r\n\t\t\tborder-right: 0;\r\n\t\t\tborder-left: 6px solid $sortArrowActive;\r\n\t\t\tvertical-align:middle;\r\n\t\t}\r\n\r\n\t\tspan{\r\n\t\t\tmargin-left:10px;\r\n\t\t\tcolor:$headerSeperatorColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-data-tree-branch{\r\n\t\tdisplay:inline-block;\r\n\t\tvertical-align:middle;\r\n\r\n\t\theight:9px;\r\n\t\twidth:7px;\r\n\r\n\t\tmargin-top:-9px;\r\n\t\tmargin-right:5px;\r\n\r\n\t\tborder-bottom-left-radius:1px;\r\n\r\n\t\tborder-left:2px solid $rowBorderColor;\r\n\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t}\r\n\r\n\t.tabulator-data-tree-control{\r\n\r\n\t\tdisplay:inline-flex;\r\n\t\tjustify-content:center;\r\n\t\talign-items:center;\r\n\t\tvertical-align:middle;\r\n\r\n\t\theight:11px;\r\n\t\twidth:11px;\r\n\r\n\t\tmargin-right:5px;\r\n\r\n\t\tborder:1px solid $rowTextColor;\r\n\t\tborder-radius:2px;\r\n\t\tbackground:rgba(0, 0, 0, .1);\r\n\r\n\t\toverflow:hidden;\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\t\t\tbackground:rgba(0, 0, 0, .2);\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-control-collapse{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition: relative;\r\n\r\n\t\t\theight: 7px;\r\n\t\t\twidth: 1px;\r\n\r\n\t\t\tbackground: transparent;\r\n\r\n\t\t\t&:after {\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tcontent: \"\";\r\n\t\t\t\tleft: -3px;\r\n\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\theight: 1px;\r\n\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-control-expand{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition: relative;\r\n\r\n\t\t\theight: 7px;\r\n\t\t\twidth: 1px;\r\n\r\n\t\t\tbackground: $rowTextColor;\r\n\r\n\t\t\t&:after {\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tcontent: \"\";\r\n\t\t\t\tleft: -3px;\r\n\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\theight: 1px;\r\n\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n"]} \ No newline at end of file diff --git a/admin/js/vendors/tabulator/css/tabulator_site.min.orig.css b/admin/js/vendors/tabulator/css/tabulator_site.min.orig.css new file mode 100644 index 0000000..2fc522d --- /dev/null +++ b/admin/js/vendors/tabulator/css/tabulator_site.min.orig.css @@ -0,0 +1,3 @@ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ +.tabulator{position:relative;border-bottom:5px solid #222;background-color:#fff;font-size:14px;text-align:left;overflow:hidden;transform:translatez(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableHolder .tabulator-table{min-width:100%}.tabulator[tabulator-layout=fitDataTable]{display:inline-block}.tabulator[tabulator-layout=fitColumns] .tabulator-row .tabulator-cell:last-of-type{border-right:none}.tabulator.tabulator-block-select{-webkit-user-select:none;-ms-user-select:none;user-select:none}.tabulator .tabulator-header{position:relative;box-sizing:border-box;width:100%;border-bottom:3px solid #3fb449;background-color:#222;color:#fff;font-weight:700;white-space:nowrap;overflow:hidden;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-header.tabulator-header-hidden{display:none}.tabulator .tabulator-header .tabulator-col{display:inline-block;position:relative;box-sizing:border-box;border-right:1px solid #aaa;background-color:#222;text-align:left;vertical-align:bottom;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-moving{position:absolute;border:1px solid #3fb449;background:#090909;pointer-events:none}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{box-sizing:border-box;position:relative;padding:8px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button{padding:0 8px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button:hover{cursor:pointer;opacity:.6}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{box-sizing:border-box;width:100%;border:1px solid #999;padding:1px;background:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{display:inline-block;position:absolute;top:14px;right:8px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{position:relative;display:-ms-flexbox;display:flex;border-top:1px solid #aaa;overflow:hidden;margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{position:relative;box-sizing:border-box;margin-top:2px;width:100%;text-align:center}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto!important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear{width:0;height:0}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{cursor:pointer;background-color:#090909}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #3fb449}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-arrow{border-top:6px solid #3fb449;border-bottom:none}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title{-ms-writing-mode:tb-rl;writing-mode:vertical-rl;text-orientation:mixed;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title{transform:rotate(180deg)}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title{padding-right:0;padding-top:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title{padding-right:0;padding-bottom:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow{right:calc(50% - 6px)}.tabulator .tabulator-header .tabulator-frozen{display:inline-block;position:absolute;z-index:10}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #aaa}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #aaa}.tabulator .tabulator-header .tabulator-calcs-holder{box-sizing:border-box;min-width:600%;background:#3c3c3c!important;border-top:1px solid #aaa;overflow:hidden}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{background:#3c3c3c!important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-header .tabulator-frozen-rows-holder{min-width:600%}.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty{display:none}.tabulator .tabulator-tableHolder{position:relative;width:100%;white-space:nowrap;overflow:auto;-webkit-overflow-scrolling:touch}.tabulator .tabulator-tableHolder:focus{outline:none}.tabulator .tabulator-tableHolder .tabulator-placeholder{box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=virtual]{min-height:100%;min-width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder span{display:inline-block;margin:0 auto;padding:10px;color:#3fb449;font-weight:700;font-size:20px}.tabulator .tabulator-tableHolder .tabulator-table{position:relative;display:inline-block;background-color:#fff;white-space:nowrap;overflow:visible;color:#333}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs{font-weight:700;background:#484848!important;color:#fff}.tabulator .tabulator-footer{padding:5px 10px;padding-top:8px;border-top:3px solid #3fb449;background-color:#222;text-align:right;color:#222;font-weight:700;white-space:nowrap;-ms-user-select:none;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-footer .tabulator-calcs-holder{box-sizing:border-box;width:calc(100% + 20px);margin:-8px -10px 8px;text-align:left;background:#3c3c3c!important;border-bottom:1px solid #aaa;overflow:hidden}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{background:#3c3c3c!important;color:#fff!important}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{margin-bottom:-5px;border-bottom:none}.tabulator .tabulator-footer .tabulator-paginator label{color:#fff}.tabulator .tabulator-footer .tabulator-page-size{display:inline-block;margin:0 5px;padding:2px 5px;border:1px solid #aaa;border-radius:3px}.tabulator .tabulator-footer .tabulator-pages{margin:0 7px}.tabulator .tabulator-footer .tabulator-page{display:inline-block;margin:0 2px;padding:2px 5px;border:1px solid #aaa;border-radius:3px;background:#fff;color:#222;font-family:inherit;font-weight:inherit;font-size:inherit}.tabulator .tabulator-footer .tabulator-page.active{color:#3fb449}.tabulator .tabulator-footer .tabulator-page:disabled{opacity:.5}.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover{cursor:pointer;background:rgba(0,0,0,.2);color:#fff}.tabulator .tabulator-col-resize-handle{position:absolute;right:0;top:0;bottom:0;width:5px}.tabulator .tabulator-col-resize-handle.prev{left:0;right:auto}.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}.tabulator .tabulator-loader{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;z-index:100;height:100%;width:100%;background:rgba(0,0,0,.4);text-align:center}.tabulator .tabulator-loader .tabulator-loader-msg{display:inline-block;margin:0 auto;padding:10px 20px;border-radius:10px;background:#fff;font-weight:700;font-size:16px}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading{border:4px solid #333;color:#000}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error{border:4px solid #d00;color:#590000}.tabulator-row{position:relative;box-sizing:border-box;min-height:22px;background-color:#fff}.tabulator-row.tabulator-row-even{background-color:#efefef}.tabulator-row.tabulator-selectable:hover{background-color:#bbb;cursor:pointer}.tabulator-row.tabulator-selected{background-color:#9abcea}.tabulator-row.tabulator-selected:hover{background-color:#769bcc;cursor:pointer}.tabulator-row.tabulator-row-moving{border:1px solid #000;background:#fff}.tabulator-row.tabulator-moving{position:absolute;border-top:1px solid #aaa;border-bottom:1px solid #aaa;pointer-events:none!important;z-index:15}.tabulator-row .tabulator-row-resize-handle{position:absolute;right:0;bottom:0;left:0;height:5px}.tabulator-row .tabulator-row-resize-handle.prev{top:0;bottom:auto}.tabulator-row .tabulator-row-resize-handle:hover{cursor:ns-resize}.tabulator-row .tabulator-frozen{display:inline-block;position:absolute;background-color:inherit;z-index:10}.tabulator-row .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #aaa}.tabulator-row .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #aaa}.tabulator-row .tabulator-responsive-collapse{box-sizing:border-box;padding:5px;border-top:1px solid #aaa;border-bottom:1px solid #aaa}.tabulator-row .tabulator-responsive-collapse:empty{display:none}.tabulator-row .tabulator-responsive-collapse table{font-size:14px}.tabulator-row .tabulator-responsive-collapse table tr td{position:relative}.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type{padding-right:10px}.tabulator-row .tabulator-cell{display:inline-block;position:relative;box-sizing:border-box;padding:6px;border-right:1px solid #aaa;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #1d68cd;padding:0}.tabulator-row .tabulator-cell.tabulator-editing input,.tabulator-row .tabulator-cell.tabulator-editing select{border:1px;background:transparent}.tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #d00}.tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator-row .tabulator-cell.tabulator-validation-fail select{border:1px;background:transparent;color:#d00}.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator-row .tabulator-cell.tabulator-row-handle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{width:100%;height:3px;margin-top:2px;background:#3fb449}.tabulator-row .tabulator-cell .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #aaa;border-bottom:2px solid #aaa}.tabulator-row .tabulator-cell .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #333;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;height:15px;width:15px;border-radius:20px;background:#666;color:#fff;font-weight:700;font-size:1.1em}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover{opacity:.7}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close{display:initial}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open,.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close{display:none}.tabulator-row .tabulator-cell .tabulator-traffic-light{display:inline-block;height:14px;width:14px;border-radius:14px}.tabulator-row.tabulator-group{box-sizing:border-box;border-right:1px solid #aaa;border-top:1px solid #000;border-bottom:2px solid #3fb449;padding:5px;padding-left:10px;background:#222;color:#fff;font-weight:700;min-width:100%}.tabulator-row.tabulator-group:hover{cursor:pointer;background-color:#090909}.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #3fb449;border-bottom:0}.tabulator-row.tabulator-group.tabulator-group-level-1{padding-left:30px}.tabulator-row.tabulator-group.tabulator-group-level-2{padding-left:50px}.tabulator-row.tabulator-group.tabulator-group-level-3{padding-left:70px}.tabulator-row.tabulator-group.tabulator-group-level-4{padding-left:90px}.tabulator-row.tabulator-group.tabulator-group-level-5{padding-left:110px}.tabulator-row.tabulator-group .tabulator-group-toggle{display:inline-block}.tabulator-row.tabulator-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #3fb449;vertical-align:middle}.tabulator-row.tabulator-group span{margin-left:10px;color:#3fb449}.tabulator-menu{position:absolute;display:inline-block;box-sizing:border-box;background:#fff;border:1px solid #aaa;box-shadow:0 0 5px 0 rgba(0,0,0,.2);font-size:14px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:10000}.tabulator-menu .tabulator-menu-item{padding:5px 10px;-webkit-user-select:none;-ms-user-select:none;user-select:none}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-disabled{opacity:.5}.tabulator-menu .tabulator-menu-item:not(.tabulator-menu-item-disabled):hover{cursor:pointer;background:#efefef}.tabulator-menu .tabulator-menu-separator{border-top:1px solid #aaa}.tabulator-edit-select-list{position:absolute;display:inline-block;box-sizing:border-box;max-height:200px;background:#fff;border:1px solid #aaa;font-size:14px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:10000}.tabulator-edit-select-list .tabulator-edit-select-list-item{padding:4px;color:#333}.tabulator-edit-select-list .tabulator-edit-select-list-item.active{color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-item.active.focused{outline:1px solid hsla(0,0%,100%,.5)}.tabulator-edit-select-list .tabulator-edit-select-list-item.focused{outline:1px solid #1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-item:hover{cursor:pointer;color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-notice{padding:4px;color:#333;text-align:center}.tabulator-edit-select-list .tabulator-edit-select-list-group{border-bottom:1px solid #aaa;padding:4px;padding-top:6px;color:#333;font-weight:700}.tabulator-print-fullscreen{position:absolute;top:0;bottom:0;left:0;right:0;z-index:10000}body.tabulator-print-fullscreen-hide>:not(.tabulator-print-fullscreen){display:none!important}.tabulator-print-table{border-collapse:collapse}.tabulator-print-table .tabulator-print-table-group{box-sizing:border-box;border-right:1px solid #aaa;border-top:1px solid #000;border-bottom:2px solid #3fb449;padding:5px;padding-left:10px;background:#222;color:#fff;font-weight:700;min-width:100%}.tabulator-print-table .tabulator-print-table-group:hover{cursor:pointer;background-color:#090909}.tabulator-print-table .tabulator-print-table-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #3fb449;border-bottom:0}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-1 td{padding-left:30px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-2 td{padding-left:50px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-3 td{padding-left:70px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-4 td{padding-left:90px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-5 td{padding-left:110px!important}.tabulator-print-table .tabulator-print-table-group .tabulator-group-toggle{display:inline-block}.tabulator-print-table .tabulator-print-table-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #3fb449;vertical-align:middle}.tabulator-print-table .tabulator-print-table-group span{margin-left:10px;color:#3fb449}.tabulator-print-table .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #aaa;border-bottom:2px solid #aaa}.tabulator-print-table .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #333;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-print-table .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#333}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333} +/*# sourceMappingURL=tabulator_site.min.css.map */ diff --git a/website/js/vendor/tabulator/js/modules/accessor.js b/admin/js/vendors/tabulator/js/modules/accessor.js similarity index 77% rename from website/js/vendor/tabulator/js/modules/accessor.js rename to admin/js/vendors/tabulator/js/modules/accessor.js index 192c6de..8ffe1bf 100644 --- a/website/js/vendor/tabulator/js/modules/accessor.js +++ b/admin/js/vendors/tabulator/js/modules/accessor.js @@ -1,6 +1,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; -/* Tabulator v4.8.3 (c) Oliver Folkerd */ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ var Accessor = function Accessor(table) { this.table = table; //hold Tabulator object @@ -58,15 +58,15 @@ Accessor.prototype.lookupAccessor = function (value) { }; //apply accessor to row -Accessor.prototype.transformRow = function (row, type) { - var key = "accessor" + (type.charAt(0).toUpperCase() + type.slice(1)), - rowComponent = row.getComponent(); +Accessor.prototype.transformRow = function (dataIn, type) { + var self = this, + key = "accessor" + (type.charAt(0).toUpperCase() + type.slice(1)); //clone data object with deep copy to isolate internal data from returned result - var data = Tabulator.prototype.helpers.deepClone(row.data || {}); + var data = Tabulator.prototype.helpers.deepClone(dataIn || {}); - this.table.columnManager.traverse(function (column) { - var value, accessor, params, colCompnent; + self.table.columnManager.traverse(function (column) { + var value, accessor, params, component; if (column.modules.accessor) { @@ -76,9 +76,9 @@ Accessor.prototype.transformRow = function (row, type) { value = column.getFieldValue(data); if (value != "undefined") { - colCompnent = column.getComponent(); - params = typeof accessor.params === "function" ? accessor.params(value, data, type, colCompnent, rowComponent) : accessor.params; - column.setFieldValue(data, accessor.accessor(value, data, type, params, colCompnent, rowComponent)); + component = column.getComponent(); + params = typeof accessor.params === "function" ? accessor.params(value, data, type, component) : accessor.params; + column.setFieldValue(data, accessor.accessor(value, data, type, params, component)); } } } diff --git a/admin/js/vendors/tabulator/js/modules/accessor.min.js b/admin/js/vendors/tabulator/js/modules/accessor.min.js new file mode 100644 index 0000000..2633b8f --- /dev/null +++ b/admin/js/vendors/tabulator/js/modules/accessor.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ +var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Accessor=function(o){this.table=o,this.allowedTypes=["","data","download","clipboard","print","htmlOutput"]};Accessor.prototype.initializeColumn=function(o){var e=this,s=!1,r={};this.allowedTypes.forEach(function(t){var c,a="accessor"+(t.charAt(0).toUpperCase()+t.slice(1));o.definition[a]&&(c=e.lookupAccessor(o.definition[a]))&&(s=!0,r[a]={accessor:c,params:o.definition[a+"Params"]||{}})}),s&&(o.modules.accessor=r)},Accessor.prototype.lookupAccessor=function(o){var e=!1;switch(void 0===o?"undefined":_typeof(o)){case"string":this.accessors[o]?e=this.accessors[o]:console.warn("Accessor Error - No such accessor found, ignoring: ",o);break;case"function":e=o}return e},Accessor.prototype.transformRow=function(o,e){var s=this,r="accessor"+(e.charAt(0).toUpperCase()+e.slice(1)),t=Tabulator.prototype.helpers.deepClone(o||{});return s.table.columnManager.traverse(function(o){var s,c,a,n;o.modules.accessor&&(c=o.modules.accessor[r]||o.modules.accessor.accessor||!1)&&"undefined"!=(s=o.getFieldValue(t))&&(n=o.getComponent(),a="function"==typeof c.params?c.params(s,t,e,n):c.params,o.setFieldValue(t,c.accessor(s,t,e,a,n)))}),t},Accessor.prototype.accessors={},Tabulator.prototype.registerModule("accessor",Accessor); \ No newline at end of file diff --git a/website/js/vendor/tabulator/js/modules/ajax.js b/admin/js/vendors/tabulator/js/modules/ajax.js similarity index 99% rename from website/js/vendor/tabulator/js/modules/ajax.js rename to admin/js/vendors/tabulator/js/modules/ajax.js index d81cbb6..7d72604 100644 --- a/website/js/vendor/tabulator/js/modules/ajax.js +++ b/admin/js/vendors/tabulator/js/modules/ajax.js @@ -1,6 +1,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; -/* Tabulator v4.8.3 (c) Oliver Folkerd */ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ var Ajax = function Ajax(table) { diff --git a/website/js/vendor/tabulator/js/modules/ajax.min.js b/admin/js/vendors/tabulator/js/modules/ajax.min.js similarity index 99% rename from website/js/vendor/tabulator/js/modules/ajax.min.js rename to admin/js/vendors/tabulator/js/modules/ajax.min.js index 8a3f0c7..a5dae29 100644 --- a/website/js/vendor/tabulator/js/modules/ajax.min.js +++ b/admin/js/vendors/tabulator/js/modules/ajax.min.js @@ -1,2 +1,2 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ajax=function(e){this.table=e,this.config=!1,this.url="",this.urlGenerator=!1,this.params=!1,this.loaderElement=this.createLoaderElement(),this.msgElement=this.createMsgElement(),this.loadingElement=!1,this.errorElement=!1,this.loaderPromise=!1,this.progressiveLoad=!1,this.loading=!1,this.requestOrder=0};Ajax.prototype.initialize=function(){var e;this.loaderElement.appendChild(this.msgElement),this.table.options.ajaxLoaderLoading&&("string"==typeof this.table.options.ajaxLoaderLoading?(e=document.createElement("template"),e.innerHTML=this.table.options.ajaxLoaderLoading.trim(),this.loadingElement=e.content.firstChild):this.loadingElement=this.table.options.ajaxLoaderLoading),this.loaderPromise=this.table.options.ajaxRequestFunc||this.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||this.defaultURLGenerator,this.table.options.ajaxLoaderError&&("string"==typeof this.table.options.ajaxLoaderError?(e=document.createElement("template"),e.innerHTML=this.table.options.ajaxLoaderError.trim(),this.errorElement=e.content.firstChild):this.errorElement=this.table.options.ajaxLoaderError),this.table.options.ajaxParams&&this.setParams(this.table.options.ajaxParams),this.table.options.ajaxConfig&&this.setConfig(this.table.options.ajaxConfig),this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL),this.table.options.ajaxProgressiveLoad&&(this.table.options.pagination?(this.progressiveLoad=!1,console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time")):this.table.modExists("page")?(this.progressiveLoad=this.table.options.ajaxProgressiveLoad,this.table.modules.page.initializeProgressive(this.progressiveLoad)):console.error("Pagination plugin is required for progressive ajax loading"))},Ajax.prototype.createLoaderElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-loader"),e},Ajax.prototype.createMsgElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-loader-msg"),e.setAttribute("role","alert"),e},Ajax.prototype.setParams=function(e,t){if(t){this.params=this.params||{};for(var o in e)this.params[o]=e[o]}else this.params=e},Ajax.prototype.getParams=function(){return this.params||{}},Ajax.prototype.setConfig=function(e){if(this._loadDefaultConfig(),"string"==typeof e)this.config.method=e;else for(var t in e)this.config[t]=e[t]},Ajax.prototype._loadDefaultConfig=function(e){var t=this;if(!t.config||e){t.config={};for(var o in t.defaultConfig)t.config[o]=t.defaultConfig[o]}},Ajax.prototype.setUrl=function(e){this.url=e},Ajax.prototype.getUrl=function(){return this.url},Ajax.prototype.loadData=function(e,t){return this.progressiveLoad?this._loadDataProgressive():this._loadDataStandard(e,t)},Ajax.prototype.nextPage=function(e){var t;this.loading||(t=this.table.options.ajaxProgressiveLoadScrollMargin||2*this.table.rowManager.getElement().clientHeight,el||null===l)&&(l=t)}),null!==l?!1!==i?l.toFixed(i):l:""},min:function(t,o,e){var l=null,i=void 0!==e.precision&&e.precision;return t.forEach(function(t){((t=Number(t))"),a.dataTreeExpandElement?"string"==typeof a.dataTreeExpandElement?(e=document.createElement("div"),e.innerHTML=a.dataTreeExpandElement,this.expandEl=e.firstChild):this.expandEl=a.dataTreeExpandElement:(this.expandEl=document.createElement("div"),this.expandEl.classList.add("tabulator-data-tree-control"),this.expandEl.tabIndex=0,this.expandEl.innerHTML="
"),_typeof(a.dataTreeStartExpanded)){case"boolean":this.startOpen=function(e,t){return a.dataTreeStartExpanded};break;case"function":this.startOpen=a.dataTreeStartExpanded;break;default:this.startOpen=function(e,t){return a.dataTreeStartExpanded[t]}}},DataTree.prototype.initializeRow=function(e){var t=e.getData()[this.field],a=Array.isArray(t),n=a||!a&&"object"===(void 0===t?"undefined":_typeof(t))&&null!==t;!n&&e.modules.dataTree&&e.modules.dataTree.branchEl&&e.modules.dataTree.branchEl.parentNode.removeChild(e.modules.dataTree.branchEl),!n&&e.modules.dataTree&&e.modules.dataTree.controlEl&&e.modules.dataTree.controlEl.parentNode.removeChild(e.modules.dataTree.controlEl),e.modules.dataTree={index:e.modules.dataTree?e.modules.dataTree.index:0,open:!!n&&(e.modules.dataTree?e.modules.dataTree.open:this.startOpen(e.getComponent(),0)),controlEl:!(!e.modules.dataTree||!n)&&e.modules.dataTree.controlEl,branchEl:!(!e.modules.dataTree||!n)&&e.modules.dataTree.branchEl,parent:!!e.modules.dataTree&&e.modules.dataTree.parent,children:n}},DataTree.prototype.layoutRow=function(e){var t=this.elementField?e.getCell(this.elementField):e.getCells()[0],a=t.getElement(),n=e.modules.dataTree;n.branchEl&&(n.branchEl.parentNode&&n.branchEl.parentNode.removeChild(n.branchEl),n.branchEl=!1),n.controlEl&&(n.controlEl.parentNode&&n.controlEl.parentNode.removeChild(n.controlEl),n.controlEl=!1),this.generateControlElement(e,a),e.element.classList.add("tabulator-tree-level-"+n.index),n.index&&(this.branchEl?(n.branchEl=this.branchEl.cloneNode(!0),a.insertBefore(n.branchEl,a.firstChild),n.branchEl.style.marginLeft=(n.branchEl.offsetWidth+n.branchEl.style.marginRight)*(n.index-1)+n.index*this.indent+"px"):a.style.paddingLeft=parseInt(window.getComputedStyle(a,null).getPropertyValue("padding-left"))+n.index*this.indent+"px")},DataTree.prototype.generateControlElement=function(e,t){var a=this,n=e.modules.dataTree,t=t||e.getCells()[0].getElement(),r=n.controlEl;!1!==n.children&&(n.open?(n.controlEl=this.collapseEl.cloneNode(!0),n.controlEl.addEventListener("click",function(t){t.stopPropagation(),a.collapseRow(e)})):(n.controlEl=this.expandEl.cloneNode(!0),n.controlEl.addEventListener("click",function(t){t.stopPropagation(),a.expandRow(e)})),n.controlEl.addEventListener("mousedown",function(e){e.stopPropagation()}),r&&r.parentNode===t?r.parentNode.replaceChild(n.controlEl,r):t.insertBefore(n.controlEl,t.firstChild))},DataTree.prototype.setDisplayIndex=function(e){this.displayIndex=e},DataTree.prototype.getDisplayIndex=function(){return this.displayIndex},DataTree.prototype.getRows=function(e){var t=this,a=[];return e.forEach(function(e,n){var r,l;a.push(e),e instanceof Row&&(r=e.modules.dataTree.children,r.index||!1===r.children||(l=t.getChildren(e),l.forEach(function(e){a.push(e)})))}),a},DataTree.prototype.getChildren=function(e){var t=this,a=e.modules.dataTree,n=[],r=[];return!1!==a.children&&a.open&&(Array.isArray(a.children)||(a.children=this.generateChildren(e)),n=this.table.modExists("filter")?this.table.modules.filter.filter(a.children):a.children,this.table.modExists("sort")&&this.table.modules.sort.sort(n),n.forEach(function(e){r.push(e),t.getChildren(e).forEach(function(e){r.push(e)})})),r},DataTree.prototype.generateChildren=function(e){var t=this,a=[],n=e.getData()[this.field];return Array.isArray(n)||(n=[n]),n.forEach(function(n){var r=new Row(n||{},t.table.rowManager);r.modules.dataTree.index=e.modules.dataTree.index+1,r.modules.dataTree.parent=e,r.modules.dataTree.children&&(r.modules.dataTree.open=t.startOpen(r.getComponent(),r.modules.dataTree.index)),a.push(r)}),a},DataTree.prototype.expandRow=function(e,t){var a=e.modules.dataTree;!1!==a.children&&(a.open=!0,e.reinitialize(),this.table.rowManager.refreshActiveData("tree",!1,!0),this.table.options.dataTreeRowExpanded(e.getComponent(),e.modules.dataTree.index))},DataTree.prototype.collapseRow=function(e){var t=e.modules.dataTree;!1!==t.children&&(t.open=!1,e.reinitialize(),this.table.rowManager.refreshActiveData("tree",!1,!0),this.table.options.dataTreeRowCollapsed(e.getComponent(),e.modules.dataTree.index))},DataTree.prototype.toggleRow=function(e){var t=e.modules.dataTree;!1!==t.children&&(t.open?this.collapseRow(e):this.expandRow(e))},DataTree.prototype.getTreeParent=function(e){return!!e.modules.dataTree.parent&&e.modules.dataTree.parent.getComponent()},DataTree.prototype.getFilteredTreeChildren=function(e){var t,a=e.modules.dataTree,n=[];return a.children&&(Array.isArray(a.children)||(a.children=this.generateChildren(e)),t=this.table.modExists("filter")?this.table.modules.filter.filter(a.children):a.children,t.forEach(function(e){e instanceof Row&&n.push(e)})),n},DataTree.prototype.rowDelete=function(e){var t,a=e.modules.dataTree.parent;a&&(t=this.findChildIndex(e,a),!1!==t&&a.data[this.field].splice(t,1),a.data[this.field].length||delete a.data[this.field],this.initializeRow(a),this.layoutRow(a)),this.table.rowManager.refreshActiveData("tree",!1,!0)},DataTree.prototype.addTreeChildRow=function(e,t,a,n){var r=!1;"string"==typeof t&&(t=JSON.parse(t)),Array.isArray(e.data[this.field])||(e.data[this.field]=[],e.modules.dataTree.open=this.startOpen(e.getComponent(),e.modules.dataTree.index)),void 0!==n&&!1!==(r=this.findChildIndex(n,e))&&e.data[this.field].splice(a?r:r+1,0,t),!1===r&&(a?e.data[this.field].unshift(t):e.data[this.field].push(t)),this.initializeRow(e),this.layoutRow(e),this.table.rowManager.refreshActiveData("tree",!1,!0)},DataTree.prototype.findChildIndex=function(e,t){var a=this,n=!1;return"object"==(void 0===e?"undefined":_typeof(e))?e instanceof Row?n=e.data:e instanceof RowComponent?n=e._getSelf().data:"undefined"!=typeof HTMLElement&&e instanceof HTMLElement&&t.modules.dataTree&&(n=t.modules.dataTree.children.find(function(t){return t instanceof Row&&t.element===e}))&&(n=n.data):n=void 0!==e&&null!==e&&t.data[this.field].find(function(t){return t.data[a.table.options.index]==e}),n&&(Array.isArray(t.data[this.field])&&(n=t.data[this.field].indexOf(n)),-1==n&&(n=!1)),n},DataTree.prototype.getTreeChildren=function(e){var t=e.modules.dataTree,a=[];return t.children&&(Array.isArray(t.children)||(t.children=this.generateChildren(e)),t.children.forEach(function(e){e instanceof Row&&a.push(e.getComponent())})),a},DataTree.prototype.checkForRestyle=function(e){e.row.cells.indexOf(e)||e.row.reinitialize()},DataTree.prototype.getChildField=function(){return this.field},DataTree.prototype.redrawNeeded=function(e){return!!this.field&&void 0!==e[this.field]||!!this.elementField&&void 0!==e[this.elementField]},Tabulator.prototype.registerModule("dataTree",DataTree); \ No newline at end of file diff --git a/website/js/vendor/tabulator/js/modules/download.js b/admin/js/vendors/tabulator/js/modules/download.js similarity index 96% rename from website/js/vendor/tabulator/js/modules/download.js rename to admin/js/vendors/tabulator/js/modules/download.js index ddaec41..9954910 100644 --- a/website/js/vendor/tabulator/js/modules/download.js +++ b/admin/js/vendors/tabulator/js/modules/download.js @@ -1,6 +1,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; -/* Tabulator v4.8.3 (c) Oliver Folkerd */ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ var Download = function Download(table) { this.table = table; //hold Tabulator object @@ -131,7 +131,7 @@ Download.prototype.downloaders = { case "header": row.columns.forEach(function (col, i) { if (col && col.depth === 1) { - headers[i] = typeof col.value == "undefined" || col.value === null ? "" : '"' + String(col.value).split('"').join('""') + '"'; + headers[i] = typeof col.value == "undefined" || typeof col.value == "null" ? "" : col.value; } }); break; @@ -162,7 +162,7 @@ Download.prototype.downloaders = { }); if (headers.length) { - fileContents.unshift(headers.join(delimiter)); + fileContents = [headers].concat(fileContents); } fileContents = fileContents.join("\n"); @@ -389,7 +389,7 @@ Download.prototype.downloaders = { workbook.SheetNames.push(sheet); - this.modules.comms.send(options.sheets[sheet], "download", "intercept", { + this.table.modules.comms.send(options.sheets[sheet], "download", "intercept", { type: "xlsx", options: { sheetOnly: true }, active: self.active, diff --git a/admin/js/vendors/tabulator/js/modules/download.min.js b/admin/js/vendors/tabulator/js/modules/download.min.js new file mode 100644 index 0000000..b3b776c --- /dev/null +++ b/admin/js/vendors/tabulator/js/modules/download.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ +var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Download=function(e){this.table=e};Download.prototype.download=function(e,o,t,n,a){function r(t,n){a?!0===a?l.triggerDownload(t,n,e,o,!0):a(t):l.triggerDownload(t,n,e,o)}var l=this,s=!1;if("function"==typeof e?s=e:l.downloaders[e]?s=l.downloaders[e]:console.warn("Download Error - No such download type found: ",e),s){var i=this.generateExportList(n);s.call(this.table,i,t||{},r)}},Download.prototype.generateExportList=function(e){var o=this.table.modules.export.generateExportList(this.table.options.downloadConfig,!1,e||this.table.options.downloadRowRange,"download"),t=this.table.options.groupHeaderDownload;return t&&!Array.isArray(t)&&(t=[t]),o.forEach(function(e){var o;"group"===e.type&&(o=e.columns[0],t&&t[e.indent]&&(o.value=t[e.indent](o.value,e.component._group.getRowCount(),e.component._group.getData(),e.component)))}),o},Download.prototype.triggerDownload=function(e,o,t,n,a){var r=document.createElement("a"),l=new Blob([e],{type:o}),n=n||"Tabulator."+("function"==typeof t?"txt":t);(l=this.table.options.downloadReady.call(this.table,e,l))&&(a?window.open(window.URL.createObjectURL(l)):navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(l,n):(r.setAttribute("href",window.URL.createObjectURL(l)),r.setAttribute("download",n),r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r)),this.table.options.downloadComplete&&this.table.options.downloadComplete())},Download.prototype.commsReceived=function(e,o,t){switch(o){case"intercept":this.download(t.type,"",t.options,t.active,t.intercept)}},Download.prototype.downloaders={csv:function(e,o,t){var n=o&&o.delimiter?o.delimiter:",",a=[],r=[];e.forEach(function(e){var o=[];switch(e.type){case"group":console.warn("Download Warning - CSV downloader cannot process row groups");break;case"calc":console.warn("Download Warning - CSV downloader cannot process column calculations");break;case"header":e.columns.forEach(function(e,o){e&&1===e.depth&&(r[o]=void 0===e.value||"null"==typeof e.value?"":e.value)});break;case"row":e.columns.forEach(function(e){if(e){switch(_typeof(e.value)){case"object":e.value=JSON.stringify(e.value);break;case"undefined":case"null":e.value=""}o.push('"'+String(e.value).split('"').join('""')+'"')}}),a.push(o.join(n))}}),r.length&&(a=[r].concat(a)),a=a.join("\n"),o.bom&&(a="\ufeff"+a),t(a,"text/csv")},json:function(e,o,t){var n=[];e.forEach(function(e){var o={};switch(e.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":e.columns.forEach(function(e){e&&(o[e.component.getField()]=e.value)}),n.push(o)}}),n=JSON.stringify(n,null,"\t"),t(n,"application/json")},pdf:function(e,o,t){function n(e,o){var t=[];return e.columns.forEach(function(e){var n;if(e){switch(_typeof(e.value)){case"object":e.value=JSON.stringify(e.value);break;case"undefined":case"null":e.value=""}n={content:e.value,colSpan:e.width,rowSpan:e.height},o&&(n.styles=o),t.push(n)}else t.push("")}),t}var a=[],r=[],l={},s=o.rowGroupStyles||{fontStyle:"bold",fontSize:12,cellPadding:6,fillColor:220},i=o.rowCalcStyles||{fontStyle:"bold",fontSize:10,cellPadding:4,fillColor:232},c=o.jsPDF||{},u=o&&o.title?o.title:"";c.orientation||(c.orientation=o.orientation||"landscape"),c.unit||(c.unit="pt"),e.forEach(function(e){switch(e.type){case"header":a.push(n(e));break;case"group":r.push(n(e,s));break;case"calc":r.push(n(e,i));break;case"row":r.push(n(e))}});var d=new jsPDF(c);o&&o.autoTable&&(l="function"==typeof o.autoTable?o.autoTable(d)||{}:o.autoTable),u&&(l.addPageContent=function(e){d.text(u,40,30)}),l.head=a,l.body=r,d.autoTable(l),o&&o.documentProcessing&&o.documentProcessing(d),t(d.output("arraybuffer"),"application/pdf")},xlsx:function(e,o,t){function n(){var o=[],t=[],n={},a={s:{c:0,r:0},e:{c:e[0]?e[0].columns.reduce(function(e,o){return e+(o&&o.width?o.width:1)},0):0,r:e.length}};return e.forEach(function(e,n){var a=[];e.columns.forEach(function(e,o){e?(a.push(e.value instanceof Date||"object"!==_typeof(e.value)?e.value:JSON.stringify(e.value)),(e.width>1||e.height>-1)&&t.push({s:{r:n,c:o},e:{r:n+e.height-1,c:o+e.width-1}})):a.push("")}),o.push(a)}),XLSX.utils.sheet_add_aoa(n,o),n["!ref"]=XLSX.utils.encode_range(a),t.length&&(n["!merges"]=t),n}var a,r=this,l=o.sheetName||"Sheet1",s=XLSX.utils.book_new();if(s.SheetNames=[],s.Sheets={},o.sheetOnly)return void t(n());if(o.sheets)for(var i in o.sheets)!0===o.sheets[i]?(s.SheetNames.push(i),s.Sheets[i]=n()):(s.SheetNames.push(i),this.table.modules.comms.send(o.sheets[i],"download","intercept",{type:"xlsx",options:{sheetOnly:!0},active:r.active,intercept:function(e){s.Sheets[i]=e}}));else s.SheetNames.push(l),s.Sheets[l]=n();o.documentProcessing&&(s=o.documentProcessing(s)),a=XLSX.write(s,{bookType:"xlsx",bookSST:!0,type:"binary"}),t(function(e){for(var o=new ArrayBuffer(e.length),t=new Uint8Array(o),n=0;n!=e.length;++n)t[n]=255&e.charCodeAt(n);return o}(a),"application/octet-stream")},html:function(e,o,t){this.modExists("export",!0)&&t(this.modules.export.genereateHTMLTable(e),"text/html")}},Tabulator.prototype.registerModule("download",Download); \ No newline at end of file diff --git a/website/js/vendor/tabulator/js/modules/edit.js b/admin/js/vendors/tabulator/js/modules/edit.js similarity index 93% rename from website/js/vendor/tabulator/js/modules/edit.js rename to admin/js/vendors/tabulator/js/modules/edit.js index 16240be..e35dd84 100644 --- a/website/js/vendor/tabulator/js/modules/edit.js +++ b/admin/js/vendors/tabulator/js/modules/edit.js @@ -1,6 +1,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; -/* Tabulator v4.8.3 (c) Oliver Folkerd */ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ var Edit = function Edit(table) { this.table = table; //hold Tabulator object @@ -107,10 +107,6 @@ Edit.prototype.cancelEdit = function () { cell.setValueActual(cell.getValue()); cell.cellRendered(); - if (cell.column.definition.editor == "textarea" || cell.column.definition.variableHeight) { - cell.row.normalizeHeight(true); - } - if (cell.column.cellEvents.cellEditCancelled) { cell.column.cellEvents.cellEditCancelled.call(this.table, component); } @@ -133,11 +129,7 @@ Edit.prototype.bindEditor = function (cell) { }); element.addEventListener("mousedown", function (e) { - if (e.button === 2) { - e.preventDefault(); - } else { - self.mouseClick = true; - } + self.mouseClick = true; }); element.addEventListener("focus", function (e) { @@ -174,24 +166,6 @@ Edit.prototype.focusScrollAdjust = function (cell) { this.table.rowManager.element.scrollTop += rowEl.offsetTop + rowEl.offsetHeight - bottomEdge; } } - - var leftEdge = this.table.rowManager.element.scrollLeft, - rightEdge = this.table.rowManager.element.clientWidth + this.table.rowManager.element.scrollLeft, - cellEl = cell.getElement(), - offset = cellEl.offsetLeft; - - if (this.table.modExists("frozenColumns")) { - leftEdge += parseInt(this.table.modules.frozenColumns.leftMargin); - rightEdge -= parseInt(this.table.modules.frozenColumns.rightMargin); - } - - if (cellEl.offsetLeft < leftEdge) { - this.table.rowManager.element.scrollLeft -= leftEdge - cellEl.offsetLeft; - } else { - if (cellEl.offsetLeft + cellEl.offsetWidth > rightEdge) { - this.table.rowManager.element.scrollLeft += cellEl.offsetLeft + cellEl.offsetWidth - rightEdge; - } - } } }; @@ -223,6 +197,7 @@ Edit.prototype.edit = function (cell, e, forceEdit) { if (valid === true || self.table.options.validationMode === "highlight") { self.clearEditor(); + cell.setValue(value, true); if (!cell.modules.edit) { cell.modules.edit = {}; @@ -234,15 +209,12 @@ Edit.prototype.edit = function (cell, e, forceEdit) { self.editedCells.push(cell); } - cell.setValue(value, true); - if (self.table.options.dataTree && self.table.modExists("dataTree")) { self.table.modules.dataTree.checkForRestyle(cell); } if (valid !== true) { element.classList.add("tabulator-validation-fail"); - self.table.options.validationFailed.call(self.table, cell.getComponent(), value, valid); return false; } @@ -460,17 +432,13 @@ Edit.prototype.clearEdited = function (cell) { var editIndex; if (cell.modules.edit && cell.modules.edit.edited) { - cell.modules.edit.edited = false; + cell.modules.validate.invalid = false; - if (cell.modules.validate) { - cell.modules.validate.invalid = false; - } - } + editIndex = this.editedCells.indexOf(cell); - editIndex = this.editedCells.indexOf(cell); - - if (editIndex > -1) { - this.editedCells.splice(editIndex, 1); + if (editIndex > -1) { + this.editedCells.splice(editIndex, 1); + } } }; @@ -533,11 +501,6 @@ Edit.prototype.editors = { case 27: cancel(); break; - - case 35: - case 36: - e.stopPropagation(); - break; } }); @@ -583,10 +546,6 @@ Edit.prototype.editors = { onRendered(function () { input.focus({ preventScroll: true }); input.style.height = "100%"; - - input.scrollHeight; - input.style.height = input.scrollHeight + "px"; - cell.getRow().normalizeHeight(); }); function onChange(e) { @@ -646,11 +605,6 @@ Edit.prototype.editors = { e.stopPropagation(); } break; - - case 35: - case 36: - e.stopPropagation(); - break; } }); @@ -751,11 +705,6 @@ Edit.prototype.editors = { e.stopPropagation(); } break; - - case 35: - case 36: - e.stopPropagation(); - break; } }); @@ -849,13 +798,11 @@ Edit.prototype.editors = { //select select: function select(cell, onRendered, success, cancel, editorParams) { - var _this = this; - var self = this, cellEl = cell.getElement(), initialValue = cell.getValue(), vertNav = editorParams.verticalNavigation || "editor", - initialDisplayValue = typeof initialValue !== "undefined" || initialValue === null ? Array.isArray(initialValue) ? initialValue : [initialValue] : typeof editorParams.defaultValue !== "undefined" ? editorParams.defaultValue : [], + initialDisplayValue = typeof initialValue !== "undefined" || initialValue === null ? initialValue : typeof editorParams.defaultValue !== "undefined" ? editorParams.defaultValue : [], input = document.createElement("input"), listEl = document.createElement("div"), multiselect = editorParams.multiselect, @@ -863,8 +810,9 @@ Edit.prototype.editors = { currentItem = {}, displayItems = [], currentItems = [], - blurable = true, - blockListShow = false; + blurable = true; + + this.table.rowManager.element.addEventListener("scroll", cancelItem); if (Array.isArray(editorParams) || !Array.isArray(editorParams) && (typeof editorParams === "undefined" ? "undefined" : _typeof(editorParams)) === "object" && !editorParams.values) { console.warn("DEPRECATION WARNING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object"); @@ -1028,12 +976,6 @@ Edit.prototype.editors = { el.innerHTML = item.label === "" ? " " : item.label; el.addEventListener("click", function () { - blockListShow = true; - - setTimeout(function () { - blockListShow = false; - }, 10); - // setCurrentItem(item); // chooseItem(); if (multiselect) { @@ -1096,10 +1038,6 @@ Edit.prototype.editors = { item.element.classList.add("active"); } } - - if (item && item.element && item.element.scrollIntoView) { - item.element.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' }); - } } // function chooseItem(){ @@ -1163,17 +1101,12 @@ Edit.prototype.editors = { } if (item) { - input.value = item.label; success(item.value); } - - initialDisplayValue = input.value; } - function chooseItems(silent) { - if (!silent) { - hideList(); - } + function chooseItems() { + hideList(); var output = []; @@ -1181,8 +1114,6 @@ Edit.prototype.editors = { output.push(item.value); }); - initialDisplayValue = input.value; - success(output); } @@ -1194,19 +1125,6 @@ Edit.prototype.editors = { }); input.value = output.join(", "); - - if (self.currentCell === false) { - chooseItems(true); - } - } - - function unsetItems() { - - var len = currentItems.length; - - for (var i = 0; i < len; i++) { - unsetItem(0); - } } function cancelItem() { @@ -1215,9 +1133,8 @@ Edit.prototype.editors = { } function showList() { - currentItems = []; - if (!listEl.parentNode) { + if (editorParams.values === true) { parseItems(getUniqueColumnValues(), initialDisplayValue); } else if (typeof editorParams.values === "string") { @@ -1287,13 +1204,6 @@ Edit.prototype.editors = { // parseItems(editorParams.values || [], initialValue); // } - input.addEventListener("search", function (e) { - if (!input.value) { - unsetItems(); - chooseItems(); - } - }); - //allow key based navigation input.addEventListener("keydown", function (e) { var index; @@ -1357,15 +1267,6 @@ Edit.prototype.editors = { //escape cancelItem(); break; - - case 9: - //tab - break; - - default: - if (self.currentCell === false) { - e.preventDefault(); - } } }); @@ -1380,9 +1281,7 @@ Edit.prototype.editors = { }); input.addEventListener("focus", function (e) { - if (!blockListShow) { - showList(); - } + showList(); }); //style list element @@ -1394,17 +1293,11 @@ Edit.prototype.editors = { input.focus({ preventScroll: true }); }); - setTimeout(function () { - _this.table.rowManager.element.addEventListener("scroll", cancelItem); - }, 10); - return input; }, //autocomplete autocomplete: function autocomplete(cell, onRendered, success, cancel, editorParams) { - var _this2 = this; - var self = this, cellEl = cell.getElement(), initialValue = cell.getValue(), @@ -1419,6 +1312,8 @@ Edit.prototype.editors = { blurable = true, uniqueColumnValues = false; + this.table.rowManager.element.addEventListener("scroll", cancelItem); + //style input input.setAttribute("type", "search"); @@ -1709,10 +1604,6 @@ Edit.prototype.editors = { if (item && item.element) { item.element.classList.add("active"); } - - if (item && item.element && item.element.scrollIntoView) { - item.element.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' }); - } } function hideList() { @@ -1846,14 +1737,6 @@ Edit.prototype.editors = { this.table.modules.edit.maskInput(input, editorParams); } - setTimeout(function () { - _this2.table.rowManager.element.addEventListener("scroll", cancelItem); - }, 10); - - genUniqueColumnValues(); - input.value = initialDisplayValue; - filterList(initialDisplayValue, true); - return input; }, @@ -2176,10 +2059,6 @@ Edit.prototype.editors = { input.checked = value === true || value === "true" || value === "True" || value === 1; - onRendered(function () { - input.focus(); - }); - function setValue(blur) { if (tristate) { if (!blur) { diff --git a/admin/js/vendors/tabulator/js/modules/edit.min.js b/admin/js/vendors/tabulator/js/modules/edit.min.js new file mode 100644 index 0000000..8e256be --- /dev/null +++ b/admin/js/vendors/tabulator/js/modules/edit.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ +var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Edit=function(e){this.table=e,this.currentCell=!1,this.mouseClick=!1,this.recursionBlock=!1,this.invalidEdit=!1,this.editedCells=[]};Edit.prototype.initializeColumn=function(e){var t=this,i={editor:!1,blocked:!1,check:e.definition.editable,params:e.definition.editorParams||{}};switch(_typeof(e.definition.editor)){case"string":"tick"===e.definition.editor&&(e.definition.editor="tickCross",console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor")),t.editors[e.definition.editor]?i.editor=t.editors[e.definition.editor]:console.warn("Editor Error - No such editor found: ",e.definition.editor);break;case"function":i.editor=e.definition.editor;break;case"boolean":!0===e.definition.editor&&("function"!=typeof e.definition.formatter?("tick"===e.definition.formatter&&(e.definition.formatter="tickCross",console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor")),t.editors[e.definition.formatter]?i.editor=t.editors[e.definition.formatter]:i.editor=t.editors.input):console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ",e.definition.formatter))}i.editor&&(e.modules.edit=i)},Edit.prototype.getCurrentCell=function(){return!!this.currentCell&&this.currentCell.getComponent()},Edit.prototype.clearEditor=function(e){var t,i=this.currentCell;if(this.invalidEdit=!1,i){for(this.currentCell=!1,t=i.getElement(),e?i.validate():t.classList.remove("tabulator-validation-fail"),t.classList.remove("tabulator-editing");t.firstChild;)t.removeChild(t.firstChild);i.row.getElement().classList.remove("tabulator-row-editing")}},Edit.prototype.cancelEdit=function(){if(this.currentCell){var e=this.currentCell,t=this.currentCell.getComponent();this.clearEditor(!0),e.setValueActual(e.getValue()),e.cellRendered(),e.column.cellEvents.cellEditCancelled&&e.column.cellEvents.cellEditCancelled.call(this.table,t),this.table.options.cellEditCancelled.call(this.table,t)}},Edit.prototype.bindEditor=function(e){var t=this,i=e.getElement();i.setAttribute("tabindex",0),i.addEventListener("click",function(e){i.classList.contains("tabulator-editing")||i.focus({preventScroll:!0})}),i.addEventListener("mousedown",function(e){t.mouseClick=!0}),i.addEventListener("focus",function(i){t.recursionBlock||t.edit(e,i,!1)})},Edit.prototype.focusCellNoEvent=function(e,t){this.recursionBlock=!0,t&&"ie"===this.table.browser||e.getElement().focus({preventScroll:!0}),this.recursionBlock=!1},Edit.prototype.editCell=function(e,t){this.focusCellNoEvent(e),this.edit(e,!1,t)},Edit.prototype.focusScrollAdjust=function(e){if("virtual"==this.table.rowManager.getRenderMode()){var t=this.table.rowManager.element.scrollTop,i=this.table.rowManager.element.clientHeight+this.table.rowManager.element.scrollTop,n=e.row.getElement();n.offsetTop;n.offsetTopi&&(this.table.rowManager.element.scrollTop+=n.offsetTop+n.offsetHeight-i)}},Edit.prototype.edit=function(e,t,i){function n(t){if(u.currentCell===e){var i=!0;return e.column.modules.validate&&u.table.modExists("validate")&&"manual"!=u.table.options.validationMode&&(i=u.table.modules.validate.validate(e.column.modules.validate,e,t)),!0===i||"highlight"===u.table.options.validationMode?(u.clearEditor(),e.setValue(t,!0),e.modules.edit||(e.modules.edit={}),e.modules.edit.edited=!0,-1==u.editedCells.indexOf(e)&&u.editedCells.push(e),u.table.options.dataTree&&u.table.modExists("dataTree")&&u.table.modules.dataTree.checkForRestyle(e),!0===i||(m.classList.add("tabulator-validation-fail"),!1)):(u.invalidEdit=!0,m.classList.add("tabulator-validation-fail"),u.focusCellNoEvent(e,!0),c(),u.table.options.validationFailed.call(u.table,e.getComponent(),t,i),!1)}}function o(){u.currentCell===e&&(u.cancelEdit(),u.table.options.dataTree&&u.table.modExists("dataTree")&&u.table.modules.dataTree.checkForRestyle(e))}function a(e){c=e}var r,l,s,u=this,d=!0,c=function(){},m=e.getElement();if(this.currentCell)return void(this.invalidEdit||this.cancelEdit());if(e.column.modules.edit.blocked)return this.mouseClick=!1,m.blur(),!1;switch(t&&t.stopPropagation(),_typeof(e.column.modules.edit.check)){case"function":d=e.column.modules.edit.check(e.getComponent());break;case"boolean":d=e.column.modules.edit.check}if(d||i){if(u.cancelEdit(),u.currentCell=e,this.focusScrollAdjust(e),l=e.getComponent(),this.mouseClick&&(this.mouseClick=!1,e.column.cellEvents.cellClick&&e.column.cellEvents.cellClick.call(this.table,t,l)),e.column.cellEvents.cellEditing&&e.column.cellEvents.cellEditing.call(this.table,l),u.table.options.cellEditing.call(this.table,l),s="function"==typeof e.column.modules.edit.params?e.column.modules.edit.params(l):e.column.modules.edit.params,!1===(r=e.column.modules.edit.editor.call(u,l,a,n,o,s)))return m.blur(),!1;if(!(r instanceof Node))return console.warn("Edit Error - Editor should return an instance of Node, the editor returned:",r),m.blur(),!1;for(m.classList.add("tabulator-editing"),e.row.getElement().classList.add("tabulator-row-editing");m.firstChild;)m.removeChild(m.firstChild);m.appendChild(r),c();for(var f=m.children,p=0;p46){if(i>=n.length)return t.preventDefault(),t.stopPropagation(),l=!1,!1;switch(n[i]){case o:if(s.toUpperCase()==s.toLowerCase())return t.preventDefault(),t.stopPropagation(),l=!1,!1;break;case a:if(isNaN(s))return t.preventDefault(),t.stopPropagation(),l=!1,!1;break;case r:break;default:if(s!==n[i])return t.preventDefault(),t.stopPropagation(),l=!1,!1}l=!0}}),e.addEventListener("keyup",function(n){n.keyCode>46&&t.maskAutoFill&&i(e.value.length)}),e.placeholder||(e.placeholder=n),t.maskAutoFill&&i(e.value.length)},Edit.prototype.getEditedCells=function(){var e=[];return this.editedCells.forEach(function(t){e.push(t.getComponent())}),e},Edit.prototype.clearEdited=function(e){var t;e.modules.edit&&e.modules.edit.edited&&(e.modules.validate.invalid=!1,(t=this.editedCells.indexOf(e))>-1&&this.editedCells.splice(t,1))},Edit.prototype.editors={input:function(e,t,i,n,o){function a(e){(null===r||void 0===r)&&""!==l.value||l.value!==r?i(l.value)&&(r=l.value):n()}var r=e.getValue(),l=document.createElement("input");if(l.setAttribute("type",o.search?"search":"text"),l.style.padding="4px",l.style.width="100%",l.style.boxSizing="border-box",o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var s in o.elementAttributes)"+"==s.charAt(0)?(s=s.slice(1),l.setAttribute(s,l.getAttribute(s)+o.elementAttributes["+"+s])):l.setAttribute(s,o.elementAttributes[s]);return l.value=void 0!==r?r:"",t(function(){l.focus({preventScroll:!0}),l.style.height="100%"}),l.addEventListener("change",a),l.addEventListener("blur",a),l.addEventListener("keydown",function(e){switch(e.keyCode){case 13:a(e);break;case 27:n()}}),o.mask&&this.table.modules.edit.maskInput(l,o),l},textarea:function(e,t,i,n,o){function a(t){(null===r||void 0===r)&&""!==u.value||u.value!==r?(i(u.value)&&(r=u.value),setTimeout(function(){e.getRow().normalizeHeight()},300)):n()}var r=e.getValue(),l=o.verticalNavigation||"hybrid",s=String(null!==r&&void 0!==r?r:""),u=(s.match(/(?:\r\n|\r|\n)/g),document.createElement("textarea")),d=0;if(u.style.display="block",u.style.padding="2px",u.style.height="100%",u.style.width="100%",u.style.boxSizing="border-box",u.style.whiteSpace="pre-wrap",u.style.resize="none",o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var c in o.elementAttributes)"+"==c.charAt(0)?(c=c.slice(1),u.setAttribute(c,u.getAttribute(c)+o.elementAttributes["+"+c])):u.setAttribute(c,o.elementAttributes[c]);return u.value=s,t(function(){u.focus({preventScroll:!0}),u.style.height="100%"}),u.addEventListener("change",a),u.addEventListener("blur",a),u.addEventListener("keyup",function(){u.style.height="";var t=u.scrollHeight;u.style.height=t+"px",t!=d&&(d=t,e.getRow().normalizeHeight())}),u.addEventListener("keydown",function(e){switch(e.keyCode){case 27:n();break;case 38:("editor"==l||"hybrid"==l&&u.selectionStart)&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 40:("editor"==l||"hybrid"==l&&u.selectionStart!==u.value.length)&&(e.stopImmediatePropagation(),e.stopPropagation())}}),o.mask&&this.table.modules.edit.maskInput(u,o),u},number:function(e,t,i,n,o){function a(){var e=s.value;isNaN(e)||""===e||(e=Number(e)),e!==r?i(e)&&(r=e):n()}var r=e.getValue(),l=o.verticalNavigation||"editor",s=document.createElement("input");if(s.setAttribute("type","number"),void 0!==o.max&&s.setAttribute("max",o.max),void 0!==o.min&&s.setAttribute("min",o.min),void 0!==o.step&&s.setAttribute("step",o.step),s.style.padding="4px",s.style.width="100%",s.style.boxSizing="border-box",o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var u in o.elementAttributes)"+"==u.charAt(0)?(u=u.slice(1),s.setAttribute(u,s.getAttribute(u)+o.elementAttributes["+"+u])):s.setAttribute(u,o.elementAttributes[u]);s.value=r;var d=function(e){a()};return t(function(){s.removeEventListener("blur",d),s.focus({preventScroll:!0}),s.style.height="100%",s.addEventListener("blur",d)}),s.addEventListener("keydown",function(e){switch(e.keyCode){case 13:a();break;case 27:n();break;case 38:case 40:"editor"==l&&(e.stopImmediatePropagation(),e.stopPropagation())}}),o.mask&&this.table.modules.edit.maskInput(s,o),s},range:function(e,t,i,n,o){function a(){var e=l.value;isNaN(e)||""===e||(e=Number(e)),e!=r?i(e)&&(r=e):n()}var r=e.getValue(),l=document.createElement("input");if(l.setAttribute("type","range"),void 0!==o.max&&l.setAttribute("max",o.max),void 0!==o.min&&l.setAttribute("min",o.min),void 0!==o.step&&l.setAttribute("step",o.step),l.style.padding="4px",l.style.width="100%",l.style.boxSizing="border-box",o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var s in o.elementAttributes)"+"==s.charAt(0)?(s=s.slice(1),l.setAttribute(s,l.getAttribute(s)+o.elementAttributes["+"+s])):l.setAttribute(s,o.elementAttributes[s]);return l.value=r,t(function(){l.focus({preventScroll:!0}),l.style.height="100%"}),l.addEventListener("blur",function(e){a()}),l.addEventListener("keydown",function(e){switch(e.keyCode){case 13:a();break;case 27:n()}}),l},select:function(e,t,i,n,o){function a(t){var i,n={},a=y.table.getData();return i=t?y.table.columnManager.getColumnByField(t):e.getColumn()._getSelf(),i?(a.forEach(function(e){var t=i.getFieldValue(e);null!==t&&void 0!==t&&""!==t&&(n[t]=!0)}),n=o.sortValuesList?"asc"==o.sortValuesList?Object.keys(n).sort():Object.keys(n).sort().reverse():Object.keys(n)):console.warn("unable to find matching column to create select lookup list:",t),n}function r(t,i){function n(e){var e={label:e.label,value:e.value,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1};return i.indexOf(e.value)>-1&&u(e),o.push(e),a.push(e),e}var o=[],a=[];if("function"==typeof t&&(t=t(e)),Array.isArray(t))t.forEach(function(e){var t;"object"===(void 0===e?"undefined":_typeof(e))?e.options?(t={label:e.label,group:!0,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1},a.push(t),e.options.forEach(function(e){n(e)})):n(e):(t={label:e,value:e,element:!1},i.indexOf(t.value)>-1&&u(t),o.push(t),a.push(t))});else for(var r in t){var s={label:t[r],value:r,element:!1};i.indexOf(s.value)>-1&&u(s),o.push(s),a.push(s)}P=o,T=a,l()}function l(){for(;w.firstChild;)w.removeChild(w.firstChild);T.forEach(function(t){var i=t.element;if(!i){if(i=document.createElement("div"),t.label=o.listItemFormatter?o.listItemFormatter(t.value,t.label,e,i,t.itemParams):t.label,t.group?(i.classList.add("tabulator-edit-select-list-group"),i.tabIndex=0,i.innerHTML=""===t.label?" ":t.label):(i.classList.add("tabulator-edit-select-list-item"),i.tabIndex=0,i.innerHTML=""===t.label?" ":t.label,i.addEventListener("click",function(){x?(c(t),L.focus()):m(t)}),I.indexOf(t)>-1&&i.classList.add("active")),t.elementAttributes&&"object"==_typeof(t.elementAttributes))for(var n in t.elementAttributes)"+"==n.charAt(0)?(n=n.slice(1),i.setAttribute(n,L.getAttribute(n)+t.elementAttributes["+"+n])):i.setAttribute(n,t.elementAttributes[n]);i.addEventListener("mousedown",function(){S=!1,setTimeout(function(){S=!0},10)}),t.element=i}w.appendChild(i)})}function s(e,t){!x&&N&&N.element&&N.element.classList.remove("active"),N&&N.element&&N.element.classList.remove("focused"),N=e,e.element&&(e.element.classList.add("focused"),t&&e.element.classList.add("active"))}function u(e){-1==I.indexOf(e)&&(I.push(e),s(e,!0)),p()}function d(e){var t=I[e];e>-1&&(I.splice(e,1),t.element&&t.element.classList.remove("active"))}function c(e){e||(e=N);var t=I.indexOf(e);t>-1?d(t):(!0!==x&&I.length>=x&&d(0),u(e)),p()}function m(e){h(),e||(e=N),e&&i(e.value)}function f(){h();var e=[];I.forEach(function(t){e.push(t.value)}),i(e)}function p(){var e=[];I.forEach(function(t){e.push(t.label)}),L.value=e.join(", ")}function v(){h(),n()}function b(){if(!w.parentNode){!0===o.values?r(a(),C):"string"==typeof o.values?r(a(o.values),C):r(o.values||[],C);var e=Tabulator.prototype.helpers.elOffset(E);w.style.minWidth=E.offsetWidth+"px",w.style.top=e.top+E.offsetHeight+"px",w.style.left=e.left+"px",w.addEventListener("mousedown",function(e){S=!1,setTimeout(function(){S=!0},10)}),document.body.appendChild(w)}}function h(){w.parentNode&&w.parentNode.removeChild(w),g()}function g(){y.table.rowManager.element.removeEventListener("scroll",v)}var y=this,E=e.getElement(),A=e.getValue(),k=o.verticalNavigation||"editor",C=void 0!==A||null===A?A:void 0!==o.defaultValue?o.defaultValue:[],L=document.createElement("input"),w=document.createElement("div"),x=o.multiselect,P=[],N={},T=[],I=[],S=!0;if(this.table.rowManager.element.addEventListener("scroll",v),(Array.isArray(o)||!Array.isArray(o)&&"object"===(void 0===o?"undefined":_typeof(o))&&!o.values)&&(console.warn("DEPRECATION WARNING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object"),o={values:o}),L.setAttribute("type","text"),L.style.padding="4px",L.style.width="100%",L.style.boxSizing="border-box",L.style.cursor="default",L.readOnly=0!=this.currentCell,o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var O in o.elementAttributes)"+"==O.charAt(0)?(O=O.slice(1),L.setAttribute(O,L.getAttribute(O)+o.elementAttributes["+"+O])):L.setAttribute(O,o.elementAttributes[O]);return L.value=void 0!==A||null===A?A:"",L.addEventListener("keydown",function(e){var t;switch(e.keyCode){case 38:t=P.indexOf(N),("editor"==k||"hybrid"==k&&t)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t>0&&s(P[t-1],!x));break;case 40:t=P.indexOf(N),("editor"==k||"hybrid"==k&&t-1||String(t.title).toLowerCase().indexOf(String(e).toLowerCase())>-1)&&a.push(t)}),c(a,t))}function s(e){var t=document.createElement("div");d(),!1!==e&&(t.classList.add("tabulator-edit-select-list-notice"),t.tabIndex=0,e instanceof Node?t.appendChild(e):t.innerHTML=e,w.appendChild(t))}function u(e){var t=[];if(Array.isArray(e))e.forEach(function(e){var i={};"object"===(void 0===e?"undefined":_typeof(e))?(i.title=o.listItemFormatter?o.listItemFormatter(e.value,e.label):e.label,i.value=e.value):(i.title=o.listItemFormatter?o.listItemFormatter(e,e):e,i.value=e),t.push(i)});else for(var i in e){var n={title:o.listItemFormatter?o.listItemFormatter(i,e[i]):e[i],value:i};t.push(n)}return t}function d(){for(;w.firstChild;)w.removeChild(w.firstChild)}function c(e,t){e.length?m(e,t):o.emptyPlaceholder&&s(o.emptyPlaceholder)}function m(e,t){var i=!1;d(),x=e,x.forEach(function(e){var n=e.element;n||(n=document.createElement("div"),n.classList.add("tabulator-edit-select-list-item"),n.tabIndex=0,n.innerHTML=e.title,n.addEventListener("click",function(t){v(e),f()}),n.addEventListener("mousedown",function(e){N=!1,setTimeout(function(){N=!0},10)}),e.element=n,t&&e.value==A&&(L.value=e.title,e.element.classList.add("active"),i=!0),e===P&&(e.element.classList.add("active"),i=!0)),w.appendChild(n)}),i||v(!1)}function f(){b(),P?A!==P.value?(A=P.value,L.value=P.title,i(P.value)):n():o.freetext?(A=L.value,i(L.value)):o.allowEmpty&&""===L.value?(A=L.value,i(L.value)):n()}function p(){if(!w.parentNode){for(;w.firstChild;)w.removeChild(w.firstChild);var e=Tabulator.prototype.helpers.elOffset(E);w.style.minWidth=E.offsetWidth+"px",w.style.top=e.top+E.offsetHeight+"px",w.style.left=e.left+"px",document.body.appendChild(w)}}function v(e,t){P&&P.element&&P.element.classList.remove("active"),P=e,e&&e.element&&e.element.classList.add("active")}function b(){w.parentNode&&w.parentNode.removeChild(w),g()}function h(){b(),n()}function g(){y.table.rowManager.element.removeEventListener("scroll",h)}var y=this,E=e.getElement(),A=e.getValue(),k=o.verticalNavigation||"editor",C=void 0!==A||null===A?A:void 0!==o.defaultValue?o.defaultValue:"",L=document.createElement("input"),w=document.createElement("div"),x=[],P=!1,N=!0,T=!1;if(this.table.rowManager.element.addEventListener("scroll",h),L.setAttribute("type","search"),L.style.padding="4px",L.style.width="100%",L.style.boxSizing="border-box",o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var I in o.elementAttributes)"+"==I.charAt(0)?(I=I.slice(1),L.setAttribute(I,L.getAttribute(I)+o.elementAttributes["+"+I])):L.setAttribute(I,o.elementAttributes[I]);return w.classList.add("tabulator-edit-select-list"),w.addEventListener("mousedown",function(e){N=!1,setTimeout(function(){N=!0},10)}),L.addEventListener("keydown",function(e){var t;switch(e.keyCode){case 38:t=x.indexOf(P),("editor"==k||"hybrid"==k&&t)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),v(t>0?x[t-1]:!1));break;case 40:t=x.indexOf(P),("editor"==k||"hybrid"==k&&t'):("ie"==l.table.browser?t.setAttribute("class","tabulator-star-inactive"):t.classList.replace("tabulator-star-active","tabulator-star-inactive"),t.innerHTML='')})}function r(e){u=e,a(e)}var l=this,s=e.getElement(),u=e.getValue(),d=s.getElementsByTagName("svg").length||5,c=s.getElementsByTagName("svg")[0]?s.getElementsByTagName("svg")[0].getAttribute("width"):14,m=[],f=document.createElement("div"),p=document.createElementNS("http://www.w3.org/2000/svg","svg");if(s.style.whiteSpace="nowrap",s.style.overflow="hidden",s.style.textOverflow="ellipsis",f.style.verticalAlign="middle",f.style.display="inline-block",f.style.padding="4px",p.setAttribute("width",c),p.setAttribute("height",c),p.setAttribute("viewBox","0 0 512 512"),p.setAttribute("xml:space","preserve"),p.style.padding="0 1px",o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var v in o.elementAttributes)"+"==v.charAt(0)?(v=v.slice(1),f.setAttribute(v,f.getAttribute(v)+o.elementAttributes["+"+v])):f.setAttribute(v,o.elementAttributes[v]);for(var b=1;b<=d;b++)!function(e){var t=document.createElement("span"),n=p.cloneNode(!0);m.push(n),t.addEventListener("mouseenter",function(t){t.stopPropagation(),t.stopImmediatePropagation(),a(e)}),t.addEventListener("mousemove",function(e){e.stopPropagation(),e.stopImmediatePropagation()}),t.addEventListener("click",function(t){t.stopPropagation(),t.stopImmediatePropagation(),i(e),s.blur()}),t.appendChild(n),f.appendChild(t)}(b);return u=Math.min(parseInt(u),d),a(u),f.addEventListener("mousemove",function(e){a(0)}),f.addEventListener("click",function(e){i(0)}),s.addEventListener("blur",function(e){n()}),s.addEventListener("keydown",function(e){switch(e.keyCode){case 39:r(u+1);break;case 37:r(u-1);break;case 13:i(u);break;case 27:n()}}),f},progress:function(e,t,i,n,o){function a(){var e=c*Math.round(p.offsetWidth/(s.clientWidth/100))+d;i(e),s.setAttribute("aria-valuenow",e),s.setAttribute("aria-label",m)}var r,l,s=e.getElement(),u=void 0===o.max?s.getElementsByTagName("div")[0].getAttribute("max")||100:o.max,d=void 0===o.min?s.getElementsByTagName("div")[0].getAttribute("min")||0:o.min,c=(u-d)/100,m=e.getValue()||0,f=document.createElement("div"),p=document.createElement("div");if(f.style.position="absolute",f.style.right="0",f.style.top="0",f.style.bottom="0",f.style.width="5px",f.classList.add("tabulator-progress-handle"),p.style.display="inline-block",p.style.position="relative",p.style.height="100%",p.style.backgroundColor="#488CE9",p.style.maxWidth="100%",p.style.minWidth="0%",o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var v in o.elementAttributes)"+"==v.charAt(0)?(v=v.slice(1),p.setAttribute(v,p.getAttribute(v)+o.elementAttributes["+"+v])):p.setAttribute(v,o.elementAttributes[v]);return s.style.padding="4px 4px",m=Math.min(parseFloat(m),u),m=Math.max(parseFloat(m),d),m=Math.round((m-d)/c),p.style.width=m+"%",s.setAttribute("aria-valuemin",d),s.setAttribute("aria-valuemax",u),p.appendChild(f),f.addEventListener("mousedown",function(e){r=e.screenX,l=p.offsetWidth}),f.addEventListener("mouseover",function(){f.style.cursor="ew-resize"}),s.addEventListener("mousemove",function(e){r&&(p.style.width=l+e.screenX-r+"px")}),s.addEventListener("mouseup",function(e){r&&(e.stopPropagation(),e.stopImmediatePropagation(),r=!1,l=!1,a())}),s.addEventListener("keydown",function(e){switch(e.keyCode){case 39:e.preventDefault(),p.style.width=p.clientWidth+s.clientWidth/100+"px";break;case 37:e.preventDefault(),p.style.width=p.clientWidth-s.clientWidth/100+"px";break;case 9:case 13:a();break;case 27:n()}}),s.addEventListener("blur",function(){n()}),p},tickCross:function(e,t,i,n,o){function a(e){return s?e?d?u:l.checked:l.checked&&!d?(l.checked=!1,l.indeterminate=!0,d=!0,u):(d=!1,l.checked):l.checked}var r=e.getValue(),l=document.createElement("input"),s=o.tristate,u=void 0===o.indeterminateValue?null:o.indeterminateValue,d=!1;if(l.setAttribute("type","checkbox"),l.style.marginTop="5px",l.style.boxSizing="border-box",o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var c in o.elementAttributes)"+"==c.charAt(0)?(c=c.slice(1),l.setAttribute(c,l.getAttribute(c)+o.elementAttributes["+"+c])):l.setAttribute(c,o.elementAttributes[c]);return l.value=r,!s||void 0!==r&&r!==u&&""!==r||(d=!0,l.indeterminate=!0),"firefox"!=this.table.browser&&t(function(){l.focus({preventScroll:!0})}),l.checked=!0===r||"true"===r||"True"===r||1===r,l.addEventListener("change",function(e){i(a())}),l.addEventListener("blur",function(e){i(a(!0))}),l.addEventListener("keydown",function(e){13==e.keyCode&&i(a()),27==e.keyCode&&n()}),l}},Tabulator.prototype.registerModule("edit",Edit); \ No newline at end of file diff --git a/website/js/vendor/tabulator/js/modules/export.js b/admin/js/vendors/tabulator/js/modules/export.js similarity index 97% rename from website/js/vendor/tabulator/js/modules/export.js rename to admin/js/vendors/tabulator/js/modules/export.js index 9f9806d..18d3f6c 100644 --- a/website/js/vendor/tabulator/js/modules/export.js +++ b/admin/js/vendors/tabulator/js/modules/export.js @@ -1,6 +1,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; -/* Tabulator v4.8.3 (c) Oliver Folkerd */ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ var ExportRow = function ExportRow(type, columns, component, indent) { this.type = type; @@ -71,11 +71,7 @@ Export.prototype.rowLookup = function (range) { case "active": default: - if (this.table.options.pagination) { - rows = this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length - 2); - } else { - rows = this.table.rowManager.getDisplayRows(); - } + rows = this.table.rowManager.getDisplayRows(); } } @@ -441,7 +437,7 @@ Export.prototype.genereateGroupElement = function (row, setup, styles) { rowEl.classList.add("tabulator-print-table-group"); rowEl.classList.add("tabulator-group-level-" + row.indent); - if (group.component.isVisible()) { + if (group.component.getVisibility()) { rowEl.classList.add("tabulator-group-visible"); } @@ -491,10 +487,10 @@ Export.prototype.genereateRowElement = function (row, setup, styles) { return column.getComponent(); }, getData: function getData() { - return row.component.getData(); + return rowData; }, getRow: function getRow() { - return row.component; + return row.getComponent(); }, getComponent: function getComponent() { return cellWrapper; @@ -558,7 +554,13 @@ Export.prototype.genereateRowElement = function (row, setup, styles) { } if (setup.rowFormatter && _this7.config.formatCells !== false) { - setup.rowFormatter(row.component); + var rowComponent = row.getComponent(); + + rowComponent.getElement = function () { + return rowEl; + }; + + setup.rowFormatter(rowComponent); } } }); diff --git a/admin/js/vendors/tabulator/js/modules/export.min.js b/admin/js/vendors/tabulator/js/modules/export.min.js new file mode 100644 index 0000000..d0dcccd --- /dev/null +++ b/admin/js/vendors/tabulator/js/modules/export.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ +var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ExportRow=function(t,e,o,r){this.type=t,this.columns=e,this.component=o||!1,this.indent=r||0},ExportColumn=function(t,e,o,r,n){this.value=t,this.component=e||!1,this.width=o,this.height=r,this.depth=n},Export=function(t){this.table=t,this.config={},this.cloneTableStyle=!0,this.colVisProp=""};Export.prototype.generateExportList=function(t,e,o,r){this.cloneTableStyle=e,this.config=t||{},this.colVisProp=r;var n=!1!==this.config.columnHeaders?this.headersToExportRows(this.generateColumnGroupHeaders()):[],l=this.bodyToExportRows(this.rowLookup(o));return n.concat(l)},Export.prototype.genereateTable=function(t,e,o,r){var n=this.generateExportList(t,e,o,r);return this.genereateTableElement(n)},Export.prototype.rowLookup=function(t){var e=this,o=[];if("function"==typeof t)t.call(this.table).forEach(function(t){(t=e.table.rowManager.findRow(t))&&o.push(t)});else switch(t){case!0:case"visible":o=this.table.rowManager.getVisibleRows(!0);break;case"all":o=this.table.rowManager.rows;break;case"selected":o=this.table.modules.selectRow.selectedRows;break;case"active":default:o=this.table.rowManager.getDisplayRows()}return Object.assign([],o)},Export.prototype.generateColumnGroupHeaders=function(){var t=this,e=[];return(!1!==this.config.columnGroups?this.table.columnManager.columns:this.table.columnManager.columnsByIndex).forEach(function(o){var r=t.processColumnGroup(o);r&&e.push(r)}),e},Export.prototype.processColumnGroup=function(t){var e=this,o=t.columns,r=0,n=t.definition["title"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))]||t.definition.title,l={title:n,column:t,depth:1};if(o.length){if(l.subGroups=[],l.width=0,o.forEach(function(t){var o=e.processColumnGroup(t);o&&(l.width+=o.width,l.subGroups.push(o),o.depth>r&&(r=o.depth))}),l.depth+=r,!l.width)return!1}else{if(!this.columnVisCheck(t))return!1;l.width=1}return l},Export.prototype.columnVisCheck=function(t){return!1!==t.definition[this.colVisProp]&&(t.visible||!t.visible&&t.definition[this.colVisProp])},Export.prototype.headersToExportRows=function(t){function e(t,n){var l=r-n;if(void 0===o[n]&&(o[n]=[]),t.height=t.subGroups?1:l-t.depth+1,o[n].push(t),t.height>1)for(var a=1;a1)for(var i=1;ir&&(r=t.depth)}),t.forEach(function(t){e(t,0)}),o.forEach(function(t){var e=[];t.forEach(function(t){t?e.push(new ExportColumn(t.title,t.column.getComponent(),t.width,t.height,t.depth)):e.push(null)}),n.push(new ExportRow("header",e))}),n},Export.prototype.bodyToExportRows=function(t){var e=this,o=[],r=[];return this.table.columnManager.columnsByIndex.forEach(function(t){e.columnVisCheck(t)&&o.push(t.getComponent())}),!1!==this.config.columnCalcs&&this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&t.unshift(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&t.push(this.table.modules.columnCalcs.botRow)),t=t.filter(function(t){switch(t.type){case"group":return!1!==e.config.rowGroups;case"calc":return!1!==e.config.columnCalcs;case"row":return!(e.table.options.dataTree&&!1===e.config.dataTree&&t.modules.dataTree.parent)}return!0}),t.forEach(function(t,n){var l=t.getData(e.colVisProp),a=[],i=0;switch(t.type){case"group":i=t.level,a.push(new ExportColumn(t.key,t.getComponent(),o.length,1));break;case"calc":case"row":o.forEach(function(t){a.push(new ExportColumn(t._column.getFieldValue(l),t,1,1))}),e.table.options.dataTree&&!1!==e.config.dataTree&&(i=t.modules.dataTree.index)}r.push(new ExportRow(t.type,a,t.getComponent(),i))}),r},Export.prototype.genereateTableElement=function(t){var e=this,o=document.createElement("table"),r=document.createElement("thead"),n=document.createElement("tbody"),l=this.lookupTableStyles(),a=this.table.options["rowFormatter"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))],i={};return i.rowFormatter=null!==a?a:this.table.options.rowFormatter,this.table.options.dataTree&&!1!==this.config.dataTree&&this.table.modExists("columnCalcs")&&(i.treeElementField=this.table.modules.dataTree.elementField),i.groupHeader=this.table.options["groupHeader"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))],i.groupHeader&&!Array.isArray(i.groupHeader)&&(i.groupHeader=[i.groupHeader]),o.classList.add("tabulator-print-table"),this.mapElementStyles(this.table.columnManager.getHeadersElement(),r,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),t.length>1e3&&console.warn("It may take a long time to render an HTML table with more than 1000 rows"),t.forEach(function(t,o){switch(t.type){case"header":r.appendChild(e.genereateHeaderElement(t,i,l));break;case"group":n.appendChild(e.genereateGroupElement(t,i,l));break;case"calc":n.appendChild(e.genereateCalcElement(t,i,l));break;case"row":var a=e.genereateRowElement(t,i,l);e.mapElementStyles(o%2&&l.evenRow?l.evenRow:l.oddRow,a,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),n.appendChild(a)}}),r.innerHTML&&o.appendChild(r),o.appendChild(n),this.mapElementStyles(this.table.element,o,["border-top","border-left","border-right","border-bottom"]),o},Export.prototype.lookupTableStyles=function(){var t={};return this.cloneTableStyle&&window.getComputedStyle&&(t.oddRow=this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"),t.evenRow=this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"),t.calcRow=this.table.element.querySelector(".tabulator-row.tabulator-calcs"),t.firstRow=this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"),t.firstGroup=this.table.element.getElementsByClassName("tabulator-group")[0],t.firstRow&&(t.styleCells=t.firstRow.getElementsByClassName("tabulator-cell"),t.firstCell=t.styleCells[0],t.lastCell=t.styleCells[t.styleCells.length-1])),t},Export.prototype.genereateHeaderElement=function(t,e,o){var r=this,n=document.createElement("tr");return t.columns.forEach(function(t){if(t){var e=document.createElement("th"),o=t.component._column.definition.cssClass?t.component._column.definition.cssClass.split(" "):[];e.colSpan=t.width,e.rowSpan=t.height,e.innerHTML=t.value,r.cloneTableStyle&&(e.style.boxSizing="border-box"),o.forEach(function(t){e.classList.add(t)}),r.mapElementStyles(t.component.getElement(),e,["text-align","border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),r.mapElementStyles(t.component._column.contentElement,e,["padding-top","padding-left","padding-right","padding-bottom"]),t.component._column.visible?r.mapElementStyles(t.component.getElement(),e,["width"]):t.component._column.definition.width&&(e.style.width=t.component._column.definition.width+"px"),t.component._column.parent&&r.mapElementStyles(t.component._column.parent.groupElement,e,["border-top"]),n.appendChild(e)}}),n},Export.prototype.genereateGroupElement=function(t,e,o){var r=document.createElement("tr"),n=document.createElement("td"),l=t.columns[0];return r.classList.add("tabulator-print-table-row"),e.groupHeader&&e.groupHeader[t.indent]?l.value=e.groupHeader[t.indent](l.value,t.component._group.getRowCount(),t.component._group.getData(),t.component):!1===e.groupHeader?l.value=l.value:l.value=t.component._group.generator(l.value,t.component._group.getRowCount(),t.component._group.getData(),t.component),n.colSpan=l.width,n.innerHTML=l.value,r.classList.add("tabulator-print-table-group"),r.classList.add("tabulator-group-level-"+t.indent),l.component.getVisibility()&&r.classList.add("tabulator-group-visible"),this.mapElementStyles(o.firstGroup,r,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),this.mapElementStyles(o.firstGroup,n,["padding-top","padding-left","padding-right","padding-bottom"]),r.appendChild(n),r},Export.prototype.genereateCalcElement=function(t,e,o){var r=this.genereateRowElement(t,e,o);return r.classList.add("tabulator-print-table-calcs"),this.mapElementStyles(o.calcRow,r,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),r},Export.prototype.genereateRowElement=function(t,e,o){var r=this,n=document.createElement("tr");return n.classList.add("tabulator-print-table-row"),t.columns.forEach(function(l){if(l){var a=document.createElement("td"),s=l.component._column,p=l.value,c={modules:{},getValue:function(){return p},getField:function(){return s.definition.field},getElement:function(){return a},getColumn:function(){return s.getComponent()},getData:function(){return rowData},getRow:function(){return t.getComponent()},getComponent:function(){return c},column:s};if((s.definition.cssClass?s.definition.cssClass.split(" "):[]).forEach(function(t){a.classList.add(t)}),r.table.modExists("format")&&!1!==r.config.formatCells)p=r.table.modules.format.formatExportValue(c,r.colVisProp);else switch(void 0===p?"undefined":_typeof(p)){case"object":p=JSON.stringify(p);break;case"undefined":case"null":p="";break;default:p=p}if(p instanceof Node?a.appendChild(p):a.innerHTML=p,o.firstCell&&(r.mapElementStyles(o.firstCell,a,["padding-top","padding-left","padding-right","padding-bottom","border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size"]),s.definition.align&&(a.style.textAlign=s.definition.align)),r.table.options.dataTree&&!1!==r.config.dataTree&&(e.treeElementField&&e.treeElementField==s.field||!e.treeElementField&&0==i)&&(t.component._row.modules.dataTree.controlEl&&a.insertBefore(t.component._row.modules.dataTree.controlEl.cloneNode(!0),a.firstChild),t.component._row.modules.dataTree.branchEl&&a.insertBefore(t.component._row.modules.dataTree.branchEl.cloneNode(!0),a.firstChild)),n.appendChild(a),c.modules.format&&c.modules.format.renderedCallback&&c.modules.format.renderedCallback(),e.rowFormatter&&!1!==r.config.formatCells){var u=t.getComponent();u.getElement=function(){return n},e.rowFormatter(u)}}}),n},Export.prototype.genereateHTMLTable=function(t){var e=document.createElement("div");return e.appendChild(this.genereateTableElement(t)),e.innerHTML},Export.prototype.getHtml=function(t,e,o,r){var n=this.generateExportList(o||this.table.options.htmlOutputConfig,e,t,r||"htmlOutput");return this.genereateHTMLTable(n)},Export.prototype.mapElementStyles=function(t,e,o){if(this.cloneTableStyle&&t&&e){var r={"background-color":"backgroundColor",color:"fontColor",width:"width","font-weight":"fontWeight","font-family":"fontFamily","font-size":"fontSize","text-align":"textAlign","border-top":"borderTop","border-left":"borderLeft","border-right":"borderRight","border-bottom":"borderBottom","padding-top":"paddingTop","padding-left":"paddingLeft","padding-right":"paddingRight","padding-bottom":"paddingBottom"};if(window.getComputedStyle){var n=window.getComputedStyle(t);o.forEach(function(t){e.style[r[t]]=n.getPropertyValue(t)})}}},Tabulator.prototype.registerModule("export",Export); \ No newline at end of file diff --git a/website/js/vendor/tabulator/js/modules/filter.js b/admin/js/vendors/tabulator/js/modules/filter.js similarity index 99% rename from website/js/vendor/tabulator/js/modules/filter.js rename to admin/js/vendors/tabulator/js/modules/filter.js index 7173cd1..aaed59b 100644 --- a/website/js/vendor/tabulator/js/modules/filter.js +++ b/admin/js/vendors/tabulator/js/modules/filter.js @@ -1,6 +1,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; -/* Tabulator v4.8.3 (c) Oliver Folkerd */ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ var Filter = function Filter(table) { @@ -796,7 +796,7 @@ Filter.prototype.filters = { //in array "in": function _in(filterVal, rowVal, rowData, filterParams) { if (Array.isArray(filterVal)) { - return filterVal.length ? filterVal.indexOf(rowVal) > -1 : true; + return filterVal.indexOf(rowVal) > -1; } else { console.warn("Filter Error - filter value is not an array:", filterVal); return false; diff --git a/website/js/vendor/tabulator/js/modules/filter.min.js b/admin/js/vendors/tabulator/js/modules/filter.min.js similarity index 98% rename from website/js/vendor/tabulator/js/modules/filter.min.js rename to admin/js/vendors/tabulator/js/modules/filter.min.js index eace11d..8be2662 100644 --- a/website/js/vendor/tabulator/js/modules/filter.min.js +++ b/admin/js/vendors/tabulator/js/modules/filter.min.js @@ -1,2 +1,2 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Filter=function(e){this.table=e,this.filterList=[],this.headerFilters={},this.headerFilterColumns=[],this.prevHeaderFilterChangeCheck="",this.prevHeaderFilterChangeCheck="{}",this.changed=!1};Filter.prototype.initializeColumn=function(e,t){function r(t){var r,o="input"==e.modules.filter.tagType&&"text"==e.modules.filter.attrType||"textarea"==e.modules.filter.tagType?"partial":"match",a="",s="";if(void 0===e.modules.filter.prevSuccess||e.modules.filter.prevSuccess!==t){if(e.modules.filter.prevSuccess=t,e.modules.filter.emptyFunc(t))delete n.headerFilters[l];else{switch(e.modules.filter.value=t,_typeof(e.definition.headerFilterFunc)){case"string":n.filters[e.definition.headerFilterFunc]?(a=e.definition.headerFilterFunc,r=function(r){var i=e.definition.headerFilterFuncParams||{},l=e.getFieldValue(r);return i="function"==typeof i?i(t,l,r):i,n.filters[e.definition.headerFilterFunc](t,l,r,i)}):console.warn("Header Filter Error - Matching filter function not found: ",e.definition.headerFilterFunc);break;case"function":r=function(r){var i=e.definition.headerFilterFuncParams||{},n=e.getFieldValue(r);return i="function"==typeof i?i(t,n,r):i,e.definition.headerFilterFunc(t,n,r,i)},a=r}if(!r)switch(o){case"partial":r=function(r){var i=e.getFieldValue(r);return void 0!==i&&null!==i&&String(i).toLowerCase().indexOf(String(t).toLowerCase())>-1},a="like";break;default:r=function(r){return e.getFieldValue(r)==t},a="="}n.headerFilters[l]={value:t,func:r,type:a,params:i||{}}}s=JSON.stringify(n.headerFilters),n.prevHeaderFilterChangeCheck!==s&&(n.prevHeaderFilterChangeCheck=s,n.changed=!0,n.table.rowManager.filterRefresh())}return!0}var i,n=this,l=e.getField();e.modules.filter={success:r,attrType:!1,tagType:!1,emptyFunc:!1},this.generateHeaderFilterElement(e)},Filter.prototype.generateHeaderFilterElement=function(e,t,r){function i(){}var n,l,o,a,s,d,u,f=this,c=this,h=e.modules.filter.success,p=e.getField();if(e.modules.filter.headerElement&&e.modules.filter.headerElement.parentNode&&e.contentElement.removeChild(e.modules.filter.headerElement.parentNode),p){switch(e.modules.filter.emptyFunc=e.definition.headerFilterEmptyCheck||function(e){return!e&&"0"!==e},n=document.createElement("div"),n.classList.add("tabulator-header-filter"),_typeof(e.definition.headerFilter)){case"string":c.table.modules.edit.editors[e.definition.headerFilter]?(l=c.table.modules.edit.editors[e.definition.headerFilter],"tick"!==e.definition.headerFilter&&"tickCross"!==e.definition.headerFilter||e.definition.headerFilterEmptyCheck||(e.modules.filter.emptyFunc=function(e){return!0!==e&&!1!==e})):console.warn("Filter Error - Cannot build header filter, No such editor found: ",e.definition.editor);break;case"function":l=e.definition.headerFilter;break;case"boolean":e.modules.edit&&e.modules.edit.editor?l=e.modules.edit.editor:e.definition.formatter&&c.table.modules.edit.editors[e.definition.formatter]?(l=c.table.modules.edit.editors[e.definition.formatter],"tick"!==e.definition.formatter&&"tickCross"!==e.definition.formatter||e.definition.headerFilterEmptyCheck||(e.modules.filter.emptyFunc=function(e){return!0!==e&&!1!==e})):l=c.table.modules.edit.editors.input}if(l){if(a={getValue:function(){return void 0!==t?t:""},getField:function(){return e.definition.field},getElement:function(){return n},getColumn:function(){return e.getComponent()},getRow:function(){return{normalizeHeight:function(){}}}},u=e.definition.headerFilterParams||{},u="function"==typeof u?u.call(c.table):u,!(o=l.call(this.table.modules.edit,a,function(){},h,i,u)))return void console.warn("Filter Error - Cannot add filter to "+p+" column, editor returned a value of false");if(!(o instanceof Node))return void console.warn("Filter Error - Cannot add filter to "+p+" column, editor should return an instance of Node, the editor returned:",o);p?c.table.modules.localize.bind("headerFilters|columns|"+e.definition.field,function(e){o.setAttribute("placeholder",void 0!==e&&e?e:c.table.modules.localize.getText("headerFilters|default"))}):c.table.modules.localize.bind("headerFilters|default",function(e){o.setAttribute("placeholder",void 0!==c.column.definition.headerFilterPlaceholder&&c.column.definition.headerFilterPlaceholder?c.column.definition.headerFilterPlaceholder:e)}),o.addEventListener("click",function(e){e.stopPropagation(),o.focus()}),o.addEventListener("focus",function(e){var t=f.table.columnManager.element.scrollLeft;t!==f.table.rowManager.element.scrollLeft&&(f.table.rowManager.scrollHorizontal(t),f.table.columnManager.scrollHorizontal(t))}),s=!1,d=function(e){s&&clearTimeout(s),s=setTimeout(function(){h(o.value)},c.table.options.headerFilterLiveFilterDelay)},e.modules.filter.headerElement=o,e.modules.filter.attrType=o.hasAttribute("type")?o.getAttribute("type").toLowerCase():"",e.modules.filter.tagType=o.tagName.toLowerCase(),!1!==e.definition.headerFilterLiveFilter&&("autocomplete"!==e.definition.headerFilter&&"tickCross"!==e.definition.headerFilter&&("autocomplete"!==e.definition.editor&&"tickCross"!==e.definition.editor||!0!==e.definition.headerFilter)&&(o.addEventListener("keyup",d),o.addEventListener("search",d),"number"==e.modules.filter.attrType&&o.addEventListener("change",function(e){h(o.value)}),"text"==e.modules.filter.attrType&&"ie"!==this.table.browser&&o.setAttribute("type","search")),"input"!=e.modules.filter.tagType&&"select"!=e.modules.filter.tagType&&"textarea"!=e.modules.filter.tagType||o.addEventListener("mousedown",function(e){e.stopPropagation()})),n.appendChild(o),e.contentElement.appendChild(n),r||c.headerFilterColumns.push(e)}}else console.warn("Filter Error - Cannot add header filter, column has no field set:",e.definition.title)},Filter.prototype.hideHeaderFilterElements=function(){this.headerFilterColumns.forEach(function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="none")})},Filter.prototype.showHeaderFilterElements=function(){this.headerFilterColumns.forEach(function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="")})},Filter.prototype.setHeaderFilterFocus=function(e){e.modules.filter&&e.modules.filter.headerElement?e.modules.filter.headerElement.focus():console.warn("Column Filter Focus Error - No header filter set on column:",e.getField())},Filter.prototype.getHeaderFilterValue=function(e){if(e.modules.filter&&e.modules.filter.headerElement)return e.modules.filter.headerElement.value;console.warn("Column Filter Error - No header filter set on column:",e.getField())},Filter.prototype.setHeaderFilterValue=function(e,t){e&&(e.modules.filter&&e.modules.filter.headerElement?(this.generateHeaderFilterElement(e,t,!0),e.modules.filter.success(t)):console.warn("Column Filter Error - No header filter set on column:",e.getField()))},Filter.prototype.reloadHeaderFilter=function(e){e&&(e.modules.filter&&e.modules.filter.headerElement?this.generateHeaderFilterElement(e,e.modules.filter.value,!0):console.warn("Column Filter Error - No header filter set on column:",e.getField()))},Filter.prototype.hasChanged=function(){var e=this.changed;return this.changed=!1,e},Filter.prototype.setFilter=function(e,t,r,i){var n=this;n.filterList=[],Array.isArray(e)||(e=[{field:e,type:t,value:r,params:i}]),n.addFilter(e)},Filter.prototype.addFilter=function(e,t,r,i){var n=this;Array.isArray(e)||(e=[{field:e,type:t,value:r,params:i}]),e.forEach(function(e){(e=n.findFilter(e))&&(n.filterList.push(e),n.changed=!0)}),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},Filter.prototype.findFilter=function(e){var t,r=this;if(Array.isArray(e))return this.findSubFilters(e);var i=!1;return"function"==typeof e.field?i=function(t){return e.field(t,e.type||{})}:r.filters[e.type]?(t=r.table.columnManager.getColumnByField(e.field),i=t?function(i){return r.filters[e.type](e.value,t.getFieldValue(i),i,e.params||{})}:function(t){return r.filters[e.type](e.value,t[e.field],t,e.params||{})}):console.warn("Filter Error - No such filter type found, ignoring: ",e.type),e.func=i,!!e.func&&e},Filter.prototype.findSubFilters=function(e){var t=this,r=[];return e.forEach(function(e){(e=t.findFilter(e))&&r.push(e)}),!!r.length&&r},Filter.prototype.getFilters=function(e,t){var r=[];return e&&(r=this.getHeaderFilters()),t&&r.forEach(function(e){"function"==typeof e.type&&(e.type="function")}),r=r.concat(this.filtersToArray(this.filterList,t))},Filter.prototype.filtersToArray=function(e,t){var r=this,i=[];return e.forEach(function(e){var n;Array.isArray(e)?i.push(r.filtersToArray(e,t)):(n={field:e.field,type:e.type,value:e.value},t&&"function"==typeof n.type&&(n.type="function"),i.push(n))}),i},Filter.prototype.getHeaderFilters=function(){var e=[];for(var t in this.headerFilters)e.push({field:t,type:this.headerFilters[t].type,value:this.headerFilters[t].value});return e},Filter.prototype.removeFilter=function(e,t,r){var i=this;Array.isArray(e)||(e=[{field:e,type:t,value:r}]),e.forEach(function(e){var t=-1;t="object"==_typeof(e.field)?i.filterList.findIndex(function(t){return e===t}):i.filterList.findIndex(function(t){return e.field===t.field&&e.type===t.type&&e.value===t.value}),t>-1?(i.filterList.splice(t,1),i.changed=!0):console.warn("Filter Error - No matching filter type found, ignoring: ",e.type)}),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},Filter.prototype.clearFilter=function(e){this.filterList=[],e&&this.clearHeaderFilter(),this.changed=!0,this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},Filter.prototype.clearHeaderFilter=function(){var e=this;this.headerFilters={},e.prevHeaderFilterChangeCheck="{}",this.headerFilterColumns.forEach(function(t){t.modules.filter.value=null,t.modules.filter.prevSuccess=void 0,e.reloadHeaderFilter(t)}),this.changed=!0},Filter.prototype.search=function(e,t,r,i){var n=this,l=[],o=[];return Array.isArray(t)||(t=[{field:t,type:r,value:i}]),t.forEach(function(e){(e=n.findFilter(e))&&o.push(e)}),this.table.rowManager.rows.forEach(function(t){var r=!0;o.forEach(function(e){n.filterRecurse(e,t.getData())||(r=!1)}),r&&l.push("data"===e?t.getData("data"):t.getComponent())}),l},Filter.prototype.filter=function(e,t){var r=this,i=[],n=[];return r.table.options.dataFiltering&&r.table.options.dataFiltering.call(r.table,r.getFilters()),r.table.options.ajaxFiltering||!r.filterList.length&&!Object.keys(r.headerFilters).length?i=e.slice(0):e.forEach(function(e){r.filterRow(e)&&i.push(e)}),r.table.options.dataFiltered&&(i.forEach(function(e){n.push(e.getComponent())}),r.table.options.dataFiltered.call(r.table,r.getFilters(),n)),i},Filter.prototype.filterRow=function(e,t){var r=this,i=!0,n=e.getData();r.filterList.forEach(function(e){r.filterRecurse(e,n)||(i=!1)});for(var l in r.headerFilters)r.headerFilters[l].func(n)||(i=!1);return i},Filter.prototype.filterRecurse=function(e,t){var r=this,i=!1;return Array.isArray(e)?e.forEach(function(e){r.filterRecurse(e,t)&&(i=!0)}):i=e.func(t),i},Filter.prototype.filters={"=":function(e,t,r,i){return t==e},"<":function(e,t,r,i){return t":function(e,t,r,i){return t>e},">=":function(e,t,r,i){return t>=e},"!=":function(e,t,r,i){return t!=e},regex:function(e,t,r,i){return"string"==typeof e&&(e=new RegExp(e)),e.test(t)},like:function(e,t,r,i){return null===e||void 0===e?t===e:void 0!==t&&null!==t&&String(t).toLowerCase().indexOf(e.toLowerCase())>-1},keywords:function(e,t,r,i){var n=e.toLowerCase().split(void 0===i.separator?" ":i.separator),l=String(null===t||void 0===t?"":t).toLowerCase(),o=[];return n.forEach(function(e){l.includes(e)&&o.push(!0)}),i.matchAll?o.length===n.length:!!o.length},starts:function(e,t,r,i){return null===e||void 0===e?t===e:void 0!==t&&null!==t&&String(t).toLowerCase().startsWith(e.toLowerCase())},ends:function(e,t,r,i){return null===e||void 0===e?t===e:void 0!==t&&null!==t&&String(t).toLowerCase().endsWith(e.toLowerCase())},in:function(e,t,r,i){return Array.isArray(e)?!e.length||e.indexOf(t)>-1:(console.warn("Filter Error - filter value is not an array:",e),!1)}},Tabulator.prototype.registerModule("filter",Filter); \ No newline at end of file +/* Tabulator v4.7.0 (c) Oliver Folkerd */ +var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Filter=function(e){this.table=e,this.filterList=[],this.headerFilters={},this.headerFilterColumns=[],this.prevHeaderFilterChangeCheck="",this.prevHeaderFilterChangeCheck="{}",this.changed=!1};Filter.prototype.initializeColumn=function(e,t){function r(t){var r,o="input"==e.modules.filter.tagType&&"text"==e.modules.filter.attrType||"textarea"==e.modules.filter.tagType?"partial":"match",a="",s="";if(void 0===e.modules.filter.prevSuccess||e.modules.filter.prevSuccess!==t){if(e.modules.filter.prevSuccess=t,e.modules.filter.emptyFunc(t))delete n.headerFilters[l];else{switch(e.modules.filter.value=t,_typeof(e.definition.headerFilterFunc)){case"string":n.filters[e.definition.headerFilterFunc]?(a=e.definition.headerFilterFunc,r=function(r){var i=e.definition.headerFilterFuncParams||{},l=e.getFieldValue(r);return i="function"==typeof i?i(t,l,r):i,n.filters[e.definition.headerFilterFunc](t,l,r,i)}):console.warn("Header Filter Error - Matching filter function not found: ",e.definition.headerFilterFunc);break;case"function":r=function(r){var i=e.definition.headerFilterFuncParams||{},n=e.getFieldValue(r);return i="function"==typeof i?i(t,n,r):i,e.definition.headerFilterFunc(t,n,r,i)},a=r}if(!r)switch(o){case"partial":r=function(r){var i=e.getFieldValue(r);return void 0!==i&&null!==i&&String(i).toLowerCase().indexOf(String(t).toLowerCase())>-1},a="like";break;default:r=function(r){return e.getFieldValue(r)==t},a="="}n.headerFilters[l]={value:t,func:r,type:a,params:i||{}}}s=JSON.stringify(n.headerFilters),n.prevHeaderFilterChangeCheck!==s&&(n.prevHeaderFilterChangeCheck=s,n.changed=!0,n.table.rowManager.filterRefresh())}return!0}var i,n=this,l=e.getField();e.modules.filter={success:r,attrType:!1,tagType:!1,emptyFunc:!1},this.generateHeaderFilterElement(e)},Filter.prototype.generateHeaderFilterElement=function(e,t,r){function i(){}var n,l,o,a,s,d,u,f=this,c=this,h=e.modules.filter.success,p=e.getField();if(e.modules.filter.headerElement&&e.modules.filter.headerElement.parentNode&&e.contentElement.removeChild(e.modules.filter.headerElement.parentNode),p){switch(e.modules.filter.emptyFunc=e.definition.headerFilterEmptyCheck||function(e){return!e&&"0"!==e},n=document.createElement("div"),n.classList.add("tabulator-header-filter"),_typeof(e.definition.headerFilter)){case"string":c.table.modules.edit.editors[e.definition.headerFilter]?(l=c.table.modules.edit.editors[e.definition.headerFilter],"tick"!==e.definition.headerFilter&&"tickCross"!==e.definition.headerFilter||e.definition.headerFilterEmptyCheck||(e.modules.filter.emptyFunc=function(e){return!0!==e&&!1!==e})):console.warn("Filter Error - Cannot build header filter, No such editor found: ",e.definition.editor);break;case"function":l=e.definition.headerFilter;break;case"boolean":e.modules.edit&&e.modules.edit.editor?l=e.modules.edit.editor:e.definition.formatter&&c.table.modules.edit.editors[e.definition.formatter]?(l=c.table.modules.edit.editors[e.definition.formatter],"tick"!==e.definition.formatter&&"tickCross"!==e.definition.formatter||e.definition.headerFilterEmptyCheck||(e.modules.filter.emptyFunc=function(e){return!0!==e&&!1!==e})):l=c.table.modules.edit.editors.input}if(l){if(a={getValue:function(){return void 0!==t?t:""},getField:function(){return e.definition.field},getElement:function(){return n},getColumn:function(){return e.getComponent()},getRow:function(){return{normalizeHeight:function(){}}}},u=e.definition.headerFilterParams||{},u="function"==typeof u?u.call(c.table):u,!(o=l.call(this.table.modules.edit,a,function(){},h,i,u)))return void console.warn("Filter Error - Cannot add filter to "+p+" column, editor returned a value of false");if(!(o instanceof Node))return void console.warn("Filter Error - Cannot add filter to "+p+" column, editor should return an instance of Node, the editor returned:",o);p?c.table.modules.localize.bind("headerFilters|columns|"+e.definition.field,function(e){o.setAttribute("placeholder",void 0!==e&&e?e:c.table.modules.localize.getText("headerFilters|default"))}):c.table.modules.localize.bind("headerFilters|default",function(e){o.setAttribute("placeholder",void 0!==c.column.definition.headerFilterPlaceholder&&c.column.definition.headerFilterPlaceholder?c.column.definition.headerFilterPlaceholder:e)}),o.addEventListener("click",function(e){e.stopPropagation(),o.focus()}),o.addEventListener("focus",function(e){var t=f.table.columnManager.element.scrollLeft;t!==f.table.rowManager.element.scrollLeft&&(f.table.rowManager.scrollHorizontal(t),f.table.columnManager.scrollHorizontal(t))}),s=!1,d=function(e){s&&clearTimeout(s),s=setTimeout(function(){h(o.value)},c.table.options.headerFilterLiveFilterDelay)},e.modules.filter.headerElement=o,e.modules.filter.attrType=o.hasAttribute("type")?o.getAttribute("type").toLowerCase():"",e.modules.filter.tagType=o.tagName.toLowerCase(),!1!==e.definition.headerFilterLiveFilter&&("autocomplete"!==e.definition.headerFilter&&"tickCross"!==e.definition.headerFilter&&("autocomplete"!==e.definition.editor&&"tickCross"!==e.definition.editor||!0!==e.definition.headerFilter)&&(o.addEventListener("keyup",d),o.addEventListener("search",d),"number"==e.modules.filter.attrType&&o.addEventListener("change",function(e){h(o.value)}),"text"==e.modules.filter.attrType&&"ie"!==this.table.browser&&o.setAttribute("type","search")),"input"!=e.modules.filter.tagType&&"select"!=e.modules.filter.tagType&&"textarea"!=e.modules.filter.tagType||o.addEventListener("mousedown",function(e){e.stopPropagation()})),n.appendChild(o),e.contentElement.appendChild(n),r||c.headerFilterColumns.push(e)}}else console.warn("Filter Error - Cannot add header filter, column has no field set:",e.definition.title)},Filter.prototype.hideHeaderFilterElements=function(){this.headerFilterColumns.forEach(function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="none")})},Filter.prototype.showHeaderFilterElements=function(){this.headerFilterColumns.forEach(function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="")})},Filter.prototype.setHeaderFilterFocus=function(e){e.modules.filter&&e.modules.filter.headerElement?e.modules.filter.headerElement.focus():console.warn("Column Filter Focus Error - No header filter set on column:",e.getField())},Filter.prototype.getHeaderFilterValue=function(e){if(e.modules.filter&&e.modules.filter.headerElement)return e.modules.filter.headerElement.value;console.warn("Column Filter Error - No header filter set on column:",e.getField())},Filter.prototype.setHeaderFilterValue=function(e,t){e&&(e.modules.filter&&e.modules.filter.headerElement?(this.generateHeaderFilterElement(e,t,!0),e.modules.filter.success(t)):console.warn("Column Filter Error - No header filter set on column:",e.getField()))},Filter.prototype.reloadHeaderFilter=function(e){e&&(e.modules.filter&&e.modules.filter.headerElement?this.generateHeaderFilterElement(e,e.modules.filter.value,!0):console.warn("Column Filter Error - No header filter set on column:",e.getField()))},Filter.prototype.hasChanged=function(){var e=this.changed;return this.changed=!1,e},Filter.prototype.setFilter=function(e,t,r,i){var n=this;n.filterList=[],Array.isArray(e)||(e=[{field:e,type:t,value:r,params:i}]),n.addFilter(e)},Filter.prototype.addFilter=function(e,t,r,i){var n=this;Array.isArray(e)||(e=[{field:e,type:t,value:r,params:i}]),e.forEach(function(e){(e=n.findFilter(e))&&(n.filterList.push(e),n.changed=!0)}),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},Filter.prototype.findFilter=function(e){var t,r=this;if(Array.isArray(e))return this.findSubFilters(e);var i=!1;return"function"==typeof e.field?i=function(t){return e.field(t,e.type||{})}:r.filters[e.type]?(t=r.table.columnManager.getColumnByField(e.field),i=t?function(i){return r.filters[e.type](e.value,t.getFieldValue(i),i,e.params||{})}:function(t){return r.filters[e.type](e.value,t[e.field],t,e.params||{})}):console.warn("Filter Error - No such filter type found, ignoring: ",e.type),e.func=i,!!e.func&&e},Filter.prototype.findSubFilters=function(e){var t=this,r=[];return e.forEach(function(e){(e=t.findFilter(e))&&r.push(e)}),!!r.length&&r},Filter.prototype.getFilters=function(e,t){var r=[];return e&&(r=this.getHeaderFilters()),t&&r.forEach(function(e){"function"==typeof e.type&&(e.type="function")}),r=r.concat(this.filtersToArray(this.filterList,t))},Filter.prototype.filtersToArray=function(e,t){var r=this,i=[];return e.forEach(function(e){var n;Array.isArray(e)?i.push(r.filtersToArray(e,t)):(n={field:e.field,type:e.type,value:e.value},t&&"function"==typeof n.type&&(n.type="function"),i.push(n))}),i},Filter.prototype.getHeaderFilters=function(){var e=[];for(var t in this.headerFilters)e.push({field:t,type:this.headerFilters[t].type,value:this.headerFilters[t].value});return e},Filter.prototype.removeFilter=function(e,t,r){var i=this;Array.isArray(e)||(e=[{field:e,type:t,value:r}]),e.forEach(function(e){var t=-1;t="object"==_typeof(e.field)?i.filterList.findIndex(function(t){return e===t}):i.filterList.findIndex(function(t){return e.field===t.field&&e.type===t.type&&e.value===t.value}),t>-1?(i.filterList.splice(t,1),i.changed=!0):console.warn("Filter Error - No matching filter type found, ignoring: ",e.type)}),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},Filter.prototype.clearFilter=function(e){this.filterList=[],e&&this.clearHeaderFilter(),this.changed=!0,this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},Filter.prototype.clearHeaderFilter=function(){var e=this;this.headerFilters={},e.prevHeaderFilterChangeCheck="{}",this.headerFilterColumns.forEach(function(t){t.modules.filter.value=null,t.modules.filter.prevSuccess=void 0,e.reloadHeaderFilter(t)}),this.changed=!0},Filter.prototype.search=function(e,t,r,i){var n=this,l=[],o=[];return Array.isArray(t)||(t=[{field:t,type:r,value:i}]),t.forEach(function(e){(e=n.findFilter(e))&&o.push(e)}),this.table.rowManager.rows.forEach(function(t){var r=!0;o.forEach(function(e){n.filterRecurse(e,t.getData())||(r=!1)}),r&&l.push("data"===e?t.getData("data"):t.getComponent())}),l},Filter.prototype.filter=function(e,t){var r=this,i=[],n=[];return r.table.options.dataFiltering&&r.table.options.dataFiltering.call(r.table,r.getFilters()),r.table.options.ajaxFiltering||!r.filterList.length&&!Object.keys(r.headerFilters).length?i=e.slice(0):e.forEach(function(e){r.filterRow(e)&&i.push(e)}),r.table.options.dataFiltered&&(i.forEach(function(e){n.push(e.getComponent())}),r.table.options.dataFiltered.call(r.table,r.getFilters(),n)),i},Filter.prototype.filterRow=function(e,t){var r=this,i=!0,n=e.getData();r.filterList.forEach(function(e){r.filterRecurse(e,n)||(i=!1)});for(var l in r.headerFilters)r.headerFilters[l].func(n)||(i=!1);return i},Filter.prototype.filterRecurse=function(e,t){var r=this,i=!1;return Array.isArray(e)?e.forEach(function(e){r.filterRecurse(e,t)&&(i=!0)}):i=e.func(t),i},Filter.prototype.filters={"=":function(e,t,r,i){return t==e},"<":function(e,t,r,i){return t":function(e,t,r,i){return t>e},">=":function(e,t,r,i){return t>=e},"!=":function(e,t,r,i){return t!=e},regex:function(e,t,r,i){return"string"==typeof e&&(e=new RegExp(e)),e.test(t)},like:function(e,t,r,i){return null===e||void 0===e?t===e:void 0!==t&&null!==t&&String(t).toLowerCase().indexOf(e.toLowerCase())>-1},keywords:function(e,t,r,i){var n=e.toLowerCase().split(void 0===i.separator?" ":i.separator),l=String(null===t||void 0===t?"":t).toLowerCase(),o=[];return n.forEach(function(e){l.includes(e)&&o.push(!0)}),i.matchAll?o.length===n.length:!!o.length},starts:function(e,t,r,i){return null===e||void 0===e?t===e:void 0!==t&&null!==t&&String(t).toLowerCase().startsWith(e.toLowerCase())},ends:function(e,t,r,i){return null===e||void 0===e?t===e:void 0!==t&&null!==t&&String(t).toLowerCase().endsWith(e.toLowerCase())},in:function(e,t,r,i){return Array.isArray(e)?e.indexOf(t)>-1:(console.warn("Filter Error - filter value is not an array:",e),!1)}},Tabulator.prototype.registerModule("filter",Filter); \ No newline at end of file diff --git a/website/js/vendor/tabulator/js/modules/format.js b/admin/js/vendors/tabulator/js/modules/format.js similarity index 97% rename from website/js/vendor/tabulator/js/modules/format.js rename to admin/js/vendors/tabulator/js/modules/format.js index 8c77ec2..5714027 100644 --- a/website/js/vendor/tabulator/js/modules/format.js +++ b/admin/js/vendors/tabulator/js/modules/format.js @@ -1,6 +1,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; -/* Tabulator v4.8.3 (c) Oliver Folkerd */ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ var Format = function Format(table) { this.table = table; //hold Tabulator object @@ -62,9 +62,8 @@ Format.prototype.lookupFormatter = function (column, type) { }; Format.prototype.cellRendered = function (cell) { - if (cell.modules.format && cell.modules.format.renderedCallback && !cell.modules.format.rendered) { + if (cell.modules.format && cell.modules.format.renderedCallback) { cell.modules.format.renderedCallback(); - cell.modules.format.rendered = true; } }; @@ -79,7 +78,6 @@ Format.prototype.formatValue = function (cell) { } cell.modules.format.renderedCallback = callback; - cell.modules.format.rendered = false; } return cell.column.modules.format.formatter.call(this, component, params, onRendered); @@ -96,7 +94,6 @@ Format.prototype.formatExportValue = function (cell, type) { } cell.modules.format.renderedCallback = callback; - cell.modules.format.rendered = false; }; params = typeof formatter.params === "function" ? formatter.params(component) : formatter.params; @@ -687,7 +684,7 @@ Format.prototype.formatters = { return el; }, - rowSelection: function rowSelection(cell, formatterParams, onRendered) { + rowSelection: function rowSelection(cell) { var _this = this; var checkbox = document.createElement("input"); @@ -703,23 +700,18 @@ Format.prototype.formatters = { if (typeof cell.getRow == 'function') { var row = cell.getRow(); - if (row instanceof RowComponent) { - - checkbox.addEventListener("change", function (e) { - row.toggleSelect(); - }); + checkbox.addEventListener("change", function (e) { + row.toggleSelect(); + }); - checkbox.checked = row.isSelected && row.isSelected(); - this.table.modules.selectRow.registerRowSelectCheckbox(row, checkbox); - } else { - checkbox = ""; - } + checkbox.checked = row.isSelected(); + this.table.modules.selectRow.registerRowSelectCheckbox(row, checkbox); } else { checkbox.addEventListener("change", function (e) { if (_this.table.modules.selectRow.selectedRows.length) { _this.table.deselectRow(); } else { - _this.table.selectRow(formatterParams.rowRange); + _this.table.selectRow(); } }); diff --git a/admin/js/vendors/tabulator/js/modules/format.min.js b/admin/js/vendors/tabulator/js/modules/format.min.js new file mode 100644 index 0000000..0b39b61 --- /dev/null +++ b/admin/js/vendors/tabulator/js/modules/format.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ +var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Format=function(e){this.table=e};Format.prototype.initializeColumn=function(e){e.modules.format=this.lookupFormatter(e,""),void 0!==e.definition.formatterPrint&&(e.modules.format.print=this.lookupFormatter(e,"Print")),void 0!==e.definition.formatterClipboard&&(e.modules.format.clipboard=this.lookupFormatter(e,"Clipboard")),void 0!==e.definition.formatterHtmlOutput&&(e.modules.format.htmlOutput=this.lookupFormatter(e,"HtmlOutput"))},Format.prototype.lookupFormatter=function(e,t){var o={params:e.definition["formatter"+t+"Params"]||{}},r=e.definition["formatter"+t];switch(void 0===r?"undefined":_typeof(r)){case"string":"tick"===r&&(r="tickCross",void 0===o.params.crossElement&&(o.params.crossElement=!1),console.warn("DEPRECATION WARNING - the tick formatter has been deprecated, please use the tickCross formatter with the crossElement param set to false")),this.formatters[r]?o.formatter=this.formatters[r]:(console.warn("Formatter Error - No such formatter found: ",r),o.formatter=this.formatters.plaintext);break;case"function":o.formatter=r;break;default:o.formatter=this.formatters.plaintext}return o},Format.prototype.cellRendered=function(e){e.modules.format&&e.modules.format.renderedCallback&&e.modules.format.renderedCallback()},Format.prototype.formatValue=function(e){function t(t){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=t}var o=e.getComponent(),r="function"==typeof e.column.modules.format.params?e.column.modules.format.params(o):e.column.modules.format.params;return e.column.modules.format.formatter.call(this,o,r,t)},Format.prototype.formatExportValue=function(e,t){var o,r=e.column.modules.format[t];if(r){var a=function(t){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=t};return o="function"==typeof r.params?r.params(component):r.params,r.formatter.call(this,e.getComponent(),o,a)}return this.formatValue(e)},Format.prototype.sanitizeHTML=function(e){if(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(e).replace(/[&<>"'`=\/]/g,function(e){return t[e]})}return e},Format.prototype.emptyToSpace=function(e){return null===e||void 0===e||""===e?" ":e},Format.prototype.getFormatter=function(e){var e;switch(void 0===e?"undefined":_typeof(e)){case"string":this.formatters[e]?e=this.formatters[e]:(console.warn("Formatter Error - No such formatter found: ",e),e=this.formatters.plaintext);break;case"function":e=e;break;default:e=this.formatters.plaintext}return e},Format.prototype.formatters={plaintext:function(e,t,o){return this.emptyToSpace(this.sanitizeHTML(e.getValue()))},html:function(e,t,o){return e.getValue()},textarea:function(e,t,o){return e.getElement().style.whiteSpace="pre-wrap",this.emptyToSpace(this.sanitizeHTML(e.getValue()))},money:function(e,t,o){var r,a,n,l,i=parseFloat(e.getValue()),s=t.decimal||".",c=t.thousand||",",u=t.symbol||"",d=!!t.symbolAfter,m=void 0!==t.precision?t.precision:2;if(isNaN(i))return this.emptyToSpace(this.sanitizeHTML(e.getValue()));for(r=!1!==m?i.toFixed(m):i,r=String(r).split("."),a=r[0],n=r.length>1?s+r[1]:"",l=/(\d+)(\d{3})/;l.test(a);)a=a.replace(l,"$1"+c+"$2");return d?a+n+u:u+a+n},link:function(e,t,o){var r,a=e.getValue(),n=t.urlPrefix||"",l=t.download,i=a,s=document.createElement("a");if(t.labelField&&(r=e.getData(),i=r[t.labelField]),t.label)switch(_typeof(t.label)){case"string":i=t.label;break;case"function":i=t.label(e)}if(i){if(t.urlField&&(r=e.getData(),a=r[t.urlField]),t.url)switch(_typeof(t.url)){case"string":a=t.url;break;case"function":a=t.url(e)}return s.setAttribute("href",n+a),t.target&&s.setAttribute("target",t.target),t.download&&(l="function"==typeof l?l(e):!0===l?"":l,s.setAttribute("download",l)),s.innerHTML=this.emptyToSpace(this.sanitizeHTML(i)),s}return" "},image:function(e,t,o){var r=document.createElement("img");switch(r.setAttribute("src",e.getValue()),_typeof(t.height)){case"number":r.style.height=t.height+"px";break;case"string":r.style.height=t.height}switch(_typeof(t.width)){case"number":r.style.width=t.width+"px";break;case"string":r.style.width=t.width}return r.addEventListener("load",function(){e.getRow().normalizeHeight()}),r},tickCross:function(e,t,o){var r=e.getValue(),a=e.getElement(),n=t.allowEmpty,l=t.allowTruthy,i=void 0!==t.tickElement?t.tickElement:'',s=void 0!==t.crossElement?t.crossElement:'';return l&&r||!0===r||"true"===r||"True"===r||1===r||"1"===r?(a.setAttribute("aria-checked",!0),i||""):!n||"null"!==r&&""!==r&&null!==r&&void 0!==r?(a.setAttribute("aria-checked",!1),s||""):(a.setAttribute("aria-checked","mixed"),"")},datetime:function(e,t,o){var r=t.inputFormat||"YYYY-MM-DD hh:mm:ss",a=t.outputFormat||"DD/MM/YYYY hh:mm:ss",n=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",l=e.getValue(),i=moment(l,r);return i.isValid()?t.timezone?i.tz(t.timezone).format(a):i.format(a):!0===n?l:"function"==typeof n?n(l):n},datetimediff:function(e,t,o){var r=t.inputFormat||"YYYY-MM-DD hh:mm:ss",a=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",n=void 0!==t.suffix&&t.suffix,l=void 0!==t.unit?t.unit:void 0,i=void 0!==t.humanize&&t.humanize,s=void 0!==t.date?t.date:moment(),c=e.getValue(),u=moment(c,r);return u.isValid()?i?moment.duration(u.diff(s)).humanize(n):u.diff(s,l)+(n?" "+n:""):!0===a?c:"function"==typeof a?a(c):a},lookup:function(e,t,o){var r=e.getValue();return void 0===t[r]?(console.warn("Missing display value for "+r),r):t[r]},star:function(e,t,o){var r=e.getValue(),a=e.getElement(),n=t&&t.stars?t.stars:5,l=document.createElement("span"),i=document.createElementNS("http://www.w3.org/2000/svg","svg");l.style.verticalAlign="middle",i.setAttribute("width","14"),i.setAttribute("height","14"),i.setAttribute("viewBox","0 0 512 512"),i.setAttribute("xml:space","preserve"),i.style.padding="0 1px",r=r&&!isNaN(r)?parseInt(r):0,r=Math.max(0,Math.min(r,n));for(var s=1;s<=n;s++){var c=i.cloneNode(!0);c.innerHTML=s<=r?'':'',l.appendChild(c)}return a.style.whiteSpace="nowrap",a.style.overflow="hidden",a.style.textOverflow="ellipsis",a.setAttribute("aria-label",r),l},traffic:function(e,t,o){var r,a,n=this.sanitizeHTML(e.getValue())||0,l=document.createElement("span"),i=t&&t.max?t.max:100,s=t&&t.min?t.min:0,c=t&&void 0!==t.color?t.color:["red","orange","green"],u="#666666";if(!isNaN(n)&&void 0!==e.getValue()){switch(l.classList.add("tabulator-traffic-light"),a=parseFloat(n)<=i?parseFloat(n):i,a=parseFloat(a)>=s?parseFloat(a):s,r=(i-s)/100,a=Math.round((a-s)/r),void 0===c?"undefined":_typeof(c)){case"string":u=c;break;case"function":u=c(n);break;case"object":if(Array.isArray(c)){var d=100/c.length,m=Math.floor(a/d);m=Math.min(m,c.length-1),m=Math.max(m,0),u=c[m];break}}return l.style.backgroundColor=u,l}},progress:function(e,t,o){var r,a,n,l,i,s=this.sanitizeHTML(e.getValue())||0,c=e.getElement(),u=t&&t.max?t.max:100,d=t&&t.min?t.min:0,m=t&&t.legendAlign?t.legendAlign:"center";switch(a=parseFloat(s)<=u?parseFloat(s):u,a=parseFloat(a)>=d?parseFloat(a):d,r=(u-d)/100,a=Math.round((a-d)/r),_typeof(t.color)){case"string":n=t.color;break;case"function":n=t.color(s);break;case"object":if(Array.isArray(t.color)){var p=100/t.color.length,f=Math.floor(a/p);f=Math.min(f,t.color.length-1),f=Math.max(f,0),n=t.color[f];break}default:n="#2DC214"}switch(_typeof(t.legend)){case"string":l=t.legend;break;case"function":l=t.legend(s);break;case"boolean":l=s;break;default:l=!1}switch(_typeof(t.legendColor)){case"string":i=t.legendColor;break;case"function":i=t.legendColor(s);break;case"object":if(Array.isArray(t.legendColor)){var p=100/t.legendColor.length,f=Math.floor(a/p);f=Math.min(f,t.legendColor.length-1),f=Math.max(f,0),i=t.legendColor[f]}break;default:i="#000"}c.style.minWidth="30px",c.style.position="relative",c.setAttribute("aria-label",a);var h=document.createElement("div");if(h.style.display="inline-block",h.style.position="relative",h.style.width=a+"%",h.style.backgroundColor=n,h.style.height="100%",h.setAttribute("data-max",u),h.setAttribute("data-min",d),l){var g=document.createElement("div");g.style.position="absolute",g.style.top="4px",g.style.left=0,g.style.textAlign=m,g.style.width="100%",g.style.color=i,g.innerHTML=l}return o(function(){if(!(e instanceof CellComponent)){var t=document.createElement("div");t.style.position="absolute",t.style.top="4px",t.style.bottom="4px",t.style.left="4px",t.style.right="4px",c.appendChild(t),c=t}c.appendChild(h),l&&c.appendChild(g)}),""},color:function(e,t,o){return e.getElement().style.backgroundColor=this.sanitizeHTML(e.getValue()),""},buttonTick:function(e,t,o){return''},buttonCross:function(e,t,o){return''},rownum:function(e,t,o){return this.table.rowManager.activeRows.indexOf(e.getRow()._getSelf())+1},handle:function(e,t,o){return e.getElement().classList.add("tabulator-row-handle"),"
"},responsiveCollapse:function(e,t,o){function r(e){var t=n.element;n.open=e,t&&(n.open?(a.classList.add("open"),t.style.display=""):(a.classList.remove("open"),t.style.display="none"))}var a=document.createElement("div"),n=e.getRow()._row.modules.responsiveLayout;return a.classList.add("tabulator-responsive-collapse-toggle"),a.innerHTML="+-",e.getElement().classList.add("tabulator-row-handle"),a.addEventListener("click",function(e){e.stopImmediatePropagation(),r(!n.open)}),r(n.open),a},rowSelection:function(e){var t=this,o=document.createElement("input");if(o.type="checkbox",this.table.modExists("selectRow",!0))if(o.addEventListener("click",function(e){e.stopPropagation()}),"function"==typeof e.getRow){var r=e.getRow();o.addEventListener("change",function(e){r.toggleSelect()}),o.checked=r.isSelected(),this.table.modules.selectRow.registerRowSelectCheckbox(r,o)}else o.addEventListener("change",function(e){t.table.modules.selectRow.selectedRows.length?t.table.deselectRow():t.table.selectRow()}),this.table.modules.selectRow.registerHeaderSelectCheckbox(o);return o}},Tabulator.prototype.registerModule("format",Format); \ No newline at end of file diff --git a/website/js/vendor/tabulator/js/modules/frozen_columns.js b/admin/js/vendors/tabulator/js/modules/frozen_columns.js similarity index 99% rename from website/js/vendor/tabulator/js/modules/frozen_columns.js rename to admin/js/vendors/tabulator/js/modules/frozen_columns.js index 1edd4f7..fdbc4ab 100644 --- a/website/js/vendor/tabulator/js/modules/frozen_columns.js +++ b/admin/js/vendors/tabulator/js/modules/frozen_columns.js @@ -1,4 +1,4 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ var FrozenColumns = function FrozenColumns(table) { this.table = table; //hold Tabulator object diff --git a/website/js/vendor/tabulator/js/modules/frozen_columns.min.js b/admin/js/vendors/tabulator/js/modules/frozen_columns.min.js similarity index 98% rename from website/js/vendor/tabulator/js/modules/frozen_columns.min.js rename to admin/js/vendors/tabulator/js/modules/frozen_columns.min.js index 7813e4e..bf2bb60 100644 --- a/website/js/vendor/tabulator/js/modules/frozen_columns.min.js +++ b/admin/js/vendors/tabulator/js/modules/frozen_columns.min.js @@ -1,2 +1,2 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ var FrozenColumns=function(t){this.table=t,this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.rightPadding=0,this.initializationMode="left",this.active=!1,this.scrollEndTimer=!1};FrozenColumns.prototype.reset=function(){this.initializationMode="left",this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.rightMargin=0,this.active=!1,this.table.columnManager.headersElement.style.marginLeft=0,this.table.columnManager.element.style.paddingRight=0},FrozenColumns.prototype.initializeColumn=function(t){var e={margin:0,edge:!1};t.isGroup||(this.frozenCheck(t)?(e.position=this.initializationMode,"left"==this.initializationMode?this.leftColumns.push(t):this.rightColumns.unshift(t),this.active=!0,t.modules.frozen=e):this.initializationMode="right")},FrozenColumns.prototype.frozenCheck=function(t){return t.parent.isGroup&&t.definition.frozen&&console.warn("Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups"),t.parent.isGroup?this.frozenCheck(t.parent):t.definition.frozen},FrozenColumns.prototype.scrollHorizontal=function(){var t,e=this;this.active&&(clearTimeout(this.scrollEndTimer),this.scrollEndTimer=setTimeout(function(){e.layout()},100),t=this.table.rowManager.getVisibleRows(),this.calcMargins(),this.layoutColumnPosition(),this.layoutCalcRows(),t.forEach(function(t){"row"===t.type&&e.layoutRow(t)}),this.table.rowManager.tableElement.style.marginRight=this.rightMargin)},FrozenColumns.prototype.calcMargins=function(){this.leftMargin=this._calcSpace(this.leftColumns,this.leftColumns.length)+"px",this.table.columnManager.headersElement.style.marginLeft=this.leftMargin,this.rightMargin=this._calcSpace(this.rightColumns,this.rightColumns.length)+"px",this.table.columnManager.element.style.paddingRight=this.rightMargin,this.rightPadding=this.table.rowManager.element.clientWidth+this.table.columnManager.scrollLeft},FrozenColumns.prototype.layoutCalcRows=function(){this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&this.table.modules.columnCalcs.topRow&&this.layoutRow(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&this.table.modules.columnCalcs.botRow&&this.layoutRow(this.table.modules.columnCalcs.botRow))},FrozenColumns.prototype.layoutColumnPosition=function(t){var e=this,o=[];this.leftColumns.forEach(function(n,l){if(n.modules.frozen.margin=e._calcSpace(e.leftColumns,l)+e.table.columnManager.scrollLeft+"px",l==e.leftColumns.length-1?n.modules.frozen.edge=!0:n.modules.frozen.edge=!1,n.parent.isGroup){var i=e.getColGroupParentElement(n);o.includes(i)||(e.layoutElement(i,n),o.push(i)),n.modules.frozen.edge&&i.classList.add("tabulator-frozen-"+n.modules.frozen.position)}else e.layoutElement(n.getElement(),n);t&&n.cells.forEach(function(t){e.layoutElement(t.getElement(),n)})}),this.rightColumns.forEach(function(o,n){o.modules.frozen.margin=e.rightPadding-e._calcSpace(e.rightColumns,n+1)+"px",n==e.rightColumns.length-1?o.modules.frozen.edge=!0:o.modules.frozen.edge=!1,o.parent.isGroup?e.layoutElement(e.getColGroupParentElement(o),o):e.layoutElement(o.getElement(),o),t&&o.cells.forEach(function(t){e.layoutElement(t.getElement(),o)})})},FrozenColumns.prototype.getColGroupParentElement=function(t){return t.parent.isGroup?this.getColGroupParentElement(t.parent):t.getElement()},FrozenColumns.prototype.layout=function(){var t=this;t.active&&(this.calcMargins(),t.table.rowManager.getDisplayRows().forEach(function(e){"row"===e.type&&t.layoutRow(e)}),this.layoutCalcRows(),this.layoutColumnPosition(!0),this.table.rowManager.tableElement.style.marginRight=this.rightMargin)},FrozenColumns.prototype.layoutRow=function(t){var e=this;t.getElement().style.paddingLeft=this.leftMargin,this.leftColumns.forEach(function(o){var n=t.getCell(o);n&&e.layoutElement(n.getElement(),o)}),this.rightColumns.forEach(function(o){var n=t.getCell(o);n&&e.layoutElement(n.getElement(),o)})},FrozenColumns.prototype.layoutElement=function(t,e){e.modules.frozen&&(t.style.position="absolute",t.style.left=e.modules.frozen.margin,t.classList.add("tabulator-frozen"),e.modules.frozen.edge&&t.classList.add("tabulator-frozen-"+e.modules.frozen.position))},FrozenColumns.prototype._calcSpace=function(t,e){for(var o=0,n=0;n -1) { - var rowEl = row.getElement(); - rowEl.parentNode.removeChild(rowEl); - - this.rows.splice(index, 1); - } -}; - FrozenRows.prototype.styleRows = function (row) { var self = this; diff --git a/website/js/vendor/tabulator/js/modules/frozen_rows.min.js b/admin/js/vendors/tabulator/js/modules/frozen_rows.min.js similarity index 62% rename from website/js/vendor/tabulator/js/modules/frozen_rows.min.js rename to admin/js/vendors/tabulator/js/modules/frozen_rows.min.js index 13ee75d..c38e992 100644 --- a/website/js/vendor/tabulator/js/modules/frozen_rows.min.js +++ b/admin/js/vendors/tabulator/js/modules/frozen_rows.min.js @@ -1,2 +1,2 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ -var FrozenRows=function(e){this.table=e,this.topElement=document.createElement("div"),this.rows=[],this.displayIndex=0};FrozenRows.prototype.initialize=function(){this.rows=[],this.topElement.classList.add("tabulator-frozen-rows-holder"),this.table.columnManager.getElement().insertBefore(this.topElement,this.table.columnManager.headersElement.nextSibling)},FrozenRows.prototype.setDisplayIndex=function(e){this.displayIndex=e},FrozenRows.prototype.getDisplayIndex=function(){return this.displayIndex},FrozenRows.prototype.isFrozen=function(){return!!this.rows.length},FrozenRows.prototype.getRows=function(e){var o=e.slice(0);return this.rows.forEach(function(e){var t=o.indexOf(e);t>-1&&o.splice(t,1)}),o},FrozenRows.prototype.freezeRow=function(e){e.modules.frozen?console.warn("Freeze Error - Row is already frozen"):(e.modules.frozen=!0,this.topElement.appendChild(e.getElement()),e.initialize(),e.normalizeHeight(),this.table.rowManager.adjustTableSize(),this.rows.push(e),this.table.rowManager.refreshActiveData("display"),this.styleRows())},FrozenRows.prototype.unfreezeRow=function(e){this.rows.indexOf(e);e.modules.frozen?(e.modules.frozen=!1,this.detachRow(e),this.table.rowManager.adjustTableSize(),this.table.rowManager.refreshActiveData("display"),this.rows.length&&this.styleRows()):console.warn("Freeze Error - Row is already unfrozen")},FrozenRows.prototype.detachRow=function(e){var o=this.rows.indexOf(e);if(o>-1){var t=e.getElement();t.parentNode.removeChild(t),this.rows.splice(o,1)}},FrozenRows.prototype.styleRows=function(e){var o=this;this.rows.forEach(function(e,t){o.table.rowManager.styleRow(e,t)})},Tabulator.prototype.registerModule("frozenRows",FrozenRows); \ No newline at end of file +/* Tabulator v4.7.0 (c) Oliver Folkerd */ +var FrozenRows=function(e){this.table=e,this.topElement=document.createElement("div"),this.rows=[],this.displayIndex=0};FrozenRows.prototype.initialize=function(){this.rows=[],this.topElement.classList.add("tabulator-frozen-rows-holder"),this.table.columnManager.getElement().insertBefore(this.topElement,this.table.columnManager.headersElement.nextSibling)},FrozenRows.prototype.setDisplayIndex=function(e){this.displayIndex=e},FrozenRows.prototype.getDisplayIndex=function(){return this.displayIndex},FrozenRows.prototype.isFrozen=function(){return!!this.rows.length},FrozenRows.prototype.getRows=function(e){var o=e.slice(0);return this.rows.forEach(function(e){var t=o.indexOf(e);t>-1&&o.splice(t,1)}),o},FrozenRows.prototype.freezeRow=function(e){e.modules.frozen?console.warn("Freeze Error - Row is already frozen"):(e.modules.frozen=!0,this.topElement.appendChild(e.getElement()),e.initialize(),e.normalizeHeight(),this.table.rowManager.adjustTableSize(),this.rows.push(e),this.table.rowManager.refreshActiveData("display"),this.styleRows())},FrozenRows.prototype.unfreezeRow=function(e){var o=this.rows.indexOf(e);if(e.modules.frozen){e.modules.frozen=!1;var t=e.getElement();t.parentNode.removeChild(t),this.table.rowManager.adjustTableSize(),this.rows.splice(o,1),this.table.rowManager.refreshActiveData("display"),this.rows.length&&this.styleRows()}else console.warn("Freeze Error - Row is already unfrozen")},FrozenRows.prototype.styleRows=function(e){var o=this;this.rows.forEach(function(e,t){o.table.rowManager.styleRow(e,t)})},Tabulator.prototype.registerModule("frozenRows",FrozenRows); \ No newline at end of file diff --git a/website/js/vendor/tabulator/js/modules/group_rows.js b/admin/js/vendors/tabulator/js/modules/group_rows.js similarity index 94% rename from website/js/vendor/tabulator/js/modules/group_rows.js rename to admin/js/vendors/tabulator/js/modules/group_rows.js index 2e28c2d..05731ec 100644 --- a/website/js/vendor/tabulator/js/modules/group_rows.js +++ b/admin/js/vendors/tabulator/js/modules/group_rows.js @@ -1,4 +1,4 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ //public group object var GroupComponent = function GroupComponent(group) { @@ -166,7 +166,7 @@ Group.prototype.addBindings = function () { }); } - if ((self.groupManager.table.options.groupContextMenu || self.groupManager.table.options.groupClickMenu) && self.groupManager.table.modExists("menu")) { + if (self.groupManager.table.options.groupContextMenu && self.groupManager.table.modExists("menu")) { self.groupManager.table.modules.menu.initializeGroup.call(self.groupManager.table.modules.menu, self); } @@ -645,15 +645,6 @@ Group.prototype.generateGroupHeaderContents = function () { this.element.insertBefore(this.arrowElement, this.element.firstChild); }; -Group.prototype.getPath = function () { - var path = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; - - path.unshift(this.key); - if (this.parent) { - this.parent.getPath(path); - } - return path; -}; ////////////// Standard Row Functions ////////////// Group.prototype.getElement = function () { @@ -1046,32 +1037,6 @@ GroupRows.prototype.assignRowToGroup = function (row, oldGroups) { return !newGroupNeeded; }; -GroupRows.prototype.reassignRowToGroup = function (row) { - var oldRowGroup = row.getGroup(), - oldGroupPath = oldRowGroup.getPath(), - newGroupPath = this.getExpectedPath(row), - samePath = true; - // figure out if new group path is the same as old group path - var samePath = oldGroupPath.length == newGroupPath.length && oldGroupPath.every(function (element, index) { - return element === newGroupPath[index]; - }); - // refresh if they new path and old path aren't the same (aka the row's groupings have changed) - if (!samePath) { - oldRowGroup.removeRow(row); - this.assignRowToGroup(row, self.groups); - this.table.rowManager.refreshActiveData("group", false, true); - } -}; - -GroupRows.prototype.getExpectedPath = function (row) { - var groupPath = [], - rowData = row.getData(); - this.groupIDLookups.forEach(function (groupId) { - groupPath.push(groupId.func(rowData)); - }); - return groupPath; -}; - GroupRows.prototype.updateGroupRows = function (force) { var self = this, output = [], @@ -1097,10 +1062,6 @@ GroupRows.prototype.updateGroupRows = function (force) { }; GroupRows.prototype.scrollHeaders = function (left) { - if (this.table.options.virtualDomHoz) { - left -= this.table.vdomHoz.vDomPadLeft; - } - left = left + "px"; this.groupList.forEach(function (group) { diff --git a/admin/js/vendors/tabulator/js/modules/group_rows.min.js b/admin/js/vendors/tabulator/js/modules/group_rows.min.js new file mode 100644 index 0000000..6039f2c --- /dev/null +++ b/admin/js/vendors/tabulator/js/modules/group_rows.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ +var GroupComponent=function(t){this._group=t,this.type="GroupComponent"};GroupComponent.prototype.getKey=function(){return this._group.key},GroupComponent.prototype.getField=function(){return this._group.field},GroupComponent.prototype.getElement=function(){return this._group.element},GroupComponent.prototype.getRows=function(){return this._group.getRows(!0)},GroupComponent.prototype.getSubGroups=function(){return this._group.getSubGroups(!0)},GroupComponent.prototype.getParentGroup=function(){return!!this._group.parent&&this._group.parent.getComponent()},GroupComponent.prototype.getVisibility=function(){return console.warn("getVisibility function is deprecated, you should now use the isVisible function"),this._group.visible},GroupComponent.prototype.isVisible=function(){return this._group.visible},GroupComponent.prototype.show=function(){this._group.show()},GroupComponent.prototype.hide=function(){this._group.hide()},GroupComponent.prototype.toggle=function(){this._group.toggleVisibility()},GroupComponent.prototype._getSelf=function(){return this._group},GroupComponent.prototype.getTable=function(){return this._group.groupManager.table};var Group=function(t,o,e,r,i,s,n){this.groupManager=t,this.parent=o,this.key=r,this.level=e,this.field=i,this.hasSubGroups=e-1?e?this.rows.splice(i+1,0,t):this.rows.splice(i,0,t):e?this.rows.push(t):this.rows.unshift(t),t.modules.group=this,this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this),this.groupManager.updateGroupRows(!0)},Group.prototype.scrollHeader=function(t){this.arrowElement.style.marginLeft=t,this.groupList.forEach(function(o){o.scrollHeader(t)})},Group.prototype.getRowIndex=function(t){},Group.prototype.conformRowData=function(t){return this.field?t[this.field]=this.key:console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"),this.parent&&(t=this.parent.conformRowData(t)),t},Group.prototype.removeRow=function(t){var o=this.rows.indexOf(t),e=t.getElement();o>-1&&this.rows.splice(o,1),this.groupManager.table.options.groupValues||this.rows.length?(e.parentNode&&e.parentNode.removeChild(e),this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this)):(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this),this.groupManager.updateGroupRows(!0))},Group.prototype.removeGroup=function(t){var o,e=t.level+"_"+t.key;this.groups[e]&&(delete this.groups[e],o=this.groupList.indexOf(t),o>-1&&this.groupList.splice(o,1),this.groupList.length||(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this)))},Group.prototype.getHeadersAndRows=function(t){var o=[];return o.push(this),this._visSet(),this.visible?this.groupList.length?this.groupList.forEach(function(e){o=o.concat(e.getHeadersAndRows(t))}):(!t&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),o.push(this.calcs.top)),o=o.concat(this.rows),!t&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),o.push(this.calcs.bottom))):this.groupList.length||"table"==this.groupManager.table.options.columnCalcs||this.groupManager.table.modExists("columnCalcs")&&(!t&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),o.push(this.calcs.top))),!t&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),o.push(this.calcs.bottom)))),o},Group.prototype.getData=function(t,o){var e=[];return this._visSet(),(!t||t&&this.visible)&&this.rows.forEach(function(t){e.push(t.getData(o||"data"))}),e},Group.prototype.getRowCount=function(){var t=0;return this.groupList.length?this.groupList.forEach(function(o){t+=o.getRowCount()}):t=this.rows.length,t},Group.prototype.toggleVisibility=function(){this.visible?this.hide():this.show()},Group.prototype.hide=function(){this.visible=!1,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination?this.groupManager.updateGroupRows(!0):(this.element.classList.remove("tabulator-group-visible"),this.groupList.length?this.groupList.forEach(function(t){t.getHeadersAndRows().forEach(function(t){t.detachElement()})}):this.rows.forEach(function(t){var o=t.getElement();o.parentNode.removeChild(o)}),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex()),this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()),this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),!1)},Group.prototype.show=function(){var t=this;if(t.visible=!0,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination)this.groupManager.updateGroupRows(!0);else{this.element.classList.add("tabulator-group-visible");var o=t.getElement();this.groupList.length?this.groupList.forEach(function(t){t.getHeadersAndRows().forEach(function(t){var e=t.getElement();o.parentNode.insertBefore(e,o.nextSibling),t.initialize(),o=e})}):t.rows.forEach(function(t){var e=t.getElement();o.parentNode.insertBefore(e,o.nextSibling),t.initialize(),o=e}),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex()),this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()}this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),!0)},Group.prototype._visSet=function(){var t=[];"function"==typeof this.visible&&(this.rows.forEach(function(o){t.push(o.getData())}),this.visible=this.visible(this.key,this.getRowCount(),t,this.getComponent()))},Group.prototype.getRowGroup=function(t){var o=!1;return this.groupList.length?this.groupList.forEach(function(e){var r=e.getRowGroup(t);r&&(o=r)}):this.rows.find(function(o){return o===t})&&(o=this),o},Group.prototype.getSubGroups=function(t){var o=[];return this.groupList.forEach(function(e){o.push(t?e.getComponent():e)}),o},Group.prototype.getRows=function(t){var o=[];return this.rows.forEach(function(e){o.push(t?e.getComponent():e)}),o},Group.prototype.generateGroupHeaderContents=function(){var t=[];for(this.rows.forEach(function(o){t.push(o.getData())}),this.elementContents=this.generator(this.key,this.getRowCount(),t,this.getComponent());this.element.firstChild;)this.element.removeChild(this.element.firstChild);"string"==typeof this.elementContents?this.element.innerHTML=this.elementContents:this.element.appendChild(this.elementContents),this.element.insertBefore(this.arrowElement,this.element.firstChild)},Group.prototype.getElement=function(){this.addBindingsd=!1,this._visSet(),this.visible?this.element.classList.add("tabulator-group-visible"):this.element.classList.remove("tabulator-group-visible");for(var t=0;tr.length&&console.warn("Error creating group headers, groupHeader array is shorter than groupBy array"),t.headerGenerator=[function(){return""}],this.startOpen=[function(){return!1}],t.table.modules.localize.bind("groups|item",function(o,e){t.headerGenerator[0]=function(t,r,i){return(void 0===t?"":t)+"("+r+" "+(1===r?o:e.groups.items)+")"}}),this.groupIDLookups=[],Array.isArray(o)||o)this.table.modExists("columnCalcs")&&"table"!=this.table.options.columnCalcs&&"both"!=this.table.options.columnCalcs&&this.table.modules.columnCalcs.removeCalcs();else if(this.table.modExists("columnCalcs")&&"group"!=this.table.options.columnCalcs){var i=this.table.columnManager.getRealColumns();i.forEach(function(o){o.definition.topCalc&&t.table.modules.columnCalcs.initializeTopRow(),o.definition.bottomCalc&&t.table.modules.columnCalcs.initializeBottomRow()})}Array.isArray(o)||(o=[o]),o.forEach(function(o,e){var r,i;"function"==typeof o?r=o:(i=t.table.columnManager.getColumnByField(o),r=i?function(t){return i.getFieldValue(t)}:function(t){return t[o]}),t.groupIDLookups.push({field:"function"!=typeof o&&o,func:r,values:!!t.allowedValues&&t.allowedValues[e]})}),e&&(Array.isArray(e)||(e=[e]),e.forEach(function(t){t="function"==typeof t?t:function(){return!0}}),t.startOpen=e),r&&(t.headerGenerator=Array.isArray(r)?r:[r]),this.initialized=!0},GroupRows.prototype.setDisplayIndex=function(t){this.displayIndex=t},GroupRows.prototype.getDisplayIndex=function(){return this.displayIndex},GroupRows.prototype.getRows=function(t){return this.groupIDLookups.length?(this.table.options.dataGrouping.call(this.table),this.generateGroups(t),this.table.options.dataGrouped&&this.table.options.dataGrouped.call(this.table,this.getGroups(!0)),this.updateGroupRows()):t.slice(0)},GroupRows.prototype.getGroups=function(t){var o=[];return this.groupList.forEach(function(e){o.push(t?e.getComponent():e)}),o},GroupRows.prototype.getChildGroups=function(t){var o=this,e=[];return t||(t=this),t.groupList.forEach(function(t){t.groupList.length?e=e.concat(o.getChildGroups(t)):e.push(t)}),e},GroupRows.prototype.wipe=function(){this.groupList.forEach(function(t){t.wipe()})},GroupRows.prototype.pullGroupListData=function(t){var o=this,e=[];return t.forEach(function(t){var r={};r.level=0,r.rowCount=0,r.headerContent="";var i=[];t.hasSubGroups?(i=o.pullGroupListData(t.groupList),r.level=t.level,r.rowCount=i.length-t.groupList.length,r.headerContent=t.generator(t.key,r.rowCount,t.rows,t),e.push(r),e=e.concat(i)):(r.level=t.level,r.headerContent=t.generator(t.key,t.rows.length,t.rows,t),r.rowCount=t.getRows().length,e.push(r),t.getRows().forEach(function(t){e.push(t.getData("data"))}))}),e},GroupRows.prototype.getGroupedData=function(){return this.pullGroupListData(this.groupList)},GroupRows.prototype.getRowGroup=function(t){var o=!1;return this.groupList.forEach(function(e){var r=e.getRowGroup(t);r&&(o=r)}),o},GroupRows.prototype.countGroups=function(){return this.groupList.length},GroupRows.prototype.generateGroups=function(t){var o=this,e=o.groups;o.groups={},o.groupList=[],this.allowedValues&&this.allowedValues[0]?(this.allowedValues[0].forEach(function(t){o.createGroup(t,0,e)}),t.forEach(function(t){o.assignRowToExistingGroup(t,e)})):t.forEach(function(t){o.assignRowToGroup(t,e)})},GroupRows.prototype.createGroup=function(t,o,e){var r,i=o+"_"+t;e=e||[],r=new Group(this,!1,o,t,this.groupIDLookups[0].field,this.headerGenerator[0],e[i]),this.groups[i]=r,this.groupList.push(r)},GroupRows.prototype.assignRowToExistingGroup=function(t,o){var e=this.groupIDLookups[0].func(t.getData()),r="0_"+e;this.groups[r]&&this.groups[r].addRow(t)},GroupRows.prototype.assignRowToGroup=function(t,o){var e=this.groupIDLookups[0].func(t.getData()),r=!this.groups["0_"+e];return r&&this.createGroup(e,0,o),this.groups["0_"+e].addRow(t),!r},GroupRows.prototype.updateGroupRows=function(t){var o=this,e=[];if(o.groupList.forEach(function(t){e=e.concat(t.getHeadersAndRows())}),t){var r=o.table.rowManager.setDisplayRows(e,this.getDisplayIndex());!0!==r&&this.setDisplayIndex(r),o.table.rowManager.refreshActiveData("group",!0,!0)}return e},GroupRows.prototype.scrollHeaders=function(t){t+="px",this.groupList.forEach(function(o){o.scrollHeader(t)})},GroupRows.prototype.removeGroup=function(t){var o,e=t.level+"_"+t.key;this.groups[e]&&(delete this.groups[e],(o=this.groupList.indexOf(t))>-1&&this.groupList.splice(o,1))},Tabulator.prototype.registerModule("groupRows",GroupRows); \ No newline at end of file diff --git a/website/js/vendor/tabulator/js/modules/history.js b/admin/js/vendors/tabulator/js/modules/history.js similarity index 89% rename from website/js/vendor/tabulator/js/modules/history.js rename to admin/js/vendors/tabulator/js/modules/history.js index 87a053d..1c3ae3e 100644 --- a/website/js/vendor/tabulator/js/modules/history.js +++ b/admin/js/vendors/tabulator/js/modules/history.js @@ -1,4 +1,4 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ var History = function History(table) { this.table = table; //hold Tabulator object @@ -33,21 +33,6 @@ History.prototype.getHistoryRedoSize = function () { return this.history.length - (this.index + 1); }; -History.prototype.clearComponentHistory = function (component) { - var index = this.history.findIndex(function (item) { - return item.component === component; - }); - - if (index > -1) { - this.history.splice(index, 1); - if (index <= this.index) { - this.index--; - } - - this.clearComponentHistory(component); - } -}; - History.prototype.undo = function () { if (this.index > -1) { diff --git a/admin/js/vendors/tabulator/js/modules/history.min.js b/admin/js/vendors/tabulator/js/modules/history.min.js new file mode 100644 index 0000000..5df3187 --- /dev/null +++ b/admin/js/vendors/tabulator/js/modules/history.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ +var History=function(t){this.table=t,this.history=[],this.index=-1};History.prototype.clear=function(){this.history=[],this.index=-1},History.prototype.action=function(t,o,e){this.history=this.history.slice(0,this.index+1),this.history.push({type:t,component:o,data:e}),this.index++},History.prototype.getHistoryUndoSize=function(){return this.index+1},History.prototype.getHistoryRedoSize=function(){return this.history.length-(this.index+1)},History.prototype.undo=function(){if(this.index>-1){var t=this.history[this.index];return this.undoers[t.type].call(this,t),this.index--,this.table.options.historyUndo.call(this.table,t.type,t.component.getComponent(),t.data),!0}return console.warn("History Undo Error - No more history to undo"),!1},History.prototype.redo=function(){if(this.history.length-1>this.index){this.index++;var t=this.history[this.index];return this.redoers[t.type].call(this,t),this.table.options.historyRedo.call(this.table,t.type,t.component.getComponent(),t.data),!0}return console.warn("History Redo Error - No more history to redo"),!1},History.prototype.undoers={cellEdit:function(t){t.component.setValueProcessData(t.data.oldValue)},rowAdd:function(t){t.component.deleteActual()},rowDelete:function(t){var o=this.table.rowManager.addRowActual(t.data.data,t.data.pos,t.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(t.component,o)},rowMove:function(t){this.table.rowManager.moveRowActual(t.component,this.table.rowManager.rows[t.data.posFrom],!t.data.after),this.table.rowManager.redraw()}},History.prototype.redoers={cellEdit:function(t){t.component.setValueProcessData(t.data.newValue)},rowAdd:function(t){var o=this.table.rowManager.addRowActual(t.data.data,t.data.pos,t.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(t.component,o)},rowDelete:function(t){t.component.deleteActual()},rowMove:function(t){this.table.rowManager.moveRowActual(t.component,this.table.rowManager.rows[t.data.posTo],t.data.after),this.table.rowManager.redraw()}},History.prototype._rebindRow=function(t,o){this.history.forEach(function(e){if(e.component instanceof Row)e.component===t&&(e.component=o);else if(e.component instanceof Cell&&e.component.row===t){var i=e.component.column.getField();i&&(e.component=o.getCell(i))}})},Tabulator.prototype.registerModule("history",History); \ No newline at end of file diff --git a/website/js/vendor/tabulator/js/modules/html_table_import.js b/admin/js/vendors/tabulator/js/modules/html_table_import.js similarity index 98% rename from website/js/vendor/tabulator/js/modules/html_table_import.js rename to admin/js/vendors/tabulator/js/modules/html_table_import.js index 2f5f0fb..34fed7c 100644 --- a/website/js/vendor/tabulator/js/modules/html_table_import.js +++ b/admin/js/vendors/tabulator/js/modules/html_table_import.js @@ -1,6 +1,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; -/* Tabulator v4.8.3 (c) Oliver Folkerd */ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ var HtmlTableImport = function HtmlTableImport(table) { this.table = table; //hold Tabulator object diff --git a/website/js/vendor/tabulator/js/modules/html_table_import.min.js b/admin/js/vendors/tabulator/js/modules/html_table_import.min.js similarity index 96% rename from website/js/vendor/tabulator/js/modules/html_table_import.min.js rename to admin/js/vendors/tabulator/js/modules/html_table_import.min.js index 0076035..aef2b5c 100644 --- a/website/js/vendor/tabulator/js/modules/html_table_import.min.js +++ b/admin/js/vendors/tabulator/js/modules/html_table_import.min.js @@ -1,2 +1,2 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},HtmlTableImport=function(t){this.table=t,this.fieldIndex=[],this.hasIndex=!1};HtmlTableImport.prototype.parseTable=function(){var t=this,e=t.table.element,o=t.table.options,a=(o.columns,e.getElementsByTagName("th")),n=e.getElementsByTagName("tbody")[0],l=[];t.hasIndex=!1,t.table.options.htmlImporting.call(this.table),n=n?n.getElementsByTagName("tr"):[],t._extractOptions(e,o),a.length?t._extractHeaders(a,n):t._generateBlankHeaders(a,n);for(var r=0;r-1&&t.pressedKeys.splice(n,1)}},this.table.element.addEventListener("keydown",this.keyupBinding),this.table.element.addEventListener("keyup",this.keydownBinding)},Keybindings.prototype.clearBindings=function(){this.keyupBinding&&this.table.element.removeEventListener("keydown",this.keyupBinding),this.keydownBinding&&this.table.element.removeEventListener("keyup",this.keydownBinding)},Keybindings.prototype.checkBinding=function(t,e){var i=this,n=!0;return t.ctrlKey==e.ctrl&&t.shiftKey==e.shift&&t.metaKey==e.meta&&(e.keys.forEach(function(t){-1==i.pressedKeys.indexOf(t)&&(n=!1)}),n&&e.action.call(i,t),!0)},Keybindings.prototype.bindings={navPrev:"shift + 9",navNext:9,navUp:38,navDown:40,scrollPageUp:33,scrollPageDown:34,scrollToStart:36,scrollToEnd:35,undo:"ctrl + 90",redo:"ctrl + 89",copyToClipboard:"ctrl + 67"},Keybindings.prototype.actions={keyBlock:function(t){t.stopPropagation(),t.preventDefault()},scrollPageUp:function(t){var e=this.table.rowManager,i=e.scrollTop-e.height;e.element.scrollHeight;t.preventDefault(),e.displayRowsCount&&(i>=0?e.element.scrollTop=i:e.scrollToRow(e.getDisplayRows()[0])),this.table.element.focus()},scrollPageDown:function(t){var e=this.table.rowManager,i=e.scrollTop+e.height,n=e.element.scrollHeight;t.preventDefault(),e.displayRowsCount&&(i<=n?e.element.scrollTop=i:e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1])),this.table.element.focus()},scrollToStart:function(t){var e=this.table.rowManager;t.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.getDisplayRows()[0]),this.table.element.focus()},scrollToEnd:function(t){var e=this.table.rowManager;t.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1]),this.table.element.focus()},navPrev:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().prev())},navNext:function(t){var e,i=!1,n=this.table.options.tabEndNewRow;this.table.modExists("edit")&&(i=this.table.modules.edit.currentCell)&&(t.preventDefault(),e=i.nav(),e.next()||n&&(i.getElement().firstChild.blur(),n=!0===n?this.table.addRow({}):"function"==typeof n?this.table.addRow(n(i.row.getComponent())):this.table.addRow(Object.assign({},n)),n.then(function(){setTimeout(function(){e.next()})})))},navLeft:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().left())},navRight:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().right())},navUp:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().up())},navDown:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().down())},undo:function(t){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(t.preventDefault(),this.table.modules.history.undo()))},redo:function(t){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(t.preventDefault(),this.table.modules.history.redo()))},copyToClipboard:function(t){this.table.modules.edit.currentCell||this.table.modExists("clipboard",!0)&&this.table.modules.clipboard.copy(!1,!0)}},Tabulator.prototype.registerModule("keybindings",Keybindings); \ No newline at end of file diff --git a/website/js/vendor/tabulator/js/modules/menu.js b/admin/js/vendors/tabulator/js/modules/menu.js similarity index 54% rename from website/js/vendor/tabulator/js/modules/menu.js rename to admin/js/vendors/tabulator/js/modules/menu.js index bbcf83d..d86575f 100644 --- a/website/js/vendor/tabulator/js/modules/menu.js +++ b/admin/js/vendors/tabulator/js/modules/menu.js @@ -1,4 +1,4 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ var Menu = function Menu(table) { this.table = table; //hold Tabulator object @@ -14,13 +14,14 @@ Menu.prototype.initializeColumnHeader = function (column) { var headerMenuEl; if (column.definition.headerContextMenu) { - column.getElement().addEventListener("contextmenu", this.LoadMenuEvent.bind(this, column, column.definition.headerContextMenu)); - this.tapHold(column, column.definition.headerContextMenu); - } + column.getElement().addEventListener("contextmenu", function (e) { + var menu = typeof column.definition.headerContextMenu == "function" ? column.definition.headerContextMenu(column.getComponent()) : column.definition.headerContextMenu; - // if(column.definition.headerClickMenu){ - // column.getElement().addEventListener("click", this.LoadMenuEvent.bind(this, column, column.definition.headerClickMenu)); - // } + e.preventDefault(); + + _this.loadMenu(e, column, menu); + }); + } if (column.definition.headerMenu) { @@ -29,7 +30,7 @@ Menu.prototype.initializeColumnHeader = function (column) { headerMenuEl.innerHTML = "⋮"; headerMenuEl.addEventListener("click", function (e) { - var menu = typeof column.definition.headerMenu == "function" ? column.definition.headerMenu(column.getComponent(), e) : column.definition.headerMenu; + var menu = typeof column.definition.headerMenu == "function" ? column.definition.headerMenu(column.getComponent()) : column.definition.headerMenu; e.stopPropagation(); e.preventDefault(); @@ -40,88 +41,44 @@ Menu.prototype.initializeColumnHeader = function (column) { } }; -Menu.prototype.LoadMenuEvent = function (component, menu, e) { - menu = typeof menu == "function" ? menu(component.getComponent(), e) : menu; - - // if(component instanceof Cell){ - // e.stopImmediatePropagation(); - // } - - this.loadMenu(e, component, menu); -}; - -Menu.prototype.tapHold = function (component, menu) { +Menu.prototype.initializeCell = function (cell) { var _this2 = this; - var element = component.getElement(), - tapHold = null, - loaded = false; - - element.addEventListener("touchstart", function (e) { - clearTimeout(tapHold); - loaded = false; - - tapHold = setTimeout(function () { - clearTimeout(tapHold); - tapHold = null; - loaded = true; - - _this2.LoadMenuEvent(component, menu, e); - }, 1000); - }, { passive: true }); + cell.getElement().addEventListener("contextmenu", function (e) { + var menu = typeof cell.column.definition.contextMenu == "function" ? cell.column.definition.contextMenu(cell.getComponent()) : cell.column.definition.contextMenu; - element.addEventListener("touchend", function (e) { - clearTimeout(tapHold); - tapHold = null; + e.stopImmediatePropagation(); - if (loaded) { - e.preventDefault(); - } + _this2.loadMenu(e, cell, menu); }); }; -Menu.prototype.initializeCell = function (cell) { - if (cell.column.definition.contextMenu) { - cell.getElement().addEventListener("contextmenu", this.LoadMenuEvent.bind(this, cell, cell.column.definition.contextMenu)); - this.tapHold(cell, cell.column.definition.contextMenu); - } - - if (cell.column.definition.clickMenu) { - cell.getElement().addEventListener("click", this.LoadMenuEvent.bind(this, cell, cell.column.definition.clickMenu)); - } -}; - Menu.prototype.initializeRow = function (row) { - if (this.table.options.rowContextMenu) { - row.getElement().addEventListener("contextmenu", this.LoadMenuEvent.bind(this, row, this.table.options.rowContextMenu)); - this.tapHold(row, this.table.options.rowContextMenu); - } + var _this3 = this; - if (this.table.options.rowClickMenu) { - row.getElement().addEventListener("click", this.LoadMenuEvent.bind(this, row, this.table.options.rowClickMenu)); - } + row.getElement().addEventListener("contextmenu", function (e) { + var menu = typeof _this3.table.options.rowContextMenu == "function" ? _this3.table.options.rowContextMenu(row.getComponent()) : _this3.table.options.rowContextMenu; + + _this3.loadMenu(e, row, menu); + }); }; Menu.prototype.initializeGroup = function (group) { - if (this.table.options.groupContextMenu) { - group.getElement().addEventListener("contextmenu", this.LoadMenuEvent.bind(this, group, this.table.options.groupContextMenu)); - this.tapHold(group, this.table.options.groupContextMenu); - } + var _this4 = this; - if (this.table.options.groupClickMenu) { - group.getElement().addEventListener("click", this.LoadMenuEvent.bind(this, group, this.table.options.groupClickMenu)); - } + group.getElement().addEventListener("contextmenu", function (e) { + var menu = typeof _this4.table.options.groupContextMenu == "function" ? _this4.table.options.groupContextMenu(group.getComponent()) : _this4.table.options.groupContextMenu; + + _this4.loadMenu(e, group, menu); + }); }; Menu.prototype.loadMenu = function (e, component, menu) { - var _this3 = this; + var _this5 = this; - var docHeight = Math.max(document.body.offsetHeight, window.innerHeight), - touch = !(e instanceof MouseEvent); + var docHeight = Math.max(document.body.offsetHeight, window.innerHeight); - if (!touch) { - e.preventDefault(); - } + e.preventDefault(); //abort if no menu set if (!menu || !menu.length) { @@ -135,7 +92,7 @@ Menu.prototype.loadMenu = function (e, component, menu) { } } else { this.nestedMenuBlock = setTimeout(function () { - _this3.nestedMenuBlock = false; + _this5.nestedMenuBlock = false; }, 100); } @@ -175,25 +132,27 @@ Menu.prototype.loadMenu = function (e, component, menu) { }); } else { itemEl.addEventListener("click", function (e) { - _this3.hideMenu(); + _this5.hideMenu(); item.action(e, component.getComponent()); }); } } - _this3.menuEl.appendChild(itemEl); + _this5.menuEl.appendChild(itemEl); }); - this.menuEl.style.top = (touch ? e.touches[0].pageY : e.pageY) + "px"; - this.menuEl.style.left = (touch ? e.touches[0].pageX : e.pageX) + "px"; + this.menuEl.style.top = e.pageY + "px"; + this.menuEl.style.left = e.pageX + "px"; + + document.body.addEventListener("click", this.blurEvent); + this.table.rowManager.element.addEventListener("scroll", this.blurEvent); setTimeout(function () { - _this3.table.rowManager.element.addEventListener("scroll", _this3.blurEvent); - document.body.addEventListener("click", _this3.blurEvent); - document.body.addEventListener("contextmenu", _this3.blurEvent); - document.body.addEventListener("keydown", _this3.escEvent); + document.body.addEventListener("contextmenu", _this5.blurEvent); }, 100); + document.body.addEventListener("keydown", this.escEvent); + document.body.appendChild(this.menuEl); //move menu to start on right edge if it is too close to the edge of the screen diff --git a/admin/js/vendors/tabulator/js/modules/menu.min.js b/admin/js/vendors/tabulator/js/modules/menu.min.js new file mode 100644 index 0000000..40b8241 --- /dev/null +++ b/admin/js/vendors/tabulator/js/modules/menu.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ +var Menu=function(e){this.table=e,this.menuEl=!1,this.blurEvent=this.hideMenu.bind(this),this.escEvent=this.escMenu.bind(this),this.nestedMenuBlock=!1};Menu.prototype.initializeColumnHeader=function(e){var t,n=this;e.definition.headerContextMenu&&e.getElement().addEventListener("contextmenu",function(t){var o="function"==typeof e.definition.headerContextMenu?e.definition.headerContextMenu(e.getComponent()):e.definition.headerContextMenu;t.preventDefault(),n.loadMenu(t,e,o)}),e.definition.headerMenu&&(t=document.createElement("span"),t.classList.add("tabulator-header-menu-button"),t.innerHTML="⋮",t.addEventListener("click",function(t){var o="function"==typeof e.definition.headerMenu?e.definition.headerMenu(e.getComponent()):e.definition.headerMenu;t.stopPropagation(),t.preventDefault(),n.loadMenu(t,e,o)}),e.titleElement.insertBefore(t,e.titleElement.firstChild))},Menu.prototype.initializeCell=function(e){var t=this;e.getElement().addEventListener("contextmenu",function(n){var o="function"==typeof e.column.definition.contextMenu?e.column.definition.contextMenu(e.getComponent()):e.column.definition.contextMenu;n.stopImmediatePropagation(),t.loadMenu(n,e,o)})},Menu.prototype.initializeRow=function(e){var t=this;e.getElement().addEventListener("contextmenu",function(n){var o="function"==typeof t.table.options.rowContextMenu?t.table.options.rowContextMenu(e.getComponent()):t.table.options.rowContextMenu;t.loadMenu(n,e,o)})},Menu.prototype.initializeGroup=function(e){var t=this;e.getElement().addEventListener("contextmenu",function(n){var o="function"==typeof t.table.options.groupContextMenu?t.table.options.groupContextMenu(e.getComponent()):t.table.options.groupContextMenu;t.loadMenu(n,e,o)})},Menu.prototype.loadMenu=function(e,t,n){var o=this,i=Math.max(document.body.offsetHeight,window.innerHeight);if(e.preventDefault(),n&&n.length){if(this.nestedMenuBlock){if(this.isOpen())return}else this.nestedMenuBlock=setTimeout(function(){o.nestedMenuBlock=!1},100);this.hideMenu(),this.menuEl=document.createElement("div"),this.menuEl.classList.add("tabulator-menu"),n.forEach(function(e){var n=document.createElement("div"),i=e.label,u=e.disabled;e.separator?n.classList.add("tabulator-menu-separator"):(n.classList.add("tabulator-menu-item"),"function"==typeof i&&(i=i(t.getComponent())),i instanceof Node?n.appendChild(i):n.innerHTML=i,"function"==typeof u&&(u=u(t.getComponent())),u?(n.classList.add("tabulator-menu-item-disabled"),n.addEventListener("click",function(e){e.stopPropagation()})):n.addEventListener("click",function(n){o.hideMenu(),e.action(n,t.getComponent())})),o.menuEl.appendChild(n)}),this.menuEl.style.top=e.pageY+"px",this.menuEl.style.left=e.pageX+"px",document.body.addEventListener("click",this.blurEvent),this.table.rowManager.element.addEventListener("scroll",this.blurEvent),setTimeout(function(){document.body.addEventListener("contextmenu",o.blurEvent)},100),document.body.addEventListener("keydown",this.escEvent),document.body.appendChild(this.menuEl),e.pageX+this.menuEl.offsetWidth>=document.body.offsetWidth&&(this.menuEl.style.left="",this.menuEl.style.right=document.body.offsetWidth-e.pageX+"px"),e.pageY+this.menuEl.offsetHeight>=i&&(this.menuEl.style.top="",this.menuEl.style.bottom=i-e.pageY+"px")}},Menu.prototype.isOpen=function(){return!!this.menuEl.parentNode},Menu.prototype.escMenu=function(e){27==e.keyCode&&this.hideMenu()},Menu.prototype.hideMenu=function(){this.menuEl.parentNode&&this.menuEl.parentNode.removeChild(this.menuEl),this.escEvent&&document.body.removeEventListener("keydown",this.escEvent),this.blurEvent&&(document.body.removeEventListener("click",this.blurEvent),document.body.removeEventListener("contextmenu",this.blurEvent),this.table.rowManager.element.removeEventListener("scroll",this.blurEvent))},Menu.prototype.menus={},Tabulator.prototype.registerModule("menu",Menu); \ No newline at end of file diff --git a/website/js/vendor/tabulator/js/modules/moveable_columns.js b/admin/js/vendors/tabulator/js/modules/moveable_columns.js similarity index 98% rename from website/js/vendor/tabulator/js/modules/moveable_columns.js rename to admin/js/vendors/tabulator/js/modules/moveable_columns.js index b22faea..5244016 100644 --- a/website/js/vendor/tabulator/js/modules/moveable_columns.js +++ b/admin/js/vendors/tabulator/js/modules/moveable_columns.js @@ -1,4 +1,4 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ var MoveColumns = function MoveColumns(table) { this.table = table; //hold Tabulator object diff --git a/website/js/vendor/tabulator/js/modules/moveable_columns.min.js b/admin/js/vendors/tabulator/js/modules/moveable_columns.min.js similarity index 98% rename from website/js/vendor/tabulator/js/modules/moveable_columns.min.js rename to admin/js/vendors/tabulator/js/modules/moveable_columns.min.js index 4319932..0135a3b 100644 --- a/website/js/vendor/tabulator/js/modules/moveable_columns.min.js +++ b/admin/js/vendors/tabulator/js/modules/moveable_columns.min.js @@ -1,2 +1,2 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ var MoveColumns=function(e){this.table=e,this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=250,this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.startX=0,this.autoScrollMargin=40,this.autoScrollStep=5,this.autoScrollTimeout=!1,this.touchMove=!1,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this)};MoveColumns.prototype.createPlaceholderElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-col"),e.classList.add("tabulator-col-placeholder"),e},MoveColumns.prototype.initializeColumn=function(e){var t,o=this,n={};e.modules.frozen||(t=e.getElement(),n.mousemove=function(n){e.parent===o.moving.parent&&((o.touchMove?n.touches[0].pageX:n.pageX)-Tabulator.prototype.helpers.elOffset(t).left+o.table.columnManager.element.scrollLeft>e.getWidth()/2?o.toCol===e&&o.toColAfter||(t.parentNode.insertBefore(o.placeholderElement,t.nextSibling),o.moveColumn(e,!0)):(o.toCol!==e||o.toColAfter)&&(t.parentNode.insertBefore(o.placeholderElement,t),o.moveColumn(e,!1)))}.bind(o),t.addEventListener("mousedown",function(t){o.touchMove=!1,1===t.which&&(o.checkTimeout=setTimeout(function(){o.startMove(t,e)},o.checkPeriod))}),t.addEventListener("mouseup",function(e){1===e.which&&o.checkTimeout&&clearTimeout(o.checkTimeout)}),o.bindTouchEvents(e)),e.modules.moveColumn=n},MoveColumns.prototype.bindTouchEvents=function(e){var t,o,n,l,i,s,m,r=this,u=e.getElement(),h=!1;u.addEventListener("touchstart",function(u){r.checkTimeout=setTimeout(function(){r.touchMove=!0,t=e,o=e.nextColumn(),l=o?o.getWidth()/2:0,n=e.prevColumn(),i=n?n.getWidth()/2:0,s=0,m=0,h=!1,r.startMove(u,e)},r.checkPeriod)},{passive:!0}),u.addEventListener("touchmove",function(u){var a,c;r.moving&&(r.moveHover(u),h||(h=u.touches[0].pageX),a=u.touches[0].pageX-h,a>0?o&&a-s>l&&(c=o)!==e&&(h=u.touches[0].pageX,c.getElement().parentNode.insertBefore(r.placeholderElement,c.getElement().nextSibling),r.moveColumn(c,!0)):n&&-a-m>i&&(c=n)!==e&&(h=u.touches[0].pageX,c.getElement().parentNode.insertBefore(r.placeholderElement,c.getElement()),r.moveColumn(c,!1)),c&&(t=c,o=c.nextColumn(),s=l,l=o?o.getWidth()/2:0,n=c.prevColumn(),m=i,i=n?n.getWidth()/2:0))},{passive:!0}),u.addEventListener("touchend",function(e){r.checkTimeout&&clearTimeout(r.checkTimeout),r.moving&&r.endMove(e)})},MoveColumns.prototype.startMove=function(e,t){var o=t.getElement();this.moving=t,this.startX=(this.touchMove?e.touches[0].pageX:e.pageX)-Tabulator.prototype.helpers.elOffset(o).left,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",o.parentNode.insertBefore(this.placeholderElement,o),o.parentNode.removeChild(o),this.hoverElement=o.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.table.columnManager.getElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.bottom="0",this.touchMove||(this._bindMouseMove(),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove)),this.moveHover(e)},MoveColumns.prototype._bindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach(function(e){e.modules.moveColumn.mousemove&&e.getElement().addEventListener("mousemove",e.modules.moveColumn.mousemove)})},MoveColumns.prototype._unbindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach(function(e){e.modules.moveColumn.mousemove&&e.getElement().removeEventListener("mousemove",e.modules.moveColumn.mousemove)})},MoveColumns.prototype.moveColumn=function(e,t){var o=this.moving.getCells();this.toCol=e,this.toColAfter=t,t?e.getCells().forEach(function(e,t){var n=e.getElement();n.parentNode.insertBefore(o[t].getElement(),n.nextSibling)}):e.getCells().forEach(function(e,t){var n=e.getElement();n.parentNode.insertBefore(o[t].getElement(),n)})},MoveColumns.prototype.endMove=function(e){(1===e.which||this.touchMove)&&(this._unbindMouseMove(),this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toCol&&this.table.columnManager.moveColumnActual(this.moving,this.toCol,this.toColAfter),this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.touchMove||(document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove)))},MoveColumns.prototype.moveHover=function(e){var t,o=this,n=o.table.columnManager.getElement(),l=n.scrollLeft,i=(o.touchMove?e.touches[0].pageX:e.pageX)-Tabulator.prototype.helpers.elOffset(n).left+l;o.hoverElement.style.left=i-o.startX+"px",i-le.getHeight()/2){if(t.toRow!==e||!t.toRowAfter){var n=e.getElement();n.parentNode.insertBefore(t.placeholderElement,n.nextSibling),t.moveRow(e,!0)}}else if(t.toRow!==e||t.toRowAfter){var n=e.getElement();n.previousSibling&&(n.parentNode.insertBefore(t.placeholderElement,n),t.moveRow(e,!1))}}.bind(t),e.modules.moveRow=o},MoveRows.prototype.initializeRow=function(e){var t,o=this,n={};n.mouseup=function(t){o.tableRowDrop(t,e)}.bind(o),n.mousemove=function(t){if(t.pageY-Tabulator.prototype.helpers.elOffset(e.element).top+o.table.rowManager.element.scrollTop>e.getHeight()/2){if(o.toRow!==e||!o.toRowAfter){var n=e.getElement();n.parentNode.insertBefore(o.placeholderElement,n.nextSibling),o.moveRow(e,!0)}}else if(o.toRow!==e||o.toRowAfter){var n=e.getElement();n.parentNode.insertBefore(o.placeholderElement,n),o.moveRow(e,!1)}}.bind(o),this.hasHandle||(t=e.getElement(),t.addEventListener("mousedown",function(t){1===t.which&&(o.checkTimeout=setTimeout(function(){o.startMove(t,e)},o.checkPeriod))}),t.addEventListener("mouseup",function(e){1===e.which&&o.checkTimeout&&clearTimeout(o.checkTimeout)}),this.bindTouchEvents(e,e.getElement())),e.modules.moveRow=n},MoveRows.prototype.initializeCell=function(e){var t=this,o=e.getElement();o.addEventListener("mousedown",function(o){1===o.which&&(t.checkTimeout=setTimeout(function(){t.startMove(o,e.row)},t.checkPeriod))}),o.addEventListener("mouseup",function(e){1===e.which&&t.checkTimeout&&clearTimeout(t.checkTimeout)}),this.bindTouchEvents(e.row,e.getElement())},MoveRows.prototype.bindTouchEvents=function(e,t){var o,n,s,i,l,c,r,a=this,h=!1;t.addEventListener("touchstart",function(t){a.checkTimeout=setTimeout(function(){a.touchMove=!0,o=e,n=e.nextRow(),i=n?n.getHeight()/2:0,s=e.prevRow(),l=s?s.getHeight()/2:0,c=0,r=0,h=!1,a.startMove(t,e)},a.checkPeriod)},{passive:!0}),this.moving,this.toRow,this.toRowAfter,t.addEventListener("touchmove",function(t){var m,v;a.moving&&(t.preventDefault(),a.moveHover(t),h||(h=t.touches[0].pageY),m=t.touches[0].pageY-h,m>0?n&&m-c>i&&(v=n)!==e&&(h=t.touches[0].pageY,v.getElement().parentNode.insertBefore(a.placeholderElement,v.getElement().nextSibling),a.moveRow(v,!0)):s&&-m-r>l&&(v=s)!==e&&(h=t.touches[0].pageY,v.getElement().parentNode.insertBefore(a.placeholderElement,v.getElement()),a.moveRow(v,!1)),v&&(o=v,n=v.nextRow(),c=i,i=n?n.getHeight()/2:0,s=v.prevRow(),r=l,l=s?s.getHeight()/2:0))}),t.addEventListener("touchend",function(e){a.checkTimeout&&clearTimeout(a.checkTimeout),a.moving&&(a.endMove(e),a.touchMove=!1)})},MoveRows.prototype._bindMouseMove=function(){this.table.rowManager.getDisplayRows().forEach(function(e){"row"!==e.type&&"group"!==e.type||!e.modules.moveRow.mousemove||e.getElement().addEventListener("mousemove",e.modules.moveRow.mousemove)})},MoveRows.prototype._unbindMouseMove=function(){this.table.rowManager.getDisplayRows().forEach(function(e){"row"!==e.type&&"group"!==e.type||!e.modules.moveRow.mousemove||e.getElement().removeEventListener("mousemove",e.modules.moveRow.mousemove)})},MoveRows.prototype.startMove=function(e,t){var o=t.getElement();this.setStartPosition(e,t),this.moving=t,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",this.connection?(this.table.element.classList.add("tabulator-movingrow-sending"),this.connectToTables(t)):(o.parentNode.insertBefore(this.placeholderElement,o),o.parentNode.removeChild(o)),this.hoverElement=o.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.connection?(document.body.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this.hoverElement.style.width=this.table.element.clientWidth+"px",this.hoverElement.style.whiteSpace="nowrap",this.hoverElement.style.overflow="hidden",this.hoverElement.style.pointerEvents="none"):(this.table.rowManager.getTableElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this._bindMouseMove()),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove),this.moveHover(e)},MoveRows.prototype.setStartPosition=function(e,t){var o,n,s=this.touchMove?e.touches[0].pageX:e.pageX,i=this.touchMove?e.touches[0].pageY:e.pageY;o=t.getElement(),this.connection?(n=o.getBoundingClientRect(),this.startX=n.left-s+window.pageXOffset,this.startY=n.top-i+window.pageYOffset):this.startY=i-o.getBoundingClientRect().top},MoveRows.prototype.endMove=function(e){e&&1!==e.which&&!this.touchMove||(this._unbindMouseMove(),this.connection||(this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement)),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toRow&&this.table.rowManager.moveRow(this.moving,this.toRow,this.toRowAfter),this.moving=!1,this.toRow=!1,this.toRowAfter=!1,document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove),this.connection&&(this.table.element.classList.remove("tabulator-movingrow-sending"),this.disconnectFromTables()))},MoveRows.prototype.moveRow=function(e,t){this.toRow=e,this.toRowAfter=t},MoveRows.prototype.moveHover=function(e){this.connection?this.moveHoverConnections.call(this,e):this.moveHoverTable.call(this,e)},MoveRows.prototype.moveHoverTable=function(e){var t=this.table.rowManager.getElement(),o=t.scrollTop,n=(this.touchMove?e.touches[0].pageY:e.pageY)-t.getBoundingClientRect().top+o;this.hoverElement.style.top=n-this.startY+"px"},MoveRows.prototype.moveHoverConnections=function(e){this.hoverElement.style.left=this.startX+(this.touchMove?e.touches[0].pageX:e.pageX)+"px",this.hoverElement.style.top=this.startY+(this.touchMove?e.touches[0].pageY:e.pageY)+"px"},MoveRows.prototype.elementRowDrop=function(e,t,o){this.table.options.movableRowsElementDrop&&this.table.options.movableRowsElementDrop(e,t,!!o&&o.getComponent())},MoveRows.prototype.connectToTables=function(e){var t,o=this;this.connectionSelectorsTables&&(t=this.table.modules.comms.getConnections(this.connectionSelectorsTables),this.table.options.movableRowsSendingStart.call(this.table,t),this.table.modules.comms.send(this.connectionSelectorsTables,"moveRow","connect",{row:e})),this.connectionSelectorsElements&&(this.connectionElements=[],Array.isArray(this.connectionSelectorsElements)||(this.connectionSelectorsElements=[this.connectionSelectorsElements]),this.connectionSelectorsElements.forEach(function(e){"string"==typeof e?o.connectionElements=o.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(e))):o.connectionElements.push(e)}),this.connectionElements.forEach(function(e){var t=function(t){o.elementRowDrop(t,e,o.moving)};e.addEventListener("mouseup",t),e.tabulatorElementDropEvent=t,e.classList.add("tabulator-movingrow-receiving")}))},MoveRows.prototype.disconnectFromTables=function(){var e;this.connectionSelectorsTables&&(e=this.table.modules.comms.getConnections(this.connectionSelectorsTables),this.table.options.movableRowsSendingStop.call(this.table,e),this.table.modules.comms.send(this.connectionSelectorsTables,"moveRow","disconnect")),this.connectionElements.forEach(function(e){e.classList.remove("tabulator-movingrow-receiving"),e.removeEventListener("mouseup",e.tabulatorElementDropEvent),delete e.tabulatorElementDropEvent})},MoveRows.prototype.connect=function(e,t){var o=this;return this.connectedTable?(console.warn("Move Row Error - Table cannot accept connection, already connected to table:",this.connectedTable),!1):(this.connectedTable=e,this.connectedRow=t,this.table.element.classList.add("tabulator-movingrow-receiving"),o.table.rowManager.getDisplayRows().forEach(function(e){"row"===e.type&&e.modules.moveRow&&e.modules.moveRow.mouseup&&e.getElement().addEventListener("mouseup",e.modules.moveRow.mouseup)}),o.tableRowDropEvent=o.tableRowDrop.bind(o),o.table.element.addEventListener("mouseup",o.tableRowDropEvent),this.table.options.movableRowsReceivingStart.call(this.table,t,e),!0)},MoveRows.prototype.disconnect=function(e){var t=this;e===this.connectedTable?(this.connectedTable=!1,this.connectedRow=!1,this.table.element.classList.remove("tabulator-movingrow-receiving"),t.table.rowManager.getDisplayRows().forEach(function(e){"row"===e.type&&e.modules.moveRow&&e.modules.moveRow.mouseup&&e.getElement().removeEventListener("mouseup",e.modules.moveRow.mouseup)}),t.table.element.removeEventListener("mouseup",t.tableRowDropEvent),this.table.options.movableRowsReceivingStop.call(this.table,e)):console.warn("Move Row Error - trying to disconnect from non connected table")},MoveRows.prototype.dropComplete=function(e,t,o){var n=!1;if(o){switch(_typeof(this.table.options.movableRowsSender)){case"string":n=this.senders[this.table.options.movableRowsSender];break;case"function":n=this.table.options.movableRowsSender}n?n.call(this,this.moving.getComponent(),t?t.getComponent():void 0,e):this.table.options.movableRowsSender&&console.warn("Mover Row Error - no matching sender found:",this.table.options.movableRowsSender),this.table.options.movableRowsSent.call(this.table,this.moving.getComponent(),t?t.getComponent():void 0,e)}else this.table.options.movableRowsSentFailed.call(this.table,this.moving.getComponent(),t?t.getComponent():void 0,e);this.endMove()},MoveRows.prototype.tableRowDrop=function(e,t){var o=!1,n=!1;switch(console.trace("drop"),e.stopImmediatePropagation(),_typeof(this.table.options.movableRowsReceiver)){case"string":o=this.receivers[this.table.options.movableRowsReceiver];break;case"function":o=this.table.options.movableRowsReceiver}o?n=o.call(this,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):console.warn("Mover Row Error - no matching receiver found:",this.table.options.movableRowsReceiver),n?this.table.options.movableRowsReceived.call(this.table,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):this.table.options.movableRowsReceivedFailed.call(this.table,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable),this.table.modules.comms.send(this.connectedTable,"moveRow","dropcomplete",{row:t,success:n})},MoveRows.prototype.receivers={insert:function(e,t,o){return this.table.addRow(e.getData(),void 0,t),!0},add:function(e,t,o){return this.table.addRow(e.getData()),!0},update:function(e,t,o){return!!t&&(t.update(e.getData()),!0)},replace:function(e,t,o){return!!t&&(this.table.addRow(e.getData(),void 0,t),t.delete(),!0)}},MoveRows.prototype.senders={delete:function(e,t,o){e.delete()}},MoveRows.prototype.commsReceived=function(e,t,o){switch(t){case"connect":return this.connect(e,o.row);case"disconnect":return this.disconnect(e);case"dropcomplete":return this.dropComplete(e,o.row,o.success)}},Tabulator.prototype.registerModule("moveRow",MoveRows); \ No newline at end of file diff --git a/website/js/vendor/tabulator/js/modules/mutator.js b/admin/js/vendors/tabulator/js/modules/mutator.js similarity index 96% rename from website/js/vendor/tabulator/js/modules/mutator.js rename to admin/js/vendors/tabulator/js/modules/mutator.js index 830b891..e5b5dad 100644 --- a/website/js/vendor/tabulator/js/modules/mutator.js +++ b/admin/js/vendors/tabulator/js/modules/mutator.js @@ -1,6 +1,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; -/* Tabulator v4.8.3 (c) Oliver Folkerd */ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ var Mutator = function Mutator(table) { this.table = table; //hold Tabulator object diff --git a/website/js/vendor/tabulator/js/modules/mutator.min.js b/admin/js/vendors/tabulator/js/modules/mutator.min.js similarity index 96% rename from website/js/vendor/tabulator/js/modules/mutator.min.js rename to admin/js/vendors/tabulator/js/modules/mutator.min.js index 8f4f037..00005d1 100644 --- a/website/js/vendor/tabulator/js/modules/mutator.min.js +++ b/admin/js/vendors/tabulator/js/modules/mutator.min.js @@ -1,2 +1,2 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mutator=function(t){this.table=t,this.allowedTypes=["","data","edit","clipboard"],this.enabled=!0};Mutator.prototype.initializeColumn=function(t){var o=this,e=!1,a={};this.allowedTypes.forEach(function(r){var u,n="mutator"+(r.charAt(0).toUpperCase()+r.slice(1));t.definition[n]&&(u=o.lookupMutator(t.definition[n]))&&(e=!0,a[n]={mutator:u,params:t.definition[n+"Params"]||{}})}),e&&(t.modules.mutate=a)},Mutator.prototype.lookupMutator=function(t){var o=!1;switch(void 0===t?"undefined":_typeof(t)){case"string":this.mutators[t]?o=this.mutators[t]:console.warn("Mutator Error - No such mutator found, ignoring: ",t);break;case"function":o=t}return o},Mutator.prototype.transformRow=function(t,o,e){var a,r=this,u="mutator"+(o.charAt(0).toUpperCase()+o.slice(1));return this.enabled&&r.table.columnManager.traverse(function(r){var n,i,s;r.modules.mutate&&(n=r.modules.mutate[u]||r.modules.mutate.mutator||!1)&&(a=r.getFieldValue(void 0!==e?e:t),"data"!=o&&void 0===a||(s=r.getComponent(),i="function"==typeof n.params?n.params(a,t,o,s):n.params,r.setFieldValue(t,n.mutator(a,t,o,i,s))))}),t},Mutator.prototype.transformCell=function(t,o){var e=t.column.modules.mutate.mutatorEdit||t.column.modules.mutate.mutator||!1,a={};return e?(a=Object.assign(a,t.row.getData()),t.column.setFieldValue(a,o),e.mutator(o,a,"edit",e.params,t.getComponent())):o},Mutator.prototype.enable=function(){this.enabled=!0},Mutator.prototype.disable=function(){this.enabled=!1},Mutator.prototype.mutators={},Tabulator.prototype.registerModule("mutator",Mutator); \ No newline at end of file diff --git a/website/js/vendor/tabulator/js/modules/page.js b/admin/js/vendors/tabulator/js/modules/page.js similarity index 97% rename from website/js/vendor/tabulator/js/modules/page.js rename to admin/js/vendors/tabulator/js/modules/page.js index 81d5e1e..d37b814 100644 --- a/website/js/vendor/tabulator/js/modules/page.js +++ b/admin/js/vendors/tabulator/js/modules/page.js @@ -1,4 +1,4 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ var Page = function Page(table) { @@ -164,11 +164,11 @@ Page.prototype.initialize = function (hidden) { //click bindings self.firstBut.addEventListener("click", function () { - self.setPage(1).then(function () {}).catch(function () {}); + self.setPage(1); }); self.prevBut.addEventListener("click", function () { - self.previousPage().then(function () {}).catch(function () {}); + self.previousPage(); }); self.nextBut.addEventListener("click", function () { @@ -176,7 +176,7 @@ Page.prototype.initialize = function (hidden) { }); self.lastBut.addEventListener("click", function () { - self.setPage(self.max).then(function () {}).catch(function () {}); + self.setPage(self.max); }); if (self.table.options.paginationElement) { @@ -439,7 +439,7 @@ Page.prototype._generatePageButton = function (page) { button.textContent = page; button.addEventListener("click", function (e) { - self.setPage(page).then(function () {}).catch(function () {}); + self.setPage(page); }); return button; @@ -520,7 +520,7 @@ Page.prototype.getRows = function (data) { if (this.size === true) { start = 0; - end = data.length; + end = data.length - 1; } else { start = this.size * (this.page - 1); end = start + parseInt(this.size); diff --git a/admin/js/vendors/tabulator/js/modules/page.min.js b/admin/js/vendors/tabulator/js/modules/page.min.js new file mode 100644 index 0000000..c2835ba --- /dev/null +++ b/admin/js/vendors/tabulator/js/modules/page.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ +var Page=function(e){this.table=e,this.mode="local",this.progressiveLoad=!1,this.size=0,this.page=1,this.count=5,this.max=1,this.displayIndex=0,this.initialLoad=!0,this.pageSizes=[],this.dataReceivedNames={},this.dataSentNames={},this.createElements()};Page.prototype.createElements=function(){var e;this.element=document.createElement("span"),this.element.classList.add("tabulator-paginator"),this.pagesElement=document.createElement("span"),this.pagesElement.classList.add("tabulator-pages"),e=document.createElement("button"),e.classList.add("tabulator-page"),e.setAttribute("type","button"),e.setAttribute("role","button"),e.setAttribute("aria-label",""),e.setAttribute("title",""),this.firstBut=e.cloneNode(!0),this.firstBut.setAttribute("data-page","first"),this.prevBut=e.cloneNode(!0),this.prevBut.setAttribute("data-page","prev"),this.nextBut=e.cloneNode(!0),this.nextBut.setAttribute("data-page","next"),this.lastBut=e.cloneNode(!0),this.lastBut.setAttribute("data-page","last"),this.table.options.paginationSizeSelector&&(this.pageSizeSelect=document.createElement("select"),this.pageSizeSelect.classList.add("tabulator-page-size"))},Page.prototype.generatePageSizeSelectList=function(){var e=this,t=[];if(this.pageSizeSelect){if(Array.isArray(this.table.options.paginationSizeSelector))t=this.table.options.paginationSizeSelector,this.pageSizes=t,-1==this.pageSizes.indexOf(this.size)&&t.unshift(this.size);else if(-1==this.pageSizes.indexOf(this.size)){t=[];for(var a=1;a<5;a++)t.push(this.size*a);this.pageSizes=t}else t=this.pageSizes;for(;this.pageSizeSelect.firstChild;)this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild);t.forEach(function(t){var a=document.createElement("option");a.value=t,!0===t?e.table.modules.localize.bind("pagination|all",function(e){a.innerHTML=e}):a.innerHTML=t,e.pageSizeSelect.appendChild(a)}),this.pageSizeSelect.value=this.size}},Page.prototype.initialize=function(e){var t,a,i,s=this;this.dataSentNames=Object.assign({},this.paginationDataSentNames),this.dataSentNames=Object.assign(this.dataSentNames,this.table.options.paginationDataSent),this.dataReceivedNames=Object.assign({},this.paginationDataReceivedNames),this.dataReceivedNames=Object.assign(this.dataReceivedNames,this.table.options.paginationDataReceived),s.table.modules.localize.bind("pagination|first",function(e){s.firstBut.innerHTML=e}),s.table.modules.localize.bind("pagination|first_title",function(e){s.firstBut.setAttribute("aria-label",e),s.firstBut.setAttribute("title",e)}),s.table.modules.localize.bind("pagination|prev",function(e){s.prevBut.innerHTML=e}),s.table.modules.localize.bind("pagination|prev_title",function(e){s.prevBut.setAttribute("aria-label",e),s.prevBut.setAttribute("title",e)}),s.table.modules.localize.bind("pagination|next",function(e){s.nextBut.innerHTML=e}),s.table.modules.localize.bind("pagination|next_title",function(e){s.nextBut.setAttribute("aria-label",e),s.nextBut.setAttribute("title",e)}),s.table.modules.localize.bind("pagination|last",function(e){s.lastBut.innerHTML=e}),s.table.modules.localize.bind("pagination|last_title",function(e){s.lastBut.setAttribute("aria-label",e),s.lastBut.setAttribute("title",e)}),s.firstBut.addEventListener("click",function(){s.setPage(1)}),s.prevBut.addEventListener("click",function(){s.previousPage()}),s.nextBut.addEventListener("click",function(){s.nextPage().then(function(){}).catch(function(){})}),s.lastBut.addEventListener("click",function(){s.setPage(s.max)}),s.table.options.paginationElement&&(s.element=s.table.options.paginationElement),this.pageSizeSelect&&(t=document.createElement("label"),s.table.modules.localize.bind("pagination|page_size",function(e){s.pageSizeSelect.setAttribute("aria-label",e),s.pageSizeSelect.setAttribute("title",e),t.innerHTML=e}),s.element.appendChild(t),s.element.appendChild(s.pageSizeSelect),s.pageSizeSelect.addEventListener("change",function(e){s.setPageSize("true"==s.pageSizeSelect.value||s.pageSizeSelect.value),s.setPage(1).then(function(){}).catch(function(){})})),s.element.appendChild(s.firstBut),s.element.appendChild(s.prevBut),s.element.appendChild(s.pagesElement),s.element.appendChild(s.nextBut),s.element.appendChild(s.lastBut),s.table.options.paginationElement||e||s.table.footerManager.append(s.element,s),s.mode=s.table.options.pagination,s.table.options.paginationSize?s.size=s.table.options.paginationSize:(a=document.createElement("div"),a.classList.add("tabulator-row"),a.style.visibility=e,i=document.createElement("div"),i.classList.add("tabulator-cell"),i.innerHTML="Page Row Test",a.appendChild(i),s.table.rowManager.getTableElement().appendChild(a),s.size=Math.floor(s.table.rowManager.getElement().clientHeight/a.offsetHeight),s.table.rowManager.getTableElement().removeChild(a)),s.count=s.table.options.paginationButtonCount,s.generatePageSizeSelectList()},Page.prototype.initializeProgressive=function(e){this.initialize(!0),this.mode="progressive_"+e,this.progressiveLoad=!0},Page.prototype.setDisplayIndex=function(e){this.displayIndex=e},Page.prototype.getDisplayIndex=function(){return this.displayIndex},Page.prototype.setMaxRows=function(e){this.max=e?!0===this.size?1:Math.ceil(e/this.size):1,this.page>this.max&&(this.page=this.max)},Page.prototype.reset=function(e,t){return("local"==this.mode||e)&&(this.page=1),t&&(this.initialLoad=!0),!0},Page.prototype.setMaxPage=function(e){e=parseInt(e),this.max=e||1,this.page>this.max&&(this.page=this.max,this.trigger())},Page.prototype.setPage=function(e){var t=this,a=this;switch(e){case"first":return this.setPage(1);case"prev":return this.previousPage();case"next":return this.nextPage();case"last":return this.setPage(this.max)}return new Promise(function(i,s){e=parseInt(e),e>0&&e<=t.max?(t.page=e,t.trigger().then(function(){i()}).catch(function(){s()}),a.table.options.persistence&&a.table.modExists("persistence",!0)&&a.table.modules.persistence.config.page&&a.table.modules.persistence.save("page")):(console.warn("Pagination Error - Requested page is out of range of 1 - "+t.max+":",e),s())})},Page.prototype.setPageToRow=function(e){var t=this;return new Promise(function(a,i){var s=t.table.rowManager.getDisplayRows(t.displayIndex-1),n=s.indexOf(e);if(n>-1){var o=!0===t.size?1:Math.ceil((n+1)/t.size);t.setPage(o).then(function(){a()}).catch(function(){i()})}else console.warn("Pagination Error - Requested row is not visible"),i()})},Page.prototype.setPageSize=function(e){!0!==e&&(e=parseInt(e)),e>0&&(this.size=e),this.pageSizeSelect&&this.generatePageSizeSelectList(),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.page&&this.table.modules.persistence.save("page")},Page.prototype._setPageButtons=function(){for(var e=this,t=Math.floor((this.count-1)/2),a=Math.ceil((this.count-1)/2),i=this.max-this.page+t+10&&n<=e.max&&e.pagesElement.appendChild(e._generatePageButton(n));this.footerRedraw()},Page.prototype._generatePageButton=function(e){var t=this,a=document.createElement("button");return a.classList.add("tabulator-page"),e==t.page&&a.classList.add("active"),a.setAttribute("type","button"),a.setAttribute("role","button"),t.table.modules.localize.bind("pagination|page_title",function(t){a.setAttribute("aria-label",t+" "+e),a.setAttribute("title",t+" "+e)}),a.setAttribute("data-page",e),a.textContent=e,a.addEventListener("click",function(a){t.setPage(e)}),a},Page.prototype.previousPage=function(){var e=this;return new Promise(function(t,a){e.page>1?(e.page--,e.trigger().then(function(){t()}).catch(function(){a()}),e.table.options.persistence&&e.table.modExists("persistence",!0)&&e.table.modules.persistence.config.page&&e.table.modules.persistence.save("page")):(console.warn("Pagination Error - Previous page would be less than page 1:",0),a())})},Page.prototype.nextPage=function(){var e=this;return new Promise(function(t,a){e.pages?o.splice(s,0,e):o.push(e))}),o},Persistence.prototype._findColumn=function(e,t){var i=t.columns?"group":t.field?"field":"object";return e.find(function(e){switch(i){case"group":return e.title===t.title&&e.columns.length===t.columns.length;case"field":return e.field===t.field;case"object":return e===t}})},Persistence.prototype.save=function(e){var t={};switch(e){case"columns":t=this.parseColumns(this.table.columnManager.getColumns());break;case"filter":t=this.table.modules.filter.getFilters();break;case"sort":t=this.validateSorters(this.table.modules.sort.getSort());break;case"group":t=this.getGroupConfig();break;case"page":t=this.getPageConfig()}this.writeFunc&&this.writeFunc(this.id,e,t)},Persistence.prototype.validateSorters=function(e){return e.forEach(function(e){e.column=e.field,delete e.field}),e},Persistence.prototype.getGroupConfig=function(){var e={};return this.config.group&&((!0===this.config.group||this.config.group.groupBy)&&(e.groupBy=this.table.options.groupBy),(!0===this.config.group||this.config.group.groupStartOpen)&&(e.groupStartOpen=this.table.options.groupStartOpen),(!0===this.config.group||this.config.group.groupHeader)&&(e.groupHeader=this.table.options.groupHeader)),e},Persistence.prototype.getPageConfig=function(){var e={};return this.config.page&&((!0===this.config.page||this.config.page.size)&&(e.paginationSize=this.table.modules.page.getPageSize()),(!0===this.config.page||this.config.page.page)&&(e.paginationInitialPage=this.table.modules.page.getPage())),e},Persistence.prototype.parseColumns=function(e){var t=this,i=[],o=["headerContextMenu","headerMenu","contextMenu","clickMenu"];return e.forEach(function(e){var s,n={},r=e.getDefinition();e.isGroup?(n.title=r.title,n.columns=t.parseColumns(e.getColumns())):(n.field=e.getField(),!0===t.config.columns||void 0==t.config.columns?(s=Object.keys(r),s.push("width")):s=t.config.columns,s.forEach(function(t){switch(t){case"width":n.width=e.getWidth();break;case"visible":n.visible=e.visible;break;default:"function"!=typeof r[t]&&-1===o.indexOf(t)&&(n[t]=r[t])}})),i.push(n)}),i},Persistence.prototype.readers={local:function(e,t){var i=localStorage.getItem(e+"-"+t);return!!i&&JSON.parse(i)},cookie:function(e,t){var i,o,s=document.cookie,n=e+"-"+t,r=s.indexOf(n+"=");return r>-1&&(s=s.substr(r),i=s.indexOf(";"),i>-1&&(s=s.substr(0,i)),o=s.replace(n+"=","")),!!o&&JSON.parse(o)}},Persistence.prototype.writers={local:function(e,t,i){localStorage.setItem(e+"-"+t,JSON.stringify(i))},cookie:function(e,t,i){var o=new Date;o.setDate(o.getDate()+1e4),document.cookie=e+"-"+t+"="+JSON.stringify(i)+"; expires="+o.toUTCString()}},Tabulator.prototype.registerModule("persistence",Persistence); \ No newline at end of file +/* Tabulator v4.7.0 (c) Oliver Folkerd */ +var Persistence=function(e){this.table=e,this.mode="",this.id="",this.defWatcherBlock=!1,this.config={},this.readFunc=!1,this.writeFunc=!1};Persistence.prototype.localStorageTest=function(){var e="_tabulator_test";try{return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch(e){return!1}},Persistence.prototype.initialize=function(){var e,t=this.table.options.persistenceMode,i=this.table.options.persistenceID;this.mode=!0!==t?t:this.localStorageTest()?"local":"cookie",this.table.options.persistenceReaderFunc?"function"==typeof this.table.options.persistenceReaderFunc?this.readFunc=this.table.options.persistenceReaderFunc:this.readers[this.table.options.persistenceReaderFunc]?this.readFunc=this.readers[this.table.options.persistenceReaderFunc]:console.warn("Persistence Read Error - invalid reader set",this.table.options.persistenceReaderFunc):this.readers[this.mode]?this.readFunc=this.readers[this.mode]:console.warn("Persistence Read Error - invalid reader set",this.mode),this.table.options.persistenceWriterFunc?"function"==typeof this.table.options.persistenceWriterFunc?this.writeFunc=this.table.options.persistenceWriterFunc:this.readers[this.table.options.persistenceWriterFunc]?this.writeFunc=this.readers[this.table.options.persistenceWriterFunc]:console.warn("Persistence Write Error - invalid reader set",this.table.options.persistenceWriterFunc):this.writers[this.mode]?this.writeFunc=this.writers[this.mode]:console.warn("Persistence Write Error - invalid writer set",this.mode),this.id="tabulator-"+(i||this.table.element.getAttribute("id")||""),this.config={sort:!0===this.table.options.persistence||this.table.options.persistence.sort,filter:!0===this.table.options.persistence||this.table.options.persistence.filter,group:!0===this.table.options.persistence||this.table.options.persistence.group,page:!0===this.table.options.persistence||this.table.options.persistence.page,columns:!0===this.table.options.persistence?["title","width","visible"]:this.table.options.persistence.columns},this.config.page&&(e=this.retreiveData("page"))&&(void 0===e.paginationSize||!0!==this.config.page&&!this.config.page.size||(this.table.options.paginationSize=e.paginationSize),void 0===e.paginationInitialPage||!0!==this.config.page&&!this.config.page.page||(this.table.options.paginationInitialPage=e.paginationInitialPage)),this.config.group&&(e=this.retreiveData("group"))&&(void 0===e.groupBy||!0!==this.config.group&&!this.config.group.groupBy||(this.table.options.groupBy=e.groupBy),void 0===e.groupStartOpen||!0!==this.config.group&&!this.config.group.groupStartOpen||(this.table.options.groupStartOpen=e.groupStartOpen),void 0===e.groupHeader||!0!==this.config.group&&!this.config.group.groupHeader||(this.table.options.groupHeader=e.groupHeader))},Persistence.prototype.initializeColumn=function(e){var t,i,s=this;this.config.columns&&(this.defWatcherBlock=!0,t=e.getDefinition(),i=!0===this.config.columns?Object.keys(t):this.config.columns,i.forEach(function(e){var i=Object.getOwnPropertyDescriptor(t,e),o=t[e];i&&Object.defineProperty(t,e,{set:function(e){o=e,s.defWatcherBlock||s.save("columns"),i.set&&i.set(e)},get:function(){return i.get&&i.get(),o}})}),this.defWatcherBlock=!1)},Persistence.prototype.load=function(e,t){var i=this.retreiveData(e);return t&&(i=i?this.mergeDefinition(t,i):t),i},Persistence.prototype.retreiveData=function(e){return!!this.readFunc&&this.readFunc(this.id,e)},Persistence.prototype.mergeDefinition=function(e,t){var i=this,s=[];return t=t||[],t.forEach(function(t,o){var n,r=i._findColumn(e,t);r&&(!0===i.config.columns||void 0==i.config.columns?(n=Object.keys(r),n.push("width")):n=i.config.columns,n.forEach(function(e){void 0!==t[e]&&(r[e]=t[e])}),r.columns&&(r.columns=i.mergeDefinition(r.columns,t.columns)),s.push(r))}),e.forEach(function(e,o){i._findColumn(t,e)||(s.length>o?s.splice(o,0,e):s.push(e))}),s},Persistence.prototype._findColumn=function(e,t){var i=t.columns?"group":t.field?"field":"object";return e.find(function(e){switch(i){case"group":return e.title===t.title&&e.columns.length===t.columns.length;case"field":return e.field===t.field;case"object":return e===t}})},Persistence.prototype.save=function(e){var t={};switch(e){case"columns":t=this.parseColumns(this.table.columnManager.getColumns());break;case"filter":t=this.table.modules.filter.getFilters();break;case"sort":t=this.validateSorters(this.table.modules.sort.getSort());break;case"group":t=this.getGroupConfig();break;case"page":t=this.getPageConfig()}this.writeFunc&&this.writeFunc(this.id,e,t)},Persistence.prototype.validateSorters=function(e){return e.forEach(function(e){e.column=e.field,delete e.field}),e},Persistence.prototype.getGroupConfig=function(){return this.config.group&&((!0===this.config.group||this.config.group.groupBy)&&(data.groupBy=this.table.options.groupBy),(!0===this.config.group||this.config.group.groupStartOpen)&&(data.groupStartOpen=this.table.options.groupStartOpen),(!0===this.config.group||this.config.group.groupHeader)&&(data.groupHeader=this.table.options.groupHeader)),data},Persistence.prototype.getPageConfig=function(){var e={};return this.config.page&&((!0===this.config.page||this.config.page.size)&&(e.paginationSize=this.table.modules.page.getPageSize()),(!0===this.config.page||this.config.page.page)&&(e.paginationInitialPage=this.table.modules.page.getPage())),e},Persistence.prototype.parseColumns=function(e){var t=this,i=[];return e.forEach(function(e){var s,o={},n=e.getDefinition();e.isGroup?(o.title=n.title,o.columns=t.parseColumns(e.getColumns())):(o.field=e.getField(),!0===t.config.columns||void 0==t.config.columns?(s=Object.keys(n),s.push("width")):s=t.config.columns,s.forEach(function(t){switch(t){case"width":o.width=e.getWidth();break;case"visible":o.visible=e.visible;break;default:o[t]=n[t]}})),i.push(o)}),i},Persistence.prototype.readers={local:function(e,t){var i=localStorage.getItem(e+"-"+t);return!!i&&JSON.parse(i)},cookie:function(e,t){var i,s,o=document.cookie,n=e+"-"+t,r=o.indexOf(n+"=");return r>-1&&(o=o.substr(r),i=o.indexOf(";"),i>-1&&(o=o.substr(0,i)),s=o.replace(n+"=","")),!!s&&JSON.parse(s)}},Persistence.prototype.writers={local:function(e,t,i){localStorage.setItem(e+"-"+t,JSON.stringify(i))},cookie:function(e,t,i){var s=new Date;s.setDate(s.getDate()+1e4),document.cookie=e+"-"+t+"="+JSON.stringify(i)+"; expires="+s.toUTCString()}},Tabulator.prototype.registerModule("persistence",Persistence); \ No newline at end of file diff --git a/website/js/vendor/tabulator/js/modules/print.js b/admin/js/vendors/tabulator/js/modules/print.js similarity index 96% rename from website/js/vendor/tabulator/js/modules/print.js rename to admin/js/vendors/tabulator/js/modules/print.js index 3ed4835..940f1a9 100644 --- a/website/js/vendor/tabulator/js/modules/print.js +++ b/admin/js/vendors/tabulator/js/modules/print.js @@ -1,4 +1,4 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ var Print = function Print(table) { this.table = table; //hold Tabulator object diff --git a/website/js/vendor/tabulator/js/modules/print.min.js b/admin/js/vendors/tabulator/js/modules/print.min.js similarity index 95% rename from website/js/vendor/tabulator/js/modules/print.min.js rename to admin/js/vendors/tabulator/js/modules/print.min.js index ef6d8b1..b46279c 100644 --- a/website/js/vendor/tabulator/js/modules/print.min.js +++ b/admin/js/vendors/tabulator/js/modules/print.min.js @@ -1,2 +1,2 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ var Print=function(t){this.table=t,this.element=!1,this.manualBlock=!1};Print.prototype.initialize=function(){window.addEventListener("beforeprint",this.replaceTable.bind(this)),window.addEventListener("afterprint",this.cleanup.bind(this))},Print.prototype.replaceTable=function(){this.manualBlock||(this.element=document.createElement("div"),this.element.classList.add("tabulator-print-table"),this.element.appendChild(this.table.modules.export.genereateTable(this.table.options.printConfig,this.table.options.printStyled,this.table.options.printRowRange,"print")),this.table.element.style.display="none",this.table.element.parentNode.insertBefore(this.element,this.table.element))},Print.prototype.cleanup=function(){document.body.classList.remove("tabulator-print-fullscreen-hide"),this.element&&this.element.parentNode&&(this.element.parentNode.removeChild(this.element),this.table.element.style.display="")},Print.prototype.printFullscreen=function(t,e,i){var n,l,o=window.scrollX,a=window.scrollY,s=document.createElement("div"),r=document.createElement("div"),p=this.table.modules.export.genereateTable(void 0!==i?i:this.table.options.printConfig,void 0!==e?e:this.table.options.printStyled,t,"print");this.manualBlock=!0,this.element=document.createElement("div"),this.element.classList.add("tabulator-print-fullscreen"),this.table.options.printHeader&&(s.classList.add("tabulator-print-header"),n="function"==typeof this.table.options.printHeader?this.table.options.printHeader.call(this.table):this.table.options.printHeader,"string"==typeof n?s.innerHTML=n:s.appendChild(n),this.element.appendChild(s)),this.element.appendChild(p),this.table.options.printFooter&&(r.classList.add("tabulator-print-footer"),l="function"==typeof this.table.options.printFooter?this.table.options.printFooter.call(this.table):this.table.options.printFooter,"string"==typeof l?r.innerHTML=l:r.appendChild(l),this.element.appendChild(r)),document.body.classList.add("tabulator-print-fullscreen-hide"),document.body.appendChild(this.element),this.table.options.printFormatter&&this.table.options.printFormatter(this.element,p),window.print(),this.cleanup(),window.scrollTo(o,a),this.manualBlock=!1},Tabulator.prototype.registerModule("print",Print); \ No newline at end of file diff --git a/website/js/vendor/tabulator/js/modules/reactive_data.js b/admin/js/vendors/tabulator/js/modules/reactive_data.js similarity index 73% rename from website/js/vendor/tabulator/js/modules/reactive_data.js rename to admin/js/vendors/tabulator/js/modules/reactive_data.js index def9edc..eb73971 100644 --- a/website/js/vendor/tabulator/js/modules/reactive_data.js +++ b/admin/js/vendors/tabulator/js/modules/reactive_data.js @@ -1,4 +1,4 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ var ReactiveData = function ReactiveData(table) { this.table = table; //hold Tabulator object @@ -172,7 +172,8 @@ ReactiveData.prototype.unwatchData = function () { }; ReactiveData.prototype.watchRow = function (row) { - var data = row.getData(); + var self = this, + data = row.getData(); this.blocked = true; @@ -180,98 +181,9 @@ ReactiveData.prototype.watchRow = function (row) { this.watchKey(row, data, key); } - if (this.table.options.dataTree) { - this.watchTreeChildren(row); - } - this.blocked = false; }; -ReactiveData.prototype.watchTreeChildren = function (row) { - var self = this, - childField = row.getData()[this.table.options.dataTreeChildField], - origFuncs = {}; - - function rebuildTree() { - self.table.modules.dataTree.initializeRow(row); - self.table.modules.dataTree.layoutRow(row); - self.table.rowManager.refreshActiveData("tree", false, true); - } - - if (childField) { - - origFuncs.push = childField.push; - - Object.defineProperty(childField, "push", { - enumerable: false, - configurable: true, - value: function value() { - var result = origFuncs.push.apply(childField, arguments); - - rebuildTree(); - - return result; - } - }); - - origFuncs.unshift = childField.unshift; - - Object.defineProperty(childField, "unshift", { - enumerable: false, - configurable: true, - value: function value() { - var result = origFuncs.unshift.apply(childField, arguments); - - rebuildTree(); - - return result; - } - }); - - origFuncs.shift = childField.shift; - - Object.defineProperty(childField, "shift", { - enumerable: false, - configurable: true, - value: function value() { - var result = origFuncs.shift.call(childField); - - rebuildTree(); - - return result; - } - }); - - origFuncs.pop = childField.pop; - - Object.defineProperty(childField, "pop", { - enumerable: false, - configurable: true, - value: function value() { - var result = origFuncs.pop.call(childField); - - rebuildTree(); - - return result; - } - }); - - origFuncs.splice = childField.splice; - - Object.defineProperty(childField, "splice", { - enumerable: false, - configurable: true, - value: function value() { - var result = origFuncs.splice.apply(childField, arguments); - - rebuildTree(); - - return result; - } - }); - } -}; - ReactiveData.prototype.watchKey = function (row, data, key) { var self = this, props = Object.getOwnPropertyDescriptor(data, key), diff --git a/admin/js/vendors/tabulator/js/modules/reactive_data.min.js b/admin/js/vendors/tabulator/js/modules/reactive_data.min.js new file mode 100644 index 0000000..c5dc047 --- /dev/null +++ b/admin/js/vendors/tabulator/js/modules/reactive_data.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ +var ReactiveData=function(e){this.table=e,this.data=!1,this.blocked=!1,this.origFuncs={},this.currentVersion=0};ReactiveData.prototype.watchData=function(e){var t,a=this;this.currentVersion++,t=this.currentVersion,a.unwatchData(),a.data=e,a.origFuncs.push=e.push,Object.defineProperty(a.data,"push",{enumerable:!1,configurable:!0,value:function(){var r=Array.from(arguments);return a.blocked||t!==a.currentVersion||r.forEach(function(e){a.table.rowManager.addRowActual(e,!1)}),a.origFuncs.push.apply(e,arguments)}}),a.origFuncs.unshift=e.unshift,Object.defineProperty(a.data,"unshift",{enumerable:!1,configurable:!0,value:function(){var r=Array.from(arguments);return a.blocked||t!==a.currentVersion||r.forEach(function(e){a.table.rowManager.addRowActual(e,!0)}),a.origFuncs.unshift.apply(e,arguments)}}),a.origFuncs.shift=e.shift,Object.defineProperty(a.data,"shift",{enumerable:!1,configurable:!0,value:function(){var r;return a.blocked||t!==a.currentVersion||a.data.length&&(r=a.table.rowManager.getRowFromDataObject(a.data[0]))&&r.deleteActual(),a.origFuncs.shift.call(e)}}),a.origFuncs.pop=e.pop,Object.defineProperty(a.data,"pop",{enumerable:!1,configurable:!0,value:function(){var r;return a.blocked||t!==a.currentVersion||a.data.length&&(r=a.table.rowManager.getRowFromDataObject(a.data[a.data.length-1]))&&r.deleteActual(),a.origFuncs.pop.call(e)}}),a.origFuncs.splice=e.splice,Object.defineProperty(a.data,"splice",{enumerable:!1,configurable:!0,value:function(){var r,o=Array.from(arguments),n=o[0]<0?e.length+o[0]:o[0],c=o[1],i=!!o[2]&&o.slice(2);if(!a.blocked&&t===a.currentVersion){if(i&&(r=!!e[n]&&a.table.rowManager.getRowFromDataObject(e[n]),r?i.forEach(function(e){a.table.rowManager.addRowActual(e,!0,r,!0)}):(i=i.slice().reverse(),i.forEach(function(e){a.table.rowManager.addRowActual(e,!0,!1,!0)}))),0!==c){var u=e.slice(n,void 0===o[1]?o[1]:n+c);u.forEach(function(e,t){var r=a.table.rowManager.getRowFromDataObject(e);r&&r.deleteActual(t!==u.length-1)})}(i||0!==c)&&a.table.rowManager.reRenderInPosition()}return a.origFuncs.splice.apply(e,arguments)}})},ReactiveData.prototype.unwatchData=function(){if(!1!==this.data)for(var e in this.origFuncs)Object.defineProperty(this.data,e,{enumerable:!0,configurable:!0,writable:!0,value:this.origFuncs.key})},ReactiveData.prototype.watchRow=function(e){var t=e.getData();this.blocked=!0;for(var a in t)this.watchKey(e,t,a);this.blocked=!1},ReactiveData.prototype.watchKey=function(e,t,a){var r=this,o=Object.getOwnPropertyDescriptor(t,a),n=t[a],c=this.currentVersion;Object.defineProperty(t,a,{set:function(t){if(n=t,!r.blocked&&c===r.currentVersion){var i={};i[a]=t,e.updateData(i)}o.set&&o.set(t)},get:function(){return o.get&&o.get(),n}})},ReactiveData.prototype.unwatchRow=function(e){var t=e.getData();for(var a in t)Object.defineProperty(t,a,{value:t[a]})},ReactiveData.prototype.block=function(){this.blocked=!0},ReactiveData.prototype.unblock=function(){this.blocked=!1},Tabulator.prototype.registerModule("reactiveData",ReactiveData); \ No newline at end of file diff --git a/website/js/vendor/tabulator/js/modules/resize_columns.js b/admin/js/vendors/tabulator/js/modules/resize_columns.js similarity index 92% rename from website/js/vendor/tabulator/js/modules/resize_columns.js rename to admin/js/vendors/tabulator/js/modules/resize_columns.js index bf2b04a..753c02b 100644 --- a/website/js/vendor/tabulator/js/modules/resize_columns.js +++ b/admin/js/vendors/tabulator/js/modules/resize_columns.js @@ -1,4 +1,4 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ var ResizeColumns = function ResizeColumns(table) { this.table = table; //hold Tabulator object @@ -111,15 +111,7 @@ ResizeColumns.prototype._mouseDown = function (e, column, handle) { function mouseMove(e) { // self.table.columnManager.tempScrollBlock(); - if (self.table.rtl) { - column.setWidth(self.startWidth - ((typeof e.screenX === "undefined" ? e.touches[0].screenX : e.screenX) - self.startX)); - } else { - column.setWidth(self.startWidth + ((typeof e.screenX === "undefined" ? e.touches[0].screenX : e.screenX) - self.startX)); - } - - if (self.table.options.virtualDomHoz) { - self.table.vdomHoz.reinitialize(true); - } + column.setWidth(self.startWidth + ((typeof e.screenX === "undefined" ? e.touches[0].screenX : e.screenX) - self.startX)); if (!self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight) { column.checkCellHeights(); diff --git a/admin/js/vendors/tabulator/js/modules/resize_columns.min.js b/admin/js/vendors/tabulator/js/modules/resize_columns.min.js new file mode 100644 index 0000000..7ae0e38 --- /dev/null +++ b/admin/js/vendors/tabulator/js/modules/resize_columns.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ +var ResizeColumns=function(e){this.table=e,this.startColumn=!1,this.startX=!1,this.startWidth=!1,this.handle=null,this.prevHandle=null};ResizeColumns.prototype.initializeColumn=function(e,t,n){var o=this,i=!1,s=this.table.options.resizableColumns;if("header"===e&&(i="textarea"==t.definition.formatter||t.definition.variableHeight,t.modules.resize={variableHeight:i}),!0===s||s==e){var a=document.createElement("div");a.className="tabulator-col-resize-handle";var l=document.createElement("div");l.className="tabulator-col-resize-handle prev",a.addEventListener("click",function(e){e.stopPropagation()});var r=function(e){var n=t.getLastColumn();n&&o._checkResizability(n)&&(o.startColumn=t,o._mouseDown(e,n,a))};a.addEventListener("mousedown",r),a.addEventListener("touchstart",r,{passive:!0}),a.addEventListener("dblclick",function(e){var n=t.getLastColumn();n&&o._checkResizability(n)&&(e.stopPropagation(),n.reinitializeWidth(!0))}),l.addEventListener("click",function(e){e.stopPropagation()});var d=function(e){var n,i,s;(n=t.getFirstColumn())&&(i=o.table.columnManager.findColumnIndex(n),(s=i>0&&o.table.columnManager.getColumnByIndex(i-1))&&o._checkResizability(s)&&(o.startColumn=t,o._mouseDown(e,s,l)))};l.addEventListener("mousedown",d),l.addEventListener("touchstart",d,{passive:!0}),l.addEventListener("dblclick",function(e){var n,i,s;(n=t.getFirstColumn())&&(i=o.table.columnManager.findColumnIndex(n),(s=i>0&&o.table.columnManager.getColumnByIndex(i-1))&&o._checkResizability(s)&&(e.stopPropagation(),s.reinitializeWidth(!0)))}),n.appendChild(a),n.appendChild(l)}},ResizeColumns.prototype._checkResizability=function(e){return void 0!==e.definition.resizable?e.definition.resizable:this.table.options.resizableColumns},ResizeColumns.prototype._mouseDown=function(e,t,n){function o(e){t.setWidth(s.startWidth+((void 0===e.screenX?e.touches[0].screenX:e.screenX)-s.startX)),!s.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights()}function i(e){s.startColumn.modules.edit&&(s.startColumn.modules.edit.blocked=!1),s.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights(),document.body.removeEventListener("mouseup",i),document.body.removeEventListener("mousemove",o),n.removeEventListener("touchmove",o),n.removeEventListener("touchend",i),s.table.element.classList.remove("tabulator-block-select"),s.table.options.persistence&&s.table.modExists("persistence",!0)&&s.table.modules.persistence.config.columns&&s.table.modules.persistence.save("columns"),s.table.options.columnResized.call(s.table,t.getComponent())}var s=this;s.table.element.classList.add("tabulator-block-select"),e.stopPropagation(),s.startColumn.modules.edit&&(s.startColumn.modules.edit.blocked=!0),s.startX=void 0===e.screenX?e.touches[0].screenX:e.screenX,s.startWidth=t.getWidth(),document.body.addEventListener("mousemove",o),document.body.addEventListener("mouseup",i),n.addEventListener("touchmove",o,{passive:!0}),n.addEventListener("touchend",i)},Tabulator.prototype.registerModule("resizeColumns",ResizeColumns); \ No newline at end of file diff --git a/website/js/vendor/tabulator/js/modules/resize_rows.js b/admin/js/vendors/tabulator/js/modules/resize_rows.js similarity index 96% rename from website/js/vendor/tabulator/js/modules/resize_rows.js rename to admin/js/vendors/tabulator/js/modules/resize_rows.js index d00b54a..8d39fcd 100644 --- a/website/js/vendor/tabulator/js/modules/resize_rows.js +++ b/admin/js/vendors/tabulator/js/modules/resize_rows.js @@ -1,4 +1,4 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ var ResizeRows = function ResizeRows(table) { this.table = table; //hold Tabulator object diff --git a/website/js/vendor/tabulator/js/modules/resize_rows.min.js b/admin/js/vendors/tabulator/js/modules/resize_rows.min.js similarity index 95% rename from website/js/vendor/tabulator/js/modules/resize_rows.min.js rename to admin/js/vendors/tabulator/js/modules/resize_rows.min.js index 9167a11..fb0db00 100644 --- a/website/js/vendor/tabulator/js/modules/resize_rows.min.js +++ b/admin/js/vendors/tabulator/js/modules/resize_rows.min.js @@ -1,2 +1,2 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ var ResizeRows=function(e){this.table=e,this.startColumn=!1,this.startY=!1,this.startHeight=!1,this.handle=null,this.prevHandle=null};ResizeRows.prototype.initializeRow=function(e){var t=this,o=e.getElement(),s=document.createElement("div");s.className="tabulator-row-resize-handle";var n=document.createElement("div");n.className="tabulator-row-resize-handle prev",s.addEventListener("click",function(e){e.stopPropagation()});var a=function(o){t.startRow=e,t._mouseDown(o,e,s)};s.addEventListener("mousedown",a),s.addEventListener("touchstart",a,{passive:!0}),n.addEventListener("click",function(e){e.stopPropagation()});var r=function(o){var s=t.table.rowManager.prevDisplayRow(e);s&&(t.startRow=s,t._mouseDown(o,s,n))};n.addEventListener("mousedown",r),n.addEventListener("touchstart",r,{passive:!0}),o.appendChild(s),o.appendChild(n)},ResizeRows.prototype._mouseDown=function(e,t,o){function s(e){t.setHeight(a.startHeight+((void 0===e.screenY?e.touches[0].screenY:e.screenY)-a.startY))}function n(e){document.body.removeEventListener("mouseup",s),document.body.removeEventListener("mousemove",s),o.removeEventListener("touchmove",s),o.removeEventListener("touchend",n),a.table.element.classList.remove("tabulator-block-select"),a.table.options.rowResized.call(this.table,t.getComponent())}var a=this;a.table.element.classList.add("tabulator-block-select"),e.stopPropagation(),a.startY=void 0===e.screenY?e.touches[0].screenY:e.screenY,a.startHeight=t.getHeight(),document.body.addEventListener("mousemove",s),document.body.addEventListener("mouseup",n),o.addEventListener("touchmove",s,{passive:!0}),o.addEventListener("touchend",n)},Tabulator.prototype.registerModule("resizeRows",ResizeRows); \ No newline at end of file diff --git a/website/js/vendor/tabulator/js/modules/resize_table.js b/admin/js/vendors/tabulator/js/modules/resize_table.js similarity index 88% rename from website/js/vendor/tabulator/js/modules/resize_table.js rename to admin/js/vendors/tabulator/js/modules/resize_table.js index 9f796ca..1286641 100644 --- a/website/js/vendor/tabulator/js/modules/resize_table.js +++ b/admin/js/vendors/tabulator/js/modules/resize_table.js @@ -1,4 +1,4 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ var ResizeTable = function ResizeTable(table) { this.table = table; //hold Tabulator object @@ -47,10 +47,6 @@ ResizeTable.prototype.initialize = function (row) { _this.containerWidth = table.element.parentNode.clientWidth; } - if (table.options.virtualDomHoz) { - table.vdomHoz.reinitialize(true); - } - table.redraw(); } } @@ -73,10 +69,8 @@ ResizeTable.prototype.initialize = function (row) { _this.containerWidth = nodeWidth; _this.tableHeight = table.element.clientHeight; _this.tableWidth = table.element.clientWidth; - } - if (table.options.virtualDomHoz) { - table.vdomHoz.reinitialize(true); + table.redraw(); } table.redraw(); @@ -88,10 +82,6 @@ ResizeTable.prototype.initialize = function (row) { } else { this.binding = function () { if (!table.browserMobile || table.browserMobile && !table.modules.edit.currentCell) { - if (table.options.virtualDomHoz) { - table.vdomHoz.reinitialize(true); - } - table.redraw(); } }; diff --git a/admin/js/vendors/tabulator/js/modules/resize_table.min.js b/admin/js/vendors/tabulator/js/modules/resize_table.min.js new file mode 100644 index 0000000..e992d75 --- /dev/null +++ b/admin/js/vendors/tabulator/js/modules/resize_table.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ +var ResizeTable=function(e){this.table=e,this.binding=!1,this.observer=!1,this.containerObserver=!1,this.tableHeight=0,this.tableWidth=0,this.containerHeight=0,this.containerWidth=0,this.autoResize=!1};ResizeTable.prototype.initialize=function(e){var t,i=this,n=this.table;this.tableHeight=n.element.clientHeight,this.tableWidth=n.element.clientWidth,n.element.parentNode&&(this.containerHeight=n.element.parentNode.clientHeight,this.containerWidth=n.element.parentNode.clientWidth),"undefined"!=typeof ResizeObserver&&"virtual"===n.rowManager.getRenderMode()?(this.autoResize=!0,this.observer=new ResizeObserver(function(e){if(!n.browserMobile||n.browserMobile&&!n.modules.edit.currentCell){var t=Math.floor(e[0].contentRect.height),r=Math.floor(e[0].contentRect.width);i.tableHeight==t&&i.tableWidth==r||(i.tableHeight=t,i.tableWidth=r,n.element.parentNode&&(i.containerHeight=n.element.parentNode.clientHeight,i.containerWidth=n.element.parentNode.clientWidth),n.redraw())}}),this.observer.observe(n.element),t=window.getComputedStyle(n.element),this.table.element.parentNode&&!this.table.rowManager.fixedHeight&&(t.getPropertyValue("max-height")||t.getPropertyValue("min-height"))&&(this.containerObserver=new ResizeObserver(function(e){if(!n.browserMobile||n.browserMobile&&!n.modules.edit.currentCell){var t=Math.floor(e[0].contentRect.height),r=Math.floor(e[0].contentRect.width);i.containerHeight==t&&i.containerWidth==r||(i.containerHeight=t,i.containerWidth=r,i.tableHeight=n.element.clientHeight,i.tableWidth=n.element.clientWidth,n.redraw()),n.redraw()}}),this.containerObserver.observe(this.table.element.parentNode))):(this.binding=function(){(!n.browserMobile||n.browserMobile&&!n.modules.edit.currentCell)&&n.redraw()},window.addEventListener("resize",this.binding))},ResizeTable.prototype.clearBindings=function(e){this.binding&&window.removeEventListener("resize",this.binding),this.observer&&this.observer.unobserve(this.table.element),this.containerObserver&&this.containerObserver.unobserve(this.table.element.parentNode)},Tabulator.prototype.registerModule("resizeTable",ResizeTable); \ No newline at end of file diff --git a/website/js/vendor/tabulator/js/modules/responsive_layout.js b/admin/js/vendors/tabulator/js/modules/responsive_layout.js similarity index 99% rename from website/js/vendor/tabulator/js/modules/responsive_layout.js rename to admin/js/vendors/tabulator/js/modules/responsive_layout.js index 67fa6a3..329f2a6 100644 --- a/website/js/vendor/tabulator/js/modules/responsive_layout.js +++ b/admin/js/vendors/tabulator/js/modules/responsive_layout.js @@ -1,4 +1,4 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ var ResponsiveLayout = function ResponsiveLayout(table) { this.table = table; //hold Tabulator object diff --git a/website/js/vendor/tabulator/js/modules/responsive_layout.min.js b/admin/js/vendors/tabulator/js/modules/responsive_layout.min.js similarity index 98% rename from website/js/vendor/tabulator/js/modules/responsive_layout.min.js rename to admin/js/vendors/tabulator/js/modules/responsive_layout.min.js index 661f21a..4ef6538 100644 --- a/website/js/vendor/tabulator/js/modules/responsive_layout.min.js +++ b/admin/js/vendors/tabulator/js/modules/responsive_layout.min.js @@ -1,2 +1,2 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ var ResponsiveLayout=function(e){this.table=e,this.columns=[],this.hiddenColumns=[],this.mode="",this.index=0,this.collapseFormatter=[],this.collapseStartOpen=!0,this.collapseHandleColumn=!1};ResponsiveLayout.prototype.initialize=function(){var e=this,t=[];this.mode=this.table.options.responsiveLayout,this.collapseFormatter=this.table.options.responsiveLayoutCollapseFormatter||this.formatCollapsedData,this.collapseStartOpen=this.table.options.responsiveLayoutCollapseStartOpen,this.hiddenColumns=[],this.table.columnManager.columnsByIndex.forEach(function(o,n){o.modules.responsive&&o.modules.responsive.order&&o.modules.responsive.visible&&(o.modules.responsive.index=n,t.push(o),o.visible||"collapse"!==e.mode||e.hiddenColumns.push(o))}),t=t.reverse(),t=t.sort(function(e,t){return t.modules.responsive.order-e.modules.responsive.order||t.modules.responsive.index-e.modules.responsive.index}),this.columns=t,"collapse"===this.mode&&this.generateCollapsedContent();for(var o=this.table.columnManager.columnsByIndex,n=Array.isArray(o),s=0,o=n?o:o[Symbol.iterator]();;){var i;if(n){if(s>=o.length)break;i=o[s++]}else{if(s=o.next(),s.done)break;i=s.value}var l=i;if("responsiveCollapse"==l.definition.formatter){this.collapseHandleColumn=l;break}}this.collapseHandleColumn&&(this.hiddenColumns.length?this.collapseHandleColumn.show():this.collapseHandleColumn.hide())},ResponsiveLayout.prototype.initializeColumn=function(e){var t=e.getDefinition();e.modules.responsive={order:void 0===t.responsive?1:t.responsive,visible:!1!==t.visible}},ResponsiveLayout.prototype.initializeRow=function(e){var t;"calc"!==e.type&&(t=document.createElement("div"),t.classList.add("tabulator-responsive-collapse"),e.modules.responsiveLayout={element:t,open:this.collapseStartOpen},this.collapseStartOpen||(t.style.display="none"))},ResponsiveLayout.prototype.layoutRow=function(e){var t=e.getElement();e.modules.responsiveLayout&&(t.appendChild(e.modules.responsiveLayout.element),this.generateCollapsedRowContent(e))},ResponsiveLayout.prototype.updateColumnVisibility=function(e,t){e.modules.responsive&&(e.modules.responsive.visible=t,this.initialize())},ResponsiveLayout.prototype.hideColumn=function(e){var t=this.hiddenColumns.length;e.hide(!1,!0),"collapse"===this.mode&&(this.hiddenColumns.unshift(e),this.generateCollapsedContent(),this.collapseHandleColumn&&!t&&this.collapseHandleColumn.show())},ResponsiveLayout.prototype.showColumn=function(e){var t;e.show(!1,!0),e.setWidth(e.getWidth()),"collapse"===this.mode&&(t=this.hiddenColumns.indexOf(e),t>-1&&this.hiddenColumns.splice(t,1),this.generateCollapsedContent(),this.collapseHandleColumn&&!this.hiddenColumns.length&&this.collapseHandleColumn.hide())},ResponsiveLayout.prototype.update=function(){for(var e=this,t=!0;t;){var o="fitColumns"==e.table.modules.layout.getMode()?e.table.columnManager.getFlexBaseWidth():e.table.columnManager.getWidth(),n=(e.table.options.headerVisible?e.table.columnManager.element.clientWidth:e.table.element.clientWidth)-o;if(n<0){var s=e.columns[e.index];s?(e.hideColumn(s),e.index++):t=!1}else{var i=e.columns[e.index-1];i&&n>0&&n>=i.getWidth()?(e.showColumn(i),e.index--):t=!1}e.table.rowManager.activeRowsCount||e.table.rowManager.renderEmptyScroll()}},ResponsiveLayout.prototype.generateCollapsedContent=function(){var e=this;this.table.rowManager.getDisplayRows().forEach(function(t){e.generateCollapsedRowContent(t)})},ResponsiveLayout.prototype.generateCollapsedRowContent=function(e){var t,o;if(e.modules.responsiveLayout){for(t=e.modules.responsiveLayout.element;t.firstChild;)t.removeChild(t.firstChild);o=this.collapseFormatter(this.generateCollapsedRowData(e)),o&&t.appendChild(o)}},ResponsiveLayout.prototype.generateCollapsedRowData=function(e){var t,o=this,n=e.getData(),s=[];return this.hiddenColumns.forEach(function(i){var l=i.getFieldValue(n);i.definition.title&&i.field&&(i.modules.format&&o.table.options.responsiveLayoutCollapseUseFormatters?(t={value:!1,data:{},getValue:function(){return l},getData:function(){return n},getElement:function(){return document.createElement("div")},getRow:function(){return e.getComponent()},getColumn:function(){return i.getComponent()}},s.push({title:i.definition.title,value:i.modules.format.formatter.call(o.table.modules.format,t,i.modules.format.params)})):s.push({title:i.definition.title,value:l}))}),s},ResponsiveLayout.prototype.formatCollapsedData=function(e){var t=document.createElement("table"),o="";return e.forEach(function(e){var t=document.createElement("div");e.value instanceof Node&&(t.appendChild(e.value),e.value=t.innerHTML),o+=""+e.title+""+e.value+""}),t.innerHTML=o,Object.keys(e).length?t:""},Tabulator.prototype.registerModule("responsiveLayout",ResponsiveLayout); \ No newline at end of file diff --git a/website/js/vendor/tabulator/js/modules/select_row.js b/admin/js/vendors/tabulator/js/modules/select_row.js similarity index 99% rename from website/js/vendor/tabulator/js/modules/select_row.js rename to admin/js/vendors/tabulator/js/modules/select_row.js index 8ddf0b8..2869429 100644 --- a/website/js/vendor/tabulator/js/modules/select_row.js +++ b/admin/js/vendors/tabulator/js/modules/select_row.js @@ -1,6 +1,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; -/* Tabulator v4.8.3 (c) Oliver Folkerd */ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ var SelectRow = function SelectRow(table) { this.table = table; //hold Tabulator object diff --git a/website/js/vendor/tabulator/js/modules/select_row.min.js b/admin/js/vendors/tabulator/js/modules/select_row.min.js similarity index 98% rename from website/js/vendor/tabulator/js/modules/select_row.min.js rename to admin/js/vendors/tabulator/js/modules/select_row.min.js index 9964b56..488d7e6 100644 --- a/website/js/vendor/tabulator/js/modules/select_row.min.js +++ b/admin/js/vendors/tabulator/js/modules/select_row.min.js @@ -1,2 +1,2 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},SelectRow=function(e){this.table=e,this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],this.headerCheckboxElement=null};SelectRow.prototype.clearSelectionData=function(e){this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],e||this._rowSelectionChanged()},SelectRow.prototype.initializeRow=function(e){var t=this,o=e.getElement(),l=function e(){setTimeout(function(){t.selecting=!1},50),document.body.removeEventListener("mouseup",e)};e.modules.select={selected:!1},t.table.options.selectableCheck.call(this.table,e.getComponent())?(o.classList.add("tabulator-selectable"),o.classList.remove("tabulator-unselectable"),t.table.options.selectable&&"highlight"!=t.table.options.selectable&&("click"===t.table.options.selectableRangeMode?o.addEventListener("click",function(o){if(o.shiftKey){t.table._clearSelection(),t.lastClickedRow=t.lastClickedRow||e;var l=t.table.rowManager.getDisplayRowIndex(t.lastClickedRow),s=t.table.rowManager.getDisplayRowIndex(e),c=l<=s?l:s,i=l>=s?l:s,n=t.table.rowManager.getDisplayRows().slice(0),a=n.splice(c,i-c+1);o.ctrlKey||o.metaKey?(a.forEach(function(o){o!==t.lastClickedRow&&(!0===t.table.options.selectable||t.isRowSelected(e)?t.toggleRow(o):t.selectedRows.lengtht.table.options.selectable&&(a=a.slice(0,t.table.options.selectable)),t.selectRows(a)),t.table._clearSelection()}else o.ctrlKey||o.metaKey?(t.toggleRow(e),t.lastClickedRow=e):(t.deselectRows(void 0,!0),t.selectRows(e),t.lastClickedRow=e)}):(o.addEventListener("click",function(o){t.table.modExists("edit")&&t.table.modules.edit.getCurrentCell()||t.table._clearSelection(),t.selecting||t.toggleRow(e)}),o.addEventListener("mousedown",function(o){if(o.shiftKey)return t.table._clearSelection(),t.selecting=!0,t.selectPrev=[],document.body.addEventListener("mouseup",l),document.body.addEventListener("keyup",l),t.toggleRow(e),!1}),o.addEventListener("mouseenter",function(o){t.selecting&&(t.table._clearSelection(),t.toggleRow(e),t.selectPrev[1]==e&&t.toggleRow(t.selectPrev[0]))}),o.addEventListener("mouseout",function(o){t.selecting&&(t.table._clearSelection(),t.selectPrev.unshift(e))})))):(o.classList.add("tabulator-unselectable"),o.classList.remove("tabulator-selectable"))},SelectRow.prototype.toggleRow=function(e){this.table.options.selectableCheck.call(this.table,e.getComponent())&&(e.modules.select&&e.modules.select.selected?this._deselectRow(e):this._selectRow(e))},SelectRow.prototype.selectRows=function(e){var t,o=this;switch(void 0===e?"undefined":_typeof(e)){case"undefined":this.table.rowManager.rows.forEach(function(e){o._selectRow(e,!0,!0)}),this._rowSelectionChanged();break;case"string":t=this.table.rowManager.findRow(e),t?this._selectRow(t,!0,!0):this.table.rowManager.getRows(e).forEach(function(e){o._selectRow(e,!0,!0)}),this._rowSelectionChanged();break;default:Array.isArray(e)?(e.forEach(function(e){o._selectRow(e,!0,!0)}),this._rowSelectionChanged()):this._selectRow(e,!1,!0)}},SelectRow.prototype._selectRow=function(e,t,o){if(!isNaN(this.table.options.selectable)&&!0!==this.table.options.selectable&&!o&&this.selectedRows.length>=this.table.options.selectable){if(!this.table.options.selectableRollingSelection)return!1;this._deselectRow(this.selectedRows[0])}var l=this.table.rowManager.findRow(e);l?-1==this.selectedRows.indexOf(l)&&(l.modules.select||(l.modules.select={}),l.modules.select.selected=!0,l.modules.select.checkboxEl&&(l.modules.select.checkboxEl.checked=!0),l.getElement().classList.add("tabulator-selected"),this.selectedRows.push(l),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(l,!0),t||this.table.options.rowSelected.call(this.table,l.getComponent()),this._rowSelectionChanged(t)):t||console.warn("Selection Error - No such row found, ignoring selection:"+e)},SelectRow.prototype.isRowSelected=function(e){return-1!==this.selectedRows.indexOf(e)},SelectRow.prototype.deselectRows=function(e,t){var o,l=this;if(void 0===e){o=l.selectedRows.length;for(var s=0;s-1&&(s.modules.select||(s.modules.select={}),s.modules.select.selected=!1,s.modules.select.checkboxEl&&(s.modules.select.checkboxEl.checked=!1),s.getElement().classList.remove("tabulator-selected"),l.selectedRows.splice(o,1),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(s,!1),t||l.table.options.rowDeselected.call(this.table,s.getComponent()),l._rowSelectionChanged(t)):t||console.warn("Deselection Error - No such row found, ignoring selection:"+e)},SelectRow.prototype.getSelectedData=function(){var e=[];return this.selectedRows.forEach(function(t){e.push(t.getData())}),e},SelectRow.prototype.getSelectedRows=function(){var e=[];return this.selectedRows.forEach(function(t){e.push(t.getComponent())}),e},SelectRow.prototype._rowSelectionChanged=function(e){this.headerCheckboxElement&&(0===this.selectedRows.length?(this.headerCheckboxElement.checked=!1,this.headerCheckboxElement.indeterminate=!1):this.table.rowManager.rows.length===this.selectedRows.length?(this.headerCheckboxElement.checked=!0,this.headerCheckboxElement.indeterminate=!1):(this.headerCheckboxElement.indeterminate=!0,this.headerCheckboxElement.checked=!1)),e||this.table.options.rowSelectionChanged.call(this.table,this.getSelectedData(),this.getSelectedRows())},SelectRow.prototype.registerRowSelectCheckbox=function(e,t){e._row.modules.select||(e._row.modules.select={}),e._row.modules.select.checkboxEl=t},SelectRow.prototype.registerHeaderSelectCheckbox=function(e){this.headerCheckboxElement=e},SelectRow.prototype.childRowSelection=function(e,t){var o=this.table.modules.dataTree.getChildren(e);if(t)for(var l=o,s=Array.isArray(l),c=0,l=s?l:l[Symbol.iterator]();;){var i;if(s){if(c>=l.length)break;i=l[c++]}else{if(c=l.next(),c.done)break;i=c.value}var n=i;this._selectRow(n,!0)}else for(var a=o,r=Array.isArray(a),d=0,a=r?a:a[Symbol.iterator]();;){var h;if(r){if(d>=a.length)break;h=a[d++]}else{if(d=a.next(),d.done)break;h=d.value}var w=h;this._deselectRow(w,!0)}},Tabulator.prototype.registerModule("selectRow",SelectRow); \ No newline at end of file diff --git a/website/js/vendor/tabulator/js/modules/sort.js b/admin/js/vendors/tabulator/js/modules/sort.js similarity index 97% rename from website/js/vendor/tabulator/js/modules/sort.js rename to admin/js/vendors/tabulator/js/modules/sort.js index beba8fa..2422968 100644 --- a/website/js/vendor/tabulator/js/modules/sort.js +++ b/admin/js/vendors/tabulator/js/modules/sort.js @@ -1,6 +1,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; -/* Tabulator v4.8.3 (c) Oliver Folkerd */ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ var Sort = function Sort(table) { this.table = table; //hold Tabulator object @@ -43,19 +43,10 @@ Sort.prototype.initializeColumn = function (column, content) { colEl.classList.add("tabulator-sortable"); arrowEl = document.createElement("div"); - arrowEl.classList.add("tabulator-col-sorter"); - - if (_typeof(this.table.options.headerSortElement) == "object") { - arrowEl.appendChild(this.table.options.headerSortElement); - } else { - arrowEl.innerHTML = this.table.options.headerSortElement; - } - + arrowEl.classList.add("tabulator-arrow"); //create sorter arrow content.appendChild(arrowEl); - column.modules.sort.element = arrowEl; - //sort on click colEl.addEventListener("click", function (e) { var dir = "", diff --git a/admin/js/vendors/tabulator/js/modules/sort.min.js b/admin/js/vendors/tabulator/js/modules/sort.min.js new file mode 100644 index 0000000..d0b4cb0 --- /dev/null +++ b/admin/js/vendors/tabulator/js/modules/sort.min.js @@ -0,0 +1,2 @@ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ +var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sort=function(t){this.table=t,this.sortList=[],this.changed=!1};Sort.prototype.initializeColumn=function(t,e){var r,o,n=this,i=!1;switch(_typeof(t.definition.sorter)){case"string":n.sorters[t.definition.sorter]?i=n.sorters[t.definition.sorter]:console.warn("Sort Error - No such sorter found: ",t.definition.sorter);break;case"function":i=t.definition.sorter}t.modules.sort={sorter:i,dir:"none",params:t.definition.sorterParams||{},startingDir:t.definition.headerSortStartingDir||"asc",tristate:void 0!==t.definition.headerSortTristate?t.definition.headerSortTristate:this.table.options.headerSortTristate},(void 0===t.definition.headerSort?!1!==this.table.options.headerSort:!1!==t.definition.headerSort)&&(r=t.getElement(),r.classList.add("tabulator-sortable"),o=document.createElement("div"),o.classList.add("tabulator-arrow"),e.appendChild(o),r.addEventListener("click",function(e){var r="",o=[],i=!1;if(t.modules.sort){if(t.modules.sort.tristate)r="none"==t.modules.sort.dir?t.modules.sort.startingDir:t.modules.sort.dir==t.modules.sort.startingDir?"asc"==t.modules.sort.dir?"desc":"asc":"none";else switch(t.modules.sort.dir){case"asc":r="desc";break;case"desc":r="asc";break;default:r=t.modules.sort.startingDir}n.table.options.columnHeaderSortMulti&&(e.shiftKey||e.ctrlKey)?(o=n.getSort(),i=o.findIndex(function(e){return e.field===t.getField()}),i>-1?(o[i].dir=r,i!=o.length-1&&(i=o.splice(i,1)[0],"none"!=r&&o.push(i))):"none"!=r&&o.push({column:t,dir:r}),n.setSort(o)):"none"==r?n.clear():n.setSort(t,r),n.table.rowManager.sorterRefresh(!n.sortList.length)}}))},Sort.prototype.hasChanged=function(){var t=this.changed;return this.changed=!1,t},Sort.prototype.getSort=function(){var t=this,e=[];return t.sortList.forEach(function(t){t.column&&e.push({column:t.column.getComponent(),field:t.column.getField(),dir:t.dir})}),e},Sort.prototype.setSort=function(t,e){var r=this,o=[];Array.isArray(t)||(t=[{column:t,dir:e}]),t.forEach(function(t){var e;e=r.table.columnManager.findColumn(t.column),e?(t.column=e,o.push(t),r.changed=!0):console.warn("Sort Warning - Sort field does not exist and is being ignored: ",t.column)}),r.sortList=o,this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.sort&&this.table.modules.persistence.save("sort")},Sort.prototype.clear=function(){this.setSort([])},Sort.prototype.findSorter=function(t){var e,r=this.table.rowManager.activeRows[0],o="string";if(r&&(r=r.getData(),t.getField()))switch(e=t.getFieldValue(r),void 0===e?"undefined":_typeof(e)){case"undefined":o="string";break;case"boolean":o="boolean";break;default:isNaN(e)||""===e?e.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)&&(o="alphanum"):o="number"}return this.sorters[o]},Sort.prototype.sort=function(t){var e=this,r=this.table.options.sortOrderReverse?e.sortList.slice().reverse():e.sortList,o=[],n=[];e.table.options.dataSorting&&e.table.options.dataSorting.call(e.table,e.getSort()),e.clearColumnHeaders(),e.table.options.ajaxSorting?r.forEach(function(t,r){e.setColumnHeader(t.column,t.dir)}):(r.forEach(function(t,r){var n=t.column.modules.sort;t.column&&n&&(n.sorter||(n.sorter=e.findSorter(t.column)),t.params="function"==typeof n.params?n.params(t.column.getComponent(),t.dir):n.params,o.push(t)),e.setColumnHeader(t.column,t.dir)}),o.length&&e._sortItems(t,o)),e.table.options.dataSorted&&(t.forEach(function(t){n.push(t.getComponent())}),e.table.options.dataSorted.call(e.table,e.getSort(),n))},Sort.prototype.clearColumnHeaders=function(){this.table.columnManager.getRealColumns().forEach(function(t){t.modules.sort&&(t.modules.sort.dir="none",t.getElement().setAttribute("aria-sort","none"))})},Sort.prototype.setColumnHeader=function(t,e){t.modules.sort.dir=e,t.getElement().setAttribute("aria-sort",e)},Sort.prototype._sortItems=function(t,e){var r=this,o=e.length-1;t.sort(function(t,n){for(var i,s=o;s>=0;s--){var a=e[s];if(0!==(i=r._sortRow(t,n,a.column,a.dir,a.params)))break}return i})},Sort.prototype._sortRow=function(t,e,r,o,n){var i,s,a="asc"==o?t:e,l="asc"==o?e:t;return t=r.getFieldValue(a.getData()),e=r.getFieldValue(l.getData()),t=void 0!==t?t:"",e=void 0!==e?e:"",i=a.getComponent(),s=l.getComponent(),r.modules.sort.sorter.call(this,t,e,i,s,r.getComponent(),o,n)},Sort.prototype.sorters={number:function(t,e,r,o,n,i,s){var a=s.alignEmptyValues,l=s.decimalSeparator||".",u=s.thousandSeparator||",",c=0;if(t=parseFloat(String(t).split(u).join("").split(l).join(".")),e=parseFloat(String(e).split(u).join("").split(l).join(".")),isNaN(t))c=isNaN(e)?0:-1;else{if(!isNaN(e))return t-e;c=1}return("top"===a&&"desc"===i||"bottom"===a&&"asc"===i)&&(c*=-1),c},string:function(t,e,r,o,n,i,s){var a,l=s.alignEmptyValues,u=0;if(t){if(e){switch(_typeof(s.locale)){case"boolean":s.locale&&(a=this.table.modules.localize.getLocale());break;case"string":a=s.locale}return String(t).toLowerCase().localeCompare(String(e).toLowerCase(),a)}u=1}else u=e?-1:0;return("top"===l&&"desc"===i||"bottom"===l&&"asc"===i)&&(u*=-1),u},date:function(t,e,r,o,n,i,s){return s.format||(s.format="DD/MM/YYYY"),this.sorters.datetime.call(this,t,e,r,o,n,i,s)},time:function(t,e,r,o,n,i,s){return s.format||(s.format="HH:mm"),this.sorters.datetime.call(this,t,e,r,o,n,i,s)},datetime:function(t,e,r,o,n,i,s){var a=s.format||"DD/MM/YYYY HH:mm:ss",l=s.alignEmptyValues,u=0;if("undefined"!=typeof moment){if(t=moment(t,a),e=moment(e,a),t.isValid()){if(e.isValid())return t-e;u=1}else u=e.isValid()?-1:0;return("top"===l&&"desc"===i||"bottom"===l&&"asc"===i)&&(u*=-1),u}console.error("Sort Error - 'datetime' sorter is dependant on moment.js")},boolean:function(t,e,r,o,n,i,s){return(!0===t||"true"===t||"True"===t||1===t?1:0)-(!0===e||"true"===e||"True"===e||1===e?1:0)},array:function(t,e,r,o,n,i,s){function a(t){switch(c){case"length":return t.length;case"sum":return t.reduce(function(t,e){return t+e});case"max":return Math.max.apply(null,t);case"min":return Math.min.apply(null,t);case"avg":return t.reduce(function(t,e){return t+e})/t.length}}var l=0,u=0,c=s.type||"length",d=s.alignEmptyValues,m=0;if(Array.isArray(t)){if(Array.isArray(e))return l=t?a(t):0,u=e?a(e):0,l-u;d=1}else d=Array.isArray(e)?-1:0;return("top"===d&&"desc"===i||"bottom"===d&&"asc"===i)&&(m*=-1),m},exists:function(t,e,r,o,n,i,s){return(void 0===t?0:1)-(void 0===e?0:1)},alphanum:function(t,e,r,o,n,i,s){var a,l,u,c,d,m=0,f=/(\d+)|(\D+)/g,p=/\d/,h=s.alignEmptyValues,g=0;if(t||0===t){if(e||0===e){if(isFinite(t)&&isFinite(e))return t-e;if(a=String(t).toLowerCase(),l=String(e).toLowerCase(),a===l)return 0;if(!p.test(a)||!p.test(l))return a>l?1:-1;for(a=a.match(f),l=l.match(f),d=a.length>l.length?l.length:a.length;mc?1:-1;return a.length>l.length}g=1}else g=e||0===e?-1:0;return("top"===h&&"desc"===i||"bottom"===h&&"asc"===i)&&(g*=-1),g}},Tabulator.prototype.registerModule("sort",Sort); \ No newline at end of file diff --git a/website/js/vendor/tabulator/js/modules/validate.js b/admin/js/vendors/tabulator/js/modules/validate.js similarity index 97% rename from website/js/vendor/tabulator/js/modules/validate.js rename to admin/js/vendors/tabulator/js/modules/validate.js index b5708a7..b5f6182 100644 --- a/website/js/vendor/tabulator/js/modules/validate.js +++ b/admin/js/vendors/tabulator/js/modules/validate.js @@ -1,6 +1,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; -/* Tabulator v4.8.3 (c) Oliver Folkerd */ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ var Validate = function Validate(table) { this.table = table; @@ -137,7 +137,7 @@ Validate.prototype.clearValidation = function (cell) { if (cell.modules.validate && cell.modules.validate.invalid) { - cell.getElement().classList.remove("tabulator-validation-fail"); + cell.element.classList.remove("tabulator-validation-fail"); cell.modules.validate.invalid = false; invalidIndex = this.invalidCells.indexOf(cell); diff --git a/website/js/vendor/tabulator/js/modules/validate.min.js b/admin/js/vendors/tabulator/js/modules/validate.min.js similarity index 52% rename from website/js/vendor/tabulator/js/modules/validate.min.js rename to admin/js/vendors/tabulator/js/modules/validate.min.js index 917be7a..fc189c0 100644 --- a/website/js/vendor/tabulator/js/modules/validate.min.js +++ b/admin/js/vendors/tabulator/js/modules/validate.min.js @@ -1,2 +1,2 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Validate=function(t){this.table=t,this.invalidCells=[]};Validate.prototype.initializeColumn=function(t){var i,n=this,e=[];t.definition.validator&&(Array.isArray(t.definition.validator)?t.definition.validator.forEach(function(t){(i=n._extractValidator(t))&&e.push(i)}):(i=this._extractValidator(t.definition.validator))&&e.push(i),t.modules.validate=!!e.length&&e)},Validate.prototype._extractValidator=function(t){var i,n,e;switch(void 0===t?"undefined":_typeof(t)){case"string":return e=t.indexOf(":"),e>-1?(i=t.substring(0,e),n=t.substring(e+1)):i=t,this._buildValidator(i,n);case"function":return this._buildValidator(t);case"object":return this._buildValidator(t.type,t.parameters)}},Validate.prototype._buildValidator=function(t,i){var n="function"==typeof t?t:this.validators[t];return n?{type:"function"==typeof t?"function":t,func:n,params:i}:(console.warn("Validator Setup Error - No matching validator found:",t),!1)},Validate.prototype.validate=function(t,i,n){var e=this,a=[],o=this.invalidCells.indexOf(i);return t&&t.forEach(function(t){t.func.call(e,i.getComponent(),n,t.params)||a.push({type:t.type,parameters:t.params})}),a=!a.length||a,i.modules.validate||(i.modules.validate={}),!0===a?(i.modules.validate.invalid=!1,i.getElement().classList.remove("tabulator-validation-fail"),o>-1&&this.invalidCells.splice(o,1)):(i.modules.validate.invalid=!0,"manual"!==this.table.options.validationMode&&i.getElement().classList.add("tabulator-validation-fail"),-1==o&&this.invalidCells.push(i)),a},Validate.prototype.getInvalidCells=function(){var t=[];return this.invalidCells.forEach(function(i){t.push(i.getComponent())}),t},Validate.prototype.clearValidation=function(t){var i;t.modules.validate&&t.modules.validate.invalid&&(t.getElement().classList.remove("tabulator-validation-fail"),t.modules.validate.invalid=!1,(i=this.invalidCells.indexOf(t))>-1&&this.invalidCells.splice(i,1))},Validate.prototype.validators={integer:function(t,i,n){return""===i||null===i||void 0===i||"number"==typeof(i=Number(i))&&isFinite(i)&&Math.floor(i)===i},float:function(t,i,n){return""===i||null===i||void 0===i||"number"==typeof(i=Number(i))&&isFinite(i)&&i%1!=0},numeric:function(t,i,n){return""===i||null===i||void 0===i||!isNaN(i)},string:function(t,i,n){return""===i||null===i||void 0===i||isNaN(i)},max:function(t,i,n){return""===i||null===i||void 0===i||parseFloat(i)<=n},min:function(t,i,n){return""===i||null===i||void 0===i||parseFloat(i)>=n},starts:function(t,i,n){return""===i||null===i||void 0===i||String(i).toLowerCase().startsWith(String(n).toLowerCase())},ends:function(t,i,n){return""===i||null===i||void 0===i||String(i).toLowerCase().endsWith(String(n).toLowerCase())},minLength:function(t,i,n){return""===i||null===i||void 0===i||String(i).length>=n},maxLength:function(t,i,n){return""===i||null===i||void 0===i||String(i).length<=n},in:function(t,i,n){return""===i||null===i||void 0===i||("string"==typeof n&&(n=n.split("|")),""===i||n.indexOf(i)>-1)},regex:function(t,i,n){return""===i||null===i||void 0===i||new RegExp(n).test(i)},unique:function(t,i,n){if(""===i||null===i||void 0===i)return!0;var e=!0,a=t.getData(),o=t.getColumn()._getSelf();return this.table.rowManager.rows.forEach(function(t){var n=t.getData();n!==a&&i==o.getFieldValue(n)&&(e=!1)}),e},required:function(t,i,n){return""!==i&&null!==i&&void 0!==i}},Tabulator.prototype.registerModule("validate",Validate); \ No newline at end of file +/* Tabulator v4.7.0 (c) Oliver Folkerd */ +var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Validate=function(t){this.table=t,this.invalidCells=[]};Validate.prototype.initializeColumn=function(t){var i,n=this,e=[];t.definition.validator&&(Array.isArray(t.definition.validator)?t.definition.validator.forEach(function(t){(i=n._extractValidator(t))&&e.push(i)}):(i=this._extractValidator(t.definition.validator))&&e.push(i),t.modules.validate=!!e.length&&e)},Validate.prototype._extractValidator=function(t){var i,n,e;switch(void 0===t?"undefined":_typeof(t)){case"string":return e=t.indexOf(":"),e>-1?(i=t.substring(0,e),n=t.substring(e+1)):i=t,this._buildValidator(i,n);case"function":return this._buildValidator(t);case"object":return this._buildValidator(t.type,t.parameters)}},Validate.prototype._buildValidator=function(t,i){var n="function"==typeof t?t:this.validators[t];return n?{type:"function"==typeof t?"function":t,func:n,params:i}:(console.warn("Validator Setup Error - No matching validator found:",t),!1)},Validate.prototype.validate=function(t,i,n){var e=this,a=[],o=this.invalidCells.indexOf(i);return t&&t.forEach(function(t){t.func.call(e,i.getComponent(),n,t.params)||a.push({type:t.type,parameters:t.params})}),a=!a.length||a,i.modules.validate||(i.modules.validate={}),!0===a?(i.modules.validate.invalid=!1,i.getElement().classList.remove("tabulator-validation-fail"),o>-1&&this.invalidCells.splice(o,1)):(i.modules.validate.invalid=!0,"manual"!==this.table.options.validationMode&&i.getElement().classList.add("tabulator-validation-fail"),-1==o&&this.invalidCells.push(i)),a},Validate.prototype.getInvalidCells=function(){var t=[];return this.invalidCells.forEach(function(i){t.push(i.getComponent())}),t},Validate.prototype.clearValidation=function(t){var i;t.modules.validate&&t.modules.validate.invalid&&(t.element.classList.remove("tabulator-validation-fail"),t.modules.validate.invalid=!1,(i=this.invalidCells.indexOf(t))>-1&&this.invalidCells.splice(i,1))},Validate.prototype.validators={integer:function(t,i,n){return""===i||null===i||void 0===i||"number"==typeof(i=Number(i))&&isFinite(i)&&Math.floor(i)===i},float:function(t,i,n){return""===i||null===i||void 0===i||"number"==typeof(i=Number(i))&&isFinite(i)&&i%1!=0},numeric:function(t,i,n){return""===i||null===i||void 0===i||!isNaN(i)},string:function(t,i,n){return""===i||null===i||void 0===i||isNaN(i)},max:function(t,i,n){return""===i||null===i||void 0===i||parseFloat(i)<=n},min:function(t,i,n){return""===i||null===i||void 0===i||parseFloat(i)>=n},starts:function(t,i,n){return""===i||null===i||void 0===i||String(i).toLowerCase().startsWith(String(n).toLowerCase())},ends:function(t,i,n){return""===i||null===i||void 0===i||String(i).toLowerCase().endsWith(String(n).toLowerCase())},minLength:function(t,i,n){return""===i||null===i||void 0===i||String(i).length>=n},maxLength:function(t,i,n){return""===i||null===i||void 0===i||String(i).length<=n},in:function(t,i,n){return""===i||null===i||void 0===i||("string"==typeof n&&(n=n.split("|")),""===i||n.indexOf(i)>-1)},regex:function(t,i,n){return""===i||null===i||void 0===i||new RegExp(n).test(i)},unique:function(t,i,n){if(""===i||null===i||void 0===i)return!0;var e=!0,a=t.getData(),o=t.getColumn()._getSelf();return this.table.rowManager.rows.forEach(function(t){var n=t.getData();n!==a&&i==o.getFieldValue(n)&&(e=!1)}),e},required:function(t,i,n){return""!==i&&null!==i&&void 0!==i}},Tabulator.prototype.registerModule("validate",Validate); \ No newline at end of file diff --git a/website/js/vendor/tabulator/js/tabulator.js b/admin/js/vendors/tabulator/js/tabulator.js similarity index 90% rename from website/js/vendor/tabulator/js/tabulator.js rename to admin/js/vendors/tabulator/js/tabulator.js index 81f6fef..256e565 100644 --- a/website/js/vendor/tabulator/js/tabulator.js +++ b/admin/js/vendors/tabulator/js/tabulator.js @@ -1,6 +1,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; -/* Tabulator v4.8.3 (c) Oliver Folkerd */ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ ;(function (global, factory) { if ((typeof exports === 'undefined' ? 'undefined' : _typeof(exports)) === 'object' && typeof module !== 'undefined') { @@ -503,7 +503,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol ColumnManager.prototype.generateColumnsFromRowData = function (data) { var cols = [], - definitions = this.table.options.autoColumnsDefinitions, row, sorter; @@ -574,52 +573,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol cols.push(col); } - if (definitions) { - - switch (typeof definitions === 'undefined' ? 'undefined' : _typeof(definitions)) { - - case "function": - - this.table.options.columns = definitions.call(this.table, cols); - - break; - - case "object": - - if (Array.isArray(definitions)) { - - cols.forEach(function (col) { - - var match = definitions.find(function (def) { - - return def.field === col.field; - }); - - if (match) { - - Object.assign(col, match); - } - }); - } else { - - cols.forEach(function (col) { - - if (definitions[col.field]) { - - Object.assign(col, definitions[col.field]); - } - }); - } - - this.table.options.columns = cols; - - break; - - } - } else { - - this.table.options.columns = cols; - } + this.table.options.columns = cols; this.setColumns(this.table.options.columns); } @@ -657,11 +611,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol self.table.modules.responsiveLayout.initialize(); } - if (this.table.options.virtualDomHoz) { - - this.table.vdomHoz.reinitialize(false, true); - } - self.redraw(true); }; @@ -987,11 +936,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol this.table.modules.responsiveLayout.initialize(); } - if (this.table.options.virtualDomHoz) { - - this.table.vdomHoz.reinitialize(true); - } - if (this.table.options.columnMoved) { this.table.options.columnMoved.call(this.table, from.getComponent(), this.table.columnManager.getComponents()); @@ -1004,11 +948,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; ColumnManager.prototype._moveColumnInArray = function (columns, from, to, after, updateRows) { - var _this2 = this; var fromIndex = columns.indexOf(from), - toIndex, - rows = []; + toIndex; if (fromIndex > -1) { @@ -1031,17 +973,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol if (updateRows) { - if (this.table.options.dataTree && this.table.modExists("dataTree", true)) { - - this.table.rowManager.rows.forEach(function (row) { - - rows = rows.concat(_this2.table.modules.dataTree.getTreeChildren(row, false, true)); - }); - } - - rows = rows.concat(this.table.rowManager.rows); - - rows.forEach(function (row) { + this.table.rowManager.rows.forEach(function (row) { if (row.cells.length) { @@ -1055,7 +987,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; ColumnManager.prototype.scrollToColumn = function (column, position, ifVisible) { - var _this3 = this; + var _this2 = this; var left = 0, offset = 0, @@ -1066,12 +998,12 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol if (typeof position === "undefined") { - position = _this3.table.options.scrollToColumnPosition; + position = _this2.table.options.scrollToColumnPosition; } if (typeof ifVisible === "undefined") { - ifVisible = _this3.table.options.scrollToColumnIfVisible; + ifVisible = _this2.table.options.scrollToColumnIfVisible; } if (column.visible) { @@ -1085,13 +1017,13 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol case "center": - adjust = -_this3.element.clientWidth / 2; + adjust = -_this2.element.clientWidth / 2; break; case "right": - adjust = colEl.clientWidth - _this3.headersElement.clientWidth; + adjust = colEl.clientWidth - _this2.headersElement.clientWidth; break; @@ -1104,7 +1036,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol offset = colEl.offsetLeft; - if (offset > 0 && offset + colEl.offsetWidth < _this3.element.clientWidth) { + if (offset > 0 && offset + colEl.offsetWidth < _this2.element.clientWidth) { return false; } @@ -1113,13 +1045,13 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //calculate scroll position - left = colEl.offsetLeft + adjust; + left = colEl.offsetLeft + _this2.element.scrollLeft + adjust; - left = Math.max(Math.min(left, _this3.table.rowManager.element.scrollWidth - _this3.table.rowManager.element.clientWidth), 0); + left = Math.max(Math.min(left, _this2.table.rowManager.element.scrollWidth - _this2.table.rowManager.element.clientWidth), 0); - _this3.table.rowManager.scrollHorizontal(left); + _this2.table.rowManager.scrollHorizontal(left); - _this3.scrollHorizontal(left); + _this2.scrollHorizontal(left); resolve(); } else { @@ -1200,39 +1132,34 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; ColumnManager.prototype.addColumn = function (definition, before, nextToColumn) { - var _this4 = this; + var _this3 = this; return new Promise(function (resolve, reject) { - var column = _this4._addColumn(definition, before, nextToColumn); + var column = _this3._addColumn(definition, before, nextToColumn); - _this4._reIndexColumns(); + _this3._reIndexColumns(); - if (_this4.table.options.responsiveLayout && _this4.table.modExists("responsiveLayout", true)) { + if (_this3.table.options.responsiveLayout && _this3.table.modExists("responsiveLayout", true)) { - _this4.table.modules.responsiveLayout.initialize(); + _this3.table.modules.responsiveLayout.initialize(); } - if (_this4.table.modExists("columnCalcs")) { + if (_this3.table.modExists("columnCalcs")) { - _this4.table.modules.columnCalcs.recalc(_this4.table.rowManager.activeRows); + _this3.table.modules.columnCalcs.recalc(_this3.table.rowManager.activeRows); } - _this4.redraw(); + _this3.redraw(); - if (_this4.table.modules.layout.getMode() != "fitColumns") { + if (_this3.table.modules.layout.getMode() != "fitColumns") { column.reinitializeWidth(); } - _this4._verticalAlignHeaders(); + _this3._verticalAlignHeaders(); - _this4.table.rowManager.reinitialize(); - - if (_this4.table.options.virtualDomHoz) { - - _this4.table.vdomHoz.reinitialize(); - } + _this3.table.rowManager.reinitialize(); resolve(column); }); @@ -1279,8 +1206,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol this.table.modules.responsiveLayout.initialize(); } - this._verticalAlignHeaders(); - this.redraw(); }; @@ -1542,22 +1467,13 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol ColumnComponent.prototype.setWidth = function (width) { - var result; - if (width === true) { - result = this._column.reinitializeWidth(true); + return this._column.reinitializeWidth(true); } else { - result = this._column.setWidth(width); - } - - if (this._column.table.options.virtualDomHoz) { - - this._column.table.vdomHoz.reinitialize(true); + return this._column.setWidth(width); } - - return result; }; ColumnComponent.prototype.validate = function () { @@ -1585,8 +1501,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol this.contentElement = false; - this.titleHolderElement = false; - this.titleElement = false; this.groupElement = this.createGroupElement(); //column group holder element @@ -1718,13 +1632,13 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; Column.prototype.checkDefinition = function () { - var _this5 = this; + var _this4 = this; Object.keys(this.definition).forEach(function (key) { - if (_this5.defaultOptionList.indexOf(key) === -1) { + if (_this4.defaultOptionList.indexOf(key) === -1) { - console.warn("Invalid column definition option in '" + (_this5.field || _this5.definition.title) + "' column:", key); + console.warn("Invalid column definition option in '" + (_this4.field || _this4.definition.title) + "' column:", key); } }); }; @@ -2115,66 +2029,66 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //build header element for header Column.prototype._buildColumnHeader = function () { - var _this6 = this; - var def = this.definition, - table = this.table, + var self = this, + def = self.definition, + table = self.table, sortable; //set column sorter if (table.modExists("sort")) { - table.modules.sort.initializeColumn(this, this.titleHolderElement); + table.modules.sort.initializeColumn(self, self.contentElement); } //set column header context menu - if ((def.headerContextMenu || def.headerClickMenu || def.headerMenu) && table.modExists("menu")) { + if ((def.headerContextMenu || def.headerMenu) && table.modExists("menu")) { - table.modules.menu.initializeColumnHeader(this); + table.modules.menu.initializeColumnHeader(self); } //set column formatter if (table.modExists("format")) { - table.modules.format.initializeColumn(this); + table.modules.format.initializeColumn(self); } //set column editor if (typeof def.editor != "undefined" && table.modExists("edit")) { - table.modules.edit.initializeColumn(this); + table.modules.edit.initializeColumn(self); } //set colum validator if (typeof def.validator != "undefined" && table.modExists("validate")) { - table.modules.validate.initializeColumn(this); + table.modules.validate.initializeColumn(self); } //set column mutator if (table.modExists("mutator")) { - table.modules.mutator.initializeColumn(this); + table.modules.mutator.initializeColumn(self); } //set column accessor if (table.modExists("accessor")) { - table.modules.accessor.initializeColumn(this); + table.modules.accessor.initializeColumn(self); } //set respoviveLayout if (_typeof(table.options.responsiveLayout) && table.modExists("responsiveLayout")) { - table.modules.responsiveLayout.initializeColumn(this); + table.modules.responsiveLayout.initializeColumn(self); } //set column visibility @@ -2183,10 +2097,10 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol if (def.visible) { - this.show(true); + self.show(true); } else { - this.hide(true); + self.hide(true); } } @@ -2198,7 +2112,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol classeNames.forEach(function (className) { - _this6.element.classList.add(className); + self.element.classList.add(className); }); } @@ -2209,21 +2123,19 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //set min width if present - this.setMinWidth(typeof def.minWidth == "undefined" ? this.table.options.columnMinWidth : parseInt(def.minWidth)); + self.setMinWidth(typeof def.minWidth == "undefined" ? self.table.options.columnMinWidth : parseInt(def.minWidth)); - this.reinitializeWidth(); + self.reinitializeWidth(); //set tooltip if present - this.tooltip = this.definition.tooltip || this.definition.tooltip === false ? this.definition.tooltip : this.table.options.tooltips; + self.tooltip = self.definition.tooltip || self.definition.tooltip === false ? self.definition.tooltip : self.table.options.tooltips; //set orizontal text alignment - this.hozAlign = typeof this.definition.hozAlign == "undefined" ? this.table.options.cellHozAlign : this.definition.hozAlign; + self.hozAlign = typeof self.definition.hozAlign == "undefined" ? self.table.options.cellHozAlign : self.definition.hozAlign; - this.vertAlign = typeof this.definition.vertAlign == "undefined" ? this.table.options.cellVertAlign : this.definition.vertAlign; - - this.titleElement.style.textAlign = this.definition.headerHozAlign || this.table.options.headerHozAlign; + self.vertAlign = typeof self.definition.vertAlign == "undefined" ? self.table.options.cellVertAlign : self.definition.vertAlign; }; Column.prototype._buildColumnHeaderContent = function () { @@ -2235,15 +2147,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol contentElement.classList.add("tabulator-col-content"); - this.titleHolderElement = document.createElement("div"); - - this.titleHolderElement.classList.add("tabulator-col-title-holder"); - - contentElement.appendChild(this.titleHolderElement); - this.titleElement = this._buildColumnHeaderTitle(); - this.titleHolderElement.appendChild(this.titleElement); + contentElement.appendChild(this.titleElement); return contentElement; }; @@ -2311,7 +2217,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; Column.prototype._formatColumnHeaderTitle = function (el, title) { - var _this7 = this; + var _this5 = this; var formatter, contents, params, mockCell, onRendered; @@ -2321,7 +2227,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol onRendered = function onRendered(callback) { - _this7.titleFormatterRendered = callback; + _this5.titleFormatterRendered = callback; }; mockCell = { @@ -2382,7 +2288,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //build header element for column group Column.prototype._buildGroupHeader = function () { - var _this8 = this; + var _this6 = this; this.element.classList.add("tabulator-col-group"); @@ -2398,7 +2304,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol classeNames.forEach(function (className) { - _this8.element.classList.add(className); + _this6.element.classList.add(className); }); } @@ -2931,13 +2837,13 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; Column.prototype.delete = function () { - var _this9 = this; + var _this7 = this; return new Promise(function (resolve, reject) { - if (_this9.isGroup) { + if (_this7.isGroup) { - _this9.columns.forEach(function (column) { + _this7.columns.forEach(function (column) { column.delete(); }); @@ -2945,40 +2851,24 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //cancel edit if column is currently being edited - if (_this9.table.modExists("edit")) { + if (_this7.table.modExists("edit")) { - if (_this9.table.modules.edit.currentCell.column === _this9) { + if (_this7.table.modules.edit.currentCell.column === _this7) { - _this9.table.modules.edit.cancelEdit(); + _this7.table.modules.edit.cancelEdit(); } } - var cellCount = _this9.cells.length; + var cellCount = _this7.cells.length; for (var _i3 = 0; _i3 < cellCount; _i3++) { - _this9.cells[0].delete(); - } - - if (_this9.element.parentNode) { - - _this9.element.parentNode.removeChild(_this9.element); + _this7.cells[0].delete(); } - _this9.element = false; - - _this9.contentElement = false; - - _this9.titleElement = false; + _this7.element.parentNode.removeChild(_this7.element); - _this9.groupElement = false; - - _this9.table.columnManager.deregisterColumn(_this9); - - if (_this9.table.options.virtualDomHoz) { - - _this9.table.vdomHoz.reinitialize(true); - } + _this7.table.columnManager.deregisterColumn(_this7); resolve(); }); @@ -3117,26 +3007,26 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; Column.prototype.updateDefinition = function (updates) { - var _this10 = this; + var _this8 = this; return new Promise(function (resolve, reject) { var definition; - if (!_this10.isGroup) { + if (!_this8.isGroup) { - definition = Object.assign({}, _this10.getDefinition()); + definition = Object.assign({}, _this8.getDefinition()); definition = Object.assign(definition, updates); - _this10.table.columnManager.addColumn(definition, false, _this10).then(function (column) { + _this8.table.columnManager.addColumn(definition, false, _this8).then(function (column) { - if (definition.field == _this10.field) { + if (definition.field == _this8.field) { - _this10.field = false; //cleair field name to prevent deletion of duplicate column from arrays + _this8.field = false; //cleair field name to prevent deletion of duplicate column from arrays } - _this10.delete().then(function () { + _this8.delete().then(function () { resolve(column.getComponent()); }).catch(function (err) { @@ -3149,9 +3039,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }); } else { - console.warn("Column Update Error - The updateDefinition function is only available on columns, not column groups"); + console.warn("Column Update Error - The updateDefintion function is only available on columns, not column groups"); - reject("Column Update Error - The updateDefinition function is only available on columns, not column groups"); + reject("Column Update Error - The updateDefintion function is only available on columns, not column groups"); } }); }; @@ -3166,11 +3056,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol } }; - Column.prototype.defaultOptionList = ["title", "field", "columns", "visible", "align", "hozAlign", "vertAlign", "width", "minWidth", "widthGrow", "widthShrink", "resizable", "frozen", "responsive", "tooltip", "cssClass", "rowHandle", "hideInHtml", "print", "htmlOutput", "sorter", "sorterParams", "formatter", "formatterParams", "variableHeight", "editable", "editor", "editorParams", "validator", "mutator", "mutatorParams", "mutatorData", "mutatorDataParams", "mutatorEdit", "mutatorEditParams", "mutatorClipboard", "mutatorClipboardParams", "accessor", "accessorParams", "accessorData", "accessorDataParams", "accessorDownload", "accessorDownloadParams", "accessorClipboard", "accessorClipboardParams", "accessorPrint", "accessorPrintParams", "accessorHtmlOutput", "accessorHtmlOutputParams", "clipboard", "download", "downloadTitle", "topCalc", "topCalcParams", "topCalcFormatter", "topCalcFormatterParams", "bottomCalc", "bottomCalcParams", "bottomCalcFormatter", "bottomCalcFormatterParams", "cellClick", "cellDblClick", "cellContext", "cellTap", "cellDblTap", "cellTapHold", "cellMouseEnter", "cellMouseLeave", "cellMouseOver", "cellMouseOut", "cellMouseMove", "cellEditing", "cellEdited", "cellEditCancelled", "headerSort", "headerSortStartingDir", "headerSortTristate", "headerClick", "headerDblClick", "headerContext", "headerTap", "headerDblTap", "headerTapHold", "headerTooltip", "headerVertical", "headerHozAlign", "editableTitle", "titleFormatter", "titleFormatterParams", "headerFilter", "headerFilterPlaceholder", "headerFilterParams", "headerFilterEmptyCheck", "headerFilterFunc", "headerFilterFuncParams", "headerFilterLiveFilter", "print", "headerContextMenu", "headerMenu", "contextMenu", - - // "headerClickMenu", - - "clickMenu", "formatterPrint", "formatterPrintParams", "formatterClipboard", "formatterClipboardParams", "formatterHtmlOutput", "formatterHtmlOutputParams", "titlePrint", "titleClipboard", "titleHtmlOutput", "titleDownload"]; + Column.prototype.defaultOptionList = ["title", "field", "columns", "visible", "align", "hozAlign", "vertAlign", "width", "minWidth", "widthGrow", "widthShrink", "resizable", "frozen", "responsive", "tooltip", "cssClass", "rowHandle", "hideInHtml", "print", "htmlOutput", "sorter", "sorterParams", "formatter", "formatterParams", "variableHeight", "editable", "editor", "editorParams", "validator", "mutator", "mutatorParams", "mutatorData", "mutatorDataParams", "mutatorEdit", "mutatorEditParams", "mutatorClipboard", "mutatorClipboardParams", "accessor", "accessorParams", "accessorData", "accessorDataParams", "accessorDownload", "accessorDownloadParams", "accessorClipboard", "accessorClipboardParams", "accessorPrint", "accessorPrintParams", "accessorHtmlOutput", "accessorHtmlOutputParams", "clipboard", "download", "downloadTitle", "topCalc", "topCalcParams", "topCalcFormatter", "topCalcFormatterParams", "bottomCalc", "bottomCalcParams", "bottomCalcFormatter", "bottomCalcFormatterParams", "cellClick", "cellDblClick", "cellContext", "cellTap", "cellDblTap", "cellTapHold", "cellMouseEnter", "cellMouseLeave", "cellMouseOver", "cellMouseOut", "cellMouseMove", "cellEditing", "cellEdited", "cellEditCancelled", "headerSort", "headerSortStartingDir", "headerSortTristate", "headerClick", "headerDblClick", "headerContext", "headerTap", "headerDblTap", "headerTapHold", "headerTooltip", "headerVertical", "editableTitle", "titleFormatter", "titleFormatterParams", "headerFilter", "headerFilterPlaceholder", "headerFilterParams", "headerFilterEmptyCheck", "headerFilterFunc", "headerFilterFuncParams", "headerFilterLiveFilter", "print", "headerContextMenu", "headerMenu", "contextMenu", "formatterPrint", "formatterPrintParams", "formatterClipboard", "formatterClipboardParams", "formatterHtmlOutput", "formatterHtmlOutputParams", "titlePrint", "titleClipboard", "titleHtmlOutput", "titleDownload"]; //////////////// Event Bindings ///////////////// @@ -3471,7 +3357,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; RowManager.prototype.scrollToRow = function (row, position, ifVisible) { - var _this11 = this; + var _this9 = this; var rowIndex = this.getDisplayRows().indexOf(row), rowEl = row.getElement(), @@ -3484,29 +3370,29 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol if (typeof position === "undefined") { - position = _this11.table.options.scrollToRowPosition; + position = _this9.table.options.scrollToRowPosition; } if (typeof ifVisible === "undefined") { - ifVisible = _this11.table.options.scrollToRowIfVisible; + ifVisible = _this9.table.options.scrollToRowIfVisible; } if (position === "nearest") { - switch (_this11.renderMode) { + switch (_this9.renderMode) { case "classic": rowTop = Tabulator.prototype.helpers.elOffset(rowEl).top; - position = Math.abs(_this11.element.scrollTop - rowTop) > Math.abs(_this11.element.scrollTop + _this11.element.clientHeight - rowTop) ? "bottom" : "top"; + position = Math.abs(_this9.element.scrollTop - rowTop) > Math.abs(_this9.element.scrollTop + _this9.element.clientHeight - rowTop) ? "bottom" : "top"; break; case "virtual": - position = Math.abs(_this11.vDomTop - rowIndex) > Math.abs(_this11.vDomBottom - rowIndex) ? "bottom" : "top"; + position = Math.abs(_this9.vDomTop - rowIndex) > Math.abs(_this9.vDomBottom - rowIndex) ? "bottom" : "top"; break; @@ -3519,9 +3405,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol if (Tabulator.prototype.helpers.elVisible(rowEl)) { - offset = Tabulator.prototype.helpers.elOffset(rowEl).top - Tabulator.prototype.helpers.elOffset(_this11.element).top; + offset = Tabulator.prototype.helpers.elOffset(rowEl).top - Tabulator.prototype.helpers.elOffset(_this9.element).top; - if (offset > 0 && offset < _this11.element.clientHeight - rowEl.offsetHeight) { + if (offset > 0 && offset < _this9.element.clientHeight - rowEl.offsetHeight) { return false; } @@ -3530,17 +3416,17 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //scroll to row - switch (_this11.renderMode) { + switch (_this9.renderMode) { case "classic": - _this11.element.scrollTop = Tabulator.prototype.helpers.elOffset(rowEl).top - Tabulator.prototype.helpers.elOffset(_this11.element).top + _this11.element.scrollTop; + _this9.element.scrollTop = Tabulator.prototype.helpers.elOffset(rowEl).top - Tabulator.prototype.helpers.elOffset(_this9.element).top + _this9.element.scrollTop; break; case "virtual": - _this11._virtualRenderFill(rowIndex, true); + _this9._virtualRenderFill(rowIndex, true); break; @@ -3554,24 +3440,24 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol case "center": - if (_this11.element.scrollHeight - _this11.element.scrollTop == _this11.element.clientHeight) { + if (_this9.element.scrollHeight - _this9.element.scrollTop == _this9.element.clientHeight) { - _this11.element.scrollTop = _this11.element.scrollTop + (rowEl.offsetTop - _this11.element.scrollTop) - (_this11.element.scrollHeight - rowEl.offsetTop) / 2; + _this9.element.scrollTop = _this9.element.scrollTop + (rowEl.offsetTop - _this9.element.scrollTop) - (_this9.element.scrollHeight - rowEl.offsetTop) / 2; } else { - _this11.element.scrollTop = _this11.element.scrollTop - _this11.element.clientHeight / 2; + _this9.element.scrollTop = _this9.element.scrollTop - _this9.element.clientHeight / 2; } break; case "bottom": - if (_this11.element.scrollHeight - _this11.element.scrollTop == _this11.element.clientHeight) { + if (_this9.element.scrollHeight - _this9.element.scrollTop == _this9.element.clientHeight) { - _this11.element.scrollTop = _this11.element.scrollTop - (_this11.element.scrollHeight - rowEl.offsetTop) + rowEl.offsetHeight; + _this9.element.scrollTop = _this9.element.scrollTop - (_this9.element.scrollHeight - rowEl.offsetTop) + rowEl.offsetHeight; } else { - _this11.element.scrollTop = _this11.element.scrollTop - _this11.element.clientHeight + rowEl.offsetHeight; + _this9.element.scrollTop = _this9.element.scrollTop - _this9.element.clientHeight + rowEl.offsetHeight; } break; @@ -3592,34 +3478,34 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol RowManager.prototype.setData = function (data, renderInPosition, columnsChanged) { - var _this12 = this; + var _this10 = this; var self = this; return new Promise(function (resolve, reject) { - if (renderInPosition && _this12.getDisplayRows().length) { + if (renderInPosition && _this10.getDisplayRows().length) { if (self.table.options.pagination) { self._setDataActual(data, true); } else { - _this12.reRenderInPosition(function () { + _this10.reRenderInPosition(function () { self._setDataActual(data); }); } } else { - if (_this12.table.options.autoColumns && columnsChanged) { + if (_this10.table.options.autoColumns && columnsChanged) { - _this12.table.columnManager.generateColumnsFromRowData(data); + _this10.table.columnManager.generateColumnsFromRowData(data); } - _this12.resetScroll(); + _this10.resetScroll(); - _this12._setDataActual(data); + _this10._setDataActual(data); } resolve(); @@ -3664,9 +3550,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol } }); - self.refreshActiveData(false, false, renderInPosition); - self.table.options.dataLoaded.call(this.table, data); + + self.refreshActiveData(false, false, renderInPosition); } else { console.error("Data Loading Error - Unable to process data due to invalid data type \nExpecting: array \nReceived: ", typeof data === 'undefined' ? 'undefined' : _typeof(data), "\nData: ", data); @@ -3686,16 +3572,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol } this.rows = []; - - this.activeRows = []; - - this.activeRowsCount = 0; - - this.displayRows = []; - - this.displayRowsCount = 0; - - this.adjustTableSize(); }; RowManager.prototype.deleteRow = function (row, blockRedraw) { @@ -3734,10 +3610,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol this.table.options.rowDeleted.call(this.table, row.getComponent()); - if (this.table.options.dataChanged) { - - this.table.options.dataChanged.call(this.table, this.getData()); - } + this.table.options.dataEdited.call(this.table, this.getData()); if (this.table.options.groupBy && this.table.modExists("groupRows")) { @@ -3769,7 +3642,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //add multiple rows RowManager.prototype.addRows = function (data, pos, index) { - var _this13 = this; + var _this11 = this; var self = this, length = 0, @@ -3777,7 +3650,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol return new Promise(function (resolve, reject) { - pos = _this13.findAddRowPos(pos); + pos = _this11.findAddRowPos(pos); if (!Array.isArray(data)) { @@ -3798,25 +3671,25 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol rows.push(row); }); - if (_this13.table.options.groupBy && _this13.table.modExists("groupRows")) { + if (_this11.table.options.groupBy && _this11.table.modExists("groupRows")) { - _this13.table.modules.groupRows.updateGroupRows(true); - } else if (_this13.table.options.pagination && _this13.table.modExists("page")) { + _this11.table.modules.groupRows.updateGroupRows(true); + } else if (_this11.table.options.pagination && _this11.table.modExists("page")) { - _this13.refreshActiveData(false, false, true); + _this11.refreshActiveData(false, false, true); } else { - _this13.reRenderInPosition(); + _this11.reRenderInPosition(); } //recalc column calculations if present - if (_this13.table.modExists("columnCalcs")) { + if (_this11.table.modExists("columnCalcs")) { - _this13.table.modules.columnCalcs.recalc(_this13.table.rowManager.activeRows); + _this11.table.modules.columnCalcs.recalc(_this11.table.rowManager.activeRows); } - _this13.regenerateRowNumbers(); + _this11.regenerateRowNumbers(); resolve(rows); }); @@ -3972,10 +3845,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol this.table.options.rowAdded.call(this.table, row.getComponent()); - if (this.table.options.dataChanged) { - - this.table.options.dataChanged.call(this.table, this.getData()); - } + this.table.options.dataEdited.call(this.table, this.getData()); if (!blockRedraw) { @@ -4000,7 +3870,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; RowManager.prototype.moveRowActual = function (from, to, after) { - var _this14 = this; + var _this12 = this; this._moveRowInArray(this.rows, from, to, after); @@ -4008,7 +3878,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol this.displayRowIterator(function (rows) { - _this14._moveRowInArray(rows, from, to, after); + _this12._moveRowInArray(rows, from, to, after); }); if (this.table.options.groupBy && this.table.modExists("groupRows")) { @@ -4194,7 +4064,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; RowManager.prototype._genRemoteRequest = function () { - var _this15 = this; + var _this13 = this; var table = this.table, options = table.options, @@ -4230,7 +4100,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol table.modules.ajax.sendRequest().then(function (data) { - _this15._setDataActual(data, true); + _this13._setDataActual(data, true); }).catch(function (e) {}); }; @@ -4527,11 +4397,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol self.reRenderInPosition(); } else { - if (stage === "all" && this.table.options.virtualDomHoz) { - - this.table.vdomHoz.dataChange(); - } - self.renderTable(); if (table.options.layoutColumnsOnNewData) { @@ -4551,13 +4416,13 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //regenerate row numbers for row number formatter if in use RowManager.prototype.regenerateRowNumbers = function () { - var _this16 = this; + var _this14 = this; if (this.rowNumColumn) { this.activeRows.forEach(function (row) { - var cell = row.getCell(_this16.rowNumColumn); + var cell = row.getCell(_this14.rowNumColumn); if (cell) { @@ -4733,12 +4598,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol break; - case "selected": - - rows = this.table.modules.selectRow.selectedRows; - - break; - default: rows = this.rows; @@ -4950,9 +4809,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol this.tableElement.style.minWidth = this.table.columnManager.getWidth() + "px"; - // this.tableElement.style.minHeight = "1px"; + this.tableElement.style.minHeight = "1px"; - // this.tableElement.style.visibility = "hidden"; + this.tableElement.style.visibility = "hidden"; } }; @@ -5073,27 +4932,16 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol element.appendChild(row.getElement()); - row.initialize(); - - if (!row.heightInitialized) { - - row.normalizeHeight(true); - } - - // if(!row.initialized){ - - // row.initialize(true); - - // }else{ + if (!row.initialized) { - // if(!row.heightInitialized){ - - // row.normalizeHeight(true); - - // } + row.initialize(true); + } else { - // } + if (!row.heightInitialized) { + row.normalizeHeight(true); + } + } rowHeight = row.getHeight(); @@ -5476,7 +5324,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol if (this.renderMode === "virtual") { - var otherHeight = Math.floor(this.columnManager.getElement().offsetHeight + (this.table.footerManager && !this.table.footerManager.external ? this.table.footerManager.getElement().offsetHeight : 0)); + var otherHeight = this.columnManager.getElement().offsetHeight + (this.table.footerManager && !this.table.footerManager.external ? this.table.footerManager.getElement().offsetHeight : 0); if (this.fixedHeight) { @@ -5489,7 +5337,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol this.element.style.height = ""; - this.element.style.height = Math.floor(this.table.element.clientHeight) - otherHeight + "px"; + this.element.style.height = this.table.element.clientHeight - otherHeight + "px"; this.element.scrollTop = this.scrollTop; } @@ -5500,7 +5348,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //check if the table has changed size when dealing with variable height tables - if (!this.fixedHeight && Math.floor(initialHeight) != Math.floor(this.element.clientHeight)) { + if (!this.fixedHeight && initialHeight != this.element.clientHeight) { modExists = this.table.modExists("resizeTable"); @@ -5518,7 +5366,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol this.rows.forEach(function (row) { - row.reinitialize(true); + row.reinitialize(); }); }; @@ -5614,747 +5462,162 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol } }; - var VDomHoz = function VDomHoz(table) { - - this.table = table; - - this.element = this.table.rowManager.tableElement; - - this.holderEl = this.table.rowManager.element; + //public row object - this.leftCol = 0; + var RowComponent = function RowComponent(row) { - this.rightCol = 0; + this._row = row; + }; - this.scrollLeft = 0; + RowComponent.prototype.getData = function (transform) { - this.vDomScrollPosLeft = 0; + return this._row.getData(transform); + }; - this.vDomScrollPosRight = 0; + RowComponent.prototype.getElement = function () { - this.vDomPadLeft = 0; + return this._row.getElement(); + }; - this.vDomPadRight = 0; + RowComponent.prototype.getCells = function () { - this.fitDataColAvg = 0; + var cells = []; - this.window = 200; //pixel margin to make column visible before it is shown on screen + this._row.getCells().forEach(function (cell) { + cells.push(cell.getComponent()); + }); - this.initialized = false; + return cells; + }; - this.columns = []; + RowComponent.prototype.getCell = function (column) { - if (this.compatabilityCheck()) { + var cell = this._row.getCell(column); - this.initialize(); - } + return cell ? cell.getComponent() : false; }; - VDomHoz.prototype.compatabilityCheck = function () { + RowComponent.prototype.getIndex = function () { - var options = this.table.options, - frozen = false, - ok = true; + return this._row.getData("data")[this._row.table.options.index]; + }; - if (options.layout == "fitDataTable") { + RowComponent.prototype.getPosition = function (active) { - console.warn("Horizontal Vitrual DOM is not compatible with fitDataTable layout mode"); + return this._row.table.rowManager.getRowPosition(this._row, active); + }; - ok = false; - } + RowComponent.prototype.delete = function () { - if (options.responsiveLayout) { + return this._row.delete(); + }; - console.warn("Horizontal Vitrual DOM is not compatible with responsive columns"); + RowComponent.prototype.scrollTo = function () { - ok = false; - } + return this._row.table.rowManager.scrollToRow(this._row); + }; - if (this.table.rtl) { + RowComponent.prototype.pageTo = function () { - console.warn("Horizontal Vitrual DOM is not currently compatible with RTL text direction"); + if (this._row.table.modExists("page", true)) { - ok = false; + return this._row.table.modules.page.setPageToRow(this._row); } + }; - // if(options.rowFormatter){ + RowComponent.prototype.move = function (to, after) { - // console.warn("Horizontal Vitrual DOM is not compatible with row formatters"); + this._row.moveToRow(to, after); + }; - // ok = false; + RowComponent.prototype.update = function (data) { - // } + return this._row.updateData(data); + }; + RowComponent.prototype.normalizeHeight = function () { - if (options.columns) { + this._row.normalizeHeight(true); + }; - frozen = options.columns.find(function (col) { + RowComponent.prototype.select = function () { - return col.frozen; - }); + this._row.table.modules.selectRow.selectRows(this._row); + }; - if (frozen) { + RowComponent.prototype.deselect = function () { - console.warn("Horizontal Vitrual DOM is not compatible with frozen columns"); + this._row.table.modules.selectRow.deselectRows(this._row); + }; - ok = false; - } - } + RowComponent.prototype.toggleSelect = function () { - if (!ok) { + this._row.table.modules.selectRow.toggleRow(this._row); + }; - options.virtualDomHoz = false; - } + RowComponent.prototype.isSelected = function () { - return ok; + return this._row.table.modules.selectRow.isRowSelected(this._row); }; - VDomHoz.prototype.initialize = function () { - var _this17 = this; + RowComponent.prototype._getSelf = function () { - this.holderEl.addEventListener("scroll", function () { + return this._row; + }; - var left = _this17.holderEl.scrollLeft; + RowComponent.prototype.validate = function () { - if (_this17.scrollLeft != left) { + return this._row.validate(); + }; - _this17.scrollLeft = left; + RowComponent.prototype.freeze = function () { - _this17.scroll(left - (_this17.vDomScrollPosLeft + _this17.window)); - } - }); + if (this._row.table.modExists("frozenRows", true)) { + + this._row.table.modules.frozenRows.freezeRow(this._row); + } }; - VDomHoz.prototype.deinitialize = function () { + RowComponent.prototype.unfreeze = function () { - this.initialized = false; + if (this._row.table.modExists("frozenRows", true)) { + + this._row.table.modules.frozenRows.unfreezeRow(this._row); + } }; - VDomHoz.prototype.clear = function () { + RowComponent.prototype.isFrozen = function () { - this.columns = []; + if (this._row.table.modExists("frozenRows", true)) { - this.leftCol = -1; + var index = this._row.table.modules.frozenRows.rows.indexOf(this._row); - this.rightCol = 0; + return index > -1; + } - this.vDomScrollPosLeft = 0; + return false; + }; - this.vDomScrollPosRight = 0; + RowComponent.prototype.treeCollapse = function () { - this.vDomPadLeft = 0; + if (this._row.table.modExists("dataTree", true)) { - this.vDomPadRight = 0; + this._row.table.modules.dataTree.collapseRow(this._row); + } }; - VDomHoz.prototype.dataChange = function () { + RowComponent.prototype.treeExpand = function () { - var change = false, - collsWidth = 0, - colEnd = 0, - group, - row, - rowEl; + if (this._row.table.modExists("dataTree", true)) { - if (this.table.options.layout === "fitData") { + this._row.table.modules.dataTree.expandRow(this._row); + } + }; - this.table.columnManager.columnsByIndex.forEach(function (column) { + RowComponent.prototype.treeToggle = function () { - if (!column.definition.width && column.visible) { - - change = true; - } - }); - - if (change) { - - if (change && this.table.rowManager.getDisplayRows().length) { - - // this.table.vdomHoz.deinitialize(); - - - this.vDomScrollPosRight = this.scrollLeft + this.holderEl.clientWidth + this.window; - - if (this.table.options.groupBy) { - - group = this.table.modules.groupRows.getGroups(false)[0]; - - row = group.getRows(false)[0]; - } else { - - row = this.table.rowManager.getDisplayRows()[0]; - } - - if (row) { - - rowEl = row.getElement(); - - row.generateCells(); - - this.element.appendChild(rowEl); - - for (var colEnd = 0; colEnd < row.cells.length; colEnd++) { - - var cell = row.cells[colEnd]; - - rowEl.appendChild(cell.getElement()); - - cell.column.reinitializeWidth(); - - collsWidth += cell.column.getWidth(); - - if (collsWidth > this.vDomScrollPosRight) { - - break; - } - } - - rowEl.parentNode.removeChild(rowEl); - - this.fitDataColAvg = Math.floor(collsWidth / (colEnd + 1)); - - for (colEnd; colEnd < this.table.columnManager.columnsByIndex.length; colEnd++) { - - this.table.columnManager.columnsByIndex[colEnd].setWidth(this.fitDataColAvg); - } - - this.reinitialize(false, true); - } - } - } - } else { - - if (this.table.options.layout === "fitColumns") { - - this.table.modules.layout.layout(); - - this.table.vdomHoz.reinitialize(false, true); - } - } - }; - - VDomHoz.prototype.fitDataLayoutOverride = function () { - - for (var _i5 = this.leftCol; _i5 <= this.rightCol; _i5++) { - - this.columns[_i5].reinitializeWidth(); - } - }; - - VDomHoz.prototype.reinitialize = function (update, blockRedraw) { - var _this18 = this; - - var old = { - - cols: this.columns, - - leftCol: this.leftCol, - - rightCol: this.rightCol - - }; - - if (update && !this.initialized) { - - return; - } - - this.clear(); - - this.scrollLeft = this.holderEl.scrollLeft; - - this.vDomScrollPosLeft = this.scrollLeft - this.window; - - this.vDomScrollPosRight = this.scrollLeft + this.holderEl.clientWidth + this.window; - - var colPos = 0; - - this.table.columnManager.columnsByIndex.forEach(function (column) { - - var config = {}; - - if (column.visible) { - - var width = column.getWidth(); - - config.leftPos = colPos; - - config.rightPos = colPos + width; - - if (colPos + width > _this18.vDomScrollPosLeft && colPos < _this18.vDomScrollPosRight) { - - //column is visible - - - if (_this18.leftCol == -1) { - - _this18.leftCol = _this18.columns.length; - - _this18.vDomPadLeft = colPos; - } - - _this18.rightCol = _this18.columns.length; - } else { - - // column is hidden - - if (_this18.leftCol !== -1) { - - _this18.vDomPadRight += width; - } - } - - _this18.columns.push(column); - - column.modules.vdomHoz = config; - - colPos += width; - } - }); - - this.element.style.paddingLeft = this.vDomPadLeft + "px"; - - this.element.style.paddingRight = this.vDomPadRight + "px"; - - this.initialized = true; - - if (!blockRedraw) { - - if (!update || this.reinitChanged(old)) { - - this.renitializeRows(); - } - } - - this.holderEl.scrollLeft = this.scrollLeft; - }; - - VDomHoz.prototype.reinitChanged = function (old) { - var _this19 = this; - - var match = true; - - if (old.cols.length !== this.columns.length || old.leftCol !== this.leftCol || old.rightCol !== this.rightCol) { - - return true; - } - - old.cols.forEach(function (col, i) { - - if (col !== _this19.columns[i]) { - - match = false; - } - }); - - return !match; - }; - - VDomHoz.prototype.renitializeRows = function () { - var _this20 = this; - - var rows = this.table.rowManager.getVisibleRows(); - - rows.forEach(function (row) { - - _this20.reinitializeRow(row, true); - }); - }; - - VDomHoz.prototype.scroll = function (diff) { - - this.vDomScrollPosLeft += diff; - - this.vDomScrollPosRight += diff; - - if (diff > this.holderEl.clientWidth * .8) { - - this.reinitialize(); - } else { - - if (diff > 0) { - - //scroll right - - this.addColRight(); - - this.removeColLeft(); - } else { - - //scroll left - - this.addColLeft(); - - this.removeColRight(); - } - } - }; - - VDomHoz.prototype.colPositionAdjust = function (start, end, diff) { - - for (var _i6 = start; _i6 < end; _i6++) { - - var column = this.columns[_i6]; - - column.modules.vdomHoz.leftPos -= diff; - - column.modules.vdomHoz.rightPos -= diff; - } - }; - - VDomHoz.prototype.addColRight = function () { - - var column = this.columns[this.rightCol + 1], - rows, - oldWidth, - widthDiff; - - if (column && column.modules.vdomHoz.leftPos <= this.vDomScrollPosRight) { - - rows = this.table.rowManager.getVisibleRows(); - - rows.forEach(function (row) { - - if (row.type !== "group") { - - var cell = row.getCell(column); - - row.getElement().appendChild(cell.getElement()); - - cell.cellRendered(); - } - }); - - if (this.fitDataColAvg) { - - oldWidth = column.getWidth(); - - if (oldWidth === this.fitDataColAvg) { - - column.reinitializeWidth(); - - widthDiff = oldWidth - column.getWidth(); - - if (widthDiff) { - - column.modules.vdomHoz.rightPos -= widthDiff; - - this.colPositionAdjust(this.rightCol + 1, this.columns.length, widthDiff); - } - } - } - - this.rightCol++; - - if (this.rightCol >= this.columns.length - 1) { - - this.vDomPadRight = 0; - } else { - - this.vDomPadRight -= column.getWidth(); - } - - this.element.style.paddingRight = this.vDomPadRight + "px"; - - this.addColRight(); - } - }; - - VDomHoz.prototype.addColLeft = function () { - - var column = this.columns[this.leftCol - 1], - rows; - - if (column && column.modules.vdomHoz.rightPos >= this.vDomScrollPosLeft) { - - var rows = this.table.rowManager.getVisibleRows(); - - rows.forEach(function (row) { - - if (row.type !== "group") { - - var cell = row.getCell(column); - - row.getElement().prepend(cell.getElement()); - - cell.cellRendered(); - } - }); - - if (!this.leftCol) { - - this.vDomPadLeft = 0; - } else { - - this.vDomPadLeft -= column.getWidth(); - } - - this.element.style.paddingLeft = this.vDomPadLeft + "px"; - - this.leftCol--; - - this.addColLeft(); - } - }; - - VDomHoz.prototype.removeColRight = function (column) { - - var column = this.columns[this.rightCol], - rows; - - if (column && column.modules.vdomHoz.leftPos > this.vDomScrollPosRight) { - - rows = this.table.rowManager.getVisibleRows(); - - column.modules.vdomHoz.visible = false; - - rows.forEach(function (row) { - - if (row.type !== "group") { - - var cell = row.getCell(column); - - row.getElement().removeChild(cell.getElement()); - } - }); - - this.vDomPadRight += column.getWidth(); - - this.element.style.paddingRight = this.vDomPadRight + "px"; - - this.rightCol--; - - this.removeColRight(); - } - }; - - VDomHoz.prototype.removeColLeft = function () { - - var column = this.columns[this.leftCol], - rows; - - if (column && column.modules.vdomHoz.rightPos < this.vDomScrollPosLeft) { - - rows = this.table.rowManager.getVisibleRows(); - - rows.forEach(function (row) { - - if (row.type !== "group") { - - var cell = row.getCell(column); - - row.getElement().removeChild(cell.getElement()); - } - }); - - this.vDomPadLeft += column.getWidth(); - - this.element.style.paddingLeft = this.vDomPadLeft + "px"; - - this.leftCol++; - - this.removeColLeft(); - } - }; - - VDomHoz.prototype.initializeRow = function (row) { - - if (row.type !== "group") { - - row.modules.vdomHoz = { - - leftCol: this.leftCol, - - rightCol: this.rightCol - - }; - - for (var _i7 = this.leftCol; _i7 <= this.rightCol; _i7++) { - - var column = this.columns[_i7]; - - if (column.visible) { - - var cell = row.getCell(column); - - row.element.appendChild(cell.getElement()); - - cell.cellRendered(); - } - } - } - }; - - VDomHoz.prototype.reinitializeRow = function (row, force) { - - if (row.type !== "group") { - - if (force || !row.modules.vdomHoz || row.modules.vdomHoz.leftCol !== this.leftCol || row.modules.vdomHoz.rightCol !== this.rightCol) { - - while (row.element.firstChild) { - row.element.removeChild(row.element.firstChild); - }this.initializeRow(row); - } - } - }; - - //public row object - - var RowComponent = function RowComponent(row) { - - this._row = row; - }; - - RowComponent.prototype.getData = function (transform) { - - return this._row.getData(transform); - }; - - RowComponent.prototype.getElement = function () { - - return this._row.getElement(); - }; - - RowComponent.prototype.getCells = function () { - - var cells = []; - - this._row.getCells().forEach(function (cell) { - - cells.push(cell.getComponent()); - }); - - return cells; - }; - - RowComponent.prototype.getCell = function (column) { - - var cell = this._row.getCell(column); - - return cell ? cell.getComponent() : false; - }; - - RowComponent.prototype.getIndex = function () { - - return this._row.getData("data")[this._row.table.options.index]; - }; - - RowComponent.prototype.getPosition = function (active) { - - return this._row.table.rowManager.getRowPosition(this._row, active); - }; - - RowComponent.prototype.delete = function () { - - return this._row.delete(); - }; - - RowComponent.prototype.scrollTo = function () { - - return this._row.table.rowManager.scrollToRow(this._row); - }; - - RowComponent.prototype.pageTo = function () { - - if (this._row.table.modExists("page", true)) { - - return this._row.table.modules.page.setPageToRow(this._row); - } - }; - - RowComponent.prototype.move = function (to, after) { - - this._row.moveToRow(to, after); - }; - - RowComponent.prototype.update = function (data) { - - return this._row.updateData(data); - }; - - RowComponent.prototype.normalizeHeight = function () { - - this._row.normalizeHeight(true); - }; - - RowComponent.prototype.select = function () { - - this._row.table.modules.selectRow.selectRows(this._row); - }; - - RowComponent.prototype.deselect = function () { - - this._row.table.modules.selectRow.deselectRows(this._row); - }; - - RowComponent.prototype.toggleSelect = function () { - - this._row.table.modules.selectRow.toggleRow(this._row); - }; - - RowComponent.prototype.isSelected = function () { - - return this._row.table.modules.selectRow.isRowSelected(this._row); - }; - - RowComponent.prototype._getSelf = function () { - - return this._row; - }; - - RowComponent.prototype.validate = function () { - - return this._row.validate(); - }; - - RowComponent.prototype.freeze = function () { - - if (this._row.table.modExists("frozenRows", true)) { - - this._row.table.modules.frozenRows.freezeRow(this._row); - } - }; - - RowComponent.prototype.unfreeze = function () { - - if (this._row.table.modExists("frozenRows", true)) { - - this._row.table.modules.frozenRows.unfreezeRow(this._row); - } - }; - - RowComponent.prototype.isFrozen = function () { - - if (this._row.table.modExists("frozenRows", true)) { - - var index = this._row.table.modules.frozenRows.rows.indexOf(this._row); - - return index > -1; - } - - return false; - }; - - RowComponent.prototype.treeCollapse = function () { - - if (this._row.table.modExists("dataTree", true)) { - - this._row.table.modules.dataTree.collapseRow(this._row); - } - }; - - RowComponent.prototype.treeExpand = function () { - - if (this._row.table.modExists("dataTree", true)) { - - this._row.table.modules.dataTree.expandRow(this._row); - } - }; - - RowComponent.prototype.treeToggle = function () { - - if (this._row.table.modExists("dataTree", true)) { + if (this._row.table.modExists("dataTree", true)) { this._row.table.modules.dataTree.toggleRow(this._row); } @@ -6374,7 +5637,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol if (this._row.table.modExists("dataTree", true)) { - return this._row.table.modules.dataTree.getTreeChildren(this._row, true); + return this._row.table.modules.dataTree.getTreeChildren(this._row); } return false; @@ -6518,7 +5781,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //set column menu - if ((self.table.options.rowContextMenu || self.table.options.rowClickMenu) && this.table.modExists("menu")) { + if (self.table.options.rowContextMenu && this.table.modExists("menu")) { self.table.modules.menu.initializeRow(this); } @@ -6673,14 +5936,15 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //functions to setup on first render Row.prototype.initialize = function (force) { - var _this21 = this; - if (!this.initialized || force) { + var self = this; - this.deleteCells(); + if (!self.initialized || force) { - while (this.element.firstChild) { - this.element.removeChild(this.element.firstChild); + self.deleteCells(); + + while (self.element.firstChild) { + self.element.removeChild(self.element.firstChild); } //handle frozen cells if (this.table.modExists("frozenColumns")) { @@ -6690,57 +5954,45 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol this.generateCells(); - if (this.table.options.virtualDomHoz && this.table.vdomHoz.initialized) { - - this.table.vdomHoz.initializeRow(this); - } else { - - this.cells.forEach(function (cell) { + self.cells.forEach(function (cell) { - _this21.element.appendChild(cell.getElement()); + self.element.appendChild(cell.getElement()); - cell.cellRendered(); - }); - } + cell.cellRendered(); + }); if (force) { - this.normalizeHeight(); + self.normalizeHeight(); } //setup movable rows - if (this.table.options.dataTree && this.table.modExists("dataTree")) { + if (self.table.options.dataTree && self.table.modExists("dataTree")) { - this.table.modules.dataTree.layoutRow(this); + self.table.modules.dataTree.layoutRow(this); } //setup column colapse container - if (this.table.options.responsiveLayout === "collapse" && this.table.modExists("responsiveLayout")) { + if (self.table.options.responsiveLayout === "collapse" && self.table.modExists("responsiveLayout")) { - this.table.modules.responsiveLayout.layoutRow(this); + self.table.modules.responsiveLayout.layoutRow(this); } - if (this.table.options.rowFormatter) { + if (self.table.options.rowFormatter) { - this.table.options.rowFormatter(this.getComponent()); + self.table.options.rowFormatter(self.getComponent()); } //set resizable handles - if (this.table.options.resizableRows && this.table.modExists("resizeRows")) { + if (self.table.options.resizableRows && self.table.modExists("resizeRows")) { - this.table.modules.resizeRows.initializeRow(this); + self.table.modules.resizeRows.initializeRow(self); } - this.initialized = true; - } else { - - if (this.table.options.virtualDomHoz) { - - this.table.vdomHoz.reinitializeRow(this); - } + self.initialized = true; } }; @@ -6754,7 +6006,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol } }; - Row.prototype.reinitialize = function (children) { + Row.prototype.reinitialize = function () { this.initialized = false; @@ -6771,14 +6023,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol this.initialize(true); } - - if (this.table.options.dataTree && this.table.modExists("dataTree", true)) { - - this.table.modules.dataTree.getTreeChildren(this, false, true).forEach(function (child) { - - child.reinitialize(true); - }); - } }; //get heights when doing bulk row style calcs in virtual DOM @@ -6923,7 +6167,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //update the rows data Row.prototype.updateData = function (updatedData) { - var _this22 = this; + var _this15 = this; var visible = Tabulator.prototype.helpers.elVisible(this.element), tempData = {}, @@ -6936,20 +6180,20 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol updatedData = JSON.parse(updatedData); } - if (_this22.table.options.reactiveData && _this22.table.modExists("reactiveData", true)) { + if (_this15.table.options.reactiveData && _this15.table.modExists("reactiveData", true)) { - _this22.table.modules.reactiveData.block(); + _this15.table.modules.reactiveData.block(); } //mutate incomming data if needed - if (_this22.table.modExists("mutator")) { + if (_this15.table.modExists("mutator")) { - tempData = Object.assign(tempData, _this22.data); + tempData = Object.assign(tempData, _this15.data); tempData = Object.assign(tempData, updatedData); - newRowData = _this22.table.modules.mutator.transformRow(tempData, "data", updatedData); + newRowData = _this15.table.modules.mutator.transformRow(tempData, "data", updatedData); } else { newRowData = updatedData; @@ -6959,23 +6203,23 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol for (var attrname in newRowData) { - _this22.data[attrname] = newRowData[attrname]; + _this15.data[attrname] = newRowData[attrname]; } - if (_this22.table.options.reactiveData && _this22.table.modExists("reactiveData", true)) { + if (_this15.table.options.reactiveData && _this15.table.modExists("reactiveData", true)) { - _this22.table.modules.reactiveData.unblock(); + _this15.table.modules.reactiveData.unblock(); } //update affected cells only for (var attrname in updatedData) { - var columns = _this22.table.columnManager.getColumnsByFieldRoot(attrname); + var columns = _this15.table.columnManager.getColumnsByFieldRoot(attrname); columns.forEach(function (column) { - var cell = _this22.getCell(column.getField()); + var cell = _this15.getCell(column.getField()); if (cell) { @@ -6994,51 +6238,38 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }); } - if (_this22.table.options.groupUpdateOnCellEdit && _this22.table.options.groupBy && _this22.table.modExists("groupRows")) { - - _this22.table.modules.groupRows.reassignRowToGroup(_this22.row); - } - //Partial reinitialization if visible if (visible) { - _this22.normalizeHeight(true); + _this15.normalizeHeight(true); - if (_this22.table.options.rowFormatter) { + if (_this15.table.options.rowFormatter) { - _this22.table.options.rowFormatter(_this22.getComponent()); + _this15.table.options.rowFormatter(_this15.getComponent()); } } else { - _this22.initialized = false; + _this15.initialized = false; - _this22.height = 0; + _this15.height = 0; - _this22.heightStyled = ""; + _this15.heightStyled = ""; } - if (_this22.table.options.dataTree !== false && _this22.table.modExists("dataTree") && _this22.table.modules.dataTree.redrawNeeded(updatedData)) { + if (_this15.table.options.dataTree !== false && _this15.table.modExists("dataTree") && _this15.table.modules.dataTree.redrawNeeded(updatedData)) { - _this22.table.modules.dataTree.initializeRow(_this22); + _this15.table.modules.dataTree.initializeRow(_this15); - if (visible) { + _this15.table.modules.dataTree.layoutRow(_this15); - _this22.table.modules.dataTree.layoutRow(_this22); - - _this22.table.rowManager.refreshActiveData("tree", false, true); - } + _this15.table.rowManager.refreshActiveData("tree", false, true); } //this.reinitialize(); - _this22.table.options.rowUpdated.call(_this22.table, _this22.getComponent()); - - if (_this22.table.options.dataChanged) { - - _this22.table.options.dataChanged.call(_this22.table, _this22.table.rowManager.getData()); - } + _this15.table.options.rowUpdated.call(_this15.table, _this15.getComponent()); resolve(); }); @@ -7046,15 +6277,18 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol Row.prototype.getData = function (transform) { + var self = this; + if (transform) { - if (this.table.modExists("accessor")) { + if (self.table.modExists("accessor")) { - return this.table.modules.accessor.transformRow(this, transform); + return self.table.modules.accessor.transformRow(self.data, transform); } - } + } else { - return this.data; + return this.data; + } }; Row.prototype.getCell = function (column) { @@ -7195,19 +6429,19 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol Row.prototype.delete = function () { - var _this23 = this; + var _this16 = this; return new Promise(function (resolve, reject) { var index, rows; - if (_this23.table.options.history && _this23.table.modExists("history")) { + if (_this16.table.options.history && _this16.table.modExists("history")) { - if (_this23.table.options.groupBy && _this23.table.modExists("groupRows")) { + if (_this16.table.options.groupBy && _this16.table.modExists("groupRows")) { - rows = _this23.getGroup().rows; + rows = _this16.getGroup().rows; - index = rows.indexOf(_this23); + index = rows.indexOf(_this16); if (index) { @@ -7215,18 +6449,18 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol } } else { - index = _this23.table.rowManager.getRowIndex(_this23); + index = _this16.table.rowManager.getRowIndex(_this16); if (index) { - index = _this23.table.rowManager.rows[index - 1]; + index = _this16.table.rowManager.rows[index - 1]; } } - _this23.table.modules.history.action("rowDelete", _this23, { data: _this23.getData(), pos: !index, index: index }); + _this16.table.modules.history.action("rowDelete", _this16, { data: _this16.getData(), pos: !index, index: index }); } - _this23.deleteActual(); + _this16.deleteActual(); resolve(); }); @@ -7236,7 +6470,22 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol var index = this.table.rowManager.getRowIndex(this); - this.detatchModules(); + //deselect row if it is selected + + if (this.table.modExists("selectRow")) { + + this.table.modules.selectRow._deselectRow(this, true); + } + + //cancel edit if row is currently being edited + + if (this.table.modExists("edit")) { + + if (this.table.modules.edit.currentCell.row === this) { + + this.table.modules.edit.cancelEdit(); + } + } // if(this.table.options.dataTree && this.table.modExists("dataTree")){ @@ -7266,8 +6515,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol this.heightInitialized = false; - this.element = false; - if (this.table.options.dataTree && this.table.modExists("dataTree", true)) { this.table.modules.dataTree.rowDelete(this); @@ -7280,35 +6527,10 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol if (this.table.options.groupBy && this.table.modExists("groupRows")) { this.table.modules.columnCalcs.recalcRowGroup(this); - } else { - - this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); - } - } - }; - - Row.prototype.detatchModules = function () { - - //deselect row if it is selected - - if (this.table.modExists("selectRow")) { - - this.table.modules.selectRow._deselectRow(this, true); - } - - //cancel edit if row is currently being edited - - if (this.table.modExists("edit")) { - - if (this.table.modules.edit.currentCell.row === this) { - - this.table.modules.edit.cancelEdit(); - } - } - - if (this.table.modExists("frozenRows")) { + } else { - this.table.modules.frozenRows.detachRow(this); + this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); + } } }; @@ -7316,7 +6538,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol var cellCount = this.cells.length; - for (var _i8 = 0; _i8 < cellCount; _i8++) { + for (var _i5 = 0; _i5 < cellCount; _i5++) { this.cells[0].delete(); } @@ -7324,8 +6546,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol Row.prototype.wipe = function () { - this.detatchModules(); - this.deleteCells(); while (this.element.firstChild) { @@ -7374,11 +6594,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol return this._cell.getOldValue(); }; - CellComponent.prototype.getInitialValue = function () { - - return this._cell.initialValue; - }; - CellComponent.prototype.getElement = function () { return this._cell.getElement(); @@ -7419,11 +6634,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol this._cell.setValueActual(this._cell.getOldValue()); }; - CellComponent.prototype.restoreInitialValue = function () { - - this._cell.setValueActual(this._cell.initialValue); - }; - CellComponent.prototype.edit = function (force) { return this._cell.edit(force); @@ -7459,7 +6669,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol CellComponent.prototype.clearValidation = function () { - if (this._cell.table.modExists("validate", true)) { + if (self.table.modExists("validate", true)) { this._cell.table.modules.validate.clearValidation(this._cell); } @@ -7497,8 +6707,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol this.value = null; - this.initialValue; - this.oldValue = null; this.modules = {}; @@ -7511,9 +6719,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol this.component = null; - this.loaded = false; //track if the cell has been added to the DOM yet - - this.build(); }; @@ -7531,8 +6736,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol this._configureCell(); this.setValueActual(this.column.getFieldValue(this.row.data)); - - this.initialValue = this.value; }; Cell.prototype.generateElement = function () { @@ -8041,13 +7244,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol Cell.prototype.getElement = function () { - if (!this.loaded) { - - this.loaded = true; - - this.layoutElement(); - } - return this.element; }; @@ -8083,19 +7279,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol this.column.cellEvents.cellEdited.call(this.table, component); } - if (this.table.options.groupUpdateOnCellEdit && this.table.options.groupBy && this.table.modExists("groupRows")) { - - this.table.modules.groupRows.reassignRowToGroup(this.row); - } - this.cellRendered(); this.table.options.cellEdited.call(this.table, component); - if (this.table.options.dataChanged) { - - this.table.options.dataChanged.call(this.table, this.table.rowManager.getData()); - } + this.table.options.dataEdited.call(this.table, this.table.rowManager.getData()); } }; @@ -8161,26 +7349,20 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol this.table.modules.reactiveData.unblock(); } - if (this.loaded) { - - this.layoutElement(); - } - }; - - Cell.prototype.layoutElement = function () { - this._generateContents(); this._generateTooltip(); //set resizable handles - if (this.table.options.resizableColumns && this.table.modExists("resizeColumns") && this.row.type === "row") { + if (this.table.options.resizableColumns && this.table.modExists("resizeColumns")) { this.table.modules.resizeColumns.initializeColumn("cell", this.column, this.element); } - if ((this.column.definition.contextMenu || this.column.definition.clickMenu) && this.table.modExists("menu")) { + //set column menu + + if (this.column.definition.contextMenu && this.table.modExists("menu")) { this.table.modules.menu.initializeCell(this); } @@ -8247,7 +7429,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol Cell.prototype.show = function () { - this.element.style.display = this.column.vertAlign ? "inline-flex" : ""; + this.element.style.display = ""; }; Cell.prototype.hide = function () { @@ -8294,7 +7476,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol Cell.prototype.delete = function () { - if (!this.table.rowManager.redrawBlock && this.element.parentNode) { + if (!this.table.rowManager.redrawBlock) { this.element.parentNode.removeChild(this.element); } @@ -8309,11 +7491,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol this.table.modules.edit.clearEdited(this); } - if (this.table.options.history) { - - this.table.modules.history.clearComponentHistory(this); - } - this.element = false; this.column.deleteCell(this); @@ -8597,27 +7774,21 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol this.footerManager = null; //holder Footer Manager - this.vdomHoz = null; //holder horizontal virtual dom - - this.browser = ""; //hold current browser type this.browserSlow = false; //handle reduced functionality for slower browsers this.browserMobile = false; //check if running on moble, prevent resize cancelling edit on keyboard appearence - this.rtl = false; //check if the table is in RTL mode - this.modules = {}; //hold all modules bound to this table - if (this.initializeElement(element)) { + this.initializeElement(element); - this.initializeOptions(options || {}); + this.initializeOptions(options || {}); - this._create(); - } + this._create(); Tabulator.prototype.comms.register(this); //register table for inderdevice communication }; @@ -8657,9 +7828,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol cellHozAlign: "", //horizontal align columns - cellVertAlign: "", //vertical align columns - - headerHozAlign: "", //horizontal header alignment + cellVertAlign: "", //certical align columns data: [], //default starting data @@ -8667,7 +7836,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol autoColumns: false, //build columns from data row structure - autoColumnsDefinitions: false, reactiveData: false, //enable data reactivity @@ -8699,8 +7867,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol headerSortTristate: false, //set default tristate header sorting - headerSortElement: "
", //header sort element - footerElement: false, //hold footer element @@ -8708,8 +7874,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol index: "id", //filed for row index - textDirection: "auto", - keybindings: [], //array for keybindings @@ -8756,10 +7920,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol dataTree: false, //enable data tree - dataTreeFilter: true, //filter child rows - - dataTreeSort: true, //sort child rows - dataTreeElementColumn: false, dataTreeBranchElement: true, //show data tree branch element @@ -8837,8 +7997,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol virtualDomBuffer: 0, // set virtual DOM buffer size - virtualDomHoz: false, //enable horizontal DOM virtualization - persistentLayout: false, //DEPRICATED - REMOVE in 5.0 @@ -8920,8 +8078,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol groupValues: false, - groupUpdateOnCellEdit: false, - groupHeader: false, //header generation function groupHeaderPrint: null, @@ -9022,8 +8178,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol rowContextMenu: false, - rowClickMenu: false, - rowAdded: function rowAdded() {}, rowDeleted: function rowDeleted() {}, @@ -9094,9 +8248,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol dataLoaded: function dataLoaded() {}, - dataEdited: false, //DEPRECATED - - dataChanged: false, + dataEdited: function dataEdited() {}, //ajax callbacks @@ -9138,8 +8290,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol groupContextMenu: false, - groupClickMenu: false, - groupTap: false, groupDblTap: false, @@ -9202,10 +8352,10 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol if (Array.isArray(this.defaultOptions[key])) { - this.options[key] = Object.assign([], this.defaultOptions[key]); + this.options[key] = []; } else if (_typeof(this.defaultOptions[key]) === "object" && this.defaultOptions[key] !== null) { - this.options[key] = Object.assign({}, this.defaultOptions[key]); + this.options[key] = {}; } else { this.options[key] = this.defaultOptions[key]; @@ -9242,38 +8392,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol } }; - Tabulator.prototype.rtlCheck = function () { - - var style = window.getComputedStyle(this.element); - - switch (this.options.textDirection) { - - case "auto": - - if (style.direction !== "rtl") { - - break; - }; - - case "rtl": - - this.element.classList.add("tabulator-rtl"); - - this.rtl = true; - - break; - - case "ltr": - - this.element.classList.add("tabulator-ltr"); - - default: - - this.rtl = false; - - } - }; - //convert depricated functionality to new functions Tabulator.prototype._mapDepricatedFunctionality = function () { @@ -9288,13 +8406,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol } } - if (this.options.dataEdited) { - - console.warn("DEPRECATION WARNING - dataEdited option has been deprecated, please use the dataChanged option instead"); - - this.options.dataChanged = this.options.dataEdited; - } - if (this.options.downloadDataFormatter) { console.warn("DEPRECATION WARNING - downloadDataFormatter option has been deprecated"); @@ -9393,8 +8504,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol this.bindModules(); - this.rtlCheck(); - if (this.element.tagName === "TABLE") { if (this.modExists("htmlTableImport", true)) { @@ -9413,11 +8522,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol this.rowManager.setColumnManager(this.columnManager); - if (this.options.virtualDomHoz) { - - this.vdomHoz = new VDomHoz(this); - } - this._buildElement(); this._loadInitialData(); @@ -9438,7 +8542,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //build tabulator element Tabulator.prototype._buildElement = function () { - var _this24 = this; + var _this17 = this; var element = this.element, mod = this.modules, @@ -9494,9 +8598,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //set localization - - mod.localize.initialize(); - if (options.headerFilterPlaceholder !== false) { mod.localize.setHeaderFilterPlaceholder(options.headerFilterPlaceholder); @@ -9618,7 +8719,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol options.initialHeaderFilter.forEach(function (item) { - var column = _this24.columnManager.findColumn(item.field); + var column = _this17.columnManager.findColumn(item.field); if (column) { @@ -9834,7 +8935,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //local data from local file Tabulator.prototype.setDataFromLocalFile = function (extensions) { - var _this25 = this; + var _this18 = this; return new Promise(function (resolve, reject) { @@ -9866,7 +8967,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol return; } - _this25.setData(data).then(function (data) { + _this18._setData(data).then(function (data) { resolve(data); }).catch(function (err) { @@ -10076,7 +9177,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //update table data Tabulator.prototype.updateData = function (data) { - var _this26 = this; + var _this19 = this; var self = this; @@ -10084,9 +9185,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol return new Promise(function (resolve, reject) { - if (_this26.modExists("ajax")) { + if (_this19.modExists("ajax")) { - _this26.modules.ajax.blockActiveRequest(); + _this19.modules.ajax.blockActiveRequest(); } if (typeof data === "string") { @@ -10125,13 +9226,13 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; Tabulator.prototype.addData = function (data, pos, index) { - var _this27 = this; + var _this20 = this; return new Promise(function (resolve, reject) { - if (_this27.modExists("ajax")) { + if (_this20.modExists("ajax")) { - _this27.modules.ajax.blockActiveRequest(); + _this20.modules.ajax.blockActiveRequest(); } if (typeof data === "string") { @@ -10141,7 +9242,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol if (data) { - _this27.rowManager.addRows(data, pos, index).then(function (rows) { + _this20.rowManager.addRows(data, pos, index).then(function (rows) { var output = []; @@ -10164,7 +9265,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //update table data Tabulator.prototype.updateOrAddData = function (data) { - var _this28 = this; + var _this21 = this; var self = this, rows = [], @@ -10172,9 +9273,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol return new Promise(function (resolve, reject) { - if (_this28.modExists("ajax")) { + if (_this21.modExists("ajax")) { - _this28.modules.ajax.blockActiveRequest(); + _this21.modules.ajax.blockActiveRequest(); } if (typeof data === "string") { @@ -10264,11 +9365,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //delete row from table Tabulator.prototype.deleteRow = function (index) { - var _this29 = this; + var _this22 = this; return new Promise(function (resolve, reject) { - var self = _this29, + var self = _this22, count = 0, successCount = 0, foundRows = []; @@ -10297,7 +9398,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol index.forEach(function (item) { - var row = _this29.rowManager.findRow(item, true); + var row = _this22.rowManager.findRow(item, true); if (row) { @@ -10316,7 +9417,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol foundRows.sort(function (a, b) { - return _this29.rowManager.rows.indexOf(a) > _this29.rowManager.rows.indexOf(b) ? 1 : -1; + return _this22.rowManager.rows.indexOf(a) > _this22.rowManager.rows.indexOf(b) ? 1 : -1; }); foundRows.forEach(function (row) { @@ -10339,7 +9440,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //add row to table Tabulator.prototype.addRow = function (data, pos, index) { - var _this30 = this; + var _this23 = this; return new Promise(function (resolve, reject) { @@ -10348,13 +9449,13 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol data = JSON.parse(data); } - _this30.rowManager.addRows(data, pos, index).then(function (rows) { + _this23.rowManager.addRows(data, pos, index).then(function (rows) { //recalc column calculations if present - if (_this30.modExists("columnCalcs")) { + if (_this23.modExists("columnCalcs")) { - _this30.modules.columnCalcs.recalc(_this30.rowManager.activeRows); + _this23.modules.columnCalcs.recalc(_this23.rowManager.activeRows); } resolve(rows[0].getComponent()); @@ -10365,11 +9466,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //update a row if it exitsts otherwise create it Tabulator.prototype.updateOrAddRow = function (index, data) { - var _this31 = this; + var _this24 = this; return new Promise(function (resolve, reject) { - var row = _this31.rowManager.findRow(index); + var row = _this24.rowManager.findRow(index); if (typeof data === "string") { @@ -10382,9 +9483,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //recalc column calculations if present - if (_this31.modExists("columnCalcs")) { + if (_this24.modExists("columnCalcs")) { - _this31.modules.columnCalcs.recalc(_this31.rowManager.activeRows); + _this24.modules.columnCalcs.recalc(_this24.rowManager.activeRows); } resolve(row.getComponent()); @@ -10394,13 +9495,13 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }); } else { - row = _this31.rowManager.addRows(data).then(function (rows) { + row = _this24.rowManager.addRows(data).then(function (rows) { //recalc column calculations if present - if (_this31.modExists("columnCalcs")) { + if (_this24.modExists("columnCalcs")) { - _this31.modules.columnCalcs.recalc(_this31.rowManager.activeRows); + _this24.modules.columnCalcs.recalc(_this24.rowManager.activeRows); } resolve(rows[0].getComponent()); @@ -10415,11 +9516,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //update row data Tabulator.prototype.updateRow = function (index, data) { - var _this32 = this; + var _this25 = this; return new Promise(function (resolve, reject) { - var row = _this32.rowManager.findRow(index); + var row = _this25.rowManager.findRow(index); if (typeof data === "string") { @@ -10447,15 +9548,15 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //scroll to row in DOM Tabulator.prototype.scrollToRow = function (index, position, ifVisible) { - var _this33 = this; + var _this26 = this; return new Promise(function (resolve, reject) { - var row = _this33.rowManager.findRow(index); + var row = _this26.rowManager.findRow(index); if (row) { - _this33.rowManager.scrollToRow(row, position, ifVisible).then(function () { + _this26.rowManager.scrollToRow(row, position, ifVisible).then(function () { resolve(); }).catch(function (err) { @@ -10638,13 +9739,13 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; Tabulator.prototype.addColumn = function (definition, before, field) { - var _this34 = this; + var _this27 = this; return new Promise(function (resolve, reject) { - var column = _this34.columnManager.findColumn(field); + var column = _this27.columnManager.findColumn(field); - _this34.columnManager.addColumn(definition, before, column).then(function (column) { + _this27.columnManager.addColumn(definition, before, column).then(function (column) { resolve(column.getComponent()); }).catch(function (err) { @@ -10655,11 +9756,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; Tabulator.prototype.deleteColumn = function (field) { - var _this35 = this; + var _this28 = this; return new Promise(function (resolve, reject) { - var column = _this35.columnManager.findColumn(field); + var column = _this28.columnManager.findColumn(field); if (column) { @@ -10680,11 +9781,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; Tabulator.prototype.updateColumnDefinition = function (field, definition) { - var _this36 = this; + var _this29 = this; return new Promise(function (resolve, reject) { - var column = _this36.columnManager.findColumn(field); + var column = _this29.columnManager.findColumn(field); if (column) { @@ -10728,15 +9829,15 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //scroll to column in DOM Tabulator.prototype.scrollToColumn = function (field, position, ifVisible) { - var _this37 = this; + var _this30 = this; return new Promise(function (resolve, reject) { - var column = _this37.columnManager.findColumn(field); + var column = _this30.columnManager.findColumn(field); if (column) { - _this37.columnManager.scrollToColumn(column, position, ifVisible).then(function () { + _this30.columnManager.scrollToColumn(column, position, ifVisible).then(function () { resolve(); }).catch(function (err) { @@ -11024,7 +10125,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; Tabulator.prototype.clearCellValidation = function (cells) { - var _this38 = this; + var _this31 = this; if (this.modExists("validate", true)) { @@ -11040,7 +10141,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol cells.forEach(function (cell) { - _this38.modules.validate.clearValidation(cell._getSelf()); + _this31.modules.validate.clearValidation(cell._getSelf()); }); } }; @@ -11092,17 +10193,17 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; Tabulator.prototype.setPageToRow = function (row) { - var _this39 = this; + var _this32 = this; return new Promise(function (resolve, reject) { - if (_this39.options.pagination && _this39.modExists("page")) { + if (_this32.options.pagination && _this32.modExists("page")) { - row = _this39.rowManager.findRow(row); + row = _this32.rowManager.findRow(row); if (row) { - _this39.modules.page.setPageToRow(row).then(function () { + _this32.modules.page.setPageToRow(row).then(function () { resolve(); }).catch(function () { @@ -11208,26 +10309,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol } }; - Tabulator.prototype.setGroupValues = function (groupValues) { - - if (this.modExists("groupRows", true)) { - - this.options.groupValues = groupValues; - - this.modules.groupRows.initialize(); - - this.rowManager.refreshActiveData("display"); - - if (this.options.persistence && this.modExists("persistence", true) && this.modules.persistence.config.group) { - - this.modules.persistence.save("group"); - } - } else { - - return false; - } - }; - Tabulator.prototype.setGroupStartOpen = function (values) { if (this.modExists("groupRows", true)) { @@ -11310,7 +10391,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; Tabulator.prototype.clearCellEdited = function (cells) { - var _this40 = this; + var _this33 = this; if (this.modExists("edit", true)) { @@ -11326,7 +10407,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol cells.forEach(function (cell) { - _this40.modules.edit.clearEdited(cell._getSelf()); + _this33.modules.edit.clearEdited(cell._getSelf()); }); } }; @@ -11636,7 +10717,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol deepClone: function deepClone(obj) { - var clone = Object.assign(Array.isArray(obj) ? [] : {}, obj); + var clone = Array.isArray(obj) ? [] : {}; for (var i in obj) { @@ -11649,6 +10730,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol clone[i] = this.deepClone(obj[i]); } + } else { + + clone[i] = obj[i]; } } @@ -11788,16 +10872,10 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol "fitData": function fitData(columns) { - if (this.table.options.virtualDomHoz) { - - this.table.vdomHoz.fitDataLayoutOverride(); - } else { - - columns.forEach(function (column) { + columns.forEach(function (column) { - column.reinitializeWidth(); - }); - } + column.reinitializeWidth(); + }); if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { @@ -11841,7 +10919,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol "fitDataStretch": function fitDataStretch(columns) { - var _this41 = this; + var _this34 = this; var colsWidth = 0, tableWidth = this.table.rowManager.element.clientWidth, @@ -11855,7 +10933,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol column.reinitializeWidth(); } - if (_this41.table.options.responsiveLayout ? column.modules.responsive.visible : column.visible) { + if (_this34.table.options.responsiveLayout ? column.modules.responsive.visible : column.visible) { lastCol = column; } @@ -12147,27 +11225,20 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol this.lang = false; //current language this.bindings = {}; //update events to call when locale is changed - - this.langList = {}; - }; - - Localize.prototype.initialize = function () { - - this.langList = Tabulator.prototype.helpers.deepClone(this.langs); }; //set header placehoder Localize.prototype.setHeaderFilterPlaceholder = function (placeholder) { - this.langList.default.headerFilters.default = placeholder; + this.langs.default.headerFilters.default = placeholder; }; //set header filter placeholder by column Localize.prototype.setHeaderFilterColumnPlaceholder = function (column, placeholder) { - this.langList.default.headerFilters.columns[column] = placeholder; + this.langs.default.headerFilters.columns[column] = placeholder; if (this.lang && !this.lang.headerFilters.columns[column]) { @@ -12179,12 +11250,12 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol Localize.prototype.installLang = function (locale, lang) { - if (this.langList[locale]) { + if (this.langs[locale]) { - this._setLangProp(this.langList[locale], lang); + this._setLangProp(this.langs[locale], lang); } else { - this.langList[locale] = lang; + this.langs[locale] = lang; } }; @@ -12244,11 +11315,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //if locale is not set, check for matching top level locale else use default - if (!self.langList[desiredLocale]) { + if (!self.langs[desiredLocale]) { var prefix = desiredLocale.split("-")[0]; - if (self.langList[prefix]) { + if (self.langs[prefix]) { console.warn("Localization Error - Exact matching locale not found, using closest match: ", desiredLocale, prefix); @@ -12266,11 +11337,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //load default lang template - self.lang = Tabulator.prototype.helpers.deepClone(self.langList.default || {}); + self.lang = Tabulator.prototype.helpers.deepClone(self.langs.default || {}); if (desiredLocale != "default") { - traverseLang(self.langList[desiredLocale], self.lang); + traverseLang(self.langs[desiredLocale], self.lang); } self.table.options.localized.call(self.table, self.locale, self.lang); @@ -12289,7 +11360,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol Localize.prototype.getLang = function (locale) { - return locale ? this.langList[locale] : this.lang; + return locale ? this.langs[locale] : this.lang; }; //get text for current locale @@ -12545,15 +11616,15 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; //apply accessor to row - Accessor.prototype.transformRow = function (row, type) { - var key = "accessor" + (type.charAt(0).toUpperCase() + type.slice(1)), - rowComponent = row.getComponent(); + Accessor.prototype.transformRow = function (dataIn, type) { + var self = this, + key = "accessor" + (type.charAt(0).toUpperCase() + type.slice(1)); //clone data object with deep copy to isolate internal data from returned result - var data = Tabulator.prototype.helpers.deepClone(row.data || {}); + var data = Tabulator.prototype.helpers.deepClone(dataIn || {}); - this.table.columnManager.traverse(function (column) { - var value, accessor, params, colCompnent; + self.table.columnManager.traverse(function (column) { + var value, accessor, params, component; if (column.modules.accessor) { @@ -12563,9 +11634,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol value = column.getFieldValue(data); if (value != "undefined") { - colCompnent = column.getComponent(); - params = typeof accessor.params === "function" ? accessor.params(value, data, type, colCompnent, rowComponent) : accessor.params; - column.setFieldValue(data, accessor.accessor(value, data, type, params, colCompnent, rowComponent)); + component = column.getComponent(); + params = typeof accessor.params === "function" ? accessor.params(value, data, type, component) : accessor.params; + column.setFieldValue(data, accessor.accessor(value, data, type, params, component)); } } } @@ -12758,11 +11829,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; Ajax.prototype._loadDataStandard = function (inPosition, columnsChanged) { - var _this42 = this; + var _this35 = this; return new Promise(function (resolve, reject) { - _this42.sendRequest(inPosition).then(function (data) { - _this42.table.rowManager.setData(data, inPosition, columnsChanged).then(function () { + _this35.sendRequest(inPosition).then(function (data) { + _this35.table.rowManager.setData(data, inPosition, columnsChanged).then(function () { resolve(); }).catch(function (e) { reject(e); @@ -12807,7 +11878,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //send ajax request Ajax.prototype.sendRequest = function (silent) { - var _this43 = this; + var _this36 = this; var self = this, url = self.url, @@ -12821,7 +11892,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol self._loadDefaultConfig(); return new Promise(function (resolve, reject) { - if (self.table.options.ajaxRequesting.call(_this43.table, self.url, self.params) !== false) { + if (self.table.options.ajaxRequesting.call(_this36.table, self.url, self.params) !== false) { self.loading = true; @@ -12829,7 +11900,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol self.showLoader(); } - _this43.loaderPromise(url, self.config, self.params).then(function (data) { + _this36.loaderPromise(url, self.config, self.params).then(function (data) { if (requestNo === self.requestOrder) { if (self.table.options.ajaxResponse) { data = self.table.options.ajaxResponse.call(self.table, self.url, self.params, data); @@ -13040,42 +12111,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol Tabulator.prototype.registerModule("ajax", Ajax); - //public calc object - var CalcComponent = function CalcComponent(row) { - this._row = row; - }; - - CalcComponent.prototype.getData = function (transform) { - return this._row.getData(transform); - }; - - CalcComponent.prototype.getElement = function () { - return this._row.getElement(); - }; - - CalcComponent.prototype.getTable = function () { - return this._row.table; - }; - - CalcComponent.prototype.getCells = function () { - var cells = []; - - this._row.getCells().forEach(function (cell) { - cells.push(cell.getComponent()); - }); - - return cells; - }; - - CalcComponent.prototype.getCell = function (column) { - var cell = this._row.getCell(column); - return cell ? cell.getComponent() : false; - }; - - CalcComponent.prototype._getSelf = function () { - return this._row; - }; - var ColumnCalcs = function ColumnCalcs(table) { this.table = table; //hold Tabulator object this.topCalcs = []; @@ -13206,7 +12241,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol var hozAdjust = 0, scrollWidth = this.table.columnManager.getElement().scrollWidth - this.table.element.clientWidth; - if (this.botInitialized && this.botRow) { + if (this.botInitialized) { this.botRow.getElement().style.marginLeft = -left + "px"; } }; @@ -13257,7 +12292,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; ColumnCalcs.prototype.recalcAll = function () { - var _this44 = this; + var _this37 = this; if (this.topCalcs.length || this.botCalcs.length) { if (this.table.options.columnCalcs !== "group") { @@ -13269,7 +12304,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol var groups = table.modules.groupRows.getChildGroups(); groups.forEach(function (group) { - _this44.recalcGroup(group); + _this37.recalcGroup(group); }); } } @@ -13309,16 +12344,16 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; ColumnCalcs.prototype.rowsToData = function (rows) { - var _this45 = this; + var _this38 = this; var data = []; rows.forEach(function (row) { data.push(row.getData()); - if (_this45.table.options.dataTree && _this45.table.options.dataTreeChildColumnCalcs) { + if (_this38.table.options.dataTree && _this38.table.options.dataTreeChildColumnCalcs) { if (row.modules.dataTree.open) { - var children = _this45.rowsToData(_this45.table.modules.dataTree.getFilteredTreeChildren(row)); + var children = _this38.rowsToData(_this38.table.modules.dataTree.getFilteredTreeChildren(row)); data = data.concat(children); } } @@ -13345,16 +12380,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol row.getElement().classList.add("tabulator-calcs", "tabulator-calcs-" + pos); - row.component = false; - - row.getComponent = function () { - if (!this.component) { - this.component = new CalcComponent(this); - } - - return this.component; - }; - row.generateCells = function () { var cells = []; @@ -13366,9 +12391,10 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol self.genColumn.hozAlign = column.hozAlign; if (column.definition[pos + "CalcFormatter"] && self.table.modExists("format")) { + self.genColumn.modules.format = { formatter: self.table.modules.format.getFormatter(column.definition[pos + "CalcFormatter"]), - params: column.definition[pos + "CalcFormatterParams"] || {} + params: column.definition[pos + "CalcFormatterParams"] }; } else { self.genColumn.modules.format = { @@ -13382,7 +12408,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //generate cell and assign to correct column var cell = new Cell(self.genColumn, row); - cell.getElement(); cell.column = column; cell.setWidth(); @@ -13495,7 +12520,8 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol if (values.length) { output = values.reduce(function (sum, value) { - return Number(sum) + Number(value); + value = Number(value); + return sum + value; }); output = output / values.length; @@ -13589,7 +12615,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; Clipboard.prototype.initialize = function () { - var _this46 = this; + var _this39 = this; this.mode = this.table.options.clipboard; @@ -13599,25 +12625,25 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol this.table.element.addEventListener("copy", function (e) { var plain, html, list; - if (!_this46.blocked) { + if (!_this39.blocked) { e.preventDefault(); - if (_this46.customSelection) { - plain = _this46.customSelection; + if (_this39.customSelection) { + plain = _this39.customSelection; - if (_this46.table.options.clipboardCopyFormatter) { - plain = _this46.table.options.clipboardCopyFormatter("plain", plain); + if (_this39.table.options.clipboardCopyFormatter) { + plain = _this39.table.options.clipboardCopyFormatter("plain", plain); } } else { - var list = _this46.table.modules.export.generateExportList(_this46.table.options.clipboardCopyConfig, _this46.table.options.clipboardCopyStyled, _this46.rowRange, "clipboard"); + var list = _this39.table.modules.export.generateExportList(_this39.rowRange, _this39.table.options.clipboardCopyStyled, _this39.table.options.clipboardCopyConfig, "clipboard"); - html = _this46.table.modules.export.genereateHTMLTable(list); - plain = html ? _this46.generatePlainContent(list) : ""; + html = _this39.table.modules.export.genereateHTMLTable(list); + plain = html ? _this39.generatePlainContent(list) : ""; - if (_this46.table.options.clipboardCopyFormatter) { - plain = _this46.table.options.clipboardCopyFormatter("plain", plain); - html = _this46.table.options.clipboardCopyFormatter("html", html); + if (_this39.table.options.clipboardCopyFormatter) { + plain = _this39.table.options.clipboardCopyFormatter("plain", plain); + html = _this39.table.options.clipboardCopyFormatter("html", html); } } @@ -13635,16 +12661,16 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol } } - _this46.table.options.clipboardCopied.call(_this46.table, plain, html); + _this39.table.options.clipboardCopied.call(_this39.table, plain, html); - _this46.reset(); + _this39.reset(); } }); } if (this.mode === true || this.mode === "paste") { this.table.element.addEventListener("paste", function (e) { - _this46.paste(e); + _this39.paste(e); }); } @@ -13653,8 +12679,8 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; Clipboard.prototype.reset = function () { - this.blocked = true; - this.customSelection = false; + this.blocked = false; + this.originalSelectionText = ""; }; Clipboard.prototype.generatePlainContent = function (list) { @@ -13672,21 +12698,18 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol col.value = col.component.getKey(); } - if (col.value === null) { - value = ""; - } else { - switch (_typeof(col.value)) { - case "object": - value = JSON.stringify(col.value); - break; + switch (_typeof(col.value)) { + case "object": + value = JSON.stringify(col.value); + break; - case "undefined": - value = ""; - break; + case "undefined": + case "null": + value = ""; + break; - default: - value = col.value; - } + default: + value = col.value; } } @@ -14062,25 +13085,15 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol if (this.branchEl) { config.branchEl = this.branchEl.cloneNode(true); el.insertBefore(config.branchEl, el.firstChild); - - if (this.table.rtl) { - config.branchEl.style.marginRight = (config.branchEl.offsetWidth + config.branchEl.style.marginLeft) * (config.index - 1) + config.index * this.indent + "px"; - } else { - config.branchEl.style.marginLeft = (config.branchEl.offsetWidth + config.branchEl.style.marginRight) * (config.index - 1) + config.index * this.indent + "px"; - } + config.branchEl.style.marginLeft = (config.branchEl.offsetWidth + config.branchEl.style.marginRight) * (config.index - 1) + config.index * this.indent + "px"; } else { - - if (this.table.rtl) { - el.style.paddingRight = parseInt(window.getComputedStyle(el, null).getPropertyValue('padding-right')) + config.index * this.indent + "px"; - } else { - el.style.paddingLeft = parseInt(window.getComputedStyle(el, null).getPropertyValue('padding-left')) + config.index * this.indent + "px"; - } + el.style.paddingLeft = parseInt(window.getComputedStyle(el, null).getPropertyValue('padding-left')) + config.index * this.indent + "px"; } } }; DataTree.prototype.generateControlElement = function (row, el) { - var _this47 = this; + var _this40 = this; var config = row.modules.dataTree, el = el || row.getCells()[0].getElement(), @@ -14092,13 +13105,13 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol config.controlEl = this.collapseEl.cloneNode(true); config.controlEl.addEventListener("click", function (e) { e.stopPropagation(); - _this47.collapseRow(row); + _this40.collapseRow(row); }); } else { config.controlEl = this.expandEl.cloneNode(true); config.controlEl.addEventListener("click", function (e) { e.stopPropagation(); - _this47.expandRow(row); + _this40.expandRow(row); }); } @@ -14123,7 +13136,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; DataTree.prototype.getRows = function (rows) { - var _this48 = this; + var _this41 = this; var output = []; @@ -14137,7 +13150,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol config = row.modules.dataTree.children; if (!config.index && config.children !== false) { - children = _this48.getChildren(row); + children = _this41.getChildren(row); children.forEach(function (child) { output.push(child); @@ -14150,7 +13163,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; DataTree.prototype.getChildren = function (row) { - var _this49 = this; + var _this42 = this; var config = row.modules.dataTree, children = [], @@ -14161,20 +13174,20 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol config.children = this.generateChildren(row); } - if (this.table.modExists("filter") && this.table.options.dataTreeFilter) { + if (this.table.modExists("filter")) { children = this.table.modules.filter.filter(config.children); } else { children = config.children; } - if (this.table.modExists("sort") && this.table.options.dataTreeSort) { + if (this.table.modExists("sort")) { this.table.modules.sort.sort(children); } children.forEach(function (child) { output.push(child); - var subChildren = _this49.getChildren(child); + var subChildren = _this42.getChildren(child); subChildren.forEach(function (sub) { output.push(sub); @@ -14186,7 +13199,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; DataTree.prototype.generateChildren = function (row) { - var _this50 = this; + var _this43 = this; var children = []; @@ -14197,11 +13210,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol } childArray.forEach(function (childData) { - var childRow = new Row(childData || {}, _this50.table.rowManager); + var childRow = new Row(childData || {}, _this43.table.rowManager); childRow.modules.dataTree.index = row.modules.dataTree.index + 1; childRow.modules.dataTree.parent = row; if (childRow.modules.dataTree.children) { - childRow.modules.dataTree.open = _this50.startOpen(childRow.getComponent(), childRow.modules.dataTree.index); + childRow.modules.dataTree.open = _this43.startOpen(childRow.getComponent(), childRow.modules.dataTree.index); } children.push(childRow); }); @@ -14264,7 +13277,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol config.children = this.generateChildren(row); } - if (this.table.modExists("filter") && this.table.options.dataTreeFilter) { + if (this.table.modExists("filter")) { children = this.table.modules.filter.filter(config.children); } else { children = config.children; @@ -14338,7 +13351,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; DataTree.prototype.findChildIndex = function (subject, parent) { - var _this51 = this; + var _this44 = this; var match = false; @@ -14366,7 +13379,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol } else { //subject should be treated as the index of the row match = parent.data[this.field].find(function (row) { - return row.data[_this51.table.options.index] == subject; + return row.data[_this44.table.options.index] == subject; }); } @@ -14386,9 +13399,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol return match; }; - DataTree.prototype.getTreeChildren = function (row, component, recurse) { - var _this52 = this; - + DataTree.prototype.getTreeChildren = function (row) { var config = row.modules.dataTree, output = []; @@ -14400,11 +13411,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol config.children.forEach(function (childRow) { if (childRow instanceof Row) { - output.push(component ? childRow.getComponent() : childRow); - - if (recurse) { - output = output.concat(_this52.getTreeChildren(childRow, component, recurse)); - } + output.push(childRow.getComponent()); } }); } @@ -14557,7 +13564,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol case "header": row.columns.forEach(function (col, i) { if (col && col.depth === 1) { - headers[i] = typeof col.value == "undefined" || col.value === null ? "" : '"' + String(col.value).split('"').join('""') + '"'; + headers[i] = typeof col.value == "undefined" || typeof col.value == "null" ? "" : col.value; } }); break; @@ -14588,7 +13595,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }); if (headers.length) { - fileContents.unshift(headers.join(delimiter)); + fileContents = [headers].concat(fileContents); } fileContents = fileContents.join("\n"); @@ -14815,7 +13822,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol workbook.SheetNames.push(sheet); - this.modules.comms.send(options.sheets[sheet], "download", "intercept", { + this.table.modules.comms.send(options.sheets[sheet], "download", "intercept", { type: "xlsx", options: { sheetOnly: true }, active: self.active, @@ -14963,10 +13970,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol cell.setValueActual(cell.getValue()); cell.cellRendered(); - if (cell.column.definition.editor == "textarea" || cell.column.definition.variableHeight) { - cell.row.normalizeHeight(true); - } - if (cell.column.cellEvents.cellEditCancelled) { cell.column.cellEvents.cellEditCancelled.call(this.table, component); } @@ -14989,11 +13992,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }); element.addEventListener("mousedown", function (e) { - if (e.button === 2) { - e.preventDefault(); - } else { - self.mouseClick = true; - } + self.mouseClick = true; }); element.addEventListener("focus", function (e) { @@ -15030,24 +14029,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol this.table.rowManager.element.scrollTop += rowEl.offsetTop + rowEl.offsetHeight - bottomEdge; } } - - var leftEdge = this.table.rowManager.element.scrollLeft, - rightEdge = this.table.rowManager.element.clientWidth + this.table.rowManager.element.scrollLeft, - cellEl = cell.getElement(), - offset = cellEl.offsetLeft; - - if (this.table.modExists("frozenColumns")) { - leftEdge += parseInt(this.table.modules.frozenColumns.leftMargin); - rightEdge -= parseInt(this.table.modules.frozenColumns.rightMargin); - } - - if (cellEl.offsetLeft < leftEdge) { - this.table.rowManager.element.scrollLeft -= leftEdge - cellEl.offsetLeft; - } else { - if (cellEl.offsetLeft + cellEl.offsetWidth > rightEdge) { - this.table.rowManager.element.scrollLeft += cellEl.offsetLeft + cellEl.offsetWidth - rightEdge; - } - } } }; @@ -15079,6 +14060,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol if (valid === true || self.table.options.validationMode === "highlight") { self.clearEditor(); + cell.setValue(value, true); if (!cell.modules.edit) { cell.modules.edit = {}; @@ -15090,15 +14072,12 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol self.editedCells.push(cell); } - cell.setValue(value, true); - if (self.table.options.dataTree && self.table.modExists("dataTree")) { self.table.modules.dataTree.checkForRestyle(cell); } if (valid !== true) { element.classList.add("tabulator-validation-fail"); - self.table.options.validationFailed.call(self.table, cell.getComponent(), value, valid); return false; } @@ -15316,17 +14295,13 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol var editIndex; if (cell.modules.edit && cell.modules.edit.edited) { - cell.modules.edit.edited = false; - - if (cell.modules.validate) { - cell.modules.validate.invalid = false; - } - } + cell.modules.validate.invalid = false; - editIndex = this.editedCells.indexOf(cell); + editIndex = this.editedCells.indexOf(cell); - if (editIndex > -1) { - this.editedCells.splice(editIndex, 1); + if (editIndex > -1) { + this.editedCells.splice(editIndex, 1); + } } }; @@ -15387,12 +14362,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol break; case 27: - cancel(); - break; - - case 35: - case 36: - e.stopPropagation(); + cancel(); break; } }); @@ -15439,10 +14409,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol onRendered(function () { input.focus({ preventScroll: true }); input.style.height = "100%"; - - input.scrollHeight; - input.style.height = input.scrollHeight + "px"; - cell.getRow().normalizeHeight(); }); function onChange(e) { @@ -15502,11 +14468,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol e.stopPropagation(); } break; - - case 35: - case 36: - e.stopPropagation(); - break; } }); @@ -15607,11 +14568,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol e.stopPropagation(); } break; - - case 35: - case 36: - e.stopPropagation(); - break; } }); @@ -15705,13 +14661,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //select select: function select(cell, onRendered, success, cancel, editorParams) { - var _this53 = this; - var self = this, cellEl = cell.getElement(), initialValue = cell.getValue(), vertNav = editorParams.verticalNavigation || "editor", - initialDisplayValue = typeof initialValue !== "undefined" || initialValue === null ? Array.isArray(initialValue) ? initialValue : [initialValue] : typeof editorParams.defaultValue !== "undefined" ? editorParams.defaultValue : [], + initialDisplayValue = typeof initialValue !== "undefined" || initialValue === null ? initialValue : typeof editorParams.defaultValue !== "undefined" ? editorParams.defaultValue : [], input = document.createElement("input"), listEl = document.createElement("div"), multiselect = editorParams.multiselect, @@ -15719,8 +14673,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol currentItem = {}, displayItems = [], currentItems = [], - blurable = true, - blockListShow = false; + blurable = true; + + this.table.rowManager.element.addEventListener("scroll", cancelItem); if (Array.isArray(editorParams) || !Array.isArray(editorParams) && (typeof editorParams === 'undefined' ? 'undefined' : _typeof(editorParams)) === "object" && !editorParams.values) { console.warn("DEPRECATION WARNING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object"); @@ -15884,12 +14839,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol el.innerHTML = item.label === "" ? " " : item.label; el.addEventListener("click", function () { - blockListShow = true; - - setTimeout(function () { - blockListShow = false; - }, 10); - // setCurrentItem(item); // chooseItem(); if (multiselect) { @@ -15952,10 +14901,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol item.element.classList.add("active"); } } - - if (item && item.element && item.element.scrollIntoView) { - item.element.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' }); - } } // function chooseItem(){ @@ -16019,17 +14964,12 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol } if (item) { - input.value = item.label; success(item.value); } - - initialDisplayValue = input.value; } - function chooseItems(silent) { - if (!silent) { - hideList(); - } + function chooseItems() { + hideList(); var output = []; @@ -16037,8 +14977,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol output.push(item.value); }); - initialDisplayValue = input.value; - success(output); } @@ -16050,19 +14988,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }); input.value = output.join(", "); - - if (self.currentCell === false) { - chooseItems(true); - } - } - - function unsetItems() { - - var len = currentItems.length; - - for (var _i9 = 0; _i9 < len; _i9++) { - unsetItem(0); - } } function cancelItem() { @@ -16071,9 +14996,8 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol } function showList() { - currentItems = []; - if (!listEl.parentNode) { + if (editorParams.values === true) { parseItems(getUniqueColumnValues(), initialDisplayValue); } else if (typeof editorParams.values === "string") { @@ -16143,13 +15067,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol // parseItems(editorParams.values || [], initialValue); // } - input.addEventListener("search", function (e) { - if (!input.value) { - unsetItems(); - chooseItems(); - } - }); - //allow key based navigation input.addEventListener("keydown", function (e) { var index; @@ -16213,15 +15130,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //escape cancelItem(); break; - - case 9: - //tab - break; - - default: - if (self.currentCell === false) { - e.preventDefault(); - } } }); @@ -16236,9 +15144,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }); input.addEventListener("focus", function (e) { - if (!blockListShow) { - showList(); - } + showList(); }); //style list element @@ -16250,17 +15156,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol input.focus({ preventScroll: true }); }); - setTimeout(function () { - _this53.table.rowManager.element.addEventListener("scroll", cancelItem); - }, 10); - return input; }, //autocomplete autocomplete: function autocomplete(cell, onRendered, success, cancel, editorParams) { - var _this54 = this; - var self = this, cellEl = cell.getElement(), initialValue = cell.getValue(), @@ -16275,6 +15175,8 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol blurable = true, uniqueColumnValues = false; + this.table.rowManager.element.addEventListener("scroll", cancelItem); + //style input input.setAttribute("type", "search"); @@ -16565,10 +15467,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol if (item && item.element) { item.element.classList.add("active"); } - - if (item && item.element && item.element.scrollIntoView) { - item.element.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' }); - } } function hideList() { @@ -16702,14 +15600,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol this.table.modules.edit.maskInput(input, editorParams); } - setTimeout(function () { - _this54.table.rowManager.element.addEventListener("scroll", cancelItem); - }, 10); - - genUniqueColumnValues(); - input.value = initialDisplayValue; - filterList(initialDisplayValue, true); - return input; }, @@ -17032,10 +15922,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol input.checked = value === true || value === "true" || value === "True" || value === 1; - onRendered(function () { - input.focus(); - }); - function setValue(blur) { if (tristate) { if (!blur) { @@ -17125,13 +16011,13 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; Export.prototype.rowLookup = function (range) { - var _this55 = this; + var _this45 = this; var rows = []; if (typeof range == "function") { range.call(this.table).forEach(function (row) { - row = _this55.table.rowManager.findRow(row); + row = _this45.table.rowManager.findRow(row); if (row) { rows.push(row); @@ -17154,11 +16040,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol case "active": default: - if (this.table.options.pagination) { - rows = this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length - 2); - } else { - rows = this.table.rowManager.getDisplayRows(); - } + rows = this.table.rowManager.getDisplayRows(); } } @@ -17166,14 +16048,14 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; Export.prototype.generateColumnGroupHeaders = function () { - var _this56 = this; + var _this46 = this; var output = []; var columns = this.config.columnGroups !== false ? this.table.columnManager.columns : this.table.columnManager.columnsByIndex; columns.forEach(function (column) { - var colData = _this56.processColumnGroup(column); + var colData = _this46.processColumnGroup(column); if (colData) { output.push(colData); @@ -17184,7 +16066,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; Export.prototype.processColumnGroup = function (column) { - var _this57 = this; + var _this47 = this; var subGroups = column.columns, maxDepth = 0, @@ -17201,7 +16083,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol groupData.width = 0; subGroups.forEach(function (subGroup) { - var subGroupData = _this57.processColumnGroup(subGroup); + var subGroupData = _this47.processColumnGroup(subGroup); if (subGroupData) { groupData.width += subGroupData.width; @@ -17251,18 +16133,18 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol headers[level].push(column); if (column.height > 1) { - for (var _i10 = 1; _i10 < column.height; _i10++) { + for (var _i6 = 1; _i6 < column.height; _i6++) { - if (typeof headers[level + _i10] === "undefined") { - headers[level + _i10] = []; + if (typeof headers[level + _i6] === "undefined") { + headers[level + _i6] = []; } - headers[level + _i10].push(false); + headers[level + _i6].push(false); } } if (column.width > 1) { - for (var _i11 = 1; _i11 < column.width; _i11++) { + for (var _i7 = 1; _i7 < column.width; _i7++) { headers[level].push(false); } } @@ -17303,13 +16185,13 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; Export.prototype.bodyToExportRows = function (rows) { - var _this58 = this; + var _this48 = this; var columns = []; var exportRows = []; this.table.columnManager.columnsByIndex.forEach(function (column) { - if (_this58.columnVisCheck(column)) { + if (_this48.columnVisCheck(column)) { columns.push(column.getComponent()); } }); @@ -17327,15 +16209,15 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol rows = rows.filter(function (row) { switch (row.type) { case "group": - return _this58.config.rowGroups !== false; + return _this48.config.rowGroups !== false; break; case "calc": - return _this58.config.columnCalcs !== false; + return _this48.config.columnCalcs !== false; break; case "row": - return !(_this58.table.options.dataTree && _this58.config.dataTree === false && row.modules.dataTree.parent); + return !(_this48.table.options.dataTree && _this48.config.dataTree === false && row.modules.dataTree.parent); break; } @@ -17343,7 +16225,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }); rows.forEach(function (row, i) { - var rowData = row.getData(_this58.colVisProp); + var rowData = row.getData(_this48.colVisProp); var exportCols = []; var indent = 0; @@ -17359,7 +16241,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol exportCols.push(new ExportColumn(col._column.getFieldValue(rowData), col, 1, 1)); }); - if (_this58.table.options.dataTree && _this58.config.dataTree !== false) { + if (_this48.table.options.dataTree && _this48.config.dataTree !== false) { indent = row.modules.dataTree.index; } break; @@ -17372,7 +16254,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; Export.prototype.genereateTableElement = function (list) { - var _this59 = this; + var _this49 = this; var table = document.createElement("table"), headerEl = document.createElement("thead"), @@ -17405,20 +16287,20 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol list.forEach(function (row, i) { switch (row.type) { case "header": - headerEl.appendChild(_this59.genereateHeaderElement(row, setup, styles)); + headerEl.appendChild(_this49.genereateHeaderElement(row, setup, styles)); break; case "group": - bodyEl.appendChild(_this59.genereateGroupElement(row, setup, styles)); + bodyEl.appendChild(_this49.genereateGroupElement(row, setup, styles)); break; case "calc": - bodyEl.appendChild(_this59.genereateCalcElement(row, setup, styles)); + bodyEl.appendChild(_this49.genereateCalcElement(row, setup, styles)); break; case "row": - var rowEl = _this59.genereateRowElement(row, setup, styles); - _this59.mapElementStyles(i % 2 && styles.evenRow ? styles.evenRow : styles.oddRow, rowEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]); + var rowEl = _this49.genereateRowElement(row, setup, styles); + _this49.mapElementStyles(i % 2 && styles.evenRow ? styles.evenRow : styles.oddRow, rowEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]); bodyEl.appendChild(rowEl); break; } @@ -17456,7 +16338,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; Export.prototype.genereateHeaderElement = function (row, setup, styles) { - var _this60 = this; + var _this50 = this; var rowEl = document.createElement("tr"); @@ -17470,7 +16352,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol cellEl.innerHTML = column.value; - if (_this60.cloneTableStyle) { + if (_this50.cloneTableStyle) { cellEl.style.boxSizing = "border-box"; } @@ -17478,11 +16360,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol cellEl.classList.add(className); }); - _this60.mapElementStyles(column.component.getElement(), cellEl, ["text-align", "border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); - _this60.mapElementStyles(column.component._column.contentElement, cellEl, ["padding-top", "padding-left", "padding-right", "padding-bottom"]); + _this50.mapElementStyles(column.component.getElement(), cellEl, ["text-align", "border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); + _this50.mapElementStyles(column.component._column.contentElement, cellEl, ["padding-top", "padding-left", "padding-right", "padding-bottom"]); if (column.component._column.visible) { - _this60.mapElementStyles(column.component.getElement(), cellEl, ["width"]); + _this50.mapElementStyles(column.component.getElement(), cellEl, ["width"]); } else { if (column.component._column.definition.width) { cellEl.style.width = column.component._column.definition.width + "px"; @@ -17490,7 +16372,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol } if (column.component._column.parent) { - _this60.mapElementStyles(column.component._column.parent.groupElement, cellEl, ["border-top"]); + _this50.mapElementStyles(column.component._column.parent.groupElement, cellEl, ["border-top"]); } rowEl.appendChild(cellEl); @@ -17524,7 +16406,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol rowEl.classList.add("tabulator-print-table-group"); rowEl.classList.add("tabulator-group-level-" + row.indent); - if (group.component.isVisible()) { + if (group.component.getVisibility()) { rowEl.classList.add("tabulator-group-visible"); } @@ -17546,7 +16428,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; Export.prototype.genereateRowElement = function (row, setup, styles) { - var _this61 = this; + var _this51 = this; var rowEl = document.createElement("tr"); @@ -17574,10 +16456,10 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol return column.getComponent(); }, getData: function getData() { - return row.component.getData(); + return rowData; }, getRow: function getRow() { - return row.component; + return row.getComponent(); }, getComponent: function getComponent() { return cellWrapper; @@ -17591,8 +16473,8 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol cellEl.classList.add(className); }); - if (_this61.table.modExists("format") && _this61.config.formatCells !== false) { - value = _this61.table.modules.format.formatExportValue(cellWrapper, _this61.colVisProp); + if (_this51.table.modExists("format") && _this51.config.formatCells !== false) { + value = _this51.table.modules.format.formatExportValue(cellWrapper, _this51.colVisProp); } else { switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { case "object": @@ -17616,14 +16498,14 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol } if (styles.firstCell) { - _this61.mapElementStyles(styles.firstCell, cellEl, ["padding-top", "padding-left", "padding-right", "padding-bottom", "border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size"]); + _this51.mapElementStyles(styles.firstCell, cellEl, ["padding-top", "padding-left", "padding-right", "padding-bottom", "border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size"]); if (column.definition.align) { cellEl.style.textAlign = column.definition.align; } } - if (_this61.table.options.dataTree && _this61.config.dataTree !== false) { + if (_this51.table.options.dataTree && _this51.config.dataTree !== false) { if (setup.treeElementField && setup.treeElementField == column.field || !setup.treeElementField && i == 0) { if (row.component._row.modules.dataTree.controlEl) { cellEl.insertBefore(row.component._row.modules.dataTree.controlEl.cloneNode(true), cellEl.firstChild); @@ -17640,8 +16522,14 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol cellWrapper.modules.format.renderedCallback(); } - if (setup.rowFormatter && _this61.config.formatCells !== false) { - setup.rowFormatter(row.component); + if (setup.rowFormatter && _this51.config.formatCells !== false) { + var rowComponent = row.getComponent(); + + rowComponent.getElement = function () { + return rowEl; + }; + + setup.rowFormatter(rowComponent); } } }); @@ -17813,7 +16701,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; Filter.prototype.generateHeaderFilterElement = function (column, initialValue, reinitialize) { - var _this62 = this; + var _this52 = this; var self = this, success = column.modules.filter.success, @@ -17938,11 +16826,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }); editorElement.addEventListener("focus", function (e) { - var left = _this62.table.columnManager.element.scrollLeft; + var left = _this52.table.columnManager.element.scrollLeft; - if (left !== _this62.table.rowManager.element.scrollLeft) { - _this62.table.rowManager.scrollHorizontal(left); - _this62.table.columnManager.scrollHorizontal(left); + if (left !== _this52.table.rowManager.element.scrollLeft) { + _this52.table.rowManager.scrollHorizontal(left); + _this52.table.columnManager.scrollHorizontal(left); } }); @@ -18183,7 +17071,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //filter to Object Filter.prototype.filtersToArray = function (filterList, ajax) { - var _this63 = this; + var _this53 = this; var output = []; @@ -18191,7 +17079,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol var item; if (Array.isArray(filter)) { - output.push(_this63.filtersToArray(filter, ajax)); + output.push(_this53.filtersToArray(filter, ajax)); } else { item = { field: filter.field, type: filter.type, value: filter.value }; @@ -18490,7 +17378,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //in array "in": function _in(filterVal, rowVal, rowData, filterParams) { if (Array.isArray(filterVal)) { - return filterVal.length ? filterVal.indexOf(rowVal) > -1 : true; + return filterVal.indexOf(rowVal) > -1; } else { console.warn("Filter Error - filter value is not an array:", filterVal); return false; @@ -18560,9 +17448,8 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; Format.prototype.cellRendered = function (cell) { - if (cell.modules.format && cell.modules.format.renderedCallback && !cell.modules.format.rendered) { + if (cell.modules.format && cell.modules.format.renderedCallback) { cell.modules.format.renderedCallback(); - cell.modules.format.rendered = true; } }; @@ -18577,7 +17464,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol } cell.modules.format.renderedCallback = callback; - cell.modules.format.rendered = false; } return cell.column.modules.format.formatter.call(this, component, params, onRendered); @@ -18594,7 +17480,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol } cell.modules.format.renderedCallback = callback; - cell.modules.format.rendered = false; }; params = typeof formatter.params === "function" ? formatter.params(component) : formatter.params; @@ -19185,8 +18070,8 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol return el; }, - rowSelection: function rowSelection(cell, formatterParams, onRendered) { - var _this64 = this; + rowSelection: function rowSelection(cell) { + var _this54 = this; var checkbox = document.createElement("input"); @@ -19201,23 +18086,18 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol if (typeof cell.getRow == 'function') { var row = cell.getRow(); - if (row instanceof RowComponent) { - - checkbox.addEventListener("change", function (e) { - row.toggleSelect(); - }); + checkbox.addEventListener("change", function (e) { + row.toggleSelect(); + }); - checkbox.checked = row.isSelected && row.isSelected(); - this.table.modules.selectRow.registerRowSelectCheckbox(row, checkbox); - } else { - checkbox = ""; - } + checkbox.checked = row.isSelected(); + this.table.modules.selectRow.registerRowSelectCheckbox(row, checkbox); } else { checkbox.addEventListener("change", function (e) { - if (_this64.table.modules.selectRow.selectedRows.length) { - _this64.table.deselectRow(); + if (_this54.table.modules.selectRow.selectedRows.length) { + _this54.table.deselectRow(); } else { - _this64.table.selectRow(formatterParams.rowRange); + _this54.table.selectRow(); } }); @@ -19299,7 +18179,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //quick layout to smooth horizontal scrolling FrozenColumns.prototype.scrollHorizontal = function () { - var _this65 = this; + var _this55 = this; var rows; @@ -19308,7 +18188,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //layout all rows after scroll is complete this.scrollEndTimer = setTimeout(function () { - _this65.layout(); + _this55.layout(); }, 100); rows = this.table.rowManager.getVisibleRows(); @@ -19321,7 +18201,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol rows.forEach(function (row) { if (row.type === "row") { - _this65.layoutRow(row); + _this55.layoutRow(row); } }); @@ -19355,23 +18235,23 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //calculate column positions and layout headers FrozenColumns.prototype.layoutColumnPosition = function (allCells) { - var _this66 = this; + var _this56 = this; var leftParents = []; this.leftColumns.forEach(function (column, i) { - column.modules.frozen.margin = _this66._calcSpace(_this66.leftColumns, i) + _this66.table.columnManager.scrollLeft + "px"; + column.modules.frozen.margin = _this56._calcSpace(_this56.leftColumns, i) + _this56.table.columnManager.scrollLeft + "px"; - if (i == _this66.leftColumns.length - 1) { + if (i == _this56.leftColumns.length - 1) { column.modules.frozen.edge = true; } else { column.modules.frozen.edge = false; } if (column.parent.isGroup) { - var parentEl = _this66.getColGroupParentElement(column); + var parentEl = _this56.getColGroupParentElement(column); if (!leftParents.includes(parentEl)) { - _this66.layoutElement(parentEl, column); + _this56.layoutElement(parentEl, column); leftParents.push(parentEl); } @@ -19379,34 +18259,34 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol parentEl.classList.add("tabulator-frozen-" + column.modules.frozen.position); } } else { - _this66.layoutElement(column.getElement(), column); + _this56.layoutElement(column.getElement(), column); } if (allCells) { column.cells.forEach(function (cell) { - _this66.layoutElement(cell.getElement(), column); + _this56.layoutElement(cell.getElement(), column); }); } }); this.rightColumns.forEach(function (column, i) { - column.modules.frozen.margin = _this66.rightPadding - _this66._calcSpace(_this66.rightColumns, i + 1) + "px"; + column.modules.frozen.margin = _this56.rightPadding - _this56._calcSpace(_this56.rightColumns, i + 1) + "px"; - if (i == _this66.rightColumns.length - 1) { + if (i == _this56.rightColumns.length - 1) { column.modules.frozen.edge = true; } else { column.modules.frozen.edge = false; } if (column.parent.isGroup) { - _this66.layoutElement(_this66.getColGroupParentElement(column), column); + _this56.layoutElement(_this56.getColGroupParentElement(column), column); } else { - _this66.layoutElement(column.getElement(), column); + _this56.layoutElement(column.getElement(), column); } if (allCells) { column.cells.forEach(function (cell) { - _this66.layoutElement(cell.getElement(), column); + _this56.layoutElement(cell.getElement(), column); }); } }); @@ -19452,7 +18332,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; FrozenColumns.prototype.layoutRow = function (row) { - var _this67 = this; + var _this57 = this; var rowEl = row.getElement(); @@ -19463,7 +18343,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol var cell = row.getCell(column); if (cell) { - _this67.layoutElement(cell.getElement(), column); + _this57.layoutElement(cell.getElement(), column); } }); @@ -19471,7 +18351,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol var cell = row.getCell(column); if (cell) { - _this67.layoutElement(cell.getElement(), column); + _this57.layoutElement(cell.getElement(), column); } }); }; @@ -19493,9 +18373,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol FrozenColumns.prototype._calcSpace = function (columns, index) { var width = 0; - for (var _i12 = 0; _i12 < index; _i12++) { - if (columns[_i12].visible) { - width += columns[_i12].getWidth(); + for (var _i8 = 0; _i8 < index; _i8++) { + if (columns[_i8].visible) { + width += columns[_i8].getWidth(); } } @@ -19573,10 +18453,13 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol row.modules.frozen = false; - this.detachRow(row); + var rowEl = row.getElement(); + rowEl.parentNode.removeChild(rowEl); this.table.rowManager.adjustTableSize(); + this.rows.splice(index, 1); + this.table.rowManager.refreshActiveData("display"); if (this.rows.length) { @@ -19587,17 +18470,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol } }; - FrozenRows.prototype.detachRow = function (row) { - var index = this.rows.indexOf(row); - - if (index > -1) { - var rowEl = row.getElement(); - rowEl.parentNode.removeChild(rowEl); - - this.rows.splice(index, 1); - } - }; - FrozenRows.prototype.styleRows = function (row) { var self = this; @@ -19738,12 +18610,12 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; Group.prototype.createValueGroups = function () { - var _this68 = this; + var _this58 = this; var level = this.level + 1; if (this.groupManager.allowedValues && this.groupManager.allowedValues[level]) { this.groupManager.allowedValues[level].forEach(function (value) { - _this68._createGroup(value, level); + _this58._createGroup(value, level); }); } }; @@ -19774,7 +18646,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }); } - if ((self.groupManager.table.options.groupContextMenu || self.groupManager.table.options.groupClickMenu) && self.groupManager.table.modExists("menu")) { + if (self.groupManager.table.options.groupContextMenu && self.groupManager.table.modExists("menu")) { self.groupManager.table.modules.menu.initializeGroup.call(self.groupManager.table.modules.menu, self); } @@ -20253,15 +19125,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol this.element.insertBefore(this.arrowElement, this.element.firstChild); }; - Group.prototype.getPath = function () { - var path = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; - - path.unshift(this.key); - if (this.parent) { - this.parent.getPath(path); - } - return path; - }; ////////////// Standard Row Functions ////////////// Group.prototype.getElement = function () { @@ -20503,7 +19366,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; GroupRows.prototype.getChildGroups = function (group) { - var _this69 = this; + var _this59 = this; var groupComponents = []; @@ -20513,7 +19376,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol group.groupList.forEach(function (child) { if (child.groupList.length) { - groupComponents = groupComponents.concat(_this69.getChildGroups(child)); + groupComponents = groupComponents.concat(_this59.getChildGroups(child)); } else { groupComponents.push(child); } @@ -20654,32 +19517,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol return !newGroupNeeded; }; - GroupRows.prototype.reassignRowToGroup = function (row) { - var oldRowGroup = row.getGroup(), - oldGroupPath = oldRowGroup.getPath(), - newGroupPath = this.getExpectedPath(row), - samePath = true; - // figure out if new group path is the same as old group path - var samePath = oldGroupPath.length == newGroupPath.length && oldGroupPath.every(function (element, index) { - return element === newGroupPath[index]; - }); - // refresh if they new path and old path aren't the same (aka the row's groupings have changed) - if (!samePath) { - oldRowGroup.removeRow(row); - this.assignRowToGroup(row, self.groups); - this.table.rowManager.refreshActiveData("group", false, true); - } - }; - - GroupRows.prototype.getExpectedPath = function (row) { - var groupPath = [], - rowData = row.getData(); - this.groupIDLookups.forEach(function (groupId) { - groupPath.push(groupId.func(rowData)); - }); - return groupPath; - }; - GroupRows.prototype.updateGroupRows = function (force) { var self = this, output = [], @@ -20705,10 +19542,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; GroupRows.prototype.scrollHeaders = function (left) { - if (this.table.options.virtualDomHoz) { - left -= this.table.vdomHoz.vDomPadLeft; - } - left = left + "px"; this.groupList.forEach(function (group) { @@ -20765,21 +19598,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol return this.history.length - (this.index + 1); }; - History.prototype.clearComponentHistory = function (component) { - var index = this.history.findIndex(function (item) { - return item.component === component; - }); - - if (index > -1) { - this.history.splice(index, 1); - if (index <= this.index) { - this.index--; - } - - this.clearComponentHistory(component); - } - }; - History.prototype.undo = function () { if (this.index > -1) { @@ -21107,13 +19925,13 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; Keybindings.prototype.mapBindings = function (bindings) { - var _this70 = this; + var _this60 = this; var self = this; var _loop2 = function _loop2(key) { - if (_this70.actions[key]) { + if (_this60.actions[key]) { if (bindings[key]) { @@ -21470,18 +20288,19 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; Menu.prototype.initializeColumnHeader = function (column) { - var _this71 = this; + var _this61 = this; var headerMenuEl; if (column.definition.headerContextMenu) { - column.getElement().addEventListener("contextmenu", this.LoadMenuEvent.bind(this, column, column.definition.headerContextMenu)); - this.tapHold(column, column.definition.headerContextMenu); - } + column.getElement().addEventListener("contextmenu", function (e) { + var menu = typeof column.definition.headerContextMenu == "function" ? column.definition.headerContextMenu(column.getComponent()) : column.definition.headerContextMenu; - // if(column.definition.headerClickMenu){ - // column.getElement().addEventListener("click", this.LoadMenuEvent.bind(this, column, column.definition.headerClickMenu)); - // } + e.preventDefault(); + + _this61.loadMenu(e, column, menu); + }); + } if (column.definition.headerMenu) { @@ -21490,99 +20309,55 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol headerMenuEl.innerHTML = "⋮"; headerMenuEl.addEventListener("click", function (e) { - var menu = typeof column.definition.headerMenu == "function" ? column.definition.headerMenu(column.getComponent(), e) : column.definition.headerMenu; + var menu = typeof column.definition.headerMenu == "function" ? column.definition.headerMenu(column.getComponent()) : column.definition.headerMenu; e.stopPropagation(); e.preventDefault(); - _this71.loadMenu(e, column, menu); + _this61.loadMenu(e, column, menu); }); column.titleElement.insertBefore(headerMenuEl, column.titleElement.firstChild); } }; - Menu.prototype.LoadMenuEvent = function (component, menu, e) { - menu = typeof menu == "function" ? menu(component.getComponent(), e) : menu; - - // if(component instanceof Cell){ - // e.stopImmediatePropagation(); - // } - - this.loadMenu(e, component, menu); - }; - - Menu.prototype.tapHold = function (component, menu) { - var _this72 = this; - - var element = component.getElement(), - tapHold = null, - loaded = false; - - element.addEventListener("touchstart", function (e) { - clearTimeout(tapHold); - loaded = false; - - tapHold = setTimeout(function () { - clearTimeout(tapHold); - tapHold = null; - loaded = true; + Menu.prototype.initializeCell = function (cell) { + var _this62 = this; - _this72.LoadMenuEvent(component, menu, e); - }, 1000); - }, { passive: true }); + cell.getElement().addEventListener("contextmenu", function (e) { + var menu = typeof cell.column.definition.contextMenu == "function" ? cell.column.definition.contextMenu(cell.getComponent()) : cell.column.definition.contextMenu; - element.addEventListener("touchend", function (e) { - clearTimeout(tapHold); - tapHold = null; + e.stopImmediatePropagation(); - if (loaded) { - e.preventDefault(); - } + _this62.loadMenu(e, cell, menu); }); }; - Menu.prototype.initializeCell = function (cell) { - if (cell.column.definition.contextMenu) { - cell.getElement().addEventListener("contextmenu", this.LoadMenuEvent.bind(this, cell, cell.column.definition.contextMenu)); - this.tapHold(cell, cell.column.definition.contextMenu); - } - - if (cell.column.definition.clickMenu) { - cell.getElement().addEventListener("click", this.LoadMenuEvent.bind(this, cell, cell.column.definition.clickMenu)); - } - }; - Menu.prototype.initializeRow = function (row) { - if (this.table.options.rowContextMenu) { - row.getElement().addEventListener("contextmenu", this.LoadMenuEvent.bind(this, row, this.table.options.rowContextMenu)); - this.tapHold(row, this.table.options.rowContextMenu); - } + var _this63 = this; - if (this.table.options.rowClickMenu) { - row.getElement().addEventListener("click", this.LoadMenuEvent.bind(this, row, this.table.options.rowClickMenu)); - } + row.getElement().addEventListener("contextmenu", function (e) { + var menu = typeof _this63.table.options.rowContextMenu == "function" ? _this63.table.options.rowContextMenu(row.getComponent()) : _this63.table.options.rowContextMenu; + + _this63.loadMenu(e, row, menu); + }); }; Menu.prototype.initializeGroup = function (group) { - if (this.table.options.groupContextMenu) { - group.getElement().addEventListener("contextmenu", this.LoadMenuEvent.bind(this, group, this.table.options.groupContextMenu)); - this.tapHold(group, this.table.options.groupContextMenu); - } + var _this64 = this; - if (this.table.options.groupClickMenu) { - group.getElement().addEventListener("click", this.LoadMenuEvent.bind(this, group, this.table.options.groupClickMenu)); - } + group.getElement().addEventListener("contextmenu", function (e) { + var menu = typeof _this64.table.options.groupContextMenu == "function" ? _this64.table.options.groupContextMenu(group.getComponent()) : _this64.table.options.groupContextMenu; + + _this64.loadMenu(e, group, menu); + }); }; Menu.prototype.loadMenu = function (e, component, menu) { - var _this73 = this; + var _this65 = this; - var docHeight = Math.max(document.body.offsetHeight, window.innerHeight), - touch = !(e instanceof MouseEvent); + var docHeight = Math.max(document.body.offsetHeight, window.innerHeight); - if (!touch) { - e.preventDefault(); - } + e.preventDefault(); //abort if no menu set if (!menu || !menu.length) { @@ -21596,7 +20371,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol } } else { this.nestedMenuBlock = setTimeout(function () { - _this73.nestedMenuBlock = false; + _this65.nestedMenuBlock = false; }, 100); } @@ -21636,25 +20411,27 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }); } else { itemEl.addEventListener("click", function (e) { - _this73.hideMenu(); + _this65.hideMenu(); item.action(e, component.getComponent()); }); } } - _this73.menuEl.appendChild(itemEl); + _this65.menuEl.appendChild(itemEl); }); - this.menuEl.style.top = (touch ? e.touches[0].pageY : e.pageY) + "px"; - this.menuEl.style.left = (touch ? e.touches[0].pageX : e.pageX) + "px"; + this.menuEl.style.top = e.pageY + "px"; + this.menuEl.style.left = e.pageX + "px"; + + document.body.addEventListener("click", this.blurEvent); + this.table.rowManager.element.addEventListener("scroll", this.blurEvent); setTimeout(function () { - _this73.table.rowManager.element.addEventListener("scroll", _this73.blurEvent); - document.body.addEventListener("click", _this73.blurEvent); - document.body.addEventListener("contextmenu", _this73.blurEvent); - document.body.addEventListener("keydown", _this73.escEvent); + document.body.addEventListener("contextmenu", _this65.blurEvent); }, 100); + document.body.addEventListener("keydown", this.escEvent); + document.body.appendChild(this.menuEl); //move menu to start on right edge if it is too close to the edge of the screen @@ -22386,7 +21163,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //establish connection with other tables MoveRows.prototype.connectToTables = function (row) { - var _this74 = this; + var _this66 = this; var connectionTables; @@ -22410,15 +21187,15 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol this.connectionSelectorsElements.forEach(function (query) { if (typeof query === "string") { - _this74.connectionElements = _this74.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(query))); + _this66.connectionElements = _this66.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(query))); } else { - _this74.connectionElements.push(query); + _this66.connectionElements.push(query); } }); this.connectionElements.forEach(function (element) { var dropEvent = function dropEvent(e) { - _this74.elementRowDrop(e, element, _this74.moving); + _this66.elementRowDrop(e, element, _this66.moving); }; element.addEventListener("mouseup", dropEvent); @@ -22792,7 +21569,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; Page.prototype.generatePageSizeSelectList = function () { - var _this75 = this; + var _this67 = this; var pageSizes = []; @@ -22810,8 +21587,8 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol if (this.pageSizes.indexOf(this.size) == -1) { pageSizes = []; - for (var _i13 = 1; _i13 < 5; _i13++) { - pageSizes.push(this.size * _i13); + for (var _i9 = 1; _i9 < 5; _i9++) { + pageSizes.push(this.size * _i9); } this.pageSizes = pageSizes; @@ -22827,14 +21604,14 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol itemEl.value = item; if (item === true) { - _this75.table.modules.localize.bind("pagination|all", function (value) { + _this67.table.modules.localize.bind("pagination|all", function (value) { itemEl.innerHTML = value; }); } else { itemEl.innerHTML = item; } - _this75.pageSizeSelect.appendChild(itemEl); + _this67.pageSizeSelect.appendChild(itemEl); }); this.pageSizeSelect.value = this.size; @@ -22896,11 +21673,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //click bindings self.firstBut.addEventListener("click", function () { - self.setPage(1).then(function () {}).catch(function () {}); + self.setPage(1); }); self.prevBut.addEventListener("click", function () { - self.previousPage().then(function () {}).catch(function () {}); + self.previousPage(); }); self.nextBut.addEventListener("click", function () { @@ -22908,7 +21685,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }); self.lastBut.addEventListener("click", function () { - self.setPage(self.max).then(function () {}).catch(function () {}); + self.setPage(self.max); }); if (self.table.options.paginationElement) { @@ -23028,7 +21805,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //set current page number Page.prototype.setPage = function (page) { - var _this76 = this; + var _this68 = this; var self = this; @@ -23054,9 +21831,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol page = parseInt(page); - if (page > 0 && page <= _this76.max) { - _this76.page = page; - _this76.trigger().then(function () { + if (page > 0 && page <= _this68.max) { + _this68.page = page; + _this68.trigger().then(function () { resolve(); }).catch(function () { reject(); @@ -23066,24 +21843,24 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol self.table.modules.persistence.save("page"); } } else { - console.warn("Pagination Error - Requested page is out of range of 1 - " + _this76.max + ":", page); + console.warn("Pagination Error - Requested page is out of range of 1 - " + _this68.max + ":", page); reject(); } }); }; Page.prototype.setPageToRow = function (row) { - var _this77 = this; + var _this69 = this; return new Promise(function (resolve, reject) { - var rows = _this77.table.rowManager.getDisplayRows(_this77.displayIndex - 1); + var rows = _this69.table.rowManager.getDisplayRows(_this69.displayIndex - 1); var index = rows.indexOf(row); if (index > -1) { - var page = _this77.size === true ? 1 : Math.ceil((index + 1) / _this77.size); + var page = _this69.size === true ? 1 : Math.ceil((index + 1) / _this69.size); - _this77.setPage(page).then(function () { + _this69.setPage(page).then(function () { resolve(); }).catch(function () { reject(); @@ -23141,9 +21918,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol self.nextBut.disabled = false; } - for (var _i14 = min; _i14 <= max; _i14++) { - if (_i14 > 0 && _i14 <= self.max) { - self.pagesElement.appendChild(self._generatePageButton(_i14)); + for (var _i10 = min; _i10 <= max; _i10++) { + if (_i10 > 0 && _i10 <= self.max) { + self.pagesElement.appendChild(self._generatePageButton(_i10)); } } @@ -23171,7 +21948,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol button.textContent = page; button.addEventListener("click", function (e) { - self.setPage(page).then(function () {}).catch(function () {}); + self.setPage(page); }); return button; @@ -23179,19 +21956,19 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //previous page Page.prototype.previousPage = function () { - var _this78 = this; + var _this70 = this; return new Promise(function (resolve, reject) { - if (_this78.page > 1) { - _this78.page--; - _this78.trigger().then(function () { + if (_this70.page > 1) { + _this70.page--; + _this70.trigger().then(function () { resolve(); }).catch(function () { reject(); }); - if (_this78.table.options.persistence && _this78.table.modExists("persistence", true) && _this78.table.modules.persistence.config.page) { - _this78.table.modules.persistence.save("page"); + if (_this70.table.options.persistence && _this70.table.modExists("persistence", true) && _this70.table.modules.persistence.config.page) { + _this70.table.modules.persistence.save("page"); } } else { console.warn("Pagination Error - Previous page would be less than page 1:", 0); @@ -23202,23 +21979,23 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //next page Page.prototype.nextPage = function () { - var _this79 = this; + var _this71 = this; return new Promise(function (resolve, reject) { - if (_this79.page < _this79.max) { - _this79.page++; - _this79.trigger().then(function () { + if (_this71.page < _this71.max) { + _this71.page++; + _this71.trigger().then(function () { resolve(); }).catch(function () { reject(); }); - if (_this79.table.options.persistence && _this79.table.modExists("persistence", true) && _this79.table.modules.persistence.config.page) { - _this79.table.modules.persistence.save("page"); + if (_this71.table.options.persistence && _this71.table.modExists("persistence", true) && _this71.table.modules.persistence.config.page) { + _this71.table.modules.persistence.save("page"); } } else { - if (!_this79.progressiveLoad) { - console.warn("Pagination Error - Next page would be greater than maximum page of " + _this79.max + ":", _this79.max + 1); + if (!_this71.progressiveLoad) { + console.warn("Pagination Error - Next page would be greater than maximum page of " + _this71.max + ":", _this71.max + 1); } reject(); } @@ -23252,7 +22029,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol if (this.size === true) { start = 0; - end = data.length; + end = data.length - 1; } else { start = this.size * (this.page - 1); end = start + parseInt(this.size); @@ -23260,9 +22037,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol this._setPageButtons(); - for (var _i15 = start; _i15 < end; _i15++) { - if (data[_i15]) { - output.push(data[_i15]); + for (var _i11 = start; _i11 < end; _i11++) { + if (data[_i11]) { + output.push(data[_i11]); } } @@ -23276,28 +22053,28 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; Page.prototype.trigger = function () { - var _this80 = this; + var _this72 = this; var left; return new Promise(function (resolve, reject) { - switch (_this80.mode) { + switch (_this72.mode) { case "local": - left = _this80.table.rowManager.scrollLeft; + left = _this72.table.rowManager.scrollLeft; - _this80.table.rowManager.refreshActiveData("page"); - _this80.table.rowManager.scrollHorizontal(left); + _this72.table.rowManager.refreshActiveData("page"); + _this72.table.rowManager.scrollHorizontal(left); - _this80.table.options.pageLoaded.call(_this80.table, _this80.getPage()); + _this72.table.options.pageLoaded.call(_this72.table, _this72.getPage()); resolve(); break; case "remote": case "progressive_load": case "progressive_scroll": - _this80.table.modules.ajax.blockActiveRequest(); - _this80._getRemotePage().then(function () { + _this72.table.modules.ajax.blockActiveRequest(); + _this72._getRemotePage().then(function () { resolve(); }).catch(function () { reject(); @@ -23305,14 +22082,14 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol break; default: - console.warn("Pagination Error - no such pagination mode:", _this80.mode); + console.warn("Pagination Error - no such pagination mode:", _this72.mode); reject(); } }); }; Page.prototype._getRemotePage = function () { - var _this81 = this; + var _this73 = this; var self = this, oldParams, @@ -23329,33 +22106,33 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol pageParams = self.table.modules.ajax.getParams(); //configure request params - pageParams[_this81.dataSentNames.page] = self.page; + pageParams[_this73.dataSentNames.page] = self.page; //set page size if defined - if (_this81.size) { - pageParams[_this81.dataSentNames.size] = _this81.size; + if (_this73.size) { + pageParams[_this73.dataSentNames.size] = _this73.size; } //set sort data if defined - if (_this81.table.options.ajaxSorting && _this81.table.modExists("sort")) { + if (_this73.table.options.ajaxSorting && _this73.table.modExists("sort")) { var sorters = self.table.modules.sort.getSort(); sorters.forEach(function (item) { delete item.column; }); - pageParams[_this81.dataSentNames.sorters] = sorters; + pageParams[_this73.dataSentNames.sorters] = sorters; } //set filter data if defined - if (_this81.table.options.ajaxFiltering && _this81.table.modExists("filter")) { + if (_this73.table.options.ajaxFiltering && _this73.table.modExists("filter")) { var filters = self.table.modules.filter.getFilters(true, true); - pageParams[_this81.dataSentNames.filters] = filters; + pageParams[_this73.dataSentNames.filters] = filters; } self.table.modules.ajax.setParams(pageParams); - self.table.modules.ajax.sendRequest(_this81.progressiveLoad).then(function (data) { + self.table.modules.ajax.sendRequest(_this73.progressiveLoad).then(function (data) { self._parseRemoteData(data); resolve(); }).catch(function (e) { @@ -23746,8 +22523,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; Persistence.prototype.getGroupConfig = function () { - var data = {}; - if (this.config.group) { if (this.config.group === true || this.config.group.groupBy) { data.groupBy = this.table.options.groupBy; @@ -23784,8 +22559,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //parse columns for data to store Persistence.prototype.parseColumns = function (columns) { var self = this, - definitions = [], - excludedKeys = ["headerContextMenu", "headerMenu", "contextMenu", "clickMenu"]; + definitions = []; columns.forEach(function (column) { var defStore = {}, @@ -23816,9 +22590,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol break; default: - if (typeof colDef[key] !== "function" && excludedKeys.indexOf(key) === -1) { - defStore[key] = colDef[key]; - } + defStore[key] = colDef[key]; } }); } @@ -24142,7 +22914,8 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; ReactiveData.prototype.watchRow = function (row) { - var data = row.getData(); + var self = this, + data = row.getData(); this.blocked = true; @@ -24150,98 +22923,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol this.watchKey(row, data, key); } - if (this.table.options.dataTree) { - this.watchTreeChildren(row); - } - this.blocked = false; }; - ReactiveData.prototype.watchTreeChildren = function (row) { - var self = this, - childField = row.getData()[this.table.options.dataTreeChildField], - origFuncs = {}; - - function rebuildTree() { - self.table.modules.dataTree.initializeRow(row); - self.table.modules.dataTree.layoutRow(row); - self.table.rowManager.refreshActiveData("tree", false, true); - } - - if (childField) { - - origFuncs.push = childField.push; - - Object.defineProperty(childField, "push", { - enumerable: false, - configurable: true, - value: function value() { - var result = origFuncs.push.apply(childField, arguments); - - rebuildTree(); - - return result; - } - }); - - origFuncs.unshift = childField.unshift; - - Object.defineProperty(childField, "unshift", { - enumerable: false, - configurable: true, - value: function value() { - var result = origFuncs.unshift.apply(childField, arguments); - - rebuildTree(); - - return result; - } - }); - - origFuncs.shift = childField.shift; - - Object.defineProperty(childField, "shift", { - enumerable: false, - configurable: true, - value: function value() { - var result = origFuncs.shift.call(childField); - - rebuildTree(); - - return result; - } - }); - - origFuncs.pop = childField.pop; - - Object.defineProperty(childField, "pop", { - enumerable: false, - configurable: true, - value: function value() { - var result = origFuncs.pop.call(childField); - - rebuildTree(); - - return result; - } - }); - - origFuncs.splice = childField.splice; - - Object.defineProperty(childField, "splice", { - enumerable: false, - configurable: true, - value: function value() { - var result = origFuncs.splice.apply(childField, arguments); - - rebuildTree(); - - return result; - } - }); - } - }; - ReactiveData.prototype.watchKey = function (row, data, key) { var self = this, props = Object.getOwnPropertyDescriptor(data, key), @@ -24403,15 +23087,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol function mouseMove(e) { // self.table.columnManager.tempScrollBlock(); - if (self.table.rtl) { - column.setWidth(self.startWidth - ((typeof e.screenX === "undefined" ? e.touches[0].screenX : e.screenX) - self.startX)); - } else { - column.setWidth(self.startWidth + ((typeof e.screenX === "undefined" ? e.touches[0].screenX : e.screenX) - self.startX)); - } - - if (self.table.options.virtualDomHoz) { - self.table.vdomHoz.reinitialize(true); - } + column.setWidth(self.startWidth + ((typeof e.screenX === "undefined" ? e.touches[0].screenX : e.screenX) - self.startX)); if (!self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight) { column.checkCellHeights(); @@ -24572,7 +23248,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }; ResizeTable.prototype.initialize = function (row) { - var _this82 = this; + var _this74 = this; var table = this.table, tableStyle; @@ -24595,17 +23271,13 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol var nodeHeight = Math.floor(entry[0].contentRect.height); var nodeWidth = Math.floor(entry[0].contentRect.width); - if (_this82.tableHeight != nodeHeight || _this82.tableWidth != nodeWidth) { - _this82.tableHeight = nodeHeight; - _this82.tableWidth = nodeWidth; + if (_this74.tableHeight != nodeHeight || _this74.tableWidth != nodeWidth) { + _this74.tableHeight = nodeHeight; + _this74.tableWidth = nodeWidth; if (table.element.parentNode) { - _this82.containerHeight = table.element.parentNode.clientHeight; - _this82.containerWidth = table.element.parentNode.clientWidth; - } - - if (table.options.virtualDomHoz) { - table.vdomHoz.reinitialize(true); + _this74.containerHeight = table.element.parentNode.clientHeight; + _this74.containerWidth = table.element.parentNode.clientWidth; } table.redraw(); @@ -24625,15 +23297,13 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol var nodeHeight = Math.floor(entry[0].contentRect.height); var nodeWidth = Math.floor(entry[0].contentRect.width); - if (_this82.containerHeight != nodeHeight || _this82.containerWidth != nodeWidth) { - _this82.containerHeight = nodeHeight; - _this82.containerWidth = nodeWidth; - _this82.tableHeight = table.element.clientHeight; - _this82.tableWidth = table.element.clientWidth; - } + if (_this74.containerHeight != nodeHeight || _this74.containerWidth != nodeWidth) { + _this74.containerHeight = nodeHeight; + _this74.containerWidth = nodeWidth; + _this74.tableHeight = table.element.clientHeight; + _this74.tableWidth = table.element.clientWidth; - if (table.options.virtualDomHoz) { - table.vdomHoz.reinitialize(true); + table.redraw(); } table.redraw(); @@ -24645,10 +23315,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol } else { this.binding = function () { if (!table.browserMobile || table.browserMobile && !table.modules.edit.currentCell) { - if (table.options.virtualDomHoz) { - table.vdomHoz.reinitialize(true); - } - table.redraw(); } }; @@ -24721,16 +23387,16 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol } //assign collapse column - for (var _iterator = this.table.columnManager.columnsByIndex, _isArray = Array.isArray(_iterator), _i16 = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + for (var _iterator = this.table.columnManager.columnsByIndex, _isArray = Array.isArray(_iterator), _i12 = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { var _ref; if (_isArray) { - if (_i16 >= _iterator.length) break; - _ref = _iterator[_i16++]; + if (_i12 >= _iterator.length) break; + _ref = _iterator[_i12++]; } else { - _i16 = _iterator.next(); - if (_i16.done) break; - _ref = _i16.value; + _i12 = _iterator.next(); + if (_i12.done) break; + _ref = _i12.value; } var col = _ref; @@ -25130,14 +23796,14 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //select a number of rows SelectRow.prototype.selectRows = function (rows) { - var _this83 = this; + var _this75 = this; var rowMatch; switch (typeof rows === 'undefined' ? 'undefined' : _typeof(rows)) { case "undefined": this.table.rowManager.rows.forEach(function (row) { - _this83._selectRow(row, true, true); + _this75._selectRow(row, true, true); }); this._rowSelectionChanged(); @@ -25151,7 +23817,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol this._selectRow(rowMatch, true, true); } else { this.table.rowManager.getRows(rows).forEach(function (row) { - _this83._selectRow(row, true, true); + _this75._selectRow(row, true, true); }); } @@ -25161,7 +23827,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol default: if (Array.isArray(rows)) { rows.forEach(function (row) { - _this83._selectRow(row, true, true); + _this75._selectRow(row, true, true); }); this._rowSelectionChanged(); @@ -25233,7 +23899,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol rowCount = self.selectedRows.length; - for (var _i17 = 0; _i17 < rowCount; _i17++) { + for (var _i13 = 0; _i13 < rowCount; _i13++) { self._deselectRow(self.selectedRows[0], true); } @@ -25348,16 +24014,16 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol var children = this.table.modules.dataTree.getChildren(row); if (select) { - for (var _iterator2 = children, _isArray2 = Array.isArray(_iterator2), _i18 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + for (var _iterator2 = children, _isArray2 = Array.isArray(_iterator2), _i14 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { var _ref2; if (_isArray2) { - if (_i18 >= _iterator2.length) break; - _ref2 = _iterator2[_i18++]; + if (_i14 >= _iterator2.length) break; + _ref2 = _iterator2[_i14++]; } else { - _i18 = _iterator2.next(); - if (_i18.done) break; - _ref2 = _i18.value; + _i14 = _iterator2.next(); + if (_i14.done) break; + _ref2 = _i14.value; } var child = _ref2; @@ -25365,16 +24031,16 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol this._selectRow(child, true); } } else { - for (var _iterator3 = children, _isArray3 = Array.isArray(_iterator3), _i19 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { + for (var _iterator3 = children, _isArray3 = Array.isArray(_iterator3), _i15 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { var _ref3; if (_isArray3) { - if (_i19 >= _iterator3.length) break; - _ref3 = _iterator3[_i19++]; + if (_i15 >= _iterator3.length) break; + _ref3 = _iterator3[_i15++]; } else { - _i19 = _iterator3.next(); - if (_i19.done) break; - _ref3 = _i19.value; + _i15 = _iterator3.next(); + if (_i15.done) break; + _ref3 = _i15.value; } var _child = _ref3; @@ -25427,19 +24093,10 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol colEl.classList.add("tabulator-sortable"); arrowEl = document.createElement("div"); - arrowEl.classList.add("tabulator-col-sorter"); - - if (_typeof(this.table.options.headerSortElement) == "object") { - arrowEl.appendChild(this.table.options.headerSortElement); - } else { - arrowEl.innerHTML = this.table.options.headerSortElement; - } - + arrowEl.classList.add("tabulator-arrow"); //create sorter arrow content.appendChild(arrowEl); - column.modules.sort.element = arrowEl; - //sort on click colEl.addEventListener("click", function (e) { var dir = "", @@ -25679,7 +24336,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol //sort each item in sort list Sort.prototype._sortItems = function (data, sortList) { - var _this84 = this; + var _this76 = this; var sorterCount = sortList.length - 1; @@ -25689,7 +24346,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol for (var i = sorterCount; i >= 0; i--) { var sortItem = sortList[i]; - result = _this84._sortRow(a, b, sortItem.column, sortItem.dir, sortItem.params); + result = _this76._sortRow(a, b, sortItem.column, sortItem.dir, sortItem.params); if (result !== 0) { break; @@ -26098,7 +24755,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol if (cell.modules.validate && cell.modules.validate.invalid) { - cell.getElement().classList.remove("tabulator-validation-fail"); + cell.element.classList.remove("tabulator-validation-fail"); cell.modules.validate.invalid = false; invalidIndex = this.invalidCells.indexOf(cell); diff --git a/admin/js/vendors/tabulator/js/tabulator.min.js b/admin/js/vendors/tabulator/js/tabulator.min.js new file mode 100644 index 0000000..425389a --- /dev/null +++ b/admin/js/vendors/tabulator/js/tabulator.min.js @@ -0,0 +1 @@ +var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj};!function(global,factory){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=factory():"function"==typeof define&&define.amd?define(factory):global.Tabulator=factory()}(this,(function(){"use strict";Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function value(predicate){if(null==this)throw new TypeError('"this" is null or not defined');var o=Object(this),len=o.length>>>0;if("function"!=typeof predicate)throw new TypeError("predicate must be a function");for(var thisArg=arguments[1],k=0;k>>0;if("function"!=typeof predicate)throw new TypeError("predicate must be a function");for(var thisArg=arguments[1],k=0;k>>0;if(0===len)return!1;var n=0|fromIndex,k=Math.max(n>=0?n:len-Math.abs(n),0);function sameValueZero(x,y){return x===y||"number"==typeof x&&"number"==typeof y&&isNaN(x)&&isNaN(y)}for(;kscrollWidth?(hozAdjust=left-scrollWidth,this.element.style.marginLeft=-hozAdjust+"px"):this.element.style.marginLeft=0,this.scrollLeft=left,this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.scrollHorizontal()},ColumnManager.prototype.generateColumnsFromRowData=function(data){var cols=[],row,sorter;if(data&&data.length){for(var key in row=data[0]){var col={field:key,title:key},value=row[key];switch(void 0===value?"undefined":_typeof(value)){case"undefined":sorter="string";break;case"boolean":sorter="boolean";break;case"object":sorter=Array.isArray(value)?"array":"string";break;default:sorter=isNaN(value)||""===value?value.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)?"alphanum":"string":"number"}col.sorter=sorter,cols.push(col)}this.table.options.columns=cols,this.setColumns(this.table.options.columns)}},ColumnManager.prototype.setColumns=function(cols,row){for(var self=this;self.headersElement.firstChild;)self.headersElement.removeChild(self.headersElement.firstChild);self.columns=[],self.columnsByIndex=[],self.columnsByField={},self.table.modExists("frozenColumns")&&self.table.modules.frozenColumns.reset(),cols.forEach((function(def,i){self._addColumn(def)})),self._reIndexColumns(),self.table.options.responsiveLayout&&self.table.modExists("responsiveLayout",!0)&&self.table.modules.responsiveLayout.initialize(),self.redraw(!0)},ColumnManager.prototype._addColumn=function(definition,before,nextToColumn){var column=new Column(definition,this),colEl=column.getElement(),index=nextToColumn?this.findColumnIndex(nextToColumn):nextToColumn;if(nextToColumn&&index>-1){var parentIndex=this.columns.indexOf(nextToColumn.getTopColumn()),nextEl=nextToColumn.getElement();before?(this.columns.splice(parentIndex,0,column),nextEl.parentNode.insertBefore(colEl,nextEl)):(this.columns.splice(parentIndex+1,0,column),nextEl.parentNode.insertBefore(colEl,nextEl.nextSibling))}else before?(this.columns.unshift(column),this.headersElement.insertBefore(column.getElement(),this.headersElement.firstChild)):(this.columns.push(column),this.headersElement.appendChild(column.getElement())),column.columnRendered();return column},ColumnManager.prototype.registerColumnField=function(col){col.definition.field&&(this.columnsByField[col.definition.field]=col)},ColumnManager.prototype.registerColumnPosition=function(col){this.columnsByIndex.push(col)},ColumnManager.prototype._reIndexColumns=function(){this.columnsByIndex=[],this.columns.forEach((function(column){column.reRegisterPosition()}))},ColumnManager.prototype._verticalAlignHeaders=function(){var self=this,minHeight=0;self.columns.forEach((function(column){var height;column.clearVerticalAlign(),(height=column.getHeight())>minHeight&&(minHeight=height)})),self.columns.forEach((function(column){column.verticalAlign(self.table.options.columnHeaderVertAlign,minHeight)})),self.rowManager.adjustTableSize()},ColumnManager.prototype.findColumn=function(subject){var self=this,match;return"object"!=(void 0===subject?"undefined":_typeof(subject))?this.columnsByField[subject]||!1:subject instanceof Column?subject:subject instanceof ColumnComponent?subject._getSelf()||!1:"undefined"!=typeof HTMLElement&&subject instanceof HTMLElement&&this.columns.find((function(column){return column.element===subject}))||!1},ColumnManager.prototype.getColumnByField=function(field){return this.columnsByField[field]},ColumnManager.prototype.getColumnsByFieldRoot=function(root){var _this=this,matches=[];return Object.keys(this.columnsByField).forEach((function(field){var fieldRoot;field.split(".")[0]===root&&matches.push(_this.columnsByField[field])})),matches},ColumnManager.prototype.getColumnByIndex=function(index){return this.columnsByIndex[index]},ColumnManager.prototype.getFirstVisibileColumn=function(index){var index;return(index=this.columnsByIndex.findIndex((function(col){return col.visible})))>-1&&this.columnsByIndex[index]},ColumnManager.prototype.getColumns=function(){return this.columns},ColumnManager.prototype.findColumnIndex=function(column){return this.columnsByIndex.findIndex((function(col){return column===col}))},ColumnManager.prototype.getRealColumns=function(){return this.columnsByIndex},ColumnManager.prototype.traverse=function(callback){var self=this;this.columnsByIndex.forEach((function(column,i){callback(column,i)}))},ColumnManager.prototype.getDefinitions=function(active){var self=this,output=[];return this.columnsByIndex.forEach((function(column){(!active||active&&column.visible)&&output.push(column.getDefinition())})),output},ColumnManager.prototype.getDefinitionTree=function(){var self=this,output=[];return this.columns.forEach((function(column){output.push(column.getDefinition(!0))})),output},ColumnManager.prototype.getComponents=function(structured){var self=this,output=[],columns;return(structured?this.columns:this.columnsByIndex).forEach((function(column){output.push(column.getComponent())})),output},ColumnManager.prototype.getWidth=function(){var width=0;return this.columnsByIndex.forEach((function(column){column.visible&&(width+=column.getWidth())})),width},ColumnManager.prototype.moveColumn=function(from,to,after){this.moveColumnActual(from,to,after),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),to.element.parentNode.insertBefore(from.element,to.element),after&&to.element.parentNode.insertBefore(to.element,from.element),this._verticalAlignHeaders(),this.table.rowManager.reinitialize()},ColumnManager.prototype.moveColumnActual=function(from,to,after){from.parent.isGroup?this._moveColumnInArray(from.parent.columns,from,to,after):this._moveColumnInArray(this.columns,from,to,after),this._moveColumnInArray(this.columnsByIndex,from,to,after,!0),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.table.options.columnMoved&&this.table.options.columnMoved.call(this.table,from.getComponent(),this.table.columnManager.getComponents()),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns")},ColumnManager.prototype._moveColumnInArray=function(columns,from,to,after,updateRows){var fromIndex=columns.indexOf(from),toIndex;fromIndex>-1&&(columns.splice(fromIndex,1),(toIndex=columns.indexOf(to))>-1?after&&(toIndex+=1):toIndex=fromIndex,columns.splice(toIndex,0,from),updateRows&&this.table.rowManager.rows.forEach((function(row){if(row.cells.length){var cell=row.cells.splice(fromIndex,1)[0];row.cells.splice(toIndex,0,cell)}})))},ColumnManager.prototype.scrollToColumn=function(column,position,ifVisible){var _this2=this,left=0,offset=0,adjust=0,colEl=column.getElement();return new Promise((function(resolve,reject){if(void 0===position&&(position=_this2.table.options.scrollToColumnPosition),void 0===ifVisible&&(ifVisible=_this2.table.options.scrollToColumnIfVisible),column.visible){switch(position){case"middle":case"center":adjust=-_this2.element.clientWidth/2;break;case"right":adjust=colEl.clientWidth-_this2.headersElement.clientWidth}if(!ifVisible&&(offset=colEl.offsetLeft)>0&&offset+colEl.offsetWidth<_this2.element.clientWidth)return!1;left=colEl.offsetLeft+_this2.element.scrollLeft+adjust,left=Math.max(Math.min(left,_this2.table.rowManager.element.scrollWidth-_this2.table.rowManager.element.clientWidth),0),_this2.table.rowManager.scrollHorizontal(left),_this2.scrollHorizontal(left),resolve()}else console.warn("Scroll Error - Column not visible"),reject("Scroll Error - Column not visible")}))},ColumnManager.prototype.generateCells=function(row){var self=this,cells=[];return this.columnsByIndex.forEach((function(column){cells.push(column.generateCell(row))})),cells},ColumnManager.prototype.getFlexBaseWidth=function(){var self=this,totalWidth=self.table.element.clientWidth,fixedWidth=0;return self.rowManager.element.scrollHeight>self.rowManager.element.clientHeight&&(totalWidth-=self.rowManager.element.offsetWidth-self.rowManager.element.clientWidth),this.columnsByIndex.forEach((function(column){var width,minWidth,colWidth;column.visible&&(width=column.definition.width||0,minWidth=void 0===column.minWidth?self.table.options.columnMinWidth:parseInt(column.minWidth),colWidth="string"==typeof width?width.indexOf("%")>-1?totalWidth/100*parseInt(width):parseInt(width):width,fixedWidth+=colWidth>minWidth?colWidth:minWidth)})),fixedWidth},ColumnManager.prototype.addColumn=function(definition,before,nextToColumn){var _this3=this;return new Promise((function(resolve,reject){var column=_this3._addColumn(definition,before,nextToColumn);_this3._reIndexColumns(),_this3.table.options.responsiveLayout&&_this3.table.modExists("responsiveLayout",!0)&&_this3.table.modules.responsiveLayout.initialize(),_this3.table.modExists("columnCalcs")&&_this3.table.modules.columnCalcs.recalc(_this3.table.rowManager.activeRows),_this3.redraw(),"fitColumns"!=_this3.table.modules.layout.getMode()&&column.reinitializeWidth(),_this3._verticalAlignHeaders(),_this3.table.rowManager.reinitialize(),resolve(column)}))},ColumnManager.prototype.deregisterColumn=function(column){var field=column.getField(),index;field&&delete this.columnsByField[field],(index=this.columnsByIndex.indexOf(column))>-1&&this.columnsByIndex.splice(index,1),(index=this.columns.indexOf(column))>-1&&this.columns.splice(index,1),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.redraw()},ColumnManager.prototype.redraw=function(force){force&&(Tabulator.prototype.helpers.elVisible(this.element)&&this._verticalAlignHeaders(),this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),["fitColumns","fitDataStretch"].indexOf(this.table.modules.layout.getMode())>-1?this.table.modules.layout.layout():force?this.table.modules.layout.layout():this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout(),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),force&&(this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns"),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.redraw()),this.table.footerManager.redraw()};var ColumnComponent=function ColumnComponent(column){this._column=column,this.type="ColumnComponent"};ColumnComponent.prototype.getElement=function(){return this._column.getElement()},ColumnComponent.prototype.getDefinition=function(){return this._column.getDefinition()},ColumnComponent.prototype.getField=function(){return this._column.getField()},ColumnComponent.prototype.getCells=function(){var cells=[];return this._column.cells.forEach((function(cell){cells.push(cell.getComponent())})),cells},ColumnComponent.prototype.getVisibility=function(){return console.warn("getVisibility function is deprecated, you should now use the isVisible function"),this._column.visible},ColumnComponent.prototype.isVisible=function(){return this._column.visible},ColumnComponent.prototype.show=function(){this._column.isGroup?this._column.columns.forEach((function(column){column.show()})):this._column.show()},ColumnComponent.prototype.hide=function(){this._column.isGroup?this._column.columns.forEach((function(column){column.hide()})):this._column.hide()},ColumnComponent.prototype.toggle=function(){this._column.visible?this.hide():this.show()},ColumnComponent.prototype.delete=function(){return this._column.delete()},ColumnComponent.prototype.getSubColumns=function(){var output=[];return this._column.columns.length&&this._column.columns.forEach((function(column){output.push(column.getComponent())})),output},ColumnComponent.prototype.getParentColumn=function(){return this._column.parent instanceof Column&&this._column.parent.getComponent()},ColumnComponent.prototype._getSelf=function(){return this._column},ColumnComponent.prototype.scrollTo=function(){return this._column.table.columnManager.scrollToColumn(this._column)},ColumnComponent.prototype.getTable=function(){return this._column.table},ColumnComponent.prototype.headerFilterFocus=function(){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterFocus(this._column)},ColumnComponent.prototype.reloadHeaderFilter=function(){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.reloadHeaderFilter(this._column)},ColumnComponent.prototype.getHeaderFilterValue=function(){if(this._column.table.modExists("filter",!0))return this._column.table.modules.filter.getHeaderFilterValue(this._column)},ColumnComponent.prototype.setHeaderFilterValue=function(value){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterValue(this._column,value)},ColumnComponent.prototype.move=function(to,after){var toColumn=this._column.table.columnManager.findColumn(to);toColumn?this._column.table.columnManager.moveColumn(this._column,toColumn,after):console.warn("Move Error - No matching column found:",toColumn)},ColumnComponent.prototype.getNextColumn=function(){var nextCol=this._column.nextColumn();return!!nextCol&&nextCol.getComponent()},ColumnComponent.prototype.getPrevColumn=function(){var prevCol=this._column.prevColumn();return!!prevCol&&prevCol.getComponent()},ColumnComponent.prototype.updateDefinition=function(updates){return this._column.updateDefinition(updates)},ColumnComponent.prototype.getWidth=function(){return this._column.getWidth()},ColumnComponent.prototype.setWidth=function(width){return!0===width?this._column.reinitializeWidth(!0):this._column.setWidth(width)},ColumnComponent.prototype.validate=function(){return this._column.validate()};var Column=function Column(def,parent){var self=this;this.table=parent.table,this.definition=def,this.parent=parent,this.type="column",this.columns=[],this.cells=[],this.element=this.createElement(),this.contentElement=!1,this.titleElement=!1,this.groupElement=this.createGroupElement(),this.isGroup=!1,this.tooltip=!1,this.hozAlign="",this.vertAlign="",this.field="",this.fieldStructure="",this.getFieldValue="",this.setFieldValue="",this.titleFormatterRendered=!1,this.setField(this.definition.field),this.table.options.invalidOptionWarnings&&this.checkDefinition(),this.modules={},this.cellEvents={cellClick:!1,cellDblClick:!1,cellContext:!1,cellTap:!1,cellDblTap:!1,cellTapHold:!1,cellMouseEnter:!1,cellMouseLeave:!1,cellMouseOver:!1,cellMouseOut:!1,cellMouseMove:!1},this.width=null,this.widthStyled="",this.minWidth=null,this.minWidthStyled="",this.widthFixed=!1,this.visible=!0,this.component=null,this._mapDepricatedFunctionality(),def.columns?(this.isGroup=!0,def.columns.forEach((function(def,i){var newCol=new Column(def,self);self.attachColumn(newCol)})),self.checkColumnVisibility()):parent.registerColumnField(this),def.rowHandle&&!1!==this.table.options.movableRows&&this.table.modExists("moveRow")&&this.table.modules.moveRow.setHandle(!0),this._buildHeader(),this.bindModuleColumns()};Column.prototype.createElement=function(){var el=document.createElement("div");return el.classList.add("tabulator-col"),el.setAttribute("role","columnheader"),el.setAttribute("aria-sort","none"),el},Column.prototype.createGroupElement=function(){var el=document.createElement("div");return el.classList.add("tabulator-col-group-cols"),el},Column.prototype.checkDefinition=function(){var _this4=this;Object.keys(this.definition).forEach((function(key){-1===_this4.defaultOptionList.indexOf(key)&&console.warn("Invalid column definition option in '"+(_this4.field||_this4.definition.title)+"' column:",key)}))},Column.prototype.setField=function(field){this.field=field,this.fieldStructure=field?this.table.options.nestedFieldSeparator?field.split(this.table.options.nestedFieldSeparator):[field]:[],this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData,this.setFieldValue=this.fieldStructure.length>1?this._setNestedData:this._setFlatData},Column.prototype.registerColumnPosition=function(column){this.parent.registerColumnPosition(column)},Column.prototype.registerColumnField=function(column){this.parent.registerColumnField(column)},Column.prototype.reRegisterPosition=function(){this.isGroup?this.columns.forEach((function(column){column.reRegisterPosition()})):this.registerColumnPosition(this)},Column.prototype._mapDepricatedFunctionality=function(){void 0!==this.definition.hideInHtml&&(this.definition.htmlOutput=!this.definition.hideInHtml,console.warn("hideInHtml column definition property is deprecated, you should now use htmlOutput")),void 0!==this.definition.align&&(this.definition.hozAlign=this.definition.align,console.warn("align column definition property is deprecated, you should now use hozAlign")),void 0!==this.definition.downloadTitle&&(this.definition.titleDownload=this.definition.downloadTitle,console.warn("downloadTitle definition property is deprecated, you should now use titleDownload"))},Column.prototype.setTooltip=function(){var self=this,def=self.definition,tooltip=def.headerTooltip||!1===def.tooltip?def.headerTooltip:self.table.options.tooltipsHeader;tooltip?!0===tooltip?def.field?self.table.modules.localize.bind("columns|"+def.field,(function(value){self.element.setAttribute("title",value||def.title)})):self.element.setAttribute("title",def.title):("function"==typeof tooltip&&!1===(tooltip=tooltip(self.getComponent()))&&(tooltip=""),self.element.setAttribute("title",tooltip)):self.element.setAttribute("title","")},Column.prototype._buildHeader=function(){for(var self=this,def=self.definition;self.element.firstChild;)self.element.removeChild(self.element.firstChild);def.headerVertical&&(self.element.classList.add("tabulator-col-vertical"),"flip"===def.headerVertical&&self.element.classList.add("tabulator-col-vertical-flip")),self.contentElement=self._bindEvents(),self.contentElement=self._buildColumnHeaderContent(),self.element.appendChild(self.contentElement),self.isGroup?self._buildGroupHeader():self._buildColumnHeader(),self.setTooltip(),self.table.options.resizableColumns&&self.table.modExists("resizeColumns")&&self.table.modules.resizeColumns.initializeColumn("header",self,self.element),def.headerFilter&&self.table.modExists("filter")&&self.table.modExists("edit")&&(void 0!==def.headerFilterPlaceholder&&def.field&&self.table.modules.localize.setHeaderFilterColumnPlaceholder(def.field,def.headerFilterPlaceholder),self.table.modules.filter.initializeColumn(self)),self.table.modExists("frozenColumns")&&self.table.modules.frozenColumns.initializeColumn(self),self.table.options.movableColumns&&!self.isGroup&&self.table.modExists("moveColumn")&&self.table.modules.moveColumn.initializeColumn(self),(def.topCalc||def.bottomCalc)&&self.table.modExists("columnCalcs")&&self.table.modules.columnCalcs.initializeColumn(self),self.table.modExists("persistence")&&self.table.modules.persistence.config.columns&&self.table.modules.persistence.initializeColumn(self),self.element.addEventListener("mouseenter",(function(e){self.setTooltip()}))},Column.prototype._bindEvents=function(){var self=this,def=self.definition,dblTap,tapHold,tap;"function"==typeof def.headerClick&&self.element.addEventListener("click",(function(e){def.headerClick(e,self.getComponent())})),"function"==typeof def.headerDblClick&&self.element.addEventListener("dblclick",(function(e){def.headerDblClick(e,self.getComponent())})),"function"==typeof def.headerContext&&self.element.addEventListener("contextmenu",(function(e){def.headerContext(e,self.getComponent())})),"function"==typeof def.headerTap&&(tap=!1,self.element.addEventListener("touchstart",(function(e){tap=!0}),{passive:!0}),self.element.addEventListener("touchend",(function(e){tap&&def.headerTap(e,self.getComponent()),tap=!1}))),"function"==typeof def.headerDblTap&&(dblTap=null,self.element.addEventListener("touchend",(function(e){dblTap?(clearTimeout(dblTap),dblTap=null,def.headerDblTap(e,self.getComponent())):dblTap=setTimeout((function(){clearTimeout(dblTap),dblTap=null}),300)}))),"function"==typeof def.headerTapHold&&(tapHold=null,self.element.addEventListener("touchstart",(function(e){clearTimeout(tapHold),tapHold=setTimeout((function(){clearTimeout(tapHold),tapHold=null,tap=!1,def.headerTapHold(e,self.getComponent())}),1e3)}),{passive:!0}),self.element.addEventListener("touchend",(function(e){clearTimeout(tapHold),tapHold=null}))),"function"==typeof def.cellClick&&(self.cellEvents.cellClick=def.cellClick),"function"==typeof def.cellDblClick&&(self.cellEvents.cellDblClick=def.cellDblClick),"function"==typeof def.cellContext&&(self.cellEvents.cellContext=def.cellContext),"function"==typeof def.cellMouseEnter&&(self.cellEvents.cellMouseEnter=def.cellMouseEnter),"function"==typeof def.cellMouseLeave&&(self.cellEvents.cellMouseLeave=def.cellMouseLeave),"function"==typeof def.cellMouseOver&&(self.cellEvents.cellMouseOver=def.cellMouseOver),"function"==typeof def.cellMouseOut&&(self.cellEvents.cellMouseOut=def.cellMouseOut),"function"==typeof def.cellMouseMove&&(self.cellEvents.cellMouseMove=def.cellMouseMove),"function"==typeof def.cellTap&&(self.cellEvents.cellTap=def.cellTap),"function"==typeof def.cellDblTap&&(self.cellEvents.cellDblTap=def.cellDblTap),"function"==typeof def.cellTapHold&&(self.cellEvents.cellTapHold=def.cellTapHold),"function"==typeof def.cellEdited&&(self.cellEvents.cellEdited=def.cellEdited),"function"==typeof def.cellEditing&&(self.cellEvents.cellEditing=def.cellEditing),"function"==typeof def.cellEditCancelled&&(self.cellEvents.cellEditCancelled=def.cellEditCancelled)},Column.prototype._buildColumnHeader=function(){var self=this,def=self.definition,table=self.table,sortable,classeNames;(table.modExists("sort")&&table.modules.sort.initializeColumn(self,self.contentElement),(def.headerContextMenu||def.headerMenu)&&table.modExists("menu")&&table.modules.menu.initializeColumnHeader(self),table.modExists("format")&&table.modules.format.initializeColumn(self),void 0!==def.editor&&table.modExists("edit")&&table.modules.edit.initializeColumn(self),void 0!==def.validator&&table.modExists("validate")&&table.modules.validate.initializeColumn(self),table.modExists("mutator")&&table.modules.mutator.initializeColumn(self),table.modExists("accessor")&&table.modules.accessor.initializeColumn(self),_typeof(table.options.responsiveLayout)&&table.modExists("responsiveLayout")&&table.modules.responsiveLayout.initializeColumn(self),void 0!==def.visible&&(def.visible?self.show(!0):self.hide(!0)),def.cssClass)&&def.cssClass.split(" ").forEach((function(className){self.element.classList.add(className)}));def.field&&this.element.setAttribute("tabulator-field",def.field),self.setMinWidth(void 0===def.minWidth?self.table.options.columnMinWidth:parseInt(def.minWidth)),self.reinitializeWidth(),self.tooltip=self.definition.tooltip||!1===self.definition.tooltip?self.definition.tooltip:self.table.options.tooltips,self.hozAlign=void 0===self.definition.hozAlign?self.table.options.cellHozAlign:self.definition.hozAlign,self.vertAlign=void 0===self.definition.vertAlign?self.table.options.cellVertAlign:self.definition.vertAlign},Column.prototype._buildColumnHeaderContent=function(){var def=this.definition,table=this.table,contentElement=document.createElement("div");return contentElement.classList.add("tabulator-col-content"),this.titleElement=this._buildColumnHeaderTitle(),contentElement.appendChild(this.titleElement),contentElement},Column.prototype._buildColumnHeaderTitle=function(){var self=this,def=self.definition,table=self.table,title,titleHolderElement=document.createElement("div");if(titleHolderElement.classList.add("tabulator-col-title"),def.editableTitle){var titleElement=document.createElement("input");titleElement.classList.add("tabulator-title-editor"),titleElement.addEventListener("click",(function(e){e.stopPropagation(),titleElement.focus()})),titleElement.addEventListener("change",(function(){def.title=titleElement.value,table.options.columnTitleChanged.call(self.table,self.getComponent())})),titleHolderElement.appendChild(titleElement),def.field?table.modules.localize.bind("columns|"+def.field,(function(text){titleElement.value=text||def.title||" "})):titleElement.value=def.title||" "}else def.field?table.modules.localize.bind("columns|"+def.field,(function(text){self._formatColumnHeaderTitle(titleHolderElement,text||def.title||" ")})):self._formatColumnHeaderTitle(titleHolderElement,def.title||" ");return titleHolderElement},Column.prototype._formatColumnHeaderTitle=function(el,title){var _this5=this,formatter,contents,params,mockCell,onRendered;if(this.definition.titleFormatter&&this.table.modExists("format"))switch(formatter=this.table.modules.format.getFormatter(this.definition.titleFormatter),onRendered=function onRendered(callback){_this5.titleFormatterRendered=callback},mockCell={getValue:function getValue(){return title},getElement:function getElement(){return el}},params="function"==typeof(params=this.definition.titleFormatterParams||{})?params():params,void 0===(contents=formatter.call(this.table.modules.format,mockCell,params,onRendered))?"undefined":_typeof(contents)){case"object":contents instanceof Node?el.appendChild(contents):(el.innerHTML="",console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",contents));break;case"undefined":case"null":el.innerHTML="";break;default:el.innerHTML=contents}else el.innerHTML=title},Column.prototype._buildGroupHeader=function(){var _this6=this,classeNames;(this.element.classList.add("tabulator-col-group"),this.element.setAttribute("role","columngroup"),this.element.setAttribute("aria-title",this.definition.title),this.definition.cssClass)&&this.definition.cssClass.split(" ").forEach((function(className){_this6.element.classList.add(className)}));(this.definition.headerContextMenu||this.definition.headerMenu)&&this.table.modExists("menu")&&this.table.modules.menu.initializeColumnHeader(this),this.element.appendChild(this.groupElement)},Column.prototype._getFlatData=function(data){return data[this.field]},Column.prototype._getNestedData=function(data){for(var dataObj=data,structure=this.fieldStructure,length=structure.length,output,_i=0;_i-1&&this._nextVisibleColumn(index+1)},Column.prototype._nextVisibleColumn=function(index){var column=this.table.columnManager.getColumnByIndex(index);return!column||column.visible?column:this._nextVisibleColumn(index+1)},Column.prototype.prevColumn=function(){var index=this.table.columnManager.findColumnIndex(this);return index>-1&&this._prevVisibleColumn(index-1)},Column.prototype._prevVisibleColumn=function(index){var column=this.table.columnManager.getColumnByIndex(index);return!column||column.visible?column:this._prevVisibleColumn(index-1)},Column.prototype.reinitializeWidth=function(force){this.widthFixed=!1,void 0===this.definition.width||force||this.setWidth(this.definition.width),this.table.modExists("filter")&&this.table.modules.filter.hideHeaderFilterElements(),this.fitToData(),this.table.modExists("filter")&&this.table.modules.filter.showHeaderFilterElements()},Column.prototype.fitToData=function(){var self=this;this.widthFixed||(this.element.style.width="",this.cells.forEach((function(cell){cell.clearWidth()})));var maxWidth=this.element.offsetWidth;this.width&&this.widthFixed||(this.cells.forEach((function(cell){var width=cell.getWidth();width>maxWidth&&(maxWidth=width)})),maxWidth&&this.setWidthActual(maxWidth+1))},Column.prototype.updateDefinition=function(updates){var _this8=this;return new Promise((function(resolve,reject){var definition;_this8.isGroup?(console.warn("Column Update Error - The updateDefintion function is only available on columns, not column groups"),reject("Column Update Error - The updateDefintion function is only available on columns, not column groups")):(definition=Object.assign({},_this8.getDefinition()),definition=Object.assign(definition,updates),_this8.table.columnManager.addColumn(definition,!1,_this8).then((function(column){definition.field==_this8.field&&(_this8.field=!1),_this8.delete().then((function(){resolve(column.getComponent())})).catch((function(err){reject(err)}))})).catch((function(err){reject(err)})))}))},Column.prototype.deleteCell=function(cell){var index=this.cells.indexOf(cell);index>-1&&this.cells.splice(index,1)},Column.prototype.defaultOptionList=["title","field","columns","visible","align","hozAlign","vertAlign","width","minWidth","widthGrow","widthShrink","resizable","frozen","responsive","tooltip","cssClass","rowHandle","hideInHtml","print","htmlOutput","sorter","sorterParams","formatter","formatterParams","variableHeight","editable","editor","editorParams","validator","mutator","mutatorParams","mutatorData","mutatorDataParams","mutatorEdit","mutatorEditParams","mutatorClipboard","mutatorClipboardParams","accessor","accessorParams","accessorData","accessorDataParams","accessorDownload","accessorDownloadParams","accessorClipboard","accessorClipboardParams","accessorPrint","accessorPrintParams","accessorHtmlOutput","accessorHtmlOutputParams","clipboard","download","downloadTitle","topCalc","topCalcParams","topCalcFormatter","topCalcFormatterParams","bottomCalc","bottomCalcParams","bottomCalcFormatter","bottomCalcFormatterParams","cellClick","cellDblClick","cellContext","cellTap","cellDblTap","cellTapHold","cellMouseEnter","cellMouseLeave","cellMouseOver","cellMouseOut","cellMouseMove","cellEditing","cellEdited","cellEditCancelled","headerSort","headerSortStartingDir","headerSortTristate","headerClick","headerDblClick","headerContext","headerTap","headerDblTap","headerTapHold","headerTooltip","headerVertical","editableTitle","titleFormatter","titleFormatterParams","headerFilter","headerFilterPlaceholder","headerFilterParams","headerFilterEmptyCheck","headerFilterFunc","headerFilterFuncParams","headerFilterLiveFilter","print","headerContextMenu","headerMenu","contextMenu","formatterPrint","formatterPrintParams","formatterClipboard","formatterClipboardParams","formatterHtmlOutput","formatterHtmlOutputParams","titlePrint","titleClipboard","titleHtmlOutput","titleDownload"],Column.prototype.getComponent=function(){return this.component||(this.component=new ColumnComponent(this)),this.component};var RowManager=function RowManager(table){this.table=table,this.element=this.createHolderElement(),this.tableElement=this.createTableElement(),this.heightFixer=this.createTableElement(),this.columnManager=null,this.height=0,this.firstRender=!1,this.renderMode="virtual",this.fixedHeight=!1,this.rows=[],this.activeRows=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.scrollTop=0,this.scrollLeft=0,this.vDomRowHeight=20,this.vDomTop=0,this.vDomBottom=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomMaxRenderChain=90,this.vDomWindowBuffer=0,this.vDomWindowMinTotalRows=20,this.vDomWindowMinMarginRows=5,this.vDomTopNewRows=[],this.vDomBottomNewRows=[],this.rowNumColumn=!1,this.redrawBlock=!1,this.redrawBlockRestoreConfig=!1,this.redrawBlockRederInPosition=!1};RowManager.prototype.createHolderElement=function(){var el=document.createElement("div");return el.classList.add("tabulator-tableHolder"),el.setAttribute("tabindex",0),el},RowManager.prototype.createTableElement=function(){var el=document.createElement("div");return el.classList.add("tabulator-table"),el},RowManager.prototype.getElement=function(){return this.element},RowManager.prototype.getTableElement=function(){return this.tableElement},RowManager.prototype.getRowPosition=function(row,active){return active?this.activeRows.indexOf(row):this.rows.indexOf(row)},RowManager.prototype.setColumnManager=function(manager){this.columnManager=manager},RowManager.prototype.initialize=function(){var self=this;self.setRenderMode(),self.element.appendChild(self.tableElement),self.firstRender=!0,self.element.addEventListener("scroll",(function(){var left=self.element.scrollLeft;self.scrollLeft!=left&&(self.columnManager.scrollHorizontal(left),self.table.options.groupBy&&self.table.modules.groupRows.scrollHeaders(left),self.table.modExists("columnCalcs")&&self.table.modules.columnCalcs.scrollHorizontal(left),self.table.options.scrollHorizontal(left)),self.scrollLeft=left})),"virtual"===this.renderMode&&self.element.addEventListener("scroll",(function(){var top=self.element.scrollTop,dir=self.scrollTop>top;self.scrollTop!=top?(self.scrollTop=top,self.scrollVertical(dir),"scroll"==self.table.options.ajaxProgressiveLoad&&self.table.modules.ajax.nextPage(self.element.scrollHeight-self.element.clientHeight-top),self.table.options.scrollVertical(top)):self.scrollTop=top}))},RowManager.prototype.findRow=function(subject){var self=this,_match,match;return"object"!=(void 0===subject?"undefined":_typeof(subject))?null!=subject&&(self.rows.find((function(row){return row.data[self.table.options.index]==subject}))||!1):subject instanceof Row?subject:subject instanceof RowComponent?subject._getSelf()||!1:"undefined"!=typeof HTMLElement&&subject instanceof HTMLElement&&self.rows.find((function(row){return row.element===subject}))||!1},RowManager.prototype.getRowFromDataObject=function(data){var match;return this.rows.find((function(row){return row.data===data}))||!1},RowManager.prototype.getRowFromPosition=function(position,active){return active?this.activeRows[position]:this.rows[position]},RowManager.prototype.scrollToRow=function(row,position,ifVisible){var _this9=this,rowIndex=this.getDisplayRows().indexOf(row),rowEl=row.getElement(),rowTop,offset=0;return new Promise((function(resolve,reject){if(rowIndex>-1){if(void 0===position&&(position=_this9.table.options.scrollToRowPosition),void 0===ifVisible&&(ifVisible=_this9.table.options.scrollToRowIfVisible),"nearest"===position)switch(_this9.renderMode){case"classic":rowTop=Tabulator.prototype.helpers.elOffset(rowEl).top,position=Math.abs(_this9.element.scrollTop-rowTop)>Math.abs(_this9.element.scrollTop+_this9.element.clientHeight-rowTop)?"bottom":"top";break;case"virtual":position=Math.abs(_this9.vDomTop-rowIndex)>Math.abs(_this9.vDomBottom-rowIndex)?"bottom":"top"}if(!ifVisible&&Tabulator.prototype.helpers.elVisible(rowEl)&&(offset=Tabulator.prototype.helpers.elOffset(rowEl).top-Tabulator.prototype.helpers.elOffset(_this9.element).top)>0&&offset<_this9.element.clientHeight-rowEl.offsetHeight)return!1;switch(_this9.renderMode){case"classic":_this9.element.scrollTop=Tabulator.prototype.helpers.elOffset(rowEl).top-Tabulator.prototype.helpers.elOffset(_this9.element).top+_this9.element.scrollTop;break;case"virtual":_this9._virtualRenderFill(rowIndex,!0)}switch(position){case"middle":case"center":_this9.element.scrollHeight-_this9.element.scrollTop==_this9.element.clientHeight?_this9.element.scrollTop=_this9.element.scrollTop+(rowEl.offsetTop-_this9.element.scrollTop)-(_this9.element.scrollHeight-rowEl.offsetTop)/2:_this9.element.scrollTop=_this9.element.scrollTop-_this9.element.clientHeight/2;break;case"bottom":_this9.element.scrollHeight-_this9.element.scrollTop==_this9.element.clientHeight?_this9.element.scrollTop=_this9.element.scrollTop-(_this9.element.scrollHeight-rowEl.offsetTop)+rowEl.offsetHeight:_this9.element.scrollTop=_this9.element.scrollTop-_this9.element.clientHeight+rowEl.offsetHeight}resolve()}else console.warn("Scroll Error - Row not visible"),reject("Scroll Error - Row not visible")}))},RowManager.prototype.setData=function(data,renderInPosition,columnsChanged){var _this10=this,self=this;return new Promise((function(resolve,reject){renderInPosition&&_this10.getDisplayRows().length?self.table.options.pagination?self._setDataActual(data,!0):_this10.reRenderInPosition((function(){self._setDataActual(data)})):(_this10.table.options.autoColumns&&columnsChanged&&_this10.table.columnManager.generateColumnsFromRowData(data),_this10.resetScroll(),_this10._setDataActual(data)),resolve()}))},RowManager.prototype._setDataActual=function(data,renderInPosition){var self=this;self.table.options.dataLoading.call(this.table,data),this._wipeElements(),this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.clear(),Array.isArray(data)?(this.table.modExists("selectRow")&&this.table.modules.selectRow.clearSelectionData(),this.table.options.reactiveData&&this.table.modExists("reactiveData",!0)&&this.table.modules.reactiveData.watchData(data),data.forEach((function(def,i){if(def&&"object"===(void 0===def?"undefined":_typeof(def))){var row=new Row(def,self);self.rows.push(row)}else console.warn("Data Loading Warning - Invalid row data detected and ignored, expecting object but received:",def)})),self.table.options.dataLoaded.call(this.table,data),self.refreshActiveData(!1,!1,renderInPosition)):console.error("Data Loading Error - Unable to process data due to invalid data type \nExpecting: array \nReceived: ",void 0===data?"undefined":_typeof(data),"\nData: ",data)},RowManager.prototype._wipeElements=function(){this.rows.forEach((function(row){row.wipe()})),this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.wipe(),this.rows=[]},RowManager.prototype.deleteRow=function(row,blockRedraw){var allIndex=this.rows.indexOf(row),activeIndex=this.activeRows.indexOf(row);activeIndex>-1&&this.activeRows.splice(activeIndex,1),allIndex>-1&&this.rows.splice(allIndex,1),this.setActiveRows(this.activeRows),this.displayRowIterator((function(rows){var displayIndex=rows.indexOf(row);displayIndex>-1&&rows.splice(displayIndex,1)})),blockRedraw||this.reRenderInPosition(),this.regenerateRowNumbers(),this.table.options.rowDeleted.call(this.table,row.getComponent()),this.table.options.dataEdited.call(this.table,this.getData()),this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.groupRows.updateGroupRows(!0):this.table.options.pagination&&this.table.modExists("page")?this.refreshActiveData(!1,!1,!0):this.table.options.pagination&&this.table.modExists("page")&&this.refreshActiveData("page")},RowManager.prototype.addRow=function(data,pos,index,blockRedraw){var row=this.addRowActual(data,pos,index,blockRedraw);return this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowAdd",row,{data:data,pos:pos,index:index}),row},RowManager.prototype.addRows=function(data,pos,index){var _this11=this,self=this,length=0,rows=[];return new Promise((function(resolve,reject){pos=_this11.findAddRowPos(pos),Array.isArray(data)||(data=[data]),length=data.length-1,(void 0===index&&pos||void 0!==index&&!pos)&&data.reverse(),data.forEach((function(item,i){var row=self.addRow(item,pos,index,!0);rows.push(row)})),_this11.table.options.groupBy&&_this11.table.modExists("groupRows")?_this11.table.modules.groupRows.updateGroupRows(!0):_this11.table.options.pagination&&_this11.table.modExists("page")?_this11.refreshActiveData(!1,!1,!0):_this11.reRenderInPosition(),_this11.table.modExists("columnCalcs")&&_this11.table.modules.columnCalcs.recalc(_this11.table.rowManager.activeRows),_this11.regenerateRowNumbers(),resolve(rows)}))},RowManager.prototype.findAddRowPos=function(pos){return void 0===pos&&(pos=this.table.options.addRowPos),"pos"===pos&&(pos=!0),"bottom"===pos&&(pos=!1),pos},RowManager.prototype.addRowActual=function(data,pos,index,blockRedraw){var row=data instanceof Row?data:new Row(data||{},this),top=this.findAddRowPos(pos),allIndex=-1,activeIndex,dispRows;if(!index&&this.table.options.pagination&&"page"==this.table.options.paginationAddRow&&(dispRows=this.getDisplayRows(),top?dispRows.length?index=dispRows[0]:this.activeRows.length&&(index=this.activeRows[this.activeRows.length-1],top=!1):dispRows.length&&(index=dispRows[dispRows.length-1],top=!(dispRows.length1&&(!index||index&&-1==groupRows.indexOf(index)?top?groupRows[0]!==row&&(index=groupRows[0],this._moveRowInArray(row.getGroup().rows,row,index,!top)):groupRows[groupRows.length-1]!==row&&(index=groupRows[groupRows.length-1],this._moveRowInArray(row.getGroup().rows,row,index,!top)):this._moveRowInArray(row.getGroup().rows,row,index,!top))}return index&&(allIndex=this.rows.indexOf(index)),index&&allIndex>-1?(activeIndex=this.activeRows.indexOf(index),this.displayRowIterator((function(rows){var displayIndex=rows.indexOf(index);displayIndex>-1&&rows.splice(top?displayIndex:displayIndex+1,0,row)})),activeIndex>-1&&this.activeRows.splice(top?activeIndex:activeIndex+1,0,row),this.rows.splice(top?allIndex:allIndex+1,0,row)):top?(this.displayRowIterator((function(rows){rows.unshift(row)})),this.activeRows.unshift(row),this.rows.unshift(row)):(this.displayRowIterator((function(rows){rows.push(row)})),this.activeRows.push(row),this.rows.push(row)),this.setActiveRows(this.activeRows),this.table.options.rowAdded.call(this.table,row.getComponent()),this.table.options.dataEdited.call(this.table,this.getData()),blockRedraw||this.reRenderInPosition(),row},RowManager.prototype.moveRow=function(from,to,after){this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowMove",from,{posFrom:this.getRowPosition(from),posTo:this.getRowPosition(to),to:to,after:after}),this.moveRowActual(from,to,after),this.regenerateRowNumbers(),this.table.options.rowMoved.call(this.table,from.getComponent())},RowManager.prototype.moveRowActual=function(from,to,after){var _this12=this;if(this._moveRowInArray(this.rows,from,to,after),this._moveRowInArray(this.activeRows,from,to,after),this.displayRowIterator((function(rows){_this12._moveRowInArray(rows,from,to,after)})),this.table.options.groupBy&&this.table.modExists("groupRows")){!after&&to instanceof Group&&(to=this.table.rowManager.prevDisplayRow(from)||to);var toGroup=to.getGroup(),fromGroup=from.getGroup();toGroup===fromGroup?this._moveRowInArray(toGroup.rows,from,to,after):(fromGroup&&fromGroup.removeRow(from),toGroup.insertRow(from,to,after))}},RowManager.prototype._moveRowInArray=function(rows,from,to,after){var fromIndex,toIndex,start,end;if(from!==to&&((fromIndex=rows.indexOf(from))>-1&&(rows.splice(fromIndex,1),(toIndex=rows.indexOf(to))>-1?after?rows.splice(toIndex+1,0,from):rows.splice(toIndex,0,from):rows.splice(fromIndex,0,from)),rows===this.getDisplayRows())){end=toIndex>fromIndex?toIndex:fromIndex+1;for(var _i4=start=fromIndex-1&&index},RowManager.prototype.nextDisplayRow=function(row,rowOnly){var index=this.getDisplayRowIndex(row),nextRow=!1;return!1!==index&&index-1)&&rowIndex},RowManager.prototype.getData=function(active,transform){var output=[],rows;return this.getRows(active).forEach((function(row){"row"==row.type&&output.push(row.getData(transform||"data"))})),output},RowManager.prototype.getComponents=function(active){var output=[],rows;return this.getRows(active).forEach((function(row){output.push(row.getComponent())})),output},RowManager.prototype.getDataCount=function(active){var rows;return this.getRows(active).length},RowManager.prototype._genRemoteRequest=function(){var _this13=this,table=this.table,options=table.options,params={};if(table.modExists("page")){if(options.ajaxSorting){var sorters=this.table.modules.sort.getSort();sorters.forEach((function(item){delete item.column})),params[this.table.modules.page.paginationDataSentNames.sorters]=sorters}if(options.ajaxFiltering){var filters=this.table.modules.filter.getFilters(!0,!0);params[this.table.modules.page.paginationDataSentNames.filters]=filters}this.table.modules.ajax.setParams(params,!0)}table.modules.ajax.sendRequest().then((function(data){_this13._setDataActual(data,!0)})).catch((function(e){}))},RowManager.prototype.filterRefresh=function(){var table=this.table,options=table.options,left=this.scrollLeft;options.ajaxFiltering?"remote"==options.pagination&&table.modExists("page")?(table.modules.page.reset(!0),table.modules.page.setPage(1).then((function(){})).catch((function(){}))):options.ajaxProgressiveLoad?table.modules.ajax.loadData().then((function(){})).catch((function(){})):this._genRemoteRequest():this.refreshActiveData("filter"),this.scrollHorizontal(left)},RowManager.prototype.sorterRefresh=function(loadOrignalData){var table=this.table,options=this.table.options,left=this.scrollLeft;options.ajaxSorting?("remote"==options.pagination||options.progressiveLoad)&&table.modExists("page")?(table.modules.page.reset(!0),table.modules.page.setPage(1).then((function(){})).catch((function(){}))):options.ajaxProgressiveLoad?table.modules.ajax.loadData().then((function(){})).catch((function(){})):this._genRemoteRequest():this.refreshActiveData(loadOrignalData?"filter":"sort"),this.scrollHorizontal(left)},RowManager.prototype.scrollHorizontal=function(left){this.scrollLeft=left,this.element.scrollLeft=left,this.table.options.groupBy&&this.table.modules.groupRows.scrollHeaders(left),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.scrollHorizontal(left)},RowManager.prototype.refreshActiveData=function(stage,skipStage,renderInPosition){var self=this,table=this.table,cascadeOrder=["all","filter","sort","display","freeze","group","tree","page"],displayIndex;if(this.redrawBlock)(!this.redrawBlockRestoreConfig||cascadeOrder.indexOf(stage)=0))break;bottomRow=i}else if(topEdge-rows[i].getElement().offsetTop>=0)topRow=i;else{if(topFound=!0,!(bottomEdge-rows[i].getElement().offsetTop>=0))break;bottomRow=i}}else topRow=this.vDomTop,bottomRow=this.vDomBottom;return rows.slice(topRow,bottomRow+1)},RowManager.prototype.displayRowIterator=function(callback){this.displayRows.forEach(callback),this.displayRowsCount=this.displayRows[this.displayRows.length-1].length},RowManager.prototype.getRows=function(active){var rows;switch(active){case"active":rows=this.activeRows;break;case"display":rows=this.table.rowManager.getDisplayRows();break;case"visible":rows=this.getVisibleRows(!0);break;default:rows=this.rows}return rows},RowManager.prototype.reRenderInPosition=function(callback){if("virtual"==this.getRenderMode())if(this.redrawBlock)callback?callback():this.redrawBlockRederInPosition=!0;else{for(var scrollTop=this.element.scrollTop,topRow=!1,topOffset=!1,left=this.scrollLeft,rows=this.getDisplayRows(),i=this.vDomTop;i<=this.vDomBottom;i++)if(rows[i]){var diff=scrollTop-rows[i].getElement().offsetTop;if(!(!1===topOffset||Math.abs(diff)this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*rowHeight),"group"!==row.type&&(onlyGroupHeaders=!1),this.vDomBottom++,i++}position?(this.vDomTopPad=forceMove?this.vDomRowHeight*this.vDomTop+offset:this.scrollTop-topPadHeight,this.vDomBottomPad=this.vDomBottom==this.displayRowsCount-1?0:Math.max(this.vDomScrollHeight-this.vDomTopPad-rowsHeight-topPadHeight,0)):(this.vDomTopPad=0,this.vDomRowHeight=Math.floor((rowsHeight+topPadHeight)/i),this.vDomBottomPad=this.vDomRowHeight*(this.displayRowsCount-this.vDomBottom-1),this.vDomScrollHeight=topPadHeight+rowsHeight+this.vDomBottomPad-this.height),element.style.paddingTop=this.vDomTopPad+"px",element.style.paddingBottom=this.vDomBottomPad+"px",forceMove&&(this.scrollTop=this.vDomTopPad+topPadHeight+offset-(this.element.scrollWidth>this.element.clientWidth?this.element.offsetHeight-this.element.clientHeight:0)),this.scrollTop=Math.min(this.scrollTop,this.element.scrollHeight-this.height),this.element.scrollWidth>this.element.offsetWidth&&forceMove&&(this.scrollTop+=this.element.offsetHeight-this.element.clientHeight),this.vDomScrollPosTop=this.scrollTop,this.vDomScrollPosBottom=this.scrollTop,holder.scrollTop=this.scrollTop,element.style.minWidth=onlyGroupHeaders?this.table.columnManager.getWidth()+"px":"",this.table.options.groupBy&&"fitDataFill"!=this.table.modules.layout.getMode()&&this.displayRowsCount==this.table.modules.groupRows.countGroups()&&(this.tableElement.style.minWidth=this.table.columnManager.getWidth())}else this.renderEmptyScroll();this.fixedHeight||this.adjustTableSize()},RowManager.prototype.scrollVertical=function(dir){var topDiff=this.scrollTop-this.vDomScrollPosTop,bottomDiff=this.scrollTop-this.vDomScrollPosBottom,margin=2*this.vDomWindowBuffer;if(-topDiff>margin||bottomDiff>margin){var left=this.scrollLeft;this._virtualRenderFill(Math.floor(this.element.scrollTop/this.element.scrollHeight*this.displayRowsCount)),this.scrollHorizontal(left)}else dir?(topDiff<0&&this._addTopRow(-topDiff),bottomDiff<0&&(this.vDomScrollHeight-this.scrollTop>this.vDomWindowBuffer?this._removeBottomRow(-bottomDiff):this.vDomScrollPosBottom=this.scrollTop)):(topDiff>=0&&(this.scrollTop>this.vDomWindowBuffer?this._removeTopRow(topDiff):this.vDomScrollPosTop=this.scrollTop),bottomDiff>=0&&this._addBottomRow(bottomDiff))},RowManager.prototype._addTopRow=function(topDiff){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,table=this.tableElement,rows=this.getDisplayRows();if(this.vDomTop){var index=this.vDomTop-1,topRow=rows[index],topRowHeight=topRow.getHeight()||this.vDomRowHeight;topDiff>=topRowHeight&&(this.styleRow(topRow,index),table.insertBefore(topRow.getElement(),table.firstChild),topRow.initialized&&topRow.heightInitialized||(this.vDomTopNewRows.push(topRow),topRow.heightInitialized||topRow.clearCellHeight()),topRow.initialize(),this.vDomTopPad-=topRowHeight,this.vDomTopPad<0&&(this.vDomTopPad=index*this.vDomRowHeight),index||(this.vDomTopPad=0),table.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop-=topRowHeight,this.vDomTop--),topDiff=-(this.scrollTop-this.vDomScrollPosTop),topRow.getHeight()>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*topRow.getHeight()),i=(rows[this.vDomTop-1].getHeight()||this.vDomRowHeight)?this._addTopRow(topDiff,i+1):this._quickNormalizeRowHeight(this.vDomTopNewRows)}},RowManager.prototype._removeTopRow=function(topDiff){var table=this.tableElement,topRow=this.getDisplayRows()[this.vDomTop],topRowHeight=topRow.getHeight()||this.vDomRowHeight;if(topDiff>=topRowHeight){var rowEl=topRow.getElement();rowEl.parentNode.removeChild(rowEl),this.vDomTopPad+=topRowHeight,table.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop+=this.vDomTop?topRowHeight:topRowHeight+this.vDomWindowBuffer,this.vDomTop++,topDiff=this.scrollTop-this.vDomScrollPosTop,this._removeTopRow(topDiff)}},RowManager.prototype._addBottomRow=function(bottomDiff){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,table=this.tableElement,rows=this.getDisplayRows();if(this.vDomBottom=bottomRowHeight&&(this.styleRow(bottomRow,index),table.appendChild(bottomRow.getElement()),bottomRow.initialized&&bottomRow.heightInitialized||(this.vDomBottomNewRows.push(bottomRow),bottomRow.heightInitialized||bottomRow.clearCellHeight()),bottomRow.initialize(),this.vDomBottomPad-=bottomRowHeight,(this.vDomBottomPad<0||index==this.displayRowsCount-1)&&(this.vDomBottomPad=0),table.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom+=bottomRowHeight,this.vDomBottom++),bottomDiff=this.scrollTop-this.vDomScrollPosBottom,bottomRow.getHeight()>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*bottomRow.getHeight()),i=(rows[this.vDomBottom+1].getHeight()||this.vDomRowHeight)?this._addBottomRow(bottomDiff,i+1):this._quickNormalizeRowHeight(this.vDomBottomNewRows)}},RowManager.prototype._removeBottomRow=function(bottomDiff){var table=this.tableElement,bottomRow=this.getDisplayRows()[this.vDomBottom],bottomRowHeight=bottomRow.getHeight()||this.vDomRowHeight;if(bottomDiff>=bottomRowHeight){var rowEl=bottomRow.getElement();rowEl.parentNode&&rowEl.parentNode.removeChild(rowEl),this.vDomBottomPad+=bottomRowHeight,this.vDomBottomPad<0&&(this.vDomBottomPad=0),table.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom-=bottomRowHeight,this.vDomBottom--,bottomDiff=-(this.scrollTop-this.vDomScrollPosBottom),this._removeBottomRow(bottomDiff)}},RowManager.prototype._quickNormalizeRowHeight=function(rows){rows.forEach((function(row){row.calcHeight()})),rows.forEach((function(row){row.setCellHeight()})),rows.length=0},RowManager.prototype.normalizeHeight=function(){this.activeRows.forEach((function(row){row.normalizeHeight()}))},RowManager.prototype.adjustTableSize=function(){var initialHeight=this.element.clientHeight,modExists;if("virtual"===this.renderMode){var otherHeight=this.columnManager.getElement().offsetHeight+(this.table.footerManager&&!this.table.footerManager.external?this.table.footerManager.getElement().offsetHeight:0);this.fixedHeight?(this.element.style.minHeight="calc(100% - "+otherHeight+"px)",this.element.style.height="calc(100% - "+otherHeight+"px)",this.element.style.maxHeight="calc(100% - "+otherHeight+"px)"):(this.element.style.height="",this.element.style.height=this.table.element.clientHeight-otherHeight+"px",this.element.scrollTop=this.scrollTop),this.height=this.element.clientHeight,this.vDomWindowBuffer=this.table.options.virtualDomBuffer||this.height,this.fixedHeight||initialHeight==this.element.clientHeight||((modExists=this.table.modExists("resizeTable"))&&!this.table.modules.resizeTable.autoResize||!modExists)&&this.redraw()}},RowManager.prototype.reinitialize=function(){this.rows.forEach((function(row){row.reinitialize()}))},RowManager.prototype.blockRedraw=function(){this.redrawBlock=!0,this.redrawBlockRestoreConfig=!1},RowManager.prototype.restoreRedraw=function(){this.redrawBlock=!1,this.redrawBlockRestoreConfig?(this.refreshActiveData(this.redrawBlockRestoreConfig.stage,this.redrawBlockRestoreConfig.skipStage,this.redrawBlockRestoreConfig.renderInPosition),this.redrawBlockRestoreConfig=!1):this.redrawBlockRederInPosition&&this.reRenderInPosition(),this.redrawBlockRederInPosition=!1},RowManager.prototype.redraw=function(force){var pos=0,left=this.scrollLeft;this.adjustTableSize(),this.table.tableWidth=this.table.element.clientWidth,force?this.renderTable():("classic"==this.renderMode?this.table.options.groupBy?this.refreshActiveData("group",!1,!1):this._simpleRender():(this.reRenderInPosition(),this.scrollHorizontal(left)),this.displayRowsCount||this.table.options.placeholder&&this.getElement().appendChild(this.table.options.placeholder))},RowManager.prototype.resetScroll=function(){if(this.element.scrollLeft=0,this.element.scrollTop=0,"ie"===this.table.browser){var event=document.createEvent("Event");event.initEvent("scroll",!1,!0),this.element.dispatchEvent(event)}else this.element.dispatchEvent(new Event("scroll"))};var RowComponent=function RowComponent(row){this._row=row};RowComponent.prototype.getData=function(transform){return this._row.getData(transform)},RowComponent.prototype.getElement=function(){return this._row.getElement()},RowComponent.prototype.getCells=function(){var cells=[];return this._row.getCells().forEach((function(cell){cells.push(cell.getComponent())})),cells},RowComponent.prototype.getCell=function(column){var cell=this._row.getCell(column);return!!cell&&cell.getComponent()},RowComponent.prototype.getIndex=function(){return this._row.getData("data")[this._row.table.options.index]},RowComponent.prototype.getPosition=function(active){return this._row.table.rowManager.getRowPosition(this._row,active)},RowComponent.prototype.delete=function(){return this._row.delete()},RowComponent.prototype.scrollTo=function(){return this._row.table.rowManager.scrollToRow(this._row)},RowComponent.prototype.pageTo=function(){if(this._row.table.modExists("page",!0))return this._row.table.modules.page.setPageToRow(this._row)},RowComponent.prototype.move=function(to,after){this._row.moveToRow(to,after)},RowComponent.prototype.update=function(data){return this._row.updateData(data)},RowComponent.prototype.normalizeHeight=function(){this._row.normalizeHeight(!0)},RowComponent.prototype.select=function(){this._row.table.modules.selectRow.selectRows(this._row)},RowComponent.prototype.deselect=function(){this._row.table.modules.selectRow.deselectRows(this._row)},RowComponent.prototype.toggleSelect=function(){this._row.table.modules.selectRow.toggleRow(this._row)},RowComponent.prototype.isSelected=function(){return this._row.table.modules.selectRow.isRowSelected(this._row)},RowComponent.prototype._getSelf=function(){return this._row},RowComponent.prototype.validate=function(){return this._row.validate()},RowComponent.prototype.freeze=function(){this._row.table.modExists("frozenRows",!0)&&this._row.table.modules.frozenRows.freezeRow(this._row)},RowComponent.prototype.unfreeze=function(){this._row.table.modExists("frozenRows",!0)&&this._row.table.modules.frozenRows.unfreezeRow(this._row)},RowComponent.prototype.isFrozen=function(){var index;return!!this._row.table.modExists("frozenRows",!0)&&this._row.table.modules.frozenRows.rows.indexOf(this._row)>-1},RowComponent.prototype.treeCollapse=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.collapseRow(this._row)},RowComponent.prototype.treeExpand=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.expandRow(this._row)},RowComponent.prototype.treeToggle=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.toggleRow(this._row)},RowComponent.prototype.getTreeParent=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeParent(this._row)},RowComponent.prototype.getTreeChildren=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeChildren(this._row)},RowComponent.prototype.addTreeChild=function(data,pos,index){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.addTreeChildRow(this._row,data,pos,index)},RowComponent.prototype.reformat=function(){return this._row.reinitialize()},RowComponent.prototype.getGroup=function(){return this._row.getGroup().getComponent()},RowComponent.prototype.getTable=function(){return this._row.table},RowComponent.prototype.getNextRow=function(){var row=this._row.nextRow();return row?row.getComponent():row},RowComponent.prototype.getPrevRow=function(){var row=this._row.prevRow();return row?row.getComponent():row};var Row=function Row(data,parent){var type=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"row";this.table=parent.table,this.parent=parent,this.data={},this.type=type,this.element=this.createElement(),this.modules={},this.cells=[],this.height=0,this.heightStyled="",this.manualHeight=!1,this.outerHeight=0,this.initialized=!1,this.heightInitialized=!1,this.component=null,this.setData(data),this.generateElement()};Row.prototype.createElement=function(){var el=document.createElement("div");return el.classList.add("tabulator-row"),el.setAttribute("role","row"),el},Row.prototype.getElement=function(){return this.element},Row.prototype.detachElement=function(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)},Row.prototype.generateElement=function(){var self=this,dblTap,tapHold,tap;!1!==self.table.options.selectable&&self.table.modExists("selectRow")&&self.table.modules.selectRow.initializeRow(this),!1!==self.table.options.movableRows&&self.table.modExists("moveRow")&&self.table.modules.moveRow.initializeRow(this),!1!==self.table.options.dataTree&&self.table.modExists("dataTree")&&self.table.modules.dataTree.initializeRow(this),"collapse"===self.table.options.responsiveLayout&&self.table.modExists("responsiveLayout")&&self.table.modules.responsiveLayout.initializeRow(this),self.table.options.rowContextMenu&&this.table.modExists("menu")&&self.table.modules.menu.initializeRow(this),self.table.options.rowClick&&self.element.addEventListener("click",(function(e){self.table.options.rowClick(e,self.getComponent())})),self.table.options.rowDblClick&&self.element.addEventListener("dblclick",(function(e){self.table.options.rowDblClick(e,self.getComponent())})),self.table.options.rowContext&&self.element.addEventListener("contextmenu",(function(e){self.table.options.rowContext(e,self.getComponent())})),self.table.options.rowMouseEnter&&self.element.addEventListener("mouseenter",(function(e){self.table.options.rowMouseEnter(e,self.getComponent())})),self.table.options.rowMouseLeave&&self.element.addEventListener("mouseleave",(function(e){self.table.options.rowMouseLeave(e,self.getComponent())})),self.table.options.rowMouseOver&&self.element.addEventListener("mouseover",(function(e){self.table.options.rowMouseOver(e,self.getComponent())})),self.table.options.rowMouseOut&&self.element.addEventListener("mouseout",(function(e){self.table.options.rowMouseOut(e,self.getComponent())})),self.table.options.rowMouseMove&&self.element.addEventListener("mousemove",(function(e){self.table.options.rowMouseMove(e,self.getComponent())})),self.table.options.rowTap&&(tap=!1,self.element.addEventListener("touchstart",(function(e){tap=!0}),{passive:!0}),self.element.addEventListener("touchend",(function(e){tap&&self.table.options.rowTap(e,self.getComponent()),tap=!1}))),self.table.options.rowDblTap&&(dblTap=null,self.element.addEventListener("touchend",(function(e){dblTap?(clearTimeout(dblTap),dblTap=null,self.table.options.rowDblTap(e,self.getComponent())):dblTap=setTimeout((function(){clearTimeout(dblTap),dblTap=null}),300)}))),self.table.options.rowTapHold&&(tapHold=null,self.element.addEventListener("touchstart",(function(e){clearTimeout(tapHold),tapHold=setTimeout((function(){clearTimeout(tapHold),tapHold=null,tap=!1,self.table.options.rowTapHold(e,self.getComponent())}),1e3)}),{passive:!0}),self.element.addEventListener("touchend",(function(e){clearTimeout(tapHold),tapHold=null})))},Row.prototype.generateCells=function(){this.cells=this.table.columnManager.generateCells(this)},Row.prototype.initialize=function(force){var self=this;if(!self.initialized||force){for(self.deleteCells();self.element.firstChild;)self.element.removeChild(self.element.firstChild);this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layoutRow(this),this.generateCells(),self.cells.forEach((function(cell){self.element.appendChild(cell.getElement()),cell.cellRendered()})),force&&self.normalizeHeight(),self.table.options.dataTree&&self.table.modExists("dataTree")&&self.table.modules.dataTree.layoutRow(this),"collapse"===self.table.options.responsiveLayout&&self.table.modExists("responsiveLayout")&&self.table.modules.responsiveLayout.layoutRow(this),self.table.options.rowFormatter&&self.table.options.rowFormatter(self.getComponent()),self.table.options.resizableRows&&self.table.modExists("resizeRows")&&self.table.modules.resizeRows.initializeRow(self),self.initialized=!0}},Row.prototype.reinitializeHeight=function(){this.heightInitialized=!1,null!==this.element.offsetParent&&this.normalizeHeight(!0)},Row.prototype.reinitialize=function(){this.initialized=!1,this.heightInitialized=!1,this.manualHeight||(this.height=0,this.heightStyled=""),null!==this.element.offsetParent&&this.initialize(!0)},Row.prototype.calcHeight=function(force){var maxHeight=0,minHeight=this.table.options.resizableRows?this.element.clientHeight:0;this.cells.forEach((function(cell){var height=cell.getHeight();height>maxHeight&&(maxHeight=height)})),this.height=force?Math.max(maxHeight,minHeight):this.manualHeight?this.height:Math.max(maxHeight,minHeight),this.heightStyled=this.height?this.height+"px":"",this.outerHeight=this.element.offsetHeight},Row.prototype.setCellHeight=function(){this.cells.forEach((function(cell){cell.setHeight()})),this.heightInitialized=!0},Row.prototype.clearCellHeight=function(){this.cells.forEach((function(cell){cell.clearHeight()}))},Row.prototype.normalizeHeight=function(force){force&&this.clearCellHeight(),this.calcHeight(force),this.setCellHeight()},Row.prototype.setHeight=function(height,force){(this.height!=height||force)&&(this.manualHeight=!0,this.height=height,this.heightStyled=height?height+"px":"",this.setCellHeight(),this.outerHeight=this.element.offsetHeight)},Row.prototype.getHeight=function(){return this.outerHeight},Row.prototype.getWidth=function(){return this.element.offsetWidth},Row.prototype.deleteCell=function(cell){var index=this.cells.indexOf(cell);index>-1&&this.cells.splice(index,1)},Row.prototype.setData=function(data){this.table.modExists("mutator")&&(data=this.table.modules.mutator.transformRow(data,"data")),this.data=data,this.table.options.reactiveData&&this.table.modExists("reactiveData",!0)&&this.table.modules.reactiveData.watchRow(this)},Row.prototype.updateData=function(updatedData){var _this15=this,visible=Tabulator.prototype.helpers.elVisible(this.element),tempData={},newRowData;return new Promise((function(resolve,reject){for(var attrname in"string"==typeof updatedData&&(updatedData=JSON.parse(updatedData)),_this15.table.options.reactiveData&&_this15.table.modExists("reactiveData",!0)&&_this15.table.modules.reactiveData.block(),_this15.table.modExists("mutator")?(tempData=Object.assign(tempData,_this15.data),tempData=Object.assign(tempData,updatedData),newRowData=_this15.table.modules.mutator.transformRow(tempData,"data",updatedData)):newRowData=updatedData,newRowData)_this15.data[attrname]=newRowData[attrname];for(var attrname in _this15.table.options.reactiveData&&_this15.table.modExists("reactiveData",!0)&&_this15.table.modules.reactiveData.unblock(),updatedData){var columns;_this15.table.columnManager.getColumnsByFieldRoot(attrname).forEach((function(column){var cell=_this15.getCell(column.getField());if(cell){var value=column.getFieldValue(newRowData);cell.getValue()!=value&&(cell.setValueProcessData(value),visible&&cell.cellRendered())}}))}visible?(_this15.normalizeHeight(!0),_this15.table.options.rowFormatter&&_this15.table.options.rowFormatter(_this15.getComponent())):(_this15.initialized=!1,_this15.height=0,_this15.heightStyled=""),!1!==_this15.table.options.dataTree&&_this15.table.modExists("dataTree")&&_this15.table.modules.dataTree.redrawNeeded(updatedData)&&(_this15.table.modules.dataTree.initializeRow(_this15),_this15.table.modules.dataTree.layoutRow(_this15),_this15.table.rowManager.refreshActiveData("tree",!1,!0)),_this15.table.options.rowUpdated.call(_this15.table,_this15.getComponent()),resolve()}))},Row.prototype.getData=function(transform){var self=this;return transform?this.table.modExists("accessor")?this.table.modules.accessor.transformRow(this.data,transform):void 0:this.data},Row.prototype.getCell=function(column){var match=!1;return column=this.table.columnManager.findColumn(column),match=this.cells.find((function(cell){return cell.column===column}))},Row.prototype.getCellIndex=function(findCell){return this.cells.findIndex((function(cell){return cell===findCell}))},Row.prototype.findNextEditableCell=function(index){var nextCell=!1;if(index0)for(var i=index-1;i>=0;i--){var cell=this.cells[i],allowEdit=!0;if(cell.column.modules.edit&&Tabulator.prototype.helpers.elVisible(cell.getElement())&&("function"==typeof cell.column.modules.edit.check&&(allowEdit=cell.column.modules.edit.check(cell.getComponent())),allowEdit)){prevCell=cell;break}}return prevCell},Row.prototype.getCells=function(){return this.cells},Row.prototype.nextRow=function(){var row;return this.table.rowManager.nextDisplayRow(this,!0)||!1},Row.prototype.prevRow=function(){var row;return this.table.rowManager.prevDisplayRow(this,!0)||!1},Row.prototype.moveToRow=function(to,before){var toRow=this.table.rowManager.findRow(to);toRow?(this.table.rowManager.moveRowActual(this,toRow,!before),this.table.rowManager.refreshActiveData("display",!1,!0)):console.warn("Move Error - No matching row found:",to)},Row.prototype.validate=function(){var invalid=[];return this.cells.forEach((function(cell){cell.validate()||invalid.push(cell.getComponent())})),!invalid.length||invalid},Row.prototype.delete=function(){var _this16=this;return new Promise((function(resolve,reject){var index,rows;_this16.table.options.history&&_this16.table.modExists("history")&&(_this16.table.options.groupBy&&_this16.table.modExists("groupRows")?(index=(rows=_this16.getGroup().rows).indexOf(_this16))&&(index=rows[index-1]):(index=_this16.table.rowManager.getRowIndex(_this16))&&(index=_this16.table.rowManager.rows[index-1]),_this16.table.modules.history.action("rowDelete",_this16,{data:_this16.getData(),pos:!index,index:index})),_this16.deleteActual(),resolve()}))},Row.prototype.deleteActual=function(blockRedraw){var index=this.table.rowManager.getRowIndex(this);this.table.modExists("selectRow")&&this.table.modules.selectRow._deselectRow(this,!0),this.table.modExists("edit")&&this.table.modules.edit.currentCell.row===this&&this.table.modules.edit.cancelEdit(),this.table.options.reactiveData&&this.table.modExists("reactiveData",!0),this.modules.group&&this.modules.group.removeRow(this),this.table.rowManager.deleteRow(this,blockRedraw),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.table.options.dataTree&&this.table.modExists("dataTree",!0)&&this.table.modules.dataTree.rowDelete(this),this.table.modExists("columnCalcs")&&(this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.columnCalcs.recalcRowGroup(this):this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows))},Row.prototype.deleteCells=function(){for(var cellCount=this.cells.length,_i5=0;_i5-1?(this.browser="ie",this.browserSlow=!0):ua.indexOf("Edge")>-1?(this.browser="edge",this.browserSlow=!0):ua.indexOf("Firefox")>-1?(this.browser="firefox",this.browserSlow=!1):(this.browser="other",this.browserSlow=!1),this.browserMobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(ua)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(ua.substr(0,4))},Tabulator.prototype.blockRedraw=function(){return this.rowManager.blockRedraw()},Tabulator.prototype.restoreRedraw=function(){return this.rowManager.restoreRedraw()},Tabulator.prototype.setDataFromLocalFile=function(extensions){var _this18=this;return new Promise((function(resolve,reject){var input=document.createElement("input");input.type="file",input.accept=extensions||".json,application/json",input.addEventListener("change",(function(e){var file=input.files[0],reader=new FileReader,data;reader.readAsText(file),reader.onload=function(e){try{data=JSON.parse(reader.result)}catch(e){return console.warn("File Load Error - File contents is invalid JSON",e),void reject(e)}_this18._setData(data).then((function(data){resolve(data)})).catch((function(err){resolve(err)}))},reader.onerror=function(e){console.warn("File Load Error - Unable to read file"),reject()}})),input.click()}))},Tabulator.prototype.setData=function(data,params,config){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(data,params,config,!1,!0)},Tabulator.prototype._setData=function(data,params,config,inPosition,columnsChanged){var self=this;return"string"!=typeof data?data?this.rowManager.setData(data,inPosition,columnsChanged):this.modExists("ajax")&&(this.modules.ajax.getUrl||this.options.ajaxURLGenerator)?"remote"==this.options.pagination&&this.modExists("page",!0)?(this.modules.page.reset(!0,!0),this.modules.page.setPage(1)):this.modules.ajax.loadData(inPosition,columnsChanged):this.rowManager.setData([],inPosition,columnsChanged):0==data.indexOf("{")||0==data.indexOf("[")?this.rowManager.setData(JSON.parse(data),inPosition,columnsChanged):this.modExists("ajax",!0)?(params&&this.modules.ajax.setParams(params),config&&this.modules.ajax.setConfig(config),this.modules.ajax.setUrl(data),"remote"==this.options.pagination&&this.modExists("page",!0)?(this.modules.page.reset(!0,!0),this.modules.page.setPage(1)):this.modules.ajax.loadData(inPosition,columnsChanged)):void 0},Tabulator.prototype.clearData=function(){this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this.rowManager.clearData()},Tabulator.prototype.getData=function(active){return!0===active&&(console.warn("passing a boolean to the getData function is deprecated, you should now pass the string 'active'"),active="active"),this.rowManager.getData(active)},Tabulator.prototype.getDataCount=function(active){return!0===active&&(console.warn("passing a boolean to the getDataCount function is deprecated, you should now pass the string 'active'"),active="active"),this.rowManager.getDataCount(active)},Tabulator.prototype.searchRows=function(field,type,value){if(this.modExists("filter",!0))return this.modules.filter.search("rows",field,type,value)},Tabulator.prototype.searchData=function(field,type,value){if(this.modExists("filter",!0))return this.modules.filter.search("data",field,type,value)},Tabulator.prototype.getHtml=function(visible,style,config){if(this.modExists("export",!0))return this.modules.export.getHtml(visible,style,config)},Tabulator.prototype.print=function(visible,style,config){if(this.modExists("print",!0))return this.modules.print.printFullscreen(visible,style,config)},Tabulator.prototype.getAjaxUrl=function(){if(this.modExists("ajax",!0))return this.modules.ajax.getUrl()},Tabulator.prototype.replaceData=function(data,params,config){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(data,params,config,!0)},Tabulator.prototype.updateData=function(data){var _this19=this,self=this,responses=0;return new Promise((function(resolve,reject){_this19.modExists("ajax")&&_this19.modules.ajax.blockActiveRequest(),"string"==typeof data&&(data=JSON.parse(data)),data?data.forEach((function(item){var row=self.rowManager.findRow(item[self.options.index]);row&&(responses++,row.updateData(item).then((function(){--responses||resolve()})))})):(console.warn("Update Error - No data provided"),reject("Update Error - No data provided"))}))},Tabulator.prototype.addData=function(data,pos,index){var _this20=this;return new Promise((function(resolve,reject){_this20.modExists("ajax")&&_this20.modules.ajax.blockActiveRequest(),"string"==typeof data&&(data=JSON.parse(data)),data?_this20.rowManager.addRows(data,pos,index).then((function(rows){var output=[];rows.forEach((function(row){output.push(row.getComponent())})),resolve(output)})):(console.warn("Update Error - No data provided"),reject("Update Error - No data provided"))}))},Tabulator.prototype.updateOrAddData=function(data){var _this21=this,self=this,rows=[],responses=0;return new Promise((function(resolve,reject){_this21.modExists("ajax")&&_this21.modules.ajax.blockActiveRequest(),"string"==typeof data&&(data=JSON.parse(data)),data?data.forEach((function(item){var row=self.rowManager.findRow(item[self.options.index]);responses++,row?row.updateData(item).then((function(){responses--,rows.push(row.getComponent()),responses||resolve(rows)})):self.rowManager.addRows(item).then((function(newRows){responses--,rows.push(newRows[0].getComponent()),responses||resolve(rows)}))})):(console.warn("Update Error - No data provided"),reject("Update Error - No data provided"))}))},Tabulator.prototype.getRow=function(index){var row=this.rowManager.findRow(index);return row?row.getComponent():(console.warn("Find Error - No matching row found:",index),!1)},Tabulator.prototype.getRowFromPosition=function(position,active){var row=this.rowManager.getRowFromPosition(position,active);return row?row.getComponent():(console.warn("Find Error - No matching row found:",position),!1)},Tabulator.prototype.deleteRow=function(index){var _this22=this;return new Promise((function(resolve,reject){var self=_this22,count=0,successCount=0,foundRows=[];function doneCheck(){++count==index.length&&successCount&&(self.rowManager.reRenderInPosition(),resolve())}Array.isArray(index)||(index=[index]),index.forEach((function(item){var row=_this22.rowManager.findRow(item,!0);row?foundRows.push(row):(console.warn("Delete Error - No matching row found:",item),reject("Delete Error - No matching row found"),doneCheck())})),foundRows.sort((function(a,b){return _this22.rowManager.rows.indexOf(a)>_this22.rowManager.rows.indexOf(b)?1:-1})),foundRows.forEach((function(row){row.delete().then((function(){successCount++,doneCheck()})).catch((function(err){doneCheck(),reject(err)}))}))}))},Tabulator.prototype.addRow=function(data,pos,index){var _this23=this;return new Promise((function(resolve,reject){"string"==typeof data&&(data=JSON.parse(data)),_this23.rowManager.addRows(data,pos,index).then((function(rows){_this23.modExists("columnCalcs")&&_this23.modules.columnCalcs.recalc(_this23.rowManager.activeRows),resolve(rows[0].getComponent())}))}))},Tabulator.prototype.updateOrAddRow=function(index,data){var _this24=this;return new Promise((function(resolve,reject){var row=_this24.rowManager.findRow(index);"string"==typeof data&&(data=JSON.parse(data)),row?row.updateData(data).then((function(){_this24.modExists("columnCalcs")&&_this24.modules.columnCalcs.recalc(_this24.rowManager.activeRows),resolve(row.getComponent())})).catch((function(err){reject(err)})):row=_this24.rowManager.addRows(data).then((function(rows){_this24.modExists("columnCalcs")&&_this24.modules.columnCalcs.recalc(_this24.rowManager.activeRows),resolve(rows[0].getComponent())})).catch((function(err){reject(err)}))}))},Tabulator.prototype.updateRow=function(index,data){var _this25=this;return new Promise((function(resolve,reject){var row=_this25.rowManager.findRow(index);"string"==typeof data&&(data=JSON.parse(data)),row?row.updateData(data).then((function(){resolve(row.getComponent())})).catch((function(err){reject(err)})):(console.warn("Update Error - No matching row found:",index),reject("Update Error - No matching row found"))}))},Tabulator.prototype.scrollToRow=function(index,position,ifVisible){var _this26=this;return new Promise((function(resolve,reject){var row=_this26.rowManager.findRow(index);row?_this26.rowManager.scrollToRow(row,position,ifVisible).then((function(){resolve()})).catch((function(err){reject(err)})):(console.warn("Scroll Error - No matching row found:",index),reject("Scroll Error - No matching row found"))}))},Tabulator.prototype.moveRow=function(from,to,after){var fromRow=this.rowManager.findRow(from);fromRow?fromRow.moveToRow(to,after):console.warn("Move Error - No matching row found:",from)},Tabulator.prototype.getRows=function(active){return!0===active&&(console.warn("passing a boolean to the getRows function is deprecated, you should now pass the string 'active'"),active="active"),this.rowManager.getComponents(active)},Tabulator.prototype.getRowPosition=function(index,active){var row=this.rowManager.findRow(index);return row?this.rowManager.getRowPosition(row,active):(console.warn("Position Error - No matching row found:",index),!1)},Tabulator.prototype.copyToClipboard=function(selector){this.modExists("clipboard",!0)&&this.modules.clipboard.copy(selector)},Tabulator.prototype.setColumns=function(definition){this.columnManager.setColumns(definition)},Tabulator.prototype.getColumns=function(structured){return this.columnManager.getComponents(structured)},Tabulator.prototype.getColumn=function(field){var col=this.columnManager.findColumn(field);return col?col.getComponent():(console.warn("Find Error - No matching column found:",field),!1)},Tabulator.prototype.getColumnDefinitions=function(){return this.columnManager.getDefinitionTree()},Tabulator.prototype.getColumnLayout=function(){if(this.modExists("persistence",!0))return this.modules.persistence.parseColumns(this.columnManager.getColumns())},Tabulator.prototype.setColumnLayout=function(layout){return!!this.modExists("persistence",!0)&&(this.columnManager.setColumns(this.modules.persistence.mergeDefinition(this.options.columns,layout)),!0)},Tabulator.prototype.showColumn=function(field){var column=this.columnManager.findColumn(field);if(!column)return console.warn("Column Show Error - No matching column found:",field),!1;column.show(),this.options.responsiveLayout&&this.modExists("responsiveLayout",!0)&&this.modules.responsiveLayout.update()},Tabulator.prototype.hideColumn=function(field){var column=this.columnManager.findColumn(field);if(!column)return console.warn("Column Hide Error - No matching column found:",field),!1;column.hide(),this.options.responsiveLayout&&this.modExists("responsiveLayout",!0)&&this.modules.responsiveLayout.update()},Tabulator.prototype.toggleColumn=function(field){var column=this.columnManager.findColumn(field);if(!column)return console.warn("Column Visibility Toggle Error - No matching column found:",field),!1;column.visible?column.hide():column.show()},Tabulator.prototype.addColumn=function(definition,before,field){var _this27=this;return new Promise((function(resolve,reject){var column=_this27.columnManager.findColumn(field);_this27.columnManager.addColumn(definition,before,column).then((function(column){resolve(column.getComponent())})).catch((function(err){reject(err)}))}))},Tabulator.prototype.deleteColumn=function(field){var _this28=this;return new Promise((function(resolve,reject){var column=_this28.columnManager.findColumn(field);column?column.delete().then((function(){resolve()})).catch((function(err){reject(err)})):(console.warn("Column Delete Error - No matching column found:",field),reject())}))},Tabulator.prototype.updateColumnDefinition=function(field,definition){var _this29=this;return new Promise((function(resolve,reject){var column=_this29.columnManager.findColumn(field);column?column.updateDefinition(definition).then((function(col){resolve(col)})).catch((function(err){reject(err)})):(console.warn("Column Update Error - No matching column found:",field),reject())}))},Tabulator.prototype.moveColumn=function(from,to,after){var fromColumn=this.columnManager.findColumn(from),toColumn=this.columnManager.findColumn(to);fromColumn?toColumn?this.columnManager.moveColumn(fromColumn,toColumn,after):console.warn("Move Error - No matching column found:",toColumn):console.warn("Move Error - No matching column found:",from)},Tabulator.prototype.scrollToColumn=function(field,position,ifVisible){var _this30=this;return new Promise((function(resolve,reject){var column=_this30.columnManager.findColumn(field);column?_this30.columnManager.scrollToColumn(column,position,ifVisible).then((function(){resolve()})).catch((function(err){reject(err)})):(console.warn("Scroll Error - No matching column found:",field),reject("Scroll Error - No matching column found"))}))},Tabulator.prototype.setLocale=function(locale){this.modules.localize.setLocale(locale)},Tabulator.prototype.getLocale=function(){return this.modules.localize.getLocale()},Tabulator.prototype.getLang=function(locale){return this.modules.localize.getLang(locale)},Tabulator.prototype.redraw=function(force){this.columnManager.redraw(force),this.rowManager.redraw(force)},Tabulator.prototype.setHeight=function(height){"classic"!==this.rowManager.renderMode?(this.options.height=isNaN(height)?height:height+"px",this.element.style.height=this.options.height,this.rowManager.setRenderMode(),this.rowManager.redraw()):console.warn("setHeight function is not available in classic render mode")},Tabulator.prototype.setSort=function(sortList,dir){this.modExists("sort",!0)&&(this.modules.sort.setSort(sortList,dir),this.rowManager.sorterRefresh())},Tabulator.prototype.getSorters=function(){if(this.modExists("sort",!0))return this.modules.sort.getSort()},Tabulator.prototype.clearSort=function(){this.modExists("sort",!0)&&(this.modules.sort.clear(),this.rowManager.sorterRefresh())},Tabulator.prototype.setFilter=function(field,type,value,params){this.modExists("filter",!0)&&(this.modules.filter.setFilter(field,type,value,params),this.rowManager.filterRefresh())},Tabulator.prototype.addFilter=function(field,type,value,params){this.modExists("filter",!0)&&(this.modules.filter.addFilter(field,type,value,params),this.rowManager.filterRefresh())},Tabulator.prototype.getFilters=function(all){if(this.modExists("filter",!0))return this.modules.filter.getFilters(all)},Tabulator.prototype.setHeaderFilterFocus=function(field){if(this.modExists("filter",!0)){var column=this.columnManager.findColumn(field);if(!column)return console.warn("Column Filter Focus Error - No matching column found:",field),!1;this.modules.filter.setHeaderFilterFocus(column)}},Tabulator.prototype.getHeaderFilterValue=function(field){if(this.modExists("filter",!0)){var column=this.columnManager.findColumn(field);if(column)return this.modules.filter.getHeaderFilterValue(column);console.warn("Column Filter Error - No matching column found:",field)}},Tabulator.prototype.setHeaderFilterValue=function(field,value){if(this.modExists("filter",!0)){var column=this.columnManager.findColumn(field);if(!column)return console.warn("Column Filter Error - No matching column found:",field),!1;this.modules.filter.setHeaderFilterValue(column,value)}},Tabulator.prototype.getHeaderFilters=function(){if(this.modExists("filter",!0))return this.modules.filter.getHeaderFilters()},Tabulator.prototype.removeFilter=function(field,type,value){this.modExists("filter",!0)&&(this.modules.filter.removeFilter(field,type,value),this.rowManager.filterRefresh())},Tabulator.prototype.clearFilter=function(all){this.modExists("filter",!0)&&(this.modules.filter.clearFilter(all),this.rowManager.filterRefresh())},Tabulator.prototype.clearHeaderFilter=function(){this.modExists("filter",!0)&&(this.modules.filter.clearHeaderFilter(),this.rowManager.filterRefresh())},Tabulator.prototype.selectRow=function(rows){this.modExists("selectRow",!0)&&(!0===rows&&(console.warn("passing a boolean to the selectRowselectRow function is deprecated, you should now pass the string 'active'"),rows="active"),this.modules.selectRow.selectRows(rows))},Tabulator.prototype.deselectRow=function(rows){this.modExists("selectRow",!0)&&this.modules.selectRow.deselectRows(rows)},Tabulator.prototype.toggleSelectRow=function(row){this.modExists("selectRow",!0)&&this.modules.selectRow.toggleRow(row)},Tabulator.prototype.getSelectedRows=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedRows()},Tabulator.prototype.getSelectedData=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedData()},Tabulator.prototype.getInvalidCells=function(){if(this.modExists("validate",!0))return this.modules.validate.getInvalidCells()},Tabulator.prototype.clearCellValidation=function(cells){var _this31=this;this.modExists("validate",!0)&&(cells||(cells=this.modules.validate.getInvalidCells()),Array.isArray(cells)||(cells=[cells]),cells.forEach((function(cell){_this31.modules.validate.clearValidation(cell._getSelf())})))},Tabulator.prototype.validate=function(cells){var output=[];return this.rowManager.rows.forEach((function(row){var valid=row.validate();!0!==valid&&(output=output.concat(valid))})),!output.length||output},Tabulator.prototype.setMaxPage=function(max){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setMaxPage(max)},Tabulator.prototype.setPage=function(page){return this.options.pagination&&this.modExists("page")?this.modules.page.setPage(page):new Promise((function(resolve,reject){reject()}))},Tabulator.prototype.setPageToRow=function(row){var _this32=this;return new Promise((function(resolve,reject){_this32.options.pagination&&_this32.modExists("page")&&(row=_this32.rowManager.findRow(row))?_this32.modules.page.setPageToRow(row).then((function(){resolve()})).catch((function(){reject()})):reject()}))},Tabulator.prototype.setPageSize=function(size){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setPageSize(size),this.modules.page.setPage(1).then((function(){})).catch((function(){}))},Tabulator.prototype.getPageSize=function(){if(this.options.pagination&&this.modExists("page",!0))return this.modules.page.getPageSize()},Tabulator.prototype.previousPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.previousPage()},Tabulator.prototype.nextPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.nextPage()},Tabulator.prototype.getPage=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPage()},Tabulator.prototype.getPageMax=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPageMax()},Tabulator.prototype.setGroupBy=function(groups){if(!this.modExists("groupRows",!0))return!1;this.options.groupBy=groups,this.modules.groupRows.initialize(),this.rowManager.refreshActiveData("display"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")},Tabulator.prototype.setGroupStartOpen=function(values){if(!this.modExists("groupRows",!0))return!1;this.options.groupStartOpen=values,this.modules.groupRows.initialize(),this.options.groupBy?(this.rowManager.refreshActiveData("group"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")):console.warn("Grouping Update - cant refresh view, no groups have been set")},Tabulator.prototype.setGroupHeader=function(values){if(!this.modExists("groupRows",!0))return!1;this.options.groupHeader=values,this.modules.groupRows.initialize(),this.options.groupBy?(this.rowManager.refreshActiveData("group"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")):console.warn("Grouping Update - cant refresh view, no groups have been set")},Tabulator.prototype.getGroups=function(values){return!!this.modExists("groupRows",!0)&&this.modules.groupRows.getGroups(!0)},Tabulator.prototype.getGroupedData=function(){if(this.modExists("groupRows",!0))return this.options.groupBy?this.modules.groupRows.getGroupedData():this.getData()},Tabulator.prototype.getEditedCells=function(){if(this.modExists("edit",!0))return this.modules.edit.getEditedCells()},Tabulator.prototype.clearCellEdited=function(cells){var _this33=this;this.modExists("edit",!0)&&(cells||(cells=this.modules.edit.getEditedCells()),Array.isArray(cells)||(cells=[cells]),cells.forEach((function(cell){_this33.modules.edit.clearEdited(cell._getSelf())})))},Tabulator.prototype.getCalcResults=function(){return!!this.modExists("columnCalcs",!0)&&this.modules.columnCalcs.getResults()},Tabulator.prototype.recalc=function(){this.modExists("columnCalcs",!0)&&this.modules.columnCalcs.recalcAll(this.rowManager.activeRows)},Tabulator.prototype.navigatePrev=function(){var cell=!1;return!(!this.modExists("edit",!0)||!(cell=this.modules.edit.currentCell))&&cell.nav().prev()},Tabulator.prototype.navigateNext=function(){var cell=!1;return!(!this.modExists("edit",!0)||!(cell=this.modules.edit.currentCell))&&cell.nav().next()},Tabulator.prototype.navigateLeft=function(){var cell=!1;return!(!this.modExists("edit",!0)||!(cell=this.modules.edit.currentCell))&&(e.preventDefault(),cell.nav().left())},Tabulator.prototype.navigateRight=function(){var cell=!1;return!(!this.modExists("edit",!0)||!(cell=this.modules.edit.currentCell))&&(e.preventDefault(),cell.nav().right())},Tabulator.prototype.navigateUp=function(){var cell=!1;return!(!this.modExists("edit",!0)||!(cell=this.modules.edit.currentCell))&&(e.preventDefault(),cell.nav().up())},Tabulator.prototype.navigateDown=function(){var cell=!1;return!(!this.modExists("edit",!0)||!(cell=this.modules.edit.currentCell))&&(e.preventDefault(),cell.nav().down())},Tabulator.prototype.undo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.undo()},Tabulator.prototype.redo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.redo()},Tabulator.prototype.getHistoryUndoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryUndoSize()},Tabulator.prototype.getHistoryRedoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryRedoSize()},Tabulator.prototype.download=function(type,filename,options,active){this.modExists("download",!0)&&this.modules.download.download(type,filename,options,active)},Tabulator.prototype.downloadToTab=function(type,filename,options,active){this.modExists("download",!0)&&this.modules.download.download(type,filename,options,active,!0)},Tabulator.prototype.tableComms=function(table,module,action,data){this.modules.comms.receive(table,module,action,data)},Tabulator.prototype.moduleBindings={},Tabulator.prototype.extendModule=function(name,property,values){if(Tabulator.prototype.moduleBindings[name]){var source=Tabulator.prototype.moduleBindings[name].prototype[property];if(source)if("object"==(void 0===values?"undefined":_typeof(values)))for(var key in values)source[key]=values[key];else console.warn("Module Error - Invalid value type, it must be an object");else console.warn("Module Error - property does not exist:",property)}else console.warn("Module Error - module does not exist:",name)},Tabulator.prototype.registerModule=function(name,module){var self=this;Tabulator.prototype.moduleBindings[name]=module},Tabulator.prototype.bindModules=function(){for(var name in this.modules={},Tabulator.prototype.moduleBindings)this.modules[name]=new Tabulator.prototype.moduleBindings[name](this)},Tabulator.prototype.modExists=function(plugin,required){return!!this.modules[plugin]||(required&&console.error("Tabulator Module Not Installed: "+plugin),!1)},Tabulator.prototype.helpers={elVisible:function elVisible(el){return!(el.offsetWidth<=0&&el.offsetHeight<=0)},elOffset:function elOffset(el){var box=el.getBoundingClientRect();return{top:box.top+window.pageYOffset-document.documentElement.clientTop,left:box.left+window.pageXOffset-document.documentElement.clientLeft}},deepClone:function deepClone(obj){var clone=Array.isArray(obj)?[]:{};for(var i in obj)null!=obj[i]&&"object"===_typeof(obj[i])?obj[i]instanceof Date?clone[i]=new Date(obj[i]):clone[i]=this.deepClone(obj[i]):clone[i]=obj[i];return clone}},Tabulator.prototype.comms={tables:[],register:function register(table){Tabulator.prototype.comms.tables.push(table)},deregister:function deregister(table){var index=Tabulator.prototype.comms.tables.indexOf(table);index>-1&&Tabulator.prototype.comms.tables.splice(index,1)},lookupTable:function lookupTable(query,silent){var results=[],matches,match;if("string"==typeof query){if((matches=document.querySelectorAll(query)).length)for(var i=0;i0?lastCol.setWidth(gap):lastCol.reinitializeWidth()):this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitColumns:function fitColumns(columns){var self=this,totalWidth=this.table.element.clientWidth,fixedWidth=0,flexWidth=0,flexGrowUnits=0,flexColWidth=0,flexColumns=[],fixedShrinkColumns=[],flexShrinkUnits=0,overflowWidth=0,gapFill=0;function calcWidth(width){var colWidth;return colWidth="string"==typeof width?width.indexOf("%")>-1?totalWidth/100*parseInt(width):parseInt(width):width}function scaleColumns(columns,freeSpace,colWidth,shrinkCols){var oversizeCols=[],oversizeSpace=0,remainingSpace=0,nextColWidth=0,gap=0,changeUnits=0,undersizeCols=[];function calcGrow(col){return colWidth*(col.column.definition.widthGrow||1)}function calcShrink(col){return calcWidth(col.width)-colWidth*(col.column.definition.widthShrink||0)}return columns.forEach((function(col,i){var width=shrinkCols?calcShrink(col):calcGrow(col);col.column.minWidth>=width?oversizeCols.push(col):(undersizeCols.push(col),changeUnits+=shrinkCols?col.column.definition.widthShrink||1:col.column.definition.widthGrow||1)})),oversizeCols.length?(oversizeCols.forEach((function(col){oversizeSpace+=shrinkCols?col.width-col.column.minWidth:col.column.minWidth,col.width=col.column.minWidth})),gap=(remainingSpace=freeSpace-oversizeSpace)-(nextColWidth=changeUnits?Math.floor(remainingSpace/changeUnits):remainingSpace)*changeUnits,gap+=scaleColumns(undersizeCols,remainingSpace,nextColWidth,shrinkCols)):(gap=changeUnits?freeSpace-Math.floor(freeSpace/changeUnits)*changeUnits:freeSpace,undersizeCols.forEach((function(column){column.width=shrinkCols?calcShrink(column):calcGrow(column)}))),gap}this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.rowManager.element.scrollHeight>this.table.rowManager.element.clientHeight&&(totalWidth-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),columns.forEach((function(column){var width,minWidth,colWidth;column.visible&&(width=column.definition.width,minWidth=parseInt(column.minWidth),width?(colWidth=calcWidth(width),fixedWidth+=colWidth>minWidth?colWidth:minWidth,column.definition.widthShrink&&(fixedShrinkColumns.push({column:column,width:colWidth>minWidth?colWidth:minWidth}),flexShrinkUnits+=column.definition.widthShrink)):(flexColumns.push({column:column,width:0}),flexGrowUnits+=column.definition.widthGrow||1))})),flexWidth=totalWidth-fixedWidth,flexColWidth=Math.floor(flexWidth/flexGrowUnits);var gapFill=scaleColumns(flexColumns,flexWidth,flexColWidth,!1);flexColumns.length&&gapFill>0&&(flexColumns[flexColumns.length-1].width+=+gapFill),flexColumns.forEach((function(col){flexWidth-=col.width})),(overflowWidth=Math.abs(gapFill)+flexWidth)>0&&flexShrinkUnits&&(gapFill=scaleColumns(fixedShrinkColumns,overflowWidth,Math.floor(overflowWidth/flexShrinkUnits),!0)),fixedShrinkColumns.length&&(fixedShrinkColumns[fixedShrinkColumns.length-1].width-=gapFill),flexColumns.forEach((function(col){col.column.setWidth(col.width)})),fixedShrinkColumns.forEach((function(col){col.column.setWidth(col.width)}))}},Tabulator.prototype.registerModule("layout",Layout);var Localize=function Localize(table){this.table=table,this.locale="default",this.lang=!1,this.bindings={}};Localize.prototype.setHeaderFilterPlaceholder=function(placeholder){this.langs.default.headerFilters.default=placeholder},Localize.prototype.setHeaderFilterColumnPlaceholder=function(column,placeholder){this.langs.default.headerFilters.columns[column]=placeholder,this.lang&&!this.lang.headerFilters.columns[column]&&(this.lang.headerFilters.columns[column]=placeholder)},Localize.prototype.installLang=function(locale,lang){this.langs[locale]?this._setLangProp(this.langs[locale],lang):this.langs[locale]=lang},Localize.prototype._setLangProp=function(lang,values){for(var key in values)lang[key]&&"object"==_typeof(lang[key])?this._setLangProp(lang[key],values[key]):lang[key]=values[key]},Localize.prototype.setLocale=function(desiredLocale){var self=this;function traverseLang(trans,path){for(var prop in trans)"object"==_typeof(trans[prop])?(path[prop]||(path[prop]={}),traverseLang(trans[prop],path[prop])):path[prop]=trans[prop]}if(!0===(desiredLocale=desiredLocale||"default")&&navigator.language&&(desiredLocale=navigator.language.toLowerCase()),desiredLocale&&!this.langs[desiredLocale]){var prefix=desiredLocale.split("-")[0];this.langs[prefix]?(console.warn("Localization Error - Exact matching locale not found, using closest match: ",desiredLocale,prefix),desiredLocale=prefix):(console.warn("Localization Error - Matching locale not found, using default: ",desiredLocale),desiredLocale="default")}this.locale=desiredLocale,this.lang=Tabulator.prototype.helpers.deepClone(this.langs.default||{}),"default"!=desiredLocale&&traverseLang(this.langs[desiredLocale],this.lang),this.table.options.localized.call(this.table,this.locale,this.lang),this._executeBindings()},Localize.prototype.getLocale=function(locale){return self.locale},Localize.prototype.getLang=function(locale){return locale?this.langs[locale]:this.lang},Localize.prototype.getText=function(path,value){var path,pathArray=(path=value?path+"|"+value:path).split("|"),text;return this._getLangElement(pathArray,this.locale)||""},Localize.prototype._getLangElement=function(path,locale){var self=this,root=this.lang;return path.forEach((function(level){var rootPath;root&&(rootPath=root[level],root=void 0!==rootPath&&rootPath)})),root},Localize.prototype.bind=function(path,callback){this.bindings[path]||(this.bindings[path]=[]),this.bindings[path].push(callback),callback(this.getText(path),this.lang)},Localize.prototype._executeBindings=function(){var self=this,_loop=function _loop(path){self.bindings[path].forEach((function(binding){binding(self.getText(path),self.lang)}))};for(var path in self.bindings)_loop(path)},Localize.prototype.langs={default:{groups:{item:"item",items:"items"},columns:{},ajax:{loading:"Loading",error:"Error"},pagination:{page_size:"Page Size",page_title:"Show Page",first:"First",first_title:"First Page",last:"Last",last_title:"Last Page",prev:"Prev",prev_title:"Prev Page",next:"Next",next_title:"Next Page",all:"All"},headerFilters:{default:"filter column...",columns:{}}}},Tabulator.prototype.registerModule("localize",Localize);var Comms=function Comms(table){this.table=table};Comms.prototype.getConnections=function(selectors){var self=this,connections=[],connection;return(connection=Tabulator.prototype.comms.lookupTable(selectors)).forEach((function(con){self.table!==con&&connections.push(con)})),connections},Comms.prototype.send=function(selectors,module,action,data){var self=this,connections=this.getConnections(selectors);connections.forEach((function(connection){connection.tableComms(self.table.element,module,action,data)})),!connections.length&&selectors&&console.warn("Table Connection Error - No tables matching selector found",selectors)},Comms.prototype.receive=function(table,module,action,data){if(this.table.modExists(module))return this.table.modules[module].commsReceived(table,action,data);console.warn("Inter-table Comms Error - no such module:",module)},Tabulator.prototype.registerModule("comms",Comms);var Accessor=function Accessor(table){this.table=table,this.allowedTypes=["","data","download","clipboard","print","htmlOutput"]};Accessor.prototype.initializeColumn=function(column){var self=this,match=!1,config={};this.allowedTypes.forEach((function(type){var key="accessor"+(type.charAt(0).toUpperCase()+type.slice(1)),accessor;column.definition[key]&&(accessor=self.lookupAccessor(column.definition[key]))&&(match=!0,config[key]={accessor:accessor,params:column.definition[key+"Params"]||{}})})),match&&(column.modules.accessor=config)},Accessor.prototype.lookupAccessor=function(value){var accessor=!1;switch(void 0===value?"undefined":_typeof(value)){case"string":this.accessors[value]?accessor=this.accessors[value]:console.warn("Accessor Error - No such accessor found, ignoring: ",value);break;case"function":accessor=value}return accessor},Accessor.prototype.transformRow=function(dataIn,type){var self=this,key="accessor"+(type.charAt(0).toUpperCase()+type.slice(1)),data=Tabulator.prototype.helpers.deepClone(dataIn||{});return this.table.columnManager.traverse((function(column){var value,accessor,params,component;column.modules.accessor&&(accessor=column.modules.accessor[key]||column.modules.accessor.accessor||!1)&&"undefined"!=(value=column.getFieldValue(data))&&(component=column.getComponent(),params="function"==typeof accessor.params?accessor.params(value,data,type,component):accessor.params,column.setFieldValue(data,accessor.accessor(value,data,type,params,component)))})),data},Accessor.prototype.accessors={},Tabulator.prototype.registerModule("accessor",Accessor);var Ajax=function Ajax(table){this.table=table,this.config=!1,this.url="",this.urlGenerator=!1,this.params=!1,this.loaderElement=this.createLoaderElement(),this.msgElement=this.createMsgElement(),this.loadingElement=!1,this.errorElement=!1,this.loaderPromise=!1,this.progressiveLoad=!1,this.loading=!1,this.requestOrder=0};Ajax.prototype.initialize=function(){var template;this.loaderElement.appendChild(this.msgElement),this.table.options.ajaxLoaderLoading&&("string"==typeof this.table.options.ajaxLoaderLoading?((template=document.createElement("template")).innerHTML=this.table.options.ajaxLoaderLoading.trim(),this.loadingElement=template.content.firstChild):this.loadingElement=this.table.options.ajaxLoaderLoading),this.loaderPromise=this.table.options.ajaxRequestFunc||this.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||this.defaultURLGenerator,this.table.options.ajaxLoaderError&&("string"==typeof this.table.options.ajaxLoaderError?((template=document.createElement("template")).innerHTML=this.table.options.ajaxLoaderError.trim(),this.errorElement=template.content.firstChild):this.errorElement=this.table.options.ajaxLoaderError),this.table.options.ajaxParams&&this.setParams(this.table.options.ajaxParams),this.table.options.ajaxConfig&&this.setConfig(this.table.options.ajaxConfig),this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL),this.table.options.ajaxProgressiveLoad&&(this.table.options.pagination?(this.progressiveLoad=!1,console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time")):this.table.modExists("page")?(this.progressiveLoad=this.table.options.ajaxProgressiveLoad,this.table.modules.page.initializeProgressive(this.progressiveLoad)):console.error("Pagination plugin is required for progressive ajax loading"))},Ajax.prototype.createLoaderElement=function(){var el=document.createElement("div");return el.classList.add("tabulator-loader"),el},Ajax.prototype.createMsgElement=function(){var el=document.createElement("div");return el.classList.add("tabulator-loader-msg"),el.setAttribute("role","alert"),el},Ajax.prototype.setParams=function(params,update){if(update)for(var key in this.params=this.params||{},params)this.params[key]=params[key];else this.params=params},Ajax.prototype.getParams=function(){return this.params||{}},Ajax.prototype.setConfig=function(config){if(this._loadDefaultConfig(),"string"==typeof config)this.config.method=config;else for(var key in config)this.config[key]=config[key]},Ajax.prototype._loadDefaultConfig=function(force){var self=this;if(!this.config||force)for(var key in this.config={},this.defaultConfig)this.config[key]=this.defaultConfig[key]},Ajax.prototype.setUrl=function(url){this.url=url},Ajax.prototype.getUrl=function(){return this.url},Ajax.prototype.loadData=function(inPosition,columnsChanged){var self=this;return this.progressiveLoad?this._loadDataProgressive():this._loadDataStandard(inPosition,columnsChanged)},Ajax.prototype.nextPage=function(diff){var margin;this.loading||diff<(margin=this.table.options.ajaxProgressiveLoadScrollMargin||2*this.table.rowManager.getElement().clientHeight)&&this.table.modules.page.nextPage().then((function(){})).catch((function(){}))},Ajax.prototype.blockActiveRequest=function(){this.requestOrder++},Ajax.prototype._loadDataProgressive=function(){return this.table.rowManager.setData([]),this.table.modules.page.setPage(1)},Ajax.prototype._loadDataStandard=function(inPosition,columnsChanged){var _this35=this;return new Promise((function(resolve,reject){_this35.sendRequest(inPosition).then((function(data){_this35.table.rowManager.setData(data,inPosition,columnsChanged).then((function(){resolve()})).catch((function(e){reject(e)}))})).catch((function(e){reject(e)}))}))},Ajax.prototype.generateParamsList=function(data,prefix){var self=this,output=[];if(prefix=prefix||"",Array.isArray(data))data.forEach((function(item,i){output=output.concat(self.generateParamsList(item,prefix?prefix+"["+i+"]":i))}));else if("object"===(void 0===data?"undefined":_typeof(data)))for(var key in data)output=output.concat(self.generateParamsList(data[key],prefix?prefix+"["+key+"]":key));else output.push({key:prefix,value:data});return output},Ajax.prototype.serializeParams=function(params){var output=this.generateParamsList(params),encoded=[];return output.forEach((function(item){encoded.push(encodeURIComponent(item.key)+"="+encodeURIComponent(item.value))})),encoded.join("&")},Ajax.prototype.sendRequest=function(silent){var _this36=this,self=this,url=self.url,requestNo,esc,query;return self.requestOrder++,requestNo=self.requestOrder,self._loadDefaultConfig(),new Promise((function(resolve,reject){!1!==self.table.options.ajaxRequesting.call(_this36.table,self.url,self.params)?(self.loading=!0,silent||self.showLoader(),_this36.loaderPromise(url,self.config,self.params).then((function(data){requestNo===self.requestOrder?(self.table.options.ajaxResponse&&(data=self.table.options.ajaxResponse.call(self.table,self.url,self.params,data)),resolve(data),self.hideLoader(),self.loading=!1):console.warn("Ajax Response Blocked - An active ajax request was blocked by an attempt to change table data while the request was being made")})).catch((function(error){console.error("Ajax Load Error: ",error),self.table.options.ajaxError.call(self.table,error),self.showError(),setTimeout((function(){self.hideLoader()}),3e3),self.loading=!1,reject()}))):reject()}))},Ajax.prototype.showLoader=function(){var shouldLoad;if("function"==typeof this.table.options.ajaxLoader?this.table.options.ajaxLoader():this.table.options.ajaxLoader){for(this.hideLoader();this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild);this.msgElement.classList.remove("tabulator-error"),this.msgElement.classList.add("tabulator-loading"),this.loadingElement?this.msgElement.appendChild(this.loadingElement):this.msgElement.innerHTML=this.table.modules.localize.getText("ajax|loading"),this.table.element.appendChild(this.loaderElement)}},Ajax.prototype.showError=function(){for(this.hideLoader();this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild);this.msgElement.classList.remove("tabulator-loading"),this.msgElement.classList.add("tabulator-error"),this.errorElement?this.msgElement.appendChild(this.errorElement):this.msgElement.innerHTML=this.table.modules.localize.getText("ajax|error"),this.table.element.appendChild(this.loaderElement)},Ajax.prototype.hideLoader=function(){this.loaderElement.parentNode&&this.loaderElement.parentNode.removeChild(this.loaderElement)},Ajax.prototype.defaultConfig={method:"GET"},Ajax.prototype.defaultURLGenerator=function(url,config,params){return url&¶ms&&Object.keys(params).length&&(config.method&&"get"!=config.method.toLowerCase()||(config.method="get",url+=(url.includes("?")?"&":"?")+this.serializeParams(params))),url},Ajax.prototype.defaultLoaderPromise=function(url,config,params){var self=this,contentType;return new Promise((function(resolve,reject){if(url=self.urlGenerator(url,config,params),"GET"!=config.method.toUpperCase())if(contentType="object"===_typeof(self.table.options.ajaxContentType)?self.table.options.ajaxContentType:self.contentTypeFormatters[self.table.options.ajaxContentType]){for(var key in contentType.headers)config.headers||(config.headers={}),void 0===config.headers[key]&&(config.headers[key]=contentType.headers[key]);config.body=contentType.body.call(self,url,config,params)}else console.warn("Ajax Error - Invalid ajaxContentType value:",self.table.options.ajaxContentType);url?(void 0===config.headers&&(config.headers={}),void 0===config.headers.Accept&&(config.headers.Accept="application/json"),void 0===config.headers["X-Requested-With"]&&(config.headers["X-Requested-With"]="XMLHttpRequest"),void 0===config.mode&&(config.mode="cors"),"cors"==config.mode?(void 0===config.headers["Access-Control-Allow-Origin"]&&(config.headers["Access-Control-Allow-Origin"]=window.location.origin),void 0===config.credentials&&(config.credentials="same-origin")):void 0===config.credentials&&(config.credentials="include"),fetch(url,config).then((function(response){response.ok?response.json().then((function(data){resolve(data)})).catch((function(error){reject(error),console.warn("Ajax Load Error - Invalid JSON returned",error)})):(console.error("Ajax Load Error - Connection Error: "+response.status,response.statusText),reject(response))})).catch((function(error){console.error("Ajax Load Error - Connection Error: ",error),reject(error)}))):(console.warn("Ajax Load Error - No URL Set"),resolve([]))}))},Ajax.prototype.contentTypeFormatters={json:{headers:{"Content-Type":"application/json"},body:function body(url,config,params){return JSON.stringify(params)}},form:{headers:{},body:function body(url,config,params){var output=this.generateParamsList(params),form=new FormData;return output.forEach((function(item){form.append(item.key,item.value)})),form}}},Tabulator.prototype.registerModule("ajax",Ajax);var ColumnCalcs=function ColumnCalcs(table){this.table=table,this.topCalcs=[],this.botCalcs=[],this.genColumn=!1,this.topElement=this.createElement(),this.botElement=this.createElement(),this.topRow=!1,this.botRow=!1,this.topInitialized=!1,this.botInitialized=!1,this.initialize()};ColumnCalcs.prototype.createElement=function(){var el=document.createElement("div");return el.classList.add("tabulator-calcs-holder"),el},ColumnCalcs.prototype.initialize=function(){this.genColumn=new Column({field:"value"},this)},ColumnCalcs.prototype.registerColumnField=function(){},ColumnCalcs.prototype.initializeColumn=function(column){var def=column.definition,config={topCalcParams:def.topCalcParams||{},botCalcParams:def.bottomCalcParams||{}};if(def.topCalc){switch(_typeof(def.topCalc)){case"string":this.calculations[def.topCalc]?config.topCalc=this.calculations[def.topCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",def.topCalc);break;case"function":config.topCalc=def.topCalc}config.topCalc&&(column.modules.columnCalcs=config,this.topCalcs.push(column),"group"!=this.table.options.columnCalcs&&this.initializeTopRow())}if(def.bottomCalc){switch(_typeof(def.bottomCalc)){case"string":this.calculations[def.bottomCalc]?config.botCalc=this.calculations[def.bottomCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",def.bottomCalc);break;case"function":config.botCalc=def.bottomCalc}config.botCalc&&(column.modules.columnCalcs=config,this.botCalcs.push(column),"group"!=this.table.options.columnCalcs&&this.initializeBottomRow())}},ColumnCalcs.prototype.removeCalcs=function(){var changed=!1;this.topInitialized&&(this.topInitialized=!1,this.topElement.parentNode.removeChild(this.topElement),changed=!0),this.botInitialized&&(this.botInitialized=!1,this.table.footerManager.remove(this.botElement),changed=!0),changed&&this.table.rowManager.adjustTableSize()},ColumnCalcs.prototype.initializeTopRow=function(){this.topInitialized||(this.table.columnManager.getElement().insertBefore(this.topElement,this.table.columnManager.headersElement.nextSibling),this.topInitialized=!0)},ColumnCalcs.prototype.initializeBottomRow=function(){this.botInitialized||(this.table.footerManager.prepend(this.botElement),this.botInitialized=!0)},ColumnCalcs.prototype.scrollHorizontal=function(left){var hozAdjust=0,scrollWidth=this.table.columnManager.getElement().scrollWidth-this.table.element.clientWidth;this.botInitialized&&(this.botRow.getElement().style.marginLeft=-left+"px")},ColumnCalcs.prototype.recalc=function(rows){var data,row;if(this.topInitialized||this.botInitialized){if(data=this.rowsToData(rows),this.topInitialized){for(this.topRow&&this.topRow.deleteCells(),row=this.generateRow("top",this.rowsToData(rows)),this.topRow=row;this.topElement.firstChild;)this.topElement.removeChild(this.topElement.firstChild);this.topElement.appendChild(row.getElement()),row.initialize(!0)}if(this.botInitialized){for(this.botRow&&this.botRow.deleteCells(),row=this.generateRow("bottom",this.rowsToData(rows)),this.botRow=row;this.botElement.firstChild;)this.botElement.removeChild(this.botElement.firstChild);this.botElement.appendChild(row.getElement()),row.initialize(!0)}this.table.rowManager.adjustTableSize(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()}},ColumnCalcs.prototype.recalcRowGroup=function(row){this.recalcGroup(this.table.modules.groupRows.getRowGroup(row))},ColumnCalcs.prototype.recalcAll=function(){var _this37=this,groups;(this.topCalcs.length||this.botCalcs.length)&&("group"!==this.table.options.columnCalcs&&this.recalc(this.table.rowManager.activeRows),this.table.options.groupBy&&"table"!==this.table.options.columnCalcs&&table.modules.groupRows.getChildGroups().forEach((function(group){_this37.recalcGroup(group)})))},ColumnCalcs.prototype.recalcGroup=function(group){var data,rowData;group&&group.calcs&&(group.calcs.bottom&&(data=this.rowsToData(group.rows),rowData=this.generateRowData("bottom",data),group.calcs.bottom.updateData(rowData),group.calcs.bottom.reinitialize()),group.calcs.top&&(data=this.rowsToData(group.rows),rowData=this.generateRowData("top",data),group.calcs.top.updateData(rowData),group.calcs.top.reinitialize()))},ColumnCalcs.prototype.generateTopRow=function(rows){return this.generateRow("top",this.rowsToData(rows))},ColumnCalcs.prototype.generateBottomRow=function(rows){return this.generateRow("bottom",this.rowsToData(rows))},ColumnCalcs.prototype.rowsToData=function(rows){var _this38=this,data=[];return rows.forEach((function(row){if(data.push(row.getData()),_this38.table.options.dataTree&&_this38.table.options.dataTreeChildColumnCalcs&&row.modules.dataTree.open){var children=_this38.rowsToData(_this38.table.modules.dataTree.getFilteredTreeChildren(row));data=data.concat(children)}})),data},ColumnCalcs.prototype.generateRow=function(pos,data){var self=this,rowData=this.generateRowData(pos,data),row;return self.table.modExists("mutator")&&self.table.modules.mutator.disable(),row=new Row(rowData,this,"calc"),self.table.modExists("mutator")&&self.table.modules.mutator.enable(),row.getElement().classList.add("tabulator-calcs","tabulator-calcs-"+pos),row.generateCells=function(){var cells=[];self.table.columnManager.columnsByIndex.forEach((function(column){self.genColumn.setField(column.getField()),self.genColumn.hozAlign=column.hozAlign,column.definition[pos+"CalcFormatter"]&&self.table.modExists("format")?self.genColumn.modules.format={formatter:self.table.modules.format.getFormatter(column.definition[pos+"CalcFormatter"]),params:column.definition[pos+"CalcFormatterParams"]}:self.genColumn.modules.format={formatter:self.table.modules.format.getFormatter("plaintext"),params:{}},self.genColumn.definition.cssClass=column.definition.cssClass;var cell=new Cell(self.genColumn,row);cell.column=column,cell.setWidth(),column.cells.push(cell),cells.push(cell),column.visible||cell.hide()})),this.cells=cells},row},ColumnCalcs.prototype.generateRowData=function(pos,data){var rowData={},calcs="top"==pos?this.topCalcs:this.botCalcs,type="top"==pos?"topCalc":"botCalc",params,paramKey;return calcs.forEach((function(column){var values=[];column.modules.columnCalcs&&column.modules.columnCalcs[type]&&(data.forEach((function(item){values.push(column.getFieldValue(item))})),paramKey=type+"Params",params="function"==typeof column.modules.columnCalcs[paramKey]?column.modules.columnCalcs[paramKey](values,data):column.modules.columnCalcs[paramKey],column.setFieldValue(rowData,column.modules.columnCalcs[type](values,data,params)))})),rowData},ColumnCalcs.prototype.hasTopCalcs=function(){return!!this.topCalcs.length},ColumnCalcs.prototype.hasBottomCalcs=function(){return!!this.botCalcs.length},ColumnCalcs.prototype.redraw=function(){this.topRow&&this.topRow.normalizeHeight(!0),this.botRow&&this.botRow.normalizeHeight(!0)},ColumnCalcs.prototype.getResults=function(){var self=this,results={},groups;return this.table.options.groupBy&&this.table.modExists("groupRows")?(groups=this.table.modules.groupRows.getGroups(!0)).forEach((function(group){results[group.getKey()]=self.getGroupResults(group)})):results={top:this.topRow?this.topRow.getData():{},bottom:this.botRow?this.botRow.getData():{}},results},ColumnCalcs.prototype.getGroupResults=function(group){var self=this,groupObj=group._getSelf(),subGroups=group.getSubGroups(),subGroupResults={},results={};return subGroups.forEach((function(subgroup){subGroupResults[subgroup.getKey()]=self.getGroupResults(subgroup)})),results={top:groupObj.calcs.top?groupObj.calcs.top.getData():{},bottom:groupObj.calcs.bottom?groupObj.calcs.bottom.getData():{},groups:subGroupResults}},ColumnCalcs.prototype.calculations={avg:function avg(values,data,calcParams){var output=0,precision=void 0!==calcParams.precision?calcParams.precision:2;return values.length&&(output=values.reduce((function(sum,value){return sum+(value=Number(value))})),output/=values.length,output=!1!==precision?output.toFixed(precision):output),parseFloat(output).toString()},max:function max(values,data,calcParams){var output=null,precision=void 0!==calcParams.precision&&calcParams.precision;return values.forEach((function(value){((value=Number(value))>output||null===output)&&(output=value)})),null!==output?!1!==precision?output.toFixed(precision):output:""},min:function min(values,data,calcParams){var output=null,precision=void 0!==calcParams.precision&&calcParams.precision;return values.forEach((function(value){((value=Number(value))"),options.dataTreeExpandElement?"string"==typeof options.dataTreeExpandElement?((dummyEl=document.createElement("div")).innerHTML=options.dataTreeExpandElement,this.expandEl=dummyEl.firstChild):this.expandEl=options.dataTreeExpandElement:(this.expandEl=document.createElement("div"),this.expandEl.classList.add("tabulator-data-tree-control"),this.expandEl.tabIndex=0,this.expandEl.innerHTML="
"),_typeof(options.dataTreeStartExpanded)){case"boolean":this.startOpen=function(row,index){return options.dataTreeStartExpanded};break;case"function":this.startOpen=options.dataTreeStartExpanded;break;default:this.startOpen=function(row,index){return options.dataTreeStartExpanded[index]}}},DataTree.prototype.initializeRow=function(row){var childArray=row.getData()[this.field],isArray=Array.isArray(childArray),children=isArray||!isArray&&"object"===(void 0===childArray?"undefined":_typeof(childArray))&&null!==childArray;!children&&row.modules.dataTree&&row.modules.dataTree.branchEl&&row.modules.dataTree.branchEl.parentNode.removeChild(row.modules.dataTree.branchEl),!children&&row.modules.dataTree&&row.modules.dataTree.controlEl&&row.modules.dataTree.controlEl.parentNode.removeChild(row.modules.dataTree.controlEl),row.modules.dataTree={index:row.modules.dataTree?row.modules.dataTree.index:0,open:!!children&&(row.modules.dataTree?row.modules.dataTree.open:this.startOpen(row.getComponent(),0)),controlEl:!(!row.modules.dataTree||!children)&&row.modules.dataTree.controlEl,branchEl:!(!row.modules.dataTree||!children)&&row.modules.dataTree.branchEl,parent:!!row.modules.dataTree&&row.modules.dataTree.parent,children:children}},DataTree.prototype.layoutRow=function(row){var cell,el=(this.elementField?row.getCell(this.elementField):row.getCells()[0]).getElement(),config=row.modules.dataTree;config.branchEl&&(config.branchEl.parentNode&&config.branchEl.parentNode.removeChild(config.branchEl),config.branchEl=!1),config.controlEl&&(config.controlEl.parentNode&&config.controlEl.parentNode.removeChild(config.controlEl),config.controlEl=!1),this.generateControlElement(row,el),row.element.classList.add("tabulator-tree-level-"+config.index),config.index&&(this.branchEl?(config.branchEl=this.branchEl.cloneNode(!0),el.insertBefore(config.branchEl,el.firstChild),config.branchEl.style.marginLeft=(config.branchEl.offsetWidth+config.branchEl.style.marginRight)*(config.index-1)+config.index*this.indent+"px"):el.style.paddingLeft=parseInt(window.getComputedStyle(el,null).getPropertyValue("padding-left"))+config.index*this.indent+"px")},DataTree.prototype.generateControlElement=function(row,el){var _this40=this,config=row.modules.dataTree,el=el||row.getCells()[0].getElement(),oldControl=config.controlEl;!1!==config.children&&(config.open?(config.controlEl=this.collapseEl.cloneNode(!0),config.controlEl.addEventListener("click",(function(e){e.stopPropagation(),_this40.collapseRow(row)}))):(config.controlEl=this.expandEl.cloneNode(!0),config.controlEl.addEventListener("click",(function(e){e.stopPropagation(),_this40.expandRow(row)}))),config.controlEl.addEventListener("mousedown",(function(e){e.stopPropagation()})),oldControl&&oldControl.parentNode===el?oldControl.parentNode.replaceChild(config.controlEl,oldControl):el.insertBefore(config.controlEl,el.firstChild))},DataTree.prototype.setDisplayIndex=function(index){this.displayIndex=index},DataTree.prototype.getDisplayIndex=function(){return this.displayIndex},DataTree.prototype.getRows=function(rows){var _this41=this,output=[];return rows.forEach((function(row,i){var config,children;output.push(row),row instanceof Row&&((config=row.modules.dataTree.children).index||!1===config.children||(children=_this41.getChildren(row)).forEach((function(child){output.push(child)})))})),output},DataTree.prototype.getChildren=function(row){var _this42=this,config=row.modules.dataTree,children=[],output=[];return!1!==config.children&&config.open&&(Array.isArray(config.children)||(config.children=this.generateChildren(row)),children=this.table.modExists("filter")?this.table.modules.filter.filter(config.children):config.children,this.table.modExists("sort")&&this.table.modules.sort.sort(children),children.forEach((function(child){var subChildren;output.push(child),_this42.getChildren(child).forEach((function(sub){output.push(sub)}))}))),output},DataTree.prototype.generateChildren=function(row){var _this43=this,children=[],childArray=row.getData()[this.field];return Array.isArray(childArray)||(childArray=[childArray]),childArray.forEach((function(childData){var childRow=new Row(childData||{},_this43.table.rowManager);childRow.modules.dataTree.index=row.modules.dataTree.index+1,childRow.modules.dataTree.parent=row,childRow.modules.dataTree.children&&(childRow.modules.dataTree.open=_this43.startOpen(childRow.getComponent(),childRow.modules.dataTree.index)),children.push(childRow)})),children},DataTree.prototype.expandRow=function(row,silent){var config=row.modules.dataTree;!1!==config.children&&(config.open=!0,row.reinitialize(),this.table.rowManager.refreshActiveData("tree",!1,!0),this.table.options.dataTreeRowExpanded(row.getComponent(),row.modules.dataTree.index))},DataTree.prototype.collapseRow=function(row){var config=row.modules.dataTree;!1!==config.children&&(config.open=!1,row.reinitialize(),this.table.rowManager.refreshActiveData("tree",!1,!0),this.table.options.dataTreeRowCollapsed(row.getComponent(),row.modules.dataTree.index))},DataTree.prototype.toggleRow=function(row){var config=row.modules.dataTree;!1!==config.children&&(config.open?this.collapseRow(row):this.expandRow(row))},DataTree.prototype.getTreeParent=function(row){return!!row.modules.dataTree.parent&&row.modules.dataTree.parent.getComponent()},DataTree.prototype.getFilteredTreeChildren=function(row){var config=row.modules.dataTree,output=[],children;return config.children&&(Array.isArray(config.children)||(config.children=this.generateChildren(row)),(children=this.table.modExists("filter")?this.table.modules.filter.filter(config.children):config.children).forEach((function(childRow){childRow instanceof Row&&output.push(childRow)}))),output},DataTree.prototype.rowDelete=function(row){var parent=row.modules.dataTree.parent,childIndex;parent&&(!1!==(childIndex=this.findChildIndex(row,parent))&&parent.data[this.field].splice(childIndex,1),parent.data[this.field].length||delete parent.data[this.field],this.initializeRow(parent),this.layoutRow(parent)),this.table.rowManager.refreshActiveData("tree",!1,!0)},DataTree.prototype.addTreeChildRow=function(row,data,top,index){var childIndex=!1;"string"==typeof data&&(data=JSON.parse(data)),Array.isArray(row.data[this.field])||(row.data[this.field]=[],row.modules.dataTree.open=this.startOpen(row.getComponent(),row.modules.dataTree.index)),void 0!==index&&!1!==(childIndex=this.findChildIndex(index,row))&&row.data[this.field].splice(top?childIndex:childIndex+1,0,data),!1===childIndex&&(top?row.data[this.field].unshift(data):row.data[this.field].push(data)),this.initializeRow(row),this.layoutRow(row),this.table.rowManager.refreshActiveData("tree",!1,!0)},DataTree.prototype.findChildIndex=function(subject,parent){var _this44=this,match=!1;return"object"==(void 0===subject?"undefined":_typeof(subject))?subject instanceof Row?match=subject.data:subject instanceof RowComponent?match=subject._getSelf().data:"undefined"!=typeof HTMLElement&&subject instanceof HTMLElement&&parent.modules.dataTree&&(match=parent.modules.dataTree.children.find((function(childRow){return childRow instanceof Row&&childRow.element===subject})))&&(match=match.data):match=null!=subject&&parent.data[this.field].find((function(row){return row.data[_this44.table.options.index]==subject})),match&&(Array.isArray(parent.data[this.field])&&(match=parent.data[this.field].indexOf(match)),-1==match&&(match=!1)),match},DataTree.prototype.getTreeChildren=function(row){var config=row.modules.dataTree,output=[];return config.children&&(Array.isArray(config.children)||(config.children=this.generateChildren(row)),config.children.forEach((function(childRow){childRow instanceof Row&&output.push(childRow.getComponent())}))),output},DataTree.prototype.checkForRestyle=function(cell){cell.row.cells.indexOf(cell)||cell.row.reinitialize()},DataTree.prototype.getChildField=function(){return this.field},DataTree.prototype.redrawNeeded=function(data){return!!this.field&&void 0!==data[this.field]||!!this.elementField&&void 0!==data[this.elementField]},Tabulator.prototype.registerModule("dataTree",DataTree);var Download=function Download(table){this.table=table};Download.prototype.download=function(type,filename,options,range,interceptCallback){var self=this,downloadFunc=!1;function buildLink(data,mime){interceptCallback?!0===interceptCallback?self.triggerDownload(data,mime,type,filename,!0):interceptCallback(data):self.triggerDownload(data,mime,type,filename)}if("function"==typeof type?downloadFunc=type:self.downloaders[type]?downloadFunc=self.downloaders[type]:console.warn("Download Error - No such download type found: ",type),downloadFunc){var list=this.generateExportList(range);downloadFunc.call(this.table,list,options||{},buildLink)}},Download.prototype.generateExportList=function(range){var list=this.table.modules.export.generateExportList(this.table.options.downloadConfig,!1,range||this.table.options.downloadRowRange,"download"),groupHeader=this.table.options.groupHeaderDownload;return groupHeader&&!Array.isArray(groupHeader)&&(groupHeader=[groupHeader]),list.forEach((function(row){var group;"group"===row.type&&(group=row.columns[0],groupHeader&&groupHeader[row.indent]&&(group.value=groupHeader[row.indent](group.value,row.component._group.getRowCount(),row.component._group.getData(),row.component)))})),list},Download.prototype.triggerDownload=function(data,mime,type,filename,newTab){var element=document.createElement("a"),blob=new Blob([data],{type:mime}),filename=filename||"Tabulator."+("function"==typeof type?"txt":type);(blob=this.table.options.downloadReady.call(this.table,data,blob))&&(newTab?window.open(window.URL.createObjectURL(blob)):navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(blob,filename):(element.setAttribute("href",window.URL.createObjectURL(blob)),element.setAttribute("download",filename),element.style.display="none",document.body.appendChild(element),element.click(),document.body.removeChild(element)),this.table.options.downloadComplete&&this.table.options.downloadComplete())},Download.prototype.commsReceived=function(table,action,data){switch(action){case"intercept":this.download(data.type,"",data.options,data.active,data.intercept)}},Download.prototype.downloaders={csv:function csv(list,options,setFileContents){var delimiter=options&&options.delimiter?options.delimiter:",",fileContents=[],headers=[];list.forEach((function(row){var item=[];switch(row.type){case"group":console.warn("Download Warning - CSV downloader cannot process row groups");break;case"calc":console.warn("Download Warning - CSV downloader cannot process column calculations");break;case"header":row.columns.forEach((function(col,i){col&&1===col.depth&&(headers[i]=void 0===col.value||"null"==typeof col.value?"":col.value)}));break;case"row":row.columns.forEach((function(col){if(col){switch(_typeof(col.value)){case"object":col.value=JSON.stringify(col.value);break;case"undefined":case"null":col.value=""}item.push('"'+String(col.value).split('"').join('""')+'"')}})),fileContents.push(item.join(delimiter))}})),headers.length&&(fileContents=[headers].concat(fileContents)),fileContents=fileContents.join("\n"),options.bom&&(fileContents="\ufeff"+fileContents),setFileContents(fileContents,"text/csv")},json:function json(list,options,setFileContents){var fileContents=[];list.forEach((function(row){var item={};switch(row.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":row.columns.forEach((function(col){col&&(item[col.component.getField()]=col.value)})),fileContents.push(item)}})),setFileContents(fileContents=JSON.stringify(fileContents,null,"\t"),"application/json")},pdf:function pdf(list,options,setFileContents){var header=[],body=[],autoTableParams={},rowGroupStyles=options.rowGroupStyles||{fontStyle:"bold",fontSize:12,cellPadding:6,fillColor:220},rowCalcStyles=options.rowCalcStyles||{fontStyle:"bold",fontSize:10,cellPadding:4,fillColor:232},jsPDFParams=options.jsPDF||{},title=options&&options.title?options.title:"";function parseRow(row,styles){var rowData=[];return row.columns.forEach((function(col){var cell;if(col){switch(_typeof(col.value)){case"object":col.value=JSON.stringify(col.value);break;case"undefined":case"null":col.value=""}cell={content:col.value,colSpan:col.width,rowSpan:col.height},styles&&(cell.styles=styles),rowData.push(cell)}else rowData.push("")})),rowData}jsPDFParams.orientation||(jsPDFParams.orientation=options.orientation||"landscape"),jsPDFParams.unit||(jsPDFParams.unit="pt"),list.forEach((function(row){switch(row.type){case"header":header.push(parseRow(row));break;case"group":body.push(parseRow(row,rowGroupStyles));break;case"calc":body.push(parseRow(row,rowCalcStyles));break;case"row":body.push(parseRow(row))}}));var doc=new jsPDF(jsPDFParams);options&&options.autoTable&&(autoTableParams="function"==typeof options.autoTable?options.autoTable(doc)||{}:options.autoTable),title&&(autoTableParams.addPageContent=function(data){doc.text(title,40,30)}),autoTableParams.head=header,autoTableParams.body=body,doc.autoTable(autoTableParams),options&&options.documentProcessing&&options.documentProcessing(doc),setFileContents(doc.output("arraybuffer"),"application/pdf")},xlsx:function xlsx(list,options,setFileContents){var self=this,sheetName=options.sheetName||"Sheet1",workbook=XLSX.utils.book_new(),output;function generateSheet(){var rows=[],merges=[],worksheet={},range={s:{c:0,r:0},e:{c:list[0]?list[0].columns.reduce((function(a,b){return a+(b&&b.width?b.width:1)}),0):0,r:list.length}};return list.forEach((function(row,i){var rowData=[];row.columns.forEach((function(col,j){col?(rowData.push(col.value instanceof Date||"object"!==_typeof(col.value)?col.value:JSON.stringify(col.value)),(col.width>1||col.height>-1)&&merges.push({s:{r:i,c:j},e:{r:i+col.height-1,c:j+col.width-1}})):rowData.push("")})),rows.push(rowData)})),XLSX.utils.sheet_add_aoa(worksheet,rows),worksheet["!ref"]=XLSX.utils.encode_range(range),merges.length&&(worksheet["!merges"]=merges),worksheet}if(workbook.SheetNames=[],workbook.Sheets={},options.sheetOnly)setFileContents(generateSheet());else{if(options.sheets)for(var sheet in options.sheets)!0===options.sheets[sheet]?(workbook.SheetNames.push(sheet),workbook.Sheets[sheet]=generateSheet()):(workbook.SheetNames.push(sheet),this.table.modules.comms.send(options.sheets[sheet],"download","intercept",{type:"xlsx",options:{sheetOnly:!0},active:this.active,intercept:function intercept(data){workbook.Sheets[sheet]=data}}));else workbook.SheetNames.push(sheetName),workbook.Sheets[sheetName]=generateSheet();options.documentProcessing&&(workbook=options.documentProcessing(workbook)),setFileContents(s2ab(output=XLSX.write(workbook,{bookType:"xlsx",bookSST:!0,type:"binary"})),"application/octet-stream")}function s2ab(s){for(var buf=new ArrayBuffer(s.length),view=new Uint8Array(buf),i=0;i!=s.length;++i)view[i]=255&s.charCodeAt(i);return buf}},html:function html(list,options,setFileContents){this.modExists("export",!0)&&setFileContents(this.modules.export.genereateHTMLTable(list),"text/html")}},Tabulator.prototype.registerModule("download",Download);var Edit=function Edit(table){this.table=table,this.currentCell=!1,this.mouseClick=!1,this.recursionBlock=!1,this.invalidEdit=!1,this.editedCells=[]};Edit.prototype.initializeColumn=function(column){var self=this,config={editor:!1,blocked:!1,check:column.definition.editable,params:column.definition.editorParams||{}};switch(_typeof(column.definition.editor)){case"string":"tick"===column.definition.editor&&(column.definition.editor="tickCross",console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor")),this.editors[column.definition.editor]?config.editor=this.editors[column.definition.editor]:console.warn("Editor Error - No such editor found: ",column.definition.editor);break;case"function":config.editor=column.definition.editor;break;case"boolean":!0===column.definition.editor&&("function"!=typeof column.definition.formatter?("tick"===column.definition.formatter&&(column.definition.formatter="tickCross",console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor")),this.editors[column.definition.formatter]?config.editor=this.editors[column.definition.formatter]:config.editor=this.editors.input):console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ",column.definition.formatter))}config.editor&&(column.modules.edit=config)},Edit.prototype.getCurrentCell=function(){return!!this.currentCell&&this.currentCell.getComponent()},Edit.prototype.clearEditor=function(cancel){var cell=this.currentCell,cellEl;if(this.invalidEdit=!1,cell){for(this.currentCell=!1,cellEl=cell.getElement(),cancel?cell.validate():cellEl.classList.remove("tabulator-validation-fail"),cellEl.classList.remove("tabulator-editing");cellEl.firstChild;)cellEl.removeChild(cellEl.firstChild);cell.row.getElement().classList.remove("tabulator-row-editing")}},Edit.prototype.cancelEdit=function(){if(this.currentCell){var cell=this.currentCell,component=this.currentCell.getComponent();this.clearEditor(!0),cell.setValueActual(cell.getValue()),cell.cellRendered(),cell.column.cellEvents.cellEditCancelled&&cell.column.cellEvents.cellEditCancelled.call(this.table,component),this.table.options.cellEditCancelled.call(this.table,component)}},Edit.prototype.bindEditor=function(cell){var self=this,element=cell.getElement();element.setAttribute("tabindex",0),element.addEventListener("click",(function(e){element.classList.contains("tabulator-editing")||element.focus({preventScroll:!0})})),element.addEventListener("mousedown",(function(e){self.mouseClick=!0})),element.addEventListener("focus",(function(e){self.recursionBlock||self.edit(cell,e,!1)}))},Edit.prototype.focusCellNoEvent=function(cell,block){this.recursionBlock=!0,block&&"ie"===this.table.browser||cell.getElement().focus({preventScroll:!0}),this.recursionBlock=!1},Edit.prototype.editCell=function(cell,forceEdit){this.focusCellNoEvent(cell),this.edit(cell,!1,forceEdit)},Edit.prototype.focusScrollAdjust=function(cell){if("virtual"==this.table.rowManager.getRenderMode()){var topEdge=this.table.rowManager.element.scrollTop,bottomEdge=this.table.rowManager.element.clientHeight+this.table.rowManager.element.scrollTop,rowEl=cell.row.getElement(),offset=rowEl.offsetTop;rowEl.offsetTopbottomEdge&&(this.table.rowManager.element.scrollTop+=rowEl.offsetTop+rowEl.offsetHeight-bottomEdge)}},Edit.prototype.edit=function(cell,e,forceEdit){var self=this,allowEdit=!0,rendered=function rendered(){},element=cell.getElement(),cellEditor,component,params;if(!this.currentCell){if(cell.column.modules.edit.blocked)return this.mouseClick=!1,element.blur(),!1;switch(e&&e.stopPropagation(),_typeof(cell.column.modules.edit.check)){case"function":allowEdit=cell.column.modules.edit.check(cell.getComponent());break;case"boolean":allowEdit=cell.column.modules.edit.check}if(allowEdit||forceEdit){if(self.cancelEdit(),self.currentCell=cell,this.focusScrollAdjust(cell),component=cell.getComponent(),this.mouseClick&&(this.mouseClick=!1,cell.column.cellEvents.cellClick&&cell.column.cellEvents.cellClick.call(this.table,e,component)),cell.column.cellEvents.cellEditing&&cell.column.cellEvents.cellEditing.call(this.table,component),self.table.options.cellEditing.call(this.table,component),params="function"==typeof cell.column.modules.edit.params?cell.column.modules.edit.params(component):cell.column.modules.edit.params,!1===(cellEditor=cell.column.modules.edit.editor.call(self,component,onRendered,success,cancel,params)))return element.blur(),!1;if(!(cellEditor instanceof Node))return console.warn("Edit Error - Editor should return an instance of Node, the editor returned:",cellEditor),element.blur(),!1;for(element.classList.add("tabulator-editing"),cell.row.getElement().classList.add("tabulator-row-editing");element.firstChild;)element.removeChild(element.firstChild);element.appendChild(cellEditor),rendered();for(var children=element.children,i=0;i46){if(index>=mask.length)return e.preventDefault(),e.stopPropagation(),success=!1,!1;switch(mask[index]){case maskLetter:if(char.toUpperCase()==char.toLowerCase())return e.preventDefault(),e.stopPropagation(),success=!1,!1;break;case maskNumber:if(isNaN(char))return e.preventDefault(),e.stopPropagation(),success=!1,!1;break;case maskWildcard:break;default:if(char!==mask[index])return e.preventDefault(),e.stopPropagation(),success=!1,!1}success=!0}})),el.addEventListener("keyup",(function(e){e.keyCode>46&&options.maskAutoFill&&fillSymbols(el.value.length)})),el.placeholder||(el.placeholder=mask),options.maskAutoFill&&fillSymbols(el.value.length)},Edit.prototype.getEditedCells=function(){var output=[];return this.editedCells.forEach((function(cell){output.push(cell.getComponent())})),output},Edit.prototype.clearEdited=function(cell){var editIndex;cell.modules.edit&&cell.modules.edit.edited&&(cell.modules.validate.invalid=!1,(editIndex=this.editedCells.indexOf(cell))>-1&&this.editedCells.splice(editIndex,1))},Edit.prototype.editors={input:function input(cell,onRendered,success,cancel,editorParams){var cellValue=cell.getValue(),input=document.createElement("input");if(input.setAttribute("type",editorParams.search?"search":"text"),input.style.padding="4px",input.style.width="100%",input.style.boxSizing="border-box",editorParams.elementAttributes&&"object"==_typeof(editorParams.elementAttributes))for(var key in editorParams.elementAttributes)"+"==key.charAt(0)?(key=key.slice(1),input.setAttribute(key,input.getAttribute(key)+editorParams.elementAttributes["+"+key])):input.setAttribute(key,editorParams.elementAttributes[key]);function onChange(e){null==cellValue&&""!==input.value||input.value!==cellValue?success(input.value)&&(cellValue=input.value):cancel()}return input.value=void 0!==cellValue?cellValue:"",onRendered((function(){input.focus({preventScroll:!0}),input.style.height="100%"})),input.addEventListener("change",onChange),input.addEventListener("blur",onChange),input.addEventListener("keydown",(function(e){switch(e.keyCode){case 13:onChange(e);break;case 27:cancel()}})),editorParams.mask&&this.table.modules.edit.maskInput(input,editorParams),input},textarea:function textarea(cell,onRendered,success,cancel,editorParams){var self=this,cellValue=cell.getValue(),vertNav=editorParams.verticalNavigation||"hybrid",value=String(null!=cellValue?cellValue:""),count=(value.match(/(?:\r\n|\r|\n)/g)||[]).length+1,input=document.createElement("textarea"),scrollHeight=0;if(input.style.display="block",input.style.padding="2px",input.style.height="100%",input.style.width="100%",input.style.boxSizing="border-box",input.style.whiteSpace="pre-wrap",input.style.resize="none",editorParams.elementAttributes&&"object"==_typeof(editorParams.elementAttributes))for(var key in editorParams.elementAttributes)"+"==key.charAt(0)?(key=key.slice(1),input.setAttribute(key,input.getAttribute(key)+editorParams.elementAttributes["+"+key])):input.setAttribute(key,editorParams.elementAttributes[key]);function onChange(e){null==cellValue&&""!==input.value||input.value!==cellValue?(success(input.value)&&(cellValue=input.value),setTimeout((function(){cell.getRow().normalizeHeight()}),300)):cancel()}return input.value=value,onRendered((function(){input.focus({preventScroll:!0}),input.style.height="100%"})),input.addEventListener("change",onChange),input.addEventListener("blur",onChange),input.addEventListener("keyup",(function(){input.style.height="";var heightNow=input.scrollHeight;input.style.height=heightNow+"px",heightNow!=scrollHeight&&(scrollHeight=heightNow,cell.getRow().normalizeHeight())})),input.addEventListener("keydown",(function(e){switch(e.keyCode){case 27:cancel();break;case 38:("editor"==vertNav||"hybrid"==vertNav&&input.selectionStart)&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 40:("editor"==vertNav||"hybrid"==vertNav&&input.selectionStart!==input.value.length)&&(e.stopImmediatePropagation(),e.stopPropagation())}})),editorParams.mask&&this.table.modules.edit.maskInput(input,editorParams),input},number:function number(cell,onRendered,success,cancel,editorParams){var cellValue=cell.getValue(),vertNav=editorParams.verticalNavigation||"editor",input=document.createElement("input");if(input.setAttribute("type","number"),void 0!==editorParams.max&&input.setAttribute("max",editorParams.max),void 0!==editorParams.min&&input.setAttribute("min",editorParams.min),void 0!==editorParams.step&&input.setAttribute("step",editorParams.step),input.style.padding="4px",input.style.width="100%",input.style.boxSizing="border-box",editorParams.elementAttributes&&"object"==_typeof(editorParams.elementAttributes))for(var key in editorParams.elementAttributes)"+"==key.charAt(0)?(key=key.slice(1),input.setAttribute(key,input.getAttribute(key)+editorParams.elementAttributes["+"+key])):input.setAttribute(key,editorParams.elementAttributes[key]);input.value=cellValue;var blurFunc=function blurFunc(e){onChange()};function onChange(){var value=input.value;isNaN(value)||""===value||(value=Number(value)),value!==cellValue?success(value)&&(cellValue=value):cancel()}return onRendered((function(){input.removeEventListener("blur",blurFunc),input.focus({preventScroll:!0}),input.style.height="100%",input.addEventListener("blur",blurFunc)})),input.addEventListener("keydown",(function(e){switch(e.keyCode){case 13:onChange();break;case 27:cancel();break;case 38:case 40:"editor"==vertNav&&(e.stopImmediatePropagation(),e.stopPropagation())}})),editorParams.mask&&this.table.modules.edit.maskInput(input,editorParams),input},range:function range(cell,onRendered,success,cancel,editorParams){var cellValue=cell.getValue(),input=document.createElement("input");if(input.setAttribute("type","range"),void 0!==editorParams.max&&input.setAttribute("max",editorParams.max),void 0!==editorParams.min&&input.setAttribute("min",editorParams.min),void 0!==editorParams.step&&input.setAttribute("step",editorParams.step),input.style.padding="4px",input.style.width="100%",input.style.boxSizing="border-box",editorParams.elementAttributes&&"object"==_typeof(editorParams.elementAttributes))for(var key in editorParams.elementAttributes)"+"==key.charAt(0)?(key=key.slice(1),input.setAttribute(key,input.getAttribute(key)+editorParams.elementAttributes["+"+key])):input.setAttribute(key,editorParams.elementAttributes[key]);function onChange(){var value=input.value;isNaN(value)||""===value||(value=Number(value)),value!=cellValue?success(value)&&(cellValue=value):cancel()}return input.value=cellValue,onRendered((function(){input.focus({preventScroll:!0}),input.style.height="100%"})),input.addEventListener("blur",(function(e){onChange()})),input.addEventListener("keydown",(function(e){switch(e.keyCode){case 13:onChange();break;case 27:cancel()}})),input},select:function select(cell,onRendered,success,cancel,editorParams){var self=this,cellEl=cell.getElement(),initialValue=cell.getValue(),vertNav=editorParams.verticalNavigation||"editor",initialDisplayValue=void 0!==initialValue||null===initialValue?initialValue:void 0!==editorParams.defaultValue?editorParams.defaultValue:[],input=document.createElement("input"),listEl=document.createElement("div"),multiselect=editorParams.multiselect,dataItems=[],currentItem={},displayItems=[],currentItems=[],blurable=!0;function getUniqueColumnValues(field){var output={},data=self.table.getData(),column;return(column=field?self.table.columnManager.getColumnByField(field):cell.getColumn()._getSelf())?(data.forEach((function(row){var val=column.getFieldValue(row);null!=val&&""!==val&&(output[val]=!0)})),output=editorParams.sortValuesList?"asc"==editorParams.sortValuesList?Object.keys(output).sort():Object.keys(output).sort().reverse():Object.keys(output)):console.warn("unable to find matching column to create select lookup list:",field),output}function parseItems(inputValues,curentValues){var dataList=[],displayList=[];function processComplexListItem(item){var item={label:item.label,value:item.value,itemParams:item.itemParams,elementAttributes:item.elementAttributes,element:!1};return curentValues.indexOf(item.value)>-1&&setItem(item),dataList.push(item),displayList.push(item),item}if("function"==typeof inputValues&&(inputValues=inputValues(cell)),Array.isArray(inputValues))inputValues.forEach((function(value){var item;"object"===(void 0===value?"undefined":_typeof(value))?value.options?(item={label:value.label,group:!0,itemParams:value.itemParams,elementAttributes:value.elementAttributes,element:!1},displayList.push(item),value.options.forEach((function(item){processComplexListItem(item)}))):processComplexListItem(value):(item={label:value,value:value,element:!1},curentValues.indexOf(item.value)>-1&&setItem(item),dataList.push(item),displayList.push(item))}));else for(var key in inputValues){var item={label:inputValues[key],value:key,element:!1};curentValues.indexOf(item.value)>-1&&setItem(item),dataList.push(item),displayList.push(item)}dataItems=dataList,displayItems=displayList,fillList()}function fillList(){for(;listEl.firstChild;)listEl.removeChild(listEl.firstChild);displayItems.forEach((function(item){var el=item.element;if(!el){if(el=document.createElement("div"),item.label=editorParams.listItemFormatter?editorParams.listItemFormatter(item.value,item.label,cell,el,item.itemParams):item.label,item.group?(el.classList.add("tabulator-edit-select-list-group"),el.tabIndex=0,el.innerHTML=""===item.label?" ":item.label):(el.classList.add("tabulator-edit-select-list-item"),el.tabIndex=0,el.innerHTML=""===item.label?" ":item.label,el.addEventListener("click",(function(){multiselect?(toggleItem(item),input.focus()):chooseItem(item)})),currentItems.indexOf(item)>-1&&el.classList.add("active")),item.elementAttributes&&"object"==_typeof(item.elementAttributes))for(var key in item.elementAttributes)"+"==key.charAt(0)?(key=key.slice(1),el.setAttribute(key,input.getAttribute(key)+item.elementAttributes["+"+key])):el.setAttribute(key,item.elementAttributes[key]);el.addEventListener("mousedown",(function(){blurable=!1,setTimeout((function(){blurable=!0}),10)})),item.element=el}listEl.appendChild(el)}))}function setCurrentItem(item,active){!multiselect&¤tItem&¤tItem.element&¤tItem.element.classList.remove("active"),currentItem&¤tItem.element&¤tItem.element.classList.remove("focused"),currentItem=item,item.element&&(item.element.classList.add("focused"),active&&item.element.classList.add("active"))}function setItem(item){var index;-1==currentItems.indexOf(item)&&(currentItems.push(item),setCurrentItem(item,!0)),fillInput()}function unsetItem(index){var item=currentItems[index];index>-1&&(currentItems.splice(index,1),item.element&&item.element.classList.remove("active"))}function toggleItem(item){item||(item=currentItem);var index=currentItems.indexOf(item);index>-1?unsetItem(index):(!0!==multiselect&¤tItems.length>=multiselect&&unsetItem(0),setItem(item)),fillInput()}function chooseItem(item){hideList(),item||(item=currentItem),item&&success(item.value)}function chooseItems(){hideList();var output=[];currentItems.forEach((function(item){output.push(item.value)})),success(output)}function fillInput(){var output=[];currentItems.forEach((function(item){output.push(item.label)})),input.value=output.join(", ")}function cancelItem(){hideList(),cancel()}function showList(){if(!listEl.parentNode){!0===editorParams.values?parseItems(getUniqueColumnValues(),initialDisplayValue):"string"==typeof editorParams.values?parseItems(getUniqueColumnValues(editorParams.values),initialDisplayValue):parseItems(editorParams.values||[],initialDisplayValue);var offset=Tabulator.prototype.helpers.elOffset(cellEl);listEl.style.minWidth=cellEl.offsetWidth+"px",listEl.style.top=offset.top+cellEl.offsetHeight+"px",listEl.style.left=offset.left+"px",listEl.addEventListener("mousedown",(function(e){blurable=!1,setTimeout((function(){blurable=!0}),10)})),document.body.appendChild(listEl)}}function hideList(){listEl.parentNode&&listEl.parentNode.removeChild(listEl),removeScrollListener()}function removeScrollListener(){self.table.rowManager.element.removeEventListener("scroll",cancelItem)}if(this.table.rowManager.element.addEventListener("scroll",cancelItem),(Array.isArray(editorParams)||!Array.isArray(editorParams)&&"object"===(void 0===editorParams?"undefined":_typeof(editorParams))&&!editorParams.values)&&(console.warn("DEPRECATION WARNING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object"),editorParams={values:editorParams}),input.setAttribute("type","text"),input.style.padding="4px",input.style.width="100%",input.style.boxSizing="border-box",input.style.cursor="default",input.readOnly=0!=this.currentCell,editorParams.elementAttributes&&"object"==_typeof(editorParams.elementAttributes))for(var key in editorParams.elementAttributes)"+"==key.charAt(0)?(key=key.slice(1),input.setAttribute(key,input.getAttribute(key)+editorParams.elementAttributes["+"+key])):input.setAttribute(key,editorParams.elementAttributes[key]);return input.value=void 0!==initialValue||null===initialValue?initialValue:"",input.addEventListener("keydown",(function(e){var index;switch(e.keyCode){case 38:index=dataItems.indexOf(currentItem),("editor"==vertNav||"hybrid"==vertNav&&index)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),index>0&&setCurrentItem(dataItems[index-1],!multiselect));break;case 40:index=dataItems.indexOf(currentItem),("editor"==vertNav||"hybrid"==vertNav&&index-1||String(item.title).toLowerCase().indexOf(String(term).toLowerCase())>-1)&&matches.push(item)})),fillListIfNotEmpty(matches,intialLoad))}function addNotice(notice){var searchEl=document.createElement("div");clearList(),!1!==notice&&(searchEl.classList.add("tabulator-edit-select-list-notice"),searchEl.tabIndex=0,notice instanceof Node?searchEl.appendChild(notice):searchEl.innerHTML=notice,listEl.appendChild(searchEl))}function parseItems(inputValues){var itemList=[];if(Array.isArray(inputValues))inputValues.forEach((function(value){var item={};"object"===(void 0===value?"undefined":_typeof(value))?(item.title=editorParams.listItemFormatter?editorParams.listItemFormatter(value.value,value.label):value.label,item.value=value.value):(item.title=editorParams.listItemFormatter?editorParams.listItemFormatter(value,value):value,item.value=value),itemList.push(item)}));else for(var key in inputValues){var item={title:editorParams.listItemFormatter?editorParams.listItemFormatter(key,inputValues[key]):inputValues[key],value:key};itemList.push(item)}return itemList}function clearList(){for(;listEl.firstChild;)listEl.removeChild(listEl.firstChild)}function fillListIfNotEmpty(items,intialLoad){items.length?fillList(items,intialLoad):editorParams.emptyPlaceholder&&addNotice(editorParams.emptyPlaceholder)}function fillList(items,intialLoad){var current=!1;clearList(),(displayItems=items).forEach((function(item){var el=item.element;el||((el=document.createElement("div")).classList.add("tabulator-edit-select-list-item"),el.tabIndex=0,el.innerHTML=item.title,el.addEventListener("click",(function(e){setCurrentItem(item),chooseItem()})),el.addEventListener("mousedown",(function(e){blurable=!1,setTimeout((function(){blurable=!0}),10)})),item.element=el,intialLoad&&item.value==initialValue&&(input.value=item.title,item.element.classList.add("active"),current=!0),item===currentItem&&(item.element.classList.add("active"),current=!0)),listEl.appendChild(el)})),current||setCurrentItem(!1)}function chooseItem(){hideList(),currentItem?initialValue!==currentItem.value?(initialValue=currentItem.value,input.value=currentItem.title,success(currentItem.value)):cancel():editorParams.freetext?(initialValue=input.value,success(input.value)):editorParams.allowEmpty&&""===input.value?(initialValue=input.value,success(input.value)):cancel()}function showList(){if(!listEl.parentNode){for(;listEl.firstChild;)listEl.removeChild(listEl.firstChild);var offset=Tabulator.prototype.helpers.elOffset(cellEl);listEl.style.minWidth=cellEl.offsetWidth+"px",listEl.style.top=offset.top+cellEl.offsetHeight+"px",listEl.style.left=offset.left+"px",document.body.appendChild(listEl)}}function setCurrentItem(item,showInputValue){currentItem&¤tItem.element&¤tItem.element.classList.remove("active"),currentItem=item,item&&item.element&&item.element.classList.add("active")}function hideList(){listEl.parentNode&&listEl.parentNode.removeChild(listEl),removeScrollListener()}function cancelItem(){hideList(),cancel()}function removeScrollListener(){self.table.rowManager.element.removeEventListener("scroll",cancelItem)}return listEl.classList.add("tabulator-edit-select-list"),listEl.addEventListener("mousedown",(function(e){blurable=!1,setTimeout((function(){blurable=!0}),10)})),input.addEventListener("keydown",(function(e){var index;switch(e.keyCode){case 38:index=displayItems.indexOf(currentItem),("editor"==vertNav||"hybrid"==vertNav&&index)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),setCurrentItem(index>0&&displayItems[index-1]));break;case 40:index=displayItems.indexOf(currentItem),("editor"==vertNav||"hybrid"==vertNav&&index'):("ie"==self.table.browser?star.setAttribute("class","tabulator-star-inactive"):star.classList.replace("tabulator-star-active","tabulator-star-inactive"),star.innerHTML='')}))}function buildStar(i){var starHolder=document.createElement("span"),nextStar=star.cloneNode(!0);stars.push(nextStar),starHolder.addEventListener("mouseenter",(function(e){e.stopPropagation(),e.stopImmediatePropagation(),starChange(i)})),starHolder.addEventListener("mousemove",(function(e){e.stopPropagation(),e.stopImmediatePropagation()})),starHolder.addEventListener("click",(function(e){e.stopPropagation(),e.stopImmediatePropagation(),success(i),element.blur()})),starHolder.appendChild(nextStar),starsHolder.appendChild(starHolder)}function changeValue(val){value=val,starChange(val)}if(element.style.whiteSpace="nowrap",element.style.overflow="hidden",element.style.textOverflow="ellipsis",starsHolder.style.verticalAlign="middle",starsHolder.style.display="inline-block",starsHolder.style.padding="4px",star.setAttribute("width",size),star.setAttribute("height",size),star.setAttribute("viewBox","0 0 512 512"),star.setAttribute("xml:space","preserve"),star.style.padding="0 1px",editorParams.elementAttributes&&"object"==_typeof(editorParams.elementAttributes))for(var key in editorParams.elementAttributes)"+"==key.charAt(0)?(key=key.slice(1),starsHolder.setAttribute(key,starsHolder.getAttribute(key)+editorParams.elementAttributes["+"+key])):starsHolder.setAttribute(key,editorParams.elementAttributes[key]);for(var i=1;i<=maxStars;i++)buildStar(i);return starChange(value=Math.min(parseInt(value),maxStars)),starsHolder.addEventListener("mousemove",(function(e){starChange(0)})),starsHolder.addEventListener("click",(function(e){success(0)})),element.addEventListener("blur",(function(e){cancel()})),element.addEventListener("keydown",(function(e){switch(e.keyCode){case 39:changeValue(value+1);break;case 37:changeValue(value-1);break;case 13:success(value);break;case 27:cancel()}})),starsHolder},progress:function progress(cell,onRendered,success,cancel,editorParams){var element=cell.getElement(),max=void 0===editorParams.max?element.getElementsByTagName("div")[0].getAttribute("max")||100:editorParams.max,min=void 0===editorParams.min?element.getElementsByTagName("div")[0].getAttribute("min")||0:editorParams.min,percent=(max-min)/100,value=cell.getValue()||0,handle=document.createElement("div"),bar=document.createElement("div"),mouseDrag,mouseDragWidth;function updateValue(){var calcVal=percent*Math.round(bar.offsetWidth/(element.clientWidth/100))+min;success(calcVal),element.setAttribute("aria-valuenow",calcVal),element.setAttribute("aria-label",value)}if(handle.style.position="absolute",handle.style.right="0",handle.style.top="0",handle.style.bottom="0",handle.style.width="5px",handle.classList.add("tabulator-progress-handle"),bar.style.display="inline-block",bar.style.position="relative",bar.style.height="100%",bar.style.backgroundColor="#488CE9",bar.style.maxWidth="100%",bar.style.minWidth="0%",editorParams.elementAttributes&&"object"==_typeof(editorParams.elementAttributes))for(var key in editorParams.elementAttributes)"+"==key.charAt(0)?(key=key.slice(1),bar.setAttribute(key,bar.getAttribute(key)+editorParams.elementAttributes["+"+key])):bar.setAttribute(key,editorParams.elementAttributes[key]);return element.style.padding="4px 4px",value=Math.min(parseFloat(value),max),value=Math.max(parseFloat(value),min),value=Math.round((value-min)/percent),bar.style.width=value+"%",element.setAttribute("aria-valuemin",min),element.setAttribute("aria-valuemax",max),bar.appendChild(handle),handle.addEventListener("mousedown",(function(e){mouseDrag=e.screenX,mouseDragWidth=bar.offsetWidth})),handle.addEventListener("mouseover",(function(){handle.style.cursor="ew-resize"})),element.addEventListener("mousemove",(function(e){mouseDrag&&(bar.style.width=mouseDragWidth+e.screenX-mouseDrag+"px")})),element.addEventListener("mouseup",(function(e){mouseDrag&&(e.stopPropagation(),e.stopImmediatePropagation(),mouseDrag=!1,mouseDragWidth=!1,updateValue())})),element.addEventListener("keydown",(function(e){switch(e.keyCode){case 39:e.preventDefault(),bar.style.width=bar.clientWidth+element.clientWidth/100+"px";break;case 37:e.preventDefault(),bar.style.width=bar.clientWidth-element.clientWidth/100+"px";break;case 9:case 13:updateValue();break;case 27:cancel()}})),element.addEventListener("blur",(function(){cancel()})),bar},tickCross:function tickCross(cell,onRendered,success,cancel,editorParams){var value=cell.getValue(),input=document.createElement("input"),tristate=editorParams.tristate,indetermValue=void 0===editorParams.indeterminateValue?null:editorParams.indeterminateValue,indetermState=!1;if(input.setAttribute("type","checkbox"),input.style.marginTop="5px",input.style.boxSizing="border-box",editorParams.elementAttributes&&"object"==_typeof(editorParams.elementAttributes))for(var key in editorParams.elementAttributes)"+"==key.charAt(0)?(key=key.slice(1),input.setAttribute(key,input.getAttribute(key)+editorParams.elementAttributes["+"+key])):input.setAttribute(key,editorParams.elementAttributes[key]);function setValue(blur){return tristate?blur?indetermState?indetermValue:input.checked:input.checked&&!indetermState?(input.checked=!1,input.indeterminate=!0,indetermState=!0,indetermValue):(indetermState=!1,input.checked):input.checked}return input.value=value,!tristate||void 0!==value&&value!==indetermValue&&""!==value||(indetermState=!0,input.indeterminate=!0),"firefox"!=this.table.browser&&onRendered((function(){input.focus({preventScroll:!0})})),input.checked=!0===value||"true"===value||"True"===value||1===value,input.addEventListener("change",(function(e){success(setValue())})),input.addEventListener("blur",(function(e){success(setValue(!0))})),input.addEventListener("keydown",(function(e){13==e.keyCode&&success(setValue()),27==e.keyCode&&cancel()})),input}},Tabulator.prototype.registerModule("edit",Edit);var ExportRow=function ExportRow(type,columns,component,indent){this.type=type,this.columns=columns,this.component=component||!1,this.indent=indent||0},ExportColumn=function ExportColumn(value,component,width,height,depth){this.value=value,this.component=component||!1,this.width=width,this.height=height,this.depth=depth},Export=function Export(table){this.table=table,this.config={},this.cloneTableStyle=!0,this.colVisProp=""};Export.prototype.generateExportList=function(config,style,range,colVisProp){this.cloneTableStyle=style,this.config=config||{},this.colVisProp=colVisProp;var headers=!1!==this.config.columnHeaders?this.headersToExportRows(this.generateColumnGroupHeaders()):[],body=this.bodyToExportRows(this.rowLookup(range));return headers.concat(body)},Export.prototype.genereateTable=function(config,style,range,colVisProp){var list=this.generateExportList(config,style,range,colVisProp);return this.genereateTableElement(list)},Export.prototype.rowLookup=function(range){var _this45=this,rows=[];if("function"==typeof range)range.call(this.table).forEach((function(row){(row=_this45.table.rowManager.findRow(row))&&rows.push(row)}));else switch(range){case!0:case"visible":rows=this.table.rowManager.getVisibleRows(!0);break;case"all":rows=this.table.rowManager.rows;break;case"selected":rows=this.table.modules.selectRow.selectedRows;break;case"active":default:rows=this.table.rowManager.getDisplayRows()}return Object.assign([],rows)},Export.prototype.generateColumnGroupHeaders=function(){var _this46=this,output=[],columns;return(!1!==this.config.columnGroups?this.table.columnManager.columns:this.table.columnManager.columnsByIndex).forEach((function(column){var colData=_this46.processColumnGroup(column);colData&&output.push(colData)})),output},Export.prototype.processColumnGroup=function(column){var _this47=this,subGroups=column.columns,maxDepth=0,title,groupData={title:column.definition["title"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))]||column.definition.title,column:column,depth:1};if(subGroups.length){if(groupData.subGroups=[],groupData.width=0,subGroups.forEach((function(subGroup){var subGroupData=_this47.processColumnGroup(subGroup);subGroupData&&(groupData.width+=subGroupData.width,groupData.subGroups.push(subGroupData),subGroupData.depth>maxDepth&&(maxDepth=subGroupData.depth))})),groupData.depth+=maxDepth,!groupData.width)return!1}else{if(!this.columnVisCheck(column))return!1;groupData.width=1}return groupData},Export.prototype.columnVisCheck=function(column){return!1!==column.definition[this.colVisProp]&&(column.visible||!column.visible&&column.definition[this.colVisProp])},Export.prototype.headersToExportRows=function(columns){var headers=[],headerDepth=0,exportRows=[];function parseColumnGroup(column,level){var depth=headerDepth-level;if(void 0===headers[level]&&(headers[level]=[]),column.height=column.subGroups?1:depth-column.depth+1,headers[level].push(column),column.height>1)for(var _i6=1;_i61)for(var _i7=1;_i7headerDepth&&(headerDepth=column.depth)})),columns.forEach((function(column){parseColumnGroup(column,0)})),headers.forEach((function(header){var columns=[];header.forEach((function(col){col?columns.push(new ExportColumn(col.title,col.column.getComponent(),col.width,col.height,col.depth)):columns.push(null)})),exportRows.push(new ExportRow("header",columns))})),exportRows},Export.prototype.bodyToExportRows=function(rows){var _this48=this,columns=[],exportRows=[];return this.table.columnManager.columnsByIndex.forEach((function(column){_this48.columnVisCheck(column)&&columns.push(column.getComponent())})),!1!==this.config.columnCalcs&&this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&rows.unshift(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&rows.push(this.table.modules.columnCalcs.botRow)),(rows=rows.filter((function(row){switch(row.type){case"group":return!1!==_this48.config.rowGroups;case"calc":return!1!==_this48.config.columnCalcs;case"row":return!(_this48.table.options.dataTree&&!1===_this48.config.dataTree&&row.modules.dataTree.parent)}return!0}))).forEach((function(row,i){var rowData=row.getData(_this48.colVisProp),exportCols=[],indent=0;switch(row.type){case"group":indent=row.level,exportCols.push(new ExportColumn(row.key,row.getComponent(),columns.length,1));break;case"calc":case"row":columns.forEach((function(col){exportCols.push(new ExportColumn(col._column.getFieldValue(rowData),col,1,1))})),_this48.table.options.dataTree&&!1!==_this48.config.dataTree&&(indent=row.modules.dataTree.index)}exportRows.push(new ExportRow(row.type,exportCols,row.getComponent(),indent))})),exportRows},Export.prototype.genereateTableElement=function(list){var _this49=this,table=document.createElement("table"),headerEl=document.createElement("thead"),bodyEl=document.createElement("tbody"),styles=this.lookupTableStyles(),rowFormatter=this.table.options["rowFormatter"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))],setup={};return setup.rowFormatter=null!==rowFormatter?rowFormatter:this.table.options.rowFormatter,this.table.options.dataTree&&!1!==this.config.dataTree&&this.table.modExists("columnCalcs")&&(setup.treeElementField=this.table.modules.dataTree.elementField),setup.groupHeader=this.table.options["groupHeader"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))],setup.groupHeader&&!Array.isArray(setup.groupHeader)&&(setup.groupHeader=[setup.groupHeader]),table.classList.add("tabulator-print-table"),this.mapElementStyles(this.table.columnManager.getHeadersElement(),headerEl,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),list.length>1e3&&console.warn("It may take a long time to render an HTML table with more than 1000 rows"),list.forEach((function(row,i){switch(row.type){case"header":headerEl.appendChild(_this49.genereateHeaderElement(row,setup,styles));break;case"group":bodyEl.appendChild(_this49.genereateGroupElement(row,setup,styles));break;case"calc":bodyEl.appendChild(_this49.genereateCalcElement(row,setup,styles));break;case"row":var rowEl=_this49.genereateRowElement(row,setup,styles);_this49.mapElementStyles(i%2&&styles.evenRow?styles.evenRow:styles.oddRow,rowEl,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),bodyEl.appendChild(rowEl)}})),headerEl.innerHTML&&table.appendChild(headerEl),table.appendChild(bodyEl),this.mapElementStyles(this.table.element,table,["border-top","border-left","border-right","border-bottom"]),table},Export.prototype.lookupTableStyles=function(){var styles={};return this.cloneTableStyle&&window.getComputedStyle&&(styles.oddRow=this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"),styles.evenRow=this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"),styles.calcRow=this.table.element.querySelector(".tabulator-row.tabulator-calcs"),styles.firstRow=this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"),styles.firstGroup=this.table.element.getElementsByClassName("tabulator-group")[0],styles.firstRow&&(styles.styleCells=styles.firstRow.getElementsByClassName("tabulator-cell"),styles.firstCell=styles.styleCells[0],styles.lastCell=styles.styleCells[styles.styleCells.length-1])),styles},Export.prototype.genereateHeaderElement=function(row,setup,styles){var _this50=this,rowEl=document.createElement("tr");return row.columns.forEach((function(column){if(column){var cellEl=document.createElement("th"),classNames=column.component._column.definition.cssClass?column.component._column.definition.cssClass.split(" "):[];cellEl.colSpan=column.width,cellEl.rowSpan=column.height,cellEl.innerHTML=column.value,_this50.cloneTableStyle&&(cellEl.style.boxSizing="border-box"),classNames.forEach((function(className){cellEl.classList.add(className)})),_this50.mapElementStyles(column.component.getElement(),cellEl,["text-align","border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),_this50.mapElementStyles(column.component._column.contentElement,cellEl,["padding-top","padding-left","padding-right","padding-bottom"]),column.component._column.visible?_this50.mapElementStyles(column.component.getElement(),cellEl,["width"]):column.component._column.definition.width&&(cellEl.style.width=column.component._column.definition.width+"px"),column.component._column.parent&&_this50.mapElementStyles(column.component._column.parent.groupElement,cellEl,["border-top"]),rowEl.appendChild(cellEl)}})),rowEl},Export.prototype.genereateGroupElement=function(row,setup,styles){var rowEl=document.createElement("tr"),cellEl=document.createElement("td"),group=row.columns[0];return rowEl.classList.add("tabulator-print-table-row"),setup.groupHeader&&setup.groupHeader[row.indent]?group.value=setup.groupHeader[row.indent](group.value,row.component._group.getRowCount(),row.component._group.getData(),row.component):!1===setup.groupHeader?group.value=group.value:group.value=row.component._group.generator(group.value,row.component._group.getRowCount(),row.component._group.getData(),row.component),cellEl.colSpan=group.width,cellEl.innerHTML=group.value,rowEl.classList.add("tabulator-print-table-group"),rowEl.classList.add("tabulator-group-level-"+row.indent),group.component.getVisibility()&&rowEl.classList.add("tabulator-group-visible"),this.mapElementStyles(styles.firstGroup,rowEl,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),this.mapElementStyles(styles.firstGroup,cellEl,["padding-top","padding-left","padding-right","padding-bottom"]),rowEl.appendChild(cellEl),rowEl},Export.prototype.genereateCalcElement=function(row,setup,styles){var rowEl=this.genereateRowElement(row,setup,styles);return rowEl.classList.add("tabulator-print-table-calcs"),this.mapElementStyles(styles.calcRow,rowEl,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),rowEl},Export.prototype.genereateRowElement=function(row,setup,styles){var _this51=this,rowEl=document.createElement("tr");return rowEl.classList.add("tabulator-print-table-row"),row.columns.forEach((function(col){if(col){var cellEl=document.createElement("td"),column=col.component._column,value=col.value,cellWrapper={modules:{},getValue:function getValue(){return value},getField:function getField(){return column.definition.field},getElement:function getElement(){return cellEl},getColumn:function getColumn(){return column.getComponent()},getData:function getData(){return rowData},getRow:function getRow(){return row.getComponent()},getComponent:function getComponent(){return cellWrapper},column:column},classNames;if((column.definition.cssClass?column.definition.cssClass.split(" "):[]).forEach((function(className){cellEl.classList.add(className)})),_this51.table.modExists("format")&&!1!==_this51.config.formatCells)value=_this51.table.modules.format.formatExportValue(cellWrapper,_this51.colVisProp);else switch(void 0===value?"undefined":_typeof(value)){case"object":value=JSON.stringify(value);break;case"undefined":case"null":value="";break;default:value=value}if(value instanceof Node?cellEl.appendChild(value):cellEl.innerHTML=value,styles.firstCell&&(_this51.mapElementStyles(styles.firstCell,cellEl,["padding-top","padding-left","padding-right","padding-bottom","border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size"]),column.definition.align&&(cellEl.style.textAlign=column.definition.align)),_this51.table.options.dataTree&&!1!==_this51.config.dataTree&&(setup.treeElementField&&setup.treeElementField==column.field||!setup.treeElementField&&0==i)&&(row.component._row.modules.dataTree.controlEl&&cellEl.insertBefore(row.component._row.modules.dataTree.controlEl.cloneNode(!0),cellEl.firstChild),row.component._row.modules.dataTree.branchEl&&cellEl.insertBefore(row.component._row.modules.dataTree.branchEl.cloneNode(!0),cellEl.firstChild)),rowEl.appendChild(cellEl),cellWrapper.modules.format&&cellWrapper.modules.format.renderedCallback&&cellWrapper.modules.format.renderedCallback(),setup.rowFormatter&&!1!==_this51.config.formatCells){var rowComponent=row.getComponent();rowComponent.getElement=function(){return rowEl},setup.rowFormatter(rowComponent)}}})),rowEl},Export.prototype.genereateHTMLTable=function(list){var holder=document.createElement("div");return holder.appendChild(this.genereateTableElement(list)),holder.innerHTML},Export.prototype.getHtml=function(visible,style,config,colVisProp){var list=this.generateExportList(config||this.table.options.htmlOutputConfig,style,visible,colVisProp||"htmlOutput");return this.genereateHTMLTable(list)},Export.prototype.mapElementStyles=function(from,to,props){if(this.cloneTableStyle&&from&&to){var lookup={"background-color":"backgroundColor",color:"fontColor",width:"width","font-weight":"fontWeight","font-family":"fontFamily","font-size":"fontSize","text-align":"textAlign","border-top":"borderTop","border-left":"borderLeft","border-right":"borderRight","border-bottom":"borderBottom","padding-top":"paddingTop","padding-left":"paddingLeft","padding-right":"paddingRight","padding-bottom":"paddingBottom"};if(window.getComputedStyle){var fromStyle=window.getComputedStyle(from);props.forEach((function(prop){to.style[lookup[prop]]=fromStyle.getPropertyValue(prop)}))}}},Tabulator.prototype.registerModule("export",Export);var Filter=function Filter(table){this.table=table,this.filterList=[],this.headerFilters={},this.headerFilterColumns=[],this.prevHeaderFilterChangeCheck="",this.prevHeaderFilterChangeCheck="{}",this.changed=!1};Filter.prototype.initializeColumn=function(column,value){var self=this,field=column.getField(),params;function success(value){var filterType="input"==column.modules.filter.tagType&&"text"==column.modules.filter.attrType||"textarea"==column.modules.filter.tagType?"partial":"match",type="",filterChangeCheck="",filterFunc;if(void 0===column.modules.filter.prevSuccess||column.modules.filter.prevSuccess!==value){if(column.modules.filter.prevSuccess=value,column.modules.filter.emptyFunc(value))delete self.headerFilters[field];else{switch(column.modules.filter.value=value,_typeof(column.definition.headerFilterFunc)){case"string":self.filters[column.definition.headerFilterFunc]?(type=column.definition.headerFilterFunc,filterFunc=function filterFunc(data){var params=column.definition.headerFilterFuncParams||{},fieldVal=column.getFieldValue(data);return params="function"==typeof params?params(value,fieldVal,data):params,self.filters[column.definition.headerFilterFunc](value,fieldVal,data,params)}):console.warn("Header Filter Error - Matching filter function not found: ",column.definition.headerFilterFunc);break;case"function":type=filterFunc=function filterFunc(data){var params=column.definition.headerFilterFuncParams||{},fieldVal=column.getFieldValue(data);return params="function"==typeof params?params(value,fieldVal,data):params,column.definition.headerFilterFunc(value,fieldVal,data,params)}}if(!filterFunc)switch(filterType){case"partial":filterFunc=function filterFunc(data){var colVal=column.getFieldValue(data);return null!=colVal&&String(colVal).toLowerCase().indexOf(String(value).toLowerCase())>-1},type="like";break;default:filterFunc=function filterFunc(data){return column.getFieldValue(data)==value},type="="}self.headerFilters[field]={value:value,func:filterFunc,type:type,params:{}}}filterChangeCheck=JSON.stringify(self.headerFilters),self.prevHeaderFilterChangeCheck!==filterChangeCheck&&(self.prevHeaderFilterChangeCheck=filterChangeCheck,self.changed=!0,self.table.rowManager.filterRefresh())}return!0}column.modules.filter={success:success,attrType:!1,tagType:!1,emptyFunc:!1},this.generateHeaderFilterElement(column)},Filter.prototype.generateHeaderFilterElement=function(column,initialValue,reinitialize){var _this52=this,self=this,success=column.modules.filter.success,field=column.getField(),filterElement,editor,editorElement,cellWrapper,typingTimer,searchTrigger,params;function cancel(){}if(column.modules.filter.headerElement&&column.modules.filter.headerElement.parentNode&&column.contentElement.removeChild(column.modules.filter.headerElement.parentNode),field){switch(column.modules.filter.emptyFunc=column.definition.headerFilterEmptyCheck||function(value){return!value&&"0"!==value},(filterElement=document.createElement("div")).classList.add("tabulator-header-filter"),_typeof(column.definition.headerFilter)){case"string":self.table.modules.edit.editors[column.definition.headerFilter]?(editor=self.table.modules.edit.editors[column.definition.headerFilter],"tick"!==column.definition.headerFilter&&"tickCross"!==column.definition.headerFilter||column.definition.headerFilterEmptyCheck||(column.modules.filter.emptyFunc=function(value){return!0!==value&&!1!==value})):console.warn("Filter Error - Cannot build header filter, No such editor found: ",column.definition.editor);break;case"function":editor=column.definition.headerFilter;break;case"boolean":column.modules.edit&&column.modules.edit.editor?editor=column.modules.edit.editor:column.definition.formatter&&self.table.modules.edit.editors[column.definition.formatter]?(editor=self.table.modules.edit.editors[column.definition.formatter],"tick"!==column.definition.formatter&&"tickCross"!==column.definition.formatter||column.definition.headerFilterEmptyCheck||(column.modules.filter.emptyFunc=function(value){return!0!==value&&!1!==value})):editor=self.table.modules.edit.editors.input}if(editor){if(cellWrapper={getValue:function getValue(){return void 0!==initialValue?initialValue:""},getField:function getField(){return column.definition.field},getElement:function getElement(){return filterElement},getColumn:function getColumn(){return column.getComponent()},getRow:function getRow(){return{normalizeHeight:function normalizeHeight(){}}}},params="function"==typeof(params=column.definition.headerFilterParams||{})?params.call(self.table):params,!(editorElement=editor.call(this.table.modules.edit,cellWrapper,(function(){}),success,cancel,params)))return void console.warn("Filter Error - Cannot add filter to "+field+" column, editor returned a value of false");if(!(editorElement instanceof Node))return void console.warn("Filter Error - Cannot add filter to "+field+" column, editor should return an instance of Node, the editor returned:",editorElement);field?self.table.modules.localize.bind("headerFilters|columns|"+column.definition.field,(function(value){editorElement.setAttribute("placeholder",void 0!==value&&value?value:self.table.modules.localize.getText("headerFilters|default"))})):self.table.modules.localize.bind("headerFilters|default",(function(value){editorElement.setAttribute("placeholder",void 0!==self.column.definition.headerFilterPlaceholder&&self.column.definition.headerFilterPlaceholder?self.column.definition.headerFilterPlaceholder:value)})),editorElement.addEventListener("click",(function(e){e.stopPropagation(),editorElement.focus()})),editorElement.addEventListener("focus",(function(e){var left=_this52.table.columnManager.element.scrollLeft;left!==_this52.table.rowManager.element.scrollLeft&&(_this52.table.rowManager.scrollHorizontal(left),_this52.table.columnManager.scrollHorizontal(left))})),typingTimer=!1,searchTrigger=function searchTrigger(e){typingTimer&&clearTimeout(typingTimer),typingTimer=setTimeout((function(){success(editorElement.value)}),self.table.options.headerFilterLiveFilterDelay)},column.modules.filter.headerElement=editorElement,column.modules.filter.attrType=editorElement.hasAttribute("type")?editorElement.getAttribute("type").toLowerCase():"",column.modules.filter.tagType=editorElement.tagName.toLowerCase(),!1!==column.definition.headerFilterLiveFilter&&("autocomplete"!==column.definition.headerFilter&&"tickCross"!==column.definition.headerFilter&&("autocomplete"!==column.definition.editor&&"tickCross"!==column.definition.editor||!0!==column.definition.headerFilter)&&(editorElement.addEventListener("keyup",searchTrigger),editorElement.addEventListener("search",searchTrigger),"number"==column.modules.filter.attrType&&editorElement.addEventListener("change",(function(e){success(editorElement.value)})),"text"==column.modules.filter.attrType&&"ie"!==this.table.browser&&editorElement.setAttribute("type","search")),"input"!=column.modules.filter.tagType&&"select"!=column.modules.filter.tagType&&"textarea"!=column.modules.filter.tagType||editorElement.addEventListener("mousedown",(function(e){e.stopPropagation()}))),filterElement.appendChild(editorElement),column.contentElement.appendChild(filterElement),reinitialize||self.headerFilterColumns.push(column)}}else console.warn("Filter Error - Cannot add header filter, column has no field set:",column.definition.title)},Filter.prototype.hideHeaderFilterElements=function(){this.headerFilterColumns.forEach((function(column){column.modules.filter&&column.modules.filter.headerElement&&(column.modules.filter.headerElement.style.display="none")}))},Filter.prototype.showHeaderFilterElements=function(){this.headerFilterColumns.forEach((function(column){column.modules.filter&&column.modules.filter.headerElement&&(column.modules.filter.headerElement.style.display="")}))},Filter.prototype.setHeaderFilterFocus=function(column){column.modules.filter&&column.modules.filter.headerElement?column.modules.filter.headerElement.focus():console.warn("Column Filter Focus Error - No header filter set on column:",column.getField())},Filter.prototype.getHeaderFilterValue=function(column){if(column.modules.filter&&column.modules.filter.headerElement)return column.modules.filter.headerElement.value;console.warn("Column Filter Error - No header filter set on column:",column.getField())},Filter.prototype.setHeaderFilterValue=function(column,value){column&&(column.modules.filter&&column.modules.filter.headerElement?(this.generateHeaderFilterElement(column,value,!0),column.modules.filter.success(value)):console.warn("Column Filter Error - No header filter set on column:",column.getField()))},Filter.prototype.reloadHeaderFilter=function(column){column&&(column.modules.filter&&column.modules.filter.headerElement?this.generateHeaderFilterElement(column,column.modules.filter.value,!0):console.warn("Column Filter Error - No header filter set on column:",column.getField()))},Filter.prototype.hasChanged=function(){var changed=this.changed;return this.changed=!1,changed},Filter.prototype.setFilter=function(field,type,value,params){var self=this;this.filterList=[],Array.isArray(field)||(field=[{field:field,type:type,value:value,params:params}]),this.addFilter(field)},Filter.prototype.addFilter=function(field,type,value,params){var self=this;Array.isArray(field)||(field=[{field:field,type:type,value:value,params:params}]),field.forEach((function(filter){(filter=self.findFilter(filter))&&(self.filterList.push(filter),self.changed=!0)})),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},Filter.prototype.findFilter=function(filter){var self=this,column;if(Array.isArray(filter))return this.findSubFilters(filter);var filterFunc=!1;return"function"==typeof filter.field?filterFunc=function filterFunc(data){return filter.field(data,filter.type||{})}:self.filters[filter.type]?filterFunc=(column=self.table.columnManager.getColumnByField(filter.field))?function filterFunc(data){return self.filters[filter.type](filter.value,column.getFieldValue(data),data,filter.params||{})}:function filterFunc(data){return self.filters[filter.type](filter.value,data[filter.field],data,filter.params||{})}:console.warn("Filter Error - No such filter type found, ignoring: ",filter.type),filter.func=filterFunc,!!filter.func&&filter},Filter.prototype.findSubFilters=function(filters){var self=this,output=[];return filters.forEach((function(filter){(filter=self.findFilter(filter))&&output.push(filter)})),!!output.length&&output},Filter.prototype.getFilters=function(all,ajax){var output=[];return all&&(output=this.getHeaderFilters()),ajax&&output.forEach((function(item){"function"==typeof item.type&&(item.type="function")})),output=output.concat(this.filtersToArray(this.filterList,ajax))},Filter.prototype.filtersToArray=function(filterList,ajax){var _this53=this,output=[];return filterList.forEach((function(filter){var item;Array.isArray(filter)?output.push(_this53.filtersToArray(filter,ajax)):(item={field:filter.field,type:filter.type,value:filter.value},ajax&&"function"==typeof item.type&&(item.type="function"),output.push(item))})),output},Filter.prototype.getHeaderFilters=function(){var self=this,output=[];for(var key in this.headerFilters)output.push({field:key,type:this.headerFilters[key].type,value:this.headerFilters[key].value});return output},Filter.prototype.removeFilter=function(field,type,value){var self=this;Array.isArray(field)||(field=[{field:field,type:type,value:value}]),field.forEach((function(filter){var index=-1;(index="object"==_typeof(filter.field)?self.filterList.findIndex((function(element){return filter===element})):self.filterList.findIndex((function(element){return filter.field===element.field&&filter.type===element.type&&filter.value===element.value})))>-1?(self.filterList.splice(index,1),self.changed=!0):console.warn("Filter Error - No matching filter type found, ignoring: ",filter.type)})),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},Filter.prototype.clearFilter=function(all){this.filterList=[],all&&this.clearHeaderFilter(),this.changed=!0,this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},Filter.prototype.clearHeaderFilter=function(){var self=this;this.headerFilters={},self.prevHeaderFilterChangeCheck="{}",this.headerFilterColumns.forEach((function(column){column.modules.filter.value=null,column.modules.filter.prevSuccess=void 0,self.reloadHeaderFilter(column)})),this.changed=!0},Filter.prototype.search=function(searchType,field,type,value){var self=this,activeRows=[],filterList=[];return Array.isArray(field)||(field=[{field:field,type:type,value:value}]),field.forEach((function(filter){(filter=self.findFilter(filter))&&filterList.push(filter)})),this.table.rowManager.rows.forEach((function(row){var match=!0;filterList.forEach((function(filter){self.filterRecurse(filter,row.getData())||(match=!1)})),match&&activeRows.push("data"===searchType?row.getData("data"):row.getComponent())})),activeRows},Filter.prototype.filter=function(rowList,filters){var self=this,activeRows=[],activeRowComponents=[];return self.table.options.dataFiltering&&self.table.options.dataFiltering.call(self.table,self.getFilters()),self.table.options.ajaxFiltering||!self.filterList.length&&!Object.keys(self.headerFilters).length?activeRows=rowList.slice(0):rowList.forEach((function(row){self.filterRow(row)&&activeRows.push(row)})),self.table.options.dataFiltered&&(activeRows.forEach((function(row){activeRowComponents.push(row.getComponent())})),self.table.options.dataFiltered.call(self.table,self.getFilters(),activeRowComponents)),activeRows},Filter.prototype.filterRow=function(row,filters){var self=this,match=!0,data=row.getData();for(var field in self.filterList.forEach((function(filter){self.filterRecurse(filter,data)||(match=!1)})),self.headerFilters)self.headerFilters[field].func(data)||(match=!1);return match},Filter.prototype.filterRecurse=function(filter,data){var self=this,match=!1;return Array.isArray(filter)?filter.forEach((function(subFilter){self.filterRecurse(subFilter,data)&&(match=!0)})):match=filter.func(data),match},Filter.prototype.filters={"=":function _(filterVal,rowVal,rowData,filterParams){return rowVal==filterVal},"<":function _(filterVal,rowVal,rowData,filterParams){return rowVal":function _(filterVal,rowVal,rowData,filterParams){return rowVal>filterVal},">=":function _(filterVal,rowVal,rowData,filterParams){return rowVal>=filterVal},"!=":function _(filterVal,rowVal,rowData,filterParams){return rowVal!=filterVal},regex:function regex(filterVal,rowVal,rowData,filterParams){return"string"==typeof filterVal&&(filterVal=new RegExp(filterVal)),filterVal.test(rowVal)},like:function like(filterVal,rowVal,rowData,filterParams){return null==filterVal?rowVal===filterVal:null!=rowVal&&String(rowVal).toLowerCase().indexOf(filterVal.toLowerCase())>-1},keywords:function keywords(filterVal,rowVal,rowData,filterParams){var keywords=filterVal.toLowerCase().split(void 0===filterParams.separator?" ":filterParams.separator),value=String(null==rowVal?"":rowVal).toLowerCase(),matches=[];return keywords.forEach((function(keyword){value.includes(keyword)&&matches.push(!0)})),filterParams.matchAll?matches.length===keywords.length:!!matches.length},starts:function starts(filterVal,rowVal,rowData,filterParams){return null==filterVal?rowVal===filterVal:null!=rowVal&&String(rowVal).toLowerCase().startsWith(filterVal.toLowerCase())},ends:function ends(filterVal,rowVal,rowData,filterParams){return null==filterVal?rowVal===filterVal:null!=rowVal&&String(rowVal).toLowerCase().endsWith(filterVal.toLowerCase())},in:function _in(filterVal,rowVal,rowData,filterParams){return Array.isArray(filterVal)?filterVal.indexOf(rowVal)>-1:(console.warn("Filter Error - filter value is not an array:",filterVal),!1)}},Tabulator.prototype.registerModule("filter",Filter);var Format=function Format(table){this.table=table};Format.prototype.initializeColumn=function(column){column.modules.format=this.lookupFormatter(column,""),void 0!==column.definition.formatterPrint&&(column.modules.format.print=this.lookupFormatter(column,"Print")),void 0!==column.definition.formatterClipboard&&(column.modules.format.clipboard=this.lookupFormatter(column,"Clipboard")),void 0!==column.definition.formatterHtmlOutput&&(column.modules.format.htmlOutput=this.lookupFormatter(column,"HtmlOutput"))},Format.prototype.lookupFormatter=function(column,type){var config={params:column.definition["formatter"+type+"Params"]||{}},formatter=column.definition["formatter"+type];switch(void 0===formatter?"undefined":_typeof(formatter)){case"string":"tick"===formatter&&(formatter="tickCross",void 0===config.params.crossElement&&(config.params.crossElement=!1),console.warn("DEPRECATION WARNING - the tick formatter has been deprecated, please use the tickCross formatter with the crossElement param set to false")),this.formatters[formatter]?config.formatter=this.formatters[formatter]:(console.warn("Formatter Error - No such formatter found: ",formatter),config.formatter=this.formatters.plaintext);break;case"function":config.formatter=formatter;break;default:config.formatter=this.formatters.plaintext}return config},Format.prototype.cellRendered=function(cell){cell.modules.format&&cell.modules.format.renderedCallback&&cell.modules.format.renderedCallback()},Format.prototype.formatValue=function(cell){var component=cell.getComponent(),params="function"==typeof cell.column.modules.format.params?cell.column.modules.format.params(component):cell.column.modules.format.params;function onRendered(callback){cell.modules.format||(cell.modules.format={}),cell.modules.format.renderedCallback=callback}return cell.column.modules.format.formatter.call(this,component,params,onRendered)},Format.prototype.formatExportValue=function(cell,type){var formatter=cell.column.modules.format[type],params;if(formatter){var onRendered=function onRendered(callback){cell.modules.format||(cell.modules.format={}),cell.modules.format.renderedCallback=callback};return params="function"==typeof formatter.params?formatter.params(component):formatter.params,formatter.formatter.call(this,cell.getComponent(),params,onRendered)}return this.formatValue(cell)},Format.prototype.sanitizeHTML=function(value){if(value){var entityMap={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(value).replace(/[&<>"'`=\/]/g,(function(s){return entityMap[s]}))}return value},Format.prototype.emptyToSpace=function(value){return null==value||""===value?" ":value},Format.prototype.getFormatter=function(formatter){var formatter;switch(void 0===formatter?"undefined":_typeof(formatter)){case"string":this.formatters[formatter]?formatter=this.formatters[formatter]:(console.warn("Formatter Error - No such formatter found: ",formatter),formatter=this.formatters.plaintext);break;case"function":formatter=formatter;break;default:formatter=this.formatters.plaintext}return formatter},Format.prototype.formatters={plaintext:function plaintext(cell,formatterParams,onRendered){return this.emptyToSpace(this.sanitizeHTML(cell.getValue()))},html:function html(cell,formatterParams,onRendered){return cell.getValue()},textarea:function textarea(cell,formatterParams,onRendered){return cell.getElement().style.whiteSpace="pre-wrap",this.emptyToSpace(this.sanitizeHTML(cell.getValue()))},money:function money(cell,formatterParams,onRendered){var floatVal=parseFloat(cell.getValue()),number,integer,decimal,rgx,decimalSym=formatterParams.decimal||".",thousandSym=formatterParams.thousand||",",symbol=formatterParams.symbol||"",after=!!formatterParams.symbolAfter,precision=void 0!==formatterParams.precision?formatterParams.precision:2;if(isNaN(floatVal))return this.emptyToSpace(this.sanitizeHTML(cell.getValue()));for(number=!1!==precision?floatVal.toFixed(precision):floatVal,integer=(number=String(number).split("."))[0],decimal=number.length>1?decimalSym+number[1]:"",rgx=/(\d+)(\d{3})/;rgx.test(integer);)integer=integer.replace(rgx,"$1"+thousandSym+"$2");return after?integer+decimal+symbol:symbol+integer+decimal},link:function link(cell,formatterParams,onRendered){var value=cell.getValue(),urlPrefix=formatterParams.urlPrefix||"",download=formatterParams.download,label=value,el=document.createElement("a"),data;if(formatterParams.labelField&&(label=(data=cell.getData())[formatterParams.labelField]),formatterParams.label)switch(_typeof(formatterParams.label)){case"string":label=formatterParams.label;break;case"function":label=formatterParams.label(cell)}if(label){if(formatterParams.urlField&&(value=(data=cell.getData())[formatterParams.urlField]),formatterParams.url)switch(_typeof(formatterParams.url)){case"string":value=formatterParams.url;break;case"function":value=formatterParams.url(cell)}return el.setAttribute("href",urlPrefix+value),formatterParams.target&&el.setAttribute("target",formatterParams.target),formatterParams.download&&(download="function"==typeof download?download(cell):!0===download?"":download,el.setAttribute("download",download)),el.innerHTML=this.emptyToSpace(this.sanitizeHTML(label)),el}return" "},image:function image(cell,formatterParams,onRendered){var el=document.createElement("img");switch(el.setAttribute("src",cell.getValue()),_typeof(formatterParams.height)){case"number":el.style.height=formatterParams.height+"px";break;case"string":el.style.height=formatterParams.height}switch(_typeof(formatterParams.width)){case"number":el.style.width=formatterParams.width+"px";break;case"string":el.style.width=formatterParams.width}return el.addEventListener("load",(function(){cell.getRow().normalizeHeight()})),el},tickCross:function tickCross(cell,formatterParams,onRendered){var value=cell.getValue(),element=cell.getElement(),empty=formatterParams.allowEmpty,truthy=formatterParams.allowTruthy,tick=void 0!==formatterParams.tickElement?formatterParams.tickElement:'',cross=void 0!==formatterParams.crossElement?formatterParams.crossElement:'';return truthy&&value||!0===value||"true"===value||"True"===value||1===value||"1"===value?(element.setAttribute("aria-checked",!0),tick||""):!empty||"null"!==value&&""!==value&&null!=value?(element.setAttribute("aria-checked",!1),cross||""):(element.setAttribute("aria-checked","mixed"),"")},datetime:function datetime(cell,formatterParams,onRendered){var inputFormat=formatterParams.inputFormat||"YYYY-MM-DD hh:mm:ss",outputFormat=formatterParams.outputFormat||"DD/MM/YYYY hh:mm:ss",invalid=void 0!==formatterParams.invalidPlaceholder?formatterParams.invalidPlaceholder:"",value=cell.getValue(),newDatetime=moment(value,inputFormat);return newDatetime.isValid()?formatterParams.timezone?newDatetime.tz(formatterParams.timezone).format(outputFormat):newDatetime.format(outputFormat):!0===invalid?value:"function"==typeof invalid?invalid(value):invalid},datetimediff:function datetime(cell,formatterParams,onRendered){var inputFormat=formatterParams.inputFormat||"YYYY-MM-DD hh:mm:ss",invalid=void 0!==formatterParams.invalidPlaceholder?formatterParams.invalidPlaceholder:"",suffix=void 0!==formatterParams.suffix&&formatterParams.suffix,unit=void 0!==formatterParams.unit?formatterParams.unit:void 0,humanize=void 0!==formatterParams.humanize&&formatterParams.humanize,date=void 0!==formatterParams.date?formatterParams.date:moment(),value=cell.getValue(),newDatetime=moment(value,inputFormat);return newDatetime.isValid()?humanize?moment.duration(newDatetime.diff(date)).humanize(suffix):newDatetime.diff(date,unit)+(suffix?" "+suffix:""):!0===invalid?value:"function"==typeof invalid?invalid(value):invalid},lookup:function lookup(cell,formatterParams,onRendered){var value=cell.getValue();return void 0===formatterParams[value]?(console.warn("Missing display value for "+value),value):formatterParams[value]},star:function star(cell,formatterParams,onRendered){var value=cell.getValue(),element=cell.getElement(),maxStars=formatterParams&&formatterParams.stars?formatterParams.stars:5,stars=document.createElement("span"),star=document.createElementNS("http://www.w3.org/2000/svg","svg"),starActive='',starInactive='';stars.style.verticalAlign="middle",star.setAttribute("width","14"),star.setAttribute("height","14"),star.setAttribute("viewBox","0 0 512 512"),star.setAttribute("xml:space","preserve"),star.style.padding="0 1px",value=value&&!isNaN(value)?parseInt(value):0,value=Math.max(0,Math.min(value,maxStars));for(var i=1;i<=maxStars;i++){var nextStar=star.cloneNode(!0);nextStar.innerHTML=i<=value?starActive:starInactive,stars.appendChild(nextStar)}return element.style.whiteSpace="nowrap",element.style.overflow="hidden",element.style.textOverflow="ellipsis",element.setAttribute("aria-label",value),stars},traffic:function traffic(cell,formatterParams,onRendered){var value=this.sanitizeHTML(cell.getValue())||0,el=document.createElement("span"),max=formatterParams&&formatterParams.max?formatterParams.max:100,min=formatterParams&&formatterParams.min?formatterParams.min:0,colors=formatterParams&&void 0!==formatterParams.color?formatterParams.color:["red","orange","green"],color="#666666",percent,percentValue;if(!isNaN(value)&&void 0!==cell.getValue()){switch(el.classList.add("tabulator-traffic-light"),percentValue=parseFloat(value)<=max?parseFloat(value):max,percentValue=parseFloat(percentValue)>=min?parseFloat(percentValue):min,percent=(max-min)/100,percentValue=Math.round((percentValue-min)/percent),void 0===colors?"undefined":_typeof(colors)){case"string":color=colors;break;case"function":color=colors(value);break;case"object":if(Array.isArray(colors)){var unit=100/colors.length,index=Math.floor(percentValue/unit);index=Math.min(index,colors.length-1),color=colors[index=Math.max(index,0)];break}}return el.style.backgroundColor=color,el}},progress:function progress(cell,formatterParams,onRendered){var value=this.sanitizeHTML(cell.getValue())||0,element=cell.getElement(),max=formatterParams&&formatterParams.max?formatterParams.max:100,min=formatterParams&&formatterParams.min?formatterParams.min:0,legendAlign=formatterParams&&formatterParams.legendAlign?formatterParams.legendAlign:"center",percent,percentValue,color,legend,legendColor,top,left,right,bottom;switch(percentValue=parseFloat(value)<=max?parseFloat(value):max,percentValue=parseFloat(percentValue)>=min?parseFloat(percentValue):min,percent=(max-min)/100,percentValue=Math.round((percentValue-min)/percent),_typeof(formatterParams.color)){case"string":color=formatterParams.color;break;case"function":color=formatterParams.color(value);break;case"object":if(Array.isArray(formatterParams.color)){var unit=100/formatterParams.color.length,index=Math.floor(percentValue/unit);index=Math.min(index,formatterParams.color.length-1),index=Math.max(index,0),color=formatterParams.color[index];break}default:color="#2DC214"}switch(_typeof(formatterParams.legend)){case"string":legend=formatterParams.legend;break;case"function":legend=formatterParams.legend(value);break;case"boolean":legend=value;break;default:legend=!1}switch(_typeof(formatterParams.legendColor)){case"string":legendColor=formatterParams.legendColor;break;case"function":legendColor=formatterParams.legendColor(value);break;case"object":if(Array.isArray(formatterParams.legendColor)){var unit=100/formatterParams.legendColor.length,index=Math.floor(percentValue/unit);index=Math.min(index,formatterParams.legendColor.length-1),index=Math.max(index,0),legendColor=formatterParams.legendColor[index]}break;default:legendColor="#000"}element.style.minWidth="30px",element.style.position="relative",element.setAttribute("aria-label",percentValue);var barEl=document.createElement("div");if(barEl.style.display="inline-block",barEl.style.position="relative",barEl.style.width=percentValue+"%",barEl.style.backgroundColor=color,barEl.style.height="100%",barEl.setAttribute("data-max",max),barEl.setAttribute("data-min",min),legend){var legendEl=document.createElement("div");legendEl.style.position="absolute",legendEl.style.top="4px",legendEl.style.left=0,legendEl.style.textAlign=legendAlign,legendEl.style.width="100%",legendEl.style.color=legendColor,legendEl.innerHTML=legend}return onRendered((function(){if(!(cell instanceof CellComponent)){var holderEl=document.createElement("div");holderEl.style.position="absolute",holderEl.style.top="4px",holderEl.style.bottom="4px",holderEl.style.left="4px",holderEl.style.right="4px",element.appendChild(holderEl),element=holderEl}element.appendChild(barEl),legend&&element.appendChild(legendEl)})),""},color:function color(cell,formatterParams,onRendered){return cell.getElement().style.backgroundColor=this.sanitizeHTML(cell.getValue()),""},buttonTick:function buttonTick(cell,formatterParams,onRendered){return''},buttonCross:function buttonCross(cell,formatterParams,onRendered){return''},rownum:function rownum(cell,formatterParams,onRendered){return this.table.rowManager.activeRows.indexOf(cell.getRow()._getSelf())+1},handle:function handle(cell,formatterParams,onRendered){return cell.getElement().classList.add("tabulator-row-handle"),"
"},responsiveCollapse:function responsiveCollapse(cell,formatterParams,onRendered){var self=this,open=!1,el=document.createElement("div"),config=cell.getRow()._row.modules.responsiveLayout;function toggleList(isOpen){var collapseEl=config.element;config.open=isOpen,collapseEl&&(config.open?(el.classList.add("open"),collapseEl.style.display=""):(el.classList.remove("open"),collapseEl.style.display="none"))}return el.classList.add("tabulator-responsive-collapse-toggle"),el.innerHTML="+-",cell.getElement().classList.add("tabulator-row-handle"),el.addEventListener("click",(function(e){e.stopImmediatePropagation(),toggleList(!config.open)})),toggleList(config.open),el},rowSelection:function rowSelection(cell){var _this54=this,checkbox=document.createElement("input");if(checkbox.type="checkbox",this.table.modExists("selectRow",!0))if(checkbox.addEventListener("click",(function(e){e.stopPropagation()})),"function"==typeof cell.getRow){var row=cell.getRow();checkbox.addEventListener("change",(function(e){row.toggleSelect()})),checkbox.checked=row.isSelected(),this.table.modules.selectRow.registerRowSelectCheckbox(row,checkbox)}else checkbox.addEventListener("change",(function(e){_this54.table.modules.selectRow.selectedRows.length?_this54.table.deselectRow():_this54.table.selectRow()})),this.table.modules.selectRow.registerHeaderSelectCheckbox(checkbox);return checkbox}},Tabulator.prototype.registerModule("format",Format);var FrozenColumns=function FrozenColumns(table){this.table=table,this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.rightPadding=0,this.initializationMode="left",this.active=!1,this.scrollEndTimer=!1};FrozenColumns.prototype.reset=function(){this.initializationMode="left",this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.rightMargin=0,this.active=!1,this.table.columnManager.headersElement.style.marginLeft=0,this.table.columnManager.element.style.paddingRight=0},FrozenColumns.prototype.initializeColumn=function(column){var config={margin:0,edge:!1};column.isGroup||(this.frozenCheck(column)?(config.position=this.initializationMode,"left"==this.initializationMode?this.leftColumns.push(column):this.rightColumns.unshift(column),this.active=!0,column.modules.frozen=config):this.initializationMode="right")},FrozenColumns.prototype.frozenCheck=function(column){var frozen=!1;return column.parent.isGroup&&column.definition.frozen&&console.warn("Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups"),column.parent.isGroup?this.frozenCheck(column.parent):column.definition.frozen},FrozenColumns.prototype.scrollHorizontal=function(){var _this55=this,rows;this.active&&(clearTimeout(this.scrollEndTimer),this.scrollEndTimer=setTimeout((function(){_this55.layout()}),100),rows=this.table.rowManager.getVisibleRows(),this.calcMargins(),this.layoutColumnPosition(),this.layoutCalcRows(),rows.forEach((function(row){"row"===row.type&&_this55.layoutRow(row)})),this.table.rowManager.tableElement.style.marginRight=this.rightMargin)},FrozenColumns.prototype.calcMargins=function(){this.leftMargin=this._calcSpace(this.leftColumns,this.leftColumns.length)+"px",this.table.columnManager.headersElement.style.marginLeft=this.leftMargin,this.rightMargin=this._calcSpace(this.rightColumns,this.rightColumns.length)+"px",this.table.columnManager.element.style.paddingRight=this.rightMargin,this.rightPadding=this.table.rowManager.element.clientWidth+this.table.columnManager.scrollLeft},FrozenColumns.prototype.layoutCalcRows=function(){this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&this.table.modules.columnCalcs.topRow&&this.layoutRow(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&this.table.modules.columnCalcs.botRow&&this.layoutRow(this.table.modules.columnCalcs.botRow))},FrozenColumns.prototype.layoutColumnPosition=function(allCells){var _this56=this,leftParents=[];this.leftColumns.forEach((function(column,i){if(column.modules.frozen.margin=_this56._calcSpace(_this56.leftColumns,i)+_this56.table.columnManager.scrollLeft+"px",i==_this56.leftColumns.length-1?column.modules.frozen.edge=!0:column.modules.frozen.edge=!1,column.parent.isGroup){var parentEl=_this56.getColGroupParentElement(column);leftParents.includes(parentEl)||(_this56.layoutElement(parentEl,column),leftParents.push(parentEl)),column.modules.frozen.edge&&parentEl.classList.add("tabulator-frozen-"+column.modules.frozen.position)}else _this56.layoutElement(column.getElement(),column);allCells&&column.cells.forEach((function(cell){_this56.layoutElement(cell.getElement(),column)}))})),this.rightColumns.forEach((function(column,i){column.modules.frozen.margin=_this56.rightPadding-_this56._calcSpace(_this56.rightColumns,i+1)+"px",i==_this56.rightColumns.length-1?column.modules.frozen.edge=!0:column.modules.frozen.edge=!1,column.parent.isGroup?_this56.layoutElement(_this56.getColGroupParentElement(column),column):_this56.layoutElement(column.getElement(),column),allCells&&column.cells.forEach((function(cell){_this56.layoutElement(cell.getElement(),column)}))}))},FrozenColumns.prototype.getColGroupParentElement=function(column){return column.parent.isGroup?this.getColGroupParentElement(column.parent):column.getElement()},FrozenColumns.prototype.layout=function(){var self=this,rightMargin=0;self.active&&(this.calcMargins(),self.table.rowManager.getDisplayRows().forEach((function(row){"row"===row.type&&self.layoutRow(row)})),this.layoutCalcRows(),this.layoutColumnPosition(!0),this.table.rowManager.tableElement.style.marginRight=this.rightMargin)},FrozenColumns.prototype.layoutRow=function(row){var _this57=this,rowEl;row.getElement().style.paddingLeft=this.leftMargin,this.leftColumns.forEach((function(column){var cell=row.getCell(column);cell&&_this57.layoutElement(cell.getElement(),column)})),this.rightColumns.forEach((function(column){var cell=row.getCell(column);cell&&_this57.layoutElement(cell.getElement(),column)}))},FrozenColumns.prototype.layoutElement=function(element,column){column.modules.frozen&&(element.style.position="absolute",element.style.left=column.modules.frozen.margin,element.classList.add("tabulator-frozen"),column.modules.frozen.edge&&element.classList.add("tabulator-frozen-"+column.modules.frozen.position))},FrozenColumns.prototype._calcSpace=function(columns,index){for(var width=0,_i8=0;_i8-1&&output.splice(index,1)})),output},FrozenRows.prototype.freezeRow=function(row){row.modules.frozen?console.warn("Freeze Error - Row is already frozen"):(row.modules.frozen=!0,this.topElement.appendChild(row.getElement()),row.initialize(),row.normalizeHeight(),this.table.rowManager.adjustTableSize(),this.rows.push(row),this.table.rowManager.refreshActiveData("display"),this.styleRows())},FrozenRows.prototype.unfreezeRow=function(row){var index=this.rows.indexOf(row);if(row.modules.frozen){row.modules.frozen=!1;var rowEl=row.getElement();rowEl.parentNode.removeChild(rowEl),this.table.rowManager.adjustTableSize(),this.rows.splice(index,1),this.table.rowManager.refreshActiveData("display"),this.rows.length&&this.styleRows()}else console.warn("Freeze Error - Row is already unfrozen")},FrozenRows.prototype.styleRows=function(row){var self=this;this.rows.forEach((function(row,i){self.table.rowManager.styleRow(row,i)}))},Tabulator.prototype.registerModule("frozenRows",FrozenRows);var GroupComponent=function GroupComponent(group){this._group=group,this.type="GroupComponent"};GroupComponent.prototype.getKey=function(){return this._group.key},GroupComponent.prototype.getField=function(){return this._group.field},GroupComponent.prototype.getElement=function(){return this._group.element},GroupComponent.prototype.getRows=function(){return this._group.getRows(!0)},GroupComponent.prototype.getSubGroups=function(){return this._group.getSubGroups(!0)},GroupComponent.prototype.getParentGroup=function(){return!!this._group.parent&&this._group.parent.getComponent()},GroupComponent.prototype.getVisibility=function(){return console.warn("getVisibility function is deprecated, you should now use the isVisible function"),this._group.visible},GroupComponent.prototype.isVisible=function(){return this._group.visible},GroupComponent.prototype.show=function(){this._group.show()},GroupComponent.prototype.hide=function(){this._group.hide()},GroupComponent.prototype.toggle=function(){this._group.toggleVisibility()},GroupComponent.prototype._getSelf=function(){return this._group},GroupComponent.prototype.getTable=function(){return this._group.groupManager.table};var Group=function Group(groupManager,parent,level,key,field,generator,oldGroup){this.groupManager=groupManager,this.parent=parent,this.key=key,this.level=level,this.field=field,this.hasSubGroups=level-1?after?this.rows.splice(toIndex+1,0,row):this.rows.splice(toIndex,0,row):after?this.rows.push(row):this.rows.unshift(row),row.modules.group=this,this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this),this.groupManager.updateGroupRows(!0)},Group.prototype.scrollHeader=function(left){this.arrowElement.style.marginLeft=left,this.groupList.forEach((function(child){child.scrollHeader(left)}))},Group.prototype.getRowIndex=function(row){},Group.prototype.conformRowData=function(data){return this.field?data[this.field]=this.key:console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"),this.parent&&(data=this.parent.conformRowData(data)),data},Group.prototype.removeRow=function(row){var index=this.rows.indexOf(row),el=row.getElement();index>-1&&this.rows.splice(index,1),this.groupManager.table.options.groupValues||this.rows.length?(el.parentNode&&el.parentNode.removeChild(el),this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this)):(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this),this.groupManager.updateGroupRows(!0))},Group.prototype.removeGroup=function(group){var groupKey=group.level+"_"+group.key,index;this.groups[groupKey]&&(delete this.groups[groupKey],(index=this.groupList.indexOf(group))>-1&&this.groupList.splice(index,1),this.groupList.length||(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this)))},Group.prototype.getHeadersAndRows=function(noCalc){var output=[];return output.push(this),this._visSet(),this.visible?this.groupList.length?this.groupList.forEach((function(group){output=output.concat(group.getHeadersAndRows(noCalc))})):(!noCalc&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),output.push(this.calcs.top)),output=output.concat(this.rows),!noCalc&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),output.push(this.calcs.bottom))):this.groupList.length||"table"==this.groupManager.table.options.columnCalcs||this.groupManager.table.modExists("columnCalcs")&&(!noCalc&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),output.push(this.calcs.top))),!noCalc&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),output.push(this.calcs.bottom)))),output},Group.prototype.getData=function(visible,transform){var self=this,output=[];return this._visSet(),(!visible||visible&&this.visible)&&this.rows.forEach((function(row){output.push(row.getData(transform||"data"))})),output},Group.prototype.getRowCount=function(){var count=0;return this.groupList.length?this.groupList.forEach((function(group){count+=group.getRowCount()})):count=this.rows.length,count},Group.prototype.toggleVisibility=function(){this.visible?this.hide():this.show()},Group.prototype.hide=function(){this.visible=!1,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination?this.groupManager.updateGroupRows(!0):(this.element.classList.remove("tabulator-group-visible"),this.groupList.length?this.groupList.forEach((function(group){var rows;group.getHeadersAndRows().forEach((function(row){row.detachElement()}))})):this.rows.forEach((function(row){var rowEl=row.getElement();rowEl.parentNode.removeChild(rowEl)})),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex()),this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()),this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),!1)},Group.prototype.show=function(){var self=this;if(this.visible=!0,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination)this.groupManager.updateGroupRows(!0);else{this.element.classList.add("tabulator-group-visible");var prev=this.getElement();this.groupList.length?this.groupList.forEach((function(group){var rows;group.getHeadersAndRows().forEach((function(row){var rowEl=row.getElement();prev.parentNode.insertBefore(rowEl,prev.nextSibling),row.initialize(),prev=rowEl}))})):this.rows.forEach((function(row){var rowEl=row.getElement();prev.parentNode.insertBefore(rowEl,prev.nextSibling),row.initialize(),prev=rowEl})),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex()),this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()}this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),!0)},Group.prototype._visSet=function(){var data=[];"function"==typeof this.visible&&(this.rows.forEach((function(row){data.push(row.getData())})),this.visible=this.visible(this.key,this.getRowCount(),data,this.getComponent()))},Group.prototype.getRowGroup=function(row){var match=!1;return this.groupList.length?this.groupList.forEach((function(group){var result=group.getRowGroup(row);result&&(match=result)})):this.rows.find((function(item){return item===row}))&&(match=this),match},Group.prototype.getSubGroups=function(component){var output=[];return this.groupList.forEach((function(child){output.push(component?child.getComponent():child)})),output},Group.prototype.getRows=function(compoment){var output=[];return this.rows.forEach((function(row){output.push(compoment?row.getComponent():row)})),output},Group.prototype.generateGroupHeaderContents=function(){var data=[];for(this.rows.forEach((function(row){data.push(row.getData())})),this.elementContents=this.generator(this.key,this.getRowCount(),data,this.getComponent());this.element.firstChild;)this.element.removeChild(this.element.firstChild);"string"==typeof this.elementContents?this.element.innerHTML=this.elementContents:this.element.appendChild(this.elementContents),this.element.insertBefore(this.arrowElement,this.element.firstChild)},Group.prototype.getElement=function(){this.addBindingsd=!1,this._visSet(),this.visible?this.element.classList.add("tabulator-group-visible"):this.element.classList.remove("tabulator-group-visible");for(var i=0;igroupHeader.length&&console.warn("Error creating group headers, groupHeader array is shorter than groupBy array"),self.headerGenerator=[function(){return""}],this.startOpen=[function(){return!1}],self.table.modules.localize.bind("groups|item",(function(langValue,lang){self.headerGenerator[0]=function(value,count,data){return(void 0===value?"":value)+"("+count+" "+(1===count?langValue:lang.groups.items)+")"}})),this.groupIDLookups=[],Array.isArray(groupBy)||groupBy)?this.table.modExists("columnCalcs")&&"table"!=this.table.options.columnCalcs&&"both"!=this.table.options.columnCalcs&&this.table.modules.columnCalcs.removeCalcs():this.table.modExists("columnCalcs")&&"group"!=this.table.options.columnCalcs&&this.table.columnManager.getRealColumns().forEach((function(col){col.definition.topCalc&&self.table.modules.columnCalcs.initializeTopRow(),col.definition.bottomCalc&&self.table.modules.columnCalcs.initializeBottomRow()}));Array.isArray(groupBy)||(groupBy=[groupBy]),groupBy.forEach((function(group,i){var lookupFunc,column;lookupFunc="function"==typeof group?group:(column=self.table.columnManager.getColumnByField(group))?function lookupFunc(data){return column.getFieldValue(data)}:function lookupFunc(data){return data[group]},self.groupIDLookups.push({field:"function"!=typeof group&&group,func:lookupFunc,values:!!self.allowedValues&&self.allowedValues[i]})})),startOpen&&(Array.isArray(startOpen)||(startOpen=[startOpen]),startOpen.forEach((function(level){level="function"==typeof level?level:function(){return!0}})),self.startOpen=startOpen),groupHeader&&(self.headerGenerator=Array.isArray(groupHeader)?groupHeader:[groupHeader]),this.initialized=!0},GroupRows.prototype.setDisplayIndex=function(index){this.displayIndex=index},GroupRows.prototype.getDisplayIndex=function(){return this.displayIndex},GroupRows.prototype.getRows=function(rows){return this.groupIDLookups.length?(this.table.options.dataGrouping.call(this.table),this.generateGroups(rows),this.table.options.dataGrouped&&this.table.options.dataGrouped.call(this.table,this.getGroups(!0)),this.updateGroupRows()):rows.slice(0)},GroupRows.prototype.getGroups=function(compoment){var groupComponents=[];return this.groupList.forEach((function(group){groupComponents.push(compoment?group.getComponent():group)})),groupComponents},GroupRows.prototype.getChildGroups=function(group){var _this59=this,groupComponents=[];return group||(group=this),group.groupList.forEach((function(child){child.groupList.length?groupComponents=groupComponents.concat(_this59.getChildGroups(child)):groupComponents.push(child)})),groupComponents},GroupRows.prototype.wipe=function(){this.groupList.forEach((function(group){group.wipe()}))},GroupRows.prototype.pullGroupListData=function(groupList){var self=this,groupListData=[];return groupList.forEach((function(group){var groupHeader={level:0,rowCount:0,headerContent:""},childData=[];group.hasSubGroups?(childData=self.pullGroupListData(group.groupList),groupHeader.level=group.level,groupHeader.rowCount=childData.length-group.groupList.length,groupHeader.headerContent=group.generator(group.key,groupHeader.rowCount,group.rows,group),groupListData.push(groupHeader),groupListData=groupListData.concat(childData)):(groupHeader.level=group.level,groupHeader.headerContent=group.generator(group.key,group.rows.length,group.rows,group),groupHeader.rowCount=group.getRows().length,groupListData.push(groupHeader),group.getRows().forEach((function(row){groupListData.push(row.getData("data"))})))})),groupListData},GroupRows.prototype.getGroupedData=function(){return this.pullGroupListData(this.groupList)},GroupRows.prototype.getRowGroup=function(row){var match=!1;return this.groupList.forEach((function(group){var result=group.getRowGroup(row);result&&(match=result)})),match},GroupRows.prototype.countGroups=function(){return this.groupList.length},GroupRows.prototype.generateGroups=function(rows){var self=this,oldGroups=self.groups;self.groups={},self.groupList=[],this.allowedValues&&this.allowedValues[0]?(this.allowedValues[0].forEach((function(value){self.createGroup(value,0,oldGroups)})),rows.forEach((function(row){self.assignRowToExistingGroup(row,oldGroups)}))):rows.forEach((function(row){self.assignRowToGroup(row,oldGroups)}))},GroupRows.prototype.createGroup=function(groupID,level,oldGroups){var groupKey=level+"_"+groupID,group;oldGroups=oldGroups||[],group=new Group(this,!1,level,groupID,this.groupIDLookups[0].field,this.headerGenerator[0],oldGroups[groupKey]),this.groups[groupKey]=group,this.groupList.push(group)},GroupRows.prototype.assignRowToExistingGroup=function(row,oldGroups){var groupID,groupKey="0_"+this.groupIDLookups[0].func(row.getData());this.groups[groupKey]&&this.groups[groupKey].addRow(row)},GroupRows.prototype.assignRowToGroup=function(row,oldGroups){var groupID=this.groupIDLookups[0].func(row.getData()),newGroupNeeded=!this.groups["0_"+groupID];return newGroupNeeded&&this.createGroup(groupID,0,oldGroups),this.groups["0_"+groupID].addRow(row),!newGroupNeeded},GroupRows.prototype.updateGroupRows=function(force){var self=this,output=[],oldRowCount;if(this.groupList.forEach((function(group){output=output.concat(group.getHeadersAndRows())})),force){var displayIndex=this.table.rowManager.setDisplayRows(output,this.getDisplayIndex());!0!==displayIndex&&this.setDisplayIndex(displayIndex),this.table.rowManager.refreshActiveData("group",!0,!0)}return output},GroupRows.prototype.scrollHeaders=function(left){left+="px",this.groupList.forEach((function(group){group.scrollHeader(left)}))},GroupRows.prototype.removeGroup=function(group){var groupKey=group.level+"_"+group.key,index;this.groups[groupKey]&&(delete this.groups[groupKey],(index=this.groupList.indexOf(group))>-1&&this.groupList.splice(index,1))},Tabulator.prototype.registerModule("groupRows",GroupRows);var History=function History(table){this.table=table,this.history=[],this.index=-1};History.prototype.clear=function(){this.history=[],this.index=-1},History.prototype.action=function(type,component,data){this.history=this.history.slice(0,this.index+1),this.history.push({type:type,component:component,data:data}),this.index++},History.prototype.getHistoryUndoSize=function(){return this.index+1},History.prototype.getHistoryRedoSize=function(){return this.history.length-(this.index+1)},History.prototype.undo=function(){if(this.index>-1){var action=this.history[this.index];return this.undoers[action.type].call(this,action),this.index--,this.table.options.historyUndo.call(this.table,action.type,action.component.getComponent(),action.data),!0}return console.warn("History Undo Error - No more history to undo"),!1},History.prototype.redo=function(){if(this.history.length-1>this.index){this.index++;var action=this.history[this.index];return this.redoers[action.type].call(this,action),this.table.options.historyRedo.call(this.table,action.type,action.component.getComponent(),action.data),!0}return console.warn("History Redo Error - No more history to redo"),!1},History.prototype.undoers={cellEdit:function cellEdit(action){action.component.setValueProcessData(action.data.oldValue)},rowAdd:function rowAdd(action){action.component.deleteActual()},rowDelete:function rowDelete(action){var newRow=this.table.rowManager.addRowActual(action.data.data,action.data.pos,action.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(action.component,newRow)},rowMove:function rowMove(action){this.table.rowManager.moveRowActual(action.component,this.table.rowManager.rows[action.data.posFrom],!action.data.after),this.table.rowManager.redraw()}},History.prototype.redoers={cellEdit:function cellEdit(action){action.component.setValueProcessData(action.data.newValue)},rowAdd:function rowAdd(action){var newRow=this.table.rowManager.addRowActual(action.data.data,action.data.pos,action.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(action.component,newRow)},rowDelete:function rowDelete(action){action.component.deleteActual()},rowMove:function rowMove(action){this.table.rowManager.moveRowActual(action.component,this.table.rowManager.rows[action.data.posTo],action.data.after),this.table.rowManager.redraw()}},History.prototype._rebindRow=function(oldRow,newRow){this.history.forEach((function(action){if(action.component instanceof Row)action.component===oldRow&&(action.component=newRow);else if(action.component instanceof Cell&&action.component.row===oldRow){var field=action.component.column.getField();field&&(action.component=newRow.getCell(field))}}))},Tabulator.prototype.registerModule("history",History);var HtmlTableImport=function HtmlTableImport(table){this.table=table,this.fieldIndex=[],this.hasIndex=!1};HtmlTableImport.prototype.parseTable=function(){var self=this,element=this.table.element,options=this.table.options,columns=options.columns,headers=element.getElementsByTagName("th"),rows=element.getElementsByTagName("tbody")[0],data=[],newTable;this.hasIndex=!1,this.table.options.htmlImporting.call(this.table),rows=rows?rows.getElementsByTagName("tr"):[],this._extractOptions(element,options),headers.length?this._extractHeaders(headers,rows):this._generateBlankHeaders(headers,rows);for(var index=0;index-1&&self.pressedKeys.splice(index,1)}},this.table.element.addEventListener("keydown",this.keyupBinding),this.table.element.addEventListener("keyup",this.keydownBinding)},Keybindings.prototype.clearBindings=function(){this.keyupBinding&&this.table.element.removeEventListener("keydown",this.keyupBinding),this.keydownBinding&&this.table.element.removeEventListener("keyup",this.keydownBinding)},Keybindings.prototype.checkBinding=function(e,binding){var self=this,match=!0;return e.ctrlKey==binding.ctrl&&e.shiftKey==binding.shift&&e.metaKey==binding.meta&&(binding.keys.forEach((function(key){var index;-1==self.pressedKeys.indexOf(key)&&(match=!1)})),match&&binding.action.call(self,e),!0)},Keybindings.prototype.bindings={navPrev:"shift + 9",navNext:9,navUp:38,navDown:40,scrollPageUp:33,scrollPageDown:34,scrollToStart:36,scrollToEnd:35,undo:"ctrl + 90",redo:"ctrl + 89",copyToClipboard:"ctrl + 67"},Keybindings.prototype.actions={keyBlock:function keyBlock(e){e.stopPropagation(),e.preventDefault()},scrollPageUp:function scrollPageUp(e){var rowManager=this.table.rowManager,newPos=rowManager.scrollTop-rowManager.height,scrollMax=rowManager.element.scrollHeight;e.preventDefault(),rowManager.displayRowsCount&&(newPos>=0?rowManager.element.scrollTop=newPos:rowManager.scrollToRow(rowManager.getDisplayRows()[0])),this.table.element.focus()},scrollPageDown:function scrollPageDown(e){var rowManager=this.table.rowManager,newPos=rowManager.scrollTop+rowManager.height,scrollMax=rowManager.element.scrollHeight;e.preventDefault(),rowManager.displayRowsCount&&(newPos<=scrollMax?rowManager.element.scrollTop=newPos:rowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount-1])),this.table.element.focus()},scrollToStart:function scrollToStart(e){var rowManager=this.table.rowManager;e.preventDefault(),rowManager.displayRowsCount&&rowManager.scrollToRow(rowManager.getDisplayRows()[0]),this.table.element.focus()},scrollToEnd:function scrollToEnd(e){var rowManager=this.table.rowManager;e.preventDefault(),rowManager.displayRowsCount&&rowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount-1]),this.table.element.focus()},navPrev:function navPrev(e){var cell=!1;this.table.modExists("edit")&&(cell=this.table.modules.edit.currentCell)&&(e.preventDefault(),cell.nav().prev())},navNext:function navNext(e){var cell=!1,newRow=this.table.options.tabEndNewRow,nav;this.table.modExists("edit")&&(cell=this.table.modules.edit.currentCell)&&(e.preventDefault(),(nav=cell.nav()).next()||newRow&&(cell.getElement().firstChild.blur(),(newRow=!0===newRow?this.table.addRow({}):"function"==typeof newRow?this.table.addRow(newRow(cell.row.getComponent())):this.table.addRow(Object.assign({},newRow))).then((function(){setTimeout((function(){nav.next()}))}))))},navLeft:function navLeft(e){var cell=!1;this.table.modExists("edit")&&(cell=this.table.modules.edit.currentCell)&&(e.preventDefault(),cell.nav().left())},navRight:function navRight(e){var cell=!1;this.table.modExists("edit")&&(cell=this.table.modules.edit.currentCell)&&(e.preventDefault(),cell.nav().right())},navUp:function navUp(e){var cell=!1;this.table.modExists("edit")&&(cell=this.table.modules.edit.currentCell)&&(e.preventDefault(),cell.nav().up())},navDown:function navDown(e){var cell=!1;this.table.modExists("edit")&&(cell=this.table.modules.edit.currentCell)&&(e.preventDefault(),cell.nav().down())},undo:function undo(e){var cell=!1;this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&((cell=this.table.modules.edit.currentCell)||(e.preventDefault(),this.table.modules.history.undo()))},redo:function redo(e){var cell=!1;this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&((cell=this.table.modules.edit.currentCell)||(e.preventDefault(),this.table.modules.history.redo()))},copyToClipboard:function copyToClipboard(e){this.table.modules.edit.currentCell||this.table.modExists("clipboard",!0)&&this.table.modules.clipboard.copy(!1,!0)}},Tabulator.prototype.registerModule("keybindings",Keybindings);var Menu=function Menu(table){this.table=table,this.menuEl=!1,this.blurEvent=this.hideMenu.bind(this),this.escEvent=this.escMenu.bind(this),this.nestedMenuBlock=!1};Menu.prototype.initializeColumnHeader=function(column){var _this61=this,headerMenuEl;column.definition.headerContextMenu&&column.getElement().addEventListener("contextmenu",(function(e){var menu="function"==typeof column.definition.headerContextMenu?column.definition.headerContextMenu(column.getComponent()):column.definition.headerContextMenu;e.preventDefault(),_this61.loadMenu(e,column,menu)})),column.definition.headerMenu&&((headerMenuEl=document.createElement("span")).classList.add("tabulator-header-menu-button"),headerMenuEl.innerHTML="⋮",headerMenuEl.addEventListener("click",(function(e){var menu="function"==typeof column.definition.headerMenu?column.definition.headerMenu(column.getComponent()):column.definition.headerMenu;e.stopPropagation(),e.preventDefault(),_this61.loadMenu(e,column,menu)})),column.titleElement.insertBefore(headerMenuEl,column.titleElement.firstChild))},Menu.prototype.initializeCell=function(cell){var _this62=this;cell.getElement().addEventListener("contextmenu",(function(e){var menu="function"==typeof cell.column.definition.contextMenu?cell.column.definition.contextMenu(cell.getComponent()):cell.column.definition.contextMenu;e.stopImmediatePropagation(),_this62.loadMenu(e,cell,menu)}))},Menu.prototype.initializeRow=function(row){var _this63=this;row.getElement().addEventListener("contextmenu",(function(e){var menu="function"==typeof _this63.table.options.rowContextMenu?_this63.table.options.rowContextMenu(row.getComponent()):_this63.table.options.rowContextMenu;_this63.loadMenu(e,row,menu)}))},Menu.prototype.initializeGroup=function(group){var _this64=this;group.getElement().addEventListener("contextmenu",(function(e){var menu="function"==typeof _this64.table.options.groupContextMenu?_this64.table.options.groupContextMenu(group.getComponent()):_this64.table.options.groupContextMenu;_this64.loadMenu(e,group,menu)}))},Menu.prototype.loadMenu=function(e,component,menu){var _this65=this,docHeight=Math.max(document.body.offsetHeight,window.innerHeight);if(e.preventDefault(),menu&&menu.length){if(this.nestedMenuBlock){if(this.isOpen())return}else this.nestedMenuBlock=setTimeout((function(){_this65.nestedMenuBlock=!1}),100);this.hideMenu(),this.menuEl=document.createElement("div"),this.menuEl.classList.add("tabulator-menu"),menu.forEach((function(item){var itemEl=document.createElement("div"),label=item.label,disabled=item.disabled;item.separator?itemEl.classList.add("tabulator-menu-separator"):(itemEl.classList.add("tabulator-menu-item"),"function"==typeof label&&(label=label(component.getComponent())),label instanceof Node?itemEl.appendChild(label):itemEl.innerHTML=label,"function"==typeof disabled&&(disabled=disabled(component.getComponent())),disabled?(itemEl.classList.add("tabulator-menu-item-disabled"),itemEl.addEventListener("click",(function(e){e.stopPropagation()}))):itemEl.addEventListener("click",(function(e){_this65.hideMenu(),item.action(e,component.getComponent())}))),_this65.menuEl.appendChild(itemEl)})),this.menuEl.style.top=e.pageY+"px",this.menuEl.style.left=e.pageX+"px",document.body.addEventListener("click",this.blurEvent),this.table.rowManager.element.addEventListener("scroll",this.blurEvent),setTimeout((function(){document.body.addEventListener("contextmenu",_this65.blurEvent)}),100),document.body.addEventListener("keydown",this.escEvent),document.body.appendChild(this.menuEl),e.pageX+this.menuEl.offsetWidth>=document.body.offsetWidth&&(this.menuEl.style.left="",this.menuEl.style.right=document.body.offsetWidth-e.pageX+"px"),e.pageY+this.menuEl.offsetHeight>=docHeight&&(this.menuEl.style.top="",this.menuEl.style.bottom=docHeight-e.pageY+"px")}},Menu.prototype.isOpen=function(){return!!this.menuEl.parentNode},Menu.prototype.escMenu=function(e){27==e.keyCode&&this.hideMenu()},Menu.prototype.hideMenu=function(){this.menuEl.parentNode&&this.menuEl.parentNode.removeChild(this.menuEl),this.escEvent&&document.body.removeEventListener("keydown",this.escEvent),this.blurEvent&&(document.body.removeEventListener("click",this.blurEvent),document.body.removeEventListener("contextmenu",this.blurEvent),this.table.rowManager.element.removeEventListener("scroll",this.blurEvent))},Menu.prototype.menus={},Tabulator.prototype.registerModule("menu",Menu);var MoveColumns=function MoveColumns(table){this.table=table,this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=250,this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.startX=0,this.autoScrollMargin=40,this.autoScrollStep=5,this.autoScrollTimeout=!1,this.touchMove=!1,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this)};MoveColumns.prototype.createPlaceholderElement=function(){var el=document.createElement("div");return el.classList.add("tabulator-col"),el.classList.add("tabulator-col-placeholder"),el},MoveColumns.prototype.initializeColumn=function(column){var self=this,config={},colEl;column.modules.frozen||(colEl=column.getElement(),config.mousemove=function(e){column.parent===self.moving.parent&&((self.touchMove?e.touches[0].pageX:e.pageX)-Tabulator.prototype.helpers.elOffset(colEl).left+self.table.columnManager.element.scrollLeft>column.getWidth()/2?self.toCol===column&&self.toColAfter||(colEl.parentNode.insertBefore(self.placeholderElement,colEl.nextSibling),self.moveColumn(column,!0)):(self.toCol!==column||self.toColAfter)&&(colEl.parentNode.insertBefore(self.placeholderElement,colEl),self.moveColumn(column,!1)))}.bind(self),colEl.addEventListener("mousedown",(function(e){self.touchMove=!1,1===e.which&&(self.checkTimeout=setTimeout((function(){self.startMove(e,column)}),self.checkPeriod))})),colEl.addEventListener("mouseup",(function(e){1===e.which&&self.checkTimeout&&clearTimeout(self.checkTimeout)})),self.bindTouchEvents(column)),column.modules.moveColumn=config},MoveColumns.prototype.bindTouchEvents=function(column){var self=this,colEl=column.getElement(),startXMove=!1,dir=!1,currentCol,nextCol,prevCol,nextColWidth,prevColWidth,nextColWidthLast,prevColWidthLast;colEl.addEventListener("touchstart",(function(e){self.checkTimeout=setTimeout((function(){self.touchMove=!0,currentCol=column,nextCol=column.nextColumn(),nextColWidth=nextCol?nextCol.getWidth()/2:0,prevCol=column.prevColumn(),prevColWidth=prevCol?prevCol.getWidth()/2:0,nextColWidthLast=0,prevColWidthLast=0,startXMove=!1,self.startMove(e,column)}),self.checkPeriod)}),{passive:!0}),colEl.addEventListener("touchmove",(function(e){var halfCol,diff,moveToCol;self.moving&&(self.moveHover(e),startXMove||(startXMove=e.touches[0].pageX),(diff=e.touches[0].pageX-startXMove)>0?nextCol&&diff-nextColWidthLast>nextColWidth&&(moveToCol=nextCol)!==column&&(startXMove=e.touches[0].pageX,moveToCol.getElement().parentNode.insertBefore(self.placeholderElement,moveToCol.getElement().nextSibling),self.moveColumn(moveToCol,!0)):prevCol&&-diff-prevColWidthLast>prevColWidth&&(moveToCol=prevCol)!==column&&(startXMove=e.touches[0].pageX,moveToCol.getElement().parentNode.insertBefore(self.placeholderElement,moveToCol.getElement()),self.moveColumn(moveToCol,!1)),moveToCol&&(currentCol=moveToCol,nextCol=moveToCol.nextColumn(),nextColWidthLast=nextColWidth,nextColWidth=nextCol?nextCol.getWidth()/2:0,prevCol=moveToCol.prevColumn(),prevColWidthLast=prevColWidth,prevColWidth=prevCol?prevCol.getWidth()/2:0))}),{passive:!0}),colEl.addEventListener("touchend",(function(e){self.checkTimeout&&clearTimeout(self.checkTimeout),self.moving&&self.endMove(e)}))},MoveColumns.prototype.startMove=function(e,column){var element=column.getElement();this.moving=column,this.startX=(this.touchMove?e.touches[0].pageX:e.pageX)-Tabulator.prototype.helpers.elOffset(element).left,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=column.getWidth()+"px",this.placeholderElement.style.height=column.getHeight()+"px",element.parentNode.insertBefore(this.placeholderElement,element),element.parentNode.removeChild(element),this.hoverElement=element.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.table.columnManager.getElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.bottom="0",this.touchMove||(this._bindMouseMove(),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove)),this.moveHover(e)},MoveColumns.prototype._bindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach((function(column){column.modules.moveColumn.mousemove&&column.getElement().addEventListener("mousemove",column.modules.moveColumn.mousemove)}))},MoveColumns.prototype._unbindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach((function(column){column.modules.moveColumn.mousemove&&column.getElement().removeEventListener("mousemove",column.modules.moveColumn.mousemove)}))},MoveColumns.prototype.moveColumn=function(column,after){var movingCells=this.moving.getCells();this.toCol=column,this.toColAfter=after,after?column.getCells().forEach((function(cell,i){var cellEl=cell.getElement();cellEl.parentNode.insertBefore(movingCells[i].getElement(),cellEl.nextSibling)})):column.getCells().forEach((function(cell,i){var cellEl=cell.getElement();cellEl.parentNode.insertBefore(movingCells[i].getElement(),cellEl)}))},MoveColumns.prototype.endMove=function(e){(1===e.which||this.touchMove)&&(this._unbindMouseMove(),this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toCol&&this.table.columnManager.moveColumnActual(this.moving,this.toCol,this.toColAfter),this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.touchMove||(document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove)))},MoveColumns.prototype.moveHover=function(e){var self=this,columnHolder=self.table.columnManager.getElement(),scrollLeft=columnHolder.scrollLeft,xPos=(self.touchMove?e.touches[0].pageX:e.pageX)-Tabulator.prototype.helpers.elOffset(columnHolder).left+scrollLeft,scrollPos;self.hoverElement.style.left=xPos-self.startX+"px",xPos-scrollLeftgroup.getHeight()/2?self.toRow===group&&self.toRowAfter||((rowEl=group.getElement()).parentNode.insertBefore(self.placeholderElement,rowEl.nextSibling),self.moveRow(group,!0)):(self.toRow!==group||self.toRowAfter)&&(rowEl=group.getElement()).previousSibling&&(rowEl.parentNode.insertBefore(self.placeholderElement,rowEl),self.moveRow(group,!1))}.bind(self),group.modules.moveRow=config},MoveRows.prototype.initializeRow=function(row){var self=this,config={},rowEl;config.mouseup=function(e){self.tableRowDrop(e,row)}.bind(self),config.mousemove=function(e){var rowEl,rowEl;e.pageY-Tabulator.prototype.helpers.elOffset(row.element).top+self.table.rowManager.element.scrollTop>row.getHeight()/2?self.toRow===row&&self.toRowAfter||((rowEl=row.getElement()).parentNode.insertBefore(self.placeholderElement,rowEl.nextSibling),self.moveRow(row,!0)):(self.toRow!==row||self.toRowAfter)&&((rowEl=row.getElement()).parentNode.insertBefore(self.placeholderElement,rowEl),self.moveRow(row,!1))}.bind(self),this.hasHandle||((rowEl=row.getElement()).addEventListener("mousedown",(function(e){1===e.which&&(self.checkTimeout=setTimeout((function(){self.startMove(e,row)}),self.checkPeriod))})),rowEl.addEventListener("mouseup",(function(e){1===e.which&&self.checkTimeout&&clearTimeout(self.checkTimeout)})),this.bindTouchEvents(row,row.getElement())),row.modules.moveRow=config},MoveRows.prototype.initializeCell=function(cell){var self=this,cellEl=cell.getElement();cellEl.addEventListener("mousedown",(function(e){1===e.which&&(self.checkTimeout=setTimeout((function(){self.startMove(e,cell.row)}),self.checkPeriod))})),cellEl.addEventListener("mouseup",(function(e){1===e.which&&self.checkTimeout&&clearTimeout(self.checkTimeout)})),this.bindTouchEvents(cell.row,cell.getElement())},MoveRows.prototype.bindTouchEvents=function(row,element){var self=this,startYMove=!1,dir=!1,currentRow,nextRow,prevRow,nextRowHeight,prevRowHeight,nextRowHeightLast,prevRowHeightLast;element.addEventListener("touchstart",(function(e){self.checkTimeout=setTimeout((function(){self.touchMove=!0,currentRow=row,nextRow=row.nextRow(),nextRowHeight=nextRow?nextRow.getHeight()/2:0,prevRow=row.prevRow(),prevRowHeight=prevRow?prevRow.getHeight()/2:0,nextRowHeightLast=0,prevRowHeightLast=0,startYMove=!1,self.startMove(e,row)}),self.checkPeriod)}),{passive:!0}),this.moving,this.toRow,this.toRowAfter,element.addEventListener("touchmove",(function(e){var halfCol,diff,moveToRow;self.moving&&(e.preventDefault(),self.moveHover(e),startYMove||(startYMove=e.touches[0].pageY),(diff=e.touches[0].pageY-startYMove)>0?nextRow&&diff-nextRowHeightLast>nextRowHeight&&(moveToRow=nextRow)!==row&&(startYMove=e.touches[0].pageY,moveToRow.getElement().parentNode.insertBefore(self.placeholderElement,moveToRow.getElement().nextSibling),self.moveRow(moveToRow,!0)):prevRow&&-diff-prevRowHeightLast>prevRowHeight&&(moveToRow=prevRow)!==row&&(startYMove=e.touches[0].pageY,moveToRow.getElement().parentNode.insertBefore(self.placeholderElement,moveToRow.getElement()),self.moveRow(moveToRow,!1)),moveToRow&&(currentRow=moveToRow,nextRow=moveToRow.nextRow(),nextRowHeightLast=nextRowHeight,nextRowHeight=nextRow?nextRow.getHeight()/2:0,prevRow=moveToRow.prevRow(),prevRowHeightLast=prevRowHeight,prevRowHeight=prevRow?prevRow.getHeight()/2:0))})),element.addEventListener("touchend",(function(e){self.checkTimeout&&clearTimeout(self.checkTimeout),self.moving&&(self.endMove(e),self.touchMove=!1)}))},MoveRows.prototype._bindMouseMove=function(){var self=this;this.table.rowManager.getDisplayRows().forEach((function(row){"row"!==row.type&&"group"!==row.type||!row.modules.moveRow.mousemove||row.getElement().addEventListener("mousemove",row.modules.moveRow.mousemove)}))},MoveRows.prototype._unbindMouseMove=function(){var self=this;this.table.rowManager.getDisplayRows().forEach((function(row){"row"!==row.type&&"group"!==row.type||!row.modules.moveRow.mousemove||row.getElement().removeEventListener("mousemove",row.modules.moveRow.mousemove)}))},MoveRows.prototype.startMove=function(e,row){var element=row.getElement();this.setStartPosition(e,row),this.moving=row,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=row.getWidth()+"px",this.placeholderElement.style.height=row.getHeight()+"px",this.connection?(this.table.element.classList.add("tabulator-movingrow-sending"),this.connectToTables(row)):(element.parentNode.insertBefore(this.placeholderElement,element),element.parentNode.removeChild(element)),this.hoverElement=element.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.connection?(document.body.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this.hoverElement.style.width=this.table.element.clientWidth+"px",this.hoverElement.style.whiteSpace="nowrap",this.hoverElement.style.overflow="hidden",this.hoverElement.style.pointerEvents="none"):(this.table.rowManager.getTableElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this._bindMouseMove()),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove),this.moveHover(e)},MoveRows.prototype.setStartPosition=function(e,row){var pageX=this.touchMove?e.touches[0].pageX:e.pageX,pageY=this.touchMove?e.touches[0].pageY:e.pageY,element,position;element=row.getElement(),this.connection?(position=element.getBoundingClientRect(),this.startX=position.left-pageX+window.pageXOffset,this.startY=position.top-pageY+window.pageYOffset):this.startY=pageY-element.getBoundingClientRect().top},MoveRows.prototype.endMove=function(e){e&&1!==e.which&&!this.touchMove||(this._unbindMouseMove(),this.connection||(this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement)),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toRow&&this.table.rowManager.moveRow(this.moving,this.toRow,this.toRowAfter),this.moving=!1,this.toRow=!1,this.toRowAfter=!1,document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove),this.connection&&(this.table.element.classList.remove("tabulator-movingrow-sending"),this.disconnectFromTables()))},MoveRows.prototype.moveRow=function(row,after){this.toRow=row,this.toRowAfter=after},MoveRows.prototype.moveHover=function(e){this.connection?this.moveHoverConnections.call(this,e):this.moveHoverTable.call(this,e)},MoveRows.prototype.moveHoverTable=function(e){var rowHolder=this.table.rowManager.getElement(),scrollTop=rowHolder.scrollTop,yPos=(this.touchMove?e.touches[0].pageY:e.pageY)-rowHolder.getBoundingClientRect().top+scrollTop,scrollPos;this.hoverElement.style.top=yPos-this.startY+"px"},MoveRows.prototype.moveHoverConnections=function(e){this.hoverElement.style.left=this.startX+(this.touchMove?e.touches[0].pageX:e.pageX)+"px",this.hoverElement.style.top=this.startY+(this.touchMove?e.touches[0].pageY:e.pageY)+"px"},MoveRows.prototype.elementRowDrop=function(e,element,row){this.table.options.movableRowsElementDrop&&this.table.options.movableRowsElementDrop(e,element,!!row&&row.getComponent())},MoveRows.prototype.connectToTables=function(row){var _this66=this,connectionTables;this.connectionSelectorsTables&&(connectionTables=this.table.modules.comms.getConnections(this.connectionSelectorsTables),this.table.options.movableRowsSendingStart.call(this.table,connectionTables),this.table.modules.comms.send(this.connectionSelectorsTables,"moveRow","connect",{row:row})),this.connectionSelectorsElements&&(this.connectionElements=[],Array.isArray(this.connectionSelectorsElements)||(this.connectionSelectorsElements=[this.connectionSelectorsElements]),this.connectionSelectorsElements.forEach((function(query){"string"==typeof query?_this66.connectionElements=_this66.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(query))):_this66.connectionElements.push(query)})),this.connectionElements.forEach((function(element){var dropEvent=function dropEvent(e){_this66.elementRowDrop(e,element,_this66.moving)};element.addEventListener("mouseup",dropEvent),element.tabulatorElementDropEvent=dropEvent,element.classList.add("tabulator-movingrow-receiving")})))},MoveRows.prototype.disconnectFromTables=function(){var connectionTables;this.connectionSelectorsTables&&(connectionTables=this.table.modules.comms.getConnections(this.connectionSelectorsTables),this.table.options.movableRowsSendingStop.call(this.table,connectionTables),this.table.modules.comms.send(this.connectionSelectorsTables,"moveRow","disconnect")),this.connectionElements.forEach((function(element){element.classList.remove("tabulator-movingrow-receiving"),element.removeEventListener("mouseup",element.tabulatorElementDropEvent),delete element.tabulatorElementDropEvent}))},MoveRows.prototype.connect=function(table,row){var self=this;return this.connectedTable?(console.warn("Move Row Error - Table cannot accept connection, already connected to table:",this.connectedTable),!1):(this.connectedTable=table,this.connectedRow=row,this.table.element.classList.add("tabulator-movingrow-receiving"),this.table.rowManager.getDisplayRows().forEach((function(row){"row"===row.type&&row.modules.moveRow&&row.modules.moveRow.mouseup&&row.getElement().addEventListener("mouseup",row.modules.moveRow.mouseup)})),this.tableRowDropEvent=this.tableRowDrop.bind(this),this.table.element.addEventListener("mouseup",this.tableRowDropEvent),this.table.options.movableRowsReceivingStart.call(this.table,row,table),!0)},MoveRows.prototype.disconnect=function(table){var self=this;table===this.connectedTable?(this.connectedTable=!1,this.connectedRow=!1,this.table.element.classList.remove("tabulator-movingrow-receiving"),this.table.rowManager.getDisplayRows().forEach((function(row){"row"===row.type&&row.modules.moveRow&&row.modules.moveRow.mouseup&&row.getElement().removeEventListener("mouseup",row.modules.moveRow.mouseup)})),this.table.element.removeEventListener("mouseup",this.tableRowDropEvent),this.table.options.movableRowsReceivingStop.call(this.table,table)):console.warn("Move Row Error - trying to disconnect from non connected table")},MoveRows.prototype.dropComplete=function(table,row,success){var sender=!1;if(success){switch(_typeof(this.table.options.movableRowsSender)){case"string":sender=this.senders[this.table.options.movableRowsSender];break;case"function":sender=this.table.options.movableRowsSender}sender?sender.call(this,this.moving.getComponent(),row?row.getComponent():void 0,table):this.table.options.movableRowsSender&&console.warn("Mover Row Error - no matching sender found:",this.table.options.movableRowsSender),this.table.options.movableRowsSent.call(this.table,this.moving.getComponent(),row?row.getComponent():void 0,table)}else this.table.options.movableRowsSentFailed.call(this.table,this.moving.getComponent(),row?row.getComponent():void 0,table);this.endMove()},MoveRows.prototype.tableRowDrop=function(e,row){var receiver=!1,success=!1;switch(console.trace("drop"),e.stopImmediatePropagation(),_typeof(this.table.options.movableRowsReceiver)){case"string":receiver=this.receivers[this.table.options.movableRowsReceiver];break;case"function":receiver=this.table.options.movableRowsReceiver}receiver?success=receiver.call(this,this.connectedRow.getComponent(),row?row.getComponent():void 0,this.connectedTable):console.warn("Mover Row Error - no matching receiver found:",this.table.options.movableRowsReceiver),success?this.table.options.movableRowsReceived.call(this.table,this.connectedRow.getComponent(),row?row.getComponent():void 0,this.connectedTable):this.table.options.movableRowsReceivedFailed.call(this.table,this.connectedRow.getComponent(),row?row.getComponent():void 0,this.connectedTable),this.table.modules.comms.send(this.connectedTable,"moveRow","dropcomplete",{row:row,success:success})},MoveRows.prototype.receivers={insert:function insert(fromRow,toRow,fromTable){return this.table.addRow(fromRow.getData(),void 0,toRow),!0},add:function add(fromRow,toRow,fromTable){return this.table.addRow(fromRow.getData()),!0},update:function update(fromRow,toRow,fromTable){return!!toRow&&(toRow.update(fromRow.getData()),!0)},replace:function replace(fromRow,toRow,fromTable){return!!toRow&&(this.table.addRow(fromRow.getData(),void 0,toRow),toRow.delete(),!0)}},MoveRows.prototype.senders={delete:function _delete(fromRow,toRow,toTable){fromRow.delete()}},MoveRows.prototype.commsReceived=function(table,action,data){switch(action){case"connect":return this.connect(table,data.row);case"disconnect":return this.disconnect(table);case"dropcomplete":return this.dropComplete(table,data.row,data.success)}},Tabulator.prototype.registerModule("moveRow",MoveRows);var Mutator=function Mutator(table){this.table=table,this.allowedTypes=["","data","edit","clipboard"],this.enabled=!0};Mutator.prototype.initializeColumn=function(column){var self=this,match=!1,config={};this.allowedTypes.forEach((function(type){var key="mutator"+(type.charAt(0).toUpperCase()+type.slice(1)),mutator;column.definition[key]&&(mutator=self.lookupMutator(column.definition[key]))&&(match=!0,config[key]={mutator:mutator,params:column.definition[key+"Params"]||{}})})),match&&(column.modules.mutate=config)},Mutator.prototype.lookupMutator=function(value){var mutator=!1;switch(void 0===value?"undefined":_typeof(value)){case"string":this.mutators[value]?mutator=this.mutators[value]:console.warn("Mutator Error - No such mutator found, ignoring: ",value);break;case"function":mutator=value}return mutator},Mutator.prototype.transformRow=function(data,type,updatedData){var self=this,key="mutator"+(type.charAt(0).toUpperCase()+type.slice(1)),value;return this.enabled&&this.table.columnManager.traverse((function(column){var mutator,params,component;column.modules.mutate&&(mutator=column.modules.mutate[key]||column.modules.mutate.mutator||!1)&&(value=column.getFieldValue(void 0!==updatedData?updatedData:data),"data"!=type&&void 0===value||(component=column.getComponent(),params="function"==typeof mutator.params?mutator.params(value,data,type,component):mutator.params,column.setFieldValue(data,mutator.mutator(value,data,type,params,component))))})),data},Mutator.prototype.transformCell=function(cell,value){var mutator=cell.column.modules.mutate.mutatorEdit||cell.column.modules.mutate.mutator||!1,tempData={};return mutator?(tempData=Object.assign(tempData,cell.row.getData()),cell.column.setFieldValue(tempData,value),mutator.mutator(value,tempData,"edit",mutator.params,cell.getComponent())):value},Mutator.prototype.enable=function(){this.enabled=!0},Mutator.prototype.disable=function(){this.enabled=!1},Mutator.prototype.mutators={},Tabulator.prototype.registerModule("mutator",Mutator);var Page=function Page(table){this.table=table,this.mode="local",this.progressiveLoad=!1,this.size=0,this.page=1,this.count=5,this.max=1,this.displayIndex=0,this.initialLoad=!0,this.pageSizes=[],this.dataReceivedNames={},this.dataSentNames={},this.createElements()};Page.prototype.createElements=function(){var button;this.element=document.createElement("span"),this.element.classList.add("tabulator-paginator"),this.pagesElement=document.createElement("span"),this.pagesElement.classList.add("tabulator-pages"),(button=document.createElement("button")).classList.add("tabulator-page"),button.setAttribute("type","button"),button.setAttribute("role","button"),button.setAttribute("aria-label",""),button.setAttribute("title",""),this.firstBut=button.cloneNode(!0),this.firstBut.setAttribute("data-page","first"),this.prevBut=button.cloneNode(!0),this.prevBut.setAttribute("data-page","prev"),this.nextBut=button.cloneNode(!0),this.nextBut.setAttribute("data-page","next"),this.lastBut=button.cloneNode(!0),this.lastBut.setAttribute("data-page","last"),this.table.options.paginationSizeSelector&&(this.pageSizeSelect=document.createElement("select"),this.pageSizeSelect.classList.add("tabulator-page-size"))},Page.prototype.generatePageSizeSelectList=function(){var _this67=this,pageSizes=[];if(this.pageSizeSelect){if(Array.isArray(this.table.options.paginationSizeSelector))pageSizes=this.table.options.paginationSizeSelector,this.pageSizes=pageSizes,-1==this.pageSizes.indexOf(this.size)&&pageSizes.unshift(this.size);else if(-1==this.pageSizes.indexOf(this.size)){pageSizes=[];for(var _i9=1;_i9<5;_i9++)pageSizes.push(this.size*_i9);this.pageSizes=pageSizes}else pageSizes=this.pageSizes;for(;this.pageSizeSelect.firstChild;)this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild);pageSizes.forEach((function(item){var itemEl=document.createElement("option");itemEl.value=item,!0===item?_this67.table.modules.localize.bind("pagination|all",(function(value){itemEl.innerHTML=value})):itemEl.innerHTML=item,_this67.pageSizeSelect.appendChild(itemEl)})),this.pageSizeSelect.value=this.size}},Page.prototype.initialize=function(hidden){var self=this,pageSelectLabel,testElRow,testElCell;this.dataSentNames=Object.assign({},this.paginationDataSentNames),this.dataSentNames=Object.assign(this.dataSentNames,this.table.options.paginationDataSent),this.dataReceivedNames=Object.assign({},this.paginationDataReceivedNames),this.dataReceivedNames=Object.assign(this.dataReceivedNames,this.table.options.paginationDataReceived),self.table.modules.localize.bind("pagination|first",(function(value){self.firstBut.innerHTML=value})),self.table.modules.localize.bind("pagination|first_title",(function(value){self.firstBut.setAttribute("aria-label",value),self.firstBut.setAttribute("title",value)})),self.table.modules.localize.bind("pagination|prev",(function(value){self.prevBut.innerHTML=value})),self.table.modules.localize.bind("pagination|prev_title",(function(value){self.prevBut.setAttribute("aria-label",value),self.prevBut.setAttribute("title",value)})),self.table.modules.localize.bind("pagination|next",(function(value){self.nextBut.innerHTML=value})),self.table.modules.localize.bind("pagination|next_title",(function(value){self.nextBut.setAttribute("aria-label",value),self.nextBut.setAttribute("title",value)})),self.table.modules.localize.bind("pagination|last",(function(value){self.lastBut.innerHTML=value})),self.table.modules.localize.bind("pagination|last_title",(function(value){self.lastBut.setAttribute("aria-label",value),self.lastBut.setAttribute("title",value)})),self.firstBut.addEventListener("click",(function(){self.setPage(1)})),self.prevBut.addEventListener("click",(function(){self.previousPage()})),self.nextBut.addEventListener("click",(function(){self.nextPage().then((function(){})).catch((function(){}))})),self.lastBut.addEventListener("click",(function(){self.setPage(self.max)})),self.table.options.paginationElement&&(self.element=self.table.options.paginationElement),this.pageSizeSelect&&(pageSelectLabel=document.createElement("label"),self.table.modules.localize.bind("pagination|page_size",(function(value){self.pageSizeSelect.setAttribute("aria-label",value),self.pageSizeSelect.setAttribute("title",value),pageSelectLabel.innerHTML=value})),self.element.appendChild(pageSelectLabel),self.element.appendChild(self.pageSizeSelect),self.pageSizeSelect.addEventListener("change",(function(e){self.setPageSize("true"==self.pageSizeSelect.value||self.pageSizeSelect.value),self.setPage(1).then((function(){})).catch((function(){}))}))),self.element.appendChild(self.firstBut),self.element.appendChild(self.prevBut),self.element.appendChild(self.pagesElement),self.element.appendChild(self.nextBut),self.element.appendChild(self.lastBut),self.table.options.paginationElement||hidden||self.table.footerManager.append(self.element,self),self.mode=self.table.options.pagination,self.table.options.paginationSize?self.size=self.table.options.paginationSize:((testElRow=document.createElement("div")).classList.add("tabulator-row"),testElRow.style.visibility=hidden,(testElCell=document.createElement("div")).classList.add("tabulator-cell"),testElCell.innerHTML="Page Row Test",testElRow.appendChild(testElCell),self.table.rowManager.getTableElement().appendChild(testElRow),self.size=Math.floor(self.table.rowManager.getElement().clientHeight/testElRow.offsetHeight),self.table.rowManager.getTableElement().removeChild(testElRow)),self.count=self.table.options.paginationButtonCount,self.generatePageSizeSelectList()},Page.prototype.initializeProgressive=function(mode){this.initialize(!0),this.mode="progressive_"+mode,this.progressiveLoad=!0},Page.prototype.setDisplayIndex=function(index){this.displayIndex=index},Page.prototype.getDisplayIndex=function(){return this.displayIndex},Page.prototype.setMaxRows=function(rowCount){this.max=rowCount?!0===this.size?1:Math.ceil(rowCount/this.size):1,this.page>this.max&&(this.page=this.max)},Page.prototype.reset=function(force,columnsChanged){return("local"==this.mode||force)&&(this.page=1),columnsChanged&&(this.initialLoad=!0),!0},Page.prototype.setMaxPage=function(max){max=parseInt(max),this.max=max||1,this.page>this.max&&(this.page=this.max,this.trigger())},Page.prototype.setPage=function(page){var _this68=this,self=this;switch(page){case"first":return this.setPage(1);case"prev":return this.previousPage();case"next":return this.nextPage();case"last":return this.setPage(this.max)}return new Promise((function(resolve,reject){(page=parseInt(page))>0&&page<=_this68.max?(_this68.page=page,_this68.trigger().then((function(){resolve()})).catch((function(){reject()})),self.table.options.persistence&&self.table.modExists("persistence",!0)&&self.table.modules.persistence.config.page&&self.table.modules.persistence.save("page")):(console.warn("Pagination Error - Requested page is out of range of 1 - "+_this68.max+":",page),reject())}))},Page.prototype.setPageToRow=function(row){var _this69=this;return new Promise((function(resolve,reject){var rows,index=_this69.table.rowManager.getDisplayRows(_this69.displayIndex-1).indexOf(row);if(index>-1){var page=!0===_this69.size?1:Math.ceil((index+1)/_this69.size);_this69.setPage(page).then((function(){resolve()})).catch((function(){reject()}))}else console.warn("Pagination Error - Requested row is not visible"),reject()}))},Page.prototype.setPageSize=function(size){!0!==size&&(size=parseInt(size)),size>0&&(this.size=size),this.pageSizeSelect&&this.generatePageSizeSelectList(),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.page&&this.table.modules.persistence.save("page")},Page.prototype._setPageButtons=function(){for(var self=this,leftSize=Math.floor((this.count-1)/2),rightSize=Math.ceil((this.count-1)/2),min=this.max-this.page+leftSize+10&&_i10<=this.max&&this.pagesElement.appendChild(this._generatePageButton(_i10));this.footerRedraw()},Page.prototype._generatePageButton=function(page){var self=this,button=document.createElement("button");return button.classList.add("tabulator-page"),page==self.page&&button.classList.add("active"),button.setAttribute("type","button"),button.setAttribute("role","button"),self.table.modules.localize.bind("pagination|page_title",(function(value){button.setAttribute("aria-label",value+" "+page),button.setAttribute("title",value+" "+page)})),button.setAttribute("data-page",page),button.textContent=page,button.addEventListener("click",(function(e){self.setPage(page)})),button},Page.prototype.previousPage=function(){var _this70=this;return new Promise((function(resolve,reject){_this70.page>1?(_this70.page--,_this70.trigger().then((function(){resolve()})).catch((function(){reject()})),_this70.table.options.persistence&&_this70.table.modExists("persistence",!0)&&_this70.table.modules.persistence.config.page&&_this70.table.modules.persistence.save("page")):(console.warn("Pagination Error - Previous page would be less than page 1:",0),reject())}))},Page.prototype.nextPage=function(){var _this71=this;return new Promise((function(resolve,reject){_this71.page<_this71.max?(_this71.page++,_this71.trigger().then((function(){resolve()})).catch((function(){reject()})),_this71.table.options.persistence&&_this71.table.modExists("persistence",!0)&&_this71.table.modules.persistence.config.page&&_this71.table.modules.persistence.save("page")):(_this71.progressiveLoad||console.warn("Pagination Error - Next page would be greater than maximum page of "+_this71.max+":",_this71.max+1),reject())}))},Page.prototype.getPage=function(){return this.page},Page.prototype.getPageMax=function(){return this.max},Page.prototype.getPageSize=function(size){return this.size},Page.prototype.getMode=function(){return this.mode},Page.prototype.getRows=function(data){var output,start,end;if("local"==this.mode){output=[],!0===this.size?(start=0,end=data.length-1):end=(start=this.size*(this.page-1))+parseInt(this.size),this._setPageButtons();for(var _i11=start;_i11i?output.splice(i,0,column):output.push(column))})),output},Persistence.prototype._findColumn=function(columns,subject){var type=subject.columns?"group":subject.field?"field":"object";return columns.find((function(col){switch(type){case"group":return col.title===subject.title&&col.columns.length===subject.columns.length;case"field":return col.field===subject.field;case"object":return col===subject}}))},Persistence.prototype.save=function(type){var data={};switch(type){case"columns":data=this.parseColumns(this.table.columnManager.getColumns());break;case"filter":data=this.table.modules.filter.getFilters();break;case"sort":data=this.validateSorters(this.table.modules.sort.getSort());break;case"group":data=this.getGroupConfig();break;case"page":data=this.getPageConfig()}this.writeFunc&&this.writeFunc(this.id,type,data)},Persistence.prototype.validateSorters=function(data){return data.forEach((function(item){item.column=item.field,delete item.field})),data},Persistence.prototype.getGroupConfig=function(){return this.config.group&&((!0===this.config.group||this.config.group.groupBy)&&(data.groupBy=this.table.options.groupBy),(!0===this.config.group||this.config.group.groupStartOpen)&&(data.groupStartOpen=this.table.options.groupStartOpen),(!0===this.config.group||this.config.group.groupHeader)&&(data.groupHeader=this.table.options.groupHeader)),data},Persistence.prototype.getPageConfig=function(){var data={};return this.config.page&&((!0===this.config.page||this.config.page.size)&&(data.paginationSize=this.table.modules.page.getPageSize()),(!0===this.config.page||this.config.page.page)&&(data.paginationInitialPage=this.table.modules.page.getPage())),data},Persistence.prototype.parseColumns=function(columns){var self=this,definitions=[];return columns.forEach((function(column){var defStore={},colDef=column.getDefinition(),keys;column.isGroup?(defStore.title=colDef.title,defStore.columns=self.parseColumns(column.getColumns())):(defStore.field=column.getField(),!0===self.config.columns||null==self.config.columns?(keys=Object.keys(colDef)).push("width"):keys=self.config.columns,keys.forEach((function(key){switch(key){case"width":defStore.width=column.getWidth();break;case"visible":defStore.visible=column.visible;break;default:defStore[key]=colDef[key]}}))),definitions.push(defStore)})),definitions},Persistence.prototype.readers={local:function local(id,type){var data=localStorage.getItem(id+"-"+type);return!!data&&JSON.parse(data)},cookie:function cookie(id,type){var cookie=document.cookie,key=id+"-"+type,cookiePos=cookie.indexOf(key+"="),end,data;return cookiePos>-1&&(cookie=cookie.substr(cookiePos),(end=cookie.indexOf(";"))>-1&&(cookie=cookie.substr(0,end)),data=cookie.replace(key+"=","")),!!data&&JSON.parse(data)}},Persistence.prototype.writers={local:function local(id,type,data){localStorage.setItem(id+"-"+type,JSON.stringify(data))},cookie:function cookie(id,type,data){var expireDate=new Date;expireDate.setDate(expireDate.getDate()+1e4),document.cookie=id+"-"+type+"="+JSON.stringify(data)+"; expires="+expireDate.toUTCString()}},Tabulator.prototype.registerModule("persistence",Persistence);var Print=function Print(table){this.table=table,this.element=!1,this.manualBlock=!1};Print.prototype.initialize=function(){window.addEventListener("beforeprint",this.replaceTable.bind(this)),window.addEventListener("afterprint",this.cleanup.bind(this))},Print.prototype.replaceTable=function(){this.manualBlock||(this.element=document.createElement("div"),this.element.classList.add("tabulator-print-table"),this.element.appendChild(this.table.modules.export.genereateTable(this.table.options.printConfig,this.table.options.printStyled,this.table.options.printRowRange,"print")),this.table.element.style.display="none",this.table.element.parentNode.insertBefore(this.element,this.table.element))},Print.prototype.cleanup=function(){document.body.classList.remove("tabulator-print-fullscreen-hide"),this.element&&this.element.parentNode&&(this.element.parentNode.removeChild(this.element),this.table.element.style.display="")},Print.prototype.printFullscreen=function(visible,style,config){var scrollX=window.scrollX,scrollY=window.scrollY,headerEl=document.createElement("div"),footerEl=document.createElement("div"),tableEl=this.table.modules.export.genereateTable(void 0!==config?config:this.table.options.printConfig,void 0!==style?style:this.table.options.printStyled,visible,"print"),headerContent,footerContent;this.manualBlock=!0,this.element=document.createElement("div"),this.element.classList.add("tabulator-print-fullscreen"),this.table.options.printHeader&&(headerEl.classList.add("tabulator-print-header"),"string"==typeof(headerContent="function"==typeof this.table.options.printHeader?this.table.options.printHeader.call(this.table):this.table.options.printHeader)?headerEl.innerHTML=headerContent:headerEl.appendChild(headerContent),this.element.appendChild(headerEl)),this.element.appendChild(tableEl),this.table.options.printFooter&&(footerEl.classList.add("tabulator-print-footer"),"string"==typeof(footerContent="function"==typeof this.table.options.printFooter?this.table.options.printFooter.call(this.table):this.table.options.printFooter)?footerEl.innerHTML=footerContent:footerEl.appendChild(footerContent),this.element.appendChild(footerEl)),document.body.classList.add("tabulator-print-fullscreen-hide"),document.body.appendChild(this.element),this.table.options.printFormatter&&this.table.options.printFormatter(this.element,tableEl),window.print(),this.cleanup(),window.scrollTo(scrollX,scrollY),this.manualBlock=!1},Tabulator.prototype.registerModule("print",Print);var ReactiveData=function ReactiveData(table){this.table=table,this.data=!1,this.blocked=!1,this.origFuncs={},this.currentVersion=0};ReactiveData.prototype.watchData=function(data){var self=this,pushFunc,version;this.currentVersion++,version=this.currentVersion,self.unwatchData(),self.data=data,self.origFuncs.push=data.push,Object.defineProperty(self.data,"push",{enumerable:!1,configurable:!0,value:function value(){var args=Array.from(arguments);return self.blocked||version!==self.currentVersion||args.forEach((function(arg){self.table.rowManager.addRowActual(arg,!1)})),self.origFuncs.push.apply(data,arguments)}}),self.origFuncs.unshift=data.unshift,Object.defineProperty(self.data,"unshift",{enumerable:!1,configurable:!0,value:function value(){var args=Array.from(arguments);return self.blocked||version!==self.currentVersion||args.forEach((function(arg){self.table.rowManager.addRowActual(arg,!0)})),self.origFuncs.unshift.apply(data,arguments)}}),self.origFuncs.shift=data.shift,Object.defineProperty(self.data,"shift",{enumerable:!1,configurable:!0,value:function value(){var row;return self.blocked||version!==self.currentVersion||self.data.length&&(row=self.table.rowManager.getRowFromDataObject(self.data[0]))&&row.deleteActual(),self.origFuncs.shift.call(data)}}),self.origFuncs.pop=data.pop,Object.defineProperty(self.data,"pop",{enumerable:!1,configurable:!0,value:function value(){var row;return self.blocked||version!==self.currentVersion||self.data.length&&(row=self.table.rowManager.getRowFromDataObject(self.data[self.data.length-1]))&&row.deleteActual(),self.origFuncs.pop.call(data)}}),self.origFuncs.splice=data.splice,Object.defineProperty(self.data,"splice",{enumerable:!1,configurable:!0,value:function value(){var args=Array.from(arguments),start=args[0]<0?data.length+args[0]:args[0],end=args[1],newRows=!!args[2]&&args.slice(2),startRow;if(!self.blocked&&version===self.currentVersion){if(newRows&&((startRow=!!data[start]&&self.table.rowManager.getRowFromDataObject(data[start]))?newRows.forEach((function(rowData){self.table.rowManager.addRowActual(rowData,!0,startRow,!0)})):(newRows=newRows.slice().reverse()).forEach((function(rowData){self.table.rowManager.addRowActual(rowData,!0,!1,!0)}))),0!==end){var oldRows=data.slice(start,void 0===args[1]?args[1]:start+end);oldRows.forEach((function(rowData,i){var row=self.table.rowManager.getRowFromDataObject(rowData);row&&row.deleteActual(i!==oldRows.length-1)}))}(newRows||0!==end)&&self.table.rowManager.reRenderInPosition()}return self.origFuncs.splice.apply(data,arguments)}})},ReactiveData.prototype.unwatchData=function(){if(!1!==this.data)for(var key in this.origFuncs)Object.defineProperty(this.data,key,{enumerable:!0,configurable:!0,writable:!0,value:this.origFuncs.key})},ReactiveData.prototype.watchRow=function(row){var self=this,data=row.getData();for(var key in this.blocked=!0,data)this.watchKey(row,data,key);this.blocked=!1},ReactiveData.prototype.watchKey=function(row,data,key){var self=this,props=Object.getOwnPropertyDescriptor(data,key),value=data[key],version=this.currentVersion;Object.defineProperty(data,key,{set:function set(newValue){if(value=newValue,!self.blocked&&version===self.currentVersion){var update={};update[key]=newValue,row.updateData(update)}props.set&&props.set(newValue)},get:function get(){return props.get&&props.get(),value}})},ReactiveData.prototype.unwatchRow=function(row){var data=row.getData();for(var key in data)Object.defineProperty(data,key,{value:data[key]})},ReactiveData.prototype.block=function(){this.blocked=!0},ReactiveData.prototype.unblock=function(){this.blocked=!1},Tabulator.prototype.registerModule("reactiveData",ReactiveData);var ResizeColumns=function ResizeColumns(table){this.table=table,this.startColumn=!1,this.startX=!1,this.startWidth=!1,this.handle=null,this.prevHandle=null};ResizeColumns.prototype.initializeColumn=function(type,column,element){var self=this,variableHeight=!1,mode=this.table.options.resizableColumns;if("header"===type&&(variableHeight="textarea"==column.definition.formatter||column.definition.variableHeight,column.modules.resize={variableHeight:variableHeight}),!0===mode||mode==type){var handle=document.createElement("div");handle.className="tabulator-col-resize-handle";var prevHandle=document.createElement("div");prevHandle.className="tabulator-col-resize-handle prev",handle.addEventListener("click",(function(e){e.stopPropagation()}));var handleDown=function handleDown(e){var nearestColumn=column.getLastColumn();nearestColumn&&self._checkResizability(nearestColumn)&&(self.startColumn=column,self._mouseDown(e,nearestColumn,handle))};handle.addEventListener("mousedown",handleDown),handle.addEventListener("touchstart",handleDown,{passive:!0}),handle.addEventListener("dblclick",(function(e){var col=column.getLastColumn();col&&self._checkResizability(col)&&(e.stopPropagation(),col.reinitializeWidth(!0))})),prevHandle.addEventListener("click",(function(e){e.stopPropagation()}));var prevHandleDown=function prevHandleDown(e){var nearestColumn,colIndex,prevColumn;(nearestColumn=column.getFirstColumn())&&(prevColumn=(colIndex=self.table.columnManager.findColumnIndex(nearestColumn))>0&&self.table.columnManager.getColumnByIndex(colIndex-1))&&self._checkResizability(prevColumn)&&(self.startColumn=column,self._mouseDown(e,prevColumn,prevHandle))};prevHandle.addEventListener("mousedown",prevHandleDown),prevHandle.addEventListener("touchstart",prevHandleDown,{passive:!0}),prevHandle.addEventListener("dblclick",(function(e){var nearestColumn,colIndex,prevColumn;(nearestColumn=column.getFirstColumn())&&(prevColumn=(colIndex=self.table.columnManager.findColumnIndex(nearestColumn))>0&&self.table.columnManager.getColumnByIndex(colIndex-1))&&self._checkResizability(prevColumn)&&(e.stopPropagation(),prevColumn.reinitializeWidth(!0))})),element.appendChild(handle),element.appendChild(prevHandle)}},ResizeColumns.prototype._checkResizability=function(column){return void 0!==column.definition.resizable?column.definition.resizable:this.table.options.resizableColumns},ResizeColumns.prototype._mouseDown=function(e,column,handle){var self=this;function mouseMove(e){column.setWidth(self.startWidth+((void 0===e.screenX?e.touches[0].screenX:e.screenX)-self.startX)),!self.table.browserSlow&&column.modules.resize&&column.modules.resize.variableHeight&&column.checkCellHeights()}function mouseUp(e){self.startColumn.modules.edit&&(self.startColumn.modules.edit.blocked=!1),self.table.browserSlow&&column.modules.resize&&column.modules.resize.variableHeight&&column.checkCellHeights(),document.body.removeEventListener("mouseup",mouseUp),document.body.removeEventListener("mousemove",mouseMove),handle.removeEventListener("touchmove",mouseMove),handle.removeEventListener("touchend",mouseUp),self.table.element.classList.remove("tabulator-block-select"),self.table.options.persistence&&self.table.modExists("persistence",!0)&&self.table.modules.persistence.config.columns&&self.table.modules.persistence.save("columns"),self.table.options.columnResized.call(self.table,column.getComponent())}self.table.element.classList.add("tabulator-block-select"),e.stopPropagation(),self.startColumn.modules.edit&&(self.startColumn.modules.edit.blocked=!0),self.startX=void 0===e.screenX?e.touches[0].screenX:e.screenX,self.startWidth=column.getWidth(),document.body.addEventListener("mousemove",mouseMove),document.body.addEventListener("mouseup",mouseUp),handle.addEventListener("touchmove",mouseMove,{passive:!0}),handle.addEventListener("touchend",mouseUp)},Tabulator.prototype.registerModule("resizeColumns",ResizeColumns);var ResizeRows=function ResizeRows(table){this.table=table,this.startColumn=!1,this.startY=!1,this.startHeight=!1,this.handle=null,this.prevHandle=null};ResizeRows.prototype.initializeRow=function(row){var self=this,rowEl=row.getElement(),handle=document.createElement("div");handle.className="tabulator-row-resize-handle";var prevHandle=document.createElement("div");prevHandle.className="tabulator-row-resize-handle prev",handle.addEventListener("click",(function(e){e.stopPropagation()}));var handleDown=function handleDown(e){self.startRow=row,self._mouseDown(e,row,handle)};handle.addEventListener("mousedown",handleDown),handle.addEventListener("touchstart",handleDown,{passive:!0}),prevHandle.addEventListener("click",(function(e){e.stopPropagation()}));var prevHandleDown=function prevHandleDown(e){var prevRow=self.table.rowManager.prevDisplayRow(row);prevRow&&(self.startRow=prevRow,self._mouseDown(e,prevRow,prevHandle))};prevHandle.addEventListener("mousedown",prevHandleDown),prevHandle.addEventListener("touchstart",prevHandleDown,{passive:!0}),rowEl.appendChild(handle),rowEl.appendChild(prevHandle)},ResizeRows.prototype._mouseDown=function(e,row,handle){var self=this;function mouseMove(e){row.setHeight(self.startHeight+((void 0===e.screenY?e.touches[0].screenY:e.screenY)-self.startY))}function mouseUp(e){document.body.removeEventListener("mouseup",mouseMove),document.body.removeEventListener("mousemove",mouseMove),handle.removeEventListener("touchmove",mouseMove),handle.removeEventListener("touchend",mouseUp),self.table.element.classList.remove("tabulator-block-select"),self.table.options.rowResized.call(this.table,row.getComponent())}self.table.element.classList.add("tabulator-block-select"),e.stopPropagation(),self.startY=void 0===e.screenY?e.touches[0].screenY:e.screenY,self.startHeight=row.getHeight(),document.body.addEventListener("mousemove",mouseMove),document.body.addEventListener("mouseup",mouseUp),handle.addEventListener("touchmove",mouseMove,{passive:!0}),handle.addEventListener("touchend",mouseUp)},Tabulator.prototype.registerModule("resizeRows",ResizeRows);var ResizeTable=function ResizeTable(table){this.table=table,this.binding=!1,this.observer=!1,this.containerObserver=!1,this.tableHeight=0,this.tableWidth=0,this.containerHeight=0,this.containerWidth=0,this.autoResize=!1};ResizeTable.prototype.initialize=function(row){var _this74=this,table=this.table,tableStyle;this.tableHeight=table.element.clientHeight,this.tableWidth=table.element.clientWidth,table.element.parentNode&&(this.containerHeight=table.element.parentNode.clientHeight,this.containerWidth=table.element.parentNode.clientWidth),"undefined"!=typeof ResizeObserver&&"virtual"===table.rowManager.getRenderMode()?(this.autoResize=!0,this.observer=new ResizeObserver((function(entry){if(!table.browserMobile||table.browserMobile&&!table.modules.edit.currentCell){var nodeHeight=Math.floor(entry[0].contentRect.height),nodeWidth=Math.floor(entry[0].contentRect.width);_this74.tableHeight==nodeHeight&&_this74.tableWidth==nodeWidth||(_this74.tableHeight=nodeHeight,_this74.tableWidth=nodeWidth,table.element.parentNode&&(_this74.containerHeight=table.element.parentNode.clientHeight,_this74.containerWidth=table.element.parentNode.clientWidth),table.redraw())}})),this.observer.observe(table.element),tableStyle=window.getComputedStyle(table.element),this.table.element.parentNode&&!this.table.rowManager.fixedHeight&&(tableStyle.getPropertyValue("max-height")||tableStyle.getPropertyValue("min-height"))&&(this.containerObserver=new ResizeObserver((function(entry){if(!table.browserMobile||table.browserMobile&&!table.modules.edit.currentCell){var nodeHeight=Math.floor(entry[0].contentRect.height),nodeWidth=Math.floor(entry[0].contentRect.width);_this74.containerHeight==nodeHeight&&_this74.containerWidth==nodeWidth||(_this74.containerHeight=nodeHeight,_this74.containerWidth=nodeWidth,_this74.tableHeight=table.element.clientHeight,_this74.tableWidth=table.element.clientWidth,table.redraw()),table.redraw()}})),this.containerObserver.observe(this.table.element.parentNode))):(this.binding=function(){(!table.browserMobile||table.browserMobile&&!table.modules.edit.currentCell)&&table.redraw()},window.addEventListener("resize",this.binding))},ResizeTable.prototype.clearBindings=function(row){this.binding&&window.removeEventListener("resize",this.binding),this.observer&&this.observer.unobserve(this.table.element),this.containerObserver&&this.containerObserver.unobserve(this.table.element.parentNode)},Tabulator.prototype.registerModule("resizeTable",ResizeTable);var ResponsiveLayout=function ResponsiveLayout(table){this.table=table,this.columns=[],this.hiddenColumns=[],this.mode="",this.index=0,this.collapseFormatter=[],this.collapseStartOpen=!0,this.collapseHandleColumn=!1};ResponsiveLayout.prototype.initialize=function(){var self=this,columns=[];this.mode=this.table.options.responsiveLayout,this.collapseFormatter=this.table.options.responsiveLayoutCollapseFormatter||this.formatCollapsedData,this.collapseStartOpen=this.table.options.responsiveLayoutCollapseStartOpen,this.hiddenColumns=[],this.table.columnManager.columnsByIndex.forEach((function(column,i){column.modules.responsive&&column.modules.responsive.order&&column.modules.responsive.visible&&(column.modules.responsive.index=i,columns.push(column),column.visible||"collapse"!==self.mode||self.hiddenColumns.push(column))})),columns=(columns=columns.reverse()).sort((function(a,b){var diff;return b.modules.responsive.order-a.modules.responsive.order||b.modules.responsive.index-a.modules.responsive.index})),this.columns=columns,"collapse"===this.mode&&this.generateCollapsedContent();for(var _iterator=this.table.columnManager.columnsByIndex,_isArray=Array.isArray(_iterator),_i12=0,_iterator=_isArray?_iterator:_iterator[Symbol.iterator]();;){var _ref;if(_isArray){if(_i12>=_iterator.length)break;_ref=_iterator[_i12++]}else{if((_i12=_iterator.next()).done)break;_ref=_i12.value}var col=_ref;if("responsiveCollapse"==col.definition.formatter){this.collapseHandleColumn=col;break}}this.collapseHandleColumn&&(this.hiddenColumns.length?this.collapseHandleColumn.show():this.collapseHandleColumn.hide())},ResponsiveLayout.prototype.initializeColumn=function(column){var def=column.getDefinition();column.modules.responsive={order:void 0===def.responsive?1:def.responsive,visible:!1!==def.visible}},ResponsiveLayout.prototype.initializeRow=function(row){var el;"calc"!==row.type&&((el=document.createElement("div")).classList.add("tabulator-responsive-collapse"),row.modules.responsiveLayout={element:el,open:this.collapseStartOpen},this.collapseStartOpen||(el.style.display="none"))},ResponsiveLayout.prototype.layoutRow=function(row){var rowEl=row.getElement();row.modules.responsiveLayout&&(rowEl.appendChild(row.modules.responsiveLayout.element),this.generateCollapsedRowContent(row))},ResponsiveLayout.prototype.updateColumnVisibility=function(column,visible){var index;column.modules.responsive&&(column.modules.responsive.visible=visible,this.initialize())},ResponsiveLayout.prototype.hideColumn=function(column){var colCount=this.hiddenColumns.length;column.hide(!1,!0),"collapse"===this.mode&&(this.hiddenColumns.unshift(column),this.generateCollapsedContent(),this.collapseHandleColumn&&!colCount&&this.collapseHandleColumn.show())},ResponsiveLayout.prototype.showColumn=function(column){var index;column.show(!1,!0),column.setWidth(column.getWidth()),"collapse"===this.mode&&((index=this.hiddenColumns.indexOf(column))>-1&&this.hiddenColumns.splice(index,1),this.generateCollapsedContent(),this.collapseHandleColumn&&!this.hiddenColumns.length&&this.collapseHandleColumn.hide())},ResponsiveLayout.prototype.update=function(){for(var self=this,working=!0;working;){var width="fitColumns"==this.table.modules.layout.getMode()?this.table.columnManager.getFlexBaseWidth():this.table.columnManager.getWidth(),diff=(this.table.options.headerVisible?this.table.columnManager.element.clientWidth:this.table.element.clientWidth)-width;if(diff<0){var column=this.columns[this.index];column?(this.hideColumn(column),this.index++):working=!1}else{var _column=this.columns[this.index-1];_column&&diff>0&&diff>=_column.getWidth()?(this.showColumn(_column),this.index--):working=!1}this.table.rowManager.activeRowsCount||this.table.rowManager.renderEmptyScroll()}},ResponsiveLayout.prototype.generateCollapsedContent=function(){var self=this,rows;this.table.rowManager.getDisplayRows().forEach((function(row){self.generateCollapsedRowContent(row)}))},ResponsiveLayout.prototype.generateCollapsedRowContent=function(row){var el,contents;if(row.modules.responsiveLayout){for(el=row.modules.responsiveLayout.element;el.firstChild;)el.removeChild(el.firstChild);(contents=this.collapseFormatter(this.generateCollapsedRowData(row)))&&el.appendChild(contents)}},ResponsiveLayout.prototype.generateCollapsedRowData=function(row){var self=this,data=row.getData(),output=[],mockCellComponent;return this.hiddenColumns.forEach((function(column){var value=column.getFieldValue(data);column.definition.title&&column.field&&(column.modules.format&&self.table.options.responsiveLayoutCollapseUseFormatters?(mockCellComponent={value:!1,data:{},getValue:function getValue(){return value},getData:function getData(){return data},getElement:function getElement(){return document.createElement("div")},getRow:function getRow(){return row.getComponent()},getColumn:function getColumn(){return column.getComponent()}},output.push({title:column.definition.title,value:column.modules.format.formatter.call(self.table.modules.format,mockCellComponent,column.modules.format.params)})):output.push({title:column.definition.title,value:value}))})),output},ResponsiveLayout.prototype.formatCollapsedData=function(data){var list=document.createElement("table"),listContents="";return data.forEach((function(item){var div=document.createElement("div");item.value instanceof Node&&(div.appendChild(item.value),item.value=div.innerHTML),listContents+=""+item.title+""+item.value+""})),list.innerHTML=listContents,Object.keys(data).length?list:""},Tabulator.prototype.registerModule("responsiveLayout",ResponsiveLayout);var SelectRow=function SelectRow(table){this.table=table,this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],this.headerCheckboxElement=null};SelectRow.prototype.clearSelectionData=function(silent){this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],silent||this._rowSelectionChanged()},SelectRow.prototype.initializeRow=function(row){var self=this,element=row.getElement(),endSelect=function endSelect(){setTimeout((function(){self.selecting=!1}),50),document.body.removeEventListener("mouseup",endSelect)};row.modules.select={selected:!1},self.table.options.selectableCheck.call(this.table,row.getComponent())?(element.classList.add("tabulator-selectable"),element.classList.remove("tabulator-unselectable"),self.table.options.selectable&&"highlight"!=self.table.options.selectable&&("click"===self.table.options.selectableRangeMode?element.addEventListener("click",(function(e){if(e.shiftKey){self.table._clearSelection(),self.lastClickedRow=self.lastClickedRow||row;var lastClickedRowIdx=self.table.rowManager.getDisplayRowIndex(self.lastClickedRow),rowIdx=self.table.rowManager.getDisplayRowIndex(row),fromRowIdx=lastClickedRowIdx<=rowIdx?lastClickedRowIdx:rowIdx,toRowIdx=lastClickedRowIdx>=rowIdx?lastClickedRowIdx:rowIdx,rows,toggledRows=self.table.rowManager.getDisplayRows().slice(0).splice(fromRowIdx,toRowIdx-fromRowIdx+1);e.ctrlKey||e.metaKey?(toggledRows.forEach((function(toggledRow){toggledRow!==self.lastClickedRow&&(!0===self.table.options.selectable||self.isRowSelected(row)?self.toggleRow(toggledRow):self.selectedRows.lengthself.table.options.selectable&&(toggledRows=toggledRows.slice(0,self.table.options.selectable)),self.selectRows(toggledRows)),self.table._clearSelection()}else e.ctrlKey||e.metaKey?(self.toggleRow(row),self.lastClickedRow=row):(self.deselectRows(void 0,!0),self.selectRows(row),self.lastClickedRow=row)})):(element.addEventListener("click",(function(e){self.table.modExists("edit")&&self.table.modules.edit.getCurrentCell()||self.table._clearSelection(),self.selecting||self.toggleRow(row)})),element.addEventListener("mousedown",(function(e){if(e.shiftKey)return self.table._clearSelection(),self.selecting=!0,self.selectPrev=[],document.body.addEventListener("mouseup",endSelect),document.body.addEventListener("keyup",endSelect),self.toggleRow(row),!1})),element.addEventListener("mouseenter",(function(e){self.selecting&&(self.table._clearSelection(),self.toggleRow(row),self.selectPrev[1]==row&&self.toggleRow(self.selectPrev[0]))})),element.addEventListener("mouseout",(function(e){self.selecting&&(self.table._clearSelection(),self.selectPrev.unshift(row))}))))):(element.classList.add("tabulator-unselectable"),element.classList.remove("tabulator-selectable"))},SelectRow.prototype.toggleRow=function(row){this.table.options.selectableCheck.call(this.table,row.getComponent())&&(row.modules.select&&row.modules.select.selected?this._deselectRow(row):this._selectRow(row))},SelectRow.prototype.selectRows=function(rows){var _this75=this,rowMatch;switch(void 0===rows?"undefined":_typeof(rows)){case"undefined":this.table.rowManager.rows.forEach((function(row){_this75._selectRow(row,!0,!0)})),this._rowSelectionChanged();break;case"string":(rowMatch=this.table.rowManager.findRow(rows))?this._selectRow(rowMatch,!0,!0):this.table.rowManager.getRows(rows).forEach((function(row){_this75._selectRow(row,!0,!0)})),this._rowSelectionChanged();break;default:Array.isArray(rows)?(rows.forEach((function(row){_this75._selectRow(row,!0,!0)})),this._rowSelectionChanged()):this._selectRow(rows,!1,!0)}},SelectRow.prototype._selectRow=function(rowInfo,silent,force){var index;if(!isNaN(this.table.options.selectable)&&!0!==this.table.options.selectable&&!force&&this.selectedRows.length>=this.table.options.selectable){if(!this.table.options.selectableRollingSelection)return!1;this._deselectRow(this.selectedRows[0])}var row=this.table.rowManager.findRow(rowInfo);row?-1==this.selectedRows.indexOf(row)&&(row.modules.select||(row.modules.select={}),row.modules.select.selected=!0,row.modules.select.checkboxEl&&(row.modules.select.checkboxEl.checked=!0),row.getElement().classList.add("tabulator-selected"),this.selectedRows.push(row),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(row,!0),silent||this.table.options.rowSelected.call(this.table,row.getComponent()),this._rowSelectionChanged(silent)):silent||console.warn("Selection Error - No such row found, ignoring selection:"+rowInfo)},SelectRow.prototype.isRowSelected=function(row){return-1!==this.selectedRows.indexOf(row)},SelectRow.prototype.deselectRows=function(rows,silent){var self=this,rowCount;if(void 0===rows){rowCount=self.selectedRows.length;for(var _i13=0;_i13-1&&(row.modules.select||(row.modules.select={}),row.modules.select.selected=!1,row.modules.select.checkboxEl&&(row.modules.select.checkboxEl.checked=!1),row.getElement().classList.remove("tabulator-selected"),this.selectedRows.splice(index,1),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(row,!1),silent||this.table.options.rowDeselected.call(this.table,row.getComponent()),this._rowSelectionChanged(silent)):silent||console.warn("Deselection Error - No such row found, ignoring selection:"+rowInfo)},SelectRow.prototype.getSelectedData=function(){var data=[];return this.selectedRows.forEach((function(row){data.push(row.getData())})),data},SelectRow.prototype.getSelectedRows=function(){var rows=[];return this.selectedRows.forEach((function(row){rows.push(row.getComponent())})),rows},SelectRow.prototype._rowSelectionChanged=function(silent){this.headerCheckboxElement&&(0===this.selectedRows.length?(this.headerCheckboxElement.checked=!1,this.headerCheckboxElement.indeterminate=!1):this.table.rowManager.rows.length===this.selectedRows.length?(this.headerCheckboxElement.checked=!0,this.headerCheckboxElement.indeterminate=!1):(this.headerCheckboxElement.indeterminate=!0,this.headerCheckboxElement.checked=!1)),silent||this.table.options.rowSelectionChanged.call(this.table,this.getSelectedData(),this.getSelectedRows())},SelectRow.prototype.registerRowSelectCheckbox=function(row,element){row._row.modules.select||(row._row.modules.select={}),row._row.modules.select.checkboxEl=element},SelectRow.prototype.registerHeaderSelectCheckbox=function(element){this.headerCheckboxElement=element},SelectRow.prototype.childRowSelection=function(row,select){var children=this.table.modules.dataTree.getChildren(row);if(select)for(var _iterator2=children,_isArray2=Array.isArray(_iterator2),_i14=0,_iterator2=_isArray2?_iterator2:_iterator2[Symbol.iterator]();;){var _ref2;if(_isArray2){if(_i14>=_iterator2.length)break;_ref2=_iterator2[_i14++]}else{if((_i14=_iterator2.next()).done)break;_ref2=_i14.value}var child=_ref2;this._selectRow(child,!0)}else for(var _iterator3=children,_isArray3=Array.isArray(_iterator3),_i15=0,_iterator3=_isArray3?_iterator3:_iterator3[Symbol.iterator]();;){var _ref3;if(_isArray3){if(_i15>=_iterator3.length)break;_ref3=_iterator3[_i15++]}else{if((_i15=_iterator3.next()).done)break;_ref3=_i15.value}var _child=_ref3;this._deselectRow(_child,!0)}},Tabulator.prototype.registerModule("selectRow",SelectRow);var Sort=function Sort(table){this.table=table,this.sortList=[],this.changed=!1};Sort.prototype.initializeColumn=function(column,content){var self=this,sorter=!1,colEl,arrowEl;switch(_typeof(column.definition.sorter)){case"string":self.sorters[column.definition.sorter]?sorter=self.sorters[column.definition.sorter]:console.warn("Sort Error - No such sorter found: ",column.definition.sorter);break;case"function":sorter=column.definition.sorter}column.modules.sort={sorter:sorter,dir:"none",params:column.definition.sorterParams||{},startingDir:column.definition.headerSortStartingDir||"asc",tristate:void 0!==column.definition.headerSortTristate?column.definition.headerSortTristate:this.table.options.headerSortTristate},(void 0===column.definition.headerSort?!1!==this.table.options.headerSort:!1!==column.definition.headerSort)&&((colEl=column.getElement()).classList.add("tabulator-sortable"),(arrowEl=document.createElement("div")).classList.add("tabulator-arrow"),content.appendChild(arrowEl),colEl.addEventListener("click",(function(e){var dir="",sorters=[],match=!1;if(column.modules.sort){if(column.modules.sort.tristate)dir="none"==column.modules.sort.dir?column.modules.sort.startingDir:column.modules.sort.dir==column.modules.sort.startingDir?"asc"==column.modules.sort.dir?"desc":"asc":"none";else switch(column.modules.sort.dir){case"asc":dir="desc";break;case"desc":dir="asc";break;default:dir=column.modules.sort.startingDir}self.table.options.columnHeaderSortMulti&&(e.shiftKey||e.ctrlKey)?((match=(sorters=self.getSort()).findIndex((function(sorter){return sorter.field===column.getField()})))>-1?(sorters[match].dir=dir,match!=sorters.length-1&&(match=sorters.splice(match,1)[0],"none"!=dir&&sorters.push(match))):"none"!=dir&&sorters.push({column:column,dir:dir}),self.setSort(sorters)):"none"==dir?self.clear():self.setSort(column,dir),self.table.rowManager.sorterRefresh(!self.sortList.length)}})))},Sort.prototype.hasChanged=function(){var changed=this.changed;return this.changed=!1,changed},Sort.prototype.getSort=function(){var self=this,sorters=[];return this.sortList.forEach((function(item){item.column&&sorters.push({column:item.column.getComponent(),field:item.column.getField(),dir:item.dir})})),sorters},Sort.prototype.setSort=function(sortList,dir){var self=this,newSortList=[];Array.isArray(sortList)||(sortList=[{column:sortList,dir:dir}]),sortList.forEach((function(item){var column;(column=self.table.columnManager.findColumn(item.column))?(item.column=column,newSortList.push(item),self.changed=!0):console.warn("Sort Warning - Sort field does not exist and is being ignored: ",item.column)})),self.sortList=newSortList,this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.sort&&this.table.modules.persistence.save("sort")},Sort.prototype.clear=function(){this.setSort([])},Sort.prototype.findSorter=function(column){var row=this.table.rowManager.activeRows[0],sorter="string",field,value;if(row&&(row=row.getData(),field=column.getField()))switch(void 0===(value=column.getFieldValue(row))?"undefined":_typeof(value)){case"undefined":sorter="string";break;case"boolean":sorter="boolean";break;default:isNaN(value)||""===value?value.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)&&(sorter="alphanum"):sorter="number"}return this.sorters[sorter]},Sort.prototype.sort=function(data){var self=this,sortList=this.table.options.sortOrderReverse?self.sortList.slice().reverse():self.sortList,sortListActual=[],rowComponents=[],lastSort;self.table.options.dataSorting&&self.table.options.dataSorting.call(self.table,self.getSort()),self.clearColumnHeaders(),self.table.options.ajaxSorting?sortList.forEach((function(item,i){self.setColumnHeader(item.column,item.dir)})):(sortList.forEach((function(item,i){var sortObj=item.column.modules.sort;item.column&&sortObj&&(sortObj.sorter||(sortObj.sorter=self.findSorter(item.column)),item.params="function"==typeof sortObj.params?sortObj.params(item.column.getComponent(),item.dir):sortObj.params,sortListActual.push(item)),self.setColumnHeader(item.column,item.dir)})),sortListActual.length&&self._sortItems(data,sortListActual)),self.table.options.dataSorted&&(data.forEach((function(row){rowComponents.push(row.getComponent())})),self.table.options.dataSorted.call(self.table,self.getSort(),rowComponents))},Sort.prototype.clearColumnHeaders=function(){this.table.columnManager.getRealColumns().forEach((function(column){column.modules.sort&&(column.modules.sort.dir="none",column.getElement().setAttribute("aria-sort","none"))}))},Sort.prototype.setColumnHeader=function(column,dir){column.modules.sort.dir=dir,column.getElement().setAttribute("aria-sort",dir)},Sort.prototype._sortItems=function(data,sortList){var _this76=this,sorterCount=sortList.length-1;data.sort((function(a,b){for(var result,i=sorterCount;i>=0;i--){var sortItem=sortList[i];if(0!==(result=_this76._sortRow(a,b,sortItem.column,sortItem.dir,sortItem.params)))break}return result}))},Sort.prototype._sortRow=function(a,b,column,dir,params){var el1Comp,el2Comp,colComp,el1="asc"==dir?a:b,el2="asc"==dir?b:a;return a=void 0!==(a=column.getFieldValue(el1.getData()))?a:"",b=void 0!==(b=column.getFieldValue(el2.getData()))?b:"",el1Comp=el1.getComponent(),el2Comp=el2.getComponent(),column.modules.sort.sorter.call(this,a,b,el1Comp,el2Comp,column.getComponent(),dir,params)},Sort.prototype.sorters={number:function number(a,b,aRow,bRow,column,dir,params){var alignEmptyValues=params.alignEmptyValues,decimal=params.decimalSeparator||".",thousand=params.thousandSeparator||",",emptyAlign=0;if(a=parseFloat(String(a).split(thousand).join("").split(decimal).join(".")),b=parseFloat(String(b).split(thousand).join("").split(decimal).join(".")),isNaN(a))emptyAlign=isNaN(b)?0:-1;else{if(!isNaN(b))return a-b;emptyAlign=1}return("top"===alignEmptyValues&&"desc"===dir||"bottom"===alignEmptyValues&&"asc"===dir)&&(emptyAlign*=-1),emptyAlign},string:function string(a,b,aRow,bRow,column,dir,params){var alignEmptyValues=params.alignEmptyValues,emptyAlign=0,locale;if(a){if(b){switch(_typeof(params.locale)){case"boolean":params.locale&&(locale=this.table.modules.localize.getLocale());break;case"string":locale=params.locale}return String(a).toLowerCase().localeCompare(String(b).toLowerCase(),locale)}emptyAlign=1}else emptyAlign=b?-1:0;return("top"===alignEmptyValues&&"desc"===dir||"bottom"===alignEmptyValues&&"asc"===dir)&&(emptyAlign*=-1),emptyAlign},date:function date(a,b,aRow,bRow,column,dir,params){return params.format||(params.format="DD/MM/YYYY"),this.sorters.datetime.call(this,a,b,aRow,bRow,column,dir,params)},time:function time(a,b,aRow,bRow,column,dir,params){return params.format||(params.format="HH:mm"),this.sorters.datetime.call(this,a,b,aRow,bRow,column,dir,params)},datetime:function datetime(a,b,aRow,bRow,column,dir,params){var format=params.format||"DD/MM/YYYY HH:mm:ss",alignEmptyValues=params.alignEmptyValues,emptyAlign=0;if("undefined"!=typeof moment){if(a=moment(a,format),b=moment(b,format),a.isValid()){if(b.isValid())return a-b;emptyAlign=1}else emptyAlign=b.isValid()?-1:0;return("top"===alignEmptyValues&&"desc"===dir||"bottom"===alignEmptyValues&&"asc"===dir)&&(emptyAlign*=-1),emptyAlign}console.error("Sort Error - 'datetime' sorter is dependant on moment.js")},boolean:function boolean(a,b,aRow,bRow,column,dir,params){var el1,el2;return(!0===a||"true"===a||"True"===a||1===a?1:0)-(!0===b||"true"===b||"True"===b||1===b?1:0)},array:function array(a,b,aRow,bRow,column,dir,params){var el1=0,el2=0,type=params.type||"length",alignEmptyValues=params.alignEmptyValues,emptyAlign=0;function calc(value){switch(type){case"length":return value.length;case"sum":return value.reduce((function(c,d){return c+d}));case"max":return Math.max.apply(null,value);case"min":return Math.min.apply(null,value);case"avg":return value.reduce((function(c,d){return c+d}))/value.length}}if(Array.isArray(a)){if(Array.isArray(b))return(el1=a?calc(a):0)-(el2=b?calc(b):0);alignEmptyValues=1}else alignEmptyValues=Array.isArray(b)?-1:0;return("top"===alignEmptyValues&&"desc"===dir||"bottom"===alignEmptyValues&&"asc"===dir)&&(emptyAlign*=-1),emptyAlign},exists:function exists(a,b,aRow,bRow,column,dir,params){var el1,el2;return(void 0===a?0:1)-(void 0===b?0:1)},alphanum:function alphanum(as,bs,aRow,bRow,column,dir,params){var a,b,a1,b1,i=0,L,rx=/(\d+)|(\D+)/g,rd=/\d/,alignEmptyValues=params.alignEmptyValues,emptyAlign=0;if(as||0===as){if(bs||0===bs){if(isFinite(as)&&isFinite(bs))return as-bs;if((a=String(as).toLowerCase())===(b=String(bs).toLowerCase()))return 0;if(!rd.test(a)||!rd.test(b))return a>b?1:-1;for(a=a.match(rx),b=b.match(rx),L=a.length>b.length?b.length:a.length;ib1?1:-1;return a.length>b.length}emptyAlign=1}else emptyAlign=bs||0===bs?-1:0;return("top"===alignEmptyValues&&"desc"===dir||"bottom"===alignEmptyValues&&"asc"===dir)&&(emptyAlign*=-1),emptyAlign}},Tabulator.prototype.registerModule("sort",Sort);var Validate=function Validate(table){this.table=table,this.invalidCells=[]};return Validate.prototype.initializeColumn=function(column){var self=this,config=[],validator;column.definition.validator&&(Array.isArray(column.definition.validator)?column.definition.validator.forEach((function(item){(validator=self._extractValidator(item))&&config.push(validator)})):(validator=this._extractValidator(column.definition.validator))&&config.push(validator),column.modules.validate=!!config.length&&config)},Validate.prototype._extractValidator=function(value){var type,params,pos;switch(void 0===value?"undefined":_typeof(value)){case"string":return(pos=value.indexOf(":"))>-1?(type=value.substring(0,pos),params=value.substring(pos+1)):type=value,this._buildValidator(type,params);case"function":return this._buildValidator(value);case"object":return this._buildValidator(value.type,value.parameters)}},Validate.prototype._buildValidator=function(type,params){var func="function"==typeof type?type:this.validators[type];return func?{type:"function"==typeof type?"function":type,func:func,params:params}:(console.warn("Validator Setup Error - No matching validator found:",type),!1)},Validate.prototype.validate=function(validators,cell,value){var self=this,valid=[],invalidIndex=this.invalidCells.indexOf(cell);return validators&&validators.forEach((function(item){item.func.call(self,cell.getComponent(),value,item.params)||valid.push({type:item.type,parameters:item.params})})),valid=!valid.length||valid,cell.modules.validate||(cell.modules.validate={}),!0===valid?(cell.modules.validate.invalid=!1,cell.getElement().classList.remove("tabulator-validation-fail"),invalidIndex>-1&&this.invalidCells.splice(invalidIndex,1)):(cell.modules.validate.invalid=!0,"manual"!==this.table.options.validationMode&&cell.getElement().classList.add("tabulator-validation-fail"),-1==invalidIndex&&this.invalidCells.push(cell)),valid},Validate.prototype.getInvalidCells=function(){var output=[];return this.invalidCells.forEach((function(cell){output.push(cell.getComponent())})),output},Validate.prototype.clearValidation=function(cell){var invalidIndex;cell.modules.validate&&cell.modules.validate.invalid&&(cell.element.classList.remove("tabulator-validation-fail"),cell.modules.validate.invalid=!1,(invalidIndex=this.invalidCells.indexOf(cell))>-1&&this.invalidCells.splice(invalidIndex,1))},Validate.prototype.validators={integer:function integer(cell,value,parameters){return""===value||null==value||"number"==typeof(value=Number(value))&&isFinite(value)&&Math.floor(value)===value},float:function float(cell,value,parameters){return""===value||null==value||"number"==typeof(value=Number(value))&&isFinite(value)&&value%1!=0},numeric:function numeric(cell,value,parameters){return""===value||null==value||!isNaN(value)},string:function string(cell,value,parameters){return""===value||null==value||isNaN(value)},max:function max(cell,value,parameters){return""===value||null==value||parseFloat(value)<=parameters},min:function min(cell,value,parameters){return""===value||null==value||parseFloat(value)>=parameters},starts:function starts(cell,value,parameters){return""===value||null==value||String(value).toLowerCase().startsWith(String(parameters).toLowerCase())},ends:function ends(cell,value,parameters){return""===value||null==value||String(value).toLowerCase().endsWith(String(parameters).toLowerCase())},minLength:function minLength(cell,value,parameters){return""===value||null==value||String(value).length>=parameters},maxLength:function maxLength(cell,value,parameters){return""===value||null==value||String(value).length<=parameters},in:function _in(cell,value,parameters){return""===value||null==value||("string"==typeof parameters&&(parameters=parameters.split("|")),""===value||parameters.indexOf(value)>-1)},regex:function regex(cell,value,parameters){return""===value||null==value||new RegExp(parameters).test(value);var reg},unique:function unique(cell,value,parameters){if(""===value||null==value)return!0;var unique=!0,cellData=cell.getData(),column=cell.getColumn()._getSelf();return this.table.rowManager.rows.forEach((function(row){var data=row.getData();data!==cellData&&value==column.getFieldValue(data)&&(unique=!1)})),unique},required:function required(cell,value,parameters){return""!==value&&null!=value}},Tabulator.prototype.registerModule("validate",Validate),Tabulator})); \ No newline at end of file diff --git a/admin/js/vendors/tabulator/js/tabulator.min.orig.js b/admin/js/vendors/tabulator/js/tabulator.min.orig.js new file mode 100644 index 0000000..74f4780 --- /dev/null +++ b/admin/js/vendors/tabulator/js/tabulator.min.orig.js @@ -0,0 +1,12 @@ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ +var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(e,t){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Tabulator=t()}(this,function(){"use strict";Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(e){if(null==this)throw new TypeError('"this" is null or not defined');var t=Object(this),o=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;n>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;n>>0;if(0===i)return!1;for(var n=0|t,s=Math.max(n>=0?n:i-Math.abs(n),0);so?(t=e-o,this.element.style.marginLeft=-t+"px"):this.element.style.marginLeft=0,this.scrollLeft=e,this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.scrollHorizontal()},t.prototype.generateColumnsFromRowData=function(e){var t,o,i=[];if(e&&e.length){t=e[0];for(var n in t){var s={field:n,title:n},r=t[n];switch(void 0===r?"undefined":_typeof(r)){case"undefined":o="string";break;case"boolean":o="boolean";break;case"object":o=Array.isArray(r)?"array":"string";break;default:o=isNaN(r)||""===r?r.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)?"alphanum":"string":"number"}s.sorter=o,i.push(s)}this.table.options.columns=i,this.setColumns(this.table.options.columns)}},t.prototype.setColumns=function(e,t){for(var o=this;o.headersElement.firstChild;)o.headersElement.removeChild(o.headersElement.firstChild);o.columns=[],o.columnsByIndex=[],o.columnsByField={},o.table.modExists("frozenColumns")&&o.table.modules.frozenColumns.reset(),e.forEach(function(e,t){o._addColumn(e)}),o._reIndexColumns(),o.table.options.responsiveLayout&&o.table.modExists("responsiveLayout",!0)&&o.table.modules.responsiveLayout.initialize(),o.redraw(!0)},t.prototype._addColumn=function(e,t,o){var i=new n(e,this),s=i.getElement(),r=o?this.findColumnIndex(o):o;if(o&&r>-1){var a=this.columns.indexOf(o.getTopColumn()),l=o.getElement();t?(this.columns.splice(a,0,i),l.parentNode.insertBefore(s,l)):(this.columns.splice(a+1,0,i),l.parentNode.insertBefore(s,l.nextSibling))}else t?(this.columns.unshift(i),this.headersElement.insertBefore(i.getElement(),this.headersElement.firstChild)):(this.columns.push(i),this.headersElement.appendChild(i.getElement())),i.columnRendered();return i},t.prototype.registerColumnField=function(e){e.definition.field&&(this.columnsByField[e.definition.field]=e)},t.prototype.registerColumnPosition=function(e){this.columnsByIndex.push(e)},t.prototype._reIndexColumns=function(){this.columnsByIndex=[],this.columns.forEach(function(e){e.reRegisterPosition()})},t.prototype._verticalAlignHeaders=function(){var e=this,t=0;e.columns.forEach(function(e){var o;e.clearVerticalAlign(),(o=e.getHeight())>t&&(t=o)}),e.columns.forEach(function(o){o.verticalAlign(e.table.options.columnHeaderVertAlign,t)}),e.rowManager.adjustTableSize()},t.prototype.findColumn=function(e){var t=this;if("object"!=(void 0===e?"undefined":_typeof(e)))return this.columnsByField[e]||!1;if(e instanceof n)return e;if(e instanceof o)return e._getSelf()||!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement){return t.columns.find(function(t){return t.element===e})||!1}return!1},t.prototype.getColumnByField=function(e){return this.columnsByField[e]},t.prototype.getColumnsByFieldRoot=function(e){var t=this,o=[];return Object.keys(this.columnsByField).forEach(function(i){i.split(".")[0]===e&&o.push(t.columnsByField[i])}),o},t.prototype.getColumnByIndex=function(e){return this.columnsByIndex[e]},t.prototype.getFirstVisibileColumn=function(e){var e=this.columnsByIndex.findIndex(function(e){return e.visible});return e>-1&&this.columnsByIndex[e]},t.prototype.getColumns=function(){return this.columns},t.prototype.findColumnIndex=function(e){return this.columnsByIndex.findIndex(function(t){return e===t})},t.prototype.getRealColumns=function(){return this.columnsByIndex},t.prototype.traverse=function(e){this.columnsByIndex.forEach(function(t,o){e(t,o)})},t.prototype.getDefinitions=function(e){var t=this,o=[];return t.columnsByIndex.forEach(function(t){(!e||e&&t.visible)&&o.push(t.getDefinition())}),o},t.prototype.getDefinitionTree=function(){var e=this,t=[];return e.columns.forEach(function(e){t.push(e.getDefinition(!0))}),t},t.prototype.getComponents=function(e){var t=this,o=[];return(e?t.columns:t.columnsByIndex).forEach(function(e){o.push(e.getComponent())}),o},t.prototype.getWidth=function(){var e=0;return this.columnsByIndex.forEach(function(t){t.visible&&(e+=t.getWidth())}),e},t.prototype.moveColumn=function(e,t,o){this.moveColumnActual(e,t,o),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),t.element.parentNode.insertBefore(e.element,t.element),o&&t.element.parentNode.insertBefore(t.element,e.element),this._verticalAlignHeaders(),this.table.rowManager.reinitialize()},t.prototype.moveColumnActual=function(e,t,o){e.parent.isGroup?this._moveColumnInArray(e.parent.columns,e,t,o):this._moveColumnInArray(this.columns,e,t,o),this._moveColumnInArray(this.columnsByIndex,e,t,o,!0),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.table.options.columnMoved&&this.table.options.columnMoved.call(this.table,e.getComponent(),this.table.columnManager.getComponents()),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns")},t.prototype._moveColumnInArray=function(e,t,o,i,n){var s,r=e.indexOf(t);r>-1&&(e.splice(r,1),s=e.indexOf(o),s>-1?i&&(s+=1):s=r,e.splice(s,0,t),n&&this.table.rowManager.rows.forEach(function(e){if(e.cells.length){var t=e.cells.splice(r,1)[0];e.cells.splice(s,0,t)}}))},t.prototype.scrollToColumn=function(e,t,o){var i=this,n=0,s=0,r=0,a=e.getElement();return new Promise(function(l,c){if(void 0===t&&(t=i.table.options.scrollToColumnPosition),void 0===o&&(o=i.table.options.scrollToColumnIfVisible),e.visible){switch(t){case"middle":case"center":r=-i.element.clientWidth/2;break;case"right":r=a.clientWidth-i.headersElement.clientWidth}if(!o&&(s=a.offsetLeft)>0&&s+a.offsetWidthe.rowManager.element.clientHeight&&(t-=e.rowManager.element.offsetWidth-e.rowManager.element.clientWidth),this.columnsByIndex.forEach(function(i){var n,s,r;i.visible&&(n=i.definition.width||0,s=void 0===i.minWidth?e.table.options.columnMinWidth:parseInt(i.minWidth),r="string"==typeof n?n.indexOf("%")>-1?t/100*parseInt(n):parseInt(n):n,o+=r>s?r:s)}),o},t.prototype.addColumn=function(e,t,o){var i=this;return new Promise(function(n,s){var r=i._addColumn(e,t,o);i._reIndexColumns(),i.table.options.responsiveLayout&&i.table.modExists("responsiveLayout",!0)&&i.table.modules.responsiveLayout.initialize(),i.table.modExists("columnCalcs")&&i.table.modules.columnCalcs.recalc(i.table.rowManager.activeRows),i.redraw(),"fitColumns"!=i.table.modules.layout.getMode()&&r.reinitializeWidth(),i._verticalAlignHeaders(),i.table.rowManager.reinitialize(),n(r)})},t.prototype.deregisterColumn=function(e){var t,o=e.getField();o&&delete this.columnsByField[o],t=this.columnsByIndex.indexOf(e),t>-1&&this.columnsByIndex.splice(t,1),t=this.columns.indexOf(e),t>-1&&this.columns.splice(t,1),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.redraw()},t.prototype.redraw=function(e){e&&(d.prototype.helpers.elVisible(this.element)&&this._verticalAlignHeaders(),this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),["fitColumns","fitDataStretch"].indexOf(this.table.modules.layout.getMode())>-1?this.table.modules.layout.layout():e?this.table.modules.layout.layout():this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout(),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),e&&(this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns"),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.redraw()),this.table.footerManager.redraw()};var o=function(e){this._column=e,this.type="ColumnComponent"};o.prototype.getElement=function(){return this._column.getElement()},o.prototype.getDefinition=function(){return this._column.getDefinition()},o.prototype.getField=function(){return this._column.getField()},o.prototype.getCells=function(){var e=[];return this._column.cells.forEach(function(t){e.push(t.getComponent())}),e},o.prototype.getVisibility=function(){return console.warn("getVisibility function is deprecated, you should now use the isVisible function"),this._column.visible},o.prototype.isVisible=function(){return this._column.visible},o.prototype.show=function(){this._column.isGroup?this._column.columns.forEach(function(e){e.show()}):this._column.show()},o.prototype.hide=function(){this._column.isGroup?this._column.columns.forEach(function(e){e.hide()}):this._column.hide()},o.prototype.toggle=function(){this._column.visible?this.hide():this.show()},o.prototype.delete=function(){return this._column.delete()},o.prototype.getSubColumns=function(){var e=[];return this._column.columns.length&&this._column.columns.forEach(function(t){e.push(t.getComponent())}),e},o.prototype.getParentColumn=function(){return this._column.parent instanceof n&&this._column.parent.getComponent()},o.prototype._getSelf=function(){return this._column},o.prototype.scrollTo=function(){return this._column.table.columnManager.scrollToColumn(this._column)},o.prototype.getTable=function(){return this._column.table},o.prototype.headerFilterFocus=function(){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterFocus(this._column)},o.prototype.reloadHeaderFilter=function(){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.reloadHeaderFilter(this._column)},o.prototype.getHeaderFilterValue=function(){if(this._column.table.modExists("filter",!0))return this._column.table.modules.filter.getHeaderFilterValue(this._column)},o.prototype.setHeaderFilterValue=function(e){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterValue(this._column,e)},o.prototype.move=function(e,t){var o=this._column.table.columnManager.findColumn(e);o?this._column.table.columnManager.moveColumn(this._column,o,t):console.warn("Move Error - No matching column found:",o)},o.prototype.getNextColumn=function(){var e=this._column.nextColumn();return!!e&&e.getComponent()},o.prototype.getPrevColumn=function(){var e=this._column.prevColumn();return!!e&&e.getComponent()},o.prototype.updateDefinition=function(e){return this._column.updateDefinition(e)},o.prototype.getWidth=function(){return this._column.getWidth()},o.prototype.setWidth=function(e){return!0===e?this._column.reinitializeWidth(!0):this._column.setWidth(e)},o.prototype.validate=function(){return this._column.validate()};var n=function e(t,o){var i=this;this.table=o.table,this.definition=t,this.parent=o,this.type="column",this.columns=[],this.cells=[],this.element=this.createElement(),this.contentElement=!1,this.titleElement=!1,this.groupElement=this.createGroupElement(),this.isGroup=!1,this.tooltip=!1,this.hozAlign="",this.vertAlign="",this.field="",this.fieldStructure="",this.getFieldValue="",this.setFieldValue="",this.titleFormatterRendered=!1,this.setField(this.definition.field),this.table.options.invalidOptionWarnings&&this.checkDefinition(),this.modules={},this.cellEvents={cellClick:!1,cellDblClick:!1,cellContext:!1,cellTap:!1,cellDblTap:!1,cellTapHold:!1,cellMouseEnter:!1,cellMouseLeave:!1,cellMouseOver:!1,cellMouseOut:!1,cellMouseMove:!1},this.width=null,this.widthStyled="",this.minWidth=null,this.minWidthStyled="",this.widthFixed=!1,this.visible=!0,this.component=null,this._mapDepricatedFunctionality(),t.columns?(this.isGroup=!0,t.columns.forEach(function(t,o){var n=new e(t,i);i.attachColumn(n)}),i.checkColumnVisibility()):o.registerColumnField(this),t.rowHandle&&!1!==this.table.options.movableRows&&this.table.modExists("moveRow")&&this.table.modules.moveRow.setHandle(!0),this._buildHeader(),this.bindModuleColumns()};n.prototype.createElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-col"),e.setAttribute("role","columnheader"),e.setAttribute("aria-sort","none"),e},n.prototype.createGroupElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-col-group-cols"),e},n.prototype.checkDefinition=function(){var e=this;Object.keys(this.definition).forEach(function(t){-1===e.defaultOptionList.indexOf(t)&&console.warn("Invalid column definition option in '"+(e.field||e.definition.title)+"' column:",t)})},n.prototype.setField=function(e){this.field=e,this.fieldStructure=e?this.table.options.nestedFieldSeparator?e.split(this.table.options.nestedFieldSeparator):[e]:[],this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData,this.setFieldValue=this.fieldStructure.length>1?this._setNestedData:this._setFlatData},n.prototype.registerColumnPosition=function(e){this.parent.registerColumnPosition(e)},n.prototype.registerColumnField=function(e){this.parent.registerColumnField(e)},n.prototype.reRegisterPosition=function(){this.isGroup?this.columns.forEach(function(e){e.reRegisterPosition()}):this.registerColumnPosition(this)},n.prototype._mapDepricatedFunctionality=function(){void 0!==this.definition.hideInHtml&&(this.definition.htmlOutput=!this.definition.hideInHtml,console.warn("hideInHtml column definition property is deprecated, you should now use htmlOutput")),void 0!==this.definition.align&&(this.definition.hozAlign=this.definition.align,console.warn("align column definition property is deprecated, you should now use hozAlign")),void 0!==this.definition.downloadTitle&&(this.definition.titleDownload=this.definition.downloadTitle,console.warn("downloadTitle definition property is deprecated, you should now use titleDownload"))},n.prototype.setTooltip=function(){var e=this,t=e.definition,o=t.headerTooltip||!1===t.tooltip?t.headerTooltip:e.table.options.tooltipsHeader;o?!0===o?t.field?e.table.modules.localize.bind("columns|"+t.field,function(o){e.element.setAttribute("title",o||t.title)}):e.element.setAttribute("title",t.title):("function"==typeof o&&!1===(o=o(e.getComponent()))&&(o=""),e.element.setAttribute("title",o)):e.element.setAttribute("title","")},n.prototype._buildHeader=function(){for(var e=this,t=e.definition;e.element.firstChild;)e.element.removeChild(e.element.firstChild);t.headerVertical&&(e.element.classList.add("tabulator-col-vertical"),"flip"===t.headerVertical&&e.element.classList.add("tabulator-col-vertical-flip")),e.contentElement=e._bindEvents(),e.contentElement=e._buildColumnHeaderContent(),e.element.appendChild(e.contentElement),e.isGroup?e._buildGroupHeader():e._buildColumnHeader(),e.setTooltip(),e.table.options.resizableColumns&&e.table.modExists("resizeColumns")&&e.table.modules.resizeColumns.initializeColumn("header",e,e.element),t.headerFilter&&e.table.modExists("filter")&&e.table.modExists("edit")&&(void 0!==t.headerFilterPlaceholder&&t.field&&e.table.modules.localize.setHeaderFilterColumnPlaceholder(t.field,t.headerFilterPlaceholder),e.table.modules.filter.initializeColumn(e)),e.table.modExists("frozenColumns")&&e.table.modules.frozenColumns.initializeColumn(e),e.table.options.movableColumns&&!e.isGroup&&e.table.modExists("moveColumn")&&e.table.modules.moveColumn.initializeColumn(e),(t.topCalc||t.bottomCalc)&&e.table.modExists("columnCalcs")&&e.table.modules.columnCalcs.initializeColumn(e),e.table.modExists("persistence")&&e.table.modules.persistence.config.columns&&e.table.modules.persistence.initializeColumn(e),e.element.addEventListener("mouseenter",function(t){e.setTooltip()})},n.prototype._bindEvents=function(){var e,t,o,i=this,n=i.definition;"function"==typeof n.headerClick&&i.element.addEventListener("click",function(e){n.headerClick(e,i.getComponent())}),"function"==typeof n.headerDblClick&&i.element.addEventListener("dblclick",function(e){n.headerDblClick(e,i.getComponent())}),"function"==typeof n.headerContext&&i.element.addEventListener("contextmenu",function(e){n.headerContext(e,i.getComponent())}),"function"==typeof n.headerTap&&(o=!1,i.element.addEventListener("touchstart",function(e){o=!0},{passive:!0}),i.element.addEventListener("touchend",function(e){o&&n.headerTap(e,i.getComponent()),o=!1})),"function"==typeof n.headerDblTap&&(e=null,i.element.addEventListener("touchend",function(t){e?(clearTimeout(e),e=null,n.headerDblTap(t,i.getComponent())):e=setTimeout(function(){clearTimeout(e),e=null},300)})),"function"==typeof n.headerTapHold&&(t=null,i.element.addEventListener("touchstart",function(e){clearTimeout(t),t=setTimeout(function(){clearTimeout(t),t=null,o=!1,n.headerTapHold(e,i.getComponent())},1e3)},{passive:!0}),i.element.addEventListener("touchend",function(e){clearTimeout(t),t=null})),"function"==typeof n.cellClick&&(i.cellEvents.cellClick=n.cellClick),"function"==typeof n.cellDblClick&&(i.cellEvents.cellDblClick=n.cellDblClick),"function"==typeof n.cellContext&&(i.cellEvents.cellContext=n.cellContext),"function"==typeof n.cellMouseEnter&&(i.cellEvents.cellMouseEnter=n.cellMouseEnter),"function"==typeof n.cellMouseLeave&&(i.cellEvents.cellMouseLeave=n.cellMouseLeave),"function"==typeof n.cellMouseOver&&(i.cellEvents.cellMouseOver=n.cellMouseOver),"function"==typeof n.cellMouseOut&&(i.cellEvents.cellMouseOut=n.cellMouseOut),"function"==typeof n.cellMouseMove&&(i.cellEvents.cellMouseMove=n.cellMouseMove),"function"==typeof n.cellTap&&(i.cellEvents.cellTap=n.cellTap),"function"==typeof n.cellDblTap&&(i.cellEvents.cellDblTap=n.cellDblTap),"function"==typeof n.cellTapHold&&(i.cellEvents.cellTapHold=n.cellTapHold),"function"==typeof n.cellEdited&&(i.cellEvents.cellEdited=n.cellEdited),"function"==typeof n.cellEditing&&(i.cellEvents.cellEditing=n.cellEditing),"function"==typeof n.cellEditCancelled&&(i.cellEvents.cellEditCancelled=n.cellEditCancelled)},n.prototype._buildColumnHeader=function(){var e=this,t=e.definition,o=e.table;if(o.modExists("sort")&&o.modules.sort.initializeColumn(e,e.contentElement),(t.headerContextMenu||t.headerMenu)&&o.modExists("menu")&&o.modules.menu.initializeColumnHeader(e),o.modExists("format")&&o.modules.format.initializeColumn(e),void 0!==t.editor&&o.modExists("edit")&&o.modules.edit.initializeColumn(e),void 0!==t.validator&&o.modExists("validate")&&o.modules.validate.initializeColumn(e),o.modExists("mutator")&&o.modules.mutator.initializeColumn(e),o.modExists("accessor")&&o.modules.accessor.initializeColumn(e),_typeof(o.options.responsiveLayout)&&o.modExists("responsiveLayout")&&o.modules.responsiveLayout.initializeColumn(e),void 0!==t.visible&&(t.visible?e.show(!0):e.hide(!0)),t.cssClass){t.cssClass.split(" ").forEach(function(t){e.element.classList.add(t)})}t.field&&this.element.setAttribute("tabulator-field",t.field),e.setMinWidth(void 0===t.minWidth?e.table.options.columnMinWidth:parseInt(t.minWidth)),e.reinitializeWidth(),e.tooltip=e.definition.tooltip||!1===e.definition.tooltip?e.definition.tooltip:e.table.options.tooltips,e.hozAlign=void 0===e.definition.hozAlign?e.table.options.cellHozAlign:e.definition.hozAlign,e.vertAlign=void 0===e.definition.vertAlign?e.table.options.cellVertAlign:e.definition.vertAlign},n.prototype._buildColumnHeaderContent=function(){var e=(this.definition,this.table,document.createElement("div"));return e.classList.add("tabulator-col-content"),this.titleElement=this._buildColumnHeaderTitle(),e.appendChild(this.titleElement),e},n.prototype._buildColumnHeaderTitle=function(){var e=this,t=e.definition,o=e.table,i=document.createElement("div");if(i.classList.add("tabulator-col-title"),t.editableTitle){var n=document.createElement("input");n.classList.add("tabulator-title-editor"),n.addEventListener("click",function(e){e.stopPropagation(),n.focus()}),n.addEventListener("change",function(){t.title=n.value,o.options.columnTitleChanged.call(e.table,e.getComponent())}),i.appendChild(n),t.field?o.modules.localize.bind("columns|"+t.field,function(e){n.value=e||t.title||" "}):n.value=t.title||" "}else t.field?o.modules.localize.bind("columns|"+t.field,function(o){e._formatColumnHeaderTitle(i,o||t.title||" ")}):e._formatColumnHeaderTitle(i,t.title||" ");return i},n.prototype._formatColumnHeaderTitle=function(e,t){var o,i,n,s,r,a=this;if(this.definition.titleFormatter&&this.table.modExists("format"))switch(o=this.table.modules.format.getFormatter(this.definition.titleFormatter),r=function(e){a.titleFormatterRendered=e},s={getValue:function(){return t},getElement:function(){return e}},n=this.definition.titleFormatterParams||{},n="function"==typeof n?n():n,i=o.call(this.table.modules.format,s,n,r),void 0===i?"undefined":_typeof(i)){case"object":i instanceof Node?e.appendChild(i):(e.innerHTML="",console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",i));break;case"undefined":case"null":e.innerHTML="";break;default:e.innerHTML=i}else e.innerHTML=t},n.prototype._buildGroupHeader=function(){var e=this;if(this.element.classList.add("tabulator-col-group"),this.element.setAttribute("role","columngroup"),this.element.setAttribute("aria-title",this.definition.title),this.definition.cssClass){this.definition.cssClass.split(" ").forEach(function(t){e.element.classList.add(t)})}(this.definition.headerContextMenu||this.definition.headerMenu)&&this.table.modExists("menu")&&this.table.modules.menu.initializeColumnHeader(this),this.element.appendChild(this.groupElement)},n.prototype._getFlatData=function(e){return e[this.field]},n.prototype._getNestedData=function(e){for(var t,o=e,i=this.fieldStructure,n=i.length,s=0;s-1&&this._nextVisibleColumn(e+1)},n.prototype._nextVisibleColumn=function(e){var t=this.table.columnManager.getColumnByIndex(e);return!t||t.visible?t:this._nextVisibleColumn(e+1)},n.prototype.prevColumn=function(){var e=this.table.columnManager.findColumnIndex(this);return e>-1&&this._prevVisibleColumn(e-1)},n.prototype._prevVisibleColumn=function(e){var t=this.table.columnManager.getColumnByIndex(e);return!t||t.visible?t:this._prevVisibleColumn(e-1)},n.prototype.reinitializeWidth=function(e){this.widthFixed=!1, +void 0===this.definition.width||e||this.setWidth(this.definition.width),this.table.modExists("filter")&&this.table.modules.filter.hideHeaderFilterElements(),this.fitToData(),this.table.modExists("filter")&&this.table.modules.filter.showHeaderFilterElements()},n.prototype.fitToData=function(){var e=this;this.widthFixed||(this.element.style.width="",e.cells.forEach(function(e){e.clearWidth()}));var t=this.element.offsetWidth;e.width&&this.widthFixed||(e.cells.forEach(function(e){var o=e.getWidth();o>t&&(t=o)}),t&&e.setWidthActual(t+1))},n.prototype.updateDefinition=function(e){var t=this;return new Promise(function(o,i){var n;t.isGroup?(console.warn("Column Update Error - The updateDefintion function is only available on columns, not column groups"),i("Column Update Error - The updateDefintion function is only available on columns, not column groups")):(n=Object.assign({},t.getDefinition()),n=Object.assign(n,e),t.table.columnManager.addColumn(n,!1,t).then(function(e){n.field==t.field&&(t.field=!1),t.delete().then(function(){o(e.getComponent())}).catch(function(e){i(e)})}).catch(function(e){i(e)}))})},n.prototype.deleteCell=function(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)},n.prototype.defaultOptionList=["title","field","columns","visible","align","hozAlign","vertAlign","width","minWidth","widthGrow","widthShrink","resizable","frozen","responsive","tooltip","cssClass","rowHandle","hideInHtml","print","htmlOutput","sorter","sorterParams","formatter","formatterParams","variableHeight","editable","editor","editorParams","validator","mutator","mutatorParams","mutatorData","mutatorDataParams","mutatorEdit","mutatorEditParams","mutatorClipboard","mutatorClipboardParams","accessor","accessorParams","accessorData","accessorDataParams","accessorDownload","accessorDownloadParams","accessorClipboard","accessorClipboardParams","accessorPrint","accessorPrintParams","accessorHtmlOutput","accessorHtmlOutputParams","clipboard","download","downloadTitle","topCalc","topCalcParams","topCalcFormatter","topCalcFormatterParams","bottomCalc","bottomCalcParams","bottomCalcFormatter","bottomCalcFormatterParams","cellClick","cellDblClick","cellContext","cellTap","cellDblTap","cellTapHold","cellMouseEnter","cellMouseLeave","cellMouseOver","cellMouseOut","cellMouseMove","cellEditing","cellEdited","cellEditCancelled","headerSort","headerSortStartingDir","headerSortTristate","headerClick","headerDblClick","headerContext","headerTap","headerDblTap","headerTapHold","headerTooltip","headerVertical","editableTitle","titleFormatter","titleFormatterParams","headerFilter","headerFilterPlaceholder","headerFilterParams","headerFilterEmptyCheck","headerFilterFunc","headerFilterFuncParams","headerFilterLiveFilter","print","headerContextMenu","headerMenu","contextMenu","formatterPrint","formatterPrintParams","formatterClipboard","formatterClipboardParams","formatterHtmlOutput","formatterHtmlOutputParams","titlePrint","titleClipboard","titleHtmlOutput","titleDownload"],n.prototype.getComponent=function(){return this.component||(this.component=new o(this)),this.component};var s=function(e){this.table=e,this.element=this.createHolderElement(),this.tableElement=this.createTableElement(),this.heightFixer=this.createTableElement(),this.columnManager=null,this.height=0,this.firstRender=!1,this.renderMode="virtual",this.fixedHeight=!1,this.rows=[],this.activeRows=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.scrollTop=0,this.scrollLeft=0,this.vDomRowHeight=20,this.vDomTop=0,this.vDomBottom=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomMaxRenderChain=90,this.vDomWindowBuffer=0,this.vDomWindowMinTotalRows=20,this.vDomWindowMinMarginRows=5,this.vDomTopNewRows=[],this.vDomBottomNewRows=[],this.rowNumColumn=!1,this.redrawBlock=!1,this.redrawBlockRestoreConfig=!1,this.redrawBlockRederInPosition=!1};s.prototype.createHolderElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-tableHolder"),e.setAttribute("tabindex",0),e},s.prototype.createTableElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-table"),e},s.prototype.getElement=function(){return this.element},s.prototype.getTableElement=function(){return this.tableElement},s.prototype.getRowPosition=function(e,t){return t?this.activeRows.indexOf(e):this.rows.indexOf(e)},s.prototype.setColumnManager=function(e){this.columnManager=e},s.prototype.initialize=function(){var e=this;e.setRenderMode(),e.element.appendChild(e.tableElement),e.firstRender=!0,e.element.addEventListener("scroll",function(){var t=e.element.scrollLeft;e.scrollLeft!=t&&(e.columnManager.scrollHorizontal(t),e.table.options.groupBy&&e.table.modules.groupRows.scrollHeaders(t),e.table.modExists("columnCalcs")&&e.table.modules.columnCalcs.scrollHorizontal(t),e.table.options.scrollHorizontal(t)),e.scrollLeft=t}),"virtual"===this.renderMode&&e.element.addEventListener("scroll",function(){var t=e.element.scrollTop,o=e.scrollTop>t;e.scrollTop!=t?(e.scrollTop=t,e.scrollVertical(o),"scroll"==e.table.options.ajaxProgressiveLoad&&e.table.modules.ajax.nextPage(e.element.scrollHeight-e.element.clientHeight-t),e.table.options.scrollVertical(t)):e.scrollTop=t})},s.prototype.findRow=function(e){var t=this;if("object"!=(void 0===e?"undefined":_typeof(e))){if(void 0===e||null===e)return!1;return t.rows.find(function(o){return o.data[t.table.options.index]==e})||!1}if(e instanceof a)return e;if(e instanceof r)return e._getSelf()||!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement){return t.rows.find(function(t){return t.element===e})||!1}return!1},s.prototype.getRowFromDataObject=function(e){return this.rows.find(function(t){return t.data===e})||!1},s.prototype.getRowFromPosition=function(e,t){return t?this.activeRows[e]:this.rows[e]},s.prototype.scrollToRow=function(e,t,o){var i,n=this,s=this.getDisplayRows().indexOf(e),r=e.getElement(),a=0;return new Promise(function(e,l){if(s>-1){if(void 0===t&&(t=n.table.options.scrollToRowPosition),void 0===o&&(o=n.table.options.scrollToRowIfVisible),"nearest"===t)switch(n.renderMode){case"classic":i=d.prototype.helpers.elOffset(r).top,t=Math.abs(n.element.scrollTop-i)>Math.abs(n.element.scrollTop+n.element.clientHeight-i)?"bottom":"top";break;case"virtual":t=Math.abs(n.vDomTop-s)>Math.abs(n.vDomBottom-s)?"bottom":"top"}if(!o&&d.prototype.helpers.elVisible(r)&&(a=d.prototype.helpers.elOffset(r).top-d.prototype.helpers.elOffset(n.element).top)>0&&a-1&&this.activeRows.splice(i,1),o>-1&&this.rows.splice(o,1),this.setActiveRows(this.activeRows),this.displayRowIterator(function(t){var o=t.indexOf(e);o>-1&&t.splice(o,1)}),t||this.reRenderInPosition(),this.regenerateRowNumbers(),this.table.options.rowDeleted.call(this.table,e.getComponent()),this.table.options.dataEdited.call(this.table,this.getData()),this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.groupRows.updateGroupRows(!0):this.table.options.pagination&&this.table.modExists("page")?this.refreshActiveData(!1,!1,!0):this.table.options.pagination&&this.table.modExists("page")&&this.refreshActiveData("page")},s.prototype.addRow=function(e,t,o,i){var n=this.addRowActual(e,t,o,i);return this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowAdd",n,{data:e,pos:t,index:o}),n},s.prototype.addRows=function(e,t,o){var i=this,n=this,s=0,r=[];return new Promise(function(a,l){t=i.findAddRowPos(t),Array.isArray(e)||(e=[e]),s=e.length-1,(void 0===o&&t||void 0!==o&&!t)&&e.reverse(),e.forEach(function(e,i){var s=n.addRow(e,t,o,!0);r.push(s)}),i.table.options.groupBy&&i.table.modExists("groupRows")?i.table.modules.groupRows.updateGroupRows(!0):i.table.options.pagination&&i.table.modExists("page")?i.refreshActiveData(!1,!1,!0):i.reRenderInPosition(),i.table.modExists("columnCalcs")&&i.table.modules.columnCalcs.recalc(i.table.rowManager.activeRows),i.regenerateRowNumbers(),a(r)})},s.prototype.findAddRowPos=function(e){return void 0===e&&(e=this.table.options.addRowPos),"pos"===e&&(e=!0),"bottom"===e&&(e=!1),e},s.prototype.addRowActual=function(e,t,o,i){var n,s,r=e instanceof a?e:new a(e||{},this),l=this.findAddRowPos(t),c=-1;if(!o&&this.table.options.pagination&&"page"==this.table.options.paginationAddRow&&(s=this.getDisplayRows(),l?s.length?o=s[0]:this.activeRows.length&&(o=this.activeRows[this.activeRows.length-1],l=!1):s.length&&(o=s[s.length-1],l=!(s.length1&&(!o||o&&-1==u.indexOf(o)?l?u[0]!==r&&(o=u[0],this._moveRowInArray(r.getGroup().rows,r,o,!l)):u[u.length-1]!==r&&(o=u[u.length-1],this._moveRowInArray(r.getGroup().rows,r,o,!l)):this._moveRowInArray(r.getGroup().rows,r,o,!l))}return o&&(c=this.rows.indexOf(o)),o&&c>-1?(n=this.activeRows.indexOf(o),this.displayRowIterator(function(e){var t=e.indexOf(o);t>-1&&e.splice(l?t:t+1,0,r)}),n>-1&&this.activeRows.splice(l?n:n+1,0,r),this.rows.splice(l?c:c+1,0,r)):l?(this.displayRowIterator(function(e){e.unshift(r)}),this.activeRows.unshift(r),this.rows.unshift(r)):(this.displayRowIterator(function(e){e.push(r)}),this.activeRows.push(r),this.rows.push(r)),this.setActiveRows(this.activeRows),this.table.options.rowAdded.call(this.table,r.getComponent()),this.table.options.dataEdited.call(this.table,this.getData()),i||this.reRenderInPosition(),r},s.prototype.moveRow=function(e,t,o){this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowMove",e,{posFrom:this.getRowPosition(e),posTo:this.getRowPosition(t),to:t,after:o}),this.moveRowActual(e,t,o),this.regenerateRowNumbers(),this.table.options.rowMoved.call(this.table,e.getComponent())},s.prototype.moveRowActual=function(e,t,o){var i=this;if(this._moveRowInArray(this.rows,e,t,o),this._moveRowInArray(this.activeRows,e,t,o),this.displayRowIterator(function(n){i._moveRowInArray(n,e,t,o)}),this.table.options.groupBy&&this.table.modExists("groupRows")){!o&&t instanceof S&&(t=this.table.rowManager.prevDisplayRow(e)||t);var n=t.getGroup(),s=e.getGroup();n===s?this._moveRowInArray(n.rows,e,t,o):(s&&s.removeRow(e),n.insertRow(e,t,o))}},s.prototype._moveRowInArray=function(e,t,o,i){var n,s,r,a;if(t!==o&&(n=e.indexOf(t),n>-1&&(e.splice(n,1),s=e.indexOf(o),s>-1?i?e.splice(s+1,0,t):e.splice(s,0,t):e.splice(n,0,t)),e===this.getDisplayRows())){r=nn?s:n+1;for(var l=r;l<=a;l++)e[l]&&this.styleRow(e[l],l)}},s.prototype.clearData=function(){this.setData([])},s.prototype.getRowIndex=function(e){return this.findRowIndex(e,this.rows)},s.prototype.getDisplayRowIndex=function(e){var t=this.getDisplayRows().indexOf(e);return t>-1&&t},s.prototype.nextDisplayRow=function(e,t){var o=this.getDisplayRowIndex(e),i=!1;return!1!==o&&o-1)&&o},s.prototype.getData=function(e,t){var o=[];return this.getRows(e).forEach(function(e){"row"==e.type&&o.push(e.getData(t||"data"))}),o},s.prototype.getComponents=function(e){var t=[];return this.getRows(e).forEach(function(e){t.push(e.getComponent())}),t},s.prototype.getDataCount=function(e){return this.getRows(e).length},s.prototype._genRemoteRequest=function(){var e=this,t=this.table,o=t.options,i={};if(t.modExists("page")){if(o.ajaxSorting){var n=this.table.modules.sort.getSort();n.forEach(function(e){delete e.column}),i[this.table.modules.page.paginationDataSentNames.sorters]=n}if(o.ajaxFiltering){var s=this.table.modules.filter.getFilters(!0,!0);i[this.table.modules.page.paginationDataSentNames.filters]=s}this.table.modules.ajax.setParams(i,!0)}t.modules.ajax.sendRequest().then(function(t){e._setDataActual(t,!0)}).catch(function(e){})},s.prototype.filterRefresh=function(){var e=this.table,t=e.options,o=this.scrollLeft;t.ajaxFiltering?"remote"==t.pagination&&e.modExists("page")?(e.modules.page.reset(!0),e.modules.page.setPage(1).then(function(){}).catch(function(){})):t.ajaxProgressiveLoad?e.modules.ajax.loadData().then(function(){}).catch(function(){}):this._genRemoteRequest():this.refreshActiveData("filter"),this.scrollHorizontal(o)},s.prototype.sorterRefresh=function(e){var t=this.table,o=this.table.options,i=this.scrollLeft;o.ajaxSorting?("remote"==o.pagination||o.progressiveLoad)&&t.modExists("page")?(t.modules.page.reset(!0),t.modules.page.setPage(1).then(function(){}).catch(function(){})):o.ajaxProgressiveLoad?t.modules.ajax.loadData().then(function(){}).catch(function(){}):this._genRemoteRequest():this.refreshActiveData(e?"filter":"sort"),this.scrollHorizontal(i)},s.prototype.scrollHorizontal=function(e){this.scrollLeft=e,this.element.scrollLeft=e,this.table.options.groupBy&&this.table.modules.groupRows.scrollHeaders(e),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.scrollHorizontal(e)},s.prototype.refreshActiveData=function(e,t,o){var i,n=this,s=this.table,r=["all","filter","sort","display","freeze","group","tree","page"];if(this.redrawBlock)return void((!this.redrawBlockRestoreConfig||r.indexOf(e)=0))break;s=a}else if(t-r[a].getElement().offsetTop>=0)n=a;else{if(i=!0,!(o-r[a].getElement().offsetTop>=0))break;s=a}}else n=this.vDomTop,s=this.vDomBottom;return r.slice(n,s+1)},s.prototype.displayRowIterator=function(e){this.displayRows.forEach(e),this.displayRowsCount=this.displayRows[this.displayRows.length-1].length},s.prototype.getRows=function(e){var t;switch(e){case"active":t=this.activeRows;break;case"display":t=this.table.rowManager.getDisplayRows();break;case"visible":t=this.getVisibleRows(!0);break;default:t=this.rows}return t},s.prototype.reRenderInPosition=function(e){if("virtual"==this.getRenderMode())if(this.redrawBlock)e?e():this.redrawBlockRederInPosition=!0;else{for(var t=this.element.scrollTop,o=!1,i=!1,n=this.scrollLeft,s=this.getDisplayRows(),r=this.vDomTop;r<=this.vDomBottom;r++)if(s[r]){var a=t-s[r].getElement().offsetTop;if(!(!1===i||Math.abs(a)this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*g),"group"!==f.type&&(u=!1),i.vDomBottom++,c++}e?(i.vDomTopPad=t?i.vDomRowHeight*this.vDomTop+o:i.scrollTop-l,i.vDomBottomPad=i.vDomBottom==i.displayRowsCount-1?0:Math.max(i.vDomScrollHeight-i.vDomTopPad-a-l,0)):(this.vDomTopPad=0,i.vDomRowHeight=Math.floor((a+l)/c),i.vDomBottomPad=i.vDomRowHeight*(i.displayRowsCount-i.vDomBottom-1),i.vDomScrollHeight=l+a+i.vDomBottomPad-i.height),n.style.paddingTop=i.vDomTopPad+"px",n.style.paddingBottom=i.vDomBottomPad+"px",t&&(this.scrollTop=i.vDomTopPad+l+o-(this.element.scrollWidth>this.element.clientWidth?this.element.offsetHeight-this.element.clientHeight:0)),this.scrollTop=Math.min(this.scrollTop,this.element.scrollHeight-this.height),this.element.scrollWidth>this.element.offsetWidth&&t&&(this.scrollTop+=this.element.offsetHeight-this.element.clientHeight),this.vDomScrollPosTop=this.scrollTop,this.vDomScrollPosBottom=this.scrollTop,s.scrollTop=this.scrollTop,n.style.minWidth=u?i.table.columnManager.getWidth()+"px":"",i.table.options.groupBy&&"fitDataFill"!=i.table.modules.layout.getMode()&&i.displayRowsCount==i.table.modules.groupRows.countGroups()&&(i.tableElement.style.minWidth=i.table.columnManager.getWidth())}else this.renderEmptyScroll();this.fixedHeight||this.adjustTableSize()},s.prototype.scrollVertical=function(e){var t=this.scrollTop-this.vDomScrollPosTop,o=this.scrollTop-this.vDomScrollPosBottom,i=2*this.vDomWindowBuffer;if(-t>i||o>i){var n=this.scrollLeft;this._virtualRenderFill(Math.floor(this.element.scrollTop/this.element.scrollHeight*this.displayRowsCount)),this.scrollHorizontal(n)}else e?(t<0&&this._addTopRow(-t),o<0&&(this.vDomScrollHeight-this.scrollTop>this.vDomWindowBuffer?this._removeBottomRow(-o):this.vDomScrollPosBottom=this.scrollTop)):(t>=0&&(this.scrollTop>this.vDomWindowBuffer?this._removeTopRow(t):this.vDomScrollPosTop=this.scrollTop),o>=0&&this._addBottomRow(o))},s.prototype._addTopRow=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=this.tableElement,i=this.getDisplayRows();if(this.vDomTop){var n=this.vDomTop-1,s=i[n],r=s.getHeight()||this.vDomRowHeight;e>=r&&(this.styleRow(s,n),o.insertBefore(s.getElement(),o.firstChild),s.initialized&&s.heightInitialized||(this.vDomTopNewRows.push(s),s.heightInitialized||s.clearCellHeight()),s.initialize(),this.vDomTopPad-=r,this.vDomTopPad<0&&(this.vDomTopPad=n*this.vDomRowHeight),n||(this.vDomTopPad=0),o.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop-=r,this.vDomTop--),e=-(this.scrollTop-this.vDomScrollPosTop),s.getHeight()>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*s.getHeight()),t=(i[this.vDomTop-1].getHeight()||this.vDomRowHeight)?this._addTopRow(e,t+1):this._quickNormalizeRowHeight(this.vDomTopNewRows)}},s.prototype._removeTopRow=function(e){var t=this.tableElement,o=this.getDisplayRows()[this.vDomTop],i=o.getHeight()||this.vDomRowHeight;if(e>=i){var n=o.getElement();n.parentNode.removeChild(n),this.vDomTopPad+=i,t.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop+=this.vDomTop?i:i+this.vDomWindowBuffer,this.vDomTop++,e=this.scrollTop-this.vDomScrollPosTop,this._removeTopRow(e)}},s.prototype._addBottomRow=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=this.tableElement,i=this.getDisplayRows();if(this.vDomBottom=r&&(this.styleRow(s,n),o.appendChild(s.getElement()),s.initialized&&s.heightInitialized||(this.vDomBottomNewRows.push(s),s.heightInitialized||s.clearCellHeight()),s.initialize(),this.vDomBottomPad-=r,(this.vDomBottomPad<0||n==this.displayRowsCount-1)&&(this.vDomBottomPad=0),o.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom+=r,this.vDomBottom++),e=this.scrollTop-this.vDomScrollPosBottom,s.getHeight()>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*s.getHeight()),t=(i[this.vDomBottom+1].getHeight()||this.vDomRowHeight)?this._addBottomRow(e,t+1):this._quickNormalizeRowHeight(this.vDomBottomNewRows)}},s.prototype._removeBottomRow=function(e){var t=this.tableElement,o=this.getDisplayRows()[this.vDomBottom],i=o.getHeight()||this.vDomRowHeight;if(e>=i){var n=o.getElement();n.parentNode&&n.parentNode.removeChild(n),this.vDomBottomPad+=i,this.vDomBottomPad<0&&(this.vDomBottomPad=0),t.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom-=i,this.vDomBottom--,e=-(this.scrollTop-this.vDomScrollPosBottom),this._removeBottomRow(e)}},s.prototype._quickNormalizeRowHeight=function(e){e.forEach(function(e){e.calcHeight()}),e.forEach(function(e){e.setCellHeight()}),e.length=0},s.prototype.normalizeHeight=function(){this.activeRows.forEach(function(e){e.normalizeHeight()})},s.prototype.adjustTableSize=function(){var e,t=this.element.clientHeight;if("virtual"===this.renderMode){var o=this.columnManager.getElement().offsetHeight+(this.table.footerManager&&!this.table.footerManager.external?this.table.footerManager.getElement().offsetHeight:0);this.fixedHeight?(this.element.style.minHeight="calc(100% - "+o+"px)",this.element.style.height="calc(100% - "+o+"px)",this.element.style.maxHeight="calc(100% - "+o+"px)"):(this.element.style.height="",this.element.style.height=this.table.element.clientHeight-o+"px",this.element.scrollTop=this.scrollTop),this.height=this.element.clientHeight,this.vDomWindowBuffer=this.table.options.virtualDomBuffer||this.height,this.fixedHeight||t==this.element.clientHeight||((e=this.table.modExists("resizeTable"))&&!this.table.modules.resizeTable.autoResize||!e)&&this.redraw()}},s.prototype.reinitialize=function(){this.rows.forEach(function(e){e.reinitialize()})},s.prototype.blockRedraw=function(){this.redrawBlock=!0,this.redrawBlockRestoreConfig=!1},s.prototype.restoreRedraw=function(){this.redrawBlock=!1,this.redrawBlockRestoreConfig?(this.refreshActiveData(this.redrawBlockRestoreConfig.stage,this.redrawBlockRestoreConfig.skipStage,this.redrawBlockRestoreConfig.renderInPosition),this.redrawBlockRestoreConfig=!1):this.redrawBlockRederInPosition&&this.reRenderInPosition(),this.redrawBlockRederInPosition=!1},s.prototype.redraw=function(e){var t=this.scrollLeft;this.adjustTableSize(),this.table.tableWidth=this.table.element.clientWidth,e?this.renderTable():("classic"==this.renderMode?this.table.options.groupBy?this.refreshActiveData("group",!1,!1):this._simpleRender():(this.reRenderInPosition(),this.scrollHorizontal(t)),this.displayRowsCount||this.table.options.placeholder&&this.getElement().appendChild(this.table.options.placeholder))},s.prototype.resetScroll=function(){if(this.element.scrollLeft=0,this.element.scrollTop=0,"ie"===this.table.browser){var e=document.createEvent("Event");e.initEvent("scroll",!1,!0),this.element.dispatchEvent(e)}else this.element.dispatchEvent(new Event("scroll"))};var r=function(e){this._row=e};r.prototype.getData=function(e){return this._row.getData(e)},r.prototype.getElement=function(){return this._row.getElement()},r.prototype.getCells=function(){var e=[];return this._row.getCells().forEach(function(t){e.push(t.getComponent())}),e},r.prototype.getCell=function(e){var t=this._row.getCell(e);return!!t&&t.getComponent()},r.prototype.getIndex=function(){return this._row.getData("data")[this._row.table.options.index]},r.prototype.getPosition=function(e){return this._row.table.rowManager.getRowPosition(this._row,e)},r.prototype.delete=function(){return this._row.delete()},r.prototype.scrollTo=function(){return this._row.table.rowManager.scrollToRow(this._row)},r.prototype.pageTo=function(){if(this._row.table.modExists("page",!0))return this._row.table.modules.page.setPageToRow(this._row)},r.prototype.move=function(e,t){this._row.moveToRow(e,t)},r.prototype.update=function(e){return this._row.updateData(e)}, +r.prototype.normalizeHeight=function(){this._row.normalizeHeight(!0)},r.prototype.select=function(){this._row.table.modules.selectRow.selectRows(this._row)},r.prototype.deselect=function(){this._row.table.modules.selectRow.deselectRows(this._row)},r.prototype.toggleSelect=function(){this._row.table.modules.selectRow.toggleRow(this._row)},r.prototype.isSelected=function(){return this._row.table.modules.selectRow.isRowSelected(this._row)},r.prototype._getSelf=function(){return this._row},r.prototype.validate=function(){return this._row.validate()},r.prototype.freeze=function(){this._row.table.modExists("frozenRows",!0)&&this._row.table.modules.frozenRows.freezeRow(this._row)},r.prototype.unfreeze=function(){this._row.table.modExists("frozenRows",!0)&&this._row.table.modules.frozenRows.unfreezeRow(this._row)},r.prototype.isFrozen=function(){if(this._row.table.modExists("frozenRows",!0)){return this._row.table.modules.frozenRows.rows.indexOf(this._row)>-1}return!1},r.prototype.treeCollapse=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.collapseRow(this._row)},r.prototype.treeExpand=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.expandRow(this._row)},r.prototype.treeToggle=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.toggleRow(this._row)},r.prototype.getTreeParent=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeParent(this._row)},r.prototype.getTreeChildren=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeChildren(this._row)},r.prototype.addTreeChild=function(e,t,o){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.addTreeChildRow(this._row,e,t,o)},r.prototype.reformat=function(){return this._row.reinitialize()},r.prototype.getGroup=function(){return this._row.getGroup().getComponent()},r.prototype.getTable=function(){return this._row.table},r.prototype.getNextRow=function(){var e=this._row.nextRow();return e?e.getComponent():e},r.prototype.getPrevRow=function(){var e=this._row.prevRow();return e?e.getComponent():e};var a=function(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"row";this.table=t.table,this.parent=t,this.data={},this.type=o,this.element=this.createElement(),this.modules={},this.cells=[],this.height=0,this.heightStyled="",this.manualHeight=!1,this.outerHeight=0,this.initialized=!1,this.heightInitialized=!1,this.component=null,this.setData(e),this.generateElement()};a.prototype.createElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-row"),e.setAttribute("role","row"),e},a.prototype.getElement=function(){return this.element},a.prototype.detachElement=function(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)},a.prototype.generateElement=function(){var e,t,o,i=this;!1!==i.table.options.selectable&&i.table.modExists("selectRow")&&i.table.modules.selectRow.initializeRow(this),!1!==i.table.options.movableRows&&i.table.modExists("moveRow")&&i.table.modules.moveRow.initializeRow(this),!1!==i.table.options.dataTree&&i.table.modExists("dataTree")&&i.table.modules.dataTree.initializeRow(this),"collapse"===i.table.options.responsiveLayout&&i.table.modExists("responsiveLayout")&&i.table.modules.responsiveLayout.initializeRow(this),i.table.options.rowContextMenu&&this.table.modExists("menu")&&i.table.modules.menu.initializeRow(this),i.table.options.rowClick&&i.element.addEventListener("click",function(e){i.table.options.rowClick(e,i.getComponent())}),i.table.options.rowDblClick&&i.element.addEventListener("dblclick",function(e){i.table.options.rowDblClick(e,i.getComponent())}),i.table.options.rowContext&&i.element.addEventListener("contextmenu",function(e){i.table.options.rowContext(e,i.getComponent())}),i.table.options.rowMouseEnter&&i.element.addEventListener("mouseenter",function(e){i.table.options.rowMouseEnter(e,i.getComponent())}),i.table.options.rowMouseLeave&&i.element.addEventListener("mouseleave",function(e){i.table.options.rowMouseLeave(e,i.getComponent())}),i.table.options.rowMouseOver&&i.element.addEventListener("mouseover",function(e){i.table.options.rowMouseOver(e,i.getComponent())}),i.table.options.rowMouseOut&&i.element.addEventListener("mouseout",function(e){i.table.options.rowMouseOut(e,i.getComponent())}),i.table.options.rowMouseMove&&i.element.addEventListener("mousemove",function(e){i.table.options.rowMouseMove(e,i.getComponent())}),i.table.options.rowTap&&(o=!1,i.element.addEventListener("touchstart",function(e){o=!0},{passive:!0}),i.element.addEventListener("touchend",function(e){o&&i.table.options.rowTap(e,i.getComponent()),o=!1})),i.table.options.rowDblTap&&(e=null,i.element.addEventListener("touchend",function(t){e?(clearTimeout(e),e=null,i.table.options.rowDblTap(t,i.getComponent())):e=setTimeout(function(){clearTimeout(e),e=null},300)})),i.table.options.rowTapHold&&(t=null,i.element.addEventListener("touchstart",function(e){clearTimeout(t),t=setTimeout(function(){clearTimeout(t),t=null,o=!1,i.table.options.rowTapHold(e,i.getComponent())},1e3)},{passive:!0}),i.element.addEventListener("touchend",function(e){clearTimeout(t),t=null}))},a.prototype.generateCells=function(){this.cells=this.table.columnManager.generateCells(this)},a.prototype.initialize=function(e){var t=this;if(!t.initialized||e){for(t.deleteCells();t.element.firstChild;)t.element.removeChild(t.element.firstChild);this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layoutRow(this),this.generateCells(),t.cells.forEach(function(e){t.element.appendChild(e.getElement()),e.cellRendered()}),e&&t.normalizeHeight(),t.table.options.dataTree&&t.table.modExists("dataTree")&&t.table.modules.dataTree.layoutRow(this),"collapse"===t.table.options.responsiveLayout&&t.table.modExists("responsiveLayout")&&t.table.modules.responsiveLayout.layoutRow(this),t.table.options.rowFormatter&&t.table.options.rowFormatter(t.getComponent()),t.table.options.resizableRows&&t.table.modExists("resizeRows")&&t.table.modules.resizeRows.initializeRow(t),t.initialized=!0}},a.prototype.reinitializeHeight=function(){this.heightInitialized=!1,null!==this.element.offsetParent&&this.normalizeHeight(!0)},a.prototype.reinitialize=function(){this.initialized=!1,this.heightInitialized=!1,this.manualHeight||(this.height=0,this.heightStyled=""),null!==this.element.offsetParent&&this.initialize(!0)},a.prototype.calcHeight=function(e){var t=0,o=this.table.options.resizableRows?this.element.clientHeight:0;this.cells.forEach(function(e){var o=e.getHeight();o>t&&(t=o)}),this.height=e?Math.max(t,o):this.manualHeight?this.height:Math.max(t,o),this.heightStyled=this.height?this.height+"px":"",this.outerHeight=this.element.offsetHeight},a.prototype.setCellHeight=function(){this.cells.forEach(function(e){e.setHeight()}),this.heightInitialized=!0},a.prototype.clearCellHeight=function(){this.cells.forEach(function(e){e.clearHeight()})},a.prototype.normalizeHeight=function(e){e&&this.clearCellHeight(),this.calcHeight(e),this.setCellHeight()},a.prototype.setHeight=function(e,t){(this.height!=e||t)&&(this.manualHeight=!0,this.height=e,this.heightStyled=e?e+"px":"",this.setCellHeight(),this.outerHeight=this.element.offsetHeight)},a.prototype.getHeight=function(){return this.outerHeight},a.prototype.getWidth=function(){return this.element.offsetWidth},a.prototype.deleteCell=function(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)},a.prototype.setData=function(e){this.table.modExists("mutator")&&(e=this.table.modules.mutator.transformRow(e,"data")),this.data=e,this.table.options.reactiveData&&this.table.modExists("reactiveData",!0)&&this.table.modules.reactiveData.watchRow(this)},a.prototype.updateData=function(e){var t,o=this,i=d.prototype.helpers.elVisible(this.element),n={};return new Promise(function(s,r){"string"==typeof e&&(e=JSON.parse(e)),o.table.options.reactiveData&&o.table.modExists("reactiveData",!0)&&o.table.modules.reactiveData.block(),o.table.modExists("mutator")?(n=Object.assign(n,o.data),n=Object.assign(n,e),t=o.table.modules.mutator.transformRow(n,"data",e)):t=e;for(var a in t)o.data[a]=t[a];o.table.options.reactiveData&&o.table.modExists("reactiveData",!0)&&o.table.modules.reactiveData.unblock();for(var a in e){o.table.columnManager.getColumnsByFieldRoot(a).forEach(function(e){var n=o.getCell(e.getField());if(n){var s=e.getFieldValue(t);n.getValue()!=s&&(n.setValueProcessData(s),i&&n.cellRendered())}})}i?(o.normalizeHeight(!0),o.table.options.rowFormatter&&o.table.options.rowFormatter(o.getComponent())):(o.initialized=!1,o.height=0,o.heightStyled=""),!1!==o.table.options.dataTree&&o.table.modExists("dataTree")&&o.table.modules.dataTree.redrawNeeded(e)&&(o.table.modules.dataTree.initializeRow(o),o.table.modules.dataTree.layoutRow(o),o.table.rowManager.refreshActiveData("tree",!1,!0)),o.table.options.rowUpdated.call(o.table,o.getComponent()),s()})},a.prototype.getData=function(e){var t=this;return e?t.table.modExists("accessor")?t.table.modules.accessor.transformRow(t.data,e):void 0:this.data},a.prototype.getCell=function(e){return e=this.table.columnManager.findColumn(e),this.cells.find(function(t){return t.column===e})},a.prototype.getCellIndex=function(e){return this.cells.findIndex(function(t){return t===e})},a.prototype.findNextEditableCell=function(e){var t=!1;if(e0)for(var o=e-1;o>=0;o--){var i=this.cells[o],n=!0;if(i.column.modules.edit&&d.prototype.helpers.elVisible(i.getElement())&&("function"==typeof i.column.modules.edit.check&&(n=i.column.modules.edit.check(i.getComponent())),n)){t=i;break}}return t},a.prototype.getCells=function(){return this.cells},a.prototype.nextRow=function(){return this.table.rowManager.nextDisplayRow(this,!0)||!1},a.prototype.prevRow=function(){return this.table.rowManager.prevDisplayRow(this,!0)||!1},a.prototype.moveToRow=function(e,t){var o=this.table.rowManager.findRow(e);o?(this.table.rowManager.moveRowActual(this,o,!t),this.table.rowManager.refreshActiveData("display",!1,!0)):console.warn("Move Error - No matching row found:",e)},a.prototype.validate=function(){var e=[];return this.cells.forEach(function(t){t.validate()||e.push(t.getComponent())}),!e.length||e},a.prototype.delete=function(){var e=this;return new Promise(function(t,o){var i,n;e.table.options.history&&e.table.modExists("history")&&(e.table.options.groupBy&&e.table.modExists("groupRows")?(n=e.getGroup().rows,(i=n.indexOf(e))&&(i=n[i-1])):(i=e.table.rowManager.getRowIndex(e))&&(i=e.table.rowManager.rows[i-1]),e.table.modules.history.action("rowDelete",e,{data:e.getData(),pos:!i,index:i})),e.deleteActual(),t()})},a.prototype.deleteActual=function(e){this.table.rowManager.getRowIndex(this);this.table.modExists("selectRow")&&this.table.modules.selectRow._deselectRow(this,!0),this.table.modExists("edit")&&this.table.modules.edit.currentCell.row===this&&this.table.modules.edit.cancelEdit(),this.table.options.reactiveData&&this.table.modExists("reactiveData",!0),this.modules.group&&this.modules.group.removeRow(this),this.table.rowManager.deleteRow(this,e),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.table.options.dataTree&&this.table.modExists("dataTree",!0)&&this.table.modules.dataTree.rowDelete(this),this.table.modExists("columnCalcs")&&(this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.columnCalcs.recalcRowGroup(this):this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows))},a.prototype.deleteCells=function(){for(var e=this.cells.length,t=0;t-1?(this.browser="ie",this.browserSlow=!0):e.indexOf("Edge")>-1?(this.browser="edge",this.browserSlow=!0):e.indexOf("Firefox")>-1?(this.browser="firefox",this.browserSlow=!1):(this.browser="other",this.browserSlow=!1),this.browserMobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4))},d.prototype.blockRedraw=function(){return this.rowManager.blockRedraw()},d.prototype.restoreRedraw=function(){return this.rowManager.restoreRedraw()},d.prototype.setDataFromLocalFile=function(e){var t=this;return new Promise(function(o,i){var n=document.createElement("input");n.type="file",n.accept=e||".json,application/json",n.addEventListener("change",function(e){var s,r=n.files[0],a=new FileReader;a.readAsText(r),a.onload=function(e){try{s=JSON.parse(a.result)}catch(e){return console.warn("File Load Error - File contents is invalid JSON",e),void i(e)}t._setData(s).then(function(e){o(e)}).catch(function(e){o(e)})},a.onerror=function(e){console.warn("File Load Error - Unable to read file"),i()}}),n.click()})},d.prototype.setData=function(e,t,o){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(e,t,o,!1,!0)},d.prototype._setData=function(e,t,o,i,n){var s=this;return"string"!=typeof e?e?s.rowManager.setData(e,i,n):s.modExists("ajax")&&(s.modules.ajax.getUrl||s.options.ajaxURLGenerator)?"remote"==s.options.pagination&&s.modExists("page",!0)?(s.modules.page.reset(!0,!0),s.modules.page.setPage(1)):s.modules.ajax.loadData(i,n):s.rowManager.setData([],i,n):0==e.indexOf("{")||0==e.indexOf("[")?s.rowManager.setData(JSON.parse(e),i,n):s.modExists("ajax",!0)?(t&&s.modules.ajax.setParams(t),o&&s.modules.ajax.setConfig(o),s.modules.ajax.setUrl(e),"remote"==s.options.pagination&&s.modExists("page",!0)?(s.modules.page.reset(!0,!0),s.modules.page.setPage(1)):s.modules.ajax.loadData(i,n)):void 0},d.prototype.clearData=function(){this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this.rowManager.clearData()},d.prototype.getData=function(e){return!0===e&&(console.warn("passing a boolean to the getData function is deprecated, you should now pass the string 'active'"),e="active"),this.rowManager.getData(e)},d.prototype.getDataCount=function(e){return!0===e&&(console.warn("passing a boolean to the getDataCount function is deprecated, you should now pass the string 'active'"),e="active"),this.rowManager.getDataCount(e)},d.prototype.searchRows=function(e,t,o){if(this.modExists("filter",!0))return this.modules.filter.search("rows",e,t,o)},d.prototype.searchData=function(e,t,o){if(this.modExists("filter",!0))return this.modules.filter.search("data",e,t,o)},d.prototype.getHtml=function(e,t,o){if(this.modExists("export",!0))return this.modules.export.getHtml(e,t,o)},d.prototype.print=function(e,t,o){if(this.modExists("print",!0))return this.modules.print.printFullscreen(e,t,o)},d.prototype.getAjaxUrl=function(){if(this.modExists("ajax",!0))return this.modules.ajax.getUrl()},d.prototype.replaceData=function(e,t,o){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(e,t,o,!0)},d.prototype.updateData=function(e){var t=this,o=this,i=0;return new Promise(function(n,s){t.modExists("ajax")&&t.modules.ajax.blockActiveRequest(),"string"==typeof e&&(e=JSON.parse(e)),e?e.forEach(function(e){var t=o.rowManager.findRow(e[o.options.index]);t&&(i++,t.updateData(e).then(function(){--i||n()}))}):(console.warn("Update Error - No data provided"),s("Update Error - No data provided"))})},d.prototype.addData=function(e,t,o){var i=this;return new Promise(function(n,s){i.modExists("ajax")&&i.modules.ajax.blockActiveRequest(),"string"==typeof e&&(e=JSON.parse(e)),e?i.rowManager.addRows(e,t,o).then(function(e){var t=[];e.forEach(function(e){t.push(e.getComponent())}),n(t)}):(console.warn("Update Error - No data provided"),s("Update Error - No data provided"))})},d.prototype.updateOrAddData=function(e){var t=this,o=this,i=[],n=0;return new Promise(function(s,r){t.modExists("ajax")&&t.modules.ajax.blockActiveRequest(),"string"==typeof e&&(e=JSON.parse(e)),e?e.forEach(function(e){var t=o.rowManager.findRow(e[o.options.index]);n++,t?t.updateData(e).then(function(){n--,i.push(t.getComponent()),n||s(i)}):o.rowManager.addRows(e).then(function(e){n--,i.push(e[0].getComponent()),n||s(i)})}):(console.warn("Update Error - No data provided"),r("Update Error - No data provided"))})},d.prototype.getRow=function(e){var t=this.rowManager.findRow(e);return t?t.getComponent():(console.warn("Find Error - No matching row found:",e),!1)},d.prototype.getRowFromPosition=function(e,t){var o=this.rowManager.getRowFromPosition(e,t);return o?o.getComponent():(console.warn("Find Error - No matching row found:",e),!1)},d.prototype.deleteRow=function(e){var t=this;return new Promise(function(o,i){function n(){++r==e.length&&a&&(s.rowManager.reRenderInPosition(),o())}var s=t,r=0,a=0,l=[];Array.isArray(e)||(e=[e]),e.forEach(function(e){var o=t.rowManager.findRow(e,!0);o?l.push(o):(console.warn("Delete Error - No matching row found:",e),i("Delete Error - No matching row found"),n())}),l.sort(function(e,o){return t.rowManager.rows.indexOf(e)>t.rowManager.rows.indexOf(o)?1:-1}),l.forEach(function(e){e.delete().then(function(){a++,n()}).catch(function(e){n(),i(e)})})})},d.prototype.addRow=function(e,t,o){var i=this;return new Promise(function(n,s){"string"==typeof e&&(e=JSON.parse(e)),i.rowManager.addRows(e,t,o).then(function(e){i.modExists("columnCalcs")&&i.modules.columnCalcs.recalc(i.rowManager.activeRows),n(e[0].getComponent())})})},d.prototype.updateOrAddRow=function(e,t){var o=this;return new Promise(function(i,n){var s=o.rowManager.findRow(e);"string"==typeof t&&(t=JSON.parse(t)),s?s.updateData(t).then(function(){o.modExists("columnCalcs")&&o.modules.columnCalcs.recalc(o.rowManager.activeRows),i(s.getComponent())}).catch(function(e){n(e)}):s=o.rowManager.addRows(t).then(function(e){o.modExists("columnCalcs")&&o.modules.columnCalcs.recalc(o.rowManager.activeRows),i(e[0].getComponent())}).catch(function(e){n(e)})})},d.prototype.updateRow=function(e,t){var o=this;return new Promise(function(i,n){var s=o.rowManager.findRow(e);"string"==typeof t&&(t=JSON.parse(t)),s?s.updateData(t).then(function(){i(s.getComponent())}).catch(function(e){n(e)}):(console.warn("Update Error - No matching row found:",e),n("Update Error - No matching row found"))})},d.prototype.scrollToRow=function(e,t,o){var i=this;return new Promise(function(n,s){var r=i.rowManager.findRow(e);r?i.rowManager.scrollToRow(r,t,o).then(function(){n()}).catch(function(e){s(e)}):(console.warn("Scroll Error - No matching row found:",e),s("Scroll Error - No matching row found"))})},d.prototype.moveRow=function(e,t,o){var i=this.rowManager.findRow(e);i?i.moveToRow(t,o):console.warn("Move Error - No matching row found:",e)},d.prototype.getRows=function(e){return!0===e&&(console.warn("passing a boolean to the getRows function is deprecated, you should now pass the string 'active'"),e="active"),this.rowManager.getComponents(e)},d.prototype.getRowPosition=function(e,t){var o=this.rowManager.findRow(e);return o?this.rowManager.getRowPosition(o,t):(console.warn("Position Error - No matching row found:",e),!1)},d.prototype.copyToClipboard=function(e){this.modExists("clipboard",!0)&&this.modules.clipboard.copy(e)},d.prototype.setColumns=function(e){this.columnManager.setColumns(e)},d.prototype.getColumns=function(e){return this.columnManager.getComponents(e)},d.prototype.getColumn=function(e){var t=this.columnManager.findColumn(e);return t?t.getComponent():(console.warn("Find Error - No matching column found:",e),!1)},d.prototype.getColumnDefinitions=function(){return this.columnManager.getDefinitionTree()},d.prototype.getColumnLayout=function(){if(this.modExists("persistence",!0))return this.modules.persistence.parseColumns(this.columnManager.getColumns())},d.prototype.setColumnLayout=function(e){return!!this.modExists("persistence",!0)&&(this.columnManager.setColumns(this.modules.persistence.mergeDefinition(this.options.columns,e)),!0)},d.prototype.showColumn=function(e){var t=this.columnManager.findColumn(e);if(!t)return console.warn("Column Show Error - No matching column found:",e),!1;t.show(),this.options.responsiveLayout&&this.modExists("responsiveLayout",!0)&&this.modules.responsiveLayout.update()},d.prototype.hideColumn=function(e){var t=this.columnManager.findColumn(e);if(!t)return console.warn("Column Hide Error - No matching column found:",e),!1;t.hide(),this.options.responsiveLayout&&this.modExists("responsiveLayout",!0)&&this.modules.responsiveLayout.update()},d.prototype.toggleColumn=function(e){var t=this.columnManager.findColumn(e);if(!t)return console.warn("Column Visibility Toggle Error - No matching column found:",e),!1;t.visible?t.hide():t.show()},d.prototype.addColumn=function(e,t,o){var i=this;return new Promise(function(n,s){var r=i.columnManager.findColumn(o);i.columnManager.addColumn(e,t,r).then(function(e){n(e.getComponent())}).catch(function(e){s(e)})})},d.prototype.deleteColumn=function(e){var t=this;return new Promise(function(o,i){var n=t.columnManager.findColumn(e);n?n.delete().then(function(){o()}).catch(function(e){i(e)}):(console.warn("Column Delete Error - No matching column found:",e),i())})},d.prototype.updateColumnDefinition=function(e,t){var o=this;return new Promise(function(i,n){var s=o.columnManager.findColumn(e);s?s.updateDefinition(t).then(function(e){i(e)}).catch(function(e){n(e)}):(console.warn("Column Update Error - No matching column found:",e),n())})},d.prototype.moveColumn=function(e,t,o){var i=this.columnManager.findColumn(e),n=this.columnManager.findColumn(t);i?n?this.columnManager.moveColumn(i,n,o):console.warn("Move Error - No matching column found:",n):console.warn("Move Error - No matching column found:",e)},d.prototype.scrollToColumn=function(e,t,o){var i=this;return new Promise(function(n,s){var r=i.columnManager.findColumn(e);r?i.columnManager.scrollToColumn(r,t,o).then(function(){n()}).catch(function(e){s(e)}):(console.warn("Scroll Error - No matching column found:",e),s("Scroll Error - No matching column found"))})},d.prototype.setLocale=function(e){this.modules.localize.setLocale(e)},d.prototype.getLocale=function(){return this.modules.localize.getLocale()},d.prototype.getLang=function(e){return this.modules.localize.getLang(e)},d.prototype.redraw=function(e){this.columnManager.redraw(e),this.rowManager.redraw(e)},d.prototype.setHeight=function(e){"classic"!==this.rowManager.renderMode?(this.options.height=isNaN(e)?e:e+"px",this.element.style.height=this.options.height,this.rowManager.setRenderMode(),this.rowManager.redraw()):console.warn("setHeight function is not available in classic render mode")},d.prototype.setSort=function(e,t){this.modExists("sort",!0)&&(this.modules.sort.setSort(e,t),this.rowManager.sorterRefresh())},d.prototype.getSorters=function(){if(this.modExists("sort",!0))return this.modules.sort.getSort()},d.prototype.clearSort=function(){this.modExists("sort",!0)&&(this.modules.sort.clear(),this.rowManager.sorterRefresh())},d.prototype.setFilter=function(e,t,o,i){this.modExists("filter",!0)&&(this.modules.filter.setFilter(e,t,o,i),this.rowManager.filterRefresh())},d.prototype.addFilter=function(e,t,o,i){this.modExists("filter",!0)&&(this.modules.filter.addFilter(e,t,o,i),this.rowManager.filterRefresh())},d.prototype.getFilters=function(e){if(this.modExists("filter",!0))return this.modules.filter.getFilters(e)},d.prototype.setHeaderFilterFocus=function(e){if(this.modExists("filter",!0)){var t=this.columnManager.findColumn(e);if(!t)return console.warn("Column Filter Focus Error - No matching column found:",e),!1;this.modules.filter.setHeaderFilterFocus(t)}},d.prototype.getHeaderFilterValue=function(e){if(this.modExists("filter",!0)){var t=this.columnManager.findColumn(e);if(t)return this.modules.filter.getHeaderFilterValue(t);console.warn("Column Filter Error - No matching column found:",e)}},d.prototype.setHeaderFilterValue=function(e,t){if(this.modExists("filter",!0)){var o=this.columnManager.findColumn(e);if(!o)return console.warn("Column Filter Error - No matching column found:",e),!1;this.modules.filter.setHeaderFilterValue(o,t)}},d.prototype.getHeaderFilters=function(){if(this.modExists("filter",!0))return this.modules.filter.getHeaderFilters()},d.prototype.removeFilter=function(e,t,o){this.modExists("filter",!0)&&(this.modules.filter.removeFilter(e,t,o),this.rowManager.filterRefresh())},d.prototype.clearFilter=function(e){this.modExists("filter",!0)&&(this.modules.filter.clearFilter(e),this.rowManager.filterRefresh())},d.prototype.clearHeaderFilter=function(){this.modExists("filter",!0)&&(this.modules.filter.clearHeaderFilter(),this.rowManager.filterRefresh())},d.prototype.selectRow=function(e){this.modExists("selectRow",!0)&&(!0===e&&(console.warn("passing a boolean to the selectRowselectRow function is deprecated, you should now pass the string 'active'"),e="active"),this.modules.selectRow.selectRows(e))},d.prototype.deselectRow=function(e){this.modExists("selectRow",!0)&&this.modules.selectRow.deselectRows(e)},d.prototype.toggleSelectRow=function(e){this.modExists("selectRow",!0)&&this.modules.selectRow.toggleRow(e)},d.prototype.getSelectedRows=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedRows()},d.prototype.getSelectedData=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedData()},d.prototype.getInvalidCells=function(){if(this.modExists("validate",!0))return this.modules.validate.getInvalidCells()},d.prototype.clearCellValidation=function(e){var t=this;this.modExists("validate",!0)&&(e||(e=this.modules.validate.getInvalidCells()),Array.isArray(e)||(e=[e]),e.forEach(function(e){t.modules.validate.clearValidation(e._getSelf())}))},d.prototype.validate=function(e){var t=[];return this.rowManager.rows.forEach(function(e){var o=e.validate();!0!==o&&(t=t.concat(o))}),!t.length||t},d.prototype.setMaxPage=function(e){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setMaxPage(e)},d.prototype.setPage=function(e){return this.options.pagination&&this.modExists("page")?this.modules.page.setPage(e):new Promise(function(e,t){t()})},d.prototype.setPageToRow=function(e){var t=this;return new Promise(function(o,i){t.options.pagination&&t.modExists("page")?(e=t.rowManager.findRow(e),e?t.modules.page.setPageToRow(e).then(function(){o()}).catch(function(){i()}):i()):i()})},d.prototype.setPageSize=function(e){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setPageSize(e),this.modules.page.setPage(1).then(function(){}).catch(function(){})},d.prototype.getPageSize=function(){if(this.options.pagination&&this.modExists("page",!0))return this.modules.page.getPageSize()},d.prototype.previousPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.previousPage()},d.prototype.nextPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.nextPage()},d.prototype.getPage=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPage()},d.prototype.getPageMax=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPageMax()},d.prototype.setGroupBy=function(e){if(!this.modExists("groupRows",!0))return!1;this.options.groupBy=e,this.modules.groupRows.initialize(),this.rowManager.refreshActiveData("display"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")},d.prototype.setGroupStartOpen=function(e){if(!this.modExists("groupRows",!0))return!1;this.options.groupStartOpen=e,this.modules.groupRows.initialize(),this.options.groupBy?(this.rowManager.refreshActiveData("group"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")):console.warn("Grouping Update - cant refresh view, no groups have been set")},d.prototype.setGroupHeader=function(e){if(!this.modExists("groupRows",!0))return!1;this.options.groupHeader=e,this.modules.groupRows.initialize(),this.options.groupBy?(this.rowManager.refreshActiveData("group"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")):console.warn("Grouping Update - cant refresh view, no groups have been set")},d.prototype.getGroups=function(e){return!!this.modExists("groupRows",!0)&&this.modules.groupRows.getGroups(!0)},d.prototype.getGroupedData=function(){if(this.modExists("groupRows",!0))return this.options.groupBy?this.modules.groupRows.getGroupedData():this.getData()},d.prototype.getEditedCells=function(){if(this.modExists("edit",!0))return this.modules.edit.getEditedCells()},d.prototype.clearCellEdited=function(e){var t=this;this.modExists("edit",!0)&&(e||(e=this.modules.edit.getEditedCells()),Array.isArray(e)||(e=[e]),e.forEach(function(e){t.modules.edit.clearEdited(e._getSelf())}))},d.prototype.getCalcResults=function(){return!!this.modExists("columnCalcs",!0)&&this.modules.columnCalcs.getResults()},d.prototype.recalc=function(){this.modExists("columnCalcs",!0)&&this.modules.columnCalcs.recalcAll(this.rowManager.activeRows)},d.prototype.navigatePrev=function(){var e=!1;return!(!this.modExists("edit",!0)||!(e=this.modules.edit.currentCell))&&e.nav().prev()},d.prototype.navigateNext=function(){var e=!1;return!(!this.modExists("edit",!0)||!(e=this.modules.edit.currentCell))&&e.nav().next()},d.prototype.navigateLeft=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().left())},d.prototype.navigateRight=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().right())},d.prototype.navigateUp=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().up())},d.prototype.navigateDown=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().down())},d.prototype.undo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.undo()},d.prototype.redo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.redo()},d.prototype.getHistoryUndoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryUndoSize()},d.prototype.getHistoryRedoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryRedoSize()},d.prototype.download=function(e,t,o,i){this.modExists("download",!0)&&this.modules.download.download(e,t,o,i)},d.prototype.downloadToTab=function(e,t,o,i){this.modExists("download",!0)&&this.modules.download.download(e,t,o,i,!0)},d.prototype.tableComms=function(e,t,o,i){this.modules.comms.receive(e,t,o,i)},d.prototype.moduleBindings={},d.prototype.extendModule=function(e,t,o){if(d.prototype.moduleBindings[e]){var i=d.prototype.moduleBindings[e].prototype[t];if(i)if("object"==(void 0===o?"undefined":_typeof(o)))for(var n in o)i[n]=o[n];else console.warn("Module Error - Invalid value type, it must be an object");else console.warn("Module Error - property does not exist:",t)}else console.warn("Module Error - module does not exist:",e)},d.prototype.registerModule=function(e,t){d.prototype.moduleBindings[e]=t},d.prototype.bindModules=function(){this.modules={};for(var e in d.prototype.moduleBindings)this.modules[e]=new d.prototype.moduleBindings[e](this)},d.prototype.modExists=function(e,t){return!!this.modules[e]||(t&&console.error("Tabulator Module Not Installed: "+e),!1)},d.prototype.helpers={elVisible:function(e){return!(e.offsetWidth<=0&&e.offsetHeight<=0)},elOffset:function(e){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset-document.documentElement.clientTop,left:t.left+window.pageXOffset-document.documentElement.clientLeft}},deepClone:function(e){var t=Array.isArray(e)?[]:{};for(var o in e)null!=e[o]&&"object"===_typeof(e[o])?e[o]instanceof Date?t[o]=new Date(e[o]):t[o]=this.deepClone(e[o]):t[o]=e[o];return t}},d.prototype.comms={tables:[],register:function(e){d.prototype.comms.tables.push(e)},deregister:function(e){var t=d.prototype.comms.tables.indexOf(e);t>-1&&d.prototype.comms.tables.splice(t,1)},lookupTable:function(e,t){var o,i,n=[];if("string"==typeof e){if(o=document.querySelectorAll(e),o.length)for(var s=0;s0?s.setWidth(n):s.reinitializeWidth()):this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitColumns:function(e){function t(e){return"string"==typeof e?e.indexOf("%")>-1?n/100*parseInt(e):parseInt(e):e}function o(e,i,n,s){function r(e){return n*(e.column.definition.widthGrow||1)}function a(e){return t(e.width)-n*(e.column.definition.widthShrink||0)}var l=[],c=0,u=0,d=0,h=0,p=0,m=[];return e.forEach(function(e,t){var o=s?a(e):r(e);e.column.minWidth>=o?l.push(e):(m.push(e),p+=s?e.column.definition.widthShrink||1:e.column.definition.widthGrow||1)}),l.length?(l.forEach(function(e){c+=s?e.width-e.column.minWidth:e.column.minWidth,e.width=e.column.minWidth}),u=i-c,d=p?Math.floor(u/p):u,h=u-d*p,h+=o(m,u,d,s)):(h=p?i-Math.floor(i/p)*p:i,m.forEach(function(e){e.width=s?a(e):r(e)})),h}var i=this,n=i.table.element.clientWidth,s=0,r=0,a=0,l=0,c=[],u=[],d=0,h=0,p=0;this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.rowManager.element.scrollHeight>this.table.rowManager.element.clientHeight&&(n-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),e.forEach(function(e){var o,i,n;e.visible&&(o=e.definition.width,i=parseInt(e.minWidth),o?(n=t(o),s+=n>i?n:i,e.definition.widthShrink&&(u.push({column:e,width:n>i?n:i}),d+=e.definition.widthShrink)):(c.push({column:e,width:0}),a+=e.definition.widthGrow||1))}),r=n-s,l=Math.floor(r/a);var p=o(c,r,l,!1);c.length&&p>0&&(c[c.length-1].width+=+p),c.forEach(function(e){r-=e.width}),h=Math.abs(p)+r,h>0&&d&&(p=o(u,h,Math.floor(h/d),!0)),u.length&&(u[u.length-1].width-=p),c.forEach(function(e){e.column.setWidth(e.width)}),u.forEach(function(e){e.column.setWidth(e.width)})}},d.prototype.registerModule("layout",h);var p=function(e){this.table=e,this.locale="default",this.lang=!1,this.bindings={}};p.prototype.setHeaderFilterPlaceholder=function(e){this.langs.default.headerFilters.default=e},p.prototype.setHeaderFilterColumnPlaceholder=function(e,t){this.langs.default.headerFilters.columns[e]=t,this.lang&&!this.lang.headerFilters.columns[e]&&(this.lang.headerFilters.columns[e]=t)},p.prototype.installLang=function(e,t){this.langs[e]?this._setLangProp(this.langs[e],t):this.langs[e]=t},p.prototype._setLangProp=function(e,t){for(var o in t)e[o]&&"object"==_typeof(e[o])?this._setLangProp(e[o],t[o]):e[o]=t[o]},p.prototype.setLocale=function(e){function t(e,o){for(var i in e)"object"==_typeof(e[i])?(o[i]||(o[i]={}),t(e[i],o[i])):o[i]=e[i]}var o=this;if(e=e||"default",!0===e&&navigator.language&&(e=navigator.language.toLowerCase()),e&&!o.langs[e]){var i=e.split("-")[0];o.langs[i]?(console.warn("Localization Error - Exact matching locale not found, using closest match: ",e,i),e=i):(console.warn("Localization Error - Matching locale not found, using default: ",e),e="default")}o.locale=e,o.lang=d.prototype.helpers.deepClone(o.langs.default||{}),"default"!=e&&t(o.langs[e],o.lang),o.table.options.localized.call(o.table,o.locale,o.lang),o._executeBindings()},p.prototype.getLocale=function(e){return self.locale},p.prototype.getLang=function(e){return e?this.langs[e]:this.lang},p.prototype.getText=function(e,t){var e=t?e+"|"+t:e,o=e.split("|");return this._getLangElement(o,this.locale)||""},p.prototype._getLangElement=function(e,t){var o=this,i=o.lang;return e.forEach(function(e){var t;i&&(t=i[e],i=void 0!==t&&t)}),i},p.prototype.bind=function(e,t){this.bindings[e]||(this.bindings[e]=[]),this.bindings[e].push(t),t(this.getText(e),this.lang)},p.prototype._executeBindings=function(){var e=this;for(var t in e.bindings)!function(t){e.bindings[t].forEach(function(o){o(e.getText(t),e.lang)})}(t)},p.prototype.langs={default:{groups:{item:"item",items:"items"},columns:{},ajax:{loading:"Loading",error:"Error"},pagination:{page_size:"Page Size",page_title:"Show Page",first:"First",first_title:"First Page",last:"Last",last_title:"Last Page",prev:"Prev",prev_title:"Prev Page",next:"Next",next_title:"Next Page",all:"All"},headerFilters:{default:"filter column...",columns:{}}}},d.prototype.registerModule("localize",p);var m=function(e){this.table=e};m.prototype.getConnections=function(e){var t,o=this,i=[];return t=d.prototype.comms.lookupTable(e),t.forEach(function(e){o.table!==e&&i.push(e)}),i},m.prototype.send=function(e,t,o,i){var n=this,s=this.getConnections(e);s.forEach(function(e){e.tableComms(n.table.element,t,o,i)}),!s.length&&e&&console.warn("Table Connection Error - No tables matching selector found",e)},m.prototype.receive=function(e,t,o,i){if(this.table.modExists(t))return this.table.modules[t].commsReceived(e,o,i);console.warn("Inter-table Comms Error - no such module:",t)},d.prototype.registerModule("comms",m);var f=function(e){this.table=e,this.allowedTypes=["","data","download","clipboard","print","htmlOutput"]};f.prototype.initializeColumn=function(e){var t=this,o=!1,i={};this.allowedTypes.forEach(function(n){var s,r="accessor"+(n.charAt(0).toUpperCase()+n.slice(1));e.definition[r]&&(s=t.lookupAccessor(e.definition[r]))&&(o=!0,i[r]={accessor:s,params:e.definition[r+"Params"]||{}})}),o&&(e.modules.accessor=i)},f.prototype.lookupAccessor=function(e){var t=!1;switch(void 0===e?"undefined":_typeof(e)){case"string":this.accessors[e]?t=this.accessors[e]:console.warn("Accessor Error - No such accessor found, ignoring: ",e);break;case"function":t=e}return t},f.prototype.transformRow=function(e,t){var o=this,i="accessor"+(t.charAt(0).toUpperCase()+t.slice(1)),n=d.prototype.helpers.deepClone(e||{});return o.table.columnManager.traverse(function(e){var o,s,r,a;e.modules.accessor&&(s=e.modules.accessor[i]||e.modules.accessor.accessor||!1)&&"undefined"!=(o=e.getFieldValue(n))&&(a=e.getComponent(),r="function"==typeof s.params?s.params(o,n,t,a):s.params,e.setFieldValue(n,s.accessor(o,n,t,r,a)))}),n},f.prototype.accessors={},d.prototype.registerModule("accessor",f);var g=function(e){this.table=e,this.config=!1,this.url="",this.urlGenerator=!1,this.params=!1,this.loaderElement=this.createLoaderElement(),this.msgElement=this.createMsgElement(),this.loadingElement=!1,this.errorElement=!1,this.loaderPromise=!1,this.progressiveLoad=!1,this.loading=!1,this.requestOrder=0};g.prototype.initialize=function(){var e;this.loaderElement.appendChild(this.msgElement),this.table.options.ajaxLoaderLoading&&("string"==typeof this.table.options.ajaxLoaderLoading?(e=document.createElement("template"),e.innerHTML=this.table.options.ajaxLoaderLoading.trim(),this.loadingElement=e.content.firstChild):this.loadingElement=this.table.options.ajaxLoaderLoading),this.loaderPromise=this.table.options.ajaxRequestFunc||this.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||this.defaultURLGenerator,this.table.options.ajaxLoaderError&&("string"==typeof this.table.options.ajaxLoaderError?(e=document.createElement("template"),e.innerHTML=this.table.options.ajaxLoaderError.trim(),this.errorElement=e.content.firstChild):this.errorElement=this.table.options.ajaxLoaderError),this.table.options.ajaxParams&&this.setParams(this.table.options.ajaxParams),this.table.options.ajaxConfig&&this.setConfig(this.table.options.ajaxConfig),this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL),this.table.options.ajaxProgressiveLoad&&(this.table.options.pagination?(this.progressiveLoad=!1,console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time")):this.table.modExists("page")?(this.progressiveLoad=this.table.options.ajaxProgressiveLoad,this.table.modules.page.initializeProgressive(this.progressiveLoad)):console.error("Pagination plugin is required for progressive ajax loading"))},g.prototype.createLoaderElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-loader"),e},g.prototype.createMsgElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-loader-msg"),e.setAttribute("role","alert"),e},g.prototype.setParams=function(e,t){if(t){this.params=this.params||{};for(var o in e)this.params[o]=e[o]}else this.params=e},g.prototype.getParams=function(){return this.params||{}},g.prototype.setConfig=function(e){if(this._loadDefaultConfig(),"string"==typeof e)this.config.method=e;else for(var t in e)this.config[t]=e[t]},g.prototype._loadDefaultConfig=function(e){var t=this;if(!t.config||e){t.config={};for(var o in t.defaultConfig)t.config[o]=t.defaultConfig[o]}},g.prototype.setUrl=function(e){this.url=e},g.prototype.getUrl=function(){return this.url},g.prototype.loadData=function(e,t){return this.progressiveLoad?this._loadDataProgressive():this._loadDataStandard(e,t)},g.prototype.nextPage=function(e){var t;this.loading||(t=this.table.options.ajaxProgressiveLoadScrollMargin||2*this.table.rowManager.getElement().clientHeight,ei||null===i)&&(i=e)}),null!==i?!1!==n?i.toFixed(n):i:""},min:function(e,t,o){var i=null,n=void 0!==o.precision&&o.precision;return e.forEach(function(e){((e=Number(e))"),o.dataTreeExpandElement?"string"==typeof o.dataTreeExpandElement?(e=document.createElement("div"),e.innerHTML=o.dataTreeExpandElement,this.expandEl=e.firstChild):this.expandEl=o.dataTreeExpandElement:(this.expandEl=document.createElement("div"),this.expandEl.classList.add("tabulator-data-tree-control"),this.expandEl.tabIndex=0,this.expandEl.innerHTML="
"),_typeof(o.dataTreeStartExpanded)){case"boolean":this.startOpen=function(e,t){return o.dataTreeStartExpanded};break;case"function":this.startOpen=o.dataTreeStartExpanded;break;default:this.startOpen=function(e,t){return o.dataTreeStartExpanded[t]}}},y.prototype.initializeRow=function(e){var t=e.getData()[this.field],o=Array.isArray(t),i=o||!o&&"object"===(void 0===t?"undefined":_typeof(t))&&null!==t;!i&&e.modules.dataTree&&e.modules.dataTree.branchEl&&e.modules.dataTree.branchEl.parentNode.removeChild(e.modules.dataTree.branchEl),!i&&e.modules.dataTree&&e.modules.dataTree.controlEl&&e.modules.dataTree.controlEl.parentNode.removeChild(e.modules.dataTree.controlEl),e.modules.dataTree={index:e.modules.dataTree?e.modules.dataTree.index:0,open:!!i&&(e.modules.dataTree?e.modules.dataTree.open:this.startOpen(e.getComponent(),0)),controlEl:!(!e.modules.dataTree||!i)&&e.modules.dataTree.controlEl,branchEl:!(!e.modules.dataTree||!i)&&e.modules.dataTree.branchEl,parent:!!e.modules.dataTree&&e.modules.dataTree.parent,children:i}},y.prototype.layoutRow=function(e){var t=this.elementField?e.getCell(this.elementField):e.getCells()[0],o=t.getElement(),i=e.modules.dataTree;i.branchEl&&(i.branchEl.parentNode&&i.branchEl.parentNode.removeChild(i.branchEl),i.branchEl=!1),i.controlEl&&(i.controlEl.parentNode&&i.controlEl.parentNode.removeChild(i.controlEl),i.controlEl=!1),this.generateControlElement(e,o),e.element.classList.add("tabulator-tree-level-"+i.index),i.index&&(this.branchEl?(i.branchEl=this.branchEl.cloneNode(!0),o.insertBefore(i.branchEl,o.firstChild),i.branchEl.style.marginLeft=(i.branchEl.offsetWidth+i.branchEl.style.marginRight)*(i.index-1)+i.index*this.indent+"px"):o.style.paddingLeft=parseInt(window.getComputedStyle(o,null).getPropertyValue("padding-left"))+i.index*this.indent+"px")},y.prototype.generateControlElement=function(e,t){var o=this,i=e.modules.dataTree,t=t||e.getCells()[0].getElement(),n=i.controlEl;!1!==i.children&&(i.open?(i.controlEl=this.collapseEl.cloneNode(!0),i.controlEl.addEventListener("click",function(t){t.stopPropagation(),o.collapseRow(e)})):(i.controlEl=this.expandEl.cloneNode(!0),i.controlEl.addEventListener("click",function(t){t.stopPropagation(),o.expandRow(e)})),i.controlEl.addEventListener("mousedown",function(e){e.stopPropagation()}),n&&n.parentNode===t?n.parentNode.replaceChild(i.controlEl,n):t.insertBefore(i.controlEl,t.firstChild))},y.prototype.setDisplayIndex=function(e){this.displayIndex=e},y.prototype.getDisplayIndex=function(){return this.displayIndex},y.prototype.getRows=function(e){var t=this,o=[];return e.forEach(function(e,i){var n,s;o.push(e),e instanceof a&&(n=e.modules.dataTree.children,n.index||!1===n.children||(s=t.getChildren(e),s.forEach(function(e){o.push(e)})))}),o},y.prototype.getChildren=function(e){var t=this,o=e.modules.dataTree,i=[],n=[];return!1!==o.children&&o.open&&(Array.isArray(o.children)||(o.children=this.generateChildren(e)),i=this.table.modExists("filter")?this.table.modules.filter.filter(o.children):o.children,this.table.modExists("sort")&&this.table.modules.sort.sort(i),i.forEach(function(e){n.push(e),t.getChildren(e).forEach(function(e){n.push(e)})})),n}, +y.prototype.generateChildren=function(e){var t=this,o=[],i=e.getData()[this.field];return Array.isArray(i)||(i=[i]),i.forEach(function(i){var n=new a(i||{},t.table.rowManager);n.modules.dataTree.index=e.modules.dataTree.index+1,n.modules.dataTree.parent=e,n.modules.dataTree.children&&(n.modules.dataTree.open=t.startOpen(n.getComponent(),n.modules.dataTree.index)),o.push(n)}),o},y.prototype.expandRow=function(e,t){var o=e.modules.dataTree;!1!==o.children&&(o.open=!0,e.reinitialize(),this.table.rowManager.refreshActiveData("tree",!1,!0),this.table.options.dataTreeRowExpanded(e.getComponent(),e.modules.dataTree.index))},y.prototype.collapseRow=function(e){var t=e.modules.dataTree;!1!==t.children&&(t.open=!1,e.reinitialize(),this.table.rowManager.refreshActiveData("tree",!1,!0),this.table.options.dataTreeRowCollapsed(e.getComponent(),e.modules.dataTree.index))},y.prototype.toggleRow=function(e){var t=e.modules.dataTree;!1!==t.children&&(t.open?this.collapseRow(e):this.expandRow(e))},y.prototype.getTreeParent=function(e){return!!e.modules.dataTree.parent&&e.modules.dataTree.parent.getComponent()},y.prototype.getFilteredTreeChildren=function(e){var t,o=e.modules.dataTree,i=[];return o.children&&(Array.isArray(o.children)||(o.children=this.generateChildren(e)),t=this.table.modExists("filter")?this.table.modules.filter.filter(o.children):o.children,t.forEach(function(e){e instanceof a&&i.push(e)})),i},y.prototype.rowDelete=function(e){var t,o=e.modules.dataTree.parent;o&&(t=this.findChildIndex(e,o),!1!==t&&o.data[this.field].splice(t,1),o.data[this.field].length||delete o.data[this.field],this.initializeRow(o),this.layoutRow(o)),this.table.rowManager.refreshActiveData("tree",!1,!0)},y.prototype.addTreeChildRow=function(e,t,o,i){var n=!1;"string"==typeof t&&(t=JSON.parse(t)),Array.isArray(e.data[this.field])||(e.data[this.field]=[],e.modules.dataTree.open=this.startOpen(e.getComponent(),e.modules.dataTree.index)),void 0!==i&&!1!==(n=this.findChildIndex(i,e))&&e.data[this.field].splice(o?n:n+1,0,t),!1===n&&(o?e.data[this.field].unshift(t):e.data[this.field].push(t)),this.initializeRow(e),this.layoutRow(e),this.table.rowManager.refreshActiveData("tree",!1,!0)},y.prototype.findChildIndex=function(e,t){var o=this,i=!1;return"object"==(void 0===e?"undefined":_typeof(e))?e instanceof a?i=e.data:e instanceof r?i=e._getSelf().data:"undefined"!=typeof HTMLElement&&e instanceof HTMLElement&&t.modules.dataTree&&(i=t.modules.dataTree.children.find(function(t){return t instanceof a&&t.element===e}))&&(i=i.data):i=void 0!==e&&null!==e&&t.data[this.field].find(function(t){return t.data[o.table.options.index]==e}),i&&(Array.isArray(t.data[this.field])&&(i=t.data[this.field].indexOf(i)),-1==i&&(i=!1)),i},y.prototype.getTreeChildren=function(e){var t=e.modules.dataTree,o=[];return t.children&&(Array.isArray(t.children)||(t.children=this.generateChildren(e)),t.children.forEach(function(e){e instanceof a&&o.push(e.getComponent())})),o},y.prototype.checkForRestyle=function(e){e.row.cells.indexOf(e)||e.row.reinitialize()},y.prototype.getChildField=function(){return this.field},y.prototype.redrawNeeded=function(e){return!!this.field&&void 0!==e[this.field]||!!this.elementField&&void 0!==e[this.elementField]},d.prototype.registerModule("dataTree",y);var w=function(e){this.table=e};w.prototype.download=function(e,t,o,i,n){function s(o,i){n?!0===n?r.triggerDownload(o,i,e,t,!0):n(o):r.triggerDownload(o,i,e,t)}var r=this,a=!1;if("function"==typeof e?a=e:r.downloaders[e]?a=r.downloaders[e]:console.warn("Download Error - No such download type found: ",e),a){var l=this.generateExportList(i);a.call(this.table,l,o||{},s)}},w.prototype.generateExportList=function(e){var t=this.table.modules.export.generateExportList(this.table.options.downloadConfig,!1,e||this.table.options.downloadRowRange,"download"),o=this.table.options.groupHeaderDownload;return o&&!Array.isArray(o)&&(o=[o]),t.forEach(function(e){var t;"group"===e.type&&(t=e.columns[0],o&&o[e.indent]&&(t.value=o[e.indent](t.value,e.component._group.getRowCount(),e.component._group.getData(),e.component)))}),t},w.prototype.triggerDownload=function(e,t,o,i,n){var s=document.createElement("a"),r=new Blob([e],{type:t}),i=i||"Tabulator."+("function"==typeof o?"txt":o);(r=this.table.options.downloadReady.call(this.table,e,r))&&(n?window.open(window.URL.createObjectURL(r)):navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(r,i):(s.setAttribute("href",window.URL.createObjectURL(r)),s.setAttribute("download",i),s.style.display="none",document.body.appendChild(s),s.click(),document.body.removeChild(s)),this.table.options.downloadComplete&&this.table.options.downloadComplete())},w.prototype.commsReceived=function(e,t,o){switch(t){case"intercept":this.download(o.type,"",o.options,o.active,o.intercept)}},w.prototype.downloaders={csv:function(e,t,o){var i=t&&t.delimiter?t.delimiter:",",n=[],s=[];e.forEach(function(e){var t=[];switch(e.type){case"group":console.warn("Download Warning - CSV downloader cannot process row groups");break;case"calc":console.warn("Download Warning - CSV downloader cannot process column calculations");break;case"header":e.columns.forEach(function(e,t){e&&1===e.depth&&(s[t]=void 0===e.value||"null"==typeof e.value?"":e.value)});break;case"row":e.columns.forEach(function(e){if(e){switch(_typeof(e.value)){case"object":e.value=JSON.stringify(e.value);break;case"undefined":case"null":e.value=""}t.push('"'+String(e.value).split('"').join('""')+'"')}}),n.push(t.join(i))}}),s.length&&(n=[s].concat(n)),n=n.join("\n"),t.bom&&(n="\ufeff"+n),o(n,"text/csv")},json:function(e,t,o){var i=[];e.forEach(function(e){var t={};switch(e.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":e.columns.forEach(function(e){e&&(t[e.component.getField()]=e.value)}),i.push(t)}}),i=JSON.stringify(i,null,"\t"),o(i,"application/json")},pdf:function(e,t,o){function i(e,t){var o=[];return e.columns.forEach(function(e){var i;if(e){switch(_typeof(e.value)){case"object":e.value=JSON.stringify(e.value);break;case"undefined":case"null":e.value=""}i={content:e.value,colSpan:e.width,rowSpan:e.height},t&&(i.styles=t),o.push(i)}else o.push("")}),o}var n=[],s=[],r={},a=t.rowGroupStyles||{fontStyle:"bold",fontSize:12,cellPadding:6,fillColor:220},l=t.rowCalcStyles||{fontStyle:"bold",fontSize:10,cellPadding:4,fillColor:232},c=t.jsPDF||{},u=t&&t.title?t.title:"";c.orientation||(c.orientation=t.orientation||"landscape"),c.unit||(c.unit="pt"),e.forEach(function(e){switch(e.type){case"header":n.push(i(e));break;case"group":s.push(i(e,a));break;case"calc":s.push(i(e,l));break;case"row":s.push(i(e))}});var d=new jsPDF(c);t&&t.autoTable&&(r="function"==typeof t.autoTable?t.autoTable(d)||{}:t.autoTable),u&&(r.addPageContent=function(e){d.text(u,40,30)}),r.head=n,r.body=s,d.autoTable(r),t&&t.documentProcessing&&t.documentProcessing(d),o(d.output("arraybuffer"),"application/pdf")},xlsx:function(e,t,o){function i(){var t=[],o=[],i={},n={s:{c:0,r:0},e:{c:e[0]?e[0].columns.reduce(function(e,t){return e+(t&&t.width?t.width:1)},0):0,r:e.length}};return e.forEach(function(e,i){var n=[];e.columns.forEach(function(e,t){e?(n.push(e.value instanceof Date||"object"!==_typeof(e.value)?e.value:JSON.stringify(e.value)),(e.width>1||e.height>-1)&&o.push({s:{r:i,c:t},e:{r:i+e.height-1,c:t+e.width-1}})):n.push("")}),t.push(n)}),XLSX.utils.sheet_add_aoa(i,t),i["!ref"]=XLSX.utils.encode_range(n),o.length&&(i["!merges"]=o),i}var n,s=this,r=t.sheetName||"Sheet1",a=XLSX.utils.book_new();if(a.SheetNames=[],a.Sheets={},t.sheetOnly)return void o(i());if(t.sheets)for(var l in t.sheets)!0===t.sheets[l]?(a.SheetNames.push(l),a.Sheets[l]=i()):(a.SheetNames.push(l),this.table.modules.comms.send(t.sheets[l],"download","intercept",{type:"xlsx",options:{sheetOnly:!0},active:s.active,intercept:function(e){a.Sheets[l]=e}}));else a.SheetNames.push(r),a.Sheets[r]=i();t.documentProcessing&&(a=t.documentProcessing(a)),n=XLSX.write(a,{bookType:"xlsx",bookSST:!0,type:"binary"}),o(function(e){for(var t=new ArrayBuffer(e.length),o=new Uint8Array(t),i=0;i!=e.length;++i)o[i]=255&e.charCodeAt(i);return t}(n),"application/octet-stream")},html:function(e,t,o){this.modExists("export",!0)&&o(this.modules.export.genereateHTMLTable(e),"text/html")}},d.prototype.registerModule("download",w);var E=function(e){this.table=e,this.currentCell=!1,this.mouseClick=!1,this.recursionBlock=!1,this.invalidEdit=!1,this.editedCells=[]};E.prototype.initializeColumn=function(e){var t=this,o={editor:!1,blocked:!1,check:e.definition.editable,params:e.definition.editorParams||{}};switch(_typeof(e.definition.editor)){case"string":"tick"===e.definition.editor&&(e.definition.editor="tickCross",console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor")),t.editors[e.definition.editor]?o.editor=t.editors[e.definition.editor]:console.warn("Editor Error - No such editor found: ",e.definition.editor);break;case"function":o.editor=e.definition.editor;break;case"boolean":!0===e.definition.editor&&("function"!=typeof e.definition.formatter?("tick"===e.definition.formatter&&(e.definition.formatter="tickCross",console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor")),t.editors[e.definition.formatter]?o.editor=t.editors[e.definition.formatter]:o.editor=t.editors.input):console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ",e.definition.formatter))}o.editor&&(e.modules.edit=o)},E.prototype.getCurrentCell=function(){return!!this.currentCell&&this.currentCell.getComponent()},E.prototype.clearEditor=function(e){var t,o=this.currentCell;if(this.invalidEdit=!1,o){for(this.currentCell=!1,t=o.getElement(),e?o.validate():t.classList.remove("tabulator-validation-fail"),t.classList.remove("tabulator-editing");t.firstChild;)t.removeChild(t.firstChild);o.row.getElement().classList.remove("tabulator-row-editing")}},E.prototype.cancelEdit=function(){if(this.currentCell){var e=this.currentCell,t=this.currentCell.getComponent();this.clearEditor(!0),e.setValueActual(e.getValue()),e.cellRendered(),e.column.cellEvents.cellEditCancelled&&e.column.cellEvents.cellEditCancelled.call(this.table,t),this.table.options.cellEditCancelled.call(this.table,t)}},E.prototype.bindEditor=function(e){var t=this,o=e.getElement();o.setAttribute("tabindex",0),o.addEventListener("click",function(e){o.classList.contains("tabulator-editing")||o.focus({preventScroll:!0})}),o.addEventListener("mousedown",function(e){t.mouseClick=!0}),o.addEventListener("focus",function(o){t.recursionBlock||t.edit(e,o,!1)})},E.prototype.focusCellNoEvent=function(e,t){this.recursionBlock=!0,t&&"ie"===this.table.browser||e.getElement().focus({preventScroll:!0}),this.recursionBlock=!1},E.prototype.editCell=function(e,t){this.focusCellNoEvent(e),this.edit(e,!1,t)},E.prototype.focusScrollAdjust=function(e){if("virtual"==this.table.rowManager.getRenderMode()){var t=this.table.rowManager.element.scrollTop,o=this.table.rowManager.element.clientHeight+this.table.rowManager.element.scrollTop,i=e.row.getElement();i.offsetTop;i.offsetTopo&&(this.table.rowManager.element.scrollTop+=i.offsetTop+i.offsetHeight-o)}},E.prototype.edit=function(e,t,o){function i(t){if(c.currentCell===e){var o=!0;return e.column.modules.validate&&c.table.modExists("validate")&&"manual"!=c.table.options.validationMode&&(o=c.table.modules.validate.validate(e.column.modules.validate,e,t)),!0===o||"highlight"===c.table.options.validationMode?(c.clearEditor(),e.setValue(t,!0),e.modules.edit||(e.modules.edit={}),e.modules.edit.edited=!0,-1==c.editedCells.indexOf(e)&&c.editedCells.push(e),c.table.options.dataTree&&c.table.modExists("dataTree")&&c.table.modules.dataTree.checkForRestyle(e),!0===o||(h.classList.add("tabulator-validation-fail"),!1)):(c.invalidEdit=!0,h.classList.add("tabulator-validation-fail"),c.focusCellNoEvent(e,!0),d(),c.table.options.validationFailed.call(c.table,e.getComponent(),t,o),!1)}}function n(){c.currentCell===e&&(c.cancelEdit(),c.table.options.dataTree&&c.table.modExists("dataTree")&&c.table.modules.dataTree.checkForRestyle(e))}function s(e){d=e}var r,a,l,c=this,u=!0,d=function(){},h=e.getElement();if(this.currentCell)return void(this.invalidEdit||this.cancelEdit());if(e.column.modules.edit.blocked)return this.mouseClick=!1,h.blur(),!1;switch(t&&t.stopPropagation(),_typeof(e.column.modules.edit.check)){case"function":u=e.column.modules.edit.check(e.getComponent());break;case"boolean":u=e.column.modules.edit.check}if(u||o){if(c.cancelEdit(),c.currentCell=e,this.focusScrollAdjust(e),a=e.getComponent(),this.mouseClick&&(this.mouseClick=!1,e.column.cellEvents.cellClick&&e.column.cellEvents.cellClick.call(this.table,t,a)),e.column.cellEvents.cellEditing&&e.column.cellEvents.cellEditing.call(this.table,a),c.table.options.cellEditing.call(this.table,a),l="function"==typeof e.column.modules.edit.params?e.column.modules.edit.params(a):e.column.modules.edit.params,!1===(r=e.column.modules.edit.editor.call(c,a,s,i,n,l)))return h.blur(),!1;if(!(r instanceof Node))return console.warn("Edit Error - Editor should return an instance of Node, the editor returned:",r),h.blur(),!1;for(h.classList.add("tabulator-editing"),e.row.getElement().classList.add("tabulator-row-editing");h.firstChild;)h.removeChild(h.firstChild);h.appendChild(r),d();for(var p=h.children,m=0;m46){if(o>=i.length)return t.preventDefault(),t.stopPropagation(),a=!1,!1;switch(i[o]){case n:if(l.toUpperCase()==l.toLowerCase())return t.preventDefault(),t.stopPropagation(),a=!1,!1;break;case s:if(isNaN(l))return t.preventDefault(),t.stopPropagation(),a=!1,!1;break;case r:break;default:if(l!==i[o])return t.preventDefault(),t.stopPropagation(),a=!1,!1}a=!0}}),e.addEventListener("keyup",function(i){i.keyCode>46&&t.maskAutoFill&&o(e.value.length)}),e.placeholder||(e.placeholder=i),t.maskAutoFill&&o(e.value.length)},E.prototype.getEditedCells=function(){var e=[];return this.editedCells.forEach(function(t){e.push(t.getComponent())}),e},E.prototype.clearEdited=function(e){var t;e.modules.edit&&e.modules.edit.edited&&(e.modules.validate.invalid=!1,(t=this.editedCells.indexOf(e))>-1&&this.editedCells.splice(t,1))},E.prototype.editors={input:function(e,t,o,i,n){function s(e){(null===r||void 0===r)&&""!==a.value||a.value!==r?o(a.value)&&(r=a.value):i()}var r=e.getValue(),a=document.createElement("input");if(a.setAttribute("type",n.search?"search":"text"),a.style.padding="4px",a.style.width="100%",a.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var l in n.elementAttributes)"+"==l.charAt(0)?(l=l.slice(1),a.setAttribute(l,a.getAttribute(l)+n.elementAttributes["+"+l])):a.setAttribute(l,n.elementAttributes[l]);return a.value=void 0!==r?r:"",t(function(){a.focus({preventScroll:!0}),a.style.height="100%"}),a.addEventListener("change",s),a.addEventListener("blur",s),a.addEventListener("keydown",function(e){switch(e.keyCode){case 13:s(e);break;case 27:i()}}),n.mask&&this.table.modules.edit.maskInput(a,n),a},textarea:function(e,t,o,i,n){function s(t){(null===r||void 0===r)&&""!==c.value||c.value!==r?(o(c.value)&&(r=c.value),setTimeout(function(){e.getRow().normalizeHeight()},300)):i()}var r=e.getValue(),a=n.verticalNavigation||"hybrid",l=String(null!==r&&void 0!==r?r:""),c=(l.match(/(?:\r\n|\r|\n)/g),document.createElement("textarea")),u=0;if(c.style.display="block",c.style.padding="2px",c.style.height="100%",c.style.width="100%",c.style.boxSizing="border-box",c.style.whiteSpace="pre-wrap",c.style.resize="none",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var d in n.elementAttributes)"+"==d.charAt(0)?(d=d.slice(1),c.setAttribute(d,c.getAttribute(d)+n.elementAttributes["+"+d])):c.setAttribute(d,n.elementAttributes[d]);return c.value=l,t(function(){c.focus({preventScroll:!0}),c.style.height="100%"}),c.addEventListener("change",s),c.addEventListener("blur",s),c.addEventListener("keyup",function(){c.style.height="";var t=c.scrollHeight;c.style.height=t+"px",t!=u&&(u=t,e.getRow().normalizeHeight())}),c.addEventListener("keydown",function(e){switch(e.keyCode){case 27:i();break;case 38:("editor"==a||"hybrid"==a&&c.selectionStart)&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 40:("editor"==a||"hybrid"==a&&c.selectionStart!==c.value.length)&&(e.stopImmediatePropagation(),e.stopPropagation())}}),n.mask&&this.table.modules.edit.maskInput(c,n),c},number:function(e,t,o,i,n){function s(){var e=l.value;isNaN(e)||""===e||(e=Number(e)),e!==r?o(e)&&(r=e):i()}var r=e.getValue(),a=n.verticalNavigation||"editor",l=document.createElement("input");if(l.setAttribute("type","number"),void 0!==n.max&&l.setAttribute("max",n.max),void 0!==n.min&&l.setAttribute("min",n.min),void 0!==n.step&&l.setAttribute("step",n.step),l.style.padding="4px",l.style.width="100%",l.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var c in n.elementAttributes)"+"==c.charAt(0)?(c=c.slice(1),l.setAttribute(c,l.getAttribute(c)+n.elementAttributes["+"+c])):l.setAttribute(c,n.elementAttributes[c]);l.value=r;var u=function(e){s()};return t(function(){l.removeEventListener("blur",u),l.focus({preventScroll:!0}),l.style.height="100%",l.addEventListener("blur",u)}),l.addEventListener("keydown",function(e){switch(e.keyCode){case 13:s();break;case 27:i();break;case 38:case 40:"editor"==a&&(e.stopImmediatePropagation(),e.stopPropagation())}}),n.mask&&this.table.modules.edit.maskInput(l,n),l},range:function(e,t,o,i,n){function s(){var e=a.value;isNaN(e)||""===e||(e=Number(e)),e!=r?o(e)&&(r=e):i()}var r=e.getValue(),a=document.createElement("input");if(a.setAttribute("type","range"),void 0!==n.max&&a.setAttribute("max",n.max),void 0!==n.min&&a.setAttribute("min",n.min),void 0!==n.step&&a.setAttribute("step",n.step),a.style.padding="4px",a.style.width="100%",a.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var l in n.elementAttributes)"+"==l.charAt(0)?(l=l.slice(1),a.setAttribute(l,a.getAttribute(l)+n.elementAttributes["+"+l])):a.setAttribute(l,n.elementAttributes[l]);return a.value=r,t(function(){a.focus({preventScroll:!0}),a.style.height="100%"}),a.addEventListener("blur",function(e){s()}),a.addEventListener("keydown",function(e){switch(e.keyCode){case 13:s();break;case 27:i()}}),a},select:function(e,t,o,i,n){function s(t){var o,i={},s=w.table.getData();return o=t?w.table.columnManager.getColumnByField(t):e.getColumn()._getSelf(),o?(s.forEach(function(e){var t=o.getFieldValue(e);null!==t&&void 0!==t&&""!==t&&(i[t]=!0)}),i=n.sortValuesList?"asc"==n.sortValuesList?Object.keys(i).sort():Object.keys(i).sort().reverse():Object.keys(i)):console.warn("unable to find matching column to create select lookup list:",t),i}function r(t,o){function i(e){var e={label:e.label,value:e.value,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1};return o.indexOf(e.value)>-1&&c(e),n.push(e),s.push(e),e}var n=[],s=[];if("function"==typeof t&&(t=t(e)),Array.isArray(t))t.forEach(function(e){var t;"object"===(void 0===e?"undefined":_typeof(e))?e.options?(t={label:e.label,group:!0,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1},s.push(t),e.options.forEach(function(e){i(e)})):i(e):(t={label:e,value:e,element:!1},o.indexOf(t.value)>-1&&c(t),n.push(t),s.push(t))});else for(var r in t){var l={label:t[r],value:r,element:!1};o.indexOf(l.value)>-1&&c(l),n.push(l),s.push(l)}D=n,S=s,a()}function a(){for(;L.firstChild;)L.removeChild(L.firstChild);S.forEach(function(t){var o=t.element;if(!o){if(o=document.createElement("div"),t.label=n.listItemFormatter?n.listItemFormatter(t.value,t.label,e,o,t.itemParams):t.label,t.group?(o.classList.add("tabulator-edit-select-list-group"),o.tabIndex=0,o.innerHTML=""===t.label?" ":t.label):(o.classList.add("tabulator-edit-select-list-item"),o.tabIndex=0,o.innerHTML=""===t.label?" ":t.label,o.addEventListener("click",function(){T?(h(t),M.focus()):p(t)}),H.indexOf(t)>-1&&o.classList.add("active")),t.elementAttributes&&"object"==_typeof(t.elementAttributes))for(var i in t.elementAttributes)"+"==i.charAt(0)?(i=i.slice(1),o.setAttribute(i,M.getAttribute(i)+t.elementAttributes["+"+i])):o.setAttribute(i,t.elementAttributes[i]);o.addEventListener("mousedown",function(){z=!1,setTimeout(function(){z=!0},10)}),t.element=o}L.appendChild(o)})}function l(e,t){!T&&k&&k.element&&k.element.classList.remove("active"),k&&k.element&&k.element.classList.remove("focused"),k=e,e.element&&(e.element.classList.add("focused"),t&&e.element.classList.add("active"))}function c(e){-1==H.indexOf(e)&&(H.push(e),l(e,!0)),f()}function u(e){var t=H[e];e>-1&&(H.splice(e,1),t.element&&t.element.classList.remove("active"))}function h(e){e||(e=k);var t=H.indexOf(e);t>-1?u(t):(!0!==T&&H.length>=T&&u(0),c(e)),f()}function p(e){v(),e||(e=k),e&&o(e.value)}function m(){v();var e=[];H.forEach(function(t){e.push(t.value)}),o(e)}function f(){var e=[];H.forEach(function(t){e.push(t.label)}),M.value=e.join(", ")}function g(){v(),i()}function b(){if(!L.parentNode){!0===n.values?r(s(),R):"string"==typeof n.values?r(s(n.values),R):r(n.values||[],R);var e=d.prototype.helpers.elOffset(E);L.style.minWidth=E.offsetWidth+"px",L.style.top=e.top+E.offsetHeight+"px",L.style.left=e.left+"px",L.addEventListener("mousedown",function(e){z=!1,setTimeout(function(){z=!0},10)}),document.body.appendChild(L)}}function v(){L.parentNode&&L.parentNode.removeChild(L),y()}function y(){w.table.rowManager.element.removeEventListener("scroll",g)}var w=this,E=e.getElement(),C=e.getValue(),x=n.verticalNavigation||"editor",R=void 0!==C||null===C?C:void 0!==n.defaultValue?n.defaultValue:[],M=document.createElement("input"),L=document.createElement("div"),T=n.multiselect,D=[],k={},S=[],H=[],z=!0;if(this.table.rowManager.element.addEventListener("scroll",g),(Array.isArray(n)||!Array.isArray(n)&&"object"===(void 0===n?"undefined":_typeof(n))&&!n.values)&&(console.warn("DEPRECATION WARNING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object"),n={values:n}),M.setAttribute("type","text"),M.style.padding="4px",M.style.width="100%",M.style.boxSizing="border-box",M.style.cursor="default",M.readOnly=0!=this.currentCell,n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var A in n.elementAttributes)"+"==A.charAt(0)?(A=A.slice(1),M.setAttribute(A,M.getAttribute(A)+n.elementAttributes["+"+A])):M.setAttribute(A,n.elementAttributes[A]);return M.value=void 0!==C||null===C?C:"",M.addEventListener("keydown",function(e){var t;switch(e.keyCode){case 38:t=D.indexOf(k),("editor"==x||"hybrid"==x&&t)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t>0&&l(D[t-1],!T));break;case 40:t=D.indexOf(k),("editor"==x||"hybrid"==x&&t-1||String(t.title).toLowerCase().indexOf(String(e).toLowerCase())>-1)&&s.push(t)}),h(s,t))}function l(e){var t=document.createElement("div");u(),!1!==e&&(t.classList.add("tabulator-edit-select-list-notice"),t.tabIndex=0,e instanceof Node?t.appendChild(e):t.innerHTML=e,L.appendChild(t))}function c(e){var t=[];if(Array.isArray(e))e.forEach(function(e){var o={};"object"===(void 0===e?"undefined":_typeof(e))?(o.title=n.listItemFormatter?n.listItemFormatter(e.value,e.label):e.label,o.value=e.value):(o.title=n.listItemFormatter?n.listItemFormatter(e,e):e,o.value=e),t.push(o)});else for(var o in e){var i={title:n.listItemFormatter?n.listItemFormatter(o,e[o]):e[o],value:o};t.push(i)}return t}function u(){for(;L.firstChild;)L.removeChild(L.firstChild)}function h(e,t){e.length?p(e,t):n.emptyPlaceholder&&l(n.emptyPlaceholder)}function p(e,t){var o=!1;u(),T=e,T.forEach(function(e){var i=e.element;i||(i=document.createElement("div"),i.classList.add("tabulator-edit-select-list-item"),i.tabIndex=0,i.innerHTML=e.title,i.addEventListener("click",function(t){g(e),m()}),i.addEventListener("mousedown",function(e){k=!1,setTimeout(function(){k=!0},10)}),e.element=i,t&&e.value==C&&(M.value=e.title,e.element.classList.add("active"),o=!0),e===D&&(e.element.classList.add("active"),o=!0)),L.appendChild(i)}),o||g(!1)}function m(){b(),D?C!==D.value?(C=D.value,M.value=D.title,o(D.value)):i():n.freetext?(C=M.value,o(M.value)):n.allowEmpty&&""===M.value?(C=M.value,o(M.value)):i()}function f(){if(!L.parentNode){for(;L.firstChild;)L.removeChild(L.firstChild);var e=d.prototype.helpers.elOffset(E);L.style.minWidth=E.offsetWidth+"px",L.style.top=e.top+E.offsetHeight+"px",L.style.left=e.left+"px",document.body.appendChild(L)}}function g(e,t){D&&D.element&&D.element.classList.remove("active"),D=e,e&&e.element&&e.element.classList.add("active")}function b(){L.parentNode&&L.parentNode.removeChild(L),y()}function v(){b(),i()}function y(){w.table.rowManager.element.removeEventListener("scroll",v)}var w=this,E=e.getElement(),C=e.getValue(),x=n.verticalNavigation||"editor",R=void 0!==C||null===C?C:void 0!==n.defaultValue?n.defaultValue:"",M=document.createElement("input"),L=document.createElement("div"),T=[],D=!1,k=!0,S=!1;if(this.table.rowManager.element.addEventListener("scroll",v),M.setAttribute("type","search"),M.style.padding="4px",M.style.width="100%",M.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var H in n.elementAttributes)"+"==H.charAt(0)?(H=H.slice(1),M.setAttribute(H,M.getAttribute(H)+n.elementAttributes["+"+H])):M.setAttribute(H,n.elementAttributes[H]);return L.classList.add("tabulator-edit-select-list"),L.addEventListener("mousedown",function(e){k=!1,setTimeout(function(){k=!0},10)}),M.addEventListener("keydown",function(e){var t;switch(e.keyCode){case 38:t=T.indexOf(D),("editor"==x||"hybrid"==x&&t)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),g(t>0?T[t-1]:!1));break;case 40:t=T.indexOf(D),("editor"==x||"hybrid"==x&&t'):("ie"==a.table.browser?t.setAttribute("class","tabulator-star-inactive"):t.classList.replace("tabulator-star-active","tabulator-star-inactive"),t.innerHTML='')})}function r(e){c=e,s(e)}var a=this,l=e.getElement(),c=e.getValue(),u=l.getElementsByTagName("svg").length||5,d=l.getElementsByTagName("svg")[0]?l.getElementsByTagName("svg")[0].getAttribute("width"):14,h=[],p=document.createElement("div"),m=document.createElementNS("http://www.w3.org/2000/svg","svg");if(l.style.whiteSpace="nowrap",l.style.overflow="hidden",l.style.textOverflow="ellipsis",p.style.verticalAlign="middle",p.style.display="inline-block",p.style.padding="4px",m.setAttribute("width",d),m.setAttribute("height",d),m.setAttribute("viewBox","0 0 512 512"),m.setAttribute("xml:space","preserve"),m.style.padding="0 1px",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var f in n.elementAttributes)"+"==f.charAt(0)?(f=f.slice(1),p.setAttribute(f,p.getAttribute(f)+n.elementAttributes["+"+f])):p.setAttribute(f,n.elementAttributes[f]);for(var g=1;g<=u;g++)!function(e){var t=document.createElement("span"),i=m.cloneNode(!0);h.push(i),t.addEventListener("mouseenter",function(t){t.stopPropagation(),t.stopImmediatePropagation(),s(e)}),t.addEventListener("mousemove",function(e){e.stopPropagation(),e.stopImmediatePropagation()}),t.addEventListener("click",function(t){t.stopPropagation(),t.stopImmediatePropagation(),o(e),l.blur()}),t.appendChild(i),p.appendChild(t)}(g);return c=Math.min(parseInt(c),u),s(c),p.addEventListener("mousemove",function(e){s(0)}),p.addEventListener("click",function(e){o(0)}),l.addEventListener("blur",function(e){i()}),l.addEventListener("keydown",function(e){switch(e.keyCode){case 39:r(c+1);break;case 37:r(c-1);break;case 13:o(c);break;case 27:i()}}),p},progress:function(e,t,o,i,n){function s(){var e=d*Math.round(m.offsetWidth/(l.clientWidth/100))+u;o(e),l.setAttribute("aria-valuenow",e),l.setAttribute("aria-label",h)}var r,a,l=e.getElement(),c=void 0===n.max?l.getElementsByTagName("div")[0].getAttribute("max")||100:n.max,u=void 0===n.min?l.getElementsByTagName("div")[0].getAttribute("min")||0:n.min,d=(c-u)/100,h=e.getValue()||0,p=document.createElement("div"),m=document.createElement("div");if(p.style.position="absolute",p.style.right="0",p.style.top="0",p.style.bottom="0",p.style.width="5px",p.classList.add("tabulator-progress-handle"),m.style.display="inline-block", +m.style.position="relative",m.style.height="100%",m.style.backgroundColor="#488CE9",m.style.maxWidth="100%",m.style.minWidth="0%",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var f in n.elementAttributes)"+"==f.charAt(0)?(f=f.slice(1),m.setAttribute(f,m.getAttribute(f)+n.elementAttributes["+"+f])):m.setAttribute(f,n.elementAttributes[f]);return l.style.padding="4px 4px",h=Math.min(parseFloat(h),c),h=Math.max(parseFloat(h),u),h=Math.round((h-u)/d),m.style.width=h+"%",l.setAttribute("aria-valuemin",u),l.setAttribute("aria-valuemax",c),m.appendChild(p),p.addEventListener("mousedown",function(e){r=e.screenX,a=m.offsetWidth}),p.addEventListener("mouseover",function(){p.style.cursor="ew-resize"}),l.addEventListener("mousemove",function(e){r&&(m.style.width=a+e.screenX-r+"px")}),l.addEventListener("mouseup",function(e){r&&(e.stopPropagation(),e.stopImmediatePropagation(),r=!1,a=!1,s())}),l.addEventListener("keydown",function(e){switch(e.keyCode){case 39:e.preventDefault(),m.style.width=m.clientWidth+l.clientWidth/100+"px";break;case 37:e.preventDefault(),m.style.width=m.clientWidth-l.clientWidth/100+"px";break;case 9:case 13:s();break;case 27:i()}}),l.addEventListener("blur",function(){i()}),m},tickCross:function(e,t,o,i,n){function s(e){return l?e?u?c:a.checked:a.checked&&!u?(a.checked=!1,a.indeterminate=!0,u=!0,c):(u=!1,a.checked):a.checked}var r=e.getValue(),a=document.createElement("input"),l=n.tristate,c=void 0===n.indeterminateValue?null:n.indeterminateValue,u=!1;if(a.setAttribute("type","checkbox"),a.style.marginTop="5px",a.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var d in n.elementAttributes)"+"==d.charAt(0)?(d=d.slice(1),a.setAttribute(d,a.getAttribute(d)+n.elementAttributes["+"+d])):a.setAttribute(d,n.elementAttributes[d]);return a.value=r,!l||void 0!==r&&r!==c&&""!==r||(u=!0,a.indeterminate=!0),"firefox"!=this.table.browser&&t(function(){a.focus({preventScroll:!0})}),a.checked=!0===r||"true"===r||"True"===r||1===r,a.addEventListener("change",function(e){o(s())}),a.addEventListener("blur",function(e){o(s(!0))}),a.addEventListener("keydown",function(e){13==e.keyCode&&o(s()),27==e.keyCode&&i()}),a}},d.prototype.registerModule("edit",E);var C=function(e,t,o,i){this.type=e,this.columns=t,this.component=o||!1,this.indent=i||0},x=function(e,t,o,i,n){this.value=e,this.component=t||!1,this.width=o,this.height=i,this.depth=n},R=function(e){this.table=e,this.config={},this.cloneTableStyle=!0,this.colVisProp=""};R.prototype.generateExportList=function(e,t,o,i){this.cloneTableStyle=t,this.config=e||{},this.colVisProp=i;var n=!1!==this.config.columnHeaders?this.headersToExportRows(this.generateColumnGroupHeaders()):[],s=this.bodyToExportRows(this.rowLookup(o));return n.concat(s)},R.prototype.genereateTable=function(e,t,o,i){var n=this.generateExportList(e,t,o,i);return this.genereateTableElement(n)},R.prototype.rowLookup=function(e){var t=this,o=[];if("function"==typeof e)e.call(this.table).forEach(function(e){(e=t.table.rowManager.findRow(e))&&o.push(e)});else switch(e){case!0:case"visible":o=this.table.rowManager.getVisibleRows(!0);break;case"all":o=this.table.rowManager.rows;break;case"selected":o=this.table.modules.selectRow.selectedRows;break;case"active":default:o=this.table.rowManager.getDisplayRows()}return Object.assign([],o)},R.prototype.generateColumnGroupHeaders=function(){var e=this,t=[];return(!1!==this.config.columnGroups?this.table.columnManager.columns:this.table.columnManager.columnsByIndex).forEach(function(o){var i=e.processColumnGroup(o);i&&t.push(i)}),t},R.prototype.processColumnGroup=function(e){var t=this,o=e.columns,i=0,n=e.definition["title"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))]||e.definition.title,s={title:n,column:e,depth:1};if(o.length){if(s.subGroups=[],s.width=0,o.forEach(function(e){var o=t.processColumnGroup(e);o&&(s.width+=o.width,s.subGroups.push(o),o.depth>i&&(i=o.depth))}),s.depth+=i,!s.width)return!1}else{if(!this.columnVisCheck(e))return!1;s.width=1}return s},R.prototype.columnVisCheck=function(e){return!1!==e.definition[this.colVisProp]&&(e.visible||!e.visible&&e.definition[this.colVisProp])},R.prototype.headersToExportRows=function(e){function t(e,n){var s=i-n;if(void 0===o[n]&&(o[n]=[]),e.height=e.subGroups?1:s-e.depth+1,o[n].push(e),e.height>1)for(var r=1;r1)for(var a=1;ai&&(i=e.depth)}),e.forEach(function(e){t(e,0)}),o.forEach(function(e){var t=[];e.forEach(function(e){e?t.push(new x(e.title,e.column.getComponent(),e.width,e.height,e.depth)):t.push(null)}),n.push(new C("header",t))}),n},R.prototype.bodyToExportRows=function(e){var t=this,o=[],i=[];return this.table.columnManager.columnsByIndex.forEach(function(e){t.columnVisCheck(e)&&o.push(e.getComponent())}),!1!==this.config.columnCalcs&&this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&e.unshift(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&e.push(this.table.modules.columnCalcs.botRow)),e=e.filter(function(e){switch(e.type){case"group":return!1!==t.config.rowGroups;case"calc":return!1!==t.config.columnCalcs;case"row":return!(t.table.options.dataTree&&!1===t.config.dataTree&&e.modules.dataTree.parent)}return!0}),e.forEach(function(e,n){var s=e.getData(t.colVisProp),r=[],a=0;switch(e.type){case"group":a=e.level,r.push(new x(e.key,e.getComponent(),o.length,1));break;case"calc":case"row":o.forEach(function(e){r.push(new x(e._column.getFieldValue(s),e,1,1))}),t.table.options.dataTree&&!1!==t.config.dataTree&&(a=e.modules.dataTree.index)}i.push(new C(e.type,r,e.getComponent(),a))}),i},R.prototype.genereateTableElement=function(e){var t=this,o=document.createElement("table"),i=document.createElement("thead"),n=document.createElement("tbody"),s=this.lookupTableStyles(),r=this.table.options["rowFormatter"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))],a={};return a.rowFormatter=null!==r?r:this.table.options.rowFormatter,this.table.options.dataTree&&!1!==this.config.dataTree&&this.table.modExists("columnCalcs")&&(a.treeElementField=this.table.modules.dataTree.elementField),a.groupHeader=this.table.options["groupHeader"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))],a.groupHeader&&!Array.isArray(a.groupHeader)&&(a.groupHeader=[a.groupHeader]),o.classList.add("tabulator-print-table"),this.mapElementStyles(this.table.columnManager.getHeadersElement(),i,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),e.length>1e3&&console.warn("It may take a long time to render an HTML table with more than 1000 rows"),e.forEach(function(e,o){switch(e.type){case"header":i.appendChild(t.genereateHeaderElement(e,a,s));break;case"group":n.appendChild(t.genereateGroupElement(e,a,s));break;case"calc":n.appendChild(t.genereateCalcElement(e,a,s));break;case"row":var r=t.genereateRowElement(e,a,s);t.mapElementStyles(o%2&&s.evenRow?s.evenRow:s.oddRow,r,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),n.appendChild(r)}}),i.innerHTML&&o.appendChild(i),o.appendChild(n),this.mapElementStyles(this.table.element,o,["border-top","border-left","border-right","border-bottom"]),o},R.prototype.lookupTableStyles=function(){var e={};return this.cloneTableStyle&&window.getComputedStyle&&(e.oddRow=this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"),e.evenRow=this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"),e.calcRow=this.table.element.querySelector(".tabulator-row.tabulator-calcs"),e.firstRow=this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"),e.firstGroup=this.table.element.getElementsByClassName("tabulator-group")[0],e.firstRow&&(e.styleCells=e.firstRow.getElementsByClassName("tabulator-cell"),e.firstCell=e.styleCells[0],e.lastCell=e.styleCells[e.styleCells.length-1])),e},R.prototype.genereateHeaderElement=function(e,t,o){var i=this,n=document.createElement("tr");return e.columns.forEach(function(e){if(e){var t=document.createElement("th"),o=e.component._column.definition.cssClass?e.component._column.definition.cssClass.split(" "):[];t.colSpan=e.width,t.rowSpan=e.height,t.innerHTML=e.value,i.cloneTableStyle&&(t.style.boxSizing="border-box"),o.forEach(function(e){t.classList.add(e)}),i.mapElementStyles(e.component.getElement(),t,["text-align","border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),i.mapElementStyles(e.component._column.contentElement,t,["padding-top","padding-left","padding-right","padding-bottom"]),e.component._column.visible?i.mapElementStyles(e.component.getElement(),t,["width"]):e.component._column.definition.width&&(t.style.width=e.component._column.definition.width+"px"),e.component._column.parent&&i.mapElementStyles(e.component._column.parent.groupElement,t,["border-top"]),n.appendChild(t)}}),n},R.prototype.genereateGroupElement=function(e,t,o){var i=document.createElement("tr"),n=document.createElement("td"),s=e.columns[0];return i.classList.add("tabulator-print-table-row"),t.groupHeader&&t.groupHeader[e.indent]?s.value=t.groupHeader[e.indent](s.value,e.component._group.getRowCount(),e.component._group.getData(),e.component):!1===t.groupHeader?s.value=s.value:s.value=e.component._group.generator(s.value,e.component._group.getRowCount(),e.component._group.getData(),e.component),n.colSpan=s.width,n.innerHTML=s.value,i.classList.add("tabulator-print-table-group"),i.classList.add("tabulator-group-level-"+e.indent),s.component.getVisibility()&&i.classList.add("tabulator-group-visible"),this.mapElementStyles(o.firstGroup,i,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),this.mapElementStyles(o.firstGroup,n,["padding-top","padding-left","padding-right","padding-bottom"]),i.appendChild(n),i},R.prototype.genereateCalcElement=function(e,t,o){var i=this.genereateRowElement(e,t,o);return i.classList.add("tabulator-print-table-calcs"),this.mapElementStyles(o.calcRow,i,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),i},R.prototype.genereateRowElement=function(e,t,o){var n=this,s=document.createElement("tr");return s.classList.add("tabulator-print-table-row"),e.columns.forEach(function(r){if(r){var a=document.createElement("td"),l=r.component._column,c=r.value,u={modules:{},getValue:function(){return c},getField:function(){return l.definition.field},getElement:function(){return a},getColumn:function(){return l.getComponent()},getData:function(){return rowData},getRow:function(){return e.getComponent()},getComponent:function(){return u},column:l};if((l.definition.cssClass?l.definition.cssClass.split(" "):[]).forEach(function(e){a.classList.add(e)}),n.table.modExists("format")&&!1!==n.config.formatCells)c=n.table.modules.format.formatExportValue(u,n.colVisProp);else switch(void 0===c?"undefined":_typeof(c)){case"object":c=JSON.stringify(c);break;case"undefined":case"null":c="";break;default:c=c}if(c instanceof Node?a.appendChild(c):a.innerHTML=c,o.firstCell&&(n.mapElementStyles(o.firstCell,a,["padding-top","padding-left","padding-right","padding-bottom","border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size"]),l.definition.align&&(a.style.textAlign=l.definition.align)),n.table.options.dataTree&&!1!==n.config.dataTree&&(t.treeElementField&&t.treeElementField==l.field||!t.treeElementField&&0==i)&&(e.component._row.modules.dataTree.controlEl&&a.insertBefore(e.component._row.modules.dataTree.controlEl.cloneNode(!0),a.firstChild),e.component._row.modules.dataTree.branchEl&&a.insertBefore(e.component._row.modules.dataTree.branchEl.cloneNode(!0),a.firstChild)),s.appendChild(a),u.modules.format&&u.modules.format.renderedCallback&&u.modules.format.renderedCallback(),t.rowFormatter&&!1!==n.config.formatCells){var d=e.getComponent();d.getElement=function(){return s},t.rowFormatter(d)}}}),s},R.prototype.genereateHTMLTable=function(e){var t=document.createElement("div");return t.appendChild(this.genereateTableElement(e)),t.innerHTML},R.prototype.getHtml=function(e,t,o,i){var n=this.generateExportList(o||this.table.options.htmlOutputConfig,t,e,i||"htmlOutput");return this.genereateHTMLTable(n)},R.prototype.mapElementStyles=function(e,t,o){if(this.cloneTableStyle&&e&&t){var i={"background-color":"backgroundColor",color:"fontColor",width:"width","font-weight":"fontWeight","font-family":"fontFamily","font-size":"fontSize","text-align":"textAlign","border-top":"borderTop","border-left":"borderLeft","border-right":"borderRight","border-bottom":"borderBottom","padding-top":"paddingTop","padding-left":"paddingLeft","padding-right":"paddingRight","padding-bottom":"paddingBottom"};if(window.getComputedStyle){var n=window.getComputedStyle(e);o.forEach(function(e){t.style[i[e]]=n.getPropertyValue(e)})}}},d.prototype.registerModule("export",R);var M=function(e){this.table=e,this.filterList=[],this.headerFilters={},this.headerFilterColumns=[],this.prevHeaderFilterChangeCheck="",this.prevHeaderFilterChangeCheck="{}",this.changed=!1};M.prototype.initializeColumn=function(e,t){function o(t){var o,r="input"==e.modules.filter.tagType&&"text"==e.modules.filter.attrType||"textarea"==e.modules.filter.tagType?"partial":"match",a="",l="";if(void 0===e.modules.filter.prevSuccess||e.modules.filter.prevSuccess!==t){if(e.modules.filter.prevSuccess=t,e.modules.filter.emptyFunc(t))delete n.headerFilters[s];else{switch(e.modules.filter.value=t,_typeof(e.definition.headerFilterFunc)){case"string":n.filters[e.definition.headerFilterFunc]?(a=e.definition.headerFilterFunc,o=function(o){var i=e.definition.headerFilterFuncParams||{},s=e.getFieldValue(o);return i="function"==typeof i?i(t,s,o):i,n.filters[e.definition.headerFilterFunc](t,s,o,i)}):console.warn("Header Filter Error - Matching filter function not found: ",e.definition.headerFilterFunc);break;case"function":o=function(o){var i=e.definition.headerFilterFuncParams||{},n=e.getFieldValue(o);return i="function"==typeof i?i(t,n,o):i,e.definition.headerFilterFunc(t,n,o,i)},a=o}if(!o)switch(r){case"partial":o=function(o){var i=e.getFieldValue(o);return void 0!==i&&null!==i&&String(i).toLowerCase().indexOf(String(t).toLowerCase())>-1},a="like";break;default:o=function(o){return e.getFieldValue(o)==t},a="="}n.headerFilters[s]={value:t,func:o,type:a,params:i||{}}}l=JSON.stringify(n.headerFilters),n.prevHeaderFilterChangeCheck!==l&&(n.prevHeaderFilterChangeCheck=l,n.changed=!0,n.table.rowManager.filterRefresh())}return!0}var i,n=this,s=e.getField();e.modules.filter={success:o,attrType:!1,tagType:!1,emptyFunc:!1},this.generateHeaderFilterElement(e)},M.prototype.generateHeaderFilterElement=function(e,t,o){function i(){}var n,s,r,a,l,c,u,d=this,h=this,p=e.modules.filter.success,m=e.getField();if(e.modules.filter.headerElement&&e.modules.filter.headerElement.parentNode&&e.contentElement.removeChild(e.modules.filter.headerElement.parentNode),m){switch(e.modules.filter.emptyFunc=e.definition.headerFilterEmptyCheck||function(e){return!e&&"0"!==e},n=document.createElement("div"),n.classList.add("tabulator-header-filter"),_typeof(e.definition.headerFilter)){case"string":h.table.modules.edit.editors[e.definition.headerFilter]?(s=h.table.modules.edit.editors[e.definition.headerFilter],"tick"!==e.definition.headerFilter&&"tickCross"!==e.definition.headerFilter||e.definition.headerFilterEmptyCheck||(e.modules.filter.emptyFunc=function(e){return!0!==e&&!1!==e})):console.warn("Filter Error - Cannot build header filter, No such editor found: ",e.definition.editor);break;case"function":s=e.definition.headerFilter;break;case"boolean":e.modules.edit&&e.modules.edit.editor?s=e.modules.edit.editor:e.definition.formatter&&h.table.modules.edit.editors[e.definition.formatter]?(s=h.table.modules.edit.editors[e.definition.formatter],"tick"!==e.definition.formatter&&"tickCross"!==e.definition.formatter||e.definition.headerFilterEmptyCheck||(e.modules.filter.emptyFunc=function(e){return!0!==e&&!1!==e})):s=h.table.modules.edit.editors.input}if(s){if(a={getValue:function(){return void 0!==t?t:""},getField:function(){return e.definition.field},getElement:function(){return n},getColumn:function(){return e.getComponent()},getRow:function(){return{normalizeHeight:function(){}}}},u=e.definition.headerFilterParams||{},u="function"==typeof u?u.call(h.table):u,!(r=s.call(this.table.modules.edit,a,function(){},p,i,u)))return void console.warn("Filter Error - Cannot add filter to "+m+" column, editor returned a value of false");if(!(r instanceof Node))return void console.warn("Filter Error - Cannot add filter to "+m+" column, editor should return an instance of Node, the editor returned:",r);m?h.table.modules.localize.bind("headerFilters|columns|"+e.definition.field,function(e){r.setAttribute("placeholder",void 0!==e&&e?e:h.table.modules.localize.getText("headerFilters|default"))}):h.table.modules.localize.bind("headerFilters|default",function(e){r.setAttribute("placeholder",void 0!==h.column.definition.headerFilterPlaceholder&&h.column.definition.headerFilterPlaceholder?h.column.definition.headerFilterPlaceholder:e)}),r.addEventListener("click",function(e){e.stopPropagation(),r.focus()}),r.addEventListener("focus",function(e){var t=d.table.columnManager.element.scrollLeft;t!==d.table.rowManager.element.scrollLeft&&(d.table.rowManager.scrollHorizontal(t),d.table.columnManager.scrollHorizontal(t))}),l=!1,c=function(e){l&&clearTimeout(l),l=setTimeout(function(){p(r.value)},h.table.options.headerFilterLiveFilterDelay)},e.modules.filter.headerElement=r,e.modules.filter.attrType=r.hasAttribute("type")?r.getAttribute("type").toLowerCase():"",e.modules.filter.tagType=r.tagName.toLowerCase(),!1!==e.definition.headerFilterLiveFilter&&("autocomplete"!==e.definition.headerFilter&&"tickCross"!==e.definition.headerFilter&&("autocomplete"!==e.definition.editor&&"tickCross"!==e.definition.editor||!0!==e.definition.headerFilter)&&(r.addEventListener("keyup",c),r.addEventListener("search",c),"number"==e.modules.filter.attrType&&r.addEventListener("change",function(e){p(r.value)}),"text"==e.modules.filter.attrType&&"ie"!==this.table.browser&&r.setAttribute("type","search")),"input"!=e.modules.filter.tagType&&"select"!=e.modules.filter.tagType&&"textarea"!=e.modules.filter.tagType||r.addEventListener("mousedown",function(e){e.stopPropagation()})),n.appendChild(r),e.contentElement.appendChild(n),o||h.headerFilterColumns.push(e)}}else console.warn("Filter Error - Cannot add header filter, column has no field set:",e.definition.title)},M.prototype.hideHeaderFilterElements=function(){this.headerFilterColumns.forEach(function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="none")})},M.prototype.showHeaderFilterElements=function(){this.headerFilterColumns.forEach(function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="")})},M.prototype.setHeaderFilterFocus=function(e){e.modules.filter&&e.modules.filter.headerElement?e.modules.filter.headerElement.focus():console.warn("Column Filter Focus Error - No header filter set on column:",e.getField())},M.prototype.getHeaderFilterValue=function(e){if(e.modules.filter&&e.modules.filter.headerElement)return e.modules.filter.headerElement.value;console.warn("Column Filter Error - No header filter set on column:",e.getField())},M.prototype.setHeaderFilterValue=function(e,t){e&&(e.modules.filter&&e.modules.filter.headerElement?(this.generateHeaderFilterElement(e,t,!0),e.modules.filter.success(t)):console.warn("Column Filter Error - No header filter set on column:",e.getField()))},M.prototype.reloadHeaderFilter=function(e){e&&(e.modules.filter&&e.modules.filter.headerElement?this.generateHeaderFilterElement(e,e.modules.filter.value,!0):console.warn("Column Filter Error - No header filter set on column:",e.getField()))},M.prototype.hasChanged=function(){var e=this.changed;return this.changed=!1,e},M.prototype.setFilter=function(e,t,o,i){var n=this;n.filterList=[],Array.isArray(e)||(e=[{field:e,type:t,value:o,params:i}]),n.addFilter(e)},M.prototype.addFilter=function(e,t,o,i){var n=this;Array.isArray(e)||(e=[{field:e,type:t,value:o,params:i}]),e.forEach(function(e){(e=n.findFilter(e))&&(n.filterList.push(e),n.changed=!0)}),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},M.prototype.findFilter=function(e){var t,o=this;if(Array.isArray(e))return this.findSubFilters(e);var i=!1;return"function"==typeof e.field?i=function(t){return e.field(t,e.type||{})}:o.filters[e.type]?(t=o.table.columnManager.getColumnByField(e.field),i=t?function(i){return o.filters[e.type](e.value,t.getFieldValue(i),i,e.params||{})}:function(t){return o.filters[e.type](e.value,t[e.field],t,e.params||{})}):console.warn("Filter Error - No such filter type found, ignoring: ",e.type),e.func=i,!!e.func&&e},M.prototype.findSubFilters=function(e){var t=this,o=[];return e.forEach(function(e){(e=t.findFilter(e))&&o.push(e)}),!!o.length&&o},M.prototype.getFilters=function(e,t){var o=[];return e&&(o=this.getHeaderFilters()),t&&o.forEach(function(e){"function"==typeof e.type&&(e.type="function")}),o=o.concat(this.filtersToArray(this.filterList,t))},M.prototype.filtersToArray=function(e,t){var o=this,i=[];return e.forEach(function(e){var n;Array.isArray(e)?i.push(o.filtersToArray(e,t)):(n={field:e.field,type:e.type,value:e.value},t&&"function"==typeof n.type&&(n.type="function"),i.push(n))}),i},M.prototype.getHeaderFilters=function(){var e=[];for(var t in this.headerFilters)e.push({field:t,type:this.headerFilters[t].type,value:this.headerFilters[t].value});return e},M.prototype.removeFilter=function(e,t,o){var i=this;Array.isArray(e)||(e=[{field:e,type:t,value:o}]),e.forEach(function(e){var t=-1;t="object"==_typeof(e.field)?i.filterList.findIndex(function(t){return e===t}):i.filterList.findIndex(function(t){return e.field===t.field&&e.type===t.type&&e.value===t.value}),t>-1?(i.filterList.splice(t,1),i.changed=!0):console.warn("Filter Error - No matching filter type found, ignoring: ",e.type)}),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},M.prototype.clearFilter=function(e){this.filterList=[],e&&this.clearHeaderFilter(),this.changed=!0,this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},M.prototype.clearHeaderFilter=function(){var e=this;this.headerFilters={},e.prevHeaderFilterChangeCheck="{}",this.headerFilterColumns.forEach(function(t){t.modules.filter.value=null,t.modules.filter.prevSuccess=void 0,e.reloadHeaderFilter(t)}),this.changed=!0},M.prototype.search=function(e,t,o,i){var n=this,s=[],r=[];return Array.isArray(t)||(t=[{field:t,type:o,value:i}]),t.forEach(function(e){(e=n.findFilter(e))&&r.push(e)}),this.table.rowManager.rows.forEach(function(t){var o=!0;r.forEach(function(e){n.filterRecurse(e,t.getData())||(o=!1)}),o&&s.push("data"===e?t.getData("data"):t.getComponent())}),s},M.prototype.filter=function(e,t){var o=this,i=[],n=[];return o.table.options.dataFiltering&&o.table.options.dataFiltering.call(o.table,o.getFilters()),o.table.options.ajaxFiltering||!o.filterList.length&&!Object.keys(o.headerFilters).length?i=e.slice(0):e.forEach(function(e){o.filterRow(e)&&i.push(e)}),o.table.options.dataFiltered&&(i.forEach(function(e){n.push(e.getComponent())}),o.table.options.dataFiltered.call(o.table,o.getFilters(),n)),i},M.prototype.filterRow=function(e,t){var o=this,i=!0,n=e.getData();o.filterList.forEach(function(e){o.filterRecurse(e,n)||(i=!1)});for(var s in o.headerFilters)o.headerFilters[s].func(n)||(i=!1);return i},M.prototype.filterRecurse=function(e,t){var o=this,i=!1;return Array.isArray(e)?e.forEach(function(e){o.filterRecurse(e,t)&&(i=!0)}):i=e.func(t),i},M.prototype.filters={"=":function(e,t,o,i){return t==e},"<":function(e,t,o,i){return t":function(e,t,o,i){return t>e},">=":function(e,t,o,i){return t>=e},"!=":function(e,t,o,i){return t!=e},regex:function(e,t,o,i){return"string"==typeof e&&(e=new RegExp(e)),e.test(t)},like:function(e,t,o,i){return null===e||void 0===e?t===e:void 0!==t&&null!==t&&String(t).toLowerCase().indexOf(e.toLowerCase())>-1},keywords:function(e,t,o,i){var n=e.toLowerCase().split(void 0===i.separator?" ":i.separator),s=String(null===t||void 0===t?"":t).toLowerCase(),r=[];return n.forEach(function(e){s.includes(e)&&r.push(!0)}),i.matchAll?r.length===n.length:!!r.length},starts:function(e,t,o,i){return null===e||void 0===e?t===e:void 0!==t&&null!==t&&String(t).toLowerCase().startsWith(e.toLowerCase())},ends:function(e,t,o,i){return null===e||void 0===e?t===e:void 0!==t&&null!==t&&String(t).toLowerCase().endsWith(e.toLowerCase())},in:function(e,t,o,i){return Array.isArray(e)?e.indexOf(t)>-1:(console.warn("Filter Error - filter value is not an array:",e),!1)}},d.prototype.registerModule("filter",M);var L=function(e){this.table=e};L.prototype.initializeColumn=function(e){e.modules.format=this.lookupFormatter(e,""),void 0!==e.definition.formatterPrint&&(e.modules.format.print=this.lookupFormatter(e,"Print")),void 0!==e.definition.formatterClipboard&&(e.modules.format.clipboard=this.lookupFormatter(e,"Clipboard")),void 0!==e.definition.formatterHtmlOutput&&(e.modules.format.htmlOutput=this.lookupFormatter(e,"HtmlOutput"))},L.prototype.lookupFormatter=function(e,t){var o={params:e.definition["formatter"+t+"Params"]||{}},i=e.definition["formatter"+t];switch(void 0===i?"undefined":_typeof(i)){case"string":"tick"===i&&(i="tickCross",void 0===o.params.crossElement&&(o.params.crossElement=!1),console.warn("DEPRECATION WARNING - the tick formatter has been deprecated, please use the tickCross formatter with the crossElement param set to false")),this.formatters[i]?o.formatter=this.formatters[i]:(console.warn("Formatter Error - No such formatter found: ",i),o.formatter=this.formatters.plaintext);break;case"function":o.formatter=i;break;default:o.formatter=this.formatters.plaintext}return o},L.prototype.cellRendered=function(e){e.modules.format&&e.modules.format.renderedCallback&&e.modules.format.renderedCallback()},L.prototype.formatValue=function(e){function t(t){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=t}var o=e.getComponent(),i="function"==typeof e.column.modules.format.params?e.column.modules.format.params(o):e.column.modules.format.params;return e.column.modules.format.formatter.call(this,o,i,t)},L.prototype.formatExportValue=function(e,t){var o,i=e.column.modules.format[t];if(i){var n=function(t){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=t};return o="function"==typeof i.params?i.params(component):i.params,i.formatter.call(this,e.getComponent(),o,n)}return this.formatValue(e)},L.prototype.sanitizeHTML=function(e){if(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(e).replace(/[&<>"'`=\/]/g,function(e){return t[e]})}return e},L.prototype.emptyToSpace=function(e){return null===e||void 0===e||""===e?" ":e},L.prototype.getFormatter=function(e){var e;switch(void 0===e?"undefined":_typeof(e)){case"string":this.formatters[e]?e=this.formatters[e]:(console.warn("Formatter Error - No such formatter found: ",e),e=this.formatters.plaintext);break;case"function":e=e;break;default:e=this.formatters.plaintext}return e},L.prototype.formatters={plaintext:function(e,t,o){return this.emptyToSpace(this.sanitizeHTML(e.getValue()))},html:function(e,t,o){return e.getValue()},textarea:function(e,t,o){return e.getElement().style.whiteSpace="pre-wrap",this.emptyToSpace(this.sanitizeHTML(e.getValue()))},money:function(e,t,o){var i,n,s,r,a=parseFloat(e.getValue()),l=t.decimal||".",c=t.thousand||",",u=t.symbol||"",d=!!t.symbolAfter,h=void 0!==t.precision?t.precision:2;if(isNaN(a))return this.emptyToSpace(this.sanitizeHTML(e.getValue()));for(i=!1!==h?a.toFixed(h):a,i=String(i).split("."),n=i[0],s=i.length>1?l+i[1]:"",r=/(\d+)(\d{3})/;r.test(n);)n=n.replace(r,"$1"+c+"$2");return d?n+s+u:u+n+s},link:function(e,t,o){var i,n=e.getValue(),s=t.urlPrefix||"",r=t.download,a=n,l=document.createElement("a");if(t.labelField&&(i=e.getData(),a=i[t.labelField]),t.label)switch(_typeof(t.label)){case"string":a=t.label;break;case"function":a=t.label(e)}if(a){if(t.urlField&&(i=e.getData(),n=i[t.urlField]),t.url)switch(_typeof(t.url)){case"string":n=t.url;break;case"function":n=t.url(e)}return l.setAttribute("href",s+n),t.target&&l.setAttribute("target",t.target),t.download&&(r="function"==typeof r?r(e):!0===r?"":r,l.setAttribute("download",r)),l.innerHTML=this.emptyToSpace(this.sanitizeHTML(a)),l}return" "},image:function(e,t,o){var i=document.createElement("img");switch(i.setAttribute("src",e.getValue()),_typeof(t.height)){case"number":i.style.height=t.height+"px";break;case"string":i.style.height=t.height}switch(_typeof(t.width)){case"number":i.style.width=t.width+"px";break;case"string":i.style.width=t.width}return i.addEventListener("load",function(){e.getRow().normalizeHeight()}),i},tickCross:function(e,t,o){var i=e.getValue(),n=e.getElement(),s=t.allowEmpty,r=t.allowTruthy,a=void 0!==t.tickElement?t.tickElement:'',l=void 0!==t.crossElement?t.crossElement:'';return r&&i||!0===i||"true"===i||"True"===i||1===i||"1"===i?(n.setAttribute("aria-checked",!0),a||""):!s||"null"!==i&&""!==i&&null!==i&&void 0!==i?(n.setAttribute("aria-checked",!1),l||""):(n.setAttribute("aria-checked","mixed"),"")},datetime:function(e,t,o){var i=t.inputFormat||"YYYY-MM-DD hh:mm:ss",n=t.outputFormat||"DD/MM/YYYY hh:mm:ss",s=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",r=e.getValue(),a=moment(r,i);return a.isValid()?t.timezone?a.tz(t.timezone).format(n):a.format(n):!0===s?r:"function"==typeof s?s(r):s},datetimediff:function(e,t,o){ +var i=t.inputFormat||"YYYY-MM-DD hh:mm:ss",n=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",s=void 0!==t.suffix&&t.suffix,r=void 0!==t.unit?t.unit:void 0,a=void 0!==t.humanize&&t.humanize,l=void 0!==t.date?t.date:moment(),c=e.getValue(),u=moment(c,i);return u.isValid()?a?moment.duration(u.diff(l)).humanize(s):u.diff(l,r)+(s?" "+s:""):!0===n?c:"function"==typeof n?n(c):n},lookup:function(e,t,o){var i=e.getValue();return void 0===t[i]?(console.warn("Missing display value for "+i),i):t[i]},star:function(e,t,o){var i=e.getValue(),n=e.getElement(),s=t&&t.stars?t.stars:5,r=document.createElement("span"),a=document.createElementNS("http://www.w3.org/2000/svg","svg");r.style.verticalAlign="middle",a.setAttribute("width","14"),a.setAttribute("height","14"),a.setAttribute("viewBox","0 0 512 512"),a.setAttribute("xml:space","preserve"),a.style.padding="0 1px",i=i&&!isNaN(i)?parseInt(i):0,i=Math.max(0,Math.min(i,s));for(var l=1;l<=s;l++){var c=a.cloneNode(!0);c.innerHTML=l<=i?'':'',r.appendChild(c)}return n.style.whiteSpace="nowrap",n.style.overflow="hidden",n.style.textOverflow="ellipsis",n.setAttribute("aria-label",i),r},traffic:function(e,t,o){var i,n,s=this.sanitizeHTML(e.getValue())||0,r=document.createElement("span"),a=t&&t.max?t.max:100,l=t&&t.min?t.min:0,c=t&&void 0!==t.color?t.color:["red","orange","green"],u="#666666";if(!isNaN(s)&&void 0!==e.getValue()){switch(r.classList.add("tabulator-traffic-light"),n=parseFloat(s)<=a?parseFloat(s):a,n=parseFloat(n)>=l?parseFloat(n):l,i=(a-l)/100,n=Math.round((n-l)/i),void 0===c?"undefined":_typeof(c)){case"string":u=c;break;case"function":u=c(s);break;case"object":if(Array.isArray(c)){var d=100/c.length,h=Math.floor(n/d);h=Math.min(h,c.length-1),h=Math.max(h,0),u=c[h];break}}return r.style.backgroundColor=u,r}},progress:function(e,t,o){var i,n,s,r,a,c=this.sanitizeHTML(e.getValue())||0,u=e.getElement(),d=t&&t.max?t.max:100,h=t&&t.min?t.min:0,p=t&&t.legendAlign?t.legendAlign:"center";switch(n=parseFloat(c)<=d?parseFloat(c):d,n=parseFloat(n)>=h?parseFloat(n):h,i=(d-h)/100,n=Math.round((n-h)/i),_typeof(t.color)){case"string":s=t.color;break;case"function":s=t.color(c);break;case"object":if(Array.isArray(t.color)){var m=100/t.color.length,f=Math.floor(n/m);f=Math.min(f,t.color.length-1),f=Math.max(f,0),s=t.color[f];break}default:s="#2DC214"}switch(_typeof(t.legend)){case"string":r=t.legend;break;case"function":r=t.legend(c);break;case"boolean":r=c;break;default:r=!1}switch(_typeof(t.legendColor)){case"string":a=t.legendColor;break;case"function":a=t.legendColor(c);break;case"object":if(Array.isArray(t.legendColor)){var m=100/t.legendColor.length,f=Math.floor(n/m);f=Math.min(f,t.legendColor.length-1),f=Math.max(f,0),a=t.legendColor[f]}break;default:a="#000"}u.style.minWidth="30px",u.style.position="relative",u.setAttribute("aria-label",n);var g=document.createElement("div");if(g.style.display="inline-block",g.style.position="relative",g.style.width=n+"%",g.style.backgroundColor=s,g.style.height="100%",g.setAttribute("data-max",d),g.setAttribute("data-min",h),r){var b=document.createElement("div");b.style.position="absolute",b.style.top="4px",b.style.left=0,b.style.textAlign=p,b.style.width="100%",b.style.color=a,b.innerHTML=r}return o(function(){if(!(e instanceof l)){var t=document.createElement("div");t.style.position="absolute",t.style.top="4px",t.style.bottom="4px",t.style.left="4px",t.style.right="4px",u.appendChild(t),u=t}u.appendChild(g),r&&u.appendChild(b)}),""},color:function(e,t,o){return e.getElement().style.backgroundColor=this.sanitizeHTML(e.getValue()),""},buttonTick:function(e,t,o){return''},buttonCross:function(e,t,o){return''},rownum:function(e,t,o){return this.table.rowManager.activeRows.indexOf(e.getRow()._getSelf())+1},handle:function(e,t,o){return e.getElement().classList.add("tabulator-row-handle"),"
"},responsiveCollapse:function(e,t,o){function i(e){var t=s.element;s.open=e,t&&(s.open?(n.classList.add("open"),t.style.display=""):(n.classList.remove("open"),t.style.display="none"))}var n=document.createElement("div"),s=e.getRow()._row.modules.responsiveLayout;return n.classList.add("tabulator-responsive-collapse-toggle"),n.innerHTML="+-",e.getElement().classList.add("tabulator-row-handle"),n.addEventListener("click",function(e){e.stopImmediatePropagation(),i(!s.open)}),i(s.open),n},rowSelection:function(e){var t=this,o=document.createElement("input");if(o.type="checkbox",this.table.modExists("selectRow",!0))if(o.addEventListener("click",function(e){e.stopPropagation()}),"function"==typeof e.getRow){var i=e.getRow();o.addEventListener("change",function(e){i.toggleSelect()}),o.checked=i.isSelected(),this.table.modules.selectRow.registerRowSelectCheckbox(i,o)}else o.addEventListener("change",function(e){t.table.modules.selectRow.selectedRows.length?t.table.deselectRow():t.table.selectRow()}),this.table.modules.selectRow.registerHeaderSelectCheckbox(o);return o}},d.prototype.registerModule("format",L);var T=function(e){this.table=e,this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.rightPadding=0,this.initializationMode="left",this.active=!1,this.scrollEndTimer=!1};T.prototype.reset=function(){this.initializationMode="left",this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.rightMargin=0,this.active=!1,this.table.columnManager.headersElement.style.marginLeft=0,this.table.columnManager.element.style.paddingRight=0},T.prototype.initializeColumn=function(e){var t={margin:0,edge:!1};e.isGroup||(this.frozenCheck(e)?(t.position=this.initializationMode,"left"==this.initializationMode?this.leftColumns.push(e):this.rightColumns.unshift(e),this.active=!0,e.modules.frozen=t):this.initializationMode="right")},T.prototype.frozenCheck=function(e){return e.parent.isGroup&&e.definition.frozen&&console.warn("Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups"),e.parent.isGroup?this.frozenCheck(e.parent):e.definition.frozen},T.prototype.scrollHorizontal=function(){var e,t=this;this.active&&(clearTimeout(this.scrollEndTimer),this.scrollEndTimer=setTimeout(function(){t.layout()},100),e=this.table.rowManager.getVisibleRows(),this.calcMargins(),this.layoutColumnPosition(),this.layoutCalcRows(),e.forEach(function(e){"row"===e.type&&t.layoutRow(e)}),this.table.rowManager.tableElement.style.marginRight=this.rightMargin)},T.prototype.calcMargins=function(){this.leftMargin=this._calcSpace(this.leftColumns,this.leftColumns.length)+"px",this.table.columnManager.headersElement.style.marginLeft=this.leftMargin,this.rightMargin=this._calcSpace(this.rightColumns,this.rightColumns.length)+"px",this.table.columnManager.element.style.paddingRight=this.rightMargin,this.rightPadding=this.table.rowManager.element.clientWidth+this.table.columnManager.scrollLeft},T.prototype.layoutCalcRows=function(){this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&this.table.modules.columnCalcs.topRow&&this.layoutRow(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&this.table.modules.columnCalcs.botRow&&this.layoutRow(this.table.modules.columnCalcs.botRow))},T.prototype.layoutColumnPosition=function(e){var t=this,o=[];this.leftColumns.forEach(function(i,n){if(i.modules.frozen.margin=t._calcSpace(t.leftColumns,n)+t.table.columnManager.scrollLeft+"px",n==t.leftColumns.length-1?i.modules.frozen.edge=!0:i.modules.frozen.edge=!1,i.parent.isGroup){var s=t.getColGroupParentElement(i);o.includes(s)||(t.layoutElement(s,i),o.push(s)),i.modules.frozen.edge&&s.classList.add("tabulator-frozen-"+i.modules.frozen.position)}else t.layoutElement(i.getElement(),i);e&&i.cells.forEach(function(e){t.layoutElement(e.getElement(),i)})}),this.rightColumns.forEach(function(o,i){o.modules.frozen.margin=t.rightPadding-t._calcSpace(t.rightColumns,i+1)+"px",i==t.rightColumns.length-1?o.modules.frozen.edge=!0:o.modules.frozen.edge=!1,o.parent.isGroup?t.layoutElement(t.getColGroupParentElement(o),o):t.layoutElement(o.getElement(),o),e&&o.cells.forEach(function(e){t.layoutElement(e.getElement(),o)})})},T.prototype.getColGroupParentElement=function(e){return e.parent.isGroup?this.getColGroupParentElement(e.parent):e.getElement()},T.prototype.layout=function(){var e=this;e.active&&(this.calcMargins(),e.table.rowManager.getDisplayRows().forEach(function(t){"row"===t.type&&e.layoutRow(t)}),this.layoutCalcRows(),this.layoutColumnPosition(!0),this.table.rowManager.tableElement.style.marginRight=this.rightMargin)},T.prototype.layoutRow=function(e){var t=this;e.getElement().style.paddingLeft=this.leftMargin,this.leftColumns.forEach(function(o){var i=e.getCell(o);i&&t.layoutElement(i.getElement(),o)}),this.rightColumns.forEach(function(o){var i=e.getCell(o);i&&t.layoutElement(i.getElement(),o)})},T.prototype.layoutElement=function(e,t){t.modules.frozen&&(e.style.position="absolute",e.style.left=t.modules.frozen.margin,e.classList.add("tabulator-frozen"),t.modules.frozen.edge&&e.classList.add("tabulator-frozen-"+t.modules.frozen.position))},T.prototype._calcSpace=function(e,t){for(var o=0,i=0;i-1&&t.splice(o,1)}),t},D.prototype.freezeRow=function(e){e.modules.frozen?console.warn("Freeze Error - Row is already frozen"):(e.modules.frozen=!0,this.topElement.appendChild(e.getElement()),e.initialize(),e.normalizeHeight(),this.table.rowManager.adjustTableSize(),this.rows.push(e),this.table.rowManager.refreshActiveData("display"),this.styleRows())},D.prototype.unfreezeRow=function(e){var t=this.rows.indexOf(e);if(e.modules.frozen){e.modules.frozen=!1;var o=e.getElement();o.parentNode.removeChild(o),this.table.rowManager.adjustTableSize(),this.rows.splice(t,1),this.table.rowManager.refreshActiveData("display"),this.rows.length&&this.styleRows()}else console.warn("Freeze Error - Row is already unfrozen")},D.prototype.styleRows=function(e){var t=this;this.rows.forEach(function(e,o){t.table.rowManager.styleRow(e,o)})},d.prototype.registerModule("frozenRows",D);var k=function(e){this._group=e,this.type="GroupComponent"};k.prototype.getKey=function(){return this._group.key},k.prototype.getField=function(){return this._group.field},k.prototype.getElement=function(){return this._group.element},k.prototype.getRows=function(){return this._group.getRows(!0)},k.prototype.getSubGroups=function(){return this._group.getSubGroups(!0)},k.prototype.getParentGroup=function(){return!!this._group.parent&&this._group.parent.getComponent()},k.prototype.getVisibility=function(){return console.warn("getVisibility function is deprecated, you should now use the isVisible function"),this._group.visible},k.prototype.isVisible=function(){return this._group.visible},k.prototype.show=function(){this._group.show()},k.prototype.hide=function(){this._group.hide()},k.prototype.toggle=function(){this._group.toggleVisibility()},k.prototype._getSelf=function(){return this._group},k.prototype.getTable=function(){return this._group.groupManager.table};var S=function(e,t,o,i,n,s,r){this.groupManager=e,this.parent=t,this.key=i,this.level=o,this.field=n,this.hasSubGroups=o-1?o?this.rows.splice(n+1,0,e):this.rows.splice(n,0,e):o?this.rows.push(e):this.rows.unshift(e),e.modules.group=this,this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this),this.groupManager.updateGroupRows(!0)},S.prototype.scrollHeader=function(e){this.arrowElement.style.marginLeft=e,this.groupList.forEach(function(t){t.scrollHeader(e)})},S.prototype.getRowIndex=function(e){},S.prototype.conformRowData=function(e){return this.field?e[this.field]=this.key:console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"),this.parent&&(e=this.parent.conformRowData(e)),e},S.prototype.removeRow=function(e){var t=this.rows.indexOf(e),o=e.getElement();t>-1&&this.rows.splice(t,1),this.groupManager.table.options.groupValues||this.rows.length?(o.parentNode&&o.parentNode.removeChild(o),this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this)):(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this),this.groupManager.updateGroupRows(!0))},S.prototype.removeGroup=function(e){var t,o=e.level+"_"+e.key;this.groups[o]&&(delete this.groups[o],t=this.groupList.indexOf(e),t>-1&&this.groupList.splice(t,1),this.groupList.length||(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this)))},S.prototype.getHeadersAndRows=function(e){var t=[];return t.push(this),this._visSet(),this.visible?this.groupList.length?this.groupList.forEach(function(o){t=t.concat(o.getHeadersAndRows(e))}):(!e&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),t.push(this.calcs.top)),t=t.concat(this.rows),!e&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),t.push(this.calcs.bottom))):this.groupList.length||"table"==this.groupManager.table.options.columnCalcs||this.groupManager.table.modExists("columnCalcs")&&(!e&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),t.push(this.calcs.top))),!e&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),t.push(this.calcs.bottom)))),t},S.prototype.getData=function(e,t){var o=[];return this._visSet(),(!e||e&&this.visible)&&this.rows.forEach(function(e){o.push(e.getData(t||"data"))}),o},S.prototype.getRowCount=function(){var e=0;return this.groupList.length?this.groupList.forEach(function(t){e+=t.getRowCount()}):e=this.rows.length,e},S.prototype.toggleVisibility=function(){this.visible?this.hide():this.show()},S.prototype.hide=function(){this.visible=!1,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination?this.groupManager.updateGroupRows(!0):(this.element.classList.remove("tabulator-group-visible"),this.groupList.length?this.groupList.forEach(function(e){e.getHeadersAndRows().forEach(function(e){e.detachElement()})}):this.rows.forEach(function(e){var t=e.getElement();t.parentNode.removeChild(t)}),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex()),this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()),this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),!1)},S.prototype.show=function(){var e=this;if(e.visible=!0,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination)this.groupManager.updateGroupRows(!0);else{this.element.classList.add("tabulator-group-visible");var t=e.getElement();this.groupList.length?this.groupList.forEach(function(e){e.getHeadersAndRows().forEach(function(e){var o=e.getElement();t.parentNode.insertBefore(o,t.nextSibling),e.initialize(),t=o})}):e.rows.forEach(function(e){var o=e.getElement();t.parentNode.insertBefore(o,t.nextSibling),e.initialize(),t=o}),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex()),this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()}this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),!0)},S.prototype._visSet=function(){var e=[];"function"==typeof this.visible&&(this.rows.forEach(function(t){e.push(t.getData())}),this.visible=this.visible(this.key,this.getRowCount(),e,this.getComponent()))},S.prototype.getRowGroup=function(e){var t=!1;return this.groupList.length?this.groupList.forEach(function(o){var i=o.getRowGroup(e);i&&(t=i)}):this.rows.find(function(t){return t===e})&&(t=this),t},S.prototype.getSubGroups=function(e){var t=[];return this.groupList.forEach(function(o){t.push(e?o.getComponent():o)}),t},S.prototype.getRows=function(e){var t=[];return this.rows.forEach(function(o){t.push(e?o.getComponent():o)}),t},S.prototype.generateGroupHeaderContents=function(){var e=[];for(this.rows.forEach(function(t){e.push(t.getData())}),this.elementContents=this.generator(this.key,this.getRowCount(),e,this.getComponent());this.element.firstChild;)this.element.removeChild(this.element.firstChild);"string"==typeof this.elementContents?this.element.innerHTML=this.elementContents:this.element.appendChild(this.elementContents),this.element.insertBefore(this.arrowElement,this.element.firstChild)},S.prototype.getElement=function(){this.addBindingsd=!1,this._visSet(),this.visible?this.element.classList.add("tabulator-group-visible"):this.element.classList.remove("tabulator-group-visible");for(var e=0;ei.length&&console.warn("Error creating group headers, groupHeader array is shorter than groupBy array"),e.headerGenerator=[function(){return""}],this.startOpen=[function(){return!1}],e.table.modules.localize.bind("groups|item",function(t,o){e.headerGenerator[0]=function(e,i,n){return(void 0===e?"":e)+"("+i+" "+(1===i?t:o.groups.items)+")"}}),this.groupIDLookups=[],Array.isArray(t)||t)this.table.modExists("columnCalcs")&&"table"!=this.table.options.columnCalcs&&"both"!=this.table.options.columnCalcs&&this.table.modules.columnCalcs.removeCalcs();else if(this.table.modExists("columnCalcs")&&"group"!=this.table.options.columnCalcs){var n=this.table.columnManager.getRealColumns();n.forEach(function(t){t.definition.topCalc&&e.table.modules.columnCalcs.initializeTopRow(),t.definition.bottomCalc&&e.table.modules.columnCalcs.initializeBottomRow()})}Array.isArray(t)||(t=[t]),t.forEach(function(t,o){var i,n;"function"==typeof t?i=t:(n=e.table.columnManager.getColumnByField(t),i=n?function(e){return n.getFieldValue(e)}:function(e){return e[t]}),e.groupIDLookups.push({field:"function"!=typeof t&&t,func:i,values:!!e.allowedValues&&e.allowedValues[o]})}),o&&(Array.isArray(o)||(o=[o]),o.forEach(function(e){e="function"==typeof e?e:function(){return!0}}),e.startOpen=o),i&&(e.headerGenerator=Array.isArray(i)?i:[i]),this.initialized=!0},H.prototype.setDisplayIndex=function(e){this.displayIndex=e},H.prototype.getDisplayIndex=function(){return this.displayIndex},H.prototype.getRows=function(e){return this.groupIDLookups.length?(this.table.options.dataGrouping.call(this.table),this.generateGroups(e),this.table.options.dataGrouped&&this.table.options.dataGrouped.call(this.table,this.getGroups(!0)),this.updateGroupRows()):e.slice(0)},H.prototype.getGroups=function(e){var t=[];return this.groupList.forEach(function(o){t.push(e?o.getComponent():o)}),t},H.prototype.getChildGroups=function(e){var t=this,o=[];return e||(e=this),e.groupList.forEach(function(e){e.groupList.length?o=o.concat(t.getChildGroups(e)):o.push(e)}),o},H.prototype.wipe=function(){this.groupList.forEach(function(e){e.wipe()})},H.prototype.pullGroupListData=function(e){var t=this,o=[];return e.forEach(function(e){var i={};i.level=0,i.rowCount=0,i.headerContent="";var n=[];e.hasSubGroups?(n=t.pullGroupListData(e.groupList),i.level=e.level,i.rowCount=n.length-e.groupList.length,i.headerContent=e.generator(e.key,i.rowCount,e.rows,e),o.push(i),o=o.concat(n)):(i.level=e.level,i.headerContent=e.generator(e.key,e.rows.length,e.rows,e),i.rowCount=e.getRows().length,o.push(i),e.getRows().forEach(function(e){o.push(e.getData("data"))}))}),o},H.prototype.getGroupedData=function(){return this.pullGroupListData(this.groupList)},H.prototype.getRowGroup=function(e){var t=!1;return this.groupList.forEach(function(o){var i=o.getRowGroup(e);i&&(t=i)}),t},H.prototype.countGroups=function(){return this.groupList.length},H.prototype.generateGroups=function(e){var t=this,o=t.groups;t.groups={},t.groupList=[],this.allowedValues&&this.allowedValues[0]?(this.allowedValues[0].forEach(function(e){t.createGroup(e,0,o)}),e.forEach(function(e){t.assignRowToExistingGroup(e,o)})):e.forEach(function(e){t.assignRowToGroup(e,o)})},H.prototype.createGroup=function(e,t,o){var i,n=t+"_"+e;o=o||[],i=new S(this,!1,t,e,this.groupIDLookups[0].field,this.headerGenerator[0],o[n]),this.groups[n]=i,this.groupList.push(i)},H.prototype.assignRowToExistingGroup=function(e,t){var o=this.groupIDLookups[0].func(e.getData()),i="0_"+o;this.groups[i]&&this.groups[i].addRow(e)},H.prototype.assignRowToGroup=function(e,t){var o=this.groupIDLookups[0].func(e.getData()),i=!this.groups["0_"+o];return i&&this.createGroup(o,0,t),this.groups["0_"+o].addRow(e),!i},H.prototype.updateGroupRows=function(e){var t=this,o=[];if(t.groupList.forEach(function(e){o=o.concat(e.getHeadersAndRows())}),e){var i=t.table.rowManager.setDisplayRows(o,this.getDisplayIndex());!0!==i&&this.setDisplayIndex(i),t.table.rowManager.refreshActiveData("group",!0,!0)}return o},H.prototype.scrollHeaders=function(e){e+="px",this.groupList.forEach(function(t){t.scrollHeader(e)})},H.prototype.removeGroup=function(e){var t,o=e.level+"_"+e.key;this.groups[o]&&(delete this.groups[o],(t=this.groupList.indexOf(e))>-1&&this.groupList.splice(t,1))},d.prototype.registerModule("groupRows",H);var z=function(e){this.table=e,this.history=[],this.index=-1};z.prototype.clear=function(){this.history=[],this.index=-1},z.prototype.action=function(e,t,o){this.history=this.history.slice(0,this.index+1),this.history.push({type:e,component:t,data:o}),this.index++},z.prototype.getHistoryUndoSize=function(){return this.index+1},z.prototype.getHistoryRedoSize=function(){return this.history.length-(this.index+1)},z.prototype.undo=function(){if(this.index>-1){var e=this.history[this.index];return this.undoers[e.type].call(this,e),this.index--,this.table.options.historyUndo.call(this.table,e.type,e.component.getComponent(),e.data),!0}return console.warn("History Undo Error - No more history to undo"),!1},z.prototype.redo=function(){if(this.history.length-1>this.index){this.index++;var e=this.history[this.index];return this.redoers[e.type].call(this,e),this.table.options.historyRedo.call(this.table,e.type,e.component.getComponent(),e.data),!0}return console.warn("History Redo Error - No more history to redo"),!1},z.prototype.undoers={cellEdit:function(e){e.component.setValueProcessData(e.data.oldValue)},rowAdd:function(e){e.component.deleteActual()},rowDelete:function(e){var t=this.table.rowManager.addRowActual(e.data.data,e.data.pos,e.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(e.component,t)},rowMove:function(e){ +this.table.rowManager.moveRowActual(e.component,this.table.rowManager.rows[e.data.posFrom],!e.data.after),this.table.rowManager.redraw()}},z.prototype.redoers={cellEdit:function(e){e.component.setValueProcessData(e.data.newValue)},rowAdd:function(e){var t=this.table.rowManager.addRowActual(e.data.data,e.data.pos,e.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(e.component,t)},rowDelete:function(e){e.component.deleteActual()},rowMove:function(e){this.table.rowManager.moveRowActual(e.component,this.table.rowManager.rows[e.data.posTo],e.data.after),this.table.rowManager.redraw()}},z.prototype._rebindRow=function(e,t){this.history.forEach(function(o){if(o.component instanceof a)o.component===e&&(o.component=t);else if(o.component instanceof c&&o.component.row===e){var i=o.component.column.getField();i&&(o.component=t.getCell(i))}})},d.prototype.registerModule("history",z);var A=function(e){this.table=e,this.fieldIndex=[],this.hasIndex=!1};A.prototype.parseTable=function(){var e=this,t=e.table.element,o=e.table.options,i=(o.columns,t.getElementsByTagName("th")),n=t.getElementsByTagName("tbody")[0],s=[];e.hasIndex=!1,e.table.options.htmlImporting.call(this.table),n=n?n.getElementsByTagName("tr"):[],e._extractOptions(t,o),i.length?e._extractHeaders(i,n):e._generateBlankHeaders(i,n);for(var r=0;r-1&&e.pressedKeys.splice(i,1)}},this.table.element.addEventListener("keydown",this.keyupBinding),this.table.element.addEventListener("keyup",this.keydownBinding)},_.prototype.clearBindings=function(){this.keyupBinding&&this.table.element.removeEventListener("keydown",this.keyupBinding),this.keydownBinding&&this.table.element.removeEventListener("keyup",this.keydownBinding)},_.prototype.checkBinding=function(e,t){var o=this,i=!0;return e.ctrlKey==t.ctrl&&e.shiftKey==t.shift&&e.metaKey==t.meta&&(t.keys.forEach(function(e){-1==o.pressedKeys.indexOf(e)&&(i=!1)}),i&&t.action.call(o,e),!0)},_.prototype.bindings={navPrev:"shift + 9",navNext:9,navUp:38,navDown:40,scrollPageUp:33,scrollPageDown:34,scrollToStart:36,scrollToEnd:35,undo:"ctrl + 90",redo:"ctrl + 89",copyToClipboard:"ctrl + 67"},_.prototype.actions={keyBlock:function(e){e.stopPropagation(),e.preventDefault()},scrollPageUp:function(e){var t=this.table.rowManager,o=t.scrollTop-t.height;t.element.scrollHeight;e.preventDefault(),t.displayRowsCount&&(o>=0?t.element.scrollTop=o:t.scrollToRow(t.getDisplayRows()[0])),this.table.element.focus()},scrollPageDown:function(e){var t=this.table.rowManager,o=t.scrollTop+t.height,i=t.element.scrollHeight;e.preventDefault(),t.displayRowsCount&&(o<=i?t.element.scrollTop=o:t.scrollToRow(t.getDisplayRows()[t.displayRowsCount-1])),this.table.element.focus()},scrollToStart:function(e){var t=this.table.rowManager;e.preventDefault(),t.displayRowsCount&&t.scrollToRow(t.getDisplayRows()[0]),this.table.element.focus()},scrollToEnd:function(e){var t=this.table.rowManager;e.preventDefault(),t.displayRowsCount&&t.scrollToRow(t.getDisplayRows()[t.displayRowsCount-1]),this.table.element.focus()},navPrev:function(e){var t=!1;this.table.modExists("edit")&&(t=this.table.modules.edit.currentCell)&&(e.preventDefault(),t.nav().prev())},navNext:function(e){var t,o=!1,i=this.table.options.tabEndNewRow;this.table.modExists("edit")&&(o=this.table.modules.edit.currentCell)&&(e.preventDefault(),t=o.nav(),t.next()||i&&(o.getElement().firstChild.blur(),i=!0===i?this.table.addRow({}):"function"==typeof i?this.table.addRow(i(o.row.getComponent())):this.table.addRow(Object.assign({},i)),i.then(function(){setTimeout(function(){t.next()})})))},navLeft:function(e){var t=!1;this.table.modExists("edit")&&(t=this.table.modules.edit.currentCell)&&(e.preventDefault(),t.nav().left())},navRight:function(e){var t=!1;this.table.modExists("edit")&&(t=this.table.modules.edit.currentCell)&&(e.preventDefault(),t.nav().right())},navUp:function(e){var t=!1;this.table.modExists("edit")&&(t=this.table.modules.edit.currentCell)&&(e.preventDefault(),t.nav().up())},navDown:function(e){var t=!1;this.table.modExists("edit")&&(t=this.table.modules.edit.currentCell)&&(e.preventDefault(),t.nav().down())},undo:function(e){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(e.preventDefault(),this.table.modules.history.undo()))},redo:function(e){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(e.preventDefault(),this.table.modules.history.redo()))},copyToClipboard:function(e){this.table.modules.edit.currentCell||this.table.modExists("clipboard",!0)&&this.table.modules.clipboard.copy(!1,!0)}},d.prototype.registerModule("keybindings",_);var P=function(e){this.table=e,this.menuEl=!1,this.blurEvent=this.hideMenu.bind(this),this.escEvent=this.escMenu.bind(this),this.nestedMenuBlock=!1};P.prototype.initializeColumnHeader=function(e){var t,o=this;e.definition.headerContextMenu&&e.getElement().addEventListener("contextmenu",function(t){var i="function"==typeof e.definition.headerContextMenu?e.definition.headerContextMenu(e.getComponent()):e.definition.headerContextMenu;t.preventDefault(),o.loadMenu(t,e,i)}),e.definition.headerMenu&&(t=document.createElement("span"),t.classList.add("tabulator-header-menu-button"),t.innerHTML="⋮",t.addEventListener("click",function(t){var i="function"==typeof e.definition.headerMenu?e.definition.headerMenu(e.getComponent()):e.definition.headerMenu;t.stopPropagation(),t.preventDefault(),o.loadMenu(t,e,i)}),e.titleElement.insertBefore(t,e.titleElement.firstChild))},P.prototype.initializeCell=function(e){var t=this;e.getElement().addEventListener("contextmenu",function(o){var i="function"==typeof e.column.definition.contextMenu?e.column.definition.contextMenu(e.getComponent()):e.column.definition.contextMenu;o.stopImmediatePropagation(),t.loadMenu(o,e,i)})},P.prototype.initializeRow=function(e){var t=this;e.getElement().addEventListener("contextmenu",function(o){var i="function"==typeof t.table.options.rowContextMenu?t.table.options.rowContextMenu(e.getComponent()):t.table.options.rowContextMenu;t.loadMenu(o,e,i)})},P.prototype.initializeGroup=function(e){var t=this;e.getElement().addEventListener("contextmenu",function(o){var i="function"==typeof t.table.options.groupContextMenu?t.table.options.groupContextMenu(e.getComponent()):t.table.options.groupContextMenu;t.loadMenu(o,e,i)})},P.prototype.loadMenu=function(e,t,o){var i=this,n=Math.max(document.body.offsetHeight,window.innerHeight);if(e.preventDefault(),o&&o.length){if(this.nestedMenuBlock){if(this.isOpen())return}else this.nestedMenuBlock=setTimeout(function(){i.nestedMenuBlock=!1},100);this.hideMenu(),this.menuEl=document.createElement("div"),this.menuEl.classList.add("tabulator-menu"),o.forEach(function(e){var o=document.createElement("div"),n=e.label,s=e.disabled;e.separator?o.classList.add("tabulator-menu-separator"):(o.classList.add("tabulator-menu-item"),"function"==typeof n&&(n=n(t.getComponent())),n instanceof Node?o.appendChild(n):o.innerHTML=n,"function"==typeof s&&(s=s(t.getComponent())),s?(o.classList.add("tabulator-menu-item-disabled"),o.addEventListener("click",function(e){e.stopPropagation()})):o.addEventListener("click",function(o){i.hideMenu(),e.action(o,t.getComponent())})),i.menuEl.appendChild(o)}),this.menuEl.style.top=e.pageY+"px",this.menuEl.style.left=e.pageX+"px",document.body.addEventListener("click",this.blurEvent),this.table.rowManager.element.addEventListener("scroll",this.blurEvent),setTimeout(function(){document.body.addEventListener("contextmenu",i.blurEvent)},100),document.body.addEventListener("keydown",this.escEvent),document.body.appendChild(this.menuEl),e.pageX+this.menuEl.offsetWidth>=document.body.offsetWidth&&(this.menuEl.style.left="",this.menuEl.style.right=document.body.offsetWidth-e.pageX+"px"),e.pageY+this.menuEl.offsetHeight>=n&&(this.menuEl.style.top="",this.menuEl.style.bottom=n-e.pageY+"px")}},P.prototype.isOpen=function(){return!!this.menuEl.parentNode},P.prototype.escMenu=function(e){27==e.keyCode&&this.hideMenu()},P.prototype.hideMenu=function(){this.menuEl.parentNode&&this.menuEl.parentNode.removeChild(this.menuEl),this.escEvent&&document.body.removeEventListener("keydown",this.escEvent),this.blurEvent&&(document.body.removeEventListener("click",this.blurEvent),document.body.removeEventListener("contextmenu",this.blurEvent),this.table.rowManager.element.removeEventListener("scroll",this.blurEvent))},P.prototype.menus={},d.prototype.registerModule("menu",P);var F=function(e){this.table=e,this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=250,this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.startX=0,this.autoScrollMargin=40,this.autoScrollStep=5,this.autoScrollTimeout=!1,this.touchMove=!1,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this)};F.prototype.createPlaceholderElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-col"),e.classList.add("tabulator-col-placeholder"),e},F.prototype.initializeColumn=function(e){var t,o=this,i={};e.modules.frozen||(t=e.getElement(),i.mousemove=function(i){e.parent===o.moving.parent&&((o.touchMove?i.touches[0].pageX:i.pageX)-d.prototype.helpers.elOffset(t).left+o.table.columnManager.element.scrollLeft>e.getWidth()/2?o.toCol===e&&o.toColAfter||(t.parentNode.insertBefore(o.placeholderElement,t.nextSibling),o.moveColumn(e,!0)):(o.toCol!==e||o.toColAfter)&&(t.parentNode.insertBefore(o.placeholderElement,t),o.moveColumn(e,!1)))}.bind(o),t.addEventListener("mousedown",function(t){o.touchMove=!1,1===t.which&&(o.checkTimeout=setTimeout(function(){o.startMove(t,e)},o.checkPeriod))}),t.addEventListener("mouseup",function(e){1===e.which&&o.checkTimeout&&clearTimeout(o.checkTimeout)}),o.bindTouchEvents(e)),e.modules.moveColumn=i},F.prototype.bindTouchEvents=function(e){var t,o,i,n,s,r,a,l=this,c=e.getElement(),u=!1;c.addEventListener("touchstart",function(c){l.checkTimeout=setTimeout(function(){l.touchMove=!0,t=e,o=e.nextColumn(),n=o?o.getWidth()/2:0,i=e.prevColumn(),s=i?i.getWidth()/2:0,r=0,a=0,u=!1,l.startMove(c,e)},l.checkPeriod)},{passive:!0}),c.addEventListener("touchmove",function(c){var d,h;l.moving&&(l.moveHover(c),u||(u=c.touches[0].pageX),d=c.touches[0].pageX-u,d>0?o&&d-r>n&&(h=o)!==e&&(u=c.touches[0].pageX,h.getElement().parentNode.insertBefore(l.placeholderElement,h.getElement().nextSibling),l.moveColumn(h,!0)):i&&-d-a>s&&(h=i)!==e&&(u=c.touches[0].pageX,h.getElement().parentNode.insertBefore(l.placeholderElement,h.getElement()),l.moveColumn(h,!1)),h&&(t=h,o=h.nextColumn(),r=n,n=o?o.getWidth()/2:0,i=h.prevColumn(),a=s,s=i?i.getWidth()/2:0))},{passive:!0}),c.addEventListener("touchend",function(e){l.checkTimeout&&clearTimeout(l.checkTimeout),l.moving&&l.endMove(e)})},F.prototype.startMove=function(e,t){var o=t.getElement();this.moving=t,this.startX=(this.touchMove?e.touches[0].pageX:e.pageX)-d.prototype.helpers.elOffset(o).left,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",o.parentNode.insertBefore(this.placeholderElement,o),o.parentNode.removeChild(o),this.hoverElement=o.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.table.columnManager.getElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.bottom="0",this.touchMove||(this._bindMouseMove(),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove)),this.moveHover(e)},F.prototype._bindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach(function(e){e.modules.moveColumn.mousemove&&e.getElement().addEventListener("mousemove",e.modules.moveColumn.mousemove)})},F.prototype._unbindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach(function(e){e.modules.moveColumn.mousemove&&e.getElement().removeEventListener("mousemove",e.modules.moveColumn.mousemove)})},F.prototype.moveColumn=function(e,t){var o=this.moving.getCells();this.toCol=e,this.toColAfter=t,t?e.getCells().forEach(function(e,t){var i=e.getElement();i.parentNode.insertBefore(o[t].getElement(),i.nextSibling)}):e.getCells().forEach(function(e,t){var i=e.getElement();i.parentNode.insertBefore(o[t].getElement(),i)})},F.prototype.endMove=function(e){(1===e.which||this.touchMove)&&(this._unbindMouseMove(),this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toCol&&this.table.columnManager.moveColumnActual(this.moving,this.toCol,this.toColAfter),this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.touchMove||(document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove)))},F.prototype.moveHover=function(e){var t,o=this,i=o.table.columnManager.getElement(),n=i.scrollLeft,s=(o.touchMove?e.touches[0].pageX:e.pageX)-d.prototype.helpers.elOffset(i).left+n;o.hoverElement.style.left=s-o.startX+"px",s-ne.getHeight()/2){if(t.toRow!==e||!t.toRowAfter){var i=e.getElement();i.parentNode.insertBefore(t.placeholderElement,i.nextSibling),t.moveRow(e,!0)}}else if(t.toRow!==e||t.toRowAfter){var i=e.getElement();i.previousSibling&&(i.parentNode.insertBefore(t.placeholderElement,i),t.moveRow(e,!1))}}.bind(t),e.modules.moveRow=o},N.prototype.initializeRow=function(e){var t,o=this,i={};i.mouseup=function(t){o.tableRowDrop(t,e)}.bind(o),i.mousemove=function(t){if(t.pageY-d.prototype.helpers.elOffset(e.element).top+o.table.rowManager.element.scrollTop>e.getHeight()/2){if(o.toRow!==e||!o.toRowAfter){var i=e.getElement();i.parentNode.insertBefore(o.placeholderElement,i.nextSibling),o.moveRow(e,!0)}}else if(o.toRow!==e||o.toRowAfter){var i=e.getElement();i.parentNode.insertBefore(o.placeholderElement,i),o.moveRow(e,!1)}}.bind(o),this.hasHandle||(t=e.getElement(),t.addEventListener("mousedown",function(t){1===t.which&&(o.checkTimeout=setTimeout(function(){o.startMove(t,e)},o.checkPeriod))}),t.addEventListener("mouseup",function(e){1===e.which&&o.checkTimeout&&clearTimeout(o.checkTimeout)}),this.bindTouchEvents(e,e.getElement())),e.modules.moveRow=i},N.prototype.initializeCell=function(e){var t=this,o=e.getElement();o.addEventListener("mousedown",function(o){1===o.which&&(t.checkTimeout=setTimeout(function(){t.startMove(o,e.row)},t.checkPeriod))}),o.addEventListener("mouseup",function(e){1===e.which&&t.checkTimeout&&clearTimeout(t.checkTimeout)}),this.bindTouchEvents(e.row,e.getElement())},N.prototype.bindTouchEvents=function(e,t){var o,i,n,s,r,a,l,c=this,u=!1;t.addEventListener("touchstart",function(t){c.checkTimeout=setTimeout(function(){c.touchMove=!0,o=e,i=e.nextRow(),s=i?i.getHeight()/2:0,n=e.prevRow(),r=n?n.getHeight()/2:0,a=0,l=0,u=!1,c.startMove(t,e)},c.checkPeriod)},{passive:!0}),this.moving,this.toRow,this.toRowAfter,t.addEventListener("touchmove",function(t){var d,h;c.moving&&(t.preventDefault(),c.moveHover(t),u||(u=t.touches[0].pageY),d=t.touches[0].pageY-u,d>0?i&&d-a>s&&(h=i)!==e&&(u=t.touches[0].pageY,h.getElement().parentNode.insertBefore(c.placeholderElement,h.getElement().nextSibling),c.moveRow(h,!0)):n&&-d-l>r&&(h=n)!==e&&(u=t.touches[0].pageY,h.getElement().parentNode.insertBefore(c.placeholderElement,h.getElement()),c.moveRow(h,!1)),h&&(o=h,i=h.nextRow(),a=s,s=i?i.getHeight()/2:0,n=h.prevRow(),l=r,r=n?n.getHeight()/2:0))}),t.addEventListener("touchend",function(e){c.checkTimeout&&clearTimeout(c.checkTimeout),c.moving&&(c.endMove(e),c.touchMove=!1)})},N.prototype._bindMouseMove=function(){this.table.rowManager.getDisplayRows().forEach(function(e){"row"!==e.type&&"group"!==e.type||!e.modules.moveRow.mousemove||e.getElement().addEventListener("mousemove",e.modules.moveRow.mousemove)})},N.prototype._unbindMouseMove=function(){this.table.rowManager.getDisplayRows().forEach(function(e){"row"!==e.type&&"group"!==e.type||!e.modules.moveRow.mousemove||e.getElement().removeEventListener("mousemove",e.modules.moveRow.mousemove)})},N.prototype.startMove=function(e,t){var o=t.getElement();this.setStartPosition(e,t),this.moving=t,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",this.connection?(this.table.element.classList.add("tabulator-movingrow-sending"),this.connectToTables(t)):(o.parentNode.insertBefore(this.placeholderElement,o),o.parentNode.removeChild(o)),this.hoverElement=o.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.connection?(document.body.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this.hoverElement.style.width=this.table.element.clientWidth+"px",this.hoverElement.style.whiteSpace="nowrap",this.hoverElement.style.overflow="hidden",this.hoverElement.style.pointerEvents="none"):(this.table.rowManager.getTableElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this._bindMouseMove()),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove),this.moveHover(e)},N.prototype.setStartPosition=function(e,t){var o,i,n=this.touchMove?e.touches[0].pageX:e.pageX,s=this.touchMove?e.touches[0].pageY:e.pageY;o=t.getElement(),this.connection?(i=o.getBoundingClientRect(),this.startX=i.left-n+window.pageXOffset,this.startY=i.top-s+window.pageYOffset):this.startY=s-o.getBoundingClientRect().top},N.prototype.endMove=function(e){e&&1!==e.which&&!this.touchMove||(this._unbindMouseMove(),this.connection||(this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement)),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toRow&&this.table.rowManager.moveRow(this.moving,this.toRow,this.toRowAfter),this.moving=!1,this.toRow=!1,this.toRowAfter=!1,document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove),this.connection&&(this.table.element.classList.remove("tabulator-movingrow-sending"),this.disconnectFromTables()))},N.prototype.moveRow=function(e,t){this.toRow=e,this.toRowAfter=t},N.prototype.moveHover=function(e){this.connection?this.moveHoverConnections.call(this,e):this.moveHoverTable.call(this,e)},N.prototype.moveHoverTable=function(e){var t=this.table.rowManager.getElement(),o=t.scrollTop,i=(this.touchMove?e.touches[0].pageY:e.pageY)-t.getBoundingClientRect().top+o;this.hoverElement.style.top=i-this.startY+"px"},N.prototype.moveHoverConnections=function(e){this.hoverElement.style.left=this.startX+(this.touchMove?e.touches[0].pageX:e.pageX)+"px",this.hoverElement.style.top=this.startY+(this.touchMove?e.touches[0].pageY:e.pageY)+"px"},N.prototype.elementRowDrop=function(e,t,o){this.table.options.movableRowsElementDrop&&this.table.options.movableRowsElementDrop(e,t,!!o&&o.getComponent())},N.prototype.connectToTables=function(e){var t,o=this;this.connectionSelectorsTables&&(t=this.table.modules.comms.getConnections(this.connectionSelectorsTables),this.table.options.movableRowsSendingStart.call(this.table,t),this.table.modules.comms.send(this.connectionSelectorsTables,"moveRow","connect",{row:e})),this.connectionSelectorsElements&&(this.connectionElements=[],Array.isArray(this.connectionSelectorsElements)||(this.connectionSelectorsElements=[this.connectionSelectorsElements]),this.connectionSelectorsElements.forEach(function(e){"string"==typeof e?o.connectionElements=o.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(e))):o.connectionElements.push(e)}),this.connectionElements.forEach(function(e){var t=function(t){o.elementRowDrop(t,e,o.moving)};e.addEventListener("mouseup",t),e.tabulatorElementDropEvent=t,e.classList.add("tabulator-movingrow-receiving")}))},N.prototype.disconnectFromTables=function(){var e;this.connectionSelectorsTables&&(e=this.table.modules.comms.getConnections(this.connectionSelectorsTables),this.table.options.movableRowsSendingStop.call(this.table,e),this.table.modules.comms.send(this.connectionSelectorsTables,"moveRow","disconnect")),this.connectionElements.forEach(function(e){e.classList.remove("tabulator-movingrow-receiving"),e.removeEventListener("mouseup",e.tabulatorElementDropEvent),delete e.tabulatorElementDropEvent})},N.prototype.connect=function(e,t){var o=this;return this.connectedTable?(console.warn("Move Row Error - Table cannot accept connection, already connected to table:",this.connectedTable),!1):(this.connectedTable=e,this.connectedRow=t,this.table.element.classList.add("tabulator-movingrow-receiving"),o.table.rowManager.getDisplayRows().forEach(function(e){"row"===e.type&&e.modules.moveRow&&e.modules.moveRow.mouseup&&e.getElement().addEventListener("mouseup",e.modules.moveRow.mouseup)}),o.tableRowDropEvent=o.tableRowDrop.bind(o),o.table.element.addEventListener("mouseup",o.tableRowDropEvent),this.table.options.movableRowsReceivingStart.call(this.table,t,e),!0)},N.prototype.disconnect=function(e){var t=this;e===this.connectedTable?(this.connectedTable=!1,this.connectedRow=!1,this.table.element.classList.remove("tabulator-movingrow-receiving"),t.table.rowManager.getDisplayRows().forEach(function(e){"row"===e.type&&e.modules.moveRow&&e.modules.moveRow.mouseup&&e.getElement().removeEventListener("mouseup",e.modules.moveRow.mouseup)}),t.table.element.removeEventListener("mouseup",t.tableRowDropEvent),this.table.options.movableRowsReceivingStop.call(this.table,e)):console.warn("Move Row Error - trying to disconnect from non connected table")},N.prototype.dropComplete=function(e,t,o){var i=!1;if(o){switch(_typeof(this.table.options.movableRowsSender)){case"string":i=this.senders[this.table.options.movableRowsSender];break;case"function":i=this.table.options.movableRowsSender}i?i.call(this,this.moving.getComponent(),t?t.getComponent():void 0,e):this.table.options.movableRowsSender&&console.warn("Mover Row Error - no matching sender found:",this.table.options.movableRowsSender),this.table.options.movableRowsSent.call(this.table,this.moving.getComponent(),t?t.getComponent():void 0,e)}else this.table.options.movableRowsSentFailed.call(this.table,this.moving.getComponent(),t?t.getComponent():void 0,e);this.endMove()},N.prototype.tableRowDrop=function(e,t){var o=!1,i=!1;switch(console.trace("drop"),e.stopImmediatePropagation(),_typeof(this.table.options.movableRowsReceiver)){case"string":o=this.receivers[this.table.options.movableRowsReceiver];break;case"function":o=this.table.options.movableRowsReceiver}o?i=o.call(this,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):console.warn("Mover Row Error - no matching receiver found:",this.table.options.movableRowsReceiver),i?this.table.options.movableRowsReceived.call(this.table,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):this.table.options.movableRowsReceivedFailed.call(this.table,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable),this.table.modules.comms.send(this.connectedTable,"moveRow","dropcomplete",{row:t,success:i})},N.prototype.receivers={insert:function(e,t,o){return this.table.addRow(e.getData(),void 0,t),!0},add:function(e,t,o){return this.table.addRow(e.getData()),!0},update:function(e,t,o){return!!t&&(t.update(e.getData()),!0)},replace:function(e,t,o){return!!t&&(this.table.addRow(e.getData(),void 0,t),t.delete(),!0)}},N.prototype.senders={delete:function(e,t,o){e.delete()}},N.prototype.commsReceived=function(e,t,o){switch(t){case"connect":return this.connect(e,o.row);case"disconnect":return this.disconnect(e);case"dropcomplete":return this.dropComplete(e,o.row,o.success)}},d.prototype.registerModule("moveRow",N);var B=function(e){this.table=e,this.allowedTypes=["","data","edit","clipboard"],this.enabled=!0};B.prototype.initializeColumn=function(e){var t=this,o=!1,i={};this.allowedTypes.forEach(function(n){var s,r="mutator"+(n.charAt(0).toUpperCase()+n.slice(1));e.definition[r]&&(s=t.lookupMutator(e.definition[r]))&&(o=!0,i[r]={mutator:s,params:e.definition[r+"Params"]||{}})}),o&&(e.modules.mutate=i)},B.prototype.lookupMutator=function(e){var t=!1;switch(void 0===e?"undefined":_typeof(e)){case"string":this.mutators[e]?t=this.mutators[e]:console.warn("Mutator Error - No such mutator found, ignoring: ",e);break;case"function":t=e}return t},B.prototype.transformRow=function(e,t,o){var i,n=this,s="mutator"+(t.charAt(0).toUpperCase()+t.slice(1));return this.enabled&&n.table.columnManager.traverse(function(n){var r,a,l;n.modules.mutate&&(r=n.modules.mutate[s]||n.modules.mutate.mutator||!1)&&(i=n.getFieldValue(void 0!==o?o:e),"data"!=t&&void 0===i||(l=n.getComponent(),a="function"==typeof r.params?r.params(i,e,t,l):r.params,n.setFieldValue(e,r.mutator(i,e,t,a,l))))}),e},B.prototype.transformCell=function(e,t){var o=e.column.modules.mutate.mutatorEdit||e.column.modules.mutate.mutator||!1,i={};return o?(i=Object.assign(i,e.row.getData()),e.column.setFieldValue(i,t),o.mutator(t,i,"edit",o.params,e.getComponent())):t},B.prototype.enable=function(){this.enabled=!0},B.prototype.disable=function(){this.enabled=!1},B.prototype.mutators={},d.prototype.registerModule("mutator",B);var O=function(e){this.table=e,this.mode="local",this.progressiveLoad=!1,this.size=0,this.page=1,this.count=5,this.max=1,this.displayIndex=0,this.initialLoad=!0,this.pageSizes=[],this.dataReceivedNames={},this.dataSentNames={},this.createElements()};O.prototype.createElements=function(){var e;this.element=document.createElement("span"),this.element.classList.add("tabulator-paginator"),this.pagesElement=document.createElement("span"),this.pagesElement.classList.add("tabulator-pages"),e=document.createElement("button"),e.classList.add("tabulator-page"),e.setAttribute("type","button"),e.setAttribute("role","button"),e.setAttribute("aria-label",""),e.setAttribute("title",""),this.firstBut=e.cloneNode(!0),this.firstBut.setAttribute("data-page","first"),this.prevBut=e.cloneNode(!0),this.prevBut.setAttribute("data-page","prev"),this.nextBut=e.cloneNode(!0),this.nextBut.setAttribute("data-page","next"),this.lastBut=e.cloneNode(!0),this.lastBut.setAttribute("data-page","last"),this.table.options.paginationSizeSelector&&(this.pageSizeSelect=document.createElement("select"),this.pageSizeSelect.classList.add("tabulator-page-size"))},O.prototype.generatePageSizeSelectList=function(){var e=this,t=[];if(this.pageSizeSelect){if(Array.isArray(this.table.options.paginationSizeSelector))t=this.table.options.paginationSizeSelector,this.pageSizes=t,-1==this.pageSizes.indexOf(this.size)&&t.unshift(this.size);else if(-1==this.pageSizes.indexOf(this.size)){t=[];for(var o=1;o<5;o++)t.push(this.size*o);this.pageSizes=t}else t=this.pageSizes +;for(;this.pageSizeSelect.firstChild;)this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild);t.forEach(function(t){var o=document.createElement("option");o.value=t,!0===t?e.table.modules.localize.bind("pagination|all",function(e){o.innerHTML=e}):o.innerHTML=t,e.pageSizeSelect.appendChild(o)}),this.pageSizeSelect.value=this.size}},O.prototype.initialize=function(e){var t,o,i,n=this;this.dataSentNames=Object.assign({},this.paginationDataSentNames),this.dataSentNames=Object.assign(this.dataSentNames,this.table.options.paginationDataSent),this.dataReceivedNames=Object.assign({},this.paginationDataReceivedNames),this.dataReceivedNames=Object.assign(this.dataReceivedNames,this.table.options.paginationDataReceived),n.table.modules.localize.bind("pagination|first",function(e){n.firstBut.innerHTML=e}),n.table.modules.localize.bind("pagination|first_title",function(e){n.firstBut.setAttribute("aria-label",e),n.firstBut.setAttribute("title",e)}),n.table.modules.localize.bind("pagination|prev",function(e){n.prevBut.innerHTML=e}),n.table.modules.localize.bind("pagination|prev_title",function(e){n.prevBut.setAttribute("aria-label",e),n.prevBut.setAttribute("title",e)}),n.table.modules.localize.bind("pagination|next",function(e){n.nextBut.innerHTML=e}),n.table.modules.localize.bind("pagination|next_title",function(e){n.nextBut.setAttribute("aria-label",e),n.nextBut.setAttribute("title",e)}),n.table.modules.localize.bind("pagination|last",function(e){n.lastBut.innerHTML=e}),n.table.modules.localize.bind("pagination|last_title",function(e){n.lastBut.setAttribute("aria-label",e),n.lastBut.setAttribute("title",e)}),n.firstBut.addEventListener("click",function(){n.setPage(1)}),n.prevBut.addEventListener("click",function(){n.previousPage()}),n.nextBut.addEventListener("click",function(){n.nextPage().then(function(){}).catch(function(){})}),n.lastBut.addEventListener("click",function(){n.setPage(n.max)}),n.table.options.paginationElement&&(n.element=n.table.options.paginationElement),this.pageSizeSelect&&(t=document.createElement("label"),n.table.modules.localize.bind("pagination|page_size",function(e){n.pageSizeSelect.setAttribute("aria-label",e),n.pageSizeSelect.setAttribute("title",e),t.innerHTML=e}),n.element.appendChild(t),n.element.appendChild(n.pageSizeSelect),n.pageSizeSelect.addEventListener("change",function(e){n.setPageSize("true"==n.pageSizeSelect.value||n.pageSizeSelect.value),n.setPage(1).then(function(){}).catch(function(){})})),n.element.appendChild(n.firstBut),n.element.appendChild(n.prevBut),n.element.appendChild(n.pagesElement),n.element.appendChild(n.nextBut),n.element.appendChild(n.lastBut),n.table.options.paginationElement||e||n.table.footerManager.append(n.element,n),n.mode=n.table.options.pagination,n.table.options.paginationSize?n.size=n.table.options.paginationSize:(o=document.createElement("div"),o.classList.add("tabulator-row"),o.style.visibility=e,i=document.createElement("div"),i.classList.add("tabulator-cell"),i.innerHTML="Page Row Test",o.appendChild(i),n.table.rowManager.getTableElement().appendChild(o),n.size=Math.floor(n.table.rowManager.getElement().clientHeight/o.offsetHeight),n.table.rowManager.getTableElement().removeChild(o)),n.count=n.table.options.paginationButtonCount,n.generatePageSizeSelectList()},O.prototype.initializeProgressive=function(e){this.initialize(!0),this.mode="progressive_"+e,this.progressiveLoad=!0},O.prototype.setDisplayIndex=function(e){this.displayIndex=e},O.prototype.getDisplayIndex=function(){return this.displayIndex},O.prototype.setMaxRows=function(e){this.max=e?!0===this.size?1:Math.ceil(e/this.size):1,this.page>this.max&&(this.page=this.max)},O.prototype.reset=function(e,t){return("local"==this.mode||e)&&(this.page=1),t&&(this.initialLoad=!0),!0},O.prototype.setMaxPage=function(e){e=parseInt(e),this.max=e||1,this.page>this.max&&(this.page=this.max,this.trigger())},O.prototype.setPage=function(e){var t=this,o=this;switch(e){case"first":return this.setPage(1);case"prev":return this.previousPage();case"next":return this.nextPage();case"last":return this.setPage(this.max)}return new Promise(function(i,n){e=parseInt(e),e>0&&e<=t.max?(t.page=e,t.trigger().then(function(){i()}).catch(function(){n()}),o.table.options.persistence&&o.table.modExists("persistence",!0)&&o.table.modules.persistence.config.page&&o.table.modules.persistence.save("page")):(console.warn("Pagination Error - Requested page is out of range of 1 - "+t.max+":",e),n())})},O.prototype.setPageToRow=function(e){var t=this;return new Promise(function(o,i){var n=t.table.rowManager.getDisplayRows(t.displayIndex-1),s=n.indexOf(e);if(s>-1){var r=!0===t.size?1:Math.ceil((s+1)/t.size);t.setPage(r).then(function(){o()}).catch(function(){i()})}else console.warn("Pagination Error - Requested row is not visible"),i()})},O.prototype.setPageSize=function(e){!0!==e&&(e=parseInt(e)),e>0&&(this.size=e),this.pageSizeSelect&&this.generatePageSizeSelectList(),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.page&&this.table.modules.persistence.save("page")},O.prototype._setPageButtons=function(){for(var e=this,t=Math.floor((this.count-1)/2),o=Math.ceil((this.count-1)/2),i=this.max-this.page+t+10&&s<=e.max&&e.pagesElement.appendChild(e._generatePageButton(s));this.footerRedraw()},O.prototype._generatePageButton=function(e){var t=this,o=document.createElement("button");return o.classList.add("tabulator-page"),e==t.page&&o.classList.add("active"),o.setAttribute("type","button"),o.setAttribute("role","button"),t.table.modules.localize.bind("pagination|page_title",function(t){o.setAttribute("aria-label",t+" "+e),o.setAttribute("title",t+" "+e)}),o.setAttribute("data-page",e),o.textContent=e,o.addEventListener("click",function(o){t.setPage(e)}),o},O.prototype.previousPage=function(){var e=this;return new Promise(function(t,o){e.page>1?(e.page--,e.trigger().then(function(){t()}).catch(function(){o()}),e.table.options.persistence&&e.table.modExists("persistence",!0)&&e.table.modules.persistence.config.page&&e.table.modules.persistence.save("page")):(console.warn("Pagination Error - Previous page would be less than page 1:",0),o())})},O.prototype.nextPage=function(){var e=this;return new Promise(function(t,o){e.pagen?i.splice(n,0,e):i.push(e))}),i},I.prototype._findColumn=function(e,t){var o=t.columns?"group":t.field?"field":"object";return e.find(function(e){switch(o){case"group":return e.title===t.title&&e.columns.length===t.columns.length;case"field":return e.field===t.field;case"object":return e===t}})},I.prototype.save=function(e){var t={};switch(e){case"columns":t=this.parseColumns(this.table.columnManager.getColumns());break;case"filter":t=this.table.modules.filter.getFilters();break;case"sort":t=this.validateSorters(this.table.modules.sort.getSort());break;case"group":t=this.getGroupConfig();break;case"page":t=this.getPageConfig()}this.writeFunc&&this.writeFunc(this.id,e,t)},I.prototype.validateSorters=function(e){return e.forEach(function(e){e.column=e.field,delete e.field}),e},I.prototype.getGroupConfig=function(){return this.config.group&&((!0===this.config.group||this.config.group.groupBy)&&(data.groupBy=this.table.options.groupBy),(!0===this.config.group||this.config.group.groupStartOpen)&&(data.groupStartOpen=this.table.options.groupStartOpen),(!0===this.config.group||this.config.group.groupHeader)&&(data.groupHeader=this.table.options.groupHeader)),data},I.prototype.getPageConfig=function(){var e={};return this.config.page&&((!0===this.config.page||this.config.page.size)&&(e.paginationSize=this.table.modules.page.getPageSize()),(!0===this.config.page||this.config.page.page)&&(e.paginationInitialPage=this.table.modules.page.getPage())),e},I.prototype.parseColumns=function(e){var t=this,o=[];return e.forEach(function(e){var i,n={},s=e.getDefinition();e.isGroup?(n.title=s.title,n.columns=t.parseColumns(e.getColumns())):(n.field=e.getField(),!0===t.config.columns||void 0==t.config.columns?(i=Object.keys(s),i.push("width")):i=t.config.columns,i.forEach(function(t){switch(t){case"width":n.width=e.getWidth();break;case"visible":n.visible=e.visible;break;default:n[t]=s[t]}})),o.push(n)}),o},I.prototype.readers={local:function(e,t){var o=localStorage.getItem(e+"-"+t);return!!o&&JSON.parse(o)},cookie:function(e,t){var o,i,n=document.cookie,s=e+"-"+t,r=n.indexOf(s+"=");return r>-1&&(n=n.substr(r),o=n.indexOf(";"),o>-1&&(n=n.substr(0,o)),i=n.replace(s+"=","")),!!i&&JSON.parse(i)}},I.prototype.writers={local:function(e,t,o){localStorage.setItem(e+"-"+t,JSON.stringify(o))},cookie:function(e,t,o){var i=new Date;i.setDate(i.getDate()+1e4),document.cookie=e+"-"+t+"="+JSON.stringify(o)+"; expires="+i.toUTCString()}},d.prototype.registerModule("persistence",I);var j=function(e){this.table=e,this.element=!1,this.manualBlock=!1};j.prototype.initialize=function(){window.addEventListener("beforeprint",this.replaceTable.bind(this)),window.addEventListener("afterprint",this.cleanup.bind(this))},j.prototype.replaceTable=function(){this.manualBlock||(this.element=document.createElement("div"),this.element.classList.add("tabulator-print-table"),this.element.appendChild(this.table.modules.export.genereateTable(this.table.options.printConfig,this.table.options.printStyled,this.table.options.printRowRange,"print")),this.table.element.style.display="none",this.table.element.parentNode.insertBefore(this.element,this.table.element))},j.prototype.cleanup=function(){document.body.classList.remove("tabulator-print-fullscreen-hide"),this.element&&this.element.parentNode&&(this.element.parentNode.removeChild(this.element),this.table.element.style.display="")},j.prototype.printFullscreen=function(e,t,o){var i,n,s=window.scrollX,r=window.scrollY,a=document.createElement("div"),l=document.createElement("div"),c=this.table.modules.export.genereateTable(void 0!==o?o:this.table.options.printConfig,void 0!==t?t:this.table.options.printStyled,e,"print");this.manualBlock=!0,this.element=document.createElement("div"),this.element.classList.add("tabulator-print-fullscreen"),this.table.options.printHeader&&(a.classList.add("tabulator-print-header"),i="function"==typeof this.table.options.printHeader?this.table.options.printHeader.call(this.table):this.table.options.printHeader,"string"==typeof i?a.innerHTML=i:a.appendChild(i),this.element.appendChild(a)),this.element.appendChild(c),this.table.options.printFooter&&(l.classList.add("tabulator-print-footer"),n="function"==typeof this.table.options.printFooter?this.table.options.printFooter.call(this.table):this.table.options.printFooter,"string"==typeof n?l.innerHTML=n:l.appendChild(n),this.element.appendChild(l)),document.body.classList.add("tabulator-print-fullscreen-hide"),document.body.appendChild(this.element),this.table.options.printFormatter&&this.table.options.printFormatter(this.element,c),window.print(),this.cleanup(),window.scrollTo(s,r),this.manualBlock=!1},d.prototype.registerModule("print",j);var V=function(e){this.table=e,this.data=!1,this.blocked=!1,this.origFuncs={},this.currentVersion=0};V.prototype.watchData=function(e){var t,o=this;this.currentVersion++,t=this.currentVersion,o.unwatchData(),o.data=e,o.origFuncs.push=e.push,Object.defineProperty(o.data,"push",{enumerable:!1,configurable:!0,value:function(){var i=Array.from(arguments);return o.blocked||t!==o.currentVersion||i.forEach(function(e){o.table.rowManager.addRowActual(e,!1)}),o.origFuncs.push.apply(e,arguments)}}),o.origFuncs.unshift=e.unshift,Object.defineProperty(o.data,"unshift",{enumerable:!1,configurable:!0,value:function(){var i=Array.from(arguments);return o.blocked||t!==o.currentVersion||i.forEach(function(e){o.table.rowManager.addRowActual(e,!0)}),o.origFuncs.unshift.apply(e,arguments)}}),o.origFuncs.shift=e.shift,Object.defineProperty(o.data,"shift",{enumerable:!1,configurable:!0,value:function(){var i;return o.blocked||t!==o.currentVersion||o.data.length&&(i=o.table.rowManager.getRowFromDataObject(o.data[0]))&&i.deleteActual(),o.origFuncs.shift.call(e)}}),o.origFuncs.pop=e.pop,Object.defineProperty(o.data,"pop",{enumerable:!1,configurable:!0,value:function(){var i;return o.blocked||t!==o.currentVersion||o.data.length&&(i=o.table.rowManager.getRowFromDataObject(o.data[o.data.length-1]))&&i.deleteActual(),o.origFuncs.pop.call(e)}}),o.origFuncs.splice=e.splice,Object.defineProperty(o.data,"splice",{enumerable:!1,configurable:!0,value:function(){var i,n=Array.from(arguments),s=n[0]<0?e.length+n[0]:n[0],r=n[1],a=!!n[2]&&n.slice(2);if(!o.blocked&&t===o.currentVersion){if(a&&(i=!!e[s]&&o.table.rowManager.getRowFromDataObject(e[s]),i?a.forEach(function(e){o.table.rowManager.addRowActual(e,!0,i,!0)}):(a=a.slice().reverse(),a.forEach(function(e){o.table.rowManager.addRowActual(e,!0,!1,!0)}))),0!==r){var l=e.slice(s,void 0===n[1]?n[1]:s+r);l.forEach(function(e,t){var i=o.table.rowManager.getRowFromDataObject(e);i&&i.deleteActual(t!==l.length-1)})}(a||0!==r)&&o.table.rowManager.reRenderInPosition()}return o.origFuncs.splice.apply(e,arguments)}})},V.prototype.unwatchData=function(){if(!1!==this.data)for(var e in this.origFuncs)Object.defineProperty(this.data,e,{enumerable:!0,configurable:!0,writable:!0,value:this.origFuncs.key})},V.prototype.watchRow=function(e){var t=e.getData();this.blocked=!0;for(var o in t)this.watchKey(e,t,o);this.blocked=!1},V.prototype.watchKey=function(e,t,o){var i=this,n=Object.getOwnPropertyDescriptor(t,o),s=t[o],r=this.currentVersion;Object.defineProperty(t,o,{set:function(t){if(s=t,!i.blocked&&r===i.currentVersion){var a={};a[o]=t,e.updateData(a)}n.set&&n.set(t)},get:function(){return n.get&&n.get(),s}})},V.prototype.unwatchRow=function(e){var t=e.getData();for(var o in t)Object.defineProperty(t,o,{value:t[o]})},V.prototype.block=function(){this.blocked=!0},V.prototype.unblock=function(){this.blocked=!1},d.prototype.registerModule("reactiveData",V);var W=function(e){this.table=e,this.startColumn=!1,this.startX=!1,this.startWidth=!1,this.handle=null,this.prevHandle=null};W.prototype.initializeColumn=function(e,t,o){var i=this,n=!1,s=this.table.options.resizableColumns;if("header"===e&&(n="textarea"==t.definition.formatter||t.definition.variableHeight,t.modules.resize={variableHeight:n}),!0===s||s==e){var r=document.createElement("div");r.className="tabulator-col-resize-handle";var a=document.createElement("div");a.className="tabulator-col-resize-handle prev",r.addEventListener("click",function(e){e.stopPropagation()});var l=function(e){var o=t.getLastColumn();o&&i._checkResizability(o)&&(i.startColumn=t,i._mouseDown(e,o,r))};r.addEventListener("mousedown",l),r.addEventListener("touchstart",l,{passive:!0}),r.addEventListener("dblclick",function(e){var o=t.getLastColumn();o&&i._checkResizability(o)&&(e.stopPropagation(),o.reinitializeWidth(!0))}),a.addEventListener("click",function(e){e.stopPropagation()});var c=function(e){var o,n,s;(o=t.getFirstColumn())&&(n=i.table.columnManager.findColumnIndex(o),(s=n>0&&i.table.columnManager.getColumnByIndex(n-1))&&i._checkResizability(s)&&(i.startColumn=t,i._mouseDown(e,s,a)))};a.addEventListener("mousedown",c),a.addEventListener("touchstart",c,{passive:!0}),a.addEventListener("dblclick",function(e){var o,n,s;(o=t.getFirstColumn())&&(n=i.table.columnManager.findColumnIndex(o),(s=n>0&&i.table.columnManager.getColumnByIndex(n-1))&&i._checkResizability(s)&&(e.stopPropagation(),s.reinitializeWidth(!0)))}),o.appendChild(r),o.appendChild(a)}},W.prototype._checkResizability=function(e){return void 0!==e.definition.resizable?e.definition.resizable:this.table.options.resizableColumns},W.prototype._mouseDown=function(e,t,o){function i(e){t.setWidth(s.startWidth+((void 0===e.screenX?e.touches[0].screenX:e.screenX)-s.startX)),!s.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights()}function n(e){s.startColumn.modules.edit&&(s.startColumn.modules.edit.blocked=!1),s.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights(),document.body.removeEventListener("mouseup",n),document.body.removeEventListener("mousemove",i),o.removeEventListener("touchmove",i),o.removeEventListener("touchend",n),s.table.element.classList.remove("tabulator-block-select"),s.table.options.persistence&&s.table.modExists("persistence",!0)&&s.table.modules.persistence.config.columns&&s.table.modules.persistence.save("columns"),s.table.options.columnResized.call(s.table,t.getComponent())}var s=this;s.table.element.classList.add("tabulator-block-select"),e.stopPropagation(),s.startColumn.modules.edit&&(s.startColumn.modules.edit.blocked=!0),s.startX=void 0===e.screenX?e.touches[0].screenX:e.screenX,s.startWidth=t.getWidth(),document.body.addEventListener("mousemove",i),document.body.addEventListener("mouseup",n),o.addEventListener("touchmove",i,{passive:!0}),o.addEventListener("touchend",n)},d.prototype.registerModule("resizeColumns",W);var G=function(e){this.table=e,this.startColumn=!1,this.startY=!1,this.startHeight=!1,this.handle=null,this.prevHandle=null};G.prototype.initializeRow=function(e){var t=this,o=e.getElement(),i=document.createElement("div");i.className="tabulator-row-resize-handle";var n=document.createElement("div");n.className="tabulator-row-resize-handle prev",i.addEventListener("click",function(e){e.stopPropagation()});var s=function(o){t.startRow=e,t._mouseDown(o,e,i)};i.addEventListener("mousedown",s),i.addEventListener("touchstart",s,{passive:!0}),n.addEventListener("click",function(e){e.stopPropagation()});var r=function(o){var i=t.table.rowManager.prevDisplayRow(e);i&&(t.startRow=i,t._mouseDown(o,i,n))};n.addEventListener("mousedown",r),n.addEventListener("touchstart",r,{passive:!0}),o.appendChild(i),o.appendChild(n)},G.prototype._mouseDown=function(e,t,o){function i(e){t.setHeight(s.startHeight+((void 0===e.screenY?e.touches[0].screenY:e.screenY)-s.startY))}function n(e){document.body.removeEventListener("mouseup",i),document.body.removeEventListener("mousemove",i),o.removeEventListener("touchmove",i),o.removeEventListener("touchend",n),s.table.element.classList.remove("tabulator-block-select"),s.table.options.rowResized.call(this.table,t.getComponent())}var s=this;s.table.element.classList.add("tabulator-block-select"),e.stopPropagation(),s.startY=void 0===e.screenY?e.touches[0].screenY:e.screenY,s.startHeight=t.getHeight(),document.body.addEventListener("mousemove",i),document.body.addEventListener("mouseup",n),o.addEventListener("touchmove",i,{passive:!0}),o.addEventListener("touchend",n)},d.prototype.registerModule("resizeRows",G);var U=function(e){this.table=e,this.binding=!1,this.observer=!1,this.containerObserver=!1,this.tableHeight=0,this.tableWidth=0,this.containerHeight=0,this.containerWidth=0,this.autoResize=!1};U.prototype.initialize=function(e){var t,o=this,i=this.table;this.tableHeight=i.element.clientHeight,this.tableWidth=i.element.clientWidth,i.element.parentNode&&(this.containerHeight=i.element.parentNode.clientHeight,this.containerWidth=i.element.parentNode.clientWidth),"undefined"!=typeof ResizeObserver&&"virtual"===i.rowManager.getRenderMode()?(this.autoResize=!0,this.observer=new ResizeObserver(function(e){if(!i.browserMobile||i.browserMobile&&!i.modules.edit.currentCell){var t=Math.floor(e[0].contentRect.height),n=Math.floor(e[0].contentRect.width);o.tableHeight==t&&o.tableWidth==n||(o.tableHeight=t,o.tableWidth=n,i.element.parentNode&&(o.containerHeight=i.element.parentNode.clientHeight,o.containerWidth=i.element.parentNode.clientWidth),i.redraw())}}),this.observer.observe(i.element),t=window.getComputedStyle(i.element),this.table.element.parentNode&&!this.table.rowManager.fixedHeight&&(t.getPropertyValue("max-height")||t.getPropertyValue("min-height"))&&(this.containerObserver=new ResizeObserver(function(e){if(!i.browserMobile||i.browserMobile&&!i.modules.edit.currentCell){var t=Math.floor(e[0].contentRect.height),n=Math.floor(e[0].contentRect.width);o.containerHeight==t&&o.containerWidth==n||(o.containerHeight=t,o.containerWidth=n,o.tableHeight=i.element.clientHeight,o.tableWidth=i.element.clientWidth,i.redraw()),i.redraw()}}),this.containerObserver.observe(this.table.element.parentNode))):(this.binding=function(){(!i.browserMobile||i.browserMobile&&!i.modules.edit.currentCell)&&i.redraw()},window.addEventListener("resize",this.binding))},U.prototype.clearBindings=function(e){this.binding&&window.removeEventListener("resize",this.binding),this.observer&&this.observer.unobserve(this.table.element),this.containerObserver&&this.containerObserver.unobserve(this.table.element.parentNode)},d.prototype.registerModule("resizeTable",U);var Y=function(e){this.table=e,this.columns=[],this.hiddenColumns=[],this.mode="",this.index=0,this.collapseFormatter=[],this.collapseStartOpen=!0,this.collapseHandleColumn=!1};Y.prototype.initialize=function(){var e=this,t=[];this.mode=this.table.options.responsiveLayout,this.collapseFormatter=this.table.options.responsiveLayoutCollapseFormatter||this.formatCollapsedData,this.collapseStartOpen=this.table.options.responsiveLayoutCollapseStartOpen,this.hiddenColumns=[],this.table.columnManager.columnsByIndex.forEach(function(o,i){o.modules.responsive&&o.modules.responsive.order&&o.modules.responsive.visible&&(o.modules.responsive.index=i,t.push(o),o.visible||"collapse"!==e.mode||e.hiddenColumns.push(o))}),t=t.reverse(),t=t.sort(function(e,t){return t.modules.responsive.order-e.modules.responsive.order||t.modules.responsive.index-e.modules.responsive.index}),this.columns=t,"collapse"===this.mode&&this.generateCollapsedContent();for(var o=this.table.columnManager.columnsByIndex,i=Array.isArray(o),n=0,o=i?o:o[Symbol.iterator]();;){var s;if(i){if(n>=o.length)break;s=o[n++]}else{if(n=o.next(),n.done)break;s=n.value}var r=s;if("responsiveCollapse"==r.definition.formatter){this.collapseHandleColumn=r;break}}this.collapseHandleColumn&&(this.hiddenColumns.length?this.collapseHandleColumn.show():this.collapseHandleColumn.hide())},Y.prototype.initializeColumn=function(e){var t=e.getDefinition();e.modules.responsive={order:void 0===t.responsive?1:t.responsive,visible:!1!==t.visible}},Y.prototype.initializeRow=function(e){var t;"calc"!==e.type&&(t=document.createElement("div"),t.classList.add("tabulator-responsive-collapse"),e.modules.responsiveLayout={element:t,open:this.collapseStartOpen},this.collapseStartOpen||(t.style.display="none"))},Y.prototype.layoutRow=function(e){var t=e.getElement();e.modules.responsiveLayout&&(t.appendChild(e.modules.responsiveLayout.element),this.generateCollapsedRowContent(e))},Y.prototype.updateColumnVisibility=function(e,t){e.modules.responsive&&(e.modules.responsive.visible=t,this.initialize())},Y.prototype.hideColumn=function(e){var t=this.hiddenColumns.length;e.hide(!1,!0),"collapse"===this.mode&&(this.hiddenColumns.unshift(e),this.generateCollapsedContent(),this.collapseHandleColumn&&!t&&this.collapseHandleColumn.show())},Y.prototype.showColumn=function(e){var t;e.show(!1,!0),e.setWidth(e.getWidth()),"collapse"===this.mode&&(t=this.hiddenColumns.indexOf(e),t>-1&&this.hiddenColumns.splice(t,1),this.generateCollapsedContent(),this.collapseHandleColumn&&!this.hiddenColumns.length&&this.collapseHandleColumn.hide())},Y.prototype.update=function(){for(var e=this,t=!0;t;){var o="fitColumns"==e.table.modules.layout.getMode()?e.table.columnManager.getFlexBaseWidth():e.table.columnManager.getWidth(),i=(e.table.options.headerVisible?e.table.columnManager.element.clientWidth:e.table.element.clientWidth)-o;if(i<0){var n=e.columns[e.index];n?(e.hideColumn(n),e.index++):t=!1}else{var s=e.columns[e.index-1] +;s&&i>0&&i>=s.getWidth()?(e.showColumn(s),e.index--):t=!1}e.table.rowManager.activeRowsCount||e.table.rowManager.renderEmptyScroll()}},Y.prototype.generateCollapsedContent=function(){var e=this;this.table.rowManager.getDisplayRows().forEach(function(t){e.generateCollapsedRowContent(t)})},Y.prototype.generateCollapsedRowContent=function(e){var t,o;if(e.modules.responsiveLayout){for(t=e.modules.responsiveLayout.element;t.firstChild;)t.removeChild(t.firstChild);o=this.collapseFormatter(this.generateCollapsedRowData(e)),o&&t.appendChild(o)}},Y.prototype.generateCollapsedRowData=function(e){var t,o=this,i=e.getData(),n=[];return this.hiddenColumns.forEach(function(s){var r=s.getFieldValue(i);s.definition.title&&s.field&&(s.modules.format&&o.table.options.responsiveLayoutCollapseUseFormatters?(t={value:!1,data:{},getValue:function(){return r},getData:function(){return i},getElement:function(){return document.createElement("div")},getRow:function(){return e.getComponent()},getColumn:function(){return s.getComponent()}},n.push({title:s.definition.title,value:s.modules.format.formatter.call(o.table.modules.format,t,s.modules.format.params)})):n.push({title:s.definition.title,value:r}))}),n},Y.prototype.formatCollapsedData=function(e){var t=document.createElement("table"),o="";return e.forEach(function(e){var t=document.createElement("div");e.value instanceof Node&&(t.appendChild(e.value),e.value=t.innerHTML),o+=""+e.title+""+e.value+""}),t.innerHTML=o,Object.keys(e).length?t:""},d.prototype.registerModule("responsiveLayout",Y);var q=function(e){this.table=e,this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],this.headerCheckboxElement=null};q.prototype.clearSelectionData=function(e){this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],e||this._rowSelectionChanged()},q.prototype.initializeRow=function(e){var t=this,o=e.getElement(),i=function e(){setTimeout(function(){t.selecting=!1},50),document.body.removeEventListener("mouseup",e)};e.modules.select={selected:!1},t.table.options.selectableCheck.call(this.table,e.getComponent())?(o.classList.add("tabulator-selectable"),o.classList.remove("tabulator-unselectable"),t.table.options.selectable&&"highlight"!=t.table.options.selectable&&("click"===t.table.options.selectableRangeMode?o.addEventListener("click",function(o){if(o.shiftKey){t.table._clearSelection(),t.lastClickedRow=t.lastClickedRow||e;var i=t.table.rowManager.getDisplayRowIndex(t.lastClickedRow),n=t.table.rowManager.getDisplayRowIndex(e),s=i<=n?i:n,r=i>=n?i:n,a=t.table.rowManager.getDisplayRows().slice(0),l=a.splice(s,r-s+1);o.ctrlKey||o.metaKey?(l.forEach(function(o){o!==t.lastClickedRow&&(!0===t.table.options.selectable||t.isRowSelected(e)?t.toggleRow(o):t.selectedRows.lengtht.table.options.selectable&&(l=l.slice(0,t.table.options.selectable)),t.selectRows(l)),t.table._clearSelection()}else o.ctrlKey||o.metaKey?(t.toggleRow(e),t.lastClickedRow=e):(t.deselectRows(void 0,!0),t.selectRows(e),t.lastClickedRow=e)}):(o.addEventListener("click",function(o){t.table.modExists("edit")&&t.table.modules.edit.getCurrentCell()||t.table._clearSelection(),t.selecting||t.toggleRow(e)}),o.addEventListener("mousedown",function(o){if(o.shiftKey)return t.table._clearSelection(),t.selecting=!0,t.selectPrev=[],document.body.addEventListener("mouseup",i),document.body.addEventListener("keyup",i),t.toggleRow(e),!1}),o.addEventListener("mouseenter",function(o){t.selecting&&(t.table._clearSelection(),t.toggleRow(e),t.selectPrev[1]==e&&t.toggleRow(t.selectPrev[0]))}),o.addEventListener("mouseout",function(o){t.selecting&&(t.table._clearSelection(),t.selectPrev.unshift(e))})))):(o.classList.add("tabulator-unselectable"),o.classList.remove("tabulator-selectable"))},q.prototype.toggleRow=function(e){this.table.options.selectableCheck.call(this.table,e.getComponent())&&(e.modules.select&&e.modules.select.selected?this._deselectRow(e):this._selectRow(e))},q.prototype.selectRows=function(e){var t,o=this;switch(void 0===e?"undefined":_typeof(e)){case"undefined":this.table.rowManager.rows.forEach(function(e){o._selectRow(e,!0,!0)}),this._rowSelectionChanged();break;case"string":t=this.table.rowManager.findRow(e),t?this._selectRow(t,!0,!0):this.table.rowManager.getRows(e).forEach(function(e){o._selectRow(e,!0,!0)}),this._rowSelectionChanged();break;default:Array.isArray(e)?(e.forEach(function(e){o._selectRow(e,!0,!0)}),this._rowSelectionChanged()):this._selectRow(e,!1,!0)}},q.prototype._selectRow=function(e,t,o){if(!isNaN(this.table.options.selectable)&&!0!==this.table.options.selectable&&!o&&this.selectedRows.length>=this.table.options.selectable){if(!this.table.options.selectableRollingSelection)return!1;this._deselectRow(this.selectedRows[0])}var i=this.table.rowManager.findRow(e);i?-1==this.selectedRows.indexOf(i)&&(i.modules.select||(i.modules.select={}),i.modules.select.selected=!0,i.modules.select.checkboxEl&&(i.modules.select.checkboxEl.checked=!0),i.getElement().classList.add("tabulator-selected"),this.selectedRows.push(i),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(i,!0),t||this.table.options.rowSelected.call(this.table,i.getComponent()),this._rowSelectionChanged(t)):t||console.warn("Selection Error - No such row found, ignoring selection:"+e)},q.prototype.isRowSelected=function(e){return-1!==this.selectedRows.indexOf(e)},q.prototype.deselectRows=function(e,t){var o,i=this;if(void 0===e){o=i.selectedRows.length;for(var n=0;n-1&&(n.modules.select||(n.modules.select={}),n.modules.select.selected=!1,n.modules.select.checkboxEl&&(n.modules.select.checkboxEl.checked=!1),n.getElement().classList.remove("tabulator-selected"),i.selectedRows.splice(o,1),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(n,!1),t||i.table.options.rowDeselected.call(this.table,n.getComponent()),i._rowSelectionChanged(t)):t||console.warn("Deselection Error - No such row found, ignoring selection:"+e)},q.prototype.getSelectedData=function(){var e=[];return this.selectedRows.forEach(function(t){e.push(t.getData())}),e},q.prototype.getSelectedRows=function(){var e=[];return this.selectedRows.forEach(function(t){e.push(t.getComponent())}),e},q.prototype._rowSelectionChanged=function(e){this.headerCheckboxElement&&(0===this.selectedRows.length?(this.headerCheckboxElement.checked=!1,this.headerCheckboxElement.indeterminate=!1):this.table.rowManager.rows.length===this.selectedRows.length?(this.headerCheckboxElement.checked=!0,this.headerCheckboxElement.indeterminate=!1):(this.headerCheckboxElement.indeterminate=!0,this.headerCheckboxElement.checked=!1)),e||this.table.options.rowSelectionChanged.call(this.table,this.getSelectedData(),this.getSelectedRows())},q.prototype.registerRowSelectCheckbox=function(e,t){e._row.modules.select||(e._row.modules.select={}),e._row.modules.select.checkboxEl=t},q.prototype.registerHeaderSelectCheckbox=function(e){this.headerCheckboxElement=e},q.prototype.childRowSelection=function(e,t){var o=this.table.modules.dataTree.getChildren(e);if(t)for(var i=o,n=Array.isArray(i),s=0,i=n?i:i[Symbol.iterator]();;){var r;if(n){if(s>=i.length)break;r=i[s++]}else{if(s=i.next(),s.done)break;r=s.value}var a=r;this._selectRow(a,!0)}else for(var l=o,c=Array.isArray(l),u=0,l=c?l:l[Symbol.iterator]();;){var d;if(c){if(u>=l.length)break;d=l[u++]}else{if(u=l.next(),u.done)break;d=u.value}var h=d;this._deselectRow(h,!0)}},d.prototype.registerModule("selectRow",q);var X=function(e){this.table=e,this.sortList=[],this.changed=!1};X.prototype.initializeColumn=function(e,t){var o,i,n=this,s=!1;switch(_typeof(e.definition.sorter)){case"string":n.sorters[e.definition.sorter]?s=n.sorters[e.definition.sorter]:console.warn("Sort Error - No such sorter found: ",e.definition.sorter);break;case"function":s=e.definition.sorter}e.modules.sort={sorter:s,dir:"none",params:e.definition.sorterParams||{},startingDir:e.definition.headerSortStartingDir||"asc",tristate:void 0!==e.definition.headerSortTristate?e.definition.headerSortTristate:this.table.options.headerSortTristate},(void 0===e.definition.headerSort?!1!==this.table.options.headerSort:!1!==e.definition.headerSort)&&(o=e.getElement(),o.classList.add("tabulator-sortable"),i=document.createElement("div"),i.classList.add("tabulator-arrow"),t.appendChild(i),o.addEventListener("click",function(t){var o="",i=[],s=!1;if(e.modules.sort){if(e.modules.sort.tristate)o="none"==e.modules.sort.dir?e.modules.sort.startingDir:e.modules.sort.dir==e.modules.sort.startingDir?"asc"==e.modules.sort.dir?"desc":"asc":"none";else switch(e.modules.sort.dir){case"asc":o="desc";break;case"desc":o="asc";break;default:o=e.modules.sort.startingDir}n.table.options.columnHeaderSortMulti&&(t.shiftKey||t.ctrlKey)?(i=n.getSort(),s=i.findIndex(function(t){return t.field===e.getField()}),s>-1?(i[s].dir=o,s!=i.length-1&&(s=i.splice(s,1)[0],"none"!=o&&i.push(s))):"none"!=o&&i.push({column:e,dir:o}),n.setSort(i)):"none"==o?n.clear():n.setSort(e,o),n.table.rowManager.sorterRefresh(!n.sortList.length)}}))},X.prototype.hasChanged=function(){var e=this.changed;return this.changed=!1,e},X.prototype.getSort=function(){var e=this,t=[];return e.sortList.forEach(function(e){e.column&&t.push({column:e.column.getComponent(),field:e.column.getField(),dir:e.dir})}),t},X.prototype.setSort=function(e,t){var o=this,i=[];Array.isArray(e)||(e=[{column:e,dir:t}]),e.forEach(function(e){var t;t=o.table.columnManager.findColumn(e.column),t?(e.column=t,i.push(e),o.changed=!0):console.warn("Sort Warning - Sort field does not exist and is being ignored: ",e.column)}),o.sortList=i,this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.sort&&this.table.modules.persistence.save("sort")},X.prototype.clear=function(){this.setSort([])},X.prototype.findSorter=function(e){var t,o=this.table.rowManager.activeRows[0],i="string";if(o&&(o=o.getData(),e.getField()))switch(t=e.getFieldValue(o),void 0===t?"undefined":_typeof(t)){case"undefined":i="string";break;case"boolean":i="boolean";break;default:isNaN(t)||""===t?t.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)&&(i="alphanum"):i="number"}return this.sorters[i]},X.prototype.sort=function(e){var t=this,o=this.table.options.sortOrderReverse?t.sortList.slice().reverse():t.sortList,i=[],n=[];t.table.options.dataSorting&&t.table.options.dataSorting.call(t.table,t.getSort()),t.clearColumnHeaders(),t.table.options.ajaxSorting?o.forEach(function(e,o){t.setColumnHeader(e.column,e.dir)}):(o.forEach(function(e,o){var n=e.column.modules.sort;e.column&&n&&(n.sorter||(n.sorter=t.findSorter(e.column)),e.params="function"==typeof n.params?n.params(e.column.getComponent(),e.dir):n.params,i.push(e)),t.setColumnHeader(e.column,e.dir)}),i.length&&t._sortItems(e,i)),t.table.options.dataSorted&&(e.forEach(function(e){n.push(e.getComponent())}),t.table.options.dataSorted.call(t.table,t.getSort(),n))},X.prototype.clearColumnHeaders=function(){this.table.columnManager.getRealColumns().forEach(function(e){e.modules.sort&&(e.modules.sort.dir="none",e.getElement().setAttribute("aria-sort","none"))})},X.prototype.setColumnHeader=function(e,t){e.modules.sort.dir=t,e.getElement().setAttribute("aria-sort",t)},X.prototype._sortItems=function(e,t){var o=this,i=t.length-1;e.sort(function(e,n){for(var s,r=i;r>=0;r--){var a=t[r];if(0!==(s=o._sortRow(e,n,a.column,a.dir,a.params)))break}return s})},X.prototype._sortRow=function(e,t,o,i,n){var s,r,a="asc"==i?e:t,l="asc"==i?t:e;return e=o.getFieldValue(a.getData()),t=o.getFieldValue(l.getData()),e=void 0!==e?e:"",t=void 0!==t?t:"",s=a.getComponent(),r=l.getComponent(),o.modules.sort.sorter.call(this,e,t,s,r,o.getComponent(),i,n)},X.prototype.sorters={number:function(e,t,o,i,n,s,r){var a=r.alignEmptyValues,l=r.decimalSeparator||".",c=r.thousandSeparator||",",u=0;if(e=parseFloat(String(e).split(c).join("").split(l).join(".")),t=parseFloat(String(t).split(c).join("").split(l).join(".")),isNaN(e))u=isNaN(t)?0:-1;else{if(!isNaN(t))return e-t;u=1}return("top"===a&&"desc"===s||"bottom"===a&&"asc"===s)&&(u*=-1),u},string:function(e,t,o,i,n,s,r){var a,l=r.alignEmptyValues,c=0;if(e){if(t){switch(_typeof(r.locale)){case"boolean":r.locale&&(a=this.table.modules.localize.getLocale());break;case"string":a=r.locale}return String(e).toLowerCase().localeCompare(String(t).toLowerCase(),a)}c=1}else c=t?-1:0;return("top"===l&&"desc"===s||"bottom"===l&&"asc"===s)&&(c*=-1),c},date:function(e,t,o,i,n,s,r){return r.format||(r.format="DD/MM/YYYY"),this.sorters.datetime.call(this,e,t,o,i,n,s,r)},time:function(e,t,o,i,n,s,r){return r.format||(r.format="HH:mm"),this.sorters.datetime.call(this,e,t,o,i,n,s,r)},datetime:function(e,t,o,i,n,s,r){var a=r.format||"DD/MM/YYYY HH:mm:ss",l=r.alignEmptyValues,c=0;if("undefined"!=typeof moment){if(e=moment(e,a),t=moment(t,a),e.isValid()){if(t.isValid())return e-t;c=1}else c=t.isValid()?-1:0;return("top"===l&&"desc"===s||"bottom"===l&&"asc"===s)&&(c*=-1),c}console.error("Sort Error - 'datetime' sorter is dependant on moment.js")},boolean:function(e,t,o,i,n,s,r){return(!0===e||"true"===e||"True"===e||1===e?1:0)-(!0===t||"true"===t||"True"===t||1===t?1:0)},array:function(e,t,o,i,n,s,r){function a(e){switch(u){case"length":return e.length;case"sum":return e.reduce(function(e,t){return e+t});case"max":return Math.max.apply(null,e);case"min":return Math.min.apply(null,e);case"avg":return e.reduce(function(e,t){return e+t})/e.length}}var l=0,c=0,u=r.type||"length",d=r.alignEmptyValues,h=0;if(Array.isArray(e)){if(Array.isArray(t))return l=e?a(e):0,c=t?a(t):0,l-c;d=1}else d=Array.isArray(t)?-1:0;return("top"===d&&"desc"===s||"bottom"===d&&"asc"===s)&&(h*=-1),h},exists:function(e,t,o,i,n,s,r){return(void 0===e?0:1)-(void 0===t?0:1)},alphanum:function(e,t,o,i,n,s,r){var a,l,c,u,d,h=0,p=/(\d+)|(\D+)/g,m=/\d/,f=r.alignEmptyValues,g=0;if(e||0===e){if(t||0===t){if(isFinite(e)&&isFinite(t))return e-t;if(a=String(e).toLowerCase(),l=String(t).toLowerCase(),a===l)return 0;if(!m.test(a)||!m.test(l))return a>l?1:-1;for(a=a.match(p),l=l.match(p),d=a.length>l.length?l.length:a.length;hu?1:-1;return a.length>l.length}g=1}else g=t||0===t?-1:0;return("top"===f&&"desc"===s||"bottom"===f&&"asc"===s)&&(g*=-1),g}},d.prototype.registerModule("sort",X);var K=function(e){this.table=e,this.invalidCells=[]};return K.prototype.initializeColumn=function(e){var t,o=this,i=[];e.definition.validator&&(Array.isArray(e.definition.validator)?e.definition.validator.forEach(function(e){(t=o._extractValidator(e))&&i.push(t)}):(t=this._extractValidator(e.definition.validator))&&i.push(t),e.modules.validate=!!i.length&&i)},K.prototype._extractValidator=function(e){var t,o,i;switch(void 0===e?"undefined":_typeof(e)){case"string":return i=e.indexOf(":"),i>-1?(t=e.substring(0,i),o=e.substring(i+1)):t=e,this._buildValidator(t,o);case"function":return this._buildValidator(e);case"object":return this._buildValidator(e.type,e.parameters)}},K.prototype._buildValidator=function(e,t){var o="function"==typeof e?e:this.validators[e];return o?{type:"function"==typeof e?"function":e,func:o,params:t}:(console.warn("Validator Setup Error - No matching validator found:",e),!1)},K.prototype.validate=function(e,t,o){var i=this,n=[],s=this.invalidCells.indexOf(t);return e&&e.forEach(function(e){e.func.call(i,t.getComponent(),o,e.params)||n.push({type:e.type,parameters:e.params})}),n=!n.length||n,t.modules.validate||(t.modules.validate={}),!0===n?(t.modules.validate.invalid=!1,t.getElement().classList.remove("tabulator-validation-fail"),s>-1&&this.invalidCells.splice(s,1)):(t.modules.validate.invalid=!0,"manual"!==this.table.options.validationMode&&t.getElement().classList.add("tabulator-validation-fail"),-1==s&&this.invalidCells.push(t)),n},K.prototype.getInvalidCells=function(){var e=[];return this.invalidCells.forEach(function(t){e.push(t.getComponent())}),e},K.prototype.clearValidation=function(e){var t;e.modules.validate&&e.modules.validate.invalid&&(e.element.classList.remove("tabulator-validation-fail"),e.modules.validate.invalid=!1,(t=this.invalidCells.indexOf(e))>-1&&this.invalidCells.splice(t,1))},K.prototype.validators={integer:function(e,t,o){return""===t||null===t||void 0===t||"number"==typeof(t=Number(t))&&isFinite(t)&&Math.floor(t)===t},float:function(e,t,o){return""===t||null===t||void 0===t||"number"==typeof(t=Number(t))&&isFinite(t)&&t%1!=0},numeric:function(e,t,o){return""===t||null===t||void 0===t||!isNaN(t)},string:function(e,t,o){return""===t||null===t||void 0===t||isNaN(t)},max:function(e,t,o){return""===t||null===t||void 0===t||parseFloat(t)<=o},min:function(e,t,o){return""===t||null===t||void 0===t||parseFloat(t)>=o},starts:function(e,t,o){return""===t||null===t||void 0===t||String(t).toLowerCase().startsWith(String(o).toLowerCase())},ends:function(e,t,o){return""===t||null===t||void 0===t||String(t).toLowerCase().endsWith(String(o).toLowerCase())},minLength:function(e,t,o){return""===t||null===t||void 0===t||String(t).length>=o},maxLength:function(e,t,o){return""===t||null===t||void 0===t||String(t).length<=o},in:function(e,t,o){return""===t||null===t||void 0===t||("string"==typeof o&&(o=o.split("|")),""===t||o.indexOf(t)>-1)},regex:function(e,t,o){return""===t||null===t||void 0===t||new RegExp(o).test(t)},unique:function(e,t,o){if(""===t||null===t||void 0===t)return!0;var i=!0,n=e.getData(),s=e.getColumn()._getSelf();return this.table.rowManager.rows.forEach(function(e){var o=e.getData();o!==n&&t==s.getFieldValue(o)&&(i=!1)}),i},required:function(e,t,o){return""!==t&&null!==t&&void 0!==t}},d.prototype.registerModule("validate",K),d}); \ No newline at end of file diff --git a/website/js/vendor/tabulator/js/tabulator_core.js b/admin/js/vendors/tabulator/js/tabulator_core.js similarity index 87% rename from website/js/vendor/tabulator/js/tabulator_core.js rename to admin/js/vendors/tabulator/js/tabulator_core.js index 63ce7bc..1c4797a 100644 --- a/website/js/vendor/tabulator/js/tabulator_core.js +++ b/admin/js/vendors/tabulator/js/tabulator_core.js @@ -1,4 +1,4 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ 'use strict'; @@ -424,7 +424,6 @@ ColumnManager.prototype.scrollHorizontal = function (left) { ColumnManager.prototype.generateColumnsFromRowData = function (data) { var cols = [], - definitions = this.table.options.autoColumnsDefinitions, row, sorter; @@ -495,52 +494,7 @@ ColumnManager.prototype.generateColumnsFromRowData = function (data) { cols.push(col); } - if (definitions) { - - switch (typeof definitions === 'undefined' ? 'undefined' : _typeof(definitions)) { - - case "function": - - this.table.options.columns = definitions.call(this.table, cols); - - break; - - case "object": - - if (Array.isArray(definitions)) { - - cols.forEach(function (col) { - - var match = definitions.find(function (def) { - - return def.field === col.field; - }); - - if (match) { - - Object.assign(col, match); - } - }); - } else { - - cols.forEach(function (col) { - - if (definitions[col.field]) { - - Object.assign(col, definitions[col.field]); - } - }); - } - - this.table.options.columns = cols; - - break; - - } - } else { - - this.table.options.columns = cols; - } + this.table.options.columns = cols; this.setColumns(this.table.options.columns); } @@ -577,11 +531,6 @@ ColumnManager.prototype.setColumns = function (cols, row) { self.table.modules.responsiveLayout.initialize(); } - if (this.table.options.virtualDomHoz) { - - this.table.vdomHoz.reinitialize(false, true); - } - self.redraw(true); }; @@ -898,11 +847,6 @@ ColumnManager.prototype.moveColumnActual = function (from, to, after) { this.table.modules.responsiveLayout.initialize(); } - if (this.table.options.virtualDomHoz) { - - this.table.vdomHoz.reinitialize(true); - } - if (this.table.options.columnMoved) { this.table.options.columnMoved.call(this.table, from.getComponent(), this.table.columnManager.getComponents()); @@ -915,11 +859,9 @@ ColumnManager.prototype.moveColumnActual = function (from, to, after) { }; ColumnManager.prototype._moveColumnInArray = function (columns, from, to, after, updateRows) { - var _this2 = this; var fromIndex = columns.indexOf(from), - toIndex, - rows = []; + toIndex; if (fromIndex > -1) { @@ -942,17 +884,7 @@ ColumnManager.prototype._moveColumnInArray = function (columns, from, to, after, if (updateRows) { - if (this.table.options.dataTree && this.table.modExists("dataTree", true)) { - - this.table.rowManager.rows.forEach(function (row) { - - rows = rows.concat(_this2.table.modules.dataTree.getTreeChildren(row, false, true)); - }); - } - - rows = rows.concat(this.table.rowManager.rows); - - rows.forEach(function (row) { + this.table.rowManager.rows.forEach(function (row) { if (row.cells.length) { @@ -966,7 +898,7 @@ ColumnManager.prototype._moveColumnInArray = function (columns, from, to, after, }; ColumnManager.prototype.scrollToColumn = function (column, position, ifVisible) { - var _this3 = this; + var _this2 = this; var left = 0, offset = 0, @@ -977,12 +909,12 @@ ColumnManager.prototype.scrollToColumn = function (column, position, ifVisible) if (typeof position === "undefined") { - position = _this3.table.options.scrollToColumnPosition; + position = _this2.table.options.scrollToColumnPosition; } if (typeof ifVisible === "undefined") { - ifVisible = _this3.table.options.scrollToColumnIfVisible; + ifVisible = _this2.table.options.scrollToColumnIfVisible; } if (column.visible) { @@ -995,13 +927,13 @@ ColumnManager.prototype.scrollToColumn = function (column, position, ifVisible) case "center": - adjust = -_this3.element.clientWidth / 2; + adjust = -_this2.element.clientWidth / 2; break; case "right": - adjust = colEl.clientWidth - _this3.headersElement.clientWidth; + adjust = colEl.clientWidth - _this2.headersElement.clientWidth; break; @@ -1013,7 +945,7 @@ ColumnManager.prototype.scrollToColumn = function (column, position, ifVisible) offset = colEl.offsetLeft; - if (offset > 0 && offset + colEl.offsetWidth < _this3.element.clientWidth) { + if (offset > 0 && offset + colEl.offsetWidth < _this2.element.clientWidth) { return false; } @@ -1021,13 +953,13 @@ ColumnManager.prototype.scrollToColumn = function (column, position, ifVisible) //calculate scroll position - left = colEl.offsetLeft + adjust; + left = colEl.offsetLeft + _this2.element.scrollLeft + adjust; - left = Math.max(Math.min(left, _this3.table.rowManager.element.scrollWidth - _this3.table.rowManager.element.clientWidth), 0); + left = Math.max(Math.min(left, _this2.table.rowManager.element.scrollWidth - _this2.table.rowManager.element.clientWidth), 0); - _this3.table.rowManager.scrollHorizontal(left); + _this2.table.rowManager.scrollHorizontal(left); - _this3.scrollHorizontal(left); + _this2.scrollHorizontal(left); resolve(); } else { @@ -1106,39 +1038,34 @@ ColumnManager.prototype.getFlexBaseWidth = function () { }; ColumnManager.prototype.addColumn = function (definition, before, nextToColumn) { - var _this4 = this; + var _this3 = this; return new Promise(function (resolve, reject) { - var column = _this4._addColumn(definition, before, nextToColumn); + var column = _this3._addColumn(definition, before, nextToColumn); - _this4._reIndexColumns(); + _this3._reIndexColumns(); - if (_this4.table.options.responsiveLayout && _this4.table.modExists("responsiveLayout", true)) { + if (_this3.table.options.responsiveLayout && _this3.table.modExists("responsiveLayout", true)) { - _this4.table.modules.responsiveLayout.initialize(); + _this3.table.modules.responsiveLayout.initialize(); } - if (_this4.table.modExists("columnCalcs")) { + if (_this3.table.modExists("columnCalcs")) { - _this4.table.modules.columnCalcs.recalc(_this4.table.rowManager.activeRows); + _this3.table.modules.columnCalcs.recalc(_this3.table.rowManager.activeRows); } - _this4.redraw(); + _this3.redraw(); - if (_this4.table.modules.layout.getMode() != "fitColumns") { + if (_this3.table.modules.layout.getMode() != "fitColumns") { column.reinitializeWidth(); } - _this4._verticalAlignHeaders(); - - _this4.table.rowManager.reinitialize(); - - if (_this4.table.options.virtualDomHoz) { + _this3._verticalAlignHeaders(); - _this4.table.vdomHoz.reinitialize(); - } + _this3.table.rowManager.reinitialize(); resolve(column); }); @@ -1181,8 +1108,6 @@ ColumnManager.prototype.deregisterColumn = function (column) { this.table.modules.responsiveLayout.initialize(); } - this._verticalAlignHeaders(); - this.redraw(); }; @@ -1397,19 +1322,11 @@ ColumnComponent.prototype.getWidth = function () { }; ColumnComponent.prototype.setWidth = function (width) { - var result; - if (width === true) { - result = this._column.reinitializeWidth(true); + return this._column.reinitializeWidth(true); } else { - result = this._column.setWidth(width); + return this._column.setWidth(width); } - - if (this._column.table.options.virtualDomHoz) { - this._column.table.vdomHoz.reinitialize(true); - } - - return result; }; ColumnComponent.prototype.validate = function () { @@ -1427,7 +1344,6 @@ var Column = function Column(def, parent) { this.cells = []; //cells bound to this column this.element = this.createElement(); //column header element this.contentElement = false; - this.titleHolderElement = false; this.titleElement = false; this.groupElement = this.createGroupElement(); //column group holder element this.isGroup = false; @@ -1520,11 +1436,11 @@ Column.prototype.createGroupElement = function () { }; Column.prototype.checkDefinition = function () { - var _this5 = this; + var _this4 = this; Object.keys(this.definition).forEach(function (key) { - if (_this5.defaultOptionList.indexOf(key) === -1) { - console.warn("Invalid column definition option in '" + (_this5.field || _this5.definition.title) + "' column:", key); + if (_this4.defaultOptionList.indexOf(key) === -1) { + console.warn("Invalid column definition option in '" + (_this4.field || _this4.definition.title) + "' column:", key); } }); }; @@ -1822,58 +1738,57 @@ Column.prototype._bindEvents = function () { //build header element for header Column.prototype._buildColumnHeader = function () { - var _this6 = this; - - var def = this.definition, - table = this.table, + var self = this, + def = self.definition, + table = self.table, sortable; //set column sorter if (table.modExists("sort")) { - table.modules.sort.initializeColumn(this, this.titleHolderElement); + table.modules.sort.initializeColumn(self, self.contentElement); } //set column header context menu - if ((def.headerContextMenu || def.headerClickMenu || def.headerMenu) && table.modExists("menu")) { - table.modules.menu.initializeColumnHeader(this); + if ((def.headerContextMenu || def.headerMenu) && table.modExists("menu")) { + table.modules.menu.initializeColumnHeader(self); } //set column formatter if (table.modExists("format")) { - table.modules.format.initializeColumn(this); + table.modules.format.initializeColumn(self); } //set column editor if (typeof def.editor != "undefined" && table.modExists("edit")) { - table.modules.edit.initializeColumn(this); + table.modules.edit.initializeColumn(self); } //set colum validator if (typeof def.validator != "undefined" && table.modExists("validate")) { - table.modules.validate.initializeColumn(this); + table.modules.validate.initializeColumn(self); } //set column mutator if (table.modExists("mutator")) { - table.modules.mutator.initializeColumn(this); + table.modules.mutator.initializeColumn(self); } //set column accessor if (table.modExists("accessor")) { - table.modules.accessor.initializeColumn(this); + table.modules.accessor.initializeColumn(self); } //set respoviveLayout if (_typeof(table.options.responsiveLayout) && table.modExists("responsiveLayout")) { - table.modules.responsiveLayout.initializeColumn(this); + table.modules.responsiveLayout.initializeColumn(self); } //set column visibility if (typeof def.visible != "undefined") { if (def.visible) { - this.show(true); + self.show(true); } else { - this.hide(true); + self.hide(true); } } @@ -1881,7 +1796,7 @@ Column.prototype._buildColumnHeader = function () { if (def.cssClass) { var classeNames = def.cssClass.split(" "); classeNames.forEach(function (className) { - _this6.element.classList.add(className); + self.element.classList.add(className); }); } @@ -1890,18 +1805,16 @@ Column.prototype._buildColumnHeader = function () { } //set min width if present - this.setMinWidth(typeof def.minWidth == "undefined" ? this.table.options.columnMinWidth : parseInt(def.minWidth)); + self.setMinWidth(typeof def.minWidth == "undefined" ? self.table.options.columnMinWidth : parseInt(def.minWidth)); - this.reinitializeWidth(); + self.reinitializeWidth(); //set tooltip if present - this.tooltip = this.definition.tooltip || this.definition.tooltip === false ? this.definition.tooltip : this.table.options.tooltips; + self.tooltip = self.definition.tooltip || self.definition.tooltip === false ? self.definition.tooltip : self.table.options.tooltips; //set orizontal text alignment - this.hozAlign = typeof this.definition.hozAlign == "undefined" ? this.table.options.cellHozAlign : this.definition.hozAlign; - this.vertAlign = typeof this.definition.vertAlign == "undefined" ? this.table.options.cellVertAlign : this.definition.vertAlign; - - this.titleElement.style.textAlign = this.definition.headerHozAlign || this.table.options.headerHozAlign; + self.hozAlign = typeof self.definition.hozAlign == "undefined" ? self.table.options.cellHozAlign : self.definition.hozAlign; + self.vertAlign = typeof self.definition.vertAlign == "undefined" ? self.table.options.cellVertAlign : self.definition.vertAlign; }; Column.prototype._buildColumnHeaderContent = function () { @@ -1911,14 +1824,9 @@ Column.prototype._buildColumnHeaderContent = function () { var contentElement = document.createElement("div"); contentElement.classList.add("tabulator-col-content"); - this.titleHolderElement = document.createElement("div"); - this.titleHolderElement.classList.add("tabulator-col-title-holder"); - - contentElement.appendChild(this.titleHolderElement); - this.titleElement = this._buildColumnHeaderTitle(); - this.titleHolderElement.appendChild(this.titleElement); + contentElement.appendChild(this.titleElement); return contentElement; }; @@ -1970,7 +1878,7 @@ Column.prototype._buildColumnHeaderTitle = function () { }; Column.prototype._formatColumnHeaderTitle = function (el, title) { - var _this7 = this; + var _this5 = this; var formatter, contents, params, mockCell, onRendered; @@ -1979,7 +1887,7 @@ Column.prototype._formatColumnHeaderTitle = function (el, title) { formatter = this.table.modules.format.getFormatter(this.definition.titleFormatter); onRendered = function onRendered(callback) { - _this7.titleFormatterRendered = callback; + _this5.titleFormatterRendered = callback; }; mockCell = { @@ -2020,7 +1928,7 @@ Column.prototype._formatColumnHeaderTitle = function (el, title) { //build header element for column group Column.prototype._buildGroupHeader = function () { - var _this8 = this; + var _this6 = this; this.element.classList.add("tabulator-col-group"); this.element.setAttribute("role", "columngroup"); @@ -2030,7 +1938,7 @@ Column.prototype._buildGroupHeader = function () { if (this.definition.cssClass) { var classeNames = this.definition.cssClass.split(" "); classeNames.forEach(function (className) { - _this8.element.classList.add(className); + _this6.element.classList.add(className); }); } @@ -2433,43 +2341,32 @@ Column.prototype.setMinWidth = function (minWidth) { }; Column.prototype.delete = function () { - var _this9 = this; + var _this7 = this; return new Promise(function (resolve, reject) { - if (_this9.isGroup) { - _this9.columns.forEach(function (column) { + if (_this7.isGroup) { + _this7.columns.forEach(function (column) { column.delete(); }); } //cancel edit if column is currently being edited - if (_this9.table.modExists("edit")) { - if (_this9.table.modules.edit.currentCell.column === _this9) { - _this9.table.modules.edit.cancelEdit(); + if (_this7.table.modExists("edit")) { + if (_this7.table.modules.edit.currentCell.column === _this7) { + _this7.table.modules.edit.cancelEdit(); } } - var cellCount = _this9.cells.length; + var cellCount = _this7.cells.length; for (var i = 0; i < cellCount; i++) { - _this9.cells[0].delete(); + _this7.cells[0].delete(); } - if (_this9.element.parentNode) { - _this9.element.parentNode.removeChild(_this9.element); - } - - _this9.element = false; - _this9.contentElement = false; - _this9.titleElement = false; - _this9.groupElement = false; + _this7.element.parentNode.removeChild(_this7.element); - _this9.table.columnManager.deregisterColumn(_this9); - - if (_this9.table.options.virtualDomHoz) { - _this9.table.vdomHoz.reinitialize(true); - } + _this7.table.columnManager.deregisterColumn(_this7); resolve(); }); @@ -2577,22 +2474,22 @@ Column.prototype.fitToData = function () { }; Column.prototype.updateDefinition = function (updates) { - var _this10 = this; + var _this8 = this; return new Promise(function (resolve, reject) { var definition; - if (!_this10.isGroup) { - definition = Object.assign({}, _this10.getDefinition()); + if (!_this8.isGroup) { + definition = Object.assign({}, _this8.getDefinition()); definition = Object.assign(definition, updates); - _this10.table.columnManager.addColumn(definition, false, _this10).then(function (column) { + _this8.table.columnManager.addColumn(definition, false, _this8).then(function (column) { - if (definition.field == _this10.field) { - _this10.field = false; //cleair field name to prevent deletion of duplicate column from arrays + if (definition.field == _this8.field) { + _this8.field = false; //cleair field name to prevent deletion of duplicate column from arrays } - _this10.delete().then(function () { + _this8.delete().then(function () { resolve(column.getComponent()); }).catch(function (err) { reject(err); @@ -2601,8 +2498,8 @@ Column.prototype.updateDefinition = function (updates) { reject(err); }); } else { - console.warn("Column Update Error - The updateDefinition function is only available on columns, not column groups"); - reject("Column Update Error - The updateDefinition function is only available on columns, not column groups"); + console.warn("Column Update Error - The updateDefintion function is only available on columns, not column groups"); + reject("Column Update Error - The updateDefintion function is only available on columns, not column groups"); } }); }; @@ -2615,9 +2512,7 @@ Column.prototype.deleteCell = function (cell) { } }; -Column.prototype.defaultOptionList = ["title", "field", "columns", "visible", "align", "hozAlign", "vertAlign", "width", "minWidth", "widthGrow", "widthShrink", "resizable", "frozen", "responsive", "tooltip", "cssClass", "rowHandle", "hideInHtml", "print", "htmlOutput", "sorter", "sorterParams", "formatter", "formatterParams", "variableHeight", "editable", "editor", "editorParams", "validator", "mutator", "mutatorParams", "mutatorData", "mutatorDataParams", "mutatorEdit", "mutatorEditParams", "mutatorClipboard", "mutatorClipboardParams", "accessor", "accessorParams", "accessorData", "accessorDataParams", "accessorDownload", "accessorDownloadParams", "accessorClipboard", "accessorClipboardParams", "accessorPrint", "accessorPrintParams", "accessorHtmlOutput", "accessorHtmlOutputParams", "clipboard", "download", "downloadTitle", "topCalc", "topCalcParams", "topCalcFormatter", "topCalcFormatterParams", "bottomCalc", "bottomCalcParams", "bottomCalcFormatter", "bottomCalcFormatterParams", "cellClick", "cellDblClick", "cellContext", "cellTap", "cellDblTap", "cellTapHold", "cellMouseEnter", "cellMouseLeave", "cellMouseOver", "cellMouseOut", "cellMouseMove", "cellEditing", "cellEdited", "cellEditCancelled", "headerSort", "headerSortStartingDir", "headerSortTristate", "headerClick", "headerDblClick", "headerContext", "headerTap", "headerDblTap", "headerTapHold", "headerTooltip", "headerVertical", "headerHozAlign", "editableTitle", "titleFormatter", "titleFormatterParams", "headerFilter", "headerFilterPlaceholder", "headerFilterParams", "headerFilterEmptyCheck", "headerFilterFunc", "headerFilterFuncParams", "headerFilterLiveFilter", "print", "headerContextMenu", "headerMenu", "contextMenu", -// "headerClickMenu", -"clickMenu", "formatterPrint", "formatterPrintParams", "formatterClipboard", "formatterClipboardParams", "formatterHtmlOutput", "formatterHtmlOutputParams", "titlePrint", "titleClipboard", "titleHtmlOutput", "titleDownload"]; +Column.prototype.defaultOptionList = ["title", "field", "columns", "visible", "align", "hozAlign", "vertAlign", "width", "minWidth", "widthGrow", "widthShrink", "resizable", "frozen", "responsive", "tooltip", "cssClass", "rowHandle", "hideInHtml", "print", "htmlOutput", "sorter", "sorterParams", "formatter", "formatterParams", "variableHeight", "editable", "editor", "editorParams", "validator", "mutator", "mutatorParams", "mutatorData", "mutatorDataParams", "mutatorEdit", "mutatorEditParams", "mutatorClipboard", "mutatorClipboardParams", "accessor", "accessorParams", "accessorData", "accessorDataParams", "accessorDownload", "accessorDownloadParams", "accessorClipboard", "accessorClipboardParams", "accessorPrint", "accessorPrintParams", "accessorHtmlOutput", "accessorHtmlOutputParams", "clipboard", "download", "downloadTitle", "topCalc", "topCalcParams", "topCalcFormatter", "topCalcFormatterParams", "bottomCalc", "bottomCalcParams", "bottomCalcFormatter", "bottomCalcFormatterParams", "cellClick", "cellDblClick", "cellContext", "cellTap", "cellDblTap", "cellTapHold", "cellMouseEnter", "cellMouseLeave", "cellMouseOver", "cellMouseOut", "cellMouseMove", "cellEditing", "cellEdited", "cellEditCancelled", "headerSort", "headerSortStartingDir", "headerSortTristate", "headerClick", "headerDblClick", "headerContext", "headerTap", "headerDblTap", "headerTapHold", "headerTooltip", "headerVertical", "editableTitle", "titleFormatter", "titleFormatterParams", "headerFilter", "headerFilterPlaceholder", "headerFilterParams", "headerFilterEmptyCheck", "headerFilterFunc", "headerFilterFuncParams", "headerFilterLiveFilter", "print", "headerContextMenu", "headerMenu", "contextMenu", "formatterPrint", "formatterPrintParams", "formatterClipboard", "formatterClipboardParams", "formatterHtmlOutput", "formatterHtmlOutputParams", "titlePrint", "titleClipboard", "titleHtmlOutput", "titleDownload"]; //////////////// Event Bindings ///////////////// @@ -2834,7 +2729,7 @@ RowManager.prototype.getRowFromPosition = function (position, active) { }; RowManager.prototype.scrollToRow = function (row, position, ifVisible) { - var _this11 = this; + var _this9 = this; var rowIndex = this.getDisplayRows().indexOf(row), rowEl = row.getElement(), @@ -2845,21 +2740,21 @@ RowManager.prototype.scrollToRow = function (row, position, ifVisible) { if (rowIndex > -1) { if (typeof position === "undefined") { - position = _this11.table.options.scrollToRowPosition; + position = _this9.table.options.scrollToRowPosition; } if (typeof ifVisible === "undefined") { - ifVisible = _this11.table.options.scrollToRowIfVisible; + ifVisible = _this9.table.options.scrollToRowIfVisible; } if (position === "nearest") { - switch (_this11.renderMode) { + switch (_this9.renderMode) { case "classic": rowTop = Tabulator.prototype.helpers.elOffset(rowEl).top; - position = Math.abs(_this11.element.scrollTop - rowTop) > Math.abs(_this11.element.scrollTop + _this11.element.clientHeight - rowTop) ? "bottom" : "top"; + position = Math.abs(_this9.element.scrollTop - rowTop) > Math.abs(_this9.element.scrollTop + _this9.element.clientHeight - rowTop) ? "bottom" : "top"; break; case "virtual": - position = Math.abs(_this11.vDomTop - rowIndex) > Math.abs(_this11.vDomBottom - rowIndex) ? "bottom" : "top"; + position = Math.abs(_this9.vDomTop - rowIndex) > Math.abs(_this9.vDomBottom - rowIndex) ? "bottom" : "top"; break; } } @@ -2867,21 +2762,21 @@ RowManager.prototype.scrollToRow = function (row, position, ifVisible) { //check row visibility if (!ifVisible) { if (Tabulator.prototype.helpers.elVisible(rowEl)) { - offset = Tabulator.prototype.helpers.elOffset(rowEl).top - Tabulator.prototype.helpers.elOffset(_this11.element).top; + offset = Tabulator.prototype.helpers.elOffset(rowEl).top - Tabulator.prototype.helpers.elOffset(_this9.element).top; - if (offset > 0 && offset < _this11.element.clientHeight - rowEl.offsetHeight) { + if (offset > 0 && offset < _this9.element.clientHeight - rowEl.offsetHeight) { return false; } } } //scroll to row - switch (_this11.renderMode) { + switch (_this9.renderMode) { case "classic": - _this11.element.scrollTop = Tabulator.prototype.helpers.elOffset(rowEl).top - Tabulator.prototype.helpers.elOffset(_this11.element).top + _this11.element.scrollTop; + _this9.element.scrollTop = Tabulator.prototype.helpers.elOffset(rowEl).top - Tabulator.prototype.helpers.elOffset(_this9.element).top + _this9.element.scrollTop; break; case "virtual": - _this11._virtualRenderFill(rowIndex, true); + _this9._virtualRenderFill(rowIndex, true); break; } @@ -2890,20 +2785,20 @@ RowManager.prototype.scrollToRow = function (row, position, ifVisible) { case "middle": case "center": - if (_this11.element.scrollHeight - _this11.element.scrollTop == _this11.element.clientHeight) { - _this11.element.scrollTop = _this11.element.scrollTop + (rowEl.offsetTop - _this11.element.scrollTop) - (_this11.element.scrollHeight - rowEl.offsetTop) / 2; + if (_this9.element.scrollHeight - _this9.element.scrollTop == _this9.element.clientHeight) { + _this9.element.scrollTop = _this9.element.scrollTop + (rowEl.offsetTop - _this9.element.scrollTop) - (_this9.element.scrollHeight - rowEl.offsetTop) / 2; } else { - _this11.element.scrollTop = _this11.element.scrollTop - _this11.element.clientHeight / 2; + _this9.element.scrollTop = _this9.element.scrollTop - _this9.element.clientHeight / 2; } break; case "bottom": - if (_this11.element.scrollHeight - _this11.element.scrollTop == _this11.element.clientHeight) { - _this11.element.scrollTop = _this11.element.scrollTop - (_this11.element.scrollHeight - rowEl.offsetTop) + rowEl.offsetHeight; + if (_this9.element.scrollHeight - _this9.element.scrollTop == _this9.element.clientHeight) { + _this9.element.scrollTop = _this9.element.scrollTop - (_this9.element.scrollHeight - rowEl.offsetTop) + rowEl.offsetHeight; } else { - _this11.element.scrollTop = _this11.element.scrollTop - _this11.element.clientHeight + rowEl.offsetHeight; + _this9.element.scrollTop = _this9.element.scrollTop - _this9.element.clientHeight + rowEl.offsetHeight; } break; @@ -2920,26 +2815,25 @@ RowManager.prototype.scrollToRow = function (row, position, ifVisible) { ////////////////// Data Handling ////////////////// RowManager.prototype.setData = function (data, renderInPosition, columnsChanged) { - var _this12 = this; + var _this10 = this; var self = this; return new Promise(function (resolve, reject) { - if (renderInPosition && _this12.getDisplayRows().length) { + if (renderInPosition && _this10.getDisplayRows().length) { if (self.table.options.pagination) { self._setDataActual(data, true); } else { - _this12.reRenderInPosition(function () { + _this10.reRenderInPosition(function () { self._setDataActual(data); }); } } else { - if (_this12.table.options.autoColumns && columnsChanged) { - _this12.table.columnManager.generateColumnsFromRowData(data); + if (_this10.table.options.autoColumns && columnsChanged) { + _this10.table.columnManager.generateColumnsFromRowData(data); } - _this12.resetScroll(); - - _this12._setDataActual(data); + _this10.resetScroll(); + _this10._setDataActual(data); } resolve(); @@ -2976,9 +2870,9 @@ RowManager.prototype._setDataActual = function (data, renderInPosition) { } }); - self.refreshActiveData(false, false, renderInPosition); - self.table.options.dataLoaded.call(this.table, data); + + self.refreshActiveData(false, false, renderInPosition); } else { console.error("Data Loading Error - Unable to process data due to invalid data type \nExpecting: array \nReceived: ", typeof data === 'undefined' ? 'undefined' : _typeof(data), "\nData: ", data); } @@ -2994,12 +2888,6 @@ RowManager.prototype._wipeElements = function () { } this.rows = []; - this.activeRows = []; - this.activeRowsCount = 0; - this.displayRows = []; - this.displayRowsCount = 0; - - this.adjustTableSize(); }; RowManager.prototype.deleteRow = function (row, blockRedraw) { @@ -3032,9 +2920,7 @@ RowManager.prototype.deleteRow = function (row, blockRedraw) { this.table.options.rowDeleted.call(this.table, row.getComponent()); - if (this.table.options.dataChanged) { - this.table.options.dataChanged.call(this.table, this.getData()); - } + this.table.options.dataEdited.call(this.table, this.getData()); if (this.table.options.groupBy && this.table.modExists("groupRows")) { this.table.modules.groupRows.updateGroupRows(true); @@ -3060,14 +2946,14 @@ RowManager.prototype.addRow = function (data, pos, index, blockRedraw) { //add multiple rows RowManager.prototype.addRows = function (data, pos, index) { - var _this13 = this; + var _this11 = this; var self = this, length = 0, rows = []; return new Promise(function (resolve, reject) { - pos = _this13.findAddRowPos(pos); + pos = _this11.findAddRowPos(pos); if (!Array.isArray(data)) { data = [data]; @@ -3084,20 +2970,20 @@ RowManager.prototype.addRows = function (data, pos, index) { rows.push(row); }); - if (_this13.table.options.groupBy && _this13.table.modExists("groupRows")) { - _this13.table.modules.groupRows.updateGroupRows(true); - } else if (_this13.table.options.pagination && _this13.table.modExists("page")) { - _this13.refreshActiveData(false, false, true); + if (_this11.table.options.groupBy && _this11.table.modExists("groupRows")) { + _this11.table.modules.groupRows.updateGroupRows(true); + } else if (_this11.table.options.pagination && _this11.table.modExists("page")) { + _this11.refreshActiveData(false, false, true); } else { - _this13.reRenderInPosition(); + _this11.reRenderInPosition(); } //recalc column calculations if present - if (_this13.table.modExists("columnCalcs")) { - _this13.table.modules.columnCalcs.recalc(_this13.table.rowManager.activeRows); + if (_this11.table.modExists("columnCalcs")) { + _this11.table.modules.columnCalcs.recalc(_this11.table.rowManager.activeRows); } - _this13.regenerateRowNumbers(); + _this11.regenerateRowNumbers(); resolve(rows); }); }; @@ -3218,9 +3104,7 @@ RowManager.prototype.addRowActual = function (data, pos, index, blockRedraw) { this.table.options.rowAdded.call(this.table, row.getComponent()); - if (this.table.options.dataChanged) { - this.table.options.dataChanged.call(this.table, this.getData()); - } + this.table.options.dataEdited.call(this.table, this.getData()); if (!blockRedraw) { this.reRenderInPosition(); @@ -3242,13 +3126,13 @@ RowManager.prototype.moveRow = function (from, to, after) { }; RowManager.prototype.moveRowActual = function (from, to, after) { - var _this14 = this; + var _this12 = this; this._moveRowInArray(this.rows, from, to, after); this._moveRowInArray(this.activeRows, from, to, after); this.displayRowIterator(function (rows) { - _this14._moveRowInArray(rows, from, to, after); + _this12._moveRowInArray(rows, from, to, after); }); if (this.table.options.groupBy && this.table.modExists("groupRows")) { @@ -3402,7 +3286,7 @@ RowManager.prototype.getDataCount = function (active) { }; RowManager.prototype._genRemoteRequest = function () { - var _this15 = this; + var _this13 = this; var table = this.table, options = table.options, @@ -3431,7 +3315,7 @@ RowManager.prototype._genRemoteRequest = function () { } table.modules.ajax.sendRequest().then(function (data) { - _this15._setDataActual(data, true); + _this13._setDataActual(data, true); }).catch(function (e) {}); }; @@ -3653,13 +3537,7 @@ RowManager.prototype.refreshActiveData = function (stage, skipStage, renderInPos if (renderInPosition) { self.reRenderInPosition(); } else { - - if (stage === "all" && this.table.options.virtualDomHoz) { - this.table.vdomHoz.dataChange(); - } - self.renderTable(); - if (table.options.layoutColumnsOnNewData) { self.table.columnManager.redraw(true); } @@ -3674,11 +3552,11 @@ RowManager.prototype.refreshActiveData = function (stage, skipStage, renderInPos //regenerate row numbers for row number formatter if in use RowManager.prototype.regenerateRowNumbers = function () { - var _this16 = this; + var _this14 = this; if (this.rowNumColumn) { this.activeRows.forEach(function (row) { - var cell = row.getCell(_this16.rowNumColumn); + var cell = row.getCell(_this14.rowNumColumn); if (cell) { cell._generateContents(); @@ -3811,10 +3689,6 @@ RowManager.prototype.getRows = function (active) { rows = this.getVisibleRows(true); break; - case "selected": - rows = this.table.modules.selectRow.selectedRows; - break; - default: rows = this.rows; } @@ -3975,8 +3849,8 @@ RowManager.prototype.renderEmptyScroll = function () { this.tableElement.style.display = "none"; } else { this.tableElement.style.minWidth = this.table.columnManager.getWidth() + "px"; - // this.tableElement.style.minHeight = "1px"; - // this.tableElement.style.visibility = "hidden"; + this.tableElement.style.minHeight = "1px"; + this.tableElement.style.visibility = "hidden"; } }; @@ -4068,21 +3942,14 @@ RowManager.prototype._virtualRenderFill = function (position, forceMove, offset) self.styleRow(row, index); element.appendChild(row.getElement()); - - row.initialize(); - - if (!row.heightInitialized) { - row.normalizeHeight(true); + if (!row.initialized) { + row.initialize(true); + } else { + if (!row.heightInitialized) { + row.normalizeHeight(true); + } } - // if(!row.initialized){ - // row.initialize(true); - // }else{ - // if(!row.heightInitialized){ - // row.normalizeHeight(true); - // } - // } - rowHeight = row.getHeight(); if (i < topPad) { @@ -4379,7 +4246,7 @@ RowManager.prototype.adjustTableSize = function () { modExists; if (this.renderMode === "virtual") { - var otherHeight = Math.floor(this.columnManager.getElement().offsetHeight + (this.table.footerManager && !this.table.footerManager.external ? this.table.footerManager.getElement().offsetHeight : 0)); + var otherHeight = this.columnManager.getElement().offsetHeight + (this.table.footerManager && !this.table.footerManager.external ? this.table.footerManager.getElement().offsetHeight : 0); if (this.fixedHeight) { this.element.style.minHeight = "calc(100% - " + otherHeight + "px)"; @@ -4387,7 +4254,7 @@ RowManager.prototype.adjustTableSize = function () { this.element.style.maxHeight = "calc(100% - " + otherHeight + "px)"; } else { this.element.style.height = ""; - this.element.style.height = Math.floor(this.table.element.clientHeight) - otherHeight + "px"; + this.element.style.height = this.table.element.clientHeight - otherHeight + "px"; this.element.scrollTop = this.scrollTop; } @@ -4395,7 +4262,7 @@ RowManager.prototype.adjustTableSize = function () { this.vDomWindowBuffer = this.table.options.virtualDomBuffer || this.height; //check if the table has changed size when dealing with variable height tables - if (!this.fixedHeight && Math.floor(initialHeight) != Math.floor(this.element.clientHeight)) { + if (!this.fixedHeight && initialHeight != this.element.clientHeight) { modExists = this.table.modExists("resizeTable"); if (modExists && !this.table.modules.resizeTable.autoResize || !modExists) { @@ -4408,7 +4275,7 @@ RowManager.prototype.adjustTableSize = function () { //renitialize all rows RowManager.prototype.reinitialize = function () { this.rows.forEach(function (row) { - row.reinitialize(true); + row.reinitialize(); }); }; @@ -4480,462 +4347,6 @@ RowManager.prototype.resetScroll = function () { } }; -var VDomHoz = function VDomHoz(table) { - this.table = table; - - this.element = this.table.rowManager.tableElement; - this.holderEl = this.table.rowManager.element; - - this.leftCol = 0; - this.rightCol = 0; - this.scrollLeft = 0; - - this.vDomScrollPosLeft = 0; - this.vDomScrollPosRight = 0; - - this.vDomPadLeft = 0; - this.vDomPadRight = 0; - - this.fitDataColAvg = 0; - - this.window = 200; //pixel margin to make column visible before it is shown on screen - - this.initialized = false; - - this.columns = []; - - if (this.compatabilityCheck()) { - this.initialize(); - } -}; - -VDomHoz.prototype.compatabilityCheck = function () { - var options = this.table.options, - frozen = false, - ok = true; - - if (options.layout == "fitDataTable") { - console.warn("Horizontal Vitrual DOM is not compatible with fitDataTable layout mode"); - ok = false; - } - - if (options.responsiveLayout) { - console.warn("Horizontal Vitrual DOM is not compatible with responsive columns"); - ok = false; - } - - if (this.table.rtl) { - console.warn("Horizontal Vitrual DOM is not currently compatible with RTL text direction"); - ok = false; - } - - // if(options.rowFormatter){ - // console.warn("Horizontal Vitrual DOM is not compatible with row formatters"); - // ok = false; - // } - - if (options.columns) { - frozen = options.columns.find(function (col) { - return col.frozen; - }); - - if (frozen) { - console.warn("Horizontal Vitrual DOM is not compatible with frozen columns"); - ok = false; - } - } - - if (!ok) { - options.virtualDomHoz = false; - } - - return ok; -}; - -VDomHoz.prototype.initialize = function () { - var _this17 = this; - - this.holderEl.addEventListener("scroll", function () { - var left = _this17.holderEl.scrollLeft; - - if (_this17.scrollLeft != left) { - _this17.scrollLeft = left; - _this17.scroll(left - (_this17.vDomScrollPosLeft + _this17.window)); - } - }); -}; - -VDomHoz.prototype.deinitialize = function () { - this.initialized = false; -}; - -VDomHoz.prototype.clear = function () { - this.columns = []; - - this.leftCol = -1; - this.rightCol = 0; - - this.vDomScrollPosLeft = 0; - this.vDomScrollPosRight = 0; - this.vDomPadLeft = 0; - this.vDomPadRight = 0; -}; - -VDomHoz.prototype.dataChange = function () { - var change = false, - collsWidth = 0, - colEnd = 0, - group, - row, - rowEl; - - if (this.table.options.layout === "fitData") { - this.table.columnManager.columnsByIndex.forEach(function (column) { - if (!column.definition.width && column.visible) { - change = true; - } - }); - - if (change) { - if (change && this.table.rowManager.getDisplayRows().length) { - // this.table.vdomHoz.deinitialize(); - - this.vDomScrollPosRight = this.scrollLeft + this.holderEl.clientWidth + this.window; - - if (this.table.options.groupBy) { - group = this.table.modules.groupRows.getGroups(false)[0]; - - row = group.getRows(false)[0]; - } else { - row = this.table.rowManager.getDisplayRows()[0]; - } - - if (row) { - - rowEl = row.getElement(); - - row.generateCells(); - - this.element.appendChild(rowEl); - - for (var colEnd = 0; colEnd < row.cells.length; colEnd++) { - var cell = row.cells[colEnd]; - rowEl.appendChild(cell.getElement()); - - cell.column.reinitializeWidth(); - - collsWidth += cell.column.getWidth(); - - if (collsWidth > this.vDomScrollPosRight) { - break; - } - } - - rowEl.parentNode.removeChild(rowEl); - - this.fitDataColAvg = Math.floor(collsWidth / (colEnd + 1)); - - for (colEnd; colEnd < this.table.columnManager.columnsByIndex.length; colEnd++) { - this.table.columnManager.columnsByIndex[colEnd].setWidth(this.fitDataColAvg); - } - - this.reinitialize(false, true); - } - } - } - } else { - if (this.table.options.layout === "fitColumns") { - this.table.modules.layout.layout(); - this.table.vdomHoz.reinitialize(false, true); - } - } -}; - -VDomHoz.prototype.fitDataLayoutOverride = function () { - for (var i = this.leftCol; i <= this.rightCol; i++) { - this.columns[i].reinitializeWidth(); - } -}; - -VDomHoz.prototype.reinitialize = function (update, blockRedraw) { - var _this18 = this; - - var old = { - cols: this.columns, - leftCol: this.leftCol, - rightCol: this.rightCol - }; - - if (update && !this.initialized) { - return; - } - - this.clear(); - - this.scrollLeft = this.holderEl.scrollLeft; - - this.vDomScrollPosLeft = this.scrollLeft - this.window; - this.vDomScrollPosRight = this.scrollLeft + this.holderEl.clientWidth + this.window; - - var colPos = 0; - - this.table.columnManager.columnsByIndex.forEach(function (column) { - var config = {}; - - if (column.visible) { - var width = column.getWidth(); - - config.leftPos = colPos; - config.rightPos = colPos + width; - - if (colPos + width > _this18.vDomScrollPosLeft && colPos < _this18.vDomScrollPosRight) { - //column is visible - - if (_this18.leftCol == -1) { - _this18.leftCol = _this18.columns.length; - _this18.vDomPadLeft = colPos; - } - - _this18.rightCol = _this18.columns.length; - } else { - // column is hidden - if (_this18.leftCol !== -1) { - _this18.vDomPadRight += width; - } - } - - _this18.columns.push(column); - - column.modules.vdomHoz = config; - - colPos += width; - } - }); - - this.element.style.paddingLeft = this.vDomPadLeft + "px"; - this.element.style.paddingRight = this.vDomPadRight + "px"; - - this.initialized = true; - - if (!blockRedraw) { - if (!update || this.reinitChanged(old)) { - this.renitializeRows(); - } - } - - this.holderEl.scrollLeft = this.scrollLeft; -}; - -VDomHoz.prototype.reinitChanged = function (old) { - var _this19 = this; - - var match = true; - - if (old.cols.length !== this.columns.length || old.leftCol !== this.leftCol || old.rightCol !== this.rightCol) { - return true; - } - - old.cols.forEach(function (col, i) { - if (col !== _this19.columns[i]) { - match = false; - } - }); - - return !match; -}; - -VDomHoz.prototype.renitializeRows = function () { - var _this20 = this; - - var rows = this.table.rowManager.getVisibleRows(); - rows.forEach(function (row) { - _this20.reinitializeRow(row, true); - }); -}; - -VDomHoz.prototype.scroll = function (diff) { - this.vDomScrollPosLeft += diff; - this.vDomScrollPosRight += diff; - - if (diff > this.holderEl.clientWidth * .8) { - this.reinitialize(); - } else { - if (diff > 0) { - //scroll right - this.addColRight(); - this.removeColLeft(); - } else { - //scroll left - this.addColLeft(); - this.removeColRight(); - } - } -}; - -VDomHoz.prototype.colPositionAdjust = function (start, end, diff) { - for (var i = start; i < end; i++) { - var column = this.columns[i]; - - column.modules.vdomHoz.leftPos -= diff; - column.modules.vdomHoz.rightPos -= diff; - } -}; - -VDomHoz.prototype.addColRight = function () { - var column = this.columns[this.rightCol + 1], - rows, - oldWidth, - widthDiff; - - if (column && column.modules.vdomHoz.leftPos <= this.vDomScrollPosRight) { - - rows = this.table.rowManager.getVisibleRows(); - - rows.forEach(function (row) { - if (row.type !== "group") { - var cell = row.getCell(column); - row.getElement().appendChild(cell.getElement()); - cell.cellRendered(); - } - }); - - if (this.fitDataColAvg) { - - oldWidth = column.getWidth(); - - if (oldWidth === this.fitDataColAvg) { - column.reinitializeWidth(); - - widthDiff = oldWidth - column.getWidth(); - - if (widthDiff) { - column.modules.vdomHoz.rightPos -= widthDiff; - this.colPositionAdjust(this.rightCol + 1, this.columns.length, widthDiff); - } - } - } - - this.rightCol++; - - if (this.rightCol >= this.columns.length - 1) { - this.vDomPadRight = 0; - } else { - this.vDomPadRight -= column.getWidth(); - } - - this.element.style.paddingRight = this.vDomPadRight + "px"; - - this.addColRight(); - } -}; - -VDomHoz.prototype.addColLeft = function () { - var column = this.columns[this.leftCol - 1], - rows; - - if (column && column.modules.vdomHoz.rightPos >= this.vDomScrollPosLeft) { - var rows = this.table.rowManager.getVisibleRows(); - - rows.forEach(function (row) { - if (row.type !== "group") { - var cell = row.getCell(column); - row.getElement().prepend(cell.getElement()); - cell.cellRendered(); - } - }); - - if (!this.leftCol) { - this.vDomPadLeft = 0; - } else { - this.vDomPadLeft -= column.getWidth(); - } - - this.element.style.paddingLeft = this.vDomPadLeft + "px"; - - this.leftCol--; - - this.addColLeft(); - } -}; - -VDomHoz.prototype.removeColRight = function (column) { - var column = this.columns[this.rightCol], - rows; - - if (column && column.modules.vdomHoz.leftPos > this.vDomScrollPosRight) { - rows = this.table.rowManager.getVisibleRows(); - - column.modules.vdomHoz.visible = false; - - rows.forEach(function (row) { - if (row.type !== "group") { - var cell = row.getCell(column); - row.getElement().removeChild(cell.getElement()); - } - }); - - this.vDomPadRight += column.getWidth(); - this.element.style.paddingRight = this.vDomPadRight + "px"; - - this.rightCol--; - - this.removeColRight(); - } -}; - -VDomHoz.prototype.removeColLeft = function () { - var column = this.columns[this.leftCol], - rows; - - if (column && column.modules.vdomHoz.rightPos < this.vDomScrollPosLeft) { - - rows = this.table.rowManager.getVisibleRows(); - - rows.forEach(function (row) { - if (row.type !== "group") { - var cell = row.getCell(column); - row.getElement().removeChild(cell.getElement()); - } - }); - - this.vDomPadLeft += column.getWidth(); - this.element.style.paddingLeft = this.vDomPadLeft + "px"; - - this.leftCol++; - - this.removeColLeft(); - } -}; - -VDomHoz.prototype.initializeRow = function (row) { - if (row.type !== "group") { - row.modules.vdomHoz = { - leftCol: this.leftCol, - rightCol: this.rightCol - }; - - for (var i = this.leftCol; i <= this.rightCol; i++) { - var column = this.columns[i]; - - if (column.visible) { - var cell = row.getCell(column); - - row.element.appendChild(cell.getElement()); - cell.cellRendered(); - } - } - } -}; - -VDomHoz.prototype.reinitializeRow = function (row, force) { - if (row.type !== "group") { - if (force || !row.modules.vdomHoz || row.modules.vdomHoz.leftCol !== this.leftCol || row.modules.vdomHoz.rightCol !== this.rightCol) { - while (row.element.firstChild) { - row.element.removeChild(row.element.firstChild); - }this.initializeRow(row); - } - } -}; //public row object var RowComponent = function RowComponent(row) { this._row = row; @@ -5071,7 +4482,7 @@ RowComponent.prototype.getTreeParent = function () { RowComponent.prototype.getTreeChildren = function () { if (this._row.table.modExists("dataTree", true)) { - return this._row.table.modules.dataTree.getTreeChildren(this._row, true); + return this._row.table.modules.dataTree.getTreeChildren(this._row); } return false; @@ -5176,7 +4587,7 @@ Row.prototype.generateElement = function () { } //set column menu - if ((self.table.options.rowContextMenu || self.table.options.rowClickMenu) && this.table.modExists("menu")) { + if (self.table.options.rowContextMenu && this.table.modExists("menu")) { self.table.modules.menu.initializeRow(this); } @@ -5296,14 +4707,14 @@ Row.prototype.generateCells = function () { //functions to setup on first render Row.prototype.initialize = function (force) { - var _this21 = this; + var self = this; - if (!this.initialized || force) { + if (!self.initialized || force) { - this.deleteCells(); + self.deleteCells(); - while (this.element.firstChild) { - this.element.removeChild(this.element.firstChild); + while (self.element.firstChild) { + self.element.removeChild(self.element.firstChild); } //handle frozen cells if (this.table.modExists("frozenColumns")) { this.table.modules.frozenColumns.layoutRow(this); @@ -5311,43 +4722,35 @@ Row.prototype.initialize = function (force) { this.generateCells(); - if (this.table.options.virtualDomHoz && this.table.vdomHoz.initialized) { - this.table.vdomHoz.initializeRow(this); - } else { - this.cells.forEach(function (cell) { - _this21.element.appendChild(cell.getElement()); - cell.cellRendered(); - }); - } + self.cells.forEach(function (cell) { + self.element.appendChild(cell.getElement()); + cell.cellRendered(); + }); if (force) { - this.normalizeHeight(); + self.normalizeHeight(); } //setup movable rows - if (this.table.options.dataTree && this.table.modExists("dataTree")) { - this.table.modules.dataTree.layoutRow(this); + if (self.table.options.dataTree && self.table.modExists("dataTree")) { + self.table.modules.dataTree.layoutRow(this); } //setup column colapse container - if (this.table.options.responsiveLayout === "collapse" && this.table.modExists("responsiveLayout")) { - this.table.modules.responsiveLayout.layoutRow(this); + if (self.table.options.responsiveLayout === "collapse" && self.table.modExists("responsiveLayout")) { + self.table.modules.responsiveLayout.layoutRow(this); } - if (this.table.options.rowFormatter) { - this.table.options.rowFormatter(this.getComponent()); + if (self.table.options.rowFormatter) { + self.table.options.rowFormatter(self.getComponent()); } //set resizable handles - if (this.table.options.resizableRows && this.table.modExists("resizeRows")) { - this.table.modules.resizeRows.initializeRow(this); + if (self.table.options.resizableRows && self.table.modExists("resizeRows")) { + self.table.modules.resizeRows.initializeRow(self); } - this.initialized = true; - } else { - if (this.table.options.virtualDomHoz) { - this.table.vdomHoz.reinitializeRow(this); - } + self.initialized = true; } }; @@ -5359,7 +4762,7 @@ Row.prototype.reinitializeHeight = function () { } }; -Row.prototype.reinitialize = function (children) { +Row.prototype.reinitialize = function () { this.initialized = false; this.heightInitialized = false; @@ -5371,12 +4774,6 @@ Row.prototype.reinitialize = function (children) { if (this.element.offsetParent !== null) { this.initialize(true); } - - if (this.table.options.dataTree && this.table.modExists("dataTree", true)) { - this.table.modules.dataTree.getTreeChildren(this, false, true).forEach(function (child) { - child.reinitialize(true); - }); - } }; //get heights when doing bulk row style calcs in virtual DOM @@ -5487,7 +4884,7 @@ Row.prototype.setData = function (data) { //update the rows data Row.prototype.updateData = function (updatedData) { - var _this22 = this; + var _this15 = this; var visible = Tabulator.prototype.helpers.elVisible(this.element), tempData = {}, @@ -5499,37 +4896,37 @@ Row.prototype.updateData = function (updatedData) { updatedData = JSON.parse(updatedData); } - if (_this22.table.options.reactiveData && _this22.table.modExists("reactiveData", true)) { - _this22.table.modules.reactiveData.block(); + if (_this15.table.options.reactiveData && _this15.table.modExists("reactiveData", true)) { + _this15.table.modules.reactiveData.block(); } //mutate incomming data if needed - if (_this22.table.modExists("mutator")) { + if (_this15.table.modExists("mutator")) { - tempData = Object.assign(tempData, _this22.data); + tempData = Object.assign(tempData, _this15.data); tempData = Object.assign(tempData, updatedData); - newRowData = _this22.table.modules.mutator.transformRow(tempData, "data", updatedData); + newRowData = _this15.table.modules.mutator.transformRow(tempData, "data", updatedData); } else { newRowData = updatedData; } //set data for (var attrname in newRowData) { - _this22.data[attrname] = newRowData[attrname]; + _this15.data[attrname] = newRowData[attrname]; } - if (_this22.table.options.reactiveData && _this22.table.modExists("reactiveData", true)) { - _this22.table.modules.reactiveData.unblock(); + if (_this15.table.options.reactiveData && _this15.table.modExists("reactiveData", true)) { + _this15.table.modules.reactiveData.unblock(); } //update affected cells only for (var attrname in updatedData) { - var columns = _this22.table.columnManager.getColumnsByFieldRoot(attrname); + var columns = _this15.table.columnManager.getColumnsByFieldRoot(attrname); columns.forEach(function (column) { - var cell = _this22.getCell(column.getField()); + var cell = _this15.getCell(column.getField()); if (cell) { var value = column.getFieldValue(newRowData); @@ -5544,52 +4941,43 @@ Row.prototype.updateData = function (updatedData) { }); } - if (_this22.table.options.groupUpdateOnCellEdit && _this22.table.options.groupBy && _this22.table.modExists("groupRows")) { - _this22.table.modules.groupRows.reassignRowToGroup(_this22.row); - } - //Partial reinitialization if visible if (visible) { - _this22.normalizeHeight(true); + _this15.normalizeHeight(true); - if (_this22.table.options.rowFormatter) { - _this22.table.options.rowFormatter(_this22.getComponent()); + if (_this15.table.options.rowFormatter) { + _this15.table.options.rowFormatter(_this15.getComponent()); } } else { - _this22.initialized = false; - _this22.height = 0; - _this22.heightStyled = ""; + _this15.initialized = false; + _this15.height = 0; + _this15.heightStyled = ""; } - if (_this22.table.options.dataTree !== false && _this22.table.modExists("dataTree") && _this22.table.modules.dataTree.redrawNeeded(updatedData)) { - _this22.table.modules.dataTree.initializeRow(_this22); - - if (visible) { - _this22.table.modules.dataTree.layoutRow(_this22); - _this22.table.rowManager.refreshActiveData("tree", false, true); - } + if (_this15.table.options.dataTree !== false && _this15.table.modExists("dataTree") && _this15.table.modules.dataTree.redrawNeeded(updatedData)) { + _this15.table.modules.dataTree.initializeRow(_this15); + _this15.table.modules.dataTree.layoutRow(_this15); + _this15.table.rowManager.refreshActiveData("tree", false, true); } //this.reinitialize(); - _this22.table.options.rowUpdated.call(_this22.table, _this22.getComponent()); - - if (_this22.table.options.dataChanged) { - _this22.table.options.dataChanged.call(_this22.table, _this22.table.rowManager.getData()); - } + _this15.table.options.rowUpdated.call(_this15.table, _this15.getComponent()); resolve(); }); }; Row.prototype.getData = function (transform) { + var self = this; + if (transform) { - if (this.table.modExists("accessor")) { - return this.table.modules.accessor.transformRow(this, transform); + if (self.table.modExists("accessor")) { + return self.table.modules.accessor.transformRow(self.data, transform); } + } else { + return this.data; } - - return this.data; }; Row.prototype.getCell = function (column) { @@ -5699,32 +5087,32 @@ Row.prototype.validate = function () { ///////////////////// Actions ///////////////////// Row.prototype.delete = function () { - var _this23 = this; + var _this16 = this; return new Promise(function (resolve, reject) { var index, rows; - if (_this23.table.options.history && _this23.table.modExists("history")) { + if (_this16.table.options.history && _this16.table.modExists("history")) { - if (_this23.table.options.groupBy && _this23.table.modExists("groupRows")) { - rows = _this23.getGroup().rows; - index = rows.indexOf(_this23); + if (_this16.table.options.groupBy && _this16.table.modExists("groupRows")) { + rows = _this16.getGroup().rows; + index = rows.indexOf(_this16); if (index) { index = rows[index - 1]; } } else { - index = _this23.table.rowManager.getRowIndex(_this23); + index = _this16.table.rowManager.getRowIndex(_this16); if (index) { - index = _this23.table.rowManager.rows[index - 1]; + index = _this16.table.rowManager.rows[index - 1]; } } - _this23.table.modules.history.action("rowDelete", _this23, { data: _this23.getData(), pos: !index, index: index }); + _this16.table.modules.history.action("rowDelete", _this16, { data: _this16.getData(), pos: !index, index: index }); } - _this23.deleteActual(); + _this16.deleteActual(); resolve(); }); @@ -5733,7 +5121,17 @@ Row.prototype.delete = function () { Row.prototype.deleteActual = function (blockRedraw) { var index = this.table.rowManager.getRowIndex(this); - this.detatchModules(); + //deselect row if it is selected + if (this.table.modExists("selectRow")) { + this.table.modules.selectRow._deselectRow(this, true); + } + + //cancel edit if row is currently being edited + if (this.table.modExists("edit")) { + if (this.table.modules.edit.currentCell.row === this) { + this.table.modules.edit.cancelEdit(); + } + } // if(this.table.options.dataTree && this.table.modExists("dataTree")){ // this.table.modules.dataTree.collapseRow(this, true); @@ -5755,7 +5153,6 @@ Row.prototype.deleteActual = function (blockRedraw) { this.initialized = false; this.heightInitialized = false; - this.element = false; if (this.table.options.dataTree && this.table.modExists("dataTree", true)) { this.table.modules.dataTree.rowDelete(this); @@ -5771,24 +5168,6 @@ Row.prototype.deleteActual = function (blockRedraw) { } }; -Row.prototype.detatchModules = function () { - //deselect row if it is selected - if (this.table.modExists("selectRow")) { - this.table.modules.selectRow._deselectRow(this, true); - } - - //cancel edit if row is currently being edited - if (this.table.modExists("edit")) { - if (this.table.modules.edit.currentCell.row === this) { - this.table.modules.edit.cancelEdit(); - } - } - - if (this.table.modExists("frozenRows")) { - this.table.modules.frozenRows.detachRow(this); - } -}; - Row.prototype.deleteCells = function () { var cellCount = this.cells.length; @@ -5798,7 +5177,6 @@ Row.prototype.deleteCells = function () { }; Row.prototype.wipe = function () { - this.detatchModules(); this.deleteCells(); while (this.element.firstChild) { @@ -5837,10 +5215,6 @@ CellComponent.prototype.getOldValue = function () { return this._cell.getOldValue(); }; -CellComponent.prototype.getInitialValue = function () { - return this._cell.initialValue; -}; - CellComponent.prototype.getElement = function () { return this._cell.getElement(); }; @@ -5873,10 +5247,6 @@ CellComponent.prototype.restoreOldValue = function () { this._cell.setValueActual(this._cell.getOldValue()); }; -CellComponent.prototype.restoreInitialValue = function () { - this._cell.setValueActual(this._cell.initialValue); -}; - CellComponent.prototype.edit = function (force) { return this._cell.edit(force); }; @@ -5904,7 +5274,7 @@ CellComponent.prototype.validate = function () { }; CellComponent.prototype.clearValidation = function () { - if (this._cell.table.modExists("validate", true)) { + if (self.table.modExists("validate", true)) { this._cell.table.modules.validate.clearValidation(this._cell); } }; @@ -5932,7 +5302,6 @@ var Cell = function Cell(column, row) { this.row = row; this.element = null; this.value = null; - this.initialValue; this.oldValue = null; this.modules = {}; @@ -5942,8 +5311,6 @@ var Cell = function Cell(column, row) { this.component = null; - this.loaded = false; //track if the cell has been added to the DOM yet - this.build(); }; @@ -5958,8 +5325,6 @@ Cell.prototype.build = function () { this._configureCell(); this.setValueActual(this.column.getFieldValue(this.row.data)); - - this.initialValue = this.value; }; Cell.prototype.generateElement = function () { @@ -6341,11 +5706,6 @@ Cell.prototype._generateTooltip = function () { //////////////////// Getters //////////////////// Cell.prototype.getElement = function () { - if (!this.loaded) { - this.loaded = true; - this.layoutElement(); - } - return this.element; }; @@ -6375,17 +5735,11 @@ Cell.prototype.setValue = function (value, mutate) { this.column.cellEvents.cellEdited.call(this.table, component); } - if (this.table.options.groupUpdateOnCellEdit && this.table.options.groupBy && this.table.modExists("groupRows")) { - this.table.modules.groupRows.reassignRowToGroup(this.row); - } - this.cellRendered(); this.table.options.cellEdited.call(this.table, component); - if (this.table.options.dataChanged) { - this.table.options.dataChanged.call(this.table, this.table.rowManager.getData()); - } + this.table.options.dataEdited.call(this.table, this.table.rowManager.getData()); } }; @@ -6440,21 +5794,16 @@ Cell.prototype.setValueActual = function (value) { this.table.modules.reactiveData.unblock(); } - if (this.loaded) { - this.layoutElement(); - } -}; - -Cell.prototype.layoutElement = function () { this._generateContents(); this._generateTooltip(); //set resizable handles - if (this.table.options.resizableColumns && this.table.modExists("resizeColumns") && this.row.type === "row") { + if (this.table.options.resizableColumns && this.table.modExists("resizeColumns")) { this.table.modules.resizeColumns.initializeColumn("cell", this.column, this.element); } - if ((this.column.definition.contextMenu || this.column.definition.clickMenu) && this.table.modExists("menu")) { + //set column menu + if (this.column.definition.contextMenu && this.table.modExists("menu")) { this.table.modules.menu.initializeCell(this); } @@ -6503,7 +5852,7 @@ Cell.prototype.getHeight = function () { }; Cell.prototype.show = function () { - this.element.style.display = this.column.vertAlign ? "inline-flex" : ""; + this.element.style.display = ""; }; Cell.prototype.hide = function () { @@ -6539,7 +5888,7 @@ Cell.prototype.validate = function () { }; Cell.prototype.delete = function () { - if (!this.table.rowManager.redrawBlock && this.element.parentNode) { + if (!this.table.rowManager.redrawBlock) { this.element.parentNode.removeChild(this.element); } @@ -6551,10 +5900,6 @@ Cell.prototype.delete = function () { this.table.modules.edit.clearEdited(this); } - if (this.table.options.history) { - this.table.modules.history.clearComponentHistory(this); - } - this.element = false; this.column.deleteCell(this); this.row.deleteCell(this); @@ -6763,20 +6108,15 @@ var Tabulator = function Tabulator(element, options) { this.columnManager = null; // hold Column Manager this.rowManager = null; //hold Row Manager this.footerManager = null; //holder Footer Manager - this.vdomHoz = null; //holder horizontal virtual dom - - this.browser = ""; //hold current browser type this.browserSlow = false; //handle reduced functionality for slower browsers this.browserMobile = false; //check if running on moble, prevent resize cancelling edit on keyboard appearence - this.rtl = false; //check if the table is in RTL mode this.modules = {}; //hold all modules bound to this table - if (this.initializeElement(element)) { - this.initializeOptions(options || {}); - this._create(); - } + this.initializeElement(element); + this.initializeOptions(options || {}); + this._create(); Tabulator.prototype.comms.register(this); //register table for inderdevice communication }; @@ -6802,14 +6142,12 @@ Tabulator.prototype.defaultOptions = { columns: [], //store for colum header info cellHozAlign: "", //horizontal align columns - cellVertAlign: "", //vertical align columns - headerHozAlign: "", //horizontal header alignment + cellVertAlign: "", //certical align columns data: [], //default starting data autoColumns: false, //build columns from data row structure - autoColumnsDefinitions: false, reactiveData: false, //enable data reactivity @@ -6829,14 +6167,11 @@ Tabulator.prototype.defaultOptions = { headerSort: true, //set default global header sort headerSortTristate: false, //set default tristate header sorting - headerSortElement: "
", //header sort element footerElement: false, //hold footer element index: "id", //filed for row index - textDirection: "auto", - keybindings: [], //array for keybindings tabEndNewRow: false, //create new row when tab to end of table @@ -6864,8 +6199,6 @@ Tabulator.prototype.defaultOptions = { downloadRowRange: "active", //restrict download to active rows only dataTree: false, //enable data tree - dataTreeFilter: true, //filter child rows - dataTreeSort: true, //sort child rows dataTreeElementColumn: false, dataTreeBranchElement: true, //show data tree branch element dataTreeChildIndent: 9, //data tree child indent in px @@ -6910,7 +6243,6 @@ Tabulator.prototype.defaultOptions = { virtualDom: true, //enable DOM virtualization virtualDomBuffer: 0, // set virtual DOM buffer size - virtualDomHoz: false, //enable horizontal DOM virtualization persistentLayout: false, //DEPRICATED - REMOVE in 5.0 persistentSort: false, //DEPRICATED - REMOVE in 5.0 @@ -6955,7 +6287,6 @@ Tabulator.prototype.defaultOptions = { groupBy: false, //enable table grouping and set field to group by groupStartOpen: true, //starting state of group groupValues: false, - groupUpdateOnCellEdit: false, groupHeader: false, //header generation function groupHeaderPrint: null, @@ -7016,7 +6347,6 @@ Tabulator.prototype.defaultOptions = { rowMouseOut: false, rowMouseMove: false, rowContextMenu: false, - rowClickMenu: false, rowAdded: function rowAdded() {}, rowDeleted: function rowDeleted() {}, rowMoved: function rowMoved() {}, @@ -7056,8 +6386,7 @@ Tabulator.prototype.defaultOptions = { //data callbacks dataLoading: function dataLoading() {}, dataLoaded: function dataLoaded() {}, - dataEdited: false, //DEPRECATED - dataChanged: false, + dataEdited: function dataEdited() {}, //ajax callbacks ajaxRequesting: function ajaxRequesting() {}, @@ -7082,7 +6411,6 @@ Tabulator.prototype.defaultOptions = { groupDblClick: false, groupContext: false, groupContextMenu: false, - groupClickMenu: false, groupTap: false, groupDblTap: false, groupTapHold: false, @@ -7125,9 +6453,9 @@ Tabulator.prototype.initializeOptions = function (options) { this.options[key] = options[key]; } else { if (Array.isArray(this.defaultOptions[key])) { - this.options[key] = Object.assign([], this.defaultOptions[key]); + this.options[key] = []; } else if (_typeof(this.defaultOptions[key]) === "object" && this.defaultOptions[key] !== null) { - this.options[key] = Object.assign({}, this.defaultOptions[key]); + this.options[key] = {}; } else { this.options[key] = this.defaultOptions[key]; } @@ -7155,28 +6483,6 @@ Tabulator.prototype.initializeElement = function (element) { } }; -Tabulator.prototype.rtlCheck = function () { - var style = window.getComputedStyle(this.element); - - switch (this.options.textDirection) { - case "auto": - if (style.direction !== "rtl") { - break; - }; - - case "rtl": - this.element.classList.add("tabulator-rtl"); - this.rtl = true; - break; - - case "ltr": - this.element.classList.add("tabulator-ltr"); - - default: - this.rtl = false; - } -}; - //convert depricated functionality to new functions Tabulator.prototype._mapDepricatedFunctionality = function () { @@ -7187,11 +6493,6 @@ Tabulator.prototype._mapDepricatedFunctionality = function () { } } - if (this.options.dataEdited) { - console.warn("DEPRECATION WARNING - dataEdited option has been deprecated, please use the dataChanged option instead"); - this.options.dataChanged = this.options.dataEdited; - } - if (this.options.downloadDataFormatter) { console.warn("DEPRECATION WARNING - downloadDataFormatter option has been deprecated"); } @@ -7272,8 +6573,6 @@ Tabulator.prototype._create = function () { this.bindModules(); - this.rtlCheck(); - if (this.element.tagName === "TABLE") { if (this.modExists("htmlTableImport", true)) { this.modules.htmlTableImport.parseTable(); @@ -7287,10 +6586,6 @@ Tabulator.prototype._create = function () { this.columnManager.setRowManager(this.rowManager); this.rowManager.setColumnManager(this.columnManager); - if (this.options.virtualDomHoz) { - this.vdomHoz = new VDomHoz(this); - } - this._buildElement(); this._loadInitialData(); @@ -7307,7 +6602,7 @@ Tabulator.prototype._clearObjectPointers = function () { //build tabulator element Tabulator.prototype._buildElement = function () { - var _this24 = this; + var _this17 = this; var element = this.element, mod = this.modules, @@ -7349,9 +6644,6 @@ Tabulator.prototype._buildElement = function () { } //set localization - - mod.localize.initialize(); - if (options.headerFilterPlaceholder !== false) { mod.localize.setHeaderFilterPlaceholder(options.headerFilterPlaceholder); } @@ -7449,7 +6741,7 @@ Tabulator.prototype._buildElement = function () { if (options.initialHeaderFilter && this.modExists("filter", true)) { options.initialHeaderFilter.forEach(function (item) { - var column = _this24.columnManager.findColumn(item.field); + var column = _this17.columnManager.findColumn(item.field); if (column) { mod.filter.setHeaderFilterValue(column, item.value); @@ -7609,7 +6901,7 @@ Tabulator.prototype.restoreRedraw = function () { //local data from local file Tabulator.prototype.setDataFromLocalFile = function (extensions) { - var _this25 = this; + var _this18 = this; return new Promise(function (resolve, reject) { var input = document.createElement("input"); @@ -7633,7 +6925,7 @@ Tabulator.prototype.setDataFromLocalFile = function (extensions) { return; } - _this25.setData(data).then(function (data) { + _this18._setData(data).then(function (data) { resolve(data); }).catch(function (err) { resolve(err); @@ -7788,14 +7080,14 @@ Tabulator.prototype.replaceData = function (data, params, config) { //update table data Tabulator.prototype.updateData = function (data) { - var _this26 = this; + var _this19 = this; var self = this; var responses = 0; return new Promise(function (resolve, reject) { - if (_this26.modExists("ajax")) { - _this26.modules.ajax.blockActiveRequest(); + if (_this19.modExists("ajax")) { + _this19.modules.ajax.blockActiveRequest(); } if (typeof data === "string") { @@ -7826,11 +7118,11 @@ Tabulator.prototype.updateData = function (data) { }; Tabulator.prototype.addData = function (data, pos, index) { - var _this27 = this; + var _this20 = this; return new Promise(function (resolve, reject) { - if (_this27.modExists("ajax")) { - _this27.modules.ajax.blockActiveRequest(); + if (_this20.modExists("ajax")) { + _this20.modules.ajax.blockActiveRequest(); } if (typeof data === "string") { @@ -7838,7 +7130,7 @@ Tabulator.prototype.addData = function (data, pos, index) { } if (data) { - _this27.rowManager.addRows(data, pos, index).then(function (rows) { + _this20.rowManager.addRows(data, pos, index).then(function (rows) { var output = []; rows.forEach(function (row) { @@ -7856,15 +7148,15 @@ Tabulator.prototype.addData = function (data, pos, index) { //update table data Tabulator.prototype.updateOrAddData = function (data) { - var _this28 = this; + var _this21 = this; var self = this, rows = [], responses = 0; return new Promise(function (resolve, reject) { - if (_this28.modExists("ajax")) { - _this28.modules.ajax.blockActiveRequest(); + if (_this21.modExists("ajax")) { + _this21.modules.ajax.blockActiveRequest(); } if (typeof data === "string") { @@ -7930,10 +7222,10 @@ Tabulator.prototype.getRowFromPosition = function (position, active) { //delete row from table Tabulator.prototype.deleteRow = function (index) { - var _this29 = this; + var _this22 = this; return new Promise(function (resolve, reject) { - var self = _this29, + var self = _this22, count = 0, successCount = 0, foundRows = []; @@ -7955,7 +7247,7 @@ Tabulator.prototype.deleteRow = function (index) { //find matching rows index.forEach(function (item) { - var row = _this29.rowManager.findRow(item, true); + var row = _this22.rowManager.findRow(item, true); if (row) { foundRows.push(row); @@ -7968,7 +7260,7 @@ Tabulator.prototype.deleteRow = function (index) { //sort rows into correct order to ensure smooth delete from table foundRows.sort(function (a, b) { - return _this29.rowManager.rows.indexOf(a) > _this29.rowManager.rows.indexOf(b) ? 1 : -1; + return _this22.rowManager.rows.indexOf(a) > _this22.rowManager.rows.indexOf(b) ? 1 : -1; }); foundRows.forEach(function (row) { @@ -7985,17 +7277,17 @@ Tabulator.prototype.deleteRow = function (index) { //add row to table Tabulator.prototype.addRow = function (data, pos, index) { - var _this30 = this; + var _this23 = this; return new Promise(function (resolve, reject) { if (typeof data === "string") { data = JSON.parse(data); } - _this30.rowManager.addRows(data, pos, index).then(function (rows) { + _this23.rowManager.addRows(data, pos, index).then(function (rows) { //recalc column calculations if present - if (_this30.modExists("columnCalcs")) { - _this30.modules.columnCalcs.recalc(_this30.rowManager.activeRows); + if (_this23.modExists("columnCalcs")) { + _this23.modules.columnCalcs.recalc(_this23.rowManager.activeRows); } resolve(rows[0].getComponent()); @@ -8005,10 +7297,10 @@ Tabulator.prototype.addRow = function (data, pos, index) { //update a row if it exitsts otherwise create it Tabulator.prototype.updateOrAddRow = function (index, data) { - var _this31 = this; + var _this24 = this; return new Promise(function (resolve, reject) { - var row = _this31.rowManager.findRow(index); + var row = _this24.rowManager.findRow(index); if (typeof data === "string") { data = JSON.parse(data); @@ -8017,8 +7309,8 @@ Tabulator.prototype.updateOrAddRow = function (index, data) { if (row) { row.updateData(data).then(function () { //recalc column calculations if present - if (_this31.modExists("columnCalcs")) { - _this31.modules.columnCalcs.recalc(_this31.rowManager.activeRows); + if (_this24.modExists("columnCalcs")) { + _this24.modules.columnCalcs.recalc(_this24.rowManager.activeRows); } resolve(row.getComponent()); @@ -8026,10 +7318,10 @@ Tabulator.prototype.updateOrAddRow = function (index, data) { reject(err); }); } else { - row = _this31.rowManager.addRows(data).then(function (rows) { + row = _this24.rowManager.addRows(data).then(function (rows) { //recalc column calculations if present - if (_this31.modExists("columnCalcs")) { - _this31.modules.columnCalcs.recalc(_this31.rowManager.activeRows); + if (_this24.modExists("columnCalcs")) { + _this24.modules.columnCalcs.recalc(_this24.rowManager.activeRows); } resolve(rows[0].getComponent()); @@ -8042,10 +7334,10 @@ Tabulator.prototype.updateOrAddRow = function (index, data) { //update row data Tabulator.prototype.updateRow = function (index, data) { - var _this32 = this; + var _this25 = this; return new Promise(function (resolve, reject) { - var row = _this32.rowManager.findRow(index); + var row = _this25.rowManager.findRow(index); if (typeof data === "string") { data = JSON.parse(data); @@ -8066,13 +7358,13 @@ Tabulator.prototype.updateRow = function (index, data) { //scroll to row in DOM Tabulator.prototype.scrollToRow = function (index, position, ifVisible) { - var _this33 = this; + var _this26 = this; return new Promise(function (resolve, reject) { - var row = _this33.rowManager.findRow(index); + var row = _this26.rowManager.findRow(index); if (row) { - _this33.rowManager.scrollToRow(row, position, ifVisible).then(function () { + _this26.rowManager.scrollToRow(row, position, ifVisible).then(function () { resolve(); }).catch(function (err) { reject(err); @@ -8208,12 +7500,12 @@ Tabulator.prototype.toggleColumn = function (field) { }; Tabulator.prototype.addColumn = function (definition, before, field) { - var _this34 = this; + var _this27 = this; return new Promise(function (resolve, reject) { - var column = _this34.columnManager.findColumn(field); + var column = _this27.columnManager.findColumn(field); - _this34.columnManager.addColumn(definition, before, column).then(function (column) { + _this27.columnManager.addColumn(definition, before, column).then(function (column) { resolve(column.getComponent()); }).catch(function (err) { reject(err); @@ -8222,10 +7514,10 @@ Tabulator.prototype.addColumn = function (definition, before, field) { }; Tabulator.prototype.deleteColumn = function (field) { - var _this35 = this; + var _this28 = this; return new Promise(function (resolve, reject) { - var column = _this35.columnManager.findColumn(field); + var column = _this28.columnManager.findColumn(field); if (column) { column.delete().then(function () { @@ -8241,10 +7533,10 @@ Tabulator.prototype.deleteColumn = function (field) { }; Tabulator.prototype.updateColumnDefinition = function (field, definition) { - var _this36 = this; + var _this29 = this; return new Promise(function (resolve, reject) { - var column = _this36.columnManager.findColumn(field); + var column = _this29.columnManager.findColumn(field); if (column) { column.updateDefinition(definition).then(function (col) { @@ -8276,13 +7568,13 @@ Tabulator.prototype.moveColumn = function (from, to, after) { //scroll to column in DOM Tabulator.prototype.scrollToColumn = function (field, position, ifVisible) { - var _this37 = this; + var _this30 = this; return new Promise(function (resolve, reject) { - var column = _this37.columnManager.findColumn(field); + var column = _this30.columnManager.findColumn(field); if (column) { - _this37.columnManager.scrollToColumn(column, position, ifVisible).then(function () { + _this30.columnManager.scrollToColumn(column, position, ifVisible).then(function () { resolve(); }).catch(function (err) { reject(err); @@ -8486,7 +7778,7 @@ Tabulator.prototype.getInvalidCells = function () { }; Tabulator.prototype.clearCellValidation = function (cells) { - var _this38 = this; + var _this31 = this; if (this.modExists("validate", true)) { @@ -8499,7 +7791,7 @@ Tabulator.prototype.clearCellValidation = function (cells) { } cells.forEach(function (cell) { - _this38.modules.validate.clearValidation(cell._getSelf()); + _this31.modules.validate.clearValidation(cell._getSelf()); }); } }; @@ -8540,14 +7832,14 @@ Tabulator.prototype.setPage = function (page) { }; Tabulator.prototype.setPageToRow = function (row) { - var _this39 = this; + var _this32 = this; return new Promise(function (resolve, reject) { - if (_this39.options.pagination && _this39.modExists("page")) { - row = _this39.rowManager.findRow(row); + if (_this32.options.pagination && _this32.modExists("page")) { + row = _this32.rowManager.findRow(row); if (row) { - _this39.modules.page.setPageToRow(row).then(function () { + _this32.modules.page.setPageToRow(row).then(function () { resolve(); }).catch(function () { reject(); @@ -8624,20 +7916,6 @@ Tabulator.prototype.setGroupBy = function (groups) { } }; -Tabulator.prototype.setGroupValues = function (groupValues) { - if (this.modExists("groupRows", true)) { - this.options.groupValues = groupValues; - this.modules.groupRows.initialize(); - this.rowManager.refreshActiveData("display"); - - if (this.options.persistence && this.modExists("persistence", true) && this.modules.persistence.config.group) { - this.modules.persistence.save("group"); - } - } else { - return false; - } -}; - Tabulator.prototype.setGroupStartOpen = function (values) { if (this.modExists("groupRows", true)) { this.options.groupStartOpen = values; @@ -8696,7 +7974,7 @@ Tabulator.prototype.getEditedCells = function () { }; Tabulator.prototype.clearCellEdited = function (cells) { - var _this40 = this; + var _this33 = this; if (this.modExists("edit", true)) { @@ -8709,7 +7987,7 @@ Tabulator.prototype.clearCellEdited = function (cells) { } cells.forEach(function (cell) { - _this40.modules.edit.clearEdited(cell._getSelf()); + _this33.modules.edit.clearEdited(cell._getSelf()); }); } }; @@ -8942,7 +8220,7 @@ Tabulator.prototype.helpers = { }, deepClone: function deepClone(obj) { - var clone = Object.assign(Array.isArray(obj) ? [] : {}, obj); + var clone = Array.isArray(obj) ? [] : {}; for (var i in obj) { if (obj[i] != null && _typeof(obj[i]) === "object") { @@ -8951,6 +8229,8 @@ Tabulator.prototype.helpers = { } else { clone[i] = this.deepClone(obj[i]); } + } else { + clone[i] = obj[i]; } } return clone; @@ -9060,16 +8340,10 @@ Layout.prototype.modes = { "fitData": function fitData(columns) { - if (this.table.options.virtualDomHoz) { - - this.table.vdomHoz.fitDataLayoutOverride(); - } else { - - columns.forEach(function (column) { + columns.forEach(function (column) { - column.reinitializeWidth(); - }); - } + column.reinitializeWidth(); + }); if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { @@ -9110,7 +8384,7 @@ Layout.prototype.modes = { //resize columns to fit data the contain and stretch last column to fill table "fitDataStretch": function fitDataStretch(columns) { - var _this41 = this; + var _this34 = this; var colsWidth = 0, tableWidth = this.table.rowManager.element.clientWidth, @@ -9124,7 +8398,7 @@ Layout.prototype.modes = { column.reinitializeWidth(); } - if (_this41.table.options.responsiveLayout ? column.modules.responsive.visible : column.visible) { + if (_this34.table.options.responsiveLayout ? column.modules.responsive.visible : column.visible) { lastCol = column; } @@ -9392,21 +8666,16 @@ var Localize = function Localize(table) { this.locale = "default"; //current locale this.lang = false; //current language this.bindings = {}; //update events to call when locale is changed - this.langList = {}; -}; - -Localize.prototype.initialize = function () { - this.langList = Tabulator.prototype.helpers.deepClone(this.langs); }; //set header placehoder Localize.prototype.setHeaderFilterPlaceholder = function (placeholder) { - this.langList.default.headerFilters.default = placeholder; + this.langs.default.headerFilters.default = placeholder; }; //set header filter placeholder by column Localize.prototype.setHeaderFilterColumnPlaceholder = function (column, placeholder) { - this.langList.default.headerFilters.columns[column] = placeholder; + this.langs.default.headerFilters.columns[column] = placeholder; if (this.lang && !this.lang.headerFilters.columns[column]) { this.lang.headerFilters.columns[column] = placeholder; @@ -9415,10 +8684,10 @@ Localize.prototype.setHeaderFilterColumnPlaceholder = function (column, placehol //setup a lang description object Localize.prototype.installLang = function (locale, lang) { - if (this.langList[locale]) { - this._setLangProp(this.langList[locale], lang); + if (this.langs[locale]) { + this._setLangProp(this.langs[locale], lang); } else { - this.langList[locale] = lang; + this.langs[locale] = lang; } }; @@ -9441,6 +8710,7 @@ Localize.prototype.setLocale = function (desiredLocale) { //fill in any matching languge values function traverseLang(trans, path) { for (var prop in trans) { + if (_typeof(trans[prop]) == "object") { if (!path[prop]) { path[prop] = {}; @@ -9461,10 +8731,10 @@ Localize.prototype.setLocale = function (desiredLocale) { if (desiredLocale) { //if locale is not set, check for matching top level locale else use default - if (!self.langList[desiredLocale]) { + if (!self.langs[desiredLocale]) { var prefix = desiredLocale.split("-")[0]; - if (self.langList[prefix]) { + if (self.langs[prefix]) { console.warn("Localization Error - Exact matching locale not found, using closest match: ", desiredLocale, prefix); desiredLocale = prefix; } else { @@ -9477,10 +8747,10 @@ Localize.prototype.setLocale = function (desiredLocale) { self.locale = desiredLocale; //load default lang template - self.lang = Tabulator.prototype.helpers.deepClone(self.langList.default || {}); + self.lang = Tabulator.prototype.helpers.deepClone(self.langs.default || {}); if (desiredLocale != "default") { - traverseLang(self.langList[desiredLocale], self.lang); + traverseLang(self.langs[desiredLocale], self.lang); } self.table.options.localized.call(self.table, self.locale, self.lang); @@ -9495,7 +8765,7 @@ Localize.prototype.getLocale = function (locale) { //get lang object for given local or current if none provided Localize.prototype.getLang = function (locale) { - return locale ? this.langList[locale] : this.lang; + return locale ? this.langs[locale] : this.lang; }; //get text for current locale diff --git a/admin/js/vendors/tabulator/js/tabulator_core.min.js b/admin/js/vendors/tabulator/js/tabulator_core.min.js new file mode 100644 index 0000000..92522ab --- /dev/null +++ b/admin/js/vendors/tabulator/js/tabulator_core.min.js @@ -0,0 +1,6 @@ +/* Tabulator v4.7.0 (c) Oliver Folkerd */ +"use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),o=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;n>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;n>>0;if(0===i)return!1;for(var n=0|e,l=Math.max(n>=0?n:i-Math.abs(n),0);lo?(e=t-o,this.element.style.marginLeft=-e+"px"):this.element.style.marginLeft=0,this.scrollLeft=t,this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.scrollHorizontal()},ColumnManager.prototype.generateColumnsFromRowData=function(t){var e,o,i=[];if(t&&t.length){e=t[0];for(var n in e){var l={field:n,title:n},s=e[n];switch(void 0===s?"undefined":_typeof(s)){case"undefined":o="string";break;case"boolean":o="boolean";break;case"object":o=Array.isArray(s)?"array":"string";break;default:o=isNaN(s)||""===s?s.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)?"alphanum":"string":"number"}l.sorter=o,i.push(l)}this.table.options.columns=i,this.setColumns(this.table.options.columns)}},ColumnManager.prototype.setColumns=function(t,e){for(var o=this;o.headersElement.firstChild;)o.headersElement.removeChild(o.headersElement.firstChild);o.columns=[],o.columnsByIndex=[],o.columnsByField={},o.table.modExists("frozenColumns")&&o.table.modules.frozenColumns.reset(),t.forEach(function(t,e){o._addColumn(t)}),o._reIndexColumns(),o.table.options.responsiveLayout&&o.table.modExists("responsiveLayout",!0)&&o.table.modules.responsiveLayout.initialize(),o.redraw(!0)},ColumnManager.prototype._addColumn=function(t,e,o){var i=new Column(t,this),n=i.getElement(),l=o?this.findColumnIndex(o):o;if(o&&l>-1){var s=this.columns.indexOf(o.getTopColumn()),a=o.getElement();e?(this.columns.splice(s,0,i),a.parentNode.insertBefore(n,a)):(this.columns.splice(s+1,0,i),a.parentNode.insertBefore(n,a.nextSibling))}else e?(this.columns.unshift(i),this.headersElement.insertBefore(i.getElement(),this.headersElement.firstChild)):(this.columns.push(i),this.headersElement.appendChild(i.getElement())),i.columnRendered();return i},ColumnManager.prototype.registerColumnField=function(t){t.definition.field&&(this.columnsByField[t.definition.field]=t)},ColumnManager.prototype.registerColumnPosition=function(t){this.columnsByIndex.push(t)},ColumnManager.prototype._reIndexColumns=function(){this.columnsByIndex=[],this.columns.forEach(function(t){t.reRegisterPosition()})},ColumnManager.prototype._verticalAlignHeaders=function(){var t=this,e=0;t.columns.forEach(function(t){var o;t.clearVerticalAlign(),(o=t.getHeight())>e&&(e=o)}),t.columns.forEach(function(o){o.verticalAlign(t.table.options.columnHeaderVertAlign,e)}),t.rowManager.adjustTableSize()},ColumnManager.prototype.findColumn=function(t){var e=this;if("object"!=(void 0===t?"undefined":_typeof(t)))return this.columnsByField[t]||!1;if(t instanceof Column)return t;if(t instanceof ColumnComponent)return t._getSelf()||!1;if("undefined"!=typeof HTMLElement&&t instanceof HTMLElement){return e.columns.find(function(e){return e.element===t})||!1}return!1},ColumnManager.prototype.getColumnByField=function(t){return this.columnsByField[t]},ColumnManager.prototype.getColumnsByFieldRoot=function(t){var e=this,o=[];return Object.keys(this.columnsByField).forEach(function(i){i.split(".")[0]===t&&o.push(e.columnsByField[i])}),o},ColumnManager.prototype.getColumnByIndex=function(t){return this.columnsByIndex[t]},ColumnManager.prototype.getFirstVisibileColumn=function(t){var t=this.columnsByIndex.findIndex(function(t){return t.visible});return t>-1&&this.columnsByIndex[t]},ColumnManager.prototype.getColumns=function(){return this.columns},ColumnManager.prototype.findColumnIndex=function(t){return this.columnsByIndex.findIndex(function(e){return t===e})},ColumnManager.prototype.getRealColumns=function(){return this.columnsByIndex},ColumnManager.prototype.traverse=function(t){this.columnsByIndex.forEach(function(e,o){t(e,o)})},ColumnManager.prototype.getDefinitions=function(t){var e=this,o=[];return e.columnsByIndex.forEach(function(e){(!t||t&&e.visible)&&o.push(e.getDefinition())}),o},ColumnManager.prototype.getDefinitionTree=function(){var t=this,e=[];return t.columns.forEach(function(t){e.push(t.getDefinition(!0))}),e},ColumnManager.prototype.getComponents=function(t){var e=this,o=[];return(t?e.columns:e.columnsByIndex).forEach(function(t){o.push(t.getComponent())}),o},ColumnManager.prototype.getWidth=function(){var t=0;return this.columnsByIndex.forEach(function(e){e.visible&&(t+=e.getWidth())}),t},ColumnManager.prototype.moveColumn=function(t,e,o){this.moveColumnActual(t,e,o),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),e.element.parentNode.insertBefore(t.element,e.element),o&&e.element.parentNode.insertBefore(e.element,t.element),this._verticalAlignHeaders(),this.table.rowManager.reinitialize()},ColumnManager.prototype.moveColumnActual=function(t,e,o){t.parent.isGroup?this._moveColumnInArray(t.parent.columns,t,e,o):this._moveColumnInArray(this.columns,t,e,o),this._moveColumnInArray(this.columnsByIndex,t,e,o,!0),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.table.options.columnMoved&&this.table.options.columnMoved.call(this.table,t.getComponent(),this.table.columnManager.getComponents()),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns")},ColumnManager.prototype._moveColumnInArray=function(t,e,o,i,n){var l,s=t.indexOf(e);s>-1&&(t.splice(s,1),l=t.indexOf(o),l>-1?i&&(l+=1):l=s,t.splice(l,0,e),n&&this.table.rowManager.rows.forEach(function(t){if(t.cells.length){var e=t.cells.splice(s,1)[0];t.cells.splice(l,0,e)}}))},ColumnManager.prototype.scrollToColumn=function(t,e,o){var i=this,n=0,l=0,s=0,a=t.getElement();return new Promise(function(r,u){if(void 0===e&&(e=i.table.options.scrollToColumnPosition),void 0===o&&(o=i.table.options.scrollToColumnIfVisible),t.visible){switch(e){case"middle":case"center":s=-i.element.clientWidth/2;break;case"right":s=a.clientWidth-i.headersElement.clientWidth}if(!o&&(l=a.offsetLeft)>0&&l+a.offsetWidtht.rowManager.element.clientHeight&&(e-=t.rowManager.element.offsetWidth-t.rowManager.element.clientWidth),this.columnsByIndex.forEach(function(i){var n,l,s;i.visible&&(n=i.definition.width||0,l=void 0===i.minWidth?t.table.options.columnMinWidth:parseInt(i.minWidth),s="string"==typeof n?n.indexOf("%")>-1?e/100*parseInt(n):parseInt(n):n,o+=s>l?s:l)}),o},ColumnManager.prototype.addColumn=function(t,e,o){var i=this;return new Promise(function(n,l){var s=i._addColumn(t,e,o);i._reIndexColumns(),i.table.options.responsiveLayout&&i.table.modExists("responsiveLayout",!0)&&i.table.modules.responsiveLayout.initialize(),i.table.modExists("columnCalcs")&&i.table.modules.columnCalcs.recalc(i.table.rowManager.activeRows),i.redraw(),"fitColumns"!=i.table.modules.layout.getMode()&&s.reinitializeWidth(),i._verticalAlignHeaders(),i.table.rowManager.reinitialize(),n(s)})},ColumnManager.prototype.deregisterColumn=function(t){var e,o=t.getField();o&&delete this.columnsByField[o],e=this.columnsByIndex.indexOf(t),e>-1&&this.columnsByIndex.splice(e,1),e=this.columns.indexOf(t),e>-1&&this.columns.splice(e,1),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.redraw()},ColumnManager.prototype.redraw=function(t){t&&(Tabulator.prototype.helpers.elVisible(this.element)&&this._verticalAlignHeaders(),this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),["fitColumns","fitDataStretch"].indexOf(this.table.modules.layout.getMode())>-1?this.table.modules.layout.layout():t?this.table.modules.layout.layout():this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout(),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),t&&(this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns"),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.redraw()),this.table.footerManager.redraw()};var ColumnComponent=function(t){this._column=t,this.type="ColumnComponent"};ColumnComponent.prototype.getElement=function(){return this._column.getElement()},ColumnComponent.prototype.getDefinition=function(){return this._column.getDefinition()},ColumnComponent.prototype.getField=function(){return this._column.getField()},ColumnComponent.prototype.getCells=function(){var t=[];return this._column.cells.forEach(function(e){t.push(e.getComponent())}),t},ColumnComponent.prototype.getVisibility=function(){return console.warn("getVisibility function is deprecated, you should now use the isVisible function"),this._column.visible},ColumnComponent.prototype.isVisible=function(){return this._column.visible},ColumnComponent.prototype.show=function(){this._column.isGroup?this._column.columns.forEach(function(t){t.show()}):this._column.show()},ColumnComponent.prototype.hide=function(){this._column.isGroup?this._column.columns.forEach(function(t){t.hide()}):this._column.hide()},ColumnComponent.prototype.toggle=function(){this._column.visible?this.hide():this.show()},ColumnComponent.prototype.delete=function(){return this._column.delete()},ColumnComponent.prototype.getSubColumns=function(){var t=[];return this._column.columns.length&&this._column.columns.forEach(function(e){t.push(e.getComponent())}),t},ColumnComponent.prototype.getParentColumn=function(){return this._column.parent instanceof Column&&this._column.parent.getComponent()},ColumnComponent.prototype._getSelf=function(){return this._column},ColumnComponent.prototype.scrollTo=function(){return this._column.table.columnManager.scrollToColumn(this._column)},ColumnComponent.prototype.getTable=function(){return this._column.table},ColumnComponent.prototype.headerFilterFocus=function(){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterFocus(this._column)},ColumnComponent.prototype.reloadHeaderFilter=function(){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.reloadHeaderFilter(this._column)},ColumnComponent.prototype.getHeaderFilterValue=function(){if(this._column.table.modExists("filter",!0))return this._column.table.modules.filter.getHeaderFilterValue(this._column)},ColumnComponent.prototype.setHeaderFilterValue=function(t){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterValue(this._column,t)},ColumnComponent.prototype.move=function(t,e){var o=this._column.table.columnManager.findColumn(t);o?this._column.table.columnManager.moveColumn(this._column,o,e):console.warn("Move Error - No matching column found:",o)},ColumnComponent.prototype.getNextColumn=function(){var t=this._column.nextColumn();return!!t&&t.getComponent()},ColumnComponent.prototype.getPrevColumn=function(){var t=this._column.prevColumn();return!!t&&t.getComponent()},ColumnComponent.prototype.updateDefinition=function(t){return this._column.updateDefinition(t)},ColumnComponent.prototype.getWidth=function(){return this._column.getWidth()},ColumnComponent.prototype.setWidth=function(t){return!0===t?this._column.reinitializeWidth(!0):this._column.setWidth(t)},ColumnComponent.prototype.validate=function(){return this._column.validate()};var Column=function t(e,o){var i=this;this.table=o.table,this.definition=e,this.parent=o,this.type="column",this.columns=[],this.cells=[],this.element=this.createElement(),this.contentElement=!1,this.titleElement=!1,this.groupElement=this.createGroupElement(),this.isGroup=!1,this.tooltip=!1,this.hozAlign="",this.vertAlign="",this.field="",this.fieldStructure="",this.getFieldValue="",this.setFieldValue="",this.titleFormatterRendered=!1,this.setField(this.definition.field),this.table.options.invalidOptionWarnings&&this.checkDefinition(),this.modules={},this.cellEvents={cellClick:!1,cellDblClick:!1,cellContext:!1,cellTap:!1,cellDblTap:!1,cellTapHold:!1,cellMouseEnter:!1,cellMouseLeave:!1,cellMouseOver:!1,cellMouseOut:!1,cellMouseMove:!1},this.width=null,this.widthStyled="",this.minWidth=null,this.minWidthStyled="",this.widthFixed=!1,this.visible=!0,this.component=null,this._mapDepricatedFunctionality(),e.columns?(this.isGroup=!0,e.columns.forEach(function(e,o){var n=new t(e,i);i.attachColumn(n)}),i.checkColumnVisibility()):o.registerColumnField(this),e.rowHandle&&!1!==this.table.options.movableRows&&this.table.modExists("moveRow")&&this.table.modules.moveRow.setHandle(!0),this._buildHeader(),this.bindModuleColumns()};Column.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-col"),t.setAttribute("role","columnheader"),t.setAttribute("aria-sort","none"),t},Column.prototype.createGroupElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-col-group-cols"),t},Column.prototype.checkDefinition=function(){var t=this;Object.keys(this.definition).forEach(function(e){-1===t.defaultOptionList.indexOf(e)&&console.warn("Invalid column definition option in '"+(t.field||t.definition.title)+"' column:",e)})},Column.prototype.setField=function(t){this.field=t,this.fieldStructure=t?this.table.options.nestedFieldSeparator?t.split(this.table.options.nestedFieldSeparator):[t]:[],this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData,this.setFieldValue=this.fieldStructure.length>1?this._setNestedData:this._setFlatData},Column.prototype.registerColumnPosition=function(t){this.parent.registerColumnPosition(t)},Column.prototype.registerColumnField=function(t){this.parent.registerColumnField(t)},Column.prototype.reRegisterPosition=function(){this.isGroup?this.columns.forEach(function(t){t.reRegisterPosition()}):this.registerColumnPosition(this)},Column.prototype._mapDepricatedFunctionality=function(){void 0!==this.definition.hideInHtml&&(this.definition.htmlOutput=!this.definition.hideInHtml,console.warn("hideInHtml column definition property is deprecated, you should now use htmlOutput")),void 0!==this.definition.align&&(this.definition.hozAlign=this.definition.align,console.warn("align column definition property is deprecated, you should now use hozAlign")),void 0!==this.definition.downloadTitle&&(this.definition.titleDownload=this.definition.downloadTitle,console.warn("downloadTitle definition property is deprecated, you should now use titleDownload"))},Column.prototype.setTooltip=function(){var t=this,e=t.definition,o=e.headerTooltip||!1===e.tooltip?e.headerTooltip:t.table.options.tooltipsHeader;o?!0===o?e.field?t.table.modules.localize.bind("columns|"+e.field,function(o){t.element.setAttribute("title",o||e.title)}):t.element.setAttribute("title",e.title):("function"==typeof o&&!1===(o=o(t.getComponent()))&&(o=""),t.element.setAttribute("title",o)):t.element.setAttribute("title","")},Column.prototype._buildHeader=function(){for(var t=this,e=t.definition;t.element.firstChild;)t.element.removeChild(t.element.firstChild);e.headerVertical&&(t.element.classList.add("tabulator-col-vertical"),"flip"===e.headerVertical&&t.element.classList.add("tabulator-col-vertical-flip")),t.contentElement=t._bindEvents(),t.contentElement=t._buildColumnHeaderContent(),t.element.appendChild(t.contentElement),t.isGroup?t._buildGroupHeader():t._buildColumnHeader(),t.setTooltip(),t.table.options.resizableColumns&&t.table.modExists("resizeColumns")&&t.table.modules.resizeColumns.initializeColumn("header",t,t.element),e.headerFilter&&t.table.modExists("filter")&&t.table.modExists("edit")&&(void 0!==e.headerFilterPlaceholder&&e.field&&t.table.modules.localize.setHeaderFilterColumnPlaceholder(e.field,e.headerFilterPlaceholder),t.table.modules.filter.initializeColumn(t)),t.table.modExists("frozenColumns")&&t.table.modules.frozenColumns.initializeColumn(t),t.table.options.movableColumns&&!t.isGroup&&t.table.modExists("moveColumn")&&t.table.modules.moveColumn.initializeColumn(t),(e.topCalc||e.bottomCalc)&&t.table.modExists("columnCalcs")&&t.table.modules.columnCalcs.initializeColumn(t),t.table.modExists("persistence")&&t.table.modules.persistence.config.columns&&t.table.modules.persistence.initializeColumn(t),t.element.addEventListener("mouseenter",function(e){t.setTooltip()})},Column.prototype._bindEvents=function(){var t,e,o,i=this,n=i.definition;"function"==typeof n.headerClick&&i.element.addEventListener("click",function(t){n.headerClick(t,i.getComponent())}),"function"==typeof n.headerDblClick&&i.element.addEventListener("dblclick",function(t){n.headerDblClick(t,i.getComponent())}),"function"==typeof n.headerContext&&i.element.addEventListener("contextmenu",function(t){n.headerContext(t,i.getComponent())}),"function"==typeof n.headerTap&&(o=!1,i.element.addEventListener("touchstart",function(t){o=!0},{passive:!0}),i.element.addEventListener("touchend",function(t){o&&n.headerTap(t,i.getComponent()),o=!1})),"function"==typeof n.headerDblTap&&(t=null,i.element.addEventListener("touchend",function(e){t?(clearTimeout(t),t=null,n.headerDblTap(e,i.getComponent())):t=setTimeout(function(){clearTimeout(t),t=null},300)})),"function"==typeof n.headerTapHold&&(e=null,i.element.addEventListener("touchstart",function(t){clearTimeout(e),e=setTimeout(function(){clearTimeout(e),e=null,o=!1,n.headerTapHold(t,i.getComponent())},1e3)},{passive:!0}),i.element.addEventListener("touchend",function(t){clearTimeout(e),e=null})),"function"==typeof n.cellClick&&(i.cellEvents.cellClick=n.cellClick),"function"==typeof n.cellDblClick&&(i.cellEvents.cellDblClick=n.cellDblClick),"function"==typeof n.cellContext&&(i.cellEvents.cellContext=n.cellContext),"function"==typeof n.cellMouseEnter&&(i.cellEvents.cellMouseEnter=n.cellMouseEnter),"function"==typeof n.cellMouseLeave&&(i.cellEvents.cellMouseLeave=n.cellMouseLeave),"function"==typeof n.cellMouseOver&&(i.cellEvents.cellMouseOver=n.cellMouseOver),"function"==typeof n.cellMouseOut&&(i.cellEvents.cellMouseOut=n.cellMouseOut),"function"==typeof n.cellMouseMove&&(i.cellEvents.cellMouseMove=n.cellMouseMove),"function"==typeof n.cellTap&&(i.cellEvents.cellTap=n.cellTap),"function"==typeof n.cellDblTap&&(i.cellEvents.cellDblTap=n.cellDblTap),"function"==typeof n.cellTapHold&&(i.cellEvents.cellTapHold=n.cellTapHold),"function"==typeof n.cellEdited&&(i.cellEvents.cellEdited=n.cellEdited),"function"==typeof n.cellEditing&&(i.cellEvents.cellEditing=n.cellEditing),"function"==typeof n.cellEditCancelled&&(i.cellEvents.cellEditCancelled=n.cellEditCancelled)},Column.prototype._buildColumnHeader=function(){var t=this,e=t.definition,o=t.table;if(o.modExists("sort")&&o.modules.sort.initializeColumn(t,t.contentElement),(e.headerContextMenu||e.headerMenu)&&o.modExists("menu")&&o.modules.menu.initializeColumnHeader(t),o.modExists("format")&&o.modules.format.initializeColumn(t),void 0!==e.editor&&o.modExists("edit")&&o.modules.edit.initializeColumn(t),void 0!==e.validator&&o.modExists("validate")&&o.modules.validate.initializeColumn(t),o.modExists("mutator")&&o.modules.mutator.initializeColumn(t),o.modExists("accessor")&&o.modules.accessor.initializeColumn(t),_typeof(o.options.responsiveLayout)&&o.modExists("responsiveLayout")&&o.modules.responsiveLayout.initializeColumn(t),void 0!==e.visible&&(e.visible?t.show(!0):t.hide(!0)),e.cssClass){e.cssClass.split(" ").forEach(function(e){t.element.classList.add(e)})}e.field&&this.element.setAttribute("tabulator-field",e.field),t.setMinWidth(void 0===e.minWidth?t.table.options.columnMinWidth:parseInt(e.minWidth)),t.reinitializeWidth(),t.tooltip=t.definition.tooltip||!1===t.definition.tooltip?t.definition.tooltip:t.table.options.tooltips,t.hozAlign=void 0===t.definition.hozAlign?t.table.options.cellHozAlign:t.definition.hozAlign,t.vertAlign=void 0===t.definition.vertAlign?t.table.options.cellVertAlign:t.definition.vertAlign},Column.prototype._buildColumnHeaderContent=function(){var t=(this.definition,this.table,document.createElement("div"));return t.classList.add("tabulator-col-content"),this.titleElement=this._buildColumnHeaderTitle(),t.appendChild(this.titleElement),t},Column.prototype._buildColumnHeaderTitle=function(){var t=this,e=t.definition,o=t.table,i=document.createElement("div");if(i.classList.add("tabulator-col-title"),e.editableTitle){var n=document.createElement("input");n.classList.add("tabulator-title-editor"),n.addEventListener("click",function(t){t.stopPropagation(),n.focus()}),n.addEventListener("change",function(){e.title=n.value,o.options.columnTitleChanged.call(t.table,t.getComponent())}),i.appendChild(n),e.field?o.modules.localize.bind("columns|"+e.field,function(t){n.value=t||e.title||" "}):n.value=e.title||" "}else e.field?o.modules.localize.bind("columns|"+e.field,function(o){t._formatColumnHeaderTitle(i,o||e.title||" ")}):t._formatColumnHeaderTitle(i,e.title||" ");return i},Column.prototype._formatColumnHeaderTitle=function(t,e){var o,i,n,l,s,a=this;if(this.definition.titleFormatter&&this.table.modExists("format"))switch(o=this.table.modules.format.getFormatter(this.definition.titleFormatter),s=function(t){a.titleFormatterRendered=t},l={getValue:function(){return e},getElement:function(){return t}},n=this.definition.titleFormatterParams||{},n="function"==typeof n?n():n,i=o.call(this.table.modules.format,l,n,s),void 0===i?"undefined":_typeof(i)){case"object":i instanceof Node?t.appendChild(i):(t.innerHTML="",console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",i));break;case"undefined":case"null":t.innerHTML="";break;default:t.innerHTML=i}else t.innerHTML=e},Column.prototype._buildGroupHeader=function(){var t=this;if(this.element.classList.add("tabulator-col-group"),this.element.setAttribute("role","columngroup"),this.element.setAttribute("aria-title",this.definition.title),this.definition.cssClass){this.definition.cssClass.split(" ").forEach(function(e){t.element.classList.add(e)})}(this.definition.headerContextMenu||this.definition.headerMenu)&&this.table.modExists("menu")&&this.table.modules.menu.initializeColumnHeader(this),this.element.appendChild(this.groupElement)},Column.prototype._getFlatData=function(t){return t[this.field]},Column.prototype._getNestedData=function(t){for(var e,o=t,i=this.fieldStructure,n=i.length,l=0;l-1&&this._nextVisibleColumn(t+1)},Column.prototype._nextVisibleColumn=function(t){var e=this.table.columnManager.getColumnByIndex(t);return!e||e.visible?e:this._nextVisibleColumn(t+1)},Column.prototype.prevColumn=function(){var t=this.table.columnManager.findColumnIndex(this);return t>-1&&this._prevVisibleColumn(t-1)},Column.prototype._prevVisibleColumn=function(t){var e=this.table.columnManager.getColumnByIndex(t);return!e||e.visible?e:this._prevVisibleColumn(t-1)},Column.prototype.reinitializeWidth=function(t){this.widthFixed=!1,void 0===this.definition.width||t||this.setWidth(this.definition.width),this.table.modExists("filter")&&this.table.modules.filter.hideHeaderFilterElements(),this.fitToData(),this.table.modExists("filter")&&this.table.modules.filter.showHeaderFilterElements()},Column.prototype.fitToData=function(){var t=this;this.widthFixed||(this.element.style.width="",t.cells.forEach(function(t){t.clearWidth()}));var e=this.element.offsetWidth;t.width&&this.widthFixed||(t.cells.forEach(function(t){var o=t.getWidth();o>e&&(e=o)}),e&&t.setWidthActual(e+1))},Column.prototype.updateDefinition=function(t){var e=this;return new Promise(function(o,i){var n;e.isGroup?(console.warn("Column Update Error - The updateDefintion function is only available on columns, not column groups"),i("Column Update Error - The updateDefintion function is only available on columns, not column groups")):(n=Object.assign({},e.getDefinition()),n=Object.assign(n,t),e.table.columnManager.addColumn(n,!1,e).then(function(t){n.field==e.field&&(e.field=!1),e.delete().then(function(){o(t.getComponent())}).catch(function(t){i(t)})}).catch(function(t){i(t)}))})},Column.prototype.deleteCell=function(t){var e=this.cells.indexOf(t);e>-1&&this.cells.splice(e,1)},Column.prototype.defaultOptionList=["title","field","columns","visible","align","hozAlign","vertAlign","width","minWidth","widthGrow","widthShrink","resizable","frozen","responsive","tooltip","cssClass","rowHandle","hideInHtml","print","htmlOutput","sorter","sorterParams","formatter","formatterParams","variableHeight","editable","editor","editorParams","validator","mutator","mutatorParams","mutatorData","mutatorDataParams","mutatorEdit","mutatorEditParams","mutatorClipboard","mutatorClipboardParams","accessor","accessorParams","accessorData","accessorDataParams","accessorDownload","accessorDownloadParams","accessorClipboard","accessorClipboardParams","accessorPrint","accessorPrintParams","accessorHtmlOutput","accessorHtmlOutputParams","clipboard","download","downloadTitle","topCalc","topCalcParams","topCalcFormatter","topCalcFormatterParams","bottomCalc","bottomCalcParams","bottomCalcFormatter","bottomCalcFormatterParams","cellClick","cellDblClick","cellContext","cellTap","cellDblTap","cellTapHold","cellMouseEnter","cellMouseLeave","cellMouseOver","cellMouseOut","cellMouseMove","cellEditing","cellEdited","cellEditCancelled","headerSort","headerSortStartingDir","headerSortTristate","headerClick","headerDblClick","headerContext","headerTap","headerDblTap","headerTapHold","headerTooltip","headerVertical","editableTitle","titleFormatter","titleFormatterParams","headerFilter","headerFilterPlaceholder","headerFilterParams","headerFilterEmptyCheck","headerFilterFunc","headerFilterFuncParams","headerFilterLiveFilter","print","headerContextMenu","headerMenu","contextMenu","formatterPrint","formatterPrintParams","formatterClipboard","formatterClipboardParams","formatterHtmlOutput","formatterHtmlOutputParams","titlePrint","titleClipboard","titleHtmlOutput","titleDownload"],Column.prototype.getComponent=function(){return this.component||(this.component=new ColumnComponent(this)),this.component};var RowManager=function(t){this.table=t,this.element=this.createHolderElement(),this.tableElement=this.createTableElement(),this.heightFixer=this.createTableElement(),this.columnManager=null,this.height=0,this.firstRender=!1,this.renderMode="virtual",this.fixedHeight=!1,this.rows=[],this.activeRows=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.scrollTop=0,this.scrollLeft=0,this.vDomRowHeight=20,this.vDomTop=0,this.vDomBottom=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomMaxRenderChain=90,this.vDomWindowBuffer=0,this.vDomWindowMinTotalRows=20,this.vDomWindowMinMarginRows=5,this.vDomTopNewRows=[],this.vDomBottomNewRows=[],this.rowNumColumn=!1,this.redrawBlock=!1,this.redrawBlockRestoreConfig=!1,this.redrawBlockRederInPosition=!1};RowManager.prototype.createHolderElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-tableHolder"),t.setAttribute("tabindex",0),t},RowManager.prototype.createTableElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-table"),t},RowManager.prototype.getElement=function(){return this.element},RowManager.prototype.getTableElement=function(){return this.tableElement},RowManager.prototype.getRowPosition=function(t,e){return e?this.activeRows.indexOf(t):this.rows.indexOf(t)},RowManager.prototype.setColumnManager=function(t){this.columnManager=t},RowManager.prototype.initialize=function(){var t=this;t.setRenderMode(),t.element.appendChild(t.tableElement),t.firstRender=!0,t.element.addEventListener("scroll",function(){var e=t.element.scrollLeft;t.scrollLeft!=e&&(t.columnManager.scrollHorizontal(e),t.table.options.groupBy&&t.table.modules.groupRows.scrollHeaders(e),t.table.modExists("columnCalcs")&&t.table.modules.columnCalcs.scrollHorizontal(e),t.table.options.scrollHorizontal(e)),t.scrollLeft=e}),"virtual"===this.renderMode&&t.element.addEventListener("scroll",function(){var e=t.element.scrollTop,o=t.scrollTop>e;t.scrollTop!=e?(t.scrollTop=e,t.scrollVertical(o),"scroll"==t.table.options.ajaxProgressiveLoad&&t.table.modules.ajax.nextPage(t.element.scrollHeight-t.element.clientHeight-e),t.table.options.scrollVertical(e)):t.scrollTop=e})},RowManager.prototype.findRow=function(t){var e=this;if("object"!=(void 0===t?"undefined":_typeof(t))){if(void 0===t||null===t)return!1;return e.rows.find(function(o){return o.data[e.table.options.index]==t})||!1}if(t instanceof Row)return t;if(t instanceof RowComponent)return t._getSelf()||!1;if("undefined"!=typeof HTMLElement&&t instanceof HTMLElement){return e.rows.find(function(e){return e.element===t})||!1}return!1},RowManager.prototype.getRowFromDataObject=function(t){return this.rows.find(function(e){return e.data===t})||!1},RowManager.prototype.getRowFromPosition=function(t,e){return e?this.activeRows[t]:this.rows[t]},RowManager.prototype.scrollToRow=function(t,e,o){var i,n=this,l=this.getDisplayRows().indexOf(t),s=t.getElement(),a=0;return new Promise(function(t,r){if(l>-1){if(void 0===e&&(e=n.table.options.scrollToRowPosition),void 0===o&&(o=n.table.options.scrollToRowIfVisible),"nearest"===e)switch(n.renderMode){case"classic":i=Tabulator.prototype.helpers.elOffset(s).top,e=Math.abs(n.element.scrollTop-i)>Math.abs(n.element.scrollTop+n.element.clientHeight-i)?"bottom":"top";break;case"virtual":e=Math.abs(n.vDomTop-l)>Math.abs(n.vDomBottom-l)?"bottom":"top"}if(!o&&Tabulator.prototype.helpers.elVisible(s)&&(a=Tabulator.prototype.helpers.elOffset(s).top-Tabulator.prototype.helpers.elOffset(n.element).top)>0&&a-1&&this.activeRows.splice(i,1),o>-1&&this.rows.splice(o,1),this.setActiveRows(this.activeRows),this.displayRowIterator(function(e){var o=e.indexOf(t);o>-1&&e.splice(o,1)}),e||this.reRenderInPosition(),this.regenerateRowNumbers(),this.table.options.rowDeleted.call(this.table,t.getComponent()),this.table.options.dataEdited.call(this.table,this.getData()),this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.groupRows.updateGroupRows(!0):this.table.options.pagination&&this.table.modExists("page")?this.refreshActiveData(!1,!1,!0):this.table.options.pagination&&this.table.modExists("page")&&this.refreshActiveData("page")},RowManager.prototype.addRow=function(t,e,o,i){var n=this.addRowActual(t,e,o,i);return this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowAdd",n,{data:t,pos:e,index:o}),n},RowManager.prototype.addRows=function(t,e,o){var i=this,n=this,l=0,s=[];return new Promise(function(a,r){e=i.findAddRowPos(e),Array.isArray(t)||(t=[t]),l=t.length-1,(void 0===o&&e||void 0!==o&&!e)&&t.reverse(),t.forEach(function(t,i){var l=n.addRow(t,e,o,!0);s.push(l)}),i.table.options.groupBy&&i.table.modExists("groupRows")?i.table.modules.groupRows.updateGroupRows(!0):i.table.options.pagination&&i.table.modExists("page")?i.refreshActiveData(!1,!1,!0):i.reRenderInPosition(),i.table.modExists("columnCalcs")&&i.table.modules.columnCalcs.recalc(i.table.rowManager.activeRows),i.regenerateRowNumbers(),a(s)})},RowManager.prototype.findAddRowPos=function(t){return void 0===t&&(t=this.table.options.addRowPos),"pos"===t&&(t=!0),"bottom"===t&&(t=!1),t},RowManager.prototype.addRowActual=function(t,e,o,i){var n,l,s=t instanceof Row?t:new Row(t||{},this),a=this.findAddRowPos(e),r=-1;if(!o&&this.table.options.pagination&&"page"==this.table.options.paginationAddRow&&(l=this.getDisplayRows(),a?l.length?o=l[0]:this.activeRows.length&&(o=this.activeRows[this.activeRows.length-1],a=!1):l.length&&(o=l[l.length-1],a=!(l.length1&&(!o||o&&-1==u.indexOf(o)?a?u[0]!==s&&(o=u[0],this._moveRowInArray(s.getGroup().rows,s,o,!a)):u[u.length-1]!==s&&(o=u[u.length-1],this._moveRowInArray(s.getGroup().rows,s,o,!a)):this._moveRowInArray(s.getGroup().rows,s,o,!a))}return o&&(r=this.rows.indexOf(o)),o&&r>-1?(n=this.activeRows.indexOf(o),this.displayRowIterator(function(t){var e=t.indexOf(o);e>-1&&t.splice(a?e:e+1,0,s)}),n>-1&&this.activeRows.splice(a?n:n+1,0,s),this.rows.splice(a?r:r+1,0,s)):a?(this.displayRowIterator(function(t){t.unshift(s)}),this.activeRows.unshift(s),this.rows.unshift(s)):(this.displayRowIterator(function(t){t.push(s)}),this.activeRows.push(s),this.rows.push(s)),this.setActiveRows(this.activeRows),this.table.options.rowAdded.call(this.table,s.getComponent()),this.table.options.dataEdited.call(this.table,this.getData()),i||this.reRenderInPosition(),s},RowManager.prototype.moveRow=function(t,e,o){this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowMove",t,{posFrom:this.getRowPosition(t),posTo:this.getRowPosition(e),to:e,after:o}),this.moveRowActual(t,e,o),this.regenerateRowNumbers(),this.table.options.rowMoved.call(this.table,t.getComponent())},RowManager.prototype.moveRowActual=function(t,e,o){var i=this;if(this._moveRowInArray(this.rows,t,e,o),this._moveRowInArray(this.activeRows,t,e,o),this.displayRowIterator(function(n){i._moveRowInArray(n,t,e,o)}),this.table.options.groupBy&&this.table.modExists("groupRows")){!o&&e instanceof Group&&(e=this.table.rowManager.prevDisplayRow(t)||e);var n=e.getGroup(),l=t.getGroup();n===l?this._moveRowInArray(n.rows,t,e,o):(l&&l.removeRow(t),n.insertRow(t,e,o))}},RowManager.prototype._moveRowInArray=function(t,e,o,i){var n,l,s,a;if(e!==o&&(n=t.indexOf(e),n>-1&&(t.splice(n,1),l=t.indexOf(o),l>-1?i?t.splice(l+1,0,e):t.splice(l,0,e):t.splice(n,0,e)),t===this.getDisplayRows())){s=nn?l:n+1;for(var r=s;r<=a;r++)t[r]&&this.styleRow(t[r],r)}},RowManager.prototype.clearData=function(){this.setData([])},RowManager.prototype.getRowIndex=function(t){return this.findRowIndex(t,this.rows)},RowManager.prototype.getDisplayRowIndex=function(t){var e=this.getDisplayRows().indexOf(t);return e>-1&&e},RowManager.prototype.nextDisplayRow=function(t,e){var o=this.getDisplayRowIndex(t),i=!1;return!1!==o&&o-1)&&o},RowManager.prototype.getData=function(t,e){var o=[];return this.getRows(t).forEach(function(t){"row"==t.type&&o.push(t.getData(e||"data"))}),o},RowManager.prototype.getComponents=function(t){var e=[];return this.getRows(t).forEach(function(t){e.push(t.getComponent())}),e},RowManager.prototype.getDataCount=function(t){return this.getRows(t).length},RowManager.prototype._genRemoteRequest=function(){var t=this,e=this.table,o=e.options,i={};if(e.modExists("page")){if(o.ajaxSorting){var n=this.table.modules.sort.getSort();n.forEach(function(t){delete t.column}),i[this.table.modules.page.paginationDataSentNames.sorters]=n}if(o.ajaxFiltering){var l=this.table.modules.filter.getFilters(!0,!0);i[this.table.modules.page.paginationDataSentNames.filters]=l}this.table.modules.ajax.setParams(i,!0)}e.modules.ajax.sendRequest().then(function(e){t._setDataActual(e,!0)}).catch(function(t){})},RowManager.prototype.filterRefresh=function(){var t=this.table,e=t.options,o=this.scrollLeft;e.ajaxFiltering?"remote"==e.pagination&&t.modExists("page")?(t.modules.page.reset(!0),t.modules.page.setPage(1).then(function(){}).catch(function(){})):e.ajaxProgressiveLoad?t.modules.ajax.loadData().then(function(){}).catch(function(){}):this._genRemoteRequest():this.refreshActiveData("filter"),this.scrollHorizontal(o)},RowManager.prototype.sorterRefresh=function(t){var e=this.table,o=this.table.options,i=this.scrollLeft;o.ajaxSorting?("remote"==o.pagination||o.progressiveLoad)&&e.modExists("page")?(e.modules.page.reset(!0),e.modules.page.setPage(1).then(function(){}).catch(function(){})):o.ajaxProgressiveLoad?e.modules.ajax.loadData().then(function(){}).catch(function(){}):this._genRemoteRequest():this.refreshActiveData(t?"filter":"sort"),this.scrollHorizontal(i)},RowManager.prototype.scrollHorizontal=function(t){this.scrollLeft=t,this.element.scrollLeft=t,this.table.options.groupBy&&this.table.modules.groupRows.scrollHeaders(t),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.scrollHorizontal(t)},RowManager.prototype.refreshActiveData=function(t,e,o){var i,n=this,l=this.table,s=["all","filter","sort","display","freeze","group","tree","page"];if(this.redrawBlock)return void((!this.redrawBlockRestoreConfig||s.indexOf(t)=0))break;l=a}else if(e-s[a].getElement().offsetTop>=0)n=a;else{if(i=!0,!(o-s[a].getElement().offsetTop>=0))break;l=a}}else n=this.vDomTop,l=this.vDomBottom;return s.slice(n,l+1)},RowManager.prototype.displayRowIterator=function(t){this.displayRows.forEach(t),this.displayRowsCount=this.displayRows[this.displayRows.length-1].length},RowManager.prototype.getRows=function(t){var e;switch(t){case"active":e=this.activeRows;break;case"display":e=this.table.rowManager.getDisplayRows();break;case"visible":e=this.getVisibleRows(!0);break;default:e=this.rows}return e},RowManager.prototype.reRenderInPosition=function(t){if("virtual"==this.getRenderMode())if(this.redrawBlock)t?t():this.redrawBlockRederInPosition=!0;else{for(var e=this.element.scrollTop,o=!1,i=!1,n=this.scrollLeft,l=this.getDisplayRows(),s=this.vDomTop;s<=this.vDomBottom;s++)if(l[s]){var a=e-l[s].getElement().offsetTop;if(!(!1===i||Math.abs(a)this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*f),"group"!==m.type&&(c=!1),i.vDomBottom++,u++}t?(i.vDomTopPad=e?i.vDomRowHeight*this.vDomTop+o:i.scrollTop-r,i.vDomBottomPad=i.vDomBottom==i.displayRowsCount-1?0:Math.max(i.vDomScrollHeight-i.vDomTopPad-a-r,0)):(this.vDomTopPad=0,i.vDomRowHeight=Math.floor((a+r)/u),i.vDomBottomPad=i.vDomRowHeight*(i.displayRowsCount-i.vDomBottom-1),i.vDomScrollHeight=r+a+i.vDomBottomPad-i.height),n.style.paddingTop=i.vDomTopPad+"px",n.style.paddingBottom=i.vDomBottomPad+"px",e&&(this.scrollTop=i.vDomTopPad+r+o-(this.element.scrollWidth>this.element.clientWidth?this.element.offsetHeight-this.element.clientHeight:0)),this.scrollTop=Math.min(this.scrollTop,this.element.scrollHeight-this.height),this.element.scrollWidth>this.element.offsetWidth&&e&&(this.scrollTop+=this.element.offsetHeight-this.element.clientHeight),this.vDomScrollPosTop=this.scrollTop,this.vDomScrollPosBottom=this.scrollTop,l.scrollTop=this.scrollTop,n.style.minWidth=c?i.table.columnManager.getWidth()+"px":"",i.table.options.groupBy&&"fitDataFill"!=i.table.modules.layout.getMode()&&i.displayRowsCount==i.table.modules.groupRows.countGroups()&&(i.tableElement.style.minWidth=i.table.columnManager.getWidth())}else this.renderEmptyScroll();this.fixedHeight||this.adjustTableSize()},RowManager.prototype.scrollVertical=function(t){var e=this.scrollTop-this.vDomScrollPosTop,o=this.scrollTop-this.vDomScrollPosBottom,i=2*this.vDomWindowBuffer;if(-e>i||o>i){var n=this.scrollLeft;this._virtualRenderFill(Math.floor(this.element.scrollTop/this.element.scrollHeight*this.displayRowsCount)),this.scrollHorizontal(n)}else t?(e<0&&this._addTopRow(-e),o<0&&(this.vDomScrollHeight-this.scrollTop>this.vDomWindowBuffer?this._removeBottomRow(-o):this.vDomScrollPosBottom=this.scrollTop)):(e>=0&&(this.scrollTop>this.vDomWindowBuffer?this._removeTopRow(e):this.vDomScrollPosTop=this.scrollTop),o>=0&&this._addBottomRow(o))},RowManager.prototype._addTopRow=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=this.tableElement,i=this.getDisplayRows();if(this.vDomTop){var n=this.vDomTop-1,l=i[n],s=l.getHeight()||this.vDomRowHeight;t>=s&&(this.styleRow(l,n),o.insertBefore(l.getElement(),o.firstChild),l.initialized&&l.heightInitialized||(this.vDomTopNewRows.push(l),l.heightInitialized||l.clearCellHeight()),l.initialize(),this.vDomTopPad-=s,this.vDomTopPad<0&&(this.vDomTopPad=n*this.vDomRowHeight),n||(this.vDomTopPad=0),o.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop-=s,this.vDomTop--),t=-(this.scrollTop-this.vDomScrollPosTop),l.getHeight()>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*l.getHeight()),e=(i[this.vDomTop-1].getHeight()||this.vDomRowHeight)?this._addTopRow(t,e+1):this._quickNormalizeRowHeight(this.vDomTopNewRows)}},RowManager.prototype._removeTopRow=function(t){var e=this.tableElement,o=this.getDisplayRows()[this.vDomTop],i=o.getHeight()||this.vDomRowHeight;if(t>=i){var n=o.getElement();n.parentNode.removeChild(n),this.vDomTopPad+=i,e.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop+=this.vDomTop?i:i+this.vDomWindowBuffer,this.vDomTop++,t=this.scrollTop-this.vDomScrollPosTop,this._removeTopRow(t)}},RowManager.prototype._addBottomRow=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=this.tableElement,i=this.getDisplayRows();if(this.vDomBottom=s&&(this.styleRow(l,n),o.appendChild(l.getElement()),l.initialized&&l.heightInitialized||(this.vDomBottomNewRows.push(l),l.heightInitialized||l.clearCellHeight()),l.initialize(),this.vDomBottomPad-=s,(this.vDomBottomPad<0||n==this.displayRowsCount-1)&&(this.vDomBottomPad=0),o.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom+=s,this.vDomBottom++),t=this.scrollTop-this.vDomScrollPosBottom,l.getHeight()>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*l.getHeight()),e=(i[this.vDomBottom+1].getHeight()||this.vDomRowHeight)?this._addBottomRow(t,e+1):this._quickNormalizeRowHeight(this.vDomBottomNewRows)}},RowManager.prototype._removeBottomRow=function(t){var e=this.tableElement,o=this.getDisplayRows()[this.vDomBottom],i=o.getHeight()||this.vDomRowHeight;if(t>=i){var n=o.getElement();n.parentNode&&n.parentNode.removeChild(n),this.vDomBottomPad+=i,this.vDomBottomPad<0&&(this.vDomBottomPad=0),e.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom-=i,this.vDomBottom--,t=-(this.scrollTop-this.vDomScrollPosBottom),this._removeBottomRow(t)}},RowManager.prototype._quickNormalizeRowHeight=function(t){t.forEach(function(t){t.calcHeight()}),t.forEach(function(t){t.setCellHeight()}),t.length=0},RowManager.prototype.normalizeHeight=function(){this.activeRows.forEach(function(t){t.normalizeHeight()})},RowManager.prototype.adjustTableSize=function(){var t,e=this.element.clientHeight;if("virtual"===this.renderMode){var o=this.columnManager.getElement().offsetHeight+(this.table.footerManager&&!this.table.footerManager.external?this.table.footerManager.getElement().offsetHeight:0);this.fixedHeight?(this.element.style.minHeight="calc(100% - "+o+"px)",this.element.style.height="calc(100% - "+o+"px)",this.element.style.maxHeight="calc(100% - "+o+"px)"):(this.element.style.height="",this.element.style.height=this.table.element.clientHeight-o+"px",this.element.scrollTop=this.scrollTop),this.height=this.element.clientHeight,this.vDomWindowBuffer=this.table.options.virtualDomBuffer||this.height,this.fixedHeight||e==this.element.clientHeight||((t=this.table.modExists("resizeTable"))&&!this.table.modules.resizeTable.autoResize||!t)&&this.redraw()}},RowManager.prototype.reinitialize=function(){this.rows.forEach(function(t){t.reinitialize()})},RowManager.prototype.blockRedraw=function(){this.redrawBlock=!0,this.redrawBlockRestoreConfig=!1},RowManager.prototype.restoreRedraw=function(){this.redrawBlock=!1,this.redrawBlockRestoreConfig?(this.refreshActiveData(this.redrawBlockRestoreConfig.stage,this.redrawBlockRestoreConfig.skipStage,this.redrawBlockRestoreConfig.renderInPosition),this.redrawBlockRestoreConfig=!1):this.redrawBlockRederInPosition&&this.reRenderInPosition(),this.redrawBlockRederInPosition=!1}, +RowManager.prototype.redraw=function(t){var e=this.scrollLeft;this.adjustTableSize(),this.table.tableWidth=this.table.element.clientWidth,t?this.renderTable():("classic"==this.renderMode?this.table.options.groupBy?this.refreshActiveData("group",!1,!1):this._simpleRender():(this.reRenderInPosition(),this.scrollHorizontal(e)),this.displayRowsCount||this.table.options.placeholder&&this.getElement().appendChild(this.table.options.placeholder))},RowManager.prototype.resetScroll=function(){if(this.element.scrollLeft=0,this.element.scrollTop=0,"ie"===this.table.browser){var t=document.createEvent("Event");t.initEvent("scroll",!1,!0),this.element.dispatchEvent(t)}else this.element.dispatchEvent(new Event("scroll"))};var RowComponent=function(t){this._row=t};RowComponent.prototype.getData=function(t){return this._row.getData(t)},RowComponent.prototype.getElement=function(){return this._row.getElement()},RowComponent.prototype.getCells=function(){var t=[];return this._row.getCells().forEach(function(e){t.push(e.getComponent())}),t},RowComponent.prototype.getCell=function(t){var e=this._row.getCell(t);return!!e&&e.getComponent()},RowComponent.prototype.getIndex=function(){return this._row.getData("data")[this._row.table.options.index]},RowComponent.prototype.getPosition=function(t){return this._row.table.rowManager.getRowPosition(this._row,t)},RowComponent.prototype.delete=function(){return this._row.delete()},RowComponent.prototype.scrollTo=function(){return this._row.table.rowManager.scrollToRow(this._row)},RowComponent.prototype.pageTo=function(){if(this._row.table.modExists("page",!0))return this._row.table.modules.page.setPageToRow(this._row)},RowComponent.prototype.move=function(t,e){this._row.moveToRow(t,e)},RowComponent.prototype.update=function(t){return this._row.updateData(t)},RowComponent.prototype.normalizeHeight=function(){this._row.normalizeHeight(!0)},RowComponent.prototype.select=function(){this._row.table.modules.selectRow.selectRows(this._row)},RowComponent.prototype.deselect=function(){this._row.table.modules.selectRow.deselectRows(this._row)},RowComponent.prototype.toggleSelect=function(){this._row.table.modules.selectRow.toggleRow(this._row)},RowComponent.prototype.isSelected=function(){return this._row.table.modules.selectRow.isRowSelected(this._row)},RowComponent.prototype._getSelf=function(){return this._row},RowComponent.prototype.validate=function(){return this._row.validate()},RowComponent.prototype.freeze=function(){this._row.table.modExists("frozenRows",!0)&&this._row.table.modules.frozenRows.freezeRow(this._row)},RowComponent.prototype.unfreeze=function(){this._row.table.modExists("frozenRows",!0)&&this._row.table.modules.frozenRows.unfreezeRow(this._row)},RowComponent.prototype.isFrozen=function(){if(this._row.table.modExists("frozenRows",!0)){return this._row.table.modules.frozenRows.rows.indexOf(this._row)>-1}return!1},RowComponent.prototype.treeCollapse=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.collapseRow(this._row)},RowComponent.prototype.treeExpand=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.expandRow(this._row)},RowComponent.prototype.treeToggle=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.toggleRow(this._row)},RowComponent.prototype.getTreeParent=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeParent(this._row)},RowComponent.prototype.getTreeChildren=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeChildren(this._row)},RowComponent.prototype.addTreeChild=function(t,e,o){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.addTreeChildRow(this._row,t,e,o)},RowComponent.prototype.reformat=function(){return this._row.reinitialize()},RowComponent.prototype.getGroup=function(){return this._row.getGroup().getComponent()},RowComponent.prototype.getTable=function(){return this._row.table},RowComponent.prototype.getNextRow=function(){var t=this._row.nextRow();return t?t.getComponent():t},RowComponent.prototype.getPrevRow=function(){var t=this._row.prevRow();return t?t.getComponent():t};var Row=function(t,e){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"row";this.table=e.table,this.parent=e,this.data={},this.type=o,this.element=this.createElement(),this.modules={},this.cells=[],this.height=0,this.heightStyled="",this.manualHeight=!1,this.outerHeight=0,this.initialized=!1,this.heightInitialized=!1,this.component=null,this.setData(t),this.generateElement()};Row.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-row"),t.setAttribute("role","row"),t},Row.prototype.getElement=function(){return this.element},Row.prototype.detachElement=function(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)},Row.prototype.generateElement=function(){var t,e,o,i=this;!1!==i.table.options.selectable&&i.table.modExists("selectRow")&&i.table.modules.selectRow.initializeRow(this),!1!==i.table.options.movableRows&&i.table.modExists("moveRow")&&i.table.modules.moveRow.initializeRow(this),!1!==i.table.options.dataTree&&i.table.modExists("dataTree")&&i.table.modules.dataTree.initializeRow(this),"collapse"===i.table.options.responsiveLayout&&i.table.modExists("responsiveLayout")&&i.table.modules.responsiveLayout.initializeRow(this),i.table.options.rowContextMenu&&this.table.modExists("menu")&&i.table.modules.menu.initializeRow(this),i.table.options.rowClick&&i.element.addEventListener("click",function(t){i.table.options.rowClick(t,i.getComponent())}),i.table.options.rowDblClick&&i.element.addEventListener("dblclick",function(t){i.table.options.rowDblClick(t,i.getComponent())}),i.table.options.rowContext&&i.element.addEventListener("contextmenu",function(t){i.table.options.rowContext(t,i.getComponent())}),i.table.options.rowMouseEnter&&i.element.addEventListener("mouseenter",function(t){i.table.options.rowMouseEnter(t,i.getComponent())}),i.table.options.rowMouseLeave&&i.element.addEventListener("mouseleave",function(t){i.table.options.rowMouseLeave(t,i.getComponent())}),i.table.options.rowMouseOver&&i.element.addEventListener("mouseover",function(t){i.table.options.rowMouseOver(t,i.getComponent())}),i.table.options.rowMouseOut&&i.element.addEventListener("mouseout",function(t){i.table.options.rowMouseOut(t,i.getComponent())}),i.table.options.rowMouseMove&&i.element.addEventListener("mousemove",function(t){i.table.options.rowMouseMove(t,i.getComponent())}),i.table.options.rowTap&&(o=!1,i.element.addEventListener("touchstart",function(t){o=!0},{passive:!0}),i.element.addEventListener("touchend",function(t){o&&i.table.options.rowTap(t,i.getComponent()),o=!1})),i.table.options.rowDblTap&&(t=null,i.element.addEventListener("touchend",function(e){t?(clearTimeout(t),t=null,i.table.options.rowDblTap(e,i.getComponent())):t=setTimeout(function(){clearTimeout(t),t=null},300)})),i.table.options.rowTapHold&&(e=null,i.element.addEventListener("touchstart",function(t){clearTimeout(e),e=setTimeout(function(){clearTimeout(e),e=null,o=!1,i.table.options.rowTapHold(t,i.getComponent())},1e3)},{passive:!0}),i.element.addEventListener("touchend",function(t){clearTimeout(e),e=null}))},Row.prototype.generateCells=function(){this.cells=this.table.columnManager.generateCells(this)},Row.prototype.initialize=function(t){var e=this;if(!e.initialized||t){for(e.deleteCells();e.element.firstChild;)e.element.removeChild(e.element.firstChild);this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layoutRow(this),this.generateCells(),e.cells.forEach(function(t){e.element.appendChild(t.getElement()),t.cellRendered()}),t&&e.normalizeHeight(),e.table.options.dataTree&&e.table.modExists("dataTree")&&e.table.modules.dataTree.layoutRow(this),"collapse"===e.table.options.responsiveLayout&&e.table.modExists("responsiveLayout")&&e.table.modules.responsiveLayout.layoutRow(this),e.table.options.rowFormatter&&e.table.options.rowFormatter(e.getComponent()),e.table.options.resizableRows&&e.table.modExists("resizeRows")&&e.table.modules.resizeRows.initializeRow(e),e.initialized=!0}},Row.prototype.reinitializeHeight=function(){this.heightInitialized=!1,null!==this.element.offsetParent&&this.normalizeHeight(!0)},Row.prototype.reinitialize=function(){this.initialized=!1,this.heightInitialized=!1,this.manualHeight||(this.height=0,this.heightStyled=""),null!==this.element.offsetParent&&this.initialize(!0)},Row.prototype.calcHeight=function(t){var e=0,o=this.table.options.resizableRows?this.element.clientHeight:0;this.cells.forEach(function(t){var o=t.getHeight();o>e&&(e=o)}),this.height=t?Math.max(e,o):this.manualHeight?this.height:Math.max(e,o),this.heightStyled=this.height?this.height+"px":"",this.outerHeight=this.element.offsetHeight},Row.prototype.setCellHeight=function(){this.cells.forEach(function(t){t.setHeight()}),this.heightInitialized=!0},Row.prototype.clearCellHeight=function(){this.cells.forEach(function(t){t.clearHeight()})},Row.prototype.normalizeHeight=function(t){t&&this.clearCellHeight(),this.calcHeight(t),this.setCellHeight()},Row.prototype.setHeight=function(t,e){(this.height!=t||e)&&(this.manualHeight=!0,this.height=t,this.heightStyled=t?t+"px":"",this.setCellHeight(),this.outerHeight=this.element.offsetHeight)},Row.prototype.getHeight=function(){return this.outerHeight},Row.prototype.getWidth=function(){return this.element.offsetWidth},Row.prototype.deleteCell=function(t){var e=this.cells.indexOf(t);e>-1&&this.cells.splice(e,1)},Row.prototype.setData=function(t){this.table.modExists("mutator")&&(t=this.table.modules.mutator.transformRow(t,"data")),this.data=t,this.table.options.reactiveData&&this.table.modExists("reactiveData",!0)&&this.table.modules.reactiveData.watchRow(this)},Row.prototype.updateData=function(t){var e,o=this,i=Tabulator.prototype.helpers.elVisible(this.element),n={};return new Promise(function(l,s){"string"==typeof t&&(t=JSON.parse(t)),o.table.options.reactiveData&&o.table.modExists("reactiveData",!0)&&o.table.modules.reactiveData.block(),o.table.modExists("mutator")?(n=Object.assign(n,o.data),n=Object.assign(n,t),e=o.table.modules.mutator.transformRow(n,"data",t)):e=t;for(var a in e)o.data[a]=e[a];o.table.options.reactiveData&&o.table.modExists("reactiveData",!0)&&o.table.modules.reactiveData.unblock();for(var a in t){o.table.columnManager.getColumnsByFieldRoot(a).forEach(function(t){var n=o.getCell(t.getField());if(n){var l=t.getFieldValue(e);n.getValue()!=l&&(n.setValueProcessData(l),i&&n.cellRendered())}})}i?(o.normalizeHeight(!0),o.table.options.rowFormatter&&o.table.options.rowFormatter(o.getComponent())):(o.initialized=!1,o.height=0,o.heightStyled=""),!1!==o.table.options.dataTree&&o.table.modExists("dataTree")&&o.table.modules.dataTree.redrawNeeded(t)&&(o.table.modules.dataTree.initializeRow(o),o.table.modules.dataTree.layoutRow(o),o.table.rowManager.refreshActiveData("tree",!1,!0)),o.table.options.rowUpdated.call(o.table,o.getComponent()),l()})},Row.prototype.getData=function(t){var e=this;return t?e.table.modExists("accessor")?e.table.modules.accessor.transformRow(e.data,t):void 0:this.data},Row.prototype.getCell=function(t){return t=this.table.columnManager.findColumn(t),this.cells.find(function(e){return e.column===t})},Row.prototype.getCellIndex=function(t){return this.cells.findIndex(function(e){return e===t})},Row.prototype.findNextEditableCell=function(t){var e=!1;if(t0)for(var o=t-1;o>=0;o--){var i=this.cells[o],n=!0;if(i.column.modules.edit&&Tabulator.prototype.helpers.elVisible(i.getElement())&&("function"==typeof i.column.modules.edit.check&&(n=i.column.modules.edit.check(i.getComponent())),n)){e=i;break}}return e},Row.prototype.getCells=function(){return this.cells},Row.prototype.nextRow=function(){return this.table.rowManager.nextDisplayRow(this,!0)||!1},Row.prototype.prevRow=function(){return this.table.rowManager.prevDisplayRow(this,!0)||!1},Row.prototype.moveToRow=function(t,e){var o=this.table.rowManager.findRow(t);o?(this.table.rowManager.moveRowActual(this,o,!e),this.table.rowManager.refreshActiveData("display",!1,!0)):console.warn("Move Error - No matching row found:",t)},Row.prototype.validate=function(){var t=[];return this.cells.forEach(function(e){e.validate()||t.push(e.getComponent())}),!t.length||t},Row.prototype.delete=function(){var t=this;return new Promise(function(e,o){var i,n;t.table.options.history&&t.table.modExists("history")&&(t.table.options.groupBy&&t.table.modExists("groupRows")?(n=t.getGroup().rows,(i=n.indexOf(t))&&(i=n[i-1])):(i=t.table.rowManager.getRowIndex(t))&&(i=t.table.rowManager.rows[i-1]),t.table.modules.history.action("rowDelete",t,{data:t.getData(),pos:!i,index:i})),t.deleteActual(),e()})},Row.prototype.deleteActual=function(t){this.table.rowManager.getRowIndex(this);this.table.modExists("selectRow")&&this.table.modules.selectRow._deselectRow(this,!0),this.table.modExists("edit")&&this.table.modules.edit.currentCell.row===this&&this.table.modules.edit.cancelEdit(),this.table.options.reactiveData&&this.table.modExists("reactiveData",!0),this.modules.group&&this.modules.group.removeRow(this),this.table.rowManager.deleteRow(this,t),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.table.options.dataTree&&this.table.modExists("dataTree",!0)&&this.table.modules.dataTree.rowDelete(this),this.table.modExists("columnCalcs")&&(this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.columnCalcs.recalcRowGroup(this):this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows))},Row.prototype.deleteCells=function(){for(var t=this.cells.length,e=0;e-1?(this.browser="ie",this.browserSlow=!0):t.indexOf("Edge")>-1?(this.browser="edge",this.browserSlow=!0):t.indexOf("Firefox")>-1?(this.browser="firefox",this.browserSlow=!1):(this.browser="other",this.browserSlow=!1),this.browserMobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4))},Tabulator.prototype.blockRedraw=function(){return this.rowManager.blockRedraw()},Tabulator.prototype.restoreRedraw=function(){return this.rowManager.restoreRedraw()},Tabulator.prototype.setDataFromLocalFile=function(t){var e=this;return new Promise(function(o,i){var n=document.createElement("input");n.type="file",n.accept=t||".json,application/json",n.addEventListener("change",function(t){var l,s=n.files[0],a=new FileReader;a.readAsText(s),a.onload=function(t){try{l=JSON.parse(a.result)}catch(t){return console.warn("File Load Error - File contents is invalid JSON",t),void i(t)}e._setData(l).then(function(t){o(t)}).catch(function(t){o(t)})},a.onerror=function(t){console.warn("File Load Error - Unable to read file"),i()}}),n.click()})},Tabulator.prototype.setData=function(t,e,o){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(t,e,o,!1,!0)},Tabulator.prototype._setData=function(t,e,o,i,n){var l=this;return"string"!=typeof t?t?l.rowManager.setData(t,i,n):l.modExists("ajax")&&(l.modules.ajax.getUrl||l.options.ajaxURLGenerator)?"remote"==l.options.pagination&&l.modExists("page",!0)?(l.modules.page.reset(!0,!0),l.modules.page.setPage(1)):l.modules.ajax.loadData(i,n):l.rowManager.setData([],i,n):0==t.indexOf("{")||0==t.indexOf("[")?l.rowManager.setData(JSON.parse(t),i,n):l.modExists("ajax",!0)?(e&&l.modules.ajax.setParams(e),o&&l.modules.ajax.setConfig(o),l.modules.ajax.setUrl(t),"remote"==l.options.pagination&&l.modExists("page",!0)?(l.modules.page.reset(!0,!0),l.modules.page.setPage(1)):l.modules.ajax.loadData(i,n)):void 0},Tabulator.prototype.clearData=function(){this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this.rowManager.clearData()},Tabulator.prototype.getData=function(t){return!0===t&&(console.warn("passing a boolean to the getData function is deprecated, you should now pass the string 'active'"),t="active"),this.rowManager.getData(t)},Tabulator.prototype.getDataCount=function(t){return!0===t&&(console.warn("passing a boolean to the getDataCount function is deprecated, you should now pass the string 'active'"),t="active"),this.rowManager.getDataCount(t)},Tabulator.prototype.searchRows=function(t,e,o){if(this.modExists("filter",!0))return this.modules.filter.search("rows",t,e,o)},Tabulator.prototype.searchData=function(t,e,o){if(this.modExists("filter",!0))return this.modules.filter.search("data",t,e,o)},Tabulator.prototype.getHtml=function(t,e,o){if(this.modExists("export",!0))return this.modules.export.getHtml(t,e,o)},Tabulator.prototype.print=function(t,e,o){if(this.modExists("print",!0))return this.modules.print.printFullscreen(t,e,o)},Tabulator.prototype.getAjaxUrl=function(){if(this.modExists("ajax",!0))return this.modules.ajax.getUrl()},Tabulator.prototype.replaceData=function(t,e,o){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(t,e,o,!0)},Tabulator.prototype.updateData=function(t){var e=this,o=this,i=0;return new Promise(function(n,l){e.modExists("ajax")&&e.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?t.forEach(function(t){var e=o.rowManager.findRow(t[o.options.index]);e&&(i++,e.updateData(t).then(function(){--i||n()}))}):(console.warn("Update Error - No data provided"),l("Update Error - No data provided"))})},Tabulator.prototype.addData=function(t,e,o){var i=this;return new Promise(function(n,l){i.modExists("ajax")&&i.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?i.rowManager.addRows(t,e,o).then(function(t){var e=[];t.forEach(function(t){e.push(t.getComponent())}),n(e)}):(console.warn("Update Error - No data provided"),l("Update Error - No data provided"))})},Tabulator.prototype.updateOrAddData=function(t){var e=this,o=this,i=[],n=0;return new Promise(function(l,s){e.modExists("ajax")&&e.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?t.forEach(function(t){var e=o.rowManager.findRow(t[o.options.index]);n++,e?e.updateData(t).then(function(){n--,i.push(e.getComponent()),n||l(i)}):o.rowManager.addRows(t).then(function(t){n--,i.push(t[0].getComponent()),n||l(i)})}):(console.warn("Update Error - No data provided"),s("Update Error - No data provided"))})},Tabulator.prototype.getRow=function(t){var e=this.rowManager.findRow(t);return e?e.getComponent():(console.warn("Find Error - No matching row found:",t),!1)},Tabulator.prototype.getRowFromPosition=function(t,e){var o=this.rowManager.getRowFromPosition(t,e);return o?o.getComponent():(console.warn("Find Error - No matching row found:",t),!1)},Tabulator.prototype.deleteRow=function(t){var e=this;return new Promise(function(o,i){function n(){++s==t.length&&a&&(l.rowManager.reRenderInPosition(),o())}var l=e,s=0,a=0,r=[];Array.isArray(t)||(t=[t]),t.forEach(function(t){var o=e.rowManager.findRow(t,!0);o?r.push(o):(console.warn("Delete Error - No matching row found:",t),i("Delete Error - No matching row found"),n())}),r.sort(function(t,o){return e.rowManager.rows.indexOf(t)>e.rowManager.rows.indexOf(o)?1:-1}),r.forEach(function(t){t.delete().then(function(){a++,n()}).catch(function(t){n(),i(t)})})})},Tabulator.prototype.addRow=function(t,e,o){var i=this;return new Promise(function(n,l){"string"==typeof t&&(t=JSON.parse(t)),i.rowManager.addRows(t,e,o).then(function(t){i.modExists("columnCalcs")&&i.modules.columnCalcs.recalc(i.rowManager.activeRows),n(t[0].getComponent())})})},Tabulator.prototype.updateOrAddRow=function(t,e){var o=this;return new Promise(function(i,n){var l=o.rowManager.findRow(t);"string"==typeof e&&(e=JSON.parse(e)),l?l.updateData(e).then(function(){o.modExists("columnCalcs")&&o.modules.columnCalcs.recalc(o.rowManager.activeRows),i(l.getComponent())}).catch(function(t){n(t)}):l=o.rowManager.addRows(e).then(function(t){o.modExists("columnCalcs")&&o.modules.columnCalcs.recalc(o.rowManager.activeRows),i(t[0].getComponent())}).catch(function(t){n(t)})})},Tabulator.prototype.updateRow=function(t,e){var o=this;return new Promise(function(i,n){var l=o.rowManager.findRow(t);"string"==typeof e&&(e=JSON.parse(e)),l?l.updateData(e).then(function(){i(l.getComponent())}).catch(function(t){n(t)}):(console.warn("Update Error - No matching row found:",t),n("Update Error - No matching row found"))})},Tabulator.prototype.scrollToRow=function(t,e,o){var i=this;return new Promise(function(n,l){var s=i.rowManager.findRow(t);s?i.rowManager.scrollToRow(s,e,o).then(function(){n()}).catch(function(t){l(t)}):(console.warn("Scroll Error - No matching row found:",t),l("Scroll Error - No matching row found"))})},Tabulator.prototype.moveRow=function(t,e,o){var i=this.rowManager.findRow(t);i?i.moveToRow(e,o):console.warn("Move Error - No matching row found:",t)},Tabulator.prototype.getRows=function(t){return!0===t&&(console.warn("passing a boolean to the getRows function is deprecated, you should now pass the string 'active'"),t="active"),this.rowManager.getComponents(t)},Tabulator.prototype.getRowPosition=function(t,e){var o=this.rowManager.findRow(t);return o?this.rowManager.getRowPosition(o,e):(console.warn("Position Error - No matching row found:",t),!1)},Tabulator.prototype.copyToClipboard=function(t){this.modExists("clipboard",!0)&&this.modules.clipboard.copy(t)},Tabulator.prototype.setColumns=function(t){this.columnManager.setColumns(t)},Tabulator.prototype.getColumns=function(t){return this.columnManager.getComponents(t)},Tabulator.prototype.getColumn=function(t){var e=this.columnManager.findColumn(t);return e?e.getComponent():(console.warn("Find Error - No matching column found:",t),!1)},Tabulator.prototype.getColumnDefinitions=function(){return this.columnManager.getDefinitionTree()},Tabulator.prototype.getColumnLayout=function(){if(this.modExists("persistence",!0))return this.modules.persistence.parseColumns(this.columnManager.getColumns())},Tabulator.prototype.setColumnLayout=function(t){return!!this.modExists("persistence",!0)&&(this.columnManager.setColumns(this.modules.persistence.mergeDefinition(this.options.columns,t)),!0)},Tabulator.prototype.showColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Show Error - No matching column found:",t),!1;e.show(),this.options.responsiveLayout&&this.modExists("responsiveLayout",!0)&&this.modules.responsiveLayout.update()},Tabulator.prototype.hideColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Hide Error - No matching column found:",t),!1;e.hide(),this.options.responsiveLayout&&this.modExists("responsiveLayout",!0)&&this.modules.responsiveLayout.update()},Tabulator.prototype.toggleColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Visibility Toggle Error - No matching column found:",t),!1;e.visible?e.hide():e.show()},Tabulator.prototype.addColumn=function(t,e,o){var i=this;return new Promise(function(n,l){var s=i.columnManager.findColumn(o);i.columnManager.addColumn(t,e,s).then(function(t){n(t.getComponent())}).catch(function(t){l(t)})})},Tabulator.prototype.deleteColumn=function(t){var e=this;return new Promise(function(o,i){var n=e.columnManager.findColumn(t);n?n.delete().then(function(){o()}).catch(function(t){i(t)}):(console.warn("Column Delete Error - No matching column found:",t),i())})},Tabulator.prototype.updateColumnDefinition=function(t,e){var o=this;return new Promise(function(i,n){var l=o.columnManager.findColumn(t);l?l.updateDefinition(e).then(function(t){i(t)}).catch(function(t){n(t)}):(console.warn("Column Update Error - No matching column found:",t),n())})},Tabulator.prototype.moveColumn=function(t,e,o){var i=this.columnManager.findColumn(t),n=this.columnManager.findColumn(e);i?n?this.columnManager.moveColumn(i,n,o):console.warn("Move Error - No matching column found:",n):console.warn("Move Error - No matching column found:",t)},Tabulator.prototype.scrollToColumn=function(t,e,o){var i=this;return new Promise(function(n,l){var s=i.columnManager.findColumn(t);s?i.columnManager.scrollToColumn(s,e,o).then(function(){n()}).catch(function(t){l(t)}):(console.warn("Scroll Error - No matching column found:",t),l("Scroll Error - No matching column found"))})},Tabulator.prototype.setLocale=function(t){this.modules.localize.setLocale(t)},Tabulator.prototype.getLocale=function(){return this.modules.localize.getLocale()},Tabulator.prototype.getLang=function(t){return this.modules.localize.getLang(t)},Tabulator.prototype.redraw=function(t){this.columnManager.redraw(t),this.rowManager.redraw(t)},Tabulator.prototype.setHeight=function(t){"classic"!==this.rowManager.renderMode?(this.options.height=isNaN(t)?t:t+"px",this.element.style.height=this.options.height,this.rowManager.setRenderMode(),this.rowManager.redraw()):console.warn("setHeight function is not available in classic render mode")},Tabulator.prototype.setSort=function(t,e){this.modExists("sort",!0)&&(this.modules.sort.setSort(t,e),this.rowManager.sorterRefresh())},Tabulator.prototype.getSorters=function(){if(this.modExists("sort",!0))return this.modules.sort.getSort()},Tabulator.prototype.clearSort=function(){this.modExists("sort",!0)&&(this.modules.sort.clear(),this.rowManager.sorterRefresh())},Tabulator.prototype.setFilter=function(t,e,o,i){this.modExists("filter",!0)&&(this.modules.filter.setFilter(t,e,o,i),this.rowManager.filterRefresh())},Tabulator.prototype.addFilter=function(t,e,o,i){this.modExists("filter",!0)&&(this.modules.filter.addFilter(t,e,o,i),this.rowManager.filterRefresh())},Tabulator.prototype.getFilters=function(t){if(this.modExists("filter",!0))return this.modules.filter.getFilters(t)},Tabulator.prototype.setHeaderFilterFocus=function(t){if(this.modExists("filter",!0)){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Filter Focus Error - No matching column found:",t),!1;this.modules.filter.setHeaderFilterFocus(e)}},Tabulator.prototype.getHeaderFilterValue=function(t){if(this.modExists("filter",!0)){var e=this.columnManager.findColumn(t);if(e)return this.modules.filter.getHeaderFilterValue(e);console.warn("Column Filter Error - No matching column found:",t)}},Tabulator.prototype.setHeaderFilterValue=function(t,e){if(this.modExists("filter",!0)){var o=this.columnManager.findColumn(t);if(!o)return console.warn("Column Filter Error - No matching column found:",t),!1;this.modules.filter.setHeaderFilterValue(o,e)}},Tabulator.prototype.getHeaderFilters=function(){if(this.modExists("filter",!0))return this.modules.filter.getHeaderFilters()},Tabulator.prototype.removeFilter=function(t,e,o){this.modExists("filter",!0)&&(this.modules.filter.removeFilter(t,e,o),this.rowManager.filterRefresh())},Tabulator.prototype.clearFilter=function(t){this.modExists("filter",!0)&&(this.modules.filter.clearFilter(t),this.rowManager.filterRefresh())},Tabulator.prototype.clearHeaderFilter=function(){this.modExists("filter",!0)&&(this.modules.filter.clearHeaderFilter(),this.rowManager.filterRefresh())},Tabulator.prototype.selectRow=function(t){this.modExists("selectRow",!0)&&(!0===t&&(console.warn("passing a boolean to the selectRowselectRow function is deprecated, you should now pass the string 'active'"),t="active"),this.modules.selectRow.selectRows(t))},Tabulator.prototype.deselectRow=function(t){this.modExists("selectRow",!0)&&this.modules.selectRow.deselectRows(t)},Tabulator.prototype.toggleSelectRow=function(t){this.modExists("selectRow",!0)&&this.modules.selectRow.toggleRow(t)},Tabulator.prototype.getSelectedRows=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedRows()},Tabulator.prototype.getSelectedData=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedData()},Tabulator.prototype.getInvalidCells=function(){if(this.modExists("validate",!0))return this.modules.validate.getInvalidCells()},Tabulator.prototype.clearCellValidation=function(t){var e=this;this.modExists("validate",!0)&&(t||(t=this.modules.validate.getInvalidCells()),Array.isArray(t)||(t=[t]),t.forEach(function(t){e.modules.validate.clearValidation(t._getSelf())}))},Tabulator.prototype.validate=function(t){var e=[];return this.rowManager.rows.forEach(function(t){var o=t.validate();!0!==o&&(e=e.concat(o))}),!e.length||e},Tabulator.prototype.setMaxPage=function(t){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setMaxPage(t)},Tabulator.prototype.setPage=function(t){return this.options.pagination&&this.modExists("page")?this.modules.page.setPage(t):new Promise(function(t,e){e()})},Tabulator.prototype.setPageToRow=function(t){var e=this;return new Promise(function(o,i){e.options.pagination&&e.modExists("page")?(t=e.rowManager.findRow(t),t?e.modules.page.setPageToRow(t).then(function(){o()}).catch(function(){i()}):i()):i()})},Tabulator.prototype.setPageSize=function(t){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setPageSize(t),this.modules.page.setPage(1).then(function(){}).catch(function(){})},Tabulator.prototype.getPageSize=function(){if(this.options.pagination&&this.modExists("page",!0))return this.modules.page.getPageSize()},Tabulator.prototype.previousPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.previousPage()},Tabulator.prototype.nextPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.nextPage()},Tabulator.prototype.getPage=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPage()},Tabulator.prototype.getPageMax=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPageMax()},Tabulator.prototype.setGroupBy=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupBy=t,this.modules.groupRows.initialize(),this.rowManager.refreshActiveData("display"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")},Tabulator.prototype.setGroupStartOpen=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupStartOpen=t,this.modules.groupRows.initialize(),this.options.groupBy?(this.rowManager.refreshActiveData("group"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")):console.warn("Grouping Update - cant refresh view, no groups have been set")},Tabulator.prototype.setGroupHeader=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupHeader=t,this.modules.groupRows.initialize(),this.options.groupBy?(this.rowManager.refreshActiveData("group"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")):console.warn("Grouping Update - cant refresh view, no groups have been set")},Tabulator.prototype.getGroups=function(t){return!!this.modExists("groupRows",!0)&&this.modules.groupRows.getGroups(!0)},Tabulator.prototype.getGroupedData=function(){if(this.modExists("groupRows",!0))return this.options.groupBy?this.modules.groupRows.getGroupedData():this.getData()},Tabulator.prototype.getEditedCells=function(){if(this.modExists("edit",!0))return this.modules.edit.getEditedCells()},Tabulator.prototype.clearCellEdited=function(t){var e=this;this.modExists("edit",!0)&&(t||(t=this.modules.edit.getEditedCells()),Array.isArray(t)||(t=[t]),t.forEach(function(t){e.modules.edit.clearEdited(t._getSelf())}))},Tabulator.prototype.getCalcResults=function(){return!!this.modExists("columnCalcs",!0)&&this.modules.columnCalcs.getResults()},Tabulator.prototype.recalc=function(){this.modExists("columnCalcs",!0)&&this.modules.columnCalcs.recalcAll(this.rowManager.activeRows)},Tabulator.prototype.navigatePrev=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&t.nav().prev()},Tabulator.prototype.navigateNext=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&t.nav().next()},Tabulator.prototype.navigateLeft=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().left())},Tabulator.prototype.navigateRight=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().right())},Tabulator.prototype.navigateUp=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().up())},Tabulator.prototype.navigateDown=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().down())},Tabulator.prototype.undo=function(){ +return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.undo()},Tabulator.prototype.redo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.redo()},Tabulator.prototype.getHistoryUndoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryUndoSize()},Tabulator.prototype.getHistoryRedoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryRedoSize()},Tabulator.prototype.download=function(t,e,o,i){this.modExists("download",!0)&&this.modules.download.download(t,e,o,i)},Tabulator.prototype.downloadToTab=function(t,e,o,i){this.modExists("download",!0)&&this.modules.download.download(t,e,o,i,!0)},Tabulator.prototype.tableComms=function(t,e,o,i){this.modules.comms.receive(t,e,o,i)},Tabulator.prototype.moduleBindings={},Tabulator.prototype.extendModule=function(t,e,o){if(Tabulator.prototype.moduleBindings[t]){var i=Tabulator.prototype.moduleBindings[t].prototype[e];if(i)if("object"==(void 0===o?"undefined":_typeof(o)))for(var n in o)i[n]=o[n];else console.warn("Module Error - Invalid value type, it must be an object");else console.warn("Module Error - property does not exist:",e)}else console.warn("Module Error - module does not exist:",t)},Tabulator.prototype.registerModule=function(t,e){Tabulator.prototype.moduleBindings[t]=e},Tabulator.prototype.bindModules=function(){this.modules={};for(var t in Tabulator.prototype.moduleBindings)this.modules[t]=new Tabulator.prototype.moduleBindings[t](this)},Tabulator.prototype.modExists=function(t,e){return!!this.modules[t]||(e&&console.error("Tabulator Module Not Installed: "+t),!1)},Tabulator.prototype.helpers={elVisible:function(t){return!(t.offsetWidth<=0&&t.offsetHeight<=0)},elOffset:function(t){var e=t.getBoundingClientRect();return{top:e.top+window.pageYOffset-document.documentElement.clientTop,left:e.left+window.pageXOffset-document.documentElement.clientLeft}},deepClone:function(t){var e=Array.isArray(t)?[]:{};for(var o in t)null!=t[o]&&"object"===_typeof(t[o])?t[o]instanceof Date?e[o]=new Date(t[o]):e[o]=this.deepClone(t[o]):e[o]=t[o];return e}},Tabulator.prototype.comms={tables:[],register:function(t){Tabulator.prototype.comms.tables.push(t)},deregister:function(t){var e=Tabulator.prototype.comms.tables.indexOf(t);e>-1&&Tabulator.prototype.comms.tables.splice(e,1)},lookupTable:function(t,e){var o,i,n=[];if("string"==typeof t){if(o=document.querySelectorAll(t),o.length)for(var l=0;l0?l.setWidth(n):l.reinitializeWidth()):this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitColumns:function(t){function e(t){return"string"==typeof t?t.indexOf("%")>-1?n/100*parseInt(t):parseInt(t):t}function o(t,i,n,l){function s(t){return n*(t.column.definition.widthGrow||1)}function a(t){return e(t.width)-n*(t.column.definition.widthShrink||0)}var r=[],u=0,c=0,h=0,d=0,p=0,m=[];return t.forEach(function(t,e){var o=l?a(t):s(t);t.column.minWidth>=o?r.push(t):(m.push(t),p+=l?t.column.definition.widthShrink||1:t.column.definition.widthGrow||1)}),r.length?(r.forEach(function(t){u+=l?t.width-t.column.minWidth:t.column.minWidth,t.width=t.column.minWidth}),c=i-u,h=p?Math.floor(c/p):c,d=c-h*p,d+=o(m,c,h,l)):(d=p?i-Math.floor(i/p)*p:i,m.forEach(function(t){t.width=l?a(t):s(t)})),d}var i=this,n=i.table.element.clientWidth,l=0,s=0,a=0,r=0,u=[],c=[],h=0,d=0,p=0;this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.rowManager.element.scrollHeight>this.table.rowManager.element.clientHeight&&(n-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),t.forEach(function(t){var o,i,n;t.visible&&(o=t.definition.width,i=parseInt(t.minWidth),o?(n=e(o),l+=n>i?n:i,t.definition.widthShrink&&(c.push({column:t,width:n>i?n:i}),h+=t.definition.widthShrink)):(u.push({column:t,width:0}),a+=t.definition.widthGrow||1))}),s=n-l,r=Math.floor(s/a);var p=o(u,s,r,!1);u.length&&p>0&&(u[u.length-1].width+=+p),u.forEach(function(t){s-=t.width}),d=Math.abs(p)+s,d>0&&h&&(p=o(c,d,Math.floor(d/h),!0)),c.length&&(c[c.length-1].width-=p),u.forEach(function(t){t.column.setWidth(t.width)}),c.forEach(function(t){t.column.setWidth(t.width)})}},Tabulator.prototype.registerModule("layout",Layout);var Localize=function(t){this.table=t,this.locale="default",this.lang=!1,this.bindings={}};Localize.prototype.setHeaderFilterPlaceholder=function(t){this.langs.default.headerFilters.default=t},Localize.prototype.setHeaderFilterColumnPlaceholder=function(t,e){this.langs.default.headerFilters.columns[t]=e,this.lang&&!this.lang.headerFilters.columns[t]&&(this.lang.headerFilters.columns[t]=e)},Localize.prototype.installLang=function(t,e){this.langs[t]?this._setLangProp(this.langs[t],e):this.langs[t]=e},Localize.prototype._setLangProp=function(t,e){for(var o in e)t[o]&&"object"==_typeof(t[o])?this._setLangProp(t[o],e[o]):t[o]=e[o]},Localize.prototype.setLocale=function(t){function e(t,o){for(var i in t)"object"==_typeof(t[i])?(o[i]||(o[i]={}),e(t[i],o[i])):o[i]=t[i]}var o=this;if(t=t||"default",!0===t&&navigator.language&&(t=navigator.language.toLowerCase()),t&&!o.langs[t]){var i=t.split("-")[0];o.langs[i]?(console.warn("Localization Error - Exact matching locale not found, using closest match: ",t,i),t=i):(console.warn("Localization Error - Matching locale not found, using default: ",t),t="default")}o.locale=t,o.lang=Tabulator.prototype.helpers.deepClone(o.langs.default||{}),"default"!=t&&e(o.langs[t],o.lang),o.table.options.localized.call(o.table,o.locale,o.lang),o._executeBindings()},Localize.prototype.getLocale=function(t){return self.locale},Localize.prototype.getLang=function(t){return t?this.langs[t]:this.lang},Localize.prototype.getText=function(t,e){var t=e?t+"|"+e:t,o=t.split("|");return this._getLangElement(o,this.locale)||""},Localize.prototype._getLangElement=function(t,e){var o=this,i=o.lang;return t.forEach(function(t){var e;i&&(e=i[t],i=void 0!==e&&e)}),i},Localize.prototype.bind=function(t,e){this.bindings[t]||(this.bindings[t]=[]),this.bindings[t].push(e),e(this.getText(t),this.lang)},Localize.prototype._executeBindings=function(){var t=this;for(var e in t.bindings)!function(e){t.bindings[e].forEach(function(o){o(t.getText(e),t.lang)})}(e)},Localize.prototype.langs={default:{groups:{item:"item",items:"items"},columns:{},ajax:{loading:"Loading",error:"Error"},pagination:{page_size:"Page Size",page_title:"Show Page",first:"First",first_title:"First Page",last:"Last",last_title:"Last Page",prev:"Prev",prev_title:"Prev Page",next:"Next",next_title:"Next Page",all:"All"},headerFilters:{default:"filter column...",columns:{}}}},Tabulator.prototype.registerModule("localize",Localize);var Comms=function(t){this.table=t};Comms.prototype.getConnections=function(t){var e,o=this,i=[];return e=Tabulator.prototype.comms.lookupTable(t),e.forEach(function(t){o.table!==t&&i.push(t)}),i},Comms.prototype.send=function(t,e,o,i){var n=this,l=this.getConnections(t);l.forEach(function(t){t.tableComms(n.table.element,e,o,i)}),!l.length&&t&&console.warn("Table Connection Error - No tables matching selector found",t)},Comms.prototype.receive=function(t,e,o,i){if(this.table.modExists(e))return this.table.modules[e].commsReceived(t,o,i);console.warn("Inter-table Comms Error - no such module:",e)},Tabulator.prototype.registerModule("comms",Comms); \ No newline at end of file diff --git a/admin/lib/composer.json b/admin/lib/composer.json new file mode 100644 index 0000000..c4a3f1d --- /dev/null +++ b/admin/lib/composer.json @@ -0,0 +1,6 @@ +{ + "require":{ + "mustache/mustache":"2.13.0", + "phpmailer/phpmailer":"~6.1" + } +} \ No newline at end of file diff --git a/admin/lib/composer.lock b/admin/lib/composer.lock new file mode 100644 index 0000000..653ae87 --- /dev/null +++ b/admin/lib/composer.lock @@ -0,0 +1,134 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "4df00bed21ac245a6cfa5bc94e8dcb54", + "packages": [ + { + "name": "mustache/mustache", + "version": "v2.13.0", + "source": { + "type": "git", + "url": "https://github.com/bobthecow/mustache.php.git", + "reference": "e95c5a008c23d3151d59ea72484d4f72049ab7f4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/bobthecow/mustache.php/zipball/e95c5a008c23d3151d59ea72484d4f72049ab7f4", + "reference": "e95c5a008c23d3151d59ea72484d4f72049ab7f4", + "shasum": "" + }, + "require": { + "php": ">=5.2.4" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~1.11", + "phpunit/phpunit": "~3.7|~4.0|~5.0" + }, + "type": "library", + "autoload": { + "psr-0": { + "Mustache": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Justin Hileman", + "email": "justin@justinhileman.info", + "homepage": "http://justinhileman.com" + } + ], + "description": "A Mustache implementation in PHP.", + "homepage": "https://github.com/bobthecow/mustache.php", + "keywords": [ + "mustache", + "templating" + ], + "time": "2019-11-23T21:40:31+00:00" + }, + { + "name": "phpmailer/phpmailer", + "version": "v6.1.8", + "source": { + "type": "git", + "url": "https://github.com/PHPMailer/PHPMailer.git", + "reference": "917ab212fa00dc6eacbb26e8bc387ebe40993bc1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/917ab212fa00dc6eacbb26e8bc387ebe40993bc1", + "reference": "917ab212fa00dc6eacbb26e8bc387ebe40993bc1", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-filter": "*", + "ext-hash": "*", + "php": ">=5.5.0" + }, + "require-dev": { + "doctrine/annotations": "^1.2", + "friendsofphp/php-cs-fixer": "^2.2", + "phpunit/phpunit": "^4.8 || ^5.7" + }, + "suggest": { + "ext-mbstring": "Needed to send email in multibyte encoding charset", + "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication", + "league/oauth2-google": "Needed for Google XOAUTH2 authentication", + "psr/log": "For optional PSR-3 debug logging", + "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication", + "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)" + }, + "type": "library", + "autoload": { + "psr-4": { + "PHPMailer\\PHPMailer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1-only" + ], + "authors": [ + { + "name": "Marcus Bointon", + "email": "phpmailer@synchromedia.co.uk" + }, + { + "name": "Jim Jagielski", + "email": "jimjag@gmail.com" + }, + { + "name": "Andy Prevost", + "email": "codeworxtech@users.sourceforge.net" + }, + { + "name": "Brent R. Matzelle" + } + ], + "description": "PHPMailer is a full-featured email creation and transfer class for PHP", + "funding": [ + { + "url": "https://github.com/synchro", + "type": "github" + } + ], + "time": "2020-10-09T14:55:58+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [], + "plugin-api-version": "1.1.0" +} diff --git a/admin/lib/config.php b/admin/lib/config.php new file mode 100644 index 0000000..6149f7a --- /dev/null +++ b/admin/lib/config.php @@ -0,0 +1,35 @@ + "/dks_lu_admin/", + "cookie" => "dks_lu", + "templatepath" => "tmpl/", + "db"=> array( + "type" => "pgsql", + "host" => "sql12.your-server.de", + "dbname" => "dkslu2_db", + "user" => "dkslu2_user", + "password" => "wehH6EvQmFHKpyWf", + ), + "appversion" => "1", + "minify" => "", + "sitename" => "dks.lu", + "sitetemplatepath" => $_SERVER["DOCUMENT_ROOT"].'/dks_lu' + ); + + // function getparams(){ + // $get_arr = array(); + // if ($_SERVER['QUERY_STRING'] != ""){ + // $xar = explode("&", $_SERVER['QUERY_STRING']); + // #print_r($xar); + // if (count($xar) > 0){ + // foreach ($xar as $tmp_arr_param) { + // $split_param = explode("=", $tmp_arr_param); + // if ($split_param[1]){ + // $get_arr[$split_param[0]] = urldecode($split_param[1]); + // } + // } + // } + // } + // return $get_arr; + // } +?> \ No newline at end of file diff --git a/admin/lib/database.php b/admin/lib/database.php new file mode 100644 index 0000000..5373a0b --- /dev/null +++ b/admin/lib/database.php @@ -0,0 +1,83 @@ +dbconf = $pdbconf; + try { + //'mysql:host=;dbname=', $user, password + //'sqlite:/opt/databases/mydb.sq3 + //pgsql:host=localhost;port=5432;dbname=testdb;user=bruce;password=mypass + $this->conn = new PDO($this->dbconf["type"].':host='.$this->dbconf["host"].';port=5432;dbname='.$this->dbconf["dbname"],$this->dbconf["user"],$this->dbconf["password"]); + } catch(PDOException $e){ + error_log("Connection error:".$e->getMessage()); + // fwrite(STDERR, "Connectio Error: ".$e->getMessage()."\n"); + } + } + + public function securetext($text){ + return str_replace("'","''",$text); + } + public function value($text){ + if (($text == "") || ($text == null)){ + return 'null'; + } + return "'".$text."'"; + } + + public function query($sql){ + try { + if ($this->debug ==1 ){ + error_log("QUERY: ".$sql); + } + // fwrite(STDERR, "QUERY: ".$sql."\n"); + if ($this->conn){ + $sth = $this->conn->prepare($sql); + $sth->execute(); + $result = $sth->fetch(PDO::FETCH_ASSOC); + + return $result; + } + } catch(PDOException $e){ + error_log("QUERY ERROR: ".$sql." ".$e->getMessage()); + } + return null; + } + + public function queryarray($sql){ + $result = null; + try { + if ($this->conn){ + $sth = $this->link->prepare($sql); + $sth->execute(); + $result = $sth->fetchAll(PDO::FETCH_ASSOC); + return $result; + } + } catch (PDOException $e){ + error_log("QUERYARRAY ERROR: ".$sql); + } + return $result; + } + + public function exec($sql){ + try { + if ($this->conn){ + return $this->conn->exec($sql); + } + } catch (PDOException $e){ + error_log("EXEC ERROR: ".$sql); + } + return -1; + } + + public function newuuid(){ + $nid = $this->query("SELECT uuid_in(md5(random()::text || clock_timestamp()::text)::cstring) as id"); + return $nid["id"]; + } + + public function __destruct(){ + $this->conn = null; + } +} +?> \ No newline at end of file diff --git a/admin/lib/session.php b/admin/lib/session.php new file mode 100644 index 0000000..a3a4926 --- /dev/null +++ b/admin/lib/session.php @@ -0,0 +1,35 @@ +dbh = $dblink; + } + + public function getSession($sid){ + if (($sid !== null) && ($sid != "")){ + $this->session = $this->dbh->query("select u.id as id_user, u.username, u.id_usergroup as usergroup, s.id as id_session , s.sessiondata from sessions s join users u on (s.id_user=u.id) where s.id='".$sid."' and s.remote_addr='".$_SERVER["REMOTE_ADDR"]."';"); + } + return $this->session; + } + + public function checkLogin($username,$password){ + $encpwd = hash('sha256', trim($password)); + + //echo "select id,username,usergroup from public.users where username='".$username."' and password='".$encpwd."';\n"; + $auth = $this->dbh->query("select id,username,id_usergroup as usergroup from public.users where username='".$username."' and userpassword='".$encpwd."';"); + //error_log(print_r($auth)); + + if ($auth){ + $nuuid = $this->dbh->newuuid(); + $this->dbh->exec("INSERT INTO public.sessions (id,id_user,remote_addr,user_agent) VALUES ('".$nuuid."','".$auth['id']."','".$_SERVER["REMOTE_ADDR"]."','".$_SERVER["HTTP_USER_AGENT"]."');"); + return $this->getSession($nuuid); + } + return null; + } + + public function __destruct(){ + $this->conn = null; + } +} +?> \ No newline at end of file diff --git a/admin/lib/vendor/autoload.php b/admin/lib/vendor/autoload.php new file mode 100644 index 0000000..2286229 --- /dev/null +++ b/admin/lib/vendor/autoload.php @@ -0,0 +1,7 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer\Autoload; + +/** + * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. + * + * $loader = new \Composer\Autoload\ClassLoader(); + * + * // register classes with namespaces + * $loader->add('Symfony\Component', __DIR__.'/component'); + * $loader->add('Symfony', __DIR__.'/framework'); + * + * // activate the autoloader + * $loader->register(); + * + * // to enable searching the include path (eg. for PEAR packages) + * $loader->setUseIncludePath(true); + * + * In this example, if you try to use a class in the Symfony\Component + * namespace or one of its children (Symfony\Component\Console for instance), + * the autoloader will first look for the class under the component/ + * directory, and it will then fallback to the framework/ directory if not + * found before giving up. + * + * This class is loosely based on the Symfony UniversalClassLoader. + * + * @author Fabien Potencier + * @author Jordi Boggiano + * @see http://www.php-fig.org/psr/psr-0/ + * @see http://www.php-fig.org/psr/psr-4/ + */ +class ClassLoader +{ + // PSR-4 + private $prefixLengthsPsr4 = array(); + private $prefixDirsPsr4 = array(); + private $fallbackDirsPsr4 = array(); + + // PSR-0 + private $prefixesPsr0 = array(); + private $fallbackDirsPsr0 = array(); + + private $useIncludePath = false; + private $classMap = array(); + private $classMapAuthoritative = false; + private $missingClasses = array(); + private $apcuPrefix; + + public function getPrefixes() + { + if (!empty($this->prefixesPsr0)) { + return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); + } + + return array(); + } + + public function getPrefixesPsr4() + { + return $this->prefixDirsPsr4; + } + + public function getFallbackDirs() + { + return $this->fallbackDirsPsr0; + } + + public function getFallbackDirsPsr4() + { + return $this->fallbackDirsPsr4; + } + + public function getClassMap() + { + return $this->classMap; + } + + /** + * @param array $classMap Class to filename map + */ + public function addClassMap(array $classMap) + { + if ($this->classMap) { + $this->classMap = array_merge($this->classMap, $classMap); + } else { + $this->classMap = $classMap; + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, either + * appending or prepending to the ones previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories + */ + public function add($prefix, $paths, $prepend = false) + { + if (!$prefix) { + if ($prepend) { + $this->fallbackDirsPsr0 = array_merge( + (array) $paths, + $this->fallbackDirsPsr0 + ); + } else { + $this->fallbackDirsPsr0 = array_merge( + $this->fallbackDirsPsr0, + (array) $paths + ); + } + + return; + } + + $first = $prefix[0]; + if (!isset($this->prefixesPsr0[$first][$prefix])) { + $this->prefixesPsr0[$first][$prefix] = (array) $paths; + + return; + } + if ($prepend) { + $this->prefixesPsr0[$first][$prefix] = array_merge( + (array) $paths, + $this->prefixesPsr0[$first][$prefix] + ); + } else { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $this->prefixesPsr0[$first][$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, either + * appending or prepending to the ones previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories + * + * @throws \InvalidArgumentException + */ + public function addPsr4($prefix, $paths, $prepend = false) + { + if (!$prefix) { + // Register directories for the root namespace. + if ($prepend) { + $this->fallbackDirsPsr4 = array_merge( + (array) $paths, + $this->fallbackDirsPsr4 + ); + } else { + $this->fallbackDirsPsr4 = array_merge( + $this->fallbackDirsPsr4, + (array) $paths + ); + } + } elseif (!isset($this->prefixDirsPsr4[$prefix])) { + // Register directories for a new namespace. + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } elseif ($prepend) { + // Prepend directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + (array) $paths, + $this->prefixDirsPsr4[$prefix] + ); + } else { + // Append directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $this->prefixDirsPsr4[$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, + * replacing any others previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 base directories + */ + public function set($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr0 = (array) $paths; + } else { + $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, + * replacing any others previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * + * @throws \InvalidArgumentException + */ + public function setPsr4($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr4 = (array) $paths; + } else { + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } + } + + /** + * Turns on searching the include path for class files. + * + * @param bool $useIncludePath + */ + public function setUseIncludePath($useIncludePath) + { + $this->useIncludePath = $useIncludePath; + } + + /** + * Can be used to check if the autoloader uses the include path to check + * for classes. + * + * @return bool + */ + public function getUseIncludePath() + { + return $this->useIncludePath; + } + + /** + * Turns off searching the prefix and fallback directories for classes + * that have not been registered with the class map. + * + * @param bool $classMapAuthoritative + */ + public function setClassMapAuthoritative($classMapAuthoritative) + { + $this->classMapAuthoritative = $classMapAuthoritative; + } + + /** + * Should class lookup fail if not found in the current class map? + * + * @return bool + */ + public function isClassMapAuthoritative() + { + return $this->classMapAuthoritative; + } + + /** + * APCu prefix to use to cache found/not-found classes, if the extension is enabled. + * + * @param string|null $apcuPrefix + */ + public function setApcuPrefix($apcuPrefix) + { + $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; + } + + /** + * The APCu prefix in use, or null if APCu caching is not enabled. + * + * @return string|null + */ + public function getApcuPrefix() + { + return $this->apcuPrefix; + } + + /** + * Registers this instance as an autoloader. + * + * @param bool $prepend Whether to prepend the autoloader or not + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + } + + /** + * Unregisters this instance as an autoloader. + */ + public function unregister() + { + spl_autoload_unregister(array($this, 'loadClass')); + } + + /** + * Loads the given class or interface. + * + * @param string $class The name of the class + * @return bool|null True if loaded, null otherwise + */ + public function loadClass($class) + { + if ($file = $this->findFile($class)) { + includeFile($file); + + return true; + } + } + + /** + * Finds the path to the file where the class is defined. + * + * @param string $class The name of the class + * + * @return string|false The path if found, false otherwise + */ + public function findFile($class) + { + // class map lookup + if (isset($this->classMap[$class])) { + return $this->classMap[$class]; + } + if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { + return false; + } + if (null !== $this->apcuPrefix) { + $file = apcu_fetch($this->apcuPrefix.$class, $hit); + if ($hit) { + return $file; + } + } + + $file = $this->findFileWithExtension($class, '.php'); + + // Search for Hack files if we are running on HHVM + if (false === $file && defined('HHVM_VERSION')) { + $file = $this->findFileWithExtension($class, '.hh'); + } + + if (null !== $this->apcuPrefix) { + apcu_add($this->apcuPrefix.$class, $file); + } + + if (false === $file) { + // Remember that this class does not exist. + $this->missingClasses[$class] = true; + } + + return $file; + } + + private function findFileWithExtension($class, $ext) + { + // PSR-4 lookup + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; + + $first = $class[0]; + if (isset($this->prefixLengthsPsr4[$first])) { + $subPath = $class; + while (false !== $lastPos = strrpos($subPath, '\\')) { + $subPath = substr($subPath, 0, $lastPos); + $search = $subPath . '\\'; + if (isset($this->prefixDirsPsr4[$search])) { + $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); + foreach ($this->prefixDirsPsr4[$search] as $dir) { + if (file_exists($file = $dir . $pathEnd)) { + return $file; + } + } + } + } + } + + // PSR-4 fallback dirs + foreach ($this->fallbackDirsPsr4 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { + return $file; + } + } + + // PSR-0 lookup + if (false !== $pos = strrpos($class, '\\')) { + // namespaced class name + $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) + . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); + } else { + // PEAR-like class name + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; + } + + if (isset($this->prefixesPsr0[$first])) { + foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { + if (0 === strpos($class, $prefix)) { + foreach ($dirs as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + } + } + } + + // PSR-0 fallback dirs + foreach ($this->fallbackDirsPsr0 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + + // PSR-0 include paths. + if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { + return $file; + } + + return false; + } +} + +/** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + */ +function includeFile($file) +{ + include $file; +} diff --git a/admin/lib/vendor/composer/LICENSE b/admin/lib/vendor/composer/LICENSE new file mode 100644 index 0000000..f27399a --- /dev/null +++ b/admin/lib/vendor/composer/LICENSE @@ -0,0 +1,21 @@ + +Copyright (c) Nils Adermann, Jordi Boggiano + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/admin/lib/vendor/composer/autoload_classmap.php b/admin/lib/vendor/composer/autoload_classmap.php new file mode 100644 index 0000000..7a91153 --- /dev/null +++ b/admin/lib/vendor/composer/autoload_classmap.php @@ -0,0 +1,9 @@ + array($vendorDir . '/mustache/mustache/src'), +); diff --git a/admin/lib/vendor/composer/autoload_psr4.php b/admin/lib/vendor/composer/autoload_psr4.php new file mode 100644 index 0000000..0706da6 --- /dev/null +++ b/admin/lib/vendor/composer/autoload_psr4.php @@ -0,0 +1,10 @@ + array($vendorDir . '/phpmailer/phpmailer/src'), +); diff --git a/admin/lib/vendor/composer/autoload_real.php b/admin/lib/vendor/composer/autoload_real.php new file mode 100644 index 0000000..c620f26 --- /dev/null +++ b/admin/lib/vendor/composer/autoload_real.php @@ -0,0 +1,55 @@ += 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); + if ($useStaticLoader) { + require_once __DIR__ . '/autoload_static.php'; + + call_user_func(\Composer\Autoload\ComposerStaticInit885fbe19dab1b37aa91c383b45da3786::getInitializer($loader)); + } else { + $map = require __DIR__ . '/autoload_namespaces.php'; + foreach ($map as $namespace => $path) { + $loader->set($namespace, $path); + } + + $map = require __DIR__ . '/autoload_psr4.php'; + foreach ($map as $namespace => $path) { + $loader->setPsr4($namespace, $path); + } + + $classMap = require __DIR__ . '/autoload_classmap.php'; + if ($classMap) { + $loader->addClassMap($classMap); + } + } + + $loader->register(true); + + return $loader; + } +} diff --git a/admin/lib/vendor/composer/autoload_static.php b/admin/lib/vendor/composer/autoload_static.php new file mode 100644 index 0000000..c41aefa --- /dev/null +++ b/admin/lib/vendor/composer/autoload_static.php @@ -0,0 +1,42 @@ + + array ( + 'PHPMailer\\PHPMailer\\' => 20, + ), + ); + + public static $prefixDirsPsr4 = array ( + 'PHPMailer\\PHPMailer\\' => + array ( + 0 => __DIR__ . '/..' . '/phpmailer/phpmailer/src', + ), + ); + + public static $prefixesPsr0 = array ( + 'M' => + array ( + 'Mustache' => + array ( + 0 => __DIR__ . '/..' . '/mustache/mustache/src', + ), + ), + ); + + public static function getInitializer(ClassLoader $loader) + { + return \Closure::bind(function () use ($loader) { + $loader->prefixLengthsPsr4 = ComposerStaticInit885fbe19dab1b37aa91c383b45da3786::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit885fbe19dab1b37aa91c383b45da3786::$prefixDirsPsr4; + $loader->prefixesPsr0 = ComposerStaticInit885fbe19dab1b37aa91c383b45da3786::$prefixesPsr0; + + }, null, ClassLoader::class); + } +} diff --git a/admin/lib/vendor/composer/installed.json b/admin/lib/vendor/composer/installed.json new file mode 100644 index 0000000..e2dfae8 --- /dev/null +++ b/admin/lib/vendor/composer/installed.json @@ -0,0 +1,121 @@ +[ + { + "name": "mustache/mustache", + "version": "v2.13.0", + "version_normalized": "2.13.0.0", + "source": { + "type": "git", + "url": "https://github.com/bobthecow/mustache.php.git", + "reference": "e95c5a008c23d3151d59ea72484d4f72049ab7f4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/bobthecow/mustache.php/zipball/e95c5a008c23d3151d59ea72484d4f72049ab7f4", + "reference": "e95c5a008c23d3151d59ea72484d4f72049ab7f4", + "shasum": "" + }, + "require": { + "php": ">=5.2.4" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~1.11", + "phpunit/phpunit": "~3.7|~4.0|~5.0" + }, + "time": "2019-11-23T21:40:31+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-0": { + "Mustache": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Justin Hileman", + "email": "justin@justinhileman.info", + "homepage": "http://justinhileman.com" + } + ], + "description": "A Mustache implementation in PHP.", + "homepage": "https://github.com/bobthecow/mustache.php", + "keywords": [ + "mustache", + "templating" + ] + }, + { + "name": "phpmailer/phpmailer", + "version": "v6.1.8", + "version_normalized": "6.1.8.0", + "source": { + "type": "git", + "url": "https://github.com/PHPMailer/PHPMailer.git", + "reference": "917ab212fa00dc6eacbb26e8bc387ebe40993bc1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/917ab212fa00dc6eacbb26e8bc387ebe40993bc1", + "reference": "917ab212fa00dc6eacbb26e8bc387ebe40993bc1", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-filter": "*", + "ext-hash": "*", + "php": ">=5.5.0" + }, + "require-dev": { + "doctrine/annotations": "^1.2", + "friendsofphp/php-cs-fixer": "^2.2", + "phpunit/phpunit": "^4.8 || ^5.7" + }, + "suggest": { + "ext-mbstring": "Needed to send email in multibyte encoding charset", + "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication", + "league/oauth2-google": "Needed for Google XOAUTH2 authentication", + "psr/log": "For optional PSR-3 debug logging", + "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication", + "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)" + }, + "time": "2020-10-09T14:55:58+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "PHPMailer\\PHPMailer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1-only" + ], + "authors": [ + { + "name": "Marcus Bointon", + "email": "phpmailer@synchromedia.co.uk" + }, + { + "name": "Jim Jagielski", + "email": "jimjag@gmail.com" + }, + { + "name": "Andy Prevost", + "email": "codeworxtech@users.sourceforge.net" + }, + { + "name": "Brent R. Matzelle" + } + ], + "description": "PHPMailer is a full-featured email creation and transfer class for PHP", + "funding": [ + { + "url": "https://github.com/synchro", + "type": "github" + } + ] + } +] diff --git a/admin/lib/vendor/mustache/mustache/.gitignore b/admin/lib/vendor/mustache/mustache/.gitignore new file mode 100644 index 0000000..3861f00 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/.gitignore @@ -0,0 +1,4 @@ +.php_cs.cache +composer.lock +mustache.php +vendor diff --git a/admin/lib/vendor/mustache/mustache/.gitmodules b/admin/lib/vendor/mustache/mustache/.gitmodules new file mode 100644 index 0000000..042ea4d --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/.gitmodules @@ -0,0 +1,6 @@ +[submodule "vendor/spec"] + path = vendor/spec + url = https://github.com/mustache/spec.git +[submodule "vendor/yaml"] + path = vendor/yaml + url = https://github.com/fabpot/yaml.git diff --git a/admin/lib/vendor/mustache/mustache/.php_cs b/admin/lib/vendor/mustache/mustache/.php_cs new file mode 100644 index 0000000..d924712 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/.php_cs @@ -0,0 +1,26 @@ +level(Symfony\CS\FixerInterface::SYMFONY_LEVEL) + ->fixers(array( + '-concat_without_spaces', + '-pre_increment', + '-unalign_double_arrow', + '-unalign_equals', + 'align_double_arrow', + 'concat_with_spaces', + 'ordered_use', + 'strict', + )) + ->setUsingLinter(false); + +$finder = $config->getFinder() + ->in('bin') + ->in('src') + ->in('test'); + +return $config; diff --git a/admin/lib/vendor/mustache/mustache/.styleci.yml b/admin/lib/vendor/mustache/mustache/.styleci.yml new file mode 100644 index 0000000..1aebcc3 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/.styleci.yml @@ -0,0 +1,13 @@ +preset: symfony + +enabled: + - align_double_arrow + - concat_with_spaces + - ordered_use + - strict + +disabled: + - concat_without_spaces + - pre_increment + - unalign_double_arrow + - unalign_equals diff --git a/admin/lib/vendor/mustache/mustache/.travis.yml b/admin/lib/vendor/mustache/mustache/.travis.yml new file mode 100644 index 0000000..d88c6f0 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/.travis.yml @@ -0,0 +1,31 @@ +language: php + +sudo: false + +matrix: + include: + - php: 5.2 + dist: precise + - php: 5.3 + dist: precise + - php: 5.4 + dist: trusty + - php: 5.5 + dist: trusty + - php: 5.6 + - php: 7.0 + - php: 7.1 + - php: 7.2 + - php: 7.3 + - php: 7.4snapshot + - php: hhvm + dist: trusty + allow_failures: + - php: hhvm + - php: 7.4snapshot + +script: + - '[[ "$TRAVIS_PHP_VERSION" = 5.2* ]] && phpunit || vendor/bin/phpunit --verbose' + +install: + - '[[ "$TRAVIS_PHP_VERSION" = 5.2* ]] || composer install' diff --git a/admin/lib/vendor/mustache/mustache/CONTRIBUTING.md b/admin/lib/vendor/mustache/mustache/CONTRIBUTING.md new file mode 100644 index 0000000..c0b323d --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/CONTRIBUTING.md @@ -0,0 +1,35 @@ +# Contributions welcome! + + +### Here's a quick guide: + + 1. [Fork the repo on GitHub](https://github.com/bobthecow/mustache.php). + + 2. Update submodules: `git submodule update --init` + + 3. Run the test suite. We only take pull requests with passing tests, and it's great to know that you have a clean slate. Make sure you have PHPUnit 3.5+, then run `phpunit` from the project directory. + + 4. Add tests for your change. Only refactoring and documentation changes require no new tests. If you are adding functionality or fixing a bug, add a test! + + 5. Make the tests pass. + + 6. Push your fork to GitHub and submit a pull request against the `dev` branch. + + +### You can do some things to increase the chance that your pull request is accepted the first time: + + * Submit one pull request per fix or feature. + * To help with that, do all your work in a feature branch (e.g. `feature/my-alsome-feature`). + * Follow the conventions you see used in the project. + * Use `phpcs --standard=PSR2` to check your changes against the coding standard. + * Write tests that fail without your code, and pass with it. + * Don't bump version numbers. Those will be updated — per [semver](http://semver.org) — once your change is merged into `master`. + * Update any documentation: docblocks, README, examples, etc. + * ... Don't update the wiki until your change is merged and released, but make a note in your pull request so we don't forget. + + +### Mustache.php follows the PSR-* coding standards: + + * [PSR-0: Class and file naming conventions](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md) + * [PSR-1: Basic coding standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md) + * [PSR-2: Coding style guide](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) diff --git a/admin/lib/vendor/mustache/mustache/LICENSE b/admin/lib/vendor/mustache/mustache/LICENSE new file mode 100644 index 0000000..e0aecc9 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2010-2015 Justin Hileman + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE +OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/admin/lib/vendor/mustache/mustache/README.md b/admin/lib/vendor/mustache/mustache/README.md new file mode 100644 index 0000000..a596ace --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/README.md @@ -0,0 +1,72 @@ +Mustache.php +============ + +A [Mustache](http://mustache.github.com/) implementation in PHP. + +[![Package version](http://img.shields.io/packagist/v/mustache/mustache.svg?style=flat-square)](https://packagist.org/packages/mustache/mustache) +[![Build status](http://img.shields.io/travis/bobthecow/mustache.php/dev.svg?style=flat-square)](http://travis-ci.org/bobthecow/mustache.php) +[![StyleCI](https://styleci.io/repos/569670/shield)](https://styleci.io/repos/569670) +[![Monthly downloads](http://img.shields.io/packagist/dm/mustache/mustache.svg?style=flat-square)](https://packagist.org/packages/mustache/mustache) + + +Usage +----- + +A quick example: + +```php +render('Hello {{planet}}', array('planet' => 'World!')); // "Hello World!" +``` + + +And a more in-depth example -- this is the canonical Mustache template: + +```html+jinja +Hello {{name}} +You have just won {{value}} dollars! +{{#in_ca}} +Well, {{taxed_value}} dollars, after taxes. +{{/in_ca}} +``` + + +Create a view "context" object -- which could also be an associative array, but those don't do functions quite as well: + +```php +value - ($this->value * 0.4); + } + + public $in_ca = true; +} +``` + + +And render it: + +```php +render($template, $chris); +``` + + +And That's Not All! +------------------- + +Read [the Mustache.php documentation](https://github.com/bobthecow/mustache.php/wiki/Home) for more information. + + +See Also +-------- + + * [Readme for the Ruby Mustache implementation](http://github.com/defunkt/mustache/blob/master/README.md). + * [mustache(5)](http://mustache.github.com/mustache.5.html) man page. diff --git a/admin/lib/vendor/mustache/mustache/bin/build_bootstrap.php b/admin/lib/vendor/mustache/mustache/bin/build_bootstrap.php new file mode 100644 index 0000000..cc23b2b --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/bin/build_bootstrap.php @@ -0,0 +1,178 @@ +#!/usr/bin/env php + + */ +class SymfonyClassCollectionLoader +{ + private static $loaded; + + const HEADER = <<<'EOS' +\s*$/'), '', file_get_contents($r->getFileName())); + } + + $cache = $cacheDir . '/' . $name . $extension; + $header = sprintf(self::HEADER, strftime('%Y')); + self::writeCacheFile($cache, $header . substr(self::stripComments('=5.2.4" + }, + "require-dev": { + "phpunit/phpunit": "~3.7|~4.0|~5.0", + "friendsofphp/php-cs-fixer": "~1.11" + }, + "autoload": { + "psr-0": { "Mustache": "src/" } + } +} diff --git a/admin/lib/vendor/mustache/mustache/phpunit.xml.dist b/admin/lib/vendor/mustache/mustache/phpunit.xml.dist new file mode 100644 index 0000000..3c620b6 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/phpunit.xml.dist @@ -0,0 +1,17 @@ + + + + ./test + ./test/Mustache/Test/FiveThree + + + + ./test/Mustache/Test/FiveThree + + + + + ./src/Mustache + + + \ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/src/Mustache/Autoloader.php b/admin/lib/vendor/mustache/mustache/src/Mustache/Autoloader.php new file mode 100644 index 0000000..e8ea3f4 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/src/Mustache/Autoloader.php @@ -0,0 +1,88 @@ +baseDir = $realDir; + } else { + $this->baseDir = $baseDir; + } + } + + /** + * Register a new instance as an SPL autoloader. + * + * @param string $baseDir Mustache library base directory (default: dirname(__FILE__).'/..') + * + * @return Mustache_Autoloader Registered Autoloader instance + */ + public static function register($baseDir = null) + { + $key = $baseDir ? $baseDir : 0; + + if (!isset(self::$instances[$key])) { + self::$instances[$key] = new self($baseDir); + } + + $loader = self::$instances[$key]; + spl_autoload_register(array($loader, 'autoload')); + + return $loader; + } + + /** + * Autoload Mustache classes. + * + * @param string $class + */ + public function autoload($class) + { + if ($class[0] === '\\') { + $class = substr($class, 1); + } + + if (strpos($class, 'Mustache') !== 0) { + return; + } + + $file = sprintf('%s/%s.php', $this->baseDir, str_replace('_', '/', $class)); + if (is_file($file)) { + require $file; + } + } +} diff --git a/admin/lib/vendor/mustache/mustache/src/Mustache/Cache.php b/admin/lib/vendor/mustache/mustache/src/Mustache/Cache.php new file mode 100644 index 0000000..3b5b3f1 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/src/Mustache/Cache.php @@ -0,0 +1,36 @@ +logger; + } + + /** + * Set a logger instance. + * + * @param Mustache_Logger|Psr\Log\LoggerInterface $logger + */ + public function setLogger($logger = null) + { + if ($logger !== null && !($logger instanceof Mustache_Logger || is_a($logger, 'Psr\\Log\\LoggerInterface'))) { + throw new Mustache_Exception_InvalidArgumentException('Expected an instance of Mustache_Logger or Psr\\Log\\LoggerInterface.'); + } + + $this->logger = $logger; + } + + /** + * Add a log record if logging is enabled. + * + * @param int $level The logging level + * @param string $message The log message + * @param array $context The log context + */ + protected function log($level, $message, array $context = array()) + { + if (isset($this->logger)) { + $this->logger->log($level, $message, $context); + } + } +} diff --git a/admin/lib/vendor/mustache/mustache/src/Mustache/Cache/FilesystemCache.php b/admin/lib/vendor/mustache/mustache/src/Mustache/Cache/FilesystemCache.php new file mode 100644 index 0000000..3e742b7 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/src/Mustache/Cache/FilesystemCache.php @@ -0,0 +1,161 @@ +cache($className, $compiledSource); + * + * The FilesystemCache benefits from any opcode caching that may be setup in your environment. So do that, k? + */ +class Mustache_Cache_FilesystemCache extends Mustache_Cache_AbstractCache +{ + private $baseDir; + private $fileMode; + + /** + * Filesystem cache constructor. + * + * @param string $baseDir Directory for compiled templates + * @param int $fileMode Override default permissions for cache files. Defaults to using the system-defined umask + */ + public function __construct($baseDir, $fileMode = null) + { + $this->baseDir = $baseDir; + $this->fileMode = $fileMode; + } + + /** + * Load the class from cache using `require_once`. + * + * @param string $key + * + * @return bool + */ + public function load($key) + { + $fileName = $this->getCacheFilename($key); + if (!is_file($fileName)) { + return false; + } + + require_once $fileName; + + return true; + } + + /** + * Cache and load the compiled class. + * + * @param string $key + * @param string $value + */ + public function cache($key, $value) + { + $fileName = $this->getCacheFilename($key); + + $this->log( + Mustache_Logger::DEBUG, + 'Writing to template cache: "{fileName}"', + array('fileName' => $fileName) + ); + + $this->writeFile($fileName, $value); + $this->load($key); + } + + /** + * Build the cache filename. + * Subclasses should override for custom cache directory structures. + * + * @param string $name + * + * @return string + */ + protected function getCacheFilename($name) + { + return sprintf('%s/%s.php', $this->baseDir, $name); + } + + /** + * Create cache directory. + * + * @throws Mustache_Exception_RuntimeException If unable to create directory + * + * @param string $fileName + * + * @return string + */ + private function buildDirectoryForFilename($fileName) + { + $dirName = dirname($fileName); + if (!is_dir($dirName)) { + $this->log( + Mustache_Logger::INFO, + 'Creating Mustache template cache directory: "{dirName}"', + array('dirName' => $dirName) + ); + + @mkdir($dirName, 0777, true); + // @codeCoverageIgnoreStart + if (!is_dir($dirName)) { + throw new Mustache_Exception_RuntimeException(sprintf('Failed to create cache directory "%s".', $dirName)); + } + // @codeCoverageIgnoreEnd + } + + return $dirName; + } + + /** + * Write cache file. + * + * @throws Mustache_Exception_RuntimeException If unable to write file + * + * @param string $fileName + * @param string $value + */ + private function writeFile($fileName, $value) + { + $dirName = $this->buildDirectoryForFilename($fileName); + + $this->log( + Mustache_Logger::DEBUG, + 'Caching compiled template to "{fileName}"', + array('fileName' => $fileName) + ); + + $tempFile = tempnam($dirName, basename($fileName)); + if (false !== @file_put_contents($tempFile, $value)) { + if (@rename($tempFile, $fileName)) { + $mode = isset($this->fileMode) ? $this->fileMode : (0666 & ~umask()); + @chmod($fileName, $mode); + + return; + } + + // @codeCoverageIgnoreStart + $this->log( + Mustache_Logger::ERROR, + 'Unable to rename Mustache temp cache file: "{tempName}" -> "{fileName}"', + array('tempName' => $tempFile, 'fileName' => $fileName) + ); + // @codeCoverageIgnoreEnd + } + + // @codeCoverageIgnoreStart + throw new Mustache_Exception_RuntimeException(sprintf('Failed to write cache file "%s".', $fileName)); + // @codeCoverageIgnoreEnd + } +} diff --git a/admin/lib/vendor/mustache/mustache/src/Mustache/Cache/NoopCache.php b/admin/lib/vendor/mustache/mustache/src/Mustache/Cache/NoopCache.php new file mode 100644 index 0000000..ed9eec9 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/src/Mustache/Cache/NoopCache.php @@ -0,0 +1,47 @@ +log( + Mustache_Logger::WARNING, + 'Template cache disabled, evaluating "{className}" class at runtime', + array('className' => $key) + ); + eval('?>' . $value); + } +} diff --git a/admin/lib/vendor/mustache/mustache/src/Mustache/Compiler.php b/admin/lib/vendor/mustache/mustache/src/Mustache/Compiler.php new file mode 100644 index 0000000..610369e --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/src/Mustache/Compiler.php @@ -0,0 +1,692 @@ +pragmas = $this->defaultPragmas; + $this->sections = array(); + $this->blocks = array(); + $this->source = $source; + $this->indentNextLine = true; + $this->customEscape = $customEscape; + $this->entityFlags = $entityFlags; + $this->charset = $charset; + $this->strictCallables = $strictCallables; + + return $this->writeCode($tree, $name); + } + + /** + * Enable pragmas across all templates, regardless of the presence of pragma + * tags in the individual templates. + * + * @internal Users should set global pragmas in Mustache_Engine, not here :) + * + * @param string[] $pragmas + */ + public function setPragmas(array $pragmas) + { + $this->pragmas = array(); + foreach ($pragmas as $pragma) { + $this->pragmas[$pragma] = true; + } + $this->defaultPragmas = $this->pragmas; + } + + /** + * Helper function for walking the Mustache token parse tree. + * + * @throws Mustache_Exception_SyntaxException upon encountering unknown token types + * + * @param array $tree Parse tree of Mustache tokens + * @param int $level (default: 0) + * + * @return string Generated PHP source code + */ + private function walk(array $tree, $level = 0) + { + $code = ''; + $level++; + foreach ($tree as $node) { + switch ($node[Mustache_Tokenizer::TYPE]) { + case Mustache_Tokenizer::T_PRAGMA: + $this->pragmas[$node[Mustache_Tokenizer::NAME]] = true; + break; + + case Mustache_Tokenizer::T_SECTION: + $code .= $this->section( + $node[Mustache_Tokenizer::NODES], + $node[Mustache_Tokenizer::NAME], + isset($node[Mustache_Tokenizer::FILTERS]) ? $node[Mustache_Tokenizer::FILTERS] : array(), + $node[Mustache_Tokenizer::INDEX], + $node[Mustache_Tokenizer::END], + $node[Mustache_Tokenizer::OTAG], + $node[Mustache_Tokenizer::CTAG], + $level + ); + break; + + case Mustache_Tokenizer::T_INVERTED: + $code .= $this->invertedSection( + $node[Mustache_Tokenizer::NODES], + $node[Mustache_Tokenizer::NAME], + isset($node[Mustache_Tokenizer::FILTERS]) ? $node[Mustache_Tokenizer::FILTERS] : array(), + $level + ); + break; + + case Mustache_Tokenizer::T_PARTIAL: + $code .= $this->partial( + $node[Mustache_Tokenizer::NAME], + isset($node[Mustache_Tokenizer::INDENT]) ? $node[Mustache_Tokenizer::INDENT] : '', + $level + ); + break; + + case Mustache_Tokenizer::T_PARENT: + $code .= $this->parent( + $node[Mustache_Tokenizer::NAME], + isset($node[Mustache_Tokenizer::INDENT]) ? $node[Mustache_Tokenizer::INDENT] : '', + $node[Mustache_Tokenizer::NODES], + $level + ); + break; + + case Mustache_Tokenizer::T_BLOCK_ARG: + $code .= $this->blockArg( + $node[Mustache_Tokenizer::NODES], + $node[Mustache_Tokenizer::NAME], + $node[Mustache_Tokenizer::INDEX], + $node[Mustache_Tokenizer::END], + $node[Mustache_Tokenizer::OTAG], + $node[Mustache_Tokenizer::CTAG], + $level + ); + break; + + case Mustache_Tokenizer::T_BLOCK_VAR: + $code .= $this->blockVar( + $node[Mustache_Tokenizer::NODES], + $node[Mustache_Tokenizer::NAME], + $node[Mustache_Tokenizer::INDEX], + $node[Mustache_Tokenizer::END], + $node[Mustache_Tokenizer::OTAG], + $node[Mustache_Tokenizer::CTAG], + $level + ); + break; + + case Mustache_Tokenizer::T_COMMENT: + break; + + case Mustache_Tokenizer::T_ESCAPED: + case Mustache_Tokenizer::T_UNESCAPED: + case Mustache_Tokenizer::T_UNESCAPED_2: + $code .= $this->variable( + $node[Mustache_Tokenizer::NAME], + isset($node[Mustache_Tokenizer::FILTERS]) ? $node[Mustache_Tokenizer::FILTERS] : array(), + $node[Mustache_Tokenizer::TYPE] === Mustache_Tokenizer::T_ESCAPED, + $level + ); + break; + + case Mustache_Tokenizer::T_TEXT: + $code .= $this->text($node[Mustache_Tokenizer::VALUE], $level); + break; + + default: + throw new Mustache_Exception_SyntaxException(sprintf('Unknown token type: %s', $node[Mustache_Tokenizer::TYPE]), $node); + } + } + + return $code; + } + + const KLASS = 'lambdaHelper = new Mustache_LambdaHelper($this->mustache, $context); + $buffer = \'\'; + %s + + return $buffer; + } + %s + %s + }'; + + const KLASS_NO_LAMBDAS = 'walk($tree); + $sections = implode("\n", $this->sections); + $blocks = implode("\n", $this->blocks); + $klass = empty($this->sections) && empty($this->blocks) ? self::KLASS_NO_LAMBDAS : self::KLASS; + + $callable = $this->strictCallables ? $this->prepare(self::STRICT_CALLABLE) : ''; + + return sprintf($this->prepare($klass, 0, false, true), $name, $callable, $code, $sections, $blocks); + } + + const BLOCK_VAR = ' + $blockFunction = $context->findInBlock(%s); + if (is_callable($blockFunction)) { + $buffer .= call_user_func($blockFunction, $context); + %s} + '; + + const BLOCK_VAR_ELSE = '} else {%s'; + + /** + * Generate Mustache Template inheritance block variable PHP source. + * + * @param array $nodes Array of child tokens + * @param string $id Section name + * @param int $start Section start offset + * @param int $end Section end offset + * @param string $otag Current Mustache opening tag + * @param string $ctag Current Mustache closing tag + * @param int $level + * + * @return string Generated PHP source code + */ + private function blockVar($nodes, $id, $start, $end, $otag, $ctag, $level) + { + $id = var_export($id, true); + + $else = $this->walk($nodes, $level); + if ($else !== '') { + $else = sprintf($this->prepare(self::BLOCK_VAR_ELSE, $level + 1, false, true), $else); + } + + return sprintf($this->prepare(self::BLOCK_VAR, $level), $id, $else); + } + + const BLOCK_ARG = '%s => array($this, \'block%s\'),'; + + /** + * Generate Mustache Template inheritance block argument PHP source. + * + * @param array $nodes Array of child tokens + * @param string $id Section name + * @param int $start Section start offset + * @param int $end Section end offset + * @param string $otag Current Mustache opening tag + * @param string $ctag Current Mustache closing tag + * @param int $level + * + * @return string Generated PHP source code + */ + private function blockArg($nodes, $id, $start, $end, $otag, $ctag, $level) + { + $key = $this->block($nodes); + $keystr = var_export($key, true); + $id = var_export($id, true); + + return sprintf($this->prepare(self::BLOCK_ARG, $level), $id, $key); + } + + const BLOCK_FUNCTION = ' + public function block%s($context) + { + $indent = $buffer = \'\';%s + + return $buffer; + } + '; + + /** + * Generate Mustache Template inheritance block function PHP source. + * + * @param array $nodes Array of child tokens + * + * @return string key of new block function + */ + private function block($nodes) + { + $code = $this->walk($nodes, 0); + $key = ucfirst(md5($code)); + + if (!isset($this->blocks[$key])) { + $this->blocks[$key] = sprintf($this->prepare(self::BLOCK_FUNCTION, 0), $key, $code); + } + + return $key; + } + + const SECTION_CALL = ' + // %s section + $value = $context->%s(%s);%s + $buffer .= $this->section%s($context, $indent, $value); + '; + + const SECTION = ' + private function section%s(Mustache_Context $context, $indent, $value) + { + $buffer = \'\'; + + if (%s) { + $source = %s; + $result = call_user_func($value, $source, %s); + if (strpos($result, \'{{\') === false) { + $buffer .= $result; + } else { + $buffer .= $this->mustache + ->loadLambda((string) $result%s) + ->renderInternal($context); + } + } elseif (!empty($value)) { + $values = $this->isIterable($value) ? $value : array($value); + foreach ($values as $value) { + $context->push($value); + %s + $context->pop(); + } + } + + return $buffer; + } + '; + + /** + * Generate Mustache Template section PHP source. + * + * @param array $nodes Array of child tokens + * @param string $id Section name + * @param string[] $filters Array of filters + * @param int $start Section start offset + * @param int $end Section end offset + * @param string $otag Current Mustache opening tag + * @param string $ctag Current Mustache closing tag + * @param int $level + * + * @return string Generated section PHP source code + */ + private function section($nodes, $id, $filters, $start, $end, $otag, $ctag, $level) + { + $source = var_export(substr($this->source, $start, $end - $start), true); + $callable = $this->getCallable(); + + if ($otag !== '{{' || $ctag !== '}}') { + $delimTag = var_export(sprintf('{{= %s %s =}}', $otag, $ctag), true); + $helper = sprintf('$this->lambdaHelper->withDelimiters(%s)', $delimTag); + $delims = ', ' . $delimTag; + } else { + $helper = '$this->lambdaHelper'; + $delims = ''; + } + + $key = ucfirst(md5($delims . "\n" . $source)); + + if (!isset($this->sections[$key])) { + $this->sections[$key] = sprintf($this->prepare(self::SECTION), $key, $callable, $source, $helper, $delims, $this->walk($nodes, 2)); + } + + $method = $this->getFindMethod($id); + $id = var_export($id, true); + $filters = $this->getFilters($filters, $level); + + return sprintf($this->prepare(self::SECTION_CALL, $level), $id, $method, $id, $filters, $key); + } + + const INVERTED_SECTION = ' + // %s inverted section + $value = $context->%s(%s);%s + if (empty($value)) { + %s + } + '; + + /** + * Generate Mustache Template inverted section PHP source. + * + * @param array $nodes Array of child tokens + * @param string $id Section name + * @param string[] $filters Array of filters + * @param int $level + * + * @return string Generated inverted section PHP source code + */ + private function invertedSection($nodes, $id, $filters, $level) + { + $method = $this->getFindMethod($id); + $id = var_export($id, true); + $filters = $this->getFilters($filters, $level); + + return sprintf($this->prepare(self::INVERTED_SECTION, $level), $id, $method, $id, $filters, $this->walk($nodes, $level)); + } + + const PARTIAL_INDENT = ', $indent . %s'; + const PARTIAL = ' + if ($partial = $this->mustache->loadPartial(%s)) { + $buffer .= $partial->renderInternal($context%s); + } + '; + + /** + * Generate Mustache Template partial call PHP source. + * + * @param string $id Partial name + * @param string $indent Whitespace indent to apply to partial + * @param int $level + * + * @return string Generated partial call PHP source code + */ + private function partial($id, $indent, $level) + { + if ($indent !== '') { + $indentParam = sprintf(self::PARTIAL_INDENT, var_export($indent, true)); + } else { + $indentParam = ''; + } + + return sprintf( + $this->prepare(self::PARTIAL, $level), + var_export($id, true), + $indentParam + ); + } + + const PARENT = ' + if ($parent = $this->mustache->loadPartial(%s)) { + $context->pushBlockContext(array(%s + )); + $buffer .= $parent->renderInternal($context, $indent); + $context->popBlockContext(); + } + '; + + const PARENT_NO_CONTEXT = ' + if ($parent = $this->mustache->loadPartial(%s)) { + $buffer .= $parent->renderInternal($context, $indent); + } + '; + + /** + * Generate Mustache Template inheritance parent call PHP source. + * + * @param string $id Parent tag name + * @param string $indent Whitespace indent to apply to parent + * @param array $children Child nodes + * @param int $level + * + * @return string Generated PHP source code + */ + private function parent($id, $indent, array $children, $level) + { + $realChildren = array_filter($children, array(__CLASS__, 'onlyBlockArgs')); + + if (empty($realChildren)) { + return sprintf($this->prepare(self::PARENT_NO_CONTEXT, $level), var_export($id, true)); + } + + return sprintf( + $this->prepare(self::PARENT, $level), + var_export($id, true), + $this->walk($realChildren, $level + 1) + ); + } + + /** + * Helper method for filtering out non-block-arg tokens. + * + * @param array $node + * + * @return bool True if $node is a block arg token + */ + private static function onlyBlockArgs(array $node) + { + return $node[Mustache_Tokenizer::TYPE] === Mustache_Tokenizer::T_BLOCK_ARG; + } + + const VARIABLE = ' + $value = $this->resolveValue($context->%s(%s), $context);%s + $buffer .= %s%s; + '; + + /** + * Generate Mustache Template variable interpolation PHP source. + * + * @param string $id Variable name + * @param string[] $filters Array of filters + * @param bool $escape Escape the variable value for output? + * @param int $level + * + * @return string Generated variable interpolation PHP source + */ + private function variable($id, $filters, $escape, $level) + { + $method = $this->getFindMethod($id); + $id = ($method !== 'last') ? var_export($id, true) : ''; + $filters = $this->getFilters($filters, $level); + $value = $escape ? $this->getEscape() : '$value'; + + return sprintf($this->prepare(self::VARIABLE, $level), $method, $id, $filters, $this->flushIndent(), $value); + } + + const FILTER = ' + $filter = $context->%s(%s); + if (!(%s)) { + throw new Mustache_Exception_UnknownFilterException(%s); + } + $value = call_user_func($filter, $value);%s + '; + + /** + * Generate Mustache Template variable filtering PHP source. + * + * @param string[] $filters Array of filters + * @param int $level + * + * @return string Generated filter PHP source + */ + private function getFilters(array $filters, $level) + { + if (empty($filters)) { + return ''; + } + + $name = array_shift($filters); + $method = $this->getFindMethod($name); + $filter = ($method !== 'last') ? var_export($name, true) : ''; + $callable = $this->getCallable('$filter'); + $msg = var_export($name, true); + + return sprintf($this->prepare(self::FILTER, $level), $method, $filter, $callable, $msg, $this->getFilters($filters, $level)); + } + + const LINE = '$buffer .= "\n";'; + const TEXT = '$buffer .= %s%s;'; + + /** + * Generate Mustache Template output Buffer call PHP source. + * + * @param string $text + * @param int $level + * + * @return string Generated output Buffer call PHP source + */ + private function text($text, $level) + { + $indentNextLine = (substr($text, -1) === "\n"); + $code = sprintf($this->prepare(self::TEXT, $level), $this->flushIndent(), var_export($text, true)); + $this->indentNextLine = $indentNextLine; + + return $code; + } + + /** + * Prepare PHP source code snippet for output. + * + * @param string $text + * @param int $bonus Additional indent level (default: 0) + * @param bool $prependNewline Prepend a newline to the snippet? (default: true) + * @param bool $appendNewline Append a newline to the snippet? (default: false) + * + * @return string PHP source code snippet + */ + private function prepare($text, $bonus = 0, $prependNewline = true, $appendNewline = false) + { + $text = ($prependNewline ? "\n" : '') . trim($text); + if ($prependNewline) { + $bonus++; + } + if ($appendNewline) { + $text .= "\n"; + } + + return preg_replace("/\n( {8})?/", "\n" . str_repeat(' ', $bonus * 4), $text); + } + + const DEFAULT_ESCAPE = 'htmlspecialchars(%s, %s, %s)'; + const CUSTOM_ESCAPE = 'call_user_func($this->mustache->getEscape(), %s)'; + + /** + * Get the current escaper. + * + * @param string $value (default: '$value') + * + * @return string Either a custom callback, or an inline call to `htmlspecialchars` + */ + private function getEscape($value = '$value') + { + if ($this->customEscape) { + return sprintf(self::CUSTOM_ESCAPE, $value); + } + + return sprintf(self::DEFAULT_ESCAPE, $value, var_export($this->entityFlags, true), var_export($this->charset, true)); + } + + /** + * Select the appropriate Context `find` method for a given $id. + * + * The return value will be one of `find`, `findDot`, `findAnchoredDot` or `last`. + * + * @see Mustache_Context::find + * @see Mustache_Context::findDot + * @see Mustache_Context::last + * + * @param string $id Variable name + * + * @return string `find` method name + */ + private function getFindMethod($id) + { + if ($id === '.') { + return 'last'; + } + + if (isset($this->pragmas[Mustache_Engine::PRAGMA_ANCHORED_DOT]) && $this->pragmas[Mustache_Engine::PRAGMA_ANCHORED_DOT]) { + if (substr($id, 0, 1) === '.') { + return 'findAnchoredDot'; + } + } + + if (strpos($id, '.') === false) { + return 'find'; + } + + return 'findDot'; + } + + const IS_CALLABLE = '!is_string(%s) && is_callable(%s)'; + const STRICT_IS_CALLABLE = 'is_object(%s) && is_callable(%s)'; + + /** + * Helper function to compile strict vs lax "is callable" logic. + * + * @param string $variable (default: '$value') + * + * @return string "is callable" logic + */ + private function getCallable($variable = '$value') + { + $tpl = $this->strictCallables ? self::STRICT_IS_CALLABLE : self::IS_CALLABLE; + + return sprintf($tpl, $variable, $variable); + } + + const LINE_INDENT = '$indent . '; + + /** + * Get the current $indent prefix to write to the buffer. + * + * @return string "$indent . " or "" + */ + private function flushIndent() + { + if (!$this->indentNextLine) { + return ''; + } + + $this->indentNextLine = false; + + return self::LINE_INDENT; + } +} diff --git a/admin/lib/vendor/mustache/mustache/src/Mustache/Context.php b/admin/lib/vendor/mustache/mustache/src/Mustache/Context.php new file mode 100644 index 0000000..69c02e0 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/src/Mustache/Context.php @@ -0,0 +1,242 @@ +stack = array($context); + } + } + + /** + * Push a new Context frame onto the stack. + * + * @param mixed $value Object or array to use for context + */ + public function push($value) + { + array_push($this->stack, $value); + } + + /** + * Push a new Context frame onto the block context stack. + * + * @param mixed $value Object or array to use for block context + */ + public function pushBlockContext($value) + { + array_push($this->blockStack, $value); + } + + /** + * Pop the last Context frame from the stack. + * + * @return mixed Last Context frame (object or array) + */ + public function pop() + { + return array_pop($this->stack); + } + + /** + * Pop the last block Context frame from the stack. + * + * @return mixed Last block Context frame (object or array) + */ + public function popBlockContext() + { + return array_pop($this->blockStack); + } + + /** + * Get the last Context frame. + * + * @return mixed Last Context frame (object or array) + */ + public function last() + { + return end($this->stack); + } + + /** + * Find a variable in the Context stack. + * + * Starting with the last Context frame (the context of the innermost section), and working back to the top-level + * rendering context, look for a variable with the given name: + * + * * If the Context frame is an associative array which contains the key $id, returns the value of that element. + * * If the Context frame is an object, this will check first for a public method, then a public property named + * $id. Failing both of these, it will try `__isset` and `__get` magic methods. + * * If a value named $id is not found in any Context frame, returns an empty string. + * + * @param string $id Variable name + * + * @return mixed Variable value, or '' if not found + */ + public function find($id) + { + return $this->findVariableInStack($id, $this->stack); + } + + /** + * Find a 'dot notation' variable in the Context stack. + * + * Note that dot notation traversal bubbles through scope differently than the regular find method. After finding + * the initial chunk of the dotted name, each subsequent chunk is searched for only within the value of the previous + * result. For example, given the following context stack: + * + * $data = array( + * 'name' => 'Fred', + * 'child' => array( + * 'name' => 'Bob' + * ), + * ); + * + * ... and the Mustache following template: + * + * {{ child.name }} + * + * ... the `name` value is only searched for within the `child` value of the global Context, not within parent + * Context frames. + * + * @param string $id Dotted variable selector + * + * @return mixed Variable value, or '' if not found + */ + public function findDot($id) + { + $chunks = explode('.', $id); + $first = array_shift($chunks); + $value = $this->findVariableInStack($first, $this->stack); + + foreach ($chunks as $chunk) { + if ($value === '') { + return $value; + } + + $value = $this->findVariableInStack($chunk, array($value)); + } + + return $value; + } + + /** + * Find an 'anchored dot notation' variable in the Context stack. + * + * This is the same as findDot(), except it looks in the top of the context + * stack for the first value, rather than searching the whole context stack + * and starting from there. + * + * @see Mustache_Context::findDot + * + * @throws Mustache_Exception_InvalidArgumentException if given an invalid anchored dot $id + * + * @param string $id Dotted variable selector + * + * @return mixed Variable value, or '' if not found + */ + public function findAnchoredDot($id) + { + $chunks = explode('.', $id); + $first = array_shift($chunks); + if ($first !== '') { + throw new Mustache_Exception_InvalidArgumentException(sprintf('Unexpected id for findAnchoredDot: %s', $id)); + } + + $value = $this->last(); + + foreach ($chunks as $chunk) { + if ($value === '') { + return $value; + } + + $value = $this->findVariableInStack($chunk, array($value)); + } + + return $value; + } + + /** + * Find an argument in the block context stack. + * + * @param string $id + * + * @return mixed Variable value, or '' if not found + */ + public function findInBlock($id) + { + foreach ($this->blockStack as $context) { + if (array_key_exists($id, $context)) { + return $context[$id]; + } + } + + return ''; + } + + /** + * Helper function to find a variable in the Context stack. + * + * @see Mustache_Context::find + * + * @param string $id Variable name + * @param array $stack Context stack + * + * @return mixed Variable value, or '' if not found + */ + private function findVariableInStack($id, array $stack) + { + for ($i = count($stack) - 1; $i >= 0; $i--) { + $frame = &$stack[$i]; + + switch (gettype($frame)) { + case 'object': + if (!($frame instanceof Closure)) { + // Note that is_callable() *will not work here* + // See https://github.com/bobthecow/mustache.php/wiki/Magic-Methods + if (method_exists($frame, $id)) { + return $frame->$id(); + } + + if (isset($frame->$id)) { + return $frame->$id; + } + + if ($frame instanceof ArrayAccess && isset($frame[$id])) { + return $frame[$id]; + } + } + break; + + case 'array': + if (array_key_exists($id, $frame)) { + return $frame[$id]; + } + break; + } + } + + return ''; + } +} diff --git a/admin/lib/vendor/mustache/mustache/src/Mustache/Engine.php b/admin/lib/vendor/mustache/mustache/src/Mustache/Engine.php new file mode 100644 index 0000000..fe99799 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/src/Mustache/Engine.php @@ -0,0 +1,829 @@ + true, + self::PRAGMA_BLOCKS => true, + self::PRAGMA_ANCHORED_DOT => true, + ); + + // Template cache + private $templates = array(); + + // Environment + private $templateClassPrefix = '__Mustache_'; + private $cache; + private $lambdaCache; + private $cacheLambdaTemplates = false; + private $loader; + private $partialsLoader; + private $helpers; + private $escape; + private $entityFlags = ENT_COMPAT; + private $charset = 'UTF-8'; + private $logger; + private $strictCallables = false; + private $pragmas = array(); + private $delimiters; + + // Services + private $tokenizer; + private $parser; + private $compiler; + + /** + * Mustache class constructor. + * + * Passing an $options array allows overriding certain Mustache options during instantiation: + * + * $options = array( + * // The class prefix for compiled templates. Defaults to '__Mustache_'. + * 'template_class_prefix' => '__MyTemplates_', + * + * // A Mustache cache instance or a cache directory string for compiled templates. + * // Mustache will not cache templates unless this is set. + * 'cache' => dirname(__FILE__).'/tmp/cache/mustache', + * + * // Override default permissions for cache files. Defaults to using the system-defined umask. It is + * // *strongly* recommended that you configure your umask properly rather than overriding permissions here. + * 'cache_file_mode' => 0666, + * + * // Optionally, enable caching for lambda section templates. This is generally not recommended, as lambda + * // sections are often too dynamic to benefit from caching. + * 'cache_lambda_templates' => true, + * + * // Customize the tag delimiters used by this engine instance. Note that overriding here changes the + * // delimiters used to parse all templates and partials loaded by this instance. To override just for a + * // single template, use an inline "change delimiters" tag at the start of the template file: + * // + * // {{=<% %>=}} + * // + * 'delimiters' => '<% %>', + * + * // A Mustache template loader instance. Uses a StringLoader if not specified. + * 'loader' => new Mustache_Loader_FilesystemLoader(dirname(__FILE__).'/views'), + * + * // A Mustache loader instance for partials. + * 'partials_loader' => new Mustache_Loader_FilesystemLoader(dirname(__FILE__).'/views/partials'), + * + * // An array of Mustache partials. Useful for quick-and-dirty string template loading, but not as + * // efficient or lazy as a Filesystem (or database) loader. + * 'partials' => array('foo' => file_get_contents(dirname(__FILE__).'/views/partials/foo.mustache')), + * + * // An array of 'helpers'. Helpers can be global variables or objects, closures (e.g. for higher order + * // sections), or any other valid Mustache context value. They will be prepended to the context stack, + * // so they will be available in any template loaded by this Mustache instance. + * 'helpers' => array('i18n' => function ($text) { + * // do something translatey here... + * }), + * + * // An 'escape' callback, responsible for escaping double-mustache variables. + * 'escape' => function ($value) { + * return htmlspecialchars($buffer, ENT_COMPAT, 'UTF-8'); + * }, + * + * // Type argument for `htmlspecialchars`. Defaults to ENT_COMPAT. You may prefer ENT_QUOTES. + * 'entity_flags' => ENT_QUOTES, + * + * // Character set for `htmlspecialchars`. Defaults to 'UTF-8'. Use 'UTF-8'. + * 'charset' => 'ISO-8859-1', + * + * // A Mustache Logger instance. No logging will occur unless this is set. Using a PSR-3 compatible + * // logging library -- such as Monolog -- is highly recommended. A simple stream logger implementation is + * // available as well: + * 'logger' => new Mustache_Logger_StreamLogger('php://stderr'), + * + * // Only treat Closure instances and invokable classes as callable. If true, values like + * // `array('ClassName', 'methodName')` and `array($classInstance, 'methodName')`, which are traditionally + * // "callable" in PHP, are not called to resolve variables for interpolation or section contexts. This + * // helps protect against arbitrary code execution when user input is passed directly into the template. + * // This currently defaults to false, but will default to true in v3.0. + * 'strict_callables' => true, + * + * // Enable pragmas across all templates, regardless of the presence of pragma tags in the individual + * // templates. + * 'pragmas' => [Mustache_Engine::PRAGMA_FILTERS], + * ); + * + * @throws Mustache_Exception_InvalidArgumentException If `escape` option is not callable + * + * @param array $options (default: array()) + */ + public function __construct(array $options = array()) + { + if (isset($options['template_class_prefix'])) { + if ((string) $options['template_class_prefix'] === '') { + throw new Mustache_Exception_InvalidArgumentException('Mustache Constructor "template_class_prefix" must not be empty'); + } + + $this->templateClassPrefix = $options['template_class_prefix']; + } + + if (isset($options['cache'])) { + $cache = $options['cache']; + + if (is_string($cache)) { + $mode = isset($options['cache_file_mode']) ? $options['cache_file_mode'] : null; + $cache = new Mustache_Cache_FilesystemCache($cache, $mode); + } + + $this->setCache($cache); + } + + if (isset($options['cache_lambda_templates'])) { + $this->cacheLambdaTemplates = (bool) $options['cache_lambda_templates']; + } + + if (isset($options['loader'])) { + $this->setLoader($options['loader']); + } + + if (isset($options['partials_loader'])) { + $this->setPartialsLoader($options['partials_loader']); + } + + if (isset($options['partials'])) { + $this->setPartials($options['partials']); + } + + if (isset($options['helpers'])) { + $this->setHelpers($options['helpers']); + } + + if (isset($options['escape'])) { + if (!is_callable($options['escape'])) { + throw new Mustache_Exception_InvalidArgumentException('Mustache Constructor "escape" option must be callable'); + } + + $this->escape = $options['escape']; + } + + if (isset($options['entity_flags'])) { + $this->entityFlags = $options['entity_flags']; + } + + if (isset($options['charset'])) { + $this->charset = $options['charset']; + } + + if (isset($options['logger'])) { + $this->setLogger($options['logger']); + } + + if (isset($options['strict_callables'])) { + $this->strictCallables = $options['strict_callables']; + } + + if (isset($options['delimiters'])) { + $this->delimiters = $options['delimiters']; + } + + if (isset($options['pragmas'])) { + foreach ($options['pragmas'] as $pragma) { + if (!isset(self::$knownPragmas[$pragma])) { + throw new Mustache_Exception_InvalidArgumentException(sprintf('Unknown pragma: "%s".', $pragma)); + } + $this->pragmas[$pragma] = true; + } + } + } + + /** + * Shortcut 'render' invocation. + * + * Equivalent to calling `$mustache->loadTemplate($template)->render($context);` + * + * @see Mustache_Engine::loadTemplate + * @see Mustache_Template::render + * + * @param string $template + * @param mixed $context (default: array()) + * + * @return string Rendered template + */ + public function render($template, $context = array()) + { + return $this->loadTemplate($template)->render($context); + } + + /** + * Get the current Mustache escape callback. + * + * @return callable|null + */ + public function getEscape() + { + return $this->escape; + } + + /** + * Get the current Mustache entitity type to escape. + * + * @return int + */ + public function getEntityFlags() + { + return $this->entityFlags; + } + + /** + * Get the current Mustache character set. + * + * @return string + */ + public function getCharset() + { + return $this->charset; + } + + /** + * Get the current globally enabled pragmas. + * + * @return array + */ + public function getPragmas() + { + return array_keys($this->pragmas); + } + + /** + * Set the Mustache template Loader instance. + * + * @param Mustache_Loader $loader + */ + public function setLoader(Mustache_Loader $loader) + { + $this->loader = $loader; + } + + /** + * Get the current Mustache template Loader instance. + * + * If no Loader instance has been explicitly specified, this method will instantiate and return + * a StringLoader instance. + * + * @return Mustache_Loader + */ + public function getLoader() + { + if (!isset($this->loader)) { + $this->loader = new Mustache_Loader_StringLoader(); + } + + return $this->loader; + } + + /** + * Set the Mustache partials Loader instance. + * + * @param Mustache_Loader $partialsLoader + */ + public function setPartialsLoader(Mustache_Loader $partialsLoader) + { + $this->partialsLoader = $partialsLoader; + } + + /** + * Get the current Mustache partials Loader instance. + * + * If no Loader instance has been explicitly specified, this method will instantiate and return + * an ArrayLoader instance. + * + * @return Mustache_Loader + */ + public function getPartialsLoader() + { + if (!isset($this->partialsLoader)) { + $this->partialsLoader = new Mustache_Loader_ArrayLoader(); + } + + return $this->partialsLoader; + } + + /** + * Set partials for the current partials Loader instance. + * + * @throws Mustache_Exception_RuntimeException If the current Loader instance is immutable + * + * @param array $partials (default: array()) + */ + public function setPartials(array $partials = array()) + { + if (!isset($this->partialsLoader)) { + $this->partialsLoader = new Mustache_Loader_ArrayLoader(); + } + + if (!$this->partialsLoader instanceof Mustache_Loader_MutableLoader) { + throw new Mustache_Exception_RuntimeException('Unable to set partials on an immutable Mustache Loader instance'); + } + + $this->partialsLoader->setTemplates($partials); + } + + /** + * Set an array of Mustache helpers. + * + * An array of 'helpers'. Helpers can be global variables or objects, closures (e.g. for higher order sections), or + * any other valid Mustache context value. They will be prepended to the context stack, so they will be available in + * any template loaded by this Mustache instance. + * + * @throws Mustache_Exception_InvalidArgumentException if $helpers is not an array or Traversable + * + * @param array|Traversable $helpers + */ + public function setHelpers($helpers) + { + if (!is_array($helpers) && !$helpers instanceof Traversable) { + throw new Mustache_Exception_InvalidArgumentException('setHelpers expects an array of helpers'); + } + + $this->getHelpers()->clear(); + + foreach ($helpers as $name => $helper) { + $this->addHelper($name, $helper); + } + } + + /** + * Get the current set of Mustache helpers. + * + * @see Mustache_Engine::setHelpers + * + * @return Mustache_HelperCollection + */ + public function getHelpers() + { + if (!isset($this->helpers)) { + $this->helpers = new Mustache_HelperCollection(); + } + + return $this->helpers; + } + + /** + * Add a new Mustache helper. + * + * @see Mustache_Engine::setHelpers + * + * @param string $name + * @param mixed $helper + */ + public function addHelper($name, $helper) + { + $this->getHelpers()->add($name, $helper); + } + + /** + * Get a Mustache helper by name. + * + * @see Mustache_Engine::setHelpers + * + * @param string $name + * + * @return mixed Helper + */ + public function getHelper($name) + { + return $this->getHelpers()->get($name); + } + + /** + * Check whether this Mustache instance has a helper. + * + * @see Mustache_Engine::setHelpers + * + * @param string $name + * + * @return bool True if the helper is present + */ + public function hasHelper($name) + { + return $this->getHelpers()->has($name); + } + + /** + * Remove a helper by name. + * + * @see Mustache_Engine::setHelpers + * + * @param string $name + */ + public function removeHelper($name) + { + $this->getHelpers()->remove($name); + } + + /** + * Set the Mustache Logger instance. + * + * @throws Mustache_Exception_InvalidArgumentException If logger is not an instance of Mustache_Logger or Psr\Log\LoggerInterface + * + * @param Mustache_Logger|Psr\Log\LoggerInterface $logger + */ + public function setLogger($logger = null) + { + if ($logger !== null && !($logger instanceof Mustache_Logger || is_a($logger, 'Psr\\Log\\LoggerInterface'))) { + throw new Mustache_Exception_InvalidArgumentException('Expected an instance of Mustache_Logger or Psr\\Log\\LoggerInterface.'); + } + + if ($this->getCache()->getLogger() === null) { + $this->getCache()->setLogger($logger); + } + + $this->logger = $logger; + } + + /** + * Get the current Mustache Logger instance. + * + * @return Mustache_Logger|Psr\Log\LoggerInterface + */ + public function getLogger() + { + return $this->logger; + } + + /** + * Set the Mustache Tokenizer instance. + * + * @param Mustache_Tokenizer $tokenizer + */ + public function setTokenizer(Mustache_Tokenizer $tokenizer) + { + $this->tokenizer = $tokenizer; + } + + /** + * Get the current Mustache Tokenizer instance. + * + * If no Tokenizer instance has been explicitly specified, this method will instantiate and return a new one. + * + * @return Mustache_Tokenizer + */ + public function getTokenizer() + { + if (!isset($this->tokenizer)) { + $this->tokenizer = new Mustache_Tokenizer(); + } + + return $this->tokenizer; + } + + /** + * Set the Mustache Parser instance. + * + * @param Mustache_Parser $parser + */ + public function setParser(Mustache_Parser $parser) + { + $this->parser = $parser; + } + + /** + * Get the current Mustache Parser instance. + * + * If no Parser instance has been explicitly specified, this method will instantiate and return a new one. + * + * @return Mustache_Parser + */ + public function getParser() + { + if (!isset($this->parser)) { + $this->parser = new Mustache_Parser(); + } + + return $this->parser; + } + + /** + * Set the Mustache Compiler instance. + * + * @param Mustache_Compiler $compiler + */ + public function setCompiler(Mustache_Compiler $compiler) + { + $this->compiler = $compiler; + } + + /** + * Get the current Mustache Compiler instance. + * + * If no Compiler instance has been explicitly specified, this method will instantiate and return a new one. + * + * @return Mustache_Compiler + */ + public function getCompiler() + { + if (!isset($this->compiler)) { + $this->compiler = new Mustache_Compiler(); + } + + return $this->compiler; + } + + /** + * Set the Mustache Cache instance. + * + * @param Mustache_Cache $cache + */ + public function setCache(Mustache_Cache $cache) + { + if (isset($this->logger) && $cache->getLogger() === null) { + $cache->setLogger($this->getLogger()); + } + + $this->cache = $cache; + } + + /** + * Get the current Mustache Cache instance. + * + * If no Cache instance has been explicitly specified, this method will instantiate and return a new one. + * + * @return Mustache_Cache + */ + public function getCache() + { + if (!isset($this->cache)) { + $this->setCache(new Mustache_Cache_NoopCache()); + } + + return $this->cache; + } + + /** + * Get the current Lambda Cache instance. + * + * If 'cache_lambda_templates' is enabled, this is the default cache instance. Otherwise, it is a NoopCache. + * + * @see Mustache_Engine::getCache + * + * @return Mustache_Cache + */ + protected function getLambdaCache() + { + if ($this->cacheLambdaTemplates) { + return $this->getCache(); + } + + if (!isset($this->lambdaCache)) { + $this->lambdaCache = new Mustache_Cache_NoopCache(); + } + + return $this->lambdaCache; + } + + /** + * Helper method to generate a Mustache template class. + * + * This method must be updated any time options are added which make it so + * the same template could be parsed and compiled multiple different ways. + * + * @param string|Mustache_Source $source + * + * @return string Mustache Template class name + */ + public function getTemplateClassName($source) + { + // For the most part, adding a new option here should do the trick. + // + // Pick a value here which is unique for each possible way the template + // could be compiled... but not necessarily unique per option value. See + // escape below, which only needs to differentiate between 'custom' and + // 'default' escapes. + // + // Keep this list in alphabetical order :) + $chunks = array( + 'charset' => $this->charset, + 'delimiters' => $this->delimiters ? $this->delimiters : '{{ }}', + 'entityFlags' => $this->entityFlags, + 'escape' => isset($this->escape) ? 'custom' : 'default', + 'key' => ($source instanceof Mustache_Source) ? $source->getKey() : 'source', + 'pragmas' => $this->getPragmas(), + 'strictCallables' => $this->strictCallables, + 'version' => self::VERSION, + ); + + $key = json_encode($chunks); + + // Template Source instances have already provided their own source key. For strings, just include the whole + // source string in the md5 hash. + if (!$source instanceof Mustache_Source) { + $key .= "\n" . $source; + } + + return $this->templateClassPrefix . md5($key); + } + + /** + * Load a Mustache Template by name. + * + * @param string $name + * + * @return Mustache_Template + */ + public function loadTemplate($name) + { + return $this->loadSource($this->getLoader()->load($name)); + } + + /** + * Load a Mustache partial Template by name. + * + * This is a helper method used internally by Template instances for loading partial templates. You can most likely + * ignore it completely. + * + * @param string $name + * + * @return Mustache_Template + */ + public function loadPartial($name) + { + try { + if (isset($this->partialsLoader)) { + $loader = $this->partialsLoader; + } elseif (isset($this->loader) && !$this->loader instanceof Mustache_Loader_StringLoader) { + $loader = $this->loader; + } else { + throw new Mustache_Exception_UnknownTemplateException($name); + } + + return $this->loadSource($loader->load($name)); + } catch (Mustache_Exception_UnknownTemplateException $e) { + // If the named partial cannot be found, log then return null. + $this->log( + Mustache_Logger::WARNING, + 'Partial not found: "{name}"', + array('name' => $e->getTemplateName()) + ); + } + } + + /** + * Load a Mustache lambda Template by source. + * + * This is a helper method used by Template instances to generate subtemplates for Lambda sections. You can most + * likely ignore it completely. + * + * @param string $source + * @param string $delims (default: null) + * + * @return Mustache_Template + */ + public function loadLambda($source, $delims = null) + { + if ($delims !== null) { + $source = $delims . "\n" . $source; + } + + return $this->loadSource($source, $this->getLambdaCache()); + } + + /** + * Instantiate and return a Mustache Template instance by source. + * + * Optionally provide a Mustache_Cache instance. This is used internally by Mustache_Engine::loadLambda to respect + * the 'cache_lambda_templates' configuration option. + * + * @see Mustache_Engine::loadTemplate + * @see Mustache_Engine::loadPartial + * @see Mustache_Engine::loadLambda + * + * @param string|Mustache_Source $source + * @param Mustache_Cache $cache (default: null) + * + * @return Mustache_Template + */ + private function loadSource($source, Mustache_Cache $cache = null) + { + $className = $this->getTemplateClassName($source); + + if (!isset($this->templates[$className])) { + if ($cache === null) { + $cache = $this->getCache(); + } + + if (!class_exists($className, false)) { + if (!$cache->load($className)) { + $compiled = $this->compile($source); + $cache->cache($className, $compiled); + } + } + + $this->log( + Mustache_Logger::DEBUG, + 'Instantiating template: "{className}"', + array('className' => $className) + ); + + $this->templates[$className] = new $className($this); + } + + return $this->templates[$className]; + } + + /** + * Helper method to tokenize a Mustache template. + * + * @see Mustache_Tokenizer::scan + * + * @param string $source + * + * @return array Tokens + */ + private function tokenize($source) + { + return $this->getTokenizer()->scan($source, $this->delimiters); + } + + /** + * Helper method to parse a Mustache template. + * + * @see Mustache_Parser::parse + * + * @param string $source + * + * @return array Token tree + */ + private function parse($source) + { + $parser = $this->getParser(); + $parser->setPragmas($this->getPragmas()); + + return $parser->parse($this->tokenize($source)); + } + + /** + * Helper method to compile a Mustache template. + * + * @see Mustache_Compiler::compile + * + * @param string|Mustache_Source $source + * + * @return string generated Mustache template class code + */ + private function compile($source) + { + $name = $this->getTemplateClassName($source); + + $this->log( + Mustache_Logger::INFO, + 'Compiling template to "{className}" class', + array('className' => $name) + ); + + if ($source instanceof Mustache_Source) { + $source = $source->getSource(); + } + $tree = $this->parse($source); + + $compiler = $this->getCompiler(); + $compiler->setPragmas($this->getPragmas()); + + return $compiler->compile($source, $tree, $name, isset($this->escape), $this->charset, $this->strictCallables, $this->entityFlags); + } + + /** + * Add a log record if logging is enabled. + * + * @param int $level The logging level + * @param string $message The log message + * @param array $context The log context + */ + private function log($level, $message, array $context = array()) + { + if (isset($this->logger)) { + $this->logger->log($level, $message, $context); + } + } +} diff --git a/admin/lib/vendor/mustache/mustache/src/Mustache/Exception.php b/admin/lib/vendor/mustache/mustache/src/Mustache/Exception.php new file mode 100644 index 0000000..d4001a9 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/src/Mustache/Exception.php @@ -0,0 +1,18 @@ +token = $token; + if (version_compare(PHP_VERSION, '5.3.0', '>=')) { + parent::__construct($msg, 0, $previous); + } else { + parent::__construct($msg); // @codeCoverageIgnore + } + } + + /** + * @return array + */ + public function getToken() + { + return $this->token; + } +} diff --git a/admin/lib/vendor/mustache/mustache/src/Mustache/Exception/UnknownFilterException.php b/admin/lib/vendor/mustache/mustache/src/Mustache/Exception/UnknownFilterException.php new file mode 100644 index 0000000..0651c17 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/src/Mustache/Exception/UnknownFilterException.php @@ -0,0 +1,38 @@ +filterName = $filterName; + $message = sprintf('Unknown filter: %s', $filterName); + if (version_compare(PHP_VERSION, '5.3.0', '>=')) { + parent::__construct($message, 0, $previous); + } else { + parent::__construct($message); // @codeCoverageIgnore + } + } + + public function getFilterName() + { + return $this->filterName; + } +} diff --git a/admin/lib/vendor/mustache/mustache/src/Mustache/Exception/UnknownHelperException.php b/admin/lib/vendor/mustache/mustache/src/Mustache/Exception/UnknownHelperException.php new file mode 100644 index 0000000..193be78 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/src/Mustache/Exception/UnknownHelperException.php @@ -0,0 +1,38 @@ +helperName = $helperName; + $message = sprintf('Unknown helper: %s', $helperName); + if (version_compare(PHP_VERSION, '5.3.0', '>=')) { + parent::__construct($message, 0, $previous); + } else { + parent::__construct($message); // @codeCoverageIgnore + } + } + + public function getHelperName() + { + return $this->helperName; + } +} diff --git a/admin/lib/vendor/mustache/mustache/src/Mustache/Exception/UnknownTemplateException.php b/admin/lib/vendor/mustache/mustache/src/Mustache/Exception/UnknownTemplateException.php new file mode 100644 index 0000000..32a778a --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/src/Mustache/Exception/UnknownTemplateException.php @@ -0,0 +1,38 @@ +templateName = $templateName; + $message = sprintf('Unknown template: %s', $templateName); + if (version_compare(PHP_VERSION, '5.3.0', '>=')) { + parent::__construct($message, 0, $previous); + } else { + parent::__construct($message); // @codeCoverageIgnore + } + } + + public function getTemplateName() + { + return $this->templateName; + } +} diff --git a/admin/lib/vendor/mustache/mustache/src/Mustache/HelperCollection.php b/admin/lib/vendor/mustache/mustache/src/Mustache/HelperCollection.php new file mode 100644 index 0000000..5d8f73c --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/src/Mustache/HelperCollection.php @@ -0,0 +1,172 @@ + $helper` pairs. + * + * @throws Mustache_Exception_InvalidArgumentException if the $helpers argument isn't an array or Traversable + * + * @param array|Traversable $helpers (default: null) + */ + public function __construct($helpers = null) + { + if ($helpers === null) { + return; + } + + if (!is_array($helpers) && !$helpers instanceof Traversable) { + throw new Mustache_Exception_InvalidArgumentException('HelperCollection constructor expects an array of helpers'); + } + + foreach ($helpers as $name => $helper) { + $this->add($name, $helper); + } + } + + /** + * Magic mutator. + * + * @see Mustache_HelperCollection::add + * + * @param string $name + * @param mixed $helper + */ + public function __set($name, $helper) + { + $this->add($name, $helper); + } + + /** + * Add a helper to this collection. + * + * @param string $name + * @param mixed $helper + */ + public function add($name, $helper) + { + $this->helpers[$name] = $helper; + } + + /** + * Magic accessor. + * + * @see Mustache_HelperCollection::get + * + * @param string $name + * + * @return mixed Helper + */ + public function __get($name) + { + return $this->get($name); + } + + /** + * Get a helper by name. + * + * @throws Mustache_Exception_UnknownHelperException If helper does not exist + * + * @param string $name + * + * @return mixed Helper + */ + public function get($name) + { + if (!$this->has($name)) { + throw new Mustache_Exception_UnknownHelperException($name); + } + + return $this->helpers[$name]; + } + + /** + * Magic isset(). + * + * @see Mustache_HelperCollection::has + * + * @param string $name + * + * @return bool True if helper is present + */ + public function __isset($name) + { + return $this->has($name); + } + + /** + * Check whether a given helper is present in the collection. + * + * @param string $name + * + * @return bool True if helper is present + */ + public function has($name) + { + return array_key_exists($name, $this->helpers); + } + + /** + * Magic unset(). + * + * @see Mustache_HelperCollection::remove + * + * @param string $name + */ + public function __unset($name) + { + $this->remove($name); + } + + /** + * Check whether a given helper is present in the collection. + * + * @throws Mustache_Exception_UnknownHelperException if the requested helper is not present + * + * @param string $name + */ + public function remove($name) + { + if (!$this->has($name)) { + throw new Mustache_Exception_UnknownHelperException($name); + } + + unset($this->helpers[$name]); + } + + /** + * Clear the helper collection. + * + * Removes all helpers from this collection + */ + public function clear() + { + $this->helpers = array(); + } + + /** + * Check whether the helper collection is empty. + * + * @return bool True if the collection is empty + */ + public function isEmpty() + { + return empty($this->helpers); + } +} diff --git a/admin/lib/vendor/mustache/mustache/src/Mustache/LambdaHelper.php b/admin/lib/vendor/mustache/mustache/src/Mustache/LambdaHelper.php new file mode 100644 index 0000000..e93dbfa --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/src/Mustache/LambdaHelper.php @@ -0,0 +1,76 @@ + =}}`. (default: null) + */ + public function __construct(Mustache_Engine $mustache, Mustache_Context $context, $delims = null) + { + $this->mustache = $mustache; + $this->context = $context; + $this->delims = $delims; + } + + /** + * Render a string as a Mustache template with the current rendering context. + * + * @param string $string + * + * @return string Rendered template + */ + public function render($string) + { + return $this->mustache + ->loadLambda((string) $string, $this->delims) + ->renderInternal($this->context); + } + + /** + * Render a string as a Mustache template with the current rendering context. + * + * @param string $string + * + * @return string Rendered template + */ + public function __invoke($string) + { + return $this->render($string); + } + + /** + * Get a Lambda Helper with custom delimiters. + * + * @param string $delims Custom delimiters, in the format `{{= <% %> =}}` + * + * @return Mustache_LambdaHelper + */ + public function withDelimiters($delims) + { + return new self($this->mustache, $this->context, $delims); + } +} diff --git a/admin/lib/vendor/mustache/mustache/src/Mustache/Loader.php b/admin/lib/vendor/mustache/mustache/src/Mustache/Loader.php new file mode 100644 index 0000000..23adba1 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/src/Mustache/Loader.php @@ -0,0 +1,27 @@ + '{{ bar }}', + * 'baz' => 'Hey {{ qux }}!' + * ); + * + * $tpl = $loader->load('foo'); // '{{ bar }}' + * + * The ArrayLoader is used internally as a partials loader by Mustache_Engine instance when an array of partials + * is set. It can also be used as a quick-and-dirty Template loader. + */ +class Mustache_Loader_ArrayLoader implements Mustache_Loader, Mustache_Loader_MutableLoader +{ + private $templates; + + /** + * ArrayLoader constructor. + * + * @param array $templates Associative array of Template source (default: array()) + */ + public function __construct(array $templates = array()) + { + $this->templates = $templates; + } + + /** + * Load a Template. + * + * @throws Mustache_Exception_UnknownTemplateException If a template file is not found + * + * @param string $name + * + * @return string Mustache Template source + */ + public function load($name) + { + if (!isset($this->templates[$name])) { + throw new Mustache_Exception_UnknownTemplateException($name); + } + + return $this->templates[$name]; + } + + /** + * Set an associative array of Template sources for this loader. + * + * @param array $templates + */ + public function setTemplates(array $templates) + { + $this->templates = $templates; + } + + /** + * Set a Template source by name. + * + * @param string $name + * @param string $template Mustache Template source + */ + public function setTemplate($name, $template) + { + $this->templates[$name] = $template; + } +} diff --git a/admin/lib/vendor/mustache/mustache/src/Mustache/Loader/CascadingLoader.php b/admin/lib/vendor/mustache/mustache/src/Mustache/Loader/CascadingLoader.php new file mode 100644 index 0000000..3fb6353 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/src/Mustache/Loader/CascadingLoader.php @@ -0,0 +1,69 @@ +loaders = array(); + foreach ($loaders as $loader) { + $this->addLoader($loader); + } + } + + /** + * Add a Loader instance. + * + * @param Mustache_Loader $loader + */ + public function addLoader(Mustache_Loader $loader) + { + $this->loaders[] = $loader; + } + + /** + * Load a Template by name. + * + * @throws Mustache_Exception_UnknownTemplateException If a template file is not found + * + * @param string $name + * + * @return string Mustache Template source + */ + public function load($name) + { + foreach ($this->loaders as $loader) { + try { + return $loader->load($name); + } catch (Mustache_Exception_UnknownTemplateException $e) { + // do nothing, check the next loader. + } + } + + throw new Mustache_Exception_UnknownTemplateException($name); + } +} diff --git a/admin/lib/vendor/mustache/mustache/src/Mustache/Loader/FilesystemLoader.php b/admin/lib/vendor/mustache/mustache/src/Mustache/Loader/FilesystemLoader.php new file mode 100644 index 0000000..e366df7 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/src/Mustache/Loader/FilesystemLoader.php @@ -0,0 +1,135 @@ +load('foo'); // equivalent to `file_get_contents(dirname(__FILE__).'/views/foo.mustache'); + * + * This is probably the most useful Mustache Loader implementation. It can be used for partials and normal Templates: + * + * $m = new Mustache(array( + * 'loader' => new Mustache_Loader_FilesystemLoader(dirname(__FILE__).'/views'), + * 'partials_loader' => new Mustache_Loader_FilesystemLoader(dirname(__FILE__).'/views/partials'), + * )); + */ +class Mustache_Loader_FilesystemLoader implements Mustache_Loader +{ + private $baseDir; + private $extension = '.mustache'; + private $templates = array(); + + /** + * Mustache filesystem Loader constructor. + * + * Passing an $options array allows overriding certain Loader options during instantiation: + * + * $options = array( + * // The filename extension used for Mustache templates. Defaults to '.mustache' + * 'extension' => '.ms', + * ); + * + * @throws Mustache_Exception_RuntimeException if $baseDir does not exist + * + * @param string $baseDir Base directory containing Mustache template files + * @param array $options Array of Loader options (default: array()) + */ + public function __construct($baseDir, array $options = array()) + { + $this->baseDir = $baseDir; + + if (strpos($this->baseDir, '://') === false) { + $this->baseDir = realpath($this->baseDir); + } + + if ($this->shouldCheckPath() && !is_dir($this->baseDir)) { + throw new Mustache_Exception_RuntimeException(sprintf('FilesystemLoader baseDir must be a directory: %s', $baseDir)); + } + + if (array_key_exists('extension', $options)) { + if (empty($options['extension'])) { + $this->extension = ''; + } else { + $this->extension = '.' . ltrim($options['extension'], '.'); + } + } + } + + /** + * Load a Template by name. + * + * $loader = new Mustache_Loader_FilesystemLoader(dirname(__FILE__).'/views'); + * $loader->load('admin/dashboard'); // loads "./views/admin/dashboard.mustache"; + * + * @param string $name + * + * @return string Mustache Template source + */ + public function load($name) + { + if (!isset($this->templates[$name])) { + $this->templates[$name] = $this->loadFile($name); + } + + return $this->templates[$name]; + } + + /** + * Helper function for loading a Mustache file by name. + * + * @throws Mustache_Exception_UnknownTemplateException If a template file is not found + * + * @param string $name + * + * @return string Mustache Template source + */ + protected function loadFile($name) + { + $fileName = $this->getFileName($name); + + if ($this->shouldCheckPath() && !file_exists($fileName)) { + throw new Mustache_Exception_UnknownTemplateException($name); + } + + return file_get_contents($fileName); + } + + /** + * Helper function for getting a Mustache template file name. + * + * @param string $name + * + * @return string Template file name + */ + protected function getFileName($name) + { + $fileName = $this->baseDir . '/' . $name; + if (substr($fileName, 0 - strlen($this->extension)) !== $this->extension) { + $fileName .= $this->extension; + } + + return $fileName; + } + + /** + * Only check if baseDir is a directory and requested templates are files if + * baseDir is using the filesystem stream wrapper. + * + * @return bool Whether to check `is_dir` and `file_exists` + */ + protected function shouldCheckPath() + { + return strpos($this->baseDir, '://') === false || strpos($this->baseDir, 'file://') === 0; + } +} diff --git a/admin/lib/vendor/mustache/mustache/src/Mustache/Loader/InlineLoader.php b/admin/lib/vendor/mustache/mustache/src/Mustache/Loader/InlineLoader.php new file mode 100644 index 0000000..ae297fe --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/src/Mustache/Loader/InlineLoader.php @@ -0,0 +1,123 @@ +load('hello'); + * $goodbye = $loader->load('goodbye'); + * + * __halt_compiler(); + * + * @@ hello + * Hello, {{ planet }}! + * + * @@ goodbye + * Goodbye, cruel {{ planet }} + * + * Templates are deliniated by lines containing only `@@ name`. + * + * The InlineLoader is well-suited to micro-frameworks such as Silex: + * + * $app->register(new MustacheServiceProvider, array( + * 'mustache.loader' => new Mustache_Loader_InlineLoader(__FILE__, __COMPILER_HALT_OFFSET__) + * )); + * + * $app->get('/{name}', function ($name) use ($app) { + * return $app['mustache']->render('hello', compact('name')); + * }) + * ->value('name', 'world'); + * + * // ... + * + * __halt_compiler(); + * + * @@ hello + * Hello, {{ name }}! + */ +class Mustache_Loader_InlineLoader implements Mustache_Loader +{ + protected $fileName; + protected $offset; + protected $templates; + + /** + * The InlineLoader requires a filename and offset to process templates. + * + * The magic constants `__FILE__` and `__COMPILER_HALT_OFFSET__` are usually + * perfectly suited to the job: + * + * $loader = new Mustache_Loader_InlineLoader(__FILE__, __COMPILER_HALT_OFFSET__); + * + * Note that this only works if the loader is instantiated inside the same + * file as the inline templates. If the templates are located in another + * file, it would be necessary to manually specify the filename and offset. + * + * @param string $fileName The file to parse for inline templates + * @param int $offset A string offset for the start of the templates. + * This usually coincides with the `__halt_compiler` + * call, and the `__COMPILER_HALT_OFFSET__` + */ + public function __construct($fileName, $offset) + { + if (!is_file($fileName)) { + throw new Mustache_Exception_InvalidArgumentException('InlineLoader expects a valid filename.'); + } + + if (!is_int($offset) || $offset < 0) { + throw new Mustache_Exception_InvalidArgumentException('InlineLoader expects a valid file offset.'); + } + + $this->fileName = $fileName; + $this->offset = $offset; + } + + /** + * Load a Template by name. + * + * @throws Mustache_Exception_UnknownTemplateException If a template file is not found + * + * @param string $name + * + * @return string Mustache Template source + */ + public function load($name) + { + $this->loadTemplates(); + + if (!array_key_exists($name, $this->templates)) { + throw new Mustache_Exception_UnknownTemplateException($name); + } + + return $this->templates[$name]; + } + + /** + * Parse and load templates from the end of a source file. + */ + protected function loadTemplates() + { + if ($this->templates === null) { + $this->templates = array(); + $data = file_get_contents($this->fileName, false, null, $this->offset); + foreach (preg_split("/^@@(?= [\w\d\.]+$)/m", $data, -1) as $chunk) { + if (trim($chunk)) { + list($name, $content) = explode("\n", $chunk, 2); + $this->templates[trim($name)] = trim($content); + } + } + } + } +} diff --git a/admin/lib/vendor/mustache/mustache/src/Mustache/Loader/MutableLoader.php b/admin/lib/vendor/mustache/mustache/src/Mustache/Loader/MutableLoader.php new file mode 100644 index 0000000..57fe5be --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/src/Mustache/Loader/MutableLoader.php @@ -0,0 +1,31 @@ + '.ms', + * 'stat_props' => array('size', 'mtime'), + * ); + * + * Specifying 'stat_props' overrides the stat properties used to invalidate the template cache. By default, this + * uses 'mtime' and 'size', but this can be set to any of the properties supported by stat(): + * + * http://php.net/manual/en/function.stat.php + * + * You can also disable filesystem stat entirely: + * + * $options = array('stat_props' => null); + * + * But with great power comes great responsibility. Namely, if you disable stat-based cache invalidation, + * YOU MUST CLEAR THE TEMPLATE CACHE YOURSELF when your templates change. Make it part of your build or deploy + * process so you don't forget! + * + * @throws Mustache_Exception_RuntimeException if $baseDir does not exist. + * + * @param string $baseDir Base directory containing Mustache template files. + * @param array $options Array of Loader options (default: array()) + */ + public function __construct($baseDir, array $options = array()) + { + parent::__construct($baseDir, $options); + + if (array_key_exists('stat_props', $options)) { + if (empty($options['stat_props'])) { + $this->statProps = array(); + } else { + $this->statProps = $options['stat_props']; + } + } else { + $this->statProps = array('size', 'mtime'); + } + } + + /** + * Helper function for loading a Mustache file by name. + * + * @throws Mustache_Exception_UnknownTemplateException If a template file is not found. + * + * @param string $name + * + * @return Mustache_Source Mustache Template source + */ + protected function loadFile($name) + { + $fileName = $this->getFileName($name); + + if (!file_exists($fileName)) { + throw new Mustache_Exception_UnknownTemplateException($name); + } + + return new Mustache_Source_FilesystemSource($fileName, $this->statProps); + } +} diff --git a/admin/lib/vendor/mustache/mustache/src/Mustache/Loader/StringLoader.php b/admin/lib/vendor/mustache/mustache/src/Mustache/Loader/StringLoader.php new file mode 100644 index 0000000..7012c03 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/src/Mustache/Loader/StringLoader.php @@ -0,0 +1,39 @@ +load('{{ foo }}'); // '{{ foo }}' + * + * This is the default Template Loader instance used by Mustache: + * + * $m = new Mustache; + * $tpl = $m->loadTemplate('{{ foo }}'); + * echo $tpl->render(array('foo' => 'bar')); // "bar" + */ +class Mustache_Loader_StringLoader implements Mustache_Loader +{ + /** + * Load a Template by source. + * + * @param string $name Mustache Template source + * + * @return string Mustache Template source + */ + public function load($name) + { + return $name; + } +} diff --git a/admin/lib/vendor/mustache/mustache/src/Mustache/Logger.php b/admin/lib/vendor/mustache/mustache/src/Mustache/Logger.php new file mode 100644 index 0000000..cb4037a --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/src/Mustache/Logger.php @@ -0,0 +1,126 @@ +log(Mustache_Logger::EMERGENCY, $message, $context); + } + + /** + * Action must be taken immediately. + * + * Example: Entire website down, database unavailable, etc. This should + * trigger the SMS alerts and wake you up. + * + * @param string $message + * @param array $context + */ + public function alert($message, array $context = array()) + { + $this->log(Mustache_Logger::ALERT, $message, $context); + } + + /** + * Critical conditions. + * + * Example: Application component unavailable, unexpected exception. + * + * @param string $message + * @param array $context + */ + public function critical($message, array $context = array()) + { + $this->log(Mustache_Logger::CRITICAL, $message, $context); + } + + /** + * Runtime errors that do not require immediate action but should typically + * be logged and monitored. + * + * @param string $message + * @param array $context + */ + public function error($message, array $context = array()) + { + $this->log(Mustache_Logger::ERROR, $message, $context); + } + + /** + * Exceptional occurrences that are not errors. + * + * Example: Use of deprecated APIs, poor use of an API, undesirable things + * that are not necessarily wrong. + * + * @param string $message + * @param array $context + */ + public function warning($message, array $context = array()) + { + $this->log(Mustache_Logger::WARNING, $message, $context); + } + + /** + * Normal but significant events. + * + * @param string $message + * @param array $context + */ + public function notice($message, array $context = array()) + { + $this->log(Mustache_Logger::NOTICE, $message, $context); + } + + /** + * Interesting events. + * + * Example: User logs in, SQL logs. + * + * @param string $message + * @param array $context + */ + public function info($message, array $context = array()) + { + $this->log(Mustache_Logger::INFO, $message, $context); + } + + /** + * Detailed debug information. + * + * @param string $message + * @param array $context + */ + public function debug($message, array $context = array()) + { + $this->log(Mustache_Logger::DEBUG, $message, $context); + } +} diff --git a/admin/lib/vendor/mustache/mustache/src/Mustache/Logger/StreamLogger.php b/admin/lib/vendor/mustache/mustache/src/Mustache/Logger/StreamLogger.php new file mode 100644 index 0000000..402a148 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/src/Mustache/Logger/StreamLogger.php @@ -0,0 +1,194 @@ + 100, + self::INFO => 200, + self::NOTICE => 250, + self::WARNING => 300, + self::ERROR => 400, + self::CRITICAL => 500, + self::ALERT => 550, + self::EMERGENCY => 600, + ); + + protected $level; + protected $stream = null; + protected $url = null; + + /** + * @throws InvalidArgumentException if the logging level is unknown + * + * @param resource|string $stream Resource instance or URL + * @param int $level The minimum logging level at which this handler will be triggered + */ + public function __construct($stream, $level = Mustache_Logger::ERROR) + { + $this->setLevel($level); + + if (is_resource($stream)) { + $this->stream = $stream; + } else { + $this->url = $stream; + } + } + + /** + * Close stream resources. + */ + public function __destruct() + { + if (is_resource($this->stream)) { + fclose($this->stream); + } + } + + /** + * Set the minimum logging level. + * + * @throws Mustache_Exception_InvalidArgumentException if the logging level is unknown + * + * @param int $level The minimum logging level which will be written + */ + public function setLevel($level) + { + if (!array_key_exists($level, self::$levels)) { + throw new Mustache_Exception_InvalidArgumentException(sprintf('Unexpected logging level: %s', $level)); + } + + $this->level = $level; + } + + /** + * Get the current minimum logging level. + * + * @return int + */ + public function getLevel() + { + return $this->level; + } + + /** + * Logs with an arbitrary level. + * + * @throws Mustache_Exception_InvalidArgumentException if the logging level is unknown + * + * @param mixed $level + * @param string $message + * @param array $context + */ + public function log($level, $message, array $context = array()) + { + if (!array_key_exists($level, self::$levels)) { + throw new Mustache_Exception_InvalidArgumentException(sprintf('Unexpected logging level: %s', $level)); + } + + if (self::$levels[$level] >= self::$levels[$this->level]) { + $this->writeLog($level, $message, $context); + } + } + + /** + * Write a record to the log. + * + * @throws Mustache_Exception_LogicException If neither a stream resource nor url is present + * @throws Mustache_Exception_RuntimeException If the stream url cannot be opened + * + * @param int $level The logging level + * @param string $message The log message + * @param array $context The log context + */ + protected function writeLog($level, $message, array $context = array()) + { + if (!is_resource($this->stream)) { + if (!isset($this->url)) { + throw new Mustache_Exception_LogicException('Missing stream url, the stream can not be opened. This may be caused by a premature call to close().'); + } + + $this->stream = fopen($this->url, 'a'); + if (!is_resource($this->stream)) { + // @codeCoverageIgnoreStart + throw new Mustache_Exception_RuntimeException(sprintf('The stream or file "%s" could not be opened.', $this->url)); + // @codeCoverageIgnoreEnd + } + } + + fwrite($this->stream, self::formatLine($level, $message, $context)); + } + + /** + * Gets the name of the logging level. + * + * @throws InvalidArgumentException if the logging level is unknown + * + * @param int $level + * + * @return string + */ + protected static function getLevelName($level) + { + return strtoupper($level); + } + + /** + * Format a log line for output. + * + * @param int $level The logging level + * @param string $message The log message + * @param array $context The log context + * + * @return string + */ + protected static function formatLine($level, $message, array $context = array()) + { + return sprintf( + "%s: %s\n", + self::getLevelName($level), + self::interpolateMessage($message, $context) + ); + } + + /** + * Interpolate context values into the message placeholders. + * + * @param string $message + * @param array $context + * + * @return string + */ + protected static function interpolateMessage($message, array $context = array()) + { + if (strpos($message, '{') === false) { + return $message; + } + + // build a replacement array with braces around the context keys + $replace = array(); + foreach ($context as $key => $val) { + $replace['{' . $key . '}'] = $val; + } + + // interpolate replacement values into the the message and return + return strtr($message, $replace); + } +} diff --git a/admin/lib/vendor/mustache/mustache/src/Mustache/Parser.php b/admin/lib/vendor/mustache/mustache/src/Mustache/Parser.php new file mode 100644 index 0000000..0ec4192 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/src/Mustache/Parser.php @@ -0,0 +1,317 @@ +lineNum = -1; + $this->lineTokens = 0; + $this->pragmas = $this->defaultPragmas; + + $this->pragmaFilters = isset($this->pragmas[Mustache_Engine::PRAGMA_FILTERS]); + $this->pragmaBlocks = isset($this->pragmas[Mustache_Engine::PRAGMA_BLOCKS]); + + return $this->buildTree($tokens); + } + + /** + * Enable pragmas across all templates, regardless of the presence of pragma + * tags in the individual templates. + * + * @internal Users should set global pragmas in Mustache_Engine, not here :) + * + * @param string[] $pragmas + */ + public function setPragmas(array $pragmas) + { + $this->pragmas = array(); + foreach ($pragmas as $pragma) { + $this->enablePragma($pragma); + } + $this->defaultPragmas = $this->pragmas; + } + + /** + * Helper method for recursively building a parse tree. + * + * @throws Mustache_Exception_SyntaxException when nesting errors or mismatched section tags are encountered + * + * @param array &$tokens Set of Mustache tokens + * @param array $parent Parent token (default: null) + * + * @return array Mustache Token parse tree + */ + private function buildTree(array &$tokens, array $parent = null) + { + $nodes = array(); + + while (!empty($tokens)) { + $token = array_shift($tokens); + + if ($token[Mustache_Tokenizer::LINE] === $this->lineNum) { + $this->lineTokens++; + } else { + $this->lineNum = $token[Mustache_Tokenizer::LINE]; + $this->lineTokens = 0; + } + + if ($this->pragmaFilters && isset($token[Mustache_Tokenizer::NAME])) { + list($name, $filters) = $this->getNameAndFilters($token[Mustache_Tokenizer::NAME]); + if (!empty($filters)) { + $token[Mustache_Tokenizer::NAME] = $name; + $token[Mustache_Tokenizer::FILTERS] = $filters; + } + } + + switch ($token[Mustache_Tokenizer::TYPE]) { + case Mustache_Tokenizer::T_DELIM_CHANGE: + $this->checkIfTokenIsAllowedInParent($parent, $token); + $this->clearStandaloneLines($nodes, $tokens); + break; + + case Mustache_Tokenizer::T_SECTION: + case Mustache_Tokenizer::T_INVERTED: + $this->checkIfTokenIsAllowedInParent($parent, $token); + $this->clearStandaloneLines($nodes, $tokens); + $nodes[] = $this->buildTree($tokens, $token); + break; + + case Mustache_Tokenizer::T_END_SECTION: + if (!isset($parent)) { + $msg = sprintf( + 'Unexpected closing tag: /%s on line %d', + $token[Mustache_Tokenizer::NAME], + $token[Mustache_Tokenizer::LINE] + ); + throw new Mustache_Exception_SyntaxException($msg, $token); + } + + if ($token[Mustache_Tokenizer::NAME] !== $parent[Mustache_Tokenizer::NAME]) { + $msg = sprintf( + 'Nesting error: %s (on line %d) vs. %s (on line %d)', + $parent[Mustache_Tokenizer::NAME], + $parent[Mustache_Tokenizer::LINE], + $token[Mustache_Tokenizer::NAME], + $token[Mustache_Tokenizer::LINE] + ); + throw new Mustache_Exception_SyntaxException($msg, $token); + } + + $this->clearStandaloneLines($nodes, $tokens); + $parent[Mustache_Tokenizer::END] = $token[Mustache_Tokenizer::INDEX]; + $parent[Mustache_Tokenizer::NODES] = $nodes; + + return $parent; + + case Mustache_Tokenizer::T_PARTIAL: + $this->checkIfTokenIsAllowedInParent($parent, $token); + //store the whitespace prefix for laters! + if ($indent = $this->clearStandaloneLines($nodes, $tokens)) { + $token[Mustache_Tokenizer::INDENT] = $indent[Mustache_Tokenizer::VALUE]; + } + $nodes[] = $token; + break; + + case Mustache_Tokenizer::T_PARENT: + $this->checkIfTokenIsAllowedInParent($parent, $token); + $nodes[] = $this->buildTree($tokens, $token); + break; + + case Mustache_Tokenizer::T_BLOCK_VAR: + if ($this->pragmaBlocks) { + // BLOCKS pragma is enabled, let's do this! + if (isset($parent) && $parent[Mustache_Tokenizer::TYPE] === Mustache_Tokenizer::T_PARENT) { + $token[Mustache_Tokenizer::TYPE] = Mustache_Tokenizer::T_BLOCK_ARG; + } + $this->clearStandaloneLines($nodes, $tokens); + $nodes[] = $this->buildTree($tokens, $token); + } else { + // pretend this was just a normal "escaped" token... + $token[Mustache_Tokenizer::TYPE] = Mustache_Tokenizer::T_ESCAPED; + // TODO: figure out how to figure out if there was a space after this dollar: + $token[Mustache_Tokenizer::NAME] = '$' . $token[Mustache_Tokenizer::NAME]; + $nodes[] = $token; + } + break; + + case Mustache_Tokenizer::T_PRAGMA: + $this->enablePragma($token[Mustache_Tokenizer::NAME]); + // no break + + case Mustache_Tokenizer::T_COMMENT: + $this->clearStandaloneLines($nodes, $tokens); + $nodes[] = $token; + break; + + default: + $nodes[] = $token; + break; + } + } + + if (isset($parent)) { + $msg = sprintf( + 'Missing closing tag: %s opened on line %d', + $parent[Mustache_Tokenizer::NAME], + $parent[Mustache_Tokenizer::LINE] + ); + throw new Mustache_Exception_SyntaxException($msg, $parent); + } + + return $nodes; + } + + /** + * Clear standalone line tokens. + * + * Returns a whitespace token for indenting partials, if applicable. + * + * @param array $nodes Parsed nodes + * @param array $tokens Tokens to be parsed + * + * @return array|null Resulting indent token, if any + */ + private function clearStandaloneLines(array &$nodes, array &$tokens) + { + if ($this->lineTokens > 1) { + // this is the third or later node on this line, so it can't be standalone + return; + } + + $prev = null; + if ($this->lineTokens === 1) { + // this is the second node on this line, so it can't be standalone + // unless the previous node is whitespace. + if ($prev = end($nodes)) { + if (!$this->tokenIsWhitespace($prev)) { + return; + } + } + } + + if ($next = reset($tokens)) { + // If we're on a new line, bail. + if ($next[Mustache_Tokenizer::LINE] !== $this->lineNum) { + return; + } + + // If the next token isn't whitespace, bail. + if (!$this->tokenIsWhitespace($next)) { + return; + } + + if (count($tokens) !== 1) { + // Unless it's the last token in the template, the next token + // must end in newline for this to be standalone. + if (substr($next[Mustache_Tokenizer::VALUE], -1) !== "\n") { + return; + } + } + + // Discard the whitespace suffix + array_shift($tokens); + } + + if ($prev) { + // Return the whitespace prefix, if any + return array_pop($nodes); + } + } + + /** + * Check whether token is a whitespace token. + * + * True if token type is T_TEXT and value is all whitespace characters. + * + * @param array $token + * + * @return bool True if token is a whitespace token + */ + private function tokenIsWhitespace(array $token) + { + if ($token[Mustache_Tokenizer::TYPE] === Mustache_Tokenizer::T_TEXT) { + return preg_match('/^\s*$/', $token[Mustache_Tokenizer::VALUE]); + } + + return false; + } + + /** + * Check whether a token is allowed inside a parent tag. + * + * @throws Mustache_Exception_SyntaxException if an invalid token is found inside a parent tag + * + * @param array|null $parent + * @param array $token + */ + private function checkIfTokenIsAllowedInParent($parent, array $token) + { + if (isset($parent) && $parent[Mustache_Tokenizer::TYPE] === Mustache_Tokenizer::T_PARENT) { + throw new Mustache_Exception_SyntaxException('Illegal content in < parent tag', $token); + } + } + + /** + * Split a tag name into name and filters. + * + * @param string $name + * + * @return array [Tag name, Array of filters] + */ + private function getNameAndFilters($name) + { + $filters = array_map('trim', explode('|', $name)); + $name = array_shift($filters); + + return array($name, $filters); + } + + /** + * Enable a pragma. + * + * @param string $name + */ + private function enablePragma($name) + { + $this->pragmas[$name] = true; + + switch ($name) { + case Mustache_Engine::PRAGMA_BLOCKS: + $this->pragmaBlocks = true; + break; + + case Mustache_Engine::PRAGMA_FILTERS: + $this->pragmaFilters = true; + break; + } + } +} diff --git a/admin/lib/vendor/mustache/mustache/src/Mustache/Source.php b/admin/lib/vendor/mustache/mustache/src/Mustache/Source.php new file mode 100644 index 0000000..278c2cb --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/src/Mustache/Source.php @@ -0,0 +1,40 @@ +fileName = $fileName; + $this->statProps = $statProps; + } + + /** + * Get the Source key (used to generate the compiled class name). + * + * @throws RuntimeException when a source file cannot be read + * + * @return string + */ + public function getKey() + { + $chunks = array( + 'fileName' => $this->fileName, + ); + + if (!empty($this->statProps)) { + if (!isset($this->stat)) { + $this->stat = @stat($this->fileName); + } + + if ($this->stat === false) { + throw new RuntimeException(sprintf('Failed to read source file "%s".', $this->fileName)); + } + + foreach ($this->statProps as $prop) { + $chunks[$prop] = $this->stat[$prop]; + } + } + + return json_encode($chunks); + } + + /** + * Get the template Source. + * + * @return string + */ + public function getSource() + { + return file_get_contents($this->fileName); + } +} diff --git a/admin/lib/vendor/mustache/mustache/src/Mustache/Template.php b/admin/lib/vendor/mustache/mustache/src/Mustache/Template.php new file mode 100644 index 0000000..4de8239 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/src/Mustache/Template.php @@ -0,0 +1,180 @@ +mustache = $mustache; + } + + /** + * Mustache Template instances can be treated as a function and rendered by simply calling them. + * + * $m = new Mustache_Engine; + * $tpl = $m->loadTemplate('Hello, {{ name }}!'); + * echo $tpl(array('name' => 'World')); // "Hello, World!" + * + * @see Mustache_Template::render + * + * @param mixed $context Array or object rendering context (default: array()) + * + * @return string Rendered template + */ + public function __invoke($context = array()) + { + return $this->render($context); + } + + /** + * Render this template given the rendering context. + * + * @param mixed $context Array or object rendering context (default: array()) + * + * @return string Rendered template + */ + public function render($context = array()) + { + return $this->renderInternal( + $this->prepareContextStack($context) + ); + } + + /** + * Internal rendering method implemented by Mustache Template concrete subclasses. + * + * This is where the magic happens :) + * + * NOTE: This method is not part of the Mustache.php public API. + * + * @param Mustache_Context $context + * @param string $indent (default: '') + * + * @return string Rendered template + */ + abstract public function renderInternal(Mustache_Context $context, $indent = ''); + + /** + * Tests whether a value should be iterated over (e.g. in a section context). + * + * In most languages there are two distinct array types: list and hash (or whatever you want to call them). Lists + * should be iterated, hashes should be treated as objects. Mustache follows this paradigm for Ruby, Javascript, + * Java, Python, etc. + * + * PHP, however, treats lists and hashes as one primitive type: array. So Mustache.php needs a way to distinguish + * between between a list of things (numeric, normalized array) and a set of variables to be used as section context + * (associative array). In other words, this will be iterated over: + * + * $items = array( + * array('name' => 'foo'), + * array('name' => 'bar'), + * array('name' => 'baz'), + * ); + * + * ... but this will be used as a section context block: + * + * $items = array( + * 1 => array('name' => 'foo'), + * 'banana' => array('name' => 'bar'), + * 42 => array('name' => 'baz'), + * ); + * + * @param mixed $value + * + * @return bool True if the value is 'iterable' + */ + protected function isIterable($value) + { + switch (gettype($value)) { + case 'object': + return $value instanceof Traversable; + + case 'array': + $i = 0; + foreach ($value as $k => $v) { + if ($k !== $i++) { + return false; + } + } + + return true; + + default: + return false; + } + } + + /** + * Helper method to prepare the Context stack. + * + * Adds the Mustache HelperCollection to the stack's top context frame if helpers are present. + * + * @param mixed $context Optional first context frame (default: null) + * + * @return Mustache_Context + */ + protected function prepareContextStack($context = null) + { + $stack = new Mustache_Context(); + + $helpers = $this->mustache->getHelpers(); + if (!$helpers->isEmpty()) { + $stack->push($helpers); + } + + if (!empty($context)) { + $stack->push($context); + } + + return $stack; + } + + /** + * Resolve a context value. + * + * Invoke the value if it is callable, otherwise return the value. + * + * @param mixed $value + * @param Mustache_Context $context + * + * @return string + */ + protected function resolveValue($value, Mustache_Context $context) + { + if (($this->strictCallables ? is_object($value) : !is_string($value)) && is_callable($value)) { + return $this->mustache + ->loadLambda((string) call_user_func($value)) + ->renderInternal($context); + } + + return $value; + } +} diff --git a/admin/lib/vendor/mustache/mustache/src/Mustache/Tokenizer.php b/admin/lib/vendor/mustache/mustache/src/Mustache/Tokenizer.php new file mode 100644 index 0000000..6dbe0cd --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/src/Mustache/Tokenizer.php @@ -0,0 +1,342 @@ +'; + const T_PARENT = '<'; + const T_DELIM_CHANGE = '='; + const T_ESCAPED = '_v'; + const T_UNESCAPED = '{'; + const T_UNESCAPED_2 = '&'; + const T_TEXT = '_t'; + const T_PRAGMA = '%'; + const T_BLOCK_VAR = '$'; + const T_BLOCK_ARG = '$arg'; + + // Valid token types + private static $tagTypes = array( + self::T_SECTION => true, + self::T_INVERTED => true, + self::T_END_SECTION => true, + self::T_COMMENT => true, + self::T_PARTIAL => true, + self::T_PARENT => true, + self::T_DELIM_CHANGE => true, + self::T_ESCAPED => true, + self::T_UNESCAPED => true, + self::T_UNESCAPED_2 => true, + self::T_PRAGMA => true, + self::T_BLOCK_VAR => true, + ); + + // Token properties + const TYPE = 'type'; + const NAME = 'name'; + const OTAG = 'otag'; + const CTAG = 'ctag'; + const LINE = 'line'; + const INDEX = 'index'; + const END = 'end'; + const INDENT = 'indent'; + const NODES = 'nodes'; + const VALUE = 'value'; + const FILTERS = 'filters'; + + private $state; + private $tagType; + private $buffer; + private $tokens; + private $seenTag; + private $line; + + private $otag; + private $otagChar; + private $otagLen; + + private $ctag; + private $ctagChar; + private $ctagLen; + + /** + * Scan and tokenize template source. + * + * @throws Mustache_Exception_SyntaxException when mismatched section tags are encountered + * @throws Mustache_Exception_InvalidArgumentException when $delimiters string is invalid + * + * @param string $text Mustache template source to tokenize + * @param string $delimiters Optionally, pass initial opening and closing delimiters (default: null) + * + * @return array Set of Mustache tokens + */ + public function scan($text, $delimiters = null) + { + // Setting mbstring.func_overload makes things *really* slow. + // Let's do everyone a favor and scan this string as ASCII instead. + // + // @codeCoverageIgnoreStart + $encoding = null; + if (function_exists('mb_internal_encoding') && ini_get('mbstring.func_overload') & 2) { + $encoding = mb_internal_encoding(); + mb_internal_encoding('ASCII'); + } + // @codeCoverageIgnoreEnd + + $this->reset(); + + if ($delimiters = trim($delimiters)) { + $this->setDelimiters($delimiters); + } + + $len = strlen($text); + for ($i = 0; $i < $len; $i++) { + switch ($this->state) { + case self::IN_TEXT: + $char = $text[$i]; + // Test whether it's time to change tags. + if ($char === $this->otagChar && substr($text, $i, $this->otagLen) === $this->otag) { + $i--; + $this->flushBuffer(); + $this->state = self::IN_TAG_TYPE; + } else { + $this->buffer .= $char; + if ($char === "\n") { + $this->flushBuffer(); + $this->line++; + } + } + break; + + case self::IN_TAG_TYPE: + $i += $this->otagLen - 1; + $char = $text[$i + 1]; + if (isset(self::$tagTypes[$char])) { + $tag = $char; + $this->tagType = $tag; + } else { + $tag = null; + $this->tagType = self::T_ESCAPED; + } + + if ($this->tagType === self::T_DELIM_CHANGE) { + $i = $this->changeDelimiters($text, $i); + $this->state = self::IN_TEXT; + } elseif ($this->tagType === self::T_PRAGMA) { + $i = $this->addPragma($text, $i); + $this->state = self::IN_TEXT; + } else { + if ($tag !== null) { + $i++; + } + $this->state = self::IN_TAG; + } + $this->seenTag = $i; + break; + + default: + $char = $text[$i]; + // Test whether it's time to change tags. + if ($char === $this->ctagChar && substr($text, $i, $this->ctagLen) === $this->ctag) { + $token = array( + self::TYPE => $this->tagType, + self::NAME => trim($this->buffer), + self::OTAG => $this->otag, + self::CTAG => $this->ctag, + self::LINE => $this->line, + self::INDEX => ($this->tagType === self::T_END_SECTION) ? $this->seenTag - $this->otagLen : $i + $this->ctagLen, + ); + + if ($this->tagType === self::T_UNESCAPED) { + // Clean up `{{{ tripleStache }}}` style tokens. + if ($this->ctag === '}}') { + if (($i + 2 < $len) && $text[$i + 2] === '}') { + $i++; + } else { + $msg = sprintf( + 'Mismatched tag delimiters: %s on line %d', + $token[self::NAME], + $token[self::LINE] + ); + + throw new Mustache_Exception_SyntaxException($msg, $token); + } + } else { + $lastName = $token[self::NAME]; + if (substr($lastName, -1) === '}') { + $token[self::NAME] = trim(substr($lastName, 0, -1)); + } else { + $msg = sprintf( + 'Mismatched tag delimiters: %s on line %d', + $token[self::NAME], + $token[self::LINE] + ); + + throw new Mustache_Exception_SyntaxException($msg, $token); + } + } + } + + $this->buffer = ''; + $i += $this->ctagLen - 1; + $this->state = self::IN_TEXT; + $this->tokens[] = $token; + } else { + $this->buffer .= $char; + } + break; + } + } + + $this->flushBuffer(); + + // Restore the user's encoding... + // @codeCoverageIgnoreStart + if ($encoding) { + mb_internal_encoding($encoding); + } + // @codeCoverageIgnoreEnd + + return $this->tokens; + } + + /** + * Helper function to reset tokenizer internal state. + */ + private function reset() + { + $this->state = self::IN_TEXT; + $this->tagType = null; + $this->buffer = ''; + $this->tokens = array(); + $this->seenTag = false; + $this->line = 0; + + $this->otag = '{{'; + $this->otagChar = '{'; + $this->otagLen = 2; + + $this->ctag = '}}'; + $this->ctagChar = '}'; + $this->ctagLen = 2; + } + + /** + * Flush the current buffer to a token. + */ + private function flushBuffer() + { + if (strlen($this->buffer) > 0) { + $this->tokens[] = array( + self::TYPE => self::T_TEXT, + self::LINE => $this->line, + self::VALUE => $this->buffer, + ); + $this->buffer = ''; + } + } + + /** + * Change the current Mustache delimiters. Set new `otag` and `ctag` values. + * + * @throws Mustache_Exception_SyntaxException when delimiter string is invalid + * + * @param string $text Mustache template source + * @param int $index Current tokenizer index + * + * @return int New index value + */ + private function changeDelimiters($text, $index) + { + $startIndex = strpos($text, '=', $index) + 1; + $close = '=' . $this->ctag; + $closeIndex = strpos($text, $close, $index); + + $token = array( + self::TYPE => self::T_DELIM_CHANGE, + self::LINE => $this->line, + ); + + try { + $this->setDelimiters(trim(substr($text, $startIndex, $closeIndex - $startIndex))); + } catch (Mustache_Exception_InvalidArgumentException $e) { + throw new Mustache_Exception_SyntaxException($e->getMessage(), $token); + } + + $this->tokens[] = $token; + + return $closeIndex + strlen($close) - 1; + } + + /** + * Set the current Mustache `otag` and `ctag` delimiters. + * + * @throws Mustache_Exception_InvalidArgumentException when delimiter string is invalid + * + * @param string $delimiters + */ + private function setDelimiters($delimiters) + { + if (!preg_match('/^\s*(\S+)\s+(\S+)\s*$/', $delimiters, $matches)) { + throw new Mustache_Exception_InvalidArgumentException(sprintf('Invalid delimiters: %s', $delimiters)); + } + + list($_, $otag, $ctag) = $matches; + + $this->otag = $otag; + $this->otagChar = $otag[0]; + $this->otagLen = strlen($otag); + + $this->ctag = $ctag; + $this->ctagChar = $ctag[0]; + $this->ctagLen = strlen($ctag); + } + + /** + * Add pragma token. + * + * Pragmas are hoisted to the front of the template, so all pragma tokens + * will appear at the front of the token list. + * + * @param string $text + * @param int $index + * + * @return int New index value + */ + private function addPragma($text, $index) + { + $end = strpos($text, $this->ctag, $index); + $pragma = trim(substr($text, $index + 2, $end - $index - 2)); + + // Pragmas are hoisted to the front of the template. + array_unshift($this->tokens, array( + self::TYPE => self::T_PRAGMA, + self::NAME => $pragma, + self::LINE => 0, + )); + + return $end + $this->ctagLen - 1; + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/Mustache/Test/AutoloaderTest.php b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/AutoloaderTest.php new file mode 100644 index 0000000..c72effe --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/AutoloaderTest.php @@ -0,0 +1,51 @@ +assertTrue(spl_autoload_unregister(array($loader, 'autoload'))); + } + + public function testAutoloader() + { + $loader = new Mustache_Autoloader(dirname(__FILE__) . '/../../fixtures/autoloader'); + + $this->assertNull($loader->autoload('NonMustacheClass')); + $this->assertFalse(class_exists('NonMustacheClass')); + + $loader->autoload('Mustache_Foo'); + $this->assertTrue(class_exists('Mustache_Foo')); + + $loader->autoload('\Mustache_Bar'); + $this->assertTrue(class_exists('Mustache_Bar')); + } + + /** + * Test that the autoloader won't register multiple times. + */ + public function testRegisterMultiple() + { + $numLoaders = count(spl_autoload_functions()); + + Mustache_Autoloader::register(); + Mustache_Autoloader::register(); + + $expectedNumLoaders = $numLoaders + 1; + + $this->assertCount($expectedNumLoaders, spl_autoload_functions()); + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Cache/AbstractCacheTest.php b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Cache/AbstractCacheTest.php new file mode 100644 index 0000000..ac47e64 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Cache/AbstractCacheTest.php @@ -0,0 +1,44 @@ +setLogger($logger); + $this->assertSame($logger, $cache->getLogger()); + } + + /** + * @expectedException Mustache_Exception_InvalidArgumentException + */ + public function testSetLoggerThrowsExceptions() + { + $cache = new CacheStub(); + $logger = new StdClass(); + $cache->setLogger($logger); + } +} + +class CacheStub extends Mustache_Cache_AbstractCache +{ + public function load($key) + { + // nada + } + + public function cache($key, $value) + { + // nada + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Cache/FilesystemCacheTest.php b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Cache/FilesystemCacheTest.php new file mode 100644 index 0000000..6bcc483 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Cache/FilesystemCacheTest.php @@ -0,0 +1,36 @@ +load($key); + + $this->assertFalse($loaded); + } + + public function testCachePut() + { + $key = 'some key'; + $value = 'cache($key, $value); + $loaded = $cache->load($key); + + $this->assertTrue($loaded); + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/Mustache/Test/CompilerTest.php b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/CompilerTest.php new file mode 100644 index 0000000..6fd1986 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/CompilerTest.php @@ -0,0 +1,154 @@ +compile($source, $tree, $name, $customEscaper, $charset, false, $entityFlags); + foreach ($expected as $contains) { + $this->assertContains($contains, $compiled); + } + } + + public function getCompileValues() + { + return array( + array('', array(), 'Banana', false, ENT_COMPAT, 'ISO-8859-1', array( + "\nclass Banana extends Mustache_Template", + 'return $buffer;', + )), + + array('', array($this->createTextToken('TEXT')), 'Monkey', false, ENT_COMPAT, 'UTF-8', array( + "\nclass Monkey extends Mustache_Template", + '$buffer .= $indent . \'TEXT\';', + 'return $buffer;', + )), + + array( + '', + array( + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_ESCAPED, + Mustache_Tokenizer::NAME => 'name', + ), + ), + 'Monkey', + true, + ENT_COMPAT, + 'ISO-8859-1', + array( + "\nclass Monkey extends Mustache_Template", + '$value = $this->resolveValue($context->find(\'name\'), $context);', + '$buffer .= $indent . call_user_func($this->mustache->getEscape(), $value);', + 'return $buffer;', + ), + ), + + array( + '', + array( + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_ESCAPED, + Mustache_Tokenizer::NAME => 'name', + ), + ), + 'Monkey', + false, + ENT_COMPAT, + 'ISO-8859-1', + array( + "\nclass Monkey extends Mustache_Template", + '$value = $this->resolveValue($context->find(\'name\'), $context);', + '$buffer .= $indent . htmlspecialchars($value, ' . ENT_COMPAT . ', \'ISO-8859-1\');', + 'return $buffer;', + ), + ), + + array( + '', + array( + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_ESCAPED, + Mustache_Tokenizer::NAME => 'name', + ), + ), + 'Monkey', + false, + ENT_QUOTES, + 'ISO-8859-1', + array( + "\nclass Monkey extends Mustache_Template", + '$value = $this->resolveValue($context->find(\'name\'), $context);', + '$buffer .= $indent . htmlspecialchars($value, ' . ENT_QUOTES . ', \'ISO-8859-1\');', + 'return $buffer;', + ), + ), + + array( + '', + array( + $this->createTextToken("foo\n"), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_ESCAPED, + Mustache_Tokenizer::NAME => 'name', + ), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_ESCAPED, + Mustache_Tokenizer::NAME => '.', + ), + $this->createTextToken("'bar'"), + ), + 'Monkey', + false, + ENT_COMPAT, + 'UTF-8', + array( + "\nclass Monkey extends Mustache_Template", + "\$buffer .= \$indent . 'foo\n';", + '$value = $this->resolveValue($context->find(\'name\'), $context);', + '$buffer .= htmlspecialchars($value, ' . ENT_COMPAT . ', \'UTF-8\');', + '$value = $this->resolveValue($context->last(), $context);', + '$buffer .= \'\\\'bar\\\'\';', + 'return $buffer;', + ), + ), + ); + } + + /** + * @expectedException Mustache_Exception_SyntaxException + */ + public function testCompilerThrowsSyntaxException() + { + $compiler = new Mustache_Compiler(); + $compiler->compile('', array(array(Mustache_Tokenizer::TYPE => 'invalid')), 'SomeClass'); + } + + /** + * @param string $value + */ + private function createTextToken($value) + { + return array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_TEXT, + Mustache_Tokenizer::VALUE => $value, + ); + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/Mustache/Test/ContextTest.php b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/ContextTest.php new file mode 100644 index 0000000..447ea16 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/ContextTest.php @@ -0,0 +1,282 @@ +assertSame('', $one->find('foo')); + $this->assertSame('', $one->find('bar')); + + $two = new Mustache_Context(array( + 'foo' => 'FOO', + 'bar' => '', + )); + $this->assertEquals('FOO', $two->find('foo')); + $this->assertEquals('', $two->find('bar')); + + $obj = new StdClass(); + $obj->name = 'NAME'; + $three = new Mustache_Context($obj); + $this->assertSame($obj, $three->last()); + $this->assertEquals('NAME', $three->find('name')); + } + + public function testPushPopAndLast() + { + $context = new Mustache_Context(); + $this->assertFalse($context->last()); + + $dummy = new Mustache_Test_TestDummy(); + $context->push($dummy); + $this->assertSame($dummy, $context->last()); + $this->assertSame($dummy, $context->pop()); + $this->assertFalse($context->last()); + + $obj = new StdClass(); + $context->push($dummy); + $this->assertSame($dummy, $context->last()); + $context->push($obj); + $this->assertSame($obj, $context->last()); + $this->assertSame($obj, $context->pop()); + $this->assertSame($dummy, $context->pop()); + $this->assertFalse($context->last()); + } + + public function testFind() + { + $context = new Mustache_Context(); + + $dummy = new Mustache_Test_TestDummy(); + + $obj = new StdClass(); + $obj->name = 'obj'; + + $arr = array( + 'a' => array('b' => array('c' => 'see')), + 'b' => 'bee', + ); + + $string = 'some arbitrary string'; + + $context->push($dummy); + $this->assertEquals('dummy', $context->find('name')); + + $context->push($obj); + $this->assertEquals('obj', $context->find('name')); + + $context->pop(); + $this->assertEquals('dummy', $context->find('name')); + + $dummy->name = 'dummyer'; + $this->assertEquals('dummyer', $context->find('name')); + + $context->push($arr); + $this->assertEquals('bee', $context->find('b')); + $this->assertEquals('see', $context->findDot('a.b.c')); + + $dummy->name = 'dummy'; + + $context->push($string); + $this->assertSame($string, $context->last()); + $this->assertEquals('dummy', $context->find('name')); + $this->assertEquals('see', $context->findDot('a.b.c')); + $this->assertEquals('', $context->find('foo')); + $this->assertEquals('', $context->findDot('bar')); + } + + public function testArrayAccessFind() + { + $access = new Mustache_Test_TestArrayAccess(array( + 'a' => array('b' => array('c' => 'see')), + 'b' => 'bee', + )); + + $context = new Mustache_Context($access); + $this->assertEquals('bee', $context->find('b')); + $this->assertEquals('see', $context->findDot('a.b.c')); + $this->assertEquals(null, $context->findDot('a.b.c.d')); + } + + public function testAccessorPriority() + { + $context = new Mustache_Context(new Mustache_Test_AllTheThings()); + + $this->assertEquals('win', $context->find('foo'), 'method beats property'); + $this->assertEquals('win', $context->find('bar'), 'property beats ArrayAccess'); + $this->assertEquals('win', $context->find('baz'), 'ArrayAccess stands alone'); + $this->assertEquals('win', $context->find('qux'), 'ArrayAccess beats private property'); + } + + public function testAnchoredDotNotation() + { + $context = new Mustache_Context(); + + $a = array( + 'name' => 'a', + 'number' => 1, + ); + + $b = array( + 'number' => 2, + 'child' => array( + 'name' => 'baby bee', + ), + ); + + $c = array( + 'name' => 'cee', + ); + + $context->push($a); + $this->assertEquals('a', $context->find('name')); + $this->assertEquals('', $context->findDot('.name')); + $this->assertEquals('a', $context->findAnchoredDot('.name')); + $this->assertEquals(1, $context->find('number')); + $this->assertEquals('', $context->findDot('.number')); + $this->assertEquals(1, $context->findAnchoredDot('.number')); + + $context->push($b); + $this->assertEquals('a', $context->find('name')); + $this->assertEquals(2, $context->find('number')); + $this->assertEquals('', $context->findDot('.name')); + $this->assertEquals('', $context->findDot('.number')); + $this->assertEquals('', $context->findAnchoredDot('.name')); + $this->assertEquals(2, $context->findAnchoredDot('.number')); + $this->assertEquals('baby bee', $context->findDot('child.name')); + $this->assertEquals('', $context->findDot('.child.name')); + $this->assertEquals('baby bee', $context->findAnchoredDot('.child.name')); + + $context->push($c); + $this->assertEquals('cee', $context->find('name')); + $this->assertEquals('', $context->findDot('.name')); + $this->assertEquals('cee', $context->findAnchoredDot('.name')); + $this->assertEquals(2, $context->find('number')); + $this->assertEquals('', $context->findDot('.number')); + $this->assertEquals('', $context->findAnchoredDot('.number')); + $this->assertEquals('baby bee', $context->findDot('child.name')); + $this->assertEquals('', $context->findDot('.child.name')); + $this->assertEquals('', $context->findAnchoredDot('.child.name')); + } + + /** + * @expectedException Mustache_Exception_InvalidArgumentException + */ + public function testAnchoredDotNotationThrowsExceptions() + { + $context = new Mustache_Context(); + $context->push(array('a' => 1)); + $context->findAnchoredDot('a'); + } +} + +class Mustache_Test_TestDummy +{ + public $name = 'dummy'; + + public function __invoke() + { + // nothing + } + + public static function foo() + { + return ''; + } + + public function bar() + { + return ''; + } +} + +class Mustache_Test_TestArrayAccess implements ArrayAccess +{ + private $container = array(); + + public function __construct($array) + { + foreach ($array as $key => $value) { + $this->container[$key] = $value; + } + } + + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } +} + +class Mustache_Test_AllTheThings implements ArrayAccess +{ + public $foo = 'fail'; + public $bar = 'win'; + private $qux = 'fail'; + + public function foo() + { + return 'win'; + } + + public function offsetExists($offset) + { + return true; + } + + public function offsetGet($offset) + { + switch ($offset) { + case 'foo': + case 'bar': + return 'fail'; + + case 'baz': + case 'qux': + return 'win'; + + default: + return 'lolwhut'; + } + } + + public function offsetSet($offset, $value) + { + // nada + } + + public function offsetUnset($offset) + { + // nada + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/Mustache/Test/EngineTest.php b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/EngineTest.php new file mode 100644 index 0000000..3e4d193 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/EngineTest.php @@ -0,0 +1,397 @@ + '__whot__', + 'cache' => self::$tempDir, + 'cache_file_mode' => 777, + 'logger' => $logger, + 'loader' => $loader, + 'partials_loader' => $partialsLoader, + 'partials' => array( + 'foo' => '{{ foo }}', + ), + 'helpers' => array( + 'foo' => array($this, 'getFoo'), + 'bar' => 'BAR', + ), + 'escape' => 'strtoupper', + 'entity_flags' => ENT_QUOTES, + 'charset' => 'ISO-8859-1', + 'pragmas' => array(Mustache_Engine::PRAGMA_FILTERS), + )); + + $this->assertSame($logger, $mustache->getLogger()); + $this->assertSame($loader, $mustache->getLoader()); + $this->assertSame($partialsLoader, $mustache->getPartialsLoader()); + $this->assertEquals('{{ foo }}', $partialsLoader->load('foo')); + $this->assertContains('__whot__', $mustache->getTemplateClassName('{{ foo }}')); + $this->assertEquals('strtoupper', $mustache->getEscape()); + $this->assertEquals(ENT_QUOTES, $mustache->getEntityFlags()); + $this->assertEquals('ISO-8859-1', $mustache->getCharset()); + $this->assertTrue($mustache->hasHelper('foo')); + $this->assertTrue($mustache->hasHelper('bar')); + $this->assertFalse($mustache->hasHelper('baz')); + $this->assertInstanceOf('Mustache_Cache_FilesystemCache', $mustache->getCache()); + $this->assertEquals(array(Mustache_Engine::PRAGMA_FILTERS), $mustache->getPragmas()); + } + + public static function getFoo() + { + return 'foo'; + } + + public function testRender() + { + $source = '{{ foo }}'; + $data = array('bar' => 'baz'); + $output = 'TEH OUTPUT'; + + $template = $this->getMockBuilder('Mustache_Template') + ->disableOriginalConstructor() + ->getMock(); + + $mustache = new MustacheStub(); + $mustache->template = $template; + + $template->expects($this->once()) + ->method('render') + ->with($data) + ->will($this->returnValue($output)); + + $this->assertEquals($output, $mustache->render($source, $data)); + $this->assertEquals($source, $mustache->source); + } + + public function testSettingServices() + { + $logger = new Mustache_Logger_StreamLogger(tmpfile()); + $loader = new Mustache_Loader_StringLoader(); + $tokenizer = new Mustache_Tokenizer(); + $parser = new Mustache_Parser(); + $compiler = new Mustache_Compiler(); + $mustache = new Mustache_Engine(); + $cache = new Mustache_Cache_FilesystemCache(self::$tempDir); + + $this->assertNotSame($logger, $mustache->getLogger()); + $mustache->setLogger($logger); + $this->assertSame($logger, $mustache->getLogger()); + + $this->assertNotSame($loader, $mustache->getLoader()); + $mustache->setLoader($loader); + $this->assertSame($loader, $mustache->getLoader()); + + $this->assertNotSame($loader, $mustache->getPartialsLoader()); + $mustache->setPartialsLoader($loader); + $this->assertSame($loader, $mustache->getPartialsLoader()); + + $this->assertNotSame($tokenizer, $mustache->getTokenizer()); + $mustache->setTokenizer($tokenizer); + $this->assertSame($tokenizer, $mustache->getTokenizer()); + + $this->assertNotSame($parser, $mustache->getParser()); + $mustache->setParser($parser); + $this->assertSame($parser, $mustache->getParser()); + + $this->assertNotSame($compiler, $mustache->getCompiler()); + $mustache->setCompiler($compiler); + $this->assertSame($compiler, $mustache->getCompiler()); + + $this->assertNotSame($cache, $mustache->getCache()); + $mustache->setCache($cache); + $this->assertSame($cache, $mustache->getCache()); + } + + /** + * @group functional + */ + public function testCache() + { + $mustache = new Mustache_Engine(array( + 'template_class_prefix' => '__whot__', + 'cache' => self::$tempDir, + )); + + $source = '{{ foo }}'; + $template = $mustache->loadTemplate($source); + $className = $mustache->getTemplateClassName($source); + + $this->assertInstanceOf($className, $template); + } + + public function testLambdaCache() + { + $mustache = new MustacheStub(array( + 'cache' => self::$tempDir, + 'cache_lambda_templates' => true, + )); + + $this->assertNotInstanceOf('Mustache_Cache_NoopCache', $mustache->getProtectedLambdaCache()); + $this->assertSame($mustache->getCache(), $mustache->getProtectedLambdaCache()); + } + + public function testWithoutLambdaCache() + { + $mustache = new MustacheStub(array( + 'cache' => self::$tempDir, + )); + + $this->assertInstanceOf('Mustache_Cache_NoopCache', $mustache->getProtectedLambdaCache()); + $this->assertNotSame($mustache->getCache(), $mustache->getProtectedLambdaCache()); + } + + /** + * @expectedException Mustache_Exception_InvalidArgumentException + */ + public function testEmptyTemplatePrefixThrowsException() + { + new Mustache_Engine(array( + 'template_class_prefix' => '', + )); + } + + /** + * @expectedException Mustache_Exception_InvalidArgumentException + * @dataProvider getBadEscapers + */ + public function testNonCallableEscapeThrowsException($escape) + { + new Mustache_Engine(array('escape' => $escape)); + } + + public function getBadEscapers() + { + return array( + array('nothing'), + array('foo', 'bar'), + ); + } + + /** + * @expectedException Mustache_Exception_RuntimeException + */ + public function testImmutablePartialsLoadersThrowException() + { + $mustache = new Mustache_Engine(array( + 'partials_loader' => new Mustache_Loader_StringLoader(), + )); + + $mustache->setPartials(array('foo' => '{{ foo }}')); + } + + public function testMissingPartialsTreatedAsEmptyString() + { + $mustache = new Mustache_Engine(array( + 'partials_loader' => new Mustache_Loader_ArrayLoader(array( + 'foo' => 'FOO', + 'baz' => 'BAZ', + )), + )); + + $this->assertEquals('FOOBAZ', $mustache->render('{{>foo}}{{>bar}}{{>baz}}', array())); + } + + public function testHelpers() + { + $foo = array($this, 'getFoo'); + $bar = 'BAR'; + $mustache = new Mustache_Engine(array('helpers' => array( + 'foo' => $foo, + 'bar' => $bar, + ))); + + $helpers = $mustache->getHelpers(); + $this->assertTrue($mustache->hasHelper('foo')); + $this->assertTrue($mustache->hasHelper('bar')); + $this->assertTrue($helpers->has('foo')); + $this->assertTrue($helpers->has('bar')); + $this->assertSame($foo, $mustache->getHelper('foo')); + $this->assertSame($bar, $mustache->getHelper('bar')); + + $mustache->removeHelper('bar'); + $this->assertFalse($mustache->hasHelper('bar')); + $mustache->addHelper('bar', $bar); + $this->assertSame($bar, $mustache->getHelper('bar')); + + $baz = array($this, 'wrapWithUnderscores'); + $this->assertFalse($mustache->hasHelper('baz')); + $this->assertFalse($helpers->has('baz')); + + $mustache->addHelper('baz', $baz); + $this->assertTrue($mustache->hasHelper('baz')); + $this->assertTrue($helpers->has('baz')); + + // ... and a functional test + $tpl = $mustache->loadTemplate('{{foo}} - {{bar}} - {{#baz}}qux{{/baz}}'); + $this->assertEquals('foo - BAR - __qux__', $tpl->render()); + $this->assertEquals('foo - BAR - __qux__', $tpl->render(array('qux' => "won't mess things up"))); + } + + public static function wrapWithUnderscores($text) + { + return '__' . $text . '__'; + } + + /** + * @expectedException Mustache_Exception_InvalidArgumentException + */ + public function testSetHelpersThrowsExceptions() + { + $mustache = new Mustache_Engine(); + $mustache->setHelpers('monkeymonkeymonkey'); + } + + /** + * @expectedException Mustache_Exception_InvalidArgumentException + */ + public function testSetLoggerThrowsExceptions() + { + $mustache = new Mustache_Engine(); + $mustache->setLogger(new StdClass()); + } + + public function testLoadPartialCascading() + { + $loader = new Mustache_Loader_ArrayLoader(array( + 'foo' => 'FOO', + )); + + $mustache = new Mustache_Engine(array('loader' => $loader)); + + $tpl = $mustache->loadTemplate('foo'); + + $this->assertSame($tpl, $mustache->loadPartial('foo')); + + $mustache->setPartials(array( + 'foo' => 'f00', + )); + + // setting partials overrides the default template loading fallback. + $this->assertNotSame($tpl, $mustache->loadPartial('foo')); + + // but it didn't overwrite the original template loader templates. + $this->assertSame($tpl, $mustache->loadTemplate('foo')); + } + + public function testPartialLoadFailLogging() + { + $name = tempnam(sys_get_temp_dir(), 'mustache-test'); + $mustache = new Mustache_Engine(array( + 'logger' => new Mustache_Logger_StreamLogger($name, Mustache_Logger::WARNING), + 'partials' => array( + 'foo' => 'FOO', + 'bar' => 'BAR', + ), + )); + + $result = $mustache->render('{{> foo }}{{> bar }}{{> baz }}', array()); + $this->assertEquals('FOOBAR', $result); + + $this->assertContains('WARNING: Partial not found: "baz"', file_get_contents($name)); + } + + public function testCacheWarningLogging() + { + list($name, $mustache) = $this->getLoggedMustache(Mustache_Logger::WARNING); + $mustache->render('{{ foo }}', array('foo' => 'FOO')); + $this->assertContains('WARNING: Template cache disabled, evaluating', file_get_contents($name)); + } + + public function testLoggingIsNotTooAnnoying() + { + list($name, $mustache) = $this->getLoggedMustache(); + $mustache->render('{{ foo }}{{> bar }}', array('foo' => 'FOO')); + $this->assertEmpty(file_get_contents($name)); + } + + public function testVerboseLoggingIsVerbose() + { + list($name, $mustache) = $this->getLoggedMustache(Mustache_Logger::DEBUG); + $mustache->render('{{ foo }}{{> bar }}', array('foo' => 'FOO')); + $log = file_get_contents($name); + $this->assertContains('DEBUG: Instantiating template: ', $log); + $this->assertContains('WARNING: Partial not found: "bar"', $log); + } + + /** + * @expectedException Mustache_Exception_InvalidArgumentException + */ + public function testUnknownPragmaThrowsException() + { + new Mustache_Engine(array( + 'pragmas' => array('UNKNOWN'), + )); + } + + public function testCompileFromMustacheSourceInstance() + { + $baseDir = realpath(dirname(__FILE__) . '/../../fixtures/templates'); + $mustache = new Mustache_Engine(array( + 'loader' => new Mustache_Loader_ProductionFilesystemLoader($baseDir), + )); + $this->assertEquals('one contents', $mustache->render('one')); + } + + private function getLoggedMustache($level = Mustache_Logger::ERROR) + { + $name = tempnam(sys_get_temp_dir(), 'mustache-test'); + $mustache = new Mustache_Engine(array( + 'logger' => new Mustache_Logger_StreamLogger($name, $level), + )); + + return array($name, $mustache); + } + + public function testCustomDelimiters() + { + $mustache = new Mustache_Engine(array( + 'delimiters' => '[[ ]]', + 'partials' => array( + 'one' => '[[> two ]]', + 'two' => '[[ a ]]', + ), + )); + + $tpl = $mustache->loadTemplate('[[# a ]][[ b ]][[/a ]]'); + $this->assertEquals('c', $tpl->render(array('a' => true, 'b' => 'c'))); + + $tpl = $mustache->loadTemplate('[[> one ]]'); + $this->assertEquals('b', $tpl->render(array('a' => 'b'))); + } +} + +class MustacheStub extends Mustache_Engine +{ + public $source; + public $template; + + public function loadTemplate($source) + { + $this->source = $source; + + return $this->template; + } + + public function getProtectedLambdaCache() + { + return $this->getLambdaCache(); + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Exception/SyntaxExceptionTest.php b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Exception/SyntaxExceptionTest.php new file mode 100644 index 0000000..074dafc --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Exception/SyntaxExceptionTest.php @@ -0,0 +1,39 @@ + 'this')); + $this->assertTrue($e instanceof LogicException); + $this->assertTrue($e instanceof Mustache_Exception); + } + + public function testGetToken() + { + $token = array(Mustache_Tokenizer::TYPE => 'whatever'); + $e = new Mustache_Exception_SyntaxException('ignore this', $token); + $this->assertEquals($token, $e->getToken()); + } + + public function testPrevious() + { + if (version_compare(PHP_VERSION, '5.3.0', '<')) { + $this->markTestSkipped('Exception chaining requires at least PHP 5.3'); + } + + $previous = new Exception(); + $e = new Mustache_Exception_SyntaxException('foo', array(), $previous); + + $this->assertSame($previous, $e->getPrevious()); + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Exception/UnknownFilterExceptionTest.php b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Exception/UnknownFilterExceptionTest.php new file mode 100644 index 0000000..6dbe25e --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Exception/UnknownFilterExceptionTest.php @@ -0,0 +1,44 @@ +assertTrue($e instanceof UnexpectedValueException); + $this->assertTrue($e instanceof Mustache_Exception); + } + + public function testMessage() + { + $e = new Mustache_Exception_UnknownFilterException('sausage'); + $this->assertEquals('Unknown filter: sausage', $e->getMessage()); + } + + public function testGetFilterName() + { + $e = new Mustache_Exception_UnknownFilterException('eggs'); + $this->assertEquals('eggs', $e->getFilterName()); + } + + public function testPrevious() + { + if (version_compare(PHP_VERSION, '5.3.0', '<')) { + $this->markTestSkipped('Exception chaining requires at least PHP 5.3'); + } + + $previous = new Exception(); + $e = new Mustache_Exception_UnknownFilterException('foo', $previous); + + $this->assertSame($previous, $e->getPrevious()); + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Exception/UnknownHelperExceptionTest.php b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Exception/UnknownHelperExceptionTest.php new file mode 100644 index 0000000..5b1ccbb --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Exception/UnknownHelperExceptionTest.php @@ -0,0 +1,43 @@ +assertTrue($e instanceof InvalidArgumentException); + $this->assertTrue($e instanceof Mustache_Exception); + } + + public function testMessage() + { + $e = new Mustache_Exception_UnknownHelperException('beta'); + $this->assertEquals('Unknown helper: beta', $e->getMessage()); + } + + public function testGetHelperName() + { + $e = new Mustache_Exception_UnknownHelperException('gamma'); + $this->assertEquals('gamma', $e->getHelperName()); + } + + public function testPrevious() + { + if (version_compare(PHP_VERSION, '5.3.0', '<')) { + $this->markTestSkipped('Exception chaining requires at least PHP 5.3'); + } + + $previous = new Exception(); + $e = new Mustache_Exception_UnknownHelperException('foo', $previous); + $this->assertSame($previous, $e->getPrevious()); + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Exception/UnknownTemplateExceptionTest.php b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Exception/UnknownTemplateExceptionTest.php new file mode 100644 index 0000000..b993bfa --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Exception/UnknownTemplateExceptionTest.php @@ -0,0 +1,43 @@ +assertTrue($e instanceof InvalidArgumentException); + $this->assertTrue($e instanceof Mustache_Exception); + } + + public function testMessage() + { + $e = new Mustache_Exception_UnknownTemplateException('luigi'); + $this->assertEquals('Unknown template: luigi', $e->getMessage()); + } + + public function testGetTemplateName() + { + $e = new Mustache_Exception_UnknownTemplateException('yoshi'); + $this->assertEquals('yoshi', $e->getTemplateName()); + } + + public function testPrevious() + { + if (version_compare(PHP_VERSION, '5.3.0', '<')) { + $this->markTestSkipped('Exception chaining requires at least PHP 5.3'); + } + + $previous = new Exception(); + $e = new Mustache_Exception_UnknownTemplateException('foo', $previous); + $this->assertSame($previous, $e->getPrevious()); + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/Mustache/Test/FiveThree/Functional/ClosureQuirksTest.php b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/FiveThree/Functional/ClosureQuirksTest.php new file mode 100644 index 0000000..cc575a9 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/FiveThree/Functional/ClosureQuirksTest.php @@ -0,0 +1,32 @@ +mustache = new Mustache_Engine(); + } + + public function testClosuresDontLikeItWhenYouTouchTheirProperties() + { + $tpl = $this->mustache->loadTemplate('{{ foo.bar }}'); + $this->assertEquals('', $tpl->render(array('foo' => function () { + return 'FOO'; + }))); + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/Mustache/Test/FiveThree/Functional/EngineTest.php b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/FiveThree/Functional/EngineTest.php new file mode 100644 index 0000000..406473e --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/FiveThree/Functional/EngineTest.php @@ -0,0 +1,50 @@ + $pragmas, + 'helpers' => $helpers, + )); + + $this->assertEquals($expect, $mustache->render($tpl, $data)); + } + + public function pragmaData() + { + $helpers = array( + 'longdate' => function (\DateTime $value) { + return $value->format('Y-m-d h:m:s'); + }, + ); + + $data = array( + 'date' => new DateTime('1/1/2000', new DateTimeZone('UTC')), + ); + + $tpl = '{{ date | longdate }}'; + + return array( + array(array(Mustache_Engine::PRAGMA_FILTERS), $helpers, $data, $tpl, '2000-01-01 12:01:00'), + array(array(), $helpers, $data, $tpl, ''), + ); + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/Mustache/Test/FiveThree/Functional/FiltersTest.php b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/FiveThree/Functional/FiltersTest.php new file mode 100644 index 0000000..16dec60 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/FiveThree/Functional/FiltersTest.php @@ -0,0 +1,187 @@ +mustache = new Mustache_Engine(); + } + + /** + * @dataProvider singleFilterData + */ + public function testSingleFilter($tpl, $helpers, $data, $expect) + { + $this->mustache->setHelpers($helpers); + $this->assertEquals($expect, $this->mustache->render($tpl, $data)); + } + + public function singleFilterData() + { + $helpers = array( + 'longdate' => function (\DateTime $value) { + return $value->format('Y-m-d h:m:s'); + }, + 'echo' => function ($value) { + return array($value, $value, $value); + }, + ); + + return array( + array( + '{{% FILTERS }}{{ date | longdate }}', + $helpers, + (object) array('date' => new DateTime('1/1/2000', new DateTimeZone('UTC'))), + '2000-01-01 12:01:00', + ), + + array( + '{{% FILTERS }}{{# word | echo }}{{ . }}!{{/ word | echo }}', + $helpers, + array('word' => 'bacon'), + 'bacon!bacon!bacon!', + ), + ); + } + + public function testChainedFilters() + { + $tpl = $this->mustache->loadTemplate('{{% FILTERS }}{{ date | longdate | withbrackets }}'); + + $this->mustache->addHelper('longdate', function (\DateTime $value) { + return $value->format('Y-m-d h:m:s'); + }); + + $this->mustache->addHelper('withbrackets', function ($value) { + return sprintf('[[%s]]', $value); + }); + + $foo = new \StdClass(); + $foo->date = new DateTime('1/1/2000', new DateTimeZone('UTC')); + + $this->assertEquals('[[2000-01-01 12:01:00]]', $tpl->render($foo)); + } + + const CHAINED_SECTION_FILTERS_TPL = <<<'EOS' +{{% FILTERS }} +{{# word | echo | with_index }} +{{ key }}: {{ value }} +{{/ word | echo | with_index }} +EOS; + + public function testChainedSectionFilters() + { + $tpl = $this->mustache->loadTemplate(self::CHAINED_SECTION_FILTERS_TPL); + + $this->mustache->addHelper('echo', function ($value) { + return array($value, $value, $value); + }); + + $this->mustache->addHelper('with_index', function ($value) { + return array_map(function ($k, $v) { + return array( + 'key' => $k, + 'value' => $v, + ); + }, array_keys($value), $value); + }); + + $this->assertEquals("0: bacon\n1: bacon\n2: bacon\n", $tpl->render(array('word' => 'bacon'))); + } + + /** + * @dataProvider interpolateFirstData + */ + public function testInterpolateFirst($tpl, $data, $expect) + { + $this->assertEquals($expect, $this->mustache->render($tpl, $data)); + } + + public function interpolateFirstData() + { + $data = array( + 'foo' => 'FOO', + 'bar' => function ($value) { + return ($value === 'FOO') ? 'win!' : 'fail :('; + }, + ); + + return array( + array('{{% FILTERS }}{{ foo | bar }}', $data, 'win!'), + array('{{% FILTERS }}{{# foo | bar }}{{ . }}{{/ foo | bar }}', $data, 'win!'), + ); + } + + /** + * @expectedException Mustache_Exception_UnknownFilterException + * @dataProvider brokenPipeData + */ + public function testThrowsExceptionForBrokenPipes($tpl, $data) + { + $this->mustache->render($tpl, $data); + } + + public function brokenPipeData() + { + return array( + array('{{% FILTERS }}{{ foo | bar }}', array()), + array('{{% FILTERS }}{{ foo | bar }}', array('foo' => 'FOO')), + array('{{% FILTERS }}{{ foo | bar }}', array('foo' => 'FOO', 'bar' => 'BAR')), + array('{{% FILTERS }}{{ foo | bar }}', array('foo' => 'FOO', 'bar' => array(1, 2))), + array('{{% FILTERS }}{{ foo | bar | baz }}', array('foo' => 'FOO', 'bar' => function () { + return 'BAR'; + })), + array('{{% FILTERS }}{{ foo | bar | baz }}', array('foo' => 'FOO', 'baz' => function () { + return 'BAZ'; + })), + array('{{% FILTERS }}{{ foo | bar | baz }}', array('bar' => function () { + return 'BAR'; + })), + array('{{% FILTERS }}{{ foo | bar | baz }}', array('baz' => function () { + return 'BAZ'; + })), + array('{{% FILTERS }}{{ foo | bar.baz }}', array('foo' => 'FOO', 'bar' => function () { + return 'BAR'; + }, 'baz' => function () { + return 'BAZ'; + })), + + array('{{% FILTERS }}{{# foo | bar }}{{ . }}{{/ foo | bar }}', array()), + array('{{% FILTERS }}{{# foo | bar }}{{ . }}{{/ foo | bar }}', array('foo' => 'FOO')), + array('{{% FILTERS }}{{# foo | bar }}{{ . }}{{/ foo | bar }}', array('foo' => 'FOO', 'bar' => 'BAR')), + array('{{% FILTERS }}{{# foo | bar }}{{ . }}{{/ foo | bar }}', array('foo' => 'FOO', 'bar' => array(1, 2))), + array('{{% FILTERS }}{{# foo | bar | baz }}{{ . }}{{/ foo | bar | baz }}', array('foo' => 'FOO', 'bar' => function () { + return 'BAR'; + })), + array('{{% FILTERS }}{{# foo | bar | baz }}{{ . }}{{/ foo | bar | baz }}', array('foo' => 'FOO', 'baz' => function () { + return 'BAZ'; + })), + array('{{% FILTERS }}{{# foo | bar | baz }}{{ . }}{{/ foo | bar | baz }}', array('bar' => function () { + return 'BAR'; + })), + array('{{% FILTERS }}{{# foo | bar | baz }}{{ . }}{{/ foo | bar | baz }}', array('baz' => function () { + return 'BAZ'; + })), + array('{{% FILTERS }}{{# foo | bar.baz }}{{ . }}{{/ foo | bar.baz }}', array('foo' => 'FOO', 'bar' => function () { + return 'BAR'; + }, 'baz' => function () { + return 'BAZ'; + })), + ); + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/Mustache/Test/FiveThree/Functional/HigherOrderSectionsTest.php b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/FiveThree/Functional/HigherOrderSectionsTest.php new file mode 100644 index 0000000..eb05150 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/FiveThree/Functional/HigherOrderSectionsTest.php @@ -0,0 +1,77 @@ +mustache = new Mustache_Engine(); + } + + public function testAnonymousFunctionSectionCallback() + { + $tpl = $this->mustache->loadTemplate('{{#wrapper}}{{name}}{{/wrapper}}'); + + $foo = new Mustache_Test_FiveThree_Functional_Foo(); + $foo->name = 'Mario'; + $foo->wrapper = function ($text) { + return sprintf('
%s
', $text); + }; + + $this->assertEquals(sprintf('
%s
', $foo->name), $tpl->render($foo)); + } + + public function testSectionCallback() + { + $one = $this->mustache->loadTemplate('{{name}}'); + $two = $this->mustache->loadTemplate('{{#wrap}}{{name}}{{/wrap}}'); + + $foo = new Mustache_Test_FiveThree_Functional_Foo(); + $foo->name = 'Luigi'; + + $this->assertEquals($foo->name, $one->render($foo)); + $this->assertEquals(sprintf('%s', $foo->name), $two->render($foo)); + } + + public function testViewArrayAnonymousSectionCallback() + { + $tpl = $this->mustache->loadTemplate('{{#wrap}}{{name}}{{/wrap}}'); + + $data = array( + 'name' => 'Bob', + 'wrap' => function ($text) { + return sprintf('[[%s]]', $text); + }, + ); + + $this->assertEquals(sprintf('[[%s]]', $data['name']), $tpl->render($data)); + } +} + +class Mustache_Test_FiveThree_Functional_Foo +{ + public $name = 'Justin'; + public $lorem = 'Lorem ipsum dolor sit amet,'; + public $wrap; + + public function __construct() + { + $this->wrap = function ($text) { + return sprintf('%s', $text); + }; + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/Mustache/Test/FiveThree/Functional/LambdaHelperTest.php b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/FiveThree/Functional/LambdaHelperTest.php new file mode 100644 index 0000000..6fc5d40 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/FiveThree/Functional/LambdaHelperTest.php @@ -0,0 +1,67 @@ +mustache = new Mustache_Engine(); + } + + public function testSectionLambdaHelper() + { + $one = $this->mustache->loadTemplate('{{name}}'); + $two = $this->mustache->loadTemplate('{{#lambda}}{{name}}{{/lambda}}'); + + $foo = new StdClass(); + $foo->name = 'Mario'; + $foo->lambda = function ($text, $mustache) { + return strtoupper($mustache->render($text)); + }; + + $this->assertEquals('Mario', $one->render($foo)); + $this->assertEquals('MARIO', $two->render($foo)); + } + + public function testSectionLambdaHelperRespectsDelimiterChanges() + { + $tpl = $this->mustache->loadTemplate("{{=<% %>=}}\n<%# bang %><% value %><%/ bang %>"); + + $data = new StdClass(); + $data->value = 'hello world'; + $data->bang = function ($text, $mustache) { + return $mustache->render($text) . '!'; + }; + + $this->assertEquals('hello world!', $tpl->render($data)); + } + + public function testLambdaHelperIsInvokable() + { + $one = $this->mustache->loadTemplate('{{name}}'); + $two = $this->mustache->loadTemplate('{{#lambda}}{{name}}{{/lambda}}'); + + $foo = new StdClass(); + $foo->name = 'Mario'; + $foo->lambda = function ($text, $render) { + return strtoupper($render($text)); + }; + + $this->assertEquals('Mario', $one->render($foo)); + $this->assertEquals('MARIO', $two->render($foo)); + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/Mustache/Test/FiveThree/Functional/MustacheSpecTest.php b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/FiveThree/Functional/MustacheSpecTest.php new file mode 100644 index 0000000..af3f982 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/FiveThree/Functional/MustacheSpecTest.php @@ -0,0 +1,68 @@ +markTestSkipped('Mustache spec submodule not initialized: run "git submodule update --init"'); + } + } + + /** + * @group lambdas + * @dataProvider loadLambdasSpec + */ + public function testLambdasSpec($desc, $source, $partials, $data, $expected) + { + $template = self::loadTemplate($source, $partials); + $this->assertEquals($expected, $template($this->prepareLambdasSpec($data)), $desc); + } + + public function loadLambdasSpec() + { + return $this->loadSpec('~lambdas'); + } + + /** + * Extract and lambdafy any 'lambda' values found in the $data array. + */ + private function prepareLambdasSpec($data) + { + foreach ($data as $key => $val) { + if ($key === 'lambda') { + if (!isset($val['php'])) { + $this->markTestSkipped(sprintf('PHP lambda test not implemented for this test.')); + } + + $func = $val['php']; + $data[$key] = function ($text = null) use ($func) { + return eval($func); + }; + } elseif (is_array($val)) { + $data[$key] = $this->prepareLambdasSpec($val); + } + } + + return $data; + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/Mustache/Test/FiveThree/Functional/PartialLambdaIndentTest.php b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/FiveThree/Functional/PartialLambdaIndentTest.php new file mode 100644 index 0000000..1f9af7c --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/FiveThree/Functional/PartialLambdaIndentTest.php @@ -0,0 +1,94 @@ + + {{> input }} + + +EOS; + $partial = <<<'EOS' + + +EOS; + + $expected = <<<'EOS' +
+ +
+ +EOS; + + $m = new Mustache_Engine(array( + 'partials' => array('input' => $partial), + )); + + $tpl = $m->loadTemplate($src); + + $data = new Mustache_Test_FiveThree_Functional_ClassWithLambda(); + $this->assertEquals($expected, $tpl->render($data)); + } + + public function testLambdaInterpolationsInsidePartialsAreIndentedProperly() + { + $src = <<<'EOS' +
+ {{> input }} +
+ +EOS; + $partial = <<<'EOS' + + +EOS; + + $expected = <<<'EOS' +
+ +
+ +EOS; + + $m = new Mustache_Engine(array( + 'partials' => array('input' => $partial), + )); + + $tpl = $m->loadTemplate($src); + + $data = new Mustache_Test_FiveThree_Functional_ClassWithLambda(); + $this->assertEquals($expected, $tpl->render($data)); + } +} + +class Mustache_Test_FiveThree_Functional_ClassWithLambda +{ + public function _t() + { + return function ($val) { + return strtoupper($val); + }; + } + + public function placeholder() + { + return function () { + return 'Enter your name'; + }; + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/Mustache/Test/FiveThree/Functional/StrictCallablesTest.php b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/FiveThree/Functional/StrictCallablesTest.php new file mode 100644 index 0000000..2c01169 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/FiveThree/Functional/StrictCallablesTest.php @@ -0,0 +1,135 @@ + $strict)); + $tpl = $mustache->loadTemplate('{{# section }}{{ name }}{{/ section }}'); + + $data = new StdClass(); + $data->name = $name; + $data->section = $section; + + $this->assertEquals($expected, $tpl->render($data)); + } + + public function callables() + { + $lambda = function ($tpl, $mustache) { + return strtoupper($mustache->render($tpl)); + }; + + return array( + // Interpolation lambdas + array( + false, + array($this, 'instanceName'), + $lambda, + 'YOSHI', + ), + array( + false, + array(__CLASS__, 'staticName'), + $lambda, + 'YOSHI', + ), + array( + false, + function () { + return 'Yoshi'; + }, + $lambda, + 'YOSHI', + ), + + // Section lambdas + array( + false, + 'Yoshi', + array($this, 'instanceCallable'), + 'YOSHI', + ), + array( + false, + 'Yoshi', + array(__CLASS__, 'staticCallable'), + 'YOSHI', + ), + array( + false, + 'Yoshi', + $lambda, + 'YOSHI', + ), + + // Strict interpolation lambdas + array( + true, + function () { + return 'Yoshi'; + }, + $lambda, + 'YOSHI', + ), + + // Strict section lambdas + array( + true, + 'Yoshi', + array($this, 'instanceCallable'), + 'YoshiYoshi', + ), + array( + true, + 'Yoshi', + array(__CLASS__, 'staticCallable'), + 'YoshiYoshi', + ), + array( + true, + 'Yoshi', + function ($tpl, $mustache) { + return strtoupper($mustache->render($tpl)); + }, + 'YOSHI', + ), + ); + } + + public function instanceCallable($tpl, $mustache) + { + return strtoupper($mustache->render($tpl)); + } + + public static function staticCallable($tpl, $mustache) + { + return strtoupper($mustache->render($tpl)); + } + + public function instanceName() + { + return 'Yoshi'; + } + + public static function staticName() + { + return 'Yoshi'; + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Functional/CallTest.php b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Functional/CallTest.php new file mode 100644 index 0000000..681ec1b --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Functional/CallTest.php @@ -0,0 +1,40 @@ +loadTemplate('{{# foo }}{{ label }}: {{ name }}{{/ foo }}'); + + $foo = new Mustache_Test_Functional_ClassWithCall(); + $foo->name = 'Bob'; + + $data = array('label' => 'name', 'foo' => $foo); + + $this->assertEquals('name: Bob', $tpl->render($data)); + } +} + +class Mustache_Test_Functional_ClassWithCall +{ + public $name; + + public function __call($method, $args) + { + return 'unknown value'; + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Functional/ExamplesTest.php b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Functional/ExamplesTest.php new file mode 100644 index 0000000..ac883ea --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Functional/ExamplesTest.php @@ -0,0 +1,142 @@ + $partials, + )); + $this->assertEquals($expected, $mustache->loadTemplate($source)->render($context)); + } + + /** + * Data provider for testExamples method. + * + * Loads examples from the test fixtures directory. + * + * This examples directory should contain any number of subdirectories, each of which contains + * three files: one Mustache class (.php), one Mustache template (.mustache), and one output file + * (.txt). Optionally, the directory may contain a folder full of partials. + * + * @return array + */ + public function getExamples() + { + $path = realpath(dirname(__FILE__) . '/../../../fixtures/examples'); + $examples = array(); + + $handle = opendir($path); + while (($file = readdir($handle)) !== false) { + if ($file === '.' || $file === '..') { + continue; + } + + $fullpath = $path . '/' . $file; + if (is_dir($fullpath)) { + $examples[$file] = $this->loadExample($fullpath); + } + } + closedir($handle); + + return $examples; + } + + /** + * Helper method to load an example given the full path. + * + * @param string $path + * + * @return array arguments for testExamples + */ + private function loadExample($path) + { + $context = null; + $source = null; + $partials = array(); + $expected = null; + + $handle = opendir($path); + while (($file = readdir($handle)) !== false) { + $fullpath = $path . '/' . $file; + $info = pathinfo($fullpath); + + if (is_dir($fullpath) && $info['basename'] === 'partials') { + // load partials + $partials = $this->loadPartials($fullpath); + } elseif (is_file($fullpath)) { + // load other files + switch ($info['extension']) { + case 'php': + require_once $fullpath; + $className = $info['filename']; + $context = new $className(); + break; + + case 'mustache': + $source = file_get_contents($fullpath); + break; + + case 'txt': + $expected = file_get_contents($fullpath); + break; + } + } + } + closedir($handle); + + return array($context, $source, $partials, $expected); + } + + /** + * Helper method to load partials given an example directory. + * + * @param string $path + * + * @return array $partials + */ + private function loadPartials($path) + { + $partials = array(); + + $handle = opendir($path); + while (($file = readdir($handle)) !== false) { + if ($file === '.' || $file === '..') { + continue; + } + + $fullpath = $path . '/' . $file; + $info = pathinfo($fullpath); + + if ($info['extension'] === 'mustache') { + $partials[$info['filename']] = file_get_contents($fullpath); + } + } + closedir($handle); + + return $partials; + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Functional/HigherOrderSectionsTest.php b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Functional/HigherOrderSectionsTest.php new file mode 100644 index 0000000..14774cd --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Functional/HigherOrderSectionsTest.php @@ -0,0 +1,177 @@ +mustache = new Mustache_Engine(); + } + + /** + * @dataProvider sectionCallbackData + */ + public function testSectionCallback($data, $tpl, $expect) + { + $this->assertEquals($expect, $this->mustache->render($tpl, $data)); + } + + public function sectionCallbackData() + { + $foo = new Mustache_Test_Functional_Foo(); + $foo->doublewrap = array($foo, 'wrapWithBoth'); + + $bar = new Mustache_Test_Functional_Foo(); + $bar->trimmer = array(get_class($bar), 'staticTrim'); + + return array( + array($foo, '{{#doublewrap}}{{name}}{{/doublewrap}}', sprintf('%s', $foo->name)), + array($bar, '{{#trimmer}} {{name}} {{/trimmer}}', $bar->name), + ); + } + + public function testViewArraySectionCallback() + { + $tpl = $this->mustache->loadTemplate('{{#trim}} {{name}} {{/trim}}'); + + $foo = new Mustache_Test_Functional_Foo(); + + $data = array( + 'name' => 'Bob', + 'trim' => array(get_class($foo), 'staticTrim'), + ); + + $this->assertEquals($data['name'], $tpl->render($data)); + } + + public function testMonsters() + { + $tpl = $this->mustache->loadTemplate('{{#title}}{{title}} {{/title}}{{name}}'); + + $frank = new Mustache_Test_Functional_Monster(); + $frank->title = 'Dr.'; + $frank->name = 'Frankenstein'; + $this->assertEquals('Dr. Frankenstein', $tpl->render($frank)); + + $dracula = new Mustache_Test_Functional_Monster(); + $dracula->title = 'Count'; + $dracula->name = 'Dracula'; + $this->assertEquals('Count Dracula', $tpl->render($dracula)); + } + + public function testPassthroughOptimization() + { + $mustache = $this->getMock('Mustache_Engine', array('loadLambda')); + $mustache->expects($this->never()) + ->method('loadLambda'); + + $tpl = $mustache->loadTemplate('{{#wrap}}NAME{{/wrap}}'); + + $foo = new Mustache_Test_Functional_Foo(); + $foo->wrap = array($foo, 'wrapWithEm'); + + $this->assertEquals('NAME', $tpl->render($foo)); + } + + public function testWithoutPassthroughOptimization() + { + $mustache = $this->getMock('Mustache_Engine', array('loadLambda')); + $mustache->expects($this->once()) + ->method('loadLambda') + ->will($this->returnValue($mustache->loadTemplate('{{ name }}'))); + + $tpl = $mustache->loadTemplate('{{#wrap}}{{name}}{{/wrap}}'); + + $foo = new Mustache_Test_Functional_Foo(); + $foo->wrap = array($foo, 'wrapWithEm'); + + $this->assertEquals('' . $foo->name . '', $tpl->render($foo)); + } + + /** + * @dataProvider cacheLambdaTemplatesData + */ + public function testCacheLambdaTemplatesOptionWorks($dirName, $tplPrefix, $enable, $expect) + { + $cacheDir = $this->setUpCacheDir($dirName); + $mustache = new Mustache_Engine(array( + 'template_class_prefix' => $tplPrefix, + 'cache' => $cacheDir, + 'cache_lambda_templates' => $enable, + )); + + $tpl = $mustache->loadTemplate('{{#wrap}}{{name}}{{/wrap}}'); + $foo = new Mustache_Test_Functional_Foo(); + $foo->wrap = array($foo, 'wrapWithEm'); + $this->assertEquals('' . $foo->name . '', $tpl->render($foo)); + $this->assertCount($expect, glob($cacheDir . '/*.php')); + } + + public function cacheLambdaTemplatesData() + { + return array( + array('test_enabling_lambda_cache', '_TestEnablingLambdaCache_', true, 2), + array('test_disabling_lambda_cache', '_TestDisablingLambdaCache_', false, 1), + ); + } + + protected function setUpCacheDir($name) + { + $cacheDir = self::$tempDir . '/' . $name; + if (file_exists($cacheDir)) { + self::rmdir($cacheDir); + } + mkdir($cacheDir, 0777, true); + + return $cacheDir; + } +} + +class Mustache_Test_Functional_Foo +{ + public $name = 'Justin'; + public $lorem = 'Lorem ipsum dolor sit amet,'; + + public function wrapWithEm($text) + { + return sprintf('%s', $text); + } + + /** + * @param string $text + */ + public function wrapWithStrong($text) + { + return sprintf('%s', $text); + } + + public function wrapWithBoth($text) + { + return self::wrapWithStrong(self::wrapWithEm($text)); + } + + public static function staticTrim($text) + { + return trim($text); + } +} + +class Mustache_Test_Functional_Monster +{ + public $title; + public $name; +} diff --git a/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Functional/InheritanceTest.php b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Functional/InheritanceTest.php new file mode 100644 index 0000000..6243704 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Functional/InheritanceTest.php @@ -0,0 +1,543 @@ +mustache = new Mustache_Engine(array( + 'pragmas' => array(Mustache_Engine::PRAGMA_BLOCKS), + )); + } + + public function getIllegalInheritanceExamples() + { + return array( + array( + array( + 'foo' => '{{$baz}}default content{{/baz}}', + ), + array( + 'bar' => 'set by user', + ), + '{{< foo }}{{# bar }}{{$ baz }}{{/ baz }}{{/ bar }}{{/ foo }}', + ), + array( + array( + 'foo' => '{{$baz}}default content{{/baz}}', + ), + array( + ), + '{{ '{{$baz}}default content{{/baz}}', + 'qux' => 'I am a partial', + ), + array( + ), + '{{qux}}{{$baz}}set by template{{/baz}}{{/foo}}', + ), + array( + array( + 'foo' => '{{$baz}}default content{{/baz}}', + ), + array(), + '{{=}}<%={{ }}=%>{{/foo}}', + ), + ); + } + + public function getLegalInheritanceExamples() + { + return array( + array( + array( + 'foo' => '{{$baz}}default content{{/baz}}', + ), + array( + 'bar' => 'set by user', + ), + '{{ '{{$baz}}default content{{/baz}}', + ), + array( + ), + '{{ '{{$baz}}defualt content{{/baz}}', + ), + array(), + '{{ '{{$a}}FAIL!{{/a}}', + 'bar' => 'WIN!!', + ), + array(), + '{{mustache->loadTemplate('{{$title}}Default title{{/title}}'); + + $data = array(); + + $this->assertEquals('Default title', $tpl->render($data)); + } + + public function testDefaultContentRendersVariables() + { + $tpl = $this->mustache->loadTemplate('{{$foo}}default {{bar}} content{{/foo}}'); + + $data = array( + 'bar' => 'baz', + ); + + $this->assertEquals('default baz content', $tpl->render($data)); + } + + public function testDefaultContentRendersTripleMustacheVariables() + { + $tpl = $this->mustache->loadTemplate('{{$foo}}default {{{bar}}} content{{/foo}}'); + + $data = array( + 'bar' => '', + ); + + $this->assertEquals('default content', $tpl->render($data)); + } + + public function testDefaultContentRendersSections() + { + $tpl = $this->mustache->loadTemplate( + '{{$foo}}default {{#bar}}{{baz}}{{/bar}} content{{/foo}}' + ); + + $data = array( + 'bar' => array('baz' => 'qux'), + ); + + $this->assertEquals('default qux content', $tpl->render($data)); + } + + public function testDefaultContentRendersNegativeSections() + { + $tpl = $this->mustache->loadTemplate( + '{{$foo}}default {{^bar}}{{baz}}{{/bar}} content{{/foo}}' + ); + + $data = array( + 'foo' => array('bar' => 'qux'), + 'baz' => 'three', + ); + + $this->assertEquals('default three content', $tpl->render($data)); + } + + public function testMustacheInjectionInDefaultContent() + { + $tpl = $this->mustache->loadTemplate( + '{{$foo}}default {{#bar}}{{baz}}{{/bar}} content{{/foo}}' + ); + + $data = array( + 'bar' => array('baz' => '{{qux}}'), + ); + + $this->assertEquals('default {{qux}} content', $tpl->render($data)); + } + + public function testDefaultContentRenderedInsideIncludedTemplates() + { + $partials = array( + 'include' => '{{$foo}}default content{{/foo}}', + ); + + $this->mustache->setPartials($partials); + + $tpl = $this->mustache->loadTemplate( + '{{assertEquals('default content', $tpl->render($data)); + } + + public function testOverriddenContent() + { + $partials = array( + 'super' => '...{{$title}}Default title{{/title}}...', + ); + + $this->mustache->setPartials($partials); + + $tpl = $this->mustache->loadTemplate( + '{{assertEquals('...sub template title...', $tpl->render($data)); + } + + public function testOverriddenPartial() + { + $partials = array( + 'partial' => '|{{$stuff}}...{{/stuff}}{{$default}} default{{/default}}|', + ); + + $this->mustache->setPartials($partials); + + $tpl = $this->mustache->loadTemplate( + 'test {{assertEquals('test |override1 default| |override2 default|', $tpl->render($data)); + } + + public function testBlocksDoNotLeakBetweenPartials() + { + $partials = array( + 'partial' => '|{{$a}}A{{/a}} {{$b}}B{{/b}}|', + ); + + $this->mustache->setPartials($partials); + + $tpl = $this->mustache->loadTemplate( + 'test {{assertEquals('test |C B| |A D|', $tpl->render($data)); + } + + public function testDataDoesNotOverrideBlock() + { + $partials = array( + 'include' => '{{$var}}var in include{{/var}}', + ); + + $this->mustache->setPartials($partials); + + $tpl = $this->mustache->loadTemplate( + '{{ 'var in data', + ); + + $this->assertEquals('var in template', $tpl->render($data)); + } + + public function testDataDoesNotOverrideDefaultBlockValue() + { + $partials = array( + 'include' => '{{$var}}var in include{{/var}}', + ); + + $this->mustache->setPartials($partials); + + $tpl = $this->mustache->loadTemplate( + '{{ 'var in data', + ); + + $this->assertEquals('var in include', $tpl->render($data)); + } + + public function testOverridePartialWithNewlines() + { + $partials = array( + 'partial' => '{{$ballmer}}peaking{{/ballmer}}', + ); + + $this->mustache->setPartials($partials); + + $tpl = $this->mustache->loadTemplate( + "{{assertEquals("peaked\n\n:(\n", $tpl->render($data)); + } + + public function testInheritIndentationWhenOverridingAPartial() + { + $partials = array( + 'partial' => 'stop: + {{$nineties}}collaborate and listen{{/nineties}}', + ); + + $this->mustache->setPartials($partials); + + $tpl = $this->mustache->loadTemplate( + '{{assertEquals( + 'stop: + hammer time', + $tpl->render($data) + ); + } + + public function testInheritSpacingWhenOverridingAPartial() + { + $partials = array( + 'parent' => 'collaborate_and{{$id}}{{/id}}', + 'child' => '{{mustache->setPartials($partials); + + $tpl = $this->mustache->loadTemplate( + 'stop: + {{>child}}' + ); + + $data = array(); + + $this->assertEquals( + 'stop: + collaborate_and_listen', + $tpl->render($data) + ); + } + + public function testOverrideOneSubstitutionButNotTheOther() + { + $partials = array( + 'partial' => '{{$stuff}}default one{{/stuff}}, {{$stuff2}}default two{{/stuff2}}', + ); + + $this->mustache->setPartials($partials); + + $tpl = $this->mustache->loadTemplate( + '{{assertEquals('default one, override two', $tpl->render($data)); + } + + public function testSuperTemplatesWithNoParameters() + { + $partials = array( + 'include' => '{{$foo}}default content{{/foo}}', + ); + + $this->mustache->setPartials($partials); + + $tpl = $this->mustache->loadTemplate( + '{{>include}}|{{assertEquals('default content|default content', $tpl->render($data)); + } + + public function testRecursionInInheritedTemplates() + { + $partials = array( + 'include' => '{{$foo}}default content{{/foo}} {{$bar}}{{ '{{$foo}}include2 default content{{/foo}} {{mustache->setPartials($partials); + + $tpl = $this->mustache->loadTemplate( + '{{assertEquals('override override override don\'t recurse', $tpl->render($data)); + } + + public function testTopLevelSubstitutionsTakePrecedenceInMultilevelInheritance() + { + $partials = array( + 'parent' => '{{ '{{ '{{$a}}g{{/a}}', + ); + + $this->mustache->setPartials($partials); + + $tpl = $this->mustache->loadTemplate( + '{{assertEquals('c', $tpl->render($data)); + } + + public function testMultiLevelInheritanceNoSubChild() + { + $partials = array( + 'parent' => '{{ '{{ '{{$a}}g{{/a}}', + ); + + $this->mustache->setPartials($partials); + + $tpl = $this->mustache->loadTemplate( + '{{assertEquals('p', $tpl->render($data)); + } + + public function testIgnoreTextInsideSuperTemplatesButParseArgs() + { + $partials = array( + 'include' => '{{$foo}}default content{{/foo}}', + ); + + $this->mustache->setPartials($partials); + + $tpl = $this->mustache->loadTemplate( + '{{assertEquals('hmm', $tpl->render($data)); + } + + public function testIgnoreTextInsideSuperTemplates() + { + $partials = array( + 'include' => '{{$foo}}default content{{/foo}}', + ); + + $this->mustache->setPartials($partials); + + $tpl = $this->mustache->loadTemplate( + '{{assertEquals('default content', $tpl->render($data)); + } + + public function testInheritanceWithLazyEvaluation() + { + $partials = array( + 'parent' => '{{#items}}{{$value}}ignored{{/value}}{{/items}}', + ); + + $this->mustache->setPartials($partials); + + $tpl = $this->mustache->loadTemplate( + '{{{{/value}}{{/parent}}' + ); + + $data = array('items' => array(1, 2, 3)); + + $this->assertEquals('<1><2><3>', $tpl->render($data)); + } + + public function testInheritanceWithLazyEvaluationWhitespaceIgnored() + { + $partials = array( + 'parent' => '{{#items}}{{$value}}\n\nignored\n\n{{/value}}{{/items}}', + ); + + $this->mustache->setPartials($partials); + + $tpl = $this->mustache->loadTemplate( + '{{{{/value}}\n\n{{/parent}}' + ); + + $data = array('items' => array(1, 2, 3)); + + $this->assertEquals('<1><2><3>', $tpl->render($data)); + } + + public function testInheritanceWithLazyEvaluationAndSections() + { + $partials = array( + 'parent' => '{{#items}}{{$value}}\n\nignored {{.}} {{#more}} there is more {{/more}}\n\n{{/value}}{{/items}}', + ); + + $this->mustache->setPartials($partials); + + $tpl = $this->mustache->loadTemplate( + '{{{{#more}} there is less {{/more}}{{/value}}\n\n{{/parent}}' + ); + + $data = array('items' => array(1, 2, 3), 'more' => 'stuff'); + + $this->assertEquals('<1> there is less <2> there is less <3> there is less ', $tpl->render($data)); + } + + /** + * @dataProvider getIllegalInheritanceExamples + * @expectedException Mustache_Exception_SyntaxException + * @expectedExceptionMessage Illegal content in < parent tag + */ + public function testIllegalInheritanceExamples($partials, $data, $template) + { + $this->mustache->setPartials($partials); + $tpl = $this->mustache->loadTemplate($template); + $tpl->render($data); + } + + /** + * @dataProvider getLegalInheritanceExamples + */ + public function testLegalInheritanceExamples($partials, $data, $template, $expect) + { + $this->mustache->setPartials($partials); + $tpl = $this->mustache->loadTemplate($template); + $this->assertSame($expect, $tpl->render($data)); + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Functional/MustacheInjectionTest.php b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Functional/MustacheInjectionTest.php new file mode 100644 index 0000000..7a9d6ac --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Functional/MustacheInjectionTest.php @@ -0,0 +1,83 @@ +mustache = new Mustache_Engine(); + } + + /** + * @dataProvider injectionData + */ + public function testInjection($tpl, $data, $partials, $expect) + { + $this->mustache->setPartials($partials); + $this->assertEquals($expect, $this->mustache->render($tpl, $data)); + } + + public function injectionData() + { + $interpolationData = array( + 'a' => '{{ b }}', + 'b' => 'FAIL', + ); + + $sectionData = array( + 'a' => true, + 'b' => '{{ c }}', + 'c' => 'FAIL', + ); + + $lambdaInterpolationData = array( + 'a' => array($this, 'lambdaInterpolationCallback'), + 'b' => '{{ c }}', + 'c' => 'FAIL', + ); + + $lambdaSectionData = array( + 'a' => array($this, 'lambdaSectionCallback'), + 'b' => '{{ c }}', + 'c' => 'FAIL', + ); + + return array( + array('{{ a }}', $interpolationData, array(), '{{ b }}'), + array('{{{ a }}}', $interpolationData, array(), '{{ b }}'), + + array('{{# a }}{{ b }}{{/ a }}', $sectionData, array(), '{{ c }}'), + array('{{# a }}{{{ b }}}{{/ a }}', $sectionData, array(), '{{ c }}'), + + array('{{> partial }}', $interpolationData, array('partial' => '{{ a }}'), '{{ b }}'), + array('{{> partial }}', $interpolationData, array('partial' => '{{{ a }}}'), '{{ b }}'), + + array('{{ a }}', $lambdaInterpolationData, array(), '{{ c }}'), + array('{{# a }}b{{/ a }}', $lambdaSectionData, array(), '{{ c }}'), + ); + } + + public static function lambdaInterpolationCallback() + { + return '{{ b }}'; + } + + public static function lambdaSectionCallback($text) + { + return '{{ ' . $text . ' }}'; + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Functional/MustacheSpecTest.php b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Functional/MustacheSpecTest.php new file mode 100644 index 0000000..6cde602 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Functional/MustacheSpecTest.php @@ -0,0 +1,121 @@ +markTestSkipped('Mustache spec submodule not initialized: run "git submodule update --init"'); + } + } + + /** + * @group comments + * @dataProvider loadCommentSpec + */ + public function testCommentSpec($desc, $source, $partials, $data, $expected) + { + $template = self::loadTemplate($source, $partials); + $this->assertEquals($expected, $template->render($data), $desc); + } + + public function loadCommentSpec() + { + return $this->loadSpec('comments'); + } + + /** + * @group delimiters + * @dataProvider loadDelimitersSpec + */ + public function testDelimitersSpec($desc, $source, $partials, $data, $expected) + { + $template = self::loadTemplate($source, $partials); + $this->assertEquals($expected, $template->render($data), $desc); + } + + public function loadDelimitersSpec() + { + return $this->loadSpec('delimiters'); + } + + /** + * @group interpolation + * @dataProvider loadInterpolationSpec + */ + public function testInterpolationSpec($desc, $source, $partials, $data, $expected) + { + $template = self::loadTemplate($source, $partials); + $this->assertEquals($expected, $template->render($data), $desc); + } + + public function loadInterpolationSpec() + { + return $this->loadSpec('interpolation'); + } + + /** + * @group inverted + * @group inverted-sections + * @dataProvider loadInvertedSpec + */ + public function testInvertedSpec($desc, $source, $partials, $data, $expected) + { + $template = self::loadTemplate($source, $partials); + $this->assertEquals($expected, $template->render($data), $desc); + } + + public function loadInvertedSpec() + { + return $this->loadSpec('inverted'); + } + + /** + * @group partials + * @dataProvider loadPartialsSpec + */ + public function testPartialsSpec($desc, $source, $partials, $data, $expected) + { + $template = self::loadTemplate($source, $partials); + $this->assertEquals($expected, $template->render($data), $desc); + } + + public function loadPartialsSpec() + { + return $this->loadSpec('partials'); + } + + /** + * @group sections + * @dataProvider loadSectionsSpec + */ + public function testSectionsSpec($desc, $source, $partials, $data, $expected) + { + $template = self::loadTemplate($source, $partials); + $this->assertEquals($expected, $template->render($data), $desc); + } + + public function loadSectionsSpec() + { + return $this->loadSpec('sections'); + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Functional/NestedPartialIndentTest.php b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Functional/NestedPartialIndentTest.php new file mode 100644 index 0000000..90af4d9 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Functional/NestedPartialIndentTest.php @@ -0,0 +1,45 @@ + $partials, + )); + $tpl = $m->loadTemplate($src); + $this->assertEquals($expected, $tpl->render()); + } + + public function partialsAndStuff() + { + $partials = array( + 'a' => ' {{> b }}', + 'b' => ' {{> d }}', + 'c' => ' {{> d }}{{> d }}', + 'd' => 'D!', + ); + + return array( + array(' {{> a }}', $partials, ' D!'), + array(' {{> b }}', $partials, ' D!'), + array(' {{> c }}', $partials, ' D!D!'), + ); + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Functional/ObjectSectionTest.php b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Functional/ObjectSectionTest.php new file mode 100644 index 0000000..3cf01e1 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Functional/ObjectSectionTest.php @@ -0,0 +1,110 @@ +mustache = new Mustache_Engine(); + } + + public function testBasicObject() + { + $tpl = $this->mustache->loadTemplate('{{#foo}}{{name}}{{/foo}}'); + $this->assertEquals('Foo', $tpl->render(new Mustache_Test_Functional_Alpha())); + } + + /** + * @group magic_methods + */ + public function testObjectWithGet() + { + $tpl = $this->mustache->loadTemplate('{{#foo}}{{name}}{{/foo}}'); + $this->assertEquals('Foo', $tpl->render(new Mustache_Test_Functional_Beta())); + } + + /** + * @group magic_methods + */ + public function testSectionObjectWithGet() + { + $tpl = $this->mustache->loadTemplate('{{#bar}}{{#foo}}{{name}}{{/foo}}{{/bar}}'); + $this->assertEquals('Foo', $tpl->render(new Mustache_Test_Functional_Gamma())); + } + + public function testSectionObjectWithFunction() + { + $tpl = $this->mustache->loadTemplate('{{#foo}}{{name}}{{/foo}}'); + $alpha = new Mustache_Test_Functional_Alpha(); + $alpha->foo = new Mustache_Test_Functional_Delta(); + $this->assertEquals('Foo', $tpl->render($alpha)); + } +} + +class Mustache_Test_Functional_Alpha +{ + public $foo; + + public function __construct() + { + $this->foo = new StdClass(); + $this->foo->name = 'Foo'; + $this->foo->number = 1; + } +} + +class Mustache_Test_Functional_Beta +{ + protected $_data = array(); + + public function __construct() + { + $this->_data['foo'] = new StdClass(); + $this->_data['foo']->name = 'Foo'; + $this->_data['foo']->number = 1; + } + + public function __isset($name) + { + return array_key_exists($name, $this->_data); + } + + public function __get($name) + { + return $this->_data[$name]; + } +} + +class Mustache_Test_Functional_Gamma +{ + public $bar; + + public function __construct() + { + $this->bar = new Mustache_Test_Functional_Beta(); + } +} + +class Mustache_Test_Functional_Delta +{ + protected $_name = 'Foo'; + + public function name() + { + return $this->_name; + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/Mustache/Test/FunctionalTestCase.php b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/FunctionalTestCase.php new file mode 100644 index 0000000..213b045 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/FunctionalTestCase.php @@ -0,0 +1,47 @@ + $foo, + 'bar' => $bar, + )); + + $this->assertSame($foo, $helpers->get('foo')); + $this->assertSame($bar, $helpers->get('bar')); + } + + public static function getFoo() + { + echo 'foo'; + } + + public function testAccessorsAndMutators() + { + $foo = array($this, 'getFoo'); + $bar = 'BAR'; + + $helpers = new Mustache_HelperCollection(); + $this->assertTrue($helpers->isEmpty()); + $this->assertFalse($helpers->has('foo')); + $this->assertFalse($helpers->has('bar')); + + $helpers->add('foo', $foo); + $this->assertFalse($helpers->isEmpty()); + $this->assertTrue($helpers->has('foo')); + $this->assertFalse($helpers->has('bar')); + + $helpers->add('bar', $bar); + $this->assertFalse($helpers->isEmpty()); + $this->assertTrue($helpers->has('foo')); + $this->assertTrue($helpers->has('bar')); + + $helpers->remove('foo'); + $this->assertFalse($helpers->isEmpty()); + $this->assertFalse($helpers->has('foo')); + $this->assertTrue($helpers->has('bar')); + } + + public function testMagicMethods() + { + $foo = array($this, 'getFoo'); + $bar = 'BAR'; + + $helpers = new Mustache_HelperCollection(); + $this->assertTrue($helpers->isEmpty()); + $this->assertFalse($helpers->has('foo')); + $this->assertFalse($helpers->has('bar')); + $this->assertFalse(isset($helpers->foo)); + $this->assertFalse(isset($helpers->bar)); + + $helpers->foo = $foo; + $this->assertFalse($helpers->isEmpty()); + $this->assertTrue($helpers->has('foo')); + $this->assertFalse($helpers->has('bar')); + $this->assertTrue(isset($helpers->foo)); + $this->assertFalse(isset($helpers->bar)); + + $helpers->bar = $bar; + $this->assertFalse($helpers->isEmpty()); + $this->assertTrue($helpers->has('foo')); + $this->assertTrue($helpers->has('bar')); + $this->assertTrue(isset($helpers->foo)); + $this->assertTrue(isset($helpers->bar)); + + unset($helpers->foo); + $this->assertFalse($helpers->isEmpty()); + $this->assertFalse($helpers->has('foo')); + $this->assertTrue($helpers->has('bar')); + $this->assertFalse(isset($helpers->foo)); + $this->assertTrue(isset($helpers->bar)); + } + + /** + * @dataProvider getInvalidHelperArguments + */ + public function testHelperCollectionIsntAfraidToThrowExceptions($helpers = array(), $actions = array(), $exception = null) + { + if ($exception) { + $this->setExpectedException($exception); + } + + $helpers = new Mustache_HelperCollection($helpers); + + foreach ($actions as $method => $args) { + call_user_func_array(array($helpers, $method), $args); + } + } + + public function getInvalidHelperArguments() + { + return array( + array( + 'not helpers', + array(), + 'InvalidArgumentException', + ), + array( + array(), + array('get' => array('foo')), + 'InvalidArgumentException', + ), + array( + array('foo' => 'FOO'), + array('get' => array('foo')), + null, + ), + array( + array('foo' => 'FOO'), + array('get' => array('bar')), + 'InvalidArgumentException', + ), + array( + array('foo' => 'FOO'), + array( + 'add' => array('bar', 'BAR'), + 'get' => array('bar'), + ), + null, + ), + array( + array('foo' => 'FOO'), + array( + 'get' => array('foo'), + 'remove' => array('foo'), + ), + null, + ), + array( + array('foo' => 'FOO'), + array( + 'remove' => array('foo'), + 'get' => array('foo'), + ), + 'InvalidArgumentException', + ), + array( + array(), + array('remove' => array('foo')), + 'InvalidArgumentException', + ), + ); + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Loader/ArrayLoaderTest.php b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Loader/ArrayLoaderTest.php new file mode 100644 index 0000000..1f30987 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Loader/ArrayLoaderTest.php @@ -0,0 +1,52 @@ + 'bar', + )); + + $this->assertEquals('bar', $loader->load('foo')); + } + + public function testSetAndLoadTemplates() + { + $loader = new Mustache_Loader_ArrayLoader(array( + 'foo' => 'bar', + )); + $this->assertEquals('bar', $loader->load('foo')); + + $loader->setTemplate('baz', 'qux'); + $this->assertEquals('qux', $loader->load('baz')); + + $loader->setTemplates(array( + 'foo' => 'FOO', + 'baz' => 'BAZ', + )); + $this->assertEquals('FOO', $loader->load('foo')); + $this->assertEquals('BAZ', $loader->load('baz')); + } + + /** + * @expectedException Mustache_Exception_UnknownTemplateException + */ + public function testMissingTemplatesThrowExceptions() + { + $loader = new Mustache_Loader_ArrayLoader(); + $loader->load('not_a_real_template'); + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Loader/CascadingLoaderTest.php b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Loader/CascadingLoaderTest.php new file mode 100644 index 0000000..ecf80d6 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Loader/CascadingLoaderTest.php @@ -0,0 +1,40 @@ + '{{ foo }}')), + new Mustache_Loader_ArrayLoader(array('bar' => '{{#bar}}BAR{{/bar}}')), + )); + + $this->assertEquals('{{ foo }}', $loader->load('foo')); + $this->assertEquals('{{#bar}}BAR{{/bar}}', $loader->load('bar')); + } + + /** + * @expectedException Mustache_Exception_UnknownTemplateException + */ + public function testMissingTemplatesThrowExceptions() + { + $loader = new Mustache_Loader_CascadingLoader(array( + new Mustache_Loader_ArrayLoader(array('foo' => '{{ foo }}')), + new Mustache_Loader_ArrayLoader(array('bar' => '{{#bar}}BAR{{/bar}}')), + )); + + $loader->load('not_a_real_template'); + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Loader/FilesystemLoaderTest.php b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Loader/FilesystemLoaderTest.php new file mode 100644 index 0000000..8c06e76 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Loader/FilesystemLoaderTest.php @@ -0,0 +1,80 @@ + '.ms')); + $this->assertEquals('alpha contents', $loader->load('alpha')); + $this->assertEquals('beta contents', $loader->load('beta.ms')); + } + + public function testTrailingSlashes() + { + $baseDir = dirname(__FILE__) . '/../../../fixtures/templates/'; + $loader = new Mustache_Loader_FilesystemLoader($baseDir); + $this->assertEquals('one contents', $loader->load('one')); + } + + public function testConstructorWithProtocol() + { + $baseDir = realpath(dirname(__FILE__) . '/../../../fixtures/templates'); + + $loader = new Mustache_Loader_FilesystemLoader('test://' . $baseDir, array('extension' => '.ms')); + $this->assertEquals('alpha contents', $loader->load('alpha')); + $this->assertEquals('beta contents', $loader->load('beta.ms')); + } + + public function testLoadTemplates() + { + $baseDir = realpath(dirname(__FILE__) . '/../../../fixtures/templates'); + $loader = new Mustache_Loader_FilesystemLoader($baseDir); + $this->assertEquals('one contents', $loader->load('one')); + $this->assertEquals('two contents', $loader->load('two.mustache')); + } + + public function testEmptyExtensionString() + { + $baseDir = realpath(dirname(__FILE__) . '/../../../fixtures/templates'); + + $loader = new Mustache_Loader_FilesystemLoader($baseDir, array('extension' => '')); + $this->assertEquals('one contents', $loader->load('one.mustache')); + $this->assertEquals('alpha contents', $loader->load('alpha.ms')); + + $loader = new Mustache_Loader_FilesystemLoader($baseDir, array('extension' => null)); + $this->assertEquals('two contents', $loader->load('two.mustache')); + $this->assertEquals('beta contents', $loader->load('beta.ms')); + } + + /** + * @expectedException Mustache_Exception_RuntimeException + */ + public function testMissingBaseDirThrowsException() + { + new Mustache_Loader_FilesystemLoader(dirname(__FILE__) . '/not_a_directory'); + } + + /** + * @expectedException Mustache_Exception_UnknownTemplateException + */ + public function testMissingTemplateThrowsException() + { + $baseDir = realpath(dirname(__FILE__) . '/../../../fixtures/templates'); + $loader = new Mustache_Loader_FilesystemLoader($baseDir); + + $loader->load('fake'); + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Loader/InlineLoaderTest.php b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Loader/InlineLoaderTest.php new file mode 100644 index 0000000..24f2e0b --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Loader/InlineLoaderTest.php @@ -0,0 +1,56 @@ +assertEquals('{{ foo }}', $loader->load('foo')); + $this->assertEquals('{{#bar}}BAR{{/bar}}', $loader->load('bar')); + } + + /** + * @expectedException Mustache_Exception_UnknownTemplateException + */ + public function testMissingTemplatesThrowExceptions() + { + $loader = new Mustache_Loader_InlineLoader(__FILE__, __COMPILER_HALT_OFFSET__); + $loader->load('not_a_real_template'); + } + + /** + * @expectedException Mustache_Exception_InvalidArgumentException + */ + public function testInvalidOffsetThrowsException() + { + new Mustache_Loader_InlineLoader(__FILE__, 'notanumber'); + } + + /** + * @expectedException Mustache_Exception_InvalidArgumentException + */ + public function testInvalidFileThrowsException() + { + new Mustache_Loader_InlineLoader('notarealfile', __COMPILER_HALT_OFFSET__); + } +} + +__halt_compiler(); + +@@ foo +{{ foo }} + +@@ bar +{{#bar}}BAR{{/bar}} diff --git a/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Loader/ProductionFilesystemLoaderTest.php b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Loader/ProductionFilesystemLoaderTest.php new file mode 100644 index 0000000..0c7c7e3 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Loader/ProductionFilesystemLoaderTest.php @@ -0,0 +1,103 @@ + '.ms')); + $this->assertInstanceOf('Mustache_Source', $loader->load('alpha')); + $this->assertEquals('alpha contents', $loader->load('alpha')->getSource()); + $this->assertInstanceOf('Mustache_Source', $loader->load('beta.ms')); + $this->assertEquals('beta contents', $loader->load('beta.ms')->getSource()); + } + + public function testTrailingSlashes() + { + $baseDir = dirname(__FILE__) . '/../../../fixtures/templates/'; + $loader = new Mustache_Loader_ProductionFilesystemLoader($baseDir); + $this->assertEquals('one contents', $loader->load('one')->getSource()); + } + + public function testConstructorWithProtocol() + { + $baseDir = realpath(dirname(__FILE__) . '/../../../fixtures/templates'); + + $loader = new Mustache_Loader_ProductionFilesystemLoader('file://' . $baseDir, array('extension' => '.ms')); + $this->assertEquals('alpha contents', $loader->load('alpha')->getSource()); + $this->assertEquals('beta contents', $loader->load('beta.ms')->getSource()); + } + + public function testLoadTemplates() + { + $baseDir = realpath(dirname(__FILE__) . '/../../../fixtures/templates'); + $loader = new Mustache_Loader_ProductionFilesystemLoader($baseDir); + $this->assertEquals('one contents', $loader->load('one')->getSource()); + $this->assertEquals('two contents', $loader->load('two.mustache')->getSource()); + } + + public function testEmptyExtensionString() + { + $baseDir = realpath(dirname(__FILE__) . '/../../../fixtures/templates'); + + $loader = new Mustache_Loader_ProductionFilesystemLoader($baseDir, array('extension' => '')); + $this->assertEquals('one contents', $loader->load('one.mustache')->getSource()); + $this->assertEquals('alpha contents', $loader->load('alpha.ms')->getSource()); + + $loader = new Mustache_Loader_ProductionFilesystemLoader($baseDir, array('extension' => null)); + $this->assertEquals('two contents', $loader->load('two.mustache')->getSource()); + $this->assertEquals('beta contents', $loader->load('beta.ms')->getSource()); + } + + /** + * @expectedException Mustache_Exception_RuntimeException + */ + public function testMissingBaseDirThrowsException() + { + new Mustache_Loader_ProductionFilesystemLoader(dirname(__FILE__) . '/not_a_directory'); + } + + /** + * @expectedException Mustache_Exception_UnknownTemplateException + */ + public function testMissingTemplateThrowsException() + { + $baseDir = realpath(dirname(__FILE__) . '/../../../fixtures/templates'); + $loader = new Mustache_Loader_ProductionFilesystemLoader($baseDir); + + $loader->load('fake'); + } + + public function testLoadWithDifferentStatProps() + { + $baseDir = realpath(dirname(__FILE__) . '/../../../fixtures/templates'); + $noStatLoader = new Mustache_Loader_ProductionFilesystemLoader($baseDir, array('stat_props' => null)); + $mtimeLoader = new Mustache_Loader_ProductionFilesystemLoader($baseDir, array('stat_props' => array('mtime'))); + $sizeLoader = new Mustache_Loader_ProductionFilesystemLoader($baseDir, array('stat_props' => array('size'))); + $bothLoader = new Mustache_Loader_ProductionFilesystemLoader($baseDir, array('stat_props' => array('mtime', 'size'))); + + $noStatKey = $noStatLoader->load('one.mustache')->getKey(); + $mtimeKey = $mtimeLoader->load('one.mustache')->getKey(); + $sizeKey = $sizeLoader->load('one.mustache')->getKey(); + $bothKey = $bothLoader->load('one.mustache')->getKey(); + + $this->assertNotEquals($noStatKey, $mtimeKey); + $this->assertNotEquals($noStatKey, $sizeKey); + $this->assertNotEquals($noStatKey, $bothKey); + $this->assertNotEquals($mtimeKey, $sizeKey); + $this->assertNotEquals($mtimeKey, $bothKey); + $this->assertNotEquals($sizeKey, $bothKey); + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Loader/StringLoaderTest.php b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Loader/StringLoaderTest.php new file mode 100644 index 0000000..5896f00 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Loader/StringLoaderTest.php @@ -0,0 +1,25 @@ +assertEquals('foo', $loader->load('foo')); + $this->assertEquals('{{ bar }}', $loader->load('{{ bar }}')); + $this->assertEquals("\n{{! comment }}\n", $loader->load("\n{{! comment }}\n")); + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Logger/AbstractLoggerTest.php b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Logger/AbstractLoggerTest.php new file mode 100644 index 0000000..19dc27c --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Logger/AbstractLoggerTest.php @@ -0,0 +1,60 @@ +emergency('emergency message'); + $logger->alert('alert message'); + $logger->critical('critical message'); + $logger->error('error message'); + $logger->warning('warning message'); + $logger->notice('notice message'); + $logger->info('info message'); + $logger->debug('debug message'); + + $expected = array( + array(Mustache_Logger::EMERGENCY, 'emergency message', array()), + array(Mustache_Logger::ALERT, 'alert message', array()), + array(Mustache_Logger::CRITICAL, 'critical message', array()), + array(Mustache_Logger::ERROR, 'error message', array()), + array(Mustache_Logger::WARNING, 'warning message', array()), + array(Mustache_Logger::NOTICE, 'notice message', array()), + array(Mustache_Logger::INFO, 'info message', array()), + array(Mustache_Logger::DEBUG, 'debug message', array()), + ); + + $this->assertEquals($expected, $logger->log); + } +} + +class Mustache_Test_Logger_TestLogger extends Mustache_Logger_AbstractLogger +{ + public $log = array(); + + /** + * Logs with an arbitrary level. + * + * @param mixed $level + * @param string $message + * @param array $context + */ + public function log($level, $message, array $context = array()) + { + $this->log[] = array($level, $message, $context); + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Logger/StreamLoggerTest.php b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Logger/StreamLoggerTest.php new file mode 100644 index 0000000..fc1a06f --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Logger/StreamLoggerTest.php @@ -0,0 +1,209 @@ +log(Mustache_Logger::CRITICAL, 'message'); + + $this->assertEquals("CRITICAL: message\n", file_get_contents($name)); + } + + public function acceptsStreamData() + { + $one = tempnam(sys_get_temp_dir(), 'mustache-test'); + $two = tempnam(sys_get_temp_dir(), 'mustache-test'); + + return array( + array($one, $one), + array($two, fopen($two, 'a')), + ); + } + + /** + * @expectedException Mustache_Exception_LogicException + */ + public function testPrematurelyClosedStreamThrowsException() + { + $stream = tmpfile(); + $logger = new Mustache_Logger_StreamLogger($stream); + fclose($stream); + + $logger->log(Mustache_Logger::CRITICAL, 'message'); + } + + /** + * @dataProvider getLevels + */ + public function testLoggingThresholds($logLevel, $level, $shouldLog) + { + $stream = tmpfile(); + $logger = new Mustache_Logger_StreamLogger($stream, $logLevel); + $logger->log($level, 'logged'); + + rewind($stream); + $result = fread($stream, 1024); + + if ($shouldLog) { + $this->assertContains('logged', $result); + } else { + $this->assertEmpty($result); + } + } + + public function getLevels() + { + // $logLevel, $level, $shouldLog + return array( + // identities + array(Mustache_Logger::EMERGENCY, Mustache_Logger::EMERGENCY, true), + array(Mustache_Logger::ALERT, Mustache_Logger::ALERT, true), + array(Mustache_Logger::CRITICAL, Mustache_Logger::CRITICAL, true), + array(Mustache_Logger::ERROR, Mustache_Logger::ERROR, true), + array(Mustache_Logger::WARNING, Mustache_Logger::WARNING, true), + array(Mustache_Logger::NOTICE, Mustache_Logger::NOTICE, true), + array(Mustache_Logger::INFO, Mustache_Logger::INFO, true), + array(Mustache_Logger::DEBUG, Mustache_Logger::DEBUG, true), + + // one above + array(Mustache_Logger::ALERT, Mustache_Logger::EMERGENCY, true), + array(Mustache_Logger::CRITICAL, Mustache_Logger::ALERT, true), + array(Mustache_Logger::ERROR, Mustache_Logger::CRITICAL, true), + array(Mustache_Logger::WARNING, Mustache_Logger::ERROR, true), + array(Mustache_Logger::NOTICE, Mustache_Logger::WARNING, true), + array(Mustache_Logger::INFO, Mustache_Logger::NOTICE, true), + array(Mustache_Logger::DEBUG, Mustache_Logger::INFO, true), + + // one below + array(Mustache_Logger::EMERGENCY, Mustache_Logger::ALERT, false), + array(Mustache_Logger::ALERT, Mustache_Logger::CRITICAL, false), + array(Mustache_Logger::CRITICAL, Mustache_Logger::ERROR, false), + array(Mustache_Logger::ERROR, Mustache_Logger::WARNING, false), + array(Mustache_Logger::WARNING, Mustache_Logger::NOTICE, false), + array(Mustache_Logger::NOTICE, Mustache_Logger::INFO, false), + array(Mustache_Logger::INFO, Mustache_Logger::DEBUG, false), + ); + } + + /** + * @dataProvider getLogMessages + */ + public function testLogging($level, $message, $context, $expected) + { + $stream = tmpfile(); + $logger = new Mustache_Logger_StreamLogger($stream, Mustache_Logger::DEBUG); + $logger->log($level, $message, $context); + + rewind($stream); + $result = fread($stream, 1024); + + $this->assertEquals($expected, $result); + } + + public function getLogMessages() + { + // $level, $message, $context, $expected + return array( + array(Mustache_Logger::DEBUG, 'debug message', array(), "DEBUG: debug message\n"), + array(Mustache_Logger::INFO, 'info message', array(), "INFO: info message\n"), + array(Mustache_Logger::NOTICE, 'notice message', array(), "NOTICE: notice message\n"), + array(Mustache_Logger::WARNING, 'warning message', array(), "WARNING: warning message\n"), + array(Mustache_Logger::ERROR, 'error message', array(), "ERROR: error message\n"), + array(Mustache_Logger::CRITICAL, 'critical message', array(), "CRITICAL: critical message\n"), + array(Mustache_Logger::ALERT, 'alert message', array(), "ALERT: alert message\n"), + array(Mustache_Logger::EMERGENCY, 'emergency message', array(), "EMERGENCY: emergency message\n"), + + // with context + array( + Mustache_Logger::ERROR, + 'error message', + array('name' => 'foo', 'number' => 42), + "ERROR: error message\n", + ), + + // with interpolation + array( + Mustache_Logger::ERROR, + 'error {name}-{number}', + array('name' => 'foo', 'number' => 42), + "ERROR: error foo-42\n", + ), + + // with iterpolation false positive + array( + Mustache_Logger::ERROR, + 'error {nothing}', + array('name' => 'foo', 'number' => 42), + "ERROR: error {nothing}\n", + ), + + // with interpolation injection + array( + Mustache_Logger::ERROR, + '{foo}', + array('foo' => '{bar}', 'bar' => 'FAIL'), + "ERROR: {bar}\n", + ), + ); + } + + public function testChangeLoggingLevels() + { + $stream = tmpfile(); + $logger = new Mustache_Logger_StreamLogger($stream); + + $logger->setLevel(Mustache_Logger::ERROR); + $this->assertEquals(Mustache_Logger::ERROR, $logger->getLevel()); + + $logger->log(Mustache_Logger::WARNING, 'ignore this'); + + $logger->setLevel(Mustache_Logger::INFO); + $this->assertEquals(Mustache_Logger::INFO, $logger->getLevel()); + + $logger->log(Mustache_Logger::WARNING, 'log this'); + + $logger->setLevel(Mustache_Logger::CRITICAL); + $this->assertEquals(Mustache_Logger::CRITICAL, $logger->getLevel()); + + $logger->log(Mustache_Logger::ERROR, 'ignore this'); + + rewind($stream); + $result = fread($stream, 1024); + + $this->assertEquals("WARNING: log this\n", $result); + } + + /** + * @expectedException Mustache_Exception_InvalidArgumentException + */ + public function testThrowsInvalidArgumentExceptionWhenSettingUnknownLevels() + { + $logger = new Mustache_Logger_StreamLogger(tmpfile()); + $logger->setLevel('bacon'); + } + + /** + * @expectedException Mustache_Exception_InvalidArgumentException + */ + public function testThrowsInvalidArgumentExceptionWhenLoggingUnknownLevels() + { + $logger = new Mustache_Logger_StreamLogger(tmpfile()); + $logger->log('bacon', 'CODE BACON ERROR!'); + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/Mustache/Test/ParserTest.php b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/ParserTest.php new file mode 100644 index 0000000..d8458f7 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/ParserTest.php @@ -0,0 +1,425 @@ +assertEquals($expected, $parser->parse($tokens)); + } + + public function getTokenSets() + { + return array( + array( + array(), + array(), + ), + + array( + array(array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_TEXT, + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::VALUE => 'text', + )), + array(array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_TEXT, + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::VALUE => 'text', + )), + ), + + array( + array(array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_ESCAPED, + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::NAME => 'name', + )), + array(array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_ESCAPED, + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::NAME => 'name', + )), + ), + + array( + array( + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_TEXT, + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::VALUE => 'foo', + ), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_INVERTED, + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::INDEX => 123, + Mustache_Tokenizer::NAME => 'parent', + ), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_ESCAPED, + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::NAME => 'name', + ), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_END_SECTION, + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::INDEX => 456, + Mustache_Tokenizer::NAME => 'parent', + ), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_TEXT, + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::VALUE => 'bar', + ), + ), + + array( + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_TEXT, + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::VALUE => 'foo', + ), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_INVERTED, + Mustache_Tokenizer::NAME => 'parent', + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::INDEX => 123, + Mustache_Tokenizer::END => 456, + Mustache_Tokenizer::NODES => array( + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_ESCAPED, + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::NAME => 'name', + ), + ), + ), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_TEXT, + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::VALUE => 'bar', + ), + ), + ), + + // This *would* be an invalid inheritance parse tree, but that pragma + // isn't enabled so it'll thunk it back into an "escaped" token: + array( + array( + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_BLOCK_VAR, + Mustache_Tokenizer::NAME => 'foo', + Mustache_Tokenizer::OTAG => '{{', + Mustache_Tokenizer::CTAG => '}}', + Mustache_Tokenizer::LINE => 0, + ), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_TEXT, + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::VALUE => 'bar', + ), + ), + array( + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_ESCAPED, + Mustache_Tokenizer::NAME => '$foo', + Mustache_Tokenizer::OTAG => '{{', + Mustache_Tokenizer::CTAG => '}}', + Mustache_Tokenizer::LINE => 0, + ), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_TEXT, + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::VALUE => 'bar', + ), + ), + ), + + array( + array( + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_TEXT, + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::VALUE => ' ', + ), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_DELIM_CHANGE, + Mustache_Tokenizer::LINE => 0, + ), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_TEXT, + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::VALUE => " \n", + ), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_ESCAPED, + Mustache_Tokenizer::NAME => 'foo', + Mustache_Tokenizer::OTAG => '[[', + Mustache_Tokenizer::CTAG => ']]', + Mustache_Tokenizer::LINE => 1, + ), + ), + array( + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_ESCAPED, + Mustache_Tokenizer::NAME => 'foo', + Mustache_Tokenizer::OTAG => '[[', + Mustache_Tokenizer::CTAG => ']]', + Mustache_Tokenizer::LINE => 1, + ), + ), + ), + + ); + } + + /** + * @dataProvider getInheritanceTokenSets + */ + public function testParseWithInheritance($tokens, $expected) + { + $parser = new Mustache_Parser(); + $parser->setPragmas(array(Mustache_Engine::PRAGMA_BLOCKS)); + $this->assertEquals($expected, $parser->parse($tokens)); + } + + public function getInheritanceTokenSets() + { + return array( + array( + array( + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_PARENT, + Mustache_Tokenizer::NAME => 'foo', + Mustache_Tokenizer::OTAG => '{{', + Mustache_Tokenizer::CTAG => '}}', + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::INDEX => 8, + ), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_BLOCK_VAR, + Mustache_Tokenizer::NAME => 'bar', + Mustache_Tokenizer::OTAG => '{{', + Mustache_Tokenizer::CTAG => '}}', + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::INDEX => 16, + ), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_TEXT, + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::VALUE => 'baz', + ), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_END_SECTION, + Mustache_Tokenizer::NAME => 'bar', + Mustache_Tokenizer::OTAG => '{{', + Mustache_Tokenizer::CTAG => '}}', + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::INDEX => 19, + ), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_END_SECTION, + Mustache_Tokenizer::NAME => 'foo', + Mustache_Tokenizer::OTAG => '{{', + Mustache_Tokenizer::CTAG => '}}', + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::INDEX => 27, + ), + ), + array( + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_PARENT, + Mustache_Tokenizer::NAME => 'foo', + Mustache_Tokenizer::OTAG => '{{', + Mustache_Tokenizer::CTAG => '}}', + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::INDEX => 8, + Mustache_Tokenizer::END => 27, + Mustache_Tokenizer::NODES => array( + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_BLOCK_ARG, + Mustache_Tokenizer::NAME => 'bar', + Mustache_Tokenizer::OTAG => '{{', + Mustache_Tokenizer::CTAG => '}}', + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::INDEX => 16, + Mustache_Tokenizer::END => 19, + Mustache_Tokenizer::NODES => array( + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_TEXT, + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::VALUE => 'baz', + ), + ), + ), + ), + ), + ), + ), + + array( + array( + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_BLOCK_VAR, + Mustache_Tokenizer::NAME => 'foo', + Mustache_Tokenizer::OTAG => '{{', + Mustache_Tokenizer::CTAG => '}}', + Mustache_Tokenizer::LINE => 0, + ), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_TEXT, + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::VALUE => 'bar', + ), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_END_SECTION, + Mustache_Tokenizer::NAME => 'foo', + Mustache_Tokenizer::OTAG => '{{', + Mustache_Tokenizer::CTAG => '}}', + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::INDEX => 11, + ), + ), + array( + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_BLOCK_VAR, + Mustache_Tokenizer::NAME => 'foo', + Mustache_Tokenizer::OTAG => '{{', + Mustache_Tokenizer::CTAG => '}}', + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::END => 11, + Mustache_Tokenizer::NODES => array( + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_TEXT, + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::VALUE => 'bar', + ), + ), + ), + ), + ), + ); + } + + /** + * @dataProvider getBadParseTrees + * @expectedException Mustache_Exception_SyntaxException + */ + public function testParserThrowsExceptions($tokens) + { + $parser = new Mustache_Parser(); + $parser->parse($tokens); + } + + public function getBadParseTrees() + { + return array( + // no close + array( + array( + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_SECTION, + Mustache_Tokenizer::NAME => 'parent', + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::INDEX => 123, + ), + ), + ), + + // no close inverted + array( + array( + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_INVERTED, + Mustache_Tokenizer::NAME => 'parent', + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::INDEX => 123, + ), + ), + ), + + // no opening inverted + array( + array( + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_END_SECTION, + Mustache_Tokenizer::NAME => 'parent', + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::INDEX => 123, + ), + ), + ), + + // weird nesting + array( + array( + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_SECTION, + Mustache_Tokenizer::NAME => 'parent', + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::INDEX => 123, + ), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_SECTION, + Mustache_Tokenizer::NAME => 'child', + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::INDEX => 123, + ), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_END_SECTION, + Mustache_Tokenizer::NAME => 'parent', + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::INDEX => 123, + ), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_END_SECTION, + Mustache_Tokenizer::NAME => 'child', + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::INDEX => 123, + ), + ), + ), + + // This *would* be a valid inheritance parse tree, but that pragma + // isn't enabled here so it's going to fail :) + array( + array( + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_BLOCK_VAR, + Mustache_Tokenizer::NAME => 'foo', + Mustache_Tokenizer::OTAG => '{{', + Mustache_Tokenizer::CTAG => '}}', + Mustache_Tokenizer::LINE => 0, + ), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_TEXT, + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::VALUE => 'bar', + ), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_END_SECTION, + Mustache_Tokenizer::NAME => 'foo', + Mustache_Tokenizer::OTAG => '{{', + Mustache_Tokenizer::CTAG => '}}', + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::INDEX => 11, + ), + ), + ), + ); + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Source/FilesystemSourceTest.php b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Source/FilesystemSourceTest.php new file mode 100644 index 0000000..a636ffe --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/Source/FilesystemSourceTest.php @@ -0,0 +1,25 @@ +getKey(); + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/Mustache/Test/SpecTestCase.php b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/SpecTestCase.php new file mode 100644 index 0000000..db188de --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/SpecTestCase.php @@ -0,0 +1,67 @@ +setPartials($partials); + + return self::$mustache->loadTemplate($source); + } + + /** + * Data provider for the mustache spec test. + * + * Loads YAML files from the spec and converts them to PHPisms. + * + * @param string $name + * + * @return array + */ + protected function loadSpec($name) + { + $filename = dirname(__FILE__) . '/../../../vendor/spec/specs/' . $name . '.yml'; + if (!file_exists($filename)) { + return array(); + } + + $data = array(); + $yaml = new sfYamlParser(); + $file = file_get_contents($filename); + + // @hack: pre-process the 'lambdas' spec so the Symfony YAML parser doesn't complain. + if ($name === '~lambdas') { + $file = str_replace(" !code\n", "\n", $file); + } + + $spec = $yaml->parse($file); + + foreach ($spec['tests'] as $test) { + $data[] = array( + $test['name'] . ': ' . $test['desc'], + $test['template'], + isset($test['partials']) ? $test['partials'] : array(), + $test['data'], + $test['expected'], + ); + } + + return $data; + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/Mustache/Test/TemplateTest.php b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/TemplateTest.php new file mode 100644 index 0000000..60065aa --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/TemplateTest.php @@ -0,0 +1,55 @@ +assertSame($mustache, $template->getMustache()); + } + + public function testRendering() + { + $rendered = '<< wheee >>'; + $mustache = new Mustache_Engine(); + $template = new Mustache_Test_TemplateStub($mustache); + $template->rendered = $rendered; + $context = new Mustache_Context(); + + if (version_compare(PHP_VERSION, '5.3.0', '>=')) { + $this->assertEquals($rendered, $template()); + } + + $this->assertEquals($rendered, $template->render()); + $this->assertEquals($rendered, $template->renderInternal($context)); + $this->assertEquals($rendered, $template->render(array('foo' => 'bar'))); + } +} + +class Mustache_Test_TemplateStub extends Mustache_Template +{ + public $rendered; + + public function getMustache() + { + return $this->mustache; + } + + public function renderInternal(Mustache_Context $context, $indent = '', $escape = false) + { + return $this->rendered; + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/Mustache/Test/TokenizerTest.php b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/TokenizerTest.php new file mode 100644 index 0000000..38f16dc --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/Mustache/Test/TokenizerTest.php @@ -0,0 +1,306 @@ +assertSame($expected, $tokenizer->scan($text, $delimiters)); + } + + /** + * @expectedException Mustache_Exception_SyntaxException + */ + public function testUnevenBracesThrowExceptions() + { + $tokenizer = new Mustache_Tokenizer(); + + $text = '{{{ name }}'; + $tokenizer->scan($text, null); + } + + /** + * @expectedException Mustache_Exception_SyntaxException + */ + public function testUnevenBracesWithCustomDelimiterThrowExceptions() + { + $tokenizer = new Mustache_Tokenizer(); + + $text = '<%{ name %>'; + $tokenizer->scan($text, '<% %>'); + } + + public function getTokens() + { + return array( + array( + 'text', + null, + array( + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_TEXT, + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::VALUE => 'text', + ), + ), + ), + + array( + 'text', + '<<< >>>', + array( + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_TEXT, + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::VALUE => 'text', + ), + ), + ), + + array( + '{{ name }}', + null, + array( + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_ESCAPED, + Mustache_Tokenizer::NAME => 'name', + Mustache_Tokenizer::OTAG => '{{', + Mustache_Tokenizer::CTAG => '}}', + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::INDEX => 10, + ), + ), + ), + + array( + '{{ name }}', + '<<< >>>', + array( + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_TEXT, + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::VALUE => '{{ name }}', + ), + ), + ), + + array( + '<<< name >>>', + '<<< >>>', + array( + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_ESCAPED, + Mustache_Tokenizer::NAME => 'name', + Mustache_Tokenizer::OTAG => '<<<', + Mustache_Tokenizer::CTAG => '>>>', + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::INDEX => 12, + ), + ), + ), + + array( + "{{{ a }}}\n{{# b }} \n{{= | | =}}| c ||/ b |\n|{ d }|", + null, + array( + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_UNESCAPED, + Mustache_Tokenizer::NAME => 'a', + Mustache_Tokenizer::OTAG => '{{', + Mustache_Tokenizer::CTAG => '}}', + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::INDEX => 8, + ), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_TEXT, + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::VALUE => "\n", + ), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_SECTION, + Mustache_Tokenizer::NAME => 'b', + Mustache_Tokenizer::OTAG => '{{', + Mustache_Tokenizer::CTAG => '}}', + Mustache_Tokenizer::LINE => 1, + Mustache_Tokenizer::INDEX => 18, + ), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_TEXT, + Mustache_Tokenizer::LINE => 1, + Mustache_Tokenizer::VALUE => " \n", + ), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_DELIM_CHANGE, + Mustache_Tokenizer::LINE => 2, + ), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_ESCAPED, + Mustache_Tokenizer::NAME => 'c', + Mustache_Tokenizer::OTAG => '|', + Mustache_Tokenizer::CTAG => '|', + Mustache_Tokenizer::LINE => 2, + Mustache_Tokenizer::INDEX => 37, + ), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_END_SECTION, + Mustache_Tokenizer::NAME => 'b', + Mustache_Tokenizer::OTAG => '|', + Mustache_Tokenizer::CTAG => '|', + Mustache_Tokenizer::LINE => 2, + Mustache_Tokenizer::INDEX => 37, + ), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_TEXT, + Mustache_Tokenizer::LINE => 2, + Mustache_Tokenizer::VALUE => "\n", + ), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_UNESCAPED, + Mustache_Tokenizer::NAME => 'd', + Mustache_Tokenizer::OTAG => '|', + Mustache_Tokenizer::CTAG => '|', + Mustache_Tokenizer::LINE => 3, + Mustache_Tokenizer::INDEX => 51, + ), + + ), + ), + + // See https://github.com/bobthecow/mustache.php/issues/183 + array( + '{{# a }}0{{/ a }}', + null, + array( + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_SECTION, + Mustache_Tokenizer::NAME => 'a', + Mustache_Tokenizer::OTAG => '{{', + Mustache_Tokenizer::CTAG => '}}', + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::INDEX => 8, + ), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_TEXT, + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::VALUE => '0', + ), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_END_SECTION, + Mustache_Tokenizer::NAME => 'a', + Mustache_Tokenizer::OTAG => '{{', + Mustache_Tokenizer::CTAG => '}}', + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::INDEX => 9, + ), + ), + ), + + // custom delimiters don't swallow the next character, even if it is a }, }}}, or the same delimiter + array( + '<% a %>} <% b %>%> <% c %>}}}', + '<% %>', + array( + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_ESCAPED, + Mustache_Tokenizer::NAME => 'a', + Mustache_Tokenizer::OTAG => '<%', + Mustache_Tokenizer::CTAG => '%>', + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::INDEX => 7, + ), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_TEXT, + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::VALUE => '} ', + ), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_ESCAPED, + Mustache_Tokenizer::NAME => 'b', + Mustache_Tokenizer::OTAG => '<%', + Mustache_Tokenizer::CTAG => '%>', + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::INDEX => 16, + ), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_TEXT, + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::VALUE => '%> ', + ), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_ESCAPED, + Mustache_Tokenizer::NAME => 'c', + Mustache_Tokenizer::OTAG => '<%', + Mustache_Tokenizer::CTAG => '%>', + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::INDEX => 26, + ), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_TEXT, + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::VALUE => '}}}', + ), + ), + ), + + // unescaped custom delimiters are properly parsed + array( + '<%{ a }%>', + '<% %>', + array( + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_UNESCAPED, + Mustache_Tokenizer::NAME => 'a', + Mustache_Tokenizer::OTAG => '<%', + Mustache_Tokenizer::CTAG => '%>', + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::INDEX => 9, + ), + ), + ), + + // Ensure that $arg token is not picked up during tokenization + array( + '{{$arg}}default{{/arg}}', + null, + array( + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_BLOCK_VAR, + Mustache_Tokenizer::NAME => 'arg', + Mustache_Tokenizer::OTAG => '{{', + Mustache_Tokenizer::CTAG => '}}', + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::INDEX => 8, + ), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_TEXT, + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::VALUE => 'default', + ), + array( + Mustache_Tokenizer::TYPE => Mustache_Tokenizer::T_END_SECTION, + Mustache_Tokenizer::NAME => 'arg', + Mustache_Tokenizer::OTAG => '{{', + Mustache_Tokenizer::CTAG => '}}', + Mustache_Tokenizer::LINE => 0, + Mustache_Tokenizer::INDEX => 15, + ), + ), + ), + ); + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/bootstrap.php b/admin/lib/vendor/mustache/mustache/test/bootstrap.php new file mode 100644 index 0000000..b3d0a19 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/bootstrap.php @@ -0,0 +1,91 @@ +filehandle = fopen($path, $mode); + + return $this->filehandle !== false; + } + + /** + * @return array + */ + public function stream_stat() + { + return array(); + } + + /** + * @param int $count + * + * @return string + */ + public function stream_read($count) + { + return fgets($this->filehandle, $count); + } + + /** + * @return bool + */ + public function stream_eof() + { + return feof($this->filehandle); + } + + /** + * @return bool + */ + public function stream_close() + { + return fclose($this->filehandle); + } +} + +if (!stream_wrapper_register('test', 'TestStream')) { + die('Failed to register protocol'); +} diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/autoloader/Mustache/Bar.php b/admin/lib/vendor/mustache/mustache/test/fixtures/autoloader/Mustache/Bar.php new file mode 100644 index 0000000..35c2668 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/autoloader/Mustache/Bar.php @@ -0,0 +1,15 @@ + 'Punk', + 'subgenres' => array( + array( + 'name' => 'Hardcore', + 'subgenres' => array( + array( + 'name' => 'First wave of black metal', + 'subgenres' => array( + array('name' => 'Norwegian black metal'), + array( + 'name' => 'Death metal', + 'subgenres' => array( + array( + 'name' => 'Swedish death metal', + 'subgenres' => array( + array('name' => 'New wave of American metal'), + ), + ), + ), + ), + ), + ), + array( + 'name' => 'Thrash metal', + 'subgenres' => array( + array('name' => 'Grindcore'), + array( + 'name' => 'Metalcore', + 'subgenres' => array( + array('name' => 'Nu metal'), + ), + ), + ), + ), + ), + ), + ), + ), + ); +} diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/anchored_dot_notation/anchored_dot_notation.mustache b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/anchored_dot_notation/anchored_dot_notation.mustache new file mode 100644 index 0000000..9494fb1 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/anchored_dot_notation/anchored_dot_notation.mustache @@ -0,0 +1,4 @@ +{{% ANCHORED-DOT }} +{{# genres }} +{{> genre }} +{{/ genres }} \ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/anchored_dot_notation/anchored_dot_notation.txt b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/anchored_dot_notation/anchored_dot_notation.txt new file mode 100644 index 0000000..fa56efc --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/anchored_dot_notation/anchored_dot_notation.txt @@ -0,0 +1,11 @@ + - Punk + - Hardcore + - First wave of black metal + - Norwegian black metal + - Death metal + - Swedish death metal + - New wave of American metal + - Thrash metal + - Grindcore + - Metalcore + - Nu metal diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/anchored_dot_notation/partials/genre.mustache b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/anchored_dot_notation/partials/genre.mustache new file mode 100644 index 0000000..f51c503 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/anchored_dot_notation/partials/genre.mustache @@ -0,0 +1,5 @@ +{{% ANCHORED-DOT }} + - {{ name }} +{{# .subgenres }} + {{> genre }} +{{/ .subgenres }} \ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/blocks/Blocks.php b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/blocks/Blocks.php new file mode 100644 index 0000000..6362aca --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/blocks/Blocks.php @@ -0,0 +1,15 @@ + 'child works', + ); + + public $grandparent = array( + 'parent' => array( + 'child' => 'grandchild works', + ), + ); +} diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/child_context/child_context.mustache b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/child_context/child_context.mustache new file mode 100644 index 0000000..e1f2ebc --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/child_context/child_context.mustache @@ -0,0 +1,2 @@ +

{{#parent}}{{child}}{{/parent}}

+

{{#grandparent}}{{#parent}}{{child}}{{/parent}}{{/grandparent}}

\ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/child_context/child_context.txt b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/child_context/child_context.txt new file mode 100644 index 0000000..cfb76bf --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/child_context/child_context.txt @@ -0,0 +1,2 @@ +

child works

+

grandchild works

\ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/comments/Comments.php b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/comments/Comments.php new file mode 100644 index 0000000..88fe821 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/comments/Comments.php @@ -0,0 +1,18 @@ +{{title}}{{! just something interesting... #or ^not... }} \ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/comments/comments.txt b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/comments/comments.txt new file mode 100644 index 0000000..9f40e77 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/comments/comments.txt @@ -0,0 +1 @@ +

A Comedy of Errors

\ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/complex/complex.mustache b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/complex/complex.mustache new file mode 100644 index 0000000..807c201 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/complex/complex.mustache @@ -0,0 +1,16 @@ +

{{header}}

+{{#notEmpty}} +
    +{{#item}} +{{#current}} +
  • {{name}}
  • +{{/current}} +{{^current}} +
  • {{name}}
  • +{{/current}} +{{/item}} +
+{{/notEmpty}} +{{#isEmpty}} +

The list is empty.

+{{/isEmpty}} \ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/complex/complex.php b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/complex/complex.php new file mode 100644 index 0000000..7c69615 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/complex/complex.php @@ -0,0 +1,31 @@ + 'red', 'current' => true, 'url' => '#Red'), + array('name' => 'green', 'current' => false, 'url' => '#Green'), + array('name' => 'blue', 'current' => false, 'url' => '#Blue'), + ); + + public function notEmpty() + { + return !($this->isEmpty()); + } + + public function isEmpty() + { + return count($this->item) === 0; + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/complex/complex.txt b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/complex/complex.txt new file mode 100644 index 0000000..facee6d --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/complex/complex.txt @@ -0,0 +1,6 @@ +

Colors

+ diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/delimiters/Delimiters.php b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/delimiters/Delimiters.php new file mode 100644 index 0000000..235a088 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/delimiters/Delimiters.php @@ -0,0 +1,25 @@ + 'And it worked the second time.'), + array('item' => 'As well as the third.'), + ); + } + + public $final = 'Then, surprisingly, it worked the final time.'; +} diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/delimiters/delimiters.mustache b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/delimiters/delimiters.mustache new file mode 100644 index 0000000..e9b0332 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/delimiters/delimiters.mustache @@ -0,0 +1,8 @@ +{{=<% %>=}} +* <% start %> +<%=| |=%> +|# middle | +* | item | +|/ middle | +|={{ }}=| +* {{ final }} \ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/delimiters/delimiters.txt b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/delimiters/delimiters.txt new file mode 100644 index 0000000..e6b2d7a --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/delimiters/delimiters.txt @@ -0,0 +1,4 @@ +* It worked the first time. +* And it worked the second time. +* As well as the third. +* Then, surprisingly, it worked the final time. \ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/dot_notation/DotNotation.php b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/dot_notation/DotNotation.php new file mode 100644 index 0000000..eadbf61 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/dot_notation/DotNotation.php @@ -0,0 +1,24 @@ + array('first' => 'Chris', 'last' => 'Firescythe'), + 'age' => 24, + 'hometown' => array( + 'city' => 'Cincinnati', + 'state' => 'OH', + ), + ); + + public $normal = 'Normal'; +} diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/dot_notation/dot_notation.mustache b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/dot_notation/dot_notation.mustache new file mode 100644 index 0000000..0566867 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/dot_notation/dot_notation.mustache @@ -0,0 +1,4 @@ +* {{person.name.first}} {{person.name.last}} +* {{person.age}} +* {{person.hometown.city}}, {{person.hometown.state}} +* {{normal}} \ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/dot_notation/dot_notation.txt b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/dot_notation/dot_notation.txt new file mode 100644 index 0000000..f8cf1fa --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/dot_notation/dot_notation.txt @@ -0,0 +1,4 @@ +* Chris Firescythe +* 24 +* Cincinnati, OH +* Normal \ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/double_section/DoubleSection.php b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/double_section/DoubleSection.php new file mode 100644 index 0000000..1b3f6b6 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/double_section/DoubleSection.php @@ -0,0 +1,20 @@ + "Shark"'; +} diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/escaped/escaped.mustache b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/escaped/escaped.mustache new file mode 100644 index 0000000..8be4ccb --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/escaped/escaped.mustache @@ -0,0 +1 @@ +

{{title}}

\ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/escaped/escaped.txt b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/escaped/escaped.txt new file mode 100644 index 0000000..6ba3657 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/escaped/escaped.txt @@ -0,0 +1 @@ +

"Bear" > "Shark"

\ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/filters/Filters.php b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/filters/Filters.php new file mode 100644 index 0000000..eb6e3b7 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/filters/Filters.php @@ -0,0 +1,97 @@ + 'Alabama', + 'ak' => 'Alaska', + 'az' => 'Arizona', + 'ar' => 'Arkansas', + 'ca' => 'California', + 'co' => 'Colorado', + 'ct' => 'Connecticut', + 'de' => 'Delaware', + 'fl' => 'Florida', + 'ga' => 'Georgia', + 'hi' => 'Hawaii', + 'id' => 'Idaho', + 'il' => 'Illinois', + 'in' => 'Indiana', + 'ia' => 'Iowa', + 'ks' => 'Kansas', + 'ky' => 'Kentucky', + 'la' => 'Louisiana', + 'me' => 'Maine', + 'md' => 'Maryland', + 'ma' => 'Massachusetts', + 'mi' => 'Michigan', + 'mn' => 'Minnesota', + 'ms' => 'Mississippi', + 'mo' => 'Missouri', + 'mt' => 'Montana', + 'ne' => 'Nebraska', + 'nv' => 'Nevada', + 'nh' => 'New Hampshire', + 'nj' => 'New Jersey', + 'nm' => 'New Mexico', + 'ny' => 'New York', + 'nc' => 'North Carolina', + 'nd' => 'North Dakota', + 'oh' => 'Ohio', + 'ok' => 'Oklahoma', + 'or' => 'Oregon', + 'pa' => 'Pennsylvania', + 'ri' => 'Rhode Island', + 'sc' => 'South Carolina', + 'sd' => 'South Dakota', + 'tn' => 'Tennessee', + 'tx' => 'Texas', + 'ut' => 'Utah', + 'vt' => 'Vermont', + 'va' => 'Virginia', + 'wa' => 'Washington', + 'wv' => 'West Virginia', + 'wi' => 'Wisconsin', + 'wy' => 'Wyoming', + ); + + // The next few functions are ugly, because they have to work in PHP 5.2... + // for everyone who doesn't have to support 5.2, please, for the love, make + // your ViewModel return closures rather than `array($this, '...')` + // + // :) + + public function upcase() + { + return array($this, '_upcase'); + } + + public function _upcase($val) + { + return strtoupper($val); + } + + public function eachPair() + { + return array($this, '_eachPair'); + } + + public function _eachPair($val) + { + $ret = array(); + foreach ($val as $key => $value) { + array_push($ret, compact('key', 'value')); + } + + return $ret; + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/filters/filters.mustache b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/filters/filters.mustache new file mode 100644 index 0000000..50f1465 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/filters/filters.mustache @@ -0,0 +1,4 @@ +{{%FILTERS}} +{{# states | eachPair }} +{{ key | upcase }}: {{ value }} +{{/ states }} \ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/filters/filters.txt b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/filters/filters.txt new file mode 100644 index 0000000..67466fd --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/filters/filters.txt @@ -0,0 +1,50 @@ +AL: Alabama +AK: Alaska +AZ: Arizona +AR: Arkansas +CA: California +CO: Colorado +CT: Connecticut +DE: Delaware +FL: Florida +GA: Georgia +HI: Hawaii +ID: Idaho +IL: Illinois +IN: Indiana +IA: Iowa +KS: Kansas +KY: Kentucky +LA: Louisiana +ME: Maine +MD: Maryland +MA: Massachusetts +MI: Michigan +MN: Minnesota +MS: Mississippi +MO: Missouri +MT: Montana +NE: Nebraska +NV: Nevada +NH: New Hampshire +NJ: New Jersey +NM: New Mexico +NY: New York +NC: North Carolina +ND: North Dakota +OH: Ohio +OK: Oklahoma +OR: Oregon +PA: Pennsylvania +RI: Rhode Island +SC: South Carolina +SD: South Dakota +TN: Tennessee +TX: Texas +UT: Utah +VT: Vermont +VA: Virginia +WA: Washington +WV: West Virginia +WI: Wisconsin +WY: Wyoming diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/grand_parent_context/GrandParentContext.php b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/grand_parent_context/GrandParentContext.php new file mode 100644 index 0000000..2ee0e42 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/grand_parent_context/GrandParentContext.php @@ -0,0 +1,33 @@ +parent_contexts[] = array('parent_id' => 'parent1', 'child_contexts' => array( + array('child_id' => 'parent1-child1'), + array('child_id' => 'parent1-child2'), + )); + + $parent2 = new stdClass(); + $parent2->parent_id = 'parent2'; + $parent2->child_contexts = array( + array('child_id' => 'parent2-child1'), + array('child_id' => 'parent2-child2'), + ); + + $this->parent_contexts[] = $parent2; + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/grand_parent_context/grand_parent_context.mustache b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/grand_parent_context/grand_parent_context.mustache new file mode 100644 index 0000000..6d03ddf --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/grand_parent_context/grand_parent_context.mustache @@ -0,0 +1,7 @@ +{{grand_parent_id}} +{{#parent_contexts}} + {{parent_id}} ({{grand_parent_id}}) + {{#child_contexts}} + {{child_id}} ({{parent_id}} << {{grand_parent_id}}) + {{/child_contexts}} +{{/parent_contexts}} diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/grand_parent_context/grand_parent_context.txt b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/grand_parent_context/grand_parent_context.txt new file mode 100644 index 0000000..2687f84 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/grand_parent_context/grand_parent_context.txt @@ -0,0 +1,7 @@ +grand_parent1 + parent1 (grand_parent1) + parent1-child1 (parent1 << grand_parent1) + parent1-child2 (parent1 << grand_parent1) + parent2 (grand_parent1) + parent2-child1 (parent2 << grand_parent1) + parent2-child2 (parent2 << grand_parent1) diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/i18n/I18n.php b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/i18n/I18n.php new file mode 100644 index 0000000..c36bf70 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/i18n/I18n.php @@ -0,0 +1,30 @@ + 'Hola.', + 'My name is {{ name }}.' => 'Me llamo {{ name }}.', + ); + + public static function __trans($text) + { + return isset(self::$dictionary[$text]) ? self::$dictionary[$text] : $text; + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/i18n/i18n.mustache b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/i18n/i18n.mustache new file mode 100644 index 0000000..eef169b --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/i18n/i18n.mustache @@ -0,0 +1 @@ +{{#__}}Hello.{{/__}} {{#__}}My name is {{ name }}.{{/__}} \ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/i18n/i18n.txt b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/i18n/i18n.txt new file mode 100644 index 0000000..650a71a --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/i18n/i18n.txt @@ -0,0 +1 @@ +Hola. Me llamo Bob. \ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/implicit_iterator/ImplicitIterator.php b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/implicit_iterator/ImplicitIterator.php new file mode 100644 index 0000000..074f8f4 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/implicit_iterator/ImplicitIterator.php @@ -0,0 +1,15 @@ +{{name}} +{{/repo}} +{{^repo}} + No repos :( +{{/repo}} \ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/inverted_section/inverted_section.txt b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/inverted_section/inverted_section.txt new file mode 100644 index 0000000..6ba5a99 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/inverted_section/inverted_section.txt @@ -0,0 +1 @@ + No repos :( diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/nested_partials/NestedPartials.php b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/nested_partials/NestedPartials.php new file mode 100644 index 0000000..a2a2bb1 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/nested_partials/NestedPartials.php @@ -0,0 +1,15 @@ + + {{> second }} + \ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/nested_partials/nested_partials.txt b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/nested_partials/nested_partials.txt new file mode 100644 index 0000000..62776f9 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/nested_partials/nested_partials.txt @@ -0,0 +1,7 @@ + + + + FOURTH! + + + \ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/nested_partials/partials/fourth.mustache b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/nested_partials/partials/fourth.mustache new file mode 100644 index 0000000..727676f --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/nested_partials/partials/fourth.mustache @@ -0,0 +1 @@ +{{ val }} diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/nested_partials/partials/second.mustache b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/nested_partials/partials/second.mustache new file mode 100644 index 0000000..83f33cf --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/nested_partials/partials/second.mustache @@ -0,0 +1,3 @@ + + {{> third }} + diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/nested_partials/partials/third.mustache b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/nested_partials/partials/third.mustache new file mode 100644 index 0000000..f33301a --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/nested_partials/partials/third.mustache @@ -0,0 +1,3 @@ + + {{> fourth }} + diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/partials/Partials.php b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/partials/Partials.php new file mode 100644 index 0000000..e91dc68 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/partials/Partials.php @@ -0,0 +1,19 @@ + 'Page Title', + 'subtitle' => 'Page Subtitle', + 'content' => 'Lorem ipsum dolor sit amet.', + ); +} diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/partials/partials.mustache b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/partials/partials.mustache new file mode 100644 index 0000000..54cf1c5 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/partials/partials.mustache @@ -0,0 +1,7 @@ +
+ {{> header }} + +
+ {{ page.content }} +
+
\ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/partials/partials.txt b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/partials/partials.txt new file mode 100644 index 0000000..f8e45ce --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/partials/partials.txt @@ -0,0 +1,8 @@ +
+

Page Title

+

Page Subtitle

+ +
+ Lorem ipsum dolor sit amet. +
+
\ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/partials/partials/header.mustache b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/partials/partials/header.mustache new file mode 100644 index 0000000..88d567b --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/partials/partials/header.mustache @@ -0,0 +1,4 @@ +{{# page }} +

{{ title }}

+

{{ subtitle }}

+{{/ page }} \ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/recursive_partials/RecursivePartials.php b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/recursive_partials/RecursivePartials.php new file mode 100644 index 0000000..15b6973 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/recursive_partials/RecursivePartials.php @@ -0,0 +1,22 @@ + 'Dan', + 'child' => array( + 'name' => 'Justin', + 'child' => false, + ), + ); +} diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/recursive_partials/partials/child.mustache b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/recursive_partials/partials/child.mustache new file mode 100644 index 0000000..1282941 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/recursive_partials/partials/child.mustache @@ -0,0 +1 @@ + > {{ name }}{{#child}}{{>child}}{{/child}} \ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/recursive_partials/recursive_partials.mustache b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/recursive_partials/recursive_partials.mustache new file mode 100644 index 0000000..0bc5d03 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/recursive_partials/recursive_partials.mustache @@ -0,0 +1 @@ +{{name}}{{#child}}{{>child}}{{/child}} \ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/recursive_partials/recursive_partials.txt b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/recursive_partials/recursive_partials.txt new file mode 100644 index 0000000..681cdef --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/recursive_partials/recursive_partials.txt @@ -0,0 +1 @@ +George > Dan > Justin \ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/section_iterator_objects/SectionIteratorObjects.php b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/section_iterator_objects/SectionIteratorObjects.php new file mode 100644 index 0000000..0dc793c --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/section_iterator_objects/SectionIteratorObjects.php @@ -0,0 +1,27 @@ + 'And it worked the second time.'), + array('item' => 'As well as the third.'), + ); + + public function middle() + { + return new ArrayIterator($this->_data); + } + + public $final = 'Then, surprisingly, it worked the final time.'; +} diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/section_iterator_objects/section_iterator_objects.mustache b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/section_iterator_objects/section_iterator_objects.mustache new file mode 100644 index 0000000..44dfce4 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/section_iterator_objects/section_iterator_objects.mustache @@ -0,0 +1,5 @@ +* {{ start }} +{{# middle }} +* {{ item }} +{{/ middle }} +* {{ final }} \ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/section_iterator_objects/section_iterator_objects.txt b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/section_iterator_objects/section_iterator_objects.txt new file mode 100644 index 0000000..e6b2d7a --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/section_iterator_objects/section_iterator_objects.txt @@ -0,0 +1,4 @@ +* It worked the first time. +* And it worked the second time. +* As well as the third. +* Then, surprisingly, it worked the final time. \ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/section_magic_objects/SectionMagicObjects.php b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/section_magic_objects/SectionMagicObjects.php new file mode 100644 index 0000000..0fcb3b4 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/section_magic_objects/SectionMagicObjects.php @@ -0,0 +1,40 @@ + 'And it worked the second time.', + 'bar' => 'As well as the third.', + ); + + public function __get($key) + { + return isset($this->_data[$key]) ? $this->_data[$key] : null; + } + + public function __isset($key) + { + return isset($this->_data[$key]); + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/section_magic_objects/section_magic_objects.mustache b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/section_magic_objects/section_magic_objects.mustache new file mode 100644 index 0000000..9119608 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/section_magic_objects/section_magic_objects.mustache @@ -0,0 +1,6 @@ +* {{ start }} +{{# middle }} +* {{ foo }} +* {{ bar }} +{{/ middle }} +* {{ final }} \ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/section_magic_objects/section_magic_objects.txt b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/section_magic_objects/section_magic_objects.txt new file mode 100644 index 0000000..e6b2d7a --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/section_magic_objects/section_magic_objects.txt @@ -0,0 +1,4 @@ +* It worked the first time. +* And it worked the second time. +* As well as the third. +* Then, surprisingly, it worked the final time. \ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/section_objects/SectionObjects.php b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/section_objects/SectionObjects.php new file mode 100644 index 0000000..913c3eb --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/section_objects/SectionObjects.php @@ -0,0 +1,28 @@ + 'And it worked the second time.'), + array('item' => 'As well as the third.'), + ); + } + + public $final = 'Then, surprisingly, it worked the final time.'; +} diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/sections/sections.mustache b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/sections/sections.mustache new file mode 100644 index 0000000..44dfce4 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/sections/sections.mustache @@ -0,0 +1,5 @@ +* {{ start }} +{{# middle }} +* {{ item }} +{{/ middle }} +* {{ final }} \ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/sections/sections.txt b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/sections/sections.txt new file mode 100644 index 0000000..e6b2d7a --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/sections/sections.txt @@ -0,0 +1,4 @@ +* It worked the first time. +* And it worked the second time. +* As well as the third. +* Then, surprisingly, it worked the final time. \ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/sections_nested/SectionsNested.php b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/sections_nested/SectionsNested.php new file mode 100644 index 0000000..43657c3 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/sections_nested/SectionsNested.php @@ -0,0 +1,44 @@ + 'Von Kaiser', + 'enemies' => array( + array('name' => 'Super Macho Man'), + array('name' => 'Piston Honda'), + array('name' => 'Mr. Sandman'), + ), + ), + array( + 'name' => 'Mike Tyson', + 'enemies' => array( + array('name' => 'Soda Popinski'), + array('name' => 'King Hippo'), + array('name' => 'Great Tiger'), + array('name' => 'Glass Joe'), + ), + ), + array( + 'name' => 'Don Flamenco', + 'enemies' => array( + array('name' => 'Bald Bull'), + ), + ), + ); + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/sections_nested/sections_nested.mustache b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/sections_nested/sections_nested.mustache new file mode 100644 index 0000000..9f8007d --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/sections_nested/sections_nested.mustache @@ -0,0 +1,7 @@ +Enemies of {{ name }}: +{{# enemies }} +{{ name }} ... who also has enemies: +{{# enemies }} +--> {{ name }} +{{/ enemies }} +{{/ enemies }} \ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/sections_nested/sections_nested.txt b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/sections_nested/sections_nested.txt new file mode 100644 index 0000000..72c44d0 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/sections_nested/sections_nested.txt @@ -0,0 +1,12 @@ +Enemies of Little Mac: +Von Kaiser ... who also has enemies: +--> Super Macho Man +--> Piston Honda +--> Mr. Sandman +Mike Tyson ... who also has enemies: +--> Soda Popinski +--> King Hippo +--> Great Tiger +--> Glass Joe +Don Flamenco ... who also has enemies: +--> Bald Bull diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/simple/Simple.php b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/simple/Simple.php new file mode 100644 index 0000000..a5492e8 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/simple/Simple.php @@ -0,0 +1,23 @@ +value - ($this->value * 0.4); + } + + public $in_ca = true; +} diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/simple/simple.mustache b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/simple/simple.mustache new file mode 100644 index 0000000..03df206 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/simple/simple.mustache @@ -0,0 +1,5 @@ +Hello {{name}} +You have just won ${{value}}! +{{#in_ca}} +Well, ${{ taxed_value }}, after taxes. +{{/in_ca}} \ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/simple/simple.txt b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/simple/simple.txt new file mode 100644 index 0000000..5d75d65 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/simple/simple.txt @@ -0,0 +1,3 @@ +Hello Chris +You have just won $10000! +Well, $6000, after taxes. diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/unescaped/Unescaped.php b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/unescaped/Unescaped.php new file mode 100644 index 0000000..ea85f88 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/unescaped/Unescaped.php @@ -0,0 +1,15 @@ + Shark'; +} diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/unescaped/unescaped.mustache b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/unescaped/unescaped.mustache new file mode 100644 index 0000000..9982708 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/unescaped/unescaped.mustache @@ -0,0 +1 @@ +

{{{title}}}

\ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/unescaped/unescaped.txt b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/unescaped/unescaped.txt new file mode 100644 index 0000000..01fa404 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/unescaped/unescaped.txt @@ -0,0 +1 @@ +

Bear > Shark

\ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/utf8/UTF8.php b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/utf8/UTF8.php new file mode 100644 index 0000000..c53fec9 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/utf8/UTF8.php @@ -0,0 +1,15 @@ +中文 {{test}} \ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/utf8/utf8.txt b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/utf8/utf8.txt new file mode 100644 index 0000000..bf17971 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/utf8/utf8.txt @@ -0,0 +1 @@ +

中文 中文又来啦

\ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/utf8_unescaped/UTF8Unescaped.php b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/utf8_unescaped/UTF8Unescaped.php new file mode 100644 index 0000000..67f9366 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/utf8_unescaped/UTF8Unescaped.php @@ -0,0 +1,15 @@ +中文 {{{test}}} \ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/utf8_unescaped/utf8_unescaped.txt b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/utf8_unescaped/utf8_unescaped.txt new file mode 100644 index 0000000..bf17971 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/utf8_unescaped/utf8_unescaped.txt @@ -0,0 +1 @@ +

中文 中文又来啦

\ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/whitespace/Whitespace.php b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/whitespace/Whitespace.php new file mode 100644 index 0000000..57a3267 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/whitespace/Whitespace.php @@ -0,0 +1,43 @@ + tag }}` and `{{> tag}}` and `{{>tag}}` should all be equivalent. + */ +class Whitespace +{ + public $foo = 'alpha'; + + public $bar = 'beta'; + + public function baz() + { + return 'gamma'; + } + + public function qux() + { + return array( + array('key with space' => 'A'), + array('key with space' => 'B'), + array('key with space' => 'C'), + array('key with space' => 'D'), + array('key with space' => 'E'), + array('key with space' => 'F'), + array('key with space' => 'G'), + ); + } +} diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/whitespace/partials/alphabet.mustache b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/whitespace/partials/alphabet.mustache new file mode 100644 index 0000000..d281c41 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/whitespace/partials/alphabet.mustache @@ -0,0 +1 @@ + * {{.}} \ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/whitespace/whitespace.mustache b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/whitespace/whitespace.mustache new file mode 100644 index 0000000..0b3ba00 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/whitespace/whitespace.mustache @@ -0,0 +1,10 @@ +{{^ inverted section test }} +These are some things: +{{/inverted section test }} +* {{ foo }} +* {{ bar}} +* {{ baz }} +{{# qux }} +* {{ key with space }} +{{/ qux }} +{{#qux}}.{{/qux}} \ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/examples/whitespace/whitespace.txt b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/whitespace/whitespace.txt new file mode 100644 index 0000000..5226c69 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/examples/whitespace/whitespace.txt @@ -0,0 +1,12 @@ +These are some things: +* alpha +* beta +* gamma +* A +* B +* C +* D +* E +* F +* G +....... \ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/templates/alpha.ms b/admin/lib/vendor/mustache/mustache/test/fixtures/templates/alpha.ms new file mode 100644 index 0000000..3845830 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/templates/alpha.ms @@ -0,0 +1 @@ +alpha contents \ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/templates/beta.ms b/admin/lib/vendor/mustache/mustache/test/fixtures/templates/beta.ms new file mode 100644 index 0000000..a083dfe --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/templates/beta.ms @@ -0,0 +1 @@ +beta contents \ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/templates/one.mustache b/admin/lib/vendor/mustache/mustache/test/fixtures/templates/one.mustache new file mode 100644 index 0000000..f83ad09 --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/templates/one.mustache @@ -0,0 +1 @@ +one contents \ No newline at end of file diff --git a/admin/lib/vendor/mustache/mustache/test/fixtures/templates/two.mustache b/admin/lib/vendor/mustache/mustache/test/fixtures/templates/two.mustache new file mode 100644 index 0000000..dacc40e --- /dev/null +++ b/admin/lib/vendor/mustache/mustache/test/fixtures/templates/two.mustache @@ -0,0 +1 @@ +two contents \ No newline at end of file diff --git a/admin/lib/vendor/phpmailer/phpmailer/COMMITMENT b/admin/lib/vendor/phpmailer/phpmailer/COMMITMENT new file mode 100644 index 0000000..a687e0d --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/COMMITMENT @@ -0,0 +1,46 @@ +GPL Cooperation Commitment +Version 1.0 + +Before filing or continuing to prosecute any legal proceeding or claim +(other than a Defensive Action) arising from termination of a Covered +License, we commit to extend to the person or entity ('you') accused +of violating the Covered License the following provisions regarding +cure and reinstatement, taken from GPL version 3. As used here, the +term 'this License' refers to the specific Covered License being +enforced. + + However, if you cease all violation of this License, then your + license from a particular copyright holder is reinstated (a) + provisionally, unless and until the copyright holder explicitly + and finally terminates your license, and (b) permanently, if the + copyright holder fails to notify you of the violation by some + reasonable means prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is + reinstated permanently if the copyright holder notifies you of the + violation by some reasonable means, this is the first time you + have received notice of violation of this License (for any work) + from that copyright holder, and you cure the violation prior to 30 + days after your receipt of the notice. + +We intend this Commitment to be irrevocable, and binding and +enforceable against us and assignees of or successors to our +copyrights. + +Definitions + +'Covered License' means the GNU General Public License, version 2 +(GPLv2), the GNU Lesser General Public License, version 2.1 +(LGPLv2.1), or the GNU Library General Public License, version 2 +(LGPLv2), all as published by the Free Software Foundation. + +'Defensive Action' means a legal proceeding or claim that We bring +against you in response to a prior proceeding or claim initiated by +you or your affiliate. + +'We' means each contributor to this repository as of the date of +inclusion of this file, including subsidiaries of a corporate +contributor. + +This work is available under a Creative Commons Attribution-ShareAlike +4.0 International license (https://creativecommons.org/licenses/by-sa/4.0/). diff --git a/website/js/vendor/tinymce/js/tinymce/license.txt b/admin/lib/vendor/phpmailer/phpmailer/LICENSE similarity index 98% rename from website/js/vendor/tinymce/js/tinymce/license.txt rename to admin/lib/vendor/phpmailer/phpmailer/LICENSE index b17fc90..f166cc5 100644 --- a/website/js/vendor/tinymce/js/tinymce/license.txt +++ b/admin/lib/vendor/phpmailer/phpmailer/LICENSE @@ -1,5 +1,5 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -10,7 +10,7 @@ as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] - Preamble + Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public @@ -55,7 +55,7 @@ modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. - + Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a @@ -111,8 +111,8 @@ modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE + + GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other @@ -146,7 +146,7 @@ such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. - + 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an @@ -158,7 +158,7 @@ Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. - + 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 @@ -216,7 +216,7 @@ instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. - + Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. @@ -267,7 +267,7 @@ Library will still fall under Section 6.) distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. - + 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work @@ -329,7 +329,7 @@ restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. - + 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined @@ -370,7 +370,7 @@ subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. - + 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or @@ -422,7 +422,7 @@ conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. - + 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is @@ -432,7 +432,7 @@ decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. - NO WARRANTY + NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. @@ -455,8 +455,8 @@ FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - END OF TERMS AND CONDITIONS - + END OF TERMS AND CONDITIONS + How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest @@ -499,6 +499,4 @@ necessary. Here is a sample; alter the names: , 1 April 1990 Ty Coon, President of Vice -That's all there is to it! - - +That's all there is to it! \ No newline at end of file diff --git a/admin/lib/vendor/phpmailer/phpmailer/README.md b/admin/lib/vendor/phpmailer/phpmailer/README.md new file mode 100644 index 0000000..c287e30 --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/README.md @@ -0,0 +1,221 @@ +![PHPMailer](https://raw.github.com/PHPMailer/PHPMailer/master/examples/images/phpmailer.png) + +# PHPMailer - A full-featured email creation and transfer class for PHP + +Build status: [![Build Status](https://travis-ci.org/PHPMailer/PHPMailer.svg)](https://travis-ci.org/PHPMailer/PHPMailer) +[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/PHPMailer/PHPMailer/badges/quality-score.png?s=3758e21d279becdf847a557a56a3ed16dfec9d5d)](https://scrutinizer-ci.com/g/PHPMailer/PHPMailer/) +[![Code Coverage](https://scrutinizer-ci.com/g/PHPMailer/PHPMailer/badges/coverage.png?s=3fe6ca5fe8cd2cdf96285756e42932f7ca256962)](https://scrutinizer-ci.com/g/PHPMailer/PHPMailer/) + +[![Latest Stable Version](https://poser.pugx.org/phpmailer/phpmailer/v/stable.svg)](https://packagist.org/packages/phpmailer/phpmailer) [![Total Downloads](https://poser.pugx.org/phpmailer/phpmailer/downloads)](https://packagist.org/packages/phpmailer/phpmailer) [![Latest Unstable Version](https://poser.pugx.org/phpmailer/phpmailer/v/unstable.svg)](https://packagist.org/packages/phpmailer/phpmailer) [![License](https://poser.pugx.org/phpmailer/phpmailer/license.svg)](https://packagist.org/packages/phpmailer/phpmailer) [![API Docs](https://github.com/phpmailer/phpmailer/workflows/Docs/badge.svg)](http://phpmailer.github.io/PHPMailer/) + +## Class Features +- Probably the world's most popular code for sending email from PHP! +- Used by many open-source projects: WordPress, Drupal, 1CRM, SugarCRM, Yii, Joomla! and many more +- Integrated SMTP support - send without a local mail server +- Send emails with multiple To, CC, BCC and Reply-to addresses +- Multipart/alternative emails for mail clients that do not read HTML email +- Add attachments, including inline +- Support for UTF-8 content and 8bit, base64, binary, and quoted-printable encodings +- SMTP authentication with LOGIN, PLAIN, CRAM-MD5, and XOAUTH2 mechanisms over SSL and SMTP+STARTTLS transports +- Validates email addresses automatically +- Protect against header injection attacks +- Error messages in over 50 languages! +- DKIM and S/MIME signing support +- Compatible with PHP 5.5 and later +- Namespaced to prevent name clashes +- Much more! + +## Why you might need it +Many PHP developers need to send email from their code. The only PHP function that supports this is [`mail()`](https://www.php.net/manual/en/function.mail.php). However, it does not provide any assistance for making use of popular features such as encryption, authentication, HTML messages, and attachments. + +Formatting email correctly is surprisingly difficult. There are myriad overlapping RFCs, requiring tight adherence to horribly complicated formatting and encoding rules – the vast majority of code that you'll find online that uses the `mail()` function directly is just plain wrong! +*Please* don't be tempted to do it yourself – if you don't use PHPMailer, there are many other excellent libraries that you should look at before rolling your own. Try [SwiftMailer](https://swiftmailer.symfony.com/), [Zend/Mail](https://zendframework.github.io/zend-mail/), [ZetaComponents](https://github.com/zetacomponents/Mail) etc. + +The PHP `mail()` function usually sends via a local mail server, typically fronted by a `sendmail` binary on Linux, BSD, and macOS platforms, however, Windows usually doesn't include a local mail server; PHPMailer's integrated SMTP implementation allows email sending on Windows platforms without a local mail server. + +## License +This software is distributed under the [LGPL 2.1](http://www.gnu.org/licenses/lgpl-2.1.html) license, along with the [GPL Cooperation Commitment](https://gplcc.github.io/gplcc/). Please read LICENSE for information on the software availability and distribution. + +## Installation & loading +PHPMailer is available on [Packagist](https://packagist.org/packages/phpmailer/phpmailer) (using semantic versioning), and installation via [Composer](https://getcomposer.org) is the recommended way to install PHPMailer. Just add this line to your `composer.json` file: + +```json +"phpmailer/phpmailer": "~6.1" +``` + +or run + +```sh +composer require phpmailer/phpmailer +``` + +Note that the `vendor` folder and the `vendor/autoload.php` script are generated by Composer; they are not part of PHPMailer. + +If you want to use the Gmail XOAUTH2 authentication class, you will also need to add a dependency on the `league/oauth2-client` package in your `composer.json`. + +Alternatively, if you're not using Composer, copy the contents of the PHPMailer folder into one of the `include_path` directories specified in your PHP configuration and load each class file manually: + +```php +SMTPDebug = SMTP::DEBUG_SERVER; // Enable verbose debug output + $mail->isSMTP(); // Send using SMTP + $mail->Host = 'smtp1.example.com'; // Set the SMTP server to send through + $mail->SMTPAuth = true; // Enable SMTP authentication + $mail->Username = 'user@example.com'; // SMTP username + $mail->Password = 'secret'; // SMTP password + $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; // Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged + $mail->Port = 587; // TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above + + //Recipients + $mail->setFrom('from@example.com', 'Mailer'); + $mail->addAddress('joe@example.net', 'Joe User'); // Add a recipient + $mail->addAddress('ellen@example.com'); // Name is optional + $mail->addReplyTo('info@example.com', 'Information'); + $mail->addCC('cc@example.com'); + $mail->addBCC('bcc@example.com'); + + // Attachments + $mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments + $mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name + + // Content + $mail->isHTML(true); // Set email format to HTML + $mail->Subject = 'Here is the subject'; + $mail->Body = 'This is the HTML message body in bold!'; + $mail->AltBody = 'This is the body in plain text for non-HTML mail clients'; + + $mail->send(); + echo 'Message has been sent'; +} catch (Exception $e) { + echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}"; +} +``` + +You'll find plenty more to play with in the [examples](https://github.com/PHPMailer/PHPMailer/tree/master/examples) folder. + +If you are re-using the instance (e.g. when sending to a mailing list), you may need to clear the recipient list to avoid sending duplicate messages. See [the mailing list example](https://github.com/PHPMailer/PHPMailer/blob/master/examples/mailing_list.phps) for further guidance. + +That's it. You should now be ready to use PHPMailer! + +## Localization +PHPMailer defaults to English, but in the [language](https://github.com/PHPMailer/PHPMailer/tree/master/language/) folder you'll find many translations for PHPMailer error messages that you may encounter. Their filenames contain [ISO 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the translations, for example `fr` for French. To specify a language, you need to tell PHPMailer which one to use, like this: + +```php +// To load the French version +$mail->setLanguage('fr', '/optional/path/to/language/directory/'); +``` + +We welcome corrections and new languages - if you're looking for corrections to do, run the [PHPMailerLangTest.php](https://github.com/PHPMailer/PHPMailer/tree/master/test/PHPMailerLangTest.php) script in the tests folder and it will show any missing translations. + +## Documentation +Start reading at the [GitHub wiki](https://github.com/PHPMailer/PHPMailer/wiki). If you're having trouble, this should be the first place you look as it's the most frequently updated. + +Examples of how to use PHPMailer for common scenarios can be found in the [examples](https://github.com/PHPMailer/PHPMailer/tree/master/examples) folder. If you're looking for a good starting point, we recommend you start with [the Gmail example](https://github.com/PHPMailer/PHPMailer/tree/master/examples/gmail.phps). + +Note that in order to reduce PHPMailer's deployed code footprint, the examples are no longer included if you load PHPMailer via Composer or via [GitHub's zip file download](https://github.com/PHPMailer/PHPMailer/archive/master.zip), so you'll need to either clone the git repository or use the above links to get to the examples directly. + +Complete generated API documentation is [available online](http://phpmailer.github.io/PHPMailer/). + +You can generate complete API-level documentation by running `phpdoc` in the top-level folder, and documentation will appear in the `docs` folder, though you'll need to have [PHPDocumentor](http://www.phpdoc.org) installed. You may find [the unit tests](https://github.com/PHPMailer/PHPMailer/blob/master/test/PHPMailerTest.php) a good source of how to do various operations such as encryption. + +If the documentation doesn't cover what you need, search the [many questions on Stack Overflow](http://stackoverflow.com/questions/tagged/phpmailer), and before you ask a question about "SMTP Error: Could not connect to SMTP host.", [read the troubleshooting guide](https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting). + +## Tests +There is a PHPUnit test script in the [test](https://github.com/PHPMailer/PHPMailer/tree/master/test/) folder. PHPMailer uses PHPUnit 4.8 - we would use 5.x but we need to run on PHP 5.5. + +Build status: [![Build Status](https://travis-ci.org/PHPMailer/PHPMailer.svg)](https://travis-ci.org/PHPMailer/PHPMailer) + +If this isn't passing, is there something you can do to help? + +## Security +Please disclose any vulnerabilities found responsibly - report any security problems found to the maintainers privately. + +PHPMailer versions prior to 5.2.22 (released January 9th 2017) have a local file disclosure vulnerability, [CVE-2017-5223](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-5223). If content passed into `msgHTML()` is sourced from unfiltered user input, relative paths can map to absolute local file paths and added as attachments. Also note that `addAttachment` (just like `file_get_contents`, `passthru`, `unlink`, etc) should not be passed user-sourced params either! Reported by Yongxiang Li of Asiasecurity. + +PHPMailer versions prior to 5.2.20 (released December 28th 2016) are vulnerable to [CVE-2016-10045](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-10045) a remote code execution vulnerability, responsibly reported by [Dawid Golunski](https://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10045-Vuln-Patch-Bypass.html), and patched by Paul Buonopane (@Zenexer). + +PHPMailer versions prior to 5.2.18 (released December 2016) are vulnerable to [CVE-2016-10033](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-10033) a critical remote code execution vulnerability, responsibly reported by [Dawid Golunski](http://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10033-Vuln.html). + +See [SECURITY](https://github.com/PHPMailer/PHPMailer/tree/master/SECURITY.md) for more detail on security issues. + +## Contributing +Please submit bug reports, suggestions and pull requests to the [GitHub issue tracker](https://github.com/PHPMailer/PHPMailer/issues). + +We're particularly interested in fixing edge-cases, expanding test coverage and updating translations. + +If you found a mistake in the docs, or want to add something, go ahead and amend the wiki - anyone can edit it. + +If you have git clones from prior to the move to the PHPMailer GitHub organisation, you'll need to update any remote URLs referencing the old GitHub location with a command like this from within your clone: + +```sh +git remote set-url upstream https://github.com/PHPMailer/PHPMailer.git +``` + +Please *don't* use the SourceForge or Google Code projects any more; they are obsolete and no longer maintained. + +## Sponsorship +Development time and resources for PHPMailer are provided by [Smartmessages.net](https://info.smartmessages.net/), a powerful email marketing system. + +Smartmessages email marketing + +Other contributions are gladly received, whether in beer 🍺, T-shirts 👕, Amazon wishlist raids, or cold, hard cash 💰. If you'd like to donate to say "thank you" to maintainers or contributors, please contact them through individual profile pages via [the contributors page](https://github.com/PHPMailer/PHPMailer/graphs/contributors). + +## Changelog +See [changelog](changelog.md). + +## History +- PHPMailer was originally written in 2001 by Brent R. Matzelle as a [SourceForge project](http://sourceforge.net/projects/phpmailer/). +- Marcus Bointon (coolbru on SF) and Andy Prevost (codeworxtech) took over the project in 2004. +- Became an Apache incubator project on Google Code in 2010, managed by Jim Jagielski. +- Marcus created his fork on [GitHub](https://github.com/Synchro/PHPMailer) in 2008. +- Jim and Marcus decide to join forces and use GitHub as the canonical and official repo for PHPMailer in 2013. +- PHPMailer moves to the [PHPMailer organisation](https://github.com/PHPMailer) on GitHub in 2013. + +### What's changed since moving from SourceForge? +- Official successor to the SourceForge and Google Code projects. +- Test suite. +- Continuous integration with Travis-CI. +- Composer support. +- Public development. +- Additional languages and language strings. +- CRAM-MD5 authentication support. +- Preserves full repo history of authors, commits and branches from the original SourceForge project. diff --git a/admin/lib/vendor/phpmailer/phpmailer/SECURITY.md b/admin/lib/vendor/phpmailer/phpmailer/SECURITY.md new file mode 100644 index 0000000..fc3e61c --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/SECURITY.md @@ -0,0 +1,30 @@ +# Security notices relating to PHPMailer + +Please disclose any vulnerabilities found responsibly - report any security problems found to the maintainers privately. + +PHPMailer versions 6.1.5 and earlier contain an output escaping bug that occurs in `Content-Type` and `Content-Disposition` when filenames passed into `addAttachment` and other methods that accept attachment names contain double quote characters, in contravention of RFC822 3.4.1. No specific vulnerability has been found relating to this, but it could allow file attachments to bypass attachment filters that are based on matching filename extensions. Recorded as [CVE-2020-13625](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2020-13625). Reported by Elar Lang of Clarified Security. + +PHPMailer versions prior to 6.0.6 and 5.2.27 are vulnerable to an object injection attack by passing `phar://` paths into `addAttachment()` and other functions that may receive unfiltered local paths, possibly leading to RCE. Recorded as [CVE-2018-19296](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2018-19296). See [this article](https://knasmueller.net/5-answers-about-php-phar-exploitation) for more info on this type of vulnerability. Mitigated by blocking the use of paths containing URL-protocol style prefixes such as `phar://`. Reported by Sehun Oh of cyberone.kr. + +PHPMailer versions prior to 5.2.24 (released July 26th 2017) have an XSS vulnerability in one of the code examples, [CVE-2017-11503](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-11503). The `code_generator.phps` example did not filter user input prior to output. This file is distributed with a `.phps` extension, so it it not normally executable unless it is explicitly renamed, and the file is not included when PHPMailer is loaded through composer, so it is safe by default. There was also an undisclosed potential XSS vulnerability in the default exception handler (unused by default). Patches for both issues kindly provided by Patrick Monnerat of the Fedora Project. + +PHPMailer versions prior to 5.2.22 (released January 9th 2017) have a local file disclosure vulnerability, [CVE-2017-5223](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-5223). If content passed into `msgHTML()` is sourced from unfiltered user input, relative paths can map to absolute local file paths and added as attachments. Also note that `addAttachment` (just like `file_get_contents`, `passthru`, `unlink`, etc) should not be passed user-sourced params either! Reported by Yongxiang Li of Asiasecurity. + +PHPMailer versions prior to 5.2.20 (released December 28th 2016) are vulnerable to [CVE-2016-10045](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-10045) a remote code execution vulnerability, responsibly reported by [Dawid Golunski](https://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10045-Vuln-Patch-Bypass.html), and patched by Paul Buonopane (@Zenexer). + +PHPMailer versions prior to 5.2.18 (released December 2016) are vulnerable to [CVE-2016-10033](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-10033) a remote code execution vulnerability, responsibly reported by [Dawid Golunski](http://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10033-Vuln.html). + +PHPMailer versions prior to 5.2.14 (released November 2015) are vulnerable to [CVE-2015-8476](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2015-8476) an SMTP CRLF injection bug permitting arbitrary message sending. + +PHPMailer versions prior to 5.2.10 (released May 2015) are vulnerable to [CVE-2008-5619](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2008-5619), a remote code execution vulnerability in the bundled html2text library. This file was removed in 5.2.10, so if you are using a version prior to that and make use of the html2text function, it's vitally important that you upgrade and remove this file. + +PHPMailer versions prior to 2.0.7 and 2.2.1 are vulnerable to [CVE-2012-0796](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-0796), an email header injection attack. + +Joomla 1.6.0 uses PHPMailer in an unsafe way, allowing it to reveal local file paths, reported in [CVE-2011-3747](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2011-3747). + +PHPMailer didn't sanitise the `$lang_path` parameter in `SetLanguage`. This wasn't a problem in itself, but some apps (PHPClassifieds, ATutor) also failed to sanitise user-provided parameters passed to it, permitting semi-arbitrary local file inclusion, reported in [CVE-2010-4914](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-4914), [CVE-2007-2021](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2007-2021) and [CVE-2006-5734](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2006-5734). + +PHPMailer 1.7.2 and earlier contained a possible DDoS vulnerability reported in [CVE-2005-1807](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2005-1807). + +PHPMailer 1.7 and earlier (June 2003) have a possible vulnerability in the `SendmailSend` method where shell commands may not be sanitised. Reported in [CVE-2007-3215](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2007-3215). + diff --git a/admin/lib/vendor/phpmailer/phpmailer/VERSION b/admin/lib/vendor/phpmailer/phpmailer/VERSION new file mode 100644 index 0000000..aeee9f7 --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/VERSION @@ -0,0 +1 @@ +6.1.8 \ No newline at end of file diff --git a/admin/lib/vendor/phpmailer/phpmailer/composer.json b/admin/lib/vendor/phpmailer/phpmailer/composer.json new file mode 100644 index 0000000..95a8991 --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/composer.json @@ -0,0 +1,58 @@ +{ + "name": "phpmailer/phpmailer", + "type": "library", + "description": "PHPMailer is a full-featured email creation and transfer class for PHP", + "authors": [ + { + "name": "Marcus Bointon", + "email": "phpmailer@synchromedia.co.uk" + }, + { + "name": "Jim Jagielski", + "email": "jimjag@gmail.com" + }, + { + "name": "Andy Prevost", + "email": "codeworxtech@users.sourceforge.net" + }, + { + "name": "Brent R. Matzelle" + } + ], + "funding": [ + { + "url": "https://github.com/synchro", + "type": "github" + } + ], + "require": { + "php": ">=5.5.0", + "ext-ctype": "*", + "ext-filter": "*", + "ext-hash": "*" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.2", + "phpunit/phpunit": "^4.8 || ^5.7", + "doctrine/annotations": "^1.2" + }, + "suggest": { + "psr/log": "For optional PSR-3 debug logging", + "league/oauth2-google": "Needed for Google XOAUTH2 authentication", + "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication", + "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication", + "ext-mbstring": "Needed to send email in multibyte encoding charset", + "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)" + }, + "autoload": { + "psr-4": { + "PHPMailer\\PHPMailer\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "PHPMailer\\Test\\": "test/" + } + }, + "license": "LGPL-2.1-only" +} diff --git a/admin/lib/vendor/phpmailer/phpmailer/get_oauth_token.php b/admin/lib/vendor/phpmailer/phpmailer/get_oauth_token.php new file mode 100644 index 0000000..8335883 --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/get_oauth_token.php @@ -0,0 +1,144 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2020 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + */ +/** + * Get an OAuth2 token from an OAuth2 provider. + * * Install this script on your server so that it's accessible + * as [https/http]:////get_oauth_token.php + * e.g.: http://localhost/phpmailer/get_oauth_token.php + * * Ensure dependencies are installed with 'composer install' + * * Set up an app in your Google/Yahoo/Microsoft account + * * Set the script address as the app's redirect URL + * If no refresh token is obtained when running this file, + * revoke access to your app and run the script again. + */ + +namespace PHPMailer\PHPMailer; + +/** + * Aliases for League Provider Classes + * Make sure you have added these to your composer.json and run `composer install` + * Plenty to choose from here: + * @see http://oauth2-client.thephpleague.com/providers/thirdparty/ + */ +// @see https://github.com/thephpleague/oauth2-google +use League\OAuth2\Client\Provider\Google; +// @see https://packagist.org/packages/hayageek/oauth2-yahoo +use Hayageek\OAuth2\Client\Provider\Yahoo; +// @see https://github.com/stevenmaguire/oauth2-microsoft +use Stevenmaguire\OAuth2\Client\Provider\Microsoft; + +if (!isset($_GET['code']) && !isset($_GET['provider'])) { +?> + +Select Provider:
+Google
+Yahoo
+Microsoft/Outlook/Hotmail/Live/Office365
+ + + $clientId, + 'clientSecret' => $clientSecret, + 'redirectUri' => $redirectUri, + 'accessType' => 'offline' +]; + +$options = []; +$provider = null; + +switch ($providerName) { + case 'Google': + $provider = new Google($params); + $options = [ + 'scope' => [ + 'https://mail.google.com/' + ] + ]; + break; + case 'Yahoo': + $provider = new Yahoo($params); + break; + case 'Microsoft': + $provider = new Microsoft($params); + $options = [ + 'scope' => [ + 'wl.imap', + 'wl.offline_access' + ] + ]; + break; +} + +if (null === $provider) { + exit('Provider missing'); +} + +if (!isset($_GET['code'])) { + // If we don't have an authorization code then get one + $authUrl = $provider->getAuthorizationUrl($options); + $_SESSION['oauth2state'] = $provider->getState(); + header('Location: ' . $authUrl); + exit; +// Check given state against previously stored one to mitigate CSRF attack +} elseif (empty($_GET['state']) || ($_GET['state'] !== $_SESSION['oauth2state'])) { + unset($_SESSION['oauth2state']); + unset($_SESSION['provider']); + exit('Invalid state'); +} else { + unset($_SESSION['provider']); + // Try to get an access token (using the authorization code grant) + $token = $provider->getAccessToken( + 'authorization_code', + [ + 'code' => $_GET['code'] + ] + ); + // Use this to interact with an API on the users behalf + // Use this to get a new access token if the old one expires + echo 'Refresh Token: ', $token->getRefreshToken(); +} diff --git a/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-af.php b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-af.php new file mode 100644 index 0000000..3c42d78 --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-af.php @@ -0,0 +1,25 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'خطأ SMTP : لا يمكن تأكيد الهوية.'; +$PHPMAILER_LANG['connect_host'] = 'خطأ SMTP: لا يمكن الاتصال بالخادم SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'خطأ SMTP: لم يتم قبول المعلومات .'; +$PHPMAILER_LANG['empty_message'] = 'نص الرسالة فارغ'; +$PHPMAILER_LANG['encoding'] = 'ترميز غير معروف: '; +$PHPMAILER_LANG['execute'] = 'لا يمكن تنفيذ : '; +$PHPMAILER_LANG['file_access'] = 'لا يمكن الوصول للملف: '; +$PHPMAILER_LANG['file_open'] = 'خطأ في الملف: لا يمكن فتحه: '; +$PHPMAILER_LANG['from_failed'] = 'خطأ على مستوى عنوان المرسل : '; +$PHPMAILER_LANG['instantiate'] = 'لا يمكن توفير خدمة البريد.'; +$PHPMAILER_LANG['invalid_address'] = 'الإرسال غير ممكن لأن عنوان البريد الإلكتروني غير صالح: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' برنامج الإرسال غير مدعوم.'; +$PHPMAILER_LANG['provide_address'] = 'يجب توفير عنوان البريد الإلكتروني لمستلم واحد على الأقل.'; +$PHPMAILER_LANG['recipients_failed'] = 'خطأ SMTP: الأخطاء التالية ' . + 'فشل في الارسال لكل من : '; +$PHPMAILER_LANG['signing'] = 'خطأ في التوقيع: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() غير ممكن.'; +$PHPMAILER_LANG['smtp_error'] = 'خطأ على مستوى الخادم SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'لا يمكن تعيين أو إعادة تعيين متغير: '; +$PHPMAILER_LANG['extension_missing'] = 'الإضافة غير موجودة: '; diff --git a/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-az.php b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-az.php new file mode 100644 index 0000000..3749d83 --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-az.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP Greška: Neuspjela prijava.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP Greška: Nije moguće spojiti se sa SMTP serverom.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Greška: Podatci nisu prihvaćeni.'; +$PHPMAILER_LANG['empty_message'] = 'Sadržaj poruke je prazan.'; +$PHPMAILER_LANG['encoding'] = 'Nepoznata kriptografija: '; +$PHPMAILER_LANG['execute'] = 'Nije moguće izvršiti naredbu: '; +$PHPMAILER_LANG['file_access'] = 'Nije moguće pristupiti datoteci: '; +$PHPMAILER_LANG['file_open'] = 'Nije moguće otvoriti datoteku: '; +$PHPMAILER_LANG['from_failed'] = 'SMTP Greška: Slanje sa navedenih e-mail adresa nije uspjelo: '; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP Greška: Slanje na navedene e-mail adrese nije uspjelo: '; +$PHPMAILER_LANG['instantiate'] = 'Ne mogu pokrenuti mail funkcionalnost.'; +$PHPMAILER_LANG['invalid_address'] = 'E-mail nije poslan. Neispravna e-mail adresa: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer nije podržan.'; +$PHPMAILER_LANG['provide_address'] = 'Definišite barem jednu adresu primaoca.'; +$PHPMAILER_LANG['signing'] = 'Greška prilikom prijave: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Spajanje na SMTP server nije uspjelo.'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP greška: '; +$PHPMAILER_LANG['variable_set'] = 'Nije moguće postaviti varijablu ili je vratiti nazad: '; +$PHPMAILER_LANG['extension_missing'] = 'Nedostaje ekstenzija: '; \ No newline at end of file diff --git a/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-be.php b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-be.php new file mode 100644 index 0000000..e2f98f0 --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-be.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Памылка SMTP: памылка ідэнтыфікацыі.'; +$PHPMAILER_LANG['connect_host'] = 'Памылка SMTP: нельга ўстанавіць сувязь з SMTP-серверам.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Памылка SMTP: звесткі непрынятыя.'; +$PHPMAILER_LANG['empty_message'] = 'Пустое паведамленне.'; +$PHPMAILER_LANG['encoding'] = 'Невядомая кадыроўка тэксту: '; +$PHPMAILER_LANG['execute'] = 'Нельга выканаць каманду: '; +$PHPMAILER_LANG['file_access'] = 'Няма доступу да файла: '; +$PHPMAILER_LANG['file_open'] = 'Нельга адкрыць файл: '; +$PHPMAILER_LANG['from_failed'] = 'Няправільны адрас адпраўніка: '; +$PHPMAILER_LANG['instantiate'] = 'Нельга прымяніць функцыю mail().'; +$PHPMAILER_LANG['invalid_address'] = 'Нельга даслаць паведамленне, няправільны email атрымальніка: '; +$PHPMAILER_LANG['provide_address'] = 'Запоўніце, калі ласка, правільны email атрымальніка.'; +$PHPMAILER_LANG['mailer_not_supported'] = ' - паштовы сервер не падтрымліваецца.'; +$PHPMAILER_LANG['recipients_failed'] = 'Памылка SMTP: няправільныя атрымальнікі: '; +$PHPMAILER_LANG['signing'] = 'Памылка подпісу паведамлення: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Памылка сувязі з SMTP-серверам.'; +$PHPMAILER_LANG['smtp_error'] = 'Памылка SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'Нельга ўстанавіць або перамяніць значэнне пераменнай: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-bg.php b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-bg.php new file mode 100644 index 0000000..b22941f --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-bg.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP грешка: Не може да се удостовери пред сървъра.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP грешка: Не може да се свърже с SMTP хоста.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP грешка: данните не са приети.'; +$PHPMAILER_LANG['empty_message'] = 'Съдържанието на съобщението е празно'; +$PHPMAILER_LANG['encoding'] = 'Неизвестно кодиране: '; +$PHPMAILER_LANG['execute'] = 'Не може да се изпълни: '; +$PHPMAILER_LANG['file_access'] = 'Няма достъп до файл: '; +$PHPMAILER_LANG['file_open'] = 'Файлова грешка: Не може да се отвори файл: '; +$PHPMAILER_LANG['from_failed'] = 'Следните адреси за подател са невалидни: '; +$PHPMAILER_LANG['instantiate'] = 'Не може да се инстанцира функцията mail.'; +$PHPMAILER_LANG['invalid_address'] = 'Невалиден адрес: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' - пощенски сървър не се поддържа.'; +$PHPMAILER_LANG['provide_address'] = 'Трябва да предоставите поне един email адрес за получател.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP грешка: Следните адреси за Получател са невалидни: '; +$PHPMAILER_LANG['signing'] = 'Грешка при подписване: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP провален connect().'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP сървърна грешка: '; +$PHPMAILER_LANG['variable_set'] = 'Не може да се установи или възстанови променлива: '; +$PHPMAILER_LANG['extension_missing'] = 'Липсва разширение: '; diff --git a/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-ca.php b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-ca.php new file mode 100644 index 0000000..4117596 --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-ca.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Error SMTP: No s’ha pogut autenticar.'; +$PHPMAILER_LANG['connect_host'] = 'Error SMTP: No es pot connectar al servidor SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Error SMTP: Dades no acceptades.'; +$PHPMAILER_LANG['empty_message'] = 'El cos del missatge està buit.'; +$PHPMAILER_LANG['encoding'] = 'Codificació desconeguda: '; +$PHPMAILER_LANG['execute'] = 'No es pot executar: '; +$PHPMAILER_LANG['file_access'] = 'No es pot accedir a l’arxiu: '; +$PHPMAILER_LANG['file_open'] = 'Error d’Arxiu: No es pot obrir l’arxiu: '; +$PHPMAILER_LANG['from_failed'] = 'La(s) següent(s) adreces de remitent han fallat: '; +$PHPMAILER_LANG['instantiate'] = 'No s’ha pogut crear una instància de la funció Mail.'; +$PHPMAILER_LANG['invalid_address'] = 'Adreça d’email invalida: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer no està suportat'; +$PHPMAILER_LANG['provide_address'] = 'S’ha de proveir almenys una adreça d’email com a destinatari.'; +$PHPMAILER_LANG['recipients_failed'] = 'Error SMTP: Els següents destinataris han fallat: '; +$PHPMAILER_LANG['signing'] = 'Error al signar: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Ha fallat el SMTP Connect().'; +$PHPMAILER_LANG['smtp_error'] = 'Error del servidor SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'No s’ha pogut establir o restablir la variable: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-ch.php b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-ch.php new file mode 100644 index 0000000..4fda6b8 --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-ch.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP 错误:身份验证失败。'; +$PHPMAILER_LANG['connect_host'] = 'SMTP 错误: 不能连接SMTP主机。'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误: 数据不可接受。'; +//$PHPMAILER_LANG['empty_message'] = 'Message body empty'; +$PHPMAILER_LANG['encoding'] = '未知编码:'; +$PHPMAILER_LANG['execute'] = '不能执行: '; +$PHPMAILER_LANG['file_access'] = '不能访问文件:'; +$PHPMAILER_LANG['file_open'] = '文件错误:不能打开文件:'; +$PHPMAILER_LANG['from_failed'] = '下面的发送地址邮件发送失败了: '; +$PHPMAILER_LANG['instantiate'] = '不能实现mail方法。'; +//$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' 您所选择的发送邮件的方法并不支持。'; +$PHPMAILER_LANG['provide_address'] = '您必须提供至少一个 收信人的email地址。'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误: 下面的 收件人失败了: '; +//$PHPMAILER_LANG['signing'] = 'Signing Error: '; +//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; +//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; +//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-cs.php b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-cs.php new file mode 100644 index 0000000..1160cf0 --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-cs.php @@ -0,0 +1,25 @@ + + * Rewrite and extension of the work by Mikael Stokkebro + * + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP fejl: Login mislykkedes.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP fejl: Forbindelse til SMTP serveren kunne ikke oprettes.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP fejl: Data blev ikke accepteret.'; +$PHPMAILER_LANG['empty_message'] = 'Meddelelsen er uden indhold'; +$PHPMAILER_LANG['encoding'] = 'Ukendt encode-format: '; +$PHPMAILER_LANG['execute'] = 'Kunne ikke afvikle: '; +$PHPMAILER_LANG['file_access'] = 'Kunne ikke tilgå filen: '; +$PHPMAILER_LANG['file_open'] = 'Fil fejl: Kunne ikke åbne filen: '; +$PHPMAILER_LANG['from_failed'] = 'Følgende afsenderadresse er forkert: '; +$PHPMAILER_LANG['instantiate'] = 'Email funktionen kunne ikke initialiseres.'; +$PHPMAILER_LANG['invalid_address'] = 'Udgyldig adresse: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer understøttes ikke.'; +$PHPMAILER_LANG['provide_address'] = 'Indtast mindst en modtagers email adresse.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP fejl: Følgende modtagere er forkerte: '; +$PHPMAILER_LANG['signing'] = 'Signeringsfejl: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() fejlede.'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP server fejl: '; +$PHPMAILER_LANG['variable_set'] = 'Kunne ikke definere eller nulstille variablen: '; +$PHPMAILER_LANG['extension_missing'] = 'Udvidelse mangler: '; diff --git a/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-de.php b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-de.php new file mode 100644 index 0000000..b36c6cb --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-de.php @@ -0,0 +1,27 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Error SMTP: Imposible autentificar.'; +$PHPMAILER_LANG['connect_host'] = 'Error SMTP: Imposible conectar al servidor SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Error SMTP: Datos no aceptados.'; +$PHPMAILER_LANG['empty_message'] = 'El cuerpo del mensaje está vacío.'; +$PHPMAILER_LANG['encoding'] = 'Codificación desconocida: '; +$PHPMAILER_LANG['execute'] = 'Imposible ejecutar: '; +$PHPMAILER_LANG['file_access'] = 'Imposible acceder al archivo: '; +$PHPMAILER_LANG['file_open'] = 'Error de Archivo: Imposible abrir el archivo: '; +$PHPMAILER_LANG['from_failed'] = 'La(s) siguiente(s) direcciones de remitente fallaron: '; +$PHPMAILER_LANG['instantiate'] = 'Imposible crear una instancia de la función Mail.'; +$PHPMAILER_LANG['invalid_address'] = 'Imposible enviar: dirección de email inválido: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer no está soportado.'; +$PHPMAILER_LANG['provide_address'] = 'Debe proporcionar al menos una dirección de email de destino.'; +$PHPMAILER_LANG['recipients_failed'] = 'Error SMTP: Los siguientes destinos fallaron: '; +$PHPMAILER_LANG['signing'] = 'Error al firmar: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falló.'; +$PHPMAILER_LANG['smtp_error'] = 'Error del servidor SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'No se pudo configurar la variable: '; +$PHPMAILER_LANG['extension_missing'] = 'Extensión faltante: '; diff --git a/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-et.php b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-et.php new file mode 100644 index 0000000..7e06da1 --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-et.php @@ -0,0 +1,27 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP Viga: Autoriseerimise viga.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP Viga: Ei õnnestunud luua ühendust SMTP serveriga.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Viga: Vigased andmed.'; +$PHPMAILER_LANG['empty_message'] = 'Tühi kirja sisu'; +$PHPMAILER_LANG["encoding"] = 'Tundmatu kodeering: '; +$PHPMAILER_LANG['execute'] = 'Tegevus ebaõnnestus: '; +$PHPMAILER_LANG['file_access'] = 'Pole piisavalt õiguseid järgneva faili avamiseks: '; +$PHPMAILER_LANG['file_open'] = 'Faili Viga: Faili avamine ebaõnnestus: '; +$PHPMAILER_LANG['from_failed'] = 'Järgnev saatja e-posti aadress on vigane: '; +$PHPMAILER_LANG['instantiate'] = 'mail funktiooni käivitamine ebaõnnestus.'; +$PHPMAILER_LANG['invalid_address'] = 'Saatmine peatatud, e-posti address vigane: '; +$PHPMAILER_LANG['provide_address'] = 'Te peate määrama vähemalt ühe saaja e-posti aadressi.'; +$PHPMAILER_LANG['mailer_not_supported'] = ' maileri tugi puudub.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP Viga: Järgnevate saajate e-posti aadressid on vigased: '; +$PHPMAILER_LANG["signing"] = 'Viga allkirjastamisel: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() ebaõnnestus.'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP serveri viga: '; +$PHPMAILER_LANG['variable_set'] = 'Ei õnnestunud määrata või lähtestada muutujat: '; +$PHPMAILER_LANG['extension_missing'] = 'Nõutud laiendus on puudu: '; diff --git a/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-fa.php b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-fa.php new file mode 100644 index 0000000..8aa0ad2 --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-fa.php @@ -0,0 +1,27 @@ + + * @author Mohammad Hossein Mojtahedi + */ + +$PHPMAILER_LANG['authenticate'] = 'خطای SMTP: احراز هویت با شکست مواجه شد.'; +$PHPMAILER_LANG['connect_host'] = 'خطای SMTP: اتصال به سرور SMTP برقرار نشد.'; +$PHPMAILER_LANG['data_not_accepted'] = 'خطای SMTP: داده‌ها نا‌درست هستند.'; +$PHPMAILER_LANG['empty_message'] = 'بخش متن پیام خالی است.'; +$PHPMAILER_LANG['encoding'] = 'کد‌گذاری نا‌شناخته: '; +$PHPMAILER_LANG['execute'] = 'امکان اجرا وجود ندارد: '; +$PHPMAILER_LANG['file_access'] = 'امکان دسترسی به فایل وجود ندارد: '; +$PHPMAILER_LANG['file_open'] = 'خطای File: امکان بازکردن فایل وجود ندارد: '; +$PHPMAILER_LANG['from_failed'] = 'آدرس فرستنده اشتباه است: '; +$PHPMAILER_LANG['instantiate'] = 'امکان معرفی تابع ایمیل وجود ندارد.'; +$PHPMAILER_LANG['invalid_address'] = 'آدرس ایمیل معتبر نیست: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer پشتیبانی نمی‌شود.'; +$PHPMAILER_LANG['provide_address'] = 'باید حداقل یک آدرس گیرنده وارد کنید.'; +$PHPMAILER_LANG['recipients_failed'] = 'خطای SMTP: ارسال به آدرس گیرنده با خطا مواجه شد: '; +$PHPMAILER_LANG['signing'] = 'خطا در امضا: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'خطا در اتصال به SMTP.'; +$PHPMAILER_LANG['smtp_error'] = 'خطا در SMTP Server: '; +$PHPMAILER_LANG['variable_set'] = 'امکان ارسال یا ارسال مجدد متغیر‌ها وجود ندارد: '; +$PHPMAILER_LANG['extension_missing'] = 'افزونه موجود نیست: '; diff --git a/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-fi.php b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-fi.php new file mode 100644 index 0000000..ec4e752 --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-fi.php @@ -0,0 +1,27 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP feilur: Kundi ikki góðkenna.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP feilur: Kundi ikki knýta samband við SMTP vert.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP feilur: Data ikki góðkent.'; +//$PHPMAILER_LANG['empty_message'] = 'Message body empty'; +$PHPMAILER_LANG['encoding'] = 'Ókend encoding: '; +$PHPMAILER_LANG['execute'] = 'Kundi ikki útføra: '; +$PHPMAILER_LANG['file_access'] = 'Kundi ikki tilganga fílu: '; +$PHPMAILER_LANG['file_open'] = 'Fílu feilur: Kundi ikki opna fílu: '; +$PHPMAILER_LANG['from_failed'] = 'fylgjandi Frá/From adressa miseydnaðist: '; +$PHPMAILER_LANG['instantiate'] = 'Kuni ikki instantiera mail funktión.'; +//$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' er ikki supporterað.'; +$PHPMAILER_LANG['provide_address'] = 'Tú skal uppgeva minst móttakara-emailadressu(r).'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP Feilur: Fylgjandi móttakarar miseydnaðust: '; +//$PHPMAILER_LANG['signing'] = 'Signing Error: '; +//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; +//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; +//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php new file mode 100644 index 0000000..af68c92 --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php @@ -0,0 +1,29 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Erro SMTP: Non puido ser autentificado.'; +$PHPMAILER_LANG['connect_host'] = 'Erro SMTP: Non puido conectar co servidor SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Erro SMTP: Datos non aceptados.'; +$PHPMAILER_LANG['empty_message'] = 'Corpo da mensaxe vacía'; +$PHPMAILER_LANG['encoding'] = 'Codificación descoñecida: '; +$PHPMAILER_LANG['execute'] = 'Non puido ser executado: '; +$PHPMAILER_LANG['file_access'] = 'Nob puido acceder ó arquivo: '; +$PHPMAILER_LANG['file_open'] = 'Erro de Arquivo: No puido abrir o arquivo: '; +$PHPMAILER_LANG['from_failed'] = 'A(s) seguinte(s) dirección(s) de remitente(s) deron erro: '; +$PHPMAILER_LANG['instantiate'] = 'Non puido crear unha instancia da función Mail.'; +$PHPMAILER_LANG['invalid_address'] = 'Non puido envia-lo correo: dirección de email inválida: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer non está soportado.'; +$PHPMAILER_LANG['provide_address'] = 'Debe engadir polo menos unha dirección de email coma destino.'; +$PHPMAILER_LANG['recipients_failed'] = 'Erro SMTP: Os seguintes destinos fallaron: '; +$PHPMAILER_LANG['signing'] = 'Erro ó firmar: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() fallou.'; +$PHPMAILER_LANG['smtp_error'] = 'Erro do servidor SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'Non puidemos axustar ou reaxustar a variábel: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-he.php b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-he.php new file mode 100644 index 0000000..70eb717 --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-he.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'שגיאת SMTP: פעולת האימות נכשלה.'; +$PHPMAILER_LANG['connect_host'] = 'שגיאת SMTP: לא הצלחתי להתחבר לשרת SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'שגיאת SMTP: מידע לא התקבל.'; +$PHPMAILER_LANG['empty_message'] = 'גוף ההודעה ריק'; +$PHPMAILER_LANG['invalid_address'] = 'כתובת שגויה: '; +$PHPMAILER_LANG['encoding'] = 'קידוד לא מוכר: '; +$PHPMAILER_LANG['execute'] = 'לא הצלחתי להפעיל את: '; +$PHPMAILER_LANG['file_access'] = 'לא ניתן לגשת לקובץ: '; +$PHPMAILER_LANG['file_open'] = 'שגיאת קובץ: לא ניתן לגשת לקובץ: '; +$PHPMAILER_LANG['from_failed'] = 'כתובות הנמענים הבאות נכשלו: '; +$PHPMAILER_LANG['instantiate'] = 'לא הצלחתי להפעיל את פונקציית המייל.'; +$PHPMAILER_LANG['mailer_not_supported'] = ' אינה נתמכת.'; +$PHPMAILER_LANG['provide_address'] = 'חובה לספק לפחות כתובת אחת של מקבל המייל.'; +$PHPMAILER_LANG['recipients_failed'] = 'שגיאת SMTP: הנמענים הבאים נכשלו: '; +$PHPMAILER_LANG['signing'] = 'שגיאת חתימה: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; +$PHPMAILER_LANG['smtp_error'] = 'שגיאת שרת SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'לא ניתן לקבוע או לשנות את המשתנה: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-hi.php b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-hi.php new file mode 100644 index 0000000..607a5ee --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-hi.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP त्रुटि: प्रामाणिकता की जांच नहीं हो सका। '; +$PHPMAILER_LANG['connect_host'] = 'SMTP त्रुटि: SMTP सर्वर से कनेक्ट नहीं हो सका। '; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP त्रुटि: डेटा स्वीकार नहीं किया जाता है। '; +$PHPMAILER_LANG['empty_message'] = 'संदेश खाली है। '; +$PHPMAILER_LANG['encoding'] = 'अज्ञात एन्कोडिंग प्रकार। '; +$PHPMAILER_LANG['execute'] = 'आदेश को निष्पादित करने में विफल। '; +$PHPMAILER_LANG['file_access'] = 'फ़ाइल उपलब्ध नहीं है। '; +$PHPMAILER_LANG['file_open'] = 'फ़ाइल त्रुटि: फाइल को खोला नहीं जा सका। '; +$PHPMAILER_LANG['from_failed'] = 'प्रेषक का पता गलत है। '; +$PHPMAILER_LANG['instantiate'] = 'मेल फ़ंक्शन कॉल नहीं कर सकता है।'; +$PHPMAILER_LANG['invalid_address'] = 'पता गलत है। '; +$PHPMAILER_LANG['mailer_not_supported'] = 'मेल सर्वर के साथ काम नहीं करता है। '; +$PHPMAILER_LANG['provide_address'] = 'आपको कम से कम एक प्राप्तकर्ता का ई-मेल पता प्रदान करना होगा।'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP त्रुटि: निम्न प्राप्तकर्ताओं को पते भेजने में विफल। '; +$PHPMAILER_LANG['signing'] = 'साइनअप त्रुटि:। '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP का connect () फ़ंक्शन विफल हुआ। '; +$PHPMAILER_LANG['smtp_error'] = 'SMTP सर्वर त्रुटि। '; +$PHPMAILER_LANG['variable_set'] = 'चर को बना या संशोधित नहीं किया जा सकता। '; +$PHPMAILER_LANG['extension_missing'] = 'एक्सटेन्षन गायब है: '; diff --git a/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-hr.php b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-hr.php new file mode 100644 index 0000000..3822920 --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-hr.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP Greška: Neuspjela autentikacija.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP Greška: Ne mogu se spojiti na SMTP poslužitelj.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Greška: Podatci nisu prihvaćeni.'; +$PHPMAILER_LANG['empty_message'] = 'Sadržaj poruke je prazan.'; +$PHPMAILER_LANG['encoding'] = 'Nepoznati encoding: '; +$PHPMAILER_LANG['execute'] = 'Nije moguće izvršiti naredbu: '; +$PHPMAILER_LANG['file_access'] = 'Nije moguće pristupiti datoteci: '; +$PHPMAILER_LANG['file_open'] = 'Nije moguće otvoriti datoteku: '; +$PHPMAILER_LANG['from_failed'] = 'SMTP Greška: Slanje s navedenih e-mail adresa nije uspjelo: '; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP Greška: Slanje na navedenih e-mail adresa nije uspjelo: '; +$PHPMAILER_LANG['instantiate'] = 'Ne mogu pokrenuti mail funkcionalnost.'; +$PHPMAILER_LANG['invalid_address'] = 'E-mail nije poslan. Neispravna e-mail adresa: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer nije podržan.'; +$PHPMAILER_LANG['provide_address'] = 'Definirajte barem jednu adresu primatelja.'; +$PHPMAILER_LANG['signing'] = 'Greška prilikom prijave: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Spajanje na SMTP poslužitelj nije uspjelo.'; +$PHPMAILER_LANG['smtp_error'] = 'Greška SMTP poslužitelja: '; +$PHPMAILER_LANG['variable_set'] = 'Ne mogu postaviti varijablu niti ju vratiti nazad: '; +$PHPMAILER_LANG['extension_missing'] = 'Nedostaje proširenje: '; diff --git a/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-hu.php b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-hu.php new file mode 100644 index 0000000..196cddc --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-hu.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP -ի սխալ: չհաջողվեց ստուգել իսկությունը.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP -ի սխալ: չհաջողվեց կապ հաստատել SMTP սերվերի հետ.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP -ի սխալ: տվյալները ընդունված չեն.'; +$PHPMAILER_LANG['empty_message'] = 'Հաղորդագրությունը դատարկ է'; +$PHPMAILER_LANG['encoding'] = 'Կոդավորման անհայտ տեսակ: '; +$PHPMAILER_LANG['execute'] = 'Չհաջողվեց իրականացնել հրամանը: '; +$PHPMAILER_LANG['file_access'] = 'Ֆայլը հասանելի չէ: '; +$PHPMAILER_LANG['file_open'] = 'Ֆայլի սխալ: ֆայլը չհաջողվեց բացել: '; +$PHPMAILER_LANG['from_failed'] = 'Ուղարկողի հետևյալ հասցեն սխալ է: '; +$PHPMAILER_LANG['instantiate'] = 'Հնարավոր չէ կանչել mail ֆունկցիան.'; +$PHPMAILER_LANG['invalid_address'] = 'Հասցեն սխալ է: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' փոստային սերվերի հետ չի աշխատում.'; +$PHPMAILER_LANG['provide_address'] = 'Անհրաժեշտ է տրամադրել գոնե մեկ ստացողի e-mail հասցե.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP -ի սխալ: չի հաջողվել ուղարկել հետևյալ ստացողների հասցեներին: '; +$PHPMAILER_LANG['signing'] = 'Ստորագրման սխալ: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP -ի connect() ֆունկցիան չի հաջողվել'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP սերվերի սխալ: '; +$PHPMAILER_LANG['variable_set'] = 'Չի հաջողվում ստեղծել կամ վերափոխել փոփոխականը: '; +$PHPMAILER_LANG['extension_missing'] = 'Հավելվածը բացակայում է: '; diff --git a/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-id.php b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-id.php new file mode 100644 index 0000000..1353bab --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-id.php @@ -0,0 +1,30 @@ + + * @author @januridp + * @author Ian Mustafa + */ + +$PHPMAILER_LANG['authenticate'] = 'Kesalahan SMTP: Tidak dapat mengotentikasi.'; +$PHPMAILER_LANG['connect_host'] = 'Kesalahan SMTP: Tidak dapat terhubung ke host SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Kesalahan SMTP: Data tidak diterima.'; +$PHPMAILER_LANG['empty_message'] = 'Isi pesan kosong'; +$PHPMAILER_LANG['encoding'] = 'Pengkodean karakter tidak dikenali: '; +$PHPMAILER_LANG['execute'] = 'Tidak dapat menjalankan proses: '; +$PHPMAILER_LANG['file_access'] = 'Tidak dapat mengakses berkas: '; +$PHPMAILER_LANG['file_open'] = 'Kesalahan Berkas: Berkas tidak dapat dibuka: '; +$PHPMAILER_LANG['from_failed'] = 'Alamat pengirim berikut mengakibatkan kesalahan: '; +$PHPMAILER_LANG['instantiate'] = 'Tidak dapat menginisialisasi fungsi surel.'; +$PHPMAILER_LANG['invalid_address'] = 'Gagal terkirim, alamat surel tidak sesuai: '; +$PHPMAILER_LANG['invalid_hostentry'] = 'Gagal terkirim, entri host tidak sesuai: '; +$PHPMAILER_LANG['invalid_host'] = 'Gagal terkirim, host tidak sesuai: '; +$PHPMAILER_LANG['provide_address'] = 'Harus tersedia minimal satu alamat tujuan'; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer tidak didukung'; +$PHPMAILER_LANG['recipients_failed'] = 'Kesalahan SMTP: Alamat tujuan berikut menyebabkan kesalahan: '; +$PHPMAILER_LANG['signing'] = 'Kesalahan dalam penandatangan SSL: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() gagal.'; +$PHPMAILER_LANG['smtp_error'] = 'Kesalahan pada pelayan SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'Tidak dapat mengatur atau mengatur ulang variabel: '; +$PHPMAILER_LANG['extension_missing'] = 'Ekstensi PHP tidak tersedia: '; diff --git a/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-it.php b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-it.php new file mode 100644 index 0000000..e67b6f7 --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-it.php @@ -0,0 +1,27 @@ + + * @author Stefano Sabatini + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP Error: Impossibile autenticarsi.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP Error: Impossibile connettersi all\'host SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Error: Dati non accettati dal server.'; +$PHPMAILER_LANG['empty_message'] = 'Il corpo del messaggio è vuoto'; +$PHPMAILER_LANG['encoding'] = 'Codifica dei caratteri sconosciuta: '; +$PHPMAILER_LANG['execute'] = 'Impossibile eseguire l\'operazione: '; +$PHPMAILER_LANG['file_access'] = 'Impossibile accedere al file: '; +$PHPMAILER_LANG['file_open'] = 'File Error: Impossibile aprire il file: '; +$PHPMAILER_LANG['from_failed'] = 'I seguenti indirizzi mittenti hanno generato errore: '; +$PHPMAILER_LANG['instantiate'] = 'Impossibile istanziare la funzione mail'; +$PHPMAILER_LANG['invalid_address'] = 'Impossibile inviare, l\'indirizzo email non è valido: '; +$PHPMAILER_LANG['provide_address'] = 'Deve essere fornito almeno un indirizzo ricevente'; +$PHPMAILER_LANG['mailer_not_supported'] = 'Mailer non supportato'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: I seguenti indirizzi destinatari hanno generato un errore: '; +$PHPMAILER_LANG['signing'] = 'Errore nella firma: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() fallita.'; +$PHPMAILER_LANG['smtp_error'] = 'Errore del server SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'Impossibile impostare o resettare la variabile: '; +$PHPMAILER_LANG['extension_missing'] = 'Estensione mancante: '; diff --git a/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-ja.php b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-ja.php new file mode 100644 index 0000000..2d77872 --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-ja.php @@ -0,0 +1,27 @@ + + * @author Yoshi Sakai + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTPエラー: 認証できませんでした。'; +$PHPMAILER_LANG['connect_host'] = 'SMTPエラー: SMTPホストに接続できませんでした。'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTPエラー: データが受け付けられませんでした。'; +//$PHPMAILER_LANG['empty_message'] = 'Message body empty'; +$PHPMAILER_LANG['encoding'] = '不明なエンコーディング: '; +$PHPMAILER_LANG['execute'] = '実行できませんでした: '; +$PHPMAILER_LANG['file_access'] = 'ファイルにアクセスできません: '; +$PHPMAILER_LANG['file_open'] = 'ファイルエラー: ファイルを開けません: '; +$PHPMAILER_LANG['from_failed'] = 'Fromアドレスを登録する際にエラーが発生しました: '; +$PHPMAILER_LANG['instantiate'] = 'メール関数が正常に動作しませんでした。'; +//$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; +$PHPMAILER_LANG['provide_address'] = '少なくとも1つメールアドレスを 指定する必要があります。'; +$PHPMAILER_LANG['mailer_not_supported'] = ' メーラーがサポートされていません。'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTPエラー: 次の受信者アドレスに 間違いがあります: '; +//$PHPMAILER_LANG['signing'] = 'Signing Error: '; +//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; +//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; +//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-ka.php b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-ka.php new file mode 100644 index 0000000..dd1af8a --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-ka.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP შეცდომა: ავტორიზაცია შეუძლებელია.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP შეცდომა: SMTP სერვერთან დაკავშირება შეუძლებელია.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP შეცდომა: მონაცემები არ იქნა მიღებული.'; +$PHPMAILER_LANG['encoding'] = 'კოდირების უცნობი ტიპი: '; +$PHPMAILER_LANG['execute'] = 'შეუძლებელია შემდეგი ბრძანების შესრულება: '; +$PHPMAILER_LANG['file_access'] = 'შეუძლებელია წვდომა ფაილთან: '; +$PHPMAILER_LANG['file_open'] = 'ფაილური სისტემის შეცდომა: არ იხსნება ფაილი: '; +$PHPMAILER_LANG['from_failed'] = 'გამგზავნის არასწორი მისამართი: '; +$PHPMAILER_LANG['instantiate'] = 'mail ფუნქციის გაშვება ვერ ხერხდება.'; +$PHPMAILER_LANG['provide_address'] = 'გთხოვთ მიუთითოთ ერთი ადრესატის e-mail მისამართი მაინც.'; +$PHPMAILER_LANG['mailer_not_supported'] = ' - საფოსტო სერვერის მხარდაჭერა არ არის.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP შეცდომა: შემდეგ მისამართებზე გაგზავნა ვერ მოხერხდა: '; +$PHPMAILER_LANG['empty_message'] = 'შეტყობინება ცარიელია'; +$PHPMAILER_LANG['invalid_address'] = 'არ გაიგზავნა, e-mail მისამართის არასწორი ფორმატი: '; +$PHPMAILER_LANG['signing'] = 'ხელმოწერის შეცდომა: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'შეცდომა SMTP სერვერთან დაკავშირებისას'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP სერვერის შეცდომა: '; +$PHPMAILER_LANG['variable_set'] = 'შეუძლებელია შემდეგი ცვლადის შექმნა ან შეცვლა: '; +$PHPMAILER_LANG['extension_missing'] = 'ბიბლიოთეკა არ არსებობს: '; diff --git a/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-ko.php b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-ko.php new file mode 100644 index 0000000..9599fa6 --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-ko.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP 오류: 인증할 수 없습니다.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP 오류: SMTP 호스트에 접속할 수 없습니다.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 오류: 데이터가 받아들여지지 않았습니다.'; +$PHPMAILER_LANG['empty_message'] = '메세지 내용이 없습니다'; +$PHPMAILER_LANG['encoding'] = '알 수 없는 인코딩: '; +$PHPMAILER_LANG['execute'] = '실행 불가: '; +$PHPMAILER_LANG['file_access'] = '파일 접근 불가: '; +$PHPMAILER_LANG['file_open'] = '파일 오류: 파일을 열 수 없습니다: '; +$PHPMAILER_LANG['from_failed'] = '다음 From 주소에서 오류가 발생했습니다: '; +$PHPMAILER_LANG['instantiate'] = 'mail 함수를 인스턴스화할 수 없습니다'; +$PHPMAILER_LANG['invalid_address'] = '잘못된 주소: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' 메일러는 지원되지 않습니다.'; +$PHPMAILER_LANG['provide_address'] = '적어도 한 개 이상의 수신자 메일 주소를 제공해야 합니다.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP 오류: 다음 수신자에서 오류가 발생했습니다: '; +$PHPMAILER_LANG['signing'] = '서명 오류: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP 연결을 실패하였습니다.'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP 서버 오류: '; +$PHPMAILER_LANG['variable_set'] = '변수 설정 및 초기화 불가: '; +$PHPMAILER_LANG['extension_missing'] = '확장자 없음: '; diff --git a/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-lt.php b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-lt.php new file mode 100644 index 0000000..1253a4f --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-lt.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP klaida: autentifikacija nepavyko.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP klaida: nepavyksta prisijungti prie SMTP stoties.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP klaida: duomenys nepriimti.'; +$PHPMAILER_LANG['empty_message'] = 'Laiško turinys tuščias'; +$PHPMAILER_LANG['encoding'] = 'Neatpažinta koduotė: '; +$PHPMAILER_LANG['execute'] = 'Nepavyko įvykdyti komandos: '; +$PHPMAILER_LANG['file_access'] = 'Byla nepasiekiama: '; +$PHPMAILER_LANG['file_open'] = 'Bylos klaida: Nepavyksta atidaryti: '; +$PHPMAILER_LANG['from_failed'] = 'Neteisingas siuntėjo adresas: '; +$PHPMAILER_LANG['instantiate'] = 'Nepavyko paleisti mail funkcijos.'; +$PHPMAILER_LANG['invalid_address'] = 'Neteisingas adresas: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' pašto stotis nepalaikoma.'; +$PHPMAILER_LANG['provide_address'] = 'Nurodykite bent vieną gavėjo adresą.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP klaida: nepavyko išsiųsti šiems gavėjams: '; +$PHPMAILER_LANG['signing'] = 'Prisijungimo klaida: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP susijungimo klaida'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP stoties klaida: '; +$PHPMAILER_LANG['variable_set'] = 'Nepavyko priskirti reikšmės kintamajam: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-lv.php b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-lv.php new file mode 100644 index 0000000..39bf9a1 --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-lv.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP kļūda: Autorizācija neizdevās.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP Kļūda: Nevar izveidot savienojumu ar SMTP serveri.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Kļūda: Nepieņem informāciju.'; +$PHPMAILER_LANG['empty_message'] = 'Ziņojuma teksts ir tukšs'; +$PHPMAILER_LANG['encoding'] = 'Neatpazīts kodējums: '; +$PHPMAILER_LANG['execute'] = 'Neizdevās izpildīt komandu: '; +$PHPMAILER_LANG['file_access'] = 'Fails nav pieejams: '; +$PHPMAILER_LANG['file_open'] = 'Faila kļūda: Nevar atvērt failu: '; +$PHPMAILER_LANG['from_failed'] = 'Nepareiza sūtītāja adrese: '; +$PHPMAILER_LANG['instantiate'] = 'Nevar palaist sūtīšanas funkciju.'; +$PHPMAILER_LANG['invalid_address'] = 'Nepareiza adrese: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' sūtītājs netiek atbalstīts.'; +$PHPMAILER_LANG['provide_address'] = 'Lūdzu, norādiet vismaz vienu adresātu.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP kļūda: neizdevās nosūtīt šādiem saņēmējiem: '; +$PHPMAILER_LANG['signing'] = 'Autorizācijas kļūda: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP savienojuma kļūda'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP servera kļūda: '; +$PHPMAILER_LANG['variable_set'] = 'Nevar piešķirt mainīgā vērtību: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-mg.php b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-mg.php new file mode 100644 index 0000000..f4c7563 --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-mg.php @@ -0,0 +1,25 @@ + + */ +$PHPMAILER_LANG['authenticate'] = 'Hadisoana SMTP: Tsy nahomby ny fanamarinana.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP Error: Tsy afaka mampifandray amin\'ny mpampiantrano SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP diso: tsy voarakitra ny angona.'; +$PHPMAILER_LANG['empty_message'] = 'Tsy misy ny votoaty mailaka.'; +$PHPMAILER_LANG['encoding'] = 'Tsy fantatra encoding: '; +$PHPMAILER_LANG['execute'] = 'Tsy afaka manatanteraka ity baiko manaraka ity: '; +$PHPMAILER_LANG['file_access'] = 'Tsy nahomby ny fidirana amin\'ity rakitra ity: '; +$PHPMAILER_LANG['file_open'] = 'Hadisoana diso: Tsy afaka nanokatra ity file manaraka ity: '; +$PHPMAILER_LANG['from_failed'] = 'Ny adiresy iraka manaraka dia diso: '; +$PHPMAILER_LANG['instantiate'] = 'Tsy afaka nanomboka ny hetsika mail.'; +$PHPMAILER_LANG['invalid_address'] = 'Tsy mety ny adiresy: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer tsy manohana.'; +$PHPMAILER_LANG['provide_address'] = 'Alefaso azafady iray adiresy iray farafahakeliny.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: Tsy mety ireo mpanaraka ireto: '; +$PHPMAILER_LANG['signing'] = 'Error nandritra ny sonia:'; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Tsy nahomby ny fifandraisana tamin\'ny server SMTP.'; +$PHPMAILER_LANG['smtp_error'] = 'Fahadisoana tamin\'ny server SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'Tsy azo atao ny mametraka na mamerina ny variable: '; +$PHPMAILER_LANG['extension_missing'] = 'Tsy hita ny ampahany: '; diff --git a/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-ms.php b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-ms.php new file mode 100644 index 0000000..f12a6ad --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-ms.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Ralat SMTP: Tidak dapat pengesahan.'; +$PHPMAILER_LANG['connect_host'] = 'Ralat SMTP: Tidak dapat menghubungi hos pelayan SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Ralat SMTP: Data tidak diterima oleh pelayan.'; +$PHPMAILER_LANG['empty_message'] = 'Tiada isi untuk mesej'; +$PHPMAILER_LANG['encoding'] = 'Pengekodan tidak diketahui: '; +$PHPMAILER_LANG['execute'] = 'Tidak dapat melaksanakan: '; +$PHPMAILER_LANG['file_access'] = 'Tidak dapat mengakses fail: '; +$PHPMAILER_LANG['file_open'] = 'Ralat Fail: Tidak dapat membuka fail: '; +$PHPMAILER_LANG['from_failed'] = 'Berikut merupakan ralat dari alamat e-mel: '; +$PHPMAILER_LANG['instantiate'] = 'Tidak dapat memberi contoh fungsi e-mel.'; +$PHPMAILER_LANG['invalid_address'] = 'Alamat emel tidak sah: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' jenis penghantar emel tidak disokong.'; +$PHPMAILER_LANG['provide_address'] = 'Anda perlu menyediakan sekurang-kurangnya satu alamat e-mel penerima.'; +$PHPMAILER_LANG['recipients_failed'] = 'Ralat SMTP: Penerima e-mel berikut telah gagal: '; +$PHPMAILER_LANG['signing'] = 'Ralat pada tanda tangan: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() telah gagal.'; +$PHPMAILER_LANG['smtp_error'] = 'Ralat pada pelayan SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'Tidak boleh menetapkan atau menetapkan semula pembolehubah: '; +$PHPMAILER_LANG['extension_missing'] = 'Sambungan hilang: '; diff --git a/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-nb.php b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-nb.php new file mode 100644 index 0000000..97403e7 --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-nb.php @@ -0,0 +1,25 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP-fout: authenticatie mislukt.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP-fout: kon niet verbinden met SMTP-host.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP-fout: data niet geaccepteerd.'; +$PHPMAILER_LANG['empty_message'] = 'Berichttekst is leeg'; +$PHPMAILER_LANG['encoding'] = 'Onbekende codering: '; +$PHPMAILER_LANG['execute'] = 'Kon niet uitvoeren: '; +$PHPMAILER_LANG['file_access'] = 'Kreeg geen toegang tot bestand: '; +$PHPMAILER_LANG['file_open'] = 'Bestandsfout: kon bestand niet openen: '; +$PHPMAILER_LANG['from_failed'] = 'Het volgende afzendersadres is mislukt: '; +$PHPMAILER_LANG['instantiate'] = 'Kon mailfunctie niet initialiseren.'; +$PHPMAILER_LANG['invalid_address'] = 'Ongeldig adres: '; +$PHPMAILER_LANG['invalid_hostentry'] = 'Ongeldige hostentry: '; +$PHPMAILER_LANG['invalid_host'] = 'Ongeldige host: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer wordt niet ondersteund.'; +$PHPMAILER_LANG['provide_address'] = 'Er moet minstens één ontvanger worden opgegeven.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP-fout: de volgende ontvangers zijn mislukt: '; +$PHPMAILER_LANG['signing'] = 'Signeerfout: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Verbinding mislukt.'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP-serverfout: '; +$PHPMAILER_LANG['variable_set'] = 'Kan de volgende variabele niet instellen of resetten: '; +$PHPMAILER_LANG['extension_missing'] = 'Extensie afwezig: '; diff --git a/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-pl.php b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-pl.php new file mode 100644 index 0000000..3da0dee --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-pl.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Erro do SMTP: Não foi possível realizar a autenticação.'; +$PHPMAILER_LANG['connect_host'] = 'Erro do SMTP: Não foi possível realizar ligação com o servidor SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Erro do SMTP: Os dados foram rejeitados.'; +$PHPMAILER_LANG['empty_message'] = 'A mensagem no e-mail está vazia.'; +$PHPMAILER_LANG['encoding'] = 'Codificação desconhecida: '; +$PHPMAILER_LANG['execute'] = 'Não foi possível executar: '; +$PHPMAILER_LANG['file_access'] = 'Não foi possível aceder o ficheiro: '; +$PHPMAILER_LANG['file_open'] = 'Abertura do ficheiro: Não foi possível abrir o ficheiro: '; +$PHPMAILER_LANG['from_failed'] = 'Ocorreram falhas nos endereços dos seguintes remententes: '; +$PHPMAILER_LANG['instantiate'] = 'Não foi possível iniciar uma instância da função mail.'; +$PHPMAILER_LANG['invalid_address'] = 'Não foi enviado nenhum e-mail para o endereço de e-mail inválido: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer não é suportado.'; +$PHPMAILER_LANG['provide_address'] = 'Tem de fornecer pelo menos um endereço como destinatário do e-mail.'; +$PHPMAILER_LANG['recipients_failed'] = 'Erro do SMTP: O endereço do seguinte destinatário falhou: '; +$PHPMAILER_LANG['signing'] = 'Erro ao assinar: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falhou.'; +$PHPMAILER_LANG['smtp_error'] = 'Erro de servidor SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'Não foi possível definir ou redefinir a variável: '; +$PHPMAILER_LANG['extension_missing'] = 'Extensão em falta: '; diff --git a/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-pt_br.php b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-pt_br.php new file mode 100644 index 0000000..62d692d --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-pt_br.php @@ -0,0 +1,29 @@ + + * @author Lucas Guimarães + * @author Phelipe Alves + * @author Fabio Beneditto + */ + +$PHPMAILER_LANG['authenticate'] = 'Erro de SMTP: Não foi possível autenticar.'; +$PHPMAILER_LANG['connect_host'] = 'Erro de SMTP: Não foi possível conectar ao servidor SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Erro de SMTP: Dados rejeitados.'; +$PHPMAILER_LANG['empty_message'] = 'Mensagem vazia'; +$PHPMAILER_LANG['encoding'] = 'Codificação desconhecida: '; +$PHPMAILER_LANG['execute'] = 'Não foi possível executar: '; +$PHPMAILER_LANG['file_access'] = 'Não foi possível acessar o arquivo: '; +$PHPMAILER_LANG['file_open'] = 'Erro de Arquivo: Não foi possível abrir o arquivo: '; +$PHPMAILER_LANG['from_failed'] = 'Os seguintes remetentes falharam: '; +$PHPMAILER_LANG['instantiate'] = 'Não foi possível instanciar a função mail.'; +$PHPMAILER_LANG['invalid_address'] = 'Endereço de e-mail inválido: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer não é suportado.'; +$PHPMAILER_LANG['provide_address'] = 'Você deve informar pelo menos um destinatário.'; +$PHPMAILER_LANG['recipients_failed'] = 'Erro de SMTP: Os seguintes destinatários falharam: '; +$PHPMAILER_LANG['signing'] = 'Erro de Assinatura: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falhou.'; +$PHPMAILER_LANG['smtp_error'] = 'Erro de servidor SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'Não foi possível definir ou redefinir a variável: '; +$PHPMAILER_LANG['extension_missing'] = 'Extensão não existe: '; diff --git a/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-ro.php b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-ro.php new file mode 100644 index 0000000..fa100ea --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-ro.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Eroare SMTP: Autentificarea a eșuat.'; +$PHPMAILER_LANG['connect_host'] = 'Eroare SMTP: Conectarea la serverul SMTP a eșuat.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Eroare SMTP: Datele nu au fost acceptate.'; +$PHPMAILER_LANG['empty_message'] = 'Mesajul este gol.'; +$PHPMAILER_LANG['encoding'] = 'Encodare necunoscută: '; +$PHPMAILER_LANG['execute'] = 'Nu se poate executa următoarea comandă: '; +$PHPMAILER_LANG['file_access'] = 'Nu se poate accesa următorul fișier: '; +$PHPMAILER_LANG['file_open'] = 'Eroare fișier: Nu se poate deschide următorul fișier: '; +$PHPMAILER_LANG['from_failed'] = 'Următoarele adrese From au dat eroare: '; +$PHPMAILER_LANG['instantiate'] = 'Funcția mail nu a putut fi inițializată.'; +$PHPMAILER_LANG['invalid_address'] = 'Adresa de email nu este validă: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer nu este suportat.'; +$PHPMAILER_LANG['provide_address'] = 'Trebuie să adăugați cel puțin o adresă de email.'; +$PHPMAILER_LANG['recipients_failed'] = 'Eroare SMTP: Următoarele adrese de email au eșuat: '; +$PHPMAILER_LANG['signing'] = 'A aparut o problemă la semnarea emailului. '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Conectarea la serverul SMTP a eșuat.'; +$PHPMAILER_LANG['smtp_error'] = 'Eroare server SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'Nu se poate seta/reseta variabila. '; +$PHPMAILER_LANG['extension_missing'] = 'Lipsește extensia: '; diff --git a/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-ru.php b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-ru.php new file mode 100644 index 0000000..720e9a1 --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-ru.php @@ -0,0 +1,27 @@ + + * @author Foster Snowhill + */ + +$PHPMAILER_LANG['authenticate'] = 'Ошибка SMTP: ошибка авторизации.'; +$PHPMAILER_LANG['connect_host'] = 'Ошибка SMTP: не удается подключиться к SMTP-серверу.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Ошибка SMTP: данные не приняты.'; +$PHPMAILER_LANG['encoding'] = 'Неизвестная кодировка: '; +$PHPMAILER_LANG['execute'] = 'Невозможно выполнить команду: '; +$PHPMAILER_LANG['file_access'] = 'Нет доступа к файлу: '; +$PHPMAILER_LANG['file_open'] = 'Файловая ошибка: не удаётся открыть файл: '; +$PHPMAILER_LANG['from_failed'] = 'Неверный адрес отправителя: '; +$PHPMAILER_LANG['instantiate'] = 'Невозможно запустить функцию mail().'; +$PHPMAILER_LANG['provide_address'] = 'Пожалуйста, введите хотя бы один email-адрес получателя.'; +$PHPMAILER_LANG['mailer_not_supported'] = ' — почтовый сервер не поддерживается.'; +$PHPMAILER_LANG['recipients_failed'] = 'Ошибка SMTP: не удалась отправка таким адресатам: '; +$PHPMAILER_LANG['empty_message'] = 'Пустое сообщение'; +$PHPMAILER_LANG['invalid_address'] = 'Не отправлено из-за неправильного формата email-адреса: '; +$PHPMAILER_LANG['signing'] = 'Ошибка подписи: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Ошибка соединения с SMTP-сервером'; +$PHPMAILER_LANG['smtp_error'] = 'Ошибка SMTP-сервера: '; +$PHPMAILER_LANG['variable_set'] = 'Невозможно установить или сбросить переменную: '; +$PHPMAILER_LANG['extension_missing'] = 'Расширение отсутствует: '; diff --git a/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-sk.php b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-sk.php new file mode 100644 index 0000000..69cfb0f --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-sk.php @@ -0,0 +1,27 @@ + + * @author Peter Orlický + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP Error: Chyba autentifikácie.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP Error: Nebolo možné nadviazať spojenie so SMTP serverom.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Error: Dáta neboli prijaté'; +$PHPMAILER_LANG['empty_message'] = 'Prázdne telo správy.'; +$PHPMAILER_LANG['encoding'] = 'Neznáme kódovanie: '; +$PHPMAILER_LANG['execute'] = 'Nedá sa vykonať: '; +$PHPMAILER_LANG['file_access'] = 'Súbor nebol nájdený: '; +$PHPMAILER_LANG['file_open'] = 'File Error: Súbor sa otvoriť pre čítanie: '; +$PHPMAILER_LANG['from_failed'] = 'Následujúca adresa From je nesprávna: '; +$PHPMAILER_LANG['instantiate'] = 'Nedá sa vytvoriť inštancia emailovej funkcie.'; +$PHPMAILER_LANG['invalid_address'] = 'Neodoslané, emailová adresa je nesprávna: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' emailový klient nieje podporovaný.'; +$PHPMAILER_LANG['provide_address'] = 'Musíte zadať aspoň jednu emailovú adresu príjemcu.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: Adresy príjemcov niesu správne '; +$PHPMAILER_LANG['signing'] = 'Chyba prihlasovania: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() zlyhalo.'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP chyba serveru: '; +$PHPMAILER_LANG['variable_set'] = 'Nemožno nastaviť alebo resetovať premennú: '; +$PHPMAILER_LANG['extension_missing'] = 'Chýba rozšírenie: '; diff --git a/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-sl.php b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-sl.php new file mode 100644 index 0000000..1e3cb7f --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-sl.php @@ -0,0 +1,27 @@ + + * @author Filip Š + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP napaka: Avtentikacija ni uspela.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP napaka: Vzpostavljanje povezave s SMTP gostiteljem ni uspelo.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP napaka: Strežnik zavrača podatke.'; +$PHPMAILER_LANG['empty_message'] = 'E-poštno sporočilo nima vsebine.'; +$PHPMAILER_LANG['encoding'] = 'Nepoznan tip kodiranja: '; +$PHPMAILER_LANG['execute'] = 'Operacija ni uspela: '; +$PHPMAILER_LANG['file_access'] = 'Nimam dostopa do datoteke: '; +$PHPMAILER_LANG['file_open'] = 'Ne morem odpreti datoteke: '; +$PHPMAILER_LANG['from_failed'] = 'Neveljaven e-naslov pošiljatelja: '; +$PHPMAILER_LANG['instantiate'] = 'Ne morem inicializirati mail funkcije.'; +$PHPMAILER_LANG['invalid_address'] = 'E-poštno sporočilo ni bilo poslano. E-naslov je neveljaven: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer ni podprt.'; +$PHPMAILER_LANG['provide_address'] = 'Prosim vnesite vsaj enega naslovnika.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP napaka: Sledeči naslovniki so neveljavni: '; +$PHPMAILER_LANG['signing'] = 'Napaka pri podpisovanju: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Ne morem vzpostaviti povezave s SMTP strežnikom.'; +$PHPMAILER_LANG['smtp_error'] = 'Napaka SMTP strežnika: '; +$PHPMAILER_LANG['variable_set'] = 'Ne morem nastaviti oz. ponastaviti spremenljivke: '; +$PHPMAILER_LANG['extension_missing'] = 'Manjkajoča razširitev: '; diff --git a/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-sr.php b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-sr.php new file mode 100644 index 0000000..34c1e18 --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-sr.php @@ -0,0 +1,27 @@ + + * @author Miloš Milanović + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP грешка: аутентификација није успела.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP грешка: повезивање са SMTP сервером није успело.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP грешка: подаци нису прихваћени.'; +$PHPMAILER_LANG['empty_message'] = 'Садржај поруке је празан.'; +$PHPMAILER_LANG['encoding'] = 'Непознато кодирање: '; +$PHPMAILER_LANG['execute'] = 'Није могуће извршити наредбу: '; +$PHPMAILER_LANG['file_access'] = 'Није могуће приступити датотеци: '; +$PHPMAILER_LANG['file_open'] = 'Није могуће отворити датотеку: '; +$PHPMAILER_LANG['from_failed'] = 'SMTP грешка: слање са следећих адреса није успело: '; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP грешка: слање на следеће адресе није успело: '; +$PHPMAILER_LANG['instantiate'] = 'Није могуће покренути mail функцију.'; +$PHPMAILER_LANG['invalid_address'] = 'Порука није послата. Неисправна адреса: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' мејлер није подржан.'; +$PHPMAILER_LANG['provide_address'] = 'Дефинишите бар једну адресу примаоца.'; +$PHPMAILER_LANG['signing'] = 'Грешка приликом пријаве: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Повезивање са SMTP сервером није успело.'; +$PHPMAILER_LANG['smtp_error'] = 'Грешка SMTP сервера: '; +$PHPMAILER_LANG['variable_set'] = 'Није могуће задати нити ресетовати променљиву: '; +$PHPMAILER_LANG['extension_missing'] = 'Недостаје проширење: '; diff --git a/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-sv.php b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-sv.php new file mode 100644 index 0000000..c78237e --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-sv.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP fel: Kunde inte autentisera.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP fel: Kunde inte ansluta till SMTP-server.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP fel: Data accepterades inte.'; +//$PHPMAILER_LANG['empty_message'] = 'Message body empty'; +$PHPMAILER_LANG['encoding'] = 'Okänt encode-format: '; +$PHPMAILER_LANG['execute'] = 'Kunde inte köra: '; +$PHPMAILER_LANG['file_access'] = 'Ingen åtkomst till fil: '; +$PHPMAILER_LANG['file_open'] = 'Fil fel: Kunde inte öppna fil: '; +$PHPMAILER_LANG['from_failed'] = 'Följande avsändaradress är felaktig: '; +$PHPMAILER_LANG['instantiate'] = 'Kunde inte initiera e-postfunktion.'; +$PHPMAILER_LANG['invalid_address'] = 'Felaktig adress: '; +$PHPMAILER_LANG['provide_address'] = 'Du måste ange minst en mottagares e-postadress.'; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer stöds inte.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP fel: Följande mottagare är felaktig: '; +$PHPMAILER_LANG['signing'] = 'Signeringsfel: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() misslyckades.'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP serverfel: '; +$PHPMAILER_LANG['variable_set'] = 'Kunde inte definiera eller återställa variabel: '; +$PHPMAILER_LANG['extension_missing'] = 'Tillägg ej tillgängligt: '; diff --git a/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-tl.php b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-tl.php new file mode 100644 index 0000000..cd91f75 --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-tl.php @@ -0,0 +1,27 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP Error: Hindi mapatotohanan.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP Error: Hindi makakonekta sa SMTP host.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Error: Ang datos ay hindi naitanggap.'; +$PHPMAILER_LANG['empty_message'] = 'Walang laman ang mensahe'; +$PHPMAILER_LANG['encoding'] = 'Hindi alam ang encoding: '; +$PHPMAILER_LANG['execute'] = 'Hindi maisasagawa: '; +$PHPMAILER_LANG['file_access'] = 'Hindi ma-access ang file: '; +$PHPMAILER_LANG['file_open'] = 'File Error: Hindi mabuksan ang file: '; +$PHPMAILER_LANG['from_failed'] = 'Ang sumusunod na address ay nabigo: '; +$PHPMAILER_LANG['instantiate'] = 'Hindi maisimulan ang instance ng mail function.'; +$PHPMAILER_LANG['invalid_address'] = 'Hindi wasto ang address na naibigay: '; +$PHPMAILER_LANG['mailer_not_supported'] = 'Ang mailer ay hindi suportado.'; +$PHPMAILER_LANG['provide_address'] = 'Kailangan mong magbigay ng kahit isang email address na tatanggap.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: Ang mga sumusunod na tatanggap ay nabigo: '; +$PHPMAILER_LANG['signing'] = 'Hindi ma-sign: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Ang SMTP connect() ay nabigo.'; +$PHPMAILER_LANG['smtp_error'] = 'Ang server ng SMTP ay nabigo: '; +$PHPMAILER_LANG['variable_set'] = 'Hindi matatakda o ma-reset ang mga variables: '; +$PHPMAILER_LANG['extension_missing'] = 'Nawawala ang extension: '; diff --git a/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-tr.php b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-tr.php new file mode 100644 index 0000000..cfe8eaa --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-tr.php @@ -0,0 +1,30 @@ + + * @fixed by Boris Yurchenko + */ + +$PHPMAILER_LANG['authenticate'] = 'Помилка SMTP: помилка авторизації.'; +$PHPMAILER_LANG['connect_host'] = 'Помилка SMTP: не вдається під\'єднатися до SMTP-серверу.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Помилка SMTP: дані не прийнято.'; +$PHPMAILER_LANG['encoding'] = 'Невідоме кодування: '; +$PHPMAILER_LANG['execute'] = 'Неможливо виконати команду: '; +$PHPMAILER_LANG['file_access'] = 'Немає доступу до файлу: '; +$PHPMAILER_LANG['file_open'] = 'Помилка файлової системи: не вдається відкрити файл: '; +$PHPMAILER_LANG['from_failed'] = 'Невірна адреса відправника: '; +$PHPMAILER_LANG['instantiate'] = 'Неможливо запустити функцію mail().'; +$PHPMAILER_LANG['provide_address'] = 'Будь-ласка, введіть хоча б одну email-адресу отримувача.'; +$PHPMAILER_LANG['mailer_not_supported'] = ' - поштовий сервер не підтримується.'; +$PHPMAILER_LANG['recipients_failed'] = 'Помилка SMTP: не вдалося відправлення для таких отримувачів: '; +$PHPMAILER_LANG['empty_message'] = 'Пусте повідомлення'; +$PHPMAILER_LANG['invalid_address'] = 'Не відправлено через невірний формат email-адреси: '; +$PHPMAILER_LANG['signing'] = 'Помилка підпису: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Помилка з\'єднання з SMTP-сервером'; +$PHPMAILER_LANG['smtp_error'] = 'Помилка SMTP-сервера: '; +$PHPMAILER_LANG['variable_set'] = 'Неможливо встановити або скинути змінну: '; +$PHPMAILER_LANG['extension_missing'] = 'Розширення відсутнє: '; diff --git a/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-vi.php b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-vi.php new file mode 100644 index 0000000..c60dade --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-vi.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Lỗi SMTP: Không thể xác thực.'; +$PHPMAILER_LANG['connect_host'] = 'Lỗi SMTP: Không thể kết nối máy chủ SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Lỗi SMTP: Dữ liệu không được chấp nhận.'; +$PHPMAILER_LANG['empty_message'] = 'Không có nội dung'; +$PHPMAILER_LANG['encoding'] = 'Mã hóa không xác định: '; +$PHPMAILER_LANG['execute'] = 'Không thực hiện được: '; +$PHPMAILER_LANG['file_access'] = 'Không thể truy cập tệp tin '; +$PHPMAILER_LANG['file_open'] = 'Lỗi Tập tin: Không thể mở tệp tin: '; +$PHPMAILER_LANG['from_failed'] = 'Lỗi địa chỉ gửi đi: '; +$PHPMAILER_LANG['instantiate'] = 'Không dùng được các hàm gửi thư.'; +$PHPMAILER_LANG['invalid_address'] = 'Đại chỉ emai không đúng: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' trình gửi thư không được hỗ trợ.'; +$PHPMAILER_LANG['provide_address'] = 'Bạn phải cung cấp ít nhất một địa chỉ người nhận.'; +$PHPMAILER_LANG['recipients_failed'] = 'Lỗi SMTP: lỗi địa chỉ người nhận: '; +$PHPMAILER_LANG['signing'] = 'Lỗi đăng nhập: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Lỗi kết nối với SMTP'; +$PHPMAILER_LANG['smtp_error'] = 'Lỗi máy chủ smtp '; +$PHPMAILER_LANG['variable_set'] = 'Không thể thiết lập hoặc thiết lập lại biến: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh.php b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh.php new file mode 100644 index 0000000..3e9e358 --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh.php @@ -0,0 +1,28 @@ + + * @author Peter Dave Hello <@PeterDaveHello/> + * @author Jason Chiang + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP 錯誤:登入失敗。'; +$PHPMAILER_LANG['connect_host'] = 'SMTP 錯誤:無法連線到 SMTP 主機。'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 錯誤:無法接受的資料。'; +$PHPMAILER_LANG['empty_message'] = '郵件內容為空'; +$PHPMAILER_LANG['encoding'] = '未知編碼: '; +$PHPMAILER_LANG['execute'] = '無法執行:'; +$PHPMAILER_LANG['file_access'] = '無法存取檔案:'; +$PHPMAILER_LANG['file_open'] = '檔案錯誤:無法開啟檔案:'; +$PHPMAILER_LANG['from_failed'] = '發送地址錯誤:'; +$PHPMAILER_LANG['instantiate'] = '未知函數呼叫。'; +$PHPMAILER_LANG['invalid_address'] = '因為電子郵件地址無效,無法傳送: '; +$PHPMAILER_LANG['mailer_not_supported'] = '不支援的發信客戶端。'; +$PHPMAILER_LANG['provide_address'] = '必須提供至少一個收件人地址。'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP 錯誤:以下收件人地址錯誤:'; +$PHPMAILER_LANG['signing'] = '電子簽章錯誤: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP 連線失敗'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP 伺服器錯誤: '; +$PHPMAILER_LANG['variable_set'] = '無法設定或重設變數: '; +$PHPMAILER_LANG['extension_missing'] = '遺失模組 Extension: '; diff --git a/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh_cn.php b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh_cn.php new file mode 100644 index 0000000..3753780 --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh_cn.php @@ -0,0 +1,28 @@ + + * @author young + * @author Teddysun + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP 错误:登录失败。'; +$PHPMAILER_LANG['connect_host'] = 'SMTP 错误:无法连接到 SMTP 主机。'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误:数据不被接受。'; +$PHPMAILER_LANG['empty_message'] = '邮件正文为空。'; +$PHPMAILER_LANG['encoding'] = '未知编码:'; +$PHPMAILER_LANG['execute'] = '无法执行:'; +$PHPMAILER_LANG['file_access'] = '无法访问文件:'; +$PHPMAILER_LANG['file_open'] = '文件错误:无法打开文件:'; +$PHPMAILER_LANG['from_failed'] = '发送地址错误:'; +$PHPMAILER_LANG['instantiate'] = '未知函数调用。'; +$PHPMAILER_LANG['invalid_address'] = '发送失败,电子邮箱地址是无效的:'; +$PHPMAILER_LANG['mailer_not_supported'] = '发信客户端不被支持。'; +$PHPMAILER_LANG['provide_address'] = '必须提供至少一个收件人地址。'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误:收件人地址错误:'; +$PHPMAILER_LANG['signing'] = '登录失败:'; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP服务器连接失败。'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP服务器出错:'; +$PHPMAILER_LANG['variable_set'] = '无法设置或重置变量:'; +$PHPMAILER_LANG['extension_missing'] = '丢失模块 Extension:'; diff --git a/admin/lib/vendor/phpmailer/phpmailer/src/Exception.php b/admin/lib/vendor/phpmailer/phpmailer/src/Exception.php new file mode 100644 index 0000000..e7807fc --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/src/Exception.php @@ -0,0 +1,39 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2020 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + */ + +namespace PHPMailer\PHPMailer; + +/** + * PHPMailer exception handler. + * + * @author Marcus Bointon + */ +class Exception extends \Exception +{ + /** + * Prettify error message output. + * + * @return string + */ + public function errorMessage() + { + return '' . htmlspecialchars($this->getMessage()) . "
\n"; + } +} diff --git a/admin/lib/vendor/phpmailer/phpmailer/src/OAuth.php b/admin/lib/vendor/phpmailer/phpmailer/src/OAuth.php new file mode 100644 index 0000000..753aac9 --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/src/OAuth.php @@ -0,0 +1,138 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2020 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + */ + +namespace PHPMailer\PHPMailer; + +use League\OAuth2\Client\Grant\RefreshToken; +use League\OAuth2\Client\Provider\AbstractProvider; +use League\OAuth2\Client\Token\AccessToken; + +/** + * OAuth - OAuth2 authentication wrapper class. + * Uses the oauth2-client package from the League of Extraordinary Packages. + * + * @see http://oauth2-client.thephpleague.com + * + * @author Marcus Bointon (Synchro/coolbru) + */ +class OAuth +{ + /** + * An instance of the League OAuth Client Provider. + * + * @var AbstractProvider + */ + protected $provider; + + /** + * The current OAuth access token. + * + * @var AccessToken + */ + protected $oauthToken; + + /** + * The user's email address, usually used as the login ID + * and also the from address when sending email. + * + * @var string + */ + protected $oauthUserEmail = ''; + + /** + * The client secret, generated in the app definition of the service you're connecting to. + * + * @var string + */ + protected $oauthClientSecret = ''; + + /** + * The client ID, generated in the app definition of the service you're connecting to. + * + * @var string + */ + protected $oauthClientId = ''; + + /** + * The refresh token, used to obtain new AccessTokens. + * + * @var string + */ + protected $oauthRefreshToken = ''; + + /** + * OAuth constructor. + * + * @param array $options Associative array containing + * `provider`, `userName`, `clientSecret`, `clientId` and `refreshToken` elements + */ + public function __construct($options) + { + $this->provider = $options['provider']; + $this->oauthUserEmail = $options['userName']; + $this->oauthClientSecret = $options['clientSecret']; + $this->oauthClientId = $options['clientId']; + $this->oauthRefreshToken = $options['refreshToken']; + } + + /** + * Get a new RefreshToken. + * + * @return RefreshToken + */ + protected function getGrant() + { + return new RefreshToken(); + } + + /** + * Get a new AccessToken. + * + * @return AccessToken + */ + protected function getToken() + { + return $this->provider->getAccessToken( + $this->getGrant(), + ['refresh_token' => $this->oauthRefreshToken] + ); + } + + /** + * Generate a base64-encoded OAuth token. + * + * @return string + */ + public function getOauth64() + { + // Get a new token if it's not available or has expired + if (null === $this->oauthToken || $this->oauthToken->hasExpired()) { + $this->oauthToken = $this->getToken(); + } + + return base64_encode( + 'user=' . + $this->oauthUserEmail . + "\001auth=Bearer " . + $this->oauthToken . + "\001\001" + ); + } +} diff --git a/admin/lib/vendor/phpmailer/phpmailer/src/PHPMailer.php b/admin/lib/vendor/phpmailer/phpmailer/src/PHPMailer.php new file mode 100644 index 0000000..f9498b1 --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/src/PHPMailer.php @@ -0,0 +1,4860 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2020 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + */ + +namespace PHPMailer\PHPMailer; + +/** + * PHPMailer - PHP email creation and transport class. + * + * @author Marcus Bointon (Synchro/coolbru) + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + */ +class PHPMailer +{ + const CHARSET_ASCII = 'us-ascii'; + const CHARSET_ISO88591 = 'iso-8859-1'; + const CHARSET_UTF8 = 'utf-8'; + + const CONTENT_TYPE_PLAINTEXT = 'text/plain'; + const CONTENT_TYPE_TEXT_CALENDAR = 'text/calendar'; + const CONTENT_TYPE_TEXT_HTML = 'text/html'; + const CONTENT_TYPE_MULTIPART_ALTERNATIVE = 'multipart/alternative'; + const CONTENT_TYPE_MULTIPART_MIXED = 'multipart/mixed'; + const CONTENT_TYPE_MULTIPART_RELATED = 'multipart/related'; + + const ENCODING_7BIT = '7bit'; + const ENCODING_8BIT = '8bit'; + const ENCODING_BASE64 = 'base64'; + const ENCODING_BINARY = 'binary'; + const ENCODING_QUOTED_PRINTABLE = 'quoted-printable'; + + const ENCRYPTION_STARTTLS = 'tls'; + const ENCRYPTION_SMTPS = 'ssl'; + + const ICAL_METHOD_REQUEST = 'REQUEST'; + const ICAL_METHOD_PUBLISH = 'PUBLISH'; + const ICAL_METHOD_REPLY = 'REPLY'; + const ICAL_METHOD_ADD = 'ADD'; + const ICAL_METHOD_CANCEL = 'CANCEL'; + const ICAL_METHOD_REFRESH = 'REFRESH'; + const ICAL_METHOD_COUNTER = 'COUNTER'; + const ICAL_METHOD_DECLINECOUNTER = 'DECLINECOUNTER'; + + /** + * Email priority. + * Options: null (default), 1 = High, 3 = Normal, 5 = low. + * When null, the header is not set at all. + * + * @var int|null + */ + public $Priority; + + /** + * The character set of the message. + * + * @var string + */ + public $CharSet = self::CHARSET_ISO88591; + + /** + * The MIME Content-type of the message. + * + * @var string + */ + public $ContentType = self::CONTENT_TYPE_PLAINTEXT; + + /** + * The message encoding. + * Options: "8bit", "7bit", "binary", "base64", and "quoted-printable". + * + * @var string + */ + public $Encoding = self::ENCODING_8BIT; + + /** + * Holds the most recent mailer error message. + * + * @var string + */ + public $ErrorInfo = ''; + + /** + * The From email address for the message. + * + * @var string + */ + public $From = 'root@localhost'; + + /** + * The From name of the message. + * + * @var string + */ + public $FromName = 'Root User'; + + /** + * The envelope sender of the message. + * This will usually be turned into a Return-Path header by the receiver, + * and is the address that bounces will be sent to. + * If not empty, will be passed via `-f` to sendmail or as the 'MAIL FROM' value over SMTP. + * + * @var string + */ + public $Sender = ''; + + /** + * The Subject of the message. + * + * @var string + */ + public $Subject = ''; + + /** + * An HTML or plain text message body. + * If HTML then call isHTML(true). + * + * @var string + */ + public $Body = ''; + + /** + * The plain-text message body. + * This body can be read by mail clients that do not have HTML email + * capability such as mutt & Eudora. + * Clients that can read HTML will view the normal Body. + * + * @var string + */ + public $AltBody = ''; + + /** + * An iCal message part body. + * Only supported in simple alt or alt_inline message types + * To generate iCal event structures, use classes like EasyPeasyICS or iCalcreator. + * + * @see http://sprain.ch/blog/downloads/php-class-easypeasyics-create-ical-files-with-php/ + * @see http://kigkonsult.se/iCalcreator/ + * + * @var string + */ + public $Ical = ''; + + /** + * Value-array of "method" in Contenttype header "text/calendar" + * + * @var string[] + */ + protected static $IcalMethods = [ + self::ICAL_METHOD_REQUEST, + self::ICAL_METHOD_PUBLISH, + self::ICAL_METHOD_REPLY, + self::ICAL_METHOD_ADD, + self::ICAL_METHOD_CANCEL, + self::ICAL_METHOD_REFRESH, + self::ICAL_METHOD_COUNTER, + self::ICAL_METHOD_DECLINECOUNTER, + ]; + + /** + * The complete compiled MIME message body. + * + * @var string + */ + protected $MIMEBody = ''; + + /** + * The complete compiled MIME message headers. + * + * @var string + */ + protected $MIMEHeader = ''; + + /** + * Extra headers that createHeader() doesn't fold in. + * + * @var string + */ + protected $mailHeader = ''; + + /** + * Word-wrap the message body to this number of chars. + * Set to 0 to not wrap. A useful value here is 78, for RFC2822 section 2.1.1 compliance. + * + * @see static::STD_LINE_LENGTH + * + * @var int + */ + public $WordWrap = 0; + + /** + * Which method to use to send mail. + * Options: "mail", "sendmail", or "smtp". + * + * @var string + */ + public $Mailer = 'mail'; + + /** + * The path to the sendmail program. + * + * @var string + */ + public $Sendmail = '/usr/sbin/sendmail'; + + /** + * Whether mail() uses a fully sendmail-compatible MTA. + * One which supports sendmail's "-oi -f" options. + * + * @var bool + */ + public $UseSendmailOptions = true; + + /** + * The email address that a reading confirmation should be sent to, also known as read receipt. + * + * @var string + */ + public $ConfirmReadingTo = ''; + + /** + * The hostname to use in the Message-ID header and as default HELO string. + * If empty, PHPMailer attempts to find one with, in order, + * $_SERVER['SERVER_NAME'], gethostname(), php_uname('n'), or the value + * 'localhost.localdomain'. + * + * @see PHPMailer::$Helo + * + * @var string + */ + public $Hostname = ''; + + /** + * An ID to be used in the Message-ID header. + * If empty, a unique id will be generated. + * You can set your own, but it must be in the format "", + * as defined in RFC5322 section 3.6.4 or it will be ignored. + * + * @see https://tools.ietf.org/html/rfc5322#section-3.6.4 + * + * @var string + */ + public $MessageID = ''; + + /** + * The message Date to be used in the Date header. + * If empty, the current date will be added. + * + * @var string + */ + public $MessageDate = ''; + + /** + * SMTP hosts. + * Either a single hostname or multiple semicolon-delimited hostnames. + * You can also specify a different port + * for each host by using this format: [hostname:port] + * (e.g. "smtp1.example.com:25;smtp2.example.com"). + * You can also specify encryption type, for example: + * (e.g. "tls://smtp1.example.com:587;ssl://smtp2.example.com:465"). + * Hosts will be tried in order. + * + * @var string + */ + public $Host = 'localhost'; + + /** + * The default SMTP server port. + * + * @var int + */ + public $Port = 25; + + /** + * The SMTP HELO/EHLO name used for the SMTP connection. + * Default is $Hostname. If $Hostname is empty, PHPMailer attempts to find + * one with the same method described above for $Hostname. + * + * @see PHPMailer::$Hostname + * + * @var string + */ + public $Helo = ''; + + /** + * What kind of encryption to use on the SMTP connection. + * Options: '', static::ENCRYPTION_STARTTLS, or static::ENCRYPTION_SMTPS. + * + * @var string + */ + public $SMTPSecure = ''; + + /** + * Whether to enable TLS encryption automatically if a server supports it, + * even if `SMTPSecure` is not set to 'tls'. + * Be aware that in PHP >= 5.6 this requires that the server's certificates are valid. + * + * @var bool + */ + public $SMTPAutoTLS = true; + + /** + * Whether to use SMTP authentication. + * Uses the Username and Password properties. + * + * @see PHPMailer::$Username + * @see PHPMailer::$Password + * + * @var bool + */ + public $SMTPAuth = false; + + /** + * Options array passed to stream_context_create when connecting via SMTP. + * + * @var array + */ + public $SMTPOptions = []; + + /** + * SMTP username. + * + * @var string + */ + public $Username = ''; + + /** + * SMTP password. + * + * @var string + */ + public $Password = ''; + + /** + * SMTP auth type. + * Options are CRAM-MD5, LOGIN, PLAIN, XOAUTH2, attempted in that order if not specified. + * + * @var string + */ + public $AuthType = ''; + + /** + * An instance of the PHPMailer OAuth class. + * + * @var OAuth + */ + protected $oauth; + + /** + * The SMTP server timeout in seconds. + * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2. + * + * @var int + */ + public $Timeout = 300; + + /** + * Comma separated list of DSN notifications + * 'NEVER' under no circumstances a DSN must be returned to the sender. + * If you use NEVER all other notifications will be ignored. + * 'SUCCESS' will notify you when your mail has arrived at its destination. + * 'FAILURE' will arrive if an error occurred during delivery. + * 'DELAY' will notify you if there is an unusual delay in delivery, but the actual + * delivery's outcome (success or failure) is not yet decided. + * + * @see https://tools.ietf.org/html/rfc3461 See section 4.1 for more information about NOTIFY + */ + public $dsn = ''; + + /** + * SMTP class debug output mode. + * Debug output level. + * Options: + * * SMTP::DEBUG_OFF: No output + * * SMTP::DEBUG_CLIENT: Client messages + * * SMTP::DEBUG_SERVER: Client and server messages + * * SMTP::DEBUG_CONNECTION: As SERVER plus connection status + * * SMTP::DEBUG_LOWLEVEL: Noisy, low-level data output, rarely needed + * + * @see SMTP::$do_debug + * + * @var int + */ + public $SMTPDebug = 0; + + /** + * How to handle debug output. + * Options: + * * `echo` Output plain-text as-is, appropriate for CLI + * * `html` Output escaped, line breaks converted to `
`, appropriate for browser output + * * `error_log` Output to error log as configured in php.ini + * By default PHPMailer will use `echo` if run from a `cli` or `cli-server` SAPI, `html` otherwise. + * Alternatively, you can provide a callable expecting two params: a message string and the debug level: + * + * ```php + * $mail->Debugoutput = function($str, $level) {echo "debug level $level; message: $str";}; + * ``` + * + * Alternatively, you can pass in an instance of a PSR-3 compatible logger, though only `debug` + * level output is used: + * + * ```php + * $mail->Debugoutput = new myPsr3Logger; + * ``` + * + * @see SMTP::$Debugoutput + * + * @var string|callable|\Psr\Log\LoggerInterface + */ + public $Debugoutput = 'echo'; + + /** + * Whether to keep SMTP connection open after each message. + * If this is set to true then to close the connection + * requires an explicit call to smtpClose(). + * + * @var bool + */ + public $SMTPKeepAlive = false; + + /** + * Whether to split multiple to addresses into multiple messages + * or send them all in one message. + * Only supported in `mail` and `sendmail` transports, not in SMTP. + * + * @var bool + * + * @deprecated 6.0.0 PHPMailer isn't a mailing list manager! + */ + public $SingleTo = false; + + /** + * Storage for addresses when SingleTo is enabled. + * + * @var array + */ + protected $SingleToArray = []; + + /** + * Whether to generate VERP addresses on send. + * Only applicable when sending via SMTP. + * + * @see https://en.wikipedia.org/wiki/Variable_envelope_return_path + * @see http://www.postfix.org/VERP_README.html Postfix VERP info + * + * @var bool + */ + public $do_verp = false; + + /** + * Whether to allow sending messages with an empty body. + * + * @var bool + */ + public $AllowEmpty = false; + + /** + * DKIM selector. + * + * @var string + */ + public $DKIM_selector = ''; + + /** + * DKIM Identity. + * Usually the email address used as the source of the email. + * + * @var string + */ + public $DKIM_identity = ''; + + /** + * DKIM passphrase. + * Used if your key is encrypted. + * + * @var string + */ + public $DKIM_passphrase = ''; + + /** + * DKIM signing domain name. + * + * @example 'example.com' + * + * @var string + */ + public $DKIM_domain = ''; + + /** + * DKIM Copy header field values for diagnostic use. + * + * @var bool + */ + public $DKIM_copyHeaderFields = true; + + /** + * DKIM Extra signing headers. + * + * @example ['List-Unsubscribe', 'List-Help'] + * + * @var array + */ + public $DKIM_extraHeaders = []; + + /** + * DKIM private key file path. + * + * @var string + */ + public $DKIM_private = ''; + + /** + * DKIM private key string. + * + * If set, takes precedence over `$DKIM_private`. + * + * @var string + */ + public $DKIM_private_string = ''; + + /** + * Callback Action function name. + * + * The function that handles the result of the send email action. + * It is called out by send() for each email sent. + * + * Value can be any php callable: http://www.php.net/is_callable + * + * Parameters: + * bool $result result of the send action + * array $to email addresses of the recipients + * array $cc cc email addresses + * array $bcc bcc email addresses + * string $subject the subject + * string $body the email body + * string $from email address of sender + * string $extra extra information of possible use + * "smtp_transaction_id' => last smtp transaction id + * + * @var string + */ + public $action_function = ''; + + /** + * What to put in the X-Mailer header. + * Options: An empty string for PHPMailer default, whitespace/null for none, or a string to use. + * + * @var string|null + */ + public $XMailer = ''; + + /** + * Which validator to use by default when validating email addresses. + * May be a callable to inject your own validator, but there are several built-in validators. + * The default validator uses PHP's FILTER_VALIDATE_EMAIL filter_var option. + * + * @see PHPMailer::validateAddress() + * + * @var string|callable + */ + public static $validator = 'php'; + + /** + * An instance of the SMTP sender class. + * + * @var SMTP + */ + protected $smtp; + + /** + * The array of 'to' names and addresses. + * + * @var array + */ + protected $to = []; + + /** + * The array of 'cc' names and addresses. + * + * @var array + */ + protected $cc = []; + + /** + * The array of 'bcc' names and addresses. + * + * @var array + */ + protected $bcc = []; + + /** + * The array of reply-to names and addresses. + * + * @var array + */ + protected $ReplyTo = []; + + /** + * An array of all kinds of addresses. + * Includes all of $to, $cc, $bcc. + * + * @see PHPMailer::$to + * @see PHPMailer::$cc + * @see PHPMailer::$bcc + * + * @var array + */ + protected $all_recipients = []; + + /** + * An array of names and addresses queued for validation. + * In send(), valid and non duplicate entries are moved to $all_recipients + * and one of $to, $cc, or $bcc. + * This array is used only for addresses with IDN. + * + * @see PHPMailer::$to + * @see PHPMailer::$cc + * @see PHPMailer::$bcc + * @see PHPMailer::$all_recipients + * + * @var array + */ + protected $RecipientsQueue = []; + + /** + * An array of reply-to names and addresses queued for validation. + * In send(), valid and non duplicate entries are moved to $ReplyTo. + * This array is used only for addresses with IDN. + * + * @see PHPMailer::$ReplyTo + * + * @var array + */ + protected $ReplyToQueue = []; + + /** + * The array of attachments. + * + * @var array + */ + protected $attachment = []; + + /** + * The array of custom headers. + * + * @var array + */ + protected $CustomHeader = []; + + /** + * The most recent Message-ID (including angular brackets). + * + * @var string + */ + protected $lastMessageID = ''; + + /** + * The message's MIME type. + * + * @var string + */ + protected $message_type = ''; + + /** + * The array of MIME boundary strings. + * + * @var array + */ + protected $boundary = []; + + /** + * The array of available languages. + * + * @var array + */ + protected $language = []; + + /** + * The number of errors encountered. + * + * @var int + */ + protected $error_count = 0; + + /** + * The S/MIME certificate file path. + * + * @var string + */ + protected $sign_cert_file = ''; + + /** + * The S/MIME key file path. + * + * @var string + */ + protected $sign_key_file = ''; + + /** + * The optional S/MIME extra certificates ("CA Chain") file path. + * + * @var string + */ + protected $sign_extracerts_file = ''; + + /** + * The S/MIME password for the key. + * Used only if the key is encrypted. + * + * @var string + */ + protected $sign_key_pass = ''; + + /** + * Whether to throw exceptions for errors. + * + * @var bool + */ + protected $exceptions = false; + + /** + * Unique ID used for message ID and boundaries. + * + * @var string + */ + protected $uniqueid = ''; + + /** + * The PHPMailer Version number. + * + * @var string + */ + const VERSION = '6.1.8'; + + /** + * Error severity: message only, continue processing. + * + * @var int + */ + const STOP_MESSAGE = 0; + + /** + * Error severity: message, likely ok to continue processing. + * + * @var int + */ + const STOP_CONTINUE = 1; + + /** + * Error severity: message, plus full stop, critical error reached. + * + * @var int + */ + const STOP_CRITICAL = 2; + + /** + * The SMTP standard CRLF line break. + * If you want to change line break format, change static::$LE, not this. + */ + const CRLF = "\r\n"; + + /** + * "Folding White Space" a white space string used for line folding. + */ + const FWS = ' '; + + /** + * SMTP RFC standard line ending; Carriage Return, Line Feed. + * + * @var string + */ + protected static $LE = self::CRLF; + + /** + * The maximum line length supported by mail(). + * + * Background: mail() will sometimes corrupt messages + * with headers headers longer than 65 chars, see #818. + * + * @var int + */ + const MAIL_MAX_LINE_LENGTH = 63; + + /** + * The maximum line length allowed by RFC 2822 section 2.1.1. + * + * @var int + */ + const MAX_LINE_LENGTH = 998; + + /** + * The lower maximum line length allowed by RFC 2822 section 2.1.1. + * This length does NOT include the line break + * 76 means that lines will be 77 or 78 chars depending on whether + * the line break format is LF or CRLF; both are valid. + * + * @var int + */ + const STD_LINE_LENGTH = 76; + + /** + * Constructor. + * + * @param bool $exceptions Should we throw external exceptions? + */ + public function __construct($exceptions = null) + { + if (null !== $exceptions) { + $this->exceptions = (bool) $exceptions; + } + //Pick an appropriate debug output format automatically + $this->Debugoutput = (strpos(PHP_SAPI, 'cli') !== false ? 'echo' : 'html'); + } + + /** + * Destructor. + */ + public function __destruct() + { + //Close any open SMTP connection nicely + $this->smtpClose(); + } + + /** + * Call mail() in a safe_mode-aware fashion. + * Also, unless sendmail_path points to sendmail (or something that + * claims to be sendmail), don't pass params (not a perfect fix, + * but it will do). + * + * @param string $to To + * @param string $subject Subject + * @param string $body Message Body + * @param string $header Additional Header(s) + * @param string|null $params Params + * + * @return bool + */ + private function mailPassthru($to, $subject, $body, $header, $params) + { + //Check overloading of mail function to avoid double-encoding + if (ini_get('mbstring.func_overload') & 1) { + $subject = $this->secureHeader($subject); + } else { + $subject = $this->encodeHeader($this->secureHeader($subject)); + } + //Calling mail() with null params breaks + if (!$this->UseSendmailOptions || null === $params) { + $result = @mail($to, $subject, $body, $header); + } else { + $result = @mail($to, $subject, $body, $header, $params); + } + + return $result; + } + + /** + * Output debugging info via user-defined method. + * Only generates output if SMTP debug output is enabled (@see SMTP::$do_debug). + * + * @see PHPMailer::$Debugoutput + * @see PHPMailer::$SMTPDebug + * + * @param string $str + */ + protected function edebug($str) + { + if ($this->SMTPDebug <= 0) { + return; + } + //Is this a PSR-3 logger? + if ($this->Debugoutput instanceof \Psr\Log\LoggerInterface) { + $this->Debugoutput->debug($str); + + return; + } + //Avoid clash with built-in function names + if (is_callable($this->Debugoutput) && !in_array($this->Debugoutput, ['error_log', 'html', 'echo'])) { + call_user_func($this->Debugoutput, $str, $this->SMTPDebug); + + return; + } + switch ($this->Debugoutput) { + case 'error_log': + //Don't output, just log + /** @noinspection ForgottenDebugOutputInspection */ + error_log($str); + break; + case 'html': + //Cleans up output a bit for a better looking, HTML-safe output + echo htmlentities( + preg_replace('/[\r\n]+/', '', $str), + ENT_QUOTES, + 'UTF-8' + ), "
\n"; + break; + case 'echo': + default: + //Normalize line breaks + $str = preg_replace('/\r\n|\r/m', "\n", $str); + echo gmdate('Y-m-d H:i:s'), + "\t", + //Trim trailing space + trim( + //Indent for readability, except for trailing break + str_replace( + "\n", + "\n \t ", + trim($str) + ) + ), + "\n"; + } + } + + /** + * Sets message type to HTML or plain. + * + * @param bool $isHtml True for HTML mode + */ + public function isHTML($isHtml = true) + { + if ($isHtml) { + $this->ContentType = static::CONTENT_TYPE_TEXT_HTML; + } else { + $this->ContentType = static::CONTENT_TYPE_PLAINTEXT; + } + } + + /** + * Send messages using SMTP. + */ + public function isSMTP() + { + $this->Mailer = 'smtp'; + } + + /** + * Send messages using PHP's mail() function. + */ + public function isMail() + { + $this->Mailer = 'mail'; + } + + /** + * Send messages using $Sendmail. + */ + public function isSendmail() + { + $ini_sendmail_path = ini_get('sendmail_path'); + + if (false === stripos($ini_sendmail_path, 'sendmail')) { + $this->Sendmail = '/usr/sbin/sendmail'; + } else { + $this->Sendmail = $ini_sendmail_path; + } + $this->Mailer = 'sendmail'; + } + + /** + * Send messages using qmail. + */ + public function isQmail() + { + $ini_sendmail_path = ini_get('sendmail_path'); + + if (false === stripos($ini_sendmail_path, 'qmail')) { + $this->Sendmail = '/var/qmail/bin/qmail-inject'; + } else { + $this->Sendmail = $ini_sendmail_path; + } + $this->Mailer = 'qmail'; + } + + /** + * Add a "To" address. + * + * @param string $address The email address to send to + * @param string $name + * + * @throws Exception + * + * @return bool true on success, false if address already used or invalid in some way + */ + public function addAddress($address, $name = '') + { + return $this->addOrEnqueueAnAddress('to', $address, $name); + } + + /** + * Add a "CC" address. + * + * @param string $address The email address to send to + * @param string $name + * + * @throws Exception + * + * @return bool true on success, false if address already used or invalid in some way + */ + public function addCC($address, $name = '') + { + return $this->addOrEnqueueAnAddress('cc', $address, $name); + } + + /** + * Add a "BCC" address. + * + * @param string $address The email address to send to + * @param string $name + * + * @throws Exception + * + * @return bool true on success, false if address already used or invalid in some way + */ + public function addBCC($address, $name = '') + { + return $this->addOrEnqueueAnAddress('bcc', $address, $name); + } + + /** + * Add a "Reply-To" address. + * + * @param string $address The email address to reply to + * @param string $name + * + * @throws Exception + * + * @return bool true on success, false if address already used or invalid in some way + */ + public function addReplyTo($address, $name = '') + { + return $this->addOrEnqueueAnAddress('Reply-To', $address, $name); + } + + /** + * Add an address to one of the recipient arrays or to the ReplyTo array. Because PHPMailer + * can't validate addresses with an IDN without knowing the PHPMailer::$CharSet (that can still + * be modified after calling this function), addition of such addresses is delayed until send(). + * Addresses that have been added already return false, but do not throw exceptions. + * + * @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo' + * @param string $address The email address to send, resp. to reply to + * @param string $name + * + * @throws Exception + * + * @return bool true on success, false if address already used or invalid in some way + */ + protected function addOrEnqueueAnAddress($kind, $address, $name) + { + $address = trim($address); + $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim + $pos = strrpos($address, '@'); + if (false === $pos) { + // At-sign is missing. + $error_message = sprintf( + '%s (%s): %s', + $this->lang('invalid_address'), + $kind, + $address + ); + $this->setError($error_message); + $this->edebug($error_message); + if ($this->exceptions) { + throw new Exception($error_message); + } + + return false; + } + $params = [$kind, $address, $name]; + // Enqueue addresses with IDN until we know the PHPMailer::$CharSet. + if (static::idnSupported() && $this->has8bitChars(substr($address, ++$pos))) { + if ('Reply-To' !== $kind) { + if (!array_key_exists($address, $this->RecipientsQueue)) { + $this->RecipientsQueue[$address] = $params; + + return true; + } + } elseif (!array_key_exists($address, $this->ReplyToQueue)) { + $this->ReplyToQueue[$address] = $params; + + return true; + } + + return false; + } + + // Immediately add standard addresses without IDN. + return call_user_func_array([$this, 'addAnAddress'], $params); + } + + /** + * Add an address to one of the recipient arrays or to the ReplyTo array. + * Addresses that have been added already return false, but do not throw exceptions. + * + * @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo' + * @param string $address The email address to send, resp. to reply to + * @param string $name + * + * @throws Exception + * + * @return bool true on success, false if address already used or invalid in some way + */ + protected function addAnAddress($kind, $address, $name = '') + { + if (!in_array($kind, ['to', 'cc', 'bcc', 'Reply-To'])) { + $error_message = sprintf( + '%s: %s', + $this->lang('Invalid recipient kind'), + $kind + ); + $this->setError($error_message); + $this->edebug($error_message); + if ($this->exceptions) { + throw new Exception($error_message); + } + + return false; + } + if (!static::validateAddress($address)) { + $error_message = sprintf( + '%s (%s): %s', + $this->lang('invalid_address'), + $kind, + $address + ); + $this->setError($error_message); + $this->edebug($error_message); + if ($this->exceptions) { + throw new Exception($error_message); + } + + return false; + } + if ('Reply-To' !== $kind) { + if (!array_key_exists(strtolower($address), $this->all_recipients)) { + $this->{$kind}[] = [$address, $name]; + $this->all_recipients[strtolower($address)] = true; + + return true; + } + } elseif (!array_key_exists(strtolower($address), $this->ReplyTo)) { + $this->ReplyTo[strtolower($address)] = [$address, $name]; + + return true; + } + + return false; + } + + /** + * Parse and validate a string containing one or more RFC822-style comma-separated email addresses + * of the form "display name
" into an array of name/address pairs. + * Uses the imap_rfc822_parse_adrlist function if the IMAP extension is available. + * Note that quotes in the name part are removed. + * + * @see http://www.andrew.cmu.edu/user/agreen1/testing/mrbs/web/Mail/RFC822.php A more careful implementation + * + * @param string $addrstr The address list string + * @param bool $useimap Whether to use the IMAP extension to parse the list + * + * @return array + */ + public static function parseAddresses($addrstr, $useimap = true) + { + $addresses = []; + if ($useimap && function_exists('imap_rfc822_parse_adrlist')) { + //Use this built-in parser if it's available + $list = imap_rfc822_parse_adrlist($addrstr, ''); + foreach ($list as $address) { + if (('.SYNTAX-ERROR.' !== $address->host) && static::validateAddress( + $address->mailbox . '@' . $address->host + )) { + $addresses[] = [ + 'name' => (property_exists($address, 'personal') ? $address->personal : ''), + 'address' => $address->mailbox . '@' . $address->host, + ]; + } + } + } else { + //Use this simpler parser + $list = explode(',', $addrstr); + foreach ($list as $address) { + $address = trim($address); + //Is there a separate name part? + if (strpos($address, '<') === false) { + //No separate name, just use the whole thing + if (static::validateAddress($address)) { + $addresses[] = [ + 'name' => '', + 'address' => $address, + ]; + } + } else { + list($name, $email) = explode('<', $address); + $email = trim(str_replace('>', '', $email)); + if (static::validateAddress($email)) { + $addresses[] = [ + 'name' => trim(str_replace(['"', "'"], '', $name)), + 'address' => $email, + ]; + } + } + } + } + + return $addresses; + } + + /** + * Set the From and FromName properties. + * + * @param string $address + * @param string $name + * @param bool $auto Whether to also set the Sender address, defaults to true + * + * @throws Exception + * + * @return bool + */ + public function setFrom($address, $name = '', $auto = true) + { + $address = trim($address); + $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim + // Don't validate now addresses with IDN. Will be done in send(). + $pos = strrpos($address, '@'); + if ((false === $pos) + || ((!$this->has8bitChars(substr($address, ++$pos)) || !static::idnSupported()) + && !static::validateAddress($address)) + ) { + $error_message = sprintf( + '%s (From): %s', + $this->lang('invalid_address'), + $address + ); + $this->setError($error_message); + $this->edebug($error_message); + if ($this->exceptions) { + throw new Exception($error_message); + } + + return false; + } + $this->From = $address; + $this->FromName = $name; + if ($auto && empty($this->Sender)) { + $this->Sender = $address; + } + + return true; + } + + /** + * Return the Message-ID header of the last email. + * Technically this is the value from the last time the headers were created, + * but it's also the message ID of the last sent message except in + * pathological cases. + * + * @return string + */ + public function getLastMessageID() + { + return $this->lastMessageID; + } + + /** + * Check that a string looks like an email address. + * Validation patterns supported: + * * `auto` Pick best pattern automatically; + * * `pcre8` Use the squiloople.com pattern, requires PCRE > 8.0; + * * `pcre` Use old PCRE implementation; + * * `php` Use PHP built-in FILTER_VALIDATE_EMAIL; + * * `html5` Use the pattern given by the HTML5 spec for 'email' type form input elements. + * * `noregex` Don't use a regex: super fast, really dumb. + * Alternatively you may pass in a callable to inject your own validator, for example: + * + * ```php + * PHPMailer::validateAddress('user@example.com', function($address) { + * return (strpos($address, '@') !== false); + * }); + * ``` + * + * You can also set the PHPMailer::$validator static to a callable, allowing built-in methods to use your validator. + * + * @param string $address The email address to check + * @param string|callable $patternselect Which pattern to use + * + * @return bool + */ + public static function validateAddress($address, $patternselect = null) + { + if (null === $patternselect) { + $patternselect = static::$validator; + } + if (is_callable($patternselect)) { + return call_user_func($patternselect, $address); + } + //Reject line breaks in addresses; it's valid RFC5322, but not RFC5321 + if (strpos($address, "\n") !== false || strpos($address, "\r") !== false) { + return false; + } + switch ($patternselect) { + case 'pcre': //Kept for BC + case 'pcre8': + /* + * A more complex and more permissive version of the RFC5322 regex on which FILTER_VALIDATE_EMAIL + * is based. + * In addition to the addresses allowed by filter_var, also permits: + * * dotless domains: `a@b` + * * comments: `1234 @ local(blah) .machine .example` + * * quoted elements: `'"test blah"@example.org'` + * * numeric TLDs: `a@b.123` + * * unbracketed IPv4 literals: `a@192.168.0.1` + * * IPv6 literals: 'first.last@[IPv6:a1::]' + * Not all of these will necessarily work for sending! + * + * @see http://squiloople.com/2009/12/20/email-address-validation/ + * @copyright 2009-2010 Michael Rushton + * Feel free to use and redistribute this code. But please keep this copyright notice. + */ + return (bool) preg_match( + '/^(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){255,})(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){65,}@)' . + '((?>(?>(?>((?>(?>(?>\x0D\x0A)?[\t ])+|(?>[\t ]*\x0D\x0A)?[\t ]+)?)(\((?>(?2)' . + '(?>[\x01-\x08\x0B\x0C\x0E-\'*-\[\]-\x7F]|\\\[\x00-\x7F]|(?3)))*(?2)\)))+(?2))|(?2))?)' . + '([!#-\'*+\/-9=?^-~-]+|"(?>(?2)(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\x7F]))*' . + '(?2)")(?>(?1)\.(?1)(?4))*(?1)@(?!(?1)[a-z0-9-]{64,})(?1)(?>([a-z0-9](?>[a-z0-9-]*[a-z0-9])?)' . + '(?>(?1)\.(?!(?1)[a-z0-9-]{64,})(?1)(?5)){0,126}|\[(?:(?>IPv6:(?>([a-f0-9]{1,4})(?>:(?6)){7}' . + '|(?!(?:.*[a-f0-9][:\]]){8,})((?6)(?>:(?6)){0,6})?::(?7)?))|(?>(?>IPv6:(?>(?6)(?>:(?6)){5}:' . + '|(?!(?:.*[a-f0-9]:){6,})(?8)?::(?>((?6)(?>:(?6)){0,4}):)?))?(25[0-5]|2[0-4][0-9]|1[0-9]{2}' . + '|[1-9]?[0-9])(?>\.(?9)){3}))\])(?1)$/isD', + $address + ); + case 'html5': + /* + * This is the pattern used in the HTML5 spec for validation of 'email' type form input elements. + * + * @see https://html.spec.whatwg.org/#e-mail-state-(type=email) + */ + return (bool) preg_match( + '/^[a-zA-Z0-9.!#$%&\'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}' . + '[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/sD', + $address + ); + case 'php': + default: + return filter_var($address, FILTER_VALIDATE_EMAIL) !== false; + } + } + + /** + * Tells whether IDNs (Internationalized Domain Names) are supported or not. This requires the + * `intl` and `mbstring` PHP extensions. + * + * @return bool `true` if required functions for IDN support are present + */ + public static function idnSupported() + { + return function_exists('idn_to_ascii') && function_exists('mb_convert_encoding'); + } + + /** + * Converts IDN in given email address to its ASCII form, also known as punycode, if possible. + * Important: Address must be passed in same encoding as currently set in PHPMailer::$CharSet. + * This function silently returns unmodified address if: + * - No conversion is necessary (i.e. domain name is not an IDN, or is already in ASCII form) + * - Conversion to punycode is impossible (e.g. required PHP functions are not available) + * or fails for any reason (e.g. domain contains characters not allowed in an IDN). + * + * @see PHPMailer::$CharSet + * + * @param string $address The email address to convert + * + * @return string The encoded address in ASCII form + */ + public function punyencodeAddress($address) + { + // Verify we have required functions, CharSet, and at-sign. + $pos = strrpos($address, '@'); + if (!empty($this->CharSet) && + false !== $pos && + static::idnSupported() + ) { + $domain = substr($address, ++$pos); + // Verify CharSet string is a valid one, and domain properly encoded in this CharSet. + if ($this->has8bitChars($domain) && @mb_check_encoding($domain, $this->CharSet)) { + $domain = mb_convert_encoding($domain, 'UTF-8', $this->CharSet); + //Ignore IDE complaints about this line - method signature changed in PHP 5.4 + $errorcode = 0; + if (defined('INTL_IDNA_VARIANT_UTS46')) { + $punycode = idn_to_ascii($domain, $errorcode, INTL_IDNA_VARIANT_UTS46); + } elseif (defined('INTL_IDNA_VARIANT_2003')) { + $punycode = idn_to_ascii($domain, $errorcode, INTL_IDNA_VARIANT_2003); + } else { + $punycode = idn_to_ascii($domain, $errorcode); + } + if (false !== $punycode) { + return substr($address, 0, $pos) . $punycode; + } + } + } + + return $address; + } + + /** + * Create a message and send it. + * Uses the sending method specified by $Mailer. + * + * @throws Exception + * + * @return bool false on error - See the ErrorInfo property for details of the error + */ + public function send() + { + try { + if (!$this->preSend()) { + return false; + } + + return $this->postSend(); + } catch (Exception $exc) { + $this->mailHeader = ''; + $this->setError($exc->getMessage()); + if ($this->exceptions) { + throw $exc; + } + + return false; + } + } + + /** + * Prepare a message for sending. + * + * @throws Exception + * + * @return bool + */ + public function preSend() + { + if ('smtp' === $this->Mailer + || ('mail' === $this->Mailer && stripos(PHP_OS, 'WIN') === 0) + ) { + //SMTP mandates RFC-compliant line endings + //and it's also used with mail() on Windows + static::setLE(self::CRLF); + } else { + //Maintain backward compatibility with legacy Linux command line mailers + static::setLE(PHP_EOL); + } + //Check for buggy PHP versions that add a header with an incorrect line break + if ('mail' === $this->Mailer + && ((PHP_VERSION_ID >= 70000 && PHP_VERSION_ID < 70017) + || (PHP_VERSION_ID >= 70100 && PHP_VERSION_ID < 70103)) + && ini_get('mail.add_x_header') === '1' + && stripos(PHP_OS, 'WIN') === 0 + ) { + trigger_error( + 'Your version of PHP is affected by a bug that may result in corrupted messages.' . + ' To fix it, switch to sending using SMTP, disable the mail.add_x_header option in' . + ' your php.ini, switch to MacOS or Linux, or upgrade your PHP to version 7.0.17+ or 7.1.3+.', + E_USER_WARNING + ); + } + + try { + $this->error_count = 0; // Reset errors + $this->mailHeader = ''; + + // Dequeue recipient and Reply-To addresses with IDN + foreach (array_merge($this->RecipientsQueue, $this->ReplyToQueue) as $params) { + $params[1] = $this->punyencodeAddress($params[1]); + call_user_func_array([$this, 'addAnAddress'], $params); + } + if (count($this->to) + count($this->cc) + count($this->bcc) < 1) { + throw new Exception($this->lang('provide_address'), self::STOP_CRITICAL); + } + + // Validate From, Sender, and ConfirmReadingTo addresses + foreach (['From', 'Sender', 'ConfirmReadingTo'] as $address_kind) { + $this->$address_kind = trim($this->$address_kind); + if (empty($this->$address_kind)) { + continue; + } + $this->$address_kind = $this->punyencodeAddress($this->$address_kind); + if (!static::validateAddress($this->$address_kind)) { + $error_message = sprintf( + '%s (%s): %s', + $this->lang('invalid_address'), + $address_kind, + $this->$address_kind + ); + $this->setError($error_message); + $this->edebug($error_message); + if ($this->exceptions) { + throw new Exception($error_message); + } + + return false; + } + } + + // Set whether the message is multipart/alternative + if ($this->alternativeExists()) { + $this->ContentType = static::CONTENT_TYPE_MULTIPART_ALTERNATIVE; + } + + $this->setMessageType(); + // Refuse to send an empty message unless we are specifically allowing it + if (!$this->AllowEmpty && empty($this->Body)) { + throw new Exception($this->lang('empty_message'), self::STOP_CRITICAL); + } + + //Trim subject consistently + $this->Subject = trim($this->Subject); + // Create body before headers in case body makes changes to headers (e.g. altering transfer encoding) + $this->MIMEHeader = ''; + $this->MIMEBody = $this->createBody(); + // createBody may have added some headers, so retain them + $tempheaders = $this->MIMEHeader; + $this->MIMEHeader = $this->createHeader(); + $this->MIMEHeader .= $tempheaders; + + // To capture the complete message when using mail(), create + // an extra header list which createHeader() doesn't fold in + if ('mail' === $this->Mailer) { + if (count($this->to) > 0) { + $this->mailHeader .= $this->addrAppend('To', $this->to); + } else { + $this->mailHeader .= $this->headerLine('To', 'undisclosed-recipients:;'); + } + $this->mailHeader .= $this->headerLine( + 'Subject', + $this->encodeHeader($this->secureHeader($this->Subject)) + ); + } + + // Sign with DKIM if enabled + if (!empty($this->DKIM_domain) + && !empty($this->DKIM_selector) + && (!empty($this->DKIM_private_string) + || (!empty($this->DKIM_private) + && static::isPermittedPath($this->DKIM_private) + && file_exists($this->DKIM_private) + ) + ) + ) { + $header_dkim = $this->DKIM_Add( + $this->MIMEHeader . $this->mailHeader, + $this->encodeHeader($this->secureHeader($this->Subject)), + $this->MIMEBody + ); + $this->MIMEHeader = static::stripTrailingWSP($this->MIMEHeader) . static::$LE . + static::normalizeBreaks($header_dkim) . static::$LE; + } + + return true; + } catch (Exception $exc) { + $this->setError($exc->getMessage()); + if ($this->exceptions) { + throw $exc; + } + + return false; + } + } + + /** + * Actually send a message via the selected mechanism. + * + * @throws Exception + * + * @return bool + */ + public function postSend() + { + try { + // Choose the mailer and send through it + switch ($this->Mailer) { + case 'sendmail': + case 'qmail': + return $this->sendmailSend($this->MIMEHeader, $this->MIMEBody); + case 'smtp': + return $this->smtpSend($this->MIMEHeader, $this->MIMEBody); + case 'mail': + return $this->mailSend($this->MIMEHeader, $this->MIMEBody); + default: + $sendMethod = $this->Mailer . 'Send'; + if (method_exists($this, $sendMethod)) { + return $this->$sendMethod($this->MIMEHeader, $this->MIMEBody); + } + + return $this->mailSend($this->MIMEHeader, $this->MIMEBody); + } + } catch (Exception $exc) { + if ($this->Mailer === 'smtp' && $this->SMTPKeepAlive == true) { + $this->smtp->reset(); + } + $this->setError($exc->getMessage()); + $this->edebug($exc->getMessage()); + if ($this->exceptions) { + throw $exc; + } + } + + return false; + } + + /** + * Send mail using the $Sendmail program. + * + * @see PHPMailer::$Sendmail + * + * @param string $header The message headers + * @param string $body The message body + * + * @throws Exception + * + * @return bool + */ + protected function sendmailSend($header, $body) + { + $header = static::stripTrailingWSP($header) . static::$LE . static::$LE; + + // CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped. + if (!empty($this->Sender) && self::isShellSafe($this->Sender)) { + if ('qmail' === $this->Mailer) { + $sendmailFmt = '%s -f%s'; + } else { + $sendmailFmt = '%s -oi -f%s -t'; + } + } elseif ('qmail' === $this->Mailer) { + $sendmailFmt = '%s'; + } else { + $sendmailFmt = '%s -oi -t'; + } + + $sendmail = sprintf($sendmailFmt, escapeshellcmd($this->Sendmail), $this->Sender); + + if ($this->SingleTo) { + foreach ($this->SingleToArray as $toAddr) { + $mail = @popen($sendmail, 'w'); + if (!$mail) { + throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + } + fwrite($mail, 'To: ' . $toAddr . "\n"); + fwrite($mail, $header); + fwrite($mail, $body); + $result = pclose($mail); + $this->doCallback( + ($result === 0), + [$toAddr], + $this->cc, + $this->bcc, + $this->Subject, + $body, + $this->From, + [] + ); + if (0 !== $result) { + throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + } + } + } else { + $mail = @popen($sendmail, 'w'); + if (!$mail) { + throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + } + fwrite($mail, $header); + fwrite($mail, $body); + $result = pclose($mail); + $this->doCallback( + ($result === 0), + $this->to, + $this->cc, + $this->bcc, + $this->Subject, + $body, + $this->From, + [] + ); + if (0 !== $result) { + throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + } + } + + return true; + } + + /** + * Fix CVE-2016-10033 and CVE-2016-10045 by disallowing potentially unsafe shell characters. + * Note that escapeshellarg and escapeshellcmd are inadequate for our purposes, especially on Windows. + * + * @see https://github.com/PHPMailer/PHPMailer/issues/924 CVE-2016-10045 bug report + * + * @param string $string The string to be validated + * + * @return bool + */ + protected static function isShellSafe($string) + { + // Future-proof + if (escapeshellcmd($string) !== $string + || !in_array(escapeshellarg($string), ["'$string'", "\"$string\""]) + ) { + return false; + } + + $length = strlen($string); + + for ($i = 0; $i < $length; ++$i) { + $c = $string[$i]; + + // All other characters have a special meaning in at least one common shell, including = and +. + // Full stop (.) has a special meaning in cmd.exe, but its impact should be negligible here. + // Note that this does permit non-Latin alphanumeric characters based on the current locale. + if (!ctype_alnum($c) && strpos('@_-.', $c) === false) { + return false; + } + } + + return true; + } + + /** + * Check whether a file path is of a permitted type. + * Used to reject URLs and phar files from functions that access local file paths, + * such as addAttachment. + * + * @param string $path A relative or absolute path to a file + * + * @return bool + */ + protected static function isPermittedPath($path) + { + return !preg_match('#^[a-z]+://#i', $path); + } + + /** + * Check whether a file path is safe, accessible, and readable. + * + * @param string $path A relative or absolute path to a file + * + * @return bool + */ + protected static function fileIsAccessible($path) + { + $readable = file_exists($path); + //If not a UNC path (expected to start with \\), check read permission, see #2069 + if (strpos($path, '\\\\') !== 0) { + $readable = $readable && is_readable($path); + } + return static::isPermittedPath($path) && $readable; + } + + /** + * Send mail using the PHP mail() function. + * + * @see http://www.php.net/manual/en/book.mail.php + * + * @param string $header The message headers + * @param string $body The message body + * + * @throws Exception + * + * @return bool + */ + protected function mailSend($header, $body) + { + $header = static::stripTrailingWSP($header) . static::$LE . static::$LE; + + $toArr = []; + foreach ($this->to as $toaddr) { + $toArr[] = $this->addrFormat($toaddr); + } + $to = implode(', ', $toArr); + + $params = null; + //This sets the SMTP envelope sender which gets turned into a return-path header by the receiver + //A space after `-f` is optional, but there is a long history of its presence + //causing problems, so we don't use one + //Exim docs: http://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_exim_command_line.html + //Sendmail docs: http://www.sendmail.org/~ca/email/man/sendmail.html + //Qmail docs: http://www.qmail.org/man/man8/qmail-inject.html + //Example problem: https://www.drupal.org/node/1057954 + // CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped. + if (!empty($this->Sender) && static::validateAddress($this->Sender) && self::isShellSafe($this->Sender)) { + $params = sprintf('-f%s', $this->Sender); + } + if (!empty($this->Sender) && static::validateAddress($this->Sender)) { + $old_from = ini_get('sendmail_from'); + ini_set('sendmail_from', $this->Sender); + } + $result = false; + if ($this->SingleTo && count($toArr) > 1) { + foreach ($toArr as $toAddr) { + $result = $this->mailPassthru($toAddr, $this->Subject, $body, $header, $params); + $this->doCallback($result, [$toAddr], $this->cc, $this->bcc, $this->Subject, $body, $this->From, []); + } + } else { + $result = $this->mailPassthru($to, $this->Subject, $body, $header, $params); + $this->doCallback($result, $this->to, $this->cc, $this->bcc, $this->Subject, $body, $this->From, []); + } + if (isset($old_from)) { + ini_set('sendmail_from', $old_from); + } + if (!$result) { + throw new Exception($this->lang('instantiate'), self::STOP_CRITICAL); + } + + return true; + } + + /** + * Get an instance to use for SMTP operations. + * Override this function to load your own SMTP implementation, + * or set one with setSMTPInstance. + * + * @return SMTP + */ + public function getSMTPInstance() + { + if (!is_object($this->smtp)) { + $this->smtp = new SMTP(); + } + + return $this->smtp; + } + + /** + * Provide an instance to use for SMTP operations. + * + * @return SMTP + */ + public function setSMTPInstance(SMTP $smtp) + { + $this->smtp = $smtp; + + return $this->smtp; + } + + /** + * Send mail via SMTP. + * Returns false if there is a bad MAIL FROM, RCPT, or DATA input. + * + * @see PHPMailer::setSMTPInstance() to use a different class. + * + * @uses \PHPMailer\PHPMailer\SMTP + * + * @param string $header The message headers + * @param string $body The message body + * + * @throws Exception + * + * @return bool + */ + protected function smtpSend($header, $body) + { + $header = static::stripTrailingWSP($header) . static::$LE . static::$LE; + $bad_rcpt = []; + if (!$this->smtpConnect($this->SMTPOptions)) { + throw new Exception($this->lang('smtp_connect_failed'), self::STOP_CRITICAL); + } + //Sender already validated in preSend() + if ('' === $this->Sender) { + $smtp_from = $this->From; + } else { + $smtp_from = $this->Sender; + } + if (!$this->smtp->mail($smtp_from)) { + $this->setError($this->lang('from_failed') . $smtp_from . ' : ' . implode(',', $this->smtp->getError())); + throw new Exception($this->ErrorInfo, self::STOP_CRITICAL); + } + + $callbacks = []; + // Attempt to send to all recipients + foreach ([$this->to, $this->cc, $this->bcc] as $togroup) { + foreach ($togroup as $to) { + if (!$this->smtp->recipient($to[0], $this->dsn)) { + $error = $this->smtp->getError(); + $bad_rcpt[] = ['to' => $to[0], 'error' => $error['detail']]; + $isSent = false; + } else { + $isSent = true; + } + + $callbacks[] = ['issent'=>$isSent, 'to'=>$to[0]]; + } + } + + // Only send the DATA command if we have viable recipients + if ((count($this->all_recipients) > count($bad_rcpt)) && !$this->smtp->data($header . $body)) { + throw new Exception($this->lang('data_not_accepted'), self::STOP_CRITICAL); + } + + $smtp_transaction_id = $this->smtp->getLastTransactionID(); + + if ($this->SMTPKeepAlive) { + $this->smtp->reset(); + } else { + $this->smtp->quit(); + $this->smtp->close(); + } + + foreach ($callbacks as $cb) { + $this->doCallback( + $cb['issent'], + [$cb['to']], + [], + [], + $this->Subject, + $body, + $this->From, + ['smtp_transaction_id' => $smtp_transaction_id] + ); + } + + //Create error message for any bad addresses + if (count($bad_rcpt) > 0) { + $errstr = ''; + foreach ($bad_rcpt as $bad) { + $errstr .= $bad['to'] . ': ' . $bad['error']; + } + throw new Exception($this->lang('recipients_failed') . $errstr, self::STOP_CONTINUE); + } + + return true; + } + + /** + * Initiate a connection to an SMTP server. + * Returns false if the operation failed. + * + * @param array $options An array of options compatible with stream_context_create() + * + * @throws Exception + * + * @uses \PHPMailer\PHPMailer\SMTP + * + * @return bool + */ + public function smtpConnect($options = null) + { + if (null === $this->smtp) { + $this->smtp = $this->getSMTPInstance(); + } + + //If no options are provided, use whatever is set in the instance + if (null === $options) { + $options = $this->SMTPOptions; + } + + // Already connected? + if ($this->smtp->connected()) { + return true; + } + + $this->smtp->setTimeout($this->Timeout); + $this->smtp->setDebugLevel($this->SMTPDebug); + $this->smtp->setDebugOutput($this->Debugoutput); + $this->smtp->setVerp($this->do_verp); + $hosts = explode(';', $this->Host); + $lastexception = null; + + foreach ($hosts as $hostentry) { + $hostinfo = []; + if (!preg_match( + '/^(?:(ssl|tls):\/\/)?(.+?)(?::(\d+))?$/', + trim($hostentry), + $hostinfo + )) { + $this->edebug($this->lang('invalid_hostentry') . ' ' . trim($hostentry)); + // Not a valid host entry + continue; + } + // $hostinfo[1]: optional ssl or tls prefix + // $hostinfo[2]: the hostname + // $hostinfo[3]: optional port number + // The host string prefix can temporarily override the current setting for SMTPSecure + // If it's not specified, the default value is used + + //Check the host name is a valid name or IP address before trying to use it + if (!static::isValidHost($hostinfo[2])) { + $this->edebug($this->lang('invalid_host') . ' ' . $hostinfo[2]); + continue; + } + $prefix = ''; + $secure = $this->SMTPSecure; + $tls = (static::ENCRYPTION_STARTTLS === $this->SMTPSecure); + if ('ssl' === $hostinfo[1] || ('' === $hostinfo[1] && static::ENCRYPTION_SMTPS === $this->SMTPSecure)) { + $prefix = 'ssl://'; + $tls = false; // Can't have SSL and TLS at the same time + $secure = static::ENCRYPTION_SMTPS; + } elseif ('tls' === $hostinfo[1]) { + $tls = true; + // tls doesn't use a prefix + $secure = static::ENCRYPTION_STARTTLS; + } + //Do we need the OpenSSL extension? + $sslext = defined('OPENSSL_ALGO_SHA256'); + if (static::ENCRYPTION_STARTTLS === $secure || static::ENCRYPTION_SMTPS === $secure) { + //Check for an OpenSSL constant rather than using extension_loaded, which is sometimes disabled + if (!$sslext) { + throw new Exception($this->lang('extension_missing') . 'openssl', self::STOP_CRITICAL); + } + } + $host = $hostinfo[2]; + $port = $this->Port; + if ( + array_key_exists(3, $hostinfo) && + is_numeric($hostinfo[3]) && + $hostinfo[3] > 0 && + $hostinfo[3] < 65536 + ) { + $port = (int) $hostinfo[3]; + } + if ($this->smtp->connect($prefix . $host, $port, $this->Timeout, $options)) { + try { + if ($this->Helo) { + $hello = $this->Helo; + } else { + $hello = $this->serverHostname(); + } + $this->smtp->hello($hello); + //Automatically enable TLS encryption if: + // * it's not disabled + // * we have openssl extension + // * we are not already using SSL + // * the server offers STARTTLS + if ($this->SMTPAutoTLS && $sslext && 'ssl' !== $secure && $this->smtp->getServerExt('STARTTLS')) { + $tls = true; + } + if ($tls) { + if (!$this->smtp->startTLS()) { + throw new Exception($this->lang('connect_host')); + } + // We must resend EHLO after TLS negotiation + $this->smtp->hello($hello); + } + if ($this->SMTPAuth && !$this->smtp->authenticate( + $this->Username, + $this->Password, + $this->AuthType, + $this->oauth + )) { + throw new Exception($this->lang('authenticate')); + } + + return true; + } catch (Exception $exc) { + $lastexception = $exc; + $this->edebug($exc->getMessage()); + // We must have connected, but then failed TLS or Auth, so close connection nicely + $this->smtp->quit(); + } + } + } + // If we get here, all connection attempts have failed, so close connection hard + $this->smtp->close(); + // As we've caught all exceptions, just report whatever the last one was + if ($this->exceptions && null !== $lastexception) { + throw $lastexception; + } + + return false; + } + + /** + * Close the active SMTP session if one exists. + */ + public function smtpClose() + { + if ((null !== $this->smtp) && $this->smtp->connected()) { + $this->smtp->quit(); + $this->smtp->close(); + } + } + + /** + * Set the language for error messages. + * Returns false if it cannot load the language file. + * The default language is English. + * + * @param string $langcode ISO 639-1 2-character language code (e.g. French is "fr") + * @param string $lang_path Path to the language file directory, with trailing separator (slash) + * + * @return bool + */ + public function setLanguage($langcode = 'en', $lang_path = '') + { + // Backwards compatibility for renamed language codes + $renamed_langcodes = [ + 'br' => 'pt_br', + 'cz' => 'cs', + 'dk' => 'da', + 'no' => 'nb', + 'se' => 'sv', + 'rs' => 'sr', + 'tg' => 'tl', + 'am' => 'hy', + ]; + + if (isset($renamed_langcodes[$langcode])) { + $langcode = $renamed_langcodes[$langcode]; + } + + // Define full set of translatable strings in English + $PHPMAILER_LANG = [ + 'authenticate' => 'SMTP Error: Could not authenticate.', + 'connect_host' => 'SMTP Error: Could not connect to SMTP host.', + 'data_not_accepted' => 'SMTP Error: data not accepted.', + 'empty_message' => 'Message body empty', + 'encoding' => 'Unknown encoding: ', + 'execute' => 'Could not execute: ', + 'file_access' => 'Could not access file: ', + 'file_open' => 'File Error: Could not open file: ', + 'from_failed' => 'The following From address failed: ', + 'instantiate' => 'Could not instantiate mail function.', + 'invalid_address' => 'Invalid address: ', + 'invalid_hostentry' => 'Invalid hostentry: ', + 'invalid_host' => 'Invalid host: ', + 'mailer_not_supported' => ' mailer is not supported.', + 'provide_address' => 'You must provide at least one recipient email address.', + 'recipients_failed' => 'SMTP Error: The following recipients failed: ', + 'signing' => 'Signing Error: ', + 'smtp_connect_failed' => 'SMTP connect() failed.', + 'smtp_error' => 'SMTP server error: ', + 'variable_set' => 'Cannot set or reset variable: ', + 'extension_missing' => 'Extension missing: ', + ]; + if (empty($lang_path)) { + // Calculate an absolute path so it can work if CWD is not here + $lang_path = dirname(__DIR__) . DIRECTORY_SEPARATOR . 'language' . DIRECTORY_SEPARATOR; + } + //Validate $langcode + if (!preg_match('/^[a-z]{2}(?:_[a-zA-Z]{2})?$/', $langcode)) { + $langcode = 'en'; + } + $foundlang = true; + $lang_file = $lang_path . 'phpmailer.lang-' . $langcode . '.php'; + // There is no English translation file + if ('en' !== $langcode) { + // Make sure language file path is readable + if (!static::fileIsAccessible($lang_file)) { + $foundlang = false; + } else { + // Overwrite language-specific strings. + // This way we'll never have missing translation keys. + $foundlang = include $lang_file; + } + } + $this->language = $PHPMAILER_LANG; + + return (bool) $foundlang; // Returns false if language not found + } + + /** + * Get the array of strings for the current language. + * + * @return array + */ + public function getTranslations() + { + return $this->language; + } + + /** + * Create recipient headers. + * + * @param string $type + * @param array $addr An array of recipients, + * where each recipient is a 2-element indexed array with element 0 containing an address + * and element 1 containing a name, like: + * [['joe@example.com', 'Joe User'], ['zoe@example.com', 'Zoe User']] + * + * @return string + */ + public function addrAppend($type, $addr) + { + $addresses = []; + foreach ($addr as $address) { + $addresses[] = $this->addrFormat($address); + } + + return $type . ': ' . implode(', ', $addresses) . static::$LE; + } + + /** + * Format an address for use in a message header. + * + * @param array $addr A 2-element indexed array, element 0 containing an address, element 1 containing a name like + * ['joe@example.com', 'Joe User'] + * + * @return string + */ + public function addrFormat($addr) + { + if (empty($addr[1])) { // No name provided + return $this->secureHeader($addr[0]); + } + + return $this->encodeHeader($this->secureHeader($addr[1]), 'phrase') . + ' <' . $this->secureHeader($addr[0]) . '>'; + } + + /** + * Word-wrap message. + * For use with mailers that do not automatically perform wrapping + * and for quoted-printable encoded messages. + * Original written by philippe. + * + * @param string $message The message to wrap + * @param int $length The line length to wrap to + * @param bool $qp_mode Whether to run in Quoted-Printable mode + * + * @return string + */ + public function wrapText($message, $length, $qp_mode = false) + { + if ($qp_mode) { + $soft_break = sprintf(' =%s', static::$LE); + } else { + $soft_break = static::$LE; + } + // If utf-8 encoding is used, we will need to make sure we don't + // split multibyte characters when we wrap + $is_utf8 = static::CHARSET_UTF8 === strtolower($this->CharSet); + $lelen = strlen(static::$LE); + $crlflen = strlen(static::$LE); + + $message = static::normalizeBreaks($message); + //Remove a trailing line break + if (substr($message, -$lelen) === static::$LE) { + $message = substr($message, 0, -$lelen); + } + + //Split message into lines + $lines = explode(static::$LE, $message); + //Message will be rebuilt in here + $message = ''; + foreach ($lines as $line) { + $words = explode(' ', $line); + $buf = ''; + $firstword = true; + foreach ($words as $word) { + if ($qp_mode && (strlen($word) > $length)) { + $space_left = $length - strlen($buf) - $crlflen; + if (!$firstword) { + if ($space_left > 20) { + $len = $space_left; + if ($is_utf8) { + $len = $this->utf8CharBoundary($word, $len); + } elseif ('=' === substr($word, $len - 1, 1)) { + --$len; + } elseif ('=' === substr($word, $len - 2, 1)) { + $len -= 2; + } + $part = substr($word, 0, $len); + $word = substr($word, $len); + $buf .= ' ' . $part; + $message .= $buf . sprintf('=%s', static::$LE); + } else { + $message .= $buf . $soft_break; + } + $buf = ''; + } + while ($word !== '') { + if ($length <= 0) { + break; + } + $len = $length; + if ($is_utf8) { + $len = $this->utf8CharBoundary($word, $len); + } elseif ('=' === substr($word, $len - 1, 1)) { + --$len; + } elseif ('=' === substr($word, $len - 2, 1)) { + $len -= 2; + } + $part = substr($word, 0, $len); + $word = (string) substr($word, $len); + + if ($word !== '') { + $message .= $part . sprintf('=%s', static::$LE); + } else { + $buf = $part; + } + } + } else { + $buf_o = $buf; + if (!$firstword) { + $buf .= ' '; + } + $buf .= $word; + + if ('' !== $buf_o && strlen($buf) > $length) { + $message .= $buf_o . $soft_break; + $buf = $word; + } + } + $firstword = false; + } + $message .= $buf . static::$LE; + } + + return $message; + } + + /** + * Find the last character boundary prior to $maxLength in a utf-8 + * quoted-printable encoded string. + * Original written by Colin Brown. + * + * @param string $encodedText utf-8 QP text + * @param int $maxLength Find the last character boundary prior to this length + * + * @return int + */ + public function utf8CharBoundary($encodedText, $maxLength) + { + $foundSplitPos = false; + $lookBack = 3; + while (!$foundSplitPos) { + $lastChunk = substr($encodedText, $maxLength - $lookBack, $lookBack); + $encodedCharPos = strpos($lastChunk, '='); + if (false !== $encodedCharPos) { + // Found start of encoded character byte within $lookBack block. + // Check the encoded byte value (the 2 chars after the '=') + $hex = substr($encodedText, $maxLength - $lookBack + $encodedCharPos + 1, 2); + $dec = hexdec($hex); + if ($dec < 128) { + // Single byte character. + // If the encoded char was found at pos 0, it will fit + // otherwise reduce maxLength to start of the encoded char + if ($encodedCharPos > 0) { + $maxLength -= $lookBack - $encodedCharPos; + } + $foundSplitPos = true; + } elseif ($dec >= 192) { + // First byte of a multi byte character + // Reduce maxLength to split at start of character + $maxLength -= $lookBack - $encodedCharPos; + $foundSplitPos = true; + } elseif ($dec < 192) { + // Middle byte of a multi byte character, look further back + $lookBack += 3; + } + } else { + // No encoded character found + $foundSplitPos = true; + } + } + + return $maxLength; + } + + /** + * Apply word wrapping to the message body. + * Wraps the message body to the number of chars set in the WordWrap property. + * You should only do this to plain-text bodies as wrapping HTML tags may break them. + * This is called automatically by createBody(), so you don't need to call it yourself. + */ + public function setWordWrap() + { + if ($this->WordWrap < 1) { + return; + } + + switch ($this->message_type) { + case 'alt': + case 'alt_inline': + case 'alt_attach': + case 'alt_inline_attach': + $this->AltBody = $this->wrapText($this->AltBody, $this->WordWrap); + break; + default: + $this->Body = $this->wrapText($this->Body, $this->WordWrap); + break; + } + } + + /** + * Assemble message headers. + * + * @return string The assembled headers + */ + public function createHeader() + { + $result = ''; + + $result .= $this->headerLine('Date', '' === $this->MessageDate ? self::rfcDate() : $this->MessageDate); + + // The To header is created automatically by mail(), so needs to be omitted here + if ('mail' !== $this->Mailer) { + if ($this->SingleTo) { + foreach ($this->to as $toaddr) { + $this->SingleToArray[] = $this->addrFormat($toaddr); + } + } elseif (count($this->to) > 0) { + $result .= $this->addrAppend('To', $this->to); + } elseif (count($this->cc) === 0) { + $result .= $this->headerLine('To', 'undisclosed-recipients:;'); + } + } + $result .= $this->addrAppend('From', [[trim($this->From), $this->FromName]]); + + // sendmail and mail() extract Cc from the header before sending + if (count($this->cc) > 0) { + $result .= $this->addrAppend('Cc', $this->cc); + } + + // sendmail and mail() extract Bcc from the header before sending + if (( + 'sendmail' === $this->Mailer || 'qmail' === $this->Mailer || 'mail' === $this->Mailer + ) + && count($this->bcc) > 0 + ) { + $result .= $this->addrAppend('Bcc', $this->bcc); + } + + if (count($this->ReplyTo) > 0) { + $result .= $this->addrAppend('Reply-To', $this->ReplyTo); + } + + // mail() sets the subject itself + if ('mail' !== $this->Mailer) { + $result .= $this->headerLine('Subject', $this->encodeHeader($this->secureHeader($this->Subject))); + } + + // Only allow a custom message ID if it conforms to RFC 5322 section 3.6.4 + // https://tools.ietf.org/html/rfc5322#section-3.6.4 + if ('' !== $this->MessageID && preg_match('/^<.*@.*>$/', $this->MessageID)) { + $this->lastMessageID = $this->MessageID; + } else { + $this->lastMessageID = sprintf('<%s@%s>', $this->uniqueid, $this->serverHostname()); + } + $result .= $this->headerLine('Message-ID', $this->lastMessageID); + if (null !== $this->Priority) { + $result .= $this->headerLine('X-Priority', $this->Priority); + } + if ('' === $this->XMailer) { + $result .= $this->headerLine( + 'X-Mailer', + 'PHPMailer ' . self::VERSION . ' (https://github.com/PHPMailer/PHPMailer)' + ); + } else { + $myXmailer = trim($this->XMailer); + if ($myXmailer) { + $result .= $this->headerLine('X-Mailer', $myXmailer); + } + } + + if ('' !== $this->ConfirmReadingTo) { + $result .= $this->headerLine('Disposition-Notification-To', '<' . $this->ConfirmReadingTo . '>'); + } + + // Add custom headers + foreach ($this->CustomHeader as $header) { + $result .= $this->headerLine( + trim($header[0]), + $this->encodeHeader(trim($header[1])) + ); + } + if (!$this->sign_key_file) { + $result .= $this->headerLine('MIME-Version', '1.0'); + $result .= $this->getMailMIME(); + } + + return $result; + } + + /** + * Get the message MIME type headers. + * + * @return string + */ + public function getMailMIME() + { + $result = ''; + $ismultipart = true; + switch ($this->message_type) { + case 'inline': + $result .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_RELATED . ';'); + $result .= $this->textLine(' boundary="' . $this->boundary[1] . '"'); + break; + case 'attach': + case 'inline_attach': + case 'alt_attach': + case 'alt_inline_attach': + $result .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_MIXED . ';'); + $result .= $this->textLine(' boundary="' . $this->boundary[1] . '"'); + break; + case 'alt': + case 'alt_inline': + $result .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_ALTERNATIVE . ';'); + $result .= $this->textLine(' boundary="' . $this->boundary[1] . '"'); + break; + default: + // Catches case 'plain': and case '': + $result .= $this->textLine('Content-Type: ' . $this->ContentType . '; charset=' . $this->CharSet); + $ismultipart = false; + break; + } + // RFC1341 part 5 says 7bit is assumed if not specified + if (static::ENCODING_7BIT !== $this->Encoding) { + // RFC 2045 section 6.4 says multipart MIME parts may only use 7bit, 8bit or binary CTE + if ($ismultipart) { + if (static::ENCODING_8BIT === $this->Encoding) { + $result .= $this->headerLine('Content-Transfer-Encoding', static::ENCODING_8BIT); + } + // The only remaining alternatives are quoted-printable and base64, which are both 7bit compatible + } else { + $result .= $this->headerLine('Content-Transfer-Encoding', $this->Encoding); + } + } + + if ('mail' !== $this->Mailer) { +// $result .= static::$LE; + } + + return $result; + } + + /** + * Returns the whole MIME message. + * Includes complete headers and body. + * Only valid post preSend(). + * + * @see PHPMailer::preSend() + * + * @return string + */ + public function getSentMIMEMessage() + { + return static::stripTrailingWSP($this->MIMEHeader . $this->mailHeader) . + static::$LE . static::$LE . $this->MIMEBody; + } + + /** + * Create a unique ID to use for boundaries. + * + * @return string + */ + protected function generateId() + { + $len = 32; //32 bytes = 256 bits + $bytes = ''; + if (function_exists('random_bytes')) { + try { + $bytes = random_bytes($len); + } catch (\Exception $e) { + //Do nothing + } + } elseif (function_exists('openssl_random_pseudo_bytes')) { + /** @noinspection CryptographicallySecureRandomnessInspection */ + $bytes = openssl_random_pseudo_bytes($len); + } + if ($bytes === '') { + //We failed to produce a proper random string, so make do. + //Use a hash to force the length to the same as the other methods + $bytes = hash('sha256', uniqid((string) mt_rand(), true), true); + } + + //We don't care about messing up base64 format here, just want a random string + return str_replace(['=', '+', '/'], '', base64_encode(hash('sha256', $bytes, true))); + } + + /** + * Assemble the message body. + * Returns an empty string on failure. + * + * @throws Exception + * + * @return string The assembled message body + */ + public function createBody() + { + $body = ''; + //Create unique IDs and preset boundaries + $this->uniqueid = $this->generateId(); + $this->boundary[1] = 'b1_' . $this->uniqueid; + $this->boundary[2] = 'b2_' . $this->uniqueid; + $this->boundary[3] = 'b3_' . $this->uniqueid; + + if ($this->sign_key_file) { + $body .= $this->getMailMIME() . static::$LE; + } + + $this->setWordWrap(); + + $bodyEncoding = $this->Encoding; + $bodyCharSet = $this->CharSet; + //Can we do a 7-bit downgrade? + if (static::ENCODING_8BIT === $bodyEncoding && !$this->has8bitChars($this->Body)) { + $bodyEncoding = static::ENCODING_7BIT; + //All ISO 8859, Windows codepage and UTF-8 charsets are ascii compatible up to 7-bit + $bodyCharSet = static::CHARSET_ASCII; + } + //If lines are too long, and we're not already using an encoding that will shorten them, + //change to quoted-printable transfer encoding for the body part only + if (static::ENCODING_BASE64 !== $this->Encoding && static::hasLineLongerThanMax($this->Body)) { + $bodyEncoding = static::ENCODING_QUOTED_PRINTABLE; + } + + $altBodyEncoding = $this->Encoding; + $altBodyCharSet = $this->CharSet; + //Can we do a 7-bit downgrade? + if (static::ENCODING_8BIT === $altBodyEncoding && !$this->has8bitChars($this->AltBody)) { + $altBodyEncoding = static::ENCODING_7BIT; + //All ISO 8859, Windows codepage and UTF-8 charsets are ascii compatible up to 7-bit + $altBodyCharSet = static::CHARSET_ASCII; + } + //If lines are too long, and we're not already using an encoding that will shorten them, + //change to quoted-printable transfer encoding for the alt body part only + if (static::ENCODING_BASE64 !== $altBodyEncoding && static::hasLineLongerThanMax($this->AltBody)) { + $altBodyEncoding = static::ENCODING_QUOTED_PRINTABLE; + } + //Use this as a preamble in all multipart message types + $mimepre = 'This is a multi-part message in MIME format.' . static::$LE . static::$LE; + switch ($this->message_type) { + case 'inline': + $body .= $mimepre; + $body .= $this->getBoundary($this->boundary[1], $bodyCharSet, '', $bodyEncoding); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $body .= static::$LE; + $body .= $this->attachAll('inline', $this->boundary[1]); + break; + case 'attach': + $body .= $mimepre; + $body .= $this->getBoundary($this->boundary[1], $bodyCharSet, '', $bodyEncoding); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $body .= static::$LE; + $body .= $this->attachAll('attachment', $this->boundary[1]); + break; + case 'inline_attach': + $body .= $mimepre; + $body .= $this->textLine('--' . $this->boundary[1]); + $body .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_RELATED . ';'); + $body .= $this->textLine(' boundary="' . $this->boundary[2] . '";'); + $body .= $this->textLine(' type="' . static::CONTENT_TYPE_TEXT_HTML . '"'); + $body .= static::$LE; + $body .= $this->getBoundary($this->boundary[2], $bodyCharSet, '', $bodyEncoding); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $body .= static::$LE; + $body .= $this->attachAll('inline', $this->boundary[2]); + $body .= static::$LE; + $body .= $this->attachAll('attachment', $this->boundary[1]); + break; + case 'alt': + $body .= $mimepre; + $body .= $this->getBoundary( + $this->boundary[1], + $altBodyCharSet, + static::CONTENT_TYPE_PLAINTEXT, + $altBodyEncoding + ); + $body .= $this->encodeString($this->AltBody, $altBodyEncoding); + $body .= static::$LE; + $body .= $this->getBoundary( + $this->boundary[1], + $bodyCharSet, + static::CONTENT_TYPE_TEXT_HTML, + $bodyEncoding + ); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $body .= static::$LE; + if (!empty($this->Ical)) { + $method = static::ICAL_METHOD_REQUEST; + foreach (static::$IcalMethods as $imethod) { + if (stripos($this->Ical, 'METHOD:' . $imethod) !== false) { + $method = $imethod; + break; + } + } + $body .= $this->getBoundary( + $this->boundary[1], + '', + static::CONTENT_TYPE_TEXT_CALENDAR . '; method=' . $method, + '' + ); + $body .= $this->encodeString($this->Ical, $this->Encoding); + $body .= static::$LE; + } + $body .= $this->endBoundary($this->boundary[1]); + break; + case 'alt_inline': + $body .= $mimepre; + $body .= $this->getBoundary( + $this->boundary[1], + $altBodyCharSet, + static::CONTENT_TYPE_PLAINTEXT, + $altBodyEncoding + ); + $body .= $this->encodeString($this->AltBody, $altBodyEncoding); + $body .= static::$LE; + $body .= $this->textLine('--' . $this->boundary[1]); + $body .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_RELATED . ';'); + $body .= $this->textLine(' boundary="' . $this->boundary[2] . '";'); + $body .= $this->textLine(' type="' . static::CONTENT_TYPE_TEXT_HTML . '"'); + $body .= static::$LE; + $body .= $this->getBoundary( + $this->boundary[2], + $bodyCharSet, + static::CONTENT_TYPE_TEXT_HTML, + $bodyEncoding + ); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $body .= static::$LE; + $body .= $this->attachAll('inline', $this->boundary[2]); + $body .= static::$LE; + $body .= $this->endBoundary($this->boundary[1]); + break; + case 'alt_attach': + $body .= $mimepre; + $body .= $this->textLine('--' . $this->boundary[1]); + $body .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_ALTERNATIVE . ';'); + $body .= $this->textLine(' boundary="' . $this->boundary[2] . '"'); + $body .= static::$LE; + $body .= $this->getBoundary( + $this->boundary[2], + $altBodyCharSet, + static::CONTENT_TYPE_PLAINTEXT, + $altBodyEncoding + ); + $body .= $this->encodeString($this->AltBody, $altBodyEncoding); + $body .= static::$LE; + $body .= $this->getBoundary( + $this->boundary[2], + $bodyCharSet, + static::CONTENT_TYPE_TEXT_HTML, + $bodyEncoding + ); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $body .= static::$LE; + if (!empty($this->Ical)) { + $method = static::ICAL_METHOD_REQUEST; + foreach (static::$IcalMethods as $imethod) { + if (stripos($this->Ical, 'METHOD:' . $imethod) !== false) { + $method = $imethod; + break; + } + } + $body .= $this->getBoundary( + $this->boundary[2], + '', + static::CONTENT_TYPE_TEXT_CALENDAR . '; method=' . $method, + '' + ); + $body .= $this->encodeString($this->Ical, $this->Encoding); + } + $body .= $this->endBoundary($this->boundary[2]); + $body .= static::$LE; + $body .= $this->attachAll('attachment', $this->boundary[1]); + break; + case 'alt_inline_attach': + $body .= $mimepre; + $body .= $this->textLine('--' . $this->boundary[1]); + $body .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_ALTERNATIVE . ';'); + $body .= $this->textLine(' boundary="' . $this->boundary[2] . '"'); + $body .= static::$LE; + $body .= $this->getBoundary( + $this->boundary[2], + $altBodyCharSet, + static::CONTENT_TYPE_PLAINTEXT, + $altBodyEncoding + ); + $body .= $this->encodeString($this->AltBody, $altBodyEncoding); + $body .= static::$LE; + $body .= $this->textLine('--' . $this->boundary[2]); + $body .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_RELATED . ';'); + $body .= $this->textLine(' boundary="' . $this->boundary[3] . '";'); + $body .= $this->textLine(' type="' . static::CONTENT_TYPE_TEXT_HTML . '"'); + $body .= static::$LE; + $body .= $this->getBoundary( + $this->boundary[3], + $bodyCharSet, + static::CONTENT_TYPE_TEXT_HTML, + $bodyEncoding + ); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $body .= static::$LE; + $body .= $this->attachAll('inline', $this->boundary[3]); + $body .= static::$LE; + $body .= $this->endBoundary($this->boundary[2]); + $body .= static::$LE; + $body .= $this->attachAll('attachment', $this->boundary[1]); + break; + default: + // Catch case 'plain' and case '', applies to simple `text/plain` and `text/html` body content types + //Reset the `Encoding` property in case we changed it for line length reasons + $this->Encoding = $bodyEncoding; + $body .= $this->encodeString($this->Body, $this->Encoding); + break; + } + + if ($this->isError()) { + $body = ''; + if ($this->exceptions) { + throw new Exception($this->lang('empty_message'), self::STOP_CRITICAL); + } + } elseif ($this->sign_key_file) { + try { + if (!defined('PKCS7_TEXT')) { + throw new Exception($this->lang('extension_missing') . 'openssl'); + } + + $file = tempnam(sys_get_temp_dir(), 'srcsign'); + $signed = tempnam(sys_get_temp_dir(), 'mailsign'); + file_put_contents($file, $body); + + //Workaround for PHP bug https://bugs.php.net/bug.php?id=69197 + if (empty($this->sign_extracerts_file)) { + $sign = @openssl_pkcs7_sign( + $file, + $signed, + 'file://' . realpath($this->sign_cert_file), + ['file://' . realpath($this->sign_key_file), $this->sign_key_pass], + [] + ); + } else { + $sign = @openssl_pkcs7_sign( + $file, + $signed, + 'file://' . realpath($this->sign_cert_file), + ['file://' . realpath($this->sign_key_file), $this->sign_key_pass], + [], + PKCS7_DETACHED, + $this->sign_extracerts_file + ); + } + + @unlink($file); + if ($sign) { + $body = file_get_contents($signed); + @unlink($signed); + //The message returned by openssl contains both headers and body, so need to split them up + $parts = explode("\n\n", $body, 2); + $this->MIMEHeader .= $parts[0] . static::$LE . static::$LE; + $body = $parts[1]; + } else { + @unlink($signed); + throw new Exception($this->lang('signing') . openssl_error_string()); + } + } catch (Exception $exc) { + $body = ''; + if ($this->exceptions) { + throw $exc; + } + } + } + + return $body; + } + + /** + * Return the start of a message boundary. + * + * @param string $boundary + * @param string $charSet + * @param string $contentType + * @param string $encoding + * + * @return string + */ + protected function getBoundary($boundary, $charSet, $contentType, $encoding) + { + $result = ''; + if ('' === $charSet) { + $charSet = $this->CharSet; + } + if ('' === $contentType) { + $contentType = $this->ContentType; + } + if ('' === $encoding) { + $encoding = $this->Encoding; + } + $result .= $this->textLine('--' . $boundary); + $result .= sprintf('Content-Type: %s; charset=%s', $contentType, $charSet); + $result .= static::$LE; + // RFC1341 part 5 says 7bit is assumed if not specified + if (static::ENCODING_7BIT !== $encoding) { + $result .= $this->headerLine('Content-Transfer-Encoding', $encoding); + } + $result .= static::$LE; + + return $result; + } + + /** + * Return the end of a message boundary. + * + * @param string $boundary + * + * @return string + */ + protected function endBoundary($boundary) + { + return static::$LE . '--' . $boundary . '--' . static::$LE; + } + + /** + * Set the message type. + * PHPMailer only supports some preset message types, not arbitrary MIME structures. + */ + protected function setMessageType() + { + $type = []; + if ($this->alternativeExists()) { + $type[] = 'alt'; + } + if ($this->inlineImageExists()) { + $type[] = 'inline'; + } + if ($this->attachmentExists()) { + $type[] = 'attach'; + } + $this->message_type = implode('_', $type); + if ('' === $this->message_type) { + //The 'plain' message_type refers to the message having a single body element, not that it is plain-text + $this->message_type = 'plain'; + } + } + + /** + * Format a header line. + * + * @param string $name + * @param string|int $value + * + * @return string + */ + public function headerLine($name, $value) + { + return $name . ': ' . $value . static::$LE; + } + + /** + * Return a formatted mail line. + * + * @param string $value + * + * @return string + */ + public function textLine($value) + { + return $value . static::$LE; + } + + /** + * Add an attachment from a path on the filesystem. + * Never use a user-supplied path to a file! + * Returns false if the file could not be found or read. + * Explicitly *does not* support passing URLs; PHPMailer is not an HTTP client. + * If you need to do that, fetch the resource yourself and pass it in via a local file or string. + * + * @param string $path Path to the attachment + * @param string $name Overrides the attachment name + * @param string $encoding File encoding (see $Encoding) + * @param string $type MIME type, e.g. `image/jpeg`; determined automatically from $path if not specified + * @param string $disposition Disposition to use + * + * @throws Exception + * + * @return bool + */ + public function addAttachment( + $path, + $name = '', + $encoding = self::ENCODING_BASE64, + $type = '', + $disposition = 'attachment' + ) { + try { + if (!static::fileIsAccessible($path)) { + throw new Exception($this->lang('file_access') . $path, self::STOP_CONTINUE); + } + + // If a MIME type is not specified, try to work it out from the file name + if ('' === $type) { + $type = static::filenameToType($path); + } + + $filename = (string) static::mb_pathinfo($path, PATHINFO_BASENAME); + if ('' === $name) { + $name = $filename; + } + if (!$this->validateEncoding($encoding)) { + throw new Exception($this->lang('encoding') . $encoding); + } + + $this->attachment[] = [ + 0 => $path, + 1 => $filename, + 2 => $name, + 3 => $encoding, + 4 => $type, + 5 => false, // isStringAttachment + 6 => $disposition, + 7 => $name, + ]; + } catch (Exception $exc) { + $this->setError($exc->getMessage()); + $this->edebug($exc->getMessage()); + if ($this->exceptions) { + throw $exc; + } + + return false; + } + + return true; + } + + /** + * Return the array of attachments. + * + * @return array + */ + public function getAttachments() + { + return $this->attachment; + } + + /** + * Attach all file, string, and binary attachments to the message. + * Returns an empty string on failure. + * + * @param string $disposition_type + * @param string $boundary + * + * @throws Exception + * + * @return string + */ + protected function attachAll($disposition_type, $boundary) + { + // Return text of body + $mime = []; + $cidUniq = []; + $incl = []; + + // Add all attachments + foreach ($this->attachment as $attachment) { + // Check if it is a valid disposition_filter + if ($attachment[6] === $disposition_type) { + // Check for string attachment + $string = ''; + $path = ''; + $bString = $attachment[5]; + if ($bString) { + $string = $attachment[0]; + } else { + $path = $attachment[0]; + } + + $inclhash = hash('sha256', serialize($attachment)); + if (in_array($inclhash, $incl, true)) { + continue; + } + $incl[] = $inclhash; + $name = $attachment[2]; + $encoding = $attachment[3]; + $type = $attachment[4]; + $disposition = $attachment[6]; + $cid = $attachment[7]; + if ('inline' === $disposition && array_key_exists($cid, $cidUniq)) { + continue; + } + $cidUniq[$cid] = true; + + $mime[] = sprintf('--%s%s', $boundary, static::$LE); + //Only include a filename property if we have one + if (!empty($name)) { + $mime[] = sprintf( + 'Content-Type: %s; name=%s%s', + $type, + static::quotedString($this->encodeHeader($this->secureHeader($name))), + static::$LE + ); + } else { + $mime[] = sprintf( + 'Content-Type: %s%s', + $type, + static::$LE + ); + } + // RFC1341 part 5 says 7bit is assumed if not specified + if (static::ENCODING_7BIT !== $encoding) { + $mime[] = sprintf('Content-Transfer-Encoding: %s%s', $encoding, static::$LE); + } + + //Only set Content-IDs on inline attachments + if ((string) $cid !== '' && $disposition === 'inline') { + $mime[] = 'Content-ID: <' . $this->encodeHeader($this->secureHeader($cid)) . '>' . static::$LE; + } + + // Allow for bypassing the Content-Disposition header + if (!empty($disposition)) { + $encoded_name = $this->encodeHeader($this->secureHeader($name)); + if (!empty($encoded_name)) { + $mime[] = sprintf( + 'Content-Disposition: %s; filename=%s%s', + $disposition, + static::quotedString($encoded_name), + static::$LE . static::$LE + ); + } else { + $mime[] = sprintf( + 'Content-Disposition: %s%s', + $disposition, + static::$LE . static::$LE + ); + } + } else { + $mime[] = static::$LE; + } + + // Encode as string attachment + if ($bString) { + $mime[] = $this->encodeString($string, $encoding); + } else { + $mime[] = $this->encodeFile($path, $encoding); + } + if ($this->isError()) { + return ''; + } + $mime[] = static::$LE; + } + } + + $mime[] = sprintf('--%s--%s', $boundary, static::$LE); + + return implode('', $mime); + } + + /** + * Encode a file attachment in requested format. + * Returns an empty string on failure. + * + * @param string $path The full path to the file + * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable' + * + * @return string + */ + protected function encodeFile($path, $encoding = self::ENCODING_BASE64) + { + try { + if (!static::fileIsAccessible($path)) { + throw new Exception($this->lang('file_open') . $path, self::STOP_CONTINUE); + } + $file_buffer = file_get_contents($path); + if (false === $file_buffer) { + throw new Exception($this->lang('file_open') . $path, self::STOP_CONTINUE); + } + $file_buffer = $this->encodeString($file_buffer, $encoding); + + return $file_buffer; + } catch (Exception $exc) { + $this->setError($exc->getMessage()); + $this->edebug($exc->getMessage()); + if ($this->exceptions) { + throw $exc; + } + + return ''; + } + } + + /** + * Encode a string in requested format. + * Returns an empty string on failure. + * + * @param string $str The text to encode + * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable' + * + * @throws Exception + * + * @return string + */ + public function encodeString($str, $encoding = self::ENCODING_BASE64) + { + $encoded = ''; + switch (strtolower($encoding)) { + case static::ENCODING_BASE64: + $encoded = chunk_split( + base64_encode($str), + static::STD_LINE_LENGTH, + static::$LE + ); + break; + case static::ENCODING_7BIT: + case static::ENCODING_8BIT: + $encoded = static::normalizeBreaks($str); + // Make sure it ends with a line break + if (substr($encoded, -(strlen(static::$LE))) !== static::$LE) { + $encoded .= static::$LE; + } + break; + case static::ENCODING_BINARY: + $encoded = $str; + break; + case static::ENCODING_QUOTED_PRINTABLE: + $encoded = $this->encodeQP($str); + break; + default: + $this->setError($this->lang('encoding') . $encoding); + if ($this->exceptions) { + throw new Exception($this->lang('encoding') . $encoding); + } + break; + } + + return $encoded; + } + + /** + * Encode a header value (not including its label) optimally. + * Picks shortest of Q, B, or none. Result includes folding if needed. + * See RFC822 definitions for phrase, comment and text positions. + * + * @param string $str The header value to encode + * @param string $position What context the string will be used in + * + * @return string + */ + public function encodeHeader($str, $position = 'text') + { + $matchcount = 0; + switch (strtolower($position)) { + case 'phrase': + if (!preg_match('/[\200-\377]/', $str)) { + // Can't use addslashes as we don't know the value of magic_quotes_sybase + $encoded = addcslashes($str, "\0..\37\177\\\""); + if (($str === $encoded) && !preg_match('/[^A-Za-z0-9!#$%&\'*+\/=?^_`{|}~ -]/', $str)) { + return $encoded; + } + + return "\"$encoded\""; + } + $matchcount = preg_match_all('/[^\040\041\043-\133\135-\176]/', $str, $matches); + break; + /* @noinspection PhpMissingBreakStatementInspection */ + case 'comment': + $matchcount = preg_match_all('/[()"]/', $str, $matches); + //fallthrough + case 'text': + default: + $matchcount += preg_match_all('/[\000-\010\013\014\016-\037\177-\377]/', $str, $matches); + break; + } + + if ($this->has8bitChars($str)) { + $charset = $this->CharSet; + } else { + $charset = static::CHARSET_ASCII; + } + + // Q/B encoding adds 8 chars and the charset ("` =??[QB]??=`"). + $overhead = 8 + strlen($charset); + + if ('mail' === $this->Mailer) { + $maxlen = static::MAIL_MAX_LINE_LENGTH - $overhead; + } else { + $maxlen = static::MAX_LINE_LENGTH - $overhead; + } + + // Select the encoding that produces the shortest output and/or prevents corruption. + if ($matchcount > strlen($str) / 3) { + // More than 1/3 of the content needs encoding, use B-encode. + $encoding = 'B'; + } elseif ($matchcount > 0) { + // Less than 1/3 of the content needs encoding, use Q-encode. + $encoding = 'Q'; + } elseif (strlen($str) > $maxlen) { + // No encoding needed, but value exceeds max line length, use Q-encode to prevent corruption. + $encoding = 'Q'; + } else { + // No reformatting needed + $encoding = false; + } + + switch ($encoding) { + case 'B': + if ($this->hasMultiBytes($str)) { + // Use a custom function which correctly encodes and wraps long + // multibyte strings without breaking lines within a character + $encoded = $this->base64EncodeWrapMB($str, "\n"); + } else { + $encoded = base64_encode($str); + $maxlen -= $maxlen % 4; + $encoded = trim(chunk_split($encoded, $maxlen, "\n")); + } + $encoded = preg_replace('/^(.*)$/m', ' =?' . $charset . "?$encoding?\\1?=", $encoded); + break; + case 'Q': + $encoded = $this->encodeQ($str, $position); + $encoded = $this->wrapText($encoded, $maxlen, true); + $encoded = str_replace('=' . static::$LE, "\n", trim($encoded)); + $encoded = preg_replace('/^(.*)$/m', ' =?' . $charset . "?$encoding?\\1?=", $encoded); + break; + default: + return $str; + } + + return trim(static::normalizeBreaks($encoded)); + } + + /** + * Check if a string contains multi-byte characters. + * + * @param string $str multi-byte text to wrap encode + * + * @return bool + */ + public function hasMultiBytes($str) + { + if (function_exists('mb_strlen')) { + return strlen($str) > mb_strlen($str, $this->CharSet); + } + + // Assume no multibytes (we can't handle without mbstring functions anyway) + return false; + } + + /** + * Does a string contain any 8-bit chars (in any charset)? + * + * @param string $text + * + * @return bool + */ + public function has8bitChars($text) + { + return (bool) preg_match('/[\x80-\xFF]/', $text); + } + + /** + * Encode and wrap long multibyte strings for mail headers + * without breaking lines within a character. + * Adapted from a function by paravoid. + * + * @see http://www.php.net/manual/en/function.mb-encode-mimeheader.php#60283 + * + * @param string $str multi-byte text to wrap encode + * @param string $linebreak string to use as linefeed/end-of-line + * + * @return string + */ + public function base64EncodeWrapMB($str, $linebreak = null) + { + $start = '=?' . $this->CharSet . '?B?'; + $end = '?='; + $encoded = ''; + if (null === $linebreak) { + $linebreak = static::$LE; + } + + $mb_length = mb_strlen($str, $this->CharSet); + // Each line must have length <= 75, including $start and $end + $length = 75 - strlen($start) - strlen($end); + // Average multi-byte ratio + $ratio = $mb_length / strlen($str); + // Base64 has a 4:3 ratio + $avgLength = floor($length * $ratio * .75); + + $offset = 0; + for ($i = 0; $i < $mb_length; $i += $offset) { + $lookBack = 0; + do { + $offset = $avgLength - $lookBack; + $chunk = mb_substr($str, $i, $offset, $this->CharSet); + $chunk = base64_encode($chunk); + ++$lookBack; + } while (strlen($chunk) > $length); + $encoded .= $chunk . $linebreak; + } + + // Chomp the last linefeed + return substr($encoded, 0, -strlen($linebreak)); + } + + /** + * Encode a string in quoted-printable format. + * According to RFC2045 section 6.7. + * + * @param string $string The text to encode + * + * @return string + */ + public function encodeQP($string) + { + return static::normalizeBreaks(quoted_printable_encode($string)); + } + + /** + * Encode a string using Q encoding. + * + * @see http://tools.ietf.org/html/rfc2047#section-4.2 + * + * @param string $str the text to encode + * @param string $position Where the text is going to be used, see the RFC for what that means + * + * @return string + */ + public function encodeQ($str, $position = 'text') + { + // There should not be any EOL in the string + $pattern = ''; + $encoded = str_replace(["\r", "\n"], '', $str); + switch (strtolower($position)) { + case 'phrase': + // RFC 2047 section 5.3 + $pattern = '^A-Za-z0-9!*+\/ -'; + break; + /* + * RFC 2047 section 5.2. + * Build $pattern without including delimiters and [] + */ + /* @noinspection PhpMissingBreakStatementInspection */ + case 'comment': + $pattern = '\(\)"'; + /* Intentional fall through */ + case 'text': + default: + // RFC 2047 section 5.1 + // Replace every high ascii, control, =, ? and _ characters + $pattern = '\000-\011\013\014\016-\037\075\077\137\177-\377' . $pattern; + break; + } + $matches = []; + if (preg_match_all("/[{$pattern}]/", $encoded, $matches)) { + // If the string contains an '=', make sure it's the first thing we replace + // so as to avoid double-encoding + $eqkey = array_search('=', $matches[0], true); + if (false !== $eqkey) { + unset($matches[0][$eqkey]); + array_unshift($matches[0], '='); + } + foreach (array_unique($matches[0]) as $char) { + $encoded = str_replace($char, '=' . sprintf('%02X', ord($char)), $encoded); + } + } + // Replace spaces with _ (more readable than =20) + // RFC 2047 section 4.2(2) + return str_replace(' ', '_', $encoded); + } + + /** + * Add a string or binary attachment (non-filesystem). + * This method can be used to attach ascii or binary data, + * such as a BLOB record from a database. + * + * @param string $string String attachment data + * @param string $filename Name of the attachment + * @param string $encoding File encoding (see $Encoding) + * @param string $type File extension (MIME) type + * @param string $disposition Disposition to use + * + * @throws Exception + * + * @return bool True on successfully adding an attachment + */ + public function addStringAttachment( + $string, + $filename, + $encoding = self::ENCODING_BASE64, + $type = '', + $disposition = 'attachment' + ) { + try { + // If a MIME type is not specified, try to work it out from the file name + if ('' === $type) { + $type = static::filenameToType($filename); + } + + if (!$this->validateEncoding($encoding)) { + throw new Exception($this->lang('encoding') . $encoding); + } + + // Append to $attachment array + $this->attachment[] = [ + 0 => $string, + 1 => $filename, + 2 => static::mb_pathinfo($filename, PATHINFO_BASENAME), + 3 => $encoding, + 4 => $type, + 5 => true, // isStringAttachment + 6 => $disposition, + 7 => 0, + ]; + } catch (Exception $exc) { + $this->setError($exc->getMessage()); + $this->edebug($exc->getMessage()); + if ($this->exceptions) { + throw $exc; + } + + return false; + } + + return true; + } + + /** + * Add an embedded (inline) attachment from a file. + * This can include images, sounds, and just about any other document type. + * These differ from 'regular' attachments in that they are intended to be + * displayed inline with the message, not just attached for download. + * This is used in HTML messages that embed the images + * the HTML refers to using the $cid value. + * Never use a user-supplied path to a file! + * + * @param string $path Path to the attachment + * @param string $cid Content ID of the attachment; Use this to reference + * the content when using an embedded image in HTML + * @param string $name Overrides the attachment name + * @param string $encoding File encoding (see $Encoding) + * @param string $type File MIME type + * @param string $disposition Disposition to use + * + * @throws Exception + * + * @return bool True on successfully adding an attachment + */ + public function addEmbeddedImage( + $path, + $cid, + $name = '', + $encoding = self::ENCODING_BASE64, + $type = '', + $disposition = 'inline' + ) { + try { + if (!static::fileIsAccessible($path)) { + throw new Exception($this->lang('file_access') . $path, self::STOP_CONTINUE); + } + + // If a MIME type is not specified, try to work it out from the file name + if ('' === $type) { + $type = static::filenameToType($path); + } + + if (!$this->validateEncoding($encoding)) { + throw new Exception($this->lang('encoding') . $encoding); + } + + $filename = (string) static::mb_pathinfo($path, PATHINFO_BASENAME); + if ('' === $name) { + $name = $filename; + } + + // Append to $attachment array + $this->attachment[] = [ + 0 => $path, + 1 => $filename, + 2 => $name, + 3 => $encoding, + 4 => $type, + 5 => false, // isStringAttachment + 6 => $disposition, + 7 => $cid, + ]; + } catch (Exception $exc) { + $this->setError($exc->getMessage()); + $this->edebug($exc->getMessage()); + if ($this->exceptions) { + throw $exc; + } + + return false; + } + + return true; + } + + /** + * Add an embedded stringified attachment. + * This can include images, sounds, and just about any other document type. + * If your filename doesn't contain an extension, be sure to set the $type to an appropriate MIME type. + * + * @param string $string The attachment binary data + * @param string $cid Content ID of the attachment; Use this to reference + * the content when using an embedded image in HTML + * @param string $name A filename for the attachment. If this contains an extension, + * PHPMailer will attempt to set a MIME type for the attachment. + * For example 'file.jpg' would get an 'image/jpeg' MIME type. + * @param string $encoding File encoding (see $Encoding), defaults to 'base64' + * @param string $type MIME type - will be used in preference to any automatically derived type + * @param string $disposition Disposition to use + * + * @throws Exception + * + * @return bool True on successfully adding an attachment + */ + public function addStringEmbeddedImage( + $string, + $cid, + $name = '', + $encoding = self::ENCODING_BASE64, + $type = '', + $disposition = 'inline' + ) { + try { + // If a MIME type is not specified, try to work it out from the name + if ('' === $type && !empty($name)) { + $type = static::filenameToType($name); + } + + if (!$this->validateEncoding($encoding)) { + throw new Exception($this->lang('encoding') . $encoding); + } + + // Append to $attachment array + $this->attachment[] = [ + 0 => $string, + 1 => $name, + 2 => $name, + 3 => $encoding, + 4 => $type, + 5 => true, // isStringAttachment + 6 => $disposition, + 7 => $cid, + ]; + } catch (Exception $exc) { + $this->setError($exc->getMessage()); + $this->edebug($exc->getMessage()); + if ($this->exceptions) { + throw $exc; + } + + return false; + } + + return true; + } + + /** + * Validate encodings. + * + * @param string $encoding + * + * @return bool + */ + protected function validateEncoding($encoding) + { + return in_array( + $encoding, + [ + self::ENCODING_7BIT, + self::ENCODING_QUOTED_PRINTABLE, + self::ENCODING_BASE64, + self::ENCODING_8BIT, + self::ENCODING_BINARY, + ], + true + ); + } + + /** + * Check if an embedded attachment is present with this cid. + * + * @param string $cid + * + * @return bool + */ + protected function cidExists($cid) + { + foreach ($this->attachment as $attachment) { + if ('inline' === $attachment[6] && $cid === $attachment[7]) { + return true; + } + } + + return false; + } + + /** + * Check if an inline attachment is present. + * + * @return bool + */ + public function inlineImageExists() + { + foreach ($this->attachment as $attachment) { + if ('inline' === $attachment[6]) { + return true; + } + } + + return false; + } + + /** + * Check if an attachment (non-inline) is present. + * + * @return bool + */ + public function attachmentExists() + { + foreach ($this->attachment as $attachment) { + if ('attachment' === $attachment[6]) { + return true; + } + } + + return false; + } + + /** + * Check if this message has an alternative body set. + * + * @return bool + */ + public function alternativeExists() + { + return !empty($this->AltBody); + } + + /** + * Clear queued addresses of given kind. + * + * @param string $kind 'to', 'cc', or 'bcc' + */ + public function clearQueuedAddresses($kind) + { + $this->RecipientsQueue = array_filter( + $this->RecipientsQueue, + static function ($params) use ($kind) { + return $params[0] !== $kind; + } + ); + } + + /** + * Clear all To recipients. + */ + public function clearAddresses() + { + foreach ($this->to as $to) { + unset($this->all_recipients[strtolower($to[0])]); + } + $this->to = []; + $this->clearQueuedAddresses('to'); + } + + /** + * Clear all CC recipients. + */ + public function clearCCs() + { + foreach ($this->cc as $cc) { + unset($this->all_recipients[strtolower($cc[0])]); + } + $this->cc = []; + $this->clearQueuedAddresses('cc'); + } + + /** + * Clear all BCC recipients. + */ + public function clearBCCs() + { + foreach ($this->bcc as $bcc) { + unset($this->all_recipients[strtolower($bcc[0])]); + } + $this->bcc = []; + $this->clearQueuedAddresses('bcc'); + } + + /** + * Clear all ReplyTo recipients. + */ + public function clearReplyTos() + { + $this->ReplyTo = []; + $this->ReplyToQueue = []; + } + + /** + * Clear all recipient types. + */ + public function clearAllRecipients() + { + $this->to = []; + $this->cc = []; + $this->bcc = []; + $this->all_recipients = []; + $this->RecipientsQueue = []; + } + + /** + * Clear all filesystem, string, and binary attachments. + */ + public function clearAttachments() + { + $this->attachment = []; + } + + /** + * Clear all custom headers. + */ + public function clearCustomHeaders() + { + $this->CustomHeader = []; + } + + /** + * Add an error message to the error container. + * + * @param string $msg + */ + protected function setError($msg) + { + ++$this->error_count; + if ('smtp' === $this->Mailer && null !== $this->smtp) { + $lasterror = $this->smtp->getError(); + if (!empty($lasterror['error'])) { + $msg .= $this->lang('smtp_error') . $lasterror['error']; + if (!empty($lasterror['detail'])) { + $msg .= ' Detail: ' . $lasterror['detail']; + } + if (!empty($lasterror['smtp_code'])) { + $msg .= ' SMTP code: ' . $lasterror['smtp_code']; + } + if (!empty($lasterror['smtp_code_ex'])) { + $msg .= ' Additional SMTP info: ' . $lasterror['smtp_code_ex']; + } + } + } + $this->ErrorInfo = $msg; + } + + /** + * Return an RFC 822 formatted date. + * + * @return string + */ + public static function rfcDate() + { + // Set the time zone to whatever the default is to avoid 500 errors + // Will default to UTC if it's not set properly in php.ini + date_default_timezone_set(@date_default_timezone_get()); + + return date('D, j M Y H:i:s O'); + } + + /** + * Get the server hostname. + * Returns 'localhost.localdomain' if unknown. + * + * @return string + */ + protected function serverHostname() + { + $result = ''; + if (!empty($this->Hostname)) { + $result = $this->Hostname; + } elseif (isset($_SERVER) && array_key_exists('SERVER_NAME', $_SERVER)) { + $result = $_SERVER['SERVER_NAME']; + } elseif (function_exists('gethostname') && gethostname() !== false) { + $result = gethostname(); + } elseif (php_uname('n') !== false) { + $result = php_uname('n'); + } + if (!static::isValidHost($result)) { + return 'localhost.localdomain'; + } + + return $result; + } + + /** + * Validate whether a string contains a valid value to use as a hostname or IP address. + * IPv6 addresses must include [], e.g. `[::1]`, not just `::1`. + * + * @param string $host The host name or IP address to check + * + * @return bool + */ + public static function isValidHost($host) + { + //Simple syntax limits + if (empty($host) + || !is_string($host) + || strlen($host) > 256 + || !preg_match('/^([a-zA-Z\d.-]*|\[[a-fA-F\d:]+])$/', $host) + ) { + return false; + } + //Looks like a bracketed IPv6 address + if (strlen($host) > 2 && substr($host, 0, 1) === '[' && substr($host, -1, 1) === ']') { + return filter_var(substr($host, 1, -1), FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) !== false; + } + //If removing all the dots results in a numeric string, it must be an IPv4 address. + //Need to check this first because otherwise things like `999.0.0.0` are considered valid host names + if (is_numeric(str_replace('.', '', $host))) { + //Is it a valid IPv4 address? + return filter_var($host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) !== false; + } + if (filter_var('http://' . $host, FILTER_VALIDATE_URL) !== false) { + //Is it a syntactically valid hostname? + return true; + } + + return false; + } + + /** + * Get an error message in the current language. + * + * @param string $key + * + * @return string + */ + protected function lang($key) + { + if (count($this->language) < 1) { + $this->setLanguage(); // set the default language + } + + if (array_key_exists($key, $this->language)) { + if ('smtp_connect_failed' === $key) { + //Include a link to troubleshooting docs on SMTP connection failure + //this is by far the biggest cause of support questions + //but it's usually not PHPMailer's fault. + return $this->language[$key] . ' https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting'; + } + + return $this->language[$key]; + } + + //Return the key as a fallback + return $key; + } + + /** + * Check if an error occurred. + * + * @return bool True if an error did occur + */ + public function isError() + { + return $this->error_count > 0; + } + + /** + * Add a custom header. + * $name value can be overloaded to contain + * both header name and value (name:value). + * + * @param string $name Custom header name + * @param string|null $value Header value + * + * @throws Exception + */ + public function addCustomHeader($name, $value = null) + { + if (null === $value && strpos($name, ':') !== false) { + // Value passed in as name:value + list($name, $value) = explode(':', $name, 2); + } + $name = trim($name); + $value = trim($value); + //Ensure name is not empty, and that neither name nor value contain line breaks + if (empty($name) || strpbrk($name . $value, "\r\n") !== false) { + if ($this->exceptions) { + throw new Exception('Invalid header name or value'); + } + + return false; + } + $this->CustomHeader[] = [$name, $value]; + + return true; + } + + /** + * Returns all custom headers. + * + * @return array + */ + public function getCustomHeaders() + { + return $this->CustomHeader; + } + + /** + * Create a message body from an HTML string. + * Automatically inlines images and creates a plain-text version by converting the HTML, + * overwriting any existing values in Body and AltBody. + * Do not source $message content from user input! + * $basedir is prepended when handling relative URLs, e.g. and must not be empty + * will look for an image file in $basedir/images/a.png and convert it to inline. + * If you don't provide a $basedir, relative paths will be left untouched (and thus probably break in email) + * Converts data-uri images into embedded attachments. + * If you don't want to apply these transformations to your HTML, just set Body and AltBody directly. + * + * @param string $message HTML message string + * @param string $basedir Absolute path to a base directory to prepend to relative paths to images + * @param bool|callable $advanced Whether to use the internal HTML to text converter + * or your own custom converter + * @return string The transformed message body + * + * @throws Exception + * + * @see PHPMailer::html2text() + */ + public function msgHTML($message, $basedir = '', $advanced = false) + { + preg_match_all('/(? 1 && '/' !== substr($basedir, -1)) { + // Ensure $basedir has a trailing / + $basedir .= '/'; + } + foreach ($images[2] as $imgindex => $url) { + // Convert data URIs into embedded images + //e.g. "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" + $match = []; + if (preg_match('#^data:(image/(?:jpe?g|gif|png));?(base64)?,(.+)#', $url, $match)) { + if (count($match) === 4 && static::ENCODING_BASE64 === $match[2]) { + $data = base64_decode($match[3]); + } elseif ('' === $match[2]) { + $data = rawurldecode($match[3]); + } else { + //Not recognised so leave it alone + continue; + } + //Hash the decoded data, not the URL, so that the same data-URI image used in multiple places + //will only be embedded once, even if it used a different encoding + $cid = substr(hash('sha256', $data), 0, 32) . '@phpmailer.0'; // RFC2392 S 2 + + if (!$this->cidExists($cid)) { + $this->addStringEmbeddedImage( + $data, + $cid, + 'embed' . $imgindex, + static::ENCODING_BASE64, + $match[1] + ); + } + $message = str_replace( + $images[0][$imgindex], + $images[1][$imgindex] . '="cid:' . $cid . '"', + $message + ); + continue; + } + if (// Only process relative URLs if a basedir is provided (i.e. no absolute local paths) + !empty($basedir) + // Ignore URLs containing parent dir traversal (..) + && (strpos($url, '..') === false) + // Do not change urls that are already inline images + && 0 !== strpos($url, 'cid:') + // Do not change absolute URLs, including anonymous protocol + && !preg_match('#^[a-z][a-z0-9+.-]*:?//#i', $url) + ) { + $filename = static::mb_pathinfo($url, PATHINFO_BASENAME); + $directory = dirname($url); + if ('.' === $directory) { + $directory = ''; + } + // RFC2392 S 2 + $cid = substr(hash('sha256', $url), 0, 32) . '@phpmailer.0'; + if (strlen($basedir) > 1 && '/' !== substr($basedir, -1)) { + $basedir .= '/'; + } + if (strlen($directory) > 1 && '/' !== substr($directory, -1)) { + $directory .= '/'; + } + if ($this->addEmbeddedImage( + $basedir . $directory . $filename, + $cid, + $filename, + static::ENCODING_BASE64, + static::_mime_types((string) static::mb_pathinfo($filename, PATHINFO_EXTENSION)) + ) + ) { + $message = preg_replace( + '/' . $images[1][$imgindex] . '=["\']' . preg_quote($url, '/') . '["\']/Ui', + $images[1][$imgindex] . '="cid:' . $cid . '"', + $message + ); + } + } + } + } + $this->isHTML(); + // Convert all message body line breaks to LE, makes quoted-printable encoding work much better + $this->Body = static::normalizeBreaks($message); + $this->AltBody = static::normalizeBreaks($this->html2text($message, $advanced)); + if (!$this->alternativeExists()) { + $this->AltBody = 'This is an HTML-only message. To view it, activate HTML in your email application.' + . static::$LE; + } + + return $this->Body; + } + + /** + * Convert an HTML string into plain text. + * This is used by msgHTML(). + * Note - older versions of this function used a bundled advanced converter + * which was removed for license reasons in #232. + * Example usage: + * + * ```php + * // Use default conversion + * $plain = $mail->html2text($html); + * // Use your own custom converter + * $plain = $mail->html2text($html, function($html) { + * $converter = new MyHtml2text($html); + * return $converter->get_text(); + * }); + * ``` + * + * @param string $html The HTML text to convert + * @param bool|callable $advanced Any boolean value to use the internal converter, + * or provide your own callable for custom conversion + * + * @return string + */ + public function html2text($html, $advanced = false) + { + if (is_callable($advanced)) { + return call_user_func($advanced, $html); + } + + return html_entity_decode( + trim(strip_tags(preg_replace('/<(head|title|style|script)[^>]*>.*?<\/\\1>/si', '', $html))), + ENT_QUOTES, + $this->CharSet + ); + } + + /** + * Get the MIME type for a file extension. + * + * @param string $ext File extension + * + * @return string MIME type of file + */ + public static function _mime_types($ext = '') + { + $mimes = [ + 'xl' => 'application/excel', + 'js' => 'application/javascript', + 'hqx' => 'application/mac-binhex40', + 'cpt' => 'application/mac-compactpro', + 'bin' => 'application/macbinary', + 'doc' => 'application/msword', + 'word' => 'application/msword', + 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', + 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template', + 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', + 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', + 'sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide', + 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', + 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', + 'xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12', + 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12', + 'class' => 'application/octet-stream', + 'dll' => 'application/octet-stream', + 'dms' => 'application/octet-stream', + 'exe' => 'application/octet-stream', + 'lha' => 'application/octet-stream', + 'lzh' => 'application/octet-stream', + 'psd' => 'application/octet-stream', + 'sea' => 'application/octet-stream', + 'so' => 'application/octet-stream', + 'oda' => 'application/oda', + 'pdf' => 'application/pdf', + 'ai' => 'application/postscript', + 'eps' => 'application/postscript', + 'ps' => 'application/postscript', + 'smi' => 'application/smil', + 'smil' => 'application/smil', + 'mif' => 'application/vnd.mif', + 'xls' => 'application/vnd.ms-excel', + 'ppt' => 'application/vnd.ms-powerpoint', + 'wbxml' => 'application/vnd.wap.wbxml', + 'wmlc' => 'application/vnd.wap.wmlc', + 'dcr' => 'application/x-director', + 'dir' => 'application/x-director', + 'dxr' => 'application/x-director', + 'dvi' => 'application/x-dvi', + 'gtar' => 'application/x-gtar', + 'php3' => 'application/x-httpd-php', + 'php4' => 'application/x-httpd-php', + 'php' => 'application/x-httpd-php', + 'phtml' => 'application/x-httpd-php', + 'phps' => 'application/x-httpd-php-source', + 'swf' => 'application/x-shockwave-flash', + 'sit' => 'application/x-stuffit', + 'tar' => 'application/x-tar', + 'tgz' => 'application/x-tar', + 'xht' => 'application/xhtml+xml', + 'xhtml' => 'application/xhtml+xml', + 'zip' => 'application/zip', + 'mid' => 'audio/midi', + 'midi' => 'audio/midi', + 'mp2' => 'audio/mpeg', + 'mp3' => 'audio/mpeg', + 'm4a' => 'audio/mp4', + 'mpga' => 'audio/mpeg', + 'aif' => 'audio/x-aiff', + 'aifc' => 'audio/x-aiff', + 'aiff' => 'audio/x-aiff', + 'ram' => 'audio/x-pn-realaudio', + 'rm' => 'audio/x-pn-realaudio', + 'rpm' => 'audio/x-pn-realaudio-plugin', + 'ra' => 'audio/x-realaudio', + 'wav' => 'audio/x-wav', + 'mka' => 'audio/x-matroska', + 'bmp' => 'image/bmp', + 'gif' => 'image/gif', + 'jpeg' => 'image/jpeg', + 'jpe' => 'image/jpeg', + 'jpg' => 'image/jpeg', + 'png' => 'image/png', + 'tiff' => 'image/tiff', + 'tif' => 'image/tiff', + 'webp' => 'image/webp', + 'avif' => 'image/avif', + 'heif' => 'image/heif', + 'heifs' => 'image/heif-sequence', + 'heic' => 'image/heic', + 'heics' => 'image/heic-sequence', + 'eml' => 'message/rfc822', + 'css' => 'text/css', + 'html' => 'text/html', + 'htm' => 'text/html', + 'shtml' => 'text/html', + 'log' => 'text/plain', + 'text' => 'text/plain', + 'txt' => 'text/plain', + 'rtx' => 'text/richtext', + 'rtf' => 'text/rtf', + 'vcf' => 'text/vcard', + 'vcard' => 'text/vcard', + 'ics' => 'text/calendar', + 'xml' => 'text/xml', + 'xsl' => 'text/xml', + 'wmv' => 'video/x-ms-wmv', + 'mpeg' => 'video/mpeg', + 'mpe' => 'video/mpeg', + 'mpg' => 'video/mpeg', + 'mp4' => 'video/mp4', + 'm4v' => 'video/mp4', + 'mov' => 'video/quicktime', + 'qt' => 'video/quicktime', + 'rv' => 'video/vnd.rn-realvideo', + 'avi' => 'video/x-msvideo', + 'movie' => 'video/x-sgi-movie', + 'webm' => 'video/webm', + 'mkv' => 'video/x-matroska', + ]; + $ext = strtolower($ext); + if (array_key_exists($ext, $mimes)) { + return $mimes[$ext]; + } + + return 'application/octet-stream'; + } + + /** + * Map a file name to a MIME type. + * Defaults to 'application/octet-stream', i.e.. arbitrary binary data. + * + * @param string $filename A file name or full path, does not need to exist as a file + * + * @return string + */ + public static function filenameToType($filename) + { + // In case the path is a URL, strip any query string before getting extension + $qpos = strpos($filename, '?'); + if (false !== $qpos) { + $filename = substr($filename, 0, $qpos); + } + $ext = static::mb_pathinfo($filename, PATHINFO_EXTENSION); + + return static::_mime_types($ext); + } + + /** + * Multi-byte-safe pathinfo replacement. + * Drop-in replacement for pathinfo(), but multibyte- and cross-platform-safe. + * + * @see http://www.php.net/manual/en/function.pathinfo.php#107461 + * + * @param string $path A filename or path, does not need to exist as a file + * @param int|string $options Either a PATHINFO_* constant, + * or a string name to return only the specified piece + * + * @return string|array + */ + public static function mb_pathinfo($path, $options = null) + { + $ret = ['dirname' => '', 'basename' => '', 'extension' => '', 'filename' => '']; + $pathinfo = []; + if (preg_match('#^(.*?)[\\\\/]*(([^/\\\\]*?)(\.([^.\\\\/]+?)|))[\\\\/.]*$#m', $path, $pathinfo)) { + if (array_key_exists(1, $pathinfo)) { + $ret['dirname'] = $pathinfo[1]; + } + if (array_key_exists(2, $pathinfo)) { + $ret['basename'] = $pathinfo[2]; + } + if (array_key_exists(5, $pathinfo)) { + $ret['extension'] = $pathinfo[5]; + } + if (array_key_exists(3, $pathinfo)) { + $ret['filename'] = $pathinfo[3]; + } + } + switch ($options) { + case PATHINFO_DIRNAME: + case 'dirname': + return $ret['dirname']; + case PATHINFO_BASENAME: + case 'basename': + return $ret['basename']; + case PATHINFO_EXTENSION: + case 'extension': + return $ret['extension']; + case PATHINFO_FILENAME: + case 'filename': + return $ret['filename']; + default: + return $ret; + } + } + + /** + * Set or reset instance properties. + * You should avoid this function - it's more verbose, less efficient, more error-prone and + * harder to debug than setting properties directly. + * Usage Example: + * `$mail->set('SMTPSecure', static::ENCRYPTION_STARTTLS);` + * is the same as: + * `$mail->SMTPSecure = static::ENCRYPTION_STARTTLS;`. + * + * @param string $name The property name to set + * @param mixed $value The value to set the property to + * + * @return bool + */ + public function set($name, $value = '') + { + if (property_exists($this, $name)) { + $this->$name = $value; + + return true; + } + $this->setError($this->lang('variable_set') . $name); + + return false; + } + + /** + * Strip newlines to prevent header injection. + * + * @param string $str + * + * @return string + */ + public function secureHeader($str) + { + return trim(str_replace(["\r", "\n"], '', $str)); + } + + /** + * Normalize line breaks in a string. + * Converts UNIX LF, Mac CR and Windows CRLF line breaks into a single line break format. + * Defaults to CRLF (for message bodies) and preserves consecutive breaks. + * + * @param string $text + * @param string $breaktype What kind of line break to use; defaults to static::$LE + * + * @return string + */ + public static function normalizeBreaks($text, $breaktype = null) + { + if (null === $breaktype) { + $breaktype = static::$LE; + } + // Normalise to \n + $text = str_replace([self::CRLF, "\r"], "\n", $text); + // Now convert LE as needed + if ("\n" !== $breaktype) { + $text = str_replace("\n", $breaktype, $text); + } + + return $text; + } + + /** + * Remove trailing breaks from a string. + * + * @param string $text + * + * @return string The text to remove breaks from + */ + public static function stripTrailingWSP($text) + { + return rtrim($text, " \r\n\t"); + } + + /** + * Return the current line break format string. + * + * @return string + */ + public static function getLE() + { + return static::$LE; + } + + /** + * Set the line break format string, e.g. "\r\n". + * + * @param string $le + */ + protected static function setLE($le) + { + static::$LE = $le; + } + + /** + * Set the public and private key files and password for S/MIME signing. + * + * @param string $cert_filename + * @param string $key_filename + * @param string $key_pass Password for private key + * @param string $extracerts_filename Optional path to chain certificate + */ + public function sign($cert_filename, $key_filename, $key_pass, $extracerts_filename = '') + { + $this->sign_cert_file = $cert_filename; + $this->sign_key_file = $key_filename; + $this->sign_key_pass = $key_pass; + $this->sign_extracerts_file = $extracerts_filename; + } + + /** + * Quoted-Printable-encode a DKIM header. + * + * @param string $txt + * + * @return string + */ + public function DKIM_QP($txt) + { + $line = ''; + $len = strlen($txt); + for ($i = 0; $i < $len; ++$i) { + $ord = ord($txt[$i]); + if (((0x21 <= $ord) && ($ord <= 0x3A)) || $ord === 0x3C || ((0x3E <= $ord) && ($ord <= 0x7E))) { + $line .= $txt[$i]; + } else { + $line .= '=' . sprintf('%02X', $ord); + } + } + + return $line; + } + + /** + * Generate a DKIM signature. + * + * @param string $signHeader + * + * @throws Exception + * + * @return string The DKIM signature value + */ + public function DKIM_Sign($signHeader) + { + if (!defined('PKCS7_TEXT')) { + if ($this->exceptions) { + throw new Exception($this->lang('extension_missing') . 'openssl'); + } + + return ''; + } + $privKeyStr = !empty($this->DKIM_private_string) ? + $this->DKIM_private_string : + file_get_contents($this->DKIM_private); + if ('' !== $this->DKIM_passphrase) { + $privKey = openssl_pkey_get_private($privKeyStr, $this->DKIM_passphrase); + } else { + $privKey = openssl_pkey_get_private($privKeyStr); + } + if (openssl_sign($signHeader, $signature, $privKey, 'sha256WithRSAEncryption')) { + openssl_pkey_free($privKey); + + return base64_encode($signature); + } + openssl_pkey_free($privKey); + + return ''; + } + + /** + * Generate a DKIM canonicalization header. + * Uses the 'relaxed' algorithm from RFC6376 section 3.4.2. + * Canonicalized headers should *always* use CRLF, regardless of mailer setting. + * + * @see https://tools.ietf.org/html/rfc6376#section-3.4.2 + * + * @param string $signHeader Header + * + * @return string + */ + public function DKIM_HeaderC($signHeader) + { + //Normalize breaks to CRLF (regardless of the mailer) + $signHeader = static::normalizeBreaks($signHeader, self::CRLF); + //Unfold header lines + //Note PCRE \s is too broad a definition of whitespace; RFC5322 defines it as `[ \t]` + //@see https://tools.ietf.org/html/rfc5322#section-2.2 + //That means this may break if you do something daft like put vertical tabs in your headers. + $signHeader = preg_replace('/\r\n[ \t]+/', ' ', $signHeader); + //Break headers out into an array + $lines = explode(self::CRLF, $signHeader); + foreach ($lines as $key => $line) { + //If the header is missing a :, skip it as it's invalid + //This is likely to happen because the explode() above will also split + //on the trailing LE, leaving an empty line + if (strpos($line, ':') === false) { + continue; + } + list($heading, $value) = explode(':', $line, 2); + //Lower-case header name + $heading = strtolower($heading); + //Collapse white space within the value, also convert WSP to space + $value = preg_replace('/[ \t]+/', ' ', $value); + //RFC6376 is slightly unclear here - it says to delete space at the *end* of each value + //But then says to delete space before and after the colon. + //Net result is the same as trimming both ends of the value. + //By elimination, the same applies to the field name + $lines[$key] = trim($heading, " \t") . ':' . trim($value, " \t"); + } + + return implode(self::CRLF, $lines); + } + + /** + * Generate a DKIM canonicalization body. + * Uses the 'simple' algorithm from RFC6376 section 3.4.3. + * Canonicalized bodies should *always* use CRLF, regardless of mailer setting. + * + * @see https://tools.ietf.org/html/rfc6376#section-3.4.3 + * + * @param string $body Message Body + * + * @return string + */ + public function DKIM_BodyC($body) + { + if (empty($body)) { + return self::CRLF; + } + // Normalize line endings to CRLF + $body = static::normalizeBreaks($body, self::CRLF); + + //Reduce multiple trailing line breaks to a single one + return static::stripTrailingWSP($body) . self::CRLF; + } + + /** + * Create the DKIM header and body in a new message header. + * + * @param string $headers_line Header lines + * @param string $subject Subject + * @param string $body Body + * + * @throws Exception + * + * @return string + */ + public function DKIM_Add($headers_line, $subject, $body) + { + $DKIMsignatureType = 'rsa-sha256'; // Signature & hash algorithms + $DKIMcanonicalization = 'relaxed/simple'; // Canonicalization methods of header & body + $DKIMquery = 'dns/txt'; // Query method + $DKIMtime = time(); + //Always sign these headers without being asked + //Recommended list from https://tools.ietf.org/html/rfc6376#section-5.4.1 + $autoSignHeaders = [ + 'from', + 'to', + 'cc', + 'date', + 'subject', + 'reply-to', + 'message-id', + 'content-type', + 'mime-version', + 'x-mailer', + ]; + if (stripos($headers_line, 'Subject') === false) { + $headers_line .= 'Subject: ' . $subject . static::$LE; + } + $headerLines = explode(static::$LE, $headers_line); + $currentHeaderLabel = ''; + $currentHeaderValue = ''; + $parsedHeaders = []; + $headerLineIndex = 0; + $headerLineCount = count($headerLines); + foreach ($headerLines as $headerLine) { + $matches = []; + if (preg_match('/^([^ \t]*?)(?::[ \t]*)(.*)$/', $headerLine, $matches)) { + if ($currentHeaderLabel !== '') { + //We were previously in another header; This is the start of a new header, so save the previous one + $parsedHeaders[] = ['label' => $currentHeaderLabel, 'value' => $currentHeaderValue]; + } + $currentHeaderLabel = $matches[1]; + $currentHeaderValue = $matches[2]; + } elseif (preg_match('/^[ \t]+(.*)$/', $headerLine, $matches)) { + //This is a folded continuation of the current header, so unfold it + $currentHeaderValue .= ' ' . $matches[1]; + } + ++$headerLineIndex; + if ($headerLineIndex >= $headerLineCount) { + //This was the last line, so finish off this header + $parsedHeaders[] = ['label' => $currentHeaderLabel, 'value' => $currentHeaderValue]; + } + } + $copiedHeaders = []; + $headersToSignKeys = []; + $headersToSign = []; + foreach ($parsedHeaders as $header) { + //Is this header one that must be included in the DKIM signature? + if (in_array(strtolower($header['label']), $autoSignHeaders, true)) { + $headersToSignKeys[] = $header['label']; + $headersToSign[] = $header['label'] . ': ' . $header['value']; + if ($this->DKIM_copyHeaderFields) { + $copiedHeaders[] = $header['label'] . ':' . //Note no space after this, as per RFC + str_replace('|', '=7C', $this->DKIM_QP($header['value'])); + } + continue; + } + //Is this an extra custom header we've been asked to sign? + if (in_array($header['label'], $this->DKIM_extraHeaders, true)) { + //Find its value in custom headers + foreach ($this->CustomHeader as $customHeader) { + if ($customHeader[0] === $header['label']) { + $headersToSignKeys[] = $header['label']; + $headersToSign[] = $header['label'] . ': ' . $header['value']; + if ($this->DKIM_copyHeaderFields) { + $copiedHeaders[] = $header['label'] . ':' . //Note no space after this, as per RFC + str_replace('|', '=7C', $this->DKIM_QP($header['value'])); + } + //Skip straight to the next header + continue 2; + } + } + } + } + $copiedHeaderFields = ''; + if ($this->DKIM_copyHeaderFields && count($copiedHeaders) > 0) { + //Assemble a DKIM 'z' tag + $copiedHeaderFields = ' z='; + $first = true; + foreach ($copiedHeaders as $copiedHeader) { + if (!$first) { + $copiedHeaderFields .= static::$LE . ' |'; + } + //Fold long values + if (strlen($copiedHeader) > self::STD_LINE_LENGTH - 3) { + $copiedHeaderFields .= substr( + chunk_split($copiedHeader, self::STD_LINE_LENGTH - 3, static::$LE . self::FWS), + 0, + -strlen(static::$LE . self::FWS) + ); + } else { + $copiedHeaderFields .= $copiedHeader; + } + $first = false; + } + $copiedHeaderFields .= ';' . static::$LE; + } + $headerKeys = ' h=' . implode(':', $headersToSignKeys) . ';' . static::$LE; + $headerValues = implode(static::$LE, $headersToSign); + $body = $this->DKIM_BodyC($body); + $DKIMb64 = base64_encode(pack('H*', hash('sha256', $body))); // Base64 of packed binary SHA-256 hash of body + $ident = ''; + if ('' !== $this->DKIM_identity) { + $ident = ' i=' . $this->DKIM_identity . ';' . static::$LE; + } + //The DKIM-Signature header is included in the signature *except for* the value of the `b` tag + //which is appended after calculating the signature + //https://tools.ietf.org/html/rfc6376#section-3.5 + $dkimSignatureHeader = 'DKIM-Signature: v=1;' . + ' d=' . $this->DKIM_domain . ';' . + ' s=' . $this->DKIM_selector . ';' . static::$LE . + ' a=' . $DKIMsignatureType . ';' . + ' q=' . $DKIMquery . ';' . + ' t=' . $DKIMtime . ';' . + ' c=' . $DKIMcanonicalization . ';' . static::$LE . + $headerKeys . + $ident . + $copiedHeaderFields . + ' bh=' . $DKIMb64 . ';' . static::$LE . + ' b='; + //Canonicalize the set of headers + $canonicalizedHeaders = $this->DKIM_HeaderC( + $headerValues . static::$LE . $dkimSignatureHeader + ); + $signature = $this->DKIM_Sign($canonicalizedHeaders); + $signature = trim(chunk_split($signature, self::STD_LINE_LENGTH - 3, static::$LE . self::FWS)); + + return static::normalizeBreaks($dkimSignatureHeader . $signature); + } + + /** + * Detect if a string contains a line longer than the maximum line length + * allowed by RFC 2822 section 2.1.1. + * + * @param string $str + * + * @return bool + */ + public static function hasLineLongerThanMax($str) + { + return (bool) preg_match('/^(.{' . (self::MAX_LINE_LENGTH + strlen(static::$LE)) . ',})/m', $str); + } + + /** + * If a string contains any "special" characters, double-quote the name, + * and escape any double quotes with a backslash. + * + * @param string $str + * + * @return string + * + * @see RFC822 3.4.1 + */ + public static function quotedString($str) + { + if (preg_match('/[ ()<>@,;:"\/\[\]?=]/', $str)) { + //If the string contains any of these chars, it must be double-quoted + //and any double quotes must be escaped with a backslash + return '"' . str_replace('"', '\\"', $str) . '"'; + } + + //Return the string untouched, it doesn't need quoting + return $str; + } + + /** + * Allows for public read access to 'to' property. + * Before the send() call, queued addresses (i.e. with IDN) are not yet included. + * + * @return array + */ + public function getToAddresses() + { + return $this->to; + } + + /** + * Allows for public read access to 'cc' property. + * Before the send() call, queued addresses (i.e. with IDN) are not yet included. + * + * @return array + */ + public function getCcAddresses() + { + return $this->cc; + } + + /** + * Allows for public read access to 'bcc' property. + * Before the send() call, queued addresses (i.e. with IDN) are not yet included. + * + * @return array + */ + public function getBccAddresses() + { + return $this->bcc; + } + + /** + * Allows for public read access to 'ReplyTo' property. + * Before the send() call, queued addresses (i.e. with IDN) are not yet included. + * + * @return array + */ + public function getReplyToAddresses() + { + return $this->ReplyTo; + } + + /** + * Allows for public read access to 'all_recipients' property. + * Before the send() call, queued addresses (i.e. with IDN) are not yet included. + * + * @return array + */ + public function getAllRecipientAddresses() + { + return $this->all_recipients; + } + + /** + * Perform a callback. + * + * @param bool $isSent + * @param array $to + * @param array $cc + * @param array $bcc + * @param string $subject + * @param string $body + * @param string $from + * @param array $extra + */ + protected function doCallback($isSent, $to, $cc, $bcc, $subject, $body, $from, $extra) + { + if (!empty($this->action_function) && is_callable($this->action_function)) { + call_user_func($this->action_function, $isSent, $to, $cc, $bcc, $subject, $body, $from, $extra); + } + } + + /** + * Get the OAuth instance. + * + * @return OAuth + */ + public function getOAuth() + { + return $this->oauth; + } + + /** + * Set an OAuth instance. + */ + public function setOAuth(OAuth $oauth) + { + $this->oauth = $oauth; + } +} diff --git a/admin/lib/vendor/phpmailer/phpmailer/src/POP3.php b/admin/lib/vendor/phpmailer/phpmailer/src/POP3.php new file mode 100644 index 0000000..a6a4128 --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/src/POP3.php @@ -0,0 +1,421 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2020 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + */ + +namespace PHPMailer\PHPMailer; + +/** + * PHPMailer POP-Before-SMTP Authentication Class. + * Specifically for PHPMailer to use for RFC1939 POP-before-SMTP authentication. + * 1) This class does not support APOP authentication. + * 2) Opening and closing lots of POP3 connections can be quite slow. If you need + * to send a batch of emails then just perform the authentication once at the start, + * and then loop through your mail sending script. Providing this process doesn't + * take longer than the verification period lasts on your POP3 server, you should be fine. + * 3) This is really ancient technology; you should only need to use it to talk to very old systems. + * 4) This POP3 class is deliberately lightweight and incomplete, implementing just + * enough to do authentication. + * If you want a more complete class there are other POP3 classes for PHP available. + * + * @author Richard Davey (original author) + * @author Marcus Bointon (Synchro/coolbru) + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + */ +class POP3 +{ + /** + * The POP3 PHPMailer Version number. + * + * @var string + */ + const VERSION = '6.1.8'; + + /** + * Default POP3 port number. + * + * @var int + */ + const DEFAULT_PORT = 110; + + /** + * Default timeout in seconds. + * + * @var int + */ + const DEFAULT_TIMEOUT = 30; + + /** + * Debug display level. + * Options: 0 = no, 1+ = yes. + * + * @var int + */ + public $do_debug = 0; + + /** + * POP3 mail server hostname. + * + * @var string + */ + public $host; + + /** + * POP3 port number. + * + * @var int + */ + public $port; + + /** + * POP3 Timeout Value in seconds. + * + * @var int + */ + public $tval; + + /** + * POP3 username. + * + * @var string + */ + public $username; + + /** + * POP3 password. + * + * @var string + */ + public $password; + + /** + * Resource handle for the POP3 connection socket. + * + * @var resource + */ + protected $pop_conn; + + /** + * Are we connected? + * + * @var bool + */ + protected $connected = false; + + /** + * Error container. + * + * @var array + */ + protected $errors = []; + + /** + * Line break constant. + */ + const LE = "\r\n"; + + /** + * Simple static wrapper for all-in-one POP before SMTP. + * + * @param string $host The hostname to connect to + * @param int|bool $port The port number to connect to + * @param int|bool $timeout The timeout value + * @param string $username + * @param string $password + * @param int $debug_level + * + * @return bool + */ + public static function popBeforeSmtp( + $host, + $port = false, + $timeout = false, + $username = '', + $password = '', + $debug_level = 0 + ) { + $pop = new self(); + + return $pop->authorise($host, $port, $timeout, $username, $password, $debug_level); + } + + /** + * Authenticate with a POP3 server. + * A connect, login, disconnect sequence + * appropriate for POP-before SMTP authorisation. + * + * @param string $host The hostname to connect to + * @param int|bool $port The port number to connect to + * @param int|bool $timeout The timeout value + * @param string $username + * @param string $password + * @param int $debug_level + * + * @return bool + */ + public function authorise($host, $port = false, $timeout = false, $username = '', $password = '', $debug_level = 0) + { + $this->host = $host; + // If no port value provided, use default + if (false === $port) { + $this->port = static::DEFAULT_PORT; + } else { + $this->port = (int) $port; + } + // If no timeout value provided, use default + if (false === $timeout) { + $this->tval = static::DEFAULT_TIMEOUT; + } else { + $this->tval = (int) $timeout; + } + $this->do_debug = $debug_level; + $this->username = $username; + $this->password = $password; + // Reset the error log + $this->errors = []; + // connect + $result = $this->connect($this->host, $this->port, $this->tval); + if ($result) { + $login_result = $this->login($this->username, $this->password); + if ($login_result) { + $this->disconnect(); + + return true; + } + } + // We need to disconnect regardless of whether the login succeeded + $this->disconnect(); + + return false; + } + + /** + * Connect to a POP3 server. + * + * @param string $host + * @param int|bool $port + * @param int $tval + * + * @return bool + */ + public function connect($host, $port = false, $tval = 30) + { + // Are we already connected? + if ($this->connected) { + return true; + } + + //On Windows this will raise a PHP Warning error if the hostname doesn't exist. + //Rather than suppress it with @fsockopen, capture it cleanly instead + set_error_handler([$this, 'catchWarning']); + + if (false === $port) { + $port = static::DEFAULT_PORT; + } + + // connect to the POP3 server + $errno = 0; + $errstr = ''; + $this->pop_conn = fsockopen( + $host, // POP3 Host + $port, // Port # + $errno, // Error Number + $errstr, // Error Message + $tval + ); // Timeout (seconds) + // Restore the error handler + restore_error_handler(); + + // Did we connect? + if (false === $this->pop_conn) { + // It would appear not... + $this->setError( + "Failed to connect to server $host on port $port. errno: $errno; errstr: $errstr" + ); + + return false; + } + + // Increase the stream time-out + stream_set_timeout($this->pop_conn, $tval, 0); + + // Get the POP3 server response + $pop3_response = $this->getResponse(); + // Check for the +OK + if ($this->checkResponse($pop3_response)) { + // The connection is established and the POP3 server is talking + $this->connected = true; + + return true; + } + + return false; + } + + /** + * Log in to the POP3 server. + * Does not support APOP (RFC 2828, 4949). + * + * @param string $username + * @param string $password + * + * @return bool + */ + public function login($username = '', $password = '') + { + if (!$this->connected) { + $this->setError('Not connected to POP3 server'); + } + if (empty($username)) { + $username = $this->username; + } + if (empty($password)) { + $password = $this->password; + } + + // Send the Username + $this->sendString("USER $username" . static::LE); + $pop3_response = $this->getResponse(); + if ($this->checkResponse($pop3_response)) { + // Send the Password + $this->sendString("PASS $password" . static::LE); + $pop3_response = $this->getResponse(); + if ($this->checkResponse($pop3_response)) { + return true; + } + } + + return false; + } + + /** + * Disconnect from the POP3 server. + */ + public function disconnect() + { + $this->sendString('QUIT'); + //The QUIT command may cause the daemon to exit, which will kill our connection + //So ignore errors here + try { + @fclose($this->pop_conn); + } catch (Exception $e) { + //Do nothing + } + } + + /** + * Get a response from the POP3 server. + * + * @param int $size The maximum number of bytes to retrieve + * + * @return string + */ + protected function getResponse($size = 128) + { + $response = fgets($this->pop_conn, $size); + if ($this->do_debug >= 1) { + echo 'Server -> Client: ', $response; + } + + return $response; + } + + /** + * Send raw data to the POP3 server. + * + * @param string $string + * + * @return int + */ + protected function sendString($string) + { + if ($this->pop_conn) { + if ($this->do_debug >= 2) { //Show client messages when debug >= 2 + echo 'Client -> Server: ', $string; + } + + return fwrite($this->pop_conn, $string, strlen($string)); + } + + return 0; + } + + /** + * Checks the POP3 server response. + * Looks for for +OK or -ERR. + * + * @param string $string + * + * @return bool + */ + protected function checkResponse($string) + { + if (strpos($string, '+OK') !== 0) { + $this->setError("Server reported an error: $string"); + + return false; + } + + return true; + } + + /** + * Add an error to the internal error store. + * Also display debug output if it's enabled. + * + * @param string $error + */ + protected function setError($error) + { + $this->errors[] = $error; + if ($this->do_debug >= 1) { + echo '
';
+            foreach ($this->errors as $e) {
+                print_r($e);
+            }
+            echo '
'; + } + } + + /** + * Get an array of error messages, if any. + * + * @return array + */ + public function getErrors() + { + return $this->errors; + } + + /** + * POP3 connection error handler. + * + * @param int $errno + * @param string $errstr + * @param string $errfile + * @param int $errline + */ + protected function catchWarning($errno, $errstr, $errfile, $errline) + { + $this->setError( + 'Connecting to the POP3 server raised a PHP warning:' . + "errno: $errno errstr: $errstr; errfile: $errfile; errline: $errline" + ); + } +} diff --git a/admin/lib/vendor/phpmailer/phpmailer/src/SMTP.php b/admin/lib/vendor/phpmailer/phpmailer/src/SMTP.php new file mode 100644 index 0000000..9e43dce --- /dev/null +++ b/admin/lib/vendor/phpmailer/phpmailer/src/SMTP.php @@ -0,0 +1,1426 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2020 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + */ + +namespace PHPMailer\PHPMailer; + +/** + * PHPMailer RFC821 SMTP email transport class. + * Implements RFC 821 SMTP commands and provides some utility methods for sending mail to an SMTP server. + * + * @author Chris Ryan + * @author Marcus Bointon + */ +class SMTP +{ + /** + * The PHPMailer SMTP version number. + * + * @var string + */ + const VERSION = '6.1.8'; + + /** + * SMTP line break constant. + * + * @var string + */ + const LE = "\r\n"; + + /** + * The SMTP port to use if one is not specified. + * + * @var int + */ + const DEFAULT_PORT = 25; + + /** + * The maximum line length allowed by RFC 5321 section 4.5.3.1.6, + * *excluding* a trailing CRLF break. + * + * @see https://tools.ietf.org/html/rfc5321#section-4.5.3.1.6 + * + * @var int + */ + const MAX_LINE_LENGTH = 998; + + /** + * The maximum line length allowed for replies in RFC 5321 section 4.5.3.1.5, + * *including* a trailing CRLF line break. + * + * @see https://tools.ietf.org/html/rfc5321#section-4.5.3.1.5 + * + * @var int + */ + const MAX_REPLY_LENGTH = 512; + + /** + * Debug level for no output. + * + * @var int + */ + const DEBUG_OFF = 0; + + /** + * Debug level to show client -> server messages. + * + * @var int + */ + const DEBUG_CLIENT = 1; + + /** + * Debug level to show client -> server and server -> client messages. + * + * @var int + */ + const DEBUG_SERVER = 2; + + /** + * Debug level to show connection status, client -> server and server -> client messages. + * + * @var int + */ + const DEBUG_CONNECTION = 3; + + /** + * Debug level to show all messages. + * + * @var int + */ + const DEBUG_LOWLEVEL = 4; + + /** + * Debug output level. + * Options: + * * self::DEBUG_OFF (`0`) No debug output, default + * * self::DEBUG_CLIENT (`1`) Client commands + * * self::DEBUG_SERVER (`2`) Client commands and server responses + * * self::DEBUG_CONNECTION (`3`) As DEBUG_SERVER plus connection status + * * self::DEBUG_LOWLEVEL (`4`) Low-level data output, all messages. + * + * @var int + */ + public $do_debug = self::DEBUG_OFF; + + /** + * How to handle debug output. + * Options: + * * `echo` Output plain-text as-is, appropriate for CLI + * * `html` Output escaped, line breaks converted to `
`, appropriate for browser output + * * `error_log` Output to error log as configured in php.ini + * Alternatively, you can provide a callable expecting two params: a message string and the debug level: + * + * ```php + * $smtp->Debugoutput = function($str, $level) {echo "debug level $level; message: $str";}; + * ``` + * + * Alternatively, you can pass in an instance of a PSR-3 compatible logger, though only `debug` + * level output is used: + * + * ```php + * $mail->Debugoutput = new myPsr3Logger; + * ``` + * + * @var string|callable|\Psr\Log\LoggerInterface + */ + public $Debugoutput = 'echo'; + + /** + * Whether to use VERP. + * + * @see http://en.wikipedia.org/wiki/Variable_envelope_return_path + * @see http://www.postfix.org/VERP_README.html Info on VERP + * + * @var bool + */ + public $do_verp = false; + + /** + * The timeout value for connection, in seconds. + * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2. + * This needs to be quite high to function correctly with hosts using greetdelay as an anti-spam measure. + * + * @see http://tools.ietf.org/html/rfc2821#section-4.5.3.2 + * + * @var int + */ + public $Timeout = 300; + + /** + * How long to wait for commands to complete, in seconds. + * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2. + * + * @var int + */ + public $Timelimit = 300; + + /** + * Patterns to extract an SMTP transaction id from reply to a DATA command. + * The first capture group in each regex will be used as the ID. + * MS ESMTP returns the message ID, which may not be correct for internal tracking. + * + * @var string[] + */ + protected $smtp_transaction_id_patterns = [ + 'exim' => '/[\d]{3} OK id=(.*)/', + 'sendmail' => '/[\d]{3} 2.0.0 (.*) Message/', + 'postfix' => '/[\d]{3} 2.0.0 Ok: queued as (.*)/', + 'Microsoft_ESMTP' => '/[0-9]{3} 2.[\d].0 (.*)@(?:.*) Queued mail for delivery/', + 'Amazon_SES' => '/[\d]{3} Ok (.*)/', + 'SendGrid' => '/[\d]{3} Ok: queued as (.*)/', + 'CampaignMonitor' => '/[\d]{3} 2.0.0 OK:([a-zA-Z\d]{48})/', + ]; + + /** + * The last transaction ID issued in response to a DATA command, + * if one was detected. + * + * @var string|bool|null + */ + protected $last_smtp_transaction_id; + + /** + * The socket for the server connection. + * + * @var ?resource + */ + protected $smtp_conn; + + /** + * Error information, if any, for the last SMTP command. + * + * @var array + */ + protected $error = [ + 'error' => '', + 'detail' => '', + 'smtp_code' => '', + 'smtp_code_ex' => '', + ]; + + /** + * The reply the server sent to us for HELO. + * If null, no HELO string has yet been received. + * + * @var string|null + */ + protected $helo_rply; + + /** + * The set of SMTP extensions sent in reply to EHLO command. + * Indexes of the array are extension names. + * Value at index 'HELO' or 'EHLO' (according to command that was sent) + * represents the server name. In case of HELO it is the only element of the array. + * Other values can be boolean TRUE or an array containing extension options. + * If null, no HELO/EHLO string has yet been received. + * + * @var array|null + */ + protected $server_caps; + + /** + * The most recent reply received from the server. + * + * @var string + */ + protected $last_reply = ''; + + /** + * Output debugging info via a user-selected method. + * + * @param string $str Debug string to output + * @param int $level The debug level of this message; see DEBUG_* constants + * + * @see SMTP::$Debugoutput + * @see SMTP::$do_debug + */ + protected function edebug($str, $level = 0) + { + if ($level > $this->do_debug) { + return; + } + //Is this a PSR-3 logger? + if ($this->Debugoutput instanceof \Psr\Log\LoggerInterface) { + $this->Debugoutput->debug($str); + + return; + } + //Avoid clash with built-in function names + if (is_callable($this->Debugoutput) && !in_array($this->Debugoutput, ['error_log', 'html', 'echo'])) { + call_user_func($this->Debugoutput, $str, $level); + + return; + } + switch ($this->Debugoutput) { + case 'error_log': + //Don't output, just log + error_log($str); + break; + case 'html': + //Cleans up output a bit for a better looking, HTML-safe output + echo gmdate('Y-m-d H:i:s'), ' ', htmlentities( + preg_replace('/[\r\n]+/', '', $str), + ENT_QUOTES, + 'UTF-8' + ), "
\n"; + break; + case 'echo': + default: + //Normalize line breaks + $str = preg_replace('/\r\n|\r/m', "\n", $str); + echo gmdate('Y-m-d H:i:s'), + "\t", + //Trim trailing space + trim( + //Indent for readability, except for trailing break + str_replace( + "\n", + "\n \t ", + trim($str) + ) + ), + "\n"; + } + } + + /** + * Connect to an SMTP server. + * + * @param string $host SMTP server IP or host name + * @param int $port The port number to connect to + * @param int $timeout How long to wait for the connection to open + * @param array $options An array of options for stream_context_create() + * + * @return bool + */ + public function connect($host, $port = null, $timeout = 30, $options = []) + { + // Clear errors to avoid confusion + $this->setError(''); + // Make sure we are __not__ connected + if ($this->connected()) { + // Already connected, generate error + $this->setError('Already connected to a server'); + + return false; + } + if (empty($port)) { + $port = self::DEFAULT_PORT; + } + // Connect to the SMTP server + $this->edebug( + "Connection: opening to $host:$port, timeout=$timeout, options=" . + (count($options) > 0 ? var_export($options, true) : 'array()'), + self::DEBUG_CONNECTION + ); + + $this->smtp_conn = $this->getSMTPConnection($host, $port, $timeout, $options); + + if ($this->smtp_conn === false) { + //Error info already set inside `getSMTPConnection()` + return false; + } + + $this->edebug('Connection: opened', self::DEBUG_CONNECTION); + + // Get any announcement + $this->last_reply = $this->get_lines(); + $this->edebug('SERVER -> CLIENT: ' . $this->last_reply, self::DEBUG_SERVER); + + return true; + } + + /** + * Create connection to the SMTP server. + * + * @param string $host SMTP server IP or host name + * @param int $port The port number to connect to + * @param int $timeout How long to wait for the connection to open + * @param array $options An array of options for stream_context_create() + * + * @return false|resource + */ + protected function getSMTPConnection($host, $port = null, $timeout = 30, $options = []) + { + static $streamok; + //This is enabled by default since 5.0.0 but some providers disable it + //Check this once and cache the result + if (null === $streamok) { + $streamok = function_exists('stream_socket_client'); + } + + $errno = 0; + $errstr = ''; + if ($streamok) { + $socket_context = stream_context_create($options); + set_error_handler([$this, 'errorHandler']); + $connection = stream_socket_client( + $host . ':' . $port, + $errno, + $errstr, + $timeout, + STREAM_CLIENT_CONNECT, + $socket_context + ); + restore_error_handler(); + } else { + //Fall back to fsockopen which should work in more places, but is missing some features + $this->edebug( + 'Connection: stream_socket_client not available, falling back to fsockopen', + self::DEBUG_CONNECTION + ); + set_error_handler([$this, 'errorHandler']); + $connection = fsockopen( + $host, + $port, + $errno, + $errstr, + $timeout + ); + restore_error_handler(); + } + + // Verify we connected properly + if (!is_resource($connection)) { + $this->setError( + 'Failed to connect to server', + '', + (string) $errno, + $errstr + ); + $this->edebug( + 'SMTP ERROR: ' . $this->error['error'] + . ": $errstr ($errno)", + self::DEBUG_CLIENT + ); + + return false; + } + + // SMTP server can take longer to respond, give longer timeout for first read + // Windows does not have support for this timeout function + if (strpos(PHP_OS, 'WIN') !== 0) { + $max = (int)ini_get('max_execution_time'); + // Don't bother if unlimited, or if set_time_limit is disabled + if (0 !== $max && $timeout > $max && strpos(ini_get('disable_functions'), 'set_time_limit') === false) { + @set_time_limit($timeout); + } + stream_set_timeout($connection, $timeout, 0); + } + + return $connection; + } + + /** + * Initiate a TLS (encrypted) session. + * + * @return bool + */ + public function startTLS() + { + if (!$this->sendCommand('STARTTLS', 'STARTTLS', 220)) { + return false; + } + + //Allow the best TLS version(s) we can + $crypto_method = STREAM_CRYPTO_METHOD_TLS_CLIENT; + + //PHP 5.6.7 dropped inclusion of TLS 1.1 and 1.2 in STREAM_CRYPTO_METHOD_TLS_CLIENT + //so add them back in manually if we can + if (defined('STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT')) { + $crypto_method |= STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT; + $crypto_method |= STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT; + } + + // Begin encrypted connection + set_error_handler([$this, 'errorHandler']); + $crypto_ok = stream_socket_enable_crypto( + $this->smtp_conn, + true, + $crypto_method + ); + restore_error_handler(); + + return (bool) $crypto_ok; + } + + /** + * Perform SMTP authentication. + * Must be run after hello(). + * + * @see hello() + * + * @param string $username The user name + * @param string $password The password + * @param string $authtype The auth type (CRAM-MD5, PLAIN, LOGIN, XOAUTH2) + * @param OAuth $OAuth An optional OAuth instance for XOAUTH2 authentication + * + * @return bool True if successfully authenticated + */ + public function authenticate( + $username, + $password, + $authtype = null, + $OAuth = null + ) { + if (!$this->server_caps) { + $this->setError('Authentication is not allowed before HELO/EHLO'); + + return false; + } + + if (array_key_exists('EHLO', $this->server_caps)) { + // SMTP extensions are available; try to find a proper authentication method + if (!array_key_exists('AUTH', $this->server_caps)) { + $this->setError('Authentication is not allowed at this stage'); + // 'at this stage' means that auth may be allowed after the stage changes + // e.g. after STARTTLS + + return false; + } + + $this->edebug('Auth method requested: ' . ($authtype ?: 'UNSPECIFIED'), self::DEBUG_LOWLEVEL); + $this->edebug( + 'Auth methods available on the server: ' . implode(',', $this->server_caps['AUTH']), + self::DEBUG_LOWLEVEL + ); + + //If we have requested a specific auth type, check the server supports it before trying others + if (null !== $authtype && !in_array($authtype, $this->server_caps['AUTH'], true)) { + $this->edebug('Requested auth method not available: ' . $authtype, self::DEBUG_LOWLEVEL); + $authtype = null; + } + + if (empty($authtype)) { + //If no auth mechanism is specified, attempt to use these, in this order + //Try CRAM-MD5 first as it's more secure than the others + foreach (['CRAM-MD5', 'LOGIN', 'PLAIN', 'XOAUTH2'] as $method) { + if (in_array($method, $this->server_caps['AUTH'], true)) { + $authtype = $method; + break; + } + } + if (empty($authtype)) { + $this->setError('No supported authentication methods found'); + + return false; + } + $this->edebug('Auth method selected: ' . $authtype, self::DEBUG_LOWLEVEL); + } + + if (!in_array($authtype, $this->server_caps['AUTH'], true)) { + $this->setError("The requested authentication method \"$authtype\" is not supported by the server"); + + return false; + } + } elseif (empty($authtype)) { + $authtype = 'LOGIN'; + } + switch ($authtype) { + case 'PLAIN': + // Start authentication + if (!$this->sendCommand('AUTH', 'AUTH PLAIN', 334)) { + return false; + } + // Send encoded username and password + if (!$this->sendCommand( + 'User & Password', + base64_encode("\0" . $username . "\0" . $password), + 235 + ) + ) { + return false; + } + break; + case 'LOGIN': + // Start authentication + if (!$this->sendCommand('AUTH', 'AUTH LOGIN', 334)) { + return false; + } + if (!$this->sendCommand('Username', base64_encode($username), 334)) { + return false; + } + if (!$this->sendCommand('Password', base64_encode($password), 235)) { + return false; + } + break; + case 'CRAM-MD5': + // Start authentication + if (!$this->sendCommand('AUTH CRAM-MD5', 'AUTH CRAM-MD5', 334)) { + return false; + } + // Get the challenge + $challenge = base64_decode(substr($this->last_reply, 4)); + + // Build the response + $response = $username . ' ' . $this->hmac($challenge, $password); + + // send encoded credentials + return $this->sendCommand('Username', base64_encode($response), 235); + case 'XOAUTH2': + //The OAuth instance must be set up prior to requesting auth. + if (null === $OAuth) { + return false; + } + $oauth = $OAuth->getOauth64(); + + // Start authentication + if (!$this->sendCommand('AUTH', 'AUTH XOAUTH2 ' . $oauth, 235)) { + return false; + } + break; + default: + $this->setError("Authentication method \"$authtype\" is not supported"); + + return false; + } + + return true; + } + + /** + * Calculate an MD5 HMAC hash. + * Works like hash_hmac('md5', $data, $key) + * in case that function is not available. + * + * @param string $data The data to hash + * @param string $key The key to hash with + * + * @return string + */ + protected function hmac($data, $key) + { + if (function_exists('hash_hmac')) { + return hash_hmac('md5', $data, $key); + } + + // The following borrowed from + // http://php.net/manual/en/function.mhash.php#27225 + + // RFC 2104 HMAC implementation for php. + // Creates an md5 HMAC. + // Eliminates the need to install mhash to compute a HMAC + // by Lance Rushing + + $bytelen = 64; // byte length for md5 + if (strlen($key) > $bytelen) { + $key = pack('H*', md5($key)); + } + $key = str_pad($key, $bytelen, chr(0x00)); + $ipad = str_pad('', $bytelen, chr(0x36)); + $opad = str_pad('', $bytelen, chr(0x5c)); + $k_ipad = $key ^ $ipad; + $k_opad = $key ^ $opad; + + return md5($k_opad . pack('H*', md5($k_ipad . $data))); + } + + /** + * Check connection state. + * + * @return bool True if connected + */ + public function connected() + { + if (is_resource($this->smtp_conn)) { + $sock_status = stream_get_meta_data($this->smtp_conn); + if ($sock_status['eof']) { + // The socket is valid but we are not connected + $this->edebug( + 'SMTP NOTICE: EOF caught while checking if connected', + self::DEBUG_CLIENT + ); + $this->close(); + + return false; + } + + return true; // everything looks good + } + + return false; + } + + /** + * Close the socket and clean up the state of the class. + * Don't use this function without first trying to use QUIT. + * + * @see quit() + */ + public function close() + { + $this->setError(''); + $this->server_caps = null; + $this->helo_rply = null; + if (is_resource($this->smtp_conn)) { + // close the connection and cleanup + fclose($this->smtp_conn); + $this->smtp_conn = null; //Makes for cleaner serialization + $this->edebug('Connection: closed', self::DEBUG_CONNECTION); + } + } + + /** + * Send an SMTP DATA command. + * Issues a data command and sends the msg_data to the server, + * finializing the mail transaction. $msg_data is the message + * that is to be send with the headers. Each header needs to be + * on a single line followed by a with the message headers + * and the message body being separated by an additional . + * Implements RFC 821: DATA . + * + * @param string $msg_data Message data to send + * + * @return bool + */ + public function data($msg_data) + { + //This will use the standard timelimit + if (!$this->sendCommand('DATA', 'DATA', 354)) { + return false; + } + + /* The server is ready to accept data! + * According to rfc821 we should not send more than 1000 characters on a single line (including the LE) + * so we will break the data up into lines by \r and/or \n then if needed we will break each of those into + * smaller lines to fit within the limit. + * We will also look for lines that start with a '.' and prepend an additional '.'. + * NOTE: this does not count towards line-length limit. + */ + + // Normalize line breaks before exploding + $lines = explode("\n", str_replace(["\r\n", "\r"], "\n", $msg_data)); + + /* To distinguish between a complete RFC822 message and a plain message body, we check if the first field + * of the first line (':' separated) does not contain a space then it _should_ be a header and we will + * process all lines before a blank line as headers. + */ + + $field = substr($lines[0], 0, strpos($lines[0], ':')); + $in_headers = false; + if (!empty($field) && strpos($field, ' ') === false) { + $in_headers = true; + } + + foreach ($lines as $line) { + $lines_out = []; + if ($in_headers && $line === '') { + $in_headers = false; + } + //Break this line up into several smaller lines if it's too long + //Micro-optimisation: isset($str[$len]) is faster than (strlen($str) > $len), + while (isset($line[self::MAX_LINE_LENGTH])) { + //Working backwards, try to find a space within the last MAX_LINE_LENGTH chars of the line to break on + //so as to avoid breaking in the middle of a word + $pos = strrpos(substr($line, 0, self::MAX_LINE_LENGTH), ' '); + //Deliberately matches both false and 0 + if (!$pos) { + //No nice break found, add a hard break + $pos = self::MAX_LINE_LENGTH - 1; + $lines_out[] = substr($line, 0, $pos); + $line = substr($line, $pos); + } else { + //Break at the found point + $lines_out[] = substr($line, 0, $pos); + //Move along by the amount we dealt with + $line = substr($line, $pos + 1); + } + //If processing headers add a LWSP-char to the front of new line RFC822 section 3.1.1 + if ($in_headers) { + $line = "\t" . $line; + } + } + $lines_out[] = $line; + + //Send the lines to the server + foreach ($lines_out as $line_out) { + //RFC2821 section 4.5.2 + if (!empty($line_out) && $line_out[0] === '.') { + $line_out = '.' . $line_out; + } + $this->client_send($line_out . static::LE, 'DATA'); + } + } + + //Message data has been sent, complete the command + //Increase timelimit for end of DATA command + $savetimelimit = $this->Timelimit; + $this->Timelimit *= 2; + $result = $this->sendCommand('DATA END', '.', 250); + $this->recordLastTransactionID(); + //Restore timelimit + $this->Timelimit = $savetimelimit; + + return $result; + } + + /** + * Send an SMTP HELO or EHLO command. + * Used to identify the sending server to the receiving server. + * This makes sure that client and server are in a known state. + * Implements RFC 821: HELO + * and RFC 2821 EHLO. + * + * @param string $host The host name or IP to connect to + * + * @return bool + */ + public function hello($host = '') + { + //Try extended hello first (RFC 2821) + return $this->sendHello('EHLO', $host) or $this->sendHello('HELO', $host); + } + + /** + * Send an SMTP HELO or EHLO command. + * Low-level implementation used by hello(). + * + * @param string $hello The HELO string + * @param string $host The hostname to say we are + * + * @return bool + * + * @see hello() + */ + protected function sendHello($hello, $host) + { + $noerror = $this->sendCommand($hello, $hello . ' ' . $host, 250); + $this->helo_rply = $this->last_reply; + if ($noerror) { + $this->parseHelloFields($hello); + } else { + $this->server_caps = null; + } + + return $noerror; + } + + /** + * Parse a reply to HELO/EHLO command to discover server extensions. + * In case of HELO, the only parameter that can be discovered is a server name. + * + * @param string $type `HELO` or `EHLO` + */ + protected function parseHelloFields($type) + { + $this->server_caps = []; + $lines = explode("\n", $this->helo_rply); + + foreach ($lines as $n => $s) { + //First 4 chars contain response code followed by - or space + $s = trim(substr($s, 4)); + if (empty($s)) { + continue; + } + $fields = explode(' ', $s); + if (!empty($fields)) { + if (!$n) { + $name = $type; + $fields = $fields[0]; + } else { + $name = array_shift($fields); + switch ($name) { + case 'SIZE': + $fields = ($fields ? $fields[0] : 0); + break; + case 'AUTH': + if (!is_array($fields)) { + $fields = []; + } + break; + default: + $fields = true; + } + } + $this->server_caps[$name] = $fields; + } + } + } + + /** + * Send an SMTP MAIL command. + * Starts a mail transaction from the email address specified in + * $from. Returns true if successful or false otherwise. If True + * the mail transaction is started and then one or more recipient + * commands may be called followed by a data command. + * Implements RFC 821: MAIL FROM: . + * + * @param string $from Source address of this message + * + * @return bool + */ + public function mail($from) + { + $useVerp = ($this->do_verp ? ' XVERP' : ''); + + return $this->sendCommand( + 'MAIL FROM', + 'MAIL FROM:<' . $from . '>' . $useVerp, + 250 + ); + } + + /** + * Send an SMTP QUIT command. + * Closes the socket if there is no error or the $close_on_error argument is true. + * Implements from RFC 821: QUIT . + * + * @param bool $close_on_error Should the connection close if an error occurs? + * + * @return bool + */ + public function quit($close_on_error = true) + { + $noerror = $this->sendCommand('QUIT', 'QUIT', 221); + $err = $this->error; //Save any error + if ($noerror || $close_on_error) { + $this->close(); + $this->error = $err; //Restore any error from the quit command + } + + return $noerror; + } + + /** + * Send an SMTP RCPT command. + * Sets the TO argument to $toaddr. + * Returns true if the recipient was accepted false if it was rejected. + * Implements from RFC 821: RCPT TO: . + * + * @param string $address The address the message is being sent to + * @param string $dsn Comma separated list of DSN notifications. NEVER, SUCCESS, FAILURE + * or DELAY. If you specify NEVER all other notifications are ignored. + * + * @return bool + */ + public function recipient($address, $dsn = '') + { + if (empty($dsn)) { + $rcpt = 'RCPT TO:<' . $address . '>'; + } else { + $dsn = strtoupper($dsn); + $notify = []; + + if (strpos($dsn, 'NEVER') !== false) { + $notify[] = 'NEVER'; + } else { + foreach (['SUCCESS', 'FAILURE', 'DELAY'] as $value) { + if (strpos($dsn, $value) !== false) { + $notify[] = $value; + } + } + } + + $rcpt = 'RCPT TO:<' . $address . '> NOTIFY=' . implode(',', $notify); + } + + return $this->sendCommand( + 'RCPT TO', + $rcpt, + [250, 251] + ); + } + + /** + * Send an SMTP RSET command. + * Abort any transaction that is currently in progress. + * Implements RFC 821: RSET . + * + * @return bool True on success + */ + public function reset() + { + return $this->sendCommand('RSET', 'RSET', 250); + } + + /** + * Send a command to an SMTP server and check its return code. + * + * @param string $command The command name - not sent to the server + * @param string $commandstring The actual command to send + * @param int|array $expect One or more expected integer success codes + * + * @return bool True on success + */ + protected function sendCommand($command, $commandstring, $expect) + { + if (!$this->connected()) { + $this->setError("Called $command without being connected"); + + return false; + } + //Reject line breaks in all commands + if ((strpos($commandstring, "\n") !== false) || (strpos($commandstring, "\r") !== false)) { + $this->setError("Command '$command' contained line breaks"); + + return false; + } + $this->client_send($commandstring . static::LE, $command); + + $this->last_reply = $this->get_lines(); + // Fetch SMTP code and possible error code explanation + $matches = []; + if (preg_match('/^([\d]{3})[ -](?:([\d]\\.[\d]\\.[\d]{1,2}) )?/', $this->last_reply, $matches)) { + $code = (int) $matches[1]; + $code_ex = (count($matches) > 2 ? $matches[2] : null); + // Cut off error code from each response line + $detail = preg_replace( + "/{$code}[ -]" . + ($code_ex ? str_replace('.', '\\.', $code_ex) . ' ' : '') . '/m', + '', + $this->last_reply + ); + } else { + // Fall back to simple parsing if regex fails + $code = (int) substr($this->last_reply, 0, 3); + $code_ex = null; + $detail = substr($this->last_reply, 4); + } + + $this->edebug('SERVER -> CLIENT: ' . $this->last_reply, self::DEBUG_SERVER); + + if (!in_array($code, (array) $expect, true)) { + $this->setError( + "$command command failed", + $detail, + $code, + $code_ex + ); + $this->edebug( + 'SMTP ERROR: ' . $this->error['error'] . ': ' . $this->last_reply, + self::DEBUG_CLIENT + ); + + return false; + } + + $this->setError(''); + + return true; + } + + /** + * Send an SMTP SAML command. + * Starts a mail transaction from the email address specified in $from. + * Returns true if successful or false otherwise. If True + * the mail transaction is started and then one or more recipient + * commands may be called followed by a data command. This command + * will send the message to the users terminal if they are logged + * in and send them an email. + * Implements RFC 821: SAML FROM: . + * + * @param string $from The address the message is from + * + * @return bool + */ + public function sendAndMail($from) + { + return $this->sendCommand('SAML', "SAML FROM:$from", 250); + } + + /** + * Send an SMTP VRFY command. + * + * @param string $name The name to verify + * + * @return bool + */ + public function verify($name) + { + return $this->sendCommand('VRFY', "VRFY $name", [250, 251]); + } + + /** + * Send an SMTP NOOP command. + * Used to keep keep-alives alive, doesn't actually do anything. + * + * @return bool + */ + public function noop() + { + return $this->sendCommand('NOOP', 'NOOP', 250); + } + + /** + * Send an SMTP TURN command. + * This is an optional command for SMTP that this class does not support. + * This method is here to make the RFC821 Definition complete for this class + * and _may_ be implemented in future. + * Implements from RFC 821: TURN . + * + * @return bool + */ + public function turn() + { + $this->setError('The SMTP TURN command is not implemented'); + $this->edebug('SMTP NOTICE: ' . $this->error['error'], self::DEBUG_CLIENT); + + return false; + } + + /** + * Send raw data to the server. + * + * @param string $data The data to send + * @param string $command Optionally, the command this is part of, used only for controlling debug output + * + * @return int|bool The number of bytes sent to the server or false on error + */ + public function client_send($data, $command = '') + { + //If SMTP transcripts are left enabled, or debug output is posted online + //it can leak credentials, so hide credentials in all but lowest level + if (self::DEBUG_LOWLEVEL > $this->do_debug && + in_array($command, ['User & Password', 'Username', 'Password'], true)) { + $this->edebug('CLIENT -> SERVER: [credentials hidden]', self::DEBUG_CLIENT); + } else { + $this->edebug('CLIENT -> SERVER: ' . $data, self::DEBUG_CLIENT); + } + set_error_handler([$this, 'errorHandler']); + $result = fwrite($this->smtp_conn, $data); + restore_error_handler(); + + return $result; + } + + /** + * Get the latest error. + * + * @return array + */ + public function getError() + { + return $this->error; + } + + /** + * Get SMTP extensions available on the server. + * + * @return array|null + */ + public function getServerExtList() + { + return $this->server_caps; + } + + /** + * Get metadata about the SMTP server from its HELO/EHLO response. + * The method works in three ways, dependent on argument value and current state: + * 1. HELO/EHLO has not been sent - returns null and populates $this->error. + * 2. HELO has been sent - + * $name == 'HELO': returns server name + * $name == 'EHLO': returns boolean false + * $name == any other string: returns null and populates $this->error + * 3. EHLO has been sent - + * $name == 'HELO'|'EHLO': returns the server name + * $name == any other string: if extension $name exists, returns True + * or its options (e.g. AUTH mechanisms supported). Otherwise returns False. + * + * @param string $name Name of SMTP extension or 'HELO'|'EHLO' + * + * @return string|bool|null + */ + public function getServerExt($name) + { + if (!$this->server_caps) { + $this->setError('No HELO/EHLO was sent'); + + return; + } + + if (!array_key_exists($name, $this->server_caps)) { + if ('HELO' === $name) { + return $this->server_caps['EHLO']; + } + if ('EHLO' === $name || array_key_exists('EHLO', $this->server_caps)) { + return false; + } + $this->setError('HELO handshake was used; No information about server extensions available'); + + return; + } + + return $this->server_caps[$name]; + } + + /** + * Get the last reply from the server. + * + * @return string + */ + public function getLastReply() + { + return $this->last_reply; + } + + /** + * Read the SMTP server's response. + * Either before eof or socket timeout occurs on the operation. + * With SMTP we can tell if we have more lines to read if the + * 4th character is '-' symbol. If it is a space then we don't + * need to read anything else. + * + * @return string + */ + protected function get_lines() + { + // If the connection is bad, give up straight away + if (!is_resource($this->smtp_conn)) { + return ''; + } + $data = ''; + $endtime = 0; + stream_set_timeout($this->smtp_conn, $this->Timeout); + if ($this->Timelimit > 0) { + $endtime = time() + $this->Timelimit; + } + $selR = [$this->smtp_conn]; + $selW = null; + while (is_resource($this->smtp_conn) && !feof($this->smtp_conn)) { + //Must pass vars in here as params are by reference + //solution for signals inspired by https://github.com/symfony/symfony/pull/6540 + set_error_handler([$this, 'errorHandler']); + $n = stream_select($selR, $selW, $selW, $this->Timelimit); + restore_error_handler(); + + if ($n === false) { + $message = $this->getError()['detail']; + + $this->edebug( + 'SMTP -> get_lines(): select failed (' . $message . ')', + self::DEBUG_LOWLEVEL + ); + + //stream_select returns false when the `select` system call is interrupted by an incoming signal, try the select again + if (stripos($message, 'interrupted system call') !== false) { + $this->edebug( + 'SMTP -> get_lines(): retrying stream_select', + self::DEBUG_LOWLEVEL + ); + $this->setError(''); + continue; + } + + break; + } + + if (!$n) { + $this->edebug( + 'SMTP -> get_lines(): select timed-out in (' . $this->Timelimit . ' sec)', + self::DEBUG_LOWLEVEL + ); + break; + } + + //Deliberate noise suppression - errors are handled afterwards + $str = @fgets($this->smtp_conn, self::MAX_REPLY_LENGTH); + $this->edebug('SMTP INBOUND: "' . trim($str) . '"', self::DEBUG_LOWLEVEL); + $data .= $str; + // If response is only 3 chars (not valid, but RFC5321 S4.2 says it must be handled), + // or 4th character is a space or a line break char, we are done reading, break the loop. + // String array access is a significant micro-optimisation over strlen + if (!isset($str[3]) || $str[3] === ' ' || $str[3] === "\r" || $str[3] === "\n") { + break; + } + // Timed-out? Log and break + $info = stream_get_meta_data($this->smtp_conn); + if ($info['timed_out']) { + $this->edebug( + 'SMTP -> get_lines(): stream timed-out (' . $this->Timeout . ' sec)', + self::DEBUG_LOWLEVEL + ); + break; + } + // Now check if reads took too long + if ($endtime && time() > $endtime) { + $this->edebug( + 'SMTP -> get_lines(): timelimit reached (' . + $this->Timelimit . ' sec)', + self::DEBUG_LOWLEVEL + ); + break; + } + } + + return $data; + } + + /** + * Enable or disable VERP address generation. + * + * @param bool $enabled + */ + public function setVerp($enabled = false) + { + $this->do_verp = $enabled; + } + + /** + * Get VERP address generation mode. + * + * @return bool + */ + public function getVerp() + { + return $this->do_verp; + } + + /** + * Set error messages and codes. + * + * @param string $message The error message + * @param string $detail Further detail on the error + * @param string $smtp_code An associated SMTP error code + * @param string $smtp_code_ex Extended SMTP code + */ + protected function setError($message, $detail = '', $smtp_code = '', $smtp_code_ex = '') + { + $this->error = [ + 'error' => $message, + 'detail' => $detail, + 'smtp_code' => $smtp_code, + 'smtp_code_ex' => $smtp_code_ex, + ]; + } + + /** + * Set debug output method. + * + * @param string|callable $method The name of the mechanism to use for debugging output, or a callable to handle it + */ + public function setDebugOutput($method = 'echo') + { + $this->Debugoutput = $method; + } + + /** + * Get debug output method. + * + * @return string + */ + public function getDebugOutput() + { + return $this->Debugoutput; + } + + /** + * Set debug output level. + * + * @param int $level + */ + public function setDebugLevel($level = 0) + { + $this->do_debug = $level; + } + + /** + * Get debug output level. + * + * @return int + */ + public function getDebugLevel() + { + return $this->do_debug; + } + + /** + * Set SMTP timeout. + * + * @param int $timeout The timeout duration in seconds + */ + public function setTimeout($timeout = 0) + { + $this->Timeout = $timeout; + } + + /** + * Get SMTP timeout. + * + * @return int + */ + public function getTimeout() + { + return $this->Timeout; + } + + /** + * Reports an error number and string. + * + * @param int $errno The error number returned by PHP + * @param string $errmsg The error message returned by PHP + * @param string $errfile The file the error occurred in + * @param int $errline The line number the error occurred on + */ + protected function errorHandler($errno, $errmsg, $errfile = '', $errline = 0) + { + $notice = 'Connection failed.'; + $this->setError( + $notice, + $errmsg, + (string) $errno + ); + $this->edebug( + "$notice Error #$errno: $errmsg [$errfile line $errline]", + self::DEBUG_CONNECTION + ); + } + + /** + * Extract and return the ID of the last SMTP transaction based on + * a list of patterns provided in SMTP::$smtp_transaction_id_patterns. + * Relies on the host providing the ID in response to a DATA command. + * If no reply has been received yet, it will return null. + * If no pattern was matched, it will return false. + * + * @return bool|string|null + */ + protected function recordLastTransactionID() + { + $reply = $this->getLastReply(); + + if (empty($reply)) { + $this->last_smtp_transaction_id = null; + } else { + $this->last_smtp_transaction_id = false; + foreach ($this->smtp_transaction_id_patterns as $smtp_transaction_id_pattern) { + $matches = []; + if (preg_match($smtp_transaction_id_pattern, $reply, $matches)) { + $this->last_smtp_transaction_id = trim($matches[1]); + break; + } + } + } + + return $this->last_smtp_transaction_id; + } + + /** + * Get the queue/transaction ID of the last SMTP transaction + * If no reply has been received yet, it will return null. + * If no pattern was matched, it will return false. + * + * @return bool|string|null + * + * @see recordLastTransactionID() + */ + public function getLastTransactionID() + { + return $this->last_smtp_transaction_id; + } +} diff --git a/admin/lib/web/galleries.php b/admin/lib/web/galleries.php new file mode 100644 index 0000000..cb77006 --- /dev/null +++ b/admin/lib/web/galleries.php @@ -0,0 +1,56 @@ +dbh = $dblink; + } + + public function getGalleries($parentid){ + + } + + public function getGallery($id){ + + } + + public function addgallery(){ + + } + + public function duplicateGallery($id){ + + } + + public function removeGallery($id){ + + } + + public function updateGallery($id,$data){ + + } + + public function newItem(){ + + } + + public function setItemFile($id,$file){ + + } + + public function removeItem($id){ + + } + + public function duplicateItem($id){ + + } + + public function updateItem($id,$data){ + + } + + public function __destruct(){ + $this->dbh = null; + } +} +?> \ No newline at end of file diff --git a/admin/lib/web/rendezvous.php b/admin/lib/web/rendezvous.php new file mode 100644 index 0000000..86cb73b --- /dev/null +++ b/admin/lib/web/rendezvous.php @@ -0,0 +1,36 @@ +dbh = $dblink; + } + + + public function addWorkplan(){ + + } + + public function updateWorkplan($id,$data){ + + } + + public function removeWorkplan($id){ + + } + + public function duplicateWorkplan($id){ + + } + + public function updateWorkplanDay($id,$data){ + + } + + + + public function __destruct(){ + $this->dbh = null; + } +} + +?> \ No newline at end of file diff --git a/admin/lib/web/templates.php b/admin/lib/web/templates.php new file mode 100644 index 0000000..7ed8c0c --- /dev/null +++ b/admin/lib/web/templates.php @@ -0,0 +1,64 @@ +templatedir = $templatedir; + } + + public function __destruct(){ + } + + public function gettemplatefiles(){ + return $this->getTemplateContents($this->templatedir); + } + + public function getmediafiles(){ + return $this->getMediaContents($this->templatedir); + } + + + + private function getMediaContents($dir, &$results = array()) { + $files = scandir($dir); + foreach ($files as $key => $value) { + $path = $dir . DIRECTORY_SEPARATOR . $value; + if (!is_dir($path)) { + $relpath = substr($path,strlen($this->templatedir)+ 1); + $cat = ""; + if (substr($relpath,0,4) == "img/" ){ $cat = "Site";} + elseif (substr($relpath,0,5) == "media/" ){ $cat = "Media";} + if ($cat != ""){ + $results[] = array("category" => $cat,"filepath" => $relpath,"folder" => substr($relpath,0,strlen(dirname($relpath))),"filename" => basename($relpath)); + } + + } else if ((substr($value,0,1) != "." ) && (substr($path,0,3) != 'lib')) { + $this->getMediaContents($path, $results); + } + } + return $results; + } + + private function getTemplateContents($dir, &$results = array()) { + $files = scandir($dir); + foreach ($files as $key => $value) { + $path = $dir . DIRECTORY_SEPARATOR . $value; + if (!is_dir($path)) { + $relpath = substr($path,strlen($this->templatedir)+ 1); + $cat = ""; + if (substr($relpath,0,4) == "css/" ){ $cat= "StyleSheet"; } + elseif (substr($relpath,0,5) == "tmpl/" ){ $cat = "Template"; } + elseif (substr($relpath,0,3) == "js/" ) { $cat = "JavaScript";} + if ($cat != ""){ + $results[] = array("category" => $cat,"filepath" => $relpath,"folder" => substr($relpath,0,strlen(dirname($relpath))),"filename" => basename($relpath)); + } + + } else if ((substr($value,0,1) != "." ) && (substr($path,0,3) != 'lib')) { + $this->getTemplateContents($path, $results); + #$results[] = $path; + } + } + return $results; + } + +} +?> \ No newline at end of file diff --git a/admin/lib/web/webmenu.php b/admin/lib/web/webmenu.php new file mode 100644 index 0000000..b8aa838 --- /dev/null +++ b/admin/lib/web/webmenu.php @@ -0,0 +1,48 @@ +dbh = $dblink; + } + + public function getMenu($idparent){ + + } + + public function addMenu(){ + + } + + public function deleteMenu(){ + + } + + public function updateMenu(){ + + } + + public function duplicateMenu(){ + + } + + public function addMenuItem(){ + + } + + public function removeMenuItem($id){ + + } + + public function updateMenuItem($id,$data){ + + } + + public function duplicateMenuItem($id){ + + } + + public function __destruct(){ + $this->dbh = null; + } + } +?> \ No newline at end of file diff --git a/admin/lib/web/websites.php b/admin/lib/web/websites.php new file mode 100644 index 0000000..470e86b --- /dev/null +++ b/admin/lib/web/websites.php @@ -0,0 +1,29 @@ +dbh = $dblink; + } + + public function addWebsite($id){ + + } + + public function updateWebsite($id,$data){ + + } + + public function removeWebsite($id){ + + } + + public function duplicateWebsite($id){ + + } + + + public function __destruct(){ + $this->dbh = null; + } + } +?> \ No newline at end of file diff --git a/admin/tmpl/.htaccess b/admin/tmpl/.htaccess new file mode 100644 index 0000000..908fc52 --- /dev/null +++ b/admin/tmpl/.htaccess @@ -0,0 +1,5 @@ +#RewriteEngine On +#RewriteBase / +#RewriteCond %{HTTP_COOKIE} !potlu= [NC] +#RewriteRule .* "%{REQUEST_SCHEME}://%{HTTP_HOST}/backoffice/login.html" [L] +Require all denied \ No newline at end of file diff --git a/admin/tmpl/index.html.mustache b/admin/tmpl/index.html.mustache new file mode 100644 index 0000000..8c43185 --- /dev/null +++ b/admin/tmpl/index.html.mustache @@ -0,0 +1,55 @@ + + + + + + Website Admin + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ {{ pagedata }} +
+ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/admin/tmpl/login.html.mustache b/admin/tmpl/login.html.mustache new file mode 100644 index 0000000..a0e1704 --- /dev/null +++ b/admin/tmpl/login.html.mustache @@ -0,0 +1,66 @@ + + + + + + + + + OLD BELL - Site Admin + + + + + + + + + + + + + + + + + + + + +
+ +
+
  +
+
+
+ logo +
+
+ {{pagedata}} +
+ +
+
  +
+
+ +
+ + + diff --git a/admin/tmpl/pages/config/rendezvous.html.mustache b/admin/tmpl/pages/config/rendezvous.html.mustache new file mode 100644 index 0000000..e69de29 diff --git a/admin/tmpl/pages/config/shop.html.mustache b/admin/tmpl/pages/config/shop.html.mustache new file mode 100644 index 0000000..e69de29 diff --git a/admin/tmpl/pages/config/site.html.mustache b/admin/tmpl/pages/config/site.html.mustache new file mode 100644 index 0000000..e69de29 diff --git a/admin/tmpl/pages/config/template.html.mustache b/admin/tmpl/pages/config/template.html.mustache new file mode 100644 index 0000000..4c49fdb --- /dev/null +++ b/admin/tmpl/pages/config/template.html.mustache @@ -0,0 +1,32 @@ +
+ retour +
Galleries
+
+ + + + +
+
+ +
+ +
+
+
+
+ + + \ No newline at end of file diff --git a/admin/tmpl/pages/config/users.html.mustache b/admin/tmpl/pages/config/users.html.mustache new file mode 100644 index 0000000..e69de29 diff --git a/admin/tmpl/pages/error.html.mustache b/admin/tmpl/pages/error.html.mustache new file mode 100644 index 0000000..31ab5ed --- /dev/null +++ b/admin/tmpl/pages/error.html.mustache @@ -0,0 +1,2 @@ +

Cette page n'existe pas!

+
{{config}}
\ No newline at end of file diff --git a/admin/tmpl/pages/galleries.html.mustache b/admin/tmpl/pages/galleries.html.mustache new file mode 100644 index 0000000..82cd1b3 --- /dev/null +++ b/admin/tmpl/pages/galleries.html.mustache @@ -0,0 +1,28 @@ +
+ retour +
Galleries
+
+ + + + +
+
+ +
+ +
+
+ + \ No newline at end of file diff --git a/admin/tmpl/pages/home.html.mustache b/admin/tmpl/pages/home.html.mustache new file mode 100644 index 0000000..b249c75 --- /dev/null +++ b/admin/tmpl/pages/home.html.mustache @@ -0,0 +1,45 @@ +
+ +
{{ sitename }}
+ Logout +
+
+
+
+
+

Contenu

+
+ +
+
+
+ +
+
+ + \ No newline at end of file diff --git a/admin/tmpl/pages/login/forgotpassword.html.mustache b/admin/tmpl/pages/login/forgotpassword.html.mustache new file mode 100644 index 0000000..3205836 --- /dev/null +++ b/admin/tmpl/pages/login/forgotpassword.html.mustache @@ -0,0 +1,20 @@ +
+

Mot de passe oublié?

+
Demander un nouveau mot de passe
+
+
+
+ + + + +
+ +
+ +
+ + +
\ No newline at end of file diff --git a/admin/tmpl/pages/login/login.html.mustache b/admin/tmpl/pages/login/login.html.mustache new file mode 100644 index 0000000..3ab8836 --- /dev/null +++ b/admin/tmpl/pages/login/login.html.mustache @@ -0,0 +1,23 @@ +
+

Accès Client

+
+
+
+ + +
+
+ + +
+
+ +
+ + +
+ +
+
\ No newline at end of file diff --git a/admin/tmpl/pages/login/message.html.mustache b/admin/tmpl/pages/login/message.html.mustache new file mode 100644 index 0000000..e9d05ec --- /dev/null +++ b/admin/tmpl/pages/login/message.html.mustache @@ -0,0 +1,7 @@ +
[% message %]
+ +
+ +
\ No newline at end of file diff --git a/admin/tmpl/pages/orders.html.mustache b/admin/tmpl/pages/orders.html.mustache new file mode 100644 index 0000000..e69de29 diff --git a/admin/tmpl/pages/rendezvous.html.mustache b/admin/tmpl/pages/rendezvous.html.mustache new file mode 100644 index 0000000..e69de29 diff --git a/admin/tmpl/pages/shop.html.mustache b/admin/tmpl/pages/shop.html.mustache new file mode 100644 index 0000000..e69de29 diff --git a/admin/tmpl/pages/websites.html.mustache b/admin/tmpl/pages/websites.html.mustache new file mode 100644 index 0000000..e69de29 diff --git a/admin/upload.php b/admin/upload.php new file mode 100644 index 0000000..e69de29 diff --git a/dev/appicons.json b/dev/appicons.json new file mode 100644 index 0000000..31497e4 --- /dev/null +++ b/dev/appicons.json @@ -0,0 +1 @@ +{"IcoMoonType":"selection","icons":[{"icon":{"paths":["M256 80.171v153.6h768v-153.6h-768zM0 233.771h153.6v-153.6h-153.6v153.6zM256 592.171h768v-153.6h-768v153.6zM0 592.171h153.6v-153.6h-153.6v153.6zM256 950.571h768v-153.6h-768v153.6zM0 950.571h153.6v-153.6h-153.6v153.6z"],"attrs":[{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["a3_list"]},"attrs":[{}],"properties":{"order":60,"id":143,"name":"list","prevSize":32,"code":59648},"setIdx":0,"setId":1,"iconIdx":3},{"icon":{"paths":["M0 446.251h1024v216.661h-1024v-216.661z","M0 807.381h1023.659v216.619h-1023.659v-216.619z","M0 85.163h1024v216.661h-1024v-216.661z"],"attrs":[{},{},{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["a5_menu"]},"attrs":[{},{},{}],"properties":{"order":38,"id":141,"name":"menu","prevSize":32,"code":59649},"setIdx":0,"setId":1,"iconIdx":5},{"icon":{"paths":["M1024 1023.915l-1024 0.085v-428.672l153.6-0.171v275.243l718.421 0.768v-275.84l151.979-0.085z","M411.989 279.509v-279.509h192.512v279.509h211.456l-303.957 385.067-303.915-385.067z"],"attrs":[{},{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["a7_import"]},"attrs":[{},{}],"properties":{"order":65,"id":139,"name":"mport","prevSize":32,"code":59650},"setIdx":0,"setId":1,"iconIdx":7},{"icon":{"paths":["M1024 1023.915l-1024 0.085v-428.672l153.6-0.171v275.243l718.421 0.768v-275.84l151.979-0.085z","M411.989 385.067v279.509h192.512v-279.509h211.456l-303.957-385.067-303.915 385.067z"],"attrs":[{},{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["a9_export"]},"attrs":[{},{}],"properties":{"order":68,"id":137,"name":"export","prevSize":32,"code":59651},"setIdx":0,"setId":1,"iconIdx":9},{"icon":{"paths":["M896.896 395.648h-271.317v-271.275h-225.365v271.275h-271.317v225.408h271.317v271.275h225.365v-271.275h271.317z"],"attrs":[{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["a15_smallAdd"]},"attrs":[{}],"properties":{"order":19,"id":131,"name":"add","prevSize":32,"code":59652},"setIdx":0,"setId":1,"iconIdx":15},{"icon":{"paths":["M979.499 89.045h-267.179c0-27.051 5.205-89.045-51.925-89.045h-252.032c-56.789 0-52.139 61.995-52.139 89.045h-267.093c-29.355 0-44.501 61.995-44.501 89.003h979.371c0-26.965-15.147-89.003-44.501-89.003zM133.632 222.592l-2.347 745.387c0 30.933 27.179 56.021 60.715 56.021h683.989c33.579 0 60.757-25.088 60.757-55.979l-1.792-745.387h-801.323zM311.723 934.827h-89.045v-623.189h89.045v623.189zM489.771 934.827h-89.045v-623.189h89.003v623.189zM667.819 934.827h-89.045v-623.189h89.045v623.189zM845.909 934.827h-89.003v-623.189h89.003v623.189z"],"attrs":[{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["a25_trash"]},"attrs":[{}],"properties":{"order":17,"id":121,"name":"trash","prevSize":32,"code":59653},"setIdx":0,"setId":1,"iconIdx":25},{"icon":{"paths":["M704.768 157.141l-191.872 191.872-191.829-191.829-159.317 159.317 191.829 191.872-191.872 191.829 159.36 159.36 191.872-191.829 191.829 191.829 159.36-159.36-191.787-191.787 191.829-191.872z"],"attrs":[{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["a31_smallX"]},"attrs":[{}],"properties":{"order":20,"id":115,"name":"close","prevSize":32,"code":59654},"setIdx":0,"setId":1,"iconIdx":31},{"icon":{"paths":["M725.077 1024l-517.717-512.043 517.717-511.957 135.083 133.547-382.677 378.411 382.677 378.453-135.083 133.589z"],"attrs":[{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["a33_leftChevron"]},"attrs":[{}],"properties":{"order":21,"id":113,"name":"back","prevSize":32,"code":59655},"setIdx":0,"setId":1,"iconIdx":33},{"icon":{"paths":["M342.4 1024l-135.040-133.589 382.635-378.453-382.635-378.411 135.040-133.547 517.717 512-517.717 512z"],"attrs":[{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["a35_rightChevron"]},"attrs":[{}],"properties":{"order":22,"id":111,"name":"next","prevSize":32,"code":59656},"setIdx":0,"setId":1,"iconIdx":35},{"icon":{"paths":["M593.323 356.821h430.677v296.661h-430.677v325.76l-593.323-468.309 593.323-468.267z"],"attrs":[{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["a37_leftArrow"]},"attrs":[{}],"properties":{"order":64,"id":109,"name":"back2","prevSize":32,"code":59657},"setIdx":0,"setId":1,"iconIdx":37},{"icon":{"paths":["M430.677 356.821h-430.677v296.661h430.677v325.76l593.323-468.309-593.323-468.267z"],"attrs":[{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["a39_rightArrow"]},"attrs":[{}],"properties":{"order":63,"id":107,"name":"next2","prevSize":32,"code":59658},"setIdx":0,"setId":1,"iconIdx":39},{"icon":{"paths":["M512 0c-282.325 0-512 229.675-512 512s229.675 512 512 512c282.325 0 512-229.675 512-512s-229.675-512-512-512zM825.216 860.544c2.219-4.437 2.347-7.509-0.469-8.704-21.973-9.515-43.605-18.688-65.109-28.032-21.461-9.429-42.325-18.603-62.507-27.477-20.267-8.917-38.315-16.768-54.101-23.68v-86.571c0-4.011 1.195-10.197 3.712-18.944 2.432-8.619 5.205-17.536 8.107-27.008 3.413-10.795 7.125-22.4 11.136-34.645 8.832-16.512 16.043-34.603 22.571-53.675 1.835 1.152 3.755 2.133 5.803 2.517 19.285 3.328 33.835-33.408 38.016-78.208 4.011-43.989 8.491-57.771-20.907-60.032 0-2.048 0.427-4.096 0.427-6.101 0-50.389-5.205-92.928-15.957-127.701-10.539-34.688-11.051-59.733-29.483-81.237-18.475-21.461-54.101-40.192-78.507-49.92-24.576-9.6-50.475-14.336-78.080-14.336-28.203 0-54.699 12.459-79.189 22.315-24.448 9.941-63.744 20.224-81.963 41.941-18.261 21.76-14.507 47.787-25.131 82.347-10.325 33.749-12.715 83.584-12.715 132.523-0.555 0-0.896 0-1.323 0-30.933 1.92-26.155 15.531-22.059 60.245 4.181 44.8 18.688 81.493 37.973 78.123 1.92-0.384 3.669-1.237 5.376-2.304 6.741 20.139 14.251 39.125 23.552 56.32 3.797 11.307 7.339 22.059 10.325 31.787 2.475 8.363 4.821 16.64 6.997 24.747 2.176 8.277 3.883 14.251 4.779 18.176v84.437c-15.275 6.912-32.939 14.805-53.291 23.765-20.224 8.832-41.685 18.091-64.427 28.032-22.571 9.899-45.483 19.712-68.395 29.611-1.024 0.469-1.621 1.237-2.176 2.005-89.472-85.461-145.536-205.611-145.536-338.859 0-258.773 210.56-469.333 469.333-469.333s469.333 210.56 469.333 469.333c0 138.368-60.544 262.528-156.117 348.544z"],"attrs":[{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["a44_contactOutline"]},"attrs":[{}],"properties":{"order":25,"id":102,"name":"user","prevSize":32,"code":59659},"setIdx":0,"setId":1,"iconIdx":44},{"icon":{"paths":["M512 0c-282.325 0-512 229.675-512 512s229.675 512 512 512c282.325 0 512-229.717 512-512s-229.675-512-512-512zM512 42.667c258.773 0 469.333 210.56 469.333 469.333 0 70.869-16.256 137.856-44.501 198.187-5.973-2.645-12.032-5.291-17.792-7.851-10.496-4.565-19.84-8.661-28.075-12.331v-44.971c0-2.091 0.683-5.333 1.92-9.813s2.645-9.173 4.267-14.123c1.749-5.547 3.669-11.563 5.76-17.963 4.565-8.576 8.32-18.048 11.733-27.861 0.896 0.64 2.005 1.067 2.987 1.28 10.069 1.664 17.579-17.323 19.755-40.619 2.091-22.912 4.48-30.037-10.837-31.189 0-1.109 0.171-2.133 0.171-3.243 0-26.112-2.645-48.256-8.235-66.347-5.504-18.091-5.76-31.104-15.317-42.197-9.685-11.179-28.16-20.864-40.832-25.899-12.757-4.992-26.155-7.509-40.576-7.509-14.677 0-28.501 6.4-41.173 11.605-12.672 5.163-33.067 10.496-42.496 21.803-9.6 11.307-7.68 24.789-13.099 42.752-5.419 17.621-6.656 43.52-6.656 68.907-0.256 0-0.427 0-0.683 0-6.4 0.427-9.771 1.877-11.52 4.821 2.731 4.736 1.579 13.312 0.256 27.605 2.176 22.699 9.685 41.173 19.499 39.509 0.896-0.213 1.92-0.64 2.731-1.195 3.499 10.411 7.424 20.437 12.245 29.312 2.091 5.931 3.84 11.477 5.419 16.469 1.237 4.437 2.517 8.661 3.669 12.971 1.152 4.267 2.005 7.339 2.517 9.429v43.904c-8.021 3.541-17.152 7.637-27.733 12.288-10.496 4.565-21.589 9.472-33.493 14.592-5.589 2.475-11.179 4.907-16.768 7.253 3.584 1.579 7.083 3.157 11.093 4.864 11.819 5.248 23.936 10.581 36.48 16.043 12.587 5.504 25.259 10.88 38.101 16.427 12.843 5.504 25.088 10.581 36.651 15.403 11.52 4.693 21.845 8.96 31.104 12.8 9.259 3.755 16.683 6.571 22.485 8.533 5.76 2.091 12.928 10.411 19.371 19.499-4.907 5.803-10.155 11.307-15.317 16.853-0.171-0.171-0.213-0.384-0.384-0.555-8.021-9.515-18.517-16.512-31.403-21.12-6.187-2.133-14.165-5.248-24.064-9.216-9.899-4.096-20.992-8.661-33.323-13.696-12.331-5.12-25.429-10.539-39.083-16.427-13.739-5.973-27.349-11.691-40.661-17.536-13.483-5.931-26.496-11.605-39.168-17.152-12.587-5.589-23.936-10.496-33.749-14.848v-54.144c0-2.475 0.683-6.357 2.347-11.861 1.493-5.333 3.243-10.965 5.077-16.896 2.091-6.741 4.437-13.952 6.912-21.717 5.504-10.24 9.984-21.589 14.080-33.493 1.152 0.768 2.347 1.28 3.669 1.579 12.075 2.048 21.163-20.864 23.68-48.896 2.603-27.52 5.419-36.139-13.013-37.547 0-1.323 0.256-2.56 0.256-3.883 0-31.403-3.243-58.069-9.899-79.787-6.571-21.717-6.912-37.376-18.517-50.731-11.563-13.44-33.835-25.173-49.067-31.189-15.317-6.016-31.573-9.003-48.811-9.003-17.621 0-34.219 7.765-49.451 13.909-15.317 6.229-39.936 12.672-51.285 26.283-11.52 13.568-9.173 29.781-15.787 51.413-6.528 21.077-8.021 52.309-8.021 82.816-0.299 0-0.512 0-0.768 0-19.371 1.237-16.384 9.728-13.781 37.717 2.56 27.947 11.648 50.944 23.68 48.853 1.195-0.213 2.304-0.811 3.371-1.408 4.181 12.544 8.917 24.448 14.677 35.2 2.517 7.040 4.608 13.739 6.485 19.84 1.536 5.291 2.987 10.411 4.437 15.531 1.323 5.12 2.475 8.875 2.987 11.349v52.736c-9.6 4.352-20.608 9.301-33.365 14.848-12.629 5.547-26.027 11.349-40.235 17.579-14.123 6.229-28.416 12.331-42.752 18.517-14.379 6.187-27.989 12.032-41.003 17.323-12.928 5.419-24.619 10.155-35.072 14.336-10.539 4.224-19.029 7.424-25.557 9.557-12.672 4.608-22.912 11.605-30.976 21.12-4.651 5.376-8.576 10.923-12.075 16.512-7.381-7.211-14.336-14.848-21.291-22.528 7.595-7.936 15.317-14.805 20.309-16.683 6.059-1.92 14.037-4.864 23.808-8.832 9.771-3.883 20.779-8.363 32.896-13.312 12.117-4.992 24.875-10.453 38.272-16.299 13.44-5.717 26.795-11.52 40.021-17.323 13.312-5.76 25.771-11.179 37.675-16.427 1.493-0.64 2.731-1.195 4.267-1.877-5.376-2.304-10.795-4.651-16.171-6.955-11.179-4.907-22.016-9.643-32.555-14.208-10.496-4.693-19.84-8.789-28.075-12.331v-45.013c0-2.048 0.64-5.291 1.963-9.813 1.237-4.437 2.645-9.173 4.267-14.123 1.749-5.547 3.712-11.605 5.717-17.92 4.608-8.576 8.363-18.133 11.733-27.904 0.981 0.64 1.963 1.109 3.029 1.237 10.069 1.707 17.579-17.365 19.712-40.619 2.133-22.869 4.48-29.995-10.795-31.189 0-1.067 0.213-2.091 0.213-3.157 0-26.112-2.773-48.341-8.277-66.389-5.547-18.091-5.76-31.061-15.317-42.197-9.643-11.264-28.16-20.949-40.875-26.027-12.715-4.992-26.197-7.467-40.576-7.467-14.635 0-28.416 6.4-41.131 11.563s-33.152 10.496-42.539 21.845c-9.515 11.307-7.637 24.789-13.141 42.795-5.376 17.536-6.571 43.477-6.613 68.907-0.171 0-0.427-0.043-0.64 0-16.085 0.981-13.611 8.021-11.477 31.275s9.685 42.325 19.712 40.576c0.981-0.128 1.877-0.64 2.773-1.152 3.499 10.453 7.424 20.395 12.203 29.312 2.048 5.845 3.883 11.435 5.419 16.469 1.237 4.437 2.475 8.704 3.627 12.928 1.109 4.309 1.963 7.424 2.475 9.472v43.861c-7.936 3.627-17.109 7.723-27.691 12.331-7.851 3.413-16.469 7.211-25.045 10.965-31.744-63.232-50.048-134.315-50.048-209.707 0-258.816 210.56-469.333 469.333-469.333z"],"attrs":[{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["a46_contactsOutline"]},"attrs":[{}],"properties":{"order":26,"id":100,"name":"usergroup","prevSize":32,"code":59660},"setIdx":0,"setId":1,"iconIdx":46},{"icon":{"paths":["M551.509 862.848l110.677 102.997 264.149-268.416-110.592-102.997-264.235 268.416zM1008.811 548.693l-41.984-39.083c-19.669-18.261-50.517-17.493-69.163 1.536l-52.736 54.059 112.853 105.003 52.736-53.931c18.603-19.072 17.877-49.323-1.707-67.584zM496.555 1024l138.325-29.952-108.331-100.779-29.995 130.731z","M755.883 581.12l-137.344-57.259 0.171-0.128v-70.827c0-3.285 0.981-8.405 3.072-15.616 2.005-7.083 4.267-14.507 6.656-22.272 2.816-8.875 5.931-18.432 9.173-28.587 7.253-13.568 13.269-28.544 18.603-44.203 1.579 0.939 3.157 1.749 4.821 2.005 15.829 2.731 27.819-27.52 31.232-64.427 3.328-36.309 7.083-47.616-17.152-49.536 0-1.707 0.341-3.285 0.341-5.035 0-41.515-4.352-76.629-13.099-105.301-8.832-28.672-9.173-49.28-24.405-66.944-15.232-17.707-44.587-33.152-64.811-41.131-20.139-7.893-41.515-11.861-64.256-11.861-23.253 0-45.141 10.24-65.28 18.389-20.181 8.235-52.608 16.725-67.627 34.645-15.061 17.877-11.947 39.339-20.693 67.84-8.576 27.861-10.496 68.992-10.496 109.312-0.384 0-0.683 0-1.024 0-25.557 1.621-21.589 12.757-18.219 49.707 3.456 36.864 15.36 67.157 31.275 64.341 1.579-0.256 3.072-1.024 4.48-1.877 5.504 16.555 11.733 32.341 19.371 46.464 3.243 9.344 6.101 18.176 8.576 26.197 2.005 6.955 3.925 13.739 5.803 20.437 1.749 6.827 3.157 11.733 3.925 14.976v69.589c-12.587 5.717-27.179 12.16-43.947 19.541-16.683 7.339-34.347 14.976-53.163 23.211-18.603 8.107-37.461 16.256-56.363 24.363-18.944 8.235-36.949 15.872-54.101 22.997-17.067 6.997-32.512 13.355-46.336 18.816-13.824 5.589-25.003 9.771-33.621 12.501-16.683 6.187-30.251 15.403-40.832 27.861-10.581 12.373-18.987 25.045-25.045 38.101-7.339 15.104-12.8 31.019-16.469 47.616v77.525h478.507l248.277-251.435z"],"attrs":[{},{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["a47_account"]},"attrs":[{},{}],"properties":{"order":49,"id":99,"name":"edituser","prevSize":32,"code":59661},"setIdx":0,"setId":1,"iconIdx":47},{"icon":{"paths":["M1004.032 673.835h-23.979c-10.965 0-22.699-8.661-25.941-19.157l-13.781-33.493c-5.12-9.6-3.029-23.979 4.693-31.659l17.024-17.067c7.851-7.765 7.851-20.48 0-28.245l-28.288-28.331c-7.808-7.765-20.48-7.765-28.331 0l-17.024 16.981c-7.723 7.851-22.101 9.899-31.744 4.736l-33.451-13.824c-10.411-3.243-19.115-14.933-19.115-25.899v-23.979c0-11.008-8.96-20.011-19.968-20.011h-40.021c-10.965 0-20.011 9.003-20.011 20.011v23.979c0 11.008-8.619 22.656-19.029 25.899l-33.536 13.824c-9.771 5.163-23.979 3.072-31.829-4.736l-17.024-16.981c-7.765-7.765-20.437-7.765-28.288 0l-28.203 28.331c-7.893 7.723-7.893 20.48 0 28.245l16.896 17.067c7.851 7.68 9.984 22.101 4.736 31.659l-13.739 33.579c-3.285 10.581-14.976 19.072-25.941 19.072h-23.979c-11.008 0-20.053 9.003-20.053 20.011v40.021c0 11.008 9.045 20.011 20.053 20.011h23.979c11.008 0 22.656 8.576 25.899 19.072l13.781 33.493c5.163 9.771 3.072 24.064-4.736 31.829l-16.939 16.896c-7.851 7.851-7.851 20.565 0 28.416l28.245 28.16c7.851 7.851 20.523 7.851 28.288 0l17.024-16.981c7.765-7.765 22.101-9.813 31.701-4.651l33.579 13.824c10.411 3.243 19.029 14.933 19.029 25.984v23.936c0 10.923 9.045 19.925 20.011 19.925h40.021c11.008 0 19.968-9.003 19.968-19.925v-23.936c0-11.093 8.704-22.741 19.115-25.984l33.579-13.824c9.643-5.163 23.979-3.072 31.787 4.651l16.896 16.981c7.851 7.851 20.523 7.851 28.331 0l28.288-28.16c7.851-7.851 7.851-20.565 0-28.416l-17.024-16.896c-7.765-7.765-9.813-22.101-4.693-31.829l13.781-33.493c3.243-10.496 15.019-19.072 25.941-19.072h23.979c10.965 0 19.968-9.003 19.968-20.011v-40.021c0.043-11.008-8.96-20.011-19.925-20.011zM864.128 713.813c0 55.168-44.8 99.925-100.011 99.925-55.253 0-100.053-44.757-100.053-99.925 0-55.253 44.8-100.011 100.053-100.011 55.211 0.043 100.011 44.8 100.011 100.011z","M461.312 692.821c0-73.899 37.547-139.008 94.549-177.451l0.171-0.128v-66.773c0-3.072 0.939-7.936 2.901-14.72 1.877-6.656 4.011-13.653 6.272-21.035 2.645-8.363 5.589-17.408 8.619-26.965 6.869-12.8 12.501-26.923 17.536-41.685 1.493 0.896 2.944 1.664 4.523 1.877 15.019 2.603 26.283-25.899 29.44-60.757 3.157-34.261 6.699-44.928-16.171-46.72 0-1.579 0.341-3.115 0.341-4.736 0-39.125-4.053-72.277-12.416-99.328-8.192-27.008-8.576-46.464-22.955-63.104-14.379-16.683-42.027-31.232-61.099-38.784-18.901-7.467-39.083-11.179-60.587-11.179-21.931 0-42.539 9.643-61.568 17.365-18.987 7.68-49.579 15.701-63.744 32.64-14.208 16.896-11.264 37.12-19.541 64-8.021 26.283-9.856 65.024-9.899 103.040-0.341 0-0.64 0-0.939 0-24.107 1.536-20.352 12.075-17.152 46.933 3.285 34.773 14.507 63.317 29.483 60.672 1.451-0.213 2.859-0.939 4.224-1.749 5.163 15.616 11.051 30.464 18.219 43.819 3.072 8.789 5.76 17.109 8.064 24.704 1.877 6.528 3.712 12.971 5.461 19.328 1.664 6.4 2.987 11.093 3.712 14.123v65.621c-11.904 5.419-25.685 11.52-41.429 18.475-15.744 6.869-32.427 14.123-50.133 21.888-17.536 7.723-35.328 15.317-53.163 22.997-17.835 7.765-34.816 14.933-51.029 21.675-16.085 6.571-30.635 12.587-43.691 17.749-13.013 5.12-23.552 9.045-31.659 11.733-15.744 5.76-28.544 14.507-38.528 26.24-9.984 11.648-17.92 23.595-23.595 35.925-6.912 14.165-12.075 29.227-15.531 44.971v73.003h494.293c-20.779-32.896-32.981-71.808-32.981-113.664z"],"attrs":[{},{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["a49_administrator"]},"attrs":[{},{}],"properties":{"order":27,"id":97,"name":"userconfig","prevSize":32,"code":59662},"setIdx":0,"setId":1,"iconIdx":49},{"icon":{"paths":["M984.704 433.195h-47.232c-21.675 0-44.757-16.939-51.115-37.589l-27.136-65.963c-10.112-19.029-6.016-47.275 9.216-62.549l33.621-33.536c15.317-15.36 15.317-40.405 0-55.68l-55.808-55.68c-15.275-15.36-40.363-15.36-55.723 0l-33.579 33.493c-15.275 15.317-43.52 19.499-62.635 9.216l-65.792-27.093c-20.651-6.443-37.675-29.397-37.675-51.115v-47.275c0.043-21.675-17.707-39.424-39.381-39.424h-78.848c-21.589 0-39.339 17.749-39.339 39.424v47.189c0 21.717-16.939 44.672-37.589 51.115l-65.877 27.136c-19.2 10.283-47.275 6.144-62.635-9.259l-33.579-33.451c-15.275-15.36-40.32-15.36-55.723 0l-55.552 55.68c-15.445 15.232-15.445 40.32 0 55.68l33.323 33.536c15.36 15.275 19.627 43.52 9.301 62.549l-27.051 66.005c-6.528 20.736-29.44 37.589-51.157 37.589h-47.275c-21.675 0-39.467 17.749-39.467 39.381v78.763c0 21.675 17.792 39.339 39.467 39.339h47.232c21.717 0.128 44.629 17.067 51.072 37.76l27.179 65.92c10.197 19.243 6.101 47.403-9.301 62.677l-33.451 33.493c-15.36 15.317-15.36 40.32 0 55.851l55.637 55.509c15.403 15.403 40.448 15.403 55.723 0l33.579-33.493c15.275-15.232 43.477-19.328 62.421-9.173l66.091 27.264c20.651 6.4 37.589 29.397 37.589 51.157v47.104c0 21.675 17.749 39.253 39.339 39.253h78.848c21.675 0 39.424-17.579 39.424-39.253v-47.104c0-21.76 16.981-44.757 37.675-51.157l66.005-27.264c19.029-10.155 47.232-6.101 62.677 9.173l33.323 33.493c15.317 15.403 40.405 15.403 55.723 0l55.808-55.509c15.317-15.488 15.317-40.491 0-55.851l-33.621-33.493c-15.189-15.232-19.328-43.435-9.216-62.677l27.136-65.92c6.357-20.651 29.525-37.632 51.115-37.632h47.232c21.632 0 39.296-17.707 39.296-39.339v-78.891c0-21.632-17.664-39.381-39.296-39.381zM709.077 512c0 108.672-88.149 196.779-196.821 196.779-108.885 0-197.12-88.064-197.12-196.779 0-108.8 88.192-196.992 197.12-196.992 108.672-0.043 196.821 88.192 196.821 196.992z"],"attrs":[{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["a51_options"]},"attrs":[{}],"properties":{"order":62,"id":95,"name":"options","prevSize":32,"code":59663},"setIdx":0,"setId":1,"iconIdx":51},{"icon":{"paths":["M512.043 0c-282.795 0-512.043 229.248-512.043 512s229.248 512 512.043 512c282.709 0 511.957-229.248 511.957-512s-229.248-512-511.957-512zM504.277 172.8c38.613 0 68.523 28.971 68.523 67.541 0 36.693-29.909 67.584-69.504 67.584-35.712 0-67.584-30.891-67.584-67.584 0.043-38.571 31.915-67.541 68.565-67.541zM635.563 807.083h-247.125v-30.933c55.979-6.741 61.781-10.667 61.781-79.147v-191.147c0-63.744-6.741-66.603-53.12-74.325v-27.989c57.899-6.784 121.643-19.328 175.701-34.731v328.235c0 66.645 4.779 71.424 62.763 79.147v30.891z"],"attrs":[{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["a53_info"]},"attrs":[{}],"properties":{"order":23,"id":93,"name":"info","prevSize":32,"code":59664},"setIdx":0,"setId":1,"iconIdx":53},{"icon":{"paths":["M512.085 0c-282.752 0-511.915 229.163-511.915 512.043 0 282.581 229.163 511.957 511.915 511.957s511.915-229.376 511.915-511.957c0-282.88-229.163-512.043-511.915-512.043zM585.429 859.691h-139.648v-134.955h139.648v134.955zM718.635 466.432c-11.776 16.811-34.517 38.272-68.053 64.469l-32.981 25.685c-18.048 13.995-29.952 30.379-35.925 49.024-3.755 11.819-5.76 30.208-6.059 55.125h-126.592c1.835-52.608 6.869-88.917 14.848-109.013 8.107-20.096 28.885-43.264 62.421-69.419l34.005-26.624c11.179-8.405 20.224-17.621 27.051-27.563 12.331-17.109 18.603-35.968 18.603-56.533 0-23.68-6.912-45.184-20.651-64.64-13.867-19.456-39.125-29.269-75.733-29.269-36.053 0-61.568 11.989-76.672 35.968-15.061 23.979-22.613 48.896-22.613 74.709h-134.997c3.755-88.661 34.731-151.552 92.928-188.629 36.736-23.68 81.92-35.499 135.509-35.499 70.357 0 128.853 16.853 175.36 50.432 46.549 33.664 69.845 83.499 69.845 149.461 0 40.491-10.155 74.581-30.293 102.315z"],"attrs":[{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["a55_help"]},"attrs":[{}],"properties":{"order":24,"id":91,"name":"help","prevSize":32,"code":59665},"setIdx":0,"setId":1,"iconIdx":55},{"icon":{"paths":["M938.112 228.267h-937.6l333.184 523.819v271.915h245.376v-273.067z","M0 0h938.667v183.424h-938.667v-183.424z"],"attrs":[{},{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["a59_filter"]},"attrs":[{},{}],"properties":{"order":30,"id":87,"name":"filter","prevSize":32,"code":59666},"setIdx":0,"setId":1,"iconIdx":59},{"icon":{"paths":["M973.397 162.731h-922.837c-27.947 0-50.56 22.699-50.56 50.603v455.083c0 27.904 22.613 50.603 50.56 50.603h108.885v245.675h700.032v-245.675h113.963c27.861 0 50.56-22.656 50.56-50.603v-455.083c-0.043-27.904-22.699-50.603-50.603-50.603zM816.811 921.984h-614.699v-467.925h614.699v467.925z","M263.125 0h497.664v105.643h-497.664v-105.643z"],"attrs":[{},{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["a61_print"]},"attrs":[{},{}],"properties":{"order":29,"id":85,"name":"print","prevSize":32,"code":59667},"setIdx":0,"setId":1,"iconIdx":61},{"icon":{"paths":["M1024 818.944l-359.893-278.741 359.893-352.896z","M0 171.989l375.211 363.136-375.211 308.907z","M580.267 633.344c-21.333 21.035-69.12 21.035-98.603-6.997l-70.997-55.765-378.667 301.568 992-1.067-380.16-290.389-63.573 52.651z","M1005.227 147.243l-422.229 413.227c-28.075 24.149-73.771 24.149-102.101 0l-448.896-412.459 973.227-0.768z"],"attrs":[{},{},{},{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["a63_email"]},"attrs":[{},{},{},{}],"properties":{"order":28,"id":83,"name":"email","prevSize":32,"code":59668},"setIdx":0,"setId":1,"iconIdx":63},{"icon":{"paths":["M1024 738.603l-259.072-127.061c0 0-95.317 141.696-117.291 136.875-12.245-2.731-13.909-3.072-24.491-7.339-38.016-15.232-132.395-58.581-221.227-138.923l-0.725 0.853c-87.765-79.701-140.032-168.107-158.848-204.075-5.291-9.941-5.888-11.691-9.856-23.552-7.125-21.376 124.117-130.688 124.117-130.688l-152.96-244.693c0 0-202.795 15.744-203.648 217.515-1.109 275.328 239.403 501.589 239.403 501.589 130.816 119.979 325.803 272.683 589.056 244.48 200.661-21.504 195.541-224.981 195.541-224.981z"],"attrs":[{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["a65_phone"]},"attrs":[{}],"properties":{"order":53,"id":81,"name":"phone","prevSize":32,"code":59669},"setIdx":0,"setId":1,"iconIdx":65},{"icon":{"paths":["M726.955 780.971c0 49.365-40.149 89.429-89.557 89.429h-547.968c-49.408-0.043-89.429-40.064-89.429-89.429v-530.603c0-49.365 40.021-89.472 89.429-89.472h547.968c49.365 0 89.557 40.107 89.557 89.472v530.603z","M786.389 356.949v334.848l237.611 183.723v-702.251z"],"attrs":[{},{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["a67_video"]},"attrs":[{},{}],"properties":{"order":55,"id":79,"name":"video","prevSize":32,"code":59670},"setIdx":0,"setId":1,"iconIdx":67},{"icon":{"paths":["M512.043 0c-282.709 0-512.043 229.248-512.043 512s229.291 512 512 512c282.709 0 512-229.248 512-512s-229.248-512-511.957-512zM470.229 584.192c0 0-158.677-36.693-189.568-98.603-62.208-124.715-69.589-100.608-77.227-139.221-7.893-38.656 3.797-117.973 3.797-117.973s-1.92 15.488 75.307-84.992c54.997-71.296 183.509-45.909 228.181-30.891 18.517 6.101-79.189 0-83.2 52.224-3.797 52.096 7.893 44.501 52.309 56.021 44.587 11.52 42.581-90.965 42.581-90.965l67.627 40.619 25.216 25.216c0 0 6.997 62.635-15.616 90.88-25.771 32.384-60.416 32.085-65.579 88.875-3.84 41.515 3.797 110.208 3.797 110.208s-8.789 11.392-21.291 1.877c-17.707-13.397-36.608-36.48-50.219-63.744-23.168-46.464-90.88-13.525-92.8-7.765-37.376 112.256 98.603 135.296 98.603 135.296l-1.92 32.939zM530.048 970.923c7.808-30.933 85.205-100.608 69.589-131.499-15.36-30.933-46.293-30.933-77.227-54.187-31.019-23.168-33.579-95.317 15.403-139.179 46.507-41.6 100.608-46.379 100.608-46.379s100.48 30.891 131.371 38.571c31.019 7.808 100.608-15.36 100.608 38.699 0.043 201.259-347.989 324.949-340.352 293.973z"],"attrs":[{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["a69_url"]},"attrs":[{}],"properties":{"order":61,"id":77,"name":"website","prevSize":32,"code":59671},"setIdx":0,"setId":1,"iconIdx":69},{"icon":{"paths":["M107.093 711.125l214.827 199.979 512.683-520.96-214.699-199.893-512.811 520.875zM994.603 101.589l-81.664-75.947c-38.059-35.413-98.091-33.963-134.229 3.029l-102.357 104.875 219.136 203.819 102.229-104.704c36.224-37.12 34.816-95.787-3.115-131.072zM0.299 1024l268.459-58.24-210.133-195.584-58.325 253.824z"],"attrs":[{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["a71_edit"]},"attrs":[{}],"properties":{"order":37,"id":75,"name":"edit","prevSize":32,"code":59672},"setIdx":0,"setId":1,"iconIdx":71},{"icon":{"paths":["M940.459 348.501h-344.96v-344.917z","M496.555 646.485c-13.995 0-22.997 1.237-28.331 2.432v180.907c5.333 1.28 13.952 1.28 21.717 1.28 56.661 0.384 93.525-30.805 93.525-96.853 0.512-57.429-33.152-87.765-86.912-87.765z","M254.805 645.675c-12.715 0-21.376 1.195-25.899 2.432v81.707c5.333 1.152 11.904 1.621 20.949 1.621 33.237 0 53.717-16.853 53.717-45.184-0.043-25.429-17.664-40.576-48.768-40.576z","M506.624 425.771v-425.771h-428.416v1024h862.251l1.408-598.229h-435.243zM340.096 750.251c-21.333 20.139-52.907 29.141-89.813 29.141-8.192 0-15.616-0.384-21.376-1.237v98.859h-61.909v-272.811c19.328-3.285 46.336-5.76 84.48-5.76 38.528 0 66.091 7.424 84.48 22.229 17.707 13.909 29.525 36.864 29.525 63.957s-8.96 50.048-25.387 65.621zM604.075 844.203c-29.227 24.192-73.515 35.712-127.659 35.712-32.384 0-55.381-2.048-70.955-4.139v-271.573c22.912-3.712 52.864-5.76 84.437-5.76 52.48 0 86.656 9.472 113.28 29.568 28.715 21.291 46.763 55.339 46.763 104.192 0 52.949-19.328 89.429-45.867 112zM860.245 651.733h-106.24v63.189h99.243v50.901h-99.243v111.104h-62.763v-276.48h169.003v51.285z"],"attrs":[{},{},{},{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["a77_PDF"]},"attrs":[{},{},{},{}],"properties":{"order":31,"id":69,"name":"pdf","prevSize":32,"code":59673},"setIdx":0,"setId":1,"iconIdx":77},{"icon":{"paths":["M5.461 0h1018.539v170.325h-1018.539v-170.325z","M276.779 275.669h747.221v170.325h-747.221v-170.325z","M277.035 559.531h746.965v170.283h-746.965v-170.283z","M7.125 836.352h1016.875v170.325h-1016.875v-170.325z"],"attrs":[{},{},{},{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["a81_report"]},"attrs":[{},{},{},{}],"properties":{"order":47,"id":65,"name":"categories","prevSize":32,"code":59674},"setIdx":0,"setId":1,"iconIdx":81},{"icon":{"paths":["M169.813 169.728l598.997 0.811-1.408-170.539h-767.403v767.403h169.813z","M224.64 224.64v799.36h799.36v-799.36h-799.36zM928.896 670.251h-258.645v258.603h-85.333v-258.603h-258.603v-85.333h258.603v-258.645h85.333v258.645h258.645v85.333z"],"attrs":[{},{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["a87_duplicate"]},"attrs":[{},{}],"properties":{"order":32,"id":59,"name":"duplicate","prevSize":32,"code":59675},"setIdx":0,"setId":1,"iconIdx":87},{"icon":{"paths":["M1024 886.016l-275.499-275.499c89.685-152.917 67.328-355.541-66.731-489.6-158.336-158.464-413.056-161.536-567.765-6.827-154.624 154.624-151.595 409.344 6.827 567.808 137.984 137.899 348.8 157.909 503.083 58.88l271.829 273.493 128.256-128.256zM205.525 597.248c-110.507-110.677-112.683-288.469-4.736-396.416 107.904-107.989 285.824-105.813 396.373 4.736 110.507 110.507 112.683 288.384 4.651 396.288-107.947 108.032-285.653 105.856-396.288-4.608z"],"attrs":[{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["a89_find"]},"attrs":[{}],"properties":{"order":58,"id":57,"name":"search","prevSize":32,"code":59676},"setIdx":0,"setId":1,"iconIdx":89},{"icon":{"paths":["M0 88.832v834.389h1024v-834.389h-1024zM296.96 214.229c70.571 0 127.701 57.173 127.701 127.701s-57.131 127.744-127.701 127.744c-70.443 0-127.659-57.173-127.659-127.744s57.216-127.701 127.659-127.701zM100.437 812.331l241.024-226.987 82.133 16.896 120.533-98.261 82.091 111.872 153.344-213.419 153.6 409.941h-832.725z"],"attrs":[{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["a91_image"]},"attrs":[{}],"properties":{"order":57,"id":55,"name":"image","prevSize":32,"code":59677},"setIdx":0,"setId":1,"iconIdx":91},{"icon":{"paths":["M907.563 0l-578.432 171.989v586.539c-38.528-13.44-86.101-13.781-133.248 2.859-90.88 32.085-144.853 114.005-120.533 182.997 24.32 68.907 117.76 98.816 208.683 66.688 73.941-26.069 122.667-85.035 125.483-143.232h0.256v-5.931c0-3.072 0.299-6.144 0-9.216v-508.544l416.939-123.989v404.864c-38.613-13.696-86.4-14.165-133.888 2.603-90.923 32.085-144.896 114.005-120.533 182.955 24.32 68.949 117.717 98.859 208.725 66.773 74.155-26.24 123.008-85.675 125.44-144.085h0.981v-733.269z"],"attrs":[{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["a93_music"]},"attrs":[{}],"properties":{"order":36,"id":53,"name":"music","prevSize":32,"code":59678},"setIdx":0,"setId":1,"iconIdx":93},{"icon":{"paths":["M507.349 0c-206.592 0-374.016 167.424-374.016 374.016 0 206.549 374.016 649.984 374.016 649.984s374.016-443.435 374.016-649.984c0-206.592-167.424-374.016-374.016-374.016zM510.635 565.248c-102.827 0-186.112-83.413-186.112-186.24s83.285-186.155 186.112-186.155c102.869 0 186.24 83.371 186.24 186.155 0 102.827-83.371 186.24-186.24 186.24z"],"attrs":[{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["a97_location"]},"attrs":[{}],"properties":{"order":34,"id":49,"name":"location","prevSize":32,"code":59679},"setIdx":0,"setId":1,"iconIdx":97},{"icon":{"paths":["M512 405.888c-84.779 0-153.771 69.035-153.771 153.771 0 84.907 68.992 153.899 153.771 153.899 84.821 0 153.899-68.992 153.899-153.899 0-84.736-69.077-153.771-153.899-153.771z","M913.237 206.208h-138.325v-9.131c0-40.789-32.981-73.856-73.813-73.856h-378.197c-40.747 0-73.813 33.109-73.813 73.856v9.131h-138.368c-61.056 0-110.72 49.579-110.72 110.763v467.029c0 61.056 49.664 110.677 110.72 110.677h802.56c61.184 0 110.763-49.621 110.763-110.677v-467.029c-0.043-61.184-49.621-110.763-110.805-110.763zM512 797.995c-131.371 0-238.165-106.965-238.165-238.336 0-131.328 106.795-238.208 238.165-238.208 131.413 0 238.251 106.88 238.251 238.208 0 131.371-106.837 238.336-238.251 238.336z"],"attrs":[{},{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["a101_camera"]},"attrs":[{},{}],"properties":{"order":59,"id":45,"name":"camera","prevSize":32,"code":59680},"setIdx":0,"setId":1,"iconIdx":101},{"icon":{"paths":["M1024 653.44l-108.971-210.859-206.208 106.581 120.277 38.869c-37.803 144.64-169.088 251.861-325.419 251.861-101.248 0-196.139-44.971-260.437-123.307l-69.376 56.96c81.408 99.243 201.643 156.117 329.813 156.117 191.019 0 356.309-132.608 410.453-306.048l109.867 29.824z","M194.859 441.472c37.717-144.597 169.045-251.819 325.376-251.819 101.205 0 196.139 44.928 260.437 123.307l69.419-56.96c-81.408-99.243-201.643-156.117-329.813-156.117-190.976 0-352.725 135.296-406.912 308.651l-113.365-32.427 108.971 210.859 206.165-106.581-120.277-38.912z"],"attrs":[{},{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["a125_sync"]},"attrs":[{},{}],"properties":{"order":44,"id":21,"name":"sync","prevSize":32,"code":59681},"setIdx":0,"setId":1,"iconIdx":125},{"icon":{"paths":["M429.099 89.259h165.803v194.688h-165.803v-194.688z","M679.552 219.52v140.501h-331.733v-140.501h-347.819v722.261h1024v-722.261h-344.448zM454.699 806.997h-352.469v-332.544h352.469v332.544zM928.597 801.408h-378.795v-86.485h378.795v86.485zM928.597 561.92h-378.795v-86.528h378.795v86.528z"],"attrs":[{},{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["a129_badge"]},"attrs":[{},{}],"properties":{"order":69,"id":17,"name":"badge","prevSize":32,"code":59682},"setIdx":0,"setId":1,"iconIdx":129},{"icon":{"paths":["M225.963 88.704l-208.853-46.037-17.109 77.611 164.693 36.309 200.448 647.723h643.243v-79.573h-585.856z","M514.645 939.819c0 46.492-37.689 84.181-84.181 84.181s-84.181-37.689-84.181-84.181c0-46.492 37.689-84.181 84.181-84.181s84.181 37.689 84.181 84.181z","M979.371 939.819c0 46.492-37.689 84.181-84.181 84.181s-84.181-37.689-84.181-84.181c0-46.492 37.689-84.181 84.181-84.181s84.181 37.689 84.181 84.181z","M976.853 643.371l47.147-415.829h-653.355l117.76 415.829z"],"attrs":[{},{},{},{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["a133_cart"]},"attrs":[{},{},{},{}],"properties":{"order":33,"id":13,"name":"cart","prevSize":32,"code":59683},"setIdx":0,"setId":1,"iconIdx":133},{"icon":{"paths":["M876.885 569.003v408.491h-249.515v-308.139h-236.757v308.139h-252.416v-408.491l369.707-397.312z","M1024 552.448l-512.981-552.448-194.048 208.299v-72.192c0-4.523-3.413-8.149-7.595-8.149h-106.411c-4.224 0-7.595 3.584-7.595 8.149l0.299 202.581-195.669 210.176 33.024 35.499 477.952-513.365 480.085 516.821 32.939-35.371z"],"attrs":[{},{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["a135_home"]},"attrs":[{},{}],"properties":{"order":40,"id":11,"name":"home","prevSize":32,"code":59684},"setIdx":0,"setId":1,"iconIdx":135},{"icon":{"paths":["M1001.173 785.877l-384.981-666.88c-26.709-46.293-63.659-71.808-104.021-71.808s-77.312 25.472-104.064 71.765l-385.024 666.923c-26.709 46.293-30.336 91.051-10.155 125.952 20.181 34.944 60.715 54.229 114.176 54.229h770.048c53.461 0 93.995-19.243 114.176-54.187 20.139-34.944 16.555-79.701-10.155-125.995zM514.645 880.597c-35.797 0-64.768-28.971-64.768-64.811 0-35.669 28.971-64.683 64.768-64.683 35.755 0 64.768 29.013 64.768 64.683-0.043 35.84-29.056 64.811-64.768 64.811zM604.459 311.467c0 0-35.712 354.901-35.712 355.456l-0.043 0.555h-0.043c-1.28 26.155-25.557 47.061-55.424 47.061-30.848 0-55.765-22.101-55.765-49.195 0-0.811-33.536-353.92-33.536-353.92v-0.128c0-49.835 40.363-90.283 90.24-90.283 49.792 0 90.24 40.448 90.24 90.283 0.043 0.085 0.043 0.128 0.043 0.171z"],"attrs":[{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["a141_alert"]},"attrs":[{}],"properties":{"order":39,"id":5,"name":"alert","prevSize":32,"code":59685},"setIdx":0,"setId":1,"iconIdx":141},{"icon":{"paths":["M899.755 172.203c0 95.105-176.87 172.203-395.051 172.203s-395.051-77.098-395.051-172.203c0-95.105 176.87-172.203 395.051-172.203s395.051 77.098 395.051 172.203z","M899.328 239.061h-0.085c0-0.341 0.085-0.725 0.085-0.981 0-1.493-0.341-2.944-0.427-4.395-15.019 89.088-185.259 159.488-393.643 159.488-214.741 0-389.077-74.709-394.539-167.723-0.64 4.181-0.725 17.877-0.512 20.608v150.827c-0.128 1.835-0.597 3.499-0.597 5.419 0 95.061 176.896 172.117 395.051 172.117 215.936 0 391.083-75.52 394.667-169.301v-0.043c0-0.853 0.341-1.835 0.341-2.731 0-0.981-0.341-1.963-0.341-2.901v-160.384z","M899.328 462.421h-0.085c0-0.299 0.085-0.683 0.085-0.981 0-1.451-0.341-2.944-0.427-4.395-15.019 89.088-185.259 159.488-393.685 159.488-214.699 0-389.035-74.667-394.496-167.68-0.64 4.181-0.768 17.877-0.555 20.565v150.827c-0.085 1.835-0.597 3.584-0.597 5.419 0 95.104 176.896 172.245 395.051 172.245 215.893 0 391.125-75.648 394.667-169.429v0c0-0.896 0.341-1.92 0.341-2.816 0-0.981-0.341-1.92-0.341-2.816v-160.427z","M899.328 688.512h-0.085c0-0.256 0.085-0.683 0.085-0.981 0-1.408-0.341-2.901-0.427-4.437-15.019 89.173-185.259 159.488-393.643 159.488-214.741 0-389.035-74.667-394.539-167.68-0.64 4.181-0.768 17.92-0.512 20.565v150.912c-0.128 1.749-0.597 3.499-0.597 5.333 0 95.104 176.896 172.245 395.051 172.245 215.893 0 391.125-75.563 394.667-169.344v-0.085c0-0.896 0.427-1.92 0.427-2.816s-0.427-1.835-0.427-2.816v-160.384z"],"attrs":[{},{},{},{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["a145_host"]},"attrs":[{},{},{},{}],"properties":{"order":42,"id":1,"name":"dataset","prevSize":32,"code":59686},"setIdx":0,"setId":1,"iconIdx":145},{"icon":{"paths":["M388.095 0h247.869v388.114h388.114v247.869h-388.114v388.075h-247.869v-388.075h-388.095v-247.869h388.095z"],"attrs":[{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["Add_New"]},"attrs":[{}],"properties":{"order":9,"id":750,"name":"new","prevSize":32,"code":59687},"setIdx":1,"setId":0,"iconIdx":4},{"icon":{"paths":["M200.571 796.931c-65.7 20.885-113.75 73.848-130.451 94.215 0.202-3.96-6.842 8.705-6.842 8.705s2.706-3.609 6.842-8.705c-0.062 1.554-1.135 5.38-4.261 13.7-11.29 29.974 23.636 29.205 23.636 29.205 99.024-16.106 111.076-137.121 111.076-137.121zM767.851 694.951c-18.402-0.001-29.754 1.181-29.754 1.181 105.384 92.26 203.398 70.757 203.398 70.757 40.12-5.38-21.102-42.521-21.102-42.521-56.586-25.098-117.411-29.415-152.542-29.417zM407.732 445.851c0 0-38.052 198.070-85.604 256.815l263.733-42.154c0 0-131.431-126.545-178.128-214.661zM413.841 80.012c-0.327-0.031-0.655-0.025-0.984 0.018-2.95 0.391-5.989 3.865-8.935 12.118 0 0-14.213 73.113 21.382 194.629 0 0 30.308-96.404 7.495-170.219 0-0-8.827-35.592-18.958-36.546zM380.637 0.017c28.069-1.161 53.374 56.91 53.374 56.91 78.685 180.728 4.276 296.195 4.276 296.195 77.907 197.402 234.047 302.811 234.047 302.811 151.708-8.755 262.38 32.43 262.38 32.43 87.066 49.221 57.909 95.201 57.909 95.201-91.233 109.402-359.227-61.184-359.227-61.184l-345.434 62.554c-49.916 183.551-216.724 226.674-216.724 226.674-79.509 12.464-68.639-76.672-68.639-76.672 62.061-146.761 218.123-180.527 218.123-180.527 61.47-70.59 161.941-402.39 161.941-402.39-101.512-245.186-30.183-326.754-30.183-326.754 9.136-17.894 18.799-24.862 28.156-25.249z"],"attrs":[{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["Adobe_Acrobat"]},"attrs":[{}],"properties":{"order":13,"id":749,"name":"acrobat","prevSize":32,"code":59688},"setIdx":1,"setId":0,"iconIdx":5},{"icon":{"paths":["M167.399 677.842h323.415c0 0 5.916 31.909 7.353 37.842h-330.768c-8.671 0-15.672-7.017-15.672-15.688v-6.483c0-8.652 7.001-15.67 15.672-15.67zM166.669 556.899h286.113c0.132 1.774 0.017 3.559-0.635 5.28l-12.548 32.574h-272.93c-8.657 0-15.674-7.020-15.674-15.692v-6.469c0-8.674 7.018-15.694 15.674-15.694zM164.498 438.164h277.904l3.993 8.972c1.888 4.295 0.969 9.356-2.323 12.716l-16.156 16.154h-263.419c-8.654 0-15.671-7.016-15.671-15.687v-6.482c0-8.653 7.018-15.672 15.671-15.672zM742.87 333.929c-99.615 0-180.35 80.744-180.35 180.355 0 99.603 80.734 180.406 180.35 180.406 99.632 0 180.386-80.803 180.386-180.406 0-99.611-80.754-180.355-180.386-180.355zM163.987 320.635h326.827v33.951c0 1.354-0.266 2.641-0.701 3.878h-326.127c-8.672 0-15.674-7.018-15.674-15.674v-6.483c0-8.672 7.001-15.672 15.674-15.672zM742.875 236.316c3.759 0 7.519 1.433 10.393 4.299l28.972 28.939c3.14 3.158 7.869 4.042 11.913 2.239l37.526-16.592c7.435-3.325 16.073 0.082 19.366 7.485l19.533 44.028c1.802 4.042 5.862 6.7 10.325 6.7h48.152c8.106 0 14.672 6.549 14.672 14.686v41.002c0 4.444 2.755 8.405 6.865 9.992l38.264 14.768c7.585 2.91 11.36 11.448 8.437 18.999l-17.345 44.912c-1.619 4.176-0.617 8.922 2.541 12.079l34.069 34.019c5.747 5.749 5.747 15.071 0 20.819l-29.005 28.972c-3.109 3.108-4.010 7.853-2.206 11.897l16.592 37.477c3.291 7.47-0.050 16.124-7.486 19.415l-43.993 19.515c-4.077 1.805-6.732 5.884-6.732 10.343v48.088c0 8.152-6.566 14.753-14.672 14.753h-1.653l94.603 227.368c2.038 4.911-2.941 9.792-7.803 7.617l-110.426-48.72c-3.726-1.637-8.021 0.099-9.523 3.827l-45.115 109.69c-2.054 5.047-9.154 5.047-11.261 0.050l-91.812-220.185c-0.382-0.984-0.484-2.036-0.717-3.005-1.989 0.284-3.96 0.25-5.933-0.235l-91.844 220.601c-2.089 4.981-9.207 4.981-11.245-0.032l-45.129-109.69c-1.537-3.71-5.833-5.514-9.557-3.845l-110.424 48.722c-4.88 2.155-9.843-2.723-7.822-7.6l93.452-224.563h-0.135c-8.103 0-14.687-6.601-14.687-14.753v-40.97c0-4.428-2.738-8.422-6.866-9.974l-38.228-14.786c-7.602-2.909-11.363-11.43-8.454-18.981l17.327-44.947c1.586-4.159 0.583-8.871-2.559-12.029l-34.051-34.019c-5.714-5.747-5.714-15.070 0-20.819l29.040-29.006c3.090-3.125 3.959-7.903 2.188-11.913l-16.624-37.493c-3.276-7.403 0.049-16.108 7.467-19.415l44.060-19.465c4.078-1.805 6.7-5.848 6.7-10.311v-48.17c0-8.137 6.584-14.686 14.687-14.686h41.002c4.396 0 8.39-2.742 9.96-6.884l14.767-38.246c2.924-7.552 11.447-11.328 19.031-8.42l44.93 17.309c4.178 1.654 8.922 0.62 12.080-2.522l34.002-34.036c2.874-2.866 6.633-4.299 10.392-4.299zM163.837 188.247h206.951c8.672 0 15.689 6.999 15.689 15.672v6.483c0 8.673-7.017 15.674-15.689 15.674h-206.951c-8.672 0-15.691-7.002-15.691-15.674v-6.483c0-8.673 7.019-15.672 15.691-15.672zM26.215 4.042h721.289c14.469 0 26.233 11.762 26.233 26.214v178.013l-15.84-15.805c-3.942-3.927-9.156-6.099-14.72-6.099s-10.778 2.172-14.72 6.081l-22.858 22.891v-122.357c0-11.462-9.34-20.785-20.819-20.785h-595.842c-11.462 0-20.784 9.323-20.784 20.785v752.636c-0 11.478 9.322 20.801 20.784 20.801h353.1l-28.353 68.155h-387.471c-14.452 0-26.215-11.765-26.215-26.233v-878.084c0-14.452 11.763-26.214 26.215-26.214z"],"attrs":[{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["Agreement_01"]},"attrs":[{}],"properties":{"order":6,"id":745,"name":"agreement","prevSize":32,"code":59689},"setIdx":1,"setId":0,"iconIdx":9},{"icon":{"paths":["M694.258 599.428c45.741 0 82.948 37.172 82.948 82.93 0 45.74-37.206 82.914-82.948 82.914-45.759 0-82.948-37.173-82.948-82.914 0-45.758 37.188-82.93 82.948-82.93zM694.249 579.495c-56.717 0-102.862 46.13-102.862 102.864 0 56.684 46.146 102.846 102.862 102.846 56.701 0 102.844-46.162 102.844-102.846 0-56.734-46.143-102.864-102.844-102.864zM694.249 555.455c70.032 0 126.851 56.82 126.851 126.904 0 41.364-19.832 78.082-50.455 101.248-2.643 2.003-3.333 5.657-1.767 8.603l43.586 80.843c1.97 3.653-1.65 7.829-5.557 6.379l-32.137-11.886c-3.113-1.162-6.581 0.387-7.809 3.487l-12.578 31.832c-1.716 4.396-7.812 4.733-10.034 0.573l-47.289-88.938c-1.196-2.241-4.428-2.241-5.64 0l-47.289 88.938c-2.239 4.161-8.317 3.823-10.050-0.573l-12.561-31.832c-1.227-3.1-4.696-4.649-7.829-3.487l-32.105 11.886c-3.921 1.449-7.542-2.727-5.571-6.379l43.568-80.843c1.583-2.947 0.893-6.6-1.749-8.603-30.64-23.166-50.472-59.884-50.472-101.248 0-70.084 56.803-126.904 126.886-126.904zM269.891 450.612h486.196c9.528 0 17.24 7.707 17.24 17.236v7.12c-0 9.527-7.712 17.237-17.24 17.237h-486.196c-9.53 0-17.24-7.71-17.24-17.237v-7.12c0-9.529 7.71-17.236 17.24-17.236zM267.499 354.521h486.196c9.532 0 17.24 7.712 17.24 17.243v7.123c0 9.529-7.708 17.241-17.24 17.241h-486.196c-9.529 0-17.24-7.712-17.24-17.241v-7.123c0-9.53 7.711-17.243 17.24-17.243zM266.942 259.775h486.198c9.528 0 17.239 7.713 17.239 17.242v7.124c0 9.53-7.711 17.241-17.239 17.241h-486.198c-9.53 0-17.239-7.711-17.239-17.241v-7.124c0-9.529 7.708-17.242 17.239-17.242zM266.775 165.96h193.064c9.53 0 17.239 7.709 17.239 17.237v7.12c0 9.528-7.708 17.237-17.239 17.237h-193.064c-9.529 0-17.24-7.709-17.24-17.237v-7.12c0-9.528 7.711-17.237 17.24-17.237zM184.438 75.858c-12.355 0-22.407 10.050-22.407 22.407v827.471c0 12.356 10.053 22.406 22.407 22.406h655.085c12.357 0 22.409-10.050 22.409-22.406v-827.471c0-12.356-10.053-22.407-22.409-22.407zM115.481 0h792.997c16.162 0 29.309 13.148 29.309 29.309v965.38c0 16.162-13.148 29.311-29.309 29.311h-792.997c-16.162 0-29.308-13.149-29.308-29.311v-965.38c0-16.162 13.146-29.309 29.308-29.309z"],"attrs":[{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["Agreement_02"]},"attrs":[{}],"properties":{"order":7,"id":744,"name":"agreement2","prevSize":32,"code":59690},"setIdx":1,"setId":0,"iconIdx":10},{"icon":{"paths":["M675.041 775.84c54.269 0 98.415 45.251 98.415 100.877 0 55.616-44.146 100.867-98.415 100.867-54.301 0-98.497-45.251-98.497-100.867 0-55.626 44.196-100.877 98.497-100.877zM201.965 775.84c54.274 0 98.419 45.251 98.419 100.877 0 55.616-44.145 100.867-98.419 100.867-54.24 0-98.365-45.251-98.365-100.867-0-55.626 44.124-100.877 98.365-100.877zM675.23 494.43c-19.584 0-36.136 14.043-39.354 33.374l-13.231 79.96c-1.467 8.79 1.054 17.789 6.886 24.654 6.219 7.354 15.418 11.573 25.218 11.573h5.022c19.282 0 36.188-12.792 41.125-31.114l2.904-10.854c5.243-19.261 11.794-43.469 18.96-72.074 2.094-8.397 0.23-17.166-5.134-24.043-5.614-7.186-14.447-11.477-23.69-11.477zM514.384 494.43c-19.383 0-35.165 15.77-35.165 35.146v84.115c0 16.707 13.73 30.301 30.573 30.301 16.635 0 30.709-12.021 33.448-28.592l14.042-84.752c1.499-9.042-1.051-18.238-6.958-25.229-5.949-6.981-14.605-10.989-23.762-10.989zM354.736 494.43c-9.155 0-17.821 4.008-23.759 10.989-5.906 6.99-8.458 16.187-6.958 25.219l13.915 84.749c2.742 16.574 16.835 28.605 33.511 28.605 16.824 0 30.533-13.605 30.533-30.323v-84.093c0-19.376-15.781-35.146-35.165-35.146zM183.028 494.43c-9.144 0-17.626 4.125-23.237 11.342-5.605 7.178-7.564 16.376-5.334 25.21 7.123 28.418 13.644 52.49 18.822 71.603l2.363 8.782c5.168 19.208 21.688 32.624 40.149 32.624h13.040c8.73 0 17.011-3.843 22.707-10.562 5.981-7.062 8.542-16.419 7.013-25.666l-13.232-79.96c-3.208-19.331-19.747-33.374-39.354-33.374zM710.22 272.137c-19.227 0-35.48 14.030-38.685 33.376l-12.094 73.25c-1.491 9.042 1.042 18.248 6.968 25.229 5.936 6.978 14.584 10.99 23.739 10.99h27.104c19.458 0 36.325-12.854 40.991-31.261 5.333-21.146 10.406-39.822 14.895-56.387l4.877-18.102c2.363-8.802 0.499-18.010-5.074-25.283-5.781-7.499-14.562-11.811-24.093-11.811zM513.864 272.137c-19.093 0-34.645 15.771-34.645 35.157v72.543c0 19.374 15.783 35.146 35.165 35.146h26.981c19.603 0 36.157-14.032 39.365-33.346l12.187-73.269c1.467-8.875-1.030-17.907-6.875-24.79-6.155-7.274-15.227-11.44-24.875-11.44zM320.135 272.137c-9.637 0-18.688 4.166-24.856 11.44-5.843 6.883-8.365 15.934-6.874 24.79l12.197 73.269c3.19 19.314 19.751 33.346 39.367 33.346h26.845c19.384 0 35.165-15.771 35.165-35.146v-72.543c0-19.386-15.512-35.157-34.573-35.157zM127.082 272.137c-9.326 0-18.211 4.342-23.793 11.616-5.302 6.906-7.073 15.654-4.824 24.019l5.333 19.75c4.398 16.208 9.366 34.45 14.595 55.032 4.874 19.093 21.854 32.427 41.304 32.427h31.469c9.174 0 17.832-4.013 23.759-10.99 5.928-6.981 8.459-16.187 6.979-25.229l-12.134-73.25c-3.178-19.346-20-33.376-39.97-33.376zM890.503 46.48l99.273 0.344c18.875 0.043 34.24 15.459 34.24 34.323s-15.344 34.198-34.199 34.198h-54.24c-19.595 0-36.532 13.293-41.208 32.314l-130.064 531.104c-6.438 26.291-29.824 44.645-56.885 44.645h-537.891c-27.083 0-50.594-18.342-57.178-44.615l-111.365-445.646c-2.447-9.792-0.282-19.96 5.896-27.906 6.219-7.938 15.563-12.491 25.656-12.491h741.183c19.563 0 36.594-13.217 41.439-32.154l17.875-69.688c6.707-26.158 30.259-44.428 57.468-44.428z"],"attrs":[{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["Basket"]},"attrs":[{}],"properties":{"order":8,"id":719,"name":"shop","prevSize":32,"code":59691},"setIdx":1,"setId":0,"iconIdx":35},{"icon":{"paths":["M559.767 776.041h125.060v121.123h-125.060zM365.241 776.041h125.012v121.123h-125.012zM170.715 776.041h125.060v121.123h-125.060zM744.356 585.547h125.059v121.075h-125.059zM559.767 585.547h125.060v121.075h-125.060zM365.241 585.547h125.012v121.075h-125.012zM170.715 585.547h125.060v121.075h-125.060zM744.356 391.021h125.059v121.075h-125.059zM549.83 391.021h125.059v121.075h-125.059zM355.304 391.021h125.060v121.075h-125.060zM92.933 263.979v702.974h838.384v-702.974zM35.766 0h952.709v1024.144h-952.709z"],"attrs":[{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["Calendar__02"]},"attrs":[{}],"properties":{"order":10,"id":679,"name":"calendar","prevSize":32,"code":59692},"setIdx":1,"setId":0,"iconIdx":75},{"icon":{"paths":["M850.469 602.208c5.223 0 9.821 3.31 11.443 8.26l35.206 108.297h113.85c5.223 0 9.833 3.374 11.423 8.322 1.627 4.951-0.146 10.38-4.337 13.433l-92.14 66.94 35.206 108.297c1.607 4.916-0.16 10.348-4.371 13.433-2.105 1.543-4.611 2.28-7.069 2.28-2.473 0-4.949-0.738-7.071-2.28l-92.14-66.94-92.123 66.94c-2.123 1.543-4.581 2.28-7.054 2.28-2.488 0-4.981-0.738-7.086-2.28-4.208-3.085-5.975-8.517-4.354-13.433l35.189-108.297-92.123-66.94c-4.226-3.053-5.975-8.483-4.386-13.433 1.622-4.948 6.237-8.322 11.455-8.322h113.867l35.189-108.297c1.609-4.951 6.22-8.26 11.425-8.26zM361.71 459.578c14.748 0 28.373 3.181 40.826 9.48 12.45 6.363 21.964 15.040 28.533 25.966 6.621 10.99 9.916 22.624 9.916 34.932 0 11.664-3.149 22.365-9.403 31.973-6.281 9.578-15.631 17.227-27.939 22.881 16.019 3.697 28.469 11.378 37.341 22.977 8.884 11.666 13.287 26.255 13.287 43.738 0 23.651-8.628 43.64-25.871 60.158-17.238 16.452-39.042 24.614-65.391 24.614-23.748 0-43.479-7.068-59.206-21.24-15.713-14.206-24.679-32.585-26.912-55.145l33.259-4.371c3.84 18.799 10.316 32.425 19.474 40.717 9.173 8.354 20.37 12.498 33.528 12.498 15.634 0 28.842-5.398 39.671-16.291 10.733-10.798 16.113-24.164 16.113-40.266 0-15.265-4.995-27.894-14.94-37.761-10.010-9.929-22.652-14.845-38.062-14.845-6.266 0-14.074 1.222-23.457 3.663l3.677-29.147c2.236 0.291 4.003 0.321 5.336 0.321 14.188 0 26.979-3.663 38.304-11.020 11.31-7.392 16.967-18.769 16.967-34.194 0-12.18-4.114-22.269-12.357-30.27-8.272-8.033-18.943-12.019-31.974-12.019-12.885 0-23.743 4.082-32.326 12.212-8.61 8.098-14.168 20.341-16.614 36.569l-33.222-5.911c4.047-22.336 13.319-39.56 27.714-51.804 14.398-12.276 32.309-18.414 53.728-18.414zM590.945 459.554h21.406v271.857h-33.25v-211.926c-8.003 7.744-18.481 15.392-31.497 22.976-13.018 7.648-24.652 13.302-35.037 17.127v-32.103c18.629-8.803 34.874-19.312 48.823-31.747 13.902-12.374 23.769-24.425 29.555-36.185zM81.385 169.038h89.292v100.424h161.824v-100.424h226.916v100.424h161.808v-100.424h97.342c44.909 0 81.338 36.411 81.338 81.34v379.789l-9.436-28.988c-5.637-17.356-21.704-29.052-39.993-29.052-15.65-0-29.274 8.902-36.538 22.27v-223.863h-727.928v437.636h638.894l14.813 10.766-27.267 83.908h-712.452v-94.673h0.079v-557.792c0-44.928 36.396-81.34 81.306-81.34zM590.238 92.429h100.154v144.258h-100.154zM201.493 92.429h100.179v144.258h-100.179z"],"attrs":[{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["Calendar_Favourite"]},"attrs":[{}],"properties":{"order":4,"id":671,"name":"today","prevSize":32,"code":59693},"setIdx":1,"setId":0,"iconIdx":83},{"icon":{"paths":["M238.69 60.541c-52.938-0-95.847 42.9-95.847 95.842 0 52.939 42.909 95.862 95.847 95.862 52.94 0 95.84-42.923 95.84-95.862 0-52.942-42.901-95.842-95.84-95.842zM392.221 50.426h306.155l294.456 288.139v685.485h-776.863v-561.039l40.642-94.103 35.023 81.093v498.374h625.532v-577.602h-249.704v-244.67h-244.628l-1.306-7.293c-4.98-24.278-14.689-46.852-28.118-66.713zM238.689 0c86.369 0 156.367 69.992 156.367 156.374 0 35.435-11.925 68.041-31.798 94.252l116.289 215.985-85.124-24.582-34.050 90.799-96.019-222.375c-5.331 0.878-10.759 1.522-16.269 1.843l-97.681 226.194-34.051-90.799-85.135 24.605 106.068-196.98c-33.598-28.701-54.974-71.302-54.974-118.942 0-86.382 70.011-156.374 156.377-156.374z"],"attrs":[{}],"isMulticolor":false,"isMulticolor2":false,"grid":0,"tags":["Certificate_02"]},"attrs":[{}],"properties":{"order":15,"id":646,"name":"certificate","prevSize":32,"code":59694},"setIdx":1,"setId":0,"iconIdx":108}],"height":1024,"metadata":{"name":"appicons"},"preferences":{"showGlyphs":true,"showCodes":true,"showQuickUse":true,"showQuickUse2":true,"showSVGs":true,"fontPref":{"prefix":"icon-","metadata":{"fontFamily":"appicons","majorVersion":1,"minorVersion":0},"metrics":{"emSize":1024,"baseline":6.25,"whitespace":50},"embed":false,"noie8":true,"ie7":false,"showSelector":true,"showMetrics":false,"showMetadata":false,"showVersion":false},"imagePref":{"prefix":"icon-","png":true,"useClassSelector":true,"color":0,"bgColor":16777215,"name":"icomoon","classSelector":".icon"},"historySize":50,"gridSize":16}} \ No newline at end of file diff --git a/dev/db/sitedb..schema.sql b/dev/db/sitedb..schema.sql new file mode 100644 index 0000000..5099ae0 --- /dev/null +++ b/dev/db/sitedb..schema.sql @@ -0,0 +1,60 @@ + +CREATE TABLE sessions ( + id_user text NULL, + user_agent text NULL, + remote_addr text NULL, + id text NOT NULL, + sessiondata json NULL, + cschema text NULL, + created timestamp NULL DEFAULT now(), + CONSTRAINT sessions_pkey PRIMARY KEY (id) +); + + +CREATE TABLE usergroups ( + id text NOT NULL, + isdefault bool NULL, + groupname text NULL, + CONSTRAINT usergroups_pkey PRIMARY KEY (id) +); + +CREATE TABLE users ( + id text NOT NULL, + username text NULL, + userpassword text NULL, + surname text NULL, + prename text NULL, + created timestamp NULL DEFAULT now(), + isblocked bool NULL, + regcode text NULL, + vcode text NULL, + schemaaccess json NULL, + id_usergroups json NULL, + id_usergroup text NULL, + isdeleted bool NULL, + terms bool NULL, + CONSTRAINT uniq_username UNIQUE (username), + CONSTRAINT users_pkey PRIMARY KEY (id) +); + +CREATE OR REPLACE FUNCTION public.getuuid() + RETURNS text + LANGUAGE plpgsql +AS $function$ +declare + newuuid text; + begin + SELECT uuid_in(md5(random()::text || clock_timestamp()::text)::cstring) into newuuid; + return newuuid; +END; +$function$ +; + + +INSERT INTO usergroups (id, true, groupname) VALUES('user', NULL, 'Users'); +INSERT INTO usergroups (id, isdefault, groupname) VALUES('admin', NULL, 'Administrator'); +INSERT INTO users (id, userpassword, username, surname, prename, id_usergroup ) VALUES +(getuuid(),'0ecf731e2426a8a469f06e9f4a3bcbed6f8071d9d3e3ef7ef5fd9165021e27ec', 'ksaffran@dks.lu', 'Saffran', 'Kilian', 'admin'); + + + diff --git a/dev/setdevlinks.sh b/dev/setdevlinks.sh new file mode 100644 index 0000000..0db3d47 --- /dev/null +++ b/dev/setdevlinks.sh @@ -0,0 +1,8 @@ +#!/bin/bash +CALLDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PROJECT="$(dirname "${CALLDIR}")" +PROJECT="$(basename "${PROJECT}")" +#PROJECT="$(basename "${PROJECT}")" +echo ${PROJECT} +sudo ln -s "/usr/home/dksalu/public_html/"${PROJECT} $wk"/"${PROJECT}"/website" +sudo ln -s "/usr/home/dksalu/public_html/"${PROJECT}"_admin" $wk"/"${PROJECT}"/admin" \ No newline at end of file diff --git a/website/css/creorga.css b/website/css/creorga.css deleted file mode 100644 index 7eb7245..0000000 --- a/website/css/creorga.css +++ /dev/null @@ -1,11 +0,0 @@ -body { - background: url("../img/bg_creorga.jpg"); - background-attachment: fixed; - background-position: center; - background-size: cover; -} - -.bg-topbar { - background: -webkit-linear-gradient(to right, #ffffff, #77a518); - background: linear-gradient(to right, #ffffff, #77a518); -} \ No newline at end of file diff --git a/website/css/site.css b/website/css/site.css deleted file mode 100644 index 2aa5057..0000000 --- a/website/css/site.css +++ /dev/null @@ -1,88 +0,0 @@ -body, html { - /* height: 100%; - line-height: 1.8; */ -} - -/* Full height image header */ -.bgimg-1 { - /* background-position: center; - background-size: cover; - background-image: url("../img/slider_pctablet.png"); - min-height: 50%; */ -} - -/* - -.bg-topbar { - background-color: #6a92d3; -} - -.main { - margin-top: 80px; -} - -.card-header { - background-color: #6a92d3; - color: #fff; -} - -h1 { - font-size: 35pt; - font-weight: bold; -} - -.card { - opacity: 0.8; -} - -header.masthead { - padding-top: 30px; - position: relative; - background: url(../img/bg.jpg); - background-position: center; - background-size: cover; -} - - -.iconbar { - width: 60px; - float: left; -} - -a { - color: #000; -} - -a:hover { - color: #000; -} - -a.footer { - color: #fff; -} - -.dropdown-menu { - border-radius: 0px; -} - -.navbar-nav .dropdown-menu { - background-color: #6a92d3; - color: #fff; -} - -.navbar-nav .dropdown-menu .dropdown-item { - color: #fff; -} - -.navbar-nav .dropdown-menu .dropdown-item:hover { - background-color: #52638e; -} - -.nav-link:hover { - text-decoration: underline; -} - -h3 a: { - color: #000; -} - */ diff --git a/website/css/theme.css b/website/css/theme.css index 4c3f290..a2d8180 100644 --- a/website/css/theme.css +++ b/website/css/theme.css @@ -29,8 +29,8 @@ legend{color:inherit;display:table;max-width:100%;padding:0;white-space:normal}t background-color: #52638e; } */ html,body{font-family:Verdana,sans-serif;font-size:10pt;line-height:1.5}html{overflow-x:hidden} -h1{font-size:36px}h2{font-size:30px}h3{font-size:24px}h4{font-size:20px}h5{font-size:18px}h6{font-size:16px}.serif{font-family:serif} -h1,h2,h3,h4,h5,h6{font-family:"Segoe UI",Arial,sans-serif;font-weight:400;margin: 0}.wide{letter-spacing:4px} +h1{font-size:20pt}h2{font-size:18pt}h3{font-size:16px; text-decoration: underline; font-weight: bold;}h4{font-size:13px}h5{font-size:12px}h6{font-size:11pt}.serif{font-family:serif} +h1,h2,h3,h4,h5,h6{font-family:"Segoe UI",Arial,sans-serif;font-weight:bold;margin: 0}.wide{letter-spacing:4px} hr{border:0;border-top:1px solid #eee;margin:20px 0} .img{max-width:100%;height:auto; vertical-align:middle}a{color:inherit} .table,.table-all{border-collapse:collapse;border-spacing:0;width:100%;display:table}.table-all{border:1px solid #ccc} @@ -117,7 +117,7 @@ hr{border:0;border-top:1px solid #eee;margin:20px 0} .circle{border-radius:50%} .round-small{border-radius:2px}.round,.round-medium{border-radius:4px}.round-large{border-radius:8px}.round-xlarge{border-radius:16px}.round-xxlarge{border-radius:32px} .row-padding,.row-padding>.half,.row-padding>.third,.row-padding>.twothird,.row-padding>.threequarter,.row-padding>.quarter,.row-padding>.col{padding:0 8px} -.container,.datapanel{padding:0.01em 8px}.datapanel{margin-top:8px;margin-bottom:8px} +.container,.datapanel{padding:2px 4px}.datapanel{margin-top:4px;margin-bottom:4px} .code,.codespan{font-family:Consolas,"courier new";font-size:16px} .code{width:auto;background-color:#fff;padding:8px 12px;border-left:4px solid #4CAF50;word-wrap:break-word} .codespan{color:crimson;background-color:#f1f1f1;padding-left:4px;padding-right:4px;font-size:110%} @@ -146,9 +146,9 @@ hr{border:0;border-top:1px solid #eee;margin:20px 0} .topbar{border-top:6px solid #ccc!important}.bottombar{border-bottom:6px solid #ccc!important} .leftbar{border-left:6px solid #ccc!important}.rightbar{border-right:6px solid #ccc!important} .section,.code{margin-top:16px!important;margin-bottom:16px!important} -.margin{margin:16px!important}.margin-top{margin-top:16px!important}.margin-bottom{margin-bottom:16px!important} -.margin-left{margin-left:16px!important}.margin-right{margin-right:16px!important} -.padding-small{padding:4px 8px!important}.padding{padding:8px 16px!important}.padding-large{padding:12px 24px!important} +.margin{margin:4px!important}.margin-top{margin-top:4px!important}.margin-bottom{margin-bottom:4px!important} +.margin-left{margin-left:4px!important}.margin-right{margin-right:4px!important} +.padding-small{padding:2px 2px!important}.padding{padding:4px 4px!important}.padding-large{padding:8px 8px!important} .padding-16{padding-top:16px!important;padding-bottom:16px!important}.padding-24{padding-top:24px!important;padding-bottom:24px!important} .padding-32{padding-top:32px!important;padding-bottom:32px!important}.padding-48{padding-top:48px!important;padding-bottom:48px!important} .padding-64{padding-top:64px!important;padding-bottom:64px!important} @@ -552,7 +552,8 @@ div.PageListHeader .inner_border .moduletoolbar { - background-color: #293146; + background-color: #6a92d3; + /* background-color: #293146; */ color: #fff; } diff --git a/website/download/update.php b/website/download/update.php deleted file mode 100644 index 4b137b4..0000000 --- a/website/download/update.php +++ /dev/null @@ -1,235 +0,0 @@ -".$updatefile.""; - } - -?> - - - - - - - - - - - DKS - The Database Specialist in Luxembourg - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - -
-
-
- - - -
-

- -
- -
-
Version pour MacOS
Minimum MacOS X 10.6
-  Téléchargement

- -
-
Version pour Windows
Minimum Windows Vista
-  Téléchargement

- -
- - - -
-
-
- - -
- -
-
-
-
-

Copyright © 2017 DKS s.à r.l. All Rights Reserved

-
-
-
-
-
- - - - - - - - - - - - - - - diff --git a/website/img/Creorga_1000px.png b/website/img/Creorga_1000px.png deleted file mode 100644 index 4a09df9..0000000 Binary files a/website/img/Creorga_1000px.png and /dev/null differ diff --git a/website/img/applescript.png b/website/img/applescript.png deleted file mode 100644 index b3f5277..0000000 Binary files a/website/img/applescript.png and /dev/null differ diff --git a/website/img/apps/cashboxlogo.svg b/website/img/apps/cashboxlogo.svg deleted file mode 100644 index 17f6be8..0000000 --- a/website/img/apps/cashboxlogo.svg +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - diff --git a/website/img/apps/coloradiologo.svg b/website/img/apps/coloradiologo.svg deleted file mode 100644 index e6db71b..0000000 --- a/website/img/apps/coloradiologo.svg +++ /dev/null @@ -1,52 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - diff --git a/website/img/apps/creorgalogo.svg b/website/img/apps/creorgalogo.svg deleted file mode 100644 index 6a91a48..0000000 --- a/website/img/apps/creorgalogo.svg +++ /dev/null @@ -1,931 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/website/img/apps/datastorelogo.svg b/website/img/apps/datastorelogo.svg deleted file mode 100644 index 8278e97..0000000 --- a/website/img/apps/datastorelogo.svg +++ /dev/null @@ -1,193 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/website/img/apps/dkstools.svg b/website/img/apps/dkstools.svg deleted file mode 100644 index c20a204..0000000 --- a/website/img/apps/dkstools.svg +++ /dev/null @@ -1,137 +0,0 @@ - - - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/website/img/apps/dksvpn.svg b/website/img/apps/dksvpn.svg deleted file mode 100644 index d805810..0000000 --- a/website/img/apps/dksvpn.svg +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - diff --git a/website/img/apps/hourtraxlogo.svg b/website/img/apps/hourtraxlogo.svg deleted file mode 100644 index 519e8d2..0000000 --- a/website/img/apps/hourtraxlogo.svg +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - diff --git a/website/img/apps/invoicejournallogo.svg b/website/img/apps/invoicejournallogo.svg deleted file mode 100644 index fda0cb0..0000000 --- a/website/img/apps/invoicejournallogo.svg +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - diff --git a/website/img/apps/qrcodegenerateorlogo.svg b/website/img/apps/qrcodegenerateorlogo.svg deleted file mode 100644 index 45352fd..0000000 --- a/website/img/apps/qrcodegenerateorlogo.svg +++ /dev/null @@ -1,2322 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/website/img/apps/websiteeditorlogo.svg b/website/img/apps/websiteeditorlogo.svg deleted file mode 100644 index 32abb3c..0000000 --- a/website/img/apps/websiteeditorlogo.svg +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - diff --git a/website/img/bash.png b/website/img/bash.png deleted file mode 100644 index e0331c1..0000000 Binary files a/website/img/bash.png and /dev/null differ diff --git a/website/img/bg.jpg b/website/img/bg.jpg deleted file mode 100644 index 5ad4139..0000000 Binary files a/website/img/bg.jpg and /dev/null differ diff --git a/website/img/bg_bw.jpg b/website/img/bg_bw.jpg deleted file mode 100644 index c3f063f..0000000 Binary files a/website/img/bg_bw.jpg and /dev/null differ diff --git a/website/img/bg_creorga.jpg b/website/img/bg_creorga.jpg deleted file mode 100644 index d7f782c..0000000 Binary files a/website/img/bg_creorga.jpg and /dev/null differ diff --git a/website/img/bgtest - Kopie.jpg b/website/img/bgtest - Kopie.jpg deleted file mode 100644 index c1782e2..0000000 Binary files a/website/img/bgtest - Kopie.jpg and /dev/null differ diff --git a/website/img/bgtest.jpg b/website/img/bgtest.jpg deleted file mode 100644 index c46b2a2..0000000 Binary files a/website/img/bgtest.jpg and /dev/null differ diff --git a/website/img/cashbox.png b/website/img/cashbox.png deleted file mode 100644 index c8af669..0000000 Binary files a/website/img/cashbox.png and /dev/null differ diff --git a/website/img/childs.png b/website/img/childs.png deleted file mode 100644 index 025155c..0000000 Binary files a/website/img/childs.png and /dev/null differ diff --git a/website/img/coloradio.png b/website/img/coloradio.png deleted file mode 100644 index 0c0117a..0000000 Binary files a/website/img/coloradio.png and /dev/null differ diff --git a/website/img/creorgalogo.png b/website/img/creorgalogo.png deleted file mode 100644 index 15689f8..0000000 Binary files a/website/img/creorgalogo.png and /dev/null differ diff --git a/website/img/css3.png b/website/img/css3.png deleted file mode 100644 index ddd0cb4..0000000 Binary files a/website/img/css3.png and /dev/null differ diff --git a/website/img/festplatte.jpg b/website/img/festplatte.jpg deleted file mode 100644 index fcbb753..0000000 Binary files a/website/img/festplatte.jpg and /dev/null differ diff --git a/website/img/filemaker.png b/website/img/filemaker.png deleted file mode 100644 index f58ab7d..0000000 Binary files a/website/img/filemaker.png and /dev/null differ diff --git a/website/img/fm_logotm_stacked.png b/website/img/fm_logotm_stacked.png deleted file mode 100644 index b885de5..0000000 Binary files a/website/img/fm_logotm_stacked.png and /dev/null differ diff --git a/website/img/groovy.png b/website/img/groovy.png deleted file mode 100644 index 3e2f210..0000000 Binary files a/website/img/groovy.png and /dev/null differ diff --git a/website/img/hourtrax.png b/website/img/hourtrax.png deleted file mode 100644 index e9466d4..0000000 Binary files a/website/img/hourtrax.png and /dev/null differ diff --git a/website/img/htmlfive.png b/website/img/htmlfive.png deleted file mode 100644 index f6ccf50..0000000 Binary files a/website/img/htmlfive.png and /dev/null differ diff --git a/website/img/icons/menu.svg b/website/img/icons/menu.svg deleted file mode 100644 index 1a247ab..0000000 --- a/website/img/icons/menu.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/website/img/if_HTML_Logo_65687.png b/website/img/if_HTML_Logo_65687.png deleted file mode 100644 index 8c18c8f..0000000 Binary files a/website/img/if_HTML_Logo_65687.png and /dev/null differ diff --git a/website/img/if_code-programming-javascript-software-develop-command-language_652581.png b/website/img/if_code-programming-javascript-software-develop-command-language_652581.png deleted file mode 100644 index 3f9c98a..0000000 Binary files a/website/img/if_code-programming-javascript-software-develop-command-language_652581.png and /dev/null differ diff --git a/website/img/invoice_journal.png b/website/img/invoice_journal.png deleted file mode 100644 index 85d324a..0000000 Binary files a/website/img/invoice_journal.png and /dev/null differ diff --git a/website/img/java.png b/website/img/java.png deleted file mode 100644 index a61562d..0000000 Binary files a/website/img/java.png and /dev/null differ diff --git a/website/img/javascript.png b/website/img/javascript.png deleted file mode 100644 index f550642..0000000 Binary files a/website/img/javascript.png and /dev/null differ diff --git a/website/img/javascript_yellow.png b/website/img/javascript_yellow.png deleted file mode 100644 index 5f00fa2..0000000 Binary files a/website/img/javascript_yellow.png and /dev/null differ diff --git a/website/img/kasse.jpg b/website/img/kasse.jpg deleted file mode 100644 index c28059b..0000000 Binary files a/website/img/kasse.jpg and /dev/null differ diff --git a/website/img/kinder.jpg b/website/img/kinder.jpg deleted file mode 100644 index 022b855..0000000 Binary files a/website/img/kinder.jpg and /dev/null differ diff --git a/website/img/logo-mysql.png b/website/img/logo-mysql.png deleted file mode 100644 index 73b55bd..0000000 Binary files a/website/img/logo-mysql.png and /dev/null differ diff --git a/website/img/musicmix.jpg b/website/img/musicmix.jpg deleted file mode 100644 index ce82425..0000000 Binary files a/website/img/musicmix.jpg and /dev/null differ diff --git a/website/img/musicmix.png b/website/img/musicmix.png deleted file mode 100644 index 4ccb8fb..0000000 Binary files a/website/img/musicmix.png and /dev/null differ diff --git a/website/img/mysql.png b/website/img/mysql.png deleted file mode 100644 index db2efb4..0000000 Binary files a/website/img/mysql.png and /dev/null differ diff --git a/website/img/perl.png b/website/img/perl.png deleted file mode 100644 index f792564..0000000 Binary files a/website/img/perl.png and /dev/null differ diff --git a/website/img/pics/google4.png b/website/img/pics/google4.png deleted file mode 100644 index 3c0e497..0000000 Binary files a/website/img/pics/google4.png and /dev/null differ diff --git a/website/img/pics/google_gray.svg b/website/img/pics/google_gray.svg deleted file mode 100644 index 1f3a237..0000000 --- a/website/img/pics/google_gray.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/website/img/pics/ico.copywriting.png b/website/img/pics/ico.copywriting.png deleted file mode 100644 index c163ff9..0000000 Binary files a/website/img/pics/ico.copywriting.png and /dev/null differ diff --git a/website/img/pics/ico.monitoring.png b/website/img/pics/ico.monitoring.png deleted file mode 100644 index be3b7b5..0000000 Binary files a/website/img/pics/ico.monitoring.png and /dev/null differ diff --git a/website/img/pics/ico.optimization.png b/website/img/pics/ico.optimization.png deleted file mode 100644 index 44008be..0000000 Binary files a/website/img/pics/ico.optimization.png and /dev/null differ diff --git a/website/img/pics/image-1.jpg b/website/img/pics/image-1.jpg deleted file mode 100644 index 00bd2d5..0000000 Binary files a/website/img/pics/image-1.jpg and /dev/null differ diff --git a/website/img/pics/image-10.jpg b/website/img/pics/image-10.jpg deleted file mode 100644 index ef5f6c6..0000000 Binary files a/website/img/pics/image-10.jpg and /dev/null differ diff --git a/website/img/pics/image-11.jpg b/website/img/pics/image-11.jpg deleted file mode 100644 index f4366a9..0000000 Binary files a/website/img/pics/image-11.jpg and /dev/null differ diff --git a/website/img/pics/image-12.jpg b/website/img/pics/image-12.jpg deleted file mode 100644 index 882cc99..0000000 Binary files a/website/img/pics/image-12.jpg and /dev/null differ diff --git a/website/img/pics/image-2.jpg b/website/img/pics/image-2.jpg deleted file mode 100644 index a7a20dd..0000000 Binary files a/website/img/pics/image-2.jpg and /dev/null differ diff --git a/website/img/pics/image-3.jpg b/website/img/pics/image-3.jpg deleted file mode 100644 index 892abb3..0000000 Binary files a/website/img/pics/image-3.jpg and /dev/null differ diff --git a/website/img/pics/image-4.jpg b/website/img/pics/image-4.jpg deleted file mode 100644 index 277f80d..0000000 Binary files a/website/img/pics/image-4.jpg and /dev/null differ diff --git a/website/img/pics/image-5.jpg b/website/img/pics/image-5.jpg deleted file mode 100644 index f3d94ed..0000000 Binary files a/website/img/pics/image-5.jpg and /dev/null differ diff --git a/website/img/pics/image-6.jpg b/website/img/pics/image-6.jpg deleted file mode 100644 index 4ce871f..0000000 Binary files a/website/img/pics/image-6.jpg and /dev/null differ diff --git a/website/img/pics/image-7.jpg b/website/img/pics/image-7.jpg deleted file mode 100644 index 54138bc..0000000 Binary files a/website/img/pics/image-7.jpg and /dev/null differ diff --git a/website/img/pics/image-8.jpg b/website/img/pics/image-8.jpg deleted file mode 100644 index 90f0db8..0000000 Binary files a/website/img/pics/image-8.jpg and /dev/null differ diff --git a/website/img/pics/image-9.jpg b/website/img/pics/image-9.jpg deleted file mode 100644 index f23b68f..0000000 Binary files a/website/img/pics/image-9.jpg and /dev/null differ diff --git a/website/img/pics/img.home2.png b/website/img/pics/img.home2.png deleted file mode 100644 index f684314..0000000 Binary files a/website/img/pics/img.home2.png and /dev/null differ diff --git a/website/img/pics/img.home3.png b/website/img/pics/img.home3.png deleted file mode 100644 index 6c4ec39..0000000 Binary files a/website/img/pics/img.home3.png and /dev/null differ diff --git a/website/img/pics/img.home4.png b/website/img/pics/img.home4.png deleted file mode 100644 index 4939b48..0000000 Binary files a/website/img/pics/img.home4.png and /dev/null differ diff --git a/website/img/pics/img.home6.png b/website/img/pics/img.home6.png deleted file mode 100644 index 6da7e5b..0000000 Binary files a/website/img/pics/img.home6.png and /dev/null differ diff --git a/website/img/pics/logo.png b/website/img/pics/logo.png deleted file mode 100644 index c1aae71..0000000 Binary files a/website/img/pics/logo.png and /dev/null differ diff --git a/website/img/pics/partner-1.jpg b/website/img/pics/partner-1.jpg deleted file mode 100644 index c3dc98f..0000000 Binary files a/website/img/pics/partner-1.jpg and /dev/null differ diff --git a/website/img/pics/partner-2.jpg b/website/img/pics/partner-2.jpg deleted file mode 100644 index 8540561..0000000 Binary files a/website/img/pics/partner-2.jpg and /dev/null differ diff --git a/website/img/pics/partner-3.jpg b/website/img/pics/partner-3.jpg deleted file mode 100644 index 57f8c41..0000000 Binary files a/website/img/pics/partner-3.jpg and /dev/null differ diff --git a/website/img/pics/partner-4.jpg b/website/img/pics/partner-4.jpg deleted file mode 100644 index f8bcc05..0000000 Binary files a/website/img/pics/partner-4.jpg and /dev/null differ diff --git a/website/img/pics/partner-5.jpg b/website/img/pics/partner-5.jpg deleted file mode 100644 index 87e8eaa..0000000 Binary files a/website/img/pics/partner-5.jpg and /dev/null differ diff --git a/website/img/pics/partner-6.jpg b/website/img/pics/partner-6.jpg deleted file mode 100644 index 2b40d10..0000000 Binary files a/website/img/pics/partner-6.jpg and /dev/null differ diff --git a/website/img/pics/slide1.contact.png b/website/img/pics/slide1.contact.png deleted file mode 100644 index 6e66fe1..0000000 Binary files a/website/img/pics/slide1.contact.png and /dev/null differ diff --git a/website/img/pics/slide1.jpg b/website/img/pics/slide1.jpg deleted file mode 100644 index 856314f..0000000 Binary files a/website/img/pics/slide1.jpg and /dev/null differ diff --git a/website/img/pics/slide2.contact.png b/website/img/pics/slide2.contact.png deleted file mode 100644 index 958f97d..0000000 Binary files a/website/img/pics/slide2.contact.png and /dev/null differ diff --git a/website/img/pics/slide2.jpg b/website/img/pics/slide2.jpg deleted file mode 100644 index 137ee24..0000000 Binary files a/website/img/pics/slide2.jpg and /dev/null differ diff --git a/website/img/pics/slide3.contact.png b/website/img/pics/slide3.contact.png deleted file mode 100644 index da96c66..0000000 Binary files a/website/img/pics/slide3.contact.png and /dev/null differ diff --git a/website/img/pics/slide3.jpg b/website/img/pics/slide3.jpg deleted file mode 100644 index 51e337d..0000000 Binary files a/website/img/pics/slide3.jpg and /dev/null differ diff --git a/website/img/pics/spotlight-poi2.png b/website/img/pics/spotlight-poi2.png deleted file mode 100644 index b719ad5..0000000 Binary files a/website/img/pics/spotlight-poi2.png and /dev/null differ diff --git a/website/img/pics/team.1.jpg b/website/img/pics/team.1.jpg deleted file mode 100644 index 0ec0521..0000000 Binary files a/website/img/pics/team.1.jpg and /dev/null differ diff --git a/website/img/pics/team.2.jpg b/website/img/pics/team.2.jpg deleted file mode 100644 index 03885e9..0000000 Binary files a/website/img/pics/team.2.jpg and /dev/null differ diff --git a/website/img/pics/team.3.jpg b/website/img/pics/team.3.jpg deleted file mode 100644 index 62f07c2..0000000 Binary files a/website/img/pics/team.3.jpg and /dev/null differ diff --git a/website/img/pics/team.4.jpg b/website/img/pics/team.4.jpg deleted file mode 100644 index ee4ec2f..0000000 Binary files a/website/img/pics/team.4.jpg and /dev/null differ diff --git a/website/img/pics/welcome.png b/website/img/pics/welcome.png deleted file mode 100644 index e959de4..0000000 Binary files a/website/img/pics/welcome.png and /dev/null differ diff --git a/website/img/pitouchcase.png b/website/img/pitouchcase.png deleted file mode 100644 index ee8f159..0000000 Binary files a/website/img/pitouchcase.png and /dev/null differ diff --git a/website/img/postgres.png b/website/img/postgres.png deleted file mode 100644 index b75bcc4..0000000 Binary files a/website/img/postgres.png and /dev/null differ diff --git a/website/img/postgresql.png b/website/img/postgresql.png deleted file mode 100644 index 14f3db1..0000000 Binary files a/website/img/postgresql.png and /dev/null differ diff --git a/website/img/powershell.png b/website/img/powershell.png deleted file mode 100644 index b747b87..0000000 Binary files a/website/img/powershell.png and /dev/null differ diff --git a/website/img/price750.svg b/website/img/price750.svg deleted file mode 100644 index 114174b..0000000 --- a/website/img/price750.svg +++ /dev/null @@ -1,84 +0,0 @@ - -image/svg+xml - - - - -750€ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/website/img/radio.jpg b/website/img/radio.jpg deleted file mode 100644 index c8472f0..0000000 Binary files a/website/img/radio.jpg and /dev/null differ diff --git a/website/img/rechnung.jpg b/website/img/rechnung.jpg deleted file mode 100644 index eea3480..0000000 Binary files a/website/img/rechnung.jpg and /dev/null differ diff --git a/website/img/slider_pctablet.png b/website/img/slider_pctablet.png deleted file mode 100644 index 98ca0f2..0000000 Binary files a/website/img/slider_pctablet.png and /dev/null differ diff --git a/website/img/sqlite.png b/website/img/sqlite.png deleted file mode 100644 index a38dcbb..0000000 Binary files a/website/img/sqlite.png and /dev/null differ diff --git a/website/img/sybar.png b/website/img/sybar.png deleted file mode 100644 index 36ef9e8..0000000 Binary files a/website/img/sybar.png and /dev/null differ diff --git a/website/img/zeit.jpg b/website/img/zeit.jpg deleted file mode 100644 index dfdf9af..0000000 Binary files a/website/img/zeit.jpg and /dev/null differ diff --git a/website/index.php b/website/index.php index 8255193..a9d5f9b 100644 --- a/website/index.php +++ b/website/index.php @@ -1,6 +1,6 @@ render('index.html',$vars); echo $mainsite; - //echo "
".print_r($vars).print_r($_SERVER["REQUEST_URI"]).print_r($vars)."
"; + // echo "
".print_r($vars).print_r($_SERVER["REQUEST_URI"]).print_r($vars)."
"; ?> \ No newline at end of file diff --git a/website/info.php b/website/info.php deleted file mode 100644 index 3c256a4..0000000 --- a/website/info.php +++ /dev/null @@ -1,4 +0,0 @@ -".print_r($vars).print_r($_SERVER["REQUEST_URI"]).""; -?> \ No newline at end of file diff --git a/website/js/dataform.js b/website/js/dataform.js deleted file mode 100644 index f90d9c1..0000000 --- a/website/js/dataform.js +++ /dev/null @@ -1,317 +0,0 @@ -let dataform = { - saveform: function(frmid){ - var flds=dataform.getformcontent(frmid,null); - console.log("TODO: save to db",flds); - // flds["fn"] ="saveform"; - //flds["schemata"]=clientschema; - // flds["table"] = frmid; - // if (clientschema == null){ - // flds["schemata"]=schemata; - // } - delete flds["null"]; - //for (flds in ) - // db.exec("UPDATE "+ + " set "++"="++" WHERE id="+ ) - - // postData("db.cgi",flds).then(data => { - // if (aftercallback){ - // aftercallback(data.result); - // form.formsaved({}); - // } else { - // form.formsaved(data.result); - // } - // }); - return false; - }, - saveformdata: function(flds){ - //flds["fn"] ="saveform"; - // flds["schemata"]=clientschema; - // if (clientschema == null){ - // flds["schemata"]=schemata; - // } - delete flds["null"]; - console.log("TODO: save to db",flds); - // postData("db.cgi",flds).then(data => { - // if (aftercallback){ - // aftercallback(data.result); - // form.formsaved({}); - // } else { - // form.formsaved(data.result); - // } - // }); - return false; - }, - formsaved: function(data){ - var sb = document.getElementById("snackbar"); - sb.className="show green"; - sb.innerHTML = 'Les données ont été sauvegardées!'; - setTimeout(function(){ sb.className = sb.className.replace("show green", ""); }, 3000); - return false; - }, - getformcontent: function(frmid,dataflds){ - var frm = document.getElementById("frm_" + frmid); - var flds = {}; - if (dataflds){ - flds = dataflds; - } - for (var i = 0; i < frm.elements.length; i++) { - var field = frm.elements[i]; - if (((field.getAttribute("name") != 'null') && (field.tagName == "INPUT" || field.tagName == "SELECT" || field.tagName == "TEXTAREA")) && (field.id)){ - // if (field.classList.contains("tagedit")){ - // var fvalue=field.value.trim(); - // var ndata = null; - // if (fvalue != ""){ - // ndata = fvalue.split(","); - // } - // flds[field.getAttribute("name")] = ndata; - // } - if (field.tagName == "TEXTAREA" ){ - if (field.classList.contains("richeditarea")){ - flds[field.dataset.table][field.dataset.column] = tinymce.get(field.id).getContent(); - } else { - flds[field.dataset.table][field.dataset.column] = field.innerHTML; - } - } else if (field.type == "checkbox" ){ - if (field.checked){ - flds[field.dataset.table][field.dataset.column] = "1"; - } else { - flds[field.dataset.table][field.dataset.column] = ""; - } - } - else if (field.tagName == "SELECT" && field.multiple == true){ - var opts = field.selectedOptions; - var vals = []; - for (var o in opts){ - if (opts[o].value){ - vals.push(opts[o].value); - } - } - if (vals.length > 0) { - flds[field.dataset.table][field.dataset.column] = JSON.stringify(vals); - } else { - flds[field.dataset.table][field.dataset.column] = ""; - } - } - else { - console.log("Field",field,field.id, field.value); - flds[field.dataset.table][field.dataset.column] = field.value; - } - } - } - return flds; - }, - cleanform: function(frmname){ - var frm = document.getElementById("frm_" + frmname); - for (var f in frm){ - if (frm[f] && frm[f].id){ - if (frm[f].tagName == 'INPUT'){ - if (frm[f].type == "checkbox"){ - frm[f].checked = false; - } else if (frm[f].classList.contains("datefield")){ - if (frm[f]._flatpickr){ frm[f]._flatpickr.clear(); } - } else if (frm[f].classList.contains("choices__input")){ - if (choice[frmname][frm[f].id]){ - choice[frmname][frm[f].id].removeActiveItems(); - } - } else { - frm[f].value = ""; - } - } - if (frm[f].tagName == 'SELECT'){ - if (frm[f].multiple == true){ - if (frm[f].classList.contains("choices__input")){ - choice[frmname][frm[f].id].removeActiveItems(); - } - } else { - frm[f].value = ""; - } - - } - if (frm[f].tagName == 'TEXTAREA'){ - if (frm[f].classList.contains("richeditarea")){ - tinymce.get(frm[f].id).setContent(""); - } else { - frm[f].innerHTML = ""; - } - } - } - } - return false; - }, - // cleanform2: function(frmname,choices){ - // var frm = document.getElementById("frm_" + frmname); - // for (var f in frm){ - // if (frm[f] && frm[f].id){ - // if (frm[f].tagName == 'INPUT'){ - // if (frm[f].type == "checkbox"){ - // frm[f].checked = false; - // } else if (frm[f].classList.contains("datefield")){ - // if (frm[f]._flatpickr){ frm[f]._flatpickr.clear(); } - // } else if (frm[f].classList.contains("choices__input")){ - // if (choices[frm[f].id]){ - // choices[frm[f].id].removeActiveItems(); - // } - // } else { - // frm[f].value = ""; - // } - // } - // if (frm[f].tagName == 'SELECT'){ - // if (frm[f].multiple == true){ - // if (frm[f].classList.contains("choices__input")){ - // choices[frm[f].id].removeActiveItems(); - // } - // } else { - // frm[f].value = ""; - // } - - // } - // if (frm[f].tagName == 'TEXTAREA'){ - // if (frm[f].classList.contains("richeditarea")){ - // tinymce.get(frm[f].id).setContent(""); - // } else { - // frm[f].innerHTML = ""; - // } - // } - // } - // } - // return false; - // }, - fillform: function(dataclass,choices,data){ - var frm = document.querySelectorAll('.data_'+ dataclass); - //console.log("frmdata",frm); - if (data){ - for (var f in frm){ - - var tblid = null; - //console.log("ID",frm[f].id); - if (frm[f].id){ - tblid = frm[f].id.replace(dataclass + "_",""); - frm[f].dataset.id=data['id']; - } - //console.log(frm[f].id +'=>' +tblid + "=>" +data[tblid]); - if (tblid != null && data[tblid]){ - - if (frm[f].tagName == 'INPUT'){ - if (frm[f].type == "checkbox"){ - if (data[tblid] == "1"){ - frm[f].checked = true; - } else { - frm[f].checked = false; - } - } - else if (frm[f].classList.contains("datefield")){ - frm[f]._flatpickr.setDate(data[tblid]); - } - else if (frm[f].classList.contains("timefield")){ - frm[f].value = timecalc.StringToTime(data[tblid]); - } - else if (frm[f].classList.contains("number")){ - frm[f].value = dataform.setNumber(data[tblid],null); - } - else if (frm[f].classList.contains("currency")){ - frm[f].value = dataform.setNumber(data[tblid],2); - } - else if (frm[f].classList.contains("percent")){ - frm[f].value = dataform.setNumber(data[tblid],2); - } - else { - frm[f].value=data[tblid]; - } - } - if (frm[f].tagName == 'SELECT'){ - if (frm[f].multiple == true){ - - choices[frm[f].id].set(JSON.parse(data[tblid])); - } else { - frm[f].value=data[tblid]; - } - } - if (frm[f].tagName == "TEXTAREA"){ - //console.log("Set TextArea: " + frm[f].id + " => "+ data[tblid]); - if (frm[f].classList.contains("richeditarea")){ - - tinymce.get(frm[f].id).setContent(data[tblid]); - } else { - frm[f].value = data[tblid]; - } - } - } - } - } - }, - setNumber(numdata,decimals){ - console.log("Number in ",numdata); - if (numdata == null || numdata == ''){ - return ""; - } - if (decimals){ - numdata = parseFloat(numdata).toFixed(decimals).toString(); - } - numdata.toString().replace(/./,','); - console.log("Number out ",numdata); - return numdata; - }, - fillselectlist: function(obj,listdata,vidcol,vvalcol){ - var sellist = []; - let csel = obj.value; - //console.log(obj); - //console.log("selectdata",listdata); - - // for (var d in listdata){ - // console.log(d); - // } - // console.log("datasize",listdata.length); - if (listdata.length > 0){ - for (var i=0;i'); - } - }, - setValue: function(obj,newvalue){ - if (obj.tagName == 'INPUT' || obj.tagName == 'SELECT'){ - if (obj.type == 'checkbox' || obj.type == 'radio'){ - obj.checked = true; - }else { - obj.value=newvalue; - } - } - if (obj.tagName == 'TEXTAREA'){ - obj.innerHTML = newvalue; - } - dataform.savefield(obj); - }, - savefield: function(obj){ - //if (obj.tagName == 'TextArea') - fdata = obj.dataset; - //fdata["save"] = "field"; - //fdata["schemata"] = schemata; - if (obj.tagName == 'INPUT' || obj.tagName == 'SELECT' || obj.tagName == 'TEXTAREA'){ - if (obj.type == 'checkbox' || obj.type == 'radio'){ - if (obj.checked == true){ - fdata["value"] = 1; - } else { - fdata["value"] = null; - } - }else { - fdata["value"] = obj.value; - } - } - db.exec("UPDATE "+ fdata["table"]+" SET "+fdata["column"]+"='"+ fdata["value"] + "' WHERE id='" + fdata["id"]+ "';"); - return false; - }, - cleanfield: function(objid){ - document.getElementById(objid).value=''; - }, - } \ No newline at end of file diff --git a/website/js/global/myapp.js b/website/js/global/myapp.js deleted file mode 100644 index 7692348..0000000 --- a/website/js/global/myapp.js +++ /dev/null @@ -1,161 +0,0 @@ - -let preferences = { - global: null, - page: null, - defaultdata: {} -} - -let myapp = { - loadpanel: function(idpanel){ - return new Promise( - function(resolve, reject){ - if (document.getElementById("pnl_" + idpanel).innerHTML == ''){ - var pnldoc = usersystem.readAppFile('panels/' + idpanel + '.html'); - if (pnldoc == ""){ - reject('panels/' + idpanel + '.html' + " data is empty"); - }else { - document.getElementById("pnl_" + idpanel).insertAdjacentHTML('afterbegin', pnldoc); - if (eval("typeof "+ idpanel) == "object"){ - eval(`${idpanel}.init();`); - } - resolve(true); - } - } else { - resolve(true); - } - }); - }, - viewpanel: function( idpanel){ - myapp.loadpanel(idpanel).then(result => { - if (result){ - let panels = document.getElementsByClassName("panel"); - for (let i=0;i { - document.getElementById("dlg" + dlgname).style.display = 'block'; - //}); - - }, - closeDialog: function(dlgname){ - document.getElementById("dlg" + dlgname).style.display = 'none'; - }, - confirm(title,message,strbtnok,strbtncancel,action){ - document.getElementById("dlgconfirm_title").innerHTML = title; - document.getElementById("dlgconfirm_text").innerHTML = message; - document.getElementById("dlgconfirm_btnok").innerHTML = strbtnok; - document.getElementById("dlgconfirm_btncancel").innerHTML = strbtncancel; - document.getElementById("dlgconfirm_btnok").setAttribute("onclick","document.getElementById('dlgconfirm').style.display='none';" + action); - document.getElementById("dlgconfirm").style.display = 'block'; - }, - message: function(title,message){ - document.getElementById('dlgmessage_title').innerHTML=title; - document.getElementById('dlgmessage_text').innerHTML=message; - document.getElementById('dlgmessage').style.display='block'; - return false; - }, - setpref: function(key,value){ - db.execAsync("REPLACE INTO defaultdata (id,pref) VALUES ('"+key+"','"+value+"');").then(res => { - myapp.loadpreferences(); - }); - return false; - }, - loadpreferences: function(){ - db.queryarray("select id,pref from defaultdata;").then(res => { - for (var i=0;i {console.log(data);}); - myapp.viewpanel("index"); - //index.init(); - //addresses.init(); - //files.inittable(); - //invoice.init(); - //invoices.init(); - //offers.init(); - //offer.init(); - //offerdetails.inittable(); - //transactions.inittable(); - //transaction.initform(); - //mpref.cfg = usersystem.getPreference(mpref.global.dataset); - - //admin.setident(); - // document.trigger('moduledataloaded'); - // document.bind('moduledataloaded', myapp.execmodulescript()); - // if (basedb && basedb != "") { - // //console.log("INFO basedb:" + basedb); - //app.getdatasets(); - - // } -}); \ No newline at end of file diff --git a/website/js/global/renderer.js b/website/js/global/renderer.js deleted file mode 100644 index f169a2b..0000000 --- a/website/js/global/renderer.js +++ /dev/null @@ -1,93 +0,0 @@ -const { dialog } = require('electron'); -const fs = require('fs'); -const os = require('os'); -const path = require('path'); -let usersystem = { - profilepath: function(){ - let ppath=""; - if (os.platform() == "darwin"){ - ppath = os.homedir().replace(/\\/g,"/") + '/Library/Application Support/invoicejournal/'; - } else if (os.platform() == "win32") { - ppath = os.homedir().replace(/\\/g,"/") + '/AppData/Roaming/invoicejournal/'; - } - return ppath; - }, - selectfile: function(dlgtitle,lastpath,filefilters=null,multiselect=false){ - let props = ['openFile']; - if (multiselect == true){ - props.push('multiSelections'); - } - return dialog.showOpenDialog({title: dlgtitle,defaultPath: lastpath, filters: filefilters, properties: props }); - }, - selectdir: function(dlgtitle,lastpath){ - return dialog.showOpenDialog({title: dlgtitle,defaultPath: lastpath, filters: filefilters, properties: ['openDirectory'] }); - }, - showMessage: function(msgTitle,msg,msgdetail,msgtype,msgButtons=["OK"],defautlbtnid=0,cancelbtnid){ - return dialog.showMessageBox({type: msgtype, // - title: msgTitle, - buttons:msgButtons, - message: msg, - detail: msgdetail, - defaultId: defautlbtnid, - cancelId: cancelbtnid}); - }, - showError: function(errtitle,errmsg){ - dialog.showErrorBox(errtitle, errmsg); - }, - setPreference: function(key,data){ - console.log("set preference to: " + this.profilepath() + key + ".json"); - console.log(data); - if ((typeof data == 'object') || (typeof data == 'array')){ - data = JSON.stringify(data); - } - let result = fs.writeFileSync(this.profilepath() + key + ".json", data); - return result; - }, - getPreference: function(key){ - console.log("getPreference:" + this.profilepath() + key + ".json"); - let data = null; - if (fs.existsSync(this.profilepath() + key + ".json")){ - console.log("Read Key:" + key); - let data = fs.readFileSync(this.profilepath() + key + ".json", 'utf-8'); - if (data.startsWith("{") || data.startsWith("[")){ - data = JSON.parse(data); - } - return data; - } - return data; - }, - readAppFile: function(filename){ - if (fs.existsSync(__dirname + '/' + filename)){ - return fs.readFileSync(__dirname + '/' + filename, 'utf-8'); - } - return ""; - }, - getDataSets: function(){ - let datasets =[]; - //console.log(os.platform()); - //console.log("ProfilePath:" + this.profilepath()); - let files = fs.readdirSync(this.profilepath()); - files.forEach(function(file) { - if (file.match('.*\.json')){ - if (file != 'invoicejournal.json'){ - datasets.push({"label":file.replace('.json',''),"value":file}); - } - - } - }); - //console.log(datasets); - return datasets; - }, - getsysinfo: function(){ - return { - "hostname": os.hostname(), - "userdir": os.homedir(), - "platform": os.platform(), - "userinfo":os.userInfo() - } - }, - getApplicationPath: function(){ - let apath = path.dirname(__dirname); - return apath; - } -} \ No newline at end of file diff --git a/website/js/global/report.js b/website/js/global/report.js deleted file mode 100644 index 987a9a6..0000000 --- a/website/js/global/report.js +++ /dev/null @@ -1,130 +0,0 @@ -const { spawn } = require('child_process'); -//const fs = require('fs'); -let report = { - id_report: null, - tmpfolder: usersystem.profilepath() + 'tmp/', - tmpoutput: null, - output: null, - pdfoptions: null, - callback: null, - data: null, - reportfile:null, - open: function(reporttype,fname){ - console.log("prefs",preferences.global.currentdataset.datapath); - console.log("open", preferences.global.currentdataset.datapath + '/' + reporttype + '/' + fname); - if (fs.existsSync(preferences.global.currentdataset.datapath + '/' + reporttype + '/' + fname)){ - window.open(preferences.global.currentdataset.datapath + '/' + reporttype + '/' + fname); - } - }, - generate: function(id_report,reportdata,fname,callback){ - db.query("select * from newreports WHERE id='"+id_report+"';").then(data => { - console.log(data); - report.id_report = id_report; - report.tmpoutput = report.tmpfolder + fname + ".pdf"; - report.output = preferences.global.currentdataset.datapath + '/' + data.reporttype + '/' + fname + ".pdf"; - report.reportfile = fname+ ".pdf"; - report.pdfoptions = JSON.parse(data.pdfoptions); - report.callback = callback; - if (!fs.existsSync(report.tmpfolder)){ - fs.mkdirSync(usersystem.profilepath() + 'tmp/'); - } - if (!fs.existsSync(path.dirname(report.tmpoutput))){ - fs.mkdirSync(path.dirname(report.tmpoutput)); - } - if (fs.existsSync(report.tmpfolder + fname + ".pdf")){ - fs.unlinkSync(report.tmpfolder + fname + ".pdf"); - } - if (fs.existsSync(report.tmpfolder + id_report + ".content.html")){ - fs.unlinkSync(report.tmpfolder + id_report + ".content.html"); - } - if (fs.existsSync(report.tmpfolder + id_report + ".header.html")){ - fs.unlinkSync(report.tmpfolder + id_report + ".header.html"); - } - if (fs.existsSync(report.tmpfolder + id_report + ".footer.html")){ - fs.unlinkSync(report.tmpfolder + id_report + ".footer.html"); - } - - let doQueries = async() => { - let queryres = {}; - console.log("data.reportsql",data.reportsql); - let qq = JSON.parse(data.reportsql); - for (var i in qq){ - console.log(i); - let qsql = qq[i].sql; - console.log(qsql); - for (var dd in reportdata){ - qsql = qsql.replace('%%' + dd + '%%',reportdata[dd]); - } - console.log(qsql); - if (qq[i].type == 'query'){ - queryres[i] = await db.query(qsql); - } else if (qq[i].type == 'queryarray'){ - queryres[i] = await db.queryarray(qsql); - } - - } - return queryres; - } - doQueries().then(result => { - console.log(result); - let content = Mustache.render(data.contenthtml,result); - let header = Mustache.render(data.headerhtml,result); - let footer = Mustache.render(data.footerhtml,result); - console.log(report.tmpfolder + id_report + ".content.html"); - var result = fs.writeFileSync(report.tmpfolder + id_report + ".content.html",content); - result = fs.writeFileSync(report.tmpfolder + id_report + ".header.html", header); - result = fs.writeFileSync(report.tmpfolder + id_report + ".footer.html",footer); - //result = fs.writeFileSync(report.tmpfolder + id_report + ".data.js",JSON.stringify(result)); - report.compile(); - }); - }); - - }, - compile: function(){ - let args = []; - console.log("id_report",report.id_report) - console.log("pdfoptions",report.pdfoptions); - if (report.pdfoptions.bottom){ args.push("-B",report.pdfoptions.bottom + report.pdfoptions.unit); } - if (report.pdfoptions.left){ args.push("-L",report.pdfoptions.left+report.pdfoptions.unit); } - if (report.pdfoptions.right){ args.push("-R",report.pdfoptions.right+report.pdfoptions.unit); } - if (report.pdfoptions.top){ args.push("-T",report.pdfoptions.top+report.pdfoptions.unit); } - if (report.pdfoptions.orientation){ args.push("-O",report.pdfoptions.orientation); } - if (report.pdfoptions.size){ args.push("-s",report.pdfoptions.size); } - if (report.pdfoptions.encoding){ args.push("--encoding",report.pdfoptions.encoding); } - if (fs.existsSync(report.tmpfolder+ report.id_report + ".header.html")){ - args.push("--header-html",report.tmpfolder+ report.id_report + ".header.html"); - } - if (fs.existsSync(report.tmpfolder+ report.id_report + ".footer.html")){ - args.push("--footer-html",report.tmpfolder+ report.id_report + ".footer.html" ); - } - args.push(report.tmpfolder+ report.id_report + ".content.html" ); - report.tmpoutput = report.tmpoutput.replace(/\\/g,"/"); - args.push(report.tmpoutput); - console.log("Output to",report.tmpoutput); - console.log("AppPath",usersystem.getApplicationPath()); - console.log(args); - const pdfout = spawn(usersystem.getApplicationPath()+ '/tools/wkhtmltopdf.exe', args); - pdfout.stdout.on('data', (data) => { - - console.log(`pdfout stdout: ${data}`); - }); - - pdfout.stderr.on('data', (data) => { - console.error(`pdfout stderr: ${data}`); - }); - - pdfout.on('close', (code) => { - console.log(`pdfout: child process exited with code ${code}`); - if (code == 0){ - console.log("Copy",report.tmpoutput,"to",report.output); - if (fs.existsSync(report.output)){ - fs.unlinkSync(report.output); - } - fs.copyFileSync(report.tmpoutput,report.output); - report.callback({"file":report.reportfile}); - } - - }); - } -} - diff --git a/website/js/global/request.js b/website/js/global/request.js deleted file mode 100644 index 6e26cac..0000000 --- a/website/js/global/request.js +++ /dev/null @@ -1,245 +0,0 @@ -var api = 'http://localhost:6060/'; - -async function postData(module,schema,fn,data = {}) { - // Default options are marked with * - const response = await fetch(api + '/'+ module+'/'+ schema+'/'+fn, { - method: 'POST', - mode: 'same-origin', - cache: 'no-cache', - credentials: 'same-origin', - headers: { - 'Content-Type': 'application/json' - - }, - redirect: 'follow', - referrerPolicy: 'strict-origin', - body: JSON.stringify(data) - }); - return response.json(); - } -// if (location.pathname.indexOf('modules') > 0){ -// api = location.origin + location.pathname.substring(0, location.pathname.indexOf('module')) + 'api/'; -// } -//console.log(api); -var req = { - multipartform: function(url, frmname, callback) { - var ret = null; - var frm = document.getElementById(frmname); - var frmdata = new FormData(); - for (var i = 0; i < frm.elements.length; i++) { - var field = frm.elements[i]; - if ( field.tagName == "INPUT" && field.type == "file"){ - frmdata.append("file",field.files[0]); - } else if (field.tagName == "INPUT"){ - frmdata.append("folder",field.value); - } - } - if (!callback) { - callback = req.asyncNoEvent; - } - var request = new XMLHttpRequest(); - var sendurl = api + url; - console.log("Multipartsending URL: POST => " + sendurl + '?' + frmdata); - //console.log("Multipart sending URL: " + "POST" + " => " + sendurl); - request.open("POST", sendurl, true); - request.onload = function() { - if (request.status >= 200 && request.status <= 400) { - if (request.getResponseHeader("Content-Type").indexOf('application/json') == 0) { - var xparse = JSON.parse(request.responseText); - ret = xparse.result; - } else { - ret = request.responseText; - } - callback(ret); - } else { - alert("ServerERROR:" + request.status + "\n" + request.responseText); - } - }; - request.onerror = function() { - alert("Connection ERROR!\n" + url); - }; - request.setRequestHeader('Content-Type', 'multipart/form-data'); - request.send(frmdata); - return ret; - }, - reqdata: function( data, callback) { - - var ret = null; - var rdata = null; - - if (!callback) { - callback = req.asyncNoEvent; - } - - var request = new XMLHttpRequest(); - if (typeof data == 'object') { - var xdata = []; - for (var i in data) { - var value = ''; - if (typeof(data[i]) == 'object') { - value = encodeURIComponent(JSON.stringify(data[i])); - } else { - value = encodeURIComponent(data[i]); - } - xdata.push(i + "=" + value); - } - rdata = xdata.join("&"); - } else { - rdata = data; - } - var sendurl = api + "db.cgi"; - console.log("sending URL => " + sendurl + '?' + rdata); - request.open("POST", sendurl, true); - request.onload = function() { - if (request.status >= 200 && request.status <= 400) { - if (request.getResponseHeader("Content-Type").indexOf('application/json') == 0) { - console.log(xparse); - var xparse = JSON.parse(request.responseText); - ret = xparse.result; - console.log(ret); - } - - else { - ret = request.responseText; - //console.log("TEXT returned:" + ret); - } - callback(ret); - - - } else { - //console.log("ServerERROR: " + request.status + "\n" + request.responseText); - alert("ServerERROR:" + request.status + "\n" + request.responseText); - } - }; - request.onerror = function() { - //console.log("ERROR: connection ERROR\n" + url); - alert("Connection ERROR!\n" + url); - }; - request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8'); - request.send(rdata); - - return ret; - }, - reqfile: function(data, callback) { - - var ret = null; - var rdata = null; - - if (!callback) { - callback = req.asyncNoEvent; - } - - var request = new XMLHttpRequest(); - if (typeof data == 'object') { - var xdata = []; - for (var i in data) { - var value = ''; - if (typeof(data[i]) == 'object') { - value = encodeURIComponent(JSON.stringify(data[i])); - } else { - value = encodeURIComponent(data[i]); - } - xdata.push(i + "=" + value); - } - rdata = xdata.join("&"); - } else { - rdata = data; - } - var sendurl = api + "filesystem.cgi"; - console.log("sending URL => " + sendurl + '?' + rdata); - request.open("POST", sendurl, true); - request.onload = function() { - if (request.status >= 200 && request.status <= 400) { - if (request.getResponseHeader("Content-Type").indexOf('application/json') == 0) { - console.log(xparse); - var xparse = JSON.parse(request.responseText); - ret = xparse.result; - //console.log(ret); - } - - else { - ret = request.responseText; - //console.log("TEXT returned:" + ret); - } - callback(ret); - - - } else { - //console.log("ServerERROR: " + request.status + "\n" + request.responseText); - alert("ServerERROR:" + request.status + "\n" + request.responseText); - } - }; - request.onerror = function() { - //console.log("ERROR: connection ERROR\n" + url); - alert("Connection ERROR!\n" + url); - }; - request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8'); - request.send(rdata); - - return ret; - }, - reqreport: function( data, callback) { - - var ret = null; - var rdata = null; - - if (!callback) { - callback = req.asyncNoEvent; - } - - var request = new XMLHttpRequest(); - if (typeof data == 'object') { - var xdata = []; - for (var i in data) { - var value = ''; - if (typeof(data[i]) == 'object') { - value = encodeURIComponent(JSON.stringify(data[i])); - } else { - value = encodeURIComponent(data[i]); - } - xdata.push(i + "=" + value); - } - rdata = xdata.join("&"); - } else { - rdata = data; - } - var sendurl = api + "report.cgi"; - console.log("sending URL => " + sendurl + '?' + rdata); - request.open("POST", sendurl, true); - request.onload = function() { - if (request.status >= 200 && request.status <= 400) { - if (request.getResponseHeader("Content-Type").indexOf('application/json') == 0) { - console.log(xparse); - var xparse = JSON.parse(request.responseText); - ret = xparse.result; - - } - - else { - ret = request.responseText; - //console.log("TEXT returned:" + ret); - } - callback(ret); - - - } else { - //console.log("ServerERROR: " + request.status + "\n" + request.responseText); - alert("ServerERROR:" + request.status + "\n" + request.responseText); - } - }; - request.onerror = function() { - //console.log("ERROR: connection ERROR\n" + url); - alert("Connection ERROR!\n" + url); - }; - request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8'); - request.send(rdata); - - return ret; - }, - asyncNoEvent: function(data) { - //console.log("query done"); - //console.log(data); - //console.log("done"); - } - -} \ No newline at end of file diff --git a/website/js/global/sqlite.js b/website/js/global/sqlite.js deleted file mode 100644 index 2b08b63..0000000 --- a/website/js/global/sqlite.js +++ /dev/null @@ -1,98 +0,0 @@ -const sqlite3 = require('sqlite3').verbose(); - -let db = { - dbh: null, - connect: function(dbfile){ - if (db.dbh != null){ - db.disconnect(); - } - db.dbh = new sqlite3.Database(dbfile); - }, - query: function(sql){ - process.stderr.write("Query:\n-----\n"+sql+"\n-----\n"); - return new Promise((resolve, reject) => { - db.dbh.get(`${sql}`, (err, row) => { - if (err) { - reject(err); // optional: you might choose to swallow errors. - } else { - resolve(row); // accumulate the data - } - }); - }); - }, - queryarray: function(sql){ - process.stderr.write("QueryArray:\n-----\n"+sql+"\n-----\n"); - return new Promise((resolve, reject) => { - let queries = []; - db.dbh.each(`${sql}`, (err, row) => { - if (err) { - reject(err); // optional: you might choose to swallow errors. - } else { - queries.push(row); // accumulate the data - } - }, (err, n) => { - if (err) { - reject(err); // optional: again, you might choose to swallow this error. - } else { - resolve(queries); // resolve the promise - } - }); - }); - }, - querybykey: function(key,sql){ - process.stderr.write("QueryByKey:\n-----\n"+sql+"\n-----\n"); - return new Promise((resolve, reject) => { - let ret = {} - db.dbh.each(`${sql}`, (err, row) => { - if (err) { - reject(err); // optional: you might choose to swallow errors. - } else { - ret[row[key]] = row; - } - }, (err, n) => { - if (err) { - reject(err); // optional: again, you might choose to swallow this error. - } else { - resolve(ret); // resolve the promise - } - }); - }); - }, - exec: function(sql,callback){ - process.stderr.write("Exec:\n-----\n"+sql+"\n-----\n"); - try { - return db.dbh.exec(sql); - } catch(e){ - console.log(e); - } - - }, - execAsync: function(sql){ - process.stderr.write("ExecAsync:\n-----\n"+sql+"\n-----\n"); - return new Promise((resolve, reject) => { - db.dbh.exec(`${sql}`, (err, row) => { - if (err) { - reject(err); // optional: you might choose to swallow errors. - } else { - resolve(row); // accumulate the data - } - }); - }); - }, - newuuid: function(){ - return db.query("SELECT lower(hex( randomblob(4)) || '-' || hex( randomblob(2)) || '-' || hex( randomblob(2)) || '-' || hex( randomblob(2)) || '-' || hex(randomblob(6))) as id;"); - }, - disconnect: function(){ - db.dbh = null; - }, - create_insert: function(tbl,data){ - let sqlcols = []; - let sqlvals = []; - for (var c in data){ - sqlcols.push(c); - sqlvals.push("'" + data[c] +"'"); - } - let inssql = "INSERT INTO " + tbl + "(" + sqlcols.join(',') +") VALUES (" + sqlvals.join(',')+ ")"; - return inssql; - } -} \ No newline at end of file diff --git a/website/js/timecalc.js b/website/js/timecalc.js deleted file mode 100644 index e4bdfd2..0000000 --- a/website/js/timecalc.js +++ /dev/null @@ -1,37 +0,0 @@ -var timecalc = { - MinutesToTime:function (minutes) { - if ((minutes == null) || (minutes == "")){ return "00:00";}; - var hours = parseInt(minutes/60); - var restminutes = minutes-(hours*60); - return hours+ ":"+ timecalc.lpad(restminutes,2,'0'); - }, - TimeToMinutes:function (strtime){ - var hours = parseInt(strtime.substring(0,2)) * 60; - var minutes = parseInt(strtime.substr(3,5)); - return hours+minutes; - }, - lpad: function(str, length,padString) { - str = str.toString(); - while (str.length < length) - str = padString + str; - return str; - }, - mondayBefore: function(sdate){ - if (sdate == null){ - sdate=new Date(); - } - var day = sdate.getDay(); - var prevMonday = new Date(); - if(sdate.getDay() == 0){ - prevMonday = new Date().setDate(sdate.getDate() - 0); - } - else{ - prevMonday = new Date().setDate(sdate.getDate() - day); - } - - return new Date(prevMonday); - }, - sundayAfter: function(sdate){ - var nextSunday = new Date(); - } -} \ No newline at end of file diff --git a/website/js/vendor/moment/moment-with-locales.min.js b/website/js/vendor/moment/moment-with-locales.min.js deleted file mode 100644 index 02cd72b..0000000 --- a/website/js/vendor/moment/moment-with-locales.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a():"function"==typeof define&&define.amd?define(a):e.moment=a()}(this,function(){"use strict";var e,n;function l(){return e.apply(null,arguments)}function _(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function o(e){return void 0===e}function m(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function M(e,a){var t,s=[];for(t=0;t>>0,s=0;sTe(e)?(d=e+1,_-Te(e)):(d=e,_),{year:d,dayOfYear:r}}function Ie(e,a,t){var s,n,d=Ne(e.year(),a,t),r=Math.floor((e.dayOfYear()-d-1)/7)+1;return r<1?s=r+Ce(n=e.year()-1,a,t):r>Ce(e.year(),a,t)?(s=r-Ce(e.year(),a,t),n=e.year()+1):(n=e.year(),s=r),{week:s,year:n}}function Ce(e,a,t){var s=Ne(e,a,t),n=Ne(e+1,a,t);return(Te(e)-s+n)/7}I("w",["ww",2],"wo","week"),I("W",["WW",2],"Wo","isoWeek"),P("week","w"),P("isoWeek","W"),A("week",5),A("isoWeek",5),ie("w",B),ie("ww",B,V),ie("W",B),ie("WW",B,V),Me(["w","ww","W","WW"],function(e,a,t,s){a[s.substr(0,1)]=g(e)});I("d",0,"do","day"),I("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),I("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),I("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),I("e",0,0,"weekday"),I("E",0,0,"isoWeekday"),P("day","d"),P("weekday","e"),P("isoWeekday","E"),A("day",11),A("weekday",11),A("isoWeekday",11),ie("d",B),ie("e",B),ie("E",B),ie("dd",function(e,a){return a.weekdaysMinRegex(e)}),ie("ddd",function(e,a){return a.weekdaysShortRegex(e)}),ie("dddd",function(e,a){return a.weekdaysRegex(e)}),Me(["dd","ddd","dddd"],function(e,a,t,s){var n=t._locale.weekdaysParse(e,s,t._strict);null!=n?a.d=n:Y(t).invalidWeekday=e}),Me(["d","e","E"],function(e,a,t,s){a[s]=g(e)});var Ge="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var Ue="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var Ve="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var Ke=re;var $e=re;var Ze=re;function Be(){function e(e,a){return a.length-e.length}var a,t,s,n,d,r=[],_=[],i=[],o=[];for(a=0;a<7;a++)t=c([2e3,1]).day(a),s=this.weekdaysMin(t,""),n=this.weekdaysShort(t,""),d=this.weekdays(t,""),r.push(s),_.push(n),i.push(d),o.push(s),o.push(n),o.push(d);for(r.sort(e),_.sort(e),i.sort(e),o.sort(e),a=0;a<7;a++)_[a]=me(_[a]),i[a]=me(i[a]),o[a]=me(o[a]);this._weekdaysRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+_.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function qe(){return this.hours()%12||12}function Qe(e,a){I(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),a)})}function Xe(e,a){return a._meridiemParse}I("H",["HH",2],0,"hour"),I("h",["hh",2],0,qe),I("k",["kk",2],0,function(){return this.hours()||24}),I("hmm",0,0,function(){return""+qe.apply(this)+F(this.minutes(),2)}),I("hmmss",0,0,function(){return""+qe.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)}),I("Hmm",0,0,function(){return""+this.hours()+F(this.minutes(),2)}),I("Hmmss",0,0,function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)}),Qe("a",!0),Qe("A",!1),P("hour","h"),A("hour",13),ie("a",Xe),ie("A",Xe),ie("H",B),ie("h",B),ie("k",B),ie("HH",B,V),ie("hh",B,V),ie("kk",B,V),ie("hmm",q),ie("hmmss",Q),ie("Hmm",q),ie("Hmmss",Q),le(["H","HH"],Ye),le(["k","kk"],function(e,a,t){var s=g(e);a[Ye]=24===s?0:s}),le(["a","A"],function(e,a,t){t._isPm=t._locale.isPM(e),t._meridiem=e}),le(["h","hh"],function(e,a,t){a[Ye]=g(e),Y(t).bigHour=!0}),le("hmm",function(e,a,t){var s=e.length-2;a[Ye]=g(e.substr(0,s)),a[ye]=g(e.substr(s)),Y(t).bigHour=!0}),le("hmmss",function(e,a,t){var s=e.length-4,n=e.length-2;a[Ye]=g(e.substr(0,s)),a[ye]=g(e.substr(s,2)),a[fe]=g(e.substr(n)),Y(t).bigHour=!0}),le("Hmm",function(e,a,t){var s=e.length-2;a[Ye]=g(e.substr(0,s)),a[ye]=g(e.substr(s))}),le("Hmmss",function(e,a,t){var s=e.length-4,n=e.length-2;a[Ye]=g(e.substr(0,s)),a[ye]=g(e.substr(s,2)),a[fe]=g(e.substr(n))});var ea,aa=He("Hours",!0),ta={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Pe,monthsShort:Oe,week:{dow:0,doy:6},weekdays:Ge,weekdaysMin:Ve,weekdaysShort:Ue,meridiemParse:/[ap]\.?m?\.?/i},sa={},na={};function da(e){return e?e.toLowerCase().replace("_","-"):e}function ra(e){var a=null;if(!sa[e]&&"undefined"!=typeof module&&module&&module.exports)try{a=ea._abbr,require("./locale/"+e),_a(a)}catch(e){}return sa[e]}function _a(e,a){var t;return e&&((t=o(a)?oa(e):ia(e,a))?ea=t:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),ea._abbr}function ia(e,a){if(null===a)return delete sa[e],null;var t,s=ta;if(a.abbr=e,null!=sa[e])H("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=sa[e]._config;else if(null!=a.parentLocale)if(null!=sa[a.parentLocale])s=sa[a.parentLocale]._config;else{if(null==(t=ra(a.parentLocale)))return na[a.parentLocale]||(na[a.parentLocale]=[]),na[a.parentLocale].push({name:e,config:a}),null;s=t._config}return sa[e]=new j(b(s,a)),na[e]&&na[e].forEach(function(e){ia(e.name,e.config)}),_a(e),sa[e]}function oa(e){var a;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return ea;if(!_(e)){if(a=ra(e))return a;e=[e]}return function(e){for(var a,t,s,n,d=0;d=a&&r(n,t,!0)>=a-1)break;a--}d++}return ea}(e)}function ma(e){var a,t=e._a;return t&&-2===Y(e).overflow&&(a=t[Le]<0||11je(t[he],t[Le])?ce:t[Ye]<0||24Ce(t,d,r)?Y(e)._overflowWeeks=!0:null!=i?Y(e)._overflowWeekday=!0:(_=Re(t,s,n,d,r),e._a[he]=_.year,e._dayOfYear=_.dayOfYear)}(e),null!=e._dayOfYear&&(d=ua(e._a[he],s[he]),(e._dayOfYear>Te(d)||0===e._dayOfYear)&&(Y(e)._overflowDayOfYear=!0),t=Je(d,0,e._dayOfYear),e._a[Le]=t.getUTCMonth(),e._a[ce]=t.getUTCDate()),a=0;a<3&&null==e._a[a];++a)e._a[a]=r[a]=s[a];for(;a<7;a++)e._a[a]=r[a]=null==e._a[a]?2===a?1:0:e._a[a];24===e._a[Ye]&&0===e._a[ye]&&0===e._a[fe]&&0===e._a[ke]&&(e._nextDay=!0,e._a[Ye]=0),e._d=(e._useUTC?Je:function(e,a,t,s,n,d,r){var _=new Date(e,a,t,s,n,d,r);return e<100&&0<=e&&isFinite(_.getFullYear())&&_.setFullYear(e),_}).apply(null,r),n=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ye]=24),e._w&&void 0!==e._w.d&&e._w.d!==n&&(Y(e).weekdayMismatch=!0)}}var Ma=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ha=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,La=/Z|[+-]\d\d(?::?\d\d)?/,ca=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Ya=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],ya=/^\/?Date\((\-?\d+)/i;function fa(e){var a,t,s,n,d,r,_=e._i,i=Ma.exec(_)||ha.exec(_);if(i){for(Y(e).iso=!0,a=0,t=ca.length;at.valueOf():t.valueOf()this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},it.isLocal=function(){return!!this.isValid()&&!this._isUTC},it.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},it.isUtc=Na,it.isUTC=Na,it.zoneAbbr=function(){return this._isUTC?"UTC":""},it.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},it.dates=t("dates accessor is deprecated. Use date instead.",tt),it.months=t("months accessor is deprecated. Use month instead",Ee),it.years=t("years accessor is deprecated. Use year instead",ve),it.zone=t("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,a){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,a),this):-this.utcOffset()}),it.isDSTShifted=t("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!o(this._isDSTShifted))return this._isDSTShifted;var e={};if(k(e,this),(e=wa(e))._a){var a=e._isUTC?c(e._a):Ha(e._a);this._isDSTShifted=this.isValid()&&0>>0,s=0;sDe(e)?(r=e+1,o-De(e)):(r=e,o),{year:r,dayOfYear:a}}function Ie(e,t,n){var s,i,r=Ve(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?s=a+Ae(i=e.year()-1,t,n):a>Ae(e.year(),t,n)?(s=a-Ae(e.year(),t,n),i=e.year()+1):(i=e.year(),s=a),{week:s,year:i}}function Ae(e,t,n){var s=Ve(e,t,n),i=Ve(e+1,t,n);return(De(e)-s+i)/7}I("w",["ww",2],"wo","week"),I("W",["WW",2],"Wo","isoWeek"),H("week","w"),H("isoWeek","W"),L("week",5),L("isoWeek",5),ue("w",B),ue("ww",B,z),ue("W",B),ue("WW",B,z),fe(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=k(e)});I("d",0,"do","day"),I("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),I("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),I("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),I("e",0,0,"weekday"),I("E",0,0,"isoWeekday"),H("day","d"),H("weekday","e"),H("isoWeekday","E"),L("day",11),L("weekday",11),L("isoWeekday",11),ue("d",B),ue("e",B),ue("E",B),ue("dd",function(e,t){return t.weekdaysMinRegex(e)}),ue("ddd",function(e,t){return t.weekdaysShortRegex(e)}),ue("dddd",function(e,t){return t.weekdaysRegex(e)}),fe(["dd","ddd","dddd"],function(e,t,n,s){var i=n._locale.weekdaysParse(e,s,n._strict);null!=i?t.d=i:g(n).invalidWeekday=e}),fe(["d","e","E"],function(e,t,n,s){t[s]=k(e)});var je="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var Ze="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var ze="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var $e=ae;var qe=ae;var Je=ae;function Be(){function e(e,t){return t.length-e.length}var t,n,s,i,r,a=[],o=[],u=[],l=[];for(t=0;t<7;t++)n=y([2e3,1]).day(t),s=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),r=this.weekdays(n,""),a.push(s),o.push(i),u.push(r),l.push(s),l.push(i),l.push(r);for(a.sort(e),o.sort(e),u.sort(e),l.sort(e),t=0;t<7;t++)o[t]=de(o[t]),u[t]=de(u[t]),l[t]=de(l[t]);this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Qe(){return this.hours()%12||12}function Xe(e,t){I(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function Ke(e,t){return t._meridiemParse}I("H",["HH",2],0,"hour"),I("h",["hh",2],0,Qe),I("k",["kk",2],0,function(){return this.hours()||24}),I("hmm",0,0,function(){return""+Qe.apply(this)+U(this.minutes(),2)}),I("hmmss",0,0,function(){return""+Qe.apply(this)+U(this.minutes(),2)+U(this.seconds(),2)}),I("Hmm",0,0,function(){return""+this.hours()+U(this.minutes(),2)}),I("Hmmss",0,0,function(){return""+this.hours()+U(this.minutes(),2)+U(this.seconds(),2)}),Xe("a",!0),Xe("A",!1),H("hour","h"),L("hour",13),ue("a",Ke),ue("A",Ke),ue("H",B),ue("h",B),ue("k",B),ue("HH",B,z),ue("hh",B,z),ue("kk",B,z),ue("hmm",Q),ue("hmmss",X),ue("Hmm",Q),ue("Hmmss",X),ce(["H","HH"],ge),ce(["k","kk"],function(e,t,n){var s=k(e);t[ge]=24===s?0:s}),ce(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ce(["h","hh"],function(e,t,n){t[ge]=k(e),g(n).bigHour=!0}),ce("hmm",function(e,t,n){var s=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s)),g(n).bigHour=!0}),ce("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s,2)),t[ve]=k(e.substr(i)),g(n).bigHour=!0}),ce("Hmm",function(e,t,n){var s=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s))}),ce("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s,2)),t[ve]=k(e.substr(i))});var et,tt=Te("Hours",!0),nt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:He,monthsShort:Re,week:{dow:0,doy:6},weekdays:je,weekdaysMin:ze,weekdaysShort:Ze,meridiemParse:/[ap]\.?m?\.?/i},st={},it={};function rt(e){return e?e.toLowerCase().replace("_","-"):e}function at(e){var t=null;if(!st[e]&&"undefined"!=typeof module&&module&&module.exports)try{t=et._abbr,require("./locale/"+e),ot(t)}catch(e){}return st[e]}function ot(e,t){var n;return e&&((n=l(t)?lt(e):ut(e,t))?et=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),et._abbr}function ut(e,t){if(null===t)return delete st[e],null;var n,s=nt;if(t.abbr=e,null!=st[e])T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=st[e]._config;else if(null!=t.parentLocale)if(null!=st[t.parentLocale])s=st[t.parentLocale]._config;else{if(null==(n=at(t.parentLocale)))return it[t.parentLocale]||(it[t.parentLocale]=[]),it[t.parentLocale].push({name:e,config:t}),null;s=n._config}return st[e]=new P(b(s,t)),it[e]&&it[e].forEach(function(e){ut(e.name,e.config)}),ot(e),st[e]}function lt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return et;if(!o(e)){if(t=at(e))return t;e=[e]}return function(e){for(var t,n,s,i,r=0;r=t&&a(i,n,!0)>=t-1)break;t--}r++}return et}(e)}function dt(e){var t,n=e._a;return n&&-2===g(e).overflow&&(t=n[_e]<0||11Pe(n[me],n[_e])?ye:n[ge]<0||24Ae(n,r,a)?g(e)._overflowWeeks=!0:null!=u?g(e)._overflowWeekday=!0:(o=Ee(n,s,i,r,a),e._a[me]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(r=ht(e._a[me],s[me]),(e._dayOfYear>De(r)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=Ge(r,0,e._dayOfYear),e._a[_e]=n.getUTCMonth(),e._a[ye]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=s[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ge]&&0===e._a[pe]&&0===e._a[ve]&&0===e._a[we]&&(e._nextDay=!0,e._a[ge]=0),e._d=(e._useUTC?Ge:function(e,t,n,s,i,r,a){var o=new Date(e,t,n,s,i,r,a);return e<100&&0<=e&&isFinite(o.getFullYear())&&o.setFullYear(e),o}).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ge]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(g(e).weekdayMismatch=!0)}}var ft=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,mt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_t=/Z|[+-]\d\d(?::?\d\d)?/,yt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],gt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],pt=/^\/?Date\((\-?\d+)/i;function vt(e){var t,n,s,i,r,a,o=e._i,u=ft.exec(o)||mt.exec(o);if(u){for(g(e).iso=!0,t=0,n=yt.length;tn.valueOf():n.valueOf()this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},ln.isLocal=function(){return!!this.isValid()&&!this._isUTC},ln.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},ln.isUtc=Vt,ln.isUTC=Vt,ln.zoneAbbr=function(){return this._isUTC?"UTC":""},ln.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},ln.dates=n("dates accessor is deprecated. Use date instead.",nn),ln.months=n("months accessor is deprecated. Use month instead",Fe),ln.years=n("years accessor is deprecated. Use year instead",Oe),ln.zone=n("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),ln.isDSTShifted=n("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e={};if(w(e,this),(e=Yt(e))._a){var t=e._isUTC?y(e._a):Tt(e._a);this._isDSTShifted=this.isValid()&&0': '>', - '"': '"', - "'": ''', - '/': '/', - '`': '`', - '=': '=' - }; - - function escapeHtml (string) { - return String(string).replace(/[&<>"'`=\/]/g, function fromEntityMap (s) { - return entityMap[s]; - }); - } - - var whiteRe = /\s*/; - var spaceRe = /\s+/; - var equalsRe = /\s*=/; - var curlyRe = /\s*\}/; - var tagRe = /#|\^|\/|>|\{|&|=|!/; - - /** - * Breaks up the given `template` string into a tree of tokens. If the `tags` - * argument is given here it must be an array with two string values: the - * opening and closing tags used in the template (e.g. [ "<%", "%>" ]). Of - * course, the default is to use mustaches (i.e. mustache.tags). - * - * A token is an array with at least 4 elements. The first element is the - * mustache symbol that was used inside the tag, e.g. "#" or "&". If the tag - * did not contain a symbol (i.e. {{myValue}}) this element is "name". For - * all text that appears outside a symbol this element is "text". - * - * The second element of a token is its "value". For mustache tags this is - * whatever else was inside the tag besides the opening symbol. For text tokens - * this is the text itself. - * - * The third and fourth elements of the token are the start and end indices, - * respectively, of the token in the original template. - * - * Tokens that are the root node of a subtree contain two more elements: 1) an - * array of tokens in the subtree and 2) the index in the original template at - * which the closing tag for that section begins. - * - * Tokens for partials also contain two more elements: 1) a string value of - * indendation prior to that tag and 2) the index of that tag on that line - - * eg a value of 2 indicates the partial is the third tag on this line. - */ - function parseTemplate (template, tags) { - if (!template) - return []; - var lineHasNonSpace = false; - var sections = []; // Stack to hold section tokens - var tokens = []; // Buffer to hold the tokens - var spaces = []; // Indices of whitespace tokens on the current line - var hasTag = false; // Is there a {{tag}} on the current line? - var nonSpace = false; // Is there a non-space char on the current line? - var indentation = ''; // Tracks indentation for tags that use it - var tagIndex = 0; // Stores a count of number of tags encountered on a line - - // Strips all whitespace tokens array for the current line - // if there was a {{#tag}} on it and otherwise only space. - function stripSpace () { - if (hasTag && !nonSpace) { - while (spaces.length) - delete tokens[spaces.pop()]; - } else { - spaces = []; - } - - hasTag = false; - nonSpace = false; - } - - var openingTagRe, closingTagRe, closingCurlyRe; - function compileTags (tagsToCompile) { - if (typeof tagsToCompile === 'string') - tagsToCompile = tagsToCompile.split(spaceRe, 2); - - if (!isArray(tagsToCompile) || tagsToCompile.length !== 2) - throw new Error('Invalid tags: ' + tagsToCompile); - - openingTagRe = new RegExp(escapeRegExp(tagsToCompile[0]) + '\\s*'); - closingTagRe = new RegExp('\\s*' + escapeRegExp(tagsToCompile[1])); - closingCurlyRe = new RegExp('\\s*' + escapeRegExp('}' + tagsToCompile[1])); - } - - compileTags(tags || mustache.tags); - - var scanner = new Scanner(template); - - var start, type, value, chr, token, openSection; - while (!scanner.eos()) { - start = scanner.pos; - - // Match any text between tags. - value = scanner.scanUntil(openingTagRe); - - if (value) { - for (var i = 0, valueLength = value.length; i < valueLength; ++i) { - chr = value.charAt(i); - - if (isWhitespace(chr)) { - spaces.push(tokens.length); - indentation += chr; - } else { - nonSpace = true; - lineHasNonSpace = true; - indentation += ' '; - } - - tokens.push([ 'text', chr, start, start + 1 ]); - start += 1; - - // Check for whitespace on the current line. - if (chr === '\n') { - stripSpace(); - indentation = ''; - tagIndex = 0; - lineHasNonSpace = false; - } - } - } - - // Match the opening tag. - if (!scanner.scan(openingTagRe)) - break; - - hasTag = true; - - // Get the tag type. - type = scanner.scan(tagRe) || 'name'; - scanner.scan(whiteRe); - - // Get the tag value. - if (type === '=') { - value = scanner.scanUntil(equalsRe); - scanner.scan(equalsRe); - scanner.scanUntil(closingTagRe); - } else if (type === '{') { - value = scanner.scanUntil(closingCurlyRe); - scanner.scan(curlyRe); - scanner.scanUntil(closingTagRe); - type = '&'; - } else { - value = scanner.scanUntil(closingTagRe); - } - - // Match the closing tag. - if (!scanner.scan(closingTagRe)) - throw new Error('Unclosed tag at ' + scanner.pos); - - if (type == '>') { - token = [ type, value, start, scanner.pos, indentation, tagIndex, lineHasNonSpace ]; - } else { - token = [ type, value, start, scanner.pos ]; - } - tagIndex++; - tokens.push(token); - - if (type === '#' || type === '^') { - sections.push(token); - } else if (type === '/') { - // Check section nesting. - openSection = sections.pop(); - - if (!openSection) - throw new Error('Unopened section "' + value + '" at ' + start); - - if (openSection[1] !== value) - throw new Error('Unclosed section "' + openSection[1] + '" at ' + start); - } else if (type === 'name' || type === '{' || type === '&') { - nonSpace = true; - } else if (type === '=') { - // Set the tags for the next time around. - compileTags(value); - } - } - - stripSpace(); - - // Make sure there are no open sections when we're done. - openSection = sections.pop(); - - if (openSection) - throw new Error('Unclosed section "' + openSection[1] + '" at ' + scanner.pos); - - return nestTokens(squashTokens(tokens)); - } - - /** - * Combines the values of consecutive text tokens in the given `tokens` array - * to a single token. - */ - function squashTokens (tokens) { - var squashedTokens = []; - - var token, lastToken; - for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) { - token = tokens[i]; - - if (token) { - if (token[0] === 'text' && lastToken && lastToken[0] === 'text') { - lastToken[1] += token[1]; - lastToken[3] = token[3]; - } else { - squashedTokens.push(token); - lastToken = token; - } - } - } - - return squashedTokens; - } - - /** - * Forms the given array of `tokens` into a nested tree structure where - * tokens that represent a section have two additional items: 1) an array of - * all tokens that appear in that section and 2) the index in the original - * template that represents the end of that section. - */ - function nestTokens (tokens) { - var nestedTokens = []; - var collector = nestedTokens; - var sections = []; - - var token, section; - for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) { - token = tokens[i]; - - switch (token[0]) { - case '#': - case '^': - collector.push(token); - sections.push(token); - collector = token[4] = []; - break; - case '/': - section = sections.pop(); - section[5] = token[2]; - collector = sections.length > 0 ? sections[sections.length - 1][4] : nestedTokens; - break; - default: - collector.push(token); - } - } - - return nestedTokens; - } - - /** - * A simple string scanner that is used by the template parser to find - * tokens in template strings. - */ - function Scanner (string) { - this.string = string; - this.tail = string; - this.pos = 0; - } - - /** - * Returns `true` if the tail is empty (end of string). - */ - Scanner.prototype.eos = function eos () { - return this.tail === ''; - }; - - /** - * Tries to match the given regular expression at the current position. - * Returns the matched text if it can match, the empty string otherwise. - */ - Scanner.prototype.scan = function scan (re) { - var match = this.tail.match(re); - - if (!match || match.index !== 0) - return ''; - - var string = match[0]; - - this.tail = this.tail.substring(string.length); - this.pos += string.length; - - return string; - }; - - /** - * Skips all text until the given regular expression can be matched. Returns - * the skipped string, which is the entire tail if no match can be made. - */ - Scanner.prototype.scanUntil = function scanUntil (re) { - var index = this.tail.search(re), match; - - switch (index) { - case -1: - match = this.tail; - this.tail = ''; - break; - case 0: - match = ''; - break; - default: - match = this.tail.substring(0, index); - this.tail = this.tail.substring(index); - } - - this.pos += match.length; - - return match; - }; - - /** - * Represents a rendering context by wrapping a view object and - * maintaining a reference to the parent context. - */ - function Context (view, parentContext) { - this.view = view; - this.cache = { '.': this.view }; - this.parent = parentContext; - } - - /** - * Creates a new context using the given view with this context - * as the parent. - */ - Context.prototype.push = function push (view) { - return new Context(view, this); - }; - - /** - * Returns the value of the given name in this context, traversing - * up the context hierarchy if the value is absent in this context's view. - */ - Context.prototype.lookup = function lookup (name) { - var cache = this.cache; - - var value; - if (cache.hasOwnProperty(name)) { - value = cache[name]; - } else { - var context = this, intermediateValue, names, index, lookupHit = false; - - while (context) { - if (name.indexOf('.') > 0) { - intermediateValue = context.view; - names = name.split('.'); - index = 0; - - /** - * Using the dot notion path in `name`, we descend through the - * nested objects. - * - * To be certain that the lookup has been successful, we have to - * check if the last object in the path actually has the property - * we are looking for. We store the result in `lookupHit`. - * - * This is specially necessary for when the value has been set to - * `undefined` and we want to avoid looking up parent contexts. - * - * In the case where dot notation is used, we consider the lookup - * to be successful even if the last "object" in the path is - * not actually an object but a primitive (e.g., a string, or an - * integer), because it is sometimes useful to access a property - * of an autoboxed primitive, such as the length of a string. - **/ - while (intermediateValue != null && index < names.length) { - if (index === names.length - 1) - lookupHit = ( - hasProperty(intermediateValue, names[index]) - || primitiveHasOwnProperty(intermediateValue, names[index]) - ); - - intermediateValue = intermediateValue[names[index++]]; - } - } else { - intermediateValue = context.view[name]; - - /** - * Only checking against `hasProperty`, which always returns `false` if - * `context.view` is not an object. Deliberately omitting the check - * against `primitiveHasOwnProperty` if dot notation is not used. - * - * Consider this example: - * ``` - * Mustache.render("The length of a football field is {{#length}}{{length}}{{/length}}.", {length: "100 yards"}) - * ``` - * - * If we were to check also against `primitiveHasOwnProperty`, as we do - * in the dot notation case, then render call would return: - * - * "The length of a football field is 9." - * - * rather than the expected: - * - * "The length of a football field is 100 yards." - **/ - lookupHit = hasProperty(context.view, name); - } - - if (lookupHit) { - value = intermediateValue; - break; - } - - context = context.parent; - } - - cache[name] = value; - } - - if (isFunction(value)) - value = value.call(this.view); - - return value; - }; - - /** - * A Writer knows how to take a stream of tokens and render them to a - * string, given a context. It also maintains a cache of templates to - * avoid the need to parse the same template twice. - */ - function Writer () { - this.templateCache = { - _cache: {}, - set: function set (key, value) { - this._cache[key] = value; - }, - get: function get (key) { - return this._cache[key]; - }, - clear: function clear () { - this._cache = {}; - } - }; - } - - /** - * Clears all cached templates in this writer. - */ - Writer.prototype.clearCache = function clearCache () { - if (typeof this.templateCache !== 'undefined') { - this.templateCache.clear(); - } - }; - - /** - * Parses and caches the given `template` according to the given `tags` or - * `mustache.tags` if `tags` is omitted, and returns the array of tokens - * that is generated from the parse. - */ - Writer.prototype.parse = function parse (template, tags) { - var cache = this.templateCache; - var cacheKey = template + ':' + (tags || mustache.tags).join(':'); - var isCacheEnabled = typeof cache !== 'undefined'; - var tokens = isCacheEnabled ? cache.get(cacheKey) : undefined; - - if (tokens == undefined) { - tokens = parseTemplate(template, tags); - isCacheEnabled && cache.set(cacheKey, tokens); - } - return tokens; - }; - - /** - * High-level method that is used to render the given `template` with - * the given `view`. - * - * The optional `partials` argument may be an object that contains the - * names and templates of partials that are used in the template. It may - * also be a function that is used to load partial templates on the fly - * that takes a single argument: the name of the partial. - * - * If the optional `tags` argument is given here it must be an array with two - * string values: the opening and closing tags used in the template (e.g. - * [ "<%", "%>" ]). The default is to mustache.tags. - */ - Writer.prototype.render = function render (template, view, partials, tags) { - var tokens = this.parse(template, tags); - var context = (view instanceof Context) ? view : new Context(view, undefined); - return this.renderTokens(tokens, context, partials, template, tags); - }; - - /** - * Low-level method that renders the given array of `tokens` using - * the given `context` and `partials`. - * - * Note: The `originalTemplate` is only ever used to extract the portion - * of the original template that was contained in a higher-order section. - * If the template doesn't use higher-order sections, this argument may - * be omitted. - */ - Writer.prototype.renderTokens = function renderTokens (tokens, context, partials, originalTemplate, tags) { - var buffer = ''; - - var token, symbol, value; - for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) { - value = undefined; - token = tokens[i]; - symbol = token[0]; - - if (symbol === '#') value = this.renderSection(token, context, partials, originalTemplate); - else if (symbol === '^') value = this.renderInverted(token, context, partials, originalTemplate); - else if (symbol === '>') value = this.renderPartial(token, context, partials, tags); - else if (symbol === '&') value = this.unescapedValue(token, context); - else if (symbol === 'name') value = this.escapedValue(token, context); - else if (symbol === 'text') value = this.rawValue(token); - - if (value !== undefined) - buffer += value; - } - - return buffer; - }; - - Writer.prototype.renderSection = function renderSection (token, context, partials, originalTemplate) { - var self = this; - var buffer = ''; - var value = context.lookup(token[1]); - - // This function is used to render an arbitrary template - // in the current context by higher-order sections. - function subRender (template) { - return self.render(template, context, partials); - } - - if (!value) return; - - if (isArray(value)) { - for (var j = 0, valueLength = value.length; j < valueLength; ++j) { - buffer += this.renderTokens(token[4], context.push(value[j]), partials, originalTemplate); - } - } else if (typeof value === 'object' || typeof value === 'string' || typeof value === 'number') { - buffer += this.renderTokens(token[4], context.push(value), partials, originalTemplate); - } else if (isFunction(value)) { - if (typeof originalTemplate !== 'string') - throw new Error('Cannot use higher-order sections without the original template'); - - // Extract the portion of the original template that the section contains. - value = value.call(context.view, originalTemplate.slice(token[3], token[5]), subRender); - - if (value != null) - buffer += value; - } else { - buffer += this.renderTokens(token[4], context, partials, originalTemplate); - } - return buffer; - }; - - Writer.prototype.renderInverted = function renderInverted (token, context, partials, originalTemplate) { - var value = context.lookup(token[1]); - - // Use JavaScript's definition of falsy. Include empty arrays. - // See https://github.com/janl/mustache.js/issues/186 - if (!value || (isArray(value) && value.length === 0)) - return this.renderTokens(token[4], context, partials, originalTemplate); - }; - - Writer.prototype.indentPartial = function indentPartial (partial, indentation, lineHasNonSpace) { - var filteredIndentation = indentation.replace(/[^ \t]/g, ''); - var partialByNl = partial.split('\n'); - for (var i = 0; i < partialByNl.length; i++) { - if (partialByNl[i].length && (i > 0 || !lineHasNonSpace)) { - partialByNl[i] = filteredIndentation + partialByNl[i]; - } - } - return partialByNl.join('\n'); - }; - - Writer.prototype.renderPartial = function renderPartial (token, context, partials, tags) { - if (!partials) return; - - var value = isFunction(partials) ? partials(token[1]) : partials[token[1]]; - if (value != null) { - var lineHasNonSpace = token[6]; - var tagIndex = token[5]; - var indentation = token[4]; - var indentedValue = value; - if (tagIndex == 0 && indentation) { - indentedValue = this.indentPartial(value, indentation, lineHasNonSpace); - } - return this.renderTokens(this.parse(indentedValue, tags), context, partials, indentedValue, tags); - } - }; - - Writer.prototype.unescapedValue = function unescapedValue (token, context) { - var value = context.lookup(token[1]); - if (value != null) - return value; - }; - - Writer.prototype.escapedValue = function escapedValue (token, context) { - var value = context.lookup(token[1]); - if (value != null) - return mustache.escape(value); - }; - - Writer.prototype.rawValue = function rawValue (token) { - return token[1]; - }; - - var mustache = { - name: 'mustache.js', - version: '4.0.1', - tags: [ '{{', '}}' ], - clearCache: undefined, - escape: undefined, - parse: undefined, - render: undefined, - Scanner: undefined, - Context: undefined, - Writer: undefined, - /** - * Allows a user to override the default caching strategy, by providing an - * object with set, get and clear methods. This can also be used to disable - * the cache by setting it to the literal `undefined`. - */ - set templateCache (cache) { - defaultWriter.templateCache = cache; - }, - /** - * Gets the default or overridden caching object from the default writer. - */ - get templateCache () { - return defaultWriter.templateCache; - } - }; - - // All high-level mustache.* functions use this writer. - var defaultWriter = new Writer(); - - /** - * Clears all cached templates in the default writer. - */ - mustache.clearCache = function clearCache () { - return defaultWriter.clearCache(); - }; - - /** - * Parses and caches the given template in the default writer and returns the - * array of tokens it contains. Doing this ahead of time avoids the need to - * parse templates on the fly as they are rendered. - */ - mustache.parse = function parse (template, tags) { - return defaultWriter.parse(template, tags); - }; - - /** - * Renders the `template` with the given `view` and `partials` using the - * default writer. If the optional `tags` argument is given here it must be an - * array with two string values: the opening and closing tags used in the - * template (e.g. [ "<%", "%>" ]). The default is to mustache.tags. - */ - mustache.render = function render (template, view, partials, tags) { - if (typeof template !== 'string') { - throw new TypeError('Invalid template! Template should be a "string" ' + - 'but "' + typeStr(template) + '" was given as the first ' + - 'argument for mustache#render(template, view, partials)'); - } - - return defaultWriter.render(template, view, partials, tags); - }; - - // Export the escaping function so that the user may override it. - // See https://github.com/janl/mustache.js/issues/244 - mustache.escape = escapeHtml; - - // Export these mainly for testing, but also for advanced usage. - mustache.Scanner = Scanner; - mustache.Context = Context; - mustache.Writer = Writer; - - return mustache; - -}))); diff --git a/website/js/vendor/mustache/mustache.min.js b/website/js/vendor/mustache/mustache.min.js deleted file mode 100644 index 173c85a..0000000 --- a/website/js/vendor/mustache/mustache.min.js +++ /dev/null @@ -1 +0,0 @@ -(function(global,factory){typeof exports==="object"&&typeof module!=="undefined"?module.exports=factory():typeof define==="function"&&define.amd?define(factory):(global=global||self,global.Mustache=factory())})(this,function(){"use strict";var objectToString=Object.prototype.toString;var isArray=Array.isArray||function isArrayPolyfill(object){return objectToString.call(object)==="[object Array]"};function isFunction(object){return typeof object==="function"}function typeStr(obj){return isArray(obj)?"array":typeof obj}function escapeRegExp(string){return string.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function hasProperty(obj,propName){return obj!=null&&typeof obj==="object"&&propName in obj}function primitiveHasOwnProperty(primitive,propName){return primitive!=null&&typeof primitive!=="object"&&primitive.hasOwnProperty&&primitive.hasOwnProperty(propName)}var regExpTest=RegExp.prototype.test;function testRegExp(re,string){return regExpTest.call(re,string)}var nonSpaceRe=/\S/;function isWhitespace(string){return!testRegExp(nonSpaceRe,string)}var entityMap={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function escapeHtml(string){return String(string).replace(/[&<>"'`=\/]/g,function fromEntityMap(s){return entityMap[s]})}var whiteRe=/\s*/;var spaceRe=/\s+/;var equalsRe=/\s*=/;var curlyRe=/\s*\}/;var tagRe=/#|\^|\/|>|\{|&|=|!/;function parseTemplate(template,tags){if(!template)return[];var lineHasNonSpace=false;var sections=[];var tokens=[];var spaces=[];var hasTag=false;var nonSpace=false;var indentation="";var tagIndex=0;function stripSpace(){if(hasTag&&!nonSpace){while(spaces.length)delete tokens[spaces.pop()]}else{spaces=[]}hasTag=false;nonSpace=false}var openingTagRe,closingTagRe,closingCurlyRe;function compileTags(tagsToCompile){if(typeof tagsToCompile==="string")tagsToCompile=tagsToCompile.split(spaceRe,2);if(!isArray(tagsToCompile)||tagsToCompile.length!==2)throw new Error("Invalid tags: "+tagsToCompile);openingTagRe=new RegExp(escapeRegExp(tagsToCompile[0])+"\\s*");closingTagRe=new RegExp("\\s*"+escapeRegExp(tagsToCompile[1]));closingCurlyRe=new RegExp("\\s*"+escapeRegExp("}"+tagsToCompile[1]))}compileTags(tags||mustache.tags);var scanner=new Scanner(template);var start,type,value,chr,token,openSection;while(!scanner.eos()){start=scanner.pos;value=scanner.scanUntil(openingTagRe);if(value){for(var i=0,valueLength=value.length;i"){token=[type,value,start,scanner.pos,indentation,tagIndex,lineHasNonSpace]}else{token=[type,value,start,scanner.pos]}tagIndex++;tokens.push(token);if(type==="#"||type==="^"){sections.push(token)}else if(type==="/"){openSection=sections.pop();if(!openSection)throw new Error('Unopened section "'+value+'" at '+start);if(openSection[1]!==value)throw new Error('Unclosed section "'+openSection[1]+'" at '+start)}else if(type==="name"||type==="{"||type==="&"){nonSpace=true}else if(type==="="){compileTags(value)}}stripSpace();openSection=sections.pop();if(openSection)throw new Error('Unclosed section "'+openSection[1]+'" at '+scanner.pos);return nestTokens(squashTokens(tokens))}function squashTokens(tokens){var squashedTokens=[];var token,lastToken;for(var i=0,numTokens=tokens.length;i0?sections[sections.length-1][4]:nestedTokens;break;default:collector.push(token)}}return nestedTokens}function Scanner(string){this.string=string;this.tail=string;this.pos=0}Scanner.prototype.eos=function eos(){return this.tail===""};Scanner.prototype.scan=function scan(re){var match=this.tail.match(re);if(!match||match.index!==0)return"";var string=match[0];this.tail=this.tail.substring(string.length);this.pos+=string.length;return string};Scanner.prototype.scanUntil=function scanUntil(re){var index=this.tail.search(re),match;switch(index){case-1:match=this.tail;this.tail="";break;case 0:match="";break;default:match=this.tail.substring(0,index);this.tail=this.tail.substring(index)}this.pos+=match.length;return match};function Context(view,parentContext){this.view=view;this.cache={".":this.view};this.parent=parentContext}Context.prototype.push=function push(view){return new Context(view,this)};Context.prototype.lookup=function lookup(name){var cache=this.cache;var value;if(cache.hasOwnProperty(name)){value=cache[name]}else{var context=this,intermediateValue,names,index,lookupHit=false;while(context){if(name.indexOf(".")>0){intermediateValue=context.view;names=name.split(".");index=0;while(intermediateValue!=null&&index")value=this.renderPartial(token,context,partials,tags);else if(symbol==="&")value=this.unescapedValue(token,context);else if(symbol==="name")value=this.escapedValue(token,context);else if(symbol==="text")value=this.rawValue(token);if(value!==undefined)buffer+=value}return buffer};Writer.prototype.renderSection=function renderSection(token,context,partials,originalTemplate){var self=this;var buffer="";var value=context.lookup(token[1]);function subRender(template){return self.render(template,context,partials)}if(!value)return;if(isArray(value)){for(var j=0,valueLength=value.length;j0||!lineHasNonSpace)){partialByNl[i]=filteredIndentation+partialByNl[i]}}return partialByNl.join("\n")};Writer.prototype.renderPartial=function renderPartial(token,context,partials,tags){if(!partials)return;var value=isFunction(partials)?partials(token[1]):partials[token[1]];if(value!=null){var lineHasNonSpace=token[6];var tagIndex=token[5];var indentation=token[4];var indentedValue=value;if(tagIndex==0&&indentation){indentedValue=this.indentPartial(value,indentation,lineHasNonSpace)}return this.renderTokens(this.parse(indentedValue,tags),context,partials,indentedValue,tags)}};Writer.prototype.unescapedValue=function unescapedValue(token,context){var value=context.lookup(token[1]);if(value!=null)return value};Writer.prototype.escapedValue=function escapedValue(token,context){var value=context.lookup(token[1]);if(value!=null)return mustache.escape(value)};Writer.prototype.rawValue=function rawValue(token){return token[1]};var mustache={name:"mustache.js",version:"4.0.1",tags:["{{","}}"],clearCache:undefined,escape:undefined,parse:undefined,render:undefined,Scanner:undefined,Context:undefined,Writer:undefined,set templateCache(cache){defaultWriter.templateCache=cache},get templateCache(){return defaultWriter.templateCache}};var defaultWriter=new Writer;mustache.clearCache=function clearCache(){return defaultWriter.clearCache()};mustache.parse=function parse(template,tags){return defaultWriter.parse(template,tags)};mustache.render=function render(template,view,partials,tags){if(typeof template!=="string"){throw new TypeError('Invalid template! Template should be a "string" '+'but "'+typeStr(template)+'" was given as the first '+"argument for mustache#render(template, view, partials)")}return defaultWriter.render(template,view,partials,tags)};mustache.escape=escapeHtml;mustache.Scanner=Scanner;mustache.Context=Context;mustache.Writer=Writer;return mustache}); diff --git a/website/js/vendor/tabulator/css/tabulator.min.css b/website/js/vendor/tabulator/css/tabulator.min.css deleted file mode 100644 index 92a0dd0..0000000 --- a/website/js/vendor/tabulator/css/tabulator.min.css +++ /dev/null @@ -1,3 +0,0 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ -.tabulator{position:relative;border:1px solid #999;background-color:#888;font-size:14px;text-align:left;overflow:hidden;transform:translatez(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableHolder .tabulator-table{min-width:100%}.tabulator[tabulator-layout=fitDataTable]{display:inline-block}.tabulator.tabulator-block-select{-webkit-user-select:none;-ms-user-select:none;user-select:none}.tabulator .tabulator-header{position:relative;box-sizing:border-box;width:100%;border-bottom:1px solid #999;background-color:#e6e6e6;color:#555;font-weight:700;white-space:nowrap;overflow:hidden;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-header.tabulator-header-hidden{display:none}.tabulator .tabulator-header .tabulator-col{display:inline-block;position:relative;box-sizing:border-box;border-right:1px solid #aaa;background:#e6e6e6;text-align:left;vertical-align:bottom;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-moving{position:absolute;border:1px solid #999;background:#cdcdcd;pointer-events:none}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{box-sizing:border-box;position:relative;padding:4px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button{padding:0 8px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button:hover{cursor:pointer;opacity:.6}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title-holder{position:relative}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{box-sizing:border-box;width:100%;border:1px solid #999;padding:1px;background:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-header-menu-button+.tabulator-title-editor{width:calc(100% - 22px)}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;position:absolute;top:0;bottom:0;right:4px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{position:relative;display:-ms-flexbox;display:flex;border-top:1px solid #aaa;overflow:hidden;margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{position:relative;box-sizing:border-box;margin-top:2px;width:100%;text-align:center}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto!important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear{width:0;height:0}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{cursor:pointer;background-color:#cdcdcd}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-col-sorter{color:#bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-col-sorter{color:#666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-top:none;border-bottom:6px solid #666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-col-sorter{color:#666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-bottom:none;border-top:6px solid #666;color:#666}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title{-ms-writing-mode:tb-rl;writing-mode:vertical-rl;text-orientation:mixed;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title{transform:rotate(180deg)}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title{padding-right:0;padding-top:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title{padding-right:0;padding-bottom:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-sorter{-ms-flex-pack:center;justify-content:center;left:0;right:0;top:4px;bottom:auto}.tabulator .tabulator-header .tabulator-frozen{display:inline-block;position:absolute;z-index:10}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #aaa}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #aaa}.tabulator .tabulator-header .tabulator-calcs-holder{box-sizing:border-box;min-width:600%;background:#f3f3f3!important;border-top:1px solid #aaa;border-bottom:1px solid #aaa;overflow:hidden}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{background:#f3f3f3!important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-header .tabulator-frozen-rows-holder{min-width:600%}.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty{display:none}.tabulator .tabulator-tableHolder{position:relative;width:100%;white-space:nowrap;overflow:auto;-webkit-overflow-scrolling:touch}.tabulator .tabulator-tableHolder:focus{outline:none}.tabulator .tabulator-tableHolder .tabulator-placeholder{box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=virtual]{min-height:100%;min-width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder span{display:inline-block;margin:0 auto;padding:10px;color:#ccc;font-weight:700;font-size:20px}.tabulator .tabulator-tableHolder .tabulator-table{position:relative;display:inline-block;background-color:#fff;white-space:nowrap;overflow:visible;color:#333}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs{font-weight:700;background:#e2e2e2!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top{border-bottom:2px solid #aaa}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom{border-top:2px solid #aaa}.tabulator .tabulator-footer{padding:5px 10px;border-top:1px solid #999;background-color:#e6e6e6;text-align:right;color:#555;font-weight:700;white-space:nowrap;-ms-user-select:none;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-footer .tabulator-calcs-holder{box-sizing:border-box;width:calc(100% + 20px);margin:-5px -10px 5px;text-align:left;background:#f3f3f3!important;border-bottom:1px solid #aaa;border-top:1px solid #aaa;overflow:hidden}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{background:#f3f3f3!important}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{margin-bottom:-5px;border-bottom:none}.tabulator .tabulator-footer .tabulator-paginator{color:#555;font-family:inherit;font-weight:inherit;font-size:inherit}.tabulator .tabulator-footer .tabulator-page-size{display:inline-block;margin:0 5px;padding:2px 5px;border:1px solid #aaa;border-radius:3px}.tabulator .tabulator-footer .tabulator-pages{margin:0 7px}.tabulator .tabulator-footer .tabulator-page{display:inline-block;margin:0 2px;padding:2px 5px;border:1px solid #aaa;border-radius:3px;background:hsla(0,0%,100%,.2)}.tabulator .tabulator-footer .tabulator-page.active{color:#d00}.tabulator .tabulator-footer .tabulator-page:disabled{opacity:.5}.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover{cursor:pointer;background:rgba(0,0,0,.2);color:#fff}.tabulator .tabulator-col-resize-handle{position:absolute;right:0;top:0;bottom:0;width:5px}.tabulator .tabulator-col-resize-handle.prev{left:0;right:auto}.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}.tabulator .tabulator-loader{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;z-index:100;height:100%;width:100%;background:rgba(0,0,0,.4);text-align:center}.tabulator .tabulator-loader .tabulator-loader-msg{display:inline-block;margin:0 auto;padding:10px 20px;border-radius:10px;background:#fff;font-weight:700;font-size:16px}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading{border:4px solid #333;color:#000}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error{border:4px solid #d00;color:#590000}.tabulator-row{position:relative;box-sizing:border-box;min-height:22px;background-color:#fff}.tabulator-row.tabulator-row-even{background-color:#efefef}.tabulator-row.tabulator-selectable:hover{background-color:#bbb;cursor:pointer}.tabulator-row.tabulator-selected{background-color:#9abcea}.tabulator-row.tabulator-selected:hover{background-color:#769bcc;cursor:pointer}.tabulator-row.tabulator-row-moving{border:1px solid #000;background:#fff}.tabulator-row.tabulator-moving{position:absolute;border-top:1px solid #aaa;border-bottom:1px solid #aaa;pointer-events:none;z-index:15}.tabulator-row .tabulator-row-resize-handle{position:absolute;right:0;bottom:0;left:0;height:5px}.tabulator-row .tabulator-row-resize-handle.prev{top:0;bottom:auto}.tabulator-row .tabulator-row-resize-handle:hover{cursor:ns-resize}.tabulator-row .tabulator-frozen{display:inline-block;position:absolute;background-color:inherit;z-index:10}.tabulator-row .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #aaa}.tabulator-row .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #aaa}.tabulator-row .tabulator-responsive-collapse{box-sizing:border-box;padding:5px;border-top:1px solid #aaa;border-bottom:1px solid #aaa}.tabulator-row .tabulator-responsive-collapse:empty{display:none}.tabulator-row .tabulator-responsive-collapse table{font-size:14px}.tabulator-row .tabulator-responsive-collapse table tr td{position:relative}.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type{padding-right:10px}.tabulator-row .tabulator-cell{display:inline-block;position:relative;box-sizing:border-box;padding:4px;border-right:1px solid #aaa;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #1d68cd;padding:0}.tabulator-row .tabulator-cell.tabulator-editing input,.tabulator-row .tabulator-cell.tabulator-editing select{border:1px;background:transparent}.tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #d00}.tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator-row .tabulator-cell.tabulator-validation-fail select{border:1px;background:transparent;color:#d00}.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator-row .tabulator-cell.tabulator-row-handle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{width:100%;height:3px;margin-top:2px;background:#666}.tabulator-row .tabulator-cell .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #aaa;border-bottom:2px solid #aaa}.tabulator-row .tabulator-cell .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #333;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;height:15px;width:15px;border-radius:20px;background:#666;color:#fff;font-weight:700;font-size:1.1em}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover{opacity:.7}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close{display:initial}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open,.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close{display:none}.tabulator-row .tabulator-cell .tabulator-traffic-light{display:inline-block;height:14px;width:14px;border-radius:14px}.tabulator-row.tabulator-group{box-sizing:border-box;border-bottom:1px solid #999;border-right:1px solid #aaa;border-top:1px solid #999;padding:5px;padding-left:10px;background:#ccc;font-weight:700;min-width:100%}.tabulator-row.tabulator-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;border-bottom:0}.tabulator-row.tabulator-group.tabulator-group-level-1{padding-left:30px}.tabulator-row.tabulator-group.tabulator-group-level-2{padding-left:50px}.tabulator-row.tabulator-group.tabulator-group-level-3{padding-left:70px}.tabulator-row.tabulator-group.tabulator-group-level-4{padding-left:90px}.tabulator-row.tabulator-group.tabulator-group-level-5{padding-left:110px}.tabulator-row.tabulator-group .tabulator-group-toggle{display:inline-block}.tabulator-row.tabulator-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #666;vertical-align:middle}.tabulator-row.tabulator-group span{margin-left:10px;color:#d00}.tabulator-menu{position:absolute;display:inline-block;box-sizing:border-box;background:#fff;border:1px solid #aaa;box-shadow:0 0 5px 0 rgba(0,0,0,.2);font-size:14px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:10000}.tabulator-menu .tabulator-menu-item{padding:5px 10px;-webkit-user-select:none;-ms-user-select:none;user-select:none}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-disabled{opacity:.5}.tabulator-menu .tabulator-menu-item:not(.tabulator-menu-item-disabled):hover{cursor:pointer;background:#efefef}.tabulator-menu .tabulator-menu-separator{border-top:1px solid #aaa}.tabulator-edit-select-list{position:absolute;display:inline-block;box-sizing:border-box;max-height:200px;background:#fff;border:1px solid #aaa;font-size:14px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:10000}.tabulator-edit-select-list .tabulator-edit-select-list-item{padding:4px;color:#333}.tabulator-edit-select-list .tabulator-edit-select-list-item.active{color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-item.active.focused{outline:1px solid hsla(0,0%,100%,.5)}.tabulator-edit-select-list .tabulator-edit-select-list-item.focused{outline:1px solid #1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-item:hover{cursor:pointer;color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-notice{padding:4px;color:#333;text-align:center}.tabulator-edit-select-list .tabulator-edit-select-list-group{border-bottom:1px solid #aaa;padding:4px;padding-top:6px;color:#333;font-weight:700}.tabulator.tabulator-ltr{direction:ltr}.tabulator.tabulator-rtl{text-align:initial;direction:rtl}.tabulator.tabulator-rtl .tabulator-header .tabulator-col{text-align:initial;border-left:1px solid #aaa;border-right:initial}.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{margin-right:0;margin-left:-1px}.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:0;padding-left:25px}.tabulator.tabulator-rtl .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{left:8px;right:auto}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell{border-right:initial;border-left:1px solid #aaa}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-branch{margin-right:0;margin-left:5px;border-bottom-left-radius:0;border-bottom-right-radius:1px;border-left:initial;border-right:2px solid #aaa}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-control{margin-right:0;margin-left:5px}.tabulator.tabulator-rtl .tabulator-col-resize-handle{position:absolute;left:0;right:auto}.tabulator.tabulator-rtl .tabulator-col-resize-handle.prev{right:0;left:auto}.tabulator-print-fullscreen{position:absolute;top:0;bottom:0;left:0;right:0;z-index:10000}body.tabulator-print-fullscreen-hide>:not(.tabulator-print-fullscreen){display:none!important}.tabulator-print-table{border-collapse:collapse}.tabulator-print-table .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #aaa;border-bottom:2px solid #aaa}.tabulator-print-table .tabulator-print-table-group{box-sizing:border-box;border-bottom:1px solid #999;border-right:1px solid #aaa;border-top:1px solid #999;padding:5px;padding-left:10px;background:#ccc;font-weight:700;min-width:100%}.tabulator-print-table .tabulator-print-table-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator-print-table .tabulator-print-table-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;border-bottom:0}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-1 td{padding-left:30px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-2 td{padding-left:50px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-3 td{padding-left:70px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-4 td{padding-left:90px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-5 td{padding-left:110px!important}.tabulator-print-table .tabulator-print-table-group .tabulator-group-toggle{display:inline-block}.tabulator-print-table .tabulator-print-table-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #666;vertical-align:middle}.tabulator-print-table .tabulator-print-table-group span{margin-left:10px;color:#d00}.tabulator-print-table .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #333;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-print-table .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#333}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333} -/*# sourceMappingURL=tabulator.min.css.map */ diff --git a/website/js/vendor/tabulator/css/tabulator.min.css.map b/website/js/vendor/tabulator/css/tabulator.min.css.map deleted file mode 100644 index 8924b90..0000000 --- a/website/js/vendor/tabulator/css/tabulator.min.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["tabulator.scss"],"names":[],"mappings":"AA0CA,WACC,kBAAkB,AAElB,sBAxCgB,AA0ChB,sBA3CqB,AA6CrB,eA3Ca,AA4Cb,gBAAgB,AAChB,gBAAe,AAMf,uBAAwB,CAyhBxB,AAxiBD,iFAoBI,cAAc,CACd,AArBJ,0CA0BE,oBAAqB,CACrB,AA3BF,kCA8BE,yBAAiB,AAAjB,qBAAiB,AAAjB,gBAAiB,CACjB,AA/BF,6BAmCE,kBAAiB,AACjB,sBAAsB,AAEtB,WAAU,AAEV,6BAtEwB,AAuExB,yBA1E4B,AA2E5B,WA1EmB,AA2EnB,gBAAgB,AAEhB,mBAAmB,AACnB,gBAAe,AAEf,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAoRpB,AAvUF,qDAsDG,YAAY,CACZ,AAvDH,4CA2DG,qBAAoB,AACpB,kBAAiB,AACjB,sBAAqB,AACrB,4BA7FoB,AA8FpB,mBAhG2B,AAiG3B,gBAAe,AACf,sBAAsB,AACtB,eAAgB,CAsNhB,AAxRH,6DAqEI,kBAAkB,AAClB,sBApGsB,AAqGtB,mBAA8C,AAC9C,mBAAoB,CACpB,AAzEJ,mEA6EI,sBAAqB,AACrB,kBAAkB,AAClB,WAAW,CA+DX,AA9IJ,iGAmFK,aAAc,CAMd,AAzFL,uGAsFM,eAAe,AACf,UAAW,CACX,AAxFN,+FA6FK,iBAAkB,CAClB,AA9FL,wFAkGK,sBAAqB,AACrB,WAAW,AAEX,mBAAmB,AACnB,gBAAgB,AAChB,uBAAuB,AACvB,qBAAqB,CAiBrB,AAzHL,gHA4GM,sBAAsB,AACtB,WAAW,AAEX,sBAAqB,AAErB,YAAW,AAEX,eAAgB,CAChB,AApHN,8IAuHM,uBAAuB,CACvB,AAxHN,yFA6HK,oBAAa,AAAb,aAAa,AACb,sBAAmB,AAAnB,mBAAmB,AAEnB,kBAAkB,AAClB,MAAK,AACL,SAAQ,AACR,SAAS,CAST,AA5IL,0GAsIM,QAAQ,AACR,SAAS,AACT,kCAAkC,AAClC,mCAAmC,AACnC,4BAnKkB,CAoKlB,AA3IN,0FAqJK,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AAEb,0BAvLkB,AAwLlB,gBAAgB,AAEhB,iBAAiB,CACjB,AA5JL,0FAkKK,YAAa,CACb,AAnKL,qEAwKI,kBAAkB,AAClB,sBAAsB,AACtB,eAAc,AACd,WAAU,AACV,iBAAkB,CAiBlB,AA7LJ,8EAgLK,qBAAsB,CACtB,AAjLL,yEAoLK,cAAe,CACf,AArLL,sFAyLM,QAAS,AACT,QAAS,CACT,AA3LN,oFAkMK,kBAAkB,CAClB,AAnML,qEAsMK,eAAc,AACd,wBAAoD,CACpD,AAxML,4HA4MM,UArOkB,CA2OlB,AAlNN,6IA+MO,gBAAgB,AAChB,4BAzOiB,CA0OjB,AAjNP,2HAuNM,UAjPgB,CAwPhB,AA9NN,4IA0NO,gBAAgB,AAChB,4BArPe,CAuPf,AA7NP,4HAmOM,UA7PgB,CAoQhB,AA1ON,6IAsOO,mBAAmB,AACnB,0BAjQe,AAkQf,UAlQe,CAmQf,AAzOP,+GAkPM,uBAAyB,AAAzB,yBAAyB,AACzB,uBAAuB,AAEvB,oBAAY,AAAZ,aAAY,AACZ,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,sBAAsB,CACtB,AAxPN,oHA6PM,wBAAyB,CACzB,AA9PN,2GAmQM,gBAAe,AACf,gBAAgB,CAChB,AArQN,uIAyQO,gBAAe,AACf,mBAAmB,CACnB,AA3QP,4GAgRM,qBAAuB,AAAvB,uBAAuB,AACvB,OAAM,AACN,QAAO,AACP,QAAO,AACP,WAAW,CACX,AArRN,+CA2RG,qBAAqB,AACrB,kBAAkB,AAIlB,UAAW,CASX,AAzSH,qEAmSI,2BAvTgB,CAwThB,AApSJ,sEAuSI,0BA3TgB,CA4ThB,AAxSJ,qDA6SG,sBAAqB,AACrB,eAAc,AAEd,6BAAyD,AAUzD,0BA9UiB,AA+UjB,6BA1VoB,AA4VpB,eAAgB,CAChB,AA9TH,oEAmTI,4BAAyD,CAKzD,AAxTJ,iGAsTK,YAAa,CACb,AAvTL,2DAiUG,cAAc,CAKd,AAtUH,iEAoUI,YAAa,CACb,AArUJ,kCA2UE,kBAAiB,AACjB,WAAU,AACV,mBAAmB,AACnB,cAAa,AACb,gCAAiC,CAyDjC,AAxYF,wCAkVG,YAAa,CACb,AAnVH,yDAuVG,sBAAqB,AACrB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAOlB,UAAU,CAYV,AA5WH,wFA4VI,gBAAe,AACf,cAAc,CACd,AA9VJ,8DAmWI,qBAAqB,AAErB,cAAa,AACb,aAAY,AAEZ,WAAU,AACV,gBAAiB,AACjB,cAAe,CACf,AA3WJ,mDAgXG,kBAAiB,AACjB,qBAAoB,AACpB,sBAxYqB,AAyYrB,mBAAmB,AACnB,iBAAgB,AAChB,UAxYe,CA0Zf,AAvYH,kFA0XK,gBAAiB,AACjB,4BAAwD,CASxD,AApYL,sGA8XM,4BAlZc,CAmZd,AA/XN,yGAkYM,yBAtZc,CAuZd,AAnYN,6BA8YE,iBAAgB,AAChB,0BArZwB,AAsZxB,yBAzZ4B,AA0Z5B,iBAAiB,AACjB,WA1ZmB,AA2ZnB,gBAAgB,AAChB,mBAAkB,AAClB,qBAAgB,AAAhB,iBAAgB,AAEhB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAgFpB,AA1eF,qDA6ZG,sBAAqB,AACrB,wBAAuB,AACvB,sBAA2B,AAE3B,gBAAgB,AAEhB,6BAAyD,AAUzD,6BAjciB,AAkcjB,0BAlciB,AAocjB,eAAgB,CAMhB,AAtbH,oEAsaI,4BAAyD,CAKzD,AA3aJ,iGAyaK,YAAa,CACb,AA1aL,gEAmbI,mBAAkB,AAClB,kBAAkB,CAClB,AArbJ,kDAybG,WAjckB,AAkclB,oBAAmB,AACnB,oBAAmB,AACnB,iBAAiB,CACjB,AA7bH,kDAicG,qBAAoB,AAEpB,aAAY,AACZ,gBAAe,AAEf,sBA7coB,AA8cpB,iBAAiB,CACjB,AAxcH,8CA2cG,YAAY,CACZ,AA5cH,6CAgdG,qBAAoB,AAEpB,aAAY,AACZ,gBAAe,AAEf,sBA5doB,AA6dpB,kBAAiB,AAEjB,6BAA+B,CAiB/B,AAzeH,oDA2dI,UAhemB,CAienB,AA5dJ,sDA+dI,UAAU,CACV,AAheJ,kEAoeK,eAAc,AACd,0BAAyB,AACzB,UAAU,CACV,AAveL,wCA8eE,kBAAiB,AACjB,QAAO,AACP,MAAK,AACL,SAAQ,AACR,SAAS,CAUT,AA5fF,6CAqfG,OAAM,AACN,UAAU,CACV,AAvfH,8CA0fG,gBAAgB,CAChB,AA3fH,6BAigBE,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAElB,MAAK,AACL,OAAM,AACN,YAAW,AAEX,YAAW,AACX,WAAU,AACV,0BAAyB,AACzB,iBAAiB,CA2BjB,AAviBF,mDAghBG,qBAAoB,AAEpB,cAAa,AACb,kBAAiB,AAEjB,mBAAkB,AAElB,gBAAe,AACf,gBAAgB,AAChB,cAAc,CAad,AAtiBH,qEA6hBI,sBAAqB,AACrB,UAAU,CACV,AA/hBJ,mEAmiBI,sBAAqB,AACrB,aAAa,CACb,AAMJ,eACC,kBAAkB,AAClB,sBAAsB,AACtB,gBAA0C,AAC1C,qBArkBuB,CAq7BvB,AApXD,kCAQE,wBAxkB4B,CAykB5B,AATF,0CAYE,sBAzkBsB,AA0kBtB,cAAe,CACf,AAdF,kCAiBE,wBA5kB6B,CA6kB7B,AAlBF,wCAqBE,yBA/kBkC,AAglBlC,cAAe,CACf,AAvBF,oCA0BE,sBAAqB,AACrB,eAAe,CACf,AA5BF,gCA+BE,kBAAkB,AAElB,0BAhmBkB,AAimBlB,6BAjmBkB,AAmmBlB,oBAAoB,AACpB,UAAU,CACV,AAtCF,4CA0CE,kBAAiB,AACjB,QAAO,AACP,SAAQ,AACR,OAAM,AACN,UAAU,CAUV,AAxDF,iDAiDG,MAAK,AACL,WAAW,CACX,AAnDH,kDAsDG,gBAAgB,CAChB,AAvDH,iCA2DE,qBAAqB,AACrB,kBAAkB,AAElB,yBAAyB,AAEzB,UAAW,CASX,AAzEF,uDAmEG,2BAloBiB,CAmoBjB,AApEH,wDAuEG,0BAtoBiB,CAuoBjB,AAxEH,8CA4EE,sBAAqB,AAErB,YAAW,AAEX,0BA/oBkB,AAgpBlB,4BAhpBkB,CAmqBlB,AApGF,oDAoFG,YAAY,CACZ,AArFH,oDAwFG,cAvqBW,CAkrBX,AAnGH,0DA4FK,iBAAkB,CAKlB,AAjGL,wEA+FM,kBAAkB,CAClB,AAhGN,+BAwGE,qBAAoB,AACpB,kBAAkB,AAClB,sBAAqB,AACrB,YAAW,AACX,4BA3qBkB,AA4qBlB,sBAAqB,AACrB,mBAAkB,AAClB,gBAAe,AACf,sBAAsB,CAyLtB,AAzSF,iDAmHG,yBA3qBkB,AA4qBlB,SAAU,CAMV,AA1HH,+GAuHI,WAAU,AACV,sBAAsB,CACtB,AAzHJ,yDA6HG,qBAprBgB,CA2rBhB,AApIH,+HA+HI,WAAU,AACV,uBAAsB,AAEtB,UAzrBe,CA0rBf,AAnIJ,6EAyII,YAAa,CACb,AA1IJ,oDA+IG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,uBAAsB,AAEtB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAcpB,AApKH,8EA0JI,SAAS,CAST,AAnKJ,wGA8JK,WAAU,AACV,WAAU,AACV,eAAc,AACd,eAAe,CACf,AAlKL,2DAuKG,qBAAoB,AACpB,sBAAqB,AAErB,WAAU,AACV,UAAS,AAET,gBAAe,AACf,iBAAgB,AAEhB,8BAA6B,AAE7B,2BAjvBiB,AAkvBjB,4BAlvBiB,CAmvBjB,AApLH,4DAwLG,2BAAmB,AAAnB,oBAAmB,AACnB,qBAAsB,AAAtB,uBAAsB,AACtB,sBAAkB,AAAlB,mBAAkB,AAClB,sBAAqB,AAErB,YAAW,AACX,WAAU,AAEV,iBAAgB,AAEhB,sBAhwBe,AAiwBf,kBAAiB,AACjB,0BAA4B,AAE5B,eAAe,CAmDf,AAzPH,kEAyMI,eAAc,AACd,yBAA4B,CAC5B,AA3MJ,kGA8MI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,sBAAuB,CAavB,AAjOJ,wGAuNK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eA7xBa,CA8xBb,AAhOL,gGAoOI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,eAxyBc,CAqzBd,AAvPJ,sGA6OK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eAnzBa,CAozBb,AAtPL,qEA4PG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,uBAAsB,AAEtB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,oBAAoB,AAEpB,YAAW,AACX,WAAU,AAEV,mBAAkB,AAClB,gBAAe,AAEf,WA50BqB,AA60BrB,gBAAgB,AAChB,eAAe,CAmBf,AAhSH,2EAgRI,UAAU,CACV,AAjRJ,sHAqRK,eAAe,CACf,AAtRL,sOA8RI,YAAY,CACZ,AA/RJ,wDAmSG,qBAAqB,AACrB,YAAW,AACX,WAAU,AAEV,kBAAkB,CAClB,AAxSH,+BA6SE,sBAAqB,AACrB,6BAA4B,AAC5B,4BA92BkB,AA+2BlB,0BAAyB,AACzB,YAAW,AACX,kBAAiB,AACjB,gBAAe,AACf,gBAAgB,AAEhB,cAAe,CA4Df,AAlXF,qCAyTG,eAAc,AACd,+BAA+B,CAC/B,AA3TH,wEAgUI,kBAAiB,AACjB,kCAAkC,AAClC,mCAAmC,AACnC,0BAx4BkB,AAy4BlB,eAAgB,CAChB,AArUJ,uDA0UG,iBAAiB,CACjB,AA3UH,uDA8UG,iBAAiB,CACjB,AA/UH,uDAkVG,iBAAiB,CACjB,AAnVH,uDAsVG,iBAAiB,CACjB,AAvVH,uDA0VG,kBAAkB,CAClB,AA3VH,uDA8VG,oBAAqB,CACrB,AA/VH,gDAmWG,qBAAqB,AACrB,QAAQ,AACR,SAAS,AACT,kBAAiB,AACjB,iCAAiC,AACjC,oCAAoC,AACpC,eAAe,AACf,2BA/6BmB,AAg7BnB,qBAAqB,CACrB,AA5WH,oCA+WG,iBAAgB,AAChB,UAAU,CACV,AAKH,gBACC,kBAAkB,AAClB,qBAAoB,AACpB,sBAAqB,AAErB,gBA57BuB,AA67BvB,sBA37BmB,AA47BnB,oCAAuC,AAEvC,eA98Ba,AAg9Bb,gBAAe,AACf,iCAAiC,AAEjC,aAAc,CAqBd,AAnCD,qCAkBE,iBAAgB,AAEhB,yBAAiB,AAAjB,qBAAiB,AAAjB,gBAAiB,CAUjB,AA9BF,kEAuBG,UAAW,CACX,AAxBH,8EA2BG,eAAe,AACf,kBAl9B2B,CAm9B3B,AA7BH,0CAiCE,yBAt9BkB,CAu9BlB,AAGF,4BACC,kBAAkB,AAClB,qBAAoB,AACpB,sBAAqB,AAErB,iBAAgB,AAEhB,gBAn+BuB,AAo+BvB,sBAl+BmB,AAo+BnB,eAp/Ba,AAs/Bb,gBAAe,AACf,iCAAiC,AAEjC,aAAc,CA4Cd,AA3DD,6DAkBE,YAAW,AAEX,UA7+BgB,CAkgChB,AAzCF,oEAuBG,WAn/BqB,AAo/BrB,kBA3+BkB,CAg/BlB,AA7BH,4EA2BI,oCAv/BoB,CAw/BpB,AA5BJ,qEAgCG,yBAn/BkB,CAo/BlB,AAjCH,mEAoCG,eAAc,AAEd,WAlgCqB,AAmgCrB,kBA1/BkB,CA2/BlB,AAxCH,+DA4CE,YAAW,AAEX,WAvgCgB,AAwgChB,iBAAkB,CAClB,AAhDF,8DAmDE,6BA7gCkB,AA+gClB,YAAW,AACX,gBAAe,AAEf,WAjhCgB,AAkhChB,eAAgB,CAChB,AAMF,yBACC,aAAc,CACd,AAED,yBACC,mBAAmB,AACnB,aAAc,CAwEd,AA1ED,0DAMG,mBAAmB,AACnB,2BAhjCoB,AAijCpB,oBAAoB,CAsBpB,AA9BH,wGAYK,eAAoB,AACpB,gBAAgB,CAChB,AAdL,kGAmBK,gBAAe,AACf,iBAAiB,CACjB,AArBL,kGA0BK,SAAQ,AACR,UAAa,CACb,AA5BL,wDAmCG,qBAAoB,AACpB,0BAlkCiB,CA0lCjB,AA5DH,oFA8CI,eAAoB,AACpB,gBAAe,AAEf,4BAAiC,AACjC,+BAA8B,AAE9B,oBAAmB,AACnB,2BAnlCgB,CAolChB,AAtDJ,qFAyDI,eAAoB,AACpB,eAAe,CACf,AA3DJ,sDAiEE,kBAAiB,AACjB,OAAM,AACN,UAAU,CAMV,AAzEF,2DAsEG,QAAO,AACP,SAAS,CACT,AAOH,4BACC,kBAAkB,AAClB,MAAK,AACL,SAAQ,AACR,OAAM,AACN,QAAO,AAEP,aAAc,CACd,AAED,uEACC,sBAAuB,CACvB,AAED,uBACC,wBAAyB,CAwKzB,AAzKD,mDAIE,qBAAoB,AACpB,sBAAqB,AAErB,WAAU,AACV,UAAS,AAET,gBAAe,AACf,iBAAgB,AAEhB,8BAA6B,AAE7B,2BA1oCkB,AA2oClB,4BA3oCkB,CA4oClB,AAjBF,oDAqBE,sBAAqB,AACrB,6BAA4B,AAC5B,4BAlpCkB,AAmpClB,0BAAyB,AACzB,YAAW,AACX,kBAAiB,AACjB,gBAAe,AACf,gBAAgB,AAEhB,cAAe,CAsEf,AApGF,0DAiCG,eAAc,AACd,+BAA+B,CAC/B,AAnCH,6FAwCI,kBAAiB,AACjB,kCAAkC,AAClC,mCAAmC,AACnC,0BA5qCkB,AA6qClB,eAAgB,CAChB,AA7CJ,+EAmDI,2BAA4B,CAC5B,AApDJ,+EAyDI,2BAA4B,CAC5B,AA1DJ,+EA+DI,2BAA4B,CAC5B,AAhEJ,+EAqEI,2BAA4B,CAC5B,AAtEJ,+EA2EI,4BAA6B,CAC7B,AA5EJ,4EAgFG,oBAAqB,CACrB,AAjFH,qEAqFG,qBAAqB,AACrB,QAAQ,AACR,SAAS,AACT,kBAAiB,AACjB,iCAAiC,AACjC,oCAAoC,AACpC,eAAe,AACf,2BA7tCmB,AA8tCnB,qBAAqB,CACrB,AA9FH,yDAiGG,iBAAgB,AAChB,UAAU,CACV,AAnGH,oDAwGE,2BAAmB,AAAnB,oBAAmB,AACnB,qBAAsB,AAAtB,uBAAsB,AACtB,sBAAkB,AAAlB,mBAAkB,AAClB,sBAAqB,AAErB,YAAW,AACX,WAAU,AAEV,iBAAgB,AAEhB,sBA5uCgB,AA6uChB,kBAAiB,AACjB,0BAA4B,AAE5B,eAAe,CAkDf,AAxKF,0DAyHG,eAAc,AACd,yBAA4B,CAC5B,AA3HH,0FA8HG,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,sBAAuB,CAavB,AAjJH,gGAuII,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eAzwCc,CA0wCd,AAhJJ,wFAoJG,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,eApxCe,CAiyCf,AAvKH,8FA6JI,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eA/xCc,CAgyCd","file":"tabulator.min.css","sourcesContent":["/* Tabulator v4.8.3 (c) Oliver Folkerd */\n\n\r\n//Main Theme Variables\r\n$backgroundColor: #888 !default; //background color of tabulator\r\n$borderColor:#999 !default; //border to tabulator\r\n$textSize:14px !default; //table text size\r\n\r\n//header themeing\r\n$headerBackgroundColor:#e6e6e6 !default; //border to tabulator\r\n$headerTextColor:#555 !default; //header text colour\r\n$headerBorderColor:#aaa !default; //header border color\r\n$headerSeperatorColor:#999 !default; //header bottom seperator color\r\n$headerMargin:4px !default; //padding round header\r\n\r\n//column header arrows\r\n$sortArrowActive: #666 !default;\r\n$sortArrowInactive: #bbb !default;\r\n\r\n//row themeing\r\n$rowBackgroundColor:#fff !default; //table row background color\r\n$rowAltBackgroundColor:#EFEFEF !default; //table row background color\r\n$rowBorderColor:#aaa !default; //table border color\r\n$rowTextColor:#333 !default; //table text color\r\n$rowHoverBackground:#bbb !default; //row background color on hover\r\n\r\n$rowSelectedBackground: #9ABCEA !default; //row background color when selected\r\n$rowSelectedBackgroundHover: #769BCC !default;//row background color when selected and hovered\r\n\r\n$editBoxColor:#1D68CD !default; //border color for edit boxes\r\n$errorColor:#dd0000 !default; //error indication\r\n\r\n//footer themeing\r\n$footerBackgroundColor:#e6e6e6 !default; //border to tabulator\r\n$footerTextColor:#555 !default; //footer text colour\r\n$footerBorderColor:#aaa !default; //footer border color\r\n$footerSeperatorColor:#999 !default; //footer bottom seperator color\r\n$footerActiveColor:#d00 !default; //footer bottom active text color\r\n\r\n\r\n\r\n//Tabulator Containing Element\r\n.tabulator{\r\n\tposition: relative;\r\n\r\n\tborder: 1px solid $borderColor;\r\n\r\n\tbackground-color: $backgroundColor;\r\n\r\n\tfont-size:$textSize;\r\n\ttext-align: left;\r\n\toverflow:hidden;\r\n\r\n\t-webkit-transform: translatez(0);\r\n\t-moz-transform: translatez(0);\r\n\t-ms-transform: translatez(0);\r\n\t-o-transform: translatez(0);\r\n\ttransform: translatez(0);\r\n\r\n\t&[tabulator-layout=\"fitDataFill\"]{\r\n\t\t.tabulator-tableHolder{\r\n\t\t\t.tabulator-table{\r\n\t\t\t\tmin-width:100%;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t&[tabulator-layout=\"fitDataTable\"]{\r\n\t\tdisplay: inline-block;\r\n\t}\r\n\r\n\t&.tabulator-block-select{\r\n\t\tuser-select: none;\r\n\t}\r\n\r\n\t//column header containing element\r\n\t.tabulator-header{\r\n\t\tposition:relative;\r\n\t\tbox-sizing: border-box;\r\n\r\n\t\twidth:100%;\r\n\r\n\t\tborder-bottom:1px solid $headerSeperatorColor;\r\n\t\tbackground-color: $headerBackgroundColor;\r\n\t\tcolor: $headerTextColor;\r\n\t\tfont-weight:bold;\r\n\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:hidden;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t&.tabulator-header-hidden{\r\n\t\t\tdisplay:none;\r\n\t\t}\r\n\r\n\t\t//individual column header element\r\n\t\t.tabulator-col{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition:relative;\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tborder-right:1px solid $headerBorderColor;\r\n\t\t\tbackground:$headerBackgroundColor;\r\n\t\t\ttext-align:left;\r\n\t\t\tvertical-align: bottom;\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&.tabulator-moving{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tborder:1px solid $headerSeperatorColor;\r\n\t\t\t\tbackground:darken($headerBackgroundColor, 10%);\r\n\t\t\t\tpointer-events: none;\r\n\t\t\t}\r\n\r\n\t\t\t//hold content of column header\r\n\t\t\t.tabulator-col-content{\r\n\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tpadding:4px;\r\n\r\n\t\t\t\t//header menu button\r\n\t\t\t\t.tabulator-header-menu-button{\r\n\t\t\t\t\tpadding: 0 8px;\r\n\r\n\t\t\t\t\t&:hover{\r\n\t\t\t\t\t\tcursor: pointer;\r\n\t\t\t\t\t\topacity: .6;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//hold title and sort arrow\r\n\t\t\t\t.tabulator-col-title-holder{\r\n\t\t\t\t\tposition: relative;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//hold title of column header\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\twhite-space: nowrap;\r\n\t\t\t\t\toverflow: hidden;\r\n\t\t\t\t\ttext-overflow: ellipsis;\r\n\t\t\t\t\tvertical-align:bottom;\r\n\r\n\t\t\t\t\t//element to hold title editor\r\n\t\t\t\t\t.tabulator-title-editor{\r\n\t\t\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\t\tborder:1px solid #999;\r\n\r\n\t\t\t\t\t\tpadding:1px;\r\n\r\n\t\t\t\t\t\tbackground: #fff;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t.tabulator-header-menu-button + .tabulator-title-editor{\r\n\t\t\t\t\t\twidth:calc(100% - 22px);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//column sorter arrow\r\n\t\t\t\t.tabulator-col-sorter{\r\n\t\t\t\t\tdisplay: flex;\r\n\t\t\t\t\talign-items: center;\r\n\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\ttop:0;\r\n\t\t\t\t\tbottom:0;\r\n\t\t\t\t\tright:4px;\r\n\r\n\t\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\t\twidth: 0;\r\n\t\t\t\t\t\theight: 0;\r\n\t\t\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\t//complex header column group\r\n\t\t\t&.tabulator-col-group{\r\n\r\n\t\t\t\t//gelement to hold sub columns in column group\r\n\t\t\t\t.tabulator-col-group-cols{\r\n\t\t\t\t\tposition:relative;\r\n\t\t\t\t\tdisplay: flex;\r\n\r\n\t\t\t\t\tborder-top:1px solid $headerBorderColor;\r\n\t\t\t\t\toverflow: hidden;\r\n\r\n\t\t\t\t\tmargin-right:-1px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//hide left resize handle on first column\r\n\t\t\t&:first-child{\r\n\t\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//header filter containing element\r\n\t\t\t.tabulator-header-filter{\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\tmargin-top:2px;\r\n\t\t\t\twidth:100%;\r\n\t\t\t\ttext-align: center;\r\n\r\n\t\t\t\t//styling adjustment for inbuilt editors\r\n\t\t\t\ttextarea{\r\n\t\t\t\t\theight:auto !important;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tsvg{\r\n\t\t\t\t\tmargin-top: 3px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tinput{\r\n\t\t\t\t\t&::-ms-clear {\r\n\t\t\t\t\t\twidth : 0;\r\n\t\t\t\t\t\theight: 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//styling child elements for sortable columns\r\n\t\t\t&.tabulator-sortable{\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tpadding-right:25px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground-color:darken($headerBackgroundColor, 10%);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"none\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-col-sorter{\r\n\t\t\t\t\t\tcolor: $sortArrowInactive;\r\n\r\n\t\t\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"asc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-col-sorter{\r\n\t\t\t\t\t\tcolor: $sortArrowActive;\r\n\r\n\t\t\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowActive;\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"desc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-col-sorter{\r\n\t\t\t\t\t\tcolor: $sortArrowActive;\r\n\r\n\t\t\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\t\t\tborder-bottom: none;\r\n\t\t\t\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\t\t\t\tcolor: $sortArrowActive;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\t\t\t&.tabulator-col-vertical{\r\n\t\t\t\t.tabulator-col-content{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\twriting-mode: vertical-rl;\r\n\t\t\t\t\t\ttext-orientation: mixed;\r\n\r\n\t\t\t\t\t\tdisplay:flex;\r\n\t\t\t\t\t\talign-items:center;\r\n\t\t\t\t\t\tjustify-content:center;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.tabulator-col-vertical-flip{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\ttransform: rotate(180deg);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.tabulator-sortable{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\t\tpadding-top:20px;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.tabulator-col-vertical-flip{\r\n\t\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\t\t\tpadding-bottom:20px;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t.tabulator-col-sorter{\r\n\t\t\t\t\t\tjustify-content: center;\r\n\t\t\t\t\t\tleft:0;\r\n\t\t\t\t\t\tright:0;\r\n\t\t\t\t\t\ttop:4px;\r\n\t\t\t\t\t\tbottom:auto;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\tposition: absolute;\r\n\r\n\t\t\t// background-color: inherit;\r\n\r\n\t\t\tz-index: 10;\r\n\r\n\t\t\t&.tabulator-frozen-left{\r\n\t\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-frozen-right{\r\n\t\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tmin-width:600%;\r\n\r\n\t\t\tbackground:lighten($headerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:lighten($headerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\t\t\tborder-bottom:1px solid $headerBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen-rows-holder{\r\n\t\t\tmin-width:600%;\r\n\r\n\t\t\t&:empty{\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//scrolling element to hold table\r\n\t.tabulator-tableHolder{\r\n\t\tposition:relative;\r\n\t\twidth:100%;\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:auto;\r\n\t\t-webkit-overflow-scrolling: touch;\r\n\r\n\t\t&:focus{\r\n\t\t\toutline: none;\r\n\t\t}\r\n\r\n\t\t//default placeholder element\r\n\t\t.tabulator-placeholder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tdisplay: flex;\r\n\t\t\talign-items:center;\r\n\r\n\t\t\t&[tabulator-render-mode=\"virtual\"]{\r\n\t\t\t\tmin-height:100%;\r\n\t\t\t\tmin-width:100%;\r\n\t\t\t}\r\n\r\n\t\t\twidth:100%;\r\n\r\n\t\t\tspan{\r\n\t\t\t\tdisplay: inline-block;\r\n\r\n\t\t\t\tmargin:0 auto;\r\n\t\t\t\tpadding:10px;\r\n\r\n\t\t\t\tcolor:#ccc;\r\n\t\t\t\tfont-weight: bold;\r\n\t\t\t\tfont-size: 20px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//element to hold table rows\r\n\t\t.tabulator-table{\r\n\t\t\tposition:relative;\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tbackground-color:$rowBackgroundColor;\r\n\t\t\twhite-space: nowrap;\r\n\t\t\toverflow:visible;\r\n\t\t\tcolor:$rowTextColor;\r\n\r\n\t\t\t//row element\r\n\t\t\t.tabulator-row{\r\n\t\t\t\t&.tabulator-calcs{\r\n\t\t\t\t\tfont-weight: bold;\r\n\t\t\t\t\tbackground:darken($rowAltBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t\t&.tabulator-calcs-top{\r\n\t\t\t\t\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.tabulator-calcs-bottom{\r\n\t\t\t\t\t\tborder-top:2px solid $rowBorderColor;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n\r\n\r\n\r\n\t//footer element\r\n\t.tabulator-footer{\r\n\t\tpadding:5px 10px;\r\n\t\tborder-top:1px solid $footerSeperatorColor;\r\n\t\tbackground-color: $footerBackgroundColor;\r\n\t\ttext-align: right;\r\n\t\tcolor: $footerTextColor;\r\n\t\tfont-weight:bold;\r\n\t\twhite-space:nowrap;\r\n\t\tuser-select:none;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\twidth:calc(100% + 20px);\r\n\t\t\tmargin:-5px -10px 5px -10px;\r\n\r\n\t\t\ttext-align: left;\r\n\r\n\t\t\tbackground:lighten($footerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:lighten($footerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-bottom:1px solid $rowBorderColor;\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&:only-child{\r\n\t\t\t\tmargin-bottom:-5px;\r\n\t\t\t\tborder-bottom:none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-paginator{\r\n\t\t\tcolor: $footerTextColor;\r\n\t\t\tfont-family:inherit;\r\n\t\t\tfont-weight:inherit;\r\n\t\t\tfont-size:inherit;\r\n\t\t}\r\n\r\n\t\t//pagination container element\r\n\t\t.tabulator-page-size{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 5px;\r\n\t\t\tpadding:2px 5px;\r\n\r\n\t\t\tborder:1px solid $footerBorderColor;\r\n\t\t\tborder-radius:3px;\r\n\t\t}\r\n\r\n\t\t.tabulator-pages{\r\n\t\t\tmargin:0 7px;\r\n\t\t}\r\n\r\n\t\t//pagination button\r\n\t\t.tabulator-page{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 2px;\r\n\t\t\tpadding:2px 5px;\r\n\r\n\t\t\tborder:1px solid $footerBorderColor;\r\n\t\t\tborder-radius:3px;\r\n\r\n\t\t\tbackground:rgba(255,255,255,.2);\r\n\r\n\t\t\t&.active{\r\n\t\t\t\tcolor:$footerActiveColor;\r\n\t\t\t}\r\n\r\n\t\t\t&:disabled{\r\n\t\t\t\topacity:.5;\r\n\t\t\t}\r\n\r\n\t\t\t&:not(.disabled){\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground:rgba(0,0,0,.2);\r\n\t\t\t\t\tcolor:#fff;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//column resize handles\r\n\t.tabulator-col-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\ttop:0;\r\n\t\tbottom:0;\r\n\t\twidth:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\tleft:0;\r\n\t\t\tright:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ew-resize;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//holding div that contains loader and covers tabulator element to prevent interaction\r\n\t.tabulator-loader{\r\n\t\tposition:absolute;\r\n\t\tdisplay: flex;\r\n\t\talign-items:center;\r\n\r\n\t\ttop:0;\r\n\t\tleft:0;\r\n\t\tz-index:100;\r\n\r\n\t\theight:100%;\r\n\t\twidth:100%;\r\n\t\tbackground:rgba(0,0,0,.4);\r\n\t\ttext-align:center;\r\n\r\n\t\t//loading message element\r\n\t\t.tabulator-loader-msg{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 auto;\r\n\t\t\tpadding:10px 20px;\r\n\r\n\t\t\tborder-radius:10px;\r\n\r\n\t\t\tbackground:#fff;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:16px;\r\n\r\n\t\t\t//loading message\r\n\t\t\t&.tabulator-loading{\r\n\t\t\t\tborder:4px solid #333;\r\n\t\t\t\tcolor:#000;\r\n\t\t\t}\r\n\r\n\t\t\t//error message\r\n\t\t\t&.tabulator-error{\r\n\t\t\t\tborder:4px solid #D00;\r\n\t\t\t\tcolor:#590000;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n//row element\r\n.tabulator-row{\r\n\tposition: relative;\r\n\tbox-sizing: border-box;\r\n\tmin-height:$textSize + ($headerMargin * 2);\r\n\tbackground-color: $rowBackgroundColor;\r\n\r\n\r\n\t&.tabulator-row-even{\r\n\t\tbackground-color: $rowAltBackgroundColor;\r\n\t}\r\n\r\n\t&.tabulator-selectable:hover{\r\n\t\tbackground-color:$rowHoverBackground;\r\n\t\tcursor: pointer;\r\n\t}\r\n\r\n\t&.tabulator-selected{\r\n\t\tbackground-color:$rowSelectedBackground;\r\n\t}\r\n\r\n\t&.tabulator-selected:hover{\r\n\t\tbackground-color:$rowSelectedBackgroundHover;\r\n\t\tcursor: pointer;\r\n\t}\r\n\r\n\t&.tabulator-row-moving{\r\n\t\tborder:1px solid #000;\r\n\t\tbackground:#fff;\r\n\t}\r\n\r\n\t&.tabulator-moving{\r\n\t\tposition: absolute;\r\n\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\tpointer-events: none;\r\n\t\tz-index:15;\r\n\t}\r\n\r\n\t//row resize handles\r\n\t.tabulator-row-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\tbottom:0;\r\n\t\tleft:0;\r\n\t\theight:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\ttop:0;\r\n\t\t\tbottom:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ns-resize;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-frozen{\r\n\t\tdisplay: inline-block;\r\n\t\tposition: absolute;\r\n\r\n\t\tbackground-color: inherit;\r\n\r\n\t\tz-index: 10;\r\n\r\n\t\t&.tabulator-frozen-left{\r\n\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t}\r\n\r\n\t\t&.tabulator-frozen-right{\r\n\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-responsive-collapse{\r\n\t\tbox-sizing:border-box;\r\n\r\n\t\tpadding:5px;\r\n\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\t&:empty{\r\n\t\t\tdisplay:none;\r\n\t\t}\r\n\r\n\t\ttable{\r\n\t\t\tfont-size:$textSize;\r\n\r\n\t\t\ttr{\r\n\t\t\t\ttd{\r\n\t\t\t\t\tposition: relative;\r\n\r\n\t\t\t\t\t&:first-of-type{\r\n\t\t\t\t\t\tpadding-right:10px;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//cell element\r\n\t.tabulator-cell{\r\n\t\tdisplay:inline-block;\r\n\t\tposition: relative;\r\n\t\tbox-sizing:border-box;\r\n\t\tpadding:4px;\r\n\t\tborder-right:1px solid $rowBorderColor;\r\n\t\tvertical-align:middle;\r\n\t\twhite-space:nowrap;\r\n\t\toverflow:hidden;\r\n\t\ttext-overflow:ellipsis;\r\n\r\n\t\t&.tabulator-editing{\r\n\t\t\tborder:1px solid $editBoxColor;\r\n\t\t\tpadding: 0;\r\n\r\n\t\t\tinput, select{\r\n\t\t\t\tborder:1px;\r\n\t\t\t\tbackground:transparent;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-validation-fail{\r\n\t\t\tborder:1px solid $errorColor;\r\n\t\t\tinput, select{\r\n\t\t\t\tborder:1px;\r\n\t\t\t\tbackground:transparent;\r\n\r\n\t\t\t\tcolor: $errorColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//hide left resize handle on first column\r\n\t\t&:first-child{\r\n\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//movable row handle\r\n\t\t&.tabulator-row-handle{\r\n\t\t\tdisplay: inline-flex;\r\n\t\t\talign-items:center;\r\n\t\t\tjustify-content:center;\r\n\r\n\t\t\t-moz-user-select: none;\r\n\t\t\t-khtml-user-select: none;\r\n\t\t\t-webkit-user-select: none;\r\n\t\t\t-o-user-select: none;\r\n\r\n\t\t\t//handle holder\r\n\t\t\t.tabulator-row-handle-box{\r\n\t\t\t\twidth:80%;\r\n\r\n\t\t\t\t//Hamburger element\r\n\t\t\t\t.tabulator-row-handle-bar{\r\n\t\t\t\t\twidth:100%;\r\n\t\t\t\t\theight:3px;\r\n\t\t\t\t\tmargin-top:2px;\r\n\t\t\t\t\tbackground:#666;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-branch{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tvertical-align:middle;\r\n\r\n\t\t\theight:9px;\r\n\t\t\twidth:7px;\r\n\r\n\t\t\tmargin-top:-9px;\r\n\t\t\tmargin-right:5px;\r\n\r\n\t\t\tborder-bottom-left-radius:1px;\r\n\r\n\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-control{\r\n\r\n\t\t\tdisplay:inline-flex;\r\n\t\t\tjustify-content:center;\r\n\t\t\talign-items:center;\r\n\t\t\tvertical-align:middle;\r\n\r\n\t\t\theight:11px;\r\n\t\t\twidth:11px;\r\n\r\n\t\t\tmargin-right:5px;\r\n\r\n\t\t\tborder:1px solid $rowTextColor;\r\n\t\t\tborder-radius:2px;\r\n\t\t\tbackground:rgba(0, 0, 0, .1);\r\n\r\n\t\t\toverflow:hidden;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\tcursor:pointer;\r\n\t\t\t\tbackground:rgba(0, 0, 0, .2);\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control-collapse{\r\n\t\t\t\tdisplay:inline-block;\r\n\t\t\t\tposition: relative;\r\n\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 1px;\r\n\r\n\t\t\t\tbackground: transparent;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tcontent: \"\";\r\n\t\t\t\t\tleft: -3px;\r\n\t\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\t\theight: 1px;\r\n\t\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control-expand{\r\n\t\t\t\tdisplay:inline-block;\r\n\t\t\t\tposition: relative;\r\n\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 1px;\r\n\r\n\t\t\t\tbackground: $rowTextColor;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tcontent: \"\";\r\n\t\t\t\t\tleft: -3px;\r\n\t\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\t\theight: 1px;\r\n\t\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t.tabulator-responsive-collapse-toggle{\r\n\t\t\tdisplay: inline-flex;\r\n\t\t\talign-items:center;\r\n\t\t\tjustify-content:center;\r\n\r\n\t\t\t-moz-user-select: none;\r\n\t\t\t-khtml-user-select: none;\r\n\t\t\t-webkit-user-select: none;\r\n\t\t\t-o-user-select: none;\r\n\r\n\t\t\theight:15px;\r\n\t\t\twidth:15px;\r\n\r\n\t\t\tborder-radius:20px;\r\n\t\t\tbackground:#666;\r\n\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:1.1em;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\topacity:.7;\r\n\t\t\t}\r\n\r\n\t\t\t&.open{\r\n\t\t\t\t.tabulator-responsive-collapse-toggle-close{\r\n\t\t\t\t\tdisplay:initial;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.tabulator-responsive-collapse-toggle-open{\r\n\t\t\t\t\tdisplay:none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-responsive-collapse-toggle-close{\r\n\t\t\t\tdisplay:none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-traffic-light{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\theight:14px;\r\n\t\t\twidth:14px;\r\n\r\n\t\t\tborder-radius:14px;\r\n\t\t}\r\n\t}\r\n\r\n\t//row grouping element\r\n\t&.tabulator-group{\r\n\t\tbox-sizing:border-box;\r\n\t\tborder-bottom:1px solid #999;\r\n\t\tborder-right:1px solid $rowBorderColor;\r\n\t\tborder-top:1px solid #999;\r\n\t\tpadding:5px;\r\n\t\tpadding-left:10px;\r\n\t\tbackground:#ccc;\r\n\t\tfont-weight:bold;\r\n\r\n\t\tmin-width: 100%;\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\t\t\tbackground-color:rgba(0,0,0,.1);\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-visible{\r\n\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-right:10px;\r\n\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\tborder-bottom: 0;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-1{\r\n\t\t\tpadding-left:30px;\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-2{\r\n\t\t\tpadding-left:50px;\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-3{\r\n\t\t\tpadding-left:70px;\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-4{\r\n\t\t\tpadding-left:90px;\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-5{\r\n\t\t\tpadding-left:110px;\r\n\t\t}\r\n\r\n\t\t.tabulator-group-toggle{\r\n\t\t\tdisplay: inline-block;\r\n\t\t}\r\n\r\n\t\t//sorting arrow\r\n\t\t.tabulator-arrow{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\twidth: 0;\r\n\t\t\theight: 0;\r\n\t\t\tmargin-right:16px;\r\n\t\t\tborder-top: 6px solid transparent;\r\n\t\t\tborder-bottom: 6px solid transparent;\r\n\t\t\tborder-right: 0;\r\n\t\t\tborder-left: 6px solid $sortArrowActive;\r\n\t\t\tvertical-align:middle;\r\n\t\t}\r\n\r\n\t\tspan{\r\n\t\t\tmargin-left:10px;\r\n\t\t\tcolor:#d00;\r\n\t\t}\r\n\t}\r\n\r\n}\r\n\r\n.tabulator-menu{\r\n\tposition: absolute;\r\n\tdisplay:inline-block;\r\n\tbox-sizing:border-box;\r\n\r\n\tbackground:$rowBackgroundColor;\r\n\tborder:1px solid $rowBorderColor;\r\n\tbox-shadow: 0 0 5px 0 rgba(0, 0, 0, .2);\r\n\r\n\tfont-size:$textSize;\r\n\r\n\toverflow-y:auto;\r\n\t-webkit-overflow-scrolling: touch;\r\n\r\n\tz-index: 10000;\r\n\r\n\t.tabulator-menu-item{\r\n\r\n\t\tpadding:5px 10px;\r\n\r\n\t\tuser-select: none;\r\n\r\n\t\t&.tabulator-menu-item-disabled{\r\n\t\t\topacity: .5;\r\n\t\t}\r\n\r\n\t\t&:not(.tabulator-menu-item-disabled):hover{\r\n\t\t\tcursor: pointer;\r\n\t\t\tbackground: $rowAltBackgroundColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-menu-separator{\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t}\r\n}\r\n\r\n.tabulator-edit-select-list{\r\n\tposition: absolute;\r\n\tdisplay:inline-block;\r\n\tbox-sizing:border-box;\r\n\r\n\tmax-height:200px;\r\n\r\n\tbackground:$rowBackgroundColor;\r\n\tborder:1px solid $rowBorderColor;\r\n\r\n\tfont-size:$textSize;\r\n\r\n\toverflow-y:auto;\r\n\t-webkit-overflow-scrolling: touch;\r\n\r\n\tz-index: 10000;\r\n\r\n\t.tabulator-edit-select-list-item{\r\n\t\tpadding:4px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\r\n\t\t&.active{\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tbackground:$editBoxColor;\r\n\r\n\t\t\t&.focused{\r\n\t\t\t\toutline:1px solid rgba($rowBackgroundColor, .5);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.focused{\r\n\t\t\toutline:1px solid $editBoxColor;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tbackground:$editBoxColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-edit-select-list-notice{\r\n\t\tpadding:4px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\t\ttext-align: center;\r\n\t}\r\n\r\n\t.tabulator-edit-select-list-group{\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\tpadding:4px;\r\n\t\tpadding-top:6px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\t\tfont-weight:bold;\r\n\t}\r\n}\r\n\r\n\r\n//RTL Styling\r\n\r\n.tabulator.tabulator-ltr{\r\n\tdirection: ltr;\r\n}\r\n\r\n.tabulator.tabulator-rtl{\r\n\ttext-align: initial;\r\n\tdirection: rtl;\r\n\r\n\t.tabulator-header {\r\n\t\t.tabulator-col{\r\n\t\t\ttext-align: initial;\r\n\t\t\tborder-left:1px solid $headerBorderColor;\r\n\t\t\tborder-right:initial;\r\n\r\n\t\t\t&.tabulator-col-group{\r\n\t\t\t\t.tabulator-col-group-cols{\r\n\t\t\t\t\tmargin-right:initial;\r\n\t\t\t\t\tmargin-left:-1px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-sortable{\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\tpadding-left:25px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-col-content{\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tleft:8px;\r\n\t\t\t\t\tright:initial;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-row{\r\n\t\t.tabulator-cell{\r\n\t\t\tborder-right:initial;\r\n\t\t\tborder-left:1px solid $rowBorderColor;\r\n\r\n\t\t\t//hide left resize handle on first column\r\n\t\t\t// &:first-child{\r\n\t\t\t// \t.tabulator-col-resize-handle.prev{\r\n\t\t\t// \t\tdisplay: none;\r\n\t\t\t// \t}\r\n\t\t\t// }\r\n\r\n\t\t\t.tabulator-data-tree-branch{\r\n\t\t\t\tmargin-right:initial;\r\n\t\t\t\tmargin-left:5px;\r\n\r\n\t\t\t\tborder-bottom-left-radius:initial;\r\n\t\t\t\tborder-bottom-right-radius:1px;\r\n\r\n\t\t\t\tborder-left:initial;\r\n\t\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control{\r\n\t\t\t\tmargin-right:initial;\r\n\t\t\t\tmargin-left:5px;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//column resize handles\r\n\t.tabulator-col-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tleft:0;\r\n\t\tright:auto;\r\n\r\n\t\t&.prev{\r\n\t\t\tright:0;\r\n\t\t\tleft:auto;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n\r\n// Table print styling\r\n\r\n.tabulator-print-fullscreen{\r\n\tposition: absolute;\r\n\ttop:0;\r\n\tbottom:0;\r\n\tleft:0;\r\n\tright:0;\r\n\r\n\tz-index: 10000;\r\n}\r\n\r\nbody.tabulator-print-fullscreen-hide>*:not(.tabulator-print-fullscreen){\r\n\tdisplay:none !important;\r\n}\r\n\r\n.tabulator-print-table{\r\n\tborder-collapse: collapse;\r\n\r\n\t.tabulator-data-tree-branch{\r\n\t\tdisplay:inline-block;\r\n\t\tvertical-align:middle;\r\n\r\n\t\theight:9px;\r\n\t\twidth:7px;\r\n\r\n\t\tmargin-top:-9px;\r\n\t\tmargin-right:5px;\r\n\r\n\t\tborder-bottom-left-radius:1px;\r\n\r\n\t\tborder-left:2px solid $rowBorderColor;\r\n\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t}\r\n\r\n\t//row grouping element\r\n\t.tabulator-print-table-group{\r\n\t\tbox-sizing:border-box;\r\n\t\tborder-bottom:1px solid #999;\r\n\t\tborder-right:1px solid $rowBorderColor;\r\n\t\tborder-top:1px solid #999;\r\n\t\tpadding:5px;\r\n\t\tpadding-left:10px;\r\n\t\tbackground:#ccc;\r\n\t\tfont-weight:bold;\r\n\r\n\t\tmin-width: 100%;\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\t\t\tbackground-color:rgba(0,0,0,.1);\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-visible{\r\n\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-right:10px;\r\n\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\tborder-bottom: 0;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-1{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:30px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-2{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:50px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-3{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:70px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-4{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:90px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-5{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:110px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-group-toggle{\r\n\t\t\tdisplay: inline-block;\r\n\t\t}\r\n\r\n\t\t//sorting arrow\r\n\t\t.tabulator-arrow{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\twidth: 0;\r\n\t\t\theight: 0;\r\n\t\t\tmargin-right:16px;\r\n\t\t\tborder-top: 6px solid transparent;\r\n\t\t\tborder-bottom: 6px solid transparent;\r\n\t\t\tborder-right: 0;\r\n\t\t\tborder-left: 6px solid $sortArrowActive;\r\n\t\t\tvertical-align:middle;\r\n\t\t}\r\n\r\n\t\tspan{\r\n\t\t\tmargin-left:10px;\r\n\t\t\tcolor:#d00;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-data-tree-control{\r\n\r\n\t\tdisplay:inline-flex;\r\n\t\tjustify-content:center;\r\n\t\talign-items:center;\r\n\t\tvertical-align:middle;\r\n\r\n\t\theight:11px;\r\n\t\twidth:11px;\r\n\r\n\t\tmargin-right:5px;\r\n\r\n\t\tborder:1px solid $rowTextColor;\r\n\t\tborder-radius:2px;\r\n\t\tbackground:rgba(0, 0, 0, .1);\r\n\r\n\t\toverflow:hidden;\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\t\t\tbackground:rgba(0, 0, 0, .2);\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-control-collapse{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition: relative;\r\n\r\n\t\t\theight: 7px;\r\n\t\t\twidth: 1px;\r\n\r\n\t\t\tbackground: transparent;\r\n\r\n\t\t\t&:after {\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tcontent: \"\";\r\n\t\t\t\tleft: -3px;\r\n\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\theight: 1px;\r\n\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-control-expand{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition: relative;\r\n\r\n\t\t\theight: 7px;\r\n\t\t\twidth: 1px;\r\n\r\n\t\t\tbackground: $rowTextColor;\r\n\r\n\t\t\t&:after {\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tcontent: \"\";\r\n\t\t\t\tleft: -3px;\r\n\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\theight: 1px;\r\n\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n"]} \ No newline at end of file diff --git a/website/js/vendor/tabulator/css/tabulator_site.min.css b/website/js/vendor/tabulator/css/tabulator_site.min.css deleted file mode 100644 index 3b32a79..0000000 --- a/website/js/vendor/tabulator/css/tabulator_site.min.css +++ /dev/null @@ -1 +0,0 @@ -.tabulator{position:relative;border-bottom:5px solid #222;background-color:#fff;font-size:14px;text-align:left;overflow:hidden;-ms-transform:translatez(0);transform:translatez(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableHolder .tabulator-table{min-width:100%}.tabulator[tabulator-layout=fitDataTable]{display:inline-block}.tabulator[tabulator-layout=fitColumns] .tabulator-row .tabulator-cell:last-of-type{border-right:none}.tabulator.tabulator-block-select{-webkit-user-select:none;-ms-user-select:none;user-select:none}.tabulator .tabulator-header{position:relative;box-sizing:border-box;width:100%;border-bottom:3px solid rgba(32.1569%,38.8235%,55.6863%,1);background-color:#222;color:#fff;font-weight:700;white-space:nowrap;overflow:hidden;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-header.tabulator-header-hidden{display:none}.tabulator .tabulator-header .tabulator-col{display:inline-block;position:relative;box-sizing:border-box;border-right:1px solid #aaa;background-color:#222;text-align:left;vertical-align:bottom;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-moving{position:absolute;border:1px solid rgba(32.1569%,38.8235%,55.6863%,1);background:#090909;pointer-events:none}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{box-sizing:border-box;position:relative;padding:8px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button{padding:0 8px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-menu-button:hover{cursor:pointer;opacity:.6}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title-holder{position:relative}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{box-sizing:border-box;width:100%;border:1px solid #999;padding:1px;background:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-header-menu-button+.tabulator-title-editor{width:calc(100% - 22px)}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;position:absolute;top:0;bottom:0;right:4px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{position:relative;display:-ms-flexbox;display:flex;border-top:1px solid #aaa;overflow:hidden;margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{position:relative;box-sizing:border-box;margin-top:2px;width:100%;text-align:center}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto!important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear{width:0;height:0}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{cursor:pointer;background-color:#090909}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-col-sorter{color:#bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-col-sorter{color:rgba(32.1569%,38.8235%,55.6863%,1)}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-top:none;border-bottom:6px solid rgba(32.1569%,38.8235%,55.6863%,1)}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-col-sorter{color:rgba(32.1569%,38.8235%,55.6863%,1)}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-bottom:none;border-top:6px solid rgba(32.1569%,38.8235%,55.6863%,1);color:rgba(32.1569%,38.8235%,55.6863%,1)}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title{-ms-writing-mode:tb-rl;writing-mode:vertical-rl;text-orientation:mixed;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title{-ms-transform:rotate(180deg);transform:rotate(180deg)}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title{padding-right:0;padding-top:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title{padding-right:0;padding-bottom:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-sorter{-ms-flex-pack:center;justify-content:center;left:0;right:0;top:4px;bottom:auto}.tabulator .tabulator-header .tabulator-frozen{display:inline-block;position:absolute;z-index:10}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #aaa}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #aaa}.tabulator .tabulator-header .tabulator-calcs-holder{box-sizing:border-box;min-width:600%;background:#3c3c3c!important;border-top:1px solid #aaa;overflow:hidden}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{background:#3c3c3c!important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-header .tabulator-frozen-rows-holder{min-width:600%}.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty{display:none}.tabulator .tabulator-tableHolder{position:relative;width:100%;white-space:nowrap;overflow:auto;-webkit-overflow-scrolling:touch}.tabulator .tabulator-tableHolder:focus{outline:0}.tabulator .tabulator-tableHolder .tabulator-placeholder{box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=virtual]{min-height:100%;min-width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder span{display:inline-block;margin:0 auto;padding:10px;color:rgba(32.1569%,38.8235%,55.6863%,1);font-weight:700;font-size:20px}.tabulator .tabulator-tableHolder .tabulator-table{position:relative;display:inline-block;background-color:#fff;white-space:nowrap;overflow:visible;color:#333}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs{font-weight:700;background:#484848!important;color:#fff}.tabulator .tabulator-footer{padding:5px 10px;padding-top:8px;border-top:3px solid rgba(32.1569%,38.8235%,55.6863%,1);background-color:#222;text-align:right;color:#222;font-weight:700;white-space:nowrap;-ms-user-select:none;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-footer .tabulator-calcs-holder{box-sizing:border-box;width:calc(100% + 20px);margin:-8px -10px 8px -10px;text-align:left;background:#3c3c3c!important;border-bottom:1px solid #aaa;overflow:hidden}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{background:#3c3c3c!important;color:#fff!important}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{margin-bottom:-5px;border-bottom:none}.tabulator .tabulator-footer .tabulator-paginator label{color:#fff}.tabulator .tabulator-footer .tabulator-page-size{display:inline-block;margin:0 5px;padding:2px 5px;border:1px solid #aaa;border-radius:3px}.tabulator .tabulator-footer .tabulator-pages{margin:0 7px}.tabulator .tabulator-footer .tabulator-page{display:inline-block;margin:0 2px;padding:2px 5px;border:1px solid #aaa;border-radius:3px;background:#fff;color:#222;font-family:inherit;font-weight:inherit;font-size:inherit}.tabulator .tabulator-footer .tabulator-page.active{color:rgba(32.1569%,38.8235%,55.6863%,1)}.tabulator .tabulator-footer .tabulator-page:disabled{opacity:.5}.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover{cursor:pointer;background:rgba(0,0,0,.2);color:#fff}.tabulator .tabulator-col-resize-handle{position:absolute;right:0;top:0;bottom:0;width:5px}.tabulator .tabulator-col-resize-handle.prev{left:0;right:auto}.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}.tabulator .tabulator-loader{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;z-index:100;height:100%;width:100%;background:rgba(0,0,0,.4);text-align:center}.tabulator .tabulator-loader .tabulator-loader-msg{display:inline-block;margin:0 auto;padding:10px 20px;border-radius:10px;background:#fff;font-weight:700;font-size:16px}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading{border:4px solid #333;color:#000}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error{border:4px solid #d00;color:#590000}.tabulator-row{position:relative;box-sizing:border-box;min-height:22px;background-color:#fff}.tabulator-row.tabulator-row-even{background-color:#efefef}.tabulator-row.tabulator-selectable:hover{background-color:#bbb;cursor:pointer}.tabulator-row.tabulator-selected{background-color:#9abcea}.tabulator-row.tabulator-selected:hover{background-color:#769bcc;cursor:pointer}.tabulator-row.tabulator-row-moving{border:1px solid #000;background:#fff}.tabulator-row.tabulator-moving{position:absolute;border-top:1px solid #aaa;border-bottom:1px solid #aaa;pointer-events:none!important;z-index:15}.tabulator-row .tabulator-row-resize-handle{position:absolute;right:0;bottom:0;left:0;height:5px}.tabulator-row .tabulator-row-resize-handle.prev{top:0;bottom:auto}.tabulator-row .tabulator-row-resize-handle:hover{cursor:ns-resize}.tabulator-row .tabulator-frozen{display:inline-block;position:absolute;background-color:inherit;z-index:10}.tabulator-row .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #aaa}.tabulator-row .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #aaa}.tabulator-row .tabulator-responsive-collapse{box-sizing:border-box;padding:5px;border-top:1px solid #aaa;border-bottom:1px solid #aaa}.tabulator-row .tabulator-responsive-collapse:empty{display:none}.tabulator-row .tabulator-responsive-collapse table{font-size:14px}.tabulator-row .tabulator-responsive-collapse table tr td{position:relative}.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type{padding-right:10px}.tabulator-row .tabulator-cell{display:inline-block;position:relative;box-sizing:border-box;padding:6px;border-right:1px solid #aaa;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #1d68cd;padding:0}.tabulator-row .tabulator-cell.tabulator-editing input,.tabulator-row .tabulator-cell.tabulator-editing select{border:1px;background:0 0}.tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #d00}.tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator-row .tabulator-cell.tabulator-validation-fail select{border:1px;background:0 0;color:#d00}.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator-row .tabulator-cell.tabulator-row-handle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{width:100%;height:3px;margin-top:2px;background:rgba(32.1569%,38.8235%,55.6863%,1)}.tabulator-row .tabulator-cell .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #aaa;border-bottom:2px solid #aaa}.tabulator-row .tabulator-cell .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #333;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:0 0}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;height:15px;width:15px;border-radius:20px;background:#666;color:#fff;font-weight:700;font-size:1.1em}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover{opacity:.7}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close{display:initial}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open{display:none}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close{display:none}.tabulator-row .tabulator-cell .tabulator-traffic-light{display:inline-block;height:14px;width:14px;border-radius:14px}.tabulator-row.tabulator-group{box-sizing:border-box;border-right:1px solid #aaa;border-top:1px solid #000;border-bottom:2px solid rgba(32.1569%,38.8235%,55.6863%,1);padding:5px;padding-left:10px;background:#222;color:#fff;font-weight:700;min-width:100%}.tabulator-row.tabulator-group:hover{cursor:pointer;background-color:#090909}.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid rgba(32.1569%,38.8235%,55.6863%,1);border-bottom:0}.tabulator-row.tabulator-group.tabulator-group-level-1{padding-left:30px}.tabulator-row.tabulator-group.tabulator-group-level-2{padding-left:50px}.tabulator-row.tabulator-group.tabulator-group-level-3{padding-left:70px}.tabulator-row.tabulator-group.tabulator-group-level-4{padding-left:90px}.tabulator-row.tabulator-group.tabulator-group-level-5{padding-left:110px}.tabulator-row.tabulator-group .tabulator-group-toggle{display:inline-block}.tabulator-row.tabulator-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid rgba(32.1569%,38.8235%,55.6863%,1);vertical-align:middle}.tabulator-row.tabulator-group span{margin-left:10px;color:rgba(32.1569%,38.8235%,55.6863%,1)}.tabulator-menu{position:absolute;display:inline-block;box-sizing:border-box;background:#fff;border:1px solid #aaa;box-shadow:0 0 5px 0 rgba(0,0,0,.2);font-size:14px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:10000}.tabulator-menu .tabulator-menu-item{padding:5px 10px;-webkit-user-select:none;-ms-user-select:none;user-select:none}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-disabled{opacity:.5}.tabulator-menu .tabulator-menu-item:not(.tabulator-menu-item-disabled):hover{cursor:pointer;background:#efefef}.tabulator-menu .tabulator-menu-separator{border-top:1px solid #aaa}.tabulator-edit-select-list{position:absolute;display:inline-block;box-sizing:border-box;max-height:200px;background:#fff;border:1px solid #aaa;font-size:14px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:10000}.tabulator-edit-select-list .tabulator-edit-select-list-item{padding:4px;color:#333}.tabulator-edit-select-list .tabulator-edit-select-list-item.active{color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-item.active.focused{outline:1px solid rgba(255,255,255,.5)}.tabulator-edit-select-list .tabulator-edit-select-list-item.focused{outline:1px solid #1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-item:hover{cursor:pointer;color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-notice{padding:4px;color:#333;text-align:center}.tabulator-edit-select-list .tabulator-edit-select-list-group{border-bottom:1px solid #aaa;padding:4px;padding-top:6px;color:#333;font-weight:700}.tabulator.tabulator-ltr{direction:ltr}.tabulator.tabulator-rtl{text-align:initial;direction:rtl}.tabulator.tabulator-rtl .tabulator-header .tabulator-col{text-align:initial;border-left:1px solid #aaa;border-right:initial}.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{margin-right:initial;margin-left:-1px}.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:0;padding-left:25px}.tabulator.tabulator-rtl .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{left:8px;right:initial}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell{border-right:initial;border-left:1px solid #aaa}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-branch{margin-right:initial;margin-left:5px;border-bottom-left-radius:initial;border-bottom-right-radius:1px;border-left:initial;border-right:2px solid #aaa}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-control{margin-right:initial;margin-left:5px}.tabulator.tabulator-rtl .tabulator-col-resize-handle{position:absolute;left:0;right:auto}.tabulator.tabulator-rtl .tabulator-col-resize-handle.prev{right:0;left:auto}.tabulator-print-fullscreen{position:absolute;top:0;bottom:0;left:0;right:0;z-index:10000}body.tabulator-print-fullscreen-hide>:not(.tabulator-print-fullscreen){display:none!important}.tabulator-print-table{border-collapse:collapse}.tabulator-print-table .tabulator-print-table-group{box-sizing:border-box;border-right:1px solid #aaa;border-top:1px solid #000;border-bottom:2px solid rgba(32.1569%,38.8235%,55.6863%,1);padding:5px;padding-left:10px;background:#222;color:#fff;font-weight:700;min-width:100%}.tabulator-print-table .tabulator-print-table-group:hover{cursor:pointer;background-color:#090909}.tabulator-print-table .tabulator-print-table-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid rgba(32.1569%,38.8235%,55.6863%,1);border-bottom:0}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-1 td{padding-left:30px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-2 td{padding-left:50px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-3 td{padding-left:70px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-4 td{padding-left:90px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-5 td{padding-left:110px!important}.tabulator-print-table .tabulator-print-table-group .tabulator-group-toggle{display:inline-block}.tabulator-print-table .tabulator-print-table-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid rgba(32.1569%,38.8235%,55.6863%,1);vertical-align:middle}.tabulator-print-table .tabulator-print-table-group span{margin-left:10px;color:rgba(32.1569%,38.8235%,55.6863%,1)}.tabulator-print-table .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #aaa;border-bottom:2px solid #aaa}.tabulator-print-table .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #333;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-print-table .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:0 0}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#333}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333} \ No newline at end of file diff --git a/website/js/vendor/tabulator/css/tabulator_site.min.css.map b/website/js/vendor/tabulator/css/tabulator_site.min.css.map deleted file mode 100644 index 5ca4e22..0000000 --- a/website/js/vendor/tabulator/css/tabulator_site.min.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["tabulator_site.scss"],"names":[],"mappings":"AAyCA,WACC,kBAAkB,AAElB,6BAvCgB,AAyChB,sBA1CqB,AA4CrB,eA1Ca,AA2Cb,gBAAgB,AAChB,gBAAe,AAMf,uBAAwB,CAiiBxB,AAhjBD,iFAoBI,cAAc,CACd,AArBJ,0CA0BE,oBAAqB,CACrB,AA3BF,oFAiCK,iBAAkB,CAClB,AAlCL,kCAyCE,yBAAiB,AAAjB,qBAAiB,AAAjB,gBAAiB,CACjB,AA1CF,6BA8CE,kBAAiB,AACjB,sBAAsB,AAEtB,WAAU,AAEV,gCAhF2B,AAiF3B,sBApFyB,AAqFzB,WApFmB,AAqFnB,gBAAgB,AAEhB,mBAAmB,AACnB,gBAAe,AAEf,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAmRpB,AAjVF,qDAiEG,YAAY,CACZ,AAlEH,4CAsEG,qBAAoB,AAEpB,kBAAiB,AACjB,sBAAqB,AACrB,4BAxGoB,AAyGpB,sBA3GwB,AA4GxB,gBAAe,AACf,sBAAsB,AACtB,eAAgB,CAqNhB,AAnSH,6DAiFI,kBAAkB,AAClB,yBA/GyB,AAgHzB,mBAA8C,AAC9C,mBAAoB,CACpB,AArFJ,mEAyFI,sBAAqB,AACrB,kBAAkB,AAClB,WAAW,CA8DX,AAzJJ,iGA+FK,aAAc,CAMd,AArGL,uGAkGM,eAAe,AACf,UAAW,CACX,AApGN,+FAyGK,iBAAkB,CAClB,AA1GL,wFA8GK,sBAAqB,AACrB,WAAW,AAEX,mBAAmB,AACnB,gBAAgB,AAChB,uBAAuB,AACvB,qBAAqB,CAiBrB,AArIL,gHAwHM,sBAAsB,AACtB,WAAW,AAEX,sBAAqB,AAErB,YAAW,AAEX,eAAgB,CAChB,AAhIN,8IAmIM,uBAAuB,CACvB,AApIN,yFAyIK,oBAAa,AAAb,aAAa,AACb,sBAAmB,AAAnB,mBAAmB,AAEnB,kBAAkB,AAClB,MAAK,AACL,SAAQ,AACR,SAAS,CAST,AAxJL,0GAkJM,QAAQ,AACR,SAAS,AACT,kCAAkC,AAClC,mCAAmC,AACnC,4BA9KkB,CA+KlB,AAvJN,0FAgKK,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AAEb,0BAjMkB,AAkMlB,gBAAgB,AAEhB,iBAAiB,CACjB,AAvKL,0FA6KK,YAAa,CACb,AA9KL,qEAmLI,kBAAkB,AAClB,sBAAsB,AACtB,eAAc,AACd,WAAU,AACV,iBAAkB,CAiBlB,AAxMJ,8EA2LK,qBAAsB,CACtB,AA5LL,yEA+LK,cAAe,CACf,AAhML,sFAoMM,QAAS,AACT,QAAS,CACT,AAtMN,oFA6MK,kBAAkB,CAClB,AA9ML,qEAiNK,eAAc,AACd,wBAAoD,CACpD,AAnNL,4HAuNM,UA/OkB,CAqPlB,AA7NN,6IA0NO,gBAAgB,AAChB,4BAnPiB,CAoPjB,AA5NP,2HAkOM,aA3PmB,CAkQnB,AAzON,4IAqOO,gBAAgB,AAChB,+BA/PkB,CAiQlB,AAxOP,4HA8OM,aAvQmB,CA8QnB,AArPN,6IAiPO,mBAAmB,AACnB,6BA3QkB,AA4QlB,aA5QkB,CA6QlB,AApPP,+GA4PM,uBAAyB,AAAzB,yBAAyB,AACzB,uBAAuB,AAEvB,oBAAY,AAAZ,aAAY,AACZ,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,sBAAsB,CACtB,AAlQN,oHAuQM,wBAAyB,CACzB,AAxQN,2GA6QM,gBAAe,AACf,gBAAgB,CAChB,AA/QN,uIAmRO,gBAAe,AACf,mBAAmB,CACnB,AArRP,4GA0RM,qBAAuB,AAAvB,uBAAuB,AACvB,OAAM,AACN,QAAO,AACP,QAAO,AACP,WAAW,CACX,AA/RN,+CAsSG,qBAAqB,AACrB,kBAAkB,AAIlB,UAAW,CASX,AApTH,qEA8SI,2BAjUgB,CAkUhB,AA/SJ,sEAkTI,0BArUgB,CAsUhB,AAnTJ,qDAuTG,sBAAqB,AACrB,eAAc,AAEd,6BAA0D,AAU1D,0BAvViB,AA0VjB,eAAgB,CAChB,AAxUH,oEA6TI,4BAA0D,CAK1D,AAlUJ,iGAgUK,YAAa,CACb,AAjUL,2DA2UG,cAAc,CAKd,AAhVH,iEA8UI,YAAa,CACb,AA/UJ,kCAqVE,kBAAiB,AACjB,WAAU,AACV,mBAAmB,AACnB,cAAa,AACb,gCAAiC,CAgDjC,AAzYF,wCA4VG,YAAa,CACb,AA7VH,yDAiWG,sBAAqB,AACrB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAOlB,UAAU,CAYV,AAtXH,wFAsWI,gBAAe,AACf,cAAc,CACd,AAxWJ,8DA6WI,qBAAqB,AAErB,cAAa,AACb,aAAY,AAEZ,cA/YyB,AAgZzB,gBAAiB,AACjB,cAAe,CACf,AArXJ,mDA0XG,kBAAiB,AACjB,qBAAoB,AACpB,sBAjZqB,AAkZrB,mBAAmB,AACnB,iBAAgB,AAChB,UAjZe,CA0Zf,AAxYH,kFAmYK,gBAAiB,AACjB,6BAA0D,AAC1D,UApagB,CAqahB,AAtYL,6BA8YE,iBAAgB,AAChB,gBAAe,AACf,6BArZ2B,AAsZ3B,sBAzZyB,AA0ZzB,iBAAgB,AAChB,WA1ZmB,AA2ZnB,gBAAgB,AAChB,mBAAkB,AAClB,qBAAgB,AAAhB,iBAAgB,AAEhB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAuFpB,AAlfF,qDA8ZG,sBAAqB,AACrB,wBAAuB,AACvB,sBAA2B,AAE3B,gBAAgB,AAEhB,6BAA0D,AAY1D,6BAnciB,AAqcjB,eAAgB,CAMhB,AAxbH,oEAuaI,6BAA0D,AAC1D,oBAAiC,CAKjC,AA7aJ,iGA2aK,YAAa,CACb,AA5aL,gEAqbI,mBAAkB,AAClB,kBAAkB,CAClB,AAvbJ,wDA6bI,UAAU,CACV,AA9bJ,kDAmcG,qBAAoB,AAEpB,aAAY,AACZ,gBAAe,AAEf,sBA9coB,AA+cpB,iBAAiB,CACjB,AA1cH,8CA8cG,YAAY,CACZ,AA/cH,6CAmdG,qBAAoB,AAEpB,aAAY,AACZ,gBAAe,AAEf,sBA9doB,AA+dpB,kBAAiB,AAEjB,gBAAe,AAEf,WApekB,AAqelB,oBAAmB,AACnB,oBAAmB,AACnB,iBAAiB,CAiBjB,AAjfH,oDAmeI,aAxeyB,CAyezB,AApeJ,sDAueI,UAAU,CACV,AAxeJ,kEA4eK,eAAc,AACd,0BAAyB,AACzB,UAAU,CACV,AA/eL,wCAsfE,kBAAiB,AACjB,QAAO,AACP,MAAK,AACL,SAAQ,AACR,SAAS,CAUT,AApgBF,6CA6fG,OAAM,AACN,UAAU,CACV,AA/fH,8CAkgBG,gBAAgB,CAChB,AAngBH,6BAygBE,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAElB,MAAK,AACL,OAAM,AACN,YAAW,AAEX,YAAW,AACX,WAAU,AACV,0BAAyB,AACzB,iBAAiB,CA2BjB,AA/iBF,mDAwhBG,qBAAoB,AAEpB,cAAa,AACb,kBAAiB,AAEjB,mBAAkB,AAElB,gBAAe,AACf,gBAAgB,AAChB,cAAc,CAad,AA9iBH,qEAqiBI,sBAAqB,AACrB,UAAU,CACV,AAviBJ,mEA2iBI,sBAAqB,AACrB,aAAa,CACb,AAMJ,eACC,kBAAkB,AAClB,sBAAsB,AACtB,gBAA0C,AAC1C,qBA5kBuB,CA47BvB,AApXD,kCAQE,wBA/kB4B,CAglB5B,AATF,0CAYE,sBAhlBsB,AAilBtB,cAAe,CACf,AAdF,kCAiBE,wBAnlB6B,CAolB7B,AAlBF,wCAqBE,yBAtlBkC,AAulBlC,cAAe,CACf,AAvBF,oCA0BE,sBAAqB,AACrB,eAAe,CACf,AA5BF,gCA+BE,kBAAkB,AAElB,0BAvmBkB,AAwmBlB,6BAxmBkB,AA0mBlB,8BAA+B,AAC/B,UAAU,CACV,AAtCF,4CA0CE,kBAAiB,AACjB,QAAO,AACP,SAAQ,AACR,OAAM,AACN,UAAU,CAUV,AAxDF,iDAiDG,MAAK,AACL,WAAW,CACX,AAnDH,kDAsDG,gBAAgB,CAChB,AAvDH,iCA2DE,qBAAqB,AACrB,kBAAkB,AAElB,yBAAyB,AAEzB,UAAW,CASX,AAzEF,uDAmEG,2BAzoBiB,CA0oBjB,AApEH,wDAuEG,0BA7oBiB,CA8oBjB,AAxEH,8CA4EE,sBAAqB,AAErB,YAAW,AAEX,0BAtpBkB,AAupBlB,4BAvpBkB,CA0qBlB,AApGF,oDAoFG,YAAY,CACZ,AArFH,oDAwFG,cA9qBW,CAyrBX,AAnGH,0DA4FK,iBAAkB,CAKlB,AAjGL,wEA+FM,kBAAkB,CAClB,AAhGN,+BAwGE,qBAAoB,AACpB,kBAAkB,AAClB,sBAAqB,AACrB,YAAW,AACX,4BAlrBkB,AAmrBlB,sBAAqB,AACrB,mBAAkB,AAClB,gBAAe,AACf,sBAAsB,CA0LtB,AA1SF,iDAoHG,yBAnrBkB,AAorBlB,SAAU,CAMV,AA3HH,+GAwHI,WAAU,AACV,sBAAsB,CACtB,AA1HJ,yDA8HG,qBA5rBgB,CAmsBhB,AArIH,+HAgII,WAAU,AACV,uBAAsB,AAEtB,UAjsBe,CAksBf,AApIJ,6EA0II,YAAa,CACb,AA3IJ,oDAiJG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAElB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAcpB,AArKH,8EA2JI,SAAS,CAST,AApKJ,wGA+JK,WAAU,AACV,WAAU,AACV,eAAc,AACd,kBA9uBoB,CA+uBpB,AAnKL,2DAwKG,qBAAoB,AACpB,sBAAqB,AAErB,WAAU,AACV,UAAS,AAET,gBAAe,AACf,iBAAgB,AAEhB,8BAA6B,AAE7B,2BAzvBiB,AA0vBjB,4BA1vBiB,CA2vBjB,AArLH,4DAyLG,2BAAmB,AAAnB,oBAAmB,AACnB,qBAAsB,AAAtB,uBAAsB,AACtB,sBAAkB,AAAlB,mBAAkB,AAClB,sBAAqB,AAErB,YAAW,AACX,WAAU,AAEV,iBAAgB,AAEhB,sBAxwBe,AAywBf,kBAAiB,AACjB,0BAA4B,AAE5B,eAAe,CAmDf,AA1PH,kEA0MI,eAAc,AACd,yBAA4B,CAC5B,AA5MJ,kGA+MI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,sBAAuB,CAavB,AAlOJ,wGAwNK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eAryBa,CAsyBb,AAjOL,gGAqOI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,eAhzBc,CA6zBd,AAxPJ,sGA8OK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eA3zBa,CA4zBb,AAvPL,qEA6PG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,uBAAsB,AAEtB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,oBAAoB,AAEpB,YAAW,AACX,WAAU,AAEV,mBAAkB,AAClB,gBAAe,AAEf,WAp1BqB,AAq1BrB,gBAAgB,AAChB,eAAe,CAmBf,AAjSH,2EAiRI,UAAU,CACV,AAlRJ,sHAsRK,eAAe,CACf,AAvRL,sOA+RI,YAAY,CACZ,AAhSJ,wDAoSG,qBAAqB,AACrB,YAAW,AACX,WAAU,AAEV,kBAAkB,CAClB,AAzSH,+BA8SE,sBAAqB,AACrB,4BAr3BkB,AAs3BlB,0BAAyB,AACzB,gCAj4B2B,AAk4B3B,YAAW,AACX,kBAAiB,AACjB,gBAv4ByB,AAw4BzB,WAv4BmB,AAw4BnB,gBAAgB,AAEhB,cAAe,CA0Df,AAlXF,qCA2TG,eAAc,AACd,wBAAoD,CACpD,AA7TH,wEAiUI,kBAAiB,AACjB,kCAAkC,AAClC,mCAAmC,AACnC,6BAh5BqB,AAi5BrB,eAAgB,CAChB,AAtUJ,uDA0UG,iBAAiB,CACjB,AA3UH,uDA8UG,iBAAiB,CACjB,AA/UH,uDAkVG,iBAAiB,CACjB,AAnVH,uDAsVG,iBAAiB,CACjB,AAvVH,uDA0VG,kBAAkB,CAClB,AA3VH,uDA8VG,oBAAqB,CACrB,AA/VH,gDAmWG,qBAAqB,AACrB,QAAQ,AACR,SAAS,AACT,kBAAiB,AACjB,iCAAiC,AACjC,oCAAoC,AACpC,eAAe,AACf,8BAt7BsB,AAu7BtB,qBAAqB,CACrB,AA5WH,oCA+WG,iBAAgB,AAChB,aAh8B0B,CAi8B1B,AAKH,gBACC,kBAAkB,AAClB,qBAAoB,AACpB,sBAAqB,AAErB,gBAn8BuB,AAo8BvB,sBAl8BmB,AAm8BnB,oCAAuC,AAEvC,eAr9Ba,AAu9Bb,gBAAe,AACf,iCAAiC,AAEjC,aAAc,CAqBd,AAnCD,qCAkBE,iBAAgB,AAEhB,yBAAiB,AAAjB,qBAAiB,AAAjB,gBAAiB,CAUjB,AA9BF,kEAuBG,UAAW,CACX,AAxBH,8EA2BG,eAAe,AACf,kBAz9B2B,CA09B3B,AA7BH,0CAiCE,yBA79BkB,CA89BlB,AAGF,4BACC,kBAAkB,AAClB,qBAAoB,AACpB,sBAAqB,AAErB,iBAAgB,AAEhB,gBA1+BuB,AA2+BvB,sBAz+BmB,AA2+BnB,eA3/Ba,AA6/Bb,gBAAe,AACf,iCAAiC,AAEjC,aAAc,CA6Cd,AA5DD,6DAkBE,YAAW,AAEX,UAp/BgB,CA0gChB,AA1CF,oEAuBG,WA1/BqB,AA2/BrB,kBAl/BkB,CAu/BlB,AA7BH,4EA2BI,oCA9/BoB,CA+/BpB,AA5BJ,qEAgCG,yBA1/BkB,CA2/BlB,AAjCH,mEAqCG,eAAc,AAEd,WA1gCqB,AA2gCrB,kBAlgCkB,CAmgClB,AAzCH,+DA6CE,YAAW,AAEX,WA/gCgB,AAghChB,iBAAkB,CAClB,AAjDF,8DAoDE,6BArhCkB,AAuhClB,YAAW,AACX,gBAAe,AAEf,WAzhCgB,AA0hChB,eAAgB,CAChB,AAMF,yBACC,aAAc,CACd,AAGD,yBACC,mBAAmB,AACnB,aAAc,CAwEd,AA1ED,0DAMG,mBAAmB,AACnB,2BAzjCoB,AA0jCpB,oBAAoB,CAsBpB,AA9BH,wGAYK,eAAoB,AACpB,gBAAgB,CAChB,AAdL,kGAmBK,gBAAe,AACf,iBAAiB,CACjB,AArBL,kGA0BK,SAAQ,AACR,UAAa,CACb,AA5BL,wDAmCG,qBAAoB,AACpB,0BA3kCiB,CAmmCjB,AA5DH,oFA8CI,eAAoB,AACpB,gBAAe,AAEf,4BAAiC,AACjC,+BAA8B,AAE9B,oBAAmB,AACnB,2BA5lCgB,CA6lChB,AAtDJ,qFAyDI,eAAoB,AACpB,eAAe,CACf,AA3DJ,sDAiEE,kBAAiB,AACjB,OAAM,AACN,UAAU,CAMV,AAzEF,2DAsEG,QAAO,AACP,SAAS,CACT,AAOH,4BACC,kBAAkB,AAClB,MAAK,AACL,SAAQ,AACR,OAAM,AACN,QAAO,AAEP,aAAc,CACd,AAED,uEACC,sBAAuB,CACvB,AAED,uBACC,wBAAyB,CAsKzB,AAvKD,oDAKE,sBAAqB,AACrB,4BA1oCkB,AA2oClB,0BAAyB,AACzB,gCAtpC2B,AAupC3B,YAAW,AACX,kBAAiB,AACjB,gBA5pCyB,AA6pCzB,WA5pCmB,AA6pCnB,gBAAgB,AAEhB,cAAe,CAmEf,AAlFF,0DAkBG,eAAc,AACd,wBAAoD,CACpD,AApBH,6FAwBI,kBAAiB,AACjB,kCAAkC,AAClC,mCAAmC,AACnC,6BArqCqB,AAsqCrB,eAAgB,CAChB,AA7BJ,+EAkCI,2BAA4B,CAC5B,AAnCJ,+EAwCI,2BAA4B,CAC5B,AAzCJ,+EA8CI,2BAA4B,CAC5B,AA/CJ,+EAoDI,2BAA4B,CAC5B,AArDJ,+EA0DI,4BAA6B,CAC7B,AA3DJ,4EA8DG,oBAAqB,CACrB,AA/DH,qEAmEG,qBAAqB,AACrB,QAAQ,AACR,SAAS,AACT,kBAAiB,AACjB,iCAAiC,AACjC,oCAAoC,AACpC,eAAe,AACf,8BAptCsB,AAqtCtB,qBAAqB,CACrB,AA5EH,yDA+EG,iBAAgB,AAChB,aA9tC0B,CA+tC1B,AAjFH,mDAqFE,qBAAoB,AACpB,sBAAqB,AAErB,WAAU,AACV,UAAS,AAET,gBAAe,AACf,iBAAgB,AAEhB,8BAA6B,AAE7B,2BApuCkB,AAquClB,4BAruCkB,CAsuClB,AAlGF,oDAsGE,2BAAmB,AAAnB,oBAAmB,AACnB,qBAAsB,AAAtB,uBAAsB,AACtB,sBAAkB,AAAlB,mBAAkB,AAClB,sBAAqB,AAErB,YAAW,AACX,WAAU,AAEV,iBAAgB,AAEhB,sBAnvCgB,AAovChB,kBAAiB,AACjB,0BAA4B,AAE5B,eAAe,CAkDf,AAtKF,0DAuHG,eAAc,AACd,yBAA4B,CAC5B,AAzHH,0FA4HG,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,sBAAuB,CAavB,AA/IH,gGAqII,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eAhxCc,CAixCd,AA9IJ,wFAkJG,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,eA3xCe,CAwyCf,AArKH,8FA2JI,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eAtyCc,CAuyCd","file":"tabulator_site.min.css","sourcesContent":["/* Tabulator v4.8.3 (c) Oliver Folkerd */\n\n\r\n//Main Theme Variables\r\n$backgroundColor: #fff !default; //background color of tabulator\r\n$borderColor:#222 !default; //border to tabulator\r\n$textSize:14px !default; //table text size\r\n\r\n//header themeing\r\n$headerBackgroundColor:#222 !default; //border to tabulator\r\n$headerTextColor:#fff !default; //header text colour\r\n$headerBorderColor:#aaa !default; //header border color\r\n$headerSeperatorColor:#3FB449 !default; //header bottom seperator color\r\n$headerMargin:4px !default; //padding round header\r\n\r\n//column header arrows\r\n$sortArrowActive: #3FB449 !default;\r\n$sortArrowInactive: #bbb !default;\r\n\r\n//row themeing\r\n$rowBackgroundColor:#fff !default; //table row background color\r\n$rowAltBackgroundColor:#EFEFEF !default; //table row background color\r\n$rowBorderColor:#aaa !default; //table border color\r\n$rowTextColor:#333 !default; //table text color\r\n$rowHoverBackground:#bbb !default; //row background color on hover\r\n\r\n$rowSelectedBackground: #9ABCEA !default; //row background color when selected\r\n$rowSelectedBackgroundHover: #769BCC !default;//row background color when selected and hovered\r\n\r\n$editBoxColor:#1D68CD !default; //border color for edit boxes\r\n$errorColor:#dd0000 !default; //error indication\r\n\r\n//footer themeing\r\n$footerBackgroundColor:#222 !default; //border to tabulator\r\n$footerTextColor:#222 !default; //footer text colour\r\n$footerBorderColor:#aaa !default; //footer border color\r\n$footerSeperatorColor:#3FB449 !default; //footer bottom seperator color\r\n$footerActiveColor:$footerSeperatorColor !default; //footer bottom active text color\r\n\r\n\r\n//Tabulator Containing Element\r\n.tabulator{\r\n\tposition: relative;\r\n\r\n\tborder-bottom: 5px solid $borderColor;\r\n\r\n\tbackground-color: $backgroundColor;\r\n\r\n\tfont-size:$textSize;\r\n\ttext-align: left;\r\n\toverflow:hidden;\r\n\r\n\t-webkit-transform: translatez(0);\r\n\t-moz-transform: translatez(0);\r\n\t-ms-transform: translatez(0);\r\n\t-o-transform: translatez(0);\r\n\ttransform: translatez(0);\r\n\r\n\t&[tabulator-layout=\"fitDataFill\"]{\r\n\t\t.tabulator-tableHolder{\r\n\t\t\t.tabulator-table{\r\n\t\t\t\tmin-width:100%;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t&[tabulator-layout=\"fitDataTable\"]{\r\n\t\tdisplay: inline-block;\r\n\t}\r\n\r\n\t&[tabulator-layout=\"fitColumns\"]{\r\n\t\t.tabulator-row{\r\n\t\t\t.tabulator-cell{\r\n\t\t\t\t&:last-of-type{\r\n\t\t\t\t\tborder-right: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t&.tabulator-block-select{\r\n\t\tuser-select: none;\r\n\t}\r\n\r\n\t//column header containing element\r\n\t.tabulator-header{\r\n\t\tposition:relative;\r\n\t\tbox-sizing: border-box;\r\n\r\n\t\twidth:100%;\r\n\r\n\t\tborder-bottom:3px solid $headerSeperatorColor;\r\n\t\tbackground-color: $headerBackgroundColor;\r\n\t\tcolor: $headerTextColor;\r\n\t\tfont-weight:bold;\r\n\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:hidden;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t&.tabulator-header-hidden{\r\n\t\t\tdisplay:none;\r\n\t\t}\r\n\r\n\t\t//individual column header element\r\n\t\t.tabulator-col{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tposition:relative;\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tborder-right:1px solid $headerBorderColor;\r\n\t\t\tbackground-color: $headerBackgroundColor;\r\n\t\t\ttext-align:left;\r\n\t\t\tvertical-align: bottom;\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&.tabulator-moving{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tborder:1px solid $headerSeperatorColor;\r\n\t\t\t\tbackground:darken($headerBackgroundColor, 10%);\r\n\t\t\t\tpointer-events: none;\r\n\t\t\t}\r\n\r\n\t\t\t//hold content of column header\r\n\t\t\t.tabulator-col-content{\r\n\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tpadding:8px;\r\n\r\n\t\t\t\t//header menu button\r\n\t\t\t\t.tabulator-header-menu-button{\r\n\t\t\t\t\tpadding: 0 8px;\r\n\r\n\t\t\t\t\t&:hover{\r\n\t\t\t\t\t\tcursor: pointer;\r\n\t\t\t\t\t\topacity: .6;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//hold title and sort arrow\r\n\t\t\t\t.tabulator-col-title-holder{\r\n\t\t\t\t\tposition: relative;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//hold title of column header\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\twhite-space: nowrap;\r\n\t\t\t\t\toverflow: hidden;\r\n\t\t\t\t\ttext-overflow: ellipsis;\r\n\t\t\t\t\tvertical-align:bottom;\r\n\r\n\t\t\t\t\t//element to hold title editor\r\n\t\t\t\t\t.tabulator-title-editor{\r\n\t\t\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\t\tborder:1px solid #999;\r\n\r\n\t\t\t\t\t\tpadding:1px;\r\n\r\n\t\t\t\t\t\tbackground: #fff;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t.tabulator-header-menu-button + .tabulator-title-editor{\r\n\t\t\t\t\t\twidth:calc(100% - 22px);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//column sorter arrow\r\n\t\t\t\t.tabulator-col-sorter{\r\n\t\t\t\t\tdisplay: flex;\r\n\t\t\t\t\talign-items: center;\r\n\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\ttop:0;\r\n\t\t\t\t\tbottom:0;\r\n\t\t\t\t\tright:4px;\r\n\r\n\t\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\t\twidth: 0;\r\n\t\t\t\t\t\theight: 0;\r\n\t\t\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//complex header column group\r\n\t\t\t&.tabulator-col-group{\r\n\r\n\t\t\t\t//gelement to hold sub columns in column group\r\n\t\t\t\t.tabulator-col-group-cols{\r\n\t\t\t\t\tposition:relative;\r\n\t\t\t\t\tdisplay: flex;\r\n\r\n\t\t\t\t\tborder-top:1px solid $headerBorderColor;\r\n\t\t\t\t\toverflow: hidden;\r\n\r\n\t\t\t\t\tmargin-right:-1px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//hide left resize handle on first column\r\n\t\t\t&:first-child{\r\n\t\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//header filter containing element\r\n\t\t\t.tabulator-header-filter{\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\tmargin-top:2px;\r\n\t\t\t\twidth:100%;\r\n\t\t\t\ttext-align: center;\r\n\r\n\t\t\t\t//styling adjustment for inbuilt editors\r\n\t\t\t\ttextarea{\r\n\t\t\t\t\theight:auto !important;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tsvg{\r\n\t\t\t\t\tmargin-top: 3px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tinput{\r\n\t\t\t\t\t&::-ms-clear {\r\n\t\t\t\t\t\twidth : 0;\r\n\t\t\t\t\t\theight: 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//styling child elements for sortable columns\r\n\t\t\t&.tabulator-sortable{\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tpadding-right:25px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground-color:darken($headerBackgroundColor, 10%);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"none\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-col-sorter{\r\n\t\t\t\t\t\tcolor: $sortArrowInactive;\r\n\r\n\t\t\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"asc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-col-sorter{\r\n\t\t\t\t\t\tcolor: $sortArrowActive;\r\n\r\n\t\t\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowActive;\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"desc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-col-sorter{\r\n\t\t\t\t\t\tcolor: $sortArrowActive;\r\n\r\n\t\t\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\t\t\tborder-bottom: none;\r\n\t\t\t\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\t\t\t\tcolor: $sortArrowActive;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-col-vertical{\r\n\t\t\t\t.tabulator-col-content{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\twriting-mode: vertical-rl;\r\n\t\t\t\t\t\ttext-orientation: mixed;\r\n\r\n\t\t\t\t\t\tdisplay:flex;\r\n\t\t\t\t\t\talign-items:center;\r\n\t\t\t\t\t\tjustify-content:center;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.tabulator-col-vertical-flip{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\ttransform: rotate(180deg);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.tabulator-sortable{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\t\tpadding-top:20px;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.tabulator-col-vertical-flip{\r\n\t\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\t\t\tpadding-bottom:20px;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t.tabulator-col-sorter{\r\n\t\t\t\t\t\tjustify-content: center;\r\n\t\t\t\t\t\tleft:0;\r\n\t\t\t\t\t\tright:0;\r\n\t\t\t\t\t\ttop:4px;\r\n\t\t\t\t\t\tbottom:auto;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\tposition: absolute;\r\n\r\n\t\t\t// background-color: inherit;\r\n\r\n\t\t\tz-index: 10;\r\n\r\n\t\t\t&.tabulator-frozen-left{\r\n\t\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-frozen-right{\r\n\t\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tmin-width:600%;\r\n\r\n\t\t\tbackground:lighten($headerBackgroundColor, 10%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:lighten($headerBackgroundColor, 10%) !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\t\t\t// border-bottom:1px solid $headerBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen-rows-holder{\r\n\t\t\tmin-width:600%;\r\n\r\n\t\t\t&:empty{\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//scrolling element to hold table\r\n\t.tabulator-tableHolder{\r\n\t\tposition:relative;\r\n\t\twidth:100%;\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:auto;\r\n\t\t-webkit-overflow-scrolling: touch;\r\n\r\n\t\t&:focus{\r\n\t\t\toutline: none;\r\n\t\t}\r\n\r\n\t\t//default placeholder element\r\n\t\t.tabulator-placeholder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tdisplay: flex;\r\n\t\t\talign-items:center;\r\n\r\n\t\t\t&[tabulator-render-mode=\"virtual\"]{\r\n\t\t\t\tmin-height:100%;\r\n\t\t\t\tmin-width:100%;\r\n\t\t\t}\r\n\r\n\t\t\twidth:100%;\r\n\r\n\t\t\tspan{\r\n\t\t\t\tdisplay: inline-block;\r\n\r\n\t\t\t\tmargin:0 auto;\r\n\t\t\t\tpadding:10px;\r\n\r\n\t\t\t\tcolor:$headerSeperatorColor;\r\n\t\t\t\tfont-weight: bold;\r\n\t\t\t\tfont-size: 20px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//element to hold table rows\r\n\t\t.tabulator-table{\r\n\t\t\tposition:relative;\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tbackground-color:$rowBackgroundColor;\r\n\t\t\twhite-space: nowrap;\r\n\t\t\toverflow:visible;\r\n\t\t\tcolor:$rowTextColor;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\t&.tabulator-calcs{\r\n\t\t\t\t\tfont-weight: bold;\r\n\t\t\t\t\tbackground:lighten($headerBackgroundColor, 15%) !important;\r\n\t\t\t\t\tcolor:$headerTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//footer element\r\n\t.tabulator-footer{\r\n\t\tpadding:5px 10px;\r\n\t\tpadding-top:8px;\r\n\t\tborder-top:3px solid $footerSeperatorColor;\r\n\t\tbackground-color: $footerBackgroundColor;\r\n\t\ttext-align:right;\r\n\t\tcolor: $footerTextColor;\r\n\t\tfont-weight:bold;\r\n\t\twhite-space:nowrap;\r\n\t\tuser-select:none;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\twidth:calc(100% + 20px);\r\n\t\t\tmargin:-8px -10px 8px -10px;\r\n\r\n\t\t\ttext-align: left;\r\n\r\n\t\t\tbackground:lighten($footerBackgroundColor, 10%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:lighten($footerBackgroundColor, 10%) !important;\r\n\t\t\t\tcolor:$headerTextColor !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// border-top:1px solid $rowBorderColor;\r\n\t\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&:only-child{\r\n\t\t\t\tmargin-bottom:-5px;\r\n\t\t\t\tborder-bottom:none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//pagination container element\r\n\t\t.tabulator-paginator{\r\n\t\t\tlabel{\r\n\t\t\t\tcolor:#fff;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//page size select element\r\n\t\t.tabulator-page-size{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 5px;\r\n\t\t\tpadding:2px 5px;\r\n\r\n\t\t\tborder:1px solid $footerBorderColor;\r\n\t\t\tborder-radius:3px;\r\n\t\t}\r\n\r\n\t\t//pagination container element\r\n\t\t.tabulator-pages{\r\n\t\t\tmargin:0 7px;\r\n\t\t}\r\n\r\n\t\t//pagination button\r\n\t\t.tabulator-page{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 2px;\r\n\t\t\tpadding:2px 5px;\r\n\r\n\t\t\tborder:1px solid $footerBorderColor;\r\n\t\t\tborder-radius:3px;\r\n\r\n\t\t\tbackground:#fff;\r\n\r\n\t\t\tcolor: $footerTextColor;\r\n\t\t\tfont-family:inherit;\r\n\t\t\tfont-weight:inherit;\r\n\t\t\tfont-size:inherit;\r\n\r\n\t\t\t&.active{\r\n\t\t\t\tcolor:$footerActiveColor;\r\n\t\t\t}\r\n\r\n\t\t\t&:disabled{\r\n\t\t\t\topacity:.5;\r\n\t\t\t}\r\n\r\n\t\t\t&:not(.disabled){\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground:rgba(0,0,0,.2);\r\n\t\t\t\t\tcolor:#fff;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//column resize handles\r\n\t.tabulator-col-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\ttop:0;\r\n\t\tbottom:0;\r\n\t\twidth:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\tleft:0;\r\n\t\t\tright:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ew-resize;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//holding div that contains loader and covers tabulator element to prevent interaction\r\n\t.tabulator-loader{\r\n\t\tposition:absolute;\r\n\t\tdisplay: flex;\r\n\t\talign-items:center;\r\n\r\n\t\ttop:0;\r\n\t\tleft:0;\r\n\t\tz-index:100;\r\n\r\n\t\theight:100%;\r\n\t\twidth:100%;\r\n\t\tbackground:rgba(0,0,0,.4);\r\n\t\ttext-align:center;\r\n\r\n\t\t//loading message element\r\n\t\t.tabulator-loader-msg{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 auto;\r\n\t\t\tpadding:10px 20px;\r\n\r\n\t\t\tborder-radius:10px;\r\n\r\n\t\t\tbackground:#fff;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:16px;\r\n\r\n\t\t\t//loading message\r\n\t\t\t&.tabulator-loading{\r\n\t\t\t\tborder:4px solid #333;\r\n\t\t\t\tcolor:#000;\r\n\t\t\t}\r\n\r\n\t\t\t//error message\r\n\t\t\t&.tabulator-error{\r\n\t\t\t\tborder:4px solid #D00;\r\n\t\t\t\tcolor:#590000;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n//row element\r\n.tabulator-row{\r\n\tposition: relative;\r\n\tbox-sizing: border-box;\r\n\tmin-height:$textSize + ($headerMargin * 2);\r\n\tbackground-color: $rowBackgroundColor;\r\n\r\n\r\n\t&.tabulator-row-even{\r\n\t\tbackground-color: $rowAltBackgroundColor;\r\n\t}\r\n\r\n\t&.tabulator-selectable:hover{\r\n\t\tbackground-color:$rowHoverBackground;\r\n\t\tcursor: pointer;\r\n\t}\r\n\r\n\t&.tabulator-selected{\r\n\t\tbackground-color:$rowSelectedBackground;\r\n\t}\r\n\r\n\t&.tabulator-selected:hover{\r\n\t\tbackground-color:$rowSelectedBackgroundHover;\r\n\t\tcursor: pointer;\r\n\t}\r\n\r\n\t&.tabulator-row-moving{\r\n\t\tborder:1px solid #000;\r\n\t\tbackground:#fff;\r\n\t}\r\n\r\n\t&.tabulator-moving{\r\n\t\tposition: absolute;\r\n\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\tpointer-events: none !important;\r\n\t\tz-index:15;\r\n\t}\r\n\r\n\t//row resize handles\r\n\t.tabulator-row-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\tbottom:0;\r\n\t\tleft:0;\r\n\t\theight:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\ttop:0;\r\n\t\t\tbottom:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ns-resize;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-frozen{\r\n\t\tdisplay: inline-block;\r\n\t\tposition: absolute;\r\n\r\n\t\tbackground-color: inherit;\r\n\r\n\t\tz-index: 10;\r\n\r\n\t\t&.tabulator-frozen-left{\r\n\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t}\r\n\r\n\t\t&.tabulator-frozen-right{\r\n\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-responsive-collapse{\r\n\t\tbox-sizing:border-box;\r\n\r\n\t\tpadding:5px;\r\n\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\t&:empty{\r\n\t\t\tdisplay:none;\r\n\t\t}\r\n\r\n\t\ttable{\r\n\t\t\tfont-size:$textSize;\r\n\r\n\t\t\ttr{\r\n\t\t\t\ttd{\r\n\t\t\t\t\tposition: relative;\r\n\r\n\t\t\t\t\t&:first-of-type{\r\n\t\t\t\t\t\tpadding-right:10px;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//cell element\r\n\t.tabulator-cell{\r\n\t\tdisplay:inline-block;\r\n\t\tposition: relative;\r\n\t\tbox-sizing:border-box;\r\n\t\tpadding:6px;\r\n\t\tborder-right:1px solid $rowBorderColor;\r\n\t\tvertical-align:middle;\r\n\t\twhite-space:nowrap;\r\n\t\toverflow:hidden;\r\n\t\ttext-overflow:ellipsis;\r\n\r\n\r\n\t\t&.tabulator-editing{\r\n\t\t\tborder:1px solid $editBoxColor;\r\n\t\t\tpadding: 0;\r\n\r\n\t\t\tinput, select{\r\n\t\t\t\tborder:1px;\r\n\t\t\t\tbackground:transparent;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-validation-fail{\r\n\t\t\tborder:1px solid $errorColor;\r\n\t\t\tinput, select{\r\n\t\t\t\tborder:1px;\r\n\t\t\t\tbackground:transparent;\r\n\r\n\t\t\t\tcolor: $errorColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//hide left resize handle on first column\r\n\t\t&:first-child{\r\n\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//movable row handle\r\n\t\t&.tabulator-row-handle{\r\n\r\n\t\t\tdisplay: inline-flex;\r\n\t\t\talign-items:center;\r\n\r\n\t\t\t-moz-user-select: none;\r\n\t\t\t-khtml-user-select: none;\r\n\t\t\t-webkit-user-select: none;\r\n\t\t\t-o-user-select: none;\r\n\r\n\t\t\t//handle holder\r\n\t\t\t.tabulator-row-handle-box{\r\n\t\t\t\twidth:80%;\r\n\r\n\t\t\t\t//Hamburger element\r\n\t\t\t\t.tabulator-row-handle-bar{\r\n\t\t\t\t\twidth:100%;\r\n\t\t\t\t\theight:3px;\r\n\t\t\t\t\tmargin-top:2px;\r\n\t\t\t\t\tbackground:$sortArrowActive;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-branch{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tvertical-align:middle;\r\n\r\n\t\t\theight:9px;\r\n\t\t\twidth:7px;\r\n\r\n\t\t\tmargin-top:-9px;\r\n\t\t\tmargin-right:5px;\r\n\r\n\t\t\tborder-bottom-left-radius:1px;\r\n\r\n\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-control{\r\n\r\n\t\t\tdisplay:inline-flex;\r\n\t\t\tjustify-content:center;\r\n\t\t\talign-items:center;\r\n\t\t\tvertical-align:middle;\r\n\r\n\t\t\theight:11px;\r\n\t\t\twidth:11px;\r\n\r\n\t\t\tmargin-right:5px;\r\n\r\n\t\t\tborder:1px solid $rowTextColor;\r\n\t\t\tborder-radius:2px;\r\n\t\t\tbackground:rgba(0, 0, 0, .1);\r\n\r\n\t\t\toverflow:hidden;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\tcursor:pointer;\r\n\t\t\t\tbackground:rgba(0, 0, 0, .2);\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control-collapse{\r\n\t\t\t\tdisplay:inline-block;\r\n\t\t\t\tposition: relative;\r\n\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 1px;\r\n\r\n\t\t\t\tbackground: transparent;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tcontent: \"\";\r\n\t\t\t\t\tleft: -3px;\r\n\t\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\t\theight: 1px;\r\n\t\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control-expand{\r\n\t\t\t\tdisplay:inline-block;\r\n\t\t\t\tposition: relative;\r\n\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 1px;\r\n\r\n\t\t\t\tbackground: $rowTextColor;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tcontent: \"\";\r\n\t\t\t\t\tleft: -3px;\r\n\t\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\t\theight: 1px;\r\n\t\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t.tabulator-responsive-collapse-toggle{\r\n\t\t\tdisplay: inline-flex;\r\n\t\t\talign-items:center;\r\n\t\t\tjustify-content:center;\r\n\r\n\t\t\t-moz-user-select: none;\r\n\t\t\t-khtml-user-select: none;\r\n\t\t\t-webkit-user-select: none;\r\n\t\t\t-o-user-select: none;\r\n\r\n\t\t\theight:15px;\r\n\t\t\twidth:15px;\r\n\r\n\t\t\tborder-radius:20px;\r\n\t\t\tbackground:#666;\r\n\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:1.1em;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\topacity:.7;\r\n\t\t\t}\r\n\r\n\t\t\t&.open{\r\n\t\t\t\t.tabulator-responsive-collapse-toggle-close{\r\n\t\t\t\t\tdisplay:initial;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.tabulator-responsive-collapse-toggle-open{\r\n\t\t\t\t\tdisplay:none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-responsive-collapse-toggle-close{\r\n\t\t\t\tdisplay:none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-traffic-light{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\theight:14px;\r\n\t\t\twidth:14px;\r\n\r\n\t\t\tborder-radius:14px;\r\n\t\t}\r\n\t}\r\n\r\n\t//row grouping element\r\n\t&.tabulator-group{\r\n\t\tbox-sizing:border-box;\r\n\t\tborder-right:1px solid $rowBorderColor;\r\n\t\tborder-top:1px solid #000;\r\n\t\tborder-bottom:2px solid $headerSeperatorColor;\r\n\t\tpadding:5px;\r\n\t\tpadding-left:10px;\r\n\t\tbackground:$headerBackgroundColor;\r\n\t\tcolor:$headerTextColor;\r\n\t\tfont-weight:bold;\r\n\r\n\t\tmin-width: 100%;\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\t\t\tbackground-color:darken($headerBackgroundColor, 10%);\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-visible{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-right:10px;\r\n\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\tborder-bottom: 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-1{\r\n\t\t\tpadding-left:30px;\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-2{\r\n\t\t\tpadding-left:50px;\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-3{\r\n\t\t\tpadding-left:70px;\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-4{\r\n\t\t\tpadding-left:90px;\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-5{\r\n\t\t\tpadding-left:110px;\r\n\t\t}\r\n\r\n\t\t.tabulator-group-toggle{\r\n\t\t\tdisplay: inline-block;\r\n\t\t}\r\n\r\n\t\t//sorting arrow\r\n\t\t.tabulator-arrow{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\twidth: 0;\r\n\t\t\theight: 0;\r\n\t\t\tmargin-right:16px;\r\n\t\t\tborder-top: 6px solid transparent;\r\n\t\t\tborder-bottom: 6px solid transparent;\r\n\t\t\tborder-right: 0;\r\n\t\t\tborder-left: 6px solid $sortArrowActive;\r\n\t\t\tvertical-align:middle;\r\n\t\t}\r\n\r\n\t\tspan{\r\n\t\t\tmargin-left:10px;\r\n\t\t\tcolor:$headerSeperatorColor;\r\n\t\t}\r\n\t}\r\n\r\n}\r\n\r\n.tabulator-menu{\r\n\tposition: absolute;\r\n\tdisplay:inline-block;\r\n\tbox-sizing:border-box;\r\n\r\n\tbackground:$rowBackgroundColor;\r\n\tborder:1px solid $rowBorderColor;\r\n\tbox-shadow: 0 0 5px 0 rgba(0, 0, 0, .2);\r\n\r\n\tfont-size:$textSize;\r\n\r\n\toverflow-y:auto;\r\n\t-webkit-overflow-scrolling: touch;\r\n\r\n\tz-index: 10000;\r\n\r\n\t.tabulator-menu-item{\r\n\r\n\t\tpadding:5px 10px;\r\n\r\n\t\tuser-select: none;\r\n\r\n\t\t&.tabulator-menu-item-disabled{\r\n\t\t\topacity: .5;\r\n\t\t}\r\n\r\n\t\t&:not(.tabulator-menu-item-disabled):hover{\r\n\t\t\tcursor: pointer;\r\n\t\t\tbackground: $rowAltBackgroundColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-menu-separator{\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t}\r\n}\r\n\r\n.tabulator-edit-select-list{\r\n\tposition: absolute;\r\n\tdisplay:inline-block;\r\n\tbox-sizing:border-box;\r\n\r\n\tmax-height:200px;\r\n\r\n\tbackground:$rowBackgroundColor;\r\n\tborder:1px solid $rowBorderColor;\r\n\r\n\tfont-size:$textSize;\r\n\r\n\toverflow-y:auto;\r\n\t-webkit-overflow-scrolling: touch;\r\n\r\n\tz-index: 10000;\r\n\r\n\t.tabulator-edit-select-list-item{\r\n\t\tpadding:4px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\r\n\t\t&.active{\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tbackground:$editBoxColor;\r\n\r\n\t\t\t&.focused{\r\n\t\t\t\toutline:1px solid rgba($rowBackgroundColor, .5);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.focused{\r\n\t\t\toutline:1px solid $editBoxColor;\r\n\t\t}\r\n\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tbackground:$editBoxColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-edit-select-list-notice{\r\n\t\tpadding:4px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\t\ttext-align: center;\r\n\t}\r\n\r\n\t.tabulator-edit-select-list-group{\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\tpadding:4px;\r\n\t\tpadding-top:6px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\t\tfont-weight:bold;\r\n\t}\r\n}\r\n\r\n\r\n//RTL Styling\r\n\r\n.tabulator.tabulator-ltr{\r\n\tdirection: ltr;\r\n}\r\n\r\n\r\n.tabulator.tabulator-rtl{\r\n\ttext-align: initial;\r\n\tdirection: rtl;\r\n\r\n\t.tabulator-header {\r\n\t\t.tabulator-col{\r\n\t\t\ttext-align: initial;\r\n\t\t\tborder-left:1px solid $headerBorderColor;\r\n\t\t\tborder-right:initial;\r\n\r\n\t\t\t&.tabulator-col-group{\r\n\t\t\t\t.tabulator-col-group-cols{\r\n\t\t\t\t\tmargin-right:initial;\r\n\t\t\t\t\tmargin-left:-1px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-sortable{\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\tpadding-left:25px;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-col-content{\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tleft:8px;\r\n\t\t\t\t\tright:initial;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-row{\r\n\t\t.tabulator-cell{\r\n\t\t\tborder-right:initial;\r\n\t\t\tborder-left:1px solid $rowBorderColor;\r\n\r\n\t\t\t//hide left resize handle on first column\r\n\t\t\t// &:first-child{\r\n\t\t\t// \t.tabulator-col-resize-handle.prev{\r\n\t\t\t// \t\tdisplay: none;\r\n\t\t\t// \t}\r\n\t\t\t// }\r\n\r\n\t\t\t.tabulator-data-tree-branch{\r\n\t\t\t\tmargin-right:initial;\r\n\t\t\t\tmargin-left:5px;\r\n\r\n\t\t\t\tborder-bottom-left-radius:initial;\r\n\t\t\t\tborder-bottom-right-radius:1px;\r\n\r\n\t\t\t\tborder-left:initial;\r\n\t\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control{\r\n\t\t\t\tmargin-right:initial;\r\n\t\t\t\tmargin-left:5px;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//column resize handles\r\n\t.tabulator-col-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tleft:0;\r\n\t\tright:auto;\r\n\r\n\t\t&.prev{\r\n\t\t\tright:0;\r\n\t\t\tleft:auto;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n\r\n// Table print styling\r\n\r\n.tabulator-print-fullscreen{\r\n\tposition: absolute;\r\n\ttop:0;\r\n\tbottom:0;\r\n\tleft:0;\r\n\tright:0;\r\n\r\n\tz-index: 10000;\r\n}\r\n\r\nbody.tabulator-print-fullscreen-hide>*:not(.tabulator-print-fullscreen){\r\n\tdisplay:none !important;\r\n}\r\n\r\n.tabulator-print-table{\r\n\tborder-collapse: collapse;\r\n\r\n\t//row grouping element\r\n\t.tabulator-print-table-group{\r\n\t\tbox-sizing:border-box;\r\n\t\tborder-right:1px solid $rowBorderColor;\r\n\t\tborder-top:1px solid #000;\r\n\t\tborder-bottom:2px solid $headerSeperatorColor;\r\n\t\tpadding:5px;\r\n\t\tpadding-left:10px;\r\n\t\tbackground:$headerBackgroundColor;\r\n\t\tcolor:$headerTextColor;\r\n\t\tfont-weight:bold;\r\n\r\n\t\tmin-width: 100%;\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\t\t\tbackground-color:darken($headerBackgroundColor, 10%);\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-visible{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-right:10px;\r\n\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\tborder-bottom: 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-1{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:30px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-2{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:50px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-3{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:70px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-4{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:90px !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-5{\r\n\t\t\ttd{\r\n\t\t\t\tpadding-left:110px !important;\r\n\t\t\t}\r\n\t\t}\r\n\t\t.tabulator-group-toggle{\r\n\t\t\tdisplay: inline-block;\r\n\t\t}\r\n\r\n\t\t//sorting arrow\r\n\t\t.tabulator-arrow{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\twidth: 0;\r\n\t\t\theight: 0;\r\n\t\t\tmargin-right:16px;\r\n\t\t\tborder-top: 6px solid transparent;\r\n\t\t\tborder-bottom: 6px solid transparent;\r\n\t\t\tborder-right: 0;\r\n\t\t\tborder-left: 6px solid $sortArrowActive;\r\n\t\t\tvertical-align:middle;\r\n\t\t}\r\n\r\n\t\tspan{\r\n\t\t\tmargin-left:10px;\r\n\t\t\tcolor:$headerSeperatorColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-data-tree-branch{\r\n\t\tdisplay:inline-block;\r\n\t\tvertical-align:middle;\r\n\r\n\t\theight:9px;\r\n\t\twidth:7px;\r\n\r\n\t\tmargin-top:-9px;\r\n\t\tmargin-right:5px;\r\n\r\n\t\tborder-bottom-left-radius:1px;\r\n\r\n\t\tborder-left:2px solid $rowBorderColor;\r\n\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t}\r\n\r\n\t.tabulator-data-tree-control{\r\n\r\n\t\tdisplay:inline-flex;\r\n\t\tjustify-content:center;\r\n\t\talign-items:center;\r\n\t\tvertical-align:middle;\r\n\r\n\t\theight:11px;\r\n\t\twidth:11px;\r\n\r\n\t\tmargin-right:5px;\r\n\r\n\t\tborder:1px solid $rowTextColor;\r\n\t\tborder-radius:2px;\r\n\t\tbackground:rgba(0, 0, 0, .1);\r\n\r\n\t\toverflow:hidden;\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\t\t\tbackground:rgba(0, 0, 0, .2);\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-control-collapse{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition: relative;\r\n\r\n\t\t\theight: 7px;\r\n\t\t\twidth: 1px;\r\n\r\n\t\t\tbackground: transparent;\r\n\r\n\t\t\t&:after {\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tcontent: \"\";\r\n\t\t\t\tleft: -3px;\r\n\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\theight: 1px;\r\n\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-control-expand{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition: relative;\r\n\r\n\t\t\theight: 7px;\r\n\t\t\twidth: 1px;\r\n\r\n\t\t\tbackground: $rowTextColor;\r\n\r\n\t\t\t&:after {\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tcontent: \"\";\r\n\t\t\t\tleft: -3px;\r\n\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\theight: 1px;\r\n\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n"]} \ No newline at end of file diff --git a/website/js/vendor/tabulator/js/modules/accessor.min.js b/website/js/vendor/tabulator/js/modules/accessor.min.js deleted file mode 100644 index 901db09..0000000 --- a/website/js/vendor/tabulator/js/modules/accessor.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Accessor=function(o){this.table=o,this.allowedTypes=["","data","download","clipboard","print","htmlOutput"]};Accessor.prototype.initializeColumn=function(o){var e=this,s=!1,t={};this.allowedTypes.forEach(function(r){var c,a="accessor"+(r.charAt(0).toUpperCase()+r.slice(1));o.definition[a]&&(c=e.lookupAccessor(o.definition[a]))&&(s=!0,t[a]={accessor:c,params:o.definition[a+"Params"]||{}})}),s&&(o.modules.accessor=t)},Accessor.prototype.lookupAccessor=function(o){var e=!1;switch(void 0===o?"undefined":_typeof(o)){case"string":this.accessors[o]?e=this.accessors[o]:console.warn("Accessor Error - No such accessor found, ignoring: ",o);break;case"function":e=o}return e},Accessor.prototype.transformRow=function(o,e){var s="accessor"+(e.charAt(0).toUpperCase()+e.slice(1)),t=o.getComponent(),r=Tabulator.prototype.helpers.deepClone(o.data||{});return this.table.columnManager.traverse(function(o){var c,a,n,i;o.modules.accessor&&(a=o.modules.accessor[s]||o.modules.accessor.accessor||!1)&&"undefined"!=(c=o.getFieldValue(r))&&(i=o.getComponent(),n="function"==typeof a.params?a.params(c,r,e,i,t):a.params,o.setFieldValue(r,a.accessor(c,r,e,n,i,t)))}),r},Accessor.prototype.accessors={},Tabulator.prototype.registerModule("accessor",Accessor); \ No newline at end of file diff --git a/website/js/vendor/tabulator/js/modules/calculation_colums.min.js b/website/js/vendor/tabulator/js/modules/calculation_colums.min.js deleted file mode 100644 index 9b6f56b..0000000 --- a/website/js/vendor/tabulator/js/modules/calculation_colums.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},CalcComponent=function(t){this._row=t};CalcComponent.prototype.getData=function(t){return this._row.getData(t)},CalcComponent.prototype.getElement=function(){return this._row.getElement()},CalcComponent.prototype.getTable=function(){return this._row.table},CalcComponent.prototype.getCells=function(){var t=[];return this._row.getCells().forEach(function(o){t.push(o.getComponent())}),t},CalcComponent.prototype.getCell=function(t){var o=this._row.getCell(t);return!!o&&o.getComponent()},CalcComponent.prototype._getSelf=function(){return this._row};var ColumnCalcs=function(t){this.table=t,this.topCalcs=[],this.botCalcs=[],this.genColumn=!1,this.topElement=this.createElement(),this.botElement=this.createElement(),this.topRow=!1,this.botRow=!1,this.topInitialized=!1,this.botInitialized=!1,this.initialize()};ColumnCalcs.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-calcs-holder"),t},ColumnCalcs.prototype.initialize=function(){this.genColumn=new Column({field:"value"},this)},ColumnCalcs.prototype.registerColumnField=function(){},ColumnCalcs.prototype.initializeColumn=function(t){var o=t.definition,e={topCalcParams:o.topCalcParams||{},botCalcParams:o.bottomCalcParams||{}};if(o.topCalc){switch(_typeof(o.topCalc)){case"string":this.calculations[o.topCalc]?e.topCalc=this.calculations[o.topCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",o.topCalc);break;case"function":e.topCalc=o.topCalc}e.topCalc&&(t.modules.columnCalcs=e,this.topCalcs.push(t),"group"!=this.table.options.columnCalcs&&this.initializeTopRow())}if(o.bottomCalc){switch(_typeof(o.bottomCalc)){case"string":this.calculations[o.bottomCalc]?e.botCalc=this.calculations[o.bottomCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",o.bottomCalc);break;case"function":e.botCalc=o.bottomCalc}e.botCalc&&(t.modules.columnCalcs=e,this.botCalcs.push(t),"group"!=this.table.options.columnCalcs&&this.initializeBottomRow())}},ColumnCalcs.prototype.removeCalcs=function(){var t=!1;this.topInitialized&&(this.topInitialized=!1,this.topElement.parentNode.removeChild(this.topElement),t=!0),this.botInitialized&&(this.botInitialized=!1,this.table.footerManager.remove(this.botElement),t=!0),t&&this.table.rowManager.adjustTableSize()},ColumnCalcs.prototype.initializeTopRow=function(){this.topInitialized||(this.table.columnManager.getElement().insertBefore(this.topElement,this.table.columnManager.headersElement.nextSibling),this.topInitialized=!0)},ColumnCalcs.prototype.initializeBottomRow=function(){this.botInitialized||(this.table.footerManager.prepend(this.botElement),this.botInitialized=!0)},ColumnCalcs.prototype.scrollHorizontal=function(t){this.table.columnManager.getElement().scrollWidth,this.table.element.clientWidth;this.botInitialized&&this.botRow&&(this.botRow.getElement().style.marginLeft=-t+"px")},ColumnCalcs.prototype.recalc=function(t){var o;if(this.topInitialized||this.botInitialized){if(this.rowsToData(t),this.topInitialized){for(this.topRow&&this.topRow.deleteCells(),o=this.generateRow("top",this.rowsToData(t)),this.topRow=o;this.topElement.firstChild;)this.topElement.removeChild(this.topElement.firstChild);this.topElement.appendChild(o.getElement()),o.initialize(!0)}if(this.botInitialized){for(this.botRow&&this.botRow.deleteCells(),o=this.generateRow("bottom",this.rowsToData(t)),this.botRow=o;this.botElement.firstChild;)this.botElement.removeChild(this.botElement.firstChild);this.botElement.appendChild(o.getElement()),o.initialize(!0)}this.table.rowManager.adjustTableSize(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()}},ColumnCalcs.prototype.recalcRowGroup=function(t){this.recalcGroup(this.table.modules.groupRows.getRowGroup(t))},ColumnCalcs.prototype.recalcAll=function(){var t=this;if((this.topCalcs.length||this.botCalcs.length)&&("group"!==this.table.options.columnCalcs&&this.recalc(this.table.rowManager.activeRows),this.table.options.groupBy&&"table"!==this.table.options.columnCalcs)){table.modules.groupRows.getChildGroups().forEach(function(o){t.recalcGroup(o)})}},ColumnCalcs.prototype.recalcGroup=function(t){var o,e;t&&t.calcs&&(t.calcs.bottom&&(o=this.rowsToData(t.rows),e=this.generateRowData("bottom",o),t.calcs.bottom.updateData(e),t.calcs.bottom.reinitialize()),t.calcs.top&&(o=this.rowsToData(t.rows),e=this.generateRowData("top",o),t.calcs.top.updateData(e),t.calcs.top.reinitialize()))},ColumnCalcs.prototype.generateTopRow=function(t){return this.generateRow("top",this.rowsToData(t))},ColumnCalcs.prototype.generateBottomRow=function(t){return this.generateRow("bottom",this.rowsToData(t))},ColumnCalcs.prototype.rowsToData=function(t){var o=this,e=[];return t.forEach(function(t){if(e.push(t.getData()),o.table.options.dataTree&&o.table.options.dataTreeChildColumnCalcs&&t.modules.dataTree.open){var n=o.rowsToData(o.table.modules.dataTree.getFilteredTreeChildren(t));e=e.concat(n)}}),e},ColumnCalcs.prototype.generateRow=function(t,o){var e,n=this,l=this.generateRowData(t,o);return n.table.modExists("mutator")&&n.table.modules.mutator.disable(),e=new Row(l,this,"calc"),n.table.modExists("mutator")&&n.table.modules.mutator.enable(),e.getElement().classList.add("tabulator-calcs","tabulator-calcs-"+t),e.component=!1,e.getComponent=function(){return this.component||(this.component=new CalcComponent(this)),this.component},e.generateCells=function(){var o=[];n.table.columnManager.columnsByIndex.forEach(function(l){n.genColumn.setField(l.getField()),n.genColumn.hozAlign=l.hozAlign,l.definition[t+"CalcFormatter"]&&n.table.modExists("format")?n.genColumn.modules.format={formatter:n.table.modules.format.getFormatter(l.definition[t+"CalcFormatter"]),params:l.definition[t+"CalcFormatterParams"]||{}}:n.genColumn.modules.format={formatter:n.table.modules.format.getFormatter("plaintext"),params:{}},n.genColumn.definition.cssClass=l.definition.cssClass;var i=new Cell(n.genColumn,e);i.getElement(),i.column=l,i.setWidth(),l.cells.push(i),o.push(i),l.visible||i.hide()}),this.cells=o},e},ColumnCalcs.prototype.generateRowData=function(t,o){var e,n,l={},i="top"==t?this.topCalcs:this.botCalcs,a="top"==t?"topCalc":"botCalc";return i.forEach(function(t){var i=[];t.modules.columnCalcs&&t.modules.columnCalcs[a]&&(o.forEach(function(o){i.push(t.getFieldValue(o))}),n=a+"Params",e="function"==typeof t.modules.columnCalcs[n]?t.modules.columnCalcs[n](i,o):t.modules.columnCalcs[n],t.setFieldValue(l,t.modules.columnCalcs[a](i,o,e)))}),l},ColumnCalcs.prototype.hasTopCalcs=function(){return!!this.topCalcs.length},ColumnCalcs.prototype.hasBottomCalcs=function(){return!!this.botCalcs.length},ColumnCalcs.prototype.redraw=function(){this.topRow&&this.topRow.normalizeHeight(!0),this.botRow&&this.botRow.normalizeHeight(!0)},ColumnCalcs.prototype.getResults=function(){var t,o=this,e={};return this.table.options.groupBy&&this.table.modExists("groupRows")?(t=this.table.modules.groupRows.getGroups(!0),t.forEach(function(t){e[t.getKey()]=o.getGroupResults(t)})):e={top:this.topRow?this.topRow.getData():{},bottom:this.botRow?this.botRow.getData():{}},e},ColumnCalcs.prototype.getGroupResults=function(t){var o=this,e=t._getSelf(),n=t.getSubGroups(),l={};return n.forEach(function(t){l[t.getKey()]=o.getGroupResults(t)}),{top:e.calcs.top?e.calcs.top.getData():{},bottom:e.calcs.bottom?e.calcs.bottom.getData():{},groups:l}},ColumnCalcs.prototype.calculations={avg:function(t,o,e){var n=0,l=void 0!==e.precision?e.precision:2;return t.length&&(n=t.reduce(function(t,o){return Number(t)+Number(o)}),n/=t.length,n=!1!==l?n.toFixed(l):n),parseFloat(n).toString()},max:function(t,o,e){var n=null,l=void 0!==e.precision&&e.precision;return t.forEach(function(t){((t=Number(t))>n||null===n)&&(n=t)}),null!==n?!1!==l?n.toFixed(l):n:""},min:function(t,o,e){var n=null,l=void 0!==e.precision&&e.precision;return t.forEach(function(t){((t=Number(t))"),a.dataTreeExpandElement?"string"==typeof a.dataTreeExpandElement?(e=document.createElement("div"),e.innerHTML=a.dataTreeExpandElement,this.expandEl=e.firstChild):this.expandEl=a.dataTreeExpandElement:(this.expandEl=document.createElement("div"),this.expandEl.classList.add("tabulator-data-tree-control"),this.expandEl.tabIndex=0,this.expandEl.innerHTML="
"),_typeof(a.dataTreeStartExpanded)){case"boolean":this.startOpen=function(e,t){return a.dataTreeStartExpanded};break;case"function":this.startOpen=a.dataTreeStartExpanded;break;default:this.startOpen=function(e,t){return a.dataTreeStartExpanded[t]}}},DataTree.prototype.initializeRow=function(e){var t=e.getData()[this.field],a=Array.isArray(t),n=a||!a&&"object"===(void 0===t?"undefined":_typeof(t))&&null!==t;!n&&e.modules.dataTree&&e.modules.dataTree.branchEl&&e.modules.dataTree.branchEl.parentNode.removeChild(e.modules.dataTree.branchEl),!n&&e.modules.dataTree&&e.modules.dataTree.controlEl&&e.modules.dataTree.controlEl.parentNode.removeChild(e.modules.dataTree.controlEl),e.modules.dataTree={index:e.modules.dataTree?e.modules.dataTree.index:0,open:!!n&&(e.modules.dataTree?e.modules.dataTree.open:this.startOpen(e.getComponent(),0)),controlEl:!(!e.modules.dataTree||!n)&&e.modules.dataTree.controlEl,branchEl:!(!e.modules.dataTree||!n)&&e.modules.dataTree.branchEl,parent:!!e.modules.dataTree&&e.modules.dataTree.parent,children:n}},DataTree.prototype.layoutRow=function(e){var t=this.elementField?e.getCell(this.elementField):e.getCells()[0],a=t.getElement(),n=e.modules.dataTree;n.branchEl&&(n.branchEl.parentNode&&n.branchEl.parentNode.removeChild(n.branchEl),n.branchEl=!1),n.controlEl&&(n.controlEl.parentNode&&n.controlEl.parentNode.removeChild(n.controlEl),n.controlEl=!1),this.generateControlElement(e,a),e.element.classList.add("tabulator-tree-level-"+n.index),n.index&&(this.branchEl?(n.branchEl=this.branchEl.cloneNode(!0),a.insertBefore(n.branchEl,a.firstChild),this.table.rtl?n.branchEl.style.marginRight=(n.branchEl.offsetWidth+n.branchEl.style.marginLeft)*(n.index-1)+n.index*this.indent+"px":n.branchEl.style.marginLeft=(n.branchEl.offsetWidth+n.branchEl.style.marginRight)*(n.index-1)+n.index*this.indent+"px"):this.table.rtl?a.style.paddingRight=parseInt(window.getComputedStyle(a,null).getPropertyValue("padding-right"))+n.index*this.indent+"px":a.style.paddingLeft=parseInt(window.getComputedStyle(a,null).getPropertyValue("padding-left"))+n.index*this.indent+"px")},DataTree.prototype.generateControlElement=function(e,t){var a=this,n=e.modules.dataTree,t=t||e.getCells()[0].getElement(),r=n.controlEl;!1!==n.children&&(n.open?(n.controlEl=this.collapseEl.cloneNode(!0),n.controlEl.addEventListener("click",function(t){t.stopPropagation(),a.collapseRow(e)})):(n.controlEl=this.expandEl.cloneNode(!0),n.controlEl.addEventListener("click",function(t){t.stopPropagation(),a.expandRow(e)})),n.controlEl.addEventListener("mousedown",function(e){e.stopPropagation()}),r&&r.parentNode===t?r.parentNode.replaceChild(n.controlEl,r):t.insertBefore(n.controlEl,t.firstChild))},DataTree.prototype.setDisplayIndex=function(e){this.displayIndex=e},DataTree.prototype.getDisplayIndex=function(){return this.displayIndex},DataTree.prototype.getRows=function(e){var t=this,a=[];return e.forEach(function(e,n){var r,l;a.push(e),e instanceof Row&&(r=e.modules.dataTree.children,r.index||!1===r.children||(l=t.getChildren(e),l.forEach(function(e){a.push(e)})))}),a},DataTree.prototype.getChildren=function(e){var t=this,a=e.modules.dataTree,n=[],r=[];return!1!==a.children&&a.open&&(Array.isArray(a.children)||(a.children=this.generateChildren(e)),n=this.table.modExists("filter")&&this.table.options.dataTreeFilter?this.table.modules.filter.filter(a.children):a.children,this.table.modExists("sort")&&this.table.options.dataTreeSort&&this.table.modules.sort.sort(n),n.forEach(function(e){r.push(e),t.getChildren(e).forEach(function(e){r.push(e)})})),r},DataTree.prototype.generateChildren=function(e){var t=this,a=[],n=e.getData()[this.field];return Array.isArray(n)||(n=[n]),n.forEach(function(n){var r=new Row(n||{},t.table.rowManager);r.modules.dataTree.index=e.modules.dataTree.index+1,r.modules.dataTree.parent=e,r.modules.dataTree.children&&(r.modules.dataTree.open=t.startOpen(r.getComponent(),r.modules.dataTree.index)),a.push(r)}),a},DataTree.prototype.expandRow=function(e,t){var a=e.modules.dataTree;!1!==a.children&&(a.open=!0,e.reinitialize(),this.table.rowManager.refreshActiveData("tree",!1,!0),this.table.options.dataTreeRowExpanded(e.getComponent(),e.modules.dataTree.index))},DataTree.prototype.collapseRow=function(e){var t=e.modules.dataTree;!1!==t.children&&(t.open=!1,e.reinitialize(),this.table.rowManager.refreshActiveData("tree",!1,!0),this.table.options.dataTreeRowCollapsed(e.getComponent(),e.modules.dataTree.index))},DataTree.prototype.toggleRow=function(e){var t=e.modules.dataTree;!1!==t.children&&(t.open?this.collapseRow(e):this.expandRow(e))},DataTree.prototype.getTreeParent=function(e){return!!e.modules.dataTree.parent&&e.modules.dataTree.parent.getComponent()},DataTree.prototype.getFilteredTreeChildren=function(e){var t,a=e.modules.dataTree,n=[];return a.children&&(Array.isArray(a.children)||(a.children=this.generateChildren(e)),t=this.table.modExists("filter")&&this.table.options.dataTreeFilter?this.table.modules.filter.filter(a.children):a.children,t.forEach(function(e){e instanceof Row&&n.push(e)})),n},DataTree.prototype.rowDelete=function(e){var t,a=e.modules.dataTree.parent;a&&(t=this.findChildIndex(e,a),!1!==t&&a.data[this.field].splice(t,1),a.data[this.field].length||delete a.data[this.field],this.initializeRow(a),this.layoutRow(a)),this.table.rowManager.refreshActiveData("tree",!1,!0)},DataTree.prototype.addTreeChildRow=function(e,t,a,n){var r=!1;"string"==typeof t&&(t=JSON.parse(t)),Array.isArray(e.data[this.field])||(e.data[this.field]=[],e.modules.dataTree.open=this.startOpen(e.getComponent(),e.modules.dataTree.index)),void 0!==n&&!1!==(r=this.findChildIndex(n,e))&&e.data[this.field].splice(a?r:r+1,0,t),!1===r&&(a?e.data[this.field].unshift(t):e.data[this.field].push(t)),this.initializeRow(e),this.layoutRow(e),this.table.rowManager.refreshActiveData("tree",!1,!0)},DataTree.prototype.findChildIndex=function(e,t){var a=this,n=!1;return"object"==(void 0===e?"undefined":_typeof(e))?e instanceof Row?n=e.data:e instanceof RowComponent?n=e._getSelf().data:"undefined"!=typeof HTMLElement&&e instanceof HTMLElement&&t.modules.dataTree&&(n=t.modules.dataTree.children.find(function(t){return t instanceof Row&&t.element===e}))&&(n=n.data):n=void 0!==e&&null!==e&&t.data[this.field].find(function(t){return t.data[a.table.options.index]==e}),n&&(Array.isArray(t.data[this.field])&&(n=t.data[this.field].indexOf(n)),-1==n&&(n=!1)),n},DataTree.prototype.getTreeChildren=function(e,t,a){var n=this,r=e.modules.dataTree,l=[];return r.children&&(Array.isArray(r.children)||(r.children=this.generateChildren(e)),r.children.forEach(function(e){e instanceof Row&&(l.push(t?e.getComponent():e),a&&(l=l.concat(n.getTreeChildren(e,t,a))))})),l},DataTree.prototype.checkForRestyle=function(e){e.row.cells.indexOf(e)||e.row.reinitialize()},DataTree.prototype.getChildField=function(){return this.field},DataTree.prototype.redrawNeeded=function(e){return!!this.field&&void 0!==e[this.field]||!!this.elementField&&void 0!==e[this.elementField]},Tabulator.prototype.registerModule("dataTree",DataTree); \ No newline at end of file diff --git a/website/js/vendor/tabulator/js/modules/download.min.js b/website/js/vendor/tabulator/js/modules/download.min.js deleted file mode 100644 index 45bceb3..0000000 --- a/website/js/vendor/tabulator/js/modules/download.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Download=function(e){this.table=e};Download.prototype.download=function(e,o,t,n,a){function r(t,n){a?!0===a?i.triggerDownload(t,n,e,o,!0):a(t):i.triggerDownload(t,n,e,o)}var i=this,l=!1;if("function"==typeof e?l=e:i.downloaders[e]?l=i.downloaders[e]:console.warn("Download Error - No such download type found: ",e),l){var s=this.generateExportList(n);l.call(this.table,s,t||{},r)}},Download.prototype.generateExportList=function(e){var o=this.table.modules.export.generateExportList(this.table.options.downloadConfig,!1,e||this.table.options.downloadRowRange,"download"),t=this.table.options.groupHeaderDownload;return t&&!Array.isArray(t)&&(t=[t]),o.forEach(function(e){var o;"group"===e.type&&(o=e.columns[0],t&&t[e.indent]&&(o.value=t[e.indent](o.value,e.component._group.getRowCount(),e.component._group.getData(),e.component)))}),o},Download.prototype.triggerDownload=function(e,o,t,n,a){var r=document.createElement("a"),i=new Blob([e],{type:o}),n=n||"Tabulator."+("function"==typeof t?"txt":t);(i=this.table.options.downloadReady.call(this.table,e,i))&&(a?window.open(window.URL.createObjectURL(i)):navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(i,n):(r.setAttribute("href",window.URL.createObjectURL(i)),r.setAttribute("download",n),r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r)),this.table.options.downloadComplete&&this.table.options.downloadComplete())},Download.prototype.commsReceived=function(e,o,t){switch(o){case"intercept":this.download(t.type,"",t.options,t.active,t.intercept)}},Download.prototype.downloaders={csv:function(e,o,t){var n=o&&o.delimiter?o.delimiter:",",a=[],r=[];e.forEach(function(e){var o=[];switch(e.type){case"group":console.warn("Download Warning - CSV downloader cannot process row groups");break;case"calc":console.warn("Download Warning - CSV downloader cannot process column calculations");break;case"header":e.columns.forEach(function(e,o){e&&1===e.depth&&(r[o]=void 0===e.value||null===e.value?"":'"'+String(e.value).split('"').join('""')+'"')});break;case"row":e.columns.forEach(function(e){if(e){switch(_typeof(e.value)){case"object":e.value=JSON.stringify(e.value);break;case"undefined":case"null":e.value=""}o.push('"'+String(e.value).split('"').join('""')+'"')}}),a.push(o.join(n))}}),r.length&&a.unshift(r.join(n)),a=a.join("\n"),o.bom&&(a="\ufeff"+a),t(a,"text/csv")},json:function(e,o,t){var n=[];e.forEach(function(e){var o={};switch(e.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":e.columns.forEach(function(e){e&&(o[e.component.getField()]=e.value)}),n.push(o)}}),n=JSON.stringify(n,null,"\t"),t(n,"application/json")},pdf:function(e,o,t){function n(e,o){var t=[];return e.columns.forEach(function(e){var n;if(e){switch(_typeof(e.value)){case"object":e.value=JSON.stringify(e.value);break;case"undefined":case"null":e.value=""}n={content:e.value,colSpan:e.width,rowSpan:e.height},o&&(n.styles=o),t.push(n)}else t.push("")}),t}var a=[],r=[],i={},l=o.rowGroupStyles||{fontStyle:"bold",fontSize:12,cellPadding:6,fillColor:220},s=o.rowCalcStyles||{fontStyle:"bold",fontSize:10,cellPadding:4,fillColor:232},c=o.jsPDF||{},u=o&&o.title?o.title:"";c.orientation||(c.orientation=o.orientation||"landscape"),c.unit||(c.unit="pt"),e.forEach(function(e){switch(e.type){case"header":a.push(n(e));break;case"group":r.push(n(e,l));break;case"calc":r.push(n(e,s));break;case"row":r.push(n(e))}});var d=new jsPDF(c);o&&o.autoTable&&(i="function"==typeof o.autoTable?o.autoTable(d)||{}:o.autoTable),u&&(i.addPageContent=function(e){d.text(u,40,30)}),i.head=a,i.body=r,d.autoTable(i),o&&o.documentProcessing&&o.documentProcessing(d),t(d.output("arraybuffer"),"application/pdf")},xlsx:function(e,o,t){function n(){var o=[],t=[],n={},a={s:{c:0,r:0},e:{c:e[0]?e[0].columns.reduce(function(e,o){return e+(o&&o.width?o.width:1)},0):0,r:e.length}};return e.forEach(function(e,n){var a=[];e.columns.forEach(function(e,o){e?(a.push(e.value instanceof Date||"object"!==_typeof(e.value)?e.value:JSON.stringify(e.value)),(e.width>1||e.height>-1)&&t.push({s:{r:n,c:o},e:{r:n+e.height-1,c:o+e.width-1}})):a.push("")}),o.push(a)}),XLSX.utils.sheet_add_aoa(n,o),n["!ref"]=XLSX.utils.encode_range(a),t.length&&(n["!merges"]=t),n}var a,r=this,i=o.sheetName||"Sheet1",l=XLSX.utils.book_new();if(l.SheetNames=[],l.Sheets={},o.sheetOnly)return void t(n());if(o.sheets)for(var s in o.sheets)!0===o.sheets[s]?(l.SheetNames.push(s),l.Sheets[s]=n()):(l.SheetNames.push(s),this.modules.comms.send(o.sheets[s],"download","intercept",{type:"xlsx",options:{sheetOnly:!0},active:r.active,intercept:function(e){l.Sheets[s]=e}}));else l.SheetNames.push(i),l.Sheets[i]=n();o.documentProcessing&&(l=o.documentProcessing(l)),a=XLSX.write(l,{bookType:"xlsx",bookSST:!0,type:"binary"}),t(function(e){for(var o=new ArrayBuffer(e.length),t=new Uint8Array(o),n=0;n!=e.length;++n)t[n]=255&e.charCodeAt(n);return o}(a),"application/octet-stream")},html:function(e,o,t){this.modExists("export",!0)&&t(this.modules.export.genereateHTMLTable(e),"text/html")}},Tabulator.prototype.registerModule("download",Download); \ No newline at end of file diff --git a/website/js/vendor/tabulator/js/modules/edit.min.js b/website/js/vendor/tabulator/js/modules/edit.min.js deleted file mode 100644 index 9d9073b..0000000 --- a/website/js/vendor/tabulator/js/modules/edit.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Edit=function(e){this.table=e,this.currentCell=!1,this.mouseClick=!1,this.recursionBlock=!1,this.invalidEdit=!1,this.editedCells=[]};Edit.prototype.initializeColumn=function(e){var t=this,i={editor:!1,blocked:!1,check:e.definition.editable,params:e.definition.editorParams||{}};switch(_typeof(e.definition.editor)){case"string":"tick"===e.definition.editor&&(e.definition.editor="tickCross",console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor")),t.editors[e.definition.editor]?i.editor=t.editors[e.definition.editor]:console.warn("Editor Error - No such editor found: ",e.definition.editor);break;case"function":i.editor=e.definition.editor;break;case"boolean":!0===e.definition.editor&&("function"!=typeof e.definition.formatter?("tick"===e.definition.formatter&&(e.definition.formatter="tickCross",console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor")),t.editors[e.definition.formatter]?i.editor=t.editors[e.definition.formatter]:i.editor=t.editors.input):console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ",e.definition.formatter))}i.editor&&(e.modules.edit=i)},Edit.prototype.getCurrentCell=function(){return!!this.currentCell&&this.currentCell.getComponent()},Edit.prototype.clearEditor=function(e){var t,i=this.currentCell;if(this.invalidEdit=!1,i){for(this.currentCell=!1,t=i.getElement(),e?i.validate():t.classList.remove("tabulator-validation-fail"),t.classList.remove("tabulator-editing");t.firstChild;)t.removeChild(t.firstChild);i.row.getElement().classList.remove("tabulator-row-editing")}},Edit.prototype.cancelEdit=function(){if(this.currentCell){var e=this.currentCell,t=this.currentCell.getComponent();this.clearEditor(!0),e.setValueActual(e.getValue()),e.cellRendered(),("textarea"==e.column.definition.editor||e.column.definition.variableHeight)&&e.row.normalizeHeight(!0),e.column.cellEvents.cellEditCancelled&&e.column.cellEvents.cellEditCancelled.call(this.table,t),this.table.options.cellEditCancelled.call(this.table,t)}},Edit.prototype.bindEditor=function(e){var t=this,i=e.getElement();i.setAttribute("tabindex",0),i.addEventListener("click",function(e){i.classList.contains("tabulator-editing")||i.focus({preventScroll:!0})}),i.addEventListener("mousedown",function(e){2===e.button?e.preventDefault():t.mouseClick=!0}),i.addEventListener("focus",function(i){t.recursionBlock||t.edit(e,i,!1)})},Edit.prototype.focusCellNoEvent=function(e,t){this.recursionBlock=!0,t&&"ie"===this.table.browser||e.getElement().focus({preventScroll:!0}),this.recursionBlock=!1},Edit.prototype.editCell=function(e,t){this.focusCellNoEvent(e),this.edit(e,!1,t)},Edit.prototype.focusScrollAdjust=function(e){if("virtual"==this.table.rowManager.getRenderMode()){var t=this.table.rowManager.element.scrollTop,i=this.table.rowManager.element.clientHeight+this.table.rowManager.element.scrollTop,n=e.row.getElement();n.offsetTop;n.offsetTopi&&(this.table.rowManager.element.scrollTop+=n.offsetTop+n.offsetHeight-i);var o=this.table.rowManager.element.scrollLeft,a=this.table.rowManager.element.clientWidth+this.table.rowManager.element.scrollLeft,r=e.getElement();r.offsetLeft;this.table.modExists("frozenColumns")&&(o+=parseInt(this.table.modules.frozenColumns.leftMargin),a-=parseInt(this.table.modules.frozenColumns.rightMargin)),r.offsetLefta&&(this.table.rowManager.element.scrollLeft+=r.offsetLeft+r.offsetWidth-a)}},Edit.prototype.edit=function(e,t,i){function n(t){if(u.currentCell===e){var i=!0;return e.column.modules.validate&&u.table.modExists("validate")&&"manual"!=u.table.options.validationMode&&(i=u.table.modules.validate.validate(e.column.modules.validate,e,t)),!0===i||"highlight"===u.table.options.validationMode?(u.clearEditor(),e.modules.edit||(e.modules.edit={}),e.modules.edit.edited=!0,-1==u.editedCells.indexOf(e)&&u.editedCells.push(e),e.setValue(t,!0),u.table.options.dataTree&&u.table.modExists("dataTree")&&u.table.modules.dataTree.checkForRestyle(e),!0===i||(m.classList.add("tabulator-validation-fail"),u.table.options.validationFailed.call(u.table,e.getComponent(),t,i),!1)):(u.invalidEdit=!0,m.classList.add("tabulator-validation-fail"),u.focusCellNoEvent(e,!0),c(),u.table.options.validationFailed.call(u.table,e.getComponent(),t,i),!1)}}function o(){u.currentCell===e&&(u.cancelEdit(),u.table.options.dataTree&&u.table.modExists("dataTree")&&u.table.modules.dataTree.checkForRestyle(e))}function a(e){c=e}var r,l,s,u=this,d=!0,c=function(){},m=e.getElement();if(this.currentCell)return void(this.invalidEdit||this.cancelEdit());if(e.column.modules.edit.blocked)return this.mouseClick=!1,m.blur(),!1;switch(t&&t.stopPropagation(),_typeof(e.column.modules.edit.check)){case"function":d=e.column.modules.edit.check(e.getComponent());break;case"boolean":d=e.column.modules.edit.check}if(d||i){if(u.cancelEdit(),u.currentCell=e,this.focusScrollAdjust(e),l=e.getComponent(),this.mouseClick&&(this.mouseClick=!1,e.column.cellEvents.cellClick&&e.column.cellEvents.cellClick.call(this.table,t,l)),e.column.cellEvents.cellEditing&&e.column.cellEvents.cellEditing.call(this.table,l),u.table.options.cellEditing.call(this.table,l),s="function"==typeof e.column.modules.edit.params?e.column.modules.edit.params(l):e.column.modules.edit.params,!1===(r=e.column.modules.edit.editor.call(u,l,a,n,o,s)))return m.blur(),!1;if(!(r instanceof Node))return console.warn("Edit Error - Editor should return an instance of Node, the editor returned:",r),m.blur(),!1;for(m.classList.add("tabulator-editing"),e.row.getElement().classList.add("tabulator-row-editing");m.firstChild;)m.removeChild(m.firstChild);m.appendChild(r),c();for(var f=m.children,p=0;p46){if(i>=n.length)return t.preventDefault(),t.stopPropagation(),l=!1,!1;switch(n[i]){case o:if(s.toUpperCase()==s.toLowerCase())return t.preventDefault(),t.stopPropagation(),l=!1,!1;break;case a:if(isNaN(s))return t.preventDefault(),t.stopPropagation(),l=!1,!1;break;case r:break;default:if(s!==n[i])return t.preventDefault(),t.stopPropagation(),l=!1,!1}l=!0}}),e.addEventListener("keyup",function(n){n.keyCode>46&&t.maskAutoFill&&i(e.value.length)}),e.placeholder||(e.placeholder=n),t.maskAutoFill&&i(e.value.length)},Edit.prototype.getEditedCells=function(){var e=[];return this.editedCells.forEach(function(t){e.push(t.getComponent())}),e},Edit.prototype.clearEdited=function(e){var t;e.modules.edit&&e.modules.edit.edited&&(e.modules.edit.edited=!1,e.modules.validate&&(e.modules.validate.invalid=!1)),(t=this.editedCells.indexOf(e))>-1&&this.editedCells.splice(t,1)},Edit.prototype.editors={input:function(e,t,i,n,o){function a(e){(null===r||void 0===r)&&""!==l.value||l.value!==r?i(l.value)&&(r=l.value):n()}var r=e.getValue(),l=document.createElement("input");if(l.setAttribute("type",o.search?"search":"text"),l.style.padding="4px",l.style.width="100%",l.style.boxSizing="border-box",o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var s in o.elementAttributes)"+"==s.charAt(0)?(s=s.slice(1),l.setAttribute(s,l.getAttribute(s)+o.elementAttributes["+"+s])):l.setAttribute(s,o.elementAttributes[s]);return l.value=void 0!==r?r:"",t(function(){l.focus({preventScroll:!0}),l.style.height="100%"}),l.addEventListener("change",a),l.addEventListener("blur",a),l.addEventListener("keydown",function(e){switch(e.keyCode){case 13:a(e);break;case 27:n();break;case 35:case 36:e.stopPropagation()}}),o.mask&&this.table.modules.edit.maskInput(l,o),l},textarea:function(e,t,i,n,o){function a(t){(null===r||void 0===r)&&""!==u.value||u.value!==r?(i(u.value)&&(r=u.value),setTimeout(function(){e.getRow().normalizeHeight()},300)):n()}var r=e.getValue(),l=o.verticalNavigation||"hybrid",s=String(null!==r&&void 0!==r?r:""),u=(s.match(/(?:\r\n|\r|\n)/g),document.createElement("textarea")),d=0;if(u.style.display="block",u.style.padding="2px",u.style.height="100%",u.style.width="100%",u.style.boxSizing="border-box",u.style.whiteSpace="pre-wrap",u.style.resize="none",o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var c in o.elementAttributes)"+"==c.charAt(0)?(c=c.slice(1),u.setAttribute(c,u.getAttribute(c)+o.elementAttributes["+"+c])):u.setAttribute(c,o.elementAttributes[c]);return u.value=s,t(function(){u.focus({preventScroll:!0}),u.style.height="100%",u.scrollHeight,u.style.height=u.scrollHeight+"px",e.getRow().normalizeHeight()}),u.addEventListener("change",a),u.addEventListener("blur",a),u.addEventListener("keyup",function(){u.style.height="";var t=u.scrollHeight;u.style.height=t+"px",t!=d&&(d=t,e.getRow().normalizeHeight())}),u.addEventListener("keydown",function(e){switch(e.keyCode){case 27:n();break;case 38:("editor"==l||"hybrid"==l&&u.selectionStart)&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 40:("editor"==l||"hybrid"==l&&u.selectionStart!==u.value.length)&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 35:case 36:e.stopPropagation()}}),o.mask&&this.table.modules.edit.maskInput(u,o),u},number:function(e,t,i,n,o){function a(){var e=s.value;isNaN(e)||""===e||(e=Number(e)),e!==r?i(e)&&(r=e):n()}var r=e.getValue(),l=o.verticalNavigation||"editor",s=document.createElement("input");if(s.setAttribute("type","number"),void 0!==o.max&&s.setAttribute("max",o.max),void 0!==o.min&&s.setAttribute("min",o.min),void 0!==o.step&&s.setAttribute("step",o.step),s.style.padding="4px",s.style.width="100%",s.style.boxSizing="border-box",o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var u in o.elementAttributes)"+"==u.charAt(0)?(u=u.slice(1),s.setAttribute(u,s.getAttribute(u)+o.elementAttributes["+"+u])):s.setAttribute(u,o.elementAttributes[u]);s.value=r;var d=function(e){a()};return t(function(){s.removeEventListener("blur",d),s.focus({preventScroll:!0}),s.style.height="100%",s.addEventListener("blur",d)}),s.addEventListener("keydown",function(e){switch(e.keyCode){case 13:a();break;case 27:n();break;case 38:case 40:"editor"==l&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 35:case 36:e.stopPropagation()}}),o.mask&&this.table.modules.edit.maskInput(s,o),s},range:function(e,t,i,n,o){function a(){var e=l.value;isNaN(e)||""===e||(e=Number(e)),e!=r?i(e)&&(r=e):n()}var r=e.getValue(),l=document.createElement("input");if(l.setAttribute("type","range"),void 0!==o.max&&l.setAttribute("max",o.max),void 0!==o.min&&l.setAttribute("min",o.min),void 0!==o.step&&l.setAttribute("step",o.step),l.style.padding="4px",l.style.width="100%",l.style.boxSizing="border-box",o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var s in o.elementAttributes)"+"==s.charAt(0)?(s=s.slice(1),l.setAttribute(s,l.getAttribute(s)+o.elementAttributes["+"+s])):l.setAttribute(s,o.elementAttributes[s]);return l.value=r,t(function(){l.focus({preventScroll:!0}),l.style.height="100%"}),l.addEventListener("blur",function(e){a()}),l.addEventListener("keydown",function(e){switch(e.keyCode){case 13:a();break;case 27:n()}}),l},select:function(e,t,i,n,o){function a(t){var i,n={},a=k.table.getData();return i=t?k.table.columnManager.getColumnByField(t):e.getColumn()._getSelf(),i?(a.forEach(function(e){var t=i.getFieldValue(e);null!==t&&void 0!==t&&""!==t&&(n[t]=!0)}),n=o.sortValuesList?"asc"==o.sortValuesList?Object.keys(n).sort():Object.keys(n).sort().reverse():Object.keys(n)):console.warn("unable to find matching column to create select lookup list:",t),n}function r(t,i){function n(e){var e={label:e.label,value:e.value,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1};return i.indexOf(e.value)>-1&&u(e),o.push(e),a.push(e),e}var o=[],a=[];if("function"==typeof t&&(t=t(e)),Array.isArray(t))t.forEach(function(e){var t;"object"===(void 0===e?"undefined":_typeof(e))?e.options?(t={label:e.label,group:!0,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1},a.push(t),e.options.forEach(function(e){n(e)})):n(e):(t={label:e,value:e,element:!1},i.indexOf(t.value)>-1&&u(t),o.push(t),a.push(t))});else for(var r in t){var s={label:t[r],value:r,element:!1};i.indexOf(s.value)>-1&&u(s),o.push(s),a.push(s)}N=o,S=a,l()}function l(){for(;P.firstChild;)P.removeChild(P.firstChild);S.forEach(function(t){var i=t.element;if(!i){if(i=document.createElement("div"),t.label=o.listItemFormatter?o.listItemFormatter(t.value,t.label,e,i,t.itemParams):t.label,t.group?(i.classList.add("tabulator-edit-select-list-group"),i.tabIndex=0,i.innerHTML=""===t.label?" ":t.label):(i.classList.add("tabulator-edit-select-list-item"),i.tabIndex=0,i.innerHTML=""===t.label?" ":t.label,i.addEventListener("click",function(){V=!0,setTimeout(function(){V=!1},10),I?(c(t),x.focus()):m(t)}),M.indexOf(t)>-1&&i.classList.add("active")),t.elementAttributes&&"object"==_typeof(t.elementAttributes))for(var n in t.elementAttributes)"+"==n.charAt(0)?(n=n.slice(1),i.setAttribute(n,x.getAttribute(n)+t.elementAttributes["+"+n])):i.setAttribute(n,t.elementAttributes[n]);i.addEventListener("mousedown",function(){O=!1,setTimeout(function(){O=!0},10)}),t.element=i}P.appendChild(i)})}function s(e,t){!I&&T&&T.element&&T.element.classList.remove("active"),T&&T.element&&T.element.classList.remove("focused"),T=e,e.element&&(e.element.classList.add("focused"),t&&e.element.classList.add("active")),e&&e.element&&e.element.scrollIntoView&&e.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}function u(e){-1==M.indexOf(e)&&(M.push(e),s(e,!0)),p()}function d(e){var t=M[e];e>-1&&(M.splice(e,1),t.element&&t.element.classList.remove("active"))}function c(e){e||(e=T);var t=M.indexOf(e);t>-1?d(t):(!0!==I&&M.length>=I&&d(0),u(e)),p()}function m(e){g(),e||(e=T),e&&(x.value=e.label,i(e.value)),w=x.value}function f(e){e||g();var t=[];M.forEach(function(e){t.push(e.value)}),w=x.value,i(t)}function p(){var e=[];M.forEach(function(t){e.push(t.label)}),x.value=e.join(", "),!1===k.currentCell&&f(!0)}function b(){for(var e=M.length,t=0;t0&&s(N[t-1],!I));break;case 40:t=N.indexOf(T),("editor"==L||"hybrid"==L&&t-1||String(t.title).toLowerCase().indexOf(String(e).toLowerCase())>-1)&&a.push(t)}),c(a,t))}function s(e){var t=document.createElement("div");d(),!1!==e&&(t.classList.add("tabulator-edit-select-list-notice"),t.tabIndex=0,e instanceof Node?t.appendChild(e):t.innerHTML=e,x.appendChild(t))}function u(e){var t=[];if(Array.isArray(e))e.forEach(function(e){var i={};"object"===(void 0===e?"undefined":_typeof(e))?(i.title=o.listItemFormatter?o.listItemFormatter(e.value,e.label):e.label,i.value=e.value):(i.title=o.listItemFormatter?o.listItemFormatter(e,e):e,i.value=e),t.push(i)});else for(var i in e){var n={title:o.listItemFormatter?o.listItemFormatter(i,e[i]):e[i],value:i};t.push(n)}return t}function d(){for(;x.firstChild;)x.removeChild(x.firstChild)}function c(e,t){e.length?m(e,t):o.emptyPlaceholder&&s(o.emptyPlaceholder)}function m(e,t){var i=!1;d(),P=e,P.forEach(function(e){var n=e.element;n||(n=document.createElement("div"),n.classList.add("tabulator-edit-select-list-item"),n.tabIndex=0,n.innerHTML=e.title,n.addEventListener("click",function(t){b(e),f()}),n.addEventListener("mousedown",function(e){N=!1,setTimeout(function(){N=!0},10)}),e.element=n,t&&e.value==A&&(w.value=e.title,e.element.classList.add("active"),i=!0),e===I&&(e.element.classList.add("active"),i=!0)),x.appendChild(n)}),i||b(!1)}function f(){v(),I?A!==I.value?(A=I.value,w.value=I.title,i(I.value)):n():o.freetext?(A=w.value,i(w.value)):o.allowEmpty&&""===w.value?(A=w.value,i(w.value)):n()}function p(){if(!x.parentNode){for(;x.firstChild;)x.removeChild(x.firstChild);var e=Tabulator.prototype.helpers.elOffset(k);x.style.minWidth=k.offsetWidth+"px",x.style.top=e.top+k.offsetHeight+"px",x.style.left=e.left+"px",document.body.appendChild(x)}}function b(e,t){I&&I.element&&I.element.classList.remove("active"),I=e,e&&e.element&&e.element.classList.add("active"),e&&e.element&&e.element.scrollIntoView&&e.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}function v(){x.parentNode&&x.parentNode.removeChild(x),g()}function h(){v(),n()}function g(){E.table.rowManager.element.removeEventListener("scroll",h)}var y=this,E=this,k=e.getElement(),A=e.getValue(),C=o.verticalNavigation||"editor",L=void 0!==A||null===A?A:void 0!==o.defaultValue?o.defaultValue:"",w=document.createElement("input"),x=document.createElement("div"),P=[],I=!1,N=!0,T=!1;if(w.setAttribute("type","search"),w.style.padding="4px",w.style.width="100%",w.style.boxSizing="border-box",o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var S in o.elementAttributes)"+"==S.charAt(0)?(S=S.slice(1),w.setAttribute(S,w.getAttribute(S)+o.elementAttributes["+"+S])):w.setAttribute(S,o.elementAttributes[S]);return x.classList.add("tabulator-edit-select-list"),x.addEventListener("mousedown",function(e){N=!1,setTimeout(function(){N=!0},10)}),w.addEventListener("keydown",function(e){var t;switch(e.keyCode){case 38:t=P.indexOf(I),("editor"==C||"hybrid"==C&&t)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),b(t>0?P[t-1]:!1));break;case 40:t=P.indexOf(I),("editor"==C||"hybrid"==C&&t'):("ie"==l.table.browser?t.setAttribute("class","tabulator-star-inactive"):t.classList.replace("tabulator-star-active","tabulator-star-inactive"),t.innerHTML='')})}function r(e){u=e,a(e)}var l=this,s=e.getElement(),u=e.getValue(),d=s.getElementsByTagName("svg").length||5,c=s.getElementsByTagName("svg")[0]?s.getElementsByTagName("svg")[0].getAttribute("width"):14,m=[],f=document.createElement("div"),p=document.createElementNS("http://www.w3.org/2000/svg","svg");if(s.style.whiteSpace="nowrap",s.style.overflow="hidden",s.style.textOverflow="ellipsis",f.style.verticalAlign="middle",f.style.display="inline-block",f.style.padding="4px",p.setAttribute("width",c),p.setAttribute("height",c),p.setAttribute("viewBox","0 0 512 512"),p.setAttribute("xml:space","preserve"),p.style.padding="0 1px",o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var b in o.elementAttributes)"+"==b.charAt(0)?(b=b.slice(1),f.setAttribute(b,f.getAttribute(b)+o.elementAttributes["+"+b])):f.setAttribute(b,o.elementAttributes[b]);for(var v=1;v<=d;v++)!function(e){var t=document.createElement("span"),n=p.cloneNode(!0);m.push(n),t.addEventListener("mouseenter",function(t){t.stopPropagation(),t.stopImmediatePropagation(),a(e)}),t.addEventListener("mousemove",function(e){e.stopPropagation(),e.stopImmediatePropagation()}),t.addEventListener("click",function(t){t.stopPropagation(),t.stopImmediatePropagation(),i(e),s.blur()}),t.appendChild(n),f.appendChild(t)}(v);return u=Math.min(parseInt(u),d),a(u),f.addEventListener("mousemove",function(e){a(0)}),f.addEventListener("click",function(e){i(0)}),s.addEventListener("blur",function(e){n()}),s.addEventListener("keydown",function(e){switch(e.keyCode){case 39:r(u+1);break;case 37:r(u-1);break;case 13:i(u);break;case 27:n()}}),f},progress:function(e,t,i,n,o){function a(){var e=c*Math.round(p.offsetWidth/(s.clientWidth/100))+d;i(e),s.setAttribute("aria-valuenow",e),s.setAttribute("aria-label",m)}var r,l,s=e.getElement(),u=void 0===o.max?s.getElementsByTagName("div")[0].getAttribute("max")||100:o.max,d=void 0===o.min?s.getElementsByTagName("div")[0].getAttribute("min")||0:o.min,c=(u-d)/100,m=e.getValue()||0,f=document.createElement("div"),p=document.createElement("div");if(f.style.position="absolute",f.style.right="0",f.style.top="0",f.style.bottom="0",f.style.width="5px",f.classList.add("tabulator-progress-handle"),p.style.display="inline-block",p.style.position="relative",p.style.height="100%",p.style.backgroundColor="#488CE9",p.style.maxWidth="100%",p.style.minWidth="0%",o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var b in o.elementAttributes)"+"==b.charAt(0)?(b=b.slice(1),p.setAttribute(b,p.getAttribute(b)+o.elementAttributes["+"+b])):p.setAttribute(b,o.elementAttributes[b]);return s.style.padding="4px 4px",m=Math.min(parseFloat(m),u),m=Math.max(parseFloat(m),d),m=Math.round((m-d)/c),p.style.width=m+"%",s.setAttribute("aria-valuemin",d),s.setAttribute("aria-valuemax",u),p.appendChild(f),f.addEventListener("mousedown",function(e){r=e.screenX,l=p.offsetWidth}),f.addEventListener("mouseover",function(){f.style.cursor="ew-resize"}),s.addEventListener("mousemove",function(e){r&&(p.style.width=l+e.screenX-r+"px")}),s.addEventListener("mouseup",function(e){r&&(e.stopPropagation(),e.stopImmediatePropagation(),r=!1,l=!1,a())}),s.addEventListener("keydown",function(e){switch(e.keyCode){case 39:e.preventDefault(),p.style.width=p.clientWidth+s.clientWidth/100+"px";break;case 37:e.preventDefault(),p.style.width=p.clientWidth-s.clientWidth/100+"px";break;case 9:case 13:a();break;case 27:n()}}),s.addEventListener("blur",function(){n()}),p},tickCross:function(e,t,i,n,o){function a(e){return s?e?d?u:l.checked:l.checked&&!d?(l.checked=!1,l.indeterminate=!0,d=!0,u):(d=!1,l.checked):l.checked}var r=e.getValue(),l=document.createElement("input"),s=o.tristate,u=void 0===o.indeterminateValue?null:o.indeterminateValue,d=!1;if(l.setAttribute("type","checkbox"),l.style.marginTop="5px",l.style.boxSizing="border-box",o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var c in o.elementAttributes)"+"==c.charAt(0)?(c=c.slice(1),l.setAttribute(c,l.getAttribute(c)+o.elementAttributes["+"+c])):l.setAttribute(c,o.elementAttributes[c]);return l.value=r,!s||void 0!==r&&r!==u&&""!==r||(d=!0,l.indeterminate=!0),"firefox"!=this.table.browser&&t(function(){l.focus({preventScroll:!0})}),l.checked=!0===r||"true"===r||"True"===r||1===r,t(function(){l.focus()}),l.addEventListener("change",function(e){i(a())}),l.addEventListener("blur",function(e){i(a(!0))}),l.addEventListener("keydown",function(e){13==e.keyCode&&i(a()),27==e.keyCode&&n()}),l}},Tabulator.prototype.registerModule("edit",Edit); \ No newline at end of file diff --git a/website/js/vendor/tabulator/js/modules/export.min.js b/website/js/vendor/tabulator/js/modules/export.min.js deleted file mode 100644 index 785982a..0000000 --- a/website/js/vendor/tabulator/js/modules/export.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ExportRow=function(t,e,o,n){this.type=t,this.columns=e,this.component=o||!1,this.indent=n||0},ExportColumn=function(t,e,o,n,r){this.value=t,this.component=e||!1,this.width=o,this.height=n,this.depth=r},Export=function(t){this.table=t,this.config={},this.cloneTableStyle=!0,this.colVisProp=""};Export.prototype.generateExportList=function(t,e,o,n){this.cloneTableStyle=e,this.config=t||{},this.colVisProp=n;var r=!1!==this.config.columnHeaders?this.headersToExportRows(this.generateColumnGroupHeaders()):[],a=this.bodyToExportRows(this.rowLookup(o));return r.concat(a)},Export.prototype.genereateTable=function(t,e,o,n){var r=this.generateExportList(t,e,o,n);return this.genereateTableElement(r)},Export.prototype.rowLookup=function(t){var e=this,o=[];if("function"==typeof t)t.call(this.table).forEach(function(t){(t=e.table.rowManager.findRow(t))&&o.push(t)});else switch(t){case!0:case"visible":o=this.table.rowManager.getVisibleRows(!0);break;case"all":o=this.table.rowManager.rows;break;case"selected":o=this.table.modules.selectRow.selectedRows;break;case"active":default:o=this.table.options.pagination?this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length-2):this.table.rowManager.getDisplayRows()}return Object.assign([],o)},Export.prototype.generateColumnGroupHeaders=function(){var t=this,e=[];return(!1!==this.config.columnGroups?this.table.columnManager.columns:this.table.columnManager.columnsByIndex).forEach(function(o){var n=t.processColumnGroup(o);n&&e.push(n)}),e},Export.prototype.processColumnGroup=function(t){var e=this,o=t.columns,n=0,r=t.definition["title"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))]||t.definition.title,a={title:r,column:t,depth:1};if(o.length){if(a.subGroups=[],a.width=0,o.forEach(function(t){var o=e.processColumnGroup(t);o&&(a.width+=o.width,a.subGroups.push(o),o.depth>n&&(n=o.depth))}),a.depth+=n,!a.width)return!1}else{if(!this.columnVisCheck(t))return!1;a.width=1}return a},Export.prototype.columnVisCheck=function(t){return!1!==t.definition[this.colVisProp]&&(t.visible||!t.visible&&t.definition[this.colVisProp])},Export.prototype.headersToExportRows=function(t){function e(t,r){var a=n-r;if(void 0===o[r]&&(o[r]=[]),t.height=t.subGroups?1:a-t.depth+1,o[r].push(t),t.height>1)for(var l=1;l1)for(var i=1;in&&(n=t.depth)}),t.forEach(function(t){e(t,0)}),o.forEach(function(t){var e=[];t.forEach(function(t){t?e.push(new ExportColumn(t.title,t.column.getComponent(),t.width,t.height,t.depth)):e.push(null)}),r.push(new ExportRow("header",e))}),r},Export.prototype.bodyToExportRows=function(t){var e=this,o=[],n=[];return this.table.columnManager.columnsByIndex.forEach(function(t){e.columnVisCheck(t)&&o.push(t.getComponent())}),!1!==this.config.columnCalcs&&this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&t.unshift(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&t.push(this.table.modules.columnCalcs.botRow)),t=t.filter(function(t){switch(t.type){case"group":return!1!==e.config.rowGroups;case"calc":return!1!==e.config.columnCalcs;case"row":return!(e.table.options.dataTree&&!1===e.config.dataTree&&t.modules.dataTree.parent)}return!0}),t.forEach(function(t,r){var a=t.getData(e.colVisProp),l=[],i=0;switch(t.type){case"group":i=t.level,l.push(new ExportColumn(t.key,t.getComponent(),o.length,1));break;case"calc":case"row":o.forEach(function(t){l.push(new ExportColumn(t._column.getFieldValue(a),t,1,1))}),e.table.options.dataTree&&!1!==e.config.dataTree&&(i=t.modules.dataTree.index)}n.push(new ExportRow(t.type,l,t.getComponent(),i))}),n},Export.prototype.genereateTableElement=function(t){var e=this,o=document.createElement("table"),n=document.createElement("thead"),r=document.createElement("tbody"),a=this.lookupTableStyles(),l=this.table.options["rowFormatter"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))],i={};return i.rowFormatter=null!==l?l:this.table.options.rowFormatter,this.table.options.dataTree&&!1!==this.config.dataTree&&this.table.modExists("columnCalcs")&&(i.treeElementField=this.table.modules.dataTree.elementField),i.groupHeader=this.table.options["groupHeader"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))],i.groupHeader&&!Array.isArray(i.groupHeader)&&(i.groupHeader=[i.groupHeader]),o.classList.add("tabulator-print-table"),this.mapElementStyles(this.table.columnManager.getHeadersElement(),n,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),t.length>1e3&&console.warn("It may take a long time to render an HTML table with more than 1000 rows"),t.forEach(function(t,o){switch(t.type){case"header":n.appendChild(e.genereateHeaderElement(t,i,a));break;case"group":r.appendChild(e.genereateGroupElement(t,i,a));break;case"calc":r.appendChild(e.genereateCalcElement(t,i,a));break;case"row":var l=e.genereateRowElement(t,i,a);e.mapElementStyles(o%2&&a.evenRow?a.evenRow:a.oddRow,l,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),r.appendChild(l)}}),n.innerHTML&&o.appendChild(n),o.appendChild(r),this.mapElementStyles(this.table.element,o,["border-top","border-left","border-right","border-bottom"]),o},Export.prototype.lookupTableStyles=function(){var t={};return this.cloneTableStyle&&window.getComputedStyle&&(t.oddRow=this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"),t.evenRow=this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"),t.calcRow=this.table.element.querySelector(".tabulator-row.tabulator-calcs"),t.firstRow=this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"),t.firstGroup=this.table.element.getElementsByClassName("tabulator-group")[0],t.firstRow&&(t.styleCells=t.firstRow.getElementsByClassName("tabulator-cell"),t.firstCell=t.styleCells[0],t.lastCell=t.styleCells[t.styleCells.length-1])),t},Export.prototype.genereateHeaderElement=function(t,e,o){var n=this,r=document.createElement("tr");return t.columns.forEach(function(t){if(t){var e=document.createElement("th"),o=t.component._column.definition.cssClass?t.component._column.definition.cssClass.split(" "):[];e.colSpan=t.width,e.rowSpan=t.height,e.innerHTML=t.value,n.cloneTableStyle&&(e.style.boxSizing="border-box"),o.forEach(function(t){e.classList.add(t)}),n.mapElementStyles(t.component.getElement(),e,["text-align","border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),n.mapElementStyles(t.component._column.contentElement,e,["padding-top","padding-left","padding-right","padding-bottom"]),t.component._column.visible?n.mapElementStyles(t.component.getElement(),e,["width"]):t.component._column.definition.width&&(e.style.width=t.component._column.definition.width+"px"),t.component._column.parent&&n.mapElementStyles(t.component._column.parent.groupElement,e,["border-top"]),r.appendChild(e)}}),r},Export.prototype.genereateGroupElement=function(t,e,o){var n=document.createElement("tr"),r=document.createElement("td"),a=t.columns[0];return n.classList.add("tabulator-print-table-row"),e.groupHeader&&e.groupHeader[t.indent]?a.value=e.groupHeader[t.indent](a.value,t.component._group.getRowCount(),t.component._group.getData(),t.component):!1===e.groupHeader?a.value=a.value:a.value=t.component._group.generator(a.value,t.component._group.getRowCount(),t.component._group.getData(),t.component),r.colSpan=a.width,r.innerHTML=a.value,n.classList.add("tabulator-print-table-group"),n.classList.add("tabulator-group-level-"+t.indent),a.component.isVisible()&&n.classList.add("tabulator-group-visible"),this.mapElementStyles(o.firstGroup,n,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),this.mapElementStyles(o.firstGroup,r,["padding-top","padding-left","padding-right","padding-bottom"]),n.appendChild(r),n},Export.prototype.genereateCalcElement=function(t,e,o){var n=this.genereateRowElement(t,e,o);return n.classList.add("tabulator-print-table-calcs"),this.mapElementStyles(o.calcRow,n,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),n},Export.prototype.genereateRowElement=function(t,e,o){var n=this,r=document.createElement("tr");return r.classList.add("tabulator-print-table-row"),t.columns.forEach(function(a){if(a){var l=document.createElement("td"),s=a.component._column,p=a.value,c={modules:{},getValue:function(){return p},getField:function(){return s.definition.field},getElement:function(){return l},getColumn:function(){return s.getComponent()},getData:function(){return t.component.getData()},getRow:function(){return t.component},getComponent:function(){return c},column:s};if((s.definition.cssClass?s.definition.cssClass.split(" "):[]).forEach(function(t){l.classList.add(t)}),n.table.modExists("format")&&!1!==n.config.formatCells)p=n.table.modules.format.formatExportValue(c,n.colVisProp);else switch(void 0===p?"undefined":_typeof(p)){case"object":p=JSON.stringify(p);break;case"undefined":case"null":p="";break;default:p=p}p instanceof Node?l.appendChild(p):l.innerHTML=p,o.firstCell&&(n.mapElementStyles(o.firstCell,l,["padding-top","padding-left","padding-right","padding-bottom","border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size"]),s.definition.align&&(l.style.textAlign=s.definition.align)),n.table.options.dataTree&&!1!==n.config.dataTree&&(e.treeElementField&&e.treeElementField==s.field||!e.treeElementField&&0==i)&&(t.component._row.modules.dataTree.controlEl&&l.insertBefore(t.component._row.modules.dataTree.controlEl.cloneNode(!0),l.firstChild),t.component._row.modules.dataTree.branchEl&&l.insertBefore(t.component._row.modules.dataTree.branchEl.cloneNode(!0),l.firstChild)),r.appendChild(l),c.modules.format&&c.modules.format.renderedCallback&&c.modules.format.renderedCallback(),e.rowFormatter&&!1!==n.config.formatCells&&e.rowFormatter(t.component)}}),r},Export.prototype.genereateHTMLTable=function(t){var e=document.createElement("div");return e.appendChild(this.genereateTableElement(t)),e.innerHTML},Export.prototype.getHtml=function(t,e,o,n){var r=this.generateExportList(o||this.table.options.htmlOutputConfig,e,t,n||"htmlOutput");return this.genereateHTMLTable(r)},Export.prototype.mapElementStyles=function(t,e,o){if(this.cloneTableStyle&&t&&e){var n={"background-color":"backgroundColor",color:"fontColor",width:"width","font-weight":"fontWeight","font-family":"fontFamily","font-size":"fontSize","text-align":"textAlign","border-top":"borderTop","border-left":"borderLeft","border-right":"borderRight","border-bottom":"borderBottom","padding-top":"paddingTop","padding-left":"paddingLeft","padding-right":"paddingRight","padding-bottom":"paddingBottom"};if(window.getComputedStyle){var r=window.getComputedStyle(t);o.forEach(function(t){e.style[n[t]]=r.getPropertyValue(t)})}}},Tabulator.prototype.registerModule("export",Export); \ No newline at end of file diff --git a/website/js/vendor/tabulator/js/modules/format.min.js b/website/js/vendor/tabulator/js/modules/format.min.js deleted file mode 100644 index 9616969..0000000 --- a/website/js/vendor/tabulator/js/modules/format.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Format=function(e){this.table=e};Format.prototype.initializeColumn=function(e){e.modules.format=this.lookupFormatter(e,""),void 0!==e.definition.formatterPrint&&(e.modules.format.print=this.lookupFormatter(e,"Print")),void 0!==e.definition.formatterClipboard&&(e.modules.format.clipboard=this.lookupFormatter(e,"Clipboard")),void 0!==e.definition.formatterHtmlOutput&&(e.modules.format.htmlOutput=this.lookupFormatter(e,"HtmlOutput"))},Format.prototype.lookupFormatter=function(e,t){var o={params:e.definition["formatter"+t+"Params"]||{}},r=e.definition["formatter"+t];switch(void 0===r?"undefined":_typeof(r)){case"string":"tick"===r&&(r="tickCross",void 0===o.params.crossElement&&(o.params.crossElement=!1),console.warn("DEPRECATION WARNING - the tick formatter has been deprecated, please use the tickCross formatter with the crossElement param set to false")),this.formatters[r]?o.formatter=this.formatters[r]:(console.warn("Formatter Error - No such formatter found: ",r),o.formatter=this.formatters.plaintext);break;case"function":o.formatter=r;break;default:o.formatter=this.formatters.plaintext}return o},Format.prototype.cellRendered=function(e){e.modules.format&&e.modules.format.renderedCallback&&!e.modules.format.rendered&&(e.modules.format.renderedCallback(),e.modules.format.rendered=!0)},Format.prototype.formatValue=function(e){function t(t){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=t,e.modules.format.rendered=!1}var o=e.getComponent(),r="function"==typeof e.column.modules.format.params?e.column.modules.format.params(o):e.column.modules.format.params;return e.column.modules.format.formatter.call(this,o,r,t)},Format.prototype.formatExportValue=function(e,t){var o,r=e.column.modules.format[t];if(r){var a=function(t){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=t,e.modules.format.rendered=!1};return o="function"==typeof r.params?r.params(component):r.params,r.formatter.call(this,e.getComponent(),o,a)}return this.formatValue(e)},Format.prototype.sanitizeHTML=function(e){if(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(e).replace(/[&<>"'`=\/]/g,function(e){return t[e]})}return e},Format.prototype.emptyToSpace=function(e){return null===e||void 0===e||""===e?" ":e},Format.prototype.getFormatter=function(e){var e;switch(void 0===e?"undefined":_typeof(e)){case"string":this.formatters[e]?e=this.formatters[e]:(console.warn("Formatter Error - No such formatter found: ",e),e=this.formatters.plaintext);break;case"function":e=e;break;default:e=this.formatters.plaintext}return e},Format.prototype.formatters={plaintext:function(e,t,o){return this.emptyToSpace(this.sanitizeHTML(e.getValue()))},html:function(e,t,o){return e.getValue()},textarea:function(e,t,o){return e.getElement().style.whiteSpace="pre-wrap",this.emptyToSpace(this.sanitizeHTML(e.getValue()))},money:function(e,t,o){var r,a,n,l,i=parseFloat(e.getValue()),s=t.decimal||".",c=t.thousand||",",d=t.symbol||"",u=!!t.symbolAfter,m=void 0!==t.precision?t.precision:2;if(isNaN(i))return this.emptyToSpace(this.sanitizeHTML(e.getValue()));for(r=!1!==m?i.toFixed(m):i,r=String(r).split("."),a=r[0],n=r.length>1?s+r[1]:"",l=/(\d+)(\d{3})/;l.test(a);)a=a.replace(l,"$1"+c+"$2");return u?a+n+d:d+a+n},link:function(e,t,o){var r,a=e.getValue(),n=t.urlPrefix||"",l=t.download,i=a,s=document.createElement("a");if(t.labelField&&(r=e.getData(),i=r[t.labelField]),t.label)switch(_typeof(t.label)){case"string":i=t.label;break;case"function":i=t.label(e)}if(i){if(t.urlField&&(r=e.getData(),a=r[t.urlField]),t.url)switch(_typeof(t.url)){case"string":a=t.url;break;case"function":a=t.url(e)}return s.setAttribute("href",n+a),t.target&&s.setAttribute("target",t.target),t.download&&(l="function"==typeof l?l(e):!0===l?"":l,s.setAttribute("download",l)),s.innerHTML=this.emptyToSpace(this.sanitizeHTML(i)),s}return" "},image:function(e,t,o){var r=document.createElement("img");switch(r.setAttribute("src",e.getValue()),_typeof(t.height)){case"number":r.style.height=t.height+"px";break;case"string":r.style.height=t.height}switch(_typeof(t.width)){case"number":r.style.width=t.width+"px";break;case"string":r.style.width=t.width}return r.addEventListener("load",function(){e.getRow().normalizeHeight()}),r},tickCross:function(e,t,o){var r=e.getValue(),a=e.getElement(),n=t.allowEmpty,l=t.allowTruthy,i=void 0!==t.tickElement?t.tickElement:'',s=void 0!==t.crossElement?t.crossElement:'';return l&&r||!0===r||"true"===r||"True"===r||1===r||"1"===r?(a.setAttribute("aria-checked",!0),i||""):!n||"null"!==r&&""!==r&&null!==r&&void 0!==r?(a.setAttribute("aria-checked",!1),s||""):(a.setAttribute("aria-checked","mixed"),"")},datetime:function(e,t,o){var r=t.inputFormat||"YYYY-MM-DD hh:mm:ss",a=t.outputFormat||"DD/MM/YYYY hh:mm:ss",n=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",l=e.getValue(),i=moment(l,r);return i.isValid()?t.timezone?i.tz(t.timezone).format(a):i.format(a):!0===n?l:"function"==typeof n?n(l):n},datetimediff:function(e,t,o){var r=t.inputFormat||"YYYY-MM-DD hh:mm:ss",a=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",n=void 0!==t.suffix&&t.suffix,l=void 0!==t.unit?t.unit:void 0,i=void 0!==t.humanize&&t.humanize,s=void 0!==t.date?t.date:moment(),c=e.getValue(),d=moment(c,r);return d.isValid()?i?moment.duration(d.diff(s)).humanize(n):d.diff(s,l)+(n?" "+n:""):!0===a?c:"function"==typeof a?a(c):a},lookup:function(e,t,o){var r=e.getValue();return void 0===t[r]?(console.warn("Missing display value for "+r),r):t[r]},star:function(e,t,o){var r=e.getValue(),a=e.getElement(),n=t&&t.stars?t.stars:5,l=document.createElement("span"),i=document.createElementNS("http://www.w3.org/2000/svg","svg");l.style.verticalAlign="middle",i.setAttribute("width","14"),i.setAttribute("height","14"),i.setAttribute("viewBox","0 0 512 512"),i.setAttribute("xml:space","preserve"),i.style.padding="0 1px",r=r&&!isNaN(r)?parseInt(r):0,r=Math.max(0,Math.min(r,n));for(var s=1;s<=n;s++){var c=i.cloneNode(!0);c.innerHTML=s<=r?'':'',l.appendChild(c)}return a.style.whiteSpace="nowrap",a.style.overflow="hidden",a.style.textOverflow="ellipsis",a.setAttribute("aria-label",r),l},traffic:function(e,t,o){var r,a,n=this.sanitizeHTML(e.getValue())||0,l=document.createElement("span"),i=t&&t.max?t.max:100,s=t&&t.min?t.min:0,c=t&&void 0!==t.color?t.color:["red","orange","green"],d="#666666";if(!isNaN(n)&&void 0!==e.getValue()){switch(l.classList.add("tabulator-traffic-light"),a=parseFloat(n)<=i?parseFloat(n):i,a=parseFloat(a)>=s?parseFloat(a):s,r=(i-s)/100,a=Math.round((a-s)/r),void 0===c?"undefined":_typeof(c)){case"string":d=c;break;case"function":d=c(n);break;case"object":if(Array.isArray(c)){var u=100/c.length,m=Math.floor(a/u);m=Math.min(m,c.length-1),m=Math.max(m,0),d=c[m];break}}return l.style.backgroundColor=d,l}},progress:function(e,t,o){var r,a,n,l,i,s=this.sanitizeHTML(e.getValue())||0,c=e.getElement(),d=t&&t.max?t.max:100,u=t&&t.min?t.min:0,m=t&&t.legendAlign?t.legendAlign:"center";switch(a=parseFloat(s)<=d?parseFloat(s):d,a=parseFloat(a)>=u?parseFloat(a):u,r=(d-u)/100,a=Math.round((a-u)/r),_typeof(t.color)){case"string":n=t.color;break;case"function":n=t.color(s);break;case"object":if(Array.isArray(t.color)){var f=100/t.color.length,p=Math.floor(a/f);p=Math.min(p,t.color.length-1),p=Math.max(p,0),n=t.color[p];break}default:n="#2DC214"}switch(_typeof(t.legend)){case"string":l=t.legend;break;case"function":l=t.legend(s);break;case"boolean":l=s;break;default:l=!1}switch(_typeof(t.legendColor)){case"string":i=t.legendColor;break;case"function":i=t.legendColor(s);break;case"object":if(Array.isArray(t.legendColor)){var f=100/t.legendColor.length,p=Math.floor(a/f);p=Math.min(p,t.legendColor.length-1),p=Math.max(p,0),i=t.legendColor[p]}break;default:i="#000"}c.style.minWidth="30px",c.style.position="relative",c.setAttribute("aria-label",a);var h=document.createElement("div");if(h.style.display="inline-block",h.style.position="relative",h.style.width=a+"%",h.style.backgroundColor=n,h.style.height="100%",h.setAttribute("data-max",d),h.setAttribute("data-min",u),l){var g=document.createElement("div");g.style.position="absolute",g.style.top="4px",g.style.left=0,g.style.textAlign=m,g.style.width="100%",g.style.color=i,g.innerHTML=l}return o(function(){if(!(e instanceof CellComponent)){var t=document.createElement("div");t.style.position="absolute",t.style.top="4px",t.style.bottom="4px",t.style.left="4px",t.style.right="4px",c.appendChild(t),c=t}c.appendChild(h),l&&c.appendChild(g)}),""},color:function(e,t,o){return e.getElement().style.backgroundColor=this.sanitizeHTML(e.getValue()),""},buttonTick:function(e,t,o){return''},buttonCross:function(e,t,o){return''},rownum:function(e,t,o){return this.table.rowManager.activeRows.indexOf(e.getRow()._getSelf())+1},handle:function(e,t,o){return e.getElement().classList.add("tabulator-row-handle"),"
"},responsiveCollapse:function(e,t,o){function r(e){var t=n.element;n.open=e,t&&(n.open?(a.classList.add("open"),t.style.display=""):(a.classList.remove("open"),t.style.display="none"))}var a=document.createElement("div"),n=e.getRow()._row.modules.responsiveLayout;return a.classList.add("tabulator-responsive-collapse-toggle"),a.innerHTML="+-",e.getElement().classList.add("tabulator-row-handle"),a.addEventListener("click",function(e){e.stopImmediatePropagation(),r(!n.open)}),r(n.open),a},rowSelection:function(e,t,o){var r=this,a=document.createElement("input");if(a.type="checkbox",this.table.modExists("selectRow",!0))if(a.addEventListener("click",function(e){e.stopPropagation()}),"function"==typeof e.getRow){var n=e.getRow();n instanceof RowComponent?(a.addEventListener("change",function(e){n.toggleSelect()}),a.checked=n.isSelected&&n.isSelected(),this.table.modules.selectRow.registerRowSelectCheckbox(n,a)):a=""}else a.addEventListener("change",function(e){r.table.modules.selectRow.selectedRows.length?r.table.deselectRow():r.table.selectRow(t.rowRange)}),this.table.modules.selectRow.registerHeaderSelectCheckbox(a);return a}},Tabulator.prototype.registerModule("format",Format); \ No newline at end of file diff --git a/website/js/vendor/tabulator/js/modules/group_rows.min.js b/website/js/vendor/tabulator/js/modules/group_rows.min.js deleted file mode 100644 index f1b6996..0000000 --- a/website/js/vendor/tabulator/js/modules/group_rows.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ -var GroupComponent=function(t){this._group=t,this.type="GroupComponent"};GroupComponent.prototype.getKey=function(){return this._group.key},GroupComponent.prototype.getField=function(){return this._group.field},GroupComponent.prototype.getElement=function(){return this._group.element},GroupComponent.prototype.getRows=function(){return this._group.getRows(!0)},GroupComponent.prototype.getSubGroups=function(){return this._group.getSubGroups(!0)},GroupComponent.prototype.getParentGroup=function(){return!!this._group.parent&&this._group.parent.getComponent()},GroupComponent.prototype.getVisibility=function(){return console.warn("getVisibility function is deprecated, you should now use the isVisible function"),this._group.visible},GroupComponent.prototype.isVisible=function(){return this._group.visible},GroupComponent.prototype.show=function(){this._group.show()},GroupComponent.prototype.hide=function(){this._group.hide()},GroupComponent.prototype.toggle=function(){this._group.toggleVisibility()},GroupComponent.prototype._getSelf=function(){return this._group},GroupComponent.prototype.getTable=function(){return this._group.groupManager.table};var Group=function(t,o,e,r,i,s,n){this.groupManager=t,this.parent=o,this.key=r,this.level=e,this.field=i,this.hasSubGroups=e-1?e?this.rows.splice(i+1,0,t):this.rows.splice(i,0,t):e?this.rows.push(t):this.rows.unshift(t),t.modules.group=this,this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this),this.groupManager.updateGroupRows(!0)},Group.prototype.scrollHeader=function(t){this.arrowElement.style.marginLeft=t,this.groupList.forEach(function(o){o.scrollHeader(t)})},Group.prototype.getRowIndex=function(t){},Group.prototype.conformRowData=function(t){return this.field?t[this.field]=this.key:console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"),this.parent&&(t=this.parent.conformRowData(t)),t},Group.prototype.removeRow=function(t){var o=this.rows.indexOf(t),e=t.getElement();o>-1&&this.rows.splice(o,1),this.groupManager.table.options.groupValues||this.rows.length?(e.parentNode&&e.parentNode.removeChild(e),this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this)):(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this),this.groupManager.updateGroupRows(!0))},Group.prototype.removeGroup=function(t){var o,e=t.level+"_"+t.key;this.groups[e]&&(delete this.groups[e],o=this.groupList.indexOf(t),o>-1&&this.groupList.splice(o,1),this.groupList.length||(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this)))},Group.prototype.getHeadersAndRows=function(t){var o=[];return o.push(this),this._visSet(),this.visible?this.groupList.length?this.groupList.forEach(function(e){o=o.concat(e.getHeadersAndRows(t))}):(!t&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),o.push(this.calcs.top)),o=o.concat(this.rows),!t&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),o.push(this.calcs.bottom))):this.groupList.length||"table"==this.groupManager.table.options.columnCalcs||this.groupManager.table.modExists("columnCalcs")&&(!t&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),o.push(this.calcs.top))),!t&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),o.push(this.calcs.bottom)))),o},Group.prototype.getData=function(t,o){var e=[];return this._visSet(),(!t||t&&this.visible)&&this.rows.forEach(function(t){e.push(t.getData(o||"data"))}),e},Group.prototype.getRowCount=function(){var t=0;return this.groupList.length?this.groupList.forEach(function(o){t+=o.getRowCount()}):t=this.rows.length,t},Group.prototype.toggleVisibility=function(){this.visible?this.hide():this.show()},Group.prototype.hide=function(){this.visible=!1,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination?this.groupManager.updateGroupRows(!0):(this.element.classList.remove("tabulator-group-visible"),this.groupList.length?this.groupList.forEach(function(t){t.getHeadersAndRows().forEach(function(t){t.detachElement()})}):this.rows.forEach(function(t){var o=t.getElement();o.parentNode.removeChild(o)}),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex()),this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()),this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),!1)},Group.prototype.show=function(){var t=this;if(t.visible=!0,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination)this.groupManager.updateGroupRows(!0);else{this.element.classList.add("tabulator-group-visible");var o=t.getElement();this.groupList.length?this.groupList.forEach(function(t){t.getHeadersAndRows().forEach(function(t){var e=t.getElement();o.parentNode.insertBefore(e,o.nextSibling),t.initialize(),o=e})}):t.rows.forEach(function(t){var e=t.getElement();o.parentNode.insertBefore(e,o.nextSibling),t.initialize(),o=e}),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex()),this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()}this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),!0)},Group.prototype._visSet=function(){var t=[];"function"==typeof this.visible&&(this.rows.forEach(function(o){t.push(o.getData())}),this.visible=this.visible(this.key,this.getRowCount(),t,this.getComponent()))},Group.prototype.getRowGroup=function(t){var o=!1;return this.groupList.length?this.groupList.forEach(function(e){var r=e.getRowGroup(t);r&&(o=r)}):this.rows.find(function(o){return o===t})&&(o=this),o},Group.prototype.getSubGroups=function(t){var o=[];return this.groupList.forEach(function(e){o.push(t?e.getComponent():e)}),o},Group.prototype.getRows=function(t){var o=[];return this.rows.forEach(function(e){o.push(t?e.getComponent():e)}),o},Group.prototype.generateGroupHeaderContents=function(){var t=[];for(this.rows.forEach(function(o){t.push(o.getData())}),this.elementContents=this.generator(this.key,this.getRowCount(),t,this.getComponent());this.element.firstChild;)this.element.removeChild(this.element.firstChild);"string"==typeof this.elementContents?this.element.innerHTML=this.elementContents:this.element.appendChild(this.elementContents),this.element.insertBefore(this.arrowElement,this.element.firstChild)},Group.prototype.getPath=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t.unshift(this.key),this.parent&&this.parent.getPath(t),t},Group.prototype.getElement=function(){this.addBindingsd=!1,this._visSet(),this.visible?this.element.classList.add("tabulator-group-visible"):this.element.classList.remove("tabulator-group-visible");for(var t=0;tr.length&&console.warn("Error creating group headers, groupHeader array is shorter than groupBy array"),t.headerGenerator=[function(){return""}],this.startOpen=[function(){return!1}],t.table.modules.localize.bind("groups|item",function(o,e){t.headerGenerator[0]=function(t,r,i){return(void 0===t?"":t)+"("+r+" "+(1===r?o:e.groups.items)+")"}}),this.groupIDLookups=[],Array.isArray(o)||o)this.table.modExists("columnCalcs")&&"table"!=this.table.options.columnCalcs&&"both"!=this.table.options.columnCalcs&&this.table.modules.columnCalcs.removeCalcs();else if(this.table.modExists("columnCalcs")&&"group"!=this.table.options.columnCalcs){var i=this.table.columnManager.getRealColumns();i.forEach(function(o){o.definition.topCalc&&t.table.modules.columnCalcs.initializeTopRow(),o.definition.bottomCalc&&t.table.modules.columnCalcs.initializeBottomRow()})}Array.isArray(o)||(o=[o]),o.forEach(function(o,e){var r,i;"function"==typeof o?r=o:(i=t.table.columnManager.getColumnByField(o),r=i?function(t){return i.getFieldValue(t)}:function(t){return t[o]}),t.groupIDLookups.push({field:"function"!=typeof o&&o,func:r,values:!!t.allowedValues&&t.allowedValues[e]})}),e&&(Array.isArray(e)||(e=[e]),e.forEach(function(t){t="function"==typeof t?t:function(){return!0}}),t.startOpen=e),r&&(t.headerGenerator=Array.isArray(r)?r:[r]),this.initialized=!0},GroupRows.prototype.setDisplayIndex=function(t){this.displayIndex=t},GroupRows.prototype.getDisplayIndex=function(){return this.displayIndex},GroupRows.prototype.getRows=function(t){return this.groupIDLookups.length?(this.table.options.dataGrouping.call(this.table),this.generateGroups(t),this.table.options.dataGrouped&&this.table.options.dataGrouped.call(this.table,this.getGroups(!0)),this.updateGroupRows()):t.slice(0)},GroupRows.prototype.getGroups=function(t){var o=[];return this.groupList.forEach(function(e){o.push(t?e.getComponent():e)}),o},GroupRows.prototype.getChildGroups=function(t){var o=this,e=[];return t||(t=this),t.groupList.forEach(function(t){t.groupList.length?e=e.concat(o.getChildGroups(t)):e.push(t)}),e},GroupRows.prototype.wipe=function(){this.groupList.forEach(function(t){t.wipe()})},GroupRows.prototype.pullGroupListData=function(t){var o=this,e=[];return t.forEach(function(t){var r={};r.level=0,r.rowCount=0,r.headerContent="";var i=[];t.hasSubGroups?(i=o.pullGroupListData(t.groupList),r.level=t.level,r.rowCount=i.length-t.groupList.length,r.headerContent=t.generator(t.key,r.rowCount,t.rows,t),e.push(r),e=e.concat(i)):(r.level=t.level,r.headerContent=t.generator(t.key,t.rows.length,t.rows,t),r.rowCount=t.getRows().length,e.push(r),t.getRows().forEach(function(t){e.push(t.getData("data"))}))}),e},GroupRows.prototype.getGroupedData=function(){return this.pullGroupListData(this.groupList)},GroupRows.prototype.getRowGroup=function(t){var o=!1;return this.groupList.forEach(function(e){var r=e.getRowGroup(t);r&&(o=r)}),o},GroupRows.prototype.countGroups=function(){return this.groupList.length},GroupRows.prototype.generateGroups=function(t){var o=this,e=o.groups;o.groups={},o.groupList=[],this.allowedValues&&this.allowedValues[0]?(this.allowedValues[0].forEach(function(t){o.createGroup(t,0,e)}),t.forEach(function(t){o.assignRowToExistingGroup(t,e)})):t.forEach(function(t){o.assignRowToGroup(t,e)})},GroupRows.prototype.createGroup=function(t,o,e){var r,i=o+"_"+t;e=e||[],r=new Group(this,!1,o,t,this.groupIDLookups[0].field,this.headerGenerator[0],e[i]),this.groups[i]=r,this.groupList.push(r)},GroupRows.prototype.assignRowToExistingGroup=function(t,o){var e=this.groupIDLookups[0].func(t.getData()),r="0_"+e;this.groups[r]&&this.groups[r].addRow(t)},GroupRows.prototype.assignRowToGroup=function(t,o){var e=this.groupIDLookups[0].func(t.getData()),r=!this.groups["0_"+e];return r&&this.createGroup(e,0,o),this.groups["0_"+e].addRow(t),!r},GroupRows.prototype.reassignRowToGroup=function(t){var o=t.getGroup(),e=o.getPath(),r=this.getExpectedPath(t);e.length==r.length&&e.every(function(t,o){return t===r[o]})||(o.removeRow(t),this.assignRowToGroup(t,self.groups),this.table.rowManager.refreshActiveData("group",!1,!0))},GroupRows.prototype.getExpectedPath=function(t){var o=[],e=t.getData();return this.groupIDLookups.forEach(function(t){o.push(t.func(e))}),o},GroupRows.prototype.updateGroupRows=function(t){var o=this,e=[];if(o.groupList.forEach(function(t){e=e.concat(t.getHeadersAndRows())}),t){var r=o.table.rowManager.setDisplayRows(e,this.getDisplayIndex());!0!==r&&this.setDisplayIndex(r),o.table.rowManager.refreshActiveData("group",!0,!0)}return e},GroupRows.prototype.scrollHeaders=function(t){this.table.options.virtualDomHoz&&(t-=this.table.vdomHoz.vDomPadLeft),t+="px",this.groupList.forEach(function(o){o.scrollHeader(t)})},GroupRows.prototype.removeGroup=function(t){var o,e=t.level+"_"+t.key;this.groups[e]&&(delete this.groups[e],(o=this.groupList.indexOf(t))>-1&&this.groupList.splice(o,1))},Tabulator.prototype.registerModule("groupRows",GroupRows); \ No newline at end of file diff --git a/website/js/vendor/tabulator/js/modules/history.min.js b/website/js/vendor/tabulator/js/modules/history.min.js deleted file mode 100644 index ed4acef..0000000 --- a/website/js/vendor/tabulator/js/modules/history.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ -var History=function(t){this.table=t,this.history=[],this.index=-1};History.prototype.clear=function(){this.history=[],this.index=-1},History.prototype.action=function(t,o,e){this.history=this.history.slice(0,this.index+1),this.history.push({type:t,component:o,data:e}),this.index++},History.prototype.getHistoryUndoSize=function(){return this.index+1},History.prototype.getHistoryRedoSize=function(){return this.history.length-(this.index+1)},History.prototype.clearComponentHistory=function(t){var o=this.history.findIndex(function(o){return o.component===t});o>-1&&(this.history.splice(o,1),o<=this.index&&this.index--,this.clearComponentHistory(t))},History.prototype.undo=function(){if(this.index>-1){var t=this.history[this.index];return this.undoers[t.type].call(this,t),this.index--,this.table.options.historyUndo.call(this.table,t.type,t.component.getComponent(),t.data),!0}return console.warn("History Undo Error - No more history to undo"),!1},History.prototype.redo=function(){if(this.history.length-1>this.index){this.index++;var t=this.history[this.index];return this.redoers[t.type].call(this,t),this.table.options.historyRedo.call(this.table,t.type,t.component.getComponent(),t.data),!0}return console.warn("History Redo Error - No more history to redo"),!1},History.prototype.undoers={cellEdit:function(t){t.component.setValueProcessData(t.data.oldValue)},rowAdd:function(t){t.component.deleteActual()},rowDelete:function(t){var o=this.table.rowManager.addRowActual(t.data.data,t.data.pos,t.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(t.component,o)},rowMove:function(t){this.table.rowManager.moveRowActual(t.component,this.table.rowManager.rows[t.data.posFrom],!t.data.after),this.table.rowManager.redraw()}},History.prototype.redoers={cellEdit:function(t){t.component.setValueProcessData(t.data.newValue)},rowAdd:function(t){var o=this.table.rowManager.addRowActual(t.data.data,t.data.pos,t.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(t.component,o)},rowDelete:function(t){t.component.deleteActual()},rowMove:function(t){this.table.rowManager.moveRowActual(t.component,this.table.rowManager.rows[t.data.posTo],t.data.after),this.table.rowManager.redraw()}},History.prototype._rebindRow=function(t,o){this.history.forEach(function(e){if(e.component instanceof Row)e.component===t&&(e.component=o);else if(e.component instanceof Cell&&e.component.row===t){var i=e.component.column.getField();i&&(e.component=o.getCell(i))}})},Tabulator.prototype.registerModule("history",History); \ No newline at end of file diff --git a/website/js/vendor/tabulator/js/modules/menu.min.js b/website/js/vendor/tabulator/js/modules/menu.min.js deleted file mode 100644 index 172576e..0000000 --- a/website/js/vendor/tabulator/js/modules/menu.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ -var Menu=function(e){this.table=e,this.menuEl=!1,this.blurEvent=this.hideMenu.bind(this),this.escEvent=this.escMenu.bind(this),this.nestedMenuBlock=!1};Menu.prototype.initializeColumnHeader=function(e){var t,n=this;e.definition.headerContextMenu&&(e.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,e,e.definition.headerContextMenu)),this.tapHold(e,e.definition.headerContextMenu)),e.definition.headerMenu&&(t=document.createElement("span"),t.classList.add("tabulator-header-menu-button"),t.innerHTML="⋮",t.addEventListener("click",function(t){var i="function"==typeof e.definition.headerMenu?e.definition.headerMenu(e.getComponent(),t):e.definition.headerMenu;t.stopPropagation(),t.preventDefault(),n.loadMenu(t,e,i)}),e.titleElement.insertBefore(t,e.titleElement.firstChild))},Menu.prototype.LoadMenuEvent=function(e,t,n){t="function"==typeof t?t(e.getComponent(),n):t,this.loadMenu(n,e,t)},Menu.prototype.tapHold=function(e,t){var n=this,i=e.getElement(),o=null,u=!1;i.addEventListener("touchstart",function(i){clearTimeout(o),u=!1,o=setTimeout(function(){clearTimeout(o),o=null,u=!0,n.LoadMenuEvent(e,t,i)},1e3)},{passive:!0}),i.addEventListener("touchend",function(e){clearTimeout(o),o=null,u&&e.preventDefault()})},Menu.prototype.initializeCell=function(e){e.column.definition.contextMenu&&(e.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,e,e.column.definition.contextMenu)),this.tapHold(e,e.column.definition.contextMenu)),e.column.definition.clickMenu&&e.getElement().addEventListener("click",this.LoadMenuEvent.bind(this,e,e.column.definition.clickMenu))},Menu.prototype.initializeRow=function(e){this.table.options.rowContextMenu&&(e.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,e,this.table.options.rowContextMenu)),this.tapHold(e,this.table.options.rowContextMenu)),this.table.options.rowClickMenu&&e.getElement().addEventListener("click",this.LoadMenuEvent.bind(this,e,this.table.options.rowClickMenu))},Menu.prototype.initializeGroup=function(e){this.table.options.groupContextMenu&&(e.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,e,this.table.options.groupContextMenu)),this.tapHold(e,this.table.options.groupContextMenu)),this.table.options.groupClickMenu&&e.getElement().addEventListener("click",this.LoadMenuEvent.bind(this,e,this.table.options.groupClickMenu))},Menu.prototype.loadMenu=function(e,t,n){var i=this,o=Math.max(document.body.offsetHeight,window.innerHeight),u=!(e instanceof MouseEvent);if(u||e.preventDefault(),n&&n.length){if(this.nestedMenuBlock){if(this.isOpen())return}else this.nestedMenuBlock=setTimeout(function(){i.nestedMenuBlock=!1},100);this.hideMenu(),this.menuEl=document.createElement("div"),this.menuEl.classList.add("tabulator-menu"),n.forEach(function(e){var n=document.createElement("div"),o=e.label,u=e.disabled;e.separator?n.classList.add("tabulator-menu-separator"):(n.classList.add("tabulator-menu-item"),"function"==typeof o&&(o=o(t.getComponent())),o instanceof Node?n.appendChild(o):n.innerHTML=o,"function"==typeof u&&(u=u(t.getComponent())),u?(n.classList.add("tabulator-menu-item-disabled"),n.addEventListener("click",function(e){e.stopPropagation()})):n.addEventListener("click",function(n){i.hideMenu(),e.action(n,t.getComponent())})),i.menuEl.appendChild(n)}),this.menuEl.style.top=(u?e.touches[0].pageY:e.pageY)+"px",this.menuEl.style.left=(u?e.touches[0].pageX:e.pageX)+"px",setTimeout(function(){i.table.rowManager.element.addEventListener("scroll",i.blurEvent),document.body.addEventListener("click",i.blurEvent),document.body.addEventListener("contextmenu",i.blurEvent),document.body.addEventListener("keydown",i.escEvent)},100),document.body.appendChild(this.menuEl),e.pageX+this.menuEl.offsetWidth>=document.body.offsetWidth&&(this.menuEl.style.left="",this.menuEl.style.right=document.body.offsetWidth-e.pageX+"px"),e.pageY+this.menuEl.offsetHeight>=o&&(this.menuEl.style.top="",this.menuEl.style.bottom=o-e.pageY+"px")}},Menu.prototype.isOpen=function(){return!!this.menuEl.parentNode},Menu.prototype.escMenu=function(e){27==e.keyCode&&this.hideMenu()},Menu.prototype.hideMenu=function(){this.menuEl.parentNode&&this.menuEl.parentNode.removeChild(this.menuEl),this.escEvent&&document.body.removeEventListener("keydown",this.escEvent),this.blurEvent&&(document.body.removeEventListener("click",this.blurEvent),document.body.removeEventListener("contextmenu",this.blurEvent),this.table.rowManager.element.removeEventListener("scroll",this.blurEvent))},Menu.prototype.menus={},Tabulator.prototype.registerModule("menu",Menu); \ No newline at end of file diff --git a/website/js/vendor/tabulator/js/modules/page.min.js b/website/js/vendor/tabulator/js/modules/page.min.js deleted file mode 100644 index 58dbf2b..0000000 --- a/website/js/vendor/tabulator/js/modules/page.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ -var Page=function(e){this.table=e,this.mode="local",this.progressiveLoad=!1,this.size=0,this.page=1,this.count=5,this.max=1,this.displayIndex=0,this.initialLoad=!0,this.pageSizes=[],this.dataReceivedNames={},this.dataSentNames={},this.createElements()};Page.prototype.createElements=function(){var e;this.element=document.createElement("span"),this.element.classList.add("tabulator-paginator"),this.pagesElement=document.createElement("span"),this.pagesElement.classList.add("tabulator-pages"),e=document.createElement("button"),e.classList.add("tabulator-page"),e.setAttribute("type","button"),e.setAttribute("role","button"),e.setAttribute("aria-label",""),e.setAttribute("title",""),this.firstBut=e.cloneNode(!0),this.firstBut.setAttribute("data-page","first"),this.prevBut=e.cloneNode(!0),this.prevBut.setAttribute("data-page","prev"),this.nextBut=e.cloneNode(!0),this.nextBut.setAttribute("data-page","next"),this.lastBut=e.cloneNode(!0),this.lastBut.setAttribute("data-page","last"),this.table.options.paginationSizeSelector&&(this.pageSizeSelect=document.createElement("select"),this.pageSizeSelect.classList.add("tabulator-page-size"))},Page.prototype.generatePageSizeSelectList=function(){var e=this,t=[];if(this.pageSizeSelect){if(Array.isArray(this.table.options.paginationSizeSelector))t=this.table.options.paginationSizeSelector,this.pageSizes=t,-1==this.pageSizes.indexOf(this.size)&&t.unshift(this.size);else if(-1==this.pageSizes.indexOf(this.size)){t=[];for(var a=1;a<5;a++)t.push(this.size*a);this.pageSizes=t}else t=this.pageSizes;for(;this.pageSizeSelect.firstChild;)this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild);t.forEach(function(t){var a=document.createElement("option");a.value=t,!0===t?e.table.modules.localize.bind("pagination|all",function(e){a.innerHTML=e}):a.innerHTML=t,e.pageSizeSelect.appendChild(a)}),this.pageSizeSelect.value=this.size}},Page.prototype.initialize=function(e){var t,a,i,s=this;this.dataSentNames=Object.assign({},this.paginationDataSentNames),this.dataSentNames=Object.assign(this.dataSentNames,this.table.options.paginationDataSent),this.dataReceivedNames=Object.assign({},this.paginationDataReceivedNames),this.dataReceivedNames=Object.assign(this.dataReceivedNames,this.table.options.paginationDataReceived),s.table.modules.localize.bind("pagination|first",function(e){s.firstBut.innerHTML=e}),s.table.modules.localize.bind("pagination|first_title",function(e){s.firstBut.setAttribute("aria-label",e),s.firstBut.setAttribute("title",e)}),s.table.modules.localize.bind("pagination|prev",function(e){s.prevBut.innerHTML=e}),s.table.modules.localize.bind("pagination|prev_title",function(e){s.prevBut.setAttribute("aria-label",e),s.prevBut.setAttribute("title",e)}),s.table.modules.localize.bind("pagination|next",function(e){s.nextBut.innerHTML=e}),s.table.modules.localize.bind("pagination|next_title",function(e){s.nextBut.setAttribute("aria-label",e),s.nextBut.setAttribute("title",e)}),s.table.modules.localize.bind("pagination|last",function(e){s.lastBut.innerHTML=e}),s.table.modules.localize.bind("pagination|last_title",function(e){s.lastBut.setAttribute("aria-label",e),s.lastBut.setAttribute("title",e)}),s.firstBut.addEventListener("click",function(){s.setPage(1).then(function(){}).catch(function(){})}),s.prevBut.addEventListener("click",function(){s.previousPage().then(function(){}).catch(function(){})}),s.nextBut.addEventListener("click",function(){s.nextPage().then(function(){}).catch(function(){})}),s.lastBut.addEventListener("click",function(){s.setPage(s.max).then(function(){}).catch(function(){})}),s.table.options.paginationElement&&(s.element=s.table.options.paginationElement),this.pageSizeSelect&&(t=document.createElement("label"),s.table.modules.localize.bind("pagination|page_size",function(e){s.pageSizeSelect.setAttribute("aria-label",e),s.pageSizeSelect.setAttribute("title",e),t.innerHTML=e}),s.element.appendChild(t),s.element.appendChild(s.pageSizeSelect),s.pageSizeSelect.addEventListener("change",function(e){s.setPageSize("true"==s.pageSizeSelect.value||s.pageSizeSelect.value),s.setPage(1).then(function(){}).catch(function(){})})),s.element.appendChild(s.firstBut),s.element.appendChild(s.prevBut),s.element.appendChild(s.pagesElement),s.element.appendChild(s.nextBut),s.element.appendChild(s.lastBut),s.table.options.paginationElement||e||s.table.footerManager.append(s.element,s),s.mode=s.table.options.pagination,s.table.options.paginationSize?s.size=s.table.options.paginationSize:(a=document.createElement("div"),a.classList.add("tabulator-row"),a.style.visibility=e,i=document.createElement("div"),i.classList.add("tabulator-cell"),i.innerHTML="Page Row Test",a.appendChild(i),s.table.rowManager.getTableElement().appendChild(a),s.size=Math.floor(s.table.rowManager.getElement().clientHeight/a.offsetHeight),s.table.rowManager.getTableElement().removeChild(a)),s.count=s.table.options.paginationButtonCount,s.generatePageSizeSelectList()},Page.prototype.initializeProgressive=function(e){this.initialize(!0),this.mode="progressive_"+e,this.progressiveLoad=!0},Page.prototype.setDisplayIndex=function(e){this.displayIndex=e},Page.prototype.getDisplayIndex=function(){return this.displayIndex},Page.prototype.setMaxRows=function(e){this.max=e?!0===this.size?1:Math.ceil(e/this.size):1,this.page>this.max&&(this.page=this.max)},Page.prototype.reset=function(e,t){return("local"==this.mode||e)&&(this.page=1),t&&(this.initialLoad=!0),!0},Page.prototype.setMaxPage=function(e){e=parseInt(e),this.max=e||1,this.page>this.max&&(this.page=this.max,this.trigger())},Page.prototype.setPage=function(e){var t=this,a=this;switch(e){case"first":return this.setPage(1);case"prev":return this.previousPage();case"next":return this.nextPage();case"last":return this.setPage(this.max)}return new Promise(function(i,s){e=parseInt(e),e>0&&e<=t.max?(t.page=e,t.trigger().then(function(){i()}).catch(function(){s()}),a.table.options.persistence&&a.table.modExists("persistence",!0)&&a.table.modules.persistence.config.page&&a.table.modules.persistence.save("page")):(console.warn("Pagination Error - Requested page is out of range of 1 - "+t.max+":",e),s())})},Page.prototype.setPageToRow=function(e){var t=this;return new Promise(function(a,i){var s=t.table.rowManager.getDisplayRows(t.displayIndex-1),n=s.indexOf(e);if(n>-1){var o=!0===t.size?1:Math.ceil((n+1)/t.size);t.setPage(o).then(function(){a()}).catch(function(){i()})}else console.warn("Pagination Error - Requested row is not visible"),i()})},Page.prototype.setPageSize=function(e){!0!==e&&(e=parseInt(e)),e>0&&(this.size=e),this.pageSizeSelect&&this.generatePageSizeSelectList(),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.page&&this.table.modules.persistence.save("page")},Page.prototype._setPageButtons=function(){for(var e=this,t=Math.floor((this.count-1)/2),a=Math.ceil((this.count-1)/2),i=this.max-this.page+t+10&&n<=e.max&&e.pagesElement.appendChild(e._generatePageButton(n));this.footerRedraw()},Page.prototype._generatePageButton=function(e){var t=this,a=document.createElement("button");return a.classList.add("tabulator-page"),e==t.page&&a.classList.add("active"),a.setAttribute("type","button"),a.setAttribute("role","button"),t.table.modules.localize.bind("pagination|page_title",function(t){a.setAttribute("aria-label",t+" "+e),a.setAttribute("title",t+" "+e)}),a.setAttribute("data-page",e),a.textContent=e,a.addEventListener("click",function(a){t.setPage(e).then(function(){}).catch(function(){})}),a},Page.prototype.previousPage=function(){var e=this;return new Promise(function(t,a){e.page>1?(e.page--,e.trigger().then(function(){t()}).catch(function(){a()}),e.table.options.persistence&&e.table.modExists("persistence",!0)&&e.table.modules.persistence.config.page&&e.table.modules.persistence.save("page")):(console.warn("Pagination Error - Previous page would be less than page 1:",0),a())})},Page.prototype.nextPage=function(){var e=this;return new Promise(function(t,a){e.page0&&o.table.columnManager.getColumnByIndex(n-1))&&o._checkResizability(s)&&(o.startColumn=t,o._mouseDown(e,s,l)))};l.addEventListener("mousedown",d),l.addEventListener("touchstart",d,{passive:!0}),l.addEventListener("dblclick",function(e){var i,n,s;(i=t.getFirstColumn())&&(n=o.table.columnManager.findColumnIndex(i),(s=n>0&&o.table.columnManager.getColumnByIndex(n-1))&&o._checkResizability(s)&&(e.stopPropagation(),s.reinitializeWidth(!0)))}),i.appendChild(a),i.appendChild(l)}},ResizeColumns.prototype._checkResizability=function(e){return void 0!==e.definition.resizable?e.definition.resizable:this.table.options.resizableColumns},ResizeColumns.prototype._mouseDown=function(e,t,i){function o(e){s.table.rtl?t.setWidth(s.startWidth-((void 0===e.screenX?e.touches[0].screenX:e.screenX)-s.startX)):t.setWidth(s.startWidth+((void 0===e.screenX?e.touches[0].screenX:e.screenX)-s.startX)),s.table.options.virtualDomHoz&&s.table.vdomHoz.reinitialize(!0),!s.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights()}function n(e){s.startColumn.modules.edit&&(s.startColumn.modules.edit.blocked=!1),s.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights(),document.body.removeEventListener("mouseup",n),document.body.removeEventListener("mousemove",o),i.removeEventListener("touchmove",o),i.removeEventListener("touchend",n),s.table.element.classList.remove("tabulator-block-select"),s.table.options.persistence&&s.table.modExists("persistence",!0)&&s.table.modules.persistence.config.columns&&s.table.modules.persistence.save("columns"),s.table.options.columnResized.call(s.table,t.getComponent())}var s=this;s.table.element.classList.add("tabulator-block-select"),e.stopPropagation(),s.startColumn.modules.edit&&(s.startColumn.modules.edit.blocked=!0),s.startX=void 0===e.screenX?e.touches[0].screenX:e.screenX,s.startWidth=t.getWidth(),document.body.addEventListener("mousemove",o),document.body.addEventListener("mouseup",n),i.addEventListener("touchmove",o,{passive:!0}),i.addEventListener("touchend",n)},Tabulator.prototype.registerModule("resizeColumns",ResizeColumns); \ No newline at end of file diff --git a/website/js/vendor/tabulator/js/modules/resize_table.min.js b/website/js/vendor/tabulator/js/modules/resize_table.min.js deleted file mode 100644 index 3adeed9..0000000 --- a/website/js/vendor/tabulator/js/modules/resize_table.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ -var ResizeTable=function(e){this.table=e,this.binding=!1,this.observer=!1,this.containerObserver=!1,this.tableHeight=0,this.tableWidth=0,this.containerHeight=0,this.containerWidth=0,this.autoResize=!1};ResizeTable.prototype.initialize=function(e){var t,i=this,n=this.table;this.tableHeight=n.element.clientHeight,this.tableWidth=n.element.clientWidth,n.element.parentNode&&(this.containerHeight=n.element.parentNode.clientHeight,this.containerWidth=n.element.parentNode.clientWidth),"undefined"!=typeof ResizeObserver&&"virtual"===n.rowManager.getRenderMode()?(this.autoResize=!0,this.observer=new ResizeObserver(function(e){if(!n.browserMobile||n.browserMobile&&!n.modules.edit.currentCell){var t=Math.floor(e[0].contentRect.height),r=Math.floor(e[0].contentRect.width);i.tableHeight==t&&i.tableWidth==r||(i.tableHeight=t,i.tableWidth=r,n.element.parentNode&&(i.containerHeight=n.element.parentNode.clientHeight,i.containerWidth=n.element.parentNode.clientWidth),n.options.virtualDomHoz&&n.vdomHoz.reinitialize(!0),n.redraw())}}),this.observer.observe(n.element),t=window.getComputedStyle(n.element),this.table.element.parentNode&&!this.table.rowManager.fixedHeight&&(t.getPropertyValue("max-height")||t.getPropertyValue("min-height"))&&(this.containerObserver=new ResizeObserver(function(e){if(!n.browserMobile||n.browserMobile&&!n.modules.edit.currentCell){var t=Math.floor(e[0].contentRect.height),r=Math.floor(e[0].contentRect.width);i.containerHeight==t&&i.containerWidth==r||(i.containerHeight=t,i.containerWidth=r,i.tableHeight=n.element.clientHeight,i.tableWidth=n.element.clientWidth),n.options.virtualDomHoz&&n.vdomHoz.reinitialize(!0),n.redraw()}}),this.containerObserver.observe(this.table.element.parentNode))):(this.binding=function(){(!n.browserMobile||n.browserMobile&&!n.modules.edit.currentCell)&&(n.options.virtualDomHoz&&n.vdomHoz.reinitialize(!0),n.redraw())},window.addEventListener("resize",this.binding))},ResizeTable.prototype.clearBindings=function(e){this.binding&&window.removeEventListener("resize",this.binding),this.observer&&this.observer.unobserve(this.table.element),this.containerObserver&&this.containerObserver.unobserve(this.table.element.parentNode)},Tabulator.prototype.registerModule("resizeTable",ResizeTable); \ No newline at end of file diff --git a/website/js/vendor/tabulator/js/modules/sort.min.js b/website/js/vendor/tabulator/js/modules/sort.min.js deleted file mode 100644 index e6e73ed..0000000 --- a/website/js/vendor/tabulator/js/modules/sort.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sort=function(t){this.table=t,this.sortList=[],this.changed=!1};Sort.prototype.initializeColumn=function(t,e){var r,o,n=this,i=!1;switch(_typeof(t.definition.sorter)){case"string":n.sorters[t.definition.sorter]?i=n.sorters[t.definition.sorter]:console.warn("Sort Error - No such sorter found: ",t.definition.sorter);break;case"function":i=t.definition.sorter}t.modules.sort={sorter:i,dir:"none",params:t.definition.sorterParams||{},startingDir:t.definition.headerSortStartingDir||"asc",tristate:void 0!==t.definition.headerSortTristate?t.definition.headerSortTristate:this.table.options.headerSortTristate},(void 0===t.definition.headerSort?!1!==this.table.options.headerSort:!1!==t.definition.headerSort)&&(r=t.getElement(),r.classList.add("tabulator-sortable"),o=document.createElement("div"),o.classList.add("tabulator-col-sorter"),"object"==_typeof(this.table.options.headerSortElement)?o.appendChild(this.table.options.headerSortElement):o.innerHTML=this.table.options.headerSortElement,e.appendChild(o),t.modules.sort.element=o,r.addEventListener("click",function(e){var r="",o=[],i=!1;if(t.modules.sort){if(t.modules.sort.tristate)r="none"==t.modules.sort.dir?t.modules.sort.startingDir:t.modules.sort.dir==t.modules.sort.startingDir?"asc"==t.modules.sort.dir?"desc":"asc":"none";else switch(t.modules.sort.dir){case"asc":r="desc";break;case"desc":r="asc";break;default:r=t.modules.sort.startingDir}n.table.options.columnHeaderSortMulti&&(e.shiftKey||e.ctrlKey)?(o=n.getSort(),i=o.findIndex(function(e){return e.field===t.getField()}),i>-1?(o[i].dir=r,i!=o.length-1&&(i=o.splice(i,1)[0],"none"!=r&&o.push(i))):"none"!=r&&o.push({column:t,dir:r}),n.setSort(o)):"none"==r?n.clear():n.setSort(t,r),n.table.rowManager.sorterRefresh(!n.sortList.length)}}))},Sort.prototype.hasChanged=function(){var t=this.changed;return this.changed=!1,t},Sort.prototype.getSort=function(){var t=this,e=[];return t.sortList.forEach(function(t){t.column&&e.push({column:t.column.getComponent(),field:t.column.getField(),dir:t.dir})}),e},Sort.prototype.setSort=function(t,e){var r=this,o=[];Array.isArray(t)||(t=[{column:t,dir:e}]),t.forEach(function(t){var e;e=r.table.columnManager.findColumn(t.column),e?(t.column=e,o.push(t),r.changed=!0):console.warn("Sort Warning - Sort field does not exist and is being ignored: ",t.column)}),r.sortList=o,this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.sort&&this.table.modules.persistence.save("sort")},Sort.prototype.clear=function(){this.setSort([])},Sort.prototype.findSorter=function(t){var e,r=this.table.rowManager.activeRows[0],o="string";if(r&&(r=r.getData(),t.getField()))switch(e=t.getFieldValue(r),void 0===e?"undefined":_typeof(e)){case"undefined":o="string";break;case"boolean":o="boolean";break;default:isNaN(e)||""===e?e.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)&&(o="alphanum"):o="number"}return this.sorters[o]},Sort.prototype.sort=function(t){var e=this,r=this.table.options.sortOrderReverse?e.sortList.slice().reverse():e.sortList,o=[],n=[];e.table.options.dataSorting&&e.table.options.dataSorting.call(e.table,e.getSort()),e.clearColumnHeaders(),e.table.options.ajaxSorting?r.forEach(function(t,r){e.setColumnHeader(t.column,t.dir)}):(r.forEach(function(t,r){var n=t.column.modules.sort;t.column&&n&&(n.sorter||(n.sorter=e.findSorter(t.column)),t.params="function"==typeof n.params?n.params(t.column.getComponent(),t.dir):n.params,o.push(t)),e.setColumnHeader(t.column,t.dir)}),o.length&&e._sortItems(t,o)),e.table.options.dataSorted&&(t.forEach(function(t){n.push(t.getComponent())}),e.table.options.dataSorted.call(e.table,e.getSort(),n))},Sort.prototype.clearColumnHeaders=function(){this.table.columnManager.getRealColumns().forEach(function(t){t.modules.sort&&(t.modules.sort.dir="none",t.getElement().setAttribute("aria-sort","none"))})},Sort.prototype.setColumnHeader=function(t,e){t.modules.sort.dir=e,t.getElement().setAttribute("aria-sort",e)},Sort.prototype._sortItems=function(t,e){var r=this,o=e.length-1;t.sort(function(t,n){for(var i,s=o;s>=0;s--){var a=e[s];if(0!==(i=r._sortRow(t,n,a.column,a.dir,a.params)))break}return i})},Sort.prototype._sortRow=function(t,e,r,o,n){var i,s,a="asc"==o?t:e,l="asc"==o?e:t;return t=r.getFieldValue(a.getData()),e=r.getFieldValue(l.getData()),t=void 0!==t?t:"",e=void 0!==e?e:"",i=a.getComponent(),s=l.getComponent(),r.modules.sort.sorter.call(this,t,e,i,s,r.getComponent(),o,n)},Sort.prototype.sorters={number:function(t,e,r,o,n,i,s){var a=s.alignEmptyValues,l=s.decimalSeparator||".",u=s.thousandSeparator||",",c=0;if(t=parseFloat(String(t).split(u).join("").split(l).join(".")),e=parseFloat(String(e).split(u).join("").split(l).join(".")),isNaN(t))c=isNaN(e)?0:-1;else{if(!isNaN(e))return t-e;c=1}return("top"===a&&"desc"===i||"bottom"===a&&"asc"===i)&&(c*=-1),c},string:function(t,e,r,o,n,i,s){var a,l=s.alignEmptyValues,u=0;if(t){if(e){switch(_typeof(s.locale)){case"boolean":s.locale&&(a=this.table.modules.localize.getLocale());break;case"string":a=s.locale}return String(t).toLowerCase().localeCompare(String(e).toLowerCase(),a)}u=1}else u=e?-1:0;return("top"===l&&"desc"===i||"bottom"===l&&"asc"===i)&&(u*=-1),u},date:function(t,e,r,o,n,i,s){return s.format||(s.format="DD/MM/YYYY"),this.sorters.datetime.call(this,t,e,r,o,n,i,s)},time:function(t,e,r,o,n,i,s){return s.format||(s.format="HH:mm"),this.sorters.datetime.call(this,t,e,r,o,n,i,s)},datetime:function(t,e,r,o,n,i,s){var a=s.format||"DD/MM/YYYY HH:mm:ss",l=s.alignEmptyValues,u=0;if("undefined"!=typeof moment){if(t=moment(t,a),e=moment(e,a),t.isValid()){if(e.isValid())return t-e;u=1}else u=e.isValid()?-1:0;return("top"===l&&"desc"===i||"bottom"===l&&"asc"===i)&&(u*=-1),u}console.error("Sort Error - 'datetime' sorter is dependant on moment.js")},boolean:function(t,e,r,o,n,i,s){return(!0===t||"true"===t||"True"===t||1===t?1:0)-(!0===e||"true"===e||"True"===e||1===e?1:0)},array:function(t,e,r,o,n,i,s){function a(t){switch(c){case"length":return t.length;case"sum":return t.reduce(function(t,e){return t+e});case"max":return Math.max.apply(null,t);case"min":return Math.min.apply(null,t);case"avg":return t.reduce(function(t,e){return t+e})/t.length}}var l=0,u=0,c=s.type||"length",d=s.alignEmptyValues,m=0;if(Array.isArray(t)){if(Array.isArray(e))return l=t?a(t):0,u=e?a(e):0,l-u;d=1}else d=Array.isArray(e)?-1:0;return("top"===d&&"desc"===i||"bottom"===d&&"asc"===i)&&(m*=-1),m},exists:function(t,e,r,o,n,i,s){return(void 0===t?0:1)-(void 0===e?0:1)},alphanum:function(t,e,r,o,n,i,s){var a,l,u,c,d,m=0,f=/(\d+)|(\D+)/g,p=/\d/,h=s.alignEmptyValues,g=0;if(t||0===t){if(e||0===e){if(isFinite(t)&&isFinite(e))return t-e;if(a=String(t).toLowerCase(),l=String(e).toLowerCase(),a===l)return 0;if(!p.test(a)||!p.test(l))return a>l?1:-1;for(a=a.match(f),l=l.match(f),d=a.length>l.length?l.length:a.length;mc?1:-1;return a.length>l.length}g=1}else g=e||0===e?-1:0;return("top"===h&&"desc"===i||"bottom"===h&&"asc"===i)&&(g*=-1),g}},Tabulator.prototype.registerModule("sort",Sort); \ No newline at end of file diff --git a/website/js/vendor/tabulator/js/tabulator.es2015.js b/website/js/vendor/tabulator/js/tabulator.es2015.js deleted file mode 100644 index 31daf6c..0000000 --- a/website/js/vendor/tabulator/js/tabulator.es2015.js +++ /dev/null @@ -1,23395 +0,0 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ - -'use strict'; - -// https://tc39.github.io/ecma262/#sec-array.prototype.findIndex - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -if (!Array.prototype.findIndex) { - - Object.defineProperty(Array.prototype, 'findIndex', { - - value: function value(predicate) { - - // 1. Let O be ? ToObject(this value). - - if (this == null) { - - throw new TypeError('"this" is null or not defined'); - } - - var o = Object(this); - - // 2. Let len be ? ToLength(? Get(O, "length")). - - var len = o.length >>> 0; - - // 3. If IsCallable(predicate) is false, throw a TypeError exception. - - if (typeof predicate !== 'function') { - - throw new TypeError('predicate must be a function'); - } - - // 4. If thisArg was supplied, let T be thisArg; else let T be undefined. - - var thisArg = arguments[1]; - - // 5. Let k be 0. - - var k = 0; - - // 6. Repeat, while k < len - - while (k < len) { - - // a. Let Pk be ! ToString(k). - - // b. Let kValue be ? Get(O, Pk). - - // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). - - // d. If testResult is true, return k. - - var kValue = o[k]; - - if (predicate.call(thisArg, kValue, k, o)) { - - return k; - } - - // e. Increase k by 1. - - k++; - } - - // 7. Return -1. - - return -1; - } - - }); -} - -// https://tc39.github.io/ecma262/#sec-array.prototype.find - -if (!Array.prototype.find) { - - Object.defineProperty(Array.prototype, 'find', { - - value: function value(predicate) { - - // 1. Let O be ? ToObject(this value). - - if (this == null) { - - throw new TypeError('"this" is null or not defined'); - } - - var o = Object(this); - - // 2. Let len be ? ToLength(? Get(O, "length")). - - var len = o.length >>> 0; - - // 3. If IsCallable(predicate) is false, throw a TypeError exception. - - if (typeof predicate !== 'function') { - - throw new TypeError('predicate must be a function'); - } - - // 4. If thisArg was supplied, let T be thisArg; else let T be undefined. - - var thisArg = arguments[1]; - - // 5. Let k be 0. - - var k = 0; - - // 6. Repeat, while k < len - - while (k < len) { - - // a. Let Pk be ! ToString(k). - - // b. Let kValue be ? Get(O, Pk). - - // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). - - // d. If testResult is true, return kValue. - - var kValue = o[k]; - - if (predicate.call(thisArg, kValue, k, o)) { - - return kValue; - } - - // e. Increase k by 1. - - k++; - } - - // 7. Return undefined. - - return undefined; - } - - }); -} - -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes#Polyfill - -if (!String.prototype.includes) { - - String.prototype.includes = function (search, start) { - - 'use strict'; - - if (search instanceof RegExp) { - - throw TypeError('first argument must not be a RegExp'); - } - - if (start === undefined) { - start = 0; - } - - return this.indexOf(search, start) !== -1; - }; -} - -// https://tc39.github.io/ecma262/#sec-array.prototype.includes - -if (!Array.prototype.includes) { - - Object.defineProperty(Array.prototype, 'includes', { - - value: function value(searchElement, fromIndex) { - - if (this == null) { - - throw new TypeError('"this" is null or not defined'); - } - - // 1. Let O be ? ToObject(this value). - - var o = Object(this); - - // 2. Let len be ? ToLength(? Get(O, "length")). - - var len = o.length >>> 0; - - // 3. If len is 0, return false. - - if (len === 0) { - - return false; - } - - // 4. Let n be ? ToInteger(fromIndex). - - // (If fromIndex is undefined, this step produces the value 0.) - - var n = fromIndex | 0; - - // 5. If n ≥ 0, then - - // a. Let k be n. - - // 6. Else n < 0, - - // a. Let k be len + n. - - // b. If k < 0, let k be 0. - - var k = Math.max(n >= 0 ? n : len - Math.abs(n), 0); - - function sameValueZero(x, y) { - - return x === y || typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y); - } - - // 7. Repeat, while k < len - - while (k < len) { - - // a. Let elementK be the result of ? Get(O, ! ToString(k)). - - // b. If SameValueZero(searchElement, elementK) is true, return true. - - if (sameValueZero(o[k], searchElement)) { - - return true; - } - - // c. Increase k by 1. - - k++; - } - - // 8. Return false - - return false; - } - - }); -} - -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Polyfill - -if (typeof Object.assign !== 'function') { - - // Must be writable: true, enumerable: false, configurable: true - - Object.defineProperty(Object, "assign", { - - value: function assign(target, varArgs) { - // .length of function is 2 - - 'use strict'; - - if (target === null || target === undefined) { - - throw new TypeError('Cannot convert undefined or null to object'); - } - - var to = Object(target); - - for (var index = 1; index < arguments.length; index++) { - - var nextSource = arguments[index]; - - if (nextSource !== null && nextSource !== undefined) { - - for (var nextKey in nextSource) { - - // Avoid bugs when hasOwnProperty is shadowed - - if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) { - - to[nextKey] = nextSource[nextKey]; - } - } - } - } - - return to; - }, - - writable: true, - - configurable: true - - }); -} - -var ColumnManager = function ColumnManager(table) { - - this.table = table; //hold parent table - - this.blockHozScrollEvent = false; - - this.headersElement = this.createHeadersElement(); - - this.element = this.createHeaderElement(); //containing element - - this.rowManager = null; //hold row manager object - - this.columns = []; // column definition object - - this.columnsByIndex = []; //columns by index - - this.columnsByField = {}; //columns by field - - this.scrollLeft = 0; - - this.element.insertBefore(this.headersElement, this.element.firstChild); -}; - -////////////// Setup Functions ///////////////// - - -ColumnManager.prototype.createHeadersElement = function () { - - var el = document.createElement("div"); - - el.classList.add("tabulator-headers"); - - return el; -}; - -ColumnManager.prototype.createHeaderElement = function () { - - var el = document.createElement("div"); - - el.classList.add("tabulator-header"); - - if (!this.table.options.headerVisible) { - - el.classList.add("tabulator-header-hidden"); - } - - return el; -}; - -ColumnManager.prototype.initialize = function () { - - var self = this; - - //scroll body along with header - - // self.element.addEventListener("scroll", function(e){ - - // if(!self.blockHozScrollEvent){ - - // self.table.rowManager.scrollHorizontal(self.element.scrollLeft); - - // } - - // }); -}; - -//link to row manager - -ColumnManager.prototype.setRowManager = function (manager) { - - this.rowManager = manager; -}; - -//return containing element - -ColumnManager.prototype.getElement = function () { - - return this.element; -}; - -//return header containing element - -ColumnManager.prototype.getHeadersElement = function () { - - return this.headersElement; -}; - -// ColumnManager.prototype.tempScrollBlock = function(){ - -// clearTimeout(this.blockHozScrollEvent); - -// this.blockHozScrollEvent = setTimeout(() => {this.blockHozScrollEvent = false;}, 50); - -// } - - -//scroll horizontally to match table body - -ColumnManager.prototype.scrollHorizontal = function (left) { - - var hozAdjust = 0, - scrollWidth = this.element.scrollWidth - this.table.element.clientWidth; - - // this.tempScrollBlock(); - - this.element.scrollLeft = left; - - //adjust for vertical scrollbar moving table when present - - if (left > scrollWidth) { - - hozAdjust = left - scrollWidth; - - this.element.style.marginLeft = -hozAdjust + "px"; - } else { - - this.element.style.marginLeft = 0; - } - - //keep frozen columns fixed in position - - //this._calcFrozenColumnsPos(hozAdjust + 3); - - - this.scrollLeft = left; - - if (this.table.modExists("frozenColumns")) { - - this.table.modules.frozenColumns.scrollHorizontal(); - } -}; - -///////////// Column Setup Functions ///////////// - - -ColumnManager.prototype.generateColumnsFromRowData = function (data) { - - var cols = [], - definitions = this.table.options.autoColumnsDefinitions, - row, - sorter; - - if (data && data.length) { - - row = data[0]; - - for (var key in row) { - - var col = { - - field: key, - - title: key - - }; - - var value = row[key]; - - switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { - - case "undefined": - - sorter = "string"; - - break; - - case "boolean": - - sorter = "boolean"; - - break; - - case "object": - - if (Array.isArray(value)) { - - sorter = "array"; - } else { - - sorter = "string"; - } - - break; - - default: - - if (!isNaN(value) && value !== "") { - - sorter = "number"; - } else { - - if (value.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)) { - - sorter = "alphanum"; - } else { - - sorter = "string"; - } - } - - break; - - } - - col.sorter = sorter; - - cols.push(col); - } - - if (definitions) { - - switch (typeof definitions === 'undefined' ? 'undefined' : _typeof(definitions)) { - - case "function": - - this.table.options.columns = definitions.call(this.table, cols); - - break; - - case "object": - - if (Array.isArray(definitions)) { - - cols.forEach(function (col) { - - var match = definitions.find(function (def) { - - return def.field === col.field; - }); - - if (match) { - - Object.assign(col, match); - } - }); - } else { - - cols.forEach(function (col) { - - if (definitions[col.field]) { - - Object.assign(col, definitions[col.field]); - } - }); - } - - this.table.options.columns = cols; - - break; - - } - } else { - - this.table.options.columns = cols; - } - - this.setColumns(this.table.options.columns); - } -}; - -ColumnManager.prototype.setColumns = function (cols, row) { - - var self = this; - - while (self.headersElement.firstChild) { - self.headersElement.removeChild(self.headersElement.firstChild); - }self.columns = []; - - self.columnsByIndex = []; - - self.columnsByField = {}; - - //reset frozen columns - - if (self.table.modExists("frozenColumns")) { - - self.table.modules.frozenColumns.reset(); - } - - cols.forEach(function (def, i) { - - self._addColumn(def); - }); - - self._reIndexColumns(); - - if (self.table.options.responsiveLayout && self.table.modExists("responsiveLayout", true)) { - - self.table.modules.responsiveLayout.initialize(); - } - - if (this.table.options.virtualDomHoz) { - - this.table.vdomHoz.reinitialize(false, true); - } - - self.redraw(true); -}; - -ColumnManager.prototype._addColumn = function (definition, before, nextToColumn) { - - var column = new Column(definition, this), - colEl = column.getElement(), - index = nextToColumn ? this.findColumnIndex(nextToColumn) : nextToColumn; - - if (nextToColumn && index > -1) { - - var parentIndex = this.columns.indexOf(nextToColumn.getTopColumn()); - - var nextEl = nextToColumn.getElement(); - - if (before) { - - this.columns.splice(parentIndex, 0, column); - - nextEl.parentNode.insertBefore(colEl, nextEl); - } else { - - this.columns.splice(parentIndex + 1, 0, column); - - nextEl.parentNode.insertBefore(colEl, nextEl.nextSibling); - } - } else { - - if (before) { - - this.columns.unshift(column); - - this.headersElement.insertBefore(column.getElement(), this.headersElement.firstChild); - } else { - - this.columns.push(column); - - this.headersElement.appendChild(column.getElement()); - } - - column.columnRendered(); - } - - return column; -}; - -ColumnManager.prototype.registerColumnField = function (col) { - - if (col.definition.field) { - - this.columnsByField[col.definition.field] = col; - } -}; - -ColumnManager.prototype.registerColumnPosition = function (col) { - - this.columnsByIndex.push(col); -}; - -ColumnManager.prototype._reIndexColumns = function () { - - this.columnsByIndex = []; - - this.columns.forEach(function (column) { - - column.reRegisterPosition(); - }); -}; - -//ensure column headers take up the correct amount of space in column groups - -ColumnManager.prototype._verticalAlignHeaders = function () { - - var self = this, - minHeight = 0; - - self.columns.forEach(function (column) { - - var height; - - column.clearVerticalAlign(); - - height = column.getHeight(); - - if (height > minHeight) { - - minHeight = height; - } - }); - - self.columns.forEach(function (column) { - - column.verticalAlign(self.table.options.columnHeaderVertAlign, minHeight); - }); - - self.rowManager.adjustTableSize(); -}; - -//////////////// Column Details ///////////////// - - -ColumnManager.prototype.findColumn = function (subject) { - - var self = this; - - if ((typeof subject === 'undefined' ? 'undefined' : _typeof(subject)) == "object") { - - if (subject instanceof Column) { - - //subject is column element - - return subject; - } else if (subject instanceof ColumnComponent) { - - //subject is public column component - - return subject._getSelf() || false; - } else if (typeof HTMLElement !== "undefined" && subject instanceof HTMLElement) { - - //subject is a HTML element of the column header - - var match = self.columns.find(function (column) { - - return column.element === subject; - }); - - return match || false; - } - } else { - - //subject should be treated as the field name of the column - - return this.columnsByField[subject] || false; - } - - //catch all for any other type of input - - - return false; -}; - -ColumnManager.prototype.getColumnByField = function (field) { - - return this.columnsByField[field]; -}; - -ColumnManager.prototype.getColumnsByFieldRoot = function (root) { - var _this = this; - - var matches = []; - - Object.keys(this.columnsByField).forEach(function (field) { - - var fieldRoot = field.split(".")[0]; - - if (fieldRoot === root) { - - matches.push(_this.columnsByField[field]); - } - }); - - return matches; -}; - -ColumnManager.prototype.getColumnByIndex = function (index) { - - return this.columnsByIndex[index]; -}; - -ColumnManager.prototype.getFirstVisibileColumn = function (index) { - - var index = this.columnsByIndex.findIndex(function (col) { - - return col.visible; - }); - - return index > -1 ? this.columnsByIndex[index] : false; -}; - -ColumnManager.prototype.getColumns = function () { - - return this.columns; -}; - -ColumnManager.prototype.findColumnIndex = function (column) { - - return this.columnsByIndex.findIndex(function (col) { - - return column === col; - }); -}; - -//return all columns that are not groups - -ColumnManager.prototype.getRealColumns = function () { - - return this.columnsByIndex; -}; - -//travers across columns and call action - -ColumnManager.prototype.traverse = function (callback) { - - var self = this; - - self.columnsByIndex.forEach(function (column, i) { - - callback(column, i); - }); -}; - -//get defintions of actual columns - -ColumnManager.prototype.getDefinitions = function (active) { - - var self = this, - output = []; - - self.columnsByIndex.forEach(function (column) { - - if (!active || active && column.visible) { - - output.push(column.getDefinition()); - } - }); - - return output; -}; - -//get full nested definition tree - -ColumnManager.prototype.getDefinitionTree = function () { - - var self = this, - output = []; - - self.columns.forEach(function (column) { - - output.push(column.getDefinition(true)); - }); - - return output; -}; - -ColumnManager.prototype.getComponents = function (structured) { - - var self = this, - output = [], - columns = structured ? self.columns : self.columnsByIndex; - - columns.forEach(function (column) { - - output.push(column.getComponent()); - }); - - return output; -}; - -ColumnManager.prototype.getWidth = function () { - - var width = 0; - - this.columnsByIndex.forEach(function (column) { - - if (column.visible) { - - width += column.getWidth(); - } - }); - - return width; -}; - -ColumnManager.prototype.moveColumn = function (from, to, after) { - - this.moveColumnActual(from, to, after); - - if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.initialize(); - } - - if (this.table.modExists("columnCalcs")) { - - this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); - } - - to.element.parentNode.insertBefore(from.element, to.element); - - if (after) { - - to.element.parentNode.insertBefore(to.element, from.element); - } - - this._verticalAlignHeaders(); - - this.table.rowManager.reinitialize(); -}; - -ColumnManager.prototype.moveColumnActual = function (from, to, after) { - - if (from.parent.isGroup) { - - this._moveColumnInArray(from.parent.columns, from, to, after); - } else { - - this._moveColumnInArray(this.columns, from, to, after); - } - - this._moveColumnInArray(this.columnsByIndex, from, to, after, true); - - if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.initialize(); - } - - if (this.table.options.virtualDomHoz) { - - this.table.vdomHoz.reinitialize(true); - } - - if (this.table.options.columnMoved) { - - this.table.options.columnMoved.call(this.table, from.getComponent(), this.table.columnManager.getComponents()); - } - - if (this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.columns) { - - this.table.modules.persistence.save("columns"); - } -}; - -ColumnManager.prototype._moveColumnInArray = function (columns, from, to, after, updateRows) { - var _this2 = this; - - var fromIndex = columns.indexOf(from), - toIndex, - rows = []; - - if (fromIndex > -1) { - - columns.splice(fromIndex, 1); - - toIndex = columns.indexOf(to); - - if (toIndex > -1) { - - if (after) { - - toIndex = toIndex + 1; - } - } else { - - toIndex = fromIndex; - } - - columns.splice(toIndex, 0, from); - - if (updateRows) { - - if (this.table.options.dataTree && this.table.modExists("dataTree", true)) { - - this.table.rowManager.rows.forEach(function (row) { - - rows = rows.concat(_this2.table.modules.dataTree.getTreeChildren(row, false, true)); - }); - } - - rows = rows.concat(this.table.rowManager.rows); - - rows.forEach(function (row) { - - if (row.cells.length) { - - var cell = row.cells.splice(fromIndex, 1)[0]; - - row.cells.splice(toIndex, 0, cell); - } - }); - } - } -}; - -ColumnManager.prototype.scrollToColumn = function (column, position, ifVisible) { - var _this3 = this; - - var left = 0, - offset = 0, - adjust = 0, - colEl = column.getElement(); - - return new Promise(function (resolve, reject) { - - if (typeof position === "undefined") { - - position = _this3.table.options.scrollToColumnPosition; - } - - if (typeof ifVisible === "undefined") { - - ifVisible = _this3.table.options.scrollToColumnIfVisible; - } - - if (column.visible) { - - //align to correct position - - switch (position) { - - case "middle": - - case "center": - - adjust = -_this3.element.clientWidth / 2; - - break; - - case "right": - - adjust = colEl.clientWidth - _this3.headersElement.clientWidth; - - break; - - } - - //check column visibility - - if (!ifVisible) { - - offset = colEl.offsetLeft; - - if (offset > 0 && offset + colEl.offsetWidth < _this3.element.clientWidth) { - - return false; - } - } - - //calculate scroll position - - left = colEl.offsetLeft + adjust; - - left = Math.max(Math.min(left, _this3.table.rowManager.element.scrollWidth - _this3.table.rowManager.element.clientWidth), 0); - - _this3.table.rowManager.scrollHorizontal(left); - - _this3.scrollHorizontal(left); - - resolve(); - } else { - - console.warn("Scroll Error - Column not visible"); - - reject("Scroll Error - Column not visible"); - } - }); -}; - -//////////////// Cell Management ///////////////// - - -ColumnManager.prototype.generateCells = function (row) { - - var self = this; - - var cells = []; - - self.columnsByIndex.forEach(function (column) { - - cells.push(column.generateCell(row)); - }); - - return cells; -}; - -//////////////// Column Management ///////////////// - - -ColumnManager.prototype.getFlexBaseWidth = function () { - - var self = this, - totalWidth = self.table.element.clientWidth, - //table element width - - fixedWidth = 0; - - //adjust for vertical scrollbar if present - - if (self.rowManager.element.scrollHeight > self.rowManager.element.clientHeight) { - - totalWidth -= self.rowManager.element.offsetWidth - self.rowManager.element.clientWidth; - } - - this.columnsByIndex.forEach(function (column) { - - var width, minWidth, colWidth; - - if (column.visible) { - - width = column.definition.width || 0; - - minWidth = typeof column.minWidth == "undefined" ? self.table.options.columnMinWidth : parseInt(column.minWidth); - - if (typeof width == "string") { - - if (width.indexOf("%") > -1) { - - colWidth = totalWidth / 100 * parseInt(width); - } else { - - colWidth = parseInt(width); - } - } else { - - colWidth = width; - } - - fixedWidth += colWidth > minWidth ? colWidth : minWidth; - } - }); - - return fixedWidth; -}; - -ColumnManager.prototype.addColumn = function (definition, before, nextToColumn) { - var _this4 = this; - - return new Promise(function (resolve, reject) { - - var column = _this4._addColumn(definition, before, nextToColumn); - - _this4._reIndexColumns(); - - if (_this4.table.options.responsiveLayout && _this4.table.modExists("responsiveLayout", true)) { - - _this4.table.modules.responsiveLayout.initialize(); - } - - if (_this4.table.modExists("columnCalcs")) { - - _this4.table.modules.columnCalcs.recalc(_this4.table.rowManager.activeRows); - } - - _this4.redraw(); - - if (_this4.table.modules.layout.getMode() != "fitColumns") { - - column.reinitializeWidth(); - } - - _this4._verticalAlignHeaders(); - - _this4.table.rowManager.reinitialize(); - - if (_this4.table.options.virtualDomHoz) { - - _this4.table.vdomHoz.reinitialize(); - } - - resolve(column); - }); -}; - -//remove column from system - -ColumnManager.prototype.deregisterColumn = function (column) { - - var field = column.getField(), - index; - - //remove from field list - - if (field) { - - delete this.columnsByField[field]; - } - - //remove from index list - - index = this.columnsByIndex.indexOf(column); - - if (index > -1) { - - this.columnsByIndex.splice(index, 1); - } - - //remove from column list - - index = this.columns.indexOf(column); - - if (index > -1) { - - this.columns.splice(index, 1); - } - - if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.initialize(); - } - - this._verticalAlignHeaders(); - - this.redraw(); -}; - -//redraw columns - -ColumnManager.prototype.redraw = function (force) { - - if (force) { - - if (Tabulator.prototype.helpers.elVisible(this.element)) { - - this._verticalAlignHeaders(); - } - - this.table.rowManager.resetScroll(); - - this.table.rowManager.reinitialize(); - } - - if (["fitColumns", "fitDataStretch"].indexOf(this.table.modules.layout.getMode()) > -1) { - - this.table.modules.layout.layout(); - } else { - - if (force) { - - this.table.modules.layout.layout(); - } else { - - if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.update(); - } - } - } - - if (this.table.modExists("frozenColumns")) { - - this.table.modules.frozenColumns.layout(); - } - - if (this.table.modExists("columnCalcs")) { - - this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); - } - - if (force) { - - if (this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.columns) { - - this.table.modules.persistence.save("columns"); - } - - if (this.table.modExists("columnCalcs")) { - - this.table.modules.columnCalcs.redraw(); - } - } - - this.table.footerManager.redraw(); -}; - -//public column object -var ColumnComponent = function ColumnComponent(column) { - this._column = column; - this.type = "ColumnComponent"; -}; - -ColumnComponent.prototype.getElement = function () { - return this._column.getElement(); -}; - -ColumnComponent.prototype.getDefinition = function () { - return this._column.getDefinition(); -}; - -ColumnComponent.prototype.getField = function () { - return this._column.getField(); -}; - -ColumnComponent.prototype.getCells = function () { - var cells = []; - - this._column.cells.forEach(function (cell) { - cells.push(cell.getComponent()); - }); - - return cells; -}; - -ColumnComponent.prototype.getVisibility = function () { - console.warn("getVisibility function is deprecated, you should now use the isVisible function"); - return this._column.visible; -}; - -ColumnComponent.prototype.isVisible = function () { - return this._column.visible; -}; - -ColumnComponent.prototype.show = function () { - if (this._column.isGroup) { - this._column.columns.forEach(function (column) { - column.show(); - }); - } else { - this._column.show(); - } -}; - -ColumnComponent.prototype.hide = function () { - if (this._column.isGroup) { - this._column.columns.forEach(function (column) { - column.hide(); - }); - } else { - this._column.hide(); - } -}; - -ColumnComponent.prototype.toggle = function () { - if (this._column.visible) { - this.hide(); - } else { - this.show(); - } -}; - -ColumnComponent.prototype.delete = function () { - return this._column.delete(); -}; - -ColumnComponent.prototype.getSubColumns = function () { - var output = []; - - if (this._column.columns.length) { - this._column.columns.forEach(function (column) { - output.push(column.getComponent()); - }); - } - - return output; -}; - -ColumnComponent.prototype.getParentColumn = function () { - return this._column.parent instanceof Column ? this._column.parent.getComponent() : false; -}; - -ColumnComponent.prototype._getSelf = function () { - return this._column; -}; - -ColumnComponent.prototype.scrollTo = function () { - return this._column.table.columnManager.scrollToColumn(this._column); -}; - -ColumnComponent.prototype.getTable = function () { - return this._column.table; -}; - -ColumnComponent.prototype.headerFilterFocus = function () { - if (this._column.table.modExists("filter", true)) { - this._column.table.modules.filter.setHeaderFilterFocus(this._column); - } -}; - -ColumnComponent.prototype.reloadHeaderFilter = function () { - if (this._column.table.modExists("filter", true)) { - this._column.table.modules.filter.reloadHeaderFilter(this._column); - } -}; - -ColumnComponent.prototype.getHeaderFilterValue = function () { - if (this._column.table.modExists("filter", true)) { - return this._column.table.modules.filter.getHeaderFilterValue(this._column); - } -}; - -ColumnComponent.prototype.setHeaderFilterValue = function (value) { - if (this._column.table.modExists("filter", true)) { - this._column.table.modules.filter.setHeaderFilterValue(this._column, value); - } -}; - -ColumnComponent.prototype.move = function (to, after) { - var toColumn = this._column.table.columnManager.findColumn(to); - - if (toColumn) { - this._column.table.columnManager.moveColumn(this._column, toColumn, after); - } else { - console.warn("Move Error - No matching column found:", toColumn); - } -}; - -ColumnComponent.prototype.getNextColumn = function () { - var nextCol = this._column.nextColumn(); - - return nextCol ? nextCol.getComponent() : false; -}; - -ColumnComponent.prototype.getPrevColumn = function () { - var prevCol = this._column.prevColumn(); - - return prevCol ? prevCol.getComponent() : false; -}; - -ColumnComponent.prototype.updateDefinition = function (updates) { - return this._column.updateDefinition(updates); -}; - -ColumnComponent.prototype.getWidth = function () { - return this._column.getWidth(); -}; - -ColumnComponent.prototype.setWidth = function (width) { - var result; - - if (width === true) { - result = this._column.reinitializeWidth(true); - } else { - result = this._column.setWidth(width); - } - - if (this._column.table.options.virtualDomHoz) { - this._column.table.vdomHoz.reinitialize(true); - } - - return result; -}; - -ColumnComponent.prototype.validate = function () { - return this._column.validate(); -}; - -var Column = function Column(def, parent) { - var self = this; - - this.table = parent.table; - this.definition = def; //column definition - this.parent = parent; //hold parent object - this.type = "column"; //type of element - this.columns = []; //child columns - this.cells = []; //cells bound to this column - this.element = this.createElement(); //column header element - this.contentElement = false; - this.titleHolderElement = false; - this.titleElement = false; - this.groupElement = this.createGroupElement(); //column group holder element - this.isGroup = false; - this.tooltip = false; //hold column tooltip - this.hozAlign = ""; //horizontal text alignment - this.vertAlign = ""; //vert text alignment - - //multi dimensional filed handling - this.field = ""; - this.fieldStructure = ""; - this.getFieldValue = ""; - this.setFieldValue = ""; - - this.titleFormatterRendered = false; - - this.setField(this.definition.field); - - if (this.table.options.invalidOptionWarnings) { - this.checkDefinition(); - } - - this.modules = {}; //hold module variables; - - this.cellEvents = { - cellClick: false, - cellDblClick: false, - cellContext: false, - cellTap: false, - cellDblTap: false, - cellTapHold: false, - cellMouseEnter: false, - cellMouseLeave: false, - cellMouseOver: false, - cellMouseOut: false, - cellMouseMove: false - }; - - this.width = null; //column width - this.widthStyled = ""; //column width prestyled to improve render efficiency - this.minWidth = null; //column minimum width - this.minWidthStyled = ""; //column minimum prestyled to improve render efficiency - this.widthFixed = false; //user has specified a width for this column - - this.visible = true; //default visible state - - this.component = null; - - this._mapDepricatedFunctionality(); - - //initialize column - if (def.columns) { - - this.isGroup = true; - - def.columns.forEach(function (def, i) { - var newCol = new Column(def, self); - self.attachColumn(newCol); - }); - - self.checkColumnVisibility(); - } else { - parent.registerColumnField(this); - } - - if (def.rowHandle && this.table.options.movableRows !== false && this.table.modExists("moveRow")) { - this.table.modules.moveRow.setHandle(true); - } - - this._buildHeader(); - - this.bindModuleColumns(); -}; - -Column.prototype.createElement = function () { - var el = document.createElement("div"); - - el.classList.add("tabulator-col"); - el.setAttribute("role", "columnheader"); - el.setAttribute("aria-sort", "none"); - - return el; -}; - -Column.prototype.createGroupElement = function () { - var el = document.createElement("div"); - - el.classList.add("tabulator-col-group-cols"); - - return el; -}; - -Column.prototype.checkDefinition = function () { - var _this5 = this; - - Object.keys(this.definition).forEach(function (key) { - if (_this5.defaultOptionList.indexOf(key) === -1) { - console.warn("Invalid column definition option in '" + (_this5.field || _this5.definition.title) + "' column:", key); - } - }); -}; - -Column.prototype.setField = function (field) { - this.field = field; - this.fieldStructure = field ? this.table.options.nestedFieldSeparator ? field.split(this.table.options.nestedFieldSeparator) : [field] : []; - this.getFieldValue = this.fieldStructure.length > 1 ? this._getNestedData : this._getFlatData; - this.setFieldValue = this.fieldStructure.length > 1 ? this._setNestedData : this._setFlatData; -}; - -//register column position with column manager -Column.prototype.registerColumnPosition = function (column) { - this.parent.registerColumnPosition(column); -}; - -//register column position with column manager -Column.prototype.registerColumnField = function (column) { - this.parent.registerColumnField(column); -}; - -//trigger position registration -Column.prototype.reRegisterPosition = function () { - if (this.isGroup) { - this.columns.forEach(function (column) { - column.reRegisterPosition(); - }); - } else { - this.registerColumnPosition(this); - } -}; - -Column.prototype._mapDepricatedFunctionality = function () { - if (typeof this.definition.hideInHtml !== "undefined") { - this.definition.htmlOutput = !this.definition.hideInHtml; - console.warn("hideInHtml column definition property is deprecated, you should now use htmlOutput"); - } - - if (typeof this.definition.align !== "undefined") { - this.definition.hozAlign = this.definition.align; - console.warn("align column definition property is deprecated, you should now use hozAlign"); - } - - if (typeof this.definition.downloadTitle !== "undefined") { - this.definition.titleDownload = this.definition.downloadTitle; - console.warn("downloadTitle definition property is deprecated, you should now use titleDownload"); - } -}; - -Column.prototype.setTooltip = function () { - var self = this, - def = self.definition; - - //set header tooltips - var tooltip = def.headerTooltip || def.tooltip === false ? def.headerTooltip : self.table.options.tooltipsHeader; - - if (tooltip) { - if (tooltip === true) { - if (def.field) { - self.table.modules.localize.bind("columns|" + def.field, function (value) { - self.element.setAttribute("title", value || def.title); - }); - } else { - self.element.setAttribute("title", def.title); - } - } else { - if (typeof tooltip == "function") { - tooltip = tooltip(self.getComponent()); - - if (tooltip === false) { - tooltip = ""; - } - } - - self.element.setAttribute("title", tooltip); - } - } else { - self.element.setAttribute("title", ""); - } -}; - -//build header element -Column.prototype._buildHeader = function () { - var self = this, - def = self.definition; - - while (self.element.firstChild) { - self.element.removeChild(self.element.firstChild); - }if (def.headerVertical) { - self.element.classList.add("tabulator-col-vertical"); - - if (def.headerVertical === "flip") { - self.element.classList.add("tabulator-col-vertical-flip"); - } - } - - self.contentElement = self._bindEvents(); - - self.contentElement = self._buildColumnHeaderContent(); - - self.element.appendChild(self.contentElement); - - if (self.isGroup) { - self._buildGroupHeader(); - } else { - self._buildColumnHeader(); - } - - self.setTooltip(); - - //set resizable handles - if (self.table.options.resizableColumns && self.table.modExists("resizeColumns")) { - self.table.modules.resizeColumns.initializeColumn("header", self, self.element); - } - - //set resizable handles - if (def.headerFilter && self.table.modExists("filter") && self.table.modExists("edit")) { - if (typeof def.headerFilterPlaceholder !== "undefined" && def.field) { - self.table.modules.localize.setHeaderFilterColumnPlaceholder(def.field, def.headerFilterPlaceholder); - } - - self.table.modules.filter.initializeColumn(self); - } - - //set resizable handles - if (self.table.modExists("frozenColumns")) { - self.table.modules.frozenColumns.initializeColumn(self); - } - - //set movable column - if (self.table.options.movableColumns && !self.isGroup && self.table.modExists("moveColumn")) { - self.table.modules.moveColumn.initializeColumn(self); - } - - //set calcs column - if ((def.topCalc || def.bottomCalc) && self.table.modExists("columnCalcs")) { - self.table.modules.columnCalcs.initializeColumn(self); - } - - //handle persistence - if (self.table.modExists("persistence") && self.table.modules.persistence.config.columns) { - self.table.modules.persistence.initializeColumn(self); - } - - //update header tooltip on mouse enter - self.element.addEventListener("mouseenter", function (e) { - self.setTooltip(); - }); -}; - -Column.prototype._bindEvents = function () { - - var self = this, - def = self.definition, - dblTap, - tapHold, - tap; - - //setup header click event bindings - if (typeof def.headerClick == "function") { - self.element.addEventListener("click", function (e) { - def.headerClick(e, self.getComponent()); - }); - } - - if (typeof def.headerDblClick == "function") { - self.element.addEventListener("dblclick", function (e) { - def.headerDblClick(e, self.getComponent()); - }); - } - - if (typeof def.headerContext == "function") { - self.element.addEventListener("contextmenu", function (e) { - def.headerContext(e, self.getComponent()); - }); - } - - //setup header tap event bindings - if (typeof def.headerTap == "function") { - tap = false; - - self.element.addEventListener("touchstart", function (e) { - tap = true; - }, { passive: true }); - - self.element.addEventListener("touchend", function (e) { - if (tap) { - def.headerTap(e, self.getComponent()); - } - - tap = false; - }); - } - - if (typeof def.headerDblTap == "function") { - dblTap = null; - - self.element.addEventListener("touchend", function (e) { - - if (dblTap) { - clearTimeout(dblTap); - dblTap = null; - - def.headerDblTap(e, self.getComponent()); - } else { - - dblTap = setTimeout(function () { - clearTimeout(dblTap); - dblTap = null; - }, 300); - } - }); - } - - if (typeof def.headerTapHold == "function") { - tapHold = null; - - self.element.addEventListener("touchstart", function (e) { - clearTimeout(tapHold); - - tapHold = setTimeout(function () { - clearTimeout(tapHold); - tapHold = null; - tap = false; - def.headerTapHold(e, self.getComponent()); - }, 1000); - }, { passive: true }); - - self.element.addEventListener("touchend", function (e) { - clearTimeout(tapHold); - tapHold = null; - }); - } - - //store column cell click event bindings - if (typeof def.cellClick == "function") { - self.cellEvents.cellClick = def.cellClick; - } - - if (typeof def.cellDblClick == "function") { - self.cellEvents.cellDblClick = def.cellDblClick; - } - - if (typeof def.cellContext == "function") { - self.cellEvents.cellContext = def.cellContext; - } - - //store column mouse event bindings - if (typeof def.cellMouseEnter == "function") { - self.cellEvents.cellMouseEnter = def.cellMouseEnter; - } - - if (typeof def.cellMouseLeave == "function") { - self.cellEvents.cellMouseLeave = def.cellMouseLeave; - } - - if (typeof def.cellMouseOver == "function") { - self.cellEvents.cellMouseOver = def.cellMouseOver; - } - - if (typeof def.cellMouseOut == "function") { - self.cellEvents.cellMouseOut = def.cellMouseOut; - } - - if (typeof def.cellMouseMove == "function") { - self.cellEvents.cellMouseMove = def.cellMouseMove; - } - - //setup column cell tap event bindings - if (typeof def.cellTap == "function") { - self.cellEvents.cellTap = def.cellTap; - } - - if (typeof def.cellDblTap == "function") { - self.cellEvents.cellDblTap = def.cellDblTap; - } - - if (typeof def.cellTapHold == "function") { - self.cellEvents.cellTapHold = def.cellTapHold; - } - - //setup column cell edit callbacks - if (typeof def.cellEdited == "function") { - self.cellEvents.cellEdited = def.cellEdited; - } - - if (typeof def.cellEditing == "function") { - self.cellEvents.cellEditing = def.cellEditing; - } - - if (typeof def.cellEditCancelled == "function") { - self.cellEvents.cellEditCancelled = def.cellEditCancelled; - } -}; - -//build header element for header -Column.prototype._buildColumnHeader = function () { - var _this6 = this; - - var def = this.definition, - table = this.table, - sortable; - - //set column sorter - if (table.modExists("sort")) { - table.modules.sort.initializeColumn(this, this.titleHolderElement); - } - - //set column header context menu - if ((def.headerContextMenu || def.headerClickMenu || def.headerMenu) && table.modExists("menu")) { - table.modules.menu.initializeColumnHeader(this); - } - - //set column formatter - if (table.modExists("format")) { - table.modules.format.initializeColumn(this); - } - - //set column editor - if (typeof def.editor != "undefined" && table.modExists("edit")) { - table.modules.edit.initializeColumn(this); - } - - //set colum validator - if (typeof def.validator != "undefined" && table.modExists("validate")) { - table.modules.validate.initializeColumn(this); - } - - //set column mutator - if (table.modExists("mutator")) { - table.modules.mutator.initializeColumn(this); - } - - //set column accessor - if (table.modExists("accessor")) { - table.modules.accessor.initializeColumn(this); - } - - //set respoviveLayout - if (_typeof(table.options.responsiveLayout) && table.modExists("responsiveLayout")) { - table.modules.responsiveLayout.initializeColumn(this); - } - - //set column visibility - if (typeof def.visible != "undefined") { - if (def.visible) { - this.show(true); - } else { - this.hide(true); - } - } - - //asign additional css classes to column header - if (def.cssClass) { - var classeNames = def.cssClass.split(" "); - classeNames.forEach(function (className) { - _this6.element.classList.add(className); - }); - } - - if (def.field) { - this.element.setAttribute("tabulator-field", def.field); - } - - //set min width if present - this.setMinWidth(typeof def.minWidth == "undefined" ? this.table.options.columnMinWidth : parseInt(def.minWidth)); - - this.reinitializeWidth(); - - //set tooltip if present - this.tooltip = this.definition.tooltip || this.definition.tooltip === false ? this.definition.tooltip : this.table.options.tooltips; - - //set orizontal text alignment - this.hozAlign = typeof this.definition.hozAlign == "undefined" ? this.table.options.cellHozAlign : this.definition.hozAlign; - this.vertAlign = typeof this.definition.vertAlign == "undefined" ? this.table.options.cellVertAlign : this.definition.vertAlign; - - this.titleElement.style.textAlign = this.definition.headerHozAlign || this.table.options.headerHozAlign; -}; - -Column.prototype._buildColumnHeaderContent = function () { - var def = this.definition, - table = this.table; - - var contentElement = document.createElement("div"); - contentElement.classList.add("tabulator-col-content"); - - this.titleHolderElement = document.createElement("div"); - this.titleHolderElement.classList.add("tabulator-col-title-holder"); - - contentElement.appendChild(this.titleHolderElement); - - this.titleElement = this._buildColumnHeaderTitle(); - - this.titleHolderElement.appendChild(this.titleElement); - - return contentElement; -}; - -//build title element of column -Column.prototype._buildColumnHeaderTitle = function () { - var self = this, - def = self.definition, - table = self.table, - title; - - var titleHolderElement = document.createElement("div"); - titleHolderElement.classList.add("tabulator-col-title"); - - if (def.editableTitle) { - var titleElement = document.createElement("input"); - titleElement.classList.add("tabulator-title-editor"); - - titleElement.addEventListener("click", function (e) { - e.stopPropagation(); - titleElement.focus(); - }); - - titleElement.addEventListener("change", function () { - def.title = titleElement.value; - table.options.columnTitleChanged.call(self.table, self.getComponent()); - }); - - titleHolderElement.appendChild(titleElement); - - if (def.field) { - table.modules.localize.bind("columns|" + def.field, function (text) { - titleElement.value = text || def.title || " "; - }); - } else { - titleElement.value = def.title || " "; - } - } else { - if (def.field) { - table.modules.localize.bind("columns|" + def.field, function (text) { - self._formatColumnHeaderTitle(titleHolderElement, text || def.title || " "); - }); - } else { - self._formatColumnHeaderTitle(titleHolderElement, def.title || " "); - } - } - - return titleHolderElement; -}; - -Column.prototype._formatColumnHeaderTitle = function (el, title) { - var _this7 = this; - - var formatter, contents, params, mockCell, onRendered; - - if (this.definition.titleFormatter && this.table.modExists("format")) { - - formatter = this.table.modules.format.getFormatter(this.definition.titleFormatter); - - onRendered = function onRendered(callback) { - _this7.titleFormatterRendered = callback; - }; - - mockCell = { - getValue: function getValue() { - return title; - }, - getElement: function getElement() { - return el; - } - }; - - params = this.definition.titleFormatterParams || {}; - - params = typeof params === "function" ? params() : params; - - contents = formatter.call(this.table.modules.format, mockCell, params, onRendered); - - switch (typeof contents === 'undefined' ? 'undefined' : _typeof(contents)) { - case "object": - if (contents instanceof Node) { - el.appendChild(contents); - } else { - el.innerHTML = ""; - console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:", contents); - } - break; - case "undefined": - case "null": - el.innerHTML = ""; - break; - default: - el.innerHTML = contents; - } - } else { - el.innerHTML = title; - } -}; - -//build header element for column group -Column.prototype._buildGroupHeader = function () { - var _this8 = this; - - this.element.classList.add("tabulator-col-group"); - this.element.setAttribute("role", "columngroup"); - this.element.setAttribute("aria-title", this.definition.title); - - //asign additional css classes to column header - if (this.definition.cssClass) { - var classeNames = this.definition.cssClass.split(" "); - classeNames.forEach(function (className) { - _this8.element.classList.add(className); - }); - } - - //set column header context menu - if ((this.definition.headerContextMenu || this.definition.headerMenu) && this.table.modExists("menu")) { - this.table.modules.menu.initializeColumnHeader(this); - } - - this.element.appendChild(this.groupElement); -}; - -//flat field lookup -Column.prototype._getFlatData = function (data) { - return data[this.field]; -}; - -//nested field lookup -Column.prototype._getNestedData = function (data) { - var dataObj = data, - structure = this.fieldStructure, - length = structure.length, - output; - - for (var _i = 0; _i < length; _i++) { - - dataObj = dataObj[structure[_i]]; - - output = dataObj; - - if (!dataObj) { - break; - } - } - - return output; -}; - -//flat field set -Column.prototype._setFlatData = function (data, value) { - if (this.field) { - data[this.field] = value; - } -}; - -//nested field set -Column.prototype._setNestedData = function (data, value) { - var dataObj = data, - structure = this.fieldStructure, - length = structure.length; - - for (var _i2 = 0; _i2 < length; _i2++) { - - if (_i2 == length - 1) { - dataObj[structure[_i2]] = value; - } else { - if (!dataObj[structure[_i2]]) { - if (typeof value !== "undefined") { - dataObj[structure[_i2]] = {}; - } else { - break; - } - } - - dataObj = dataObj[structure[_i2]]; - } - } -}; - -//attach column to this group -Column.prototype.attachColumn = function (column) { - var self = this; - - if (self.groupElement) { - self.columns.push(column); - self.groupElement.appendChild(column.getElement()); - } else { - console.warn("Column Warning - Column being attached to another column instead of column group"); - } -}; - -//vertically align header in column -Column.prototype.verticalAlign = function (alignment, height) { - - //calculate height of column header and group holder element - var parentHeight = this.parent.isGroup ? this.parent.getGroupElement().clientHeight : height || this.parent.getHeadersElement().clientHeight; - // var parentHeight = this.parent.isGroup ? this.parent.getGroupElement().clientHeight : this.parent.getHeadersElement().clientHeight; - - this.element.style.height = parentHeight + "px"; - - if (this.isGroup) { - this.groupElement.style.minHeight = parentHeight - this.contentElement.offsetHeight + "px"; - } - - //vertically align cell contents - if (!this.isGroup && alignment !== "top") { - if (alignment === "bottom") { - this.element.style.paddingTop = this.element.clientHeight - this.contentElement.offsetHeight + "px"; - } else { - this.element.style.paddingTop = (this.element.clientHeight - this.contentElement.offsetHeight) / 2 + "px"; - } - } - - this.columns.forEach(function (column) { - column.verticalAlign(alignment); - }); -}; - -//clear vertical alignmenet -Column.prototype.clearVerticalAlign = function () { - this.element.style.paddingTop = ""; - this.element.style.height = ""; - this.element.style.minHeight = ""; - this.groupElement.style.minHeight = ""; - - this.columns.forEach(function (column) { - column.clearVerticalAlign(); - }); -}; - -Column.prototype.bindModuleColumns = function () { - //check if rownum formatter is being used on a column - if (this.definition.formatter == "rownum") { - this.table.rowManager.rowNumColumn = this; - } -}; - -//// Retreive Column Information //// - -//return column header element -Column.prototype.getElement = function () { - return this.element; -}; - -//return colunm group element -Column.prototype.getGroupElement = function () { - return this.groupElement; -}; - -//return field name -Column.prototype.getField = function () { - return this.field; -}; - -//return the first column in a group -Column.prototype.getFirstColumn = function () { - if (!this.isGroup) { - return this; - } else { - if (this.columns.length) { - return this.columns[0].getFirstColumn(); - } else { - return false; - } - } -}; - -//return the last column in a group -Column.prototype.getLastColumn = function () { - if (!this.isGroup) { - return this; - } else { - if (this.columns.length) { - return this.columns[this.columns.length - 1].getLastColumn(); - } else { - return false; - } - } -}; - -//return all columns in a group -Column.prototype.getColumns = function () { - return this.columns; -}; - -//return all columns in a group -Column.prototype.getCells = function () { - return this.cells; -}; - -//retreive the top column in a group of columns -Column.prototype.getTopColumn = function () { - if (this.parent.isGroup) { - return this.parent.getTopColumn(); - } else { - return this; - } -}; - -//return column definition object -Column.prototype.getDefinition = function (updateBranches) { - var colDefs = []; - - if (this.isGroup && updateBranches) { - this.columns.forEach(function (column) { - colDefs.push(column.getDefinition(true)); - }); - - this.definition.columns = colDefs; - } - - return this.definition; -}; - -//////////////////// Actions //////////////////// - -Column.prototype.checkColumnVisibility = function () { - var visible = false; - - this.columns.forEach(function (column) { - if (column.visible) { - visible = true; - } - }); - - if (visible) { - this.show(); - this.parent.table.options.columnVisibilityChanged.call(this.table, this.getComponent(), false); - } else { - this.hide(); - } -}; - -//show column -Column.prototype.show = function (silent, responsiveToggle) { - if (!this.visible) { - this.visible = true; - - this.element.style.display = ""; - - if (this.parent.isGroup) { - this.parent.checkColumnVisibility(); - } - - this.cells.forEach(function (cell) { - cell.show(); - }); - - if (!this.isGroup && this.width === null) { - this.reinitializeWidth(); - } - - this.table.columnManager._verticalAlignHeaders(); - - if (this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.columns) { - this.table.modules.persistence.save("columns"); - } - - if (!responsiveToggle && this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - this.table.modules.responsiveLayout.updateColumnVisibility(this, this.visible); - } - - if (!silent) { - this.table.options.columnVisibilityChanged.call(this.table, this.getComponent(), true); - } - - if (this.parent.isGroup) { - this.parent.matchChildWidths(); - } - } -}; - -//hide column -Column.prototype.hide = function (silent, responsiveToggle) { - if (this.visible) { - this.visible = false; - - this.element.style.display = "none"; - - this.table.columnManager._verticalAlignHeaders(); - - if (this.parent.isGroup) { - this.parent.checkColumnVisibility(); - } - - this.cells.forEach(function (cell) { - cell.hide(); - }); - - if (this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.columns) { - this.table.modules.persistence.save("columns"); - } - - if (!responsiveToggle && this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - this.table.modules.responsiveLayout.updateColumnVisibility(this, this.visible); - } - - if (!silent) { - this.table.options.columnVisibilityChanged.call(this.table, this.getComponent(), false); - } - - if (this.parent.isGroup) { - this.parent.matchChildWidths(); - } - } -}; - -Column.prototype.matchChildWidths = function () { - var childWidth = 0; - - if (this.contentElement && this.columns.length) { - this.columns.forEach(function (column) { - if (column.visible) { - childWidth += column.getWidth(); - } - }); - - this.contentElement.style.maxWidth = childWidth - 1 + "px"; - - if (this.parent.isGroup) { - this.parent.matchChildWidths(); - } - } -}; - -Column.prototype.setWidth = function (width) { - this.widthFixed = true; - this.setWidthActual(width); -}; - -Column.prototype.setWidthActual = function (width) { - if (isNaN(width)) { - width = Math.floor(this.table.element.clientWidth / 100 * parseInt(width)); - } - - width = Math.max(this.minWidth, width); - - this.width = width; - this.widthStyled = width ? width + "px" : ""; - - this.element.style.width = this.widthStyled; - - if (!this.isGroup) { - this.cells.forEach(function (cell) { - cell.setWidth(); - }); - } - - if (this.parent.isGroup) { - this.parent.matchChildWidths(); - } - - //set resizable handles - if (this.table.modExists("frozenColumns")) { - this.table.modules.frozenColumns.layout(); - } -}; - -Column.prototype.checkCellHeights = function () { - var rows = []; - - this.cells.forEach(function (cell) { - if (cell.row.heightInitialized) { - if (cell.row.getElement().offsetParent !== null) { - rows.push(cell.row); - cell.row.clearCellHeight(); - } else { - cell.row.heightInitialized = false; - } - } - }); - - rows.forEach(function (row) { - row.calcHeight(); - }); - - rows.forEach(function (row) { - row.setCellHeight(); - }); -}; - -Column.prototype.getWidth = function () { - var width = 0; - - if (this.isGroup) { - this.columns.forEach(function (column) { - if (column.visible) { - width += column.getWidth(); - } - }); - } else { - width = this.width; - } - - return width; -}; - -Column.prototype.getHeight = function () { - return this.element.offsetHeight; -}; - -Column.prototype.setMinWidth = function (minWidth) { - this.minWidth = minWidth; - this.minWidthStyled = minWidth ? minWidth + "px" : ""; - - this.element.style.minWidth = this.minWidthStyled; - - this.cells.forEach(function (cell) { - cell.setMinWidth(); - }); -}; - -Column.prototype.delete = function () { - var _this9 = this; - - return new Promise(function (resolve, reject) { - - if (_this9.isGroup) { - _this9.columns.forEach(function (column) { - column.delete(); - }); - } - - //cancel edit if column is currently being edited - if (_this9.table.modExists("edit")) { - if (_this9.table.modules.edit.currentCell.column === _this9) { - _this9.table.modules.edit.cancelEdit(); - } - } - - var cellCount = _this9.cells.length; - - for (var _i3 = 0; _i3 < cellCount; _i3++) { - _this9.cells[0].delete(); - } - - if (_this9.element.parentNode) { - _this9.element.parentNode.removeChild(_this9.element); - } - - _this9.element = false; - _this9.contentElement = false; - _this9.titleElement = false; - _this9.groupElement = false; - - _this9.table.columnManager.deregisterColumn(_this9); - - if (_this9.table.options.virtualDomHoz) { - _this9.table.vdomHoz.reinitialize(true); - } - - resolve(); - }); -}; - -Column.prototype.columnRendered = function () { - if (this.titleFormatterRendered) { - this.titleFormatterRendered(); - } -}; - -Column.prototype.validate = function () { - var invalid = []; - - this.cells.forEach(function (cell) { - if (!cell.validate()) { - invalid.push(cell.getComponent()); - } - }); - - return invalid.length ? invalid : true; -}; - -//////////////// Cell Management ///////////////// - -//generate cell for this column -Column.prototype.generateCell = function (row) { - var self = this; - - var cell = new Cell(self, row); - - this.cells.push(cell); - - return cell; -}; - -Column.prototype.nextColumn = function () { - var index = this.table.columnManager.findColumnIndex(this); - return index > -1 ? this._nextVisibleColumn(index + 1) : false; -}; - -Column.prototype._nextVisibleColumn = function (index) { - var column = this.table.columnManager.getColumnByIndex(index); - return !column || column.visible ? column : this._nextVisibleColumn(index + 1); -}; - -Column.prototype.prevColumn = function () { - var index = this.table.columnManager.findColumnIndex(this); - return index > -1 ? this._prevVisibleColumn(index - 1) : false; -}; - -Column.prototype._prevVisibleColumn = function (index) { - var column = this.table.columnManager.getColumnByIndex(index); - return !column || column.visible ? column : this._prevVisibleColumn(index - 1); -}; - -Column.prototype.reinitializeWidth = function (force) { - this.widthFixed = false; - - //set width if present - if (typeof this.definition.width !== "undefined" && !force) { - this.setWidth(this.definition.width); - } - - //hide header filters to prevent them altering column width - if (this.table.modExists("filter")) { - this.table.modules.filter.hideHeaderFilterElements(); - } - - this.fitToData(); - - //show header filters again after layout is complete - if (this.table.modExists("filter")) { - this.table.modules.filter.showHeaderFilterElements(); - } -}; - -//set column width to maximum cell width -Column.prototype.fitToData = function () { - var self = this; - - if (!this.widthFixed) { - this.element.style.width = ""; - - self.cells.forEach(function (cell) { - cell.clearWidth(); - }); - } - - var maxWidth = this.element.offsetWidth; - - if (!self.width || !this.widthFixed) { - self.cells.forEach(function (cell) { - var width = cell.getWidth(); - - if (width > maxWidth) { - maxWidth = width; - } - }); - - if (maxWidth) { - self.setWidthActual(maxWidth + 1); - } - } -}; - -Column.prototype.updateDefinition = function (updates) { - var _this10 = this; - - return new Promise(function (resolve, reject) { - var definition; - - if (!_this10.isGroup) { - definition = Object.assign({}, _this10.getDefinition()); - definition = Object.assign(definition, updates); - - _this10.table.columnManager.addColumn(definition, false, _this10).then(function (column) { - - if (definition.field == _this10.field) { - _this10.field = false; //cleair field name to prevent deletion of duplicate column from arrays - } - - _this10.delete().then(function () { - resolve(column.getComponent()); - }).catch(function (err) { - reject(err); - }); - }).catch(function (err) { - reject(err); - }); - } else { - console.warn("Column Update Error - The updateDefinition function is only available on columns, not column groups"); - reject("Column Update Error - The updateDefinition function is only available on columns, not column groups"); - } - }); -}; - -Column.prototype.deleteCell = function (cell) { - var index = this.cells.indexOf(cell); - - if (index > -1) { - this.cells.splice(index, 1); - } -}; - -Column.prototype.defaultOptionList = ["title", "field", "columns", "visible", "align", "hozAlign", "vertAlign", "width", "minWidth", "widthGrow", "widthShrink", "resizable", "frozen", "responsive", "tooltip", "cssClass", "rowHandle", "hideInHtml", "print", "htmlOutput", "sorter", "sorterParams", "formatter", "formatterParams", "variableHeight", "editable", "editor", "editorParams", "validator", "mutator", "mutatorParams", "mutatorData", "mutatorDataParams", "mutatorEdit", "mutatorEditParams", "mutatorClipboard", "mutatorClipboardParams", "accessor", "accessorParams", "accessorData", "accessorDataParams", "accessorDownload", "accessorDownloadParams", "accessorClipboard", "accessorClipboardParams", "accessorPrint", "accessorPrintParams", "accessorHtmlOutput", "accessorHtmlOutputParams", "clipboard", "download", "downloadTitle", "topCalc", "topCalcParams", "topCalcFormatter", "topCalcFormatterParams", "bottomCalc", "bottomCalcParams", "bottomCalcFormatter", "bottomCalcFormatterParams", "cellClick", "cellDblClick", "cellContext", "cellTap", "cellDblTap", "cellTapHold", "cellMouseEnter", "cellMouseLeave", "cellMouseOver", "cellMouseOut", "cellMouseMove", "cellEditing", "cellEdited", "cellEditCancelled", "headerSort", "headerSortStartingDir", "headerSortTristate", "headerClick", "headerDblClick", "headerContext", "headerTap", "headerDblTap", "headerTapHold", "headerTooltip", "headerVertical", "headerHozAlign", "editableTitle", "titleFormatter", "titleFormatterParams", "headerFilter", "headerFilterPlaceholder", "headerFilterParams", "headerFilterEmptyCheck", "headerFilterFunc", "headerFilterFuncParams", "headerFilterLiveFilter", "print", "headerContextMenu", "headerMenu", "contextMenu", -// "headerClickMenu", -"clickMenu", "formatterPrint", "formatterPrintParams", "formatterClipboard", "formatterClipboardParams", "formatterHtmlOutput", "formatterHtmlOutputParams", "titlePrint", "titleClipboard", "titleHtmlOutput", "titleDownload"]; - -//////////////// Event Bindings ///////////////// - -//////////////// Object Generation ///////////////// -Column.prototype.getComponent = function () { - if (!this.component) { - this.component = new ColumnComponent(this); - } - - return this.component; -}; - -var RowManager = function RowManager(table) { - - this.table = table; - this.element = this.createHolderElement(); //containing element - this.tableElement = this.createTableElement(); //table element - this.heightFixer = this.createTableElement(); //table element - this.columnManager = null; //hold column manager object - this.height = 0; //hold height of table element - - this.firstRender = false; //handle first render - this.renderMode = "virtual"; //current rendering mode - this.fixedHeight = false; //current rendering mode - - this.rows = []; //hold row data objects - this.activeRows = []; //rows currently available to on display in the table - this.activeRowsCount = 0; //count of active rows - - this.displayRows = []; //rows currently on display in the table - this.displayRowsCount = 0; //count of display rows - - this.scrollTop = 0; - this.scrollLeft = 0; - - this.vDomRowHeight = 20; //approximation of row heights for padding - - this.vDomTop = 0; //hold position for first rendered row in the virtual DOM - this.vDomBottom = 0; //hold possition for last rendered row in the virtual DOM - - this.vDomScrollPosTop = 0; //last scroll position of the vDom top; - this.vDomScrollPosBottom = 0; //last scroll position of the vDom bottom; - - this.vDomTopPad = 0; //hold value of padding for top of virtual DOM - this.vDomBottomPad = 0; //hold value of padding for bottom of virtual DOM - - this.vDomMaxRenderChain = 90; //the maximum number of dom elements that can be rendered in 1 go - - this.vDomWindowBuffer = 0; //window row buffer before removing elements, to smooth scrolling - - this.vDomWindowMinTotalRows = 20; //minimum number of rows to be generated in virtual dom (prevent buffering issues on tables with tall rows) - this.vDomWindowMinMarginRows = 5; //minimum number of rows to be generated in virtual dom margin - - this.vDomTopNewRows = []; //rows to normalize after appending to optimize render speed - this.vDomBottomNewRows = []; //rows to normalize after appending to optimize render speed - - this.rowNumColumn = false; //hold column component for row number column - - this.redrawBlock = false; //prevent redraws to allow multiple data manipulations becore continuing - this.redrawBlockRestoreConfig = false; //store latest redraw function calls for when redraw is needed - this.redrawBlockRederInPosition = false; //store latest redraw function calls for when redraw is needed -}; - -//////////////// Setup Functions ///////////////// - -RowManager.prototype.createHolderElement = function () { - var el = document.createElement("div"); - - el.classList.add("tabulator-tableHolder"); - el.setAttribute("tabindex", 0); - - return el; -}; - -RowManager.prototype.createTableElement = function () { - var el = document.createElement("div"); - - el.classList.add("tabulator-table"); - - return el; -}; - -//return containing element -RowManager.prototype.getElement = function () { - return this.element; -}; - -//return table element -RowManager.prototype.getTableElement = function () { - return this.tableElement; -}; - -//return position of row in table -RowManager.prototype.getRowPosition = function (row, active) { - if (active) { - return this.activeRows.indexOf(row); - } else { - return this.rows.indexOf(row); - } -}; - -//link to column manager -RowManager.prototype.setColumnManager = function (manager) { - this.columnManager = manager; -}; - -RowManager.prototype.initialize = function () { - var self = this; - - self.setRenderMode(); - - //initialize manager - self.element.appendChild(self.tableElement); - - self.firstRender = true; - - //scroll header along with table body - self.element.addEventListener("scroll", function () { - var left = self.element.scrollLeft; - - //handle horizontal scrolling - if (self.scrollLeft != left) { - self.columnManager.scrollHorizontal(left); - - if (self.table.options.groupBy) { - self.table.modules.groupRows.scrollHeaders(left); - } - - if (self.table.modExists("columnCalcs")) { - self.table.modules.columnCalcs.scrollHorizontal(left); - } - - self.table.options.scrollHorizontal(left); - } - - self.scrollLeft = left; - }); - - //handle virtual dom scrolling - if (this.renderMode === "virtual") { - - self.element.addEventListener("scroll", function () { - var top = self.element.scrollTop; - var dir = self.scrollTop > top; - - //handle verical scrolling - if (self.scrollTop != top) { - self.scrollTop = top; - self.scrollVertical(dir); - - if (self.table.options.ajaxProgressiveLoad == "scroll") { - self.table.modules.ajax.nextPage(self.element.scrollHeight - self.element.clientHeight - top); - } - - self.table.options.scrollVertical(top); - } else { - self.scrollTop = top; - } - }); - } -}; - -////////////////// Row Manipulation ////////////////// - -RowManager.prototype.findRow = function (subject) { - var self = this; - - if ((typeof subject === 'undefined' ? 'undefined' : _typeof(subject)) == "object") { - - if (subject instanceof Row) { - //subject is row element - return subject; - } else if (subject instanceof RowComponent) { - //subject is public row component - return subject._getSelf() || false; - } else if (typeof HTMLElement !== "undefined" && subject instanceof HTMLElement) { - //subject is a HTML element of the row - var match = self.rows.find(function (row) { - return row.element === subject; - }); - - return match || false; - } - } else if (typeof subject == "undefined" || subject === null) { - return false; - } else { - //subject should be treated as the index of the row - var _match = self.rows.find(function (row) { - return row.data[self.table.options.index] == subject; - }); - - return _match || false; - } - - //catch all for any other type of input - - return false; -}; - -RowManager.prototype.getRowFromDataObject = function (data) { - var match = this.rows.find(function (row) { - return row.data === data; - }); - - return match || false; -}; - -RowManager.prototype.getRowFromPosition = function (position, active) { - if (active) { - return this.activeRows[position]; - } else { - return this.rows[position]; - } -}; - -RowManager.prototype.scrollToRow = function (row, position, ifVisible) { - var _this11 = this; - - var rowIndex = this.getDisplayRows().indexOf(row), - rowEl = row.getElement(), - rowTop, - offset = 0; - - return new Promise(function (resolve, reject) { - if (rowIndex > -1) { - - if (typeof position === "undefined") { - position = _this11.table.options.scrollToRowPosition; - } - - if (typeof ifVisible === "undefined") { - ifVisible = _this11.table.options.scrollToRowIfVisible; - } - - if (position === "nearest") { - switch (_this11.renderMode) { - case "classic": - rowTop = Tabulator.prototype.helpers.elOffset(rowEl).top; - position = Math.abs(_this11.element.scrollTop - rowTop) > Math.abs(_this11.element.scrollTop + _this11.element.clientHeight - rowTop) ? "bottom" : "top"; - break; - case "virtual": - position = Math.abs(_this11.vDomTop - rowIndex) > Math.abs(_this11.vDomBottom - rowIndex) ? "bottom" : "top"; - break; - } - } - - //check row visibility - if (!ifVisible) { - if (Tabulator.prototype.helpers.elVisible(rowEl)) { - offset = Tabulator.prototype.helpers.elOffset(rowEl).top - Tabulator.prototype.helpers.elOffset(_this11.element).top; - - if (offset > 0 && offset < _this11.element.clientHeight - rowEl.offsetHeight) { - return false; - } - } - } - - //scroll to row - switch (_this11.renderMode) { - case "classic": - _this11.element.scrollTop = Tabulator.prototype.helpers.elOffset(rowEl).top - Tabulator.prototype.helpers.elOffset(_this11.element).top + _this11.element.scrollTop; - break; - case "virtual": - _this11._virtualRenderFill(rowIndex, true); - break; - } - - //align to correct position - switch (position) { - case "middle": - case "center": - - if (_this11.element.scrollHeight - _this11.element.scrollTop == _this11.element.clientHeight) { - _this11.element.scrollTop = _this11.element.scrollTop + (rowEl.offsetTop - _this11.element.scrollTop) - (_this11.element.scrollHeight - rowEl.offsetTop) / 2; - } else { - _this11.element.scrollTop = _this11.element.scrollTop - _this11.element.clientHeight / 2; - } - - break; - - case "bottom": - - if (_this11.element.scrollHeight - _this11.element.scrollTop == _this11.element.clientHeight) { - _this11.element.scrollTop = _this11.element.scrollTop - (_this11.element.scrollHeight - rowEl.offsetTop) + rowEl.offsetHeight; - } else { - _this11.element.scrollTop = _this11.element.scrollTop - _this11.element.clientHeight + rowEl.offsetHeight; - } - - break; - } - - resolve(); - } else { - console.warn("Scroll Error - Row not visible"); - reject("Scroll Error - Row not visible"); - } - }); -}; - -////////////////// Data Handling ////////////////// - -RowManager.prototype.setData = function (data, renderInPosition, columnsChanged) { - var _this12 = this; - - var self = this; - - return new Promise(function (resolve, reject) { - if (renderInPosition && _this12.getDisplayRows().length) { - if (self.table.options.pagination) { - self._setDataActual(data, true); - } else { - _this12.reRenderInPosition(function () { - self._setDataActual(data); - }); - } - } else { - if (_this12.table.options.autoColumns && columnsChanged) { - _this12.table.columnManager.generateColumnsFromRowData(data); - } - _this12.resetScroll(); - - _this12._setDataActual(data); - } - - resolve(); - }); -}; - -RowManager.prototype._setDataActual = function (data, renderInPosition) { - var self = this; - - self.table.options.dataLoading.call(this.table, data); - - this._wipeElements(); - - if (this.table.options.history && this.table.modExists("history")) { - this.table.modules.history.clear(); - } - - if (Array.isArray(data)) { - - if (this.table.modExists("selectRow")) { - this.table.modules.selectRow.clearSelectionData(); - } - - if (this.table.options.reactiveData && this.table.modExists("reactiveData", true)) { - this.table.modules.reactiveData.watchData(data); - } - - data.forEach(function (def, i) { - if (def && (typeof def === 'undefined' ? 'undefined' : _typeof(def)) === "object") { - var row = new Row(def, self); - self.rows.push(row); - } else { - console.warn("Data Loading Warning - Invalid row data detected and ignored, expecting object but received:", def); - } - }); - - self.refreshActiveData(false, false, renderInPosition); - - self.table.options.dataLoaded.call(this.table, data); - } else { - console.error("Data Loading Error - Unable to process data due to invalid data type \nExpecting: array \nReceived: ", typeof data === 'undefined' ? 'undefined' : _typeof(data), "\nData: ", data); - } -}; - -RowManager.prototype._wipeElements = function () { - this.rows.forEach(function (row) { - row.wipe(); - }); - - if (this.table.options.groupBy && this.table.modExists("groupRows")) { - this.table.modules.groupRows.wipe(); - } - - this.rows = []; - this.activeRows = []; - this.activeRowsCount = 0; - this.displayRows = []; - this.displayRowsCount = 0; - - this.adjustTableSize(); -}; - -RowManager.prototype.deleteRow = function (row, blockRedraw) { - var allIndex = this.rows.indexOf(row), - activeIndex = this.activeRows.indexOf(row); - - if (activeIndex > -1) { - this.activeRows.splice(activeIndex, 1); - } - - if (allIndex > -1) { - this.rows.splice(allIndex, 1); - } - - this.setActiveRows(this.activeRows); - - this.displayRowIterator(function (rows) { - var displayIndex = rows.indexOf(row); - - if (displayIndex > -1) { - rows.splice(displayIndex, 1); - } - }); - - if (!blockRedraw) { - this.reRenderInPosition(); - } - - this.regenerateRowNumbers(); - - this.table.options.rowDeleted.call(this.table, row.getComponent()); - - if (this.table.options.dataChanged) { - this.table.options.dataChanged.call(this.table, this.getData()); - } - - if (this.table.options.groupBy && this.table.modExists("groupRows")) { - this.table.modules.groupRows.updateGroupRows(true); - } else if (this.table.options.pagination && this.table.modExists("page")) { - this.refreshActiveData(false, false, true); - } else { - if (this.table.options.pagination && this.table.modExists("page")) { - this.refreshActiveData("page"); - } - } -}; - -RowManager.prototype.addRow = function (data, pos, index, blockRedraw) { - - var row = this.addRowActual(data, pos, index, blockRedraw); - - if (this.table.options.history && this.table.modExists("history")) { - this.table.modules.history.action("rowAdd", row, { data: data, pos: pos, index: index }); - } - - return row; -}; - -//add multiple rows -RowManager.prototype.addRows = function (data, pos, index) { - var _this13 = this; - - var self = this, - length = 0, - rows = []; - - return new Promise(function (resolve, reject) { - pos = _this13.findAddRowPos(pos); - - if (!Array.isArray(data)) { - data = [data]; - } - - length = data.length - 1; - - if (typeof index == "undefined" && pos || typeof index !== "undefined" && !pos) { - data.reverse(); - } - - data.forEach(function (item, i) { - var row = self.addRow(item, pos, index, true); - rows.push(row); - }); - - if (_this13.table.options.groupBy && _this13.table.modExists("groupRows")) { - _this13.table.modules.groupRows.updateGroupRows(true); - } else if (_this13.table.options.pagination && _this13.table.modExists("page")) { - _this13.refreshActiveData(false, false, true); - } else { - _this13.reRenderInPosition(); - } - - //recalc column calculations if present - if (_this13.table.modExists("columnCalcs")) { - _this13.table.modules.columnCalcs.recalc(_this13.table.rowManager.activeRows); - } - - _this13.regenerateRowNumbers(); - resolve(rows); - }); -}; - -RowManager.prototype.findAddRowPos = function (pos) { - if (typeof pos === "undefined") { - pos = this.table.options.addRowPos; - } - - if (pos === "pos") { - pos = true; - } - - if (pos === "bottom") { - pos = false; - } - - return pos; -}; - -RowManager.prototype.addRowActual = function (data, pos, index, blockRedraw) { - var row = data instanceof Row ? data : new Row(data || {}, this), - top = this.findAddRowPos(pos), - allIndex = -1, - activeIndex, - dispRows; - - if (!index && this.table.options.pagination && this.table.options.paginationAddRow == "page") { - dispRows = this.getDisplayRows(); - - if (top) { - if (dispRows.length) { - index = dispRows[0]; - } else { - if (this.activeRows.length) { - index = this.activeRows[this.activeRows.length - 1]; - top = false; - } - } - } else { - if (dispRows.length) { - index = dispRows[dispRows.length - 1]; - top = dispRows.length < this.table.modules.page.getPageSize() ? false : true; - } - } - } - - if (typeof index !== "undefined") { - index = this.findRow(index); - } - - if (this.table.options.groupBy && this.table.modExists("groupRows")) { - this.table.modules.groupRows.assignRowToGroup(row); - - var groupRows = row.getGroup().rows; - - if (groupRows.length > 1) { - - if (!index || index && groupRows.indexOf(index) == -1) { - if (top) { - if (groupRows[0] !== row) { - index = groupRows[0]; - this._moveRowInArray(row.getGroup().rows, row, index, !top); - } - } else { - if (groupRows[groupRows.length - 1] !== row) { - index = groupRows[groupRows.length - 1]; - this._moveRowInArray(row.getGroup().rows, row, index, !top); - } - } - } else { - this._moveRowInArray(row.getGroup().rows, row, index, !top); - } - } - } - - if (index) { - allIndex = this.rows.indexOf(index); - } - - if (index && allIndex > -1) { - activeIndex = this.activeRows.indexOf(index); - - this.displayRowIterator(function (rows) { - var displayIndex = rows.indexOf(index); - - if (displayIndex > -1) { - rows.splice(top ? displayIndex : displayIndex + 1, 0, row); - } - }); - - if (activeIndex > -1) { - this.activeRows.splice(top ? activeIndex : activeIndex + 1, 0, row); - } - - this.rows.splice(top ? allIndex : allIndex + 1, 0, row); - } else { - - if (top) { - - this.displayRowIterator(function (rows) { - rows.unshift(row); - }); - - this.activeRows.unshift(row); - this.rows.unshift(row); - } else { - this.displayRowIterator(function (rows) { - rows.push(row); - }); - - this.activeRows.push(row); - this.rows.push(row); - } - } - - this.setActiveRows(this.activeRows); - - this.table.options.rowAdded.call(this.table, row.getComponent()); - - if (this.table.options.dataChanged) { - this.table.options.dataChanged.call(this.table, this.getData()); - } - - if (!blockRedraw) { - this.reRenderInPosition(); - } - - return row; -}; - -RowManager.prototype.moveRow = function (from, to, after) { - if (this.table.options.history && this.table.modExists("history")) { - this.table.modules.history.action("rowMove", from, { posFrom: this.getRowPosition(from), posTo: this.getRowPosition(to), to: to, after: after }); - } - - this.moveRowActual(from, to, after); - - this.regenerateRowNumbers(); - - this.table.options.rowMoved.call(this.table, from.getComponent()); -}; - -RowManager.prototype.moveRowActual = function (from, to, after) { - var _this14 = this; - - this._moveRowInArray(this.rows, from, to, after); - this._moveRowInArray(this.activeRows, from, to, after); - - this.displayRowIterator(function (rows) { - _this14._moveRowInArray(rows, from, to, after); - }); - - if (this.table.options.groupBy && this.table.modExists("groupRows")) { - - if (!after && to instanceof Group) { - to = this.table.rowManager.prevDisplayRow(from) || to; - } - - var toGroup = to.getGroup(); - var fromGroup = from.getGroup(); - - if (toGroup === fromGroup) { - this._moveRowInArray(toGroup.rows, from, to, after); - } else { - if (fromGroup) { - fromGroup.removeRow(from); - } - - toGroup.insertRow(from, to, after); - } - } -}; - -RowManager.prototype._moveRowInArray = function (rows, from, to, after) { - var fromIndex, toIndex, start, end; - - if (from !== to) { - - fromIndex = rows.indexOf(from); - - if (fromIndex > -1) { - - rows.splice(fromIndex, 1); - - toIndex = rows.indexOf(to); - - if (toIndex > -1) { - - if (after) { - rows.splice(toIndex + 1, 0, from); - } else { - rows.splice(toIndex, 0, from); - } - } else { - rows.splice(fromIndex, 0, from); - } - } - - //restyle rows - if (rows === this.getDisplayRows()) { - - start = fromIndex < toIndex ? fromIndex : toIndex; - end = toIndex > fromIndex ? toIndex : fromIndex + 1; - - for (var _i4 = start; _i4 <= end; _i4++) { - if (rows[_i4]) { - this.styleRow(rows[_i4], _i4); - } - } - } - } -}; - -RowManager.prototype.clearData = function () { - this.setData([]); -}; - -RowManager.prototype.getRowIndex = function (row) { - return this.findRowIndex(row, this.rows); -}; - -RowManager.prototype.getDisplayRowIndex = function (row) { - var index = this.getDisplayRows().indexOf(row); - return index > -1 ? index : false; -}; - -RowManager.prototype.nextDisplayRow = function (row, rowOnly) { - var index = this.getDisplayRowIndex(row), - nextRow = false; - - if (index !== false && index < this.displayRowsCount - 1) { - nextRow = this.getDisplayRows()[index + 1]; - } - - if (nextRow && (!(nextRow instanceof Row) || nextRow.type != "row")) { - return this.nextDisplayRow(nextRow, rowOnly); - } - - return nextRow; -}; - -RowManager.prototype.prevDisplayRow = function (row, rowOnly) { - var index = this.getDisplayRowIndex(row), - prevRow = false; - - if (index) { - prevRow = this.getDisplayRows()[index - 1]; - } - - if (rowOnly && prevRow && (!(prevRow instanceof Row) || prevRow.type != "row")) { - return this.prevDisplayRow(prevRow, rowOnly); - } - - return prevRow; -}; - -RowManager.prototype.findRowIndex = function (row, list) { - var rowIndex; - - row = this.findRow(row); - - if (row) { - rowIndex = list.indexOf(row); - - if (rowIndex > -1) { - return rowIndex; - } - } - - return false; -}; - -RowManager.prototype.getData = function (active, transform) { - var output = [], - rows = this.getRows(active); - - rows.forEach(function (row) { - if (row.type == "row") { - output.push(row.getData(transform || "data")); - } - }); - - return output; -}; - -RowManager.prototype.getComponents = function (active) { - var output = [], - rows = this.getRows(active); - - rows.forEach(function (row) { - output.push(row.getComponent()); - }); - - return output; -}; - -RowManager.prototype.getDataCount = function (active) { - var rows = this.getRows(active); - - return rows.length; -}; - -RowManager.prototype._genRemoteRequest = function () { - var _this15 = this; - - var table = this.table, - options = table.options, - params = {}; - - if (table.modExists("page")) { - //set sort data if defined - if (options.ajaxSorting) { - var sorters = this.table.modules.sort.getSort(); - - sorters.forEach(function (item) { - delete item.column; - }); - - params[this.table.modules.page.paginationDataSentNames.sorters] = sorters; - } - - //set filter data if defined - if (options.ajaxFiltering) { - var filters = this.table.modules.filter.getFilters(true, true); - - params[this.table.modules.page.paginationDataSentNames.filters] = filters; - } - - this.table.modules.ajax.setParams(params, true); - } - - table.modules.ajax.sendRequest().then(function (data) { - _this15._setDataActual(data, true); - }).catch(function (e) {}); -}; - -//choose the path to refresh data after a filter update -RowManager.prototype.filterRefresh = function () { - var table = this.table, - options = table.options, - left = this.scrollLeft; - - if (options.ajaxFiltering) { - if (options.pagination == "remote" && table.modExists("page")) { - table.modules.page.reset(true); - table.modules.page.setPage(1).then(function () {}).catch(function () {}); - } else if (options.ajaxProgressiveLoad) { - table.modules.ajax.loadData().then(function () {}).catch(function () {}); - } else { - //assume data is url, make ajax call to url to get data - this._genRemoteRequest(); - } - } else { - this.refreshActiveData("filter"); - } - - this.scrollHorizontal(left); -}; - -//choose the path to refresh data after a sorter update -RowManager.prototype.sorterRefresh = function (loadOrignalData) { - var table = this.table, - options = this.table.options, - left = this.scrollLeft; - - if (options.ajaxSorting) { - if ((options.pagination == "remote" || options.progressiveLoad) && table.modExists("page")) { - table.modules.page.reset(true); - table.modules.page.setPage(1).then(function () {}).catch(function () {}); - } else if (options.ajaxProgressiveLoad) { - table.modules.ajax.loadData().then(function () {}).catch(function () {}); - } else { - //assume data is url, make ajax call to url to get data - this._genRemoteRequest(); - } - } else { - this.refreshActiveData(loadOrignalData ? "filter" : "sort"); - } - - this.scrollHorizontal(left); -}; - -RowManager.prototype.scrollHorizontal = function (left) { - this.scrollLeft = left; - this.element.scrollLeft = left; - - if (this.table.options.groupBy) { - this.table.modules.groupRows.scrollHeaders(left); - } - - if (this.table.modExists("columnCalcs")) { - this.table.modules.columnCalcs.scrollHorizontal(left); - } -}; - -//set active data set -RowManager.prototype.refreshActiveData = function (stage, skipStage, renderInPosition) { - var self = this, - table = this.table, - cascadeOrder = ["all", "filter", "sort", "display", "freeze", "group", "tree", "page"], - displayIndex; - - if (this.redrawBlock) { - - if (!this.redrawBlockRestoreConfig || cascadeOrder.indexOf(stage) < cascadeOrder.indexOf(this.redrawBlockRestoreConfig.stage)) { - this.redrawBlockRestoreConfig = { - stage: stage, - skipStage: skipStage, - renderInPosition: renderInPosition - }; - } - - return; - } else { - - if (self.table.modExists("edit")) { - self.table.modules.edit.cancelEdit(); - } - - if (!stage) { - stage = "all"; - } - - if (table.options.selectable && !table.options.selectablePersistence && table.modExists("selectRow")) { - table.modules.selectRow.deselectRows(); - } - - //cascade through data refresh stages - switch (stage) { - case "all": - - case "filter": - if (!skipStage) { - if (table.modExists("filter")) { - self.setActiveRows(table.modules.filter.filter(self.rows)); - } else { - self.setActiveRows(self.rows.slice(0)); - } - } else { - skipStage = false; - } - - case "sort": - if (!skipStage) { - if (table.modExists("sort")) { - table.modules.sort.sort(this.activeRows); - } - } else { - skipStage = false; - } - - //regenerate row numbers for row number formatter if in use - this.regenerateRowNumbers(); - - //generic stage to allow for pipeline trigger after the data manipulation stage - case "display": - this.resetDisplayRows(); - - case "freeze": - if (!skipStage) { - if (this.table.modExists("frozenRows")) { - if (table.modules.frozenRows.isFrozen()) { - if (!table.modules.frozenRows.getDisplayIndex()) { - table.modules.frozenRows.setDisplayIndex(this.getNextDisplayIndex()); - } - - displayIndex = table.modules.frozenRows.getDisplayIndex(); - - displayIndex = self.setDisplayRows(table.modules.frozenRows.getRows(this.getDisplayRows(displayIndex - 1)), displayIndex); - - if (displayIndex !== true) { - table.modules.frozenRows.setDisplayIndex(displayIndex); - } - } - } - } else { - skipStage = false; - } - - case "group": - if (!skipStage) { - if (table.options.groupBy && table.modExists("groupRows")) { - - if (!table.modules.groupRows.getDisplayIndex()) { - table.modules.groupRows.setDisplayIndex(this.getNextDisplayIndex()); - } - - displayIndex = table.modules.groupRows.getDisplayIndex(); - - displayIndex = self.setDisplayRows(table.modules.groupRows.getRows(this.getDisplayRows(displayIndex - 1)), displayIndex); - - if (displayIndex !== true) { - table.modules.groupRows.setDisplayIndex(displayIndex); - } - } - } else { - skipStage = false; - } - - case "tree": - - if (!skipStage) { - if (table.options.dataTree && table.modExists("dataTree")) { - if (!table.modules.dataTree.getDisplayIndex()) { - table.modules.dataTree.setDisplayIndex(this.getNextDisplayIndex()); - } - - displayIndex = table.modules.dataTree.getDisplayIndex(); - - displayIndex = self.setDisplayRows(table.modules.dataTree.getRows(this.getDisplayRows(displayIndex - 1)), displayIndex); - - if (displayIndex !== true) { - table.modules.dataTree.setDisplayIndex(displayIndex); - } - } - } else { - skipStage = false; - } - - if (table.options.pagination && table.modExists("page") && !renderInPosition) { - if (table.modules.page.getMode() == "local") { - table.modules.page.reset(); - } - } - - case "page": - if (!skipStage) { - if (table.options.pagination && table.modExists("page")) { - - if (!table.modules.page.getDisplayIndex()) { - table.modules.page.setDisplayIndex(this.getNextDisplayIndex()); - } - - displayIndex = table.modules.page.getDisplayIndex(); - - if (table.modules.page.getMode() == "local") { - table.modules.page.setMaxRows(this.getDisplayRows(displayIndex - 1).length); - } - - displayIndex = self.setDisplayRows(table.modules.page.getRows(this.getDisplayRows(displayIndex - 1)), displayIndex); - - if (displayIndex !== true) { - table.modules.page.setDisplayIndex(displayIndex); - } - } - } else { - skipStage = false; - } - } - - if (Tabulator.prototype.helpers.elVisible(self.element)) { - if (renderInPosition) { - self.reRenderInPosition(); - } else { - - if (stage === "all" && this.table.options.virtualDomHoz) { - this.table.vdomHoz.dataChange(); - } - - self.renderTable(); - - if (table.options.layoutColumnsOnNewData) { - self.table.columnManager.redraw(true); - } - } - } - - if (table.modExists("columnCalcs")) { - table.modules.columnCalcs.recalc(this.activeRows); - } - } -}; - -//regenerate row numbers for row number formatter if in use -RowManager.prototype.regenerateRowNumbers = function () { - var _this16 = this; - - if (this.rowNumColumn) { - this.activeRows.forEach(function (row) { - var cell = row.getCell(_this16.rowNumColumn); - - if (cell) { - cell._generateContents(); - } - }); - } -}; - -RowManager.prototype.setActiveRows = function (activeRows) { - this.activeRows = activeRows; - this.activeRowsCount = this.activeRows.length; -}; - -//reset display rows array -RowManager.prototype.resetDisplayRows = function () { - this.displayRows = []; - - this.displayRows.push(this.activeRows.slice(0)); - - this.displayRowsCount = this.displayRows[0].length; - - if (this.table.modExists("frozenRows")) { - this.table.modules.frozenRows.setDisplayIndex(0); - } - - if (this.table.options.groupBy && this.table.modExists("groupRows")) { - this.table.modules.groupRows.setDisplayIndex(0); - } - - if (this.table.options.pagination && this.table.modExists("page")) { - this.table.modules.page.setDisplayIndex(0); - } -}; - -RowManager.prototype.getNextDisplayIndex = function () { - return this.displayRows.length; -}; - -//set display row pipeline data -RowManager.prototype.setDisplayRows = function (displayRows, index) { - - var output = true; - - if (index && typeof this.displayRows[index] != "undefined") { - this.displayRows[index] = displayRows; - output = true; - } else { - this.displayRows.push(displayRows); - output = index = this.displayRows.length - 1; - } - - if (index == this.displayRows.length - 1) { - this.displayRowsCount = this.displayRows[this.displayRows.length - 1].length; - } - - return output; -}; - -RowManager.prototype.getDisplayRows = function (index) { - if (typeof index == "undefined") { - return this.displayRows.length ? this.displayRows[this.displayRows.length - 1] : []; - } else { - return this.displayRows[index] || []; - } -}; - -RowManager.prototype.getVisibleRows = function (viewable) { - var topEdge = this.element.scrollTop, - bottomEdge = this.element.clientHeight + topEdge, - topFound = false, - topRow = 0, - bottomRow = 0, - rows = this.getDisplayRows(); - - if (viewable) { - - this.getDisplayRows(); - for (var i = this.vDomTop; i <= this.vDomBottom; i++) { - if (rows[i]) { - if (!topFound) { - if (topEdge - rows[i].getElement().offsetTop >= 0) { - topRow = i; - } else { - topFound = true; - - if (bottomEdge - rows[i].getElement().offsetTop >= 0) { - bottomRow = i; - } else { - break; - } - } - } else { - if (bottomEdge - rows[i].getElement().offsetTop >= 0) { - bottomRow = i; - } else { - break; - } - } - } - } - } else { - topRow = this.vDomTop; - bottomRow = this.vDomBottom; - } - - return rows.slice(topRow, bottomRow + 1); -}; - -//repeat action accross display rows -RowManager.prototype.displayRowIterator = function (callback) { - this.displayRows.forEach(callback); - - this.displayRowsCount = this.displayRows[this.displayRows.length - 1].length; -}; - -//return only actual rows (not group headers etc) -RowManager.prototype.getRows = function (active) { - var rows; - - switch (active) { - case "active": - rows = this.activeRows; - break; - - case "display": - rows = this.table.rowManager.getDisplayRows(); - break; - - case "visible": - rows = this.getVisibleRows(true); - break; - - case "selected": - rows = this.table.modules.selectRow.selectedRows; - break; - - default: - rows = this.rows; - } - - return rows; -}; - -///////////////// Table Rendering ///////////////// - -//trigger rerender of table in current position -RowManager.prototype.reRenderInPosition = function (callback) { - if (this.getRenderMode() == "virtual") { - - if (this.redrawBlock) { - if (callback) { - callback(); - } else { - this.redrawBlockRederInPosition = true; - } - } else { - var scrollTop = this.element.scrollTop; - var topRow = false; - var topOffset = false; - - var left = this.scrollLeft; - - var rows = this.getDisplayRows(); - - for (var i = this.vDomTop; i <= this.vDomBottom; i++) { - - if (rows[i]) { - var diff = scrollTop - rows[i].getElement().offsetTop; - - if (topOffset === false || Math.abs(diff) < topOffset) { - topOffset = diff; - topRow = i; - } else { - break; - } - } - } - - if (callback) { - callback(); - } - - this._virtualRenderFill(topRow === false ? this.displayRowsCount - 1 : topRow, true, topOffset || 0); - - this.scrollHorizontal(left); - } - } else { - this.renderTable(); - - if (callback) { - callback(); - } - } -}; - -RowManager.prototype.setRenderMode = function () { - - if (this.table.options.virtualDom) { - - this.renderMode = "virtual"; - - if (this.table.element.clientHeight || this.table.options.height) { - this.fixedHeight = true; - } else { - this.fixedHeight = false; - } - } else { - this.renderMode = "classic"; - } -}; - -RowManager.prototype.getRenderMode = function () { - return this.renderMode; -}; - -RowManager.prototype.renderTable = function () { - - this.table.options.renderStarted.call(this.table); - - this.element.scrollTop = 0; - - switch (this.renderMode) { - case "classic": - this._simpleRender(); - break; - - case "virtual": - this._virtualRenderFill(); - break; - } - - if (this.firstRender) { - if (this.displayRowsCount) { - this.firstRender = false; - this.table.modules.layout.layout(); - } else { - this.renderEmptyScroll(); - } - } - - if (this.table.modExists("frozenColumns")) { - this.table.modules.frozenColumns.layout(); - } - - if (!this.displayRowsCount) { - if (this.table.options.placeholder) { - - this.table.options.placeholder.setAttribute("tabulator-render-mode", this.renderMode); - - this.getElement().appendChild(this.table.options.placeholder); - this.table.options.placeholder.style.width = this.table.columnManager.getWidth() + "px"; - } - } - - this.table.options.renderComplete.call(this.table); -}; - -//simple render on heightless table -RowManager.prototype._simpleRender = function () { - this._clearVirtualDom(); - - if (this.displayRowsCount) { - this.checkClassicModeGroupHeaderWidth(); - } else { - this.renderEmptyScroll(); - } -}; - -RowManager.prototype.checkClassicModeGroupHeaderWidth = function () { - var self = this, - element = this.tableElement, - onlyGroupHeaders = true; - - self.getDisplayRows().forEach(function (row, index) { - self.styleRow(row, index); - element.appendChild(row.getElement()); - row.initialize(true); - - if (row.type !== "group") { - onlyGroupHeaders = false; - } - }); - - if (onlyGroupHeaders) { - element.style.minWidth = self.table.columnManager.getWidth() + "px"; - } else { - element.style.minWidth = ""; - } -}; - -//show scrollbars on empty table div -RowManager.prototype.renderEmptyScroll = function () { - if (this.table.options.placeholder) { - this.tableElement.style.display = "none"; - } else { - this.tableElement.style.minWidth = this.table.columnManager.getWidth() + "px"; - // this.tableElement.style.minHeight = "1px"; - // this.tableElement.style.visibility = "hidden"; - } -}; - -RowManager.prototype._clearVirtualDom = function () { - var element = this.tableElement; - - if (this.table.options.placeholder && this.table.options.placeholder.parentNode) { - this.table.options.placeholder.parentNode.removeChild(this.table.options.placeholder); - } - - // element.children.detach(); - while (element.firstChild) { - element.removeChild(element.firstChild); - }element.style.paddingTop = ""; - element.style.paddingBottom = ""; - element.style.minWidth = ""; - element.style.minHeight = ""; - element.style.display = ""; - element.style.visibility = ""; - - this.scrollTop = 0; - this.scrollLeft = 0; - this.vDomTop = 0; - this.vDomBottom = 0; - this.vDomTopPad = 0; - this.vDomBottomPad = 0; -}; - -RowManager.prototype.styleRow = function (row, index) { - var rowEl = row.getElement(); - - if (index % 2) { - rowEl.classList.add("tabulator-row-even"); - rowEl.classList.remove("tabulator-row-odd"); - } else { - rowEl.classList.add("tabulator-row-odd"); - rowEl.classList.remove("tabulator-row-even"); - } -}; - -//full virtual render -RowManager.prototype._virtualRenderFill = function (position, forceMove, offset) { - var self = this, - element = self.tableElement, - holder = self.element, - topPad = 0, - rowsHeight = 0, - topPadHeight = 0, - i = 0, - onlyGroupHeaders = true, - rows = self.getDisplayRows(); - - position = position || 0; - - offset = offset || 0; - - if (!position) { - self._clearVirtualDom(); - } else { - while (element.firstChild) { - element.removeChild(element.firstChild); - } //check if position is too close to bottom of table - var heightOccupied = (self.displayRowsCount - position + 1) * self.vDomRowHeight; - - if (heightOccupied < self.height) { - position -= Math.ceil((self.height - heightOccupied) / self.vDomRowHeight); - - if (position < 0) { - position = 0; - } - } - - //calculate initial pad - topPad = Math.min(Math.max(Math.floor(self.vDomWindowBuffer / self.vDomRowHeight), self.vDomWindowMinMarginRows), position); - position -= topPad; - } - - if (self.displayRowsCount && Tabulator.prototype.helpers.elVisible(self.element)) { - - self.vDomTop = position; - - self.vDomBottom = position - 1; - - while ((rowsHeight <= self.height + self.vDomWindowBuffer || i < self.vDomWindowMinTotalRows) && self.vDomBottom < self.displayRowsCount - 1) { - var index = self.vDomBottom + 1, - row = rows[index], - rowHeight = 0; - - self.styleRow(row, index); - - element.appendChild(row.getElement()); - - row.initialize(); - - if (!row.heightInitialized) { - row.normalizeHeight(true); - } - - // if(!row.initialized){ - // row.initialize(true); - // }else{ - // if(!row.heightInitialized){ - // row.normalizeHeight(true); - // } - // } - - rowHeight = row.getHeight(); - - if (i < topPad) { - topPadHeight += rowHeight; - } else { - rowsHeight += rowHeight; - } - - if (rowHeight > this.vDomWindowBuffer) { - this.vDomWindowBuffer = rowHeight * 2; - } - - if (row.type !== "group") { - onlyGroupHeaders = false; - } - - self.vDomBottom++; - i++; - } - - if (!position) { - this.vDomTopPad = 0; - //adjust rowheight to match average of rendered elements - self.vDomRowHeight = Math.floor((rowsHeight + topPadHeight) / i); - self.vDomBottomPad = self.vDomRowHeight * (self.displayRowsCount - self.vDomBottom - 1); - - self.vDomScrollHeight = topPadHeight + rowsHeight + self.vDomBottomPad - self.height; - } else { - self.vDomTopPad = !forceMove ? self.scrollTop - topPadHeight : self.vDomRowHeight * this.vDomTop + offset; - self.vDomBottomPad = self.vDomBottom == self.displayRowsCount - 1 ? 0 : Math.max(self.vDomScrollHeight - self.vDomTopPad - rowsHeight - topPadHeight, 0); - } - - element.style.paddingTop = self.vDomTopPad + "px"; - element.style.paddingBottom = self.vDomBottomPad + "px"; - - if (forceMove) { - this.scrollTop = self.vDomTopPad + topPadHeight + offset - (this.element.scrollWidth > this.element.clientWidth ? this.element.offsetHeight - this.element.clientHeight : 0); - } - - this.scrollTop = Math.min(this.scrollTop, this.element.scrollHeight - this.height); - - //adjust for horizontal scrollbar if present (and not at top of table) - if (this.element.scrollWidth > this.element.offsetWidth && forceMove) { - this.scrollTop += this.element.offsetHeight - this.element.clientHeight; - } - - this.vDomScrollPosTop = this.scrollTop; - this.vDomScrollPosBottom = this.scrollTop; - - holder.scrollTop = this.scrollTop; - - element.style.minWidth = onlyGroupHeaders ? self.table.columnManager.getWidth() + "px" : ""; - - if (self.table.options.groupBy) { - if (self.table.modules.layout.getMode() != "fitDataFill" && self.displayRowsCount == self.table.modules.groupRows.countGroups()) { - self.tableElement.style.minWidth = self.table.columnManager.getWidth(); - } - } - } else { - this.renderEmptyScroll(); - } - - if (!this.fixedHeight) { - this.adjustTableSize(); - } -}; - -//handle vertical scrolling -RowManager.prototype.scrollVertical = function (dir) { - var topDiff = this.scrollTop - this.vDomScrollPosTop; - var bottomDiff = this.scrollTop - this.vDomScrollPosBottom; - var margin = this.vDomWindowBuffer * 2; - - if (-topDiff > margin || bottomDiff > margin) { - //if big scroll redraw table; - var left = this.scrollLeft; - this._virtualRenderFill(Math.floor(this.element.scrollTop / this.element.scrollHeight * this.displayRowsCount)); - this.scrollHorizontal(left); - } else { - - if (dir) { - //scrolling up - if (topDiff < 0) { - - this._addTopRow(-topDiff); - } - - if (bottomDiff < 0) { - - //hide bottom row if needed - if (this.vDomScrollHeight - this.scrollTop > this.vDomWindowBuffer) { - this._removeBottomRow(-bottomDiff); - } else { - this.vDomScrollPosBottom = this.scrollTop; - } - } - } else { - //scrolling down - if (topDiff >= 0) { - - //hide top row if needed - if (this.scrollTop > this.vDomWindowBuffer) { - - this._removeTopRow(topDiff); - } else { - this.vDomScrollPosTop = this.scrollTop; - } - } - - if (bottomDiff >= 0) { - - this._addBottomRow(bottomDiff); - } - } - } -}; - -RowManager.prototype._addTopRow = function (topDiff) { - var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - - var table = this.tableElement, - rows = this.getDisplayRows(); - - if (this.vDomTop) { - var index = this.vDomTop - 1, - topRow = rows[index], - topRowHeight = topRow.getHeight() || this.vDomRowHeight; - - //hide top row if needed - if (topDiff >= topRowHeight) { - this.styleRow(topRow, index); - table.insertBefore(topRow.getElement(), table.firstChild); - if (!topRow.initialized || !topRow.heightInitialized) { - this.vDomTopNewRows.push(topRow); - - if (!topRow.heightInitialized) { - topRow.clearCellHeight(); - } - } - topRow.initialize(); - - this.vDomTopPad -= topRowHeight; - - if (this.vDomTopPad < 0) { - this.vDomTopPad = index * this.vDomRowHeight; - } - - if (!index) { - this.vDomTopPad = 0; - } - - table.style.paddingTop = this.vDomTopPad + "px"; - this.vDomScrollPosTop -= topRowHeight; - this.vDomTop--; - } - - topDiff = -(this.scrollTop - this.vDomScrollPosTop); - - if (topRow.getHeight() > this.vDomWindowBuffer) { - this.vDomWindowBuffer = topRow.getHeight() * 2; - } - - if (i < this.vDomMaxRenderChain && this.vDomTop && topDiff >= (rows[this.vDomTop - 1].getHeight() || this.vDomRowHeight)) { - this._addTopRow(topDiff, i + 1); - } else { - this._quickNormalizeRowHeight(this.vDomTopNewRows); - } - } -}; - -RowManager.prototype._removeTopRow = function (topDiff) { - var table = this.tableElement, - topRow = this.getDisplayRows()[this.vDomTop], - topRowHeight = topRow.getHeight() || this.vDomRowHeight; - - if (topDiff >= topRowHeight) { - - var rowEl = topRow.getElement(); - rowEl.parentNode.removeChild(rowEl); - - this.vDomTopPad += topRowHeight; - table.style.paddingTop = this.vDomTopPad + "px"; - this.vDomScrollPosTop += this.vDomTop ? topRowHeight : topRowHeight + this.vDomWindowBuffer; - this.vDomTop++; - - topDiff = this.scrollTop - this.vDomScrollPosTop; - - this._removeTopRow(topDiff); - } -}; - -RowManager.prototype._addBottomRow = function (bottomDiff) { - var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - - var table = this.tableElement, - rows = this.getDisplayRows(); - - if (this.vDomBottom < this.displayRowsCount - 1) { - var index = this.vDomBottom + 1, - bottomRow = rows[index], - bottomRowHeight = bottomRow.getHeight() || this.vDomRowHeight; - - //hide bottom row if needed - if (bottomDiff >= bottomRowHeight) { - this.styleRow(bottomRow, index); - table.appendChild(bottomRow.getElement()); - - if (!bottomRow.initialized || !bottomRow.heightInitialized) { - this.vDomBottomNewRows.push(bottomRow); - - if (!bottomRow.heightInitialized) { - bottomRow.clearCellHeight(); - } - } - - bottomRow.initialize(); - - this.vDomBottomPad -= bottomRowHeight; - - if (this.vDomBottomPad < 0 || index == this.displayRowsCount - 1) { - this.vDomBottomPad = 0; - } - - table.style.paddingBottom = this.vDomBottomPad + "px"; - this.vDomScrollPosBottom += bottomRowHeight; - this.vDomBottom++; - } - - bottomDiff = this.scrollTop - this.vDomScrollPosBottom; - - if (bottomRow.getHeight() > this.vDomWindowBuffer) { - this.vDomWindowBuffer = bottomRow.getHeight() * 2; - } - - if (i < this.vDomMaxRenderChain && this.vDomBottom < this.displayRowsCount - 1 && bottomDiff >= (rows[this.vDomBottom + 1].getHeight() || this.vDomRowHeight)) { - this._addBottomRow(bottomDiff, i + 1); - } else { - this._quickNormalizeRowHeight(this.vDomBottomNewRows); - } - } -}; - -RowManager.prototype._removeBottomRow = function (bottomDiff) { - var table = this.tableElement, - bottomRow = this.getDisplayRows()[this.vDomBottom], - bottomRowHeight = bottomRow.getHeight() || this.vDomRowHeight; - - if (bottomDiff >= bottomRowHeight) { - - var rowEl = bottomRow.getElement(); - - if (rowEl.parentNode) { - rowEl.parentNode.removeChild(rowEl); - } - - this.vDomBottomPad += bottomRowHeight; - - if (this.vDomBottomPad < 0) { - this.vDomBottomPad = 0; - } - - table.style.paddingBottom = this.vDomBottomPad + "px"; - this.vDomScrollPosBottom -= bottomRowHeight; - this.vDomBottom--; - - bottomDiff = -(this.scrollTop - this.vDomScrollPosBottom); - - this._removeBottomRow(bottomDiff); - } -}; - -RowManager.prototype._quickNormalizeRowHeight = function (rows) { - rows.forEach(function (row) { - row.calcHeight(); - }); - - rows.forEach(function (row) { - row.setCellHeight(); - }); - - rows.length = 0; -}; - -//normalize height of active rows -RowManager.prototype.normalizeHeight = function () { - this.activeRows.forEach(function (row) { - row.normalizeHeight(); - }); -}; - -//adjust the height of the table holder to fit in the Tabulator element -RowManager.prototype.adjustTableSize = function () { - var initialHeight = this.element.clientHeight, - modExists; - - if (this.renderMode === "virtual") { - var otherHeight = Math.floor(this.columnManager.getElement().offsetHeight + (this.table.footerManager && !this.table.footerManager.external ? this.table.footerManager.getElement().offsetHeight : 0)); - - if (this.fixedHeight) { - this.element.style.minHeight = "calc(100% - " + otherHeight + "px)"; - this.element.style.height = "calc(100% - " + otherHeight + "px)"; - this.element.style.maxHeight = "calc(100% - " + otherHeight + "px)"; - } else { - this.element.style.height = ""; - this.element.style.height = Math.floor(this.table.element.clientHeight) - otherHeight + "px"; - this.element.scrollTop = this.scrollTop; - } - - this.height = this.element.clientHeight; - this.vDomWindowBuffer = this.table.options.virtualDomBuffer || this.height; - - //check if the table has changed size when dealing with variable height tables - if (!this.fixedHeight && Math.floor(initialHeight) != Math.floor(this.element.clientHeight)) { - modExists = this.table.modExists("resizeTable"); - - if (modExists && !this.table.modules.resizeTable.autoResize || !modExists) { - this.redraw(); - } - } - } -}; - -//renitialize all rows -RowManager.prototype.reinitialize = function () { - this.rows.forEach(function (row) { - row.reinitialize(true); - }); -}; - -//prevent table from being redrawn -RowManager.prototype.blockRedraw = function () { - this.redrawBlock = true; - this.redrawBlockRestoreConfig = false; -}; - -//restore table redrawing -RowManager.prototype.restoreRedraw = function () { - this.redrawBlock = false; - - if (this.redrawBlockRestoreConfig) { - this.refreshActiveData(this.redrawBlockRestoreConfig.stage, this.redrawBlockRestoreConfig.skipStage, this.redrawBlockRestoreConfig.renderInPosition); - - this.redrawBlockRestoreConfig = false; - } else { - if (this.redrawBlockRederInPosition) { - this.reRenderInPosition(); - } - } - - this.redrawBlockRederInPosition = false; -}; - -//redraw table -RowManager.prototype.redraw = function (force) { - var pos = 0, - left = this.scrollLeft; - - this.adjustTableSize(); - - this.table.tableWidth = this.table.element.clientWidth; - - if (!force) { - if (this.renderMode == "classic") { - - if (this.table.options.groupBy) { - this.refreshActiveData("group", false, false); - } else { - this._simpleRender(); - } - } else { - this.reRenderInPosition(); - this.scrollHorizontal(left); - } - - if (!this.displayRowsCount) { - if (this.table.options.placeholder) { - this.getElement().appendChild(this.table.options.placeholder); - } - } - } else { - this.renderTable(); - } -}; - -RowManager.prototype.resetScroll = function () { - this.element.scrollLeft = 0; - this.element.scrollTop = 0; - - if (this.table.browser === "ie") { - var event = document.createEvent("Event"); - event.initEvent("scroll", false, true); - this.element.dispatchEvent(event); - } else { - this.element.dispatchEvent(new Event('scroll')); - } -}; - -var VDomHoz = function VDomHoz(table) { - this.table = table; - - this.element = this.table.rowManager.tableElement; - this.holderEl = this.table.rowManager.element; - - this.leftCol = 0; - this.rightCol = 0; - this.scrollLeft = 0; - - this.vDomScrollPosLeft = 0; - this.vDomScrollPosRight = 0; - - this.vDomPadLeft = 0; - this.vDomPadRight = 0; - - this.fitDataColAvg = 0; - - this.window = 200; //pixel margin to make column visible before it is shown on screen - - this.initialized = false; - - this.columns = []; - - if (this.compatabilityCheck()) { - this.initialize(); - } -}; - -VDomHoz.prototype.compatabilityCheck = function () { - var options = this.table.options, - frozen = false, - ok = true; - - if (options.layout == "fitDataTable") { - console.warn("Horizontal Vitrual DOM is not compatible with fitDataTable layout mode"); - ok = false; - } - - if (options.responsiveLayout) { - console.warn("Horizontal Vitrual DOM is not compatible with responsive columns"); - ok = false; - } - - if (this.table.rtl) { - console.warn("Horizontal Vitrual DOM is not currently compatible with RTL text direction"); - ok = false; - } - - // if(options.rowFormatter){ - // console.warn("Horizontal Vitrual DOM is not compatible with row formatters"); - // ok = false; - // } - - if (options.columns) { - frozen = options.columns.find(function (col) { - return col.frozen; - }); - - if (frozen) { - console.warn("Horizontal Vitrual DOM is not compatible with frozen columns"); - ok = false; - } - } - - if (!ok) { - options.virtualDomHoz = false; - } - - return ok; -}; - -VDomHoz.prototype.initialize = function () { - var _this17 = this; - - this.holderEl.addEventListener("scroll", function () { - var left = _this17.holderEl.scrollLeft; - - if (_this17.scrollLeft != left) { - _this17.scrollLeft = left; - _this17.scroll(left - (_this17.vDomScrollPosLeft + _this17.window)); - } - }); -}; - -VDomHoz.prototype.deinitialize = function () { - this.initialized = false; -}; - -VDomHoz.prototype.clear = function () { - this.columns = []; - - this.leftCol = -1; - this.rightCol = 0; - - this.vDomScrollPosLeft = 0; - this.vDomScrollPosRight = 0; - this.vDomPadLeft = 0; - this.vDomPadRight = 0; -}; - -VDomHoz.prototype.dataChange = function () { - var change = false, - collsWidth = 0, - colEnd = 0, - group, - row, - rowEl; - - if (this.table.options.layout === "fitData") { - this.table.columnManager.columnsByIndex.forEach(function (column) { - if (!column.definition.width && column.visible) { - change = true; - } - }); - - if (change) { - if (change && this.table.rowManager.getDisplayRows().length) { - // this.table.vdomHoz.deinitialize(); - - this.vDomScrollPosRight = this.scrollLeft + this.holderEl.clientWidth + this.window; - - if (this.table.options.groupBy) { - group = this.table.modules.groupRows.getGroups(false)[0]; - - row = group.getRows(false)[0]; - } else { - row = this.table.rowManager.getDisplayRows()[0]; - } - - if (row) { - - rowEl = row.getElement(); - - row.generateCells(); - - this.element.appendChild(rowEl); - - for (var colEnd = 0; colEnd < row.cells.length; colEnd++) { - var cell = row.cells[colEnd]; - rowEl.appendChild(cell.getElement()); - - cell.column.reinitializeWidth(); - - collsWidth += cell.column.getWidth(); - - if (collsWidth > this.vDomScrollPosRight) { - break; - } - } - - rowEl.parentNode.removeChild(rowEl); - - this.fitDataColAvg = Math.floor(collsWidth / (colEnd + 1)); - - for (colEnd; colEnd < this.table.columnManager.columnsByIndex.length; colEnd++) { - this.table.columnManager.columnsByIndex[colEnd].setWidth(this.fitDataColAvg); - } - - this.reinitialize(false, true); - } - } - } - } else { - if (this.table.options.layout === "fitColumns") { - this.table.modules.layout.layout(); - this.table.vdomHoz.reinitialize(false, true); - } - } -}; - -VDomHoz.prototype.fitDataLayoutOverride = function () { - for (var _i5 = this.leftCol; _i5 <= this.rightCol; _i5++) { - this.columns[_i5].reinitializeWidth(); - } -}; - -VDomHoz.prototype.reinitialize = function (update, blockRedraw) { - var _this18 = this; - - var old = { - cols: this.columns, - leftCol: this.leftCol, - rightCol: this.rightCol - }; - - if (update && !this.initialized) { - return; - } - - this.clear(); - - this.scrollLeft = this.holderEl.scrollLeft; - - this.vDomScrollPosLeft = this.scrollLeft - this.window; - this.vDomScrollPosRight = this.scrollLeft + this.holderEl.clientWidth + this.window; - - var colPos = 0; - - this.table.columnManager.columnsByIndex.forEach(function (column) { - var config = {}; - - if (column.visible) { - var width = column.getWidth(); - - config.leftPos = colPos; - config.rightPos = colPos + width; - - if (colPos + width > _this18.vDomScrollPosLeft && colPos < _this18.vDomScrollPosRight) { - //column is visible - - if (_this18.leftCol == -1) { - _this18.leftCol = _this18.columns.length; - _this18.vDomPadLeft = colPos; - } - - _this18.rightCol = _this18.columns.length; - } else { - // column is hidden - if (_this18.leftCol !== -1) { - _this18.vDomPadRight += width; - } - } - - _this18.columns.push(column); - - column.modules.vdomHoz = config; - - colPos += width; - } - }); - - this.element.style.paddingLeft = this.vDomPadLeft + "px"; - this.element.style.paddingRight = this.vDomPadRight + "px"; - - this.initialized = true; - - if (!blockRedraw) { - if (!update || this.reinitChanged(old)) { - this.renitializeRows(); - } - } - - this.holderEl.scrollLeft = this.scrollLeft; -}; - -VDomHoz.prototype.reinitChanged = function (old) { - var _this19 = this; - - var match = true; - - if (old.cols.length !== this.columns.length || old.leftCol !== this.leftCol || old.rightCol !== this.rightCol) { - return true; - } - - old.cols.forEach(function (col, i) { - if (col !== _this19.columns[i]) { - match = false; - } - }); - - return !match; -}; - -VDomHoz.prototype.renitializeRows = function () { - var _this20 = this; - - var rows = this.table.rowManager.getVisibleRows(); - rows.forEach(function (row) { - _this20.reinitializeRow(row, true); - }); -}; - -VDomHoz.prototype.scroll = function (diff) { - this.vDomScrollPosLeft += diff; - this.vDomScrollPosRight += diff; - - if (diff > this.holderEl.clientWidth * .8) { - this.reinitialize(); - } else { - if (diff > 0) { - //scroll right - this.addColRight(); - this.removeColLeft(); - } else { - //scroll left - this.addColLeft(); - this.removeColRight(); - } - } -}; - -VDomHoz.prototype.colPositionAdjust = function (start, end, diff) { - for (var _i6 = start; _i6 < end; _i6++) { - var column = this.columns[_i6]; - - column.modules.vdomHoz.leftPos -= diff; - column.modules.vdomHoz.rightPos -= diff; - } -}; - -VDomHoz.prototype.addColRight = function () { - var column = this.columns[this.rightCol + 1], - rows, - oldWidth, - widthDiff; - - if (column && column.modules.vdomHoz.leftPos <= this.vDomScrollPosRight) { - - rows = this.table.rowManager.getVisibleRows(); - - rows.forEach(function (row) { - if (row.type !== "group") { - var cell = row.getCell(column); - row.getElement().appendChild(cell.getElement()); - cell.cellRendered(); - } - }); - - if (this.fitDataColAvg) { - - oldWidth = column.getWidth(); - - if (oldWidth === this.fitDataColAvg) { - column.reinitializeWidth(); - - widthDiff = oldWidth - column.getWidth(); - - if (widthDiff) { - column.modules.vdomHoz.rightPos -= widthDiff; - this.colPositionAdjust(this.rightCol + 1, this.columns.length, widthDiff); - } - } - } - - this.rightCol++; - - if (this.rightCol >= this.columns.length - 1) { - this.vDomPadRight = 0; - } else { - this.vDomPadRight -= column.getWidth(); - } - - this.element.style.paddingRight = this.vDomPadRight + "px"; - - this.addColRight(); - } -}; - -VDomHoz.prototype.addColLeft = function () { - var column = this.columns[this.leftCol - 1], - rows; - - if (column && column.modules.vdomHoz.rightPos >= this.vDomScrollPosLeft) { - var rows = this.table.rowManager.getVisibleRows(); - - rows.forEach(function (row) { - if (row.type !== "group") { - var cell = row.getCell(column); - row.getElement().prepend(cell.getElement()); - cell.cellRendered(); - } - }); - - if (!this.leftCol) { - this.vDomPadLeft = 0; - } else { - this.vDomPadLeft -= column.getWidth(); - } - - this.element.style.paddingLeft = this.vDomPadLeft + "px"; - - this.leftCol--; - - this.addColLeft(); - } -}; - -VDomHoz.prototype.removeColRight = function (column) { - var column = this.columns[this.rightCol], - rows; - - if (column && column.modules.vdomHoz.leftPos > this.vDomScrollPosRight) { - rows = this.table.rowManager.getVisibleRows(); - - column.modules.vdomHoz.visible = false; - - rows.forEach(function (row) { - if (row.type !== "group") { - var cell = row.getCell(column); - row.getElement().removeChild(cell.getElement()); - } - }); - - this.vDomPadRight += column.getWidth(); - this.element.style.paddingRight = this.vDomPadRight + "px"; - - this.rightCol--; - - this.removeColRight(); - } -}; - -VDomHoz.prototype.removeColLeft = function () { - var column = this.columns[this.leftCol], - rows; - - if (column && column.modules.vdomHoz.rightPos < this.vDomScrollPosLeft) { - - rows = this.table.rowManager.getVisibleRows(); - - rows.forEach(function (row) { - if (row.type !== "group") { - var cell = row.getCell(column); - row.getElement().removeChild(cell.getElement()); - } - }); - - this.vDomPadLeft += column.getWidth(); - this.element.style.paddingLeft = this.vDomPadLeft + "px"; - - this.leftCol++; - - this.removeColLeft(); - } -}; - -VDomHoz.prototype.initializeRow = function (row) { - if (row.type !== "group") { - row.modules.vdomHoz = { - leftCol: this.leftCol, - rightCol: this.rightCol - }; - - for (var _i7 = this.leftCol; _i7 <= this.rightCol; _i7++) { - var column = this.columns[_i7]; - - if (column.visible) { - var cell = row.getCell(column); - - row.element.appendChild(cell.getElement()); - cell.cellRendered(); - } - } - } -}; - -VDomHoz.prototype.reinitializeRow = function (row, force) { - if (row.type !== "group") { - if (force || !row.modules.vdomHoz || row.modules.vdomHoz.leftCol !== this.leftCol || row.modules.vdomHoz.rightCol !== this.rightCol) { - while (row.element.firstChild) { - row.element.removeChild(row.element.firstChild); - }this.initializeRow(row); - } - } -}; -//public row object -var RowComponent = function RowComponent(row) { - this._row = row; -}; - -RowComponent.prototype.getData = function (transform) { - return this._row.getData(transform); -}; - -RowComponent.prototype.getElement = function () { - return this._row.getElement(); -}; - -RowComponent.prototype.getCells = function () { - var cells = []; - - this._row.getCells().forEach(function (cell) { - cells.push(cell.getComponent()); - }); - - return cells; -}; - -RowComponent.prototype.getCell = function (column) { - var cell = this._row.getCell(column); - return cell ? cell.getComponent() : false; -}; - -RowComponent.prototype.getIndex = function () { - return this._row.getData("data")[this._row.table.options.index]; -}; - -RowComponent.prototype.getPosition = function (active) { - return this._row.table.rowManager.getRowPosition(this._row, active); -}; - -RowComponent.prototype.delete = function () { - return this._row.delete(); -}; - -RowComponent.prototype.scrollTo = function () { - return this._row.table.rowManager.scrollToRow(this._row); -}; - -RowComponent.prototype.pageTo = function () { - if (this._row.table.modExists("page", true)) { - return this._row.table.modules.page.setPageToRow(this._row); - } -}; - -RowComponent.prototype.move = function (to, after) { - this._row.moveToRow(to, after); -}; - -RowComponent.prototype.update = function (data) { - return this._row.updateData(data); -}; - -RowComponent.prototype.normalizeHeight = function () { - this._row.normalizeHeight(true); -}; - -RowComponent.prototype.select = function () { - this._row.table.modules.selectRow.selectRows(this._row); -}; - -RowComponent.prototype.deselect = function () { - this._row.table.modules.selectRow.deselectRows(this._row); -}; - -RowComponent.prototype.toggleSelect = function () { - this._row.table.modules.selectRow.toggleRow(this._row); -}; - -RowComponent.prototype.isSelected = function () { - return this._row.table.modules.selectRow.isRowSelected(this._row); -}; - -RowComponent.prototype._getSelf = function () { - return this._row; -}; - -RowComponent.prototype.validate = function () { - return this._row.validate(); -}; - -RowComponent.prototype.freeze = function () { - if (this._row.table.modExists("frozenRows", true)) { - this._row.table.modules.frozenRows.freezeRow(this._row); - } -}; - -RowComponent.prototype.unfreeze = function () { - if (this._row.table.modExists("frozenRows", true)) { - this._row.table.modules.frozenRows.unfreezeRow(this._row); - } -}; - -RowComponent.prototype.isFrozen = function () { - if (this._row.table.modExists("frozenRows", true)) { - var index = this._row.table.modules.frozenRows.rows.indexOf(this._row); - return index > -1; - } - - return false; -}; - -RowComponent.prototype.treeCollapse = function () { - if (this._row.table.modExists("dataTree", true)) { - this._row.table.modules.dataTree.collapseRow(this._row); - } -}; - -RowComponent.prototype.treeExpand = function () { - if (this._row.table.modExists("dataTree", true)) { - this._row.table.modules.dataTree.expandRow(this._row); - } -}; - -RowComponent.prototype.treeToggle = function () { - if (this._row.table.modExists("dataTree", true)) { - this._row.table.modules.dataTree.toggleRow(this._row); - } -}; - -RowComponent.prototype.getTreeParent = function () { - if (this._row.table.modExists("dataTree", true)) { - return this._row.table.modules.dataTree.getTreeParent(this._row); - } - - return false; -}; - -RowComponent.prototype.getTreeChildren = function () { - if (this._row.table.modExists("dataTree", true)) { - return this._row.table.modules.dataTree.getTreeChildren(this._row, true); - } - - return false; -}; - -RowComponent.prototype.addTreeChild = function (data, pos, index) { - if (this._row.table.modExists("dataTree", true)) { - return this._row.table.modules.dataTree.addTreeChildRow(this._row, data, pos, index); - } - - return false; -}; - -RowComponent.prototype.reformat = function () { - return this._row.reinitialize(); -}; - -RowComponent.prototype.getGroup = function () { - return this._row.getGroup().getComponent(); -}; - -RowComponent.prototype.getTable = function () { - return this._row.table; -}; - -RowComponent.prototype.getNextRow = function () { - var row = this._row.nextRow(); - return row ? row.getComponent() : row; -}; - -RowComponent.prototype.getPrevRow = function () { - var row = this._row.prevRow(); - return row ? row.getComponent() : row; -}; - -var Row = function Row(data, parent) { - var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "row"; - - this.table = parent.table; - this.parent = parent; - this.data = {}; - this.type = type; //type of element - this.element = this.createElement(); - this.modules = {}; //hold module variables; - this.cells = []; - this.height = 0; //hold element height - this.heightStyled = ""; //hold element height prestyled to improve render efficiency - this.manualHeight = false; //user has manually set row height - this.outerHeight = 0; //holde lements outer height - this.initialized = false; //element has been rendered - this.heightInitialized = false; //element has resized cells to fit - - this.component = null; - - this.setData(data); - this.generateElement(); -}; - -Row.prototype.createElement = function () { - var el = document.createElement("div"); - - el.classList.add("tabulator-row"); - el.setAttribute("role", "row"); - - return el; -}; - -Row.prototype.getElement = function () { - return this.element; -}; - -Row.prototype.detachElement = function () { - if (this.element && this.element.parentNode) { - this.element.parentNode.removeChild(this.element); - } -}; - -Row.prototype.generateElement = function () { - var self = this, - dblTap, - tapHold, - tap; - - //set row selection characteristics - if (self.table.options.selectable !== false && self.table.modExists("selectRow")) { - self.table.modules.selectRow.initializeRow(this); - } - - //setup movable rows - if (self.table.options.movableRows !== false && self.table.modExists("moveRow")) { - self.table.modules.moveRow.initializeRow(this); - } - - //setup data tree - if (self.table.options.dataTree !== false && self.table.modExists("dataTree")) { - self.table.modules.dataTree.initializeRow(this); - } - - //setup column colapse container - if (self.table.options.responsiveLayout === "collapse" && self.table.modExists("responsiveLayout")) { - self.table.modules.responsiveLayout.initializeRow(this); - } - - //set column menu - if ((self.table.options.rowContextMenu || self.table.options.rowClickMenu) && this.table.modExists("menu")) { - self.table.modules.menu.initializeRow(this); - } - - //handle row click events - if (self.table.options.rowClick) { - self.element.addEventListener("click", function (e) { - self.table.options.rowClick(e, self.getComponent()); - }); - } - - if (self.table.options.rowDblClick) { - self.element.addEventListener("dblclick", function (e) { - self.table.options.rowDblClick(e, self.getComponent()); - }); - } - - if (self.table.options.rowContext) { - self.element.addEventListener("contextmenu", function (e) { - self.table.options.rowContext(e, self.getComponent()); - }); - } - - //handle mouse events - if (self.table.options.rowMouseEnter) { - self.element.addEventListener("mouseenter", function (e) { - self.table.options.rowMouseEnter(e, self.getComponent()); - }); - } - - if (self.table.options.rowMouseLeave) { - self.element.addEventListener("mouseleave", function (e) { - self.table.options.rowMouseLeave(e, self.getComponent()); - }); - } - - if (self.table.options.rowMouseOver) { - self.element.addEventListener("mouseover", function (e) { - self.table.options.rowMouseOver(e, self.getComponent()); - }); - } - - if (self.table.options.rowMouseOut) { - self.element.addEventListener("mouseout", function (e) { - self.table.options.rowMouseOut(e, self.getComponent()); - }); - } - - if (self.table.options.rowMouseMove) { - self.element.addEventListener("mousemove", function (e) { - self.table.options.rowMouseMove(e, self.getComponent()); - }); - } - - if (self.table.options.rowTap) { - - tap = false; - - self.element.addEventListener("touchstart", function (e) { - tap = true; - }, { passive: true }); - - self.element.addEventListener("touchend", function (e) { - if (tap) { - self.table.options.rowTap(e, self.getComponent()); - } - - tap = false; - }); - } - - if (self.table.options.rowDblTap) { - - dblTap = null; - - self.element.addEventListener("touchend", function (e) { - - if (dblTap) { - clearTimeout(dblTap); - dblTap = null; - - self.table.options.rowDblTap(e, self.getComponent()); - } else { - - dblTap = setTimeout(function () { - clearTimeout(dblTap); - dblTap = null; - }, 300); - } - }); - } - - if (self.table.options.rowTapHold) { - - tapHold = null; - - self.element.addEventListener("touchstart", function (e) { - clearTimeout(tapHold); - - tapHold = setTimeout(function () { - clearTimeout(tapHold); - tapHold = null; - tap = false; - self.table.options.rowTapHold(e, self.getComponent()); - }, 1000); - }, { passive: true }); - - self.element.addEventListener("touchend", function (e) { - clearTimeout(tapHold); - tapHold = null; - }); - } -}; - -Row.prototype.generateCells = function () { - this.cells = this.table.columnManager.generateCells(this); -}; - -//functions to setup on first render -Row.prototype.initialize = function (force) { - var _this21 = this; - - if (!this.initialized || force) { - - this.deleteCells(); - - while (this.element.firstChild) { - this.element.removeChild(this.element.firstChild); - } //handle frozen cells - if (this.table.modExists("frozenColumns")) { - this.table.modules.frozenColumns.layoutRow(this); - } - - this.generateCells(); - - if (this.table.options.virtualDomHoz && this.table.vdomHoz.initialized) { - this.table.vdomHoz.initializeRow(this); - } else { - this.cells.forEach(function (cell) { - _this21.element.appendChild(cell.getElement()); - cell.cellRendered(); - }); - } - - if (force) { - this.normalizeHeight(); - } - - //setup movable rows - if (this.table.options.dataTree && this.table.modExists("dataTree")) { - this.table.modules.dataTree.layoutRow(this); - } - - //setup column colapse container - if (this.table.options.responsiveLayout === "collapse" && this.table.modExists("responsiveLayout")) { - this.table.modules.responsiveLayout.layoutRow(this); - } - - if (this.table.options.rowFormatter) { - this.table.options.rowFormatter(this.getComponent()); - } - - //set resizable handles - if (this.table.options.resizableRows && this.table.modExists("resizeRows")) { - this.table.modules.resizeRows.initializeRow(this); - } - - this.initialized = true; - } else { - if (this.table.options.virtualDomHoz) { - this.table.vdomHoz.reinitializeRow(this); - } - } -}; - -Row.prototype.reinitializeHeight = function () { - this.heightInitialized = false; - - if (this.element.offsetParent !== null) { - this.normalizeHeight(true); - } -}; - -Row.prototype.reinitialize = function (children) { - this.initialized = false; - this.heightInitialized = false; - - if (!this.manualHeight) { - this.height = 0; - this.heightStyled = ""; - } - - if (this.element.offsetParent !== null) { - this.initialize(true); - } - - if (this.table.options.dataTree && this.table.modExists("dataTree", true)) { - this.table.modules.dataTree.getTreeChildren(this, false, true).forEach(function (child) { - child.reinitialize(true); - }); - } -}; - -//get heights when doing bulk row style calcs in virtual DOM -Row.prototype.calcHeight = function (force) { - - var maxHeight = 0, - minHeight = this.table.options.resizableRows ? this.element.clientHeight : 0; - - this.cells.forEach(function (cell) { - var height = cell.getHeight(); - if (height > maxHeight) { - maxHeight = height; - } - }); - - if (force) { - this.height = Math.max(maxHeight, minHeight); - } else { - this.height = this.manualHeight ? this.height : Math.max(maxHeight, minHeight); - } - - this.heightStyled = this.height ? this.height + "px" : ""; - this.outerHeight = this.element.offsetHeight; -}; - -//set of cells -Row.prototype.setCellHeight = function () { - this.cells.forEach(function (cell) { - cell.setHeight(); - }); - - this.heightInitialized = true; -}; - -Row.prototype.clearCellHeight = function () { - this.cells.forEach(function (cell) { - cell.clearHeight(); - }); -}; - -//normalize the height of elements in the row -Row.prototype.normalizeHeight = function (force) { - - if (force) { - this.clearCellHeight(); - } - - this.calcHeight(force); - - this.setCellHeight(); -}; - -// Row.prototype.setHeight = function(height){ -// this.height = height; - -// this.setCellHeight(); -// }; - -//set height of rows -Row.prototype.setHeight = function (height, force) { - if (this.height != height || force) { - - this.manualHeight = true; - - this.height = height; - this.heightStyled = height ? height + "px" : ""; - - this.setCellHeight(); - - // this.outerHeight = this.element.outerHeight(); - this.outerHeight = this.element.offsetHeight; - } -}; - -//return rows outer height -Row.prototype.getHeight = function () { - return this.outerHeight; -}; - -//return rows outer Width -Row.prototype.getWidth = function () { - return this.element.offsetWidth; -}; - -//////////////// Cell Management ///////////////// - -Row.prototype.deleteCell = function (cell) { - var index = this.cells.indexOf(cell); - - if (index > -1) { - this.cells.splice(index, 1); - } -}; - -//////////////// Data Management ///////////////// - -Row.prototype.setData = function (data) { - if (this.table.modExists("mutator")) { - data = this.table.modules.mutator.transformRow(data, "data"); - } - - this.data = data; - - if (this.table.options.reactiveData && this.table.modExists("reactiveData", true)) { - this.table.modules.reactiveData.watchRow(this); - } -}; - -//update the rows data -Row.prototype.updateData = function (updatedData) { - var _this22 = this; - - var visible = Tabulator.prototype.helpers.elVisible(this.element), - tempData = {}, - newRowData; - - return new Promise(function (resolve, reject) { - - if (typeof updatedData === "string") { - updatedData = JSON.parse(updatedData); - } - - if (_this22.table.options.reactiveData && _this22.table.modExists("reactiveData", true)) { - _this22.table.modules.reactiveData.block(); - } - - //mutate incomming data if needed - if (_this22.table.modExists("mutator")) { - - tempData = Object.assign(tempData, _this22.data); - tempData = Object.assign(tempData, updatedData); - - newRowData = _this22.table.modules.mutator.transformRow(tempData, "data", updatedData); - } else { - newRowData = updatedData; - } - - //set data - for (var attrname in newRowData) { - _this22.data[attrname] = newRowData[attrname]; - } - - if (_this22.table.options.reactiveData && _this22.table.modExists("reactiveData", true)) { - _this22.table.modules.reactiveData.unblock(); - } - - //update affected cells only - for (var attrname in updatedData) { - - var columns = _this22.table.columnManager.getColumnsByFieldRoot(attrname); - - columns.forEach(function (column) { - var cell = _this22.getCell(column.getField()); - - if (cell) { - var value = column.getFieldValue(newRowData); - if (cell.getValue() != value) { - cell.setValueProcessData(value); - - if (visible) { - cell.cellRendered(); - } - } - } - }); - } - - if (_this22.table.options.groupUpdateOnCellEdit && _this22.table.options.groupBy && _this22.table.modExists("groupRows")) { - _this22.table.modules.groupRows.reassignRowToGroup(_this22.row); - } - - //Partial reinitialization if visible - if (visible) { - _this22.normalizeHeight(true); - - if (_this22.table.options.rowFormatter) { - _this22.table.options.rowFormatter(_this22.getComponent()); - } - } else { - _this22.initialized = false; - _this22.height = 0; - _this22.heightStyled = ""; - } - - if (_this22.table.options.dataTree !== false && _this22.table.modExists("dataTree") && _this22.table.modules.dataTree.redrawNeeded(updatedData)) { - _this22.table.modules.dataTree.initializeRow(_this22); - - if (visible) { - _this22.table.modules.dataTree.layoutRow(_this22); - _this22.table.rowManager.refreshActiveData("tree", false, true); - } - } - - //this.reinitialize(); - - _this22.table.options.rowUpdated.call(_this22.table, _this22.getComponent()); - - if (_this22.table.options.dataChanged) { - _this22.table.options.dataChanged.call(_this22.table, _this22.table.rowManager.getData()); - } - - resolve(); - }); -}; - -Row.prototype.getData = function (transform) { - if (transform) { - if (this.table.modExists("accessor")) { - return this.table.modules.accessor.transformRow(this, transform); - } - } - - return this.data; -}; - -Row.prototype.getCell = function (column) { - var match = false; - - column = this.table.columnManager.findColumn(column); - - match = this.cells.find(function (cell) { - return cell.column === column; - }); - - return match; -}; - -Row.prototype.getCellIndex = function (findCell) { - return this.cells.findIndex(function (cell) { - return cell === findCell; - }); -}; - -Row.prototype.findNextEditableCell = function (index) { - var nextCell = false; - - if (index < this.cells.length - 1) { - for (var i = index + 1; i < this.cells.length; i++) { - var cell = this.cells[i]; - - if (cell.column.modules.edit && Tabulator.prototype.helpers.elVisible(cell.getElement())) { - var allowEdit = true; - - if (typeof cell.column.modules.edit.check == "function") { - allowEdit = cell.column.modules.edit.check(cell.getComponent()); - } - - if (allowEdit) { - nextCell = cell; - break; - } - } - } - } - - return nextCell; -}; - -Row.prototype.findPrevEditableCell = function (index) { - var prevCell = false; - - if (index > 0) { - for (var i = index - 1; i >= 0; i--) { - var cell = this.cells[i], - allowEdit = true; - - if (cell.column.modules.edit && Tabulator.prototype.helpers.elVisible(cell.getElement())) { - if (typeof cell.column.modules.edit.check == "function") { - allowEdit = cell.column.modules.edit.check(cell.getComponent()); - } - - if (allowEdit) { - prevCell = cell; - break; - } - } - } - } - - return prevCell; -}; - -Row.prototype.getCells = function () { - return this.cells; -}; - -Row.prototype.nextRow = function () { - var row = this.table.rowManager.nextDisplayRow(this, true); - return row || false; -}; - -Row.prototype.prevRow = function () { - var row = this.table.rowManager.prevDisplayRow(this, true); - return row || false; -}; - -Row.prototype.moveToRow = function (to, before) { - var toRow = this.table.rowManager.findRow(to); - - if (toRow) { - this.table.rowManager.moveRowActual(this, toRow, !before); - this.table.rowManager.refreshActiveData("display", false, true); - } else { - console.warn("Move Error - No matching row found:", to); - } -}; - -Row.prototype.validate = function () { - var invalid = []; - - this.cells.forEach(function (cell) { - if (!cell.validate()) { - invalid.push(cell.getComponent()); - } - }); - - return invalid.length ? invalid : true; -}; - -///////////////////// Actions ///////////////////// - -Row.prototype.delete = function () { - var _this23 = this; - - return new Promise(function (resolve, reject) { - var index, rows; - - if (_this23.table.options.history && _this23.table.modExists("history")) { - - if (_this23.table.options.groupBy && _this23.table.modExists("groupRows")) { - rows = _this23.getGroup().rows; - index = rows.indexOf(_this23); - - if (index) { - index = rows[index - 1]; - } - } else { - index = _this23.table.rowManager.getRowIndex(_this23); - - if (index) { - index = _this23.table.rowManager.rows[index - 1]; - } - } - - _this23.table.modules.history.action("rowDelete", _this23, { data: _this23.getData(), pos: !index, index: index }); - } - - _this23.deleteActual(); - - resolve(); - }); -}; - -Row.prototype.deleteActual = function (blockRedraw) { - var index = this.table.rowManager.getRowIndex(this); - - this.detatchModules(); - - // if(this.table.options.dataTree && this.table.modExists("dataTree")){ - // this.table.modules.dataTree.collapseRow(this, true); - // } - - //remove any reactive data watchers from row object - if (this.table.options.reactiveData && this.table.modExists("reactiveData", true)) {} - // this.table.modules.reactiveData.unwatchRow(this); - - - //remove from group - if (this.modules.group) { - this.modules.group.removeRow(this); - } - - this.table.rowManager.deleteRow(this, blockRedraw); - - this.deleteCells(); - - this.initialized = false; - this.heightInitialized = false; - this.element = false; - - if (this.table.options.dataTree && this.table.modExists("dataTree", true)) { - this.table.modules.dataTree.rowDelete(this); - } - - //recalc column calculations if present - if (this.table.modExists("columnCalcs")) { - if (this.table.options.groupBy && this.table.modExists("groupRows")) { - this.table.modules.columnCalcs.recalcRowGroup(this); - } else { - this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); - } - } -}; - -Row.prototype.detatchModules = function () { - //deselect row if it is selected - if (this.table.modExists("selectRow")) { - this.table.modules.selectRow._deselectRow(this, true); - } - - //cancel edit if row is currently being edited - if (this.table.modExists("edit")) { - if (this.table.modules.edit.currentCell.row === this) { - this.table.modules.edit.cancelEdit(); - } - } - - if (this.table.modExists("frozenRows")) { - this.table.modules.frozenRows.detachRow(this); - } -}; - -Row.prototype.deleteCells = function () { - var cellCount = this.cells.length; - - for (var _i8 = 0; _i8 < cellCount; _i8++) { - this.cells[0].delete(); - } -}; - -Row.prototype.wipe = function () { - this.detatchModules(); - this.deleteCells(); - - while (this.element.firstChild) { - this.element.removeChild(this.element.firstChild); - }this.element = false; - this.modules = {}; - - if (this.element.parentNode) { - this.element.parentNode.removeChild(this.element); - } -}; - -Row.prototype.getGroup = function () { - return this.modules.group || false; -}; - -//////////////// Object Generation ///////////////// -Row.prototype.getComponent = function () { - if (!this.component) { - this.component = new RowComponent(this); - } - - return this.component; -}; - -//public row object -var CellComponent = function CellComponent(cell) { - this._cell = cell; -}; - -CellComponent.prototype.getValue = function () { - return this._cell.getValue(); -}; - -CellComponent.prototype.getOldValue = function () { - return this._cell.getOldValue(); -}; - -CellComponent.prototype.getInitialValue = function () { - return this._cell.initialValue; -}; - -CellComponent.prototype.getElement = function () { - return this._cell.getElement(); -}; - -CellComponent.prototype.getRow = function () { - return this._cell.row.getComponent(); -}; - -CellComponent.prototype.getData = function () { - return this._cell.row.getData(); -}; - -CellComponent.prototype.getField = function () { - return this._cell.column.getField(); -}; - -CellComponent.prototype.getColumn = function () { - return this._cell.column.getComponent(); -}; - -CellComponent.prototype.setValue = function (value, mutate) { - if (typeof mutate == "undefined") { - mutate = true; - } - - this._cell.setValue(value, mutate); -}; - -CellComponent.prototype.restoreOldValue = function () { - this._cell.setValueActual(this._cell.getOldValue()); -}; - -CellComponent.prototype.restoreInitialValue = function () { - this._cell.setValueActual(this._cell.initialValue); -}; - -CellComponent.prototype.edit = function (force) { - return this._cell.edit(force); -}; - -CellComponent.prototype.cancelEdit = function () { - this._cell.cancelEdit(); -}; - -CellComponent.prototype.isEdited = function () { - return !!this._cell.modules.edit && this._cell.modules.edit.edited; -}; - -CellComponent.prototype.clearEdited = function () { - if (self.table.modExists("edit", true)) { - this._cell.table.modules.edit.clearEdited(this._cell); - } -}; - -CellComponent.prototype.isValid = function () { - return this._cell.modules.validate ? !this._cell.modules.validate.invalid : true; -}; - -CellComponent.prototype.validate = function () { - return this._cell.validate(); -}; - -CellComponent.prototype.clearValidation = function () { - if (this._cell.table.modExists("validate", true)) { - this._cell.table.modules.validate.clearValidation(this._cell); - } -}; - -CellComponent.prototype.nav = function () { - return this._cell.nav(); -}; - -CellComponent.prototype.checkHeight = function () { - this._cell.checkHeight(); -}; - -CellComponent.prototype.getTable = function () { - return this._cell.table; -}; - -CellComponent.prototype._getSelf = function () { - return this._cell; -}; - -var Cell = function Cell(column, row) { - - this.table = column.table; - this.column = column; - this.row = row; - this.element = null; - this.value = null; - this.initialValue; - this.oldValue = null; - this.modules = {}; - - this.height = null; - this.width = null; - this.minWidth = null; - - this.component = null; - - this.loaded = false; //track if the cell has been added to the DOM yet - - this.build(); -}; - -//////////////// Setup Functions ///////////////// - -//generate element -Cell.prototype.build = function () { - this.generateElement(); - - this.setWidth(); - - this._configureCell(); - - this.setValueActual(this.column.getFieldValue(this.row.data)); - - this.initialValue = this.value; -}; - -Cell.prototype.generateElement = function () { - this.element = document.createElement('div'); - this.element.className = "tabulator-cell"; - this.element.setAttribute("role", "gridcell"); - this.element = this.element; -}; - -Cell.prototype._configureCell = function () { - var self = this, - cellEvents = self.column.cellEvents, - element = self.element, - field = this.column.getField(), - vertAligns = { - top: "flex-start", - bottom: "flex-end", - middle: "center" - }, - hozAligns = { - left: "flex-start", - right: "flex-end", - center: "center" - }; - - //set text alignment - element.style.textAlign = self.column.hozAlign; - - if (self.column.vertAlign) { - element.style.display = "inline-flex"; - - element.style.alignItems = vertAligns[self.column.vertAlign] || ""; - - if (self.column.hozAlign) { - element.style.justifyContent = hozAligns[self.column.hozAlign] || ""; - } - } - - if (field) { - element.setAttribute("tabulator-field", field); - } - - //add class to cell if needed - if (self.column.definition.cssClass) { - var classNames = self.column.definition.cssClass.split(" "); - classNames.forEach(function (className) { - element.classList.add(className); - }); - } - - //update tooltip on mouse enter - if (this.table.options.tooltipGenerationMode === "hover") { - element.addEventListener("mouseenter", function (e) { - self._generateTooltip(); - }); - } - - self._bindClickEvents(cellEvents); - - self._bindTouchEvents(cellEvents); - - self._bindMouseEvents(cellEvents); - - if (self.column.modules.edit) { - self.table.modules.edit.bindEditor(self); - } - - if (self.column.definition.rowHandle && self.table.options.movableRows !== false && self.table.modExists("moveRow")) { - self.table.modules.moveRow.initializeCell(self); - } - - //hide cell if not visible - if (!self.column.visible) { - self.hide(); - } -}; - -Cell.prototype._bindClickEvents = function (cellEvents) { - var self = this, - element = self.element; - - //set event bindings - if (cellEvents.cellClick || self.table.options.cellClick) { - element.addEventListener("click", function (e) { - var component = self.getComponent(); - - if (cellEvents.cellClick) { - cellEvents.cellClick.call(self.table, e, component); - } - - if (self.table.options.cellClick) { - self.table.options.cellClick.call(self.table, e, component); - } - }); - } - - if (cellEvents.cellDblClick || this.table.options.cellDblClick) { - element.addEventListener("dblclick", function (e) { - var component = self.getComponent(); - - if (cellEvents.cellDblClick) { - cellEvents.cellDblClick.call(self.table, e, component); - } - - if (self.table.options.cellDblClick) { - self.table.options.cellDblClick.call(self.table, e, component); - } - }); - } else { - element.addEventListener("dblclick", function (e) { - - if (self.table.modExists("edit")) { - if (self.table.modules.edit.currentCell === self) { - return; //prevent instant selection of editor content - } - } - - e.preventDefault(); - - try { - if (document.selection) { - // IE - var range = document.body.createTextRange(); - range.moveToElementText(self.element); - range.select(); - } else if (window.getSelection) { - var range = document.createRange(); - range.selectNode(self.element); - window.getSelection().removeAllRanges(); - window.getSelection().addRange(range); - } - } catch (e) {} - }); - } - - if (cellEvents.cellContext || this.table.options.cellContext) { - element.addEventListener("contextmenu", function (e) { - var component = self.getComponent(); - - if (cellEvents.cellContext) { - cellEvents.cellContext.call(self.table, e, component); - } - - if (self.table.options.cellContext) { - self.table.options.cellContext.call(self.table, e, component); - } - }); - } -}; - -Cell.prototype._bindMouseEvents = function (cellEvents) { - var self = this, - element = self.element; - - if (cellEvents.cellMouseEnter || self.table.options.cellMouseEnter) { - element.addEventListener("mouseenter", function (e) { - var component = self.getComponent(); - - if (cellEvents.cellMouseEnter) { - cellEvents.cellMouseEnter.call(self.table, e, component); - } - - if (self.table.options.cellMouseEnter) { - self.table.options.cellMouseEnter.call(self.table, e, component); - } - }); - } - - if (cellEvents.cellMouseLeave || self.table.options.cellMouseLeave) { - element.addEventListener("mouseleave", function (e) { - var component = self.getComponent(); - - if (cellEvents.cellMouseLeave) { - cellEvents.cellMouseLeave.call(self.table, e, component); - } - - if (self.table.options.cellMouseLeave) { - self.table.options.cellMouseLeave.call(self.table, e, component); - } - }); - } - - if (cellEvents.cellMouseOver || self.table.options.cellMouseOver) { - element.addEventListener("mouseover", function (e) { - var component = self.getComponent(); - - if (cellEvents.cellMouseOver) { - cellEvents.cellMouseOver.call(self.table, e, component); - } - - if (self.table.options.cellMouseOver) { - self.table.options.cellMouseOver.call(self.table, e, component); - } - }); - } - - if (cellEvents.cellMouseOut || self.table.options.cellMouseOut) { - element.addEventListener("mouseout", function (e) { - var component = self.getComponent(); - - if (cellEvents.cellMouseOut) { - cellEvents.cellMouseOut.call(self.table, e, component); - } - - if (self.table.options.cellMouseOut) { - self.table.options.cellMouseOut.call(self.table, e, component); - } - }); - } - - if (cellEvents.cellMouseMove || self.table.options.cellMouseMove) { - element.addEventListener("mousemove", function (e) { - var component = self.getComponent(); - - if (cellEvents.cellMouseMove) { - cellEvents.cellMouseMove.call(self.table, e, component); - } - - if (self.table.options.cellMouseMove) { - self.table.options.cellMouseMove.call(self.table, e, component); - } - }); - } -}; - -Cell.prototype._bindTouchEvents = function (cellEvents) { - var self = this, - element = self.element, - dblTap, - tapHold, - tap; - - if (cellEvents.cellTap || this.table.options.cellTap) { - tap = false; - - element.addEventListener("touchstart", function (e) { - tap = true; - }, { passive: true }); - - element.addEventListener("touchend", function (e) { - if (tap) { - var component = self.getComponent(); - - if (cellEvents.cellTap) { - cellEvents.cellTap.call(self.table, e, component); - } - - if (self.table.options.cellTap) { - self.table.options.cellTap.call(self.table, e, component); - } - } - - tap = false; - }); - } - - if (cellEvents.cellDblTap || this.table.options.cellDblTap) { - dblTap = null; - - element.addEventListener("touchend", function (e) { - - if (dblTap) { - clearTimeout(dblTap); - dblTap = null; - - var component = self.getComponent(); - - if (cellEvents.cellDblTap) { - cellEvents.cellDblTap.call(self.table, e, component); - } - - if (self.table.options.cellDblTap) { - self.table.options.cellDblTap.call(self.table, e, component); - } - } else { - - dblTap = setTimeout(function () { - clearTimeout(dblTap); - dblTap = null; - }, 300); - } - }); - } - - if (cellEvents.cellTapHold || this.table.options.cellTapHold) { - tapHold = null; - - element.addEventListener("touchstart", function (e) { - clearTimeout(tapHold); - - tapHold = setTimeout(function () { - clearTimeout(tapHold); - tapHold = null; - tap = false; - var component = self.getComponent(); - - if (cellEvents.cellTapHold) { - cellEvents.cellTapHold.call(self.table, e, component); - } - - if (self.table.options.cellTapHold) { - self.table.options.cellTapHold.call(self.table, e, component); - } - }, 1000); - }, { passive: true }); - - element.addEventListener("touchend", function (e) { - clearTimeout(tapHold); - tapHold = null; - }); - } -}; - -//generate cell contents -Cell.prototype._generateContents = function () { - var val; - - if (this.table.modExists("format")) { - val = this.table.modules.format.formatValue(this); - } else { - val = this.element.innerHTML = this.value; - } - - switch (typeof val === 'undefined' ? 'undefined' : _typeof(val)) { - case "object": - if (val instanceof Node) { - - //clear previous cell contents - while (this.element.firstChild) { - this.element.removeChild(this.element.firstChild); - }this.element.appendChild(val); - } else { - this.element.innerHTML = ""; - - if (val != null) { - console.warn("Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:", val); - } - } - break; - case "undefined": - case "null": - this.element.innerHTML = ""; - break; - default: - this.element.innerHTML = val; - } -}; - -Cell.prototype.cellRendered = function () { - if (this.table.modExists("format") && this.table.modules.format.cellRendered) { - this.table.modules.format.cellRendered(this); - } -}; - -//generate tooltip text -Cell.prototype._generateTooltip = function () { - var tooltip = this.column.tooltip; - - if (tooltip) { - if (tooltip === true) { - tooltip = this.value; - } else if (typeof tooltip == "function") { - tooltip = tooltip(this.getComponent()); - - if (tooltip === false) { - tooltip = ""; - } - } - - if (typeof tooltip === "undefined") { - tooltip = ""; - } - - this.element.setAttribute("title", tooltip); - } else { - this.element.setAttribute("title", ""); - } -}; - -//////////////////// Getters //////////////////// -Cell.prototype.getElement = function () { - if (!this.loaded) { - this.loaded = true; - this.layoutElement(); - } - - return this.element; -}; - -Cell.prototype.getValue = function () { - return this.value; -}; - -Cell.prototype.getOldValue = function () { - return this.oldValue; -}; - -//////////////////// Actions //////////////////// - -Cell.prototype.setValue = function (value, mutate) { - - var changed = this.setValueProcessData(value, mutate), - component; - - if (changed) { - if (this.table.options.history && this.table.modExists("history")) { - this.table.modules.history.action("cellEdit", this, { oldValue: this.oldValue, newValue: this.value }); - } - - component = this.getComponent(); - - if (this.column.cellEvents.cellEdited) { - this.column.cellEvents.cellEdited.call(this.table, component); - } - - if (this.table.options.groupUpdateOnCellEdit && this.table.options.groupBy && this.table.modExists("groupRows")) { - this.table.modules.groupRows.reassignRowToGroup(this.row); - } - - this.cellRendered(); - - this.table.options.cellEdited.call(this.table, component); - - if (this.table.options.dataChanged) { - this.table.options.dataChanged.call(this.table, this.table.rowManager.getData()); - } - } -}; - -Cell.prototype.setValueProcessData = function (value, mutate) { - var changed = false; - - if (this.value != value) { - - changed = true; - - if (mutate) { - if (this.column.modules.mutate) { - value = this.table.modules.mutator.transformCell(this, value); - } - } - } - - this.setValueActual(value); - - if (changed && this.table.modExists("columnCalcs")) { - if (this.column.definition.topCalc || this.column.definition.bottomCalc) { - if (this.table.options.groupBy && this.table.modExists("groupRows")) { - - if (this.table.options.columnCalcs == "table" || this.table.options.columnCalcs == "both") { - this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); - } - - if (this.table.options.columnCalcs != "table") { - this.table.modules.columnCalcs.recalcRowGroup(this.row); - } - } else { - this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); - } - } - } - - return changed; -}; - -Cell.prototype.setValueActual = function (value) { - this.oldValue = this.value; - - this.value = value; - - if (this.table.options.reactiveData && this.table.modExists("reactiveData")) { - this.table.modules.reactiveData.block(); - } - - this.column.setFieldValue(this.row.data, value); - - if (this.table.options.reactiveData && this.table.modExists("reactiveData")) { - this.table.modules.reactiveData.unblock(); - } - - if (this.loaded) { - this.layoutElement(); - } -}; - -Cell.prototype.layoutElement = function () { - this._generateContents(); - this._generateTooltip(); - - //set resizable handles - if (this.table.options.resizableColumns && this.table.modExists("resizeColumns") && this.row.type === "row") { - this.table.modules.resizeColumns.initializeColumn("cell", this.column, this.element); - } - - if ((this.column.definition.contextMenu || this.column.definition.clickMenu) && this.table.modExists("menu")) { - this.table.modules.menu.initializeCell(this); - } - - //handle frozen cells - if (this.table.modExists("frozenColumns")) { - this.table.modules.frozenColumns.layoutElement(this.element, this.column); - } -}; - -Cell.prototype.setWidth = function () { - this.width = this.column.width; - this.element.style.width = this.column.widthStyled; -}; - -Cell.prototype.clearWidth = function () { - this.width = ""; - this.element.style.width = ""; -}; - -Cell.prototype.getWidth = function () { - return this.width || this.element.offsetWidth; -}; - -Cell.prototype.setMinWidth = function () { - this.minWidth = this.column.minWidth; - this.element.style.minWidth = this.column.minWidthStyled; -}; - -Cell.prototype.checkHeight = function () { - // var height = this.element.css("height"); - this.row.reinitializeHeight(); -}; - -Cell.prototype.clearHeight = function () { - this.element.style.height = ""; - this.height = null; -}; - -Cell.prototype.setHeight = function () { - this.height = this.row.height; - this.element.style.height = this.row.heightStyled; -}; - -Cell.prototype.getHeight = function () { - return this.height || this.element.offsetHeight; -}; - -Cell.prototype.show = function () { - this.element.style.display = this.column.vertAlign ? "inline-flex" : ""; -}; - -Cell.prototype.hide = function () { - this.element.style.display = "none"; -}; - -Cell.prototype.edit = function (force) { - if (this.table.modExists("edit", true)) { - return this.table.modules.edit.editCell(this, force); - } -}; - -Cell.prototype.cancelEdit = function () { - if (this.table.modExists("edit", true)) { - var editing = this.table.modules.edit.getCurrentCell(); - - if (editing && editing._getSelf() === this) { - this.table.modules.edit.cancelEdit(); - } else { - console.warn("Cancel Editor Error - This cell is not currently being edited "); - } - } -}; - -Cell.prototype.validate = function () { - if (this.column.modules.validate && this.table.modExists("validate", true)) { - var valid = this.table.modules.validate.validate(this.column.modules.validate, this, this.getValue()); - - return valid === true; - } else { - return true; - } -}; - -Cell.prototype.delete = function () { - if (!this.table.rowManager.redrawBlock && this.element.parentNode) { - this.element.parentNode.removeChild(this.element); - } - - if (this.modules.validate && this.modules.validate.invalid) { - this.table.modules.validate.clearValidation(this); - } - - if (this.modules.edit && this.modules.edit.edited) { - this.table.modules.edit.clearEdited(this); - } - - if (this.table.options.history) { - this.table.modules.history.clearComponentHistory(this); - } - - this.element = false; - this.column.deleteCell(this); - this.row.deleteCell(this); - this.calcs = {}; -}; - -//////////////// Navigation ///////////////// - -Cell.prototype.nav = function () { - - var self = this, - nextCell = false, - index = this.row.getCellIndex(this); - - return { - next: function next() { - var nextCell = this.right(), - nextRow; - - if (!nextCell) { - nextRow = self.table.rowManager.nextDisplayRow(self.row, true); - - if (nextRow) { - nextCell = nextRow.findNextEditableCell(-1); - - if (nextCell) { - nextCell.edit(); - return true; - } - } - } else { - return true; - } - - return false; - }, - prev: function prev() { - var nextCell = this.left(), - prevRow; - - if (!nextCell) { - prevRow = self.table.rowManager.prevDisplayRow(self.row, true); - - if (prevRow) { - nextCell = prevRow.findPrevEditableCell(prevRow.cells.length); - - if (nextCell) { - nextCell.edit(); - return true; - } - } - } else { - return true; - } - - return false; - }, - left: function left() { - - nextCell = self.row.findPrevEditableCell(index); - - if (nextCell) { - nextCell.edit(); - return true; - } else { - return false; - } - }, - right: function right() { - nextCell = self.row.findNextEditableCell(index); - - if (nextCell) { - nextCell.edit(); - return true; - } else { - return false; - } - }, - up: function up() { - var nextRow = self.table.rowManager.prevDisplayRow(self.row, true); - - if (nextRow) { - nextRow.cells[index].edit(); - } - }, - down: function down() { - var nextRow = self.table.rowManager.nextDisplayRow(self.row, true); - - if (nextRow) { - nextRow.cells[index].edit(); - } - } - - }; -}; - -Cell.prototype.getIndex = function () { - this.row.getCellIndex(this); -}; - -//////////////// Object Generation ///////////////// -Cell.prototype.getComponent = function () { - - if (!this.component) { - this.component = new CellComponent(this); - } - - return this.component; -}; -var FooterManager = function FooterManager(table) { - this.table = table; - this.active = false; - this.element = this.createElement(); //containing element - this.external = false; - this.links = []; - - this._initialize(); -}; - -FooterManager.prototype.createElement = function () { - var el = document.createElement("div"); - - el.classList.add("tabulator-footer"); - - return el; -}; - -FooterManager.prototype._initialize = function (element) { - if (this.table.options.footerElement) { - - switch (_typeof(this.table.options.footerElement)) { - case "string": - - if (this.table.options.footerElement[0] === "<") { - this.element.innerHTML = this.table.options.footerElement; - } else { - this.external = true; - this.element = document.querySelector(this.table.options.footerElement); - } - break; - default: - this.element = this.table.options.footerElement; - break; - } - } -}; - -FooterManager.prototype.getElement = function () { - return this.element; -}; - -FooterManager.prototype.append = function (element, parent) { - this.activate(parent); - - this.element.appendChild(element); - this.table.rowManager.adjustTableSize(); -}; - -FooterManager.prototype.prepend = function (element, parent) { - this.activate(parent); - - this.element.insertBefore(element, this.element.firstChild); - this.table.rowManager.adjustTableSize(); -}; - -FooterManager.prototype.remove = function (element) { - element.parentNode.removeChild(element); - this.deactivate(); -}; - -FooterManager.prototype.deactivate = function (force) { - if (!this.element.firstChild || force) { - if (!this.external) { - this.element.parentNode.removeChild(this.element); - } - this.active = false; - } - - // this.table.rowManager.adjustTableSize(); -}; - -FooterManager.prototype.activate = function (parent) { - if (!this.active) { - this.active = true; - if (!this.external) { - this.table.element.appendChild(this.getElement()); - this.table.element.style.display = ''; - } - } - - if (parent) { - this.links.push(parent); - } -}; - -FooterManager.prototype.redraw = function () { - this.links.forEach(function (link) { - link.footerRedraw(); - }); -}; - -var Tabulator = function Tabulator(element, options) { - - this.options = {}; - - this.columnManager = null; // hold Column Manager - this.rowManager = null; //hold Row Manager - this.footerManager = null; //holder Footer Manager - this.vdomHoz = null; //holder horizontal virtual dom - - - this.browser = ""; //hold current browser type - this.browserSlow = false; //handle reduced functionality for slower browsers - this.browserMobile = false; //check if running on moble, prevent resize cancelling edit on keyboard appearence - this.rtl = false; //check if the table is in RTL mode - - this.modules = {}; //hold all modules bound to this table - - if (this.initializeElement(element)) { - this.initializeOptions(options || {}); - this._create(); - } - - Tabulator.prototype.comms.register(this); //register table for inderdevice communication -}; - -//default setup options -Tabulator.prototype.defaultOptions = { - - height: false, //height of tabulator - minHeight: false, //minimum height of tabulator - maxHeight: false, //maximum height of tabulator - - layout: "fitData", ///layout type "fitColumns" | "fitData" - layoutColumnsOnNewData: false, //update column widths on setData - - columnMinWidth: 40, //minimum global width for a column - columnHeaderVertAlign: "top", //vertical alignment of column headers - columnVertAlign: false, // DEPRECATED - Left to allow warning - - resizableColumns: true, //resizable columns - resizableRows: false, //resizable rows - autoResize: true, //auto resize table - - columns: [], //store for colum header info - - cellHozAlign: "", //horizontal align columns - cellVertAlign: "", //vertical align columns - headerHozAlign: "", //horizontal header alignment - - - data: [], //default starting data - - autoColumns: false, //build columns from data row structure - autoColumnsDefinitions: false, - - reactiveData: false, //enable data reactivity - - nestedFieldSeparator: ".", //seperatpr for nested data - - tooltips: false, //Tool tip value - tooltipsHeader: false, //Tool tip for headers - tooltipGenerationMode: "load", //when to generate tooltips - - initialSort: false, //initial sorting criteria - initialFilter: false, //initial filtering criteria - initialHeaderFilter: false, //initial header filtering criteria - - columnHeaderSortMulti: true, //multiple or single column sorting - - sortOrderReverse: false, //reverse internal sort ordering - - headerSort: true, //set default global header sort - headerSortTristate: false, //set default tristate header sorting - headerSortElement: "
", //header sort element - - footerElement: false, //hold footer element - - index: "id", //filed for row index - - textDirection: "auto", - - keybindings: [], //array for keybindings - - tabEndNewRow: false, //create new row when tab to end of table - - invalidOptionWarnings: true, //allow toggling of invalid option warnings - - clipboard: false, //enable clipboard - clipboardCopyStyled: true, //formatted table data - clipboardCopyConfig: false, //clipboard config - clipboardCopyFormatter: false, //DEPRICATED - REMOVE in 5.0 - clipboardCopyRowRange: "active", //restrict clipboard to visible rows only - clipboardPasteParser: "table", //convert pasted clipboard data to rows - clipboardPasteAction: "insert", //how to insert pasted data into the table - - clipboardCopied: function clipboardCopied() {}, //data has been copied to the clipboard - clipboardPasted: function clipboardPasted() {}, //data has been pasted into the table - clipboardPasteError: function clipboardPasteError() {}, //data has not successfully been pasted into the table - - downloadDataFormatter: false, //function to manipulate table data before it is downloaded - downloadReady: function downloadReady(data, blob) { - return blob; - }, //function to manipulate download data - downloadComplete: false, //function to manipulate download data - downloadConfig: {}, //download config - downloadRowRange: "active", //restrict download to active rows only - - dataTree: false, //enable data tree - dataTreeFilter: true, //filter child rows - dataTreeSort: true, //sort child rows - dataTreeElementColumn: false, - dataTreeBranchElement: true, //show data tree branch element - dataTreeChildIndent: 9, //data tree child indent in px - dataTreeChildField: "_children", //data tre column field to look for child rows - dataTreeCollapseElement: false, //data tree row collapse element - dataTreeExpandElement: false, //data tree row expand element - dataTreeStartExpanded: false, - dataTreeRowExpanded: function dataTreeRowExpanded() {}, //row has been expanded - dataTreeRowCollapsed: function dataTreeRowCollapsed() {}, //row has been collapsed - dataTreeChildColumnCalcs: false, //include visible data tree rows in column calculations - dataTreeSelectPropagate: false, //seleccting a parent row selects its children - - printAsHtml: false, //enable print as html - printFormatter: false, //printing page formatter - printHeader: false, //page header contents - printFooter: false, //page footer contents - printCopyStyle: true, //DEPRICATED - REMOVE in 5.0 - printStyled: true, //enable print as html styling - printVisibleRows: true, //DEPRICATED - REMOVE in 5.0 - printRowRange: "visible", //restrict print to visible rows only - printConfig: {}, //print config options - - addRowPos: "bottom", //position to insert blank rows, top|bottom - - selectable: "highlight", //highlight rows on hover - selectableRangeMode: "drag", //highlight rows on hover - selectableRollingSelection: true, //roll selection once maximum number of selectable rows is reached - selectablePersistence: true, // maintain selection when table view is updated - selectableCheck: function selectableCheck(data, row) { - return true; - }, //check wheather row is selectable - - headerFilterLiveFilterDelay: 300, //delay before updating column after user types in header filter - headerFilterPlaceholder: false, //placeholder text to display in header filters - - headerVisible: true, //hide header - - history: false, //enable edit history - - locale: false, //current system language - langs: {}, - - virtualDom: true, //enable DOM virtualization - virtualDomBuffer: 0, // set virtual DOM buffer size - virtualDomHoz: false, //enable horizontal DOM virtualization - - persistentLayout: false, //DEPRICATED - REMOVE in 5.0 - persistentSort: false, //DEPRICATED - REMOVE in 5.0 - persistentFilter: false, //DEPRICATED - REMOVE in 5.0 - persistenceID: "", //key for persistent storage - persistenceMode: true, //mode for storing persistence information - persistenceReaderFunc: false, //function for handling persistence data reading - persistenceWriterFunc: false, //function for handling persistence data writing - - persistence: false, - - responsiveLayout: false, //responsive layout flags - responsiveLayoutCollapseStartOpen: true, //start showing collapsed data - responsiveLayoutCollapseUseFormatters: true, //responsive layout collapse formatter - responsiveLayoutCollapseFormatter: false, //responsive layout collapse formatter - - pagination: false, //set pagination type - paginationSize: false, //set number of rows to a page - paginationInitialPage: 1, //initail page to show on load - paginationButtonCount: 5, // set count of page button - paginationSizeSelector: false, //add pagination size selector element - paginationElement: false, //element to hold pagination numbers - paginationDataSent: {}, //pagination data sent to the server - paginationDataReceived: {}, //pagination data received from the server - paginationAddRow: "page", //add rows on table or page - - ajaxURL: false, //url for ajax loading - ajaxURLGenerator: false, - ajaxParams: {}, //params for ajax loading - ajaxConfig: "get", //ajax request type - ajaxContentType: "form", //ajax request type - ajaxRequestFunc: false, //promise function - ajaxLoader: true, //show loader - ajaxLoaderLoading: false, //loader element - ajaxLoaderError: false, //loader element - ajaxFiltering: false, - ajaxSorting: false, - ajaxProgressiveLoad: false, //progressive loading - ajaxProgressiveLoadDelay: 0, //delay between requests - ajaxProgressiveLoadScrollMargin: 0, //margin before scroll begins - - groupBy: false, //enable table grouping and set field to group by - groupStartOpen: true, //starting state of group - groupValues: false, - groupUpdateOnCellEdit: false, - - groupHeader: false, //header generation function - groupHeaderPrint: null, - groupHeaderClipboard: null, - groupHeaderHtmlOutput: null, - groupHeaderDownload: null, - - htmlOutputConfig: false, //html outypu config - - movableColumns: false, //enable movable columns - - movableRows: false, //enable movable rows - movableRowsConnectedTables: false, //tables for movable rows to be connected to - movableRowsConnectedElements: false, //other elements for movable rows to be connected to - movableRowsSender: false, - movableRowsReceiver: "insert", - movableRowsSendingStart: function movableRowsSendingStart() {}, - movableRowsSent: function movableRowsSent() {}, - movableRowsSentFailed: function movableRowsSentFailed() {}, - movableRowsSendingStop: function movableRowsSendingStop() {}, - movableRowsReceivingStart: function movableRowsReceivingStart() {}, - movableRowsReceived: function movableRowsReceived() {}, - movableRowsReceivedFailed: function movableRowsReceivedFailed() {}, - movableRowsReceivingStop: function movableRowsReceivingStop() {}, - movableRowsElementDrop: function movableRowsElementDrop() {}, - - scrollToRowPosition: "top", - scrollToRowIfVisible: true, - - scrollToColumnPosition: "left", - scrollToColumnIfVisible: true, - - rowFormatter: false, - rowFormatterPrint: null, - rowFormatterClipboard: null, - rowFormatterHtmlOutput: null, - - placeholder: false, - - //table building callbacks - tableBuilding: function tableBuilding() {}, - tableBuilt: function tableBuilt() {}, - - //render callbacks - renderStarted: function renderStarted() {}, - renderComplete: function renderComplete() {}, - - //row callbacks - rowClick: false, - rowDblClick: false, - rowContext: false, - rowTap: false, - rowDblTap: false, - rowTapHold: false, - rowMouseEnter: false, - rowMouseLeave: false, - rowMouseOver: false, - rowMouseOut: false, - rowMouseMove: false, - rowContextMenu: false, - rowClickMenu: false, - rowAdded: function rowAdded() {}, - rowDeleted: function rowDeleted() {}, - rowMoved: function rowMoved() {}, - rowUpdated: function rowUpdated() {}, - rowSelectionChanged: function rowSelectionChanged() {}, - rowSelected: function rowSelected() {}, - rowDeselected: function rowDeselected() {}, - rowResized: function rowResized() {}, - - //cell callbacks - //row callbacks - cellClick: false, - cellDblClick: false, - cellContext: false, - cellTap: false, - cellDblTap: false, - cellTapHold: false, - cellMouseEnter: false, - cellMouseLeave: false, - cellMouseOver: false, - cellMouseOut: false, - cellMouseMove: false, - cellEditing: function cellEditing() {}, - cellEdited: function cellEdited() {}, - cellEditCancelled: function cellEditCancelled() {}, - - //column callbacks - columnMoved: false, - columnResized: function columnResized() {}, - columnTitleChanged: function columnTitleChanged() {}, - columnVisibilityChanged: function columnVisibilityChanged() {}, - - //HTML iport callbacks - htmlImporting: function htmlImporting() {}, - htmlImported: function htmlImported() {}, - - //data callbacks - dataLoading: function dataLoading() {}, - dataLoaded: function dataLoaded() {}, - dataEdited: false, //DEPRECATED - dataChanged: false, - - //ajax callbacks - ajaxRequesting: function ajaxRequesting() {}, - ajaxResponse: false, - ajaxError: function ajaxError() {}, - - //filtering callbacks - dataFiltering: false, - dataFiltered: false, - - //sorting callbacks - dataSorting: function dataSorting() {}, - dataSorted: function dataSorted() {}, - - //grouping callbacks - groupToggleElement: "arrow", - groupClosedShowCalcs: false, - dataGrouping: function dataGrouping() {}, - dataGrouped: false, - groupVisibilityChanged: function groupVisibilityChanged() {}, - groupClick: false, - groupDblClick: false, - groupContext: false, - groupContextMenu: false, - groupClickMenu: false, - groupTap: false, - groupDblTap: false, - groupTapHold: false, - - columnCalcs: true, - - //pagination callbacks - pageLoaded: function pageLoaded() {}, - - //localization callbacks - localized: function localized() {}, - - //validation callbacks - validationMode: "blocking", - validationFailed: function validationFailed() {}, - - //history callbacks - historyUndo: function historyUndo() {}, - historyRedo: function historyRedo() {}, - - //scroll callbacks - scrollHorizontal: function scrollHorizontal() {}, - scrollVertical: function scrollVertical() {} -}; - -Tabulator.prototype.initializeOptions = function (options) { - - //warn user if option is not available - if (options.invalidOptionWarnings !== false) { - for (var key in options) { - if (typeof this.defaultOptions[key] === "undefined") { - console.warn("Invalid table constructor option:", key); - } - } - } - - //assign options to table - for (var key in this.defaultOptions) { - if (key in options) { - this.options[key] = options[key]; - } else { - if (Array.isArray(this.defaultOptions[key])) { - this.options[key] = Object.assign([], this.defaultOptions[key]); - } else if (_typeof(this.defaultOptions[key]) === "object" && this.defaultOptions[key] !== null) { - this.options[key] = Object.assign({}, this.defaultOptions[key]); - } else { - this.options[key] = this.defaultOptions[key]; - } - } - } -}; - -Tabulator.prototype.initializeElement = function (element) { - - if (typeof HTMLElement !== "undefined" && element instanceof HTMLElement) { - this.element = element; - return true; - } else if (typeof element === "string") { - this.element = document.querySelector(element); - - if (this.element) { - return true; - } else { - console.error("Tabulator Creation Error - no element found matching selector: ", element); - return false; - } - } else { - console.error("Tabulator Creation Error - Invalid element provided:", element); - return false; - } -}; - -Tabulator.prototype.rtlCheck = function () { - var style = window.getComputedStyle(this.element); - - switch (this.options.textDirection) { - case "auto": - if (style.direction !== "rtl") { - break; - }; - - case "rtl": - this.element.classList.add("tabulator-rtl"); - this.rtl = true; - break; - - case "ltr": - this.element.classList.add("tabulator-ltr"); - - default: - this.rtl = false; - } -}; - -//convert depricated functionality to new functions -Tabulator.prototype._mapDepricatedFunctionality = function () { - - //map depricated persistance setup options - if (this.options.persistentLayout || this.options.persistentSort || this.options.persistentFilter) { - if (!this.options.persistence) { - this.options.persistence = {}; - } - } - - if (this.options.dataEdited) { - console.warn("DEPRECATION WARNING - dataEdited option has been deprecated, please use the dataChanged option instead"); - this.options.dataChanged = this.options.dataEdited; - } - - if (this.options.downloadDataFormatter) { - console.warn("DEPRECATION WARNING - downloadDataFormatter option has been deprecated"); - } - - if (typeof this.options.clipboardCopyHeader !== "undefined") { - this.options.columnHeaders = this.options.clipboardCopyHeader; - console.warn("DEPRECATION WARNING - clipboardCopyHeader option has been deprecated, please use the columnHeaders property on the clipboardCopyConfig option"); - } - - if (this.options.printVisibleRows !== true) { - console.warn("printVisibleRows option is deprecated, you should now use the printRowRange option"); - - this.options.persistence.printRowRange = "active"; - } - - if (this.options.printCopyStyle !== true) { - console.warn("printCopyStyle option is deprecated, you should now use the printStyled option"); - - this.options.persistence.printStyled = this.options.printCopyStyle; - } - - if (this.options.persistentLayout) { - console.warn("persistentLayout option is deprecated, you should now use the persistence option"); - - if (this.options.persistence !== true && typeof this.options.persistence.columns === "undefined") { - this.options.persistence.columns = true; - } - } - - if (this.options.persistentSort) { - console.warn("persistentSort option is deprecated, you should now use the persistence option"); - - if (this.options.persistence !== true && typeof this.options.persistence.sort === "undefined") { - this.options.persistence.sort = true; - } - } - - if (this.options.persistentFilter) { - console.warn("persistentFilter option is deprecated, you should now use the persistence option"); - - if (this.options.persistence !== true && typeof this.options.persistence.filter === "undefined") { - this.options.persistence.filter = true; - } - } - - if (this.options.columnVertAlign) { - console.warn("columnVertAlign option is deprecated, you should now use the columnHeaderVertAlign option"); - - this.options.columnHeaderVertAlign = this.options.columnVertAlign; - } -}; - -Tabulator.prototype._clearSelection = function () { - - this.element.classList.add("tabulator-block-select"); - - if (window.getSelection) { - if (window.getSelection().empty) { - // Chrome - window.getSelection().empty(); - } else if (window.getSelection().removeAllRanges) { - // Firefox - window.getSelection().removeAllRanges(); - } - } else if (document.selection) { - // IE? - document.selection.empty(); - } - - this.element.classList.remove("tabulator-block-select"); -}; - -//concreate table -Tabulator.prototype._create = function () { - this._clearObjectPointers(); - - this._mapDepricatedFunctionality(); - - this.bindModules(); - - this.rtlCheck(); - - if (this.element.tagName === "TABLE") { - if (this.modExists("htmlTableImport", true)) { - this.modules.htmlTableImport.parseTable(); - } - } - - this.columnManager = new ColumnManager(this); - this.rowManager = new RowManager(this); - this.footerManager = new FooterManager(this); - - this.columnManager.setRowManager(this.rowManager); - this.rowManager.setColumnManager(this.columnManager); - - if (this.options.virtualDomHoz) { - this.vdomHoz = new VDomHoz(this); - } - - this._buildElement(); - - this._loadInitialData(); -}; - -//clear pointers to objects in default config object -Tabulator.prototype._clearObjectPointers = function () { - this.options.columns = this.options.columns.slice(0); - - if (!this.options.reactiveData) { - this.options.data = this.options.data.slice(0); - } -}; - -//build tabulator element -Tabulator.prototype._buildElement = function () { - var _this24 = this; - - var element = this.element, - mod = this.modules, - options = this.options; - - options.tableBuilding.call(this); - - element.classList.add("tabulator"); - element.setAttribute("role", "grid"); - - //empty element - while (element.firstChild) { - element.removeChild(element.firstChild); - } //set table height - if (options.height) { - options.height = isNaN(options.height) ? options.height : options.height + "px"; - element.style.height = options.height; - } - - //set table min height - if (options.minHeight !== false) { - options.minHeight = isNaN(options.minHeight) ? options.minHeight : options.minHeight + "px"; - element.style.minHeight = options.minHeight; - } - - //set table maxHeight - if (options.maxHeight !== false) { - options.maxHeight = isNaN(options.maxHeight) ? options.maxHeight : options.maxHeight + "px"; - element.style.maxHeight = options.maxHeight; - } - - this.columnManager.initialize(); - this.rowManager.initialize(); - - this._detectBrowser(); - - if (this.modExists("layout", true)) { - mod.layout.initialize(options.layout); - } - - //set localization - - mod.localize.initialize(); - - if (options.headerFilterPlaceholder !== false) { - mod.localize.setHeaderFilterPlaceholder(options.headerFilterPlaceholder); - } - - for (var locale in options.langs) { - mod.localize.installLang(locale, options.langs[locale]); - } - - mod.localize.setLocale(options.locale); - - //configure placeholder element - if (typeof options.placeholder == "string") { - - var el = document.createElement("div"); - el.classList.add("tabulator-placeholder"); - - var span = document.createElement("span"); - span.innerHTML = options.placeholder; - - el.appendChild(span); - - options.placeholder = el; - } - - //build table elements - element.appendChild(this.columnManager.getElement()); - element.appendChild(this.rowManager.getElement()); - - if (options.footerElement) { - this.footerManager.activate(); - } - - if (options.persistence && this.modExists("persistence", true)) { - mod.persistence.initialize(); - } - - if (options.persistence && this.modExists("persistence", true) && mod.persistence.config.columns) { - options.columns = mod.persistence.load("columns", options.columns); - } - - if (options.movableRows && this.modExists("moveRow")) { - mod.moveRow.initialize(); - } - - if (options.autoColumns && this.options.data) { - this.columnManager.generateColumnsFromRowData(this.options.data); - } - - if (this.modExists("columnCalcs")) { - mod.columnCalcs.initialize(); - } - - this.columnManager.setColumns(options.columns); - - if (options.dataTree && this.modExists("dataTree", true)) { - mod.dataTree.initialize(); - } - - if (this.modExists("frozenRows")) { - this.modules.frozenRows.initialize(); - } - - if ((options.persistence && this.modExists("persistence", true) && mod.persistence.config.sort || options.initialSort) && this.modExists("sort", true)) { - var sorters = []; - - if (options.persistence && this.modExists("persistence", true) && mod.persistence.config.sort) { - sorters = mod.persistence.load("sort"); - - if (sorters === false && options.initialSort) { - sorters = options.initialSort; - } - } else if (options.initialSort) { - sorters = options.initialSort; - } - - mod.sort.setSort(sorters); - } - - if ((options.persistence && this.modExists("persistence", true) && mod.persistence.config.filter || options.initialFilter) && this.modExists("filter", true)) { - var filters = []; - - if (options.persistence && this.modExists("persistence", true) && mod.persistence.config.filter) { - filters = mod.persistence.load("filter"); - - if (filters === false && options.initialFilter) { - filters = options.initialFilter; - } - } else if (options.initialFilter) { - filters = options.initialFilter; - } - - mod.filter.setFilter(filters); - } - - if (options.initialHeaderFilter && this.modExists("filter", true)) { - options.initialHeaderFilter.forEach(function (item) { - - var column = _this24.columnManager.findColumn(item.field); - - if (column) { - mod.filter.setHeaderFilterValue(column, item.value); - } else { - console.warn("Column Filter Error - No matching column found:", item.field); - return false; - } - }); - } - - if (this.modExists("ajax")) { - mod.ajax.initialize(); - } - - if (options.pagination && this.modExists("page", true)) { - mod.page.initialize(); - } - - if (options.groupBy && this.modExists("groupRows", true)) { - mod.groupRows.initialize(); - } - - if (this.modExists("keybindings")) { - mod.keybindings.initialize(); - } - - if (this.modExists("selectRow")) { - mod.selectRow.clearSelectionData(true); - } - - if (options.autoResize && this.modExists("resizeTable")) { - mod.resizeTable.initialize(); - } - - if (this.modExists("clipboard")) { - mod.clipboard.initialize(); - } - - if (options.printAsHtml && this.modExists("print")) { - mod.print.initialize(); - } - - options.tableBuilt.call(this); -}; - -Tabulator.prototype._loadInitialData = function () { - var self = this; - - if (self.options.pagination && self.modExists("page")) { - self.modules.page.reset(true, true); - - if (self.options.pagination == "local") { - if (self.options.data.length) { - self.rowManager.setData(self.options.data, false, true); - } else { - if ((self.options.ajaxURL || self.options.ajaxURLGenerator) && self.modExists("ajax")) { - self.modules.ajax.loadData(false, true).then(function () {}).catch(function () { - if (self.options.paginationInitialPage) { - self.modules.page.setPage(self.options.paginationInitialPage); - } - }); - - return; - } else { - self.rowManager.setData(self.options.data, false, true); - } - } - - if (self.options.paginationInitialPage) { - self.modules.page.setPage(self.options.paginationInitialPage); - } - } else { - if (self.options.ajaxURL) { - self.modules.page.setPage(self.options.paginationInitialPage).then(function () {}).catch(function () {}); - } else { - self.rowManager.setData([], false, true); - } - } - } else { - if (self.options.data.length) { - self.rowManager.setData(self.options.data); - } else { - if ((self.options.ajaxURL || self.options.ajaxURLGenerator) && self.modExists("ajax")) { - self.modules.ajax.loadData(false, true).then(function () {}).catch(function () {}); - } else { - self.rowManager.setData(self.options.data, false, true); - } - } - } -}; - -//deconstructor -Tabulator.prototype.destroy = function () { - var element = this.element; - - Tabulator.prototype.comms.deregister(this); //deregister table from inderdevice communication - - if (this.options.reactiveData && this.modExists("reactiveData", true)) { - this.modules.reactiveData.unwatchData(); - } - - //clear row data - this.rowManager.rows.forEach(function (row) { - row.wipe(); - }); - - this.rowManager.rows = []; - this.rowManager.activeRows = []; - this.rowManager.displayRows = []; - - //clear event bindings - if (this.options.autoResize && this.modExists("resizeTable")) { - this.modules.resizeTable.clearBindings(); - } - - if (this.modExists("keybindings")) { - this.modules.keybindings.clearBindings(); - } - - //clear DOM - while (element.firstChild) { - element.removeChild(element.firstChild); - }element.classList.remove("tabulator"); -}; - -Tabulator.prototype._detectBrowser = function () { - var ua = navigator.userAgent || navigator.vendor || window.opera; - - if (ua.indexOf("Trident") > -1) { - this.browser = "ie"; - this.browserSlow = true; - } else if (ua.indexOf("Edge") > -1) { - this.browser = "edge"; - this.browserSlow = true; - } else if (ua.indexOf("Firefox") > -1) { - this.browser = "firefox"; - this.browserSlow = false; - } else { - this.browser = "other"; - this.browserSlow = false; - } - - this.browserMobile = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(ua) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(ua.substr(0, 4)); -}; - -////////////////// Data Handling ////////////////// - -//block table redrawing -Tabulator.prototype.blockRedraw = function () { - return this.rowManager.blockRedraw(); -}; - -//restore table redrawing -Tabulator.prototype.restoreRedraw = function () { - return this.rowManager.restoreRedraw(); -}; - -//local data from local file -Tabulator.prototype.setDataFromLocalFile = function (extensions) { - var _this25 = this; - - return new Promise(function (resolve, reject) { - var input = document.createElement("input"); - input.type = "file"; - input.accept = extensions || ".json,application/json"; - - input.addEventListener("change", function (e) { - var file = input.files[0], - reader = new FileReader(), - data; - - reader.readAsText(file); - - reader.onload = function (e) { - - try { - data = JSON.parse(reader.result); - } catch (e) { - console.warn("File Load Error - File contents is invalid JSON", e); - reject(e); - return; - } - - _this25.setData(data).then(function (data) { - resolve(data); - }).catch(function (err) { - resolve(err); - }); - }; - - reader.onerror = function (e) { - console.warn("File Load Error - Unable to read file"); - reject(); - }; - }); - - input.click(); - }); -}; - -//load data -Tabulator.prototype.setData = function (data, params, config) { - if (this.modExists("ajax")) { - this.modules.ajax.blockActiveRequest(); - } - - return this._setData(data, params, config, false, true); -}; - -Tabulator.prototype._setData = function (data, params, config, inPosition, columnsChanged) { - var self = this; - - if (typeof data === "string") { - if (data.indexOf("{") == 0 || data.indexOf("[") == 0) { - //data is a json encoded string - return self.rowManager.setData(JSON.parse(data), inPosition, columnsChanged); - } else { - - if (self.modExists("ajax", true)) { - if (params) { - self.modules.ajax.setParams(params); - } - - if (config) { - self.modules.ajax.setConfig(config); - } - - self.modules.ajax.setUrl(data); - - if (self.options.pagination == "remote" && self.modExists("page", true)) { - self.modules.page.reset(true, true); - return self.modules.page.setPage(1); - } else { - //assume data is url, make ajax call to url to get data - return self.modules.ajax.loadData(inPosition, columnsChanged); - } - } - } - } else { - if (data) { - //asume data is already an object - return self.rowManager.setData(data, inPosition, columnsChanged); - } else { - - //no data provided, check if ajaxURL is present; - if (self.modExists("ajax") && (self.modules.ajax.getUrl || self.options.ajaxURLGenerator)) { - - if (self.options.pagination == "remote" && self.modExists("page", true)) { - self.modules.page.reset(true, true); - return self.modules.page.setPage(1); - } else { - return self.modules.ajax.loadData(inPosition, columnsChanged); - } - } else { - //empty data - return self.rowManager.setData([], inPosition, columnsChanged); - } - } - } -}; - -//clear data -Tabulator.prototype.clearData = function () { - if (this.modExists("ajax")) { - this.modules.ajax.blockActiveRequest(); - } - - this.rowManager.clearData(); -}; - -//get table data array -Tabulator.prototype.getData = function (active) { - - if (active === true) { - console.warn("passing a boolean to the getData function is deprecated, you should now pass the string 'active'"); - active = "active"; - } - - return this.rowManager.getData(active); -}; - -//get table data array count -Tabulator.prototype.getDataCount = function (active) { - - if (active === true) { - console.warn("passing a boolean to the getDataCount function is deprecated, you should now pass the string 'active'"); - active = "active"; - } - - return this.rowManager.getDataCount(active); -}; - -//search for specific row components -Tabulator.prototype.searchRows = function (field, type, value) { - if (this.modExists("filter", true)) { - return this.modules.filter.search("rows", field, type, value); - } -}; - -//search for specific data -Tabulator.prototype.searchData = function (field, type, value) { - if (this.modExists("filter", true)) { - return this.modules.filter.search("data", field, type, value); - } -}; - -//get table html -Tabulator.prototype.getHtml = function (visible, style, config) { - if (this.modExists("export", true)) { - return this.modules.export.getHtml(visible, style, config); - } -}; - -//get print html -Tabulator.prototype.print = function (visible, style, config) { - if (this.modExists("print", true)) { - return this.modules.print.printFullscreen(visible, style, config); - } -}; - -//retrieve Ajax URL -Tabulator.prototype.getAjaxUrl = function () { - if (this.modExists("ajax", true)) { - return this.modules.ajax.getUrl(); - } -}; - -//replace data, keeping table in position with same sort -Tabulator.prototype.replaceData = function (data, params, config) { - if (this.modExists("ajax")) { - this.modules.ajax.blockActiveRequest(); - } - - return this._setData(data, params, config, true); -}; - -//update table data -Tabulator.prototype.updateData = function (data) { - var _this26 = this; - - var self = this; - var responses = 0; - - return new Promise(function (resolve, reject) { - if (_this26.modExists("ajax")) { - _this26.modules.ajax.blockActiveRequest(); - } - - if (typeof data === "string") { - data = JSON.parse(data); - } - - if (data) { - data.forEach(function (item) { - var row = self.rowManager.findRow(item[self.options.index]); - - if (row) { - responses++; - - row.updateData(item).then(function () { - responses--; - - if (!responses) { - resolve(); - } - }); - } - }); - } else { - console.warn("Update Error - No data provided"); - reject("Update Error - No data provided"); - } - }); -}; - -Tabulator.prototype.addData = function (data, pos, index) { - var _this27 = this; - - return new Promise(function (resolve, reject) { - if (_this27.modExists("ajax")) { - _this27.modules.ajax.blockActiveRequest(); - } - - if (typeof data === "string") { - data = JSON.parse(data); - } - - if (data) { - _this27.rowManager.addRows(data, pos, index).then(function (rows) { - var output = []; - - rows.forEach(function (row) { - output.push(row.getComponent()); - }); - - resolve(output); - }); - } else { - console.warn("Update Error - No data provided"); - reject("Update Error - No data provided"); - } - }); -}; - -//update table data -Tabulator.prototype.updateOrAddData = function (data) { - var _this28 = this; - - var self = this, - rows = [], - responses = 0; - - return new Promise(function (resolve, reject) { - if (_this28.modExists("ajax")) { - _this28.modules.ajax.blockActiveRequest(); - } - - if (typeof data === "string") { - data = JSON.parse(data); - } - - if (data) { - data.forEach(function (item) { - var row = self.rowManager.findRow(item[self.options.index]); - - responses++; - - if (row) { - row.updateData(item).then(function () { - responses--; - rows.push(row.getComponent()); - - if (!responses) { - resolve(rows); - } - }); - } else { - self.rowManager.addRows(item).then(function (newRows) { - responses--; - rows.push(newRows[0].getComponent()); - - if (!responses) { - resolve(rows); - } - }); - } - }); - } else { - console.warn("Update Error - No data provided"); - reject("Update Error - No data provided"); - } - }); -}; - -//get row object -Tabulator.prototype.getRow = function (index) { - var row = this.rowManager.findRow(index); - - if (row) { - return row.getComponent(); - } else { - console.warn("Find Error - No matching row found:", index); - return false; - } -}; - -//get row object -Tabulator.prototype.getRowFromPosition = function (position, active) { - var row = this.rowManager.getRowFromPosition(position, active); - - if (row) { - return row.getComponent(); - } else { - console.warn("Find Error - No matching row found:", position); - return false; - } -}; - -//delete row from table -Tabulator.prototype.deleteRow = function (index) { - var _this29 = this; - - return new Promise(function (resolve, reject) { - var self = _this29, - count = 0, - successCount = 0, - foundRows = []; - - function doneCheck() { - count++; - - if (count == index.length) { - if (successCount) { - self.rowManager.reRenderInPosition(); - resolve(); - } - } - } - - if (!Array.isArray(index)) { - index = [index]; - } - - //find matching rows - index.forEach(function (item) { - var row = _this29.rowManager.findRow(item, true); - - if (row) { - foundRows.push(row); - } else { - console.warn("Delete Error - No matching row found:", item); - reject("Delete Error - No matching row found"); - doneCheck(); - } - }); - - //sort rows into correct order to ensure smooth delete from table - foundRows.sort(function (a, b) { - return _this29.rowManager.rows.indexOf(a) > _this29.rowManager.rows.indexOf(b) ? 1 : -1; - }); - - foundRows.forEach(function (row) { - row.delete().then(function () { - successCount++; - doneCheck(); - }).catch(function (err) { - doneCheck(); - reject(err); - }); - }); - }); -}; - -//add row to table -Tabulator.prototype.addRow = function (data, pos, index) { - var _this30 = this; - - return new Promise(function (resolve, reject) { - if (typeof data === "string") { - data = JSON.parse(data); - } - - _this30.rowManager.addRows(data, pos, index).then(function (rows) { - //recalc column calculations if present - if (_this30.modExists("columnCalcs")) { - _this30.modules.columnCalcs.recalc(_this30.rowManager.activeRows); - } - - resolve(rows[0].getComponent()); - }); - }); -}; - -//update a row if it exitsts otherwise create it -Tabulator.prototype.updateOrAddRow = function (index, data) { - var _this31 = this; - - return new Promise(function (resolve, reject) { - var row = _this31.rowManager.findRow(index); - - if (typeof data === "string") { - data = JSON.parse(data); - } - - if (row) { - row.updateData(data).then(function () { - //recalc column calculations if present - if (_this31.modExists("columnCalcs")) { - _this31.modules.columnCalcs.recalc(_this31.rowManager.activeRows); - } - - resolve(row.getComponent()); - }).catch(function (err) { - reject(err); - }); - } else { - row = _this31.rowManager.addRows(data).then(function (rows) { - //recalc column calculations if present - if (_this31.modExists("columnCalcs")) { - _this31.modules.columnCalcs.recalc(_this31.rowManager.activeRows); - } - - resolve(rows[0].getComponent()); - }).catch(function (err) { - reject(err); - }); - } - }); -}; - -//update row data -Tabulator.prototype.updateRow = function (index, data) { - var _this32 = this; - - return new Promise(function (resolve, reject) { - var row = _this32.rowManager.findRow(index); - - if (typeof data === "string") { - data = JSON.parse(data); - } - - if (row) { - row.updateData(data).then(function () { - resolve(row.getComponent()); - }).catch(function (err) { - reject(err); - }); - } else { - console.warn("Update Error - No matching row found:", index); - reject("Update Error - No matching row found"); - } - }); -}; - -//scroll to row in DOM -Tabulator.prototype.scrollToRow = function (index, position, ifVisible) { - var _this33 = this; - - return new Promise(function (resolve, reject) { - var row = _this33.rowManager.findRow(index); - - if (row) { - _this33.rowManager.scrollToRow(row, position, ifVisible).then(function () { - resolve(); - }).catch(function (err) { - reject(err); - }); - } else { - console.warn("Scroll Error - No matching row found:", index); - reject("Scroll Error - No matching row found"); - } - }); -}; - -Tabulator.prototype.moveRow = function (from, to, after) { - var fromRow = this.rowManager.findRow(from); - - if (fromRow) { - fromRow.moveToRow(to, after); - } else { - console.warn("Move Error - No matching row found:", from); - } -}; - -Tabulator.prototype.getRows = function (active) { - - if (active === true) { - console.warn("passing a boolean to the getRows function is deprecated, you should now pass the string 'active'"); - active = "active"; - } - - return this.rowManager.getComponents(active); -}; - -//get position of row in table -Tabulator.prototype.getRowPosition = function (index, active) { - var row = this.rowManager.findRow(index); - - if (row) { - return this.rowManager.getRowPosition(row, active); - } else { - console.warn("Position Error - No matching row found:", index); - return false; - } -}; - -//copy table data to clipboard -Tabulator.prototype.copyToClipboard = function (selector) { - if (this.modExists("clipboard", true)) { - this.modules.clipboard.copy(selector); - } -}; - -/////////////// Column Functions /////////////// - -Tabulator.prototype.setColumns = function (definition) { - this.columnManager.setColumns(definition); -}; - -Tabulator.prototype.getColumns = function (structured) { - return this.columnManager.getComponents(structured); -}; - -Tabulator.prototype.getColumn = function (field) { - var col = this.columnManager.findColumn(field); - - if (col) { - return col.getComponent(); - } else { - console.warn("Find Error - No matching column found:", field); - return false; - } -}; - -Tabulator.prototype.getColumnDefinitions = function () { - return this.columnManager.getDefinitionTree(); -}; - -Tabulator.prototype.getColumnLayout = function () { - if (this.modExists("persistence", true)) { - return this.modules.persistence.parseColumns(this.columnManager.getColumns()); - } -}; - -Tabulator.prototype.setColumnLayout = function (layout) { - if (this.modExists("persistence", true)) { - this.columnManager.setColumns(this.modules.persistence.mergeDefinition(this.options.columns, layout)); - return true; - } - return false; -}; - -Tabulator.prototype.showColumn = function (field) { - var column = this.columnManager.findColumn(field); - - if (column) { - column.show(); - - if (this.options.responsiveLayout && this.modExists("responsiveLayout", true)) { - this.modules.responsiveLayout.update(); - } - } else { - console.warn("Column Show Error - No matching column found:", field); - return false; - } -}; - -Tabulator.prototype.hideColumn = function (field) { - var column = this.columnManager.findColumn(field); - - if (column) { - column.hide(); - - if (this.options.responsiveLayout && this.modExists("responsiveLayout", true)) { - this.modules.responsiveLayout.update(); - } - } else { - console.warn("Column Hide Error - No matching column found:", field); - return false; - } -}; - -Tabulator.prototype.toggleColumn = function (field) { - var column = this.columnManager.findColumn(field); - - if (column) { - if (column.visible) { - column.hide(); - } else { - column.show(); - } - } else { - console.warn("Column Visibility Toggle Error - No matching column found:", field); - return false; - } -}; - -Tabulator.prototype.addColumn = function (definition, before, field) { - var _this34 = this; - - return new Promise(function (resolve, reject) { - var column = _this34.columnManager.findColumn(field); - - _this34.columnManager.addColumn(definition, before, column).then(function (column) { - resolve(column.getComponent()); - }).catch(function (err) { - reject(err); - }); - }); -}; - -Tabulator.prototype.deleteColumn = function (field) { - var _this35 = this; - - return new Promise(function (resolve, reject) { - var column = _this35.columnManager.findColumn(field); - - if (column) { - column.delete().then(function () { - resolve(); - }).catch(function (err) { - reject(err); - }); - } else { - console.warn("Column Delete Error - No matching column found:", field); - reject(); - } - }); -}; - -Tabulator.prototype.updateColumnDefinition = function (field, definition) { - var _this36 = this; - - return new Promise(function (resolve, reject) { - var column = _this36.columnManager.findColumn(field); - - if (column) { - column.updateDefinition(definition).then(function (col) { - resolve(col); - }).catch(function (err) { - reject(err); - }); - } else { - console.warn("Column Update Error - No matching column found:", field); - reject(); - } - }); -}; - -Tabulator.prototype.moveColumn = function (from, to, after) { - var fromColumn = this.columnManager.findColumn(from); - var toColumn = this.columnManager.findColumn(to); - - if (fromColumn) { - if (toColumn) { - this.columnManager.moveColumn(fromColumn, toColumn, after); - } else { - console.warn("Move Error - No matching column found:", toColumn); - } - } else { - console.warn("Move Error - No matching column found:", from); - } -}; - -//scroll to column in DOM -Tabulator.prototype.scrollToColumn = function (field, position, ifVisible) { - var _this37 = this; - - return new Promise(function (resolve, reject) { - var column = _this37.columnManager.findColumn(field); - - if (column) { - _this37.columnManager.scrollToColumn(column, position, ifVisible).then(function () { - resolve(); - }).catch(function (err) { - reject(err); - }); - } else { - console.warn("Scroll Error - No matching column found:", field); - reject("Scroll Error - No matching column found"); - } - }); -}; - -//////////// Localization Functions //////////// -Tabulator.prototype.setLocale = function (locale) { - this.modules.localize.setLocale(locale); -}; - -Tabulator.prototype.getLocale = function () { - return this.modules.localize.getLocale(); -}; - -Tabulator.prototype.getLang = function (locale) { - return this.modules.localize.getLang(locale); -}; - -//////////// General Public Functions //////////// - -//redraw list without updating data -Tabulator.prototype.redraw = function (force) { - this.columnManager.redraw(force); - this.rowManager.redraw(force); -}; - -Tabulator.prototype.setHeight = function (height) { - - if (this.rowManager.renderMode !== "classic") { - this.options.height = isNaN(height) ? height : height + "px"; - this.element.style.height = this.options.height; - this.rowManager.setRenderMode(); - this.rowManager.redraw(); - } else { - console.warn("setHeight function is not available in classic render mode"); - } -}; - -///////////////////// Sorting //////////////////// - -//trigger sort -Tabulator.prototype.setSort = function (sortList, dir) { - if (this.modExists("sort", true)) { - this.modules.sort.setSort(sortList, dir); - this.rowManager.sorterRefresh(); - } -}; - -Tabulator.prototype.getSorters = function () { - if (this.modExists("sort", true)) { - return this.modules.sort.getSort(); - } -}; - -Tabulator.prototype.clearSort = function () { - if (this.modExists("sort", true)) { - this.modules.sort.clear(); - this.rowManager.sorterRefresh(); - } -}; - -///////////////////// Filtering //////////////////// - -//set standard filters -Tabulator.prototype.setFilter = function (field, type, value, params) { - if (this.modExists("filter", true)) { - this.modules.filter.setFilter(field, type, value, params); - this.rowManager.filterRefresh(); - } -}; - -//add filter to array -Tabulator.prototype.addFilter = function (field, type, value, params) { - if (this.modExists("filter", true)) { - this.modules.filter.addFilter(field, type, value, params); - this.rowManager.filterRefresh(); - } -}; - -//get all filters -Tabulator.prototype.getFilters = function (all) { - if (this.modExists("filter", true)) { - return this.modules.filter.getFilters(all); - } -}; - -Tabulator.prototype.setHeaderFilterFocus = function (field) { - if (this.modExists("filter", true)) { - var column = this.columnManager.findColumn(field); - - if (column) { - this.modules.filter.setHeaderFilterFocus(column); - } else { - console.warn("Column Filter Focus Error - No matching column found:", field); - return false; - } - } -}; - -Tabulator.prototype.getHeaderFilterValue = function (field) { - if (this.modExists("filter", true)) { - var column = this.columnManager.findColumn(field); - - if (column) { - return this.modules.filter.getHeaderFilterValue(column); - } else { - console.warn("Column Filter Error - No matching column found:", field); - } - } -}; - -Tabulator.prototype.setHeaderFilterValue = function (field, value) { - if (this.modExists("filter", true)) { - var column = this.columnManager.findColumn(field); - - if (column) { - this.modules.filter.setHeaderFilterValue(column, value); - } else { - console.warn("Column Filter Error - No matching column found:", field); - return false; - } - } -}; - -Tabulator.prototype.getHeaderFilters = function () { - if (this.modExists("filter", true)) { - return this.modules.filter.getHeaderFilters(); - } -}; - -//remove filter from array -Tabulator.prototype.removeFilter = function (field, type, value) { - if (this.modExists("filter", true)) { - this.modules.filter.removeFilter(field, type, value); - this.rowManager.filterRefresh(); - } -}; - -//clear filters -Tabulator.prototype.clearFilter = function (all) { - if (this.modExists("filter", true)) { - this.modules.filter.clearFilter(all); - this.rowManager.filterRefresh(); - } -}; - -//clear header filters -Tabulator.prototype.clearHeaderFilter = function () { - if (this.modExists("filter", true)) { - this.modules.filter.clearHeaderFilter(); - this.rowManager.filterRefresh(); - } -}; - -///////////////////// select //////////////////// -Tabulator.prototype.selectRow = function (rows) { - if (this.modExists("selectRow", true)) { - if (rows === true) { - console.warn("passing a boolean to the selectRowselectRow function is deprecated, you should now pass the string 'active'"); - rows = "active"; - } - this.modules.selectRow.selectRows(rows); - } -}; - -Tabulator.prototype.deselectRow = function (rows) { - if (this.modExists("selectRow", true)) { - this.modules.selectRow.deselectRows(rows); - } -}; - -Tabulator.prototype.toggleSelectRow = function (row) { - if (this.modExists("selectRow", true)) { - this.modules.selectRow.toggleRow(row); - } -}; - -Tabulator.prototype.getSelectedRows = function () { - if (this.modExists("selectRow", true)) { - return this.modules.selectRow.getSelectedRows(); - } -}; - -Tabulator.prototype.getSelectedData = function () { - if (this.modExists("selectRow", true)) { - return this.modules.selectRow.getSelectedData(); - } -}; - -///////////////////// validation //////////////////// -Tabulator.prototype.getInvalidCells = function () { - if (this.modExists("validate", true)) { - return this.modules.validate.getInvalidCells(); - } -}; - -Tabulator.prototype.clearCellValidation = function (cells) { - var _this38 = this; - - if (this.modExists("validate", true)) { - - if (!cells) { - cells = this.modules.validate.getInvalidCells(); - } - - if (!Array.isArray(cells)) { - cells = [cells]; - } - - cells.forEach(function (cell) { - _this38.modules.validate.clearValidation(cell._getSelf()); - }); - } -}; - -Tabulator.prototype.validate = function (cells) { - var output = []; - - //clear row data - this.rowManager.rows.forEach(function (row) { - var valid = row.validate(); - - if (valid !== true) { - output = output.concat(valid); - } - }); - - return output.length ? output : true; -}; - -//////////// Pagination Functions //////////// - -Tabulator.prototype.setMaxPage = function (max) { - if (this.options.pagination && this.modExists("page")) { - this.modules.page.setMaxPage(max); - } else { - return false; - } -}; - -Tabulator.prototype.setPage = function (page) { - if (this.options.pagination && this.modExists("page")) { - return this.modules.page.setPage(page); - } else { - return new Promise(function (resolve, reject) { - reject(); - }); - } -}; - -Tabulator.prototype.setPageToRow = function (row) { - var _this39 = this; - - return new Promise(function (resolve, reject) { - if (_this39.options.pagination && _this39.modExists("page")) { - row = _this39.rowManager.findRow(row); - - if (row) { - _this39.modules.page.setPageToRow(row).then(function () { - resolve(); - }).catch(function () { - reject(); - }); - } else { - reject(); - } - } else { - reject(); - } - }); -}; - -Tabulator.prototype.setPageSize = function (size) { - if (this.options.pagination && this.modExists("page")) { - this.modules.page.setPageSize(size); - this.modules.page.setPage(1).then(function () {}).catch(function () {}); - } else { - return false; - } -}; - -Tabulator.prototype.getPageSize = function () { - if (this.options.pagination && this.modExists("page", true)) { - return this.modules.page.getPageSize(); - } -}; - -Tabulator.prototype.previousPage = function () { - if (this.options.pagination && this.modExists("page")) { - this.modules.page.previousPage(); - } else { - return false; - } -}; - -Tabulator.prototype.nextPage = function () { - if (this.options.pagination && this.modExists("page")) { - this.modules.page.nextPage(); - } else { - return false; - } -}; - -Tabulator.prototype.getPage = function () { - if (this.options.pagination && this.modExists("page")) { - return this.modules.page.getPage(); - } else { - return false; - } -}; - -Tabulator.prototype.getPageMax = function () { - if (this.options.pagination && this.modExists("page")) { - return this.modules.page.getPageMax(); - } else { - return false; - } -}; - -///////////////// Grouping Functions /////////////// - -Tabulator.prototype.setGroupBy = function (groups) { - if (this.modExists("groupRows", true)) { - this.options.groupBy = groups; - this.modules.groupRows.initialize(); - this.rowManager.refreshActiveData("display"); - - if (this.options.persistence && this.modExists("persistence", true) && this.modules.persistence.config.group) { - this.modules.persistence.save("group"); - } - } else { - return false; - } -}; - -Tabulator.prototype.setGroupValues = function (groupValues) { - if (this.modExists("groupRows", true)) { - this.options.groupValues = groupValues; - this.modules.groupRows.initialize(); - this.rowManager.refreshActiveData("display"); - - if (this.options.persistence && this.modExists("persistence", true) && this.modules.persistence.config.group) { - this.modules.persistence.save("group"); - } - } else { - return false; - } -}; - -Tabulator.prototype.setGroupStartOpen = function (values) { - if (this.modExists("groupRows", true)) { - this.options.groupStartOpen = values; - this.modules.groupRows.initialize(); - if (this.options.groupBy) { - this.rowManager.refreshActiveData("group"); - - if (this.options.persistence && this.modExists("persistence", true) && this.modules.persistence.config.group) { - this.modules.persistence.save("group"); - } - } else { - console.warn("Grouping Update - cant refresh view, no groups have been set"); - } - } else { - return false; - } -}; - -Tabulator.prototype.setGroupHeader = function (values) { - if (this.modExists("groupRows", true)) { - this.options.groupHeader = values; - this.modules.groupRows.initialize(); - if (this.options.groupBy) { - this.rowManager.refreshActiveData("group"); - - if (this.options.persistence && this.modExists("persistence", true) && this.modules.persistence.config.group) { - this.modules.persistence.save("group"); - } - } else { - console.warn("Grouping Update - cant refresh view, no groups have been set"); - } - } else { - return false; - } -}; - -Tabulator.prototype.getGroups = function (values) { - if (this.modExists("groupRows", true)) { - return this.modules.groupRows.getGroups(true); - } else { - return false; - } -}; - -// get grouped table data in the same format as getData() -Tabulator.prototype.getGroupedData = function () { - if (this.modExists("groupRows", true)) { - return this.options.groupBy ? this.modules.groupRows.getGroupedData() : this.getData(); - } -}; - -Tabulator.prototype.getEditedCells = function () { - if (this.modExists("edit", true)) { - return this.modules.edit.getEditedCells(); - } -}; - -Tabulator.prototype.clearCellEdited = function (cells) { - var _this40 = this; - - if (this.modExists("edit", true)) { - - if (!cells) { - cells = this.modules.edit.getEditedCells(); - } - - if (!Array.isArray(cells)) { - cells = [cells]; - } - - cells.forEach(function (cell) { - _this40.modules.edit.clearEdited(cell._getSelf()); - }); - } -}; - -///////////////// Column Calculation Functions /////////////// -Tabulator.prototype.getCalcResults = function () { - if (this.modExists("columnCalcs", true)) { - return this.modules.columnCalcs.getResults(); - } else { - return false; - } -}; - -Tabulator.prototype.recalc = function () { - if (this.modExists("columnCalcs", true)) { - this.modules.columnCalcs.recalcAll(this.rowManager.activeRows); - } -}; - -/////////////// Navigation Management ////////////// - -Tabulator.prototype.navigatePrev = function () { - var cell = false; - - if (this.modExists("edit", true)) { - cell = this.modules.edit.currentCell; - - if (cell) { - return cell.nav().prev(); - } - } - - return false; -}; - -Tabulator.prototype.navigateNext = function () { - var cell = false; - - if (this.modExists("edit", true)) { - cell = this.modules.edit.currentCell; - - if (cell) { - return cell.nav().next(); - } - } - - return false; -}; - -Tabulator.prototype.navigateLeft = function () { - var cell = false; - - if (this.modExists("edit", true)) { - cell = this.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - return cell.nav().left(); - } - } - - return false; -}; - -Tabulator.prototype.navigateRight = function () { - var cell = false; - - if (this.modExists("edit", true)) { - cell = this.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - return cell.nav().right(); - } - } - - return false; -}; - -Tabulator.prototype.navigateUp = function () { - var cell = false; - - if (this.modExists("edit", true)) { - cell = this.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - return cell.nav().up(); - } - } - - return false; -}; - -Tabulator.prototype.navigateDown = function () { - var cell = false; - - if (this.modExists("edit", true)) { - cell = this.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - return cell.nav().down(); - } - } - - return false; -}; - -/////////////// History Management ////////////// -Tabulator.prototype.undo = function () { - if (this.options.history && this.modExists("history", true)) { - return this.modules.history.undo(); - } else { - return false; - } -}; - -Tabulator.prototype.redo = function () { - if (this.options.history && this.modExists("history", true)) { - return this.modules.history.redo(); - } else { - return false; - } -}; - -Tabulator.prototype.getHistoryUndoSize = function () { - if (this.options.history && this.modExists("history", true)) { - return this.modules.history.getHistoryUndoSize(); - } else { - return false; - } -}; - -Tabulator.prototype.getHistoryRedoSize = function () { - if (this.options.history && this.modExists("history", true)) { - return this.modules.history.getHistoryRedoSize(); - } else { - return false; - } -}; - -/////////////// Download Management ////////////// - -Tabulator.prototype.download = function (type, filename, options, active) { - if (this.modExists("download", true)) { - this.modules.download.download(type, filename, options, active); - } -}; - -Tabulator.prototype.downloadToTab = function (type, filename, options, active) { - if (this.modExists("download", true)) { - this.modules.download.download(type, filename, options, active, true); - } -}; - -/////////// Inter Table Communications /////////// - -Tabulator.prototype.tableComms = function (table, module, action, data) { - this.modules.comms.receive(table, module, action, data); -}; - -////////////// Extension Management ////////////// - -//object to hold module -Tabulator.prototype.moduleBindings = {}; - -//extend module -Tabulator.prototype.extendModule = function (name, property, values) { - - if (Tabulator.prototype.moduleBindings[name]) { - var source = Tabulator.prototype.moduleBindings[name].prototype[property]; - - if (source) { - if ((typeof values === 'undefined' ? 'undefined' : _typeof(values)) == "object") { - for (var key in values) { - source[key] = values[key]; - } - } else { - console.warn("Module Error - Invalid value type, it must be an object"); - } - } else { - console.warn("Module Error - property does not exist:", property); - } - } else { - console.warn("Module Error - module does not exist:", name); - } -}; - -//add module to tabulator -Tabulator.prototype.registerModule = function (name, module) { - var self = this; - Tabulator.prototype.moduleBindings[name] = module; -}; - -//ensure that module are bound to instantiated function -Tabulator.prototype.bindModules = function () { - this.modules = {}; - - for (var name in Tabulator.prototype.moduleBindings) { - this.modules[name] = new Tabulator.prototype.moduleBindings[name](this); - } -}; - -//Check for module -Tabulator.prototype.modExists = function (plugin, required) { - if (this.modules[plugin]) { - return true; - } else { - if (required) { - console.error("Tabulator Module Not Installed: " + plugin); - } - return false; - } -}; - -Tabulator.prototype.helpers = { - - elVisible: function elVisible(el) { - return !(el.offsetWidth <= 0 && el.offsetHeight <= 0); - }, - - elOffset: function elOffset(el) { - var box = el.getBoundingClientRect(); - - return { - top: box.top + window.pageYOffset - document.documentElement.clientTop, - left: box.left + window.pageXOffset - document.documentElement.clientLeft - }; - }, - - deepClone: function deepClone(obj) { - var clone = Object.assign(Array.isArray(obj) ? [] : {}, obj); - - for (var i in obj) { - if (obj[i] != null && _typeof(obj[i]) === "object") { - if (obj[i] instanceof Date) { - clone[i] = new Date(obj[i]); - } else { - clone[i] = this.deepClone(obj[i]); - } - } - } - return clone; - } -}; - -Tabulator.prototype.comms = { - tables: [], - register: function register(table) { - Tabulator.prototype.comms.tables.push(table); - }, - deregister: function deregister(table) { - var index = Tabulator.prototype.comms.tables.indexOf(table); - - if (index > -1) { - Tabulator.prototype.comms.tables.splice(index, 1); - } - }, - lookupTable: function lookupTable(query, silent) { - var results = [], - matches, - match; - - if (typeof query === "string") { - matches = document.querySelectorAll(query); - - if (matches.length) { - for (var i = 0; i < matches.length; i++) { - match = Tabulator.prototype.comms.matchElement(matches[i]); - - if (match) { - results.push(match); - } - } - } - } else if (typeof HTMLElement !== "undefined" && query instanceof HTMLElement || query instanceof Tabulator) { - match = Tabulator.prototype.comms.matchElement(query); - - if (match) { - results.push(match); - } - } else if (Array.isArray(query)) { - query.forEach(function (item) { - results = results.concat(Tabulator.prototype.comms.lookupTable(item)); - }); - } else { - if (!silent) { - console.warn("Table Connection Error - Invalid Selector", query); - } - } - - return results; - }, - matchElement: function matchElement(element) { - return Tabulator.prototype.comms.tables.find(function (table) { - return element instanceof Tabulator ? table === element : table.element === element; - }); - } -}; - -Tabulator.prototype.findTable = function (query) { - var results = Tabulator.prototype.comms.lookupTable(query, true); - return Array.isArray(results) && !results.length ? false : results; -}; - -var Layout = function Layout(table) { - - this.table = table; - - this.mode = null; -}; - -//initialize layout system - -Layout.prototype.initialize = function (layout) { - - if (this.modes[layout]) { - - this.mode = layout; - } else { - - console.warn("Layout Error - invalid mode set, defaulting to 'fitData' : " + layout); - - this.mode = 'fitData'; - } - - this.table.element.setAttribute("tabulator-layout", this.mode); -}; - -Layout.prototype.getMode = function () { - - return this.mode; -}; - -//trigger table layout - -Layout.prototype.layout = function () { - - this.modes[this.mode].call(this, this.table.columnManager.columnsByIndex); -}; - -//layout render functions - -Layout.prototype.modes = { - - //resize columns to fit data they contain - - "fitData": function fitData(columns) { - - if (this.table.options.virtualDomHoz) { - - this.table.vdomHoz.fitDataLayoutOverride(); - } else { - - columns.forEach(function (column) { - - column.reinitializeWidth(); - }); - } - - if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.update(); - } - }, - - //resize columns to fit data they contain and stretch row to fill table - - "fitDataFill": function fitDataFill(columns) { - - columns.forEach(function (column) { - - column.reinitializeWidth(); - }); - - if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.update(); - } - }, - - //resize columns to fit data they contain - - "fitDataTable": function fitDataTable(columns) { - - columns.forEach(function (column) { - - column.reinitializeWidth(); - }); - - if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.update(); - } - }, - - //resize columns to fit data the contain and stretch last column to fill table - - "fitDataStretch": function fitDataStretch(columns) { - var _this41 = this; - - var colsWidth = 0, - tableWidth = this.table.rowManager.element.clientWidth, - gap = 0, - lastCol = false; - - columns.forEach(function (column, i) { - - if (!column.widthFixed) { - - column.reinitializeWidth(); - } - - if (_this41.table.options.responsiveLayout ? column.modules.responsive.visible : column.visible) { - - lastCol = column; - } - - if (column.visible) { - - colsWidth += column.getWidth(); - } - }); - - if (lastCol) { - - gap = tableWidth - colsWidth + lastCol.getWidth(); - - if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - lastCol.setWidth(0); - - this.table.modules.responsiveLayout.update(); - } - - if (gap > 0) { - - lastCol.setWidth(gap); - } else { - - lastCol.reinitializeWidth(); - } - } else { - - if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.update(); - } - } - }, - - //resize columns to fit - - "fitColumns": function fitColumns(columns) { - - var self = this; - - var totalWidth = self.table.element.clientWidth; //table element width - - var fixedWidth = 0; //total width of columns with a defined width - - var flexWidth = 0; //total width available to flexible columns - - var flexGrowUnits = 0; //total number of widthGrow blocks accross all columns - - var flexColWidth = 0; //desired width of flexible columns - - var flexColumns = []; //array of flexible width columns - - var fixedShrinkColumns = []; //array of fixed width columns that can shrink - - var flexShrinkUnits = 0; //total number of widthShrink blocks accross all columns - - var overflowWidth = 0; //horizontal overflow width - - var gapFill = 0; //number of pixels to be added to final column to close and half pixel gaps - - - function calcWidth(width) { - - var colWidth; - - if (typeof width == "string") { - - if (width.indexOf("%") > -1) { - - colWidth = totalWidth / 100 * parseInt(width); - } else { - - colWidth = parseInt(width); - } - } else { - - colWidth = width; - } - - return colWidth; - } - - //ensure columns resize to take up the correct amount of space - - function scaleColumns(columns, freeSpace, colWidth, shrinkCols) { - - var oversizeCols = [], - oversizeSpace = 0, - remainingSpace = 0, - nextColWidth = 0, - gap = 0, - changeUnits = 0, - undersizeCols = []; - - function calcGrow(col) { - - return colWidth * (col.column.definition.widthGrow || 1); - } - - function calcShrink(col) { - - return calcWidth(col.width) - colWidth * (col.column.definition.widthShrink || 0); - } - - columns.forEach(function (col, i) { - - var width = shrinkCols ? calcShrink(col) : calcGrow(col); - - if (col.column.minWidth >= width) { - - oversizeCols.push(col); - } else { - - undersizeCols.push(col); - - changeUnits += shrinkCols ? col.column.definition.widthShrink || 1 : col.column.definition.widthGrow || 1; - } - }); - - if (oversizeCols.length) { - - oversizeCols.forEach(function (col) { - - oversizeSpace += shrinkCols ? col.width - col.column.minWidth : col.column.minWidth; - - col.width = col.column.minWidth; - }); - - remainingSpace = freeSpace - oversizeSpace; - - nextColWidth = changeUnits ? Math.floor(remainingSpace / changeUnits) : remainingSpace; - - gap = remainingSpace - nextColWidth * changeUnits; - - gap += scaleColumns(undersizeCols, remainingSpace, nextColWidth, shrinkCols); - } else { - - gap = changeUnits ? freeSpace - Math.floor(freeSpace / changeUnits) * changeUnits : freeSpace; - - undersizeCols.forEach(function (column) { - - column.width = shrinkCols ? calcShrink(column) : calcGrow(column); - }); - } - - return gap; - } - - if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.update(); - } - - //adjust for vertical scrollbar if present - - if (this.table.rowManager.element.scrollHeight > this.table.rowManager.element.clientHeight) { - - totalWidth -= this.table.rowManager.element.offsetWidth - this.table.rowManager.element.clientWidth; - } - - columns.forEach(function (column) { - - var width, minWidth, colWidth; - - if (column.visible) { - - width = column.definition.width; - - minWidth = parseInt(column.minWidth); - - if (width) { - - colWidth = calcWidth(width); - - fixedWidth += colWidth > minWidth ? colWidth : minWidth; - - if (column.definition.widthShrink) { - - fixedShrinkColumns.push({ - - column: column, - - width: colWidth > minWidth ? colWidth : minWidth - - }); - - flexShrinkUnits += column.definition.widthShrink; - } - } else { - - flexColumns.push({ - - column: column, - - width: 0 - - }); - - flexGrowUnits += column.definition.widthGrow || 1; - } - } - }); - - //calculate available space - - flexWidth = totalWidth - fixedWidth; - - //calculate correct column size - - flexColWidth = Math.floor(flexWidth / flexGrowUnits); - - //generate column widths - - var gapFill = scaleColumns(flexColumns, flexWidth, flexColWidth, false); - - //increase width of last column to account for rounding errors - - if (flexColumns.length && gapFill > 0) { - - flexColumns[flexColumns.length - 1].width += +gapFill; - } - - //caculate space for columns to be shrunk into - - flexColumns.forEach(function (col) { - - flexWidth -= col.width; - }); - - overflowWidth = Math.abs(gapFill) + flexWidth; - - //shrink oversize columns if there is no available space - - if (overflowWidth > 0 && flexShrinkUnits) { - - gapFill = scaleColumns(fixedShrinkColumns, overflowWidth, Math.floor(overflowWidth / flexShrinkUnits), true); - } - - //decrease width of last column to account for rounding errors - - if (fixedShrinkColumns.length) { - - fixedShrinkColumns[fixedShrinkColumns.length - 1].width -= gapFill; - } - - flexColumns.forEach(function (col) { - - col.column.setWidth(col.width); - }); - - fixedShrinkColumns.forEach(function (col) { - - col.column.setWidth(col.width); - }); - } - -}; - -Tabulator.prototype.registerModule("layout", Layout); -var Localize = function Localize(table) { - this.table = table; //hold Tabulator object - this.locale = "default"; //current locale - this.lang = false; //current language - this.bindings = {}; //update events to call when locale is changed - this.langList = {}; -}; - -Localize.prototype.initialize = function () { - this.langList = Tabulator.prototype.helpers.deepClone(this.langs); -}; - -//set header placehoder -Localize.prototype.setHeaderFilterPlaceholder = function (placeholder) { - this.langList.default.headerFilters.default = placeholder; -}; - -//set header filter placeholder by column -Localize.prototype.setHeaderFilterColumnPlaceholder = function (column, placeholder) { - this.langList.default.headerFilters.columns[column] = placeholder; - - if (this.lang && !this.lang.headerFilters.columns[column]) { - this.lang.headerFilters.columns[column] = placeholder; - } -}; - -//setup a lang description object -Localize.prototype.installLang = function (locale, lang) { - if (this.langList[locale]) { - this._setLangProp(this.langList[locale], lang); - } else { - this.langList[locale] = lang; - } -}; - -Localize.prototype._setLangProp = function (lang, values) { - for (var key in values) { - if (lang[key] && _typeof(lang[key]) == "object") { - this._setLangProp(lang[key], values[key]); - } else { - lang[key] = values[key]; - } - } -}; - -//set current locale -Localize.prototype.setLocale = function (desiredLocale) { - var self = this; - - desiredLocale = desiredLocale || "default"; - - //fill in any matching languge values - function traverseLang(trans, path) { - for (var prop in trans) { - if (_typeof(trans[prop]) == "object") { - if (!path[prop]) { - path[prop] = {}; - } - traverseLang(trans[prop], path[prop]); - } else { - path[prop] = trans[prop]; - } - } - } - - //determing correct locale to load - if (desiredLocale === true && navigator.language) { - //get local from system - desiredLocale = navigator.language.toLowerCase(); - } - - if (desiredLocale) { - - //if locale is not set, check for matching top level locale else use default - if (!self.langList[desiredLocale]) { - var prefix = desiredLocale.split("-")[0]; - - if (self.langList[prefix]) { - console.warn("Localization Error - Exact matching locale not found, using closest match: ", desiredLocale, prefix); - desiredLocale = prefix; - } else { - console.warn("Localization Error - Matching locale not found, using default: ", desiredLocale); - desiredLocale = "default"; - } - } - } - - self.locale = desiredLocale; - - //load default lang template - self.lang = Tabulator.prototype.helpers.deepClone(self.langList.default || {}); - - if (desiredLocale != "default") { - traverseLang(self.langList[desiredLocale], self.lang); - } - - self.table.options.localized.call(self.table, self.locale, self.lang); - - self._executeBindings(); -}; - -//get current locale -Localize.prototype.getLocale = function (locale) { - return self.locale; -}; - -//get lang object for given local or current if none provided -Localize.prototype.getLang = function (locale) { - return locale ? this.langList[locale] : this.lang; -}; - -//get text for current locale -Localize.prototype.getText = function (path, value) { - var path = value ? path + "|" + value : path, - pathArray = path.split("|"), - text = this._getLangElement(pathArray, this.locale); - - // if(text === false){ - // console.warn("Localization Error - Matching localized text not found for given path: ", path); - // } - - return text || ""; -}; - -//traverse langs object and find localized copy -Localize.prototype._getLangElement = function (path, locale) { - var self = this; - var root = self.lang; - - path.forEach(function (level) { - var rootPath; - - if (root) { - rootPath = root[level]; - - if (typeof rootPath != "undefined") { - root = rootPath; - } else { - root = false; - } - } - }); - - return root; -}; - -//set update binding -Localize.prototype.bind = function (path, callback) { - if (!this.bindings[path]) { - this.bindings[path] = []; - } - - this.bindings[path].push(callback); - - callback(this.getText(path), this.lang); -}; - -//itterate through bindings and trigger updates -Localize.prototype._executeBindings = function () { - var self = this; - - var _loop = function _loop(path) { - self.bindings[path].forEach(function (binding) { - binding(self.getText(path), self.lang); - }); - }; - - for (var path in self.bindings) { - _loop(path); - } -}; - -//Localized text listings -Localize.prototype.langs = { - "default": { //hold default locale text - "groups": { - "item": "item", - "items": "items" - }, - "columns": {}, - "ajax": { - "loading": "Loading", - "error": "Error" - }, - "pagination": { - "page_size": "Page Size", - "page_title": "Show Page", - "first": "First", - "first_title": "First Page", - "last": "Last", - "last_title": "Last Page", - "prev": "Prev", - "prev_title": "Prev Page", - "next": "Next", - "next_title": "Next Page", - "all": "All" - }, - "headerFilters": { - "default": "filter column...", - "columns": {} - } - } -}; - -Tabulator.prototype.registerModule("localize", Localize); -var Comms = function Comms(table) { - this.table = table; -}; - -Comms.prototype.getConnections = function (selectors) { - var self = this, - connections = [], - connection; - - connection = Tabulator.prototype.comms.lookupTable(selectors); - - connection.forEach(function (con) { - if (self.table !== con) { - connections.push(con); - } - }); - - return connections; -}; - -Comms.prototype.send = function (selectors, module, action, data) { - var self = this, - connections = this.getConnections(selectors); - - connections.forEach(function (connection) { - connection.tableComms(self.table.element, module, action, data); - }); - - if (!connections.length && selectors) { - console.warn("Table Connection Error - No tables matching selector found", selectors); - } -}; - -Comms.prototype.receive = function (table, module, action, data) { - if (this.table.modExists(module)) { - return this.table.modules[module].commsReceived(table, action, data); - } else { - console.warn("Inter-table Comms Error - no such module:", module); - } -}; - -Tabulator.prototype.registerModule("comms", Comms); - -var Accessor = function Accessor(table) { - this.table = table; //hold Tabulator object - this.allowedTypes = ["", "data", "download", "clipboard", "print", "htmlOutput"]; //list of accessor types -}; - -//initialize column accessor -Accessor.prototype.initializeColumn = function (column) { - var self = this, - match = false, - config = {}; - - this.allowedTypes.forEach(function (type) { - var key = "accessor" + (type.charAt(0).toUpperCase() + type.slice(1)), - accessor; - - if (column.definition[key]) { - accessor = self.lookupAccessor(column.definition[key]); - - if (accessor) { - match = true; - - config[key] = { - accessor: accessor, - params: column.definition[key + "Params"] || {} - }; - } - } - }); - - if (match) { - column.modules.accessor = config; - } -}; - -Accessor.prototype.lookupAccessor = function (value) { - var accessor = false; - - //set column accessor - switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { - case "string": - if (this.accessors[value]) { - accessor = this.accessors[value]; - } else { - console.warn("Accessor Error - No such accessor found, ignoring: ", value); - } - break; - - case "function": - accessor = value; - break; - } - - return accessor; -}; - -//apply accessor to row -Accessor.prototype.transformRow = function (row, type) { - var key = "accessor" + (type.charAt(0).toUpperCase() + type.slice(1)), - rowComponent = row.getComponent(); - - //clone data object with deep copy to isolate internal data from returned result - var data = Tabulator.prototype.helpers.deepClone(row.data || {}); - - this.table.columnManager.traverse(function (column) { - var value, accessor, params, colCompnent; - - if (column.modules.accessor) { - - accessor = column.modules.accessor[key] || column.modules.accessor.accessor || false; - - if (accessor) { - value = column.getFieldValue(data); - - if (value != "undefined") { - colCompnent = column.getComponent(); - params = typeof accessor.params === "function" ? accessor.params(value, data, type, colCompnent, rowComponent) : accessor.params; - column.setFieldValue(data, accessor.accessor(value, data, type, params, colCompnent, rowComponent)); - } - } - } - }); - - return data; -}, - -//default accessors -Accessor.prototype.accessors = {}; - -Tabulator.prototype.registerModule("accessor", Accessor); -var Ajax = function Ajax(table) { - - this.table = table; //hold Tabulator object - this.config = false; //hold config object for ajax request - this.url = ""; //request URL - this.urlGenerator = false; - this.params = false; //request parameters - - this.loaderElement = this.createLoaderElement(); //loader message div - this.msgElement = this.createMsgElement(); //message element - this.loadingElement = false; - this.errorElement = false; - this.loaderPromise = false; - - this.progressiveLoad = false; - this.loading = false; - - this.requestOrder = 0; //prevent requests comming out of sequence if overridden by another load request -}; - -//initialize setup options -Ajax.prototype.initialize = function () { - var template; - - this.loaderElement.appendChild(this.msgElement); - - if (this.table.options.ajaxLoaderLoading) { - if (typeof this.table.options.ajaxLoaderLoading == "string") { - template = document.createElement('template'); - template.innerHTML = this.table.options.ajaxLoaderLoading.trim(); - this.loadingElement = template.content.firstChild; - } else { - this.loadingElement = this.table.options.ajaxLoaderLoading; - } - } - - this.loaderPromise = this.table.options.ajaxRequestFunc || this.defaultLoaderPromise; - - this.urlGenerator = this.table.options.ajaxURLGenerator || this.defaultURLGenerator; - - if (this.table.options.ajaxLoaderError) { - if (typeof this.table.options.ajaxLoaderError == "string") { - template = document.createElement('template'); - template.innerHTML = this.table.options.ajaxLoaderError.trim(); - this.errorElement = template.content.firstChild; - } else { - this.errorElement = this.table.options.ajaxLoaderError; - } - } - - if (this.table.options.ajaxParams) { - this.setParams(this.table.options.ajaxParams); - } - - if (this.table.options.ajaxConfig) { - this.setConfig(this.table.options.ajaxConfig); - } - - if (this.table.options.ajaxURL) { - this.setUrl(this.table.options.ajaxURL); - } - - if (this.table.options.ajaxProgressiveLoad) { - if (this.table.options.pagination) { - this.progressiveLoad = false; - console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time"); - } else { - if (this.table.modExists("page")) { - this.progressiveLoad = this.table.options.ajaxProgressiveLoad; - this.table.modules.page.initializeProgressive(this.progressiveLoad); - } else { - console.error("Pagination plugin is required for progressive ajax loading"); - } - } - } -}; - -Ajax.prototype.createLoaderElement = function () { - var el = document.createElement("div"); - el.classList.add("tabulator-loader"); - return el; -}; - -Ajax.prototype.createMsgElement = function () { - var el = document.createElement("div"); - - el.classList.add("tabulator-loader-msg"); - el.setAttribute("role", "alert"); - - return el; -}; - -//set ajax params -Ajax.prototype.setParams = function (params, update) { - if (update) { - this.params = this.params || {}; - - for (var key in params) { - this.params[key] = params[key]; - } - } else { - this.params = params; - } -}; - -Ajax.prototype.getParams = function () { - return this.params || {}; -}; - -//load config object -Ajax.prototype.setConfig = function (config) { - this._loadDefaultConfig(); - - if (typeof config == "string") { - this.config.method = config; - } else { - for (var key in config) { - this.config[key] = config[key]; - } - } -}; - -//create config object from default -Ajax.prototype._loadDefaultConfig = function (force) { - var self = this; - if (!self.config || force) { - - self.config = {}; - - //load base config from defaults - for (var key in self.defaultConfig) { - self.config[key] = self.defaultConfig[key]; - } - } -}; - -//set request url -Ajax.prototype.setUrl = function (url) { - this.url = url; -}; - -//get request url -Ajax.prototype.getUrl = function () { - return this.url; -}; - -//lstandard loading function -Ajax.prototype.loadData = function (inPosition, columnsChanged) { - var self = this; - - if (this.progressiveLoad) { - return this._loadDataProgressive(); - } else { - return this._loadDataStandard(inPosition, columnsChanged); - } -}; - -Ajax.prototype.nextPage = function (diff) { - var margin; - - if (!this.loading) { - - margin = this.table.options.ajaxProgressiveLoadScrollMargin || this.table.rowManager.getElement().clientHeight * 2; - - if (diff < margin) { - this.table.modules.page.nextPage().then(function () {}).catch(function () {}); - } - } -}; - -Ajax.prototype.blockActiveRequest = function () { - this.requestOrder++; -}; - -Ajax.prototype._loadDataProgressive = function () { - this.table.rowManager.setData([]); - return this.table.modules.page.setPage(1); -}; - -Ajax.prototype._loadDataStandard = function (inPosition, columnsChanged) { - var _this42 = this; - - return new Promise(function (resolve, reject) { - _this42.sendRequest(inPosition).then(function (data) { - _this42.table.rowManager.setData(data, inPosition, columnsChanged).then(function () { - resolve(); - }).catch(function (e) { - reject(e); - }); - }).catch(function (e) { - reject(e); - }); - }); -}; - -Ajax.prototype.generateParamsList = function (data, prefix) { - var self = this, - output = []; - - prefix = prefix || ""; - - if (Array.isArray(data)) { - data.forEach(function (item, i) { - output = output.concat(self.generateParamsList(item, prefix ? prefix + "[" + i + "]" : i)); - }); - } else if ((typeof data === 'undefined' ? 'undefined' : _typeof(data)) === "object") { - for (var key in data) { - output = output.concat(self.generateParamsList(data[key], prefix ? prefix + "[" + key + "]" : key)); - } - } else { - output.push({ key: prefix, value: data }); - } - - return output; -}; - -Ajax.prototype.serializeParams = function (params) { - var output = this.generateParamsList(params), - encoded = []; - - output.forEach(function (item) { - encoded.push(encodeURIComponent(item.key) + "=" + encodeURIComponent(item.value)); - }); - - return encoded.join("&"); -}; - -//send ajax request -Ajax.prototype.sendRequest = function (silent) { - var _this43 = this; - - var self = this, - url = self.url, - requestNo, - esc, - query; - - self.requestOrder++; - requestNo = self.requestOrder; - - self._loadDefaultConfig(); - - return new Promise(function (resolve, reject) { - if (self.table.options.ajaxRequesting.call(_this43.table, self.url, self.params) !== false) { - - self.loading = true; - - if (!silent) { - self.showLoader(); - } - - _this43.loaderPromise(url, self.config, self.params).then(function (data) { - if (requestNo === self.requestOrder) { - if (self.table.options.ajaxResponse) { - data = self.table.options.ajaxResponse.call(self.table, self.url, self.params, data); - } - resolve(data); - - self.hideLoader(); - self.loading = false; - } else { - console.warn("Ajax Response Blocked - An active ajax request was blocked by an attempt to change table data while the request was being made"); - } - }).catch(function (error) { - console.error("Ajax Load Error: ", error); - self.table.options.ajaxError.call(self.table, error); - - self.showError(); - - setTimeout(function () { - self.hideLoader(); - }, 3000); - - self.loading = false; - - reject(); - }); - } else { - reject(); - } - }); -}; - -Ajax.prototype.showLoader = function () { - var shouldLoad = typeof this.table.options.ajaxLoader === "function" ? this.table.options.ajaxLoader() : this.table.options.ajaxLoader; - - if (shouldLoad) { - - this.hideLoader(); - - while (this.msgElement.firstChild) { - this.msgElement.removeChild(this.msgElement.firstChild); - }this.msgElement.classList.remove("tabulator-error"); - this.msgElement.classList.add("tabulator-loading"); - - if (this.loadingElement) { - this.msgElement.appendChild(this.loadingElement); - } else { - this.msgElement.innerHTML = this.table.modules.localize.getText("ajax|loading"); - } - - this.table.element.appendChild(this.loaderElement); - } -}; - -Ajax.prototype.showError = function () { - this.hideLoader(); - - while (this.msgElement.firstChild) { - this.msgElement.removeChild(this.msgElement.firstChild); - }this.msgElement.classList.remove("tabulator-loading"); - this.msgElement.classList.add("tabulator-error"); - - if (this.errorElement) { - this.msgElement.appendChild(this.errorElement); - } else { - this.msgElement.innerHTML = this.table.modules.localize.getText("ajax|error"); - } - - this.table.element.appendChild(this.loaderElement); -}; - -Ajax.prototype.hideLoader = function () { - if (this.loaderElement.parentNode) { - this.loaderElement.parentNode.removeChild(this.loaderElement); - } -}; - -//default ajax config object -Ajax.prototype.defaultConfig = { - method: "GET" -}; - -Ajax.prototype.defaultURLGenerator = function (url, config, params) { - - if (url) { - if (params && Object.keys(params).length) { - if (!config.method || config.method.toLowerCase() == "get") { - config.method = "get"; - - url += (url.includes("?") ? "&" : "?") + this.serializeParams(params); - } - } - } - - return url; -}; - -Ajax.prototype.defaultLoaderPromise = function (url, config, params) { - var self = this, - contentType; - - return new Promise(function (resolve, reject) { - - //set url - url = self.urlGenerator(url, config, params); - - //set body content if not GET request - if (config.method.toUpperCase() != "GET") { - contentType = _typeof(self.table.options.ajaxContentType) === "object" ? self.table.options.ajaxContentType : self.contentTypeFormatters[self.table.options.ajaxContentType]; - if (contentType) { - - for (var key in contentType.headers) { - if (!config.headers) { - config.headers = {}; - } - - if (typeof config.headers[key] === "undefined") { - config.headers[key] = contentType.headers[key]; - } - } - - config.body = contentType.body.call(self, url, config, params); - } else { - console.warn("Ajax Error - Invalid ajaxContentType value:", self.table.options.ajaxContentType); - } - } - - if (url) { - - //configure headers - if (typeof config.headers === "undefined") { - config.headers = {}; - } - - if (typeof config.headers.Accept === "undefined") { - config.headers.Accept = "application/json"; - } - - if (typeof config.headers["X-Requested-With"] === "undefined") { - config.headers["X-Requested-With"] = "XMLHttpRequest"; - } - - if (typeof config.mode === "undefined") { - config.mode = "cors"; - } - - if (config.mode == "cors") { - - if (typeof config.headers["Access-Control-Allow-Origin"] === "undefined") { - config.headers["Access-Control-Allow-Origin"] = window.location.origin; - } - - if (typeof config.credentials === "undefined") { - config.credentials = 'same-origin'; - } - } else { - if (typeof config.credentials === "undefined") { - config.credentials = 'include'; - } - } - - //send request - fetch(url, config).then(function (response) { - if (response.ok) { - response.json().then(function (data) { - resolve(data); - }).catch(function (error) { - reject(error); - console.warn("Ajax Load Error - Invalid JSON returned", error); - }); - } else { - console.error("Ajax Load Error - Connection Error: " + response.status, response.statusText); - reject(response); - } - }).catch(function (error) { - console.error("Ajax Load Error - Connection Error: ", error); - reject(error); - }); - } else { - console.warn("Ajax Load Error - No URL Set"); - resolve([]); - } - }); -}; - -Ajax.prototype.contentTypeFormatters = { - "json": { - headers: { - 'Content-Type': 'application/json' - }, - body: function body(url, config, params) { - return JSON.stringify(params); - } - }, - "form": { - headers: {}, - body: function body(url, config, params) { - var output = this.generateParamsList(params), - form = new FormData(); - - output.forEach(function (item) { - form.append(item.key, item.value); - }); - - return form; - } - } -}; - -Tabulator.prototype.registerModule("ajax", Ajax); - -//public calc object -var CalcComponent = function CalcComponent(row) { - this._row = row; -}; - -CalcComponent.prototype.getData = function (transform) { - return this._row.getData(transform); -}; - -CalcComponent.prototype.getElement = function () { - return this._row.getElement(); -}; - -CalcComponent.prototype.getTable = function () { - return this._row.table; -}; - -CalcComponent.prototype.getCells = function () { - var cells = []; - - this._row.getCells().forEach(function (cell) { - cells.push(cell.getComponent()); - }); - - return cells; -}; - -CalcComponent.prototype.getCell = function (column) { - var cell = this._row.getCell(column); - return cell ? cell.getComponent() : false; -}; - -CalcComponent.prototype._getSelf = function () { - return this._row; -}; - -var ColumnCalcs = function ColumnCalcs(table) { - this.table = table; //hold Tabulator object - this.topCalcs = []; - this.botCalcs = []; - this.genColumn = false; - this.topElement = this.createElement(); - this.botElement = this.createElement(); - this.topRow = false; - this.botRow = false; - this.topInitialized = false; - this.botInitialized = false; - - this.initialize(); -}; - -ColumnCalcs.prototype.createElement = function () { - var el = document.createElement("div"); - el.classList.add("tabulator-calcs-holder"); - return el; -}; - -ColumnCalcs.prototype.initialize = function () { - this.genColumn = new Column({ field: "value" }, this); -}; - -//dummy functions to handle being mock column manager -ColumnCalcs.prototype.registerColumnField = function () {}; - -//initialize column calcs -ColumnCalcs.prototype.initializeColumn = function (column) { - var def = column.definition; - - var config = { - topCalcParams: def.topCalcParams || {}, - botCalcParams: def.bottomCalcParams || {} - }; - - if (def.topCalc) { - - switch (_typeof(def.topCalc)) { - case "string": - if (this.calculations[def.topCalc]) { - config.topCalc = this.calculations[def.topCalc]; - } else { - console.warn("Column Calc Error - No such calculation found, ignoring: ", def.topCalc); - } - break; - - case "function": - config.topCalc = def.topCalc; - break; - - } - - if (config.topCalc) { - column.modules.columnCalcs = config; - this.topCalcs.push(column); - - if (this.table.options.columnCalcs != "group") { - this.initializeTopRow(); - } - } - } - - if (def.bottomCalc) { - switch (_typeof(def.bottomCalc)) { - case "string": - if (this.calculations[def.bottomCalc]) { - config.botCalc = this.calculations[def.bottomCalc]; - } else { - console.warn("Column Calc Error - No such calculation found, ignoring: ", def.bottomCalc); - } - break; - - case "function": - config.botCalc = def.bottomCalc; - break; - - } - - if (config.botCalc) { - column.modules.columnCalcs = config; - this.botCalcs.push(column); - - if (this.table.options.columnCalcs != "group") { - this.initializeBottomRow(); - } - } - } -}; - -ColumnCalcs.prototype.removeCalcs = function () { - var changed = false; - - if (this.topInitialized) { - this.topInitialized = false; - this.topElement.parentNode.removeChild(this.topElement); - changed = true; - } - - if (this.botInitialized) { - this.botInitialized = false; - this.table.footerManager.remove(this.botElement); - changed = true; - } - - if (changed) { - this.table.rowManager.adjustTableSize(); - } -}; - -ColumnCalcs.prototype.initializeTopRow = function () { - if (!this.topInitialized) { - // this.table.columnManager.headersElement.after(this.topElement); - this.table.columnManager.getElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling); - this.topInitialized = true; - } -}; - -ColumnCalcs.prototype.initializeBottomRow = function () { - if (!this.botInitialized) { - this.table.footerManager.prepend(this.botElement); - this.botInitialized = true; - } -}; - -ColumnCalcs.prototype.scrollHorizontal = function (left) { - var hozAdjust = 0, - scrollWidth = this.table.columnManager.getElement().scrollWidth - this.table.element.clientWidth; - - if (this.botInitialized && this.botRow) { - this.botRow.getElement().style.marginLeft = -left + "px"; - } -}; - -ColumnCalcs.prototype.recalc = function (rows) { - var data, row; - - if (this.topInitialized || this.botInitialized) { - data = this.rowsToData(rows); - - if (this.topInitialized) { - if (this.topRow) { - this.topRow.deleteCells(); - } - - row = this.generateRow("top", this.rowsToData(rows)); - this.topRow = row; - while (this.topElement.firstChild) { - this.topElement.removeChild(this.topElement.firstChild); - }this.topElement.appendChild(row.getElement()); - row.initialize(true); - } - - if (this.botInitialized) { - if (this.botRow) { - this.botRow.deleteCells(); - } - - row = this.generateRow("bottom", this.rowsToData(rows)); - this.botRow = row; - while (this.botElement.firstChild) { - this.botElement.removeChild(this.botElement.firstChild); - }this.botElement.appendChild(row.getElement()); - row.initialize(true); - } - - this.table.rowManager.adjustTableSize(); - - //set resizable handles - if (this.table.modExists("frozenColumns")) { - this.table.modules.frozenColumns.layout(); - } - } -}; - -ColumnCalcs.prototype.recalcRowGroup = function (row) { - this.recalcGroup(this.table.modules.groupRows.getRowGroup(row)); -}; - -ColumnCalcs.prototype.recalcAll = function () { - var _this44 = this; - - if (this.topCalcs.length || this.botCalcs.length) { - if (this.table.options.columnCalcs !== "group") { - this.recalc(this.table.rowManager.activeRows); - } - - if (this.table.options.groupBy && this.table.options.columnCalcs !== "table") { - - var groups = table.modules.groupRows.getChildGroups(); - - groups.forEach(function (group) { - _this44.recalcGroup(group); - }); - } - } -}; - -ColumnCalcs.prototype.recalcGroup = function (group) { - var data, rowData; - - if (group) { - if (group.calcs) { - if (group.calcs.bottom) { - data = this.rowsToData(group.rows); - rowData = this.generateRowData("bottom", data); - - group.calcs.bottom.updateData(rowData); - group.calcs.bottom.reinitialize(); - } - - if (group.calcs.top) { - data = this.rowsToData(group.rows); - rowData = this.generateRowData("top", data); - - group.calcs.top.updateData(rowData); - group.calcs.top.reinitialize(); - } - } - } -}; - -//generate top stats row -ColumnCalcs.prototype.generateTopRow = function (rows) { - return this.generateRow("top", this.rowsToData(rows)); -}; -//generate bottom stats row -ColumnCalcs.prototype.generateBottomRow = function (rows) { - return this.generateRow("bottom", this.rowsToData(rows)); -}; - -ColumnCalcs.prototype.rowsToData = function (rows) { - var _this45 = this; - - var data = []; - - rows.forEach(function (row) { - data.push(row.getData()); - - if (_this45.table.options.dataTree && _this45.table.options.dataTreeChildColumnCalcs) { - if (row.modules.dataTree.open) { - var children = _this45.rowsToData(_this45.table.modules.dataTree.getFilteredTreeChildren(row)); - data = data.concat(children); - } - } - }); - - return data; -}; - -//generate stats row -ColumnCalcs.prototype.generateRow = function (pos, data) { - var self = this, - rowData = this.generateRowData(pos, data), - row; - - if (self.table.modExists("mutator")) { - self.table.modules.mutator.disable(); - } - - row = new Row(rowData, this, "calc"); - - if (self.table.modExists("mutator")) { - self.table.modules.mutator.enable(); - } - - row.getElement().classList.add("tabulator-calcs", "tabulator-calcs-" + pos); - - row.component = false; - - row.getComponent = function () { - if (!this.component) { - this.component = new CalcComponent(this); - } - - return this.component; - }; - - row.generateCells = function () { - - var cells = []; - - self.table.columnManager.columnsByIndex.forEach(function (column) { - - //set field name of mock column - self.genColumn.setField(column.getField()); - self.genColumn.hozAlign = column.hozAlign; - - if (column.definition[pos + "CalcFormatter"] && self.table.modExists("format")) { - self.genColumn.modules.format = { - formatter: self.table.modules.format.getFormatter(column.definition[pos + "CalcFormatter"]), - params: column.definition[pos + "CalcFormatterParams"] || {} - }; - } else { - self.genColumn.modules.format = { - formatter: self.table.modules.format.getFormatter("plaintext"), - params: {} - }; - } - - //ensure css class defintion is replicated to calculation cell - self.genColumn.definition.cssClass = column.definition.cssClass; - - //generate cell and assign to correct column - var cell = new Cell(self.genColumn, row); - cell.getElement(); - cell.column = column; - cell.setWidth(); - - column.cells.push(cell); - cells.push(cell); - - if (!column.visible) { - cell.hide(); - } - }); - - this.cells = cells; - }; - - return row; -}; - -//generate stats row -ColumnCalcs.prototype.generateRowData = function (pos, data) { - var rowData = {}, - calcs = pos == "top" ? this.topCalcs : this.botCalcs, - type = pos == "top" ? "topCalc" : "botCalc", - params, - paramKey; - - calcs.forEach(function (column) { - var values = []; - - if (column.modules.columnCalcs && column.modules.columnCalcs[type]) { - data.forEach(function (item) { - values.push(column.getFieldValue(item)); - }); - - paramKey = type + "Params"; - params = typeof column.modules.columnCalcs[paramKey] === "function" ? column.modules.columnCalcs[paramKey](values, data) : column.modules.columnCalcs[paramKey]; - - column.setFieldValue(rowData, column.modules.columnCalcs[type](values, data, params)); - } - }); - - return rowData; -}; - -ColumnCalcs.prototype.hasTopCalcs = function () { - return !!this.topCalcs.length; -}; - -ColumnCalcs.prototype.hasBottomCalcs = function () { - return !!this.botCalcs.length; -}; - -//handle table redraw -ColumnCalcs.prototype.redraw = function () { - if (this.topRow) { - this.topRow.normalizeHeight(true); - } - if (this.botRow) { - this.botRow.normalizeHeight(true); - } -}; - -//return the calculated -ColumnCalcs.prototype.getResults = function () { - var self = this, - results = {}, - groups; - - if (this.table.options.groupBy && this.table.modExists("groupRows")) { - groups = this.table.modules.groupRows.getGroups(true); - - groups.forEach(function (group) { - results[group.getKey()] = self.getGroupResults(group); - }); - } else { - results = { - top: this.topRow ? this.topRow.getData() : {}, - bottom: this.botRow ? this.botRow.getData() : {} - }; - } - - return results; -}; - -//get results from a group -ColumnCalcs.prototype.getGroupResults = function (group) { - var self = this, - groupObj = group._getSelf(), - subGroups = group.getSubGroups(), - subGroupResults = {}, - results = {}; - - subGroups.forEach(function (subgroup) { - subGroupResults[subgroup.getKey()] = self.getGroupResults(subgroup); - }); - - results = { - top: groupObj.calcs.top ? groupObj.calcs.top.getData() : {}, - bottom: groupObj.calcs.bottom ? groupObj.calcs.bottom.getData() : {}, - groups: subGroupResults - }; - - return results; -}; - -//default calculations -ColumnCalcs.prototype.calculations = { - "avg": function avg(values, data, calcParams) { - var output = 0, - precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : 2; - - if (values.length) { - output = values.reduce(function (sum, value) { - return Number(sum) + Number(value); - }); - - output = output / values.length; - - output = precision !== false ? output.toFixed(precision) : output; - } - - return parseFloat(output).toString(); - }, - "max": function max(values, data, calcParams) { - var output = null, - precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : false; - - values.forEach(function (value) { - - value = Number(value); - - if (value > output || output === null) { - output = value; - } - }); - - return output !== null ? precision !== false ? output.toFixed(precision) : output : ""; - }, - "min": function min(values, data, calcParams) { - var output = null, - precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : false; - - values.forEach(function (value) { - - value = Number(value); - - if (value < output || output === null) { - output = value; - } - }); - - return output !== null ? precision !== false ? output.toFixed(precision) : output : ""; - }, - "sum": function sum(values, data, calcParams) { - var output = 0, - precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : false; - - if (values.length) { - values.forEach(function (value) { - value = Number(value); - - output += !isNaN(value) ? Number(value) : 0; - }); - } - - return precision !== false ? output.toFixed(precision) : output; - }, - "concat": function concat(values, data, calcParams) { - var output = 0; - - if (values.length) { - output = values.reduce(function (sum, value) { - return String(sum) + String(value); - }); - } - - return output; - }, - "count": function count(values, data, calcParams) { - var output = 0; - - if (values.length) { - values.forEach(function (value) { - if (value) { - output++; - } - }); - } - - return output; - } -}; - -Tabulator.prototype.registerModule("columnCalcs", ColumnCalcs); - -var Clipboard = function Clipboard(table) { - this.table = table; - this.mode = true; - - this.pasteParser = function () {}; - this.pasteAction = function () {}; - this.customSelection = false; - this.rowRange = false; - this.blocked = true; //block copy actions not originating from this command -}; - -Clipboard.prototype.initialize = function () { - var _this46 = this; - - this.mode = this.table.options.clipboard; - - this.rowRange = this.table.options.clipboardCopyRowRange; - - if (this.mode === true || this.mode === "copy") { - this.table.element.addEventListener("copy", function (e) { - var plain, html, list; - - if (!_this46.blocked) { - e.preventDefault(); - - if (_this46.customSelection) { - plain = _this46.customSelection; - - if (_this46.table.options.clipboardCopyFormatter) { - plain = _this46.table.options.clipboardCopyFormatter("plain", plain); - } - } else { - - var list = _this46.table.modules.export.generateExportList(_this46.table.options.clipboardCopyConfig, _this46.table.options.clipboardCopyStyled, _this46.rowRange, "clipboard"); - - html = _this46.table.modules.export.genereateHTMLTable(list); - plain = html ? _this46.generatePlainContent(list) : ""; - - if (_this46.table.options.clipboardCopyFormatter) { - plain = _this46.table.options.clipboardCopyFormatter("plain", plain); - html = _this46.table.options.clipboardCopyFormatter("html", html); - } - } - - if (window.clipboardData && window.clipboardData.setData) { - window.clipboardData.setData('Text', plain); - } else if (e.clipboardData && e.clipboardData.setData) { - e.clipboardData.setData('text/plain', plain); - if (html) { - e.clipboardData.setData('text/html', html); - } - } else if (e.originalEvent && e.originalEvent.clipboardData.setData) { - e.originalEvent.clipboardData.setData('text/plain', plain); - if (html) { - e.originalEvent.clipboardData.setData('text/html', html); - } - } - - _this46.table.options.clipboardCopied.call(_this46.table, plain, html); - - _this46.reset(); - } - }); - } - - if (this.mode === true || this.mode === "paste") { - this.table.element.addEventListener("paste", function (e) { - _this46.paste(e); - }); - } - - this.setPasteParser(this.table.options.clipboardPasteParser); - this.setPasteAction(this.table.options.clipboardPasteAction); -}; - -Clipboard.prototype.reset = function () { - this.blocked = true; - this.customSelection = false; -}; - -Clipboard.prototype.generatePlainContent = function (list) { - var output = []; - - list.forEach(function (row) { - var rowData = []; - - row.columns.forEach(function (col) { - var value = ""; - - if (col) { - - if (row.type === "group") { - col.value = col.component.getKey(); - } - - if (col.value === null) { - value = ""; - } else { - switch (_typeof(col.value)) { - case "object": - value = JSON.stringify(col.value); - break; - - case "undefined": - value = ""; - break; - - default: - value = col.value; - } - } - } - - rowData.push(value); - }); - - output.push(rowData.join("\t")); - }); - - return output.join("\n"); -}; - -Clipboard.prototype.copy = function (range, internal) { - var range, sel, textRange; - this.blocked = false; - this.customSelection = false; - - if (this.mode === true || this.mode === "copy") { - - this.rowRange = range || this.table.options.clipboardCopyRowRange; - - if (typeof window.getSelection != "undefined" && typeof document.createRange != "undefined") { - range = document.createRange(); - range.selectNodeContents(this.table.element); - sel = window.getSelection(); - - if (sel.toString() && internal) { - this.customSelection = sel.toString(); - } - - sel.removeAllRanges(); - sel.addRange(range); - } else if (typeof document.selection != "undefined" && typeof document.body.createTextRange != "undefined") { - textRange = document.body.createTextRange(); - textRange.moveToElementText(this.table.element); - textRange.select(); - } - - document.execCommand('copy'); - - if (sel) { - sel.removeAllRanges(); - } - } -}; - -//PASTE EVENT HANDLING - -Clipboard.prototype.setPasteAction = function (action) { - - switch (typeof action === 'undefined' ? 'undefined' : _typeof(action)) { - case "string": - this.pasteAction = this.pasteActions[action]; - - if (!this.pasteAction) { - console.warn("Clipboard Error - No such paste action found:", action); - } - break; - - case "function": - this.pasteAction = action; - break; - } -}; - -Clipboard.prototype.setPasteParser = function (parser) { - switch (typeof parser === 'undefined' ? 'undefined' : _typeof(parser)) { - case "string": - this.pasteParser = this.pasteParsers[parser]; - - if (!this.pasteParser) { - console.warn("Clipboard Error - No such paste parser found:", parser); - } - break; - - case "function": - this.pasteParser = parser; - break; - } -}; - -Clipboard.prototype.paste = function (e) { - var data, rowData, rows; - - if (this.checkPaseOrigin(e)) { - - data = this.getPasteData(e); - - rowData = this.pasteParser.call(this, data); - - if (rowData) { - e.preventDefault(); - - if (this.table.modExists("mutator")) { - rowData = this.mutateData(rowData); - } - - rows = this.pasteAction.call(this, rowData); - this.table.options.clipboardPasted.call(this.table, data, rowData, rows); - } else { - this.table.options.clipboardPasteError.call(this.table, data); - } - } -}; - -Clipboard.prototype.mutateData = function (data) { - var self = this, - output = []; - - if (Array.isArray(data)) { - data.forEach(function (row) { - output.push(self.table.modules.mutator.transformRow(row, "clipboard")); - }); - } else { - output = data; - } - - return output; -}; - -Clipboard.prototype.checkPaseOrigin = function (e) { - var valid = true; - - if (e.target.tagName != "DIV" || this.table.modules.edit.currentCell) { - valid = false; - } - - return valid; -}; - -Clipboard.prototype.getPasteData = function (e) { - var data; - - if (window.clipboardData && window.clipboardData.getData) { - data = window.clipboardData.getData('Text'); - } else if (e.clipboardData && e.clipboardData.getData) { - data = e.clipboardData.getData('text/plain'); - } else if (e.originalEvent && e.originalEvent.clipboardData.getData) { - data = e.originalEvent.clipboardData.getData('text/plain'); - } - - return data; -}; - -Clipboard.prototype.pasteParsers = { - table: function table(clipboard) { - var data = [], - success = false, - headerFindSuccess = true, - columns = this.table.columnManager.columns, - columnMap = [], - rows = []; - - //get data from clipboard into array of columns and rows. - clipboard = clipboard.split("\n"); - - clipboard.forEach(function (row) { - data.push(row.split("\t")); - }); - - if (data.length && !(data.length === 1 && data[0].length < 2)) { - success = true; - - //check if headers are present by title - data[0].forEach(function (value) { - var column = columns.find(function (column) { - return value && column.definition.title && value.trim() && column.definition.title.trim() === value.trim(); - }); - - if (column) { - columnMap.push(column); - } else { - headerFindSuccess = false; - } - }); - - //check if column headers are present by field - if (!headerFindSuccess) { - headerFindSuccess = true; - columnMap = []; - - data[0].forEach(function (value) { - var column = columns.find(function (column) { - return value && column.field && value.trim() && column.field.trim() === value.trim(); - }); - - if (column) { - columnMap.push(column); - } else { - headerFindSuccess = false; - } - }); - - if (!headerFindSuccess) { - columnMap = this.table.columnManager.columnsByIndex; - } - } - - //remove header row if found - if (headerFindSuccess) { - data.shift(); - } - - data.forEach(function (item) { - var row = {}; - - item.forEach(function (value, i) { - if (columnMap[i]) { - row[columnMap[i].field] = value; - } - }); - - rows.push(row); - }); - - return rows; - } else { - return false; - } - } -}; - -Clipboard.prototype.pasteActions = { - replace: function replace(rows) { - return this.table.setData(rows); - }, - update: function update(rows) { - return this.table.updateOrAddData(rows); - }, - insert: function insert(rows) { - return this.table.addData(rows); - } -}; - -Tabulator.prototype.registerModule("clipboard", Clipboard); - -var DataTree = function DataTree(table) { - this.table = table; - this.indent = 10; - this.field = ""; - this.collapseEl = null; - this.expandEl = null; - this.branchEl = null; - this.elementField = false; - - this.startOpen = function () {}; - - this.displayIndex = 0; -}; - -DataTree.prototype.initialize = function () { - var dummyEl = null, - firstCol = this.table.columnManager.getFirstVisibileColumn(), - options = this.table.options; - - this.field = options.dataTreeChildField; - this.indent = options.dataTreeChildIndent; - this.elementField = options.dataTreeElementColumn || (firstCol ? firstCol.field : false); - - if (options.dataTreeBranchElement) { - - if (options.dataTreeBranchElement === true) { - this.branchEl = document.createElement("div"); - this.branchEl.classList.add("tabulator-data-tree-branch"); - } else { - if (typeof options.dataTreeBranchElement === "string") { - dummyEl = document.createElement("div"); - dummyEl.innerHTML = options.dataTreeBranchElement; - this.branchEl = dummyEl.firstChild; - } else { - this.branchEl = options.dataTreeBranchElement; - } - } - } - - if (options.dataTreeCollapseElement) { - if (typeof options.dataTreeCollapseElement === "string") { - dummyEl = document.createElement("div"); - dummyEl.innerHTML = options.dataTreeCollapseElement; - this.collapseEl = dummyEl.firstChild; - } else { - this.collapseEl = options.dataTreeCollapseElement; - } - } else { - this.collapseEl = document.createElement("div"); - this.collapseEl.classList.add("tabulator-data-tree-control"); - this.collapseEl.tabIndex = 0; - this.collapseEl.innerHTML = "
"; - } - - if (options.dataTreeExpandElement) { - if (typeof options.dataTreeExpandElement === "string") { - dummyEl = document.createElement("div"); - dummyEl.innerHTML = options.dataTreeExpandElement; - this.expandEl = dummyEl.firstChild; - } else { - this.expandEl = options.dataTreeExpandElement; - } - } else { - this.expandEl = document.createElement("div"); - this.expandEl.classList.add("tabulator-data-tree-control"); - this.expandEl.tabIndex = 0; - this.expandEl.innerHTML = "
"; - } - - switch (_typeof(options.dataTreeStartExpanded)) { - case "boolean": - this.startOpen = function (row, index) { - return options.dataTreeStartExpanded; - }; - break; - - case "function": - this.startOpen = options.dataTreeStartExpanded; - break; - - default: - this.startOpen = function (row, index) { - return options.dataTreeStartExpanded[index]; - }; - break; - } -}; - -DataTree.prototype.initializeRow = function (row) { - var childArray = row.getData()[this.field]; - var isArray = Array.isArray(childArray); - - var children = isArray || !isArray && (typeof childArray === 'undefined' ? 'undefined' : _typeof(childArray)) === "object" && childArray !== null; - - if (!children && row.modules.dataTree && row.modules.dataTree.branchEl) { - row.modules.dataTree.branchEl.parentNode.removeChild(row.modules.dataTree.branchEl); - } - - if (!children && row.modules.dataTree && row.modules.dataTree.controlEl) { - row.modules.dataTree.controlEl.parentNode.removeChild(row.modules.dataTree.controlEl); - } - - row.modules.dataTree = { - index: row.modules.dataTree ? row.modules.dataTree.index : 0, - open: children ? row.modules.dataTree ? row.modules.dataTree.open : this.startOpen(row.getComponent(), 0) : false, - controlEl: row.modules.dataTree && children ? row.modules.dataTree.controlEl : false, - branchEl: row.modules.dataTree && children ? row.modules.dataTree.branchEl : false, - parent: row.modules.dataTree ? row.modules.dataTree.parent : false, - children: children - }; -}; - -DataTree.prototype.layoutRow = function (row) { - var cell = this.elementField ? row.getCell(this.elementField) : row.getCells()[0], - el = cell.getElement(), - config = row.modules.dataTree; - - if (config.branchEl) { - if (config.branchEl.parentNode) { - config.branchEl.parentNode.removeChild(config.branchEl); - } - config.branchEl = false; - } - - if (config.controlEl) { - if (config.controlEl.parentNode) { - config.controlEl.parentNode.removeChild(config.controlEl); - } - config.controlEl = false; - } - - this.generateControlElement(row, el); - - row.element.classList.add("tabulator-tree-level-" + config.index); - - if (config.index) { - if (this.branchEl) { - config.branchEl = this.branchEl.cloneNode(true); - el.insertBefore(config.branchEl, el.firstChild); - - if (this.table.rtl) { - config.branchEl.style.marginRight = (config.branchEl.offsetWidth + config.branchEl.style.marginLeft) * (config.index - 1) + config.index * this.indent + "px"; - } else { - config.branchEl.style.marginLeft = (config.branchEl.offsetWidth + config.branchEl.style.marginRight) * (config.index - 1) + config.index * this.indent + "px"; - } - } else { - - if (this.table.rtl) { - el.style.paddingRight = parseInt(window.getComputedStyle(el, null).getPropertyValue('padding-right')) + config.index * this.indent + "px"; - } else { - el.style.paddingLeft = parseInt(window.getComputedStyle(el, null).getPropertyValue('padding-left')) + config.index * this.indent + "px"; - } - } - } -}; - -DataTree.prototype.generateControlElement = function (row, el) { - var _this47 = this; - - var config = row.modules.dataTree, - el = el || row.getCells()[0].getElement(), - oldControl = config.controlEl; - - if (config.children !== false) { - - if (config.open) { - config.controlEl = this.collapseEl.cloneNode(true); - config.controlEl.addEventListener("click", function (e) { - e.stopPropagation(); - _this47.collapseRow(row); - }); - } else { - config.controlEl = this.expandEl.cloneNode(true); - config.controlEl.addEventListener("click", function (e) { - e.stopPropagation(); - _this47.expandRow(row); - }); - } - - config.controlEl.addEventListener("mousedown", function (e) { - e.stopPropagation(); - }); - - if (oldControl && oldControl.parentNode === el) { - oldControl.parentNode.replaceChild(config.controlEl, oldControl); - } else { - el.insertBefore(config.controlEl, el.firstChild); - } - } -}; - -DataTree.prototype.setDisplayIndex = function (index) { - this.displayIndex = index; -}; - -DataTree.prototype.getDisplayIndex = function () { - return this.displayIndex; -}; - -DataTree.prototype.getRows = function (rows) { - var _this48 = this; - - var output = []; - - rows.forEach(function (row, i) { - var config, children; - - output.push(row); - - if (row instanceof Row) { - - config = row.modules.dataTree.children; - - if (!config.index && config.children !== false) { - children = _this48.getChildren(row); - - children.forEach(function (child) { - output.push(child); - }); - } - } - }); - - return output; -}; - -DataTree.prototype.getChildren = function (row) { - var _this49 = this; - - var config = row.modules.dataTree, - children = [], - output = []; - - if (config.children !== false && config.open) { - if (!Array.isArray(config.children)) { - config.children = this.generateChildren(row); - } - - if (this.table.modExists("filter") && this.table.options.dataTreeFilter) { - children = this.table.modules.filter.filter(config.children); - } else { - children = config.children; - } - - if (this.table.modExists("sort") && this.table.options.dataTreeSort) { - this.table.modules.sort.sort(children); - } - - children.forEach(function (child) { - output.push(child); - - var subChildren = _this49.getChildren(child); - - subChildren.forEach(function (sub) { - output.push(sub); - }); - }); - } - - return output; -}; - -DataTree.prototype.generateChildren = function (row) { - var _this50 = this; - - var children = []; - - var childArray = row.getData()[this.field]; - - if (!Array.isArray(childArray)) { - childArray = [childArray]; - } - - childArray.forEach(function (childData) { - var childRow = new Row(childData || {}, _this50.table.rowManager); - childRow.modules.dataTree.index = row.modules.dataTree.index + 1; - childRow.modules.dataTree.parent = row; - if (childRow.modules.dataTree.children) { - childRow.modules.dataTree.open = _this50.startOpen(childRow.getComponent(), childRow.modules.dataTree.index); - } - children.push(childRow); - }); - - return children; -}; - -DataTree.prototype.expandRow = function (row, silent) { - var config = row.modules.dataTree; - - if (config.children !== false) { - config.open = true; - - row.reinitialize(); - - this.table.rowManager.refreshActiveData("tree", false, true); - - this.table.options.dataTreeRowExpanded(row.getComponent(), row.modules.dataTree.index); - } -}; - -DataTree.prototype.collapseRow = function (row) { - var config = row.modules.dataTree; - - if (config.children !== false) { - config.open = false; - - row.reinitialize(); - - this.table.rowManager.refreshActiveData("tree", false, true); - - this.table.options.dataTreeRowCollapsed(row.getComponent(), row.modules.dataTree.index); - } -}; - -DataTree.prototype.toggleRow = function (row) { - var config = row.modules.dataTree; - - if (config.children !== false) { - if (config.open) { - this.collapseRow(row); - } else { - this.expandRow(row); - } - } -}; - -DataTree.prototype.getTreeParent = function (row) { - return row.modules.dataTree.parent ? row.modules.dataTree.parent.getComponent() : false; -}; - -DataTree.prototype.getFilteredTreeChildren = function (row) { - var config = row.modules.dataTree, - output = [], - children; - - if (config.children) { - - if (!Array.isArray(config.children)) { - config.children = this.generateChildren(row); - } - - if (this.table.modExists("filter") && this.table.options.dataTreeFilter) { - children = this.table.modules.filter.filter(config.children); - } else { - children = config.children; - } - - children.forEach(function (childRow) { - if (childRow instanceof Row) { - output.push(childRow); - } - }); - } - - return output; -}; - -DataTree.prototype.rowDelete = function (row) { - var parent = row.modules.dataTree.parent, - childIndex; - - if (parent) { - childIndex = this.findChildIndex(row, parent); - - if (childIndex !== false) { - parent.data[this.field].splice(childIndex, 1); - } - - if (!parent.data[this.field].length) { - delete parent.data[this.field]; - } - - this.initializeRow(parent); - this.layoutRow(parent); - } - - this.table.rowManager.refreshActiveData("tree", false, true); -}; - -DataTree.prototype.addTreeChildRow = function (row, data, top, index) { - var childIndex = false; - - if (typeof data === "string") { - data = JSON.parse(data); - } - - if (!Array.isArray(row.data[this.field])) { - row.data[this.field] = []; - - row.modules.dataTree.open = this.startOpen(row.getComponent(), row.modules.dataTree.index); - } - - if (typeof index !== "undefined") { - childIndex = this.findChildIndex(index, row); - - if (childIndex !== false) { - row.data[this.field].splice(top ? childIndex : childIndex + 1, 0, data); - } - } - - if (childIndex === false) { - if (top) { - row.data[this.field].unshift(data); - } else { - row.data[this.field].push(data); - } - } - - this.initializeRow(row); - this.layoutRow(row); - - this.table.rowManager.refreshActiveData("tree", false, true); -}; - -DataTree.prototype.findChildIndex = function (subject, parent) { - var _this51 = this; - - var match = false; - - if ((typeof subject === 'undefined' ? 'undefined' : _typeof(subject)) == "object") { - - if (subject instanceof Row) { - //subject is row element - match = subject.data; - } else if (subject instanceof RowComponent) { - //subject is public row component - match = subject._getSelf().data; - } else if (typeof HTMLElement !== "undefined" && subject instanceof HTMLElement) { - if (parent.modules.dataTree) { - match = parent.modules.dataTree.children.find(function (childRow) { - return childRow instanceof Row ? childRow.element === subject : false; - }); - - if (match) { - match = match.data; - } - } - } - } else if (typeof subject == "undefined" || subject === null) { - match = false; - } else { - //subject should be treated as the index of the row - match = parent.data[this.field].find(function (row) { - return row.data[_this51.table.options.index] == subject; - }); - } - - if (match) { - - if (Array.isArray(parent.data[this.field])) { - match = parent.data[this.field].indexOf(match); - } - - if (match == -1) { - match = false; - } - } - - //catch all for any other type of input - - return match; -}; - -DataTree.prototype.getTreeChildren = function (row, component, recurse) { - var _this52 = this; - - var config = row.modules.dataTree, - output = []; - - if (config.children) { - - if (!Array.isArray(config.children)) { - config.children = this.generateChildren(row); - } - - config.children.forEach(function (childRow) { - if (childRow instanceof Row) { - output.push(component ? childRow.getComponent() : childRow); - - if (recurse) { - output = output.concat(_this52.getTreeChildren(childRow, component, recurse)); - } - } - }); - } - - return output; -}; - -DataTree.prototype.checkForRestyle = function (cell) { - if (!cell.row.cells.indexOf(cell)) { - cell.row.reinitialize(); - } -}; - -DataTree.prototype.getChildField = function () { - return this.field; -}; - -DataTree.prototype.redrawNeeded = function (data) { - return (this.field ? typeof data[this.field] !== "undefined" : false) || (this.elementField ? typeof data[this.elementField] !== "undefined" : false); -}; - -Tabulator.prototype.registerModule("dataTree", DataTree); - -var Download = function Download(table) { - this.table = table; //hold Tabulator object -}; - -//trigger file download -Download.prototype.download = function (type, filename, options, range, interceptCallback) { - var self = this, - downloadFunc = false; - - function buildLink(data, mime) { - if (interceptCallback) { - if (interceptCallback === true) { - self.triggerDownload(data, mime, type, filename, true); - } else { - interceptCallback(data); - } - } else { - self.triggerDownload(data, mime, type, filename); - } - } - - if (typeof type == "function") { - downloadFunc = type; - } else { - if (self.downloaders[type]) { - downloadFunc = self.downloaders[type]; - } else { - console.warn("Download Error - No such download type found: ", type); - } - } - - if (downloadFunc) { - var list = this.generateExportList(range); - - downloadFunc.call(this.table, list, options || {}, buildLink); - } -}; - -Download.prototype.generateExportList = function (range) { - var list = this.table.modules.export.generateExportList(this.table.options.downloadConfig, false, range || this.table.options.downloadRowRange, "download"); - - //assign group header formatter - var groupHeader = this.table.options.groupHeaderDownload; - - if (groupHeader && !Array.isArray(groupHeader)) { - groupHeader = [groupHeader]; - } - - list.forEach(function (row) { - var group; - - if (row.type === "group") { - group = row.columns[0]; - - if (groupHeader && groupHeader[row.indent]) { - group.value = groupHeader[row.indent](group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component); - } - } - }); - - return list; -}; - -Download.prototype.triggerDownload = function (data, mime, type, filename, newTab) { - var element = document.createElement('a'), - blob = new Blob([data], { type: mime }), - filename = filename || "Tabulator." + (typeof type === "function" ? "txt" : type); - - blob = this.table.options.downloadReady.call(this.table, data, blob); - - if (blob) { - - if (newTab) { - window.open(window.URL.createObjectURL(blob)); - } else { - if (navigator.msSaveOrOpenBlob) { - navigator.msSaveOrOpenBlob(blob, filename); - } else { - element.setAttribute('href', window.URL.createObjectURL(blob)); - - //set file title - element.setAttribute('download', filename); - - //trigger download - element.style.display = 'none'; - document.body.appendChild(element); - element.click(); - - //remove temporary link element - document.body.removeChild(element); - } - } - - if (this.table.options.downloadComplete) { - this.table.options.downloadComplete(); - } - } -}; - -Download.prototype.commsReceived = function (table, action, data) { - switch (action) { - case "intercept": - this.download(data.type, "", data.options, data.active, data.intercept); - break; - } -}; - -//downloaders -Download.prototype.downloaders = { - csv: function csv(list, options, setFileContents) { - var delimiter = options && options.delimiter ? options.delimiter : ",", - fileContents = [], - headers = []; - - list.forEach(function (row) { - var item = []; - - switch (row.type) { - case "group": - console.warn("Download Warning - CSV downloader cannot process row groups"); - break; - - case "calc": - console.warn("Download Warning - CSV downloader cannot process column calculations"); - break; - - case "header": - row.columns.forEach(function (col, i) { - if (col && col.depth === 1) { - headers[i] = typeof col.value == "undefined" || col.value === null ? "" : '"' + String(col.value).split('"').join('""') + '"'; - } - }); - break; - - case "row": - row.columns.forEach(function (col) { - - if (col) { - - switch (_typeof(col.value)) { - case "object": - col.value = JSON.stringify(col.value); - break; - - case "undefined": - case "null": - col.value = ""; - break; - } - - item.push('"' + String(col.value).split('"').join('""') + '"'); - } - }); - - fileContents.push(item.join(delimiter)); - break; - } - }); - - if (headers.length) { - fileContents.unshift(headers.join(delimiter)); - } - - fileContents = fileContents.join("\n"); - - if (options.bom) { - fileContents = '\uFEFF' + fileContents; - } - - setFileContents(fileContents, "text/csv"); - }, - - json: function json(list, options, setFileContents) { - var fileContents = []; - - list.forEach(function (row) { - var item = {}; - - switch (row.type) { - case "header": - break; - - case "group": - console.warn("Download Warning - JSON downloader cannot process row groups"); - break; - - case "calc": - console.warn("Download Warning - JSON downloader cannot process column calculations"); - break; - - case "row": - row.columns.forEach(function (col) { - if (col) { - item[col.component.getField()] = col.value; - } - }); - - fileContents.push(item); - break; - } - }); - - fileContents = JSON.stringify(fileContents, null, '\t'); - - setFileContents(fileContents, "application/json"); - }, - - pdf: function pdf(list, options, setFileContents) { - var header = [], - body = [], - autoTableParams = {}, - rowGroupStyles = options.rowGroupStyles || { - fontStyle: "bold", - fontSize: 12, - cellPadding: 6, - fillColor: 220 - }, - rowCalcStyles = options.rowCalcStyles || { - fontStyle: "bold", - fontSize: 10, - cellPadding: 4, - fillColor: 232 - }, - jsPDFParams = options.jsPDF || {}, - title = options && options.title ? options.title : ""; - - if (!jsPDFParams.orientation) { - jsPDFParams.orientation = options.orientation || "landscape"; - } - - if (!jsPDFParams.unit) { - jsPDFParams.unit = "pt"; - } - - //parse row list - list.forEach(function (row) { - var item = {}; - - switch (row.type) { - case "header": - header.push(parseRow(row)); - break; - - case "group": - body.push(parseRow(row, rowGroupStyles)); - break; - - case "calc": - body.push(parseRow(row, rowCalcStyles)); - break; - - case "row": - body.push(parseRow(row)); - break; - } - }); - - function parseRow(row, styles) { - var rowData = []; - - row.columns.forEach(function (col) { - var cell; - - if (col) { - switch (_typeof(col.value)) { - case "object": - col.value = JSON.stringify(col.value); - break; - - case "undefined": - case "null": - col.value = ""; - break; - } - - cell = { - content: col.value, - colSpan: col.width, - rowSpan: col.height - }; - - if (styles) { - cell.styles = styles; - } - - rowData.push(cell); - } else { - rowData.push(""); - } - }); - - return rowData; - } - - //configure PDF - var doc = new jsPDF(jsPDFParams); //set document to landscape, better for most tables - - if (options && options.autoTable) { - if (typeof options.autoTable === "function") { - autoTableParams = options.autoTable(doc) || {}; - } else { - autoTableParams = options.autoTable; - } - } - - if (title) { - autoTableParams.addPageContent = function (data) { - doc.text(title, 40, 30); - }; - } - - autoTableParams.head = header; - autoTableParams.body = body; - - doc.autoTable(autoTableParams); - - if (options && options.documentProcessing) { - options.documentProcessing(doc); - } - - setFileContents(doc.output("arraybuffer"), "application/pdf"); - }, - - xlsx: function xlsx(list, options, setFileContents) { - var self = this, - sheetName = options.sheetName || "Sheet1", - workbook = XLSX.utils.book_new(), - output; - - workbook.SheetNames = []; - workbook.Sheets = {}; - - function generateSheet() { - var rows = [], - merges = [], - worksheet = {}, - range = { s: { c: 0, r: 0 }, e: { c: list[0] ? list[0].columns.reduce(function (a, b) { - return a + (b && b.width ? b.width : 1); - }, 0) : 0, r: list.length } }; - - //parse row list - list.forEach(function (row, i) { - var rowData = []; - - row.columns.forEach(function (col, j) { - - if (col) { - rowData.push(!(col.value instanceof Date) && _typeof(col.value) === "object" ? JSON.stringify(col.value) : col.value); - - if (col.width > 1 || col.height > -1) { - merges.push({ s: { r: i, c: j }, e: { r: i + col.height - 1, c: j + col.width - 1 } }); - } - } else { - rowData.push(""); - } - }); - - rows.push(rowData); - }); - - //convert rows to worksheet - XLSX.utils.sheet_add_aoa(worksheet, rows); - - worksheet['!ref'] = XLSX.utils.encode_range(range); - - if (merges.length) { - worksheet["!merges"] = merges; - } - - return worksheet; - } - - if (options.sheetOnly) { - setFileContents(generateSheet()); - return; - } - - if (options.sheets) { - for (var sheet in options.sheets) { - - if (options.sheets[sheet] === true) { - workbook.SheetNames.push(sheet); - workbook.Sheets[sheet] = generateSheet(); - } else { - - workbook.SheetNames.push(sheet); - - this.modules.comms.send(options.sheets[sheet], "download", "intercept", { - type: "xlsx", - options: { sheetOnly: true }, - active: self.active, - intercept: function intercept(data) { - workbook.Sheets[sheet] = data; - } - }); - } - } - } else { - workbook.SheetNames.push(sheetName); - workbook.Sheets[sheetName] = generateSheet(); - } - - if (options.documentProcessing) { - workbook = options.documentProcessing(workbook); - } - - //convert workbook to binary array - function s2ab(s) { - var buf = new ArrayBuffer(s.length); - var view = new Uint8Array(buf); - for (var i = 0; i != s.length; ++i) { - view[i] = s.charCodeAt(i) & 0xFF; - }return buf; - } - - output = XLSX.write(workbook, { bookType: 'xlsx', bookSST: true, type: 'binary' }); - - setFileContents(s2ab(output), "application/octet-stream"); - }, - - html: function html(list, options, setFileContents) { - if (this.modExists("export", true)) { - setFileContents(this.modules.export.genereateHTMLTable(list), "text/html"); - } - } - -}; - -Tabulator.prototype.registerModule("download", Download); - -var Edit = function Edit(table) { - this.table = table; //hold Tabulator object - this.currentCell = false; //hold currently editing cell - this.mouseClick = false; //hold mousedown state to prevent click binding being overriden by editor opening - this.recursionBlock = false; //prevent focus recursion - this.invalidEdit = false; - this.editedCells = []; -}; - -//initialize column editor -Edit.prototype.initializeColumn = function (column) { - var self = this, - config = { - editor: false, - blocked: false, - check: column.definition.editable, - params: column.definition.editorParams || {} - }; - - //set column editor - switch (_typeof(column.definition.editor)) { - case "string": - - if (column.definition.editor === "tick") { - column.definition.editor = "tickCross"; - console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor"); - } - - if (self.editors[column.definition.editor]) { - config.editor = self.editors[column.definition.editor]; - } else { - console.warn("Editor Error - No such editor found: ", column.definition.editor); - } - break; - - case "function": - config.editor = column.definition.editor; - break; - - case "boolean": - - if (column.definition.editor === true) { - - if (typeof column.definition.formatter !== "function") { - - if (column.definition.formatter === "tick") { - column.definition.formatter = "tickCross"; - console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor"); - } - - if (self.editors[column.definition.formatter]) { - config.editor = self.editors[column.definition.formatter]; - } else { - config.editor = self.editors["input"]; - } - } else { - console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ", column.definition.formatter); - } - } - break; - } - - if (config.editor) { - column.modules.edit = config; - } -}; - -Edit.prototype.getCurrentCell = function () { - return this.currentCell ? this.currentCell.getComponent() : false; -}; - -Edit.prototype.clearEditor = function (cancel) { - var cell = this.currentCell, - cellEl; - - this.invalidEdit = false; - - if (cell) { - this.currentCell = false; - - cellEl = cell.getElement(); - - if (cancel) { - cell.validate(); - } else { - cellEl.classList.remove("tabulator-validation-fail"); - } - - cellEl.classList.remove("tabulator-editing"); - while (cellEl.firstChild) { - cellEl.removeChild(cellEl.firstChild); - }cell.row.getElement().classList.remove("tabulator-row-editing"); - } -}; - -Edit.prototype.cancelEdit = function () { - - if (this.currentCell) { - var cell = this.currentCell; - var component = this.currentCell.getComponent(); - - this.clearEditor(true); - cell.setValueActual(cell.getValue()); - cell.cellRendered(); - - if (cell.column.definition.editor == "textarea" || cell.column.definition.variableHeight) { - cell.row.normalizeHeight(true); - } - - if (cell.column.cellEvents.cellEditCancelled) { - cell.column.cellEvents.cellEditCancelled.call(this.table, component); - } - - this.table.options.cellEditCancelled.call(this.table, component); - } -}; - -//return a formatted value for a cell -Edit.prototype.bindEditor = function (cell) { - var self = this, - element = cell.getElement(); - - element.setAttribute("tabindex", 0); - - element.addEventListener("click", function (e) { - if (!element.classList.contains("tabulator-editing")) { - element.focus({ preventScroll: true }); - } - }); - - element.addEventListener("mousedown", function (e) { - if (e.button === 2) { - e.preventDefault(); - } else { - self.mouseClick = true; - } - }); - - element.addEventListener("focus", function (e) { - if (!self.recursionBlock) { - self.edit(cell, e, false); - } - }); -}; - -Edit.prototype.focusCellNoEvent = function (cell, block) { - this.recursionBlock = true; - if (!(block && this.table.browser === "ie")) { - cell.getElement().focus({ preventScroll: true }); - } - this.recursionBlock = false; -}; - -Edit.prototype.editCell = function (cell, forceEdit) { - this.focusCellNoEvent(cell); - this.edit(cell, false, forceEdit); -}; - -Edit.prototype.focusScrollAdjust = function (cell) { - if (this.table.rowManager.getRenderMode() == "virtual") { - var topEdge = this.table.rowManager.element.scrollTop, - bottomEdge = this.table.rowManager.element.clientHeight + this.table.rowManager.element.scrollTop, - rowEl = cell.row.getElement(), - offset = rowEl.offsetTop; - - if (rowEl.offsetTop < topEdge) { - this.table.rowManager.element.scrollTop -= topEdge - rowEl.offsetTop; - } else { - if (rowEl.offsetTop + rowEl.offsetHeight > bottomEdge) { - this.table.rowManager.element.scrollTop += rowEl.offsetTop + rowEl.offsetHeight - bottomEdge; - } - } - - var leftEdge = this.table.rowManager.element.scrollLeft, - rightEdge = this.table.rowManager.element.clientWidth + this.table.rowManager.element.scrollLeft, - cellEl = cell.getElement(), - offset = cellEl.offsetLeft; - - if (this.table.modExists("frozenColumns")) { - leftEdge += parseInt(this.table.modules.frozenColumns.leftMargin); - rightEdge -= parseInt(this.table.modules.frozenColumns.rightMargin); - } - - if (cellEl.offsetLeft < leftEdge) { - this.table.rowManager.element.scrollLeft -= leftEdge - cellEl.offsetLeft; - } else { - if (cellEl.offsetLeft + cellEl.offsetWidth > rightEdge) { - this.table.rowManager.element.scrollLeft += cellEl.offsetLeft + cellEl.offsetWidth - rightEdge; - } - } - } -}; - -Edit.prototype.edit = function (cell, e, forceEdit) { - var self = this, - allowEdit = true, - rendered = function rendered() {}, - element = cell.getElement(), - cellEditor, - component, - params; - - //prevent editing if another cell is refusing to leave focus (eg. validation fail) - if (this.currentCell) { - if (!this.invalidEdit) { - this.cancelEdit(); - } - return; - } - - //handle successfull value change - function success(value) { - if (self.currentCell === cell) { - var valid = true; - - if (cell.column.modules.validate && self.table.modExists("validate") && self.table.options.validationMode != "manual") { - valid = self.table.modules.validate.validate(cell.column.modules.validate, cell, value); - } - - if (valid === true || self.table.options.validationMode === "highlight") { - self.clearEditor(); - - if (!cell.modules.edit) { - cell.modules.edit = {}; - } - - cell.modules.edit.edited = true; - - if (self.editedCells.indexOf(cell) == -1) { - self.editedCells.push(cell); - } - - cell.setValue(value, true); - - if (self.table.options.dataTree && self.table.modExists("dataTree")) { - self.table.modules.dataTree.checkForRestyle(cell); - } - - if (valid !== true) { - element.classList.add("tabulator-validation-fail"); - self.table.options.validationFailed.call(self.table, cell.getComponent(), value, valid); - return false; - } - - return true; - } else { - self.invalidEdit = true; - element.classList.add("tabulator-validation-fail"); - self.focusCellNoEvent(cell, true); - rendered(); - self.table.options.validationFailed.call(self.table, cell.getComponent(), value, valid); - - return false; - } - } else { - // console.warn("Edit Success Error - cannot call success on a cell that is no longer being edited"); - } - } - - //handle aborted edit - function cancel() { - if (self.currentCell === cell) { - self.cancelEdit(); - - if (self.table.options.dataTree && self.table.modExists("dataTree")) { - self.table.modules.dataTree.checkForRestyle(cell); - } - } else { - // console.warn("Edit Success Error - cannot call cancel on a cell that is no longer being edited"); - } - } - - function onRendered(callback) { - rendered = callback; - } - - if (!cell.column.modules.edit.blocked) { - if (e) { - e.stopPropagation(); - } - - switch (_typeof(cell.column.modules.edit.check)) { - case "function": - allowEdit = cell.column.modules.edit.check(cell.getComponent()); - break; - - case "boolean": - allowEdit = cell.column.modules.edit.check; - break; - } - - if (allowEdit || forceEdit) { - - self.cancelEdit(); - - self.currentCell = cell; - - this.focusScrollAdjust(cell); - - component = cell.getComponent(); - - if (this.mouseClick) { - this.mouseClick = false; - - if (cell.column.cellEvents.cellClick) { - cell.column.cellEvents.cellClick.call(this.table, e, component); - } - } - - if (cell.column.cellEvents.cellEditing) { - cell.column.cellEvents.cellEditing.call(this.table, component); - } - - self.table.options.cellEditing.call(this.table, component); - - params = typeof cell.column.modules.edit.params === "function" ? cell.column.modules.edit.params(component) : cell.column.modules.edit.params; - - cellEditor = cell.column.modules.edit.editor.call(self, component, onRendered, success, cancel, params); - - //if editor returned, add to DOM, if false, abort edit - if (cellEditor !== false) { - - if (cellEditor instanceof Node) { - element.classList.add("tabulator-editing"); - cell.row.getElement().classList.add("tabulator-row-editing"); - while (element.firstChild) { - element.removeChild(element.firstChild); - }element.appendChild(cellEditor); - - //trigger onRendered Callback - rendered(); - - //prevent editing from triggering rowClick event - var children = element.children; - - for (var i = 0; i < children.length; i++) { - children[i].addEventListener("click", function (e) { - e.stopPropagation(); - }); - } - } else { - console.warn("Edit Error - Editor should return an instance of Node, the editor returned:", cellEditor); - element.blur(); - return false; - } - } else { - element.blur(); - return false; - } - - return true; - } else { - this.mouseClick = false; - element.blur(); - return false; - } - } else { - this.mouseClick = false; - element.blur(); - return false; - } -}; - -Edit.prototype.maskInput = function (el, options) { - var mask = options.mask, - maskLetter = typeof options.maskLetterChar !== "undefined" ? options.maskLetterChar : "A", - maskNumber = typeof options.maskNumberChar !== "undefined" ? options.maskNumberChar : "9", - maskWildcard = typeof options.maskWildcardChar !== "undefined" ? options.maskWildcardChar : "*", - success = false; - - function fillSymbols(index) { - var symbol = mask[index]; - if (typeof symbol !== "undefined" && symbol !== maskWildcard && symbol !== maskLetter && symbol !== maskNumber) { - el.value = el.value + "" + symbol; - fillSymbols(index + 1); - } - } - - el.addEventListener("keydown", function (e) { - var index = el.value.length, - char = e.key; - - if (e.keyCode > 46) { - if (index >= mask.length) { - e.preventDefault(); - e.stopPropagation(); - success = false; - return false; - } else { - switch (mask[index]) { - case maskLetter: - if (char.toUpperCase() == char.toLowerCase()) { - e.preventDefault(); - e.stopPropagation(); - success = false; - return false; - } - break; - - case maskNumber: - if (isNaN(char)) { - e.preventDefault(); - e.stopPropagation(); - success = false; - return false; - } - break; - - case maskWildcard: - break; - - default: - if (char !== mask[index]) { - e.preventDefault(); - e.stopPropagation(); - success = false; - return false; - } - } - } - - success = true; - } - - return; - }); - - el.addEventListener("keyup", function (e) { - if (e.keyCode > 46) { - if (options.maskAutoFill) { - fillSymbols(el.value.length); - } - } - }); - - if (!el.placeholder) { - el.placeholder = mask; - } - - if (options.maskAutoFill) { - fillSymbols(el.value.length); - } -}; - -Edit.prototype.getEditedCells = function () { - var output = []; - - this.editedCells.forEach(function (cell) { - output.push(cell.getComponent()); - }); - - return output; -}; - -Edit.prototype.clearEdited = function (cell) { - var editIndex; - - if (cell.modules.edit && cell.modules.edit.edited) { - cell.modules.edit.edited = false; - - if (cell.modules.validate) { - cell.modules.validate.invalid = false; - } - } - - editIndex = this.editedCells.indexOf(cell); - - if (editIndex > -1) { - this.editedCells.splice(editIndex, 1); - } -}; - -//default data editors -Edit.prototype.editors = { - - //input element - input: function input(cell, onRendered, success, cancel, editorParams) { - - //create and style input - var cellValue = cell.getValue(), - input = document.createElement("input"); - - input.setAttribute("type", editorParams.search ? "search" : "text"); - - input.style.padding = "4px"; - input.style.width = "100%"; - input.style.boxSizing = "border-box"; - - if (editorParams.elementAttributes && _typeof(editorParams.elementAttributes) == "object") { - for (var key in editorParams.elementAttributes) { - if (key.charAt(0) == "+") { - key = key.slice(1); - input.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes["+" + key]); - } else { - input.setAttribute(key, editorParams.elementAttributes[key]); - } - } - } - - input.value = typeof cellValue !== "undefined" ? cellValue : ""; - - onRendered(function () { - input.focus({ preventScroll: true }); - input.style.height = "100%"; - }); - - function onChange(e) { - if ((cellValue === null || typeof cellValue === "undefined") && input.value !== "" || input.value !== cellValue) { - if (success(input.value)) { - cellValue = input.value; //persist value if successfully validated incase editor is used as header filter - } - } else { - cancel(); - } - } - - //submit new value on blur or change - input.addEventListener("change", onChange); - input.addEventListener("blur", onChange); - - //submit new value on enter - input.addEventListener("keydown", function (e) { - switch (e.keyCode) { - // case 9: - case 13: - onChange(e); - break; - - case 27: - cancel(); - break; - - case 35: - case 36: - e.stopPropagation(); - break; - } - }); - - if (editorParams.mask) { - this.table.modules.edit.maskInput(input, editorParams); - } - - return input; - }, - - //resizable text area element - textarea: function textarea(cell, onRendered, success, cancel, editorParams) { - var self = this, - cellValue = cell.getValue(), - vertNav = editorParams.verticalNavigation || "hybrid", - value = String(cellValue !== null && typeof cellValue !== "undefined" ? cellValue : ""), - count = (value.match(/(?:\r\n|\r|\n)/g) || []).length + 1, - input = document.createElement("textarea"), - scrollHeight = 0; - - //create and style input - input.style.display = "block"; - input.style.padding = "2px"; - input.style.height = "100%"; - input.style.width = "100%"; - input.style.boxSizing = "border-box"; - input.style.whiteSpace = "pre-wrap"; - input.style.resize = "none"; - - if (editorParams.elementAttributes && _typeof(editorParams.elementAttributes) == "object") { - for (var key in editorParams.elementAttributes) { - if (key.charAt(0) == "+") { - key = key.slice(1); - input.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes["+" + key]); - } else { - input.setAttribute(key, editorParams.elementAttributes[key]); - } - } - } - - input.value = value; - - onRendered(function () { - input.focus({ preventScroll: true }); - input.style.height = "100%"; - - input.scrollHeight; - input.style.height = input.scrollHeight + "px"; - cell.getRow().normalizeHeight(); - }); - - function onChange(e) { - - if ((cellValue === null || typeof cellValue === "undefined") && input.value !== "" || input.value !== cellValue) { - - if (success(input.value)) { - cellValue = input.value; //persist value if successfully validated incase editor is used as header filter - } - - setTimeout(function () { - cell.getRow().normalizeHeight(); - }, 300); - } else { - cancel(); - } - } - - //submit new value on blur or change - input.addEventListener("change", onChange); - input.addEventListener("blur", onChange); - - input.addEventListener("keyup", function () { - - input.style.height = ""; - - var heightNow = input.scrollHeight; - - input.style.height = heightNow + "px"; - - if (heightNow != scrollHeight) { - scrollHeight = heightNow; - cell.getRow().normalizeHeight(); - } - }); - - input.addEventListener("keydown", function (e) { - - switch (e.keyCode) { - case 27: - cancel(); - break; - - case 38: - //up arrow - if (vertNav == "editor" || vertNav == "hybrid" && input.selectionStart) { - e.stopImmediatePropagation(); - e.stopPropagation(); - } - - break; - - case 40: - //down arrow - if (vertNav == "editor" || vertNav == "hybrid" && input.selectionStart !== input.value.length) { - e.stopImmediatePropagation(); - e.stopPropagation(); - } - break; - - case 35: - case 36: - e.stopPropagation(); - break; - } - }); - - if (editorParams.mask) { - this.table.modules.edit.maskInput(input, editorParams); - } - - return input; - }, - - //input element with type of number - number: function number(cell, onRendered, success, cancel, editorParams) { - - var cellValue = cell.getValue(), - vertNav = editorParams.verticalNavigation || "editor", - input = document.createElement("input"); - - input.setAttribute("type", "number"); - - if (typeof editorParams.max != "undefined") { - input.setAttribute("max", editorParams.max); - } - - if (typeof editorParams.min != "undefined") { - input.setAttribute("min", editorParams.min); - } - - if (typeof editorParams.step != "undefined") { - input.setAttribute("step", editorParams.step); - } - - //create and style input - input.style.padding = "4px"; - input.style.width = "100%"; - input.style.boxSizing = "border-box"; - - if (editorParams.elementAttributes && _typeof(editorParams.elementAttributes) == "object") { - for (var key in editorParams.elementAttributes) { - if (key.charAt(0) == "+") { - key = key.slice(1); - input.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes["+" + key]); - } else { - input.setAttribute(key, editorParams.elementAttributes[key]); - } - } - } - - input.value = cellValue; - - var blurFunc = function blurFunc(e) { - onChange(); - }; - - onRendered(function () { - //submit new value on blur - input.removeEventListener("blur", blurFunc); - - input.focus({ preventScroll: true }); - input.style.height = "100%"; - - //submit new value on blur - input.addEventListener("blur", blurFunc); - }); - - function onChange() { - var value = input.value; - - if (!isNaN(value) && value !== "") { - value = Number(value); - } - - if (value !== cellValue) { - if (success(value)) { - cellValue = value; //persist value if successfully validated incase editor is used as header filter - } - } else { - cancel(); - } - } - - //submit new value on enter - input.addEventListener("keydown", function (e) { - switch (e.keyCode) { - case 13: - // case 9: - onChange(); - break; - - case 27: - cancel(); - break; - - case 38: //up arrow - case 40: - //down arrow - if (vertNav == "editor") { - e.stopImmediatePropagation(); - e.stopPropagation(); - } - break; - - case 35: - case 36: - e.stopPropagation(); - break; - } - }); - - if (editorParams.mask) { - this.table.modules.edit.maskInput(input, editorParams); - } - - return input; - }, - - //input element with type of number - range: function range(cell, onRendered, success, cancel, editorParams) { - - var cellValue = cell.getValue(), - input = document.createElement("input"); - - input.setAttribute("type", "range"); - - if (typeof editorParams.max != "undefined") { - input.setAttribute("max", editorParams.max); - } - - if (typeof editorParams.min != "undefined") { - input.setAttribute("min", editorParams.min); - } - - if (typeof editorParams.step != "undefined") { - input.setAttribute("step", editorParams.step); - } - - //create and style input - input.style.padding = "4px"; - input.style.width = "100%"; - input.style.boxSizing = "border-box"; - - if (editorParams.elementAttributes && _typeof(editorParams.elementAttributes) == "object") { - for (var key in editorParams.elementAttributes) { - if (key.charAt(0) == "+") { - key = key.slice(1); - input.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes["+" + key]); - } else { - input.setAttribute(key, editorParams.elementAttributes[key]); - } - } - } - - input.value = cellValue; - - onRendered(function () { - input.focus({ preventScroll: true }); - input.style.height = "100%"; - }); - - function onChange() { - var value = input.value; - - if (!isNaN(value) && value !== "") { - value = Number(value); - } - - if (value != cellValue) { - if (success(value)) { - cellValue = value; //persist value if successfully validated incase editor is used as header filter - } - } else { - cancel(); - } - } - - //submit new value on blur - input.addEventListener("blur", function (e) { - onChange(); - }); - - //submit new value on enter - input.addEventListener("keydown", function (e) { - switch (e.keyCode) { - case 13: - // case 9: - onChange(); - break; - - case 27: - cancel(); - break; - } - }); - - return input; - }, - - //select - select: function select(cell, onRendered, success, cancel, editorParams) { - var _this53 = this; - - var self = this, - cellEl = cell.getElement(), - initialValue = cell.getValue(), - vertNav = editorParams.verticalNavigation || "editor", - initialDisplayValue = typeof initialValue !== "undefined" || initialValue === null ? Array.isArray(initialValue) ? initialValue : [initialValue] : typeof editorParams.defaultValue !== "undefined" ? editorParams.defaultValue : [], - input = document.createElement("input"), - listEl = document.createElement("div"), - multiselect = editorParams.multiselect, - dataItems = [], - currentItem = {}, - displayItems = [], - currentItems = [], - blurable = true, - blockListShow = false; - - if (Array.isArray(editorParams) || !Array.isArray(editorParams) && (typeof editorParams === 'undefined' ? 'undefined' : _typeof(editorParams)) === "object" && !editorParams.values) { - console.warn("DEPRECATION WARNING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object"); - editorParams = { values: editorParams }; - } - - function getUniqueColumnValues(field) { - var output = {}, - data = self.table.getData(), - column; - - if (field) { - column = self.table.columnManager.getColumnByField(field); - } else { - column = cell.getColumn()._getSelf(); - } - - if (column) { - data.forEach(function (row) { - var val = column.getFieldValue(row); - - if (val !== null && typeof val !== "undefined" && val !== "") { - output[val] = true; - } - }); - - if (editorParams.sortValuesList) { - if (editorParams.sortValuesList == "asc") { - output = Object.keys(output).sort(); - } else { - output = Object.keys(output).sort().reverse(); - } - } else { - output = Object.keys(output); - } - } else { - console.warn("unable to find matching column to create select lookup list:", field); - } - - return output; - } - - function parseItems(inputValues, curentValues) { - var dataList = []; - var displayList = []; - - function processComplexListItem(item) { - var item = { - label: item.label, - value: item.value, - itemParams: item.itemParams, - elementAttributes: item.elementAttributes, - element: false - }; - - // if(item.value === curentValue || (!isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue))){ - // setCurrentItem(item); - // } - - if (curentValues.indexOf(item.value) > -1) { - setItem(item); - } - - dataList.push(item); - displayList.push(item); - - return item; - } - - if (typeof inputValues == "function") { - inputValues = inputValues(cell); - } - - if (Array.isArray(inputValues)) { - inputValues.forEach(function (value) { - var item; - - if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === "object") { - - if (value.options) { - item = { - label: value.label, - group: true, - itemParams: value.itemParams, - elementAttributes: value.elementAttributes, - element: false - }; - - displayList.push(item); - - value.options.forEach(function (item) { - processComplexListItem(item); - }); - } else { - processComplexListItem(value); - } - } else { - - item = { - label: value, - value: value, - element: false - }; - - // if(item.value === curentValue || (!isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue))){ - // setCurrentItem(item); - // } - - if (curentValues.indexOf(item.value) > -1) { - setItem(item); - } - - dataList.push(item); - displayList.push(item); - } - }); - } else { - for (var key in inputValues) { - var item = { - label: inputValues[key], - value: key, - element: false - }; - - // if(item.value === curentValue || (!isNaN(parseFloat(item.value)) && !isNaN(parseFloat(item.value)) && parseFloat(item.value) === parseFloat(curentValue))){ - // setCurrentItem(item); - // } - - if (curentValues.indexOf(item.value) > -1) { - setItem(item); - } - - dataList.push(item); - displayList.push(item); - } - } - - dataItems = dataList; - displayItems = displayList; - - fillList(); - } - - function fillList() { - while (listEl.firstChild) { - listEl.removeChild(listEl.firstChild); - }displayItems.forEach(function (item) { - - var el = item.element; - - if (!el) { - el = document.createElement("div"); - item.label = editorParams.listItemFormatter ? editorParams.listItemFormatter(item.value, item.label, cell, el, item.itemParams) : item.label; - if (item.group) { - el.classList.add("tabulator-edit-select-list-group"); - el.tabIndex = 0; - el.innerHTML = item.label === "" ? " " : item.label; - } else { - el.classList.add("tabulator-edit-select-list-item"); - el.tabIndex = 0; - el.innerHTML = item.label === "" ? " " : item.label; - - el.addEventListener("click", function () { - blockListShow = true; - - setTimeout(function () { - blockListShow = false; - }, 10); - - // setCurrentItem(item); - // chooseItem(); - if (multiselect) { - toggleItem(item); - input.focus(); - } else { - chooseItem(item); - } - }); - - // if(item === currentItem){ - // el.classList.add("active"); - // } - - if (currentItems.indexOf(item) > -1) { - el.classList.add("active"); - } - } - - if (item.elementAttributes && _typeof(item.elementAttributes) == "object") { - for (var key in item.elementAttributes) { - if (key.charAt(0) == "+") { - key = key.slice(1); - el.setAttribute(key, input.getAttribute(key) + item.elementAttributes["+" + key]); - } else { - el.setAttribute(key, item.elementAttributes[key]); - } - } - } - el.addEventListener("mousedown", function () { - blurable = false; - - setTimeout(function () { - blurable = true; - }, 10); - }); - - item.element = el; - } - - listEl.appendChild(el); - }); - } - - function setCurrentItem(item, active) { - - if (!multiselect && currentItem && currentItem.element) { - currentItem.element.classList.remove("active"); - } - - if (currentItem && currentItem.element) { - currentItem.element.classList.remove("focused"); - } - - currentItem = item; - - if (item.element) { - item.element.classList.add("focused"); - if (active) { - item.element.classList.add("active"); - } - } - - if (item && item.element && item.element.scrollIntoView) { - item.element.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' }); - } - } - - // function chooseItem(){ - // hideList(); - - // if(initialValue !== currentItem.value){ - // initialValue = currentItem.value; - // success(currentItem.value); - // }else{ - // cancel(); - // } - // } - - function setItem(item) { - var index = currentItems.indexOf(item); - - if (index == -1) { - currentItems.push(item); - setCurrentItem(item, true); - } - - fillInput(); - } - - function unsetItem(index) { - var item = currentItems[index]; - - if (index > -1) { - currentItems.splice(index, 1); - if (item.element) { - item.element.classList.remove("active"); - } - } - } - - function toggleItem(item) { - if (!item) { - item = currentItem; - } - - var index = currentItems.indexOf(item); - - if (index > -1) { - unsetItem(index); - } else { - if (multiselect !== true && currentItems.length >= multiselect) { - unsetItem(0); - } - - setItem(item); - } - - fillInput(); - } - - function chooseItem(item) { - hideList(); - - if (!item) { - item = currentItem; - } - - if (item) { - input.value = item.label; - success(item.value); - } - - initialDisplayValue = input.value; - } - - function chooseItems(silent) { - if (!silent) { - hideList(); - } - - var output = []; - - currentItems.forEach(function (item) { - output.push(item.value); - }); - - initialDisplayValue = input.value; - - success(output); - } - - function fillInput() { - var output = []; - - currentItems.forEach(function (item) { - output.push(item.label); - }); - - input.value = output.join(", "); - - if (self.currentCell === false) { - chooseItems(true); - } - } - - function unsetItems() { - - var len = currentItems.length; - - for (var _i9 = 0; _i9 < len; _i9++) { - unsetItem(0); - } - } - - function cancelItem() { - hideList(); - cancel(); - } - - function showList() { - currentItems = []; - - if (!listEl.parentNode) { - if (editorParams.values === true) { - parseItems(getUniqueColumnValues(), initialDisplayValue); - } else if (typeof editorParams.values === "string") { - parseItems(getUniqueColumnValues(editorParams.values), initialDisplayValue); - } else { - parseItems(editorParams.values || [], initialDisplayValue); - } - - var offset = Tabulator.prototype.helpers.elOffset(cellEl); - - listEl.style.minWidth = cellEl.offsetWidth + "px"; - - listEl.style.top = offset.top + cellEl.offsetHeight + "px"; - listEl.style.left = offset.left + "px"; - - listEl.addEventListener("mousedown", function (e) { - blurable = false; - - setTimeout(function () { - blurable = true; - }, 10); - }); - - document.body.appendChild(listEl); - } - } - - function hideList() { - if (listEl.parentNode) { - listEl.parentNode.removeChild(listEl); - } - - removeScrollListener(); - } - - function removeScrollListener() { - self.table.rowManager.element.removeEventListener("scroll", cancelItem); - } - - //style input - input.setAttribute("type", "text"); - - input.style.padding = "4px"; - input.style.width = "100%"; - input.style.boxSizing = "border-box"; - input.style.cursor = "default"; - input.readOnly = this.currentCell != false; - - if (editorParams.elementAttributes && _typeof(editorParams.elementAttributes) == "object") { - for (var key in editorParams.elementAttributes) { - if (key.charAt(0) == "+") { - key = key.slice(1); - input.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes["+" + key]); - } else { - input.setAttribute(key, editorParams.elementAttributes[key]); - } - } - } - - input.value = typeof initialValue !== "undefined" || initialValue === null ? initialValue : ""; - - // if(editorParams.values === true){ - // parseItems(getUniqueColumnValues(), initialValue); - // }else if(typeof editorParams.values === "string"){ - // parseItems(getUniqueColumnValues(editorParams.values), initialValue); - // }else{ - // parseItems(editorParams.values || [], initialValue); - // } - - input.addEventListener("search", function (e) { - if (!input.value) { - unsetItems(); - chooseItems(); - } - }); - - //allow key based navigation - input.addEventListener("keydown", function (e) { - var index; - - switch (e.keyCode) { - case 38: - //up arrow - index = dataItems.indexOf(currentItem); - - if (vertNav == "editor" || vertNav == "hybrid" && index) { - e.stopImmediatePropagation(); - e.stopPropagation(); - e.preventDefault(); - - if (index > 0) { - setCurrentItem(dataItems[index - 1], !multiselect); - } - } - break; - - case 40: - //down arrow - index = dataItems.indexOf(currentItem); - - if (vertNav == "editor" || vertNav == "hybrid" && index < dataItems.length - 1) { - e.stopImmediatePropagation(); - e.stopPropagation(); - e.preventDefault(); - - if (index < dataItems.length - 1) { - if (index == -1) { - setCurrentItem(dataItems[0], !multiselect); - } else { - setCurrentItem(dataItems[index + 1], !multiselect); - } - } - } - break; - - case 37: //left arrow - case 39: - //right arrow - e.stopImmediatePropagation(); - e.stopPropagation(); - e.preventDefault(); - break; - - case 13: - //enter - // chooseItem(); - - if (multiselect) { - toggleItem(); - } else { - chooseItem(); - } - - break; - - case 27: - //escape - cancelItem(); - break; - - case 9: - //tab - break; - - default: - if (self.currentCell === false) { - e.preventDefault(); - } - } - }); - - input.addEventListener("blur", function (e) { - if (blurable) { - if (multiselect) { - chooseItems(); - } else { - cancelItem(); - } - } - }); - - input.addEventListener("focus", function (e) { - if (!blockListShow) { - showList(); - } - }); - - //style list element - listEl = document.createElement("div"); - listEl.classList.add("tabulator-edit-select-list"); - - onRendered(function () { - input.style.height = "100%"; - input.focus({ preventScroll: true }); - }); - - setTimeout(function () { - _this53.table.rowManager.element.addEventListener("scroll", cancelItem); - }, 10); - - return input; - }, - - //autocomplete - autocomplete: function autocomplete(cell, onRendered, success, cancel, editorParams) { - var _this54 = this; - - var self = this, - cellEl = cell.getElement(), - initialValue = cell.getValue(), - vertNav = editorParams.verticalNavigation || "editor", - initialDisplayValue = typeof initialValue !== "undefined" || initialValue === null ? initialValue : typeof editorParams.defaultValue !== "undefined" ? editorParams.defaultValue : "", - input = document.createElement("input"), - listEl = document.createElement("div"), - allItems = [], - displayItems = [], - values = [], - currentItem = false, - blurable = true, - uniqueColumnValues = false; - - //style input - input.setAttribute("type", "search"); - - input.style.padding = "4px"; - input.style.width = "100%"; - input.style.boxSizing = "border-box"; - - if (editorParams.elementAttributes && _typeof(editorParams.elementAttributes) == "object") { - for (var key in editorParams.elementAttributes) { - if (key.charAt(0) == "+") { - key = key.slice(1); - input.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes["+" + key]); - } else { - input.setAttribute(key, editorParams.elementAttributes[key]); - } - } - } - - //style list element - listEl.classList.add("tabulator-edit-select-list"); - - listEl.addEventListener("mousedown", function (e) { - blurable = false; - - setTimeout(function () { - blurable = true; - }, 10); - }); - - function genUniqueColumnValues() { - if (editorParams.values === true) { - uniqueColumnValues = getUniqueColumnValues(); - } else if (typeof editorParams.values === "string") { - uniqueColumnValues = getUniqueColumnValues(editorParams.values); - } - } - - function getUniqueColumnValues(field) { - var output = {}, - data = self.table.getData(), - column; - - if (field) { - column = self.table.columnManager.getColumnByField(field); - } else { - column = cell.getColumn()._getSelf(); - } - - if (column) { - data.forEach(function (row) { - var val = column.getFieldValue(row); - - if (val !== null && typeof val !== "undefined" && val !== "") { - output[val] = true; - } - }); - - if (editorParams.sortValuesList) { - if (editorParams.sortValuesList == "asc") { - output = Object.keys(output).sort(); - } else { - output = Object.keys(output).sort().reverse(); - } - } else { - output = Object.keys(output); - } - } else { - console.warn("unable to find matching column to create autocomplete lookup list:", field); - } - - return output; - } - - function filterList(term, intialLoad) { - var matches = [], - values, - items, - searchEl; - - //lookup base values list - if (uniqueColumnValues) { - values = uniqueColumnValues; - } else { - values = editorParams.values || []; - } - - if (editorParams.searchFunc) { - matches = editorParams.searchFunc(term, values); - - if (matches instanceof Promise) { - - addNotice(typeof editorParams.searchingPlaceholder !== "undefined" ? editorParams.searchingPlaceholder : "Searching..."); - - matches.then(function (result) { - fillListIfNotEmpty(parseItems(result), intialLoad); - }).catch(function (err) { - console.err("error in autocomplete search promise:", err); - }); - } else { - fillListIfNotEmpty(parseItems(matches), intialLoad); - } - } else { - items = parseItems(values); - - if (term === "") { - if (editorParams.showListOnEmpty) { - matches = items; - } - } else { - items.forEach(function (item) { - if (item.value !== null || typeof item.value !== "undefined") { - if (String(item.value).toLowerCase().indexOf(String(term).toLowerCase()) > -1 || String(item.title).toLowerCase().indexOf(String(term).toLowerCase()) > -1) { - matches.push(item); - } - } - }); - } - - fillListIfNotEmpty(matches, intialLoad); - } - } - - function addNotice(notice) { - var searchEl = document.createElement("div"); - - clearList(); - - if (notice !== false) { - searchEl.classList.add("tabulator-edit-select-list-notice"); - searchEl.tabIndex = 0; - - if (notice instanceof Node) { - searchEl.appendChild(notice); - } else { - searchEl.innerHTML = notice; - } - - listEl.appendChild(searchEl); - } - } - - function parseItems(inputValues) { - var itemList = []; - - if (Array.isArray(inputValues)) { - inputValues.forEach(function (value) { - - var item = {}; - - if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === "object") { - item.title = editorParams.listItemFormatter ? editorParams.listItemFormatter(value.value, value.label) : value.label; - item.value = value.value; - } else { - item.title = editorParams.listItemFormatter ? editorParams.listItemFormatter(value, value) : value; - item.value = value; - } - - itemList.push(item); - }); - } else { - for (var key in inputValues) { - var item = { - title: editorParams.listItemFormatter ? editorParams.listItemFormatter(key, inputValues[key]) : inputValues[key], - value: key - }; - - itemList.push(item); - } - } - - return itemList; - } - - function clearList() { - while (listEl.firstChild) { - listEl.removeChild(listEl.firstChild); - } - } - - function fillListIfNotEmpty(items, intialLoad) { - if (items.length) { - fillList(items, intialLoad); - } else { - if (editorParams.emptyPlaceholder) { - addNotice(editorParams.emptyPlaceholder); - } - } - } - - function fillList(items, intialLoad) { - var current = false; - - clearList(); - - displayItems = items; - - displayItems.forEach(function (item) { - var el = item.element; - - if (!el) { - el = document.createElement("div"); - el.classList.add("tabulator-edit-select-list-item"); - el.tabIndex = 0; - el.innerHTML = item.title; - - el.addEventListener("click", function (e) { - setCurrentItem(item); - chooseItem(); - }); - - el.addEventListener("mousedown", function (e) { - blurable = false; - - setTimeout(function () { - blurable = true; - }, 10); - }); - - item.element = el; - - if (intialLoad && item.value == initialValue) { - input.value = item.title; - item.element.classList.add("active"); - current = true; - } - - if (item === currentItem) { - item.element.classList.add("active"); - current = true; - } - } - - listEl.appendChild(el); - }); - - if (!current) { - setCurrentItem(false); - } - } - - function chooseItem() { - hideList(); - - if (currentItem) { - if (initialValue !== currentItem.value) { - initialValue = currentItem.value; - input.value = currentItem.title; - success(currentItem.value); - } else { - cancel(); - } - } else { - if (editorParams.freetext) { - initialValue = input.value; - success(input.value); - } else { - if (editorParams.allowEmpty && input.value === "") { - initialValue = input.value; - success(input.value); - } else { - cancel(); - } - } - } - } - - function showList() { - if (!listEl.parentNode) { - while (listEl.firstChild) { - listEl.removeChild(listEl.firstChild); - }var offset = Tabulator.prototype.helpers.elOffset(cellEl); - - listEl.style.minWidth = cellEl.offsetWidth + "px"; - - listEl.style.top = offset.top + cellEl.offsetHeight + "px"; - listEl.style.left = offset.left + "px"; - document.body.appendChild(listEl); - } - } - - function setCurrentItem(item, showInputValue) { - if (currentItem && currentItem.element) { - currentItem.element.classList.remove("active"); - } - - currentItem = item; - - if (item && item.element) { - item.element.classList.add("active"); - } - - if (item && item.element && item.element.scrollIntoView) { - item.element.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' }); - } - } - - function hideList() { - if (listEl.parentNode) { - listEl.parentNode.removeChild(listEl); - } - - removeScrollListener(); - } - - function cancelItem() { - hideList(); - cancel(); - } - - function removeScrollListener() { - self.table.rowManager.element.removeEventListener("scroll", cancelItem); - } - - //allow key based navigation - input.addEventListener("keydown", function (e) { - var index; - - switch (e.keyCode) { - case 38: - //up arrow - index = displayItems.indexOf(currentItem); - - if (vertNav == "editor" || vertNav == "hybrid" && index) { - e.stopImmediatePropagation(); - e.stopPropagation(); - e.preventDefault(); - - if (index > 0) { - setCurrentItem(displayItems[index - 1]); - } else { - setCurrentItem(false); - } - } - break; - - case 40: - //down arrow - - index = displayItems.indexOf(currentItem); - - if (vertNav == "editor" || vertNav == "hybrid" && index < displayItems.length - 1) { - - e.stopImmediatePropagation(); - e.stopPropagation(); - e.preventDefault(); - - if (index < displayItems.length - 1) { - if (index == -1) { - setCurrentItem(displayItems[0]); - } else { - setCurrentItem(displayItems[index + 1]); - } - } - } - break; - - case 37: //left arrow - case 39: - //right arrow - e.stopImmediatePropagation(); - e.stopPropagation(); - // e.preventDefault(); - break; - - case 13: - //enter - chooseItem(); - break; - - case 27: - //escape - cancelItem(); - break; - - case 36: //home - case 35: - //end - //prevent table navigation while using input element - e.stopImmediatePropagation(); - break; - } - }); - - input.addEventListener("keyup", function (e) { - - switch (e.keyCode) { - case 38: //up arrow - case 37: //left arrow - case 39: //up arrow - case 40: //right arrow - case 13: //enter - case 27: - //escape - break; - - default: - filterList(input.value); - } - }); - - input.addEventListener("search", function (e) { - filterList(input.value); - }); - - input.addEventListener("blur", function (e) { - if (blurable) { - chooseItem(); - } - }); - - input.addEventListener("focus", function (e) { - var value = initialDisplayValue; - genUniqueColumnValues(); - showList(); - input.value = value; - filterList(value, true); - }); - - onRendered(function () { - input.style.height = "100%"; - input.focus({ preventScroll: true }); - }); - - if (editorParams.mask) { - this.table.modules.edit.maskInput(input, editorParams); - } - - setTimeout(function () { - _this54.table.rowManager.element.addEventListener("scroll", cancelItem); - }, 10); - - genUniqueColumnValues(); - input.value = initialDisplayValue; - filterList(initialDisplayValue, true); - - return input; - }, - - //star rating - star: function star(cell, onRendered, success, cancel, editorParams) { - var self = this, - element = cell.getElement(), - value = cell.getValue(), - maxStars = element.getElementsByTagName("svg").length || 5, - size = element.getElementsByTagName("svg")[0] ? element.getElementsByTagName("svg")[0].getAttribute("width") : 14, - stars = [], - starsHolder = document.createElement("div"), - star = document.createElementNS('http://www.w3.org/2000/svg', "svg"); - - //change star type - function starChange(val) { - stars.forEach(function (star, i) { - if (i < val) { - if (self.table.browser == "ie") { - star.setAttribute("class", "tabulator-star-active"); - } else { - star.classList.replace("tabulator-star-inactive", "tabulator-star-active"); - } - - star.innerHTML = ''; - } else { - if (self.table.browser == "ie") { - star.setAttribute("class", "tabulator-star-inactive"); - } else { - star.classList.replace("tabulator-star-active", "tabulator-star-inactive"); - } - - star.innerHTML = ''; - } - }); - } - - //build stars - function buildStar(i) { - - var starHolder = document.createElement("span"); - var nextStar = star.cloneNode(true); - - stars.push(nextStar); - - starHolder.addEventListener("mouseenter", function (e) { - e.stopPropagation(); - e.stopImmediatePropagation(); - starChange(i); - }); - - starHolder.addEventListener("mousemove", function (e) { - e.stopPropagation(); - e.stopImmediatePropagation(); - }); - - starHolder.addEventListener("click", function (e) { - e.stopPropagation(); - e.stopImmediatePropagation(); - success(i); - element.blur(); - }); - - starHolder.appendChild(nextStar); - starsHolder.appendChild(starHolder); - } - - //handle keyboard navigation value change - function changeValue(val) { - value = val; - starChange(val); - } - - //style cell - element.style.whiteSpace = "nowrap"; - element.style.overflow = "hidden"; - element.style.textOverflow = "ellipsis"; - - //style holding element - starsHolder.style.verticalAlign = "middle"; - starsHolder.style.display = "inline-block"; - starsHolder.style.padding = "4px"; - - //style star - star.setAttribute("width", size); - star.setAttribute("height", size); - star.setAttribute("viewBox", "0 0 512 512"); - star.setAttribute("xml:space", "preserve"); - star.style.padding = "0 1px"; - - if (editorParams.elementAttributes && _typeof(editorParams.elementAttributes) == "object") { - for (var key in editorParams.elementAttributes) { - if (key.charAt(0) == "+") { - key = key.slice(1); - starsHolder.setAttribute(key, starsHolder.getAttribute(key) + editorParams.elementAttributes["+" + key]); - } else { - starsHolder.setAttribute(key, editorParams.elementAttributes[key]); - } - } - } - - //create correct number of stars - for (var i = 1; i <= maxStars; i++) { - buildStar(i); - } - - //ensure value does not exceed number of stars - value = Math.min(parseInt(value), maxStars); - - // set initial styling of stars - starChange(value); - - starsHolder.addEventListener("mousemove", function (e) { - starChange(0); - }); - - starsHolder.addEventListener("click", function (e) { - success(0); - }); - - element.addEventListener("blur", function (e) { - cancel(); - }); - - //allow key based navigation - element.addEventListener("keydown", function (e) { - switch (e.keyCode) { - case 39: - //right arrow - changeValue(value + 1); - break; - - case 37: - //left arrow - changeValue(value - 1); - break; - - case 13: - //enter - success(value); - break; - - case 27: - //escape - cancel(); - break; - } - }); - - return starsHolder; - }, - - //draggable progress bar - progress: function progress(cell, onRendered, success, cancel, editorParams) { - var element = cell.getElement(), - max = typeof editorParams.max === "undefined" ? element.getElementsByTagName("div")[0].getAttribute("max") || 100 : editorParams.max, - min = typeof editorParams.min === "undefined" ? element.getElementsByTagName("div")[0].getAttribute("min") || 0 : editorParams.min, - percent = (max - min) / 100, - value = cell.getValue() || 0, - handle = document.createElement("div"), - bar = document.createElement("div"), - mouseDrag, - mouseDragWidth; - - //set new value - function updateValue() { - var calcVal = percent * Math.round(bar.offsetWidth / (element.clientWidth / 100)) + min; - success(calcVal); - element.setAttribute("aria-valuenow", calcVal); - element.setAttribute("aria-label", value); - } - - //style handle - handle.style.position = "absolute"; - handle.style.right = "0"; - handle.style.top = "0"; - handle.style.bottom = "0"; - handle.style.width = "5px"; - handle.classList.add("tabulator-progress-handle"); - - //style bar - bar.style.display = "inline-block"; - bar.style.position = "relative"; - // bar.style.top = "8px"; - // bar.style.bottom = "8px"; - // bar.style.left = "4px"; - // bar.style.marginRight = "4px"; - bar.style.height = "100%"; - bar.style.backgroundColor = "#488CE9"; - bar.style.maxWidth = "100%"; - bar.style.minWidth = "0%"; - - if (editorParams.elementAttributes && _typeof(editorParams.elementAttributes) == "object") { - for (var key in editorParams.elementAttributes) { - if (key.charAt(0) == "+") { - key = key.slice(1); - bar.setAttribute(key, bar.getAttribute(key) + editorParams.elementAttributes["+" + key]); - } else { - bar.setAttribute(key, editorParams.elementAttributes[key]); - } - } - } - - //style cell - element.style.padding = "4px 4px"; - - //make sure value is in range - value = Math.min(parseFloat(value), max); - value = Math.max(parseFloat(value), min); - - //workout percentage - value = Math.round((value - min) / percent); - // bar.style.right = value + "%"; - bar.style.width = value + "%"; - - element.setAttribute("aria-valuemin", min); - element.setAttribute("aria-valuemax", max); - - bar.appendChild(handle); - - handle.addEventListener("mousedown", function (e) { - mouseDrag = e.screenX; - mouseDragWidth = bar.offsetWidth; - }); - - handle.addEventListener("mouseover", function () { - handle.style.cursor = "ew-resize"; - }); - - element.addEventListener("mousemove", function (e) { - if (mouseDrag) { - bar.style.width = mouseDragWidth + e.screenX - mouseDrag + "px"; - } - }); - - element.addEventListener("mouseup", function (e) { - if (mouseDrag) { - e.stopPropagation(); - e.stopImmediatePropagation(); - - mouseDrag = false; - mouseDragWidth = false; - - updateValue(); - } - }); - - //allow key based navigation - element.addEventListener("keydown", function (e) { - switch (e.keyCode) { - case 39: - //right arrow - e.preventDefault(); - bar.style.width = bar.clientWidth + element.clientWidth / 100 + "px"; - break; - - case 37: - //left arrow - e.preventDefault(); - bar.style.width = bar.clientWidth - element.clientWidth / 100 + "px"; - break; - - case 9: //tab - case 13: - //enter - updateValue(); - break; - - case 27: - //escape - cancel(); - break; - - } - }); - - element.addEventListener("blur", function () { - cancel(); - }); - - return bar; - }, - - //checkbox - tickCross: function tickCross(cell, onRendered, success, cancel, editorParams) { - var value = cell.getValue(), - input = document.createElement("input"), - tristate = editorParams.tristate, - indetermValue = typeof editorParams.indeterminateValue === "undefined" ? null : editorParams.indeterminateValue, - indetermState = false; - - input.setAttribute("type", "checkbox"); - input.style.marginTop = "5px"; - input.style.boxSizing = "border-box"; - - if (editorParams.elementAttributes && _typeof(editorParams.elementAttributes) == "object") { - for (var key in editorParams.elementAttributes) { - if (key.charAt(0) == "+") { - key = key.slice(1); - input.setAttribute(key, input.getAttribute(key) + editorParams.elementAttributes["+" + key]); - } else { - input.setAttribute(key, editorParams.elementAttributes[key]); - } - } - } - - input.value = value; - - if (tristate && (typeof value === "undefined" || value === indetermValue || value === "")) { - indetermState = true; - input.indeterminate = true; - } - - if (this.table.browser != "firefox") { - //prevent blur issue on mac firefox - onRendered(function () { - input.focus({ preventScroll: true }); - }); - } - - input.checked = value === true || value === "true" || value === "True" || value === 1; - - onRendered(function () { - input.focus(); - }); - - function setValue(blur) { - if (tristate) { - if (!blur) { - if (input.checked && !indetermState) { - input.checked = false; - input.indeterminate = true; - indetermState = true; - return indetermValue; - } else { - indetermState = false; - return input.checked; - } - } else { - if (indetermState) { - return indetermValue; - } else { - return input.checked; - } - } - } else { - return input.checked; - } - } - - //submit new value on blur - input.addEventListener("change", function (e) { - success(setValue()); - }); - - input.addEventListener("blur", function (e) { - success(setValue(true)); - }); - - //submit new value on enter - input.addEventListener("keydown", function (e) { - if (e.keyCode == 13) { - success(setValue()); - } - if (e.keyCode == 27) { - cancel(); - } - }); - - return input; - } -}; - -Tabulator.prototype.registerModule("edit", Edit); - -var ExportRow = function ExportRow(type, columns, component, indent) { - this.type = type; - this.columns = columns; - this.component = component || false; - this.indent = indent || 0; -}; - -var ExportColumn = function ExportColumn(value, component, width, height, depth) { - this.value = value; - this.component = component || false; - this.width = width; - this.height = height; - this.depth = depth; -}; - -var Export = function Export(table) { - this.table = table; //hold Tabulator object - this.config = {}; - this.cloneTableStyle = true; - this.colVisProp = ""; -}; - -Export.prototype.generateExportList = function (config, style, range, colVisProp) { - this.cloneTableStyle = style; - this.config = config || {}; - this.colVisProp = colVisProp; - - var headers = this.config.columnHeaders !== false ? this.headersToExportRows(this.generateColumnGroupHeaders()) : []; - var body = this.bodyToExportRows(this.rowLookup(range)); - - return headers.concat(body); -}; - -Export.prototype.genereateTable = function (config, style, range, colVisProp) { - var list = this.generateExportList(config, style, range, colVisProp); - - return this.genereateTableElement(list); -}; - -Export.prototype.rowLookup = function (range) { - var _this55 = this; - - var rows = []; - - if (typeof range == "function") { - range.call(this.table).forEach(function (row) { - row = _this55.table.rowManager.findRow(row); - - if (row) { - rows.push(row); - } - }); - } else { - switch (range) { - case true: - case "visible": - rows = this.table.rowManager.getVisibleRows(true); - break; - - case "all": - rows = this.table.rowManager.rows; - break; - - case "selected": - rows = this.table.modules.selectRow.selectedRows; - break; - - case "active": - default: - if (this.table.options.pagination) { - rows = this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length - 2); - } else { - rows = this.table.rowManager.getDisplayRows(); - } - } - } - - return Object.assign([], rows); -}; - -Export.prototype.generateColumnGroupHeaders = function () { - var _this56 = this; - - var output = []; - - var columns = this.config.columnGroups !== false ? this.table.columnManager.columns : this.table.columnManager.columnsByIndex; - - columns.forEach(function (column) { - var colData = _this56.processColumnGroup(column); - - if (colData) { - output.push(colData); - } - }); - - return output; -}; - -Export.prototype.processColumnGroup = function (column) { - var _this57 = this; - - var subGroups = column.columns, - maxDepth = 0, - title = column.definition["title" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))] || column.definition.title; - - var groupData = { - title: title, - column: column, - depth: 1 - }; - - if (subGroups.length) { - groupData.subGroups = []; - groupData.width = 0; - - subGroups.forEach(function (subGroup) { - var subGroupData = _this57.processColumnGroup(subGroup); - - if (subGroupData) { - groupData.width += subGroupData.width; - groupData.subGroups.push(subGroupData); - - if (subGroupData.depth > maxDepth) { - maxDepth = subGroupData.depth; - } - } - }); - - groupData.depth += maxDepth; - - if (!groupData.width) { - return false; - } - } else { - if (this.columnVisCheck(column)) { - groupData.width = 1; - } else { - return false; - } - } - - return groupData; -}; - -Export.prototype.columnVisCheck = function (column) { - return column.definition[this.colVisProp] !== false && (column.visible || !column.visible && column.definition[this.colVisProp]); -}; - -Export.prototype.headersToExportRows = function (columns) { - var headers = [], - headerDepth = 0, - exportRows = []; - - function parseColumnGroup(column, level) { - - var depth = headerDepth - level; - - if (typeof headers[level] === "undefined") { - headers[level] = []; - } - - column.height = column.subGroups ? 1 : depth - column.depth + 1; - - headers[level].push(column); - - if (column.height > 1) { - for (var _i10 = 1; _i10 < column.height; _i10++) { - - if (typeof headers[level + _i10] === "undefined") { - headers[level + _i10] = []; - } - - headers[level + _i10].push(false); - } - } - - if (column.width > 1) { - for (var _i11 = 1; _i11 < column.width; _i11++) { - headers[level].push(false); - } - } - - if (column.subGroups) { - column.subGroups.forEach(function (subGroup) { - parseColumnGroup(subGroup, level + 1); - }); - } - } - - //calculate maximum header debth - columns.forEach(function (column) { - if (column.depth > headerDepth) { - headerDepth = column.depth; - } - }); - - columns.forEach(function (column) { - parseColumnGroup(column, 0); - }); - - headers.forEach(function (header) { - var columns = []; - - header.forEach(function (col) { - if (col) { - columns.push(new ExportColumn(col.title, col.column.getComponent(), col.width, col.height, col.depth)); - } else { - columns.push(null); - } - }); - - exportRows.push(new ExportRow("header", columns)); - }); - - return exportRows; -}; - -Export.prototype.bodyToExportRows = function (rows) { - var _this58 = this; - - var columns = []; - var exportRows = []; - - this.table.columnManager.columnsByIndex.forEach(function (column) { - if (_this58.columnVisCheck(column)) { - columns.push(column.getComponent()); - } - }); - - if (this.config.columnCalcs !== false && this.table.modExists("columnCalcs")) { - if (this.table.modules.columnCalcs.topInitialized) { - rows.unshift(this.table.modules.columnCalcs.topRow); - } - - if (this.table.modules.columnCalcs.botInitialized) { - rows.push(this.table.modules.columnCalcs.botRow); - } - } - - rows = rows.filter(function (row) { - switch (row.type) { - case "group": - return _this58.config.rowGroups !== false; - break; - - case "calc": - return _this58.config.columnCalcs !== false; - break; - - case "row": - return !(_this58.table.options.dataTree && _this58.config.dataTree === false && row.modules.dataTree.parent); - break; - } - - return true; - }); - - rows.forEach(function (row, i) { - var rowData = row.getData(_this58.colVisProp); - var exportCols = []; - var indent = 0; - - switch (row.type) { - case "group": - indent = row.level; - exportCols.push(new ExportColumn(row.key, row.getComponent(), columns.length, 1)); - break; - - case "calc": - case "row": - columns.forEach(function (col) { - exportCols.push(new ExportColumn(col._column.getFieldValue(rowData), col, 1, 1)); - }); - - if (_this58.table.options.dataTree && _this58.config.dataTree !== false) { - indent = row.modules.dataTree.index; - } - break; - } - - exportRows.push(new ExportRow(row.type, exportCols, row.getComponent(), indent)); - }); - - return exportRows; -}; - -Export.prototype.genereateTableElement = function (list) { - var _this59 = this; - - var table = document.createElement("table"), - headerEl = document.createElement("thead"), - bodyEl = document.createElement("tbody"), - styles = this.lookupTableStyles(), - rowFormatter = this.table.options["rowFormatter" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))], - setup = {}; - - setup.rowFormatter = rowFormatter !== null ? rowFormatter : this.table.options.rowFormatter; - - if (this.table.options.dataTree && this.config.dataTree !== false && this.table.modExists("columnCalcs")) { - setup.treeElementField = this.table.modules.dataTree.elementField; - } - - //assign group header formatter - setup.groupHeader = this.table.options["groupHeader" + (this.colVisProp.charAt(0).toUpperCase() + this.colVisProp.slice(1))]; - - if (setup.groupHeader && !Array.isArray(setup.groupHeader)) { - setup.groupHeader = [setup.groupHeader]; - } - - table.classList.add("tabulator-print-table"); - - this.mapElementStyles(this.table.columnManager.getHeadersElement(), headerEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); - - if (list.length > 1000) { - console.warn("It may take a long time to render an HTML table with more than 1000 rows"); - } - - list.forEach(function (row, i) { - switch (row.type) { - case "header": - headerEl.appendChild(_this59.genereateHeaderElement(row, setup, styles)); - break; - - case "group": - bodyEl.appendChild(_this59.genereateGroupElement(row, setup, styles)); - break; - - case "calc": - bodyEl.appendChild(_this59.genereateCalcElement(row, setup, styles)); - break; - - case "row": - var rowEl = _this59.genereateRowElement(row, setup, styles); - _this59.mapElementStyles(i % 2 && styles.evenRow ? styles.evenRow : styles.oddRow, rowEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]); - bodyEl.appendChild(rowEl); - break; - } - }); - - if (headerEl.innerHTML) { - table.appendChild(headerEl); - } - - table.appendChild(bodyEl); - - this.mapElementStyles(this.table.element, table, ["border-top", "border-left", "border-right", "border-bottom"]); - return table; -}; - -Export.prototype.lookupTableStyles = function () { - var styles = {}; - - //lookup row styles - if (this.cloneTableStyle && window.getComputedStyle) { - styles.oddRow = this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"); - styles.evenRow = this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"); - styles.calcRow = this.table.element.querySelector(".tabulator-row.tabulator-calcs"); - styles.firstRow = this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"); - styles.firstGroup = this.table.element.getElementsByClassName("tabulator-group")[0]; - - if (styles.firstRow) { - styles.styleCells = styles.firstRow.getElementsByClassName("tabulator-cell"); - styles.firstCell = styles.styleCells[0]; - styles.lastCell = styles.styleCells[styles.styleCells.length - 1]; - } - } - - return styles; -}; - -Export.prototype.genereateHeaderElement = function (row, setup, styles) { - var _this60 = this; - - var rowEl = document.createElement("tr"); - - row.columns.forEach(function (column) { - if (column) { - var cellEl = document.createElement("th"); - var classNames = column.component._column.definition.cssClass ? column.component._column.definition.cssClass.split(" ") : []; - - cellEl.colSpan = column.width; - cellEl.rowSpan = column.height; - - cellEl.innerHTML = column.value; - - if (_this60.cloneTableStyle) { - cellEl.style.boxSizing = "border-box"; - } - - classNames.forEach(function (className) { - cellEl.classList.add(className); - }); - - _this60.mapElementStyles(column.component.getElement(), cellEl, ["text-align", "border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); - _this60.mapElementStyles(column.component._column.contentElement, cellEl, ["padding-top", "padding-left", "padding-right", "padding-bottom"]); - - if (column.component._column.visible) { - _this60.mapElementStyles(column.component.getElement(), cellEl, ["width"]); - } else { - if (column.component._column.definition.width) { - cellEl.style.width = column.component._column.definition.width + "px"; - } - } - - if (column.component._column.parent) { - _this60.mapElementStyles(column.component._column.parent.groupElement, cellEl, ["border-top"]); - } - - rowEl.appendChild(cellEl); - } - }); - - return rowEl; -}; - -Export.prototype.genereateGroupElement = function (row, setup, styles) { - - var rowEl = document.createElement("tr"), - cellEl = document.createElement("td"), - group = row.columns[0]; - - rowEl.classList.add("tabulator-print-table-row"); - - if (setup.groupHeader && setup.groupHeader[row.indent]) { - group.value = setup.groupHeader[row.indent](group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component); - } else { - if (setup.groupHeader === false) { - group.value = group.value; - } else { - group.value = row.component._group.generator(group.value, row.component._group.getRowCount(), row.component._group.getData(), row.component); - } - } - - cellEl.colSpan = group.width; - cellEl.innerHTML = group.value; - - rowEl.classList.add("tabulator-print-table-group"); - rowEl.classList.add("tabulator-group-level-" + row.indent); - - if (group.component.isVisible()) { - rowEl.classList.add("tabulator-group-visible"); - } - - this.mapElementStyles(styles.firstGroup, rowEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]); - this.mapElementStyles(styles.firstGroup, cellEl, ["padding-top", "padding-left", "padding-right", "padding-bottom"]); - - rowEl.appendChild(cellEl); - - return rowEl; -}; - -Export.prototype.genereateCalcElement = function (row, setup, styles) { - var rowEl = this.genereateRowElement(row, setup, styles); - - rowEl.classList.add("tabulator-print-table-calcs"); - this.mapElementStyles(styles.calcRow, rowEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]); - - return rowEl; -}; - -Export.prototype.genereateRowElement = function (row, setup, styles) { - var _this61 = this; - - var rowEl = document.createElement("tr"); - - rowEl.classList.add("tabulator-print-table-row"); - - row.columns.forEach(function (col) { - - if (col) { - var cellEl = document.createElement("td"), - column = col.component._column, - value = col.value; - - var cellWrapper = { - modules: {}, - getValue: function getValue() { - return value; - }, - getField: function getField() { - return column.definition.field; - }, - getElement: function getElement() { - return cellEl; - }, - getColumn: function getColumn() { - return column.getComponent(); - }, - getData: function getData() { - return row.component.getData(); - }, - getRow: function getRow() { - return row.component; - }, - getComponent: function getComponent() { - return cellWrapper; - }, - column: column - }; - - var classNames = column.definition.cssClass ? column.definition.cssClass.split(" ") : []; - - classNames.forEach(function (className) { - cellEl.classList.add(className); - }); - - if (_this61.table.modExists("format") && _this61.config.formatCells !== false) { - value = _this61.table.modules.format.formatExportValue(cellWrapper, _this61.colVisProp); - } else { - switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { - case "object": - value = JSON.stringify(value); - break; - - case "undefined": - case "null": - value = ""; - break; - - default: - value = value; - } - } - - if (value instanceof Node) { - cellEl.appendChild(value); - } else { - cellEl.innerHTML = value; - } - - if (styles.firstCell) { - _this61.mapElementStyles(styles.firstCell, cellEl, ["padding-top", "padding-left", "padding-right", "padding-bottom", "border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size"]); - - if (column.definition.align) { - cellEl.style.textAlign = column.definition.align; - } - } - - if (_this61.table.options.dataTree && _this61.config.dataTree !== false) { - if (setup.treeElementField && setup.treeElementField == column.field || !setup.treeElementField && i == 0) { - if (row.component._row.modules.dataTree.controlEl) { - cellEl.insertBefore(row.component._row.modules.dataTree.controlEl.cloneNode(true), cellEl.firstChild); - } - if (row.component._row.modules.dataTree.branchEl) { - cellEl.insertBefore(row.component._row.modules.dataTree.branchEl.cloneNode(true), cellEl.firstChild); - } - } - } - - rowEl.appendChild(cellEl); - - if (cellWrapper.modules.format && cellWrapper.modules.format.renderedCallback) { - cellWrapper.modules.format.renderedCallback(); - } - - if (setup.rowFormatter && _this61.config.formatCells !== false) { - setup.rowFormatter(row.component); - } - } - }); - - return rowEl; -}; - -Export.prototype.genereateHTMLTable = function (list) { - var holder = document.createElement("div"); - - holder.appendChild(this.genereateTableElement(list)); - - return holder.innerHTML; -}; - -Export.prototype.getHtml = function (visible, style, config, colVisProp) { - var list = this.generateExportList(config || this.table.options.htmlOutputConfig, style, visible, colVisProp || "htmlOutput"); - - return this.genereateHTMLTable(list); -}; - -Export.prototype.mapElementStyles = function (from, to, props) { - if (this.cloneTableStyle && from && to) { - - var lookup = { - "background-color": "backgroundColor", - "color": "fontColor", - "width": "width", - "font-weight": "fontWeight", - "font-family": "fontFamily", - "font-size": "fontSize", - "text-align": "textAlign", - "border-top": "borderTop", - "border-left": "borderLeft", - "border-right": "borderRight", - "border-bottom": "borderBottom", - "padding-top": "paddingTop", - "padding-left": "paddingLeft", - "padding-right": "paddingRight", - "padding-bottom": "paddingBottom" - }; - - if (window.getComputedStyle) { - var fromStyle = window.getComputedStyle(from); - - props.forEach(function (prop) { - to.style[lookup[prop]] = fromStyle.getPropertyValue(prop); - }); - } - } -}; - -Tabulator.prototype.registerModule("export", Export); - -var Filter = function Filter(table) { - - this.table = table; //hold Tabulator object - - this.filterList = []; //hold filter list - this.headerFilters = {}; //hold column filters - this.headerFilterColumns = []; //hold columns that use header filters - - this.prevHeaderFilterChangeCheck = ""; - this.prevHeaderFilterChangeCheck = "{}"; - - this.changed = false; //has filtering changed since last render -}; - -//initialize column header filter -Filter.prototype.initializeColumn = function (column, value) { - var self = this, - field = column.getField(), - params; - - //handle successfull value change - function success(value) { - var filterType = column.modules.filter.tagType == "input" && column.modules.filter.attrType == "text" || column.modules.filter.tagType == "textarea" ? "partial" : "match", - type = "", - filterChangeCheck = "", - filterFunc; - - if (typeof column.modules.filter.prevSuccess === "undefined" || column.modules.filter.prevSuccess !== value) { - - column.modules.filter.prevSuccess = value; - - if (!column.modules.filter.emptyFunc(value)) { - column.modules.filter.value = value; - - switch (_typeof(column.definition.headerFilterFunc)) { - case "string": - if (self.filters[column.definition.headerFilterFunc]) { - type = column.definition.headerFilterFunc; - filterFunc = function filterFunc(data) { - var params = column.definition.headerFilterFuncParams || {}; - var fieldVal = column.getFieldValue(data); - - params = typeof params === "function" ? params(value, fieldVal, data) : params; - - return self.filters[column.definition.headerFilterFunc](value, fieldVal, data, params); - }; - } else { - console.warn("Header Filter Error - Matching filter function not found: ", column.definition.headerFilterFunc); - } - break; - - case "function": - filterFunc = function filterFunc(data) { - var params = column.definition.headerFilterFuncParams || {}; - var fieldVal = column.getFieldValue(data); - - params = typeof params === "function" ? params(value, fieldVal, data) : params; - - return column.definition.headerFilterFunc(value, fieldVal, data, params); - }; - - type = filterFunc; - break; - } - - if (!filterFunc) { - switch (filterType) { - case "partial": - filterFunc = function filterFunc(data) { - var colVal = column.getFieldValue(data); - - if (typeof colVal !== 'undefined' && colVal !== null) { - return String(colVal).toLowerCase().indexOf(String(value).toLowerCase()) > -1; - } else { - return false; - } - }; - type = "like"; - break; - - default: - filterFunc = function filterFunc(data) { - return column.getFieldValue(data) == value; - }; - type = "="; - } - } - - self.headerFilters[field] = { value: value, func: filterFunc, type: type, params: params || {} }; - } else { - delete self.headerFilters[field]; - } - - filterChangeCheck = JSON.stringify(self.headerFilters); - - if (self.prevHeaderFilterChangeCheck !== filterChangeCheck) { - self.prevHeaderFilterChangeCheck = filterChangeCheck; - - self.changed = true; - self.table.rowManager.filterRefresh(); - } - } - - return true; - } - - column.modules.filter = { - success: success, - attrType: false, - tagType: false, - emptyFunc: false - }; - - this.generateHeaderFilterElement(column); -}; - -Filter.prototype.generateHeaderFilterElement = function (column, initialValue, reinitialize) { - var _this62 = this; - - var self = this, - success = column.modules.filter.success, - field = column.getField(), - filterElement, - editor, - editorElement, - cellWrapper, - typingTimer, - searchTrigger, - params; - - //handle aborted edit - function cancel() {} - - if (column.modules.filter.headerElement && column.modules.filter.headerElement.parentNode) { - column.contentElement.removeChild(column.modules.filter.headerElement.parentNode); - } - - if (field) { - - //set empty value function - column.modules.filter.emptyFunc = column.definition.headerFilterEmptyCheck || function (value) { - return !value && value !== "0"; - }; - - filterElement = document.createElement("div"); - filterElement.classList.add("tabulator-header-filter"); - - //set column editor - switch (_typeof(column.definition.headerFilter)) { - case "string": - if (self.table.modules.edit.editors[column.definition.headerFilter]) { - editor = self.table.modules.edit.editors[column.definition.headerFilter]; - - if ((column.definition.headerFilter === "tick" || column.definition.headerFilter === "tickCross") && !column.definition.headerFilterEmptyCheck) { - column.modules.filter.emptyFunc = function (value) { - return value !== true && value !== false; - }; - } - } else { - console.warn("Filter Error - Cannot build header filter, No such editor found: ", column.definition.editor); - } - break; - - case "function": - editor = column.definition.headerFilter; - break; - - case "boolean": - if (column.modules.edit && column.modules.edit.editor) { - editor = column.modules.edit.editor; - } else { - if (column.definition.formatter && self.table.modules.edit.editors[column.definition.formatter]) { - editor = self.table.modules.edit.editors[column.definition.formatter]; - - if ((column.definition.formatter === "tick" || column.definition.formatter === "tickCross") && !column.definition.headerFilterEmptyCheck) { - column.modules.filter.emptyFunc = function (value) { - return value !== true && value !== false; - }; - } - } else { - editor = self.table.modules.edit.editors["input"]; - } - } - break; - } - - if (editor) { - - cellWrapper = { - getValue: function getValue() { - return typeof initialValue !== "undefined" ? initialValue : ""; - }, - getField: function getField() { - return column.definition.field; - }, - getElement: function getElement() { - return filterElement; - }, - getColumn: function getColumn() { - return column.getComponent(); - }, - getRow: function getRow() { - return { - normalizeHeight: function normalizeHeight() {} - }; - } - }; - - params = column.definition.headerFilterParams || {}; - - params = typeof params === "function" ? params.call(self.table) : params; - - editorElement = editor.call(this.table.modules.edit, cellWrapper, function () {}, success, cancel, params); - - if (!editorElement) { - console.warn("Filter Error - Cannot add filter to " + field + " column, editor returned a value of false"); - return; - } - - if (!(editorElement instanceof Node)) { - console.warn("Filter Error - Cannot add filter to " + field + " column, editor should return an instance of Node, the editor returned:", editorElement); - return; - } - - //set Placeholder Text - if (field) { - self.table.modules.localize.bind("headerFilters|columns|" + column.definition.field, function (value) { - editorElement.setAttribute("placeholder", typeof value !== "undefined" && value ? value : self.table.modules.localize.getText("headerFilters|default")); - }); - } else { - self.table.modules.localize.bind("headerFilters|default", function (value) { - editorElement.setAttribute("placeholder", typeof self.column.definition.headerFilterPlaceholder !== "undefined" && self.column.definition.headerFilterPlaceholder ? self.column.definition.headerFilterPlaceholder : value); - }); - } - - //focus on element on click - editorElement.addEventListener("click", function (e) { - e.stopPropagation(); - editorElement.focus(); - }); - - editorElement.addEventListener("focus", function (e) { - var left = _this62.table.columnManager.element.scrollLeft; - - if (left !== _this62.table.rowManager.element.scrollLeft) { - _this62.table.rowManager.scrollHorizontal(left); - _this62.table.columnManager.scrollHorizontal(left); - } - }); - - //live update filters as user types - typingTimer = false; - - searchTrigger = function searchTrigger(e) { - if (typingTimer) { - clearTimeout(typingTimer); - } - - typingTimer = setTimeout(function () { - success(editorElement.value); - }, self.table.options.headerFilterLiveFilterDelay); - }; - - column.modules.filter.headerElement = editorElement; - column.modules.filter.attrType = editorElement.hasAttribute("type") ? editorElement.getAttribute("type").toLowerCase() : ""; - column.modules.filter.tagType = editorElement.tagName.toLowerCase(); - - if (column.definition.headerFilterLiveFilter !== false) { - - if (!(column.definition.headerFilter === 'autocomplete' || column.definition.headerFilter === 'tickCross' || (column.definition.editor === 'autocomplete' || column.definition.editor === 'tickCross') && column.definition.headerFilter === true)) { - editorElement.addEventListener("keyup", searchTrigger); - editorElement.addEventListener("search", searchTrigger); - - //update number filtered columns on change - if (column.modules.filter.attrType == "number") { - editorElement.addEventListener("change", function (e) { - success(editorElement.value); - }); - } - - //change text inputs to search inputs to allow for clearing of field - if (column.modules.filter.attrType == "text" && this.table.browser !== "ie") { - editorElement.setAttribute("type", "search"); - // editorElement.off("change blur"); //prevent blur from triggering filter and preventing selection click - } - } - - //prevent input and select elements from propegating click to column sorters etc - if (column.modules.filter.tagType == "input" || column.modules.filter.tagType == "select" || column.modules.filter.tagType == "textarea") { - editorElement.addEventListener("mousedown", function (e) { - e.stopPropagation(); - }); - } - } - - filterElement.appendChild(editorElement); - - column.contentElement.appendChild(filterElement); - - if (!reinitialize) { - self.headerFilterColumns.push(column); - } - } - } else { - console.warn("Filter Error - Cannot add header filter, column has no field set:", column.definition.title); - } -}; - -//hide all header filter elements (used to ensure correct column widths in "fitData" layout mode) -Filter.prototype.hideHeaderFilterElements = function () { - this.headerFilterColumns.forEach(function (column) { - if (column.modules.filter && column.modules.filter.headerElement) { - column.modules.filter.headerElement.style.display = 'none'; - } - }); -}; - -//show all header filter elements (used to ensure correct column widths in "fitData" layout mode) -Filter.prototype.showHeaderFilterElements = function () { - this.headerFilterColumns.forEach(function (column) { - if (column.modules.filter && column.modules.filter.headerElement) { - column.modules.filter.headerElement.style.display = ''; - } - }); -}; - -//programatically set focus of header filter -Filter.prototype.setHeaderFilterFocus = function (column) { - if (column.modules.filter && column.modules.filter.headerElement) { - column.modules.filter.headerElement.focus(); - } else { - console.warn("Column Filter Focus Error - No header filter set on column:", column.getField()); - } -}; - -//programmatically get value of header filter -Filter.prototype.getHeaderFilterValue = function (column) { - if (column.modules.filter && column.modules.filter.headerElement) { - return column.modules.filter.headerElement.value; - } else { - console.warn("Column Filter Error - No header filter set on column:", column.getField()); - } -}; - -//programatically set value of header filter -Filter.prototype.setHeaderFilterValue = function (column, value) { - if (column) { - if (column.modules.filter && column.modules.filter.headerElement) { - this.generateHeaderFilterElement(column, value, true); - column.modules.filter.success(value); - } else { - console.warn("Column Filter Error - No header filter set on column:", column.getField()); - } - } -}; - -Filter.prototype.reloadHeaderFilter = function (column) { - if (column) { - if (column.modules.filter && column.modules.filter.headerElement) { - this.generateHeaderFilterElement(column, column.modules.filter.value, true); - } else { - console.warn("Column Filter Error - No header filter set on column:", column.getField()); - } - } -}; - -//check if the filters has changed since last use -Filter.prototype.hasChanged = function () { - var changed = this.changed; - this.changed = false; - return changed; -}; - -//set standard filters -Filter.prototype.setFilter = function (field, type, value, params) { - var self = this; - - self.filterList = []; - - if (!Array.isArray(field)) { - field = [{ field: field, type: type, value: value, params: params }]; - } - - self.addFilter(field); -}; - -//add filter to array -Filter.prototype.addFilter = function (field, type, value, params) { - var self = this; - - if (!Array.isArray(field)) { - field = [{ field: field, type: type, value: value, params: params }]; - } - - field.forEach(function (filter) { - - filter = self.findFilter(filter); - - if (filter) { - self.filterList.push(filter); - - self.changed = true; - } - }); - - if (this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.filter) { - this.table.modules.persistence.save("filter"); - } -}; - -Filter.prototype.findFilter = function (filter) { - var self = this, - column; - - if (Array.isArray(filter)) { - return this.findSubFilters(filter); - } - - var filterFunc = false; - - if (typeof filter.field == "function") { - filterFunc = function filterFunc(data) { - return filter.field(data, filter.type || {}); // pass params to custom filter function - }; - } else { - - if (self.filters[filter.type]) { - - column = self.table.columnManager.getColumnByField(filter.field); - - if (column) { - filterFunc = function filterFunc(data) { - return self.filters[filter.type](filter.value, column.getFieldValue(data), data, filter.params || {}); - }; - } else { - filterFunc = function filterFunc(data) { - return self.filters[filter.type](filter.value, data[filter.field], data, filter.params || {}); - }; - } - } else { - console.warn("Filter Error - No such filter type found, ignoring: ", filter.type); - } - } - - filter.func = filterFunc; - - return filter.func ? filter : false; -}; - -Filter.prototype.findSubFilters = function (filters) { - var self = this, - output = []; - - filters.forEach(function (filter) { - filter = self.findFilter(filter); - - if (filter) { - output.push(filter); - } - }); - - return output.length ? output : false; -}; - -//get all filters -Filter.prototype.getFilters = function (all, ajax) { - var output = []; - - if (all) { - output = this.getHeaderFilters(); - } - - if (ajax) { - output.forEach(function (item) { - if (typeof item.type == "function") { - item.type = "function"; - } - }); - } - - output = output.concat(this.filtersToArray(this.filterList, ajax)); - - return output; -}; - -//filter to Object -Filter.prototype.filtersToArray = function (filterList, ajax) { - var _this63 = this; - - var output = []; - - filterList.forEach(function (filter) { - var item; - - if (Array.isArray(filter)) { - output.push(_this63.filtersToArray(filter, ajax)); - } else { - item = { field: filter.field, type: filter.type, value: filter.value }; - - if (ajax) { - if (typeof item.type == "function") { - item.type = "function"; - } - } - - output.push(item); - } - }); - - return output; -}; - -//get all filters -Filter.prototype.getHeaderFilters = function () { - var self = this, - output = []; - - for (var key in this.headerFilters) { - output.push({ field: key, type: this.headerFilters[key].type, value: this.headerFilters[key].value }); - } - - return output; -}; - -//remove filter from array -Filter.prototype.removeFilter = function (field, type, value) { - var self = this; - - if (!Array.isArray(field)) { - field = [{ field: field, type: type, value: value }]; - } - - field.forEach(function (filter) { - var index = -1; - - if (_typeof(filter.field) == "object") { - index = self.filterList.findIndex(function (element) { - return filter === element; - }); - } else { - index = self.filterList.findIndex(function (element) { - return filter.field === element.field && filter.type === element.type && filter.value === element.value; - }); - } - - if (index > -1) { - self.filterList.splice(index, 1); - self.changed = true; - } else { - console.warn("Filter Error - No matching filter type found, ignoring: ", filter.type); - } - }); - - if (this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.filter) { - this.table.modules.persistence.save("filter"); - } -}; - -//clear filters -Filter.prototype.clearFilter = function (all) { - this.filterList = []; - - if (all) { - this.clearHeaderFilter(); - } - - this.changed = true; - - if (this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.filter) { - this.table.modules.persistence.save("filter"); - } -}; - -//clear header filters -Filter.prototype.clearHeaderFilter = function () { - var self = this; - - this.headerFilters = {}; - self.prevHeaderFilterChangeCheck = "{}"; - - this.headerFilterColumns.forEach(function (column) { - column.modules.filter.value = null; - column.modules.filter.prevSuccess = undefined; - self.reloadHeaderFilter(column); - }); - - this.changed = true; -}; - -//search data and return matching rows -Filter.prototype.search = function (searchType, field, type, value) { - var self = this, - activeRows = [], - filterList = []; - - if (!Array.isArray(field)) { - field = [{ field: field, type: type, value: value }]; - } - - field.forEach(function (filter) { - filter = self.findFilter(filter); - - if (filter) { - filterList.push(filter); - } - }); - - this.table.rowManager.rows.forEach(function (row) { - var match = true; - - filterList.forEach(function (filter) { - if (!self.filterRecurse(filter, row.getData())) { - match = false; - } - }); - - if (match) { - activeRows.push(searchType === "data" ? row.getData("data") : row.getComponent()); - } - }); - - return activeRows; -}; - -//filter row array -Filter.prototype.filter = function (rowList, filters) { - var self = this, - activeRows = [], - activeRowComponents = []; - - if (self.table.options.dataFiltering) { - self.table.options.dataFiltering.call(self.table, self.getFilters()); - } - - if (!self.table.options.ajaxFiltering && (self.filterList.length || Object.keys(self.headerFilters).length)) { - - rowList.forEach(function (row) { - if (self.filterRow(row)) { - activeRows.push(row); - } - }); - } else { - activeRows = rowList.slice(0); - } - - if (self.table.options.dataFiltered) { - - activeRows.forEach(function (row) { - activeRowComponents.push(row.getComponent()); - }); - - self.table.options.dataFiltered.call(self.table, self.getFilters(), activeRowComponents); - } - - return activeRows; -}; - -//filter individual row -Filter.prototype.filterRow = function (row, filters) { - var self = this, - match = true, - data = row.getData(); - - self.filterList.forEach(function (filter) { - if (!self.filterRecurse(filter, data)) { - match = false; - } - }); - - for (var field in self.headerFilters) { - if (!self.headerFilters[field].func(data)) { - match = false; - } - } - - return match; -}; - -Filter.prototype.filterRecurse = function (filter, data) { - var self = this, - match = false; - - if (Array.isArray(filter)) { - filter.forEach(function (subFilter) { - if (self.filterRecurse(subFilter, data)) { - match = true; - } - }); - } else { - match = filter.func(data); - } - - return match; -}; - -//list of available filters -Filter.prototype.filters = { - - //equal to - "=": function _(filterVal, rowVal, rowData, filterParams) { - return rowVal == filterVal ? true : false; - }, - - //less than - "<": function _(filterVal, rowVal, rowData, filterParams) { - return rowVal < filterVal ? true : false; - }, - - //less than or equal to - "<=": function _(filterVal, rowVal, rowData, filterParams) { - return rowVal <= filterVal ? true : false; - }, - - //greater than - ">": function _(filterVal, rowVal, rowData, filterParams) { - return rowVal > filterVal ? true : false; - }, - - //greater than or equal to - ">=": function _(filterVal, rowVal, rowData, filterParams) { - return rowVal >= filterVal ? true : false; - }, - - //not equal to - "!=": function _(filterVal, rowVal, rowData, filterParams) { - return rowVal != filterVal ? true : false; - }, - - "regex": function regex(filterVal, rowVal, rowData, filterParams) { - - if (typeof filterVal == "string") { - filterVal = new RegExp(filterVal); - } - - return filterVal.test(rowVal); - }, - - //contains the string - "like": function like(filterVal, rowVal, rowData, filterParams) { - if (filterVal === null || typeof filterVal === "undefined") { - return rowVal === filterVal ? true : false; - } else { - if (typeof rowVal !== 'undefined' && rowVal !== null) { - return String(rowVal).toLowerCase().indexOf(filterVal.toLowerCase()) > -1; - } else { - return false; - } - } - }, - - //contains the keywords - "keywords": function keywords(filterVal, rowVal, rowData, filterParams) { - var keywords = filterVal.toLowerCase().split(typeof filterParams.separator === "undefined" ? " " : filterParams.separator), - value = String(rowVal === null || typeof rowVal === "undefined" ? "" : rowVal).toLowerCase(), - matches = []; - - keywords.forEach(function (keyword) { - if (value.includes(keyword)) { - matches.push(true); - } - }); - - return filterParams.matchAll ? matches.length === keywords.length : !!matches.length; - }, - - //starts with the string - "starts": function starts(filterVal, rowVal, rowData, filterParams) { - if (filterVal === null || typeof filterVal === "undefined") { - return rowVal === filterVal ? true : false; - } else { - if (typeof rowVal !== 'undefined' && rowVal !== null) { - return String(rowVal).toLowerCase().startsWith(filterVal.toLowerCase()); - } else { - return false; - } - } - }, - - //ends with the string - "ends": function ends(filterVal, rowVal, rowData, filterParams) { - if (filterVal === null || typeof filterVal === "undefined") { - return rowVal === filterVal ? true : false; - } else { - if (typeof rowVal !== 'undefined' && rowVal !== null) { - return String(rowVal).toLowerCase().endsWith(filterVal.toLowerCase()); - } else { - return false; - } - } - }, - - //in array - "in": function _in(filterVal, rowVal, rowData, filterParams) { - if (Array.isArray(filterVal)) { - return filterVal.length ? filterVal.indexOf(rowVal) > -1 : true; - } else { - console.warn("Filter Error - filter value is not an array:", filterVal); - return false; - } - } -}; - -Tabulator.prototype.registerModule("filter", Filter); - -var Format = function Format(table) { - this.table = table; //hold Tabulator object -}; - -//initialize column formatter -Format.prototype.initializeColumn = function (column) { - column.modules.format = this.lookupFormatter(column, ""); - - if (typeof column.definition.formatterPrint !== "undefined") { - column.modules.format.print = this.lookupFormatter(column, "Print"); - } - - if (typeof column.definition.formatterClipboard !== "undefined") { - column.modules.format.clipboard = this.lookupFormatter(column, "Clipboard"); - } - - if (typeof column.definition.formatterHtmlOutput !== "undefined") { - column.modules.format.htmlOutput = this.lookupFormatter(column, "HtmlOutput"); - } -}; - -Format.prototype.lookupFormatter = function (column, type) { - var config = { params: column.definition["formatter" + type + "Params"] || {} }, - formatter = column.definition["formatter" + type]; - - //set column formatter - switch (typeof formatter === 'undefined' ? 'undefined' : _typeof(formatter)) { - case "string": - - if (formatter === "tick") { - formatter = "tickCross"; - - if (typeof config.params.crossElement == "undefined") { - config.params.crossElement = false; - } - - console.warn("DEPRECATION WARNING - the tick formatter has been deprecated, please use the tickCross formatter with the crossElement param set to false"); - } - - if (this.formatters[formatter]) { - config.formatter = this.formatters[formatter]; - } else { - console.warn("Formatter Error - No such formatter found: ", formatter); - config.formatter = this.formatters.plaintext; - } - break; - - case "function": - config.formatter = formatter; - break; - - default: - config.formatter = this.formatters.plaintext; - break; - } - - return config; -}; - -Format.prototype.cellRendered = function (cell) { - if (cell.modules.format && cell.modules.format.renderedCallback && !cell.modules.format.rendered) { - cell.modules.format.renderedCallback(); - cell.modules.format.rendered = true; - } -}; - -//return a formatted value for a cell -Format.prototype.formatValue = function (cell) { - var component = cell.getComponent(), - params = typeof cell.column.modules.format.params === "function" ? cell.column.modules.format.params(component) : cell.column.modules.format.params; - - function onRendered(callback) { - if (!cell.modules.format) { - cell.modules.format = {}; - } - - cell.modules.format.renderedCallback = callback; - cell.modules.format.rendered = false; - } - - return cell.column.modules.format.formatter.call(this, component, params, onRendered); -}; - -Format.prototype.formatExportValue = function (cell, type) { - var formatter = cell.column.modules.format[type], - params; - - if (formatter) { - var onRendered = function onRendered(callback) { - if (!cell.modules.format) { - cell.modules.format = {}; - } - - cell.modules.format.renderedCallback = callback; - cell.modules.format.rendered = false; - }; - - params = typeof formatter.params === "function" ? formatter.params(component) : formatter.params; - - return formatter.formatter.call(this, cell.getComponent(), params, onRendered); - } else { - return this.formatValue(cell); - } -}; - -Format.prototype.sanitizeHTML = function (value) { - if (value) { - var entityMap = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''', - '/': '/', - '`': '`', - '=': '=' - }; - - return String(value).replace(/[&<>"'`=\/]/g, function (s) { - return entityMap[s]; - }); - } else { - return value; - } -}; - -Format.prototype.emptyToSpace = function (value) { - return value === null || typeof value === "undefined" || value === "" ? " " : value; -}; - -//get formatter for cell -Format.prototype.getFormatter = function (formatter) { - var formatter; - - switch (typeof formatter === 'undefined' ? 'undefined' : _typeof(formatter)) { - case "string": - if (this.formatters[formatter]) { - formatter = this.formatters[formatter]; - } else { - console.warn("Formatter Error - No such formatter found: ", formatter); - formatter = this.formatters.plaintext; - } - break; - - case "function": - formatter = formatter; - break; - - default: - formatter = this.formatters.plaintext; - break; - } - - return formatter; -}; - -//default data formatters -Format.prototype.formatters = { - //plain text value - plaintext: function plaintext(cell, formatterParams, onRendered) { - return this.emptyToSpace(this.sanitizeHTML(cell.getValue())); - }, - - //html text value - html: function html(cell, formatterParams, onRendered) { - return cell.getValue(); - }, - - //multiline text area - textarea: function textarea(cell, formatterParams, onRendered) { - cell.getElement().style.whiteSpace = "pre-wrap"; - return this.emptyToSpace(this.sanitizeHTML(cell.getValue())); - }, - - //currency formatting - money: function money(cell, formatterParams, onRendered) { - var floatVal = parseFloat(cell.getValue()), - number, - integer, - decimal, - rgx; - - var decimalSym = formatterParams.decimal || "."; - var thousandSym = formatterParams.thousand || ","; - var symbol = formatterParams.symbol || ""; - var after = !!formatterParams.symbolAfter; - var precision = typeof formatterParams.precision !== "undefined" ? formatterParams.precision : 2; - - if (isNaN(floatVal)) { - return this.emptyToSpace(this.sanitizeHTML(cell.getValue())); - } - - number = precision !== false ? floatVal.toFixed(precision) : floatVal; - number = String(number).split("."); - - integer = number[0]; - decimal = number.length > 1 ? decimalSym + number[1] : ""; - - rgx = /(\d+)(\d{3})/; - - while (rgx.test(integer)) { - integer = integer.replace(rgx, "$1" + thousandSym + "$2"); - } - - return after ? integer + decimal + symbol : symbol + integer + decimal; - }, - - //clickable anchor tag - link: function link(cell, formatterParams, onRendered) { - var value = cell.getValue(), - urlPrefix = formatterParams.urlPrefix || "", - download = formatterParams.download, - label = value, - el = document.createElement("a"), - data; - - if (formatterParams.labelField) { - data = cell.getData(); - label = data[formatterParams.labelField]; - } - - if (formatterParams.label) { - switch (_typeof(formatterParams.label)) { - case "string": - label = formatterParams.label; - break; - - case "function": - label = formatterParams.label(cell); - break; - } - } - - if (label) { - if (formatterParams.urlField) { - data = cell.getData(); - value = data[formatterParams.urlField]; - } - - if (formatterParams.url) { - switch (_typeof(formatterParams.url)) { - case "string": - value = formatterParams.url; - break; - - case "function": - value = formatterParams.url(cell); - break; - } - } - - el.setAttribute("href", urlPrefix + value); - - if (formatterParams.target) { - el.setAttribute("target", formatterParams.target); - } - - if (formatterParams.download) { - - if (typeof download == "function") { - download = download(cell); - } else { - download = download === true ? "" : download; - } - - el.setAttribute("download", download); - } - - el.innerHTML = this.emptyToSpace(this.sanitizeHTML(label)); - - return el; - } else { - return " "; - } - }, - - //image element - image: function image(cell, formatterParams, onRendered) { - var el = document.createElement("img"); - el.setAttribute("src", cell.getValue()); - - switch (_typeof(formatterParams.height)) { - case "number": - el.style.height = formatterParams.height + "px"; - break; - - case "string": - el.style.height = formatterParams.height; - break; - } - - switch (_typeof(formatterParams.width)) { - case "number": - el.style.width = formatterParams.width + "px"; - break; - - case "string": - el.style.width = formatterParams.width; - break; - } - - el.addEventListener("load", function () { - cell.getRow().normalizeHeight(); - }); - - return el; - }, - - //tick or cross - tickCross: function tickCross(cell, formatterParams, onRendered) { - var value = cell.getValue(), - element = cell.getElement(), - empty = formatterParams.allowEmpty, - truthy = formatterParams.allowTruthy, - tick = typeof formatterParams.tickElement !== "undefined" ? formatterParams.tickElement : '', - cross = typeof formatterParams.crossElement !== "undefined" ? formatterParams.crossElement : ''; - - if (truthy && value || value === true || value === "true" || value === "True" || value === 1 || value === "1") { - element.setAttribute("aria-checked", true); - return tick || ""; - } else { - if (empty && (value === "null" || value === "" || value === null || typeof value === "undefined")) { - element.setAttribute("aria-checked", "mixed"); - return ""; - } else { - element.setAttribute("aria-checked", false); - return cross || ""; - } - } - }, - - datetime: function datetime(cell, formatterParams, onRendered) { - var inputFormat = formatterParams.inputFormat || "YYYY-MM-DD hh:mm:ss"; - var outputFormat = formatterParams.outputFormat || "DD/MM/YYYY hh:mm:ss"; - var invalid = typeof formatterParams.invalidPlaceholder !== "undefined" ? formatterParams.invalidPlaceholder : ""; - var value = cell.getValue(); - - var newDatetime = moment(value, inputFormat); - - if (newDatetime.isValid()) { - return formatterParams.timezone ? newDatetime.tz(formatterParams.timezone).format(outputFormat) : newDatetime.format(outputFormat); - } else { - - if (invalid === true) { - return value; - } else if (typeof invalid === "function") { - return invalid(value); - } else { - return invalid; - } - } - }, - - datetimediff: function datetime(cell, formatterParams, onRendered) { - var inputFormat = formatterParams.inputFormat || "YYYY-MM-DD hh:mm:ss"; - var invalid = typeof formatterParams.invalidPlaceholder !== "undefined" ? formatterParams.invalidPlaceholder : ""; - var suffix = typeof formatterParams.suffix !== "undefined" ? formatterParams.suffix : false; - var unit = typeof formatterParams.unit !== "undefined" ? formatterParams.unit : undefined; - var humanize = typeof formatterParams.humanize !== "undefined" ? formatterParams.humanize : false; - var date = typeof formatterParams.date !== "undefined" ? formatterParams.date : moment(); - var value = cell.getValue(); - - var newDatetime = moment(value, inputFormat); - - if (newDatetime.isValid()) { - if (humanize) { - return moment.duration(newDatetime.diff(date)).humanize(suffix); - } else { - return newDatetime.diff(date, unit) + (suffix ? " " + suffix : ""); - } - } else { - - if (invalid === true) { - return value; - } else if (typeof invalid === "function") { - return invalid(value); - } else { - return invalid; - } - } - }, - - //select - lookup: function lookup(cell, formatterParams, onRendered) { - var value = cell.getValue(); - - if (typeof formatterParams[value] === "undefined") { - console.warn('Missing display value for ' + value); - return value; - } - - return formatterParams[value]; - }, - - //star rating - star: function star(cell, formatterParams, onRendered) { - var value = cell.getValue(), - element = cell.getElement(), - maxStars = formatterParams && formatterParams.stars ? formatterParams.stars : 5, - stars = document.createElement("span"), - star = document.createElementNS('http://www.w3.org/2000/svg', "svg"), - starActive = '', - starInactive = ''; - - //style stars holder - stars.style.verticalAlign = "middle"; - - //style star - star.setAttribute("width", "14"); - star.setAttribute("height", "14"); - star.setAttribute("viewBox", "0 0 512 512"); - star.setAttribute("xml:space", "preserve"); - star.style.padding = "0 1px"; - - value = value && !isNaN(value) ? parseInt(value) : 0; - - value = Math.max(0, Math.min(value, maxStars)); - - for (var i = 1; i <= maxStars; i++) { - var nextStar = star.cloneNode(true); - nextStar.innerHTML = i <= value ? starActive : starInactive; - - stars.appendChild(nextStar); - } - - element.style.whiteSpace = "nowrap"; - element.style.overflow = "hidden"; - element.style.textOverflow = "ellipsis"; - - element.setAttribute("aria-label", value); - - return stars; - }, - - traffic: function traffic(cell, formatterParams, onRendered) { - var value = this.sanitizeHTML(cell.getValue()) || 0, - el = document.createElement("span"), - max = formatterParams && formatterParams.max ? formatterParams.max : 100, - min = formatterParams && formatterParams.min ? formatterParams.min : 0, - colors = formatterParams && typeof formatterParams.color !== "undefined" ? formatterParams.color : ["red", "orange", "green"], - color = "#666666", - percent, - percentValue; - - if (isNaN(value) || typeof cell.getValue() === "undefined") { - return; - } - - el.classList.add("tabulator-traffic-light"); - - //make sure value is in range - percentValue = parseFloat(value) <= max ? parseFloat(value) : max; - percentValue = parseFloat(percentValue) >= min ? parseFloat(percentValue) : min; - - //workout percentage - percent = (max - min) / 100; - percentValue = Math.round((percentValue - min) / percent); - - //set color - switch (typeof colors === 'undefined' ? 'undefined' : _typeof(colors)) { - case "string": - color = colors; - break; - case "function": - color = colors(value); - break; - case "object": - if (Array.isArray(colors)) { - var unit = 100 / colors.length; - var index = Math.floor(percentValue / unit); - - index = Math.min(index, colors.length - 1); - index = Math.max(index, 0); - color = colors[index]; - break; - } - } - - el.style.backgroundColor = color; - - return el; - }, - - //progress bar - progress: function progress(cell, formatterParams, onRendered) { - //progress bar - var value = this.sanitizeHTML(cell.getValue()) || 0, - element = cell.getElement(), - max = formatterParams && formatterParams.max ? formatterParams.max : 100, - min = formatterParams && formatterParams.min ? formatterParams.min : 0, - legendAlign = formatterParams && formatterParams.legendAlign ? formatterParams.legendAlign : "center", - percent, - percentValue, - color, - legend, - legendColor, - top, - left, - right, - bottom; - - //make sure value is in range - percentValue = parseFloat(value) <= max ? parseFloat(value) : max; - percentValue = parseFloat(percentValue) >= min ? parseFloat(percentValue) : min; - - //workout percentage - percent = (max - min) / 100; - percentValue = Math.round((percentValue - min) / percent); - - //set bar color - switch (_typeof(formatterParams.color)) { - case "string": - color = formatterParams.color; - break; - case "function": - color = formatterParams.color(value); - break; - case "object": - if (Array.isArray(formatterParams.color)) { - var unit = 100 / formatterParams.color.length; - var index = Math.floor(percentValue / unit); - - index = Math.min(index, formatterParams.color.length - 1); - index = Math.max(index, 0); - color = formatterParams.color[index]; - break; - } - default: - color = "#2DC214"; - } - - //generate legend - switch (_typeof(formatterParams.legend)) { - case "string": - legend = formatterParams.legend; - break; - case "function": - legend = formatterParams.legend(value); - break; - case "boolean": - legend = value; - break; - default: - legend = false; - } - - //set legend color - switch (_typeof(formatterParams.legendColor)) { - case "string": - legendColor = formatterParams.legendColor; - break; - case "function": - legendColor = formatterParams.legendColor(value); - break; - case "object": - if (Array.isArray(formatterParams.legendColor)) { - var unit = 100 / formatterParams.legendColor.length; - var index = Math.floor(percentValue / unit); - - index = Math.min(index, formatterParams.legendColor.length - 1); - index = Math.max(index, 0); - legendColor = formatterParams.legendColor[index]; - } - break; - default: - legendColor = "#000"; - } - - element.style.minWidth = "30px"; - element.style.position = "relative"; - - element.setAttribute("aria-label", percentValue); - - var barEl = document.createElement("div"); - barEl.style.display = "inline-block"; - barEl.style.position = "relative"; - barEl.style.width = percentValue + "%"; - barEl.style.backgroundColor = color; - barEl.style.height = "100%"; - - barEl.setAttribute('data-max', max); - barEl.setAttribute('data-min', min); - - if (legend) { - var legendEl = document.createElement("div"); - legendEl.style.position = "absolute"; - legendEl.style.top = "4px"; - legendEl.style.left = 0; - legendEl.style.textAlign = legendAlign; - legendEl.style.width = "100%"; - legendEl.style.color = legendColor; - legendEl.innerHTML = legend; - } - - onRendered(function () { - - //handle custom element needed if formatter is to be included in printed/downloaded output - if (!(cell instanceof CellComponent)) { - var holderEl = document.createElement("div"); - holderEl.style.position = "absolute"; - holderEl.style.top = "4px"; - holderEl.style.bottom = "4px"; - holderEl.style.left = "4px"; - holderEl.style.right = "4px"; - - element.appendChild(holderEl); - - element = holderEl; - } - - element.appendChild(barEl); - - if (legend) { - element.appendChild(legendEl); - } - }); - - return ""; - }, - - //background color - color: function color(cell, formatterParams, onRendered) { - cell.getElement().style.backgroundColor = this.sanitizeHTML(cell.getValue()); - return ""; - }, - - //tick icon - buttonTick: function buttonTick(cell, formatterParams, onRendered) { - return ''; - }, - - //cross icon - buttonCross: function buttonCross(cell, formatterParams, onRendered) { - return ''; - }, - - //current row number - rownum: function rownum(cell, formatterParams, onRendered) { - return this.table.rowManager.activeRows.indexOf(cell.getRow()._getSelf()) + 1; - }, - - //row handle - handle: function handle(cell, formatterParams, onRendered) { - cell.getElement().classList.add("tabulator-row-handle"); - return "
"; - }, - - responsiveCollapse: function responsiveCollapse(cell, formatterParams, onRendered) { - var self = this, - open = false, - el = document.createElement("div"), - config = cell.getRow()._row.modules.responsiveLayout; - - el.classList.add("tabulator-responsive-collapse-toggle"); - el.innerHTML = "+-"; - - cell.getElement().classList.add("tabulator-row-handle"); - - function toggleList(isOpen) { - var collapseEl = config.element; - - config.open = isOpen; - - if (collapseEl) { - - if (config.open) { - el.classList.add("open"); - collapseEl.style.display = ''; - } else { - el.classList.remove("open"); - collapseEl.style.display = 'none'; - } - } - } - - el.addEventListener("click", function (e) { - e.stopImmediatePropagation(); - toggleList(!config.open); - }); - - toggleList(config.open); - - return el; - }, - - rowSelection: function rowSelection(cell, formatterParams, onRendered) { - var _this64 = this; - - var checkbox = document.createElement("input"); - - checkbox.type = 'checkbox'; - - if (this.table.modExists("selectRow", true)) { - - checkbox.addEventListener("click", function (e) { - e.stopPropagation(); - }); - - if (typeof cell.getRow == 'function') { - var row = cell.getRow(); - - if (row instanceof RowComponent) { - - checkbox.addEventListener("change", function (e) { - row.toggleSelect(); - }); - - checkbox.checked = row.isSelected && row.isSelected(); - this.table.modules.selectRow.registerRowSelectCheckbox(row, checkbox); - } else { - checkbox = ""; - } - } else { - checkbox.addEventListener("change", function (e) { - if (_this64.table.modules.selectRow.selectedRows.length) { - _this64.table.deselectRow(); - } else { - _this64.table.selectRow(formatterParams.rowRange); - } - }); - - this.table.modules.selectRow.registerHeaderSelectCheckbox(checkbox); - } - } - return checkbox; - } -}; - -Tabulator.prototype.registerModule("format", Format); - -var FrozenColumns = function FrozenColumns(table) { - this.table = table; //hold Tabulator object - this.leftColumns = []; - this.rightColumns = []; - this.leftMargin = 0; - this.rightMargin = 0; - this.rightPadding = 0; - this.initializationMode = "left"; - this.active = false; - this.scrollEndTimer = false; -}; - -//reset initial state -FrozenColumns.prototype.reset = function () { - this.initializationMode = "left"; - this.leftColumns = []; - this.rightColumns = []; - this.leftMargin = 0; - this.rightMargin = 0; - this.rightMargin = 0; - this.active = false; - - this.table.columnManager.headersElement.style.marginLeft = 0; - this.table.columnManager.element.style.paddingRight = 0; -}; - -//initialize specific column -FrozenColumns.prototype.initializeColumn = function (column) { - var config = { margin: 0, edge: false }; - - if (!column.isGroup) { - - if (this.frozenCheck(column)) { - - config.position = this.initializationMode; - - if (this.initializationMode == "left") { - this.leftColumns.push(column); - } else { - this.rightColumns.unshift(column); - } - - this.active = true; - - column.modules.frozen = config; - } else { - this.initializationMode = "right"; - } - } -}; - -FrozenColumns.prototype.frozenCheck = function (column) { - var frozen = false; - - if (column.parent.isGroup && column.definition.frozen) { - console.warn("Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups"); - } - - if (column.parent.isGroup) { - return this.frozenCheck(column.parent); - } else { - return column.definition.frozen; - } - - return frozen; -}; - -//quick layout to smooth horizontal scrolling -FrozenColumns.prototype.scrollHorizontal = function () { - var _this65 = this; - - var rows; - - if (this.active) { - clearTimeout(this.scrollEndTimer); - - //layout all rows after scroll is complete - this.scrollEndTimer = setTimeout(function () { - _this65.layout(); - }, 100); - - rows = this.table.rowManager.getVisibleRows(); - - this.calcMargins(); - - this.layoutColumnPosition(); - - this.layoutCalcRows(); - - rows.forEach(function (row) { - if (row.type === "row") { - _this65.layoutRow(row); - } - }); - - this.table.rowManager.tableElement.style.marginRight = this.rightMargin; - } -}; - -//calculate margins for rows -FrozenColumns.prototype.calcMargins = function () { - this.leftMargin = this._calcSpace(this.leftColumns, this.leftColumns.length) + "px"; - this.table.columnManager.headersElement.style.marginLeft = this.leftMargin; - - this.rightMargin = this._calcSpace(this.rightColumns, this.rightColumns.length) + "px"; - this.table.columnManager.element.style.paddingRight = this.rightMargin; - - //calculate right frozen columns - this.rightPadding = this.table.rowManager.element.clientWidth + this.table.columnManager.scrollLeft; -}; - -//layout calculation rows -FrozenColumns.prototype.layoutCalcRows = function () { - if (this.table.modExists("columnCalcs")) { - if (this.table.modules.columnCalcs.topInitialized && this.table.modules.columnCalcs.topRow) { - this.layoutRow(this.table.modules.columnCalcs.topRow); - } - if (this.table.modules.columnCalcs.botInitialized && this.table.modules.columnCalcs.botRow) { - this.layoutRow(this.table.modules.columnCalcs.botRow); - } - } -}; - -//calculate column positions and layout headers -FrozenColumns.prototype.layoutColumnPosition = function (allCells) { - var _this66 = this; - - var leftParents = []; - - this.leftColumns.forEach(function (column, i) { - column.modules.frozen.margin = _this66._calcSpace(_this66.leftColumns, i) + _this66.table.columnManager.scrollLeft + "px"; - - if (i == _this66.leftColumns.length - 1) { - column.modules.frozen.edge = true; - } else { - column.modules.frozen.edge = false; - } - - if (column.parent.isGroup) { - var parentEl = _this66.getColGroupParentElement(column); - if (!leftParents.includes(parentEl)) { - _this66.layoutElement(parentEl, column); - leftParents.push(parentEl); - } - - if (column.modules.frozen.edge) { - parentEl.classList.add("tabulator-frozen-" + column.modules.frozen.position); - } - } else { - _this66.layoutElement(column.getElement(), column); - } - - if (allCells) { - column.cells.forEach(function (cell) { - _this66.layoutElement(cell.getElement(), column); - }); - } - }); - - this.rightColumns.forEach(function (column, i) { - column.modules.frozen.margin = _this66.rightPadding - _this66._calcSpace(_this66.rightColumns, i + 1) + "px"; - - if (i == _this66.rightColumns.length - 1) { - column.modules.frozen.edge = true; - } else { - column.modules.frozen.edge = false; - } - - if (column.parent.isGroup) { - _this66.layoutElement(_this66.getColGroupParentElement(column), column); - } else { - _this66.layoutElement(column.getElement(), column); - } - - if (allCells) { - column.cells.forEach(function (cell) { - _this66.layoutElement(cell.getElement(), column); - }); - } - }); -}; - -FrozenColumns.prototype.getColGroupParentElement = function (column) { - return column.parent.isGroup ? this.getColGroupParentElement(column.parent) : column.getElement(); -}; - -//layout columns appropropriatly -FrozenColumns.prototype.layout = function () { - var self = this, - rightMargin = 0; - - if (self.active) { - - //calculate row padding - this.calcMargins(); - - // self.table.rowManager.activeRows.forEach(function(row){ - // self.layoutRow(row); - // }); - - // if(self.table.options.dataTree){ - self.table.rowManager.getDisplayRows().forEach(function (row) { - if (row.type === "row") { - self.layoutRow(row); - } - }); - // } - - this.layoutCalcRows(); - - //calculate left columns - this.layoutColumnPosition(true); - - // if(tableHolder.scrollHeight > tableHolder.clientHeight){ - // rightMargin -= tableHolder.offsetWidth - tableHolder.clientWidth; - // } - - this.table.rowManager.tableElement.style.marginRight = this.rightMargin; - } -}; - -FrozenColumns.prototype.layoutRow = function (row) { - var _this67 = this; - - var rowEl = row.getElement(); - - rowEl.style.paddingLeft = this.leftMargin; - // rowEl.style.paddingRight = this.rightMargin + "px"; - - this.leftColumns.forEach(function (column) { - var cell = row.getCell(column); - - if (cell) { - _this67.layoutElement(cell.getElement(), column); - } - }); - - this.rightColumns.forEach(function (column) { - var cell = row.getCell(column); - - if (cell) { - _this67.layoutElement(cell.getElement(), column); - } - }); -}; - -FrozenColumns.prototype.layoutElement = function (element, column) { - - if (column.modules.frozen) { - element.style.position = "absolute"; - element.style.left = column.modules.frozen.margin; - - element.classList.add("tabulator-frozen"); - - if (column.modules.frozen.edge) { - element.classList.add("tabulator-frozen-" + column.modules.frozen.position); - } - } -}; - -FrozenColumns.prototype._calcSpace = function (columns, index) { - var width = 0; - - for (var _i12 = 0; _i12 < index; _i12++) { - if (columns[_i12].visible) { - width += columns[_i12].getWidth(); - } - } - - return width; -}; - -Tabulator.prototype.registerModule("frozenColumns", FrozenColumns); -var FrozenRows = function FrozenRows(table) { - this.table = table; //hold Tabulator object - this.topElement = document.createElement("div"); - this.rows = []; - this.displayIndex = 0; //index in display pipeline -}; - -FrozenRows.prototype.initialize = function () { - this.rows = []; - - this.topElement.classList.add("tabulator-frozen-rows-holder"); - - // this.table.columnManager.element.append(this.topElement); - this.table.columnManager.getElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling); -}; - -FrozenRows.prototype.setDisplayIndex = function (index) { - this.displayIndex = index; -}; - -FrozenRows.prototype.getDisplayIndex = function () { - return this.displayIndex; -}; - -FrozenRows.prototype.isFrozen = function () { - return !!this.rows.length; -}; - -//filter frozen rows out of display data -FrozenRows.prototype.getRows = function (rows) { - var self = this, - frozen = [], - output = rows.slice(0); - - this.rows.forEach(function (row) { - var index = output.indexOf(row); - - if (index > -1) { - output.splice(index, 1); - } - }); - - return output; -}; - -FrozenRows.prototype.freezeRow = function (row) { - if (!row.modules.frozen) { - row.modules.frozen = true; - this.topElement.appendChild(row.getElement()); - row.initialize(); - row.normalizeHeight(); - this.table.rowManager.adjustTableSize(); - - this.rows.push(row); - - this.table.rowManager.refreshActiveData("display"); - - this.styleRows(); - } else { - console.warn("Freeze Error - Row is already frozen"); - } -}; - -FrozenRows.prototype.unfreezeRow = function (row) { - var index = this.rows.indexOf(row); - - if (row.modules.frozen) { - - row.modules.frozen = false; - - this.detachRow(row); - - this.table.rowManager.adjustTableSize(); - - this.table.rowManager.refreshActiveData("display"); - - if (this.rows.length) { - this.styleRows(); - } - } else { - console.warn("Freeze Error - Row is already unfrozen"); - } -}; - -FrozenRows.prototype.detachRow = function (row) { - var index = this.rows.indexOf(row); - - if (index > -1) { - var rowEl = row.getElement(); - rowEl.parentNode.removeChild(rowEl); - - this.rows.splice(index, 1); - } -}; - -FrozenRows.prototype.styleRows = function (row) { - var self = this; - - this.rows.forEach(function (row, i) { - self.table.rowManager.styleRow(row, i); - }); -}; - -Tabulator.prototype.registerModule("frozenRows", FrozenRows); - -//public group object -var GroupComponent = function GroupComponent(group) { - this._group = group; - this.type = "GroupComponent"; -}; - -GroupComponent.prototype.getKey = function () { - return this._group.key; -}; - -GroupComponent.prototype.getField = function () { - return this._group.field; -}; - -GroupComponent.prototype.getElement = function () { - return this._group.element; -}; - -GroupComponent.prototype.getRows = function () { - return this._group.getRows(true); -}; - -GroupComponent.prototype.getSubGroups = function () { - return this._group.getSubGroups(true); -}; - -GroupComponent.prototype.getParentGroup = function () { - return this._group.parent ? this._group.parent.getComponent() : false; -}; - -GroupComponent.prototype.getVisibility = function () { - console.warn("getVisibility function is deprecated, you should now use the isVisible function"); - return this._group.visible; -}; - -GroupComponent.prototype.isVisible = function () { - return this._group.visible; -}; - -GroupComponent.prototype.show = function () { - this._group.show(); -}; - -GroupComponent.prototype.hide = function () { - this._group.hide(); -}; - -GroupComponent.prototype.toggle = function () { - this._group.toggleVisibility(); -}; - -GroupComponent.prototype._getSelf = function () { - return this._group; -}; - -GroupComponent.prototype.getTable = function () { - return this._group.groupManager.table; -}; - -////////////////////////////////////////////////// -//////////////// Group Functions ///////////////// -////////////////////////////////////////////////// - -var Group = function Group(groupManager, parent, level, key, field, generator, oldGroup) { - - this.groupManager = groupManager; - this.parent = parent; - this.key = key; - this.level = level; - this.field = field; - this.hasSubGroups = level < groupManager.groupIDLookups.length - 1; - this.addRow = this.hasSubGroups ? this._addRowToGroup : this._addRow; - this.type = "group"; //type of element - this.old = oldGroup; - this.rows = []; - this.groups = []; - this.groupList = []; - this.generator = generator; - this.elementContents = false; - this.height = 0; - this.outerHeight = 0; - this.initialized = false; - this.calcs = {}; - this.initialized = false; - this.modules = {}; - this.arrowElement = false; - - this.visible = oldGroup ? oldGroup.visible : typeof groupManager.startOpen[level] !== "undefined" ? groupManager.startOpen[level] : groupManager.startOpen[0]; - - this.component = null; - - this.createElements(); - this.addBindings(); - - this.createValueGroups(); -}; - -Group.prototype.wipe = function () { - if (this.groupList.length) { - this.groupList.forEach(function (group) { - group.wipe(); - }); - } else { - this.element = false; - this.arrowElement = false; - this.elementContents = false; - } -}; - -Group.prototype.createElements = function () { - var arrow = document.createElement("div"); - arrow.classList.add("tabulator-arrow"); - - this.element = document.createElement("div"); - this.element.classList.add("tabulator-row"); - this.element.classList.add("tabulator-group"); - this.element.classList.add("tabulator-group-level-" + this.level); - this.element.setAttribute("role", "rowgroup"); - - this.arrowElement = document.createElement("div"); - this.arrowElement.classList.add("tabulator-group-toggle"); - this.arrowElement.appendChild(arrow); - - //setup movable rows - if (this.groupManager.table.options.movableRows !== false && this.groupManager.table.modExists("moveRow")) { - this.groupManager.table.modules.moveRow.initializeGroupHeader(this); - } -}; - -Group.prototype.createValueGroups = function () { - var _this68 = this; - - var level = this.level + 1; - if (this.groupManager.allowedValues && this.groupManager.allowedValues[level]) { - this.groupManager.allowedValues[level].forEach(function (value) { - _this68._createGroup(value, level); - }); - } -}; - -Group.prototype.addBindings = function () { - var self = this, - dblTap, - tapHold, - tap, - toggleElement; - - //handle group click events - if (self.groupManager.table.options.groupClick) { - self.element.addEventListener("click", function (e) { - self.groupManager.table.options.groupClick.call(self.groupManager.table, e, self.getComponent()); - }); - } - - if (self.groupManager.table.options.groupDblClick) { - self.element.addEventListener("dblclick", function (e) { - self.groupManager.table.options.groupDblClick.call(self.groupManager.table, e, self.getComponent()); - }); - } - - if (self.groupManager.table.options.groupContext) { - self.element.addEventListener("contextmenu", function (e) { - self.groupManager.table.options.groupContext.call(self.groupManager.table, e, self.getComponent()); - }); - } - - if ((self.groupManager.table.options.groupContextMenu || self.groupManager.table.options.groupClickMenu) && self.groupManager.table.modExists("menu")) { - self.groupManager.table.modules.menu.initializeGroup.call(self.groupManager.table.modules.menu, self); - } - - if (self.groupManager.table.options.groupTap) { - - tap = false; - - self.element.addEventListener("touchstart", function (e) { - tap = true; - }, { passive: true }); - - self.element.addEventListener("touchend", function (e) { - if (tap) { - self.groupManager.table.options.groupTap(e, self.getComponent()); - } - - tap = false; - }); - } - - if (self.groupManager.table.options.groupDblTap) { - - dblTap = null; - - self.element.addEventListener("touchend", function (e) { - - if (dblTap) { - clearTimeout(dblTap); - dblTap = null; - - self.groupManager.table.options.groupDblTap(e, self.getComponent()); - } else { - - dblTap = setTimeout(function () { - clearTimeout(dblTap); - dblTap = null; - }, 300); - } - }); - } - - if (self.groupManager.table.options.groupTapHold) { - - tapHold = null; - - self.element.addEventListener("touchstart", function (e) { - clearTimeout(tapHold); - - tapHold = setTimeout(function () { - clearTimeout(tapHold); - tapHold = null; - tap = false; - self.groupManager.table.options.groupTapHold(e, self.getComponent()); - }, 1000); - }, { passive: true }); - - self.element.addEventListener("touchend", function (e) { - clearTimeout(tapHold); - tapHold = null; - }); - } - - if (self.groupManager.table.options.groupToggleElement) { - toggleElement = self.groupManager.table.options.groupToggleElement == "arrow" ? self.arrowElement : self.element; - - toggleElement.addEventListener("click", function (e) { - e.stopPropagation(); - e.stopImmediatePropagation(); - self.toggleVisibility(); - }); - } -}; - -Group.prototype._createGroup = function (groupID, level) { - var groupKey = level + "_" + groupID; - var group = new Group(this.groupManager, this, level, groupID, this.groupManager.groupIDLookups[level].field, this.groupManager.headerGenerator[level] || this.groupManager.headerGenerator[0], this.old ? this.old.groups[groupKey] : false); - - this.groups[groupKey] = group; - this.groupList.push(group); -}; - -Group.prototype._addRowToGroup = function (row) { - - var level = this.level + 1; - - if (this.hasSubGroups) { - var groupID = this.groupManager.groupIDLookups[level].func(row.getData()), - groupKey = level + "_" + groupID; - - if (this.groupManager.allowedValues && this.groupManager.allowedValues[level]) { - if (this.groups[groupKey]) { - this.groups[groupKey].addRow(row); - } - } else { - if (!this.groups[groupKey]) { - this._createGroup(groupID, level); - } - - this.groups[groupKey].addRow(row); - } - } -}; - -Group.prototype._addRow = function (row) { - this.rows.push(row); - row.modules.group = this; -}; - -Group.prototype.insertRow = function (row, to, after) { - var data = this.conformRowData({}); - - row.updateData(data); - - var toIndex = this.rows.indexOf(to); - - if (toIndex > -1) { - if (after) { - this.rows.splice(toIndex + 1, 0, row); - } else { - this.rows.splice(toIndex, 0, row); - } - } else { - if (after) { - this.rows.push(row); - } else { - this.rows.unshift(row); - } - } - - row.modules.group = this; - - this.generateGroupHeaderContents(); - - if (this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.options.columnCalcs != "table") { - this.groupManager.table.modules.columnCalcs.recalcGroup(this); - } - - this.groupManager.updateGroupRows(true); -}; - -Group.prototype.scrollHeader = function (left) { - this.arrowElement.style.marginLeft = left; - - this.groupList.forEach(function (child) { - child.scrollHeader(left); - }); -}; - -Group.prototype.getRowIndex = function (row) {}; - -//update row data to match grouping contraints -Group.prototype.conformRowData = function (data) { - if (this.field) { - data[this.field] = this.key; - } else { - console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"); - } - - if (this.parent) { - data = this.parent.conformRowData(data); - } - - return data; -}; - -Group.prototype.removeRow = function (row) { - var index = this.rows.indexOf(row); - var el = row.getElement(); - - if (index > -1) { - this.rows.splice(index, 1); - } - - if (!this.groupManager.table.options.groupValues && !this.rows.length) { - if (this.parent) { - this.parent.removeGroup(this); - } else { - this.groupManager.removeGroup(this); - } - - this.groupManager.updateGroupRows(true); - } else { - - if (el.parentNode) { - el.parentNode.removeChild(el); - } - - this.generateGroupHeaderContents(); - - if (this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.options.columnCalcs != "table") { - this.groupManager.table.modules.columnCalcs.recalcGroup(this); - } - } -}; - -Group.prototype.removeGroup = function (group) { - var groupKey = group.level + "_" + group.key, - index; - - if (this.groups[groupKey]) { - delete this.groups[groupKey]; - - index = this.groupList.indexOf(group); - - if (index > -1) { - this.groupList.splice(index, 1); - } - - if (!this.groupList.length) { - if (this.parent) { - this.parent.removeGroup(this); - } else { - this.groupManager.removeGroup(this); - } - } - } -}; - -Group.prototype.getHeadersAndRows = function (noCalc) { - var output = []; - - output.push(this); - - this._visSet(); - - if (this.visible) { - if (this.groupList.length) { - this.groupList.forEach(function (group) { - output = output.concat(group.getHeadersAndRows(noCalc)); - }); - } else { - if (!noCalc && this.groupManager.table.options.columnCalcs != "table" && this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.modules.columnCalcs.hasTopCalcs()) { - if (this.calcs.top) { - this.calcs.top.detachElement(); - this.calcs.top.deleteCells(); - } - - this.calcs.top = this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows); - output.push(this.calcs.top); - } - - output = output.concat(this.rows); - - if (!noCalc && this.groupManager.table.options.columnCalcs != "table" && this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.modules.columnCalcs.hasBottomCalcs()) { - if (this.calcs.bottom) { - this.calcs.bottom.detachElement(); - this.calcs.bottom.deleteCells(); - } - - this.calcs.bottom = this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows); - output.push(this.calcs.bottom); - } - } - } else { - if (!this.groupList.length && this.groupManager.table.options.columnCalcs != "table") { - - if (this.groupManager.table.modExists("columnCalcs")) { - - if (!noCalc && this.groupManager.table.modules.columnCalcs.hasTopCalcs()) { - if (this.calcs.top) { - this.calcs.top.detachElement(); - this.calcs.top.deleteCells(); - } - - if (this.groupManager.table.options.groupClosedShowCalcs) { - this.calcs.top = this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows); - output.push(this.calcs.top); - } - } - - if (!noCalc && this.groupManager.table.modules.columnCalcs.hasBottomCalcs()) { - if (this.calcs.bottom) { - this.calcs.bottom.detachElement(); - this.calcs.bottom.deleteCells(); - } - - if (this.groupManager.table.options.groupClosedShowCalcs) { - this.calcs.bottom = this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows); - output.push(this.calcs.bottom); - } - } - } - } - } - - return output; -}; - -Group.prototype.getData = function (visible, transform) { - var self = this, - output = []; - - this._visSet(); - - if (!visible || visible && this.visible) { - this.rows.forEach(function (row) { - output.push(row.getData(transform || "data")); - }); - } - - return output; -}; - -// Group.prototype.getRows = function(){ -// this._visSet(); - -// return this.visible ? this.rows : []; -// }; - -Group.prototype.getRowCount = function () { - var count = 0; - - if (this.groupList.length) { - this.groupList.forEach(function (group) { - count += group.getRowCount(); - }); - } else { - count = this.rows.length; - } - return count; -}; - -Group.prototype.toggleVisibility = function () { - if (this.visible) { - this.hide(); - } else { - this.show(); - } -}; - -Group.prototype.hide = function () { - this.visible = false; - - if (this.groupManager.table.rowManager.getRenderMode() == "classic" && !this.groupManager.table.options.pagination) { - - this.element.classList.remove("tabulator-group-visible"); - - if (this.groupList.length) { - this.groupList.forEach(function (group) { - - var rows = group.getHeadersAndRows(); - - rows.forEach(function (row) { - row.detachElement(); - }); - }); - } else { - this.rows.forEach(function (row) { - var rowEl = row.getElement(); - rowEl.parentNode.removeChild(rowEl); - }); - } - - this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(), this.groupManager.getDisplayIndex()); - - this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth(); - } else { - this.groupManager.updateGroupRows(true); - } - - this.groupManager.table.options.groupVisibilityChanged.call(this.table, this.getComponent(), false); -}; - -Group.prototype.show = function () { - var self = this; - - self.visible = true; - - if (this.groupManager.table.rowManager.getRenderMode() == "classic" && !this.groupManager.table.options.pagination) { - - this.element.classList.add("tabulator-group-visible"); - - var prev = self.getElement(); - - if (this.groupList.length) { - this.groupList.forEach(function (group) { - var rows = group.getHeadersAndRows(); - - rows.forEach(function (row) { - var rowEl = row.getElement(); - prev.parentNode.insertBefore(rowEl, prev.nextSibling); - row.initialize(); - prev = rowEl; - }); - }); - } else { - self.rows.forEach(function (row) { - var rowEl = row.getElement(); - prev.parentNode.insertBefore(rowEl, prev.nextSibling); - row.initialize(); - prev = rowEl; - }); - } - - this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(), this.groupManager.getDisplayIndex()); - - this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth(); - } else { - this.groupManager.updateGroupRows(true); - } - - this.groupManager.table.options.groupVisibilityChanged.call(this.table, this.getComponent(), true); -}; - -Group.prototype._visSet = function () { - var data = []; - - if (typeof this.visible == "function") { - - this.rows.forEach(function (row) { - data.push(row.getData()); - }); - - this.visible = this.visible(this.key, this.getRowCount(), data, this.getComponent()); - } -}; - -Group.prototype.getRowGroup = function (row) { - var match = false; - if (this.groupList.length) { - this.groupList.forEach(function (group) { - var result = group.getRowGroup(row); - - if (result) { - match = result; - } - }); - } else { - if (this.rows.find(function (item) { - return item === row; - })) { - match = this; - } - } - - return match; -}; - -Group.prototype.getSubGroups = function (component) { - var output = []; - - this.groupList.forEach(function (child) { - output.push(component ? child.getComponent() : child); - }); - - return output; -}; - -Group.prototype.getRows = function (compoment) { - var output = []; - - this.rows.forEach(function (row) { - output.push(compoment ? row.getComponent() : row); - }); - - return output; -}; - -Group.prototype.generateGroupHeaderContents = function () { - var data = []; - - this.rows.forEach(function (row) { - data.push(row.getData()); - }); - - this.elementContents = this.generator(this.key, this.getRowCount(), data, this.getComponent()); - - while (this.element.firstChild) { - this.element.removeChild(this.element.firstChild); - }if (typeof this.elementContents === "string") { - this.element.innerHTML = this.elementContents; - } else { - this.element.appendChild(this.elementContents); - } - - this.element.insertBefore(this.arrowElement, this.element.firstChild); -}; - -Group.prototype.getPath = function () { - var path = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; - - path.unshift(this.key); - if (this.parent) { - this.parent.getPath(path); - } - return path; -}; -////////////// Standard Row Functions ////////////// - -Group.prototype.getElement = function () { - this.addBindingsd = false; - - this._visSet(); - - if (this.visible) { - this.element.classList.add("tabulator-group-visible"); - } else { - this.element.classList.remove("tabulator-group-visible"); - } - - for (var i = 0; i < this.element.childNodes.length; ++i) { - this.element.childNodes[i].parentNode.removeChild(this.element.childNodes[i]); - } - - this.generateGroupHeaderContents(); - - // this.addBindings(); - - return this.element; -}; - -Group.prototype.detachElement = function () { - if (this.element && this.element.parentNode) { - this.element.parentNode.removeChild(this.element); - } -}; - -//normalize the height of elements in the row -Group.prototype.normalizeHeight = function () { - this.setHeight(this.element.clientHeight); -}; - -Group.prototype.initialize = function (force) { - if (!this.initialized || force) { - this.normalizeHeight(); - this.initialized = true; - } -}; - -Group.prototype.reinitialize = function () { - this.initialized = false; - this.height = 0; - - if (Tabulator.prototype.helpers.elVisible(this.element)) { - this.initialize(true); - } -}; - -Group.prototype.setHeight = function (height) { - if (this.height != height) { - this.height = height; - this.outerHeight = this.element.offsetHeight; - } -}; - -//return rows outer height -Group.prototype.getHeight = function () { - return this.outerHeight; -}; - -Group.prototype.getGroup = function () { - return this; -}; - -Group.prototype.reinitializeHeight = function () {}; -Group.prototype.calcHeight = function () {}; -Group.prototype.setCellHeight = function () {}; -Group.prototype.clearCellHeight = function () {}; - -//////////////// Object Generation ///////////////// -Group.prototype.getComponent = function () { - if (!this.component) { - this.component = new GroupComponent(this); - } - - return this.component; -}; - -////////////////////////////////////////////////// -////////////// Group Row Extension /////////////// -////////////////////////////////////////////////// - -var GroupRows = function GroupRows(table) { - - this.table = table; //hold Tabulator object - - this.groupIDLookups = false; //enable table grouping and set field to group by - this.startOpen = [function () { - return false; - }]; //starting state of group - this.headerGenerator = [function () { - return ""; - }]; - this.groupList = []; //ordered list of groups - this.allowedValues = false; - this.groups = {}; //hold row groups - this.displayIndex = 0; //index in display pipeline -}; - -//initialize group configuration -GroupRows.prototype.initialize = function () { - var self = this, - groupBy = self.table.options.groupBy, - startOpen = self.table.options.groupStartOpen, - groupHeader = self.table.options.groupHeader; - - this.allowedValues = self.table.options.groupValues; - - if (Array.isArray(groupBy) && Array.isArray(groupHeader) && groupBy.length > groupHeader.length) { - console.warn("Error creating group headers, groupHeader array is shorter than groupBy array"); - } - - self.headerGenerator = [function () { - return ""; - }]; - this.startOpen = [function () { - return false; - }]; //starting state of group - - self.table.modules.localize.bind("groups|item", function (langValue, lang) { - self.headerGenerator[0] = function (value, count, data) { - //header layout function - return (typeof value === "undefined" ? "" : value) + "(" + count + " " + (count === 1 ? langValue : lang.groups.items) + ")"; - }; - }); - - this.groupIDLookups = []; - - if (Array.isArray(groupBy) || groupBy) { - if (this.table.modExists("columnCalcs") && this.table.options.columnCalcs != "table" && this.table.options.columnCalcs != "both") { - this.table.modules.columnCalcs.removeCalcs(); - } - } else { - if (this.table.modExists("columnCalcs") && this.table.options.columnCalcs != "group") { - - var cols = this.table.columnManager.getRealColumns(); - - cols.forEach(function (col) { - if (col.definition.topCalc) { - self.table.modules.columnCalcs.initializeTopRow(); - } - - if (col.definition.bottomCalc) { - self.table.modules.columnCalcs.initializeBottomRow(); - } - }); - } - } - - if (!Array.isArray(groupBy)) { - groupBy = [groupBy]; - } - - groupBy.forEach(function (group, i) { - var lookupFunc, column; - - if (typeof group == "function") { - lookupFunc = group; - } else { - column = self.table.columnManager.getColumnByField(group); - - if (column) { - lookupFunc = function lookupFunc(data) { - return column.getFieldValue(data); - }; - } else { - lookupFunc = function lookupFunc(data) { - return data[group]; - }; - } - } - - self.groupIDLookups.push({ - field: typeof group === "function" ? false : group, - func: lookupFunc, - values: self.allowedValues ? self.allowedValues[i] : false - }); - }); - - if (startOpen) { - - if (!Array.isArray(startOpen)) { - startOpen = [startOpen]; - } - - startOpen.forEach(function (level) { - level = typeof level == "function" ? level : function () { - return true; - }; - }); - - self.startOpen = startOpen; - } - - if (groupHeader) { - self.headerGenerator = Array.isArray(groupHeader) ? groupHeader : [groupHeader]; - } - - this.initialized = true; -}; - -GroupRows.prototype.setDisplayIndex = function (index) { - this.displayIndex = index; -}; - -GroupRows.prototype.getDisplayIndex = function () { - return this.displayIndex; -}; - -//return appropriate rows with group headers -GroupRows.prototype.getRows = function (rows) { - if (this.groupIDLookups.length) { - - this.table.options.dataGrouping.call(this.table); - - this.generateGroups(rows); - - if (this.table.options.dataGrouped) { - this.table.options.dataGrouped.call(this.table, this.getGroups(true)); - } - - return this.updateGroupRows(); - } else { - return rows.slice(0); - } -}; - -GroupRows.prototype.getGroups = function (compoment) { - var groupComponents = []; - - this.groupList.forEach(function (group) { - groupComponents.push(compoment ? group.getComponent() : group); - }); - - return groupComponents; -}; - -GroupRows.prototype.getChildGroups = function (group) { - var _this69 = this; - - var groupComponents = []; - - if (!group) { - group = this; - } - - group.groupList.forEach(function (child) { - if (child.groupList.length) { - groupComponents = groupComponents.concat(_this69.getChildGroups(child)); - } else { - groupComponents.push(child); - } - }); - - return groupComponents; -}; - -GroupRows.prototype.wipe = function () { - this.groupList.forEach(function (group) { - group.wipe(); - }); -}; - -GroupRows.prototype.pullGroupListData = function (groupList) { - var self = this; - var groupListData = []; - - groupList.forEach(function (group) { - var groupHeader = {}; - groupHeader.level = 0; - groupHeader.rowCount = 0; - groupHeader.headerContent = ""; - var childData = []; - - if (group.hasSubGroups) { - childData = self.pullGroupListData(group.groupList); - - groupHeader.level = group.level; - groupHeader.rowCount = childData.length - group.groupList.length; // data length minus number of sub-headers - groupHeader.headerContent = group.generator(group.key, groupHeader.rowCount, group.rows, group); - - groupListData.push(groupHeader); - groupListData = groupListData.concat(childData); - } else { - groupHeader.level = group.level; - groupHeader.headerContent = group.generator(group.key, group.rows.length, group.rows, group); - groupHeader.rowCount = group.getRows().length; - - groupListData.push(groupHeader); - - group.getRows().forEach(function (row) { - groupListData.push(row.getData("data")); - }); - } - }); - - return groupListData; -}; - -GroupRows.prototype.getGroupedData = function () { - - return this.pullGroupListData(this.groupList); -}; - -GroupRows.prototype.getRowGroup = function (row) { - var match = false; - - this.groupList.forEach(function (group) { - var result = group.getRowGroup(row); - - if (result) { - match = result; - } - }); - - return match; -}; - -GroupRows.prototype.countGroups = function () { - return this.groupList.length; -}; - -GroupRows.prototype.generateGroups = function (rows) { - var self = this, - oldGroups = self.groups; - - self.groups = {}; - self.groupList = []; - - if (this.allowedValues && this.allowedValues[0]) { - this.allowedValues[0].forEach(function (value) { - self.createGroup(value, 0, oldGroups); - }); - - rows.forEach(function (row) { - self.assignRowToExistingGroup(row, oldGroups); - }); - } else { - rows.forEach(function (row) { - self.assignRowToGroup(row, oldGroups); - }); - } -}; - -GroupRows.prototype.createGroup = function (groupID, level, oldGroups) { - var groupKey = level + "_" + groupID, - group; - - oldGroups = oldGroups || []; - - group = new Group(this, false, level, groupID, this.groupIDLookups[0].field, this.headerGenerator[0], oldGroups[groupKey]); - - this.groups[groupKey] = group; - this.groupList.push(group); -}; - -// GroupRows.prototype.assignRowToGroup = function(row, oldGroups){ -// var groupID = this.groupIDLookups[0].func(row.getData()), -// groupKey = "0_" + groupID; - -// if(!this.groups[groupKey]){ -// this.createGroup(groupID, 0, oldGroups); -// } - -// this.groups[groupKey].addRow(row); -// }; - -GroupRows.prototype.assignRowToExistingGroup = function (row, oldGroups) { - var groupID = this.groupIDLookups[0].func(row.getData()), - groupKey = "0_" + groupID; - - if (this.groups[groupKey]) { - this.groups[groupKey].addRow(row); - } -}; - -GroupRows.prototype.assignRowToGroup = function (row, oldGroups) { - var groupID = this.groupIDLookups[0].func(row.getData()), - newGroupNeeded = !this.groups["0_" + groupID]; - - if (newGroupNeeded) { - this.createGroup(groupID, 0, oldGroups); - } - - this.groups["0_" + groupID].addRow(row); - - return !newGroupNeeded; -}; - -GroupRows.prototype.reassignRowToGroup = function (row) { - var oldRowGroup = row.getGroup(), - oldGroupPath = oldRowGroup.getPath(), - newGroupPath = this.getExpectedPath(row), - samePath = true; - // figure out if new group path is the same as old group path - var samePath = oldGroupPath.length == newGroupPath.length && oldGroupPath.every(function (element, index) { - return element === newGroupPath[index]; - }); - // refresh if they new path and old path aren't the same (aka the row's groupings have changed) - if (!samePath) { - oldRowGroup.removeRow(row); - this.assignRowToGroup(row, self.groups); - this.table.rowManager.refreshActiveData("group", false, true); - } -}; - -GroupRows.prototype.getExpectedPath = function (row) { - var groupPath = [], - rowData = row.getData(); - this.groupIDLookups.forEach(function (groupId) { - groupPath.push(groupId.func(rowData)); - }); - return groupPath; -}; - -GroupRows.prototype.updateGroupRows = function (force) { - var self = this, - output = [], - oldRowCount; - - self.groupList.forEach(function (group) { - output = output.concat(group.getHeadersAndRows()); - }); - - //force update of table display - if (force) { - - var displayIndex = self.table.rowManager.setDisplayRows(output, this.getDisplayIndex()); - - if (displayIndex !== true) { - this.setDisplayIndex(displayIndex); - } - - self.table.rowManager.refreshActiveData("group", true, true); - } - - return output; -}; - -GroupRows.prototype.scrollHeaders = function (left) { - if (this.table.options.virtualDomHoz) { - left -= this.table.vdomHoz.vDomPadLeft; - } - - left = left + "px"; - - this.groupList.forEach(function (group) { - group.scrollHeader(left); - }); -}; - -GroupRows.prototype.removeGroup = function (group) { - var groupKey = group.level + "_" + group.key, - index; - - if (this.groups[groupKey]) { - delete this.groups[groupKey]; - - index = this.groupList.indexOf(group); - - if (index > -1) { - this.groupList.splice(index, 1); - } - } -}; - -Tabulator.prototype.registerModule("groupRows", GroupRows); -var History = function History(table) { - this.table = table; //hold Tabulator object - - this.history = []; - this.index = -1; -}; - -History.prototype.clear = function () { - this.history = []; - this.index = -1; -}; - -History.prototype.action = function (type, component, data) { - - this.history = this.history.slice(0, this.index + 1); - - this.history.push({ - type: type, - component: component, - data: data - }); - - this.index++; -}; - -History.prototype.getHistoryUndoSize = function () { - return this.index + 1; -}; - -History.prototype.getHistoryRedoSize = function () { - return this.history.length - (this.index + 1); -}; - -History.prototype.clearComponentHistory = function (component) { - var index = this.history.findIndex(function (item) { - return item.component === component; - }); - - if (index > -1) { - this.history.splice(index, 1); - if (index <= this.index) { - this.index--; - } - - this.clearComponentHistory(component); - } -}; - -History.prototype.undo = function () { - - if (this.index > -1) { - var action = this.history[this.index]; - - this.undoers[action.type].call(this, action); - - this.index--; - - this.table.options.historyUndo.call(this.table, action.type, action.component.getComponent(), action.data); - - return true; - } else { - console.warn("History Undo Error - No more history to undo"); - return false; - } -}; - -History.prototype.redo = function () { - if (this.history.length - 1 > this.index) { - - this.index++; - - var action = this.history[this.index]; - - this.redoers[action.type].call(this, action); - - this.table.options.historyRedo.call(this.table, action.type, action.component.getComponent(), action.data); - - return true; - } else { - console.warn("History Redo Error - No more history to redo"); - return false; - } -}; - -History.prototype.undoers = { - cellEdit: function cellEdit(action) { - action.component.setValueProcessData(action.data.oldValue); - }, - - rowAdd: function rowAdd(action) { - action.component.deleteActual(); - }, - - rowDelete: function rowDelete(action) { - var newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index); - - if (this.table.options.groupBy && this.table.modExists("groupRows")) { - this.table.modules.groupRows.updateGroupRows(true); - } - - this._rebindRow(action.component, newRow); - }, - - rowMove: function rowMove(action) { - this.table.rowManager.moveRowActual(action.component, this.table.rowManager.rows[action.data.posFrom], !action.data.after); - this.table.rowManager.redraw(); - } -}; - -History.prototype.redoers = { - cellEdit: function cellEdit(action) { - action.component.setValueProcessData(action.data.newValue); - }, - - rowAdd: function rowAdd(action) { - var newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index); - - if (this.table.options.groupBy && this.table.modExists("groupRows")) { - this.table.modules.groupRows.updateGroupRows(true); - } - - this._rebindRow(action.component, newRow); - }, - - rowDelete: function rowDelete(action) { - action.component.deleteActual(); - }, - - rowMove: function rowMove(action) { - this.table.rowManager.moveRowActual(action.component, this.table.rowManager.rows[action.data.posTo], action.data.after); - this.table.rowManager.redraw(); - } -}; - -//rebind rows to new element after deletion -History.prototype._rebindRow = function (oldRow, newRow) { - this.history.forEach(function (action) { - if (action.component instanceof Row) { - if (action.component === oldRow) { - action.component = newRow; - } - } else if (action.component instanceof Cell) { - if (action.component.row === oldRow) { - var field = action.component.column.getField(); - - if (field) { - action.component = newRow.getCell(field); - } - } - } - }); -}; - -Tabulator.prototype.registerModule("history", History); -var HtmlTableImport = function HtmlTableImport(table) { - this.table = table; //hold Tabulator object - this.fieldIndex = []; - this.hasIndex = false; -}; - -HtmlTableImport.prototype.parseTable = function () { - var self = this, - element = self.table.element, - options = self.table.options, - columns = options.columns, - headers = element.getElementsByTagName("th"), - rows = element.getElementsByTagName("tbody")[0], - data = [], - newTable; - - self.hasIndex = false; - - self.table.options.htmlImporting.call(this.table); - - rows = rows ? rows.getElementsByTagName("tr") : []; - - //check for tablator inline options - self._extractOptions(element, options); - - if (headers.length) { - self._extractHeaders(headers, rows); - } else { - self._generateBlankHeaders(headers, rows); - } - - //iterate through table rows and build data set - for (var index = 0; index < rows.length; index++) { - var row = rows[index], - cells = row.getElementsByTagName("td"), - item = {}; - - //create index if the dont exist in table - if (!self.hasIndex) { - item[options.index] = index; - } - - for (var i = 0; i < cells.length; i++) { - var cell = cells[i]; - if (typeof this.fieldIndex[i] !== "undefined") { - item[this.fieldIndex[i]] = cell.innerHTML; - } - } - - //add row data to item - data.push(item); - } - - //create new element - var newElement = document.createElement("div"); - - //transfer attributes to new element - var attributes = element.attributes; - - // loop through attributes and apply them on div - - for (var i in attributes) { - if (_typeof(attributes[i]) == "object") { - newElement.setAttribute(attributes[i].name, attributes[i].value); - } - } - - // replace table with div element - element.parentNode.replaceChild(newElement, element); - - options.data = data; - - self.table.options.htmlImported.call(this.table); - - // // newElement.tabulator(options); - - this.table.element = newElement; -}; - -//extract tabulator attribute options -HtmlTableImport.prototype._extractOptions = function (element, options, defaultOptions) { - var attributes = element.attributes; - var optionsArr = defaultOptions ? Object.assign([], defaultOptions) : Object.keys(options); - var optionsList = {}; - - optionsArr.forEach(function (item) { - optionsList[item.toLowerCase()] = item; - }); - - for (var index in attributes) { - var attrib = attributes[index]; - var name; - - if (attrib && (typeof attrib === 'undefined' ? 'undefined' : _typeof(attrib)) == "object" && attrib.name && attrib.name.indexOf("tabulator-") === 0) { - name = attrib.name.replace("tabulator-", ""); - - if (typeof optionsList[name] !== "undefined") { - options[optionsList[name]] = this._attribValue(attrib.value); - } - } - } -}; - -//get value of attribute -HtmlTableImport.prototype._attribValue = function (value) { - if (value === "true") { - return true; - } - - if (value === "false") { - return false; - } - - return value; -}; - -//find column if it has already been defined -HtmlTableImport.prototype._findCol = function (title) { - var match = this.table.options.columns.find(function (column) { - return column.title === title; - }); - - return match || false; -}; - -//extract column from headers -HtmlTableImport.prototype._extractHeaders = function (headers, rows) { - for (var index = 0; index < headers.length; index++) { - var header = headers[index], - exists = false, - col = this._findCol(header.textContent), - width, - attributes; - - if (col) { - exists = true; - } else { - col = { title: header.textContent.trim() }; - } - - if (!col.field) { - col.field = header.textContent.trim().toLowerCase().replace(" ", "_"); - } - - width = header.getAttribute("width"); - - if (width && !col.width) { - col.width = width; - } - - //check for tablator inline options - attributes = header.attributes; - - // //check for tablator inline options - this._extractOptions(header, col, Column.prototype.defaultOptionList); - - this.fieldIndex[index] = col.field; - - if (col.field == this.table.options.index) { - this.hasIndex = true; - } - - if (!exists) { - this.table.options.columns.push(col); - } - } -}; - -//generate blank headers -HtmlTableImport.prototype._generateBlankHeaders = function (headers, rows) { - for (var index = 0; index < headers.length; index++) { - var header = headers[index], - col = { title: "", field: "col" + index }; - - this.fieldIndex[index] = col.field; - - var width = header.getAttribute("width"); - - if (width) { - col.width = width; - } - - this.table.options.columns.push(col); - } -}; - -Tabulator.prototype.registerModule("htmlTableImport", HtmlTableImport); -var Keybindings = function Keybindings(table) { - this.table = table; //hold Tabulator object - this.watchKeys = null; - this.pressedKeys = null; - this.keyupBinding = false; - this.keydownBinding = false; -}; - -Keybindings.prototype.initialize = function () { - var bindings = this.table.options.keybindings, - mergedBindings = {}; - - this.watchKeys = {}; - this.pressedKeys = []; - - if (bindings !== false) { - - for (var key in this.bindings) { - mergedBindings[key] = this.bindings[key]; - } - - if (Object.keys(bindings).length) { - - for (var _key in bindings) { - mergedBindings[_key] = bindings[_key]; - } - } - - this.mapBindings(mergedBindings); - this.bindEvents(); - } -}; - -Keybindings.prototype.mapBindings = function (bindings) { - var _this70 = this; - - var self = this; - - var _loop2 = function _loop2(key) { - - if (_this70.actions[key]) { - - if (bindings[key]) { - - if (_typeof(bindings[key]) !== "object") { - bindings[key] = [bindings[key]]; - } - - bindings[key].forEach(function (binding) { - self.mapBinding(key, binding); - }); - } - } else { - console.warn("Key Binding Error - no such action:", key); - } - }; - - for (var key in bindings) { - _loop2(key); - } -}; - -Keybindings.prototype.mapBinding = function (action, symbolsList) { - var self = this; - - var binding = { - action: this.actions[action], - keys: [], - ctrl: false, - shift: false, - meta: false - }; - - var symbols = symbolsList.toString().toLowerCase().split(" ").join("").split("+"); - - symbols.forEach(function (symbol) { - switch (symbol) { - case "ctrl": - binding.ctrl = true; - break; - - case "shift": - binding.shift = true; - break; - - case "meta": - binding.meta = true; - break; - - default: - symbol = parseInt(symbol); - binding.keys.push(symbol); - - if (!self.watchKeys[symbol]) { - self.watchKeys[symbol] = []; - } - - self.watchKeys[symbol].push(binding); - } - }); -}; - -Keybindings.prototype.bindEvents = function () { - var self = this; - - this.keyupBinding = function (e) { - var code = e.keyCode; - var bindings = self.watchKeys[code]; - - if (bindings) { - - self.pressedKeys.push(code); - - bindings.forEach(function (binding) { - self.checkBinding(e, binding); - }); - } - }; - - this.keydownBinding = function (e) { - var code = e.keyCode; - var bindings = self.watchKeys[code]; - - if (bindings) { - - var index = self.pressedKeys.indexOf(code); - - if (index > -1) { - self.pressedKeys.splice(index, 1); - } - } - }; - - this.table.element.addEventListener("keydown", this.keyupBinding); - - this.table.element.addEventListener("keyup", this.keydownBinding); -}; - -Keybindings.prototype.clearBindings = function () { - if (this.keyupBinding) { - this.table.element.removeEventListener("keydown", this.keyupBinding); - } - - if (this.keydownBinding) { - this.table.element.removeEventListener("keyup", this.keydownBinding); - } -}; - -Keybindings.prototype.checkBinding = function (e, binding) { - var self = this, - match = true; - - if (e.ctrlKey == binding.ctrl && e.shiftKey == binding.shift && e.metaKey == binding.meta) { - binding.keys.forEach(function (key) { - var index = self.pressedKeys.indexOf(key); - - if (index == -1) { - match = false; - } - }); - - if (match) { - binding.action.call(self, e); - } - - return true; - } - - return false; -}; - -//default bindings -Keybindings.prototype.bindings = { - navPrev: "shift + 9", - navNext: 9, - navUp: 38, - navDown: 40, - scrollPageUp: 33, - scrollPageDown: 34, - scrollToStart: 36, - scrollToEnd: 35, - undo: "ctrl + 90", - redo: "ctrl + 89", - copyToClipboard: "ctrl + 67" -}; - -//default actions -Keybindings.prototype.actions = { - keyBlock: function keyBlock(e) { - e.stopPropagation(); - e.preventDefault(); - }, - scrollPageUp: function scrollPageUp(e) { - var rowManager = this.table.rowManager, - newPos = rowManager.scrollTop - rowManager.height, - scrollMax = rowManager.element.scrollHeight; - - e.preventDefault(); - - if (rowManager.displayRowsCount) { - if (newPos >= 0) { - rowManager.element.scrollTop = newPos; - } else { - rowManager.scrollToRow(rowManager.getDisplayRows()[0]); - } - } - - this.table.element.focus(); - }, - scrollPageDown: function scrollPageDown(e) { - var rowManager = this.table.rowManager, - newPos = rowManager.scrollTop + rowManager.height, - scrollMax = rowManager.element.scrollHeight; - - e.preventDefault(); - - if (rowManager.displayRowsCount) { - if (newPos <= scrollMax) { - rowManager.element.scrollTop = newPos; - } else { - rowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount - 1]); - } - } - - this.table.element.focus(); - }, - scrollToStart: function scrollToStart(e) { - var rowManager = this.table.rowManager; - - e.preventDefault(); - - if (rowManager.displayRowsCount) { - rowManager.scrollToRow(rowManager.getDisplayRows()[0]); - } - - this.table.element.focus(); - }, - scrollToEnd: function scrollToEnd(e) { - var rowManager = this.table.rowManager; - - e.preventDefault(); - - if (rowManager.displayRowsCount) { - rowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount - 1]); - } - - this.table.element.focus(); - }, - navPrev: function navPrev(e) { - var cell = false; - - if (this.table.modExists("edit")) { - cell = this.table.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - cell.nav().prev(); - } - } - }, - - navNext: function navNext(e) { - var cell = false; - var newRow = this.table.options.tabEndNewRow; - var nav; - - if (this.table.modExists("edit")) { - cell = this.table.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - - nav = cell.nav(); - - if (!nav.next()) { - if (newRow) { - - cell.getElement().firstChild.blur(); - - if (newRow === true) { - newRow = this.table.addRow({}); - } else { - if (typeof newRow == "function") { - newRow = this.table.addRow(newRow(cell.row.getComponent())); - } else { - newRow = this.table.addRow(Object.assign({}, newRow)); - } - } - - newRow.then(function () { - setTimeout(function () { - nav.next(); - }); - }); - } - } - } - } - }, - - navLeft: function navLeft(e) { - var cell = false; - - if (this.table.modExists("edit")) { - cell = this.table.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - cell.nav().left(); - } - } - }, - - navRight: function navRight(e) { - var cell = false; - - if (this.table.modExists("edit")) { - cell = this.table.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - cell.nav().right(); - } - } - }, - - navUp: function navUp(e) { - var cell = false; - - if (this.table.modExists("edit")) { - cell = this.table.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - cell.nav().up(); - } - } - }, - - navDown: function navDown(e) { - var cell = false; - - if (this.table.modExists("edit")) { - cell = this.table.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - cell.nav().down(); - } - } - }, - - undo: function undo(e) { - var cell = false; - if (this.table.options.history && this.table.modExists("history") && this.table.modExists("edit")) { - - cell = this.table.modules.edit.currentCell; - - if (!cell) { - e.preventDefault(); - this.table.modules.history.undo(); - } - } - }, - - redo: function redo(e) { - var cell = false; - if (this.table.options.history && this.table.modExists("history") && this.table.modExists("edit")) { - - cell = this.table.modules.edit.currentCell; - - if (!cell) { - e.preventDefault(); - this.table.modules.history.redo(); - } - } - }, - - copyToClipboard: function copyToClipboard(e) { - if (!this.table.modules.edit.currentCell) { - if (this.table.modExists("clipboard", true)) { - this.table.modules.clipboard.copy(false, true); - } - } - } -}; - -Tabulator.prototype.registerModule("keybindings", Keybindings); -var Menu = function Menu(table) { - this.table = table; //hold Tabulator object - this.menuEl = false; - this.blurEvent = this.hideMenu.bind(this); - this.escEvent = this.escMenu.bind(this); - this.nestedMenuBlock = false; -}; - -Menu.prototype.initializeColumnHeader = function (column) { - var _this71 = this; - - var headerMenuEl; - - if (column.definition.headerContextMenu) { - column.getElement().addEventListener("contextmenu", this.LoadMenuEvent.bind(this, column, column.definition.headerContextMenu)); - this.tapHold(column, column.definition.headerContextMenu); - } - - // if(column.definition.headerClickMenu){ - // column.getElement().addEventListener("click", this.LoadMenuEvent.bind(this, column, column.definition.headerClickMenu)); - // } - - if (column.definition.headerMenu) { - - headerMenuEl = document.createElement("span"); - headerMenuEl.classList.add("tabulator-header-menu-button"); - headerMenuEl.innerHTML = "⋮"; - - headerMenuEl.addEventListener("click", function (e) { - var menu = typeof column.definition.headerMenu == "function" ? column.definition.headerMenu(column.getComponent(), e) : column.definition.headerMenu; - e.stopPropagation(); - e.preventDefault(); - - _this71.loadMenu(e, column, menu); - }); - - column.titleElement.insertBefore(headerMenuEl, column.titleElement.firstChild); - } -}; - -Menu.prototype.LoadMenuEvent = function (component, menu, e) { - menu = typeof menu == "function" ? menu(component.getComponent(), e) : menu; - - // if(component instanceof Cell){ - // e.stopImmediatePropagation(); - // } - - this.loadMenu(e, component, menu); -}; - -Menu.prototype.tapHold = function (component, menu) { - var _this72 = this; - - var element = component.getElement(), - tapHold = null, - loaded = false; - - element.addEventListener("touchstart", function (e) { - clearTimeout(tapHold); - loaded = false; - - tapHold = setTimeout(function () { - clearTimeout(tapHold); - tapHold = null; - loaded = true; - - _this72.LoadMenuEvent(component, menu, e); - }, 1000); - }, { passive: true }); - - element.addEventListener("touchend", function (e) { - clearTimeout(tapHold); - tapHold = null; - - if (loaded) { - e.preventDefault(); - } - }); -}; - -Menu.prototype.initializeCell = function (cell) { - if (cell.column.definition.contextMenu) { - cell.getElement().addEventListener("contextmenu", this.LoadMenuEvent.bind(this, cell, cell.column.definition.contextMenu)); - this.tapHold(cell, cell.column.definition.contextMenu); - } - - if (cell.column.definition.clickMenu) { - cell.getElement().addEventListener("click", this.LoadMenuEvent.bind(this, cell, cell.column.definition.clickMenu)); - } -}; - -Menu.prototype.initializeRow = function (row) { - if (this.table.options.rowContextMenu) { - row.getElement().addEventListener("contextmenu", this.LoadMenuEvent.bind(this, row, this.table.options.rowContextMenu)); - this.tapHold(row, this.table.options.rowContextMenu); - } - - if (this.table.options.rowClickMenu) { - row.getElement().addEventListener("click", this.LoadMenuEvent.bind(this, row, this.table.options.rowClickMenu)); - } -}; - -Menu.prototype.initializeGroup = function (group) { - if (this.table.options.groupContextMenu) { - group.getElement().addEventListener("contextmenu", this.LoadMenuEvent.bind(this, group, this.table.options.groupContextMenu)); - this.tapHold(group, this.table.options.groupContextMenu); - } - - if (this.table.options.groupClickMenu) { - group.getElement().addEventListener("click", this.LoadMenuEvent.bind(this, group, this.table.options.groupClickMenu)); - } -}; - -Menu.prototype.loadMenu = function (e, component, menu) { - var _this73 = this; - - var docHeight = Math.max(document.body.offsetHeight, window.innerHeight), - touch = !(e instanceof MouseEvent); - - if (!touch) { - e.preventDefault(); - } - - //abort if no menu set - if (!menu || !menu.length) { - return; - } - - if (this.nestedMenuBlock) { - //abort if child menu already open - if (this.isOpen()) { - return; - } - } else { - this.nestedMenuBlock = setTimeout(function () { - _this73.nestedMenuBlock = false; - }, 100); - } - - this.hideMenu(); - - this.menuEl = document.createElement("div"); - this.menuEl.classList.add("tabulator-menu"); - - menu.forEach(function (item) { - var itemEl = document.createElement("div"); - var label = item.label; - var disabled = item.disabled; - - if (item.separator) { - itemEl.classList.add("tabulator-menu-separator"); - } else { - itemEl.classList.add("tabulator-menu-item"); - - if (typeof label == "function") { - label = label(component.getComponent()); - } - - if (label instanceof Node) { - itemEl.appendChild(label); - } else { - itemEl.innerHTML = label; - } - - if (typeof disabled == "function") { - disabled = disabled(component.getComponent()); - } - - if (disabled) { - itemEl.classList.add("tabulator-menu-item-disabled"); - itemEl.addEventListener("click", function (e) { - e.stopPropagation(); - }); - } else { - itemEl.addEventListener("click", function (e) { - _this73.hideMenu(); - item.action(e, component.getComponent()); - }); - } - } - - _this73.menuEl.appendChild(itemEl); - }); - - this.menuEl.style.top = (touch ? e.touches[0].pageY : e.pageY) + "px"; - this.menuEl.style.left = (touch ? e.touches[0].pageX : e.pageX) + "px"; - - setTimeout(function () { - _this73.table.rowManager.element.addEventListener("scroll", _this73.blurEvent); - document.body.addEventListener("click", _this73.blurEvent); - document.body.addEventListener("contextmenu", _this73.blurEvent); - document.body.addEventListener("keydown", _this73.escEvent); - }, 100); - - document.body.appendChild(this.menuEl); - - //move menu to start on right edge if it is too close to the edge of the screen - if (e.pageX + this.menuEl.offsetWidth >= document.body.offsetWidth) { - this.menuEl.style.left = ""; - this.menuEl.style.right = document.body.offsetWidth - e.pageX + "px"; - } - - //move menu to start on bottom edge if it is too close to the edge of the screen - if (e.pageY + this.menuEl.offsetHeight >= docHeight) { - this.menuEl.style.top = ""; - this.menuEl.style.bottom = docHeight - e.pageY + "px"; - } -}; - -Menu.prototype.isOpen = function () { - return !!this.menuEl.parentNode; -}; - -Menu.prototype.escMenu = function (e) { - if (e.keyCode == 27) { - this.hideMenu(); - } -}; - -Menu.prototype.hideMenu = function () { - if (this.menuEl.parentNode) { - this.menuEl.parentNode.removeChild(this.menuEl); - } - - if (this.escEvent) { - document.body.removeEventListener("keydown", this.escEvent); - } - - if (this.blurEvent) { - document.body.removeEventListener("click", this.blurEvent); - document.body.removeEventListener("contextmenu", this.blurEvent); - this.table.rowManager.element.removeEventListener("scroll", this.blurEvent); - } -}; - -//default accessors -Menu.prototype.menus = {}; - -Tabulator.prototype.registerModule("menu", Menu); -var MoveColumns = function MoveColumns(table) { - this.table = table; //hold Tabulator object - this.placeholderElement = this.createPlaceholderElement(); - this.hoverElement = false; //floating column header element - this.checkTimeout = false; //click check timeout holder - this.checkPeriod = 250; //period to wait on mousedown to consider this a move and not a click - this.moving = false; //currently moving column - this.toCol = false; //destination column - this.toColAfter = false; //position of moving column relative to the desitnation column - this.startX = 0; //starting position within header element - this.autoScrollMargin = 40; //auto scroll on edge when within margin - this.autoScrollStep = 5; //auto scroll distance in pixels - this.autoScrollTimeout = false; //auto scroll timeout - this.touchMove = false; - - this.moveHover = this.moveHover.bind(this); - this.endMove = this.endMove.bind(this); -}; - -MoveColumns.prototype.createPlaceholderElement = function () { - var el = document.createElement("div"); - - el.classList.add("tabulator-col"); - el.classList.add("tabulator-col-placeholder"); - - return el; -}; - -MoveColumns.prototype.initializeColumn = function (column) { - var self = this, - config = {}, - colEl; - - if (!column.modules.frozen) { - - colEl = column.getElement(); - - config.mousemove = function (e) { - if (column.parent === self.moving.parent) { - if ((self.touchMove ? e.touches[0].pageX : e.pageX) - Tabulator.prototype.helpers.elOffset(colEl).left + self.table.columnManager.element.scrollLeft > column.getWidth() / 2) { - if (self.toCol !== column || !self.toColAfter) { - colEl.parentNode.insertBefore(self.placeholderElement, colEl.nextSibling); - self.moveColumn(column, true); - } - } else { - if (self.toCol !== column || self.toColAfter) { - colEl.parentNode.insertBefore(self.placeholderElement, colEl); - self.moveColumn(column, false); - } - } - } - }.bind(self); - - colEl.addEventListener("mousedown", function (e) { - self.touchMove = false; - if (e.which === 1) { - self.checkTimeout = setTimeout(function () { - self.startMove(e, column); - }, self.checkPeriod); - } - }); - - colEl.addEventListener("mouseup", function (e) { - if (e.which === 1) { - if (self.checkTimeout) { - clearTimeout(self.checkTimeout); - } - } - }); - - self.bindTouchEvents(column); - } - - column.modules.moveColumn = config; -}; - -MoveColumns.prototype.bindTouchEvents = function (column) { - var self = this, - colEl = column.getElement(), - startXMove = false, - //shifting center position of the cell - dir = false, - currentCol, - nextCol, - prevCol, - nextColWidth, - prevColWidth, - nextColWidthLast, - prevColWidthLast; - - colEl.addEventListener("touchstart", function (e) { - self.checkTimeout = setTimeout(function () { - self.touchMove = true; - currentCol = column; - nextCol = column.nextColumn(); - nextColWidth = nextCol ? nextCol.getWidth() / 2 : 0; - prevCol = column.prevColumn(); - prevColWidth = prevCol ? prevCol.getWidth() / 2 : 0; - nextColWidthLast = 0; - prevColWidthLast = 0; - startXMove = false; - - self.startMove(e, column); - }, self.checkPeriod); - }, { passive: true }); - - colEl.addEventListener("touchmove", function (e) { - var halfCol, diff, moveToCol; - - if (self.moving) { - self.moveHover(e); - - if (!startXMove) { - startXMove = e.touches[0].pageX; - } - - diff = e.touches[0].pageX - startXMove; - - if (diff > 0) { - if (nextCol && diff - nextColWidthLast > nextColWidth) { - moveToCol = nextCol; - - if (moveToCol !== column) { - startXMove = e.touches[0].pageX; - moveToCol.getElement().parentNode.insertBefore(self.placeholderElement, moveToCol.getElement().nextSibling); - self.moveColumn(moveToCol, true); - } - } - } else { - if (prevCol && -diff - prevColWidthLast > prevColWidth) { - moveToCol = prevCol; - - if (moveToCol !== column) { - startXMove = e.touches[0].pageX; - moveToCol.getElement().parentNode.insertBefore(self.placeholderElement, moveToCol.getElement()); - self.moveColumn(moveToCol, false); - } - } - } - - if (moveToCol) { - currentCol = moveToCol; - nextCol = moveToCol.nextColumn(); - nextColWidthLast = nextColWidth; - nextColWidth = nextCol ? nextCol.getWidth() / 2 : 0; - prevCol = moveToCol.prevColumn(); - prevColWidthLast = prevColWidth; - prevColWidth = prevCol ? prevCol.getWidth() / 2 : 0; - } - } - }, { passive: true }); - - colEl.addEventListener("touchend", function (e) { - if (self.checkTimeout) { - clearTimeout(self.checkTimeout); - } - if (self.moving) { - self.endMove(e); - } - }); -}; - -MoveColumns.prototype.startMove = function (e, column) { - var element = column.getElement(); - - this.moving = column; - this.startX = (this.touchMove ? e.touches[0].pageX : e.pageX) - Tabulator.prototype.helpers.elOffset(element).left; - - this.table.element.classList.add("tabulator-block-select"); - - //create placeholder - this.placeholderElement.style.width = column.getWidth() + "px"; - this.placeholderElement.style.height = column.getHeight() + "px"; - - element.parentNode.insertBefore(this.placeholderElement, element); - element.parentNode.removeChild(element); - - //create hover element - this.hoverElement = element.cloneNode(true); - this.hoverElement.classList.add("tabulator-moving"); - - this.table.columnManager.getElement().appendChild(this.hoverElement); - - this.hoverElement.style.left = "0"; - this.hoverElement.style.bottom = "0"; - - if (!this.touchMove) { - this._bindMouseMove(); - - document.body.addEventListener("mousemove", this.moveHover); - document.body.addEventListener("mouseup", this.endMove); - } - - this.moveHover(e); -}; - -MoveColumns.prototype._bindMouseMove = function () { - this.table.columnManager.columnsByIndex.forEach(function (column) { - if (column.modules.moveColumn.mousemove) { - column.getElement().addEventListener("mousemove", column.modules.moveColumn.mousemove); - } - }); -}; - -MoveColumns.prototype._unbindMouseMove = function () { - this.table.columnManager.columnsByIndex.forEach(function (column) { - if (column.modules.moveColumn.mousemove) { - column.getElement().removeEventListener("mousemove", column.modules.moveColumn.mousemove); - } - }); -}; - -MoveColumns.prototype.moveColumn = function (column, after) { - var movingCells = this.moving.getCells(); - - this.toCol = column; - this.toColAfter = after; - - if (after) { - column.getCells().forEach(function (cell, i) { - var cellEl = cell.getElement(); - cellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl.nextSibling); - }); - } else { - column.getCells().forEach(function (cell, i) { - var cellEl = cell.getElement(); - cellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl); - }); - } -}; - -MoveColumns.prototype.endMove = function (e) { - if (e.which === 1 || this.touchMove) { - this._unbindMouseMove(); - - this.placeholderElement.parentNode.insertBefore(this.moving.getElement(), this.placeholderElement.nextSibling); - this.placeholderElement.parentNode.removeChild(this.placeholderElement); - this.hoverElement.parentNode.removeChild(this.hoverElement); - - this.table.element.classList.remove("tabulator-block-select"); - - if (this.toCol) { - this.table.columnManager.moveColumnActual(this.moving, this.toCol, this.toColAfter); - } - - this.moving = false; - this.toCol = false; - this.toColAfter = false; - - if (!this.touchMove) { - document.body.removeEventListener("mousemove", this.moveHover); - document.body.removeEventListener("mouseup", this.endMove); - } - } -}; - -MoveColumns.prototype.moveHover = function (e) { - var self = this, - columnHolder = self.table.columnManager.getElement(), - scrollLeft = columnHolder.scrollLeft, - xPos = (self.touchMove ? e.touches[0].pageX : e.pageX) - Tabulator.prototype.helpers.elOffset(columnHolder).left + scrollLeft, - scrollPos; - - self.hoverElement.style.left = xPos - self.startX + "px"; - - if (xPos - scrollLeft < self.autoScrollMargin) { - if (!self.autoScrollTimeout) { - self.autoScrollTimeout = setTimeout(function () { - scrollPos = Math.max(0, scrollLeft - 5); - self.table.rowManager.getElement().scrollLeft = scrollPos; - self.autoScrollTimeout = false; - }, 1); - } - } - - if (scrollLeft + columnHolder.clientWidth - xPos < self.autoScrollMargin) { - if (!self.autoScrollTimeout) { - self.autoScrollTimeout = setTimeout(function () { - scrollPos = Math.min(columnHolder.clientWidth, scrollLeft + 5); - self.table.rowManager.getElement().scrollLeft = scrollPos; - self.autoScrollTimeout = false; - }, 1); - } - } -}; - -Tabulator.prototype.registerModule("moveColumn", MoveColumns); - -var MoveRows = function MoveRows(table) { - - this.table = table; //hold Tabulator object - this.placeholderElement = this.createPlaceholderElement(); - this.hoverElement = false; //floating row header element - this.checkTimeout = false; //click check timeout holder - this.checkPeriod = 150; //period to wait on mousedown to consider this a move and not a click - this.moving = false; //currently moving row - this.toRow = false; //destination row - this.toRowAfter = false; //position of moving row relative to the desitnation row - this.hasHandle = false; //row has handle instead of fully movable row - this.startY = 0; //starting Y position within header element - this.startX = 0; //starting X position within header element - - this.moveHover = this.moveHover.bind(this); - this.endMove = this.endMove.bind(this); - this.tableRowDropEvent = false; - - this.touchMove = false; - - this.connection = false; - this.connectionSelectorsTables = false; - this.connectionSelectorsElements = false; - this.connectionElements = []; - this.connections = []; - - this.connectedTable = false; - this.connectedRow = false; -}; - -MoveRows.prototype.createPlaceholderElement = function () { - var el = document.createElement("div"); - - el.classList.add("tabulator-row"); - el.classList.add("tabulator-row-placeholder"); - - return el; -}; - -MoveRows.prototype.initialize = function (handle) { - this.connectionSelectorsTables = this.table.options.movableRowsConnectedTables; - this.connectionSelectorsElements = this.table.options.movableRowsConnectedElements; - - this.connection = this.connectionSelectorsTables || this.connectionSelectorsElements; -}; - -MoveRows.prototype.setHandle = function (handle) { - this.hasHandle = handle; -}; - -MoveRows.prototype.initializeGroupHeader = function (group) { - var self = this, - config = {}, - rowEl; - - //inter table drag drop - config.mouseup = function (e) { - self.tableRowDrop(e, row); - }.bind(self); - - //same table drag drop - config.mousemove = function (e) { - if (e.pageY - Tabulator.prototype.helpers.elOffset(group.element).top + self.table.rowManager.element.scrollTop > group.getHeight() / 2) { - if (self.toRow !== group || !self.toRowAfter) { - var rowEl = group.getElement(); - rowEl.parentNode.insertBefore(self.placeholderElement, rowEl.nextSibling); - self.moveRow(group, true); - } - } else { - if (self.toRow !== group || self.toRowAfter) { - var rowEl = group.getElement(); - if (rowEl.previousSibling) { - rowEl.parentNode.insertBefore(self.placeholderElement, rowEl); - self.moveRow(group, false); - } - } - } - }.bind(self); - - group.modules.moveRow = config; -}; - -MoveRows.prototype.initializeRow = function (row) { - var self = this, - config = {}, - rowEl; - - //inter table drag drop - config.mouseup = function (e) { - self.tableRowDrop(e, row); - }.bind(self); - - //same table drag drop - config.mousemove = function (e) { - if (e.pageY - Tabulator.prototype.helpers.elOffset(row.element).top + self.table.rowManager.element.scrollTop > row.getHeight() / 2) { - if (self.toRow !== row || !self.toRowAfter) { - var rowEl = row.getElement(); - rowEl.parentNode.insertBefore(self.placeholderElement, rowEl.nextSibling); - self.moveRow(row, true); - } - } else { - if (self.toRow !== row || self.toRowAfter) { - var rowEl = row.getElement(); - rowEl.parentNode.insertBefore(self.placeholderElement, rowEl); - self.moveRow(row, false); - } - } - }.bind(self); - - if (!this.hasHandle) { - - rowEl = row.getElement(); - - rowEl.addEventListener("mousedown", function (e) { - if (e.which === 1) { - self.checkTimeout = setTimeout(function () { - self.startMove(e, row); - }, self.checkPeriod); - } - }); - - rowEl.addEventListener("mouseup", function (e) { - if (e.which === 1) { - if (self.checkTimeout) { - clearTimeout(self.checkTimeout); - } - } - }); - - this.bindTouchEvents(row, row.getElement()); - } - - row.modules.moveRow = config; -}; - -MoveRows.prototype.initializeCell = function (cell) { - var self = this, - cellEl = cell.getElement(); - - cellEl.addEventListener("mousedown", function (e) { - if (e.which === 1) { - self.checkTimeout = setTimeout(function () { - self.startMove(e, cell.row); - }, self.checkPeriod); - } - }); - - cellEl.addEventListener("mouseup", function (e) { - if (e.which === 1) { - if (self.checkTimeout) { - clearTimeout(self.checkTimeout); - } - } - }); - - this.bindTouchEvents(cell.row, cell.getElement()); -}; - -MoveRows.prototype.bindTouchEvents = function (row, element) { - var self = this, - startYMove = false, - //shifting center position of the cell - dir = false, - currentRow, - nextRow, - prevRow, - nextRowHeight, - prevRowHeight, - nextRowHeightLast, - prevRowHeightLast; - - element.addEventListener("touchstart", function (e) { - self.checkTimeout = setTimeout(function () { - self.touchMove = true; - currentRow = row; - nextRow = row.nextRow(); - nextRowHeight = nextRow ? nextRow.getHeight() / 2 : 0; - prevRow = row.prevRow(); - prevRowHeight = prevRow ? prevRow.getHeight() / 2 : 0; - nextRowHeightLast = 0; - prevRowHeightLast = 0; - startYMove = false; - - self.startMove(e, row); - }, self.checkPeriod); - }, { passive: true }); - this.moving, this.toRow, this.toRowAfter; - element.addEventListener("touchmove", function (e) { - - var halfCol, diff, moveToRow; - - if (self.moving) { - e.preventDefault(); - - self.moveHover(e); - - if (!startYMove) { - startYMove = e.touches[0].pageY; - } - - diff = e.touches[0].pageY - startYMove; - - if (diff > 0) { - if (nextRow && diff - nextRowHeightLast > nextRowHeight) { - moveToRow = nextRow; - - if (moveToRow !== row) { - startYMove = e.touches[0].pageY; - moveToRow.getElement().parentNode.insertBefore(self.placeholderElement, moveToRow.getElement().nextSibling); - self.moveRow(moveToRow, true); - } - } - } else { - if (prevRow && -diff - prevRowHeightLast > prevRowHeight) { - moveToRow = prevRow; - - if (moveToRow !== row) { - startYMove = e.touches[0].pageY; - moveToRow.getElement().parentNode.insertBefore(self.placeholderElement, moveToRow.getElement()); - self.moveRow(moveToRow, false); - } - } - } - - if (moveToRow) { - currentRow = moveToRow; - nextRow = moveToRow.nextRow(); - nextRowHeightLast = nextRowHeight; - nextRowHeight = nextRow ? nextRow.getHeight() / 2 : 0; - prevRow = moveToRow.prevRow(); - prevRowHeightLast = prevRowHeight; - prevRowHeight = prevRow ? prevRow.getHeight() / 2 : 0; - } - } - }); - - element.addEventListener("touchend", function (e) { - if (self.checkTimeout) { - clearTimeout(self.checkTimeout); - } - if (self.moving) { - self.endMove(e); - self.touchMove = false; - } - }); -}; - -MoveRows.prototype._bindMouseMove = function () { - var self = this; - - self.table.rowManager.getDisplayRows().forEach(function (row) { - if ((row.type === "row" || row.type === "group") && row.modules.moveRow.mousemove) { - row.getElement().addEventListener("mousemove", row.modules.moveRow.mousemove); - } - }); -}; - -MoveRows.prototype._unbindMouseMove = function () { - var self = this; - - self.table.rowManager.getDisplayRows().forEach(function (row) { - if ((row.type === "row" || row.type === "group") && row.modules.moveRow.mousemove) { - row.getElement().removeEventListener("mousemove", row.modules.moveRow.mousemove); - } - }); -}; - -MoveRows.prototype.startMove = function (e, row) { - var element = row.getElement(); - - this.setStartPosition(e, row); - - this.moving = row; - - this.table.element.classList.add("tabulator-block-select"); - - //create placeholder - this.placeholderElement.style.width = row.getWidth() + "px"; - this.placeholderElement.style.height = row.getHeight() + "px"; - - if (!this.connection) { - element.parentNode.insertBefore(this.placeholderElement, element); - element.parentNode.removeChild(element); - } else { - this.table.element.classList.add("tabulator-movingrow-sending"); - this.connectToTables(row); - } - - //create hover element - this.hoverElement = element.cloneNode(true); - this.hoverElement.classList.add("tabulator-moving"); - - if (this.connection) { - document.body.appendChild(this.hoverElement); - this.hoverElement.style.left = "0"; - this.hoverElement.style.top = "0"; - this.hoverElement.style.width = this.table.element.clientWidth + "px"; - this.hoverElement.style.whiteSpace = "nowrap"; - this.hoverElement.style.overflow = "hidden"; - this.hoverElement.style.pointerEvents = "none"; - } else { - this.table.rowManager.getTableElement().appendChild(this.hoverElement); - - this.hoverElement.style.left = "0"; - this.hoverElement.style.top = "0"; - - this._bindMouseMove(); - } - - document.body.addEventListener("mousemove", this.moveHover); - document.body.addEventListener("mouseup", this.endMove); - - this.moveHover(e); -}; - -MoveRows.prototype.setStartPosition = function (e, row) { - var pageX = this.touchMove ? e.touches[0].pageX : e.pageX, - pageY = this.touchMove ? e.touches[0].pageY : e.pageY, - element, - position; - - element = row.getElement(); - if (this.connection) { - position = element.getBoundingClientRect(); - - this.startX = position.left - pageX + window.pageXOffset; - this.startY = position.top - pageY + window.pageYOffset; - } else { - this.startY = pageY - element.getBoundingClientRect().top; - } -}; - -MoveRows.prototype.endMove = function (e) { - if (!e || e.which === 1 || this.touchMove) { - this._unbindMouseMove(); - - if (!this.connection) { - this.placeholderElement.parentNode.insertBefore(this.moving.getElement(), this.placeholderElement.nextSibling); - this.placeholderElement.parentNode.removeChild(this.placeholderElement); - } - - this.hoverElement.parentNode.removeChild(this.hoverElement); - - this.table.element.classList.remove("tabulator-block-select"); - - if (this.toRow) { - this.table.rowManager.moveRow(this.moving, this.toRow, this.toRowAfter); - } - - this.moving = false; - this.toRow = false; - this.toRowAfter = false; - - document.body.removeEventListener("mousemove", this.moveHover); - document.body.removeEventListener("mouseup", this.endMove); - - if (this.connection) { - this.table.element.classList.remove("tabulator-movingrow-sending"); - this.disconnectFromTables(); - } - } -}; - -MoveRows.prototype.moveRow = function (row, after) { - this.toRow = row; - this.toRowAfter = after; -}; - -MoveRows.prototype.moveHover = function (e) { - if (this.connection) { - this.moveHoverConnections.call(this, e); - } else { - this.moveHoverTable.call(this, e); - } -}; - -MoveRows.prototype.moveHoverTable = function (e) { - var rowHolder = this.table.rowManager.getElement(), - scrollTop = rowHolder.scrollTop, - yPos = (this.touchMove ? e.touches[0].pageY : e.pageY) - rowHolder.getBoundingClientRect().top + scrollTop, - scrollPos; - - this.hoverElement.style.top = yPos - this.startY + "px"; -}; - -MoveRows.prototype.moveHoverConnections = function (e) { - this.hoverElement.style.left = this.startX + (this.touchMove ? e.touches[0].pageX : e.pageX) + "px"; - this.hoverElement.style.top = this.startY + (this.touchMove ? e.touches[0].pageY : e.pageY) + "px"; -}; - -MoveRows.prototype.elementRowDrop = function (e, element, row) { - if (this.table.options.movableRowsElementDrop) { - this.table.options.movableRowsElementDrop(e, element, row ? row.getComponent() : false); - } -}; - -//establish connection with other tables -MoveRows.prototype.connectToTables = function (row) { - var _this74 = this; - - var connectionTables; - - if (this.connectionSelectorsTables) { - connectionTables = this.table.modules.comms.getConnections(this.connectionSelectorsTables); - - this.table.options.movableRowsSendingStart.call(this.table, connectionTables); - - this.table.modules.comms.send(this.connectionSelectorsTables, "moveRow", "connect", { - row: row - }); - } - - if (this.connectionSelectorsElements) { - - this.connectionElements = []; - - if (!Array.isArray(this.connectionSelectorsElements)) { - this.connectionSelectorsElements = [this.connectionSelectorsElements]; - } - - this.connectionSelectorsElements.forEach(function (query) { - if (typeof query === "string") { - _this74.connectionElements = _this74.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(query))); - } else { - _this74.connectionElements.push(query); - } - }); - - this.connectionElements.forEach(function (element) { - var dropEvent = function dropEvent(e) { - _this74.elementRowDrop(e, element, _this74.moving); - }; - - element.addEventListener("mouseup", dropEvent); - element.tabulatorElementDropEvent = dropEvent; - - element.classList.add("tabulator-movingrow-receiving"); - }); - } -}; - -//disconnect from other tables -MoveRows.prototype.disconnectFromTables = function () { - var connectionTables; - - if (this.connectionSelectorsTables) { - connectionTables = this.table.modules.comms.getConnections(this.connectionSelectorsTables); - - this.table.options.movableRowsSendingStop.call(this.table, connectionTables); - - this.table.modules.comms.send(this.connectionSelectorsTables, "moveRow", "disconnect"); - } - - this.connectionElements.forEach(function (element) { - element.classList.remove("tabulator-movingrow-receiving"); - element.removeEventListener("mouseup", element.tabulatorElementDropEvent); - delete element.tabulatorElementDropEvent; - }); -}; - -//accept incomming connection -MoveRows.prototype.connect = function (table, row) { - var self = this; - if (!this.connectedTable) { - this.connectedTable = table; - this.connectedRow = row; - - this.table.element.classList.add("tabulator-movingrow-receiving"); - - self.table.rowManager.getDisplayRows().forEach(function (row) { - if (row.type === "row" && row.modules.moveRow && row.modules.moveRow.mouseup) { - row.getElement().addEventListener("mouseup", row.modules.moveRow.mouseup); - } - }); - - self.tableRowDropEvent = self.tableRowDrop.bind(self); - - self.table.element.addEventListener("mouseup", self.tableRowDropEvent); - - this.table.options.movableRowsReceivingStart.call(this.table, row, table); - - return true; - } else { - console.warn("Move Row Error - Table cannot accept connection, already connected to table:", this.connectedTable); - return false; - } -}; - -//close incomming connection -MoveRows.prototype.disconnect = function (table) { - var self = this; - if (table === this.connectedTable) { - this.connectedTable = false; - this.connectedRow = false; - - this.table.element.classList.remove("tabulator-movingrow-receiving"); - - self.table.rowManager.getDisplayRows().forEach(function (row) { - if (row.type === "row" && row.modules.moveRow && row.modules.moveRow.mouseup) { - row.getElement().removeEventListener("mouseup", row.modules.moveRow.mouseup); - } - }); - - self.table.element.removeEventListener("mouseup", self.tableRowDropEvent); - - this.table.options.movableRowsReceivingStop.call(this.table, table); - } else { - console.warn("Move Row Error - trying to disconnect from non connected table"); - } -}; - -MoveRows.prototype.dropComplete = function (table, row, success) { - var sender = false; - - if (success) { - - switch (_typeof(this.table.options.movableRowsSender)) { - case "string": - sender = this.senders[this.table.options.movableRowsSender]; - break; - - case "function": - sender = this.table.options.movableRowsSender; - break; - } - - if (sender) { - sender.call(this, this.moving.getComponent(), row ? row.getComponent() : undefined, table); - } else { - if (this.table.options.movableRowsSender) { - console.warn("Mover Row Error - no matching sender found:", this.table.options.movableRowsSender); - } - } - - this.table.options.movableRowsSent.call(this.table, this.moving.getComponent(), row ? row.getComponent() : undefined, table); - } else { - this.table.options.movableRowsSentFailed.call(this.table, this.moving.getComponent(), row ? row.getComponent() : undefined, table); - } - - this.endMove(); -}; - -MoveRows.prototype.tableRowDrop = function (e, row) { - var receiver = false, - success = false; - - console.trace("drop"); - - e.stopImmediatePropagation(); - - switch (_typeof(this.table.options.movableRowsReceiver)) { - case "string": - receiver = this.receivers[this.table.options.movableRowsReceiver]; - break; - - case "function": - receiver = this.table.options.movableRowsReceiver; - break; - } - - if (receiver) { - success = receiver.call(this, this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable); - } else { - console.warn("Mover Row Error - no matching receiver found:", this.table.options.movableRowsReceiver); - } - - if (success) { - this.table.options.movableRowsReceived.call(this.table, this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable); - } else { - this.table.options.movableRowsReceivedFailed.call(this.table, this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable); - } - - this.table.modules.comms.send(this.connectedTable, "moveRow", "dropcomplete", { - row: row, - success: success - }); -}; - -MoveRows.prototype.receivers = { - insert: function insert(fromRow, toRow, fromTable) { - this.table.addRow(fromRow.getData(), undefined, toRow); - return true; - }, - - add: function add(fromRow, toRow, fromTable) { - this.table.addRow(fromRow.getData()); - return true; - }, - - update: function update(fromRow, toRow, fromTable) { - if (toRow) { - toRow.update(fromRow.getData()); - return true; - } - - return false; - }, - - replace: function replace(fromRow, toRow, fromTable) { - if (toRow) { - this.table.addRow(fromRow.getData(), undefined, toRow); - toRow.delete(); - return true; - } - - return false; - } -}; - -MoveRows.prototype.senders = { - delete: function _delete(fromRow, toRow, toTable) { - fromRow.delete(); - } -}; - -MoveRows.prototype.commsReceived = function (table, action, data) { - switch (action) { - case "connect": - return this.connect(table, data.row); - break; - - case "disconnect": - return this.disconnect(table); - break; - - case "dropcomplete": - return this.dropComplete(table, data.row, data.success); - break; - } -}; - -Tabulator.prototype.registerModule("moveRow", MoveRows); -var Mutator = function Mutator(table) { - this.table = table; //hold Tabulator object - this.allowedTypes = ["", "data", "edit", "clipboard"]; //list of muatation types - this.enabled = true; -}; - -//initialize column mutator -Mutator.prototype.initializeColumn = function (column) { - var self = this, - match = false, - config = {}; - - this.allowedTypes.forEach(function (type) { - var key = "mutator" + (type.charAt(0).toUpperCase() + type.slice(1)), - mutator; - - if (column.definition[key]) { - mutator = self.lookupMutator(column.definition[key]); - - if (mutator) { - match = true; - - config[key] = { - mutator: mutator, - params: column.definition[key + "Params"] || {} - }; - } - } - }); - - if (match) { - column.modules.mutate = config; - } -}; - -Mutator.prototype.lookupMutator = function (value) { - var mutator = false; - - //set column mutator - switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { - case "string": - if (this.mutators[value]) { - mutator = this.mutators[value]; - } else { - console.warn("Mutator Error - No such mutator found, ignoring: ", value); - } - break; - - case "function": - mutator = value; - break; - } - - return mutator; -}; - -//apply mutator to row -Mutator.prototype.transformRow = function (data, type, updatedData) { - var self = this, - key = "mutator" + (type.charAt(0).toUpperCase() + type.slice(1)), - value; - - if (this.enabled) { - - self.table.columnManager.traverse(function (column) { - var mutator, params, component; - - if (column.modules.mutate) { - mutator = column.modules.mutate[key] || column.modules.mutate.mutator || false; - - if (mutator) { - value = column.getFieldValue(typeof updatedData !== "undefined" ? updatedData : data); - - if (type == "data" || typeof value !== "undefined") { - component = column.getComponent(); - params = typeof mutator.params === "function" ? mutator.params(value, data, type, component) : mutator.params; - column.setFieldValue(data, mutator.mutator(value, data, type, params, component)); - } - } - } - }); - } - - return data; -}; - -//apply mutator to new cell value -Mutator.prototype.transformCell = function (cell, value) { - var mutator = cell.column.modules.mutate.mutatorEdit || cell.column.modules.mutate.mutator || false, - tempData = {}; - - if (mutator) { - tempData = Object.assign(tempData, cell.row.getData()); - cell.column.setFieldValue(tempData, value); - return mutator.mutator(value, tempData, "edit", mutator.params, cell.getComponent()); - } else { - return value; - } -}; - -Mutator.prototype.enable = function () { - this.enabled = true; -}; - -Mutator.prototype.disable = function () { - this.enabled = false; -}; - -//default mutators -Mutator.prototype.mutators = {}; - -Tabulator.prototype.registerModule("mutator", Mutator); -var Page = function Page(table) { - - this.table = table; //hold Tabulator object - - this.mode = "local"; - this.progressiveLoad = false; - - this.size = 0; - this.page = 1; - this.count = 5; - this.max = 1; - - this.displayIndex = 0; //index in display pipeline - - this.initialLoad = true; - - this.pageSizes = []; - - this.dataReceivedNames = {}; - this.dataSentNames = {}; - - this.createElements(); -}; - -Page.prototype.createElements = function () { - - var button; - - this.element = document.createElement("span"); - this.element.classList.add("tabulator-paginator"); - - this.pagesElement = document.createElement("span"); - this.pagesElement.classList.add("tabulator-pages"); - - button = document.createElement("button"); - button.classList.add("tabulator-page"); - button.setAttribute("type", "button"); - button.setAttribute("role", "button"); - button.setAttribute("aria-label", ""); - button.setAttribute("title", ""); - - this.firstBut = button.cloneNode(true); - this.firstBut.setAttribute("data-page", "first"); - - this.prevBut = button.cloneNode(true); - this.prevBut.setAttribute("data-page", "prev"); - - this.nextBut = button.cloneNode(true); - this.nextBut.setAttribute("data-page", "next"); - - this.lastBut = button.cloneNode(true); - this.lastBut.setAttribute("data-page", "last"); - - if (this.table.options.paginationSizeSelector) { - this.pageSizeSelect = document.createElement("select"); - this.pageSizeSelect.classList.add("tabulator-page-size"); - } -}; - -Page.prototype.generatePageSizeSelectList = function () { - var _this75 = this; - - var pageSizes = []; - - if (this.pageSizeSelect) { - - if (Array.isArray(this.table.options.paginationSizeSelector)) { - pageSizes = this.table.options.paginationSizeSelector; - this.pageSizes = pageSizes; - - if (this.pageSizes.indexOf(this.size) == -1) { - pageSizes.unshift(this.size); - } - } else { - - if (this.pageSizes.indexOf(this.size) == -1) { - pageSizes = []; - - for (var _i13 = 1; _i13 < 5; _i13++) { - pageSizes.push(this.size * _i13); - } - - this.pageSizes = pageSizes; - } else { - pageSizes = this.pageSizes; - } - } - - while (this.pageSizeSelect.firstChild) { - this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild); - }pageSizes.forEach(function (item) { - var itemEl = document.createElement("option"); - itemEl.value = item; - - if (item === true) { - _this75.table.modules.localize.bind("pagination|all", function (value) { - itemEl.innerHTML = value; - }); - } else { - itemEl.innerHTML = item; - } - - _this75.pageSizeSelect.appendChild(itemEl); - }); - - this.pageSizeSelect.value = this.size; - } -}; - -//setup pageination -Page.prototype.initialize = function (hidden) { - var self = this, - pageSelectLabel, - testElRow, - testElCell; - - //update param names - this.dataSentNames = Object.assign({}, this.paginationDataSentNames); - this.dataSentNames = Object.assign(this.dataSentNames, this.table.options.paginationDataSent); - - this.dataReceivedNames = Object.assign({}, this.paginationDataReceivedNames); - this.dataReceivedNames = Object.assign(this.dataReceivedNames, this.table.options.paginationDataReceived); - - //build pagination element - - //bind localizations - self.table.modules.localize.bind("pagination|first", function (value) { - self.firstBut.innerHTML = value; - }); - - self.table.modules.localize.bind("pagination|first_title", function (value) { - self.firstBut.setAttribute("aria-label", value); - self.firstBut.setAttribute("title", value); - }); - - self.table.modules.localize.bind("pagination|prev", function (value) { - self.prevBut.innerHTML = value; - }); - - self.table.modules.localize.bind("pagination|prev_title", function (value) { - self.prevBut.setAttribute("aria-label", value); - self.prevBut.setAttribute("title", value); - }); - - self.table.modules.localize.bind("pagination|next", function (value) { - self.nextBut.innerHTML = value; - }); - - self.table.modules.localize.bind("pagination|next_title", function (value) { - self.nextBut.setAttribute("aria-label", value); - self.nextBut.setAttribute("title", value); - }); - - self.table.modules.localize.bind("pagination|last", function (value) { - self.lastBut.innerHTML = value; - }); - - self.table.modules.localize.bind("pagination|last_title", function (value) { - self.lastBut.setAttribute("aria-label", value); - self.lastBut.setAttribute("title", value); - }); - - //click bindings - self.firstBut.addEventListener("click", function () { - self.setPage(1).then(function () {}).catch(function () {}); - }); - - self.prevBut.addEventListener("click", function () { - self.previousPage().then(function () {}).catch(function () {}); - }); - - self.nextBut.addEventListener("click", function () { - self.nextPage().then(function () {}).catch(function () {}); - }); - - self.lastBut.addEventListener("click", function () { - self.setPage(self.max).then(function () {}).catch(function () {}); - }); - - if (self.table.options.paginationElement) { - self.element = self.table.options.paginationElement; - } - - if (this.pageSizeSelect) { - pageSelectLabel = document.createElement("label"); - - self.table.modules.localize.bind("pagination|page_size", function (value) { - self.pageSizeSelect.setAttribute("aria-label", value); - self.pageSizeSelect.setAttribute("title", value); - pageSelectLabel.innerHTML = value; - }); - - self.element.appendChild(pageSelectLabel); - self.element.appendChild(self.pageSizeSelect); - - self.pageSizeSelect.addEventListener("change", function (e) { - self.setPageSize(self.pageSizeSelect.value == "true" ? true : self.pageSizeSelect.value); - self.setPage(1).then(function () {}).catch(function () {}); - }); - } - - //append to DOM - self.element.appendChild(self.firstBut); - self.element.appendChild(self.prevBut); - self.element.appendChild(self.pagesElement); - self.element.appendChild(self.nextBut); - self.element.appendChild(self.lastBut); - - if (!self.table.options.paginationElement && !hidden) { - self.table.footerManager.append(self.element, self); - } - - //set default values - self.mode = self.table.options.pagination; - - if (self.table.options.paginationSize) { - self.size = self.table.options.paginationSize; - } else { - testElRow = document.createElement("div"); - testElRow.classList.add("tabulator-row"); - testElRow.style.visibility = hidden; - - testElCell = document.createElement("div"); - testElCell.classList.add("tabulator-cell"); - testElCell.innerHTML = "Page Row Test"; - - testElRow.appendChild(testElCell); - - self.table.rowManager.getTableElement().appendChild(testElRow); - - self.size = Math.floor(self.table.rowManager.getElement().clientHeight / testElRow.offsetHeight); - - self.table.rowManager.getTableElement().removeChild(testElRow); - } - - // self.page = self.table.options.paginationInitialPage || 1; - self.count = self.table.options.paginationButtonCount; - - self.generatePageSizeSelectList(); -}; - -Page.prototype.initializeProgressive = function (mode) { - this.initialize(true); - this.mode = "progressive_" + mode; - this.progressiveLoad = true; -}; - -Page.prototype.setDisplayIndex = function (index) { - this.displayIndex = index; -}; - -Page.prototype.getDisplayIndex = function () { - return this.displayIndex; -}; - -//calculate maximum page from number of rows -Page.prototype.setMaxRows = function (rowCount) { - if (!rowCount) { - this.max = 1; - } else { - this.max = this.size === true ? 1 : Math.ceil(rowCount / this.size); - } - - if (this.page > this.max) { - this.page = this.max; - } -}; - -//reset to first page without triggering action -Page.prototype.reset = function (force, columnsChanged) { - if (this.mode == "local" || force) { - this.page = 1; - } - - if (columnsChanged) { - this.initialLoad = true; - } - - return true; -}; - -//set the maxmum page -Page.prototype.setMaxPage = function (max) { - - max = parseInt(max); - - this.max = max || 1; - - if (this.page > this.max) { - this.page = this.max; - this.trigger(); - } -}; - -//set current page number -Page.prototype.setPage = function (page) { - var _this76 = this; - - var self = this; - - switch (page) { - case "first": - return this.setPage(1); - break; - - case "prev": - return this.previousPage(); - break; - - case "next": - return this.nextPage(); - break; - - case "last": - return this.setPage(this.max); - break; - } - - return new Promise(function (resolve, reject) { - - page = parseInt(page); - - if (page > 0 && page <= _this76.max) { - _this76.page = page; - _this76.trigger().then(function () { - resolve(); - }).catch(function () { - reject(); - }); - - if (self.table.options.persistence && self.table.modExists("persistence", true) && self.table.modules.persistence.config.page) { - self.table.modules.persistence.save("page"); - } - } else { - console.warn("Pagination Error - Requested page is out of range of 1 - " + _this76.max + ":", page); - reject(); - } - }); -}; - -Page.prototype.setPageToRow = function (row) { - var _this77 = this; - - return new Promise(function (resolve, reject) { - - var rows = _this77.table.rowManager.getDisplayRows(_this77.displayIndex - 1); - var index = rows.indexOf(row); - - if (index > -1) { - var page = _this77.size === true ? 1 : Math.ceil((index + 1) / _this77.size); - - _this77.setPage(page).then(function () { - resolve(); - }).catch(function () { - reject(); - }); - } else { - console.warn("Pagination Error - Requested row is not visible"); - reject(); - } - }); -}; - -Page.prototype.setPageSize = function (size) { - if (size !== true) { - size = parseInt(size); - } - - if (size > 0) { - this.size = size; - } - - if (this.pageSizeSelect) { - // this.pageSizeSelect.value = size; - this.generatePageSizeSelectList(); - } - - if (this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.page) { - this.table.modules.persistence.save("page"); - } -}; - -//setup the pagination buttons -Page.prototype._setPageButtons = function () { - var self = this; - - var leftSize = Math.floor((this.count - 1) / 2); - var rightSize = Math.ceil((this.count - 1) / 2); - var min = this.max - this.page + leftSize + 1 < this.count ? this.max - this.count + 1 : Math.max(this.page - leftSize, 1); - var max = this.page <= rightSize ? Math.min(this.count, this.max) : Math.min(this.page + rightSize, this.max); - - while (self.pagesElement.firstChild) { - self.pagesElement.removeChild(self.pagesElement.firstChild); - }if (self.page == 1) { - self.firstBut.disabled = true; - self.prevBut.disabled = true; - } else { - self.firstBut.disabled = false; - self.prevBut.disabled = false; - } - - if (self.page == self.max) { - self.lastBut.disabled = true; - self.nextBut.disabled = true; - } else { - self.lastBut.disabled = false; - self.nextBut.disabled = false; - } - - for (var _i14 = min; _i14 <= max; _i14++) { - if (_i14 > 0 && _i14 <= self.max) { - self.pagesElement.appendChild(self._generatePageButton(_i14)); - } - } - - this.footerRedraw(); -}; - -Page.prototype._generatePageButton = function (page) { - var self = this, - button = document.createElement("button"); - - button.classList.add("tabulator-page"); - if (page == self.page) { - button.classList.add("active"); - } - - button.setAttribute("type", "button"); - button.setAttribute("role", "button"); - - self.table.modules.localize.bind("pagination|page_title", function (value) { - button.setAttribute("aria-label", value + " " + page); - button.setAttribute("title", value + " " + page); - }); - - button.setAttribute("data-page", page); - button.textContent = page; - - button.addEventListener("click", function (e) { - self.setPage(page).then(function () {}).catch(function () {}); - }); - - return button; -}; - -//previous page -Page.prototype.previousPage = function () { - var _this78 = this; - - return new Promise(function (resolve, reject) { - if (_this78.page > 1) { - _this78.page--; - _this78.trigger().then(function () { - resolve(); - }).catch(function () { - reject(); - }); - - if (_this78.table.options.persistence && _this78.table.modExists("persistence", true) && _this78.table.modules.persistence.config.page) { - _this78.table.modules.persistence.save("page"); - } - } else { - console.warn("Pagination Error - Previous page would be less than page 1:", 0); - reject(); - } - }); -}; - -//next page -Page.prototype.nextPage = function () { - var _this79 = this; - - return new Promise(function (resolve, reject) { - if (_this79.page < _this79.max) { - _this79.page++; - _this79.trigger().then(function () { - resolve(); - }).catch(function () { - reject(); - }); - - if (_this79.table.options.persistence && _this79.table.modExists("persistence", true) && _this79.table.modules.persistence.config.page) { - _this79.table.modules.persistence.save("page"); - } - } else { - if (!_this79.progressiveLoad) { - console.warn("Pagination Error - Next page would be greater than maximum page of " + _this79.max + ":", _this79.max + 1); - } - reject(); - } - }); -}; - -//return current page number -Page.prototype.getPage = function () { - return this.page; -}; - -//return max page number -Page.prototype.getPageMax = function () { - return this.max; -}; - -Page.prototype.getPageSize = function (size) { - return this.size; -}; - -Page.prototype.getMode = function () { - return this.mode; -}; - -//return appropriate rows for current page -Page.prototype.getRows = function (data) { - var output, start, end; - - if (this.mode == "local") { - output = []; - - if (this.size === true) { - start = 0; - end = data.length; - } else { - start = this.size * (this.page - 1); - end = start + parseInt(this.size); - } - - this._setPageButtons(); - - for (var _i15 = start; _i15 < end; _i15++) { - if (data[_i15]) { - output.push(data[_i15]); - } - } - - return output; - } else { - - this._setPageButtons(); - - return data.slice(0); - } -}; - -Page.prototype.trigger = function () { - var _this80 = this; - - var left; - - return new Promise(function (resolve, reject) { - - switch (_this80.mode) { - case "local": - left = _this80.table.rowManager.scrollLeft; - - _this80.table.rowManager.refreshActiveData("page"); - _this80.table.rowManager.scrollHorizontal(left); - - _this80.table.options.pageLoaded.call(_this80.table, _this80.getPage()); - resolve(); - break; - - case "remote": - case "progressive_load": - case "progressive_scroll": - _this80.table.modules.ajax.blockActiveRequest(); - _this80._getRemotePage().then(function () { - resolve(); - }).catch(function () { - reject(); - }); - break; - - default: - console.warn("Pagination Error - no such pagination mode:", _this80.mode); - reject(); - } - }); -}; - -Page.prototype._getRemotePage = function () { - var _this81 = this; - - var self = this, - oldParams, - pageParams; - - return new Promise(function (resolve, reject) { - - if (!self.table.modExists("ajax", true)) { - reject(); - } - - //record old params and restore after request has been made - oldParams = Tabulator.prototype.helpers.deepClone(self.table.modules.ajax.getParams() || {}); - pageParams = self.table.modules.ajax.getParams(); - - //configure request params - pageParams[_this81.dataSentNames.page] = self.page; - - //set page size if defined - if (_this81.size) { - pageParams[_this81.dataSentNames.size] = _this81.size; - } - - //set sort data if defined - if (_this81.table.options.ajaxSorting && _this81.table.modExists("sort")) { - var sorters = self.table.modules.sort.getSort(); - - sorters.forEach(function (item) { - delete item.column; - }); - - pageParams[_this81.dataSentNames.sorters] = sorters; - } - - //set filter data if defined - if (_this81.table.options.ajaxFiltering && _this81.table.modExists("filter")) { - var filters = self.table.modules.filter.getFilters(true, true); - pageParams[_this81.dataSentNames.filters] = filters; - } - - self.table.modules.ajax.setParams(pageParams); - - self.table.modules.ajax.sendRequest(_this81.progressiveLoad).then(function (data) { - self._parseRemoteData(data); - resolve(); - }).catch(function (e) { - reject(); - }); - - self.table.modules.ajax.setParams(oldParams); - }); -}; - -Page.prototype._parseRemoteData = function (data) { - var self = this, - left, - data, - margin; - - if (typeof data[this.dataReceivedNames.last_page] === "undefined") { - console.warn("Remote Pagination Error - Server response missing '" + this.dataReceivedNames.last_page + "' property"); - } - - if (data[this.dataReceivedNames.data]) { - this.max = parseInt(data[this.dataReceivedNames.last_page]) || 1; - - if (this.progressiveLoad) { - switch (this.mode) { - case "progressive_load": - - if (this.page == 1) { - this.table.rowManager.setData(data[this.dataReceivedNames.data], false, this.initialLoad && this.page == 1); - } else { - this.table.rowManager.addRows(data[this.dataReceivedNames.data]); - } - - if (this.page < this.max) { - setTimeout(function () { - self.nextPage().then(function () {}).catch(function () {}); - }, self.table.options.ajaxProgressiveLoadDelay); - } - break; - - case "progressive_scroll": - data = this.table.rowManager.getData().concat(data[this.dataReceivedNames.data]); - - this.table.rowManager.setData(data, true, this.initialLoad && this.page == 1); - - margin = this.table.options.ajaxProgressiveLoadScrollMargin || this.table.rowManager.element.clientHeight * 2; - - if (self.table.rowManager.element.scrollHeight <= self.table.rowManager.element.clientHeight + margin) { - self.nextPage().then(function () {}).catch(function () {}); - } - break; - } - } else { - left = this.table.rowManager.scrollLeft; - - this.table.rowManager.setData(data[this.dataReceivedNames.data], false, this.initialLoad && this.page == 1); - - this.table.rowManager.scrollHorizontal(left); - - this.table.columnManager.scrollHorizontal(left); - - this.table.options.pageLoaded.call(this.table, this.getPage()); - } - - this.initialLoad = false; - } else { - console.warn("Remote Pagination Error - Server response missing '" + this.dataReceivedNames.data + "' property"); - } -}; - -//handle the footer element being redrawn -Page.prototype.footerRedraw = function () { - var footer = this.table.footerManager.element; - - if (Math.ceil(footer.clientWidth) - footer.scrollWidth < 0) { - this.pagesElement.style.display = 'none'; - } else { - this.pagesElement.style.display = ''; - - if (Math.ceil(footer.clientWidth) - footer.scrollWidth < 0) { - this.pagesElement.style.display = 'none'; - } - } -}; - -//set the paramter names for pagination requests -Page.prototype.paginationDataSentNames = { - "page": "page", - "size": "size", - "sorters": "sorters", - // "sort_dir":"sort_dir", - "filters": "filters" - // "filter_value":"filter_value", - // "filter_type":"filter_type", -}; - -//set the property names for pagination responses -Page.prototype.paginationDataReceivedNames = { - "current_page": "current_page", - "last_page": "last_page", - "data": "data" -}; - -Tabulator.prototype.registerModule("page", Page); - -var Persistence = function Persistence(table) { - this.table = table; //hold Tabulator object - this.mode = ""; - this.id = ""; - // this.persistProps = ["field", "width", "visible"]; - this.defWatcherBlock = false; - this.config = {}; - this.readFunc = false; - this.writeFunc = false; -}; - -// Test for whether localStorage is available for use. -Persistence.prototype.localStorageTest = function () { - var testKey = "_tabulator_test"; - - try { - window.localStorage.setItem(testKey, testKey); - window.localStorage.removeItem(testKey); - return true; - } catch (e) { - return false; - } -}; - -//setup parameters -Persistence.prototype.initialize = function () { - //determine persistent layout storage type - - var mode = this.table.options.persistenceMode, - id = this.table.options.persistenceID, - retreivedData; - - this.mode = mode !== true ? mode : this.localStorageTest() ? "local" : "cookie"; - - if (this.table.options.persistenceReaderFunc) { - if (typeof this.table.options.persistenceReaderFunc === "function") { - this.readFunc = this.table.options.persistenceReaderFunc; - } else { - if (this.readers[this.table.options.persistenceReaderFunc]) { - this.readFunc = this.readers[this.table.options.persistenceReaderFunc]; - } else { - console.warn("Persistence Read Error - invalid reader set", this.table.options.persistenceReaderFunc); - } - } - } else { - if (this.readers[this.mode]) { - this.readFunc = this.readers[this.mode]; - } else { - console.warn("Persistence Read Error - invalid reader set", this.mode); - } - } - - if (this.table.options.persistenceWriterFunc) { - if (typeof this.table.options.persistenceWriterFunc === "function") { - this.writeFunc = this.table.options.persistenceWriterFunc; - } else { - if (this.readers[this.table.options.persistenceWriterFunc]) { - this.writeFunc = this.readers[this.table.options.persistenceWriterFunc]; - } else { - console.warn("Persistence Write Error - invalid reader set", this.table.options.persistenceWriterFunc); - } - } - } else { - if (this.writers[this.mode]) { - this.writeFunc = this.writers[this.mode]; - } else { - console.warn("Persistence Write Error - invalid writer set", this.mode); - } - } - - //set storage tag - this.id = "tabulator-" + (id || this.table.element.getAttribute("id") || ""); - - this.config = { - sort: this.table.options.persistence === true || this.table.options.persistence.sort, - filter: this.table.options.persistence === true || this.table.options.persistence.filter, - group: this.table.options.persistence === true || this.table.options.persistence.group, - page: this.table.options.persistence === true || this.table.options.persistence.page, - columns: this.table.options.persistence === true ? ["title", "width", "visible"] : this.table.options.persistence.columns - }; - - //load pagination data if needed - if (this.config.page) { - retreivedData = this.retreiveData("page"); - - if (retreivedData) { - if (typeof retreivedData.paginationSize !== "undefined" && (this.config.page === true || this.config.page.size)) { - this.table.options.paginationSize = retreivedData.paginationSize; - } - - if (typeof retreivedData.paginationInitialPage !== "undefined" && (this.config.page === true || this.config.page.page)) { - this.table.options.paginationInitialPage = retreivedData.paginationInitialPage; - } - } - } - - //load group data if needed - if (this.config.group) { - retreivedData = this.retreiveData("group"); - - if (retreivedData) { - if (typeof retreivedData.groupBy !== "undefined" && (this.config.group === true || this.config.group.groupBy)) { - this.table.options.groupBy = retreivedData.groupBy; - } - if (typeof retreivedData.groupStartOpen !== "undefined" && (this.config.group === true || this.config.group.groupStartOpen)) { - this.table.options.groupStartOpen = retreivedData.groupStartOpen; - } - if (typeof retreivedData.groupHeader !== "undefined" && (this.config.group === true || this.config.group.groupHeader)) { - this.table.options.groupHeader = retreivedData.groupHeader; - } - } - } -}; - -Persistence.prototype.initializeColumn = function (column) { - var self = this, - def, - keys; - - if (this.config.columns) { - this.defWatcherBlock = true; - - def = column.getDefinition(); - - keys = this.config.columns === true ? Object.keys(def) : this.config.columns; - - keys.forEach(function (key) { - var props = Object.getOwnPropertyDescriptor(def, key); - var value = def[key]; - if (props) { - Object.defineProperty(def, key, { - set: function set(newValue) { - value = newValue; - - if (!self.defWatcherBlock) { - self.save("columns"); - } - - if (props.set) { - props.set(newValue); - } - }, - get: function get() { - if (props.get) { - props.get(); - } - return value; - } - }); - } - }); - - this.defWatcherBlock = false; - } -}; - -//load saved definitions -Persistence.prototype.load = function (type, current) { - var data = this.retreiveData(type); - - if (current) { - data = data ? this.mergeDefinition(current, data) : current; - } - - return data; -}; - -//retreive data from memory -Persistence.prototype.retreiveData = function (type) { - return this.readFunc ? this.readFunc(this.id, type) : false; -}; - -//merge old and new column definitions -Persistence.prototype.mergeDefinition = function (oldCols, newCols) { - var self = this, - output = []; - - // oldCols = oldCols || []; - newCols = newCols || []; - - newCols.forEach(function (column, to) { - - var from = self._findColumn(oldCols, column), - keys; - - if (from) { - - if (self.config.columns === true || self.config.columns == undefined) { - keys = Object.keys(from); - keys.push("width"); - } else { - keys = self.config.columns; - } - - keys.forEach(function (key) { - if (typeof column[key] !== "undefined") { - from[key] = column[key]; - } - }); - - if (from.columns) { - from.columns = self.mergeDefinition(from.columns, column.columns); - } - - output.push(from); - } - }); - - oldCols.forEach(function (column, i) { - var from = self._findColumn(newCols, column); - if (!from) { - if (output.length > i) { - output.splice(i, 0, column); - } else { - output.push(column); - } - } - }); - - return output; -}; - -//find matching columns -Persistence.prototype._findColumn = function (columns, subject) { - var type = subject.columns ? "group" : subject.field ? "field" : "object"; - - return columns.find(function (col) { - switch (type) { - case "group": - return col.title === subject.title && col.columns.length === subject.columns.length; - break; - - case "field": - return col.field === subject.field; - break; - - case "object": - return col === subject; - break; - } - }); -}; - -//save data -Persistence.prototype.save = function (type) { - var data = {}; - - switch (type) { - case "columns": - data = this.parseColumns(this.table.columnManager.getColumns()); - break; - - case "filter": - data = this.table.modules.filter.getFilters(); - break; - - case "sort": - data = this.validateSorters(this.table.modules.sort.getSort()); - break; - - case "group": - data = this.getGroupConfig(); - break; - - case "page": - data = this.getPageConfig(); - break; - } - - if (this.writeFunc) { - this.writeFunc(this.id, type, data); - } -}; - -//ensure sorters contain no function data -Persistence.prototype.validateSorters = function (data) { - data.forEach(function (item) { - item.column = item.field; - delete item.field; - }); - - return data; -}; - -Persistence.prototype.getGroupConfig = function () { - var data = {}; - - if (this.config.group) { - if (this.config.group === true || this.config.group.groupBy) { - data.groupBy = this.table.options.groupBy; - } - - if (this.config.group === true || this.config.group.groupStartOpen) { - data.groupStartOpen = this.table.options.groupStartOpen; - } - - if (this.config.group === true || this.config.group.groupHeader) { - data.groupHeader = this.table.options.groupHeader; - } - } - - return data; -}; - -Persistence.prototype.getPageConfig = function () { - var data = {}; - - if (this.config.page) { - if (this.config.page === true || this.config.page.size) { - data.paginationSize = this.table.modules.page.getPageSize(); - } - - if (this.config.page === true || this.config.page.page) { - data.paginationInitialPage = this.table.modules.page.getPage(); - } - } - - return data; -}; - -//parse columns for data to store -Persistence.prototype.parseColumns = function (columns) { - var self = this, - definitions = [], - excludedKeys = ["headerContextMenu", "headerMenu", "contextMenu", "clickMenu"]; - - columns.forEach(function (column) { - var defStore = {}, - colDef = column.getDefinition(), - keys; - - if (column.isGroup) { - defStore.title = colDef.title; - defStore.columns = self.parseColumns(column.getColumns()); - } else { - defStore.field = column.getField(); - - if (self.config.columns === true || self.config.columns == undefined) { - keys = Object.keys(colDef); - keys.push("width"); - } else { - keys = self.config.columns; - } - - keys.forEach(function (key) { - - switch (key) { - case "width": - defStore.width = column.getWidth(); - break; - case "visible": - defStore.visible = column.visible; - break; - - default: - if (typeof colDef[key] !== "function" && excludedKeys.indexOf(key) === -1) { - defStore[key] = colDef[key]; - } - } - }); - } - - definitions.push(defStore); - }); - - return definitions; -}; - -// read peristence information from storage -Persistence.prototype.readers = { - local: function local(id, type) { - var data = localStorage.getItem(id + "-" + type); - - return data ? JSON.parse(data) : false; - }, - cookie: function cookie(id, type) { - var cookie = document.cookie, - key = id + "-" + type, - cookiePos = cookie.indexOf(key + "="), - end, - data; - - //if cookie exists, decode and load column data into tabulator - if (cookiePos > -1) { - cookie = cookie.substr(cookiePos); - - end = cookie.indexOf(";"); - - if (end > -1) { - cookie = cookie.substr(0, end); - } - - data = cookie.replace(key + "=", ""); - } - - return data ? JSON.parse(data) : false; - } -}; - -//write persistence information to storage -Persistence.prototype.writers = { - local: function local(id, type, data) { - localStorage.setItem(id + "-" + type, JSON.stringify(data)); - }, - cookie: function cookie(id, type, data) { - var expireDate = new Date(); - - expireDate.setDate(expireDate.getDate() + 10000); - - document.cookie = id + "-" + type + "=" + JSON.stringify(data) + "; expires=" + expireDate.toUTCString(); - } -}; - -Tabulator.prototype.registerModule("persistence", Persistence); - -var Print = function Print(table) { - this.table = table; //hold Tabulator object - this.element = false; - this.manualBlock = false; -}; - -Print.prototype.initialize = function () { - window.addEventListener("beforeprint", this.replaceTable.bind(this)); - window.addEventListener("afterprint", this.cleanup.bind(this)); -}; - -Print.prototype.replaceTable = function () { - if (!this.manualBlock) { - this.element = document.createElement("div"); - this.element.classList.add("tabulator-print-table"); - - this.element.appendChild(this.table.modules.export.genereateTable(this.table.options.printConfig, this.table.options.printStyled, this.table.options.printRowRange, "print")); - - this.table.element.style.display = "none"; - - this.table.element.parentNode.insertBefore(this.element, this.table.element); - } -}; - -Print.prototype.cleanup = function () { - document.body.classList.remove("tabulator-print-fullscreen-hide"); - - if (this.element && this.element.parentNode) { - this.element.parentNode.removeChild(this.element); - this.table.element.style.display = ""; - } -}; - -Print.prototype.printFullscreen = function (visible, style, config) { - var scrollX = window.scrollX, - scrollY = window.scrollY, - headerEl = document.createElement("div"), - footerEl = document.createElement("div"), - tableEl = this.table.modules.export.genereateTable(typeof config != "undefined" ? config : this.table.options.printConfig, typeof style != "undefined" ? style : this.table.options.printStyled, visible, "print"), - headerContent, - footerContent; - - this.manualBlock = true; - - this.element = document.createElement("div"); - this.element.classList.add("tabulator-print-fullscreen"); - - if (this.table.options.printHeader) { - headerEl.classList.add("tabulator-print-header"); - - headerContent = typeof this.table.options.printHeader == "function" ? this.table.options.printHeader.call(this.table) : this.table.options.printHeader; - - if (typeof headerContent == "string") { - headerEl.innerHTML = headerContent; - } else { - headerEl.appendChild(headerContent); - } - - this.element.appendChild(headerEl); - } - - this.element.appendChild(tableEl); - - if (this.table.options.printFooter) { - footerEl.classList.add("tabulator-print-footer"); - - footerContent = typeof this.table.options.printFooter == "function" ? this.table.options.printFooter.call(this.table) : this.table.options.printFooter; - - if (typeof footerContent == "string") { - footerEl.innerHTML = footerContent; - } else { - footerEl.appendChild(footerContent); - } - - this.element.appendChild(footerEl); - } - - document.body.classList.add("tabulator-print-fullscreen-hide"); - document.body.appendChild(this.element); - - if (this.table.options.printFormatter) { - this.table.options.printFormatter(this.element, tableEl); - } - - window.print(); - - this.cleanup(); - - window.scrollTo(scrollX, scrollY); - - this.manualBlock = false; -}; - -Tabulator.prototype.registerModule("print", Print); -var ReactiveData = function ReactiveData(table) { - this.table = table; //hold Tabulator object - this.data = false; - this.blocked = false; //block reactivity while performing update - this.origFuncs = {}; // hold original data array functions to allow replacement after data is done with - this.currentVersion = 0; -}; - -ReactiveData.prototype.watchData = function (data) { - var self = this, - pushFunc, - version; - - this.currentVersion++; - - version = this.currentVersion; - - self.unwatchData(); - - self.data = data; - - //override array push function - self.origFuncs.push = data.push; - - Object.defineProperty(self.data, "push", { - enumerable: false, - configurable: true, - value: function value() { - var args = Array.from(arguments); - - if (!self.blocked && version === self.currentVersion) { - args.forEach(function (arg) { - self.table.rowManager.addRowActual(arg, false); - }); - } - - return self.origFuncs.push.apply(data, arguments); - } - }); - - //override array unshift function - self.origFuncs.unshift = data.unshift; - - Object.defineProperty(self.data, "unshift", { - enumerable: false, - configurable: true, - value: function value() { - var args = Array.from(arguments); - - if (!self.blocked && version === self.currentVersion) { - args.forEach(function (arg) { - self.table.rowManager.addRowActual(arg, true); - }); - } - - return self.origFuncs.unshift.apply(data, arguments); - } - }); - - //override array shift function - self.origFuncs.shift = data.shift; - - Object.defineProperty(self.data, "shift", { - enumerable: false, - configurable: true, - value: function value() { - var row; - - if (!self.blocked && version === self.currentVersion) { - if (self.data.length) { - row = self.table.rowManager.getRowFromDataObject(self.data[0]); - - if (row) { - row.deleteActual(); - } - } - } - - return self.origFuncs.shift.call(data); - } - }); - - //override array pop function - self.origFuncs.pop = data.pop; - - Object.defineProperty(self.data, "pop", { - enumerable: false, - configurable: true, - value: function value() { - var row; - if (!self.blocked && version === self.currentVersion) { - if (self.data.length) { - row = self.table.rowManager.getRowFromDataObject(self.data[self.data.length - 1]); - - if (row) { - row.deleteActual(); - } - } - } - return self.origFuncs.pop.call(data); - } - }); - - //override array splice function - self.origFuncs.splice = data.splice; - - Object.defineProperty(self.data, "splice", { - enumerable: false, - configurable: true, - value: function value() { - var args = Array.from(arguments), - start = args[0] < 0 ? data.length + args[0] : args[0], - end = args[1], - newRows = args[2] ? args.slice(2) : false, - startRow; - - if (!self.blocked && version === self.currentVersion) { - - //add new rows - if (newRows) { - startRow = data[start] ? self.table.rowManager.getRowFromDataObject(data[start]) : false; - - if (startRow) { - newRows.forEach(function (rowData) { - self.table.rowManager.addRowActual(rowData, true, startRow, true); - }); - } else { - newRows = newRows.slice().reverse(); - - newRows.forEach(function (rowData) { - self.table.rowManager.addRowActual(rowData, true, false, true); - }); - } - } - - //delete removed rows - if (end !== 0) { - var oldRows = data.slice(start, typeof args[1] === "undefined" ? args[1] : start + end); - - oldRows.forEach(function (rowData, i) { - var row = self.table.rowManager.getRowFromDataObject(rowData); - - if (row) { - row.deleteActual(i !== oldRows.length - 1); - } - }); - } - - if (newRows || end !== 0) { - self.table.rowManager.reRenderInPosition(); - } - } - - return self.origFuncs.splice.apply(data, arguments); - } - }); -}; - -ReactiveData.prototype.unwatchData = function () { - if (this.data !== false) { - for (var key in this.origFuncs) { - Object.defineProperty(this.data, key, { - enumerable: true, - configurable: true, - writable: true, - value: this.origFuncs.key - }); - } - } -}; - -ReactiveData.prototype.watchRow = function (row) { - var data = row.getData(); - - this.blocked = true; - - for (var key in data) { - this.watchKey(row, data, key); - } - - if (this.table.options.dataTree) { - this.watchTreeChildren(row); - } - - this.blocked = false; -}; - -ReactiveData.prototype.watchTreeChildren = function (row) { - var self = this, - childField = row.getData()[this.table.options.dataTreeChildField], - origFuncs = {}; - - function rebuildTree() { - self.table.modules.dataTree.initializeRow(row); - self.table.modules.dataTree.layoutRow(row); - self.table.rowManager.refreshActiveData("tree", false, true); - } - - if (childField) { - - origFuncs.push = childField.push; - - Object.defineProperty(childField, "push", { - enumerable: false, - configurable: true, - value: function value() { - var result = origFuncs.push.apply(childField, arguments); - - rebuildTree(); - - return result; - } - }); - - origFuncs.unshift = childField.unshift; - - Object.defineProperty(childField, "unshift", { - enumerable: false, - configurable: true, - value: function value() { - var result = origFuncs.unshift.apply(childField, arguments); - - rebuildTree(); - - return result; - } - }); - - origFuncs.shift = childField.shift; - - Object.defineProperty(childField, "shift", { - enumerable: false, - configurable: true, - value: function value() { - var result = origFuncs.shift.call(childField); - - rebuildTree(); - - return result; - } - }); - - origFuncs.pop = childField.pop; - - Object.defineProperty(childField, "pop", { - enumerable: false, - configurable: true, - value: function value() { - var result = origFuncs.pop.call(childField); - - rebuildTree(); - - return result; - } - }); - - origFuncs.splice = childField.splice; - - Object.defineProperty(childField, "splice", { - enumerable: false, - configurable: true, - value: function value() { - var result = origFuncs.splice.apply(childField, arguments); - - rebuildTree(); - - return result; - } - }); - } -}; - -ReactiveData.prototype.watchKey = function (row, data, key) { - var self = this, - props = Object.getOwnPropertyDescriptor(data, key), - value = data[key], - version = this.currentVersion; - - Object.defineProperty(data, key, { - set: function set(newValue) { - value = newValue; - if (!self.blocked && version === self.currentVersion) { - var update = {}; - update[key] = newValue; - row.updateData(update); - } - - if (props.set) { - props.set(newValue); - } - }, - get: function get() { - - if (props.get) { - props.get(); - } - - return value; - } - }); -}; - -ReactiveData.prototype.unwatchRow = function (row) { - var data = row.getData(); - - for (var key in data) { - Object.defineProperty(data, key, { - value: data[key] - }); - } -}; - -ReactiveData.prototype.block = function () { - this.blocked = true; -}; - -ReactiveData.prototype.unblock = function () { - this.blocked = false; -}; - -Tabulator.prototype.registerModule("reactiveData", ReactiveData); - -var ResizeColumns = function ResizeColumns(table) { - this.table = table; //hold Tabulator object - this.startColumn = false; - this.startX = false; - this.startWidth = false; - this.handle = null; - this.prevHandle = null; -}; - -ResizeColumns.prototype.initializeColumn = function (type, column, element) { - var self = this, - variableHeight = false, - mode = this.table.options.resizableColumns; - - //set column resize mode - if (type === "header") { - variableHeight = column.definition.formatter == "textarea" || column.definition.variableHeight; - column.modules.resize = { variableHeight: variableHeight }; - } - - if (mode === true || mode == type) { - - var handle = document.createElement('div'); - handle.className = "tabulator-col-resize-handle"; - - var prevHandle = document.createElement('div'); - prevHandle.className = "tabulator-col-resize-handle prev"; - - handle.addEventListener("click", function (e) { - e.stopPropagation(); - }); - - var handleDown = function handleDown(e) { - var nearestColumn = column.getLastColumn(); - - if (nearestColumn && self._checkResizability(nearestColumn)) { - self.startColumn = column; - self._mouseDown(e, nearestColumn, handle); - } - }; - - handle.addEventListener("mousedown", handleDown); - handle.addEventListener("touchstart", handleDown, { passive: true }); - - //reszie column on double click - handle.addEventListener("dblclick", function (e) { - var col = column.getLastColumn(); - - if (col && self._checkResizability(col)) { - e.stopPropagation(); - col.reinitializeWidth(true); - } - }); - - prevHandle.addEventListener("click", function (e) { - e.stopPropagation(); - }); - - var prevHandleDown = function prevHandleDown(e) { - var nearestColumn, colIndex, prevColumn; - - nearestColumn = column.getFirstColumn(); - - if (nearestColumn) { - colIndex = self.table.columnManager.findColumnIndex(nearestColumn); - prevColumn = colIndex > 0 ? self.table.columnManager.getColumnByIndex(colIndex - 1) : false; - - if (prevColumn && self._checkResizability(prevColumn)) { - self.startColumn = column; - self._mouseDown(e, prevColumn, prevHandle); - } - } - }; - - prevHandle.addEventListener("mousedown", prevHandleDown); - prevHandle.addEventListener("touchstart", prevHandleDown, { passive: true }); - - //resize column on double click - prevHandle.addEventListener("dblclick", function (e) { - var nearestColumn, colIndex, prevColumn; - - nearestColumn = column.getFirstColumn(); - - if (nearestColumn) { - colIndex = self.table.columnManager.findColumnIndex(nearestColumn); - prevColumn = colIndex > 0 ? self.table.columnManager.getColumnByIndex(colIndex - 1) : false; - - if (prevColumn && self._checkResizability(prevColumn)) { - e.stopPropagation(); - prevColumn.reinitializeWidth(true); - } - } - }); - - element.appendChild(handle); - element.appendChild(prevHandle); - } -}; - -ResizeColumns.prototype._checkResizability = function (column) { - return typeof column.definition.resizable != "undefined" ? column.definition.resizable : this.table.options.resizableColumns; -}; - -ResizeColumns.prototype._mouseDown = function (e, column, handle) { - var self = this; - - self.table.element.classList.add("tabulator-block-select"); - - function mouseMove(e) { - // self.table.columnManager.tempScrollBlock(); - - if (self.table.rtl) { - column.setWidth(self.startWidth - ((typeof e.screenX === "undefined" ? e.touches[0].screenX : e.screenX) - self.startX)); - } else { - column.setWidth(self.startWidth + ((typeof e.screenX === "undefined" ? e.touches[0].screenX : e.screenX) - self.startX)); - } - - if (self.table.options.virtualDomHoz) { - self.table.vdomHoz.reinitialize(true); - } - - if (!self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight) { - column.checkCellHeights(); - } - } - - function mouseUp(e) { - - //block editor from taking action while resizing is taking place - if (self.startColumn.modules.edit) { - self.startColumn.modules.edit.blocked = false; - } - - if (self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight) { - column.checkCellHeights(); - } - - document.body.removeEventListener("mouseup", mouseUp); - document.body.removeEventListener("mousemove", mouseMove); - - handle.removeEventListener("touchmove", mouseMove); - handle.removeEventListener("touchend", mouseUp); - - self.table.element.classList.remove("tabulator-block-select"); - - if (self.table.options.persistence && self.table.modExists("persistence", true) && self.table.modules.persistence.config.columns) { - self.table.modules.persistence.save("columns"); - } - - self.table.options.columnResized.call(self.table, column.getComponent()); - } - - e.stopPropagation(); //prevent resize from interfereing with movable columns - - //block editor from taking action while resizing is taking place - if (self.startColumn.modules.edit) { - self.startColumn.modules.edit.blocked = true; - } - - self.startX = typeof e.screenX === "undefined" ? e.touches[0].screenX : e.screenX; - self.startWidth = column.getWidth(); - - document.body.addEventListener("mousemove", mouseMove); - document.body.addEventListener("mouseup", mouseUp); - handle.addEventListener("touchmove", mouseMove, { passive: true }); - handle.addEventListener("touchend", mouseUp); -}; - -Tabulator.prototype.registerModule("resizeColumns", ResizeColumns); -var ResizeRows = function ResizeRows(table) { - this.table = table; //hold Tabulator object - this.startColumn = false; - this.startY = false; - this.startHeight = false; - this.handle = null; - this.prevHandle = null; -}; - -ResizeRows.prototype.initializeRow = function (row) { - var self = this, - rowEl = row.getElement(); - - var handle = document.createElement('div'); - handle.className = "tabulator-row-resize-handle"; - - var prevHandle = document.createElement('div'); - prevHandle.className = "tabulator-row-resize-handle prev"; - - handle.addEventListener("click", function (e) { - e.stopPropagation(); - }); - - var handleDown = function handleDown(e) { - self.startRow = row; - self._mouseDown(e, row, handle); - }; - - handle.addEventListener("mousedown", handleDown); - handle.addEventListener("touchstart", handleDown, { passive: true }); - - prevHandle.addEventListener("click", function (e) { - e.stopPropagation(); - }); - - var prevHandleDown = function prevHandleDown(e) { - var prevRow = self.table.rowManager.prevDisplayRow(row); - - if (prevRow) { - self.startRow = prevRow; - self._mouseDown(e, prevRow, prevHandle); - } - }; - - prevHandle.addEventListener("mousedown", prevHandleDown); - prevHandle.addEventListener("touchstart", prevHandleDown, { passive: true }); - - rowEl.appendChild(handle); - rowEl.appendChild(prevHandle); -}; - -ResizeRows.prototype._mouseDown = function (e, row, handle) { - var self = this; - - self.table.element.classList.add("tabulator-block-select"); - - function mouseMove(e) { - row.setHeight(self.startHeight + ((typeof e.screenY === "undefined" ? e.touches[0].screenY : e.screenY) - self.startY)); - } - - function mouseUp(e) { - - // //block editor from taking action while resizing is taking place - // if(self.startColumn.modules.edit){ - // self.startColumn.modules.edit.blocked = false; - // } - - document.body.removeEventListener("mouseup", mouseMove); - document.body.removeEventListener("mousemove", mouseMove); - - handle.removeEventListener("touchmove", mouseMove); - handle.removeEventListener("touchend", mouseUp); - - self.table.element.classList.remove("tabulator-block-select"); - - self.table.options.rowResized.call(this.table, row.getComponent()); - } - - e.stopPropagation(); //prevent resize from interfereing with movable columns - - //block editor from taking action while resizing is taking place - // if(self.startColumn.modules.edit){ - // self.startColumn.modules.edit.blocked = true; - // } - - self.startY = typeof e.screenY === "undefined" ? e.touches[0].screenY : e.screenY; - self.startHeight = row.getHeight(); - - document.body.addEventListener("mousemove", mouseMove); - document.body.addEventListener("mouseup", mouseUp); - - handle.addEventListener("touchmove", mouseMove, { passive: true }); - handle.addEventListener("touchend", mouseUp); -}; - -Tabulator.prototype.registerModule("resizeRows", ResizeRows); -var ResizeTable = function ResizeTable(table) { - this.table = table; //hold Tabulator object - this.binding = false; - this.observer = false; - this.containerObserver = false; - - this.tableHeight = 0; - this.tableWidth = 0; - this.containerHeight = 0; - this.containerWidth = 0; - - this.autoResize = false; -}; - -ResizeTable.prototype.initialize = function (row) { - var _this82 = this; - - var table = this.table, - tableStyle; - - this.tableHeight = table.element.clientHeight; - this.tableWidth = table.element.clientWidth; - - if (table.element.parentNode) { - this.containerHeight = table.element.parentNode.clientHeight; - this.containerWidth = table.element.parentNode.clientWidth; - } - - if (typeof ResizeObserver !== "undefined" && table.rowManager.getRenderMode() === "virtual") { - - this.autoResize = true; - - this.observer = new ResizeObserver(function (entry) { - if (!table.browserMobile || table.browserMobile && !table.modules.edit.currentCell) { - - var nodeHeight = Math.floor(entry[0].contentRect.height); - var nodeWidth = Math.floor(entry[0].contentRect.width); - - if (_this82.tableHeight != nodeHeight || _this82.tableWidth != nodeWidth) { - _this82.tableHeight = nodeHeight; - _this82.tableWidth = nodeWidth; - - if (table.element.parentNode) { - _this82.containerHeight = table.element.parentNode.clientHeight; - _this82.containerWidth = table.element.parentNode.clientWidth; - } - - if (table.options.virtualDomHoz) { - table.vdomHoz.reinitialize(true); - } - - table.redraw(); - } - } - }); - - this.observer.observe(table.element); - - tableStyle = window.getComputedStyle(table.element); - - if (this.table.element.parentNode && !this.table.rowManager.fixedHeight && (tableStyle.getPropertyValue("max-height") || tableStyle.getPropertyValue("min-height"))) { - - this.containerObserver = new ResizeObserver(function (entry) { - if (!table.browserMobile || table.browserMobile && !table.modules.edit.currentCell) { - - var nodeHeight = Math.floor(entry[0].contentRect.height); - var nodeWidth = Math.floor(entry[0].contentRect.width); - - if (_this82.containerHeight != nodeHeight || _this82.containerWidth != nodeWidth) { - _this82.containerHeight = nodeHeight; - _this82.containerWidth = nodeWidth; - _this82.tableHeight = table.element.clientHeight; - _this82.tableWidth = table.element.clientWidth; - } - - if (table.options.virtualDomHoz) { - table.vdomHoz.reinitialize(true); - } - - table.redraw(); - } - }); - - this.containerObserver.observe(this.table.element.parentNode); - } - } else { - this.binding = function () { - if (!table.browserMobile || table.browserMobile && !table.modules.edit.currentCell) { - if (table.options.virtualDomHoz) { - table.vdomHoz.reinitialize(true); - } - - table.redraw(); - } - }; - - window.addEventListener("resize", this.binding); - } -}; - -ResizeTable.prototype.clearBindings = function (row) { - if (this.binding) { - window.removeEventListener("resize", this.binding); - } - - if (this.observer) { - this.observer.unobserve(this.table.element); - } - - if (this.containerObserver) { - this.containerObserver.unobserve(this.table.element.parentNode); - } -}; - -Tabulator.prototype.registerModule("resizeTable", ResizeTable); -var ResponsiveLayout = function ResponsiveLayout(table) { - this.table = table; //hold Tabulator object - this.columns = []; - this.hiddenColumns = []; - this.mode = ""; - this.index = 0; - this.collapseFormatter = []; - this.collapseStartOpen = true; - this.collapseHandleColumn = false; -}; - -//generate resposive columns list -ResponsiveLayout.prototype.initialize = function () { - var self = this, - columns = []; - - this.mode = this.table.options.responsiveLayout; - this.collapseFormatter = this.table.options.responsiveLayoutCollapseFormatter || this.formatCollapsedData; - this.collapseStartOpen = this.table.options.responsiveLayoutCollapseStartOpen; - this.hiddenColumns = []; - - //detemine level of responsivity for each column - this.table.columnManager.columnsByIndex.forEach(function (column, i) { - if (column.modules.responsive) { - if (column.modules.responsive.order && column.modules.responsive.visible) { - column.modules.responsive.index = i; - columns.push(column); - - if (!column.visible && self.mode === "collapse") { - self.hiddenColumns.push(column); - } - } - } - }); - - //sort list by responsivity - columns = columns.reverse(); - columns = columns.sort(function (a, b) { - var diff = b.modules.responsive.order - a.modules.responsive.order; - return diff || b.modules.responsive.index - a.modules.responsive.index; - }); - - this.columns = columns; - - if (this.mode === "collapse") { - this.generateCollapsedContent(); - } - - //assign collapse column - for (var _iterator = this.table.columnManager.columnsByIndex, _isArray = Array.isArray(_iterator), _i16 = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref; - - if (_isArray) { - if (_i16 >= _iterator.length) break; - _ref = _iterator[_i16++]; - } else { - _i16 = _iterator.next(); - if (_i16.done) break; - _ref = _i16.value; - } - - var col = _ref; - - if (col.definition.formatter == "responsiveCollapse") { - this.collapseHandleColumn = col; - break; - } - } - - if (this.collapseHandleColumn) { - if (this.hiddenColumns.length) { - this.collapseHandleColumn.show(); - } else { - this.collapseHandleColumn.hide(); - } - } -}; - -//define layout information -ResponsiveLayout.prototype.initializeColumn = function (column) { - var def = column.getDefinition(); - - column.modules.responsive = { order: typeof def.responsive === "undefined" ? 1 : def.responsive, visible: def.visible === false ? false : true }; -}; - -ResponsiveLayout.prototype.initializeRow = function (row) { - var el; - - if (row.type !== "calc") { - el = document.createElement("div"); - el.classList.add("tabulator-responsive-collapse"); - - row.modules.responsiveLayout = { - element: el, - open: this.collapseStartOpen - }; - - if (!this.collapseStartOpen) { - el.style.display = 'none'; - } - } -}; - -ResponsiveLayout.prototype.layoutRow = function (row) { - var rowEl = row.getElement(); - - if (row.modules.responsiveLayout) { - rowEl.appendChild(row.modules.responsiveLayout.element); - this.generateCollapsedRowContent(row); - } -}; - -//update column visibility -ResponsiveLayout.prototype.updateColumnVisibility = function (column, visible) { - var index; - if (column.modules.responsive) { - column.modules.responsive.visible = visible; - this.initialize(); - } -}; - -ResponsiveLayout.prototype.hideColumn = function (column) { - var colCount = this.hiddenColumns.length; - - column.hide(false, true); - - if (this.mode === "collapse") { - this.hiddenColumns.unshift(column); - this.generateCollapsedContent(); - - if (this.collapseHandleColumn && !colCount) { - this.collapseHandleColumn.show(); - } - } -}; - -ResponsiveLayout.prototype.showColumn = function (column) { - var index; - - column.show(false, true); - //set column width to prevent calculation loops on uninitialized columns - column.setWidth(column.getWidth()); - - if (this.mode === "collapse") { - index = this.hiddenColumns.indexOf(column); - - if (index > -1) { - this.hiddenColumns.splice(index, 1); - } - - this.generateCollapsedContent(); - - if (this.collapseHandleColumn && !this.hiddenColumns.length) { - this.collapseHandleColumn.hide(); - } - } -}; - -//redraw columns to fit space -ResponsiveLayout.prototype.update = function () { - var self = this, - working = true; - - while (working) { - - var width = self.table.modules.layout.getMode() == "fitColumns" ? self.table.columnManager.getFlexBaseWidth() : self.table.columnManager.getWidth(); - - var diff = (self.table.options.headerVisible ? self.table.columnManager.element.clientWidth : self.table.element.clientWidth) - width; - - if (diff < 0) { - //table is too wide - var column = self.columns[self.index]; - - if (column) { - self.hideColumn(column); - self.index++; - } else { - working = false; - } - } else { - - //table has spare space - var _column = self.columns[self.index - 1]; - - if (_column) { - if (diff > 0) { - if (diff >= _column.getWidth()) { - self.showColumn(_column); - self.index--; - } else { - working = false; - } - } else { - working = false; - } - } else { - working = false; - } - } - - if (!self.table.rowManager.activeRowsCount) { - self.table.rowManager.renderEmptyScroll(); - } - } -}; - -ResponsiveLayout.prototype.generateCollapsedContent = function () { - var self = this, - rows = this.table.rowManager.getDisplayRows(); - - rows.forEach(function (row) { - self.generateCollapsedRowContent(row); - }); -}; - -ResponsiveLayout.prototype.generateCollapsedRowContent = function (row) { - var el, contents; - - if (row.modules.responsiveLayout) { - el = row.modules.responsiveLayout.element; - - while (el.firstChild) { - el.removeChild(el.firstChild); - }contents = this.collapseFormatter(this.generateCollapsedRowData(row)); - if (contents) { - el.appendChild(contents); - } - } -}; - -ResponsiveLayout.prototype.generateCollapsedRowData = function (row) { - var self = this, - data = row.getData(), - output = [], - mockCellComponent; - - this.hiddenColumns.forEach(function (column) { - var value = column.getFieldValue(data); - - if (column.definition.title && column.field) { - if (column.modules.format && self.table.options.responsiveLayoutCollapseUseFormatters) { - - mockCellComponent = { - value: false, - data: {}, - getValue: function getValue() { - return value; - }, - getData: function getData() { - return data; - }, - getElement: function getElement() { - return document.createElement("div"); - }, - getRow: function getRow() { - return row.getComponent(); - }, - getColumn: function getColumn() { - return column.getComponent(); - } - }; - - output.push({ - title: column.definition.title, - value: column.modules.format.formatter.call(self.table.modules.format, mockCellComponent, column.modules.format.params) - }); - } else { - output.push({ - title: column.definition.title, - value: value - }); - } - } - }); - - return output; -}; - -ResponsiveLayout.prototype.formatCollapsedData = function (data) { - var list = document.createElement("table"), - listContents = ""; - - data.forEach(function (item) { - var div = document.createElement("div"); - - if (item.value instanceof Node) { - div.appendChild(item.value); - item.value = div.innerHTML; - } - - listContents += "" + item.title + "" + item.value + ""; - }); - - list.innerHTML = listContents; - - return Object.keys(data).length ? list : ""; -}; - -Tabulator.prototype.registerModule("responsiveLayout", ResponsiveLayout); - -var SelectRow = function SelectRow(table) { - this.table = table; //hold Tabulator object - this.selecting = false; //flag selecting in progress - this.lastClickedRow = false; //last clicked row - this.selectPrev = []; //hold previously selected element for drag drop selection - this.selectedRows = []; //hold selected rows - this.headerCheckboxElement = null; // hold header select element -}; - -SelectRow.prototype.clearSelectionData = function (silent) { - this.selecting = false; - this.lastClickedRow = false; - this.selectPrev = []; - this.selectedRows = []; - - if (!silent) { - this._rowSelectionChanged(); - } -}; - -SelectRow.prototype.initializeRow = function (row) { - var self = this, - element = row.getElement(); - - // trigger end of row selection - var endSelect = function endSelect() { - - setTimeout(function () { - self.selecting = false; - }, 50); - - document.body.removeEventListener("mouseup", endSelect); - }; - - row.modules.select = { selected: false }; - - //set row selection class - if (self.table.options.selectableCheck.call(this.table, row.getComponent())) { - element.classList.add("tabulator-selectable"); - element.classList.remove("tabulator-unselectable"); - - if (self.table.options.selectable && self.table.options.selectable != "highlight") { - if (self.table.options.selectableRangeMode === "click") { - element.addEventListener("click", function (e) { - if (e.shiftKey) { - self.table._clearSelection(); - self.lastClickedRow = self.lastClickedRow || row; - - var lastClickedRowIdx = self.table.rowManager.getDisplayRowIndex(self.lastClickedRow); - var rowIdx = self.table.rowManager.getDisplayRowIndex(row); - - var fromRowIdx = lastClickedRowIdx <= rowIdx ? lastClickedRowIdx : rowIdx; - var toRowIdx = lastClickedRowIdx >= rowIdx ? lastClickedRowIdx : rowIdx; - - var rows = self.table.rowManager.getDisplayRows().slice(0); - var toggledRows = rows.splice(fromRowIdx, toRowIdx - fromRowIdx + 1); - - if (e.ctrlKey || e.metaKey) { - toggledRows.forEach(function (toggledRow) { - if (toggledRow !== self.lastClickedRow) { - - if (self.table.options.selectable !== true && !self.isRowSelected(row)) { - if (self.selectedRows.length < self.table.options.selectable) { - self.toggleRow(toggledRow); - } - } else { - self.toggleRow(toggledRow); - } - } - }); - self.lastClickedRow = row; - } else { - self.deselectRows(undefined, true); - - if (self.table.options.selectable !== true) { - if (toggledRows.length > self.table.options.selectable) { - toggledRows = toggledRows.slice(0, self.table.options.selectable); - } - } - - self.selectRows(toggledRows); - } - self.table._clearSelection(); - } else if (e.ctrlKey || e.metaKey) { - self.toggleRow(row); - self.lastClickedRow = row; - } else { - self.deselectRows(undefined, true); - self.selectRows(row); - self.lastClickedRow = row; - } - }); - } else { - element.addEventListener("click", function (e) { - if (!self.table.modExists("edit") || !self.table.modules.edit.getCurrentCell()) { - self.table._clearSelection(); - } - - if (!self.selecting) { - self.toggleRow(row); - } - }); - - element.addEventListener("mousedown", function (e) { - if (e.shiftKey) { - self.table._clearSelection(); - - self.selecting = true; - - self.selectPrev = []; - - document.body.addEventListener("mouseup", endSelect); - document.body.addEventListener("keyup", endSelect); - - self.toggleRow(row); - - return false; - } - }); - - element.addEventListener("mouseenter", function (e) { - if (self.selecting) { - self.table._clearSelection(); - self.toggleRow(row); - - if (self.selectPrev[1] == row) { - self.toggleRow(self.selectPrev[0]); - } - } - }); - - element.addEventListener("mouseout", function (e) { - if (self.selecting) { - self.table._clearSelection(); - self.selectPrev.unshift(row); - } - }); - } - } - } else { - element.classList.add("tabulator-unselectable"); - element.classList.remove("tabulator-selectable"); - } -}; - -//toggle row selection -SelectRow.prototype.toggleRow = function (row) { - if (this.table.options.selectableCheck.call(this.table, row.getComponent())) { - if (row.modules.select && row.modules.select.selected) { - this._deselectRow(row); - } else { - this._selectRow(row); - } - } -}; - -//select a number of rows -SelectRow.prototype.selectRows = function (rows) { - var _this83 = this; - - var rowMatch; - - switch (typeof rows === 'undefined' ? 'undefined' : _typeof(rows)) { - case "undefined": - this.table.rowManager.rows.forEach(function (row) { - _this83._selectRow(row, true, true); - }); - - this._rowSelectionChanged(); - break; - - case "string": - - rowMatch = this.table.rowManager.findRow(rows); - - if (rowMatch) { - this._selectRow(rowMatch, true, true); - } else { - this.table.rowManager.getRows(rows).forEach(function (row) { - _this83._selectRow(row, true, true); - }); - } - - this._rowSelectionChanged(); - break; - - default: - if (Array.isArray(rows)) { - rows.forEach(function (row) { - _this83._selectRow(row, true, true); - }); - - this._rowSelectionChanged(); - } else { - this._selectRow(rows, false, true); - } - break; - } -}; - -//select an individual row -SelectRow.prototype._selectRow = function (rowInfo, silent, force) { - var index; - - //handle max row count - if (!isNaN(this.table.options.selectable) && this.table.options.selectable !== true && !force) { - if (this.selectedRows.length >= this.table.options.selectable) { - if (this.table.options.selectableRollingSelection) { - this._deselectRow(this.selectedRows[0]); - } else { - return false; - } - } - } - - var row = this.table.rowManager.findRow(rowInfo); - - if (row) { - if (this.selectedRows.indexOf(row) == -1) { - if (!row.modules.select) { - row.modules.select = {}; - } - - row.modules.select.selected = true; - if (row.modules.select.checkboxEl) { - row.modules.select.checkboxEl.checked = true; - } - row.getElement().classList.add("tabulator-selected"); - - this.selectedRows.push(row); - - if (this.table.options.dataTreeSelectPropagate) { - this.childRowSelection(row, true); - } - - if (!silent) { - this.table.options.rowSelected.call(this.table, row.getComponent()); - } - - this._rowSelectionChanged(silent); - } - } else { - if (!silent) { - console.warn("Selection Error - No such row found, ignoring selection:" + rowInfo); - } - } -}; - -SelectRow.prototype.isRowSelected = function (row) { - return this.selectedRows.indexOf(row) !== -1; -}; - -//deselect a number of rows -SelectRow.prototype.deselectRows = function (rows, silent) { - var self = this, - rowCount; - - if (typeof rows == "undefined") { - - rowCount = self.selectedRows.length; - - for (var _i17 = 0; _i17 < rowCount; _i17++) { - self._deselectRow(self.selectedRows[0], true); - } - - self._rowSelectionChanged(silent); - } else { - if (Array.isArray(rows)) { - rows.forEach(function (row) { - self._deselectRow(row, true); - }); - - self._rowSelectionChanged(silent); - } else { - self._deselectRow(rows, silent); - } - } -}; - -//deselect an individual row -SelectRow.prototype._deselectRow = function (rowInfo, silent) { - var self = this, - row = self.table.rowManager.findRow(rowInfo), - index; - - if (row) { - index = self.selectedRows.findIndex(function (selectedRow) { - return selectedRow == row; - }); - - if (index > -1) { - - if (!row.modules.select) { - row.modules.select = {}; - } - - row.modules.select.selected = false; - if (row.modules.select.checkboxEl) { - row.modules.select.checkboxEl.checked = false; - } - row.getElement().classList.remove("tabulator-selected"); - self.selectedRows.splice(index, 1); - - if (this.table.options.dataTreeSelectPropagate) { - this.childRowSelection(row, false); - } - - if (!silent) { - self.table.options.rowDeselected.call(this.table, row.getComponent()); - } - - self._rowSelectionChanged(silent); - } - } else { - if (!silent) { - console.warn("Deselection Error - No such row found, ignoring selection:" + rowInfo); - } - } -}; - -SelectRow.prototype.getSelectedData = function () { - var data = []; - - this.selectedRows.forEach(function (row) { - data.push(row.getData()); - }); - - return data; -}; - -SelectRow.prototype.getSelectedRows = function () { - - var rows = []; - - this.selectedRows.forEach(function (row) { - rows.push(row.getComponent()); - }); - - return rows; -}; - -SelectRow.prototype._rowSelectionChanged = function (silent) { - if (this.headerCheckboxElement) { - if (this.selectedRows.length === 0) { - this.headerCheckboxElement.checked = false; - this.headerCheckboxElement.indeterminate = false; - } else if (this.table.rowManager.rows.length === this.selectedRows.length) { - this.headerCheckboxElement.checked = true; - this.headerCheckboxElement.indeterminate = false; - } else { - this.headerCheckboxElement.indeterminate = true; - this.headerCheckboxElement.checked = false; - } - } - - if (!silent) { - this.table.options.rowSelectionChanged.call(this.table, this.getSelectedData(), this.getSelectedRows()); - } -}; - -SelectRow.prototype.registerRowSelectCheckbox = function (row, element) { - if (!row._row.modules.select) { - row._row.modules.select = {}; - } - - row._row.modules.select.checkboxEl = element; -}; - -SelectRow.prototype.registerHeaderSelectCheckbox = function (element) { - this.headerCheckboxElement = element; -}; - -SelectRow.prototype.childRowSelection = function (row, select) { - var children = this.table.modules.dataTree.getChildren(row); - - if (select) { - for (var _iterator2 = children, _isArray2 = Array.isArray(_iterator2), _i18 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { - var _ref2; - - if (_isArray2) { - if (_i18 >= _iterator2.length) break; - _ref2 = _iterator2[_i18++]; - } else { - _i18 = _iterator2.next(); - if (_i18.done) break; - _ref2 = _i18.value; - } - - var child = _ref2; - - this._selectRow(child, true); - } - } else { - for (var _iterator3 = children, _isArray3 = Array.isArray(_iterator3), _i19 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { - var _ref3; - - if (_isArray3) { - if (_i19 >= _iterator3.length) break; - _ref3 = _iterator3[_i19++]; - } else { - _i19 = _iterator3.next(); - if (_i19.done) break; - _ref3 = _i19.value; - } - - var _child = _ref3; - - this._deselectRow(_child, true); - } - } -}; - -Tabulator.prototype.registerModule("selectRow", SelectRow); - -var Sort = function Sort(table) { - this.table = table; //hold Tabulator object - this.sortList = []; //holder current sort - this.changed = false; //has the sort changed since last render -}; - -//initialize column header for sorting -Sort.prototype.initializeColumn = function (column, content) { - var self = this, - sorter = false, - colEl, - arrowEl; - - switch (_typeof(column.definition.sorter)) { - case "string": - if (self.sorters[column.definition.sorter]) { - sorter = self.sorters[column.definition.sorter]; - } else { - console.warn("Sort Error - No such sorter found: ", column.definition.sorter); - } - break; - - case "function": - sorter = column.definition.sorter; - break; - } - - column.modules.sort = { - sorter: sorter, dir: "none", - params: column.definition.sorterParams || {}, - startingDir: column.definition.headerSortStartingDir || "asc", - tristate: typeof column.definition.headerSortTristate !== "undefined" ? column.definition.headerSortTristate : this.table.options.headerSortTristate - }; - - if (typeof column.definition.headerSort === "undefined" ? this.table.options.headerSort !== false : column.definition.headerSort !== false) { - - colEl = column.getElement(); - - colEl.classList.add("tabulator-sortable"); - - arrowEl = document.createElement("div"); - arrowEl.classList.add("tabulator-col-sorter"); - - if (_typeof(this.table.options.headerSortElement) == "object") { - arrowEl.appendChild(this.table.options.headerSortElement); - } else { - arrowEl.innerHTML = this.table.options.headerSortElement; - } - - //create sorter arrow - content.appendChild(arrowEl); - - column.modules.sort.element = arrowEl; - - //sort on click - colEl.addEventListener("click", function (e) { - var dir = "", - sorters = [], - match = false; - - if (column.modules.sort) { - if (column.modules.sort.tristate) { - if (column.modules.sort.dir == "none") { - dir = column.modules.sort.startingDir; - } else { - if (column.modules.sort.dir == column.modules.sort.startingDir) { - dir = column.modules.sort.dir == "asc" ? "desc" : "asc"; - } else { - dir = "none"; - } - } - } else { - switch (column.modules.sort.dir) { - case "asc": - dir = "desc"; - break; - - case "desc": - dir = "asc"; - break; - - default: - dir = column.modules.sort.startingDir; - } - } - - if (self.table.options.columnHeaderSortMulti && (e.shiftKey || e.ctrlKey)) { - sorters = self.getSort(); - - match = sorters.findIndex(function (sorter) { - return sorter.field === column.getField(); - }); - - if (match > -1) { - sorters[match].dir = dir; - - if (match != sorters.length - 1) { - match = sorters.splice(match, 1)[0]; - if (dir != "none") { - sorters.push(match); - } - } - } else { - if (dir != "none") { - sorters.push({ column: column, dir: dir }); - } - } - - //add to existing sort - self.setSort(sorters); - } else { - if (dir == "none") { - self.clear(); - } else { - //sort by column only - self.setSort(column, dir); - } - } - - self.table.rowManager.sorterRefresh(!self.sortList.length); - } - }); - } -}; - -//check if the sorters have changed since last use -Sort.prototype.hasChanged = function () { - var changed = this.changed; - this.changed = false; - return changed; -}; - -//return current sorters -Sort.prototype.getSort = function () { - var self = this, - sorters = []; - - self.sortList.forEach(function (item) { - if (item.column) { - sorters.push({ column: item.column.getComponent(), field: item.column.getField(), dir: item.dir }); - } - }); - - return sorters; -}; - -//change sort list and trigger sort -Sort.prototype.setSort = function (sortList, dir) { - var self = this, - newSortList = []; - - if (!Array.isArray(sortList)) { - sortList = [{ column: sortList, dir: dir }]; - } - - sortList.forEach(function (item) { - var column; - - column = self.table.columnManager.findColumn(item.column); - - if (column) { - item.column = column; - newSortList.push(item); - self.changed = true; - } else { - console.warn("Sort Warning - Sort field does not exist and is being ignored: ", item.column); - } - }); - - self.sortList = newSortList; - - if (this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.sort) { - this.table.modules.persistence.save("sort"); - } -}; - -//clear sorters -Sort.prototype.clear = function () { - this.setSort([]); -}; - -//find appropriate sorter for column -Sort.prototype.findSorter = function (column) { - var row = this.table.rowManager.activeRows[0], - sorter = "string", - field, - value; - - if (row) { - row = row.getData(); - field = column.getField(); - - if (field) { - - value = column.getFieldValue(row); - - switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { - case "undefined": - sorter = "string"; - break; - - case "boolean": - sorter = "boolean"; - break; - - default: - if (!isNaN(value) && value !== "") { - sorter = "number"; - } else { - if (value.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)) { - sorter = "alphanum"; - } - } - break; - } - } - } - - return this.sorters[sorter]; -}; - -//work through sort list sorting data -Sort.prototype.sort = function (data) { - var self = this, - sortList = this.table.options.sortOrderReverse ? self.sortList.slice().reverse() : self.sortList, - sortListActual = [], - rowComponents = [], - lastSort; - - if (self.table.options.dataSorting) { - self.table.options.dataSorting.call(self.table, self.getSort()); - } - - self.clearColumnHeaders(); - - if (!self.table.options.ajaxSorting) { - - //build list of valid sorters and trigger column specific callbacks before sort begins - sortList.forEach(function (item, i) { - var sortObj = item.column.modules.sort; - - if (item.column && sortObj) { - - //if no sorter has been defined, take a guess - if (!sortObj.sorter) { - sortObj.sorter = self.findSorter(item.column); - } - - item.params = typeof sortObj.params === "function" ? sortObj.params(item.column.getComponent(), item.dir) : sortObj.params; - - sortListActual.push(item); - } - - self.setColumnHeader(item.column, item.dir); - }); - - //sort data - if (sortListActual.length) { - self._sortItems(data, sortListActual); - } - } else { - sortList.forEach(function (item, i) { - self.setColumnHeader(item.column, item.dir); - }); - } - - if (self.table.options.dataSorted) { - data.forEach(function (row) { - rowComponents.push(row.getComponent()); - }); - - self.table.options.dataSorted.call(self.table, self.getSort(), rowComponents); - } -}; - -//clear sort arrows on columns -Sort.prototype.clearColumnHeaders = function () { - this.table.columnManager.getRealColumns().forEach(function (column) { - if (column.modules.sort) { - column.modules.sort.dir = "none"; - column.getElement().setAttribute("aria-sort", "none"); - } - }); -}; - -//set the column header sort direction -Sort.prototype.setColumnHeader = function (column, dir) { - column.modules.sort.dir = dir; - column.getElement().setAttribute("aria-sort", dir); -}; - -//sort each item in sort list -Sort.prototype._sortItems = function (data, sortList) { - var _this84 = this; - - var sorterCount = sortList.length - 1; - - data.sort(function (a, b) { - var result; - - for (var i = sorterCount; i >= 0; i--) { - var sortItem = sortList[i]; - - result = _this84._sortRow(a, b, sortItem.column, sortItem.dir, sortItem.params); - - if (result !== 0) { - break; - } - } - - return result; - }); -}; - -//process individual rows for a sort function on active data -Sort.prototype._sortRow = function (a, b, column, dir, params) { - var el1Comp, el2Comp, colComp; - - //switch elements depending on search direction - var el1 = dir == "asc" ? a : b; - var el2 = dir == "asc" ? b : a; - - a = column.getFieldValue(el1.getData()); - b = column.getFieldValue(el2.getData()); - - a = typeof a !== "undefined" ? a : ""; - b = typeof b !== "undefined" ? b : ""; - - el1Comp = el1.getComponent(); - el2Comp = el2.getComponent(); - - return column.modules.sort.sorter.call(this, a, b, el1Comp, el2Comp, column.getComponent(), dir, params); -}; - -//default data sorters -Sort.prototype.sorters = { - - //sort numbers - number: function number(a, b, aRow, bRow, column, dir, params) { - var alignEmptyValues = params.alignEmptyValues; - var decimal = params.decimalSeparator || "."; - var thousand = params.thousandSeparator || ","; - var emptyAlign = 0; - - a = parseFloat(String(a).split(thousand).join("").split(decimal).join(".")); - b = parseFloat(String(b).split(thousand).join("").split(decimal).join(".")); - - //handle non numeric values - if (isNaN(a)) { - emptyAlign = isNaN(b) ? 0 : -1; - } else if (isNaN(b)) { - emptyAlign = 1; - } else { - //compare valid values - return a - b; - } - - //fix empty values in position - if (alignEmptyValues === "top" && dir === "desc" || alignEmptyValues === "bottom" && dir === "asc") { - emptyAlign *= -1; - } - - return emptyAlign; - }, - - //sort strings - string: function string(a, b, aRow, bRow, column, dir, params) { - var alignEmptyValues = params.alignEmptyValues; - var emptyAlign = 0; - var locale; - - //handle empty values - if (!a) { - emptyAlign = !b ? 0 : -1; - } else if (!b) { - emptyAlign = 1; - } else { - //compare valid values - switch (_typeof(params.locale)) { - case "boolean": - if (params.locale) { - locale = this.table.modules.localize.getLocale(); - } - break; - case "string": - locale = params.locale; - break; - } - - return String(a).toLowerCase().localeCompare(String(b).toLowerCase(), locale); - } - - //fix empty values in position - if (alignEmptyValues === "top" && dir === "desc" || alignEmptyValues === "bottom" && dir === "asc") { - emptyAlign *= -1; - } - - return emptyAlign; - }, - - //sort date - date: function date(a, b, aRow, bRow, column, dir, params) { - if (!params.format) { - params.format = "DD/MM/YYYY"; - } - - return this.sorters.datetime.call(this, a, b, aRow, bRow, column, dir, params); - }, - - //sort HH:mm formatted times - time: function time(a, b, aRow, bRow, column, dir, params) { - if (!params.format) { - params.format = "HH:mm"; - } - - return this.sorters.datetime.call(this, a, b, aRow, bRow, column, dir, params); - }, - - //sort datetime - datetime: function datetime(a, b, aRow, bRow, column, dir, params) { - var format = params.format || "DD/MM/YYYY HH:mm:ss", - alignEmptyValues = params.alignEmptyValues, - emptyAlign = 0; - - if (typeof moment != "undefined") { - a = moment(a, format); - b = moment(b, format); - - if (!a.isValid()) { - emptyAlign = !b.isValid() ? 0 : -1; - } else if (!b.isValid()) { - emptyAlign = 1; - } else { - //compare valid values - return a - b; - } - - //fix empty values in position - if (alignEmptyValues === "top" && dir === "desc" || alignEmptyValues === "bottom" && dir === "asc") { - emptyAlign *= -1; - } - - return emptyAlign; - } else { - console.error("Sort Error - 'datetime' sorter is dependant on moment.js"); - } - }, - - //sort booleans - boolean: function boolean(a, b, aRow, bRow, column, dir, params) { - var el1 = a === true || a === "true" || a === "True" || a === 1 ? 1 : 0; - var el2 = b === true || b === "true" || b === "True" || b === 1 ? 1 : 0; - - return el1 - el2; - }, - - //sort if element contains any data - array: function array(a, b, aRow, bRow, column, dir, params) { - var el1 = 0; - var el2 = 0; - var type = params.type || "length"; - var alignEmptyValues = params.alignEmptyValues; - var emptyAlign = 0; - - function calc(value) { - - switch (type) { - case "length": - return value.length; - break; - - case "sum": - return value.reduce(function (c, d) { - return c + d; - }); - break; - - case "max": - return Math.max.apply(null, value); - break; - - case "min": - return Math.min.apply(null, value); - break; - - case "avg": - return value.reduce(function (c, d) { - return c + d; - }) / value.length; - break; - } - } - - //handle non array values - if (!Array.isArray(a)) { - alignEmptyValues = !Array.isArray(b) ? 0 : -1; - } else if (!Array.isArray(b)) { - alignEmptyValues = 1; - } else { - - //compare valid values - el1 = a ? calc(a) : 0; - el2 = b ? calc(b) : 0; - - return el1 - el2; - } - - //fix empty values in position - if (alignEmptyValues === "top" && dir === "desc" || alignEmptyValues === "bottom" && dir === "asc") { - emptyAlign *= -1; - } - - return emptyAlign; - }, - - //sort if element contains any data - exists: function exists(a, b, aRow, bRow, column, dir, params) { - var el1 = typeof a == "undefined" ? 0 : 1; - var el2 = typeof b == "undefined" ? 0 : 1; - - return el1 - el2; - }, - - //sort alpha numeric strings - alphanum: function alphanum(as, bs, aRow, bRow, column, dir, params) { - var a, - b, - a1, - b1, - i = 0, - L, - rx = /(\d+)|(\D+)/g, - rd = /\d/; - var alignEmptyValues = params.alignEmptyValues; - var emptyAlign = 0; - - //handle empty values - if (!as && as !== 0) { - emptyAlign = !bs && bs !== 0 ? 0 : -1; - } else if (!bs && bs !== 0) { - emptyAlign = 1; - } else { - - if (isFinite(as) && isFinite(bs)) return as - bs; - a = String(as).toLowerCase(); - b = String(bs).toLowerCase(); - if (a === b) return 0; - if (!(rd.test(a) && rd.test(b))) return a > b ? 1 : -1; - a = a.match(rx); - b = b.match(rx); - L = a.length > b.length ? b.length : a.length; - while (i < L) { - a1 = a[i]; - b1 = b[i++]; - if (a1 !== b1) { - if (isFinite(a1) && isFinite(b1)) { - if (a1.charAt(0) === "0") a1 = "." + a1; - if (b1.charAt(0) === "0") b1 = "." + b1; - return a1 - b1; - } else return a1 > b1 ? 1 : -1; - } - } - - return a.length > b.length; - } - - //fix empty values in position - if (alignEmptyValues === "top" && dir === "desc" || alignEmptyValues === "bottom" && dir === "asc") { - emptyAlign *= -1; - } - - return emptyAlign; - } -}; - -Tabulator.prototype.registerModule("sort", Sort); - -var Validate = function Validate(table) { - this.table = table; - this.invalidCells = []; -}; - -//validate -Validate.prototype.initializeColumn = function (column) { - var self = this, - config = [], - validator; - - if (column.definition.validator) { - - if (Array.isArray(column.definition.validator)) { - column.definition.validator.forEach(function (item) { - validator = self._extractValidator(item); - - if (validator) { - config.push(validator); - } - }); - } else { - validator = this._extractValidator(column.definition.validator); - - if (validator) { - config.push(validator); - } - } - - column.modules.validate = config.length ? config : false; - } -}; - -Validate.prototype._extractValidator = function (value) { - var type, params, pos; - - switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { - case "string": - pos = value.indexOf(':'); - - if (pos > -1) { - type = value.substring(0, pos); - params = value.substring(pos + 1); - } else { - type = value; - } - - return this._buildValidator(type, params); - break; - - case "function": - return this._buildValidator(value); - break; - - case "object": - return this._buildValidator(value.type, value.parameters); - break; - } -}; - -Validate.prototype._buildValidator = function (type, params) { - - var func = typeof type == "function" ? type : this.validators[type]; - - if (!func) { - console.warn("Validator Setup Error - No matching validator found:", type); - return false; - } else { - return { - type: typeof type == "function" ? "function" : type, - func: func, - params: params - }; - } -}; - -Validate.prototype.validate = function (validators, cell, value) { - var self = this, - valid = [], - invalidIndex = this.invalidCells.indexOf(cell); - - if (validators) { - validators.forEach(function (item) { - if (!item.func.call(self, cell.getComponent(), value, item.params)) { - valid.push({ - type: item.type, - parameters: item.params - }); - } - }); - } - - valid = valid.length ? valid : true; - - if (!cell.modules.validate) { - cell.modules.validate = {}; - } - - if (valid === true) { - cell.modules.validate.invalid = false; - cell.getElement().classList.remove("tabulator-validation-fail"); - - if (invalidIndex > -1) { - this.invalidCells.splice(invalidIndex, 1); - } - } else { - cell.modules.validate.invalid = true; - - if (this.table.options.validationMode !== "manual") { - cell.getElement().classList.add("tabulator-validation-fail"); - } - - if (invalidIndex == -1) { - this.invalidCells.push(cell); - } - } - - return valid; -}; - -Validate.prototype.getInvalidCells = function () { - var output = []; - - this.invalidCells.forEach(function (cell) { - output.push(cell.getComponent()); - }); - - return output; -}; - -Validate.prototype.clearValidation = function (cell) { - var invalidIndex; - - if (cell.modules.validate && cell.modules.validate.invalid) { - - cell.getElement().classList.remove("tabulator-validation-fail"); - cell.modules.validate.invalid = false; - - invalidIndex = this.invalidCells.indexOf(cell); - - if (invalidIndex > -1) { - this.invalidCells.splice(invalidIndex, 1); - } - } -}; - -Validate.prototype.validators = { - - //is integer - integer: function integer(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - value = Number(value); - return typeof value === 'number' && isFinite(value) && Math.floor(value) === value; - }, - - //is float - float: function float(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - value = Number(value); - return typeof value === 'number' && isFinite(value) && value % 1 !== 0; - }, - - //must be a number - numeric: function numeric(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - return !isNaN(value); - }, - - //must be a string - string: function string(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - return isNaN(value); - }, - - //maximum value - max: function max(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - return parseFloat(value) <= parameters; - }, - - //minimum value - min: function min(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - return parseFloat(value) >= parameters; - }, - - //starts with value - starts: function starts(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - return String(value).toLowerCase().startsWith(String(parameters).toLowerCase()); - }, - - //ends with value - ends: function ends(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - return String(value).toLowerCase().endsWith(String(parameters).toLowerCase()); - }, - - //minimum string length - minLength: function minLength(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - return String(value).length >= parameters; - }, - - //maximum string length - maxLength: function maxLength(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - return String(value).length <= parameters; - }, - - //in provided value list - in: function _in(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - if (typeof parameters == "string") { - parameters = parameters.split("|"); - } - - return value === "" || parameters.indexOf(value) > -1; - }, - - //must match provided regex - regex: function regex(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - var reg = new RegExp(parameters); - - return reg.test(value); - }, - - //value must be unique in this column - unique: function unique(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - var unique = true; - - var cellData = cell.getData(); - var column = cell.getColumn()._getSelf(); - - this.table.rowManager.rows.forEach(function (row) { - var data = row.getData(); - - if (data !== cellData) { - if (value == column.getFieldValue(data)) { - unique = false; - } - } - }); - - return unique; - }, - - //must have a value - required: function required(cell, value, parameters) { - return value !== "" && value !== null && typeof value !== "undefined"; - } -}; - -Tabulator.prototype.registerModule("validate", Validate); - -export default Tabulator; \ No newline at end of file diff --git a/website/js/vendor/tabulator/js/tabulator.min.js b/website/js/vendor/tabulator/js/tabulator.min.js deleted file mode 100644 index 314b978..0000000 --- a/website/js/vendor/tabulator/js/tabulator.min.js +++ /dev/null @@ -1,13 +0,0 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(e,t){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Tabulator=t()}(this,function(){"use strict";Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(e){if(null==this)throw new TypeError('"this" is null or not defined');var t=Object(this),o=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;n>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;n>>0;if(0===i)return!1;for(var n=0|t,s=Math.max(n>=0?n:i-Math.abs(n),0);so?(t=e-o,this.element.style.marginLeft=-t+"px"):this.element.style.marginLeft=0,this.scrollLeft=e,this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.scrollHorizontal()},t.prototype.generateColumnsFromRowData=function(e){var t,o,i=[],n=this.table.options.autoColumnsDefinitions;if(e&&e.length){t=e[0];for(var s in t){var a={field:s,title:s},r=t[s];switch(void 0===r?"undefined":_typeof(r)){case"undefined":o="string";break;case"boolean":o="boolean";break;case"object":o=Array.isArray(r)?"array":"string";break;default:o=isNaN(r)||""===r?r.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)?"alphanum":"string":"number"}a.sorter=o,i.push(a)}if(n)switch(void 0===n?"undefined":_typeof(n)){case"function":this.table.options.columns=n.call(this.table,i);break;case"object":Array.isArray(n)?i.forEach(function(e){var t=n.find(function(t){return t.field===e.field});t&&Object.assign(e,t)}):i.forEach(function(e){n[e.field]&&Object.assign(e,n[e.field])}),this.table.options.columns=i}else this.table.options.columns=i;this.setColumns(this.table.options.columns)}},t.prototype.setColumns=function(e,t){for(var o=this;o.headersElement.firstChild;)o.headersElement.removeChild(o.headersElement.firstChild);o.columns=[],o.columnsByIndex=[],o.columnsByField={},o.table.modExists("frozenColumns")&&o.table.modules.frozenColumns.reset(),e.forEach(function(e,t){o._addColumn(e)}),o._reIndexColumns(),o.table.options.responsiveLayout&&o.table.modExists("responsiveLayout",!0)&&o.table.modules.responsiveLayout.initialize(),this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitialize(!1,!0),o.redraw(!0)},t.prototype._addColumn=function(e,t,o){var i=new n(e,this),s=i.getElement(),a=o?this.findColumnIndex(o):o;if(o&&a>-1){var r=this.columns.indexOf(o.getTopColumn()),l=o.getElement();t?(this.columns.splice(r,0,i),l.parentNode.insertBefore(s,l)):(this.columns.splice(r+1,0,i),l.parentNode.insertBefore(s,l.nextSibling))}else t?(this.columns.unshift(i),this.headersElement.insertBefore(i.getElement(),this.headersElement.firstChild)):(this.columns.push(i),this.headersElement.appendChild(i.getElement())),i.columnRendered();return i},t.prototype.registerColumnField=function(e){e.definition.field&&(this.columnsByField[e.definition.field]=e)},t.prototype.registerColumnPosition=function(e){this.columnsByIndex.push(e)},t.prototype._reIndexColumns=function(){this.columnsByIndex=[],this.columns.forEach(function(e){e.reRegisterPosition()})},t.prototype._verticalAlignHeaders=function(){var e=this,t=0;e.columns.forEach(function(e){var o;e.clearVerticalAlign(),(o=e.getHeight())>t&&(t=o)}),e.columns.forEach(function(o){o.verticalAlign(e.table.options.columnHeaderVertAlign,t)}),e.rowManager.adjustTableSize()},t.prototype.findColumn=function(e){var t=this;if("object"!=(void 0===e?"undefined":_typeof(e)))return this.columnsByField[e]||!1;if(e instanceof n)return e;if(e instanceof o)return e._getSelf()||!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement){return t.columns.find(function(t){return t.element===e})||!1}return!1},t.prototype.getColumnByField=function(e){return this.columnsByField[e]},t.prototype.getColumnsByFieldRoot=function(e){var t=this,o=[];return Object.keys(this.columnsByField).forEach(function(i){i.split(".")[0]===e&&o.push(t.columnsByField[i])}),o},t.prototype.getColumnByIndex=function(e){return this.columnsByIndex[e]},t.prototype.getFirstVisibileColumn=function(e){var e=this.columnsByIndex.findIndex(function(e){return e.visible});return e>-1&&this.columnsByIndex[e]},t.prototype.getColumns=function(){return this.columns},t.prototype.findColumnIndex=function(e){return this.columnsByIndex.findIndex(function(t){return e===t})},t.prototype.getRealColumns=function(){return this.columnsByIndex},t.prototype.traverse=function(e){this.columnsByIndex.forEach(function(t,o){e(t,o)})},t.prototype.getDefinitions=function(e){var t=this,o=[];return t.columnsByIndex.forEach(function(t){(!e||e&&t.visible)&&o.push(t.getDefinition())}),o},t.prototype.getDefinitionTree=function(){var e=this,t=[];return e.columns.forEach(function(e){t.push(e.getDefinition(!0))}),t},t.prototype.getComponents=function(e){var t=this,o=[];return(e?t.columns:t.columnsByIndex).forEach(function(e){o.push(e.getComponent())}),o},t.prototype.getWidth=function(){var e=0;return this.columnsByIndex.forEach(function(t){t.visible&&(e+=t.getWidth())}),e},t.prototype.moveColumn=function(e,t,o){this.moveColumnActual(e,t,o),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),t.element.parentNode.insertBefore(e.element,t.element),o&&t.element.parentNode.insertBefore(t.element,e.element),this._verticalAlignHeaders(),this.table.rowManager.reinitialize()},t.prototype.moveColumnActual=function(e,t,o){e.parent.isGroup?this._moveColumnInArray(e.parent.columns,e,t,o):this._moveColumnInArray(this.columns,e,t,o),this._moveColumnInArray(this.columnsByIndex,e,t,o,!0),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitialize(!0),this.table.options.columnMoved&&this.table.options.columnMoved.call(this.table,e.getComponent(),this.table.columnManager.getComponents()),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns")},t.prototype._moveColumnInArray=function(e,t,o,i,n){var s,a=this,r=e.indexOf(t),l=[];r>-1&&(e.splice(r,1),s=e.indexOf(o),s>-1?i&&(s+=1):s=r,e.splice(s,0,t),n&&(this.table.options.dataTree&&this.table.modExists("dataTree",!0)&&this.table.rowManager.rows.forEach(function(e){l=l.concat(a.table.modules.dataTree.getTreeChildren(e,!1,!0))}),l=l.concat(this.table.rowManager.rows),l.forEach(function(e){if(e.cells.length){var t=e.cells.splice(r,1)[0];e.cells.splice(s,0,t)}})))},t.prototype.scrollToColumn=function(e,t,o){var i=this,n=0,s=0,a=0,r=e.getElement();return new Promise(function(l,c){if(void 0===t&&(t=i.table.options.scrollToColumnPosition),void 0===o&&(o=i.table.options.scrollToColumnIfVisible),e.visible){switch(t){case"middle":case"center":a=-i.element.clientWidth/2;break;case"right":a=r.clientWidth-i.headersElement.clientWidth}if(!o&&(s=r.offsetLeft)>0&&s+r.offsetWidthe.rowManager.element.clientHeight&&(t-=e.rowManager.element.offsetWidth-e.rowManager.element.clientWidth),this.columnsByIndex.forEach(function(i){var n,s,a;i.visible&&(n=i.definition.width||0,s=void 0===i.minWidth?e.table.options.columnMinWidth:parseInt(i.minWidth),a="string"==typeof n?n.indexOf("%")>-1?t/100*parseInt(n):parseInt(n):n,o+=a>s?a:s)}),o},t.prototype.addColumn=function(e,t,o){var i=this;return new Promise(function(n,s){var a=i._addColumn(e,t,o);i._reIndexColumns(),i.table.options.responsiveLayout&&i.table.modExists("responsiveLayout",!0)&&i.table.modules.responsiveLayout.initialize(),i.table.modExists("columnCalcs")&&i.table.modules.columnCalcs.recalc(i.table.rowManager.activeRows),i.redraw(),"fitColumns"!=i.table.modules.layout.getMode()&&a.reinitializeWidth(),i._verticalAlignHeaders(),i.table.rowManager.reinitialize(),i.table.options.virtualDomHoz&&i.table.vdomHoz.reinitialize(),n(a)})},t.prototype.deregisterColumn=function(e){var t,o=e.getField();o&&delete this.columnsByField[o],t=this.columnsByIndex.indexOf(e),t>-1&&this.columnsByIndex.splice(t,1),t=this.columns.indexOf(e),t>-1&&this.columns.splice(t,1),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this._verticalAlignHeaders(),this.redraw()},t.prototype.redraw=function(e){e&&(h.prototype.helpers.elVisible(this.element)&&this._verticalAlignHeaders(),this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),["fitColumns","fitDataStretch"].indexOf(this.table.modules.layout.getMode())>-1?this.table.modules.layout.layout():e?this.table.modules.layout.layout():this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout(),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),e&&(this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns"),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.redraw()),this.table.footerManager.redraw()};var o=function(e){this._column=e,this.type="ColumnComponent"};o.prototype.getElement=function(){return this._column.getElement()},o.prototype.getDefinition=function(){return this._column.getDefinition()},o.prototype.getField=function(){return this._column.getField()},o.prototype.getCells=function(){var e=[];return this._column.cells.forEach(function(t){e.push(t.getComponent())}),e},o.prototype.getVisibility=function(){return console.warn("getVisibility function is deprecated, you should now use the isVisible function"),this._column.visible},o.prototype.isVisible=function(){return this._column.visible},o.prototype.show=function(){this._column.isGroup?this._column.columns.forEach(function(e){e.show()}):this._column.show()},o.prototype.hide=function(){this._column.isGroup?this._column.columns.forEach(function(e){e.hide()}):this._column.hide()},o.prototype.toggle=function(){this._column.visible?this.hide():this.show()},o.prototype.delete=function(){return this._column.delete()},o.prototype.getSubColumns=function(){var e=[];return this._column.columns.length&&this._column.columns.forEach(function(t){e.push(t.getComponent())}),e},o.prototype.getParentColumn=function(){return this._column.parent instanceof n&&this._column.parent.getComponent()},o.prototype._getSelf=function(){return this._column},o.prototype.scrollTo=function(){return this._column.table.columnManager.scrollToColumn(this._column)},o.prototype.getTable=function(){return this._column.table},o.prototype.headerFilterFocus=function(){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterFocus(this._column)},o.prototype.reloadHeaderFilter=function(){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.reloadHeaderFilter(this._column)},o.prototype.getHeaderFilterValue=function(){if(this._column.table.modExists("filter",!0))return this._column.table.modules.filter.getHeaderFilterValue(this._column)},o.prototype.setHeaderFilterValue=function(e){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterValue(this._column,e)},o.prototype.move=function(e,t){var o=this._column.table.columnManager.findColumn(e);o?this._column.table.columnManager.moveColumn(this._column,o,t):console.warn("Move Error - No matching column found:",o)},o.prototype.getNextColumn=function(){var e=this._column.nextColumn();return!!e&&e.getComponent()},o.prototype.getPrevColumn=function(){var e=this._column.prevColumn();return!!e&&e.getComponent()},o.prototype.updateDefinition=function(e){return this._column.updateDefinition(e)},o.prototype.getWidth=function(){return this._column.getWidth()},o.prototype.setWidth=function(e){var t;return t=!0===e?this._column.reinitializeWidth(!0):this._column.setWidth(e),this._column.table.options.virtualDomHoz&&this._column.table.vdomHoz.reinitialize(!0),t},o.prototype.validate=function(){return this._column.validate()};var n=function e(t,o){var i=this;this.table=o.table,this.definition=t,this.parent=o,this.type="column",this.columns=[],this.cells=[],this.element=this.createElement(),this.contentElement=!1,this.titleHolderElement=!1,this.titleElement=!1,this.groupElement=this.createGroupElement(),this.isGroup=!1,this.tooltip=!1,this.hozAlign="",this.vertAlign="",this.field="",this.fieldStructure="",this.getFieldValue="",this.setFieldValue="",this.titleFormatterRendered=!1,this.setField(this.definition.field),this.table.options.invalidOptionWarnings&&this.checkDefinition(),this.modules={},this.cellEvents={cellClick:!1,cellDblClick:!1,cellContext:!1,cellTap:!1,cellDblTap:!1,cellTapHold:!1,cellMouseEnter:!1,cellMouseLeave:!1,cellMouseOver:!1,cellMouseOut:!1,cellMouseMove:!1},this.width=null,this.widthStyled="",this.minWidth=null,this.minWidthStyled="",this.widthFixed=!1,this.visible=!0,this.component=null,this._mapDepricatedFunctionality(),t.columns?(this.isGroup=!0,t.columns.forEach(function(t,o){var n=new e(t,i);i.attachColumn(n)}),i.checkColumnVisibility()):o.registerColumnField(this),t.rowHandle&&!1!==this.table.options.movableRows&&this.table.modExists("moveRow")&&this.table.modules.moveRow.setHandle(!0),this._buildHeader(),this.bindModuleColumns()};n.prototype.createElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-col"),e.setAttribute("role","columnheader"),e.setAttribute("aria-sort","none"),e},n.prototype.createGroupElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-col-group-cols"),e},n.prototype.checkDefinition=function(){var e=this;Object.keys(this.definition).forEach(function(t){-1===e.defaultOptionList.indexOf(t)&&console.warn("Invalid column definition option in '"+(e.field||e.definition.title)+"' column:",t)})},n.prototype.setField=function(e){this.field=e,this.fieldStructure=e?this.table.options.nestedFieldSeparator?e.split(this.table.options.nestedFieldSeparator):[e]:[],this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData,this.setFieldValue=this.fieldStructure.length>1?this._setNestedData:this._setFlatData},n.prototype.registerColumnPosition=function(e){this.parent.registerColumnPosition(e)},n.prototype.registerColumnField=function(e){this.parent.registerColumnField(e)},n.prototype.reRegisterPosition=function(){this.isGroup?this.columns.forEach(function(e){e.reRegisterPosition()}):this.registerColumnPosition(this)},n.prototype._mapDepricatedFunctionality=function(){void 0!==this.definition.hideInHtml&&(this.definition.htmlOutput=!this.definition.hideInHtml,console.warn("hideInHtml column definition property is deprecated, you should now use htmlOutput")),void 0!==this.definition.align&&(this.definition.hozAlign=this.definition.align,console.warn("align column definition property is deprecated, you should now use hozAlign")),void 0!==this.definition.downloadTitle&&(this.definition.titleDownload=this.definition.downloadTitle,console.warn("downloadTitle definition property is deprecated, you should now use titleDownload"))},n.prototype.setTooltip=function(){var e=this,t=e.definition,o=t.headerTooltip||!1===t.tooltip?t.headerTooltip:e.table.options.tooltipsHeader;o?!0===o?t.field?e.table.modules.localize.bind("columns|"+t.field,function(o){e.element.setAttribute("title",o||t.title)}):e.element.setAttribute("title",t.title):("function"==typeof o&&!1===(o=o(e.getComponent()))&&(o=""),e.element.setAttribute("title",o)):e.element.setAttribute("title","")},n.prototype._buildHeader=function(){for(var e=this,t=e.definition;e.element.firstChild;)e.element.removeChild(e.element.firstChild);t.headerVertical&&(e.element.classList.add("tabulator-col-vertical"),"flip"===t.headerVertical&&e.element.classList.add("tabulator-col-vertical-flip")),e.contentElement=e._bindEvents(),e.contentElement=e._buildColumnHeaderContent(),e.element.appendChild(e.contentElement),e.isGroup?e._buildGroupHeader():e._buildColumnHeader(),e.setTooltip(),e.table.options.resizableColumns&&e.table.modExists("resizeColumns")&&e.table.modules.resizeColumns.initializeColumn("header",e,e.element),t.headerFilter&&e.table.modExists("filter")&&e.table.modExists("edit")&&(void 0!==t.headerFilterPlaceholder&&t.field&&e.table.modules.localize.setHeaderFilterColumnPlaceholder(t.field,t.headerFilterPlaceholder),e.table.modules.filter.initializeColumn(e)),e.table.modExists("frozenColumns")&&e.table.modules.frozenColumns.initializeColumn(e),e.table.options.movableColumns&&!e.isGroup&&e.table.modExists("moveColumn")&&e.table.modules.moveColumn.initializeColumn(e),(t.topCalc||t.bottomCalc)&&e.table.modExists("columnCalcs")&&e.table.modules.columnCalcs.initializeColumn(e),e.table.modExists("persistence")&&e.table.modules.persistence.config.columns&&e.table.modules.persistence.initializeColumn(e),e.element.addEventListener("mouseenter",function(t){e.setTooltip()})},n.prototype._bindEvents=function(){var e,t,o,i=this,n=i.definition;"function"==typeof n.headerClick&&i.element.addEventListener("click",function(e){n.headerClick(e,i.getComponent())}),"function"==typeof n.headerDblClick&&i.element.addEventListener("dblclick",function(e){n.headerDblClick(e,i.getComponent())}),"function"==typeof n.headerContext&&i.element.addEventListener("contextmenu",function(e){n.headerContext(e,i.getComponent())}),"function"==typeof n.headerTap&&(o=!1,i.element.addEventListener("touchstart",function(e){o=!0},{passive:!0}),i.element.addEventListener("touchend",function(e){o&&n.headerTap(e,i.getComponent()),o=!1})),"function"==typeof n.headerDblTap&&(e=null,i.element.addEventListener("touchend",function(t){e?(clearTimeout(e),e=null,n.headerDblTap(t,i.getComponent())):e=setTimeout(function(){clearTimeout(e),e=null},300)})),"function"==typeof n.headerTapHold&&(t=null,i.element.addEventListener("touchstart",function(e){clearTimeout(t),t=setTimeout(function(){clearTimeout(t),t=null,o=!1,n.headerTapHold(e,i.getComponent())},1e3)},{passive:!0}),i.element.addEventListener("touchend",function(e){clearTimeout(t),t=null})),"function"==typeof n.cellClick&&(i.cellEvents.cellClick=n.cellClick),"function"==typeof n.cellDblClick&&(i.cellEvents.cellDblClick=n.cellDblClick),"function"==typeof n.cellContext&&(i.cellEvents.cellContext=n.cellContext),"function"==typeof n.cellMouseEnter&&(i.cellEvents.cellMouseEnter=n.cellMouseEnter),"function"==typeof n.cellMouseLeave&&(i.cellEvents.cellMouseLeave=n.cellMouseLeave),"function"==typeof n.cellMouseOver&&(i.cellEvents.cellMouseOver=n.cellMouseOver),"function"==typeof n.cellMouseOut&&(i.cellEvents.cellMouseOut=n.cellMouseOut),"function"==typeof n.cellMouseMove&&(i.cellEvents.cellMouseMove=n.cellMouseMove),"function"==typeof n.cellTap&&(i.cellEvents.cellTap=n.cellTap),"function"==typeof n.cellDblTap&&(i.cellEvents.cellDblTap=n.cellDblTap),"function"==typeof n.cellTapHold&&(i.cellEvents.cellTapHold=n.cellTapHold),"function"==typeof n.cellEdited&&(i.cellEvents.cellEdited=n.cellEdited),"function"==typeof n.cellEditing&&(i.cellEvents.cellEditing=n.cellEditing),"function"==typeof n.cellEditCancelled&&(i.cellEvents.cellEditCancelled=n.cellEditCancelled)},n.prototype._buildColumnHeader=function(){var e=this,t=this.definition,o=this.table;if(o.modExists("sort")&&o.modules.sort.initializeColumn(this,this.titleHolderElement),(t.headerContextMenu||t.headerClickMenu||t.headerMenu)&&o.modExists("menu")&&o.modules.menu.initializeColumnHeader(this),o.modExists("format")&&o.modules.format.initializeColumn(this),void 0!==t.editor&&o.modExists("edit")&&o.modules.edit.initializeColumn(this),void 0!==t.validator&&o.modExists("validate")&&o.modules.validate.initializeColumn(this),o.modExists("mutator")&&o.modules.mutator.initializeColumn(this),o.modExists("accessor")&&o.modules.accessor.initializeColumn(this),_typeof(o.options.responsiveLayout)&&o.modExists("responsiveLayout")&&o.modules.responsiveLayout.initializeColumn(this),void 0!==t.visible&&(t.visible?this.show(!0):this.hide(!0)),t.cssClass){t.cssClass.split(" ").forEach(function(t){e.element.classList.add(t)})}t.field&&this.element.setAttribute("tabulator-field",t.field),this.setMinWidth(void 0===t.minWidth?this.table.options.columnMinWidth:parseInt(t.minWidth)),this.reinitializeWidth(),this.tooltip=this.definition.tooltip||!1===this.definition.tooltip?this.definition.tooltip:this.table.options.tooltips,this.hozAlign=void 0===this.definition.hozAlign?this.table.options.cellHozAlign:this.definition.hozAlign,this.vertAlign=void 0===this.definition.vertAlign?this.table.options.cellVertAlign:this.definition.vertAlign,this.titleElement.style.textAlign=this.definition.headerHozAlign||this.table.options.headerHozAlign},n.prototype._buildColumnHeaderContent=function(){var e=(this.definition,this.table,document.createElement("div"));return e.classList.add("tabulator-col-content"),this.titleHolderElement=document.createElement("div"),this.titleHolderElement.classList.add("tabulator-col-title-holder"),e.appendChild(this.titleHolderElement),this.titleElement=this._buildColumnHeaderTitle(),this.titleHolderElement.appendChild(this.titleElement),e},n.prototype._buildColumnHeaderTitle=function(){var e=this,t=e.definition,o=e.table,i=document.createElement("div");if(i.classList.add("tabulator-col-title"),t.editableTitle){var n=document.createElement("input");n.classList.add("tabulator-title-editor"),n.addEventListener("click",function(e){e.stopPropagation(),n.focus()}),n.addEventListener("change",function(){t.title=n.value,o.options.columnTitleChanged.call(e.table,e.getComponent())}),i.appendChild(n),t.field?o.modules.localize.bind("columns|"+t.field,function(e){n.value=e||t.title||" "}):n.value=t.title||" "}else t.field?o.modules.localize.bind("columns|"+t.field,function(o){e._formatColumnHeaderTitle(i,o||t.title||" ")}):e._formatColumnHeaderTitle(i,t.title||" ");return i},n.prototype._formatColumnHeaderTitle=function(e,t){var o,i,n,s,a,r=this;if(this.definition.titleFormatter&&this.table.modExists("format"))switch(o=this.table.modules.format.getFormatter(this.definition.titleFormatter),a=function(e){r.titleFormatterRendered=e},s={getValue:function(){return t},getElement:function(){return e}},n=this.definition.titleFormatterParams||{},n="function"==typeof n?n():n,i=o.call(this.table.modules.format,s,n,a),void 0===i?"undefined":_typeof(i)){case"object":i instanceof Node?e.appendChild(i):(e.innerHTML="",console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",i));break;case"undefined":case"null":e.innerHTML="";break;default:e.innerHTML=i}else e.innerHTML=t},n.prototype._buildGroupHeader=function(){var e=this;if(this.element.classList.add("tabulator-col-group"),this.element.setAttribute("role","columngroup"),this.element.setAttribute("aria-title",this.definition.title),this.definition.cssClass){this.definition.cssClass.split(" ").forEach(function(t){e.element.classList.add(t)})}(this.definition.headerContextMenu||this.definition.headerMenu)&&this.table.modExists("menu")&&this.table.modules.menu.initializeColumnHeader(this),this.element.appendChild(this.groupElement)},n.prototype._getFlatData=function(e){return e[this.field]},n.prototype._getNestedData=function(e){for(var t,o=e,i=this.fieldStructure,n=i.length,s=0;s-1&&this._nextVisibleColumn(e+1)},n.prototype._nextVisibleColumn=function(e){var t=this.table.columnManager.getColumnByIndex(e);return!t||t.visible?t:this._nextVisibleColumn(e+1)},n.prototype.prevColumn=function(){var e=this.table.columnManager.findColumnIndex(this);return e>-1&&this._prevVisibleColumn(e-1)},n.prototype._prevVisibleColumn=function(e){var t=this.table.columnManager.getColumnByIndex(e);return!t||t.visible?t:this._prevVisibleColumn(e-1)},n.prototype.reinitializeWidth=function(e){this.widthFixed=!1,void 0===this.definition.width||e||this.setWidth(this.definition.width),this.table.modExists("filter")&&this.table.modules.filter.hideHeaderFilterElements(),this.fitToData(),this.table.modExists("filter")&&this.table.modules.filter.showHeaderFilterElements()},n.prototype.fitToData=function(){var e=this;this.widthFixed||(this.element.style.width="",e.cells.forEach(function(e){e.clearWidth()}));var t=this.element.offsetWidth;e.width&&this.widthFixed||(e.cells.forEach(function(e){var o=e.getWidth();o>t&&(t=o)}),t&&e.setWidthActual(t+1))},n.prototype.updateDefinition=function(e){var t=this;return new Promise(function(o,i){var n;t.isGroup?(console.warn("Column Update Error - The updateDefinition function is only available on columns, not column groups"),i("Column Update Error - The updateDefinition function is only available on columns, not column groups")):(n=Object.assign({},t.getDefinition()),n=Object.assign(n,e),t.table.columnManager.addColumn(n,!1,t).then(function(e){n.field==t.field&&(t.field=!1),t.delete().then(function(){o(e.getComponent())}).catch(function(e){i(e)})}).catch(function(e){i(e)}))})},n.prototype.deleteCell=function(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)},n.prototype.defaultOptionList=["title","field","columns","visible","align","hozAlign","vertAlign","width","minWidth","widthGrow","widthShrink","resizable","frozen","responsive","tooltip","cssClass","rowHandle","hideInHtml","print","htmlOutput","sorter","sorterParams","formatter","formatterParams","variableHeight","editable","editor","editorParams","validator","mutator","mutatorParams","mutatorData","mutatorDataParams","mutatorEdit","mutatorEditParams","mutatorClipboard","mutatorClipboardParams","accessor","accessorParams","accessorData","accessorDataParams","accessorDownload","accessorDownloadParams","accessorClipboard","accessorClipboardParams","accessorPrint","accessorPrintParams","accessorHtmlOutput","accessorHtmlOutputParams","clipboard","download","downloadTitle","topCalc","topCalcParams","topCalcFormatter","topCalcFormatterParams","bottomCalc","bottomCalcParams","bottomCalcFormatter","bottomCalcFormatterParams","cellClick","cellDblClick","cellContext","cellTap","cellDblTap","cellTapHold","cellMouseEnter","cellMouseLeave","cellMouseOver","cellMouseOut","cellMouseMove","cellEditing","cellEdited","cellEditCancelled","headerSort","headerSortStartingDir","headerSortTristate","headerClick","headerDblClick","headerContext","headerTap","headerDblTap","headerTapHold","headerTooltip","headerVertical","headerHozAlign","editableTitle","titleFormatter","titleFormatterParams","headerFilter","headerFilterPlaceholder","headerFilterParams","headerFilterEmptyCheck","headerFilterFunc","headerFilterFuncParams","headerFilterLiveFilter","print","headerContextMenu","headerMenu","contextMenu","clickMenu","formatterPrint","formatterPrintParams","formatterClipboard","formatterClipboardParams","formatterHtmlOutput","formatterHtmlOutputParams","titlePrint","titleClipboard","titleHtmlOutput","titleDownload"],n.prototype.getComponent=function(){return this.component||(this.component=new o(this)),this.component};var s=function(e){this.table=e,this.element=this.createHolderElement(),this.tableElement=this.createTableElement(),this.heightFixer=this.createTableElement(),this.columnManager=null,this.height=0,this.firstRender=!1,this.renderMode="virtual",this.fixedHeight=!1,this.rows=[],this.activeRows=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.scrollTop=0,this.scrollLeft=0,this.vDomRowHeight=20,this.vDomTop=0,this.vDomBottom=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomMaxRenderChain=90,this.vDomWindowBuffer=0,this.vDomWindowMinTotalRows=20,this.vDomWindowMinMarginRows=5,this.vDomTopNewRows=[],this.vDomBottomNewRows=[],this.rowNumColumn=!1,this.redrawBlock=!1,this.redrawBlockRestoreConfig=!1,this.redrawBlockRederInPosition=!1};s.prototype.createHolderElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-tableHolder"),e.setAttribute("tabindex",0),e},s.prototype.createTableElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-table"),e},s.prototype.getElement=function(){return this.element},s.prototype.getTableElement=function(){return this.tableElement},s.prototype.getRowPosition=function(e,t){return t?this.activeRows.indexOf(e):this.rows.indexOf(e)},s.prototype.setColumnManager=function(e){this.columnManager=e},s.prototype.initialize=function(){var e=this;e.setRenderMode(),e.element.appendChild(e.tableElement),e.firstRender=!0,e.element.addEventListener("scroll",function(){var t=e.element.scrollLeft;e.scrollLeft!=t&&(e.columnManager.scrollHorizontal(t),e.table.options.groupBy&&e.table.modules.groupRows.scrollHeaders(t),e.table.modExists("columnCalcs")&&e.table.modules.columnCalcs.scrollHorizontal(t),e.table.options.scrollHorizontal(t)),e.scrollLeft=t}),"virtual"===this.renderMode&&e.element.addEventListener("scroll",function(){var t=e.element.scrollTop,o=e.scrollTop>t;e.scrollTop!=t?(e.scrollTop=t,e.scrollVertical(o),"scroll"==e.table.options.ajaxProgressiveLoad&&e.table.modules.ajax.nextPage(e.element.scrollHeight-e.element.clientHeight-t),e.table.options.scrollVertical(t)):e.scrollTop=t})},s.prototype.findRow=function(e){var t=this;if("object"!=(void 0===e?"undefined":_typeof(e))){if(void 0===e||null===e)return!1;return t.rows.find(function(o){return o.data[t.table.options.index]==e})||!1}if(e instanceof l)return e;if(e instanceof r)return e._getSelf()||!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement){return t.rows.find(function(t){return t.element===e})||!1}return!1},s.prototype.getRowFromDataObject=function(e){return this.rows.find(function(t){return t.data===e})||!1},s.prototype.getRowFromPosition=function(e,t){return t?this.activeRows[e]:this.rows[e]},s.prototype.scrollToRow=function(e,t,o){var i,n=this,s=this.getDisplayRows().indexOf(e),a=e.getElement(),r=0;return new Promise(function(e,l){if(s>-1){if(void 0===t&&(t=n.table.options.scrollToRowPosition),void 0===o&&(o=n.table.options.scrollToRowIfVisible),"nearest"===t)switch(n.renderMode){case"classic":i=h.prototype.helpers.elOffset(a).top,t=Math.abs(n.element.scrollTop-i)>Math.abs(n.element.scrollTop+n.element.clientHeight-i)?"bottom":"top";break;case"virtual":t=Math.abs(n.vDomTop-s)>Math.abs(n.vDomBottom-s)?"bottom":"top"}if(!o&&h.prototype.helpers.elVisible(a)&&(r=h.prototype.helpers.elOffset(a).top-h.prototype.helpers.elOffset(n.element).top)>0&&r-1&&this.activeRows.splice(i,1),o>-1&&this.rows.splice(o,1),this.setActiveRows(this.activeRows),this.displayRowIterator(function(t){var o=t.indexOf(e);o>-1&&t.splice(o,1)}),t||this.reRenderInPosition(),this.regenerateRowNumbers(),this.table.options.rowDeleted.call(this.table,e.getComponent()),this.table.options.dataChanged&&this.table.options.dataChanged.call(this.table,this.getData()),this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.groupRows.updateGroupRows(!0):this.table.options.pagination&&this.table.modExists("page")?this.refreshActiveData(!1,!1,!0):this.table.options.pagination&&this.table.modExists("page")&&this.refreshActiveData("page")},s.prototype.addRow=function(e,t,o,i){var n=this.addRowActual(e,t,o,i);return this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowAdd",n,{data:e,pos:t,index:o}),n},s.prototype.addRows=function(e,t,o){var i=this,n=this,s=0,a=[];return new Promise(function(r,l){t=i.findAddRowPos(t),Array.isArray(e)||(e=[e]),s=e.length-1,(void 0===o&&t||void 0!==o&&!t)&&e.reverse(),e.forEach(function(e,i){var s=n.addRow(e,t,o,!0);a.push(s)}),i.table.options.groupBy&&i.table.modExists("groupRows")?i.table.modules.groupRows.updateGroupRows(!0):i.table.options.pagination&&i.table.modExists("page")?i.refreshActiveData(!1,!1,!0):i.reRenderInPosition(),i.table.modExists("columnCalcs")&&i.table.modules.columnCalcs.recalc(i.table.rowManager.activeRows),i.regenerateRowNumbers(),r(a)})},s.prototype.findAddRowPos=function(e){return void 0===e&&(e=this.table.options.addRowPos),"pos"===e&&(e=!0),"bottom"===e&&(e=!1),e},s.prototype.addRowActual=function(e,t,o,i){var n,s,a=e instanceof l?e:new l(e||{},this),r=this.findAddRowPos(t),c=-1;if(!o&&this.table.options.pagination&&"page"==this.table.options.paginationAddRow&&(s=this.getDisplayRows(),r?s.length?o=s[0]:this.activeRows.length&&(o=this.activeRows[this.activeRows.length-1],r=!1):s.length&&(o=s[s.length-1],r=!(s.length1&&(!o||o&&-1==u.indexOf(o)?r?u[0]!==a&&(o=u[0],this._moveRowInArray(a.getGroup().rows,a,o,!r)):u[u.length-1]!==a&&(o=u[u.length-1],this._moveRowInArray(a.getGroup().rows,a,o,!r)):this._moveRowInArray(a.getGroup().rows,a,o,!r))}return o&&(c=this.rows.indexOf(o)),o&&c>-1?(n=this.activeRows.indexOf(o),this.displayRowIterator(function(e){var t=e.indexOf(o);t>-1&&e.splice(r?t:t+1,0,a)}),n>-1&&this.activeRows.splice(r?n:n+1,0,a),this.rows.splice(r?c:c+1,0,a)):r?(this.displayRowIterator(function(e){e.unshift(a)}),this.activeRows.unshift(a),this.rows.unshift(a)):(this.displayRowIterator(function(e){e.push(a)}),this.activeRows.push(a),this.rows.push(a)),this.setActiveRows(this.activeRows),this.table.options.rowAdded.call(this.table,a.getComponent()),this.table.options.dataChanged&&this.table.options.dataChanged.call(this.table,this.getData()),i||this.reRenderInPosition(),a},s.prototype.moveRow=function(e,t,o){this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowMove",e,{posFrom:this.getRowPosition(e),posTo:this.getRowPosition(t),to:t,after:o}),this.moveRowActual(e,t,o),this.regenerateRowNumbers(),this.table.options.rowMoved.call(this.table,e.getComponent())},s.prototype.moveRowActual=function(e,t,o){var i=this;if(this._moveRowInArray(this.rows,e,t,o),this._moveRowInArray(this.activeRows,e,t,o),this.displayRowIterator(function(n){i._moveRowInArray(n,e,t,o)}),this.table.options.groupBy&&this.table.modExists("groupRows")){!o&&t instanceof H&&(t=this.table.rowManager.prevDisplayRow(e)||t);var n=t.getGroup(),s=e.getGroup();n===s?this._moveRowInArray(n.rows,e,t,o):(s&&s.removeRow(e),n.insertRow(e,t,o))}},s.prototype._moveRowInArray=function(e,t,o,i){var n,s,a,r;if(t!==o&&(n=e.indexOf(t),n>-1&&(e.splice(n,1),s=e.indexOf(o),s>-1?i?e.splice(s+1,0,t):e.splice(s,0,t):e.splice(n,0,t)),e===this.getDisplayRows())){a=nn?s:n+1;for(var l=a;l<=r;l++)e[l]&&this.styleRow(e[l],l)}},s.prototype.clearData=function(){this.setData([])},s.prototype.getRowIndex=function(e){return this.findRowIndex(e,this.rows)},s.prototype.getDisplayRowIndex=function(e){var t=this.getDisplayRows().indexOf(e);return t>-1&&t},s.prototype.nextDisplayRow=function(e,t){var o=this.getDisplayRowIndex(e),i=!1;return!1!==o&&o-1)&&o},s.prototype.getData=function(e,t){var o=[];return this.getRows(e).forEach(function(e){"row"==e.type&&o.push(e.getData(t||"data"))}),o},s.prototype.getComponents=function(e){var t=[];return this.getRows(e).forEach(function(e){t.push(e.getComponent())}),t},s.prototype.getDataCount=function(e){return this.getRows(e).length},s.prototype._genRemoteRequest=function(){var e=this,t=this.table,o=t.options,i={};if(t.modExists("page")){if(o.ajaxSorting){var n=this.table.modules.sort.getSort();n.forEach(function(e){delete e.column}),i[this.table.modules.page.paginationDataSentNames.sorters]=n}if(o.ajaxFiltering){var s=this.table.modules.filter.getFilters(!0,!0);i[this.table.modules.page.paginationDataSentNames.filters]=s}this.table.modules.ajax.setParams(i,!0)}t.modules.ajax.sendRequest().then(function(t){e._setDataActual(t,!0)}).catch(function(e){})},s.prototype.filterRefresh=function(){var e=this.table,t=e.options,o=this.scrollLeft;t.ajaxFiltering?"remote"==t.pagination&&e.modExists("page")?(e.modules.page.reset(!0),e.modules.page.setPage(1).then(function(){}).catch(function(){})):t.ajaxProgressiveLoad?e.modules.ajax.loadData().then(function(){}).catch(function(){}):this._genRemoteRequest():this.refreshActiveData("filter"),this.scrollHorizontal(o)},s.prototype.sorterRefresh=function(e){var t=this.table,o=this.table.options,i=this.scrollLeft;o.ajaxSorting?("remote"==o.pagination||o.progressiveLoad)&&t.modExists("page")?(t.modules.page.reset(!0),t.modules.page.setPage(1).then(function(){}).catch(function(){})):o.ajaxProgressiveLoad?t.modules.ajax.loadData().then(function(){}).catch(function(){}):this._genRemoteRequest():this.refreshActiveData(e?"filter":"sort"),this.scrollHorizontal(i)},s.prototype.scrollHorizontal=function(e){this.scrollLeft=e,this.element.scrollLeft=e,this.table.options.groupBy&&this.table.modules.groupRows.scrollHeaders(e),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.scrollHorizontal(e)},s.prototype.refreshActiveData=function(e,t,o){var i,n=this,s=this.table,a=["all","filter","sort","display","freeze","group","tree","page"];if(this.redrawBlock)return void((!this.redrawBlockRestoreConfig||a.indexOf(e)=0))break;s=r}else if(t-a[r].getElement().offsetTop>=0)n=r;else{if(i=!0,!(o-a[r].getElement().offsetTop>=0))break;s=r}}else n=this.vDomTop,s=this.vDomBottom;return a.slice(n,s+1)},s.prototype.displayRowIterator=function(e){this.displayRows.forEach(e),this.displayRowsCount=this.displayRows[this.displayRows.length-1].length},s.prototype.getRows=function(e){var t;switch(e){case"active":t=this.activeRows;break;case"display":t=this.table.rowManager.getDisplayRows();break;case"visible":t=this.getVisibleRows(!0);break;case"selected":t=this.table.modules.selectRow.selectedRows;break;default:t=this.rows}return t},s.prototype.reRenderInPosition=function(e){if("virtual"==this.getRenderMode())if(this.redrawBlock)e?e():this.redrawBlockRederInPosition=!0;else{for(var t=this.element.scrollTop,o=!1,i=!1,n=this.scrollLeft,s=this.getDisplayRows(),a=this.vDomTop;a<=this.vDomBottom;a++)if(s[a]){var r=t-s[a].getElement().offsetTop;if(!(!1===i||Math.abs(r)this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*g),"group"!==f.type&&(u=!1),i.vDomBottom++,c++}e?(i.vDomTopPad=t?i.vDomRowHeight*this.vDomTop+o:i.scrollTop-l,i.vDomBottomPad=i.vDomBottom==i.displayRowsCount-1?0:Math.max(i.vDomScrollHeight-i.vDomTopPad-r-l,0)):(this.vDomTopPad=0,i.vDomRowHeight=Math.floor((r+l)/c),i.vDomBottomPad=i.vDomRowHeight*(i.displayRowsCount-i.vDomBottom-1),i.vDomScrollHeight=l+r+i.vDomBottomPad-i.height),n.style.paddingTop=i.vDomTopPad+"px",n.style.paddingBottom=i.vDomBottomPad+"px",t&&(this.scrollTop=i.vDomTopPad+l+o-(this.element.scrollWidth>this.element.clientWidth?this.element.offsetHeight-this.element.clientHeight:0)),this.scrollTop=Math.min(this.scrollTop,this.element.scrollHeight-this.height),this.element.scrollWidth>this.element.offsetWidth&&t&&(this.scrollTop+=this.element.offsetHeight-this.element.clientHeight),this.vDomScrollPosTop=this.scrollTop,this.vDomScrollPosBottom=this.scrollTop,s.scrollTop=this.scrollTop,n.style.minWidth=u?i.table.columnManager.getWidth()+"px":"",i.table.options.groupBy&&"fitDataFill"!=i.table.modules.layout.getMode()&&i.displayRowsCount==i.table.modules.groupRows.countGroups()&&(i.tableElement.style.minWidth=i.table.columnManager.getWidth())}else this.renderEmptyScroll();this.fixedHeight||this.adjustTableSize()},s.prototype.scrollVertical=function(e){var t=this.scrollTop-this.vDomScrollPosTop,o=this.scrollTop-this.vDomScrollPosBottom,i=2*this.vDomWindowBuffer;if(-t>i||o>i){var n=this.scrollLeft;this._virtualRenderFill(Math.floor(this.element.scrollTop/this.element.scrollHeight*this.displayRowsCount)),this.scrollHorizontal(n)}else e?(t<0&&this._addTopRow(-t),o<0&&(this.vDomScrollHeight-this.scrollTop>this.vDomWindowBuffer?this._removeBottomRow(-o):this.vDomScrollPosBottom=this.scrollTop)):(t>=0&&(this.scrollTop>this.vDomWindowBuffer?this._removeTopRow(t):this.vDomScrollPosTop=this.scrollTop),o>=0&&this._addBottomRow(o))},s.prototype._addTopRow=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=this.tableElement,i=this.getDisplayRows();if(this.vDomTop){var n=this.vDomTop-1,s=i[n],a=s.getHeight()||this.vDomRowHeight;e>=a&&(this.styleRow(s,n),o.insertBefore(s.getElement(),o.firstChild),s.initialized&&s.heightInitialized||(this.vDomTopNewRows.push(s),s.heightInitialized||s.clearCellHeight()),s.initialize(),this.vDomTopPad-=a,this.vDomTopPad<0&&(this.vDomTopPad=n*this.vDomRowHeight),n||(this.vDomTopPad=0),o.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop-=a,this.vDomTop--),e=-(this.scrollTop-this.vDomScrollPosTop),s.getHeight()>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*s.getHeight()),t=(i[this.vDomTop-1].getHeight()||this.vDomRowHeight)?this._addTopRow(e,t+1):this._quickNormalizeRowHeight(this.vDomTopNewRows)}},s.prototype._removeTopRow=function(e){var t=this.tableElement,o=this.getDisplayRows()[this.vDomTop],i=o.getHeight()||this.vDomRowHeight;if(e>=i){var n=o.getElement();n.parentNode.removeChild(n),this.vDomTopPad+=i,t.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop+=this.vDomTop?i:i+this.vDomWindowBuffer,this.vDomTop++,e=this.scrollTop-this.vDomScrollPosTop,this._removeTopRow(e)}},s.prototype._addBottomRow=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=this.tableElement,i=this.getDisplayRows();if(this.vDomBottom=a&&(this.styleRow(s,n),o.appendChild(s.getElement()),s.initialized&&s.heightInitialized||(this.vDomBottomNewRows.push(s),s.heightInitialized||s.clearCellHeight()),s.initialize(),this.vDomBottomPad-=a,(this.vDomBottomPad<0||n==this.displayRowsCount-1)&&(this.vDomBottomPad=0),o.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom+=a,this.vDomBottom++),e=this.scrollTop-this.vDomScrollPosBottom,s.getHeight()>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*s.getHeight()),t=(i[this.vDomBottom+1].getHeight()||this.vDomRowHeight)?this._addBottomRow(e,t+1):this._quickNormalizeRowHeight(this.vDomBottomNewRows)}},s.prototype._removeBottomRow=function(e){var t=this.tableElement,o=this.getDisplayRows()[this.vDomBottom],i=o.getHeight()||this.vDomRowHeight;if(e>=i){var n=o.getElement();n.parentNode&&n.parentNode.removeChild(n),this.vDomBottomPad+=i,this.vDomBottomPad<0&&(this.vDomBottomPad=0),t.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom-=i,this.vDomBottom--,e=-(this.scrollTop-this.vDomScrollPosBottom),this._removeBottomRow(e)}},s.prototype._quickNormalizeRowHeight=function(e){e.forEach(function(e){e.calcHeight()}),e.forEach(function(e){e.setCellHeight()}),e.length=0},s.prototype.normalizeHeight=function(){this.activeRows.forEach(function(e){e.normalizeHeight()})},s.prototype.adjustTableSize=function(){var e,t=this.element.clientHeight;if("virtual"===this.renderMode){var o=Math.floor(this.columnManager.getElement().offsetHeight+(this.table.footerManager&&!this.table.footerManager.external?this.table.footerManager.getElement().offsetHeight:0));this.fixedHeight?(this.element.style.minHeight="calc(100% - "+o+"px)",this.element.style.height="calc(100% - "+o+"px)",this.element.style.maxHeight="calc(100% - "+o+"px)"):(this.element.style.height="",this.element.style.height=Math.floor(this.table.element.clientHeight)-o+"px",this.element.scrollTop=this.scrollTop),this.height=this.element.clientHeight,this.vDomWindowBuffer=this.table.options.virtualDomBuffer||this.height,this.fixedHeight||Math.floor(t)==Math.floor(this.element.clientHeight)||((e=this.table.modExists("resizeTable"))&&!this.table.modules.resizeTable.autoResize||!e)&&this.redraw()}},s.prototype.reinitialize=function(){this.rows.forEach(function(e){e.reinitialize(!0)})},s.prototype.blockRedraw=function(){this.redrawBlock=!0,this.redrawBlockRestoreConfig=!1},s.prototype.restoreRedraw=function(){this.redrawBlock=!1,this.redrawBlockRestoreConfig?(this.refreshActiveData(this.redrawBlockRestoreConfig.stage,this.redrawBlockRestoreConfig.skipStage,this.redrawBlockRestoreConfig.renderInPosition), -this.redrawBlockRestoreConfig=!1):this.redrawBlockRederInPosition&&this.reRenderInPosition(),this.redrawBlockRederInPosition=!1},s.prototype.redraw=function(e){var t=this.scrollLeft;this.adjustTableSize(),this.table.tableWidth=this.table.element.clientWidth,e?this.renderTable():("classic"==this.renderMode?this.table.options.groupBy?this.refreshActiveData("group",!1,!1):this._simpleRender():(this.reRenderInPosition(),this.scrollHorizontal(t)),this.displayRowsCount||this.table.options.placeholder&&this.getElement().appendChild(this.table.options.placeholder))},s.prototype.resetScroll=function(){if(this.element.scrollLeft=0,this.element.scrollTop=0,"ie"===this.table.browser){var e=document.createEvent("Event");e.initEvent("scroll",!1,!0),this.element.dispatchEvent(e)}else this.element.dispatchEvent(new Event("scroll"))};var a=function(e){this.table=e,this.element=this.table.rowManager.tableElement,this.holderEl=this.table.rowManager.element,this.leftCol=0,this.rightCol=0,this.scrollLeft=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0,this.fitDataColAvg=0,this.window=200,this.initialized=!1,this.columns=[],this.compatabilityCheck()&&this.initialize()};a.prototype.compatabilityCheck=function(){var e=this.table.options,t=!0;return"fitDataTable"==e.layout&&(console.warn("Horizontal Vitrual DOM is not compatible with fitDataTable layout mode"),t=!1),e.responsiveLayout&&(console.warn("Horizontal Vitrual DOM is not compatible with responsive columns"),t=!1),this.table.rtl&&(console.warn("Horizontal Vitrual DOM is not currently compatible with RTL text direction"),t=!1),e.columns&&e.columns.find(function(e){return e.frozen})&&(console.warn("Horizontal Vitrual DOM is not compatible with frozen columns"),t=!1),t||(e.virtualDomHoz=!1),t},a.prototype.initialize=function(){var e=this;this.holderEl.addEventListener("scroll",function(){var t=e.holderEl.scrollLeft;e.scrollLeft!=t&&(e.scrollLeft=t,e.scroll(t-(e.vDomScrollPosLeft+e.window)))})},a.prototype.deinitialize=function(){this.initialized=!1},a.prototype.clear=function(){this.columns=[],this.leftCol=-1,this.rightCol=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0},a.prototype.dataChange=function(){var e,t,o,i=!1,n=0,s=0;if("fitData"===this.table.options.layout){if(this.table.columnManager.columnsByIndex.forEach(function(e){!e.definition.width&&e.visible&&(i=!0)}),i&&i&&this.table.rowManager.getDisplayRows().length&&(this.vDomScrollPosRight=this.scrollLeft+this.holderEl.clientWidth+this.window,this.table.options.groupBy?(e=this.table.modules.groupRows.getGroups(!1)[0],t=e.getRows(!1)[0]):t=this.table.rowManager.getDisplayRows()[0],t)){o=t.getElement(),t.generateCells(),this.element.appendChild(o);for(var s=0;sthis.vDomScrollPosRight)break}for(o.parentNode.removeChild(o),this.fitDataColAvg=Math.floor(n/(s+1)),s;so.vDomScrollPosLeft&&n.8*this.holderEl.clientWidth?this.reinitialize():e>0?(this.addColRight(),this.removeColLeft()):(this.addColLeft(),this.removeColRight())},a.prototype.colPositionAdjust=function(e,t,o){for(var i=e;i=this.columns.length-1?this.vDomPadRight=0:this.vDomPadRight-=i.getWidth(),this.element.style.paddingRight=this.vDomPadRight+"px",this.addColRight())},a.prototype.addColLeft=function(){var e=this.columns[this.leftCol-1];if(e&&e.modules.vdomHoz.rightPos>=this.vDomScrollPosLeft){this.table.rowManager.getVisibleRows().forEach(function(t){if("group"!==t.type){var o=t.getCell(e);t.getElement().prepend(o.getElement()),o.cellRendered()}}),this.leftCol?this.vDomPadLeft-=e.getWidth():this.vDomPadLeft=0,this.element.style.paddingLeft=this.vDomPadLeft+"px",this.leftCol--,this.addColLeft()}},a.prototype.removeColRight=function(e){var t,e=this.columns[this.rightCol];e&&e.modules.vdomHoz.leftPos>this.vDomScrollPosRight&&(t=this.table.rowManager.getVisibleRows(),e.modules.vdomHoz.visible=!1,t.forEach(function(t){if("group"!==t.type){var o=t.getCell(e);t.getElement().removeChild(o.getElement())}}),this.vDomPadRight+=e.getWidth(),this.element.style.paddingRight=this.vDomPadRight+"px",this.rightCol--,this.removeColRight())},a.prototype.removeColLeft=function(){var e,t=this.columns[this.leftCol];t&&t.modules.vdomHoz.rightPos-1}return!1},r.prototype.treeCollapse=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.collapseRow(this._row)},r.prototype.treeExpand=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.expandRow(this._row)},r.prototype.treeToggle=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.toggleRow(this._row)},r.prototype.getTreeParent=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeParent(this._row)},r.prototype.getTreeChildren=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeChildren(this._row,!0)},r.prototype.addTreeChild=function(e,t,o){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.addTreeChildRow(this._row,e,t,o)},r.prototype.reformat=function(){return this._row.reinitialize()},r.prototype.getGroup=function(){return this._row.getGroup().getComponent()},r.prototype.getTable=function(){return this._row.table},r.prototype.getNextRow=function(){var e=this._row.nextRow();return e?e.getComponent():e},r.prototype.getPrevRow=function(){var e=this._row.prevRow();return e?e.getComponent():e};var l=function(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"row";this.table=t.table,this.parent=t,this.data={},this.type=o,this.element=this.createElement(),this.modules={},this.cells=[],this.height=0,this.heightStyled="",this.manualHeight=!1,this.outerHeight=0,this.initialized=!1,this.heightInitialized=!1,this.component=null,this.setData(e),this.generateElement()};l.prototype.createElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-row"),e.setAttribute("role","row"),e},l.prototype.getElement=function(){return this.element},l.prototype.detachElement=function(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)},l.prototype.generateElement=function(){var e,t,o,i=this;!1!==i.table.options.selectable&&i.table.modExists("selectRow")&&i.table.modules.selectRow.initializeRow(this),!1!==i.table.options.movableRows&&i.table.modExists("moveRow")&&i.table.modules.moveRow.initializeRow(this),!1!==i.table.options.dataTree&&i.table.modExists("dataTree")&&i.table.modules.dataTree.initializeRow(this),"collapse"===i.table.options.responsiveLayout&&i.table.modExists("responsiveLayout")&&i.table.modules.responsiveLayout.initializeRow(this),(i.table.options.rowContextMenu||i.table.options.rowClickMenu)&&this.table.modExists("menu")&&i.table.modules.menu.initializeRow(this),i.table.options.rowClick&&i.element.addEventListener("click",function(e){i.table.options.rowClick(e,i.getComponent())}),i.table.options.rowDblClick&&i.element.addEventListener("dblclick",function(e){i.table.options.rowDblClick(e,i.getComponent())}),i.table.options.rowContext&&i.element.addEventListener("contextmenu",function(e){i.table.options.rowContext(e,i.getComponent())}),i.table.options.rowMouseEnter&&i.element.addEventListener("mouseenter",function(e){i.table.options.rowMouseEnter(e,i.getComponent())}),i.table.options.rowMouseLeave&&i.element.addEventListener("mouseleave",function(e){i.table.options.rowMouseLeave(e,i.getComponent())}),i.table.options.rowMouseOver&&i.element.addEventListener("mouseover",function(e){i.table.options.rowMouseOver(e,i.getComponent())}),i.table.options.rowMouseOut&&i.element.addEventListener("mouseout",function(e){i.table.options.rowMouseOut(e,i.getComponent())}),i.table.options.rowMouseMove&&i.element.addEventListener("mousemove",function(e){i.table.options.rowMouseMove(e,i.getComponent())}),i.table.options.rowTap&&(o=!1,i.element.addEventListener("touchstart",function(e){o=!0},{passive:!0}),i.element.addEventListener("touchend",function(e){o&&i.table.options.rowTap(e,i.getComponent()),o=!1})),i.table.options.rowDblTap&&(e=null,i.element.addEventListener("touchend",function(t){e?(clearTimeout(e),e=null,i.table.options.rowDblTap(t,i.getComponent())):e=setTimeout(function(){clearTimeout(e),e=null},300)})),i.table.options.rowTapHold&&(t=null,i.element.addEventListener("touchstart",function(e){clearTimeout(t),t=setTimeout(function(){clearTimeout(t),t=null,o=!1,i.table.options.rowTapHold(e,i.getComponent())},1e3)},{passive:!0}),i.element.addEventListener("touchend",function(e){clearTimeout(t),t=null}))},l.prototype.generateCells=function(){this.cells=this.table.columnManager.generateCells(this)},l.prototype.initialize=function(e){var t=this;if(!this.initialized||e){for(this.deleteCells();this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layoutRow(this),this.generateCells(),this.table.options.virtualDomHoz&&this.table.vdomHoz.initialized?this.table.vdomHoz.initializeRow(this):this.cells.forEach(function(e){t.element.appendChild(e.getElement()),e.cellRendered()}),e&&this.normalizeHeight(),this.table.options.dataTree&&this.table.modExists("dataTree")&&this.table.modules.dataTree.layoutRow(this),"collapse"===this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout")&&this.table.modules.responsiveLayout.layoutRow(this),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent()),this.table.options.resizableRows&&this.table.modExists("resizeRows")&&this.table.modules.resizeRows.initializeRow(this),this.initialized=!0}else this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitializeRow(this)},l.prototype.reinitializeHeight=function(){this.heightInitialized=!1,null!==this.element.offsetParent&&this.normalizeHeight(!0)},l.prototype.reinitialize=function(e){this.initialized=!1,this.heightInitialized=!1,this.manualHeight||(this.height=0,this.heightStyled=""),null!==this.element.offsetParent&&this.initialize(!0),this.table.options.dataTree&&this.table.modExists("dataTree",!0)&&this.table.modules.dataTree.getTreeChildren(this,!1,!0).forEach(function(e){e.reinitialize(!0)})},l.prototype.calcHeight=function(e){var t=0,o=this.table.options.resizableRows?this.element.clientHeight:0;this.cells.forEach(function(e){var o=e.getHeight();o>t&&(t=o)}),this.height=e?Math.max(t,o):this.manualHeight?this.height:Math.max(t,o),this.heightStyled=this.height?this.height+"px":"",this.outerHeight=this.element.offsetHeight},l.prototype.setCellHeight=function(){this.cells.forEach(function(e){e.setHeight()}),this.heightInitialized=!0},l.prototype.clearCellHeight=function(){this.cells.forEach(function(e){e.clearHeight()})},l.prototype.normalizeHeight=function(e){e&&this.clearCellHeight(),this.calcHeight(e),this.setCellHeight()},l.prototype.setHeight=function(e,t){(this.height!=e||t)&&(this.manualHeight=!0,this.height=e,this.heightStyled=e?e+"px":"",this.setCellHeight(),this.outerHeight=this.element.offsetHeight)},l.prototype.getHeight=function(){return this.outerHeight},l.prototype.getWidth=function(){return this.element.offsetWidth},l.prototype.deleteCell=function(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)},l.prototype.setData=function(e){this.table.modExists("mutator")&&(e=this.table.modules.mutator.transformRow(e,"data")),this.data=e,this.table.options.reactiveData&&this.table.modExists("reactiveData",!0)&&this.table.modules.reactiveData.watchRow(this)},l.prototype.updateData=function(e){var t,o=this,i=h.prototype.helpers.elVisible(this.element),n={};return new Promise(function(s,a){"string"==typeof e&&(e=JSON.parse(e)),o.table.options.reactiveData&&o.table.modExists("reactiveData",!0)&&o.table.modules.reactiveData.block(),o.table.modExists("mutator")?(n=Object.assign(n,o.data),n=Object.assign(n,e),t=o.table.modules.mutator.transformRow(n,"data",e)):t=e;for(var r in t)o.data[r]=t[r];o.table.options.reactiveData&&o.table.modExists("reactiveData",!0)&&o.table.modules.reactiveData.unblock();for(var r in e){o.table.columnManager.getColumnsByFieldRoot(r).forEach(function(e){var n=o.getCell(e.getField());if(n){var s=e.getFieldValue(t);n.getValue()!=s&&(n.setValueProcessData(s),i&&n.cellRendered())}})}o.table.options.groupUpdateOnCellEdit&&o.table.options.groupBy&&o.table.modExists("groupRows")&&o.table.modules.groupRows.reassignRowToGroup(o.row),i?(o.normalizeHeight(!0),o.table.options.rowFormatter&&o.table.options.rowFormatter(o.getComponent())):(o.initialized=!1,o.height=0,o.heightStyled=""),!1!==o.table.options.dataTree&&o.table.modExists("dataTree")&&o.table.modules.dataTree.redrawNeeded(e)&&(o.table.modules.dataTree.initializeRow(o),i&&(o.table.modules.dataTree.layoutRow(o),o.table.rowManager.refreshActiveData("tree",!1,!0))),o.table.options.rowUpdated.call(o.table,o.getComponent()),o.table.options.dataChanged&&o.table.options.dataChanged.call(o.table,o.table.rowManager.getData()),s()})},l.prototype.getData=function(e){return e&&this.table.modExists("accessor")?this.table.modules.accessor.transformRow(this,e):this.data},l.prototype.getCell=function(e){return e=this.table.columnManager.findColumn(e),this.cells.find(function(t){return t.column===e})},l.prototype.getCellIndex=function(e){return this.cells.findIndex(function(t){return t===e})},l.prototype.findNextEditableCell=function(e){var t=!1;if(e0)for(var o=e-1;o>=0;o--){var i=this.cells[o],n=!0;if(i.column.modules.edit&&h.prototype.helpers.elVisible(i.getElement())&&("function"==typeof i.column.modules.edit.check&&(n=i.column.modules.edit.check(i.getComponent())),n)){t=i;break}}return t},l.prototype.getCells=function(){return this.cells},l.prototype.nextRow=function(){return this.table.rowManager.nextDisplayRow(this,!0)||!1},l.prototype.prevRow=function(){return this.table.rowManager.prevDisplayRow(this,!0)||!1},l.prototype.moveToRow=function(e,t){var o=this.table.rowManager.findRow(e);o?(this.table.rowManager.moveRowActual(this,o,!t),this.table.rowManager.refreshActiveData("display",!1,!0)):console.warn("Move Error - No matching row found:",e)},l.prototype.validate=function(){var e=[];return this.cells.forEach(function(t){t.validate()||e.push(t.getComponent())}),!e.length||e},l.prototype.delete=function(){var e=this;return new Promise(function(t,o){var i,n;e.table.options.history&&e.table.modExists("history")&&(e.table.options.groupBy&&e.table.modExists("groupRows")?(n=e.getGroup().rows,(i=n.indexOf(e))&&(i=n[i-1])):(i=e.table.rowManager.getRowIndex(e))&&(i=e.table.rowManager.rows[i-1]),e.table.modules.history.action("rowDelete",e,{data:e.getData(),pos:!i,index:i})),e.deleteActual(),t()})},l.prototype.deleteActual=function(e){this.table.rowManager.getRowIndex(this);this.detatchModules(),this.table.options.reactiveData&&this.table.modExists("reactiveData",!0),this.modules.group&&this.modules.group.removeRow(this),this.table.rowManager.deleteRow(this,e),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.element=!1,this.table.options.dataTree&&this.table.modExists("dataTree",!0)&&this.table.modules.dataTree.rowDelete(this),this.table.modExists("columnCalcs")&&(this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.columnCalcs.recalcRowGroup(this):this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows))},l.prototype.detatchModules=function(){this.table.modExists("selectRow")&&this.table.modules.selectRow._deselectRow(this,!0),this.table.modExists("edit")&&this.table.modules.edit.currentCell.row===this&&this.table.modules.edit.cancelEdit(),this.table.modExists("frozenRows")&&this.table.modules.frozenRows.detachRow(this)},l.prototype.deleteCells=function(){for(var e=this.cells.length,t=0;t",footerElement:!1,index:"id",textDirection:"auto",keybindings:[],tabEndNewRow:!1,invalidOptionWarnings:!0,clipboard:!1,clipboardCopyStyled:!0,clipboardCopyConfig:!1,clipboardCopyFormatter:!1,clipboardCopyRowRange:"active",clipboardPasteParser:"table",clipboardPasteAction:"insert",clipboardCopied:function(){},clipboardPasted:function(){},clipboardPasteError:function(){},downloadDataFormatter:!1,downloadReady:function(e,t){return t},downloadComplete:!1,downloadConfig:{},downloadRowRange:"active",dataTree:!1,dataTreeFilter:!0,dataTreeSort:!0,dataTreeElementColumn:!1,dataTreeBranchElement:!0,dataTreeChildIndent:9,dataTreeChildField:"_children",dataTreeCollapseElement:!1,dataTreeExpandElement:!1,dataTreeStartExpanded:!1,dataTreeRowExpanded:function(){},dataTreeRowCollapsed:function(){},dataTreeChildColumnCalcs:!1,dataTreeSelectPropagate:!1,printAsHtml:!1,printFormatter:!1,printHeader:!1,printFooter:!1,printCopyStyle:!0,printStyled:!0,printVisibleRows:!0,printRowRange:"visible",printConfig:{},addRowPos:"bottom",selectable:"highlight",selectableRangeMode:"drag",selectableRollingSelection:!0,selectablePersistence:!0,selectableCheck:function(e,t){return!0},headerFilterLiveFilterDelay:300,headerFilterPlaceholder:!1,headerVisible:!0,history:!1,locale:!1,langs:{},virtualDom:!0,virtualDomBuffer:0,virtualDomHoz:!1,persistentLayout:!1,persistentSort:!1,persistentFilter:!1,persistenceID:"",persistenceMode:!0,persistenceReaderFunc:!1,persistenceWriterFunc:!1,persistence:!1,responsiveLayout:!1,responsiveLayoutCollapseStartOpen:!0,responsiveLayoutCollapseUseFormatters:!0,responsiveLayoutCollapseFormatter:!1,pagination:!1,paginationSize:!1,paginationInitialPage:1,paginationButtonCount:5,paginationSizeSelector:!1,paginationElement:!1,paginationDataSent:{},paginationDataReceived:{},paginationAddRow:"page",ajaxURL:!1,ajaxURLGenerator:!1,ajaxParams:{},ajaxConfig:"get",ajaxContentType:"form",ajaxRequestFunc:!1,ajaxLoader:!0,ajaxLoaderLoading:!1,ajaxLoaderError:!1,ajaxFiltering:!1,ajaxSorting:!1,ajaxProgressiveLoad:!1,ajaxProgressiveLoadDelay:0,ajaxProgressiveLoadScrollMargin:0,groupBy:!1,groupStartOpen:!0,groupValues:!1,groupUpdateOnCellEdit:!1,groupHeader:!1,groupHeaderPrint:null,groupHeaderClipboard:null,groupHeaderHtmlOutput:null,groupHeaderDownload:null,htmlOutputConfig:!1,movableColumns:!1,movableRows:!1,movableRowsConnectedTables:!1,movableRowsConnectedElements:!1,movableRowsSender:!1,movableRowsReceiver:"insert",movableRowsSendingStart:function(){},movableRowsSent:function(){},movableRowsSentFailed:function(){},movableRowsSendingStop:function(){},movableRowsReceivingStart:function(){},movableRowsReceived:function(){},movableRowsReceivedFailed:function(){},movableRowsReceivingStop:function(){},movableRowsElementDrop:function(){},scrollToRowPosition:"top",scrollToRowIfVisible:!0,scrollToColumnPosition:"left",scrollToColumnIfVisible:!0,rowFormatter:!1,rowFormatterPrint:null,rowFormatterClipboard:null,rowFormatterHtmlOutput:null,placeholder:!1,tableBuilding:function(){},tableBuilt:function(){},renderStarted:function(){},renderComplete:function(){},rowClick:!1,rowDblClick:!1,rowContext:!1,rowTap:!1,rowDblTap:!1,rowTapHold:!1,rowMouseEnter:!1,rowMouseLeave:!1,rowMouseOver:!1,rowMouseOut:!1,rowMouseMove:!1,rowContextMenu:!1,rowClickMenu:!1,rowAdded:function(){},rowDeleted:function(){},rowMoved:function(){},rowUpdated:function(){},rowSelectionChanged:function(){},rowSelected:function(){},rowDeselected:function(){},rowResized:function(){},cellClick:!1,cellDblClick:!1,cellContext:!1,cellTap:!1,cellDblTap:!1,cellTapHold:!1,cellMouseEnter:!1,cellMouseLeave:!1,cellMouseOver:!1,cellMouseOut:!1,cellMouseMove:!1,cellEditing:function(){},cellEdited:function(){},cellEditCancelled:function(){},columnMoved:!1,columnResized:function(){},columnTitleChanged:function(){},columnVisibilityChanged:function(){},htmlImporting:function(){},htmlImported:function(){},dataLoading:function(){},dataLoaded:function(){},dataEdited:!1,dataChanged:!1,ajaxRequesting:function(){},ajaxResponse:!1,ajaxError:function(){},dataFiltering:!1,dataFiltered:!1,dataSorting:function(){},dataSorted:function(){},groupToggleElement:"arrow",groupClosedShowCalcs:!1,dataGrouping:function(){},dataGrouped:!1,groupVisibilityChanged:function(){},groupClick:!1,groupDblClick:!1,groupContext:!1,groupContextMenu:!1,groupClickMenu:!1,groupTap:!1,groupDblTap:!1,groupTapHold:!1,columnCalcs:!0,pageLoaded:function(){},localized:function(){},validationMode:"blocking",validationFailed:function(){},historyUndo:function(){},historyRedo:function(){},scrollHorizontal:function(){},scrollVertical:function(){}},h.prototype.initializeOptions=function(e){if(!1!==e.invalidOptionWarnings)for(var t in e)void 0===this.defaultOptions[t]&&console.warn("Invalid table constructor option:",t);for(var t in this.defaultOptions)t in e?this.options[t]=e[t]:Array.isArray(this.defaultOptions[t])?this.options[t]=Object.assign([],this.defaultOptions[t]):"object"===_typeof(this.defaultOptions[t])&&null!==this.defaultOptions[t]?this.options[t]=Object.assign({},this.defaultOptions[t]):this.options[t]=this.defaultOptions[t]},h.prototype.initializeElement=function(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement?(this.element=e,!0):"string"==typeof e?(this.element=document.querySelector(e),!!this.element||(console.error("Tabulator Creation Error - no element found matching selector: ",e),!1)):(console.error("Tabulator Creation Error - Invalid element provided:",e),!1)},h.prototype.rtlCheck=function(){var e=window.getComputedStyle(this.element);switch(this.options.textDirection){case"auto":if("rtl"!==e.direction)break;case"rtl":this.element.classList.add("tabulator-rtl"),this.rtl=!0;break;case"ltr":this.element.classList.add("tabulator-ltr");default:this.rtl=!1}},h.prototype._mapDepricatedFunctionality=function(){(this.options.persistentLayout||this.options.persistentSort||this.options.persistentFilter)&&(this.options.persistence||(this.options.persistence={})),this.options.dataEdited&&(console.warn("DEPRECATION WARNING - dataEdited option has been deprecated, please use the dataChanged option instead"),this.options.dataChanged=this.options.dataEdited),this.options.downloadDataFormatter&&console.warn("DEPRECATION WARNING - downloadDataFormatter option has been deprecated"),void 0!==this.options.clipboardCopyHeader&&(this.options.columnHeaders=this.options.clipboardCopyHeader,console.warn("DEPRECATION WARNING - clipboardCopyHeader option has been deprecated, please use the columnHeaders property on the clipboardCopyConfig option")),!0!==this.options.printVisibleRows&&(console.warn("printVisibleRows option is deprecated, you should now use the printRowRange option"),this.options.persistence.printRowRange="active"),!0!==this.options.printCopyStyle&&(console.warn("printCopyStyle option is deprecated, you should now use the printStyled option"),this.options.persistence.printStyled=this.options.printCopyStyle),this.options.persistentLayout&&(console.warn("persistentLayout option is deprecated, you should now use the persistence option"),!0!==this.options.persistence&&void 0===this.options.persistence.columns&&(this.options.persistence.columns=!0)),this.options.persistentSort&&(console.warn("persistentSort option is deprecated, you should now use the persistence option"),!0!==this.options.persistence&&void 0===this.options.persistence.sort&&(this.options.persistence.sort=!0)),this.options.persistentFilter&&(console.warn("persistentFilter option is deprecated, you should now use the persistence option"),!0!==this.options.persistence&&void 0===this.options.persistence.filter&&(this.options.persistence.filter=!0)),this.options.columnVertAlign&&(console.warn("columnVertAlign option is deprecated, you should now use the columnHeaderVertAlign option"),this.options.columnHeaderVertAlign=this.options.columnVertAlign)},h.prototype._clearSelection=function(){this.element.classList.add("tabulator-block-select"),window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty(),this.element.classList.remove("tabulator-block-select")},h.prototype._create=function(){this._clearObjectPointers(),this._mapDepricatedFunctionality(),this.bindModules(),this.rtlCheck(),"TABLE"===this.element.tagName&&this.modExists("htmlTableImport",!0)&&this.modules.htmlTableImport.parseTable(),this.columnManager=new t(this),this.rowManager=new s(this),this.footerManager=new d(this),this.columnManager.setRowManager(this.rowManager),this.rowManager.setColumnManager(this.columnManager),this.options.virtualDomHoz&&(this.vdomHoz=new a(this)),this._buildElement(),this._loadInitialData()},h.prototype._clearObjectPointers=function(){this.options.columns=this.options.columns.slice(0),this.options.reactiveData||(this.options.data=this.options.data.slice(0))},h.prototype._buildElement=function(){var e=this,t=this.element,o=this.modules,i=this.options;for(i.tableBuilding.call(this),t.classList.add("tabulator"),t.setAttribute("role","grid");t.firstChild;)t.removeChild(t.firstChild);i.height&&(i.height=isNaN(i.height)?i.height:i.height+"px",t.style.height=i.height),!1!==i.minHeight&&(i.minHeight=isNaN(i.minHeight)?i.minHeight:i.minHeight+"px",t.style.minHeight=i.minHeight),!1!==i.maxHeight&&(i.maxHeight=isNaN(i.maxHeight)?i.maxHeight:i.maxHeight+"px",t.style.maxHeight=i.maxHeight),this.columnManager.initialize(),this.rowManager.initialize(),this._detectBrowser(),this.modExists("layout",!0)&&o.layout.initialize(i.layout),o.localize.initialize(),!1!==i.headerFilterPlaceholder&&o.localize.setHeaderFilterPlaceholder(i.headerFilterPlaceholder);for(var n in i.langs)o.localize.installLang(n,i.langs[n]);if(o.localize.setLocale(i.locale),"string"==typeof i.placeholder){var s=document.createElement("div");s.classList.add("tabulator-placeholder");var a=document.createElement("span");a.innerHTML=i.placeholder,s.appendChild(a),i.placeholder=s}if(t.appendChild(this.columnManager.getElement()),t.appendChild(this.rowManager.getElement()),i.footerElement&&this.footerManager.activate(),i.persistence&&this.modExists("persistence",!0)&&o.persistence.initialize(),i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.columns&&(i.columns=o.persistence.load("columns",i.columns)),i.movableRows&&this.modExists("moveRow")&&o.moveRow.initialize(),i.autoColumns&&this.options.data&&this.columnManager.generateColumnsFromRowData(this.options.data),this.modExists("columnCalcs")&&o.columnCalcs.initialize(),this.columnManager.setColumns(i.columns),i.dataTree&&this.modExists("dataTree",!0)&&o.dataTree.initialize(),this.modExists("frozenRows")&&this.modules.frozenRows.initialize(),(i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.sort||i.initialSort)&&this.modExists("sort",!0)){var r=[];i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.sort?!1===(r=o.persistence.load("sort"))&&i.initialSort&&(r=i.initialSort):i.initialSort&&(r=i.initialSort),o.sort.setSort(r)}if((i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.filter||i.initialFilter)&&this.modExists("filter",!0)){var l=[];i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.filter?!1===(l=o.persistence.load("filter"))&&i.initialFilter&&(l=i.initialFilter):i.initialFilter&&(l=i.initialFilter),o.filter.setFilter(l)}i.initialHeaderFilter&&this.modExists("filter",!0)&&i.initialHeaderFilter.forEach(function(t){var i=e.columnManager.findColumn(t.field);if(!i)return console.warn("Column Filter Error - No matching column found:",t.field),!1;o.filter.setHeaderFilterValue(i,t.value)}),this.modExists("ajax")&&o.ajax.initialize(),i.pagination&&this.modExists("page",!0)&&o.page.initialize(),i.groupBy&&this.modExists("groupRows",!0)&&o.groupRows.initialize(),this.modExists("keybindings")&&o.keybindings.initialize(),this.modExists("selectRow")&&o.selectRow.clearSelectionData(!0),i.autoResize&&this.modExists("resizeTable")&&o.resizeTable.initialize(),this.modExists("clipboard")&&o.clipboard.initialize(),i.printAsHtml&&this.modExists("print")&&o.print.initialize(),i.tableBuilt.call(this)},h.prototype._loadInitialData=function(){var e=this;if(e.options.pagination&&e.modExists("page"))if(e.modules.page.reset(!0,!0),"local"==e.options.pagination){if(e.options.data.length)e.rowManager.setData(e.options.data,!1,!0);else{if((e.options.ajaxURL||e.options.ajaxURLGenerator)&&e.modExists("ajax"))return void e.modules.ajax.loadData(!1,!0).then(function(){}).catch(function(){e.options.paginationInitialPage&&e.modules.page.setPage(e.options.paginationInitialPage)});e.rowManager.setData(e.options.data,!1,!0)}e.options.paginationInitialPage&&e.modules.page.setPage(e.options.paginationInitialPage)}else e.options.ajaxURL?e.modules.page.setPage(e.options.paginationInitialPage).then(function(){}).catch(function(){}):e.rowManager.setData([],!1,!0);else e.options.data.length?e.rowManager.setData(e.options.data):(e.options.ajaxURL||e.options.ajaxURLGenerator)&&e.modExists("ajax")?e.modules.ajax.loadData(!1,!0).then(function(){}).catch(function(){}):e.rowManager.setData(e.options.data,!1,!0)},h.prototype.destroy=function(){var e=this.element;for(h.prototype.comms.deregister(this),this.options.reactiveData&&this.modExists("reactiveData",!0)&&this.modules.reactiveData.unwatchData(),this.rowManager.rows.forEach(function(e){e.wipe()}),this.rowManager.rows=[],this.rowManager.activeRows=[],this.rowManager.displayRows=[],this.options.autoResize&&this.modExists("resizeTable")&&this.modules.resizeTable.clearBindings(),this.modExists("keybindings")&&this.modules.keybindings.clearBindings();e.firstChild;)e.removeChild(e.firstChild);e.classList.remove("tabulator")},h.prototype._detectBrowser=function(){var e=navigator.userAgent||navigator.vendor||window.opera;e.indexOf("Trident")>-1?(this.browser="ie",this.browserSlow=!0):e.indexOf("Edge")>-1?(this.browser="edge",this.browserSlow=!0):e.indexOf("Firefox")>-1?(this.browser="firefox",this.browserSlow=!1):(this.browser="other",this.browserSlow=!1),this.browserMobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4))},h.prototype.blockRedraw=function(){return this.rowManager.blockRedraw()},h.prototype.restoreRedraw=function(){return this.rowManager.restoreRedraw()},h.prototype.setDataFromLocalFile=function(e){var t=this;return new Promise(function(o,i){var n=document.createElement("input");n.type="file",n.accept=e||".json,application/json",n.addEventListener("change",function(e){var s,a=n.files[0],r=new FileReader;r.readAsText(a),r.onload=function(e){try{s=JSON.parse(r.result)}catch(e){return console.warn("File Load Error - File contents is invalid JSON",e),void i(e)}t.setData(s).then(function(e){o(e)}).catch(function(e){o(e)})},r.onerror=function(e){console.warn("File Load Error - Unable to read file"),i()}}),n.click()})},h.prototype.setData=function(e,t,o){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(e,t,o,!1,!0)},h.prototype._setData=function(e,t,o,i,n){var s=this;return"string"!=typeof e?e?s.rowManager.setData(e,i,n):s.modExists("ajax")&&(s.modules.ajax.getUrl||s.options.ajaxURLGenerator)?"remote"==s.options.pagination&&s.modExists("page",!0)?(s.modules.page.reset(!0,!0),s.modules.page.setPage(1)):s.modules.ajax.loadData(i,n):s.rowManager.setData([],i,n):0==e.indexOf("{")||0==e.indexOf("[")?s.rowManager.setData(JSON.parse(e),i,n):s.modExists("ajax",!0)?(t&&s.modules.ajax.setParams(t),o&&s.modules.ajax.setConfig(o),s.modules.ajax.setUrl(e),"remote"==s.options.pagination&&s.modExists("page",!0)?(s.modules.page.reset(!0,!0),s.modules.page.setPage(1)):s.modules.ajax.loadData(i,n)):void 0},h.prototype.clearData=function(){this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this.rowManager.clearData()},h.prototype.getData=function(e){return!0===e&&(console.warn("passing a boolean to the getData function is deprecated, you should now pass the string 'active'"),e="active"),this.rowManager.getData(e)},h.prototype.getDataCount=function(e){return!0===e&&(console.warn("passing a boolean to the getDataCount function is deprecated, you should now pass the string 'active'"),e="active"),this.rowManager.getDataCount(e)},h.prototype.searchRows=function(e,t,o){if(this.modExists("filter",!0))return this.modules.filter.search("rows",e,t,o)},h.prototype.searchData=function(e,t,o){if(this.modExists("filter",!0))return this.modules.filter.search("data",e,t,o)},h.prototype.getHtml=function(e,t,o){if(this.modExists("export",!0))return this.modules.export.getHtml(e,t,o)},h.prototype.print=function(e,t,o){if(this.modExists("print",!0))return this.modules.print.printFullscreen(e,t,o)},h.prototype.getAjaxUrl=function(){if(this.modExists("ajax",!0))return this.modules.ajax.getUrl()},h.prototype.replaceData=function(e,t,o){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(e,t,o,!0)},h.prototype.updateData=function(e){var t=this,o=this,i=0;return new Promise(function(n,s){t.modExists("ajax")&&t.modules.ajax.blockActiveRequest(),"string"==typeof e&&(e=JSON.parse(e)),e?e.forEach(function(e){var t=o.rowManager.findRow(e[o.options.index]);t&&(i++,t.updateData(e).then(function(){--i||n()}))}):(console.warn("Update Error - No data provided"),s("Update Error - No data provided"))})},h.prototype.addData=function(e,t,o){var i=this;return new Promise(function(n,s){i.modExists("ajax")&&i.modules.ajax.blockActiveRequest(),"string"==typeof e&&(e=JSON.parse(e)),e?i.rowManager.addRows(e,t,o).then(function(e){var t=[];e.forEach(function(e){t.push(e.getComponent())}),n(t)}):(console.warn("Update Error - No data provided"),s("Update Error - No data provided"))})},h.prototype.updateOrAddData=function(e){var t=this,o=this,i=[],n=0;return new Promise(function(s,a){t.modExists("ajax")&&t.modules.ajax.blockActiveRequest(),"string"==typeof e&&(e=JSON.parse(e)),e?e.forEach(function(e){var t=o.rowManager.findRow(e[o.options.index]);n++,t?t.updateData(e).then(function(){n--,i.push(t.getComponent()),n||s(i)}):o.rowManager.addRows(e).then(function(e){n--,i.push(e[0].getComponent()),n||s(i)})}):(console.warn("Update Error - No data provided"),a("Update Error - No data provided"))})},h.prototype.getRow=function(e){var t=this.rowManager.findRow(e);return t?t.getComponent():(console.warn("Find Error - No matching row found:",e),!1)},h.prototype.getRowFromPosition=function(e,t){var o=this.rowManager.getRowFromPosition(e,t);return o?o.getComponent():(console.warn("Find Error - No matching row found:",e),!1)},h.prototype.deleteRow=function(e){var t=this;return new Promise(function(o,i){function n(){++a==e.length&&r&&(s.rowManager.reRenderInPosition(),o())}var s=t,a=0,r=0,l=[];Array.isArray(e)||(e=[e]),e.forEach(function(e){var o=t.rowManager.findRow(e,!0);o?l.push(o):(console.warn("Delete Error - No matching row found:",e),i("Delete Error - No matching row found"),n())}),l.sort(function(e,o){return t.rowManager.rows.indexOf(e)>t.rowManager.rows.indexOf(o)?1:-1}),l.forEach(function(e){e.delete().then(function(){r++,n()}).catch(function(e){n(),i(e)})})})},h.prototype.addRow=function(e,t,o){var i=this;return new Promise(function(n,s){"string"==typeof e&&(e=JSON.parse(e)),i.rowManager.addRows(e,t,o).then(function(e){i.modExists("columnCalcs")&&i.modules.columnCalcs.recalc(i.rowManager.activeRows),n(e[0].getComponent())})})},h.prototype.updateOrAddRow=function(e,t){var o=this;return new Promise(function(i,n){var s=o.rowManager.findRow(e);"string"==typeof t&&(t=JSON.parse(t)),s?s.updateData(t).then(function(){o.modExists("columnCalcs")&&o.modules.columnCalcs.recalc(o.rowManager.activeRows),i(s.getComponent())}).catch(function(e){n(e)}):s=o.rowManager.addRows(t).then(function(e){o.modExists("columnCalcs")&&o.modules.columnCalcs.recalc(o.rowManager.activeRows),i(e[0].getComponent())}).catch(function(e){n(e)})})},h.prototype.updateRow=function(e,t){var o=this;return new Promise(function(i,n){var s=o.rowManager.findRow(e);"string"==typeof t&&(t=JSON.parse(t)),s?s.updateData(t).then(function(){i(s.getComponent())}).catch(function(e){n(e)}):(console.warn("Update Error - No matching row found:",e),n("Update Error - No matching row found"))})},h.prototype.scrollToRow=function(e,t,o){var i=this;return new Promise(function(n,s){var a=i.rowManager.findRow(e);a?i.rowManager.scrollToRow(a,t,o).then(function(){n()}).catch(function(e){s(e)}):(console.warn("Scroll Error - No matching row found:",e),s("Scroll Error - No matching row found"))})},h.prototype.moveRow=function(e,t,o){var i=this.rowManager.findRow(e);i?i.moveToRow(t,o):console.warn("Move Error - No matching row found:",e)},h.prototype.getRows=function(e){return!0===e&&(console.warn("passing a boolean to the getRows function is deprecated, you should now pass the string 'active'"),e="active"),this.rowManager.getComponents(e)},h.prototype.getRowPosition=function(e,t){var o=this.rowManager.findRow(e);return o?this.rowManager.getRowPosition(o,t):(console.warn("Position Error - No matching row found:",e),!1)},h.prototype.copyToClipboard=function(e){this.modExists("clipboard",!0)&&this.modules.clipboard.copy(e)},h.prototype.setColumns=function(e){this.columnManager.setColumns(e)},h.prototype.getColumns=function(e){return this.columnManager.getComponents(e)},h.prototype.getColumn=function(e){var t=this.columnManager.findColumn(e);return t?t.getComponent():(console.warn("Find Error - No matching column found:",e),!1)},h.prototype.getColumnDefinitions=function(){return this.columnManager.getDefinitionTree()},h.prototype.getColumnLayout=function(){if(this.modExists("persistence",!0))return this.modules.persistence.parseColumns(this.columnManager.getColumns())},h.prototype.setColumnLayout=function(e){return!!this.modExists("persistence",!0)&&(this.columnManager.setColumns(this.modules.persistence.mergeDefinition(this.options.columns,e)),!0)},h.prototype.showColumn=function(e){var t=this.columnManager.findColumn(e);if(!t)return console.warn("Column Show Error - No matching column found:",e),!1;t.show(),this.options.responsiveLayout&&this.modExists("responsiveLayout",!0)&&this.modules.responsiveLayout.update()},h.prototype.hideColumn=function(e){var t=this.columnManager.findColumn(e);if(!t)return console.warn("Column Hide Error - No matching column found:",e),!1;t.hide(),this.options.responsiveLayout&&this.modExists("responsiveLayout",!0)&&this.modules.responsiveLayout.update()},h.prototype.toggleColumn=function(e){var t=this.columnManager.findColumn(e);if(!t)return console.warn("Column Visibility Toggle Error - No matching column found:",e),!1;t.visible?t.hide():t.show()},h.prototype.addColumn=function(e,t,o){var i=this;return new Promise(function(n,s){var a=i.columnManager.findColumn(o);i.columnManager.addColumn(e,t,a).then(function(e){n(e.getComponent())}).catch(function(e){s(e)})})},h.prototype.deleteColumn=function(e){var t=this;return new Promise(function(o,i){var n=t.columnManager.findColumn(e);n?n.delete().then(function(){o()}).catch(function(e){i(e)}):(console.warn("Column Delete Error - No matching column found:",e),i())})},h.prototype.updateColumnDefinition=function(e,t){var o=this;return new Promise(function(i,n){var s=o.columnManager.findColumn(e);s?s.updateDefinition(t).then(function(e){i(e)}).catch(function(e){n(e)}):(console.warn("Column Update Error - No matching column found:",e),n())})},h.prototype.moveColumn=function(e,t,o){var i=this.columnManager.findColumn(e),n=this.columnManager.findColumn(t);i?n?this.columnManager.moveColumn(i,n,o):console.warn("Move Error - No matching column found:",n):console.warn("Move Error - No matching column found:",e)},h.prototype.scrollToColumn=function(e,t,o){var i=this;return new Promise(function(n,s){var a=i.columnManager.findColumn(e);a?i.columnManager.scrollToColumn(a,t,o).then(function(){n()}).catch(function(e){s(e)}):(console.warn("Scroll Error - No matching column found:",e),s("Scroll Error - No matching column found"))})},h.prototype.setLocale=function(e){this.modules.localize.setLocale(e)},h.prototype.getLocale=function(){return this.modules.localize.getLocale()},h.prototype.getLang=function(e){return this.modules.localize.getLang(e)},h.prototype.redraw=function(e){this.columnManager.redraw(e),this.rowManager.redraw(e)},h.prototype.setHeight=function(e){"classic"!==this.rowManager.renderMode?(this.options.height=isNaN(e)?e:e+"px",this.element.style.height=this.options.height,this.rowManager.setRenderMode(),this.rowManager.redraw()):console.warn("setHeight function is not available in classic render mode")}, -h.prototype.setSort=function(e,t){this.modExists("sort",!0)&&(this.modules.sort.setSort(e,t),this.rowManager.sorterRefresh())},h.prototype.getSorters=function(){if(this.modExists("sort",!0))return this.modules.sort.getSort()},h.prototype.clearSort=function(){this.modExists("sort",!0)&&(this.modules.sort.clear(),this.rowManager.sorterRefresh())},h.prototype.setFilter=function(e,t,o,i){this.modExists("filter",!0)&&(this.modules.filter.setFilter(e,t,o,i),this.rowManager.filterRefresh())},h.prototype.addFilter=function(e,t,o,i){this.modExists("filter",!0)&&(this.modules.filter.addFilter(e,t,o,i),this.rowManager.filterRefresh())},h.prototype.getFilters=function(e){if(this.modExists("filter",!0))return this.modules.filter.getFilters(e)},h.prototype.setHeaderFilterFocus=function(e){if(this.modExists("filter",!0)){var t=this.columnManager.findColumn(e);if(!t)return console.warn("Column Filter Focus Error - No matching column found:",e),!1;this.modules.filter.setHeaderFilterFocus(t)}},h.prototype.getHeaderFilterValue=function(e){if(this.modExists("filter",!0)){var t=this.columnManager.findColumn(e);if(t)return this.modules.filter.getHeaderFilterValue(t);console.warn("Column Filter Error - No matching column found:",e)}},h.prototype.setHeaderFilterValue=function(e,t){if(this.modExists("filter",!0)){var o=this.columnManager.findColumn(e);if(!o)return console.warn("Column Filter Error - No matching column found:",e),!1;this.modules.filter.setHeaderFilterValue(o,t)}},h.prototype.getHeaderFilters=function(){if(this.modExists("filter",!0))return this.modules.filter.getHeaderFilters()},h.prototype.removeFilter=function(e,t,o){this.modExists("filter",!0)&&(this.modules.filter.removeFilter(e,t,o),this.rowManager.filterRefresh())},h.prototype.clearFilter=function(e){this.modExists("filter",!0)&&(this.modules.filter.clearFilter(e),this.rowManager.filterRefresh())},h.prototype.clearHeaderFilter=function(){this.modExists("filter",!0)&&(this.modules.filter.clearHeaderFilter(),this.rowManager.filterRefresh())},h.prototype.selectRow=function(e){this.modExists("selectRow",!0)&&(!0===e&&(console.warn("passing a boolean to the selectRowselectRow function is deprecated, you should now pass the string 'active'"),e="active"),this.modules.selectRow.selectRows(e))},h.prototype.deselectRow=function(e){this.modExists("selectRow",!0)&&this.modules.selectRow.deselectRows(e)},h.prototype.toggleSelectRow=function(e){this.modExists("selectRow",!0)&&this.modules.selectRow.toggleRow(e)},h.prototype.getSelectedRows=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedRows()},h.prototype.getSelectedData=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedData()},h.prototype.getInvalidCells=function(){if(this.modExists("validate",!0))return this.modules.validate.getInvalidCells()},h.prototype.clearCellValidation=function(e){var t=this;this.modExists("validate",!0)&&(e||(e=this.modules.validate.getInvalidCells()),Array.isArray(e)||(e=[e]),e.forEach(function(e){t.modules.validate.clearValidation(e._getSelf())}))},h.prototype.validate=function(e){var t=[];return this.rowManager.rows.forEach(function(e){var o=e.validate();!0!==o&&(t=t.concat(o))}),!t.length||t},h.prototype.setMaxPage=function(e){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setMaxPage(e)},h.prototype.setPage=function(e){return this.options.pagination&&this.modExists("page")?this.modules.page.setPage(e):new Promise(function(e,t){t()})},h.prototype.setPageToRow=function(e){var t=this;return new Promise(function(o,i){t.options.pagination&&t.modExists("page")?(e=t.rowManager.findRow(e),e?t.modules.page.setPageToRow(e).then(function(){o()}).catch(function(){i()}):i()):i()})},h.prototype.setPageSize=function(e){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setPageSize(e),this.modules.page.setPage(1).then(function(){}).catch(function(){})},h.prototype.getPageSize=function(){if(this.options.pagination&&this.modExists("page",!0))return this.modules.page.getPageSize()},h.prototype.previousPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.previousPage()},h.prototype.nextPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.nextPage()},h.prototype.getPage=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPage()},h.prototype.getPageMax=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPageMax()},h.prototype.setGroupBy=function(e){if(!this.modExists("groupRows",!0))return!1;this.options.groupBy=e,this.modules.groupRows.initialize(),this.rowManager.refreshActiveData("display"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")},h.prototype.setGroupValues=function(e){if(!this.modExists("groupRows",!0))return!1;this.options.groupValues=e,this.modules.groupRows.initialize(),this.rowManager.refreshActiveData("display"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")},h.prototype.setGroupStartOpen=function(e){if(!this.modExists("groupRows",!0))return!1;this.options.groupStartOpen=e,this.modules.groupRows.initialize(),this.options.groupBy?(this.rowManager.refreshActiveData("group"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")):console.warn("Grouping Update - cant refresh view, no groups have been set")},h.prototype.setGroupHeader=function(e){if(!this.modExists("groupRows",!0))return!1;this.options.groupHeader=e,this.modules.groupRows.initialize(),this.options.groupBy?(this.rowManager.refreshActiveData("group"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")):console.warn("Grouping Update - cant refresh view, no groups have been set")},h.prototype.getGroups=function(e){return!!this.modExists("groupRows",!0)&&this.modules.groupRows.getGroups(!0)},h.prototype.getGroupedData=function(){if(this.modExists("groupRows",!0))return this.options.groupBy?this.modules.groupRows.getGroupedData():this.getData()},h.prototype.getEditedCells=function(){if(this.modExists("edit",!0))return this.modules.edit.getEditedCells()},h.prototype.clearCellEdited=function(e){var t=this;this.modExists("edit",!0)&&(e||(e=this.modules.edit.getEditedCells()),Array.isArray(e)||(e=[e]),e.forEach(function(e){t.modules.edit.clearEdited(e._getSelf())}))},h.prototype.getCalcResults=function(){return!!this.modExists("columnCalcs",!0)&&this.modules.columnCalcs.getResults()},h.prototype.recalc=function(){this.modExists("columnCalcs",!0)&&this.modules.columnCalcs.recalcAll(this.rowManager.activeRows)},h.prototype.navigatePrev=function(){var e=!1;return!(!this.modExists("edit",!0)||!(e=this.modules.edit.currentCell))&&e.nav().prev()},h.prototype.navigateNext=function(){var e=!1;return!(!this.modExists("edit",!0)||!(e=this.modules.edit.currentCell))&&e.nav().next()},h.prototype.navigateLeft=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().left())},h.prototype.navigateRight=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().right())},h.prototype.navigateUp=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().up())},h.prototype.navigateDown=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().down())},h.prototype.undo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.undo()},h.prototype.redo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.redo()},h.prototype.getHistoryUndoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryUndoSize()},h.prototype.getHistoryRedoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryRedoSize()},h.prototype.download=function(e,t,o,i){this.modExists("download",!0)&&this.modules.download.download(e,t,o,i)},h.prototype.downloadToTab=function(e,t,o,i){this.modExists("download",!0)&&this.modules.download.download(e,t,o,i,!0)},h.prototype.tableComms=function(e,t,o,i){this.modules.comms.receive(e,t,o,i)},h.prototype.moduleBindings={},h.prototype.extendModule=function(e,t,o){if(h.prototype.moduleBindings[e]){var i=h.prototype.moduleBindings[e].prototype[t];if(i)if("object"==(void 0===o?"undefined":_typeof(o)))for(var n in o)i[n]=o[n];else console.warn("Module Error - Invalid value type, it must be an object");else console.warn("Module Error - property does not exist:",t)}else console.warn("Module Error - module does not exist:",e)},h.prototype.registerModule=function(e,t){h.prototype.moduleBindings[e]=t},h.prototype.bindModules=function(){this.modules={};for(var e in h.prototype.moduleBindings)this.modules[e]=new h.prototype.moduleBindings[e](this)},h.prototype.modExists=function(e,t){return!!this.modules[e]||(t&&console.error("Tabulator Module Not Installed: "+e),!1)},h.prototype.helpers={elVisible:function(e){return!(e.offsetWidth<=0&&e.offsetHeight<=0)},elOffset:function(e){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset-document.documentElement.clientTop,left:t.left+window.pageXOffset-document.documentElement.clientLeft}},deepClone:function(e){var t=Object.assign(Array.isArray(e)?[]:{},e);for(var o in e)null!=e[o]&&"object"===_typeof(e[o])&&(e[o]instanceof Date?t[o]=new Date(e[o]):t[o]=this.deepClone(e[o]));return t}},h.prototype.comms={tables:[],register:function(e){h.prototype.comms.tables.push(e)},deregister:function(e){var t=h.prototype.comms.tables.indexOf(e);t>-1&&h.prototype.comms.tables.splice(t,1)},lookupTable:function(e,t){var o,i,n=[];if("string"==typeof e){if(o=document.querySelectorAll(e),o.length)for(var s=0;s0?s.setWidth(n):s.reinitializeWidth()):this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitColumns:function(e){function t(e){return"string"==typeof e?e.indexOf("%")>-1?n/100*parseInt(e):parseInt(e):e}function o(e,i,n,s){function a(e){return n*(e.column.definition.widthGrow||1)}function r(e){return t(e.width)-n*(e.column.definition.widthShrink||0)}var l=[],c=0,u=0,d=0,h=0,p=0,m=[];return e.forEach(function(e,t){var o=s?r(e):a(e);e.column.minWidth>=o?l.push(e):(m.push(e),p+=s?e.column.definition.widthShrink||1:e.column.definition.widthGrow||1)}),l.length?(l.forEach(function(e){c+=s?e.width-e.column.minWidth:e.column.minWidth,e.width=e.column.minWidth}),u=i-c,d=p?Math.floor(u/p):u,h=u-d*p,h+=o(m,u,d,s)):(h=p?i-Math.floor(i/p)*p:i,m.forEach(function(e){e.width=s?r(e):a(e)})),h}var i=this,n=i.table.element.clientWidth,s=0,a=0,r=0,l=0,c=[],u=[],d=0,h=0,p=0;this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.rowManager.element.scrollHeight>this.table.rowManager.element.clientHeight&&(n-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),e.forEach(function(e){var o,i,n;e.visible&&(o=e.definition.width,i=parseInt(e.minWidth),o?(n=t(o),s+=n>i?n:i,e.definition.widthShrink&&(u.push({column:e,width:n>i?n:i}),d+=e.definition.widthShrink)):(c.push({column:e,width:0}),r+=e.definition.widthGrow||1))}),a=n-s,l=Math.floor(a/r);var p=o(c,a,l,!1);c.length&&p>0&&(c[c.length-1].width+=+p),c.forEach(function(e){a-=e.width}),h=Math.abs(p)+a,h>0&&d&&(p=o(u,h,Math.floor(h/d),!0)),u.length&&(u[u.length-1].width-=p),c.forEach(function(e){e.column.setWidth(e.width)}),u.forEach(function(e){e.column.setWidth(e.width)})}},h.prototype.registerModule("layout",p);var m=function(e){this.table=e,this.locale="default",this.lang=!1,this.bindings={},this.langList={}};m.prototype.initialize=function(){this.langList=h.prototype.helpers.deepClone(this.langs)},m.prototype.setHeaderFilterPlaceholder=function(e){this.langList.default.headerFilters.default=e},m.prototype.setHeaderFilterColumnPlaceholder=function(e,t){this.langList.default.headerFilters.columns[e]=t,this.lang&&!this.lang.headerFilters.columns[e]&&(this.lang.headerFilters.columns[e]=t)},m.prototype.installLang=function(e,t){this.langList[e]?this._setLangProp(this.langList[e],t):this.langList[e]=t},m.prototype._setLangProp=function(e,t){for(var o in t)e[o]&&"object"==_typeof(e[o])?this._setLangProp(e[o],t[o]):e[o]=t[o]},m.prototype.setLocale=function(e){function t(e,o){for(var i in e)"object"==_typeof(e[i])?(o[i]||(o[i]={}),t(e[i],o[i])):o[i]=e[i]}var o=this;if(e=e||"default",!0===e&&navigator.language&&(e=navigator.language.toLowerCase()),e&&!o.langList[e]){var i=e.split("-")[0];o.langList[i]?(console.warn("Localization Error - Exact matching locale not found, using closest match: ",e,i),e=i):(console.warn("Localization Error - Matching locale not found, using default: ",e),e="default")}o.locale=e,o.lang=h.prototype.helpers.deepClone(o.langList.default||{}),"default"!=e&&t(o.langList[e],o.lang),o.table.options.localized.call(o.table,o.locale,o.lang),o._executeBindings()},m.prototype.getLocale=function(e){return self.locale},m.prototype.getLang=function(e){return e?this.langList[e]:this.lang},m.prototype.getText=function(e,t){var e=t?e+"|"+t:e,o=e.split("|");return this._getLangElement(o,this.locale)||""},m.prototype._getLangElement=function(e,t){var o=this,i=o.lang;return e.forEach(function(e){var t;i&&(t=i[e],i=void 0!==t&&t)}),i},m.prototype.bind=function(e,t){this.bindings[e]||(this.bindings[e]=[]),this.bindings[e].push(t),t(this.getText(e),this.lang)},m.prototype._executeBindings=function(){var e=this;for(var t in e.bindings)!function(t){e.bindings[t].forEach(function(o){o(e.getText(t),e.lang)})}(t)},m.prototype.langs={default:{groups:{item:"item",items:"items"},columns:{},ajax:{loading:"Loading",error:"Error"},pagination:{page_size:"Page Size",page_title:"Show Page",first:"First",first_title:"First Page",last:"Last",last_title:"Last Page",prev:"Prev",prev_title:"Prev Page",next:"Next",next_title:"Next Page",all:"All"},headerFilters:{default:"filter column...",columns:{}}}},h.prototype.registerModule("localize",m);var f=function(e){this.table=e};f.prototype.getConnections=function(e){var t,o=this,i=[];return t=h.prototype.comms.lookupTable(e),t.forEach(function(e){o.table!==e&&i.push(e)}),i},f.prototype.send=function(e,t,o,i){var n=this,s=this.getConnections(e);s.forEach(function(e){e.tableComms(n.table.element,t,o,i)}),!s.length&&e&&console.warn("Table Connection Error - No tables matching selector found",e)},f.prototype.receive=function(e,t,o,i){if(this.table.modExists(t))return this.table.modules[t].commsReceived(e,o,i);console.warn("Inter-table Comms Error - no such module:",t)},h.prototype.registerModule("comms",f);var g=function(e){this.table=e,this.allowedTypes=["","data","download","clipboard","print","htmlOutput"]};g.prototype.initializeColumn=function(e){var t=this,o=!1,i={};this.allowedTypes.forEach(function(n){var s,a="accessor"+(n.charAt(0).toUpperCase()+n.slice(1));e.definition[a]&&(s=t.lookupAccessor(e.definition[a]))&&(o=!0,i[a]={accessor:s,params:e.definition[a+"Params"]||{}})}),o&&(e.modules.accessor=i)},g.prototype.lookupAccessor=function(e){var t=!1;switch(void 0===e?"undefined":_typeof(e)){case"string":this.accessors[e]?t=this.accessors[e]:console.warn("Accessor Error - No such accessor found, ignoring: ",e);break;case"function":t=e}return t},g.prototype.transformRow=function(e,t){var o="accessor"+(t.charAt(0).toUpperCase()+t.slice(1)),i=e.getComponent(),n=h.prototype.helpers.deepClone(e.data||{});return this.table.columnManager.traverse(function(e){var s,a,r,l;e.modules.accessor&&(a=e.modules.accessor[o]||e.modules.accessor.accessor||!1)&&"undefined"!=(s=e.getFieldValue(n))&&(l=e.getComponent(),r="function"==typeof a.params?a.params(s,n,t,l,i):a.params,e.setFieldValue(n,a.accessor(s,n,t,r,l,i)))}),n},g.prototype.accessors={},h.prototype.registerModule("accessor",g);var b=function(e){this.table=e,this.config=!1,this.url="",this.urlGenerator=!1,this.params=!1,this.loaderElement=this.createLoaderElement(),this.msgElement=this.createMsgElement(),this.loadingElement=!1,this.errorElement=!1,this.loaderPromise=!1,this.progressiveLoad=!1,this.loading=!1,this.requestOrder=0};b.prototype.initialize=function(){var e;this.loaderElement.appendChild(this.msgElement),this.table.options.ajaxLoaderLoading&&("string"==typeof this.table.options.ajaxLoaderLoading?(e=document.createElement("template"),e.innerHTML=this.table.options.ajaxLoaderLoading.trim(),this.loadingElement=e.content.firstChild):this.loadingElement=this.table.options.ajaxLoaderLoading),this.loaderPromise=this.table.options.ajaxRequestFunc||this.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||this.defaultURLGenerator,this.table.options.ajaxLoaderError&&("string"==typeof this.table.options.ajaxLoaderError?(e=document.createElement("template"),e.innerHTML=this.table.options.ajaxLoaderError.trim(),this.errorElement=e.content.firstChild):this.errorElement=this.table.options.ajaxLoaderError),this.table.options.ajaxParams&&this.setParams(this.table.options.ajaxParams),this.table.options.ajaxConfig&&this.setConfig(this.table.options.ajaxConfig),this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL),this.table.options.ajaxProgressiveLoad&&(this.table.options.pagination?(this.progressiveLoad=!1,console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time")):this.table.modExists("page")?(this.progressiveLoad=this.table.options.ajaxProgressiveLoad,this.table.modules.page.initializeProgressive(this.progressiveLoad)):console.error("Pagination plugin is required for progressive ajax loading"))},b.prototype.createLoaderElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-loader"),e},b.prototype.createMsgElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-loader-msg"),e.setAttribute("role","alert"),e},b.prototype.setParams=function(e,t){if(t){this.params=this.params||{};for(var o in e)this.params[o]=e[o]}else this.params=e},b.prototype.getParams=function(){return this.params||{}},b.prototype.setConfig=function(e){if(this._loadDefaultConfig(),"string"==typeof e)this.config.method=e;else for(var t in e)this.config[t]=e[t]},b.prototype._loadDefaultConfig=function(e){var t=this;if(!t.config||e){t.config={};for(var o in t.defaultConfig)t.config[o]=t.defaultConfig[o]}},b.prototype.setUrl=function(e){this.url=e},b.prototype.getUrl=function(){return this.url},b.prototype.loadData=function(e,t){return this.progressiveLoad?this._loadDataProgressive():this._loadDataStandard(e,t)},b.prototype.nextPage=function(e){var t;this.loading||(t=this.table.options.ajaxProgressiveLoadScrollMargin||2*this.table.rowManager.getElement().clientHeight,ei||null===i)&&(i=e)}),null!==i?!1!==n?i.toFixed(n):i:""},min:function(e,t,o){var i=null,n=void 0!==o.precision&&o.precision;return e.forEach(function(e){((e=Number(e))"),o.dataTreeExpandElement?"string"==typeof o.dataTreeExpandElement?(e=document.createElement("div"),e.innerHTML=o.dataTreeExpandElement,this.expandEl=e.firstChild):this.expandEl=o.dataTreeExpandElement:(this.expandEl=document.createElement("div"),this.expandEl.classList.add("tabulator-data-tree-control"),this.expandEl.tabIndex=0,this.expandEl.innerHTML="
"),_typeof(o.dataTreeStartExpanded)){case"boolean":this.startOpen=function(e,t){return o.dataTreeStartExpanded};break;case"function":this.startOpen=o.dataTreeStartExpanded;break;default:this.startOpen=function(e,t){return o.dataTreeStartExpanded[t]}}},E.prototype.initializeRow=function(e){var t=e.getData()[this.field],o=Array.isArray(t),i=o||!o&&"object"===(void 0===t?"undefined":_typeof(t))&&null!==t;!i&&e.modules.dataTree&&e.modules.dataTree.branchEl&&e.modules.dataTree.branchEl.parentNode.removeChild(e.modules.dataTree.branchEl),!i&&e.modules.dataTree&&e.modules.dataTree.controlEl&&e.modules.dataTree.controlEl.parentNode.removeChild(e.modules.dataTree.controlEl),e.modules.dataTree={index:e.modules.dataTree?e.modules.dataTree.index:0,open:!!i&&(e.modules.dataTree?e.modules.dataTree.open:this.startOpen(e.getComponent(),0)),controlEl:!(!e.modules.dataTree||!i)&&e.modules.dataTree.controlEl,branchEl:!(!e.modules.dataTree||!i)&&e.modules.dataTree.branchEl,parent:!!e.modules.dataTree&&e.modules.dataTree.parent,children:i}},E.prototype.layoutRow=function(e){var t=this.elementField?e.getCell(this.elementField):e.getCells()[0],o=t.getElement(),i=e.modules.dataTree;i.branchEl&&(i.branchEl.parentNode&&i.branchEl.parentNode.removeChild(i.branchEl),i.branchEl=!1),i.controlEl&&(i.controlEl.parentNode&&i.controlEl.parentNode.removeChild(i.controlEl),i.controlEl=!1),this.generateControlElement(e,o),e.element.classList.add("tabulator-tree-level-"+i.index),i.index&&(this.branchEl?(i.branchEl=this.branchEl.cloneNode(!0),o.insertBefore(i.branchEl,o.firstChild),this.table.rtl?i.branchEl.style.marginRight=(i.branchEl.offsetWidth+i.branchEl.style.marginLeft)*(i.index-1)+i.index*this.indent+"px":i.branchEl.style.marginLeft=(i.branchEl.offsetWidth+i.branchEl.style.marginRight)*(i.index-1)+i.index*this.indent+"px"):this.table.rtl?o.style.paddingRight=parseInt(window.getComputedStyle(o,null).getPropertyValue("padding-right"))+i.index*this.indent+"px":o.style.paddingLeft=parseInt(window.getComputedStyle(o,null).getPropertyValue("padding-left"))+i.index*this.indent+"px")},E.prototype.generateControlElement=function(e,t){var o=this,i=e.modules.dataTree,t=t||e.getCells()[0].getElement(),n=i.controlEl;!1!==i.children&&(i.open?(i.controlEl=this.collapseEl.cloneNode(!0),i.controlEl.addEventListener("click",function(t){t.stopPropagation(),o.collapseRow(e)})):(i.controlEl=this.expandEl.cloneNode(!0),i.controlEl.addEventListener("click",function(t){t.stopPropagation(),o.expandRow(e)})),i.controlEl.addEventListener("mousedown",function(e){e.stopPropagation()}),n&&n.parentNode===t?n.parentNode.replaceChild(i.controlEl,n):t.insertBefore(i.controlEl,t.firstChild))},E.prototype.setDisplayIndex=function(e){this.displayIndex=e},E.prototype.getDisplayIndex=function(){return this.displayIndex},E.prototype.getRows=function(e){var t=this,o=[];return e.forEach(function(e,i){var n,s;o.push(e),e instanceof l&&(n=e.modules.dataTree.children,n.index||!1===n.children||(s=t.getChildren(e),s.forEach(function(e){o.push(e)})))}),o},E.prototype.getChildren=function(e){var t=this,o=e.modules.dataTree,i=[],n=[];return!1!==o.children&&o.open&&(Array.isArray(o.children)||(o.children=this.generateChildren(e)),i=this.table.modExists("filter")&&this.table.options.dataTreeFilter?this.table.modules.filter.filter(o.children):o.children,this.table.modExists("sort")&&this.table.options.dataTreeSort&&this.table.modules.sort.sort(i),i.forEach(function(e){n.push(e),t.getChildren(e).forEach(function(e){n.push(e)})})),n},E.prototype.generateChildren=function(e){var t=this,o=[],i=e.getData()[this.field];return Array.isArray(i)||(i=[i]),i.forEach(function(i){var n=new l(i||{},t.table.rowManager);n.modules.dataTree.index=e.modules.dataTree.index+1,n.modules.dataTree.parent=e,n.modules.dataTree.children&&(n.modules.dataTree.open=t.startOpen(n.getComponent(),n.modules.dataTree.index)),o.push(n)}),o},E.prototype.expandRow=function(e,t){var o=e.modules.dataTree;!1!==o.children&&(o.open=!0,e.reinitialize(),this.table.rowManager.refreshActiveData("tree",!1,!0),this.table.options.dataTreeRowExpanded(e.getComponent(),e.modules.dataTree.index))},E.prototype.collapseRow=function(e){var t=e.modules.dataTree;!1!==t.children&&(t.open=!1,e.reinitialize(),this.table.rowManager.refreshActiveData("tree",!1,!0),this.table.options.dataTreeRowCollapsed(e.getComponent(),e.modules.dataTree.index))},E.prototype.toggleRow=function(e){var t=e.modules.dataTree;!1!==t.children&&(t.open?this.collapseRow(e):this.expandRow(e))},E.prototype.getTreeParent=function(e){return!!e.modules.dataTree.parent&&e.modules.dataTree.parent.getComponent()},E.prototype.getFilteredTreeChildren=function(e){var t,o=e.modules.dataTree,i=[];return o.children&&(Array.isArray(o.children)||(o.children=this.generateChildren(e)),t=this.table.modExists("filter")&&this.table.options.dataTreeFilter?this.table.modules.filter.filter(o.children):o.children,t.forEach(function(e){e instanceof l&&i.push(e)})),i},E.prototype.rowDelete=function(e){var t,o=e.modules.dataTree.parent;o&&(t=this.findChildIndex(e,o),!1!==t&&o.data[this.field].splice(t,1),o.data[this.field].length||delete o.data[this.field],this.initializeRow(o),this.layoutRow(o)),this.table.rowManager.refreshActiveData("tree",!1,!0)},E.prototype.addTreeChildRow=function(e,t,o,i){var n=!1;"string"==typeof t&&(t=JSON.parse(t)),Array.isArray(e.data[this.field])||(e.data[this.field]=[],e.modules.dataTree.open=this.startOpen(e.getComponent(),e.modules.dataTree.index)),void 0!==i&&!1!==(n=this.findChildIndex(i,e))&&e.data[this.field].splice(o?n:n+1,0,t),!1===n&&(o?e.data[this.field].unshift(t):e.data[this.field].push(t)),this.initializeRow(e),this.layoutRow(e),this.table.rowManager.refreshActiveData("tree",!1,!0)},E.prototype.findChildIndex=function(e,t){var o=this,i=!1;return"object"==(void 0===e?"undefined":_typeof(e))?e instanceof l?i=e.data:e instanceof r?i=e._getSelf().data:"undefined"!=typeof HTMLElement&&e instanceof HTMLElement&&t.modules.dataTree&&(i=t.modules.dataTree.children.find(function(t){return t instanceof l&&t.element===e}))&&(i=i.data):i=void 0!==e&&null!==e&&t.data[this.field].find(function(t){return t.data[o.table.options.index]==e}),i&&(Array.isArray(t.data[this.field])&&(i=t.data[this.field].indexOf(i)),-1==i&&(i=!1)),i},E.prototype.getTreeChildren=function(e,t,o){var i=this,n=e.modules.dataTree,s=[];return n.children&&(Array.isArray(n.children)||(n.children=this.generateChildren(e)),n.children.forEach(function(e){e instanceof l&&(s.push(t?e.getComponent():e),o&&(s=s.concat(i.getTreeChildren(e,t,o))))})),s},E.prototype.checkForRestyle=function(e){e.row.cells.indexOf(e)||e.row.reinitialize()},E.prototype.getChildField=function(){return this.field},E.prototype.redrawNeeded=function(e){return!!this.field&&void 0!==e[this.field]||!!this.elementField&&void 0!==e[this.elementField]},h.prototype.registerModule("dataTree",E);var C=function(e){this.table=e};C.prototype.download=function(e,t,o,i,n){function s(o,i){n?!0===n?a.triggerDownload(o,i,e,t,!0):n(o):a.triggerDownload(o,i,e,t)}var a=this,r=!1;if("function"==typeof e?r=e:a.downloaders[e]?r=a.downloaders[e]:console.warn("Download Error - No such download type found: ",e),r){var l=this.generateExportList(i);r.call(this.table,l,o||{},s)}},C.prototype.generateExportList=function(e){var t=this.table.modules.export.generateExportList(this.table.options.downloadConfig,!1,e||this.table.options.downloadRowRange,"download"),o=this.table.options.groupHeaderDownload;return o&&!Array.isArray(o)&&(o=[o]),t.forEach(function(e){var t;"group"===e.type&&(t=e.columns[0],o&&o[e.indent]&&(t.value=o[e.indent](t.value,e.component._group.getRowCount(),e.component._group.getData(),e.component)))}),t},C.prototype.triggerDownload=function(e,t,o,i,n){var s=document.createElement("a"),a=new Blob([e],{type:t}),i=i||"Tabulator."+("function"==typeof o?"txt":o);(a=this.table.options.downloadReady.call(this.table,e,a))&&(n?window.open(window.URL.createObjectURL(a)):navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(a,i):(s.setAttribute("href",window.URL.createObjectURL(a)),s.setAttribute("download",i),s.style.display="none",document.body.appendChild(s),s.click(),document.body.removeChild(s)),this.table.options.downloadComplete&&this.table.options.downloadComplete())},C.prototype.commsReceived=function(e,t,o){switch(t){case"intercept":this.download(o.type,"",o.options,o.active,o.intercept)}},C.prototype.downloaders={csv:function(e,t,o){var i=t&&t.delimiter?t.delimiter:",",n=[],s=[];e.forEach(function(e){var t=[];switch(e.type){case"group":console.warn("Download Warning - CSV downloader cannot process row groups");break;case"calc":console.warn("Download Warning - CSV downloader cannot process column calculations");break;case"header":e.columns.forEach(function(e,t){e&&1===e.depth&&(s[t]=void 0===e.value||null===e.value?"":'"'+String(e.value).split('"').join('""')+'"')});break;case"row":e.columns.forEach(function(e){if(e){switch(_typeof(e.value)){case"object":e.value=JSON.stringify(e.value);break;case"undefined":case"null":e.value=""}t.push('"'+String(e.value).split('"').join('""')+'"')}}),n.push(t.join(i))}}),s.length&&n.unshift(s.join(i)),n=n.join("\n"),t.bom&&(n="\ufeff"+n),o(n,"text/csv")},json:function(e,t,o){var i=[];e.forEach(function(e){var t={};switch(e.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":e.columns.forEach(function(e){e&&(t[e.component.getField()]=e.value)}),i.push(t)}}),i=JSON.stringify(i,null,"\t"),o(i,"application/json")},pdf:function(e,t,o){function i(e,t){var o=[];return e.columns.forEach(function(e){var i;if(e){switch(_typeof(e.value)){case"object":e.value=JSON.stringify(e.value);break;case"undefined":case"null":e.value=""}i={content:e.value,colSpan:e.width,rowSpan:e.height},t&&(i.styles=t),o.push(i)}else o.push("")}),o}var n=[],s=[],a={},r=t.rowGroupStyles||{fontStyle:"bold",fontSize:12,cellPadding:6,fillColor:220},l=t.rowCalcStyles||{fontStyle:"bold",fontSize:10,cellPadding:4,fillColor:232},c=t.jsPDF||{},u=t&&t.title?t.title:"";c.orientation||(c.orientation=t.orientation||"landscape"),c.unit||(c.unit="pt"),e.forEach(function(e){switch(e.type){case"header":n.push(i(e));break;case"group":s.push(i(e,r));break;case"calc":s.push(i(e,l));break;case"row":s.push(i(e))}});var d=new jsPDF(c);t&&t.autoTable&&(a="function"==typeof t.autoTable?t.autoTable(d)||{}:t.autoTable),u&&(a.addPageContent=function(e){d.text(u,40,30)}),a.head=n,a.body=s,d.autoTable(a),t&&t.documentProcessing&&t.documentProcessing(d),o(d.output("arraybuffer"),"application/pdf")},xlsx:function(e,t,o){function i(){var t=[],o=[],i={},n={s:{c:0,r:0},e:{c:e[0]?e[0].columns.reduce(function(e,t){return e+(t&&t.width?t.width:1)},0):0,r:e.length}};return e.forEach(function(e,i){var n=[];e.columns.forEach(function(e,t){e?(n.push(e.value instanceof Date||"object"!==_typeof(e.value)?e.value:JSON.stringify(e.value)),(e.width>1||e.height>-1)&&o.push({s:{r:i,c:t},e:{r:i+e.height-1,c:t+e.width-1}})):n.push("")}),t.push(n)}),XLSX.utils.sheet_add_aoa(i,t),i["!ref"]=XLSX.utils.encode_range(n),o.length&&(i["!merges"]=o),i}var n,s=this,a=t.sheetName||"Sheet1",r=XLSX.utils.book_new();if(r.SheetNames=[],r.Sheets={},t.sheetOnly)return void o(i());if(t.sheets)for(var l in t.sheets)!0===t.sheets[l]?(r.SheetNames.push(l),r.Sheets[l]=i()):(r.SheetNames.push(l),this.modules.comms.send(t.sheets[l],"download","intercept",{type:"xlsx",options:{sheetOnly:!0},active:s.active,intercept:function(e){r.Sheets[l]=e}}));else r.SheetNames.push(a),r.Sheets[a]=i();t.documentProcessing&&(r=t.documentProcessing(r)),n=XLSX.write(r,{bookType:"xlsx",bookSST:!0,type:"binary"}),o(function(e){for(var t=new ArrayBuffer(e.length),o=new Uint8Array(t),i=0;i!=e.length;++i)o[i]=255&e.charCodeAt(i);return t}(n),"application/octet-stream")},html:function(e,t,o){this.modExists("export",!0)&&o(this.modules.export.genereateHTMLTable(e),"text/html")}},h.prototype.registerModule("download",C);var R=function(e){this.table=e,this.currentCell=!1,this.mouseClick=!1,this.recursionBlock=!1,this.invalidEdit=!1,this.editedCells=[]};R.prototype.initializeColumn=function(e){var t=this,o={editor:!1,blocked:!1,check:e.definition.editable,params:e.definition.editorParams||{}};switch(_typeof(e.definition.editor)){case"string":"tick"===e.definition.editor&&(e.definition.editor="tickCross",console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor")),t.editors[e.definition.editor]?o.editor=t.editors[e.definition.editor]:console.warn("Editor Error - No such editor found: ",e.definition.editor);break;case"function":o.editor=e.definition.editor;break;case"boolean":!0===e.definition.editor&&("function"!=typeof e.definition.formatter?("tick"===e.definition.formatter&&(e.definition.formatter="tickCross",console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor")),t.editors[e.definition.formatter]?o.editor=t.editors[e.definition.formatter]:o.editor=t.editors.input):console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ",e.definition.formatter))}o.editor&&(e.modules.edit=o)},R.prototype.getCurrentCell=function(){return!!this.currentCell&&this.currentCell.getComponent()},R.prototype.clearEditor=function(e){var t,o=this.currentCell;if(this.invalidEdit=!1,o){for(this.currentCell=!1,t=o.getElement(),e?o.validate():t.classList.remove("tabulator-validation-fail"),t.classList.remove("tabulator-editing");t.firstChild;)t.removeChild(t.firstChild);o.row.getElement().classList.remove("tabulator-row-editing")}},R.prototype.cancelEdit=function(){if(this.currentCell){var e=this.currentCell,t=this.currentCell.getComponent();this.clearEditor(!0),e.setValueActual(e.getValue()),e.cellRendered(),("textarea"==e.column.definition.editor||e.column.definition.variableHeight)&&e.row.normalizeHeight(!0),e.column.cellEvents.cellEditCancelled&&e.column.cellEvents.cellEditCancelled.call(this.table,t),this.table.options.cellEditCancelled.call(this.table,t)}},R.prototype.bindEditor=function(e){var t=this,o=e.getElement();o.setAttribute("tabindex",0),o.addEventListener("click",function(e){o.classList.contains("tabulator-editing")||o.focus({preventScroll:!0})}),o.addEventListener("mousedown",function(e){2===e.button?e.preventDefault():t.mouseClick=!0}),o.addEventListener("focus",function(o){t.recursionBlock||t.edit(e,o,!1)})},R.prototype.focusCellNoEvent=function(e,t){this.recursionBlock=!0,t&&"ie"===this.table.browser||e.getElement().focus({preventScroll:!0}),this.recursionBlock=!1},R.prototype.editCell=function(e,t){this.focusCellNoEvent(e),this.edit(e,!1,t)},R.prototype.focusScrollAdjust=function(e){if("virtual"==this.table.rowManager.getRenderMode()){var t=this.table.rowManager.element.scrollTop,o=this.table.rowManager.element.clientHeight+this.table.rowManager.element.scrollTop,i=e.row.getElement();i.offsetTop;i.offsetTopo&&(this.table.rowManager.element.scrollTop+=i.offsetTop+i.offsetHeight-o);var n=this.table.rowManager.element.scrollLeft,s=this.table.rowManager.element.clientWidth+this.table.rowManager.element.scrollLeft,a=e.getElement();a.offsetLeft;this.table.modExists("frozenColumns")&&(n+=parseInt(this.table.modules.frozenColumns.leftMargin),s-=parseInt(this.table.modules.frozenColumns.rightMargin)),a.offsetLefts&&(this.table.rowManager.element.scrollLeft+=a.offsetLeft+a.offsetWidth-s)}},R.prototype.edit=function(e,t,o){function i(t){if(c.currentCell===e){var o=!0;return e.column.modules.validate&&c.table.modExists("validate")&&"manual"!=c.table.options.validationMode&&(o=c.table.modules.validate.validate(e.column.modules.validate,e,t)),!0===o||"highlight"===c.table.options.validationMode?(c.clearEditor(),e.modules.edit||(e.modules.edit={}),e.modules.edit.edited=!0,-1==c.editedCells.indexOf(e)&&c.editedCells.push(e),e.setValue(t,!0),c.table.options.dataTree&&c.table.modExists("dataTree")&&c.table.modules.dataTree.checkForRestyle(e),!0===o||(h.classList.add("tabulator-validation-fail"),c.table.options.validationFailed.call(c.table,e.getComponent(),t,o),!1)):(c.invalidEdit=!0,h.classList.add("tabulator-validation-fail"),c.focusCellNoEvent(e,!0),d(),c.table.options.validationFailed.call(c.table,e.getComponent(),t,o),!1)}}function n(){c.currentCell===e&&(c.cancelEdit(),c.table.options.dataTree&&c.table.modExists("dataTree")&&c.table.modules.dataTree.checkForRestyle(e))}function s(e){d=e}var a,r,l,c=this,u=!0,d=function(){},h=e.getElement();if(this.currentCell)return void(this.invalidEdit||this.cancelEdit());if(e.column.modules.edit.blocked)return this.mouseClick=!1,h.blur(),!1;switch(t&&t.stopPropagation(),_typeof(e.column.modules.edit.check)){case"function":u=e.column.modules.edit.check(e.getComponent());break;case"boolean":u=e.column.modules.edit.check}if(u||o){if(c.cancelEdit(),c.currentCell=e,this.focusScrollAdjust(e),r=e.getComponent(),this.mouseClick&&(this.mouseClick=!1,e.column.cellEvents.cellClick&&e.column.cellEvents.cellClick.call(this.table,t,r)),e.column.cellEvents.cellEditing&&e.column.cellEvents.cellEditing.call(this.table,r),c.table.options.cellEditing.call(this.table,r),l="function"==typeof e.column.modules.edit.params?e.column.modules.edit.params(r):e.column.modules.edit.params,!1===(a=e.column.modules.edit.editor.call(c,r,s,i,n,l)))return h.blur(),!1;if(!(a instanceof Node))return console.warn("Edit Error - Editor should return an instance of Node, the editor returned:",a),h.blur(),!1;for(h.classList.add("tabulator-editing"),e.row.getElement().classList.add("tabulator-row-editing");h.firstChild;)h.removeChild(h.firstChild);h.appendChild(a),d();for(var p=h.children,m=0;m46){if(o>=i.length)return t.preventDefault(),t.stopPropagation(),r=!1,!1;switch(i[o]){case n:if(l.toUpperCase()==l.toLowerCase())return t.preventDefault(),t.stopPropagation(),r=!1,!1;break;case s:if(isNaN(l))return t.preventDefault(),t.stopPropagation(),r=!1,!1;break;case a:break;default:if(l!==i[o])return t.preventDefault(),t.stopPropagation(),r=!1,!1}r=!0}}),e.addEventListener("keyup",function(i){i.keyCode>46&&t.maskAutoFill&&o(e.value.length)}),e.placeholder||(e.placeholder=i),t.maskAutoFill&&o(e.value.length)},R.prototype.getEditedCells=function(){var e=[];return this.editedCells.forEach(function(t){e.push(t.getComponent())}),e},R.prototype.clearEdited=function(e){var t;e.modules.edit&&e.modules.edit.edited&&(e.modules.edit.edited=!1,e.modules.validate&&(e.modules.validate.invalid=!1)),(t=this.editedCells.indexOf(e))>-1&&this.editedCells.splice(t,1)},R.prototype.editors={input:function(e,t,o,i,n){function s(e){(null===a||void 0===a)&&""!==r.value||r.value!==a?o(r.value)&&(a=r.value):i()}var a=e.getValue(),r=document.createElement("input");if(r.setAttribute("type",n.search?"search":"text"),r.style.padding="4px",r.style.width="100%",r.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var l in n.elementAttributes)"+"==l.charAt(0)?(l=l.slice(1),r.setAttribute(l,r.getAttribute(l)+n.elementAttributes["+"+l])):r.setAttribute(l,n.elementAttributes[l]);return r.value=void 0!==a?a:"",t(function(){r.focus({preventScroll:!0}),r.style.height="100%"}),r.addEventListener("change",s),r.addEventListener("blur",s),r.addEventListener("keydown",function(e){switch(e.keyCode){case 13:s(e);break;case 27:i();break;case 35:case 36:e.stopPropagation()}}),n.mask&&this.table.modules.edit.maskInput(r,n),r},textarea:function(e,t,o,i,n){function s(t){(null===a||void 0===a)&&""!==c.value||c.value!==a?(o(c.value)&&(a=c.value),setTimeout(function(){e.getRow().normalizeHeight()},300)):i()}var a=e.getValue(),r=n.verticalNavigation||"hybrid",l=String(null!==a&&void 0!==a?a:""),c=(l.match(/(?:\r\n|\r|\n)/g),document.createElement("textarea")),u=0;if(c.style.display="block",c.style.padding="2px",c.style.height="100%",c.style.width="100%",c.style.boxSizing="border-box",c.style.whiteSpace="pre-wrap",c.style.resize="none",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var d in n.elementAttributes)"+"==d.charAt(0)?(d=d.slice(1),c.setAttribute(d,c.getAttribute(d)+n.elementAttributes["+"+d])):c.setAttribute(d,n.elementAttributes[d]);return c.value=l,t(function(){c.focus({preventScroll:!0}),c.style.height="100%",c.scrollHeight,c.style.height=c.scrollHeight+"px",e.getRow().normalizeHeight()}),c.addEventListener("change",s),c.addEventListener("blur",s),c.addEventListener("keyup",function(){c.style.height="";var t=c.scrollHeight;c.style.height=t+"px",t!=u&&(u=t,e.getRow().normalizeHeight())}),c.addEventListener("keydown",function(e){switch(e.keyCode){case 27:i();break;case 38:("editor"==r||"hybrid"==r&&c.selectionStart)&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 40:("editor"==r||"hybrid"==r&&c.selectionStart!==c.value.length)&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 35:case 36:e.stopPropagation()}}),n.mask&&this.table.modules.edit.maskInput(c,n),c},number:function(e,t,o,i,n){function s(){var e=l.value;isNaN(e)||""===e||(e=Number(e)),e!==a?o(e)&&(a=e):i()}var a=e.getValue(),r=n.verticalNavigation||"editor",l=document.createElement("input");if(l.setAttribute("type","number"),void 0!==n.max&&l.setAttribute("max",n.max),void 0!==n.min&&l.setAttribute("min",n.min),void 0!==n.step&&l.setAttribute("step",n.step),l.style.padding="4px",l.style.width="100%",l.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var c in n.elementAttributes)"+"==c.charAt(0)?(c=c.slice(1),l.setAttribute(c,l.getAttribute(c)+n.elementAttributes["+"+c])):l.setAttribute(c,n.elementAttributes[c]);l.value=a;var u=function(e){s()};return t(function(){l.removeEventListener("blur",u),l.focus({preventScroll:!0}),l.style.height="100%",l.addEventListener("blur",u)}),l.addEventListener("keydown",function(e){switch(e.keyCode){case 13:s();break;case 27:i();break;case 38:case 40:"editor"==r&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 35:case 36:e.stopPropagation()}}),n.mask&&this.table.modules.edit.maskInput(l,n),l},range:function(e,t,o,i,n){function s(){var e=r.value;isNaN(e)||""===e||(e=Number(e)),e!=a?o(e)&&(a=e):i()}var a=e.getValue(),r=document.createElement("input");if(r.setAttribute("type","range"),void 0!==n.max&&r.setAttribute("max",n.max), -void 0!==n.min&&r.setAttribute("min",n.min),void 0!==n.step&&r.setAttribute("step",n.step),r.style.padding="4px",r.style.width="100%",r.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var l in n.elementAttributes)"+"==l.charAt(0)?(l=l.slice(1),r.setAttribute(l,r.getAttribute(l)+n.elementAttributes["+"+l])):r.setAttribute(l,n.elementAttributes[l]);return r.value=a,t(function(){r.focus({preventScroll:!0}),r.style.height="100%"}),r.addEventListener("blur",function(e){s()}),r.addEventListener("keydown",function(e){switch(e.keyCode){case 13:s();break;case 27:i()}}),r},select:function(e,t,o,i,n){function s(t){var o,i={},s=C.table.getData();return o=t?C.table.columnManager.getColumnByField(t):e.getColumn()._getSelf(),o?(s.forEach(function(e){var t=o.getFieldValue(e);null!==t&&void 0!==t&&""!==t&&(i[t]=!0)}),i=n.sortValuesList?"asc"==n.sortValuesList?Object.keys(i).sort():Object.keys(i).sort().reverse():Object.keys(i)):console.warn("unable to find matching column to create select lookup list:",t),i}function a(t,o){function i(e){var e={label:e.label,value:e.value,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1};return o.indexOf(e.value)>-1&&c(e),n.push(e),s.push(e),e}var n=[],s=[];if("function"==typeof t&&(t=t(e)),Array.isArray(t))t.forEach(function(e){var t;"object"===(void 0===e?"undefined":_typeof(e))?e.options?(t={label:e.label,group:!0,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1},s.push(t),e.options.forEach(function(e){i(e)})):i(e):(t={label:e,value:e,element:!1},o.indexOf(t.value)>-1&&c(t),n.push(t),s.push(t))});else for(var a in t){var l={label:t[a],value:a,element:!1};o.indexOf(l.value)>-1&&c(l),n.push(l),s.push(l)}z=n,H=s,r()}function r(){for(;D.firstChild;)D.removeChild(D.firstChild);H.forEach(function(t){var o=t.element;if(!o){if(o=document.createElement("div"),t.label=n.listItemFormatter?n.listItemFormatter(t.value,t.label,e,o,t.itemParams):t.label,t.group?(o.classList.add("tabulator-edit-select-list-group"),o.tabIndex=0,o.innerHTML=""===t.label?" ":t.label):(o.classList.add("tabulator-edit-select-list-item"),o.tabIndex=0,o.innerHTML=""===t.label?" ":t.label,o.addEventListener("click",function(){_=!0,setTimeout(function(){_=!1},10),k?(d(t),T.focus()):p(t)}),P.indexOf(t)>-1&&o.classList.add("active")),t.elementAttributes&&"object"==_typeof(t.elementAttributes))for(var i in t.elementAttributes)"+"==i.charAt(0)?(i=i.slice(1),o.setAttribute(i,T.getAttribute(i)+t.elementAttributes["+"+i])):o.setAttribute(i,t.elementAttributes[i]);o.addEventListener("mousedown",function(){A=!1,setTimeout(function(){A=!0},10)}),t.element=o}D.appendChild(o)})}function l(e,t){!k&&S&&S.element&&S.element.classList.remove("active"),S&&S.element&&S.element.classList.remove("focused"),S=e,e.element&&(e.element.classList.add("focused"),t&&e.element.classList.add("active")),e&&e.element&&e.element.scrollIntoView&&e.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}function c(e){-1==P.indexOf(e)&&(P.push(e),l(e,!0)),f()}function u(e){var t=P[e];e>-1&&(P.splice(e,1),t.element&&t.element.classList.remove("active"))}function d(e){e||(e=S);var t=P.indexOf(e);t>-1?u(t):(!0!==k&&P.length>=k&&u(0),c(e)),f()}function p(e){y(),e||(e=S),e&&(T.value=e.label,o(e.value)),L=T.value}function m(e){e||y();var t=[];P.forEach(function(e){t.push(e.value)}),L=T.value,o(t)}function f(){var e=[];P.forEach(function(t){e.push(t.label)}),T.value=e.join(", "),!1===C.currentCell&&m(!0)}function g(){for(var e=P.length,t=0;t0&&l(z[t-1],!k));break;case 40:t=z.indexOf(S),("editor"==M||"hybrid"==M&&t-1||String(t.title).toLowerCase().indexOf(String(e).toLowerCase())>-1)&&s.push(t)}),d(s,t))}function l(e){var t=document.createElement("div");u(),!1!==e&&(t.classList.add("tabulator-edit-select-list-notice"),t.tabIndex=0,e instanceof Node?t.appendChild(e):t.innerHTML=e,T.appendChild(t))}function c(e){var t=[];if(Array.isArray(e))e.forEach(function(e){var o={};"object"===(void 0===e?"undefined":_typeof(e))?(o.title=n.listItemFormatter?n.listItemFormatter(e.value,e.label):e.label,o.value=e.value):(o.title=n.listItemFormatter?n.listItemFormatter(e,e):e,o.value=e),t.push(o)});else for(var o in e){var i={title:n.listItemFormatter?n.listItemFormatter(o,e[o]):e[o],value:o};t.push(i)}return t}function u(){for(;T.firstChild;)T.removeChild(T.firstChild)}function d(e,t){e.length?p(e,t):n.emptyPlaceholder&&l(n.emptyPlaceholder)}function p(e,t){var o=!1;u(),D=e,D.forEach(function(e){var i=e.element;i||(i=document.createElement("div"),i.classList.add("tabulator-edit-select-list-item"),i.tabIndex=0,i.innerHTML=e.title,i.addEventListener("click",function(t){g(e),m()}),i.addEventListener("mousedown",function(e){z=!1,setTimeout(function(){z=!0},10)}),e.element=i,t&&e.value==R&&(L.value=e.title,e.element.classList.add("active"),o=!0),e===k&&(e.element.classList.add("active"),o=!0)),T.appendChild(i)}),o||g(!1)}function m(){b(),k?R!==k.value?(R=k.value,L.value=k.title,o(k.value)):i():n.freetext?(R=L.value,o(L.value)):n.allowEmpty&&""===L.value?(R=L.value,o(L.value)):i()}function f(){if(!T.parentNode){for(;T.firstChild;)T.removeChild(T.firstChild);var e=h.prototype.helpers.elOffset(C);T.style.minWidth=C.offsetWidth+"px",T.style.top=e.top+C.offsetHeight+"px",T.style.left=e.left+"px",document.body.appendChild(T)}}function g(e,t){k&&k.element&&k.element.classList.remove("active"),k=e,e&&e.element&&e.element.classList.add("active"),e&&e.element&&e.element.scrollIntoView&&e.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}function b(){T.parentNode&&T.parentNode.removeChild(T),y()}function v(){b(),i()}function y(){E.table.rowManager.element.removeEventListener("scroll",v)}var w=this,E=this,C=e.getElement(),R=e.getValue(),x=n.verticalNavigation||"editor",M=void 0!==R||null===R?R:void 0!==n.defaultValue?n.defaultValue:"",L=document.createElement("input"),T=document.createElement("div"),D=[],k=!1,z=!0,S=!1;if(L.setAttribute("type","search"),L.style.padding="4px",L.style.width="100%",L.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var H in n.elementAttributes)"+"==H.charAt(0)?(H=H.slice(1),L.setAttribute(H,L.getAttribute(H)+n.elementAttributes["+"+H])):L.setAttribute(H,n.elementAttributes[H]);return T.classList.add("tabulator-edit-select-list"),T.addEventListener("mousedown",function(e){z=!1,setTimeout(function(){z=!0},10)}),L.addEventListener("keydown",function(e){var t;switch(e.keyCode){case 38:t=D.indexOf(k),("editor"==x||"hybrid"==x&&t)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),g(t>0?D[t-1]:!1));break;case 40:t=D.indexOf(k),("editor"==x||"hybrid"==x&&t'):("ie"==r.table.browser?t.setAttribute("class","tabulator-star-inactive"):t.classList.replace("tabulator-star-active","tabulator-star-inactive"),t.innerHTML='')})}function a(e){c=e,s(e)}var r=this,l=e.getElement(),c=e.getValue(),u=l.getElementsByTagName("svg").length||5,d=l.getElementsByTagName("svg")[0]?l.getElementsByTagName("svg")[0].getAttribute("width"):14,h=[],p=document.createElement("div"),m=document.createElementNS("http://www.w3.org/2000/svg","svg");if(l.style.whiteSpace="nowrap",l.style.overflow="hidden",l.style.textOverflow="ellipsis",p.style.verticalAlign="middle",p.style.display="inline-block",p.style.padding="4px",m.setAttribute("width",d),m.setAttribute("height",d),m.setAttribute("viewBox","0 0 512 512"),m.setAttribute("xml:space","preserve"),m.style.padding="0 1px",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var f in n.elementAttributes)"+"==f.charAt(0)?(f=f.slice(1),p.setAttribute(f,p.getAttribute(f)+n.elementAttributes["+"+f])):p.setAttribute(f,n.elementAttributes[f]);for(var g=1;g<=u;g++)!function(e){var t=document.createElement("span"),i=m.cloneNode(!0);h.push(i),t.addEventListener("mouseenter",function(t){t.stopPropagation(),t.stopImmediatePropagation(),s(e)}),t.addEventListener("mousemove",function(e){e.stopPropagation(),e.stopImmediatePropagation()}),t.addEventListener("click",function(t){t.stopPropagation(),t.stopImmediatePropagation(),o(e),l.blur()}),t.appendChild(i),p.appendChild(t)}(g);return c=Math.min(parseInt(c),u),s(c),p.addEventListener("mousemove",function(e){s(0)}),p.addEventListener("click",function(e){o(0)}),l.addEventListener("blur",function(e){i()}),l.addEventListener("keydown",function(e){switch(e.keyCode){case 39:a(c+1);break;case 37:a(c-1);break;case 13:o(c);break;case 27:i()}}),p},progress:function(e,t,o,i,n){function s(){var e=d*Math.round(m.offsetWidth/(l.clientWidth/100))+u;o(e),l.setAttribute("aria-valuenow",e),l.setAttribute("aria-label",h)}var a,r,l=e.getElement(),c=void 0===n.max?l.getElementsByTagName("div")[0].getAttribute("max")||100:n.max,u=void 0===n.min?l.getElementsByTagName("div")[0].getAttribute("min")||0:n.min,d=(c-u)/100,h=e.getValue()||0,p=document.createElement("div"),m=document.createElement("div");if(p.style.position="absolute",p.style.right="0",p.style.top="0",p.style.bottom="0",p.style.width="5px",p.classList.add("tabulator-progress-handle"),m.style.display="inline-block",m.style.position="relative",m.style.height="100%",m.style.backgroundColor="#488CE9",m.style.maxWidth="100%",m.style.minWidth="0%",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var f in n.elementAttributes)"+"==f.charAt(0)?(f=f.slice(1),m.setAttribute(f,m.getAttribute(f)+n.elementAttributes["+"+f])):m.setAttribute(f,n.elementAttributes[f]);return l.style.padding="4px 4px",h=Math.min(parseFloat(h),c),h=Math.max(parseFloat(h),u),h=Math.round((h-u)/d),m.style.width=h+"%",l.setAttribute("aria-valuemin",u),l.setAttribute("aria-valuemax",c),m.appendChild(p),p.addEventListener("mousedown",function(e){a=e.screenX,r=m.offsetWidth}),p.addEventListener("mouseover",function(){p.style.cursor="ew-resize"}),l.addEventListener("mousemove",function(e){a&&(m.style.width=r+e.screenX-a+"px")}),l.addEventListener("mouseup",function(e){a&&(e.stopPropagation(),e.stopImmediatePropagation(),a=!1,r=!1,s())}),l.addEventListener("keydown",function(e){switch(e.keyCode){case 39:e.preventDefault(),m.style.width=m.clientWidth+l.clientWidth/100+"px";break;case 37:e.preventDefault(),m.style.width=m.clientWidth-l.clientWidth/100+"px";break;case 9:case 13:s();break;case 27:i()}}),l.addEventListener("blur",function(){i()}),m},tickCross:function(e,t,o,i,n){function s(e){return l?e?u?c:r.checked:r.checked&&!u?(r.checked=!1,r.indeterminate=!0,u=!0,c):(u=!1,r.checked):r.checked}var a=e.getValue(),r=document.createElement("input"),l=n.tristate,c=void 0===n.indeterminateValue?null:n.indeterminateValue,u=!1;if(r.setAttribute("type","checkbox"),r.style.marginTop="5px",r.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var d in n.elementAttributes)"+"==d.charAt(0)?(d=d.slice(1),r.setAttribute(d,r.getAttribute(d)+n.elementAttributes["+"+d])):r.setAttribute(d,n.elementAttributes[d]);return r.value=a,!l||void 0!==a&&a!==c&&""!==a||(u=!0,r.indeterminate=!0),"firefox"!=this.table.browser&&t(function(){r.focus({preventScroll:!0})}),r.checked=!0===a||"true"===a||"True"===a||1===a,t(function(){r.focus()}),r.addEventListener("change",function(e){o(s())}),r.addEventListener("blur",function(e){o(s(!0))}),r.addEventListener("keydown",function(e){13==e.keyCode&&o(s()),27==e.keyCode&&i()}),r}},h.prototype.registerModule("edit",R);var x=function(e,t,o,i){this.type=e,this.columns=t,this.component=o||!1,this.indent=i||0},M=function(e,t,o,i,n){this.value=e,this.component=t||!1,this.width=o,this.height=i,this.depth=n},L=function(e){this.table=e,this.config={},this.cloneTableStyle=!0,this.colVisProp=""};L.prototype.generateExportList=function(e,t,o,i){this.cloneTableStyle=t,this.config=e||{},this.colVisProp=i;var n=!1!==this.config.columnHeaders?this.headersToExportRows(this.generateColumnGroupHeaders()):[],s=this.bodyToExportRows(this.rowLookup(o));return n.concat(s)},L.prototype.genereateTable=function(e,t,o,i){var n=this.generateExportList(e,t,o,i);return this.genereateTableElement(n)},L.prototype.rowLookup=function(e){var t=this,o=[];if("function"==typeof e)e.call(this.table).forEach(function(e){(e=t.table.rowManager.findRow(e))&&o.push(e)});else switch(e){case!0:case"visible":o=this.table.rowManager.getVisibleRows(!0);break;case"all":o=this.table.rowManager.rows;break;case"selected":o=this.table.modules.selectRow.selectedRows;break;case"active":default:o=this.table.options.pagination?this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length-2):this.table.rowManager.getDisplayRows()}return Object.assign([],o)},L.prototype.generateColumnGroupHeaders=function(){var e=this,t=[];return(!1!==this.config.columnGroups?this.table.columnManager.columns:this.table.columnManager.columnsByIndex).forEach(function(o){var i=e.processColumnGroup(o);i&&t.push(i)}),t},L.prototype.processColumnGroup=function(e){var t=this,o=e.columns,i=0,n=e.definition["title"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))]||e.definition.title,s={title:n,column:e,depth:1};if(o.length){if(s.subGroups=[],s.width=0,o.forEach(function(e){var o=t.processColumnGroup(e);o&&(s.width+=o.width,s.subGroups.push(o),o.depth>i&&(i=o.depth))}),s.depth+=i,!s.width)return!1}else{if(!this.columnVisCheck(e))return!1;s.width=1}return s},L.prototype.columnVisCheck=function(e){return!1!==e.definition[this.colVisProp]&&(e.visible||!e.visible&&e.definition[this.colVisProp])},L.prototype.headersToExportRows=function(e){function t(e,n){var s=i-n;if(void 0===o[n]&&(o[n]=[]),e.height=e.subGroups?1:s-e.depth+1,o[n].push(e),e.height>1)for(var a=1;a1)for(var r=1;ri&&(i=e.depth)}),e.forEach(function(e){t(e,0)}),o.forEach(function(e){var t=[];e.forEach(function(e){e?t.push(new M(e.title,e.column.getComponent(),e.width,e.height,e.depth)):t.push(null)}),n.push(new x("header",t))}),n},L.prototype.bodyToExportRows=function(e){var t=this,o=[],i=[];return this.table.columnManager.columnsByIndex.forEach(function(e){t.columnVisCheck(e)&&o.push(e.getComponent())}),!1!==this.config.columnCalcs&&this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&e.unshift(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&e.push(this.table.modules.columnCalcs.botRow)),e=e.filter(function(e){switch(e.type){case"group":return!1!==t.config.rowGroups;case"calc":return!1!==t.config.columnCalcs;case"row":return!(t.table.options.dataTree&&!1===t.config.dataTree&&e.modules.dataTree.parent)}return!0}),e.forEach(function(e,n){var s=e.getData(t.colVisProp),a=[],r=0;switch(e.type){case"group":r=e.level,a.push(new M(e.key,e.getComponent(),o.length,1));break;case"calc":case"row":o.forEach(function(e){a.push(new M(e._column.getFieldValue(s),e,1,1))}),t.table.options.dataTree&&!1!==t.config.dataTree&&(r=e.modules.dataTree.index)}i.push(new x(e.type,a,e.getComponent(),r))}),i},L.prototype.genereateTableElement=function(e){var t=this,o=document.createElement("table"),i=document.createElement("thead"),n=document.createElement("tbody"),s=this.lookupTableStyles(),a=this.table.options["rowFormatter"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))],r={};return r.rowFormatter=null!==a?a:this.table.options.rowFormatter,this.table.options.dataTree&&!1!==this.config.dataTree&&this.table.modExists("columnCalcs")&&(r.treeElementField=this.table.modules.dataTree.elementField),r.groupHeader=this.table.options["groupHeader"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))],r.groupHeader&&!Array.isArray(r.groupHeader)&&(r.groupHeader=[r.groupHeader]),o.classList.add("tabulator-print-table"),this.mapElementStyles(this.table.columnManager.getHeadersElement(),i,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),e.length>1e3&&console.warn("It may take a long time to render an HTML table with more than 1000 rows"),e.forEach(function(e,o){switch(e.type){case"header":i.appendChild(t.genereateHeaderElement(e,r,s));break;case"group":n.appendChild(t.genereateGroupElement(e,r,s));break;case"calc":n.appendChild(t.genereateCalcElement(e,r,s));break;case"row":var a=t.genereateRowElement(e,r,s);t.mapElementStyles(o%2&&s.evenRow?s.evenRow:s.oddRow,a,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),n.appendChild(a)}}),i.innerHTML&&o.appendChild(i),o.appendChild(n),this.mapElementStyles(this.table.element,o,["border-top","border-left","border-right","border-bottom"]),o},L.prototype.lookupTableStyles=function(){var e={};return this.cloneTableStyle&&window.getComputedStyle&&(e.oddRow=this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"),e.evenRow=this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"),e.calcRow=this.table.element.querySelector(".tabulator-row.tabulator-calcs"),e.firstRow=this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"),e.firstGroup=this.table.element.getElementsByClassName("tabulator-group")[0],e.firstRow&&(e.styleCells=e.firstRow.getElementsByClassName("tabulator-cell"),e.firstCell=e.styleCells[0],e.lastCell=e.styleCells[e.styleCells.length-1])),e},L.prototype.genereateHeaderElement=function(e,t,o){var i=this,n=document.createElement("tr");return e.columns.forEach(function(e){if(e){var t=document.createElement("th"),o=e.component._column.definition.cssClass?e.component._column.definition.cssClass.split(" "):[];t.colSpan=e.width,t.rowSpan=e.height,t.innerHTML=e.value,i.cloneTableStyle&&(t.style.boxSizing="border-box"),o.forEach(function(e){t.classList.add(e)}),i.mapElementStyles(e.component.getElement(),t,["text-align","border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),i.mapElementStyles(e.component._column.contentElement,t,["padding-top","padding-left","padding-right","padding-bottom"]),e.component._column.visible?i.mapElementStyles(e.component.getElement(),t,["width"]):e.component._column.definition.width&&(t.style.width=e.component._column.definition.width+"px"),e.component._column.parent&&i.mapElementStyles(e.component._column.parent.groupElement,t,["border-top"]),n.appendChild(t)}}),n},L.prototype.genereateGroupElement=function(e,t,o){var i=document.createElement("tr"),n=document.createElement("td"),s=e.columns[0];return i.classList.add("tabulator-print-table-row"),t.groupHeader&&t.groupHeader[e.indent]?s.value=t.groupHeader[e.indent](s.value,e.component._group.getRowCount(),e.component._group.getData(),e.component):!1===t.groupHeader?s.value=s.value:s.value=e.component._group.generator(s.value,e.component._group.getRowCount(),e.component._group.getData(),e.component),n.colSpan=s.width,n.innerHTML=s.value,i.classList.add("tabulator-print-table-group"),i.classList.add("tabulator-group-level-"+e.indent),s.component.isVisible()&&i.classList.add("tabulator-group-visible"),this.mapElementStyles(o.firstGroup,i,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),this.mapElementStyles(o.firstGroup,n,["padding-top","padding-left","padding-right","padding-bottom"]),i.appendChild(n),i},L.prototype.genereateCalcElement=function(e,t,o){var i=this.genereateRowElement(e,t,o);return i.classList.add("tabulator-print-table-calcs"),this.mapElementStyles(o.calcRow,i,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),i},L.prototype.genereateRowElement=function(e,t,o){var n=this,s=document.createElement("tr");return s.classList.add("tabulator-print-table-row"),e.columns.forEach(function(a){if(a){var r=document.createElement("td"),l=a.component._column,c=a.value,u={modules:{},getValue:function(){return c},getField:function(){return l.definition.field},getElement:function(){return r},getColumn:function(){return l.getComponent()},getData:function(){return e.component.getData()},getRow:function(){return e.component},getComponent:function(){return u},column:l};if((l.definition.cssClass?l.definition.cssClass.split(" "):[]).forEach(function(e){r.classList.add(e)}),n.table.modExists("format")&&!1!==n.config.formatCells)c=n.table.modules.format.formatExportValue(u,n.colVisProp);else switch(void 0===c?"undefined":_typeof(c)){case"object":c=JSON.stringify(c);break;case"undefined":case"null":c="";break;default:c=c}c instanceof Node?r.appendChild(c):r.innerHTML=c,o.firstCell&&(n.mapElementStyles(o.firstCell,r,["padding-top","padding-left","padding-right","padding-bottom","border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size"]),l.definition.align&&(r.style.textAlign=l.definition.align)),n.table.options.dataTree&&!1!==n.config.dataTree&&(t.treeElementField&&t.treeElementField==l.field||!t.treeElementField&&0==i)&&(e.component._row.modules.dataTree.controlEl&&r.insertBefore(e.component._row.modules.dataTree.controlEl.cloneNode(!0),r.firstChild),e.component._row.modules.dataTree.branchEl&&r.insertBefore(e.component._row.modules.dataTree.branchEl.cloneNode(!0),r.firstChild)),s.appendChild(r),u.modules.format&&u.modules.format.renderedCallback&&u.modules.format.renderedCallback(),t.rowFormatter&&!1!==n.config.formatCells&&t.rowFormatter(e.component)}}),s},L.prototype.genereateHTMLTable=function(e){var t=document.createElement("div");return t.appendChild(this.genereateTableElement(e)),t.innerHTML},L.prototype.getHtml=function(e,t,o,i){var n=this.generateExportList(o||this.table.options.htmlOutputConfig,t,e,i||"htmlOutput");return this.genereateHTMLTable(n)},L.prototype.mapElementStyles=function(e,t,o){if(this.cloneTableStyle&&e&&t){var i={"background-color":"backgroundColor",color:"fontColor",width:"width","font-weight":"fontWeight","font-family":"fontFamily","font-size":"fontSize","text-align":"textAlign","border-top":"borderTop","border-left":"borderLeft","border-right":"borderRight","border-bottom":"borderBottom","padding-top":"paddingTop","padding-left":"paddingLeft","padding-right":"paddingRight","padding-bottom":"paddingBottom"};if(window.getComputedStyle){var n=window.getComputedStyle(e);o.forEach(function(e){t.style[i[e]]=n.getPropertyValue(e)})}}},h.prototype.registerModule("export",L);var T=function(e){this.table=e,this.filterList=[],this.headerFilters={},this.headerFilterColumns=[],this.prevHeaderFilterChangeCheck="",this.prevHeaderFilterChangeCheck="{}",this.changed=!1};T.prototype.initializeColumn=function(e,t){function o(t){var o,a="input"==e.modules.filter.tagType&&"text"==e.modules.filter.attrType||"textarea"==e.modules.filter.tagType?"partial":"match",r="",l="";if(void 0===e.modules.filter.prevSuccess||e.modules.filter.prevSuccess!==t){if(e.modules.filter.prevSuccess=t,e.modules.filter.emptyFunc(t))delete n.headerFilters[s];else{switch(e.modules.filter.value=t,_typeof(e.definition.headerFilterFunc)){case"string":n.filters[e.definition.headerFilterFunc]?(r=e.definition.headerFilterFunc,o=function(o){var i=e.definition.headerFilterFuncParams||{},s=e.getFieldValue(o);return i="function"==typeof i?i(t,s,o):i,n.filters[e.definition.headerFilterFunc](t,s,o,i)}):console.warn("Header Filter Error - Matching filter function not found: ",e.definition.headerFilterFunc);break;case"function":o=function(o){var i=e.definition.headerFilterFuncParams||{},n=e.getFieldValue(o);return i="function"==typeof i?i(t,n,o):i,e.definition.headerFilterFunc(t,n,o,i)},r=o}if(!o)switch(a){case"partial":o=function(o){var i=e.getFieldValue(o);return void 0!==i&&null!==i&&String(i).toLowerCase().indexOf(String(t).toLowerCase())>-1},r="like";break;default:o=function(o){return e.getFieldValue(o)==t},r="="}n.headerFilters[s]={value:t,func:o,type:r,params:i||{}}}l=JSON.stringify(n.headerFilters),n.prevHeaderFilterChangeCheck!==l&&(n.prevHeaderFilterChangeCheck=l,n.changed=!0,n.table.rowManager.filterRefresh())}return!0}var i,n=this,s=e.getField();e.modules.filter={success:o,attrType:!1,tagType:!1,emptyFunc:!1},this.generateHeaderFilterElement(e)},T.prototype.generateHeaderFilterElement=function(e,t,o){function i(){}var n,s,a,r,l,c,u,d=this,h=this,p=e.modules.filter.success,m=e.getField();if(e.modules.filter.headerElement&&e.modules.filter.headerElement.parentNode&&e.contentElement.removeChild(e.modules.filter.headerElement.parentNode),m){switch(e.modules.filter.emptyFunc=e.definition.headerFilterEmptyCheck||function(e){return!e&&"0"!==e},n=document.createElement("div"),n.classList.add("tabulator-header-filter"),_typeof(e.definition.headerFilter)){case"string":h.table.modules.edit.editors[e.definition.headerFilter]?(s=h.table.modules.edit.editors[e.definition.headerFilter],"tick"!==e.definition.headerFilter&&"tickCross"!==e.definition.headerFilter||e.definition.headerFilterEmptyCheck||(e.modules.filter.emptyFunc=function(e){return!0!==e&&!1!==e})):console.warn("Filter Error - Cannot build header filter, No such editor found: ",e.definition.editor);break;case"function":s=e.definition.headerFilter;break;case"boolean":e.modules.edit&&e.modules.edit.editor?s=e.modules.edit.editor:e.definition.formatter&&h.table.modules.edit.editors[e.definition.formatter]?(s=h.table.modules.edit.editors[e.definition.formatter],"tick"!==e.definition.formatter&&"tickCross"!==e.definition.formatter||e.definition.headerFilterEmptyCheck||(e.modules.filter.emptyFunc=function(e){return!0!==e&&!1!==e})):s=h.table.modules.edit.editors.input}if(s){if(r={getValue:function(){return void 0!==t?t:""},getField:function(){return e.definition.field},getElement:function(){return n},getColumn:function(){return e.getComponent()},getRow:function(){return{normalizeHeight:function(){}}}},u=e.definition.headerFilterParams||{},u="function"==typeof u?u.call(h.table):u,!(a=s.call(this.table.modules.edit,r,function(){},p,i,u)))return void console.warn("Filter Error - Cannot add filter to "+m+" column, editor returned a value of false");if(!(a instanceof Node))return void console.warn("Filter Error - Cannot add filter to "+m+" column, editor should return an instance of Node, the editor returned:",a);m?h.table.modules.localize.bind("headerFilters|columns|"+e.definition.field,function(e){a.setAttribute("placeholder",void 0!==e&&e?e:h.table.modules.localize.getText("headerFilters|default"))}):h.table.modules.localize.bind("headerFilters|default",function(e){a.setAttribute("placeholder",void 0!==h.column.definition.headerFilterPlaceholder&&h.column.definition.headerFilterPlaceholder?h.column.definition.headerFilterPlaceholder:e)}),a.addEventListener("click",function(e){e.stopPropagation(),a.focus()}), -a.addEventListener("focus",function(e){var t=d.table.columnManager.element.scrollLeft;t!==d.table.rowManager.element.scrollLeft&&(d.table.rowManager.scrollHorizontal(t),d.table.columnManager.scrollHorizontal(t))}),l=!1,c=function(e){l&&clearTimeout(l),l=setTimeout(function(){p(a.value)},h.table.options.headerFilterLiveFilterDelay)},e.modules.filter.headerElement=a,e.modules.filter.attrType=a.hasAttribute("type")?a.getAttribute("type").toLowerCase():"",e.modules.filter.tagType=a.tagName.toLowerCase(),!1!==e.definition.headerFilterLiveFilter&&("autocomplete"!==e.definition.headerFilter&&"tickCross"!==e.definition.headerFilter&&("autocomplete"!==e.definition.editor&&"tickCross"!==e.definition.editor||!0!==e.definition.headerFilter)&&(a.addEventListener("keyup",c),a.addEventListener("search",c),"number"==e.modules.filter.attrType&&a.addEventListener("change",function(e){p(a.value)}),"text"==e.modules.filter.attrType&&"ie"!==this.table.browser&&a.setAttribute("type","search")),"input"!=e.modules.filter.tagType&&"select"!=e.modules.filter.tagType&&"textarea"!=e.modules.filter.tagType||a.addEventListener("mousedown",function(e){e.stopPropagation()})),n.appendChild(a),e.contentElement.appendChild(n),o||h.headerFilterColumns.push(e)}}else console.warn("Filter Error - Cannot add header filter, column has no field set:",e.definition.title)},T.prototype.hideHeaderFilterElements=function(){this.headerFilterColumns.forEach(function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="none")})},T.prototype.showHeaderFilterElements=function(){this.headerFilterColumns.forEach(function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="")})},T.prototype.setHeaderFilterFocus=function(e){e.modules.filter&&e.modules.filter.headerElement?e.modules.filter.headerElement.focus():console.warn("Column Filter Focus Error - No header filter set on column:",e.getField())},T.prototype.getHeaderFilterValue=function(e){if(e.modules.filter&&e.modules.filter.headerElement)return e.modules.filter.headerElement.value;console.warn("Column Filter Error - No header filter set on column:",e.getField())},T.prototype.setHeaderFilterValue=function(e,t){e&&(e.modules.filter&&e.modules.filter.headerElement?(this.generateHeaderFilterElement(e,t,!0),e.modules.filter.success(t)):console.warn("Column Filter Error - No header filter set on column:",e.getField()))},T.prototype.reloadHeaderFilter=function(e){e&&(e.modules.filter&&e.modules.filter.headerElement?this.generateHeaderFilterElement(e,e.modules.filter.value,!0):console.warn("Column Filter Error - No header filter set on column:",e.getField()))},T.prototype.hasChanged=function(){var e=this.changed;return this.changed=!1,e},T.prototype.setFilter=function(e,t,o,i){var n=this;n.filterList=[],Array.isArray(e)||(e=[{field:e,type:t,value:o,params:i}]),n.addFilter(e)},T.prototype.addFilter=function(e,t,o,i){var n=this;Array.isArray(e)||(e=[{field:e,type:t,value:o,params:i}]),e.forEach(function(e){(e=n.findFilter(e))&&(n.filterList.push(e),n.changed=!0)}),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},T.prototype.findFilter=function(e){var t,o=this;if(Array.isArray(e))return this.findSubFilters(e);var i=!1;return"function"==typeof e.field?i=function(t){return e.field(t,e.type||{})}:o.filters[e.type]?(t=o.table.columnManager.getColumnByField(e.field),i=t?function(i){return o.filters[e.type](e.value,t.getFieldValue(i),i,e.params||{})}:function(t){return o.filters[e.type](e.value,t[e.field],t,e.params||{})}):console.warn("Filter Error - No such filter type found, ignoring: ",e.type),e.func=i,!!e.func&&e},T.prototype.findSubFilters=function(e){var t=this,o=[];return e.forEach(function(e){(e=t.findFilter(e))&&o.push(e)}),!!o.length&&o},T.prototype.getFilters=function(e,t){var o=[];return e&&(o=this.getHeaderFilters()),t&&o.forEach(function(e){"function"==typeof e.type&&(e.type="function")}),o=o.concat(this.filtersToArray(this.filterList,t))},T.prototype.filtersToArray=function(e,t){var o=this,i=[];return e.forEach(function(e){var n;Array.isArray(e)?i.push(o.filtersToArray(e,t)):(n={field:e.field,type:e.type,value:e.value},t&&"function"==typeof n.type&&(n.type="function"),i.push(n))}),i},T.prototype.getHeaderFilters=function(){var e=[];for(var t in this.headerFilters)e.push({field:t,type:this.headerFilters[t].type,value:this.headerFilters[t].value});return e},T.prototype.removeFilter=function(e,t,o){var i=this;Array.isArray(e)||(e=[{field:e,type:t,value:o}]),e.forEach(function(e){var t=-1;t="object"==_typeof(e.field)?i.filterList.findIndex(function(t){return e===t}):i.filterList.findIndex(function(t){return e.field===t.field&&e.type===t.type&&e.value===t.value}),t>-1?(i.filterList.splice(t,1),i.changed=!0):console.warn("Filter Error - No matching filter type found, ignoring: ",e.type)}),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},T.prototype.clearFilter=function(e){this.filterList=[],e&&this.clearHeaderFilter(),this.changed=!0,this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},T.prototype.clearHeaderFilter=function(){var e=this;this.headerFilters={},e.prevHeaderFilterChangeCheck="{}",this.headerFilterColumns.forEach(function(t){t.modules.filter.value=null,t.modules.filter.prevSuccess=void 0,e.reloadHeaderFilter(t)}),this.changed=!0},T.prototype.search=function(e,t,o,i){var n=this,s=[],a=[];return Array.isArray(t)||(t=[{field:t,type:o,value:i}]),t.forEach(function(e){(e=n.findFilter(e))&&a.push(e)}),this.table.rowManager.rows.forEach(function(t){var o=!0;a.forEach(function(e){n.filterRecurse(e,t.getData())||(o=!1)}),o&&s.push("data"===e?t.getData("data"):t.getComponent())}),s},T.prototype.filter=function(e,t){var o=this,i=[],n=[];return o.table.options.dataFiltering&&o.table.options.dataFiltering.call(o.table,o.getFilters()),o.table.options.ajaxFiltering||!o.filterList.length&&!Object.keys(o.headerFilters).length?i=e.slice(0):e.forEach(function(e){o.filterRow(e)&&i.push(e)}),o.table.options.dataFiltered&&(i.forEach(function(e){n.push(e.getComponent())}),o.table.options.dataFiltered.call(o.table,o.getFilters(),n)),i},T.prototype.filterRow=function(e,t){var o=this,i=!0,n=e.getData();o.filterList.forEach(function(e){o.filterRecurse(e,n)||(i=!1)});for(var s in o.headerFilters)o.headerFilters[s].func(n)||(i=!1);return i},T.prototype.filterRecurse=function(e,t){var o=this,i=!1;return Array.isArray(e)?e.forEach(function(e){o.filterRecurse(e,t)&&(i=!0)}):i=e.func(t),i},T.prototype.filters={"=":function(e,t,o,i){return t==e},"<":function(e,t,o,i){return t":function(e,t,o,i){return t>e},">=":function(e,t,o,i){return t>=e},"!=":function(e,t,o,i){return t!=e},regex:function(e,t,o,i){return"string"==typeof e&&(e=new RegExp(e)),e.test(t)},like:function(e,t,o,i){return null===e||void 0===e?t===e:void 0!==t&&null!==t&&String(t).toLowerCase().indexOf(e.toLowerCase())>-1},keywords:function(e,t,o,i){var n=e.toLowerCase().split(void 0===i.separator?" ":i.separator),s=String(null===t||void 0===t?"":t).toLowerCase(),a=[];return n.forEach(function(e){s.includes(e)&&a.push(!0)}),i.matchAll?a.length===n.length:!!a.length},starts:function(e,t,o,i){return null===e||void 0===e?t===e:void 0!==t&&null!==t&&String(t).toLowerCase().startsWith(e.toLowerCase())},ends:function(e,t,o,i){return null===e||void 0===e?t===e:void 0!==t&&null!==t&&String(t).toLowerCase().endsWith(e.toLowerCase())},in:function(e,t,o,i){return Array.isArray(e)?!e.length||e.indexOf(t)>-1:(console.warn("Filter Error - filter value is not an array:",e),!1)}},h.prototype.registerModule("filter",T);var D=function(e){this.table=e};D.prototype.initializeColumn=function(e){e.modules.format=this.lookupFormatter(e,""),void 0!==e.definition.formatterPrint&&(e.modules.format.print=this.lookupFormatter(e,"Print")),void 0!==e.definition.formatterClipboard&&(e.modules.format.clipboard=this.lookupFormatter(e,"Clipboard")),void 0!==e.definition.formatterHtmlOutput&&(e.modules.format.htmlOutput=this.lookupFormatter(e,"HtmlOutput"))},D.prototype.lookupFormatter=function(e,t){var o={params:e.definition["formatter"+t+"Params"]||{}},i=e.definition["formatter"+t];switch(void 0===i?"undefined":_typeof(i)){case"string":"tick"===i&&(i="tickCross",void 0===o.params.crossElement&&(o.params.crossElement=!1),console.warn("DEPRECATION WARNING - the tick formatter has been deprecated, please use the tickCross formatter with the crossElement param set to false")),this.formatters[i]?o.formatter=this.formatters[i]:(console.warn("Formatter Error - No such formatter found: ",i),o.formatter=this.formatters.plaintext);break;case"function":o.formatter=i;break;default:o.formatter=this.formatters.plaintext}return o},D.prototype.cellRendered=function(e){e.modules.format&&e.modules.format.renderedCallback&&!e.modules.format.rendered&&(e.modules.format.renderedCallback(),e.modules.format.rendered=!0)},D.prototype.formatValue=function(e){function t(t){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=t,e.modules.format.rendered=!1}var o=e.getComponent(),i="function"==typeof e.column.modules.format.params?e.column.modules.format.params(o):e.column.modules.format.params;return e.column.modules.format.formatter.call(this,o,i,t)},D.prototype.formatExportValue=function(e,t){var o,i=e.column.modules.format[t];if(i){var n=function(t){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=t,e.modules.format.rendered=!1};return o="function"==typeof i.params?i.params(component):i.params,i.formatter.call(this,e.getComponent(),o,n)}return this.formatValue(e)},D.prototype.sanitizeHTML=function(e){if(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(e).replace(/[&<>"'`=\/]/g,function(e){return t[e]})}return e},D.prototype.emptyToSpace=function(e){return null===e||void 0===e||""===e?" ":e},D.prototype.getFormatter=function(e){var e;switch(void 0===e?"undefined":_typeof(e)){case"string":this.formatters[e]?e=this.formatters[e]:(console.warn("Formatter Error - No such formatter found: ",e),e=this.formatters.plaintext);break;case"function":e=e;break;default:e=this.formatters.plaintext}return e},D.prototype.formatters={plaintext:function(e,t,o){return this.emptyToSpace(this.sanitizeHTML(e.getValue()))},html:function(e,t,o){return e.getValue()},textarea:function(e,t,o){return e.getElement().style.whiteSpace="pre-wrap",this.emptyToSpace(this.sanitizeHTML(e.getValue()))},money:function(e,t,o){var i,n,s,a,r=parseFloat(e.getValue()),l=t.decimal||".",c=t.thousand||",",u=t.symbol||"",d=!!t.symbolAfter,h=void 0!==t.precision?t.precision:2;if(isNaN(r))return this.emptyToSpace(this.sanitizeHTML(e.getValue()));for(i=!1!==h?r.toFixed(h):r,i=String(i).split("."),n=i[0],s=i.length>1?l+i[1]:"",a=/(\d+)(\d{3})/;a.test(n);)n=n.replace(a,"$1"+c+"$2");return d?n+s+u:u+n+s},link:function(e,t,o){var i,n=e.getValue(),s=t.urlPrefix||"",a=t.download,r=n,l=document.createElement("a");if(t.labelField&&(i=e.getData(),r=i[t.labelField]),t.label)switch(_typeof(t.label)){case"string":r=t.label;break;case"function":r=t.label(e)}if(r){if(t.urlField&&(i=e.getData(),n=i[t.urlField]),t.url)switch(_typeof(t.url)){case"string":n=t.url;break;case"function":n=t.url(e)}return l.setAttribute("href",s+n),t.target&&l.setAttribute("target",t.target),t.download&&(a="function"==typeof a?a(e):!0===a?"":a,l.setAttribute("download",a)),l.innerHTML=this.emptyToSpace(this.sanitizeHTML(r)),l}return" "},image:function(e,t,o){var i=document.createElement("img");switch(i.setAttribute("src",e.getValue()),_typeof(t.height)){case"number":i.style.height=t.height+"px";break;case"string":i.style.height=t.height}switch(_typeof(t.width)){case"number":i.style.width=t.width+"px";break;case"string":i.style.width=t.width}return i.addEventListener("load",function(){e.getRow().normalizeHeight()}),i},tickCross:function(e,t,o){var i=e.getValue(),n=e.getElement(),s=t.allowEmpty,a=t.allowTruthy,r=void 0!==t.tickElement?t.tickElement:'',l=void 0!==t.crossElement?t.crossElement:'';return a&&i||!0===i||"true"===i||"True"===i||1===i||"1"===i?(n.setAttribute("aria-checked",!0),r||""):!s||"null"!==i&&""!==i&&null!==i&&void 0!==i?(n.setAttribute("aria-checked",!1),l||""):(n.setAttribute("aria-checked","mixed"),"")},datetime:function(e,t,o){var i=t.inputFormat||"YYYY-MM-DD hh:mm:ss",n=t.outputFormat||"DD/MM/YYYY hh:mm:ss",s=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",a=e.getValue(),r=moment(a,i);return r.isValid()?t.timezone?r.tz(t.timezone).format(n):r.format(n):!0===s?a:"function"==typeof s?s(a):s},datetimediff:function(e,t,o){var i=t.inputFormat||"YYYY-MM-DD hh:mm:ss",n=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",s=void 0!==t.suffix&&t.suffix,a=void 0!==t.unit?t.unit:void 0,r=void 0!==t.humanize&&t.humanize,l=void 0!==t.date?t.date:moment(),c=e.getValue(),u=moment(c,i);return u.isValid()?r?moment.duration(u.diff(l)).humanize(s):u.diff(l,a)+(s?" "+s:""):!0===n?c:"function"==typeof n?n(c):n},lookup:function(e,t,o){var i=e.getValue();return void 0===t[i]?(console.warn("Missing display value for "+i),i):t[i]},star:function(e,t,o){var i=e.getValue(),n=e.getElement(),s=t&&t.stars?t.stars:5,a=document.createElement("span"),r=document.createElementNS("http://www.w3.org/2000/svg","svg");a.style.verticalAlign="middle",r.setAttribute("width","14"),r.setAttribute("height","14"),r.setAttribute("viewBox","0 0 512 512"),r.setAttribute("xml:space","preserve"),r.style.padding="0 1px",i=i&&!isNaN(i)?parseInt(i):0,i=Math.max(0,Math.min(i,s));for(var l=1;l<=s;l++){var c=r.cloneNode(!0);c.innerHTML=l<=i?'':'',a.appendChild(c)}return n.style.whiteSpace="nowrap",n.style.overflow="hidden",n.style.textOverflow="ellipsis",n.setAttribute("aria-label",i),a},traffic:function(e,t,o){var i,n,s=this.sanitizeHTML(e.getValue())||0,a=document.createElement("span"),r=t&&t.max?t.max:100,l=t&&t.min?t.min:0,c=t&&void 0!==t.color?t.color:["red","orange","green"],u="#666666";if(!isNaN(s)&&void 0!==e.getValue()){switch(a.classList.add("tabulator-traffic-light"),n=parseFloat(s)<=r?parseFloat(s):r,n=parseFloat(n)>=l?parseFloat(n):l,i=(r-l)/100,n=Math.round((n-l)/i),void 0===c?"undefined":_typeof(c)){case"string":u=c;break;case"function":u=c(s);break;case"object":if(Array.isArray(c)){var d=100/c.length,h=Math.floor(n/d);h=Math.min(h,c.length-1),h=Math.max(h,0),u=c[h];break}}return a.style.backgroundColor=u,a}},progress:function(e,t,o){var i,n,s,a,r,l=this.sanitizeHTML(e.getValue())||0,u=e.getElement(),d=t&&t.max?t.max:100,h=t&&t.min?t.min:0,p=t&&t.legendAlign?t.legendAlign:"center";switch(n=parseFloat(l)<=d?parseFloat(l):d,n=parseFloat(n)>=h?parseFloat(n):h,i=(d-h)/100,n=Math.round((n-h)/i),_typeof(t.color)){case"string":s=t.color;break;case"function":s=t.color(l);break;case"object":if(Array.isArray(t.color)){var m=100/t.color.length,f=Math.floor(n/m);f=Math.min(f,t.color.length-1),f=Math.max(f,0),s=t.color[f];break}default:s="#2DC214"}switch(_typeof(t.legend)){case"string":a=t.legend;break;case"function":a=t.legend(l);break;case"boolean":a=l;break;default:a=!1}switch(_typeof(t.legendColor)){case"string":r=t.legendColor;break;case"function":r=t.legendColor(l);break;case"object":if(Array.isArray(t.legendColor)){var m=100/t.legendColor.length,f=Math.floor(n/m);f=Math.min(f,t.legendColor.length-1),f=Math.max(f,0),r=t.legendColor[f]}break;default:r="#000"}u.style.minWidth="30px",u.style.position="relative",u.setAttribute("aria-label",n);var g=document.createElement("div");if(g.style.display="inline-block",g.style.position="relative",g.style.width=n+"%",g.style.backgroundColor=s,g.style.height="100%",g.setAttribute("data-max",d),g.setAttribute("data-min",h),a){var b=document.createElement("div");b.style.position="absolute",b.style.top="4px",b.style.left=0,b.style.textAlign=p,b.style.width="100%",b.style.color=r,b.innerHTML=a}return o(function(){if(!(e instanceof c)){var t=document.createElement("div");t.style.position="absolute",t.style.top="4px",t.style.bottom="4px",t.style.left="4px",t.style.right="4px",u.appendChild(t),u=t}u.appendChild(g),a&&u.appendChild(b)}),""},color:function(e,t,o){return e.getElement().style.backgroundColor=this.sanitizeHTML(e.getValue()),""},buttonTick:function(e,t,o){return''},buttonCross:function(e,t,o){return''},rownum:function(e,t,o){return this.table.rowManager.activeRows.indexOf(e.getRow()._getSelf())+1},handle:function(e,t,o){return e.getElement().classList.add("tabulator-row-handle"),"
"},responsiveCollapse:function(e,t,o){function i(e){var t=s.element;s.open=e,t&&(s.open?(n.classList.add("open"),t.style.display=""):(n.classList.remove("open"),t.style.display="none"))}var n=document.createElement("div"),s=e.getRow()._row.modules.responsiveLayout;return n.classList.add("tabulator-responsive-collapse-toggle"),n.innerHTML="+-",e.getElement().classList.add("tabulator-row-handle"),n.addEventListener("click",function(e){e.stopImmediatePropagation(),i(!s.open)}),i(s.open),n},rowSelection:function(e,t,o){var i=this,n=document.createElement("input");if(n.type="checkbox",this.table.modExists("selectRow",!0))if(n.addEventListener("click",function(e){e.stopPropagation()}),"function"==typeof e.getRow){var s=e.getRow();s instanceof r?(n.addEventListener("change",function(e){s.toggleSelect()}),n.checked=s.isSelected&&s.isSelected(),this.table.modules.selectRow.registerRowSelectCheckbox(s,n)):n=""}else n.addEventListener("change",function(e){i.table.modules.selectRow.selectedRows.length?i.table.deselectRow():i.table.selectRow(t.rowRange)}),this.table.modules.selectRow.registerHeaderSelectCheckbox(n);return n}},h.prototype.registerModule("format",D);var k=function(e){this.table=e,this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.rightPadding=0,this.initializationMode="left",this.active=!1,this.scrollEndTimer=!1};k.prototype.reset=function(){this.initializationMode="left",this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.rightMargin=0,this.active=!1,this.table.columnManager.headersElement.style.marginLeft=0,this.table.columnManager.element.style.paddingRight=0},k.prototype.initializeColumn=function(e){var t={margin:0,edge:!1};e.isGroup||(this.frozenCheck(e)?(t.position=this.initializationMode,"left"==this.initializationMode?this.leftColumns.push(e):this.rightColumns.unshift(e),this.active=!0,e.modules.frozen=t):this.initializationMode="right")},k.prototype.frozenCheck=function(e){return e.parent.isGroup&&e.definition.frozen&&console.warn("Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups"),e.parent.isGroup?this.frozenCheck(e.parent):e.definition.frozen},k.prototype.scrollHorizontal=function(){var e,t=this;this.active&&(clearTimeout(this.scrollEndTimer),this.scrollEndTimer=setTimeout(function(){t.layout()},100),e=this.table.rowManager.getVisibleRows(),this.calcMargins(),this.layoutColumnPosition(),this.layoutCalcRows(),e.forEach(function(e){"row"===e.type&&t.layoutRow(e)}),this.table.rowManager.tableElement.style.marginRight=this.rightMargin)},k.prototype.calcMargins=function(){this.leftMargin=this._calcSpace(this.leftColumns,this.leftColumns.length)+"px",this.table.columnManager.headersElement.style.marginLeft=this.leftMargin,this.rightMargin=this._calcSpace(this.rightColumns,this.rightColumns.length)+"px",this.table.columnManager.element.style.paddingRight=this.rightMargin,this.rightPadding=this.table.rowManager.element.clientWidth+this.table.columnManager.scrollLeft},k.prototype.layoutCalcRows=function(){this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&this.table.modules.columnCalcs.topRow&&this.layoutRow(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&this.table.modules.columnCalcs.botRow&&this.layoutRow(this.table.modules.columnCalcs.botRow))},k.prototype.layoutColumnPosition=function(e){var t=this,o=[];this.leftColumns.forEach(function(i,n){if(i.modules.frozen.margin=t._calcSpace(t.leftColumns,n)+t.table.columnManager.scrollLeft+"px",n==t.leftColumns.length-1?i.modules.frozen.edge=!0:i.modules.frozen.edge=!1,i.parent.isGroup){var s=t.getColGroupParentElement(i);o.includes(s)||(t.layoutElement(s,i),o.push(s)),i.modules.frozen.edge&&s.classList.add("tabulator-frozen-"+i.modules.frozen.position)}else t.layoutElement(i.getElement(),i);e&&i.cells.forEach(function(e){t.layoutElement(e.getElement(),i)})}),this.rightColumns.forEach(function(o,i){o.modules.frozen.margin=t.rightPadding-t._calcSpace(t.rightColumns,i+1)+"px",i==t.rightColumns.length-1?o.modules.frozen.edge=!0:o.modules.frozen.edge=!1,o.parent.isGroup?t.layoutElement(t.getColGroupParentElement(o),o):t.layoutElement(o.getElement(),o),e&&o.cells.forEach(function(e){t.layoutElement(e.getElement(),o)})})},k.prototype.getColGroupParentElement=function(e){return e.parent.isGroup?this.getColGroupParentElement(e.parent):e.getElement()},k.prototype.layout=function(){var e=this;e.active&&(this.calcMargins(),e.table.rowManager.getDisplayRows().forEach(function(t){"row"===t.type&&e.layoutRow(t)}),this.layoutCalcRows(),this.layoutColumnPosition(!0),this.table.rowManager.tableElement.style.marginRight=this.rightMargin)},k.prototype.layoutRow=function(e){var t=this;e.getElement().style.paddingLeft=this.leftMargin,this.leftColumns.forEach(function(o){var i=e.getCell(o);i&&t.layoutElement(i.getElement(),o)}),this.rightColumns.forEach(function(o){var i=e.getCell(o);i&&t.layoutElement(i.getElement(),o)})},k.prototype.layoutElement=function(e,t){t.modules.frozen&&(e.style.position="absolute",e.style.left=t.modules.frozen.margin,e.classList.add("tabulator-frozen"),t.modules.frozen.edge&&e.classList.add("tabulator-frozen-"+t.modules.frozen.position))},k.prototype._calcSpace=function(e,t){for(var o=0,i=0;i-1&&t.splice(o,1)}),t},z.prototype.freezeRow=function(e){e.modules.frozen?console.warn("Freeze Error - Row is already frozen"):(e.modules.frozen=!0,this.topElement.appendChild(e.getElement()),e.initialize(),e.normalizeHeight(),this.table.rowManager.adjustTableSize(),this.rows.push(e),this.table.rowManager.refreshActiveData("display"),this.styleRows())},z.prototype.unfreezeRow=function(e){this.rows.indexOf(e);e.modules.frozen?(e.modules.frozen=!1,this.detachRow(e),this.table.rowManager.adjustTableSize(),this.table.rowManager.refreshActiveData("display"),this.rows.length&&this.styleRows()):console.warn("Freeze Error - Row is already unfrozen")},z.prototype.detachRow=function(e){var t=this.rows.indexOf(e);if(t>-1){var o=e.getElement();o.parentNode.removeChild(o),this.rows.splice(t,1)}},z.prototype.styleRows=function(e){var t=this;this.rows.forEach(function(e,o){t.table.rowManager.styleRow(e,o)})},h.prototype.registerModule("frozenRows",z);var S=function(e){this._group=e,this.type="GroupComponent"};S.prototype.getKey=function(){return this._group.key},S.prototype.getField=function(){return this._group.field},S.prototype.getElement=function(){return this._group.element},S.prototype.getRows=function(){return this._group.getRows(!0)},S.prototype.getSubGroups=function(){return this._group.getSubGroups(!0)},S.prototype.getParentGroup=function(){return!!this._group.parent&&this._group.parent.getComponent()},S.prototype.getVisibility=function(){return console.warn("getVisibility function is deprecated, you should now use the isVisible function"),this._group.visible},S.prototype.isVisible=function(){return this._group.visible},S.prototype.show=function(){this._group.show()},S.prototype.hide=function(){this._group.hide()},S.prototype.toggle=function(){this._group.toggleVisibility()},S.prototype._getSelf=function(){return this._group},S.prototype.getTable=function(){return this._group.groupManager.table};var H=function(e,t,o,i,n,s,a){this.groupManager=e,this.parent=t,this.key=i,this.level=o,this.field=n,this.hasSubGroups=o-1?o?this.rows.splice(n+1,0,e):this.rows.splice(n,0,e):o?this.rows.push(e):this.rows.unshift(e),e.modules.group=this,this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this),this.groupManager.updateGroupRows(!0)},H.prototype.scrollHeader=function(e){this.arrowElement.style.marginLeft=e,this.groupList.forEach(function(t){t.scrollHeader(e)})},H.prototype.getRowIndex=function(e){},H.prototype.conformRowData=function(e){return this.field?e[this.field]=this.key:console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"),this.parent&&(e=this.parent.conformRowData(e)),e},H.prototype.removeRow=function(e){var t=this.rows.indexOf(e),o=e.getElement();t>-1&&this.rows.splice(t,1),this.groupManager.table.options.groupValues||this.rows.length?(o.parentNode&&o.parentNode.removeChild(o),this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this)):(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this),this.groupManager.updateGroupRows(!0))},H.prototype.removeGroup=function(e){var t,o=e.level+"_"+e.key;this.groups[o]&&(delete this.groups[o],t=this.groupList.indexOf(e),t>-1&&this.groupList.splice(t,1),this.groupList.length||(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this)))},H.prototype.getHeadersAndRows=function(e){var t=[];return t.push(this),this._visSet(),this.visible?this.groupList.length?this.groupList.forEach(function(o){t=t.concat(o.getHeadersAndRows(e))}):(!e&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),t.push(this.calcs.top)),t=t.concat(this.rows),!e&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),t.push(this.calcs.bottom))):this.groupList.length||"table"==this.groupManager.table.options.columnCalcs||this.groupManager.table.modExists("columnCalcs")&&(!e&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),t.push(this.calcs.top))),!e&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),t.push(this.calcs.bottom)))),t},H.prototype.getData=function(e,t){var o=[];return this._visSet(),(!e||e&&this.visible)&&this.rows.forEach(function(e){o.push(e.getData(t||"data"))}),o},H.prototype.getRowCount=function(){var e=0;return this.groupList.length?this.groupList.forEach(function(t){e+=t.getRowCount()}):e=this.rows.length,e},H.prototype.toggleVisibility=function(){this.visible?this.hide():this.show()},H.prototype.hide=function(){this.visible=!1,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination?this.groupManager.updateGroupRows(!0):(this.element.classList.remove("tabulator-group-visible"),this.groupList.length?this.groupList.forEach(function(e){e.getHeadersAndRows().forEach(function(e){e.detachElement()})}):this.rows.forEach(function(e){var t=e.getElement();t.parentNode.removeChild(t)}),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex()),this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()),this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),!1)},H.prototype.show=function(){var e=this;if(e.visible=!0,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination)this.groupManager.updateGroupRows(!0);else{this.element.classList.add("tabulator-group-visible");var t=e.getElement();this.groupList.length?this.groupList.forEach(function(e){e.getHeadersAndRows().forEach(function(e){var o=e.getElement();t.parentNode.insertBefore(o,t.nextSibling),e.initialize(),t=o})}):e.rows.forEach(function(e){var o=e.getElement();t.parentNode.insertBefore(o,t.nextSibling),e.initialize(),t=o}),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex()),this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()}this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),!0)},H.prototype._visSet=function(){var e=[];"function"==typeof this.visible&&(this.rows.forEach(function(t){e.push(t.getData())}),this.visible=this.visible(this.key,this.getRowCount(),e,this.getComponent()))},H.prototype.getRowGroup=function(e){var t=!1;return this.groupList.length?this.groupList.forEach(function(o){var i=o.getRowGroup(e);i&&(t=i)}):this.rows.find(function(t){return t===e})&&(t=this),t},H.prototype.getSubGroups=function(e){var t=[];return this.groupList.forEach(function(o){t.push(e?o.getComponent():o)}),t},H.prototype.getRows=function(e){var t=[];return this.rows.forEach(function(o){t.push(e?o.getComponent():o)}),t},H.prototype.generateGroupHeaderContents=function(){var e=[];for(this.rows.forEach(function(t){e.push(t.getData())}),this.elementContents=this.generator(this.key,this.getRowCount(),e,this.getComponent());this.element.firstChild;)this.element.removeChild(this.element.firstChild);"string"==typeof this.elementContents?this.element.innerHTML=this.elementContents:this.element.appendChild(this.elementContents),this.element.insertBefore(this.arrowElement,this.element.firstChild)},H.prototype.getPath=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.unshift(this.key),this.parent&&this.parent.getPath(e),e},H.prototype.getElement=function(){this.addBindingsd=!1,this._visSet(),this.visible?this.element.classList.add("tabulator-group-visible"):this.element.classList.remove("tabulator-group-visible");for(var e=0;ei.length&&console.warn("Error creating group headers, groupHeader array is shorter than groupBy array"),e.headerGenerator=[function(){return""}],this.startOpen=[function(){return!1}],e.table.modules.localize.bind("groups|item",function(t,o){e.headerGenerator[0]=function(e,i,n){return(void 0===e?"":e)+"("+i+" "+(1===i?t:o.groups.items)+")"}}),this.groupIDLookups=[],Array.isArray(t)||t)this.table.modExists("columnCalcs")&&"table"!=this.table.options.columnCalcs&&"both"!=this.table.options.columnCalcs&&this.table.modules.columnCalcs.removeCalcs();else if(this.table.modExists("columnCalcs")&&"group"!=this.table.options.columnCalcs){var n=this.table.columnManager.getRealColumns();n.forEach(function(t){t.definition.topCalc&&e.table.modules.columnCalcs.initializeTopRow(),t.definition.bottomCalc&&e.table.modules.columnCalcs.initializeBottomRow()})}Array.isArray(t)||(t=[t]),t.forEach(function(t,o){var i,n;"function"==typeof t?i=t:(n=e.table.columnManager.getColumnByField(t),i=n?function(e){return n.getFieldValue(e)}:function(e){return e[t]}),e.groupIDLookups.push({field:"function"!=typeof t&&t,func:i,values:!!e.allowedValues&&e.allowedValues[o]})}),o&&(Array.isArray(o)||(o=[o]),o.forEach(function(e){e="function"==typeof e?e:function(){return!0}}),e.startOpen=o),i&&(e.headerGenerator=Array.isArray(i)?i:[i]),this.initialized=!0},P.prototype.setDisplayIndex=function(e){this.displayIndex=e},P.prototype.getDisplayIndex=function(){return this.displayIndex},P.prototype.getRows=function(e){return this.groupIDLookups.length?(this.table.options.dataGrouping.call(this.table),this.generateGroups(e),this.table.options.dataGrouped&&this.table.options.dataGrouped.call(this.table,this.getGroups(!0)),this.updateGroupRows()):e.slice(0)},P.prototype.getGroups=function(e){var t=[];return this.groupList.forEach(function(o){t.push(e?o.getComponent():o)}),t},P.prototype.getChildGroups=function(e){var t=this,o=[];return e||(e=this),e.groupList.forEach(function(e){e.groupList.length?o=o.concat(t.getChildGroups(e)):o.push(e)}),o},P.prototype.wipe=function(){this.groupList.forEach(function(e){e.wipe()})},P.prototype.pullGroupListData=function(e){var t=this,o=[];return e.forEach(function(e){var i={};i.level=0,i.rowCount=0,i.headerContent="";var n=[];e.hasSubGroups?(n=t.pullGroupListData(e.groupList),i.level=e.level,i.rowCount=n.length-e.groupList.length,i.headerContent=e.generator(e.key,i.rowCount,e.rows,e),o.push(i),o=o.concat(n)):(i.level=e.level,i.headerContent=e.generator(e.key,e.rows.length,e.rows,e),i.rowCount=e.getRows().length,o.push(i),e.getRows().forEach(function(e){o.push(e.getData("data"))}))}),o},P.prototype.getGroupedData=function(){return this.pullGroupListData(this.groupList)},P.prototype.getRowGroup=function(e){var t=!1;return this.groupList.forEach(function(o){var i=o.getRowGroup(e);i&&(t=i)}),t},P.prototype.countGroups=function(){return this.groupList.length},P.prototype.generateGroups=function(e){var t=this,o=t.groups;t.groups={},t.groupList=[],this.allowedValues&&this.allowedValues[0]?(this.allowedValues[0].forEach(function(e){t.createGroup(e,0,o)}),e.forEach(function(e){t.assignRowToExistingGroup(e,o)})):e.forEach(function(e){t.assignRowToGroup(e,o)})},P.prototype.createGroup=function(e,t,o){var i,n=t+"_"+e;o=o||[],i=new H(this,!1,t,e,this.groupIDLookups[0].field,this.headerGenerator[0],o[n]),this.groups[n]=i,this.groupList.push(i)},P.prototype.assignRowToExistingGroup=function(e,t){var o=this.groupIDLookups[0].func(e.getData()),i="0_"+o;this.groups[i]&&this.groups[i].addRow(e)},P.prototype.assignRowToGroup=function(e,t){var o=this.groupIDLookups[0].func(e.getData()),i=!this.groups["0_"+o];return i&&this.createGroup(o,0,t),this.groups["0_"+o].addRow(e),!i},P.prototype.reassignRowToGroup=function(e){var t=e.getGroup(),o=t.getPath(),i=this.getExpectedPath(e);o.length==i.length&&o.every(function(e,t){return e===i[t]})||(t.removeRow(e),this.assignRowToGroup(e,self.groups),this.table.rowManager.refreshActiveData("group",!1,!0))},P.prototype.getExpectedPath=function(e){var t=[],o=e.getData();return this.groupIDLookups.forEach(function(e){t.push(e.func(o))}),t},P.prototype.updateGroupRows=function(e){var t=this,o=[];if(t.groupList.forEach(function(e){o=o.concat(e.getHeadersAndRows())}),e){var i=t.table.rowManager.setDisplayRows(o,this.getDisplayIndex());!0!==i&&this.setDisplayIndex(i),t.table.rowManager.refreshActiveData("group",!0,!0)}return o},P.prototype.scrollHeaders=function(e){this.table.options.virtualDomHoz&&(e-=this.table.vdomHoz.vDomPadLeft),e+="px",this.groupList.forEach(function(t){t.scrollHeader(e)})},P.prototype.removeGroup=function(e){var t,o=e.level+"_"+e.key;this.groups[o]&&(delete this.groups[o],(t=this.groupList.indexOf(e))>-1&&this.groupList.splice(t,1))},h.prototype.registerModule("groupRows",P);var A=function(e){this.table=e,this.history=[],this.index=-1};A.prototype.clear=function(){this.history=[],this.index=-1},A.prototype.action=function(e,t,o){this.history=this.history.slice(0,this.index+1),this.history.push({type:e,component:t,data:o}),this.index++},A.prototype.getHistoryUndoSize=function(){return this.index+1},A.prototype.getHistoryRedoSize=function(){return this.history.length-(this.index+1)},A.prototype.clearComponentHistory=function(e){var t=this.history.findIndex(function(t){return t.component===e});t>-1&&(this.history.splice(t,1),t<=this.index&&this.index--,this.clearComponentHistory(e))},A.prototype.undo=function(){if(this.index>-1){var e=this.history[this.index];return this.undoers[e.type].call(this,e),this.index--,this.table.options.historyUndo.call(this.table,e.type,e.component.getComponent(),e.data),!0}return console.warn("History Undo Error - No more history to undo"),!1},A.prototype.redo=function(){if(this.history.length-1>this.index){this.index++;var e=this.history[this.index];return this.redoers[e.type].call(this,e),this.table.options.historyRedo.call(this.table,e.type,e.component.getComponent(),e.data),!0}return console.warn("History Redo Error - No more history to redo"),!1},A.prototype.undoers={cellEdit:function(e){e.component.setValueProcessData(e.data.oldValue)},rowAdd:function(e){e.component.deleteActual()},rowDelete:function(e){var t=this.table.rowManager.addRowActual(e.data.data,e.data.pos,e.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(e.component,t)},rowMove:function(e){this.table.rowManager.moveRowActual(e.component,this.table.rowManager.rows[e.data.posFrom],!e.data.after),this.table.rowManager.redraw()}},A.prototype.redoers={cellEdit:function(e){e.component.setValueProcessData(e.data.newValue)},rowAdd:function(e){var t=this.table.rowManager.addRowActual(e.data.data,e.data.pos,e.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(e.component,t)},rowDelete:function(e){e.component.deleteActual()},rowMove:function(e){this.table.rowManager.moveRowActual(e.component,this.table.rowManager.rows[e.data.posTo],e.data.after),this.table.rowManager.redraw()}},A.prototype._rebindRow=function(e,t){this.history.forEach(function(o){if(o.component instanceof l)o.component===e&&(o.component=t);else if(o.component instanceof u&&o.component.row===e){var i=o.component.column.getField();i&&(o.component=t.getCell(i))}})},h.prototype.registerModule("history",A);var _=function(e){this.table=e,this.fieldIndex=[],this.hasIndex=!1};_.prototype.parseTable=function(){var e=this,t=e.table.element,o=e.table.options,i=(o.columns,t.getElementsByTagName("th")),n=t.getElementsByTagName("tbody")[0],s=[];e.hasIndex=!1,e.table.options.htmlImporting.call(this.table),n=n?n.getElementsByTagName("tr"):[],e._extractOptions(t,o),i.length?e._extractHeaders(i,n):e._generateBlankHeaders(i,n);for(var a=0;a-1&&e.pressedKeys.splice(i,1)}},this.table.element.addEventListener("keydown",this.keyupBinding),this.table.element.addEventListener("keyup",this.keydownBinding)},F.prototype.clearBindings=function(){this.keyupBinding&&this.table.element.removeEventListener("keydown",this.keyupBinding),this.keydownBinding&&this.table.element.removeEventListener("keyup",this.keydownBinding)},F.prototype.checkBinding=function(e,t){var o=this,i=!0;return e.ctrlKey==t.ctrl&&e.shiftKey==t.shift&&e.metaKey==t.meta&&(t.keys.forEach(function(e){-1==o.pressedKeys.indexOf(e)&&(i=!1)}),i&&t.action.call(o,e),!0)},F.prototype.bindings={navPrev:"shift + 9",navNext:9,navUp:38,navDown:40,scrollPageUp:33,scrollPageDown:34,scrollToStart:36,scrollToEnd:35,undo:"ctrl + 90",redo:"ctrl + 89",copyToClipboard:"ctrl + 67"},F.prototype.actions={keyBlock:function(e){e.stopPropagation(),e.preventDefault()},scrollPageUp:function(e){var t=this.table.rowManager,o=t.scrollTop-t.height;t.element.scrollHeight;e.preventDefault(),t.displayRowsCount&&(o>=0?t.element.scrollTop=o:t.scrollToRow(t.getDisplayRows()[0])),this.table.element.focus()},scrollPageDown:function(e){var t=this.table.rowManager,o=t.scrollTop+t.height,i=t.element.scrollHeight;e.preventDefault(),t.displayRowsCount&&(o<=i?t.element.scrollTop=o:t.scrollToRow(t.getDisplayRows()[t.displayRowsCount-1])),this.table.element.focus()},scrollToStart:function(e){var t=this.table.rowManager;e.preventDefault(),t.displayRowsCount&&t.scrollToRow(t.getDisplayRows()[0]),this.table.element.focus()},scrollToEnd:function(e){var t=this.table.rowManager;e.preventDefault(),t.displayRowsCount&&t.scrollToRow(t.getDisplayRows()[t.displayRowsCount-1]),this.table.element.focus()},navPrev:function(e){var t=!1;this.table.modExists("edit")&&(t=this.table.modules.edit.currentCell)&&(e.preventDefault(),t.nav().prev())},navNext:function(e){var t,o=!1,i=this.table.options.tabEndNewRow;this.table.modExists("edit")&&(o=this.table.modules.edit.currentCell)&&(e.preventDefault(),t=o.nav(),t.next()||i&&(o.getElement().firstChild.blur(),i=!0===i?this.table.addRow({}):"function"==typeof i?this.table.addRow(i(o.row.getComponent())):this.table.addRow(Object.assign({},i)),i.then(function(){setTimeout(function(){t.next()})})))},navLeft:function(e){var t=!1;this.table.modExists("edit")&&(t=this.table.modules.edit.currentCell)&&(e.preventDefault(),t.nav().left())},navRight:function(e){var t=!1;this.table.modExists("edit")&&(t=this.table.modules.edit.currentCell)&&(e.preventDefault(),t.nav().right())},navUp:function(e){var t=!1;this.table.modExists("edit")&&(t=this.table.modules.edit.currentCell)&&(e.preventDefault(),t.nav().up())},navDown:function(e){var t=!1;this.table.modExists("edit")&&(t=this.table.modules.edit.currentCell)&&(e.preventDefault(),t.nav().down())},undo:function(e){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(e.preventDefault(),this.table.modules.history.undo()))},redo:function(e){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(e.preventDefault(),this.table.modules.history.redo()))},copyToClipboard:function(e){this.table.modules.edit.currentCell||this.table.modExists("clipboard",!0)&&this.table.modules.clipboard.copy(!1,!0)}},h.prototype.registerModule("keybindings",F);var N=function(e){this.table=e,this.menuEl=!1,this.blurEvent=this.hideMenu.bind(this),this.escEvent=this.escMenu.bind(this),this.nestedMenuBlock=!1};N.prototype.initializeColumnHeader=function(e){var t,o=this;e.definition.headerContextMenu&&(e.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,e,e.definition.headerContextMenu)),this.tapHold(e,e.definition.headerContextMenu)),e.definition.headerMenu&&(t=document.createElement("span"),t.classList.add("tabulator-header-menu-button"),t.innerHTML="⋮",t.addEventListener("click",function(t){var i="function"==typeof e.definition.headerMenu?e.definition.headerMenu(e.getComponent(),t):e.definition.headerMenu;t.stopPropagation(),t.preventDefault(),o.loadMenu(t,e,i)}),e.titleElement.insertBefore(t,e.titleElement.firstChild))},N.prototype.LoadMenuEvent=function(e,t,o){t="function"==typeof t?t(e.getComponent(),o):t,this.loadMenu(o,e,t)},N.prototype.tapHold=function(e,t){var o=this,i=e.getElement(),n=null,s=!1;i.addEventListener("touchstart",function(i){clearTimeout(n),s=!1,n=setTimeout(function(){clearTimeout(n),n=null,s=!0,o.LoadMenuEvent(e,t,i)},1e3)},{passive:!0}),i.addEventListener("touchend",function(e){clearTimeout(n),n=null,s&&e.preventDefault()})},N.prototype.initializeCell=function(e){e.column.definition.contextMenu&&(e.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,e,e.column.definition.contextMenu)),this.tapHold(e,e.column.definition.contextMenu)),e.column.definition.clickMenu&&e.getElement().addEventListener("click",this.LoadMenuEvent.bind(this,e,e.column.definition.clickMenu))},N.prototype.initializeRow=function(e){this.table.options.rowContextMenu&&(e.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,e,this.table.options.rowContextMenu)),this.tapHold(e,this.table.options.rowContextMenu)),this.table.options.rowClickMenu&&e.getElement().addEventListener("click",this.LoadMenuEvent.bind(this,e,this.table.options.rowClickMenu))},N.prototype.initializeGroup=function(e){this.table.options.groupContextMenu&&(e.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,e,this.table.options.groupContextMenu)),this.tapHold(e,this.table.options.groupContextMenu)),this.table.options.groupClickMenu&&e.getElement().addEventListener("click",this.LoadMenuEvent.bind(this,e,this.table.options.groupClickMenu))},N.prototype.loadMenu=function(e,t,o){var i=this,n=Math.max(document.body.offsetHeight,window.innerHeight),s=!(e instanceof MouseEvent);if(s||e.preventDefault(),o&&o.length){if(this.nestedMenuBlock){if(this.isOpen())return}else this.nestedMenuBlock=setTimeout(function(){i.nestedMenuBlock=!1},100);this.hideMenu(),this.menuEl=document.createElement("div"),this.menuEl.classList.add("tabulator-menu"),o.forEach(function(e){var o=document.createElement("div"),n=e.label,s=e.disabled;e.separator?o.classList.add("tabulator-menu-separator"):(o.classList.add("tabulator-menu-item"),"function"==typeof n&&(n=n(t.getComponent())),n instanceof Node?o.appendChild(n):o.innerHTML=n,"function"==typeof s&&(s=s(t.getComponent())),s?(o.classList.add("tabulator-menu-item-disabled"),o.addEventListener("click",function(e){e.stopPropagation()})):o.addEventListener("click",function(o){i.hideMenu(),e.action(o,t.getComponent())})),i.menuEl.appendChild(o)}),this.menuEl.style.top=(s?e.touches[0].pageY:e.pageY)+"px",this.menuEl.style.left=(s?e.touches[0].pageX:e.pageX)+"px",setTimeout(function(){i.table.rowManager.element.addEventListener("scroll",i.blurEvent),document.body.addEventListener("click",i.blurEvent),document.body.addEventListener("contextmenu",i.blurEvent),document.body.addEventListener("keydown",i.escEvent)},100),document.body.appendChild(this.menuEl),e.pageX+this.menuEl.offsetWidth>=document.body.offsetWidth&&(this.menuEl.style.left="",this.menuEl.style.right=document.body.offsetWidth-e.pageX+"px"),e.pageY+this.menuEl.offsetHeight>=n&&(this.menuEl.style.top="",this.menuEl.style.bottom=n-e.pageY+"px")}},N.prototype.isOpen=function(){return!!this.menuEl.parentNode},N.prototype.escMenu=function(e){27==e.keyCode&&this.hideMenu()},N.prototype.hideMenu=function(){this.menuEl.parentNode&&this.menuEl.parentNode.removeChild(this.menuEl),this.escEvent&&document.body.removeEventListener("keydown",this.escEvent),this.blurEvent&&(document.body.removeEventListener("click",this.blurEvent),document.body.removeEventListener("contextmenu",this.blurEvent),this.table.rowManager.element.removeEventListener("scroll",this.blurEvent))},N.prototype.menus={},h.prototype.registerModule("menu",N);var B=function(e){this.table=e,this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=250,this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.startX=0,this.autoScrollMargin=40,this.autoScrollStep=5,this.autoScrollTimeout=!1,this.touchMove=!1,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this)};B.prototype.createPlaceholderElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-col"),e.classList.add("tabulator-col-placeholder"),e},B.prototype.initializeColumn=function(e){var t,o=this,i={};e.modules.frozen||(t=e.getElement(),i.mousemove=function(i){e.parent===o.moving.parent&&((o.touchMove?i.touches[0].pageX:i.pageX)-h.prototype.helpers.elOffset(t).left+o.table.columnManager.element.scrollLeft>e.getWidth()/2?o.toCol===e&&o.toColAfter||(t.parentNode.insertBefore(o.placeholderElement,t.nextSibling),o.moveColumn(e,!0)):(o.toCol!==e||o.toColAfter)&&(t.parentNode.insertBefore(o.placeholderElement,t),o.moveColumn(e,!1)))}.bind(o),t.addEventListener("mousedown",function(t){o.touchMove=!1,1===t.which&&(o.checkTimeout=setTimeout(function(){o.startMove(t,e)},o.checkPeriod))}),t.addEventListener("mouseup",function(e){1===e.which&&o.checkTimeout&&clearTimeout(o.checkTimeout)}),o.bindTouchEvents(e)),e.modules.moveColumn=i},B.prototype.bindTouchEvents=function(e){var t,o,i,n,s,a,r,l=this,c=e.getElement(),u=!1;c.addEventListener("touchstart",function(c){l.checkTimeout=setTimeout(function(){l.touchMove=!0,t=e,o=e.nextColumn(),n=o?o.getWidth()/2:0,i=e.prevColumn(),s=i?i.getWidth()/2:0,a=0,r=0,u=!1,l.startMove(c,e)},l.checkPeriod)},{passive:!0}),c.addEventListener("touchmove",function(c){var d,h;l.moving&&(l.moveHover(c),u||(u=c.touches[0].pageX),d=c.touches[0].pageX-u,d>0?o&&d-a>n&&(h=o)!==e&&(u=c.touches[0].pageX,h.getElement().parentNode.insertBefore(l.placeholderElement,h.getElement().nextSibling),l.moveColumn(h,!0)):i&&-d-r>s&&(h=i)!==e&&(u=c.touches[0].pageX,h.getElement().parentNode.insertBefore(l.placeholderElement,h.getElement()),l.moveColumn(h,!1)),h&&(t=h,o=h.nextColumn(),a=n,n=o?o.getWidth()/2:0,i=h.prevColumn(),r=s,s=i?i.getWidth()/2:0))},{passive:!0}),c.addEventListener("touchend",function(e){l.checkTimeout&&clearTimeout(l.checkTimeout),l.moving&&l.endMove(e)})},B.prototype.startMove=function(e,t){var o=t.getElement();this.moving=t,this.startX=(this.touchMove?e.touches[0].pageX:e.pageX)-h.prototype.helpers.elOffset(o).left,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",o.parentNode.insertBefore(this.placeholderElement,o),o.parentNode.removeChild(o),this.hoverElement=o.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.table.columnManager.getElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.bottom="0",this.touchMove||(this._bindMouseMove(),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove)),this.moveHover(e)},B.prototype._bindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach(function(e){e.modules.moveColumn.mousemove&&e.getElement().addEventListener("mousemove",e.modules.moveColumn.mousemove)})},B.prototype._unbindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach(function(e){e.modules.moveColumn.mousemove&&e.getElement().removeEventListener("mousemove",e.modules.moveColumn.mousemove)})},B.prototype.moveColumn=function(e,t){var o=this.moving.getCells();this.toCol=e,this.toColAfter=t,t?e.getCells().forEach(function(e,t){var i=e.getElement();i.parentNode.insertBefore(o[t].getElement(),i.nextSibling)}):e.getCells().forEach(function(e,t){var i=e.getElement();i.parentNode.insertBefore(o[t].getElement(),i)})},B.prototype.endMove=function(e){(1===e.which||this.touchMove)&&(this._unbindMouseMove(),this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement), -this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toCol&&this.table.columnManager.moveColumnActual(this.moving,this.toCol,this.toColAfter),this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.touchMove||(document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove)))},B.prototype.moveHover=function(e){var t,o=this,i=o.table.columnManager.getElement(),n=i.scrollLeft,s=(o.touchMove?e.touches[0].pageX:e.pageX)-h.prototype.helpers.elOffset(i).left+n;o.hoverElement.style.left=s-o.startX+"px",s-ne.getHeight()/2){if(t.toRow!==e||!t.toRowAfter){var i=e.getElement();i.parentNode.insertBefore(t.placeholderElement,i.nextSibling),t.moveRow(e,!0)}}else if(t.toRow!==e||t.toRowAfter){var i=e.getElement();i.previousSibling&&(i.parentNode.insertBefore(t.placeholderElement,i),t.moveRow(e,!1))}}.bind(t),e.modules.moveRow=o},O.prototype.initializeRow=function(e){var t,o=this,i={};i.mouseup=function(t){o.tableRowDrop(t,e)}.bind(o),i.mousemove=function(t){if(t.pageY-h.prototype.helpers.elOffset(e.element).top+o.table.rowManager.element.scrollTop>e.getHeight()/2){if(o.toRow!==e||!o.toRowAfter){var i=e.getElement();i.parentNode.insertBefore(o.placeholderElement,i.nextSibling),o.moveRow(e,!0)}}else if(o.toRow!==e||o.toRowAfter){var i=e.getElement();i.parentNode.insertBefore(o.placeholderElement,i),o.moveRow(e,!1)}}.bind(o),this.hasHandle||(t=e.getElement(),t.addEventListener("mousedown",function(t){1===t.which&&(o.checkTimeout=setTimeout(function(){o.startMove(t,e)},o.checkPeriod))}),t.addEventListener("mouseup",function(e){1===e.which&&o.checkTimeout&&clearTimeout(o.checkTimeout)}),this.bindTouchEvents(e,e.getElement())),e.modules.moveRow=i},O.prototype.initializeCell=function(e){var t=this,o=e.getElement();o.addEventListener("mousedown",function(o){1===o.which&&(t.checkTimeout=setTimeout(function(){t.startMove(o,e.row)},t.checkPeriod))}),o.addEventListener("mouseup",function(e){1===e.which&&t.checkTimeout&&clearTimeout(t.checkTimeout)}),this.bindTouchEvents(e.row,e.getElement())},O.prototype.bindTouchEvents=function(e,t){var o,i,n,s,a,r,l,c=this,u=!1;t.addEventListener("touchstart",function(t){c.checkTimeout=setTimeout(function(){c.touchMove=!0,o=e,i=e.nextRow(),s=i?i.getHeight()/2:0,n=e.prevRow(),a=n?n.getHeight()/2:0,r=0,l=0,u=!1,c.startMove(t,e)},c.checkPeriod)},{passive:!0}),this.moving,this.toRow,this.toRowAfter,t.addEventListener("touchmove",function(t){var d,h;c.moving&&(t.preventDefault(),c.moveHover(t),u||(u=t.touches[0].pageY),d=t.touches[0].pageY-u,d>0?i&&d-r>s&&(h=i)!==e&&(u=t.touches[0].pageY,h.getElement().parentNode.insertBefore(c.placeholderElement,h.getElement().nextSibling),c.moveRow(h,!0)):n&&-d-l>a&&(h=n)!==e&&(u=t.touches[0].pageY,h.getElement().parentNode.insertBefore(c.placeholderElement,h.getElement()),c.moveRow(h,!1)),h&&(o=h,i=h.nextRow(),r=s,s=i?i.getHeight()/2:0,n=h.prevRow(),l=a,a=n?n.getHeight()/2:0))}),t.addEventListener("touchend",function(e){c.checkTimeout&&clearTimeout(c.checkTimeout),c.moving&&(c.endMove(e),c.touchMove=!1)})},O.prototype._bindMouseMove=function(){this.table.rowManager.getDisplayRows().forEach(function(e){"row"!==e.type&&"group"!==e.type||!e.modules.moveRow.mousemove||e.getElement().addEventListener("mousemove",e.modules.moveRow.mousemove)})},O.prototype._unbindMouseMove=function(){this.table.rowManager.getDisplayRows().forEach(function(e){"row"!==e.type&&"group"!==e.type||!e.modules.moveRow.mousemove||e.getElement().removeEventListener("mousemove",e.modules.moveRow.mousemove)})},O.prototype.startMove=function(e,t){var o=t.getElement();this.setStartPosition(e,t),this.moving=t,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",this.connection?(this.table.element.classList.add("tabulator-movingrow-sending"),this.connectToTables(t)):(o.parentNode.insertBefore(this.placeholderElement,o),o.parentNode.removeChild(o)),this.hoverElement=o.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.connection?(document.body.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this.hoverElement.style.width=this.table.element.clientWidth+"px",this.hoverElement.style.whiteSpace="nowrap",this.hoverElement.style.overflow="hidden",this.hoverElement.style.pointerEvents="none"):(this.table.rowManager.getTableElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this._bindMouseMove()),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove),this.moveHover(e)},O.prototype.setStartPosition=function(e,t){var o,i,n=this.touchMove?e.touches[0].pageX:e.pageX,s=this.touchMove?e.touches[0].pageY:e.pageY;o=t.getElement(),this.connection?(i=o.getBoundingClientRect(),this.startX=i.left-n+window.pageXOffset,this.startY=i.top-s+window.pageYOffset):this.startY=s-o.getBoundingClientRect().top},O.prototype.endMove=function(e){e&&1!==e.which&&!this.touchMove||(this._unbindMouseMove(),this.connection||(this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement)),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toRow&&this.table.rowManager.moveRow(this.moving,this.toRow,this.toRowAfter),this.moving=!1,this.toRow=!1,this.toRowAfter=!1,document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove),this.connection&&(this.table.element.classList.remove("tabulator-movingrow-sending"),this.disconnectFromTables()))},O.prototype.moveRow=function(e,t){this.toRow=e,this.toRowAfter=t},O.prototype.moveHover=function(e){this.connection?this.moveHoverConnections.call(this,e):this.moveHoverTable.call(this,e)},O.prototype.moveHoverTable=function(e){var t=this.table.rowManager.getElement(),o=t.scrollTop,i=(this.touchMove?e.touches[0].pageY:e.pageY)-t.getBoundingClientRect().top+o;this.hoverElement.style.top=i-this.startY+"px"},O.prototype.moveHoverConnections=function(e){this.hoverElement.style.left=this.startX+(this.touchMove?e.touches[0].pageX:e.pageX)+"px",this.hoverElement.style.top=this.startY+(this.touchMove?e.touches[0].pageY:e.pageY)+"px"},O.prototype.elementRowDrop=function(e,t,o){this.table.options.movableRowsElementDrop&&this.table.options.movableRowsElementDrop(e,t,!!o&&o.getComponent())},O.prototype.connectToTables=function(e){var t,o=this;this.connectionSelectorsTables&&(t=this.table.modules.comms.getConnections(this.connectionSelectorsTables),this.table.options.movableRowsSendingStart.call(this.table,t),this.table.modules.comms.send(this.connectionSelectorsTables,"moveRow","connect",{row:e})),this.connectionSelectorsElements&&(this.connectionElements=[],Array.isArray(this.connectionSelectorsElements)||(this.connectionSelectorsElements=[this.connectionSelectorsElements]),this.connectionSelectorsElements.forEach(function(e){"string"==typeof e?o.connectionElements=o.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(e))):o.connectionElements.push(e)}),this.connectionElements.forEach(function(e){var t=function(t){o.elementRowDrop(t,e,o.moving)};e.addEventListener("mouseup",t),e.tabulatorElementDropEvent=t,e.classList.add("tabulator-movingrow-receiving")}))},O.prototype.disconnectFromTables=function(){var e;this.connectionSelectorsTables&&(e=this.table.modules.comms.getConnections(this.connectionSelectorsTables),this.table.options.movableRowsSendingStop.call(this.table,e),this.table.modules.comms.send(this.connectionSelectorsTables,"moveRow","disconnect")),this.connectionElements.forEach(function(e){e.classList.remove("tabulator-movingrow-receiving"),e.removeEventListener("mouseup",e.tabulatorElementDropEvent),delete e.tabulatorElementDropEvent})},O.prototype.connect=function(e,t){var o=this;return this.connectedTable?(console.warn("Move Row Error - Table cannot accept connection, already connected to table:",this.connectedTable),!1):(this.connectedTable=e,this.connectedRow=t,this.table.element.classList.add("tabulator-movingrow-receiving"),o.table.rowManager.getDisplayRows().forEach(function(e){"row"===e.type&&e.modules.moveRow&&e.modules.moveRow.mouseup&&e.getElement().addEventListener("mouseup",e.modules.moveRow.mouseup)}),o.tableRowDropEvent=o.tableRowDrop.bind(o),o.table.element.addEventListener("mouseup",o.tableRowDropEvent),this.table.options.movableRowsReceivingStart.call(this.table,t,e),!0)},O.prototype.disconnect=function(e){var t=this;e===this.connectedTable?(this.connectedTable=!1,this.connectedRow=!1,this.table.element.classList.remove("tabulator-movingrow-receiving"),t.table.rowManager.getDisplayRows().forEach(function(e){"row"===e.type&&e.modules.moveRow&&e.modules.moveRow.mouseup&&e.getElement().removeEventListener("mouseup",e.modules.moveRow.mouseup)}),t.table.element.removeEventListener("mouseup",t.tableRowDropEvent),this.table.options.movableRowsReceivingStop.call(this.table,e)):console.warn("Move Row Error - trying to disconnect from non connected table")},O.prototype.dropComplete=function(e,t,o){var i=!1;if(o){switch(_typeof(this.table.options.movableRowsSender)){case"string":i=this.senders[this.table.options.movableRowsSender];break;case"function":i=this.table.options.movableRowsSender}i?i.call(this,this.moving.getComponent(),t?t.getComponent():void 0,e):this.table.options.movableRowsSender&&console.warn("Mover Row Error - no matching sender found:",this.table.options.movableRowsSender),this.table.options.movableRowsSent.call(this.table,this.moving.getComponent(),t?t.getComponent():void 0,e)}else this.table.options.movableRowsSentFailed.call(this.table,this.moving.getComponent(),t?t.getComponent():void 0,e);this.endMove()},O.prototype.tableRowDrop=function(e,t){var o=!1,i=!1;switch(console.trace("drop"),e.stopImmediatePropagation(),_typeof(this.table.options.movableRowsReceiver)){case"string":o=this.receivers[this.table.options.movableRowsReceiver];break;case"function":o=this.table.options.movableRowsReceiver}o?i=o.call(this,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):console.warn("Mover Row Error - no matching receiver found:",this.table.options.movableRowsReceiver),i?this.table.options.movableRowsReceived.call(this.table,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):this.table.options.movableRowsReceivedFailed.call(this.table,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable),this.table.modules.comms.send(this.connectedTable,"moveRow","dropcomplete",{row:t,success:i})},O.prototype.receivers={insert:function(e,t,o){return this.table.addRow(e.getData(),void 0,t),!0},add:function(e,t,o){return this.table.addRow(e.getData()),!0},update:function(e,t,o){return!!t&&(t.update(e.getData()),!0)},replace:function(e,t,o){return!!t&&(this.table.addRow(e.getData(),void 0,t),t.delete(),!0)}},O.prototype.senders={delete:function(e,t,o){e.delete()}},O.prototype.commsReceived=function(e,t,o){switch(t){case"connect":return this.connect(e,o.row);case"disconnect":return this.disconnect(e);case"dropcomplete":return this.dropComplete(e,o.row,o.success)}},h.prototype.registerModule("moveRow",O);var I=function(e){this.table=e,this.allowedTypes=["","data","edit","clipboard"],this.enabled=!0};I.prototype.initializeColumn=function(e){var t=this,o=!1,i={};this.allowedTypes.forEach(function(n){var s,a="mutator"+(n.charAt(0).toUpperCase()+n.slice(1));e.definition[a]&&(s=t.lookupMutator(e.definition[a]))&&(o=!0,i[a]={mutator:s,params:e.definition[a+"Params"]||{}})}),o&&(e.modules.mutate=i)},I.prototype.lookupMutator=function(e){var t=!1;switch(void 0===e?"undefined":_typeof(e)){case"string":this.mutators[e]?t=this.mutators[e]:console.warn("Mutator Error - No such mutator found, ignoring: ",e);break;case"function":t=e}return t},I.prototype.transformRow=function(e,t,o){var i,n=this,s="mutator"+(t.charAt(0).toUpperCase()+t.slice(1));return this.enabled&&n.table.columnManager.traverse(function(n){var a,r,l;n.modules.mutate&&(a=n.modules.mutate[s]||n.modules.mutate.mutator||!1)&&(i=n.getFieldValue(void 0!==o?o:e),"data"!=t&&void 0===i||(l=n.getComponent(),r="function"==typeof a.params?a.params(i,e,t,l):a.params,n.setFieldValue(e,a.mutator(i,e,t,r,l))))}),e},I.prototype.transformCell=function(e,t){var o=e.column.modules.mutate.mutatorEdit||e.column.modules.mutate.mutator||!1,i={};return o?(i=Object.assign(i,e.row.getData()),e.column.setFieldValue(i,t),o.mutator(t,i,"edit",o.params,e.getComponent())):t},I.prototype.enable=function(){this.enabled=!0},I.prototype.disable=function(){this.enabled=!1},I.prototype.mutators={},h.prototype.registerModule("mutator",I);var V=function(e){this.table=e,this.mode="local",this.progressiveLoad=!1,this.size=0,this.page=1,this.count=5,this.max=1,this.displayIndex=0,this.initialLoad=!0,this.pageSizes=[],this.dataReceivedNames={},this.dataSentNames={},this.createElements()};V.prototype.createElements=function(){var e;this.element=document.createElement("span"),this.element.classList.add("tabulator-paginator"),this.pagesElement=document.createElement("span"),this.pagesElement.classList.add("tabulator-pages"),e=document.createElement("button"),e.classList.add("tabulator-page"),e.setAttribute("type","button"),e.setAttribute("role","button"),e.setAttribute("aria-label",""),e.setAttribute("title",""),this.firstBut=e.cloneNode(!0),this.firstBut.setAttribute("data-page","first"),this.prevBut=e.cloneNode(!0),this.prevBut.setAttribute("data-page","prev"),this.nextBut=e.cloneNode(!0),this.nextBut.setAttribute("data-page","next"),this.lastBut=e.cloneNode(!0),this.lastBut.setAttribute("data-page","last"),this.table.options.paginationSizeSelector&&(this.pageSizeSelect=document.createElement("select"),this.pageSizeSelect.classList.add("tabulator-page-size"))},V.prototype.generatePageSizeSelectList=function(){var e=this,t=[];if(this.pageSizeSelect){if(Array.isArray(this.table.options.paginationSizeSelector))t=this.table.options.paginationSizeSelector,this.pageSizes=t,-1==this.pageSizes.indexOf(this.size)&&t.unshift(this.size);else if(-1==this.pageSizes.indexOf(this.size)){t=[];for(var o=1;o<5;o++)t.push(this.size*o);this.pageSizes=t}else t=this.pageSizes;for(;this.pageSizeSelect.firstChild;)this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild);t.forEach(function(t){var o=document.createElement("option");o.value=t,!0===t?e.table.modules.localize.bind("pagination|all",function(e){o.innerHTML=e}):o.innerHTML=t,e.pageSizeSelect.appendChild(o)}),this.pageSizeSelect.value=this.size}},V.prototype.initialize=function(e){var t,o,i,n=this;this.dataSentNames=Object.assign({},this.paginationDataSentNames),this.dataSentNames=Object.assign(this.dataSentNames,this.table.options.paginationDataSent),this.dataReceivedNames=Object.assign({},this.paginationDataReceivedNames),this.dataReceivedNames=Object.assign(this.dataReceivedNames,this.table.options.paginationDataReceived),n.table.modules.localize.bind("pagination|first",function(e){n.firstBut.innerHTML=e}),n.table.modules.localize.bind("pagination|first_title",function(e){n.firstBut.setAttribute("aria-label",e),n.firstBut.setAttribute("title",e)}),n.table.modules.localize.bind("pagination|prev",function(e){n.prevBut.innerHTML=e}),n.table.modules.localize.bind("pagination|prev_title",function(e){n.prevBut.setAttribute("aria-label",e),n.prevBut.setAttribute("title",e)}),n.table.modules.localize.bind("pagination|next",function(e){n.nextBut.innerHTML=e}),n.table.modules.localize.bind("pagination|next_title",function(e){n.nextBut.setAttribute("aria-label",e),n.nextBut.setAttribute("title",e)}),n.table.modules.localize.bind("pagination|last",function(e){n.lastBut.innerHTML=e}),n.table.modules.localize.bind("pagination|last_title",function(e){n.lastBut.setAttribute("aria-label",e),n.lastBut.setAttribute("title",e)}),n.firstBut.addEventListener("click",function(){n.setPage(1).then(function(){}).catch(function(){})}),n.prevBut.addEventListener("click",function(){n.previousPage().then(function(){}).catch(function(){})}),n.nextBut.addEventListener("click",function(){n.nextPage().then(function(){}).catch(function(){})}),n.lastBut.addEventListener("click",function(){n.setPage(n.max).then(function(){}).catch(function(){})}),n.table.options.paginationElement&&(n.element=n.table.options.paginationElement),this.pageSizeSelect&&(t=document.createElement("label"),n.table.modules.localize.bind("pagination|page_size",function(e){n.pageSizeSelect.setAttribute("aria-label",e),n.pageSizeSelect.setAttribute("title",e),t.innerHTML=e}),n.element.appendChild(t),n.element.appendChild(n.pageSizeSelect),n.pageSizeSelect.addEventListener("change",function(e){n.setPageSize("true"==n.pageSizeSelect.value||n.pageSizeSelect.value),n.setPage(1).then(function(){}).catch(function(){})})),n.element.appendChild(n.firstBut),n.element.appendChild(n.prevBut),n.element.appendChild(n.pagesElement),n.element.appendChild(n.nextBut),n.element.appendChild(n.lastBut),n.table.options.paginationElement||e||n.table.footerManager.append(n.element,n),n.mode=n.table.options.pagination,n.table.options.paginationSize?n.size=n.table.options.paginationSize:(o=document.createElement("div"),o.classList.add("tabulator-row"),o.style.visibility=e,i=document.createElement("div"),i.classList.add("tabulator-cell"),i.innerHTML="Page Row Test",o.appendChild(i),n.table.rowManager.getTableElement().appendChild(o),n.size=Math.floor(n.table.rowManager.getElement().clientHeight/o.offsetHeight),n.table.rowManager.getTableElement().removeChild(o)),n.count=n.table.options.paginationButtonCount,n.generatePageSizeSelectList()},V.prototype.initializeProgressive=function(e){this.initialize(!0),this.mode="progressive_"+e,this.progressiveLoad=!0},V.prototype.setDisplayIndex=function(e){this.displayIndex=e},V.prototype.getDisplayIndex=function(){return this.displayIndex},V.prototype.setMaxRows=function(e){this.max=e?!0===this.size?1:Math.ceil(e/this.size):1,this.page>this.max&&(this.page=this.max)},V.prototype.reset=function(e,t){return("local"==this.mode||e)&&(this.page=1),t&&(this.initialLoad=!0),!0},V.prototype.setMaxPage=function(e){e=parseInt(e),this.max=e||1,this.page>this.max&&(this.page=this.max,this.trigger())},V.prototype.setPage=function(e){var t=this,o=this;switch(e){case"first":return this.setPage(1);case"prev":return this.previousPage();case"next":return this.nextPage();case"last":return this.setPage(this.max)}return new Promise(function(i,n){e=parseInt(e),e>0&&e<=t.max?(t.page=e,t.trigger().then(function(){i()}).catch(function(){n()}),o.table.options.persistence&&o.table.modExists("persistence",!0)&&o.table.modules.persistence.config.page&&o.table.modules.persistence.save("page")):(console.warn("Pagination Error - Requested page is out of range of 1 - "+t.max+":",e),n())})},V.prototype.setPageToRow=function(e){var t=this;return new Promise(function(o,i){var n=t.table.rowManager.getDisplayRows(t.displayIndex-1),s=n.indexOf(e);if(s>-1){var a=!0===t.size?1:Math.ceil((s+1)/t.size);t.setPage(a).then(function(){o()}).catch(function(){i()})}else console.warn("Pagination Error - Requested row is not visible"),i()})},V.prototype.setPageSize=function(e){!0!==e&&(e=parseInt(e)),e>0&&(this.size=e),this.pageSizeSelect&&this.generatePageSizeSelectList(),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.page&&this.table.modules.persistence.save("page")},V.prototype._setPageButtons=function(){for(var e=this,t=Math.floor((this.count-1)/2),o=Math.ceil((this.count-1)/2),i=this.max-this.page+t+10&&s<=e.max&&e.pagesElement.appendChild(e._generatePageButton(s));this.footerRedraw()},V.prototype._generatePageButton=function(e){var t=this,o=document.createElement("button");return o.classList.add("tabulator-page"),e==t.page&&o.classList.add("active"),o.setAttribute("type","button"),o.setAttribute("role","button"),t.table.modules.localize.bind("pagination|page_title",function(t){o.setAttribute("aria-label",t+" "+e),o.setAttribute("title",t+" "+e)}),o.setAttribute("data-page",e),o.textContent=e,o.addEventListener("click",function(o){t.setPage(e).then(function(){}).catch(function(){})}),o},V.prototype.previousPage=function(){var e=this;return new Promise(function(t,o){e.page>1?(e.page--,e.trigger().then(function(){t()}).catch(function(){o()}),e.table.options.persistence&&e.table.modExists("persistence",!0)&&e.table.modules.persistence.config.page&&e.table.modules.persistence.save("page")):(console.warn("Pagination Error - Previous page would be less than page 1:",0),o())})},V.prototype.nextPage=function(){var e=this;return new Promise(function(t,o){e.pagen?i.splice(n,0,e):i.push(e))}),i},j.prototype._findColumn=function(e,t){var o=t.columns?"group":t.field?"field":"object";return e.find(function(e){switch(o){case"group":return e.title===t.title&&e.columns.length===t.columns.length;case"field":return e.field===t.field;case"object":return e===t}})},j.prototype.save=function(e){var t={};switch(e){case"columns":t=this.parseColumns(this.table.columnManager.getColumns());break;case"filter":t=this.table.modules.filter.getFilters();break;case"sort":t=this.validateSorters(this.table.modules.sort.getSort());break;case"group":t=this.getGroupConfig();break;case"page":t=this.getPageConfig()}this.writeFunc&&this.writeFunc(this.id,e,t)},j.prototype.validateSorters=function(e){return e.forEach(function(e){e.column=e.field,delete e.field}),e},j.prototype.getGroupConfig=function(){var e={} -;return this.config.group&&((!0===this.config.group||this.config.group.groupBy)&&(e.groupBy=this.table.options.groupBy),(!0===this.config.group||this.config.group.groupStartOpen)&&(e.groupStartOpen=this.table.options.groupStartOpen),(!0===this.config.group||this.config.group.groupHeader)&&(e.groupHeader=this.table.options.groupHeader)),e},j.prototype.getPageConfig=function(){var e={};return this.config.page&&((!0===this.config.page||this.config.page.size)&&(e.paginationSize=this.table.modules.page.getPageSize()),(!0===this.config.page||this.config.page.page)&&(e.paginationInitialPage=this.table.modules.page.getPage())),e},j.prototype.parseColumns=function(e){var t=this,o=[],i=["headerContextMenu","headerMenu","contextMenu","clickMenu"];return e.forEach(function(e){var n,s={},a=e.getDefinition();e.isGroup?(s.title=a.title,s.columns=t.parseColumns(e.getColumns())):(s.field=e.getField(),!0===t.config.columns||void 0==t.config.columns?(n=Object.keys(a),n.push("width")):n=t.config.columns,n.forEach(function(t){switch(t){case"width":s.width=e.getWidth();break;case"visible":s.visible=e.visible;break;default:"function"!=typeof a[t]&&-1===i.indexOf(t)&&(s[t]=a[t])}})),o.push(s)}),o},j.prototype.readers={local:function(e,t){var o=localStorage.getItem(e+"-"+t);return!!o&&JSON.parse(o)},cookie:function(e,t){var o,i,n=document.cookie,s=e+"-"+t,a=n.indexOf(s+"=");return a>-1&&(n=n.substr(a),o=n.indexOf(";"),o>-1&&(n=n.substr(0,o)),i=n.replace(s+"=","")),!!i&&JSON.parse(i)}},j.prototype.writers={local:function(e,t,o){localStorage.setItem(e+"-"+t,JSON.stringify(o))},cookie:function(e,t,o){var i=new Date;i.setDate(i.getDate()+1e4),document.cookie=e+"-"+t+"="+JSON.stringify(o)+"; expires="+i.toUTCString()}},h.prototype.registerModule("persistence",j);var W=function(e){this.table=e,this.element=!1,this.manualBlock=!1};W.prototype.initialize=function(){window.addEventListener("beforeprint",this.replaceTable.bind(this)),window.addEventListener("afterprint",this.cleanup.bind(this))},W.prototype.replaceTable=function(){this.manualBlock||(this.element=document.createElement("div"),this.element.classList.add("tabulator-print-table"),this.element.appendChild(this.table.modules.export.genereateTable(this.table.options.printConfig,this.table.options.printStyled,this.table.options.printRowRange,"print")),this.table.element.style.display="none",this.table.element.parentNode.insertBefore(this.element,this.table.element))},W.prototype.cleanup=function(){document.body.classList.remove("tabulator-print-fullscreen-hide"),this.element&&this.element.parentNode&&(this.element.parentNode.removeChild(this.element),this.table.element.style.display="")},W.prototype.printFullscreen=function(e,t,o){var i,n,s=window.scrollX,a=window.scrollY,r=document.createElement("div"),l=document.createElement("div"),c=this.table.modules.export.genereateTable(void 0!==o?o:this.table.options.printConfig,void 0!==t?t:this.table.options.printStyled,e,"print");this.manualBlock=!0,this.element=document.createElement("div"),this.element.classList.add("tabulator-print-fullscreen"),this.table.options.printHeader&&(r.classList.add("tabulator-print-header"),i="function"==typeof this.table.options.printHeader?this.table.options.printHeader.call(this.table):this.table.options.printHeader,"string"==typeof i?r.innerHTML=i:r.appendChild(i),this.element.appendChild(r)),this.element.appendChild(c),this.table.options.printFooter&&(l.classList.add("tabulator-print-footer"),n="function"==typeof this.table.options.printFooter?this.table.options.printFooter.call(this.table):this.table.options.printFooter,"string"==typeof n?l.innerHTML=n:l.appendChild(n),this.element.appendChild(l)),document.body.classList.add("tabulator-print-fullscreen-hide"),document.body.appendChild(this.element),this.table.options.printFormatter&&this.table.options.printFormatter(this.element,c),window.print(),this.cleanup(),window.scrollTo(s,a),this.manualBlock=!1},h.prototype.registerModule("print",W);var G=function(e){this.table=e,this.data=!1,this.blocked=!1,this.origFuncs={},this.currentVersion=0};G.prototype.watchData=function(e){var t,o=this;this.currentVersion++,t=this.currentVersion,o.unwatchData(),o.data=e,o.origFuncs.push=e.push,Object.defineProperty(o.data,"push",{enumerable:!1,configurable:!0,value:function(){var i=Array.from(arguments);return o.blocked||t!==o.currentVersion||i.forEach(function(e){o.table.rowManager.addRowActual(e,!1)}),o.origFuncs.push.apply(e,arguments)}}),o.origFuncs.unshift=e.unshift,Object.defineProperty(o.data,"unshift",{enumerable:!1,configurable:!0,value:function(){var i=Array.from(arguments);return o.blocked||t!==o.currentVersion||i.forEach(function(e){o.table.rowManager.addRowActual(e,!0)}),o.origFuncs.unshift.apply(e,arguments)}}),o.origFuncs.shift=e.shift,Object.defineProperty(o.data,"shift",{enumerable:!1,configurable:!0,value:function(){var i;return o.blocked||t!==o.currentVersion||o.data.length&&(i=o.table.rowManager.getRowFromDataObject(o.data[0]))&&i.deleteActual(),o.origFuncs.shift.call(e)}}),o.origFuncs.pop=e.pop,Object.defineProperty(o.data,"pop",{enumerable:!1,configurable:!0,value:function(){var i;return o.blocked||t!==o.currentVersion||o.data.length&&(i=o.table.rowManager.getRowFromDataObject(o.data[o.data.length-1]))&&i.deleteActual(),o.origFuncs.pop.call(e)}}),o.origFuncs.splice=e.splice,Object.defineProperty(o.data,"splice",{enumerable:!1,configurable:!0,value:function(){var i,n=Array.from(arguments),s=n[0]<0?e.length+n[0]:n[0],a=n[1],r=!!n[2]&&n.slice(2);if(!o.blocked&&t===o.currentVersion){if(r&&(i=!!e[s]&&o.table.rowManager.getRowFromDataObject(e[s]),i?r.forEach(function(e){o.table.rowManager.addRowActual(e,!0,i,!0)}):(r=r.slice().reverse(),r.forEach(function(e){o.table.rowManager.addRowActual(e,!0,!1,!0)}))),0!==a){var l=e.slice(s,void 0===n[1]?n[1]:s+a);l.forEach(function(e,t){var i=o.table.rowManager.getRowFromDataObject(e);i&&i.deleteActual(t!==l.length-1)})}(r||0!==a)&&o.table.rowManager.reRenderInPosition()}return o.origFuncs.splice.apply(e,arguments)}})},G.prototype.unwatchData=function(){if(!1!==this.data)for(var e in this.origFuncs)Object.defineProperty(this.data,e,{enumerable:!0,configurable:!0,writable:!0,value:this.origFuncs.key})},G.prototype.watchRow=function(e){var t=e.getData();this.blocked=!0;for(var o in t)this.watchKey(e,t,o);this.table.options.dataTree&&this.watchTreeChildren(e),this.blocked=!1},G.prototype.watchTreeChildren=function(e){function t(){o.table.modules.dataTree.initializeRow(e),o.table.modules.dataTree.layoutRow(e),o.table.rowManager.refreshActiveData("tree",!1,!0)}var o=this,i=e.getData()[this.table.options.dataTreeChildField],n={};i&&(n.push=i.push,Object.defineProperty(i,"push",{enumerable:!1,configurable:!0,value:function(){var e=n.push.apply(i,arguments);return t(),e}}),n.unshift=i.unshift,Object.defineProperty(i,"unshift",{enumerable:!1,configurable:!0,value:function(){var e=n.unshift.apply(i,arguments);return t(),e}}),n.shift=i.shift,Object.defineProperty(i,"shift",{enumerable:!1,configurable:!0,value:function(){var e=n.shift.call(i);return t(),e}}),n.pop=i.pop,Object.defineProperty(i,"pop",{enumerable:!1,configurable:!0,value:function(){var e=n.pop.call(i);return t(),e}}),n.splice=i.splice,Object.defineProperty(i,"splice",{enumerable:!1,configurable:!0,value:function(){var e=n.splice.apply(i,arguments);return t(),e}}))},G.prototype.watchKey=function(e,t,o){var i=this,n=Object.getOwnPropertyDescriptor(t,o),s=t[o],a=this.currentVersion;Object.defineProperty(t,o,{set:function(t){if(s=t,!i.blocked&&a===i.currentVersion){var r={};r[o]=t,e.updateData(r)}n.set&&n.set(t)},get:function(){return n.get&&n.get(),s}})},G.prototype.unwatchRow=function(e){var t=e.getData();for(var o in t)Object.defineProperty(t,o,{value:t[o]})},G.prototype.block=function(){this.blocked=!0},G.prototype.unblock=function(){this.blocked=!1},h.prototype.registerModule("reactiveData",G);var U=function(e){this.table=e,this.startColumn=!1,this.startX=!1,this.startWidth=!1,this.handle=null,this.prevHandle=null};U.prototype.initializeColumn=function(e,t,o){var i=this,n=!1,s=this.table.options.resizableColumns;if("header"===e&&(n="textarea"==t.definition.formatter||t.definition.variableHeight,t.modules.resize={variableHeight:n}),!0===s||s==e){var a=document.createElement("div");a.className="tabulator-col-resize-handle";var r=document.createElement("div");r.className="tabulator-col-resize-handle prev",a.addEventListener("click",function(e){e.stopPropagation()});var l=function(e){var o=t.getLastColumn();o&&i._checkResizability(o)&&(i.startColumn=t,i._mouseDown(e,o,a))};a.addEventListener("mousedown",l),a.addEventListener("touchstart",l,{passive:!0}),a.addEventListener("dblclick",function(e){var o=t.getLastColumn();o&&i._checkResizability(o)&&(e.stopPropagation(),o.reinitializeWidth(!0))}),r.addEventListener("click",function(e){e.stopPropagation()});var c=function(e){var o,n,s;(o=t.getFirstColumn())&&(n=i.table.columnManager.findColumnIndex(o),(s=n>0&&i.table.columnManager.getColumnByIndex(n-1))&&i._checkResizability(s)&&(i.startColumn=t,i._mouseDown(e,s,r)))};r.addEventListener("mousedown",c),r.addEventListener("touchstart",c,{passive:!0}),r.addEventListener("dblclick",function(e){var o,n,s;(o=t.getFirstColumn())&&(n=i.table.columnManager.findColumnIndex(o),(s=n>0&&i.table.columnManager.getColumnByIndex(n-1))&&i._checkResizability(s)&&(e.stopPropagation(),s.reinitializeWidth(!0)))}),o.appendChild(a),o.appendChild(r)}},U.prototype._checkResizability=function(e){return void 0!==e.definition.resizable?e.definition.resizable:this.table.options.resizableColumns},U.prototype._mouseDown=function(e,t,o){function i(e){s.table.rtl?t.setWidth(s.startWidth-((void 0===e.screenX?e.touches[0].screenX:e.screenX)-s.startX)):t.setWidth(s.startWidth+((void 0===e.screenX?e.touches[0].screenX:e.screenX)-s.startX)),s.table.options.virtualDomHoz&&s.table.vdomHoz.reinitialize(!0),!s.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights()}function n(e){s.startColumn.modules.edit&&(s.startColumn.modules.edit.blocked=!1),s.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights(),document.body.removeEventListener("mouseup",n),document.body.removeEventListener("mousemove",i),o.removeEventListener("touchmove",i),o.removeEventListener("touchend",n),s.table.element.classList.remove("tabulator-block-select"),s.table.options.persistence&&s.table.modExists("persistence",!0)&&s.table.modules.persistence.config.columns&&s.table.modules.persistence.save("columns"),s.table.options.columnResized.call(s.table,t.getComponent())}var s=this;s.table.element.classList.add("tabulator-block-select"),e.stopPropagation(),s.startColumn.modules.edit&&(s.startColumn.modules.edit.blocked=!0),s.startX=void 0===e.screenX?e.touches[0].screenX:e.screenX,s.startWidth=t.getWidth(),document.body.addEventListener("mousemove",i),document.body.addEventListener("mouseup",n),o.addEventListener("touchmove",i,{passive:!0}),o.addEventListener("touchend",n)},h.prototype.registerModule("resizeColumns",U);var X=function(e){this.table=e,this.startColumn=!1,this.startY=!1,this.startHeight=!1,this.handle=null,this.prevHandle=null};X.prototype.initializeRow=function(e){var t=this,o=e.getElement(),i=document.createElement("div");i.className="tabulator-row-resize-handle";var n=document.createElement("div");n.className="tabulator-row-resize-handle prev",i.addEventListener("click",function(e){e.stopPropagation()});var s=function(o){t.startRow=e,t._mouseDown(o,e,i)};i.addEventListener("mousedown",s),i.addEventListener("touchstart",s,{passive:!0}),n.addEventListener("click",function(e){e.stopPropagation()});var a=function(o){var i=t.table.rowManager.prevDisplayRow(e);i&&(t.startRow=i,t._mouseDown(o,i,n))};n.addEventListener("mousedown",a),n.addEventListener("touchstart",a,{passive:!0}),o.appendChild(i),o.appendChild(n)},X.prototype._mouseDown=function(e,t,o){function i(e){t.setHeight(s.startHeight+((void 0===e.screenY?e.touches[0].screenY:e.screenY)-s.startY))}function n(e){document.body.removeEventListener("mouseup",i),document.body.removeEventListener("mousemove",i),o.removeEventListener("touchmove",i),o.removeEventListener("touchend",n),s.table.element.classList.remove("tabulator-block-select"),s.table.options.rowResized.call(this.table,t.getComponent())}var s=this;s.table.element.classList.add("tabulator-block-select"),e.stopPropagation(),s.startY=void 0===e.screenY?e.touches[0].screenY:e.screenY,s.startHeight=t.getHeight(),document.body.addEventListener("mousemove",i),document.body.addEventListener("mouseup",n),o.addEventListener("touchmove",i,{passive:!0}),o.addEventListener("touchend",n)},h.prototype.registerModule("resizeRows",X);var Y=function(e){this.table=e,this.binding=!1,this.observer=!1,this.containerObserver=!1,this.tableHeight=0,this.tableWidth=0,this.containerHeight=0,this.containerWidth=0,this.autoResize=!1};Y.prototype.initialize=function(e){var t,o=this,i=this.table;this.tableHeight=i.element.clientHeight,this.tableWidth=i.element.clientWidth,i.element.parentNode&&(this.containerHeight=i.element.parentNode.clientHeight,this.containerWidth=i.element.parentNode.clientWidth),"undefined"!=typeof ResizeObserver&&"virtual"===i.rowManager.getRenderMode()?(this.autoResize=!0,this.observer=new ResizeObserver(function(e){if(!i.browserMobile||i.browserMobile&&!i.modules.edit.currentCell){var t=Math.floor(e[0].contentRect.height),n=Math.floor(e[0].contentRect.width);o.tableHeight==t&&o.tableWidth==n||(o.tableHeight=t,o.tableWidth=n,i.element.parentNode&&(o.containerHeight=i.element.parentNode.clientHeight,o.containerWidth=i.element.parentNode.clientWidth),i.options.virtualDomHoz&&i.vdomHoz.reinitialize(!0),i.redraw())}}),this.observer.observe(i.element),t=window.getComputedStyle(i.element),this.table.element.parentNode&&!this.table.rowManager.fixedHeight&&(t.getPropertyValue("max-height")||t.getPropertyValue("min-height"))&&(this.containerObserver=new ResizeObserver(function(e){if(!i.browserMobile||i.browserMobile&&!i.modules.edit.currentCell){var t=Math.floor(e[0].contentRect.height),n=Math.floor(e[0].contentRect.width);o.containerHeight==t&&o.containerWidth==n||(o.containerHeight=t,o.containerWidth=n,o.tableHeight=i.element.clientHeight,o.tableWidth=i.element.clientWidth),i.options.virtualDomHoz&&i.vdomHoz.reinitialize(!0),i.redraw()}}),this.containerObserver.observe(this.table.element.parentNode))):(this.binding=function(){(!i.browserMobile||i.browserMobile&&!i.modules.edit.currentCell)&&(i.options.virtualDomHoz&&i.vdomHoz.reinitialize(!0),i.redraw())},window.addEventListener("resize",this.binding))},Y.prototype.clearBindings=function(e){this.binding&&window.removeEventListener("resize",this.binding),this.observer&&this.observer.unobserve(this.table.element),this.containerObserver&&this.containerObserver.unobserve(this.table.element.parentNode)},h.prototype.registerModule("resizeTable",Y);var q=function(e){this.table=e,this.columns=[],this.hiddenColumns=[],this.mode="",this.index=0,this.collapseFormatter=[],this.collapseStartOpen=!0,this.collapseHandleColumn=!1};q.prototype.initialize=function(){var e=this,t=[];this.mode=this.table.options.responsiveLayout,this.collapseFormatter=this.table.options.responsiveLayoutCollapseFormatter||this.formatCollapsedData,this.collapseStartOpen=this.table.options.responsiveLayoutCollapseStartOpen,this.hiddenColumns=[],this.table.columnManager.columnsByIndex.forEach(function(o,i){o.modules.responsive&&o.modules.responsive.order&&o.modules.responsive.visible&&(o.modules.responsive.index=i,t.push(o),o.visible||"collapse"!==e.mode||e.hiddenColumns.push(o))}),t=t.reverse(),t=t.sort(function(e,t){return t.modules.responsive.order-e.modules.responsive.order||t.modules.responsive.index-e.modules.responsive.index}),this.columns=t,"collapse"===this.mode&&this.generateCollapsedContent();for(var o=this.table.columnManager.columnsByIndex,i=Array.isArray(o),n=0,o=i?o:o[Symbol.iterator]();;){var s;if(i){if(n>=o.length)break;s=o[n++]}else{if(n=o.next(),n.done)break;s=n.value}var a=s;if("responsiveCollapse"==a.definition.formatter){this.collapseHandleColumn=a;break}}this.collapseHandleColumn&&(this.hiddenColumns.length?this.collapseHandleColumn.show():this.collapseHandleColumn.hide())},q.prototype.initializeColumn=function(e){var t=e.getDefinition();e.modules.responsive={order:void 0===t.responsive?1:t.responsive,visible:!1!==t.visible}},q.prototype.initializeRow=function(e){var t;"calc"!==e.type&&(t=document.createElement("div"),t.classList.add("tabulator-responsive-collapse"),e.modules.responsiveLayout={element:t,open:this.collapseStartOpen},this.collapseStartOpen||(t.style.display="none"))},q.prototype.layoutRow=function(e){var t=e.getElement();e.modules.responsiveLayout&&(t.appendChild(e.modules.responsiveLayout.element),this.generateCollapsedRowContent(e))},q.prototype.updateColumnVisibility=function(e,t){e.modules.responsive&&(e.modules.responsive.visible=t,this.initialize())},q.prototype.hideColumn=function(e){var t=this.hiddenColumns.length;e.hide(!1,!0),"collapse"===this.mode&&(this.hiddenColumns.unshift(e),this.generateCollapsedContent(),this.collapseHandleColumn&&!t&&this.collapseHandleColumn.show())},q.prototype.showColumn=function(e){var t;e.show(!1,!0),e.setWidth(e.getWidth()),"collapse"===this.mode&&(t=this.hiddenColumns.indexOf(e),t>-1&&this.hiddenColumns.splice(t,1),this.generateCollapsedContent(),this.collapseHandleColumn&&!this.hiddenColumns.length&&this.collapseHandleColumn.hide())},q.prototype.update=function(){for(var e=this,t=!0;t;){var o="fitColumns"==e.table.modules.layout.getMode()?e.table.columnManager.getFlexBaseWidth():e.table.columnManager.getWidth(),i=(e.table.options.headerVisible?e.table.columnManager.element.clientWidth:e.table.element.clientWidth)-o;if(i<0){var n=e.columns[e.index];n?(e.hideColumn(n),e.index++):t=!1}else{var s=e.columns[e.index-1];s&&i>0&&i>=s.getWidth()?(e.showColumn(s),e.index--):t=!1}e.table.rowManager.activeRowsCount||e.table.rowManager.renderEmptyScroll()}},q.prototype.generateCollapsedContent=function(){var e=this;this.table.rowManager.getDisplayRows().forEach(function(t){e.generateCollapsedRowContent(t)})},q.prototype.generateCollapsedRowContent=function(e){var t,o;if(e.modules.responsiveLayout){for(t=e.modules.responsiveLayout.element;t.firstChild;)t.removeChild(t.firstChild);o=this.collapseFormatter(this.generateCollapsedRowData(e)),o&&t.appendChild(o)}},q.prototype.generateCollapsedRowData=function(e){var t,o=this,i=e.getData(),n=[];return this.hiddenColumns.forEach(function(s){var a=s.getFieldValue(i);s.definition.title&&s.field&&(s.modules.format&&o.table.options.responsiveLayoutCollapseUseFormatters?(t={value:!1,data:{},getValue:function(){return a},getData:function(){return i},getElement:function(){return document.createElement("div")},getRow:function(){return e.getComponent()},getColumn:function(){return s.getComponent()}},n.push({title:s.definition.title,value:s.modules.format.formatter.call(o.table.modules.format,t,s.modules.format.params)})):n.push({title:s.definition.title,value:a}))}),n},q.prototype.formatCollapsedData=function(e){var t=document.createElement("table"),o="";return e.forEach(function(e){var t=document.createElement("div");e.value instanceof Node&&(t.appendChild(e.value),e.value=t.innerHTML),o+=""+e.title+""+e.value+""}),t.innerHTML=o,Object.keys(e).length?t:""},h.prototype.registerModule("responsiveLayout",q);var K=function(e){this.table=e,this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],this.headerCheckboxElement=null};K.prototype.clearSelectionData=function(e){this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],e||this._rowSelectionChanged()},K.prototype.initializeRow=function(e){var t=this,o=e.getElement(),i=function e(){setTimeout(function(){t.selecting=!1},50),document.body.removeEventListener("mouseup",e)};e.modules.select={selected:!1},t.table.options.selectableCheck.call(this.table,e.getComponent())?(o.classList.add("tabulator-selectable"),o.classList.remove("tabulator-unselectable"),t.table.options.selectable&&"highlight"!=t.table.options.selectable&&("click"===t.table.options.selectableRangeMode?o.addEventListener("click",function(o){if(o.shiftKey){t.table._clearSelection(),t.lastClickedRow=t.lastClickedRow||e;var i=t.table.rowManager.getDisplayRowIndex(t.lastClickedRow),n=t.table.rowManager.getDisplayRowIndex(e),s=i<=n?i:n,a=i>=n?i:n,r=t.table.rowManager.getDisplayRows().slice(0),l=r.splice(s,a-s+1);o.ctrlKey||o.metaKey?(l.forEach(function(o){o!==t.lastClickedRow&&(!0===t.table.options.selectable||t.isRowSelected(e)?t.toggleRow(o):t.selectedRows.lengtht.table.options.selectable&&(l=l.slice(0,t.table.options.selectable)),t.selectRows(l)),t.table._clearSelection()}else o.ctrlKey||o.metaKey?(t.toggleRow(e),t.lastClickedRow=e):(t.deselectRows(void 0,!0),t.selectRows(e),t.lastClickedRow=e)}):(o.addEventListener("click",function(o){t.table.modExists("edit")&&t.table.modules.edit.getCurrentCell()||t.table._clearSelection(),t.selecting||t.toggleRow(e)}),o.addEventListener("mousedown",function(o){if(o.shiftKey)return t.table._clearSelection(),t.selecting=!0,t.selectPrev=[],document.body.addEventListener("mouseup",i),document.body.addEventListener("keyup",i),t.toggleRow(e),!1}),o.addEventListener("mouseenter",function(o){t.selecting&&(t.table._clearSelection(),t.toggleRow(e),t.selectPrev[1]==e&&t.toggleRow(t.selectPrev[0]))}),o.addEventListener("mouseout",function(o){t.selecting&&(t.table._clearSelection(),t.selectPrev.unshift(e))})))):(o.classList.add("tabulator-unselectable"),o.classList.remove("tabulator-selectable"))},K.prototype.toggleRow=function(e){this.table.options.selectableCheck.call(this.table,e.getComponent())&&(e.modules.select&&e.modules.select.selected?this._deselectRow(e):this._selectRow(e))},K.prototype.selectRows=function(e){var t,o=this;switch(void 0===e?"undefined":_typeof(e)){case"undefined":this.table.rowManager.rows.forEach(function(e){o._selectRow(e,!0,!0)}),this._rowSelectionChanged();break;case"string":t=this.table.rowManager.findRow(e),t?this._selectRow(t,!0,!0):this.table.rowManager.getRows(e).forEach(function(e){o._selectRow(e,!0,!0)}),this._rowSelectionChanged();break;default:Array.isArray(e)?(e.forEach(function(e){o._selectRow(e,!0,!0)}),this._rowSelectionChanged()):this._selectRow(e,!1,!0)}},K.prototype._selectRow=function(e,t,o){if(!isNaN(this.table.options.selectable)&&!0!==this.table.options.selectable&&!o&&this.selectedRows.length>=this.table.options.selectable){if(!this.table.options.selectableRollingSelection)return!1;this._deselectRow(this.selectedRows[0])}var i=this.table.rowManager.findRow(e);i?-1==this.selectedRows.indexOf(i)&&(i.modules.select||(i.modules.select={}),i.modules.select.selected=!0,i.modules.select.checkboxEl&&(i.modules.select.checkboxEl.checked=!0),i.getElement().classList.add("tabulator-selected"),this.selectedRows.push(i),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(i,!0),t||this.table.options.rowSelected.call(this.table,i.getComponent()),this._rowSelectionChanged(t)):t||console.warn("Selection Error - No such row found, ignoring selection:"+e)},K.prototype.isRowSelected=function(e){return-1!==this.selectedRows.indexOf(e)},K.prototype.deselectRows=function(e,t){var o,i=this;if(void 0===e){o=i.selectedRows.length;for(var n=0;n-1&&(n.modules.select||(n.modules.select={}),n.modules.select.selected=!1,n.modules.select.checkboxEl&&(n.modules.select.checkboxEl.checked=!1),n.getElement().classList.remove("tabulator-selected"),i.selectedRows.splice(o,1),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(n,!1),t||i.table.options.rowDeselected.call(this.table,n.getComponent()),i._rowSelectionChanged(t)):t||console.warn("Deselection Error - No such row found, ignoring selection:"+e)},K.prototype.getSelectedData=function(){var e=[];return this.selectedRows.forEach(function(t){e.push(t.getData())}),e},K.prototype.getSelectedRows=function(){var e=[];return this.selectedRows.forEach(function(t){e.push(t.getComponent())}),e},K.prototype._rowSelectionChanged=function(e){this.headerCheckboxElement&&(0===this.selectedRows.length?(this.headerCheckboxElement.checked=!1,this.headerCheckboxElement.indeterminate=!1):this.table.rowManager.rows.length===this.selectedRows.length?(this.headerCheckboxElement.checked=!0,this.headerCheckboxElement.indeterminate=!1):(this.headerCheckboxElement.indeterminate=!0,this.headerCheckboxElement.checked=!1)),e||this.table.options.rowSelectionChanged.call(this.table,this.getSelectedData(),this.getSelectedRows())},K.prototype.registerRowSelectCheckbox=function(e,t){e._row.modules.select||(e._row.modules.select={}),e._row.modules.select.checkboxEl=t},K.prototype.registerHeaderSelectCheckbox=function(e){this.headerCheckboxElement=e},K.prototype.childRowSelection=function(e,t){var o=this.table.modules.dataTree.getChildren(e);if(t)for(var i=o,n=Array.isArray(i),s=0,i=n?i:i[Symbol.iterator]();;){var a;if(n){if(s>=i.length)break;a=i[s++]}else{if(s=i.next(),s.done)break;a=s.value}var r=a;this._selectRow(r,!0)}else for(var l=o,c=Array.isArray(l),u=0,l=c?l:l[Symbol.iterator]();;){var d;if(c){if(u>=l.length)break;d=l[u++]}else{if(u=l.next(),u.done)break;d=u.value}var h=d;this._deselectRow(h,!0)}},h.prototype.registerModule("selectRow",K);var J=function(e){this.table=e,this.sortList=[],this.changed=!1};J.prototype.initializeColumn=function(e,t){var o,i,n=this,s=!1;switch(_typeof(e.definition.sorter)){case"string":n.sorters[e.definition.sorter]?s=n.sorters[e.definition.sorter]:console.warn("Sort Error - No such sorter found: ",e.definition.sorter);break;case"function":s=e.definition.sorter}e.modules.sort={sorter:s,dir:"none",params:e.definition.sorterParams||{},startingDir:e.definition.headerSortStartingDir||"asc",tristate:void 0!==e.definition.headerSortTristate?e.definition.headerSortTristate:this.table.options.headerSortTristate},(void 0===e.definition.headerSort?!1!==this.table.options.headerSort:!1!==e.definition.headerSort)&&(o=e.getElement(),o.classList.add("tabulator-sortable"),i=document.createElement("div"),i.classList.add("tabulator-col-sorter"),"object"==_typeof(this.table.options.headerSortElement)?i.appendChild(this.table.options.headerSortElement):i.innerHTML=this.table.options.headerSortElement,t.appendChild(i),e.modules.sort.element=i,o.addEventListener("click",function(t){var o="",i=[],s=!1;if(e.modules.sort){if(e.modules.sort.tristate)o="none"==e.modules.sort.dir?e.modules.sort.startingDir:e.modules.sort.dir==e.modules.sort.startingDir?"asc"==e.modules.sort.dir?"desc":"asc":"none";else switch(e.modules.sort.dir){case"asc":o="desc";break;case"desc":o="asc";break;default:o=e.modules.sort.startingDir}n.table.options.columnHeaderSortMulti&&(t.shiftKey||t.ctrlKey)?(i=n.getSort(),s=i.findIndex(function(t){return t.field===e.getField()}),s>-1?(i[s].dir=o,s!=i.length-1&&(s=i.splice(s,1)[0],"none"!=o&&i.push(s))):"none"!=o&&i.push({column:e,dir:o}),n.setSort(i)):"none"==o?n.clear():n.setSort(e,o),n.table.rowManager.sorterRefresh(!n.sortList.length)}}))},J.prototype.hasChanged=function(){var e=this.changed;return this.changed=!1,e},J.prototype.getSort=function(){var e=this,t=[];return e.sortList.forEach(function(e){e.column&&t.push({column:e.column.getComponent(),field:e.column.getField(),dir:e.dir})}),t},J.prototype.setSort=function(e,t){var o=this,i=[];Array.isArray(e)||(e=[{column:e,dir:t}]),e.forEach(function(e){var t;t=o.table.columnManager.findColumn(e.column),t?(e.column=t,i.push(e),o.changed=!0):console.warn("Sort Warning - Sort field does not exist and is being ignored: ",e.column)}),o.sortList=i,this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.sort&&this.table.modules.persistence.save("sort")},J.prototype.clear=function(){this.setSort([])},J.prototype.findSorter=function(e){var t,o=this.table.rowManager.activeRows[0],i="string";if(o&&(o=o.getData(),e.getField()))switch(t=e.getFieldValue(o),void 0===t?"undefined":_typeof(t)){case"undefined":i="string";break;case"boolean":i="boolean";break;default:isNaN(t)||""===t?t.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)&&(i="alphanum"):i="number"}return this.sorters[i]},J.prototype.sort=function(e){var t=this,o=this.table.options.sortOrderReverse?t.sortList.slice().reverse():t.sortList,i=[],n=[];t.table.options.dataSorting&&t.table.options.dataSorting.call(t.table,t.getSort()),t.clearColumnHeaders(),t.table.options.ajaxSorting?o.forEach(function(e,o){t.setColumnHeader(e.column,e.dir)}):(o.forEach(function(e,o){var n=e.column.modules.sort;e.column&&n&&(n.sorter||(n.sorter=t.findSorter(e.column)),e.params="function"==typeof n.params?n.params(e.column.getComponent(),e.dir):n.params,i.push(e)),t.setColumnHeader(e.column,e.dir)}),i.length&&t._sortItems(e,i)),t.table.options.dataSorted&&(e.forEach(function(e){n.push(e.getComponent())}),t.table.options.dataSorted.call(t.table,t.getSort(),n))},J.prototype.clearColumnHeaders=function(){this.table.columnManager.getRealColumns().forEach(function(e){e.modules.sort&&(e.modules.sort.dir="none",e.getElement().setAttribute("aria-sort","none"))})},J.prototype.setColumnHeader=function(e,t){e.modules.sort.dir=t,e.getElement().setAttribute("aria-sort",t)},J.prototype._sortItems=function(e,t){var o=this,i=t.length-1;e.sort(function(e,n){for(var s,a=i;a>=0;a--){var r=t[a];if(0!==(s=o._sortRow(e,n,r.column,r.dir,r.params)))break}return s})},J.prototype._sortRow=function(e,t,o,i,n){var s,a,r="asc"==i?e:t,l="asc"==i?t:e;return e=o.getFieldValue(r.getData()),t=o.getFieldValue(l.getData()),e=void 0!==e?e:"",t=void 0!==t?t:"",s=r.getComponent(),a=l.getComponent(),o.modules.sort.sorter.call(this,e,t,s,a,o.getComponent(),i,n)},J.prototype.sorters={number:function(e,t,o,i,n,s,a){var r=a.alignEmptyValues,l=a.decimalSeparator||".",c=a.thousandSeparator||",",u=0;if(e=parseFloat(String(e).split(c).join("").split(l).join(".")),t=parseFloat(String(t).split(c).join("").split(l).join(".")),isNaN(e))u=isNaN(t)?0:-1;else{if(!isNaN(t))return e-t;u=1}return("top"===r&&"desc"===s||"bottom"===r&&"asc"===s)&&(u*=-1),u},string:function(e,t,o,i,n,s,a){var r,l=a.alignEmptyValues,c=0;if(e){if(t){switch(_typeof(a.locale)){case"boolean":a.locale&&(r=this.table.modules.localize.getLocale());break;case"string":r=a.locale}return String(e).toLowerCase().localeCompare(String(t).toLowerCase(),r)}c=1}else c=t?-1:0;return("top"===l&&"desc"===s||"bottom"===l&&"asc"===s)&&(c*=-1),c},date:function(e,t,o,i,n,s,a){return a.format||(a.format="DD/MM/YYYY"),this.sorters.datetime.call(this,e,t,o,i,n,s,a)},time:function(e,t,o,i,n,s,a){return a.format||(a.format="HH:mm"),this.sorters.datetime.call(this,e,t,o,i,n,s,a)},datetime:function(e,t,o,i,n,s,a){var r=a.format||"DD/MM/YYYY HH:mm:ss",l=a.alignEmptyValues,c=0;if("undefined"!=typeof moment){if(e=moment(e,r),t=moment(t,r),e.isValid()){if(t.isValid())return e-t;c=1}else c=t.isValid()?-1:0;return("top"===l&&"desc"===s||"bottom"===l&&"asc"===s)&&(c*=-1),c}console.error("Sort Error - 'datetime' sorter is dependant on moment.js")},boolean:function(e,t,o,i,n,s,a){return(!0===e||"true"===e||"True"===e||1===e?1:0)-(!0===t||"true"===t||"True"===t||1===t?1:0)},array:function(e,t,o,i,n,s,a){function r(e){switch(u){case"length":return e.length;case"sum":return e.reduce(function(e,t){return e+t});case"max":return Math.max.apply(null,e);case"min":return Math.min.apply(null,e);case"avg":return e.reduce(function(e,t){return e+t})/e.length}} -var l=0,c=0,u=a.type||"length",d=a.alignEmptyValues,h=0;if(Array.isArray(e)){if(Array.isArray(t))return l=e?r(e):0,c=t?r(t):0,l-c;d=1}else d=Array.isArray(t)?-1:0;return("top"===d&&"desc"===s||"bottom"===d&&"asc"===s)&&(h*=-1),h},exists:function(e,t,o,i,n,s,a){return(void 0===e?0:1)-(void 0===t?0:1)},alphanum:function(e,t,o,i,n,s,a){var r,l,c,u,d,h=0,p=/(\d+)|(\D+)/g,m=/\d/,f=a.alignEmptyValues,g=0;if(e||0===e){if(t||0===t){if(isFinite(e)&&isFinite(t))return e-t;if(r=String(e).toLowerCase(),l=String(t).toLowerCase(),r===l)return 0;if(!m.test(r)||!m.test(l))return r>l?1:-1;for(r=r.match(p),l=l.match(p),d=r.length>l.length?l.length:r.length;hu?1:-1;return r.length>l.length}g=1}else g=t||0===t?-1:0;return("top"===f&&"desc"===s||"bottom"===f&&"asc"===s)&&(g*=-1),g}},h.prototype.registerModule("sort",J);var $=function(e){this.table=e,this.invalidCells=[]};return $.prototype.initializeColumn=function(e){var t,o=this,i=[];e.definition.validator&&(Array.isArray(e.definition.validator)?e.definition.validator.forEach(function(e){(t=o._extractValidator(e))&&i.push(t)}):(t=this._extractValidator(e.definition.validator))&&i.push(t),e.modules.validate=!!i.length&&i)},$.prototype._extractValidator=function(e){var t,o,i;switch(void 0===e?"undefined":_typeof(e)){case"string":return i=e.indexOf(":"),i>-1?(t=e.substring(0,i),o=e.substring(i+1)):t=e,this._buildValidator(t,o);case"function":return this._buildValidator(e);case"object":return this._buildValidator(e.type,e.parameters)}},$.prototype._buildValidator=function(e,t){var o="function"==typeof e?e:this.validators[e];return o?{type:"function"==typeof e?"function":e,func:o,params:t}:(console.warn("Validator Setup Error - No matching validator found:",e),!1)},$.prototype.validate=function(e,t,o){var i=this,n=[],s=this.invalidCells.indexOf(t);return e&&e.forEach(function(e){e.func.call(i,t.getComponent(),o,e.params)||n.push({type:e.type,parameters:e.params})}),n=!n.length||n,t.modules.validate||(t.modules.validate={}),!0===n?(t.modules.validate.invalid=!1,t.getElement().classList.remove("tabulator-validation-fail"),s>-1&&this.invalidCells.splice(s,1)):(t.modules.validate.invalid=!0,"manual"!==this.table.options.validationMode&&t.getElement().classList.add("tabulator-validation-fail"),-1==s&&this.invalidCells.push(t)),n},$.prototype.getInvalidCells=function(){var e=[];return this.invalidCells.forEach(function(t){e.push(t.getComponent())}),e},$.prototype.clearValidation=function(e){var t;e.modules.validate&&e.modules.validate.invalid&&(e.getElement().classList.remove("tabulator-validation-fail"),e.modules.validate.invalid=!1,(t=this.invalidCells.indexOf(e))>-1&&this.invalidCells.splice(t,1))},$.prototype.validators={integer:function(e,t,o){return""===t||null===t||void 0===t||"number"==typeof(t=Number(t))&&isFinite(t)&&Math.floor(t)===t},float:function(e,t,o){return""===t||null===t||void 0===t||"number"==typeof(t=Number(t))&&isFinite(t)&&t%1!=0},numeric:function(e,t,o){return""===t||null===t||void 0===t||!isNaN(t)},string:function(e,t,o){return""===t||null===t||void 0===t||isNaN(t)},max:function(e,t,o){return""===t||null===t||void 0===t||parseFloat(t)<=o},min:function(e,t,o){return""===t||null===t||void 0===t||parseFloat(t)>=o},starts:function(e,t,o){return""===t||null===t||void 0===t||String(t).toLowerCase().startsWith(String(o).toLowerCase())},ends:function(e,t,o){return""===t||null===t||void 0===t||String(t).toLowerCase().endsWith(String(o).toLowerCase())},minLength:function(e,t,o){return""===t||null===t||void 0===t||String(t).length>=o},maxLength:function(e,t,o){return""===t||null===t||void 0===t||String(t).length<=o},in:function(e,t,o){return""===t||null===t||void 0===t||("string"==typeof o&&(o=o.split("|")),""===t||o.indexOf(t)>-1)},regex:function(e,t,o){return""===t||null===t||void 0===t||new RegExp(o).test(t)},unique:function(e,t,o){if(""===t||null===t||void 0===t)return!0;var i=!0,n=e.getData(),s=e.getColumn()._getSelf();return this.table.rowManager.rows.forEach(function(e){var o=e.getData();o!==n&&t==s.getFieldValue(o)&&(i=!1)}),i},required:function(e,t,o){return""!==t&&null!==t&&void 0!==t}},h.prototype.registerModule("validate",$),h}); \ No newline at end of file diff --git a/website/js/vendor/tabulator/js/tabulator_core.min.js b/website/js/vendor/tabulator/js/tabulator_core.min.js deleted file mode 100644 index 87986ad..0000000 --- a/website/js/vendor/tabulator/js/tabulator_core.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/* Tabulator v4.8.3 (c) Oliver Folkerd */ -"use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),o=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;n>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;n>>0;if(0===i)return!1;for(var n=0|e,l=Math.max(n>=0?n:i-Math.abs(n),0);lo?(e=t-o,this.element.style.marginLeft=-e+"px"):this.element.style.marginLeft=0,this.scrollLeft=t,this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.scrollHorizontal()},ColumnManager.prototype.generateColumnsFromRowData=function(t){var e,o,i=[],n=this.table.options.autoColumnsDefinitions;if(t&&t.length){e=t[0];for(var l in e){var s={field:l,title:l},a=e[l];switch(void 0===a?"undefined":_typeof(a)){case"undefined":o="string";break;case"boolean":o="boolean";break;case"object":o=Array.isArray(a)?"array":"string";break;default:o=isNaN(a)||""===a?a.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)?"alphanum":"string":"number"}s.sorter=o,i.push(s)}if(n)switch(void 0===n?"undefined":_typeof(n)){case"function":this.table.options.columns=n.call(this.table,i);break;case"object":Array.isArray(n)?i.forEach(function(t){var e=n.find(function(e){return e.field===t.field});e&&Object.assign(t,e)}):i.forEach(function(t){n[t.field]&&Object.assign(t,n[t.field])}),this.table.options.columns=i}else this.table.options.columns=i;this.setColumns(this.table.options.columns)}},ColumnManager.prototype.setColumns=function(t,e){for(var o=this;o.headersElement.firstChild;)o.headersElement.removeChild(o.headersElement.firstChild);o.columns=[],o.columnsByIndex=[],o.columnsByField={},o.table.modExists("frozenColumns")&&o.table.modules.frozenColumns.reset(),t.forEach(function(t,e){o._addColumn(t)}),o._reIndexColumns(),o.table.options.responsiveLayout&&o.table.modExists("responsiveLayout",!0)&&o.table.modules.responsiveLayout.initialize(),this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitialize(!1,!0),o.redraw(!0)},ColumnManager.prototype._addColumn=function(t,e,o){var i=new Column(t,this),n=i.getElement(),l=o?this.findColumnIndex(o):o;if(o&&l>-1){var s=this.columns.indexOf(o.getTopColumn()),a=o.getElement();e?(this.columns.splice(s,0,i),a.parentNode.insertBefore(n,a)):(this.columns.splice(s+1,0,i),a.parentNode.insertBefore(n,a.nextSibling))}else e?(this.columns.unshift(i),this.headersElement.insertBefore(i.getElement(),this.headersElement.firstChild)):(this.columns.push(i),this.headersElement.appendChild(i.getElement())),i.columnRendered();return i},ColumnManager.prototype.registerColumnField=function(t){t.definition.field&&(this.columnsByField[t.definition.field]=t)},ColumnManager.prototype.registerColumnPosition=function(t){this.columnsByIndex.push(t)},ColumnManager.prototype._reIndexColumns=function(){this.columnsByIndex=[],this.columns.forEach(function(t){t.reRegisterPosition()})},ColumnManager.prototype._verticalAlignHeaders=function(){var t=this,e=0;t.columns.forEach(function(t){var o;t.clearVerticalAlign(),(o=t.getHeight())>e&&(e=o)}),t.columns.forEach(function(o){o.verticalAlign(t.table.options.columnHeaderVertAlign,e)}),t.rowManager.adjustTableSize()},ColumnManager.prototype.findColumn=function(t){var e=this;if("object"!=(void 0===t?"undefined":_typeof(t)))return this.columnsByField[t]||!1;if(t instanceof Column)return t;if(t instanceof ColumnComponent)return t._getSelf()||!1;if("undefined"!=typeof HTMLElement&&t instanceof HTMLElement){return e.columns.find(function(e){return e.element===t})||!1}return!1},ColumnManager.prototype.getColumnByField=function(t){return this.columnsByField[t]},ColumnManager.prototype.getColumnsByFieldRoot=function(t){var e=this,o=[];return Object.keys(this.columnsByField).forEach(function(i){i.split(".")[0]===t&&o.push(e.columnsByField[i])}),o},ColumnManager.prototype.getColumnByIndex=function(t){return this.columnsByIndex[t]},ColumnManager.prototype.getFirstVisibileColumn=function(t){var t=this.columnsByIndex.findIndex(function(t){return t.visible});return t>-1&&this.columnsByIndex[t]},ColumnManager.prototype.getColumns=function(){return this.columns},ColumnManager.prototype.findColumnIndex=function(t){return this.columnsByIndex.findIndex(function(e){return t===e})},ColumnManager.prototype.getRealColumns=function(){return this.columnsByIndex},ColumnManager.prototype.traverse=function(t){this.columnsByIndex.forEach(function(e,o){t(e,o)})},ColumnManager.prototype.getDefinitions=function(t){var e=this,o=[];return e.columnsByIndex.forEach(function(e){(!t||t&&e.visible)&&o.push(e.getDefinition())}),o},ColumnManager.prototype.getDefinitionTree=function(){var t=this,e=[];return t.columns.forEach(function(t){e.push(t.getDefinition(!0))}),e},ColumnManager.prototype.getComponents=function(t){var e=this,o=[];return(t?e.columns:e.columnsByIndex).forEach(function(t){o.push(t.getComponent())}),o},ColumnManager.prototype.getWidth=function(){var t=0;return this.columnsByIndex.forEach(function(e){e.visible&&(t+=e.getWidth())}),t},ColumnManager.prototype.moveColumn=function(t,e,o){this.moveColumnActual(t,e,o),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),e.element.parentNode.insertBefore(t.element,e.element),o&&e.element.parentNode.insertBefore(e.element,t.element),this._verticalAlignHeaders(),this.table.rowManager.reinitialize()},ColumnManager.prototype.moveColumnActual=function(t,e,o){t.parent.isGroup?this._moveColumnInArray(t.parent.columns,t,e,o):this._moveColumnInArray(this.columns,t,e,o),this._moveColumnInArray(this.columnsByIndex,t,e,o,!0),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitialize(!0),this.table.options.columnMoved&&this.table.options.columnMoved.call(this.table,t.getComponent(),this.table.columnManager.getComponents()),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns")},ColumnManager.prototype._moveColumnInArray=function(t,e,o,i,n){var l,s=this,a=t.indexOf(e),r=[];a>-1&&(t.splice(a,1),l=t.indexOf(o),l>-1?i&&(l+=1):l=a,t.splice(l,0,e),n&&(this.table.options.dataTree&&this.table.modExists("dataTree",!0)&&this.table.rowManager.rows.forEach(function(t){r=r.concat(s.table.modules.dataTree.getTreeChildren(t,!1,!0))}),r=r.concat(this.table.rowManager.rows),r.forEach(function(t){if(t.cells.length){var e=t.cells.splice(a,1)[0];t.cells.splice(l,0,e)}})))},ColumnManager.prototype.scrollToColumn=function(t,e,o){var i=this,n=0,l=0,s=0,a=t.getElement();return new Promise(function(r,u){if(void 0===e&&(e=i.table.options.scrollToColumnPosition),void 0===o&&(o=i.table.options.scrollToColumnIfVisible),t.visible){switch(e){case"middle":case"center":s=-i.element.clientWidth/2;break;case"right":s=a.clientWidth-i.headersElement.clientWidth}if(!o&&(l=a.offsetLeft)>0&&l+a.offsetWidtht.rowManager.element.clientHeight&&(e-=t.rowManager.element.offsetWidth-t.rowManager.element.clientWidth),this.columnsByIndex.forEach(function(i){var n,l,s;i.visible&&(n=i.definition.width||0,l=void 0===i.minWidth?t.table.options.columnMinWidth:parseInt(i.minWidth),s="string"==typeof n?n.indexOf("%")>-1?e/100*parseInt(n):parseInt(n):n,o+=s>l?s:l)}),o},ColumnManager.prototype.addColumn=function(t,e,o){var i=this;return new Promise(function(n,l){var s=i._addColumn(t,e,o);i._reIndexColumns(),i.table.options.responsiveLayout&&i.table.modExists("responsiveLayout",!0)&&i.table.modules.responsiveLayout.initialize(),i.table.modExists("columnCalcs")&&i.table.modules.columnCalcs.recalc(i.table.rowManager.activeRows),i.redraw(),"fitColumns"!=i.table.modules.layout.getMode()&&s.reinitializeWidth(),i._verticalAlignHeaders(),i.table.rowManager.reinitialize(),i.table.options.virtualDomHoz&&i.table.vdomHoz.reinitialize(),n(s)})},ColumnManager.prototype.deregisterColumn=function(t){var e,o=t.getField();o&&delete this.columnsByField[o],e=this.columnsByIndex.indexOf(t),e>-1&&this.columnsByIndex.splice(e,1),e=this.columns.indexOf(t),e>-1&&this.columns.splice(e,1),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this._verticalAlignHeaders(),this.redraw()},ColumnManager.prototype.redraw=function(t){t&&(Tabulator.prototype.helpers.elVisible(this.element)&&this._verticalAlignHeaders(),this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),["fitColumns","fitDataStretch"].indexOf(this.table.modules.layout.getMode())>-1?this.table.modules.layout.layout():t?this.table.modules.layout.layout():this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout(),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),t&&(this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns"),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.redraw()),this.table.footerManager.redraw()};var ColumnComponent=function(t){this._column=t,this.type="ColumnComponent"};ColumnComponent.prototype.getElement=function(){return this._column.getElement()},ColumnComponent.prototype.getDefinition=function(){return this._column.getDefinition()},ColumnComponent.prototype.getField=function(){return this._column.getField()},ColumnComponent.prototype.getCells=function(){var t=[];return this._column.cells.forEach(function(e){t.push(e.getComponent())}),t},ColumnComponent.prototype.getVisibility=function(){return console.warn("getVisibility function is deprecated, you should now use the isVisible function"),this._column.visible},ColumnComponent.prototype.isVisible=function(){return this._column.visible},ColumnComponent.prototype.show=function(){this._column.isGroup?this._column.columns.forEach(function(t){t.show()}):this._column.show()},ColumnComponent.prototype.hide=function(){this._column.isGroup?this._column.columns.forEach(function(t){t.hide()}):this._column.hide()},ColumnComponent.prototype.toggle=function(){this._column.visible?this.hide():this.show()},ColumnComponent.prototype.delete=function(){return this._column.delete()},ColumnComponent.prototype.getSubColumns=function(){var t=[];return this._column.columns.length&&this._column.columns.forEach(function(e){t.push(e.getComponent())}),t},ColumnComponent.prototype.getParentColumn=function(){return this._column.parent instanceof Column&&this._column.parent.getComponent()},ColumnComponent.prototype._getSelf=function(){return this._column},ColumnComponent.prototype.scrollTo=function(){return this._column.table.columnManager.scrollToColumn(this._column)},ColumnComponent.prototype.getTable=function(){return this._column.table},ColumnComponent.prototype.headerFilterFocus=function(){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterFocus(this._column)},ColumnComponent.prototype.reloadHeaderFilter=function(){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.reloadHeaderFilter(this._column)},ColumnComponent.prototype.getHeaderFilterValue=function(){if(this._column.table.modExists("filter",!0))return this._column.table.modules.filter.getHeaderFilterValue(this._column)},ColumnComponent.prototype.setHeaderFilterValue=function(t){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterValue(this._column,t)},ColumnComponent.prototype.move=function(t,e){var o=this._column.table.columnManager.findColumn(t);o?this._column.table.columnManager.moveColumn(this._column,o,e):console.warn("Move Error - No matching column found:",o)},ColumnComponent.prototype.getNextColumn=function(){var t=this._column.nextColumn();return!!t&&t.getComponent()},ColumnComponent.prototype.getPrevColumn=function(){var t=this._column.prevColumn();return!!t&&t.getComponent()},ColumnComponent.prototype.updateDefinition=function(t){return this._column.updateDefinition(t)},ColumnComponent.prototype.getWidth=function(){return this._column.getWidth()},ColumnComponent.prototype.setWidth=function(t){var e;return e=!0===t?this._column.reinitializeWidth(!0):this._column.setWidth(t),this._column.table.options.virtualDomHoz&&this._column.table.vdomHoz.reinitialize(!0),e},ColumnComponent.prototype.validate=function(){return this._column.validate()};var Column=function t(e,o){var i=this;this.table=o.table,this.definition=e,this.parent=o,this.type="column",this.columns=[],this.cells=[],this.element=this.createElement(),this.contentElement=!1,this.titleHolderElement=!1,this.titleElement=!1,this.groupElement=this.createGroupElement(),this.isGroup=!1,this.tooltip=!1,this.hozAlign="",this.vertAlign="",this.field="",this.fieldStructure="",this.getFieldValue="",this.setFieldValue="",this.titleFormatterRendered=!1,this.setField(this.definition.field),this.table.options.invalidOptionWarnings&&this.checkDefinition(),this.modules={},this.cellEvents={cellClick:!1,cellDblClick:!1,cellContext:!1,cellTap:!1,cellDblTap:!1,cellTapHold:!1,cellMouseEnter:!1,cellMouseLeave:!1,cellMouseOver:!1,cellMouseOut:!1,cellMouseMove:!1},this.width=null,this.widthStyled="",this.minWidth=null,this.minWidthStyled="",this.widthFixed=!1,this.visible=!0,this.component=null,this._mapDepricatedFunctionality(),e.columns?(this.isGroup=!0,e.columns.forEach(function(e,o){var n=new t(e,i);i.attachColumn(n)}),i.checkColumnVisibility()):o.registerColumnField(this),e.rowHandle&&!1!==this.table.options.movableRows&&this.table.modExists("moveRow")&&this.table.modules.moveRow.setHandle(!0),this._buildHeader(),this.bindModuleColumns()};Column.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-col"),t.setAttribute("role","columnheader"),t.setAttribute("aria-sort","none"),t},Column.prototype.createGroupElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-col-group-cols"),t},Column.prototype.checkDefinition=function(){var t=this;Object.keys(this.definition).forEach(function(e){-1===t.defaultOptionList.indexOf(e)&&console.warn("Invalid column definition option in '"+(t.field||t.definition.title)+"' column:",e)})},Column.prototype.setField=function(t){this.field=t,this.fieldStructure=t?this.table.options.nestedFieldSeparator?t.split(this.table.options.nestedFieldSeparator):[t]:[],this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData,this.setFieldValue=this.fieldStructure.length>1?this._setNestedData:this._setFlatData},Column.prototype.registerColumnPosition=function(t){this.parent.registerColumnPosition(t)},Column.prototype.registerColumnField=function(t){this.parent.registerColumnField(t)},Column.prototype.reRegisterPosition=function(){this.isGroup?this.columns.forEach(function(t){t.reRegisterPosition()}):this.registerColumnPosition(this)},Column.prototype._mapDepricatedFunctionality=function(){void 0!==this.definition.hideInHtml&&(this.definition.htmlOutput=!this.definition.hideInHtml,console.warn("hideInHtml column definition property is deprecated, you should now use htmlOutput")),void 0!==this.definition.align&&(this.definition.hozAlign=this.definition.align,console.warn("align column definition property is deprecated, you should now use hozAlign")),void 0!==this.definition.downloadTitle&&(this.definition.titleDownload=this.definition.downloadTitle,console.warn("downloadTitle definition property is deprecated, you should now use titleDownload"))},Column.prototype.setTooltip=function(){var t=this,e=t.definition,o=e.headerTooltip||!1===e.tooltip?e.headerTooltip:t.table.options.tooltipsHeader;o?!0===o?e.field?t.table.modules.localize.bind("columns|"+e.field,function(o){t.element.setAttribute("title",o||e.title)}):t.element.setAttribute("title",e.title):("function"==typeof o&&!1===(o=o(t.getComponent()))&&(o=""),t.element.setAttribute("title",o)):t.element.setAttribute("title","")},Column.prototype._buildHeader=function(){for(var t=this,e=t.definition;t.element.firstChild;)t.element.removeChild(t.element.firstChild);e.headerVertical&&(t.element.classList.add("tabulator-col-vertical"),"flip"===e.headerVertical&&t.element.classList.add("tabulator-col-vertical-flip")),t.contentElement=t._bindEvents(),t.contentElement=t._buildColumnHeaderContent(),t.element.appendChild(t.contentElement),t.isGroup?t._buildGroupHeader():t._buildColumnHeader(),t.setTooltip(),t.table.options.resizableColumns&&t.table.modExists("resizeColumns")&&t.table.modules.resizeColumns.initializeColumn("header",t,t.element),e.headerFilter&&t.table.modExists("filter")&&t.table.modExists("edit")&&(void 0!==e.headerFilterPlaceholder&&e.field&&t.table.modules.localize.setHeaderFilterColumnPlaceholder(e.field,e.headerFilterPlaceholder),t.table.modules.filter.initializeColumn(t)),t.table.modExists("frozenColumns")&&t.table.modules.frozenColumns.initializeColumn(t),t.table.options.movableColumns&&!t.isGroup&&t.table.modExists("moveColumn")&&t.table.modules.moveColumn.initializeColumn(t),(e.topCalc||e.bottomCalc)&&t.table.modExists("columnCalcs")&&t.table.modules.columnCalcs.initializeColumn(t),t.table.modExists("persistence")&&t.table.modules.persistence.config.columns&&t.table.modules.persistence.initializeColumn(t),t.element.addEventListener("mouseenter",function(e){t.setTooltip()})},Column.prototype._bindEvents=function(){var t,e,o,i=this,n=i.definition;"function"==typeof n.headerClick&&i.element.addEventListener("click",function(t){n.headerClick(t,i.getComponent())}),"function"==typeof n.headerDblClick&&i.element.addEventListener("dblclick",function(t){n.headerDblClick(t,i.getComponent())}),"function"==typeof n.headerContext&&i.element.addEventListener("contextmenu",function(t){n.headerContext(t,i.getComponent())}),"function"==typeof n.headerTap&&(o=!1,i.element.addEventListener("touchstart",function(t){o=!0},{passive:!0}),i.element.addEventListener("touchend",function(t){o&&n.headerTap(t,i.getComponent()),o=!1})),"function"==typeof n.headerDblTap&&(t=null,i.element.addEventListener("touchend",function(e){t?(clearTimeout(t),t=null,n.headerDblTap(e,i.getComponent())):t=setTimeout(function(){clearTimeout(t),t=null},300)})),"function"==typeof n.headerTapHold&&(e=null,i.element.addEventListener("touchstart",function(t){clearTimeout(e),e=setTimeout(function(){clearTimeout(e),e=null,o=!1,n.headerTapHold(t,i.getComponent())},1e3)},{passive:!0}),i.element.addEventListener("touchend",function(t){clearTimeout(e),e=null})),"function"==typeof n.cellClick&&(i.cellEvents.cellClick=n.cellClick),"function"==typeof n.cellDblClick&&(i.cellEvents.cellDblClick=n.cellDblClick),"function"==typeof n.cellContext&&(i.cellEvents.cellContext=n.cellContext),"function"==typeof n.cellMouseEnter&&(i.cellEvents.cellMouseEnter=n.cellMouseEnter),"function"==typeof n.cellMouseLeave&&(i.cellEvents.cellMouseLeave=n.cellMouseLeave),"function"==typeof n.cellMouseOver&&(i.cellEvents.cellMouseOver=n.cellMouseOver),"function"==typeof n.cellMouseOut&&(i.cellEvents.cellMouseOut=n.cellMouseOut),"function"==typeof n.cellMouseMove&&(i.cellEvents.cellMouseMove=n.cellMouseMove),"function"==typeof n.cellTap&&(i.cellEvents.cellTap=n.cellTap),"function"==typeof n.cellDblTap&&(i.cellEvents.cellDblTap=n.cellDblTap),"function"==typeof n.cellTapHold&&(i.cellEvents.cellTapHold=n.cellTapHold),"function"==typeof n.cellEdited&&(i.cellEvents.cellEdited=n.cellEdited),"function"==typeof n.cellEditing&&(i.cellEvents.cellEditing=n.cellEditing),"function"==typeof n.cellEditCancelled&&(i.cellEvents.cellEditCancelled=n.cellEditCancelled)},Column.prototype._buildColumnHeader=function(){var t=this,e=this.definition,o=this.table;if(o.modExists("sort")&&o.modules.sort.initializeColumn(this,this.titleHolderElement),(e.headerContextMenu||e.headerClickMenu||e.headerMenu)&&o.modExists("menu")&&o.modules.menu.initializeColumnHeader(this),o.modExists("format")&&o.modules.format.initializeColumn(this),void 0!==e.editor&&o.modExists("edit")&&o.modules.edit.initializeColumn(this),void 0!==e.validator&&o.modExists("validate")&&o.modules.validate.initializeColumn(this),o.modExists("mutator")&&o.modules.mutator.initializeColumn(this),o.modExists("accessor")&&o.modules.accessor.initializeColumn(this),_typeof(o.options.responsiveLayout)&&o.modExists("responsiveLayout")&&o.modules.responsiveLayout.initializeColumn(this),void 0!==e.visible&&(e.visible?this.show(!0):this.hide(!0)),e.cssClass){e.cssClass.split(" ").forEach(function(e){t.element.classList.add(e)})}e.field&&this.element.setAttribute("tabulator-field",e.field),this.setMinWidth(void 0===e.minWidth?this.table.options.columnMinWidth:parseInt(e.minWidth)),this.reinitializeWidth(),this.tooltip=this.definition.tooltip||!1===this.definition.tooltip?this.definition.tooltip:this.table.options.tooltips,this.hozAlign=void 0===this.definition.hozAlign?this.table.options.cellHozAlign:this.definition.hozAlign,this.vertAlign=void 0===this.definition.vertAlign?this.table.options.cellVertAlign:this.definition.vertAlign,this.titleElement.style.textAlign=this.definition.headerHozAlign||this.table.options.headerHozAlign},Column.prototype._buildColumnHeaderContent=function(){var t=(this.definition,this.table,document.createElement("div"));return t.classList.add("tabulator-col-content"),this.titleHolderElement=document.createElement("div"),this.titleHolderElement.classList.add("tabulator-col-title-holder"),t.appendChild(this.titleHolderElement),this.titleElement=this._buildColumnHeaderTitle(),this.titleHolderElement.appendChild(this.titleElement),t},Column.prototype._buildColumnHeaderTitle=function(){var t=this,e=t.definition,o=t.table,i=document.createElement("div");if(i.classList.add("tabulator-col-title"),e.editableTitle){var n=document.createElement("input");n.classList.add("tabulator-title-editor"),n.addEventListener("click",function(t){t.stopPropagation(),n.focus()}),n.addEventListener("change",function(){e.title=n.value,o.options.columnTitleChanged.call(t.table,t.getComponent())}),i.appendChild(n),e.field?o.modules.localize.bind("columns|"+e.field,function(t){n.value=t||e.title||" "}):n.value=e.title||" "}else e.field?o.modules.localize.bind("columns|"+e.field,function(o){t._formatColumnHeaderTitle(i,o||e.title||" ")}):t._formatColumnHeaderTitle(i,e.title||" ");return i},Column.prototype._formatColumnHeaderTitle=function(t,e){var o,i,n,l,s,a=this;if(this.definition.titleFormatter&&this.table.modExists("format"))switch(o=this.table.modules.format.getFormatter(this.definition.titleFormatter),s=function(t){a.titleFormatterRendered=t},l={getValue:function(){return e},getElement:function(){return t}},n=this.definition.titleFormatterParams||{},n="function"==typeof n?n():n,i=o.call(this.table.modules.format,l,n,s),void 0===i?"undefined":_typeof(i)){case"object":i instanceof Node?t.appendChild(i):(t.innerHTML="",console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",i));break;case"undefined":case"null":t.innerHTML="";break;default:t.innerHTML=i}else t.innerHTML=e},Column.prototype._buildGroupHeader=function(){var t=this;if(this.element.classList.add("tabulator-col-group"),this.element.setAttribute("role","columngroup"),this.element.setAttribute("aria-title",this.definition.title),this.definition.cssClass){this.definition.cssClass.split(" ").forEach(function(e){t.element.classList.add(e)})}(this.definition.headerContextMenu||this.definition.headerMenu)&&this.table.modExists("menu")&&this.table.modules.menu.initializeColumnHeader(this),this.element.appendChild(this.groupElement)},Column.prototype._getFlatData=function(t){return t[this.field]},Column.prototype._getNestedData=function(t){for(var e,o=t,i=this.fieldStructure,n=i.length,l=0;l-1&&this._nextVisibleColumn(t+1)},Column.prototype._nextVisibleColumn=function(t){var e=this.table.columnManager.getColumnByIndex(t);return!e||e.visible?e:this._nextVisibleColumn(t+1)},Column.prototype.prevColumn=function(){var t=this.table.columnManager.findColumnIndex(this);return t>-1&&this._prevVisibleColumn(t-1)},Column.prototype._prevVisibleColumn=function(t){var e=this.table.columnManager.getColumnByIndex(t);return!e||e.visible?e:this._prevVisibleColumn(t-1)},Column.prototype.reinitializeWidth=function(t){this.widthFixed=!1,void 0===this.definition.width||t||this.setWidth(this.definition.width),this.table.modExists("filter")&&this.table.modules.filter.hideHeaderFilterElements(),this.fitToData(),this.table.modExists("filter")&&this.table.modules.filter.showHeaderFilterElements()},Column.prototype.fitToData=function(){var t=this;this.widthFixed||(this.element.style.width="",t.cells.forEach(function(t){t.clearWidth()}));var e=this.element.offsetWidth;t.width&&this.widthFixed||(t.cells.forEach(function(t){var o=t.getWidth();o>e&&(e=o)}),e&&t.setWidthActual(e+1))},Column.prototype.updateDefinition=function(t){var e=this;return new Promise(function(o,i){var n;e.isGroup?(console.warn("Column Update Error - The updateDefinition function is only available on columns, not column groups"),i("Column Update Error - The updateDefinition function is only available on columns, not column groups")):(n=Object.assign({},e.getDefinition()),n=Object.assign(n,t),e.table.columnManager.addColumn(n,!1,e).then(function(t){n.field==e.field&&(e.field=!1),e.delete().then(function(){o(t.getComponent())}).catch(function(t){i(t)})}).catch(function(t){i(t)}))})},Column.prototype.deleteCell=function(t){var e=this.cells.indexOf(t);e>-1&&this.cells.splice(e,1)},Column.prototype.defaultOptionList=["title","field","columns","visible","align","hozAlign","vertAlign","width","minWidth","widthGrow","widthShrink","resizable","frozen","responsive","tooltip","cssClass","rowHandle","hideInHtml","print","htmlOutput","sorter","sorterParams","formatter","formatterParams","variableHeight","editable","editor","editorParams","validator","mutator","mutatorParams","mutatorData","mutatorDataParams","mutatorEdit","mutatorEditParams","mutatorClipboard","mutatorClipboardParams","accessor","accessorParams","accessorData","accessorDataParams","accessorDownload","accessorDownloadParams","accessorClipboard","accessorClipboardParams","accessorPrint","accessorPrintParams","accessorHtmlOutput","accessorHtmlOutputParams","clipboard","download","downloadTitle","topCalc","topCalcParams","topCalcFormatter","topCalcFormatterParams","bottomCalc","bottomCalcParams","bottomCalcFormatter","bottomCalcFormatterParams","cellClick","cellDblClick","cellContext","cellTap","cellDblTap","cellTapHold","cellMouseEnter","cellMouseLeave","cellMouseOver","cellMouseOut","cellMouseMove","cellEditing","cellEdited","cellEditCancelled","headerSort","headerSortStartingDir","headerSortTristate","headerClick","headerDblClick","headerContext","headerTap","headerDblTap","headerTapHold","headerTooltip","headerVertical","headerHozAlign","editableTitle","titleFormatter","titleFormatterParams","headerFilter","headerFilterPlaceholder","headerFilterParams","headerFilterEmptyCheck","headerFilterFunc","headerFilterFuncParams","headerFilterLiveFilter","print","headerContextMenu","headerMenu","contextMenu","clickMenu","formatterPrint","formatterPrintParams","formatterClipboard","formatterClipboardParams","formatterHtmlOutput","formatterHtmlOutputParams","titlePrint","titleClipboard","titleHtmlOutput","titleDownload"],Column.prototype.getComponent=function(){return this.component||(this.component=new ColumnComponent(this)),this.component};var RowManager=function(t){this.table=t,this.element=this.createHolderElement(),this.tableElement=this.createTableElement(),this.heightFixer=this.createTableElement(),this.columnManager=null,this.height=0,this.firstRender=!1,this.renderMode="virtual",this.fixedHeight=!1,this.rows=[],this.activeRows=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.scrollTop=0,this.scrollLeft=0,this.vDomRowHeight=20,this.vDomTop=0,this.vDomBottom=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomMaxRenderChain=90,this.vDomWindowBuffer=0,this.vDomWindowMinTotalRows=20,this.vDomWindowMinMarginRows=5,this.vDomTopNewRows=[],this.vDomBottomNewRows=[],this.rowNumColumn=!1,this.redrawBlock=!1,this.redrawBlockRestoreConfig=!1,this.redrawBlockRederInPosition=!1};RowManager.prototype.createHolderElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-tableHolder"),t.setAttribute("tabindex",0),t},RowManager.prototype.createTableElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-table"),t},RowManager.prototype.getElement=function(){return this.element},RowManager.prototype.getTableElement=function(){return this.tableElement},RowManager.prototype.getRowPosition=function(t,e){return e?this.activeRows.indexOf(t):this.rows.indexOf(t)},RowManager.prototype.setColumnManager=function(t){this.columnManager=t},RowManager.prototype.initialize=function(){var t=this;t.setRenderMode(),t.element.appendChild(t.tableElement),t.firstRender=!0,t.element.addEventListener("scroll",function(){var e=t.element.scrollLeft;t.scrollLeft!=e&&(t.columnManager.scrollHorizontal(e),t.table.options.groupBy&&t.table.modules.groupRows.scrollHeaders(e),t.table.modExists("columnCalcs")&&t.table.modules.columnCalcs.scrollHorizontal(e),t.table.options.scrollHorizontal(e)),t.scrollLeft=e}),"virtual"===this.renderMode&&t.element.addEventListener("scroll",function(){var e=t.element.scrollTop,o=t.scrollTop>e;t.scrollTop!=e?(t.scrollTop=e,t.scrollVertical(o),"scroll"==t.table.options.ajaxProgressiveLoad&&t.table.modules.ajax.nextPage(t.element.scrollHeight-t.element.clientHeight-e),t.table.options.scrollVertical(e)):t.scrollTop=e})},RowManager.prototype.findRow=function(t){var e=this;if("object"!=(void 0===t?"undefined":_typeof(t))){if(void 0===t||null===t)return!1;return e.rows.find(function(o){return o.data[e.table.options.index]==t})||!1}if(t instanceof Row)return t;if(t instanceof RowComponent)return t._getSelf()||!1;if("undefined"!=typeof HTMLElement&&t instanceof HTMLElement){return e.rows.find(function(e){return e.element===t})||!1}return!1},RowManager.prototype.getRowFromDataObject=function(t){return this.rows.find(function(e){return e.data===t})||!1},RowManager.prototype.getRowFromPosition=function(t,e){return e?this.activeRows[t]:this.rows[t]},RowManager.prototype.scrollToRow=function(t,e,o){var i,n=this,l=this.getDisplayRows().indexOf(t),s=t.getElement(),a=0;return new Promise(function(t,r){if(l>-1){if(void 0===e&&(e=n.table.options.scrollToRowPosition),void 0===o&&(o=n.table.options.scrollToRowIfVisible),"nearest"===e)switch(n.renderMode){case"classic":i=Tabulator.prototype.helpers.elOffset(s).top,e=Math.abs(n.element.scrollTop-i)>Math.abs(n.element.scrollTop+n.element.clientHeight-i)?"bottom":"top";break;case"virtual":e=Math.abs(n.vDomTop-l)>Math.abs(n.vDomBottom-l)?"bottom":"top"}if(!o&&Tabulator.prototype.helpers.elVisible(s)&&(a=Tabulator.prototype.helpers.elOffset(s).top-Tabulator.prototype.helpers.elOffset(n.element).top)>0&&a-1&&this.activeRows.splice(i,1),o>-1&&this.rows.splice(o,1),this.setActiveRows(this.activeRows),this.displayRowIterator(function(e){var o=e.indexOf(t);o>-1&&e.splice(o,1)}),e||this.reRenderInPosition(),this.regenerateRowNumbers(),this.table.options.rowDeleted.call(this.table,t.getComponent()),this.table.options.dataChanged&&this.table.options.dataChanged.call(this.table,this.getData()),this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.groupRows.updateGroupRows(!0):this.table.options.pagination&&this.table.modExists("page")?this.refreshActiveData(!1,!1,!0):this.table.options.pagination&&this.table.modExists("page")&&this.refreshActiveData("page")},RowManager.prototype.addRow=function(t,e,o,i){var n=this.addRowActual(t,e,o,i);return this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowAdd",n,{data:t,pos:e,index:o}),n},RowManager.prototype.addRows=function(t,e,o){var i=this,n=this,l=0,s=[];return new Promise(function(a,r){e=i.findAddRowPos(e),Array.isArray(t)||(t=[t]),l=t.length-1,(void 0===o&&e||void 0!==o&&!e)&&t.reverse(),t.forEach(function(t,i){var l=n.addRow(t,e,o,!0);s.push(l)}),i.table.options.groupBy&&i.table.modExists("groupRows")?i.table.modules.groupRows.updateGroupRows(!0):i.table.options.pagination&&i.table.modExists("page")?i.refreshActiveData(!1,!1,!0):i.reRenderInPosition(),i.table.modExists("columnCalcs")&&i.table.modules.columnCalcs.recalc(i.table.rowManager.activeRows),i.regenerateRowNumbers(),a(s)})},RowManager.prototype.findAddRowPos=function(t){return void 0===t&&(t=this.table.options.addRowPos),"pos"===t&&(t=!0),"bottom"===t&&(t=!1),t},RowManager.prototype.addRowActual=function(t,e,o,i){var n,l,s=t instanceof Row?t:new Row(t||{},this),a=this.findAddRowPos(e),r=-1;if(!o&&this.table.options.pagination&&"page"==this.table.options.paginationAddRow&&(l=this.getDisplayRows(),a?l.length?o=l[0]:this.activeRows.length&&(o=this.activeRows[this.activeRows.length-1],a=!1):l.length&&(o=l[l.length-1],a=!(l.length1&&(!o||o&&-1==u.indexOf(o)?a?u[0]!==s&&(o=u[0],this._moveRowInArray(s.getGroup().rows,s,o,!a)):u[u.length-1]!==s&&(o=u[u.length-1],this._moveRowInArray(s.getGroup().rows,s,o,!a)):this._moveRowInArray(s.getGroup().rows,s,o,!a))}return o&&(r=this.rows.indexOf(o)),o&&r>-1?(n=this.activeRows.indexOf(o),this.displayRowIterator(function(t){var e=t.indexOf(o);e>-1&&t.splice(a?e:e+1,0,s)}),n>-1&&this.activeRows.splice(a?n:n+1,0,s),this.rows.splice(a?r:r+1,0,s)):a?(this.displayRowIterator(function(t){t.unshift(s)}),this.activeRows.unshift(s),this.rows.unshift(s)):(this.displayRowIterator(function(t){t.push(s)}),this.activeRows.push(s),this.rows.push(s)),this.setActiveRows(this.activeRows),this.table.options.rowAdded.call(this.table,s.getComponent()),this.table.options.dataChanged&&this.table.options.dataChanged.call(this.table,this.getData()),i||this.reRenderInPosition(),s},RowManager.prototype.moveRow=function(t,e,o){this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowMove",t,{posFrom:this.getRowPosition(t),posTo:this.getRowPosition(e),to:e,after:o}),this.moveRowActual(t,e,o),this.regenerateRowNumbers(),this.table.options.rowMoved.call(this.table,t.getComponent())},RowManager.prototype.moveRowActual=function(t,e,o){var i=this;if(this._moveRowInArray(this.rows,t,e,o),this._moveRowInArray(this.activeRows,t,e,o),this.displayRowIterator(function(n){i._moveRowInArray(n,t,e,o)}),this.table.options.groupBy&&this.table.modExists("groupRows")){!o&&e instanceof Group&&(e=this.table.rowManager.prevDisplayRow(t)||e);var n=e.getGroup(),l=t.getGroup();n===l?this._moveRowInArray(n.rows,t,e,o):(l&&l.removeRow(t),n.insertRow(t,e,o))}},RowManager.prototype._moveRowInArray=function(t,e,o,i){var n,l,s,a;if(e!==o&&(n=t.indexOf(e),n>-1&&(t.splice(n,1),l=t.indexOf(o),l>-1?i?t.splice(l+1,0,e):t.splice(l,0,e):t.splice(n,0,e)),t===this.getDisplayRows())){s=nn?l:n+1;for(var r=s;r<=a;r++)t[r]&&this.styleRow(t[r],r)}},RowManager.prototype.clearData=function(){this.setData([])},RowManager.prototype.getRowIndex=function(t){return this.findRowIndex(t,this.rows)},RowManager.prototype.getDisplayRowIndex=function(t){var e=this.getDisplayRows().indexOf(t);return e>-1&&e},RowManager.prototype.nextDisplayRow=function(t,e){var o=this.getDisplayRowIndex(t),i=!1;return!1!==o&&o-1)&&o},RowManager.prototype.getData=function(t,e){var o=[];return this.getRows(t).forEach(function(t){"row"==t.type&&o.push(t.getData(e||"data"))}),o},RowManager.prototype.getComponents=function(t){var e=[];return this.getRows(t).forEach(function(t){e.push(t.getComponent())}),e},RowManager.prototype.getDataCount=function(t){return this.getRows(t).length},RowManager.prototype._genRemoteRequest=function(){var t=this,e=this.table,o=e.options,i={};if(e.modExists("page")){if(o.ajaxSorting){var n=this.table.modules.sort.getSort();n.forEach(function(t){delete t.column}),i[this.table.modules.page.paginationDataSentNames.sorters]=n}if(o.ajaxFiltering){var l=this.table.modules.filter.getFilters(!0,!0);i[this.table.modules.page.paginationDataSentNames.filters]=l}this.table.modules.ajax.setParams(i,!0)}e.modules.ajax.sendRequest().then(function(e){t._setDataActual(e,!0)}).catch(function(t){})},RowManager.prototype.filterRefresh=function(){var t=this.table,e=t.options,o=this.scrollLeft;e.ajaxFiltering?"remote"==e.pagination&&t.modExists("page")?(t.modules.page.reset(!0),t.modules.page.setPage(1).then(function(){}).catch(function(){})):e.ajaxProgressiveLoad?t.modules.ajax.loadData().then(function(){}).catch(function(){}):this._genRemoteRequest():this.refreshActiveData("filter"),this.scrollHorizontal(o)},RowManager.prototype.sorterRefresh=function(t){var e=this.table,o=this.table.options,i=this.scrollLeft;o.ajaxSorting?("remote"==o.pagination||o.progressiveLoad)&&e.modExists("page")?(e.modules.page.reset(!0),e.modules.page.setPage(1).then(function(){}).catch(function(){})):o.ajaxProgressiveLoad?e.modules.ajax.loadData().then(function(){}).catch(function(){}):this._genRemoteRequest():this.refreshActiveData(t?"filter":"sort"),this.scrollHorizontal(i)},RowManager.prototype.scrollHorizontal=function(t){this.scrollLeft=t,this.element.scrollLeft=t,this.table.options.groupBy&&this.table.modules.groupRows.scrollHeaders(t),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.scrollHorizontal(t)},RowManager.prototype.refreshActiveData=function(t,e,o){var i,n=this,l=this.table,s=["all","filter","sort","display","freeze","group","tree","page"];if(this.redrawBlock)return void((!this.redrawBlockRestoreConfig||s.indexOf(t)=0))break;l=a}else if(e-s[a].getElement().offsetTop>=0)n=a;else{if(i=!0,!(o-s[a].getElement().offsetTop>=0))break;l=a}}else n=this.vDomTop,l=this.vDomBottom;return s.slice(n,l+1)},RowManager.prototype.displayRowIterator=function(t){this.displayRows.forEach(t),this.displayRowsCount=this.displayRows[this.displayRows.length-1].length},RowManager.prototype.getRows=function(t){var e;switch(t){case"active":e=this.activeRows;break;case"display":e=this.table.rowManager.getDisplayRows();break;case"visible":e=this.getVisibleRows(!0);break;case"selected":e=this.table.modules.selectRow.selectedRows;break;default:e=this.rows}return e},RowManager.prototype.reRenderInPosition=function(t){if("virtual"==this.getRenderMode())if(this.redrawBlock)t?t():this.redrawBlockRederInPosition=!0;else{for(var e=this.element.scrollTop,o=!1,i=!1,n=this.scrollLeft,l=this.getDisplayRows(),s=this.vDomTop;s<=this.vDomBottom;s++)if(l[s]){var a=e-l[s].getElement().offsetTop;if(!(!1===i||Math.abs(a)this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*f),"group"!==m.type&&(h=!1),i.vDomBottom++,u++}t?(i.vDomTopPad=e?i.vDomRowHeight*this.vDomTop+o:i.scrollTop-r,i.vDomBottomPad=i.vDomBottom==i.displayRowsCount-1?0:Math.max(i.vDomScrollHeight-i.vDomTopPad-a-r,0)):(this.vDomTopPad=0,i.vDomRowHeight=Math.floor((a+r)/u),i.vDomBottomPad=i.vDomRowHeight*(i.displayRowsCount-i.vDomBottom-1),i.vDomScrollHeight=r+a+i.vDomBottomPad-i.height),n.style.paddingTop=i.vDomTopPad+"px",n.style.paddingBottom=i.vDomBottomPad+"px",e&&(this.scrollTop=i.vDomTopPad+r+o-(this.element.scrollWidth>this.element.clientWidth?this.element.offsetHeight-this.element.clientHeight:0)),this.scrollTop=Math.min(this.scrollTop,this.element.scrollHeight-this.height),this.element.scrollWidth>this.element.offsetWidth&&e&&(this.scrollTop+=this.element.offsetHeight-this.element.clientHeight),this.vDomScrollPosTop=this.scrollTop,this.vDomScrollPosBottom=this.scrollTop,l.scrollTop=this.scrollTop,n.style.minWidth=h?i.table.columnManager.getWidth()+"px":"",i.table.options.groupBy&&"fitDataFill"!=i.table.modules.layout.getMode()&&i.displayRowsCount==i.table.modules.groupRows.countGroups()&&(i.tableElement.style.minWidth=i.table.columnManager.getWidth())}else this.renderEmptyScroll();this.fixedHeight||this.adjustTableSize()},RowManager.prototype.scrollVertical=function(t){var e=this.scrollTop-this.vDomScrollPosTop,o=this.scrollTop-this.vDomScrollPosBottom,i=2*this.vDomWindowBuffer;if(-e>i||o>i){var n=this.scrollLeft;this._virtualRenderFill(Math.floor(this.element.scrollTop/this.element.scrollHeight*this.displayRowsCount)),this.scrollHorizontal(n)}else t?(e<0&&this._addTopRow(-e),o<0&&(this.vDomScrollHeight-this.scrollTop>this.vDomWindowBuffer?this._removeBottomRow(-o):this.vDomScrollPosBottom=this.scrollTop)):(e>=0&&(this.scrollTop>this.vDomWindowBuffer?this._removeTopRow(e):this.vDomScrollPosTop=this.scrollTop),o>=0&&this._addBottomRow(o))},RowManager.prototype._addTopRow=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=this.tableElement,i=this.getDisplayRows();if(this.vDomTop){var n=this.vDomTop-1,l=i[n],s=l.getHeight()||this.vDomRowHeight;t>=s&&(this.styleRow(l,n),o.insertBefore(l.getElement(),o.firstChild),l.initialized&&l.heightInitialized||(this.vDomTopNewRows.push(l),l.heightInitialized||l.clearCellHeight()),l.initialize(),this.vDomTopPad-=s,this.vDomTopPad<0&&(this.vDomTopPad=n*this.vDomRowHeight),n||(this.vDomTopPad=0),o.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop-=s,this.vDomTop--),t=-(this.scrollTop-this.vDomScrollPosTop),l.getHeight()>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*l.getHeight()),e=(i[this.vDomTop-1].getHeight()||this.vDomRowHeight)?this._addTopRow(t,e+1):this._quickNormalizeRowHeight(this.vDomTopNewRows)}},RowManager.prototype._removeTopRow=function(t){var e=this.tableElement,o=this.getDisplayRows()[this.vDomTop],i=o.getHeight()||this.vDomRowHeight;if(t>=i){var n=o.getElement();n.parentNode.removeChild(n),this.vDomTopPad+=i,e.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop+=this.vDomTop?i:i+this.vDomWindowBuffer,this.vDomTop++,t=this.scrollTop-this.vDomScrollPosTop,this._removeTopRow(t)}},RowManager.prototype._addBottomRow=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=this.tableElement,i=this.getDisplayRows();if(this.vDomBottom=s&&(this.styleRow(l,n),o.appendChild(l.getElement()),l.initialized&&l.heightInitialized||(this.vDomBottomNewRows.push(l),l.heightInitialized||l.clearCellHeight()),l.initialize(),this.vDomBottomPad-=s,(this.vDomBottomPad<0||n==this.displayRowsCount-1)&&(this.vDomBottomPad=0),o.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom+=s,this.vDomBottom++),t=this.scrollTop-this.vDomScrollPosBottom,l.getHeight()>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*l.getHeight()),e=(i[this.vDomBottom+1].getHeight()||this.vDomRowHeight)?this._addBottomRow(t,e+1):this._quickNormalizeRowHeight(this.vDomBottomNewRows)}},RowManager.prototype._removeBottomRow=function(t){var e=this.tableElement,o=this.getDisplayRows()[this.vDomBottom],i=o.getHeight()||this.vDomRowHeight;if(t>=i){var n=o.getElement();n.parentNode&&n.parentNode.removeChild(n),this.vDomBottomPad+=i,this.vDomBottomPad<0&&(this.vDomBottomPad=0),e.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom-=i,this.vDomBottom--,t=-(this.scrollTop-this.vDomScrollPosBottom),this._removeBottomRow(t) -}},RowManager.prototype._quickNormalizeRowHeight=function(t){t.forEach(function(t){t.calcHeight()}),t.forEach(function(t){t.setCellHeight()}),t.length=0},RowManager.prototype.normalizeHeight=function(){this.activeRows.forEach(function(t){t.normalizeHeight()})},RowManager.prototype.adjustTableSize=function(){var t,e=this.element.clientHeight;if("virtual"===this.renderMode){var o=Math.floor(this.columnManager.getElement().offsetHeight+(this.table.footerManager&&!this.table.footerManager.external?this.table.footerManager.getElement().offsetHeight:0));this.fixedHeight?(this.element.style.minHeight="calc(100% - "+o+"px)",this.element.style.height="calc(100% - "+o+"px)",this.element.style.maxHeight="calc(100% - "+o+"px)"):(this.element.style.height="",this.element.style.height=Math.floor(this.table.element.clientHeight)-o+"px",this.element.scrollTop=this.scrollTop),this.height=this.element.clientHeight,this.vDomWindowBuffer=this.table.options.virtualDomBuffer||this.height,this.fixedHeight||Math.floor(e)==Math.floor(this.element.clientHeight)||((t=this.table.modExists("resizeTable"))&&!this.table.modules.resizeTable.autoResize||!t)&&this.redraw()}},RowManager.prototype.reinitialize=function(){this.rows.forEach(function(t){t.reinitialize(!0)})},RowManager.prototype.blockRedraw=function(){this.redrawBlock=!0,this.redrawBlockRestoreConfig=!1},RowManager.prototype.restoreRedraw=function(){this.redrawBlock=!1,this.redrawBlockRestoreConfig?(this.refreshActiveData(this.redrawBlockRestoreConfig.stage,this.redrawBlockRestoreConfig.skipStage,this.redrawBlockRestoreConfig.renderInPosition),this.redrawBlockRestoreConfig=!1):this.redrawBlockRederInPosition&&this.reRenderInPosition(),this.redrawBlockRederInPosition=!1},RowManager.prototype.redraw=function(t){var e=this.scrollLeft;this.adjustTableSize(),this.table.tableWidth=this.table.element.clientWidth,t?this.renderTable():("classic"==this.renderMode?this.table.options.groupBy?this.refreshActiveData("group",!1,!1):this._simpleRender():(this.reRenderInPosition(),this.scrollHorizontal(e)),this.displayRowsCount||this.table.options.placeholder&&this.getElement().appendChild(this.table.options.placeholder))},RowManager.prototype.resetScroll=function(){if(this.element.scrollLeft=0,this.element.scrollTop=0,"ie"===this.table.browser){var t=document.createEvent("Event");t.initEvent("scroll",!1,!0),this.element.dispatchEvent(t)}else this.element.dispatchEvent(new Event("scroll"))};var VDomHoz=function(t){this.table=t,this.element=this.table.rowManager.tableElement,this.holderEl=this.table.rowManager.element,this.leftCol=0,this.rightCol=0,this.scrollLeft=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0,this.fitDataColAvg=0,this.window=200,this.initialized=!1,this.columns=[],this.compatabilityCheck()&&this.initialize()};VDomHoz.prototype.compatabilityCheck=function(){var t=this.table.options,e=!0;return"fitDataTable"==t.layout&&(console.warn("Horizontal Vitrual DOM is not compatible with fitDataTable layout mode"),e=!1),t.responsiveLayout&&(console.warn("Horizontal Vitrual DOM is not compatible with responsive columns"),e=!1),this.table.rtl&&(console.warn("Horizontal Vitrual DOM is not currently compatible with RTL text direction"),e=!1),t.columns&&t.columns.find(function(t){return t.frozen})&&(console.warn("Horizontal Vitrual DOM is not compatible with frozen columns"),e=!1),e||(t.virtualDomHoz=!1),e},VDomHoz.prototype.initialize=function(){var t=this;this.holderEl.addEventListener("scroll",function(){var e=t.holderEl.scrollLeft;t.scrollLeft!=e&&(t.scrollLeft=e,t.scroll(e-(t.vDomScrollPosLeft+t.window)))})},VDomHoz.prototype.deinitialize=function(){this.initialized=!1},VDomHoz.prototype.clear=function(){this.columns=[],this.leftCol=-1,this.rightCol=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0},VDomHoz.prototype.dataChange=function(){var t,e,o,i=!1,n=0,l=0;if("fitData"===this.table.options.layout){if(this.table.columnManager.columnsByIndex.forEach(function(t){!t.definition.width&&t.visible&&(i=!0)}),i&&i&&this.table.rowManager.getDisplayRows().length&&(this.vDomScrollPosRight=this.scrollLeft+this.holderEl.clientWidth+this.window,this.table.options.groupBy?(t=this.table.modules.groupRows.getGroups(!1)[0],e=t.getRows(!1)[0]):e=this.table.rowManager.getDisplayRows()[0],e)){o=e.getElement(),e.generateCells(),this.element.appendChild(o);for(var l=0;lthis.vDomScrollPosRight)break}for(o.parentNode.removeChild(o),this.fitDataColAvg=Math.floor(n/(l+1)),l;lo.vDomScrollPosLeft&&n.8*this.holderEl.clientWidth?this.reinitialize():t>0?(this.addColRight(),this.removeColLeft()):(this.addColLeft(),this.removeColRight())},VDomHoz.prototype.colPositionAdjust=function(t,e,o){for(var i=t;i=this.columns.length-1?this.vDomPadRight=0:this.vDomPadRight-=i.getWidth(),this.element.style.paddingRight=this.vDomPadRight+"px",this.addColRight())},VDomHoz.prototype.addColLeft=function(){var t=this.columns[this.leftCol-1];if(t&&t.modules.vdomHoz.rightPos>=this.vDomScrollPosLeft){this.table.rowManager.getVisibleRows().forEach(function(e){if("group"!==e.type){var o=e.getCell(t);e.getElement().prepend(o.getElement()),o.cellRendered()}}),this.leftCol?this.vDomPadLeft-=t.getWidth():this.vDomPadLeft=0,this.element.style.paddingLeft=this.vDomPadLeft+"px",this.leftCol--,this.addColLeft()}},VDomHoz.prototype.removeColRight=function(t){var e,t=this.columns[this.rightCol];t&&t.modules.vdomHoz.leftPos>this.vDomScrollPosRight&&(e=this.table.rowManager.getVisibleRows(),t.modules.vdomHoz.visible=!1,e.forEach(function(e){if("group"!==e.type){var o=e.getCell(t);e.getElement().removeChild(o.getElement())}}),this.vDomPadRight+=t.getWidth(),this.element.style.paddingRight=this.vDomPadRight+"px",this.rightCol--,this.removeColRight())},VDomHoz.prototype.removeColLeft=function(){var t,e=this.columns[this.leftCol];e&&e.modules.vdomHoz.rightPos-1}return!1},RowComponent.prototype.treeCollapse=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.collapseRow(this._row)},RowComponent.prototype.treeExpand=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.expandRow(this._row)},RowComponent.prototype.treeToggle=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.toggleRow(this._row)},RowComponent.prototype.getTreeParent=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeParent(this._row)},RowComponent.prototype.getTreeChildren=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeChildren(this._row,!0)},RowComponent.prototype.addTreeChild=function(t,e,o){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.addTreeChildRow(this._row,t,e,o)},RowComponent.prototype.reformat=function(){return this._row.reinitialize()},RowComponent.prototype.getGroup=function(){return this._row.getGroup().getComponent()},RowComponent.prototype.getTable=function(){return this._row.table},RowComponent.prototype.getNextRow=function(){var t=this._row.nextRow();return t?t.getComponent():t},RowComponent.prototype.getPrevRow=function(){var t=this._row.prevRow();return t?t.getComponent():t};var Row=function(t,e){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"row";this.table=e.table,this.parent=e,this.data={},this.type=o,this.element=this.createElement(),this.modules={},this.cells=[],this.height=0,this.heightStyled="",this.manualHeight=!1,this.outerHeight=0,this.initialized=!1,this.heightInitialized=!1,this.component=null,this.setData(t),this.generateElement()};Row.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-row"),t.setAttribute("role","row"),t},Row.prototype.getElement=function(){return this.element},Row.prototype.detachElement=function(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)},Row.prototype.generateElement=function(){var t,e,o,i=this;!1!==i.table.options.selectable&&i.table.modExists("selectRow")&&i.table.modules.selectRow.initializeRow(this),!1!==i.table.options.movableRows&&i.table.modExists("moveRow")&&i.table.modules.moveRow.initializeRow(this),!1!==i.table.options.dataTree&&i.table.modExists("dataTree")&&i.table.modules.dataTree.initializeRow(this),"collapse"===i.table.options.responsiveLayout&&i.table.modExists("responsiveLayout")&&i.table.modules.responsiveLayout.initializeRow(this),(i.table.options.rowContextMenu||i.table.options.rowClickMenu)&&this.table.modExists("menu")&&i.table.modules.menu.initializeRow(this),i.table.options.rowClick&&i.element.addEventListener("click",function(t){i.table.options.rowClick(t,i.getComponent())}),i.table.options.rowDblClick&&i.element.addEventListener("dblclick",function(t){i.table.options.rowDblClick(t,i.getComponent())}),i.table.options.rowContext&&i.element.addEventListener("contextmenu",function(t){i.table.options.rowContext(t,i.getComponent())}),i.table.options.rowMouseEnter&&i.element.addEventListener("mouseenter",function(t){i.table.options.rowMouseEnter(t,i.getComponent())}),i.table.options.rowMouseLeave&&i.element.addEventListener("mouseleave",function(t){i.table.options.rowMouseLeave(t,i.getComponent())}),i.table.options.rowMouseOver&&i.element.addEventListener("mouseover",function(t){i.table.options.rowMouseOver(t,i.getComponent())}),i.table.options.rowMouseOut&&i.element.addEventListener("mouseout",function(t){i.table.options.rowMouseOut(t,i.getComponent())}),i.table.options.rowMouseMove&&i.element.addEventListener("mousemove",function(t){i.table.options.rowMouseMove(t,i.getComponent())}),i.table.options.rowTap&&(o=!1,i.element.addEventListener("touchstart",function(t){o=!0},{passive:!0}),i.element.addEventListener("touchend",function(t){o&&i.table.options.rowTap(t,i.getComponent()),o=!1})),i.table.options.rowDblTap&&(t=null,i.element.addEventListener("touchend",function(e){t?(clearTimeout(t),t=null,i.table.options.rowDblTap(e,i.getComponent())):t=setTimeout(function(){clearTimeout(t),t=null},300)})),i.table.options.rowTapHold&&(e=null,i.element.addEventListener("touchstart",function(t){clearTimeout(e),e=setTimeout(function(){clearTimeout(e),e=null,o=!1,i.table.options.rowTapHold(t,i.getComponent())},1e3)},{passive:!0}),i.element.addEventListener("touchend",function(t){clearTimeout(e),e=null}))},Row.prototype.generateCells=function(){this.cells=this.table.columnManager.generateCells(this)},Row.prototype.initialize=function(t){var e=this;if(!this.initialized||t){for(this.deleteCells();this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layoutRow(this),this.generateCells(),this.table.options.virtualDomHoz&&this.table.vdomHoz.initialized?this.table.vdomHoz.initializeRow(this):this.cells.forEach(function(t){e.element.appendChild(t.getElement()),t.cellRendered()}),t&&this.normalizeHeight(),this.table.options.dataTree&&this.table.modExists("dataTree")&&this.table.modules.dataTree.layoutRow(this),"collapse"===this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout")&&this.table.modules.responsiveLayout.layoutRow(this),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent()),this.table.options.resizableRows&&this.table.modExists("resizeRows")&&this.table.modules.resizeRows.initializeRow(this),this.initialized=!0}else this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitializeRow(this)},Row.prototype.reinitializeHeight=function(){this.heightInitialized=!1,null!==this.element.offsetParent&&this.normalizeHeight(!0)},Row.prototype.reinitialize=function(t){this.initialized=!1,this.heightInitialized=!1,this.manualHeight||(this.height=0,this.heightStyled=""),null!==this.element.offsetParent&&this.initialize(!0),this.table.options.dataTree&&this.table.modExists("dataTree",!0)&&this.table.modules.dataTree.getTreeChildren(this,!1,!0).forEach(function(t){t.reinitialize(!0)})},Row.prototype.calcHeight=function(t){var e=0,o=this.table.options.resizableRows?this.element.clientHeight:0;this.cells.forEach(function(t){var o=t.getHeight();o>e&&(e=o)}),this.height=t?Math.max(e,o):this.manualHeight?this.height:Math.max(e,o),this.heightStyled=this.height?this.height+"px":"",this.outerHeight=this.element.offsetHeight},Row.prototype.setCellHeight=function(){this.cells.forEach(function(t){t.setHeight()}),this.heightInitialized=!0},Row.prototype.clearCellHeight=function(){this.cells.forEach(function(t){t.clearHeight()})},Row.prototype.normalizeHeight=function(t){t&&this.clearCellHeight(),this.calcHeight(t),this.setCellHeight()},Row.prototype.setHeight=function(t,e){(this.height!=t||e)&&(this.manualHeight=!0,this.height=t,this.heightStyled=t?t+"px":"",this.setCellHeight(),this.outerHeight=this.element.offsetHeight)},Row.prototype.getHeight=function(){return this.outerHeight},Row.prototype.getWidth=function(){return this.element.offsetWidth},Row.prototype.deleteCell=function(t){var e=this.cells.indexOf(t);e>-1&&this.cells.splice(e,1)},Row.prototype.setData=function(t){this.table.modExists("mutator")&&(t=this.table.modules.mutator.transformRow(t,"data")),this.data=t,this.table.options.reactiveData&&this.table.modExists("reactiveData",!0)&&this.table.modules.reactiveData.watchRow(this)},Row.prototype.updateData=function(t){var e,o=this,i=Tabulator.prototype.helpers.elVisible(this.element),n={};return new Promise(function(l,s){"string"==typeof t&&(t=JSON.parse(t)),o.table.options.reactiveData&&o.table.modExists("reactiveData",!0)&&o.table.modules.reactiveData.block(),o.table.modExists("mutator")?(n=Object.assign(n,o.data),n=Object.assign(n,t),e=o.table.modules.mutator.transformRow(n,"data",t)):e=t;for(var a in e)o.data[a]=e[a];o.table.options.reactiveData&&o.table.modExists("reactiveData",!0)&&o.table.modules.reactiveData.unblock();for(var a in t){o.table.columnManager.getColumnsByFieldRoot(a).forEach(function(t){var n=o.getCell(t.getField());if(n){var l=t.getFieldValue(e);n.getValue()!=l&&(n.setValueProcessData(l),i&&n.cellRendered())}})}o.table.options.groupUpdateOnCellEdit&&o.table.options.groupBy&&o.table.modExists("groupRows")&&o.table.modules.groupRows.reassignRowToGroup(o.row),i?(o.normalizeHeight(!0),o.table.options.rowFormatter&&o.table.options.rowFormatter(o.getComponent())):(o.initialized=!1,o.height=0,o.heightStyled=""),!1!==o.table.options.dataTree&&o.table.modExists("dataTree")&&o.table.modules.dataTree.redrawNeeded(t)&&(o.table.modules.dataTree.initializeRow(o),i&&(o.table.modules.dataTree.layoutRow(o),o.table.rowManager.refreshActiveData("tree",!1,!0))),o.table.options.rowUpdated.call(o.table,o.getComponent()),o.table.options.dataChanged&&o.table.options.dataChanged.call(o.table,o.table.rowManager.getData()),l()})},Row.prototype.getData=function(t){return t&&this.table.modExists("accessor")?this.table.modules.accessor.transformRow(this,t):this.data},Row.prototype.getCell=function(t){return t=this.table.columnManager.findColumn(t),this.cells.find(function(e){return e.column===t})},Row.prototype.getCellIndex=function(t){return this.cells.findIndex(function(e){return e===t})},Row.prototype.findNextEditableCell=function(t){var e=!1;if(t0)for(var o=t-1;o>=0;o--){var i=this.cells[o],n=!0;if(i.column.modules.edit&&Tabulator.prototype.helpers.elVisible(i.getElement())&&("function"==typeof i.column.modules.edit.check&&(n=i.column.modules.edit.check(i.getComponent())),n)){e=i;break}}return e},Row.prototype.getCells=function(){return this.cells},Row.prototype.nextRow=function(){return this.table.rowManager.nextDisplayRow(this,!0)||!1},Row.prototype.prevRow=function(){return this.table.rowManager.prevDisplayRow(this,!0)||!1},Row.prototype.moveToRow=function(t,e){var o=this.table.rowManager.findRow(t);o?(this.table.rowManager.moveRowActual(this,o,!e),this.table.rowManager.refreshActiveData("display",!1,!0)):console.warn("Move Error - No matching row found:",t)},Row.prototype.validate=function(){var t=[];return this.cells.forEach(function(e){e.validate()||t.push(e.getComponent())}),!t.length||t},Row.prototype.delete=function(){var t=this;return new Promise(function(e,o){var i,n;t.table.options.history&&t.table.modExists("history")&&(t.table.options.groupBy&&t.table.modExists("groupRows")?(n=t.getGroup().rows,(i=n.indexOf(t))&&(i=n[i-1])):(i=t.table.rowManager.getRowIndex(t))&&(i=t.table.rowManager.rows[i-1]),t.table.modules.history.action("rowDelete",t,{data:t.getData(),pos:!i,index:i})),t.deleteActual(),e()})},Row.prototype.deleteActual=function(t){this.table.rowManager.getRowIndex(this);this.detatchModules(),this.table.options.reactiveData&&this.table.modExists("reactiveData",!0),this.modules.group&&this.modules.group.removeRow(this),this.table.rowManager.deleteRow(this,t),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.element=!1,this.table.options.dataTree&&this.table.modExists("dataTree",!0)&&this.table.modules.dataTree.rowDelete(this),this.table.modExists("columnCalcs")&&(this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.columnCalcs.recalcRowGroup(this):this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows))},Row.prototype.detatchModules=function(){this.table.modExists("selectRow")&&this.table.modules.selectRow._deselectRow(this,!0),this.table.modExists("edit")&&this.table.modules.edit.currentCell.row===this&&this.table.modules.edit.cancelEdit(),this.table.modExists("frozenRows")&&this.table.modules.frozenRows.detachRow(this)},Row.prototype.deleteCells=function(){for(var t=this.cells.length,e=0;e",footerElement:!1,index:"id",textDirection:"auto",keybindings:[],tabEndNewRow:!1,invalidOptionWarnings:!0,clipboard:!1,clipboardCopyStyled:!0,clipboardCopyConfig:!1,clipboardCopyFormatter:!1,clipboardCopyRowRange:"active",clipboardPasteParser:"table",clipboardPasteAction:"insert",clipboardCopied:function(){},clipboardPasted:function(){},clipboardPasteError:function(){},downloadDataFormatter:!1,downloadReady:function(t,e){return e},downloadComplete:!1,downloadConfig:{},downloadRowRange:"active",dataTree:!1,dataTreeFilter:!0,dataTreeSort:!0,dataTreeElementColumn:!1,dataTreeBranchElement:!0,dataTreeChildIndent:9,dataTreeChildField:"_children",dataTreeCollapseElement:!1,dataTreeExpandElement:!1,dataTreeStartExpanded:!1,dataTreeRowExpanded:function(){},dataTreeRowCollapsed:function(){},dataTreeChildColumnCalcs:!1,dataTreeSelectPropagate:!1,printAsHtml:!1,printFormatter:!1,printHeader:!1,printFooter:!1,printCopyStyle:!0,printStyled:!0,printVisibleRows:!0,printRowRange:"visible",printConfig:{},addRowPos:"bottom",selectable:"highlight",selectableRangeMode:"drag",selectableRollingSelection:!0,selectablePersistence:!0,selectableCheck:function(t,e){return!0},headerFilterLiveFilterDelay:300,headerFilterPlaceholder:!1,headerVisible:!0,history:!1,locale:!1,langs:{},virtualDom:!0,virtualDomBuffer:0,virtualDomHoz:!1,persistentLayout:!1,persistentSort:!1,persistentFilter:!1,persistenceID:"",persistenceMode:!0,persistenceReaderFunc:!1,persistenceWriterFunc:!1,persistence:!1,responsiveLayout:!1,responsiveLayoutCollapseStartOpen:!0,responsiveLayoutCollapseUseFormatters:!0,responsiveLayoutCollapseFormatter:!1,pagination:!1,paginationSize:!1,paginationInitialPage:1,paginationButtonCount:5,paginationSizeSelector:!1,paginationElement:!1,paginationDataSent:{},paginationDataReceived:{},paginationAddRow:"page",ajaxURL:!1,ajaxURLGenerator:!1,ajaxParams:{},ajaxConfig:"get",ajaxContentType:"form",ajaxRequestFunc:!1,ajaxLoader:!0,ajaxLoaderLoading:!1,ajaxLoaderError:!1,ajaxFiltering:!1,ajaxSorting:!1,ajaxProgressiveLoad:!1,ajaxProgressiveLoadDelay:0,ajaxProgressiveLoadScrollMargin:0,groupBy:!1,groupStartOpen:!0,groupValues:!1,groupUpdateOnCellEdit:!1,groupHeader:!1,groupHeaderPrint:null,groupHeaderClipboard:null,groupHeaderHtmlOutput:null,groupHeaderDownload:null,htmlOutputConfig:!1,movableColumns:!1,movableRows:!1,movableRowsConnectedTables:!1,movableRowsConnectedElements:!1,movableRowsSender:!1,movableRowsReceiver:"insert",movableRowsSendingStart:function(){},movableRowsSent:function(){},movableRowsSentFailed:function(){},movableRowsSendingStop:function(){},movableRowsReceivingStart:function(){},movableRowsReceived:function(){},movableRowsReceivedFailed:function(){},movableRowsReceivingStop:function(){},movableRowsElementDrop:function(){},scrollToRowPosition:"top",scrollToRowIfVisible:!0,scrollToColumnPosition:"left",scrollToColumnIfVisible:!0,rowFormatter:!1,rowFormatterPrint:null,rowFormatterClipboard:null,rowFormatterHtmlOutput:null,placeholder:!1,tableBuilding:function(){},tableBuilt:function(){},renderStarted:function(){},renderComplete:function(){},rowClick:!1,rowDblClick:!1,rowContext:!1,rowTap:!1,rowDblTap:!1,rowTapHold:!1,rowMouseEnter:!1,rowMouseLeave:!1,rowMouseOver:!1,rowMouseOut:!1,rowMouseMove:!1,rowContextMenu:!1,rowClickMenu:!1,rowAdded:function(){},rowDeleted:function(){},rowMoved:function(){},rowUpdated:function(){},rowSelectionChanged:function(){},rowSelected:function(){},rowDeselected:function(){},rowResized:function(){},cellClick:!1,cellDblClick:!1,cellContext:!1,cellTap:!1,cellDblTap:!1,cellTapHold:!1,cellMouseEnter:!1,cellMouseLeave:!1,cellMouseOver:!1,cellMouseOut:!1,cellMouseMove:!1,cellEditing:function(){},cellEdited:function(){},cellEditCancelled:function(){},columnMoved:!1,columnResized:function(){},columnTitleChanged:function(){},columnVisibilityChanged:function(){},htmlImporting:function(){},htmlImported:function(){},dataLoading:function(){},dataLoaded:function(){},dataEdited:!1,dataChanged:!1,ajaxRequesting:function(){},ajaxResponse:!1,ajaxError:function(){},dataFiltering:!1,dataFiltered:!1,dataSorting:function(){},dataSorted:function(){},groupToggleElement:"arrow",groupClosedShowCalcs:!1,dataGrouping:function(){},dataGrouped:!1,groupVisibilityChanged:function(){},groupClick:!1,groupDblClick:!1,groupContext:!1,groupContextMenu:!1,groupClickMenu:!1,groupTap:!1,groupDblTap:!1,groupTapHold:!1,columnCalcs:!0,pageLoaded:function(){},localized:function(){},validationMode:"blocking",validationFailed:function(){},historyUndo:function(){},historyRedo:function(){},scrollHorizontal:function(){},scrollVertical:function(){}},Tabulator.prototype.initializeOptions=function(t){if(!1!==t.invalidOptionWarnings)for(var e in t)void 0===this.defaultOptions[e]&&console.warn("Invalid table constructor option:",e);for(var e in this.defaultOptions)e in t?this.options[e]=t[e]:Array.isArray(this.defaultOptions[e])?this.options[e]=Object.assign([],this.defaultOptions[e]):"object"===_typeof(this.defaultOptions[e])&&null!==this.defaultOptions[e]?this.options[e]=Object.assign({},this.defaultOptions[e]):this.options[e]=this.defaultOptions[e]},Tabulator.prototype.initializeElement=function(t){return"undefined"!=typeof HTMLElement&&t instanceof HTMLElement?(this.element=t,!0):"string"==typeof t?(this.element=document.querySelector(t),!!this.element||(console.error("Tabulator Creation Error - no element found matching selector: ",t),!1)):(console.error("Tabulator Creation Error - Invalid element provided:",t),!1)},Tabulator.prototype.rtlCheck=function(){var t=window.getComputedStyle(this.element);switch(this.options.textDirection){case"auto":if("rtl"!==t.direction)break;case"rtl":this.element.classList.add("tabulator-rtl"),this.rtl=!0;break;case"ltr":this.element.classList.add("tabulator-ltr");default:this.rtl=!1}},Tabulator.prototype._mapDepricatedFunctionality=function(){(this.options.persistentLayout||this.options.persistentSort||this.options.persistentFilter)&&(this.options.persistence||(this.options.persistence={})),this.options.dataEdited&&(console.warn("DEPRECATION WARNING - dataEdited option has been deprecated, please use the dataChanged option instead"),this.options.dataChanged=this.options.dataEdited),this.options.downloadDataFormatter&&console.warn("DEPRECATION WARNING - downloadDataFormatter option has been deprecated"),void 0!==this.options.clipboardCopyHeader&&(this.options.columnHeaders=this.options.clipboardCopyHeader,console.warn("DEPRECATION WARNING - clipboardCopyHeader option has been deprecated, please use the columnHeaders property on the clipboardCopyConfig option")),!0!==this.options.printVisibleRows&&(console.warn("printVisibleRows option is deprecated, you should now use the printRowRange option"),this.options.persistence.printRowRange="active"),!0!==this.options.printCopyStyle&&(console.warn("printCopyStyle option is deprecated, you should now use the printStyled option"),this.options.persistence.printStyled=this.options.printCopyStyle),this.options.persistentLayout&&(console.warn("persistentLayout option is deprecated, you should now use the persistence option"),!0!==this.options.persistence&&void 0===this.options.persistence.columns&&(this.options.persistence.columns=!0)),this.options.persistentSort&&(console.warn("persistentSort option is deprecated, you should now use the persistence option"),!0!==this.options.persistence&&void 0===this.options.persistence.sort&&(this.options.persistence.sort=!0)),this.options.persistentFilter&&(console.warn("persistentFilter option is deprecated, you should now use the persistence option"),!0!==this.options.persistence&&void 0===this.options.persistence.filter&&(this.options.persistence.filter=!0)),this.options.columnVertAlign&&(console.warn("columnVertAlign option is deprecated, you should now use the columnHeaderVertAlign option"),this.options.columnHeaderVertAlign=this.options.columnVertAlign)},Tabulator.prototype._clearSelection=function(){this.element.classList.add("tabulator-block-select"),window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty(),this.element.classList.remove("tabulator-block-select")},Tabulator.prototype._create=function(){this._clearObjectPointers(),this._mapDepricatedFunctionality(),this.bindModules(),this.rtlCheck(),"TABLE"===this.element.tagName&&this.modExists("htmlTableImport",!0)&&this.modules.htmlTableImport.parseTable(),this.columnManager=new ColumnManager(this),this.rowManager=new RowManager(this),this.footerManager=new FooterManager(this),this.columnManager.setRowManager(this.rowManager),this.rowManager.setColumnManager(this.columnManager),this.options.virtualDomHoz&&(this.vdomHoz=new VDomHoz(this)),this._buildElement(),this._loadInitialData()},Tabulator.prototype._clearObjectPointers=function(){this.options.columns=this.options.columns.slice(0),this.options.reactiveData||(this.options.data=this.options.data.slice(0))},Tabulator.prototype._buildElement=function(){var t=this,e=this.element,o=this.modules,i=this.options;for(i.tableBuilding.call(this),e.classList.add("tabulator"),e.setAttribute("role","grid");e.firstChild;)e.removeChild(e.firstChild);i.height&&(i.height=isNaN(i.height)?i.height:i.height+"px",e.style.height=i.height),!1!==i.minHeight&&(i.minHeight=isNaN(i.minHeight)?i.minHeight:i.minHeight+"px",e.style.minHeight=i.minHeight),!1!==i.maxHeight&&(i.maxHeight=isNaN(i.maxHeight)?i.maxHeight:i.maxHeight+"px",e.style.maxHeight=i.maxHeight),this.columnManager.initialize(),this.rowManager.initialize(),this._detectBrowser(),this.modExists("layout",!0)&&o.layout.initialize(i.layout),o.localize.initialize(),!1!==i.headerFilterPlaceholder&&o.localize.setHeaderFilterPlaceholder(i.headerFilterPlaceholder);for(var n in i.langs)o.localize.installLang(n,i.langs[n]);if(o.localize.setLocale(i.locale),"string"==typeof i.placeholder){var l=document.createElement("div");l.classList.add("tabulator-placeholder");var s=document.createElement("span");s.innerHTML=i.placeholder,l.appendChild(s),i.placeholder=l}if(e.appendChild(this.columnManager.getElement()),e.appendChild(this.rowManager.getElement()),i.footerElement&&this.footerManager.activate(),i.persistence&&this.modExists("persistence",!0)&&o.persistence.initialize(),i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.columns&&(i.columns=o.persistence.load("columns",i.columns)),i.movableRows&&this.modExists("moveRow")&&o.moveRow.initialize(),i.autoColumns&&this.options.data&&this.columnManager.generateColumnsFromRowData(this.options.data),this.modExists("columnCalcs")&&o.columnCalcs.initialize(),this.columnManager.setColumns(i.columns),i.dataTree&&this.modExists("dataTree",!0)&&o.dataTree.initialize(),this.modExists("frozenRows")&&this.modules.frozenRows.initialize(),(i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.sort||i.initialSort)&&this.modExists("sort",!0)){var a=[];i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.sort?!1===(a=o.persistence.load("sort"))&&i.initialSort&&(a=i.initialSort):i.initialSort&&(a=i.initialSort),o.sort.setSort(a)}if((i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.filter||i.initialFilter)&&this.modExists("filter",!0)){var r=[];i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.filter?!1===(r=o.persistence.load("filter"))&&i.initialFilter&&(r=i.initialFilter):i.initialFilter&&(r=i.initialFilter),o.filter.setFilter(r)}i.initialHeaderFilter&&this.modExists("filter",!0)&&i.initialHeaderFilter.forEach(function(e){var i=t.columnManager.findColumn(e.field);if(!i)return console.warn("Column Filter Error - No matching column found:",e.field),!1;o.filter.setHeaderFilterValue(i,e.value)}),this.modExists("ajax")&&o.ajax.initialize(),i.pagination&&this.modExists("page",!0)&&o.page.initialize(),i.groupBy&&this.modExists("groupRows",!0)&&o.groupRows.initialize(),this.modExists("keybindings")&&o.keybindings.initialize(),this.modExists("selectRow")&&o.selectRow.clearSelectionData(!0),i.autoResize&&this.modExists("resizeTable")&&o.resizeTable.initialize(),this.modExists("clipboard")&&o.clipboard.initialize(),i.printAsHtml&&this.modExists("print")&&o.print.initialize(),i.tableBuilt.call(this)},Tabulator.prototype._loadInitialData=function(){var t=this;if(t.options.pagination&&t.modExists("page"))if(t.modules.page.reset(!0,!0),"local"==t.options.pagination){if(t.options.data.length)t.rowManager.setData(t.options.data,!1,!0);else{if((t.options.ajaxURL||t.options.ajaxURLGenerator)&&t.modExists("ajax"))return void t.modules.ajax.loadData(!1,!0).then(function(){}).catch(function(){t.options.paginationInitialPage&&t.modules.page.setPage(t.options.paginationInitialPage)});t.rowManager.setData(t.options.data,!1,!0)}t.options.paginationInitialPage&&t.modules.page.setPage(t.options.paginationInitialPage)}else t.options.ajaxURL?t.modules.page.setPage(t.options.paginationInitialPage).then(function(){}).catch(function(){}):t.rowManager.setData([],!1,!0);else t.options.data.length?t.rowManager.setData(t.options.data):(t.options.ajaxURL||t.options.ajaxURLGenerator)&&t.modExists("ajax")?t.modules.ajax.loadData(!1,!0).then(function(){}).catch(function(){}):t.rowManager.setData(t.options.data,!1,!0)},Tabulator.prototype.destroy=function(){var t=this.element;for(Tabulator.prototype.comms.deregister(this),this.options.reactiveData&&this.modExists("reactiveData",!0)&&this.modules.reactiveData.unwatchData(),this.rowManager.rows.forEach(function(t){t.wipe()}),this.rowManager.rows=[],this.rowManager.activeRows=[],this.rowManager.displayRows=[],this.options.autoResize&&this.modExists("resizeTable")&&this.modules.resizeTable.clearBindings(),this.modExists("keybindings")&&this.modules.keybindings.clearBindings();t.firstChild;)t.removeChild(t.firstChild);t.classList.remove("tabulator")},Tabulator.prototype._detectBrowser=function(){var t=navigator.userAgent||navigator.vendor||window.opera;t.indexOf("Trident")>-1?(this.browser="ie",this.browserSlow=!0):t.indexOf("Edge")>-1?(this.browser="edge",this.browserSlow=!0):t.indexOf("Firefox")>-1?(this.browser="firefox",this.browserSlow=!1):(this.browser="other",this.browserSlow=!1),this.browserMobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4))},Tabulator.prototype.blockRedraw=function(){return this.rowManager.blockRedraw()},Tabulator.prototype.restoreRedraw=function(){return this.rowManager.restoreRedraw()},Tabulator.prototype.setDataFromLocalFile=function(t){var e=this;return new Promise(function(o,i){var n=document.createElement("input");n.type="file",n.accept=t||".json,application/json",n.addEventListener("change",function(t){var l,s=n.files[0],a=new FileReader;a.readAsText(s),a.onload=function(t){try{l=JSON.parse(a.result)}catch(t){return console.warn("File Load Error - File contents is invalid JSON",t),void i(t)}e.setData(l).then(function(t){o(t)}).catch(function(t){o(t)})},a.onerror=function(t){console.warn("File Load Error - Unable to read file"),i()}}),n.click()})},Tabulator.prototype.setData=function(t,e,o){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(t,e,o,!1,!0)},Tabulator.prototype._setData=function(t,e,o,i,n){var l=this;return"string"!=typeof t?t?l.rowManager.setData(t,i,n):l.modExists("ajax")&&(l.modules.ajax.getUrl||l.options.ajaxURLGenerator)?"remote"==l.options.pagination&&l.modExists("page",!0)?(l.modules.page.reset(!0,!0),l.modules.page.setPage(1)):l.modules.ajax.loadData(i,n):l.rowManager.setData([],i,n):0==t.indexOf("{")||0==t.indexOf("[")?l.rowManager.setData(JSON.parse(t),i,n):l.modExists("ajax",!0)?(e&&l.modules.ajax.setParams(e),o&&l.modules.ajax.setConfig(o),l.modules.ajax.setUrl(t),"remote"==l.options.pagination&&l.modExists("page",!0)?(l.modules.page.reset(!0,!0),l.modules.page.setPage(1)):l.modules.ajax.loadData(i,n)):void 0},Tabulator.prototype.clearData=function(){this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this.rowManager.clearData()},Tabulator.prototype.getData=function(t){return!0===t&&(console.warn("passing a boolean to the getData function is deprecated, you should now pass the string 'active'"),t="active"),this.rowManager.getData(t)},Tabulator.prototype.getDataCount=function(t){return!0===t&&(console.warn("passing a boolean to the getDataCount function is deprecated, you should now pass the string 'active'"),t="active"),this.rowManager.getDataCount(t)},Tabulator.prototype.searchRows=function(t,e,o){if(this.modExists("filter",!0))return this.modules.filter.search("rows",t,e,o)},Tabulator.prototype.searchData=function(t,e,o){if(this.modExists("filter",!0))return this.modules.filter.search("data",t,e,o)},Tabulator.prototype.getHtml=function(t,e,o){if(this.modExists("export",!0))return this.modules.export.getHtml(t,e,o)},Tabulator.prototype.print=function(t,e,o){if(this.modExists("print",!0))return this.modules.print.printFullscreen(t,e,o)},Tabulator.prototype.getAjaxUrl=function(){if(this.modExists("ajax",!0))return this.modules.ajax.getUrl()},Tabulator.prototype.replaceData=function(t,e,o){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(t,e,o,!0)},Tabulator.prototype.updateData=function(t){var e=this,o=this,i=0;return new Promise(function(n,l){e.modExists("ajax")&&e.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?t.forEach(function(t){var e=o.rowManager.findRow(t[o.options.index]);e&&(i++,e.updateData(t).then(function(){--i||n()}))}):(console.warn("Update Error - No data provided"),l("Update Error - No data provided"))})},Tabulator.prototype.addData=function(t,e,o){var i=this;return new Promise(function(n,l){i.modExists("ajax")&&i.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?i.rowManager.addRows(t,e,o).then(function(t){var e=[];t.forEach(function(t){e.push(t.getComponent())}),n(e)}):(console.warn("Update Error - No data provided"),l("Update Error - No data provided"))})},Tabulator.prototype.updateOrAddData=function(t){var e=this,o=this,i=[],n=0;return new Promise(function(l,s){e.modExists("ajax")&&e.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?t.forEach(function(t){var e=o.rowManager.findRow(t[o.options.index]);n++,e?e.updateData(t).then(function(){n--,i.push(e.getComponent()),n||l(i)}):o.rowManager.addRows(t).then(function(t){n--,i.push(t[0].getComponent()),n||l(i)})}):(console.warn("Update Error - No data provided"),s("Update Error - No data provided"))})},Tabulator.prototype.getRow=function(t){var e=this.rowManager.findRow(t);return e?e.getComponent():(console.warn("Find Error - No matching row found:",t),!1)},Tabulator.prototype.getRowFromPosition=function(t,e){var o=this.rowManager.getRowFromPosition(t,e);return o?o.getComponent():(console.warn("Find Error - No matching row found:",t),!1)},Tabulator.prototype.deleteRow=function(t){var e=this;return new Promise(function(o,i){function n(){++s==t.length&&a&&(l.rowManager.reRenderInPosition(),o())}var l=e,s=0,a=0,r=[];Array.isArray(t)||(t=[t]),t.forEach(function(t){var o=e.rowManager.findRow(t,!0);o?r.push(o):(console.warn("Delete Error - No matching row found:",t),i("Delete Error - No matching row found"),n())}),r.sort(function(t,o){return e.rowManager.rows.indexOf(t)>e.rowManager.rows.indexOf(o)?1:-1}),r.forEach(function(t){t.delete().then(function(){a++,n()}).catch(function(t){n(),i(t)})})})},Tabulator.prototype.addRow=function(t,e,o){var i=this;return new Promise(function(n,l){"string"==typeof t&&(t=JSON.parse(t)),i.rowManager.addRows(t,e,o).then(function(t){i.modExists("columnCalcs")&&i.modules.columnCalcs.recalc(i.rowManager.activeRows),n(t[0].getComponent())})})},Tabulator.prototype.updateOrAddRow=function(t,e){var o=this;return new Promise(function(i,n){var l=o.rowManager.findRow(t);"string"==typeof e&&(e=JSON.parse(e)),l?l.updateData(e).then(function(){o.modExists("columnCalcs")&&o.modules.columnCalcs.recalc(o.rowManager.activeRows),i(l.getComponent())}).catch(function(t){n(t)}):l=o.rowManager.addRows(e).then(function(t){o.modExists("columnCalcs")&&o.modules.columnCalcs.recalc(o.rowManager.activeRows),i(t[0].getComponent())}).catch(function(t){n(t)})})},Tabulator.prototype.updateRow=function(t,e){var o=this;return new Promise(function(i,n){var l=o.rowManager.findRow(t);"string"==typeof e&&(e=JSON.parse(e)),l?l.updateData(e).then(function(){i(l.getComponent())}).catch(function(t){n(t)}):(console.warn("Update Error - No matching row found:",t),n("Update Error - No matching row found"))})},Tabulator.prototype.scrollToRow=function(t,e,o){var i=this;return new Promise(function(n,l){var s=i.rowManager.findRow(t);s?i.rowManager.scrollToRow(s,e,o).then(function(){n()}).catch(function(t){l(t)}):(console.warn("Scroll Error - No matching row found:",t),l("Scroll Error - No matching row found"))})},Tabulator.prototype.moveRow=function(t,e,o){var i=this.rowManager.findRow(t);i?i.moveToRow(e,o):console.warn("Move Error - No matching row found:",t)},Tabulator.prototype.getRows=function(t){return!0===t&&(console.warn("passing a boolean to the getRows function is deprecated, you should now pass the string 'active'"),t="active"),this.rowManager.getComponents(t)},Tabulator.prototype.getRowPosition=function(t,e){var o=this.rowManager.findRow(t);return o?this.rowManager.getRowPosition(o,e):(console.warn("Position Error - No matching row found:",t),!1)},Tabulator.prototype.copyToClipboard=function(t){this.modExists("clipboard",!0)&&this.modules.clipboard.copy(t)},Tabulator.prototype.setColumns=function(t){this.columnManager.setColumns(t)},Tabulator.prototype.getColumns=function(t){return this.columnManager.getComponents(t)},Tabulator.prototype.getColumn=function(t){var e=this.columnManager.findColumn(t);return e?e.getComponent():(console.warn("Find Error - No matching column found:",t),!1)}, -Tabulator.prototype.getColumnDefinitions=function(){return this.columnManager.getDefinitionTree()},Tabulator.prototype.getColumnLayout=function(){if(this.modExists("persistence",!0))return this.modules.persistence.parseColumns(this.columnManager.getColumns())},Tabulator.prototype.setColumnLayout=function(t){return!!this.modExists("persistence",!0)&&(this.columnManager.setColumns(this.modules.persistence.mergeDefinition(this.options.columns,t)),!0)},Tabulator.prototype.showColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Show Error - No matching column found:",t),!1;e.show(),this.options.responsiveLayout&&this.modExists("responsiveLayout",!0)&&this.modules.responsiveLayout.update()},Tabulator.prototype.hideColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Hide Error - No matching column found:",t),!1;e.hide(),this.options.responsiveLayout&&this.modExists("responsiveLayout",!0)&&this.modules.responsiveLayout.update()},Tabulator.prototype.toggleColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Visibility Toggle Error - No matching column found:",t),!1;e.visible?e.hide():e.show()},Tabulator.prototype.addColumn=function(t,e,o){var i=this;return new Promise(function(n,l){var s=i.columnManager.findColumn(o);i.columnManager.addColumn(t,e,s).then(function(t){n(t.getComponent())}).catch(function(t){l(t)})})},Tabulator.prototype.deleteColumn=function(t){var e=this;return new Promise(function(o,i){var n=e.columnManager.findColumn(t);n?n.delete().then(function(){o()}).catch(function(t){i(t)}):(console.warn("Column Delete Error - No matching column found:",t),i())})},Tabulator.prototype.updateColumnDefinition=function(t,e){var o=this;return new Promise(function(i,n){var l=o.columnManager.findColumn(t);l?l.updateDefinition(e).then(function(t){i(t)}).catch(function(t){n(t)}):(console.warn("Column Update Error - No matching column found:",t),n())})},Tabulator.prototype.moveColumn=function(t,e,o){var i=this.columnManager.findColumn(t),n=this.columnManager.findColumn(e);i?n?this.columnManager.moveColumn(i,n,o):console.warn("Move Error - No matching column found:",n):console.warn("Move Error - No matching column found:",t)},Tabulator.prototype.scrollToColumn=function(t,e,o){var i=this;return new Promise(function(n,l){var s=i.columnManager.findColumn(t);s?i.columnManager.scrollToColumn(s,e,o).then(function(){n()}).catch(function(t){l(t)}):(console.warn("Scroll Error - No matching column found:",t),l("Scroll Error - No matching column found"))})},Tabulator.prototype.setLocale=function(t){this.modules.localize.setLocale(t)},Tabulator.prototype.getLocale=function(){return this.modules.localize.getLocale()},Tabulator.prototype.getLang=function(t){return this.modules.localize.getLang(t)},Tabulator.prototype.redraw=function(t){this.columnManager.redraw(t),this.rowManager.redraw(t)},Tabulator.prototype.setHeight=function(t){"classic"!==this.rowManager.renderMode?(this.options.height=isNaN(t)?t:t+"px",this.element.style.height=this.options.height,this.rowManager.setRenderMode(),this.rowManager.redraw()):console.warn("setHeight function is not available in classic render mode")},Tabulator.prototype.setSort=function(t,e){this.modExists("sort",!0)&&(this.modules.sort.setSort(t,e),this.rowManager.sorterRefresh())},Tabulator.prototype.getSorters=function(){if(this.modExists("sort",!0))return this.modules.sort.getSort()},Tabulator.prototype.clearSort=function(){this.modExists("sort",!0)&&(this.modules.sort.clear(),this.rowManager.sorterRefresh())},Tabulator.prototype.setFilter=function(t,e,o,i){this.modExists("filter",!0)&&(this.modules.filter.setFilter(t,e,o,i),this.rowManager.filterRefresh())},Tabulator.prototype.addFilter=function(t,e,o,i){this.modExists("filter",!0)&&(this.modules.filter.addFilter(t,e,o,i),this.rowManager.filterRefresh())},Tabulator.prototype.getFilters=function(t){if(this.modExists("filter",!0))return this.modules.filter.getFilters(t)},Tabulator.prototype.setHeaderFilterFocus=function(t){if(this.modExists("filter",!0)){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Filter Focus Error - No matching column found:",t),!1;this.modules.filter.setHeaderFilterFocus(e)}},Tabulator.prototype.getHeaderFilterValue=function(t){if(this.modExists("filter",!0)){var e=this.columnManager.findColumn(t);if(e)return this.modules.filter.getHeaderFilterValue(e);console.warn("Column Filter Error - No matching column found:",t)}},Tabulator.prototype.setHeaderFilterValue=function(t,e){if(this.modExists("filter",!0)){var o=this.columnManager.findColumn(t);if(!o)return console.warn("Column Filter Error - No matching column found:",t),!1;this.modules.filter.setHeaderFilterValue(o,e)}},Tabulator.prototype.getHeaderFilters=function(){if(this.modExists("filter",!0))return this.modules.filter.getHeaderFilters()},Tabulator.prototype.removeFilter=function(t,e,o){this.modExists("filter",!0)&&(this.modules.filter.removeFilter(t,e,o),this.rowManager.filterRefresh())},Tabulator.prototype.clearFilter=function(t){this.modExists("filter",!0)&&(this.modules.filter.clearFilter(t),this.rowManager.filterRefresh())},Tabulator.prototype.clearHeaderFilter=function(){this.modExists("filter",!0)&&(this.modules.filter.clearHeaderFilter(),this.rowManager.filterRefresh())},Tabulator.prototype.selectRow=function(t){this.modExists("selectRow",!0)&&(!0===t&&(console.warn("passing a boolean to the selectRowselectRow function is deprecated, you should now pass the string 'active'"),t="active"),this.modules.selectRow.selectRows(t))},Tabulator.prototype.deselectRow=function(t){this.modExists("selectRow",!0)&&this.modules.selectRow.deselectRows(t)},Tabulator.prototype.toggleSelectRow=function(t){this.modExists("selectRow",!0)&&this.modules.selectRow.toggleRow(t)},Tabulator.prototype.getSelectedRows=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedRows()},Tabulator.prototype.getSelectedData=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedData()},Tabulator.prototype.getInvalidCells=function(){if(this.modExists("validate",!0))return this.modules.validate.getInvalidCells()},Tabulator.prototype.clearCellValidation=function(t){var e=this;this.modExists("validate",!0)&&(t||(t=this.modules.validate.getInvalidCells()),Array.isArray(t)||(t=[t]),t.forEach(function(t){e.modules.validate.clearValidation(t._getSelf())}))},Tabulator.prototype.validate=function(t){var e=[];return this.rowManager.rows.forEach(function(t){var o=t.validate();!0!==o&&(e=e.concat(o))}),!e.length||e},Tabulator.prototype.setMaxPage=function(t){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setMaxPage(t)},Tabulator.prototype.setPage=function(t){return this.options.pagination&&this.modExists("page")?this.modules.page.setPage(t):new Promise(function(t,e){e()})},Tabulator.prototype.setPageToRow=function(t){var e=this;return new Promise(function(o,i){e.options.pagination&&e.modExists("page")?(t=e.rowManager.findRow(t),t?e.modules.page.setPageToRow(t).then(function(){o()}).catch(function(){i()}):i()):i()})},Tabulator.prototype.setPageSize=function(t){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setPageSize(t),this.modules.page.setPage(1).then(function(){}).catch(function(){})},Tabulator.prototype.getPageSize=function(){if(this.options.pagination&&this.modExists("page",!0))return this.modules.page.getPageSize()},Tabulator.prototype.previousPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.previousPage()},Tabulator.prototype.nextPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.nextPage()},Tabulator.prototype.getPage=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPage()},Tabulator.prototype.getPageMax=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPageMax()},Tabulator.prototype.setGroupBy=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupBy=t,this.modules.groupRows.initialize(),this.rowManager.refreshActiveData("display"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")},Tabulator.prototype.setGroupValues=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupValues=t,this.modules.groupRows.initialize(),this.rowManager.refreshActiveData("display"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")},Tabulator.prototype.setGroupStartOpen=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupStartOpen=t,this.modules.groupRows.initialize(),this.options.groupBy?(this.rowManager.refreshActiveData("group"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")):console.warn("Grouping Update - cant refresh view, no groups have been set")},Tabulator.prototype.setGroupHeader=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupHeader=t,this.modules.groupRows.initialize(),this.options.groupBy?(this.rowManager.refreshActiveData("group"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")):console.warn("Grouping Update - cant refresh view, no groups have been set")},Tabulator.prototype.getGroups=function(t){return!!this.modExists("groupRows",!0)&&this.modules.groupRows.getGroups(!0)},Tabulator.prototype.getGroupedData=function(){if(this.modExists("groupRows",!0))return this.options.groupBy?this.modules.groupRows.getGroupedData():this.getData()},Tabulator.prototype.getEditedCells=function(){if(this.modExists("edit",!0))return this.modules.edit.getEditedCells()},Tabulator.prototype.clearCellEdited=function(t){var e=this;this.modExists("edit",!0)&&(t||(t=this.modules.edit.getEditedCells()),Array.isArray(t)||(t=[t]),t.forEach(function(t){e.modules.edit.clearEdited(t._getSelf())}))},Tabulator.prototype.getCalcResults=function(){return!!this.modExists("columnCalcs",!0)&&this.modules.columnCalcs.getResults()},Tabulator.prototype.recalc=function(){this.modExists("columnCalcs",!0)&&this.modules.columnCalcs.recalcAll(this.rowManager.activeRows)},Tabulator.prototype.navigatePrev=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&t.nav().prev()},Tabulator.prototype.navigateNext=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&t.nav().next()},Tabulator.prototype.navigateLeft=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().left())},Tabulator.prototype.navigateRight=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().right())},Tabulator.prototype.navigateUp=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().up())},Tabulator.prototype.navigateDown=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().down())},Tabulator.prototype.undo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.undo()},Tabulator.prototype.redo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.redo()},Tabulator.prototype.getHistoryUndoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryUndoSize()},Tabulator.prototype.getHistoryRedoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryRedoSize()},Tabulator.prototype.download=function(t,e,o,i){this.modExists("download",!0)&&this.modules.download.download(t,e,o,i)},Tabulator.prototype.downloadToTab=function(t,e,o,i){this.modExists("download",!0)&&this.modules.download.download(t,e,o,i,!0)},Tabulator.prototype.tableComms=function(t,e,o,i){this.modules.comms.receive(t,e,o,i)},Tabulator.prototype.moduleBindings={},Tabulator.prototype.extendModule=function(t,e,o){if(Tabulator.prototype.moduleBindings[t]){var i=Tabulator.prototype.moduleBindings[t].prototype[e];if(i)if("object"==(void 0===o?"undefined":_typeof(o)))for(var n in o)i[n]=o[n];else console.warn("Module Error - Invalid value type, it must be an object");else console.warn("Module Error - property does not exist:",e)}else console.warn("Module Error - module does not exist:",t)},Tabulator.prototype.registerModule=function(t,e){Tabulator.prototype.moduleBindings[t]=e},Tabulator.prototype.bindModules=function(){this.modules={};for(var t in Tabulator.prototype.moduleBindings)this.modules[t]=new Tabulator.prototype.moduleBindings[t](this)},Tabulator.prototype.modExists=function(t,e){return!!this.modules[t]||(e&&console.error("Tabulator Module Not Installed: "+t),!1)},Tabulator.prototype.helpers={elVisible:function(t){return!(t.offsetWidth<=0&&t.offsetHeight<=0)},elOffset:function(t){var e=t.getBoundingClientRect();return{top:e.top+window.pageYOffset-document.documentElement.clientTop,left:e.left+window.pageXOffset-document.documentElement.clientLeft}},deepClone:function(t){var e=Object.assign(Array.isArray(t)?[]:{},t);for(var o in t)null!=t[o]&&"object"===_typeof(t[o])&&(t[o]instanceof Date?e[o]=new Date(t[o]):e[o]=this.deepClone(t[o]));return e}},Tabulator.prototype.comms={tables:[],register:function(t){Tabulator.prototype.comms.tables.push(t)},deregister:function(t){var e=Tabulator.prototype.comms.tables.indexOf(t);e>-1&&Tabulator.prototype.comms.tables.splice(e,1)},lookupTable:function(t,e){var o,i,n=[];if("string"==typeof t){if(o=document.querySelectorAll(t),o.length)for(var l=0;l0?l.setWidth(n):l.reinitializeWidth()):this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitColumns:function(t){function e(t){return"string"==typeof t?t.indexOf("%")>-1?n/100*parseInt(t):parseInt(t):t}function o(t,i,n,l){function s(t){return n*(t.column.definition.widthGrow||1)}function a(t){return e(t.width)-n*(t.column.definition.widthShrink||0)}var r=[],u=0,h=0,c=0,d=0,p=0,m=[];return t.forEach(function(t,e){var o=l?a(t):s(t);t.column.minWidth>=o?r.push(t):(m.push(t),p+=l?t.column.definition.widthShrink||1:t.column.definition.widthGrow||1)}),r.length?(r.forEach(function(t){u+=l?t.width-t.column.minWidth:t.column.minWidth,t.width=t.column.minWidth}),h=i-u,c=p?Math.floor(h/p):h,d=h-c*p,d+=o(m,h,c,l)):(d=p?i-Math.floor(i/p)*p:i,m.forEach(function(t){t.width=l?a(t):s(t)})),d}var i=this,n=i.table.element.clientWidth,l=0,s=0,a=0,r=0,u=[],h=[],c=0,d=0,p=0;this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.rowManager.element.scrollHeight>this.table.rowManager.element.clientHeight&&(n-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),t.forEach(function(t){var o,i,n;t.visible&&(o=t.definition.width,i=parseInt(t.minWidth),o?(n=e(o),l+=n>i?n:i,t.definition.widthShrink&&(h.push({column:t,width:n>i?n:i}),c+=t.definition.widthShrink)):(u.push({column:t,width:0}),a+=t.definition.widthGrow||1))}),s=n-l,r=Math.floor(s/a);var p=o(u,s,r,!1);u.length&&p>0&&(u[u.length-1].width+=+p),u.forEach(function(t){s-=t.width}),d=Math.abs(p)+s,d>0&&c&&(p=o(h,d,Math.floor(d/c),!0)),h.length&&(h[h.length-1].width-=p),u.forEach(function(t){t.column.setWidth(t.width)}),h.forEach(function(t){t.column.setWidth(t.width)})}},Tabulator.prototype.registerModule("layout",Layout);var Localize=function(t){this.table=t,this.locale="default",this.lang=!1,this.bindings={},this.langList={}};Localize.prototype.initialize=function(){this.langList=Tabulator.prototype.helpers.deepClone(this.langs)},Localize.prototype.setHeaderFilterPlaceholder=function(t){this.langList.default.headerFilters.default=t},Localize.prototype.setHeaderFilterColumnPlaceholder=function(t,e){this.langList.default.headerFilters.columns[t]=e,this.lang&&!this.lang.headerFilters.columns[t]&&(this.lang.headerFilters.columns[t]=e)},Localize.prototype.installLang=function(t,e){this.langList[t]?this._setLangProp(this.langList[t],e):this.langList[t]=e},Localize.prototype._setLangProp=function(t,e){for(var o in e)t[o]&&"object"==_typeof(t[o])?this._setLangProp(t[o],e[o]):t[o]=e[o]},Localize.prototype.setLocale=function(t){function e(t,o){for(var i in t)"object"==_typeof(t[i])?(o[i]||(o[i]={}),e(t[i],o[i])):o[i]=t[i]}var o=this;if(t=t||"default",!0===t&&navigator.language&&(t=navigator.language.toLowerCase()),t&&!o.langList[t]){var i=t.split("-")[0];o.langList[i]?(console.warn("Localization Error - Exact matching locale not found, using closest match: ",t,i),t=i):(console.warn("Localization Error - Matching locale not found, using default: ",t),t="default")}o.locale=t,o.lang=Tabulator.prototype.helpers.deepClone(o.langList.default||{}),"default"!=t&&e(o.langList[t],o.lang),o.table.options.localized.call(o.table,o.locale,o.lang),o._executeBindings()},Localize.prototype.getLocale=function(t){return self.locale},Localize.prototype.getLang=function(t){return t?this.langList[t]:this.lang},Localize.prototype.getText=function(t,e){var t=e?t+"|"+e:t,o=t.split("|");return this._getLangElement(o,this.locale)||""},Localize.prototype._getLangElement=function(t,e){var o=this,i=o.lang;return t.forEach(function(t){var e;i&&(e=i[t],i=void 0!==e&&e)}),i},Localize.prototype.bind=function(t,e){this.bindings[t]||(this.bindings[t]=[]),this.bindings[t].push(e),e(this.getText(t),this.lang)},Localize.prototype._executeBindings=function(){var t=this;for(var e in t.bindings)!function(e){t.bindings[e].forEach(function(o){o(t.getText(e),t.lang)})}(e)},Localize.prototype.langs={default:{groups:{item:"item",items:"items"},columns:{},ajax:{loading:"Loading",error:"Error"},pagination:{page_size:"Page Size",page_title:"Show Page",first:"First",first_title:"First Page",last:"Last",last_title:"Last Page",prev:"Prev",prev_title:"Prev Page",next:"Next",next_title:"Next Page",all:"All"},headerFilters:{default:"filter column...",columns:{}}}},Tabulator.prototype.registerModule("localize",Localize);var Comms=function(t){this.table=t};Comms.prototype.getConnections=function(t){var e,o=this,i=[];return e=Tabulator.prototype.comms.lookupTable(t),e.forEach(function(t){o.table!==t&&i.push(t)}),i},Comms.prototype.send=function(t,e,o,i){var n=this,l=this.getConnections(t);l.forEach(function(t){t.tableComms(n.table.element,e,o,i)}),!l.length&&t&&console.warn("Table Connection Error - No tables matching selector found",t)},Comms.prototype.receive=function(t,e,o,i){if(this.table.modExists(e))return this.table.modules[e].commsReceived(t,o,i);console.warn("Inter-table Comms Error - no such module:",e)},Tabulator.prototype.registerModule("comms",Comms); \ No newline at end of file diff --git a/website/js/vendor/tinymce/changelog.txt b/website/js/vendor/tinymce/changelog.txt deleted file mode 100644 index aa08a58..0000000 --- a/website/js/vendor/tinymce/changelog.txt +++ /dev/null @@ -1,1479 +0,0 @@ -Version 5.1.5 (2019-12-19) - Fixed the UI not working with hybrid devices that accept both touch and mouse events #TNY-4521 - Fixed the `charmap` dialog initially focusing the first tab of the dialog instead of the search input field #TINY-4342 - Fixed an exception being raised when inserting content if the caret was directly before or after a `contenteditable="false"` element #TINY-4528 - Fixed a bug with pasting image URLs when paste as text is enabled #TINY-4523 -Version 5.1.4 (2019-12-11) - Fixed dialog contents disappearing when clicking a checkbox for right-to-left languages #TINY-4518 - Fixed the `legacyoutput` plugin registering legacy formats after editior initialization, causing legacy content to be stripped on the initial load #TINY-4447 - Fixed search and replace not cycling through results when searching using special characters #TINY-4506 - Fixed the `visualchars` plugin converting HTML-like text to DOM elements in certain cases #TINY-4507 - Fixed an issue with the `paste` plugin not sanitizing content in some cases #TINY-4510 - Fixed HTML comments incorrectly being parsed in certain cases #TINY-4511 -Version 5.1.3 (2019-12-04) - Fixed sticky toolbar not undocking when fullscreen mode is activated #TINY-4390 - Fixed the "Current Window" target not applying when updating links using the link dialog #TINY-4063 - Fixed disabled menu items not highlighting when focused #TINY-4339 - Fixed touch events passing through dialog collection items to the content underneath on Android devices #TINY-4431 - Fixed keyboard navigation of the Help dialog's Keyboard Navigation tab #TINY-4391 - Fixed search and replace dialog disappearing when finding offscreen matches on iOS devices #TINY-4350 - Fixed performance issues where sticky toolbar was jumping while scrolling on slower browsers #TINY-4475 -Version 5.1.2 (2019-11-19) - Fixed desktop touch devices using `mobile` configuration overrides #TINY-4345 - Fixed unable to disable the new scrolling toolbar feature #TINY-4345 - Fixed touch events passing through any pop-up items to the content underneath on Android devices #TINY-4367 - Fixed the table selector handles throwing JavaScript exceptions for non-table selections #TINY-4338 - Fixed `cut` operations not removing selected content on Android devices when the `paste` plugin is enabled #TINY-4362 - Fixed inline toolbar not constrained to the window width by default #TINY-4314 - Fixed context toolbar split button chevrons pointing right when they should be pointing down #TINY-4257 - Fixed unable to access the dialog footer in tabbed dialogs on small screens #TINY-4360 - Fixed mobile table selectors were hard to select with touch by increasing the size #TINY-4366 - Fixed mobile table selectors moving when moving outside the editor #TINY-4366 - Fixed inline toolbars collapsing when using sliding toolbars #TINY-4389 - Fixed block textpatterns not treating NBSPs as spaces #TINY-4378 - Fixed backspace not merging blocks when the last element in the preceding block was a `contenteditable="false"` element #TINY-4235 - Fixed toolbar buttons that only contain text labels overlapping on mobile devices #TINY-4395 - Fixed quickbars quickimage picker not working on mobile #TINY-4377 - Fixed fullscreen not resizing in an iOS WKWebView component #TINY-4413 -Version 5.1.1 (2019-10-28) - Fixed font formats containing spaces being wrapped in `"` entities instead of single quotes #TINY-4275 - Fixed alert and confirm dialogs losing focus when clicked #TINY-4248 - Fixed clicking outside a modal dialog focusing on the document body #TINY-4249 - Fixed the context toolbar not hiding when scrolled out of view #TINY-4265 -Version 5.1.0 (2019-10-17) - Added touch selector handles for table selections on touch devices #TINY-4097 - Added border width field to Table Cell dialog #TINY-4028 - Added touch event listener to media plugin to make embeds playable #TINY-4093 - Added oxide styling options to notifications and tweaked the default variables #TINY-4153 - Added additional padding to split button chevrons on touch devices, to make them easier to interact with #TINY-4223 - Added new platform detection functions to `Env` and deprecated older detection properties #TINY-4184 - Added `inputMode` config field to specify inputmode attribute of `input` dialog components #TINY-4062 - Added new `inputMode` property to relevant plugins/dialogs #TINY-4102 - Added new `toolbar_sticky` setting to allow the iframe menubar/toolbar to stick to the top of the window when scrolling #TINY-3982 - Changed default setting for `toolbar_drawer` to `floating` #TINY-3634 - Changed mobile phones to use the `silver` theme by default #TINY-3634 - Changed some editor settings to default to `false` on touch devices: - - `menubar`(phones only) #TINY-4077 - - `table_grid` #TINY-4075 - - `resize` #TINY-4157 - - `object_resizing` #TINY-4157 - Changed toolbars and context toolbars to sidescroll on mobile #TINY-3894 #TINY-4107 - Changed context menus to render as horizontal menus on touch devices #TINY-4107 - Changed the editor to use the `VisualViewport` API of the browser where possible #TINY-4078 - Changed visualblocks toolbar button icon and renamed `paragraph` icon to `visualchars` #TINY-4074 - Changed Oxide default for `@toolbar-button-chevron-color` to follow toolbar button icon color #TINY-4153 - Changed the `urlinput` dialog component to use the `url` type attribute #TINY-4102 - Fixed Safari desktop visual viewport fires resize on fullscreen breaking the restore function #TINY-3976 - Fixed scroll issues on mobile devices #TINY-3976 - Fixed context toolbar unable to refresh position on iOS12 #TINY-4107 - Fixed ctrl+left click not opening links on readonly mode and the preview dialog #TINY-4138 - Fixed Slider UI component not firing `onChange` event on touch devices #TINY-4092 - Fixed notifications overlapping instead of stacking #TINY-3478 - Fixed inline dialogs positioning incorrectly when the page is scrolled #TINY-4018 - Fixed inline dialogs and menus not repositioning when resizing #TINY-3227 - Fixed inline toolbar incorrectly stretching to the full width when a width value was provided #TINY-4066 - Fixed menu chevrons color to follow the menu text color #TINY-4153 - Fixed table menu selection grid from staying black when using dark skins, now follows border color #TINY-4153 - Fixed Oxide using the wrong text color variable for menubar button focused state #TINY-4146 - Fixed the autoresize plugin not keeping the selection in view when resizing #TINY-4094 - Fixed textpattern plugin throwing exceptions when using `forced_root_block: false` #TINY-4172 - Fixed missing CSS fill styles for toolbar button icon active state #TINY-4147 - Fixed an issue where the editor selection could end up inside a short ended element (such as `br`) #TINY-3999 - Fixed browser selection being lost in inline mode when opening split dropdowns #TINY-4197 - Fixed backspace throwing an exception when using `forced_root_block: false` #TINY-4099 - Fixed floating toolbar drawer expanding outside the bounds of the editor #TINY-3941 - Fixed the autocompleter not activating immediately after a `br` or `contenteditable=false` element #TINY-4194 - Fixed an issue where the autocompleter would incorrectly close on IE 11 in certain edge cases #TINY-4205 -Version 5.0.16 (2019-09-24) - Added new `referrer_policy` setting to add the `referrerpolicy` attribute when loading scripts or stylesheets #TINY-3978 - Added a slight background color to dialog tab links when focused to aid keyboard navigation #TINY-3877 - Fixed media poster value not updating on change #TINY-4013 - Fixed openlink was not registered as a toolbar button #TINY-4024 - Fixed failing to initialize if a script tag was used inside a SVG #TINY-4087 - Fixed double top border showing on toolbar without menubar when toolbar_drawer is enabled #TINY-4118 - Fixed unable to drag inline dialogs to the bottom of the screen when scrolled #TINY-4154 - Fixed notifications appearing on top of the toolbar when scrolled in inline mode #TINY-4159 - Fixed notifications displaying incorrectly on IE 11 #TINY-4169 -Version 5.0.15 (2019-09-02) - Added a dark `content_css` skin to go with the dark UI skin #TINY-3743 - Changed the enabled state on toolbar buttons so they don't get the hover effect #TINY-3974 - Fixed missing CSS active state on toolbar buttons #TINY-3966 - Fixed `onChange` callback not firing for the colorinput dialog component #TINY-3968 - Fixed context toolbars not showing in fullscreen mode #TINY-4023 -Version 5.0.14 (2019-08-19) - Added an API to reload the autocompleter menu with additional fetch metadata #MENTIONS-17 - Fixed missing toolbar button border styling options #TINY-3965 - Fixed image upload progress notification closing before the upload is complete #TINY-3963 - Fixed inline dialogs not closing on escape when no dialog component is in focus #TINY-3936 - Fixed plugins not being filtered when defaulting to mobile on phones #TINY-3537 - Fixed toolbar more drawer showing the content behind it when transitioning between opened and closed states #TINY-3878 - Fixed focus not returning to the dialog after pressing the "Replace all" button in the search and replace dialog #TINY-3961 - Removed Oxide variable `@menubar-select-disabled-border-color` and replaced it with `@menubar-select-disabled-border` #TINY-3965 -Version 5.0.13 (2019-08-06) - Changed modal dialogs to prevent dragging by default and added new `draggable_modal` setting to restore dragging #TINY-3873 - Changed the nonbreaking plugin to insert nbsp characters wrapped in spans to aid in filtering. This can be disabled using the `nonbreaking_wrap` setting #TINY-3647 - Changed backspace behaviour in lists to outdent nested list items when the cursor is at the start of the list item #TINY-3651 - Fixed sidebar growing beyond editor bounds in IE 11 #TINY-3937 - Fixed issue with being unable to keyboard navigate disabled toolbar buttons #TINY-3350 - Fixed issues with backspace and delete in nested contenteditable true and false elements #TINY-3868 - Fixed issue with losing keyboard navigation in dialogs due to disabled buttons #TINY-3914 - Fixed `MouseEvent.mozPressure is deprecated` warning in Firefox #TINY-3919 - Fixed `default_link_target` not being respected when `target_list` is disabled #TINY-3757 - Fixed mobile plugin filter to only apply to the mobile theme, rather than all mobile platforms #TINY-3405 - Fixed focus switching to another editor during mode changes #TINY-3852 - Fixed an exception being thrown when clicking on an uninitialized inline editor #TINY-3925 - Fixed unable to keyboard navigate to dialog menu buttons #TINY-3933 - Fixed dialogs being able to be dragged outside the window viewport #TINY-3787 - Fixed inline dialogs appearing above modal dialogs #TINY-3932 -Version 5.0.12 (2019-07-18) - Added ability to utilize UI dialog panels inside other panels #TINY-3305 - Added help dialog tab explaining keyboard navigation of the editor #TINY-3603 - Changed the "Find and Replace" design to an inline dialog #TINY-3054 - Fixed issue where autolink spacebar event was not being fired on Edge #TINY-3891 - Fixed table selection missing the background color #TINY-3892 - Fixed removing shortcuts not working for function keys #TINY-3871 - Fixed non-descriptive UI component type names #TINY-3349 - Fixed UI registry components rendering as the wrong type when manually specifying a different type #TINY-3385 - Fixed an issue where dialog checkbox, input, selectbox, textarea and urlinput components couldn't be disabled #TINY-3708 - Fixed the context toolbar not using viable screen space in inline/distraction free mode #TINY-3717 - Fixed the context toolbar overlapping the toolbar in various conditions #TINY-3205 - Fixed IE11 edge case where items were being inserted into the wrong location #TINY-3884 -Version 5.0.11 (2019-07-04) - Fixed packaging errors caused by a rollup treeshaking bug (https://github.com/rollup/rollup/issues/2970) #TINY-3866 - Fixed the customeditor component not able to get data from the dialog api #TINY-3866 - Fixed collection component tooltips not being translated #TINY-3855 -Version 5.0.10 (2019-07-02) - Added support for all HTML color formats in `color_map` setting #TINY-3837 - Changed backspace key handling to outdent content in appropriate circumstances #TINY-3685 - Changed default palette for forecolor and backcolor to include some lighter colors suitable for highlights #TINY-2865 - Changed the search and replace plugin to cycle through results #TINY-3800 - Fixed inconsistent types causing some properties to be unable to be used in dialog components #TINY-3778 - Fixed an issue in the Oxide skin where dialog content like outlines and shadows were clipped because of overflow hidden #TINY-3566 - Fixed the search and replace plugin not resetting state when changing the search query #TINY-3800 - Fixed backspace in lists not creating an undo level #TINY-3814 - Fixed the editor to cancel loading in quirks mode where the UI is not supported #TINY-3391 - Fixed applying fonts not working when the name contained spaces and numbers #TINY-3801 - Fixed so that initial content is retained when initializing on list items #TINY-3796 - Fixed inefficient font name and font size current value lookup during rendering #TINY-3813 - Fixed mobile font copied into the wrong folder for the oxide-dark skin #TINY-3816 - Fixed an issue where resizing the width of tables would produce inaccurate results #TINY-3827 - Fixed a memory leak in the Silver theme #TINY-3797 - Fixed alert and confirm dialogs using incorrect markup causing inconsistent padding #TINY-3835 - Fixed an issue in the Table plugin with `table_responsive_width` not enforcing units when resizing #TINY-3790 - Fixed leading, trailing and sequential spaces being lost when pasting plain text #TINY-3726 - Fixed exception being thrown when creating relative URIs #TINY-3851 - Fixed focus is no longer set to the editor content during mode changes unless the editor already had focus #TINY-3852 -Version 5.0.9 (2019-06-26) - Fixed print plugin not working in Firefox #TINY-3834 -Version 5.0.8 (2019-06-18) - Added back support for multiple toolbars #TINY-2195 - Added support for .m4a files to the media plugin #TINY-3750 - Added new base_url and suffix editor init options #TINY-3681 - Fixed incorrect padding for select boxes with visible values #TINY-3780 - Fixed selection incorrectly changing when programmatically setting selection on contenteditable false elements #TINY-3766 - Fixed sidebar background being transparent #TINY-3727 - Fixed the build to remove duplicate iife wrappers #TINY-3689 - Fixed bogus autocompleter span appearing in content when the autocompleter menu is shown #TINY-3752 - Fixed toolbar font size select not working with legacyoutput plugin #TINY-2921 - Fixed the legacyoutput plugin incorrectly aligning images #TINY-3660 - Fixed remove color not working when using the legacyoutput plugin #TINY-3756 - Fixed the font size menu applying incorrect sizes when using the legacyoutput plugin #TINY-3773 - Fixed scrollIntoView not working when the parent window was out of view #TINY-3663 - Fixed the print plugin printing from the wrong window in IE11 #TINY-3762 - Fixed content CSS loaded over CORS not loading in the preview plugin with content_css_cors enabled #TINY-3769 - Fixed the link plugin missing the default "None" option for link list #TINY-3738 - Fixed small dot visible with menubar and toolbar disabled in inline mode #TINY-3623 - Fixed space key properly inserts a nbsp before/after block elements #TINY-3745 - Fixed native context menu not showing with images in IE11 #TINY-3392 - Fixed inconsistent browser context menu image selection #TINY-3789 -Version 5.0.7 (2019-06-05) - Added new toolbar button and menu item for inserting tables via dialog #TINY-3636 - Added new API for adding/removing/changing tabs in the Help dialog #TINY-3535 - Added highlighting of matched text in autocompleter items #TINY-3687 - Added the ability for autocompleters to work with matches that include spaces #TINY-3704 - Added new `imagetools_fetch_image` callback to allow custom implementations for cors loading of images #TINY-3658 - Added `'http'` and `https` options to `link_assume_external_targets` to prepend `http://` or `https://` prefixes when URL does not contain a protocol prefix. Patch contributed by francoisfreitag. #GH-4335 - Changed annotations navigation to work the same as inline boundaries #TINY-3396 - Changed tabpanel API by adding a `name` field and changing relevant methods to use it #TINY-3535 - Fixed text color not updating all color buttons when choosing a color #TINY-3602 - Fixed the autocompleter not working with fragmented text #TINY-3459 - Fixed the autosave plugin no longer overwrites window.onbeforeunload #TINY-3688 - Fixed infinite loop in the paste plugin when IE11 takes a long time to process paste events. Patch contributed by lRawd. #GH-4987 - Fixed image handle locations when using `fixed_toolbar_container`. Patch contributed by t00. #GH-4966 - Fixed the autoresize plugin not firing `ResizeEditor` events #TINY-3587 - Fixed editor in fullscreen mode not extending to the bottom of the screen #TINY-3701 - Fixed list removal when pressing backspace after the start of the list item #TINY-3697 - Fixed autocomplete not triggering from compositionend events #TINY-3711 - Fixed `file_picker_callback` could not set the caption field on the insert image dialog #TINY-3172 - Fixed the autocompleter menu showing up after a selection had been made #TINY-3718 - Fixed an exception being thrown when a file or number input has focus during initialization. Patch contributed by t00 #GH-2194 -Version 5.0.6 (2019-05-22) - Added `icons_url` editor settings to enable icon packs to be loaded from a custom url #TINY-3585 - Added `image_uploadtab` editor setting to control the visibility of the upload tab in the image dialog #TINY-3606 - Added new api endpoints to the wordcount plugin and improved character count logic #TINY-3578 - Changed plugin, language and icon loading errors to log in the console instead of a notification #TINY-3585 - Fixed the textpattern plugin not working with fragmented text #TINY-3089 - Fixed various toolbar drawer accessibility issues and added an animation #TINY-3554 - Fixed issues with selection and ui components when toggling readonly mode #TINY-3592 - Fixed so readonly mode works with inline editors #TINY-3592 - Fixed docked inline toolbar positioning when scrolled #TINY-3621 - Fixed initial value not being set on bespoke select in quickbars and toolbar drawer #TINY-3591 - Fixed so that nbsp entities aren't trimmed in white-space: pre-line elements #TINY-3642 - Fixed `mceInsertLink` command inserting spaces instead of url encoded characters #GH-4990 - Fixed text content floating on top of dialogs in IE11 #TINY-3640 -Version 5.0.5 (2019-05-09) - Added menu items to match the forecolor/backcolor toolbar buttons #TINY-2878 - Added default directionality based on the configured language #TINY-2621 - Added styles, icons and tests for rtl mode #TINY-2621 - Fixed autoresize not working with floating elements or when media elements finished loading #TINY-3545 - Fixed incorrect vertical caret positioning in IE 11 #TINY-3188 - Fixed submenu anchoring hiding overflowed content #TINY-3564 - Removed unused and hidden validation icons to avoid displaying phantom tooltips #TINY-2329 -Version 5.0.4 (2019-04-23) - Added back URL dialog functionality, which is now available via `editor.windowManager.openUrl()` #TINY-3382 - Added the missing throbber functionality when calling `editor.setProgressState(true)` #TINY-3453 - Added function to reset the editor content and undo/dirty state via `editor.resetContent()` #TINY-3435 - Added the ability to set menu buttons as active #TINY-3274 - Added `editor.mode` API, featuring a custom editor mode API #TINY-3406 - Added better styling to floating toolbar drawer #TINY-3479 - Added the new premium plugins to the Help dialog plugins tab #TINY-3496 - Added the linkchecker context menu items to the default configuration #TINY-3543 - Fixed image context menu items showing on placeholder images #TINY-3280 - Fixed dialog labels and text color contrast within notifications/alert banners to satisfy WCAG 4.5:1 contrast ratio for accessibility #TINY-3351 - Fixed selectbox and colorpicker items not being translated #TINY-3546 - Fixed toolbar drawer sliding mode to correctly focus the editor when tabbing via keyboard navigation #TINY-3533 - Fixed positioning of the styleselect menu in iOS while using the mobile theme #TINY-3505 - Fixed the menubutton `onSetup` callback to be correctly executed when rendering the menu buttons #TINY-3547 - Fixed `default_link_target` setting to be correctly utilized when creating a link #TINY-3508 - Fixed colorpicker floating marginally outside its container #TINY-3026 - Fixed disabled menu items displaying as active when hovered #TINY-3027 - Removed redundant mobile wrapper #TINY-3480 -Version 5.0.3 (2019-03-19) - Changed empty nested-menu items within the style formats menu to be disabled or hidden if the value of `style_formats_autohide` is `true` #TINY-3310 - Changed the entire phrase 'Powered by Tiny' in the status bar to be a link instead of just the word 'Tiny' #TINY-3366 - Changed `formatselect`, `styleselect` and `align` menus to use the `mceToggleFormat` command internally #TINY-3428 - Fixed toolbar keyboard navigation to work as expected when `toolbar_drawer` is configured #TINY-3432 - Fixed text direction buttons to display the correct pressed state in selections that have no explicit `dir` property #TINY-3138 - Fixed the mobile editor to clean up properly when removed #TINY-3445 - Fixed quickbar toolbars to add an empty box to the screen when it is set to `false` #TINY-3439 - Fixed an issue where pressing the **Delete/Backspace** key at the edge of tables was creating incorrect selections #TINY-3371 - Fixed an issue where dialog collection items (emoticon and special character dialogs) couldn't be selected with touch devices #TINY-3444 - Fixed a type error introduced in TinyMCE version 5.0.2 when calling `editor.getContent()` with nested bookmarks #TINY-3400 - Fixed an issue that prevented default icons from being overridden #TINY-3449 - Fixed an issue where **Home/End** keys wouldn't move the caret correctly before or after `contenteditable=false` inline elements #TINY-2995 - Fixed styles to be preserved in IE 11 when editing via the `fullpage` plugin #TINY-3464 - Fixed the `link` plugin context toolbar missing the open link button #TINY-3461 - Fixed inconsistent dialog component spacing #TINY-3436 -Version 5.0.2 (2019-03-05) - Added presentation and document presets to `htmlpanel` dialog component #TINY-2694 - Added missing fixed_toolbar_container setting has been reimplemented in the Silver theme #TINY-2712 - Added a new toolbar setting `toolbar_drawer` that moves toolbar groups which overflow the editor width into either a `sliding` or `floating` toolbar section #TINY-2874 - Updated the build process to include package lock files in the dev distribution archive #TINY-2870 - Fixed inline dialogs did not have aria attributes #TINY-2694 - Fixed default icons are now available in the UI registry, allowing use outside of toolbar buttons #TINY-3307 - Fixed a memory leak related to select toolbar items #TINY-2874 - Fixed a memory leak due to format changed listeners that were never unbound #TINY-3191 - Fixed an issue where content may have been lost when using permanent bookmarks #TINY-3400 - Fixed the quicklink toolbar button not rendering in the quickbars plugin #TINY-3125 - Fixed an issue where menus were generating invalid HTML in some cases #TINY-3323 - Fixed an issue that could cause the mobile theme to show a blank white screen when the editor was inside an `overflow:hidden` element #TINY-3407 - Fixed mobile theme using a transparent background and not taking up the full width on iOS #TINY-3414 - Fixed the template plugin dialog missing the description field #TINY-3337 - Fixed input dialog components using an invalid default type attribute #TINY-3424 - Fixed an issue where backspace/delete keys after/before pagebreak elements wouldn't move the caret #TINY-3097 - Fixed an issue in the table plugin where menu items and toolbar buttons weren't showing correctly based on the selection #TINY-3423 - Fixed inconsistent button focus styles in Firefox #TINY-3377 - Fixed the resize icon floating left when all status bar elements were disabled #TINY-3340 - Fixed the resize handle to not show in fullscreen mode #TINY-3404 -Version 5.0.1 (2019-02-21) - Removed paste as text notification banner and paste_plaintext_inform setting #POW-102 - Fixed an issue where adding links to images would replace the image with text #TINY-3356 - Fixed an issue where the inline editor could use fractional pixels for positioning #TINY-3202 - Fixed an issue where uploading non-image files in the Image Plugin upload tab threw an error. #TINY-3244 - Added H1-H6 toggle button registration to the silver theme #TINY-3070 - Fixed an issue in the media plugin that was causing the source url and height/width to be lost in certain circumstances #TINY-2858 - Fixed an issue with the Context Toolbar not being removed when clicking outside of the editor #TINY-2804 - Fixed an issue where clicking 'Remove link' wouldn't remove the link in certain circumstances #TINY-3199 - Added code sample toolbar button will now toggle on when the cursor is in a code section #TINY-3040 - Fixed an issue where the media plugin would fail when parsing dialog data #TINY-3218 - Fixed an issue where retrieving the selected content as text didn't create newlines #TINY-3197 - Fixed incorrect keyboard shortcuts in the Help dialog for Windows #TINY-3292 - Fixed an issue where JSON serialization could produce invalid JSON #TINY-3281 - Fixed production CSS including references to source maps #TINY-3920 - Fixed development CSS was not included in the development zip #TINY-3920 - Fixed the autocompleter matches predicate not matching on the start of words by default #TINY-3306 - Added new settings to the emoticons plugin to allow additional emoticons to be added #TINY-3088 - Fixed an issue where the page could be scrolled with modal dialogs open #TINY-2252 - Fixed an issue where autocomplete menus would show an icon margin when no items had icons #TINY-3329 - Fixed an issue in the quickbars plugin where images incorrectly showed the text selection toolbar #TINY-3338 - Fixed an issue that caused the inline editor to fail to render when the target element already had focus #TINY-3353 -Version 5.0.0 (2019-02-04) - Full documentation for the version 5 features and changes is available at https://www.tiny.cloud/docs/release-notes/ - - Changes since RC2: - Fixed an issue where tab panel heights weren't sizing properly on smaller screens and weren't updating on resize #TINY-3242 - Added links and registered names with * to denote premium plugins in Plugins tab of Help dialog #TINY-3223 - Changed Tiny 5 mobile skin to look more uniform with desktop #TINY-2650 - Fixed image tools not having any padding between the label and slider #TINY-3220 - Blacklisted table, th and td as inline editor target #TINY-717 - Fixed context toolbar toggle buttons not showing the correct state #TINY-3022 - Fixed missing separators in the spellchecker context menu between the suggestions and actions #TINY-3217 - Fixed notification icon positioning in alert banners #TINY-2196 - Fixed a typo in the word count plugin name #TINY-3062 - Fixed charmap and emoticons dialogs not having a primary button #TINY-3233 - Fixed an issue where resizing wouldn't work correctly depending on the box-sizing model #TINY-3278 -Version 5.0.0-rc-2 (2019-01-22) - Fixed the link dialog such that it will now retain class attributes when updating links #TINY-2825 - Added screen reader accessibility for sidebar and statusbar #TINY-2699 - Updated Emoticons and Charmap dialogs to be screen reader accessible #TINY-2693 - Fixed "Find and replace" not showing in the "Edit" menu by default #TINY-3061 - Updated the textpattern plugin to properly support nested patterns and to allow running a command with a value for a pattern with a start and an end #TINY-2991 - Removed unnecessary 'flex' and unused 'colspan' properties from the new dialog APIs #TINY-2973 - Changed checkboxes to use a boolean for its state, instead of a string #TINY-2848 - Fixed dropdown buttons missing the 'type' attribute, which could cause forms to be incorrectly submitted #TINY-2826 - Fixed emoticon and charmap search not returning expected results in certain cases #TINY-3084 - Changed formatting menus so they are registered and made the align toolbar button use an icon instead of text #TINY-2880 - Fixed blank rel_list values throwing an exception in the link plugin #TINY-3149 -Version 5.0.0-rc-1 (2019-01-08) - Updated the font select dropdown logic to try to detect the system font stack and show "System Font" as the font name #TINY-2710 - Fixed readonly mode not fully disabling editing content #TINY-2287 - Updated the autocompleter to only show when it has matched items #TINY-2350 - Added editor settings functionality to specify title attributes for toolbar groups #TINY-2690 - Added icons instead of button text to improve Search and Replace dialog footer appearance #TINY-2654 - Added `tox-dialog__table` instead of `mce-table-striped` class to enhance Help dialog appearance #TINY-2360 - Added title attribute to iframes so, screen readers can announce iframe labels #TINY-2692 - Updated SizeInput labels to "Height" and "Width" instead of Dimensions #TINY-2833 - Fixed accessibility issues with the font select, font size, style select and format select toolbar dropdowns #TINY-2713 - Fixed accessibility issues with split dropdowns #TINY-2697 - Added a wordcount menu item, that defaults to appearing in the tools menu #TINY-2877 - Fixed the legacyoutput plugin to be compatible with TinyMCE 5.0 #TINY-2301 - Updated the build process to minify and generate ASCII only output for the emoticons database #TINY-2744 - Fixed icons not showing correctly in the autocompleter popup #TINY-3029 - Fixed an issue where preview wouldn't show anything in Edge under certain circumstances #TINY-3035 - Fixed the height being incorrectly calculated for the autoresize plugin #TINY-2807 -Version 5.0.0-beta-1 (2018-11-30) - Changed the name of the "inlite" plugin to "quickbars" #TINY-2831 - Fixed an inline mode issue where the save plugin upon saving can cause content loss #TINY-2659 - Changed the background color icon to highlight background icon #TINY-2258 - Added a new `addNestedMenuItem()` UI registry function and changed all nested menu items to use the new registry functions #TINY-2230 - Changed Help dialog to be accessible to screen readers #TINY-2687 - Changed the color swatch to save selected custom colors to local storage for use across sessions #TINY-2722 - Added title attribute to color swatch colors #TINY-2669 - Added anchorbar component to anchor inline toolbar dialogs to instead of the toolbar #TINY-2040 - Added support for toolbar and toolbar array config options to be squashed into a single toolbar and not create multiple toolbars #TINY-2195 - Added error handling for when forced_root_block config option is set to true #TINY-2261 - Added functionality for the removed_menuitems config option #TINY-2184 - Fixed an issue in IE 11 where calling selection.getContent() would return an empty string when the editor didn't have focus #TINY-2325 - Added the ability to use a string to reference menu items in menu buttons and submenu items #TINY-2253 - Removed compat3x plugin #TINY-2815 - Changed `WindowManager` API - methods `getParams`, `setParams` and `getWindows`, and the legacy `windows` property, have been removed. `alert` and `confirm` dialogs are no longer tracked in the window list. #TINY-2603 -Version 5.0.0-preview-4 (2018-11-12) - Fixed distraction free plugin #AP-470 - Removed the tox-custom-editor class that was added to the wrapping element of codemirror #TINY-2211 - Fixed contents of the input field being selected on focus instead of just recieving an outline highlight #AP-464 - Added width and height placeholder text to image and media dialog dimensions input #AP-296 - Fixed styling issues with dialogs and menus in IE 11 #AP-456 - Fixed custom style format control not honoring custom formats #AP-393 - Fixed context menu not appearing when clicking an image with a caption #AP-382 - Fixed directionality of UI when using an RTL language #AP-423 - Fixed page responsiveness with multiple inline editors #AP-430 - Added the ability to keyboard navigate through menus, toolbars, sidebar and the status bar sequentially #AP-381 - Fixed empty toolbar groups appearing through invalid configuration of the `toolbar` property #AP-450 - Fixed text not being retained when updating links through the link dialog #AP-293 - Added translation capability back to the editor's UI #AP-282 - Fixed edit image context menu, context toolbar and toolbar items being incorrectly enabled when selecting invalid images #AP-323 - Fixed emoji type ahead being shown when typing URLs #AP-366 - Fixed toolbar configuration properties incorrectly expecting string arrays instead of strings #AP-342 - Changed the editor resize handle so that it should be disabled when the autoresize plugin is turned on #AP-424 - Fixed the block formatting toolbar item not showing a "Formatting" title when there is no selection #AP-321 - Fixed clicking disabled toolbar buttons hiding the toolbar in inline mode #AP-380 - Fixed `EditorResize` event not being fired upon editor resize #AP-327 - Fixed tables losing styles when updating through the dialog #AP-368 - Fixed context toolbar positioning to be more consistent near the edges of the editor #AP-318 - Added `label` component type for dialogs to group components under a label - Fixed table of contents plugin now works with v5 toolbar APIs correctly #AP-347 - Fixed the `link_context_toolbar` configuration not disabling the context toolbar #AP-458 - Fixed the link context toolbar showing incorrect relative links #AP-435 - Fixed the alignment of the icon in alert banner dialog components #TINY-2220 - Changed UI text for microcopy improvements #TINY-2281 - Fixed the visual blocks and visual char menu options not displaying their toggled state #TINY-2238 - Fixed the editor not displaying as fullscreen when toggled #TINY-2237 -Version 5.0.0-preview-3 (2018-10-18) - Changed editor layout to use modern CSS properties over manually calculating dimensions #AP-324 - Changed `autoresize_min_height` and `autoresize_max_height` configurations to `min_height` and `max_height` #AP-324 - Fixed bugs with editor width jumping when resizing and the iframe not resizing to smaller than 150px in height #AP-324 - Fixed mobile theme bug that prevented the editor from loading #AP-404 - Fixed long toolbar groups extending outside of the editor instead of wrapping - Changed `Whole word` label in Search and Replace dialog to `Find whole words only` #AP-387 - Fixed dialog titles so they are now proper case #AP-384 - Fixed color picker default to be #000000 instead of #ff00ff #AP-216 - Fixed "match case" option on the Find and Replace dialog is no longer selected by default #AP-298 - Fixed vertical alignment of toolbar icons #DES-134 - Fixed toolbar icons not appearing on IE11 #DES-133 -Version 5.0.0-preview-2 (2018-10-10) - Changed configuration of color options has been simplified to `color_map`, `color_cols`, and `custom_colors` #AP-328 - Added swatch is now shown for colorinput fields, instead of the colorpicker directly #AP-328 - Removed `colorpicker` plugin, it is now in the theme #AP-328 - Removed `textcolor` plugin, it is now in the theme #AP-328 - Fixed styleselect not updating the displayed item as the cursor moved #AP-388 - Changed `height` configuration to apply to the editor frame (including menubar, toolbar, status bar) instead of the content area #AP-324 - Added fontformats and fontsizes menu items #AP-390 - Fixed preview iframe not expanding to the dialog size #AP-252 - Fixed 'meta' shortcuts not translated into platform-specific text #AP-270 - Fixed tabbed dialogs (Charmap and Emoticons) shrinking when no search results returned - Fixed a bug where alert banner icons were not retrieved from icon pack. #AP-330 - Fixed component styles to flex so they fill large dialogs. #AP-252 - Fixed editor flashing unstyled during load (still in progress). #AP-349 -Version 5.0.0-preview-1 (2018-10-01) - Developer preview 1 - Initial list of features and changes is available at https://tiny.cloud/docs-preview/release-notes/new-features/ -Version 4.9.3 (2019-01-31) - Added a visualchars_default_state setting to the Visualchars Plugin. Patch contributed by mat3e. - Fixed a bug where scrolling on a page with more than one editor would cause a ResizeWindow event to fire. #TINY-3247 - Fixed a bug where if a plugin threw an error during initialisation the whole editor would fail to load. #TINY-3243 - Fixed a bug where getContent would include bogus elements when valid_elements setting was set up in a specific way. #TINY-3213 - Fixed a bug where only a few function key names could be used when creating keyboard shortcuts. #TINY-3146 - Fixed a bug where it wasn't possible to enter spaces into an editor after pressing shift+enter. #TINY-3099 - Fixed a bug where no caret would be rendered after backspacing to a contenteditable false element. #TINY-2998 - Fixed a bug where deletion to/from indented lists would leave list fragments in the editor. #TINY-2981 -Version 4.9.2 (2018-12-17) - Fixed a bug with pressing the space key on IE 11 would result in nbsp characters being inserted between words at the end of a block. #TINY-2996 - Fixed a bug where character composition using quote and space on US International keyboards would produce a space instead of a quote. #TINY-2999 - Fixed a bug where remove format wouldn't remove the inner most inline element in some situations. #TINY-2982 - Fixed a bug where outdenting an list item would affect attributes on other list items within the same list. #TINY-2971 - Fixed a bug where the DomParser filters wouldn't be applied for elements created when parsing invalid html. #TINY-2978 - Fixed a bug where setProgressState wouldn't automatically close floating ui elements like menus. #TINY-2896 - Fixed a bug where it wasn't possible to navigate out of a figcaption element using the arrow keys. #TINY-2894 - Fixed a bug where enter key before an image inside a link would remove the image. #TINY-2780 -Version 4.9.1 (2018-12-04) - Added functionality to insert html to the replacement feature of the Textpattern Plugin. #TINY-2839 - Fixed a bug where `editor.selection.getContent({format: 'text'})` didn't work as expected in IE11 on an unfocused editor. #TINY-2862 - Fixed a bug in the Textpattern Plugin where the editor would get an incorrect selection after inserting a text pattern on Safari. #TINY-2838 - Fixed a bug where the space bar didn't work correctly in editors with the forced_root_block setting set to false. #TINY-2816 -Version 4.9.0 (2018-11-27) - Added a replace feature to the Textpattern Plugin. #TINY-1908 - Added functionality to the Lists Plugin that improves the indentation logic. #TINY-1790 - Fixed a bug where it wasn't possible to delete/backspace when the caret was between a contentEditable=false element and a BR. #TINY-2372 - Fixed a bug where copying table cells without a text selection would fail to copy anything. #TINY-1789 - Implemented missing `autosave_restore_when_empty` functionality in the Autosave Plugin. Patch contributed by gzzo. #GH-4447 - Reduced insertion of unnecessary nonbreaking spaces in the editor. #TINY-1879 -Version 4.8.5 (2018-10-30) - Added a content_css_cors setting to the editor that adds the crossorigin="anonymous" attribute to link tags added by the StyleSheetLoader. #TINY-1909 - Fixed a bug where trying to remove formatting with a collapsed selection range would throw an exception. #GH-4636 - Fixed a bug in the image plugin that caused updating figures to split contenteditable elements. #GH-4563 - Fixed a bug that was causing incorrect viewport calculations for fixed position UI elements. #TINY-1897 - Fixed a bug where inline formatting would cause the delete key to do nothing. #TINY-1900 -Version 4.8.4 (2018-10-23) - Added support for the HTML5 `main` element. #TINY-1877 - Changed the keyboard shortcut to move focus to contextual toolbars to Ctrl+F9. #TINY-1812 - Fixed a bug where content css could not be loaded from another domain. #TINY-1891 - Fixed a bug on FireFox where the cursor would get stuck between two contenteditable false inline elements located inside of the same block element divided by a BR. #TINY-1878 - Fixed a bug with the insertContent method where nonbreaking spaces would be inserted incorrectly. #TINY-1868 - Fixed a bug where the toolbar of the inline editor would not be visible in some scenarios. #TINY-1862 - Fixed a bug where removing the editor while more than one notification was open would throw an error. #TINY-1845 - Fixed a bug where the menubutton would be rendered on top of the menu if the viewport didn't have enough height. #TINY-1678 - Fixed a bug with the annotations api where annotating collapsed selections caused problems. #TBS-2449 - Fixed a bug where wbr elements were being transformed into whitespace when using the Paste Plugin's paste as text setting. #GH-4638 - Fixed a bug where the Search and Replace didn't replace spaces correctly. #GH-4632 - Fixed a bug with sublist items not persisting selection. #GH-4628 - Fixed a bug with mceInsertRawHTML command not working as expected. #GH-4625 -Version 4.8.3 (2018-09-13) - Fixed a bug where the Wordcount Plugin didn't correctly count words within tables on IE11. #TINY-1770 - Fixed a bug where it wasn't possible to move the caret out of a table on IE11 and Firefox. #TINY-1682 - Fixed a bug where merging empty blocks didn't work as expected, sometimes causing content to be deleted. #TINY-1781 - Fixed a bug where the Textcolor Plugin didn't show the correct current color. #TINY-1810 - Fixed a bug where clear formatting with a collapsed selection would sometimes clear formatting from more content than expected. #TINY-1813 #TINY-1821 - Fixed a bug with the Table Plugin where it wasn't possible to keyboard navigate to the caption. #TINY-1818 -Version 4.8.2 (2018-08-09) - Moved annotator from "experimental" to "annotator" object on editor. #TBS-2398 - Improved the multiclick normalization across browsers. #TINY-1788 - Fixed a bug where running getSelectedBlocks with a collapsed selection between block elements would produce incorrect results. #TINY-1787 - Fixed a bug where the ScriptLoaders loadScript method would not work as expected in FireFox when loaded on the same page as a ShadowDOM polyfill. #TINY-1786 - Removed reference to ShadowDOM event.path as Blink based browsers now support event.composedPath. #TINY-1785 - Fixed a bug where a reference to localStorage would throw an "access denied" error in IE11 with strict security settings. #TINY-1782 - Fixed a bug where pasting using the toolbar button on an inline editor in IE11 would cause a looping behaviour. #TINY-1768 -Version 4.8.1 (2018-07-26) - Fixed a bug where the content of inline editors was being cleaned on every call of `editor.save()`. #TINY-1783 - Fixed a bug where the arrow of the Inlite Theme toolbar was being rendered incorrectly in RTL mode. #TINY-1776 - Fixed a bug with the Paste Plugin where pasting after inline contenteditable false elements moved the caret to the end of the line. #TINY-1758 -Version 4.8.0 (2018-06-27) - Added new "experimental" object in editor, with initial Annotator API. #TBS-2374 - Fixed a bug where deleting paragraphs inside of table cells would delete the whole table cell. #TINY-1759 - Fixed a bug in the Table Plugin where removing row height set on the row properties dialog did not update the table. #TINY-1730 - Fixed a bug with the font select toolbar item didn't update correctly. #TINY-1683 - Fixed a bug where all bogus elements would not be deleted when removing an inline editor. #TINY-1669 -Version 4.7.13 (2018-05-16) - Fixed a bug where Edge 17 wouldn't be able to select images or tables. #TINY-1679 - Fixed issue where whitespace wasn't preserved when the editor was initialized on pre elements. #TINY-1649 - Fixed a bug with the fontselect dropdowns throwing an error if the editor was hidden in Firefox. #TINY-1664 - Fixed a bug where it wasn't possible to merge table cells on IE 11. #TINY-1671 - Fixed a bug where textcolor wasn't applying properly on IE 11 in some situations. #TINY-1663 - Fixed a bug where the justifyfull command state wasn't working correctly. #TINY-1677 - Fixed a bug where the styles wasn't updated correctly when resizing some tables. #TINY-1668 - Added missing code menu item from the default menu config. #TINY-1648 - Added new align button for combining the separate align buttons into a menu button. #TINY-1652 -Version 4.7.12 (2018-05-03) - Added an option to filter out image svg data urls. - Added support for html5 details and summary elements. - Changed so the mce-abs-layout-item css rule targets html instead of body. Patch contributed by nazar-pc. - Fixed a bug where the "read" step on the mobile theme was still present on android mobile browsers. - Fixed a bug where all images in the editor document would reload on any editor change. - Fixed a bug with the Table Plugin where ObjectResized event wasn't being triggered on column resize. - Fixed so the selection is set to the first suitable caret position after editor.setContent called. - Fixed so links with xlink:href attributes are filtered correctly to prevent XSS. - Fixed a bug on IE11 where pasting content into an inline editor initialized on a heading element would create new editable elements. - Fixed a bug where readonly mode would not work as expected when the editor contained contentEditable=true elements. - Fixed a bug where the Link Plugin would throw an error when used together with the webcomponents polyfill. Patch contributed by 4esnog. - Fixed a bug where the "Powered by TinyMCE" branding link would break on XHTML pages. Patch contributed by tistre. - Fixed a bug where the same id would be used in the blobcache for all pasted images. Patch contributed by thorn0. -Version 4.7.11 (2018-04-11) - Added a new imagetools_credentials_hosts option to the Imagetools Plugin. - Fixed a bug where toggling a list containing empty LIs would throw an error. Patch contributed by bradleyke. - Fixed a bug where applying block styles to a text with the caret at the end of the paragraph would select all text in the paragraph. - Fixed a bug where toggling on the Spellchecker Plugin would trigger isDirty on the editor. - Fixed a bug where it was possible to enter content into selection bookmark spans. - Fixed a bug where if a non paragraph block was configured in forced_root_block the editor.getContent method would return incorrect values with an empty editor. - Fixed a bug where dropdown menu panels stayed open and fixed in position when dragging dialog windows. - Fixed a bug where it wasn't possible to extend table cells with the space button in Safari. - Fixed a bug where the setupeditor event would thrown an error when using the Compat3x Plugin. - Fixed a bug where an error was thrown in FontInfo when called on a detached element. -Version 4.7.10 (2018-04-03) - Removed the "read" step from the mobile theme. - Added normalization of triple clicks across browsers in the editor. - Added a `hasFocus` method to the editor that checks if the editor has focus. - Added correct icon to the Nonbreaking Plugin menu item. - Fixed so the `getContent`/`setContent` methods work even if the editor is not initialized. - Fixed a bug with the Media Plugin where query strings were being stripped from youtube links. - Fixed a bug where image styles were changed/removed when opening and closing the Image Plugin dialog. - Fixed a bug in the Table Plugin where some table cell styles were not correctly added to the content html. - Fixed a bug in the Spellchecker Plugin where it wasn't possible to change the spellchecker language. - Fixed so the the unlink action in the Link Plugin has a menu item and can be added to the contextmenu. - Fixed a bug where it wasn't possible to keyboard navigate to the start of an inline element on a new line within the same block element. - Fixed a bug with the Text Color Plugin where if used with an inline editor located at the bottom of the screen the colorpicker could appear off screen. - Fixed a bug with the UndoManager where undo levels were being added for nbzwsp characters. - Fixed a bug with the Table Plugin where the caret would sometimes be lost when keyboard navigating up through a table. - Fixed a bug where FontInfo.getFontFamily would throw an error when called on a removed editor. - Fixed a bug in Firefox where undo levels were not being added correctly for some specific operations. - Fixed a bug where initializing an inline editor inside of a table would make the whole table resizeable. - Fixed a bug where the fake cursor that appears next to tables on Firefox was positioned incorrectly when switching to fullscreen. - Fixed a bug where zwsp's weren't trimmed from the output from `editor.getContent({ format: 'text' })`. - Fixed a bug where the fontsizeselect/fontselect toolbar items showed the body info rather than the first possible caret position info on init. - Fixed a bug where it wasn't possible to select all content if the editor only contained an inline boundary element. - Fixed a bug where `content_css` urls with query strings wasn't working. - Fixed a bug in the Table Plugin where some table row styles were removed when changing other styles in the row properties dialog. -Version 4.7.9 (2018-02-27) - Fixed a bug where the editor target element didn't get the correct style when removing the editor. -Version 4.7.8 (2018-02-26) - Fixed an issue with the Help Plugin where the menuitem name wasn't lowercase. - Fixed an issue on MacOS where text and bold text did not have the same line-height in the autocomplete dropdown in the Link Plugin dialog. - Fixed a bug where the "paste as text" option in the Paste Plugin didn't work. - Fixed a bug where dialog list boxes didn't get positioned correctly in documents with scroll. - Fixed a bug where the Inlite Theme didn't use the Table Plugin api to insert correct tables. - Fixed a bug where the Inlite Theme panel didn't hide on blur in a correct way. - Fixed a bug where placing the cursor before a table in Firefox would scroll to the bottom of the table. - Fixed a bug where selecting partial text in table cells with rowspans and deleting would produce faulty tables. - Fixed a bug where the Preview Plugin didn't work on Safari due to sandbox security. - Fixed a bug where table cell selection using the keyboard threw an error. - Fixed so the font size and font family doesn't toggle the text but only sets the selected format on the selected text. - Fixed so the built-in spellchecking on Chrome and Safari creates an undo level when replacing words. -Version 4.7.7 (2018-02-19) - Added a border style selector to the advanced tab of the Image Plugin. - Added better controls for default table inserted by the Table Plugin. - Added new `table_responsive_width` option to the Table Plugin that controls whether to use pixel or percentage widths. - Fixed a bug where the Link Plugin text didn't update when a URL was pasted using the context menu. - Fixed a bug with the Spellchecker Plugin where using "Add to dictionary" in the context menu threw an error. - Fixed a bug in the Media Plugin where the preview node for iframes got default width and height attributes that interfered with width/height styles. - Fixed a bug where backslashes were being added to some font family names in Firefox in the fontselect toolbar item. - Fixed a bug where errors would be thrown when trying to remove an editor that had not yet been fully initialized. - Fixed a bug where the Imagetools Plugin didn't update the images atomically. - Fixed a bug where the Fullscreen Plugin was throwing errors when being used on an inline editor. - Fixed a bug where drop down menus weren't positioned correctly in inline editors on scroll. - Fixed a bug with a semicolon missing at the end of the bundled javascript files. - Fixed a bug in the Table Plugin with cursor navigation inside of tables where the cursor would sometimes jump into an incorrect table cells. - Fixed a bug where indenting a table that is a list item using the "Increase indent" button would create a nested table. - Fixed a bug where text nodes containing only whitespace were being wrapped by paragraph elements. - Fixed a bug where whitespace was being inserted after br tags inside of paragraph tags. - Fixed a bug where converting an indented paragraph to a list item would cause the list item to have extra padding. - Fixed a bug where Copy/Paste in an editor with a lot of content would cause the editor to scroll to the top of the content in IE11. - Fixed a bug with a memory leak in the DragHelper. Path contributed by ben-mckernan. - Fixed a bug where the advanced tab in the Media Plugin was being shown even if it didn't contain anything. Patch contributed by gabrieeel. - Fixed an outdated eventname in the EventUtils. Patch contributed by nazar-pc. - Fixed an issue where the Json.parse function would throw an error when being used on a page with strict CSP settings. - Fixed so you can place the curser before and after table elements within the editor in Firefox and Edge/IE. -Version 4.7.6 (2018-01-29) - Fixed a bug in the jquery integration where it threw an error saying that "global is not defined". - Fixed a bug where deleting a table cell whose previous sibling was set to contenteditable false would create a corrupted table. - Fixed a bug where highlighting text in an unfocused editor did not work correctly in IE11/Edge. - Fixed a bug where the table resize handles were not being repositioned when activating the Fullscreen Plugin. - Fixed a bug where the Imagetools Plugin dialog didn't honor editor RTL settings. - Fixed a bug where block elements weren't being merged correctly if you deleted from after a contenteditable false element to the beginning of another block element. - Fixed a bug where TinyMCE didn't work with module loaders like webpack. -Version 4.7.5 (2018-01-22) - Fixed bug with the Codesample Plugin where it wasn't possible to edit codesamples when the editor was in inline mode. - Fixed bug where focusing on the status bar broke the keyboard navigation functionality. - Fixed bug where an error would be thrown on Edge by the Table Plugin when pasting using the PowerPaste Plugin. - Fixed bug in the Table Plugin where selecting row border style from the dropdown menu in advanced row properties would throw an error. - Fixed bug with icons being rendered incorrectly on Chrome on Mac OS. - Fixed bug in the Textcolor Plugin where the font color and background color buttons wouldn't trigger an ExecCommand event. - Fixed bug in the Link Plugin where the url field wasn't forced LTR. - Fixed bug where the Nonbreaking Plugin incorrectly inserted spaces into tables. - Fixed bug with the inline theme where the toolbar wasn't repositioned on window resize. -Version 4.7.4 (2017-12-05) - Fixed bug in the Nonbreaking Plugin where the nonbreaking_force_tab setting was being ignored. - Fixed bug in the Table Plugin where changing row height incorrectly converted column widths to pixels. - Fixed bug in the Table Plugin on Edge and IE11 where resizing the last column after resizing the table would cause invalid column heights. - Fixed bug in the Table Plugin where keyboard navigation was not normalized between browsers. - Fixed bug in the Table Plugin where the colorpicker button would show even without defining the colorpicker_callback. - Fixed bug in the Table Plugin where it wasn't possible to set the cell background color. - Fixed bug where Firefox would throw an error when intialising an editor on an element that is hidden or not yet added to the DOM. - Fixed bug where Firefox would throw an error when intialising an editor inside of a hidden iframe. -Version 4.7.3 (2017-11-23) - Added functionality to open the Codesample Plugin dialog when double clicking on a codesample. Patch contributed by dakuzen. - Fixed bug where undo/redo didn't work correctly with some formats and caret positions. - Fixed bug where the color picker didn't show up in Table Plugin dialogs. - Fixed bug where it wasn't possible to change the width of a table through the Table Plugin dialog. - Fixed bug where the Charmap Plugin couldn't insert some special characters. - Fixed bug where editing a newly inserted link would not actually edit the link but insert a new link next to it. - Fixed bug where deleting all content in a table cell made it impossible to place the caret into it. - Fixed bug where the vertical alignment field in the Table Plugin cell properties dialog didn't do anything. - Fixed bug where an image with a caption showed two sets of resize handles in IE11. - Fixed bug where pressing the enter button inside of an h1 with contenteditable set to true would sometimes produce a p tag. - Fixed bug with backspace not working as expected before a noneditable element. - Fixed bug where operating on tables with invalid rowspans would cause an error to be thrown. - Fixed so a real base64 representation of the image is available on the blobInfo that the images_upload_handler gets called with. - Fixed so the image upload tab is available when the images_upload_handler is defined (and not only when the images_upload_url is defined). -Version 4.7.2 (2017-11-07) - Added newly rewritten Table Plugin. - Added support for attributes with colon in valid_elements and addValidElements. - Added support for dailymotion short url in the Media Plugin. Patch contributed by maat8. - Added support for converting to half pt when converting font size from px to pt. Patch contributed by danny6514. - Added support for location hash to the Autosave plugin to make it work better with SPAs using hash routing. - Added support for merging table cells when pasting a table into another table. - Changed so the language packs are only loaded once. Patch contributed by 0xor1. - Simplified the css for inline boundaries selection by switching to an attribute selector. - Fixed bug where an error would be thrown on editor initialization if the window.getSelection() returned null. - Fixed bug where holding down control or alt keys made the keyboard navigation inside an inline boundary not work as expected. - Fixed bug where applying formats in IE11 produced extra, empty paragraphs in the editor. - Fixed bug where the Word Count Plugin didn't count some mathematical operators correctly. - Fixed bug where removing an inline editor removed the element that the editor had been initialized on. - Fixed bug where setting the selection to the end of an editable container caused some formatting problems. - Fixed bug where an error would be thrown sometimes when an editor was removed because of the selection bookmark was being stored asynchronously. - Fixed a bug where an editor initialized on an empty list did not contain any valid cursor positions. - Fixed a bug with the Context Menu Plugin and webkit browsers on Mac where right-clicking inside a table would produce an incorrect selection. - Fixed bug where the Image Plugin constrain proportions setting wasn't working as expected. - Fixed bug where deleting the last character in a span with decorations produced an incorrect element when typing. - Fixed bug where focusing on inline editors made the toolbar flicker when moving between elements quickly. - Fixed bug where the selection would be stored incorrectly in inline editors when the mouseup event was fired outside the editor body. - Fixed bug where toggling bold at the end of an inline boundary would toggle off the whole word. - Fixed bug where setting the skin to false would not stop the loading of some skin css files. - Fixed bug in mobile theme where pinch-to-zoom would break after exiting the editor. - Fixed bug where sublists of a fully selected list would not be switched correctly when changing list style. - Fixed bug where inserting media by source would break the UndoManager. - Fixed bug where inserting some content into the editor with a specific selection would replace some content incorrectly. - Fixed bug where selecting all content with ctrl+a in IE11 caused problems with untoggling some formatting. - Fixed bug where the Search and Replace Plugin left some marker spans in the editor when undoing and redoing after replacing some content. - Fixed bug where the editor would not get a scrollbar when using the Fullscreen and Autoresize plugins together. - Fixed bug where the font selector would stop working correctly after selecting fonts three times. - Fixed so pressing the enter key inside of an inline boundary inserts a br after the inline boundary element. - Fixed a bug where it wasn't possible to use tab navigation inside of a table that was inside of a list. - Fixed bug where end_container_on_empty_block would incorrectly remove elements. - Fixed bug where content_styles weren't added to the Preview Plugin iframe. - Fixed so the beforeSetContent/beforeGetContent events are preventable. - Fixed bug where changing height value in Table Plugin advanced tab didn't do anything. - Fixed bug where it wasn't possible to remove formatting from content in beginning of table cell. -Version 4.7.1 (2017-10-09) - Fixed bug where theme set to false on an inline editor produced an extra div element after the target element. - Fixed bug where the editor drag icon was misaligned with the branding set to false. - Fixed bug where doubled menu items were not being removed as expected with the removed_menuitems setting. - Fixed bug where the Table of contents plugin threw an error when initialized. - Fixed bug where it wasn't possible to add inline formats to text selected right to left. - Fixed bug where the paste from plain text mode did not work as expected. - Fixed so the style previews do not set color and background color when selected. - Fixed bug where the Autolink plugin didn't work as expected with some formats applied on an empty editor. - Fixed bug where the Textpattern plugin were throwing errors on some patterns. - Fixed bug where the Save plugin saved all editors instead of only the active editor. Patch contributed by dannoe. -Version 4.7.0 (2017-10-03) - Added new mobile ui that is specifically designed for mobile devices. - Updated the default skin to be more modern and white since white is preferred by most implementations. - Restructured the default menus to be more similar to common office suites like Google Docs. - Fixed so theme can be set to false on both inline and iframe editor modes. - Fixed bug where inline editor would add/remove the visualblocks css multiple times. - Fixed bug where selection wouldn't be properly restored when editor lost focus and commands where invoked. - Fixed bug where toc plugin would generate id:s for headers even though a toc wasn't inserted into the content. - Fixed bug where is wasn't possible to drag/drop contents within the editor if paste_data_images where set to true. - Fixed bug where getParam and close in WindowManager would get the first opened window instead of the last opened window. - Fixed bug where delete would delete between cells inside a table in Firefox. -Version 4.6.7 (2017-09-18) - Fixed bug where paste wasn't working in IOS. - Fixed bug where the Word Count Plugin didn't count some mathematical operators correctly. - Fixed bug where inserting a list in a table caused the cell to expand in height. - Fixed bug where pressing enter in a list located inside of a table deleted list items instead of inserting new list item. - Fixed bug where copy and pasting table cells produced inconsistent results. - Fixed bug where initializing an editor with an ID of 'length' would throw an exception. - Fixed bug where it was possible to split a non merged table cell. - Fixed bug where copy and pasting a list with a very specific selection into another list would produce a nested list. - Fixed bug where copy and pasting ordered lists sometimes produced unordered lists. - Fixed bug where padded elements inside other elements would be treated as empty. - Added some missing translations to Image, Link and Help plugins. - Fixed so you can resize images inside a figure element. - Fixed bug where an inline TinyMCE editor initialized on a table did not set selection on load in Chrome. - Fixed the positioning of the inlite toolbar when the target element wasn't big enough to fit the toolbar. -Version 4.6.6 (2017-08-30) - Fixed so that notifications wrap long text content instead of bleeding outside the notification element. - Fixed so the content_style css is added after the skin and custom stylesheets. - Fixed bug where it wasn't possible to remove a table with the Cut button. - Fixed bug where the center format wasn't getting the same font size as the other formats in the format preview. - Fixed bug where the wordcount plugin wasn't counting hyphenated words correctly. - Fixed bug where all content pasted into the editor was added to the end of the editor. - Fixed bug where enter keydown on list item selection only deleted content and didn't create a new line. - Fixed bug where destroying the editor while the content css was still loading caused error notifications on Firefox. - Fixed bug where undoing cut operation in IE11 left some unwanted html in the editor content. - Fixed bug where enter keydown would throw an error in IE11. - Fixed bug where duplicate instances of an editor were added to the editors array when using the createEditor API. - Fixed bug where the formatter applied formats on the wrong content when spellchecker was activated. - Fixed bug where switching formats would reset font size on child nodes. - Fixed bug where the table caption element weren't always the first descendant to the table tag. - Fixed bug where pasting some content into the editor on chrome some newlines were removed. - Fixed bug where it wasn't possible to remove a list if a list item was a table element. - Fixed bug where copy/pasting partial selections of tables wouldn't produce a proper table. - Fixed bug where the searchreplace plugin could not find consecutive spaces. - Fixed bug where background color wasn't applied correctly on some partially selected contents. -Version 4.6.5 (2017-08-02) - Added new inline_boundaries_selector that allows you to specify the elements that should have boundaries. - Added new local upload feature this allows the user to upload images directly from the image dialog. - Added a new api for providing meta data for plugins. It will show up in the help dialog if it's provided. - Fixed so that the notifications created by the notification manager are more screen reader accessible. - Fixed bug where changing the list format on multiple selected lists didn't change all of the lists. - Fixed bug where the nonbreaking plugin would insert multiple undo levels when pressing the tab key. - Fixed bug where delete/backspace wouldn't render a caret when all editor contents where deleted. - Fixed bug where delete/backspace wouldn't render a caret if the deleted element was a single contentEditable false element. - Fixed bug where the wordcount plugin wouldn't count words correctly if word where typed after applying a style format. - Fixed bug where the wordcount plugin would count mathematical formulas as multiple words for example 1+1=2. - Fixed bug where formatting of triple clicked blocks on Chrome/Safari would result in styles being added outside the visual selection. - Fixed bug where paste would add the contents to the end of the editor area when inline mode was used. - Fixed bug where toggling off bold formatting on text entered in a new paragraph would add an extra line break. - Fixed bug where autolink plugin would only produce a link on every other consecutive link on Firefox. - Fixed bug where it wasn't possible to select all contents if the content only had one pre element. - Fixed bug where sizzle would produce lagging behavior on some sites due to repaints caused by feature detection. - Fixed bug where toggling off inline formats wouldn't include the space on selected contents with leading or trailing spaces. - Fixed bug where the cut operation in UI wouldn't work in Chrome. - Fixed bug where some legacy editor initialization logic would throw exceptions about editor settings not being defined. - Fixed bug where it wasn't possible to apply text color to links if they where part of a non collapsed selection. - Fixed bug where an exception would be thrown if the user selected a video element and then moved the focus outside the editor. - Fixed bug where list operations didn't work if there where block elements inside the list items. - Fixed bug where applying block formats to lists wrapped in block elements would apply to all elements in that wrapped block. -Version 4.6.4 (2017-06-13) - Fixed bug where the editor would move the caret when clicking on the scrollbar next to a content editable false block. - Fixed bug where the text color select dropdowns wasn't placed correctly when they didn't fit the width of the screen. - Fixed bug where the default editor line height wasn't working for mixed font size contents. - Fixed bug where the content css files for inline editors were loaded multiple times for multiple editor instances. - Fixed bug where the initial value of the font size/font family dropdowns wasn't displayed. - Fixed bug where the I18n api was not supporting arrays as the translation replacement values. - Fixed bug where chrome would display "The given range isn't in document." errors for invalid ranges passed to setRng. - Fixed bug where the compat3x plugin wasn't working since the global tinymce references wasn't resolved correctly. - Fixed bug where the preview plugin wasn't encoding the base url passed into the iframe contents producing a xss bug. - Fixed bug where the dom parser/serializer wasn't handling some special elements like noframes, title and xmp. - Fixed bug where the dom parser/serializer wasn't handling cdata sections with comments inside. - Fixed bug where the editor would scroll to the top of the editable area if a dialog was closed in inline mode. - Fixed bug where the link dialog would not display the right rel value if rel_list was configured. - Fixed bug where the context menu would select images on some platforms but not others. - Fixed bug where the filenames of images were not retained on dragged and drop into the editor from the desktop. - Fixed bug where the paste plugin would misrepresent newlines when pasting plain text and having forced_root_block configured. - Fixed so that the error messages for the imagetools plugin is more human readable. - Fixed so the internal validate setting for the parser/serializer can't be set from editor initialization settings. -Version 4.6.3 (2017-05-30) - Fixed bug where the arrow keys didn't work correctly when navigating on nested inline boundary elements. - Fixed bug where delete/backspace didn't work correctly on nested inline boundary elements. - Fixed bug where image editing didn't work on subsequent edits of the same image. - Fixed bug where charmap descriptions wouldn't properly wrap if they exceeded the width of the box. - Fixed bug where the default image upload handler only accepted 200 as a valid http status code. - Fixed so rel on target=_blank links gets forced with only noopener instead of both noopener and noreferrer. -Version 4.6.2 (2017-05-23) - Fixed bug where the SaxParser would run out of memory on very large documents. - Fixed bug with formatting like font size wasn't applied to del elements. - Fixed bug where various api calls would be throwing exceptions if they where invoked on a removed editor instance. - Fixed bug where the branding position would be incorrect if the editor was inside a hidden tab and then later showed. - Fixed bug where the color levels feature in the imagetools dialog wasn't working properly. - Fixed bug where imagetools dialog wouldn't pre-load images from CORS domains, before trying to prepare them for editing. - Fixed bug where the tab key would move the caret to the next table cell if being pressed inside a list inside a table. - Fixed bug where the cut/copy operations would loose parent context like the current format etc. - Fixed bug with format preview not working on invalid elements excluded by valid_elements. - Fixed bug where blocks would be merged in incorrect order on backspace/delete. - Fixed bug where zero length text nodes would cause issues with the undo logic if there where iframes present. - Fixed bug where the font size/family select lists would throw errors if the first node was a comment. - Fixed bug with csp having to allow local script evaluation since it was used to detect global scope. - Fixed bug where CSP required a relaxed option for javascript: URLs in unsupported legacy browsers. - Fixed bug where a fake caret would be rendered for td with the contenteditable=false. - Fixed bug where typing would be blocked on IE 11 when within a nested contenteditable=true/false structure. -Version 4.6.1 (2017-05-10) - Added configuration option to list plugin to disable tab indentation. - Fixed bug where format change on very specific content could cause the selection to change. - Fixed bug where TinyMCE could not be lazyloaded through jquery integration. - Fixed bug where entities in style attributes weren't decoded correctly on paste in webkit. - Fixed bug where fontsize_formats option had been renamed incorrectly. - Fixed bug with broken backspace/delete behaviour between contenteditable=false blocks. - Fixed bug where it wasn't possible to backspace to the previous line with the inline boundaries functionality turned on. - Fixed bug where is wasn't possible to move caret left and right around a linked image with the inline boundaries functionality turned on. - Fixed bug where pressing enter after/before hr element threw exception. Patch contributed bradleyke. - Fixed so the CSS in the visualblocks plugin doesn't overwrite background color. Patch contributed by Christian Rank. - Fixed bug where multibyte characters weren't encoded correctly. Patch contributed by James Tarkenton. - Fixed bug where shift-click to select within contenteditable=true fields wasn't working. -Version 4.6.0 (2017-05-04) - Dropped support for IE 8-10 due to market share and lack of support from Microsoft. See tinymce docs for details. - Added an inline boundary caret position feature that makes it easier to type at the beginning/end of links/code elements. - Added a help plugin that adds a button and a dialog showing the editor shortcuts and loaded plugins. - Added an inline_boundaries option that allows you to disable the inline boundary feature if it's not desired. - Added a new ScrollIntoView event that allows you to override the default scroll to element behavior. - Added role and aria- attributes as valid elements in the default valid elements config. - Added new internal flag for PastePreProcess/PastePostProcess this is useful to know if the paste was coming from an external source. - Added new ignore function to UndoManager this works similar to transact except that it doesn't add an undo level by default. - Fixed so that urls gets retained for images when being edited. This url is then passed on to the upload handler. - Fixed so that the editors would be initialized on readyState interactive instead of complete. - Fixed so that the init event of the editor gets fired once all contentCSS files have been properly loaded. - Fixed so that width/height of the editor gets taken from the textarea element if it's explicitly specified in styles. - Fixed so that keep_styles set to false no longer clones class/style from the previous paragraph on enter. - Fixed so that the default line-height is 1.2em to avoid zwnbsp characters from producing text rendering glitches on Windows. - Fixed so that loading errors of content css gets presented by a notification message. - Fixed so figure image elements can be linked when selected this wraps the figure image in a anchor element. - Fixed bug where it wasn't possible to copy/paste rows with colspans by using the table copy/paste feature. - Fixed bug where the protect setting wasn't properly applied to header/footer parts when using the fullpage plugin. - Fixed bug where custom formats that specified upper case element names where not applied correctly. - Fixed bug where some screen readers weren't reading buttons due to an aria specific fix for IE 8. - Fixed bug where cut wasn't working correctly on iOS due to it's clipboard API not working correctly. - Fixed bug where Edge would paste div elements instead of paragraphs when pasting plain text. - Fixed bug where the textpattern plugin wasn't dealing with trailing punctuations correctly. - Fixed bug where image editing would some times change the image format from jpg to png. - Fixed bug where some UI elements could be inserted into the toolbar even if they where not registered. - Fixed bug where it was possible to click the TD instead of the character in the character map and that caused an exception. - Fixed bug where the font size/font family dropdowns would sometimes show an incorrect value due to css not being loaded in time. - Fixed bug with the media plugin inserting undefined instead of retaining size when media_dimensions was set to false. - Fixed bug with deleting images when forced_root_blocks where set to false. - Fixed bug where input focus wasn't properly handled on nested content editable elements. - Fixed bug where Chrome/Firefox would throw an exception when selecting images due to recent change of setBaseAndExtent support. - Fixed bug where malformed blobs would throw exceptions now they are simply ignored. - Fixed bug where backspace/delete wouldn't work properly in some cases where all contents was selected in WebKit. - Fixed bug with Angular producing errors since it was expecting events objects to be patched with their custom properties. - Fixed bug where the formatter would apply formatting to spellchecker errors now all bogus elements are excluded. - Fixed bug with backspace/delete inside table caption elements wouldn't behave properly on IE 11. - Fixed bug where typing after a contenteditable false inline element could move the caret to the end of that element. - Fixed bug where backspace before/after contenteditable false blocks wouldn't properly remove the right element. - Fixed bug where backspace before/after contenteditable false inline elements wouldn't properly empty the current block element. - Fixed bug where vertical caret navigation with a custom line-height would sometimes match incorrect positions. - Fixed bug with paste on Edge where character encoding wasn't handled properly due to a browser bug. - Fixed bug with paste on Edge where extra fragment data was inserted into the contents when pasting. - Fixed bug with pasting contents when having a whole block element selected on WebKit could cause WebKit spans to appear. - Fixed bug where the visualchars plugin wasn't working correctly showing invisible nbsp characters. - Fixed bug where browsers would hang if you tried to load some malformed html contents. - Fixed bug where the init call promise wouldn't resolve if the specified selector didn't find any matching elements. - Fixed bug where the Schema isValidChild function was case sensitive. -Version 4.5.3 (2017-02-01) - Added keyboard navigation for menu buttons when the menu is in focus. - Added api to the list plugin for setting custom classes/attributes on lists. - Added validation for the anchor plugin input field according to W3C id naming specifications. - Fixed bug where media placeholders were removed after resize with the forced_root_block setting set to false. - Fixed bug where deleting selections with similar sibling nodes sometimes deleted the whole document. - Fixed bug with inlite theme where several toolbars would appear scrolling when more than one instance of the editor was in use. - Fixed bug where the editor would throw error with the fontselect plugin on hidden editor instances in Firefox. - Fixed bug where the background color would not stretch to the font size. - Fixed bug where font size would be removed when changing background color. - Fixed bug where the undomanager trimmed away whitespace between nodes on undo/redo. - Fixed bug where media_dimensions=false in media plugin caused the editor to throw an error. - Fixed bug where IE was producing font/u elements within links on paste. - Fixed bug where some button tooltips were broken when compat3x was in use. - Fixed bug where backspace/delete/typeover would remove the caption element. - Fixed bug where powerspell failed to function when compat3x was enabled. - Fixed bug where it wasn't possible to apply sub/sup on text with large font size. - Fixed bug where pre tags with spaces weren't treated as content. - Fixed bug where Meta+A would select the entire document instead of all contents in nested ce=true elements. -Version 4.5.2 (2017-01-04) - Added missing keyboard shortcut description for the underline menu item in the format menu. - Fixed bug where external blob urls wasn't properly handled by editor upload logic. Patch contributed by David Oviedo. - Fixed bug where urls wasn't treated as a single word by the wordcount plugin. - Fixed bug where nbsp characters wasn't treated as word delimiters by the wordcount plugin. - Fixed bug where editor instance wasn't properly passed to the format preview logic. Patch contributed by NullQuery. - Fixed bug where the fake caret wasn't hidden when you moved selection to a cE=false element. - Fixed bug where it wasn't possible to edit existing code sample blocks. - Fixed bug where it wasn't possible to delete editor contents if the selection included an empty block. - Fixed bug where the formatter wasn't expanding words on some international characters. Patch contributed by Martin Larochelle. - Fixed bug where the open link feature wasn't working correctly on IE 11. - Fixed bug where enter before/after a cE=false block wouldn't properly padd the paragraph with an br element. - Fixed so font size and font family select boxes always displays a value by using the runtime style as a fallback. - Fixed so missing plugins will be logged to console as warnings rather than halting the initialization of the editor. - Fixed so splitbuttons become normal buttons in advlist plugin if styles are empty. Patch contributed by René Schleusner. - Fixed so you can multi insert rows/cols by selecting table cells and using insert rows/columns. -Version 4.5.1 (2016-12-07) - Fixed bug where the lists plugin wouldn't initialize without the advlist plugins if served from cdn. - Fixed bug where selectors with "*" would cause the style format preview to throw an error. - Fixed bug with toggling lists off on lists with empty list items would throw an error. - Fixed bug where editing images would produce non existing blob uris. - Fixed bug where the offscreen toc selection would be treated as the real toc element. - Fixed bug where the aria level attribute for element path would have an incorrect start index. - Fixed bug where the offscreen selection of cE=false that where very wide would be shown onscreen. Patch contributed by Steven Bufton. - Fixed so the default_link_target gets applied to links created by the autolink plugin. - Fixed so that the name attribute gets removed by the anchor plugin if editing anchors. -Version 4.5.0 (2016-11-23) - Added new toc plugin allows you to insert table of contents based on editor headings. - Added new auto complete menu to all url fields. Adds history, link to anchors etc. - Added new sidebar api that allows you to add custom sidebar panels and buttons to toggle these. - Added new insert menu button that allows you to have multiple insert functions under the same menu button. - Added new open link feature to ctrl+click, alt+enter and context menu. - Added new media_embed_handler option to allow the media plugin to be populated with custom embeds. - Added new support for editing transparent images using the image tools dialog. - Added new images_reuse_filename option to allow filenames of images to be retained for upload. - Added new security feature where links with target="_blank" will by default get rel="noopener noreferrer". - Added new allow_unsafe_link_target to allow you to opt-out of the target="_blank" security feature. - Added new style_formats_autohide option to automatically hide styles based on context. - Added new codesample_content_css option to specify where the code sample prism css is loaded from. - Added new support for Japanese/Chinese word count following the unicode standards on this. - Added new fragmented undo levels this dramatically reduces flicker on contents with iframes. - Added new live previews for complex elements like table or lists. - Fixed bug where it wasn't possible to properly tab between controls in a dialog with a disabled form item control. - Fixed bug where firefox would generate a rectangle on elements produced after/before a cE=false elements. - Fixed bug with advlist plugin not switching list element format properly in some edge cases. - Fixed bug where col/rowspans wasn't correctly computed by the table plugin in some cases. - Fixed bug where the table plugin would thrown an error if object_resizing was disabled. - Fixed bug where some invalid markup would cause issues when running in XHTML mode. Patch contributed by Charles Bourasseau. - Fixed bug where the fullscreen class wouldn't be removed properly when closing dialogs. - Fixed bug where the PastePlainTextToggle event wasn't fired by the paste plugin when the state changed. - Fixed bug where table the row type wasn't properly updated in table row dialog. Patch contributed by Matthias Balmer. - Fixed bug where select all and cut wouldn't place caret focus back to the editor in WebKit. Patch contributed by Daniel Jalkut. - Fixed bug where applying cell/row properties to multiple cells/rows would reset other unchanged properties. - Fixed bug where some elements in the schema would have redundant/incorrect children. - Fixed bug where selector and target options would cause issues if used together. - Fixed bug where drag/drop of images from desktop on chrome would thrown an error. - Fixed bug where cut on WebKit/Blink wouldn't add an undo level. - Fixed bug where IE 11 would scroll to the cE=false elements when they where selected. - Fixed bug where keys like F5 wouldn't work when a cE=false element was selected. - Fixed bug where the undo manager wouldn't stop the typing state when commands where executed. - Fixed bug where unlink on wrapped links wouldn't work properly. - Fixed bug with drag/drop of images on WebKit where the image would be deleted form the source editor. - Fixed bug where the visual characters mode would be disabled when contents was extracted from the editor. - Fixed bug where some browsers would toggle of formats applied to the caret when clicking in the editor toolbar. - Fixed bug where the custom theme function wasn't working correctly. - Fixed bug where image option for custom buttons required you to have icon specified as well. - Fixed bug where the context menu and contextual toolbars would be visible at the same time and sometimes overlapping. - Fixed bug where the noneditable plugin would double wrap elements when using the noneditable_regexp option. - Fixed bug where tables would get padding instead of margin when you used the indent button. - Fixed bug where the charmap plugin wouldn't properly insert non breaking spaces. - Fixed bug where the color previews in color input boxes wasn't properly updated. - Fixed bug where the list items of previous lists wasn't merged in the right order. - Fixed bug where it wasn't possible to drag/drop inline-block cE=false elements on IE 11. - Fixed bug where some table cell merges would produce incorrect rowspan/colspan. - Fixed so the font size of the editor defaults to 14px instead of 11px this can be overridden by custom css. - Fixed so wordcount is debounced to reduce cpu hogging on larger texts. - Fixed so tinymce global gets properly exported as a module when used with some module bundlers. - Fixed so it's possible to specify what css properties you want to preview on specific formats. - Fixed so anchors are contentEditable=false while within the editor. - Fixed so selected contents gets wrapped in a inline code element by the codesample plugin. - Fixed so conditional comments gets properly stripped independent of case. Patch contributed by Georgii Dolzhykov. - Fixed so some escaped css sequences gets properly handled. Patch contributed by Georgii Dolzhykov. - Fixed so notifications with the same message doesn't get displayed at the same time. - Fixed so F10 can be used as an alternative key to focus to the toolbar. - Fixed various api documentation issues and typos. - Removed layer plugin since it wasn't really ported from 3.x and there doesn't seem to be much use for it. - Removed moxieplayer.swf from the media plugin since it wasn't used by the media plugin. - Removed format state from the advlist plugin to be more consistent with common word processors. -Version 4.4.3 (2016-09-01) - Fixed bug where copy would produce an exception on Chrome. - Fixed bug where deleting lists on IE 11 would merge in correct text nodes. - Fixed bug where deleting partial lists with indentation wouldn't cause proper normalization. -Version 4.4.2 (2016-08-25) - Added new importcss_exclusive option to disable unique selectors per group. - Added new group specific selector_converter option to importcss plugin. - Added new codesample_languages option to apply custom languages to codesample plugin. - Added new codesample_dialog_width/codesample_dialog_height options. - Fixed bug where fullscreen button had an incorrect keyboard shortcut. - Fixed bug where backspace/delete wouldn't work correctly from a block to a cE=false element. - Fixed bug where smartpaste wasn't detecting links with special characters in them like tilde. - Fixed bug where the editor wouldn't get proper focus if you clicked on a cE=false element. - Fixed bug where it wasn't possible to copy/paste table rows that had merged cells. - Fixed bug where merging cells could some times produce invalid col/rowspan attibute values. - Fixed bug where getBody would sometimes thrown an exception now it just returns null if the iframe is clobbered. - Fixed bug where drag/drop of cE=false element wasn't properly constrained to viewport. - Fixed bug where contextmenu on Mac would collapse any selection to a caret. - Fixed bug where rtl mode wasn't rendered properly when loading a language pack with the rtl flag. - Fixed bug where Kamer word bounderies would be stripped from contents. - Fixed bug where lists would sometimes render two dots or numbers on the same line. - Fixed bug where the skin_url wasn't used by the inlite theme. - Fixed so data attributes are ignored when comparing formats in the formatter. - Fixed so it's possible to disable inline toolbars in the inlite theme. - Fixed so template dialog gets resized if it doesn't fit the window viewport. -Version 4.4.1 (2016-07-26) - Added smart_paste option to paste plugin to allow disabling the paste behavior if needed. - Fixed bug where png urls wasn't properly detected by the smart paste logic. - Fixed bug where the element path wasn't working properly when multiple editor instances where used. - Fixed bug with creating lists out of multiple paragraphs would just create one list item instead of multiple. - Fixed bug where scroll position wasn't properly handled by the inlite theme to place the toolbar properly. - Fixed bug where multiple instances of the editor using the inlite theme didn't render the toolbar properly. - Fixed bug where the shortcut label for fullscreen mode didn't match the actual shortcut key. - Fixed bug where it wasn't possible to select cE=false blocks using touch devices on for example iOS. - Fixed bug where it was possible to select the child image within a cE=false on IE 11. - Fixed so inserts of html containing lists doesn't merge with any existing lists unless it's a paste operation. -Version 4.4.0 (2016-06-30) - Added new inlite theme this is a more lightweight inline UI. - Added smarter paste logic that auto detects urls in the clipboard and inserts images/links based on that. - Added a better image resize algorithm for better image quality in the imagetools plugin. - Fixed bug where it wasn't possible to drag/dropping cE=false elements on FF. - Fixed bug where backspace/delete before/after a cE=false block would produce a new paragraph. - Fixed bug where list style type css property wasn't preserved when indenting lists. - Fixed bug where merging of lists where done even if the list style type was different. - Fixed bug where the image_dataimg_filter function wasn't used when pasting images. - Fixed bug where nested editable within a non editable element would cause scroll on focus in Chrome. - Fixed so invalid targets for inline mode is blocked on initialization. We only support elements that can have children. -Version 4.3.13 (2016-06-08) - Added characters with a diacritical mark to charmap plugin. Patch contributed by Dominik Schilling. - Added better error handling if the image proxy service would produce errors. - Fixed issue with pasting list items into list items would produce nested list rather than a merged list. - Fixed bug where table selection could get stuck in selection mode for inline editors. - Fixed bug where it was possible to place the caret inside the resize grid elements. - Fixed bug where it wasn't possible to place in elements horizontally adjacent cE=false blocks. - Fixed bug where multiple notifications wouldn't be properly placed on screen. - Fixed bug where multiple editor instance of the same id could be produces in some specific integrations. -Version 4.3.12 (2016-05-10) - Fixed bug where focus calls couldn't be made inside the editors PostRender event handler. - Fixed bug where some translations wouldn't work as expected due to a bug in editor.translate. - Fixed bug where the node change event could fire with a node out side the root of the editor. - Fixed bug where Chrome wouldn't properly present the keyboard paste clipboard details when paste was clicked. - Fixed bug where merged cells in tables couldn't be selected from right to left. - Fixed bug where insert row wouldn't properly update a merged cells rowspan property. - Fixed bug where the color input boxes preview field wasn't properly set on initialization. - Fixed bug where IME composition inside table cells wouldn't work as expected on IE 11. - Fixed so all shadow dom support is under and experimental flag due to flaky browser support. -Version 4.3.11 (2016-04-25) - Fixed bug where it wasn't possible to insert empty blocks though the API unless they where padded. - Fixed bug where you couldn't type the Euro character on Windows. - Fixed bug where backspace/delete from a cE=false element to a text block didn't work properly. - Fixed bug where the text color default grid would render incorrectly. - Fixed bug where the codesample plugin wouldn't load the css in the editor for multiple editors. - Fixed so the codesample plugin textarea gets focused by default. -Version 4.3.10 (2016-04-12) - Fixed bug where the key "y" on WebKit couldn't be entered due to conflict with keycode for F10 on keypress. -Version 4.3.9 (2016-04-12) - Added support for focusing the contextual toolbars using keyboard. - Added keyboard support for slider UI controls. You can no increase/decrease using arrow keys. - Added url pattern matching for Dailymotion to media plugin. Patch contributed by Bertrand Darbon. - Added body_class to template plugin preview. Patch contributed by Milen Petrinski. - Added options to better override textcolor pickers with custom colors. Patch contributed by Xavier Boubert. - Added visual arrows to inline contextual toolbars so that they point to the element being active. - Fixed so toolbars for tables or other larger elements get better positioned below the scrollable viewport. - Fixed bug where it was possible to click links inside cE=false blocks. - Fixed bug where event targets wasn't properly handled in Safari Technical Preview. - Fixed bug where drag/drop text in FF 45 would make the editor caret invisible. - Fixed bug where the remove state wasn't properly set on editor instances when detected as clobbered. - Fixed bug where offscreen selection of some cE=false elements would render onscreen. Patch contributed by Steven Bufton - Fixed bug where enter would clone styles out side the root on editors inside a span. Patch contributed by ChristophKaser. - Fixed bug where drag/drop of images into the editor didn't work correctly in FF. - Fixed so the first item in panels for the imagetools dialog gets proper keyboard focus. - Changed the Meta+Shift+F shortcut to Ctrl+Shift+F since Czech, Slovak, Polish languages used the first one for input. -Version 4.3.8 (2016-03-15) - Fixed bug where inserting HR at the end of a block element would produce an extra empty block. - Fixed bug where links would be clickable when readonly mode was enabled. - Fixed bug where the formatter would normalize to the wrong node on very specific content. - Fixed bug where some nested list items couldn't be indented properly. - Fixed bug where links where clickable in the preview dialog. - Fixed so the alt attribute doesn't get padded with an empty value by default. - Fixed so nested alignment works more correctly. You will now alter the alignment to the closest block parent. -Version 4.3.7 (2016-03-02) - Fixed bug where incorrect icons would be rendered for imagetools edit and color levels. - Fixed bug where navigation using arrow keys inside a SelectBox didn't move up/down. - Fixed bug where the visualblocks plugin would render borders round internal UI elements. -Version 4.3.6 (2016-03-01) - Added new paste_remember_plaintext_info option to allow a global disable of the plain text mode notification. - Added new PastePlainTextToggle event that fires when plain text mode toggles on/off. - Fixed bug where it wasn't possible to select media elements since the drag logic would snap it to mouse cursor. - Fixed bug where it was hard to place the caret inside nested cE=true elements when the outer cE=false element was focused. - Fixed bug where editors wouldn't properly initialize if both selector and mode where used. - Fixed bug where IME input inside table cells would switch the IME off. - Fixed bug where selection inside the first table cell would cause the whole table cell to get selected. - Fixed bug where error handling of images being uploaded wouldn't properly handle faulty statuses. - Fixed bug where inserting contents before a HR would cause an exception to be thrown. - Fixed bug where copy/paste of Excel data would be inserted as an image. - Fixed caret position issues with copy/paste of inline block cE=false elements. - Fixed issues with various menu item focus bugs in Chrome. Where the focused menu bar item wasn't properly blurred. - Fixed so the notifications have a solid background since it would be hard to read if there where text under it. - Fixed so notifications gets animated similar to the ones used by dialogs. - Fixed so larger images that gets pasted is handled better. - Fixed so the window close button is more uniform on various platform and also increased it's hit area. -Version 4.3.5 (2016-02-11) - Npm version bump due to package not being fully updated. -Version 4.3.4 (2016-02-11) - Added new OpenWindow/CloseWindow events that gets fired when windows open/close. - Added new NewCell/NewRow events that gets fired when table cells/rows are created. - Added new Promise return value to tinymce.init makes it easier to handle initialization. - Removed the jQuery version the jQuery plugin is now moved into the main package. - Removed jscs from build process since eslint can now handle code style checking. - Fixed various bugs with drag/drop of contentEditable:false elements. - Fixed bug where deleting of very specific nested list items would result in an odd list. - Fixed bug where lists would get merged with adjacent lists outside the editable inline root. - Fixed bug where MS Edge would crash when closing a dialog then clicking a menu item. - Fixed bug where table cell selection would add undo levels. - Fixed bug where table cell selection wasn't removed when inline editor where removed. - Fixed bug where table cell selection wouldn't work properly on nested tables. - Fixed bug where table merge menu would be available when merging between thead and tbody. - Fixed bug where table row/column resize wouldn't get properly removed when the editor was removed. - Fixed bug where Chrome would scroll to the editor if there where a empty hash value in document url. - Fixed bug where the cache suffix wouldn't work correctly with the importcss plugin. - Fixed bug where selection wouldn't work properly on MS Edge on Windows Phone 10. - Fixed so adjacent pre blocks gets joined into one pre block since that seems like the user intent. - Fixed so events gets properly dispatched in shadow dom. Patch provided by Nazar Mokrynskyi. -Version 4.3.3 (2016-01-14) - Added new table_resize_bars configuration setting. This setting allows you to disable the table resize bars. - Added new beforeInitialize event to tinymce.util.XHR lets you modify XHR properties before open. Patch contributed by Brent Clintel. - Added new autolink_pattern setting to autolink plugin. Enables you to override the default autolink formats. Patch contributed by Ben Tiedt. - Added new charmap option that lets you override the default charmap of the charmap plugin. - Added new charmap_append option that lets you add new characters to the default charmap of the charmap plugin. - Added new insertCustomChar event that gets fired when a character is inserted by the charmap plugin. - Fixed bug where table cells started with a superfluous   in IE10+. - Fixed bug where table plugin would retain all BR tags when cells were merged. - Fixed bug where media plugin would strip underscores from youtube urls. - Fixed bug where IME input would fail on IE 11 if you typed within a table. - Fixed bug where double click selection of a word would remove the space before the word on insert contents. - Fixed bug where table plugin would produce exceptions when hovering tables with invalid structure. - Fixed bug where fullscreen wouldn't scroll back to it's original position when untoggled. - Fixed so the template plugins templates setting can be a function that gets a callback that can provide templates. -Version 4.3.2 (2015-12-14) - Fixed bug where the resize bars for table cells were not affected by the object_resizing property. - Fixed bug where the contextual table toolbar would appear incorrectly if TinyMCE was initialized inline inside a table. - Fixed bug where resizing table cells did not fire a node change event or add an undo level. - Fixed bug where double click selection of text on IE 11 wouldn't work properly. - Fixed bug where codesample plugin would incorrectly produce br elements inside code elements. - Fixed bug where media plugin would strip dashes from youtube urls. - Fixed bug where it was possible to move the caret into the table resize bars. - Fixed bug where drag/drop into a cE=false element was possible on IE. -Version 4.3.1 (2015-11-30) - Fixed so it's possible to disable the table inline toolbar by setting it to false or an empty string. - Fixed bug where it wasn't possible to resize some tables using the drag handles. - Fixed bug where unique id:s would clash for multiple editor instances and cE=false selections. - Fixed bug where the same plugin could be initialized multiple times. - Fixed bug where the table inline toolbars would be displayed at the same time as the image toolbars. - Fixed bug where the table selection rect wouldn't be removed when selecting another control element. -Version 4.3.0 (2015-11-23) - Added new table column/row resize support. Makes it a lot more easy to resize the columns/rows in a table. - Added new table inline toolbar. Makes it easier to for example add new rows or columns to a table. - Added new notification API. Lets you display floating notifications to the end user. - Added new codesample plugin that lets you insert syntax highlighted pre elements into the editor. - Added new image_caption to images. Lets you create images with captions using a HTML5 figure/figcaption elements. - Added new live previews of embeded videos. Lets you play the video right inside the editor. - Added new setDirty method and "dirty" event to the editor. Makes it easier to track the dirty state change. - Added new setMode method to Editor instances that lets you dynamically switch between design/readonly. - Added new core support for contentEditable=false elements within the editor overrides the browsers broken behavior. - Rewrote the noneditable plugin to use the new contentEditable false core logic. - Fixed so the dirty state doesn't set to false automatically when the undo index is set to 0. - Fixed the Selection.placeCaretAt so it works better on IE when the coordinate is between paragraphs. - Fixed bug where data-mce-bogus="all" element contents where counted by the word count plugin. - Fixed bug where contentEditable=false elements would be indented by the indent buttons. - Fixed bug where images within contentEditable=false would be selected in WebKit on mouse click. - Fixed bug in DOMUntils split method where the replacement parameter wouldn't work on specific cases. - Fixed bug where the importcss plugin would import classes from the skin content css file. - Fixed so all button variants have a wrapping span for it's text to make it easier to skin. - Fixed so it's easier to exit pre block using the arrow keys. - Fixed bug where listboxes with fix widths didn't render correctly. -Version 4.2.8 (2015-11-13) - Fixed bug where it was possible to delete tables as the inline root element if all columns where selected. - Fixed bug where the UI buttons active state wasn't properly updated due to recent refactoring of that logic. -Version 4.2.7 (2015-10-27) - Fixed bug where backspace/delete would remove all formats on the last paragraph character in WebKit/Blink. - Fixed bug where backspace within a inline format element with a bogus caret container would move the caret. - Fixed bug where backspace/delete on selected table cells wouldn't add an undo level. - Fixed bug where script tags embedded within the editor could sometimes get a mce- prefix prepended to them - Fixed bug where validate: false option could produce an error to be thrown from the Serialization step. - Fixed bug where inline editing of a table as the root element could let the user delete that table. - Fixed bug where inline editing of a table as the root element wouldn't properly handle enter key. - Fixed bug where inline editing of a table as the root element would normalize the selection incorrectly. - Fixed bug where inline editing of a list as the root element could let the user delete that list. - Fixed bug where inline editing of a list as the root element could let the user split that list. - Fixed bug where resize handles would be rendered on editable root elements such as table. -Version 4.2.6 (2015-09-28) - Added capability to set request headers when using XHRs. - Added capability to upload local images automatically default delay is set to 30 seconds after editing images. - Added commands ids mceEditImage, mceAchor and mceMedia to be avaiable from execCommand. - Added Edge browser to saucelabs grunt task. Patch contributed by John-David Dalton. - Fixed bug where blob uris not produced by tinymce would produce HTML invalid markup. - Fixed bug where selection of contents of a nearly empty editor in Edge would sometimes fail. - Fixed bug where color styles woudln't be retained on copy/paste in Blink/Webkit. - Fixed bug where the table plugin would throw an error when inserting rows after a child table. - Fixed bug where the template plugin wouldn't handle functions as variable replacements. - Fixed bug where undo/redo sometimes wouldn't work properly when applying formatting collapsed ranges. - Fixed bug where shift+delete wouldn't do a cut operation on Blink/WebKit. - Fixed bug where cut action wouldn't properly store the before selection bookmark for the undo level. - Fixed bug where backspace in side an empty list element on IE would loose editor focus. - Fixed bug where the save plugin wouldn't enable the buttons when a change occurred. - Fixed bug where Edge wouldn't initialize the editor if a document.domain was specified. - Fixed bug where enter key before nested images would sometimes not properly expand the previous block. - Fixed bug where the inline toolbars wouldn't get properly hidden when blurring the editor instance. - Fixed bug where Edge would paste Chinese characters on some Windows 10 installations. - Fixed bug where IME would loose focus on IE 11 due to the double trailing br bug fix. - Fixed bug where the proxy url in imagetools was incorrect. Patch contributed by Wong Ho Wang. -Version 4.2.5 (2015-08-31) - Added fullscreen capability to embedded youtube and vimeo videos. - Fixed bug where the uploadImages call didn't work on IE 10. - Fixed bug where image place holders would be uploaded by uploadImages call. - Fixed bug where images marked with bogus would be uploaded by the uploadImages call. - Fixed bug where multiple calls to uploadImages would result in decreased performance. - Fixed bug where pagebreaks were editable to imagetools patch contributed by Rasmus Wallin. - Fixed bug where the element path could cause too much recursion exception. - Fixed bug for domains containing ".min". Patch contributed by Loïc Février. - Fixed so validation of external links to accept a number after www. Patch contributed by Victor Carvalho. - Fixed so the charmap is exposed though execCommand. Patch contributed by Matthew Will. - Fixed so that the image uploads are concurrent for improved performance. - Fixed various grammar problems in inline documentation. Patches provided by nikolas. -Version 4.2.4 (2015-08-17) - Added picture as a valid element to the HTML 5 schema. Patch contributed by Adam Taylor. - Fixed bug where contents would be duplicated on drag/drop within the same editor. - Fixed bug where floating/alignment of images on Edge wouldn't work properly. - Fixed bug where it wasn't possible to drag images on IE 11. - Fixed bug where image selection on Edge would sometimes fail. - Fixed bug where contextual toolbars icons wasn't rendered properly when using the toolbar_items_size. - Fixed bug where searchreplace dialog doesn't get prefilled with the selected text. - Fixed bug where fragmented matches wouldn't get properly replaced by the searchreplace plugin. - Fixed bug where enter key wouldn't place the caret if was after a trailing space within an inline element. - Fixed bug where the autolink plugin could produce multiple links for the same text on Gecko. - Fixed bug where EditorUpload could sometimes throw an exception if the blob wasn't found. - Fixed xss issues with media plugin not properly filtering out some script attributes. -Version 4.2.3 (2015-07-30) - Fixed bug where image selection wasn't possible on Edge due to incompatible setBaseAndExtend API. - Fixed bug where image blobs urls where not properly destroyed by the imagetools plugin. - Fixed bug where keyboard shortcuts wasn't working correctly on IE 8. - Fixed skin issue where the borders of panels where not visible on IE 8. -Version 4.2.2 (2015-07-22) - Fixed bug where float panels were not being hidden on inline editor blur when fixed_toolbar_container config option was in use. - Fixed bug where combobox states wasn't properly updated if contents where updated without keyboard. - Fixed bug where pasting into textbox or combobox would move the caret to the end of text. - Fixed bug where removal of bogus span elements before block elements would remove whitespace between nodes. - Fixed bug where repositioning of inline toolbars where async and producing errors if the editor was removed from DOM to early. Patch by iseulde. - Fixed bug where element path wasn't working correctly. Patch contributed by iseulde. - Fixed bug where menus wasn't rendered correctly when custom images where added to a menu. Patch contributed by Naim Hammadi. -Version 4.2.1 (2015-06-29) - Fixed bug where back/forward buttons in the browser would render blob images as broken images. - Fixed bug where Firefox would throw regexp to big error when replacing huge base64 chunks. - Fixed bug rendering issues with resize and context toolbars not being placed properly until next animation frame. - Fixed bug where the rendering of the image while cropping would some times not be centered correctly. - Fixed bug where listbox items with submenus would me selected as active. - Fixed bug where context menu where throwing an error when rendering. - Fixed bug where resize both option wasn't working due to resent addClass API change. Patch contributed by Jogai. - Fixed bug where a hideAll call for container rendered inline toolbars would throw an error. - Fixed bug where onclick event handler on combobox could cause issues if element.id was a function by some polluting libraries. - Fixed bug where listboxes wouldn't get proper selected sub menu item when using link_list or image_list. - Fixed so the UI controls are as wide as 4.1.x to avoid wrapping controls in toolbars. - Fixed so the imagetools dialog is adaptive for smaller screen sizes. -Version 4.2.0 (2015-06-25) - Added new flat default skin to make the UI more modern. - Added new imagetools plugin, lets you crop/resize and apply filters to images. - Added new contextual toolbars support to the API lets you add floating toolbars for specific CSS selectors. - Added new promise feature fill as tinymce.util.Promise. - Added new built in image upload feature lets you upload any base64 encoded image within the editor as files. - Fixed bug where resize handles would appear in the right position in the wrong editor when switching between resizable content in different inline editors. - Fixed bug where tables would not be inserted in inline mode due to previous float panel fix. - Fixed bug where floating panels would remain open when focus was lost on inline editors. - Fixed bug where cut command on Chrome would thrown a browser security exception. - Fixed bug where IE 11 sometimes would report an incorrect size for images in the image dialog. - Fixed bug where it wasn't possible to remove inline formatting at the end of block elements. - Fixed bug where it wasn't possible to delete table cell contents when cell selection was vertical. - Fixed bug where table cell wasn't emptied from block elements if delete/backspace where pressed in empty cell. - Fixed bug where cmd+shift+arrow didn't work correctly on Firefox mac when selecting to start/end of line. - Fixed bug where removal of bogus elements would sometimes remove whitespace between nodes. - Fixed bug where the resize handles wasn't updated when the main window was resized. - Fixed so script elements gets removed by default to prevent possible XSS issues in default config implementations. - Fixed so the UI doesn't need manual reflows when using non native layout managers. - Fixed so base64 encoded images doesn't slow down the editor on modern browsers while editing. - Fixed so all UI elements uses touch events to improve mobile device support. - Removed the touch click quirks patch for iOS since it did more harm than good. - Removed the non proportional resize handles since. Unproportional resize can still be done by holding the shift key. -Version 4.1.10 (2015-05-05) - Fixed bug where plugins loaded with compat3x would sometimes throw errors when loading using the jQuery version. - Fixed bug where extra empty paragraphs would get deleted in WebKit/Blink due to recent Quriks fix. - Fixed bug where the editor wouldn't work properly on IE 12 due to some required browser sniffing. - Fixed bug where formatting shortcut keys where interfering with Mac OS X screenshot keys. - Fixed bug where the caret wouldn't move to the next/previous line boundary on Cmd+Left/Right on Gecko. - Fixed bug where it wasn't possible to remove formats from very specific nested contents. - Fixed bug where undo levels wasn't produced when typing letters using the shift or alt+ctrl modifiers. - Fixed bug where the dirty state wasn't properly updated when typing using the shift or alt+ctrl modifiers. - Fixed bug where an error would be thrown if an autofocused editor was destroyed quickly after its initialization. Patch provided by thorn0. - Fixed issue with dirty state not being properly updated on redo operation. - Fixed issue with entity decoder not handling incorrectly written numeric entities. - Fixed issue where some PI element values wouldn't be properly encoded. -Version 4.1.9 (2015-03-10) - Fixed bug where indentation wouldn't work properly for non list elements. - Fixed bug with image plugin not pulling the image dimensions out correctly if a custom document_base_url was used. - Fixed bug where ctrl+alt+[1-9] would conflict with the AltGr+[1-9] on Windows. New shortcuts is ctrl+shift+[1-9]. - Fixed bug with removing formatting on nodes in inline mode would sometimes include nodes outside the editor body. - Fixed bug where extra nbsp:s would be inserted when you replaced a word surrounded by spaces using insertContent. - Fixed bug with pasting from Google Docs would produce extra strong elements and line feeds. -Version 4.1.8 (2015-03-05) - Added new html5 sizes attribute to img elements used together with srcset. - Added new elementpath option that makes it possible to disable the element path but keep the statusbar. - Added new option table_style_by_css for the table plugin to set table styling with css rather than table attributes. - Added new link_assume_external_targets option to prompt the user to prepend http:// prefix if the supplied link does not contain a protocol prefix. - Added new image_prepend_url option to allow a custom base path/url to be added to images. - Added new table_appearance_options option to make it possible to disable some options. - Added new image_title option to make it possible to alter the title of the image, disabled by default. - Fixed bug where selection starting from out side of the body wouldn't produce a proper selection range on IE 11. - Fixed bug where pressing enter twice before a table moves the cursor in the table and causes a javascript error. - Fixed bug where advanced image styles were not respected. - Fixed bug where the less common Shift+Delete didn't produce a proper cut operation on WebKit browsers. - Fixed bug where image/media size constrain logic would produce NaN when handling non number values. - Fixed bug where internal classes where removed by the removeformat command. - Fixed bug with creating links table cell contents with a specific selection would throw a exceptions on WebKit/Blink. - Fixed bug where valid_classes option didn't work as expected according to docs. Patch provided by thorn0. - Fixed bug where jQuery plugin would patch the internal methods multiple times. Patch provided by Drew Martin. - Fixed bug where backspace key wouldn't delete the current selection of newly formatted content. - Fixed bug where type over of inline formatting elements wouldn't properly keep the format on WebKit/Blink. - Fixed bug where selection needed to be properly normalized on modern IE versions. - Fixed bug where Command+Backspace didn't properly delete the whole line of text but the previous word. - Fixed bug where UI active states wheren't properly updated on IE if you placed caret within the current range. - Fixed bug where delete/backspace on WebKit/Blink would remove span elements created by the user. - Fixed bug where delete/backspace would produce incorrect results when deleting between two text blocks with br elements. - Fixed bug where captions where removed when pasting from MS Office. - Fixed bug where lists plugin wouldn't properly remove fully selected nested lists. - Fixed bug where the ttf font used for icons would throw an warning message on Gecko on Mac OS X. - Fixed a bug where applying a color to text did not update the undo/redo history. - Fixed so shy entities gets displayed when using the visualchars plugin. - Fixed so removeformat removes ins/del by default since these might be used for strikethough. - Fixed so multiple language packs can be loaded and added to the global I18n data structure. - Fixed so transparent color selection gets treated as a normal color selection. Patch contributed by Alexander Hofbauer. - Fixed so it's possible to disable autoresize_overflow_padding, autoresize_bottom_margin options by setting them to false. - Fixed so the charmap plugin shows the description of the character in the dialog. Patch contributed by Jelle Hissink. - Removed address from the default list of block formats since it tends to be missused. - Fixed so the pre block format is called preformatted to make it more verbose. - Fixed so it's possible to context scope translation strings this isn't needed most of the time. - Fixed so the max length of the width/height input fields of the media dialog is 5 instead of 3. - Fixed so drag/dropped contents gets properly processed by paste plugin since it's basically a paste. Patch contributed by Greg Fairbanks. - Fixed so shortcut keys for headers is ctrl+alt+[1-9] instead of ctrl+[1-9] since these are for switching tabs in the browsers. - Fixed so "u" doesn't get converted into a span element by the legacy input filter. Since this is now a valid HTML5 element. - Fixed font families in order to provide appropriate web-safe fonts. -Version 4.1.7 (2014-11-27) - Added HTML5 schema support for srcset, source and picture. Patch contributed by mattheu. - Added new cache_suffix setting to enable cache busting by producing unique urls. - Added new paste_convert_word_fake_lists option to enable users to disable the fake lists convert logic. - Fixed so advlist style changes adds undo levels for each change. - Fixed bug where WebKit would sometimes produce an exception when the autolink plugin where looking for URLs. - Fixed bug where IE 7 wouldn't be rendered properly due to aggressive css compression. - Fixed bug where DomQuery wouldn't accept window as constructor element. - Fixed bug where the color picker in 3.x dialogs wouldn't work properly. Patch contributed by Callidior. - Fixed bug where the image plugin wouldn't respect the document_base_url. - Fixed bug where the jQuery plugin would fail to append to elements named array prototype names. -Version 4.1.6 (2014-10-08) - Fixed bug with clicking on the scrollbar of the iframe would cause a JS error to be thrown. - Fixed bug where null would produce an exception if you passed it to selection.setRng. - Fixed bug where Ctrl/Cmd+Tab would indent the current list item if you switched tabs in the browser. - Fixed bug where pasting empty cells from Excel would result in a broken table. - Fixed bug where it wasn't possible to switch back to default list style type. - Fixed issue where the select all quirk fix would fire for other modifiers than Ctrl/Cmd combinations. - Replaced jake with grunt since it is more mainstream and has better plugin support. -Version 4.1.5 (2014-09-09) - Fixed bug where sometimes the resize rectangles wouldn't properly render on images on WebKit/Blink. - Fixed bug in list plugin where delete/backspace would merge empty LI elements in lists incorrectly. - Fixed bug where empty list elements would result in empty LI elements without it's parent container. - Fixed bug where backspace in empty caret formatted element could produce an type error exception of Gecko. - Fixed bug where lists pasted from word with a custom start index above 9 wouldn't be properly handled. - Fixed bug where tabfocus plugin would tab out of the editor instance even if the default action was prevented. - Fixed bug where tabfocus wouldn't tab properly to other adjacent editor instances. - Fixed bug where the DOMUtils setStyles wouldn't properly removed or update the data-mce-style attribute. - Fixed bug where dialog select boxes would be placed incorrectly if document.body wasn't statically positioned. - Fixed bug where pasting would sometimes scroll to the top of page if the user was using the autoresize plugin. - Fixed bug where caret wouldn't be properly rendered by Chrome when clicking on the iframes documentElement. - Fixed so custom images for menubutton/splitbutton can be provided. Patch contributed by Naim Hammadi. - Fixed so the default action of windows closing can be prevented by blocking the default action of the close event. - Fixed so nodeChange and focus of the editor isn't automatically performed when opening sub dialogs. -Version 4.1.4 (2014-08-21) - Added new media_filter_html option to media plugin that blocks any conditional comments, scripts etc within a video element. - Added new content_security_policy option allows you to set custom policy for iframe contents. Patch contributed by Francois Chagnon. - Fixed bug where activate/deactivate events wasn't firing properly when switching between editors. - Fixed bug where placing the caret on iOS was difficult due to a WebKit bug with touch events. - Fixed bug where the resize helper wouldn't render properly on older IE versions. - Fixed bug where resizing images inside tables on older IE versions would sometimes fail depending mouse position. - Fixed bug where editor.insertContent would produce an exception when inserting select/option elements. - Fixed bug where extra empty paragraphs would be produced if block elements where inserted inside span elements. - Fixed bug where the spellchecker menu item wouldn't be properly checked if spell checking was started before it was rendered. - Fixed bug where the DomQuery filter function wouldn't remove non elements from collection. - Fixed bug where document with custom document.domain wouldn't properly render the editor. - Fixed bug where IE 8 would throw exception when trying to enter invalid color values into colorboxes. - Fixed bug where undo manager could incorrectly add an extra undo level when custom resize handles was removed. - Fixed bug where it wouldn't be possible to alter cell properties properly on table cells on IE 8. - Fixed so the color picker button in table dialog isn't shown unless you include the colorpicker plugin or add your own custom color picker. - Fixed so activate/deactivate events fire when windowManager opens a window since. - Fixed so the table advtab options isn't separated by an underscore to normalize naming with image_advtab option. - Fixed so the table cell dialog has proper padding when the advanced tab in disabled. -Version 4.1.3 (2014-07-29) - Added event binding logic to tinymce.util.XHR making it possible to override headers and settings before any request is made. - Fixed bug where drag events wasn't fireing properly on older IE versions since the event handlers where bound to document. - Fixed bug where drag/dropping contents within the editor on IE would force the contents into plain text mode even if it was internal content. - Fixed bug where IE 7 wouldn't open menus properly due to a resize bug in the browser auto closing them immediately. - Fixed bug where the DOMUtils getPos logic wouldn't produce a valid coordinate inside the body if the body was positioned non static. - Fixed bug where the element path and format state wasn't properly updated if you had the wordcount plugin enabled. - Fixed bug where a comment at the beginning of source would produce an exception in the formatter logic. - Fixed bug where setAttrib/getAttrib on null would throw exception together with any hooked attributes like style. - Fixed bug where table sizes wasn't properly retained when copy/pasting on WebKit/Blink. - Fixed bug where WebKit/Blink would produce colors in RGB format instead of the forced HEX format when deleting contents. - Fixed bug where the width attribute wasn't updated on tables if you changed the size inside the table dialog. - Fixed bug where control selection wasn't properly handled when the caret was placed directly after an image. - Fixed bug where selecting the contents of table cells using the selection.select method wouldn't place the caret properly. - Fixed bug where the selection state for images wasn't removed when placing the caret right after an image on WebKit/Blink. - Fixed bug where all events wasn't properly unbound when and editor instance was removed or destroyed by some external innerHTML call. - Fixed bug where it wasn't possible or very hard to select images on iOS when the onscreen keyboard was visible. - Fixed so auto_focus can take a boolean argument this will auto focus the last initialized editor might be useful for single inits. - Fixed so word auto detect lists logic works better for faked lists that doesn't have specific markup. - Fixed so nodeChange gets fired on mouseup as it used to before 4.1.1 we optimized that event to fire less often. - Removed the finish menu item from spellchecker menu since it's redundant you can stop spellchecking by toggling menu item or button. -Version 4.1.2 (2014-07-15) - Added offset/grep to DomQuery class works basically the same as it's jQuery equivalent. - Fixed bug where backspace/delete or setContent with an empty string would remove header data when using the fullpage plugin. - Fixed bug where tinymce.remove with a selector not matching any editors would remove all editors. - Fixed bug where resizing of the editor didn't work since the theme was calling setStyles instead of setStyle. - Fixed bug where IE 7 would fail to append html fragments to iframe document when using DomQuery. - Fixed bug where the getStyle DOMUtils method would produce an exception if it was called with null as it's element. - Fixed bug where the paste plugin would remove the element if the none of the paste_webkit_styles rules matched the current style. - Fixed bug where contextmenu table items wouldn't work properly on IE since it would some times fire an incorrect selection change. - Fixed bug where the padding/border values wasn't used in the size calculation for the body size when using autoresize. Patch contributed by Matt Whelan. - Fixed bug where conditional word comments wouldn't be properly removed when pasting plain text. - Fixed bug where resizing would sometime fail on IE 11 when the mouseup occurred inside the resizable element. - Fixed so the iframe gets initialized without any inline event handlers for better CSP support. Patch contributed by Matt Whelan. - Fixed so the tinymce.dom.Sizzle is the latest version of sizzle this resolves the document context bug. -Version 4.1.1 (2014-07-08) - Fixed bug where pasting plain text on some WebKit versions would result in an empty line. - Fixed bug where resizing images inside tables on IE 11 wouldn't work properly. - Fixed bug where IE 11 would sometimes throw "Invalid argument" exception when editor contents was set to an empty string. - Fixed bug where document.activeElement would throw exceptions on IE 9 when that element was hidden or removed from dom. - Fixed bug where WebKit/Blink sometimes produced br elements with the Apple-interchange-newline class. - Fixed bug where table cell selection wasn't properly removed when copy/pasting table cells. - Fixed bug where pasting nested list items from Word wouldn't produce proper semantic nested lists. - Fixed bug where right clicking using the contextmenu plugin on WebKit/Blink on Mac OS X would select the target current word or line. - Fixed bug where it wasn't possible to alter table cell properties on IE 8 using the context menu. - Fixed bug where the resize helper wouldn't be correctly positioned on older IE versions. - Fixed bug where fullpage plugin would produce an error if you didn't specify a doctype encoding. - Fixed bug where anchor plugin would get the name/id of the current element even if it wasn't anchor element. - Fixed bug where visual aids for tables wouldn't be properly disabled when changing the border size. - Fixed bug where some control selection events wasn't properly fired on older IE versions. - Fixed bug where table cell selection on older IE versions would prevent resizing of images. - Fixed bug with paste_data_images paste option not working properly on modern IE versions. - Fixed bug where custom elements with underscores in the name wasn't properly parsed/serialized. - Fixed bug where applying inline formats to nested list elements would produce an incorrect formatting result. - Fixed so it's possible to hide items from elements path by using preventDefault/stopPropagation. - Fixed so inline mode toolbar gets rendered right aligned if the editable element positioned to the documents right edge. - Fixed so empty inline elements inside empty block elements doesn't get removed if configured to be kept intact. - Fixed so DomQuery parentsUntil/prevUntil/nextUntil supports selectors/elements/filters etc. - Fixed so legacyoutput plugin overrides fontselect and fontsizeselect controls and handles font elements properly. -Version 4.1.0 (2014-06-18) - Added new file_picker_callback option to replace the old file_browser_callback the latter will still work though. - Added new custom colors to textcolor plugin will be displayed if a color picker is provided also shows the latest colors. - Added new color_picker_callback option to enable you to add custom color pickers to the editor. - Added new advanced tabs to table/cell/row dialogs to enable you to select colors for border/background. - Added new colorpicker plugin that lets you select colors from a hsv color picker. - Added new tinymce.util.Color class to handle color parsing and converting. - Added new colorpicker UI widget element lets you add a hsv color picker to any form/window. - Added new textpattern plugin that allows you to use markdown like text patterns to format contents. - Added new resize helper element that shows the current width & height while resizing. - Added new "once" method to Editor and EventDispatcher enables since callback execution events. - Added new jQuery like class under tinymce.dom.DomQuery it's exposed on editor instances (editor.$) and globally under (tinymce.$). - Fixed so the default resize method for images are proportional shift/ctrl can be used to make an unproportional size. - Fixed bug where the image_dimensions option of the image plugin would cause exceptions when it tried to update the size. - Fixed bug where table cell dialog class field wasn't properly updated when editing an a table cell with an existing class. - Fixed bug where Safari on Mac would produce webkit-fake-url for pasted images so these are now removed. - Fixed bug where the nodeChange event would get fired before the selection was changed when clicking inside the current selection range. - Fixed bug where valid_classes option would cause exception when it removed internal prefixed classes like mce-item-. - Fixed bug where backspace would cause navigation in IE 8 on an inline element and after a caret formatting was applied. - Fixed so placeholder images produced by the media plugin gets selected when inserted/edited. - Fixed so it's possible to drag in images when the paste_data_images option is enabled. Might be useful for mail clients. - Fixed so images doesn't get a width/height applied if the image_dimensions option is set to false useful for responsive contents. - Fixed so it's possible to pass in an optional arguments object for the nodeChanged function to be passed to all nodechange event listeners. - Fixed bug where media plugin embed code didn't update correctly. diff --git a/website/js/vendor/tinymce/js/tinymce/jquery.tinymce.min.js b/website/js/vendor/tinymce/js/tinymce/jquery.tinymce.min.js deleted file mode 100644 index 5a6ef56..0000000 --- a/website/js/vendor/tinymce/js/tinymce/jquery.tinymce.min.js +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Copyright (c) Tiny Technologies, Inc. All rights reserved. - * Licensed under the LGPL or a commercial license. - * For LGPL see License.txt in the project root for license information. - * For commercial licenses see https://www.tiny.cloud/ - */ -/** - * Jquery integration plugin. - * - * @class tinymce.core.JqueryIntegration - * @private - */ -!function(){var f,c,u,p,d,s=[];d="undefined"!=typeof global?global:window,p=d.jQuery;function v(){ -// Reference to tinymce needs to be lazily evaluated since tinymce -// might be loaded through the compressor or other means -return d.tinymce}p.fn.tinymce=function(o){var e,t,i,l=this,r=""; -// No match then just ignore the call -if(!l.length)return l; -// Get editor instance -if(!o)return v()?v().get(l[0].id):null;l.css("visibility","hidden");function n(){var a=[],c=0; -// Apply patches to the jQuery object, only once -u||(m(),u=!0), -// Create an editor instance for each matched node -l.each(function(e,t){var n,i=t.id,r=o.oninit; -// Generate unique id for target element if needed -i||(t.id=i=v().DOM.uniqueId()), -// Only init the editor once -v().get(i)||( -// Create editor instance and render it -n=v().createEditor(i,o),a.push(n),n.on("init",function(){var e,t=r;l.css("visibility",""), -// Run this if the oninit setting is defined -// this logic will fire the oninit callback ones each -// matched editor instance is initialized -r&&++c==a.length&&("string"==typeof t&&(e=-1===t.indexOf(".")?null:v().resolve(t.replace(/\.\w+$/,"")),t=v().resolve(t)), -// Call the oninit function with the object -t.apply(e||v(),a))}))}), -// Render the editor instances in a separate loop since we -// need to have the full editors array used in the onInit calls -p.each(a,function(e,t){t.render()})} -// Load TinyMCE on demand, if we need to -if(d.tinymce||c||!(e=o.script_url)) -// Delay the init call until tinymce is loaded -1===c?s.push(n):n();else{c=1,t=e.substring(0,e.lastIndexOf("/")), -// Check if it's a dev/src version they want to load then -// make sure that all plugins, themes etc are loaded in source mode as well --1!=e.indexOf(".min")&&(r=".min"), -// Setup tinyMCEPreInit object this will later be used by the TinyMCE -// core script to locate other resources like CSS files, dialogs etc -// You can also predefined a tinyMCEPreInit object and then it will use that instead -d.tinymce=d.tinyMCEPreInit||{base:t,suffix:r}, -// url contains gzip then we assume it's a compressor --1!=e.indexOf("gzip")&&(i=o.language||"en",e=e+(/\?/.test(e)?"&":"?")+"js=true&core=true&suffix="+escape(r)+"&themes="+escape(o.theme||"modern")+"&plugins="+escape(o.plugins||"")+"&languages="+(i||""), -// Check if compressor script is already loaded otherwise setup a basic one -d.tinyMCE_GZ||(d.tinyMCE_GZ={start:function(){function n(e){v().ScriptLoader.markDone(v().baseURI.toAbsolute(e))} -// Add core languages -n("langs/"+i+".js"), -// Add themes with languages -n("themes/"+o.theme+"/theme"+r+".js"),n("themes/"+o.theme+"/langs/"+i+".js"), -// Add plugins with languages -p.each(o.plugins.split(","),function(e,t){t&&(n("plugins/"+t+"/plugin"+r+".js"),n("plugins/"+t+"/langs/"+i+".js"))})},end:function(){}}));var a=document.createElement("script");a.type="text/javascript",a.onload=a.onreadystatechange=function(e){e=e||window.event,2===c||"load"!=e.type&&!/complete|loaded/.test(a.readyState)||(v().dom.Event.domLoaded=1,c=2, -// Execute callback after mainscript has been loaded and before the initialization occurs -o.script_loaded&&o.script_loaded(),n(),p.each(s,function(e,t){t()}))},a.src=e,document.body.appendChild(a)}return l}, -// Add :tinymce pseudo selector this will select elements that has been converted into editor instances -// it's now possible to use things like $('*:tinymce') to get all TinyMCE bound elements. -p.extend(p.expr[":"],{tinymce:function(e){var t;return!!(e.id&&"tinymce"in d&&(t=v().get(e.id))&&t.editorManager===v())}}); -// This function patches internal jQuery functions so that if -// you for example remove an div element containing an editor it's -// automatically destroyed by the TinyMCE API -var m=function(){function r(e){ -// If the function is remove -"remove"===e&&this.each(function(e,t){var n=u(t);n&&n.remove()}),this.find("span.mceEditor,div.mceEditor").each(function(e,t){var n=v().get(t.id.replace(/_parent$/,""));n&&n.remove()})}function o(i){var e,t=this; -// Handle set value -/*jshint eqnull:true */if(null!=i)r.call(t), -// Saves the contents before get/set value of textarea/div -t.each(function(e,t){var n;(n=v().get(t.id))&&n.setContent(i)});else if(0])*>/g,""):n.getContent({save:!0}):a.apply(p(t),r)}),i}}), -// Makes it possible to use $('#id').append("content"); to append contents to the TinyMCE editor iframe -p.each(["append","prepend"],function(e,t){var n=s[t]=p.fn[t],r="prepend"===t;p.fn[t]=function(i){var e=this;return l(e)?i!==f?("string"==typeof i&&e.filter(":tinymce").each(function(e,t){var n=u(t);n&&n.setContent(r?i+n.getContent():n.getContent()+i)}),n.apply(e.not(":tinymce"),arguments),e):void 0:n.apply(e,arguments)}}), -// Makes sure that the editor instance gets properly destroyed when the parent element is removed -p.each(["remove","replaceWith","replaceAll","empty"],function(e,t){var n=s[t]=p.fn[t];p.fn[t]=function(){return r.call(this,t),n.apply(this,arguments)}}),s.attr=p.fn.attr, -// Makes sure that $('#tinymce_id').attr('value') gets the editors current HTML contents -p.fn.attr=function(e,t){var n=this,i=arguments;if(!e||"value"!==e||!l(n))return s.attr.apply(n,i);if(t!==f)return o.call(n.filter(":tinymce"),t),s.attr.apply(n.not(":tinymce"),i),n;// return original set for chaining -var r=n[0],a=u(r);return a?a.getContent({save:!0}):s.attr.apply(p(r),i)}}}(); \ No newline at end of file diff --git a/website/js/vendor/tinymce/js/tinymce/langs/de.js b/website/js/vendor/tinymce/js/tinymce/langs/de.js deleted file mode 100644 index f7a5b00..0000000 --- a/website/js/vendor/tinymce/js/tinymce/langs/de.js +++ /dev/null @@ -1,389 +0,0 @@ -tinymce.addI18n('de',{ -"Redo": "Wiederholen", -"Undo": "R\u00fcckg\u00e4ngig machen", -"Cut": "Ausschneiden", -"Copy": "Kopieren", -"Paste": "Einf\u00fcgen", -"Select all": "Alles ausw\u00e4hlen", -"New document": "Neues Dokument", -"Ok": "Ok", -"Cancel": "Abbrechen", -"Visual aids": "Visuelle Hilfen", -"Bold": "Fett", -"Italic": "Kursiv", -"Underline": "Unterstrichen", -"Strikethrough": "Durchgestrichen", -"Superscript": "Hochgestellt", -"Subscript": "Tiefgestellt", -"Clear formatting": "Formatierung entfernen", -"Align left": "Linksb\u00fcndig ausrichten", -"Align center": "Zentrieren", -"Align right": "Rechtsb\u00fcndig ausrichten", -"Justify": "Blocksatz", -"Bullet list": "Aufz\u00e4hlung", -"Numbered list": "Nummerierte Liste", -"Decrease indent": "Einzug verkleinern", -"Increase indent": "Einzug vergr\u00f6\u00dfern", -"Close": "Schlie\u00dfen", -"Formats": "Formate", -"Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "Ihr Browser unterst\u00fctzt leider keinen direkten Zugriff auf die Zwischenablage. Bitte benutzen Sie die Tastenkombinationen Strg+X\/C\/V.", -"Headers": "\u00dcberschriften", -"Header 1": "\u00dcberschrift 1", -"Header 2": "\u00dcberschrift 2", -"Header 3": "\u00dcberschrift 3", -"Header 4": "\u00dcberschrift 4", -"Header 5": "\u00dcberschrift 5", -"Header 6": "\u00dcberschrift 6", -"Headings": "\u00dcberschriften", -"Heading 1": "Kopfzeile 1", -"Heading 2": "Kopfzeile 2", -"Heading 3": "Kopfzeile 3", -"Heading 4": "Kopfzeile 4", -"Heading 5": "Kopfzeile 5", -"Heading 6": "Kopfzeile 6", -"Preformatted": "Vorformatiert", -"Div": "Div", -"Pre": "Pre", -"Code": "Code", -"Paragraph": "Absatz", -"Blockquote": "Blockquote", -"Inline": "Zeichenformate", -"Blocks": "Bl\u00f6cke", -"Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.": "Einf\u00fcgen ist nun im einfachen Textmodus. Inhalte werden ab jetzt als unformatierter Text eingef\u00fcgt, bis Sie diese Einstellung wieder ausschalten!", -"Fonts": "Schriftarten", -"Font Sizes": "Schriftgr\u00f6\u00dfe", -"Class": "Klasse", -"Browse for an image": "Bild...", -"OR": "ODER", -"Drop an image here": "Bild hier ablegen", -"Upload": "Hochladen", -"Block": "Blocksatz", -"Align": "Ausrichten", -"Default": "Standard", -"Circle": "Kreis", -"Disc": "Punkt", -"Square": "Quadrat", -"Lower Alpha": "Kleinbuchstaben", -"Lower Greek": "Griechische Kleinbuchstaben", -"Lower Roman": "R\u00f6mische Zahlen (Kleinbuchstaben)", -"Upper Alpha": "Gro\u00dfbuchstaben", -"Upper Roman": "R\u00f6mische Zahlen (Gro\u00dfbuchstaben)", -"Anchor...": "Textmarke", -"Name": "Name", -"Id": "Kennung", -"Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.": "Die Kennung sollte mit einem Buchstaben anfangen. Nachfolgend nur Buchstaben, Zahlen, Striche (Minus), Punkte, Kommas und Unterstriche.", -"You have unsaved changes are you sure you want to navigate away?": "Die \u00c4nderungen wurden noch nicht gespeichert, sind Sie sicher, dass Sie diese Seite verlassen wollen?", -"Restore last draft": "Letzten Entwurf wiederherstellen", -"Special characters...": "Sonderzeichen...", -"Source code": "Quelltext", -"Insert\/Edit code sample": "Codebeispiel einf\u00fcgen\/bearbeiten", -"Language": "Sprache", -"Code sample...": "Codebeispiel...", -"Color Picker": "Farbwahl", -"R": "R", -"G": "G", -"B": "B", -"Left to right": "Von links nach rechts", -"Right to left": "Von rechts nach links", -"Emoticons...": "Emoticons...", -"Metadata and Document Properties": "Dokument-Eigenschaften und -Metadaten", -"Title": "Titel", -"Keywords": "Sch\u00fcsselw\u00f6rter", -"Description": "Beschreibung", -"Robots": "Robots", -"Author": "Verfasser", -"Encoding": "Zeichenkodierung", -"Fullscreen": "Vollbild", -"Action": "Aktion", -"Shortcut": "Shortcut", -"Help": "Hilfe", -"Address": "Adresse", -"Focus to menubar": "Fokus auf Men\u00fcleiste", -"Focus to toolbar": "Fokus auf Werkzeugleiste", -"Focus to element path": "Fokus auf Elementpfad", -"Focus to contextual toolbar": "Fokus auf kontextbezogene Werkzeugleiste", -"Insert link (if link plugin activated)": "Link einf\u00fcgen (wenn Link-Plugin aktiviert ist)", -"Save (if save plugin activated)": "Speichern (wenn Save-Plugin aktiviert ist)", -"Find (if searchreplace plugin activated)": "Suchen einf\u00fcgen (wenn Suchen\/Ersetzen-Plugin aktiviert ist)", -"Plugins installed ({0}):": "installierte Plugins ({0}):", -"Premium plugins:": "Premium Plugins:", -"Learn more...": "Erfahren Sie mehr dazu...", -"You are using {0}": "Sie verwenden {0}", -"Plugins": "Plugins", -"Handy Shortcuts": "Praktische Tastenkombinationen", -"Horizontal line": "Horizontale Linie", -"Insert\/edit image": "Bild einf\u00fcgen\/bearbeiten", -"Image description": "Bildbeschreibung", -"Source": "Quelle", -"Dimensions": "Abmessungen", -"Constrain proportions": "Seitenverh\u00e4ltnis beibehalten", -"General": "Allgemein", -"Advanced": "Erweitert", -"Style": "Stil", -"Vertical space": "Vertikaler Abstand", -"Horizontal space": "Horizontaler Abstand", -"Border": "Rahmen", -"Insert image": "Bild einf\u00fcgen", -"Image...": "Bild...", -"Image list": "Bildliste", -"Rotate counterclockwise": "Gegen den Uhrzeigersinn drehen", -"Rotate clockwise": "Im Uhrzeigersinn drehen", -"Flip vertically": "Vertikal spiegeln", -"Flip horizontally": "Horizontal spiegeln", -"Edit image": "Bild bearbeiten", -"Image options": "Bildeigenschaften", -"Zoom in": "Ansicht vergr\u00f6\u00dfern", -"Zoom out": "Ansicht verkleinern", -"Crop": "Bescheiden", -"Resize": "Skalieren", -"Orientation": "Ausrichtung", -"Brightness": "Helligkeit", -"Sharpen": "Sch\u00e4rfen", -"Contrast": "Kontrast", -"Color levels": "Farbwerte", -"Gamma": "Gamma", -"Invert": "Invertieren", -"Apply": "Anwenden", -"Back": "Zur\u00fcck", -"Insert date\/time": "Datum\/Uhrzeit einf\u00fcgen ", -"Date\/time": "Datum\/Uhrzeit", -"Insert\/Edit Link": "Link einf\u00fcgen\/bearbeiten", -"Insert\/edit link": "Link einf\u00fcgen\/bearbeiten", -"Text to display": "Anzuzeigender Text", -"Url": "URL", -"Open link in...": "Link \u00f6ffnen in...", -"Current window": "Aktuelles Fenster", -"None": "Keine", -"New window": "Neues Fenster", -"Remove link": "Link entfernen", -"Anchors": "Textmarken", -"Link...": "Link...", -"Paste or type a link": "Link einf\u00fcgen oder eintippen", -"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "Diese Adresse scheint eine E-Mail-Adresse zu sein. M\u00f6chten Sie das dazu ben\u00f6tigte \"mailto:\" voranstellen?", -"The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "Diese Adresse scheint ein externer Link zu sein. M\u00f6chten Sie das dazu ben\u00f6tigte \"http:\/\/\" voranstellen?", -"Link list": "Linkliste", -"Insert video": "Video einf\u00fcgen", -"Insert\/edit video": "Video einf\u00fcgen\/bearbeiten", -"Insert\/edit media": "Medien einf\u00fcgen\/bearbeiten", -"Alternative source": "Alternative Quelle", -"Alternative source URL": "URL der alternativen Quelle", -"Media poster (Image URL)": "Medienposter (Bild-URL)", -"Paste your embed code below:": "F\u00fcgen Sie Ihren Einbettungscode hier ein:", -"Embed": "Einbetten", -"Media...": "Medien...", -"Nonbreaking space": "Gesch\u00fctztes Leerzeichen", -"Page break": "Seitenumbruch", -"Paste as text": "Als Text einf\u00fcgen", -"Preview": "Vorschau", -"Print...": "Drucken...", -"Save": "Speichern", -"Find": "Suchen", -"Replace with": "Ersetzen durch", -"Replace": "Ersetzen", -"Replace all": "Alles ersetzen", -"Previous": "Vorherige", -"Next": "Weiter", -"Find and replace...": "Suchen und ersetzen...", -"Could not find the specified string.": "Die Zeichenfolge wurde nicht gefunden.", -"Match case": "Gro\u00df-\/Kleinschreibung beachten", -"Find whole words only": "Nur ganze W\u00f6rter suchen", -"Spell check": "Rechschreibpr\u00fcfung", -"Ignore": "Ignorieren", -"Ignore all": "Alles Ignorieren", -"Finish": "Ende", -"Add to Dictionary": "Zum W\u00f6rterbuch hinzuf\u00fcgen", -"Insert table": "Tabelle einf\u00fcgen", -"Table properties": "Tabelleneigenschaften", -"Delete table": "Tabelle l\u00f6schen", -"Cell": "Zelle", -"Row": "Zeile", -"Column": "Spalte", -"Cell properties": "Zelleneigenschaften", -"Merge cells": "Zellen verbinden", -"Split cell": "Zelle aufteilen", -"Insert row before": "Neue Zeile davor einf\u00fcgen ", -"Insert row after": "Neue Zeile danach einf\u00fcgen", -"Delete row": "Zeile l\u00f6schen", -"Row properties": "Zeileneigenschaften", -"Cut row": "Zeile ausschneiden", -"Copy row": "Zeile kopieren", -"Paste row before": "Zeile davor einf\u00fcgen", -"Paste row after": "Zeile danach einf\u00fcgen", -"Insert column before": "Neue Spalte davor einf\u00fcgen", -"Insert column after": "Neue Spalte danach einf\u00fcgen", -"Delete column": "Spalte l\u00f6schen", -"Cols": "Spalten", -"Rows": "Zeilen", -"Width": "Breite", -"Height": "H\u00f6he", -"Cell spacing": "Zellenabstand", -"Cell padding": "Zelleninnenabstand", -"Show caption": "Beschriftung anzeigen", -"Left": "Linksb\u00fcndig", -"Center": "Zentriert", -"Right": "Rechtsb\u00fcndig", -"Cell type": "Zellentyp", -"Scope": "G\u00fcltigkeitsbereich", -"Alignment": "Ausrichtung", -"H Align": "Horizontale Ausrichtung", -"V Align": "Vertikale Ausrichtung", -"Top": "Oben", -"Middle": "Mitte", -"Bottom": "Unten", -"Header cell": "Kopfzelle", -"Row group": "Zeilengruppe", -"Column group": "Spaltengruppe", -"Row type": "Zeilentyp", -"Header": "Kopfzeile", -"Body": "Inhalt", -"Footer": "Fu\u00dfzeile", -"Border color": "Rahmenfarbe", -"Insert template...": "Vorlage einf\u00fcgen...", -"Templates": "Vorlagen", -"Template": "Vorlage", -"Text color": "Textfarbe", -"Background color": "Hintergrundfarbe", -"Custom...": "Benutzerdefiniert...", -"Custom color": "Benutzerdefinierte Farbe", -"No color": "Keine Farbe", -"Remove color": "Farbauswahl aufheben", -"Table of Contents": "Inhaltsverzeichnis", -"Show blocks": "Bl\u00f6cke anzeigen", -"Show invisible characters": "Unsichtbare Zeichen anzeigen", -"Word count": "Anzahl der W\u00f6rter", -"Words: {0}": "W\u00f6rter: {0}", -"{0} words": "{0} W\u00f6rter", -"File": "Datei", -"Edit": "Bearbeiten", -"Insert": "Einf\u00fcgen", -"View": "Ansicht", -"Format": "Format", -"Table": "Tabelle", -"Tools": "Werkzeuge", -"Powered by {0}": "Betrieben von {0}", -"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "Rich-Text- Area. Dr\u00fccken Sie ALT-F9 f\u00fcr das Men\u00fc. Dr\u00fccken Sie ALT-F10 f\u00fcr Symbolleiste. Dr\u00fccken Sie ALT-0 f\u00fcr Hilfe", -"Image title": "Bildtitel", -"Border width": "Rahmenbreite", -"Border style": "Rahmenstil", -"Error": "Fehler", -"Warn": "Warnung", -"Valid": "G\u00fcltig", -"To open the popup, press Shift+Enter": "Dr\u00fccken Sie Umschalt+Eingabe, um das Popup-Fenster zu \u00f6ffnen.", -"Rich Text Area. Press ALT-0 for help.": "Rich-Text-Bereich. Dr\u00fccken Sie Alt+0 f\u00fcr Hilfe.", -"System Font": "Betriebssystemschriftart", -"Failed to upload image: {0}": "Bild konnte nicht hochgeladen werden: {0}", -"Failed to load plugin: {0} from url {1}": "Plugin konnte nicht geladen werden: {0} von URL {1}", -"Failed to load plugin url: {0}": "Plugin-URL konnte nicht geladen werden: {0}", -"Failed to initialize plugin: {0}": "Plugin konnte nicht initialisiert werden: {0}", -"example": "Beispiel", -"Search": "Suchen", -"All": "Alles", -"Currency": "W\u00e4hrung", -"Text": "Text", -"Quotations": "Anf\u00fchrungszeichen", -"Mathematical": "Mathematisch", -"Extended Latin": "Erweitertes Latein", -"Symbols": "Symbole", -"Arrows": "Pfeile", -"User Defined": "Benutzerdefiniert", -"dollar sign": "Dollarzeichen", -"currency sign": "W\u00e4hrungssymbol", -"euro-currency sign": "Eurozeichen", -"colon sign": "Doppelpunkt", -"cruzeiro sign": "Cruzeirozeichen", -"french franc sign": "Franczeichen", -"lira sign": "Lirezeichen", -"mill sign": "Millzeichen", -"naira sign": "Nairazeichen", -"peseta sign": "Pesetazeichen", -"rupee sign": "Rupiezeichen", -"won sign": "Wonzeichen", -"new sheqel sign": "Schekelzeichen", -"dong sign": "Dongzeichen", -"kip sign": "Kipzeichen", -"tugrik sign": "Tugrikzeichen", -"drachma sign": "Drachmezeichen", -"german penny symbol": "Pfennigzeichen", -"peso sign": "Pesozeichen", -"guarani sign": "Guaranizeichen", -"austral sign": "Australzeichen", -"hryvnia sign": "Hrywnjazeichen", -"cedi sign": "Cedizeichen", -"livre tournois sign": "Livrezeichen", -"spesmilo sign": "Spesmilozeichen", -"tenge sign": "Tengezeichen", -"indian rupee sign": "Indisches Rupiezeichen", -"turkish lira sign": "T\u00fcrkisches Lirazeichen", -"nordic mark sign": "Zeichen nordische Mark", -"manat sign": "Manatzeichen", -"ruble sign": "Rubelzeichen", -"yen character": "Yenzeichen", -"yuan character": "Yuanzeichen", -"yuan character, in hong kong and taiwan": "Yuanzeichen in Hongkong und Taiwan", -"yen\/yuan character variant one": "Yen-\/Yuanzeichen Variante 1", -"Loading emoticons...": "Emoticons werden geladen...", -"Could not load emoticons": "Emoticons konnten nicht geladen werden", -"People": "Menschen", -"Animals and Nature": "Tiere und Natur", -"Food and Drink": "Essen und Trinken", -"Activity": "Aktivit\u00e4t", -"Travel and Places": "Reisen und Orte", -"Objects": "Objekte", -"Flags": "Flaggen", -"Characters": "Zeichen", -"Characters (no spaces)": "Zeichen (ohne Leerzeichen)", -"Error: Form submit field collision.": "Fehler: Kollision der Formularbest\u00e4tigungsfelder.", -"Error: No form element found.": "Fehler: Kein Formularelement gefunden.", -"Update": "Aktualisieren", -"Color swatch": "Farbpalette", -"Turquoise": "T\u00fcrkis", -"Green": "Gr\u00fcn", -"Blue": "Blau", -"Purple": "Violett", -"Navy Blue": "Marineblau", -"Dark Turquoise": "Dunkelt\u00fcrkis", -"Dark Green": "Dunkelgr\u00fcn", -"Medium Blue": "Mittleres Blau", -"Medium Purple": "Mittelviolett", -"Midnight Blue": "Mitternachtsblau", -"Yellow": "Gelb", -"Orange": "Orange", -"Red": "Rot", -"Light Gray": "Hellgrau", -"Gray": "Grau", -"Dark Yellow": "Dunkelgelb", -"Dark Orange": "Dunkelorange", -"Dark Red": "Dunkelrot", -"Medium Gray": "Mittelgrau", -"Dark Gray": "Dunkelgrau", -"Black": "Schwarz", -"White": "Wei\u00df", -"Switch to or from fullscreen mode": "Vollbildmodus umschalten", -"Open help dialog": "Hilfe-Dialog \u00f6ffnen", -"history": "Historie", -"styles": "Stile", -"formatting": "Formatierung", -"alignment": "Ausrichtung", -"indentation": "Einr\u00fcckungen", -"permanent pen": "Textmarker", -"comments": "Anmerkungen", -"Anchor": "Textmarke", -"Special character": "Sonderzeichen", -"Code sample": "Codebeispiel", -"Color": "Farbe", -"Emoticons": "Emoticons", -"Document properties": "Dokumenteigenschaften", -"Image": "Bild", -"Insert link": "Link einf\u00fcgen", -"Target": "Ziel", -"Link": "Link", -"Poster": "Poster", -"Media": "Medium", -"Print": "Drucken", -"Prev": "Zur\u00fcck", -"Find and replace": "Suchen und ersetzen", -"Whole words": "Nur ganze W\u00f6rter", -"Spellcheck": "Rechtschreibpr\u00fcfung", -"Caption": "Beschriftung", -"Insert template": "Vorlage einf\u00fcgen " -}); \ No newline at end of file diff --git a/website/js/vendor/tinymce/js/tinymce/langs/fr_FR.js b/website/js/vendor/tinymce/js/tinymce/langs/fr_FR.js deleted file mode 100644 index 2d074f8..0000000 --- a/website/js/vendor/tinymce/js/tinymce/langs/fr_FR.js +++ /dev/null @@ -1,389 +0,0 @@ -tinymce.addI18n('fr_FR',{ -"Redo": "R\u00e9tablir", -"Undo": "Annuler", -"Cut": "Couper", -"Copy": "Copier", -"Paste": "Coller", -"Select all": "S\u00e9lectionner tout", -"New document": "Nouveau document", -"Ok": "OK", -"Cancel": "Annuler", -"Visual aids": "Aides visuelles", -"Bold": "Gras", -"Italic": "Italique", -"Underline": "Soulign\u00e9", -"Strikethrough": "Barr\u00e9", -"Superscript": "Exposant", -"Subscript": "Indice", -"Clear formatting": "Effacer la mise en forme", -"Align left": "Aligner \u00e0 gauche", -"Align center": "Centrer", -"Align right": "Aligner \u00e0 droite", -"Justify": "Justifier", -"Bullet list": "Liste \u00e0 puces", -"Numbered list": "Liste num\u00e9rot\u00e9e", -"Decrease indent": "R\u00e9duire le retrait", -"Increase indent": "Augmenter le retrait", -"Close": "Fermer", -"Formats": "Formats", -"Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "Votre navigateur ne supporte pas l\u2019acc\u00e8s direct au presse-papiers. Merci d'utiliser les raccourcis clavier Ctrl+X\/C\/V.", -"Headers": "En-t\u00eates", -"Header 1": "En-t\u00eate 1", -"Header 2": "En-t\u00eate 2", -"Header 3": "En-t\u00eate 3", -"Header 4": "En-t\u00eate 4", -"Header 5": "En-t\u00eate 5", -"Header 6": "En-t\u00eate 6", -"Headings": "Titres", -"Heading 1": "Titre\u00a01", -"Heading 2": "Titre\u00a02", -"Heading 3": "Titre\u00a03", -"Heading 4": "Titre\u00a04", -"Heading 5": "Titre\u00a05", -"Heading 6": "Titre\u00a06", -"Preformatted": "Pr\u00e9format\u00e9", -"Div": "Div", -"Pre": "Pre", -"Code": "Code", -"Paragraph": "Paragraphe", -"Blockquote": "Blockquote", -"Inline": "En ligne", -"Blocks": "Blocs", -"Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.": "Le presse-papiers est maintenant en mode \"texte plein\". Les contenus seront coll\u00e9s sans retenir les formatages jusqu'\u00e0 ce que vous d\u00e9sactiviez cette option.", -"Fonts": "Polices", -"Font Sizes": "Tailles de police", -"Class": "Classe", -"Browse for an image": "Rechercher une image", -"OR": "OU", -"Drop an image here": "D\u00e9poser une image ici", -"Upload": "T\u00e9l\u00e9charger", -"Block": "Bloc", -"Align": "Aligner", -"Default": "Par d\u00e9faut", -"Circle": "Cercle", -"Disc": "Disque", -"Square": "Carr\u00e9", -"Lower Alpha": "Alpha minuscule", -"Lower Greek": "Grec minuscule", -"Lower Roman": "Romain minuscule", -"Upper Alpha": "Alpha majuscule", -"Upper Roman": "Romain majuscule", -"Anchor...": "Ancre...", -"Name": "Nom", -"Id": "Id", -"Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.": "L'Id doit commencer par une lettre suivi par des lettres, nombres, tirets, points, deux-points ou underscores", -"You have unsaved changes are you sure you want to navigate away?": "Vous avez des modifications non enregistr\u00e9es, \u00eates-vous s\u00fbr de quitter la page?", -"Restore last draft": "Restaurer le dernier brouillon", -"Special characters...": "Caract\u00e8res sp\u00e9ciaux...", -"Source code": "Code source", -"Insert\/Edit code sample": "Ins\u00e9rer \/ modifier une exemple de code", -"Language": "Langue", -"Code sample...": "Exemple de code...", -"Color Picker": "S\u00e9lecteur de couleurs", -"R": "R", -"G": "V", -"B": "B", -"Left to right": "Gauche \u00e0 droite", -"Right to left": "Droite \u00e0 gauche", -"Emoticons...": "\u00c9motic\u00f4nes...", -"Metadata and Document Properties": "M\u00e9tadonn\u00e9es et propri\u00e9t\u00e9s du document", -"Title": "Titre", -"Keywords": "Mots-cl\u00e9s", -"Description": "Description", -"Robots": "Robots", -"Author": "Auteur", -"Encoding": "Encodage", -"Fullscreen": "Plein \u00e9cran", -"Action": "Action", -"Shortcut": "Raccourci", -"Help": "Aide", -"Address": "Adresse", -"Focus to menubar": "Cibler la barre de menu", -"Focus to toolbar": "Cibler la barre d'outils", -"Focus to element path": "Cibler le chemin vers l'\u00e9l\u00e9ment", -"Focus to contextual toolbar": "Cibler la barre d'outils contextuelle", -"Insert link (if link plugin activated)": "Ins\u00e9rer un lien (si le module link est activ\u00e9)", -"Save (if save plugin activated)": "Enregistrer (si le module save est activ\u00e9)", -"Find (if searchreplace plugin activated)": "Rechercher (si le module searchreplace est activ\u00e9)", -"Plugins installed ({0}):": "Modules install\u00e9s ({0}) : ", -"Premium plugins:": "Modules premium :", -"Learn more...": "En savoir plus...", -"You are using {0}": "Vous utilisez {0}", -"Plugins": "Plugins", -"Handy Shortcuts": "Raccourcis utiles", -"Horizontal line": "Ligne horizontale", -"Insert\/edit image": "Ins\u00e9rer\/modifier une image", -"Image description": "Description de l'image", -"Source": "Source", -"Dimensions": "Dimensions", -"Constrain proportions": "Conserver les proportions", -"General": "G\u00e9n\u00e9ral", -"Advanced": "Avanc\u00e9", -"Style": "Style", -"Vertical space": "Espacement vertical", -"Horizontal space": "Espacement horizontal", -"Border": "Bordure", -"Insert image": "Ins\u00e9rer une image", -"Image...": "Image...", -"Image list": "Liste d'images", -"Rotate counterclockwise": "Rotation anti-horaire", -"Rotate clockwise": "Rotation horaire", -"Flip vertically": "Retournement vertical", -"Flip horizontally": "Retournement horizontal", -"Edit image": "Modifier l'image", -"Image options": "Options de l'image", -"Zoom in": "Zoomer", -"Zoom out": "D\u00e9zoomer", -"Crop": "Rogner", -"Resize": "Redimensionner", -"Orientation": "Orientation", -"Brightness": "Luminosit\u00e9", -"Sharpen": "Affiner", -"Contrast": "Contraste", -"Color levels": "Niveaux de couleur", -"Gamma": "Gamma", -"Invert": "Inverser", -"Apply": "Appliquer", -"Back": "Retour", -"Insert date\/time": "Ins\u00e9rer date\/heure", -"Date\/time": "Date\/heure", -"Insert\/Edit Link": "Ins\u00e9rer\/Modifier lien", -"Insert\/edit link": "Ins\u00e9rer\/modifier un lien", -"Text to display": "Texte \u00e0 afficher", -"Url": "Url", -"Open link in...": "Ouvrir le lien dans...", -"Current window": "Fen\u00eatre active", -"None": "n\/a", -"New window": "Nouvelle fen\u00eatre", -"Remove link": "Enlever le lien", -"Anchors": "Ancres", -"Link...": "Lien...", -"Paste or type a link": "Coller ou taper un lien", -"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "L'URL que vous avez entr\u00e9e semble \u00eatre une adresse e-mail. Voulez-vous ajouter le pr\u00e9fixe mailto: n\u00e9cessaire?", -"The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "L'URL que vous avez entr\u00e9e semble \u00eatre un lien externe. Voulez-vous ajouter le pr\u00e9fixe http:\/\/ n\u00e9cessaire?", -"Link list": "Liste de liens", -"Insert video": "Ins\u00e9rer une vid\u00e9o", -"Insert\/edit video": "Ins\u00e9rer\/modifier une vid\u00e9o", -"Insert\/edit media": "Ins\u00e9rer\/modifier un m\u00e9dia", -"Alternative source": "Source alternative", -"Alternative source URL": "URL de la source alternative", -"Media poster (Image URL)": "Affiche de m\u00e9dia (URL de l'image)", -"Paste your embed code below:": "Collez votre code d'int\u00e9gration ci-dessous :", -"Embed": "Int\u00e9grer", -"Media...": "M\u00e9dia...", -"Nonbreaking space": "Espace ins\u00e9cable", -"Page break": "Saut de page", -"Paste as text": "Coller comme texte", -"Preview": "Pr\u00e9visualiser", -"Print...": "Imprimer...", -"Save": "Enregistrer", -"Find": "Chercher", -"Replace with": "Remplacer par", -"Replace": "Remplacer", -"Replace all": "Tout remplacer", -"Previous": "Pr\u00e9c\u00e9dente", -"Next": "Suiv", -"Find and replace...": "Trouver et remplacer...", -"Could not find the specified string.": "Impossible de trouver la cha\u00eene sp\u00e9cifi\u00e9e.", -"Match case": "Respecter la casse", -"Find whole words only": "Mot entier", -"Spell check": "V\u00e9rification de l'orthographe", -"Ignore": "Ignorer", -"Ignore all": "Tout ignorer", -"Finish": "Finie", -"Add to Dictionary": "Ajouter au dictionnaire", -"Insert table": "Ins\u00e9rer un tableau", -"Table properties": "Propri\u00e9t\u00e9s du tableau", -"Delete table": "Supprimer le tableau", -"Cell": "Cellule", -"Row": "Ligne", -"Column": "Colonne", -"Cell properties": "Propri\u00e9t\u00e9s de la cellule", -"Merge cells": "Fusionner les cellules", -"Split cell": "Diviser la cellule", -"Insert row before": "Ins\u00e9rer une ligne avant", -"Insert row after": "Ins\u00e9rer une ligne apr\u00e8s", -"Delete row": "Effacer la ligne", -"Row properties": "Propri\u00e9t\u00e9s de la ligne", -"Cut row": "Couper la ligne", -"Copy row": "Copier la ligne", -"Paste row before": "Coller la ligne avant", -"Paste row after": "Coller la ligne apr\u00e8s", -"Insert column before": "Ins\u00e9rer une colonne avant", -"Insert column after": "Ins\u00e9rer une colonne apr\u00e8s", -"Delete column": "Effacer la colonne", -"Cols": "Colonnes", -"Rows": "Lignes", -"Width": "Largeur", -"Height": "Hauteur", -"Cell spacing": "Espacement inter-cellulles", -"Cell padding": "Espacement interne cellule", -"Show caption": "Afficher le sous-titrage", -"Left": "Gauche", -"Center": "Centr\u00e9", -"Right": "Droite", -"Cell type": "Type de cellule", -"Scope": "Etendue", -"Alignment": "Alignement", -"H Align": "Alignement H", -"V Align": "Alignement V", -"Top": "Haut", -"Middle": "Milieu", -"Bottom": "Bas", -"Header cell": "Cellule d'en-t\u00eate", -"Row group": "Groupe de lignes", -"Column group": "Groupe de colonnes", -"Row type": "Type de ligne", -"Header": "En-t\u00eate", -"Body": "Corps", -"Footer": "Pied", -"Border color": "Couleur de la bordure", -"Insert template...": "Ins\u00e9rer un mod\u00e8le...", -"Templates": "Th\u00e8mes", -"Template": "Mod\u00e8le", -"Text color": "Couleur du texte", -"Background color": "Couleur d'arri\u00e8re-plan", -"Custom...": "Personnalis\u00e9...", -"Custom color": "Couleur personnalis\u00e9e", -"No color": "Aucune couleur", -"Remove color": "Supprimer la couleur", -"Table of Contents": "Table des mati\u00e8res", -"Show blocks": "Afficher les blocs", -"Show invisible characters": "Afficher les caract\u00e8res invisibles", -"Word count": "Nombre de mots", -"Words: {0}": "Mots : {0}", -"{0} words": "{0} mots", -"File": "Fichier", -"Edit": "Editer", -"Insert": "Ins\u00e9rer", -"View": "Voir", -"Format": "Format", -"Table": "Tableau", -"Tools": "Outils", -"Powered by {0}": "Propuls\u00e9 par {0}", -"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "Zone Texte Riche. Appuyer sur ALT-F9 pour le menu. Appuyer sur ALT-F10 pour la barre d'outils. Appuyer sur ALT-0 pour de l'aide.", -"Image title": "Titre d'image", -"Border width": "\u00c9paisseur de la bordure", -"Border style": "Style de la bordure", -"Error": "Erreur", -"Warn": "Avertir", -"Valid": "Valide", -"To open the popup, press Shift+Enter": "Pour ouvrir la popup, appuyez sur Maj+Entr\u00e9e", -"Rich Text Area. Press ALT-0 for help.": "Zone de texte riche. Appuyez sur ALT-0 pour l'aide.", -"System Font": "Police syst\u00e8me", -"Failed to upload image: {0}": "\u00c9chec d'envoi de l'image\u00a0: {0}", -"Failed to load plugin: {0} from url {1}": "\u00c9chec de chargement du plug-in\u00a0: {0} \u00e0 partir de l\u2019URL {1} ", -"Failed to load plugin url: {0}": "\u00c9chec de chargement de l'URL du plug-in\u00a0: {0}", -"Failed to initialize plugin: {0}": "\u00c9chec d'initialisation du plug-in\u00a0: {0}", -"example": "exemple", -"Search": "Rechercher", -"All": "Tout", -"Currency": "Devise", -"Text": "Texte", -"Quotations": "Citations", -"Mathematical": "Op\u00e9rateurs math\u00e9matiques", -"Extended Latin": "Latin \u00e9tendu", -"Symbols": "Symboles", -"Arrows": "Fl\u00e8ches", -"User Defined": "D\u00e9fini par l'utilisateur", -"dollar sign": "Symbole dollar", -"currency sign": "Symbole devise", -"euro-currency sign": "Symbole euro", -"colon sign": "Symbole col\u00f3n", -"cruzeiro sign": "Symbole cruzeiro", -"french franc sign": "Symbole franc fran\u00e7ais", -"lira sign": "Symbole lire", -"mill sign": "Symbole milli\u00e8me", -"naira sign": "Symbole naira", -"peseta sign": "Symbole peseta", -"rupee sign": "Symbole roupie", -"won sign": "Symbole won", -"new sheqel sign": "Symbole nouveau ch\u00e9kel", -"dong sign": "Symbole dong", -"kip sign": "Symbole kip", -"tugrik sign": "Symbole tougrik", -"drachma sign": "Symbole drachme", -"german penny symbol": "Symbole pfennig", -"peso sign": "Symbole peso", -"guarani sign": "Symbole guarani", -"austral sign": "Symbole austral", -"hryvnia sign": "Symbole hryvnia", -"cedi sign": "Symbole cedi", -"livre tournois sign": "Symbole livre tournois", -"spesmilo sign": "Symbole spesmilo", -"tenge sign": "Symbole tenge", -"indian rupee sign": "Symbole roupie indienne", -"turkish lira sign": "Symbole lire turque", -"nordic mark sign": "Symbole du mark nordique", -"manat sign": "Symbole manat", -"ruble sign": "Symbole rouble", -"yen character": "Sinogramme Yen", -"yuan character": "Sinogramme Yuan", -"yuan character, in hong kong and taiwan": "Sinogramme Yuan, Hong Kong et Taiwan", -"yen\/yuan character variant one": "Sinogramme Yen\/Yuan, premi\u00e8re variante", -"Loading emoticons...": "Chargement des \u00e9motic\u00f4nes en cours...", -"Could not load emoticons": "\u00c9chec de chargement des \u00e9motic\u00f4nes", -"People": "Personnes", -"Animals and Nature": "Animaux & nature", -"Food and Drink": "Nourriture & boissons", -"Activity": "Activit\u00e9", -"Travel and Places": "Voyages & lieux", -"Objects": "Objets", -"Flags": "Drapeaux", -"Characters": "Caract\u00e8res", -"Characters (no spaces)": "Caract\u00e8res (espaces non compris)", -"Error: Form submit field collision.": "Erreur : conflit de champs lors de la soumission du formulaire", -"Error: No form element found.": "Erreur : aucun \u00e9l\u00e9ment de formulaire trouv\u00e9.", -"Update": "Mettre \u00e0 jour", -"Color swatch": "\u00c9chantillon de couleurs", -"Turquoise": "Turquoise", -"Green": "Vert", -"Blue": "Bleu", -"Purple": "Violet", -"Navy Blue": "Bleu marine", -"Dark Turquoise": "Turquoise fonc\u00e9", -"Dark Green": "Vert fonc\u00e9", -"Medium Blue": "Bleu moyen", -"Medium Purple": "Violet moyen", -"Midnight Blue": "Bleu de minuit", -"Yellow": "Jaune", -"Orange": "Orange", -"Red": "Rouge", -"Light Gray": "Gris clair", -"Gray": "Gris", -"Dark Yellow": "Jaune fonc\u00e9", -"Dark Orange": "Orange fonc\u00e9", -"Dark Red": "Rouge fonc\u00e9", -"Medium Gray": "Gris moyen", -"Dark Gray": "Gris fonc\u00e9", -"Black": "Noir", -"White": "Blanc", -"Switch to or from fullscreen mode": "Passer en ou quitter le mode plein \u00e9cran", -"Open help dialog": "Ouvrir la bo\u00eete de dialogue d'aide", -"history": "historique", -"styles": "styles", -"formatting": "mise en forme", -"alignment": "alignement", -"indentation": "retrait", -"permanent pen": "feutre ind\u00e9l\u00e9bile", -"comments": "commentaires", -"Anchor": "Ancre", -"Special character": "Caract\u00e8res sp\u00e9ciaux", -"Code sample": "Extrait de code", -"Color": "Couleur", -"Emoticons": "Emotic\u00f4nes", -"Document properties": "Propri\u00e9t\u00e9 du document", -"Image": "Image", -"Insert link": "Ins\u00e9rer un lien", -"Target": "Cible", -"Link": "Lien", -"Poster": "Publier", -"Media": "M\u00e9dia", -"Print": "Imprimer", -"Prev": "Pr\u00e9c ", -"Find and replace": "Trouver et remplacer", -"Whole words": "Mots entiers", -"Spellcheck": "V\u00e9rification orthographique", -"Caption": "Titre", -"Insert template": "Ajouter un th\u00e8me" -}); \ No newline at end of file diff --git a/website/js/vendor/tinymce/js/tinymce/langs/readme.md b/website/js/vendor/tinymce/js/tinymce/langs/readme.md deleted file mode 100644 index a52bf03..0000000 --- a/website/js/vendor/tinymce/js/tinymce/langs/readme.md +++ /dev/null @@ -1,3 +0,0 @@ -This is where language files should be placed. - -Please DO NOT translate these directly use this service: https://www.transifex.com/projects/p/tinymce/ diff --git a/website/js/vendor/tinymce/js/tinymce/plugins/advlist/plugin.min.js b/website/js/vendor/tinymce/js/tinymce/plugins/advlist/plugin.min.js deleted file mode 100644 index f11035d..0000000 --- a/website/js/vendor/tinymce/js/tinymce/plugins/advlist/plugin.min.js +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Tiny Technologies, Inc. All rights reserved. - * Licensed under the LGPL or a commercial license. - * For LGPL see License.txt in the project root for license information. - * For commercial licenses see https://www.tiny.cloud/ - * - * Version: 5.1.5 (2019-12-19) - */ -!function(){"use strict";function n(){}function o(n){return function(){return n}}function t(){return d}var e,r=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=tinymce.util.Tools.resolve("tinymce.util.Tools"),l=function(n,t,e){var r="UL"===t?"InsertUnorderedList":"InsertOrderedList";n.execCommand(r,!1,!1===e?null:{"list-style-type":e})},i=function(e){e.addCommand("ApplyUnorderedListStyle",function(n,t){l(e,"UL",t["list-style-type"])}),e.addCommand("ApplyOrderedListStyle",function(n,t){l(e,"OL",t["list-style-type"])})},c=function(n){var t=n.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");return t?t.split(/[ ,]/):[]},s=function(n){var t=n.getParam("advlist_bullet_styles","default,circle,square");return t?t.split(/[ ,]/):[]},f=o(!1),a=o(!0),d=(e={fold:function(n,t){return n()},is:f,isSome:f,isNone:a,getOr:m,getOrThunk:p,getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:o(null),getOrUndefined:o(undefined),or:m,orThunk:p,map:t,each:n,bind:t,exists:f,forall:a,filter:t,equals:g,equals_:g,toArray:function(){return[]},toString:o("none()")},Object.freeze&&Object.freeze(e),e);function g(n){return n.isNone()}function p(n){return n()}function m(n){return n}function y(n,t,e){var r=function(n,t){for(var e=0;ey(e)&&(i=o+g);var l=z(e);if(l&&l]*>((\xa0| |[ \t]|]*>)+?|)|
$","i").test(e)}function i(t){var e=parseInt(v.getItem(o(t)+"time"),10)||0;return!((new Date).getTime()-e>function(t){return r(t.settings.autosave_retention,"20m")}(t))||(g(t,!1),!1)}function u(t){var e=o(t);!a(t)&&t.isDirty()&&(v.setItem(e+"draft",t.getContent({format:"raw",no_events:!0})),v.setItem(e+"time",(new Date).getTime().toString()),function(t){t.fire("StoreDraft")}(t))}function s(t){var e=o(t);i(t)&&(t.setContent(v.getItem(e+"draft"),{format:"raw"}),function(t){t.fire("RestoreDraft")}(t))}function c(t,e){var n=function(t){return r(t.settings.autosave_interval,"30s")}(t);e.get()||(m.setInterval(function(){t.removed||u(t)},n),e.set(!0))}function f(t){t.undoManager.transact(function(){s(t),g(t)}),t.focus()}var l=function(t){function e(){return n}var n=t;return{get:e,set:function(t){n=t},clone:function(){return l(e())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),m=tinymce.util.Tools.resolve("tinymce.util.Delay"),v=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),d=tinymce.util.Tools.resolve("tinymce.util.Tools"),g=function(t,e){var n=o(t);v.removeItem(n+"draft"),v.removeItem(n+"time"),!1!==e&&function(t){t.fire("RemoveDraft")}(t)};function y(r){for(var o=[],t=1;t(.*?)<\/a>/gi,"[url=$1]$2[/url]"),o(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),o(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),o(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),o(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),o(/(.*?)<\/span>/gi,"[color=$1]$2[/color]"),o(/(.*?)<\/font>/gi,"[color=$1]$2[/color]"),o(/(.*?)<\/span>/gi,"[size=$1]$2[/size]"),o(/(.*?)<\/font>/gi,"$1"),o(//gi,"[img]$1[/img]"),o(/(.*?)<\/span>/gi,"[code]$1[/code]"),o(/(.*?)<\/span>/gi,"[quote]$1[/quote]"),o(/(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"),o(/(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"),o(/(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"),o(/(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"),o(/(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"),o(/(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"),o(/<\/(strong|b)>/gi,"[/b]"),o(/<(strong|b)>/gi,"[b]"),o(/<\/(em|i)>/gi,"[/i]"),o(/<(em|i)>/gi,"[i]"),o(/<\/u>/gi,"[/u]"),o(/(.*?)<\/span>/gi,"[u]$1[/u]"),o(//gi,"[u]"),o(/]*>/gi,"[quote]"),o(/<\/blockquote>/gi,"[/quote]"),o(/
/gi,"\n"),o(//gi,"\n"),o(/
/gi,"\n"),o(/

/gi,""),o(/<\/p>/gi,"\n"),o(/ |\u00a0/gi," "),o(/"/gi,'"'),o(/</gi,"<"),o(/>/gi,">"),o(/&/gi,"&"),t},i=function(t){t=e.trim(t);function o(o,e){t=t.replace(o,e)}return o(/\n/gi,"
"),o(/\[b\]/gi,""),o(/\[\/b\]/gi,""),o(/\[i\]/gi,""),o(/\[\/i\]/gi,""),o(/\[u\]/gi,""),o(/\[\/u\]/gi,""),o(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'$2'),o(/\[url\](.*?)\[\/url\]/gi,'$1'),o(/\[img\](.*?)\[\/img\]/gi,''),o(/\[color=(.*?)\](.*?)\[\/color\]/gi,'$2'),o(/\[code\](.*?)\[\/code\]/gi,'$1 '),o(/\[quote.*?\](.*?)\[\/quote\]/gi,'$1 '),t};!function n(){o.add("bbcode",function(o){o.on("BeforeSetContent",function(o){o.content=i(o.content)}),o.on("PostProcess",function(o){o.set&&(o.content=i(o.content)),o.get&&(o.content=t(o.content))})})}()}(); \ No newline at end of file diff --git a/website/js/vendor/tinymce/js/tinymce/plugins/charmap/plugin.min.js b/website/js/vendor/tinymce/js/tinymce/plugins/charmap/plugin.min.js deleted file mode 100644 index b1623c9..0000000 --- a/website/js/vendor/tinymce/js/tinymce/plugins/charmap/plugin.min.js +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Tiny Technologies, Inc. All rights reserved. - * Licensed under the LGPL or a commercial license. - * For LGPL see License.txt in the project root for license information. - * For commercial licenses see https://www.tiny.cloud/ - * - * Version: 5.1.5 (2019-12-19) - */ -!function(c){"use strict";function n(){}function i(n){return function(){return n}}function e(){return m}var r,t=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=function(n,e){return n.fire("insertCustomChar",{chr:e})},u=function(n,e){var r=a(n,e).chr;n.execCommand("mceInsertContent",!1,r)},o=tinymce.util.Tools.resolve("tinymce.util.Tools"),s=function(n){return n.settings.charmap},l=function(n){return n.settings.charmap_append},f=i(!1),g=i(!0),m=(r={fold:function(n,e){return n()},is:f,isSome:f,isNone:g,getOr:p,getOrThunk:d,getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(undefined),or:p,orThunk:d,map:e,each:n,bind:e,exists:f,forall:g,filter:e,equals:h,equals_:h,toArray:function(){return[]},toString:i("none()")},Object.freeze&&Object.freeze(r),r);function h(n){return n.isNone()}function d(n){return n()}function p(n){return n}function y(e){return function(n){return function(n){if(null===n)return"null";var e=typeof n;return"object"==e&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"==e&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":e}(n)===e}}function w(n,e){for(var r=n.length,t=new Array(r),a=0;ae.length)break e;if(!(h instanceof a)){u.lastIndex=0;var m=u.exec(h);if(m){g&&(d=m[1].length);var b=m.index-1+d,y=b+(m=m[0].slice(d)).length,v=h.slice(0,b+1),k=h.slice(y+1),w=[f,1];v&&w.push(v);var x=new a(o,c?S.tokenize(m,c):m,p);w.push(x),k&&w.push(k),Array.prototype.splice.apply(r,w)}}}}}return r},hooks:{all:{},add:function(e,t){var n=S.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=S.hooks.all[e];if(n&&n.length)for(var a=0,r=void 0;r=n[a++];)r(t)}}},s=S.Token=function(e,t,n){this.type=e,this.content=t,this.alias=n};if(s.stringify=function(t,n,e){if("string"==typeof t)return t;if("Array"===S.util.type(t))return t.map(function(e){return s.stringify(e,n,t)}).join("");var a={type:t.type,content:s.stringify(t.content,n,e),tag:"span",classes:["token",t.type],attributes:{},language:n,parent:e};if("comment"===a.type&&(a.attributes.spellcheck="true"),t.alias){var r="Array"===S.util.type(t.alias)?t.alias:[t.alias];Array.prototype.push.apply(a.classes,r)}S.hooks.run("wrap",a);var i="";for(var o in a.attributes)i+=(i?" ":"")+o+'="'+(a.attributes[o]||"")+'"';return"<"+a.tag+' class="'+a.classes.join(" ")+'" '+i+">"+a.content+""},!g.document)return g.addEventListener&&g.addEventListener("message",function(e){var t=JSON.parse(e.data),n=t.language,a=t.code,r=t.immediateClose;g.postMessage(S.highlight(a,S.languages[n],n)),r&&g.close()},!1),g.Prism}();void 0!==n&&(n.Prism=i),i.languages.markup={comment://,prolog:/<\?[\w\W]+?\?>/,doctype://,cdata://i,tag:{pattern:/<\/?[^\s>\/=.]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i,inside:{punctuation:/[=>"']/}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},i.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))}),i.languages.xml=i.languages.markup,i.languages.html=i.languages.markup,i.languages.mathml=i.languages.markup,i.languages.svg=i.languages.markup,i.languages.css={comment:/\/\*[\w\W]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^\{\}\s][^\{\};]*?(?=\s*\{)/,string:/("|')(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1/,property:/(\b|\B)[\w-]+(?=\s*:)/i,important:/\B!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},i.languages.css.atrule.inside.rest=i.util.clone(i.languages.css),i.languages.markup&&(i.languages.insertBefore("markup","tag",{style:{pattern:/[\w\W]*?<\/style>/i,inside:{tag:{pattern:/|<\/style>/i,inside:i.languages.markup.tag.inside},rest:i.languages.css},alias:"language-css"}}),i.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|').*?\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:i.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:i.languages.css}},alias:"language-css"}},i.languages.markup.tag)),i.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\w\W]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:/(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/i,lookbehind:!0,inside:{punctuation:/(\.|\\)/}},keyword:/\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,"boolean":/\b(true|false)\b/,"function":/[a-z0-9_]+(?=\()/i,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/},i.languages.javascript=i.languages.extend("clike",{keyword:/\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/,number:/\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/,"function":/[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i}),i.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\\\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0}}),i.languages.insertBefore("javascript","class-name",{"template-string":{pattern:/`(?:\\`|\\?[^`])*`/,inside:{interpolation:{pattern:/\$\{[^}]+\}/,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:i.languages.javascript}},string:/[\s\S]+/}}}),i.languages.markup&&i.languages.insertBefore("markup","tag",{script:{pattern:/[\w\W]*?<\/script>/i,inside:{tag:{pattern:/|<\/script>/i,inside:i.languages.markup.tag.inside},rest:i.languages.javascript},alias:"language-javascript"}}),i.languages.js=i.languages.javascript,i.languages.c=i.languages.extend("clike",{keyword:/\b(asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,operator:/\-[>-]?|\+\+?|!=?|<>?=?|==?|&&?|\|?\||[~^%?*\/]/,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)[ful]*\b/i}),i.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+([^\r\n\\]|\\.|\\(?:\r\n?|\n))*/im,lookbehind:!0,alias:"property",inside:{string:{pattern:/(#\s*include\s*)(<.+?>|("|')(\\?.)+?\3)/,lookbehind:!0}}}}),delete i.languages.c["class-name"],delete i.languages.c["boolean"],i.languages.csharp=i.languages.extend("clike",{keyword:/\b(abstract|as|async|await|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|do|double|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|goto|if|implicit|in|int|interface|internal|is|lock|long|namespace|new|null|object|operator|out|override|params|private|protected|public|readonly|ref|return|sbyte|sealed|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|virtual|void|volatile|while|add|alias|ascending|async|await|descending|dynamic|from|get|global|group|into|join|let|orderby|partial|remove|select|set|value|var|where|yield)\b/,string:[/@("|')(\1\1|\\\1|\\?(?!\1)[\s\S])*\1/,/("|')(\\?.)*?\1/],number:/\b-?(0x[\da-f]+|\d*\.?\d+)\b/i}),i.languages.insertBefore("csharp","keyword",{preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0}}),i.languages.cpp=i.languages.extend("c",{keyword:/\b(alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,"boolean":/\b(true|false)\b/,operator:/[-+]{1,2}|!=?|<{1,2}=?|>{1,2}=?|\->|:{1,2}|={1,2}|\^|~|%|&{1,2}|\|?\||\?|\*|\/|\b(and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/}),i.languages.insertBefore("cpp","keyword",{"class-name":{pattern:/(class\s+)[a-z0-9_]+/i,lookbehind:!0}}),i.languages.java=i.languages.extend("clike",{keyword:/\b(abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while)\b/,number:/\b0b[01]+\b|\b0x[\da-f]*\.?[\da-fp\-]+\b|\b\d*\.?\d+(?:e[+-]?\d+)?[df]?\b/i,operator:{pattern:/(^|[^.])(?:\+[+=]?|-[-=]?|!=?|<>?>?=?|==?|&[&=]?|\|[|=]?|\*=?|\/=?|%=?|\^=?|[?:~])/m,lookbehind:!0}}),i.languages.php=i.languages.extend("clike",{keyword:/\b(and|or|xor|array|as|break|case|cfunction|class|const|continue|declare|default|die|do|else|elseif|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|for|foreach|function|include|include_once|global|if|new|return|static|switch|use|require|require_once|var|while|abstract|interface|public|implements|private|protected|parent|throw|null|echo|print|trait|namespace|final|yield|goto|instanceof|finally|try|catch)\b/i,constant:/\b[A-Z0-9_]{2,}\b/,comment:{pattern:/(^|[^\\])(?:\/\*[\w\W]*?\*\/|\/\/.*)/,lookbehind:!0}}),i.languages.insertBefore("php","class-name",{"shell-comment":{pattern:/(^|[^\\])#.*/,lookbehind:!0,alias:"comment"}}),i.languages.insertBefore("php","keyword",{delimiter:/\?>|<\?(?:php)?/i,variable:/\$\w+\b/i,"package":{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/,lookbehind:!0,inside:{punctuation:/\\/}}}),i.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/,lookbehind:!0}}),i.languages.markup&&(i.hooks.add("before-highlight",function(t){"php"===t.language&&(t.tokenStack=[],t.backupCode=t.code,t.code=t.code.replace(/(?:<\?php|<\?)[\w\W]*?(?:\?>)/gi,function(e){return t.tokenStack.push(e),"{{{PHP"+t.tokenStack.length+"}}}"}))}),i.hooks.add("before-insert",function(e){"php"===e.language&&(e.code=e.backupCode,delete e.backupCode)}),i.hooks.add("after-highlight",function(e){if("php"===e.language){for(var t=0,n=void 0;n=e.tokenStack[t];t++)e.highlightedCode=e.highlightedCode.replace("{{{PHP"+(t+1)+"}}}",i.highlight(n,e.grammar,"php").replace(/\$/g,"$$$$"));e.element.innerHTML=e.highlightedCode}}),i.hooks.add("wrap",function(e){"php"===e.language&&"markup"===e.type&&(e.content=e.content.replace(/(\{\{\{PHP[0-9]+\}\}\})/g,'$1'))}),i.languages.insertBefore("php","comment",{markup:{pattern:/<[^?]\/?(.*?)>/,inside:i.languages.markup},php:/\{\{\{PHP[0-9]+\}\}\}/})),i.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},string:/"""[\s\S]+?"""|'''[\s\S]+?'''|("|')(?:\\?.)*?\1/,"function":{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_][a-zA-Z0-9_]*(?=\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)[a-z0-9_]+/i,lookbehind:!0},keyword:/\b(?:as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|pass|print|raise|return|try|while|with|yield)\b/,"boolean":/\b(?:True|False)\b/,number:/\b-?(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not)\b/,punctuation:/[{}[\];(),.:]/},function(e){e.languages.ruby=e.languages.extend("clike",{comment:/#(?!\{[^\r\n]*?\}).*/,keyword:/\b(alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|false|for|if|in|module|new|next|nil|not|or|raise|redo|require|rescue|retry|return|self|super|then|throw|true|undef|unless|until|when|while|yield)\b/});var t={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:e.util.clone(e.languages.ruby)}};e.languages.insertBefore("ruby","keyword",{regex:[{pattern:/%r([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1[gim]{0,3}/,inside:{interpolation:t}},{pattern:/%r\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/,inside:{interpolation:t}},{pattern:/%r\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/,inside:{interpolation:t}},{pattern:/%r\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/,inside:{interpolation:t}},{pattern:/%r<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/,inside:{interpolation:t}},{pattern:/(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0}],variable:/[@$]+[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/,symbol:/:[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/}),e.languages.insertBefore("ruby","number",{builtin:/\b(Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|File|Fixnum|Fload|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z][a-zA-Z_0-9]*(?:[?!]|\b)/}),e.languages.ruby.string=[{pattern:/%[qQiIwWxs]?([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1/,inside:{interpolation:t}},{pattern:/%[qQiIwWxs]?\((?:[^()\\]|\\[\s\S])*\)/,inside:{interpolation:t}},{pattern:/%[qQiIwWxs]?\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/,inside:{interpolation:t}},{pattern:/%[qQiIwWxs]?\[(?:[^\[\]\\]|\\[\s\S])*\]/,inside:{interpolation:t}},{pattern:/%[qQiIwWxs]?<(?:[^<>\\]|\\[\s\S])*>/,inside:{interpolation:t}},{pattern:/("|')(#\{[^}]+\}|\\(?:\r?\n|\r)|\\?.)*?\1/,inside:{interpolation:t}}]}(i);function a(){}function o(e){return function(){return e}}function s(){return f}var l,u={isCodeSample:function B(e){return e&&"PRE"===e.nodeName&&-1!==e.className.indexOf("language-")},trimArg:function M(n){return function(e,t){return n(t)}}},d=o(!1),p=o(!0),f=(l={fold:function(e,t){return e()},is:d,isSome:d,isNone:p,getOr:b,getOrThunk:m,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:o(null),getOrUndefined:o(undefined),or:b,orThunk:m,map:s,each:a,bind:s,exists:d,forall:p,filter:s,equals:h,equals_:h,toArray:function(){return[]},toString:o("none()")},Object.freeze&&Object.freeze(l),l);function h(e){return e.isNone()}function m(e){return e()}function b(e){return e}function y(e){var t=e.selection?e.selection.getNode():null;return u.isCodeSample(t)?w.some(t):w.none()}var v,k=function(n){function e(){return r}function t(e){return e(n)}var a=o(n),r={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:p,isNone:d,getOr:a,getOrThunk:a,getOrDie:a,getOrNull:a,getOrUndefined:a,or:e,orThunk:e,map:function(e){return k(e(n))},each:function(e){e(n)},bind:t,exists:t,forall:t,filter:function(e){return e(n)?r:f},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(d,function(e){return t(n,e)})}};return r},w={some:k,none:s,from:function(e){return null===e||e===undefined?f:k(e)}},x=y,S=function(t,n,a){t.undoManager.transact(function(){var e=y(t);return a=r.DOM.encode(a),e.fold(function(){t.insertContent('

'+a+"
"),t.selection.select(t.$("#__new").removeAttr("id")[0])},function(e){t.dom.setAttrib(e,"class","language-"+n),e.innerHTML=a,i.highlightElement(e),t.selection.select(e)})})},A=function(e){return y(e).fold(function(){return""},function(e){return e.textContent})},C=function(e){return e.settings.codesample_languages},_=function(e){var t=C(e);return t||[{text:"HTML/XML",value:"markup"},{text:"JavaScript",value:"javascript"},{text:"CSS",value:"css"},{text:"PHP",value:"php"},{text:"Ruby",value:"ruby"},{text:"Python",value:"python"},{text:"Java",value:"java"},{text:"C",value:"c"},{text:"C#",value:"csharp"},{text:"C++",value:"cpp"}]},N=function(e,n){return x(e).fold(function(){return n},function(e){var t=e.className.match(/language-(\w+)/);return t?t[1]:n})},O=(v="function",function(e){return function(e){if(null===e)return"null";var t=typeof e;return"object"==t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"==t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t}(e)===v}),z=Array.prototype.slice,P=(O(Array.from)&&Array.from,function(n){var e=_(n),t=function(e){return 0===e.length?w.none():w.some(e[0])}(e).fold(function(){return""},function(e){return e.value}),a=N(n,t),r=A(n);n.windowManager.open({title:"Insert/Edit Code Sample",size:"large",body:{type:"panel",items:[{type:"selectbox",name:"language",label:"Language",items:e},{type:"textarea",name:"code",label:"Code view"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{language:a,code:r},onSubmit:function(e){var t=e.getData();S(n,t.language,t.code),e.close()}})}),W=function(t){t.addCommand("codesample",function(){var e=t.selection.getNode();t.selection.isCollapsed()||u.isCodeSample(e)?P(t):t.formatter.toggle("code")})},j=function(n){var r=n.$;n.on("PreProcess",function(e){r("pre[contenteditable=false]",e.node).filter(u.trimArg(u.isCodeSample)).each(function(e,t){var n=r(t),a=t.textContent;n.attr("class",r.trim(n.attr("class"))),n.removeAttr("contentEditable"),n.empty().append(r("").each(function(){this.textContent=a}))})}),n.on("SetContent",function(){var e=r("pre").filter(u.trimArg(u.isCodeSample)).filter(function(e,t){return"false"!==t.contentEditable});e.length&&n.undoManager.transact(function(){e.each(function(e,t){r(t).find("br").each(function(e,t){t.parentNode.replaceChild(n.getDoc().createTextNode("\n"),t)}),t.contentEditable="false",t.innerHTML=n.dom.encode(t.textContent),i.highlightElement(t),t.className=r.trim(t.className)})})})},T=function(n){n.ui.registry.addToggleButton("codesample",{icon:"code-sample",tooltip:"Insert/edit code sample",onAction:function(){return P(n)},onSetup:function(e){function t(){e.setActive(function(e){var t=e.selection.getStart();return e.dom.is(t,"pre.language-markup")}(n))}return n.on("NodeChange",t),function(){return n.off("NodeChange",t)}}}),n.ui.registry.addMenuItem("codesample",{text:"Code sample...",icon:"code-sample",onAction:function(){return P(n)}})};!function F(){e.add("codesample",function(t){j(t),T(t),W(t),t.on("dblclick",function(e){u.isCodeSample(e.target)&&P(t)})})}()}(window); \ No newline at end of file diff --git a/website/js/vendor/tinymce/js/tinymce/plugins/colorpicker/plugin.min.js b/website/js/vendor/tinymce/js/tinymce/plugins/colorpicker/plugin.min.js deleted file mode 100644 index 51e2463..0000000 --- a/website/js/vendor/tinymce/js/tinymce/plugins/colorpicker/plugin.min.js +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Tiny Technologies, Inc. All rights reserved. - * Licensed under the LGPL or a commercial license. - * For LGPL see License.txt in the project root for license information. - * For commercial licenses see https://www.tiny.cloud/ - * - * Version: 5.1.5 (2019-12-19) - */ -!function(o){"use strict";var i=tinymce.util.Tools.resolve("tinymce.PluginManager");!function n(){i.add("colorpicker",function(){o.console.warn("Color picker plugin is now built in to the core editor, please remove it from your editor configuration")})}()}(window); \ No newline at end of file diff --git a/website/js/vendor/tinymce/js/tinymce/plugins/contextmenu/plugin.min.js b/website/js/vendor/tinymce/js/tinymce/plugins/contextmenu/plugin.min.js deleted file mode 100644 index b9a9522..0000000 --- a/website/js/vendor/tinymce/js/tinymce/plugins/contextmenu/plugin.min.js +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Tiny Technologies, Inc. All rights reserved. - * Licensed under the LGPL or a commercial license. - * For LGPL see License.txt in the project root for license information. - * For commercial licenses see https://www.tiny.cloud/ - * - * Version: 5.1.5 (2019-12-19) - */ -!function(n){"use strict";var o=tinymce.util.Tools.resolve("tinymce.PluginManager");!function e(){o.add("contextmenu",function(){n.console.warn("Context menu plugin is now built in to the core editor, please remove it from your editor configuration")})}()}(window); \ No newline at end of file diff --git a/website/js/vendor/tinymce/js/tinymce/plugins/directionality/plugin.min.js b/website/js/vendor/tinymce/js/tinymce/plugins/directionality/plugin.min.js deleted file mode 100644 index 0105327..0000000 --- a/website/js/vendor/tinymce/js/tinymce/plugins/directionality/plugin.min.js +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Tiny Technologies, Inc. All rights reserved. - * Licensed under the LGPL or a commercial license. - * For LGPL see License.txt in the project root for license information. - * For commercial licenses see https://www.tiny.cloud/ - * - * Version: 5.1.5 (2019-12-19) - */ -!function(i){"use strict";function n(){}function u(n){return function(){return n}}function t(){return a}var e,r=tinymce.util.Tools.resolve("tinymce.PluginManager"),c=tinymce.util.Tools.resolve("tinymce.util.Tools"),o=function(n,t){var e,r=n.dom,o=n.selection.getSelectedBlocks();o.length&&(e=r.getAttrib(o[0],"dir"),c.each(o,function(n){r.getParent(n.parentNode,'*[dir="'+t+'"]',r.getRoot())||r.setAttrib(n,"dir",e!==t?t:null)}),n.nodeChanged())},d=function(n){n.addCommand("mceDirectionLTR",function(){o(n,"ltr")}),n.addCommand("mceDirectionRTL",function(){o(n,"rtl")})},f=u(!1),l=u(!0),a=(e={fold:function(n,t){return n()},is:f,isSome:f,isNone:l,getOr:s,getOrThunk:N,getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:u(null),getOrUndefined:u(undefined),or:s,orThunk:N,map:t,each:n,bind:t,exists:f,forall:l,filter:t,equals:m,equals_:m,toArray:function(){return[]},toString:u("none()")},Object.freeze&&Object.freeze(e),e);function m(n){return n.isNone()}function N(n){return n()}function s(n){return n}function g(n,t){var e=n.dom(),r=i.window.getComputedStyle(e).getPropertyValue(t),o=""!==r||function(n){var t=A(n)?n.dom().parentNode:n.dom();return t!==undefined&&null!==t&&t.ownerDocument.body.contains(t)}(n)?r:w(e,t);return null===o?undefined:o}function T(t,r){return function(e){function n(n){var t=p.fromDom(n.element);e.setActive(function(n){return"rtl"===g(n,"direction")?"rtl":"ltr"}(t)===r)}return t.on("NodeChange",n),function(){return t.off("NodeChange",n)}}}var E,O,y=function(e){function n(){return o}function t(n){return n(e)}var r=u(e),o={fold:function(n,t){return t(e)},is:function(n){return e===n},isSome:l,isNone:f,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:n,orThunk:n,map:function(n){return y(n(e))},each:function(n){n(e)},bind:t,exists:t,forall:t,filter:function(n){return n(e)?o:a},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(n){return n.is(e)},equals_:function(n,t){return n.fold(f,function(n){return t(e,n)})}};return o},D=function(n){return null===n||n===undefined?a:y(n)},h=function(n){if(null===n||n===undefined)throw new Error("Node cannot be null or undefined");return{dom:u(n)}},p={fromHtml:function(n,t){var e=(t||i.document).createElement("div");if(e.innerHTML=n,!e.hasChildNodes()||1Could not load emoticons

"}]},buttons:[{type:"cancel",text:"Close",primary:!0}],initialData:{pattern:"",results:[]}}),a.focus(M),a.unblock()}))},R=function(n,t){function e(){return U(n,t)}n.ui.registry.addButton("emoticons",{tooltip:"Emoticons",icon:"emoji",onAction:e}),n.ui.registry.addMenuItem("emoticons",{text:"Emoticons...",icon:"emoji",onAction:e})};!function B(){r.add("emoticons",function(n,t){var e=E(n,t),r=F(n),o=h(n,e,r);R(n,o),function(r,o){r.ui.registry.addAutocompleter("emoticons",{ch:":",columns:"auto",minChars:2,fetch:function(t,e){return o.waitForLoad().then(function(){var n=o.listAll();return d(n,t,A.some(e))})},onAction:function(n,t,e){r.selection.setRng(t),r.insertContent(e),n.hide()}})}(n,o)})}()}(window); \ No newline at end of file diff --git a/website/js/vendor/tinymce/js/tinymce/plugins/fullpage/plugin.min.js b/website/js/vendor/tinymce/js/tinymce/plugins/fullpage/plugin.min.js deleted file mode 100644 index 2e5e160..0000000 --- a/website/js/vendor/tinymce/js/tinymce/plugins/fullpage/plugin.min.js +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Tiny Technologies, Inc. All rights reserved. - * Licensed under the LGPL or a commercial license. - * For LGPL see License.txt in the project root for license information. - * For commercial licenses see https://www.tiny.cloud/ - * - * Version: 5.1.5 (2019-12-19) - */ -!function(m){"use strict";function f(t){return e({validate:!1,root_name:"#document"}).parse(t)}function g(t){return t.replace(/<\/?[A-Z]+/g,function(t){return t.toLowerCase()})}var o,i=function(t){function e(){return n}var n=t;return{get:e,set:function(t){n=t},clone:function(){return i(e())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),p=tinymce.util.Tools.resolve("tinymce.util.Tools"),e=tinymce.util.Tools.resolve("tinymce.html.DomParser"),h=tinymce.util.Tools.resolve("tinymce.html.Node"),y=tinymce.util.Tools.resolve("tinymce.html.Serializer"),v=function(t){return t.getParam("fullpage_hide_in_source_view")},r=function(t){return t.getParam("fullpage_default_xml_pi")},a=function(t){return t.getParam("fullpage_default_encoding")},c=function(t){return t.getParam("fullpage_default_font_family")},u=function(t){return t.getParam("fullpage_default_font_size")},s=function(t){return t.getParam("fullpage_default_text_color")},d=function(t){return t.getParam("fullpage_default_title")},_=function(t){return t.getParam("fullpage_default_doctype","")},b=f,n=function(t,e){var n,i,l=f(e),r={};function o(t,e){return t.attr(e)||""}return r.fontface=c(t),r.fontsize=u(t),7===(n=l.firstChild).type&&(r.xml_pi=!0,(i=/encoding="([^"]+)"/.exec(n.value))&&(r.docencoding=i[1])),(n=l.getAll("#doctype")[0])&&(r.doctype=""),(n=l.getAll("title")[0])&&n.firstChild&&(r.title=n.firstChild.value),p.each(l.getAll("meta"),function(t){var e,n=t.attr("name"),i=t.attr("http-equiv");n?r[n.toLowerCase()]=t.attr("content"):"Content-Type"===i&&(e=/charset\s*=\s*(.*)\s*/gi.exec(t.attr("content")))&&(r.docencoding=e[1])}),(n=l.getAll("html")[0])&&(r.langcode=o(n,"lang")||o(n,"xml:lang")),r.stylesheets=[],p.each(l.getAll("link"),function(t){"stylesheet"===t.attr("rel")&&r.stylesheets.push(t.attr("href"))}),(n=l.getAll("body")[0])&&(r.langdir=o(n,"dir"),r.style=o(n,"style"),r.visited_color=o(n,"vlink"),r.link_color=o(n,"link"),r.active_color=o(n,"alink")),r},x=function(t,r,e){var o,n,i,a,l,c=t.dom;function u(t,e,n){t.attr(e,n||undefined)}function s(t){n.firstChild?n.insert(t,n.firstChild):n.append(t)}o=f(e),(n=o.getAll("head")[0])||(a=o.getAll("html")[0],n=new h("head",1),a.firstChild?a.insert(n,a.firstChild,!0):a.append(n)),a=o.firstChild,r.xml_pi?(l='version="1.0"',r.docencoding&&(l+=' encoding="'+r.docencoding+'"'),7!==a.type&&(a=new h("xml",7),o.insert(a,o.firstChild,!0)),a.value=l):a&&7===a.type&&a.remove(),a=o.getAll("#doctype")[0],r.doctype?(a||(a=new h("#doctype",10),r.xml_pi?o.insert(a,o.firstChild):s(a)),a.value=r.doctype.substring(9,r.doctype.length-1)):a&&a.remove(),a=null,p.each(o.getAll("meta"),function(t){"Content-Type"===t.attr("http-equiv")&&(a=t)}),r.docencoding?(a||((a=new h("meta",1)).attr("http-equiv","Content-Type"),a.shortEnded=!0,s(a)),a.attr("content","text/html; charset="+r.docencoding)):a&&a.remove(),a=o.getAll("title")[0],r.title?(a?a.empty():s(a=new h("title",1)),a.append(new h("#text",3)).value=r.title):a&&a.remove(),p.each("keywords,description,author,copyright,robots".split(","),function(t){var e,n,i=o.getAll("meta"),l=r[t];for(e=0;e"))},C=Object.prototype.hasOwnProperty,k=(o=function(t,e){return e},function(){for(var t=new Array(arguments.length),e=0;e/g,function(t,e){return unescape(e)})},T=p.each,O=function(t){var e,n="",i="";if(r(t)){var l=a(t);n+='\n'}return n+=_(t),n+="\n\n\n",(e=d(t))&&(n+=""+e+"\n"),(e=a(t))&&(n+='\n'),(e=c(t))&&(i+="font-family: "+e+";"),(e=u(t))&&(i+="font-size: "+e+";"),(e=s(t))&&(i+="color: "+e+";"),n+="\n\n"},D=function(e,n,i){e.on("BeforeSetContent",function(t){!function(t,e,n,i){var l,r,o,a,c="",u=t.dom;if(!(i.selection||(o=A(t.settings.protect,i.content),"raw"===i.format&&e.get()||i.source_view&&v(t)))){0!==o.length||i.source_view||(o=p.trim(e.get())+"\n"+p.trim(o)+"\n"+p.trim(n.get())),-1!==(l=(o=o.replace(/<(\/?)BODY/gi,"<$1body")).indexOf("",l),e.set(g(o.substring(0,l+1))),-1===(r=o.indexOf("\n")),a=b(e.get()),T(a.getAll("style"),function(t){t.firstChild&&(c+=t.firstChild.value)});var s=a.getAll("body")[0];s&&u.setAttribs(t.getBody(),{style:s.attr("style")||"",dir:s.attr("dir")||"",vLink:s.attr("vlink")||"",link:s.attr("link")||"",aLink:s.attr("alink")||""}),u.remove("fullpage_styles");var d=t.getDoc().getElementsByTagName("head")[0];if(c)u.add(d,"style",{id:"fullpage_styles"}).appendChild(m.document.createTextNode(c));var f={};p.each(d.getElementsByTagName("link"),function(t){"stylesheet"===t.rel&&t.getAttribute("data-mce-fullpage")&&(f[t.href]=t)}),p.each(a.getAll("link"),function(t){var e=t.attr("href");if(!e)return!0;f[e]||"stylesheet"!==t.attr("rel")||u.add(d,"link",{rel:"stylesheet",text:"text/css",href:e,"data-mce-fullpage":"1"}),delete f[e]}),p.each(f,function(t){t.parentNode.removeChild(t)})}}(e,n,i,t)}),e.on("GetContent",function(t){!function(t,e,n,i){i.selection||i.source_view&&v(t)||(i.content=P(p.trim(e)+"\n"+p.trim(i.content)+"\n"+p.trim(n)))}(e,n.get(),i.get(),t)})},E=function(t){t.ui.registry.addButton("fullpage",{tooltip:"Metadata and document properties",icon:"document-properties",onAction:function(){t.execCommand("mceFullPageProperties")}}),t.ui.registry.addMenuItem("fullpage",{text:"Metadata and document properties",icon:"document-properties",onAction:function(){t.execCommand("mceFullPageProperties")}})};!function z(){t.add("fullpage",function(t){var e=i(""),n=i("");w(t,e),E(t),D(t,e,n)})}()}(window); \ No newline at end of file diff --git a/website/js/vendor/tinymce/js/tinymce/plugins/fullscreen/plugin.min.js b/website/js/vendor/tinymce/js/tinymce/plugins/fullscreen/plugin.min.js deleted file mode 100644 index c03217e..0000000 --- a/website/js/vendor/tinymce/js/tinymce/plugins/fullscreen/plugin.min.js +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Tiny Technologies, Inc. All rights reserved. - * Licensed under the LGPL or a commercial license. - * For LGPL see License.txt in the project root for license information. - * For commercial licenses see https://www.tiny.cloud/ - * - * Version: 5.1.5 (2019-12-19) - */ -!function(l){"use strict";function e(){}function m(e){return function(){return e}}function n(){return s}var r,t=function(e){function n(){return r}var r=e;return{get:n,set:function(e){r=e},clone:function(){return t(n())}}},o=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(e){return{isFullscreen:function(){return null!==e.get()}}},c=m(!1),u=m(!0),s=(r={fold:function(e,n){return e()},is:c,isSome:c,isNone:u,getOr:d,getOrThunk:a,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:m(null),getOrUndefined:m(undefined),or:d,orThunk:a,map:n,each:e,bind:n,exists:c,forall:u,filter:n,equals:f,equals_:f,toArray:function(){return[]},toString:m("none()")},Object.freeze&&Object.freeze(r),r);function f(e){return e.isNone()}function a(e){return e()}function d(e){return e}function h(n){return function(e){return function(e){if(null===e)return"null";var n=typeof e;return"object"==n&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"==n&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":n}(e)===n}}function v(e,n){for(var r=e.length,t=new Array(r),o=0;o${name}');return{name:"plugins",title:"Plugins",items:[{type:"htmlpanel",presets:"document",html:[(n=e,null==n?"":'
'+function(t){var e=function(e){var t=F(e.plugins);return e.settings.forced_plugins===undefined?t:function(e,t){for(var n=[],o=0,a=e.length;o"+r(t,e)+""}),o=n.length,a=n.join("");return"

"+U.translate(["Plugins installed ({0}):",o])+"

    "+a+"
"}(n)+"
"),(t=y(["Accessibility Checker","Advanced Code Editor","Advanced Tables","Case Change","Checklist","Tiny Comments","Tiny Drive","Enhanced Media Embed","Format Painter","Link Checker","Mentions","MoxieManager","Page Embed","Permanent Pen","PowerPaste","Spell Checker Pro"],function(e){return"
  • "+U.translate(e)+"
  • "}).join(""),'

    '+U.translate("Premium plugins:")+"

    ")].join("")}]}},N=tinymce.util.Tools.resolve("tinymce.EditorManager"),L=function(){var e,t,n='TinyMCE '+(e=N.majorVersion,t=N.minorVersion,0===e.indexOf("@")?"X.X.X":e+"."+t)+"";return{name:"versions",title:"Version",items:[{type:"htmlpanel",html:"

    "+U.translate(["You are using {0}",n])+"

    ",presets:"document"}]}},B=function(){return{name:"keyboardnav",title:"Keyboard Navigation",items:[{type:"htmlpanel",presets:"document",html:"

    Editor UI keyboard navigation

    \n\n

    Activating keyboard navigation

    \n\n

    The sections of the outer UI of the editor - the menubar, toolbar, sidebar and footer - are all keyboard navigable. As such, there are multiple ways to activate keyboard navigation:

    \n
      \n
    • Focus the menubar: Alt + F9 (Windows) or ⌥F9 (MacOS)
    • \n
    • Focus the toolbar: Alt + F10 (Windows) or ⌥F10 (MacOS)
    • \n
    • Focus the footer: Alt + F11 (Windows) or ⌥F11 (MacOS)
    • \n
    \n\n

    Focusing the menubar or toolbar will start keyboard navigation at the first item in the menubar or toolbar, which will be highlighted with a gray background. Focusing the footer will start keyboard navigation at the first item in the element path, which will be highlighted with an underline.

    \n\n

    Moving between UI sections

    \n\n

    When keyboard navigation is active, pressing tab will move the focus to the next major section of the UI, where applicable. These sections are:

    \n
      \n
    • the menubar
    • \n
    • each group of the toolbar
    • \n
    • the sidebar
    • \n
    • the element path in the footer
    • \n
    • the wordcount toggle button in the footer
    • \n
    • the branding link in the footer
    • \n
    \n\n

    Pressing shift + tab will move backwards through the same sections, except when moving from the footer to the toolbar. Focusing the element path then pressing shift + tab will move focus to the first toolbar group, not the last.

    \n\n

    Moving within UI sections

    \n\n

    Keyboard navigation within UI sections can usually be achieved using the left and right arrow keys. This includes:

    \n
      \n
    • moving between menus in the menubar
    • \n
    • moving between buttons in a toolbar group
    • \n
    • moving between items in the element path
    • \n
    \n\n

    In all these UI sections, keyboard navigation will cycle within the section. For example, focusing the last button in a toolbar group then pressing right arrow will move focus to the first item in the same toolbar group.

    \n\n

    Executing buttons

    \n\n

    To execute a button, navigate the selection to the desired button and hit space or enter.

    \n\n

    Opening, navigating and closing menus

    \n\n

    When focusing a menubar button or a toolbar button with a menu, pressing space, enter or down arrow will open the menu. When the menu opens the first item will be selected. To move up or down the menu, press the up or down arrow key respectively. This is the same for submenus, which can also be opened and closed using the left and right arrow keys.

    \n\n

    To close any active menu, hit the escape key. When a menu is closed the selection will be restored to its previous selection. This also works for closing submenus.

    \n\n

    Context toolbars and menus

    \n\n

    To focus an open context toolbar such as the table context toolbar, press Ctrl + F9 (Windows) or ⌃F9 (MacOS).

    \n\n

    Context toolbar navigation is the same as toolbar navigation, and context menu navigation is the same as standard menu navigation.

    \n\n

    Dialog navigation

    \n\n

    There are two types of dialog UIs in TinyMCE: tabbed dialogs and non-tabbed dialogs.

    \n\n

    When a non-tabbed dialog is opened, the first interactive component in the dialog will be focused. Users can navigate between interactive components by pressing tab. This includes any footer buttons. Navigation will cycle back to the first dialog component if tab is pressed while focusing the last component in the dialog. Pressing shift + tab will navigate backwards.

    \n\n

    When a tabbed dialog is opened, the first button in the tab menu is focused. Pressing tab will navigate to the first interactive component in that tab, and will cycle through the tab\u2019s components, the footer buttons, then back to the tab button. To switch to another tab, focus the tab button for the current tab, then use the arrow keys to cycle through the tab buttons.

    "}]}};!function z(){t.add("help",function(e){var t=a({}),n=function(n){return{addTab:function(e){var t=n.get();t[e.name]=e,n.set(t)}}}(t),o=A(e,t);return s(e,o),i(e,o),e.shortcuts.add("Alt+0","Open help dialog","mceHelp"),n})}()}(); \ No newline at end of file diff --git a/website/js/vendor/tinymce/js/tinymce/plugins/hr/plugin.min.js b/website/js/vendor/tinymce/js/tinymce/plugins/hr/plugin.min.js deleted file mode 100644 index 9024d43..0000000 --- a/website/js/vendor/tinymce/js/tinymce/plugins/hr/plugin.min.js +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Tiny Technologies, Inc. All rights reserved. - * Licensed under the LGPL or a commercial license. - * For LGPL see License.txt in the project root for license information. - * For commercial licenses see https://www.tiny.cloud/ - * - * Version: 5.1.5 (2019-12-19) - */ -!function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=function(n){n.addCommand("InsertHorizontalRule",function(){n.execCommand("mceInsertContent",!1,"
    ")})},t=function(n){n.ui.registry.addButton("hr",{icon:"horizontal-rule",tooltip:"Horizontal line",onAction:function(){return n.execCommand("InsertHorizontalRule")}}),n.ui.registry.addMenuItem("hr",{icon:"horizontal-rule",text:"Horizontal line",onAction:function(){return n.execCommand("InsertHorizontalRule")}})};!function e(){n.add("hr",function(n){o(n),t(n)})}()}(); \ No newline at end of file diff --git a/website/js/vendor/tinymce/js/tinymce/plugins/image/plugin.min.js b/website/js/vendor/tinymce/js/tinymce/plugins/image/plugin.min.js deleted file mode 100644 index bced264..0000000 --- a/website/js/vendor/tinymce/js/tinymce/plugins/image/plugin.min.js +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Tiny Technologies, Inc. All rights reserved. - * Licensed under the LGPL or a commercial license. - * For LGPL see License.txt in the project root for license information. - * For commercial licenses see https://www.tiny.cloud/ - * - * Version: 5.1.5 (2019-12-19) - */ -!function(s){"use strict";function o(){}function a(t){return function(){return t}}function t(t){return t}function e(){return l}var n,r=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=a(!1),c=a(!0),l=(n={fold:function(t,e){return t()},is:u,isSome:u,isNone:c,getOr:d,getOrThunk:f,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:a(null),getOrUndefined:a(undefined),or:d,orThunk:f,map:e,each:o,bind:e,exists:u,forall:c,filter:e,equals:i,equals_:i,toArray:function(){return[]},toString:a("none()")},Object.freeze&&Object.freeze(n),n);function i(t){return t.isNone()}function f(t){return t()}function d(t){return t}function m(e){return function(t){return function(t){if(null===t)return"null";var e=typeof t;return"object"==e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e}(t)===e}}function v(t){for(var e=[],n=0,r=t.length;n'+n+"")}else e.insertContent(i(e,t))},g=i,y=function(e){e.addCommand("mceInsertDate",function(){p(e,t(e))}),e.addCommand("mceInsertTime",function(){p(e,o(e))})},M=tinymce.util.Tools.resolve("tinymce.util.Tools"),S=function(e){function t(){return n}var n=e;return{get:t,set:function(e){n=e},clone:function(){return S(t())}}},v=function(n){var t=u(n),r=S(c(n));n.ui.registry.addSplitButton("insertdatetime",{icon:"insert-time",tooltip:"Insert date/time",select:function(e){return e===r.get()},fetch:function(e){e(M.map(t,function(e){return{type:"choiceitem",text:g(n,e),value:e}}))},onAction:function(){for(var e=[],t=0;t]+>[^<]+<\/a>$/.test(n)||-1===n.indexOf("href=")))},fn=R,ln=function(n,t){return function(n){return n.replace(/\uFEFF/g,"")}(t?t.innerText||t.textContent:n.getContent({format:"text"}))},sn=L,dn=F,mn={sanitize:function(n){return K(q)(n)},sanitizeWith:K,createUi:function(t,e){return function(n){return{name:t,type:"selectbox",label:e,items:n}}},getValue:q},hn=function(n){function t(){return e}var e=n;return{get:t,set:function(n){e=n},clone:function(){return hn(t())}}},pn=function(n,r){function e(n,t){var e=function(n,t){return"link"===t?n.catalogs.link:"anchor"===t?n.catalogs.anchor:J.none()}(r,t.name).getOr([]);return B(o.get(),t.name,e,n)}var o=hn(n.text);return{onChange:function(n,t){return"url"===t.name?function(n){if(o.get().length<=0){var t=n.url.meta.text!==undefined?n.url.meta.text:n.url.value;return J.some({text:t})}return J.none()}(n()):E(["anchor","link"],t.name)?e(n(),t):("text"===t.name&&o.set(n().text),J.none())}}},gn={},vn={exports:gn};V=undefined,W=gn,H=vn,$=undefined,function(n){"object"==typeof W&&void 0!==H?H.exports=n():"function"==typeof V&&V.amd?V([],n):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).EphoxContactWrapper=n()}(function(){return function l(i,u,c){function a(t,n){if(!u[t]){if(!i[t]){var e="function"==typeof $&&$;if(!n&&e)return e(t,!0);if(f)return f(t,!0);var r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}var o=u[t]={exports:{}};i[t][0].call(o.exports,function(n){return a(i[t][1][n]||n)},o,o.exports,l,i,u,c)}return u[t].exports}for(var f="function"==typeof $&&$,n=0;ne.length?ne(t,e,n):ee(t,e,n)},[]);return S(n).map(function(e){return e.list})}(e.contentDocument,n).toArray()}function de(e){var n=g(Jn.getSelectedListItems(e),bn.fromDom);return A(N(n,t(re)),N(function(e){var n=Xe.call(e,0);return n.reverse(),n}(n),t(re)),function(e,n){return{start:e,end:n}})}function le(t,e,r){var n=function(e,n){var t=Ge(!1);return g(e,function(e){return{sourceList:e,entries:tt(0,n,t,e)}})}(e,de(t));p(n,function(e){!function(e,n){p(v(e,ie),function(e){return function(e,n){switch(e){case"Indent":n.depth++;break;case"Outdent":n.depth--;break;case"Flatten":n.depth=0}}(n,e)})}(e.entries,r);var n=function(n,e){return y(function(e,n){if(0===e.length)return[];for(var t=n(e[0]),r=[],o=[],i=0,u=e.length;i=e.childNodes.length?t.data.length:0}:t.previousSibling&&Mn(t.previousSibling)?{container:t.previousSibling,offset:t.previousSibling.data.length}:t.nextSibling&&Mn(t.nextSibling)?{container:t.nextSibling,offset:0}:{container:e,offset:n}}function ve(e,n){var t=g(Jn.getSelectedListRoots(e),bn.fromDom),r=g(Jn.getSelectedDlItems(e),bn.fromDom),o=!1;if(t.length||r.length){var i=e.selection.getBookmark();le(e,t,n),ge(e,n,r),e.selection.moveToBookmark(i),e.selection.setRng(ut(e.selection.getRng())),e.nodeChanged(),o=!0}return o}function he(e){return ve(e,"Indent")}function Ne(e){return ve(e,"Outdent")}function ye(e){return ve(e,"Flatten")}function Se(e){return/\btox\-/.test(e.className)}function Oe(e){switch(e){case"UL":return"ToggleUlList";case"OL":return"ToggleOlList";case"DL":return"ToggleDLList"}}function Ce(t,e){Pn.each(e,function(e,n){t.setAttribute(n,e)})}function be(e,n,t){!function(e,n,t){var r=t["list-style-type"]?t["list-style-type"]:null;e.setStyle(n,"list-style-type",r)}(e,n,t),function(e,n,t){Ce(n,t["list-attributes"]),Pn.each(e.select("li",n),function(e){Ce(e,t["list-item-attributes"])})}(e,n,t)}function Le(e,n,t,r){var o,i;for(o=n[t?"startContainer":"endContainer"],i=n[t?"startOffset":"endOffset"],1===o.nodeType&&(o=o.childNodes[Math.min(i,o.childNodes.length-1)]||o),!t&&qn(o.nextSibling)&&(o=o.nextSibling);o.parentNode!==r;){if(Vn(e,o))return o;if(/^(TD|TH)$/.test(o.parentNode.nodeName))return o;o=o.parentNode}return o}function Te(r,o,i){void 0===i&&(i={});var e,n=r.selection.getRng(!0),u="LI",t=Jn.getClosestListRootElm(r,r.selection.getStart(!0)),s=r.dom;"false"!==s.getContentEditable(r.selection.getNode())&&("DL"===(o=o.toUpperCase())&&(u="DT"),e=ct(n),Pn.each(function(t,e,r){for(var o,i=[],u=t.dom,n=Le(t,e,!0,r),s=Le(t,e,!1,r),a=[],c=n;c&&(a.push(c),c!==s);c=c.nextSibling);return Pn.each(a,function(e){if(Vn(t,e))return i.push(e),void(o=null);if(u.isBlock(e)||qn(e))return qn(e)&&u.remove(e),void(o=null);var n=e.nextSibling;st.isBookmarkNode(e)&&(Vn(t,n)||!n&&e.parentNode===r)?o=null:(o||(o=u.create("p"),e.parentNode.insertBefore(o,e),i.push(o)),o.appendChild(e))}),i}(r,n,t),function(e){var n,t;(t=e.previousSibling)&&Un(t)&&t.nodeName===o&&function(e,n,t){var r=e.getStyle(n,"list-style-type"),o=t?t["list-style-type"]:"";return r===(o=null===o?"":o)}(s,t,i)?(n=t,e=s.rename(e,u),t.appendChild(e)):(n=s.create(o),e.parentNode.insertBefore(n,e),n.appendChild(e),e=s.rename(e,u)),function(t,r,e){Pn.each(e,function(e){var n;return t.setStyle(r,((n={})[e]="",n))})}(s,e,["margin","margin-right","margin-bottom","margin-left","margin-top","padding","padding-right","padding-bottom","padding-left","padding-top"]),be(s,n,i),dt(r.dom,n)}),r.selection.setRng(ft(e)))}function De(e,n,t){return function(e,n){return e&&n&&Un(e)&&e.nodeName===n.nodeName}(n,t)&&function(e,n,t){return e.getStyle(n,"list-style-type",!0)===e.getStyle(t,"list-style-type",!0)}(e,n,t)&&function(e,n){return e.className===n.className}(n,t)}function Ee(n,e,t,r,o){if(e.nodeName!==r||lt(o)){var i=ct(n.selection.getRng(!0));Pn.each([e].concat(t),function(e){!function(e,n,t,r){if(n.nodeName!==t){var o=e.dom.rename(n,t);be(e.dom,o,r),j(e,Oe(t),o)}else be(e.dom,n,r),j(e,Oe(t),n)}(n,e,r,o)}),n.selection.setRng(ft(i))}else ye(n)}function we(e,n){var t,r=n.parentNode;"LI"===r.nodeName&&r.firstChild===n&&((t=r.previousSibling)&&"LI"===t.nodeName?(t.appendChild(n),Xn(e,r)&>.remove(r)):gt.setStyle(r,"listStyleType","none")),Un(r)&&(t=r.previousSibling)&&"LI"===t.nodeName&&t.appendChild(n)}function ke(e,n,t,r){var o=n.startContainer,i=n.startOffset;if(Mn(o)&&(t?i"}(n):"application/x-shockwave-flash"===n.source1mime?function(e){var t='';return e.poster&&(t+=''),t+=""}(n):-1!==n.source1mime.indexOf("audio")?function(e,t){return t?t(e):'"}(n,o):"script"===n.type?function(e){return' \ No newline at end of file diff --git a/website/tmpl/pages/computers.tt b/website/tmpl/pages/computers.tt deleted file mode 100644 index b91fe12..0000000 --- a/website/tmpl/pages/computers.tt +++ /dev/null @@ -1 +0,0 @@ -

    Small Business Computers

    \ No newline at end of file diff --git a/website/tmpl/pages/contact.html.mustache b/website/tmpl/pages/contact.html.mustache index ec15ccb..4f1a49f 100644 --- a/website/tmpl/pages/contact.html.mustache +++ b/website/tmpl/pages/contact.html.mustache @@ -1 +1,49 @@ -

    Kontakt

    \ No newline at end of file +
    +
    +

    Kontakt

    +
    +
    +
    +
    +
    +
    +
    +

    Service-zeiten

    +
    +
    +
    +

    Vor-Ort Service

    +

    (Nur mit Termin-Vereinbarung)

    +

    Montags-Freitags: 14:00 - 17:00

    +

    für Bestandkunden, in dringenden Fällen auch nach 17:00 und an Wochenenden

    + +

    Telefon-Support / Fernwartung

    +

    Montags-Freitags: 09:00 - 12:00

    +

    für Bestandkunden, auch nach vorheriger Termin-Vereinbarung

    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +

    Adresse

    +
    +
    +
    +

    DKS s.à r.l.
    4, rue Principale
    L- 3770 Tétange

    +

    E-Mail: info [ at ] dks.lu

    +

    Telefon: +352 691 504 574

    +
    +
    + +
    +
    +
    + +
    + diff --git a/website/tmpl/pages/development.html.mustache b/website/tmpl/pages/development.html.mustache deleted file mode 100644 index ccccff4..0000000 --- a/website/tmpl/pages/development.html.mustache +++ /dev/null @@ -1,12 +0,0 @@ -

    Software Development

    -Our custom application development services help clients build and integrate sophisticated business applications and/or websites with client server and legacy systems. We create and deploy robust, scalable and extensible architectures for use in a wide range of industries. - -

    Our Approach

    -SLIGO boasts of highly skilled software development professionals who deliver fully customized and business centric software that are both high performance and tight in security. Our software developers provide you with highly innovative and value driven software development services. Over the years, we have gained for ourselves the expertise that enables us to deliver cutting edge software solutions that suit your business requirements giving you a competitive edge. - -

    All you need to do

    -All you need to do is share your requirements with our experts and we shall conjure up a solution that will be both “best fit” for your current needs and highly scalable for future requirements of your business. Being a leading software development company, we make sure that we provide you with end to end solutions – your search stops here! Our dedicated software developers work in collaboration with you to understand your requirements and then draw up a project plan to work with you to achieve your business objectives. - -Our team of software developers constantly study the industry trends and analyse what works best for various verticals. This enables us to provide you with software solutions that are tailored to suit your requirements. - - diff --git a/website/tmpl/pages/en/privacy.tt b/website/tmpl/pages/en/privacy.tt deleted file mode 100644 index 5a69287..0000000 --- a/website/tmpl/pages/en/privacy.tt +++ /dev/null @@ -1,57 +0,0 @@ -

    Privacy Policy of http://www.dks.lu

    - -

    At DKS, we collect and manage user data according to the following Privacy Policy.

    - -

    Data Collected

    - -

    We collect information you provide directly to us. For example, we collect information when you create an account, subscribe, participate in any interactive features of our services, fill out a form, request customer support or otherwise communicate with us. The types of information we may collect include your name, email address, postal address, credit card information and other contact or identifying information you choose to provide.

    - -

    We collect anonymous data from every visitor of the Website to monitor traffic and fix bugs. For example, we collect information like web requests, the data sent in response to such requests, the Internet Protocol address, the browser type, the browser language, and a timestamp for the request.

    - -

    We also use various technologies to collect information, and this may include sending cookies to your computer. Cookies are small data files stored on your hard drive or in your device memory that helps us to improve our services and your experience, see which areas and features of our services are popular and count visits. We may also collect information using web beacons (also known as "tracking pixels"). Web beacons are electronic images that may be used in our services or emails and to track count visits or understand usage and campaign effectiveness.

    - -

    Use of the Data

    - -

    We only use your personal information to provide you the DKS services or to communicate with you about the Website or the services. Our Privacy Policy was created with the help of the Privacy Policy Template and the Terms and Conditions Template.

    - -

    We employ industry standard techniques to protect against unauthorized access of data about you that we store, including personal information.

    - -

    We do not share personal information you have provided to us without your consent, unless:

    - -
      -
    • Doing so is appropriate to carry out your own request
    • -
    • We believe it's needed to enforce our legal agreements or that is legally required
    • -
    • We believe it's needed to detect, prevent or address fraud, security or technical issues
    • -
    - -

    Sharing of Data

    - -

    We don't share your personal information with third parties. Aggregated, anonymized data is periodically transmitted to external services to help us improve the Website and service.

    - -

    We may allow third parties to provide analytics services. These third parties may use cookies, web beacons and other technologies to collect information about your use of the services and other websites, including your IP address, web browser, pages viewed, time spent on pages, links clicked and conversion information.

    - -

    We also use social buttons provided by services like Twitter, Google+, LinkedIn and Facebook. Your use of these third party services is entirely optional. We are not responsible for the privacy policies and/or practices of these third party services, and you are responsible for reading and understanding those third party services' privacy policies.

    - -

    Cookies

    - -

    We may use cookies on our site to remember your preferences.

    - -

    For more general information on cookies, please read "What Are Cookies".

    - -

    Opt-Out, Communication Preferences

    - -

    You may modify your communication preferences and/or opt-out from specific communications at any time. Please specify and adjust your preferences.

    - -

    Security

    - -

    We take reasonable steps to protect personally identifiable information from loss, misuse, and unauthorized access, disclosure, alteration, or destruction. But, you should keep in mind that no Internet transmission is ever completely secure or error-free. In particular, email sent to or from the Sites may not be secure.

    - -

    About Children

    - -

    The Website is not intended for children under the age of 13. We do not knowingly collect personally identifiable information via the Website from visitors in this age group.

    - -

    Changes to the Privacy Policy

    - -

    We may amend this Privacy Policy from time to time. Use of information we collect now is subject to the Privacy Policy in effect at the time such information is used.

    - -

    If we make major changes in the way we collect or use information, we will notify you by posting an announcement on the Website or sending you an email.

    \ No newline at end of file diff --git a/website/tmpl/pages/en/terms.tt b/website/tmpl/pages/en/terms.tt deleted file mode 100644 index d4d7399..0000000 --- a/website/tmpl/pages/en/terms.tt +++ /dev/null @@ -1,64 +0,0 @@ -

    Terms and Conditions of dks.lu

    - -

    The following terms and conditions (collectively, these "Terms and Conditions") apply to your use of dks.lu, including any content, functionality and services offered on or via dks.lu (the "Website").

    - -

    Please read the Terms and Conditions carefully before you start using DKS, because by using the Website you accept and agree to be bound and abide by these Terms and Conditions.

    - -

    These Terms and Conditions are effective as of [DATE]. We expressly reserve the right to change these Terms and Conditions from time to time without notice to you. You acknowledge and agree that it is your responsibility to review this Website and these Terms and Conditions from time to time and to familiarize yourself with any modifications. Your continued use of this Website after such modifications will constitute acknowledgement of the modified Terms and Conditions and agreement to abide and be bound by the modified Terms and Conditions. These Terms and Conditions were created by Terms and Conditions Template and the Terms & Conditions Template.

    - -

    Conduct on Website

    - -

    Your use of the Website is subject to all applicable laws and regulations, and you are solely responsible for the substance of your communications through the Website.

    - -

    By posting information in or otherwise using any communications service, chat room, message board, newsgroup, software library, or other interactive service that may be available to you on or through this Website, you agree that you will not upload, share, post, or otherwise distribute or facilitate distribution of any content — including text, communications, software, images, sounds, data, or other information — that:

    - -
      -
    • Is unlawful, threatening, abusive, harassing, defamatory, libelous, deceptive, fraudulent, invasive of another's privacy, tortious, contains explicit or graphic descriptions or accounts of sexual acts (including but not limited to sexual language of a violent or threatening nature directed at another individual or group of individuals), or otherwise violates our rules or policies
    • -
    • Victimizes, harasses, degrades, or intimidates an individual or group of individuals on the basis of religion, gender, sexual orientation, race, ethnicity, age, or disability
    • -
    • Infringes on any patent, trademark, trade secret, copyright, right of publicity, or other proprietary right of any party
    • -
    • Constitutes unauthorized or unsolicited advertising, junk or bulk email (also known as "spamming"), chain letters, any other form of unauthorized solicitation, or any form of lottery or gambling
    • -
    • Contains software viruses or any other computer code, files, or programs that are designed or intended to disrupt, damage, or limit the functioning of any software, hardware, or telecommunications equipment or to damage or obtain unauthorized access to any data or other information of any third party
    • -
    • Impersonates any person or entity, including any of our employees or representatives
    • -
    - -

    We neither endorse nor assume any liability for the contents of any material uploaded or submitted by third party users of the Website. We generally do not pre-screen, monitor, or edit the content posted by users of communications services, chat rooms, message boards, newsgroups, software libraries, or other interactive services that may be available on or through this Website.

    - -

    However, we and our agents have the right at their sole discretion to remove any content that, in our judgment, does not comply with these Terms of Use and any other rules of user conduct for our Website, or is otherwise harmful, objectionable, or inaccurate. We are not responsible for any failure or delay in removing such content. You hereby consent to such removal and waive any claim against us arising out of such removal of content.

    - -

    You agree that we may at any time, and at our sole discretion, terminate your membership, account, or other affiliation with our site without prior notice to you for violating any of the above provisions.

    - -

    In addition, you acknowledge that we will cooperate fully with investigations of violations of systems or network security at other sites, including cooperating with law enforcement authorities in investigating suspected criminal violations.

    - -

    Intellectual Property

    - -

    By accepting these Terms and Conditions, you acknowledge and agree that all content presented to you on this Website is protected by copyrights, trademarks, service marks, patents or other proprietary rights and laws, and is the sole property of DKS.

    - -

    You are only permitted to use the content as expressly authorized by us or the specific content provider. Except for a single copy made for personal use only, you may not copy, reproduce, modify, republish, upload, post, transmit, or distribute any documents or information from this Website in any form or by any means without prior written permission from us or the specific content provider, and you are solely responsible for obtaining permission before reusing any copyrighted material that is available on this Website.

    - -

    Third Party Websites

    - -

    This Website may link you to other sites on the Internet or otherwise include references to information, documents, software, materials and/or services provided by other parties. These websites may contain information or material that some people may find inappropriate or offensive.

    - -

    These other websites and parties are not under our control, and you acknowledge that we are not responsible for the accuracy, copyright compliance, legality, decency, or any other aspect of the content of such sites, nor are we responsible for errors or omissions in any references to other parties or their products and services. The inclusion of such a link or reference is provided merely as a convenience and does not imply endorsement of, or association with, the Website or party by us, or any warranty of any kind, either express or implied.

    - -

    Disclaimer of Warranties, Limitations of Liability and Indemnification

    - -

    Your use of DKS is at your sole risk. The Website is provided "as is" and "as available". We disclaim all warranties of any kind, express or implied, including, without limitation, the warranties of merchantability, fitness for a particular purpose and non-infringement.

    - -

    We are not liable for damages, direct or consequential, resulting from your use of the Website, and you agree to defend, indemnify and hold us harmless from any claims, losses, liability costs and expenses (including but not limites to attorney's fees) arising from your violation of any third-party's rights. You acknowledge that you have only a limited, non-exclusive, nontransferable license to use the Website. Because the Website is not error or bug free, you agree that you will use it carefully and avoid using it ways which might result in any loss of your or any third party's property or information.

    - -

    Term and termination

    - -

    This Terms and Conditions will become effective in relation to you when you create a DKS account or when you start using the DKS and will remain effective until terminated by you or by us.

    - -

    DKS reserves the right to terminate this Terms and Conditions or suspend your account at any time in case of unauthorized, or suspected unauthorized use of the Website whether in contravention of this Terms and Conditions or otherwise. If DKS terminates this Terms and Conditions, or suspends your account for any of the reasons set out in this section, DKS shall have no liability or responsibility to you.

    - -

    Assignment

    - -

    DKS may assign this Terms and Conditions or any part of it without restrictions. You may not assign this Terms and Conditions or any part of it to any third party.

    - -

    Governing Law

    - -

    These Terms and Conditions and any dispute or claim arising out of, or related to them, shall be governed by and construed in accordance with the internal laws of the lu without giving effect to any choice or conflict of law provision or rule.

    - -

    Any legal suit, action or proceeding arising out of, or related to, these Terms of Service or the Website shall be instituted exclusively in the federal courts of lu.

    \ No newline at end of file diff --git a/website/tmpl/pages/en/useterms.tt b/website/tmpl/pages/en/useterms.tt deleted file mode 100644 index c2ef5e8..0000000 --- a/website/tmpl/pages/en/useterms.tt +++ /dev/null @@ -1,56 +0,0 @@ -

    Terms of Use of dks.lu

    - -

    Welcome to the DKS website (the "Website").

    - -

    DKS provides this Website and Services (located at dks.lu) to you subject to the notices, terms, and conditions set forth in these terms (the "Terms of Use"). In addition, when you use any of our Services, you will be subject to the rules, guidelines, policies, terms, and conditions applicable to such service, and they are incorporated into this Terms of Use by this reference. This Terms of Service was created by Terms of Use Template and the Disclaimer Sample.

    - -

    These Terms of Use are effective as of [DATE].

    - -

    Your eligibility for use of the Website is contingent upon meeting the following conditions:

    - -
      -
    • You are at least 18 years of age
    • -
    • You use the Website and Services according to these Terms of Use and all applicable laws and regulations determined by the state and country of residence
    • -
    • You provide complete and accurate registration information and maintain accurate registration information on the Webite
    • -
    • You agree and understand that DKS may, at any time, and without prior notice, revoke and/or cancel your access if you fail to meet these criteria or violate any portion of these Terms of Use
    • -
    - -

    Use of this Website

    - -

    In connection with your use of our Website, you must act responsibly and exercise good judgment. Without limiting the foregoing, you will not:

    - -
      -
    • Violate any local, state, provincial, national, or other law or regulation, or any order of a court
    • -
    • Infringe the rights of any person or entity, including without limitation, their intellectual property, privacy, publicity or contractual rights
    • -
    • Interfere with or damage our Services, including, without limitation, through the use of viruses, cancel bots, Trojan horses, harmful code, flood pings, denial-of-service attacks, packet or IP spoofing, forged routing or electronic mail address information or similar methods or technology
    • -
    • Use automated scripts to collect information or otherwise interact with the Services or the Website
    • -
    • Enter into this agreement on behalf of another person or entity without consent or the legal capacity to make such agreements as a representative of an organization or entity
    • -
    - -

    Intellectual Property

    - -

    All code, text, software, scripts, graphics, files, photos, images, logos, and materials contained on this Website, or within the Services, are the sole property of DKS.

    - -

    Unauthorized use of any materials contained on this Website or within the Service may violate copyright laws, trademark laws, the laws of privacy and publicity, and/or other regulations and statutes. If you believe that any of the materials infringe on any third party's rights, please contact DKS immediately at the address provided below.

    - -

    Third Party Websites

    - -

    Our Website may link you to other sites on the Internet or otherwise include references to information, documents, software, materials and/or services provided by other parties. These websites may contain information or material that some people may find inappropriate or offensive.

    - -

    These other websites and parties are not under our control, and you acknowledge that we are not responsible for the accuracy, copyright compliance, legality, decency, or any other aspect of the content of such sites, nor are we responsible for errors or omissions in any references to other parties or their products and services. The inclusion of such a link or reference is provided merely as a convenience and does not imply endorsement of, or association with, the Website or party by us, or any warranty of any kind, either express or implied.

    - -

    Disclaimer of Warranty and Limitation of Liability

    - -

    The Website is provided "AS IS." appfigures, its suppliers, officers, directors, employees, and agents exclude and disclaim all representations and warranties, express or implied, related to this Website or in connection with the Services. You exclude DKS from all liability for damages related to or arising out of the use of this Website.

    - -

    Changes to these Terms of Use

    - -

    DKS retains the right to, at any time, modify or discontinue, any or all parts of the Website without notice.

    - -

    Additionally, DKS reserves the right, in its sole discretion, to modify these Terms of Use at any time, effective by posting new terms on the Website with the date of modification. You are responsible for reading and understanding the terms of this agreement prior to registering with, or using the Service. Your use of the Website and/or Services after any such modification has been published constitutes your acceptance of the new terms as modified in these Terms of Use.

    - -

    Governing Law

    - -

    These Terms of Use and any dispute or claim arising out of, or related to them, shall be governed by and construed in accordance with the internal laws of the lu without giving effect to any choice or conflict of law provision or rule.

    - -

    Any legal suit, action or proceeding arising out of, or related to, these Terms of Use or the Website shall be instituted exclusively in the federal courts of lu.

    \ No newline at end of file diff --git a/website/tmpl/pages/error.html.mustache b/website/tmpl/pages/error.html.mustache new file mode 100644 index 0000000..e69de29 diff --git a/website/tmpl/pages/home.html.mustache b/website/tmpl/pages/home.html.mustache index 1d688f2..2a8ff00 100644 --- a/website/tmpl/pages/home.html.mustache +++ b/website/tmpl/pages/home.html.mustache @@ -1,268 +1,86 @@
    -

    Individual Services

    +

    IT-Service Dienstleistungen

    -
    -

    Software Development

    +
    +

    Software Entwicklung

    -

    Our custom application development services help clients build and integrate sophisticated business applications and/or websites with client server and legacy systems. We create and deploy robust, scalable and extensible architectures for use in a wide range of industries.

    -

    +

    Mit unserem kundenspezifischen Service, helfen wir Ihnen bei der Erstellung und Integration anspruchsvoller Geschäftsanwendungen. +

    +

    Wir erstellen und implementieren robuste, skalierbare und erweiterbare Anwendungen für den Einsatz in einer Vielzahl von Branchen

    -
    -
    - -
    -
    -
    -
    -
    -
    -
    -
    -

    Web Applications

    -
    -
    -
    -

    Web application development is being employed widely in today's businesses across the globe. We create B2B and B2C compatible web applications to meet the business challenges. We will create web application the way you need them from single page applications to customized complex web applications. Own a web application and transform your business. We offer 360 degree support in developing your web application. - Our customer-centric approach has rendered much help in the past and we know that it will hold up well in the future as well. +

    Web Anwendungen

    +

    Die Entwicklung von Webanwendungen wird heute in Unternehmen auf der ganzen Welt in großem Umfang eingesetzt. Wir erstellen B2B- und B2C-kompatible Webanwendungen, um den geschäftlichen Herausforderungen gerecht zu werden. Wir erstellen Webanwendungen nach Ihren Vorgaben, von Einzelseitenanwendungen bis hin zu maßgeschneiderten komplexen Webanwendungen. Unser Ansatz aus einem optimalen Mix von alten und neuen Technologien hat sich in der Vergangenheit als sehr hilfreich erwiesen.

    -
    -
    - -
    -
    -
    -
    -
    -
    -
    -
    -

    Mobile Web Applications

    -
    -
    -
    -

    Today the mobile market get more and more important.in contrast to reponsive websites, Progressive Web Application offer many advantages.
    Progressive Web Applications, are a deck of APIs that allow for creating fast, reliable, and engaging digital products that have the crucial functionalities of both web page and mobile apps. This includes offline access, push notifications, home screen shortcuts, and accessibility through a regular mobile browser. +

    Mobile Lösungen

    +

    Heutzutage wird der mobile Markt immer wichtiger.
    +
    Progressive Webanwendungen (PWA) ermöglichen eine schnelle, zuverlässige und ansprechende Erstellung digitaler Produkte, die über die entscheidenden Funktionalitäten sowohl von Webseiten als auch von mobilen Anwendungen verfügen. +
    Dazu gehören Offline-Zugriff, Push-Benachrichtigungen, Startbildschirm-Abkürzungen und Zugänglichkeit über einen normalen mobilen Browser.

    +

    Alle unsere Lösungen basieren auf Open-Source-Technologien

    - +
    -
    -
    -
    -
    -

    On Place Services

    -
    -
    -
    -
    -
    -
    -

    Computer Helpdesk

    -
    -
    -
    -
    -

    We provide fast and useful technical assistance on computer systems. We will answer queries on basic technical issues and offer advice to solve them.With a good technical knowledge, we are able to communicate effectively to understand the problem and explain its solution. -Our objective is to create value that will help preserve the firm’s effectiveness and at a high level of security. -

    -
    -
    - -
    -
    -
    -
    -
    -
    -
    -
    -

    IT Infrastructure

    -
    -
    -
    -

    For customers who benefit from our helpdesk, we also offer consulting, purchasing, installation, maintenance and care of the entire IT infrastructure.

    -
    -
    -
    -
    -
    - -
    -
    -
    -

    Cloud Products

    -
    -

    Website-Hosting

    +
    +

    Helpdesk & Infrastuktur

    -

    Neben der Entwicklung und Pflege der Web-Anwendungen hosten wir auch gleichzeitig die von uns erstellten Online-Anwendungen. Mittels eines integrierten Softwarepflege und Hosting-Vertrags, können wir somit unseren Kunden ein kostengünstiges Modell anbieten und Probleme ohne großen Aufwand und beteiligung dritter lösen.


    -
      Wir hosten:
    • Von anderen entwickelte Webseiten, welche wir für unsere Kunden pflegen
    • selbst Entwickelte Web-Anwendungen
    • auf Wordpress basierende Webseiten
    -

    +

    Wir bieten schnelle und nützliche technische Hilfe für viele Computer-Systeme. Durch unsere lanjährige Erfahrung und unseren fundierten technischen Kenntnissen, sind wir in der Lage, Probleme schnell zu erkennen, und optimale Lösungsansätze auszuarbeiten. Dabei versuchen wir stetig, unsere Lösungen für jedermann verständlich zu beschreiben. Wir möchten die Effektivität und Sicherheit unserer Kunden auf hohem Niveau halten.

    +

    Beben dem Helpdesk, bieten wir auch Beratung, Kauf, Installation, Wartung und Pflege vonder gesamten IT-Infrastrukturen an

    +

    Unsere Spezialisierung liegt in der Untersützung kleiner und mittelständiger Unternehmen.

    +

    Infrastruktur

    +

    Unser Know-How reicht dabei von der Installation, Wartung und Pflege von Windows, MacOS, Android und iOS, sowie Hardware wie Router,Switches, Accesspoints....Falls gewünscht Pfegen wir auch kleine Telefon-Anlagen.

    +

    Server und Netzwerk

    +

    Im Serverbereich unterstützen wir nur Systeme auf Basis von Linux, MacOS und einfachen Windows-Systemen welche in Arbeitgruppen auf gemeinsam genutzte Daten zugreifen. (Wir pflegen keine Systeme basierend auf Windows-Server, Windows-Domainen und Exchange-Servern)

    +

    Dritt-Anbieter Anwendungen

    +

    Durch unser technisches Know-How, kontaktieren wir auch für unsere Kunden den technischen Support, von Software-Anbietern, um mit deren Hilfe, Software oder Hardware-technische Probleme bei unseren Kunden zu lösen.

    -
    -
    -
    -
    -

    E-Mail-Hosting

    -
    -
    -
    -

    Nicht jedes Unternehmen möchte Ihre Webseite und E-Mails auf dem gleichen system hosten oder benötigt eine eigene Webseite als Visitenkarte , daher bieten wir das E-Mail-Hosting separt an. Neben dem E-Mail-Hosting bieten wir optional auch ein CalDav basiertes Kalender-System an, welches mit allen gängigen Mobilen und Desktop-Kalendar-Anwendungen funktionniert. -

    -
    - -
    -
    -
    -
    +
    -
    -

    Private-Cloud (VPN)

    +
    +

    Hosting und Cloud

    -

    Sie möchten von überall auf Ihre Daten zugreifen. Diese aber nicht bei einem Cloud-Provider ablegen?

    • a.) Sie haben in Ihrem Büro oder zu Hause einen Server mit Ihren Daten,
    • b.) oder möchten in Zukunft Ihre Daten bei sich im Büro / zu Hause, Ihre Daten speichern?
    -

    Für alle unsere Produkte bieten wir einen VPN-Lösung basierend auf OpenVPN an, mit der Sie jederzeit auf Ihre Lokal gespeicheten Daten zugreifen können.

    -
    -
    -
    -
    -
    - -
    -
    -
    -

    Applications

    -
    -
    -
    -
    -
    Logo Invoice Journal
    -

    Invoice Journal

    -
    -
    -
    -

    Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. -

    -
    - -
    -
    -
    -
    -
    -
    -
    Logo Creorga
    -

    Creorga

    -
    -
    -
    -

    Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. -

    -
    - -
    -
    -
    -
    -
    -
    -
    Logo Coloradio
    -

    Coloradio

    -
    -
    -
    -

    Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. +

    Neben der Entwicklung und Pflege der Web-Anwendungen hosten wir auch gleichzeitig die von uns erstellten Online-Anwendungen. Mittels eines integrierten Softwarepflege und Hosting-Vertrags, können wir somit unseren Kunden ein kostengünstiges Modell anbieten und Probleme ohne großen Aufwand und beteiligung dritter lösen.


    +
      Wir hosten:
    • Von anderen entwickelte Webseiten, welche wir für unsere Kunden pflegen
    • selbst Entwickelte Web-Anwendungen
    • auf Wordpress basierende Webseiten

    -
    - -
    -
    -
    -
    -
    -
    -
    Logo Personal Data Store
    -

    Personal Data Store

    -
    -
    -
    -

    Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. +

    Wir bieten ein sogenanntes "Managed Hosting" an. Das heisst, wir pflegen für unsere Kunden die Webseite, warten und halten die Webanwendungen auf dem neusten Stand. Der Kunde bracuh sich damit nur um den Inhalt zu kümmern.

    +

    Falls gewünscht fügen wir für den Kunden den Inhalt ein. Der Kunde muss uns seine Änderungswünsche nur mitteilen.

    +

    E-Mail - Hosting

    +

    Nicht jedes Unternehmen möchte Ihre Webseite und E-Mails auf dem gleichen system hosten oder benötigt eine eigene Webseite als Visitenkarte , daher bieten wir das E-Mail-Hosting separt an. Neben dem E-Mail-Hosting bieten wir optional auch ein CalDav basiertes Kalender-System an, welches mit allen gängigen Mobilen und Desktop-Kalendar-Anwendungen funktionniert.

    +

    Private Cloud

    +

    Sie möchten von überall auf Ihre Daten zugreifen. Diese aber nicht bei einem Cloud-Provider ablegen?

    • a.) Sie haben in Ihrem Büro oder zu Hause einen Server mit Ihren Daten,
    • b.) oder möchten in Zukunft Ihre Daten bei sich im Büro / zu Hause, Ihre Daten speichern?
    +

    Für alle unsere Produkte bieten wir einen VPN-Lösung basierend auf OpenVPN an, mit der Sie jederzeit auf Ihre Lokal gespeicheten Daten zugreifen können.

    - - diff --git a/website/tmpl/pages/hosting.tt b/website/tmpl/pages/hosting.tt deleted file mode 100644 index c84a991..0000000 --- a/website/tmpl/pages/hosting.tt +++ /dev/null @@ -1,3 +0,0 @@ -

    Unsere Hosting-Angebote

    - -

    Private Cloud Services

    \ No newline at end of file diff --git a/website/tmpl/pages/it-service.html.mustache b/website/tmpl/pages/it-service.html.mustache deleted file mode 100644 index 52e0c24..0000000 --- a/website/tmpl/pages/it-service.html.mustache +++ /dev/null @@ -1,16 +0,0 @@ -

    Computer Helpdesk

    -
      -
    • Wir haben keinen First, Second und Third-Level Support, bei uns sprechen Sie sofort mit dem Experten.
    • -
    • Vom kleinen Computer-Problem bis hin zur Datenrettung, wir helfen gerne weiter.
    • -
    • Wir lösen Ihr Problem, vor Ort oder via Fernwartung
    • -
    • Wir rechnen nicht stundenbasiert ab, sondern nach Service-Dienstleistung.
    • -
    • Wir bertaen Sie gerne beim Kauf neuer Hard- und Software
    • -
    • Unsere Know-How reicht von Windows über MacOS, bis hin zu Android und iOS
    • -
    -

    IT-Infrastruktur

    -
      -
    • Ob Selbständiger, kleines resp. mittleres Unternehmen oder privater Haushalt, wir beraten Sie gerne in Sachen IT-Infrastruktur.
    • -
    • Neben der Beratung, installieren und warten auch IT-Infrastrukturen, von dem Verlegen von Netzwerk-Kabeln, bis hin zum fertigen Einrichten eines Computer-Arbeitsplatzes, inklusiv Einkauf und Installation aller benötigten Software-Komponenten.
    • -
    • In Sachen Server kommt bei uns Linux, MacOS oder Windows 10 zum Einsatz.
    • -
    • Je nach Anforderung reicht sogar ein Server-System auf Basis eines Raspberry Pi (siehe Small Business Computers)
    • -
    \ No newline at end of file diff --git a/website/website b/website/website deleted file mode 120000 index 93381b3..0000000 --- a/website/website +++ /dev/null @@ -1 +0,0 @@ -/mnt/d/Workspace/dks_lu/website \ No newline at end of file