@websy/websy-designs 0.0.99 → 0.0.103
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/server/helpers/v1/pdfHelper.js +44 -39
- package/dist/server/helpers/v1/pgHelper.js +8 -4
- package/dist/server/websy-designs-server.js +1 -1
- package/dist/websy-designs-flttr.min.css +1 -1
- package/dist/websy-designs.debug.js +202 -47
- package/dist/websy-designs.js +321 -146
- package/dist/websy-designs.min.css +1 -1
- package/dist/websy-designs.min.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";@font-face{font-family:'websy-designs';src:url('../fonts/websy-designs.ttf?83517479') format('truetype');font-weight:normal;font-style:normal}[class^='websy-icon-']:before,[class*=' websy-icon-']:before{font-family:'websy-designs',sans-serif;font-style:normal;font-weight:normal;speak:never;display:inline-block;text-decoration:inherit;width:1em;margin-right:.2em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.2em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.websy-icon-cancel:before{content:'\e800'}.websy-icon-ok:before{content:'\e801'}.websy-icon-plus:before{content:'\e802'}.websy-icon-minus:before{content:'\e803'}.websy-icon-camera:before{content:'\e804'}.websy-icon-heart:before{content:'\e805'}.websy-icon-heart-empty:before{content:'\e806'}.websy-icon-th-large:before{content:'\e807'}.websy-icon-th-list:before{content:'\e808'}.websy-icon-truck:before{content:'\e809'}.websy-icon-search:before{content:'\e80a'}.websy-icon-basket:before{content:'\e80b'}.websy-icon-credit-card:before{content:'\e80c'}.websy-icon-gift:before{content:'\e80d'}.websy-icon-cog:before{content:'\e80e'}.websy-icon-calendar:before{content:'\e80f'}.websy-icon-down-dir:before{content:'\e810'}.websy-icon-up-dir:before{content:'\e811'}.websy-icon-left-dir:before{content:'\e812'}.websy-icon-right-dir:before{content:'\e813'}.websy-icon-arrows-cw:before{content:'\e814'}.websy-icon-check:before{content:'\e815'}.websy-icon-barcode:before{content:'\e816'}.websy-icon-trash:before{content:'\e817'}.websy-icon-ccw:before{content:'\e818'}.websy-icon-pencil:before{content:'\e819'}.websy-icon-box:before{content:'\e81a'}.websy-icon-check-empty:before{content:'\f096'}.websy-icon-filter:before{content:'\f0b0'}.websy-icon-mail-alt:before{content:'\f0e0'}.websy-icon-building:before{content:'\f0f7'}.websy-icon-folder-open-empty:before{content:'\f115'}.websy-icon-help:before{content:'\f128'}.websy-icon-info:before{content:'\f129'}.websy-icon-ellipsis-vert:before{content:'\f142'}.websy-icon-sliders:before{content:'\f1de'}.websy-icon-share:before{content:'\f1e0'}.websy-icon-trash-1:before{content:'\f1f8'}.websy-icon-toggle-off:before{content:'\f204'}.websy-icon-toggle-on:before{content:'\f205'}.websy-icon-shopping-basket:before{content:'\f291'}.websy-icon-user-circle-o:before{content:'\f2be'}.websy-icon-sort:before{content:'\f0dc'}.websy-icon-eye:before{content:'\e81b'}.websy-icon-sun:before{content:'\e81c'}.websy-icon-sun-filled:before{content:'\e81d'}.websy-icon-flag-filled:before{content:'\e81e'}.websy-icon-thumbs-up-alt:before{content:'\f164'}.websy-icon-thumbs-down-alt:before{content:'\f165'}.primary{color:#4e43ed}.primary-bg{background-color:#4e43ed}.primary-light{color:#4e43ed}.primary-light-bg{background-color:#4e43ed}.primary-dark{color:#4e43ed}.primary-dark-bg{background-color:#4e43ed}.secondary{color:#827af2}.secondary-bg{background-color:#827af2}.secondary-light{color:#827af2}.secondary-light-bg{background-color:#827af2}.secondary-dark{color:#827af2}.secondary-dark-bg{background-color:#827af2}body{font-size:18px;line-height:27px;letter-spacing:.1em}h1,h2,h3,h4{line-height:1.5em}h1{font-size:44px}h2{font-size:33px}h3{font-size:22px}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.websy-row{padding:0;box-sizing:border-box;margin-left:-15px;margin-right:-15px}[class*='websy-ib-col-']{padding-left:15px;padding-right:15px;display:inline-block;box-sizing:border-box;vertical-align:top}[class*='websy-col-']{padding-left:15px;padding-right:15px;float:left;box-sizing:border-box}.websy-ib-col-l-100{width:100%}.websy-ib-col-l-90{width:90%}.websy-ib-col-l-80{width:80%}.websy-ib-col-l-75{width:75%}.websy-ib-col-l-70{width:70%}.websy-ib-col-l-60{width:60%}.websy-ib-col-l-50{width:50%}.websy-ib-col-l-40{width:40%}.websy-ib-col-l-33{width:33.33%}.websy-ib-col-l-30{width:30%}.websy-ib-col-l-25{width:25%}.websy-ib-col-l-20{width:20%}.websy-ib-col-l-10{width:10%}.websy-col-l-100{width:100%}.websy-col-l-90{width:90%}.websy-col-l-80{width:80%}.websy-col-l-75{width:75%}.websy-col-l-70{width:70%}.websy-col-l-60{width:60%}.websy-col-l-50{width:50%}.websy-col-l-40{width:40%}.websy-col-l-33{width:33.33%}.websy-col-l-30{width:30%}.websy-col-l-25{width:25%}.websy-col-l-20{width:20%}.websy-col-l-10{width:10%}@media screen and (max-width:1024px){.websy-ib-col-m-100{width:100%}.websy-ib-col-m-90{width:90%}.websy-ib-col-m-80{width:80%}.websy-ib-col-m-75{width:75%}.websy-ib-col-m-70{width:70%}.websy-ib-col-m-60{width:60%}.websy-ib-col-m-50{width:50%}.websy-ib-col-m-40{width:40%}.websy-ib-col-m-33{width:33%}.websy-ib-col-m-30{width:30%}.websy-ib-col-m-25{width:25%}.websy-ib-col-m-20{width:20%}.websy-ib-col-m-10{width:10%}.websy-col-m-100{width:100%}.websy-col-m-90{width:90%}.websy-col-m-80{width:80%}.websy-col-m-75{width:75%}.websy-col-m-70{width:70%}.websy-col-m-60{width:60%}.websy-col-m-50{width:50%}.websy-col-m-40{width:40%}.websy-col-m-33{width:33.33%}.websy-col-m-30{width:30%}.websy-col-m-25{width:25%}.websy-col-m-20{width:20%}.websy-col-m-10{width:10%}}@media screen and (max-width:415px){.websy-ib-col-s-100{width:100%}.websy-ib-col-s-90{width:90%}.websy-ib-col-s-80{width:80%}.websy-ib-col-s-75{width:75%}.websy-ib-col-s-70{width:70%}.websy-ib-col-s-60{width:60%}.websy-ib-col-s-50{width:50%}.websy-ib-col-s-40{width:40%}.websy-ib-col-s-33{width:33%}.websy-ib-col-s-30{width:30%}.websy-ib-col-s-25{width:25%}.websy-ib-col-s-20{width:20%}.websy-ib-col-s-10{width:10%}.websy-col-s-100{width:100%}.websy-col-s-90{width:90%}.websy-col-s-80{width:80%}.websy-col-s-75{width:75%}.websy-col-s-70{width:70%}.websy-col-s-60{width:60%}.websy-col-s-50{width:50%}.websy-col-s-40{width:40%}.websy-col-s-33{width:33.33%}.websy-col-s-30{width:30%}.websy-col-s-25{width:25%}.websy-col-s-20{width:20%}.websy-col-s-10{width:10%}}.websy-popup-dialog-container{position:fixed;top:0;left:0;width:100vw;height:100vh}.websy-popup-dialog-container .websy-popup-dialog{width:500px;padding:10px 15px;max-width:90%;background-color:#ffffff;position:relative;margin:0 auto;top:calc(50vh - 150px);box-shadow:2px 6px 6px #cccccc,inset 1px 1px 1px #f2f2f2}.websy-popup-dialog-container .websy-popup-dialog h1{font-size:16px}.websy-popup-dialog-container .websy-popup-dialog .websy-popup-button-panel{text-align:right}.websy-popup-dialog-container .websy-popup-dialog .websy-popup-button-panel button{margin-left:5px}.websy-loading-container{display:none;top:0;left:0;position:absolute;width:100%;height:100%;background-color:rgba(255,255,255,0.7);z-index:999}.websy-loading-container.global-loader{position:fixed;width:100vw;height:100vh}.websy-loading-container .websy-ripple{display:block;position:relative;top:calc(50% - 32px);width:55px;height:64px;margin:0 auto}.websy-loading-container .websy-ripple div{position:absolute;border:4px solid #4e43ed;opacity:1;border-radius:50%;animation:websy-ripple 1s cubic-bezier(0, .2, .8, 1) infinite}.websy-loading-container .websy-ripple div:nth-child( 2 ){animation-delay:-0.5s}.websy-loading-container h4{text-align:center;position:relative;color:#4e43ed;top:calc(50vh - 32px)}.websy-loading-container p{position:relative;text-align:center;color:#404040;top:calc(50vh - 32px)}.websy-loading-container.dark-loader{background-color:rgba(50,50,50,0.7)}.websy-loading-container.dark-loader .websy-ripple div{border:4px solid #ffffff}.websy-loading-container.dark-loader h4{letter-spacing:.1em}.websy-loading-container.dark-loader h4,.websy-loading-container.dark-loader p{color:#ffffff}.loading .websy-loading-container{display:block}@keyframes websy-ripple{0%{top:28px;left:28px;width:0;height:0;opacity:1}100%{top:-1px;left:-1px;width:58px;height:58px;opacity:0}}.websy-btn{font-size:16px;letter-spacing:.05em;padding:10px 15px;outline:none;background-color:#ffffff;color:#404040;border:1px solid #cccccc;cursor:pointer}.websy-btn [disabled]{background-color:#cccccc;color:#ffffff;cursor:not-allowed;border:none}.websy-btn.btn-primary{background-color:#4e43ed;color:#ffffff;border:none}.websy-btn.btn-secondary{background-color:#827af2;color:#ffffff;border:none}.websy-btn.btn-accent{background-color:#ba7af2;color:#404040;border:none}.websy-menu-mask{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:transparent;z-index:100;display:none}.websy-menu-mask.open{display:block}.websy-horizontal-list-container .logo *{pointer-events:none}.websy-horizontal-list-container .websy-menu-icon{position:absolute;top:25px;right:25px;display:none}.websy-horizontal-list-container .websy-menu-icon rect{stroke:none;fill:#000000}.websy-horizontal-list-container .websy-menu-block-container{display:inline-block;height:100%}@media screen and (max-width:1024px){.websy-horizontal-list-container .websy-menu-icon{display:block}.websy-horizontal-list-container .websy-menu-icon.open rect:first-of-type{display:none}.websy-horizontal-list-container .websy-menu-icon.open rect:nth-of-type( 2 ){transform:rotate(45deg) translate(3px, -3px);transform-origin:15px 10px}.websy-horizontal-list-container .websy-menu-icon.open rect:last-of-type{transform:rotate(-45deg) translate(3px, 3px);transform-origin:6px 27px}.websy-horizontal-list-container .websy-horizontal-list{position:absolute;height:initial;top:80px;right:0;background-color:#ffffff;width:80vw;box-shadow:0 1px 3px #888888;display:none;z-index:101}.websy-horizontal-list-container .websy-horizontal-list li{padding:0 15px;display:block;position:relative}.websy-horizontal-list-container .websy-horizontal-list li .active-square{display:none}.websy-horizontal-list-container .websy-horizontal-list li:hover{background-color:#888888}.websy-horizontal-list-container .websy-horizontal-list .websy-horizontal-list-item .active .selected-bar{width:6px;height:60%;position:absolute;left:-15px;top:20%;background-color:#888888}.websy-horizontal-list-container .open .websy-horizontal-list{display:block}}.websy-date-picker-container{display:block}.websy-date-picker-container .websy-dp-button-container{padding:5px 10px;text-align:right}.websy-date-picker-container .websy-dropdown-header-label{position:absolute;font-size:.5em;top:-5px;left:0}.websy-date-picker-mask{position:fixed;top:0;left:0;height:100vh;width:100vw;display:none}.websy-date-picker-mask.active{display:block}.websy-date-picker-header{height:40px;line-height:45px;cursor:pointer}.websy-date-picker-header *{pointer-events:none}.websy-date-picker-header svg{transform:rotate(180deg);height:9px}.websy-date-picker-content{padding:10px 0;background-color:#ffffff;box-shadow:0 0 3px #cccccc;position:absolute;top:100%;left:0;width:450px;display:none}.websy-date-picker-content.active{display:block}.websy-date-picker-ranges,.websy-date-picker-custom{display:inline-block;vertical-align:top;box-sizing:border-box;font-size:12px}.websy-date-picker-ranges{width:170px}.websy-date-picker-ranges ul{list-style-type:none;padding:0;margin:0;text-align:left;width:100%}.websy-date-picker-ranges li{padding:5px 15px;cursor:pointer}.websy-date-picker-ranges li:hover{background-color:#ba7af2}.websy-date-picker-ranges li.websy-disabled-range{color:#cccccc}.websy-date-picker-range{position:relative}.websy-date-picker-range.active:after{content:'';position:absolute;top:0;right:0;width:4px;height:100%;background-color:#ba7af2}.websy-dp-days-header,.websy-dp-date-list,.websy-date-picker-custom{width:280px}.websy-date-picker-custom{border-left:1px solid #888888}.websy-date-picker-custom .websy-dp-days-header{color:#888888}.websy-date-picker-custom .websy-dp-date-list{height:240px;overflow-y:auto;position:relative}.websy-date-picker-custom .websy-dp-month-container{padding-top:5px}.websy-date-picker-custom .websy-dp-month-container span{padding-left:13px;color:#888888}.websy-date-picker-custom ul{list-style-type:none;padding:0;margin:0}.websy-date-picker-custom ul li{display:inline-block;width:40px;height:40px;line-height:40px;text-align:center;cursor:pointer}.websy-date-picker-custom ul li.selected{background-color:#ba7af2}.websy-date-picker-custom ul li.first{border-bottom-left-radius:50%;border-top-left-radius:50%}.websy-date-picker-custom ul li.last{border-bottom-right-radius:50%;border-top-right-radius:50%}.websy-date-picker-custom ul li.websy-disabled-date{color:#cccccc}.websy-dropdown-container{display:block}.websy-dropdown-mask{position:fixed;top:0;left:0;height:100vh;width:100vw;display:none}.websy-dropdown-mask.active{display:block}.websy-dropdown-header{height:40px;line-height:40px;cursor:pointer;position:relative}.websy-dropdown-header span,.websy-dropdown-header svg.arrow{pointer-events:none}.websy-dropdown-header svg,.websy-dropdown-header span{display:inline-block;vertical-align:middle}.websy-dropdown-header svg{stroke:#333333;fill:#333333}.websy-dropdown-header svg *{pointer-events:none}.websy-dropdown-header span{max-width:calc(100% - 30px);text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.websy-dropdown-header svg.arrow{transform:rotate(180deg);height:9px}.websy-dropdown-header svg.clear{display:none}.websy-dropdown-header.allow-clear.one-selected span,.websy-dropdown-header.allow-clear.multi-selected span{max-width:calc(100% - 60px)}.websy-dropdown-header.allow-clear.one-selected svg.clear,.websy-dropdown-header.allow-clear.multi-selected svg.clear{display:inline-block}.websy-dropdown-header.one-selected .websy-dropdown-header-label{position:absolute;font-size:.5em;top:-15px;left:0}.websy-dropdown-header.multi-selected .websy-dropdown-header-value{position:absolute;font-size:.5em;bottom:15px;left:0}.websy-dropdown-search{margin:0 15px;height:40px;line-height:40px;text-indent:10px;letter-spacing:.1em;border:1px solid #cccccc;width:calc(100% - 35px);font-size:inherit}.websy-dropdown-content{padding:10px 0;background-color:#ffffff;box-shadow:0 0 3px #cccccc;position:absolute;top:100%;right:0;width:220px;max-height:300px;display:none;z-index:1}.websy-dropdown-content.active{display:block}.websy-dropdown-items{width:220px;max-height:300px;overflow-y:auto}.websy-dropdown-items ul{list-style-type:none;padding:0;margin:0;text-align:left;width:100%;height:100%;overflow-y:auto}.websy-dropdown-items li{padding:0 15px;height:40px;line-height:40px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:pointer}.websy-dropdown-items li:hover{background-color:#f2f2f2}.with-search .websy-dropdown-items{max-height:240px}.websy-dropdown-item{position:relative}.websy-dropdown-item.active:after{content:'';position:absolute;top:0;right:0;width:4px;height:100%;background-color:#ba7af2}.websy-info{display:inline-block;vertical-align:middle;height:24px;position:relative;z-index:100}.websy-info svg{fill:#333333}.websy-info:before{position:absolute;top:auto;bottom:calc(100% + 8px);right:6px;transform:rotate(45deg);background-color:transparent;color:transparent;width:10px;height:10px;z-index:12}.websy-info:after{position:absolute;background-color:transparent;color:transparent;padding:10px 15px;left:calc(50% - 107px);top:auto;width:200px;bottom:calc(100% + 12px);border-radius:2px;z-index:11;font-size:12px;line-height:16px;font-weight:normal;box-shadow:0 0 3px #ffffff}.websy-info.websy-info-dock-left:before{bottom:unset;top:calc(50% - 7px);right:25px}.websy-info.websy-info-dock-left:after{bottom:unset;right:30px;top:calc(50% - 20px)}.websy-info.websy-info-dock-right:before{bottom:unset;right:unset;top:calc(50% - 7px);left:25px}.websy-info.websy-info-dock-right:after{bottom:unset;right:unset;left:30px;top:calc(50% - 20px)}.websy-info.websy-info-dock-bottom:before{bottom:unset;top:calc(100% + 8px)}.websy-info.websy-info-dock-bottom:after{bottom:unset;top:calc(100% + 12px)}.websy-info:hover:after{background-color:#333333;color:#ffffff;content:attr(data-info)}.websy-info:hover:before{background-color:#333333;color:#ffffff;content:''}.websy-pdf-button *{pointer-events:none}.websy-pdf-button svg{width:20px;vertical-align:bottom}.websy-vis-table{height:100%;overflow-y:auto}.websy-vis-table table{border-spacing:0;border-collapse:collapse;display:table;table-layout:fixed;width:100%}.websy-vis-table table td{border:none;font-size:12px;padding:5px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.websy-vis-table table th{color:#888888;background-color:transparent;font-size:12px;text-align:left;padding-left:2px;padding-right:10px;padding-top:10px;position:relative}.websy-vis-table table tbody{width:100%;overflow-y:auto;overflow-x:hidden}.websy-vis-table table thead tr:nth-child( 1 ){width:100%;background-color:#ffffff;border-bottom:1px solid #cccccc}.websy-vis-table table thead tr:nth-child( 2 ){width:100%;background-color:#ffffff}.websy-vis-table table tbody tr{width:100%;background-color:#ffffff;border-bottom:1px solid #cccccc}.websy-vis-table .sortOrder{content:url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><title>ionicons-v5-b</title><path d="M414,321.94,274.22,158.82a24,24,0,0,0-36.44,0L98,321.94c-13.34,15.57-2.28,39.62,18.22,39.62H395.82C416.32,361.56,427.38,337.51,414,321.94Z"/></svg>');height:12px;width:12px;margin:auto;position:absolute;left:calc(50% - 6px);top:calc(100% - 8px)}.websy-vis-table .sortOrderHidden{height:8px;width:10px;margin:auto;visibility:hidden}.websy-vis-table .sortOrder.desc{margin:auto;transform:rotate(180deg);position:absolute;top:calc(100% - 3px)}.websy-vis-table .tableSearchIcon{float:right;fill:#cccccc;display:block;margin:auto}.websy-vis-table .tableSearchIcon.active{fill:#555555}.websy-vis-table .tableSearchIcon.selected{float:right;fill:#ffffff;display:block;margin:auto}.websy-vis-table .leftSection{position:relative;cursor:pointer}.websy-vis-table .leftSection .tableHeaderField{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.websy-chart .x-axis text,.websy-chart .y-axis text{fill:#888888}.websy-chart .x-axis path,.websy-chart .y-axis path,.websy-chart .x-axis line,.websy-chart .y-axis line{stroke:#888888}.websy-chart .y-axis path,.websy-chart .y-axis line{display:none}.websy-chart-tooltip{overflow:visible}.websy-chart-tooltip .websy-chart-tooltip-content{padding:10px 15px;background-color:#333333;font-size:12px;position:absolute;display:none}.websy-chart-tooltip .websy-chart-tooltip-content.active{display:block}.websy-chart-tooltip .websy-chart-tooltip-content:before{content:'';height:12px;width:12px;background-color:#333333;position:absolute;left:-4px;top:8px;transform:rotate(45deg)}.websy-chart-tooltip .websy-chart-tooltip-content ul{top:0;list-style-type:none;margin:0;padding:0}.websy-chart-tooltip .websy-chart-tooltip-content ul li{position:relative;padding:3px 0;padding-left:15px;color:#ffffff}.websy-chart-tooltip .websy-chart-tooltip-content ul li i{position:absolute;height:10px;width:10px;border-radius:5px;display:inline-block;left:0;top:calc(50% - 5px);margin-right:6px}.websy-chart-tooltip .websy-chart-tooltip-content .title{font-weight:bold;color:#ffffff}.websy-chart-tooltip.left .websy-chart-tooltip-content:before{left:unset;right:-4px;top:8px;transform:rotate(-45deg)}.websy-kpi-info,.websy-kpi-icon{display:inline-block;height:70px;vertical-align:middle}.websy-kpi-icon{width:40px}.websy-kpi-icon img{width:30px;margin-top:14px}.websy-kpi-value{font-size:2em;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:100%}.websy-kpi-sub-value{font-size:.5em;color:#888888;margin-top:-5px}.websy-container{width:80vw;margin:0 auto}.websy-container .websy-horizontal-list-container{box-sizing:border-box}.websy-container .websy-horizontal-list-container.fixed{padding:0 10vw;z-index:100}.websy-mask{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:rgba(255,255,255,0.7)}.websy-vertical-list-container{width:200px;background-color:#cccccc}.websy-vertical-list-container.fixed{position:fixed;top:0;bottom:0;left:0;z-index:100}.websy-vertical-list-container.fixed.open{left:-200px}.websy-vertical-list-container.fixed .websy-menu-icon{position:fixed;top:6px;left:0}.websy-vertical-list-container.fixed .logo{position:relative;left:55px}@media screen and (max-width:415px){.websy-vertical-list-container.fixed{left:-200px}.websy-vertical-list-container.fixed.open{left:0;width:80vw}.websy-vertical-list-container.fixed.open .websy-menu-header{padding:20px 10px}}.websy-vertical-list-container .logo *{pointer-events:none}.websy-vertical-list-container .logo img{height:60px;width:auto;margin:10px 0}.websy-horizontal-list-container{width:100vw;height:80px;background-color:#cccccc}.websy-horizontal-list-container.fixed{position:fixed;top:0;bottom:0;left:0}.websy-horizontal-list-container .logo{display:inline-block;vertical-align:top;width:auto;margin-right:20px}.websy-horizontal-list-container .logo img{height:60px;width:auto;margin:10px 0}.websy-vertical-list,.websy-horizontal-list{padding:0;margin:0;list-style-type:none;transition:.2s linear all;overflow:hidden}.websy-vertical-list .websy-menu-collapsed,.websy-horizontal-list .websy-menu-collapsed{height:0}.websy-vertical-list .popout-menu,.websy-horizontal-list .popout-menu{display:none}.websy-vertical-list .websy-menu-header,.websy-horizontal-list .websy-menu-header{position:relative}.websy-vertical-list .websy-menu-header.active .active-square,.websy-horizontal-list .websy-menu-header.active .active-square{position:absolute;width:15px;height:15px;background-color:#ffffff;transform:rotate(45deg)}.websy-vertical-list .websy-menu-header.selected .selected-bar,.websy-horizontal-list .websy-menu-header.selected .selected-bar{position:absolute;box-sizing:border-box}.websy-vertical-list .websy-menu-header .menu-carat,.websy-horizontal-list .websy-menu-header .menu-carat{position:absolute;width:6px;height:6px}.websy-vertical-list .websy-vertical-list-item,.websy-horizontal-list .websy-vertical-list-item{padding:0}.websy-vertical-list .websy-vertical-list-item.active,.websy-horizontal-list .websy-vertical-list-item.active{background-color:#cccccc}.websy-vertical-list .websy-vertical-list-item:hover,.websy-horizontal-list .websy-vertical-list-item:hover,.websy-vertical-list .websy-vertical-list-item.menu-open,.websy-horizontal-list .websy-vertical-list-item.menu-open{background-color:#888888}.websy-vertical-list .websy-vertical-list-item.menu-open .menu-carat,.websy-horizontal-list .websy-vertical-list-item.menu-open .menu-carat{transform:rotate(-135deg)}.websy-horizontal-list{width:auto;display:inline-block;vertical-align:top;height:100%}.websy-horizontal-list.fixed{position:fixed}.websy-horizontal-list .websy-menu-header{padding:26px 0;margin-right:20px}.websy-horizontal-list .websy-menu-header.active .active-square{bottom:-10px;left:calc(50% - 8px)}.websy-horizontal-list .websy-menu-header.selected .selected-bar{border-bottom:3px solid;left:0;width:100%;top:0}.websy-horizontal-list .websy-menu-header .menu-carat{bottom:10px;left:calc(50% - 3px);border-top:1px solid #ffffff;border-left:1px solid #ffffff;transform:rotate(-45deg)}.websy-horizontal-list .websy-horizontal-list-item{display:inline-block;height:100%;width:auto}.websy-vertical-list{width:100%;height:auto}.websy-vertical-list.fixed{position:fixed}.websy-vertical-list .websy-menu-header{padding:10px 0}.websy-vertical-list .websy-menu-header:after{content:attr(data-text)}.websy-vertical-list .websy-menu-header.active .active-square{right:-10px;top:calc(50% - 8px)}.websy-vertical-list .websy-menu-header.selected .selected-bar{border-left:3px solid;left:0;height:100%;top:0}.websy-vertical-list .websy-menu-header .menu-carat{right:10px;top:calc(50% - 3px);border-top:1px solid #ffffff;border-left:1px solid #ffffff;transform:rotate(-45deg)}[data-retracted='true'] .websy-menu-header:after{display:none}[data-retracted='true'] .websy-menu-header .menu-carat{display:none}[data-retracted='true'] .popout{position:absolute;top:0;height:auto;z-index:9999;background-color:#4e43ed}[data-retracted='true'] .popout .websy-menu-header:after{display:initial}.websy-input{border:1px solid #333333;padding:0 15px;height:40px;font-size:1em;letter-spacing:.1em;margin:5px 0;display:block;width:100%;box-sizing:border-box}.websy-textarea{resize:none;height:100px;padding:10px 15px;font-family:inherit}@media screen and (max-width:1024px){}@media screen and (max-width:1024px){h1{font-size:36px}h2{font-size:24px}h3{font-size:20px}}
|
|
1
|
+
@charset "UTF-8";@font-face{font-family:'websy-designs';src:url('../fonts/websy-designs.ttf?83517479') format('truetype');font-weight:normal;font-style:normal}[class^='websy-icon-']:before,[class*=' websy-icon-']:before{font-family:'websy-designs',sans-serif;font-style:normal;font-weight:normal;speak:never;display:inline-block;text-decoration:inherit;width:1em;margin-right:.2em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.2em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.websy-icon-cancel:before{content:'\e800'}.websy-icon-ok:before{content:'\e801'}.websy-icon-plus:before{content:'\e802'}.websy-icon-minus:before{content:'\e803'}.websy-icon-camera:before{content:'\e804'}.websy-icon-heart:before{content:'\e805'}.websy-icon-heart-empty:before{content:'\e806'}.websy-icon-th-large:before{content:'\e807'}.websy-icon-th-list:before{content:'\e808'}.websy-icon-truck:before{content:'\e809'}.websy-icon-search:before{content:'\e80a'}.websy-icon-basket:before{content:'\e80b'}.websy-icon-credit-card:before{content:'\e80c'}.websy-icon-gift:before{content:'\e80d'}.websy-icon-cog:before{content:'\e80e'}.websy-icon-calendar:before{content:'\e80f'}.websy-icon-down-dir:before{content:'\e810'}.websy-icon-up-dir:before{content:'\e811'}.websy-icon-left-dir:before{content:'\e812'}.websy-icon-right-dir:before{content:'\e813'}.websy-icon-arrows-cw:before{content:'\e814'}.websy-icon-check:before{content:'\e815'}.websy-icon-barcode:before{content:'\e816'}.websy-icon-trash:before{content:'\e817'}.websy-icon-ccw:before{content:'\e818'}.websy-icon-pencil:before{content:'\e819'}.websy-icon-box:before{content:'\e81a'}.websy-icon-check-empty:before{content:'\f096'}.websy-icon-filter:before{content:'\f0b0'}.websy-icon-mail-alt:before{content:'\f0e0'}.websy-icon-building:before{content:'\f0f7'}.websy-icon-folder-open-empty:before{content:'\f115'}.websy-icon-help:before{content:'\f128'}.websy-icon-info:before{content:'\f129'}.websy-icon-ellipsis-vert:before{content:'\f142'}.websy-icon-sliders:before{content:'\f1de'}.websy-icon-share:before{content:'\f1e0'}.websy-icon-trash-1:before{content:'\f1f8'}.websy-icon-toggle-off:before{content:'\f204'}.websy-icon-toggle-on:before{content:'\f205'}.websy-icon-shopping-basket:before{content:'\f291'}.websy-icon-user-circle-o:before{content:'\f2be'}.websy-icon-sort:before{content:'\f0dc'}.websy-icon-eye:before{content:'\e81b'}.websy-icon-sun:before{content:'\e81c'}.websy-icon-sun-filled:before{content:'\e81d'}.websy-icon-flag-filled:before{content:'\e81e'}.websy-icon-thumbs-up-alt:before{content:'\f164'}.websy-icon-thumbs-down-alt:before{content:'\f165'}.primary{color:#4e43ed}.primary-bg{background-color:#4e43ed}.primary-light{color:#4e43ed}.primary-light-bg{background-color:#4e43ed}.primary-dark{color:#4e43ed}.primary-dark-bg{background-color:#4e43ed}.secondary{color:#827af2}.secondary-bg{background-color:#827af2}.secondary-light{color:#827af2}.secondary-light-bg{background-color:#827af2}.secondary-dark{color:#827af2}.secondary-dark-bg{background-color:#827af2}body{font-size:18px;line-height:27px;letter-spacing:.1em}h1,h2,h3,h4{line-height:1.5em}h1{font-size:44px}h2{font-size:33px}h3{font-size:22px}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.websy-row{padding:0;box-sizing:border-box;margin-left:-15px;margin-right:-15px}[class*='websy-ib-col-']{padding-left:15px;padding-right:15px;display:inline-block;box-sizing:border-box;vertical-align:top}[class*='websy-col-']{padding-left:15px;padding-right:15px;float:left;box-sizing:border-box}.websy-ib-col-l-100{width:100%}.websy-ib-col-l-90{width:90%}.websy-ib-col-l-80{width:80%}.websy-ib-col-l-75{width:75%}.websy-ib-col-l-70{width:70%}.websy-ib-col-l-60{width:60%}.websy-ib-col-l-50{width:50%}.websy-ib-col-l-40{width:40%}.websy-ib-col-l-33{width:33.33%}.websy-ib-col-l-30{width:30%}.websy-ib-col-l-25{width:25%}.websy-ib-col-l-20{width:20%}.websy-ib-col-l-10{width:10%}.websy-col-l-100{width:100%}.websy-col-l-90{width:90%}.websy-col-l-80{width:80%}.websy-col-l-75{width:75%}.websy-col-l-70{width:70%}.websy-col-l-60{width:60%}.websy-col-l-50{width:50%}.websy-col-l-40{width:40%}.websy-col-l-33{width:33.33%}.websy-col-l-30{width:30%}.websy-col-l-25{width:25%}.websy-col-l-20{width:20%}.websy-col-l-10{width:10%}@media screen and (max-width:1024px){.websy-ib-col-m-100{width:100%}.websy-ib-col-m-90{width:90%}.websy-ib-col-m-80{width:80%}.websy-ib-col-m-75{width:75%}.websy-ib-col-m-70{width:70%}.websy-ib-col-m-60{width:60%}.websy-ib-col-m-50{width:50%}.websy-ib-col-m-40{width:40%}.websy-ib-col-m-33{width:33%}.websy-ib-col-m-30{width:30%}.websy-ib-col-m-25{width:25%}.websy-ib-col-m-20{width:20%}.websy-ib-col-m-10{width:10%}.websy-col-m-100{width:100%}.websy-col-m-90{width:90%}.websy-col-m-80{width:80%}.websy-col-m-75{width:75%}.websy-col-m-70{width:70%}.websy-col-m-60{width:60%}.websy-col-m-50{width:50%}.websy-col-m-40{width:40%}.websy-col-m-33{width:33.33%}.websy-col-m-30{width:30%}.websy-col-m-25{width:25%}.websy-col-m-20{width:20%}.websy-col-m-10{width:10%}}@media screen and (max-width:415px){.websy-ib-col-s-100{width:100%}.websy-ib-col-s-90{width:90%}.websy-ib-col-s-80{width:80%}.websy-ib-col-s-75{width:75%}.websy-ib-col-s-70{width:70%}.websy-ib-col-s-60{width:60%}.websy-ib-col-s-50{width:50%}.websy-ib-col-s-40{width:40%}.websy-ib-col-s-33{width:33%}.websy-ib-col-s-30{width:30%}.websy-ib-col-s-25{width:25%}.websy-ib-col-s-20{width:20%}.websy-ib-col-s-10{width:10%}.websy-col-s-100{width:100%}.websy-col-s-90{width:90%}.websy-col-s-80{width:80%}.websy-col-s-75{width:75%}.websy-col-s-70{width:70%}.websy-col-s-60{width:60%}.websy-col-s-50{width:50%}.websy-col-s-40{width:40%}.websy-col-s-33{width:33.33%}.websy-col-s-30{width:30%}.websy-col-s-25{width:25%}.websy-col-s-20{width:20%}.websy-col-s-10{width:10%}}.websy-popup-dialog-container{position:fixed;top:0;left:0;width:100vw;height:100vh}.websy-popup-dialog-container .websy-popup-dialog{width:500px;padding:10px 15px;max-width:90%;background-color:#ffffff;position:relative;margin:0 auto;top:calc(50vh - 150px);box-shadow:2px 6px 6px #cccccc,inset 1px 1px 1px #f2f2f2}.websy-popup-dialog-container .websy-popup-dialog h1{font-size:16px}.websy-popup-dialog-container .websy-popup-dialog .websy-popup-button-panel{text-align:right}.websy-popup-dialog-container .websy-popup-dialog .websy-popup-button-panel button{margin-left:5px}.websy-loading-container{display:none;top:0;left:0;position:absolute;width:100%;height:100%;background-color:rgba(255,255,255,0.7);z-index:999}.websy-loading-container.global-loader{position:fixed;width:100vw;height:100vh}.websy-loading-container .websy-ripple{display:block;position:relative;top:calc(50% - 32px);width:55px;height:64px;margin:0 auto}.websy-loading-container .websy-ripple div{position:absolute;border:4px solid #4e43ed;opacity:1;border-radius:50%;animation:websy-ripple 1s cubic-bezier(0, .2, .8, 1) infinite}.websy-loading-container .websy-ripple div:nth-child( 2 ){animation-delay:-0.5s}.websy-loading-container h4{text-align:center;position:relative;color:#4e43ed;top:calc(50vh - 32px)}.websy-loading-container p{position:relative;text-align:center;color:#404040;top:calc(50vh - 32px)}.websy-loading-container.dark-loader{background-color:rgba(50,50,50,0.7)}.websy-loading-container.dark-loader .websy-ripple div{border:4px solid #ffffff}.websy-loading-container.dark-loader h4{letter-spacing:.1em}.websy-loading-container.dark-loader h4,.websy-loading-container.dark-loader p{color:#ffffff}.loading .websy-loading-container{display:block}@keyframes websy-ripple{0%{top:28px;left:28px;width:0;height:0;opacity:1}100%{top:-1px;left:-1px;width:58px;height:58px;opacity:0}}.websy-btn{font-size:16px;letter-spacing:.05em;padding:10px 15px;outline:none;background-color:#ffffff;color:#404040;border:1px solid #cccccc;cursor:pointer}.websy-btn [disabled]{background-color:#cccccc;color:#ffffff;cursor:not-allowed;border:none}.websy-btn.btn-primary{background-color:#4e43ed;color:#ffffff;border:none}.websy-btn.btn-secondary{background-color:#827af2;color:#ffffff;border:none}.websy-btn.btn-accent{background-color:#ba7af2;color:#404040;border:none}.websy-menu-mask{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:transparent;z-index:100;display:none}.websy-menu-mask.open{display:block}.websy-horizontal-list-container .logo *{pointer-events:none}.websy-horizontal-list-container .websy-menu-icon{position:absolute;top:25px;right:25px;display:none}.websy-horizontal-list-container .websy-menu-icon rect{stroke:none;fill:#000000}.websy-horizontal-list-container .websy-menu-block-container{display:inline-block;height:100%}@media screen and (max-width:1024px){.websy-horizontal-list-container .websy-menu-icon{display:block}.websy-horizontal-list-container .websy-menu-icon.open rect:first-of-type{display:none}.websy-horizontal-list-container .websy-menu-icon.open rect:nth-of-type( 2 ){transform:rotate(45deg) translate(3px, -3px);transform-origin:15px 10px}.websy-horizontal-list-container .websy-menu-icon.open rect:last-of-type{transform:rotate(-45deg) translate(3px, 3px);transform-origin:6px 27px}.websy-horizontal-list-container .websy-horizontal-list{position:absolute;height:initial;top:80px;right:0;background-color:#ffffff;width:80vw;box-shadow:0 1px 3px #888888;display:none;z-index:101}.websy-horizontal-list-container .websy-horizontal-list li{padding:0 15px;display:block;position:relative}.websy-horizontal-list-container .websy-horizontal-list li .active-square{display:none}.websy-horizontal-list-container .websy-horizontal-list li:hover{background-color:#888888}.websy-horizontal-list-container .websy-horizontal-list .websy-horizontal-list-item .active .selected-bar{width:6px;height:60%;position:absolute;left:-15px;top:20%;background-color:#888888}.websy-horizontal-list-container .open .websy-horizontal-list{display:block}}.websy-date-picker-container{display:block}.websy-date-picker-container .websy-dp-button-container{padding:5px 10px;text-align:right}.websy-date-picker-container .websy-dropdown-header-label{position:absolute;font-size:.5em;top:-5px;left:0}.websy-date-picker-mask{position:fixed;top:0;left:0;height:100vh;width:100vw;display:none}.websy-date-picker-mask.active{display:block}.websy-date-picker-header{height:40px;line-height:45px;cursor:pointer}.websy-date-picker-header *{pointer-events:none}.websy-date-picker-header svg{transform:rotate(180deg);height:9px}.websy-date-picker-content{padding:10px 0;background-color:#ffffff;box-shadow:0 0 3px #cccccc;position:absolute;top:100%;left:0;width:450px;display:none}.websy-date-picker-content.active{display:block}.websy-date-picker-ranges,.websy-date-picker-custom{display:inline-block;vertical-align:top;box-sizing:border-box;font-size:12px}.websy-date-picker-ranges{width:170px}.websy-date-picker-ranges ul{list-style-type:none;padding:0;margin:0;text-align:left;width:100%}.websy-date-picker-ranges li{padding:5px 15px;cursor:pointer}.websy-date-picker-ranges li:hover{background-color:#ba7af2}.websy-date-picker-ranges li.websy-disabled-range{color:#cccccc}.websy-date-picker-range{position:relative}.websy-date-picker-range.active:after{content:'';position:absolute;top:0;right:0;width:4px;height:100%;background-color:#ba7af2}.websy-dp-days-header,.websy-dp-date-list,.websy-date-picker-custom{width:280px}.websy-date-picker-custom{border-left:1px solid #888888}.websy-date-picker-custom .websy-dp-days-header{color:#888888}.websy-date-picker-custom .websy-dp-date-list{height:240px;overflow-y:auto;position:relative}.websy-date-picker-custom .websy-dp-month-container{padding-top:5px}.websy-date-picker-custom .websy-dp-month-container span{padding-left:13px;color:#888888}.websy-date-picker-custom ul{list-style-type:none;padding:0;margin:0}.websy-date-picker-custom ul li{display:inline-block;width:40px;height:40px;line-height:40px;text-align:center;cursor:pointer}.websy-date-picker-custom ul li.selected{background-color:#ba7af2}.websy-date-picker-custom ul li.first{border-bottom-left-radius:50%;border-top-left-radius:50%}.websy-date-picker-custom ul li.last{border-bottom-right-radius:50%;border-top-right-radius:50%}.websy-date-picker-custom ul li.websy-disabled-date{color:#cccccc}.websy-dropdown-container{display:block}.websy-dropdown-container input.dropdown-input{display:none}.websy-dropdown-mask{position:fixed;top:0;left:0;height:100vh;width:100vw;display:none}.websy-dropdown-mask.active{display:block}.websy-dropdown-header{height:40px;line-height:40px;cursor:pointer;position:relative}.websy-dropdown-header span,.websy-dropdown-header svg.arrow{pointer-events:none}.websy-dropdown-header svg,.websy-dropdown-header span{display:inline-block;vertical-align:middle}.websy-dropdown-header svg{stroke:#333333;fill:#333333}.websy-dropdown-header svg *{pointer-events:none}.websy-dropdown-header span{max-width:calc(100% - 30px);text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.websy-dropdown-header svg.arrow{transform:rotate(180deg);height:9px}.websy-dropdown-header svg.clear{display:none}.websy-dropdown-header.allow-clear.one-selected span,.websy-dropdown-header.allow-clear.multi-selected span{max-width:calc(100% - 60px)}.websy-dropdown-header.allow-clear.one-selected svg.clear,.websy-dropdown-header.allow-clear.multi-selected svg.clear{display:inline-block}.websy-dropdown-header.one-selected .websy-dropdown-header-label{position:absolute;font-size:.5em;top:-15px;left:0}.websy-dropdown-header.multi-selected .websy-dropdown-header-value{position:absolute;font-size:.5em;bottom:15px;left:0}.websy-dropdown-search{margin:0 15px;height:40px;line-height:40px;text-indent:10px;letter-spacing:.1em;border:1px solid #cccccc;width:calc(100% - 35px);font-size:inherit}.websy-dropdown-content{padding:10px 0;background-color:#ffffff;box-shadow:0 0 3px #cccccc;position:absolute;top:100%;right:0;width:220px;max-height:300px;display:none;z-index:1}.websy-dropdown-content.active{display:block}.websy-dropdown-items{width:220px;max-height:300px;overflow-y:auto}.websy-dropdown-items ul{list-style-type:none;padding:0;margin:0;text-align:left;width:100%;height:100%;overflow-y:auto}.websy-dropdown-items li{padding:0 15px;height:40px;line-height:40px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:pointer}.websy-dropdown-items li:hover{background-color:#f2f2f2}.websy-dropdown-items li.websy-delayed{height:auto;white-space:normal}.with-search .websy-dropdown-items{max-height:240px}.websy-dropdown-item{position:relative}.websy-dropdown-item.active:after{content:'';position:absolute;top:0;right:0;width:4px;height:100%;background-color:#ba7af2}.websy-info{display:inline-block;vertical-align:middle;height:24px;position:relative;z-index:100}.websy-info svg{fill:#333333}.websy-info:before{position:absolute;top:auto;bottom:calc(100% + 8px);right:6px;transform:rotate(45deg);background-color:transparent;color:transparent;width:10px;height:10px;z-index:12}.websy-info:after{position:absolute;background-color:transparent;color:transparent;padding:10px 15px;left:calc(50% - 107px);top:auto;width:200px;bottom:calc(100% + 12px);border-radius:2px;z-index:11;font-size:12px;line-height:16px;font-weight:normal;box-shadow:0 0 3px #ffffff}.websy-info.websy-info-dock-left:before{bottom:unset;top:calc(50% - 7px);right:25px}.websy-info.websy-info-dock-left:after{bottom:unset;right:30px;top:calc(50% - 20px)}.websy-info.websy-info-dock-right:before{bottom:unset;right:unset;top:calc(50% - 7px);left:25px}.websy-info.websy-info-dock-right:after{bottom:unset;right:unset;left:30px;top:calc(50% - 20px)}.websy-info.websy-info-dock-bottom:before{bottom:unset;top:calc(100% + 8px)}.websy-info.websy-info-dock-bottom:after{bottom:unset;top:calc(100% + 12px)}.websy-info:hover:after{background-color:#333333;color:#ffffff;content:attr(data-info)}.websy-info:hover:before{background-color:#333333;color:#ffffff;content:''}.websy-delayed-info{overflow:visible !important;position:relative}.websy-delayed-info:after{background-color:#ffffff;color:#404040;content:attr(data-info);left:0;top:0;width:auto;position:absolute;padding:inherit;z-index:1;box-shadow:0 0 3px #cccccc}.form-component{position:relative}.websy-validation-failure{background-color:#ce5252;border:2px solid #b12121;color:#ffffff;padding:5px 15px;font-size:.8em;margin-bottom:10px}.websy-validation-failure:empty{display:none}.websy-pdf-button *{pointer-events:none}.websy-pdf-button svg{width:20px;vertical-align:bottom}.websy-vis-table{height:100%;overflow-y:auto}.websy-vis-table table{border-spacing:0;border-collapse:collapse;display:table;table-layout:fixed;width:100%}.websy-vis-table table td{border:none;font-size:12px;padding:5px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.websy-vis-table table th{color:#888888;background-color:transparent;font-size:12px;text-align:left;padding-left:2px;padding-right:10px;padding-top:10px;position:relative}.websy-vis-table table tbody{width:100%;overflow-y:auto;overflow-x:hidden}.websy-vis-table table thead tr:nth-child( 1 ){width:100%;background-color:#ffffff;border-bottom:1px solid #cccccc}.websy-vis-table table thead tr:nth-child( 2 ){width:100%;background-color:#ffffff}.websy-vis-table table tbody tr{width:100%;background-color:#ffffff;border-bottom:1px solid #cccccc}.websy-vis-table .sortOrder{content:url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><title>ionicons-v5-b</title><path d="M414,321.94,274.22,158.82a24,24,0,0,0-36.44,0L98,321.94c-13.34,15.57-2.28,39.62,18.22,39.62H395.82C416.32,361.56,427.38,337.51,414,321.94Z"/></svg>');height:12px;width:12px;margin:auto;position:absolute;left:calc(50% - 6px);top:calc(100% - 8px)}.websy-vis-table .sortOrderHidden{height:8px;width:10px;margin:auto;visibility:hidden}.websy-vis-table .sortOrder.desc{margin:auto;transform:rotate(180deg);position:absolute;top:calc(100% - 3px)}.websy-vis-table .tableSearchIcon{float:right;fill:#cccccc;display:block;margin:auto}.websy-vis-table .tableSearchIcon.active{fill:#555555}.websy-vis-table .tableSearchIcon.selected{float:right;fill:#ffffff;display:block;margin:auto}.websy-vis-table .leftSection{position:relative;cursor:pointer}.websy-vis-table .leftSection .tableHeaderField{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.websy-chart .x-axis text,.websy-chart .y-axis text{fill:#888888}.websy-chart .x-axis path,.websy-chart .y-axis path,.websy-chart .x-axis line,.websy-chart .y-axis line{stroke:#888888}.websy-chart .y-axis path,.websy-chart .y-axis line{display:none}.websy-chart-tooltip{overflow:visible}.websy-chart-tooltip .websy-chart-tooltip-content{padding:10px 15px;background-color:#333333;font-size:12px;position:absolute;display:none}.websy-chart-tooltip .websy-chart-tooltip-content.active{display:block}.websy-chart-tooltip .websy-chart-tooltip-content:before{content:'';height:12px;width:12px;background-color:#333333;position:absolute;left:-4px;top:8px;transform:rotate(45deg)}.websy-chart-tooltip .websy-chart-tooltip-content ul{top:0;list-style-type:none;margin:0;padding:0}.websy-chart-tooltip .websy-chart-tooltip-content ul li{position:relative;padding:3px 0;padding-left:15px;color:#ffffff}.websy-chart-tooltip .websy-chart-tooltip-content ul li i{position:absolute;height:10px;width:10px;border-radius:5px;display:inline-block;left:0;top:calc(50% - 5px);margin-right:6px}.websy-chart-tooltip .websy-chart-tooltip-content .title{font-weight:bold;color:#ffffff}.websy-chart-tooltip.left .websy-chart-tooltip-content:before{left:unset;right:-4px;top:8px;transform:rotate(-45deg)}.websy-kpi-info,.websy-kpi-icon{display:inline-block;height:70px;width:100%;vertical-align:middle}.websy-kpi-icon{width:40px}.websy-kpi-icon img{width:30px;margin-top:14px}.websy-kpi-value{font-size:2em;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:100%}.websy-kpi-sub-value{font-size:.5em;color:#888888;margin-top:-5px}.websy-container{width:80vw;margin:0 auto}.websy-container .websy-horizontal-list-container{box-sizing:border-box}.websy-container .websy-horizontal-list-container.fixed{padding:0 10vw;z-index:100}.websy-mask{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:rgba(255,255,255,0.7)}.websy-vertical-list-container{width:200px;background-color:#cccccc}.websy-vertical-list-container.fixed{position:fixed;top:0;bottom:0;left:0;z-index:100}.websy-vertical-list-container.fixed.open{left:-200px}.websy-vertical-list-container.fixed .websy-menu-icon{position:fixed;top:6px;left:0}.websy-vertical-list-container.fixed .logo{position:relative;left:55px}@media screen and (max-width:415px){.websy-vertical-list-container.fixed{left:-200px}.websy-vertical-list-container.fixed.open{left:0;width:80vw}.websy-vertical-list-container.fixed.open .websy-menu-header{padding:20px 10px}}.websy-vertical-list-container .logo *{pointer-events:none}.websy-vertical-list-container .logo img{height:60px;width:auto;margin:10px 0}.websy-horizontal-list-container{width:100vw;height:80px;background-color:#cccccc}.websy-horizontal-list-container.fixed{position:fixed;top:0;bottom:0;left:0}.websy-horizontal-list-container .logo{display:inline-block;vertical-align:top;width:auto;margin-right:20px}.websy-horizontal-list-container .logo img{height:60px;width:auto;margin:10px 0}.websy-vertical-list,.websy-horizontal-list{padding:0;margin:0;list-style-type:none;transition:.2s linear all;overflow:hidden}.websy-vertical-list .websy-menu-collapsed,.websy-horizontal-list .websy-menu-collapsed{height:0}.websy-vertical-list .popout-menu,.websy-horizontal-list .popout-menu{display:none}.websy-vertical-list .websy-menu-header,.websy-horizontal-list .websy-menu-header{position:relative}.websy-vertical-list .websy-menu-header.active .active-square,.websy-horizontal-list .websy-menu-header.active .active-square{position:absolute;width:15px;height:15px;background-color:#ffffff;transform:rotate(45deg)}.websy-vertical-list .websy-menu-header.selected .selected-bar,.websy-horizontal-list .websy-menu-header.selected .selected-bar{position:absolute;box-sizing:border-box}.websy-vertical-list .websy-menu-header .menu-carat,.websy-horizontal-list .websy-menu-header .menu-carat{position:absolute;width:6px;height:6px}.websy-vertical-list .websy-vertical-list-item,.websy-horizontal-list .websy-vertical-list-item{padding:0}.websy-vertical-list .websy-vertical-list-item.active,.websy-horizontal-list .websy-vertical-list-item.active{background-color:#cccccc}.websy-vertical-list .websy-vertical-list-item:hover,.websy-horizontal-list .websy-vertical-list-item:hover,.websy-vertical-list .websy-vertical-list-item.menu-open,.websy-horizontal-list .websy-vertical-list-item.menu-open{background-color:#888888}.websy-vertical-list .websy-vertical-list-item.menu-open .menu-carat,.websy-horizontal-list .websy-vertical-list-item.menu-open .menu-carat{transform:rotate(-135deg)}.websy-horizontal-list{width:auto;display:inline-block;vertical-align:top;height:100%}.websy-horizontal-list.fixed{position:fixed}.websy-horizontal-list .websy-menu-header{padding:26px 0;margin-right:20px}.websy-horizontal-list .websy-menu-header.active .active-square{bottom:-10px;left:calc(50% - 8px)}.websy-horizontal-list .websy-menu-header.selected .selected-bar{border-bottom:3px solid;left:0;width:100%;top:0}.websy-horizontal-list .websy-menu-header .menu-carat{bottom:10px;left:calc(50% - 3px);border-top:1px solid #ffffff;border-left:1px solid #ffffff;transform:rotate(-45deg)}.websy-horizontal-list .websy-horizontal-list-item{display:inline-block;height:100%;width:auto}.websy-vertical-list{width:100%;height:auto}.websy-vertical-list.fixed{position:fixed}.websy-vertical-list .websy-menu-header{padding:10px 0}.websy-vertical-list .websy-menu-header:after{content:attr(data-text)}.websy-vertical-list .websy-menu-header.active .active-square{right:-10px;top:calc(50% - 8px)}.websy-vertical-list .websy-menu-header.selected .selected-bar{border-left:3px solid;left:0;height:100%;top:0}.websy-vertical-list .websy-menu-header .menu-carat{right:10px;top:calc(50% - 3px);border-top:1px solid #ffffff;border-left:1px solid #ffffff;transform:rotate(-45deg)}[data-retracted='true'] .websy-menu-header:after{display:none}[data-retracted='true'] .websy-menu-header .menu-carat{display:none}[data-retracted='true'] .popout{position:absolute;top:0;height:auto;z-index:9999;background-color:#4e43ed}[data-retracted='true'] .popout .websy-menu-header:after{display:initial}.websy-input{border:1px solid #333333;padding:0 15px;height:40px;font-size:1em;letter-spacing:.1em;margin:5px 0;display:block;width:100%;box-sizing:border-box}.websy-textarea{resize:none;height:100px;padding:10px 15px;font-family:inherit}@media screen and (max-width:1024px){}@media screen and (max-width:1024px){h1{font-size:36px}h2{font-size:24px}h3{font-size:20px}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function _typeof(t){return(_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})(t)}function _toConsumableArray(t){return _arrayWithoutHoles(t)||_iterableToArray(t)||_unsupportedIterableToArray(t)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(t,e){if(t){if("string"==typeof t)return _arrayLikeToArray(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,e):void 0}}function _iterableToArray(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,s=new Array(e);i<e;i++)s[i]=t[i];return s}function _extends(){return(_extends=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(t[s]=i[s])}return t}).apply(this,arguments)}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var i=0;i<e.length;i++){var s=e[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}function _createClass(t,e,i){return e&&_defineProperties(t.prototype,e),i&&_defineProperties(t,i),t}var WebsyPopupDialog=function(){function s(t,e){if(_classCallCheck(this,s),this.options=_extends({},e),t){this.closeOnOutsideClick=!0;var i=document.getElementById(t);this.elementId=t,i.addEventListener("click",this.handleClick.bind(this))}else console.log("No element Id provided for Websy Popup")}return _createClass(s,[{key:"hide",value:function(){document.getElementById(this.elementId).innerHTML=""}},{key:"handleClick",value:function(t){if(t.target.classList.contains("websy-btn")){var e=t.target.getAttribute("data-index"),i=this.options.buttons[e];!0!==i.preventClose&&this.hide(),i.fn&&i.fn(i)}else!0===this.closeOnOutsideClick&&this.hide()}},{key:"render",value:function(){if(this.elementId){var t=document.getElementById(this.elementId),e="";if(!0===this.options.mask&&(e+="<div class='websy-mask'></div>"),e+="\n\t\t\t<div class='websy-popup-dialog-container'>\n\t\t\t\t<div class='websy-popup-dialog'>\n\t\t",this.options.title&&(e+="<h1>".concat(this.options.title,"</h1>")),this.options.message&&(e+="<p>".concat(this.options.message,"</p>")),this.closeOnOutsideClick=!0,this.options.buttons){!0!==this.options.allowCloseOnOutsideClick&&(this.closeOnOutsideClick=!1),e+="<div class='websy-popup-button-panel'>";for(var i=0;i<this.options.buttons.length;i++)e+="\n\t\t\t\t\t<button class='websy-btn ".concat((this.options.buttons[i].classes||[]).join(" "),"' data-index='").concat(i,"'>\n\t\t\t\t\t\t").concat(this.options.buttons[i].label,"\n\t\t\t\t\t</button>\n\t\t\t\t");e+="</div>"}e+="\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t",t.innerHTML=e}else console.log("No element Id provided for Websy Popup")}},{key:"show",value:function(t){t&&(this.options=_extends({},t)),this.render()}}]),s}(),WebsyLoadingDialog=function(){function i(t,e){_classCallCheck(this,i),this.options=_extends({},e),t?this.elementId=t:console.log("No element Id provided")}return _createClass(i,[{key:"hide",value:function(){var t=document.getElementById(this.elementId);t.classList.remove("loading"),t.innerHTML=""}},{key:"render",value:function(){if(this.elementId){var t=document.getElementById(this.elementId),e="\n\t\t\t<div class='websy-loading-container ".concat((this.options.classes||[]).join(" "),"'>\n\t\t\t\t<div class='websy-ripple'>\n\t\t\t\t\t<div></div>\n\t\t\t\t\t<div></div>\n\t\t\t\t</div>\n\t\t\t\t<h4>").concat(this.options.title||"Loading...","</h4>\n\t\t");if(this.options.messages)for(var i=0;i<this.options.messages.length;i++)e+="<p>".concat(this.options.messages[i],"</p>");e+="\n\t\t\t</div>\t\n ",t.classList.add("loading"),t.innerHTML=e}else console.log("No element Id provided for Websy Loading Dialog")}},{key:"show",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1];t&&(this.options=!0===e?_extends({},t):_extends({},this.options,t)),this.render()}}]),i}(),WebsyNavigationMenu=function(){function s(t,e){if(_classCallCheck(this,s),this.options=_extends({},{orientation:"horizontal"},e),t){var i=document.getElementById(t);i&&(this.elementId=t,i.classList.add("websy-".concat(this.options.orientation,"-list-container")),this.options.classes&&this.options.classes.forEach(function(t){return i.classList.add(t)}),i.addEventListener("click",this.handleClick.bind(this)),this.render())}else console.log("No element Id provided for Websy Menu")}return _createClass(s,[{key:"handleClick",value:function(t){(t.target.classList.contains("websy-menu-icon")||"svg"===t.target.nodeName||"rect"===t.target.nodeName)&&this.toggleMobileMenu(),t.target.classList.contains("trigger-item")&&t.target.classList.contains("websy-menu-header")&&this.toggleMobileMenu("remove"),t.target.classList.contains("websy-menu-mask")&&this.toggleMobileMenu()}},{key:"normaliseString",value:function(t){return t.replace(/-/g,"").replace(/\s/g,"_")}},{key:"render",value:function(){var t=document.getElementById(this.elementId);if(t){var e="";this.options.logo&&(e+="\n <div id='".concat(this.elementId,'_menuIcon\' class=\'websy-menu-icon\'>\n <svg viewbox="0 0 40 40" width="40" height="40"> \n <rect x="0" y="0" width="40" height="4" rx="2"></rect>\n <rect x="0" y="12" width="40" height="4" rx="2"></rect>\n <rect x="0" y="24" width="40" height="4" rx="2"></rect>\n </svg>\n </div>\n <div \n class=\'logo ').concat(this.options.logo.classes&&this.options.logo.classes.join(" ")||"","'\n ").concat(this.options.logo.attributes&&this.options.logo.attributes.join(" "),"\n >\n <img src='").concat(this.options.logo.url,"'></img>\n </div>\n <div id='").concat(this.elementId,"_mask' class='websy-menu-mask'></div>\n <div id=\"").concat(this.elementId,'_menuContainer" class="websy-menu-block-container">\n ')),e+=this.renderBlock(this.options.items,"main",1),e+="</div>",t.innerHTML=e,this.options.navigator&&this.options.navigator.registerElements(t)}}},{key:"renderBlock",value:function(t,e,i){var s="\n\t\t <ul class='websy-".concat(this.options.orientation,"-list ").concat("main"!==e?"websy-menu-collapsed":"","' id='").concat(this.elementId,"_").concat(e,"_list'\n\t ");"main"!==e&&(s+=" data-collapsed='".concat("main"!==e?"true":"false","'")),s+=">";for(var n=0;n<t.length;n++){var o=!0===t[n].default?"active":"",a=this.normaliseString(t[n].text);s+="\n\t\t\t<li class='websy-".concat(this.options.orientation,"-list-item'>\n\t\t\t\t<div class='websy-menu-header ").concat(t[n].classes&&t[n].classes.join(" ")," ").concat(""," ").concat(o,"' \n\t\t\t\t\t\t id='").concat(this.elementId,"_").concat(a,"_label' \n\t\t\t\t\t\t data-id='").concat(a,"' \n\t\t\t\t\t\t data-popout-id='").concat(1<i?e:a,"'\n\t\t\t\t\t\t data-text='").concat(t[n].text,"'\n\t\t\t\t\t\t style='padding-left: ").concat(i*this.options.menuHPadding,"px'\n\t\t\t\t\t\t ").concat(t[n].attributes&&t[n].attributes.join(" "),"\n >\n "),"horizontal"===this.options.orientation&&(s+=t[n].text),s+="\n <span class='selected-bar'></span>\n <span class='active-square'></span>\n <span class='".concat(t[n].items&&0<t[n].items.length?"menu-carat":"","'></span>\n "),"vertical"===this.options.orientation&&(s+="\n \n "),s+=" \n\t\t\t\t</div>\n\t\t ",t[n].items&&(s+=this.renderBlock(t[n].items,a,i+1)),e&&"main"!==e&&(this.options.parentMap[a]||(this.options.parentMap[a]=e)),s+="\n\t\t\t</li>\n\t\t"}return s+="</ul>"}},{key:"toggleMobileMenu",value:function(t){void 0===t&&(t="toggle");var e=document.getElementById("".concat(this.elementId));e&&e.classList[t]("open"),this.options.onToggle&&this.options.onToggle(t)}}]),s}(),WebsyForm=function(){function n(t,e){_classCallCheck(this,n);var i={submit:{text:"Save",classes:""},clearAfterSave:!1,fields:[],onSuccess:function(t){},onError:function(t){console.log("Error submitting form data:",t)}};if(GlobalPubSub.subscribe("recaptchaready",this.recaptchaReady.bind(this)),this.recaptchaResult=null,this.options=_extends(i,{},{},e),t){this.apiService=new WebsyDesigns.APIService(""),this.elementId=t;var s=document.getElementById(t);s&&(this.options.classes&&this.options.classes.forEach(function(t){return s.classList.add(t)}),s.addEventListener("click",this.handleClick.bind(this)),s.addEventListener("keyup",this.handleKeyUp.bind(this)),s.addEventListener("keydown",this.handleKeyDown.bind(this)),this.render())}else console.log("No element Id provided")}return _createClass(n,[{key:"checkRecaptcha",value:function(){var t=this;return new Promise(function(e,i){!0===t.options.useRecaptcha?t.recaptchaValue?t.apiService.add("/google/checkrecaptcha",JSON.stringify({grecaptcharesponse:t.recaptchaValue})).then(function(t){t.success&&!0===t.success?e(!0):i(!1)}):i(!1):e(!0)})}},{key:"handleClick",value:function(t){t.target.classList.contains("submit")&&this.submitForm()}},{key:"handleKeyDown",value:function(t){"enter"===t.key&&this.submitForm()}},{key:"handleKeyUp",value:function(t){}},{key:"recaptchaReady",value:function(){document.getElementById("".concat(this.elementId,"_recaptcha"))&&grecaptcha.render("".concat(this.elementId,"_recaptcha"),{sitekey:ENVIRONMENT.RECAPTCHA_KEY,callback:this.validateRecaptcha.bind(this)})}},{key:"render",value:function(t,e){var i=this,s=document.getElementById(this.elementId);if(s){var n='\n <form id="'.concat(this.elementId,'Form">\n ');this.options.fields.forEach(function(t){"longtext"===t.type?n+="\n ".concat(t.label?'<label for="'.concat(t.field,'">').concat(t.label,"</label>"):"",'\n <textarea\n id="').concat(i.elementId,"_input_").concat(t.field,'"\n ').concat(!0===t.required?"required":"",' \n placeholder="').concat(t.placeholder||"",'"\n name="').concat(t.field,'" \n class="websy-input websy-textarea ').concat(t.classes,'"\n ></textarea>\n '):n+="\n ".concat(t.label?'<label for="'.concat(t.field,'">').concat(t.label,"</label>"):"",'\n <input \n id="').concat(i.elementId,"_input_").concat(t.field,'"\n ').concat(!0===t.required?"required":"",' \n type="').concat(t.type||"text",'" \n class="websy-input ').concat(t.classes,'" \n name="').concat(t.field,'" \n placeholder="').concat(t.placeholder||"",'"\n value="').concat(t.value||"",'"\n oninvalidx="this.setCustomValidity(\'').concat(t.invalidMessage||"Please fill in this field.","')\"\n />\n ")}),n+=" \n </form>\n ",!0===this.options.useRecaptcha&&(n+="\n <div id='".concat(this.elementId,"_recaptcha'></div>\n ")),n+='\n <button class="websy-btn submit '.concat(this.options.submit.classes,'">').concat(this.options.submit.text||"Save","</button>\n "),s.innerHTML=n,!0===this.options.useRecaptcha&&"undefined"!=typeof grecaptcha&&this.recaptchaReady()}}},{key:"submitForm",value:function(){var e=this,s=document.getElementById("".concat(this.elementId,"Form"));!0===s.reportValidity()&&this.checkRecaptcha().then(function(t){if(!0===t){new FormData(s);var i={};new FormData(s).forEach(function(t,e){i[e]=t}),e.options.url?e.apiService.add(e.options.url,i).then(function(t){!0===e.options.clearAfterSave&&s.reset(),e.options.onSuccess.call(e,t)},function(t){console.log("Error submitting form data:",t),e.options.onError.call(e,t)}):e.options.submitFn&&(e.options.submitFn(i),!0===e.options.clearAfterSave&&s.reset())}else console.log("bad recaptcha")})}},{key:"validateRecaptcha",value:function(t){this.recaptchaValue=t}},{key:"data",set:function(i){var s=this;this.options.fields||(this.options.fields=[]);var t=function(e){s.options.fields.forEach(function(t){t.field===e&&(t.value=i[e],document.getElementById("".concat(s.elementId,"_input_").concat(t.field)).value=t.value)})};for(var e in i)t(e);this.render()}}]),n}(),WebsyDatePicker=function(){function a(t,e){_classCallCheck(this,a),this.oneDay=864e5,this.currentselection=[],this.validDates=[];var i={defaultRange:0,minAllowedDate:o(new Date(new Date((new Date).setFullYear((new Date).getFullYear()-5)).setDate(1))),maxAllowedDate:o(new Date((new Date).setFullYear((new Date).getFullYear()+1))),daysOfWeek:["S","M","T","W","T","F","S"],monthMap:{0:"Jan",1:"Feb",2:"Mar",3:"Apr",4:"May",5:"Jun",6:"Jul",7:"Aug",8:"Sep",9:"Oct",10:"Nov",11:"Dec"},ranges:[]};if(i.ranges=[{label:"All Dates",range:[i.minAllowedDate,i.maxAllowedDate]},{label:"Today",range:[o(new Date)]},{label:"Yesterday",range:[o((new Date).setDate((new Date).getDate()-1))]},{label:"Last 7 Days",range:[o((new Date).setDate((new Date).getDate()-6)),o(new Date)]},{label:"This Month",range:[o((new Date).setDate(1)),o(new Date((new Date).setDate(1)).setMonth((new Date).getMonth()+1)-this.oneDay)]},{label:"Last Month",range:[o(new Date((new Date).setDate(1)).setMonth((new Date).getMonth()-1)),o(new Date((new Date).setDate(1)).setMonth((new Date).getMonth())-this.oneDay)]},{label:"This Year",range:[o(new Date("1/1/".concat((new Date).getFullYear()))),o(new Date("12/31/".concat((new Date).getFullYear())))]},{label:"Last Year",range:[o(new Date("1/1/".concat((new Date).getFullYear()-1))),o(new Date("12/31/".concat((new Date).getFullYear()-1)))]}],this.options=_extends({},i,e),this.selectedRange=this.options.defaultRange||0,this.selectedRangeDates=_toConsumableArray(this.options.ranges[this.options.defaultRange||0].range),this.priorSelectedDates=null,t){var s=document.getElementById(t);if(s){this.elementId=t,s.addEventListener("click",this.handleClick.bind(this));var n="\n <div class='websy-date-picker-container'>\n <span class='websy-dropdown-header-label'>".concat(this.options.label||"Date","</span>\n <div class='websy-date-picker-header'>\n <span id='").concat(this.elementId,"_selectedRange'>").concat(this.options.ranges[this.selectedRange].label,'</span>\n <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M23.677 18.52c.914 1.523-.183 3.472-1.967 3.472h-19.414c-1.784 0-2.881-1.949-1.967-3.472l9.709-16.18c.891-1.483 3.041-1.48 3.93 0l9.709 16.18z"/></svg>\n </div>\n <div id=\'').concat(this.elementId,"_mask' class='websy-date-picker-mask'></div>\n <div id='").concat(this.elementId,"_content' class='websy-date-picker-content'>\n <div class='websy-date-picker-ranges'>\n <ul id='").concat(this.elementId,"_rangelist'>\n ").concat(this.renderRanges(),"\n </ul>\n </div>\x3c!--\n --\x3e<div id='").concat(this.elementId,"_datelist' class='websy-date-picker-custom'>").concat(this.renderDates(),"</div>\n <div class='websy-dp-button-container'>\n <button class='websy-btn websy-dp-cancel'>Cancel</button>\n <button class='websy-btn websy-dp-confirm'>Confirm</button>\n </div>\n </div> \n </div>\n ");s.innerHTML=n,this.render()}else console.log("No element found with Id",t)}else console.log("No element Id provided");function o(t){return"number"==typeof t&&(t=new Date(t)),new Date(t.setHours(0,0,0))}}return _createClass(a,[{key:"close",value:function(t){var e=document.getElementById("".concat(this.elementId,"_mask")),i=document.getElementById("".concat(this.elementId,"_content"));e.classList.remove("active"),i.classList.remove("active"),!0===t?(this.options.onChange&&this.options.onChange(this.selectedRangeDates),this.updateRange()):(this.selectedRangeDates=_toConsumableArray(this.priorSelectedDates),this.selectedRange=this.priorSelectedRange)}},{key:"handleClick",value:function(t){if(t.target.classList.contains("websy-date-picker-header"))this.open();else if(t.target.classList.contains("websy-date-picker-mask"))this.close();else if(t.target.classList.contains("websy-date-picker-range")){if(t.target.classList.contains("websy-disabled-range"))return;var e=t.target.getAttribute("data-index");this.selectRange(e),this.updateRange(e)}else if(t.target.classList.contains("websy-dp-date")){if(t.target.classList.contains("websy-disabled-date"))return;var i=t.target.id.split("_")[0];this.selectDate(+i)}else t.target.classList.contains("websy-dp-confirm")?this.close(!0):t.target.classList.contains("websy-dp-cancel")&&this.close()}},{key:"highlightRange",value:function(){for(var t=document.getElementById("".concat(this.elementId,"_dateList")).querySelectorAll(".websy-dp-date"),e=0;e<t.length;e++)t[e].classList.remove("selected"),t[e].classList.remove("first"),t[e].classList.remove("last");if(0!==this.selectedRange){var i=Math.floor((this.selectedRangeDates[this.selectedRangeDates.length-1].getTime()-this.selectedRangeDates[0].getTime())/this.oneDay);this.selectedRangeDates[0].getMonth()!==this.selectedRangeDates[this.selectedRangeDates.length-1].getMonth()&&(i+=1);for(var s=0;s<i+1;s++){var n=new Date(this.selectedRangeDates[0].getTime()+s*this.oneDay).floor(),o=document.getElementById("".concat(n.getTime(),"_date"));o&&(o.classList.add("selected"),n.getTime()===this.selectedRangeDates[0].getTime()&&o.classList.add("first"),n.getTime()===this.selectedRangeDates[this.selectedRangeDates.length-1].getTime()&&o.classList.add("last"))}}}},{key:"open",value:function(t){1<arguments.length&&void 0!==arguments[1]&&arguments[1];var e=document.getElementById("".concat(this.elementId,"_mask")),i=document.getElementById("".concat(this.elementId,"_content"));e.classList.add("active"),i.classList.add("active"),this.priorSelectedDates=_toConsumableArray(this.selectedRangeDates),this.priorSelectedRange=this.selectedRange,this.scrollRangeIntoView()}},{key:"render",value:function(t){if(this.elementId){var e=document.getElementById("".concat(this.elementId,"_datelist"));e&&t&&(e.innerHTML=this.renderDates(t));var i=document.getElementById("".concat(this.elementId,"_rangelist"));i&&t&&(i.innerHTML=this.renderRanges()),this.highlightRange()}else console.log("No element Id provided for Websy Loading Dialog")}},{key:"renderDates",value:function(t){var e=[];t&&(e=t.map(function(t){return t.getTime()})),this.options.ranges.forEach(function(t){return t.disabled=!0});for(var i=Math.ceil((this.options.maxAllowedDate.getTime()-this.options.minAllowedDate.getTime())/this.oneDay)+1,s={},n=0;n<i;n++){var o=new Date(this.options.minAllowedDate.getTime()+n*this.oneDay).floor();o.setHours(0);var a="".concat(this.options.monthMap[o.getMonth()]," ").concat(o.getFullYear());s[a]||(s[a]=[]),-1===e.indexOf(o.getTime())&&this.validDates.push(o.getTime()),s[a].push({date:o,dayOfMonth:o.getDate(),dayOfWeek:o.getDay(),id:o.getTime(),disabled:-1!==e.indexOf(o.getTime())})}for(var r=0;r<this.options.ranges.length;r++){var l=this.options.ranges[r];if(-1!==this.validDates.indexOf(l.range[0].getTime()))l.disabled=!1;else if(l.range[1]){-1!==this.validDates.indexOf(l.range[1].getTime())&&(l.disabled=!1);for(var c=l.range[0].getTime();c<l.range[1].getTime();c+=864e5)if(-1!==this.validDates.indexOf(l.range[1].getTime())){l.disabled=!1;break}}}var h="";for(var d in h+="\n <ul class='websy-dp-days-header'>\n ",h+=this.options.daysOfWeek.map(function(t){return"<li>".concat(t,"</li>")}).join(""),h+="\n </ul>\n <div id='".concat(this.elementId,"_dateList' class='websy-dp-date-list'>\n "),s){if(h+="\n <div class='websy-dp-month-container'>\n <span id='".concat(d.replace(/\s/g,"_"),"'>").concat(d,"</span>\n <ul>\n "),0<s[d][0].dayOfWeek){for(var p=[],u=0;u<s[d][0].dayOfWeek;u++)p.push("<li> </li>");h+=p.join("")}h+=s[d].map(function(t){return"<li id='".concat(t.id,"_date' class='websy-dp-date ").concat(!0===t.disabled?"websy-disabled-date":"","'>").concat(t.dayOfMonth,"</li>")}).join(""),h+="\n </ul>\n </div>\n "}return h+="</div>"}},{key:"renderRanges",value:function(){var i=this;return this.options.ranges.map(function(t,e){return"\n <li data-index='".concat(e,"' class='websy-date-picker-range ").concat(e===i.selectedRange?"active":""," ").concat(!0===t.disabled?"websy-disabled-range":"","'>").concat(t.label,"</li>\n ")}).join("")}},{key:"scrollRangeIntoView",value:function(){if(this.selectedRangeDates[0]){var t=document.getElementById("".concat(this.selectedRangeDates[0].getTime(),"_date")),e=document.getElementById("".concat(this.elementId,"_dateList"));t&&e&&e.scrollTo(0,t.offsetTop)}}},{key:"selectDate",value:function(t){0===this.currentselection.length?this.currentselection.push(t):t>this.currentselection[0]?this.currentselection.push(t):this.currentselection.splice(0,0,t),this.selectedRangeDates=[new Date(this.currentselection[0]),new Date(this.currentselection[1]||this.currentselection[0])],2===this.currentselection.length&&(this.currentselection=[]),this.selectedRange=-1,this.highlightRange()}},{key:"selectRange",value:function(t){this.options.ranges[t]&&(this.selectedRangeDates=_toConsumableArray(this.options.ranges[t].range),this.selectedRange=+t,this.highlightRange(),this.close(!0))}},{key:"selectCustomRange",value:function(t){this.selectedRange=-1,this.selectedRangeDates=t,this.highlightRange(),this.updateRange()}},{key:"setDateBounds",value:function(t){"All Dates"===this.options.ranges[0].label&&(this.options.ranges[0].range=[t[0],t[1]||t[0]]),this.options.minAllowedDate=t[0],this.options.maxAllowedDate=t[1]||t[0]}},{key:"updateRange",value:function(){var t;if(-1===this.selectedRange){var e=this.selectedRangeDates[0].toLocaleDateString(),i="";this.selectedRangeDates[1]&&this.selectedRangeDates[0].getTime()!==this.selectedRangeDates[1].getTime()&&(i=" - ".concat(this.selectedRangeDates[1].toLocaleDateString())),t={label:"".concat(e).concat(i)}}else t=this.options.ranges[this.selectedRange];for(var s=document.getElementById(this.elementId),n=document.getElementById("".concat(this.elementId,"_selectedRange")),o=s.querySelectorAll(".websy-date-picker-range"),a=0;a<o.length;a++)o[a].classList.remove("active"),a===this.selectedRange&&o[a].classList.add("active");n&&(n.innerHTML=t.label)}}]),a}();Date.prototype.floor=function(){return new Date("".concat(this.getMonth()+1,"/").concat(this.getDate(),"/").concat(this.getFullYear()))};var WebsyDropdown=function(){function s(t,e){_classCallCheck(this,s);if(this.options=_extends({},{multiSelect:!1,allowClear:!0,style:"plain",items:[],label:"",minSearchCharacters:2},e),this.selectedItems=[],t){var i=document.getElementById(t);i?(this.elementId=t,i.addEventListener("click",this.handleClick.bind(this)),i.addEventListener("keyup",this.handleKeyUp.bind(this)),this.render()):console.log("No element found with Id",t)}else console.log("No element Id provided")}return _createClass(s,[{key:"clearSelected",value:function(){this.selectedItems=[],this.updateHeader(),this.options.onClearSelected&&this.options.onClearSelected()}},{key:"close",value:function(){var t=document.getElementById("".concat(this.elementId,"_mask")),e=document.getElementById("".concat(this.elementId,"_content"));t.classList.remove("active"),e.classList.remove("active");var i=document.getElementById("".concat(this.elementId,"_search"));i&&(this.options.onCancelSearch&&this.options.onCancelSearch(""),i.value="")}},{key:"handleClick",value:function(t){if(t.target.classList.contains("websy-dropdown-header"))this.open();else if(t.target.classList.contains("websy-dropdown-mask"))this.close();else if(t.target.classList.contains("websy-dropdown-item")){var e=t.target.getAttribute("data-index");this.updateSelected(+e)}else t.target.classList.contains("clear")&&this.clearSelected()}},{key:"handleKeyUp",value:function(t){t.target.classList.contains("websy-dropdown-search")&&(t.target.value.length>=this.options.minSearchCharacters?"Enter"===t.key?this.options.onConfirmSearch&&(this.options.onConfirmSearch(t.target.value),t.target.value=""):"Escape"===t.key?this.options.onCancelSearch&&(this.options.onCancelSearch(t.target.value),t.target.value=""):this.options.onSearch&&this.options.onSearch(t.target.value):this.options.onCancelSearch&&this.options.onCancelSearch(t.target.value))}},{key:"open",value:function(t){1<arguments.length&&void 0!==arguments[1]&&arguments[1];var e=document.getElementById("".concat(this.elementId,"_mask")),i=document.getElementById("".concat(this.elementId,"_content"));if(e.classList.add("active"),i.classList.add("active"),!0!==this.options.disableSearch){var s=document.getElementById("".concat(this.elementId,"_search"));s&&s.focus()}}},{key:"render",value:function(){var e=this;if(this.elementId){var t=document.getElementById(this.elementId),i="\n <div class='websy-dropdown-container ".concat(!0!==this.options.disableSearch?"with-search":"","'>\n <div id='").concat(this.elementId,"_header' class='websy-dropdown-header ").concat(1===this.selectedItems.length?"one-selected":""," ").concat(!0===this.options.allowClear?"allow-clear":"","'>\n <span id='").concat(this.elementId,"_headerLabel' class='websy-dropdown-header-label'>").concat(this.options.label,"</span>\n <span class='websy-dropdown-header-value' id='").concat(this.elementId,"_selectedItems'>").concat(this.selectedItems.map(function(t){return e.options.items[t].label}).join(","),'</span>\n <svg class=\'arrow\' xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M23.677 18.52c.914 1.523-.183 3.472-1.967 3.472h-19.414c-1.784 0-2.881-1.949-1.967-3.472l9.709-16.18c.891-1.483 3.041-1.48 3.93 0l9.709 16.18z"/></svg>\n ');!0===this.options.allowClear&&(i+='\n <svg class=\'clear\' xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 512 512"><title>ionicons-v5-l</title><line x1="368" y1="368" x2="144" y2="144" style="fill:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><line x1="368" y1="144" x2="144" y2="368" style="fill:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/></svg>\n '),i+=" \n </div>\n <div id='".concat(this.elementId,"_mask' class='websy-dropdown-mask'></div>\n <div id='").concat(this.elementId,"_content' class='websy-dropdown-content'>\n "),!0!==this.options.disableSearch&&(i+="\n <input id='".concat(this.elementId,"_search' class='websy-dropdown-search' placeholder='").concat(this.options.searchPlaceholder||"Search","'>\n ")),i+="\n <div class='websy-dropdown-items'>\n <ul id='".concat(this.elementId,"_items'> \n </ul>\n </div>\x3c!--\n --\x3e<div class='websy-dropdown-custom'></div>\n </div>\n </div>\n "),t.innerHTML=i,this.renderItems()}else console.log("No element Id provided for Websy Dropdown")}},{key:"renderItems",value:function(){var t,i=this,e=this.options.items.map(function(t,e){return"\n <li data-index='".concat(e,"' class='websy-dropdown-item ").concat(-1!==i.selectedItems.indexOf(e)?"active":"","'>").concat(t.label,"</li>\n ")}).join(""),s=document.getElementById("".concat(this.elementId,"_items"));s&&(s.innerHTML=e),1===this.selectedItems.length&&(t=this.options.items[this.selectedItems[0]]),this.updateHeader(t)}},{key:"updateHeader",value:function(t){for(var e=document.getElementById(this.elementId),i=document.getElementById("".concat(this.elementId,"_header")),s=document.getElementById("".concat(this.elementId,"_headerLabel")),n=document.getElementById("".concat(this.elementId,"_selectedItems")),o=e.querySelectorAll(".websy-dropdown-item"),a=0;a<o.length;a++)o[a].classList.remove("active"),-1!==this.selectedItems.indexOf(a)&&o[a].classList.add("active");s&&(s.innerHTML=this.options.label),i&&(i.classList.remove("one-selected"),i.classList.remove("multi-selected"),1===this.selectedItems.length?i.classList.add("one-selected"):1<this.selectedItems.length&&i.classList.add("multi-selected")),n&&(1===this.selectedItems.length?n.innerHTML=t.label:1<this.selectedItems.length?n.innerHTML="".concat(this.selectedItems.length," selected"):n.innerHTML="")}},{key:"updateSelected",value:function(t){if(null!=t){if(-1!==this.selectedItems.indexOf(t))return;!1===this.options.multiSelect?this.selectedItems=[t]:this.selectedItems.push(t)}var e=this.options.items[t];this.updateHeader(e),e&&this.options.onItemSelected&&this.options.onItemSelected(e,this.selectedItems,this.options.items),this.close()}},{key:"selections",set:function(t){this.selectedItems=t||[]}},{key:"data",set:function(t){this.options.items=t||[],0===document.getElementById("".concat(this.elementId,"_items")).childElementCount?this.render():(0===this.options.items.length&&(this.options.items=[{label:this.options.noItemsText||"No Items"}]),this.renderItems())},get:function(){return this.options.items}}]),s}(),WebsyResultList=function(){function n(t,e){var i=this;_classCallCheck(this,n);if(this.options=_extends({},{listeners:{click:{}}},e),this.elementId=t,this.rows=[],this.apiService=new WebsyDesigns.APIService("/api"),this.templateService=new WebsyDesigns.APIService(""),t){var s=document.getElementById(t);s&&s.addEventListener("click",this.handleClick.bind(this)),"object"===_typeof(e.template)&&e.template.url?this.templateService.get(e.template.url).then(function(t){i.options.template=t,i.render()}):this.render()}else console.log("No element Id provided for Websy Search List")}return _createClass(n,[{key:"appendData",value:function(t){var e=this.rows.length;this.rows=this.rows.concat(t);var i=this.buildHTML(t,e);document.getElementById(this.elementId).innerHTML+=i.replace(/\n/g,"")}},{key:"buildHTML",value:function(n){var o=this,a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,c="";return this.options.template&&(0<n.length?n.forEach(function(r,e){var l="".concat(0<e?"--\x3e":"").concat(o.options.template).concat(e<n.length-1?"\x3c!--":"");_toConsumableArray(l.matchAll(/<\s*if[^>]*>([\s\S]*?)<\s*\/\s*if>/g)).forEach(function(t){if(t[0]&&-1<t.index){var e=t[0].match(/(\scondition=["|']\w.+)["|']/g);if(e&&e[0]){var i=e[0].trim().replace("condition=","");'"'===i.split("")[0]?i=i.replace(/"/g,""):"'"===i.split("")[0]&&(i=i.replace(/'/g,""));var s=[],n=!0;-1!==i.indexOf("===")?s=i.split("==="):-1!==i.indexOf("!==")?(s=i.split("!=="),n=!1):-1!==i.indexOf("==")?s=i.split("=="):-1!==i.indexOf("!=")&&(s=i.split("!="),n=!1);var o=!0;if(2===s.length&&(isNaN(s[1])||(s[1]=+s[1]),"true"===s[1]&&(s[1]=!0),"false"===s[1]&&(s[1]=!1),"string"==typeof s[1]&&(-1!==s[1].indexOf('"')?s[1]=s[1].replace(/"/g,""):-1!==s[1].indexOf("'")&&(s[1]=s[1].replace(/'/g,""))),!0===n?void 0!==r[s[0]]&&r[s[0]]===s[1]?o=!1:s[0]===s[1]&&(o=!1):!1===n&&void 0!==r[s[0]]&&r[s[0]]!==s[1]&&(o=!1)),!0===o)l=l.replace(t[0],"");else{var a=t[0];a=a.replace("</if>","").replace(/<\s*if[^>]*>/g,""),l=l.replace(t[0],a)}}}});var t=_toConsumableArray(l.matchAll(/(\sdata-event=["|']\w.+)["|']/g));for(var i in t.forEach(function(t){t[0]&&-1<t.index&&(l=l.replace(t[0],"".concat(t[0]," data-id=").concat(a+e)))}),r){var s=new RegExp("{".concat(i,"}"),"gm");l=l.replace(s,r[i])}c+=l}):this.options.noRowsHTML&&(c+=this.options.noRowsHTML)),c}},{key:"findById",value:function(t){for(var e=0;e<this.rows.length;e++)if(this.rows[e].id===t)return this.rows[e];return null}},{key:"handleClick",value:function(t){var e=this;if(t.target.classList.contains("clickable")){var i=t.target.getAttribute("data-event");if(i){i=i.split("(");var s,n=[],o=t.target.getAttribute("data-id");if(i[1]&&(i[1]=i[1].replace(")",""),n=i[1].split(",")),i=i[0],n=n.map(function(t){return"string"!=typeof t&&"number"!=typeof t?e.rows[+o]&&(t=e.rows[+o][t]):"string"==typeof t&&(t=t.replace(/"/g,"").replace(/'/g,"")),t}),t.target.classList.contains("clickable")&&this.options.listeners.click[i])t.stopPropagation(),(s=this.options.listeners.click[i]).call.apply(s,[this,t,this.rows[+o]].concat(_toConsumableArray(n)))}}}},{key:"render",value:function(){var e=this;this.options.entity?this.apiService.get(this.options.entity).then(function(t){e.rows=t.rows,e.resize()}):this.resize()}},{key:"resize",value:function(){var t=this.buildHTML(this.rows);document.getElementById(this.elementId).innerHTML=t.replace(/\n/g,"")}},{key:"data",set:function(t){this.rows=t||[],this.render()},get:function(){return this.rows}}]),n}(),WebsyPubSub=function(){function i(t,e){_classCallCheck(this,i),this.options=_extends({},e),t?(this.elementId=t,this.subscriptions={}):console.log("No element Id provided")}return _createClass(i,[{key:"publish",value:function(t,e){this.subscriptions[t]&&this.subscriptions[t].forEach(function(t){t(e)})}},{key:"subscribe",value:function(t,e){this.subscriptions[t]||(this.subscriptions[t]=[]),this.subscriptions[t].push(e)}}]),i}(),APIService=function(){function e(t){_classCallCheck(this,e),this.baseUrl=t}return _createClass(e,[{key:"add",value:function(t,e){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},s=this.buildUrl(t);return this.run("POST",s,e,i)}},{key:"buildUrl",value:function(t,e,i){return void 0===i&&(i=[]),e&&i.push("id:".concat(e)),"".concat(this.baseUrl,"/").concat(t).concat(0<i.length?"?where=".concat(i.join(";")):"")}},{key:"delete",value:function(t,e){var i=this.buildUrl(t,e);return this.run("DELETE",i)}},{key:"get",value:function(t,e,i){var s=this.buildUrl(t,e,i);return this.run("GET",s)}},{key:"update",value:function(t,e,i){var s=this.buildUrl(t,e);return this.run("PUT",s,i)}},{key:"fetchData",value:function(t,e,i){3<arguments.length&&void 0!==arguments[3]&&arguments[3];return fetch(e,{method:t,mode:"cors",cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer",body:JSON.stringify(i)}).then(function(t){return t.json()})}},{key:"run",value:function(n,o,a){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{},l=4<arguments.length&&void 0!==arguments[4]&&arguments[4];return new Promise(function(e,i){var s=new XMLHttpRequest;if(s.open(n,o),s.setRequestHeader("Content-Type","application/json"),s.responseType="text",r.responseType&&(s.responseType=r.responseType),r.headers)for(var t in r.headers)s.setRequestHeader(t,r.headers[t]);s.withCredentials=!0,console.log("using this"),s.onload=function(){if(401!==s.status){var t="text"===s.responseType?s.responseText:s.response;if(""!==t&&"null"!==t)try{t=JSON.parse(t)}catch(t){}else t=[];t.err?i(JSON.stringify(t)):e(!0===l?[t,function(t){t=t.split("\r\n");var e={};return t.forEach(function(t){2===(t=t.split(":")).length&&(e[t[0]]=t[1].trim())}),e}(s.getAllResponseHeaders())]:t)}else ENV&&ENV.AUTH_REDIRECT?window.location=ENV.AUTH_REDIRECT:window.location="/login"},s.onerror=function(){return i(s.statusText)},a?s.send(JSON.stringify(a)):s.send()})}}]),e}(),WebsyPDFButton=function(){function s(t,e){_classCallCheck(this,s);this.elementId=t,this.options=_extends({},{classes:[],wait:0},e),this.service=new WebsyDesigns.APIService("/pdf");var i=document.getElementById(this.elementId);i&&(i.addEventListener("click",this.handleClick.bind(this)),e.html?i.innerHTML=e.html:(i.innerHTML="\n \x3c!--<form style='display: none;' id='".concat(this.elementId,"_form' action='/pdf' method='POST'>\n <input id='").concat(this.elementId,"_pdfHeader' value='' name='header'>\n <input id='").concat(this.elementId,"_pdfHTML' value='' name='html'>\n <input id='").concat(this.elementId,"_pdfFooter' value='' name='footer'>\n </form>--\x3e\n <button class='websy-btn websy-pdf-button ").concat(this.options.classes.join(" "),'\'>\n Create PDF\n <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n viewBox="0 0 184.153 184.153" style="enable-background:new 0 0 184.153 184.153;" xml:space="preserve">\n <g>\n <g>\n <g>\n <path d="M129.318,0H26.06c-1.919,0-3.475,1.554-3.475,3.475v177.203c0,1.92,1.556,3.475,3.475,3.475h132.034\n c1.919,0,3.475-1.554,3.475-3.475V34.131C161.568,22.011,140.771,0,129.318,0z M154.62,177.203H29.535V6.949h99.784\n c7.803,0,25.301,18.798,25.301,27.182V177.203z"/>\n <path d="M71.23,76.441c15.327,0,27.797-12.47,27.797-27.797c0-15.327-12.47-27.797-27.797-27.797\n c-15.327,0-27.797,12.47-27.797,27.797C43.433,63.971,55.902,76.441,71.23,76.441z M71.229,27.797\n c11.497,0,20.848,9.351,20.848,20.847c0,0.888-0.074,1.758-0.183,2.617l-18.071-2.708L62.505,29.735\n C65.162,28.503,68.112,27.797,71.229,27.797z M56.761,33.668l11.951,19.869c0.534,0.889,1.437,1.49,2.462,1.646l18.669,2.799\n c-3.433,6.814-10.477,11.51-18.613,11.51c-11.496,0-20.847-9.351-20.847-20.847C50.381,42.767,52.836,37.461,56.761,33.668z"/>\n <rect x="46.907" y="90.339" width="73.058" height="6.949"/>\n <rect x="46.907" y="107.712" width="48.644" height="6.949"/>\n <rect x="46.907" y="125.085" width="62.542" height="6.949"/>\n </g>\n </g>\n </g>\n <g>\n </g>\n <g>\n </g>\n <g>\n </g>\n <g>\n </g>\n <g>\n </g>\n <g>\n </g>\n <g>\n </g>\n <g>\n </g>\n <g>\n </g>\n <g>\n </g>\n <g>\n </g>\n <g>\n </g>\n <g>\n </g>\n <g>\n </g>\n <g>\n </g>\n </svg>\n </button> \n <div id=\'').concat(this.elementId,"_loader'></div>\n <div id='").concat(this.elementId,"_popup'></div>\n "),this.loader=new WebsyDesigns.WebsyLoadingDialog("".concat(this.elementId,"_loader"),{classes:["global-loader"]}),this.popup=new WebsyDesigns.WebsyPopupDialog("".concat(this.elementId,"_popup"))))}return _createClass(s,[{key:"handleClick",value:function(t){var n=this;t.target.classList.contains("websy-pdf-button")&&(this.loader.show(),setTimeout(function(){if(n.options.targetId){var t=document.getElementById(n.options.targetId);if(t){var e={options:{}};if(n.options.pdfOptions&&(e.options=_extends({},n.options.pdfOptions)),n.options.header)if(n.options.header.elementId){var i=document.getElementById(n.options.header.elementId);i&&(e.header=i.outerHTML,n.options.header.css&&(e.options.headerCSS=n.options.header.css))}else e.header=n.options.header;if(n.options.footer)if(n.options.footer.elementId){var s=document.getElementById(n.options.footer.elementId);s&&(e.footer=s.outerHTML,n.options.footer.css&&(e.options.footerCSS=n.options.footer.css))}else e.footer=n.options.footer;e.html=t.outerHTML,n.service.add("",e,{responseType:"blob"}).then(function(t){n.loader.hide();var e=new Blob([t],{type:"application/pdf"});n.popup.show({message:"\n <div class='text-center websy-pdf-download'>\n <div>Your file is ready to download</div>\n <a href='".concat(URL.createObjectURL(e),"' target='_blank'>\n <button class='websy-btn'>Download</button>\n </a>\n </div>\n "),mask:!0})},function(t){console.error(t)})}}},this.options.wait))}},{key:"render",value:function(){}}]),s}(),WebsyTable=function(){function s(t,e){_classCallCheck(this,s);this.elementId=t,this.options=_extends({},{pageSize:20},e),this.rowCount=0,this.busy=!1,this.data=[];var i=document.getElementById(this.elementId);i?(i.innerHTML="\n <div id='".concat(this.elementId,'_tableContainer\' class=\'websy-vis-table\'>\n \x3c!--<div class="download-button">\n <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M16 11h5l-9 10-9-10h5v-11h8v11zm1 11h-10v2h10v-2z"/></svg>\n </div>--\x3e\n <table>\n <thead id="').concat(this.elementId,'_head">\n </thead>\n <tbody id="').concat(this.elementId,'_body">\n </tbody>\n </table>\n </div>\n '),i.addEventListener("click",this.handleClick.bind(this)),document.getElementById("".concat(this.elementId,"_tableContainer")).addEventListener("scroll",this.handleScroll.bind(this)),this.render()):console.error("No element found with ID ".concat(this.elementId))}return _createClass(s,[{key:"appendRows",value:function(t){var s=this,e="";t&&(e+=t.map(function(t,i){return"<tr>"+t.map(function(t,e){if(!1!==s.options.columns[e].show)return!0===s.options.columns[e].showAsLink&&""!==t.value.trim()?"\n <td class='".concat(s.options.columns[e].classes||"","' ").concat(s.options.columns[e].width?'style="width: '+s.options.columns[e].width+'"':"","><a href='").concat(t.value,"' target='").concat(!0===t.openInNewTab?"_blank":"_self","'>").concat(s.options.columns[e].linkText||"Link","</a></td>\n "):!0===s.options.columns[e].showAsNavigatorLink&&""!==t.value.trim()?"\n <td data-view='".concat(t.value,"' data-row-index='").concat(s.rowCount+i,"' data-col-index='").concat(e,"' class='trigger-item ").concat(!0===s.options.columns[e].clickable?"clickable":""," ").concat(s.options.columns[e].classes||"","' ").concat(s.options.columns[e].width?'style="width: '+s.options.columns[e].width+'"':"",">").concat(s.options.columns[e].linkText||"Link","</td>\n "):"\n <td class='".concat(s.options.columns[e].classes||"","' ").concat(s.options.columns[e].width?'style="width: '+(s.options.columns[e].width||"auto")+'"':"",">").concat(t.value,"</td>\n ")}).join("")+"</tr>"}).join(""),this.data=this.data.concat(t),this.rowCount=this.data.length),document.getElementById("".concat(this.elementId,"_body")).innerHTML+=e}},{key:"buildSearchIcon",value:function(t){return'\n <div>\n <svg\n class="tableSearchIcon"\n data-field="'.concat(t,'"\n xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"\n >\n <path d="M0 0h24v24H0z" fill="none"/>\n <path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/>\n </svg>\n </div>\n ')}},{key:"handleClick",value:function(t){if(t.target.classList.contains("download-button")&&window.viewManager.dataExportController.exportData(this.options.model),t.target.classList.contains("sortable-column")){var e=+t.target.getAttribute("data-index"),i=this.options.columns[e];this.options.onSort?this.options.onSort(t,i,e):this.internalSort()}else if(t.target.classList.contains("tableSearchIcon")){var s=t.target.getAttribute("data-field");window.viewManager.views.global.objects[1].instance.show(s,{x:t.pageX,y:t.pageY},function(){t.target.classList.remove("active")})}else if(t.target.classList.contains("clickable")){var n=+t.target.getAttribute("data-col-index"),o=+t.target.getAttribute("data-row-index");this.options.onClick&&this.options.onClick(t,this.data[o][n],this.data[o],this.options.columns[n])}}},{key:"handleScroll",value:function(t){this.options.onScroll&&this.options.onScroll(t)}},{key:"internalSort",value:function(){}},{key:"render",value:function(t){var i=this;if(this.options.columns){if(this.data=[],this.rowCount=0,!(document.getElementById("".concat(this.elementId,"_body")).innerHTML="")===this.options.allowDownload){var e=document.getElementById(this.elementId);e?e.classList.add("allow-download"):e.classList.remove("allow-download")}var s="<tr>"+this.options.columns.map(function(t,e){if(!1!==t.show)return"\n <th ".concat(t.width?'style="width: '+(t.width||"auto")+';"':"",'>\n <div class ="tableHeader">\n <div class="leftSection">\n <div\n class="tableHeaderField ').concat(-1!==["asc","desc"].indexOf(t.sort)?"sortable-column":"",'"\n data-index="').concat(e,'" \n data-sort="').concat(t.sort,'" \n >\n ').concat(t.name,'\n </div>\n </div>\n <div class="').concat(t.activeSort?t.sort+" sortOrder":"",'"></div>\n \x3c!--').concat(!0===t.searchable?i.buildSearchIcon(t.qGroupFieldDefs[0]):"","--\x3e\n </div>\n </th>\n ")}).join("")+"</tr>";document.getElementById("".concat(this.elementId,"_head")).innerHTML=s,t&&(this.data=this.data.concat(t),this.appendRows(t))}}}]),s}(),WebsyChart=function(){function n(t,e){_classCallCheck(this,n);var i={margin:{top:3,left:3,bottom:3,right:3,axisBottom:0,axisLeft:0,axisRight:0,axisTop:0},orientation:"vertical",colors:d3.schemeCategory10,transitionDuration:650,curveStyle:"curveLinear",lineWidth:2,forceZero:!0,fontSize:14,symbolSize:20,dateFormat:"%b/%m/%Y",showTrackingLine:!0,showTooltip:!0,tooltipWidth:200};if(this.elementId=t,this.options=_extends({},i,e),this.leftAxis=null,this.rightAxis=null,this.topAxis=null,this.bottomAxis=null,t){var s=document.getElementById(this.elementId);s?(s.classList.add("websy-chart"),"undefined"==typeof d3?console.error("d3 library has not been loaded"):(s.innerHTML="",this.svg=d3.select(s).append("svg"),this.prep())):console.error("No element found with ID ".concat(this.elementId))}else console.log("No element Id provided for Websy Chart")}return _createClass(n,[{key:"createDomain",value:function(t){var e=[];if(void 0!==this.options.data[t].min&&void 0!==this.options.data[t].max&&(e=[this.options.data[t].min,this.options.data[t].max],!0===this.options.forceZero&&(e=[Math.min(0,this.options.data[t].min),this.options.data[t].max])),this.options.data[t].data&&(e=this.options.data[t].data.map(function(t){return t.value})),"Time"===this.options.data[t].scale){var i=this.options.data[t].data[0].value,s=this.options.data[t].data[this.options.data[t].data.length-1].value;e=[i=this.parseX(i),s=this.parseX(s)]}return e}},{key:"createIdentity",value:function(){for(var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:10,e="",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",s=0;s<t;s++)e+=i.charAt(Math.floor(Math.random()*i.length));return e}},{key:"handleEventMouseOut",value:function(t,e){this.trackingLineLayer.select(".tracking-line").attr("stroke-opacity",0),this.tooltip.hide()}},{key:"handleEventMouseMove",value:function(r,t){var l=this,c=d3.bisector(function(t){return l.parseX(t.x.value)}).left;if(!0===this.options.showTrackingLine&&d3.pointer(r)){var h,d=d3.pointer(r)[0],e="",p="",u=[];if(this.bottomAxis.invert){d=this.bottomAxis.invert(d),this.options.data.series.forEach(function(t){var e=c(t.data,d,1),i=t.data[e-1],s=t.data[e];if(i&&(h=l.bottomAxis(l.parseX(i.x.value)),p=i.x.value,void 0!==i.x.value.getTime&&(p=d3.timeFormat(l.options.dateFormat)(i.x.value))),i&&s){var n=l.bottomAxis(l.parseX(i.x.value)),o=l.bottomAxis(l.parseX(s.x.value)),a=Math.abs(n-o)/2;d3.pointer(r)[0]-n>=a?(h=o,p=s.x.value,void 0!==s.x.value.getTime&&(p=d3.timeFormat(l.options.dateFormat)(s.x.value)),u.push(s.y)):(h=n,u.push(i.y))}}),e=" \n <ul>\n ",e+=u.map(function(t){return"\n <li>\n <i style='background-color: ".concat(t.color,";'></i>\n ").concat(t.tooltipLabel||"","<span>").concat(t.tooltipValue||t.value,"</span>\n </li>\n ")}).join(""),e+="</ul>";var i={width:this.options.tooltipWidth,left:0,top:0,onLeft:h>this.plotWidth/2};h>this.plotWidth/2?i.left=h-this.options.tooltipWidth-15:i.left=h+this.options.margin.left+this.options.margin.axisLeft+15,i.top=this.options.margin.top+this.options.margin.axisTop,this.tooltip.show(p,e,i)}else h=d;this.trackingLineLayer.select(".tracking-line").attr("x1",h).attr("x2",h).attr("y1",0).attr("y2",this.plotHeight).attr("stroke-width",1).attr("stroke-dasharray","4 2").attr("stroke","#cccccc").attr("stroke-opacity",1)}}},{key:"prep",value:function(){this.leftAxisLayer=this.svg.append("g"),this.rightAxisLayer=this.svg.append("g"),this.bottomAxisLayer=this.svg.append("g"),this.leftAxisLabel=this.svg.append("g"),this.rightAxisLabel=this.svg.append("g"),this.bottomAxisLabel=this.svg.append("g"),this.plotArea=this.svg.append("g"),this.areaLayer=this.svg.append("g"),this.lineLayer=this.svg.append("g"),this.barLayer=this.svg.append("g"),this.symbolLayer=this.svg.append("g"),this.trackingLineLayer=this.svg.append("g"),this.trackingLineLayer.append("line").attr("class","tracking-line"),this.tooltip=new WebsyDesigns.WebsyChartTooltip(this.svg),this.eventLayer=this.svg.append("g").append("rect"),this.eventLayer.on("mouseout",this.handleEventMouseOut.bind(this)).on("mousemove",this.handleEventMouseMove.bind(this)),this.render()}},{key:"render",value:function(t){var i=this;if(void 0!==t&&(this.options=_extends({},this.options,t)),this.options.data){this.transition=d3.transition().duration(this.options.transitionDuration),this.options.data.bottom.scale&&"Time"===this.options.data.bottom.scale?this.parseX=function(t){if(void 0!==t.getTime)return t;d3.timeParse(this.options.timeParseFormat)(t)}:this.parseX=function(t){return t},!0===this.options.disableTransitions&&(this.transition=d3.transition().duration(0)),this.options.data.left||(this.options.data.left={data:[]}),this.options.data.right||(this.options.data.right={data:[]}),this.options.data.bottom||(this.options.data.bottom={data:[]}),"vertical"===this.options.orientation?(this.leftAxisLayer.attr("class","y-axis"),this.rightAxisLayer.attr("class","y-axis"),this.bottomAxisLayer.attr("class","x-axis")):(this.leftAxisLayer.attr("class","x-axis"),this.rightAxisLayer.attr("class","x-axis"),this.bottomAxisLayer.attr("class","y-axis"));var e=document.getElementById(this.elementId);if(e){this.width=e.clientWidth,this.height=e.clientHeight,this.svg.attr("width",this.width).attr("height",this.height),this.longestLeft=0,this.longestRight=0,this.longestBottom=0,this.options.data.bottom&&this.options.data.bottom.data&&void 0===this.options.data.bottom.max&&(this.options.data.bottom.max=this.options.data.bottom.data.reduce(function(t,e){return t.length>e.value.length?t:e.value},""),this.options.data.bottom.min=this.options.data.bottom.data.reduce(function(t,e){return t.length<e.value.length?t:e.value},this.options.data.bottom.max)),this.options.data.bottom&&void 0!==this.options.data.bottom.max&&(this.longestBottom=this.options.data.bottom.max.toString().length,this.options.data.bottom.formatter&&(this.longestBottom=this.options.data.bottom.formatter(this.options.data.bottom.max).toString().length)),this.options.data.left&&this.options.data.left.data&&"undefined"===this.options.data.left.max&&(this.options.data.left.min=d3.min(this.options.data.left.data),this.options.data.left.max=d3.max(this.options.data.left.data)),!this.options.data.left.max&&this.options.data.left.data&&(this.options.data.left.max=this.options.data.left.data.reduce(function(t,e){return t.length>e.value.length?t:e.value},"")),!this.options.data.left.min&&this.options.data.left.data&&(this.options.data.left.min=this.options.data.left.data.reduce(function(t,e){return t.length<e.value.length?t:e.value},this.options.data.left.max)),this.options.data.left&&void 0!==this.options.data.left.max&&(this.longestLeft=this.options.data.left.max.toString().length,this.options.data.left.formatter&&(this.longestLeft=this.options.data.left.formatter(this.options.data.left.max).toString().length)),this.options.data.right&&this.options.data.right.data&&"undefined"===this.options.data.right.max&&(this.options.data.right.min=d3.min(this.options.data.right.data),this.options.data.right.max=d3.max(this.options.data.right.data)),this.options.data.right&&void 0!==this.options.data.right.max&&(this.longestRight=this.options.data.right.max.toString().length,this.options.data.right.formatter&&(this.longestRight=this.options.data.right.formatter(this.options.data.right.max).toString().length)),this.options.margin.axisLeft=this.longestLeft*(this.options.data.left&&this.options.data.left.fontSize||this.options.fontSize)*.7,this.options.margin.axisRight=this.longestRight*(this.options.data.right&&this.options.data.right.fontSize||this.options.fontSize)*.7,this.options.margin.axisBottom=(this.options.data.bottom&&this.options.data.bottom.fontSize||this.options.fontSize)+10,this.options.margin.axisTop=0,this.options.data.left&&!0===this.options.data.left.showTitle&&(1===this.options.data.left.titlePosition?this.options.margin.axisLeft+=(this.options.data.left.titleFontSize||10)+10:this.options.margin.axisTop+=(this.options.data.left.titleFontSize||10)+10),this.options.data.right&&!0===this.options.data.right.showTitle&&(1===this.options.data.right.titlePosition?this.options.margin.axisRight+=(this.options.data.right.titleFontSize||10)+10:0===this.options.margin.axisTop&&(this.options.margin.axisTop+=(this.options.data.right.titleFontSize||10)+10)),this.options.data.bottom.rotate&&(this.options.margin.axisBottom=this.longestBottom*(this.options.data.bottom&&this.options.data.bottom.fontSize||this.options.fontSize)*.4),this.options.axis&&(!0===this.options.axis.hideAll&&(this.options.margin.axisLeft=0,this.options.margin.axisRight=0,this.options.margin.axisBottom=0),!0===this.options.axis.hideLeft&&(this.options.margin.axisLeft=0),!0===this.options.axis.hideRight&&(this.options.margin.axisRight=0),!0===this.options.axis.hideBottom&&(this.options.margin.axisBottom=0)),this.plotWidth=this.width-this.options.margin.left-this.options.margin.right-this.options.margin.axisLeft-this.options.margin.axisRight,this.plotHeight=this.height-this.options.margin.top-this.options.margin.bottom-this.options.margin.axisBottom-this.options.margin.axisTop,this.leftAxisLayer.attr("transform","translate(".concat(this.options.margin.left+this.options.margin.axisLeft,", ").concat(this.options.margin.top+this.options.margin.axisTop,")")),this.rightAxisLayer.attr("transform","translate(".concat(this.options.margin.left+this.plotWidth+this.options.margin.axisLeft,", ").concat(this.options.margin.top+this.options.margin.axisTop,")")),this.bottomAxisLayer.attr("transform","translate(".concat(this.options.margin.left+this.options.margin.axisLeft,", ").concat(this.options.margin.top+this.options.margin.axisTop+this.plotHeight,")")),this.leftAxisLabel.attr("transform","translate(".concat(this.options.margin.left,", ").concat(this.options.margin.top+this.options.margin.axisTop,")")),this.rightAxisLabel.attr("transform","translate(".concat(this.options.margin.left+this.plotWidth+this.options.margin.axisLeft+this.options.margin.axisRight,", ").concat(this.options.margin.top+this.options.margin.axisTop,")")),this.bottomAxisLabel.attr("transform","translate(".concat(this.options.margin.left+this.options.margin.axisLeft,", ").concat(this.options.margin.top+this.options.margin.axisTop+this.plotHeight,")")),this.plotArea.attr("transform","translate(".concat(this.options.margin.left+this.options.margin.axisLeft,", ").concat(this.options.margin.top+this.options.margin.axisTop,")")),this.areaLayer.attr("transform","translate(".concat(this.options.margin.left+this.options.margin.axisLeft,", ").concat(this.options.margin.top+this.options.margin.axisTop,")")),this.lineLayer.attr("transform","translate(".concat(this.options.margin.left+this.options.margin.axisLeft,", ").concat(this.options.margin.top+this.options.margin.axisTop,")")),this.barLayer.attr("transform","translate(".concat(this.options.margin.left+this.options.margin.axisLeft,", ").concat(this.options.margin.top+this.options.margin.axisTop,")")),this.symbolLayer.attr("transform","translate(".concat(this.options.margin.left+this.options.margin.axisLeft,", ").concat(this.options.margin.top+this.options.margin.axisTop,")")),this.trackingLineLayer.attr("transform","translate(".concat(this.options.margin.left+this.options.margin.axisLeft,", ").concat(this.options.margin.top+this.options.margin.axisTop,")")),this.eventLayer.attr("transform","translate(".concat(this.options.margin.left+this.options.margin.axisLeft,", ").concat(this.options.margin.top+this.options.margin.axisTop,")"));this.eventLayer.attr("x",0).attr("y",0).attr("width",this.plotWidth).attr("height",this.plotHeight).attr("fill-opacity","0");var s=this.createDomain("bottom");if(this.bottomAxis=d3["scale".concat(this.options.data.bottom.scale||"Band")]().domain(s).range([0,this.plotWidth]),this.bottomAxis.nice&&this.bottomAxis.nice(),this.bottomAxis.padding&&this.options.data.bottom.padding&&this.bottomAxis.padding(this.options.data.bottom.padding||0),0<this.options.margin.axisBottom){var n=d3.axisBottom(this.bottomAxis).ticks(this.options.data.bottom.ticks||5);this.options.data.bottom.formatter&&n.tickFormat(function(t){return i.options.data.bottom.formatter(t)}),this.bottomAxisLayer.call(n),this.options.data.bottom.rotate&&this.bottomAxisLayer.selectAll("text").attr("transform","rotate(".concat(this.options.data.bottom.rotate,")")).style("text-anchor","end")}var o=this.createDomain("left"),a=this.createDomain("right");if(this.leftAxis=d3["scale".concat(this.options.data.left.scale||"Linear")]().domain(o).range([this.plotHeight,0]),this.leftAxis.padding&&this.options.data.left.padding&&this.leftAxis.padding(this.options.data.left.padding||0),this.leftAxis.nice&&this.leftAxis.nice(),0<this.options.margin.axisLeft&&this.leftAxisLayer.call(d3.axisLeft(this.leftAxis).ticks(this.options.data.left.ticks||5).tickFormat(function(t){return i.options.data.left.formatter&&(t=i.options.data.left.formatter(t)),t})),this.options.data.left&&!0===this.options.data.left.showTitle)if(this.leftAxisLabel.selectAll(".title").remove(),this.leftAxisLabel.selectAll(".dot").remove(),1===this.options.data.left.titlePosition){var r=this.leftAxisLabel.append("text").attr("class","title").attr("x",1-this.plotHeight/2).attr("y",5).attr("font-size",this.options.data.left.titleFontSize||10).attr("fill",this.options.data.left.titleColor||"#888888").attr("text-anchor","middle").style("transform","rotate(-90deg)").text(this.options.data.left.title||"");0<a.length&&this.leftAxisLabel.append("circle").attr("class","dot").style("fill",this.options.data.left.color||"transparent").attr("r",this.options.data.left.titleFontSize&&this.options.data.left.titleFontSize/2||5).attr("cx",3).attr("cy",this.plotHeight/2-r.node().getBBox().width/2-15)}else this.leftAxisLabel.append("text").attr("class","title").attr("x",0).attr("y",5).attr("font-size",this.options.data.left.titleFontSize||10).attr("fill",this.options.data.left.titleColor||"#888888").attr("text-anchor","left").text(this.options.data.left.title||"");if(0<a.length&&(this.rightAxis=d3["scale".concat(this.options.data.right.scale||"Linear")]().domain(a).range([this.plotHeight,0]),this.rightAxis.nice&&this.rightAxis.nice(),0<this.options.margin.axisRight&&this.rightAxisLayer.call(d3.axisRight(this.rightAxis).ticks(this.options.data.left.ticks||5).tickFormat(function(t){return i.options.data.right.formatter&&(t=i.options.data.right.formatter(t)),t}))),this.options.data.right&&!0===this.options.data.right.showTitle&&(this.rightAxisLabel.selectAll(".title").remove(),1===this.options.data.right.titlePosition)){var l=this.rightAxisLabel.append("text").attr("class","title").attr("x",this.plotHeight/2).attr("y",5).attr("font-size",this.options.data.right.titleFontSize||10).attr("fill",this.options.data.right.titleColor||"#888888").attr("text-anchor","middle").style("transform","rotate(90deg)").text(this.options.data.right.title||"");0<a.length&&this.rightAxisLabel.append("circle").attr("class","dot").style("fill",this.options.data.right.color||"transparent").attr("r",this.options.data.right.titleFontSize&&this.options.data.right.titleFontSize/2||5).attr("cx",-2).attr("cy",this.plotHeight/2-l.node().getBBox().width/2-15)}this.options.data.series.forEach(function(t,e){t.key||(t.key=i.createIdentity()),t.color||(t.color=i.options.colors[e%i.options.colors.length]),i["render".concat(t.type||"bar")](t,e)})}}else;}},{key:"renderarea",value:function(e,t){var s=this,i=function(e,i,t){return d3.area().x(function(t){return s[e](s.parseX(t.x.value))}).y0(function(t){return s[i](0)}).y1(function(t){return s[i](isNaN(t.y.value)?0:t.y.value)}).curve(d3[t||s.options.curveStyle])},n="bottomAxis",o="secondary"===e.axis?"rightAxis":"leftAxis";"horizontal"===this.options.orienation&&(n="secondary"===e.axis?"rightAxis":"leftAxis",o="bottomAxis");var a=this.areaLayer.selectAll(".area_".concat(e.key)).data([e.data]);a.exit().transition(this.transition).style("fill-opacity",1e-6).remove(),a.transition(this.transition).attr("d",function(t){return i(n,o,e.curveStyle)(t)}),a.enter().append("path").attr("d",function(t){return i(n,o,e.curveStyle)(t)}).attr("class","area_".concat(e.key)).attr("id","area_".concat(e.key)).attr("fill",e.color).attr("stroke","transparent").style("fill-opacity",e.opacity||1)}},{key:"renderbar",value:function(e,t){var i="bottomAxis",s="leftAxis",n=this.barLayer.selectAll(".bar_".concat(e.key)).data(e.data);"horizontal"===this.options.orientation&&(i="leftAxis",s="bottomAxis");var o=this[i].bandwidth();function a(t){return"horizontal"===this.options.orientation?o:this[s](t.y.value)}function r(t){return"horizontal"===this.options.orientation?this[s](t.y.value):o}function l(t){return"horizontal"===this.options.orientation?0:this[i](this.parseX(t.x.value))}function c(t){return"horizontal"===this.options.orientation?this[i](this.parseX(t.x.value)):this[s](isNaN(t.y.value)?0:t.y.value)}n.exit().transition(this.transition).style("stroke-opacity",1e-6).remove(),n.attr("width",r.bind(this)).attr("height",a.bind(this)).attr("x",l.bind(this)).attr("y",c.bind(this)).transition(this.transition).attr("fill",e.color),n.enter().append("rect").attr("width",r.bind(this)).attr("height",a.bind(this)).attr("x",l.bind(this)).attr("y",c.bind(this)).transition(this.transition).attr("fill",e.color).attr("class",function(t){return"bar bar_".concat(e.key)})}},{key:"renderline",value:function(e,t){var s=this,i=function(e,i,t){return d3.line().x(function(t){return s[e](s.parseX(t.x.value))}).y(function(t){return s[i](isNaN(t.y.value)?0:t.y.value)}).curve(d3[t||s.options.curveStyle])},n="bottomAxis",o="secondary"===e.axis?"rightAxis":"leftAxis";"horizontal"===this.options.orienation&&(n="secondary"===e.axis?"rightAxis":"leftAxis",o="bottomAxis");var a=this.lineLayer.selectAll(".line_".concat(e.key)).data([e.data]);a.exit().transition(this.transition).style("stroke-opacity",1e-6).remove(),a.style("stroke-width",e.lineWidth||this.options.lineWidth).attr("stroke",e.color).attr("fill","transparent").transition(this.transition).attr("d",function(t){return i(n,o,e.curveStyle)(t)}),a.enter().append("path").attr("d",function(t){return i(n,o,e.curveStyle)(t)}).attr("class","line_".concat(e.key)).attr("id","line_".concat(e.key)).style("stroke-width",e.lineWidth||this.options.lineWidth).attr("stroke",e.color).attr("fill","transparent").transition(this.transition).style("stroke-opacity",1),!0===e.showArea&&this.renderarea(e,t),!0===e.showSymbols&&this.rendersymbol(e,t)}},{key:"rendersymbol",value:function(e,t){var i=this,s=function(t){return d3.symbol().size(t||i.options.symbolSize)},n="bottomAxis",o="secondary"===e.axis?"rightAxis":"leftAxis";"horizontal"===this.options.orienation&&(n="secondary"===e.axis?"rightAxis":"leftAxis",o="bottomAxis");var a=this.symbolLayer.selectAll(".symbol_".concat(e.key)).data(e.data);a.exit().transition(this.transition).style("fill-opacity",1e-6).remove(),a.attr("d",function(t){return s(t.y.size||e.symbolSize)(t)}).transition(this.transition).attr("fill","white").attr("stroke",e.color).attr("transform",function(t){return"translate(".concat(i[n](i.parseX(t.x.value)),", ").concat(i[o](t.y.value),")")}),a.enter().append("path").attr("d",function(t){return s(t.y.size||e.symbolSize)(t)}).transition(this.transition).attr("fill","white").attr("stroke",e.color).attr("class",function(t){return"symbol symbol_".concat(e.key)}).attr("transform",function(t){return"translate(".concat(i[n](i.parseX(t.x.value)),", ").concat(i[o](t.y.value),")")})}},{key:"resize",value:function(){var t=document.getElementById(this.elementId);t&&(this.width=t.clientWidth,this.height=t.clientHeight,this.svg.attr("width",this.width).attr("height",this.height),this.plotWidth=this.width-this.options.margin.left-this.options.margin.right-this.options.margin.axisLeft-this.options.margin.axisRight,this.plotHeight=this.height-this.options.margin.top-this.options.margin.bottom-this.options.margin.axisBottom,this.longestRight=5,this.longestBottom=5,this.options.margin.axisLeft=this.longestLeft*(this.options.data.left&&this.options.data.left.fontSize||this.options.fontSize)*.7,this.options.margin.axisRight=this.longestRight*(this.options.data.right&&this.options.data.right.fontSize||this.options.fontSize)*.7,this.options.margin.axisBottom=(this.options.data.bottom&&this.options.data.bottom.fontSize||this.options.fontSize)+10,this.options.data.bottom.rotate&&(this.options.margin.axisBottom=this.longestBottom*(this.options.data.bottom&&this.options.data.bottom.fontSize||this.options.fontSize)*.4),this.options.axis&&(!0===this.options.axis.hideAll&&(this.options.margin.axisLeft=0,this.options.margin.axisRight=0,this.options.margin.axisBottom=0),!0===this.options.axis.hideLeft&&(this.options.margin.axisLeft=0),!0===this.options.axis.hideRight&&(this.options.margin.axisRight=0),!0===this.options.axis.hideBottom&&(this.options.margin.axisBottom=0)),this.leftAxisLayer.attr("transform","translate(".concat(this.options.margin.left+this.options.margin.axisLeft,", ").concat(this.options.margin.top,")")),this.rightAxisLayer.attr("transform","translate(".concat(this.options.margin.left+this.plotWidth+this.options.margin.axisLeft,", ").concat(this.options.margin.top,")")),this.bottomAxisLayer.attr("transform","translate(".concat(this.options.margin.left+this.options.margin.axisLeft,", ").concat(this.options.margin.top+this.plotHeight,")")),this.plotArea.attr("transform","translate(".concat(this.options.margin.left+this.options.margin.axisLeft,", ").concat(this.options.margin.top,")")),this.areaLayer.attr("transform","translate(".concat(this.options.margin.left+this.options.margin.axisLeft,", ").concat(this.options.margin.top,")")),this.lineLayer.attr("transform","translate(".concat(this.options.margin.left+this.options.margin.axisLeft,", ").concat(this.options.margin.top,")")),this.barLayer.attr("transform","translate(".concat(this.options.margin.left+this.options.margin.axisLeft,", ").concat(this.options.margin.top,")")),this.symbolLayer.attr("transform","translate(".concat(this.options.margin.left+this.options.margin.axisLeft,", ").concat(this.options.margin.top,")")),this.trackingLineLayer.attr("transform","translate(".concat(this.options.margin.left+this.options.margin.axisLeft,", ").concat(this.options.margin.top,")")))}},{key:"data",set:function(t){this.options.data=t,this.render()}}]),n}(),WebsyKPI=function(){function i(t,e){_classCallCheck(this,i);this.elementId=t,this.options=_extends({},{tooltip:{},label:{},value:{},subValue:{}},e)}return _createClass(i,[{key:"render",value:function(t){this.options=_extends({},this.options,t),this.options.label.classes||(this.options.label.classes=[]),this.options.value.classes||(this.options.value.classes=[]),this.options.subValue.classes||(this.options.subValue.classes=[]),this.options.tooltip.classes||(this.options.tooltip.classes=[]),this.resize()}},{key:"resize",value:function(){var t=document.getElementById(this.elementId);if(t){var e='\n <div class="websy-kpi-container">\n ';this.options.icon&&(e+='\n <div class="websy-kpi-icon"><img src="'.concat(this.options.icon,'"></div> \n ')),e+=' \n <div class="websy-kpi-info">\n <div class="websy-kpi-label '.concat(this.options.label.classes.join(" ")||"",'">\n ').concat(this.options.label.value||"","\n "),this.options.tooltip&&this.options.tooltip.value&&(e+='\n <div class="websy-info '.concat(this.options.tooltip.classes.join(" ")||"",'" data-info="').concat(this.options.tooltip.value,'">\n <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 512 512"><title>ionicons-v5-e</title><path d="M256,56C145.72,56,56,145.72,56,256s89.72,200,200,200,200-89.72,200-200S366.28,56,256,56Zm0,82a26,26,0,1,1-26,26A26,26,0,0,1,256,138Zm48,226H216a16,16,0,0,1,0-32h28V244H228a16,16,0,0,1,0-32h32a16,16,0,0,1,16,16V332h28a16,16,0,0,1,0,32Z"/></svg>\n </div> \n ')),e+='\n </div>\n <div class="websy-kpi-value '.concat(this.options.value.classes.join(" ")||"",'">').concat(this.options.value.value,"</div>\n "),this.options.subValue&&(e+='\n <div class="websy-kpi-sub-value '.concat(this.options.subValue.classes.join(" ")||"",'">').concat(this.options.subValue.value,"</div>\n ")),e+=" \n </div>\n </div>\n ",t.innerHTML=e}}}]),i}(),WebsyMap=function(){function n(t,e){_classCallCheck(this,n);if(this.elementId=t,this.options=_extends({},{tileUrl:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",disablePan:!1,disableZoom:!1,markerSize:10,useClustering:!1,maxMarkerSize:50,minMarkerSize:20},e),t){var i={click:this.handleMapClick.bind(this)};!0===this.options.disableZoom&&(i.scrollWheelZoom=!1,i.zoomControl=!1),!0===this.options.disablePan&&(i.dragging=!1);var s=document.getElementById(this.elementId);s&&("undefined"==typeof d3&&console.error("d3 library has not been loaded"),"undefined"==typeof L&&console.error("Leaflet library has not been loaded"),s.addEventListener("click",this.handleClick.bind(this)),this.map=L.map(this.elementId,i),this.render())}else console.log("No element Id provided for Websy Map")}return _createClass(n,[{key:"handleClick",value:function(t){}},{key:"handleMapClick",value:function(t){}},{key:"render",value:function(){var s=this,t=document.getElementById("".concat(this.options.elementId,"_map"));L.tileLayer(this.options.tileUrl,{attribution:'Map data © <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'}).addTo(this.map);if(this.geo&&this.map.removeLayer(this.geo),this.options.geoJSON&&(this.geo=L.geoJSON(this.options.geoJSON,{style:function(t){return{color:t.color||"#ffffff",colorOpacity:t.colorOpacity||1,fillColor:t.fillColor||"#e6463c",fillOpacity:t.fillOpacity||0,weight:t.weight||1}},onEachFeature:function(t,e){e.bindTooltip(t.tooltip,{permanent:!0,direction:"center",className:t.tooltipClass||"websy-polygon-tooltip"})}}).addTo(this.map)),this.markers=[],this.cluster&&this.map.removeLayer(this.cluster),this.data=[],this.data.forEach(function(t){if(0!==t.Latitude.qNum&&0!==t.Longitude.qNum){var e={};!0===s.options.simpleMarker&&(e.icon=L.divIcon({className:"simple-marker"})),s.options.markerUrl&&(e.icon=L.icon({iconUrl:s.options.markerUrl})),e.data=t;var i=L.marker([t.Latitude.qText,t.Longitude.qText],e);i.on("click",s.handleMapClick.bind(s)),!1===s.options.useClustering&&i.addTo(s.map),s.markers.push(i),!0===s.options.useClustering&&s.cluster.addLayer(i)}}),0<this.data.length){t.classList.remove("hidden"),!0===this.options.useClustering&&this.map.addLayer(this.cluster);var e=L.featureGroup(this.markers);this.map.fitBounds(e.getBounds()),this.map.invalidateSize()}else this.options.center&&this.map.setView(this.options.center,this.options.zoom||null)}}]),n}(),WebsyChartTooltip=function(){function e(t){_classCallCheck(this,e),this.svg="string"==typeof t?document.getElementById(t):t,this.tooltipLayer=this.svg.append("g").attr("class","tooltip-layer"),this.tooltipContent=this.tooltipLayer.append("foreignObject").attr("class","websy-chart-tooltip").append("xhtml:div").attr("class","websy-chart-tooltip-content")}return _createClass(e,[{key:"hide",value:function(){this.tooltipContent.classed("active",!1)}},{key:"setHeight",value:function(t){this.tooltipLayer.select("foreignObject").style("height",t)}},{key:"show",value:function(t,e){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{top:0,left:0,width:0,height:0,onLeft:!1},s=this.tooltipLayer.selectAll("foreignObject").attr("width","".concat(i.width,"px")).attr("y","0px").classed("left",i.onLeft);this.tooltipContent.classed("active",!0).style("width","".concat(i.width,"px")).style("top","0px").html("<div class='title'>".concat(t,"</div>").concat(e)),-1===navigator.userAgent.indexOf("Chrome")&&-1!==navigator.userAgent.indexOf("Safari")?(s.attr("x","0px"),this.tooltipContent.style("left","".concat(i.top,"px")).style("top","".concat(i.top,"px"))):(s.attr("x","".concat(i.left,"px")),this.tooltipContent.style("left","0px"))}},{key:"transform",value:function(t,e){this.tooltipLayer.attr("transform","translate(".concat(t,", ").concat(e,")"))}}]),e}(),WebsyDesigns={WebsyPopupDialog:WebsyPopupDialog,WebsyLoadingDialog:WebsyLoadingDialog,WebsyNavigationMenu:WebsyNavigationMenu,WebsyForm:WebsyForm,WebsyDatePicker:WebsyDatePicker,WebsyDropdown:WebsyDropdown,WebsyResultList:WebsyResultList,WebsyPubSub:WebsyPubSub,WebsyTable:WebsyTable,WebsyChart:WebsyChart,WebsyChartTooltip:WebsyChartTooltip,WebsyMap:WebsyMap,WebsyKPI:WebsyKPI,WebsyPDFButton:WebsyPDFButton,PDFButton:WebsyPDFButton,APIService:APIService},GlobalPubSub=new WebsyPubSub("empty",{});function recaptchaReadyCallBack(){GlobalPubSub.publish("recaptchaready")}var rcs=document.createElement("script");rcs.src="//www.google.com/recaptcha/api.js?onload=recaptchaReadyCallBack",document.getElementsByTagName("body")[0].appendChild(rcs);var pps=document.createElement("script");rcs.src="//www.paypal.com/sdk/js",document.getElementsByTagName("body")[0].appendChild(pps);
|
|
1
|
+
"use strict";function _typeof(t){return(_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})(t)}function _toConsumableArray(t){return _arrayWithoutHoles(t)||_iterableToArray(t)||_unsupportedIterableToArray(t)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(t,e){if(t){if("string"==typeof t)return _arrayLikeToArray(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,e):void 0}}function _iterableToArray(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,s=new Array(e);i<e;i++)s[i]=t[i];return s}function _extends(){return(_extends=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(t[s]=i[s])}return t}).apply(this,arguments)}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var i=0;i<e.length;i++){var s=e[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}function _createClass(t,e,i){return e&&_defineProperties(t.prototype,e),i&&_defineProperties(t,i),t}var WebsyPopupDialog=function(){function s(t,e){if(_classCallCheck(this,s),this.options=_extends({},e),t){this.closeOnOutsideClick=!0;var i=document.getElementById(t);this.elementId=t,i.addEventListener("click",this.handleClick.bind(this))}else console.log("No element Id provided for Websy Popup")}return _createClass(s,[{key:"hide",value:function(){document.getElementById(this.elementId).innerHTML=""}},{key:"handleClick",value:function(t){if(t.target.classList.contains("websy-btn")){var e=t.target.getAttribute("data-index"),i=this.options.buttons[e];!0!==i.preventClose&&this.hide(),i.fn&&i.fn(i)}else!0===this.closeOnOutsideClick&&this.hide()}},{key:"render",value:function(){if(this.elementId){var t=document.getElementById(this.elementId),e="";if(!0===this.options.mask&&(e+="<div class='websy-mask'></div>"),e+="\n\t\t\t<div class='websy-popup-dialog-container'>\n\t\t\t\t<div class='websy-popup-dialog'>\n\t\t",this.options.title&&(e+="<h1>".concat(this.options.title,"</h1>")),this.options.message&&(e+="<p>".concat(this.options.message,"</p>")),this.closeOnOutsideClick=!0,this.options.buttons){!0!==this.options.allowCloseOnOutsideClick&&(this.closeOnOutsideClick=!1),e+="<div class='websy-popup-button-panel'>";for(var i=0;i<this.options.buttons.length;i++)e+="\n\t\t\t\t\t<button class='websy-btn ".concat((this.options.buttons[i].classes||[]).join(" "),"' data-index='").concat(i,"'>\n\t\t\t\t\t\t").concat(this.options.buttons[i].label,"\n\t\t\t\t\t</button>\n\t\t\t\t");e+="</div>"}e+="\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t",t.innerHTML=e}else console.log("No element Id provided for Websy Popup")}},{key:"show",value:function(t){t&&(this.options=_extends({},t)),this.render()}}]),s}(),WebsyLoadingDialog=function(){function i(t,e){_classCallCheck(this,i),this.options=_extends({},e),t?this.elementId=t:console.log("No element Id provided")}return _createClass(i,[{key:"hide",value:function(){var t=document.getElementById(this.elementId);t.classList.remove("loading"),t.innerHTML=""}},{key:"render",value:function(){if(this.elementId){var t=document.getElementById(this.elementId),e="\n\t\t\t<div class='websy-loading-container ".concat((this.options.classes||[]).join(" "),"'>\n\t\t\t\t<div class='websy-ripple'>\n\t\t\t\t\t<div></div>\n\t\t\t\t\t<div></div>\n\t\t\t\t</div>\n\t\t\t\t<h4>").concat(this.options.title||"Loading...","</h4>\n\t\t");if(this.options.messages)for(var i=0;i<this.options.messages.length;i++)e+="<p>".concat(this.options.messages[i],"</p>");e+="\n\t\t\t</div>\t\n ",t.classList.add("loading"),t.innerHTML=e}else console.log("No element Id provided for Websy Loading Dialog")}},{key:"show",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1];t&&(this.options=!0===e?_extends({},t):_extends({},this.options,t)),this.render()}}]),i}(),WebsyNavigationMenu=function(){function s(t,e){if(_classCallCheck(this,s),this.options=_extends({},{orientation:"horizontal"},e),t){var i=document.getElementById(t);i&&(this.elementId=t,i.classList.add("websy-".concat(this.options.orientation,"-list-container")),this.options.classes&&this.options.classes.forEach(function(t){return i.classList.add(t)}),i.addEventListener("click",this.handleClick.bind(this)),this.render())}else console.log("No element Id provided for Websy Menu")}return _createClass(s,[{key:"handleClick",value:function(t){(t.target.classList.contains("websy-menu-icon")||"svg"===t.target.nodeName||"rect"===t.target.nodeName)&&this.toggleMobileMenu(),t.target.classList.contains("trigger-item")&&t.target.classList.contains("websy-menu-header")&&this.toggleMobileMenu("remove"),t.target.classList.contains("websy-menu-mask")&&this.toggleMobileMenu()}},{key:"normaliseString",value:function(t){return t.replace(/-/g,"").replace(/\s/g,"_")}},{key:"render",value:function(){var t=document.getElementById(this.elementId);if(t){var e="";this.options.logo&&(e+="\n <div id='".concat(this.elementId,'_menuIcon\' class=\'websy-menu-icon\'>\n <svg viewbox="0 0 40 40" width="40" height="40"> \n <rect x="0" y="0" width="40" height="4" rx="2"></rect>\n <rect x="0" y="12" width="40" height="4" rx="2"></rect>\n <rect x="0" y="24" width="40" height="4" rx="2"></rect>\n </svg>\n </div>\n <div \n class=\'logo ').concat(this.options.logo.classes&&this.options.logo.classes.join(" ")||"","'\n ").concat(this.options.logo.attributes&&this.options.logo.attributes.join(" "),"\n >\n <img src='").concat(this.options.logo.url,"'></img>\n </div>\n <div id='").concat(this.elementId,"_mask' class='websy-menu-mask'></div>\n <div id=\"").concat(this.elementId,'_menuContainer" class="websy-menu-block-container">\n ')),e+=this.renderBlock(this.options.items,"main",1),e+="</div>",t.innerHTML=e,this.options.navigator&&this.options.navigator.registerElements(t)}}},{key:"renderBlock",value:function(t,e,i){var s="\n\t\t <ul class='websy-".concat(this.options.orientation,"-list ").concat("main"!==e?"websy-menu-collapsed":"","' id='").concat(this.elementId,"_").concat(e,"_list'\n\t ");"main"!==e&&(s+=" data-collapsed='".concat("main"!==e?"true":"false","'")),s+=">";for(var n=0;n<t.length;n++){var o=!0===t[n].default?"active":"",a=this.normaliseString(t[n].text);s+="\n\t\t\t<li class='websy-".concat(this.options.orientation,"-list-item'>\n\t\t\t\t<div class='websy-menu-header ").concat(t[n].classes&&t[n].classes.join(" ")," ").concat(""," ").concat(o,"' \n\t\t\t\t\t\t id='").concat(this.elementId,"_").concat(a,"_label' \n\t\t\t\t\t\t data-id='").concat(a,"' \n\t\t\t\t\t\t data-popout-id='").concat(1<i?e:a,"'\n\t\t\t\t\t\t data-text='").concat(t[n].text,"'\n\t\t\t\t\t\t style='padding-left: ").concat(i*this.options.menuHPadding,"px'\n\t\t\t\t\t\t ").concat(t[n].attributes&&t[n].attributes.join(" "),"\n >\n "),"horizontal"===this.options.orientation&&(s+=t[n].text),s+="\n <span class='selected-bar'></span>\n <span class='active-square'></span>\n <span class='".concat(t[n].items&&0<t[n].items.length?"menu-carat":"","'></span>\n "),"vertical"===this.options.orientation&&(s+="\n \n "),s+=" \n\t\t\t\t</div>\n\t\t ",t[n].items&&(s+=this.renderBlock(t[n].items,a,i+1)),e&&"main"!==e&&(this.options.parentMap[a]||(this.options.parentMap[a]=e)),s+="\n\t\t\t</li>\n\t\t"}return s+="</ul>"}},{key:"toggleMobileMenu",value:function(t){void 0===t&&(t="toggle");var e=document.getElementById("".concat(this.elementId));e&&e.classList[t]("open"),this.options.onToggle&&this.options.onToggle(t)}}]),s}(),WebsyForm=function(){function n(t,e){_classCallCheck(this,n);var i={submit:{text:"Save",classes:""},clearAfterSave:!1,fields:[],onSuccess:function(t){},onError:function(t){console.log("Error submitting form data:",t)}};if(GlobalPubSub.subscribe("recaptchaready",this.recaptchaReady.bind(this)),this.recaptchaResult=null,this.options=_extends(i,{},{},e),t){this.apiService=new WebsyDesigns.APIService(""),this.elementId=t;var s=document.getElementById(t);s&&(this.options.classes&&this.options.classes.forEach(function(t){return s.classList.add(t)}),s.addEventListener("click",this.handleClick.bind(this)),s.addEventListener("keyup",this.handleKeyUp.bind(this)),s.addEventListener("keydown",this.handleKeyDown.bind(this)),this.render())}else console.log("No element Id provided")}return _createClass(n,[{key:"checkRecaptcha",value:function(){var t=this;return new Promise(function(e,i){!0===t.options.useRecaptcha?t.recaptchaValue?t.apiService.add("/google/checkrecaptcha",JSON.stringify({grecaptcharesponse:t.recaptchaValue})).then(function(t){t.success&&!0===t.success?e(!0):i(!1)}):i(!1):e(!0)})}},{key:"confirmValidation",value:function(){var t=document.getElementById("".concat(this.elementId,"_validationFail"));t&&(t.innerHTML="")}},{key:"failValidation",value:function(t){var e=document.getElementById("".concat(this.elementId,"_validationFail"));e&&(e.innerHTML=t)}},{key:"handleClick",value:function(t){t.target.classList.contains("submit")&&this.submitForm()}},{key:"handleKeyDown",value:function(t){"enter"===t.key&&this.submitForm()}},{key:"handleKeyUp",value:function(t){}},{key:"processComponents",value:function(t,e){var i=this;0===t.length?e():t.forEach(function(t){if(void 0!==WebsyDesigns[t.component])new WebsyDesigns[t.component]("".concat(i.elementId,"_input_").concat(t.field,"_component"),t.options)})}},{key:"recaptchaReady",value:function(){document.getElementById("".concat(this.elementId,"_recaptcha"))&&grecaptcha.render("".concat(this.elementId,"_recaptcha"),{sitekey:ENVIRONMENT.RECAPTCHA_KEY,callback:this.validateRecaptcha.bind(this)})}},{key:"render",value:function(t,e){var i=this,s=document.getElementById(this.elementId),n=[];if(s){var o='\n <form id="'.concat(this.elementId,'Form">\n ');this.options.fields.forEach(function(t){t.component?(n.push(t),o+="\n ".concat(t.label?'<label for="'.concat(t.field,'">').concat(t.label,"</label>"):"","\n <div id='").concat(i.elementId,"_input_").concat(t.field,"_component' class='form-component'></div>\n ")):"longtext"===t.type?o+="\n ".concat(t.label?'<label for="'.concat(t.field,'">').concat(t.label,"</label>"):"",'\n <textarea\n id="').concat(i.elementId,"_input_").concat(t.field,'"\n ').concat(!0===t.required?"required":"",' \n placeholder="').concat(t.placeholder||"",'"\n name="').concat(t.field,'" \n class="websy-input websy-textarea ').concat(t.classes,'"\n ></textarea>\n '):o+="\n ".concat(t.label?'<label for="'.concat(t.field,'">').concat(t.label,"</label>"):"",'\n <input \n id="').concat(i.elementId,"_input_").concat(t.field,'"\n ').concat(!0===t.required?"required":"",' \n type="').concat(t.type||"text",'" \n class="websy-input ').concat(t.classes,'" \n name="').concat(t.field,'" \n placeholder="').concat(t.placeholder||"",'"\n value="').concat(t.value||"",'"\n oninvalidx="this.setCustomValidity(\'').concat(t.invalidMessage||"Please fill in this field.","')\"\n />\n ")}),o+=' \n </form>\n <div id="'.concat(this.elementId,'_validationFail" class="websy-validation-failure"></div>\n '),!0===this.options.useRecaptcha&&(o+="\n <div id='".concat(this.elementId,"_recaptcha'></div>\n ")),o+='\n <button class="websy-btn submit '.concat(this.options.submit.classes,'">').concat(this.options.submit.text||"Save","</button>\n "),s.innerHTML=o,this.processComponents(n,function(){!0===i.options.useRecaptcha&&"undefined"!=typeof grecaptcha&&i.recaptchaReady()})}}},{key:"submitForm",value:function(){var e=this,s=document.getElementById("".concat(this.elementId,"Form"));!0===s.reportValidity()&&this.checkRecaptcha().then(function(t){if(!0===t){new FormData(s);var i={};new FormData(s).forEach(function(t,e){i[e]=t}),e.options.url?e.apiService.add(e.options.url,i).then(function(t){!0===e.options.clearAfterSave&&s.reset(),e.options.onSuccess.call(e,t)},function(t){console.log("Error submitting form data:",t),e.options.onError.call(e,t)}):e.options.submitFn&&e.options.submitFn(i,function(){!0===e.options.clearAfterSave&&s.reset()})}else console.log("bad recaptcha")})}},{key:"validateRecaptcha",value:function(t){this.recaptchaValue=t}},{key:"data",set:function(i){var s=this;this.options.fields||(this.options.fields=[]);var t=function(e){s.options.fields.forEach(function(t){t.field===e&&(t.value=i[e],document.getElementById("".concat(s.elementId,"_input_").concat(t.field)).value=t.value)})};for(var e in i)t(e);this.render()}}]),n}(),WebsyDatePicker=function(){function o(t,e){_classCallCheck(this,o),this.oneDay=864e5,this.currentselection=[],this.validDates=[];var i={defaultRange:0,minAllowedDate:this.floorDate(new Date(new Date((new Date).setFullYear((new Date).getFullYear()-1)).setDate(1))),maxAllowedDate:this.floorDate(new Date(new Date)),daysOfWeek:["S","M","T","W","T","F","S"],monthMap:{0:"Jan",1:"Feb",2:"Mar",3:"Apr",4:"May",5:"Jun",6:"Jul",7:"Aug",8:"Sep",9:"Oct",10:"Nov",11:"Dec"},ranges:[]};if(i.ranges=[{label:"All Dates",range:[i.minAllowedDate,i.maxAllowedDate]},{label:"Today",range:[this.floorDate(new Date)]},{label:"Yesterday",range:[this.floorDate((new Date).setDate((new Date).getDate()-1))]},{label:"Last 7 Days",range:[this.floorDate((new Date).setDate((new Date).getDate()-6)),this.floorDate(new Date)]},{label:"This Month",range:[this.floorDate((new Date).setDate(1)),this.floorDate(new Date((new Date).setDate(1)).setMonth((new Date).getMonth()+1)-this.oneDay)]},{label:"Last Month",range:[this.floorDate(new Date((new Date).setDate(1)).setMonth((new Date).getMonth()-1)),this.floorDate(new Date((new Date).setDate(1)).setMonth((new Date).getMonth())-this.oneDay)]},{label:"This Year",range:[this.floorDate(new Date("1/1/".concat((new Date).getFullYear()))),this.floorDate(new Date("12/31/".concat((new Date).getFullYear())))]},{label:"Last Year",range:[this.floorDate(new Date("1/1/".concat((new Date).getFullYear()-1))),this.floorDate(new Date("12/31/".concat((new Date).getFullYear()-1)))]}],this.options=_extends({},i,e),this.selectedRange=this.options.defaultRange||0,this.selectedRangeDates=_toConsumableArray(this.options.ranges[this.options.defaultRange||0].range),this.priorSelectedDates=null,t){var s=document.getElementById(t);if(s){this.elementId=t,s.addEventListener("click",this.handleClick.bind(this));var n="\n <div class='websy-date-picker-container'>\n <span class='websy-dropdown-header-label'>".concat(this.options.label||"Date","</span>\n <div class='websy-date-picker-header'>\n <span id='").concat(this.elementId,"_selectedRange'>").concat(this.options.ranges[this.selectedRange].label,'</span>\n <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M23.677 18.52c.914 1.523-.183 3.472-1.967 3.472h-19.414c-1.784 0-2.881-1.949-1.967-3.472l9.709-16.18c.891-1.483 3.041-1.48 3.93 0l9.709 16.18z"/></svg>\n </div>\n <div id=\'').concat(this.elementId,"_mask' class='websy-date-picker-mask'></div>\n <div id='").concat(this.elementId,"_content' class='websy-date-picker-content'>\n <div class='websy-date-picker-ranges'>\n <ul id='").concat(this.elementId,"_rangelist'>\n ").concat(this.renderRanges(),"\n </ul>\n </div>\x3c!--\n --\x3e<div id='").concat(this.elementId,"_datelist' class='websy-date-picker-custom'>").concat(this.renderDates(),"</div>\n <div class='websy-dp-button-container'>\n <button class='websy-btn websy-dp-cancel'>Cancel</button>\n <button class='websy-btn websy-dp-confirm'>Confirm</button>\n </div>\n </div> \n </div>\n ");s.innerHTML=n,this.render()}else console.log("No element found with Id",t)}else console.log("No element Id provided")}return _createClass(o,[{key:"close",value:function(t){var e=document.getElementById("".concat(this.elementId,"_mask")),i=document.getElementById("".concat(this.elementId,"_content"));e.classList.remove("active"),i.classList.remove("active"),!0===t?(this.options.onChange&&this.options.onChange(this.selectedRangeDates),this.updateRange()):(this.selectedRangeDates=_toConsumableArray(this.priorSelectedDates),this.selectedRange=this.priorSelectedRange)}},{key:"floorDate",value:function(t){return"number"==typeof t&&(t=new Date(t)),new Date(t.setHours(0,0,0,0))}},{key:"handleClick",value:function(t){if(t.target.classList.contains("websy-date-picker-header"))this.open();else if(t.target.classList.contains("websy-date-picker-mask"))this.close();else if(t.target.classList.contains("websy-date-picker-range")){if(t.target.classList.contains("websy-disabled-range"))return;var e=t.target.getAttribute("data-index");this.selectRange(e),this.updateRange(e)}else if(t.target.classList.contains("websy-dp-date")){if(t.target.classList.contains("websy-disabled-date"))return;var i=t.target.id.split("_")[0];this.selectDate(+i)}else t.target.classList.contains("websy-dp-confirm")?this.close(!0):t.target.classList.contains("websy-dp-cancel")&&this.close()}},{key:"highlightRange",value:function(){for(var t=document.getElementById("".concat(this.elementId,"_dateList")).querySelectorAll(".websy-dp-date"),e=0;e<t.length;e++)t[e].classList.remove("selected"),t[e].classList.remove("first"),t[e].classList.remove("last");if(0!==this.selectedRange){var i=Math.floor((this.selectedRangeDates[this.selectedRangeDates.length-1].getTime()-this.selectedRangeDates[0].getTime())/this.oneDay);this.selectedRangeDates[0].getMonth()!==this.selectedRangeDates[this.selectedRangeDates.length-1].getMonth()&&(i+=1);for(var s=0;s<i+1;s++){var n=this.floorDate(new Date(this.selectedRangeDates[0].getTime()+s*this.oneDay)),o=document.getElementById("".concat(n.getTime(),"_date"));o&&(o.classList.add("selected"),n.getTime()===this.selectedRangeDates[0].getTime()&&o.classList.add("first"),n.getTime()===this.selectedRangeDates[this.selectedRangeDates.length-1].getTime()&&o.classList.add("last"))}}}},{key:"open",value:function(t){1<arguments.length&&void 0!==arguments[1]&&arguments[1];var e=document.getElementById("".concat(this.elementId,"_mask")),i=document.getElementById("".concat(this.elementId,"_content"));e.classList.add("active"),i.classList.add("active"),this.priorSelectedDates=_toConsumableArray(this.selectedRangeDates),this.priorSelectedRange=this.selectedRange,this.scrollRangeIntoView()}},{key:"render",value:function(t){if(this.elementId){var e=document.getElementById("".concat(this.elementId,"_datelist"));e&&t&&(e.innerHTML=this.renderDates(t));var i=document.getElementById("".concat(this.elementId,"_rangelist"));i&&t&&(i.innerHTML=this.renderRanges()),this.highlightRange()}else console.log("No element Id provided for Websy Loading Dialog")}},{key:"renderDates",value:function(t){var e=[];this.validDates=[],t&&(e=t.map(function(t){return t.getTime()})),this.options.ranges.forEach(function(t){return t.disabled=!0});for(var i=Math.ceil((this.options.maxAllowedDate.getTime()-this.options.minAllowedDate.getTime())/this.oneDay)+1,s={},n=0;n<i;n++){var o=this.floorDate(new Date(this.options.minAllowedDate.getTime()+n*this.oneDay)),a="".concat(this.options.monthMap[o.getMonth()]," ").concat(o.getFullYear());s[a]||(s[a]=[]),-1===e.indexOf(o.getTime())&&this.validDates.push(o.getTime()),s[a].push({date:o,dayOfMonth:o.getDate(),dayOfWeek:o.getDay(),id:o.getTime(),disabled:-1!==e.indexOf(o.getTime())})}for(var r=0;r<this.options.ranges.length;r++){var l=this.options.ranges[r];if(-1!==this.validDates.indexOf(l.range[0].getTime()))l.disabled=!1;else if(l.range[1])if(-1!==this.validDates.indexOf(l.range[1].getTime()))l.disabled=!1;else for(var c=l.range[0].getTime();c<=l.range[1].getTime();c+=this.oneDay){var h=this.floorDate(new Date(c));if(-1!==this.validDates.indexOf(h.getTime())){l.disabled=!1;break}}}var d="";for(var p in d+="\n <ul class='websy-dp-days-header'>\n ",d+=this.options.daysOfWeek.map(function(t){return"<li>".concat(t,"</li>")}).join(""),d+="\n </ul>\n <div id='".concat(this.elementId,"_dateList' class='websy-dp-date-list'>\n "),s){if(d+="\n <div class='websy-dp-month-container'>\n <span id='".concat(p.replace(/\s/g,"_"),"'>").concat(p,"</span>\n <ul>\n "),0<s[p][0].dayOfWeek){for(var u=[],m=0;m<s[p][0].dayOfWeek;m++)u.push("<li> </li>");d+=u.join("")}d+=s[p].map(function(t){return"<li id='".concat(t.id,"_date' class='websy-dp-date ").concat(!0===t.disabled?"websy-disabled-date":"","'>").concat(t.dayOfMonth,"</li>")}).join(""),d+="\n </ul>\n </div>\n "}return d+="</div>"}},{key:"renderRanges",value:function(){var i=this;return this.options.ranges.map(function(t,e){return"\n <li data-index='".concat(e,"' class='websy-date-picker-range ").concat(e===i.selectedRange?"active":""," ").concat(!0===t.disabled?"websy-disabled-range":"","'>").concat(t.label,"</li>\n ")}).join("")}},{key:"scrollRangeIntoView",value:function(){if(this.selectedRangeDates[0]){var t=document.getElementById("".concat(this.selectedRangeDates[0].getTime(),"_date")),e=document.getElementById("".concat(this.elementId,"_dateList"));t&&e&&e.scrollTo(0,t.offsetTop)}}},{key:"selectDate",value:function(t){0===this.currentselection.length?this.currentselection.push(t):t>this.currentselection[0]?this.currentselection.push(t):this.currentselection.splice(0,0,t),this.selectedRangeDates=[new Date(this.currentselection[0]),new Date(this.currentselection[1]||this.currentselection[0])],2===this.currentselection.length&&(this.currentselection=[]),this.selectedRange=-1,this.highlightRange()}},{key:"selectRange",value:function(t){this.options.ranges[t]&&(this.selectedRangeDates=_toConsumableArray(this.options.ranges[t].range),this.selectedRange=+t,this.highlightRange(),this.close(!0))}},{key:"selectCustomRange",value:function(t){this.selectedRange=-1,this.selectedRangeDates=t,this.highlightRange(),this.updateRange()}},{key:"setDateBounds",value:function(t){"All Dates"===this.options.ranges[0].label&&(this.options.ranges[0].range=[t[0],t[1]||t[0]]),this.options.minAllowedDate=t[0],this.options.maxAllowedDate=t[1]||t[0]}},{key:"updateRange",value:function(){var t;if(-1===this.selectedRange){var e=this.selectedRangeDates[0].toLocaleDateString(),i="";this.selectedRangeDates[1]&&this.selectedRangeDates[0].getTime()!==this.selectedRangeDates[1].getTime()&&(i=" - ".concat(this.selectedRangeDates[1].toLocaleDateString())),t={label:"".concat(e).concat(i)}}else t=this.options.ranges[this.selectedRange];for(var s=document.getElementById(this.elementId),n=document.getElementById("".concat(this.elementId,"_selectedRange")),o=s.querySelectorAll(".websy-date-picker-range"),a=0;a<o.length;a++)o[a].classList.remove("active"),a===this.selectedRange&&o[a].classList.add("active");n&&(n.innerHTML=t.label)}}]),o}();Date.prototype.floor=function(){return new Date("".concat(this.getMonth()+1,"/").concat(this.getDate(),"/").concat(this.getFullYear()))};var WebsyDropdown=function(){function s(t,e){_classCallCheck(this,s);if(this.options=_extends({},{multiSelect:!1,multiValueDelimiter:",",allowClear:!0,style:"plain",items:[],label:"",minSearchCharacters:2,showCompleteSelectedList:!1},e),this.tooltipTimeoutFn=null,this.selectedItems=this.options.selectedItems||[],t){var i=document.getElementById(t);i?(this.elementId=t,i.addEventListener("click",this.handleClick.bind(this)),i.addEventListener("keyup",this.handleKeyUp.bind(this)),i.addEventListener("mouseout",this.handleMouseOut.bind(this)),i.addEventListener("mousemove",this.handleMouseMove.bind(this)),this.render()):console.log("No element found with Id",t)}else console.log("No element Id provided")}return _createClass(s,[{key:"clearSelected",value:function(){this.selectedItems=[],this.updateHeader(),this.options.onClearSelected&&this.options.onClearSelected()}},{key:"close",value:function(){var t=document.getElementById("".concat(this.elementId,"_mask")),e=document.getElementById("".concat(this.elementId,"_content"));t.classList.remove("active"),e.classList.remove("active");var i=document.getElementById("".concat(this.elementId,"_search"));i&&(this.options.onCancelSearch&&this.options.onCancelSearch(""),i.value="")}},{key:"handleClick",value:function(t){if(t.target.classList.contains("websy-dropdown-header"))this.open();else if(t.target.classList.contains("websy-dropdown-mask"))this.close();else if(t.target.classList.contains("websy-dropdown-item")){var e=t.target.getAttribute("data-index");this.updateSelected(+e)}else t.target.classList.contains("clear")&&this.clearSelected()}},{key:"handleKeyUp",value:function(t){t.target.classList.contains("websy-dropdown-search")&&(t.target.value.length>=this.options.minSearchCharacters?"Enter"===t.key?this.options.onConfirmSearch&&(this.options.onConfirmSearch(t.target.value),t.target.value=""):"Escape"===t.key?this.options.onCancelSearch&&(this.options.onCancelSearch(t.target.value),t.target.value=""):this.options.onSearch&&this.options.onSearch(t.target.value):this.options.onCancelSearch&&this.options.onCancelSearch(t.target.value))}},{key:"handleMouseMove",value:function(t){this.tooltipTimeoutFn&&(t.target.classList.remove("websy-delayed"),t.target.classList.remove("websy-delayed-info"),t.target.children[1]&&t.target.children[1].classList.remove("websy-delayed-info"),clearTimeout(this.tooltipTimeoutFn)),"LI"===t.target.tagName&&(this.tooltipTimeoutFn=setTimeout(function(){t.target.classList.add("websy-delayed")},500)),t.target.classList.contains("websy-dropdown-header")&&t.target.children[1]&&(this.tooltipTimeoutFn=setTimeout(function(){t.target.children[1].classList.add("websy-delayed-info")},500))}},{key:"handleMouseOut",value:function(t){this.tooltipTimeoutFn&&(t.target.classList.remove("websy-delayed"),t.target.classList.remove("websy-delayed-info"),t.target.children[1]&&t.target.children[1].classList.remove("websy-delayed-info"),clearTimeout(this.tooltipTimeoutFn))}},{key:"open",value:function(t){1<arguments.length&&void 0!==arguments[1]&&arguments[1];var e=document.getElementById("".concat(this.elementId,"_mask")),i=document.getElementById("".concat(this.elementId,"_content"));if(e.classList.add("active"),i.classList.add("active"),!0!==this.options.disableSearch){var s=document.getElementById("".concat(this.elementId,"_search"));s&&s.focus()}}},{key:"render",value:function(){var e=this;if(this.elementId){var t=document.getElementById(this.elementId),i=this.selectedItems.map(function(t){return e.options.items[t].label}).join(this.options.multiValueDelimiter),s="\n <div class='websy-dropdown-container ".concat(!0!==this.options.disableSearch?"with-search":"","'>\n <div id='").concat(this.elementId,"_header' class='websy-dropdown-header ").concat(1===this.selectedItems.length?"one-selected":""," ").concat(!0===this.options.allowClear?"allow-clear":"","'>\n <span id='").concat(this.elementId,"_headerLabel' class='websy-dropdown-header-label'>").concat(this.options.label,"</span>\n <span data-info='").concat(i,"' class='websy-dropdown-header-value' id='").concat(this.elementId,"_selectedItems'>").concat(i,"</span>\n <input class='dropdown-input' id='").concat(this.elementId,"_input' name='").concat(this.options.field||this.options.label,"' value='").concat(i,'\'>\n <svg class=\'arrow\' xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M23.677 18.52c.914 1.523-.183 3.472-1.967 3.472h-19.414c-1.784 0-2.881-1.949-1.967-3.472l9.709-16.18c.891-1.483 3.041-1.48 3.93 0l9.709 16.18z"/></svg>\n ');!0===this.options.allowClear&&(s+='\n <svg class=\'clear\' xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 512 512"><title>ionicons-v5-l</title><line x1="368" y1="368" x2="144" y2="144" style="fill:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><line x1="368" y1="144" x2="144" y2="368" style="fill:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/></svg>\n '),s+=" \n </div>\n <div id='".concat(this.elementId,"_mask' class='websy-dropdown-mask'></div>\n <div id='").concat(this.elementId,"_content' class='websy-dropdown-content'>\n "),!0!==this.options.disableSearch&&(s+="\n <input id='".concat(this.elementId,"_search' class='websy-dropdown-search' placeholder='").concat(this.options.searchPlaceholder||"Search","'>\n ")),s+="\n <div class='websy-dropdown-items'>\n <ul id='".concat(this.elementId,"_items'> \n </ul>\n </div>\x3c!--\n --\x3e<div class='websy-dropdown-custom'></div>\n </div>\n </div>\n "),t.innerHTML=s,this.renderItems()}else console.log("No element Id provided for Websy Dropdown")}},{key:"renderItems",value:function(){var t,i=this,e=this.options.items.map(function(t,e){return"\n <li data-index='".concat(e,"' class='websy-dropdown-item ").concat(-1!==i.selectedItems.indexOf(e)?"active":"","'>").concat(t.label,"</li>\n ")}).join(""),s=document.getElementById("".concat(this.elementId,"_items"));s&&(s.innerHTML=e),1===this.selectedItems.length&&(t=this.options.items[this.selectedItems[0]]),this.updateHeader(t)}},{key:"updateHeader",value:function(t){for(var e=this,i=document.getElementById(this.elementId),s=document.getElementById("".concat(this.elementId,"_header")),n=document.getElementById("".concat(this.elementId,"_headerLabel")),o=document.getElementById("".concat(this.elementId,"_selectedItems")),a=document.getElementById("".concat(this.elementId,"_input")),r=i.querySelectorAll(".websy-dropdown-item"),l=0;l<r.length;l++)r[l].classList.remove("active"),-1!==this.selectedItems.indexOf(l)&&r[l].classList.add("active");if(n&&(n.innerHTML=this.options.label),s&&(s.classList.remove("one-selected"),s.classList.remove("multi-selected"),1===this.selectedItems.length?s.classList.add("one-selected"):1<this.selectedItems.length&&(!0===this.options.showCompleteSelectedList?s.classList.add("one-selected"):s.classList.add("multi-selected"))),o)if(1===this.selectedItems.length)o.innerHTML=t.label,o.setAttribute("data-info",t.label),a.value=t.label;else if(1<this.selectedItems.length)if(!0===this.options.showCompleteSelectedList){var c=this.selectedItems.map(function(t){return e.options.items[t].label}).join(this.options.multiValueDelimiter);o.innerHTML=c,o.setAttribute("data-info",c),a.value=c}else o.innerHTML="".concat(this.selectedItems.length," selected"),o.setAttribute("data-info",""),a.value=this.selectedItems.join(this.options.multiValueDelimiter);else o.innerHTML="",o.setAttribute("data-info",""),a.value=""}},{key:"updateSelected",value:function(t){if(null!=t){if(-1!==this.selectedItems.indexOf(t))return;!1===this.options.multiSelect?this.selectedItems=[t]:this.selectedItems.push(t)}var e=this.options.items[t];this.updateHeader(e),e&&this.options.onItemSelected&&this.options.onItemSelected(e,this.selectedItems,this.options.items),this.close()}},{key:"selections",set:function(t){this.selectedItems=t||[]}},{key:"data",set:function(t){this.options.items=t||[],0===document.getElementById("".concat(this.elementId,"_items")).childElementCount?this.render():(0===this.options.items.length&&(this.options.items=[{label:this.options.noItemsText||"No Items"}]),this.renderItems())},get:function(){return this.options.items}}]),s}(),WebsyResultList=function(){function n(t,e){var i=this;_classCallCheck(this,n);if(this.options=_extends({},{listeners:{click:{}}},e),this.elementId=t,this.rows=[],this.apiService=new WebsyDesigns.APIService("/api"),this.templateService=new WebsyDesigns.APIService(""),t){var s=document.getElementById(t);s&&s.addEventListener("click",this.handleClick.bind(this)),"object"===_typeof(e.template)&&e.template.url?this.templateService.get(e.template.url).then(function(t){i.options.template=t,i.render()}):this.render()}else console.log("No element Id provided for Websy Search List")}return _createClass(n,[{key:"appendData",value:function(t){var e=this.rows.length;this.rows=this.rows.concat(t);var i=this.buildHTML(t,e);document.getElementById(this.elementId).innerHTML+=i.replace(/\n/g,"")}},{key:"buildHTML",value:function(n){var o=this,a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,c="";return this.options.template&&(0<n.length?n.forEach(function(r,e){var l="".concat(0<e?"--\x3e":"").concat(o.options.template).concat(e<n.length-1?"\x3c!--":"");_toConsumableArray(l.matchAll(/<\s*if[^>]*>([\s\S]*?)<\s*\/\s*if>/g)).forEach(function(t){if(t[0]&&-1<t.index){var e=t[0].match(/(\scondition=["|']\w.+)["|']/g);if(e&&e[0]){var i=e[0].trim().replace("condition=","");'"'===i.split("")[0]?i=i.replace(/"/g,""):"'"===i.split("")[0]&&(i=i.replace(/'/g,""));var s=[],n=!0;-1!==i.indexOf("===")?s=i.split("==="):-1!==i.indexOf("!==")?(s=i.split("!=="),n=!1):-1!==i.indexOf("==")?s=i.split("=="):-1!==i.indexOf("!=")&&(s=i.split("!="),n=!1);var o=!0;if(2===s.length&&(isNaN(s[1])||(s[1]=+s[1]),"true"===s[1]&&(s[1]=!0),"false"===s[1]&&(s[1]=!1),"string"==typeof s[1]&&(-1!==s[1].indexOf('"')?s[1]=s[1].replace(/"/g,""):-1!==s[1].indexOf("'")&&(s[1]=s[1].replace(/'/g,""))),!0===n?void 0!==r[s[0]]&&r[s[0]]===s[1]?o=!1:s[0]===s[1]&&(o=!1):!1===n&&void 0!==r[s[0]]&&r[s[0]]!==s[1]&&(o=!1)),!0===o)l=l.replace(t[0],"");else{var a=t[0];a=a.replace("</if>","").replace(/<\s*if[^>]*>/g,""),l=l.replace(t[0],a)}}}});var t=_toConsumableArray(l.matchAll(/(\sdata-event=["|']\w.+)["|']/g));for(var i in t.forEach(function(t){t[0]&&-1<t.index&&(l=l.replace(t[0],"".concat(t[0]," data-id=").concat(a+e)))}),r){var s=new RegExp("{".concat(i,"}"),"gm");l=l.replace(s,r[i])}c+=l}):this.options.noRowsHTML&&(c+=this.options.noRowsHTML)),c}},{key:"findById",value:function(t){for(var e=0;e<this.rows.length;e++)if(this.rows[e].id===t)return this.rows[e];return null}},{key:"handleClick",value:function(t){var e=this;if(t.target.classList.contains("clickable")){var i=t.target.getAttribute("data-event");if(i){i=i.split("(");var s,n=[],o=t.target.getAttribute("data-id");if(i[1]&&(i[1]=i[1].replace(")",""),n=i[1].split(",")),i=i[0],n=n.map(function(t){return"string"!=typeof t&&"number"!=typeof t?e.rows[+o]&&(t=e.rows[+o][t]):"string"==typeof t&&(t=t.replace(/"/g,"").replace(/'/g,"")),t}),t.target.classList.contains("clickable")&&this.options.listeners.click[i])t.stopPropagation(),(s=this.options.listeners.click[i]).call.apply(s,[this,t,this.rows[+o]].concat(_toConsumableArray(n)))}}}},{key:"render",value:function(){var e=this;this.options.entity?this.apiService.get(this.options.entity).then(function(t){e.rows=t.rows,e.resize()}):this.resize()}},{key:"resize",value:function(){var t=this.buildHTML(this.rows);document.getElementById(this.elementId).innerHTML=t.replace(/\n/g,"")}},{key:"data",set:function(t){this.rows=t||[],this.render()},get:function(){return this.rows}}]),n}(),WebsyPubSub=function(){function i(t,e){_classCallCheck(this,i),this.options=_extends({},e),t?(this.elementId=t,this.subscriptions={}):console.log("No element Id provided")}return _createClass(i,[{key:"publish",value:function(t,e){this.subscriptions[t]&&this.subscriptions[t].forEach(function(t){t(e)})}},{key:"subscribe",value:function(t,e){this.subscriptions[t]||(this.subscriptions[t]=[]),this.subscriptions[t].push(e)}}]),i}(),APIService=function(){function e(t){_classCallCheck(this,e),this.baseUrl=t}return _createClass(e,[{key:"add",value:function(t,e){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},s=this.buildUrl(t);return this.run("POST",s,e,i)}},{key:"buildUrl",value:function(t,e,i){return void 0===i&&(i=[]),e&&i.push("id:".concat(e)),"".concat(this.baseUrl,"/").concat(t).concat(0<i.length?"?where=".concat(i.join(";")):"")}},{key:"delete",value:function(t,e){var i=this.buildUrl(t,e);return this.run("DELETE",i)}},{key:"get",value:function(t,e,i){var s=this.buildUrl(t,e,i);return this.run("GET",s)}},{key:"update",value:function(t,e,i){var s=this.buildUrl(t,e);return this.run("PUT",s,i)}},{key:"fetchData",value:function(t,e,i){3<arguments.length&&void 0!==arguments[3]&&arguments[3];return fetch(e,{method:t,mode:"cors",cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer",body:JSON.stringify(i)}).then(function(t){return t.json()})}},{key:"run",value:function(n,o,a){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{},l=4<arguments.length&&void 0!==arguments[4]&&arguments[4];return new Promise(function(e,i){var s=new XMLHttpRequest;if(s.open(n,o),s.setRequestHeader("Content-Type","application/json"),s.responseType="text",r.responseType&&(s.responseType=r.responseType),r.headers)for(var t in r.headers)s.setRequestHeader(t,r.headers[t]);s.withCredentials=!0,console.log("using this"),s.onload=function(){if(401!==s.status&&403!==s.status){var t="text"===s.responseType?s.responseText:s.response;if(""!==t&&"null"!==t)try{t=JSON.parse(t)}catch(t){}else t=[];t.err?i(JSON.stringify(t)):e(!0===l?[t,function(t){t=t.split("\r\n");var e={};return t.forEach(function(t){2===(t=t.split(":")).length&&(e[t[0]]=t[1].trim())}),e}(s.getAllResponseHeaders())]:t)}else ENV&&ENV.AUTH_REDIRECT?window.location=ENV.AUTH_REDIRECT:window.location="/login"},s.onerror=function(){return i(s.statusText)},a?s.send(JSON.stringify(a)):s.send()})}}]),e}(),WebsyPDFButton=function(){function s(t,e){_classCallCheck(this,s);this.elementId=t,this.options=_extends({},{classes:[],wait:0},e),this.service=new WebsyDesigns.APIService("/pdf");var i=document.getElementById(this.elementId);i&&(i.addEventListener("click",this.handleClick.bind(this)),e.html?i.innerHTML=e.html:(i.innerHTML="\n \x3c!--<form style='display: none;' id='".concat(this.elementId,"_form' action='/pdf' method='POST'>\n <input id='").concat(this.elementId,"_pdfHeader' value='' name='header'>\n <input id='").concat(this.elementId,"_pdfHTML' value='' name='html'>\n <input id='").concat(this.elementId,"_pdfFooter' value='' name='footer'>\n </form>--\x3e\n <button class='websy-btn websy-pdf-button ").concat(this.options.classes.join(" "),'\'>\n Create PDF\n <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n viewBox="0 0 184.153 184.153" style="enable-background:new 0 0 184.153 184.153;" xml:space="preserve">\n <g>\n <g>\n <g>\n <path d="M129.318,0H26.06c-1.919,0-3.475,1.554-3.475,3.475v177.203c0,1.92,1.556,3.475,3.475,3.475h132.034\n c1.919,0,3.475-1.554,3.475-3.475V34.131C161.568,22.011,140.771,0,129.318,0z M154.62,177.203H29.535V6.949h99.784\n c7.803,0,25.301,18.798,25.301,27.182V177.203z"/>\n <path d="M71.23,76.441c15.327,0,27.797-12.47,27.797-27.797c0-15.327-12.47-27.797-27.797-27.797\n c-15.327,0-27.797,12.47-27.797,27.797C43.433,63.971,55.902,76.441,71.23,76.441z M71.229,27.797\n c11.497,0,20.848,9.351,20.848,20.847c0,0.888-0.074,1.758-0.183,2.617l-18.071-2.708L62.505,29.735\n C65.162,28.503,68.112,27.797,71.229,27.797z M56.761,33.668l11.951,19.869c0.534,0.889,1.437,1.49,2.462,1.646l18.669,2.799\n c-3.433,6.814-10.477,11.51-18.613,11.51c-11.496,0-20.847-9.351-20.847-20.847C50.381,42.767,52.836,37.461,56.761,33.668z"/>\n <rect x="46.907" y="90.339" width="73.058" height="6.949"/>\n <rect x="46.907" y="107.712" width="48.644" height="6.949"/>\n <rect x="46.907" y="125.085" width="62.542" height="6.949"/>\n </g>\n </g>\n </g>\n <g>\n </g>\n <g>\n </g>\n <g>\n </g>\n <g>\n </g>\n <g>\n </g>\n <g>\n </g>\n <g>\n </g>\n <g>\n </g>\n <g>\n </g>\n <g>\n </g>\n <g>\n </g>\n <g>\n </g>\n <g>\n </g>\n <g>\n </g>\n <g>\n </g>\n </svg>\n </button> \n <div id=\'').concat(this.elementId,"_loader'></div>\n <div id='").concat(this.elementId,"_popup'></div>\n "),this.loader=new WebsyDesigns.WebsyLoadingDialog("".concat(this.elementId,"_loader"),{classes:["global-loader"]}),this.popup=new WebsyDesigns.WebsyPopupDialog("".concat(this.elementId,"_popup"))))}return _createClass(s,[{key:"handleClick",value:function(t){var n=this;t.target.classList.contains("websy-pdf-button")&&(this.loader.show(),setTimeout(function(){if(n.options.targetId){var t=document.getElementById(n.options.targetId);if(t){var e={options:{}};if(n.options.pdfOptions&&(e.options=_extends({},n.options.pdfOptions)),n.options.header)if(n.options.header.elementId){var i=document.getElementById(n.options.header.elementId);i&&(e.header=i.outerHTML,n.options.header.css&&(e.options.headerCSS=n.options.header.css))}else e.header=n.options.header;if(n.options.footer)if(n.options.footer.elementId){var s=document.getElementById(n.options.footer.elementId);s&&(e.footer=s.outerHTML,n.options.footer.css&&(e.options.footerCSS=n.options.footer.css))}else e.footer=n.options.footer;e.html=t.outerHTML,n.service.add("",e,{responseType:"blob"}).then(function(t){n.loader.hide();var e=new Blob([t],{type:"application/pdf"});n.popup.show({message:"\n <div class='text-center websy-pdf-download'>\n <div>Your file is ready to download</div>\n <a href='".concat(URL.createObjectURL(e),"' target='_blank'>\n <button class='websy-btn'>Download</button>\n </a>\n </div>\n "),mask:!0})},function(t){console.error(t)})}}},this.options.wait))}},{key:"render",value:function(){}}]),s}(),WebsyTable=function(){function s(t,e){_classCallCheck(this,s);this.elementId=t,this.options=_extends({},{pageSize:20},e),this.rowCount=0,this.busy=!1,this.tooltipTimeoutFn=null,this.data=[];var i=document.getElementById(this.elementId);i?(i.innerHTML="\n <div id='".concat(this.elementId,'_tableContainer\' class=\'websy-vis-table\'>\n \x3c!--<div class="download-button">\n <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M16 11h5l-9 10-9-10h5v-11h8v11zm1 11h-10v2h10v-2z"/></svg>\n </div>--\x3e\n <table>\n <thead id="').concat(this.elementId,'_head">\n </thead>\n <tbody id="').concat(this.elementId,'_body">\n </tbody>\n </table>\n </div>\n '),i.addEventListener("click",this.handleClick.bind(this)),i.addEventListener("mouseout",this.handleMouseOut.bind(this)),i.addEventListener("mousemove",this.handleMouseMove.bind(this)),document.getElementById("".concat(this.elementId,"_tableContainer")).addEventListener("scroll",this.handleScroll.bind(this)),this.render()):console.error("No element found with ID ".concat(this.elementId))}return _createClass(s,[{key:"appendRows",value:function(t){var s=this,e="";t&&(e+=t.map(function(t,i){return"<tr>"+t.map(function(t,e){if(!1!==s.options.columns[e].show)return!0===s.options.columns[e].showAsLink&&""!==t.value.trim()?"\n <td class='".concat(s.options.columns[e].classes||"","' ").concat(s.options.columns[e].width?'style="width: '+s.options.columns[e].width+'"':"","><a href='").concat(t.value,"' target='").concat(!0===t.openInNewTab?"_blank":"_self","'>").concat(s.options.columns[e].linkText||"Link","</a></td>\n "):!0===s.options.columns[e].showAsNavigatorLink&&""!==t.value.trim()?"\n <td data-view='".concat(t.value,"' data-row-index='").concat(s.rowCount+i,"' data-col-index='").concat(e,"' class='trigger-item ").concat(!0===s.options.columns[e].clickable?"clickable":""," ").concat(s.options.columns[e].classes||"","' ").concat(s.options.columns[e].width?'style="width: '+s.options.columns[e].width+'"':"",">").concat(s.options.columns[e].linkText||"Link","</td>\n "):"\n <td data-info='".concat(t.value,"' class='").concat(s.options.columns[e].classes||"","' ").concat(s.options.columns[e].width?'style="width: '+(s.options.columns[e].width||"auto")+'"':"",">").concat(t.value,"</td>\n ")}).join("")+"</tr>"}).join(""),this.data=this.data.concat(t),this.rowCount=this.data.length),document.getElementById("".concat(this.elementId,"_body")).innerHTML+=e}},{key:"buildSearchIcon",value:function(t){return'\n <div>\n <svg\n class="tableSearchIcon"\n data-field="'.concat(t,'"\n xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"\n >\n <path d="M0 0h24v24H0z" fill="none"/>\n <path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/>\n </svg>\n </div>\n ')}},{key:"handleClick",value:function(t){if(t.target.classList.contains("download-button")&&window.viewManager.dataExportController.exportData(this.options.model),t.target.classList.contains("sortable-column")){var e=+t.target.getAttribute("data-index"),i=this.options.columns[e];this.options.onSort?this.options.onSort(t,i,e):this.internalSort(i,e)}else if(t.target.classList.contains("tableSearchIcon")){var s=t.target.getAttribute("data-field");window.viewManager.views.global.objects[1].instance.show(s,{x:t.pageX,y:t.pageY},function(){t.target.classList.remove("active")})}else if(t.target.classList.contains("clickable")){var n=+t.target.getAttribute("data-col-index"),o=+t.target.getAttribute("data-row-index");this.options.onClick&&this.options.onClick(t,this.data[o][n],this.data[o],this.options.columns[n])}}},{key:"handleMouseMove",value:function(t){this.tooltipTimeoutFn&&(t.target.classList.remove("websy-delayed-info"),clearTimeout(this.tooltipTimeoutFn)),"TD"===t.target.tagName&&(this.tooltipTimeoutFn=setTimeout(function(){t.target.classList.add("websy-delayed-info")},500))}},{key:"handleMouseOut",value:function(t){this.tooltipTimeoutFn&&(t.target.classList.remove("websy-delayed-info"),clearTimeout(this.tooltipTimeoutFn))}},{key:"handleScroll",value:function(t){this.options.onScroll&&this.options.onScroll(t)}},{key:"internalSort",value:function(t,i){if(this.options.columns.forEach(function(t,e){t.activeSort=e===i}),t.sortFunction)this.data=t.sortFunction(this.data,t);else{var s="value",n="asc"===t.sort?"desc":"asc";t.sort=n;var o=t.sortType||"alphanumeric";t.sortProp&&(s=t.sortProp),this.data.sort(function(t,e){switch(o){case"numeric":return"asc"===n?t[i][s]-e[i][s]:e[i][s]-t[i][s];default:return"asc"===n?t[i][s]>e[i][s]?1:-1:t[i][s]<e[i][s]?1:-1}})}this.render(this.data)}},{key:"render",value:function(t){var i=this;if(this.options.columns){if(this.data=[],this.rowCount=0,!(document.getElementById("".concat(this.elementId,"_body")).innerHTML="")===this.options.allowDownload){var e=document.getElementById(this.elementId);e?e.classList.add("allow-download"):e.classList.remove("allow-download")}var s="<tr>"+this.options.columns.map(function(t,e){if(!1!==t.show)return"\n <th ".concat(t.width?'style="width: '+(t.width||"auto")+';"':"",'>\n <div class ="tableHeader">\n <div class="leftSection">\n <div\n class="tableHeaderField ').concat(-1!==["asc","desc"].indexOf(t.sort)?"sortable-column":"",'"\n data-index="').concat(e,'" \n data-sort="').concat(t.sort,'" \n >\n ').concat(t.name,'\n </div>\n </div>\n <div class="').concat(t.activeSort?t.sort+" sortOrder":"",'"></div>\n \x3c!--').concat(!0===t.searchable?i.buildSearchIcon(t.qGroupFieldDefs[0]):"","--\x3e\n </div>\n </th>\n ")}).join("")+"</tr>";document.getElementById("".concat(this.elementId,"_head")).innerHTML=s,t&&this.appendRows(t)}}}]),s}(),WebsyChart=function(){function n(t,e){_classCallCheck(this,n);var i={margin:{top:3,left:3,bottom:3,right:3,axisBottom:0,axisLeft:0,axisRight:0,axisTop:0},orientation:"vertical",colors:d3.schemeCategory10,transitionDuration:650,curveStyle:"curveLinear",lineWidth:2,forceZero:!0,fontSize:14,symbolSize:20,dateFormat:"%b/%m/%Y",showTrackingLine:!0,showTooltip:!0,tooltipWidth:200};if(this.elementId=t,this.options=_extends({},i,e),this.leftAxis=null,this.rightAxis=null,this.topAxis=null,this.bottomAxis=null,t){var s=document.getElementById(this.elementId);s?(s.classList.add("websy-chart"),"undefined"==typeof d3?console.error("d3 library has not been loaded"):(s.innerHTML="",this.svg=d3.select(s).append("svg"),this.prep())):console.error("No element found with ID ".concat(this.elementId))}else console.log("No element Id provided for Websy Chart")}return _createClass(n,[{key:"createDomain",value:function(t){var e=[];if(void 0!==this.options.data[t].min&&void 0!==this.options.data[t].max&&(e=[this.options.data[t].min,this.options.data[t].max],!0===this.options.forceZero&&(e=[Math.min(0,this.options.data[t].min),this.options.data[t].max])),this.options.data[t].data&&(e=this.options.data[t].data.map(function(t){return t.value})),"Time"===this.options.data[t].scale){var i=this.options.data[t].data[0].value,s=this.options.data[t].data[this.options.data[t].data.length-1].value;e=[i=this.parseX(i),s=this.parseX(s)]}return e}},{key:"createIdentity",value:function(){for(var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:10,e="",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",s=0;s<t;s++)e+=i.charAt(Math.floor(Math.random()*i.length));return e}},{key:"handleEventMouseOut",value:function(t,e){this.trackingLineLayer.select(".tracking-line").attr("stroke-opacity",0),this.tooltip.hide()}},{key:"handleEventMouseMove",value:function(r,t){var l=this,c=d3.bisector(function(t){return l.parseX(t.x.value)}).left;if(!0===this.options.showTrackingLine&&d3.pointer(r)){var h,d=d3.pointer(r)[0],e="",p="",u=[];if(this.bottomAxis.invert){d=this.bottomAxis.invert(d),this.options.data.series.forEach(function(t){var e=c(t.data,d,1),i=t.data[e-1],s=t.data[e];if(i&&(h=l.bottomAxis(l.parseX(i.x.value)),p=i.x.value,void 0!==i.x.value.getTime&&(p=d3.timeFormat(l.options.dateFormat)(i.x.value))),i&&s){var n=l.bottomAxis(l.parseX(i.x.value)),o=l.bottomAxis(l.parseX(s.x.value)),a=Math.abs(n-o)/2;d3.pointer(r)[0]-n>=a?(h=o,p=s.x.value,void 0!==s.x.value.getTime&&(p=d3.timeFormat(l.options.dateFormat)(s.x.value)),u.push(s.y)):(h=n,u.push(i.y))}}),e=" \n <ul>\n ",e+=u.map(function(t){return"\n <li>\n <i style='background-color: ".concat(t.color,";'></i>\n ").concat(t.tooltipLabel||"","<span>").concat(t.tooltipValue||t.value,"</span>\n </li>\n ")}).join(""),e+="</ul>";var i={width:this.options.tooltipWidth,left:0,top:0,onLeft:h>this.plotWidth/2};h>this.plotWidth/2?i.left=h-this.options.tooltipWidth-15:i.left=h+this.options.margin.left+this.options.margin.axisLeft+15,i.top=this.options.margin.top+this.options.margin.axisTop,this.tooltip.show(p,e,i)}else h=d;this.trackingLineLayer.select(".tracking-line").attr("x1",h).attr("x2",h).attr("y1",0).attr("y2",this.plotHeight).attr("stroke-width",1).attr("stroke-dasharray","4 2").attr("stroke","#cccccc").attr("stroke-opacity",1)}}},{key:"prep",value:function(){this.leftAxisLayer=this.svg.append("g"),this.rightAxisLayer=this.svg.append("g"),this.bottomAxisLayer=this.svg.append("g"),this.leftAxisLabel=this.svg.append("g"),this.rightAxisLabel=this.svg.append("g"),this.bottomAxisLabel=this.svg.append("g"),this.plotArea=this.svg.append("g"),this.areaLayer=this.svg.append("g"),this.lineLayer=this.svg.append("g"),this.barLayer=this.svg.append("g"),this.symbolLayer=this.svg.append("g"),this.trackingLineLayer=this.svg.append("g"),this.trackingLineLayer.append("line").attr("class","tracking-line"),this.tooltip=new WebsyDesigns.WebsyChartTooltip(this.svg),this.eventLayer=this.svg.append("g").append("rect"),this.eventLayer.on("mouseout",this.handleEventMouseOut.bind(this)).on("mousemove",this.handleEventMouseMove.bind(this)),this.render()}},{key:"render",value:function(t){var i=this;if(void 0!==t&&(this.options=_extends({},this.options,t)),this.options.data){this.transition=d3.transition().duration(this.options.transitionDuration),this.options.data.bottom.scale&&"Time"===this.options.data.bottom.scale?this.parseX=function(t){if(void 0!==t.getTime)return t;d3.timeParse(this.options.timeParseFormat)(t)}:this.parseX=function(t){return t},!0===this.options.disableTransitions&&(this.transition=d3.transition().duration(0)),this.options.data.left||(this.options.data.left={data:[]}),this.options.data.right||(this.options.data.right={data:[]}),this.options.data.bottom||(this.options.data.bottom={data:[]}),"vertical"===this.options.orientation?(this.leftAxisLayer.attr("class","y-axis"),this.rightAxisLayer.attr("class","y-axis"),this.bottomAxisLayer.attr("class","x-axis")):(this.leftAxisLayer.attr("class","x-axis"),this.rightAxisLayer.attr("class","x-axis"),this.bottomAxisLayer.attr("class","y-axis"));var e=document.getElementById(this.elementId);if(e){this.width=e.clientWidth,this.height=e.clientHeight,this.svg.attr("width",this.width).attr("height",this.height),this.longestLeft=0,this.longestRight=0,this.longestBottom=0,this.options.data.bottom&&this.options.data.bottom.data&&void 0===this.options.data.bottom.max&&(this.options.data.bottom.max=this.options.data.bottom.data.reduce(function(t,e){return t.length>e.value.length?t:e.value},""),this.options.data.bottom.min=this.options.data.bottom.data.reduce(function(t,e){return t.length<e.value.length?t:e.value},this.options.data.bottom.max)),this.options.data.bottom&&void 0!==this.options.data.bottom.max&&(this.longestBottom=this.options.data.bottom.max.toString().length,this.options.data.bottom.formatter&&(this.longestBottom=this.options.data.bottom.formatter(this.options.data.bottom.max).toString().length)),this.options.data.left&&this.options.data.left.data&&"undefined"===this.options.data.left.max&&(this.options.data.left.min=d3.min(this.options.data.left.data),this.options.data.left.max=d3.max(this.options.data.left.data)),!this.options.data.left.max&&this.options.data.left.data&&(this.options.data.left.max=this.options.data.left.data.reduce(function(t,e){return t.length>e.value.length?t:e.value},"")),!this.options.data.left.min&&this.options.data.left.data&&(this.options.data.left.min=this.options.data.left.data.reduce(function(t,e){return t.length<e.value.length?t:e.value},this.options.data.left.max)),this.options.data.left&&void 0!==this.options.data.left.max&&(this.longestLeft=this.options.data.left.max.toString().length,this.options.data.left.formatter&&(this.longestLeft=this.options.data.left.formatter(this.options.data.left.max).toString().length)),this.options.data.right&&this.options.data.right.data&&"undefined"===this.options.data.right.max&&(this.options.data.right.min=d3.min(this.options.data.right.data),this.options.data.right.max=d3.max(this.options.data.right.data)),this.options.data.right&&void 0!==this.options.data.right.max&&(this.longestRight=this.options.data.right.max.toString().length,this.options.data.right.formatter&&(this.longestRight=this.options.data.right.formatter(this.options.data.right.max).toString().length)),this.options.margin.axisLeft=this.longestLeft*(this.options.data.left&&this.options.data.left.fontSize||this.options.fontSize)*.7,this.options.margin.axisRight=this.longestRight*(this.options.data.right&&this.options.data.right.fontSize||this.options.fontSize)*.7,this.options.margin.axisBottom=(this.options.data.bottom&&this.options.data.bottom.fontSize||this.options.fontSize)+10,this.options.margin.axisTop=0,this.options.data.left&&!0===this.options.data.left.showTitle&&(1===this.options.data.left.titlePosition?this.options.margin.axisLeft+=(this.options.data.left.titleFontSize||10)+10:this.options.margin.axisTop+=(this.options.data.left.titleFontSize||10)+10),this.options.data.right&&!0===this.options.data.right.showTitle&&(1===this.options.data.right.titlePosition?this.options.margin.axisRight+=(this.options.data.right.titleFontSize||10)+10:0===this.options.margin.axisTop&&(this.options.margin.axisTop+=(this.options.data.right.titleFontSize||10)+10)),this.options.data.bottom.rotate&&(this.options.margin.axisBottom=this.longestBottom*(this.options.data.bottom&&this.options.data.bottom.fontSize||this.options.fontSize)*.4),this.options.axis&&(!0===this.options.axis.hideAll&&(this.options.margin.axisLeft=0,this.options.margin.axisRight=0,this.options.margin.axisBottom=0),!0===this.options.axis.hideLeft&&(this.options.margin.axisLeft=0),!0===this.options.axis.hideRight&&(this.options.margin.axisRight=0),!0===this.options.axis.hideBottom&&(this.options.margin.axisBottom=0)),this.plotWidth=this.width-this.options.margin.left-this.options.margin.right-this.options.margin.axisLeft-this.options.margin.axisRight,this.plotHeight=this.height-this.options.margin.top-this.options.margin.bottom-this.options.margin.axisBottom-this.options.margin.axisTop,this.leftAxisLayer.attr("transform","translate(".concat(this.options.margin.left+this.options.margin.axisLeft,", ").concat(this.options.margin.top+this.options.margin.axisTop,")")),this.rightAxisLayer.attr("transform","translate(".concat(this.options.margin.left+this.plotWidth+this.options.margin.axisLeft,", ").concat(this.options.margin.top+this.options.margin.axisTop,")")),this.bottomAxisLayer.attr("transform","translate(".concat(this.options.margin.left+this.options.margin.axisLeft,", ").concat(this.options.margin.top+this.options.margin.axisTop+this.plotHeight,")")),this.leftAxisLabel.attr("transform","translate(".concat(this.options.margin.left,", ").concat(this.options.margin.top+this.options.margin.axisTop,")")),this.rightAxisLabel.attr("transform","translate(".concat(this.options.margin.left+this.plotWidth+this.options.margin.axisLeft+this.options.margin.axisRight,", ").concat(this.options.margin.top+this.options.margin.axisTop,")")),this.bottomAxisLabel.attr("transform","translate(".concat(this.options.margin.left+this.options.margin.axisLeft,", ").concat(this.options.margin.top+this.options.margin.axisTop+this.plotHeight,")")),this.plotArea.attr("transform","translate(".concat(this.options.margin.left+this.options.margin.axisLeft,", ").concat(this.options.margin.top+this.options.margin.axisTop,")")),this.areaLayer.attr("transform","translate(".concat(this.options.margin.left+this.options.margin.axisLeft,", ").concat(this.options.margin.top+this.options.margin.axisTop,")")),this.lineLayer.attr("transform","translate(".concat(this.options.margin.left+this.options.margin.axisLeft,", ").concat(this.options.margin.top+this.options.margin.axisTop,")")),this.barLayer.attr("transform","translate(".concat(this.options.margin.left+this.options.margin.axisLeft,", ").concat(this.options.margin.top+this.options.margin.axisTop,")")),this.symbolLayer.attr("transform","translate(".concat(this.options.margin.left+this.options.margin.axisLeft,", ").concat(this.options.margin.top+this.options.margin.axisTop,")")),this.trackingLineLayer.attr("transform","translate(".concat(this.options.margin.left+this.options.margin.axisLeft,", ").concat(this.options.margin.top+this.options.margin.axisTop,")")),this.eventLayer.attr("transform","translate(".concat(this.options.margin.left+this.options.margin.axisLeft,", ").concat(this.options.margin.top+this.options.margin.axisTop,")"));this.eventLayer.attr("x",0).attr("y",0).attr("width",this.plotWidth).attr("height",this.plotHeight).attr("fill-opacity","0");var s=this.createDomain("bottom");if(this.bottomAxis=d3["scale".concat(this.options.data.bottom.scale||"Band")]().domain(s).range([0,this.plotWidth]),this.bottomAxis.nice&&this.bottomAxis.nice(),this.bottomAxis.padding&&this.options.data.bottom.padding&&this.bottomAxis.padding(this.options.data.bottom.padding||0),0<this.options.margin.axisBottom){var n=d3.axisBottom(this.bottomAxis).ticks(this.options.data.bottom.ticks||5);this.options.data.bottom.formatter&&n.tickFormat(function(t){return i.options.data.bottom.formatter(t)}),this.bottomAxisLayer.call(n),this.options.data.bottom.rotate&&this.bottomAxisLayer.selectAll("text").attr("transform","rotate(".concat(this.options.data.bottom.rotate,")")).style("text-anchor","end")}var o=this.createDomain("left"),a=this.createDomain("right");if(this.leftAxis=d3["scale".concat(this.options.data.left.scale||"Linear")]().domain(o).range([this.plotHeight,0]),this.leftAxis.padding&&this.options.data.left.padding&&this.leftAxis.padding(this.options.data.left.padding||0),this.leftAxis.nice&&this.leftAxis.nice(),0<this.options.margin.axisLeft&&this.leftAxisLayer.call(d3.axisLeft(this.leftAxis).ticks(this.options.data.left.ticks||5).tickFormat(function(t){return i.options.data.left.formatter&&(t=i.options.data.left.formatter(t)),t})),this.options.data.left&&!0===this.options.data.left.showTitle)if(this.leftAxisLabel.selectAll(".title").remove(),this.leftAxisLabel.selectAll(".dot").remove(),1===this.options.data.left.titlePosition){var r=this.leftAxisLabel.append("text").attr("class","title").attr("x",1-this.plotHeight/2).attr("y",5).attr("font-size",this.options.data.left.titleFontSize||10).attr("fill",this.options.data.left.titleColor||"#888888").attr("text-anchor","middle").style("transform","rotate(-90deg)").text(this.options.data.left.title||"");0<a.length&&this.leftAxisLabel.append("circle").attr("class","dot").style("fill",this.options.data.left.color||"transparent").attr("r",this.options.data.left.titleFontSize&&this.options.data.left.titleFontSize/2||5).attr("cx",3).attr("cy",this.plotHeight/2-r.node().getBBox().width/2-15)}else this.leftAxisLabel.append("text").attr("class","title").attr("x",0).attr("y",5).attr("font-size",this.options.data.left.titleFontSize||10).attr("fill",this.options.data.left.titleColor||"#888888").attr("text-anchor","left").text(this.options.data.left.title||"");if(0<a.length&&(this.rightAxis=d3["scale".concat(this.options.data.right.scale||"Linear")]().domain(a).range([this.plotHeight,0]),this.rightAxis.nice&&this.rightAxis.nice(),0<this.options.margin.axisRight&&this.rightAxisLayer.call(d3.axisRight(this.rightAxis).ticks(this.options.data.left.ticks||5).tickFormat(function(t){return i.options.data.right.formatter&&(t=i.options.data.right.formatter(t)),t}))),this.options.data.right&&!0===this.options.data.right.showTitle&&(this.rightAxisLabel.selectAll(".title").remove(),1===this.options.data.right.titlePosition)){var l=this.rightAxisLabel.append("text").attr("class","title").attr("x",this.plotHeight/2).attr("y",5).attr("font-size",this.options.data.right.titleFontSize||10).attr("fill",this.options.data.right.titleColor||"#888888").attr("text-anchor","middle").style("transform","rotate(90deg)").text(this.options.data.right.title||"");0<a.length&&this.rightAxisLabel.append("circle").attr("class","dot").style("fill",this.options.data.right.color||"transparent").attr("r",this.options.data.right.titleFontSize&&this.options.data.right.titleFontSize/2||5).attr("cx",-2).attr("cy",this.plotHeight/2-l.node().getBBox().width/2-15)}this.options.data.series.forEach(function(t,e){t.key||(t.key=i.createIdentity()),t.color||(t.color=i.options.colors[e%i.options.colors.length]),i["render".concat(t.type||"bar")](t,e)})}}else;}},{key:"renderarea",value:function(e,t){var s=this,i=function(e,i,t){return d3.area().x(function(t){return s[e](s.parseX(t.x.value))}).y0(function(t){return s[i](0)}).y1(function(t){return s[i](isNaN(t.y.value)?0:t.y.value)}).curve(d3[t||s.options.curveStyle])},n="bottomAxis",o="secondary"===e.axis?"rightAxis":"leftAxis";"horizontal"===this.options.orienation&&(n="secondary"===e.axis?"rightAxis":"leftAxis",o="bottomAxis");var a=this.areaLayer.selectAll(".area_".concat(e.key)).data([e.data]);a.exit().transition(this.transition).style("fill-opacity",1e-6).remove(),a.transition(this.transition).attr("d",function(t){return i(n,o,e.curveStyle)(t)}),a.enter().append("path").attr("d",function(t){return i(n,o,e.curveStyle)(t)}).attr("class","area_".concat(e.key)).attr("id","area_".concat(e.key)).attr("fill",e.color).attr("stroke","transparent").style("fill-opacity",e.opacity||1)}},{key:"renderbar",value:function(e,t){var i="bottomAxis",s="leftAxis",n=this.barLayer.selectAll(".bar_".concat(e.key)).data(e.data);"horizontal"===this.options.orientation&&(i="leftAxis",s="bottomAxis");var o=this[i].bandwidth();function a(t){return"horizontal"===this.options.orientation?o:this[s](t.y.value)}function r(t){return"horizontal"===this.options.orientation?this[s](t.y.value):o}function l(t){return"horizontal"===this.options.orientation?0:this[i](this.parseX(t.x.value))}function c(t){return"horizontal"===this.options.orientation?this[i](this.parseX(t.x.value)):this[s](isNaN(t.y.value)?0:t.y.value)}n.exit().transition(this.transition).style("stroke-opacity",1e-6).remove(),n.attr("width",r.bind(this)).attr("height",a.bind(this)).attr("x",l.bind(this)).attr("y",c.bind(this)).transition(this.transition).attr("fill",e.color),n.enter().append("rect").attr("width",r.bind(this)).attr("height",a.bind(this)).attr("x",l.bind(this)).attr("y",c.bind(this)).transition(this.transition).attr("fill",e.color).attr("class",function(t){return"bar bar_".concat(e.key)})}},{key:"renderline",value:function(e,t){var s=this,i=function(e,i,t){return d3.line().x(function(t){return s[e](s.parseX(t.x.value))}).y(function(t){return s[i](isNaN(t.y.value)?0:t.y.value)}).curve(d3[t||s.options.curveStyle])},n="bottomAxis",o="secondary"===e.axis?"rightAxis":"leftAxis";"horizontal"===this.options.orienation&&(n="secondary"===e.axis?"rightAxis":"leftAxis",o="bottomAxis");var a=this.lineLayer.selectAll(".line_".concat(e.key)).data([e.data]);a.exit().transition(this.transition).style("stroke-opacity",1e-6).remove(),a.style("stroke-width",e.lineWidth||this.options.lineWidth).attr("stroke",e.color).attr("fill","transparent").transition(this.transition).attr("d",function(t){return i(n,o,e.curveStyle)(t)}),a.enter().append("path").attr("d",function(t){return i(n,o,e.curveStyle)(t)}).attr("class","line_".concat(e.key)).attr("id","line_".concat(e.key)).style("stroke-width",e.lineWidth||this.options.lineWidth).attr("stroke",e.color).attr("fill","transparent").transition(this.transition).style("stroke-opacity",1),!0===e.showArea&&this.renderarea(e,t),!0===e.showSymbols&&this.rendersymbol(e,t)}},{key:"rendersymbol",value:function(e,t){var i=this,s=function(t){return d3.symbol().size(t||i.options.symbolSize)},n="bottomAxis",o="secondary"===e.axis?"rightAxis":"leftAxis";"horizontal"===this.options.orienation&&(n="secondary"===e.axis?"rightAxis":"leftAxis",o="bottomAxis");var a=this.symbolLayer.selectAll(".symbol_".concat(e.key)).data(e.data);a.exit().transition(this.transition).style("fill-opacity",1e-6).remove(),a.attr("d",function(t){return s(t.y.size||e.symbolSize)(t)}).transition(this.transition).attr("fill","white").attr("stroke",e.color).attr("transform",function(t){return"translate(".concat(i[n](i.parseX(t.x.value)),", ").concat(i[o](t.y.value),")")}),a.enter().append("path").attr("d",function(t){return s(t.y.size||e.symbolSize)(t)}).transition(this.transition).attr("fill","white").attr("stroke",e.color).attr("class",function(t){return"symbol symbol_".concat(e.key)}).attr("transform",function(t){return"translate(".concat(i[n](i.parseX(t.x.value)),", ").concat(i[o](t.y.value),")")})}},{key:"resize",value:function(){var t=document.getElementById(this.elementId);t&&(this.width=t.clientWidth,this.height=t.clientHeight,this.svg.attr("width",this.width).attr("height",this.height),this.plotWidth=this.width-this.options.margin.left-this.options.margin.right-this.options.margin.axisLeft-this.options.margin.axisRight,this.plotHeight=this.height-this.options.margin.top-this.options.margin.bottom-this.options.margin.axisBottom,this.longestRight=5,this.longestBottom=5,this.options.margin.axisLeft=this.longestLeft*(this.options.data.left&&this.options.data.left.fontSize||this.options.fontSize)*.7,this.options.margin.axisRight=this.longestRight*(this.options.data.right&&this.options.data.right.fontSize||this.options.fontSize)*.7,this.options.margin.axisBottom=(this.options.data.bottom&&this.options.data.bottom.fontSize||this.options.fontSize)+10,this.options.data.bottom.rotate&&(this.options.margin.axisBottom=this.longestBottom*(this.options.data.bottom&&this.options.data.bottom.fontSize||this.options.fontSize)*.4),this.options.axis&&(!0===this.options.axis.hideAll&&(this.options.margin.axisLeft=0,this.options.margin.axisRight=0,this.options.margin.axisBottom=0),!0===this.options.axis.hideLeft&&(this.options.margin.axisLeft=0),!0===this.options.axis.hideRight&&(this.options.margin.axisRight=0),!0===this.options.axis.hideBottom&&(this.options.margin.axisBottom=0)),this.leftAxisLayer.attr("transform","translate(".concat(this.options.margin.left+this.options.margin.axisLeft,", ").concat(this.options.margin.top,")")),this.rightAxisLayer.attr("transform","translate(".concat(this.options.margin.left+this.plotWidth+this.options.margin.axisLeft,", ").concat(this.options.margin.top,")")),this.bottomAxisLayer.attr("transform","translate(".concat(this.options.margin.left+this.options.margin.axisLeft,", ").concat(this.options.margin.top+this.plotHeight,")")),this.plotArea.attr("transform","translate(".concat(this.options.margin.left+this.options.margin.axisLeft,", ").concat(this.options.margin.top,")")),this.areaLayer.attr("transform","translate(".concat(this.options.margin.left+this.options.margin.axisLeft,", ").concat(this.options.margin.top,")")),this.lineLayer.attr("transform","translate(".concat(this.options.margin.left+this.options.margin.axisLeft,", ").concat(this.options.margin.top,")")),this.barLayer.attr("transform","translate(".concat(this.options.margin.left+this.options.margin.axisLeft,", ").concat(this.options.margin.top,")")),this.symbolLayer.attr("transform","translate(".concat(this.options.margin.left+this.options.margin.axisLeft,", ").concat(this.options.margin.top,")")),this.trackingLineLayer.attr("transform","translate(".concat(this.options.margin.left+this.options.margin.axisLeft,", ").concat(this.options.margin.top,")")))}},{key:"data",set:function(t){this.options.data=t,this.render()}}]),n}(),WebsyKPI=function(){function i(t,e){_classCallCheck(this,i);this.elementId=t,this.options=_extends({},{tooltip:{},label:{},value:{},subValue:{}},e)}return _createClass(i,[{key:"render",value:function(t){this.options=_extends({},this.options,t),this.options.label.classes||(this.options.label.classes=[]),this.options.value.classes||(this.options.value.classes=[]),this.options.subValue.classes||(this.options.subValue.classes=[]),this.options.tooltip.classes||(this.options.tooltip.classes=[]),this.resize()}},{key:"resize",value:function(){var t=document.getElementById(this.elementId);if(t){var e='\n <div class="websy-kpi-container">\n ';this.options.icon&&(e+='\n <div class="websy-kpi-icon"><img src="'.concat(this.options.icon,'"></div> \n ')),e+=' \n <div class="websy-kpi-info">\n <div class="websy-kpi-label '.concat(this.options.label.classes.join(" ")||"",'">\n ').concat(this.options.label.value||"","\n "),this.options.tooltip&&this.options.tooltip.value&&(e+='\n <div class="websy-info '.concat(this.options.tooltip.classes.join(" ")||"",'" data-info="').concat(this.options.tooltip.value,'">\n <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 512 512"><title>ionicons-v5-e</title><path d="M256,56C145.72,56,56,145.72,56,256s89.72,200,200,200,200-89.72,200-200S366.28,56,256,56Zm0,82a26,26,0,1,1-26,26A26,26,0,0,1,256,138Zm48,226H216a16,16,0,0,1,0-32h28V244H228a16,16,0,0,1,0-32h32a16,16,0,0,1,16,16V332h28a16,16,0,0,1,0,32Z"/></svg>\n </div> \n ')),e+='\n </div>\n <div class="websy-kpi-value '.concat(this.options.value.classes.join(" ")||"",'">').concat(this.options.value.value,"</div>\n "),this.options.subValue&&(e+='\n <div class="websy-kpi-sub-value '.concat(this.options.subValue.classes.join(" ")||"",'">').concat(this.options.subValue.value,"</div>\n ")),e+=" \n </div>\n </div>\n ",t.innerHTML=e}}}]),i}(),WebsyMap=function(){function n(t,e){_classCallCheck(this,n);if(this.elementId=t,this.options=_extends({},{tileUrl:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",disablePan:!1,disableZoom:!1,markerSize:10,useClustering:!1,maxMarkerSize:50,minMarkerSize:20},e),t){var i={click:this.handleMapClick.bind(this)};!0===this.options.disableZoom&&(i.scrollWheelZoom=!1,i.zoomControl=!1),!0===this.options.disablePan&&(i.dragging=!1);var s=document.getElementById(this.elementId);s&&("undefined"==typeof d3&&console.error("d3 library has not been loaded"),"undefined"==typeof L&&console.error("Leaflet library has not been loaded"),s.addEventListener("click",this.handleClick.bind(this)),this.map=L.map(this.elementId,i),this.render())}else console.log("No element Id provided for Websy Map")}return _createClass(n,[{key:"handleClick",value:function(t){}},{key:"handleMapClick",value:function(t){}},{key:"render",value:function(){var s=this,t=document.getElementById("".concat(this.options.elementId,"_map"));L.tileLayer(this.options.tileUrl,{attribution:'Map data © <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'}).addTo(this.map);if(this.geo&&this.map.removeLayer(this.geo),this.options.geoJSON&&(this.geo=L.geoJSON(this.options.geoJSON,{style:function(t){return{color:t.color||"#ffffff",colorOpacity:t.colorOpacity||1,fillColor:t.fillColor||"#e6463c",fillOpacity:t.fillOpacity||0,weight:t.weight||1}},onEachFeature:function(t,e){e.bindTooltip(t.tooltip,{permanent:!0,direction:"center",className:t.tooltipClass||"websy-polygon-tooltip"})}}).addTo(this.map)),this.markers=[],this.cluster&&this.map.removeLayer(this.cluster),this.data=[],this.data.forEach(function(t){if(0!==t.Latitude.qNum&&0!==t.Longitude.qNum){var e={};!0===s.options.simpleMarker&&(e.icon=L.divIcon({className:"simple-marker"})),s.options.markerUrl&&(e.icon=L.icon({iconUrl:s.options.markerUrl})),e.data=t;var i=L.marker([t.Latitude.qText,t.Longitude.qText],e);i.on("click",s.handleMapClick.bind(s)),!1===s.options.useClustering&&i.addTo(s.map),s.markers.push(i),!0===s.options.useClustering&&s.cluster.addLayer(i)}}),0<this.data.length){t.classList.remove("hidden"),!0===this.options.useClustering&&this.map.addLayer(this.cluster);var e=L.featureGroup(this.markers);this.map.fitBounds(e.getBounds()),this.map.invalidateSize()}else this.geo?this.map.fitBounds(this.geo.getBounds()):this.options.center&&this.map.setView(this.options.center,this.options.zoom||null)}}]),n}(),WebsyChartTooltip=function(){function e(t){_classCallCheck(this,e),this.svg="string"==typeof t?document.getElementById(t):t,this.tooltipLayer=this.svg.append("g").attr("class","tooltip-layer"),this.tooltipContent=this.tooltipLayer.append("foreignObject").attr("class","websy-chart-tooltip").append("xhtml:div").attr("class","websy-chart-tooltip-content")}return _createClass(e,[{key:"hide",value:function(){this.tooltipContent.classed("active",!1)}},{key:"setHeight",value:function(t){this.tooltipLayer.select("foreignObject").style("height",t)}},{key:"show",value:function(t,e){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{top:0,left:0,width:0,height:0,onLeft:!1},s=this.tooltipLayer.selectAll("foreignObject").attr("width","".concat(i.width,"px")).attr("y","0px").classed("left",i.onLeft);this.tooltipContent.classed("active",!0).style("width","".concat(i.width,"px")).style("top","0px").html("<div class='title'>".concat(t,"</div>").concat(e)),-1===navigator.userAgent.indexOf("Chrome")&&-1!==navigator.userAgent.indexOf("Safari")?(s.attr("x","0px"),this.tooltipContent.style("left","".concat(i.top,"px")).style("top","".concat(i.top,"px"))):(s.attr("x","".concat(i.left,"px")),this.tooltipContent.style("left","0px"))}},{key:"transform",value:function(t,e){this.tooltipLayer.attr("transform","translate(".concat(t,", ").concat(e,")"))}}]),e}(),WebsyDesigns={WebsyPopupDialog:WebsyPopupDialog,WebsyLoadingDialog:WebsyLoadingDialog,WebsyNavigationMenu:WebsyNavigationMenu,WebsyForm:WebsyForm,WebsyDatePicker:WebsyDatePicker,WebsyDropdown:WebsyDropdown,WebsyResultList:WebsyResultList,WebsyPubSub:WebsyPubSub,WebsyTable:WebsyTable,WebsyChart:WebsyChart,WebsyChartTooltip:WebsyChartTooltip,WebsyMap:WebsyMap,WebsyKPI:WebsyKPI,WebsyPDFButton:WebsyPDFButton,PDFButton:WebsyPDFButton,APIService:APIService},GlobalPubSub=new WebsyPubSub("empty",{});function recaptchaReadyCallBack(){GlobalPubSub.publish("recaptchaready")}var rcs=document.createElement("script");rcs.src="//www.google.com/recaptcha/api.js?onload=recaptchaReadyCallBack",document.getElementsByTagName("body")[0].appendChild(rcs);var pps=document.createElement("script");rcs.src="//www.paypal.com/sdk/js",document.getElementsByTagName("body")[0].appendChild(pps);
|