Caldera Forms – More Than Contact Forms - Version 1.6.1.beta.1

Version Description

Download this release

Release Info

Developer Shelob9
Plugin Icon 128x128 Caldera Forms – More Than Contact Forms
Version 1.6.1.beta.1
Comparing to
See all releases

Code changes from version 1.5.9.1 to 1.6.1.beta.1

assets/build/css/caldera-forms-front.min.css CHANGED
@@ -1 +1 @@
1
- /*! GENERATED SOURCE FILE caldera-forms - v1.5.9.1 - 2018-01-24 */.caldera-grid html,.cf-toggle-switch html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}.caldera-grid .sr-only,.caldera-grid svg:not(:root),.cf-toggle-switch svg:not(:root){overflow:hidden}.caldera-grid .btn,.cfdatepicker table{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.caldera-grid button,.caldera-grid select,.cf-toggle-switch button,.cf-toggle-switch select{text-transform:none}@media (min-width:768px){.caldera-grid .container{width:750px}}@media (min-width:992px){.caldera-grid .container{width:970px}}@media (min-width:1200px){.caldera-grid .container{width:1170px}}.caldera-grid article,.caldera-grid aside,.caldera-grid details,.caldera-grid figcaption,.caldera-grid figure,.caldera-grid footer,.caldera-grid header,.caldera-grid hgroup,.caldera-grid main,.caldera-grid nav,.caldera-grid section,.caldera-grid summary{display:block}.caldera-grid a{background:0 0;text-decoration:none}.caldera-grid img{vertical-align:middle}.caldera-grid *,.caldera-grid :after,.caldera-grid :before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.caldera-grid html{font-size:62.5%;-webkit-tap-highlight-color:transparent}.caldera-grid body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}.caldera-grid button,.caldera-grid input,.caldera-grid select,.caldera-grid textarea{font-family:inherit;font-size:inherit;line-height:inherit}.caldera-grid a:focus,.caldera-grid a:hover{color:#2a6496;text-decoration:underline}.caldera-grid a:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.caldera-grid .img-responsive{display:block;max-width:100%;height:auto}.caldera-grid .img-rounded{border-radius:6px}.caldera-grid .img-thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.caldera-grid .img-circle{border-radius:50%}.caldera-grid hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.caldera-grid .sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;clip:rect(0,0,0,0);border:0}.caldera-grid .container,.caldera-grid .container-fluid{margin-right:auto;margin-left:auto;padding-left:7.5px;padding-right:7.5px}@media (min-width:768px){.caldera-grid .container{width:735px}}@media (min-width:992px){.caldera-grid .container{width:955px}}@media (min-width:1200px){.caldera-grid .container{width:1155px}}.caldera-grid .row{margin-left:-7.5px;margin-right:-7.5px;max-width:100%}.caldera-grid .col-lg-1,.caldera-grid .col-lg-10,.caldera-grid .col-lg-11,.caldera-grid .col-lg-12,.caldera-grid .col-lg-2,.caldera-grid .col-lg-3,.caldera-grid .col-lg-4,.caldera-grid .col-lg-5,.caldera-grid .col-lg-6,.caldera-grid .col-lg-7,.caldera-grid .col-lg-8,.caldera-grid .col-lg-9,.caldera-grid .col-md-1,.caldera-grid .col-md-10,.caldera-grid .col-md-11,.caldera-grid .col-md-12,.caldera-grid .col-md-2,.caldera-grid .col-md-3,.caldera-grid .col-md-4,.caldera-grid .col-md-5,.caldera-grid .col-md-6,.caldera-grid .col-md-7,.caldera-grid .col-md-8,.caldera-grid .col-md-9,.caldera-grid .col-sm-1,.caldera-grid .col-sm-10,.caldera-grid .col-sm-11,.caldera-grid .col-sm-12,.caldera-grid .col-sm-2,.caldera-grid .col-sm-3,.caldera-grid .col-sm-4,.caldera-grid .col-sm-5,.caldera-grid .col-sm-6,.caldera-grid .col-sm-7,.caldera-grid .col-sm-8,.caldera-grid .col-sm-9,.caldera-grid .col-xs-1,.caldera-grid .col-xs-10,.caldera-grid .col-xs-11,.caldera-grid .col-xs-12,.caldera-grid .col-xs-2,.caldera-grid .col-xs-3,.caldera-grid .col-xs-4,.caldera-grid .col-xs-5,.caldera-grid .col-xs-6,.caldera-grid .col-xs-7,.caldera-grid .col-xs-8,.caldera-grid .col-xs-9{position:relative;padding-left:7.5px;padding-right:7.5px}.caldera-grid .col-xs-1,.caldera-grid .col-xs-10,.caldera-grid .col-xs-11,.caldera-grid .col-xs-12,.caldera-grid .col-xs-2,.caldera-grid .col-xs-3,.caldera-grid .col-xs-4,.caldera-grid .col-xs-5,.caldera-grid .col-xs-6,.caldera-grid .col-xs-7,.caldera-grid .col-xs-8,.caldera-grid .col-xs-9{float:left}.caldera-grid .col-xs-12{width:100%}.caldera-grid .col-xs-11{width:91.66666667%}.caldera-grid .col-xs-10{width:83.33333333%}.caldera-grid .col-xs-9{width:75%}.caldera-grid .col-xs-8{width:66.66666667%}.caldera-grid .col-xs-7{width:58.33333333%}.caldera-grid .col-xs-6{width:50%}.caldera-grid .col-xs-5{width:41.66666667%}.caldera-grid .col-xs-4{width:33.33333333%}.caldera-grid .col-xs-3{width:25%}.caldera-grid .col-xs-2{width:16.66666667%}.caldera-grid .col-xs-1{width:8.33333333%}.caldera-grid .col-xs-pull-12{right:100%}.caldera-grid .col-xs-pull-11{right:91.66666667%}.caldera-grid .col-xs-pull-10{right:83.33333333%}.caldera-grid .col-xs-pull-9{right:75%}.caldera-grid .col-xs-pull-8{right:66.66666667%}.caldera-grid .col-xs-pull-7{right:58.33333333%}.caldera-grid .col-xs-pull-6{right:50%}.caldera-grid .col-xs-pull-5{right:41.66666667%}.caldera-grid .col-xs-pull-4{right:33.33333333%}.caldera-grid .col-xs-pull-3{right:25%}.caldera-grid .col-xs-pull-2{right:16.66666667%}.caldera-grid .col-xs-pull-1{right:8.33333333%}.caldera-grid .col-xs-pull-0{right:0}.caldera-grid .col-xs-push-12{left:100%}.caldera-grid .col-xs-push-11{left:91.66666667%}.caldera-grid .col-xs-push-10{left:83.33333333%}.caldera-grid .col-xs-push-9{left:75%}.caldera-grid .col-xs-push-8{left:66.66666667%}.caldera-grid .col-xs-push-7{left:58.33333333%}.caldera-grid .col-xs-push-6{left:50%}.caldera-grid .col-xs-push-5{left:41.66666667%}.caldera-grid .col-xs-push-4{left:33.33333333%}.caldera-grid .col-xs-push-3{left:25%}.caldera-grid .col-xs-push-2{left:16.66666667%}.caldera-grid .col-xs-push-1{left:8.33333333%}.caldera-grid .col-xs-push-0{left:0}.caldera-grid .col-xs-offset-12{margin-left:100%}.caldera-grid .col-xs-offset-11{margin-left:91.66666667%}.caldera-grid .col-xs-offset-10{margin-left:83.33333333%}.caldera-grid .col-xs-offset-9{margin-left:75%}.caldera-grid .col-xs-offset-8{margin-left:66.66666667%}.caldera-grid .col-xs-offset-7{margin-left:58.33333333%}.caldera-grid .col-xs-offset-6{margin-left:50%}.caldera-grid .col-xs-offset-5{margin-left:41.66666667%}.caldera-grid .col-xs-offset-4{margin-left:33.33333333%}.caldera-grid .col-xs-offset-3{margin-left:25%}.caldera-grid .col-xs-offset-2{margin-left:16.66666667%}.caldera-grid .col-xs-offset-1{margin-left:8.33333333%}.caldera-grid .col-xs-offset-0{margin-left:0}@media (min-width:768px){.caldera-grid .col-sm-1,.caldera-grid .col-sm-10,.caldera-grid .col-sm-11,.caldera-grid .col-sm-12,.caldera-grid .col-sm-2,.caldera-grid .col-sm-3,.caldera-grid .col-sm-4,.caldera-grid .col-sm-5,.caldera-grid .col-sm-6,.caldera-grid .col-sm-7,.caldera-grid .col-sm-8,.caldera-grid .col-sm-9{float:left}.caldera-grid .col-sm-12{width:100%}.caldera-grid .col-sm-11{width:91.66666667%}.caldera-grid .col-sm-10{width:83.33333333%}.caldera-grid .col-sm-9{width:75%}.caldera-grid .col-sm-8{width:66.66666667%}.caldera-grid .col-sm-7{width:58.33333333%}.caldera-grid .col-sm-6{width:50%}.caldera-grid .col-sm-5{width:41.66666667%}.caldera-grid .col-sm-4{width:33.33333333%}.caldera-grid .col-sm-3{width:25%}.caldera-grid .col-sm-2{width:16.66666667%}.caldera-grid .col-sm-1{width:8.33333333%}.caldera-grid .col-sm-pull-12{right:100%}.caldera-grid .col-sm-pull-11{right:91.66666667%}.caldera-grid .col-sm-pull-10{right:83.33333333%}.caldera-grid .col-sm-pull-9{right:75%}.caldera-grid .col-sm-pull-8{right:66.66666667%}.caldera-grid .col-sm-pull-7{right:58.33333333%}.caldera-grid .col-sm-pull-6{right:50%}.caldera-grid .col-sm-pull-5{right:41.66666667%}.caldera-grid .col-sm-pull-4{right:33.33333333%}.caldera-grid .col-sm-pull-3{right:25%}.caldera-grid .col-sm-pull-2{right:16.66666667%}.caldera-grid .col-sm-pull-1{right:8.33333333%}.caldera-grid .col-sm-pull-0{right:0}.caldera-grid .col-sm-push-12{left:100%}.caldera-grid .col-sm-push-11{left:91.66666667%}.caldera-grid .col-sm-push-10{left:83.33333333%}.caldera-grid .col-sm-push-9{left:75%}.caldera-grid .col-sm-push-8{left:66.66666667%}.caldera-grid .col-sm-push-7{left:58.33333333%}.caldera-grid .col-sm-push-6{left:50%}.caldera-grid .col-sm-push-5{left:41.66666667%}.caldera-grid .col-sm-push-4{left:33.33333333%}.caldera-grid .col-sm-push-3{left:25%}.caldera-grid .col-sm-push-2{left:16.66666667%}.caldera-grid .col-sm-push-1{left:8.33333333%}.caldera-grid .col-sm-push-0{left:0}.caldera-grid .col-sm-offset-12{margin-left:100%}.caldera-grid .col-sm-offset-11{margin-left:91.66666667%}.caldera-grid .col-sm-offset-10{margin-left:83.33333333%}.caldera-grid .col-sm-offset-9{margin-left:75%}.caldera-grid .col-sm-offset-8{margin-left:66.66666667%}.caldera-grid .col-sm-offset-7{margin-left:58.33333333%}.caldera-grid .col-sm-offset-6{margin-left:50%}.caldera-grid .col-sm-offset-5{margin-left:41.66666667%}.caldera-grid .col-sm-offset-4{margin-left:33.33333333%}.caldera-grid .col-sm-offset-3{margin-left:25%}.caldera-grid .col-sm-offset-2{margin-left:16.66666667%}.caldera-grid .col-sm-offset-1{margin-left:8.33333333%}.caldera-grid .col-sm-offset-0{margin-left:0}}@media (min-width:992px){.caldera-grid .col-md-1,.caldera-grid .col-md-10,.caldera-grid .col-md-11,.caldera-grid .col-md-12,.caldera-grid .col-md-2,.caldera-grid .col-md-3,.caldera-grid .col-md-4,.caldera-grid .col-md-5,.caldera-grid .col-md-6,.caldera-grid .col-md-7,.caldera-grid .col-md-8,.caldera-grid .col-md-9{float:left}.caldera-grid .col-md-12{width:100%}.caldera-grid .col-md-11{width:91.66666667%}.caldera-grid .col-md-10{width:83.33333333%}.caldera-grid .col-md-9{width:75%}.caldera-grid .col-md-8{width:66.66666667%}.caldera-grid .col-md-7{width:58.33333333%}.caldera-grid .col-md-6{width:50%}.caldera-grid .col-md-5{width:41.66666667%}.caldera-grid .col-md-4{width:33.33333333%}.caldera-grid .col-md-3{width:25%}.caldera-grid .col-md-2{width:16.66666667%}.caldera-grid .col-md-1{width:8.33333333%}.caldera-grid .col-md-pull-12{right:100%}.caldera-grid .col-md-pull-11{right:91.66666667%}.caldera-grid .col-md-pull-10{right:83.33333333%}.caldera-grid .col-md-pull-9{right:75%}.caldera-grid .col-md-pull-8{right:66.66666667%}.caldera-grid .col-md-pull-7{right:58.33333333%}.caldera-grid .col-md-pull-6{right:50%}.caldera-grid .col-md-pull-5{right:41.66666667%}.caldera-grid .col-md-pull-4{right:33.33333333%}.caldera-grid .col-md-pull-3{right:25%}.caldera-grid .col-md-pull-2{right:16.66666667%}.caldera-grid .col-md-pull-1{right:8.33333333%}.caldera-grid .col-md-pull-0{right:0}.caldera-grid .col-md-push-12{left:100%}.caldera-grid .col-md-push-11{left:91.66666667%}.caldera-grid .col-md-push-10{left:83.33333333%}.caldera-grid .col-md-push-9{left:75%}.caldera-grid .col-md-push-8{left:66.66666667%}.caldera-grid .col-md-push-7{left:58.33333333%}.caldera-grid .col-md-push-6{left:50%}.caldera-grid .col-md-push-5{left:41.66666667%}.caldera-grid .col-md-push-4{left:33.33333333%}.caldera-grid .col-md-push-3{left:25%}.caldera-grid .col-md-push-2{left:16.66666667%}.caldera-grid .col-md-push-1{left:8.33333333%}.caldera-grid .col-md-push-0{left:0}.caldera-grid .col-md-offset-12{margin-left:100%}.caldera-grid .col-md-offset-11{margin-left:91.66666667%}.caldera-grid .col-md-offset-10{margin-left:83.33333333%}.caldera-grid .col-md-offset-9{margin-left:75%}.caldera-grid .col-md-offset-8{margin-left:66.66666667%}.caldera-grid .col-md-offset-7{margin-left:58.33333333%}.caldera-grid .col-md-offset-6{margin-left:50%}.caldera-grid .col-md-offset-5{margin-left:41.66666667%}.caldera-grid .col-md-offset-4{margin-left:33.33333333%}.caldera-grid .col-md-offset-3{margin-left:25%}.caldera-grid .col-md-offset-2{margin-left:16.66666667%}.caldera-grid .col-md-offset-1{margin-left:8.33333333%}.caldera-grid .col-md-offset-0{margin-left:0}}@-ms-viewport{width:device-width}@media (min-width:1200px){.caldera-grid .col-lg-1,.caldera-grid .col-lg-10,.caldera-grid .col-lg-11,.caldera-grid .col-lg-12,.caldera-grid .col-lg-2,.caldera-grid .col-lg-3,.caldera-grid .col-lg-4,.caldera-grid .col-lg-5,.caldera-grid .col-lg-6,.caldera-grid .col-lg-7,.caldera-grid .col-lg-8,.caldera-grid .col-lg-9{float:left}.caldera-grid .col-lg-12{width:100%}.caldera-grid .col-lg-11{width:91.66666667%}.caldera-grid .col-lg-10{width:83.33333333%}.caldera-grid .col-lg-9{width:75%}.caldera-grid .col-lg-8{width:66.66666667%}.caldera-grid .col-lg-7{width:58.33333333%}.caldera-grid .col-lg-6{width:50%}.caldera-grid .col-lg-5{width:41.66666667%}.caldera-grid .col-lg-4{width:33.33333333%}.caldera-grid .col-lg-3{width:25%}.caldera-grid .col-lg-2{width:16.66666667%}.caldera-grid .col-lg-1{width:8.33333333%}.caldera-grid .col-lg-pull-12{right:100%}.caldera-grid .col-lg-pull-11{right:91.66666667%}.caldera-grid .col-lg-pull-10{right:83.33333333%}.caldera-grid .col-lg-pull-9{right:75%}.caldera-grid .col-lg-pull-8{right:66.66666667%}.caldera-grid .col-lg-pull-7{right:58.33333333%}.caldera-grid .col-lg-pull-6{right:50%}.caldera-grid .col-lg-pull-5{right:41.66666667%}.caldera-grid .col-lg-pull-4{right:33.33333333%}.caldera-grid .col-lg-pull-3{right:25%}.caldera-grid .col-lg-pull-2{right:16.66666667%}.caldera-grid .col-lg-pull-1{right:8.33333333%}.caldera-grid .col-lg-pull-0{right:0}.caldera-grid .col-lg-push-12{left:100%}.caldera-grid .col-lg-push-11{left:91.66666667%}.caldera-grid .col-lg-push-10{left:83.33333333%}.caldera-grid .col-lg-push-9{left:75%}.caldera-grid .col-lg-push-8{left:66.66666667%}.caldera-grid .col-lg-push-7{left:58.33333333%}.caldera-grid .col-lg-push-6{left:50%}.caldera-grid .col-lg-push-5{left:41.66666667%}.caldera-grid .col-lg-push-4{left:33.33333333%}.caldera-grid .col-lg-push-3{left:25%}.caldera-grid .col-lg-push-2{left:16.66666667%}.caldera-grid .col-lg-push-1{left:8.33333333%}.caldera-grid .col-lg-push-0{left:0}.caldera-grid .col-lg-offset-12{margin-left:100%}.caldera-grid .col-lg-offset-11{margin-left:91.66666667%}.caldera-grid .col-lg-offset-10{margin-left:83.33333333%}.caldera-grid .col-lg-offset-9{margin-left:75%}.caldera-grid .col-lg-offset-8{margin-left:66.66666667%}.caldera-grid .col-lg-offset-7{margin-left:58.33333333%}.caldera-grid .col-lg-offset-6{margin-left:50%}.caldera-grid .col-lg-offset-5{margin-left:41.66666667%}.caldera-grid .col-lg-offset-4{margin-left:33.33333333%}.caldera-grid .col-lg-offset-3{margin-left:25%}.caldera-grid .col-lg-offset-2{margin-left:16.66666667%}.caldera-grid .col-lg-offset-1{margin-left:8.33333333%}.caldera-grid .col-lg-offset-0{margin-left:0}}.caldera-grid .clearfix:after,.caldera-grid .clearfix:before,.caldera-grid .container-fluid:after,.caldera-grid .container-fluid:before,.caldera-grid .container:after,.caldera-grid .container:before,.caldera-grid .row:after,.caldera-grid .row:before{content:" ";display:table}.caldera-grid .clearfix:after,.caldera-grid .container-fluid:after,.caldera-grid .container:after,.caldera-grid .row:after{clear:both}.caldera-grid .center-block{display:block;margin-left:auto;margin-right:auto}.caldera-grid .pull-right{float:right!important}.caldera-grid .pull-left{float:left!important}.caldera-grid .hide{display:none!important}.caldera-grid .show{display:block!important}.caldera-grid .hidden,.caldera-grid .visible-lg,.caldera-grid .visible-md,.caldera-grid .visible-sm,.caldera-grid .visible-xs{display:none!important}.caldera-grid .invisible{visibility:hidden}.caldera-grid .text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.caldera-grid .alert .alert-link,.caldera-grid b,.caldera-grid strong{font-weight:700}.caldera-grid .hidden{visibility:hidden!important}.caldera-grid .affix{position:fixed}@-ms-viewport{width:device-width}@media (max-width:767px){.caldera-grid .visible-xs{display:block!important}.caldera-grid table.visible-xs{display:table}.caldera-grid tr.visible-xs{display:table-row!important}.caldera-grid td.visible-xs,.caldera-grid th.visible-xs{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.caldera-grid .visible-sm{display:block!important}.caldera-grid table.visible-sm{display:table}.caldera-grid tr.visible-sm{display:table-row!important}.caldera-grid td.visible-sm,.caldera-grid th.visible-sm{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.caldera-grid .visible-md{display:block!important}.caldera-grid table.visible-md{display:table}.caldera-grid tr.visible-md{display:table-row!important}.caldera-grid td.visible-md,.caldera-grid th.visible-md{display:table-cell!important}}@media (min-width:1200px){.caldera-grid .visible-lg{display:block!important}.caldera-grid table.visible-lg{display:table}.caldera-grid tr.visible-lg{display:table-row!important}.caldera-grid td.visible-lg,.caldera-grid th.visible-lg{display:table-cell!important}.caldera-grid .hidden-lg{display:none!important}}@media (max-width:767px){.caldera-grid .hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.caldera-grid .hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.caldera-grid .hidden-md{display:none!important}}.caldera-grid .visible-print{display:none!important}@media print{.caldera-grid .visible-print{display:block!important}.caldera-grid table.visible-print{display:table}.caldera-grid tr.visible-print{display:table-row!important}.caldera-grid td.visible-print,.caldera-grid th.visible-print{display:table-cell!important}.caldera-grid .hidden-print{display:none!important}}input.parsley-success,select.parsley-success,textarea.parsley-success{color:#468847;background-color:#DFF0D8;border:1px solid #D6E9C6}input.parsley-error,select.parsley-error,textarea.parsley-error{color:#B94A48;background-color:#F2DEDE;border:1px solid #EED3D7}.parsley-errors-list{margin:2px 0 3px;padding:0;list-style-type:none;font-size:.9em;line-height:.9em;opacity:0;transition:all .3s ease-in;-o-transition:all .3s ease-in;-moz-transition:all .3s ease-in;-webkit-transition:all .3s ease-in}.parsley-errors-list.filled{opacity:1}.caldera-grid .alert{padding:8px;margin-bottom:18px;border-radius:2px}.caldera-grid .alert-dismissable{padding-right:28px}.caldera-grid .alert-success{background-color:#dff0d8;border-color:#a3d48e;color:#3c763d}.caldera-grid .alert-success hr{border-top-color:#93cd7c}.caldera-grid .alert-success .alert-link{color:#2b542c}.caldera-grid .alert-info{background-color:#d9edf7;border-color:#85c5e5;color:#31708f}.caldera-grid .alert-info hr{border-top-color:#70bbe1}.caldera-grid .alert-info .alert-link{color:#245269}.caldera-grid .alert-warning{background-color:#f9edbe;border-color:#f0c36d;color:#333}.caldera-grid .alert-warning hr{border-top-color:#eeb956}.caldera-grid .alert-warning .alert-link{color:#1a1a1a}.caldera-grid .alert-danger,.caldera-grid .alert-error{background-color:#f2dede;border-color:#d59595;color:#a94442}.caldera-grid .alert-danger hr,.caldera-grid .alert-error hr{border-top-color:#ce8383}.caldera-grid .alert-danger .alert-link,.caldera-grid .alert-error .alert-link{color:#843534}.caldera-grid .alert-danger,.caldera-grid .alert-error,.caldera-grid .alert-info,.caldera-grid .alert-success,.caldera-grid .alert-warning{text-shadow:0 1px 0 rgba(255,255,255,.5)}.caldera-grid .has-error .form-control:focus,.caldera-grid .has-error .form-control:hover{border-color:#dd4b39}.caldera-grid.cf_processing{background:url(../images/loading.gif) center center/30px auto no-repeat rgba(0,0,0,0)}.caldera-grid.cf_processing>*{opacity:.5}.caldera-grid html{font-family:sans-serif}.caldera-grid body{margin:0}.caldera-grid article,.caldera-grid aside,.caldera-grid details,.caldera-grid figcaption,.caldera-grid figure,.caldera-grid footer,.caldera-grid header,.caldera-grid hgroup,.caldera-grid main,.caldera-grid menu,.caldera-grid nav,.caldera-grid section,.caldera-grid summary{display:block}.caldera-grid audio,.caldera-grid canvas,.caldera-grid progress,.caldera-grid video{display:inline-block;vertical-align:baseline}.caldera-grid audio:not([controls]){display:none;height:0}.caldera-grid [hidden],.caldera-grid template{display:none}.caldera-grid a{background-color:transparent}.caldera-grid a:active,.caldera-grid a:hover{outline:0}.caldera-grid abbr[title]{border-bottom:1px dotted}.caldera-grid dfn{font-style:italic}.caldera-grid h1{font-size:2em;margin:.67em 0}.caldera-grid mark{background:#ff0;color:#000}.caldera-grid small{font-size:80%}.caldera-grid sub,.caldera-grid sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.caldera-grid sup{top:-.5em}.caldera-grid sub{bottom:-.25em}.caldera-grid img{border:0}.caldera-grid figure{margin:1em 40px}.caldera-grid hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}.caldera-grid pre{overflow:auto}.caldera-grid code,.caldera-grid kbd,.caldera-grid pre,.caldera-grid samp{font-family:monospace,monospace;font-size:1em}.caldera-grid button,.caldera-grid input,.caldera-grid optgroup,.caldera-grid select,.caldera-grid textarea{font:inherit;margin:0}.caldera-grid button{overflow:visible}.caldera-grid button,.caldera-grid html input[type=button],.caldera-grid input[type=reset],.caldera-grid input[type=submit]{-webkit-appearance:button;cursor:pointer}.caldera-grid button[disabled],.caldera-grid html input[disabled]{cursor:default}.caldera-grid button::-moz-focus-inner,.caldera-grid input::-moz-focus-inner{border:0;padding:0}.caldera-grid input{line-height:normal}.caldera-grid input[type=checkbox],.caldera-grid input[type=radio]{box-sizing:border-box;padding:0}.caldera-grid input[type=number]::-webkit-inner-spin-button,.caldera-grid input[type=number]::-webkit-outer-spin-button{height:auto}.caldera-grid input[type=search]{-webkit-appearance:textfield;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.caldera-grid input[type=search]::-webkit-search-cancel-button,.caldera-grid input[type=search]::-webkit-search-decoration{-webkit-appearance:none}.caldera-grid textarea{overflow:auto}.caldera-grid optgroup{font-weight:700}.caldera-grid table{border-collapse:collapse;border-spacing:0}.caldera-grid td,.caldera-grid th{padding:0}@media print{.caldera-grid *,.caldera-grid :after,.caldera-grid :before{background:0 0!important;color:#000!important;box-shadow:none!important;text-shadow:none!important}.caldera-grid a,.caldera-grid a:visited{text-decoration:underline}.caldera-grid a[href]:after{content:" (" attr(href) ")"}.caldera-grid abbr[title]:after{content:" (" attr(title) ")"}.caldera-grid a[href^="#"]:after,.caldera-grid a[href^="javascript:"]:after{content:""}.caldera-grid blockquote,.caldera-grid pre{border:1px solid #999;page-break-inside:avoid}.caldera-grid thead{display:table-header-group}.caldera-grid img,.caldera-grid tr{page-break-inside:avoid}.caldera-grid img{max-width:100%!important}.caldera-grid h2,.caldera-grid h3,.caldera-grid p{orphans:3;widows:3}.caldera-grid h2,.caldera-grid h3{page-break-after:avoid}.caldera-grid select{background:#fff!important}.caldera-grid .navbar{display:none}.caldera-grid .btn>.caret,.caldera-grid .dropup>.btn>.caret{border-top-color:#000!important}.caldera-grid .label{border:1px solid #000}.caldera-grid .table{border-collapse:collapse!important}.caldera-grid .table td,.caldera-grid .table th{background-color:#fff!important}.caldera-grid .table-bordered td,.caldera-grid .table-bordered th{border:1px solid #ddd!important}}.caldera-grid .btn,.caldera-grid .btn-danger.active,.caldera-grid .btn-danger:active,.caldera-grid .btn-default.active,.caldera-grid .btn-default:active,.caldera-grid .btn-info.active,.caldera-grid .btn-info:active,.caldera-grid .btn-primary.active,.caldera-grid .btn-primary:active,.caldera-grid .btn-success.active,.caldera-grid .btn-success:active,.caldera-grid .btn-warning.active,.caldera-grid .btn-warning:active,.caldera-grid .form-control,.open>.dropdown-toggle.caldera-grid .btn-danger,.open>.dropdown-toggle.caldera-grid .btn-default,.open>.dropdown-toggle.caldera-grid .btn-info,.open>.dropdown-toggle.caldera-grid .btn-primary,.open>.dropdown-toggle.caldera-grid .btn-success,.open>.dropdown-toggle.caldera-grid .btn-warning{background-image:none}.caldera-grid fieldset{padding:0;margin:0;border:0;min-width:0}.caldera-grid legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}.caldera-grid label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}.caldera-grid input[type=checkbox],.caldera-grid input[type=radio]{margin:0;line-height:normal}.caldera-grid .form-control,.caldera-grid output{font-size:14px;line-height:1.42857143;color:#555;display:block}.caldera-grid input[type=file]{display:block}.caldera-grid input[type=range]{display:block;width:100%}.caldera-grid select[multiple],.caldera-grid select[size]{height:auto}.caldera-grid input[type=checkbox]:focus,.caldera-grid input[type=file]:focus,.caldera-grid input[type=radio]:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.caldera-grid input[type=checkbox]{-webkit-appearance:checkbox}.caldera-grid input[type=radio]{-webkit-appearance:radio}.caldera-grid output{padding-top:7px}.caldera-grid .form-control{width:100%;height:34px;padding:6px 12px;background-color:#fff;border:1px solid #ccc;border-radius:2px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.caldera-grid .form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.caldera-grid .form-control::-moz-placeholder{color:#999;opacity:1}.caldera-grid .form-control:-ms-input-placeholder{color:#999}.caldera-grid .form-control::-webkit-input-placeholder{color:#999}.caldera-grid .has-success .checkbox,.caldera-grid .has-success .checkbox-inline,.caldera-grid .has-success .control-label,.caldera-grid .has-success .form-control-feedback,.caldera-grid .has-success .help-block,.caldera-grid .has-success .radio,.caldera-grid .has-success .radio-inline,.caldera-grid .has-success.checkbox label,.caldera-grid .has-success.checkbox-inline label,.caldera-grid .has-success.radio label,.caldera-grid .has-success.radio-inline label{color:#3c763d}.caldera-grid .form-control[disabled],.caldera-grid .form-control[readonly],fieldset[disabled] .caldera-grid .form-control{background-color:#eee;opacity:1}.caldera-grid .form-control[disabled],fieldset[disabled] .caldera-grid .form-control{cursor:not-allowed}textarea .caldera-grid .form-control{height:auto}@media screen and (-webkit-min-device-pixel-ratio:0){.caldera-grid input[type=date],.caldera-grid input[type=datetime-local],.caldera-grid input[type=month],.caldera-grid input[type=time]{line-height:34px}.caldera-grid input[type=date].input-sm,.caldera-grid input[type=datetime-local].input-sm,.caldera-grid input[type=month].input-sm,.caldera-grid input[type=time].input-sm,.input-group-sm .caldera-grid input[type=date],.input-group-sm .caldera-grid input[type=datetime-local],.input-group-sm .caldera-grid input[type=month],.input-group-sm .caldera-grid input[type=time]{line-height:30px}.caldera-grid input[type=date].input-lg,.caldera-grid input[type=datetime-local].input-lg,.caldera-grid input[type=month].input-lg,.caldera-grid input[type=time].input-lg,.input-group-lg .caldera-grid input[type=date],.input-group-lg .caldera-grid input[type=datetime-local],.input-group-lg .caldera-grid input[type=month],.input-group-lg .caldera-grid input[type=time]{line-height:46px}}.caldera-grid .form-group{margin-bottom:15px}.caldera-grid .checkbox,.caldera-grid .radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.caldera-grid .checkbox label,.caldera-grid .radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.caldera-grid .checkbox input[type=checkbox],.caldera-grid .checkbox-inline input[type=checkbox],.caldera-grid .radio input[type=radio],.caldera-grid .radio-inline input[type=radio]{margin-left:-20px}.caldera-grid .checkbox+.checkbox,.caldera-grid .radio+.radio{margin-top:-5px}.caldera-grid .checkbox-inline,.caldera-grid .radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:400;cursor:pointer}.caldera-grid .checkbox-inline+.checkbox-inline,.caldera-grid .radio-inline+.radio-inline{margin-top:0;margin-left:10px}.caldera-grid .checkbox-inline.disabled,.caldera-grid .checkbox.disabled label,.caldera-grid .radio-inline.disabled,.caldera-grid .radio.disabled label,.caldera-grid input[type=checkbox].disabled,.caldera-grid input[type=checkbox][disabled],.caldera-grid input[type=radio].disabled,.caldera-grid input[type=radio][disabled],fieldset[disabled] .caldera-grid .checkbox label,fieldset[disabled] .caldera-grid .checkbox-inline,fieldset[disabled] .caldera-grid .radio label,fieldset[disabled] .caldera-grid .radio-inline,fieldset[disabled] .caldera-grid input[type=checkbox],fieldset[disabled] .caldera-grid input[type=radio]{cursor:not-allowed}.caldera-grid .form-control-static{padding-top:7px;padding-bottom:7px;margin-bottom:0;min-height:34px}.caldera-grid .form-control-static.input-lg,.caldera-grid .form-control-static.input-sm{padding-left:0;padding-right:0}.caldera-grid .input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:1px}select.caldera-grid .input-sm{height:30px;line-height:30px}select[multiple].caldera-grid .input-sm,textarea.caldera-grid .input-sm{height:auto}.caldera-grid .form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:1px}select.caldera-grid .form-group-sm .form-control{height:30px;line-height:30px}select[multiple].caldera-grid .form-group-sm .form-control,textarea.caldera-grid .form-group-sm .form-control{height:auto}.caldera-grid .form-group-sm .form-control-static{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;min-height:32px}.caldera-grid .input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:4px}select.caldera-grid .input-lg{height:46px;line-height:46px}select[multiple].caldera-grid .input-lg,textarea.caldera-grid .input-lg{height:auto}.caldera-grid .form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:4px}select.caldera-grid .form-group-lg .form-control{height:46px;line-height:46px}select[multiple].caldera-grid .form-group-lg .form-control,textarea.caldera-grid .form-group-lg .form-control{height:auto}.caldera-grid .form-group-lg .form-control-static{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;min-height:38px}.caldera-grid .has-feedback{position:relative}.caldera-grid .has-feedback .form-control{padding-right:42.5px}.caldera-grid .form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.caldera-grid .input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.caldera-grid .input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.caldera-grid .has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.caldera-grid .has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.caldera-grid .has-success .input-group-addon{color:#3c763d;border-color:#3c763d;background-color:#dff0d8}.caldera-grid .has-warning .checkbox,.caldera-grid .has-warning .checkbox-inline,.caldera-grid .has-warning .control-label,.caldera-grid .has-warning .form-control-feedback,.caldera-grid .has-warning .help-block,.caldera-grid .has-warning .radio,.caldera-grid .has-warning .radio-inline,.caldera-grid .has-warning.checkbox label,.caldera-grid .has-warning.checkbox-inline label,.caldera-grid .has-warning.radio label,.caldera-grid .has-warning.radio-inline label{color:#8a6d3b}.caldera-grid .has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.caldera-grid .has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.caldera-grid .has-warning .input-group-addon{color:#8a6d3b;border-color:#8a6d3b;background-color:#fcf8e3}.caldera-grid .has-error .checkbox,.caldera-grid .has-error .checkbox-inline,.caldera-grid .has-error .control-label,.caldera-grid .has-error .form-control-feedback,.caldera-grid .has-error .help-block,.caldera-grid .has-error .radio,.caldera-grid .has-error .radio-inline,.caldera-grid .has-error.checkbox label,.caldera-grid .has-error.checkbox-inline label,.caldera-grid .has-error.radio label,.caldera-grid .has-error.radio-inline label{color:#a94442}.caldera-grid .has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.caldera-grid .has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.caldera-grid .has-error .input-group-addon{color:#a94442;border-color:#a94442;background-color:#f2dede}.caldera-grid .has-feedback label~.form-control-feedback{top:25px}.caldera-grid .has-feedback label.sr-only~.form-control-feedback{top:0}.caldera-grid .help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.caldera-grid .form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.caldera-grid .form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.caldera-grid .form-inline .form-control-static{display:inline-block}.caldera-grid .form-inline .input-group{display:inline-table;vertical-align:middle}.caldera-grid .form-inline .input-group .form-control,.caldera-grid .form-inline .input-group .input-group-addon,.caldera-grid .form-inline .input-group .input-group-btn{width:auto}.caldera-grid .form-inline .input-group>.form-control{width:100%}.caldera-grid .form-inline .control-label{margin-bottom:0;vertical-align:middle}.caldera-grid .form-inline .checkbox,.caldera-grid .form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.caldera-grid .form-inline .checkbox label,.caldera-grid .form-inline .radio label{padding-left:0}.caldera-grid .form-inline .checkbox input[type=checkbox],.caldera-grid .form-inline .radio input[type=radio]{position:relative;margin-left:0}.caldera-grid .form-inline .has-feedback .form-control-feedback{top:0}.caldera-grid .form-horizontal .control-label{text-align:right;margin-bottom:0;padding-top:7px}}.caldera-grid .form-horizontal .checkbox,.caldera-grid .form-horizontal .checkbox-inline,.caldera-grid .form-horizontal .radio,.caldera-grid .form-horizontal .radio-inline{margin-top:0;margin-bottom:0;padding-top:7px}.caldera-grid .form-horizontal .checkbox,.caldera-grid .form-horizontal .radio{min-height:27px}.caldera-grid .form-horizontal .form-group{margin-left:-15px;margin-right:-15px}.caldera-grid .form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.caldera-grid .form-horizontal .form-group-lg .control-label{padding-top:14.33px}.caldera-grid .form-horizontal .form-group-sm .control-label{padding-top:6px}}.caldera-grid .btn{display:inline-block;margin-bottom:0;font-weight:400;text-align:center;vertical-align:middle;touch-action:manipulation;cursor:pointer;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:2px;user-select:none}.caldera-grid .btn.active.focus,.caldera-grid .btn.active:focus,.caldera-grid .btn.focus,.caldera-grid .btn:active.focus,.caldera-grid .btn:active:focus,.caldera-grid .btn:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.caldera-grid .btn.focus,.caldera-grid .btn:focus,.caldera-grid .btn:hover{color:#333;text-decoration:none}.caldera-grid .btn.active,.caldera-grid .btn:active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.caldera-grid .btn.disabled,.caldera-grid .btn[disabled],fieldset[disabled] .caldera-grid .btn{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.caldera-grid .btn-default{color:#333;background-color:#fff;border-color:#ccc}.caldera-grid .btn-default.active,.caldera-grid .btn-default.focus,.caldera-grid .btn-default:active,.caldera-grid .btn-default:focus,.caldera-grid .btn-default:hover,.open>.dropdown-toggle.caldera-grid .btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.caldera-grid .btn-default.disabled,.caldera-grid .btn-default.disabled.active,.caldera-grid .btn-default.disabled.focus,.caldera-grid .btn-default.disabled:active,.caldera-grid .btn-default.disabled:focus,.caldera-grid .btn-default.disabled:hover,.caldera-grid .btn-default[disabled],.caldera-grid .btn-default[disabled].active,.caldera-grid .btn-default[disabled].focus,.caldera-grid .btn-default[disabled]:active,.caldera-grid .btn-default[disabled]:focus,.caldera-grid .btn-default[disabled]:hover,fieldset[disabled] .caldera-grid .btn-default,fieldset[disabled] .caldera-grid .btn-default.active,fieldset[disabled] .caldera-grid .btn-default.focus,fieldset[disabled] .caldera-grid .btn-default:active,fieldset[disabled] .caldera-grid .btn-default:focus,fieldset[disabled] .caldera-grid .btn-default:hover{background-color:#fff;border-color:#ccc}.caldera-grid .btn-default .badge{color:#fff;background-color:#333}.caldera-grid .btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.caldera-grid .btn-primary.active,.caldera-grid .btn-primary.focus,.caldera-grid .btn-primary:active,.caldera-grid .btn-primary:focus,.caldera-grid .btn-primary:hover,.open>.dropdown-toggle.caldera-grid .btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.caldera-grid .btn-primary.disabled,.caldera-grid .btn-primary.disabled.active,.caldera-grid .btn-primary.disabled.focus,.caldera-grid .btn-primary.disabled:active,.caldera-grid .btn-primary.disabled:focus,.caldera-grid .btn-primary.disabled:hover,.caldera-grid .btn-primary[disabled],.caldera-grid .btn-primary[disabled].active,.caldera-grid .btn-primary[disabled].focus,.caldera-grid .btn-primary[disabled]:active,.caldera-grid .btn-primary[disabled]:focus,.caldera-grid .btn-primary[disabled]:hover,fieldset[disabled] .caldera-grid .btn-primary,fieldset[disabled] .caldera-grid .btn-primary.active,fieldset[disabled] .caldera-grid .btn-primary.focus,fieldset[disabled] .caldera-grid .btn-primary:active,fieldset[disabled] .caldera-grid .btn-primary:focus,fieldset[disabled] .caldera-grid .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.caldera-grid .btn-primary .badge{color:#337ab7;background-color:#fff}.caldera-grid .btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.caldera-grid .btn-success.active,.caldera-grid .btn-success.focus,.caldera-grid .btn-success:active,.caldera-grid .btn-success:focus,.caldera-grid .btn-success:hover,.open>.dropdown-toggle.caldera-grid .btn-success{color:#fff;background-color:#449d44;border-color:#398439}.caldera-grid .btn-success.disabled,.caldera-grid .btn-success.disabled.active,.caldera-grid .btn-success.disabled.focus,.caldera-grid .btn-success.disabled:active,.caldera-grid .btn-success.disabled:focus,.caldera-grid .btn-success.disabled:hover,.caldera-grid .btn-success[disabled],.caldera-grid .btn-success[disabled].active,.caldera-grid .btn-success[disabled].focus,.caldera-grid .btn-success[disabled]:active,.caldera-grid .btn-success[disabled]:focus,.caldera-grid .btn-success[disabled]:hover,fieldset[disabled] .caldera-grid .btn-success,fieldset[disabled] .caldera-grid .btn-success.active,fieldset[disabled] .caldera-grid .btn-success.focus,fieldset[disabled] .caldera-grid .btn-success:active,fieldset[disabled] .caldera-grid .btn-success:focus,fieldset[disabled] .caldera-grid .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.caldera-grid .btn-success .badge{color:#5cb85c;background-color:#fff}.caldera-grid .btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.caldera-grid .btn-info.active,.caldera-grid .btn-info.focus,.caldera-grid .btn-info:active,.caldera-grid .btn-info:focus,.caldera-grid .btn-info:hover,.open>.dropdown-toggle.caldera-grid .btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.caldera-grid .btn-info.disabled,.caldera-grid .btn-info.disabled.active,.caldera-grid .btn-info.disabled.focus,.caldera-grid .btn-info.disabled:active,.caldera-grid .btn-info.disabled:focus,.caldera-grid .btn-info.disabled:hover,.caldera-grid .btn-info[disabled],.caldera-grid .btn-info[disabled].active,.caldera-grid .btn-info[disabled].focus,.caldera-grid .btn-info[disabled]:active,.caldera-grid .btn-info[disabled]:focus,.caldera-grid .btn-info[disabled]:hover,fieldset[disabled] .caldera-grid .btn-info,fieldset[disabled] .caldera-grid .btn-info.active,fieldset[disabled] .caldera-grid .btn-info.focus,fieldset[disabled] .caldera-grid .btn-info:active,fieldset[disabled] .caldera-grid .btn-info:focus,fieldset[disabled] .caldera-grid .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.caldera-grid .btn-info .badge{color:#5bc0de;background-color:#fff}.caldera-grid .btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.caldera-grid .btn-warning.active,.caldera-grid .btn-warning.focus,.caldera-grid .btn-warning:active,.caldera-grid .btn-warning:focus,.caldera-grid .btn-warning:hover,.open>.dropdown-toggle.caldera-grid .btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.caldera-grid .btn-warning.disabled,.caldera-grid .btn-warning.disabled.active,.caldera-grid .btn-warning.disabled.focus,.caldera-grid .btn-warning.disabled:active,.caldera-grid .btn-warning.disabled:focus,.caldera-grid .btn-warning.disabled:hover,.caldera-grid .btn-warning[disabled],.caldera-grid .btn-warning[disabled].active,.caldera-grid .btn-warning[disabled].focus,.caldera-grid .btn-warning[disabled]:active,.caldera-grid .btn-warning[disabled]:focus,.caldera-grid .btn-warning[disabled]:hover,fieldset[disabled] .caldera-grid .btn-warning,fieldset[disabled] .caldera-grid .btn-warning.active,fieldset[disabled] .caldera-grid .btn-warning.focus,fieldset[disabled] .caldera-grid .btn-warning:active,fieldset[disabled] .caldera-grid .btn-warning:focus,fieldset[disabled] .caldera-grid .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.caldera-grid .btn-warning .badge{color:#f0ad4e;background-color:#fff}.caldera-grid .btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.caldera-grid .btn-danger.active,.caldera-grid .btn-danger.focus,.caldera-grid .btn-danger:active,.caldera-grid .btn-danger:focus,.caldera-grid .btn-danger:hover,.open>.dropdown-toggle.caldera-grid .btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.caldera-grid .btn-danger.disabled,.caldera-grid .btn-danger.disabled.active,.caldera-grid .btn-danger.disabled.focus,.caldera-grid .btn-danger.disabled:active,.caldera-grid .btn-danger.disabled:focus,.caldera-grid .btn-danger.disabled:hover,.caldera-grid .btn-danger[disabled],.caldera-grid .btn-danger[disabled].active,.caldera-grid .btn-danger[disabled].focus,.caldera-grid .btn-danger[disabled]:active,.caldera-grid .btn-danger[disabled]:focus,.caldera-grid .btn-danger[disabled]:hover,fieldset[disabled] .caldera-grid .btn-danger,fieldset[disabled] .caldera-grid .btn-danger.active,fieldset[disabled] .caldera-grid .btn-danger.focus,fieldset[disabled] .caldera-grid .btn-danger:active,fieldset[disabled] .caldera-grid .btn-danger:focus,fieldset[disabled] .caldera-grid .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.caldera-grid .btn-danger .badge{color:#d9534f;background-color:#fff}.caldera-grid .btn-link{color:#337ab7;font-weight:400;border-radius:0}.caldera-grid .btn-link,.caldera-grid .btn-link.active,.caldera-grid .btn-link:active,.caldera-grid .btn-link[disabled],fieldset[disabled] .caldera-grid .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.caldera-grid .btn-link,.caldera-grid .btn-link:active,.caldera-grid .btn-link:focus,.caldera-grid .btn-link:hover{border-color:transparent}.caldera-grid .btn-link:focus,.caldera-grid .btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.caldera-grid .btn-link[disabled]:focus,.caldera-grid .btn-link[disabled]:hover,fieldset[disabled] .caldera-grid .btn-link:focus,fieldset[disabled] .caldera-grid .btn-link:hover{color:#777;text-decoration:none}.caldera-grid .btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:4px}.caldera-grid .btn-sm,.caldera-grid .btn-xs{font-size:12px;line-height:1.5;border-radius:1px}.caldera-grid .btn-sm{padding:5px 10px}.caldera-grid .btn-xs{padding:1px 5px}.caldera-grid .btn-block{display:block;width:100%}.caldera-grid .btn-block+.btn-block{margin-top:5px}.caldera-grid input[type=button].btn-block,.caldera-grid input[type=reset].btn-block,.caldera-grid input[type=submit].btn-block{width:100%}.caldera-grid textarea.form-control{padding-right:4px;height:auto}.caldera-grid .breadcrumb{padding:6px 12px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.caldera-grid .breadcrumb>li{display:inline-block;margin:0}.caldera-grid .breadcrumb>li+li:before{content:"/\00a0";padding:0 5px;color:#ccc}.caldera-grid .breadcrumb>.active,.caldera-grid .breadcrumb>.active>a{color:#777}.breadcrumb>li.active.error>a,.breadcrumb>li.error>a{color:red}.caldera-grid .cf-credit-card{padding-left:42px;background-image:url(../images/credit-card.svg);background-repeat:no-repeat!important;background-position-x:4px!important;background-position-y:3px!important}.caldera-grid .screen-reader-text{clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;position:absolute!important;width:1px;word-wrap:normal!important}@font-face{font-family:cf-raty;src:url(fonts/cf-raty.eot?40481674);src:url(fonts/cf-raty.eot?40481674#iefix) format('embedded-opentype'),url(fonts/cf-raty.woff?40481674) format('woff'),url(fonts/cf-raty.ttf?40481674) format('truetype'),url(fonts/cf-raty.svg?40481674#cf-raty) format('svg');font-weight:400;font-style:normal}[class*=" raty-"]:before,[class^=raty-]:before{font-family:cf-raty;font-style:normal;font-weight:400;speak:none;font-size:2em;display:inline-block;text-decoration:inherit;width:1em;text-align:center;font-variant:normal;text-transform:none;line-height:1em}.raty-heart-on:before{content:'\e800'}.raty-heart-off:before{content:'\e801'}.raty-star-on:before{content:'\e802'}.raty-star-off:before{content:'\e803'}.raty-circle-on:before{content:'\e804'}.raty-circle-off:before{content:'\e805'}.raty-dot-off:before{content:'\e806'}.raty-dot-on:before{content:'\e807'}.raty-face-off:before{content:'\e808'}.raty-face-on:before{content:'\e809'}.raty-cancel-off:before{content:'\e80a'}.raty-cancel-on:before{content:'\e80b'}.calculation-group{background:#FFF;box-shadow:0 1px 2px rgba(0,0,0,.05);padding:6px;margin:6px 0}.preview-color-selector{background:#F0F0F0;border:1px solid #E2E2E2;display:inline;margin-left:-1px;padding:3px 12px;box-shadow:0 0 0 2px #fff inset}.miniColors-trigger{border:1px solid #999;-mz-border-radius:0 1px 1px 0;-webkit-border-radius:0 1px 1px 0;display:inline-block;height:24px;margin:0 0 -8px -1px;width:30px}.cf-color-picker .input-group-btn:last-child>.btn,.cf-color-picker .input-group-btn:last-child>.btn-group,.cf-color-picker .input-group-btn>.btn+.btn{margin-left:-1px}.miniColors-selector{background:#FFF;border:1px solid #999;-moz-box-shadow:0 3px 0 -1px rgba(0,0,0,.05);-webkit-box-shadow:0 3px 0 -1px rgba(0,0,0,.05);box-shadow:0 3px 0 -1px rgba(0,0,0,.05);height:162px;padding:5px;position:absolute;width:187px;z-index:999999;margin-top:-1px}.miniColors-colors,.miniColors-hues{top:5px;height:150px;cursor:crosshair;position:absolute}.miniColors-selector.black{background:#000;border-color:#000}.miniColors-colors{left:5px;width:150px;background:url(minicolor-colors.png) right no-repeat}.miniColors-hues{left:160px;width:20px;background:url(minicolor-colors.png) left no-repeat}.miniColors-colorPicker{position:absolute;width:9px;height:9px;border:1px solid #fff;-moz-border-radius:11px;-webkit-border-radius:11px;border-radius:11px}.miniColors-colorPicker-inner{position:absolute;top:0;left:0;width:7px;height:7px;border:1px solid #000;-moz-border-radius:9px;-webkit-border-radius:9px;border-radius:9px}.miniColors-huePicker{position:absolute;left:-3px;width:24px;height:1px;border:1px solid #fff;border-radius:2px;background:#000}.cf-color-picker .form-control::-moz-placeholder{color:#999;opacity:1}.cf-color-picker .form-control:-ms-input-placeholder{color:#999}.cf-color-picker .form-control::-webkit-input-placeholder{color:#999}.cf-color-picker .form-control[disabled],.cf-color-picker .form-control[readonly],.cf-color-picker fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee;opacity:1}.cf-color-picker .form-group{margin-bottom:15px}.cf-color-picker .input-group{position:relative;display:table;border-collapse:separate;max-width:120px}.cf-color-picker .input-group[class*=col-]{float:none;padding-left:0;padding-right:0}.cf-color-picker .input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.cf-color-picker .input-group-lg>.form-control,.cf-color-picker .input-group-lg>.input-group-addon,.cf-color-picker .input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.cf-color-picker .input-group-sm>.form-control,.cf-color-picker .input-group-sm>.input-group-addon,.cf-color-picker .input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.cf-color-picker .input-group .form-control,.cf-color-picker .input-group-addon,.cf-color-picker .input-group-btn{display:table-cell}.cf-color-picker .input-group .form-control:not(:first-child):not(:last-child),.cf-color-picker .input-group-addon:not(:first-child):not(:last-child),.cf-color-picker .input-group-btn:not(:first-child):not(:last-child){border-radius:0}.cf-color-picker .input-group-addon,.cf-color-picker .input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.cf-color-picker .input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.cf-color-picker .text-hide,.table-striped .cfdatepicker table tr td,.table-striped .cfdatepicker table tr th{background-color:transparent}.cf-color-picker .input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.cf-color-picker .input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.cf-color-picker .input-group .form-control:first-child,.cf-color-picker .input-group-addon:first-child,.cf-color-picker .input-group-btn:first-child>.btn,.cf-color-picker .input-group-btn:first-child>.btn-group>.btn,.cf-color-picker .input-group-btn:first-child>.dropdown-toggle,.cf-color-picker .input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.cf-color-picker .input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.cf-color-picker .input-group-addon:first-child{border-right:0}.cf-color-picker .input-group .form-control:last-child,.cf-color-picker .input-group-addon:last-child,.cf-color-picker .input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.cf-color-picker .input-group-btn:first-child>.btn:not(:first-child),.cf-color-picker .input-group-btn:last-child>.btn,.cf-color-picker .input-group-btn:last-child>.btn-group>.btn,.cf-color-picker .input-group-btn:last-child>.dropdown-toggle{border-bottom-left-radius:0;border-top-left-radius:0}.cf-color-picker .input-group-addon:last-child{border-left:0}.cf-color-picker .input-group-btn{position:relative;font-size:0;white-space:nowrap}.cf-color-picker .input-group-btn>.btn{position:relative}.cf-color-picker .input-group-btn>.btn:active,.cf-color-picker .input-group-btn>.btn:focus,.cf-color-picker .input-group-btn>.btn:hover{z-index:2}.cf-color-picker .input-group-btn:first-child>.btn,.cf-color-picker .input-group-btn:first-child>.btn-group{margin-right:-1px}.cf-color-picker .clearfix:after,.cf-color-picker .clearfix:before,.cf-color-picker .form-horizontal .form-group:after,.cf-color-picker .form-horizontal .form-group:before{content:" ";display:table}.cf-color-picker .clearfix:after,.cf-color-picker .form-horizontal .form-group:after{clear:both}.cf-color-picker .center-block{display:block;margin-left:auto;margin-right:auto}.cf-color-picker .pull-right{float:right!important}.cf-color-picker .pull-left{float:left!important}.cf-color-picker .hide{display:none!important}.cf-color-picker .show{display:block!important}.cf-color-picker .invisible{visibility:hidden}.cf-color-picker .text-hide{font:0/0 a;color:transparent;text-shadow:none;border:0}.cf-color-picker .hidden{display:none!important;visibility:hidden!important}.cf-color-picker .affix{position:fixed}@-ms-viewport{width:device-width}.cf-color-picker .visible-lg,.cf-color-picker .visible-md,.cf-color-picker .visible-print,.cf-color-picker .visible-sm,.cf-color-picker .visible-xs{display:none!important}@media (max-width:767px){.cf-color-picker .visible-xs{display:block!important}.cf-color-picker table.visible-xs{display:table}.cf-color-picker tr.visible-xs{display:table-row!important}.cf-color-picker td.visible-xs,.cf-color-picker th.visible-xs{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.cf-color-picker .visible-sm{display:block!important}.cf-color-picker table.visible-sm{display:table}.cf-color-picker tr.visible-sm{display:table-row!important}.cf-color-picker td.visible-sm,.cf-color-picker th.visible-sm{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.cf-color-picker .visible-md{display:block!important}.cf-color-picker table.visible-md{display:table}.cf-color-picker tr.visible-md{display:table-row!important}.cf-color-picker td.visible-md,.cf-color-picker th.visible-md{display:table-cell!important}}@media (min-width:1200px){.cf-color-picker .visible-lg{display:block!important}.cf-color-picker table.visible-lg{display:table}.cf-color-picker tr.visible-lg{display:table-row!important}.cf-color-picker td.visible-lg,.cf-color-picker th.visible-lg{display:table-cell!important}.cf-color-picker .hidden-lg{display:none!important}}@media (max-width:767px){.cf-color-picker .hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.cf-color-picker .hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.cf-color-picker .hidden-md{display:none!important}}@media print{.cf-color-picker .visible-print{display:block!important}.cf-color-picker table.visible-print{display:table}.cf-color-picker tr.visible-print{display:table-row!important}.cf-color-picker td.visible-print,.cf-color-picker th.visible-print{display:table-cell!important}.cf-color-picker .hidden-print{display:none!important}}.cfdatepicker-dropdown:after,.cfdatepicker-dropdown:before{content:'';display:inline-block;border-top:0;position:absolute}.cfdatepicker{padding:4px;border-radius:4px;direction:ltr}.cfdatepicker-inline{width:220px}.cfdatepicker.cfdatepicker-rtl{direction:rtl}.cfdatepicker.cfdatepicker-rtl table tr td span{float:right}.cfdatepicker-dropdown{top:0;left:0}.cfdatepicker-dropdown:before{border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,.2)}.cfdatepicker-dropdown:after{border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff}.cfdatepicker-dropdown.cfdatepicker-orient-left:before{left:6px}.cfdatepicker-dropdown.cfdatepicker-orient-left:after{left:7px}.cfdatepicker-dropdown.cfdatepicker-orient-right:before{right:6px}.cfdatepicker-dropdown.cfdatepicker-orient-right:after{right:7px}.cfdatepicker-dropdown.cfdatepicker-orient-top:before{top:-7px}.cfdatepicker-dropdown.cfdatepicker-orient-top:after{top:-6px}.cfdatepicker-dropdown.cfdatepicker-orient-bottom:before{bottom:-7px;border-bottom:0;border-top:7px solid #999}.cfdatepicker-dropdown.cfdatepicker-orient-bottom:after{bottom:-6px;border-bottom:0;border-top:6px solid #fff}.cfdatepicker>div{display:none}.cfdatepicker.days div.cfdatepicker-days,.cfdatepicker.months div.cfdatepicker-months,.cfdatepicker.years div.cfdatepicker-years{display:block}.cfdatepicker table{border:0;width:auto;margin:0;-webkit-touch-callout:none;-khtml-user-select:none;user-select:none}.cfdatepicker table tr td,.cfdatepicker table tr th{text-align:center;width:10px;height:10px;border-radius:4px;border:none}.cfdatepicker table tr td.day.focused,.cfdatepicker table tr td.day:hover{background:#eee;cursor:pointer}.cfdatepicker table tr td.new,.cfdatepicker table tr td.old{color:#999}.cfdatepicker table tr td.disabled,.cfdatepicker table tr td.disabled:hover{background:0 0;color:#999;cursor:default}.cfdatepicker table tr td.today,.cfdatepicker table tr td.today.disabled,.cfdatepicker table tr td.today.disabled:hover,.cfdatepicker table tr td.today:hover{color:#000;background-color:#ffdb99;border-color:#ffb733}.cfdatepicker table tr td.today.active,.cfdatepicker table tr td.today.disabled.active,.cfdatepicker table tr td.today.disabled:active,.cfdatepicker table tr td.today.disabled:focus,.cfdatepicker table tr td.today.disabled:hover,.cfdatepicker table tr td.today.disabled:hover.active,.cfdatepicker table tr td.today.disabled:hover:active,.cfdatepicker table tr td.today.disabled:hover:focus,.cfdatepicker table tr td.today.disabled:hover:hover,.cfdatepicker table tr td.today:active,.cfdatepicker table tr td.today:focus,.cfdatepicker table tr td.today:hover,.cfdatepicker table tr td.today:hover.active,.cfdatepicker table tr td.today:hover:active,.cfdatepicker table tr td.today:hover:focus,.cfdatepicker table tr td.today:hover:hover,.open .dropdown-toggle.cfdatepicker table tr td.today,.open .dropdown-toggle.cfdatepicker table tr td.today.disabled,.open .dropdown-toggle.cfdatepicker table tr td.today.disabled:hover,.open .dropdown-toggle.cfdatepicker table tr td.today:hover{color:#000;background-color:#ffcd70;border-color:#f59e00}.cfdatepicker table tr td.today.active,.cfdatepicker table tr td.today.disabled.active,.cfdatepicker table tr td.today.disabled:active,.cfdatepicker table tr td.today.disabled:hover.active,.cfdatepicker table tr td.today.disabled:hover:active,.cfdatepicker table tr td.today:active,.cfdatepicker table tr td.today:hover.active,.cfdatepicker table tr td.today:hover:active,.open .dropdown-toggle.cfdatepicker table tr td.today,.open .dropdown-toggle.cfdatepicker table tr td.today.disabled,.open .dropdown-toggle.cfdatepicker table tr td.today.disabled:hover,.open .dropdown-toggle.cfdatepicker table tr td.today:hover{background-image:none}.cfdatepicker table tr td.today.disabled,.cfdatepicker table tr td.today.disabled.active,.cfdatepicker table tr td.today.disabled.disabled,.cfdatepicker table tr td.today.disabled.disabled.active,.cfdatepicker table tr td.today.disabled.disabled:active,.cfdatepicker table tr td.today.disabled.disabled:focus,.cfdatepicker table tr td.today.disabled.disabled:hover,.cfdatepicker table tr td.today.disabled:active,.cfdatepicker table tr td.today.disabled:focus,.cfdatepicker table tr td.today.disabled:hover,.cfdatepicker table tr td.today.disabled:hover.disabled,.cfdatepicker table tr td.today.disabled:hover.disabled.active,.cfdatepicker table tr td.today.disabled:hover.disabled:active,.cfdatepicker table tr td.today.disabled:hover.disabled:focus,.cfdatepicker table tr td.today.disabled:hover.disabled:hover,.cfdatepicker table tr td.today.disabled:hover[disabled],.cfdatepicker table tr td.today.disabled:hover[disabled].active,.cfdatepicker table tr td.today.disabled:hover[disabled]:active,.cfdatepicker table tr td.today.disabled:hover[disabled]:focus,.cfdatepicker table tr td.today.disabled:hover[disabled]:hover,.cfdatepicker table tr td.today.disabled[disabled],.cfdatepicker table tr td.today.disabled[disabled].active,.cfdatepicker table tr td.today.disabled[disabled]:active,.cfdatepicker table tr td.today.disabled[disabled]:focus,.cfdatepicker table tr td.today.disabled[disabled]:hover,.cfdatepicker table tr td.today:hover.disabled,.cfdatepicker table tr td.today:hover.disabled.active,.cfdatepicker table tr td.today:hover.disabled:active,.cfdatepicker table tr td.today:hover.disabled:focus,.cfdatepicker table tr td.today:hover.disabled:hover,.cfdatepicker table tr td.today:hover[disabled],.cfdatepicker table tr td.today:hover[disabled].active,.cfdatepicker table tr td.today:hover[disabled]:active,.cfdatepicker table tr td.today:hover[disabled]:focus,.cfdatepicker table tr td.today:hover[disabled]:hover,.cfdatepicker table tr td.today[disabled],.cfdatepicker table tr td.today[disabled].active,.cfdatepicker table tr td.today[disabled]:active,.cfdatepicker table tr td.today[disabled]:focus,.cfdatepicker table tr td.today[disabled]:hover,fieldset[disabled] .cfdatepicker table tr td.today,fieldset[disabled] .cfdatepicker table tr td.today.active,fieldset[disabled] .cfdatepicker table tr td.today.disabled,fieldset[disabled] .cfdatepicker table tr td.today.disabled.active,fieldset[disabled] .cfdatepicker table tr td.today.disabled:active,fieldset[disabled] .cfdatepicker table tr td.today.disabled:focus,fieldset[disabled] .cfdatepicker table tr td.today.disabled:hover,fieldset[disabled] .cfdatepicker table tr td.today.disabled:hover.active,fieldset[disabled] .cfdatepicker table tr td.today.disabled:hover:active,fieldset[disabled] .cfdatepicker table tr td.today.disabled:hover:focus,fieldset[disabled] .cfdatepicker table tr td.today.disabled:hover:hover,fieldset[disabled] .cfdatepicker table tr td.today:active,fieldset[disabled] .cfdatepicker table tr td.today:focus,fieldset[disabled] .cfdatepicker table tr td.today:hover,fieldset[disabled] .cfdatepicker table tr td.today:hover.active,fieldset[disabled] .cfdatepicker table tr td.today:hover:active,fieldset[disabled] .cfdatepicker table tr td.today:hover:focus,fieldset[disabled] .cfdatepicker table tr td.today:hover:hover{background-color:#ffdb99;border-color:#ffb733}.cfdatepicker table tr td.today:hover:hover{color:#000}.cfdatepicker table tr td.today.active:hover{color:#fff}.cfdatepicker table tr td.range,.cfdatepicker table tr td.range.disabled,.cfdatepicker table tr td.range.disabled:hover,.cfdatepicker table tr td.range:hover{background:#eee;border-radius:0}.cfdatepicker table tr td.active.active,.cfdatepicker table tr td.active.disabled.active,.cfdatepicker table tr td.active.disabled:active,.cfdatepicker table tr td.active.disabled:hover.active,.cfdatepicker table tr td.active.disabled:hover:active,.cfdatepicker table tr td.active:active,.cfdatepicker table tr td.active:hover.active,.cfdatepicker table tr td.active:hover:active,.cfdatepicker table tr td.range.today.active,.cfdatepicker table tr td.range.today.disabled.active,.cfdatepicker table tr td.range.today.disabled:active,.cfdatepicker table tr td.range.today.disabled:hover.active,.cfdatepicker table tr td.range.today.disabled:hover:active,.cfdatepicker table tr td.range.today:active,.cfdatepicker table tr td.range.today:hover.active,.cfdatepicker table tr td.range.today:hover:active,.cfdatepicker table tr td.selected.active,.cfdatepicker table tr td.selected.disabled.active,.cfdatepicker table tr td.selected.disabled:active,.cfdatepicker table tr td.selected.disabled:hover.active,.cfdatepicker table tr td.selected.disabled:hover:active,.cfdatepicker table tr td.selected:active,.cfdatepicker table tr td.selected:hover.active,.cfdatepicker table tr td.selected:hover:active,.open .dropdown-toggle.cfdatepicker table tr td.active,.open .dropdown-toggle.cfdatepicker table tr td.active.disabled,.open .dropdown-toggle.cfdatepicker table tr td.active.disabled:hover,.open .dropdown-toggle.cfdatepicker table tr td.active:hover,.open .dropdown-toggle.cfdatepicker table tr td.range.today,.open .dropdown-toggle.cfdatepicker table tr td.range.today.disabled,.open .dropdown-toggle.cfdatepicker table tr td.range.today.disabled:hover,.open .dropdown-toggle.cfdatepicker table tr td.range.today:hover,.open .dropdown-toggle.cfdatepicker table tr td.selected,.open .dropdown-toggle.cfdatepicker table tr td.selected.disabled,.open .dropdown-toggle.cfdatepicker table tr td.selected.disabled:hover,.open .dropdown-toggle.cfdatepicker table tr td.selected:hover{background-image:none}.cfdatepicker table tr td.range.today,.cfdatepicker table tr td.range.today.disabled,.cfdatepicker table tr td.range.today.disabled:hover,.cfdatepicker table tr td.range.today:hover{color:#000;background-color:#f7ca77;border-color:#f1a417;border-radius:0}.cfdatepicker table tr td.range.today.active,.cfdatepicker table tr td.range.today.disabled.active,.cfdatepicker table tr td.range.today.disabled:active,.cfdatepicker table tr td.range.today.disabled:focus,.cfdatepicker table tr td.range.today.disabled:hover,.cfdatepicker table tr td.range.today.disabled:hover.active,.cfdatepicker table tr td.range.today.disabled:hover:active,.cfdatepicker table tr td.range.today.disabled:hover:focus,.cfdatepicker table tr td.range.today.disabled:hover:hover,.cfdatepicker table tr td.range.today:active,.cfdatepicker table tr td.range.today:focus,.cfdatepicker table tr td.range.today:hover,.cfdatepicker table tr td.range.today:hover.active,.cfdatepicker table tr td.range.today:hover:active,.cfdatepicker table tr td.range.today:hover:focus,.cfdatepicker table tr td.range.today:hover:hover,.open .dropdown-toggle.cfdatepicker table tr td.range.today,.open .dropdown-toggle.cfdatepicker table tr td.range.today.disabled,.open .dropdown-toggle.cfdatepicker table tr td.range.today.disabled:hover,.open .dropdown-toggle.cfdatepicker table tr td.range.today:hover{color:#000;background-color:#f4bb51;border-color:#bf800c}.cfdatepicker table tr td.range.today.disabled,.cfdatepicker table tr td.range.today.disabled.active,.cfdatepicker table tr td.range.today.disabled.disabled,.cfdatepicker table tr td.range.today.disabled.disabled.active,.cfdatepicker table tr td.range.today.disabled.disabled:active,.cfdatepicker table tr td.range.today.disabled.disabled:focus,.cfdatepicker table tr td.range.today.disabled.disabled:hover,.cfdatepicker table tr td.range.today.disabled:active,.cfdatepicker table tr td.range.today.disabled:focus,.cfdatepicker table tr td.range.today.disabled:hover,.cfdatepicker table tr td.range.today.disabled:hover.disabled,.cfdatepicker table tr td.range.today.disabled:hover.disabled.active,.cfdatepicker table tr td.range.today.disabled:hover.disabled:active,.cfdatepicker table tr td.range.today.disabled:hover.disabled:focus,.cfdatepicker table tr td.range.today.disabled:hover.disabled:hover,.cfdatepicker table tr td.range.today.disabled:hover[disabled],.cfdatepicker table tr td.range.today.disabled:hover[disabled].active,.cfdatepicker table tr td.range.today.disabled:hover[disabled]:active,.cfdatepicker table tr td.range.today.disabled:hover[disabled]:focus,.cfdatepicker table tr td.range.today.disabled:hover[disabled]:hover,.cfdatepicker table tr td.range.today.disabled[disabled],.cfdatepicker table tr td.range.today.disabled[disabled].active,.cfdatepicker table tr td.range.today.disabled[disabled]:active,.cfdatepicker table tr td.range.today.disabled[disabled]:focus,.cfdatepicker table tr td.range.today.disabled[disabled]:hover,.cfdatepicker table tr td.range.today:hover.disabled,.cfdatepicker table tr td.range.today:hover.disabled.active,.cfdatepicker table tr td.range.today:hover.disabled:active,.cfdatepicker table tr td.range.today:hover.disabled:focus,.cfdatepicker table tr td.range.today:hover.disabled:hover,.cfdatepicker table tr td.range.today:hover[disabled],.cfdatepicker table tr td.range.today:hover[disabled].active,.cfdatepicker table tr td.range.today:hover[disabled]:active,.cfdatepicker table tr td.range.today:hover[disabled]:focus,.cfdatepicker table tr td.range.today:hover[disabled]:hover,.cfdatepicker table tr td.range.today[disabled],.cfdatepicker table tr td.range.today[disabled].active,.cfdatepicker table tr td.range.today[disabled]:active,.cfdatepicker table tr td.range.today[disabled]:focus,.cfdatepicker table tr td.range.today[disabled]:hover,fieldset[disabled] .cfdatepicker table tr td.range.today,fieldset[disabled] .cfdatepicker table tr td.range.today.active,fieldset[disabled] .cfdatepicker table tr td.range.today.disabled,fieldset[disabled] .cfdatepicker table tr td.range.today.disabled.active,fieldset[disabled] .cfdatepicker table tr td.range.today.disabled:active,fieldset[disabled] .cfdatepicker table tr td.range.today.disabled:focus,fieldset[disabled] .cfdatepicker table tr td.range.today.disabled:hover,fieldset[disabled] .cfdatepicker table tr td.range.today.disabled:hover.active,fieldset[disabled] .cfdatepicker table tr td.range.today.disabled:hover:active,fieldset[disabled] .cfdatepicker table tr td.range.today.disabled:hover:focus,fieldset[disabled] .cfdatepicker table tr td.range.today.disabled:hover:hover,fieldset[disabled] .cfdatepicker table tr td.range.today:active,fieldset[disabled] .cfdatepicker table tr td.range.today:focus,fieldset[disabled] .cfdatepicker table tr td.range.today:hover,fieldset[disabled] .cfdatepicker table tr td.range.today:hover.active,fieldset[disabled] .cfdatepicker table tr td.range.today:hover:active,fieldset[disabled] .cfdatepicker table tr td.range.today:hover:focus,fieldset[disabled] .cfdatepicker table tr td.range.today:hover:hover{background-color:#f7ca77;border-color:#f1a417}.cfdatepicker table tr td.selected,.cfdatepicker table tr td.selected.disabled,.cfdatepicker table tr td.selected.disabled:hover,.cfdatepicker table tr td.selected:hover{color:#fff;background-color:#999;border-color:#555;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.cfdatepicker table tr td.selected.active,.cfdatepicker table tr td.selected.disabled.active,.cfdatepicker table tr td.selected.disabled:active,.cfdatepicker table tr td.selected.disabled:focus,.cfdatepicker table tr td.selected.disabled:hover,.cfdatepicker table tr td.selected.disabled:hover.active,.cfdatepicker table tr td.selected.disabled:hover:active,.cfdatepicker table tr td.selected.disabled:hover:focus,.cfdatepicker table tr td.selected.disabled:hover:hover,.cfdatepicker table tr td.selected:active,.cfdatepicker table tr td.selected:focus,.cfdatepicker table tr td.selected:hover,.cfdatepicker table tr td.selected:hover.active,.cfdatepicker table tr td.selected:hover:active,.cfdatepicker table tr td.selected:hover:focus,.cfdatepicker table tr td.selected:hover:hover,.open .dropdown-toggle.cfdatepicker table tr td.selected,.open .dropdown-toggle.cfdatepicker table tr td.selected.disabled,.open .dropdown-toggle.cfdatepicker table tr td.selected.disabled:hover,.open .dropdown-toggle.cfdatepicker table tr td.selected:hover{color:#fff;background-color:#858585;border-color:#373737}.cfdatepicker table tr td.selected.disabled,.cfdatepicker table tr td.selected.disabled.active,.cfdatepicker table tr td.selected.disabled.disabled,.cfdatepicker table tr td.selected.disabled.disabled.active,.cfdatepicker table tr td.selected.disabled.disabled:active,.cfdatepicker table tr td.selected.disabled.disabled:focus,.cfdatepicker table tr td.selected.disabled.disabled:hover,.cfdatepicker table tr td.selected.disabled:active,.cfdatepicker table tr td.selected.disabled:focus,.cfdatepicker table tr td.selected.disabled:hover,.cfdatepicker table tr td.selected.disabled:hover.disabled,.cfdatepicker table tr td.selected.disabled:hover.disabled.active,.cfdatepicker table tr td.selected.disabled:hover.disabled:active,.cfdatepicker table tr td.selected.disabled:hover.disabled:focus,.cfdatepicker table tr td.selected.disabled:hover.disabled:hover,.cfdatepicker table tr td.selected.disabled:hover[disabled],.cfdatepicker table tr td.selected.disabled:hover[disabled].active,.cfdatepicker table tr td.selected.disabled:hover[disabled]:active,.cfdatepicker table tr td.selected.disabled:hover[disabled]:focus,.cfdatepicker table tr td.selected.disabled:hover[disabled]:hover,.cfdatepicker table tr td.selected.disabled[disabled],.cfdatepicker table tr td.selected.disabled[disabled].active,.cfdatepicker table tr td.selected.disabled[disabled]:active,.cfdatepicker table tr td.selected.disabled[disabled]:focus,.cfdatepicker table tr td.selected.disabled[disabled]:hover,.cfdatepicker table tr td.selected:hover.disabled,.cfdatepicker table tr td.selected:hover.disabled.active,.cfdatepicker table tr td.selected:hover.disabled:active,.cfdatepicker table tr td.selected:hover.disabled:focus,.cfdatepicker table tr td.selected:hover.disabled:hover,.cfdatepicker table tr td.selected:hover[disabled],.cfdatepicker table tr td.selected:hover[disabled].active,.cfdatepicker table tr td.selected:hover[disabled]:active,.cfdatepicker table tr td.selected:hover[disabled]:focus,.cfdatepicker table tr td.selected:hover[disabled]:hover,.cfdatepicker table tr td.selected[disabled],.cfdatepicker table tr td.selected[disabled].active,.cfdatepicker table tr td.selected[disabled]:active,.cfdatepicker table tr td.selected[disabled]:focus,.cfdatepicker table tr td.selected[disabled]:hover,fieldset[disabled] .cfdatepicker table tr td.selected,fieldset[disabled] .cfdatepicker table tr td.selected.active,fieldset[disabled] .cfdatepicker table tr td.selected.disabled,fieldset[disabled] .cfdatepicker table tr td.selected.disabled.active,fieldset[disabled] .cfdatepicker table tr td.selected.disabled:active,fieldset[disabled] .cfdatepicker table tr td.selected.disabled:focus,fieldset[disabled] .cfdatepicker table tr td.selected.disabled:hover,fieldset[disabled] .cfdatepicker table tr td.selected.disabled:hover.active,fieldset[disabled] .cfdatepicker table tr td.selected.disabled:hover:active,fieldset[disabled] .cfdatepicker table tr td.selected.disabled:hover:focus,fieldset[disabled] .cfdatepicker table tr td.selected.disabled:hover:hover,fieldset[disabled] .cfdatepicker table tr td.selected:active,fieldset[disabled] .cfdatepicker table tr td.selected:focus,fieldset[disabled] .cfdatepicker table tr td.selected:hover,fieldset[disabled] .cfdatepicker table tr td.selected:hover.active,fieldset[disabled] .cfdatepicker table tr td.selected:hover:active,fieldset[disabled] .cfdatepicker table tr td.selected:hover:focus,fieldset[disabled] .cfdatepicker table tr td.selected:hover:hover{background-color:#999;border-color:#555}.cfdatepicker table tr td.active,.cfdatepicker table tr td.active.disabled,.cfdatepicker table tr td.active.disabled:hover,.cfdatepicker table tr td.active:hover{color:#fff;background-color:#428bca;border-color:#357ebd;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.cfdatepicker table tr td.active.active,.cfdatepicker table tr td.active.disabled.active,.cfdatepicker table tr td.active.disabled:active,.cfdatepicker table tr td.active.disabled:focus,.cfdatepicker table tr td.active.disabled:hover,.cfdatepicker table tr td.active.disabled:hover.active,.cfdatepicker table tr td.active.disabled:hover:active,.cfdatepicker table tr td.active.disabled:hover:focus,.cfdatepicker table tr td.active.disabled:hover:hover,.cfdatepicker table tr td.active:active,.cfdatepicker table tr td.active:focus,.cfdatepicker table tr td.active:hover,.cfdatepicker table tr td.active:hover.active,.cfdatepicker table tr td.active:hover:active,.cfdatepicker table tr td.active:hover:focus,.cfdatepicker table tr td.active:hover:hover,.open .dropdown-toggle.cfdatepicker table tr td.active,.open .dropdown-toggle.cfdatepicker table tr td.active.disabled,.open .dropdown-toggle.cfdatepicker table tr td.active.disabled:hover,.open .dropdown-toggle.cfdatepicker table tr td.active:hover{color:#fff;background-color:#3276b1;border-color:#285e8e}.cfdatepicker table tr td.active.disabled,.cfdatepicker table tr td.active.disabled.active,.cfdatepicker table tr td.active.disabled.disabled,.cfdatepicker table tr td.active.disabled.disabled.active,.cfdatepicker table tr td.active.disabled.disabled:active,.cfdatepicker table tr td.active.disabled.disabled:focus,.cfdatepicker table tr td.active.disabled.disabled:hover,.cfdatepicker table tr td.active.disabled:active,.cfdatepicker table tr td.active.disabled:focus,.cfdatepicker table tr td.active.disabled:hover,.cfdatepicker table tr td.active.disabled:hover.disabled,.cfdatepicker table tr td.active.disabled:hover.disabled.active,.cfdatepicker table tr td.active.disabled:hover.disabled:active,.cfdatepicker table tr td.active.disabled:hover.disabled:focus,.cfdatepicker table tr td.active.disabled:hover.disabled:hover,.cfdatepicker table tr td.active.disabled:hover[disabled],.cfdatepicker table tr td.active.disabled:hover[disabled].active,.cfdatepicker table tr td.active.disabled:hover[disabled]:active,.cfdatepicker table tr td.active.disabled:hover[disabled]:focus,.cfdatepicker table tr td.active.disabled:hover[disabled]:hover,.cfdatepicker table tr td.active.disabled[disabled],.cfdatepicker table tr td.active.disabled[disabled].active,.cfdatepicker table tr td.active.disabled[disabled]:active,.cfdatepicker table tr td.active.disabled[disabled]:focus,.cfdatepicker table tr td.active.disabled[disabled]:hover,.cfdatepicker table tr td.active:hover.disabled,.cfdatepicker table tr td.active:hover.disabled.active,.cfdatepicker table tr td.active:hover.disabled:active,.cfdatepicker table tr td.active:hover.disabled:focus,.cfdatepicker table tr td.active:hover.disabled:hover,.cfdatepicker table tr td.active:hover[disabled],.cfdatepicker table tr td.active:hover[disabled].active,.cfdatepicker table tr td.active:hover[disabled]:active,.cfdatepicker table tr td.active:hover[disabled]:focus,.cfdatepicker table tr td.active:hover[disabled]:hover,.cfdatepicker table tr td.active[disabled],.cfdatepicker table tr td.active[disabled].active,.cfdatepicker table tr td.active[disabled]:active,.cfdatepicker table tr td.active[disabled]:focus,.cfdatepicker table tr td.active[disabled]:hover,fieldset[disabled] .cfdatepicker table tr td.active,fieldset[disabled] .cfdatepicker table tr td.active.active,fieldset[disabled] .cfdatepicker table tr td.active.disabled,fieldset[disabled] .cfdatepicker table tr td.active.disabled.active,fieldset[disabled] .cfdatepicker table tr td.active.disabled:active,fieldset[disabled] .cfdatepicker table tr td.active.disabled:focus,fieldset[disabled] .cfdatepicker table tr td.active.disabled:hover,fieldset[disabled] .cfdatepicker table tr td.active.disabled:hover.active,fieldset[disabled] .cfdatepicker table tr td.active.disabled:hover:active,fieldset[disabled] .cfdatepicker table tr td.active.disabled:hover:focus,fieldset[disabled] .cfdatepicker table tr td.active.disabled:hover:hover,fieldset[disabled] .cfdatepicker table tr td.active:active,fieldset[disabled] .cfdatepicker table tr td.active:focus,fieldset[disabled] .cfdatepicker table tr td.active:hover,fieldset[disabled] .cfdatepicker table tr td.active:hover.active,fieldset[disabled] .cfdatepicker table tr td.active:hover:active,fieldset[disabled] .cfdatepicker table tr td.active:hover:focus,fieldset[disabled] .cfdatepicker table tr td.active:hover:hover{background-color:#428bca;border-color:#357ebd}.cfdatepicker table tr td span{display:block;width:23%;height:54px;line-height:54px;float:left;margin:1%;cursor:pointer;border-radius:4px}.cfdatepicker table tr td span:hover{background:#eee}.cfdatepicker table tr td span.disabled,.cfdatepicker table tr td span.disabled:hover{background:0 0;color:#999;cursor:default}.cfdatepicker table tr td span.active,.cfdatepicker table tr td span.active.disabled,.cfdatepicker table tr td span.active.disabled:hover,.cfdatepicker table tr td span.active:hover{color:#fff;background-color:#428bca;border-color:#357ebd;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.cfdatepicker table tr td span.active.active,.cfdatepicker table tr td span.active.disabled.active,.cfdatepicker table tr td span.active.disabled:active,.cfdatepicker table tr td span.active.disabled:focus,.cfdatepicker table tr td span.active.disabled:hover,.cfdatepicker table tr td span.active.disabled:hover.active,.cfdatepicker table tr td span.active.disabled:hover:active,.cfdatepicker table tr td span.active.disabled:hover:focus,.cfdatepicker table tr td span.active.disabled:hover:hover,.cfdatepicker table tr td span.active:active,.cfdatepicker table tr td span.active:focus,.cfdatepicker table tr td span.active:hover,.cfdatepicker table tr td span.active:hover.active,.cfdatepicker table tr td span.active:hover:active,.cfdatepicker table tr td span.active:hover:focus,.cfdatepicker table tr td span.active:hover:hover,.open .dropdown-toggle.cfdatepicker table tr td span.active,.open .dropdown-toggle.cfdatepicker table tr td span.active.disabled,.open .dropdown-toggle.cfdatepicker table tr td span.active.disabled:hover,.open .dropdown-toggle.cfdatepicker table tr td span.active:hover{color:#fff;background-color:#3276b1;border-color:#285e8e}.cfdatepicker table tr td span.active.active,.cfdatepicker table tr td span.active.disabled.active,.cfdatepicker table tr td span.active.disabled:active,.cfdatepicker table tr td span.active.disabled:hover.active,.cfdatepicker table tr td span.active.disabled:hover:active,.cfdatepicker table tr td span.active:active,.cfdatepicker table tr td span.active:hover.active,.cfdatepicker table tr td span.active:hover:active,.open .dropdown-toggle.cfdatepicker table tr td span.active,.open .dropdown-toggle.cfdatepicker table tr td span.active.disabled,.open .dropdown-toggle.cfdatepicker table tr td span.active.disabled:hover,.open .dropdown-toggle.cfdatepicker table tr td span.active:hover{background-image:none}.cfdatepicker table tr td span.active.disabled,.cfdatepicker table tr td span.active.disabled.active,.cfdatepicker table tr td span.active.disabled.disabled,.cfdatepicker table tr td span.active.disabled.disabled.active,.cfdatepicker table tr td span.active.disabled.disabled:active,.cfdatepicker table tr td span.active.disabled.disabled:focus,.cfdatepicker table tr td span.active.disabled.disabled:hover,.cfdatepicker table tr td span.active.disabled:active,.cfdatepicker table tr td span.active.disabled:focus,.cfdatepicker table tr td span.active.disabled:hover,.cfdatepicker table tr td span.active.disabled:hover.disabled,.cfdatepicker table tr td span.active.disabled:hover.disabled.active,.cfdatepicker table tr td span.active.disabled:hover.disabled:active,.cfdatepicker table tr td span.active.disabled:hover.disabled:focus,.cfdatepicker table tr td span.active.disabled:hover.disabled:hover,.cfdatepicker table tr td span.active.disabled:hover[disabled],.cfdatepicker table tr td span.active.disabled:hover[disabled].active,.cfdatepicker table tr td span.active.disabled:hover[disabled]:active,.cfdatepicker table tr td span.active.disabled:hover[disabled]:focus,.cfdatepicker table tr td span.active.disabled:hover[disabled]:hover,.cfdatepicker table tr td span.active.disabled[disabled],.cfdatepicker table tr td span.active.disabled[disabled].active,.cfdatepicker table tr td span.active.disabled[disabled]:active,.cfdatepicker table tr td span.active.disabled[disabled]:focus,.cfdatepicker table tr td span.active.disabled[disabled]:hover,.cfdatepicker table tr td span.active:hover.disabled,.cfdatepicker table tr td span.active:hover.disabled.active,.cfdatepicker table tr td span.active:hover.disabled:active,.cfdatepicker table tr td span.active:hover.disabled:focus,.cfdatepicker table tr td span.active:hover.disabled:hover,.cfdatepicker table tr td span.active:hover[disabled],.cfdatepicker table tr td span.active:hover[disabled].active,.cfdatepicker table tr td span.active:hover[disabled]:active,.cfdatepicker table tr td span.active:hover[disabled]:focus,.cfdatepicker table tr td span.active:hover[disabled]:hover,.cfdatepicker table tr td span.active[disabled],.cfdatepicker table tr td span.active[disabled].active,.cfdatepicker table tr td span.active[disabled]:active,.cfdatepicker table tr td span.active[disabled]:focus,.cfdatepicker table tr td span.active[disabled]:hover,fieldset[disabled] .cfdatepicker table tr td span.active,fieldset[disabled] .cfdatepicker table tr td span.active.active,fieldset[disabled] .cfdatepicker table tr td span.active.disabled,fieldset[disabled] .cfdatepicker table tr td span.active.disabled.active,fieldset[disabled] .cfdatepicker table tr td span.active.disabled:active,fieldset[disabled] .cfdatepicker table tr td span.active.disabled:focus,fieldset[disabled] .cfdatepicker table tr td span.active.disabled:hover,fieldset[disabled] .cfdatepicker table tr td span.active.disabled:hover.active,fieldset[disabled] .cfdatepicker table tr td span.active.disabled:hover:active,fieldset[disabled] .cfdatepicker table tr td span.active.disabled:hover:focus,fieldset[disabled] .cfdatepicker table tr td span.active.disabled:hover:hover,fieldset[disabled] .cfdatepicker table tr td span.active:active,fieldset[disabled] .cfdatepicker table tr td span.active:focus,fieldset[disabled] .cfdatepicker table tr td span.active:hover,fieldset[disabled] .cfdatepicker table tr td span.active:hover.active,fieldset[disabled] .cfdatepicker table tr td span.active:hover:active,fieldset[disabled] .cfdatepicker table tr td span.active:hover:focus,fieldset[disabled] .cfdatepicker table tr td span.active:hover:hover{background-color:#428bca;border-color:#357ebd}.cfdatepicker table tr td span.new,.cfdatepicker table tr td span.old{color:#999}.cfdatepicker th.cfdatepicker-switch{width:145px}.cfdatepicker tfoot tr th,.cfdatepicker thead tr:first-child th{cursor:pointer}.cfdatepicker tfoot tr th:hover,.cfdatepicker thead tr:first-child th:hover{background:#eee}.cfdatepicker .cw{font-size:10px;width:12px;padding:0 2px 0 5px;vertical-align:middle}.cfdatepicker thead tr:first-child th.cw{cursor:default;background-color:transparent}.input-group.date .input-group-addon i{cursor:pointer;width:16px;height:16px}.input-daterange input{text-align:center}.input-daterange input:first-child{border-radius:3px 0 0 3px}.input-daterange input:last-child{border-radius:0 3px 3px 0}.input-daterange .input-group-addon{width:auto;min-width:16px;padding:4px 5px;font-weight:400;line-height:1.42857143;text-align:center;text-shadow:0 1px 0 #fff;vertical-align:middle;background-color:#eee;border:solid #ccc;border-width:1px 0;margin-left:-5px;margin-right:-5px}.cfdatepicker.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;float:left;display:none;min-width:160px;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:5px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;color:#333;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:1.42857143}.cfdatepicker.dropdown-menu td,.cfdatepicker.dropdown-menu th{padding:4px 5px}.image-thumb{margin-left:63px;padding:6px 0 6px 6px}.image-picker-content.image-thumb-lrg{margin-bottom:6px}.image-picker-side-bar{float:left;margin-left:-68px;width:62px;max-width:100%}.image-thumb-lrg .image-picker-side-bar{background:#F6F6F6;border:1px solid #DFDFDF;float:none;margin:0 0 6px;padding:6px 6px 2px;text-align:center;width:auto}.image-picker-side-bar>img{border:1px solid #DFDFDF;width:62px}.image-thumb-lrg .image-picker-side-bar>img{-moz-box-sizing:border-box;box-sizing:border-box;max-width:100%;text-align:center;width:auto}.image-thumb .image-picker-main-content{margin-right:6px}.button.image-picker-button{margin:7px 0 0;width:110px;display:inline-block}.button.button-primary.image-picker-button{float:right;margin-left:6px;width:80px}.image-picker-main-content select{width:100%}.image-picker-sizer:disabled{opacity:.7;box-shadow:none;color:#A1A1A1}.button-primary.image-picker-button.image-picker-button-solo,.button.image-picker-button.image-picker-button-solo{width:170px;margin-top:0}.button-primary.image-picker-button.image-picker-button-solo{margin-top:7px;margin-left:0;float:none}.image-thumb-lrg .button.image-picker-button.cu-image-picker.image-picker-button-solo{width:120px}.image-thumb-lrg .button.button-primary.image-picker-button.cu-image-remover.image-picker-button-solo{float:right;margin:0 0 0 6px;width:auto}.cf-toggle-switch .btn-group>.btn-group,.cf-toggle-switch .btn-toolbar .btn-group,.cf-toggle-switch .btn-toolbar .input-group{float:left}.image-thumb-lrg .button.button-primary.image-picker-button.cu-image-remover{width:45%}input.cu-image-picker-file-select[type=file]{display:none}.rangeslider,.rangeslider__fill{background:#e6e6e6;display:block;height:8px;width:100%;-webkit-border-radius:10px;-moz-border-radius:10px;-ms-border-radius:10px;-o-border-radius:10px;border-radius:10px}.rangeslider__handle,.toggle_option_row input{display:inline-block}.rangeslider{position:relative}.rangeslider--disabled{filter:alpha(Opacity=40);opacity:.4}.rangeslider__fill{background:#0f0;position:absolute;top:0}.rangeslider__handle{background:#fff;border:1px solid #ccc;cursor:pointer;width:18px;height:18px;position:absolute;top:-5px;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;-o-border-radius:50%;border-radius:50%}input[type=range]:focus+.rangeslider .rangeslider__handle{-webkit-box-shadow:0 0 3px rgba(100,100,100,.9);-moz-box-shadow:0 0 3px rgba(100,100,100,.9);box-shadow:0 0 3px rgba(100,100,100,.9)}.recaptchatable #recaptcha_response_field{height:21px!important}.toggle_option_row{margin:4px 0}.toggle_option_row .dashicons-sort{cursor:move}.toggle_option_row .toggle_label_field,.toggle_option_row .toggle_value_field{width:136px;line-height:20px}.toggle_option_preview .button{border-radius:0;margin-right:-5px}.toggle_option_preview .button:first-child{border-radius:3px 0 0 3px}.toggle_option_preview .button:last-child{border-radius:0 3px 3px 0}.toggle_option_preview.toggle_vertical .button{width:100%}.toggle_option_preview.toggle_vertical .button:first-child{border-radius:3px 3px 0 0}.toggle_option_preview.toggle_vertical .button:last-child{border-radius:0 0 3px 3px}.cf-toggle-switch html{font-family:sans-serif}.cf-toggle-switch body{margin:0}.cf-toggle-switch article,.cf-toggle-switch aside,.cf-toggle-switch details,.cf-toggle-switch figcaption,.cf-toggle-switch figure,.cf-toggle-switch footer,.cf-toggle-switch header,.cf-toggle-switch hgroup,.cf-toggle-switch main,.cf-toggle-switch nav,.cf-toggle-switch section,.cf-toggle-switch summary{display:block}.cf-toggle-switch audio,.cf-toggle-switch canvas,.cf-toggle-switch progress,.cf-toggle-switch video{display:inline-block;vertical-align:baseline}.cf-toggle-switch audio:not([controls]){display:none;height:0}.cf-toggle-switch [hidden],.cf-toggle-switch template{display:none}.cf-toggle-switch a{background:0 0}.cf-toggle-switch a:active,.cf-toggle-switch a:hover{outline:0}.cf-toggle-switch abbr[title]{border-bottom:1px dotted}.cf-toggle-switch b,.cf-toggle-switch strong{font-weight:700}.cf-toggle-switch dfn{font-style:italic}.cf-toggle-switch h1{font-size:2em;margin:.67em 0}.cf-toggle-switch mark{background:#ff0;color:#000}.cf-toggle-switch .btn,.cf-toggle-switch .btn-danger.active,.cf-toggle-switch .btn-danger:active,.cf-toggle-switch .btn-default.active,.cf-toggle-switch .btn-default:active,.cf-toggle-switch .btn-info.active,.cf-toggle-switch .btn-info:active,.cf-toggle-switch .btn-primary.active,.cf-toggle-switch .btn-primary:active,.cf-toggle-switch .btn-success.active,.cf-toggle-switch .btn-success:active,.cf-toggle-switch .btn-warning.active,.cf-toggle-switch .btn-warning:active,.cf-toggle-switch .open .dropdown-toggle.btn-danger,.cf-toggle-switch .open .dropdown-toggle.btn-default,.cf-toggle-switch .open .dropdown-toggle.btn-info,.cf-toggle-switch .open .dropdown-toggle.btn-primary,.cf-toggle-switch .open .dropdown-toggle.btn-success,.cf-toggle-switch .open .dropdown-toggle.btn-warning{background-image:none}.cf-toggle-switch small{font-size:80%}.cf-toggle-switch sub,.cf-toggle-switch sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.cf-toggle-switch sup{top:-.5em}.cf-toggle-switch sub{bottom:-.25em}.cf-toggle-switch img{border:0}.cf-toggle-switch figure{margin:1em 40px}.cf-toggle-switch hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}.cf-toggle-switch pre{overflow:auto}.cf-toggle-switch code,.cf-toggle-switch kbd,.cf-toggle-switch pre,.cf-toggle-switch samp{font-family:monospace,monospace;font-size:1em}.cf-toggle-switch button,.cf-toggle-switch input,.cf-toggle-switch optgroup,.cf-toggle-switch select,.cf-toggle-switch textarea{color:inherit;font:inherit;margin:0}.cf-toggle-switch button{overflow:visible}.cf-toggle-switch button,.cf-toggle-switch html input[type=button],.cf-toggle-switch input[type=reset],.cf-toggle-switch input[type=submit]{-webkit-appearance:button;cursor:pointer}.cf-toggle-switch button[disabled],.cf-toggle-switch html input[disabled]{cursor:default}.cf-toggle-switch button::-moz-focus-inner,.cf-toggle-switch input::-moz-focus-inner{border:0;padding:0}.cf-toggle-switch input{line-height:normal}.cf-toggle-switch input[type=checkbox],.cf-toggle-switch input[type=radio]{box-sizing:border-box;padding:0}.cf-toggle-switch input[type=number]::-webkit-inner-spin-button,.cf-toggle-switch input[type=number]::-webkit-outer-spin-button{height:auto}.cf-toggle-switch input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}.cf-toggle-switch input[type=search]::-webkit-search-cancel-button,.cf-toggle-switch input[type=search]::-webkit-search-decoration{-webkit-appearance:none}.cf-toggle-switch fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}.cf-toggle-switch legend{border:0;padding:0}.cf-toggle-switch textarea{overflow:auto}.cf-toggle-switch optgroup{font-weight:700}.cf-toggle-switch table{border-collapse:collapse;border-spacing:0}.cf-toggle-switch td,.cf-toggle-switch th{padding:0}.cf-toggle-switch .btn{display:inline-block;margin-bottom:0;font-weight:400;text-align:center;vertical-align:middle;cursor:pointer;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.cf-toggle-switch .btn.active:focus,.cf-toggle-switch .btn:active:focus,.cf-toggle-switch .btn:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.cf-toggle-switch .btn-group .dropdown-toggle:active,.cf-toggle-switch .btn-group-vertical>.btn:focus,.cf-toggle-switch .btn-group.open .dropdown-toggle,.cf-toggle-switch .btn-group>.btn:focus{outline:0}.cf-toggle-switch .btn:focus,.cf-toggle-switch .btn:hover{color:#333;text-decoration:none}.cf-toggle-switch .btn.active,.cf-toggle-switch .btn:active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.cf-toggle-switch .btn.disabled,.cf-toggle-switch .btn[disabled],.cf-toggle-switch fieldset[disabled] .btn{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.cf-toggle-switch .btn-default{color:#333;background-color:#fff;border-color:#ccc}.cf-toggle-switch .btn-default.active,.cf-toggle-switch .btn-default:active,.cf-toggle-switch .btn-default:focus,.cf-toggle-switch .btn-default:hover,.cf-toggle-switch .open .dropdown-toggle.btn-default{color:#333;background-color:#ebebeb;border-color:#adadad}.cf-toggle-switch .btn-default.disabled,.cf-toggle-switch .btn-default.disabled.active,.cf-toggle-switch .btn-default.disabled:active,.cf-toggle-switch .btn-default.disabled:focus,.cf-toggle-switch .btn-default.disabled:hover,.cf-toggle-switch .btn-default[disabled],.cf-toggle-switch .btn-default[disabled].active,.cf-toggle-switch .btn-default[disabled]:active,.cf-toggle-switch .btn-default[disabled]:focus,.cf-toggle-switch .btn-default[disabled]:hover,.cf-toggle-switch fieldset[disabled] .btn-default,.cf-toggle-switch fieldset[disabled] .btn-default.active,.cf-toggle-switch fieldset[disabled] .btn-default:active,.cf-toggle-switch fieldset[disabled] .btn-default:focus,.cf-toggle-switch fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.cf-toggle-switch .btn-default .badge{color:#fff;background-color:#333}.cf-toggle-switch .btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.cf-toggle-switch .btn-primary.active,.cf-toggle-switch .btn-primary:active,.cf-toggle-switch .btn-primary:focus,.cf-toggle-switch .btn-primary:hover,.cf-toggle-switch .open .dropdown-toggle.btn-primary{color:#fff;background-color:#3276b1;border-color:#285e8e}.cf-toggle-switch .btn-primary.disabled,.cf-toggle-switch .btn-primary.disabled.active,.cf-toggle-switch .btn-primary.disabled:active,.cf-toggle-switch .btn-primary.disabled:focus,.cf-toggle-switch .btn-primary.disabled:hover,.cf-toggle-switch .btn-primary[disabled],.cf-toggle-switch .btn-primary[disabled].active,.cf-toggle-switch .btn-primary[disabled]:active,.cf-toggle-switch .btn-primary[disabled]:focus,.cf-toggle-switch .btn-primary[disabled]:hover,.cf-toggle-switch fieldset[disabled] .btn-primary,.cf-toggle-switch fieldset[disabled] .btn-primary.active,.cf-toggle-switch fieldset[disabled] .btn-primary:active,.cf-toggle-switch fieldset[disabled] .btn-primary:focus,.cf-toggle-switch fieldset[disabled] .btn-primary:hover{background-color:#428bca;border-color:#357ebd}.cf-toggle-switch .btn-primary .badge{color:#428bca;background-color:#fff}.cf-toggle-switch .btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.cf-toggle-switch .btn-success.active,.cf-toggle-switch .btn-success:active,.cf-toggle-switch .btn-success:focus,.cf-toggle-switch .btn-success:hover,.cf-toggle-switch .open .dropdown-toggle.btn-success{color:#fff;background-color:#47a447;border-color:#398439}.cf-toggle-switch .btn-success.disabled,.cf-toggle-switch .btn-success.disabled.active,.cf-toggle-switch .btn-success.disabled:active,.cf-toggle-switch .btn-success.disabled:focus,.cf-toggle-switch .btn-success.disabled:hover,.cf-toggle-switch .btn-success[disabled],.cf-toggle-switch .btn-success[disabled].active,.cf-toggle-switch .btn-success[disabled]:active,.cf-toggle-switch .btn-success[disabled]:focus,.cf-toggle-switch .btn-success[disabled]:hover,.cf-toggle-switch fieldset[disabled] .btn-success,.cf-toggle-switch fieldset[disabled] .btn-success.active,.cf-toggle-switch fieldset[disabled] .btn-success:active,.cf-toggle-switch fieldset[disabled] .btn-success:focus,.cf-toggle-switch fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.cf-toggle-switch .btn-success .badge{color:#5cb85c;background-color:#fff}.cf-toggle-switch .btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.cf-toggle-switch .btn-info.active,.cf-toggle-switch .btn-info:active,.cf-toggle-switch .btn-info:focus,.cf-toggle-switch .btn-info:hover,.cf-toggle-switch .open .dropdown-toggle.btn-info{color:#fff;background-color:#39b3d7;border-color:#269abc}.cf-toggle-switch .btn-info.disabled,.cf-toggle-switch .btn-info.disabled.active,.cf-toggle-switch .btn-info.disabled:active,.cf-toggle-switch .btn-info.disabled:focus,.cf-toggle-switch .btn-info.disabled:hover,.cf-toggle-switch .btn-info[disabled],.cf-toggle-switch .btn-info[disabled].active,.cf-toggle-switch .btn-info[disabled]:active,.cf-toggle-switch .btn-info[disabled]:focus,.cf-toggle-switch .btn-info[disabled]:hover,.cf-toggle-switch fieldset[disabled] .btn-info,.cf-toggle-switch fieldset[disabled] .btn-info.active,.cf-toggle-switch fieldset[disabled] .btn-info:active,.cf-toggle-switch fieldset[disabled] .btn-info:focus,.cf-toggle-switch fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.cf-toggle-switch .btn-info .badge{color:#5bc0de;background-color:#fff}.cf-toggle-switch .btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.cf-toggle-switch .btn-warning.active,.cf-toggle-switch .btn-warning:active,.cf-toggle-switch .btn-warning:focus,.cf-toggle-switch .btn-warning:hover,.cf-toggle-switch .open .dropdown-toggle.btn-warning{color:#fff;background-color:#ed9c28;border-color:#d58512}.cf-toggle-switch .btn-warning.disabled,.cf-toggle-switch .btn-warning.disabled.active,.cf-toggle-switch .btn-warning.disabled:active,.cf-toggle-switch .btn-warning.disabled:focus,.cf-toggle-switch .btn-warning.disabled:hover,.cf-toggle-switch .btn-warning[disabled],.cf-toggle-switch .btn-warning[disabled].active,.cf-toggle-switch .btn-warning[disabled]:active,.cf-toggle-switch .btn-warning[disabled]:focus,.cf-toggle-switch .btn-warning[disabled]:hover,.cf-toggle-switch fieldset[disabled] .btn-warning,.cf-toggle-switch fieldset[disabled] .btn-warning.active,.cf-toggle-switch fieldset[disabled] .btn-warning:active,.cf-toggle-switch fieldset[disabled] .btn-warning:focus,.cf-toggle-switch fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.cf-toggle-switch .btn-warning .badge{color:#f0ad4e;background-color:#fff}.cf-toggle-switch .btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.cf-toggle-switch .btn-danger.active,.cf-toggle-switch .btn-danger:active,.cf-toggle-switch .btn-danger:focus,.cf-toggle-switch .btn-danger:hover,.cf-toggle-switch .open .dropdown-toggle.btn-danger{color:#fff;background-color:#d2322d;border-color:#ac2925}.cf-toggle-switch .btn-danger.disabled,.cf-toggle-switch .btn-danger.disabled.active,.cf-toggle-switch .btn-danger.disabled:active,.cf-toggle-switch .btn-danger.disabled:focus,.cf-toggle-switch .btn-danger.disabled:hover,.cf-toggle-switch .btn-danger[disabled],.cf-toggle-switch .btn-danger[disabled].active,.cf-toggle-switch .btn-danger[disabled]:active,.cf-toggle-switch .btn-danger[disabled]:focus,.cf-toggle-switch .btn-danger[disabled]:hover,.cf-toggle-switch fieldset[disabled] .btn-danger,.cf-toggle-switch fieldset[disabled] .btn-danger.active,.cf-toggle-switch fieldset[disabled] .btn-danger:active,.cf-toggle-switch fieldset[disabled] .btn-danger:focus,.cf-toggle-switch fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.cf-toggle-switch .btn-danger .badge{color:#d9534f;background-color:#fff}.cf-toggle-switch .btn-link{color:#428bca;font-weight:400;cursor:pointer;border-radius:0}.cf-toggle-switch .btn-link,.cf-toggle-switch .btn-link:active,.cf-toggle-switch .btn-link[disabled],.cf-toggle-switch fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.cf-toggle-switch .btn-link,.cf-toggle-switch .btn-link:active,.cf-toggle-switch .btn-link:focus,.cf-toggle-switch .btn-link:hover{border-color:transparent}.cf-toggle-switch .btn-link:focus,.cf-toggle-switch .btn-link:hover{color:#2a6496;text-decoration:underline;background-color:transparent}.cf-toggle-switch .btn-link[disabled]:focus,.cf-toggle-switch .btn-link[disabled]:hover,.cf-toggle-switch fieldset[disabled] .btn-link:focus,.cf-toggle-switch fieldset[disabled] .btn-link:hover{color:#999;text-decoration:none}.cf-toggle-switch .btn-group-lg>.btn,.cf-toggle-switch .btn-lg{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.cf-toggle-switch .btn-group-sm>.btn,.cf-toggle-switch .btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.cf-toggle-switch .btn-group-xs>.btn,.cf-toggle-switch .btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.cf-toggle-switch .btn-group-vertical>.btn:not(:first-child):not(:last-child),.cf-toggle-switch .btn-group>.btn-group:not(:first-child):not(:last-child)>.btn,.cf-toggle-switch .btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.cf-toggle-switch .btn-block{display:block;width:100%;padding-left:0;padding-right:0}.cf-toggle-switch .btn-block+.btn-block{margin-top:5px}.cf-toggle-switch input[type=button].btn-block,.cf-toggle-switch input[type=reset].btn-block,.cf-toggle-switch input[type=submit].btn-block{width:100%}.cf-toggle-switch .btn-group,.cf-toggle-switch .btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.cf-toggle-switch .btn-group-vertical>.btn,.cf-toggle-switch .btn-group>.btn{position:relative;float:left}.cf-toggle-switch .btn-group-vertical>.btn.active,.cf-toggle-switch .btn-group-vertical>.btn:active,.cf-toggle-switch .btn-group-vertical>.btn:focus,.cf-toggle-switch .btn-group-vertical>.btn:hover,.cf-toggle-switch .btn-group>.btn.active,.cf-toggle-switch .btn-group>.btn:active,.cf-toggle-switch .btn-group>.btn:focus,.cf-toggle-switch .btn-group>.btn:hover{z-index:2}.cf-toggle-switch .btn-group .btn+.btn,.cf-toggle-switch .btn-group .btn+.btn-group,.cf-toggle-switch .btn-group .btn-group+.btn,.cf-toggle-switch .btn-group .btn-group+.btn-group{margin-left:-1px}.cf-toggle-switch .btn-toolbar{margin-left:-5px}.cf-toggle-switch .btn-toolbar>.btn,.cf-toggle-switch .btn-toolbar>.btn-group,.cf-toggle-switch .btn-toolbar>.input-group{margin-left:5px}.cf-toggle-switch .btn .caret,.cf-toggle-switch .btn-group>.btn:first-child{margin-left:0}.cf-toggle-switch .btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.cf-toggle-switch .btn-group>.btn:last-child:not(:first-child),.cf-toggle-switch .btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.cf-toggle-switch .btn-group>.btn-group:first-child>.btn:last-child,.cf-toggle-switch .btn-group>.btn-group:first-child>.dropdown-toggle{border-bottom-right-radius:0;border-top-right-radius:0}.cf-toggle-switch .btn-group>.btn-group:last-child>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.cf-toggle-switch .btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px}.cf-toggle-switch .btn-group>.btn-lg+.dropdown-toggle{padding-left:12px;padding-right:12px}.cf-toggle-switch .btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.cf-toggle-switch .btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.cf-toggle-switch .btn-lg .caret{border-width:5px 5px 0}.cf-toggle-switch .dropup .btn-lg .caret{border-width:0 5px 5px}.cf-toggle-switch .btn-group-vertical>.btn,.cf-toggle-switch .btn-group-vertical>.btn-group,.cf-toggle-switch .btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.cf-toggle-switch .btn-group-vertical>.btn-group>.btn{float:none}.cf-toggle-switch .btn-group-vertical>.btn+.btn,.cf-toggle-switch .btn-group-vertical>.btn+.btn-group,.cf-toggle-switch .btn-group-vertical>.btn-group+.btn,.cf-toggle-switch .btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.cf-toggle-switch .btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.cf-toggle-switch .btn-group-vertical>.btn:last-child:not(:first-child){border-bottom-left-radius:4px;border-top-right-radius:0;border-top-left-radius:0}.cf-toggle-switch .btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.cf-toggle-switch .btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.cf-toggle-switch .btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.cf-toggle-switch .btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.cf-toggle-switch .btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.cf-toggle-switch .btn-group-justified>.btn,.cf-toggle-switch .btn-group-justified>.btn-group{float:none;display:table-cell;width:1%}.cf-toggle-switch .btn-group-justified>.btn-group .btn{width:100%}.cf-toggle-switch [data-toggle=buttons]>.btn>input[type=checkbox],.cf-toggle-switch [data-toggle=buttons]>.btn>input[type=radio]{display:none}.cf-toggle-switch .btn-group-vertical>.btn-group:after,.cf-toggle-switch .btn-group-vertical>.btn-group:before,.cf-toggle-switch .btn-toolbar:after,.cf-toggle-switch .btn-toolbar:before,.cf-toggle-switch .clearfix:after,.cf-toggle-switch .clearfix:before{content:" ";display:table}.cf-toggle-switch .btn-group-vertical>.btn-group:after,.cf-toggle-switch .btn-toolbar:after,.cf-toggle-switch .clearfix:after{clear:both}.cf-toggle-switch .center-block{display:block;margin-left:auto;margin-right:auto}.cf-toggle-switch .pull-right{float:right!important}.cf-toggle-switch .pull-left{float:left!important}.cf-toggle-switch .hide{display:none!important}.cf-toggle-switch .show{display:block!important}.cf-toggle-switch .invisible{visibility:hidden}.cf-toggle-switch .text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.cf-toggle-switch .hidden{display:none!important;visibility:hidden!important}.cf-toggle-switch .affix{position:fixed}@-ms-viewport{width:device-width}.cf-toggle-switch .visible-lg,.cf-toggle-switch .visible-md,.cf-toggle-switch .visible-print,.cf-toggle-switch .visible-sm,.cf-toggle-switch .visible-xs{display:none!important}@media (max-width:767px){.cf-toggle-switch .visible-xs{display:block!important}.cf-toggle-switch table.visible-xs{display:table}.cf-toggle-switch tr.visible-xs{display:table-row!important}.cf-toggle-switch td.visible-xs,.cf-toggle-switch th.visible-xs{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.cf-toggle-switch .visible-sm{display:block!important}.cf-toggle-switch table.visible-sm{display:table}.cf-toggle-switch tr.visible-sm{display:table-row!important}.cf-toggle-switch td.visible-sm,.cf-toggle-switch th.visible-sm{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.cf-toggle-switch .visible-md{display:block!important}.cf-toggle-switch table.visible-md{display:table}.cf-toggle-switch tr.visible-md{display:table-row!important}.cf-toggle-switch td.visible-md,.cf-toggle-switch th.visible-md{display:table-cell!important}}@media (min-width:1200px){.cf-toggle-switch .visible-lg{display:block!important}.cf-toggle-switch table.visible-lg{display:table}.cf-toggle-switch tr.visible-lg{display:table-row!important}.cf-toggle-switch td.visible-lg,.cf-toggle-switch th.visible-lg{display:table-cell!important}.cf-toggle-switch .hidden-lg{display:none!important}}@media (max-width:767px){.cf-toggle-switch .hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.cf-toggle-switch .hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.cf-toggle-switch .hidden-md{display:none!important}}@media print{.cf-toggle-switch .visible-print{display:block!important}.cf-toggle-switch table.visible-print{display:table}.cf-toggle-switch tr.visible-print{display:table-row!important}.cf-toggle-switch td.visible-print,.cf-toggle-switch th.visible-print{display:table-cell!important}.cf-toggle-switch .hidden-print{display:none!important}}.cf-toggle-group-buttons{width:100%;clear:both}input.form-control.parsley-success,select.form-control.parsley-success,textarea.form-control.parsley-success{color:#468847;background-color:#DFF0D8;border-color:#D6E9C6}input.form-control.parsley-error,select.form-control.parsley-error,textarea.form-control.parsley-error{color:#B94A48;background-color:#F2DEDE;border-color:#EED3D7}.form-control.parsley-errors-list{margin:2px 0 3px;padding:0;list-style-type:none;font-size:.9em;line-height:.9em;opacity:0;color:#468847;transition:all .3s ease-in;-o-transition:all .3s ease-in;-moz-transition:all .3s ease-in;-webkit-transition:all .3s ease-in}.form-control.parsley-errors-list.filled{opacity:1}.breadcrumb a.has-error{color:red}.form-group .parsley-errors-list.filled,.form-group .parsley-errors-list.filled .parsley-type{list-style:none}.caldera-grid .cf-multi-uploader-list>ul{list-style:none;margin:0 0 12px;padding:0}.caldera-grid .cf-multi-uploader-list>ul>li{margin:0;padding:0 0 22px;position:relative;clear:both}.caldera-grid .cf-multi-uploader-list>ul>li .file-name{display:inline-block;font-weight:700;left:16px;right:0;overflow:hidden;position:absolute;text-overflow:ellipsis;white-space:nowrap}.caldera-grid .cf-multi-uploader-list>ul>li .file-name.file-uploaded{left:0}.caldera-grid .cf-multi-uploader-list>ul>li .file-size{float:right}.caldera-grid .cf-multi-uploader-list>ul>li .file-type{float:left}.caldera-grid .cf-multi-uploader-list>ul>li .file-error{clear:both;display:block}.caldera-grid .cf-multi-uploader-list>ul>li .cf-file-remove{color:#cf0000;text-decoration:none;border:0}.caldera-grid .cf-multi-uploader-list>ul>li.has-error .bar{background-color:#cf0000!important}.caldera-grid .cf-multi-uploader-list>ul>li.has-error{color:#cf0000}.has-error.cf-toggle-switch .cf-toggle-group-buttons>a{background-color:#f2dede;border-color:#dd4b39}.cfdatepicker{z-index:10011!important}
1
+ /*! GENERATED SOURCE FILE caldera-forms - v1.6.1.beta.1 - 2018-04-05 */.caldera-grid html,.cf-toggle-switch html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}.caldera-grid .sr-only,.caldera-grid svg:not(:root),.cf-toggle-switch svg:not(:root){overflow:hidden}.caldera-grid .btn,.cfdatepicker table{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.caldera-grid button,.caldera-grid select,.cf-toggle-switch button,.cf-toggle-switch select{text-transform:none}@media (min-width:768px){.caldera-grid .container{width:750px}}@media (min-width:992px){.caldera-grid .container{width:970px}}@media (min-width:1200px){.caldera-grid .container{width:1170px}}.caldera-grid article,.caldera-grid aside,.caldera-grid details,.caldera-grid figcaption,.caldera-grid figure,.caldera-grid footer,.caldera-grid header,.caldera-grid hgroup,.caldera-grid main,.caldera-grid nav,.caldera-grid section,.caldera-grid summary{display:block}.caldera-grid a{background:0 0;text-decoration:none}.caldera-grid img{vertical-align:middle}.caldera-grid *,.caldera-grid :after,.caldera-grid :before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.caldera-grid html{font-size:62.5%;-webkit-tap-highlight-color:transparent}.caldera-grid body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}.caldera-grid button,.caldera-grid input,.caldera-grid select,.caldera-grid textarea{font-family:inherit;font-size:inherit;line-height:inherit}.caldera-grid a:focus,.caldera-grid a:hover{color:#2a6496;text-decoration:underline}.caldera-grid a:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.caldera-grid .img-responsive{display:block;max-width:100%;height:auto}.caldera-grid .img-rounded{border-radius:6px}.caldera-grid .img-thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.caldera-grid .img-circle{border-radius:50%}.caldera-grid hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.caldera-grid .sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;clip:rect(0,0,0,0);border:0}.caldera-grid .container,.caldera-grid .container-fluid{margin-right:auto;margin-left:auto;padding-left:7.5px;padding-right:7.5px}@media (min-width:768px){.caldera-grid .container{width:735px}}@media (min-width:992px){.caldera-grid .container{width:955px}}@media (min-width:1200px){.caldera-grid .container{width:1155px}}.caldera-grid .row{margin-left:-7.5px;margin-right:-7.5px;max-width:100%}.caldera-grid .col-lg-1,.caldera-grid .col-lg-10,.caldera-grid .col-lg-11,.caldera-grid .col-lg-12,.caldera-grid .col-lg-2,.caldera-grid .col-lg-3,.caldera-grid .col-lg-4,.caldera-grid .col-lg-5,.caldera-grid .col-lg-6,.caldera-grid .col-lg-7,.caldera-grid .col-lg-8,.caldera-grid .col-lg-9,.caldera-grid .col-md-1,.caldera-grid .col-md-10,.caldera-grid .col-md-11,.caldera-grid .col-md-12,.caldera-grid .col-md-2,.caldera-grid .col-md-3,.caldera-grid .col-md-4,.caldera-grid .col-md-5,.caldera-grid .col-md-6,.caldera-grid .col-md-7,.caldera-grid .col-md-8,.caldera-grid .col-md-9,.caldera-grid .col-sm-1,.caldera-grid .col-sm-10,.caldera-grid .col-sm-11,.caldera-grid .col-sm-12,.caldera-grid .col-sm-2,.caldera-grid .col-sm-3,.caldera-grid .col-sm-4,.caldera-grid .col-sm-5,.caldera-grid .col-sm-6,.caldera-grid .col-sm-7,.caldera-grid .col-sm-8,.caldera-grid .col-sm-9,.caldera-grid .col-xs-1,.caldera-grid .col-xs-10,.caldera-grid .col-xs-11,.caldera-grid .col-xs-12,.caldera-grid .col-xs-2,.caldera-grid .col-xs-3,.caldera-grid .col-xs-4,.caldera-grid .col-xs-5,.caldera-grid .col-xs-6,.caldera-grid .col-xs-7,.caldera-grid .col-xs-8,.caldera-grid .col-xs-9{position:relative;padding-left:7.5px;padding-right:7.5px}.caldera-grid .col-xs-1,.caldera-grid .col-xs-10,.caldera-grid .col-xs-11,.caldera-grid .col-xs-12,.caldera-grid .col-xs-2,.caldera-grid .col-xs-3,.caldera-grid .col-xs-4,.caldera-grid .col-xs-5,.caldera-grid .col-xs-6,.caldera-grid .col-xs-7,.caldera-grid .col-xs-8,.caldera-grid .col-xs-9{float:left}.caldera-grid .col-xs-12{width:100%}.caldera-grid .col-xs-11{width:91.66666667%}.caldera-grid .col-xs-10{width:83.33333333%}.caldera-grid .col-xs-9{width:75%}.caldera-grid .col-xs-8{width:66.66666667%}.caldera-grid .col-xs-7{width:58.33333333%}.caldera-grid .col-xs-6{width:50%}.caldera-grid .col-xs-5{width:41.66666667%}.caldera-grid .col-xs-4{width:33.33333333%}.caldera-grid .col-xs-3{width:25%}.caldera-grid .col-xs-2{width:16.66666667%}.caldera-grid .col-xs-1{width:8.33333333%}.caldera-grid .col-xs-pull-12{right:100%}.caldera-grid .col-xs-pull-11{right:91.66666667%}.caldera-grid .col-xs-pull-10{right:83.33333333%}.caldera-grid .col-xs-pull-9{right:75%}.caldera-grid .col-xs-pull-8{right:66.66666667%}.caldera-grid .col-xs-pull-7{right:58.33333333%}.caldera-grid .col-xs-pull-6{right:50%}.caldera-grid .col-xs-pull-5{right:41.66666667%}.caldera-grid .col-xs-pull-4{right:33.33333333%}.caldera-grid .col-xs-pull-3{right:25%}.caldera-grid .col-xs-pull-2{right:16.66666667%}.caldera-grid .col-xs-pull-1{right:8.33333333%}.caldera-grid .col-xs-pull-0{right:0}.caldera-grid .col-xs-push-12{left:100%}.caldera-grid .col-xs-push-11{left:91.66666667%}.caldera-grid .col-xs-push-10{left:83.33333333%}.caldera-grid .col-xs-push-9{left:75%}.caldera-grid .col-xs-push-8{left:66.66666667%}.caldera-grid .col-xs-push-7{left:58.33333333%}.caldera-grid .col-xs-push-6{left:50%}.caldera-grid .col-xs-push-5{left:41.66666667%}.caldera-grid .col-xs-push-4{left:33.33333333%}.caldera-grid .col-xs-push-3{left:25%}.caldera-grid .col-xs-push-2{left:16.66666667%}.caldera-grid .col-xs-push-1{left:8.33333333%}.caldera-grid .col-xs-push-0{left:0}.caldera-grid .col-xs-offset-12{margin-left:100%}.caldera-grid .col-xs-offset-11{margin-left:91.66666667%}.caldera-grid .col-xs-offset-10{margin-left:83.33333333%}.caldera-grid .col-xs-offset-9{margin-left:75%}.caldera-grid .col-xs-offset-8{margin-left:66.66666667%}.caldera-grid .col-xs-offset-7{margin-left:58.33333333%}.caldera-grid .col-xs-offset-6{margin-left:50%}.caldera-grid .col-xs-offset-5{margin-left:41.66666667%}.caldera-grid .col-xs-offset-4{margin-left:33.33333333%}.caldera-grid .col-xs-offset-3{margin-left:25%}.caldera-grid .col-xs-offset-2{margin-left:16.66666667%}.caldera-grid .col-xs-offset-1{margin-left:8.33333333%}.caldera-grid .col-xs-offset-0{margin-left:0}@media (min-width:768px){.caldera-grid .col-sm-1,.caldera-grid .col-sm-10,.caldera-grid .col-sm-11,.caldera-grid .col-sm-12,.caldera-grid .col-sm-2,.caldera-grid .col-sm-3,.caldera-grid .col-sm-4,.caldera-grid .col-sm-5,.caldera-grid .col-sm-6,.caldera-grid .col-sm-7,.caldera-grid .col-sm-8,.caldera-grid .col-sm-9{float:left}.caldera-grid .col-sm-12{width:100%}.caldera-grid .col-sm-11{width:91.66666667%}.caldera-grid .col-sm-10{width:83.33333333%}.caldera-grid .col-sm-9{width:75%}.caldera-grid .col-sm-8{width:66.66666667%}.caldera-grid .col-sm-7{width:58.33333333%}.caldera-grid .col-sm-6{width:50%}.caldera-grid .col-sm-5{width:41.66666667%}.caldera-grid .col-sm-4{width:33.33333333%}.caldera-grid .col-sm-3{width:25%}.caldera-grid .col-sm-2{width:16.66666667%}.caldera-grid .col-sm-1{width:8.33333333%}.caldera-grid .col-sm-pull-12{right:100%}.caldera-grid .col-sm-pull-11{right:91.66666667%}.caldera-grid .col-sm-pull-10{right:83.33333333%}.caldera-grid .col-sm-pull-9{right:75%}.caldera-grid .col-sm-pull-8{right:66.66666667%}.caldera-grid .col-sm-pull-7{right:58.33333333%}.caldera-grid .col-sm-pull-6{right:50%}.caldera-grid .col-sm-pull-5{right:41.66666667%}.caldera-grid .col-sm-pull-4{right:33.33333333%}.caldera-grid .col-sm-pull-3{right:25%}.caldera-grid .col-sm-pull-2{right:16.66666667%}.caldera-grid .col-sm-pull-1{right:8.33333333%}.caldera-grid .col-sm-pull-0{right:0}.caldera-grid .col-sm-push-12{left:100%}.caldera-grid .col-sm-push-11{left:91.66666667%}.caldera-grid .col-sm-push-10{left:83.33333333%}.caldera-grid .col-sm-push-9{left:75%}.caldera-grid .col-sm-push-8{left:66.66666667%}.caldera-grid .col-sm-push-7{left:58.33333333%}.caldera-grid .col-sm-push-6{left:50%}.caldera-grid .col-sm-push-5{left:41.66666667%}.caldera-grid .col-sm-push-4{left:33.33333333%}.caldera-grid .col-sm-push-3{left:25%}.caldera-grid .col-sm-push-2{left:16.66666667%}.caldera-grid .col-sm-push-1{left:8.33333333%}.caldera-grid .col-sm-push-0{left:0}.caldera-grid .col-sm-offset-12{margin-left:100%}.caldera-grid .col-sm-offset-11{margin-left:91.66666667%}.caldera-grid .col-sm-offset-10{margin-left:83.33333333%}.caldera-grid .col-sm-offset-9{margin-left:75%}.caldera-grid .col-sm-offset-8{margin-left:66.66666667%}.caldera-grid .col-sm-offset-7{margin-left:58.33333333%}.caldera-grid .col-sm-offset-6{margin-left:50%}.caldera-grid .col-sm-offset-5{margin-left:41.66666667%}.caldera-grid .col-sm-offset-4{margin-left:33.33333333%}.caldera-grid .col-sm-offset-3{margin-left:25%}.caldera-grid .col-sm-offset-2{margin-left:16.66666667%}.caldera-grid .col-sm-offset-1{margin-left:8.33333333%}.caldera-grid .col-sm-offset-0{margin-left:0}}@media (min-width:992px){.caldera-grid .col-md-1,.caldera-grid .col-md-10,.caldera-grid .col-md-11,.caldera-grid .col-md-12,.caldera-grid .col-md-2,.caldera-grid .col-md-3,.caldera-grid .col-md-4,.caldera-grid .col-md-5,.caldera-grid .col-md-6,.caldera-grid .col-md-7,.caldera-grid .col-md-8,.caldera-grid .col-md-9{float:left}.caldera-grid .col-md-12{width:100%}.caldera-grid .col-md-11{width:91.66666667%}.caldera-grid .col-md-10{width:83.33333333%}.caldera-grid .col-md-9{width:75%}.caldera-grid .col-md-8{width:66.66666667%}.caldera-grid .col-md-7{width:58.33333333%}.caldera-grid .col-md-6{width:50%}.caldera-grid .col-md-5{width:41.66666667%}.caldera-grid .col-md-4{width:33.33333333%}.caldera-grid .col-md-3{width:25%}.caldera-grid .col-md-2{width:16.66666667%}.caldera-grid .col-md-1{width:8.33333333%}.caldera-grid .col-md-pull-12{right:100%}.caldera-grid .col-md-pull-11{right:91.66666667%}.caldera-grid .col-md-pull-10{right:83.33333333%}.caldera-grid .col-md-pull-9{right:75%}.caldera-grid .col-md-pull-8{right:66.66666667%}.caldera-grid .col-md-pull-7{right:58.33333333%}.caldera-grid .col-md-pull-6{right:50%}.caldera-grid .col-md-pull-5{right:41.66666667%}.caldera-grid .col-md-pull-4{right:33.33333333%}.caldera-grid .col-md-pull-3{right:25%}.caldera-grid .col-md-pull-2{right:16.66666667%}.caldera-grid .col-md-pull-1{right:8.33333333%}.caldera-grid .col-md-pull-0{right:0}.caldera-grid .col-md-push-12{left:100%}.caldera-grid .col-md-push-11{left:91.66666667%}.caldera-grid .col-md-push-10{left:83.33333333%}.caldera-grid .col-md-push-9{left:75%}.caldera-grid .col-md-push-8{left:66.66666667%}.caldera-grid .col-md-push-7{left:58.33333333%}.caldera-grid .col-md-push-6{left:50%}.caldera-grid .col-md-push-5{left:41.66666667%}.caldera-grid .col-md-push-4{left:33.33333333%}.caldera-grid .col-md-push-3{left:25%}.caldera-grid .col-md-push-2{left:16.66666667%}.caldera-grid .col-md-push-1{left:8.33333333%}.caldera-grid .col-md-push-0{left:0}.caldera-grid .col-md-offset-12{margin-left:100%}.caldera-grid .col-md-offset-11{margin-left:91.66666667%}.caldera-grid .col-md-offset-10{margin-left:83.33333333%}.caldera-grid .col-md-offset-9{margin-left:75%}.caldera-grid .col-md-offset-8{margin-left:66.66666667%}.caldera-grid .col-md-offset-7{margin-left:58.33333333%}.caldera-grid .col-md-offset-6{margin-left:50%}.caldera-grid .col-md-offset-5{margin-left:41.66666667%}.caldera-grid .col-md-offset-4{margin-left:33.33333333%}.caldera-grid .col-md-offset-3{margin-left:25%}.caldera-grid .col-md-offset-2{margin-left:16.66666667%}.caldera-grid .col-md-offset-1{margin-left:8.33333333%}.caldera-grid .col-md-offset-0{margin-left:0}}@-ms-viewport{width:device-width}@media (min-width:1200px){.caldera-grid .col-lg-1,.caldera-grid .col-lg-10,.caldera-grid .col-lg-11,.caldera-grid .col-lg-12,.caldera-grid .col-lg-2,.caldera-grid .col-lg-3,.caldera-grid .col-lg-4,.caldera-grid .col-lg-5,.caldera-grid .col-lg-6,.caldera-grid .col-lg-7,.caldera-grid .col-lg-8,.caldera-grid .col-lg-9{float:left}.caldera-grid .col-lg-12{width:100%}.caldera-grid .col-lg-11{width:91.66666667%}.caldera-grid .col-lg-10{width:83.33333333%}.caldera-grid .col-lg-9{width:75%}.caldera-grid .col-lg-8{width:66.66666667%}.caldera-grid .col-lg-7{width:58.33333333%}.caldera-grid .col-lg-6{width:50%}.caldera-grid .col-lg-5{width:41.66666667%}.caldera-grid .col-lg-4{width:33.33333333%}.caldera-grid .col-lg-3{width:25%}.caldera-grid .col-lg-2{width:16.66666667%}.caldera-grid .col-lg-1{width:8.33333333%}.caldera-grid .col-lg-pull-12{right:100%}.caldera-grid .col-lg-pull-11{right:91.66666667%}.caldera-grid .col-lg-pull-10{right:83.33333333%}.caldera-grid .col-lg-pull-9{right:75%}.caldera-grid .col-lg-pull-8{right:66.66666667%}.caldera-grid .col-lg-pull-7{right:58.33333333%}.caldera-grid .col-lg-pull-6{right:50%}.caldera-grid .col-lg-pull-5{right:41.66666667%}.caldera-grid .col-lg-pull-4{right:33.33333333%}.caldera-grid .col-lg-pull-3{right:25%}.caldera-grid .col-lg-pull-2{right:16.66666667%}.caldera-grid .col-lg-pull-1{right:8.33333333%}.caldera-grid .col-lg-pull-0{right:0}.caldera-grid .col-lg-push-12{left:100%}.caldera-grid .col-lg-push-11{left:91.66666667%}.caldera-grid .col-lg-push-10{left:83.33333333%}.caldera-grid .col-lg-push-9{left:75%}.caldera-grid .col-lg-push-8{left:66.66666667%}.caldera-grid .col-lg-push-7{left:58.33333333%}.caldera-grid .col-lg-push-6{left:50%}.caldera-grid .col-lg-push-5{left:41.66666667%}.caldera-grid .col-lg-push-4{left:33.33333333%}.caldera-grid .col-lg-push-3{left:25%}.caldera-grid .col-lg-push-2{left:16.66666667%}.caldera-grid .col-lg-push-1{left:8.33333333%}.caldera-grid .col-lg-push-0{left:0}.caldera-grid .col-lg-offset-12{margin-left:100%}.caldera-grid .col-lg-offset-11{margin-left:91.66666667%}.caldera-grid .col-lg-offset-10{margin-left:83.33333333%}.caldera-grid .col-lg-offset-9{margin-left:75%}.caldera-grid .col-lg-offset-8{margin-left:66.66666667%}.caldera-grid .col-lg-offset-7{margin-left:58.33333333%}.caldera-grid .col-lg-offset-6{margin-left:50%}.caldera-grid .col-lg-offset-5{margin-left:41.66666667%}.caldera-grid .col-lg-offset-4{margin-left:33.33333333%}.caldera-grid .col-lg-offset-3{margin-left:25%}.caldera-grid .col-lg-offset-2{margin-left:16.66666667%}.caldera-grid .col-lg-offset-1{margin-left:8.33333333%}.caldera-grid .col-lg-offset-0{margin-left:0}}.caldera-grid .clearfix:after,.caldera-grid .clearfix:before,.caldera-grid .container-fluid:after,.caldera-grid .container-fluid:before,.caldera-grid .container:after,.caldera-grid .container:before,.caldera-grid .row:after,.caldera-grid .row:before{content:" ";display:table}.caldera-grid .clearfix:after,.caldera-grid .container-fluid:after,.caldera-grid .container:after,.caldera-grid .row:after{clear:both}.caldera-grid .center-block{display:block;margin-left:auto;margin-right:auto}.caldera-grid .pull-right{float:right!important}.caldera-grid .pull-left{float:left!important}.caldera-grid .hide{display:none!important}.caldera-grid .show{display:block!important}.caldera-grid .hidden,.caldera-grid .visible-lg,.caldera-grid .visible-md,.caldera-grid .visible-sm,.caldera-grid .visible-xs{display:none!important}.caldera-grid .invisible{visibility:hidden}.caldera-grid .text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.caldera-grid .alert .alert-link,.caldera-grid b,.caldera-grid strong{font-weight:700}.caldera-grid .hidden{visibility:hidden!important}.caldera-grid .affix{position:fixed}@-ms-viewport{width:device-width}@media (max-width:767px){.caldera-grid .visible-xs{display:block!important}.caldera-grid table.visible-xs{display:table}.caldera-grid tr.visible-xs{display:table-row!important}.caldera-grid td.visible-xs,.caldera-grid th.visible-xs{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.caldera-grid .visible-sm{display:block!important}.caldera-grid table.visible-sm{display:table}.caldera-grid tr.visible-sm{display:table-row!important}.caldera-grid td.visible-sm,.caldera-grid th.visible-sm{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.caldera-grid .visible-md{display:block!important}.caldera-grid table.visible-md{display:table}.caldera-grid tr.visible-md{display:table-row!important}.caldera-grid td.visible-md,.caldera-grid th.visible-md{display:table-cell!important}}@media (min-width:1200px){.caldera-grid .visible-lg{display:block!important}.caldera-grid table.visible-lg{display:table}.caldera-grid tr.visible-lg{display:table-row!important}.caldera-grid td.visible-lg,.caldera-grid th.visible-lg{display:table-cell!important}.caldera-grid .hidden-lg{display:none!important}}@media (max-width:767px){.caldera-grid .hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.caldera-grid .hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.caldera-grid .hidden-md{display:none!important}}.caldera-grid .visible-print{display:none!important}@media print{.caldera-grid .visible-print{display:block!important}.caldera-grid table.visible-print{display:table}.caldera-grid tr.visible-print{display:table-row!important}.caldera-grid td.visible-print,.caldera-grid th.visible-print{display:table-cell!important}.caldera-grid .hidden-print{display:none!important}}input.parsley-success,select.parsley-success,textarea.parsley-success{color:#468847;background-color:#DFF0D8;border:1px solid #D6E9C6}input.parsley-error,select.parsley-error,textarea.parsley-error{color:#B94A48;background-color:#F2DEDE;border:1px solid #EED3D7}.parsley-errors-list{margin:2px 0 3px;padding:0;list-style-type:none;font-size:.9em;line-height:.9em;opacity:0;transition:all .3s ease-in;-o-transition:all .3s ease-in;-moz-transition:all .3s ease-in;-webkit-transition:all .3s ease-in}.parsley-errors-list.filled{opacity:1}.caldera-grid .alert{padding:8px;margin-bottom:18px;border-radius:2px}.caldera-grid .alert-dismissable{padding-right:28px}.caldera-grid .alert-success{background-color:#dff0d8;border-color:#a3d48e;color:#3c763d}.caldera-grid .alert-success hr{border-top-color:#93cd7c}.caldera-grid .alert-success .alert-link{color:#2b542c}.caldera-grid .alert-info{background-color:#d9edf7;border-color:#85c5e5;color:#31708f}.caldera-grid .alert-info hr{border-top-color:#70bbe1}.caldera-grid .alert-info .alert-link{color:#245269}.caldera-grid .alert-warning{background-color:#f9edbe;border-color:#f0c36d;color:#333}.caldera-grid .alert-warning hr{border-top-color:#eeb956}.caldera-grid .alert-warning .alert-link{color:#1a1a1a}.caldera-grid .alert-danger,.caldera-grid .alert-error{background-color:#f2dede;border-color:#d59595;color:#a94442}.caldera-grid .alert-danger hr,.caldera-grid .alert-error hr{border-top-color:#ce8383}.caldera-grid .alert-danger .alert-link,.caldera-grid .alert-error .alert-link{color:#843534}.caldera-grid .alert-danger,.caldera-grid .alert-error,.caldera-grid .alert-info,.caldera-grid .alert-success,.caldera-grid .alert-warning{text-shadow:0 1px 0 rgba(255,255,255,.5)}.caldera-grid .has-error .form-control:focus,.caldera-grid .has-error .form-control:hover{border-color:#dd4b39}.caldera-grid.cf_processing{background:url(../images/loading.gif) center center/30px auto no-repeat rgba(0,0,0,0)}.caldera-grid.cf_processing>*{opacity:.5}.caldera-grid html{font-family:sans-serif}.caldera-grid body{margin:0}.caldera-grid article,.caldera-grid aside,.caldera-grid details,.caldera-grid figcaption,.caldera-grid figure,.caldera-grid footer,.caldera-grid header,.caldera-grid hgroup,.caldera-grid main,.caldera-grid menu,.caldera-grid nav,.caldera-grid section,.caldera-grid summary{display:block}.caldera-grid audio,.caldera-grid canvas,.caldera-grid progress,.caldera-grid video{display:inline-block;vertical-align:baseline}.caldera-grid audio:not([controls]){display:none;height:0}.caldera-grid [hidden],.caldera-grid template{display:none}.caldera-grid a{background-color:transparent}.caldera-grid a:active,.caldera-grid a:hover{outline:0}.caldera-grid abbr[title]{border-bottom:1px dotted}.caldera-grid dfn{font-style:italic}.caldera-grid h1{font-size:2em;margin:.67em 0}.caldera-grid mark{background:#ff0;color:#000}.caldera-grid small{font-size:80%}.caldera-grid sub,.caldera-grid sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.caldera-grid sup{top:-.5em}.caldera-grid sub{bottom:-.25em}.caldera-grid img{border:0}.caldera-grid figure{margin:1em 40px}.caldera-grid hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}.caldera-grid pre{overflow:auto}.caldera-grid code,.caldera-grid kbd,.caldera-grid pre,.caldera-grid samp{font-family:monospace,monospace;font-size:1em}.caldera-grid button,.caldera-grid input,.caldera-grid optgroup,.caldera-grid select,.caldera-grid textarea{font:inherit;margin:0}.caldera-grid button{overflow:visible}.caldera-grid button,.caldera-grid html input[type=button],.caldera-grid input[type=reset],.caldera-grid input[type=submit]{-webkit-appearance:button;cursor:pointer}.caldera-grid button[disabled],.caldera-grid html input[disabled]{cursor:default}.caldera-grid button::-moz-focus-inner,.caldera-grid input::-moz-focus-inner{border:0;padding:0}.caldera-grid input{line-height:normal}.caldera-grid input[type=checkbox],.caldera-grid input[type=radio]{box-sizing:border-box;padding:0}.caldera-grid input[type=number]::-webkit-inner-spin-button,.caldera-grid input[type=number]::-webkit-outer-spin-button{height:auto}.caldera-grid input[type=search]{-webkit-appearance:textfield;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.caldera-grid input[type=search]::-webkit-search-cancel-button,.caldera-grid input[type=search]::-webkit-search-decoration{-webkit-appearance:none}.caldera-grid textarea{overflow:auto}.caldera-grid optgroup{font-weight:700}.caldera-grid table{border-collapse:collapse;border-spacing:0}.caldera-grid td,.caldera-grid th{padding:0}@media print{.caldera-grid *,.caldera-grid :after,.caldera-grid :before{background:0 0!important;color:#000!important;box-shadow:none!important;text-shadow:none!important}.caldera-grid a,.caldera-grid a:visited{text-decoration:underline}.caldera-grid a[href]:after{content:" (" attr(href) ")"}.caldera-grid abbr[title]:after{content:" (" attr(title) ")"}.caldera-grid a[href^="#"]:after,.caldera-grid a[href^="javascript:"]:after{content:""}.caldera-grid blockquote,.caldera-grid pre{border:1px solid #999;page-break-inside:avoid}.caldera-grid thead{display:table-header-group}.caldera-grid img,.caldera-grid tr{page-break-inside:avoid}.caldera-grid img{max-width:100%!important}.caldera-grid h2,.caldera-grid h3,.caldera-grid p{orphans:3;widows:3}.caldera-grid h2,.caldera-grid h3{page-break-after:avoid}.caldera-grid select{background:#fff!important}.caldera-grid .navbar{display:none}.caldera-grid .btn>.caret,.caldera-grid .dropup>.btn>.caret{border-top-color:#000!important}.caldera-grid .label{border:1px solid #000}.caldera-grid .table{border-collapse:collapse!important}.caldera-grid .table td,.caldera-grid .table th{background-color:#fff!important}.caldera-grid .table-bordered td,.caldera-grid .table-bordered th{border:1px solid #ddd!important}}.caldera-grid .btn,.caldera-grid .btn-danger.active,.caldera-grid .btn-danger:active,.caldera-grid .btn-default.active,.caldera-grid .btn-default:active,.caldera-grid .btn-info.active,.caldera-grid .btn-info:active,.caldera-grid .btn-primary.active,.caldera-grid .btn-primary:active,.caldera-grid .btn-success.active,.caldera-grid .btn-success:active,.caldera-grid .btn-warning.active,.caldera-grid .btn-warning:active,.caldera-grid .form-control,.open>.dropdown-toggle.caldera-grid .btn-danger,.open>.dropdown-toggle.caldera-grid .btn-default,.open>.dropdown-toggle.caldera-grid .btn-info,.open>.dropdown-toggle.caldera-grid .btn-primary,.open>.dropdown-toggle.caldera-grid .btn-success,.open>.dropdown-toggle.caldera-grid .btn-warning{background-image:none}.caldera-grid fieldset{padding:0;margin:0;border:0;min-width:0}.caldera-grid legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}.caldera-grid label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}.caldera-grid input[type=checkbox],.caldera-grid input[type=radio]{margin:0;line-height:normal}.caldera-grid .form-control,.caldera-grid output{font-size:14px;line-height:1.42857143;color:#555;display:block}.caldera-grid input[type=file]{display:block}.caldera-grid input[type=range]{display:block;width:100%}.caldera-grid select[multiple],.caldera-grid select[size]{height:auto}.caldera-grid input[type=checkbox]:focus,.caldera-grid input[type=file]:focus,.caldera-grid input[type=radio]:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.caldera-grid input[type=checkbox]{-webkit-appearance:checkbox}.caldera-grid input[type=radio]{-webkit-appearance:radio}.caldera-grid output{padding-top:7px}.caldera-grid .form-control{width:100%;height:34px;padding:6px 12px;background-color:#fff;border:1px solid #ccc;border-radius:2px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.caldera-grid .form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.caldera-grid .form-control::-moz-placeholder{color:#999;opacity:1}.caldera-grid .form-control:-ms-input-placeholder{color:#999}.caldera-grid .form-control::-webkit-input-placeholder{color:#999}.caldera-grid .has-success .checkbox,.caldera-grid .has-success .checkbox-inline,.caldera-grid .has-success .control-label,.caldera-grid .has-success .form-control-feedback,.caldera-grid .has-success .help-block,.caldera-grid .has-success .radio,.caldera-grid .has-success .radio-inline,.caldera-grid .has-success.checkbox label,.caldera-grid .has-success.checkbox-inline label,.caldera-grid .has-success.radio label,.caldera-grid .has-success.radio-inline label{color:#3c763d}.caldera-grid .form-control[disabled],.caldera-grid .form-control[readonly],fieldset[disabled] .caldera-grid .form-control{background-color:#eee;opacity:1}.caldera-grid .form-control[disabled],fieldset[disabled] .caldera-grid .form-control{cursor:not-allowed}textarea .caldera-grid .form-control{height:auto}@media screen and (-webkit-min-device-pixel-ratio:0){.caldera-grid input[type=date],.caldera-grid input[type=datetime-local],.caldera-grid input[type=month],.caldera-grid input[type=time]{line-height:34px}.caldera-grid input[type=date].input-sm,.caldera-grid input[type=datetime-local].input-sm,.caldera-grid input[type=month].input-sm,.caldera-grid input[type=time].input-sm,.input-group-sm .caldera-grid input[type=date],.input-group-sm .caldera-grid input[type=datetime-local],.input-group-sm .caldera-grid input[type=month],.input-group-sm .caldera-grid input[type=time]{line-height:30px}.caldera-grid input[type=date].input-lg,.caldera-grid input[type=datetime-local].input-lg,.caldera-grid input[type=month].input-lg,.caldera-grid input[type=time].input-lg,.input-group-lg .caldera-grid input[type=date],.input-group-lg .caldera-grid input[type=datetime-local],.input-group-lg .caldera-grid input[type=month],.input-group-lg .caldera-grid input[type=time]{line-height:46px}}.caldera-grid .form-group{margin-bottom:15px}.caldera-grid .checkbox,.caldera-grid .radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.caldera-grid .checkbox label,.caldera-grid .radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.caldera-grid .checkbox input[type=checkbox],.caldera-grid .checkbox-inline input[type=checkbox],.caldera-grid .radio input[type=radio],.caldera-grid .radio-inline input[type=radio]{margin-left:-20px}.caldera-grid .checkbox+.checkbox,.caldera-grid .radio+.radio{margin-top:-5px}.caldera-grid .checkbox-inline,.caldera-grid .radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:400;cursor:pointer}.caldera-grid .checkbox-inline+.checkbox-inline,.caldera-grid .radio-inline+.radio-inline{margin-top:0;margin-left:10px}.caldera-grid .checkbox-inline.disabled,.caldera-grid .checkbox.disabled label,.caldera-grid .radio-inline.disabled,.caldera-grid .radio.disabled label,.caldera-grid input[type=checkbox].disabled,.caldera-grid input[type=checkbox][disabled],.caldera-grid input[type=radio].disabled,.caldera-grid input[type=radio][disabled],fieldset[disabled] .caldera-grid .checkbox label,fieldset[disabled] .caldera-grid .checkbox-inline,fieldset[disabled] .caldera-grid .radio label,fieldset[disabled] .caldera-grid .radio-inline,fieldset[disabled] .caldera-grid input[type=checkbox],fieldset[disabled] .caldera-grid input[type=radio]{cursor:not-allowed}.caldera-grid .form-control-static{padding-top:7px;padding-bottom:7px;margin-bottom:0;min-height:34px}.caldera-grid .form-control-static.input-lg,.caldera-grid .form-control-static.input-sm{padding-left:0;padding-right:0}.caldera-grid .input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:1px}select.caldera-grid .input-sm{height:30px;line-height:30px}select[multiple].caldera-grid .input-sm,textarea.caldera-grid .input-sm{height:auto}.caldera-grid .form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:1px}select.caldera-grid .form-group-sm .form-control{height:30px;line-height:30px}select[multiple].caldera-grid .form-group-sm .form-control,textarea.caldera-grid .form-group-sm .form-control{height:auto}.caldera-grid .form-group-sm .form-control-static{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;min-height:32px}.caldera-grid .input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:4px}select.caldera-grid .input-lg{height:46px;line-height:46px}select[multiple].caldera-grid .input-lg,textarea.caldera-grid .input-lg{height:auto}.caldera-grid .form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:4px}select.caldera-grid .form-group-lg .form-control{height:46px;line-height:46px}select[multiple].caldera-grid .form-group-lg .form-control,textarea.caldera-grid .form-group-lg .form-control{height:auto}.caldera-grid .form-group-lg .form-control-static{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;min-height:38px}.caldera-grid .has-feedback{position:relative}.caldera-grid .has-feedback .form-control{padding-right:42.5px}.caldera-grid .form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.caldera-grid .input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.caldera-grid .input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.caldera-grid .has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.caldera-grid .has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.caldera-grid .has-success .input-group-addon{color:#3c763d;border-color:#3c763d;background-color:#dff0d8}.caldera-grid .has-warning .checkbox,.caldera-grid .has-warning .checkbox-inline,.caldera-grid .has-warning .control-label,.caldera-grid .has-warning .form-control-feedback,.caldera-grid .has-warning .help-block,.caldera-grid .has-warning .radio,.caldera-grid .has-warning .radio-inline,.caldera-grid .has-warning.checkbox label,.caldera-grid .has-warning.checkbox-inline label,.caldera-grid .has-warning.radio label,.caldera-grid .has-warning.radio-inline label{color:#8a6d3b}.caldera-grid .has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.caldera-grid .has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.caldera-grid .has-warning .input-group-addon{color:#8a6d3b;border-color:#8a6d3b;background-color:#fcf8e3}.caldera-grid .has-error .checkbox,.caldera-grid .has-error .checkbox-inline,.caldera-grid .has-error .control-label,.caldera-grid .has-error .form-control-feedback,.caldera-grid .has-error .help-block,.caldera-grid .has-error .radio,.caldera-grid .has-error .radio-inline,.caldera-grid .has-error.checkbox label,.caldera-grid .has-error.checkbox-inline label,.caldera-grid .has-error.radio label,.caldera-grid .has-error.radio-inline label{color:#a94442}.caldera-grid .has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.caldera-grid .has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.caldera-grid .has-error .input-group-addon{color:#a94442;border-color:#a94442;background-color:#f2dede}.caldera-grid .has-feedback label~.form-control-feedback{top:25px}.caldera-grid .has-feedback label.sr-only~.form-control-feedback{top:0}.caldera-grid .help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.caldera-grid .form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.caldera-grid .form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.caldera-grid .form-inline .form-control-static{display:inline-block}.caldera-grid .form-inline .input-group{display:inline-table;vertical-align:middle}.caldera-grid .form-inline .input-group .form-control,.caldera-grid .form-inline .input-group .input-group-addon,.caldera-grid .form-inline .input-group .input-group-btn{width:auto}.caldera-grid .form-inline .input-group>.form-control{width:100%}.caldera-grid .form-inline .control-label{margin-bottom:0;vertical-align:middle}.caldera-grid .form-inline .checkbox,.caldera-grid .form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.caldera-grid .form-inline .checkbox label,.caldera-grid .form-inline .radio label{padding-left:0}.caldera-grid .form-inline .checkbox input[type=checkbox],.caldera-grid .form-inline .radio input[type=radio]{position:relative;margin-left:0}.caldera-grid .form-inline .has-feedback .form-control-feedback{top:0}.caldera-grid .form-horizontal .control-label{text-align:right;margin-bottom:0;padding-top:7px}}.caldera-grid .form-horizontal .checkbox,.caldera-grid .form-horizontal .checkbox-inline,.caldera-grid .form-horizontal .radio,.caldera-grid .form-horizontal .radio-inline{margin-top:0;margin-bottom:0;padding-top:7px}.caldera-grid .form-horizontal .checkbox,.caldera-grid .form-horizontal .radio{min-height:27px}.caldera-grid .form-horizontal .form-group{margin-left:-15px;margin-right:-15px}.caldera-grid .form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.caldera-grid .form-horizontal .form-group-lg .control-label{padding-top:14.33px}.caldera-grid .form-horizontal .form-group-sm .control-label{padding-top:6px}}.caldera-grid .btn{display:inline-block;margin-bottom:0;font-weight:400;text-align:center;vertical-align:middle;touch-action:manipulation;cursor:pointer;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:2px;user-select:none}.caldera-grid .btn.active.focus,.caldera-grid .btn.active:focus,.caldera-grid .btn.focus,.caldera-grid .btn:active.focus,.caldera-grid .btn:active:focus,.caldera-grid .btn:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.caldera-grid .btn.focus,.caldera-grid .btn:focus,.caldera-grid .btn:hover{color:#333;text-decoration:none}.caldera-grid .btn.active,.caldera-grid .btn:active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.caldera-grid .btn.disabled,.caldera-grid .btn[disabled],fieldset[disabled] .caldera-grid .btn{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.caldera-grid .btn-default{color:#333;background-color:#fff;border-color:#ccc}.caldera-grid .btn-default.active,.caldera-grid .btn-default.focus,.caldera-grid .btn-default:active,.caldera-grid .btn-default:focus,.caldera-grid .btn-default:hover,.open>.dropdown-toggle.caldera-grid .btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.caldera-grid .btn-default.disabled,.caldera-grid .btn-default.disabled.active,.caldera-grid .btn-default.disabled.focus,.caldera-grid .btn-default.disabled:active,.caldera-grid .btn-default.disabled:focus,.caldera-grid .btn-default.disabled:hover,.caldera-grid .btn-default[disabled],.caldera-grid .btn-default[disabled].active,.caldera-grid .btn-default[disabled].focus,.caldera-grid .btn-default[disabled]:active,.caldera-grid .btn-default[disabled]:focus,.caldera-grid .btn-default[disabled]:hover,fieldset[disabled] .caldera-grid .btn-default,fieldset[disabled] .caldera-grid .btn-default.active,fieldset[disabled] .caldera-grid .btn-default.focus,fieldset[disabled] .caldera-grid .btn-default:active,fieldset[disabled] .caldera-grid .btn-default:focus,fieldset[disabled] .caldera-grid .btn-default:hover{background-color:#fff;border-color:#ccc}.caldera-grid .btn-default .badge{color:#fff;background-color:#333}.caldera-grid .btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.caldera-grid .btn-primary.active,.caldera-grid .btn-primary.focus,.caldera-grid .btn-primary:active,.caldera-grid .btn-primary:focus,.caldera-grid .btn-primary:hover,.open>.dropdown-toggle.caldera-grid .btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.caldera-grid .btn-primary.disabled,.caldera-grid .btn-primary.disabled.active,.caldera-grid .btn-primary.disabled.focus,.caldera-grid .btn-primary.disabled:active,.caldera-grid .btn-primary.disabled:focus,.caldera-grid .btn-primary.disabled:hover,.caldera-grid .btn-primary[disabled],.caldera-grid .btn-primary[disabled].active,.caldera-grid .btn-primary[disabled].focus,.caldera-grid .btn-primary[disabled]:active,.caldera-grid .btn-primary[disabled]:focus,.caldera-grid .btn-primary[disabled]:hover,fieldset[disabled] .caldera-grid .btn-primary,fieldset[disabled] .caldera-grid .btn-primary.active,fieldset[disabled] .caldera-grid .btn-primary.focus,fieldset[disabled] .caldera-grid .btn-primary:active,fieldset[disabled] .caldera-grid .btn-primary:focus,fieldset[disabled] .caldera-grid .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.caldera-grid .btn-primary .badge{color:#337ab7;background-color:#fff}.caldera-grid .btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.caldera-grid .btn-success.active,.caldera-grid .btn-success.focus,.caldera-grid .btn-success:active,.caldera-grid .btn-success:focus,.caldera-grid .btn-success:hover,.open>.dropdown-toggle.caldera-grid .btn-success{color:#fff;background-color:#449d44;border-color:#398439}.caldera-grid .btn-success.disabled,.caldera-grid .btn-success.disabled.active,.caldera-grid .btn-success.disabled.focus,.caldera-grid .btn-success.disabled:active,.caldera-grid .btn-success.disabled:focus,.caldera-grid .btn-success.disabled:hover,.caldera-grid .btn-success[disabled],.caldera-grid .btn-success[disabled].active,.caldera-grid .btn-success[disabled].focus,.caldera-grid .btn-success[disabled]:active,.caldera-grid .btn-success[disabled]:focus,.caldera-grid .btn-success[disabled]:hover,fieldset[disabled] .caldera-grid .btn-success,fieldset[disabled] .caldera-grid .btn-success.active,fieldset[disabled] .caldera-grid .btn-success.focus,fieldset[disabled] .caldera-grid .btn-success:active,fieldset[disabled] .caldera-grid .btn-success:focus,fieldset[disabled] .caldera-grid .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.caldera-grid .btn-success .badge{color:#5cb85c;background-color:#fff}.caldera-grid .btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.caldera-grid .btn-info.active,.caldera-grid .btn-info.focus,.caldera-grid .btn-info:active,.caldera-grid .btn-info:focus,.caldera-grid .btn-info:hover,.open>.dropdown-toggle.caldera-grid .btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.caldera-grid .btn-info.disabled,.caldera-grid .btn-info.disabled.active,.caldera-grid .btn-info.disabled.focus,.caldera-grid .btn-info.disabled:active,.caldera-grid .btn-info.disabled:focus,.caldera-grid .btn-info.disabled:hover,.caldera-grid .btn-info[disabled],.caldera-grid .btn-info[disabled].active,.caldera-grid .btn-info[disabled].focus,.caldera-grid .btn-info[disabled]:active,.caldera-grid .btn-info[disabled]:focus,.caldera-grid .btn-info[disabled]:hover,fieldset[disabled] .caldera-grid .btn-info,fieldset[disabled] .caldera-grid .btn-info.active,fieldset[disabled] .caldera-grid .btn-info.focus,fieldset[disabled] .caldera-grid .btn-info:active,fieldset[disabled] .caldera-grid .btn-info:focus,fieldset[disabled] .caldera-grid .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.caldera-grid .btn-info .badge{color:#5bc0de;background-color:#fff}.caldera-grid .btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.caldera-grid .btn-warning.active,.caldera-grid .btn-warning.focus,.caldera-grid .btn-warning:active,.caldera-grid .btn-warning:focus,.caldera-grid .btn-warning:hover,.open>.dropdown-toggle.caldera-grid .btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.caldera-grid .btn-warning.disabled,.caldera-grid .btn-warning.disabled.active,.caldera-grid .btn-warning.disabled.focus,.caldera-grid .btn-warning.disabled:active,.caldera-grid .btn-warning.disabled:focus,.caldera-grid .btn-warning.disabled:hover,.caldera-grid .btn-warning[disabled],.caldera-grid .btn-warning[disabled].active,.caldera-grid .btn-warning[disabled].focus,.caldera-grid .btn-warning[disabled]:active,.caldera-grid .btn-warning[disabled]:focus,.caldera-grid .btn-warning[disabled]:hover,fieldset[disabled] .caldera-grid .btn-warning,fieldset[disabled] .caldera-grid .btn-warning.active,fieldset[disabled] .caldera-grid .btn-warning.focus,fieldset[disabled] .caldera-grid .btn-warning:active,fieldset[disabled] .caldera-grid .btn-warning:focus,fieldset[disabled] .caldera-grid .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.caldera-grid .btn-warning .badge{color:#f0ad4e;background-color:#fff}.caldera-grid .btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.caldera-grid .btn-danger.active,.caldera-grid .btn-danger.focus,.caldera-grid .btn-danger:active,.caldera-grid .btn-danger:focus,.caldera-grid .btn-danger:hover,.open>.dropdown-toggle.caldera-grid .btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.caldera-grid .btn-danger.disabled,.caldera-grid .btn-danger.disabled.active,.caldera-grid .btn-danger.disabled.focus,.caldera-grid .btn-danger.disabled:active,.caldera-grid .btn-danger.disabled:focus,.caldera-grid .btn-danger.disabled:hover,.caldera-grid .btn-danger[disabled],.caldera-grid .btn-danger[disabled].active,.caldera-grid .btn-danger[disabled].focus,.caldera-grid .btn-danger[disabled]:active,.caldera-grid .btn-danger[disabled]:focus,.caldera-grid .btn-danger[disabled]:hover,fieldset[disabled] .caldera-grid .btn-danger,fieldset[disabled] .caldera-grid .btn-danger.active,fieldset[disabled] .caldera-grid .btn-danger.focus,fieldset[disabled] .caldera-grid .btn-danger:active,fieldset[disabled] .caldera-grid .btn-danger:focus,fieldset[disabled] .caldera-grid .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.caldera-grid .btn-danger .badge{color:#d9534f;background-color:#fff}.caldera-grid .btn-link{color:#337ab7;font-weight:400;border-radius:0}.caldera-grid .btn-link,.caldera-grid .btn-link.active,.caldera-grid .btn-link:active,.caldera-grid .btn-link[disabled],fieldset[disabled] .caldera-grid .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.caldera-grid .btn-link,.caldera-grid .btn-link:active,.caldera-grid .btn-link:focus,.caldera-grid .btn-link:hover{border-color:transparent}.caldera-grid .btn-link:focus,.caldera-grid .btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.caldera-grid .btn-link[disabled]:focus,.caldera-grid .btn-link[disabled]:hover,fieldset[disabled] .caldera-grid .btn-link:focus,fieldset[disabled] .caldera-grid .btn-link:hover{color:#777;text-decoration:none}.caldera-grid .btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:4px}.caldera-grid .btn-sm,.caldera-grid .btn-xs{font-size:12px;line-height:1.5;border-radius:1px}.caldera-grid .btn-sm{padding:5px 10px}.caldera-grid .btn-xs{padding:1px 5px}.caldera-grid .btn-block{display:block;width:100%}.caldera-grid .btn-block+.btn-block{margin-top:5px}.caldera-grid input[type=button].btn-block,.caldera-grid input[type=reset].btn-block,.caldera-grid input[type=submit].btn-block{width:100%}.caldera-grid textarea.form-control{padding-right:4px;height:auto}.caldera-grid .breadcrumb{padding:6px 12px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.caldera-grid .breadcrumb>li{display:inline-block;margin:0}.caldera-grid .breadcrumb>li+li:before{content:"/\00a0";padding:0 5px;color:#ccc}.caldera-grid .breadcrumb>.active,.caldera-grid .breadcrumb>.active>a{color:#777}.breadcrumb>li.active.error>a,.breadcrumb>li.error>a{color:red}.caldera-grid .cf-credit-card{padding-left:42px;background-image:url(../images/credit-card.svg);background-repeat:no-repeat!important;background-position-x:4px!important;background-position-y:3px!important}.caldera-grid .screen-reader-text{clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;position:absolute!important;width:1px;word-wrap:normal!important}@font-face{font-family:cf-raty;src:url(fonts/cf-raty.eot?40481674);src:url(fonts/cf-raty.eot?40481674#iefix) format('embedded-opentype'),url(fonts/cf-raty.woff?40481674) format('woff'),url(fonts/cf-raty.ttf?40481674) format('truetype'),url(fonts/cf-raty.svg?40481674#cf-raty) format('svg');font-weight:400;font-style:normal}[class*=" raty-"]:before,[class^=raty-]:before{font-family:cf-raty;font-style:normal;font-weight:400;speak:none;font-size:2em;display:inline-block;text-decoration:inherit;width:1em;text-align:center;font-variant:normal;text-transform:none;line-height:1em}.raty-heart-on:before{content:'\e800'}.raty-heart-off:before{content:'\e801'}.raty-star-on:before{content:'\e802'}.raty-star-off:before{content:'\e803'}.raty-circle-on:before{content:'\e804'}.raty-circle-off:before{content:'\e805'}.raty-dot-off:before{content:'\e806'}.raty-dot-on:before{content:'\e807'}.raty-face-off:before{content:'\e808'}.raty-face-on:before{content:'\e809'}.raty-cancel-off:before{content:'\e80a'}.raty-cancel-on:before{content:'\e80b'}.calculation-group{background:#FFF;box-shadow:0 1px 2px rgba(0,0,0,.05);padding:6px;margin:6px 0}.preview-color-selector{background:#F0F0F0;border:1px solid #E2E2E2;display:inline;margin-left:-1px;padding:3px 12px;box-shadow:0 0 0 2px #fff inset}.miniColors-trigger{border:1px solid #999;-mz-border-radius:0 1px 1px 0;-webkit-border-radius:0 1px 1px 0;display:inline-block;height:24px;margin:0 0 -8px -1px;width:30px}.cf-color-picker .input-group-btn:last-child>.btn,.cf-color-picker .input-group-btn:last-child>.btn-group,.cf-color-picker .input-group-btn>.btn+.btn{margin-left:-1px}.miniColors-selector{background:#FFF;border:1px solid #999;-moz-box-shadow:0 3px 0 -1px rgba(0,0,0,.05);-webkit-box-shadow:0 3px 0 -1px rgba(0,0,0,.05);box-shadow:0 3px 0 -1px rgba(0,0,0,.05);height:162px;padding:5px;position:absolute;width:187px;z-index:999999;margin-top:-1px}.miniColors-colors,.miniColors-hues{top:5px;height:150px;cursor:crosshair;position:absolute}.miniColors-selector.black{background:#000;border-color:#000}.miniColors-colors{left:5px;width:150px;background:url(minicolor-colors.png) right no-repeat}.miniColors-hues{left:160px;width:20px;background:url(minicolor-colors.png) left no-repeat}.miniColors-colorPicker{position:absolute;width:9px;height:9px;border:1px solid #fff;-moz-border-radius:11px;-webkit-border-radius:11px;border-radius:11px}.miniColors-colorPicker-inner{position:absolute;top:0;left:0;width:7px;height:7px;border:1px solid #000;-moz-border-radius:9px;-webkit-border-radius:9px;border-radius:9px}.miniColors-huePicker{position:absolute;left:-3px;width:24px;height:1px;border:1px solid #fff;border-radius:2px;background:#000}.cf-color-picker .form-control::-moz-placeholder{color:#999;opacity:1}.cf-color-picker .form-control:-ms-input-placeholder{color:#999}.cf-color-picker .form-control::-webkit-input-placeholder{color:#999}.cf-color-picker .form-control[disabled],.cf-color-picker .form-control[readonly],.cf-color-picker fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee;opacity:1}.cf-color-picker .form-group{margin-bottom:15px}.cf-color-picker .input-group{position:relative;display:table;border-collapse:separate;max-width:120px}.cf-color-picker .input-group[class*=col-]{float:none;padding-left:0;padding-right:0}.cf-color-picker .input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.cf-color-picker .input-group-lg>.form-control,.cf-color-picker .input-group-lg>.input-group-addon,.cf-color-picker .input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.cf-color-picker .input-group-sm>.form-control,.cf-color-picker .input-group-sm>.input-group-addon,.cf-color-picker .input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.cf-color-picker .input-group .form-control,.cf-color-picker .input-group-addon,.cf-color-picker .input-group-btn{display:table-cell}.cf-color-picker .input-group .form-control:not(:first-child):not(:last-child),.cf-color-picker .input-group-addon:not(:first-child):not(:last-child),.cf-color-picker .input-group-btn:not(:first-child):not(:last-child){border-radius:0}.cf-color-picker .input-group-addon,.cf-color-picker .input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.cf-color-picker .input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.cf-color-picker .text-hide,.table-striped .cfdatepicker table tr td,.table-striped .cfdatepicker table tr th{background-color:transparent}.cf-color-picker .input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.cf-color-picker .input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.cf-color-picker .input-group .form-control:first-child,.cf-color-picker .input-group-addon:first-child,.cf-color-picker .input-group-btn:first-child>.btn,.cf-color-picker .input-group-btn:first-child>.btn-group>.btn,.cf-color-picker .input-group-btn:first-child>.dropdown-toggle,.cf-color-picker .input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.cf-color-picker .input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.cf-color-picker .input-group-addon:first-child{border-right:0}.cf-color-picker .input-group .form-control:last-child,.cf-color-picker .input-group-addon:last-child,.cf-color-picker .input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.cf-color-picker .input-group-btn:first-child>.btn:not(:first-child),.cf-color-picker .input-group-btn:last-child>.btn,.cf-color-picker .input-group-btn:last-child>.btn-group>.btn,.cf-color-picker .input-group-btn:last-child>.dropdown-toggle{border-bottom-left-radius:0;border-top-left-radius:0}.cf-color-picker .input-group-addon:last-child{border-left:0}.cf-color-picker .input-group-btn{position:relative;font-size:0;white-space:nowrap}.cf-color-picker .input-group-btn>.btn{position:relative}.cf-color-picker .input-group-btn>.btn:active,.cf-color-picker .input-group-btn>.btn:focus,.cf-color-picker .input-group-btn>.btn:hover{z-index:2}.cf-color-picker .input-group-btn:first-child>.btn,.cf-color-picker .input-group-btn:first-child>.btn-group{margin-right:-1px}.cf-color-picker .clearfix:after,.cf-color-picker .clearfix:before,.cf-color-picker .form-horizontal .form-group:after,.cf-color-picker .form-horizontal .form-group:before{content:" ";display:table}.cf-color-picker .clearfix:after,.cf-color-picker .form-horizontal .form-group:after{clear:both}.cf-color-picker .center-block{display:block;margin-left:auto;margin-right:auto}.cf-color-picker .pull-right{float:right!important}.cf-color-picker .pull-left{float:left!important}.cf-color-picker .hide{display:none!important}.cf-color-picker .show{display:block!important}.cf-color-picker .invisible{visibility:hidden}.cf-color-picker .text-hide{font:0/0 a;color:transparent;text-shadow:none;border:0}.cf-color-picker .hidden{display:none!important;visibility:hidden!important}.cf-color-picker .affix{position:fixed}@-ms-viewport{width:device-width}.cf-color-picker .visible-lg,.cf-color-picker .visible-md,.cf-color-picker .visible-print,.cf-color-picker .visible-sm,.cf-color-picker .visible-xs{display:none!important}@media (max-width:767px){.cf-color-picker .visible-xs{display:block!important}.cf-color-picker table.visible-xs{display:table}.cf-color-picker tr.visible-xs{display:table-row!important}.cf-color-picker td.visible-xs,.cf-color-picker th.visible-xs{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.cf-color-picker .visible-sm{display:block!important}.cf-color-picker table.visible-sm{display:table}.cf-color-picker tr.visible-sm{display:table-row!important}.cf-color-picker td.visible-sm,.cf-color-picker th.visible-sm{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.cf-color-picker .visible-md{display:block!important}.cf-color-picker table.visible-md{display:table}.cf-color-picker tr.visible-md{display:table-row!important}.cf-color-picker td.visible-md,.cf-color-picker th.visible-md{display:table-cell!important}}@media (min-width:1200px){.cf-color-picker .visible-lg{display:block!important}.cf-color-picker table.visible-lg{display:table}.cf-color-picker tr.visible-lg{display:table-row!important}.cf-color-picker td.visible-lg,.cf-color-picker th.visible-lg{display:table-cell!important}.cf-color-picker .hidden-lg{display:none!important}}@media (max-width:767px){.cf-color-picker .hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.cf-color-picker .hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.cf-color-picker .hidden-md{display:none!important}}@media print{.cf-color-picker .visible-print{display:block!important}.cf-color-picker table.visible-print{display:table}.cf-color-picker tr.visible-print{display:table-row!important}.cf-color-picker td.visible-print,.cf-color-picker th.visible-print{display:table-cell!important}.cf-color-picker .hidden-print{display:none!important}}.cfdatepicker-dropdown:after,.cfdatepicker-dropdown:before{content:'';display:inline-block;border-top:0;position:absolute}.cfdatepicker{padding:4px;border-radius:4px;direction:ltr}.cfdatepicker-inline{width:220px}.cfdatepicker.cfdatepicker-rtl{direction:rtl}.cfdatepicker.cfdatepicker-rtl table tr td span{float:right}.cfdatepicker-dropdown{top:0;left:0}.cfdatepicker-dropdown:before{border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,.2)}.cfdatepicker-dropdown:after{border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff}.cfdatepicker-dropdown.cfdatepicker-orient-left:before{left:6px}.cfdatepicker-dropdown.cfdatepicker-orient-left:after{left:7px}.cfdatepicker-dropdown.cfdatepicker-orient-right:before{right:6px}.cfdatepicker-dropdown.cfdatepicker-orient-right:after{right:7px}.cfdatepicker-dropdown.cfdatepicker-orient-top:before{top:-7px}.cfdatepicker-dropdown.cfdatepicker-orient-top:after{top:-6px}.cfdatepicker-dropdown.cfdatepicker-orient-bottom:before{bottom:-7px;border-bottom:0;border-top:7px solid #999}.cfdatepicker-dropdown.cfdatepicker-orient-bottom:after{bottom:-6px;border-bottom:0;border-top:6px solid #fff}.cfdatepicker>div{display:none}.cfdatepicker.days div.cfdatepicker-days,.cfdatepicker.months div.cfdatepicker-months,.cfdatepicker.years div.cfdatepicker-years{display:block}.cfdatepicker table{border:0;width:auto;margin:0;-webkit-touch-callout:none;-khtml-user-select:none;user-select:none}.cfdatepicker table tr td,.cfdatepicker table tr th{text-align:center;width:10px;height:10px;border-radius:4px;border:none}.cfdatepicker table tr td.day.focused,.cfdatepicker table tr td.day:hover{background:#eee;cursor:pointer}.cfdatepicker table tr td.new,.cfdatepicker table tr td.old{color:#999}.cfdatepicker table tr td.disabled,.cfdatepicker table tr td.disabled:hover{background:0 0;color:#999;cursor:default}.cfdatepicker table tr td.today,.cfdatepicker table tr td.today.disabled,.cfdatepicker table tr td.today.disabled:hover,.cfdatepicker table tr td.today:hover{color:#000;background-color:#ffdb99;border-color:#ffb733}.cfdatepicker table tr td.today.active,.cfdatepicker table tr td.today.disabled.active,.cfdatepicker table tr td.today.disabled:active,.cfdatepicker table tr td.today.disabled:focus,.cfdatepicker table tr td.today.disabled:hover,.cfdatepicker table tr td.today.disabled:hover.active,.cfdatepicker table tr td.today.disabled:hover:active,.cfdatepicker table tr td.today.disabled:hover:focus,.cfdatepicker table tr td.today.disabled:hover:hover,.cfdatepicker table tr td.today:active,.cfdatepicker table tr td.today:focus,.cfdatepicker table tr td.today:hover,.cfdatepicker table tr td.today:hover.active,.cfdatepicker table tr td.today:hover:active,.cfdatepicker table tr td.today:hover:focus,.cfdatepicker table tr td.today:hover:hover,.open .dropdown-toggle.cfdatepicker table tr td.today,.open .dropdown-toggle.cfdatepicker table tr td.today.disabled,.open .dropdown-toggle.cfdatepicker table tr td.today.disabled:hover,.open .dropdown-toggle.cfdatepicker table tr td.today:hover{color:#000;background-color:#ffcd70;border-color:#f59e00}.cfdatepicker table tr td.today.active,.cfdatepicker table tr td.today.disabled.active,.cfdatepicker table tr td.today.disabled:active,.cfdatepicker table tr td.today.disabled:hover.active,.cfdatepicker table tr td.today.disabled:hover:active,.cfdatepicker table tr td.today:active,.cfdatepicker table tr td.today:hover.active,.cfdatepicker table tr td.today:hover:active,.open .dropdown-toggle.cfdatepicker table tr td.today,.open .dropdown-toggle.cfdatepicker table tr td.today.disabled,.open .dropdown-toggle.cfdatepicker table tr td.today.disabled:hover,.open .dropdown-toggle.cfdatepicker table tr td.today:hover{background-image:none}.cfdatepicker table tr td.today.disabled,.cfdatepicker table tr td.today.disabled.active,.cfdatepicker table tr td.today.disabled.disabled,.cfdatepicker table tr td.today.disabled.disabled.active,.cfdatepicker table tr td.today.disabled.disabled:active,.cfdatepicker table tr td.today.disabled.disabled:focus,.cfdatepicker table tr td.today.disabled.disabled:hover,.cfdatepicker table tr td.today.disabled:active,.cfdatepicker table tr td.today.disabled:focus,.cfdatepicker table tr td.today.disabled:hover,.cfdatepicker table tr td.today.disabled:hover.disabled,.cfdatepicker table tr td.today.disabled:hover.disabled.active,.cfdatepicker table tr td.today.disabled:hover.disabled:active,.cfdatepicker table tr td.today.disabled:hover.disabled:focus,.cfdatepicker table tr td.today.disabled:hover.disabled:hover,.cfdatepicker table tr td.today.disabled:hover[disabled],.cfdatepicker table tr td.today.disabled:hover[disabled].active,.cfdatepicker table tr td.today.disabled:hover[disabled]:active,.cfdatepicker table tr td.today.disabled:hover[disabled]:focus,.cfdatepicker table tr td.today.disabled:hover[disabled]:hover,.cfdatepicker table tr td.today.disabled[disabled],.cfdatepicker table tr td.today.disabled[disabled].active,.cfdatepicker table tr td.today.disabled[disabled]:active,.cfdatepicker table tr td.today.disabled[disabled]:focus,.cfdatepicker table tr td.today.disabled[disabled]:hover,.cfdatepicker table tr td.today:hover.disabled,.cfdatepicker table tr td.today:hover.disabled.active,.cfdatepicker table tr td.today:hover.disabled:active,.cfdatepicker table tr td.today:hover.disabled:focus,.cfdatepicker table tr td.today:hover.disabled:hover,.cfdatepicker table tr td.today:hover[disabled],.cfdatepicker table tr td.today:hover[disabled].active,.cfdatepicker table tr td.today:hover[disabled]:active,.cfdatepicker table tr td.today:hover[disabled]:focus,.cfdatepicker table tr td.today:hover[disabled]:hover,.cfdatepicker table tr td.today[disabled],.cfdatepicker table tr td.today[disabled].active,.cfdatepicker table tr td.today[disabled]:active,.cfdatepicker table tr td.today[disabled]:focus,.cfdatepicker table tr td.today[disabled]:hover,fieldset[disabled] .cfdatepicker table tr td.today,fieldset[disabled] .cfdatepicker table tr td.today.active,fieldset[disabled] .cfdatepicker table tr td.today.disabled,fieldset[disabled] .cfdatepicker table tr td.today.disabled.active,fieldset[disabled] .cfdatepicker table tr td.today.disabled:active,fieldset[disabled] .cfdatepicker table tr td.today.disabled:focus,fieldset[disabled] .cfdatepicker table tr td.today.disabled:hover,fieldset[disabled] .cfdatepicker table tr td.today.disabled:hover.active,fieldset[disabled] .cfdatepicker table tr td.today.disabled:hover:active,fieldset[disabled] .cfdatepicker table tr td.today.disabled:hover:focus,fieldset[disabled] .cfdatepicker table tr td.today.disabled:hover:hover,fieldset[disabled] .cfdatepicker table tr td.today:active,fieldset[disabled] .cfdatepicker table tr td.today:focus,fieldset[disabled] .cfdatepicker table tr td.today:hover,fieldset[disabled] .cfdatepicker table tr td.today:hover.active,fieldset[disabled] .cfdatepicker table tr td.today:hover:active,fieldset[disabled] .cfdatepicker table tr td.today:hover:focus,fieldset[disabled] .cfdatepicker table tr td.today:hover:hover{background-color:#ffdb99;border-color:#ffb733}.cfdatepicker table tr td.today:hover:hover{color:#000}.cfdatepicker table tr td.today.active:hover{color:#fff}.cfdatepicker table tr td.range,.cfdatepicker table tr td.range.disabled,.cfdatepicker table tr td.range.disabled:hover,.cfdatepicker table tr td.range:hover{background:#eee;border-radius:0}.cfdatepicker table tr td.active.active,.cfdatepicker table tr td.active.disabled.active,.cfdatepicker table tr td.active.disabled:active,.cfdatepicker table tr td.active.disabled:hover.active,.cfdatepicker table tr td.active.disabled:hover:active,.cfdatepicker table tr td.active:active,.cfdatepicker table tr td.active:hover.active,.cfdatepicker table tr td.active:hover:active,.cfdatepicker table tr td.range.today.active,.cfdatepicker table tr td.range.today.disabled.active,.cfdatepicker table tr td.range.today.disabled:active,.cfdatepicker table tr td.range.today.disabled:hover.active,.cfdatepicker table tr td.range.today.disabled:hover:active,.cfdatepicker table tr td.range.today:active,.cfdatepicker table tr td.range.today:hover.active,.cfdatepicker table tr td.range.today:hover:active,.cfdatepicker table tr td.selected.active,.cfdatepicker table tr td.selected.disabled.active,.cfdatepicker table tr td.selected.disabled:active,.cfdatepicker table tr td.selected.disabled:hover.active,.cfdatepicker table tr td.selected.disabled:hover:active,.cfdatepicker table tr td.selected:active,.cfdatepicker table tr td.selected:hover.active,.cfdatepicker table tr td.selected:hover:active,.open .dropdown-toggle.cfdatepicker table tr td.active,.open .dropdown-toggle.cfdatepicker table tr td.active.disabled,.open .dropdown-toggle.cfdatepicker table tr td.active.disabled:hover,.open .dropdown-toggle.cfdatepicker table tr td.active:hover,.open .dropdown-toggle.cfdatepicker table tr td.range.today,.open .dropdown-toggle.cfdatepicker table tr td.range.today.disabled,.open .dropdown-toggle.cfdatepicker table tr td.range.today.disabled:hover,.open .dropdown-toggle.cfdatepicker table tr td.range.today:hover,.open .dropdown-toggle.cfdatepicker table tr td.selected,.open .dropdown-toggle.cfdatepicker table tr td.selected.disabled,.open .dropdown-toggle.cfdatepicker table tr td.selected.disabled:hover,.open .dropdown-toggle.cfdatepicker table tr td.selected:hover{background-image:none}.cfdatepicker table tr td.range.today,.cfdatepicker table tr td.range.today.disabled,.cfdatepicker table tr td.range.today.disabled:hover,.cfdatepicker table tr td.range.today:hover{color:#000;background-color:#f7ca77;border-color:#f1a417;border-radius:0}.cfdatepicker table tr td.range.today.active,.cfdatepicker table tr td.range.today.disabled.active,.cfdatepicker table tr td.range.today.disabled:active,.cfdatepicker table tr td.range.today.disabled:focus,.cfdatepicker table tr td.range.today.disabled:hover,.cfdatepicker table tr td.range.today.disabled:hover.active,.cfdatepicker table tr td.range.today.disabled:hover:active,.cfdatepicker table tr td.range.today.disabled:hover:focus,.cfdatepicker table tr td.range.today.disabled:hover:hover,.cfdatepicker table tr td.range.today:active,.cfdatepicker table tr td.range.today:focus,.cfdatepicker table tr td.range.today:hover,.cfdatepicker table tr td.range.today:hover.active,.cfdatepicker table tr td.range.today:hover:active,.cfdatepicker table tr td.range.today:hover:focus,.cfdatepicker table tr td.range.today:hover:hover,.open .dropdown-toggle.cfdatepicker table tr td.range.today,.open .dropdown-toggle.cfdatepicker table tr td.range.today.disabled,.open .dropdown-toggle.cfdatepicker table tr td.range.today.disabled:hover,.open .dropdown-toggle.cfdatepicker table tr td.range.today:hover{color:#000;background-color:#f4bb51;border-color:#bf800c}.cfdatepicker table tr td.range.today.disabled,.cfdatepicker table tr td.range.today.disabled.active,.cfdatepicker table tr td.range.today.disabled.disabled,.cfdatepicker table tr td.range.today.disabled.disabled.active,.cfdatepicker table tr td.range.today.disabled.disabled:active,.cfdatepicker table tr td.range.today.disabled.disabled:focus,.cfdatepicker table tr td.range.today.disabled.disabled:hover,.cfdatepicker table tr td.range.today.disabled:active,.cfdatepicker table tr td.range.today.disabled:focus,.cfdatepicker table tr td.range.today.disabled:hover,.cfdatepicker table tr td.range.today.disabled:hover.disabled,.cfdatepicker table tr td.range.today.disabled:hover.disabled.active,.cfdatepicker table tr td.range.today.disabled:hover.disabled:active,.cfdatepicker table tr td.range.today.disabled:hover.disabled:focus,.cfdatepicker table tr td.range.today.disabled:hover.disabled:hover,.cfdatepicker table tr td.range.today.disabled:hover[disabled],.cfdatepicker table tr td.range.today.disabled:hover[disabled].active,.cfdatepicker table tr td.range.today.disabled:hover[disabled]:active,.cfdatepicker table tr td.range.today.disabled:hover[disabled]:focus,.cfdatepicker table tr td.range.today.disabled:hover[disabled]:hover,.cfdatepicker table tr td.range.today.disabled[disabled],.cfdatepicker table tr td.range.today.disabled[disabled].active,.cfdatepicker table tr td.range.today.disabled[disabled]:active,.cfdatepicker table tr td.range.today.disabled[disabled]:focus,.cfdatepicker table tr td.range.today.disabled[disabled]:hover,.cfdatepicker table tr td.range.today:hover.disabled,.cfdatepicker table tr td.range.today:hover.disabled.active,.cfdatepicker table tr td.range.today:hover.disabled:active,.cfdatepicker table tr td.range.today:hover.disabled:focus,.cfdatepicker table tr td.range.today:hover.disabled:hover,.cfdatepicker table tr td.range.today:hover[disabled],.cfdatepicker table tr td.range.today:hover[disabled].active,.cfdatepicker table tr td.range.today:hover[disabled]:active,.cfdatepicker table tr td.range.today:hover[disabled]:focus,.cfdatepicker table tr td.range.today:hover[disabled]:hover,.cfdatepicker table tr td.range.today[disabled],.cfdatepicker table tr td.range.today[disabled].active,.cfdatepicker table tr td.range.today[disabled]:active,.cfdatepicker table tr td.range.today[disabled]:focus,.cfdatepicker table tr td.range.today[disabled]:hover,fieldset[disabled] .cfdatepicker table tr td.range.today,fieldset[disabled] .cfdatepicker table tr td.range.today.active,fieldset[disabled] .cfdatepicker table tr td.range.today.disabled,fieldset[disabled] .cfdatepicker table tr td.range.today.disabled.active,fieldset[disabled] .cfdatepicker table tr td.range.today.disabled:active,fieldset[disabled] .cfdatepicker table tr td.range.today.disabled:focus,fieldset[disabled] .cfdatepicker table tr td.range.today.disabled:hover,fieldset[disabled] .cfdatepicker table tr td.range.today.disabled:hover.active,fieldset[disabled] .cfdatepicker table tr td.range.today.disabled:hover:active,fieldset[disabled] .cfdatepicker table tr td.range.today.disabled:hover:focus,fieldset[disabled] .cfdatepicker table tr td.range.today.disabled:hover:hover,fieldset[disabled] .cfdatepicker table tr td.range.today:active,fieldset[disabled] .cfdatepicker table tr td.range.today:focus,fieldset[disabled] .cfdatepicker table tr td.range.today:hover,fieldset[disabled] .cfdatepicker table tr td.range.today:hover.active,fieldset[disabled] .cfdatepicker table tr td.range.today:hover:active,fieldset[disabled] .cfdatepicker table tr td.range.today:hover:focus,fieldset[disabled] .cfdatepicker table tr td.range.today:hover:hover{background-color:#f7ca77;border-color:#f1a417}.cfdatepicker table tr td.selected,.cfdatepicker table tr td.selected.disabled,.cfdatepicker table tr td.selected.disabled:hover,.cfdatepicker table tr td.selected:hover{color:#fff;background-color:#999;border-color:#555;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.cfdatepicker table tr td.selected.active,.cfdatepicker table tr td.selected.disabled.active,.cfdatepicker table tr td.selected.disabled:active,.cfdatepicker table tr td.selected.disabled:focus,.cfdatepicker table tr td.selected.disabled:hover,.cfdatepicker table tr td.selected.disabled:hover.active,.cfdatepicker table tr td.selected.disabled:hover:active,.cfdatepicker table tr td.selected.disabled:hover:focus,.cfdatepicker table tr td.selected.disabled:hover:hover,.cfdatepicker table tr td.selected:active,.cfdatepicker table tr td.selected:focus,.cfdatepicker table tr td.selected:hover,.cfdatepicker table tr td.selected:hover.active,.cfdatepicker table tr td.selected:hover:active,.cfdatepicker table tr td.selected:hover:focus,.cfdatepicker table tr td.selected:hover:hover,.open .dropdown-toggle.cfdatepicker table tr td.selected,.open .dropdown-toggle.cfdatepicker table tr td.selected.disabled,.open .dropdown-toggle.cfdatepicker table tr td.selected.disabled:hover,.open .dropdown-toggle.cfdatepicker table tr td.selected:hover{color:#fff;background-color:#858585;border-color:#373737}.cfdatepicker table tr td.selected.disabled,.cfdatepicker table tr td.selected.disabled.active,.cfdatepicker table tr td.selected.disabled.disabled,.cfdatepicker table tr td.selected.disabled.disabled.active,.cfdatepicker table tr td.selected.disabled.disabled:active,.cfdatepicker table tr td.selected.disabled.disabled:focus,.cfdatepicker table tr td.selected.disabled.disabled:hover,.cfdatepicker table tr td.selected.disabled:active,.cfdatepicker table tr td.selected.disabled:focus,.cfdatepicker table tr td.selected.disabled:hover,.cfdatepicker table tr td.selected.disabled:hover.disabled,.cfdatepicker table tr td.selected.disabled:hover.disabled.active,.cfdatepicker table tr td.selected.disabled:hover.disabled:active,.cfdatepicker table tr td.selected.disabled:hover.disabled:focus,.cfdatepicker table tr td.selected.disabled:hover.disabled:hover,.cfdatepicker table tr td.selected.disabled:hover[disabled],.cfdatepicker table tr td.selected.disabled:hover[disabled].active,.cfdatepicker table tr td.selected.disabled:hover[disabled]:active,.cfdatepicker table tr td.selected.disabled:hover[disabled]:focus,.cfdatepicker table tr td.selected.disabled:hover[disabled]:hover,.cfdatepicker table tr td.selected.disabled[disabled],.cfdatepicker table tr td.selected.disabled[disabled].active,.cfdatepicker table tr td.selected.disabled[disabled]:active,.cfdatepicker table tr td.selected.disabled[disabled]:focus,.cfdatepicker table tr td.selected.disabled[disabled]:hover,.cfdatepicker table tr td.selected:hover.disabled,.cfdatepicker table tr td.selected:hover.disabled.active,.cfdatepicker table tr td.selected:hover.disabled:active,.cfdatepicker table tr td.selected:hover.disabled:focus,.cfdatepicker table tr td.selected:hover.disabled:hover,.cfdatepicker table tr td.selected:hover[disabled],.cfdatepicker table tr td.selected:hover[disabled].active,.cfdatepicker table tr td.selected:hover[disabled]:active,.cfdatepicker table tr td.selected:hover[disabled]:focus,.cfdatepicker table tr td.selected:hover[disabled]:hover,.cfdatepicker table tr td.selected[disabled],.cfdatepicker table tr td.selected[disabled].active,.cfdatepicker table tr td.selected[disabled]:active,.cfdatepicker table tr td.selected[disabled]:focus,.cfdatepicker table tr td.selected[disabled]:hover,fieldset[disabled] .cfdatepicker table tr td.selected,fieldset[disabled] .cfdatepicker table tr td.selected.active,fieldset[disabled] .cfdatepicker table tr td.selected.disabled,fieldset[disabled] .cfdatepicker table tr td.selected.disabled.active,fieldset[disabled] .cfdatepicker table tr td.selected.disabled:active,fieldset[disabled] .cfdatepicker table tr td.selected.disabled:focus,fieldset[disabled] .cfdatepicker table tr td.selected.disabled:hover,fieldset[disabled] .cfdatepicker table tr td.selected.disabled:hover.active,fieldset[disabled] .cfdatepicker table tr td.selected.disabled:hover:active,fieldset[disabled] .cfdatepicker table tr td.selected.disabled:hover:focus,fieldset[disabled] .cfdatepicker table tr td.selected.disabled:hover:hover,fieldset[disabled] .cfdatepicker table tr td.selected:active,fieldset[disabled] .cfdatepicker table tr td.selected:focus,fieldset[disabled] .cfdatepicker table tr td.selected:hover,fieldset[disabled] .cfdatepicker table tr td.selected:hover.active,fieldset[disabled] .cfdatepicker table tr td.selected:hover:active,fieldset[disabled] .cfdatepicker table tr td.selected:hover:focus,fieldset[disabled] .cfdatepicker table tr td.selected:hover:hover{background-color:#999;border-color:#555}.cfdatepicker table tr td.active,.cfdatepicker table tr td.active.disabled,.cfdatepicker table tr td.active.disabled:hover,.cfdatepicker table tr td.active:hover{color:#fff;background-color:#428bca;border-color:#357ebd;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.cfdatepicker table tr td.active.active,.cfdatepicker table tr td.active.disabled.active,.cfdatepicker table tr td.active.disabled:active,.cfdatepicker table tr td.active.disabled:focus,.cfdatepicker table tr td.active.disabled:hover,.cfdatepicker table tr td.active.disabled:hover.active,.cfdatepicker table tr td.active.disabled:hover:active,.cfdatepicker table tr td.active.disabled:hover:focus,.cfdatepicker table tr td.active.disabled:hover:hover,.cfdatepicker table tr td.active:active,.cfdatepicker table tr td.active:focus,.cfdatepicker table tr td.active:hover,.cfdatepicker table tr td.active:hover.active,.cfdatepicker table tr td.active:hover:active,.cfdatepicker table tr td.active:hover:focus,.cfdatepicker table tr td.active:hover:hover,.open .dropdown-toggle.cfdatepicker table tr td.active,.open .dropdown-toggle.cfdatepicker table tr td.active.disabled,.open .dropdown-toggle.cfdatepicker table tr td.active.disabled:hover,.open .dropdown-toggle.cfdatepicker table tr td.active:hover{color:#fff;background-color:#3276b1;border-color:#285e8e}.cfdatepicker table tr td.active.disabled,.cfdatepicker table tr td.active.disabled.active,.cfdatepicker table tr td.active.disabled.disabled,.cfdatepicker table tr td.active.disabled.disabled.active,.cfdatepicker table tr td.active.disabled.disabled:active,.cfdatepicker table tr td.active.disabled.disabled:focus,.cfdatepicker table tr td.active.disabled.disabled:hover,.cfdatepicker table tr td.active.disabled:active,.cfdatepicker table tr td.active.disabled:focus,.cfdatepicker table tr td.active.disabled:hover,.cfdatepicker table tr td.active.disabled:hover.disabled,.cfdatepicker table tr td.active.disabled:hover.disabled.active,.cfdatepicker table tr td.active.disabled:hover.disabled:active,.cfdatepicker table tr td.active.disabled:hover.disabled:focus,.cfdatepicker table tr td.active.disabled:hover.disabled:hover,.cfdatepicker table tr td.active.disabled:hover[disabled],.cfdatepicker table tr td.active.disabled:hover[disabled].active,.cfdatepicker table tr td.active.disabled:hover[disabled]:active,.cfdatepicker table tr td.active.disabled:hover[disabled]:focus,.cfdatepicker table tr td.active.disabled:hover[disabled]:hover,.cfdatepicker table tr td.active.disabled[disabled],.cfdatepicker table tr td.active.disabled[disabled].active,.cfdatepicker table tr td.active.disabled[disabled]:active,.cfdatepicker table tr td.active.disabled[disabled]:focus,.cfdatepicker table tr td.active.disabled[disabled]:hover,.cfdatepicker table tr td.active:hover.disabled,.cfdatepicker table tr td.active:hover.disabled.active,.cfdatepicker table tr td.active:hover.disabled:active,.cfdatepicker table tr td.active:hover.disabled:focus,.cfdatepicker table tr td.active:hover.disabled:hover,.cfdatepicker table tr td.active:hover[disabled],.cfdatepicker table tr td.active:hover[disabled].active,.cfdatepicker table tr td.active:hover[disabled]:active,.cfdatepicker table tr td.active:hover[disabled]:focus,.cfdatepicker table tr td.active:hover[disabled]:hover,.cfdatepicker table tr td.active[disabled],.cfdatepicker table tr td.active[disabled].active,.cfdatepicker table tr td.active[disabled]:active,.cfdatepicker table tr td.active[disabled]:focus,.cfdatepicker table tr td.active[disabled]:hover,fieldset[disabled] .cfdatepicker table tr td.active,fieldset[disabled] .cfdatepicker table tr td.active.active,fieldset[disabled] .cfdatepicker table tr td.active.disabled,fieldset[disabled] .cfdatepicker table tr td.active.disabled.active,fieldset[disabled] .cfdatepicker table tr td.active.disabled:active,fieldset[disabled] .cfdatepicker table tr td.active.disabled:focus,fieldset[disabled] .cfdatepicker table tr td.active.disabled:hover,fieldset[disabled] .cfdatepicker table tr td.active.disabled:hover.active,fieldset[disabled] .cfdatepicker table tr td.active.disabled:hover:active,fieldset[disabled] .cfdatepicker table tr td.active.disabled:hover:focus,fieldset[disabled] .cfdatepicker table tr td.active.disabled:hover:hover,fieldset[disabled] .cfdatepicker table tr td.active:active,fieldset[disabled] .cfdatepicker table tr td.active:focus,fieldset[disabled] .cfdatepicker table tr td.active:hover,fieldset[disabled] .cfdatepicker table tr td.active:hover.active,fieldset[disabled] .cfdatepicker table tr td.active:hover:active,fieldset[disabled] .cfdatepicker table tr td.active:hover:focus,fieldset[disabled] .cfdatepicker table tr td.active:hover:hover{background-color:#428bca;border-color:#357ebd}.cfdatepicker table tr td span{display:block;width:23%;height:54px;line-height:54px;float:left;margin:1%;cursor:pointer;border-radius:4px}.cfdatepicker table tr td span:hover{background:#eee}.cfdatepicker table tr td span.disabled,.cfdatepicker table tr td span.disabled:hover{background:0 0;color:#999;cursor:default}.cfdatepicker table tr td span.active,.cfdatepicker table tr td span.active.disabled,.cfdatepicker table tr td span.active.disabled:hover,.cfdatepicker table tr td span.active:hover{color:#fff;background-color:#428bca;border-color:#357ebd;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.cfdatepicker table tr td span.active.active,.cfdatepicker table tr td span.active.disabled.active,.cfdatepicker table tr td span.active.disabled:active,.cfdatepicker table tr td span.active.disabled:focus,.cfdatepicker table tr td span.active.disabled:hover,.cfdatepicker table tr td span.active.disabled:hover.active,.cfdatepicker table tr td span.active.disabled:hover:active,.cfdatepicker table tr td span.active.disabled:hover:focus,.cfdatepicker table tr td span.active.disabled:hover:hover,.cfdatepicker table tr td span.active:active,.cfdatepicker table tr td span.active:focus,.cfdatepicker table tr td span.active:hover,.cfdatepicker table tr td span.active:hover.active,.cfdatepicker table tr td span.active:hover:active,.cfdatepicker table tr td span.active:hover:focus,.cfdatepicker table tr td span.active:hover:hover,.open .dropdown-toggle.cfdatepicker table tr td span.active,.open .dropdown-toggle.cfdatepicker table tr td span.active.disabled,.open .dropdown-toggle.cfdatepicker table tr td span.active.disabled:hover,.open .dropdown-toggle.cfdatepicker table tr td span.active:hover{color:#fff;background-color:#3276b1;border-color:#285e8e}.cfdatepicker table tr td span.active.active,.cfdatepicker table tr td span.active.disabled.active,.cfdatepicker table tr td span.active.disabled:active,.cfdatepicker table tr td span.active.disabled:hover.active,.cfdatepicker table tr td span.active.disabled:hover:active,.cfdatepicker table tr td span.active:active,.cfdatepicker table tr td span.active:hover.active,.cfdatepicker table tr td span.active:hover:active,.open .dropdown-toggle.cfdatepicker table tr td span.active,.open .dropdown-toggle.cfdatepicker table tr td span.active.disabled,.open .dropdown-toggle.cfdatepicker table tr td span.active.disabled:hover,.open .dropdown-toggle.cfdatepicker table tr td span.active:hover{background-image:none}.cfdatepicker table tr td span.active.disabled,.cfdatepicker table tr td span.active.disabled.active,.cfdatepicker table tr td span.active.disabled.disabled,.cfdatepicker table tr td span.active.disabled.disabled.active,.cfdatepicker table tr td span.active.disabled.disabled:active,.cfdatepicker table tr td span.active.disabled.disabled:focus,.cfdatepicker table tr td span.active.disabled.disabled:hover,.cfdatepicker table tr td span.active.disabled:active,.cfdatepicker table tr td span.active.disabled:focus,.cfdatepicker table tr td span.active.disabled:hover,.cfdatepicker table tr td span.active.disabled:hover.disabled,.cfdatepicker table tr td span.active.disabled:hover.disabled.active,.cfdatepicker table tr td span.active.disabled:hover.disabled:active,.cfdatepicker table tr td span.active.disabled:hover.disabled:focus,.cfdatepicker table tr td span.active.disabled:hover.disabled:hover,.cfdatepicker table tr td span.active.disabled:hover[disabled],.cfdatepicker table tr td span.active.disabled:hover[disabled].active,.cfdatepicker table tr td span.active.disabled:hover[disabled]:active,.cfdatepicker table tr td span.active.disabled:hover[disabled]:focus,.cfdatepicker table tr td span.active.disabled:hover[disabled]:hover,.cfdatepicker table tr td span.active.disabled[disabled],.cfdatepicker table tr td span.active.disabled[disabled].active,.cfdatepicker table tr td span.active.disabled[disabled]:active,.cfdatepicker table tr td span.active.disabled[disabled]:focus,.cfdatepicker table tr td span.active.disabled[disabled]:hover,.cfdatepicker table tr td span.active:hover.disabled,.cfdatepicker table tr td span.active:hover.disabled.active,.cfdatepicker table tr td span.active:hover.disabled:active,.cfdatepicker table tr td span.active:hover.disabled:focus,.cfdatepicker table tr td span.active:hover.disabled:hover,.cfdatepicker table tr td span.active:hover[disabled],.cfdatepicker table tr td span.active:hover[disabled].active,.cfdatepicker table tr td span.active:hover[disabled]:active,.cfdatepicker table tr td span.active:hover[disabled]:focus,.cfdatepicker table tr td span.active:hover[disabled]:hover,.cfdatepicker table tr td span.active[disabled],.cfdatepicker table tr td span.active[disabled].active,.cfdatepicker table tr td span.active[disabled]:active,.cfdatepicker table tr td span.active[disabled]:focus,.cfdatepicker table tr td span.active[disabled]:hover,fieldset[disabled] .cfdatepicker table tr td span.active,fieldset[disabled] .cfdatepicker table tr td span.active.active,fieldset[disabled] .cfdatepicker table tr td span.active.disabled,fieldset[disabled] .cfdatepicker table tr td span.active.disabled.active,fieldset[disabled] .cfdatepicker table tr td span.active.disabled:active,fieldset[disabled] .cfdatepicker table tr td span.active.disabled:focus,fieldset[disabled] .cfdatepicker table tr td span.active.disabled:hover,fieldset[disabled] .cfdatepicker table tr td span.active.disabled:hover.active,fieldset[disabled] .cfdatepicker table tr td span.active.disabled:hover:active,fieldset[disabled] .cfdatepicker table tr td span.active.disabled:hover:focus,fieldset[disabled] .cfdatepicker table tr td span.active.disabled:hover:hover,fieldset[disabled] .cfdatepicker table tr td span.active:active,fieldset[disabled] .cfdatepicker table tr td span.active:focus,fieldset[disabled] .cfdatepicker table tr td span.active:hover,fieldset[disabled] .cfdatepicker table tr td span.active:hover.active,fieldset[disabled] .cfdatepicker table tr td span.active:hover:active,fieldset[disabled] .cfdatepicker table tr td span.active:hover:focus,fieldset[disabled] .cfdatepicker table tr td span.active:hover:hover{background-color:#428bca;border-color:#357ebd}.cfdatepicker table tr td span.new,.cfdatepicker table tr td span.old{color:#999}.cfdatepicker th.cfdatepicker-switch{width:145px}.cfdatepicker tfoot tr th,.cfdatepicker thead tr:first-child th{cursor:pointer}.cfdatepicker tfoot tr th:hover,.cfdatepicker thead tr:first-child th:hover{background:#eee}.cfdatepicker .cw{font-size:10px;width:12px;padding:0 2px 0 5px;vertical-align:middle}.cfdatepicker thead tr:first-child th.cw{cursor:default;background-color:transparent}.input-group.date .input-group-addon i{cursor:pointer;width:16px;height:16px}.input-daterange input{text-align:center}.input-daterange input:first-child{border-radius:3px 0 0 3px}.input-daterange input:last-child{border-radius:0 3px 3px 0}.input-daterange .input-group-addon{width:auto;min-width:16px;padding:4px 5px;font-weight:400;line-height:1.42857143;text-align:center;text-shadow:0 1px 0 #fff;vertical-align:middle;background-color:#eee;border:solid #ccc;border-width:1px 0;margin-left:-5px;margin-right:-5px}.cfdatepicker.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;float:left;display:none;min-width:160px;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:5px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;color:#333;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:1.42857143}.cfdatepicker.dropdown-menu td,.cfdatepicker.dropdown-menu th{padding:4px 5px}.image-thumb{margin-left:63px;padding:6px 0 6px 6px}.image-picker-content.image-thumb-lrg{margin-bottom:6px}.image-picker-side-bar{float:left;margin-left:-68px;width:62px;max-width:100%}.image-thumb-lrg .image-picker-side-bar{background:#F6F6F6;border:1px solid #DFDFDF;float:none;margin:0 0 6px;padding:6px 6px 2px;text-align:center;width:auto}.image-picker-side-bar>img{border:1px solid #DFDFDF;width:62px}.image-thumb-lrg .image-picker-side-bar>img{-moz-box-sizing:border-box;box-sizing:border-box;max-width:100%;text-align:center;width:auto}.image-thumb .image-picker-main-content{margin-right:6px}.button.image-picker-button{margin:7px 0 0;width:110px;display:inline-block}.button.button-primary.image-picker-button{float:right;margin-left:6px;width:80px}.image-picker-main-content select{width:100%}.image-picker-sizer:disabled{opacity:.7;box-shadow:none;color:#A1A1A1}.button-primary.image-picker-button.image-picker-button-solo,.button.image-picker-button.image-picker-button-solo{width:170px;margin-top:0}.button-primary.image-picker-button.image-picker-button-solo{margin-top:7px;margin-left:0;float:none}.image-thumb-lrg .button.image-picker-button.cu-image-picker.image-picker-button-solo{width:120px}.image-thumb-lrg .button.button-primary.image-picker-button.cu-image-remover.image-picker-button-solo{float:right;margin:0 0 0 6px;width:auto}.cf-toggle-switch .btn-group>.btn-group,.cf-toggle-switch .btn-toolbar .btn-group,.cf-toggle-switch .btn-toolbar .input-group{float:left}.image-thumb-lrg .button.button-primary.image-picker-button.cu-image-remover{width:45%}input.cu-image-picker-file-select[type=file]{display:none}.rangeslider,.rangeslider__fill{background:#e6e6e6;display:block;height:8px;width:100%;-webkit-border-radius:10px;-moz-border-radius:10px;-ms-border-radius:10px;-o-border-radius:10px;border-radius:10px}.rangeslider__handle,.toggle_option_row input{display:inline-block}.rangeslider{position:relative}.rangeslider--disabled{filter:alpha(Opacity=40);opacity:.4}.rangeslider__fill{background:#0f0;position:absolute;top:0}.rangeslider__handle{background:#fff;border:1px solid #ccc;cursor:pointer;width:18px;height:18px;position:absolute;top:-5px;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;-o-border-radius:50%;border-radius:50%}input[type=range]:focus+.rangeslider .rangeslider__handle{-webkit-box-shadow:0 0 3px rgba(100,100,100,.9);-moz-box-shadow:0 0 3px rgba(100,100,100,.9);box-shadow:0 0 3px rgba(100,100,100,.9)}.recaptchatable #recaptcha_response_field{height:21px!important}.toggle_option_row{margin:4px 0}.toggle_option_row .dashicons-sort{cursor:move}.toggle_option_row .toggle_label_field,.toggle_option_row .toggle_value_field{width:136px;line-height:20px}.toggle_option_preview .button{border-radius:0;margin-right:-5px}.toggle_option_preview .button:first-child{border-radius:3px 0 0 3px}.toggle_option_preview .button:last-child{border-radius:0 3px 3px 0}.toggle_option_preview.toggle_vertical .button{width:100%}.toggle_option_preview.toggle_vertical .button:first-child{border-radius:3px 3px 0 0}.toggle_option_preview.toggle_vertical .button:last-child{border-radius:0 0 3px 3px}.cf-toggle-switch html{font-family:sans-serif}.cf-toggle-switch body{margin:0}.cf-toggle-switch article,.cf-toggle-switch aside,.cf-toggle-switch details,.cf-toggle-switch figcaption,.cf-toggle-switch figure,.cf-toggle-switch footer,.cf-toggle-switch header,.cf-toggle-switch hgroup,.cf-toggle-switch main,.cf-toggle-switch nav,.cf-toggle-switch section,.cf-toggle-switch summary{display:block}.cf-toggle-switch audio,.cf-toggle-switch canvas,.cf-toggle-switch progress,.cf-toggle-switch video{display:inline-block;vertical-align:baseline}.cf-toggle-switch audio:not([controls]){display:none;height:0}.cf-toggle-switch [hidden],.cf-toggle-switch template{display:none}.cf-toggle-switch a{background:0 0}.cf-toggle-switch a:active,.cf-toggle-switch a:hover{outline:0}.cf-toggle-switch abbr[title]{border-bottom:1px dotted}.cf-toggle-switch b,.cf-toggle-switch strong{font-weight:700}.cf-toggle-switch dfn{font-style:italic}.cf-toggle-switch h1{font-size:2em;margin:.67em 0}.cf-toggle-switch mark{background:#ff0;color:#000}.cf-toggle-switch .btn,.cf-toggle-switch .btn-danger.active,.cf-toggle-switch .btn-danger:active,.cf-toggle-switch .btn-default.active,.cf-toggle-switch .btn-default:active,.cf-toggle-switch .btn-info.active,.cf-toggle-switch .btn-info:active,.cf-toggle-switch .btn-primary.active,.cf-toggle-switch .btn-primary:active,.cf-toggle-switch .btn-success.active,.cf-toggle-switch .btn-success:active,.cf-toggle-switch .btn-warning.active,.cf-toggle-switch .btn-warning:active,.cf-toggle-switch .open .dropdown-toggle.btn-danger,.cf-toggle-switch .open .dropdown-toggle.btn-default,.cf-toggle-switch .open .dropdown-toggle.btn-info,.cf-toggle-switch .open .dropdown-toggle.btn-primary,.cf-toggle-switch .open .dropdown-toggle.btn-success,.cf-toggle-switch .open .dropdown-toggle.btn-warning{background-image:none}.cf-toggle-switch small{font-size:80%}.cf-toggle-switch sub,.cf-toggle-switch sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.cf-toggle-switch sup{top:-.5em}.cf-toggle-switch sub{bottom:-.25em}.cf-toggle-switch img{border:0}.cf-toggle-switch figure{margin:1em 40px}.cf-toggle-switch hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}.cf-toggle-switch pre{overflow:auto}.cf-toggle-switch code,.cf-toggle-switch kbd,.cf-toggle-switch pre,.cf-toggle-switch samp{font-family:monospace,monospace;font-size:1em}.cf-toggle-switch button,.cf-toggle-switch input,.cf-toggle-switch optgroup,.cf-toggle-switch select,.cf-toggle-switch textarea{color:inherit;font:inherit;margin:0}.cf-toggle-switch button{overflow:visible}.cf-toggle-switch button,.cf-toggle-switch html input[type=button],.cf-toggle-switch input[type=reset],.cf-toggle-switch input[type=submit]{-webkit-appearance:button;cursor:pointer}.cf-toggle-switch button[disabled],.cf-toggle-switch html input[disabled]{cursor:default}.cf-toggle-switch button::-moz-focus-inner,.cf-toggle-switch input::-moz-focus-inner{border:0;padding:0}.cf-toggle-switch input{line-height:normal}.cf-toggle-switch input[type=checkbox],.cf-toggle-switch input[type=radio]{box-sizing:border-box;padding:0}.cf-toggle-switch input[type=number]::-webkit-inner-spin-button,.cf-toggle-switch input[type=number]::-webkit-outer-spin-button{height:auto}.cf-toggle-switch input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}.cf-toggle-switch input[type=search]::-webkit-search-cancel-button,.cf-toggle-switch input[type=search]::-webkit-search-decoration{-webkit-appearance:none}.cf-toggle-switch fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}.cf-toggle-switch legend{border:0;padding:0}.cf-toggle-switch textarea{overflow:auto}.cf-toggle-switch optgroup{font-weight:700}.cf-toggle-switch table{border-collapse:collapse;border-spacing:0}.cf-toggle-switch td,.cf-toggle-switch th{padding:0}.cf-toggle-switch .btn{display:inline-block;margin-bottom:0;font-weight:400;text-align:center;vertical-align:middle;cursor:pointer;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.cf-toggle-switch .btn.active:focus,.cf-toggle-switch .btn:active:focus,.cf-toggle-switch .btn:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.cf-toggle-switch .btn-group .dropdown-toggle:active,.cf-toggle-switch .btn-group-vertical>.btn:focus,.cf-toggle-switch .btn-group.open .dropdown-toggle,.cf-toggle-switch .btn-group>.btn:focus{outline:0}.cf-toggle-switch .btn:focus,.cf-toggle-switch .btn:hover{color:#333;text-decoration:none}.cf-toggle-switch .btn.active,.cf-toggle-switch .btn:active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.cf-toggle-switch .btn.disabled,.cf-toggle-switch .btn[disabled],.cf-toggle-switch fieldset[disabled] .btn{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.cf-toggle-switch .btn-default{color:#333;background-color:#fff;border-color:#ccc}.cf-toggle-switch .btn-default.active,.cf-toggle-switch .btn-default:active,.cf-toggle-switch .btn-default:focus,.cf-toggle-switch .btn-default:hover,.cf-toggle-switch .open .dropdown-toggle.btn-default{color:#333;background-color:#ebebeb;border-color:#adadad}.cf-toggle-switch .btn-default.disabled,.cf-toggle-switch .btn-default.disabled.active,.cf-toggle-switch .btn-default.disabled:active,.cf-toggle-switch .btn-default.disabled:focus,.cf-toggle-switch .btn-default.disabled:hover,.cf-toggle-switch .btn-default[disabled],.cf-toggle-switch .btn-default[disabled].active,.cf-toggle-switch .btn-default[disabled]:active,.cf-toggle-switch .btn-default[disabled]:focus,.cf-toggle-switch .btn-default[disabled]:hover,.cf-toggle-switch fieldset[disabled] .btn-default,.cf-toggle-switch fieldset[disabled] .btn-default.active,.cf-toggle-switch fieldset[disabled] .btn-default:active,.cf-toggle-switch fieldset[disabled] .btn-default:focus,.cf-toggle-switch fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.cf-toggle-switch .btn-default .badge{color:#fff;background-color:#333}.cf-toggle-switch .btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.cf-toggle-switch .btn-primary.active,.cf-toggle-switch .btn-primary:active,.cf-toggle-switch .btn-primary:focus,.cf-toggle-switch .btn-primary:hover,.cf-toggle-switch .open .dropdown-toggle.btn-primary{color:#fff;background-color:#3276b1;border-color:#285e8e}.cf-toggle-switch .btn-primary.disabled,.cf-toggle-switch .btn-primary.disabled.active,.cf-toggle-switch .btn-primary.disabled:active,.cf-toggle-switch .btn-primary.disabled:focus,.cf-toggle-switch .btn-primary.disabled:hover,.cf-toggle-switch .btn-primary[disabled],.cf-toggle-switch .btn-primary[disabled].active,.cf-toggle-switch .btn-primary[disabled]:active,.cf-toggle-switch .btn-primary[disabled]:focus,.cf-toggle-switch .btn-primary[disabled]:hover,.cf-toggle-switch fieldset[disabled] .btn-primary,.cf-toggle-switch fieldset[disabled] .btn-primary.active,.cf-toggle-switch fieldset[disabled] .btn-primary:active,.cf-toggle-switch fieldset[disabled] .btn-primary:focus,.cf-toggle-switch fieldset[disabled] .btn-primary:hover{background-color:#428bca;border-color:#357ebd}.cf-toggle-switch .btn-primary .badge{color:#428bca;background-color:#fff}.cf-toggle-switch .btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.cf-toggle-switch .btn-success.active,.cf-toggle-switch .btn-success:active,.cf-toggle-switch .btn-success:focus,.cf-toggle-switch .btn-success:hover,.cf-toggle-switch .open .dropdown-toggle.btn-success{color:#fff;background-color:#47a447;border-color:#398439}.cf-toggle-switch .btn-success.disabled,.cf-toggle-switch .btn-success.disabled.active,.cf-toggle-switch .btn-success.disabled:active,.cf-toggle-switch .btn-success.disabled:focus,.cf-toggle-switch .btn-success.disabled:hover,.cf-toggle-switch .btn-success[disabled],.cf-toggle-switch .btn-success[disabled].active,.cf-toggle-switch .btn-success[disabled]:active,.cf-toggle-switch .btn-success[disabled]:focus,.cf-toggle-switch .btn-success[disabled]:hover,.cf-toggle-switch fieldset[disabled] .btn-success,.cf-toggle-switch fieldset[disabled] .btn-success.active,.cf-toggle-switch fieldset[disabled] .btn-success:active,.cf-toggle-switch fieldset[disabled] .btn-success:focus,.cf-toggle-switch fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.cf-toggle-switch .btn-success .badge{color:#5cb85c;background-color:#fff}.cf-toggle-switch .btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.cf-toggle-switch .btn-info.active,.cf-toggle-switch .btn-info:active,.cf-toggle-switch .btn-info:focus,.cf-toggle-switch .btn-info:hover,.cf-toggle-switch .open .dropdown-toggle.btn-info{color:#fff;background-color:#39b3d7;border-color:#269abc}.cf-toggle-switch .btn-info.disabled,.cf-toggle-switch .btn-info.disabled.active,.cf-toggle-switch .btn-info.disabled:active,.cf-toggle-switch .btn-info.disabled:focus,.cf-toggle-switch .btn-info.disabled:hover,.cf-toggle-switch .btn-info[disabled],.cf-toggle-switch .btn-info[disabled].active,.cf-toggle-switch .btn-info[disabled]:active,.cf-toggle-switch .btn-info[disabled]:focus,.cf-toggle-switch .btn-info[disabled]:hover,.cf-toggle-switch fieldset[disabled] .btn-info,.cf-toggle-switch fieldset[disabled] .btn-info.active,.cf-toggle-switch fieldset[disabled] .btn-info:active,.cf-toggle-switch fieldset[disabled] .btn-info:focus,.cf-toggle-switch fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.cf-toggle-switch .btn-info .badge{color:#5bc0de;background-color:#fff}.cf-toggle-switch .btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.cf-toggle-switch .btn-warning.active,.cf-toggle-switch .btn-warning:active,.cf-toggle-switch .btn-warning:focus,.cf-toggle-switch .btn-warning:hover,.cf-toggle-switch .open .dropdown-toggle.btn-warning{color:#fff;background-color:#ed9c28;border-color:#d58512}.cf-toggle-switch .btn-warning.disabled,.cf-toggle-switch .btn-warning.disabled.active,.cf-toggle-switch .btn-warning.disabled:active,.cf-toggle-switch .btn-warning.disabled:focus,.cf-toggle-switch .btn-warning.disabled:hover,.cf-toggle-switch .btn-warning[disabled],.cf-toggle-switch .btn-warning[disabled].active,.cf-toggle-switch .btn-warning[disabled]:active,.cf-toggle-switch .btn-warning[disabled]:focus,.cf-toggle-switch .btn-warning[disabled]:hover,.cf-toggle-switch fieldset[disabled] .btn-warning,.cf-toggle-switch fieldset[disabled] .btn-warning.active,.cf-toggle-switch fieldset[disabled] .btn-warning:active,.cf-toggle-switch fieldset[disabled] .btn-warning:focus,.cf-toggle-switch fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.cf-toggle-switch .btn-warning .badge{color:#f0ad4e;background-color:#fff}.cf-toggle-switch .btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.cf-toggle-switch .btn-danger.active,.cf-toggle-switch .btn-danger:active,.cf-toggle-switch .btn-danger:focus,.cf-toggle-switch .btn-danger:hover,.cf-toggle-switch .open .dropdown-toggle.btn-danger{color:#fff;background-color:#d2322d;border-color:#ac2925}.cf-toggle-switch .btn-danger.disabled,.cf-toggle-switch .btn-danger.disabled.active,.cf-toggle-switch .btn-danger.disabled:active,.cf-toggle-switch .btn-danger.disabled:focus,.cf-toggle-switch .btn-danger.disabled:hover,.cf-toggle-switch .btn-danger[disabled],.cf-toggle-switch .btn-danger[disabled].active,.cf-toggle-switch .btn-danger[disabled]:active,.cf-toggle-switch .btn-danger[disabled]:focus,.cf-toggle-switch .btn-danger[disabled]:hover,.cf-toggle-switch fieldset[disabled] .btn-danger,.cf-toggle-switch fieldset[disabled] .btn-danger.active,.cf-toggle-switch fieldset[disabled] .btn-danger:active,.cf-toggle-switch fieldset[disabled] .btn-danger:focus,.cf-toggle-switch fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.cf-toggle-switch .btn-danger .badge{color:#d9534f;background-color:#fff}.cf-toggle-switch .btn-link{color:#428bca;font-weight:400;cursor:pointer;border-radius:0}.cf-toggle-switch .btn-link,.cf-toggle-switch .btn-link:active,.cf-toggle-switch .btn-link[disabled],.cf-toggle-switch fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.cf-toggle-switch .btn-link,.cf-toggle-switch .btn-link:active,.cf-toggle-switch .btn-link:focus,.cf-toggle-switch .btn-link:hover{border-color:transparent}.cf-toggle-switch .btn-link:focus,.cf-toggle-switch .btn-link:hover{color:#2a6496;text-decoration:underline;background-color:transparent}.cf-toggle-switch .btn-link[disabled]:focus,.cf-toggle-switch .btn-link[disabled]:hover,.cf-toggle-switch fieldset[disabled] .btn-link:focus,.cf-toggle-switch fieldset[disabled] .btn-link:hover{color:#999;text-decoration:none}.cf-toggle-switch .btn-group-lg>.btn,.cf-toggle-switch .btn-lg{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.cf-toggle-switch .btn-group-sm>.btn,.cf-toggle-switch .btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.cf-toggle-switch .btn-group-xs>.btn,.cf-toggle-switch .btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.cf-toggle-switch .btn-group-vertical>.btn:not(:first-child):not(:last-child),.cf-toggle-switch .btn-group>.btn-group:not(:first-child):not(:last-child)>.btn,.cf-toggle-switch .btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.cf-toggle-switch .btn-block{display:block;width:100%;padding-left:0;padding-right:0}.cf-toggle-switch .btn-block+.btn-block{margin-top:5px}.cf-toggle-switch input[type=button].btn-block,.cf-toggle-switch input[type=reset].btn-block,.cf-toggle-switch input[type=submit].btn-block{width:100%}.cf-toggle-switch .btn-group,.cf-toggle-switch .btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.cf-toggle-switch .btn-group-vertical>.btn,.cf-toggle-switch .btn-group>.btn{position:relative;float:left}.cf-toggle-switch .btn-group-vertical>.btn.active,.cf-toggle-switch .btn-group-vertical>.btn:active,.cf-toggle-switch .btn-group-vertical>.btn:focus,.cf-toggle-switch .btn-group-vertical>.btn:hover,.cf-toggle-switch .btn-group>.btn.active,.cf-toggle-switch .btn-group>.btn:active,.cf-toggle-switch .btn-group>.btn:focus,.cf-toggle-switch .btn-group>.btn:hover{z-index:2}.cf-toggle-switch .btn-group .btn+.btn,.cf-toggle-switch .btn-group .btn+.btn-group,.cf-toggle-switch .btn-group .btn-group+.btn,.cf-toggle-switch .btn-group .btn-group+.btn-group{margin-left:-1px}.cf-toggle-switch .btn-toolbar{margin-left:-5px}.cf-toggle-switch .btn-toolbar>.btn,.cf-toggle-switch .btn-toolbar>.btn-group,.cf-toggle-switch .btn-toolbar>.input-group{margin-left:5px}.cf-toggle-switch .btn .caret,.cf-toggle-switch .btn-group>.btn:first-child{margin-left:0}.cf-toggle-switch .btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.cf-toggle-switch .btn-group>.btn:last-child:not(:first-child),.cf-toggle-switch .btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.cf-toggle-switch .btn-group>.btn-group:first-child>.btn:last-child,.cf-toggle-switch .btn-group>.btn-group:first-child>.dropdown-toggle{border-bottom-right-radius:0;border-top-right-radius:0}.cf-toggle-switch .btn-group>.btn-group:last-child>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.cf-toggle-switch .btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px}.cf-toggle-switch .btn-group>.btn-lg+.dropdown-toggle{padding-left:12px;padding-right:12px}.cf-toggle-switch .btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.cf-toggle-switch .btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.cf-toggle-switch .btn-lg .caret{border-width:5px 5px 0}.cf-toggle-switch .dropup .btn-lg .caret{border-width:0 5px 5px}.cf-toggle-switch .btn-group-vertical>.btn,.cf-toggle-switch .btn-group-vertical>.btn-group,.cf-toggle-switch .btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.cf-toggle-switch .btn-group-vertical>.btn-group>.btn{float:none}.cf-toggle-switch .btn-group-vertical>.btn+.btn,.cf-toggle-switch .btn-group-vertical>.btn+.btn-group,.cf-toggle-switch .btn-group-vertical>.btn-group+.btn,.cf-toggle-switch .btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.cf-toggle-switch .btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.cf-toggle-switch .btn-group-vertical>.btn:last-child:not(:first-child){border-bottom-left-radius:4px;border-top-right-radius:0;border-top-left-radius:0}.cf-toggle-switch .btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.cf-toggle-switch .btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.cf-toggle-switch .btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.cf-toggle-switch .btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.cf-toggle-switch .btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.cf-toggle-switch .btn-group-justified>.btn,.cf-toggle-switch .btn-group-justified>.btn-group{float:none;display:table-cell;width:1%}.cf-toggle-switch .btn-group-justified>.btn-group .btn{width:100%}.cf-toggle-switch [data-toggle=buttons]>.btn>input[type=checkbox],.cf-toggle-switch [data-toggle=buttons]>.btn>input[type=radio]{display:none}.cf-toggle-switch .btn-group-vertical>.btn-group:after,.cf-toggle-switch .btn-group-vertical>.btn-group:before,.cf-toggle-switch .btn-toolbar:after,.cf-toggle-switch .btn-toolbar:before,.cf-toggle-switch .clearfix:after,.cf-toggle-switch .clearfix:before{content:" ";display:table}.cf-toggle-switch .btn-group-vertical>.btn-group:after,.cf-toggle-switch .btn-toolbar:after,.cf-toggle-switch .clearfix:after{clear:both}.cf-toggle-switch .center-block{display:block;margin-left:auto;margin-right:auto}.cf-toggle-switch .pull-right{float:right!important}.cf-toggle-switch .pull-left{float:left!important}.cf-toggle-switch .hide{display:none!important}.cf-toggle-switch .show{display:block!important}.cf-toggle-switch .invisible{visibility:hidden}.cf-toggle-switch .text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.cf-toggle-switch .hidden{display:none!important;visibility:hidden!important}.cf-toggle-switch .affix{position:fixed}@-ms-viewport{width:device-width}.cf-toggle-switch .visible-lg,.cf-toggle-switch .visible-md,.cf-toggle-switch .visible-print,.cf-toggle-switch .visible-sm,.cf-toggle-switch .visible-xs{display:none!important}@media (max-width:767px){.cf-toggle-switch .visible-xs{display:block!important}.cf-toggle-switch table.visible-xs{display:table}.cf-toggle-switch tr.visible-xs{display:table-row!important}.cf-toggle-switch td.visible-xs,.cf-toggle-switch th.visible-xs{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.cf-toggle-switch .visible-sm{display:block!important}.cf-toggle-switch table.visible-sm{display:table}.cf-toggle-switch tr.visible-sm{display:table-row!important}.cf-toggle-switch td.visible-sm,.cf-toggle-switch th.visible-sm{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.cf-toggle-switch .visible-md{display:block!important}.cf-toggle-switch table.visible-md{display:table}.cf-toggle-switch tr.visible-md{display:table-row!important}.cf-toggle-switch td.visible-md,.cf-toggle-switch th.visible-md{display:table-cell!important}}@media (min-width:1200px){.cf-toggle-switch .visible-lg{display:block!important}.cf-toggle-switch table.visible-lg{display:table}.cf-toggle-switch tr.visible-lg{display:table-row!important}.cf-toggle-switch td.visible-lg,.cf-toggle-switch th.visible-lg{display:table-cell!important}.cf-toggle-switch .hidden-lg{display:none!important}}@media (max-width:767px){.cf-toggle-switch .hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.cf-toggle-switch .hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.cf-toggle-switch .hidden-md{display:none!important}}@media print{.cf-toggle-switch .visible-print{display:block!important}.cf-toggle-switch table.visible-print{display:table}.cf-toggle-switch tr.visible-print{display:table-row!important}.cf-toggle-switch td.visible-print,.cf-toggle-switch th.visible-print{display:table-cell!important}.cf-toggle-switch .hidden-print{display:none!important}}.cf-toggle-group-buttons{width:100%;clear:both}input.form-control.parsley-success,select.form-control.parsley-success,textarea.form-control.parsley-success{color:#468847;background-color:#DFF0D8;border-color:#D6E9C6}input.form-control.parsley-error,select.form-control.parsley-error,textarea.form-control.parsley-error{color:#B94A48;background-color:#F2DEDE;border-color:#EED3D7}.form-control.parsley-errors-list{margin:2px 0 3px;padding:0;list-style-type:none;font-size:.9em;line-height:.9em;opacity:0;color:#468847;transition:all .3s ease-in;-o-transition:all .3s ease-in;-moz-transition:all .3s ease-in;-webkit-transition:all .3s ease-in}.form-control.parsley-errors-list.filled{opacity:1}.breadcrumb a.has-error{color:red}.form-group .parsley-errors-list.filled,.form-group .parsley-errors-list.filled .parsley-type{list-style:none}.caldera-grid .cf-multi-uploader-list>ul{list-style:none;margin:0 0 12px;padding:0}.caldera-grid .cf-multi-uploader-list>ul>li{margin:0;padding:0 0 22px;position:relative;clear:both}.caldera-grid .cf-multi-uploader-list>ul>li .file-name{display:inline-block;font-weight:700;left:16px;right:0;overflow:hidden;position:absolute;text-overflow:ellipsis;white-space:nowrap}.caldera-grid .cf-multi-uploader-list>ul>li .file-name.file-uploaded{left:0}.caldera-grid .cf-multi-uploader-list>ul>li .file-size{float:right}.caldera-grid .cf-multi-uploader-list>ul>li .file-type{float:left}.caldera-grid .cf-multi-uploader-list>ul>li .file-error{clear:both;display:block}.caldera-grid .cf-multi-uploader-list>ul>li .cf-file-remove{color:#cf0000;text-decoration:none;border:0}.caldera-grid .cf-multi-uploader-list>ul>li.has-error .bar{background-color:#cf0000!important}.caldera-grid .cf-multi-uploader-list>ul>li.has-error{color:#cf0000}.has-error.cf-toggle-switch .cf-toggle-group-buttons>a{background-color:#f2dede;border-color:#dd4b39}.cfdatepicker{z-index:10011!important}
assets/build/js/admin.min.js CHANGED
@@ -1 +1 @@
1
- function CalderaFormsButtonPulse(a){var b,c,d=!1;b=function(){a.animate({opacity:.25},500,function(){a.animate({opacity:1},500)})},this.startPulse=function(){!1===d&&(c=setInterval(function(){b()},1e3))},this.stopPulse=function(){d=!0,clearInterval(c)}}var baldrickTriggers,loop_loader;jQuery(document).ready(function(a){var b;b="object"==typeof CF_ADMIN?CF_ADMIN.adminAjax:ajaxurl,baldrickTriggers=function(){a(".ajax-trigger").baldrick({request:b,method:"POST",before:function(b,c){var d=a(b),e=a("#cf_toolbar_actions"),f=e.parent().find('[name="_wp_http_referer"]');if(e.length&&f.length&&(d.data("cf_toolbar_actions",e.val()),d.data("_wp_http_referer",f.val())),d.data("trigger")){c.preventDefault();var g=a(d.data("trigger"));return g.trigger(g.data("event")?g.data("event"):"click"),!1}},complete:function(){a(".init_field_type[data-type]").each(function(b,c){var d=a(c);"function"==typeof window[d.data("type")+"_init"]&&window[d.data("type")+"_init"](d.prop("id"),d[0])})}})},loop_loader=function(a,b){return{__id__:Math.round(1e7*Math.random())}},baldrickTriggers(),a("body").on("click",".modal-side-tab",function(b){b.preventDefault();var c=a(this),d=c.closest(".caldera-modal-body"),e=d.find(".tab-detail-panel"),f=a(c.attr("href"));d.find(".modal-side-tab.active").removeClass("active"),c.addClass("active"),e.hide(),f.show()}),a("body").on("click",".caldera-group-remover",function(b){b.preventDefault();var c=a(this),d=c.closest(".caldera-repeater-group");d.slideUp(200,function(){d.remove()})}),a("body").on("click",".form-delete a.form-control",function(b){var c=a(this);confirm(c.data("confirm"))||b.preventDefault()}),a("body").on("keyup change",'[data-format="key"]',function(a){this.value=this.value.replace(/[^a-z0-9]/gi,"-").toLowerCase()}),a("body").on("keyup change",'[data-format="slug"]',function(a){this.value=this.value.replace(/[^a-z0-9]/gi,"_").toLowerCase()}),a(window).on("resize",function(){var b=a("#cf_forms_toggle"),c=a(".form-panel-wrap");window.innerWidth<=1420&&b.is(":visible")&&c.is(":visible")&&b.trigger("click")});var c;void 0!=typeof CF_CLIPPY&&"object"==typeof CF_CLIPPY&&(c=new CalderaFormsAdminClippys2("caldera-forms-clippy",CF_CLIPPY,a),c.init()),a(".cf-entry-viewer-link").on("click",function(){"object"==typeof c&&c.remove()})}),function(a){"use strict";var b=function(a,b){this.init("tooltip",a,b)};b.prototype={constructor:b,init:function(b,c,d){var e,f;this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.enabled=!0,"click"==this.options.trigger?this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this)):"manual"!=this.options.trigger&&(e="hover"==this.options.trigger?"mouseenter":"focus",f="hover"==this.options.trigger?"mouseleave":"blur",this.$element.on(e+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(f+"."+this.type,this.options.selector,a.proxy(this.leave,this))),this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(b){return b=a.extend({},a.fn[this.type].defaults,b,this.$element.data()),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},enter:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);return c.options.delay&&c.options.delay.show?(clearTimeout(this.timeout),c.hoverState="in",void(this.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show))):c.show()},leave:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);return this.timeout&&clearTimeout(this.timeout),c.options.delay&&c.options.delay.hide?(c.hoverState="out",void(this.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide))):c.hide()},show:function(){var a,b,c,d,e,f,g;if(this.hasContent()&&this.enabled){switch(a=this.tip(),this.setContent(),this.options.animation&&a.addClass("fade"),f="function"==typeof this.options.placement?this.options.placement.call(this,a[0],this.$element[0]):this.options.placement,b=/in/.test(f),a.detach().css({top:0,left:0,display:"block"}).insertAfter(this.$element),c=this.getPosition(b),d=a[0].offsetWidth,e=a[0].offsetHeight,b?f.split(" ")[1]:f){case"bottom":g={top:c.top+c.height,left:c.left+c.width/2-d/2};break;case"top":g={top:c.top-e,left:c.left+c.width/2-d/2};break;case"left":g={top:c.top+c.height/2-e/2,left:c.left-d};break;case"right":g={top:c.top+c.height/2-e/2,left:c.left+c.width}}a.offset(g).addClass(f).addClass("in")}},setContent:function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},hide:function(){var b=this.tip();return b.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?function(){var c=setTimeout(function(){b.off(a.support.transition.end).detach()},500);b.one(a.support.transition.end,function(){clearTimeout(c),b.detach()})}():b.detach(),this},fixTitle:function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},hasContent:function(){return this.getTitle()},getPosition:function(b){return a.extend({},b?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var a=this.$element,b=this.options;return a.attr("data-original-title")||("function"==typeof b.title?b.title.call(a[0]):b.title)},tip:function(){return this.$tip=this.$tip||a(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);c[c.tip().hasClass("in")?"hide":"show"]()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var c=a.fn.tooltip;a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("tooltip"),f="object"==typeof c&&c;e||d.data("tooltip",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.tooltip.Constructor=b,a.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover",title:"",delay:0,html:!1},a.fn.tooltip.noConflict=function(){return a.fn.tooltip=c,this}}(window.jQuery);
1
+ function CalderaFormsButtonPulse(a){var b,c,d=!1;b=function(){a.animate({opacity:.25},500,function(){a.animate({opacity:1},500)})},this.startPulse=function(){!1===d&&(c=setInterval(function(){b()},1e3))},this.stopPulse=function(){d=!0,clearInterval(c)}}var baldrickTriggers,loop_loader;jQuery(document).ready(function(a){var b;b="object"==typeof CF_ADMIN?CF_ADMIN.adminAjax:ajaxurl,baldrickTriggers=function(){a(".ajax-trigger").baldrick({request:b,method:"POST",before:function(b,c){var d=a(b),e=a("#cf_toolbar_actions"),f=e.parent().find('[name="_wp_http_referer"]');if(e.length&&f.length&&(d.data("cf_toolbar_actions",e.val()),d.data("_wp_http_referer",f.val())),d.data("trigger")){c.preventDefault();var g=a(d.data("trigger"));return g.trigger(g.data("event")?g.data("event"):"click"),!1}},complete:function(){a(".init_field_type[data-type]").each(function(b,c){var d=a(c);"function"==typeof window[d.data("type")+"_init"]&&window[d.data("type")+"_init"](d.prop("id"),d[0])})}})},loop_loader=function(a,b){return{__id__:Math.round(1e7*Math.random())}},baldrickTriggers(),a("body").on("click",".modal-side-tab",function(b){b.preventDefault();var c=a(this),d=c.closest(".caldera-modal-body"),e=d.find(".tab-detail-panel"),f=a(c.attr("href"));d.find(".modal-side-tab.active").removeClass("active"),c.addClass("active"),e.hide(),f.show()}),a("body").on("click",".caldera-group-remover",function(b){b.preventDefault();var c=a(this),d=c.closest(".caldera-repeater-group");d.slideUp(200,function(){d.remove()})}),a("body").on("click",".form-delete a.form-control",function(b){var c=a(this);confirm(c.data("confirm"))||b.preventDefault()}),a("body").on("keyup change",'[data-format="key"]',function(a){this.value=this.value.replace(/[^a-z0-9]/gi,"-").toLowerCase()}),a("body").on("keyup change",'[data-format="slug"]',function(a){this.value=this.value.replace(/[^a-z0-9]/gi,"_").toLowerCase()}),a(window).on("resize",function(){var b=a("#cf_forms_toggle"),c=a(".form-panel-wrap");window.innerWidth<=1420&&b.is(":visible")&&c.is(":visible")&&b.trigger("click")});var c;void 0!=typeof CF_CLIPPY&&"object"==typeof CF_CLIPPY&&(c=new CalderaFormsAdminClippys2("caldera-forms-clippy",CF_CLIPPY,a),c.init()),a(".cf-entry-viewer-link").on("click",function(){"object"==typeof c&&c.remove()})}),function(a){"use strict";var b=function(a,b){this.init("tooltip",a,b)};b.prototype={constructor:b,init:function(b,c,d){var e,f;this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.enabled=!0,"click"==this.options.trigger?this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this)):"manual"!=this.options.trigger&&(e="hover"==this.options.trigger?"mouseenter":"focus",f="hover"==this.options.trigger?"mouseleave":"blur",this.$element.on(e+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(f+"."+this.type,this.options.selector,a.proxy(this.leave,this))),this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(b){return b=a.extend({},a.fn[this.type].defaults,b,this.$element.data()),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},enter:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);return c.options.delay&&c.options.delay.show?(clearTimeout(this.timeout),c.hoverState="in",void(this.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show))):c.show()},leave:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);return this.timeout&&clearTimeout(this.timeout),c.options.delay&&c.options.delay.hide?(c.hoverState="out",void(this.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide))):c.hide()},show:function(){var a,b,c,d,e,f,g;if(this.hasContent()&&this.enabled){switch(a=this.tip(),this.setContent(),this.options.animation&&a.addClass("fade"),f="function"==typeof this.options.placement?this.options.placement.call(this,a[0],this.$element[0]):this.options.placement,b=/in/.test(f),a.detach().css({top:0,left:0,display:"block"}).insertAfter(this.$element),c=this.getPosition(b),d=a[0].offsetWidth,e=a[0].offsetHeight,b?f.split(" ")[1]:f){case"bottom":g={top:c.top+c.height,left:c.left+c.width/2-d/2};break;case"top":g={top:c.top-e,left:c.left+c.width/2-d/2};break;case"left":g={top:c.top+c.height/2-e/2,left:c.left-d};break;case"right":g={top:c.top+c.height/2-e/2,left:c.left+c.width}}a.offset(g).addClass(f).addClass("in")}},setContent:function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},hide:function(){var b=this.tip();return b.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?function(){var c=setTimeout(function(){b.off(a.support.transition.end).detach()},500);b.one(a.support.transition.end,function(){clearTimeout(c),b.detach()})}():b.detach(),this},fixTitle:function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},hasContent:function(){return this.getTitle()},getPosition:function(b){return a.extend({},b?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var a=this.$element,b=this.options;return a.attr("data-original-title")||("function"==typeof b.title?b.title.call(a[0]):b.title)},tip:function(){return this.$tip=this.$tip||a(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);c[c.tip().hasClass("in")?"hide":"show"]()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var c=a.fn.tooltip;a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("tooltip"),f="object"==typeof c&&c;e||d.data("tooltip",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.tooltip.Constructor=b,a.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover",title:"",delay:0,html:!1},a.fn.tooltip.noConflict=function(){return a.fn.tooltip=c,this}}(window.jQuery);var baldrickTriggers,loop_loader;jQuery(document).ready(function(a){baldrickTriggers=function(){a(".ajax-trigger").baldrick({request:ajaxurl,method:"POST",before:function(b,c){var d=a(b),e=a("#cf_toolbar_actions"),f=e.parent().find('[name="_wp_http_referer"]');if(e.length&&f.length&&(d.data("cf_toolbar_actions",e.val()),d.data("_wp_http_referer",f.val())),d.data("trigger")){c.preventDefault();var g=a(d.data("trigger"));return g.trigger(g.data("event")?g.data("event"):"click"),!1}},complete:function(){a(".init_field_type[data-type]").each(function(b,c){var d=a(c);"function"==typeof window[d.data("type")+"_init"]&&window[d.data("type")+"_init"](d.prop("id"),d[0])})}})},loop_loader=function(a,b){return{__id__:Math.round(1e7*Math.random())}},baldrickTriggers(),a("body").on("click",".modal-side-tab",function(b){b.preventDefault();var c=a(this),d=c.closest(".caldera-modal-body"),e=d.find(".tab-detail-panel"),f=a(c.attr("href"));d.find(".modal-side-tab.active").removeClass("active"),c.addClass("active"),e.hide(),f.show()}),a("body").on("click",".caldera-group-remover",function(b){b.preventDefault();var c=a(this),d=c.closest(".caldera-repeater-group");d.slideUp(200,function(){d.remove()})}),a("body").on("click",".form-delete a.form-control",function(b){var c=a(this);confirm(c.data("confirm"))||b.preventDefault()}),a("body").on("keyup change",'[data-format="key"]',function(a){this.value=this.value.replace(/[^a-z0-9]/gi,"-").toLowerCase()}),a("body").on("keyup change",'[data-format="slug"]',function(a){this.value=this.value.replace(/[^a-z0-9]/gi,"_").toLowerCase()}),a(window).on("resize",function(){var b=a("#cf_forms_toggle"),c=a(".form-panel-wrap");window.innerWidth<=1420&&b.is(":visible")&&c.is(":visible")&&b.trigger("click")});var b;void 0!=typeof CF_CLIPPY&&"object"==typeof CF_CLIPPY&&(b=new CalderaFormsAdminClippys(a(document.getElementById("caldera-forms-clippy")),CF_CLIPPY,a),b.init()),a(".cf-entry-viewer-link").on("click",function(){"object"==typeof b&&b.remove()})});
assets/build/js/ajax-core.min.js CHANGED
@@ -1 +1 @@
1
- var resBaldrickTriggers;jQuery(function(a){var b=[],c=function(c,d,e){var f=a("#progress-file-"+d),g=a("."+d+" .file-size");b.push(1),cf_uploader_filelist[d].state=2,a.ajax({xhr:function(){var a=new window.XMLHttpRequest;return a.upload.addEventListener("progress",function(a){if(a.lengthComputable){var b=a.loaded/a.total*100;f.width(b+"%"),g.html(size_format(a.loaded)+" / "+size_format(a.total))}},!1),a.addEventListener("progress",function(a){if(a.lengthComputable){a.loaded,a.total}},!1),a},url:c.data("request")+"/upload/",type:"POST",data:e,processData:!1,contentType:!1,success:function(e,f,g){if(e.success&&!0===e.success){b.pop();var h=a('[data-file="'+d+'"]');h.next().addClass("file-uploaded"),h.remove(),cf_uploader_filelist[d].state=3,c.submit()}else if(e.data&&!e.success)return a("."+d).addClass("has-error"),c.find(":submit").prop("disabled",!1),c.find(".cf-uploader-trigger").slideDown(),void a("."+d+" .file-error").html(e.data)},error:function(a,b,d){c.data("postDisable")||buttons.prop("disabled",!1)}})};(resBaldrickTriggers=function(){function d(b){return a("#caldera_notices_"+b.params.trigger.data("instance"))}a(".cfajax-trigger").baldrick({request:"./",method:"POST",init:function(d,e){e.preventDefault();var f=a(d),g=f.find(":submit");if(f.data("_cf_manual"))return f.find('[name="cfajax"]').remove(),!1;if(f.data("postDisable")||g.prop("disabled",!0),"object"==typeof cf_uploader_filelist){f.find(".cf-uploader-trigger").slideUp();var h=!1,i=b.length;for(var j in cf_uploader_filelist)if(!(cf_uploader_filelist[j].state>1||0===cf_uploader_filelist[j].state)){h=!0;var k=new FormData,l=j,m=a("#"+l.split("_file_")[0]);if(k.append(m.data("field"),cf_uploader_filelist[j].file),k.append("field",m.data("field")),k.append("control",m.data("controlid")),c(f,l,k),1===++i)break}if(!0===h||b.length)return!1}},error:function(b){if(404===b.jqxhr.status)this.trigger.data("_cf_manual",!0).trigger("submit");else{var c=d(b);b.jqxhr.responseJSON.data.html&&(c.html(b.jqxhr.responseJSON.data.html),a("html,body").animate({scrollTop:c.offset().top-c.outerHeight()},300))}},callback:function(b){b.params.trigger.find(":submit").prop("disabled",!1);var c=d(b);if(b.params.trigger.data("customCallback")&&"function"==typeof window[b.params.trigger.data("customCallback")]&&window[b.params.trigger.data("customCallback")](b.data),b.params.trigger.data("inhibitnotice")||(a(".caldera_ajax_error_wrap").removeClass("caldera_ajax_error_wrap").removeClass("has-error"),a(".caldera_ajax_error_block").remove(),"complete"===b.data.status||"success"===b.data.type?(b.data.html&&b.params.target.html(b.data.html),b.params.trigger.data("hiderows")&&b.params.trigger.find("div.row").remove()):"preprocess"===b.data.status?b.params.target.html(b.data.html):"error"===b.data.status&&b.params.target.html(b.data.html)),"complete"!==b.data.status&&"success"!==b.data.type||b.data.entry||b.params.trigger[0].reset(),b.data.url&&(b.params.trigger.hide(),window.location=b.data.url),b.params.trigger.find(".cf-uploader-trigger").slideDown(),b.data.fields)for(var e in b.data.fields){var f=b.params.trigger.find('[data-field="'+e+'"]'),g=f.parent();if(f.length){g.is("label")&&(g=g.parent(),(g.hasClass("checkbox")||g.hasClass("radio"))&&(g=g.parent()));var h=g.find(".help-block").not(".caldera_ajax_error_block");g.addClass("has-error").addClass("caldera_ajax_error_wrap"),h.length&&h.hide(),g.append('<span class="help-block caldera_ajax_error_block">'+b.data.fields[e]+"</span>")}else c.html('<p class="alert alert-danger ">'+b.data.fields[e]+"</p>")}if("undefined"!=b.data.scroll){var i=document.getElementById(b.data.scroll);if(null!=i){var j=a(i);a("html,body").animate({scrollTop:j.offset().top-j.outerHeight()-12},300)}}a(document).trigger("cf.submission",b),a(document).trigger("cf."+b.data.type)}})})()});
1
+ var resBaldrickTriggers;jQuery(function(a){var b=[],c=function(c,d,e){var f=a("#progress-file-"+d),g=a("."+d+" .file-size");b.push(1),cf_uploader_filelist[d].state=2,a.ajax({xhr:function(){var a=new window.XMLHttpRequest;return a.upload.addEventListener("progress",function(a){if(a.lengthComputable){var b=a.loaded/a.total*100;f.width(b+"%"),g.html(size_format(a.loaded)+" / "+size_format(a.total))}},!1),a.addEventListener("progress",function(a){if(a.lengthComputable){a.loaded,a.total}},!1),a},url:c.data("request")+"/upload/",type:"POST",data:e,processData:!1,contentType:!1,success:function(e,f,g){if(e.success&&!0===e.success){b.pop();var h=a('[data-file="'+d+'"]');h.next().addClass("file-uploaded"),h.remove(),cf_uploader_filelist[d].state=3,c.submit()}else if(e.data&&!e.success)return a("."+d).addClass("has-error"),c.find(":submit").prop("disabled",!1),c.find(".cf-uploader-trigger").slideDown(),void a("."+d+" .file-error").html(e.data)},error:function(a,b,d){c.data("postDisable")||buttons.prop("disabled",!1)}})};(resBaldrickTriggers=function(){var d=function(b){return a("#caldera_notices_"+b.params.trigger.data("instance"))},e=function(b){return a("#caldera-forms-breadcrumb_"+b.params.trigger.data("instance"))},f=function(a){var b=e(a);b.length&&b.show().attr("aria-hidden",!1).css("visibility","visible")},g=function(a){var b=e(a);b.length&&b.show().attr("aria-hidden",!0).css("visibility","hidden")};a(".cfajax-trigger").baldrick({request:"./",method:"POST",init:function(d,e){e.preventDefault();var f=a(d),g=f.find(":submit");if(f.data("_cf_manual"))return f.find('[name="cfajax"]').remove(),!1;if(f.data("postDisable")||g.prop("disabled",!0),"object"==typeof cf_uploader_filelist){f.find(".cf-uploader-trigger").slideUp();var h=!1,i=b.length;for(var j in cf_uploader_filelist)if(!(cf_uploader_filelist[j].state>1||0===cf_uploader_filelist[j].state)){h=!0;var k=new FormData,l=j,m=a("#"+l.split("_file_")[0]);if(k.append(m.data("field"),cf_uploader_filelist[j].file),k.append("field",m.data("field")),k.append("control",m.data("controlid")),c(f,l,k),1===++i)break}if(!0===h||b.length)return!1}},error:function(b){if(404===b.jqxhr.status)this.trigger.data("_cf_manual",!0).trigger("submit");else{var c=d(b);b.jqxhr.responseJSON.data.html&&(c.html(b.jqxhr.responseJSON.data.html),a("html,body").animate({scrollTop:c.offset().top-c.outerHeight()},300))}},callback:function(b){b.params.trigger.find(":submit").prop("disabled",!1);var c=d(b);if(b.params.trigger.data("customCallback")&&"function"==typeof window[b.params.trigger.data("customCallback")]&&window[b.params.trigger.data("customCallback")](b.data),b.params.trigger.data("inhibitnotice")||(a(".caldera_ajax_error_wrap").removeClass("caldera_ajax_error_wrap").removeClass("has-error"),a(".caldera_ajax_error_block").remove(),"complete"===b.data.status||"success"===b.data.type?(g(b),b.data.html&&b.params.target.html(b.data.html),b.params.trigger.data("hiderows")&&b.params.trigger.find("div.row").remove()):"preprocess"===b.data.status?(f(b),b.params.target.html(b.data.html)):"error"===b.data.status&&(f(b),b.params.target.html(b.data.html))),"complete"!==b.data.status&&"success"!==b.data.type||b.data.entry||b.params.trigger[0].reset(),b.data.url&&(b.params.trigger.hide(),window.location=b.data.url),b.params.trigger.find(".cf-uploader-trigger").slideDown(),b.data.fields)for(var e in b.data.fields){var h=b.params.trigger.find('[data-field="'+e+'"]'),i=h.parent();if(h.length){i.is("label")&&(i=i.parent(),(i.hasClass("checkbox")||i.hasClass("radio"))&&(i=i.parent()));var j=i.find(".help-block").not(".caldera_ajax_error_block");i.addClass("has-error").addClass("caldera_ajax_error_wrap"),j.length&&j.hide(),i.append('<span class="help-block caldera_ajax_error_block">'+b.data.fields[e]+"</span>")}else c.html('<p class="alert alert-danger ">'+b.data.fields[e]+"</p>")}if("undefined"!=b.data.scroll){var k=document.getElementById(b.data.scroll);if(null!=k){var l=a(k);a("html,body").animate({scrollTop:l.offset().top-l.outerHeight()-12},300)}}a(document).trigger("cf.submission",b),a(document).trigger("cf."+b.data.type)}})})()});var resBaldrickTriggers;jQuery(function(a){var b=[],c=function(c,d,e){var f=a("#progress-file-"+d),g=a("."+d+" .file-size");b.push(1),cf_uploader_filelist[d].state=2,a.ajax({xhr:function(){var a=new window.XMLHttpRequest;return a.upload.addEventListener("progress",function(a){if(a.lengthComputable){var b=a.loaded/a.total*100;f.width(b+"%"),g.html(size_format(a.loaded)+" / "+size_format(a.total))}},!1),a.addEventListener("progress",function(a){a.lengthComputable&&(a.loaded,a.total)},!1),a},url:c.data("request")+"/upload/",type:"POST",data:e,processData:!1,contentType:!1,success:function(e,f,g){if(e.success&&!0===e.success){b.pop();var h=a('[data-file="'+d+'"]');h.next().addClass("file-uploaded"),h.remove(),cf_uploader_filelist[d].state=3,c.submit()}else if(e.data&&!e.success)return a("."+d).addClass("has-error"),c.find(":submit").prop("disabled",!1),c.find(".cf-uploader-trigger").slideDown(),void a("."+d+" .file-error").html(e.data)},error:function(a,b,d){c.data("postDisable")||buttons.prop("disabled",!1)}})};(resBaldrickTriggers=function(){a(".cfajax-trigger").baldrick({request:"./",method:"POST",init:function(d,e){e.preventDefault();var f=a(d),g=f.find(":submit");if(f.data("_cf_manual"))return f.find('[name="cfajax"]').remove(),!1;if(f.data("postDisable")||g.prop("disabled",!0),"object"==typeof cf_uploader_filelist){f.find(".cf-uploader-trigger").slideUp();var h=!1,i=b.length;for(var j in cf_uploader_filelist)if(!(cf_uploader_filelist[j].state>1||0===cf_uploader_filelist[j].state)){h=!0;var k=new FormData,l=j,m=a("#"+l.split("_file_")[0]);if(k.append(m.data("field"),cf_uploader_filelist[j].file),k.append("field",m.data("field")),k.append("control",m.data("controlid")),c(f,l,k),1===++i)break}if(!0===h||b.length)return!1}},error:function(a){404===a.jqxhr.status&&this.trigger.data("_cf_manual",!0).trigger("submit")},callback:function(b){if(b.params.trigger.find(":submit").prop("disabled",!1),b.params.trigger.data("instance"),b.params.trigger.data("customCallback")&&"function"==typeof window[b.params.trigger.data("customCallback")]&&window[b.params.trigger.data("customCallback")](b.data),b.params.trigger.data("inhibitnotice")||(a(".caldera_ajax_error_wrap").removeClass("caldera_ajax_error_wrap").removeClass("has-error"),a(".caldera_ajax_error_block").remove(),"complete"===b.data.status||"success"===b.data.type?(b.data.html&&b.params.target.html(b.data.html),b.params.trigger.data("hiderows")&&b.params.trigger.find("div.row").remove()):"preprocess"===b.data.status?b.params.target.html(b.data.html):"error"===b.data.status&&b.params.target.html(b.data.html)),"complete"!==b.data.status&&"success"!==b.data.type||b.data.entry||b.params.trigger[0].reset(),b.data.url&&(b.params.trigger.hide(),window.location=b.data.url),b.params.trigger.find(".cf-uploader-trigger").slideDown(),b.data.fields)for(var c in b.data.fields){var d=b.params.trigger.find('[data-field="'+c+'"]'),e=d.parent();e.is("label")&&(e=e.parent(),(e.hasClass("checkbox")||e.hasClass("radio"))&&(e=e.parent()));var f=e.find(".help-block").not(".caldera_ajax_error_block");e.addClass("has-error").addClass("caldera_ajax_error_wrap"),f.length&&f.hide(),e.append('<span class="help-block caldera_ajax_error_block">'+b.data.fields[c]+"</span>")}a(document).trigger("cf.submission",b),a(document).trigger("cf."+b.data.type)}})})()});
assets/build/js/caldera-forms-front.min.js CHANGED
@@ -1,5 +1,5 @@
1
- function CFEvents(a){function b(a){return c.hasOwnProperty(a)}var c={};this.subscribe=function(a,d){b(a)||(c[a]=[]),c[a].push(d)},this.trigger=function(d,e){b(d)&&c[d].forEach(function(b){b(a.getState(d),d)})},this.detach=function(a,d){if(b(a))if(null===d)delete c[a];else for(var e in c[a])d===e&&c[a].splice(e,1)}}function CFState(a,b){function c(a){return m.hasOwnProperty(a)}function d(a){var c=b("#"+a);return c.length?(c.on("change keyup",function(){var a=b(this);n[a.attr("id")]=f(a),j.mutateState([a.attr("id")],a.val())}),n[a]=f(b(document.getElementById(a))),j.mutateState([c.attr("id")],c.val()),!0):(c=b("."+a),c.length?(c.on("change",function(){var a,c,d=[],e=b(this),h=e.attr("type");switch(h){case"radio":a=e.data("radio-field"),c=b("[data-radio-field="+a+"]"),d="";break;case"checkbox":a=e.data("checkbox-field"),c=b("[data-checkbox-field="+a+"]");break;default:a=e.data("field"),c=b("[data-field="+a+"]")}if("checkbox"===h){var i,k=0;c.length?c.each(function(a,c){i=b(c),i.prop("checked")&&(k+=g(f(i)),d.push(i.val()))}):d=[],n[a]=k}else c.length?1==c.length?d=f(b(c[0])):c.each(function(c,e){var g=b(e);g.prop("checked")&&("radio"===h?(n[a]=f(g),d=g.val()):d.push(g.val()))}):d=0;j.mutateState(a,d)}),!0):(j.unbind(a),!1))}function e(a,b){m[a]=0,n[a]=0,j.events().subscribe(a,function(a,b){n[b]=a})}function f(a){if(a.is("select")&&a.has("option")&&(a=a.find(":selected")),!a.length)return 0;if(a.is("hidden"))return a.val();var b=0,c=a.attr("data-calc-value");return b=void 0===c||!1===c||isNaN(c)?a.val():a.data("calc-value"),g(b)}function g(a){return!a||isNaN(a)?0:window.parseFloat(a)}function h(a){return"number"==typeof a}function i(a){return"string"==typeof a}var j=this,k=new CFEvents(this),l={},m={},n={};this.init=function(a,b){for(var c in a)"object"==typeof b[c]?"calculation"==b[c].type&&e(c,b[c]):d(c)?(m[c]=a[c],b.hasOwnProperty(c)?n[c]=b[c]:n[c]=null):(m[c]="",l[c]=!0,n[c]=null)},this.getState=function(a){return!!c(a)&&m[a]},this.getCalcValue=function(a,d){var e=0;if(!c(a))return e;if(d){d=0;var k,l=d;return b("#"+a).each(function(){l=0,k=b(this),k.prop("checked")&&(l=f(k),g(l)>g(d)&&(d=g(l)))}),g(d)}if(n.hasOwnProperty(a)){if(!1===n[a]||null===n[a]){var m=f(b(document.getElementById(a)));i(m)&&(m=g(m)),h(m)&&(n[a]=m)}e=n[a]}else e=j.getState(a),b.isArray(e)&&(e=e.reduce(function(a,b){return g(a)+g(b)},0)),h(e)&&(n[a]=e);return g(e)},this.mutateState=function(a,b){return!!c(a)&&(m[a]!=b&&(m[a]=b,k.trigger(a,b)),!0)},this.unbind=function(a){j.mutateState(a,""),l[a]=!0,delete n[a]},this.rebind=function(a){d(a),delete l[a]},this.events=function(){return{subscribe:function(a,b){c(a)&&k.subscribe(a,b)},detach:function(a,b){k.detach(a,b)}}}}function color_picker_init(){jQuery(".minicolor-picker").miniColors()}function toggle_button_init(a,b){var c=jQuery(b),d=c.find(".cf-toggle-group-radio:checked");d.length&&jQuery("#"+d.data("ref")).trigger("click")}function Caldera_Forms_Field_Config(a,b,c,d){function e(a,b,c,d){var e=b.parent().parent();return e.removeClass("has-error"),e.find(".help-block").remove(),a?(e.removeClass("has-error"),h(),!0):(e.addClass("has-error").append('<span id="cf-error-'+b.attr("id")+'" class="help-block '+d+'">'+c+"</span>"),b.prop("required")&&g(b),b.addClass("parsely-error"),!1)}function f(a){return!a.closest(".caldera-form-page").attr("aria-hidden")}function g(a){f(a)&&l.prop("disabled",!0).attr("aria-disabled",!0)}function h(){l.prop("disabled",!1).attr("aria-disabled",!1)}function i(a,b,c){var d;return function(){var e=this,f=arguments,g=function(){d=null,c||a.apply(e,f)},h=c&&!d;clearTimeout(d),d=setTimeout(g,b),h&&a.apply(e,f)}}var j=this,k={},l=(b.data("instance"),b.find(":submit, .cf-page-btn-next"));this.init=function(){c.each(a,function(a,b){k[b.id]=j[b.type](b)})},this.button=function(a){var b=a.id;c(document).on("click dblclick","#"+b,function(a){c("#"+b+"_btn").val(a.type).trigger("change")})},this.html=function(a){if(0!=a.sync){var b,e={},f=a.bindFields,g=c(document.getElementById(a.contentId));b=function(){if(g.length||(g=c(document.getElementById(a.contentId))),g.length){void 0==e[a.tmplId]&&(e[a.tmplId]=c(document.getElementById(a.tmplId)).html());for(var b,h=e[a.tmplId],i=0;i<=f.length;i++)"object"==typeof f[i]&&f[i].hasOwnProperty("to")&&f[i].hasOwnProperty("tag")&&(b=d.getState(f[i].to),b=0===b||"0"===b||b?isNaN(b)?"string"==typeof b?b.replace(/(?:\r\n|\r|\n)/g,"<br />"):b&&void 0!=b.join&&void 0!==b&&void 0!==b?b.join(", "):"":b.toString():"",h=h.replace(f[i].tag,b));g.html(h).trigger("change")}},function(){for(var a=0;a<=f.length;a++)"object"==typeof f[a]&&f[a].hasOwnProperty("to")&&d.events().subscribe(f[a].to,b);c(document).on("cf.pagenav cf.modal",b)}(),b()}},this.summary=this.html;var m={};this.range_slider=function(a){function b(b){b.parent().find(".rangeslider").css("backgroundColor",a.trackcolor),b.parent().find(".rangeslider__fill").css("backgroundColor",a.color),b.parent().find(".rangeslider__handle").css("backgroundColor",a.handle).css("borderColor",a.handleborder)}var e=c(document.getElementById(a.id));c(document).on("cf.pagenav cf.add cf.disable cf.modal",function(){var e=document.getElementById(a.id);if(null!=e){var f=c(e),g=m[a.id].value;if(!f.is(":visible"))return;f.val(g),f.rangeslider("destroy"),f.rangeslider(m[a.id].init),f.val(g).change(),b(f),d.mutateState(a.id,g)}}),function(){"object"!=m[a.id]&&(m[a.id]={value:a.default,init:{},inited:!1});var f={onSlide:function(b,c){d.mutateState(a.id,c),m[a.id].value=c},onInit:function(){this.value=d.getState(a.id),m[a.id].inited=!0,b(e)},polyfill:!1};m[a.id].init=f,d.events().subscribe(a.id,function(b){c("#"+a.id+"_value").html(b)}),e.is(":visible")&&e.rangeslider(f)}()},this.star_rating=function(a){var b=a.options.score,d=c(document.getElementById(a.starFieldId)),e=(c(document.getElementById(a.id)),function(){var c=a.options;c.click=function(){b=d.raty("score"),d.trigger("change")},d.raty(c),d.raty("score",b)});e();var f=!1;jQuery(document).on("cf.add",function(){!1===f&&(f=!0,d.length&&(d.raty("destroy"),e()),setTimeout(function(){f=!1},500))})},this.toggle_switch=function(a){c(document).on("reset","#"+a.id,function(b){c.each(a.options,function(b,d){c(document.getElemenetById(d)).removeClass(a.selectedClassName).addClass(a.defaultClassName)}),c(document.getElementById(a.id)).prop("checked","")})},this.phone_better=function(a){var d=c(document.getElementById(a.id)),f=function(){var b=document.getElementById("cf-error-"+a.id);null!=b&&b.remove()},g=function(){f();var b;c.trim(d.val())&&(b=!!d.intlTelInput("isValidNumber"));var g,h=d.intlTelInput("getValidationError");return 0==h?(b=!0,g=""):g="undefined"!=a.messages[h]?a.messages[h]:a.messages.generic,e(b,d,g,"help-block-phone_better"),b},h=function(){d.length||(d=c(document.getElementById(a.id))),d.intlTelInput(a.options),d.on("keyup change",f),d.blur(function(){f(),g()}),d.on("change",g),b.on("submit",function(){g()})};c(document).on("cf.pagenav cf.add cf.disable cf.modal",h),h()},this.wysiwyg=function(a){var b=document.getElementById(a.id);if(null!=b){var d=c(b);d.trumbowyg(a.options);var e=d.parent().find(".trumbowyg-editor");e.html(d.val()),e.bind("input propertychange",function(){d.val(e.html())})}},this.credit_card_number=function(a){function b(b){var e={0:"amex",1:"discover",2:"visa",3:"discover",4:"mastercard"},f="credit-card.svg";c.each(e,function(a,c){if(0===b.indexOf(c))return f="cc-"+c+".svg",!1}),d.css("background",'url("'+a.imgPath+f+'")')}var d=c(document.getElementById(a.id));0==a.exp&&0==a.cvc||function(){g(d);var b=c(document.getElementById(a.cvc)),e=c(document.getElementById(a.exp));b.blur(function(){b.val()&&j.creditCardUtil.validateCVC(d,b),e.val()&&j.creditCardUtil.validateExp(e)})}(),d.length&&(d.payment("formatCardNumber"),d.blur(function(){var f=d.val(),g=c.payment.validateCardNumber(f),h=c.payment.cardType(f);e(g,d,a.invalid,"help-block-credit_card_number help-block-credit_card"),g&&b(h)}))},this.credit_card_exp=function(a){var b=c(document.getElementById(a.id));b.length&&(b.payment("formatCardExpiry"),b.blur(function(){e(j.creditCardUtil.validateExp(b),b,a.invalid,"help-block-credit_card_exp help-block-credit_card")}))},this.credit_card_cvc=function(a){var b=c(document.getElementById(a.id));if(b.length&&(b.payment("formatCardCVC"),!1!==a.ccField)){var d=c(document.getElementById(a.ccField));b.blur(function(){e(j.creditCardUtil.validateExp(d,b),b,a.invalid,"help-block-credit_card_cvc help-block-credit_card")})}},this.creditCardUtil={validateCVC:function(a,b){var d=b.val(),e=c.payment.validateCardNumber(a.val()),f=!1;if(e){var g=c.payment.cardType(a.val());f=c.payment.validateCardCVC(d,g)}return f},validateExp:function(a){var b=a.val().split("/");if(b&&2==b.length)return c.payment.validateCardExpiry(b[0].trim(),b[1].trim())}},this.color_picker=function(a){c(document.getElementById(a.id)).miniColors(a.settings),c(document).on("cf.pagenav cf.add cf.disable cf.modal",function(){c(document.getElementById(a.id)).miniColors(a.settings)})},this.calculation=function(a){function b(b){b+="";for(var c=b.split("."),d=c[0],e=c.length>1?a.decimalSeparator+c[1]:"",f=/(\d+)(\d{3})/;f.test(d);)d=d.replace(f,"$1"+a.thousandSeparator+"$2");return d+e}var e=null,f=i(function(){g(d)},250),g=function(){var f=window[a.callback].apply(null,[d]);isFinite(f)||(f=0),null!==e&&f===e||(e=f,d.mutateState(a.id,f),"number"!=typeof f&&(f=parseInt(f,10)),a.moneyFormat&&(f=f.toFixed(2)),c("#"+a.id).html(b(f)).data("calc-value",f),c("#"+a.targetId).val(f).trigger("change"))};c.each(a.fieldBinds,function(a,b){d.events().subscribe(b,f)}),c(document).on("cf.pagenav cf.add cf.remove cf.modal",function(b,c){"cf"==b.type&&"remove"===b.namespace&&"object"==typeof c&&c.hasOwnProperty("field")&&c.field===a.id?e=null:f()}),f()}}function CalderaFormsFieldSync(a,b,c,d,e){for(var f=0;f<b.length;f++)d(document).on("keyup change blur mouseover","[data-field='"+b[f]+"']",function(){var b=a.data("sync");if(id=a.data("field"),reg=new RegExp("{{([^}]*?)}}","g"),template=b.match(reg),!a.data("unsync")&&void 0!=template&&template.length){for(var f=0;f<template.length;f++){for(var g=template[f].replace(/\}/g,"").replace(/\{/g,""),h=new RegExp(template[f],"g"),i=c.find("[data-field='"+g+"']"),j="",k=0;k<i.length;k++){var l=d(i[k]);(!l.is(":radio")&&!l.is(":checkbox")||l.is(":checked"))&&(j+=l.val())}b=b.replace(h,j)}e.mutateState(a.attr("id"),j),a.val(b)}}),d("[data-field='"+b[f]+"']").trigger("change")}function CalderaFormsResetNonce(a,b,c){function d(a){return(new Date).getTime()-36e3>a}function e(){c.ajax({url:b.rest.tokens.nonce,method:"POST",beforeSend:function(a){a.setRequestHeader("X-WP-Nonce",b.rest.nonce)},data:{form_id:a}}).success(function(a){f.val(a.nonce),f.data("nonce-time",(new Date).getTime())})}var f;this.init=function(){f=c("#"+b.nonce.field+"_"+a),d(f.data("nonce-time"))&&e()}}function caldera_forms_check_protocol(a){var b=window.location.protocol,c=document.createElement("a");return c.href=a,c.protocol===b}function CalderaFormsCrossOriginWarning(a,b,c){function d(){b(a.data("target")).append('<div class="alert alert-warning">'+c.mixed_protocol+"</div>")}this.maybeWarn=function(){if(a.find('[name="cfajax"]').length){caldera_forms_check_protocol(a.data("request"))||d()}}}function CalderaFormsJQueryWarning(a,b,c){function d(){b(a.data("target")).append('<div class="alert alert-warning">'+c.jquery_old+"</div>")}function e(a){var b=a.split(".");if(1==b[0]){if(12>b[2])return!0;if(4>b[2])return!0}return!1}this.maybeWarn=function(){var a=b.fn.jquery;"string"==typeof a&&"1.12.4"!=a&&e(a)&&d()}}!function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};b.m=a,b.c=c,b.i=function(a){return a},b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{configurable:!1,enumerable:!0,get:d})},b.n=function(a){var c=a&&a.__esModule?function(){return a.default}:function(){return a};return b.d(c,"a",c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p="",b(b.s=9)}([function(a,b,c){"use strict";var d,e,f;"function"==typeof Symbol&&Symbol.iterator,function(g){e=[c(2)],d=g,void 0!==(f="function"==typeof d?d.apply(b,e):d)&&(a.exports=f)}(function(a){return a})},function(a,b,c){"use strict";var d,e,f,g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};!function(g){e=[c(0),c(11),c(10)],d=g,void 0!==(f="function"==typeof d?d.apply(b,e):d)&&(a.exports=f)}(function(a,b,c,d){function e(b,c,g){if(!(this instanceof e))return new e(b,c,g);this.el=d,this.events={},this.maskset=d,this.refreshValue=!1,!0!==g&&(a.isPlainObject(b)?c=b:(c=c||{},c.alias=b),this.opts=a.extend(!0,{},this.defaults,c),this.noMasksCache=c&&c.definitions!==d,this.userOptions=c||{},this.isRTL=this.opts.numericInput,f(this.opts.alias,c,this.opts))}function f(b,c,g){var h=e.prototype.aliases[b];return h?(h.alias&&f(h.alias,d,g),a.extend(!0,g,h),a.extend(!0,g,c),!0):(null===g.mask&&(g.mask=b),!1)}function h(b,c){function f(b,f,g){var h=!1;if(null!==b&&""!==b||(h=null!==g.regex,h?(b=g.regex,b=b.replace(/^(\^)(.*)(\$)$/,"$2")):(h=!0,b=".*")),1===b.length&&!1===g.greedy&&0!==g.repeat&&(g.placeholder=""),g.repeat>0||"*"===g.repeat||"+"===g.repeat){var i="*"===g.repeat?0:"+"===g.repeat?1:g.repeat;b=g.groupmarker.start+b+g.groupmarker.end+g.quantifiermarker.start+i+","+g.repeat+g.quantifiermarker.end}var j,k=h?"regex_"+g.regex:g.numericInput?b.split("").reverse().join(""):b;return e.prototype.masksCache[k]===d||!0===c?(j={mask:b,maskToken:e.prototype.analyseMask(b,h,g),validPositions:{},_buffer:d,buffer:d,tests:{},metadata:f,maskLength:d},!0!==c&&(e.prototype.masksCache[k]=j,j=a.extend(!0,{},e.prototype.masksCache[k]))):j=a.extend(!0,{},e.prototype.masksCache[k]),j}if(a.isFunction(b.mask)&&(b.mask=b.mask(b)),a.isArray(b.mask)){if(b.mask.length>1){b.keepStatic=null===b.keepStatic||b.keepStatic;var g=b.groupmarker.start;return a.each(b.numericInput?b.mask.reverse():b.mask,function(c,e){g.length>1&&(g+=b.groupmarker.end+b.alternatormarker+b.groupmarker.start),e.mask===d||a.isFunction(e.mask)?g+=e:g+=e.mask}),g+=b.groupmarker.end,f(g,b.mask,b)}b.mask=b.mask.pop()}return b.mask&&b.mask.mask!==d&&!a.isFunction(b.mask.mask)?f(b.mask.mask,b.mask,b):f(b.mask,b.mask,b)}function i(f,h,j){function o(a,b,c){b=b||0;var e,f,g,h=[],i=0,k=r();do{!0===a&&p().validPositions[i]?(g=p().validPositions[i],f=g.match,e=g.locator.slice(),h.push(!0===c?g.input:!1===c?f.nativeDef:J(i,f))):(g=u(i,e,i-1),f=g.match,e=g.locator.slice(),(!1===j.jitMasking||i<k||"number"==typeof j.jitMasking&&isFinite(j.jitMasking)&&j.jitMasking>i)&&h.push(!1===c?f.nativeDef:J(i,f))),i++}while((V===d||i<V)&&(null!==f.fn||""!==f.def)||b>i);return""===h[h.length-1]&&h.pop(),p().maskLength=i+1,h}function p(){return h}function q(a){var b=p();b.buffer=d,!0!==a&&(b.validPositions={},b.p=0)}function r(a,b,c){var e=-1,f=-1,g=c||p().validPositions;a===d&&(a=-1);for(var h in g){var i=parseInt(h);g[i]&&(b||!0!==g[i].generatedInput)&&(i<=a&&(e=i),i>=a&&(f=i))}return-1!==e&&a-e>1||f<a?e:f}function s(b,c,e,f){var g,h=b,i=a.extend(!0,{},p().validPositions),k=!1;for(p().p=b,g=c-1;g>=h;g--)p().validPositions[g]!==d&&(!0!==e&&(!p().validPositions[g].match.optionality&&function(a){var b=p().validPositions[a];if(b!==d&&null===b.match.fn){var c=p().validPositions[a-1],e=p().validPositions[a+1];return c!==d&&e!==d}return!1}(g)||!1===j.canClearPosition(p(),g,r(d,!0),f,j))||delete p().validPositions[g]);for(q(!0),g=h+1;g<=r();){for(;p().validPositions[h]!==d;)h++;if(g<h&&(g=h+1),p().validPositions[g]===d&&E(g))g++;else{var l=u(g);!1===k&&i[h]&&i[h].match.def===l.match.def?(p().validPositions[h]=a.extend(!0,{},i[h]),p().validPositions[h].input=l.input,delete p().validPositions[g],g++):w(h,l.match.def)?!1!==D(h,l.input||J(g),!0)&&(delete p().validPositions[g],g++,k=!0):E(g)||(g++,h--),h++}}q(!0)}function t(a,b){for(var c,e=a,f=r(),g=p().validPositions[f]||x(0)[0],h=g.alternation!==d?g.locator[g.alternation].toString().split(","):[],i=0;i<e.length&&(c=e[i],!(c.match&&(j.greedy&&!0!==c.match.optionalQuantifier||(!1===c.match.optionality||!1===c.match.newBlockMarker)&&!0!==c.match.optionalQuantifier)&&(g.alternation===d||g.alternation!==c.alternation||c.locator[g.alternation]!==d&&C(c.locator[g.alternation].toString().split(","),h)))||!0===b&&(null!==c.match.fn||/[0-9a-bA-Z]/.test(c.match.def)));i++);return c}function u(a,b,c){return p().validPositions[a]||t(x(a,b?b.slice():b,c))}function v(a){return p().validPositions[a]?p().validPositions[a]:x(a)[0]}function w(a,b){for(var c=!1,d=x(a),e=0;e<d.length;e++)if(d[e].match&&d[e].match.def===b){c=!0;break}return c}function x(b,c,e){function f(c,e,g,i){function l(g,i,q){function r(b,c){var d=0===a.inArray(b,c.matches);return d||a.each(c.matches,function(a,e){if(!0===e.isQuantifier&&(d=r(b,c.matches[a-1])))return!1}),d}function s(b,c,e){var f,g;if(p().validPositions[b-1]&&e&&p().tests[b])for(var h=p().validPositions[b-1].locator,i=p().tests[b][0].locator,j=0;j<e;j++)if(h[j]!==i[j])return h.slice(e+1);return(p().tests[b]||p().validPositions[b])&&a.each(p().tests[b]||[p().validPositions[b]],function(a,b){var h=e!==d?e:b.alternation,i=b.locator[h]!==d?b.locator[h].toString().indexOf(c):-1;(g===d||i<g)&&-1!==i&&(f=b,g=i)}),f?f.locator.slice((e!==d?e:f.alternation)+1):e!==d?s(b,c):d}if(k>1e4)throw"Inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. "+p().mask;if(k===b&&g.matches===d)return m.push({match:g,locator:i.reverse(),cd:o}),!0;if(g.matches!==d){if(g.isGroup&&q!==g){if(g=l(c.matches[a.inArray(g,c.matches)+1],i))return!0}else if(g.isOptional){var t=g;if(g=f(g,e,i,q)){if(h=m[m.length-1].match,!r(h,t))return!0;n=!0,k=b}}else if(g.isAlternator){var u,v=g,w=[],x=m.slice(),y=i.length,z=e.length>0?e.shift():-1;if(-1===z||"string"==typeof z){var A,B=k,C=e.slice(),D=[];if("string"==typeof z)D=z.split(",");else for(A=0;A<v.matches.length;A++)D.push(A);for(var E=0;E<D.length;E++){if(A=parseInt(D[E]),m=[],e=s(k,A,y)||C.slice(),!0!==(g=l(v.matches[A]||c.matches[A],[A].concat(i),q)||g)&&g!==d&&D[D.length-1]<v.matches.length){var F=a.inArray(g,c.matches)+1;c.matches.length>F&&(g=l(c.matches[F],[F].concat(i.slice(1,i.length)),q))&&(D.push(F.toString()),a.each(m,function(a,b){b.alternation=i.length-1}))}u=m.slice(),k=B,m=[];for(var G=0;G<u.length;G++){var H=u[G],I=!1;H.alternation=H.alternation||y;for(var J=0;J<w.length;J++){var K=w[J];if("string"!=typeof z||-1!==a.inArray(H.locator[H.alternation].toString(),D)){if(function(a,b){return a.match.nativeDef===b.match.nativeDef||a.match.def===b.match.nativeDef||a.match.nativeDef===b.match.def}(H,K)){I=!0,H.alternation===K.alternation&&-1===K.locator[K.alternation].toString().indexOf(H.locator[H.alternation])&&(K.locator[K.alternation]=K.locator[K.alternation]+","+H.locator[H.alternation],K.alternation=H.alternation),H.match.nativeDef===K.match.def&&(H.locator[H.alternation]=K.locator[K.alternation],w.splice(w.indexOf(K),1,H));break}if(H.match.def===K.match.def){I=!1;break}if(function(a,c){return null===a.match.fn&&null!==c.match.fn&&c.match.fn.test(a.match.def,p(),b,!1,j,!1)}(H,K)||function(a,c){return null!==a.match.fn&&null!==c.match.fn&&c.match.fn.test(a.match.def.replace(/[\[\]]/g,""),p(),b,!1,j,!1)}(H,K)){H.alternation===K.alternation&&-1===H.locator[H.alternation].toString().indexOf(K.locator[K.alternation].toString().split("")[0])&&(H.na=H.na||H.locator[H.alternation].toString(),-1===H.na.indexOf(H.locator[H.alternation].toString().split("")[0])&&(H.na=H.na+","+H.locator[K.alternation].toString().split("")[0]),I=!0,H.locator[H.alternation]=K.locator[K.alternation].toString().split("")[0]+","+H.locator[H.alternation],w.splice(w.indexOf(K),0,H));break}}}I||w.push(H)}}"string"==typeof z&&(w=a.map(w,function(b,c){if(isFinite(c)){var e=b.alternation,f=b.locator[e].toString().split(",");b.locator[e]=d,b.alternation=d;for(var g=0;g<f.length;g++)-1!==a.inArray(f[g],D)&&(b.locator[e]!==d?(b.locator[e]+=",",b.locator[e]+=f[g]):b.locator[e]=parseInt(f[g]),b.alternation=e);if(b.locator[e]!==d)return b}})),m=x.concat(w),k=b,n=m.length>0,g=w.length>0,e=C.slice()}else g=l(v.matches[z]||c.matches[z],[z].concat(i),q);if(g)return!0}else if(g.isQuantifier&&q!==c.matches[a.inArray(g,c.matches)-1])for(var L=g,M=e.length>0?e.shift():0;M<(isNaN(L.quantifier.max)?M+1:L.quantifier.max)&&k<=b;M++){var N=c.matches[a.inArray(L,c.matches)-1];if(g=l(N,[M].concat(i),N)){if(h=m[m.length-1].match,h.optionalQuantifier=M>L.quantifier.min-1,r(h,N)){if(M>L.quantifier.min-1){n=!0,k=b;break}return!0}return!0}}else if(g=f(g,e,i,q))return!0}else k++}for(var q=e.length>0?e.shift():0;q<c.matches.length;q++)if(!0!==c.matches[q].isQuantifier){var r=l(c.matches[q],[q].concat(g),i);if(r&&k===b)return r;if(k>b)break}}function g(a){if(j.keepStatic&&b>0&&a.length>1+(""===a[a.length-1].match.def?1:0)&&!0!==a[0].match.optionality&&!0!==a[0].match.optionalQuantifier&&null===a[0].match.fn&&!/[0-9a-bA-Z]/.test(a[0].match.def)){if(p().validPositions[b-1]===d)return[t(a)];if(p().validPositions[b-1].alternation===a[0].alternation)return[t(a)];if(p().validPositions[b-1])return[t(a)]}return a}var h,i=p().maskToken,k=c?e:0,l=c?c.slice():[0],m=[],n=!1,o=c?c.join(""):"";if(b>-1){if(c===d){for(var q,r=b-1;(q=p().validPositions[r]||p().tests[r])===d&&r>-1;)r--;q!==d&&r>-1&&(l=function(b){var c=[];return a.isArray(b)||(b=[b]),b.length>0&&(b[0].alternation===d?(c=t(b.slice()).locator.slice(),0===c.length&&(c=b[0].locator.slice())):a.each(b,function(a,b){if(""!==b.def)if(0===c.length)c=b.locator.slice();else for(var d=0;d<c.length;d++)b.locator[d]&&-1===c[d].toString().indexOf(b.locator[d])&&(c[d]+=","+b.locator[d])})),c}(q),o=l.join(""),k=r)}if(p().tests[b]&&p().tests[b][0].cd===o)return g(p().tests[b]);for(var s=l.shift();s<i.length&&!(f(i[s],l,[s])&&k===b||k>b);s++);}return(0===m.length||n)&&m.push({match:{fn:null,cardinality:0,optionality:!0,casing:null,def:"",placeholder:""},locator:[],cd:o}),c!==d&&p().tests[b]?g(a.extend(!0,[],m)):(p().tests[b]=a.extend(!0,[],m),g(p().tests[b]))}function y(){return p()._buffer===d&&(p()._buffer=o(!1,1),p().buffer===d&&(p().buffer=p()._buffer.slice())),p()._buffer}function z(a){return p().buffer!==d&&!0!==a||(p().buffer=o(!0,r(),!0)),p().buffer}function A(a,b,c){var e,f;if(!0===a)q(),a=0,b=c.length;else for(e=a;e<b;e++)delete p().validPositions[e];for(f=a,e=a;e<b;e++)if(q(!0),c[e]!==j.skipOptionalPartCharacter){var g=D(f,c[e],!0,!0);!1!==g&&(q(!0),f=g.caret!==d?g.caret:g.pos+1)}}function B(b,c,d){switch(j.casing||c.casing){case"upper":b=b.toUpperCase();break;case"lower":b=b.toLowerCase();break;case"title":var f=p().validPositions[d-1];b=0===d||f&&f.input===String.fromCharCode(e.keyCode.SPACE)?b.toUpperCase():b.toLowerCase();break;default:if(a.isFunction(j.casing)){var g=Array.prototype.slice.call(arguments);g.push(p().validPositions),b=j.casing.apply(this,g)}}return b}function C(b,c,e){for(var f,g=j.greedy?c:c.slice(0,1),h=!1,i=e!==d?e.split(","):[],k=0;k<i.length;k++)-1!==(f=b.indexOf(i[k]))&&b.splice(f,1);for(var l=0;l<b.length;l++)if(-1!==a.inArray(b[l],g)){h=!0;break}return h}function D(b,c,f,g,h,i){function k(a){var b=Z?a.begin-a.end>1||a.begin-a.end==1:a.end-a.begin>1||a.end-a.begin==1;return b&&0===a.begin&&a.end===p().maskLength?"full":b}function l(c,e,f){var h=!1;return a.each(x(c),function(i,l){for(var n=l.match,o=e?1:0,t="",u=n.cardinality;u>o;u--)t+=H(c-(u-1));if(e&&(t+=e),z(!0),!1!==(h=null!=n.fn?n.fn.test(t,p(),c,f,j,k(b)):(e===n.def||e===j.skipOptionalPartCharacter)&&""!==n.def&&{c:J(c,n,!0)||n.def,pos:c})){var v=h.c!==d?h.c:e;v=v===j.skipOptionalPartCharacter&&null===n.fn?J(c,n,!0)||n.def:v;var w=c,x=z();if(h.remove!==d&&(a.isArray(h.remove)||(h.remove=[h.remove]),a.each(h.remove.sort(function(a,b){return b-a}),function(a,b){s(b,b+1,!0)})),h.insert!==d&&(a.isArray(h.insert)||(h.insert=[h.insert]),a.each(h.insert.sort(function(a,b){return a-b}),function(a,b){D(b.pos,b.c,!0,g)})),h.refreshFromBuffer){var y=h.refreshFromBuffer;if(A(!0===y?y:y.start,y.end,x),h.pos===d&&h.c===d)return h.pos=r(),!1;if((w=h.pos!==d?h.pos:c)!==c)return h=a.extend(h,D(w,v,!0,g)),!1}else if(!0!==h&&h.pos!==d&&h.pos!==c&&(w=h.pos,A(c,w,z().slice()),w!==c))return h=a.extend(h,D(w,v,!0)),!1;return(!0===h||h.pos!==d||h.c!==d)&&(i>0&&q(!0),m(w,a.extend({},l,{input:B(v,n,w)}),g,k(b))||(h=!1),!1)}}),h}function m(b,c,e,f){if(f||j.insertMode&&p().validPositions[b]!==d&&e===d){var g,h=a.extend(!0,{},p().validPositions),i=r(d,!0);for(g=b;g<=i;g++)delete p().validPositions[g];p().validPositions[b]=a.extend(!0,{},c);var k,l=!0,m=p().validPositions,o=!1,s=p().maskLength;for(g=k=b;g<=i;g++){var t=h[g];if(t!==d)for(var u=k;u<p().maskLength&&(null===t.match.fn&&m[g]&&(!0===m[g].match.optionalQuantifier||!0===m[g].match.optionality)||null!=t.match.fn);){if(u++,!1===o&&h[u]&&h[u].match.def===t.match.def)p().validPositions[u]=a.extend(!0,{},h[u]),p().validPositions[u].input=t.input,n(u),k=u,l=!0;else if(w(u,t.match.def)){var v=D(u,t.input,!0,!0);l=!1!==v,k=v.caret||v.insert?r():u,o=!0}else if(!(l=!0===t.generatedInput)&&u>=p().maskLength-1)break;if(p().maskLength<s&&(p().maskLength=s),l)break}if(!l)break}if(!l)return p().validPositions=a.extend(!0,{},h),q(!0),!1}else p().validPositions[b]=a.extend(!0,{},c);return q(!0),!0}function n(b){for(var c=b-1;c>-1&&!p().validPositions[c];c--);var e,f;for(c++;c<b;c++)p().validPositions[c]===d&&(!1===j.jitMasking||j.jitMasking>c)&&(f=x(c,u(c-1).locator,c-1).slice(),""===f[f.length-1].match.def&&f.pop(),(e=t(f))&&(e.match.def===j.radixPointDefinitionSymbol||!E(c,!0)||a.inArray(j.radixPoint,z())<c&&e.match.fn&&e.match.fn.test(J(c),p(),c,!1,j))&&!1!==(v=l(c,J(c,e.match,!0)||(null==e.match.fn?e.match.def:""!==J(c)?J(c):z()[c]),!0))&&(p().validPositions[v.pos||c].generatedInput=!0))}f=!0===f;var o=b;b.begin!==d&&(o=Z&&!k(b)?b.end:b.begin);var v=!0,y=a.extend(!0,{},p().validPositions);if(a.isFunction(j.preValidation)&&!f&&!0!==g&&!0!==i&&(v=j.preValidation(z(),o,c,k(b),j)),!0===v){if(n(o),k(b)&&(Q(d,e.keyCode.DELETE,b,!0,!0),o=p().p),o<p().maskLength&&(V===d||o<V)&&(v=l(o,c,f),(!f||!0===g)&&!1===v&&!0!==i)){var G=p().validPositions[o];if(!G||null!==G.match.fn||G.match.def!==c&&c!==j.skipOptionalPartCharacter){if((j.insertMode||p().validPositions[F(o)]===d)&&!E(o,!0))for(var I=o+1,K=F(o);I<=K;I++)if(!1!==(v=l(I,c,f))){!function(b,c){var e=p().validPositions[c];if(e)for(var f=e.locator,g=f.length,h=b;h<c;h++)if(p().validPositions[h]===d&&!E(h,!0)){var i=x(h).slice(),j=t(i,!0),k=-1;""===i[i.length-1].match.def&&i.pop(),a.each(i,function(a,b){for(var c=0;c<g;c++){if(b.locator[c]===d||!C(b.locator[c].toString().split(","),f[c].toString().split(","),b.na)){var e=f[c],h=j.locator[c],i=b.locator[c];e-h>Math.abs(e-i)&&(j=b);break}k<c&&(k=c,j=b)}}),j=a.extend({},j,{input:J(h,j.match,!0)||j.match.def}),j.generatedInput=!0,m(h,j,!0),p().validPositions[c]=d,l(c,e.input,!0)}}(o,v.pos!==d?v.pos:I),o=I;break}}else v={caret:F(o)}}!1===v&&j.keepStatic&&!f&&!0!==h&&(v=function(b,c,e){var f,h,i,k,l,m,n,o,s=a.extend(!0,{},p().validPositions),t=!1,u=r();for(k=p().validPositions[u];u>=0;u--)if((i=p().validPositions[u])&&i.alternation!==d){if(f=u,h=p().validPositions[f].alternation,k.locator[i.alternation]!==i.locator[i.alternation])break;k=i}if(h!==d){o=parseInt(f);var v=k.locator[k.alternation||h]!==d?k.locator[k.alternation||h]:n[0];v.length>0&&(v=v.split(",")[0]);var w=p().validPositions[o],y=p().validPositions[o-1];a.each(x(o,y?y.locator:d,o-1),function(f,i){n=i.locator[h]?i.locator[h].toString().split(","):[];for(var k=0;k<n.length;k++){var u=[],x=0,y=0,z=!1;if(v<n[k]&&(i.na===d||-1===a.inArray(n[k],i.na.split(","))||-1===a.inArray(v.toString(),n))){p().validPositions[o]=a.extend(!0,{},i);var A=p().validPositions[o].locator;for(p().validPositions[o].locator[h]=parseInt(n[k]),null==i.match.fn?(w.input!==i.match.def&&(z=!0,!0!==w.generatedInput&&u.push(w.input)),y++,p().validPositions[o].generatedInput=!/[0-9a-bA-Z]/.test(i.match.def),p().validPositions[o].input=i.match.def):p().validPositions[o].input=w.input,l=o+1;l<r(d,!0)+1;l++)m=p().validPositions[l],m&&!0!==m.generatedInput&&/[0-9a-bA-Z]/.test(m.input)?u.push(m.input):l<b&&x++,delete p().validPositions[l];for(z&&u[0]===i.match.def&&u.shift(),q(!0),t=!0;u.length>0;){var B=u.shift();if(B!==j.skipOptionalPartCharacter&&!(t=D(r(d,!0)+1,B,!1,g,!0)))break}if(t){p().validPositions[o].locator=A;var C=r(b)+1;for(l=o+1;l<r()+1;l++)((m=p().validPositions[l])===d||null==m.match.fn)&&l<b+(y-x)&&y++;b+=y-x,t=D(b>C?C:b,c,e,g,!0)}if(t)return!1;q(),p().validPositions=a.extend(!0,{},s)}}})}return t}(o,c,f)),!0===v&&(v={pos:o})}if(a.isFunction(j.postValidation)&&!1!==v&&!f&&!0!==g&&!0!==i){var L=j.postValidation(z(!0),v,j);if(L.refreshFromBuffer&&L.buffer){var M=L.refreshFromBuffer;A(!0===M?M:M.start,M.end,L.buffer)}v=!0===L?v:L}return v&&v.pos===d&&(v.pos=o),!1!==v&&!0!==i||(q(!0),p().validPositions=a.extend(!0,{},y)),v}function E(a,b){var c=u(a).match;if(""===c.def&&(c=v(a).match),null!=c.fn)return c.fn;if(!0!==b&&a>-1){var d=x(a);return d.length>1+(""===d[d.length-1].match.def?1:0)}return!1}function F(a,b){var c=p().maskLength;if(a>=c)return c;var d=a;for(x(c+1).length>1&&(o(!0,c+1,!0),c=p().maskLength);++d<c&&(!0===b&&(!0!==v(d).match.newBlockMarker||!E(d))||!0!==b&&!E(d)););return d}function G(a,b){var c,d=a;if(d<=0)return 0;for(;--d>0&&(!0===b&&!0!==v(d).match.newBlockMarker||!0!==b&&!E(d)&&(c=x(d),c.length<2||2===c.length&&""===c[1].match.def)););return d}function H(a){return p().validPositions[a]===d?J(a):p().validPositions[a].input}function I(b,c,e,f,g){if(f&&a.isFunction(j.onBeforeWrite)){var h=j.onBeforeWrite.call(X,f,c,e,j);if(h){if(h.refreshFromBuffer){var i=h.refreshFromBuffer;A(!0===i?i:i.start,i.end,h.buffer||c),c=z(!0)}e!==d&&(e=h.caret!==d?h.caret:e)}}b!==d&&(b.inputmask._valueSet(c.join("")),e===d||f!==d&&"blur"===f.type?S(b,e,0===c.length):n&&f&&"input"===f.type?setTimeout(function(){M(b,e)},0):M(b,e),!0===g&&(_=!0,a(b).trigger("input")))}function J(b,c,e){if(c=c||v(b).match,c.placeholder!==d||!0===e)return a.isFunction(c.placeholder)?c.placeholder(j):c.placeholder;if(null===c.fn){if(b>-1&&p().validPositions[b]===d){var f,g=x(b),h=[];if(g.length>1+(""===g[g.length-1].match.def?1:0))for(var i=0;i<g.length;i++)if(!0!==g[i].match.optionality&&!0!==g[i].match.optionalQuantifier&&(null===g[i].match.fn||f===d||!1!==g[i].match.fn.test(f.match.def,p(),b,!0,j))&&(h.push(g[i]),null===g[i].match.fn&&(f=g[i]),h.length>1&&/[0-9a-bA-Z]/.test(h[0].match.def)))return j.placeholder.charAt(b%j.placeholder.length)}return c.def}return j.placeholder.charAt(b%j.placeholder.length)}function K(b,f,g,h,i){function k(a,b){return-1!==y().slice(a,F(a)).join("").indexOf(b)&&!E(a)&&v(a).match.nativeDef===b.charAt(b.length-1)}var l=h.slice(),m="",n=-1,o=d;if(q(),g||!0===j.autoUnmask)n=F(n);else{var s=y().slice(0,F(-1)).join(""),t=l.join("").match(new RegExp("^"+e.escapeRegex(s),"g"));t&&t.length>0&&(l.splice(0,t.length*s.length),n=F(n))}if(-1===n?(p().p=F(n),n=0):p().p=n,a.each(l,function(c,e){if(e!==d)if(p().validPositions[c]===d&&l[c]===J(c)&&E(c,!0)&&!1===D(c,l[c],!0,d,d,!0))p().p++;else{var f=new a.Event("_checkval");f.which=e.charCodeAt(0),m+=e;var h=r(d,!0),i=p().validPositions[h],s=u(h+1,i?i.locator.slice():d,h);if(!k(n,m)||g||j.autoUnmask){var t=g?c:null==s.match.fn&&s.match.optionality&&h+1<p().p?h+1:p().p;o=da.keypressEvent.call(b,f,!0,!1,g,t),n=t+1,m=""}else o=da.keypressEvent.call(b,f,!0,!1,!0,h+1);if(!1!==o&&!g&&a.isFunction(j.onBeforeWrite)){var v=o;if(o=j.onBeforeWrite.call(X,f,z(),o.forwardPosition,j),(o=a.extend(v,o))&&o.refreshFromBuffer){var w=o.refreshFromBuffer;A(!0===w?w:w.start,w.end,o.buffer),q(!0),o.caret&&(p().p=o.caret,o.forwardPosition=o.caret)}}}}),f){var w=d;c.activeElement===b&&o&&(w=j.numericInput?G(o.forwardPosition):o.forwardPosition),I(b,z(),w,i||new a.Event("checkval"),i&&"input"===i.type)}}function L(b){if(b){
2
- if(b.inputmask===d)return b.value;b.inputmask&&b.inputmask.refreshValue&&da.setValueEvent.call(b)}var c=[],e=p().validPositions;for(var f in e)e[f].match&&null!=e[f].match.fn&&c.push(e[f].input);var g=0===c.length?"":(Z?c.reverse():c).join("");if(a.isFunction(j.onUnMask)){var h=(Z?z().slice().reverse():z()).join("");g=j.onUnMask.call(X,h,g,j)}return g}function M(a,e,f,g){function h(a){return!0===g||!Z||"number"!=typeof a||j.greedy&&""===j.placeholder||(a=z().join("").length-a),a}var i;if(e===d)return a.setSelectionRange?(e=a.selectionStart,f=a.selectionEnd):b.getSelection?(i=b.getSelection().getRangeAt(0),i.commonAncestorContainer.parentNode!==a&&i.commonAncestorContainer!==a||(e=i.startOffset,f=i.endOffset)):c.selection&&c.selection.createRange&&(i=c.selection.createRange(),e=0-i.duplicate().moveStart("character",-a.inputmask._valueGet().length),f=e+i.text.length),{begin:h(e),end:h(f)};if(e.begin!==d&&(f=e.end,e=e.begin),"number"==typeof e){e=h(e),f=h(f),f="number"==typeof f?f:e;var l=parseInt(((a.ownerDocument.defaultView||b).getComputedStyle?(a.ownerDocument.defaultView||b).getComputedStyle(a,null):a.currentStyle).fontSize)*f;if(a.scrollLeft=l>a.scrollWidth?l:0,k||!1!==j.insertMode||e!==f||f++,a.setSelectionRange)a.selectionStart=e,a.selectionEnd=f;else if(b.getSelection){if(i=c.createRange(),a.firstChild===d||null===a.firstChild){var m=c.createTextNode("");a.appendChild(m)}i.setStart(a.firstChild,e<a.inputmask._valueGet().length?e:a.inputmask._valueGet().length),i.setEnd(a.firstChild,f<a.inputmask._valueGet().length?f:a.inputmask._valueGet().length),i.collapse(!0);var n=b.getSelection();n.removeAllRanges(),n.addRange(i)}else a.createTextRange&&(i=a.createTextRange(),i.collapse(!0),i.moveEnd("character",f),i.moveStart("character",e),i.select());S(a,{begin:e,end:f})}}function N(b){var c,e,f=z(),g=f.length,h=r(),i={},j=p().validPositions[h],k=j!==d?j.locator.slice():d;for(c=h+1;c<f.length;c++)e=u(c,k,c-1),k=e.locator.slice(),i[c]=a.extend(!0,{},e);var l=j&&j.alternation!==d?j.locator[j.alternation]:d;for(c=g-1;c>h&&(e=i[c],(e.match.optionality||e.match.optionalQuantifier&&e.match.newBlockMarker||l&&(l!==i[c].locator[j.alternation]&&null!=e.match.fn||null===e.match.fn&&e.locator[j.alternation]&&C(e.locator[j.alternation].toString().split(","),l.toString().split(","))&&""!==x(c)[0].def))&&f[c]===J(c,e.match));c--)g--;return b?{l:g,def:i[g]?i[g].match:d}:g}function O(a){for(var b,c=N(),e=a.length,f=p().validPositions[r()];c<e&&!E(c,!0)&&(b=f!==d?u(c,f.locator.slice(""),f):v(c))&&!0!==b.match.optionality&&(!0!==b.match.optionalQuantifier&&!0!==b.match.newBlockMarker||c+1===e&&""===(f!==d?u(c+1,f.locator.slice(""),f):v(c+1)).match.def);)c++;for(;(b=p().validPositions[c-1])&&b&&b.match.optionality&&b.input===j.skipOptionalPartCharacter;)c--;return a.splice(c),a}function P(b){if(a.isFunction(j.isComplete))return j.isComplete(b,j);if("*"===j.repeat)return d;var c=!1,e=N(!0),f=G(e.l);if(e.def===d||e.def.newBlockMarker||e.def.optionality||e.def.optionalQuantifier){c=!0;for(var g=0;g<=f;g++){var h=u(g).match;if(null!==h.fn&&p().validPositions[g]===d&&!0!==h.optionality&&!0!==h.optionalQuantifier||null===h.fn&&b[g]!==J(g,h)){c=!1;break}}}return c}function Q(b,c,f,g,h){if((j.numericInput||Z)&&(c===e.keyCode.BACKSPACE?c=e.keyCode.DELETE:c===e.keyCode.DELETE&&(c=e.keyCode.BACKSPACE),Z)){var i=f.end;f.end=f.begin,f.begin=i}c===e.keyCode.BACKSPACE&&(f.end-f.begin<1||!1===j.insertMode)?(f.begin=G(f.begin),p().validPositions[f.begin]!==d&&p().validPositions[f.begin].input===j.groupSeparator&&f.begin--):c===e.keyCode.DELETE&&f.begin===f.end&&(f.end=E(f.end,!0)&&p().validPositions[f.end]&&p().validPositions[f.end].input!==j.radixPoint?f.end+1:F(f.end)+1,p().validPositions[f.begin]!==d&&p().validPositions[f.begin].input===j.groupSeparator&&f.end++),s(f.begin,f.end,!1,g),!0!==g&&function(){if(j.keepStatic){for(var c=[],e=r(-1,!0),f=a.extend(!0,{},p().validPositions),g=p().validPositions[e];e>=0;e--){var h=p().validPositions[e];if(h){if(!0!==h.generatedInput&&/[0-9a-bA-Z]/.test(h.input)&&c.push(h.input),delete p().validPositions[e],h.alternation!==d&&h.locator[h.alternation]!==g.locator[h.alternation])break;g=h}}if(e>-1)for(p().p=F(r(-1,!0));c.length>0;){var i=new a.Event("keypress");i.which=c.pop().charCodeAt(0),da.keypressEvent.call(b,i,!0,!1,!1,p().p)}else p().validPositions=a.extend(!0,{},f)}}();var k=r(f.begin,!0);if(k<f.begin)p().p=F(k);else if(!0!==g&&(p().p=f.begin,!0!==h))for(;p().p<k&&p().validPositions[p().p]===d;)p().p++}function R(d){function e(a){var b,e=c.createElement("span");for(var g in f)isNaN(g)&&-1!==g.indexOf("font")&&(e.style[g]=f[g]);e.style.textTransform=f.textTransform,e.style.letterSpacing=f.letterSpacing,e.style.position="absolute",e.style.height="auto",e.style.width="auto",e.style.visibility="hidden",e.style.whiteSpace="nowrap",c.body.appendChild(e);var h,i=d.inputmask._valueGet(),j=0;for(b=0,h=i.length;b<=h;b++){if(e.innerHTML+=i.charAt(b)||"_",e.offsetWidth>=a){var k=a-j,l=e.offsetWidth-a;e.innerHTML=i.charAt(b),k-=e.offsetWidth/3,b=k<l?b-1:b;break}j=e.offsetWidth}return c.body.removeChild(e),b}var f=(d.ownerDocument.defaultView||b).getComputedStyle(d,null),g=c.createElement("div");g.style.width=f.width,g.style.textAlign=f.textAlign,W=c.createElement("div"),W.className="im-colormask",d.parentNode.insertBefore(W,d),d.parentNode.removeChild(d),W.appendChild(g),W.appendChild(d),d.style.left=g.offsetLeft+"px",a(d).on("click",function(a){return M(d,e(a.clientX)),da.clickEvent.call(d,[a])}),a(d).on("keydown",function(a){a.shiftKey||!1===j.insertMode||setTimeout(function(){S(d)},0)})}function S(a,b,e){function f(){m||null!==h.fn&&i.input!==d?m&&(null!==h.fn&&i.input!==d||""===h.def)&&(m=!1,l+="</span>"):(m=!0,l+="<span class='im-static'>")}function g(d){!0!==d&&n!==b.begin||c.activeElement!==a||(l+="<span class='im-caret' style='border-right-width: 1px;border-right-style: solid;'></span>")}var h,i,k,l="",m=!1,n=0;if(W!==d){var o=z();if(b===d?b=M(a):b.begin===d&&(b={begin:b,end:b}),!0!==e){var q=r();do{g(),p().validPositions[n]?(i=p().validPositions[n],h=i.match,k=i.locator.slice(),f(),l+=o[n]):(i=u(n,k,n-1),h=i.match,k=i.locator.slice(),(!1===j.jitMasking||n<q||"number"==typeof j.jitMasking&&isFinite(j.jitMasking)&&j.jitMasking>n)&&(f(),l+=J(n,h))),n++}while((V===d||n<V)&&(null!==h.fn||""!==h.def)||q>n||m);-1===l.indexOf("im-caret")&&g(!0),m&&f()}var s=W.getElementsByTagName("div")[0];s.innerHTML=l,a.inputmask.positionColorMask(a,s)}}h=h||this.maskset,j=j||this.opts;var T,U,V,W,X=this,Y=this.el,Z=this.isRTL,$=!1,_=!1,aa=!1,ba=!1,ca={on:function(b,c,f){var g=function(b){if(this.inputmask===d&&"FORM"!==this.nodeName){var c=a.data(this,"_inputmask_opts");c?new e(c).mask(this):ca.off(this)}else{if("setvalue"===b.type||"FORM"===this.nodeName||!(this.disabled||this.readOnly&&!("keydown"===b.type&&b.ctrlKey&&67===b.keyCode||!1===j.tabThrough&&b.keyCode===e.keyCode.TAB))){switch(b.type){case"input":if(!0===_)return _=!1,b.preventDefault();break;case"keydown":$=!1,_=!1;break;case"keypress":if(!0===$)return b.preventDefault();$=!0;break;case"click":if(l||m){var g=this,h=arguments;return setTimeout(function(){f.apply(g,h)},0),!1}}var i=f.apply(this,arguments);return!1===i&&(b.preventDefault(),b.stopPropagation()),i}b.preventDefault()}};b.inputmask.events[c]=b.inputmask.events[c]||[],b.inputmask.events[c].push(g),-1!==a.inArray(c,["submit","reset"])?null!==b.form&&a(b.form).on(c,g):a(b).on(c,g)},off:function(b,c){if(b.inputmask&&b.inputmask.events){var d;c?(d=[],d[c]=b.inputmask.events[c]):d=b.inputmask.events,a.each(d,function(c,d){for(;d.length>0;){var e=d.pop();-1!==a.inArray(c,["submit","reset"])?null!==b.form&&a(b.form).off(c,e):a(b).off(c,e)}delete b.inputmask.events[c]})}}},da={keydownEvent:function(b){var d=this,f=a(d),g=b.keyCode,h=M(d);if(g===e.keyCode.BACKSPACE||g===e.keyCode.DELETE||m&&g===e.keyCode.BACKSPACE_SAFARI||b.ctrlKey&&g===e.keyCode.X&&!function(a){var b=c.createElement("input"),d="oncut"in b;return d||(b.setAttribute("oncut","return;"),d="function"==typeof b.oncut),b=null,d}())b.preventDefault(),Q(d,g,h),I(d,z(!0),p().p,b,d.inputmask._valueGet()!==z().join("")),d.inputmask._valueGet()===y().join("")?f.trigger("cleared"):!0===P(z())&&f.trigger("complete");else if(g===e.keyCode.END||g===e.keyCode.PAGE_DOWN){b.preventDefault();var i=F(r());j.insertMode||i!==p().maskLength||b.shiftKey||i--,M(d,b.shiftKey?h.begin:i,i,!0)}else g===e.keyCode.HOME&&!b.shiftKey||g===e.keyCode.PAGE_UP?(b.preventDefault(),M(d,0,b.shiftKey?h.begin:0,!0)):(j.undoOnEscape&&g===e.keyCode.ESCAPE||90===g&&b.ctrlKey)&&!0!==b.altKey?(K(d,!0,!1,T.split("")),f.trigger("click")):g!==e.keyCode.INSERT||b.shiftKey||b.ctrlKey?!0===j.tabThrough&&g===e.keyCode.TAB?(!0===b.shiftKey?(null===v(h.begin).match.fn&&(h.begin=F(h.begin)),h.end=G(h.begin,!0),h.begin=G(h.end,!0)):(h.begin=F(h.begin,!0),h.end=F(h.begin,!0),h.end<p().maskLength&&h.end--),h.begin<p().maskLength&&(b.preventDefault(),M(d,h.begin,h.end))):b.shiftKey||!1===j.insertMode&&(g===e.keyCode.RIGHT?setTimeout(function(){var a=M(d);M(d,a.begin)},0):g===e.keyCode.LEFT&&setTimeout(function(){var a=M(d);M(d,Z?a.begin+1:a.begin-1)},0)):(j.insertMode=!j.insertMode,M(d,j.insertMode||h.begin!==p().maskLength?h.begin:h.begin-1));j.onKeyDown.call(this,b,z(),M(d).begin,j),aa=-1!==a.inArray(g,j.ignorables)},keypressEvent:function(b,c,f,g,h){var i=this,k=a(i),l=b.which||b.charCode||b.keyCode;if(!(!0===c||b.ctrlKey&&b.altKey)&&(b.ctrlKey||b.metaKey||aa))return l===e.keyCode.ENTER&&T!==z().join("")&&(T=z().join(""),setTimeout(function(){k.trigger("change")},0)),!0;if(l){46===l&&!1===b.shiftKey&&""!==j.radixPoint&&(l=j.radixPoint.charCodeAt(0));var m,n=c?{begin:h,end:h}:M(i),o=String.fromCharCode(l);p().writeOutBuffer=!0;var r=D(n,o,g);if(!1!==r&&(q(!0),m=r.caret!==d?r.caret:c?r.pos+1:F(r.pos),p().p=m),!1!==f&&(setTimeout(function(){j.onKeyValidation.call(i,l,r,j)},0),p().writeOutBuffer&&!1!==r)){var s=z();I(i,s,j.numericInput&&r.caret===d?G(m):m,b,!0!==c),!0!==c&&setTimeout(function(){!0===P(s)&&k.trigger("complete")},0)}if(b.preventDefault(),c)return!1!==r&&(r.forwardPosition=m),r}},pasteEvent:function(c){var d,e=this,f=c.originalEvent||c,g=a(e),h=e.inputmask._valueGet(!0),i=M(e);Z&&(d=i.end,i.end=i.begin,i.begin=d);var k=h.substr(0,i.begin),l=h.substr(i.end,h.length);if(k===(Z?y().reverse():y()).slice(0,i.begin).join("")&&(k=""),l===(Z?y().reverse():y()).slice(i.end).join("")&&(l=""),Z&&(d=k,k=l,l=d),b.clipboardData&&b.clipboardData.getData)h=k+b.clipboardData.getData("Text")+l;else{if(!f.clipboardData||!f.clipboardData.getData)return!0;h=k+f.clipboardData.getData("text/plain")+l}var m=h;if(a.isFunction(j.onBeforePaste)){if(!1===(m=j.onBeforePaste.call(X,h,j)))return c.preventDefault();m||(m=h)}return K(e,!1,!1,Z?m.split("").reverse():m.toString().split("")),I(e,z(),F(r()),c,T!==z().join("")),!0===P(z())&&g.trigger("complete"),c.preventDefault()},inputFallBackEvent:function(b){var c=this,d=c.inputmask._valueGet();if(z().join("")!==d){var f=M(c);if(d=function(a,b,c){return"."===b.charAt(c.begin-1)&&""!==j.radixPoint&&(b=b.split(""),b[c.begin-1]=j.radixPoint.charAt(0),b=b.join("")),b}(0,d,f),d=function(a,b,c){if(l){var d=b.replace(z().join(""),"");if(1===d.length){var e=b.split("");e.splice(c.begin,0,d),b=e.join("")}}return b}(0,d,f),f.begin>d.length&&(M(c,d.length),f=M(c)),z().join("")!==d){var g=z().join(""),h=d.length>g.length?-1:0,i=d.substr(0,f.begin),k=d.substr(f.begin),m=g.substr(0,f.begin+h),n=g.substr(f.begin+h),o=f,p="",q=!1;if(i!==m){for(var r=(q=i.length>=m.length)?i.length:m.length,s=0;i.charAt(s)===m.charAt(s)&&s<r;s++);q&&(0===h&&(o.begin=s),p+=i.slice(s,o.end))}if(k!==n&&(k.length>n.length?p+=k.slice(0,1):k.length<n.length&&(o.end+=n.length-k.length,q||""===j.radixPoint||""!==k||i.charAt(o.begin+h-1)!==j.radixPoint||(o.begin--,p=j.radixPoint))),I(c,z(),{begin:o.begin+h,end:o.end+h}),p.length>0)a.each(p.split(""),function(b,d){var e=new a.Event("keypress");e.which=d.charCodeAt(0),aa=!1,da.keypressEvent.call(c,e)});else{o.begin===o.end-1&&(o.begin=G(o.begin+1),o.begin===o.end-1?M(c,o.begin):M(c,o.begin,o.end));var t=new a.Event("keydown");t.keyCode=e.keyCode.DELETE,da.keydownEvent.call(c,t)}b.preventDefault()}}},setValueEvent:function(b){this.inputmask.refreshValue=!1;var c=this,d=c.inputmask._valueGet(!0);a.isFunction(j.onBeforeMask)&&(d=j.onBeforeMask.call(X,d,j)||d),d=d.split(""),K(c,!0,!1,Z?d.reverse():d),T=z().join(""),(j.clearMaskOnLostFocus||j.clearIncomplete)&&c.inputmask._valueGet()===y().join("")&&c.inputmask._valueSet("")},focusEvent:function(a){var b=this,c=b.inputmask._valueGet();j.showMaskOnFocus&&(!j.showMaskOnHover||j.showMaskOnHover&&""===c)&&(b.inputmask._valueGet()!==z().join("")?I(b,z(),F(r())):!1===ba&&M(b,F(r()))),!0===j.positionCaretOnTab&&!1===ba&&""!==c&&(I(b,z(),M(b)),da.clickEvent.apply(b,[a,!0])),T=z().join("")},mouseleaveEvent:function(a){var b=this;if(ba=!1,j.clearMaskOnLostFocus&&c.activeElement!==b){var d=z().slice(),e=b.inputmask._valueGet();e!==b.getAttribute("placeholder")&&""!==e&&(-1===r()&&e===y().join("")?d=[]:O(d),I(b,d))}},clickEvent:function(b,e){function f(b){if(""!==j.radixPoint){var c=p().validPositions;if(c[b]===d||c[b].input===J(b)){if(b<F(-1))return!0;var e=a.inArray(j.radixPoint,z());if(-1!==e){for(var f in c)if(e<f&&c[f].input!==J(f))return!1;return!0}}}return!1}var g=this;setTimeout(function(){if(c.activeElement===g){var a=M(g);if(e&&(Z?a.end=a.begin:a.begin=a.end),a.begin===a.end)switch(j.positionCaretOnClick){case"none":break;case"radixFocus":if(f(a.begin)){var b=z().join("").indexOf(j.radixPoint);M(g,j.numericInput?F(b):b);break}default:var h=a.begin,i=r(h,!0),k=F(i);if(h<k)M(g,E(h,!0)||E(h-1,!0)?h:F(h));else{var l=p().validPositions[i],m=u(k,l?l.match.locator:d,l),n=J(k,m.match);if(""!==n&&z()[k]!==n&&!0!==m.match.optionalQuantifier&&!0!==m.match.newBlockMarker||!E(k,!0)&&m.match.def===n){var o=F(k);(h>=o||h===k)&&(k=o)}M(g,k)}}}},0)},dblclickEvent:function(a){var b=this;setTimeout(function(){M(b,0,F(r()))},0)},cutEvent:function(d){var f=this,g=a(f),h=M(f),i=d.originalEvent||d,j=b.clipboardData||i.clipboardData,k=Z?z().slice(h.end,h.begin):z().slice(h.begin,h.end);j.setData("text",Z?k.reverse().join(""):k.join("")),c.execCommand&&c.execCommand("copy"),Q(f,e.keyCode.DELETE,h),I(f,z(),p().p,d,T!==z().join("")),f.inputmask._valueGet()===y().join("")&&g.trigger("cleared")},blurEvent:function(b){var c=a(this),e=this;if(e.inputmask){var f=e.inputmask._valueGet(),g=z().slice();""!==f&&(j.clearMaskOnLostFocus&&(-1===r()&&f===y().join("")?g=[]:O(g)),!1===P(g)&&(setTimeout(function(){c.trigger("incomplete")},0),j.clearIncomplete&&(q(),g=j.clearMaskOnLostFocus?[]:y().slice())),I(e,g,d,b)),T!==z().join("")&&(T=g.join(""),c.trigger("change"))}},mouseenterEvent:function(a){var b=this;ba=!0,c.activeElement!==b&&j.showMaskOnHover&&b.inputmask._valueGet()!==z().join("")&&I(b,z())},submitEvent:function(a){T!==z().join("")&&U.trigger("change"),j.clearMaskOnLostFocus&&-1===r()&&Y.inputmask._valueGet&&Y.inputmask._valueGet()===y().join("")&&Y.inputmask._valueSet(""),j.removeMaskOnSubmit&&(Y.inputmask._valueSet(Y.inputmask.unmaskedvalue(),!0),setTimeout(function(){I(Y,z())},0))},resetEvent:function(a){Y.inputmask.refreshValue=!0,setTimeout(function(){U.trigger("setvalue")},0)}};e.prototype.positionColorMask=function(a,b){a.style.left=b.offsetLeft+"px"};var ea;if(f!==d)switch(f.action){case"isComplete":return Y=f.el,P(z());case"unmaskedvalue":return Y!==d&&f.value===d||(ea=f.value,ea=(a.isFunction(j.onBeforeMask)?j.onBeforeMask.call(X,ea,j)||ea:ea).split(""),K(d,!1,!1,Z?ea.reverse():ea),a.isFunction(j.onBeforeWrite)&&j.onBeforeWrite.call(X,d,z(),0,j)),L(Y);case"mask":!function(b){ca.off(b);var e=function(b,e){var f=b.getAttribute("type"),h="INPUT"===b.tagName&&-1!==a.inArray(f,e.supportsInputType)||b.isContentEditable||"TEXTAREA"===b.tagName;if(!h)if("INPUT"===b.tagName){var i=c.createElement("input");i.setAttribute("type",f),h="text"===i.type,i=null}else h="partial";return!1!==h?function(b){function f(){return this.inputmask?this.inputmask.opts.autoUnmask?this.inputmask.unmaskedvalue():-1!==r()||!0!==e.nullable?c.activeElement===this&&e.clearMaskOnLostFocus?(Z?O(z().slice()).reverse():O(z().slice())).join(""):i.call(this):"":i.call(this)}function h(b){j.call(this,b),this.inputmask&&a(this).trigger("setvalue")}var i,j;if(!b.inputmask.__valueGet){if(!0!==e.noValuePatching){if(Object.getOwnPropertyDescriptor){"function"!=typeof Object.getPrototypeOf&&(Object.getPrototypeOf="object"===g("test".__proto__)?function(a){return a.__proto__}:function(a){return a.constructor.prototype});var k=Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(b),"value"):d;k&&k.get&&k.set?(i=k.get,j=k.set,Object.defineProperty(b,"value",{get:f,set:h,configurable:!0})):"INPUT"!==b.tagName&&(i=function(){return this.textContent},j=function(a){this.textContent=a},Object.defineProperty(b,"value",{get:f,set:h,configurable:!0}))}else c.__lookupGetter__&&b.__lookupGetter__("value")&&(i=b.__lookupGetter__("value"),j=b.__lookupSetter__("value"),b.__defineGetter__("value",f),b.__defineSetter__("value",h));b.inputmask.__valueGet=i,b.inputmask.__valueSet=j}b.inputmask._valueGet=function(a){return Z&&!0!==a?i.call(this.el).split("").reverse().join(""):i.call(this.el)},b.inputmask._valueSet=function(a,b){j.call(this.el,null===a||a===d?"":!0!==b&&Z?a.split("").reverse().join(""):a)},i===d&&(i=function(){return this.value},j=function(a){this.value=a},function(b){if(a.valHooks&&(a.valHooks[b]===d||!0!==a.valHooks[b].inputmaskpatch)){var c=a.valHooks[b]&&a.valHooks[b].get?a.valHooks[b].get:function(a){return a.value},f=a.valHooks[b]&&a.valHooks[b].set?a.valHooks[b].set:function(a,b){return a.value=b,a};a.valHooks[b]={get:function(a){if(a.inputmask){if(a.inputmask.opts.autoUnmask)return a.inputmask.unmaskedvalue();var b=c(a);return-1!==r(d,d,a.inputmask.maskset.validPositions)||!0!==e.nullable?b:""}return c(a)},set:function(b,c){var d,e=a(b);return d=f(b,c),b.inputmask&&e.trigger("setvalue"),d},inputmaskpatch:!0}}}(b.type),function(b){ca.on(b,"mouseenter",function(b){var c=a(this);this.inputmask._valueGet()!==z().join("")&&c.trigger("setvalue")})}(b))}}(b):b.inputmask=d,h}(b,j);if(!1!==e&&(Y=b,U=a(Y),V=Y!==d?Y.maxLength:d,-1===V&&(V=d),!0===j.colorMask&&R(Y),n&&(Y.hasOwnProperty("inputmode")&&(Y.inputmode=j.inputmode,Y.setAttribute("inputmode",j.inputmode)),"rtfm"===j.androidHack&&(!0!==j.colorMask&&R(Y),Y.type="password")),!0===e&&(ca.on(Y,"submit",da.submitEvent),ca.on(Y,"reset",da.resetEvent),ca.on(Y,"mouseenter",da.mouseenterEvent),ca.on(Y,"blur",da.blurEvent),ca.on(Y,"focus",da.focusEvent),ca.on(Y,"mouseleave",da.mouseleaveEvent),!0!==j.colorMask&&ca.on(Y,"click",da.clickEvent),ca.on(Y,"dblclick",da.dblclickEvent),ca.on(Y,"paste",da.pasteEvent),ca.on(Y,"dragdrop",da.pasteEvent),ca.on(Y,"drop",da.pasteEvent),ca.on(Y,"cut",da.cutEvent),ca.on(Y,"complete",j.oncomplete),ca.on(Y,"incomplete",j.onincomplete),ca.on(Y,"cleared",j.oncleared),n||!0===j.inputEventOnly?Y.removeAttribute("maxLength"):(ca.on(Y,"keydown",da.keydownEvent),ca.on(Y,"keypress",da.keypressEvent)),ca.on(Y,"compositionstart",a.noop),ca.on(Y,"compositionupdate",a.noop),ca.on(Y,"compositionend",a.noop),ca.on(Y,"keyup",a.noop),ca.on(Y,"input",da.inputFallBackEvent),ca.on(Y,"beforeinput",a.noop)),ca.on(Y,"setvalue",da.setValueEvent),T=y().join(""),""!==Y.inputmask._valueGet(!0)||!1===j.clearMaskOnLostFocus||c.activeElement===Y)){var f=a.isFunction(j.onBeforeMask)?j.onBeforeMask.call(X,Y.inputmask._valueGet(!0),j)||Y.inputmask._valueGet(!0):Y.inputmask._valueGet(!0);""!==f&&K(Y,!0,!1,Z?f.split("").reverse():f.split(""));var h=z().slice();T=h.join(""),!1===P(h)&&j.clearIncomplete&&q(),j.clearMaskOnLostFocus&&c.activeElement!==Y&&(-1===r()?h=[]:O(h)),I(Y,h),c.activeElement===Y&&M(Y,F(r()))}}(Y);break;case"format":return ea=(a.isFunction(j.onBeforeMask)?j.onBeforeMask.call(X,f.value,j)||f.value:f.value).split(""),K(d,!0,!1,Z?ea.reverse():ea),f.metadata?{value:Z?z().slice().reverse().join(""):z().join(""),metadata:i.call(this,{action:"getmetadata"},h,j)}:Z?z().slice().reverse().join(""):z().join("");case"isValid":f.value?(ea=f.value.split(""),K(d,!0,!0,Z?ea.reverse():ea)):f.value=z().join("");for(var fa=z(),ga=N(),ha=fa.length-1;ha>ga&&!E(ha);ha--);return fa.splice(ga,ha+1-ga),P(fa)&&f.value===z().join("");case"getemptymask":return y().join("");case"remove":return Y&&Y.inputmask&&(U=a(Y),Y.inputmask._valueSet(j.autoUnmask?L(Y):Y.inputmask._valueGet(!0)),ca.off(Y),Object.getOwnPropertyDescriptor&&Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Y),"value")&&Y.inputmask.__valueGet&&Object.defineProperty(Y,"value",{get:Y.inputmask.__valueGet,set:Y.inputmask.__valueSet,configurable:!0}):c.__lookupGetter__&&Y.__lookupGetter__("value")&&Y.inputmask.__valueGet&&(Y.__defineGetter__("value",Y.inputmask.__valueGet),Y.__defineSetter__("value",Y.inputmask.__valueSet)),Y.inputmask=d),Y;case"getmetadata":if(a.isArray(h.metadata)){var ia=o(!0,0,!1).join("");return a.each(h.metadata,function(a,b){if(b.mask===ia)return ia=b,!1}),ia}return h.metadata}}var j=navigator.userAgent,k=/mobile/i.test(j),l=/iemobile/i.test(j),m=/iphone/i.test(j)&&!l,n=/android/i.test(j)&&!l;return e.prototype={dataAttribute:"data-inputmask",defaults:{placeholder:"_",optionalmarker:{start:"[",end:"]"},quantifiermarker:{start:"{",end:"}"},groupmarker:{start:"(",end:")"},alternatormarker:"|",escapeChar:"\\",mask:null,regex:null,oncomplete:a.noop,onincomplete:a.noop,oncleared:a.noop,repeat:0,greedy:!0,autoUnmask:!1,removeMaskOnSubmit:!1,clearMaskOnLostFocus:!0,insertMode:!0,clearIncomplete:!1,alias:null,onKeyDown:a.noop,onBeforeMask:null,onBeforePaste:function(b,c){return a.isFunction(c.onBeforeMask)?c.onBeforeMask.call(this,b,c):b},onBeforeWrite:null,onUnMask:null,showMaskOnFocus:!0,showMaskOnHover:!0,onKeyValidation:a.noop,skipOptionalPartCharacter:" ",numericInput:!1,rightAlign:!1,undoOnEscape:!0,radixPoint:"",radixPointDefinitionSymbol:d,groupSeparator:"",keepStatic:null,positionCaretOnTab:!0,tabThrough:!1,supportsInputType:["text","tel","password"],ignorables:[8,9,13,19,27,33,34,35,36,37,38,39,40,45,46,93,112,113,114,115,116,117,118,119,120,121,122,123,0,229],isComplete:null,canClearPosition:a.noop,preValidation:null,postValidation:null,staticDefinitionSymbol:d,jitMasking:!1,nullable:!0,inputEventOnly:!1,noValuePatching:!1,positionCaretOnClick:"lvp",casing:null,inputmode:"verbatim",colorMask:!1,androidHack:!1,importDataAttributes:!0},definitions:{9:{validator:"[0-91-9]",cardinality:1,definitionSymbol:"*"},a:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",cardinality:1,definitionSymbol:"*"},"*":{validator:"[0-91-9A-Za-zА-яЁёÀ-ÿµ]",cardinality:1}},aliases:{},masksCache:{},mask:function(g){function j(c,e,g,h){if(!0===e.importDataAttributes){var i,j,k,l,m=function(a,e){null!==(e=e!==d?e:c.getAttribute(h+"-"+a))&&("string"==typeof e&&(0===a.indexOf("on")?e=b[e]:"false"===e?e=!1:"true"===e&&(e=!0)),g[a]=e)},n=c.getAttribute(h);if(n&&""!==n&&(n=n.replace(new RegExp("'","g"),'"'),j=JSON.parse("{"+n+"}")),j){k=d;for(l in j)if("alias"===l.toLowerCase()){k=j[l];break}}m("alias",k),g.alias&&f(g.alias,g,e);for(i in e){if(j){k=d;for(l in j)if(l.toLowerCase()===i.toLowerCase()){k=j[l];break}}m(i,k)}}return a.extend(!0,e,g),("rtl"===c.dir||e.rightAlign)&&(c.style.textAlign="right"),("rtl"===c.dir||e.numericInput)&&(c.dir="ltr",c.removeAttribute("dir"),e.isRTL=!0),e}var k=this;return"string"==typeof g&&(g=c.getElementById(g)||c.querySelectorAll(g)),g=g.nodeName?[g]:g,a.each(g,function(b,c){var f=a.extend(!0,{},k.opts);j(c,f,a.extend(!0,{},k.userOptions),k.dataAttribute);var g=h(f,k.noMasksCache);g!==d&&(c.inputmask!==d&&(c.inputmask.opts.autoUnmask=!0,c.inputmask.remove()),c.inputmask=new e(d,d,!0),c.inputmask.opts=f,c.inputmask.noMasksCache=k.noMasksCache,c.inputmask.userOptions=a.extend(!0,{},k.userOptions),c.inputmask.isRTL=f.isRTL||f.numericInput,c.inputmask.el=c,c.inputmask.maskset=g,a.data(c,"_inputmask_opts",f),i.call(c.inputmask,{action:"mask"}))}),g&&g[0]?g[0].inputmask||this:this},option:function(b,c){return"string"==typeof b?this.opts[b]:"object"===(void 0===b?"undefined":g(b))?(a.extend(this.userOptions,b),this.el&&!0!==c&&this.mask(this.el),this):void 0},unmaskedvalue:function(a){return this.maskset=this.maskset||h(this.opts,this.noMasksCache),i.call(this,{action:"unmaskedvalue",value:a})},remove:function(){return i.call(this,{action:"remove"})},getemptymask:function(){return this.maskset=this.maskset||h(this.opts,this.noMasksCache),i.call(this,{action:"getemptymask"})},hasMaskedValue:function(){return!this.opts.autoUnmask},isComplete:function(){return this.maskset=this.maskset||h(this.opts,this.noMasksCache),i.call(this,{action:"isComplete"})},getmetadata:function(){return this.maskset=this.maskset||h(this.opts,this.noMasksCache),i.call(this,{action:"getmetadata"})},isValid:function(a){return this.maskset=this.maskset||h(this.opts,this.noMasksCache),i.call(this,{action:"isValid",value:a})},format:function(a,b){return this.maskset=this.maskset||h(this.opts,this.noMasksCache),i.call(this,{action:"format",value:a,metadata:b})},analyseMask:function(b,c,f){function g(a,b,c,d){this.matches=[],this.openGroup=a||!1,this.alternatorGroup=!1,this.isGroup=a||!1,this.isOptional=b||!1,this.isQuantifier=c||!1,this.isAlternator=d||!1,this.quantifier={min:1,max:1}}function h(b,g,h){h=h!==d?h:b.matches.length;var i=b.matches[h-1];if(c)0===g.indexOf("[")||u&&/\\d|\\s|\\w]/i.test(g)||"."===g?b.matches.splice(h++,0,{fn:new RegExp(g,f.casing?"i":""),cardinality:1,optionality:b.isOptional,newBlockMarker:i===d||i.def!==g,casing:null,def:g,placeholder:d,nativeDef:g}):(u&&(g=g[g.length-1]),a.each(g.split(""),function(a,c){i=b.matches[h-1],b.matches.splice(h++,0,{fn:null,cardinality:0,optionality:b.isOptional,newBlockMarker:i===d||i.def!==c&&null!==i.fn,casing:null,def:f.staticDefinitionSymbol||c,placeholder:f.staticDefinitionSymbol!==d?c:d,nativeDef:c})})),u=!1;else{var j=(f.definitions?f.definitions[g]:d)||e.prototype.definitions[g];if(j&&!u){for(var k=j.prevalidator,l=k?k.length:0,m=1;m<j.cardinality;m++){var n=l>=m?k[m-1]:[],o=n.validator,p=n.cardinality;b.matches.splice(h++,0,{fn:o?"string"==typeof o?new RegExp(o,f.casing?"i":""):new function(){this.test=o}:new RegExp("."),cardinality:p||1,optionality:b.isOptional,newBlockMarker:i===d||i.def!==(j.definitionSymbol||g),casing:j.casing,def:j.definitionSymbol||g,placeholder:j.placeholder,nativeDef:g}),i=b.matches[h-1]}b.matches.splice(h++,0,{fn:j.validator?"string"==typeof j.validator?new RegExp(j.validator,f.casing?"i":""):new function(){this.test=j.validator}:new RegExp("."),cardinality:j.cardinality,optionality:b.isOptional,newBlockMarker:i===d||i.def!==(j.definitionSymbol||g),casing:j.casing,def:j.definitionSymbol||g,placeholder:j.placeholder,nativeDef:g})}else b.matches.splice(h++,0,{fn:null,cardinality:0,optionality:b.isOptional,newBlockMarker:i===d||i.def!==g&&null!==i.fn,casing:null,def:f.staticDefinitionSymbol||g,placeholder:f.staticDefinitionSymbol!==d?g:d,nativeDef:g}),u=!1}}function i(b){b&&b.matches&&a.each(b.matches,function(a,e){var g=b.matches[a+1];(g===d||g.matches===d||!1===g.isQuantifier)&&e&&e.isGroup&&(e.isGroup=!1,c||(h(e,f.groupmarker.start,0),!0!==e.openGroup&&h(e,f.groupmarker.end))),i(e)})}function j(){if(w.length>0){if(o=w[w.length-1],h(o,m),o.isAlternator){p=w.pop();for(var a=0;a<p.matches.length;a++)p.matches[a].isGroup=!1;w.length>0?(o=w[w.length-1],o.matches.push(p)):v.matches.push(p)}}else h(v,m)}function k(a){a.matches=a.matches.reverse();for(var b in a.matches)if(a.matches.hasOwnProperty(b)){var c=parseInt(b);if(a.matches[b].isQuantifier&&a.matches[c+1]&&a.matches[c+1].isGroup){var e=a.matches[b];a.matches.splice(b,1),a.matches.splice(c+1,0,e)}a.matches[b].matches!==d?a.matches[b]=k(a.matches[b]):a.matches[b]=function(a){return a===f.optionalmarker.start?a=f.optionalmarker.end:a===f.optionalmarker.end?a=f.optionalmarker.start:a===f.groupmarker.start?a=f.groupmarker.end:a===f.groupmarker.end&&(a=f.groupmarker.start),a}(a.matches[b])}return a}var l,m,n,o,p,q,r,s=/(?:[?*+]|\{[0-9\+\*]+(?:,[0-9\+\*]*)?\})|[^.?*+^${[]()|\\]+|./g,t=/\[\^?]?(?:[^\\\]]+|\\[\S\s]?)*]?|\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\S\s]?)|\((?:\?[:=!]?)?|(?:[?*+]|\{[0-9]+(?:,[0-9]*)?\})\??|[^.?*+^${[()|\\]+|./g,u=!1,v=new g,w=[],x=[];for(c&&(f.optionalmarker.start=d,f.optionalmarker.end=d);l=c?t.exec(b):s.exec(b);){if(m=l[0],c)switch(m.charAt(0)){case"?":m="{0,1}";break;case"+":case"*":m="{"+m+"}"}if(u)j();else switch(m.charAt(0)){case f.escapeChar:u=!0,c&&j();break;case f.optionalmarker.end:case f.groupmarker.end:if(n=w.pop(),n.openGroup=!1,n!==d)if(w.length>0){if(o=w[w.length-1],o.matches.push(n),o.isAlternator){p=w.pop();for(var y=0;y<p.matches.length;y++)p.matches[y].isGroup=!1,p.matches[y].alternatorGroup=!1;w.length>0?(o=w[w.length-1],o.matches.push(p)):v.matches.push(p)}}else v.matches.push(n);else j();break;case f.optionalmarker.start:w.push(new g(!1,!0));break;case f.groupmarker.start:w.push(new g(!0));break;case f.quantifiermarker.start:var z=new g(!1,!1,!0);m=m.replace(/[{}]/g,"");var A=m.split(","),B=isNaN(A[0])?A[0]:parseInt(A[0]),C=1===A.length?B:isNaN(A[1])?A[1]:parseInt(A[1]);if("*"!==C&&"+"!==C||(B="*"===C?0:1),z.quantifier={min:B,max:C},w.length>0){var D=w[w.length-1].matches;l=D.pop(),l.isGroup||(r=new g(!0),r.matches.push(l),l=r),D.push(l),D.push(z)}else l=v.matches.pop(),l.isGroup||(c&&null===l.fn&&"."===l.def&&(l.fn=new RegExp(l.def,f.casing?"i":"")),r=new g(!0),r.matches.push(l),l=r),v.matches.push(l),v.matches.push(z);break;case f.alternatormarker:if(w.length>0){o=w[w.length-1];var E=o.matches[o.matches.length-1];q=o.openGroup&&(E.matches===d||!1===E.isGroup&&!1===E.isAlternator)?w.pop():o.matches.pop()}else q=v.matches.pop();if(q.isAlternator)w.push(q);else if(q.alternatorGroup?(p=w.pop(),q.alternatorGroup=!1):p=new g(!1,!1,!1,!0),p.matches.push(q),w.push(p),q.openGroup){q.openGroup=!1;var F=new g(!0);F.alternatorGroup=!0,w.push(F)}break;default:j()}}for(;w.length>0;)n=w.pop(),v.matches.push(n);return v.matches.length>0&&(i(v),x.push(v)),(f.numericInput||f.isRTL)&&k(x[0]),x}},e.extendDefaults=function(b){a.extend(!0,e.prototype.defaults,b)},e.extendDefinitions=function(b){a.extend(!0,e.prototype.definitions,b)},e.extendAliases=function(b){a.extend(!0,e.prototype.aliases,b)},e.format=function(a,b,c){return e(b).format(a,c)},e.unmask=function(a,b){return e(b).unmaskedvalue(a)},e.isValid=function(a,b){return e(b).isValid(a)},e.remove=function(b){a.each(b,function(a,b){b.inputmask&&b.inputmask.remove()})},e.escapeRegex=function(a){var b=["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^"];return a.replace(new RegExp("(\\"+b.join("|\\")+")","gim"),"\\$1")},e.keyCode={ALT:18,BACKSPACE:8,BACKSPACE_SAFARI:127,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91,X:88},e})},function(a,b){a.exports=jQuery},function(a,b,c){"use strict";var d,e,f;"function"==typeof Symbol&&Symbol.iterator,function(g){e=[c(0),c(1)],d=g,void 0!==(f="function"==typeof d?d.apply(b,e):d)&&(a.exports=f)}(function(a,b){function c(a){return isNaN(a)||29===new Date(a,2,0).getDate()}return b.extendAliases({"dd/mm/yyyy":{mask:"1/2/y",placeholder:"dd/mm/yyyy",regex:{val1pre:new RegExp("[0-3]"),val1:new RegExp("0[1-9]|[12][0-9]|3[01]"),val2pre:function(a){var c=b.escapeRegex.call(this,a);return new RegExp("((0[1-9]|[12][0-9]|3[01])"+c+"[01])")},val2:function(a){var c=b.escapeRegex.call(this,a);return new RegExp("((0[1-9]|[12][0-9])"+c+"(0[1-9]|1[012]))|(30"+c+"(0[13-9]|1[012]))|(31"+c+"(0[13578]|1[02]))")}},leapday:"29/02/",separator:"/",yearrange:{minyear:1900,maxyear:2099},isInYearRange:function(a,b,c){if(isNaN(a))return!1
3
- ;var d=parseInt(a.concat(b.toString().slice(a.length))),e=parseInt(a.concat(c.toString().slice(a.length)));return!isNaN(d)&&b<=d&&d<=c||!isNaN(e)&&b<=e&&e<=c},determinebaseyear:function(a,b,c){var d=(new Date).getFullYear();if(a>d)return a;if(b<d){for(var e=b.toString().slice(0,2),f=b.toString().slice(2,4);b<e+c;)e--;var g=e+f;return a>g?a:g}if(a<=d&&d<=b){for(var h=d.toString().slice(0,2);b<h+c;)h--;var i=h+c;return i<a?a:i}return d},onKeyDown:function(c,d,e,f){var g=a(this);if(c.ctrlKey&&c.keyCode===b.keyCode.RIGHT){var h=new Date;g.val(h.getDate().toString()+(h.getMonth()+1).toString()+h.getFullYear().toString()),g.trigger("setvalue")}},getFrontValue:function(a,b,c){for(var d=0,e=0,f=0;f<a.length&&"2"!==a.charAt(f);f++){var g=c.definitions[a.charAt(f)];g?(d+=e,e=g.cardinality):e++}return b.join("").substr(d,e)},postValidation:function(a,b,d){var e,f,g=a.join("");return 0===d.mask.indexOf("y")?(f=g.substr(0,4),e=g.substring(4,10)):(f=g.substring(6,10),e=g.substr(0,6)),b&&(e!==d.leapday||c(f))},definitions:{1:{validator:function(a,b,c,d,e){if("3"==a.charAt(0)&&new RegExp("[2-9]").test(a.charAt(1)))return a="30",b.buffer[c]="0",c++,{pos:c};var f=e.regex.val1.test(a);return d||f||a.charAt(1)!==e.separator&&-1==="-./".indexOf(a.charAt(1))||!(f=e.regex.val1.test("0"+a.charAt(0)))?f:(b.buffer[c-1]="0",{refreshFromBuffer:{start:c-1,end:c},pos:c,c:a.charAt(0)})},cardinality:2,prevalidator:[{validator:function(a,b,c,d,e){var f=a;isNaN(b.buffer[c+1])||(f+=b.buffer[c+1]);var g=1===f.length?e.regex.val1pre.test(f):e.regex.val1.test(f);if(!d&&!g){if(g=e.regex.val1.test(a+"0"))return b.buffer[c]=a,b.buffer[++c]="0",{pos:c,c:"0"};if(g=e.regex.val1.test("0"+a))return b.buffer[c]="0",c++,{pos:c}}return g},cardinality:1}]},2:{validator:function(a,b,c,d,e){var f=e.getFrontValue(b.mask,b.buffer,e);if(-1!==f.indexOf(e.placeholder[0])&&(f="01"+e.separator),"1"==a.charAt(0)&&new RegExp("[3-9]").test(a.charAt(1)))return a="10",b.buffer[c]="0",c++,{pos:c};var g=e.regex.val2(e.separator).test(f+a);return d||g||a.charAt(1)!==e.separator&&-1==="-./".indexOf(a.charAt(1))||!(g=e.regex.val2(e.separator).test(f+"0"+a.charAt(0)))?g:(b.buffer[c-1]="0",{refreshFromBuffer:{start:c-1,end:c},pos:c,c:a.charAt(0)})},cardinality:2,prevalidator:[{validator:function(a,b,c,d,e){isNaN(b.buffer[c+1])||(a+=b.buffer[c+1]);var f=e.getFrontValue(b.mask,b.buffer,e);-1!==f.indexOf(e.placeholder[0])&&(f="01"+e.separator);var g=1===a.length?e.regex.val2pre(e.separator).test(f+a):e.regex.val2(e.separator).test(f+a);return d||g||!(g=e.regex.val2(e.separator).test(f+"0"+a))?g:(b.buffer[c]="0",c++,{pos:c})},cardinality:1}]},y:{validator:function(a,b,c,d,e){return e.isInYearRange(a,e.yearrange.minyear,e.yearrange.maxyear)},cardinality:4,prevalidator:[{validator:function(a,b,c,d,e){var f=e.isInYearRange(a,e.yearrange.minyear,e.yearrange.maxyear);if(!d&&!f){var g=e.determinebaseyear(e.yearrange.minyear,e.yearrange.maxyear,a+"0").toString().slice(0,1);if(f=e.isInYearRange(g+a,e.yearrange.minyear,e.yearrange.maxyear))return b.buffer[c++]=g.charAt(0),{pos:c};if(g=e.determinebaseyear(e.yearrange.minyear,e.yearrange.maxyear,a+"0").toString().slice(0,2),f=e.isInYearRange(g+a,e.yearrange.minyear,e.yearrange.maxyear))return b.buffer[c++]=g.charAt(0),b.buffer[c++]=g.charAt(1),{pos:c}}return f},cardinality:1},{validator:function(a,b,c,d,e){var f=e.isInYearRange(a,e.yearrange.minyear,e.yearrange.maxyear);if(!d&&!f){var g=e.determinebaseyear(e.yearrange.minyear,e.yearrange.maxyear,a).toString().slice(0,2);if(f=e.isInYearRange(a[0]+g[1]+a[1],e.yearrange.minyear,e.yearrange.maxyear))return b.buffer[c++]=g.charAt(1),{pos:c};if(g=e.determinebaseyear(e.yearrange.minyear,e.yearrange.maxyear,a).toString().slice(0,2),f=e.isInYearRange(g+a,e.yearrange.minyear,e.yearrange.maxyear))return b.buffer[c-1]=g.charAt(0),b.buffer[c++]=g.charAt(1),b.buffer[c++]=a.charAt(0),{refreshFromBuffer:{start:c-3,end:c},pos:c}}return f},cardinality:2},{validator:function(a,b,c,d,e){return e.isInYearRange(a,e.yearrange.minyear,e.yearrange.maxyear)},cardinality:3}]}},insertMode:!1,autoUnmask:!1},"mm/dd/yyyy":{placeholder:"mm/dd/yyyy",alias:"dd/mm/yyyy",regex:{val2pre:function(a){var c=b.escapeRegex.call(this,a);return new RegExp("((0[13-9]|1[012])"+c+"[0-3])|(02"+c+"[0-2])")},val2:function(a){var c=b.escapeRegex.call(this,a);return new RegExp("((0[1-9]|1[012])"+c+"(0[1-9]|[12][0-9]))|((0[13-9]|1[012])"+c+"30)|((0[13578]|1[02])"+c+"31)")},val1pre:new RegExp("[01]"),val1:new RegExp("0[1-9]|1[012]")},leapday:"02/29/",onKeyDown:function(c,d,e,f){var g=a(this);if(c.ctrlKey&&c.keyCode===b.keyCode.RIGHT){var h=new Date;g.val((h.getMonth()+1).toString()+h.getDate().toString()+h.getFullYear().toString()),g.trigger("setvalue")}}},"yyyy/mm/dd":{mask:"y/1/2",placeholder:"yyyy/mm/dd",alias:"mm/dd/yyyy",leapday:"/02/29",onKeyDown:function(c,d,e,f){var g=a(this);if(c.ctrlKey&&c.keyCode===b.keyCode.RIGHT){var h=new Date;g.val(h.getFullYear().toString()+(h.getMonth()+1).toString()+h.getDate().toString()),g.trigger("setvalue")}}},"dd.mm.yyyy":{mask:"1.2.y",placeholder:"dd.mm.yyyy",leapday:"29.02.",separator:".",alias:"dd/mm/yyyy"},"dd-mm-yyyy":{mask:"1-2-y",placeholder:"dd-mm-yyyy",leapday:"29-02-",separator:"-",alias:"dd/mm/yyyy"},"mm.dd.yyyy":{mask:"1.2.y",placeholder:"mm.dd.yyyy",leapday:"02.29.",separator:".",alias:"mm/dd/yyyy"},"mm-dd-yyyy":{mask:"1-2-y",placeholder:"mm-dd-yyyy",leapday:"02-29-",separator:"-",alias:"mm/dd/yyyy"},"yyyy.mm.dd":{mask:"y.1.2",placeholder:"yyyy.mm.dd",leapday:".02.29",separator:".",alias:"yyyy/mm/dd"},"yyyy-mm-dd":{mask:"y-1-2",placeholder:"yyyy-mm-dd",leapday:"-02-29",separator:"-",alias:"yyyy/mm/dd"},datetime:{mask:"1/2/y h:s",placeholder:"dd/mm/yyyy hh:mm",alias:"dd/mm/yyyy",regex:{hrspre:new RegExp("[012]"),hrs24:new RegExp("2[0-4]|1[3-9]"),hrs:new RegExp("[01][0-9]|2[0-4]"),ampm:new RegExp("^[a|p|A|P][m|M]"),mspre:new RegExp("[0-5]"),ms:new RegExp("[0-5][0-9]")},timeseparator:":",hourFormat:"24",definitions:{h:{validator:function(a,b,c,d,e){if("24"===e.hourFormat&&24===parseInt(a,10))return b.buffer[c-1]="0",b.buffer[c]="0",{refreshFromBuffer:{start:c-1,end:c},c:"0"};var f=e.regex.hrs.test(a);if(!d&&!f&&(a.charAt(1)===e.timeseparator||-1!=="-.:".indexOf(a.charAt(1)))&&(f=e.regex.hrs.test("0"+a.charAt(0))))return b.buffer[c-1]="0",b.buffer[c]=a.charAt(0),c++,{refreshFromBuffer:{start:c-2,end:c},pos:c,c:e.timeseparator};if(f&&"24"!==e.hourFormat&&e.regex.hrs24.test(a)){var g=parseInt(a,10);return 24===g?(b.buffer[c+5]="a",b.buffer[c+6]="m"):(b.buffer[c+5]="p",b.buffer[c+6]="m"),g-=12,g<10?(b.buffer[c]=g.toString(),b.buffer[c-1]="0"):(b.buffer[c]=g.toString().charAt(1),b.buffer[c-1]=g.toString().charAt(0)),{refreshFromBuffer:{start:c-1,end:c+6},c:b.buffer[c]}}return f},cardinality:2,prevalidator:[{validator:function(a,b,c,d,e){var f=e.regex.hrspre.test(a);return d||f||!(f=e.regex.hrs.test("0"+a))?f:(b.buffer[c]="0",c++,{pos:c})},cardinality:1}]},s:{validator:"[0-5][0-9]",cardinality:2,prevalidator:[{validator:function(a,b,c,d,e){var f=e.regex.mspre.test(a);return d||f||!(f=e.regex.ms.test("0"+a))?f:(b.buffer[c]="0",c++,{pos:c})},cardinality:1}]},t:{validator:function(a,b,c,d,e){return e.regex.ampm.test(a+"m")},casing:"lower",cardinality:1}},insertMode:!1,autoUnmask:!1},datetime12:{mask:"1/2/y h:s t\\m",placeholder:"dd/mm/yyyy hh:mm xm",alias:"datetime",hourFormat:"12"},"mm/dd/yyyy hh:mm xm":{mask:"1/2/y h:s t\\m",placeholder:"mm/dd/yyyy hh:mm xm",alias:"datetime12",regex:{val2pre:function(a){var c=b.escapeRegex.call(this,a);return new RegExp("((0[13-9]|1[012])"+c+"[0-3])|(02"+c+"[0-2])")},val2:function(a){var c=b.escapeRegex.call(this,a);return new RegExp("((0[1-9]|1[012])"+c+"(0[1-9]|[12][0-9]))|((0[13-9]|1[012])"+c+"30)|((0[13578]|1[02])"+c+"31)")},val1pre:new RegExp("[01]"),val1:new RegExp("0[1-9]|1[012]")},leapday:"02/29/",onKeyDown:function(c,d,e,f){var g=a(this);if(c.ctrlKey&&c.keyCode===b.keyCode.RIGHT){var h=new Date;g.val((h.getMonth()+1).toString()+h.getDate().toString()+h.getFullYear().toString()),g.trigger("setvalue")}}},"hh:mm t":{mask:"h:s t\\m",placeholder:"hh:mm xm",alias:"datetime",hourFormat:"12"},"h:s t":{mask:"h:s t\\m",placeholder:"hh:mm xm",alias:"datetime",hourFormat:"12"},"hh:mm:ss":{mask:"h:s:s",placeholder:"hh:mm:ss",alias:"datetime",autoUnmask:!1},"hh:mm":{mask:"h:s",placeholder:"hh:mm",alias:"datetime",autoUnmask:!1},date:{alias:"dd/mm/yyyy"},"mm/yyyy":{mask:"1/y",placeholder:"mm/yyyy",leapday:"donotuse",separator:"/",alias:"mm/dd/yyyy"},shamsi:{regex:{val2pre:function(a){var c=b.escapeRegex.call(this,a);return new RegExp("((0[1-9]|1[012])"+c+"[0-3])")},val2:function(a){var c=b.escapeRegex.call(this,a);return new RegExp("((0[1-9]|1[012])"+c+"(0[1-9]|[12][0-9]))|((0[1-9]|1[012])"+c+"30)|((0[1-6])"+c+"31)")},val1pre:new RegExp("[01]"),val1:new RegExp("0[1-9]|1[012]")},yearrange:{minyear:1300,maxyear:1499},mask:"y/1/2",leapday:"/12/30",placeholder:"yyyy/mm/dd",alias:"mm/dd/yyyy",clearIncomplete:!0},"yyyy-mm-dd hh:mm:ss":{mask:"y-1-2 h:s:s",placeholder:"yyyy-mm-dd hh:mm:ss",alias:"datetime",separator:"-",leapday:"-02-29",regex:{val2pre:function(a){var c=b.escapeRegex.call(this,a);return new RegExp("((0[13-9]|1[012])"+c+"[0-3])|(02"+c+"[0-2])")},val2:function(a){var c=b.escapeRegex.call(this,a);return new RegExp("((0[1-9]|1[012])"+c+"(0[1-9]|[12][0-9]))|((0[13-9]|1[012])"+c+"30)|((0[13578]|1[02])"+c+"31)")},val1pre:new RegExp("[01]"),val1:new RegExp("0[1-9]|1[012]")},onKeyDown:function(a,b,c,d){}}}),b})},function(a,b,c){"use strict";var d,e,f;"function"==typeof Symbol&&Symbol.iterator,function(g){e=[c(0),c(1)],d=g,void 0!==(f="function"==typeof d?d.apply(b,e):d)&&(a.exports=f)}(function(a,b){return b.extendDefinitions({A:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",cardinality:1,casing:"upper"},"&":{validator:"[0-9A-Za-zА-яЁёÀ-ÿµ]",cardinality:1,casing:"upper"},"#":{validator:"[0-9A-Fa-f]",cardinality:1,casing:"upper"}}),b.extendAliases({url:{definitions:{i:{validator:".",cardinality:1}},mask:"(\\http://)|(\\http\\s://)|(ftp://)|(ftp\\s://)i{+}",insertMode:!1,autoUnmask:!1,inputmode:"url"},ip:{mask:"i[i[i]].i[i[i]].i[i[i]].i[i[i]]",definitions:{i:{validator:function(a,b,c,d,e){return c-1>-1&&"."!==b.buffer[c-1]?(a=b.buffer[c-1]+a,a=c-2>-1&&"."!==b.buffer[c-2]?b.buffer[c-2]+a:"0"+a):a="00"+a,new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]").test(a)},cardinality:1}},onUnMask:function(a,b,c){return a},inputmode:"numeric"},email:{mask:"*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]",greedy:!1,onBeforePaste:function(a,b){return a=a.toLowerCase(),a.replace("mailto:","")},definitions:{"*":{validator:"[0-9A-Za-z!#$%&'*+/=?^_`{|}~-]",cardinality:1,casing:"lower"},"-":{validator:"[0-9A-Za-z-]",cardinality:1,casing:"lower"}},onUnMask:function(a,b,c){return a},inputmode:"email"},mac:{mask:"##:##:##:##:##:##"},vin:{mask:"V{13}9{4}",definitions:{V:{validator:"[A-HJ-NPR-Za-hj-npr-z\\d]",cardinality:1,casing:"upper"}},clearIncomplete:!0,autoUnmask:!0}}),b})},function(a,b,c){"use strict";var d,e,f;"function"==typeof Symbol&&Symbol.iterator,function(g){e=[c(0),c(1)],d=g,void 0!==(f="function"==typeof d?d.apply(b,e):d)&&(a.exports=f)}(function(a,b,c){function d(a,c){for(var d="",e=0;e<a.length;e++)b.prototype.definitions[a.charAt(e)]||c.definitions[a.charAt(e)]||c.optionalmarker.start===a.charAt(e)||c.optionalmarker.end===a.charAt(e)||c.quantifiermarker.start===a.charAt(e)||c.quantifiermarker.end===a.charAt(e)||c.groupmarker.start===a.charAt(e)||c.groupmarker.end===a.charAt(e)||c.alternatormarker===a.charAt(e)?d+="\\"+a.charAt(e):d+=a.charAt(e);return d}return b.extendAliases({numeric:{mask:function(a){if(0!==a.repeat&&isNaN(a.integerDigits)&&(a.integerDigits=a.repeat),a.repeat=0,a.groupSeparator===a.radixPoint&&a.digits&&"0"!==a.digits&&("."===a.radixPoint?a.groupSeparator=",":","===a.radixPoint?a.groupSeparator=".":a.groupSeparator="")," "===a.groupSeparator&&(a.skipOptionalPartCharacter=c),a.autoGroup=a.autoGroup&&""!==a.groupSeparator,a.autoGroup&&("string"==typeof a.groupSize&&isFinite(a.groupSize)&&(a.groupSize=parseInt(a.groupSize)),isFinite(a.integerDigits))){var b=Math.floor(a.integerDigits/a.groupSize),e=a.integerDigits%a.groupSize;a.integerDigits=parseInt(a.integerDigits)+(0===e?b-1:b),a.integerDigits<1&&(a.integerDigits="*")}a.placeholder.length>1&&(a.placeholder=a.placeholder.charAt(0)),"radixFocus"===a.positionCaretOnClick&&""===a.placeholder&&!1===a.integerOptional&&(a.positionCaretOnClick="lvp"),a.definitions[";"]=a.definitions["~"],a.definitions[";"].definitionSymbol="~",!0===a.numericInput&&(a.positionCaretOnClick="radixFocus"===a.positionCaretOnClick?"lvp":a.positionCaretOnClick,a.digitsOptional=!1,isNaN(a.digits)&&(a.digits=2),a.decimalProtect=!1);var f="[+]";if(f+=d(a.prefix,a),!0===a.integerOptional?f+="~{1,"+a.integerDigits+"}":f+="~{"+a.integerDigits+"}",a.digits!==c){a.radixPointDefinitionSymbol=a.decimalProtect?":":a.radixPoint;var g=a.digits.toString().split(",");isFinite(g[0]&&g[1]&&isFinite(g[1]))?f+=a.radixPointDefinitionSymbol+";{"+a.digits+"}":(isNaN(a.digits)||parseInt(a.digits)>0)&&(a.digitsOptional?f+="["+a.radixPointDefinitionSymbol+";{1,"+a.digits+"}]":f+=a.radixPointDefinitionSymbol+";{"+a.digits+"}")}return f+=d(a.suffix,a),f+="[-]",a.greedy=!1,f},placeholder:"",greedy:!1,digits:"*",digitsOptional:!0,enforceDigitsOnBlur:!1,radixPoint:".",positionCaretOnClick:"radixFocus",groupSize:3,groupSeparator:"",autoGroup:!1,allowMinus:!0,negationSymbol:{front:"-",back:""},integerDigits:"+",integerOptional:!0,prefix:"",suffix:"",rightAlign:!0,decimalProtect:!0,min:null,max:null,step:1,insertMode:!0,autoUnmask:!1,unmaskAsNumber:!1,inputmode:"numeric",preValidation:function(b,d,e,f,g){if("-"===e||e===g.negationSymbol.front)return!0===g.allowMinus&&(g.isNegative=g.isNegative===c||!g.isNegative,""===b.join("")||{caret:d,dopost:!0});if(!1===f&&e===g.radixPoint&&g.digits!==c&&(isNaN(g.digits)||parseInt(g.digits)>0)){var h=a.inArray(g.radixPoint,b);if(-1!==h)return!0===g.numericInput?d===h:{caret:h+1}}return!0},postValidation:function(d,e,f){var g=f.suffix.split(""),h=f.prefix.split("");if(e.pos===c&&e.caret!==c&&!0!==e.dopost)return e;var i=e.caret!==c?e.caret:e.pos,j=d.slice();f.numericInput&&(i=j.length-i-1,j=j.reverse());var k=j[i];if(k===f.groupSeparator&&(i+=1,k=j[i]),i===j.length-f.suffix.length-1&&k===f.radixPoint)return e;k!==c&&k!==f.radixPoint&&k!==f.negationSymbol.front&&k!==f.negationSymbol.back&&(j[i]="?",f.prefix.length>0&&i>=(!1===f.isNegative?1:0)&&i<f.prefix.length-1+(!1===f.isNegative?1:0)?h[i-(!1===f.isNegative?1:0)]="?":f.suffix.length>0&&i>=j.length-f.suffix.length-(!1===f.isNegative?1:0)&&(g[i-(j.length-f.suffix.length-(!1===f.isNegative?1:0))]="?")),h=h.join(""),g=g.join("");var l=j.join("").replace(h,"");if(l=l.replace(g,""),l=l.replace(new RegExp(b.escapeRegex(f.groupSeparator),"g"),""),l=l.replace(new RegExp("[-"+b.escapeRegex(f.negationSymbol.front)+"]","g"),""),l=l.replace(new RegExp(b.escapeRegex(f.negationSymbol.back)+"$"),""),isNaN(f.placeholder)&&(l=l.replace(new RegExp(b.escapeRegex(f.placeholder),"g"),"")),l.length>1&&1!==l.indexOf(f.radixPoint)&&("0"===k&&(l=l.replace(/^\?/g,"")),l=l.replace(/^0/g,"")),l.charAt(0)===f.radixPoint&&""!==f.radixPoint&&!0!==f.numericInput&&(l="0"+l),""!==l){if(l=l.split(""),(!f.digitsOptional||f.enforceDigitsOnBlur&&"blur"===e.event)&&isFinite(f.digits)){var m=a.inArray(f.radixPoint,l),n=a.inArray(f.radixPoint,j);-1===m&&(l.push(f.radixPoint),m=l.length-1);for(var o=1;o<=f.digits;o++)f.digitsOptional&&(!f.enforceDigitsOnBlur||"blur"!==e.event)||l[m+o]!==c&&l[m+o]!==f.placeholder.charAt(0)?-1!==n&&j[n+o]!==c&&(l[m+o]=l[m+o]||j[n+o]):l[m+o]=e.placeholder||f.placeholder.charAt(0)}if(!0!==f.autoGroup||""===f.groupSeparator||k===f.radixPoint&&e.pos===c&&!e.dopost)l=l.join("");else{var p=l[l.length-1]===f.radixPoint&&e.c===f.radixPoint;l=b(function(a,b){var c="";if(c+="("+b.groupSeparator+"*{"+b.groupSize+"}){*}",""!==b.radixPoint){var d=a.join("").split(b.radixPoint);d[1]&&(c+=b.radixPoint+"*{"+d[1].match(/^\d*\??\d*/)[0].length+"}")}return c}(l,f),{numericInput:!0,jitMasking:!0,definitions:{"*":{validator:"[0-9?]",cardinality:1}}}).format(l.join("")),p&&(l+=f.radixPoint),l.charAt(0)===f.groupSeparator&&l.substr(1)}}if(f.isNegative&&"blur"===e.event&&(f.isNegative="0"!==l),l=h+l,l+=g,f.isNegative&&(l=f.negationSymbol.front+l,l+=f.negationSymbol.back),l=l.split(""),k!==c)if(k!==f.radixPoint&&k!==f.negationSymbol.front&&k!==f.negationSymbol.back)i=a.inArray("?",l),i>-1?l[i]=k:i=e.caret||0;else if(k===f.radixPoint||k===f.negationSymbol.front||k===f.negationSymbol.back){var q=a.inArray(k,l);-1!==q&&(i=q)}f.numericInput&&(i=l.length-i-1,l=l.reverse());var r={caret:k===c||e.pos!==c?i+(f.numericInput?-1:1):i,buffer:l,refreshFromBuffer:e.dopost||d.join("")!==l.join("")};return r.refreshFromBuffer?r:e},onBeforeWrite:function(d,e,f,g){if(d)switch(d.type){case"keydown":return g.postValidation(e,{caret:f,dopost:!0},g);case"blur":case"checkval":var h;if(function(a){a.parseMinMaxOptions===c&&(null!==a.min&&(a.min=a.min.toString().replace(new RegExp(b.escapeRegex(a.groupSeparator),"g"),""),","===a.radixPoint&&(a.min=a.min.replace(a.radixPoint,".")),a.min=isFinite(a.min)?parseFloat(a.min):NaN,isNaN(a.min)&&(a.min=Number.MIN_VALUE)),null!==a.max&&(a.max=a.max.toString().replace(new RegExp(b.escapeRegex(a.groupSeparator),"g"),""),","===a.radixPoint&&(a.max=a.max.replace(a.radixPoint,".")),a.max=isFinite(a.max)?parseFloat(a.max):NaN,isNaN(a.max)&&(a.max=Number.MAX_VALUE)),a.parseMinMaxOptions="done")}(g),null!==g.min||null!==g.max){if(h=g.onUnMask(e.join(""),c,a.extend({},g,{unmaskAsNumber:!0})),null!==g.min&&h<g.min)return g.isNegative=g.min<0,g.postValidation(g.min.toString().replace(".",g.radixPoint).split(""),{caret:f,dopost:!0,placeholder:"0"},g);if(null!==g.max&&h>g.max)return g.isNegative=g.max<0,g.postValidation(g.max.toString().replace(".",g.radixPoint).split(""),{caret:f,dopost:!0,placeholder:"0"},g)}return g.postValidation(e,{caret:f,placeholder:"0",event:"blur"},g);case"_checkval":return{caret:f}}},regex:{integerPart:function(a,c){return c?new RegExp("["+b.escapeRegex(a.negationSymbol.front)+"+]?"):new RegExp("["+b.escapeRegex(a.negationSymbol.front)+"+]?\\d+")},integerNPart:function(a){return new RegExp("[\\d"+b.escapeRegex(a.groupSeparator)+b.escapeRegex(a.placeholder.charAt(0))+"]+")}},definitions:{"~":{validator:function(a,d,e,f,g,h){var i=f?new RegExp("[0-9"+b.escapeRegex(g.groupSeparator)+"]").test(a):new RegExp("[0-9]").test(a);if(!0===i){if(!0!==g.numericInput&&d.validPositions[e]!==c&&"~"===d.validPositions[e].match.def&&!h){var j=d.buffer.join("");j=j.replace(new RegExp("[-"+b.escapeRegex(g.negationSymbol.front)+"]","g"),""),j=j.replace(new RegExp(b.escapeRegex(g.negationSymbol.back)+"$"),"");var k=j.split(g.radixPoint);k.length>1&&(k[1]=k[1].replace(/0/g,g.placeholder.charAt(0))),"0"===k[0]&&(k[0]=k[0].replace(/0/g,g.placeholder.charAt(0))),j=k[0]+g.radixPoint+k[1]||"";var l=d._buffer.join("");for(j===g.radixPoint&&(j=l);null===j.match(b.escapeRegex(l)+"$");)l=l.slice(1);j=j.replace(l,""),j=j.split(""),i=j[e]===c?{pos:e,remove:e}:{pos:e}}}else f||a!==g.radixPoint||d.validPositions[e-1]!==c||(d.buffer[e]="0",i={pos:e+1});return i},cardinality:1},"+":{validator:function(a,b,c,d,e){return e.allowMinus&&("-"===a||a===e.negationSymbol.front)},cardinality:1,placeholder:""},"-":{validator:function(a,b,c,d,e){return e.allowMinus&&a===e.negationSymbol.back},cardinality:1,placeholder:""},":":{validator:function(a,c,d,e,f){var g="["+b.escapeRegex(f.radixPoint)+"]",h=new RegExp(g).test(a);return h&&c.validPositions[d]&&c.validPositions[d].match.placeholder===f.radixPoint&&(h={caret:d+1}),h},cardinality:1,placeholder:function(a){return a.radixPoint}}},onUnMask:function(a,c,d){if(""===c&&!0===d.nullable)return c;var e=a.replace(d.prefix,"");return e=e.replace(d.suffix,""),e=e.replace(new RegExp(b.escapeRegex(d.groupSeparator),"g"),""),""!==d.placeholder.charAt(0)&&(e=e.replace(new RegExp(d.placeholder.charAt(0),"g"),"0")),d.unmaskAsNumber?(""!==d.radixPoint&&-1!==e.indexOf(d.radixPoint)&&(e=e.replace(b.escapeRegex.call(this,d.radixPoint),".")),e=e.replace(new RegExp("^"+b.escapeRegex(d.negationSymbol.front)),"-"),e=e.replace(new RegExp(b.escapeRegex(d.negationSymbol.back)+"$"),""),Number(e)):e},isComplete:function(a,c){var d=a.join("");if(a.slice().join("")!==d)return!1;var e=d.replace(c.prefix,"");return e=e.replace(c.suffix,""),e=e.replace(new RegExp(b.escapeRegex(c.groupSeparator),"g"),""),","===c.radixPoint&&(e=e.replace(b.escapeRegex(c.radixPoint),".")),isFinite(e)},onBeforeMask:function(a,d){if(d.isNegative=c,a=a.toString().charAt(a.length-1)===d.radixPoint?a.toString().substr(0,a.length-1):a.toString(),""!==d.radixPoint&&isFinite(a)){var e=a.split("."),f=""!==d.groupSeparator?parseInt(d.groupSize):0;2===e.length&&(e[0].length>f||e[1].length>f||e[0].length<=f&&e[1].length<f)&&(a=a.replace(".",d.radixPoint))}var g=a.match(/,/g),h=a.match(/\./g);if(h&&g?h.length>g.length?(a=a.replace(/\./g,""),a=a.replace(",",d.radixPoint)):g.length>h.length?(a=a.replace(/,/g,""),a=a.replace(".",d.radixPoint)):a=a.indexOf(".")<a.indexOf(",")?a.replace(/\./g,""):a.replace(/,/g,""):a=a.replace(new RegExp(b.escapeRegex(d.groupSeparator),"g"),""),0===d.digits&&(-1!==a.indexOf(".")?a=a.substring(0,a.indexOf(".")):-1!==a.indexOf(",")&&(a=a.substring(0,a.indexOf(",")))),""!==d.radixPoint&&isFinite(d.digits)&&-1!==a.indexOf(d.radixPoint)){var i=a.split(d.radixPoint),j=i[1].match(new RegExp("\\d*"))[0];if(parseInt(d.digits)<j.toString().length){var k=Math.pow(10,parseInt(d.digits));a=a.replace(b.escapeRegex(d.radixPoint),"."),a=Math.round(parseFloat(a)*k)/k,a=a.toString().replace(".",d.radixPoint)}}return a},canClearPosition:function(a,b,c,d,e){var f=a.validPositions[b],g=f.input!==e.radixPoint||null!==a.validPositions[b].match.fn&&!1===e.decimalProtect||f.input===e.radixPoint&&a.validPositions[b+1]&&null===a.validPositions[b+1].match.fn||isFinite(f.input)||b===c||f.input===e.groupSeparator||f.input===e.negationSymbol.front||f.input===e.negationSymbol.back;return!g||"+"!==f.match.nativeDef&&"-"!==f.match.nativeDef||(e.isNegative=!1),g},onKeyDown:function(c,d,e,f){var g=a(this);if(c.ctrlKey)switch(c.keyCode){case b.keyCode.UP:g.val(parseFloat(this.inputmask.unmaskedvalue())+parseInt(f.step)),g.trigger("setvalue");break;case b.keyCode.DOWN:g.val(parseFloat(this.inputmask.unmaskedvalue())-parseInt(f.step)),g.trigger("setvalue")}}},currency:{prefix:"$ ",groupSeparator:",",alias:"numeric",placeholder:"0",autoGroup:!0,digits:2,digitsOptional:!1,clearMaskOnLostFocus:!1},decimal:{alias:"numeric"},integer:{alias:"numeric",digits:0,radixPoint:""},percentage:{alias:"numeric",digits:2,digitsOptional:!0,radixPoint:".",placeholder:"0",autoGroup:!1,min:0,max:100,suffix:" %",allowMinus:!1}}),b})},function(a,b,c){"use strict";var d,e,f;"function"==typeof Symbol&&Symbol.iterator,function(g){e=[c(0),c(1)],d=g,void 0!==(f="function"==typeof d?d.apply(b,e):d)&&(a.exports=f)}(function(a,b){function c(a,b){var c=(a.mask||a).replace(/#/g,"9").replace(/\)/,"9").replace(/[+()#-]/g,""),d=(b.mask||b).replace(/#/g,"9").replace(/\)/,"9").replace(/[+()#-]/g,""),e=(a.mask||a).split("#")[0],f=(b.mask||b).split("#")[0];return 0===f.indexOf(e)?-1:0===e.indexOf(f)?1:c.localeCompare(d)}var d=b.prototype.analyseMask;return b.prototype.analyseMask=function(b,c,e){function f(a,c,d){c=c||"",d=d||h,""!==c&&(d[c]={});for(var e="",g=d[c]||d,i=a.length-1;i>=0;i--)b=a[i].mask||a[i],e=b.substr(0,1),g[e]=g[e]||[],g[e].unshift(b.substr(1)),a.splice(i,1);for(var j in g)g[j].length>500&&f(g[j].slice(),j,g)}function g(b){var c="",d=[];for(var f in b)a.isArray(b[f])?1===b[f].length?d.push(f+b[f]):d.push(f+e.groupmarker.start+b[f].join(e.groupmarker.end+e.alternatormarker+e.groupmarker.start)+e.groupmarker.end):d.push(f+g(b[f]));return 1===d.length?c+=d[0]:c+=e.groupmarker.start+d.join(e.groupmarker.end+e.alternatormarker+e.groupmarker.start)+e.groupmarker.end,c}var h={};return e.phoneCodes&&(e.phoneCodes&&e.phoneCodes.length>1e3&&(b=b.substr(1,b.length-2),f(b.split(e.groupmarker.end+e.alternatormarker+e.groupmarker.start)),b=g(h)),b=b.replace(/9/g,"\\9")),d.call(this,b,c,e)},b.extendAliases({abstractphone:{groupmarker:{start:"<",end:">"},countrycode:"",phoneCodes:[],mask:function(a){return a.definitions={"#":b.prototype.definitions[9]},a.phoneCodes.sort(c)},keepStatic:!0,onBeforeMask:function(a,b){var c=a.replace(/^0{1,2}/,"").replace(/[\s]/g,"");return(c.indexOf(b.countrycode)>1||-1===c.indexOf(b.countrycode))&&(c="+"+b.countrycode+c),c},onUnMask:function(a,b,c){return a.replace(/[()#-]/g,"")},inputmode:"tel"}}),b})},function(a,b,c){"use strict";var d,e,f,g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};!function(g){e=[c(2),c(1)],d=g,void 0!==(f="function"==typeof d?d.apply(b,e):d)&&(a.exports=f)}(function(a,b){return void 0===a.fn.inputmask&&(a.fn.inputmask=function(c,d){var e,f=this[0];if(void 0===d&&(d={}),"string"==typeof c)switch(c){case"unmaskedvalue":return f&&f.inputmask?f.inputmask.unmaskedvalue():a(f).val();case"remove":return this.each(function(){this.inputmask&&this.inputmask.remove()});case"getemptymask":return f&&f.inputmask?f.inputmask.getemptymask():"";case"hasMaskedValue":return!(!f||!f.inputmask)&&f.inputmask.hasMaskedValue();case"isComplete":return!f||!f.inputmask||f.inputmask.isComplete();case"getmetadata":return f&&f.inputmask?f.inputmask.getmetadata():void 0;case"setvalue":a(f).val(d),f&&void 0===f.inputmask&&a(f).triggerHandler("setvalue");break;case"option":if("string"!=typeof d)return this.each(function(){if(void 0!==this.inputmask)return this.inputmask.option(d)});if(f&&void 0!==f.inputmask)return f.inputmask.option(d);break;default:return d.alias=c,e=new b(d),this.each(function(){e.mask(this)})}else{if("object"==(void 0===c?"undefined":g(c)))return e=new b(c),void 0===c.mask&&void 0===c.alias?this.each(function(){if(void 0!==this.inputmask)return this.inputmask.option(c);e.mask(this)}):this.each(function(){e.mask(this)});if(void 0===c)return this.each(function(){e=new b(d),e.mask(this)})}}),a.fn.inputmask})},function(a,b,c){var d=c(12);"string"==typeof d&&(d=[[a.i,d,""]]),c(14)(d,{}),d.locals&&(a.exports=d.locals)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}c(8),c(3),c(4),c(5),c(6);var e=c(1),f=d(e),g=c(0),h=d(g),i=c(2),j=d(i);h.default===j.default&&c(7),window.Inputmask=f.default},function(a,b,c){"use strict";var d;"function"==typeof Symbol&&Symbol.iterator,void 0!==(d=function(){return document}.call(b,c,b,a))&&(a.exports=d)},function(a,b,c){"use strict";var d;"function"==typeof Symbol&&Symbol.iterator,void 0!==(d=function(){return window}.call(b,c,b,a))&&(a.exports=d)},function(a,b,c){b=a.exports=c(13)(void 0),b.push([a.i,"span.im-caret {\r\n -webkit-animation: 1s blink step-end infinite;\r\n animation: 1s blink step-end infinite;\r\n}\r\n\r\n@keyframes blink {\r\n from, to {\r\n border-right-color: black;\r\n }\r\n 50% {\r\n border-right-color: transparent;\r\n }\r\n}\r\n\r\n@-webkit-keyframes blink {\r\n from, to {\r\n border-right-color: black;\r\n }\r\n 50% {\r\n border-right-color: transparent;\r\n }\r\n}\r\n\r\nspan.im-static {\r\n color: grey;\r\n}\r\n\r\ndiv.im-colormask {\r\n display: inline-block;\r\n border-style: inset;\r\n border-width: 2px;\r\n -webkit-appearance: textfield;\r\n -moz-appearance: textfield;\r\n appearance: textfield;\r\n}\r\n\r\ndiv.im-colormask > input {\r\n position: absolute;\r\n display: inline-block;\r\n background-color: transparent;\r\n color: transparent;\r\n -webkit-appearance: caret;\r\n -moz-appearance: caret;\r\n appearance: caret;\r\n border-style: none;\r\n left: 0; /*calculated*/\r\n}\r\n\r\ndiv.im-colormask > input:focus {\r\n outline: none;\r\n}\r\n\r\ndiv.im-colormask > div {\r\n color: black;\r\n display: inline-block;\r\n width: 100px; /*calculated*/\r\n}",""])},function(a,b){function c(a,b){var c=a[1]||"",e=a[3];if(!e)return c;if(b&&"function"==typeof btoa){var f=d(e);return[c].concat(e.sources.map(function(a){return"/*# sourceURL="+e.sourceRoot+a+" */"})).concat([f]).join("\n")}return[c].join("\n")}function d(a){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"}a.exports=function(a){var b=[];return b.toString=function(){return this.map(function(b){var d=c(b,a);return b[2]?"@media "+b[2]+"{"+d+"}":d}).join("")},b.i=function(a,c){"string"==typeof a&&(a=[[null,a,""]]);for(var d={},e=0;e<this.length;e++){var f=this[e][0];"number"==typeof f&&(d[f]=!0)}for(e=0;e<a.length;e++){var g=a[e];"number"==typeof g[0]&&d[g[0]]||(c&&!g[2]?g[2]=c:c&&(g[2]="("+g[2]+") and ("+c+")"),b.push(g))}},b}},function(a,b,c){function d(a,b){for(var c=0;c<a.length;c++){var d=a[c],e=o[d.id];if(e){e.refs++;for(var f=0;f<e.parts.length;f++)e.parts[f](d.parts[f]);for(;f<d.parts.length;f++)e.parts.push(k(d.parts[f],b))}else{for(var g=[],f=0;f<d.parts.length;f++)g.push(k(d.parts[f],b));o[d.id]={id:d.id,refs:1,parts:g}}}}function e(a){for(var b=[],c={},d=0;d<a.length;d++){var e=a[d],f=e[0],g=e[1],h=e[2],i=e[3],j={css:g,media:h,sourceMap:i};c[f]?c[f].parts.push(j):b.push(c[f]={id:f,parts:[j]})}return b}function f(a,b){var c=q(a.insertInto);if(!c)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var d=t[t.length-1];if("top"===a.insertAt)d?d.nextSibling?c.insertBefore(b,d.nextSibling):c.appendChild(b):c.insertBefore(b,c.firstChild),t.push(b);else{if("bottom"!==a.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");c.appendChild(b)}}function g(a){a.parentNode.removeChild(a);var b=t.indexOf(a);b>=0&&t.splice(b,1)}function h(a){var b=document.createElement("style");return a.attrs.type="text/css",j(b,a.attrs),f(a,b),b}function i(a){var b=document.createElement("link");return a.attrs.type="text/css",a.attrs.rel="stylesheet",j(b,a.attrs),f(a,b),b}function j(a,b){Object.keys(b).forEach(function(c){a.setAttribute(c,b[c])})}function k(a,b){var c,d,e;if(b.singleton){var f=s++;c=r||(r=h(b)),d=l.bind(null,c,f,!1),e=l.bind(null,c,f,!0)}else a.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(c=i(b),d=n.bind(null,c,b),e=function(){g(c),c.href&&URL.revokeObjectURL(c.href)}):(c=h(b),d=m.bind(null,c),e=function(){g(c)});return d(a),function(b){if(b){if(b.css===a.css&&b.media===a.media&&b.sourceMap===a.sourceMap)return;d(a=b)}else e()}}function l(a,b,c,d){var e=c?"":d.css;if(a.styleSheet)a.styleSheet.cssText=v(b,e);else{var f=document.createTextNode(e),g=a.childNodes;g[b]&&a.removeChild(g[b]),g.length?a.insertBefore(f,g[b]):a.appendChild(f)}}function m(a,b){var c=b.css,d=b.media;if(d&&a.setAttribute("media",d),a.styleSheet)a.styleSheet.cssText=c;else{for(;a.firstChild;)a.removeChild(a.firstChild);a.appendChild(document.createTextNode(c))}}function n(a,b,c){var d=c.css,e=c.sourceMap,f=void 0===b.convertToAbsoluteUrls&&e;(b.convertToAbsoluteUrls||f)&&(d=u(d)),e&&(d+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */");var g=new Blob([d],{type:"text/css"}),h=a.href;a.href=URL.createObjectURL(g),h&&URL.revokeObjectURL(h)}var o={},p=function(a){var b;return function(){return void 0===b&&(b=a.apply(this,arguments)),b}}(function(){return window&&document&&document.all&&!window.atob}),q=function(a){var b={};return function(c){return void 0===b[c]&&(b[c]=a.call(this,c)),b[c]}}(function(a){return document.querySelector(a)}),r=null,s=0,t=[],u=c(15);a.exports=function(a,b){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");b=b||{},
4
- b.attrs="object"==typeof b.attrs?b.attrs:{},void 0===b.singleton&&(b.singleton=p()),void 0===b.insertInto&&(b.insertInto="head"),void 0===b.insertAt&&(b.insertAt="bottom");var c=e(a);return d(c,b),function(a){for(var f=[],g=0;g<c.length;g++){var h=c[g],i=o[h.id];i.refs--,f.push(i)}a&&d(e(a),b);for(var g=0;g<f.length;g++){var i=f[g];if(0===i.refs){for(var j=0;j<i.parts.length;j++)i.parts[j]();delete o[i.id]}}}};var v=function(){var a=[];return function(b,c){return a[b]=c,a.filter(Boolean).join("\n")}}()},function(a,b){a.exports=function(a){var b="undefined"!=typeof window&&window.location;if(!b)throw new Error("fixUrls requires window.location");if(!a||"string"!=typeof a)return a;var c=b.protocol+"//"+b.host,d=c+b.pathname.replace(/\/[^\/]*$/,"/");return a.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(a,b){var e=b.trim().replace(/^"(.*)"$/,function(a,b){return b}).replace(/^'(.*)'$/,function(a,b){return b});if(/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(e))return a;var f;return f=0===e.indexOf("//")?e:0===e.indexOf("/")?c+e:d+e.replace(/^\.\//,""),"url("+JSON.stringify(f)+")"})}}]),jQuery&&function(a){a.extend(a.fn,{miniColors:function(b,c){var d=function(b,c,d){var e=s(b.val());e||(e="ffffff");var f=x(e),h=a('<span class="input-group-addon" style="background-color: #'+e+'" href="#"></span>');h.insertAfter(b),b.addClass("miniColors").data("original-maxlength",b.attr("maxlength")||null).data("original-autocomplete",b.attr("autocomplete")||null).data("letterCase",c.letterCase?c.letterCase:"uppercase").data("trigger",h).data("hsb",f).data("change",c.change?c.change:null).data("close",c.close?c.close:null).data("open",c.open?c.open:null).attr("maxlength",7).attr("autocomplete","off").val("#"+o(e,c.letterCase)).trigger("change"),c.readonly&&b.prop("readonly",!0),c.disabled&&g(b),h.on("click.miniColors",function(a){a.preventDefault(),""===b.val()&&b.val("#").trigger("change"),i(b)}),b.on("focus.miniColors",function(a){""===b.val()&&b.val("#").trigger("change"),i(b)}),b.on("blur.miniColors",function(a){var c=s(y(b.data("hsb")));b.val(c?"#"+o(c,b.data("letterCase")):"").trigger("change")}),b.on("keydown.miniColors",function(a){9===a.keyCode&&j(b)}),b.on("keyup.miniColors",function(a){n(b)}),b.on("paste.miniColors",function(a){setTimeout(function(){n(b)},5)})},e=function(b){j(),b=a(b),b.data("trigger").remove(),b.attr("autocomplete",b.data("original-autocomplete")).attr("maxlength",b.data("original-maxlength")).removeData().removeClass("miniColors").off(".miniColors"),a(document).off(".miniColors")},f=function(a){a.prop("disabled",!1).data("trigger").css("opacity",1)},g=function(a){j(a),a.prop("disabled",!0).data("trigger").css("opacity",.5)},i=function(b){if(b.prop("disabled"))return!1;j();var c=a('<div class="miniColors-selector"></div>');c.append('<div class="miniColors-colors" style="background-color: #FFF;"><div class="miniColors-colorPicker"><div class="miniColors-colorPicker-inner"></div></div>').append('<div class="miniColors-hues"><div class="miniColors-huePicker"></div></div>').css("display","none").addClass(b.attr("class")).removeClass("form-control");var d=b.data("hsb");c.find(".miniColors-colors").css("backgroundColor","#"+y({h:d.h,s:100,b:100}));var e=b.data("colorPosition");e||(e=p(d)),c.find(".miniColors-colorPicker").css("top",e.y+"px").css("left",e.x+"px");var f=b.data("huePosition");f||(f=q(d)),c.find(".miniColors-huePicker").css("top",f.y+"px"),b.data("selector",c).data("huePicker",c.find(".miniColors-huePicker")).data("colorPicker",c.find(".miniColors-colorPicker")).data("mousebutton",0),a("BODY").append(c);var g=b.data("trigger"),h=!b.is(":visible"),i=h?g.offset().top+g.outerHeight():b.offset().top+b.outerHeight(),m=h?g.offset().left:b.offset().left,n=c.outerWidth(),o=c.outerHeight(),r=g.outerWidth(),s=g.outerHeight(),u=a(window).height(),v=a(window).width(),w=a(window).scrollTop(),x=a(window).scrollLeft();i+o>u+w&&(i=i-o-s),m+n>v+x&&(m=m-n+r),c.css({top:i,left:m}).fadeIn(100),c.on("selectstart",function(){return!1}),(!a.browser.msie||a.browser.msie&&a.browser.version>=9)&&a(window).on("resize.miniColors",function(a){j(b)}),a(document).on("mousedown.miniColors touchstart.miniColors",function(c){b.data("mousebutton",1);var d=a(c.target).parents().andSelf();if(d.hasClass("miniColors-colors")&&(c.preventDefault(),b.data("moving","colors"),k(b,c)),d.hasClass("miniColors-hues")&&(c.preventDefault(),b.data("moving","hues"),l(b,c)),d.hasClass("miniColors-selector"))return void c.preventDefault();d.hasClass("miniColors")||j(b)}),a(document).on("mouseup.miniColors touchend.miniColors",function(a){a.preventDefault(),b.data("mousebutton",0).removeData("moving")}).on("mousemove.miniColors touchmove.miniColors",function(a){a.preventDefault(),1===b.data("mousebutton")&&("colors"===b.data("moving")&&k(b,a),"hues"===b.data("moving")&&l(b,a))}),b.data("open")&&b.data("open").call(b.get(0),"#"+y(d),t(d))},j=function(b){b||(b=a(".miniColors")),b.each(function(){var c=a(this).data("selector");a(this).removeData("selector"),a(c).fadeOut(100,function(){if(b.data("close")){var c=b.data("hsb"),d=y(c);b.data("close").call(b.get(0),"#"+d,t(c))}a(this).remove()})}),a(document).off(".miniColors")},k=function(a,b){var c=a.data("colorPicker");c.hide();var d={x:b.pageX,y:b.pageY};b.originalEvent.changedTouches&&(d.x=b.originalEvent.changedTouches[0].pageX,d.y=b.originalEvent.changedTouches[0].pageY),d.x=d.x-a.data("selector").find(".miniColors-colors").offset().left-5,d.y=d.y-a.data("selector").find(".miniColors-colors").offset().top-5,d.x<=-5&&(d.x=-5),d.x>=144&&(d.x=144),d.y<=-5&&(d.y=-5),d.y>=144&&(d.y=144),a.data("colorPosition",d),c.css("left",d.x).css("top",d.y).show();var e=Math.round(.67*(d.x+5));e<0&&(e=0),e>100&&(e=100);var f=100-Math.round(.67*(d.y+5));f<0&&(f=0),f>100&&(f=100);var g=a.data("hsb");g.s=e,g.b=f,m(a,g,!0)},l=function(a,b){var c=a.data("huePicker");c.hide();var d={y:b.pageY};b.originalEvent.changedTouches&&(d.y=b.originalEvent.changedTouches[0].pageY),d.y=d.y-a.data("selector").find(".miniColors-colors").offset().top-1,d.y<=-1&&(d.y=-1),d.y>=149&&(d.y=149),a.data("huePosition",d),c.css("top",d.y).show();var e=Math.round(2.4*(150-d.y-1));e<0&&(e=0),e>360&&(e=360);var f=a.data("hsb");f.h=e,m(a,f,!0)},m=function(a,b,c){a.data("hsb",b);var d=y(b);if(c&&a.val("#"+o(d,a.data("letterCase"))).trigger("change"),a.data("trigger").css("backgroundColor","#"+d),a.data("selector")&&a.data("selector").find(".miniColors-colors").css("backgroundColor","#"+y({h:b.h,s:100,b:100})),a.data("change")){if(d===a.data("lastChange"))return;a.data("change").call(a.get(0),"#"+d,t(b)),a.data("lastChange",d)}},n=function(b){b.val("#"+r(b.val())).trigger("change");var c=s(b.val());if(!c)return!1;var d=x(c),e=b.data("hsb");if(d.h===e.h&&d.s===e.s&&d.b===e.b)return!0;var f=p(d);a(b.data("colorPicker")).css("top",f.y+"px").css("left",f.x+"px"),b.data("colorPosition",f);var g=q(d);return a(b.data("huePicker")).css("top",g.y+"px"),b.data("huePosition",g),m(b,d),!0},o=function(a,b){return"lowercase"===b?a.toLowerCase():"uppercase"===b?a.toUpperCase():a},p=function(a){var b=Math.ceil(a.s/.67);b<0&&(b=0),b>150&&(b=150);var c=150-Math.ceil(a.b/.67);return c<0&&(c=0),c>150&&(c=150),{x:b-5,y:c-5}},q=function(a){var b=150-a.h/2.4;return b<0&&(h=0),b>150&&(h=150),{y:b-1}},r=function(a){return a.replace(/[^A-F0-9]/gi,"")},s=function(a){return(a=r(a))?(3===a.length&&(a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]),6===a.length?a:null):null},t=function(a){var b={},c=Math.round(a.h),d=Math.round(255*a.s/100),e=Math.round(255*a.b/100);if(0===d)b.r=b.g=b.b=e;else{var f=e,g=(255-d)*e/255,h=c%60*(f-g)/60;360===c&&(c=0),c<60?(b.r=f,b.b=g,b.g=g+h):c<120?(b.g=f,b.b=g,b.r=f-h):c<180?(b.g=f,b.r=g,b.b=g+h):c<240?(b.b=f,b.r=g,b.g=f-h):c<300?(b.b=f,b.g=g,b.r=g+h):c<360?(b.r=f,b.g=g,b.b=f-h):(b.r=0,b.g=0,b.b=0)}return{r:Math.round(b.r),g:Math.round(b.g),b:Math.round(b.b)}},u=function(b){var c=[b.r.toString(16),b.g.toString(16),b.b.toString(16)];return a.each(c,function(a,b){1===b.length&&(c[a]="0"+b)}),c.join("")},v=function(a){return a=parseInt(a.indexOf("#")>-1?a.substring(1):a,16),{r:a>>16,g:(65280&a)>>8,b:255&a}},w=function(a){var b={h:0,s:0,b:0},c=Math.min(a.r,a.g,a.b),d=Math.max(a.r,a.g,a.b),e=d-c;return b.b=d,b.s=0!==d?255*e/d:0,0!==b.s?a.r===d?b.h=(a.g-a.b)/e:a.g===d?b.h=2+(a.b-a.r)/e:b.h=4+(a.r-a.g)/e:b.h=-1,b.h*=60,b.h<0&&(b.h+=360),b.s*=100/255,b.b*=100/255,b},x=function(a){var b=w(v(a));return 0===b.s&&(b.h=360),b},y=function(a){return u(t(a))};switch(b){case"readonly":return a(this).each(function(){a(this).hasClass("miniColors")&&a(this).prop("readonly",c)}),a(this);case"disabled":return a(this).each(function(){a(this).hasClass("miniColors")&&(c?g(a(this)):f(a(this)))}),a(this);case"value":if(void 0===c){if(!a(this).hasClass("miniColors"))return;var z=a(this),A=s(z.val());return A?"#"+o(A,z.data("letterCase")):null}return a(this).each(function(){a(this).hasClass("miniColors")&&(a(this).val(c).trigger("change"),n(a(this)))}),a(this);case"destroy":return a(this).each(function(){a(this).hasClass("miniColors")&&e(a(this))}),a(this);default:return b||(b={}),a(this).each(function(){"input"===a(this)[0].tagName.toLowerCase()&&(a(this).data("trigger")||d(a(this),b))}),a(this)}}})}(jQuery),document.addEventListener("load",color_picker_init,!1),jQuery(document).ajaxComplete(function(){color_picker_init()}),function(a,b){function c(){return new Date(Date.UTC.apply(Date,arguments))}function d(){var a=new Date;return c(a.getFullYear(),a.getMonth(),a.getDate())}function e(a){return function(){return this[a].apply(this,arguments)}}function f(b,c){function d(a,b){return b.toLowerCase()}var e,f=a(b).data(),g={},h=new RegExp("^"+c.toLowerCase()+"([A-Z])");c=new RegExp("^"+c.toLowerCase());for(var i in f)c.test(i)&&(e=i.replace(h,d),g[e]=f[i]);return g}function g(b){var c={};if(o[b]||(b=b.split("-")[0],o[b])){var d=o[b];return a.each(n,function(a,b){b in d&&(c[b]=d[b])}),c}}var h=a(window),i=function(){var b={get:function(a){return this.slice(a)[0]},contains:function(a){for(var b=a&&a.valueOf(),c=0,d=this.length;c<d;c++)if(this[c].valueOf()===b)return c;return-1},remove:function(a){this.splice(a,1)},replace:function(b){b&&(a.isArray(b)||(b=[b]),this.clear(),this.push.apply(this,b))},clear:function(){this.splice(0)},copy:function(){var a=new i;return a.replace(this),a}};return function(){var c=[];return c.push.apply(c,arguments),a.extend(c,b),c}}(),j=function(b,c){this.dates=new i,this.viewDate=d(),this.focusDate=null,this._process_options(c),this.element=a(b),this.isInline=!1,this.isInput=this.element.is("input"),this.component=!!this.element.is(".date")&&this.element.find(".add-on, .input-group-addon, .btn"),this.hasInput=this.component&&this.element.find("input").length,this.component&&0===this.component.length&&(this.component=!1),this.picker=a(p.template),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("cfdatepicker-inline").appendTo(this.element):this.picker.addClass("cfdatepicker-dropdown dropdown-menu"),this.o.rtl&&this.picker.addClass("cfdatepicker-rtl"),this.viewMode=this.o.startView,this.o.calendarWeeks&&this.picker.find("tfoot th.today").attr("colspan",function(a,b){return parseInt(b)+1}),this._allow_update=!1,this.setStartDate(this._o.startDate),this.setEndDate(this._o.endDate),this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled),this.fillDow(),this.fillMonths(),this._allow_update=!0,this.update(),this.showMode(),this.isInline&&this.show()};j.prototype={constructor:j,_process_options:function(b){this._o=a.extend({},this._o,b);var c=this.o=a.extend({},this._o),d=c.language;switch(o[d]||(d=d.split("-")[0],o[d]||(d=m.language)),c.language=d,c.startView){case 2:case"decade":c.startView=2;break;case 1:case"year":c.startView=1;break;default:c.startView=0}switch(c.minViewMode){case 1:case"months":c.minViewMode=1;break;case 2:case"years":c.minViewMode=2;break;default:c.minViewMode=0}c.startView=Math.max(c.startView,c.minViewMode),!0!==c.multidate&&(c.multidate=Number(c.multidate)||!1,!1!==c.multidate?c.multidate=Math.max(0,c.multidate):c.multidate=1),c.multidateSeparator=String(c.multidateSeparator),c.weekStart%=7,c.weekEnd=(c.weekStart+6)%7;var e=p.parseFormat(c.format);c.startDate!==-1/0&&(c.startDate?c.startDate instanceof Date?c.startDate=this._local_to_utc(this._zero_time(c.startDate)):c.startDate=p.parseDate(c.startDate,e,c.language):c.startDate=-1/0),c.endDate!==1/0&&(c.endDate?c.endDate instanceof Date?c.endDate=this._local_to_utc(this._zero_time(c.endDate)):c.endDate=p.parseDate(c.endDate,e,c.language):c.endDate=1/0),c.daysOfWeekDisabled=c.daysOfWeekDisabled||[],a.isArray(c.daysOfWeekDisabled)||(c.daysOfWeekDisabled=c.daysOfWeekDisabled.split(/[,\s]*/)),c.daysOfWeekDisabled=a.map(c.daysOfWeekDisabled,function(a){return parseInt(a,10)});var f=String(c.orientation).toLowerCase().split(/\s+/g),g=c.orientation.toLowerCase();if(f=a.grep(f,function(a){return/^auto|left|right|top|bottom$/.test(a)}),c.orientation={x:"auto",y:"auto"},g&&"auto"!==g)if(1===f.length)switch(f[0]){case"top":case"bottom":c.orientation.y=f[0];break;case"left":case"right":c.orientation.x=f[0]}else g=a.grep(f,function(a){return/^left|right$/.test(a)}),c.orientation.x=g[0]||"auto",g=a.grep(f,function(a){return/^top|bottom$/.test(a)}),c.orientation.y=g[0]||"auto";else;},_events:[],_secondaryEvents:[],_applyEvents:function(a){for(var b,c,d,e=0;e<a.length;e++)b=a[e][0],2===a[e].length?(c=void 0,d=a[e][1]):3===a[e].length&&(c=a[e][1],d=a[e][2]),b.on(d,c)},_unapplyEvents:function(a){for(var b,c,d,e=0;e<a.length;e++)b=a[e][0],2===a[e].length?(d=void 0,c=a[e][1]):3===a[e].length&&(d=a[e][1],c=a[e][2]),b.off(c,d)},_buildEvents:function(){this.isInput?this._events=[[this.element,{focus:a.proxy(this.show,this),keyup:a.proxy(function(b){-1===a.inArray(b.keyCode,[27,37,39,38,40,32,13,9])&&this.update()},this),keydown:a.proxy(this.keydown,this)}]]:this.component&&this.hasInput?this._events=[[this.element.find("input"),{focus:a.proxy(this.show,this),keyup:a.proxy(function(b){-1===a.inArray(b.keyCode,[27,37,39,38,40,32,13,9])&&this.update()},this),keydown:a.proxy(this.keydown,this)}],[this.component,{click:a.proxy(this.show,this)}]]:this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:a.proxy(this.show,this)}]],this._events.push([this.element,"*",{blur:a.proxy(function(a){this._focused_from=a.target},this)}],[this.element,{blur:a.proxy(function(a){this._focused_from=a.target},this)}]),this._secondaryEvents=[[this.picker,{click:a.proxy(this.click,this)}],[a(window),{resize:a.proxy(this.place,this)}],[a(document),{"mousedown touchstart":a.proxy(function(a){this.element.is(a.target)||this.element.find(a.target).length||this.picker.is(a.target)||this.picker.find(a.target).length||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(b,c){var d=c||this.dates.get(-1),e=this._utc_to_local(d);this.element.trigger({type:b,date:e,dates:a.map(this.dates,this._utc_to_local),format:a.proxy(function(a,b){0===arguments.length?(a=this.dates.length-1,b=this.o.format):"string"==typeof a&&(b=a,a=this.dates.length-1),b=b||this.o.format;var c=this.dates.get(a);return p.formatDate(c,b,this.o.language)},this)})},show:function(){this.isInline||this.picker.appendTo("body"),this.picker.show(),this.place(),this._attachSecondaryEvents(),this._trigger("show")},hide:function(){this.isInline||this.picker.is(":visible")&&(this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.viewMode=this.o.startView,this.showMode(),this.o.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())&&this.setValue(),this._trigger("hide"))},remove:function(){this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().cfdatepicker,this.isInput||delete this.element.data().date},_utc_to_local:function(a){return a&&new Date(a.getTime()+6e4*a.getTimezoneOffset())},_local_to_utc:function(a){return a&&new Date(a.getTime()-6e4*a.getTimezoneOffset())},_zero_time:function(a){return a&&new Date(a.getFullYear(),a.getMonth(),a.getDate())},_zero_utc_time:function(a){return a&&new Date(Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()))},getDates:function(){return a.map(this.dates,this._utc_to_local)},getUTCDates:function(){return a.map(this.dates,function(a){return new Date(a)})},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){return new Date(this.dates.get(-1))},setDates:function(){var b=a.isArray(arguments[0])?arguments[0]:arguments;this.update.apply(this,b),this._trigger("changeDate"),this.setValue()},setUTCDates:function(){var b=a.isArray(arguments[0])?arguments[0]:arguments;this.update.apply(this,a.map(b,this._utc_to_local)),this._trigger("changeDate"),this.setValue()},setDate:e("setDates"),setUTCDate:e("setUTCDates"),setValue:function(){var a=this.getFormattedDate();this.isInput?this.element.val(a).change():this.component&&this.element.find("input").val(a).change()},getFormattedDate:function(b){void 0===b&&(b=this.o.format);var c=this.o.language;return a.map(this.dates,function(a){return p.formatDate(a,b,c)}).join(this.o.multidateSeparator)},setStartDate:function(a){this._process_options({startDate:a}),this.update(),this.updateNavArrows()},setEndDate:function(a){this._process_options({endDate:a}),this.update(),this.updateNavArrows()},setDaysOfWeekDisabled:function(a){this._process_options({daysOfWeekDisabled:a}),this.update(),this.updateNavArrows()},place:function(){if(!this.isInline){var b,c=this.picker.outerWidth(),d=this.picker.outerHeight(),e=h.width(),f=h.height(),g=h.scrollTop(),i=jQuery(this.element).data("form-id"),j=document.getElementById("modal-"+i+"-content");b=null!==j?1e4:parseInt(this.element.parents().filter(function(){return"auto"!==a(this).css("z-index")}).first().css("z-index"))+10;var k=this.component?this.component.parent().offset():this.element.offset(),l=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),m=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),n=k.left,o=k.top;this.picker.removeClass("cfdatepicker-orient-top cfdatepicker-orient-bottom cfdatepicker-orient-right cfdatepicker-orient-left"),"auto"!==this.o.orientation.x?(this.picker.addClass("cfdatepicker-orient-"+this.o.orientation.x),"right"===this.o.orientation.x&&(n-=c-m)):(this.picker.addClass("cfdatepicker-orient-left"),k.left<0?n-=k.left-10:k.left+c>e&&(n=e-c-10));var p,q,r=this.o.orientation.y;"auto"===r&&(p=-g+k.top-d,q=g+f-(k.top+l+d),r=Math.max(p,q)===q?"top":"bottom"),this.picker.addClass("cfdatepicker-orient-"+r),"top"===r?o+=l:o-=d+parseInt(this.picker.css("padding-top")),this.picker.css({top:o,left:n,zIndex:b})}},_allow_update:!0,update:function(){if(this._allow_update){var b=this.dates.copy(),c=[],d=!1;arguments.length?(a.each(arguments,a.proxy(function(a,b){b instanceof Date&&(b=this._local_to_utc(b)),c.push(b)},this)),d=!0):(c=this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val(),c=c&&this.o.multidate?c.split(this.o.multidateSeparator):[c],delete this.element.data().date),c=a.map(c,a.proxy(function(a){return p.parseDate(a,this.o.format,this.o.language)},this)),c=a.grep(c,a.proxy(function(a){return a<this.o.startDate||a>this.o.endDate||!a},this),!0),this.dates.replace(c),this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.viewDate>this.o.endDate&&(this.viewDate=new Date(this.o.endDate)),d?this.setValue():c.length&&String(b)!==String(this.dates)&&this._trigger("changeDate"),!this.dates.length&&b.length&&this._trigger("clearDate"),this.fill()}},fillDow:function(){var a=this.o.weekStart,b="<tr>";if(this.o.calendarWeeks){var c='<th class="cw">&nbsp;</th>';b+=c,this.picker.find(".cfdatepicker-days thead tr:first-child").prepend(c)}for(;a<this.o.weekStart+7;)b+='<th class="dow">'+o[this.o.language].daysMin[a++%7]+"</th>";b+="</tr>",this.picker.find(".cfdatepicker-days thead").append(b)},fillMonths:function(){for(var a="",b=0;b<12;)a+='<span class="month">'+o[this.o.language].monthsShort[b++]+"</span>";this.picker.find(".cfdatepicker-months td").html(a)},setRange:function(b){b&&b.length?this.range=a.map(b,function(a){return a.valueOf()}):delete this.range,this.fill()},getClassNames:function(b){var c=[],d=this.viewDate.getUTCFullYear(),e=this.viewDate.getUTCMonth(),f=new Date;return b.getUTCFullYear()<d||b.getUTCFullYear()===d&&b.getUTCMonth()<e?c.push("old"):(b.getUTCFullYear()>d||b.getUTCFullYear()===d&&b.getUTCMonth()>e)&&c.push("new"),this.focusDate&&b.valueOf()===this.focusDate.valueOf()&&c.push("focused"),this.o.todayHighlight&&b.getUTCFullYear()===f.getFullYear()&&b.getUTCMonth()===f.getMonth()&&b.getUTCDate()===f.getDate()&&c.push("today"),-1!==this.dates.contains(b)&&c.push("active"),(b.valueOf()<this.o.startDate||b.valueOf()>this.o.endDate||-1!==a.inArray(b.getUTCDay(),this.o.daysOfWeekDisabled))&&c.push("disabled"),this.range&&(b>this.range[0]&&b<this.range[this.range.length-1]&&c.push("range"),-1!==a.inArray(b.valueOf(),this.range)&&c.push("selected")),c},fill:function(){var b,d=new Date(this.viewDate),e=d.getUTCFullYear(),f=d.getUTCMonth(),g=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,h=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,i=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,j=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,k=o[this.o.language].today||o.en.today||"",l=o[this.o.language].clear||o.en.clear||"";this.picker.find(".cfdatepicker-days thead th.cfdatepicker-switch").text(o[this.o.language].months[f]+" "+e),this.picker.find("tfoot th.today").text(k).toggle(!1!==this.o.todayBtn),this.picker.find("tfoot th.clear").text(l).toggle(!1!==this.o.clearBtn),this.updateNavArrows(),this.fillMonths();var m=c(e,f-1,28),n=p.getDaysInMonth(m.getUTCFullYear(),m.getUTCMonth());m.setUTCDate(n),m.setUTCDate(n-(m.getUTCDay()-this.o.weekStart+7)%7);var q=new Date(m);q.setUTCDate(q.getUTCDate()+42),q=q.valueOf();for(var r,s=[];m.valueOf()<q;){if(m.getUTCDay()===this.o.weekStart&&(s.push("<tr>"),this.o.calendarWeeks)){var t=new Date(+m+(this.o.weekStart-m.getUTCDay()-7)%7*864e5),u=new Date(Number(t)+(11-t.getUTCDay())%7*864e5),v=new Date(Number(v=c(u.getUTCFullYear(),0,1))+(11-v.getUTCDay())%7*864e5),w=(u-v)/864e5/7+1;s.push('<td class="cw">'+w+"</td>")}if(r=this.getClassNames(m),r.push("day"),this.o.beforeShowDay!==a.noop){var x=this.o.beforeShowDay(this._utc_to_local(m));void 0===x?x={}:"boolean"==typeof x?x={enabled:x}:"string"==typeof x&&(x={classes:x}),!1===x.enabled&&r.push("disabled"),x.classes&&(r=r.concat(x.classes.split(/\s+/))),x.tooltip&&(b=x.tooltip)}r=a.unique(r),s.push('<td class="'+r.join(" ")+'"'+(b?' title="'+b+'"':"")+">"+m.getUTCDate()+"</td>"),m.getUTCDay()===this.o.weekEnd&&s.push("</tr>"),m.setUTCDate(m.getUTCDate()+1)}this.picker.find(".cfdatepicker-days tbody").empty().append(s.join(""));var y=this.picker.find(".cfdatepicker-months").find("th:eq(1)").text(e).end().find("span").removeClass("active");a.each(this.dates,function(a,b){b.getUTCFullYear()===e&&y.eq(b.getUTCMonth()).addClass("active")}),(e<g||e>i)&&y.addClass("disabled"),e===g&&y.slice(0,h).addClass("disabled"),e===i&&y.slice(j+1).addClass("disabled"),s="",e=10*parseInt(e/10,10);var z=this.picker.find(".cfdatepicker-years").find("th:eq(1)").text(e+"-"+(e+9)).end().find("td");e-=1;for(var A,B=a.map(this.dates,function(a){return a.getUTCFullYear()}),C=-1;C<11;C++)A=["year"],-1===C?A.push("old"):10===C&&A.push("new"),-1!==a.inArray(e,B)&&A.push("active"),(e<g||e>i)&&A.push("disabled"),s+='<span class="'+A.join(" ")+'">'+e+"</span>",e+=1;z.html(s)},updateNavArrows:function(){if(this._allow_update){var a=new Date(this.viewDate),b=a.getUTCFullYear(),c=a.getUTCMonth();switch(this.viewMode){case 0:this.o.startDate!==-1/0&&b<=this.o.startDate.getUTCFullYear()&&c<=this.o.startDate.getUTCMonth()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&b>=this.o.endDate.getUTCFullYear()&&c>=this.o.endDate.getUTCMonth()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 1:case 2:this.o.startDate!==-1/0&&b<=this.o.startDate.getUTCFullYear()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&b>=this.o.endDate.getUTCFullYear()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"})}}},click:function(b){b.preventDefault();var d,e,f,g=a(b.target).closest("span, td, th");if(1===g.length)switch(g[0].nodeName.toLowerCase()){case"th":switch(g[0].className){case"cfdatepicker-switch":this.showMode(1);break;case"prev":case"next":var h=p.modes[this.viewMode].navStep*("prev"===g[0].className?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,h),this._trigger("changeMonth",this.viewDate);break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,h),1===this.viewMode&&this._trigger("changeYear",this.viewDate)}this.fill();break;case"today":var i=new Date;i=c(i.getFullYear(),i.getMonth(),i.getDate(),0,0,0),this.showMode(-2);var j="linked"===this.o.todayBtn?null:"view";this._setDate(i,j);break;case"clear":var k;this.isInput?k=this.element:this.component&&(k=this.element.find("input")),k&&k.val("").change(),this.update(),this._trigger("changeDate"),this.o.autoclose&&this.hide()}break;case"span":g.is(".disabled")||(this.viewDate.setUTCDate(1),g.is(".month")?(f=1,e=g.parent().find("span").index(g),d=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(e),this._trigger("changeMonth",this.viewDate),1===this.o.minViewMode&&this._setDate(c(d,e,f))):(f=1,e=0,d=parseInt(g.text(),10)||0,this.viewDate.setUTCFullYear(d),this._trigger("changeYear",this.viewDate),2===this.o.minViewMode&&this._setDate(c(d,e,f))),this.showMode(-1),this.fill());break;case"td":g.is(".day")&&!g.is(".disabled")&&(f=parseInt(g.text(),10)||1,d=this.viewDate.getUTCFullYear(),e=this.viewDate.getUTCMonth(),g.is(".old")?0===e?(e=11,d-=1):e-=1:g.is(".new")&&(11===e?(e=0,d+=1):e+=1),this._setDate(c(d,e,f)))}this.picker.is(":visible")&&this._focused_from&&a(this._focused_from).focus(),delete this._focused_from},_toggle_multidate:function(a){var b=this.dates.contains(a);if(a?-1!==b?this.dates.remove(b):this.dates.push(a):this.dates.clear(),"number"==typeof this.o.multidate)for(;this.dates.length>this.o.multidate;)this.dates.remove(0)},_setDate:function(a,b){b&&"date"!==b||this._toggle_multidate(a&&new Date(a)),b&&"view"!==b||(this.viewDate=a&&new Date(a)),this.fill(),this.setValue(),this._trigger("changeDate");var c;this.isInput?c=this.element:this.component&&(c=this.element.find("input")),c&&c.change(),!this.o.autoclose||b&&"date"!==b||this.hide()},moveMonth:function(a,b){if(a){if(!b)return a;var c,d,e=new Date(a.valueOf()),f=e.getUTCDate(),g=e.getUTCMonth(),h=Math.abs(b);if(b=b>0?1:-1,1===h)d=-1===b?function(){return e.getUTCMonth()===g}:function(){return e.getUTCMonth()!==c},c=g+b,e.setUTCMonth(c),(c<0||c>11)&&(c=(c+12)%12);else{for(var i=0;i<h;i++)e=this.moveMonth(e,b);c=e.getUTCMonth(),e.setUTCDate(f),d=function(){return c!==e.getUTCMonth()}}for(;d();)e.setUTCDate(--f),e.setUTCMonth(c);return e}},moveYear:function(a,b){return this.moveMonth(a,12*b)},dateWithinRange:function(a){return a>=this.o.startDate&&a<=this.o.endDate},keydown:function(a){if(this.picker.is(":not(:visible)"))return void(27===a.keyCode&&this.show());var b,c,e,f=!1,g=this.focusDate||this.viewDate;switch(a.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),a.preventDefault();break;case 37:case 39:if(!this.o.keyboardNavigation)break;b=37===a.keyCode?-1:1,a.ctrlKey?(c=this.moveYear(this.dates.get(-1)||d(),b),e=this.moveYear(g,b),this._trigger("changeYear",this.viewDate)):a.shiftKey?(c=this.moveMonth(this.dates.get(-1)||d(),b),e=this.moveMonth(g,b),this._trigger("changeMonth",this.viewDate)):(c=new Date(this.dates.get(-1)||d()),c.setUTCDate(c.getUTCDate()+b),e=new Date(g),e.setUTCDate(g.getUTCDate()+b)),this.dateWithinRange(c)&&(this.focusDate=this.viewDate=e,this.setValue(),this.fill(),a.preventDefault());break;case 38:case 40:if(!this.o.keyboardNavigation)break;b=38===a.keyCode?-1:1,a.ctrlKey?(c=this.moveYear(this.dates.get(-1)||d(),b),e=this.moveYear(g,b),this._trigger("changeYear",this.viewDate)):a.shiftKey?(c=this.moveMonth(this.dates.get(-1)||d(),b),e=this.moveMonth(g,b),this._trigger("changeMonth",this.viewDate)):(c=new Date(this.dates.get(-1)||d()),c.setUTCDate(c.getUTCDate()+7*b),e=new Date(g),e.setUTCDate(g.getUTCDate()+7*b)),this.dateWithinRange(c)&&(this.focusDate=this.viewDate=e,this.setValue(),this.fill(),a.preventDefault());break;case 32:break;case 13:g=this.focusDate||this.dates.get(-1)||this.viewDate,this._toggle_multidate(g),f=!0,this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(a.preventDefault(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}if(f){this.dates.length?this._trigger("changeDate"):this._trigger("clearDate");var h;this.isInput?h=this.element:this.component&&(h=this.element.find("input")),h&&h.change()}},showMode:function(a){a&&(this.viewMode=Math.max(this.o.minViewMode,Math.min(2,this.viewMode+a))),this.picker.find(">div").hide().filter(".cfdatepicker-"+p.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()}};var k=function(b,c){this.element=a(b),this.inputs=a.map(c.inputs,function(a){return a.jquery?a[0]:a}),delete c.inputs,a(this.inputs).cfdatepicker(c).bind("changeDate",a.proxy(this.dateUpdated,this)),this.pickers=a.map(this.inputs,function(b){return a(b).data("cfdatepicker")}),this.updateDates()};k.prototype={updateDates:function(){this.dates=a.map(this.pickers,function(a){return a.getUTCDate()}),this.updateRanges()},updateRanges:function(){var b=a.map(this.dates,function(a){return a.valueOf()});a.each(this.pickers,function(a,c){c.setRange(b)})},dateUpdated:function(b){if(!this.updating){this.updating=!0;var c=a(b.target).data("cfdatepicker"),d=c.getUTCDate(),e=a.inArray(b.target,this.inputs),f=this.inputs.length;if(-1!==e){if(a.each(this.pickers,function(a,b){b.getUTCDate()||b.setUTCDate(d)}),d<this.dates[e])for(;e>=0&&d<this.dates[e];)this.pickers[e--].setUTCDate(d);else if(d>this.dates[e])for(;e<f&&d>this.dates[e];)this.pickers[e++].setUTCDate(d);this.updateDates(),delete this.updating}}},remove:function(){a.map(this.pickers,function(a){a.remove()}),delete this.element.data().cfdatepicker}};var l=a.fn.cfdatepicker;a.fn.cfdatepicker=function(b){var c=Array.apply(null,arguments);c.shift();var d;return this.each(function(){var e=a(this),h=e.data("cfdatepicker"),i="object"==typeof b&&b;if(!h){var l=f(this,"date"),n=a.extend({},m,l,i),o=g(n.language),p=a.extend({},m,o,l,i);if(e.is(".input-daterange")||p.inputs){var q={inputs:p.inputs||e.find("input").toArray()};e.data("cfdatepicker",h=new k(this,a.extend(p,q)))}else e.data("cfdatepicker",h=new j(this,p))}if("string"==typeof b&&"function"==typeof h[b]&&void 0!==(d=h[b].apply(h,c)))return!1}),void 0!==d?d:this};var m=a.fn.cfdatepicker.defaults={autoclose:!1,beforeShowDay:a.noop,calendarWeeks:!1,clearBtn:!1,daysOfWeekDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",keyboardNavigation:!0,language:"en",minViewMode:0,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-1/0,startView:0,todayBtn:!1,todayHighlight:!1,weekStart:0
5
- },n=a.fn.cfdatepicker.locale_opts=["format","rtl","weekStart"];a.fn.cfdatepicker.Constructor=j;var o=a.fn.cfdatepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear"}},p={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(a){return a%4==0&&a%100!=0||a%400==0},getDaysInMonth:function(a,b){return[31,p.isLeapYear(a)?29:28,31,30,31,30,31,31,30,31,30,31][b]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(a){var b=a.replace(this.validParts,"\0").split("\0"),c=a.match(this.validParts);if(!b||!b.length||!c||0===c.length)throw new Error("Invalid date format.");return{separators:b,parts:c}},parseDate:function(b,d,e){function f(){var a=this.slice(0,l[i].length);return a===l[i].slice(0,a.length)}if(b){if(b instanceof Date)return b;"string"==typeof d&&(d=p.parseFormat(d));var g,h,i,k=/([\-+]\d+)([dmwy])/,l=b.match(/([\-+]\d+)([dmwy])/g);if(/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(b)){for(b=new Date,i=0;i<l.length;i++)switch(g=k.exec(l[i]),h=parseInt(g[1]),g[2]){case"d":b.setUTCDate(b.getUTCDate()+h);break;case"m":b=j.prototype.moveMonth.call(j.prototype,b,h);break;case"w":b.setUTCDate(b.getUTCDate()+7*h);break;case"y":b=j.prototype.moveYear.call(j.prototype,b,h)}return c(b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate(),0,0,0)}l=b&&b.match(this.nonpunctuation)||[],b=new Date;var m,n,q={},r=["yyyy","yy","M","MM","m","mm","d","dd"],s={yyyy:function(a,b){return a.setUTCFullYear(b)},yy:function(a,b){return a.setUTCFullYear(2e3+b)},m:function(a,b){if(isNaN(a))return a;for(b-=1;b<0;)b+=12;for(b%=12,a.setUTCMonth(b);a.getUTCMonth()!==b;)a.setUTCDate(a.getUTCDate()-1);return a},d:function(a,b){return a.setUTCDate(b)}};s.M=s.MM=s.mm=s.m,s.dd=s.d,b=c(b.getFullYear(),b.getMonth(),b.getDate(),0,0,0);var t=d.parts.slice();if(l.length!==t.length&&(t=a(t).filter(function(b,c){return-1!==a.inArray(c,r)}).toArray()),l.length===t.length){var u;for(i=0,u=t.length;i<u;i++){if(m=parseInt(l[i],10),g=t[i],isNaN(m))switch(g){case"MM":n=a(o[e].months).filter(f),m=a.inArray(n[0],o[e].months)+1;break;case"M":n=a(o[e].monthsShort).filter(f),m=a.inArray(n[0],o[e].monthsShort)+1}q[g]=m}var v,w;for(i=0;i<r.length;i++)(w=r[i])in q&&!isNaN(q[w])&&(v=new Date(b),s[w](v,q[w]),isNaN(v)||(b=v))}return b}},formatDate:function(b,c,d){if(!b)return"";"string"==typeof c&&(c=p.parseFormat(c));var e={d:b.getUTCDate(),D:o[d].daysShort[b.getUTCDay()],DD:o[d].days[b.getUTCDay()],m:b.getUTCMonth()+1,M:o[d].monthsShort[b.getUTCMonth()],MM:o[d].months[b.getUTCMonth()],yy:b.getUTCFullYear().toString().substring(2),yyyy:b.getUTCFullYear()};e.dd=(e.d<10?"0":"")+e.d,e.mm=(e.m<10?"0":"")+e.m,b=[];for(var f=a.extend([],c.separators),g=0,h=c.parts.length;g<=h;g++)f.length&&b.push(f.shift()),b.push(e[c.parts[g]]);return b.join("")},headTemplate:'<thead><tr><th class="prev">&laquo;</th><th colspan="5" class="cfdatepicker-switch"></th><th class="next">&raquo;</th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>'};p.template='<div class="cfdatepicker"><div class="cfdatepicker-days"><table class=" table-condensed">'+p.headTemplate+"<tbody></tbody>"+p.footTemplate+'</table></div><div class="cfdatepicker-months"><table class="table-condensed">'+p.headTemplate+p.contTemplate+p.footTemplate+'</table></div><div class="cfdatepicker-years"><table class="table-condensed">'+p.headTemplate+p.contTemplate+p.footTemplate+"</table></div></div>",a.fn.cfdatepicker.DPGlobal=p,a.fn.cfdatepicker.noConflict=function(){return a.fn.cfdatepicker=l,this},a(document).on("focus.cfdatepicker.data-api click.cfdatepicker.data-api",'[data-provide="cfdatepicker"]',function(b){var c=a(this);c.data("cfdatepicker")||(b.preventDefault(),c.cfdatepicker("show").on("show",function(){a(this).trigger("blur")}).on("hide",function(){a(this).attr("disabled",!1)}))})}(window.jQuery),jQuery(document).ready(function(a){jQuery(document).on("cf.add",function(){a("[data-inputmask]").inputmask()}),jQuery(document).trigger("cf.add")}),function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){function b(a,b){var c=Array.prototype.slice.call(arguments,2);return setTimeout(function(){return a.apply(null,c)},b)}function c(a,b){return b=b||100,function(){if(!a.debouncing){var c=Array.prototype.slice.apply(arguments);a.lastReturnVal=a.apply(window,c),a.debouncing=!0}return clearTimeout(a.debounceTimeout),a.debounceTimeout=setTimeout(function(){a.debouncing=!1},b),a.lastReturnVal}}function d(d,f){if(this.$window=a(window),this.$document=a(document),this.$element=a(d),this.options=a.extend({},h,f),this._defaults=h,this._name=e,this.startEvent=this.options.startEvent.join("."+e+" ")+"."+e,this.moveEvent=this.options.moveEvent.join("."+e+" ")+"."+e,this.endEvent=this.options.endEvent.join("."+e+" ")+"."+e,this.polyfill=this.options.polyfill,this.onInit=this.options.onInit,this.onSlide=this.options.onSlide,this.onSlideEnd=this.options.onSlideEnd,this.polyfill&&g)return!1;this.identifier="js-"+e+"-"+ +new Date,this.min=parseFloat(this.$element[0].getAttribute("min")||0),this.max=parseFloat(this.$element[0].getAttribute("max")||100),this.value=parseFloat(this.$element[0].value||this.min+(this.max-this.min)/2),this.step=parseFloat(this.$element[0].getAttribute("step")||1),this.$fill=a('<div class="'+this.options.fillClass+'" />'),this.$handle=a('<div class="'+this.options.handleClass+'" />'),this.$range=a('<div class="'+this.options.rangeClass+'" id="'+this.identifier+'" />').insertAfter(this.$element).prepend(this.$fill,this.$handle),this.$element.css({position:"absolute",width:"1px",height:"1px",overflow:"hidden",opacity:"0"}),this.handleDown=a.proxy(this.handleDown,this),this.handleMove=a.proxy(this.handleMove,this),this.handleEnd=a.proxy(this.handleEnd,this),this.init();var i=this;this.$window.on("resize."+e,c(function(){b(function(){i.update()},300)},20)),this.$document.on(this.startEvent,"#"+this.identifier+":not(."+this.options.disabledClass+")",this.handleDown),this.$element.on("change."+e,function(a,b){if(!b||b.origin!==e){var c=a.target.value,d=i.getPositionFromValue(c);i.setPosition(d)}})}var e="rangeslider",f=[],g=function(){var a=document.createElement("input");return a.setAttribute("type","range"),"text"!==a.type}(),h={polyfill:!0,rangeClass:"rangeslider",disabledClass:"rangeslider--disabled",fillClass:"rangeslider__fill",handleClass:"rangeslider__handle",startEvent:["mousedown","touchstart","pointerdown"],moveEvent:["mousemove","touchmove","pointermove"],endEvent:["mouseup","touchend","pointerup"]};d.prototype.init=function(){this.onInit&&"function"==typeof this.onInit&&this.onInit(),this.update()},d.prototype.update=function(){this.handleWidth=this.$handle[0].offsetWidth,this.rangeWidth=this.$range[0].offsetWidth,this.maxHandleX=this.rangeWidth-this.handleWidth,this.grabX=this.handleWidth/2,this.position=this.getPositionFromValue(this.value),this.$element[0].disabled?this.$range.addClass(this.options.disabledClass):this.$range.removeClass(this.options.disabledClass),this.setPosition(this.position)},d.prototype.handleDown=function(a){if(a.preventDefault(),this.$document.on(this.moveEvent,this.handleMove),this.$document.on(this.endEvent,this.handleEnd),!((" "+a.target.className+" ").replace(/[\n\t]/g," ").indexOf(this.options.handleClass)>-1)){var b=this.getRelativePosition(this.$range[0],a),c=this.getPositionFromNode(this.$handle[0])-this.getPositionFromNode(this.$range[0]);this.setPosition(b-this.grabX),b>=c&&b<c+this.handleWidth&&(this.grabX=b-c)}},d.prototype.handleMove=function(a){a.preventDefault();var b=this.getRelativePosition(this.$range[0],a);this.setPosition(b-this.grabX)},d.prototype.handleEnd=function(a){a.preventDefault(),this.$document.off(this.moveEvent,this.handleMove),this.$document.off(this.endEvent,this.handleEnd);var b=this.getRelativePosition(this.$range[0],a);this.onSlideEnd&&"function"==typeof this.onSlideEnd&&this.onSlideEnd(b-this.grabX,this.value)},d.prototype.cap=function(a,b,c){return a<b?b:a>c?c:a},d.prototype.setPosition=function(a){var b,c;b=this.getValueFromPosition(this.cap(a,0,this.maxHandleX))/this.step*this.step,c=this.getPositionFromValue(b),this.$fill[0].style.width=c+this.grabX+"px",this.$handle[0].style.left=c+"px",this.setValue(b),this.position=c,this.value=b,this.onSlide&&"function"==typeof this.onSlide&&this.onSlide(c,b)},d.prototype.getPositionFromNode=function(a){for(var b=0;null!==a;)b+=a.offsetLeft,a=a.offsetParent;return b},d.prototype.getRelativePosition=function(a,b){return(b.pageX||b.originalEvent.clientX||b.originalEvent.touches[0].clientX||b.currentPoint.x)-this.getPositionFromNode(a)},d.prototype.getPositionFromValue=function(a){var b;return b=(a-this.min)/(this.max-this.min),b*this.maxHandleX},d.prototype.getValueFromPosition=function(a){var b,c;return b=a/(this.maxHandleX||1),c=this.step*Math.ceil((b*(this.max-this.min)+this.min)/this.step),Number(c.toFixed(2))},d.prototype.setValue=function(a){a!==this.value&&this.$element.val(a).trigger("change",{origin:e})},d.prototype.destroy=function(){this.$document.off(this.startEvent,"#"+this.identifier,this.handleDown),this.$element.off("."+e).removeAttr("style").removeData("plugin_"+e),this.$range&&this.$range.length&&this.$range[0].parentNode.removeChild(this.$range[0]),f.splice(f.indexOf(this.$element[0]),1),f.length||this.$window.off("."+e)},a.fn[e]=function(b){return this.each(function(){var c=a(this),g=c.data("plugin_"+e);g||(c.data("plugin_"+e,g=new d(this,b)),f.push(this)),"string"==typeof b&&g[b]()})}}),function(a){"use strict";var b={init:function(c){return this.each(function(){this.self=a(this),b.destroy.call(this.self),this.opt=a.extend(!0,{},a.fn.raty.defaults,c),b._adjustCallback.call(this),b._adjustNumber.call(this),"img"!==this.opt.starType&&b._adjustStarType.call(this),b._adjustPath.call(this),b._createStars.call(this),this.opt.cancel&&b._createCancel.call(this),this.opt.precision&&b._adjustPrecision.call(this),b._createScore.call(this),b._apply.call(this,this.opt.score),b._target.call(this,this.opt.score),this.opt.readOnly?b._lock.call(this):(this.style.cursor="pointer",b._binds.call(this)),this.self.data("options",this.opt)})},_adjustCallback:function(){for(var a=["number","readOnly","score","scoreName"],b=0;b<a.length;b++)"function"==typeof this.opt[a[b]]&&(this.opt[a[b]]=this.opt[a[b]].call(this))},_adjustNumber:function(){this.opt.number=b._between(this.opt.number,1,this.opt.numberMax)},_adjustPath:function(){this.opt.path=this.opt.path||"",this.opt.path&&"/"!==this.opt.path.charAt(this.opt.path.length-1)&&(this.opt.path+="/")},_adjustPrecision:function(){this.opt.half=!0,this.opt.targetType="score"},_adjustStarType:function(){this.opt.path="";for(var a=["cancelOff","cancelOn","starHalf","starOff","starOn"],b=0;b<a.length;b++)this.opt[a[b]]=this.opt[a[b]].replace(".","-")},_apply:function(a){b._fill.call(this,a),a&&(a>0&&this.score.val(b._between(a,0,this.opt.number)),b._roundStars.call(this,a))},_between:function(a,b,c){return Math.min(Math.max(parseFloat(a),b),c)},_binds:function(){this.cancel&&(b._bindOverCancel.call(this),b._bindClickCancel.call(this),b._bindOutCancel.call(this)),b._bindOver.call(this),b._bindClick.call(this),b._bindOut.call(this)},_bindClick:function(){var b=this;b.stars.on("click.raty",function(c){var d=a(this);b.score.val(b.opt.half||b.opt.precision?b.self.data("score"):this.alt||d.data("alt")),b.opt.click&&b.opt.click.call(b,+b.score.val(),c)})},_bindClickCancel:function(){var a=this;a.cancel.on("click.raty",function(b){a.score.removeAttr("value"),a.opt.click&&a.opt.click.call(a,null,b)})},_bindOut:function(){var a=this;a.self.on("mouseleave.raty",function(c){var d=+a.score.val()||void 0;b._apply.call(a,d),b._target.call(a,d,c),a.opt.mouseout&&a.opt.mouseout.call(a,d,c)})},_bindOutCancel:function(){var b=this;b.cancel.on("mouseleave.raty",function(c){var d=a(this),e=b.opt.path+b.opt.cancelOff;if("img"===b.opt.starType)d.attr("src",e);else{var f=b.opt.path+b.opt.cancelOn;d.removeClass(f).addClass(e)}if(b.opt.mouseout){var g=+b.score.val()||void 0;b.opt.mouseout.call(b,g,c)}})},_bindOver:function(){var a=this,c=a.opt.half?"mousemove.raty":"mouseover.raty";a.stars.on(c,function(c){var d=b._getScoreByPosition.call(a,c,this);b._fill.call(a,d),a.opt.half&&(b._roundStars.call(a,d),a.self.data("score",d)),b._target.call(a,d,c),a.opt.mouseover&&a.opt.mouseover.call(a,d,c)})},_bindOverCancel:function(){var c=this;c.cancel.on("mouseover.raty",function(d){var e=c.opt.path+c.opt.cancelOn,f=a(this),g=c.opt.path+c.opt.starOff;if("img"===c.opt.starType)f.attr("src",e),c.stars.attr("src",g);else{c.stars.attr("class",g);var h=c.opt.path+c.opt.cancelOff;f.removeClass(h).addClass(e).css("color",c.opt.starColor)}b._target.call(c,null,d),c.opt.mouseover&&c.opt.mouseover.call(c,null)})},_buildScoreField:function(){return a("<input />",{name:this.opt.scoreName,type:"hidden"}).appendTo(this)},_createCancel:function(){var b=this.opt.path+this.opt.cancelOff,c=a("<"+this.opt.starType+" />",{title:this.opt.cancelHint,class:"raty-cancel"}).css("marginRight",this.opt.space?this.opt.spaceWidth+"px":"0");"img"===this.opt.starType?c.attr({src:b,alt:"x"}):c.attr("data-alt","x").addClass(b),"left"===this.opt.cancelPlace?this.self.prepend("&#160;").prepend(c):this.self.append("&#160;").append(c),this.cancel=c},_createScore:function(){var c=a(this.opt.targetScore);this.score=c.length?c:b._buildScoreField.call(this)},_createStars:function(){for(var c=1;c<=this.opt.number;c++){var d,e=this.opt.score&&this.opt.score>=c?"starOn":"starOff",f=b._getHint.call(this,c);e=this.opt.path+this.opt[e],d="img"!==this.opt.starType?{"data-alt":c,class:e}:{src:e,alt:c},d.title=f,a("<"+this.opt.starType+" />",d).css("marginRight",c<this.opt.number&&this.opt.space?this.opt.spaceWidth+"px":"0").appendTo(this),this.opt.space}this.stars=this.self.children(this.opt.starType)},_error:function(b){a(this).text(b),a.error(b)},_fill:function(a){for(var c=0,d=1;d<=this.stars.length;d++){var e,f=this.stars.eq(d-1),g=b._turnOn.call(this,d,a);if(this.opt.iconRange&&this.opt.iconRange.length>c){var h=this.opt.iconRange[c];e=b._getIconRange.call(this,h,g),d<=h.range&&("img"===this.opt.starType?f.attr("src",e):f.attr("class",e)),d===h.range&&c++}else e=this.opt.path+this.opt[g?"starOn":"starOff"],"img"===this.opt.starType?f.attr("src",e):f.attr("class",e),g?f.css("color",this.opt.starColor):f.css("color","")}},_getIconRange:function(a,b){return this.opt.path+(b?a.on||this.opt.starOn:a.off||this.opt.starOff)},_getScoreByPosition:function(c,d){var e=a(d),f=parseInt(d.alt||e.data("alt"),10);if(this.opt.half){var g=b._getSize.call(this),h=parseFloat((c.pageX-e.offset().left)/g);f=this.opt.precision?f-1+h:f-1+(h>.5?1:.5)}return f},_getSize:function(){var a;return a="img"===this.opt.starType?this.stars[0].width:parseFloat(this.stars.eq(0).css("font-size")),a||b._error.call(this,"Could not be possible get the icon size!"),a},_turnOn:function(a,b){return this.opt.single?a===b:a<=b},_getHint:function(a){var b=this.opt.hints[a-1];return""===b?"":b||a},_lock:function(){var a=parseInt(this.score.val(),10),c=a?b._getHint.call(this,a):this.opt.noRatedMsg;this.style.cursor="",this.title=c,this.score.prop("readonly",!0),this.stars.prop("title",c),this.cancel&&this.cancel.hide(),this.self.data("readonly",!0)},_roundStars:function(a){var b=(a%1).toFixed(2);if(b>this.opt.round.down){var c="starOn";this.opt.halfShow&&b<this.opt.round.up?c="starHalf":b<this.opt.round.full&&(c="starOff");var d=this.stars[Math.ceil(a)-1];"img"===this.opt.starType?d.src=this.opt.path+this.opt[c]:d.style.className=this.opt[c]}},_target:function(c,d){if(this.opt.target){var e=a(this.opt.target);e.length||b._error.call(this,"Target selector invalid or missing!");var f=d&&"mouseover"===d.type;if(void 0===c)c=this.opt.targetText;else if(null===c)c=f?this.opt.cancelHint:this.opt.targetText;else{"hint"===this.opt.targetType?c=b._getHint.call(this,Math.ceil(c)):this.opt.precision&&(c=parseFloat(c).toFixed(1));var g=d&&"mousemove"===d.type;f||g||this.opt.targetKeep||(c=this.opt.targetText)}c&&(c=this.opt.targetFormat.toString().replace("{score}",c)),e.is(":input")?e.val(c):e.html(c)}},_unlock:function(){this.style.cursor="pointer",this.removeAttribute("title"),this.score.removeAttr("readonly"),this.self.data("readonly",!1);for(var a=0;a<this.opt.number;a++)this.stars[a].title=b._getHint.call(this,a+1);this.cancel&&this.cancel.css("display","")},cancel:function(c){return this.each(function(){var d=a(this);!0!==d.data("readonly")&&(b[c?"click":"score"].call(d,null),this.score.removeAttr("value"))})},click:function(c){return this.each(function(){!0!==a(this).data("readonly")&&(b._apply.call(this,c),this.opt.click&&this.opt.click.call(this,c,a.Event("click")),b._target.call(this,c))})},destroy:function(){return this.each(function(){var b=a(this),c=b.data("raw");c?b.off(".raty").empty().css({cursor:c.style.cursor}).removeData("readonly"):b.data("raw",b.clone()[0])})},getScore:function(){var a,b=[];return this.each(function(){a=this.score.val(),b.push(a?+a:void 0)}),b.length>1?b:b[0]},move:function(c){return this.each(function(){var d=parseInt(c,10),e=a(this).data("options"),f=(+c).toFixed(1).split(".")[1];d>=e.number&&(d=e.number-1,f=10);var g=b._getSize.call(this),h=g/10,i=a(this.stars[d]),j=i.offset().left+h*parseInt(f,10),k=a.Event("mousemove",{pageX:j});i.trigger(k)})},readOnly:function(c){return this.each(function(){var d=a(this);d.data("readonly")!==c&&(c?(d.off(".raty").children("img").off(".raty"),b._lock.call(this)):(b._binds.call(this),b._unlock.call(this)),d.data("readonly",c))})},reload:function(){return b.set.call(this,{})},score:function(){var c=a(this);return arguments.length?b.setScore.apply(c,arguments):b.getScore.call(c)},set:function(b){return this.each(function(){var c=a(this),d=c.data("options"),e=a.extend({},d,b);c.raty(e)})},setScore:function(c){return this.each(function(){!0!==a(this).data("readonly")&&(b._apply.call(this,c),b._target.call(this,c))})}};a.fn.raty=function(c){return b[c]?b[c].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof c&&c?void a.error("Method "+c+" does not exist!"):b.init.apply(this,arguments)},a.fn.raty.defaults={cancel:!1,cancelHint:"Cancel this rating!",cancelOff:"raty-cancel-off",cancelOn:"raty-cancel-on",cancelPlace:"left",click:void 0,half:!1,halfShow:!0,hints:["1"],iconRange:void 0,mouseout:void 0,mouseover:void 0,noRatedMsg:"Not rated yet!",number:5,numberMax:20,path:void 0,precision:!1,readOnly:!1,round:{down:.25,full:.6,up:.76},score:void 0,scoreName:"score",single:!1,space:!0,spaceWidth:3,starColor:"#ff00aa",starHalf:"star-half.png",starOff:"raty-dot-off",starOn:"raty-dot-on",starType:"img",target:void 0,targetFormat:"{score}",targetKeep:!1,targetScore:void 0,targetText:"",targetType:"hint"}}(jQuery),jQuery(function(a){a("body").on("click",".cf-toggle-group-buttons a",function(){var b=a(this),c=b.closest(".caldera-config-field"),d=c.find('[data-ref="'+b.attr("id")+'"]');c.find(".btn").removeClass(b.data("active")).addClass(b.data("default")),b.addClass(b.data("active")).removeClass(b.data("default")),d.prop("checked",!0).trigger("change")})});var cf_jsfields_init,cf_presubmit;!function(a){cf_validate_form=function(b){return b.parsley({errorsWrapper:'<span class="help-block caldera_ajax_error_block"></span>',errorTemplate:"<span></span>",errorsContainer:function(a){return a.$element.closest(".form-group")}}).on("field:error",function(c){if("number"==this.$element.attr("type")&&0==this.$element.attr("min")){var d=this.$element.val();return void(0<=d&&(void 0==this.$element.attr("max")||d<=this.$element.attr("max"))&&(c.validationResult=!0))}this.$element.closest(".form-group").addClass("has-error"),a(document).trigger("cf.validate.fieldError",{inst:c,form:b,el:this.$element})}).on("field:success",function(c){if("star"===this.$element.data("type")&&this.$element.prop("required")&&0==this.$element.val())return void(c.validationResult=!1);this.$element.closest(".form-group").removeClass("has-error"),a(document).trigger("cf.validate.fieldSuccess",{inst:c,form:b,el:this.$element})}).on("form:success",function(c){a(document).trigger("cf.validate.FormSuccess",{inst:c,form:b,el:this.$element})}).on("form:error",function(c){a(document).trigger("cf.validate.FormError",{inst:c,form:b,el:this.$element})})},a(document).on("change keypress","[data-sync]",function(){a(this).data("unsync",!0)}),cf_jsfields_init=function(){a(".init_field_type[data-type]").each(function(b,c){var d=a(c);"function"==typeof window[d.data("type")+"_init"]&&window[d.data("type")+"_init"](d.prop("id"),d[0])}),window.Parsley.on("field:validated",function(){setTimeout(function(){a(document).trigger("cf.error")},15)}),"undefined"==typeof resBaldrickTriggers&&a(".caldera_forms_form").length,a(document).trigger("cf.fieldsInit")},a("document").ready(function(){cf_jsfields_init()}),a(".caldera-form-page").length&&a(".caldera-form-page").on("keypress","[data-field]:not(textarea)",function(a){13===a.keyCode&&a.preventDefault()}),a(document).on("click",".cf_modal_button",function(b){b.preventDefault();var c=a(this);a(c.attr("href")).show()}),a(document).on("click",".caldera-front-modal-closer",function(b){b.preventDefault(),a(this).closest(".caldera-front-modal-container").hide()}),a(document).on("cf.add cf.enable cf.disable cf.pagenav",cf_jsfields_init),a(document).on("click","[data-page]",function(b){var c,d,e,f=a(this),g=f.closest(".caldera-form-page"),h=f.closest("form.caldera_forms_form"),i=(h.attr("id"),h.data("instance")),j=h.find(".caldera-form-page:visible").data("formpage"),k=g.data("formpage")?g.data("formpage"):f.data("page"),l=a('.breadcrumb[data-form="caldera_form_'+i+'"]'),m=!0,n=j;if(h.length){if(cf_validate_form(h).destroy(),e=h.find("[data-field]"),h.find(".has-error").removeClass("has-error"),"prev"!==f.data("page")&&k>=j){e=a("#caldera_form_"+i+' [data-formpage="'+j+'"] [data-field]');for(var o,p,q,r=0;r<e.length;r++)o=a(e[r]),o.hasClass("cf-multi-uploader")||o.hasClass("cf-multi-uploader-list")||(q=o.parsley().validate(),((p=o.parsley().isValid({force:!0}))||!0!==q||"email"!==o.attr("type"))&&!0!==p&&(b.preventDefault(),m=!1));if(!0===m&&k>j)for(var s=k-1;s>=1;s--){e=a("#caldera_form_"+i+' [data-formpage="'+s+'"] [data-field]');for(var r=0;r<e.length;r++)o=a(e[r]),o.parsley().validate(),!0!==(p=o.parsley().isValid({force:!0}))&&(b.preventDefault(),m=!1,s>n&&(n=s))}}if(!1===m)return n!==j&&(a("#form_page_"+i+"_pg_"+j).hide().attr("aria-hidden","true").css("visibility","hidden"),a("#form_page_"+i+"_pg_"+n).show().attr("aria-hidden","false").css("visibility","visible")),cf_validate_form(h).validate(),!1;"next"===f.data("page")?(l&&l.find("li.active").removeClass("active").children().attr("aria-expanded","false"),c=h.find('.caldera-form-page[data-formpage="'+(k+1)+'"]'),c.length&&(g.hide().attr("aria-hidden","true").css("visibility","hidden"),c.show().attr("aria-hidden","false").css("visibility","visible"),l&&l.find('a[data-page="'+(k+1)+'"]').attr("aria-expanded","true").parent().addClass("active"))):"prev"===f.data("page")?(l&&l.find("li.active").removeClass("active").children().attr("aria-expanded","false"),d=h.find('.caldera-form-page[data-formpage="'+(k-1)+'"]'),d.length&&(g.hide().attr("aria-hidden","true").css("visibility","hidden"),d.show().attr("aria-hidden","false").css("visibility","visible"),l&&l.find('a[data-page="'+(k-1)+'"]').attr("aria-expanded","true").parent().addClass("active"))):f.data("pagenav")&&(b.preventDefault(),f.closest(".breadcrumb").find("li.active").removeClass("active").children().attr("aria-expanded","false"),a("#"+f.data("pagenav")+" .caldera-form-page").hide().attr("aria-hidden","true").css("visibility","hidden"),a("#"+f.data("pagenav")+'\t.caldera-form-page[data-formpage="'+f.data("page")+'"]').show().attr("aria-hidden","false").css("visibility","visible"),f.parent().addClass("active").children().attr("aria-expanded","true")),a("html, body").animate({scrollTop:h.offset().top-100},200),a(document).trigger("cf.pagenav")}});var b;a(".caldera-grid .breadcrumb").each(function(c,d){a(d).find("a[data-pagenav]").each(function(c,d){var e=a(d),f=e.data("pagenav");a("#"+f+' .caldera-form-page[data-formpage="'+e.data("page")+'"]').find(".has-error").length&&(e.parent().addClass("error"),void 0===b&&(e.trigger("click"),b=!0))})}),a(document).on("click",'form.caldera_forms_form [type="submit"]',function(b){var c=a(this),d=c.closest(".caldera_forms_form"),e=cf_validate_form(d);if(a(document).trigger("cf.form.submit",{e:b,$form:d}),e.validate())a(document).trigger("cf.form.validated",{e:b,$form:d}),e.destroy();else{if(a(".caldera-form-page").length){var f=c.parents(".caldera-form-page").data("formpage"),g=[],h=[];if(e.fields.forEach(function(a,b){if(!0!==a.validationResult){var c=a.$element.parents(".caldera-form-page");if(void 0!=c&&c.length&&a.$element.parents(".caldera-form-page").data("formpage")>f)return void h.push(a.$element.data("field"));g.push(a)}}),!g.length)return h.length&&d.append('<input type="hidden" name="_cf_future" value="'+h.toString()+'">'),void e.destroy()}b.preventDefault()}}),a(document).on("cf.form.submit",function(a,b){b.$form.find(".breadcrumb").hide().attr("aria-hidden",!0).css("visibility","hidden")})}(jQuery),window.addEventListener("load",function(){!function(a){"use strict";if(window.CALDERA_FORMS={},"object"==typeof CF_API_DATA){var b,c,d={};a(".caldera_forms_form").each(function(e,f){b=a(f),c=b.data("form-id"),d[c]=new CalderaFormsResetNonce(c,CF_API_DATA,a),d[c].init()})}if("object"==typeof CFFIELD_CONFIG){var e,f,g,h,b,i,j,k,l=!1,m=!1;a(".caldera_forms_form").each(function(d,n){if(b=a(n),e=b.attr("id"),h=b.data("instance"),"object"==typeof CFFIELD_CONFIG[h]){k=a(document.getElementById(e)),m||(i=new CalderaFormsCrossOriginWarning(b,a,CFFIELD_CONFIG[h].error_strings),i.maybeWarn(),m=!0),!l&&CFFIELD_CONFIG[h].error_strings.hasOwnProperty("jquery_old")&&(j=new CalderaFormsJQueryWarning(b,a,CFFIELD_CONFIG[h].error_strings),j.maybeWarn(),l=!0),c=b.data("form-id"),g=CFFIELD_CONFIG[h].configs;var o=new CFState(c,a);o.init(CFFIELD_CONFIG[h].fields.defaults,CFFIELD_CONFIG[h].fields.calcDefaults),"object"!=typeof window.cfstate&&(window.cfstate={}),window.cfstate[e]=o,k.find("[data-sync]").each(function(){var b=a(this);new CalderaFormsFieldSync(b,b.data("binds"),k,a,o)}),f=new Caldera_Forms_Field_Config(g,a(document.getElementById(e)),a,o),f.init(),a(document).trigger("cf.form.init",{idAttr:e,formId:c,state:o,fieldIds:CFFIELD_CONFIG[h].fields.hasOwnProperty("ids")?CFFIELD_CONFIG[h].fields.ids:[]})}})}}(jQuery)});
1
+ function CFEvents(a){function b(a){return c.hasOwnProperty(a)}var c={};this.subscribe=function(a,d){b(a)||(c[a]=[]),c[a].push(d)},this.trigger=function(d,e){b(d)&&c[d].forEach(function(b){b(a.getState(d),d)})},this.detach=function(a,d){if(b(a))if(null===d)delete c[a];else for(var e in c[a])d===e&&c[a].splice(e,1)}}function CFState(a,b){function c(a){return m.hasOwnProperty(a)}function d(a){var c=b("#"+a);if(c.length)return c.on("change keyup",function(){var a=b(this);n[a.attr("id")]=f(a),j.mutateState([a.attr("id")],a.val())}),n[a]=f(b(document.getElementById(a))),j.mutateState([c.attr("id")],c.val()),!0;if(c=b("."+a),c.length){if("object"==typeof c){var d=[],e=0;c.each(function(c,h){var i=b(h),j=0;i.prop("checked")&&(j+=g(f(i)),e+=j,d.push(i.val())),n[a]=e})}return c.on("change",function(){var a,c,d=[],e=b(this),h=e.attr("type");switch(h){case"radio":a=e.data("radio-field"),c=b("[data-radio-field="+a+"]"),d="";break;case"checkbox":a=e.data("checkbox-field"),c=b("[data-checkbox-field="+a+"]");break;default:a=e.data("field"),c=b("[data-field="+a+"]")}if("checkbox"===h){var i,k=0;c.length?c.each(function(a,c){i=b(c),i.prop("checked")&&(k+=g(f(i)),d.push(i.val()))}):d=[],n[a]=k}else c.length?1==c.length?d=f(b(c[0])):c.each(function(c,e){var g=b(e);g.prop("checked")&&("radio"===h?(n[a]=f(g),d=g.val()):d.push(g.val()))}):d=0;j.mutateState(a,d)}),!0}return j.unbind(a),!1}function e(a,b){m[a]=0,n[a]=0,j.events().subscribe(a,function(a,b){n[b]=a})}function f(a){if(a.is("select")&&a.has("option")&&(a=a.find(":selected")),!a.length)return 0;if(a.is("hidden"))return a.val();var b=0,c=a.attr("data-calc-value");return b=void 0===c||!1===c||isNaN(c)?a.val():a.data("calc-value"),g(b)}function g(a){return!a||isNaN(a)?0:window.parseFloat(a)}function h(a){return"number"==typeof a}function i(a){return"string"==typeof a}var j=this,k=new CFEvents(this),l={},m={},n={};this.init=function(a,b){for(var c in a)"object"==typeof b[c]?"calculation"==b[c].type&&e(c,b[c]):d(c)?(m[c]=a[c],b.hasOwnProperty(c)?n[c]=b[c]:n[c]=null):(m[c]="",l[c]=!0,n[c]=null)},this.getState=function(a){return!!c(a)&&m[a]},this.getCalcValue=function(a,d){var e=0;if(!c(a))return e;if(d){d=0;var k,l=d;return b("#"+a).each(function(){l=0,k=b(this),k.prop("checked")&&(l=f(k),g(l)>g(d)&&(d=g(l)))}),g(d)}if(n.hasOwnProperty(a)){if(!1===n[a]||null===n[a]){var m=f(b(document.getElementById(a)));i(m)&&(m=g(m)),h(m)&&(n[a]=m)}e=n[a]}else e=j.getState(a),b.isArray(e)&&(e=e.reduce(function(a,b){return g(a)+g(b)},0)),h(e)&&(n[a]=e);return g(e)},this.mutateState=function(a,b){return!!c(a)&&(m[a]!=b&&(m[a]=b,k.trigger(a,b)),!0)},this.unbind=function(a){j.mutateState(a,""),l[a]=!0,delete n[a]},this.rebind=function(a){d(a),delete l[a]},this.events=function(){return{subscribe:function(a,b){c(a)&&k.subscribe(a,b)},detach:function(a,b){k.detach(a,b)}}}}function color_picker_init(){jQuery(".minicolor-picker").miniColors()}function toggle_button_init(a,b){var c=jQuery(b),d=c.find(".cf-toggle-group-radio:checked");d.length&&jQuery("#"+d.data("ref")).trigger("click")}function Caldera_Forms_Field_Config(a,b,c,d){function e(a,b,c,d){var e=b.parent().parent();return e.removeClass("has-error"),e.find(".help-block").remove(),a?(e.removeClass("has-error"),h(),!0):(e.addClass("has-error").append('<span id="cf-error-'+b.attr("id")+'" class="help-block '+d+'">'+c+"</span>"),b.prop("required")&&g(b),b.addClass("parsely-error"),!1)}function f(a){return!a.closest(".caldera-form-page").attr("aria-hidden")}function g(a){f(a)&&l.prop("disabled",!0).attr("aria-disabled",!0)}function h(){l.prop("disabled",!1).attr("aria-disabled",!1)}function i(a,b,c){var d;return function(){var e=this,f=arguments,g=function(){d=null,c||a.apply(e,f)},h=c&&!d;clearTimeout(d),d=setTimeout(g,b),h&&a.apply(e,f)}}var j=this,k={},l=(b.data("instance"),b.find(":submit, .cf-page-btn-next"));this.init=function(){c.each(a,function(a,b){k[b.id]=j[b.type](b)})},this.button=function(a){var b=a.id;c(document).on("click dblclick","#"+b,function(a){c("#"+b+"_btn").val(a.type).trigger("change")})},this.html=function(a){if(0!=a.sync){var b,e={},f=a.bindFields,g=c(document.getElementById(a.contentId));b=function(){if(g.length||(g=c(document.getElementById(a.contentId))),g.length){void 0==e[a.tmplId]&&(e[a.tmplId]=c(document.getElementById(a.tmplId)).html());for(var b,h=e[a.tmplId],i=0;i<=f.length;i++)"object"==typeof f[i]&&f[i].hasOwnProperty("to")&&f[i].hasOwnProperty("tag")&&(b=d.getState(f[i].to),b=0===b||"0"===b||b?isNaN(b)?"string"==typeof b?b.replace(/(?:\r\n|\r|\n)/g,"<br />"):b&&void 0!=b.join&&void 0!==b&&void 0!==b?b.join(", "):"":b.toString():"",h=h.replace(f[i].tag,b));g.html(h).trigger("change")}},function(){for(var a=0;a<=f.length;a++)"object"==typeof f[a]&&f[a].hasOwnProperty("to")&&d.events().subscribe(f[a].to,b);c(document).on("cf.pagenav cf.modal",b)}(),b()}},this.summary=this.html;var m={};this.range_slider=function(a){function b(b){b.parent().find(".rangeslider").css("backgroundColor",a.trackcolor),b.parent().find(".rangeslider__fill").css("backgroundColor",a.color),b.parent().find(".rangeslider__handle").css("backgroundColor",a.handle).css("borderColor",a.handleborder)}var e=c(document.getElementById(a.id));c(document).on("cf.pagenav cf.add cf.disable cf.modal",function(){var e=document.getElementById(a.id);if(null!=e){var f=c(e),g=m[a.id].value;if(!f.is(":visible"))return;f.val(g),f.rangeslider("destroy"),f.rangeslider(m[a.id].init),f.val(g).change(),b(f),d.mutateState(a.id,g)}}),function(){"object"!=m[a.id]&&(m[a.id]={value:a.default,init:{},inited:!1});var f={onSlide:function(b,c){d.mutateState(a.id,c),m[a.id].value=c},onInit:function(){this.value=d.getState(a.id),m[a.id].inited=!0,b(e)},polyfill:!1};m[a.id].init=f,d.events().subscribe(a.id,function(b){c("#"+a.id+"_value").html(b)}),e.is(":visible")&&e.rangeslider(f)}()},this.star_rating=function(a){var b=a.options.score,d=c(document.getElementById(a.starFieldId)),e=(c(document.getElementById(a.id)),function(){var c=a.options;c.click=function(){b=d.raty("score"),d.trigger("change")},d.raty(c),d.raty("score",b)});e();var f=!1;jQuery(document).on("cf.add",function(){!1===f&&(f=!0,d.length&&(d.raty("destroy"),e()),setTimeout(function(){f=!1},500))})},this.toggle_switch=function(a){c(document).on("reset","#"+a.id,function(b){c.each(a.options,function(b,d){c(document.getElemenetById(d)).removeClass(a.selectedClassName).addClass(a.defaultClassName)}),c(document.getElementById(a.id)).prop("checked","")})},this.phone_better=function(a){var d=c(document.getElementById(a.id)),f=function(){var b=document.getElementById("cf-error-"+a.id);null!=b&&b.remove()},g=function(){f();var b;c.trim(d.val())&&(b=!!d.intlTelInput("isValidNumber"));var g,h=d.intlTelInput("getValidationError");return 0==h?(b=!0,g=""):g="undefined"!=a.messages[h]?a.messages[h]:a.messages.generic,e(b,d,g,"help-block-phone_better"),b},h=function(){d.length||(d=c(document.getElementById(a.id))),d.intlTelInput(a.options),d.on("keyup change",f),d.blur(function(){f(),g()}),d.on("change",g),b.on("submit",function(){g()})};c(document).on("cf.pagenav cf.add cf.disable cf.modal",h),h()},this.wysiwyg=function(a){var b=document.getElementById(a.id);if(null!=b){var d=c(b);d.trumbowyg(a.options);var e=d.parent().find(".trumbowyg-editor");e.html(d.val()),e.bind("input propertychange",function(){d.val(e.html())})}},this.credit_card_number=function(a){function b(b){var e={0:"amex",1:"discover",2:"visa",3:"discover",4:"mastercard"},f="credit-card.svg";c.each(e,function(a,c){if(0===b.indexOf(c))return f="cc-"+c+".svg",!1}),d.css("background",'url("'+a.imgPath+f+'")')}var d=c(document.getElementById(a.id));0==a.exp&&0==a.cvc||function(){g(d);var b=c(document.getElementById(a.cvc)),e=c(document.getElementById(a.exp));b.blur(function(){b.val()&&j.creditCardUtil.validateCVC(d,b),e.val()&&j.creditCardUtil.validateExp(e)})}(),d.length&&(d.payment("formatCardNumber"),d.blur(function(){var f=d.val(),g=c.payment.validateCardNumber(f),h=c.payment.cardType(f);e(g,d,a.invalid,"help-block-credit_card_number help-block-credit_card"),g&&b(h)}))},this.credit_card_exp=function(a){var b=c(document.getElementById(a.id));b.length&&(b.payment("formatCardExpiry"),b.blur(function(){e(j.creditCardUtil.validateExp(b),b,a.invalid,"help-block-credit_card_exp help-block-credit_card")}))},this.credit_card_cvc=function(a){var b=c(document.getElementById(a.id));if(b.length&&(b.payment("formatCardCVC"),!1!==a.ccField)){var d=c(document.getElementById(a.ccField));b.blur(function(){e(j.creditCardUtil.validateExp(d,b),b,a.invalid,"help-block-credit_card_cvc help-block-credit_card")})}},this.creditCardUtil={validateCVC:function(a,b){var d=b.val(),e=c.payment.validateCardNumber(a.val()),f=!1;if(e){var g=c.payment.cardType(a.val());f=c.payment.validateCardCVC(d,g)}return f},validateExp:function(a){var b=a.val().split("/");if(b&&2==b.length)return c.payment.validateCardExpiry(b[0].trim(),b[1].trim())}},this.color_picker=function(a){c(document.getElementById(a.id)).miniColors(a.settings),c(document).on("cf.pagenav cf.add cf.disable cf.modal",function(){c(document.getElementById(a.id)).miniColors(a.settings)})},this.calculation=function(a){function b(b){b+="";for(var c=b.split("."),d=c[0],e=c.length>1?a.decimalSeparator+c[1]:"",f=/(\d+)(\d{3})/;f.test(d);)d=d.replace(f,"$1"+a.thousandSeparator+"$2");return d+e}var e=null,f=i(function(){g(d)},250),g=function(){var f=window[a.callback].apply(null,[d]);isFinite(f)||(f=0),null!==e&&f===e||(e=f,d.mutateState(a.id,f),"number"!=typeof f&&(f=parseInt(f,10)),a.moneyFormat&&(f=f.toFixed(2)),c("#"+a.id).html(b(f)).data("calc-value",f),c("#"+a.targetId).val(f).trigger("change"))};c.each(a.fieldBinds,function(a,b){d.events().subscribe(b,f)}),c(document).on("cf.pagenav cf.add cf.remove cf.modal",function(b,c){"cf"==b.type&&"remove"===b.namespace&&"object"==typeof c&&c.hasOwnProperty("field")&&c.field===a.id?e=null:f()}),f()}}function CalderaFormsFieldSync(a,b,c,d,e){for(var f=0;f<b.length;f++)d(document).on("keyup change blur mouseover","[data-field='"+b[f]+"']",function(){if(a.data("sync")){var b=a.data("sync");if(id=a.data("field"),reg=new RegExp("{{([^}]*?)}}","g"),template=b.match(reg),!a.data("unsync")&&void 0!=template&&template.length){for(var f=0;f<template.length;f++){for(var g=template[f].replace(/\}/g,"").replace(/\{/g,""),h=new RegExp(template[f],"g"),i=c.find("[data-field='"+g+"']"),j="",k=0;k<i.length;k++){var l=d(i[k]);(!l.is(":radio")&&!l.is(":checkbox")||l.is(":checked"))&&(j+=l.val())}b=b.replace(h,j)}e.mutateState(a.attr("id"),j),a.val(b)}}}),d("[data-field='"+b[f]+"']").trigger("change"),a.on("keyup change",function(){a.attr("data-unsync","1"),a.removeAttr("data-sync"),a.removeAttr("data-binds")})}function CalderaFormsResetNonce(a,b,c){function d(a){return(new Date).getTime()-36e3>a}function e(){c.ajax({url:b.rest.tokens.nonce,method:"POST",beforeSend:function(a){a.setRequestHeader("X-WP-Nonce",b.rest.nonce)},data:{form_id:a}}).success(function(a){f.val(a.nonce),f.data("nonce-time",(new Date).getTime())})}var f;this.init=function(){f=c("#"+b.nonce.field+"_"+a),d(f.data("nonce-time"))&&e()}}function caldera_forms_check_protocol(a){var b=window.location.protocol,c=document.createElement("a");return c.href=a,c.protocol===b}function CalderaFormsCrossOriginWarning(a,b,c){function d(){b(a.data("target")).append('<div class="alert alert-warning">'+c.mixed_protocol+"</div>")}this.maybeWarn=function(){if(a.find('[name="cfajax"]').length){caldera_forms_check_protocol(a.data("request"))||d()}}}function CalderaFormsJQueryWarning(a,b,c){function d(){b(a.data("target")).append('<div class="alert alert-warning">'+c.jquery_old+"</div>")}function e(a){var b=a.split(".");if(1==b[0]){if(12>b[2])return!0;if(4>b[2])return!0}return!1}this.maybeWarn=function(){var a=b.fn.jquery;"string"==typeof a&&"1.12.4"!=a&&e(a)&&d()}}!function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};b.m=a,b.c=c,b.i=function(a){return a},b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{configurable:!1,enumerable:!0,get:d})},b.n=function(a){var c=a&&a.__esModule?function(){return a.default}:function(){return a};return b.d(c,"a",c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p="",b(b.s=9)}([function(a,b,c){"use strict";var d,e,f;"function"==typeof Symbol&&Symbol.iterator,function(g){e=[c(2)],d=g,void 0!==(f="function"==typeof d?d.apply(b,e):d)&&(a.exports=f)}(function(a){return a})},function(a,b,c){"use strict";var d,e,f,g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};!function(g){e=[c(0),c(11),c(10)],d=g,void 0!==(f="function"==typeof d?d.apply(b,e):d)&&(a.exports=f)}(function(a,b,c,d){function e(b,c,g){if(!(this instanceof e))return new e(b,c,g);this.el=d,this.events={},this.maskset=d,this.refreshValue=!1,!0!==g&&(a.isPlainObject(b)?c=b:(c=c||{},c.alias=b),this.opts=a.extend(!0,{},this.defaults,c),this.noMasksCache=c&&c.definitions!==d,this.userOptions=c||{},this.isRTL=this.opts.numericInput,f(this.opts.alias,c,this.opts))}function f(b,c,g){var h=e.prototype.aliases[b];return h?(h.alias&&f(h.alias,d,g),a.extend(!0,g,h),a.extend(!0,g,c),!0):(null===g.mask&&(g.mask=b),!1)}function h(b,c){function f(b,f,g){var h=!1;if(null!==b&&""!==b||(h=null!==g.regex,h?(b=g.regex,b=b.replace(/^(\^)(.*)(\$)$/,"$2")):(h=!0,b=".*")),1===b.length&&!1===g.greedy&&0!==g.repeat&&(g.placeholder=""),g.repeat>0||"*"===g.repeat||"+"===g.repeat){var i="*"===g.repeat?0:"+"===g.repeat?1:g.repeat;b=g.groupmarker.start+b+g.groupmarker.end+g.quantifiermarker.start+i+","+g.repeat+g.quantifiermarker.end}var j,k=h?"regex_"+g.regex:g.numericInput?b.split("").reverse().join(""):b;return e.prototype.masksCache[k]===d||!0===c?(j={mask:b,maskToken:e.prototype.analyseMask(b,h,g),validPositions:{},_buffer:d,buffer:d,tests:{},metadata:f,maskLength:d},!0!==c&&(e.prototype.masksCache[k]=j,j=a.extend(!0,{},e.prototype.masksCache[k]))):j=a.extend(!0,{},e.prototype.masksCache[k]),j}if(a.isFunction(b.mask)&&(b.mask=b.mask(b)),a.isArray(b.mask)){if(b.mask.length>1){b.keepStatic=null===b.keepStatic||b.keepStatic;var g=b.groupmarker.start;return a.each(b.numericInput?b.mask.reverse():b.mask,function(c,e){g.length>1&&(g+=b.groupmarker.end+b.alternatormarker+b.groupmarker.start),e.mask===d||a.isFunction(e.mask)?g+=e:g+=e.mask}),g+=b.groupmarker.end,f(g,b.mask,b)}b.mask=b.mask.pop()}return b.mask&&b.mask.mask!==d&&!a.isFunction(b.mask.mask)?f(b.mask.mask,b.mask,b):f(b.mask,b.mask,b)}function i(f,h,j){function o(a,b,c){b=b||0;var e,f,g,h=[],i=0,k=r();do{!0===a&&p().validPositions[i]?(g=p().validPositions[i],f=g.match,e=g.locator.slice(),h.push(!0===c?g.input:!1===c?f.nativeDef:J(i,f))):(g=u(i,e,i-1),f=g.match,e=g.locator.slice(),(!1===j.jitMasking||i<k||"number"==typeof j.jitMasking&&isFinite(j.jitMasking)&&j.jitMasking>i)&&h.push(!1===c?f.nativeDef:J(i,f))),i++}while((V===d||i<V)&&(null!==f.fn||""!==f.def)||b>i);return""===h[h.length-1]&&h.pop(),p().maskLength=i+1,h}function p(){return h}function q(a){var b=p();b.buffer=d,!0!==a&&(b.validPositions={},b.p=0)}function r(a,b,c){var e=-1,f=-1,g=c||p().validPositions;a===d&&(a=-1);for(var h in g){var i=parseInt(h);g[i]&&(b||!0!==g[i].generatedInput)&&(i<=a&&(e=i),i>=a&&(f=i))}return-1!==e&&a-e>1||f<a?e:f}function s(b,c,e,f){var g,h=b,i=a.extend(!0,{},p().validPositions),k=!1;for(p().p=b,g=c-1;g>=h;g--)p().validPositions[g]!==d&&(!0!==e&&(!p().validPositions[g].match.optionality&&function(a){var b=p().validPositions[a];if(b!==d&&null===b.match.fn){var c=p().validPositions[a-1],e=p().validPositions[a+1];return c!==d&&e!==d}return!1}(g)||!1===j.canClearPosition(p(),g,r(d,!0),f,j))||delete p().validPositions[g]);for(q(!0),g=h+1;g<=r();){for(;p().validPositions[h]!==d;)h++;if(g<h&&(g=h+1),p().validPositions[g]===d&&E(g))g++;else{var l=u(g);!1===k&&i[h]&&i[h].match.def===l.match.def?(p().validPositions[h]=a.extend(!0,{},i[h]),p().validPositions[h].input=l.input,delete p().validPositions[g],g++):w(h,l.match.def)?!1!==D(h,l.input||J(g),!0)&&(delete p().validPositions[g],g++,k=!0):E(g)||(g++,h--),h++}}q(!0)}function t(a,b){for(var c,e=a,f=r(),g=p().validPositions[f]||x(0)[0],h=g.alternation!==d?g.locator[g.alternation].toString().split(","):[],i=0;i<e.length&&(c=e[i],!(c.match&&(j.greedy&&!0!==c.match.optionalQuantifier||(!1===c.match.optionality||!1===c.match.newBlockMarker)&&!0!==c.match.optionalQuantifier)&&(g.alternation===d||g.alternation!==c.alternation||c.locator[g.alternation]!==d&&C(c.locator[g.alternation].toString().split(","),h)))||!0===b&&(null!==c.match.fn||/[0-9a-bA-Z]/.test(c.match.def)));i++);return c}function u(a,b,c){return p().validPositions[a]||t(x(a,b?b.slice():b,c))}function v(a){return p().validPositions[a]?p().validPositions[a]:x(a)[0]}function w(a,b){for(var c=!1,d=x(a),e=0;e<d.length;e++)if(d[e].match&&d[e].match.def===b){c=!0;break}return c}function x(b,c,e){function f(c,e,g,i){function l(g,i,q){function r(b,c){var d=0===a.inArray(b,c.matches);return d||a.each(c.matches,function(a,e){if(!0===e.isQuantifier&&(d=r(b,c.matches[a-1])))return!1}),d}function s(b,c,e){var f,g;if(p().validPositions[b-1]&&e&&p().tests[b])for(var h=p().validPositions[b-1].locator,i=p().tests[b][0].locator,j=0;j<e;j++)if(h[j]!==i[j])return h.slice(e+1);return(p().tests[b]||p().validPositions[b])&&a.each(p().tests[b]||[p().validPositions[b]],function(a,b){var h=e!==d?e:b.alternation,i=b.locator[h]!==d?b.locator[h].toString().indexOf(c):-1;(g===d||i<g)&&-1!==i&&(f=b,g=i)}),f?f.locator.slice((e!==d?e:f.alternation)+1):e!==d?s(b,c):d}if(k>1e4)throw"Inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. "+p().mask;if(k===b&&g.matches===d)return m.push({match:g,locator:i.reverse(),cd:o}),!0;if(g.matches!==d){if(g.isGroup&&q!==g){if(g=l(c.matches[a.inArray(g,c.matches)+1],i))return!0}else if(g.isOptional){var t=g;if(g=f(g,e,i,q)){if(h=m[m.length-1].match,!r(h,t))return!0;n=!0,k=b}}else if(g.isAlternator){var u,v=g,w=[],x=m.slice(),y=i.length,z=e.length>0?e.shift():-1;if(-1===z||"string"==typeof z){var A,B=k,C=e.slice(),D=[];if("string"==typeof z)D=z.split(",");else for(A=0;A<v.matches.length;A++)D.push(A);for(var E=0;E<D.length;E++){if(A=parseInt(D[E]),m=[],e=s(k,A,y)||C.slice(),!0!==(g=l(v.matches[A]||c.matches[A],[A].concat(i),q)||g)&&g!==d&&D[D.length-1]<v.matches.length){var F=a.inArray(g,c.matches)+1;c.matches.length>F&&(g=l(c.matches[F],[F].concat(i.slice(1,i.length)),q))&&(D.push(F.toString()),a.each(m,function(a,b){b.alternation=i.length-1}))}u=m.slice(),k=B,m=[];for(var G=0;G<u.length;G++){var H=u[G],I=!1;H.alternation=H.alternation||y;for(var J=0;J<w.length;J++){var K=w[J];if("string"!=typeof z||-1!==a.inArray(H.locator[H.alternation].toString(),D)){if(function(a,b){return a.match.nativeDef===b.match.nativeDef||a.match.def===b.match.nativeDef||a.match.nativeDef===b.match.def}(H,K)){I=!0,H.alternation===K.alternation&&-1===K.locator[K.alternation].toString().indexOf(H.locator[H.alternation])&&(K.locator[K.alternation]=K.locator[K.alternation]+","+H.locator[H.alternation],K.alternation=H.alternation),H.match.nativeDef===K.match.def&&(H.locator[H.alternation]=K.locator[K.alternation],w.splice(w.indexOf(K),1,H));break}if(H.match.def===K.match.def){I=!1;break}if(function(a,c){return null===a.match.fn&&null!==c.match.fn&&c.match.fn.test(a.match.def,p(),b,!1,j,!1)}(H,K)||function(a,c){return null!==a.match.fn&&null!==c.match.fn&&c.match.fn.test(a.match.def.replace(/[\[\]]/g,""),p(),b,!1,j,!1)}(H,K)){H.alternation===K.alternation&&-1===H.locator[H.alternation].toString().indexOf(K.locator[K.alternation].toString().split("")[0])&&(H.na=H.na||H.locator[H.alternation].toString(),-1===H.na.indexOf(H.locator[H.alternation].toString().split("")[0])&&(H.na=H.na+","+H.locator[K.alternation].toString().split("")[0]),I=!0,H.locator[H.alternation]=K.locator[K.alternation].toString().split("")[0]+","+H.locator[H.alternation],w.splice(w.indexOf(K),0,H));break}}}I||w.push(H)}}"string"==typeof z&&(w=a.map(w,function(b,c){if(isFinite(c)){var e=b.alternation,f=b.locator[e].toString().split(",");b.locator[e]=d,b.alternation=d;for(var g=0;g<f.length;g++)-1!==a.inArray(f[g],D)&&(b.locator[e]!==d?(b.locator[e]+=",",b.locator[e]+=f[g]):b.locator[e]=parseInt(f[g]),b.alternation=e);if(b.locator[e]!==d)return b}})),m=x.concat(w),k=b,n=m.length>0,g=w.length>0,e=C.slice()}else g=l(v.matches[z]||c.matches[z],[z].concat(i),q);if(g)return!0}else if(g.isQuantifier&&q!==c.matches[a.inArray(g,c.matches)-1])for(var L=g,M=e.length>0?e.shift():0;M<(isNaN(L.quantifier.max)?M+1:L.quantifier.max)&&k<=b;M++){var N=c.matches[a.inArray(L,c.matches)-1];if(g=l(N,[M].concat(i),N)){if(h=m[m.length-1].match,h.optionalQuantifier=M>L.quantifier.min-1,r(h,N)){if(M>L.quantifier.min-1){n=!0,k=b;break}return!0}return!0}}else if(g=f(g,e,i,q))return!0}else k++}for(var q=e.length>0?e.shift():0;q<c.matches.length;q++)if(!0!==c.matches[q].isQuantifier){var r=l(c.matches[q],[q].concat(g),i);if(r&&k===b)return r;if(k>b)break}}function g(a){if(j.keepStatic&&b>0&&a.length>1+(""===a[a.length-1].match.def?1:0)&&!0!==a[0].match.optionality&&!0!==a[0].match.optionalQuantifier&&null===a[0].match.fn&&!/[0-9a-bA-Z]/.test(a[0].match.def)){if(p().validPositions[b-1]===d)return[t(a)];if(p().validPositions[b-1].alternation===a[0].alternation)return[t(a)];if(p().validPositions[b-1])return[t(a)]}return a}var h,i=p().maskToken,k=c?e:0,l=c?c.slice():[0],m=[],n=!1,o=c?c.join(""):"";if(b>-1){if(c===d){for(var q,r=b-1;(q=p().validPositions[r]||p().tests[r])===d&&r>-1;)r--;q!==d&&r>-1&&(l=function(b){var c=[];return a.isArray(b)||(b=[b]),b.length>0&&(b[0].alternation===d?(c=t(b.slice()).locator.slice(),0===c.length&&(c=b[0].locator.slice())):a.each(b,function(a,b){if(""!==b.def)if(0===c.length)c=b.locator.slice();else for(var d=0;d<c.length;d++)b.locator[d]&&-1===c[d].toString().indexOf(b.locator[d])&&(c[d]+=","+b.locator[d])})),c}(q),o=l.join(""),k=r)}if(p().tests[b]&&p().tests[b][0].cd===o)return g(p().tests[b]);for(var s=l.shift();s<i.length&&!(f(i[s],l,[s])&&k===b||k>b);s++);}return(0===m.length||n)&&m.push({match:{fn:null,cardinality:0,optionality:!0,casing:null,def:"",placeholder:""},locator:[],cd:o}),c!==d&&p().tests[b]?g(a.extend(!0,[],m)):(p().tests[b]=a.extend(!0,[],m),g(p().tests[b]))}function y(){return p()._buffer===d&&(p()._buffer=o(!1,1),p().buffer===d&&(p().buffer=p()._buffer.slice())),p()._buffer}function z(a){return p().buffer!==d&&!0!==a||(p().buffer=o(!0,r(),!0)),p().buffer}function A(a,b,c){var e,f;if(!0===a)q(),a=0,b=c.length;else for(e=a;e<b;e++)delete p().validPositions[e];for(f=a,e=a;e<b;e++)if(q(!0),c[e]!==j.skipOptionalPartCharacter){var g=D(f,c[e],!0,!0);!1!==g&&(q(!0),f=g.caret!==d?g.caret:g.pos+1)}}function B(b,c,d){switch(j.casing||c.casing){case"upper":b=b.toUpperCase();break;case"lower":b=b.toLowerCase();break;case"title":var f=p().validPositions[d-1];b=0===d||f&&f.input===String.fromCharCode(e.keyCode.SPACE)?b.toUpperCase():b.toLowerCase();break;default:if(a.isFunction(j.casing)){var g=Array.prototype.slice.call(arguments);g.push(p().validPositions),b=j.casing.apply(this,g)}}return b}function C(b,c,e){for(var f,g=j.greedy?c:c.slice(0,1),h=!1,i=e!==d?e.split(","):[],k=0;k<i.length;k++)-1!==(f=b.indexOf(i[k]))&&b.splice(f,1);for(var l=0;l<b.length;l++)if(-1!==a.inArray(b[l],g)){h=!0;break}return h}function D(b,c,f,g,h,i){function k(a){var b=Z?a.begin-a.end>1||a.begin-a.end==1:a.end-a.begin>1||a.end-a.begin==1;return b&&0===a.begin&&a.end===p().maskLength?"full":b}function l(c,e,f){var h=!1;return a.each(x(c),function(i,l){for(var n=l.match,o=e?1:0,t="",u=n.cardinality;u>o;u--)t+=H(c-(u-1));if(e&&(t+=e),z(!0),!1!==(h=null!=n.fn?n.fn.test(t,p(),c,f,j,k(b)):(e===n.def||e===j.skipOptionalPartCharacter)&&""!==n.def&&{c:J(c,n,!0)||n.def,pos:c})){var v=h.c!==d?h.c:e;v=v===j.skipOptionalPartCharacter&&null===n.fn?J(c,n,!0)||n.def:v;var w=c,x=z();if(h.remove!==d&&(a.isArray(h.remove)||(h.remove=[h.remove]),a.each(h.remove.sort(function(a,b){return b-a}),function(a,b){s(b,b+1,!0)})),h.insert!==d&&(a.isArray(h.insert)||(h.insert=[h.insert]),a.each(h.insert.sort(function(a,b){return a-b}),function(a,b){D(b.pos,b.c,!0,g)})),h.refreshFromBuffer){var y=h.refreshFromBuffer;if(A(!0===y?y:y.start,y.end,x),h.pos===d&&h.c===d)return h.pos=r(),!1;if((w=h.pos!==d?h.pos:c)!==c)return h=a.extend(h,D(w,v,!0,g)),!1}else if(!0!==h&&h.pos!==d&&h.pos!==c&&(w=h.pos,A(c,w,z().slice()),w!==c))return h=a.extend(h,D(w,v,!0)),!1;return(!0===h||h.pos!==d||h.c!==d)&&(i>0&&q(!0),m(w,a.extend({},l,{input:B(v,n,w)}),g,k(b))||(h=!1),!1)}}),h}function m(b,c,e,f){if(f||j.insertMode&&p().validPositions[b]!==d&&e===d){var g,h=a.extend(!0,{},p().validPositions),i=r(d,!0);for(g=b;g<=i;g++)delete p().validPositions[g];p().validPositions[b]=a.extend(!0,{},c);var k,l=!0,m=p().validPositions,o=!1,s=p().maskLength;for(g=k=b;g<=i;g++){var t=h[g];if(t!==d)for(var u=k;u<p().maskLength&&(null===t.match.fn&&m[g]&&(!0===m[g].match.optionalQuantifier||!0===m[g].match.optionality)||null!=t.match.fn);){if(u++,!1===o&&h[u]&&h[u].match.def===t.match.def)p().validPositions[u]=a.extend(!0,{},h[u]),p().validPositions[u].input=t.input,n(u),k=u,l=!0;else if(w(u,t.match.def)){var v=D(u,t.input,!0,!0);l=!1!==v,k=v.caret||v.insert?r():u,o=!0}else if(!(l=!0===t.generatedInput)&&u>=p().maskLength-1)break;if(p().maskLength<s&&(p().maskLength=s),l)break}if(!l)break}if(!l)return p().validPositions=a.extend(!0,{},h),q(!0),!1}else p().validPositions[b]=a.extend(!0,{},c);return q(!0),!0}function n(b){for(var c=b-1;c>-1&&!p().validPositions[c];c--);var e,f;for(c++;c<b;c++)p().validPositions[c]===d&&(!1===j.jitMasking||j.jitMasking>c)&&(f=x(c,u(c-1).locator,c-1).slice(),""===f[f.length-1].match.def&&f.pop(),(e=t(f))&&(e.match.def===j.radixPointDefinitionSymbol||!E(c,!0)||a.inArray(j.radixPoint,z())<c&&e.match.fn&&e.match.fn.test(J(c),p(),c,!1,j))&&!1!==(v=l(c,J(c,e.match,!0)||(null==e.match.fn?e.match.def:""!==J(c)?J(c):z()[c]),!0))&&(p().validPositions[v.pos||c].generatedInput=!0))}f=!0===f;var o=b;b.begin!==d&&(o=Z&&!k(b)?b.end:b.begin);var v=!0,y=a.extend(!0,{},p().validPositions);if(a.isFunction(j.preValidation)&&!f&&!0!==g&&!0!==i&&(v=j.preValidation(z(),o,c,k(b),j)),!0===v){if(n(o),k(b)&&(Q(d,e.keyCode.DELETE,b,!0,!0),o=p().p),o<p().maskLength&&(V===d||o<V)&&(v=l(o,c,f),(!f||!0===g)&&!1===v&&!0!==i)){var G=p().validPositions[o];if(!G||null!==G.match.fn||G.match.def!==c&&c!==j.skipOptionalPartCharacter){if((j.insertMode||p().validPositions[F(o)]===d)&&!E(o,!0))for(var I=o+1,K=F(o);I<=K;I++)if(!1!==(v=l(I,c,f))){!function(b,c){var e=p().validPositions[c];if(e)for(var f=e.locator,g=f.length,h=b;h<c;h++)if(p().validPositions[h]===d&&!E(h,!0)){var i=x(h).slice(),j=t(i,!0),k=-1;""===i[i.length-1].match.def&&i.pop(),a.each(i,function(a,b){for(var c=0;c<g;c++){if(b.locator[c]===d||!C(b.locator[c].toString().split(","),f[c].toString().split(","),b.na)){var e=f[c],h=j.locator[c],i=b.locator[c];e-h>Math.abs(e-i)&&(j=b);break}k<c&&(k=c,j=b)}}),j=a.extend({},j,{input:J(h,j.match,!0)||j.match.def}),j.generatedInput=!0,m(h,j,!0),p().validPositions[c]=d,l(c,e.input,!0)}}(o,v.pos!==d?v.pos:I),o=I;break}}else v={caret:F(o)}}!1===v&&j.keepStatic&&!f&&!0!==h&&(v=function(b,c,e){var f,h,i,k,l,m,n,o,s=a.extend(!0,{},p().validPositions),t=!1,u=r();for(k=p().validPositions[u];u>=0;u--)if((i=p().validPositions[u])&&i.alternation!==d){if(f=u,h=p().validPositions[f].alternation,k.locator[i.alternation]!==i.locator[i.alternation])break;k=i}if(h!==d){o=parseInt(f);var v=k.locator[k.alternation||h]!==d?k.locator[k.alternation||h]:n[0];v.length>0&&(v=v.split(",")[0]);var w=p().validPositions[o],y=p().validPositions[o-1];a.each(x(o,y?y.locator:d,o-1),function(f,i){n=i.locator[h]?i.locator[h].toString().split(","):[];for(var k=0;k<n.length;k++){var u=[],x=0,y=0,z=!1;if(v<n[k]&&(i.na===d||-1===a.inArray(n[k],i.na.split(","))||-1===a.inArray(v.toString(),n))){p().validPositions[o]=a.extend(!0,{},i);var A=p().validPositions[o].locator;for(p().validPositions[o].locator[h]=parseInt(n[k]),null==i.match.fn?(w.input!==i.match.def&&(z=!0,!0!==w.generatedInput&&u.push(w.input)),y++,p().validPositions[o].generatedInput=!/[0-9a-bA-Z]/.test(i.match.def),p().validPositions[o].input=i.match.def):p().validPositions[o].input=w.input,l=o+1;l<r(d,!0)+1;l++)m=p().validPositions[l],m&&!0!==m.generatedInput&&/[0-9a-bA-Z]/.test(m.input)?u.push(m.input):l<b&&x++,delete p().validPositions[l];for(z&&u[0]===i.match.def&&u.shift(),q(!0),t=!0;u.length>0;){var B=u.shift();if(B!==j.skipOptionalPartCharacter&&!(t=D(r(d,!0)+1,B,!1,g,!0)))break}if(t){p().validPositions[o].locator=A;var C=r(b)+1;for(l=o+1;l<r()+1;l++)((m=p().validPositions[l])===d||null==m.match.fn)&&l<b+(y-x)&&y++;b+=y-x,t=D(b>C?C:b,c,e,g,!0)}if(t)return!1;q(),p().validPositions=a.extend(!0,{},s)}}})}return t}(o,c,f)),!0===v&&(v={pos:o})}if(a.isFunction(j.postValidation)&&!1!==v&&!f&&!0!==g&&!0!==i){var L=j.postValidation(z(!0),v,j);if(L.refreshFromBuffer&&L.buffer){var M=L.refreshFromBuffer;A(!0===M?M:M.start,M.end,L.buffer)}v=!0===L?v:L}return v&&v.pos===d&&(v.pos=o),!1!==v&&!0!==i||(q(!0),p().validPositions=a.extend(!0,{},y)),v}function E(a,b){var c=u(a).match;if(""===c.def&&(c=v(a).match),null!=c.fn)return c.fn;if(!0!==b&&a>-1){var d=x(a);return d.length>1+(""===d[d.length-1].match.def?1:0)}return!1}function F(a,b){var c=p().maskLength;if(a>=c)return c;var d=a;for(x(c+1).length>1&&(o(!0,c+1,!0),c=p().maskLength);++d<c&&(!0===b&&(!0!==v(d).match.newBlockMarker||!E(d))||!0!==b&&!E(d)););return d}function G(a,b){var c,d=a;if(d<=0)return 0;for(;--d>0&&(!0===b&&!0!==v(d).match.newBlockMarker||!0!==b&&!E(d)&&(c=x(d),c.length<2||2===c.length&&""===c[1].match.def)););return d}function H(a){return p().validPositions[a]===d?J(a):p().validPositions[a].input}function I(b,c,e,f,g){if(f&&a.isFunction(j.onBeforeWrite)){var h=j.onBeforeWrite.call(X,f,c,e,j);if(h){if(h.refreshFromBuffer){var i=h.refreshFromBuffer;A(!0===i?i:i.start,i.end,h.buffer||c),c=z(!0)}e!==d&&(e=h.caret!==d?h.caret:e)}}b!==d&&(b.inputmask._valueSet(c.join("")),e===d||f!==d&&"blur"===f.type?S(b,e,0===c.length):n&&f&&"input"===f.type?setTimeout(function(){M(b,e)},0):M(b,e),!0===g&&(_=!0,a(b).trigger("input")))}function J(b,c,e){if(c=c||v(b).match,c.placeholder!==d||!0===e)return a.isFunction(c.placeholder)?c.placeholder(j):c.placeholder;if(null===c.fn){if(b>-1&&p().validPositions[b]===d){var f,g=x(b),h=[];if(g.length>1+(""===g[g.length-1].match.def?1:0))for(var i=0;i<g.length;i++)if(!0!==g[i].match.optionality&&!0!==g[i].match.optionalQuantifier&&(null===g[i].match.fn||f===d||!1!==g[i].match.fn.test(f.match.def,p(),b,!0,j))&&(h.push(g[i]),null===g[i].match.fn&&(f=g[i]),h.length>1&&/[0-9a-bA-Z]/.test(h[0].match.def)))return j.placeholder.charAt(b%j.placeholder.length)}return c.def}return j.placeholder.charAt(b%j.placeholder.length)}function K(b,f,g,h,i){function k(a,b){return-1!==y().slice(a,F(a)).join("").indexOf(b)&&!E(a)&&v(a).match.nativeDef===b.charAt(b.length-1)}var l=h.slice(),m="",n=-1,o=d;if(q(),g||!0===j.autoUnmask)n=F(n);else{var s=y().slice(0,F(-1)).join(""),t=l.join("").match(new RegExp("^"+e.escapeRegex(s),"g"));t&&t.length>0&&(l.splice(0,t.length*s.length),n=F(n))}if(-1===n?(p().p=F(n),n=0):p().p=n,a.each(l,function(c,e){if(e!==d)if(p().validPositions[c]===d&&l[c]===J(c)&&E(c,!0)&&!1===D(c,l[c],!0,d,d,!0))p().p++;else{var f=new a.Event("_checkval");f.which=e.charCodeAt(0),m+=e;var h=r(d,!0),i=p().validPositions[h],s=u(h+1,i?i.locator.slice():d,h);if(!k(n,m)||g||j.autoUnmask){var t=g?c:null==s.match.fn&&s.match.optionality&&h+1<p().p?h+1:p().p;o=da.keypressEvent.call(b,f,!0,!1,g,t),n=t+1,m=""}else o=da.keypressEvent.call(b,f,!0,!1,!0,h+1);if(!1!==o&&!g&&a.isFunction(j.onBeforeWrite)){var v=o;if(o=j.onBeforeWrite.call(X,f,z(),o.forwardPosition,j),(o=a.extend(v,o))&&o.refreshFromBuffer){var w=o.refreshFromBuffer
2
+ ;A(!0===w?w:w.start,w.end,o.buffer),q(!0),o.caret&&(p().p=o.caret,o.forwardPosition=o.caret)}}}}),f){var w=d;c.activeElement===b&&o&&(w=j.numericInput?G(o.forwardPosition):o.forwardPosition),I(b,z(),w,i||new a.Event("checkval"),i&&"input"===i.type)}}function L(b){if(b){if(b.inputmask===d)return b.value;b.inputmask&&b.inputmask.refreshValue&&da.setValueEvent.call(b)}var c=[],e=p().validPositions;for(var f in e)e[f].match&&null!=e[f].match.fn&&c.push(e[f].input);var g=0===c.length?"":(Z?c.reverse():c).join("");if(a.isFunction(j.onUnMask)){var h=(Z?z().slice().reverse():z()).join("");g=j.onUnMask.call(X,h,g,j)}return g}function M(a,e,f,g){function h(a){return!0===g||!Z||"number"!=typeof a||j.greedy&&""===j.placeholder||(a=z().join("").length-a),a}var i;if(e===d)return a.setSelectionRange?(e=a.selectionStart,f=a.selectionEnd):b.getSelection?(i=b.getSelection().getRangeAt(0),i.commonAncestorContainer.parentNode!==a&&i.commonAncestorContainer!==a||(e=i.startOffset,f=i.endOffset)):c.selection&&c.selection.createRange&&(i=c.selection.createRange(),e=0-i.duplicate().moveStart("character",-a.inputmask._valueGet().length),f=e+i.text.length),{begin:h(e),end:h(f)};if(e.begin!==d&&(f=e.end,e=e.begin),"number"==typeof e){e=h(e),f=h(f),f="number"==typeof f?f:e;var l=parseInt(((a.ownerDocument.defaultView||b).getComputedStyle?(a.ownerDocument.defaultView||b).getComputedStyle(a,null):a.currentStyle).fontSize)*f;if(a.scrollLeft=l>a.scrollWidth?l:0,k||!1!==j.insertMode||e!==f||f++,a.setSelectionRange)a.selectionStart=e,a.selectionEnd=f;else if(b.getSelection){if(i=c.createRange(),a.firstChild===d||null===a.firstChild){var m=c.createTextNode("");a.appendChild(m)}i.setStart(a.firstChild,e<a.inputmask._valueGet().length?e:a.inputmask._valueGet().length),i.setEnd(a.firstChild,f<a.inputmask._valueGet().length?f:a.inputmask._valueGet().length),i.collapse(!0);var n=b.getSelection();n.removeAllRanges(),n.addRange(i)}else a.createTextRange&&(i=a.createTextRange(),i.collapse(!0),i.moveEnd("character",f),i.moveStart("character",e),i.select());S(a,{begin:e,end:f})}}function N(b){var c,e,f=z(),g=f.length,h=r(),i={},j=p().validPositions[h],k=j!==d?j.locator.slice():d;for(c=h+1;c<f.length;c++)e=u(c,k,c-1),k=e.locator.slice(),i[c]=a.extend(!0,{},e);var l=j&&j.alternation!==d?j.locator[j.alternation]:d;for(c=g-1;c>h&&(e=i[c],(e.match.optionality||e.match.optionalQuantifier&&e.match.newBlockMarker||l&&(l!==i[c].locator[j.alternation]&&null!=e.match.fn||null===e.match.fn&&e.locator[j.alternation]&&C(e.locator[j.alternation].toString().split(","),l.toString().split(","))&&""!==x(c)[0].def))&&f[c]===J(c,e.match));c--)g--;return b?{l:g,def:i[g]?i[g].match:d}:g}function O(a){for(var b,c=N(),e=a.length,f=p().validPositions[r()];c<e&&!E(c,!0)&&(b=f!==d?u(c,f.locator.slice(""),f):v(c))&&!0!==b.match.optionality&&(!0!==b.match.optionalQuantifier&&!0!==b.match.newBlockMarker||c+1===e&&""===(f!==d?u(c+1,f.locator.slice(""),f):v(c+1)).match.def);)c++;for(;(b=p().validPositions[c-1])&&b&&b.match.optionality&&b.input===j.skipOptionalPartCharacter;)c--;return a.splice(c),a}function P(b){if(a.isFunction(j.isComplete))return j.isComplete(b,j);if("*"===j.repeat)return d;var c=!1,e=N(!0),f=G(e.l);if(e.def===d||e.def.newBlockMarker||e.def.optionality||e.def.optionalQuantifier){c=!0;for(var g=0;g<=f;g++){var h=u(g).match;if(null!==h.fn&&p().validPositions[g]===d&&!0!==h.optionality&&!0!==h.optionalQuantifier||null===h.fn&&b[g]!==J(g,h)){c=!1;break}}}return c}function Q(b,c,f,g,h){if((j.numericInput||Z)&&(c===e.keyCode.BACKSPACE?c=e.keyCode.DELETE:c===e.keyCode.DELETE&&(c=e.keyCode.BACKSPACE),Z)){var i=f.end;f.end=f.begin,f.begin=i}c===e.keyCode.BACKSPACE&&(f.end-f.begin<1||!1===j.insertMode)?(f.begin=G(f.begin),p().validPositions[f.begin]!==d&&p().validPositions[f.begin].input===j.groupSeparator&&f.begin--):c===e.keyCode.DELETE&&f.begin===f.end&&(f.end=E(f.end,!0)&&p().validPositions[f.end]&&p().validPositions[f.end].input!==j.radixPoint?f.end+1:F(f.end)+1,p().validPositions[f.begin]!==d&&p().validPositions[f.begin].input===j.groupSeparator&&f.end++),s(f.begin,f.end,!1,g),!0!==g&&function(){if(j.keepStatic){for(var c=[],e=r(-1,!0),f=a.extend(!0,{},p().validPositions),g=p().validPositions[e];e>=0;e--){var h=p().validPositions[e];if(h){if(!0!==h.generatedInput&&/[0-9a-bA-Z]/.test(h.input)&&c.push(h.input),delete p().validPositions[e],h.alternation!==d&&h.locator[h.alternation]!==g.locator[h.alternation])break;g=h}}if(e>-1)for(p().p=F(r(-1,!0));c.length>0;){var i=new a.Event("keypress");i.which=c.pop().charCodeAt(0),da.keypressEvent.call(b,i,!0,!1,!1,p().p)}else p().validPositions=a.extend(!0,{},f)}}();var k=r(f.begin,!0);if(k<f.begin)p().p=F(k);else if(!0!==g&&(p().p=f.begin,!0!==h))for(;p().p<k&&p().validPositions[p().p]===d;)p().p++}function R(d){function e(a){var b,e=c.createElement("span");for(var g in f)isNaN(g)&&-1!==g.indexOf("font")&&(e.style[g]=f[g]);e.style.textTransform=f.textTransform,e.style.letterSpacing=f.letterSpacing,e.style.position="absolute",e.style.height="auto",e.style.width="auto",e.style.visibility="hidden",e.style.whiteSpace="nowrap",c.body.appendChild(e);var h,i=d.inputmask._valueGet(),j=0;for(b=0,h=i.length;b<=h;b++){if(e.innerHTML+=i.charAt(b)||"_",e.offsetWidth>=a){var k=a-j,l=e.offsetWidth-a;e.innerHTML=i.charAt(b),k-=e.offsetWidth/3,b=k<l?b-1:b;break}j=e.offsetWidth}return c.body.removeChild(e),b}var f=(d.ownerDocument.defaultView||b).getComputedStyle(d,null),g=c.createElement("div");g.style.width=f.width,g.style.textAlign=f.textAlign,W=c.createElement("div"),W.className="im-colormask",d.parentNode.insertBefore(W,d),d.parentNode.removeChild(d),W.appendChild(g),W.appendChild(d),d.style.left=g.offsetLeft+"px",a(d).on("click",function(a){return M(d,e(a.clientX)),da.clickEvent.call(d,[a])}),a(d).on("keydown",function(a){a.shiftKey||!1===j.insertMode||setTimeout(function(){S(d)},0)})}function S(a,b,e){function f(){m||null!==h.fn&&i.input!==d?m&&(null!==h.fn&&i.input!==d||""===h.def)&&(m=!1,l+="</span>"):(m=!0,l+="<span class='im-static'>")}function g(d){!0!==d&&n!==b.begin||c.activeElement!==a||(l+="<span class='im-caret' style='border-right-width: 1px;border-right-style: solid;'></span>")}var h,i,k,l="",m=!1,n=0;if(W!==d){var o=z();if(b===d?b=M(a):b.begin===d&&(b={begin:b,end:b}),!0!==e){var q=r();do{g(),p().validPositions[n]?(i=p().validPositions[n],h=i.match,k=i.locator.slice(),f(),l+=o[n]):(i=u(n,k,n-1),h=i.match,k=i.locator.slice(),(!1===j.jitMasking||n<q||"number"==typeof j.jitMasking&&isFinite(j.jitMasking)&&j.jitMasking>n)&&(f(),l+=J(n,h))),n++}while((V===d||n<V)&&(null!==h.fn||""!==h.def)||q>n||m);-1===l.indexOf("im-caret")&&g(!0),m&&f()}var s=W.getElementsByTagName("div")[0];s.innerHTML=l,a.inputmask.positionColorMask(a,s)}}h=h||this.maskset,j=j||this.opts;var T,U,V,W,X=this,Y=this.el,Z=this.isRTL,$=!1,_=!1,aa=!1,ba=!1,ca={on:function(b,c,f){var g=function(b){if(this.inputmask===d&&"FORM"!==this.nodeName){var c=a.data(this,"_inputmask_opts");c?new e(c).mask(this):ca.off(this)}else{if("setvalue"===b.type||"FORM"===this.nodeName||!(this.disabled||this.readOnly&&!("keydown"===b.type&&b.ctrlKey&&67===b.keyCode||!1===j.tabThrough&&b.keyCode===e.keyCode.TAB))){switch(b.type){case"input":if(!0===_)return _=!1,b.preventDefault();break;case"keydown":$=!1,_=!1;break;case"keypress":if(!0===$)return b.preventDefault();$=!0;break;case"click":if(l||m){var g=this,h=arguments;return setTimeout(function(){f.apply(g,h)},0),!1}}var i=f.apply(this,arguments);return!1===i&&(b.preventDefault(),b.stopPropagation()),i}b.preventDefault()}};b.inputmask.events[c]=b.inputmask.events[c]||[],b.inputmask.events[c].push(g),-1!==a.inArray(c,["submit","reset"])?null!==b.form&&a(b.form).on(c,g):a(b).on(c,g)},off:function(b,c){if(b.inputmask&&b.inputmask.events){var d;c?(d=[],d[c]=b.inputmask.events[c]):d=b.inputmask.events,a.each(d,function(c,d){for(;d.length>0;){var e=d.pop();-1!==a.inArray(c,["submit","reset"])?null!==b.form&&a(b.form).off(c,e):a(b).off(c,e)}delete b.inputmask.events[c]})}}},da={keydownEvent:function(b){var d=this,f=a(d),g=b.keyCode,h=M(d);if(g===e.keyCode.BACKSPACE||g===e.keyCode.DELETE||m&&g===e.keyCode.BACKSPACE_SAFARI||b.ctrlKey&&g===e.keyCode.X&&!function(a){var b=c.createElement("input"),d="oncut"in b;return d||(b.setAttribute("oncut","return;"),d="function"==typeof b.oncut),b=null,d}())b.preventDefault(),Q(d,g,h),I(d,z(!0),p().p,b,d.inputmask._valueGet()!==z().join("")),d.inputmask._valueGet()===y().join("")?f.trigger("cleared"):!0===P(z())&&f.trigger("complete");else if(g===e.keyCode.END||g===e.keyCode.PAGE_DOWN){b.preventDefault();var i=F(r());j.insertMode||i!==p().maskLength||b.shiftKey||i--,M(d,b.shiftKey?h.begin:i,i,!0)}else g===e.keyCode.HOME&&!b.shiftKey||g===e.keyCode.PAGE_UP?(b.preventDefault(),M(d,0,b.shiftKey?h.begin:0,!0)):(j.undoOnEscape&&g===e.keyCode.ESCAPE||90===g&&b.ctrlKey)&&!0!==b.altKey?(K(d,!0,!1,T.split("")),f.trigger("click")):g!==e.keyCode.INSERT||b.shiftKey||b.ctrlKey?!0===j.tabThrough&&g===e.keyCode.TAB?(!0===b.shiftKey?(null===v(h.begin).match.fn&&(h.begin=F(h.begin)),h.end=G(h.begin,!0),h.begin=G(h.end,!0)):(h.begin=F(h.begin,!0),h.end=F(h.begin,!0),h.end<p().maskLength&&h.end--),h.begin<p().maskLength&&(b.preventDefault(),M(d,h.begin,h.end))):b.shiftKey||!1===j.insertMode&&(g===e.keyCode.RIGHT?setTimeout(function(){var a=M(d);M(d,a.begin)},0):g===e.keyCode.LEFT&&setTimeout(function(){var a=M(d);M(d,Z?a.begin+1:a.begin-1)},0)):(j.insertMode=!j.insertMode,M(d,j.insertMode||h.begin!==p().maskLength?h.begin:h.begin-1));j.onKeyDown.call(this,b,z(),M(d).begin,j),aa=-1!==a.inArray(g,j.ignorables)},keypressEvent:function(b,c,f,g,h){var i=this,k=a(i),l=b.which||b.charCode||b.keyCode;if(!(!0===c||b.ctrlKey&&b.altKey)&&(b.ctrlKey||b.metaKey||aa))return l===e.keyCode.ENTER&&T!==z().join("")&&(T=z().join(""),setTimeout(function(){k.trigger("change")},0)),!0;if(l){46===l&&!1===b.shiftKey&&""!==j.radixPoint&&(l=j.radixPoint.charCodeAt(0));var m,n=c?{begin:h,end:h}:M(i),o=String.fromCharCode(l);p().writeOutBuffer=!0;var r=D(n,o,g);if(!1!==r&&(q(!0),m=r.caret!==d?r.caret:c?r.pos+1:F(r.pos),p().p=m),!1!==f&&(setTimeout(function(){j.onKeyValidation.call(i,l,r,j)},0),p().writeOutBuffer&&!1!==r)){var s=z();I(i,s,j.numericInput&&r.caret===d?G(m):m,b,!0!==c),!0!==c&&setTimeout(function(){!0===P(s)&&k.trigger("complete")},0)}if(b.preventDefault(),c)return!1!==r&&(r.forwardPosition=m),r}},pasteEvent:function(c){var d,e=this,f=c.originalEvent||c,g=a(e),h=e.inputmask._valueGet(!0),i=M(e);Z&&(d=i.end,i.end=i.begin,i.begin=d);var k=h.substr(0,i.begin),l=h.substr(i.end,h.length);if(k===(Z?y().reverse():y()).slice(0,i.begin).join("")&&(k=""),l===(Z?y().reverse():y()).slice(i.end).join("")&&(l=""),Z&&(d=k,k=l,l=d),b.clipboardData&&b.clipboardData.getData)h=k+b.clipboardData.getData("Text")+l;else{if(!f.clipboardData||!f.clipboardData.getData)return!0;h=k+f.clipboardData.getData("text/plain")+l}var m=h;if(a.isFunction(j.onBeforePaste)){if(!1===(m=j.onBeforePaste.call(X,h,j)))return c.preventDefault();m||(m=h)}return K(e,!1,!1,Z?m.split("").reverse():m.toString().split("")),I(e,z(),F(r()),c,T!==z().join("")),!0===P(z())&&g.trigger("complete"),c.preventDefault()},inputFallBackEvent:function(b){var c=this,d=c.inputmask._valueGet();if(z().join("")!==d){var f=M(c);if(d=function(a,b,c){return"."===b.charAt(c.begin-1)&&""!==j.radixPoint&&(b=b.split(""),b[c.begin-1]=j.radixPoint.charAt(0),b=b.join("")),b}(0,d,f),d=function(a,b,c){if(l){var d=b.replace(z().join(""),"");if(1===d.length){var e=b.split("");e.splice(c.begin,0,d),b=e.join("")}}return b}(0,d,f),f.begin>d.length&&(M(c,d.length),f=M(c)),z().join("")!==d){var g=z().join(""),h=d.length>g.length?-1:0,i=d.substr(0,f.begin),k=d.substr(f.begin),m=g.substr(0,f.begin+h),n=g.substr(f.begin+h),o=f,p="",q=!1;if(i!==m){for(var r=(q=i.length>=m.length)?i.length:m.length,s=0;i.charAt(s)===m.charAt(s)&&s<r;s++);q&&(0===h&&(o.begin=s),p+=i.slice(s,o.end))}if(k!==n&&(k.length>n.length?p+=k.slice(0,1):k.length<n.length&&(o.end+=n.length-k.length,q||""===j.radixPoint||""!==k||i.charAt(o.begin+h-1)!==j.radixPoint||(o.begin--,p=j.radixPoint))),I(c,z(),{begin:o.begin+h,end:o.end+h}),p.length>0)a.each(p.split(""),function(b,d){var e=new a.Event("keypress");e.which=d.charCodeAt(0),aa=!1,da.keypressEvent.call(c,e)});else{o.begin===o.end-1&&(o.begin=G(o.begin+1),o.begin===o.end-1?M(c,o.begin):M(c,o.begin,o.end));var t=new a.Event("keydown");t.keyCode=e.keyCode.DELETE,da.keydownEvent.call(c,t)}b.preventDefault()}}},setValueEvent:function(b){this.inputmask.refreshValue=!1;var c=this,d=c.inputmask._valueGet(!0);a.isFunction(j.onBeforeMask)&&(d=j.onBeforeMask.call(X,d,j)||d),d=d.split(""),K(c,!0,!1,Z?d.reverse():d),T=z().join(""),(j.clearMaskOnLostFocus||j.clearIncomplete)&&c.inputmask._valueGet()===y().join("")&&c.inputmask._valueSet("")},focusEvent:function(a){var b=this,c=b.inputmask._valueGet();j.showMaskOnFocus&&(!j.showMaskOnHover||j.showMaskOnHover&&""===c)&&(b.inputmask._valueGet()!==z().join("")?I(b,z(),F(r())):!1===ba&&M(b,F(r()))),!0===j.positionCaretOnTab&&!1===ba&&""!==c&&(I(b,z(),M(b)),da.clickEvent.apply(b,[a,!0])),T=z().join("")},mouseleaveEvent:function(a){var b=this;if(ba=!1,j.clearMaskOnLostFocus&&c.activeElement!==b){var d=z().slice(),e=b.inputmask._valueGet();e!==b.getAttribute("placeholder")&&""!==e&&(-1===r()&&e===y().join("")?d=[]:O(d),I(b,d))}},clickEvent:function(b,e){function f(b){if(""!==j.radixPoint){var c=p().validPositions;if(c[b]===d||c[b].input===J(b)){if(b<F(-1))return!0;var e=a.inArray(j.radixPoint,z());if(-1!==e){for(var f in c)if(e<f&&c[f].input!==J(f))return!1;return!0}}}return!1}var g=this;setTimeout(function(){if(c.activeElement===g){var a=M(g);if(e&&(Z?a.end=a.begin:a.begin=a.end),a.begin===a.end)switch(j.positionCaretOnClick){case"none":break;case"radixFocus":if(f(a.begin)){var b=z().join("").indexOf(j.radixPoint);M(g,j.numericInput?F(b):b);break}default:var h=a.begin,i=r(h,!0),k=F(i);if(h<k)M(g,E(h,!0)||E(h-1,!0)?h:F(h));else{var l=p().validPositions[i],m=u(k,l?l.match.locator:d,l),n=J(k,m.match);if(""!==n&&z()[k]!==n&&!0!==m.match.optionalQuantifier&&!0!==m.match.newBlockMarker||!E(k,!0)&&m.match.def===n){var o=F(k);(h>=o||h===k)&&(k=o)}M(g,k)}}}},0)},dblclickEvent:function(a){var b=this;setTimeout(function(){M(b,0,F(r()))},0)},cutEvent:function(d){var f=this,g=a(f),h=M(f),i=d.originalEvent||d,j=b.clipboardData||i.clipboardData,k=Z?z().slice(h.end,h.begin):z().slice(h.begin,h.end);j.setData("text",Z?k.reverse().join(""):k.join("")),c.execCommand&&c.execCommand("copy"),Q(f,e.keyCode.DELETE,h),I(f,z(),p().p,d,T!==z().join("")),f.inputmask._valueGet()===y().join("")&&g.trigger("cleared")},blurEvent:function(b){var c=a(this),e=this;if(e.inputmask){var f=e.inputmask._valueGet(),g=z().slice();""!==f&&(j.clearMaskOnLostFocus&&(-1===r()&&f===y().join("")?g=[]:O(g)),!1===P(g)&&(setTimeout(function(){c.trigger("incomplete")},0),j.clearIncomplete&&(q(),g=j.clearMaskOnLostFocus?[]:y().slice())),I(e,g,d,b)),T!==z().join("")&&(T=g.join(""),c.trigger("change"))}},mouseenterEvent:function(a){var b=this;ba=!0,c.activeElement!==b&&j.showMaskOnHover&&b.inputmask._valueGet()!==z().join("")&&I(b,z())},submitEvent:function(a){T!==z().join("")&&U.trigger("change"),j.clearMaskOnLostFocus&&-1===r()&&Y.inputmask._valueGet&&Y.inputmask._valueGet()===y().join("")&&Y.inputmask._valueSet(""),j.removeMaskOnSubmit&&(Y.inputmask._valueSet(Y.inputmask.unmaskedvalue(),!0),setTimeout(function(){I(Y,z())},0))},resetEvent:function(a){Y.inputmask.refreshValue=!0,setTimeout(function(){U.trigger("setvalue")},0)}};e.prototype.positionColorMask=function(a,b){a.style.left=b.offsetLeft+"px"};var ea;if(f!==d)switch(f.action){case"isComplete":return Y=f.el,P(z());case"unmaskedvalue":return Y!==d&&f.value===d||(ea=f.value,ea=(a.isFunction(j.onBeforeMask)?j.onBeforeMask.call(X,ea,j)||ea:ea).split(""),K(d,!1,!1,Z?ea.reverse():ea),a.isFunction(j.onBeforeWrite)&&j.onBeforeWrite.call(X,d,z(),0,j)),L(Y);case"mask":!function(b){ca.off(b);var e=function(b,e){var f=b.getAttribute("type"),h="INPUT"===b.tagName&&-1!==a.inArray(f,e.supportsInputType)||b.isContentEditable||"TEXTAREA"===b.tagName;if(!h)if("INPUT"===b.tagName){var i=c.createElement("input");i.setAttribute("type",f),h="text"===i.type,i=null}else h="partial";return!1!==h?function(b){function f(){return this.inputmask?this.inputmask.opts.autoUnmask?this.inputmask.unmaskedvalue():-1!==r()||!0!==e.nullable?c.activeElement===this&&e.clearMaskOnLostFocus?(Z?O(z().slice()).reverse():O(z().slice())).join(""):i.call(this):"":i.call(this)}function h(b){j.call(this,b),this.inputmask&&a(this).trigger("setvalue")}var i,j;if(!b.inputmask.__valueGet){if(!0!==e.noValuePatching){if(Object.getOwnPropertyDescriptor){"function"!=typeof Object.getPrototypeOf&&(Object.getPrototypeOf="object"===g("test".__proto__)?function(a){return a.__proto__}:function(a){return a.constructor.prototype});var k=Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(b),"value"):d;k&&k.get&&k.set?(i=k.get,j=k.set,Object.defineProperty(b,"value",{get:f,set:h,configurable:!0})):"INPUT"!==b.tagName&&(i=function(){return this.textContent},j=function(a){this.textContent=a},Object.defineProperty(b,"value",{get:f,set:h,configurable:!0}))}else c.__lookupGetter__&&b.__lookupGetter__("value")&&(i=b.__lookupGetter__("value"),j=b.__lookupSetter__("value"),b.__defineGetter__("value",f),b.__defineSetter__("value",h));b.inputmask.__valueGet=i,b.inputmask.__valueSet=j}b.inputmask._valueGet=function(a){return Z&&!0!==a?i.call(this.el).split("").reverse().join(""):i.call(this.el)},b.inputmask._valueSet=function(a,b){j.call(this.el,null===a||a===d?"":!0!==b&&Z?a.split("").reverse().join(""):a)},i===d&&(i=function(){return this.value},j=function(a){this.value=a},function(b){if(a.valHooks&&(a.valHooks[b]===d||!0!==a.valHooks[b].inputmaskpatch)){var c=a.valHooks[b]&&a.valHooks[b].get?a.valHooks[b].get:function(a){return a.value},f=a.valHooks[b]&&a.valHooks[b].set?a.valHooks[b].set:function(a,b){return a.value=b,a};a.valHooks[b]={get:function(a){if(a.inputmask){if(a.inputmask.opts.autoUnmask)return a.inputmask.unmaskedvalue();var b=c(a);return-1!==r(d,d,a.inputmask.maskset.validPositions)||!0!==e.nullable?b:""}return c(a)},set:function(b,c){var d,e=a(b);return d=f(b,c),b.inputmask&&e.trigger("setvalue"),d},inputmaskpatch:!0}}}(b.type),function(b){ca.on(b,"mouseenter",function(b){var c=a(this);this.inputmask._valueGet()!==z().join("")&&c.trigger("setvalue")})}(b))}}(b):b.inputmask=d,h}(b,j);if(!1!==e&&(Y=b,U=a(Y),V=Y!==d?Y.maxLength:d,-1===V&&(V=d),!0===j.colorMask&&R(Y),n&&(Y.hasOwnProperty("inputmode")&&(Y.inputmode=j.inputmode,Y.setAttribute("inputmode",j.inputmode)),"rtfm"===j.androidHack&&(!0!==j.colorMask&&R(Y),Y.type="password")),!0===e&&(ca.on(Y,"submit",da.submitEvent),ca.on(Y,"reset",da.resetEvent),ca.on(Y,"mouseenter",da.mouseenterEvent),ca.on(Y,"blur",da.blurEvent),ca.on(Y,"focus",da.focusEvent),ca.on(Y,"mouseleave",da.mouseleaveEvent),!0!==j.colorMask&&ca.on(Y,"click",da.clickEvent),ca.on(Y,"dblclick",da.dblclickEvent),ca.on(Y,"paste",da.pasteEvent),ca.on(Y,"dragdrop",da.pasteEvent),ca.on(Y,"drop",da.pasteEvent),ca.on(Y,"cut",da.cutEvent),ca.on(Y,"complete",j.oncomplete),ca.on(Y,"incomplete",j.onincomplete),ca.on(Y,"cleared",j.oncleared),n||!0===j.inputEventOnly?Y.removeAttribute("maxLength"):(ca.on(Y,"keydown",da.keydownEvent),ca.on(Y,"keypress",da.keypressEvent)),ca.on(Y,"compositionstart",a.noop),ca.on(Y,"compositionupdate",a.noop),ca.on(Y,"compositionend",a.noop),ca.on(Y,"keyup",a.noop),ca.on(Y,"input",da.inputFallBackEvent),ca.on(Y,"beforeinput",a.noop)),ca.on(Y,"setvalue",da.setValueEvent),T=y().join(""),""!==Y.inputmask._valueGet(!0)||!1===j.clearMaskOnLostFocus||c.activeElement===Y)){var f=a.isFunction(j.onBeforeMask)?j.onBeforeMask.call(X,Y.inputmask._valueGet(!0),j)||Y.inputmask._valueGet(!0):Y.inputmask._valueGet(!0);""!==f&&K(Y,!0,!1,Z?f.split("").reverse():f.split(""));var h=z().slice();T=h.join(""),!1===P(h)&&j.clearIncomplete&&q(),j.clearMaskOnLostFocus&&c.activeElement!==Y&&(-1===r()?h=[]:O(h)),I(Y,h),c.activeElement===Y&&M(Y,F(r()))}}(Y);break;case"format":return ea=(a.isFunction(j.onBeforeMask)?j.onBeforeMask.call(X,f.value,j)||f.value:f.value).split(""),K(d,!0,!1,Z?ea.reverse():ea),f.metadata?{value:Z?z().slice().reverse().join(""):z().join(""),metadata:i.call(this,{action:"getmetadata"},h,j)}:Z?z().slice().reverse().join(""):z().join("");case"isValid":f.value?(ea=f.value.split(""),K(d,!0,!0,Z?ea.reverse():ea)):f.value=z().join("");for(var fa=z(),ga=N(),ha=fa.length-1;ha>ga&&!E(ha);ha--);return fa.splice(ga,ha+1-ga),P(fa)&&f.value===z().join("");case"getemptymask":return y().join("");case"remove":return Y&&Y.inputmask&&(U=a(Y),Y.inputmask._valueSet(j.autoUnmask?L(Y):Y.inputmask._valueGet(!0)),ca.off(Y),Object.getOwnPropertyDescriptor&&Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Y),"value")&&Y.inputmask.__valueGet&&Object.defineProperty(Y,"value",{get:Y.inputmask.__valueGet,set:Y.inputmask.__valueSet,configurable:!0}):c.__lookupGetter__&&Y.__lookupGetter__("value")&&Y.inputmask.__valueGet&&(Y.__defineGetter__("value",Y.inputmask.__valueGet),Y.__defineSetter__("value",Y.inputmask.__valueSet)),Y.inputmask=d),Y;case"getmetadata":if(a.isArray(h.metadata)){var ia=o(!0,0,!1).join("");return a.each(h.metadata,function(a,b){if(b.mask===ia)return ia=b,!1}),ia}return h.metadata}}var j=navigator.userAgent,k=/mobile/i.test(j),l=/iemobile/i.test(j),m=/iphone/i.test(j)&&!l,n=/android/i.test(j)&&!l;return e.prototype={dataAttribute:"data-inputmask",defaults:{placeholder:"_",optionalmarker:{start:"[",end:"]"},quantifiermarker:{start:"{",end:"}"},groupmarker:{start:"(",end:")"},alternatormarker:"|",escapeChar:"\\",mask:null,regex:null,oncomplete:a.noop,onincomplete:a.noop,oncleared:a.noop,repeat:0,greedy:!0,autoUnmask:!1,removeMaskOnSubmit:!1,clearMaskOnLostFocus:!0,insertMode:!0,clearIncomplete:!1,alias:null,onKeyDown:a.noop,onBeforeMask:null,onBeforePaste:function(b,c){return a.isFunction(c.onBeforeMask)?c.onBeforeMask.call(this,b,c):b},onBeforeWrite:null,onUnMask:null,showMaskOnFocus:!0,showMaskOnHover:!0,onKeyValidation:a.noop,skipOptionalPartCharacter:" ",numericInput:!1,rightAlign:!1,undoOnEscape:!0,radixPoint:"",radixPointDefinitionSymbol:d,groupSeparator:"",keepStatic:null,positionCaretOnTab:!0,tabThrough:!1,supportsInputType:["text","tel","password"],ignorables:[8,9,13,19,27,33,34,35,36,37,38,39,40,45,46,93,112,113,114,115,116,117,118,119,120,121,122,123,0,229],isComplete:null,canClearPosition:a.noop,preValidation:null,postValidation:null,staticDefinitionSymbol:d,jitMasking:!1,nullable:!0,inputEventOnly:!1,noValuePatching:!1,positionCaretOnClick:"lvp",casing:null,inputmode:"verbatim",colorMask:!1,androidHack:!1,importDataAttributes:!0},definitions:{9:{validator:"[0-91-9]",cardinality:1,definitionSymbol:"*"},a:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",cardinality:1,definitionSymbol:"*"},"*":{validator:"[0-91-9A-Za-zА-яЁёÀ-ÿµ]",cardinality:1}},aliases:{},masksCache:{},mask:function(g){function j(c,e,g,h){if(!0===e.importDataAttributes){var i,j,k,l,m=function(a,e){null!==(e=e!==d?e:c.getAttribute(h+"-"+a))&&("string"==typeof e&&(0===a.indexOf("on")?e=b[e]:"false"===e?e=!1:"true"===e&&(e=!0)),g[a]=e)},n=c.getAttribute(h);if(n&&""!==n&&(n=n.replace(new RegExp("'","g"),'"'),j=JSON.parse("{"+n+"}")),j){k=d;for(l in j)if("alias"===l.toLowerCase()){k=j[l];break}}m("alias",k),g.alias&&f(g.alias,g,e);for(i in e){if(j){k=d;for(l in j)if(l.toLowerCase()===i.toLowerCase()){k=j[l];break}}m(i,k)}}return a.extend(!0,e,g),("rtl"===c.dir||e.rightAlign)&&(c.style.textAlign="right"),("rtl"===c.dir||e.numericInput)&&(c.dir="ltr",c.removeAttribute("dir"),e.isRTL=!0),e}var k=this;return"string"==typeof g&&(g=c.getElementById(g)||c.querySelectorAll(g)),g=g.nodeName?[g]:g,a.each(g,function(b,c){var f=a.extend(!0,{},k.opts);j(c,f,a.extend(!0,{},k.userOptions),k.dataAttribute);var g=h(f,k.noMasksCache);g!==d&&(c.inputmask!==d&&(c.inputmask.opts.autoUnmask=!0,c.inputmask.remove()),c.inputmask=new e(d,d,!0),c.inputmask.opts=f,c.inputmask.noMasksCache=k.noMasksCache,c.inputmask.userOptions=a.extend(!0,{},k.userOptions),c.inputmask.isRTL=f.isRTL||f.numericInput,c.inputmask.el=c,c.inputmask.maskset=g,a.data(c,"_inputmask_opts",f),i.call(c.inputmask,{action:"mask"}))}),g&&g[0]?g[0].inputmask||this:this},option:function(b,c){return"string"==typeof b?this.opts[b]:"object"===(void 0===b?"undefined":g(b))?(a.extend(this.userOptions,b),this.el&&!0!==c&&this.mask(this.el),this):void 0},unmaskedvalue:function(a){return this.maskset=this.maskset||h(this.opts,this.noMasksCache),i.call(this,{action:"unmaskedvalue",value:a})},remove:function(){return i.call(this,{action:"remove"})},getemptymask:function(){return this.maskset=this.maskset||h(this.opts,this.noMasksCache),i.call(this,{action:"getemptymask"})},hasMaskedValue:function(){return!this.opts.autoUnmask},isComplete:function(){return this.maskset=this.maskset||h(this.opts,this.noMasksCache),i.call(this,{action:"isComplete"})},getmetadata:function(){return this.maskset=this.maskset||h(this.opts,this.noMasksCache),i.call(this,{action:"getmetadata"})},isValid:function(a){return this.maskset=this.maskset||h(this.opts,this.noMasksCache),i.call(this,{action:"isValid",value:a})},format:function(a,b){return this.maskset=this.maskset||h(this.opts,this.noMasksCache),i.call(this,{action:"format",value:a,metadata:b})},analyseMask:function(b,c,f){function g(a,b,c,d){this.matches=[],this.openGroup=a||!1,this.alternatorGroup=!1,this.isGroup=a||!1,this.isOptional=b||!1,this.isQuantifier=c||!1,this.isAlternator=d||!1,this.quantifier={min:1,max:1}}function h(b,g,h){h=h!==d?h:b.matches.length;var i=b.matches[h-1];if(c)0===g.indexOf("[")||u&&/\\d|\\s|\\w]/i.test(g)||"."===g?b.matches.splice(h++,0,{fn:new RegExp(g,f.casing?"i":""),cardinality:1,optionality:b.isOptional,newBlockMarker:i===d||i.def!==g,casing:null,def:g,placeholder:d,nativeDef:g}):(u&&(g=g[g.length-1]),a.each(g.split(""),function(a,c){i=b.matches[h-1],b.matches.splice(h++,0,{fn:null,cardinality:0,optionality:b.isOptional,newBlockMarker:i===d||i.def!==c&&null!==i.fn,casing:null,def:f.staticDefinitionSymbol||c,placeholder:f.staticDefinitionSymbol!==d?c:d,nativeDef:c})})),u=!1;else{var j=(f.definitions?f.definitions[g]:d)||e.prototype.definitions[g];if(j&&!u){for(var k=j.prevalidator,l=k?k.length:0,m=1;m<j.cardinality;m++){var n=l>=m?k[m-1]:[],o=n.validator,p=n.cardinality;b.matches.splice(h++,0,{fn:o?"string"==typeof o?new RegExp(o,f.casing?"i":""):new function(){this.test=o}:new RegExp("."),cardinality:p||1,optionality:b.isOptional,newBlockMarker:i===d||i.def!==(j.definitionSymbol||g),casing:j.casing,def:j.definitionSymbol||g,placeholder:j.placeholder,nativeDef:g}),i=b.matches[h-1]}b.matches.splice(h++,0,{fn:j.validator?"string"==typeof j.validator?new RegExp(j.validator,f.casing?"i":""):new function(){this.test=j.validator}:new RegExp("."),cardinality:j.cardinality,optionality:b.isOptional,newBlockMarker:i===d||i.def!==(j.definitionSymbol||g),casing:j.casing,def:j.definitionSymbol||g,placeholder:j.placeholder,nativeDef:g})}else b.matches.splice(h++,0,{fn:null,cardinality:0,optionality:b.isOptional,newBlockMarker:i===d||i.def!==g&&null!==i.fn,casing:null,def:f.staticDefinitionSymbol||g,placeholder:f.staticDefinitionSymbol!==d?g:d,nativeDef:g}),u=!1}}function i(b){b&&b.matches&&a.each(b.matches,function(a,e){var g=b.matches[a+1];(g===d||g.matches===d||!1===g.isQuantifier)&&e&&e.isGroup&&(e.isGroup=!1,c||(h(e,f.groupmarker.start,0),!0!==e.openGroup&&h(e,f.groupmarker.end))),i(e)})}function j(){if(w.length>0){if(o=w[w.length-1],h(o,m),o.isAlternator){p=w.pop();for(var a=0;a<p.matches.length;a++)p.matches[a].isGroup=!1;w.length>0?(o=w[w.length-1],o.matches.push(p)):v.matches.push(p)}}else h(v,m)}function k(a){a.matches=a.matches.reverse();for(var b in a.matches)if(a.matches.hasOwnProperty(b)){var c=parseInt(b);if(a.matches[b].isQuantifier&&a.matches[c+1]&&a.matches[c+1].isGroup){var e=a.matches[b];a.matches.splice(b,1),a.matches.splice(c+1,0,e)}a.matches[b].matches!==d?a.matches[b]=k(a.matches[b]):a.matches[b]=function(a){return a===f.optionalmarker.start?a=f.optionalmarker.end:a===f.optionalmarker.end?a=f.optionalmarker.start:a===f.groupmarker.start?a=f.groupmarker.end:a===f.groupmarker.end&&(a=f.groupmarker.start),a}(a.matches[b])}return a}var l,m,n,o,p,q,r,s=/(?:[?*+]|\{[0-9\+\*]+(?:,[0-9\+\*]*)?\})|[^.?*+^${[]()|\\]+|./g,t=/\[\^?]?(?:[^\\\]]+|\\[\S\s]?)*]?|\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\S\s]?)|\((?:\?[:=!]?)?|(?:[?*+]|\{[0-9]+(?:,[0-9]*)?\})\??|[^.?*+^${[()|\\]+|./g,u=!1,v=new g,w=[],x=[];for(c&&(f.optionalmarker.start=d,f.optionalmarker.end=d);l=c?t.exec(b):s.exec(b);){if(m=l[0],c)switch(m.charAt(0)){case"?":m="{0,1}";break;case"+":case"*":m="{"+m+"}"}if(u)j();else switch(m.charAt(0)){case f.escapeChar:u=!0,c&&j();break;case f.optionalmarker.end:case f.groupmarker.end:if(n=w.pop(),n.openGroup=!1,n!==d)if(w.length>0){if(o=w[w.length-1],o.matches.push(n),o.isAlternator){p=w.pop();for(var y=0;y<p.matches.length;y++)p.matches[y].isGroup=!1,p.matches[y].alternatorGroup=!1;w.length>0?(o=w[w.length-1],o.matches.push(p)):v.matches.push(p)}}else v.matches.push(n);else j();break;case f.optionalmarker.start:w.push(new g(!1,!0));break;case f.groupmarker.start:w.push(new g(!0));break;case f.quantifiermarker.start:var z=new g(!1,!1,!0);m=m.replace(/[{}]/g,"");var A=m.split(","),B=isNaN(A[0])?A[0]:parseInt(A[0]),C=1===A.length?B:isNaN(A[1])?A[1]:parseInt(A[1]);if("*"!==C&&"+"!==C||(B="*"===C?0:1),z.quantifier={min:B,max:C},w.length>0){var D=w[w.length-1].matches;l=D.pop(),l.isGroup||(r=new g(!0),r.matches.push(l),l=r),D.push(l),D.push(z)}else l=v.matches.pop(),l.isGroup||(c&&null===l.fn&&"."===l.def&&(l.fn=new RegExp(l.def,f.casing?"i":"")),r=new g(!0),r.matches.push(l),l=r),v.matches.push(l),v.matches.push(z);break;case f.alternatormarker:if(w.length>0){o=w[w.length-1];var E=o.matches[o.matches.length-1];q=o.openGroup&&(E.matches===d||!1===E.isGroup&&!1===E.isAlternator)?w.pop():o.matches.pop()}else q=v.matches.pop();if(q.isAlternator)w.push(q);else if(q.alternatorGroup?(p=w.pop(),q.alternatorGroup=!1):p=new g(!1,!1,!1,!0),p.matches.push(q),w.push(p),q.openGroup){q.openGroup=!1;var F=new g(!0);F.alternatorGroup=!0,w.push(F)}break;default:j()}}for(;w.length>0;)n=w.pop(),v.matches.push(n);return v.matches.length>0&&(i(v),x.push(v)),(f.numericInput||f.isRTL)&&k(x[0]),x}},e.extendDefaults=function(b){a.extend(!0,e.prototype.defaults,b)},e.extendDefinitions=function(b){a.extend(!0,e.prototype.definitions,b)},e.extendAliases=function(b){a.extend(!0,e.prototype.aliases,b)},e.format=function(a,b,c){return e(b).format(a,c)},e.unmask=function(a,b){return e(b).unmaskedvalue(a)},e.isValid=function(a,b){return e(b).isValid(a)},e.remove=function(b){a.each(b,function(a,b){b.inputmask&&b.inputmask.remove()})},e.escapeRegex=function(a){var b=["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^"];return a.replace(new RegExp("(\\"+b.join("|\\")+")","gim"),"\\$1")},e.keyCode={ALT:18,BACKSPACE:8,BACKSPACE_SAFARI:127,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91,X:88},e})},function(a,b){a.exports=jQuery},function(a,b,c){"use strict";var d,e,f;"function"==typeof Symbol&&Symbol.iterator,function(g){e=[c(0),c(1)],d=g,void 0!==(f="function"==typeof d?d.apply(b,e):d)&&(a.exports=f)}(function(a,b){function c(a){return isNaN(a)||29===new Date(a,2,0).getDate()}return b.extendAliases({"dd/mm/yyyy":{mask:"1/2/y",placeholder:"dd/mm/yyyy",regex:{val1pre:new RegExp("[0-3]"),val1:new RegExp("0[1-9]|[12][0-9]|3[01]"),val2pre:function(a){var c=b.escapeRegex.call(this,a);return new RegExp("((0[1-9]|[12][0-9]|3[01])"+c+"[01])")},val2:function(a){
3
+ var c=b.escapeRegex.call(this,a);return new RegExp("((0[1-9]|[12][0-9])"+c+"(0[1-9]|1[012]))|(30"+c+"(0[13-9]|1[012]))|(31"+c+"(0[13578]|1[02]))")}},leapday:"29/02/",separator:"/",yearrange:{minyear:1900,maxyear:2099},isInYearRange:function(a,b,c){if(isNaN(a))return!1;var d=parseInt(a.concat(b.toString().slice(a.length))),e=parseInt(a.concat(c.toString().slice(a.length)));return!isNaN(d)&&b<=d&&d<=c||!isNaN(e)&&b<=e&&e<=c},determinebaseyear:function(a,b,c){var d=(new Date).getFullYear();if(a>d)return a;if(b<d){for(var e=b.toString().slice(0,2),f=b.toString().slice(2,4);b<e+c;)e--;var g=e+f;return a>g?a:g}if(a<=d&&d<=b){for(var h=d.toString().slice(0,2);b<h+c;)h--;var i=h+c;return i<a?a:i}return d},onKeyDown:function(c,d,e,f){var g=a(this);if(c.ctrlKey&&c.keyCode===b.keyCode.RIGHT){var h=new Date;g.val(h.getDate().toString()+(h.getMonth()+1).toString()+h.getFullYear().toString()),g.trigger("setvalue")}},getFrontValue:function(a,b,c){for(var d=0,e=0,f=0;f<a.length&&"2"!==a.charAt(f);f++){var g=c.definitions[a.charAt(f)];g?(d+=e,e=g.cardinality):e++}return b.join("").substr(d,e)},postValidation:function(a,b,d){var e,f,g=a.join("");return 0===d.mask.indexOf("y")?(f=g.substr(0,4),e=g.substring(4,10)):(f=g.substring(6,10),e=g.substr(0,6)),b&&(e!==d.leapday||c(f))},definitions:{1:{validator:function(a,b,c,d,e){if("3"==a.charAt(0)&&new RegExp("[2-9]").test(a.charAt(1)))return a="30",b.buffer[c]="0",c++,{pos:c};var f=e.regex.val1.test(a);return d||f||a.charAt(1)!==e.separator&&-1==="-./".indexOf(a.charAt(1))||!(f=e.regex.val1.test("0"+a.charAt(0)))?f:(b.buffer[c-1]="0",{refreshFromBuffer:{start:c-1,end:c},pos:c,c:a.charAt(0)})},cardinality:2,prevalidator:[{validator:function(a,b,c,d,e){var f=a;isNaN(b.buffer[c+1])||(f+=b.buffer[c+1]);var g=1===f.length?e.regex.val1pre.test(f):e.regex.val1.test(f);if(!d&&!g){if(g=e.regex.val1.test(a+"0"))return b.buffer[c]=a,b.buffer[++c]="0",{pos:c,c:"0"};if(g=e.regex.val1.test("0"+a))return b.buffer[c]="0",c++,{pos:c}}return g},cardinality:1}]},2:{validator:function(a,b,c,d,e){var f=e.getFrontValue(b.mask,b.buffer,e);if(-1!==f.indexOf(e.placeholder[0])&&(f="01"+e.separator),"1"==a.charAt(0)&&new RegExp("[3-9]").test(a.charAt(1)))return a="10",b.buffer[c]="0",c++,{pos:c};var g=e.regex.val2(e.separator).test(f+a);return d||g||a.charAt(1)!==e.separator&&-1==="-./".indexOf(a.charAt(1))||!(g=e.regex.val2(e.separator).test(f+"0"+a.charAt(0)))?g:(b.buffer[c-1]="0",{refreshFromBuffer:{start:c-1,end:c},pos:c,c:a.charAt(0)})},cardinality:2,prevalidator:[{validator:function(a,b,c,d,e){isNaN(b.buffer[c+1])||(a+=b.buffer[c+1]);var f=e.getFrontValue(b.mask,b.buffer,e);-1!==f.indexOf(e.placeholder[0])&&(f="01"+e.separator);var g=1===a.length?e.regex.val2pre(e.separator).test(f+a):e.regex.val2(e.separator).test(f+a);return d||g||!(g=e.regex.val2(e.separator).test(f+"0"+a))?g:(b.buffer[c]="0",c++,{pos:c})},cardinality:1}]},y:{validator:function(a,b,c,d,e){return e.isInYearRange(a,e.yearrange.minyear,e.yearrange.maxyear)},cardinality:4,prevalidator:[{validator:function(a,b,c,d,e){var f=e.isInYearRange(a,e.yearrange.minyear,e.yearrange.maxyear);if(!d&&!f){var g=e.determinebaseyear(e.yearrange.minyear,e.yearrange.maxyear,a+"0").toString().slice(0,1);if(f=e.isInYearRange(g+a,e.yearrange.minyear,e.yearrange.maxyear))return b.buffer[c++]=g.charAt(0),{pos:c};if(g=e.determinebaseyear(e.yearrange.minyear,e.yearrange.maxyear,a+"0").toString().slice(0,2),f=e.isInYearRange(g+a,e.yearrange.minyear,e.yearrange.maxyear))return b.buffer[c++]=g.charAt(0),b.buffer[c++]=g.charAt(1),{pos:c}}return f},cardinality:1},{validator:function(a,b,c,d,e){var f=e.isInYearRange(a,e.yearrange.minyear,e.yearrange.maxyear);if(!d&&!f){var g=e.determinebaseyear(e.yearrange.minyear,e.yearrange.maxyear,a).toString().slice(0,2);if(f=e.isInYearRange(a[0]+g[1]+a[1],e.yearrange.minyear,e.yearrange.maxyear))return b.buffer[c++]=g.charAt(1),{pos:c};if(g=e.determinebaseyear(e.yearrange.minyear,e.yearrange.maxyear,a).toString().slice(0,2),f=e.isInYearRange(g+a,e.yearrange.minyear,e.yearrange.maxyear))return b.buffer[c-1]=g.charAt(0),b.buffer[c++]=g.charAt(1),b.buffer[c++]=a.charAt(0),{refreshFromBuffer:{start:c-3,end:c},pos:c}}return f},cardinality:2},{validator:function(a,b,c,d,e){return e.isInYearRange(a,e.yearrange.minyear,e.yearrange.maxyear)},cardinality:3}]}},insertMode:!1,autoUnmask:!1},"mm/dd/yyyy":{placeholder:"mm/dd/yyyy",alias:"dd/mm/yyyy",regex:{val2pre:function(a){var c=b.escapeRegex.call(this,a);return new RegExp("((0[13-9]|1[012])"+c+"[0-3])|(02"+c+"[0-2])")},val2:function(a){var c=b.escapeRegex.call(this,a);return new RegExp("((0[1-9]|1[012])"+c+"(0[1-9]|[12][0-9]))|((0[13-9]|1[012])"+c+"30)|((0[13578]|1[02])"+c+"31)")},val1pre:new RegExp("[01]"),val1:new RegExp("0[1-9]|1[012]")},leapday:"02/29/",onKeyDown:function(c,d,e,f){var g=a(this);if(c.ctrlKey&&c.keyCode===b.keyCode.RIGHT){var h=new Date;g.val((h.getMonth()+1).toString()+h.getDate().toString()+h.getFullYear().toString()),g.trigger("setvalue")}}},"yyyy/mm/dd":{mask:"y/1/2",placeholder:"yyyy/mm/dd",alias:"mm/dd/yyyy",leapday:"/02/29",onKeyDown:function(c,d,e,f){var g=a(this);if(c.ctrlKey&&c.keyCode===b.keyCode.RIGHT){var h=new Date;g.val(h.getFullYear().toString()+(h.getMonth()+1).toString()+h.getDate().toString()),g.trigger("setvalue")}}},"dd.mm.yyyy":{mask:"1.2.y",placeholder:"dd.mm.yyyy",leapday:"29.02.",separator:".",alias:"dd/mm/yyyy"},"dd-mm-yyyy":{mask:"1-2-y",placeholder:"dd-mm-yyyy",leapday:"29-02-",separator:"-",alias:"dd/mm/yyyy"},"mm.dd.yyyy":{mask:"1.2.y",placeholder:"mm.dd.yyyy",leapday:"02.29.",separator:".",alias:"mm/dd/yyyy"},"mm-dd-yyyy":{mask:"1-2-y",placeholder:"mm-dd-yyyy",leapday:"02-29-",separator:"-",alias:"mm/dd/yyyy"},"yyyy.mm.dd":{mask:"y.1.2",placeholder:"yyyy.mm.dd",leapday:".02.29",separator:".",alias:"yyyy/mm/dd"},"yyyy-mm-dd":{mask:"y-1-2",placeholder:"yyyy-mm-dd",leapday:"-02-29",separator:"-",alias:"yyyy/mm/dd"},datetime:{mask:"1/2/y h:s",placeholder:"dd/mm/yyyy hh:mm",alias:"dd/mm/yyyy",regex:{hrspre:new RegExp("[012]"),hrs24:new RegExp("2[0-4]|1[3-9]"),hrs:new RegExp("[01][0-9]|2[0-4]"),ampm:new RegExp("^[a|p|A|P][m|M]"),mspre:new RegExp("[0-5]"),ms:new RegExp("[0-5][0-9]")},timeseparator:":",hourFormat:"24",definitions:{h:{validator:function(a,b,c,d,e){if("24"===e.hourFormat&&24===parseInt(a,10))return b.buffer[c-1]="0",b.buffer[c]="0",{refreshFromBuffer:{start:c-1,end:c},c:"0"};var f=e.regex.hrs.test(a);if(!d&&!f&&(a.charAt(1)===e.timeseparator||-1!=="-.:".indexOf(a.charAt(1)))&&(f=e.regex.hrs.test("0"+a.charAt(0))))return b.buffer[c-1]="0",b.buffer[c]=a.charAt(0),c++,{refreshFromBuffer:{start:c-2,end:c},pos:c,c:e.timeseparator};if(f&&"24"!==e.hourFormat&&e.regex.hrs24.test(a)){var g=parseInt(a,10);return 24===g?(b.buffer[c+5]="a",b.buffer[c+6]="m"):(b.buffer[c+5]="p",b.buffer[c+6]="m"),g-=12,g<10?(b.buffer[c]=g.toString(),b.buffer[c-1]="0"):(b.buffer[c]=g.toString().charAt(1),b.buffer[c-1]=g.toString().charAt(0)),{refreshFromBuffer:{start:c-1,end:c+6},c:b.buffer[c]}}return f},cardinality:2,prevalidator:[{validator:function(a,b,c,d,e){var f=e.regex.hrspre.test(a);return d||f||!(f=e.regex.hrs.test("0"+a))?f:(b.buffer[c]="0",c++,{pos:c})},cardinality:1}]},s:{validator:"[0-5][0-9]",cardinality:2,prevalidator:[{validator:function(a,b,c,d,e){var f=e.regex.mspre.test(a);return d||f||!(f=e.regex.ms.test("0"+a))?f:(b.buffer[c]="0",c++,{pos:c})},cardinality:1}]},t:{validator:function(a,b,c,d,e){return e.regex.ampm.test(a+"m")},casing:"lower",cardinality:1}},insertMode:!1,autoUnmask:!1},datetime12:{mask:"1/2/y h:s t\\m",placeholder:"dd/mm/yyyy hh:mm xm",alias:"datetime",hourFormat:"12"},"mm/dd/yyyy hh:mm xm":{mask:"1/2/y h:s t\\m",placeholder:"mm/dd/yyyy hh:mm xm",alias:"datetime12",regex:{val2pre:function(a){var c=b.escapeRegex.call(this,a);return new RegExp("((0[13-9]|1[012])"+c+"[0-3])|(02"+c+"[0-2])")},val2:function(a){var c=b.escapeRegex.call(this,a);return new RegExp("((0[1-9]|1[012])"+c+"(0[1-9]|[12][0-9]))|((0[13-9]|1[012])"+c+"30)|((0[13578]|1[02])"+c+"31)")},val1pre:new RegExp("[01]"),val1:new RegExp("0[1-9]|1[012]")},leapday:"02/29/",onKeyDown:function(c,d,e,f){var g=a(this);if(c.ctrlKey&&c.keyCode===b.keyCode.RIGHT){var h=new Date;g.val((h.getMonth()+1).toString()+h.getDate().toString()+h.getFullYear().toString()),g.trigger("setvalue")}}},"hh:mm t":{mask:"h:s t\\m",placeholder:"hh:mm xm",alias:"datetime",hourFormat:"12"},"h:s t":{mask:"h:s t\\m",placeholder:"hh:mm xm",alias:"datetime",hourFormat:"12"},"hh:mm:ss":{mask:"h:s:s",placeholder:"hh:mm:ss",alias:"datetime",autoUnmask:!1},"hh:mm":{mask:"h:s",placeholder:"hh:mm",alias:"datetime",autoUnmask:!1},date:{alias:"dd/mm/yyyy"},"mm/yyyy":{mask:"1/y",placeholder:"mm/yyyy",leapday:"donotuse",separator:"/",alias:"mm/dd/yyyy"},shamsi:{regex:{val2pre:function(a){var c=b.escapeRegex.call(this,a);return new RegExp("((0[1-9]|1[012])"+c+"[0-3])")},val2:function(a){var c=b.escapeRegex.call(this,a);return new RegExp("((0[1-9]|1[012])"+c+"(0[1-9]|[12][0-9]))|((0[1-9]|1[012])"+c+"30)|((0[1-6])"+c+"31)")},val1pre:new RegExp("[01]"),val1:new RegExp("0[1-9]|1[012]")},yearrange:{minyear:1300,maxyear:1499},mask:"y/1/2",leapday:"/12/30",placeholder:"yyyy/mm/dd",alias:"mm/dd/yyyy",clearIncomplete:!0},"yyyy-mm-dd hh:mm:ss":{mask:"y-1-2 h:s:s",placeholder:"yyyy-mm-dd hh:mm:ss",alias:"datetime",separator:"-",leapday:"-02-29",regex:{val2pre:function(a){var c=b.escapeRegex.call(this,a);return new RegExp("((0[13-9]|1[012])"+c+"[0-3])|(02"+c+"[0-2])")},val2:function(a){var c=b.escapeRegex.call(this,a);return new RegExp("((0[1-9]|1[012])"+c+"(0[1-9]|[12][0-9]))|((0[13-9]|1[012])"+c+"30)|((0[13578]|1[02])"+c+"31)")},val1pre:new RegExp("[01]"),val1:new RegExp("0[1-9]|1[012]")},onKeyDown:function(a,b,c,d){}}}),b})},function(a,b,c){"use strict";var d,e,f;"function"==typeof Symbol&&Symbol.iterator,function(g){e=[c(0),c(1)],d=g,void 0!==(f="function"==typeof d?d.apply(b,e):d)&&(a.exports=f)}(function(a,b){return b.extendDefinitions({A:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",cardinality:1,casing:"upper"},"&":{validator:"[0-9A-Za-zА-яЁёÀ-ÿµ]",cardinality:1,casing:"upper"},"#":{validator:"[0-9A-Fa-f]",cardinality:1,casing:"upper"}}),b.extendAliases({url:{definitions:{i:{validator:".",cardinality:1}},mask:"(\\http://)|(\\http\\s://)|(ftp://)|(ftp\\s://)i{+}",insertMode:!1,autoUnmask:!1,inputmode:"url"},ip:{mask:"i[i[i]].i[i[i]].i[i[i]].i[i[i]]",definitions:{i:{validator:function(a,b,c,d,e){return c-1>-1&&"."!==b.buffer[c-1]?(a=b.buffer[c-1]+a,a=c-2>-1&&"."!==b.buffer[c-2]?b.buffer[c-2]+a:"0"+a):a="00"+a,new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]").test(a)},cardinality:1}},onUnMask:function(a,b,c){return a},inputmode:"numeric"},email:{mask:"*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]",greedy:!1,onBeforePaste:function(a,b){return a=a.toLowerCase(),a.replace("mailto:","")},definitions:{"*":{validator:"[0-9A-Za-z!#$%&'*+/=?^_`{|}~-]",cardinality:1,casing:"lower"},"-":{validator:"[0-9A-Za-z-]",cardinality:1,casing:"lower"}},onUnMask:function(a,b,c){return a},inputmode:"email"},mac:{mask:"##:##:##:##:##:##"},vin:{mask:"V{13}9{4}",definitions:{V:{validator:"[A-HJ-NPR-Za-hj-npr-z\\d]",cardinality:1,casing:"upper"}},clearIncomplete:!0,autoUnmask:!0}}),b})},function(a,b,c){"use strict";var d,e,f;"function"==typeof Symbol&&Symbol.iterator,function(g){e=[c(0),c(1)],d=g,void 0!==(f="function"==typeof d?d.apply(b,e):d)&&(a.exports=f)}(function(a,b,c){function d(a,c){for(var d="",e=0;e<a.length;e++)b.prototype.definitions[a.charAt(e)]||c.definitions[a.charAt(e)]||c.optionalmarker.start===a.charAt(e)||c.optionalmarker.end===a.charAt(e)||c.quantifiermarker.start===a.charAt(e)||c.quantifiermarker.end===a.charAt(e)||c.groupmarker.start===a.charAt(e)||c.groupmarker.end===a.charAt(e)||c.alternatormarker===a.charAt(e)?d+="\\"+a.charAt(e):d+=a.charAt(e);return d}return b.extendAliases({numeric:{mask:function(a){if(0!==a.repeat&&isNaN(a.integerDigits)&&(a.integerDigits=a.repeat),a.repeat=0,a.groupSeparator===a.radixPoint&&a.digits&&"0"!==a.digits&&("."===a.radixPoint?a.groupSeparator=",":","===a.radixPoint?a.groupSeparator=".":a.groupSeparator="")," "===a.groupSeparator&&(a.skipOptionalPartCharacter=c),a.autoGroup=a.autoGroup&&""!==a.groupSeparator,a.autoGroup&&("string"==typeof a.groupSize&&isFinite(a.groupSize)&&(a.groupSize=parseInt(a.groupSize)),isFinite(a.integerDigits))){var b=Math.floor(a.integerDigits/a.groupSize),e=a.integerDigits%a.groupSize;a.integerDigits=parseInt(a.integerDigits)+(0===e?b-1:b),a.integerDigits<1&&(a.integerDigits="*")}a.placeholder.length>1&&(a.placeholder=a.placeholder.charAt(0)),"radixFocus"===a.positionCaretOnClick&&""===a.placeholder&&!1===a.integerOptional&&(a.positionCaretOnClick="lvp"),a.definitions[";"]=a.definitions["~"],a.definitions[";"].definitionSymbol="~",!0===a.numericInput&&(a.positionCaretOnClick="radixFocus"===a.positionCaretOnClick?"lvp":a.positionCaretOnClick,a.digitsOptional=!1,isNaN(a.digits)&&(a.digits=2),a.decimalProtect=!1);var f="[+]";if(f+=d(a.prefix,a),!0===a.integerOptional?f+="~{1,"+a.integerDigits+"}":f+="~{"+a.integerDigits+"}",a.digits!==c){a.radixPointDefinitionSymbol=a.decimalProtect?":":a.radixPoint;var g=a.digits.toString().split(",");isFinite(g[0]&&g[1]&&isFinite(g[1]))?f+=a.radixPointDefinitionSymbol+";{"+a.digits+"}":(isNaN(a.digits)||parseInt(a.digits)>0)&&(a.digitsOptional?f+="["+a.radixPointDefinitionSymbol+";{1,"+a.digits+"}]":f+=a.radixPointDefinitionSymbol+";{"+a.digits+"}")}return f+=d(a.suffix,a),f+="[-]",a.greedy=!1,f},placeholder:"",greedy:!1,digits:"*",digitsOptional:!0,enforceDigitsOnBlur:!1,radixPoint:".",positionCaretOnClick:"radixFocus",groupSize:3,groupSeparator:"",autoGroup:!1,allowMinus:!0,negationSymbol:{front:"-",back:""},integerDigits:"+",integerOptional:!0,prefix:"",suffix:"",rightAlign:!0,decimalProtect:!0,min:null,max:null,step:1,insertMode:!0,autoUnmask:!1,unmaskAsNumber:!1,inputmode:"numeric",preValidation:function(b,d,e,f,g){if("-"===e||e===g.negationSymbol.front)return!0===g.allowMinus&&(g.isNegative=g.isNegative===c||!g.isNegative,""===b.join("")||{caret:d,dopost:!0});if(!1===f&&e===g.radixPoint&&g.digits!==c&&(isNaN(g.digits)||parseInt(g.digits)>0)){var h=a.inArray(g.radixPoint,b);if(-1!==h)return!0===g.numericInput?d===h:{caret:h+1}}return!0},postValidation:function(d,e,f){var g=f.suffix.split(""),h=f.prefix.split("");if(e.pos===c&&e.caret!==c&&!0!==e.dopost)return e;var i=e.caret!==c?e.caret:e.pos,j=d.slice();f.numericInput&&(i=j.length-i-1,j=j.reverse());var k=j[i];if(k===f.groupSeparator&&(i+=1,k=j[i]),i===j.length-f.suffix.length-1&&k===f.radixPoint)return e;k!==c&&k!==f.radixPoint&&k!==f.negationSymbol.front&&k!==f.negationSymbol.back&&(j[i]="?",f.prefix.length>0&&i>=(!1===f.isNegative?1:0)&&i<f.prefix.length-1+(!1===f.isNegative?1:0)?h[i-(!1===f.isNegative?1:0)]="?":f.suffix.length>0&&i>=j.length-f.suffix.length-(!1===f.isNegative?1:0)&&(g[i-(j.length-f.suffix.length-(!1===f.isNegative?1:0))]="?")),h=h.join(""),g=g.join("");var l=j.join("").replace(h,"");if(l=l.replace(g,""),l=l.replace(new RegExp(b.escapeRegex(f.groupSeparator),"g"),""),l=l.replace(new RegExp("[-"+b.escapeRegex(f.negationSymbol.front)+"]","g"),""),l=l.replace(new RegExp(b.escapeRegex(f.negationSymbol.back)+"$"),""),isNaN(f.placeholder)&&(l=l.replace(new RegExp(b.escapeRegex(f.placeholder),"g"),"")),l.length>1&&1!==l.indexOf(f.radixPoint)&&("0"===k&&(l=l.replace(/^\?/g,"")),l=l.replace(/^0/g,"")),l.charAt(0)===f.radixPoint&&""!==f.radixPoint&&!0!==f.numericInput&&(l="0"+l),""!==l){if(l=l.split(""),(!f.digitsOptional||f.enforceDigitsOnBlur&&"blur"===e.event)&&isFinite(f.digits)){var m=a.inArray(f.radixPoint,l),n=a.inArray(f.radixPoint,j);-1===m&&(l.push(f.radixPoint),m=l.length-1);for(var o=1;o<=f.digits;o++)f.digitsOptional&&(!f.enforceDigitsOnBlur||"blur"!==e.event)||l[m+o]!==c&&l[m+o]!==f.placeholder.charAt(0)?-1!==n&&j[n+o]!==c&&(l[m+o]=l[m+o]||j[n+o]):l[m+o]=e.placeholder||f.placeholder.charAt(0)}if(!0!==f.autoGroup||""===f.groupSeparator||k===f.radixPoint&&e.pos===c&&!e.dopost)l=l.join("");else{var p=l[l.length-1]===f.radixPoint&&e.c===f.radixPoint;l=b(function(a,b){var c="";if(c+="("+b.groupSeparator+"*{"+b.groupSize+"}){*}",""!==b.radixPoint){var d=a.join("").split(b.radixPoint);d[1]&&(c+=b.radixPoint+"*{"+d[1].match(/^\d*\??\d*/)[0].length+"}")}return c}(l,f),{numericInput:!0,jitMasking:!0,definitions:{"*":{validator:"[0-9?]",cardinality:1}}}).format(l.join("")),p&&(l+=f.radixPoint),l.charAt(0)===f.groupSeparator&&l.substr(1)}}if(f.isNegative&&"blur"===e.event&&(f.isNegative="0"!==l),l=h+l,l+=g,f.isNegative&&(l=f.negationSymbol.front+l,l+=f.negationSymbol.back),l=l.split(""),k!==c)if(k!==f.radixPoint&&k!==f.negationSymbol.front&&k!==f.negationSymbol.back)i=a.inArray("?",l),i>-1?l[i]=k:i=e.caret||0;else if(k===f.radixPoint||k===f.negationSymbol.front||k===f.negationSymbol.back){var q=a.inArray(k,l);-1!==q&&(i=q)}f.numericInput&&(i=l.length-i-1,l=l.reverse());var r={caret:k===c||e.pos!==c?i+(f.numericInput?-1:1):i,buffer:l,refreshFromBuffer:e.dopost||d.join("")!==l.join("")};return r.refreshFromBuffer?r:e},onBeforeWrite:function(d,e,f,g){if(d)switch(d.type){case"keydown":return g.postValidation(e,{caret:f,dopost:!0},g);case"blur":case"checkval":var h;if(function(a){a.parseMinMaxOptions===c&&(null!==a.min&&(a.min=a.min.toString().replace(new RegExp(b.escapeRegex(a.groupSeparator),"g"),""),","===a.radixPoint&&(a.min=a.min.replace(a.radixPoint,".")),a.min=isFinite(a.min)?parseFloat(a.min):NaN,isNaN(a.min)&&(a.min=Number.MIN_VALUE)),null!==a.max&&(a.max=a.max.toString().replace(new RegExp(b.escapeRegex(a.groupSeparator),"g"),""),","===a.radixPoint&&(a.max=a.max.replace(a.radixPoint,".")),a.max=isFinite(a.max)?parseFloat(a.max):NaN,isNaN(a.max)&&(a.max=Number.MAX_VALUE)),a.parseMinMaxOptions="done")}(g),null!==g.min||null!==g.max){if(h=g.onUnMask(e.join(""),c,a.extend({},g,{unmaskAsNumber:!0})),null!==g.min&&h<g.min)return g.isNegative=g.min<0,g.postValidation(g.min.toString().replace(".",g.radixPoint).split(""),{caret:f,dopost:!0,placeholder:"0"},g);if(null!==g.max&&h>g.max)return g.isNegative=g.max<0,g.postValidation(g.max.toString().replace(".",g.radixPoint).split(""),{caret:f,dopost:!0,placeholder:"0"},g)}return g.postValidation(e,{caret:f,placeholder:"0",event:"blur"},g);case"_checkval":return{caret:f}}},regex:{integerPart:function(a,c){return c?new RegExp("["+b.escapeRegex(a.negationSymbol.front)+"+]?"):new RegExp("["+b.escapeRegex(a.negationSymbol.front)+"+]?\\d+")},integerNPart:function(a){return new RegExp("[\\d"+b.escapeRegex(a.groupSeparator)+b.escapeRegex(a.placeholder.charAt(0))+"]+")}},definitions:{"~":{validator:function(a,d,e,f,g,h){var i=f?new RegExp("[0-9"+b.escapeRegex(g.groupSeparator)+"]").test(a):new RegExp("[0-9]").test(a);if(!0===i){if(!0!==g.numericInput&&d.validPositions[e]!==c&&"~"===d.validPositions[e].match.def&&!h){var j=d.buffer.join("");j=j.replace(new RegExp("[-"+b.escapeRegex(g.negationSymbol.front)+"]","g"),""),j=j.replace(new RegExp(b.escapeRegex(g.negationSymbol.back)+"$"),"");var k=j.split(g.radixPoint);k.length>1&&(k[1]=k[1].replace(/0/g,g.placeholder.charAt(0))),"0"===k[0]&&(k[0]=k[0].replace(/0/g,g.placeholder.charAt(0))),j=k[0]+g.radixPoint+k[1]||"";var l=d._buffer.join("");for(j===g.radixPoint&&(j=l);null===j.match(b.escapeRegex(l)+"$");)l=l.slice(1);j=j.replace(l,""),j=j.split(""),i=j[e]===c?{pos:e,remove:e}:{pos:e}}}else f||a!==g.radixPoint||d.validPositions[e-1]!==c||(d.buffer[e]="0",i={pos:e+1});return i},cardinality:1},"+":{validator:function(a,b,c,d,e){return e.allowMinus&&("-"===a||a===e.negationSymbol.front)},cardinality:1,placeholder:""},"-":{validator:function(a,b,c,d,e){return e.allowMinus&&a===e.negationSymbol.back},cardinality:1,placeholder:""},":":{validator:function(a,c,d,e,f){var g="["+b.escapeRegex(f.radixPoint)+"]",h=new RegExp(g).test(a);return h&&c.validPositions[d]&&c.validPositions[d].match.placeholder===f.radixPoint&&(h={caret:d+1}),h},cardinality:1,placeholder:function(a){return a.radixPoint}}},onUnMask:function(a,c,d){if(""===c&&!0===d.nullable)return c;var e=a.replace(d.prefix,"");return e=e.replace(d.suffix,""),e=e.replace(new RegExp(b.escapeRegex(d.groupSeparator),"g"),""),""!==d.placeholder.charAt(0)&&(e=e.replace(new RegExp(d.placeholder.charAt(0),"g"),"0")),d.unmaskAsNumber?(""!==d.radixPoint&&-1!==e.indexOf(d.radixPoint)&&(e=e.replace(b.escapeRegex.call(this,d.radixPoint),".")),e=e.replace(new RegExp("^"+b.escapeRegex(d.negationSymbol.front)),"-"),e=e.replace(new RegExp(b.escapeRegex(d.negationSymbol.back)+"$"),""),Number(e)):e},isComplete:function(a,c){var d=a.join("");if(a.slice().join("")!==d)return!1;var e=d.replace(c.prefix,"");return e=e.replace(c.suffix,""),e=e.replace(new RegExp(b.escapeRegex(c.groupSeparator),"g"),""),","===c.radixPoint&&(e=e.replace(b.escapeRegex(c.radixPoint),".")),isFinite(e)},onBeforeMask:function(a,d){if(d.isNegative=c,a=a.toString().charAt(a.length-1)===d.radixPoint?a.toString().substr(0,a.length-1):a.toString(),""!==d.radixPoint&&isFinite(a)){var e=a.split("."),f=""!==d.groupSeparator?parseInt(d.groupSize):0;2===e.length&&(e[0].length>f||e[1].length>f||e[0].length<=f&&e[1].length<f)&&(a=a.replace(".",d.radixPoint))}var g=a.match(/,/g),h=a.match(/\./g);if(h&&g?h.length>g.length?(a=a.replace(/\./g,""),a=a.replace(",",d.radixPoint)):g.length>h.length?(a=a.replace(/,/g,""),a=a.replace(".",d.radixPoint)):a=a.indexOf(".")<a.indexOf(",")?a.replace(/\./g,""):a.replace(/,/g,""):a=a.replace(new RegExp(b.escapeRegex(d.groupSeparator),"g"),""),0===d.digits&&(-1!==a.indexOf(".")?a=a.substring(0,a.indexOf(".")):-1!==a.indexOf(",")&&(a=a.substring(0,a.indexOf(",")))),""!==d.radixPoint&&isFinite(d.digits)&&-1!==a.indexOf(d.radixPoint)){var i=a.split(d.radixPoint),j=i[1].match(new RegExp("\\d*"))[0];if(parseInt(d.digits)<j.toString().length){var k=Math.pow(10,parseInt(d.digits));a=a.replace(b.escapeRegex(d.radixPoint),"."),a=Math.round(parseFloat(a)*k)/k,a=a.toString().replace(".",d.radixPoint)}}return a},canClearPosition:function(a,b,c,d,e){var f=a.validPositions[b],g=f.input!==e.radixPoint||null!==a.validPositions[b].match.fn&&!1===e.decimalProtect||f.input===e.radixPoint&&a.validPositions[b+1]&&null===a.validPositions[b+1].match.fn||isFinite(f.input)||b===c||f.input===e.groupSeparator||f.input===e.negationSymbol.front||f.input===e.negationSymbol.back;return!g||"+"!==f.match.nativeDef&&"-"!==f.match.nativeDef||(e.isNegative=!1),g},onKeyDown:function(c,d,e,f){var g=a(this);if(c.ctrlKey)switch(c.keyCode){case b.keyCode.UP:g.val(parseFloat(this.inputmask.unmaskedvalue())+parseInt(f.step)),g.trigger("setvalue");break;case b.keyCode.DOWN:g.val(parseFloat(this.inputmask.unmaskedvalue())-parseInt(f.step)),g.trigger("setvalue")}}},currency:{prefix:"$ ",groupSeparator:",",alias:"numeric",placeholder:"0",autoGroup:!0,digits:2,digitsOptional:!1,clearMaskOnLostFocus:!1},decimal:{alias:"numeric"},integer:{alias:"numeric",digits:0,radixPoint:""},percentage:{alias:"numeric",digits:2,digitsOptional:!0,radixPoint:".",placeholder:"0",autoGroup:!1,min:0,max:100,suffix:" %",allowMinus:!1}}),b})},function(a,b,c){"use strict";var d,e,f;"function"==typeof Symbol&&Symbol.iterator,function(g){e=[c(0),c(1)],d=g,void 0!==(f="function"==typeof d?d.apply(b,e):d)&&(a.exports=f)}(function(a,b){function c(a,b){var c=(a.mask||a).replace(/#/g,"9").replace(/\)/,"9").replace(/[+()#-]/g,""),d=(b.mask||b).replace(/#/g,"9").replace(/\)/,"9").replace(/[+()#-]/g,""),e=(a.mask||a).split("#")[0],f=(b.mask||b).split("#")[0];return 0===f.indexOf(e)?-1:0===e.indexOf(f)?1:c.localeCompare(d)}var d=b.prototype.analyseMask;return b.prototype.analyseMask=function(b,c,e){function f(a,c,d){c=c||"",d=d||h,""!==c&&(d[c]={});for(var e="",g=d[c]||d,i=a.length-1;i>=0;i--)b=a[i].mask||a[i],e=b.substr(0,1),g[e]=g[e]||[],g[e].unshift(b.substr(1)),a.splice(i,1);for(var j in g)g[j].length>500&&f(g[j].slice(),j,g)}function g(b){var c="",d=[];for(var f in b)a.isArray(b[f])?1===b[f].length?d.push(f+b[f]):d.push(f+e.groupmarker.start+b[f].join(e.groupmarker.end+e.alternatormarker+e.groupmarker.start)+e.groupmarker.end):d.push(f+g(b[f]));return 1===d.length?c+=d[0]:c+=e.groupmarker.start+d.join(e.groupmarker.end+e.alternatormarker+e.groupmarker.start)+e.groupmarker.end,c}var h={};return e.phoneCodes&&(e.phoneCodes&&e.phoneCodes.length>1e3&&(b=b.substr(1,b.length-2),f(b.split(e.groupmarker.end+e.alternatormarker+e.groupmarker.start)),b=g(h)),b=b.replace(/9/g,"\\9")),d.call(this,b,c,e)},b.extendAliases({abstractphone:{groupmarker:{start:"<",end:">"},countrycode:"",phoneCodes:[],mask:function(a){return a.definitions={"#":b.prototype.definitions[9]},a.phoneCodes.sort(c)},keepStatic:!0,onBeforeMask:function(a,b){var c=a.replace(/^0{1,2}/,"").replace(/[\s]/g,"");return(c.indexOf(b.countrycode)>1||-1===c.indexOf(b.countrycode))&&(c="+"+b.countrycode+c),c},onUnMask:function(a,b,c){return a.replace(/[()#-]/g,"")},inputmode:"tel"}}),b})},function(a,b,c){"use strict";var d,e,f,g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};!function(g){e=[c(2),c(1)],d=g,void 0!==(f="function"==typeof d?d.apply(b,e):d)&&(a.exports=f)}(function(a,b){return void 0===a.fn.inputmask&&(a.fn.inputmask=function(c,d){var e,f=this[0];if(void 0===d&&(d={}),"string"==typeof c)switch(c){case"unmaskedvalue":return f&&f.inputmask?f.inputmask.unmaskedvalue():a(f).val();case"remove":return this.each(function(){this.inputmask&&this.inputmask.remove()});case"getemptymask":return f&&f.inputmask?f.inputmask.getemptymask():"";case"hasMaskedValue":return!(!f||!f.inputmask)&&f.inputmask.hasMaskedValue();case"isComplete":return!f||!f.inputmask||f.inputmask.isComplete();case"getmetadata":return f&&f.inputmask?f.inputmask.getmetadata():void 0;case"setvalue":a(f).val(d),f&&void 0===f.inputmask&&a(f).triggerHandler("setvalue");break;case"option":if("string"!=typeof d)return this.each(function(){if(void 0!==this.inputmask)return this.inputmask.option(d)});if(f&&void 0!==f.inputmask)return f.inputmask.option(d);break;default:return d.alias=c,e=new b(d),this.each(function(){e.mask(this)})}else{if("object"==(void 0===c?"undefined":g(c)))return e=new b(c),void 0===c.mask&&void 0===c.alias?this.each(function(){if(void 0!==this.inputmask)return this.inputmask.option(c);e.mask(this)}):this.each(function(){e.mask(this)});if(void 0===c)return this.each(function(){e=new b(d),e.mask(this)})}}),a.fn.inputmask})},function(a,b,c){var d=c(12);"string"==typeof d&&(d=[[a.i,d,""]]),c(14)(d,{}),d.locals&&(a.exports=d.locals)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}c(8),c(3),c(4),c(5),c(6);var e=c(1),f=d(e),g=c(0),h=d(g),i=c(2),j=d(i);h.default===j.default&&c(7),window.Inputmask=f.default},function(a,b,c){"use strict";var d;"function"==typeof Symbol&&Symbol.iterator,void 0!==(d=function(){return document}.call(b,c,b,a))&&(a.exports=d)},function(a,b,c){"use strict";var d;"function"==typeof Symbol&&Symbol.iterator,void 0!==(d=function(){return window}.call(b,c,b,a))&&(a.exports=d)},function(a,b,c){b=a.exports=c(13)(void 0),b.push([a.i,"span.im-caret {\r\n -webkit-animation: 1s blink step-end infinite;\r\n animation: 1s blink step-end infinite;\r\n}\r\n\r\n@keyframes blink {\r\n from, to {\r\n border-right-color: black;\r\n }\r\n 50% {\r\n border-right-color: transparent;\r\n }\r\n}\r\n\r\n@-webkit-keyframes blink {\r\n from, to {\r\n border-right-color: black;\r\n }\r\n 50% {\r\n border-right-color: transparent;\r\n }\r\n}\r\n\r\nspan.im-static {\r\n color: grey;\r\n}\r\n\r\ndiv.im-colormask {\r\n display: inline-block;\r\n border-style: inset;\r\n border-width: 2px;\r\n -webkit-appearance: textfield;\r\n -moz-appearance: textfield;\r\n appearance: textfield;\r\n}\r\n\r\ndiv.im-colormask > input {\r\n position: absolute;\r\n display: inline-block;\r\n background-color: transparent;\r\n color: transparent;\r\n -webkit-appearance: caret;\r\n -moz-appearance: caret;\r\n appearance: caret;\r\n border-style: none;\r\n left: 0; /*calculated*/\r\n}\r\n\r\ndiv.im-colormask > input:focus {\r\n outline: none;\r\n}\r\n\r\ndiv.im-colormask > div {\r\n color: black;\r\n display: inline-block;\r\n width: 100px; /*calculated*/\r\n}",""])},function(a,b){function c(a,b){var c=a[1]||"",e=a[3];if(!e)return c;if(b&&"function"==typeof btoa){var f=d(e);return[c].concat(e.sources.map(function(a){return"/*# sourceURL="+e.sourceRoot+a+" */"})).concat([f]).join("\n")}return[c].join("\n")}function d(a){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"}a.exports=function(a){var b=[];return b.toString=function(){return this.map(function(b){var d=c(b,a);return b[2]?"@media "+b[2]+"{"+d+"}":d}).join("")},b.i=function(a,c){"string"==typeof a&&(a=[[null,a,""]]);for(var d={},e=0;e<this.length;e++){var f=this[e][0];"number"==typeof f&&(d[f]=!0)}for(e=0;e<a.length;e++){var g=a[e];"number"==typeof g[0]&&d[g[0]]||(c&&!g[2]?g[2]=c:c&&(g[2]="("+g[2]+") and ("+c+")"),b.push(g))}},b}},function(a,b,c){function d(a,b){for(var c=0;c<a.length;c++){var d=a[c],e=o[d.id];if(e){e.refs++;for(var f=0;f<e.parts.length;f++)e.parts[f](d.parts[f]);for(;f<d.parts.length;f++)e.parts.push(k(d.parts[f],b))}else{for(var g=[],f=0;f<d.parts.length;f++)g.push(k(d.parts[f],b));o[d.id]={id:d.id,refs:1,parts:g}}}}function e(a){for(var b=[],c={},d=0;d<a.length;d++){var e=a[d],f=e[0],g=e[1],h=e[2],i=e[3],j={css:g,media:h,sourceMap:i};c[f]?c[f].parts.push(j):b.push(c[f]={id:f,parts:[j]})}return b}function f(a,b){var c=q(a.insertInto);if(!c)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var d=t[t.length-1];if("top"===a.insertAt)d?d.nextSibling?c.insertBefore(b,d.nextSibling):c.appendChild(b):c.insertBefore(b,c.firstChild),t.push(b);else{if("bottom"!==a.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");c.appendChild(b)}}function g(a){a.parentNode.removeChild(a);var b=t.indexOf(a);b>=0&&t.splice(b,1)}function h(a){var b=document.createElement("style");return a.attrs.type="text/css",j(b,a.attrs),f(a,b),b}function i(a){var b=document.createElement("link");return a.attrs.type="text/css",a.attrs.rel="stylesheet",j(b,a.attrs),f(a,b),b}function j(a,b){Object.keys(b).forEach(function(c){a.setAttribute(c,b[c])})}function k(a,b){var c,d,e;if(b.singleton){var f=s++;c=r||(r=h(b)),d=l.bind(null,c,f,!1),e=l.bind(null,c,f,!0)}else a.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(c=i(b),d=n.bind(null,c,b),e=function(){g(c),c.href&&URL.revokeObjectURL(c.href)}):(c=h(b),d=m.bind(null,c),e=function(){g(c)});return d(a),function(b){if(b){if(b.css===a.css&&b.media===a.media&&b.sourceMap===a.sourceMap)return;d(a=b)}else e()}}function l(a,b,c,d){var e=c?"":d.css;if(a.styleSheet)a.styleSheet.cssText=v(b,e);else{var f=document.createTextNode(e),g=a.childNodes;g[b]&&a.removeChild(g[b]),g.length?a.insertBefore(f,g[b]):a.appendChild(f)}}function m(a,b){var c=b.css,d=b.media;if(d&&a.setAttribute("media",d),a.styleSheet)a.styleSheet.cssText=c;else{for(;a.firstChild;)a.removeChild(a.firstChild);a.appendChild(document.createTextNode(c))}}function n(a,b,c){var d=c.css,e=c.sourceMap,f=void 0===b.convertToAbsoluteUrls&&e;(b.convertToAbsoluteUrls||f)&&(d=u(d)),e&&(d+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */");var g=new Blob([d],{type:"text/css"}),h=a.href;a.href=URL.createObjectURL(g),h&&URL.revokeObjectURL(h)}var o={},p=function(a){var b;return function(){return void 0===b&&(b=a.apply(this,arguments)),b}}(function(){return window&&document&&document.all&&!window.atob}),q=function(a){var b={};return function(c){return void 0===b[c]&&(b[c]=a.call(this,c)),b[c]}}(function(a){
4
+ return document.querySelector(a)}),r=null,s=0,t=[],u=c(15);a.exports=function(a,b){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");b=b||{},b.attrs="object"==typeof b.attrs?b.attrs:{},void 0===b.singleton&&(b.singleton=p()),void 0===b.insertInto&&(b.insertInto="head"),void 0===b.insertAt&&(b.insertAt="bottom");var c=e(a);return d(c,b),function(a){for(var f=[],g=0;g<c.length;g++){var h=c[g],i=o[h.id];i.refs--,f.push(i)}a&&d(e(a),b);for(var g=0;g<f.length;g++){var i=f[g];if(0===i.refs){for(var j=0;j<i.parts.length;j++)i.parts[j]();delete o[i.id]}}}};var v=function(){var a=[];return function(b,c){return a[b]=c,a.filter(Boolean).join("\n")}}()},function(a,b){a.exports=function(a){var b="undefined"!=typeof window&&window.location;if(!b)throw new Error("fixUrls requires window.location");if(!a||"string"!=typeof a)return a;var c=b.protocol+"//"+b.host,d=c+b.pathname.replace(/\/[^\/]*$/,"/");return a.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(a,b){var e=b.trim().replace(/^"(.*)"$/,function(a,b){return b}).replace(/^'(.*)'$/,function(a,b){return b});if(/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(e))return a;var f;return f=0===e.indexOf("//")?e:0===e.indexOf("/")?c+e:d+e.replace(/^\.\//,""),"url("+JSON.stringify(f)+")"})}}]),jQuery&&function(a){a.extend(a.fn,{miniColors:function(b,c){var d=function(b,c,d){var e=s(b.val());e||(e="ffffff");var f=x(e),h=a('<span class="input-group-addon" style="background-color: #'+e+'" href="#"></span>');h.insertAfter(b),b.addClass("miniColors").data("original-maxlength",b.attr("maxlength")||null).data("original-autocomplete",b.attr("autocomplete")||null).data("letterCase",c.letterCase?c.letterCase:"uppercase").data("trigger",h).data("hsb",f).data("change",c.change?c.change:null).data("close",c.close?c.close:null).data("open",c.open?c.open:null).attr("maxlength",7).attr("autocomplete","off").val("#"+o(e,c.letterCase)).trigger("change"),c.readonly&&b.prop("readonly",!0),c.disabled&&g(b),h.on("click.miniColors",function(a){a.preventDefault(),""===b.val()&&b.val("#").trigger("change"),i(b)}),b.on("focus.miniColors",function(a){""===b.val()&&b.val("#").trigger("change"),i(b)}),b.on("blur.miniColors",function(a){var c=s(y(b.data("hsb")));b.val(c?"#"+o(c,b.data("letterCase")):"").trigger("change")}),b.on("keydown.miniColors",function(a){9===a.keyCode&&j(b)}),b.on("keyup.miniColors",function(a){n(b)}),b.on("paste.miniColors",function(a){setTimeout(function(){n(b)},5)})},e=function(b){j(),b=a(b),b.data("trigger").remove(),b.attr("autocomplete",b.data("original-autocomplete")).attr("maxlength",b.data("original-maxlength")).removeData().removeClass("miniColors").off(".miniColors"),a(document).off(".miniColors")},f=function(a){a.prop("disabled",!1).data("trigger").css("opacity",1)},g=function(a){j(a),a.prop("disabled",!0).data("trigger").css("opacity",.5)},i=function(b){if(b.prop("disabled"))return!1;j();var c=a('<div class="miniColors-selector"></div>');c.append('<div class="miniColors-colors" style="background-color: #FFF;"><div class="miniColors-colorPicker"><div class="miniColors-colorPicker-inner"></div></div>').append('<div class="miniColors-hues"><div class="miniColors-huePicker"></div></div>').css("display","none").addClass(b.attr("class")).removeClass("form-control");var d=b.data("hsb");c.find(".miniColors-colors").css("backgroundColor","#"+y({h:d.h,s:100,b:100}));var e=b.data("colorPosition");e||(e=p(d)),c.find(".miniColors-colorPicker").css("top",e.y+"px").css("left",e.x+"px");var f=b.data("huePosition");f||(f=q(d)),c.find(".miniColors-huePicker").css("top",f.y+"px"),b.data("selector",c).data("huePicker",c.find(".miniColors-huePicker")).data("colorPicker",c.find(".miniColors-colorPicker")).data("mousebutton",0),a("BODY").append(c);var g=b.data("trigger"),h=!b.is(":visible"),i=h?g.offset().top+g.outerHeight():b.offset().top+b.outerHeight(),m=h?g.offset().left:b.offset().left,n=c.outerWidth(),o=c.outerHeight(),r=g.outerWidth(),s=g.outerHeight(),u=a(window).height(),v=a(window).width(),w=a(window).scrollTop(),x=a(window).scrollLeft();i+o>u+w&&(i=i-o-s),m+n>v+x&&(m=m-n+r),c.css({top:i,left:m}).fadeIn(100),c.on("selectstart",function(){return!1}),(!a.browser.msie||a.browser.msie&&a.browser.version>=9)&&a(window).on("resize.miniColors",function(a){j(b)}),a(document).on("mousedown.miniColors touchstart.miniColors",function(c){b.data("mousebutton",1);var d=a(c.target).parents().andSelf();if(d.hasClass("miniColors-colors")&&(c.preventDefault(),b.data("moving","colors"),k(b,c)),d.hasClass("miniColors-hues")&&(c.preventDefault(),b.data("moving","hues"),l(b,c)),d.hasClass("miniColors-selector"))return void c.preventDefault();d.hasClass("miniColors")||j(b)}),a(document).on("mouseup.miniColors touchend.miniColors",function(a){a.preventDefault(),b.data("mousebutton",0).removeData("moving")}).on("mousemove.miniColors touchmove.miniColors",function(a){a.preventDefault(),1===b.data("mousebutton")&&("colors"===b.data("moving")&&k(b,a),"hues"===b.data("moving")&&l(b,a))}),b.data("open")&&b.data("open").call(b.get(0),"#"+y(d),t(d))},j=function(b){b||(b=a(".miniColors")),b.each(function(){var c=a(this).data("selector");a(this).removeData("selector"),a(c).fadeOut(100,function(){if(b.data("close")){var c=b.data("hsb"),d=y(c);b.data("close").call(b.get(0),"#"+d,t(c))}a(this).remove()})}),a(document).off(".miniColors")},k=function(a,b){var c=a.data("colorPicker");c.hide();var d={x:b.pageX,y:b.pageY};b.originalEvent.changedTouches&&(d.x=b.originalEvent.changedTouches[0].pageX,d.y=b.originalEvent.changedTouches[0].pageY),d.x=d.x-a.data("selector").find(".miniColors-colors").offset().left-5,d.y=d.y-a.data("selector").find(".miniColors-colors").offset().top-5,d.x<=-5&&(d.x=-5),d.x>=144&&(d.x=144),d.y<=-5&&(d.y=-5),d.y>=144&&(d.y=144),a.data("colorPosition",d),c.css("left",d.x).css("top",d.y).show();var e=Math.round(.67*(d.x+5));e<0&&(e=0),e>100&&(e=100);var f=100-Math.round(.67*(d.y+5));f<0&&(f=0),f>100&&(f=100);var g=a.data("hsb");g.s=e,g.b=f,m(a,g,!0)},l=function(a,b){var c=a.data("huePicker");c.hide();var d={y:b.pageY};b.originalEvent.changedTouches&&(d.y=b.originalEvent.changedTouches[0].pageY),d.y=d.y-a.data("selector").find(".miniColors-colors").offset().top-1,d.y<=-1&&(d.y=-1),d.y>=149&&(d.y=149),a.data("huePosition",d),c.css("top",d.y).show();var e=Math.round(2.4*(150-d.y-1));e<0&&(e=0),e>360&&(e=360);var f=a.data("hsb");f.h=e,m(a,f,!0)},m=function(a,b,c){a.data("hsb",b);var d=y(b);if(c&&a.val("#"+o(d,a.data("letterCase"))).trigger("change"),a.data("trigger").css("backgroundColor","#"+d),a.data("selector")&&a.data("selector").find(".miniColors-colors").css("backgroundColor","#"+y({h:b.h,s:100,b:100})),a.data("change")){if(d===a.data("lastChange"))return;a.data("change").call(a.get(0),"#"+d,t(b)),a.data("lastChange",d)}},n=function(b){b.val("#"+r(b.val())).trigger("change");var c=s(b.val());if(!c)return!1;var d=x(c),e=b.data("hsb");if(d.h===e.h&&d.s===e.s&&d.b===e.b)return!0;var f=p(d);a(b.data("colorPicker")).css("top",f.y+"px").css("left",f.x+"px"),b.data("colorPosition",f);var g=q(d);return a(b.data("huePicker")).css("top",g.y+"px"),b.data("huePosition",g),m(b,d),!0},o=function(a,b){return"lowercase"===b?a.toLowerCase():"uppercase"===b?a.toUpperCase():a},p=function(a){var b=Math.ceil(a.s/.67);b<0&&(b=0),b>150&&(b=150);var c=150-Math.ceil(a.b/.67);return c<0&&(c=0),c>150&&(c=150),{x:b-5,y:c-5}},q=function(a){var b=150-a.h/2.4;return b<0&&(h=0),b>150&&(h=150),{y:b-1}},r=function(a){return a.replace(/[^A-F0-9]/gi,"")},s=function(a){return(a=r(a))?(3===a.length&&(a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]),6===a.length?a:null):null},t=function(a){var b={},c=Math.round(a.h),d=Math.round(255*a.s/100),e=Math.round(255*a.b/100);if(0===d)b.r=b.g=b.b=e;else{var f=e,g=(255-d)*e/255,h=c%60*(f-g)/60;360===c&&(c=0),c<60?(b.r=f,b.b=g,b.g=g+h):c<120?(b.g=f,b.b=g,b.r=f-h):c<180?(b.g=f,b.r=g,b.b=g+h):c<240?(b.b=f,b.r=g,b.g=f-h):c<300?(b.b=f,b.g=g,b.r=g+h):c<360?(b.r=f,b.g=g,b.b=f-h):(b.r=0,b.g=0,b.b=0)}return{r:Math.round(b.r),g:Math.round(b.g),b:Math.round(b.b)}},u=function(b){var c=[b.r.toString(16),b.g.toString(16),b.b.toString(16)];return a.each(c,function(a,b){1===b.length&&(c[a]="0"+b)}),c.join("")},v=function(a){return a=parseInt(a.indexOf("#")>-1?a.substring(1):a,16),{r:a>>16,g:(65280&a)>>8,b:255&a}},w=function(a){var b={h:0,s:0,b:0},c=Math.min(a.r,a.g,a.b),d=Math.max(a.r,a.g,a.b),e=d-c;return b.b=d,b.s=0!==d?255*e/d:0,0!==b.s?a.r===d?b.h=(a.g-a.b)/e:a.g===d?b.h=2+(a.b-a.r)/e:b.h=4+(a.r-a.g)/e:b.h=-1,b.h*=60,b.h<0&&(b.h+=360),b.s*=100/255,b.b*=100/255,b},x=function(a){var b=w(v(a));return 0===b.s&&(b.h=360),b},y=function(a){return u(t(a))};switch(b){case"readonly":return a(this).each(function(){a(this).hasClass("miniColors")&&a(this).prop("readonly",c)}),a(this);case"disabled":return a(this).each(function(){a(this).hasClass("miniColors")&&(c?g(a(this)):f(a(this)))}),a(this);case"value":if(void 0===c){if(!a(this).hasClass("miniColors"))return;var z=a(this),A=s(z.val());return A?"#"+o(A,z.data("letterCase")):null}return a(this).each(function(){a(this).hasClass("miniColors")&&(a(this).val(c).trigger("change"),n(a(this)))}),a(this);case"destroy":return a(this).each(function(){a(this).hasClass("miniColors")&&e(a(this))}),a(this);default:return b||(b={}),a(this).each(function(){"input"===a(this)[0].tagName.toLowerCase()&&(a(this).data("trigger")||d(a(this),b))}),a(this)}}})}(jQuery),document.addEventListener("load",color_picker_init,!1),jQuery(document).ajaxComplete(function(){color_picker_init()}),function(a,b){function c(){return new Date(Date.UTC.apply(Date,arguments))}function d(){var a=new Date;return c(a.getFullYear(),a.getMonth(),a.getDate())}function e(a){return function(){return this[a].apply(this,arguments)}}function f(b,c){function d(a,b){return b.toLowerCase()}var e,f=a(b).data(),g={},h=new RegExp("^"+c.toLowerCase()+"([A-Z])");c=new RegExp("^"+c.toLowerCase());for(var i in f)c.test(i)&&(e=i.replace(h,d),g[e]=f[i]);return g}function g(b){var c={};if(o[b]||(b=b.split("-")[0],o[b])){var d=o[b];return a.each(n,function(a,b){b in d&&(c[b]=d[b])}),c}}var h=a(window),i=function(){var b={get:function(a){return this.slice(a)[0]},contains:function(a){for(var b=a&&a.valueOf(),c=0,d=this.length;c<d;c++)if(this[c].valueOf()===b)return c;return-1},remove:function(a){this.splice(a,1)},replace:function(b){b&&(a.isArray(b)||(b=[b]),this.clear(),this.push.apply(this,b))},clear:function(){this.splice(0)},copy:function(){var a=new i;return a.replace(this),a}};return function(){var c=[];return c.push.apply(c,arguments),a.extend(c,b),c}}(),j=function(b,c){this.dates=new i,this.viewDate=d(),this.focusDate=null,this._process_options(c),this.element=a(b),this.isInline=!1,this.isInput=this.element.is("input"),this.component=!!this.element.is(".date")&&this.element.find(".add-on, .input-group-addon, .btn"),this.hasInput=this.component&&this.element.find("input").length,this.component&&0===this.component.length&&(this.component=!1),this.picker=a(p.template),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("cfdatepicker-inline").appendTo(this.element):this.picker.addClass("cfdatepicker-dropdown dropdown-menu"),this.o.rtl&&this.picker.addClass("cfdatepicker-rtl"),this.viewMode=this.o.startView,this.o.calendarWeeks&&this.picker.find("tfoot th.today").attr("colspan",function(a,b){return parseInt(b)+1}),this._allow_update=!1,this.setStartDate(this._o.startDate),this.setEndDate(this._o.endDate),this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled),this.fillDow(),this.fillMonths(),this._allow_update=!0,this.update(),this.showMode(),this.isInline&&this.show()};j.prototype={constructor:j,_process_options:function(b){this._o=a.extend({},this._o,b);var c=this.o=a.extend({},this._o),d=c.language;switch(o[d]||(d=d.split("-")[0],o[d]||(d=m.language)),c.language=d,c.startView){case 2:case"decade":c.startView=2;break;case 1:case"year":c.startView=1;break;default:c.startView=0}switch(c.minViewMode){case 1:case"months":c.minViewMode=1;break;case 2:case"years":c.minViewMode=2;break;default:c.minViewMode=0}c.startView=Math.max(c.startView,c.minViewMode),!0!==c.multidate&&(c.multidate=Number(c.multidate)||!1,!1!==c.multidate?c.multidate=Math.max(0,c.multidate):c.multidate=1),c.multidateSeparator=String(c.multidateSeparator),c.weekStart%=7,c.weekEnd=(c.weekStart+6)%7;var e=p.parseFormat(c.format);c.startDate!==-1/0&&(c.startDate?c.startDate instanceof Date?c.startDate=this._local_to_utc(this._zero_time(c.startDate)):c.startDate=p.parseDate(c.startDate,e,c.language):c.startDate=-1/0),c.endDate!==1/0&&(c.endDate?c.endDate instanceof Date?c.endDate=this._local_to_utc(this._zero_time(c.endDate)):c.endDate=p.parseDate(c.endDate,e,c.language):c.endDate=1/0),c.daysOfWeekDisabled=c.daysOfWeekDisabled||[],a.isArray(c.daysOfWeekDisabled)||(c.daysOfWeekDisabled=c.daysOfWeekDisabled.split(/[,\s]*/)),c.daysOfWeekDisabled=a.map(c.daysOfWeekDisabled,function(a){return parseInt(a,10)});var f=String(c.orientation).toLowerCase().split(/\s+/g),g=c.orientation.toLowerCase();if(f=a.grep(f,function(a){return/^auto|left|right|top|bottom$/.test(a)}),c.orientation={x:"auto",y:"auto"},g&&"auto"!==g)if(1===f.length)switch(f[0]){case"top":case"bottom":c.orientation.y=f[0];break;case"left":case"right":c.orientation.x=f[0]}else g=a.grep(f,function(a){return/^left|right$/.test(a)}),c.orientation.x=g[0]||"auto",g=a.grep(f,function(a){return/^top|bottom$/.test(a)}),c.orientation.y=g[0]||"auto";else;},_events:[],_secondaryEvents:[],_applyEvents:function(a){for(var b,c,d,e=0;e<a.length;e++)b=a[e][0],2===a[e].length?(c=void 0,d=a[e][1]):3===a[e].length&&(c=a[e][1],d=a[e][2]),b.on(d,c)},_unapplyEvents:function(a){for(var b,c,d,e=0;e<a.length;e++)b=a[e][0],2===a[e].length?(d=void 0,c=a[e][1]):3===a[e].length&&(d=a[e][1],c=a[e][2]),b.off(c,d)},_buildEvents:function(){this.isInput?this._events=[[this.element,{focus:a.proxy(this.show,this),keyup:a.proxy(function(b){-1===a.inArray(b.keyCode,[27,37,39,38,40,32,13,9])&&this.update()},this),keydown:a.proxy(this.keydown,this)}]]:this.component&&this.hasInput?this._events=[[this.element.find("input"),{focus:a.proxy(this.show,this),keyup:a.proxy(function(b){-1===a.inArray(b.keyCode,[27,37,39,38,40,32,13,9])&&this.update()},this),keydown:a.proxy(this.keydown,this)}],[this.component,{click:a.proxy(this.show,this)}]]:this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:a.proxy(this.show,this)}]],this._events.push([this.element,"*",{blur:a.proxy(function(a){this._focused_from=a.target},this)}],[this.element,{blur:a.proxy(function(a){this._focused_from=a.target},this)}]),this._secondaryEvents=[[this.picker,{click:a.proxy(this.click,this)}],[a(window),{resize:a.proxy(this.place,this)}],[a(document),{"mousedown touchstart":a.proxy(function(a){this.element.is(a.target)||this.element.find(a.target).length||this.picker.is(a.target)||this.picker.find(a.target).length||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(b,c){var d=c||this.dates.get(-1),e=this._utc_to_local(d);this.element.trigger({type:b,date:e,dates:a.map(this.dates,this._utc_to_local),format:a.proxy(function(a,b){0===arguments.length?(a=this.dates.length-1,b=this.o.format):"string"==typeof a&&(b=a,a=this.dates.length-1),b=b||this.o.format;var c=this.dates.get(a);return p.formatDate(c,b,this.o.language)},this)})},show:function(){this.isInline||this.picker.appendTo("body"),this.picker.show(),this.place(),this._attachSecondaryEvents(),this._trigger("show")},hide:function(){this.isInline||this.picker.is(":visible")&&(this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.viewMode=this.o.startView,this.showMode(),this.o.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())&&this.setValue(),this._trigger("hide"))},remove:function(){this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().cfdatepicker,this.isInput||delete this.element.data().date},_utc_to_local:function(a){return a&&new Date(a.getTime()+6e4*a.getTimezoneOffset())},_local_to_utc:function(a){return a&&new Date(a.getTime()-6e4*a.getTimezoneOffset())},_zero_time:function(a){return a&&new Date(a.getFullYear(),a.getMonth(),a.getDate())},_zero_utc_time:function(a){return a&&new Date(Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()))},getDates:function(){return a.map(this.dates,this._utc_to_local)},getUTCDates:function(){return a.map(this.dates,function(a){return new Date(a)})},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){return new Date(this.dates.get(-1))},setDates:function(){var b=a.isArray(arguments[0])?arguments[0]:arguments;this.update.apply(this,b),this._trigger("changeDate"),this.setValue()},setUTCDates:function(){var b=a.isArray(arguments[0])?arguments[0]:arguments;this.update.apply(this,a.map(b,this._utc_to_local)),this._trigger("changeDate"),this.setValue()},setDate:e("setDates"),setUTCDate:e("setUTCDates"),setValue:function(){var a=this.getFormattedDate();this.isInput?this.element.val(a).change():this.component&&this.element.find("input").val(a).change()},getFormattedDate:function(b){void 0===b&&(b=this.o.format);var c=this.o.language;return a.map(this.dates,function(a){return p.formatDate(a,b,c)}).join(this.o.multidateSeparator)},setStartDate:function(a){this._process_options({startDate:a}),this.update(),this.updateNavArrows()},setEndDate:function(a){this._process_options({endDate:a}),this.update(),this.updateNavArrows()},setDaysOfWeekDisabled:function(a){this._process_options({daysOfWeekDisabled:a}),this.update(),this.updateNavArrows()},place:function(){if(!this.isInline){var b,c=this.picker.outerWidth(),d=this.picker.outerHeight(),e=h.width(),f=h.height(),g=h.scrollTop(),i=jQuery(this.element).data("form-id"),j=document.getElementById("modal-"+i+"-content");b=null!==j?1e4:parseInt(this.element.parents().filter(function(){return"auto"!==a(this).css("z-index")}).first().css("z-index"))+10;var k=this.component?this.component.parent().offset():this.element.offset(),l=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),m=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),n=k.left,o=k.top;this.picker.removeClass("cfdatepicker-orient-top cfdatepicker-orient-bottom cfdatepicker-orient-right cfdatepicker-orient-left"),"auto"!==this.o.orientation.x?(this.picker.addClass("cfdatepicker-orient-"+this.o.orientation.x),"right"===this.o.orientation.x&&(n-=c-m)):(this.picker.addClass("cfdatepicker-orient-left"),k.left<0?n-=k.left-10:k.left+c>e&&(n=e-c-10));var p,q,r=this.o.orientation.y;"auto"===r&&(p=-g+k.top-d,q=g+f-(k.top+l+d),r=Math.max(p,q)===q?"top":"bottom"),this.picker.addClass("cfdatepicker-orient-"+r),"top"===r?o+=l:o-=d+parseInt(this.picker.css("padding-top")),this.picker.css({top:o,left:n,zIndex:b})}},_allow_update:!0,update:function(){if(this._allow_update){var b=this.dates.copy(),c=[],d=!1;arguments.length?(a.each(arguments,a.proxy(function(a,b){b instanceof Date&&(b=this._local_to_utc(b)),c.push(b)},this)),d=!0):(c=this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val(),c=c&&this.o.multidate?c.split(this.o.multidateSeparator):[c],delete this.element.data().date),c=a.map(c,a.proxy(function(a){return p.parseDate(a,this.o.format,this.o.language)},this)),c=a.grep(c,a.proxy(function(a){return a<this.o.startDate||a>this.o.endDate||!a},this),!0),this.dates.replace(c),this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.viewDate>this.o.endDate&&(this.viewDate=new Date(this.o.endDate)),d?this.setValue():c.length&&String(b)!==String(this.dates)&&this._trigger("changeDate"),!this.dates.length&&b.length&&this._trigger("clearDate"),this.fill()}},fillDow:function(){var a=this.o.weekStart,b="<tr>";if(this.o.calendarWeeks){var c='<th class="cw">&nbsp;</th>';b+=c,this.picker.find(".cfdatepicker-days thead tr:first-child").prepend(c)}for(;a<this.o.weekStart+7;)b+='<th class="dow">'+o[this.o.language].daysMin[a++%7]+"</th>";b+="</tr>",this.picker.find(".cfdatepicker-days thead").append(b)},fillMonths:function(){for(var a="",b=0;b<12;)a+='<span class="month">'+o[this.o.language].monthsShort[b++]+"</span>";this.picker.find(".cfdatepicker-months td").html(a)},setRange:function(b){b&&b.length?this.range=a.map(b,function(a){return a.valueOf()}):delete this.range,this.fill()},getClassNames:function(b){var c=[],d=this.viewDate.getUTCFullYear(),e=this.viewDate.getUTCMonth(),f=new Date;return b.getUTCFullYear()<d||b.getUTCFullYear()===d&&b.getUTCMonth()<e?c.push("old"):(b.getUTCFullYear()>d||b.getUTCFullYear()===d&&b.getUTCMonth()>e)&&c.push("new"),this.focusDate&&b.valueOf()===this.focusDate.valueOf()&&c.push("focused"),this.o.todayHighlight&&b.getUTCFullYear()===f.getFullYear()&&b.getUTCMonth()===f.getMonth()&&b.getUTCDate()===f.getDate()&&c.push("today"),-1!==this.dates.contains(b)&&c.push("active"),(b.valueOf()<this.o.startDate||b.valueOf()>this.o.endDate||-1!==a.inArray(b.getUTCDay(),this.o.daysOfWeekDisabled))&&c.push("disabled"),this.range&&(b>this.range[0]&&b<this.range[this.range.length-1]&&c.push("range"),-1!==a.inArray(b.valueOf(),this.range)&&c.push("selected")),c},fill:function(){var b,d=new Date(this.viewDate),e=d.getUTCFullYear(),f=d.getUTCMonth(),g=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,h=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,i=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,j=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,k=o[this.o.language].today||o.en.today||"",l=o[this.o.language].clear||o.en.clear||"";this.picker.find(".cfdatepicker-days thead th.cfdatepicker-switch").text(o[this.o.language].months[f]+" "+e),this.picker.find("tfoot th.today").text(k).toggle(!1!==this.o.todayBtn),this.picker.find("tfoot th.clear").text(l).toggle(!1!==this.o.clearBtn),this.updateNavArrows(),this.fillMonths();var m=c(e,f-1,28),n=p.getDaysInMonth(m.getUTCFullYear(),m.getUTCMonth());m.setUTCDate(n),m.setUTCDate(n-(m.getUTCDay()-this.o.weekStart+7)%7);var q=new Date(m);q.setUTCDate(q.getUTCDate()+42),q=q.valueOf();for(var r,s=[];m.valueOf()<q;){if(m.getUTCDay()===this.o.weekStart&&(s.push("<tr>"),this.o.calendarWeeks)){var t=new Date(+m+(this.o.weekStart-m.getUTCDay()-7)%7*864e5),u=new Date(Number(t)+(11-t.getUTCDay())%7*864e5),v=new Date(Number(v=c(u.getUTCFullYear(),0,1))+(11-v.getUTCDay())%7*864e5),w=(u-v)/864e5/7+1;s.push('<td class="cw">'+w+"</td>")}if(r=this.getClassNames(m),r.push("day"),this.o.beforeShowDay!==a.noop){var x=this.o.beforeShowDay(this._utc_to_local(m));void 0===x?x={}:"boolean"==typeof x?x={enabled:x}:"string"==typeof x&&(x={classes:x}),!1===x.enabled&&r.push("disabled"),x.classes&&(r=r.concat(x.classes.split(/\s+/))),x.tooltip&&(b=x.tooltip)}r=a.unique(r),s.push('<td class="'+r.join(" ")+'"'+(b?' title="'+b+'"':"")+">"+m.getUTCDate()+"</td>"),m.getUTCDay()===this.o.weekEnd&&s.push("</tr>"),m.setUTCDate(m.getUTCDate()+1)}this.picker.find(".cfdatepicker-days tbody").empty().append(s.join(""));var y=this.picker.find(".cfdatepicker-months").find("th:eq(1)").text(e).end().find("span").removeClass("active");a.each(this.dates,function(a,b){b.getUTCFullYear()===e&&y.eq(b.getUTCMonth()).addClass("active")}),(e<g||e>i)&&y.addClass("disabled"),e===g&&y.slice(0,h).addClass("disabled"),e===i&&y.slice(j+1).addClass("disabled"),s="",e=10*parseInt(e/10,10);var z=this.picker.find(".cfdatepicker-years").find("th:eq(1)").text(e+"-"+(e+9)).end().find("td");e-=1;for(var A,B=a.map(this.dates,function(a){return a.getUTCFullYear()}),C=-1;C<11;C++)A=["year"],-1===C?A.push("old"):10===C&&A.push("new"),-1!==a.inArray(e,B)&&A.push("active"),(e<g||e>i)&&A.push("disabled"),s+='<span class="'+A.join(" ")+'">'+e+"</span>",e+=1;z.html(s)},updateNavArrows:function(){if(this._allow_update){var a=new Date(this.viewDate),b=a.getUTCFullYear(),c=a.getUTCMonth();switch(this.viewMode){case 0:this.o.startDate!==-1/0&&b<=this.o.startDate.getUTCFullYear()&&c<=this.o.startDate.getUTCMonth()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&b>=this.o.endDate.getUTCFullYear()&&c>=this.o.endDate.getUTCMonth()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 1:case 2:this.o.startDate!==-1/0&&b<=this.o.startDate.getUTCFullYear()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&b>=this.o.endDate.getUTCFullYear()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"})}}},click:function(b){b.preventDefault();var d,e,f,g=a(b.target).closest("span, td, th");if(1===g.length)switch(g[0].nodeName.toLowerCase()){case"th":switch(g[0].className){case"cfdatepicker-switch":this.showMode(1);break;case"prev":case"next":var h=p.modes[this.viewMode].navStep*("prev"===g[0].className?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,h),this._trigger("changeMonth",this.viewDate);break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,h),1===this.viewMode&&this._trigger("changeYear",this.viewDate)}this.fill();break;case"today":var i=new Date;i=c(i.getFullYear(),i.getMonth(),i.getDate(),0,0,0),this.showMode(-2);var j="linked"===this.o.todayBtn?null:"view";this._setDate(i,j);break;case"clear":var k;this.isInput?k=this.element:this.component&&(k=this.element.find("input")),k&&k.val("").change(),this.update(),this._trigger("changeDate"),this.o.autoclose&&this.hide()}break;case"span":g.is(".disabled")||(this.viewDate.setUTCDate(1),g.is(".month")?(f=1,e=g.parent().find("span").index(g),d=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(e),this._trigger("changeMonth",this.viewDate),1===this.o.minViewMode&&this._setDate(c(d,e,f))):(f=1,e=0,d=parseInt(g.text(),10)||0,this.viewDate.setUTCFullYear(d),this._trigger("changeYear",this.viewDate),2===this.o.minViewMode&&this._setDate(c(d,e,f))),this.showMode(-1),this.fill());break;case"td":g.is(".day")&&!g.is(".disabled")&&(f=parseInt(g.text(),10)||1,d=this.viewDate.getUTCFullYear(),e=this.viewDate.getUTCMonth(),g.is(".old")?0===e?(e=11,d-=1):e-=1:g.is(".new")&&(11===e?(e=0,d+=1):e+=1),this._setDate(c(d,e,f)))}this.picker.is(":visible")&&this._focused_from&&a(this._focused_from).focus(),delete this._focused_from},_toggle_multidate:function(a){var b=this.dates.contains(a);if(a?-1!==b?this.dates.remove(b):this.dates.push(a):this.dates.clear(),"number"==typeof this.o.multidate)for(;this.dates.length>this.o.multidate;)this.dates.remove(0)},_setDate:function(a,b){b&&"date"!==b||this._toggle_multidate(a&&new Date(a)),b&&"view"!==b||(this.viewDate=a&&new Date(a)),this.fill(),this.setValue(),this._trigger("changeDate");var c;this.isInput?c=this.element:this.component&&(c=this.element.find("input")),c&&c.change(),!this.o.autoclose||b&&"date"!==b||this.hide()},moveMonth:function(a,b){if(a){if(!b)return a;var c,d,e=new Date(a.valueOf()),f=e.getUTCDate(),g=e.getUTCMonth(),h=Math.abs(b);if(b=b>0?1:-1,1===h)d=-1===b?function(){return e.getUTCMonth()===g}:function(){return e.getUTCMonth()!==c},c=g+b,e.setUTCMonth(c),(c<0||c>11)&&(c=(c+12)%12);else{for(var i=0;i<h;i++)e=this.moveMonth(e,b);c=e.getUTCMonth(),e.setUTCDate(f),d=function(){return c!==e.getUTCMonth()}}for(;d();)e.setUTCDate(--f),e.setUTCMonth(c);return e}},moveYear:function(a,b){return this.moveMonth(a,12*b)},dateWithinRange:function(a){return a>=this.o.startDate&&a<=this.o.endDate},keydown:function(a){if(this.picker.is(":not(:visible)"))return void(27===a.keyCode&&this.show());var b,c,e,f=!1,g=this.focusDate||this.viewDate;switch(a.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),a.preventDefault();break;case 37:case 39:if(!this.o.keyboardNavigation)break;b=37===a.keyCode?-1:1,a.ctrlKey?(c=this.moveYear(this.dates.get(-1)||d(),b),e=this.moveYear(g,b),this._trigger("changeYear",this.viewDate)):a.shiftKey?(c=this.moveMonth(this.dates.get(-1)||d(),b),e=this.moveMonth(g,b),this._trigger("changeMonth",this.viewDate)):(c=new Date(this.dates.get(-1)||d()),c.setUTCDate(c.getUTCDate()+b),e=new Date(g),e.setUTCDate(g.getUTCDate()+b)),this.dateWithinRange(c)&&(this.focusDate=this.viewDate=e,this.setValue(),this.fill(),a.preventDefault());break;case 38:case 40:if(!this.o.keyboardNavigation)break;b=38===a.keyCode?-1:1,a.ctrlKey?(c=this.moveYear(this.dates.get(-1)||d(),b),e=this.moveYear(g,b),this._trigger("changeYear",this.viewDate)):a.shiftKey?(c=this.moveMonth(this.dates.get(-1)||d(),b),e=this.moveMonth(g,b),this._trigger("changeMonth",this.viewDate)):(c=new Date(this.dates.get(-1)||d()),c.setUTCDate(c.getUTCDate()+7*b),e=new Date(g),e.setUTCDate(g.getUTCDate()+7*b)),this.dateWithinRange(c)&&(this.focusDate=this.viewDate=e,this.setValue(),this.fill(),a.preventDefault());break;case 32:break;case 13:g=this.focusDate||this.dates.get(-1)||this.viewDate,this._toggle_multidate(g),f=!0,this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(a.preventDefault(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}if(f){this.dates.length?this._trigger("changeDate"):this._trigger("clearDate");var h;this.isInput?h=this.element:this.component&&(h=this.element.find("input")),h&&h.change()}},showMode:function(a){a&&(this.viewMode=Math.max(this.o.minViewMode,Math.min(2,this.viewMode+a))),this.picker.find(">div").hide().filter(".cfdatepicker-"+p.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()}};var k=function(b,c){this.element=a(b),this.inputs=a.map(c.inputs,function(a){return a.jquery?a[0]:a}),delete c.inputs,a(this.inputs).cfdatepicker(c).bind("changeDate",a.proxy(this.dateUpdated,this)),this.pickers=a.map(this.inputs,function(b){return a(b).data("cfdatepicker")}),this.updateDates()};k.prototype={updateDates:function(){this.dates=a.map(this.pickers,function(a){return a.getUTCDate()}),this.updateRanges()},updateRanges:function(){var b=a.map(this.dates,function(a){return a.valueOf()});a.each(this.pickers,function(a,c){c.setRange(b)})},dateUpdated:function(b){if(!this.updating){this.updating=!0;var c=a(b.target).data("cfdatepicker"),d=c.getUTCDate(),e=a.inArray(b.target,this.inputs),f=this.inputs.length;if(-1!==e){if(a.each(this.pickers,function(a,b){b.getUTCDate()||b.setUTCDate(d)}),d<this.dates[e])for(;e>=0&&d<this.dates[e];)this.pickers[e--].setUTCDate(d);else if(d>this.dates[e])for(;e<f&&d>this.dates[e];)this.pickers[e++].setUTCDate(d);this.updateDates(),delete this.updating}}},remove:function(){a.map(this.pickers,function(a){a.remove()}),delete this.element.data().cfdatepicker}};var l=a.fn.cfdatepicker;a.fn.cfdatepicker=function(b){var c=Array.apply(null,arguments);c.shift();var d;return this.each(function(){var e=a(this),h=e.data("cfdatepicker"),i="object"==typeof b&&b;if(!h){var l=f(this,"date"),n=a.extend({},m,l,i),o=g(n.language),p=a.extend({},m,o,l,i);if(e.is(".input-daterange")||p.inputs){var q={inputs:p.inputs||e.find("input").toArray()};e.data("cfdatepicker",h=new k(this,a.extend(p,q)))}else e.data("cfdatepicker",h=new j(this,p))}if("string"==typeof b&&"function"==typeof h[b]&&void 0!==(d=h[b].apply(h,c)))return!1}),void 0!==d?d:this};var m=a.fn.cfdatepicker.defaults={autoclose:!1,beforeShowDay:a.noop,calendarWeeks:!1,clearBtn:!1,daysOfWeekDisabled:[],endDate:1/0,forceParse:!0,
5
+ format:"mm/dd/yyyy",keyboardNavigation:!0,language:"en",minViewMode:0,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-1/0,startView:0,todayBtn:!1,todayHighlight:!1,weekStart:0},n=a.fn.cfdatepicker.locale_opts=["format","rtl","weekStart"];a.fn.cfdatepicker.Constructor=j;var o=a.fn.cfdatepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear"}},p={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(a){return a%4==0&&a%100!=0||a%400==0},getDaysInMonth:function(a,b){return[31,p.isLeapYear(a)?29:28,31,30,31,30,31,31,30,31,30,31][b]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(a){var b=a.replace(this.validParts,"\0").split("\0"),c=a.match(this.validParts);if(!b||!b.length||!c||0===c.length)throw new Error("Invalid date format.");return{separators:b,parts:c}},parseDate:function(b,d,e){function f(){var a=this.slice(0,l[i].length);return a===l[i].slice(0,a.length)}if(b){if(b instanceof Date)return b;"string"==typeof d&&(d=p.parseFormat(d));var g,h,i,k=/([\-+]\d+)([dmwy])/,l=b.match(/([\-+]\d+)([dmwy])/g);if(/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(b)){for(b=new Date,i=0;i<l.length;i++)switch(g=k.exec(l[i]),h=parseInt(g[1]),g[2]){case"d":b.setUTCDate(b.getUTCDate()+h);break;case"m":b=j.prototype.moveMonth.call(j.prototype,b,h);break;case"w":b.setUTCDate(b.getUTCDate()+7*h);break;case"y":b=j.prototype.moveYear.call(j.prototype,b,h)}return c(b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate(),0,0,0)}l=b&&b.match(this.nonpunctuation)||[],b=new Date;var m,n,q={},r=["yyyy","yy","M","MM","m","mm","d","dd"],s={yyyy:function(a,b){return a.setUTCFullYear(b)},yy:function(a,b){return a.setUTCFullYear(2e3+b)},m:function(a,b){if(isNaN(a))return a;for(b-=1;b<0;)b+=12;for(b%=12,a.setUTCMonth(b);a.getUTCMonth()!==b;)a.setUTCDate(a.getUTCDate()-1);return a},d:function(a,b){return a.setUTCDate(b)}};s.M=s.MM=s.mm=s.m,s.dd=s.d,b=c(b.getFullYear(),b.getMonth(),b.getDate(),0,0,0);var t=d.parts.slice();if(l.length!==t.length&&(t=a(t).filter(function(b,c){return-1!==a.inArray(c,r)}).toArray()),l.length===t.length){var u;for(i=0,u=t.length;i<u;i++){if(m=parseInt(l[i],10),g=t[i],isNaN(m))switch(g){case"MM":n=a(o[e].months).filter(f),m=a.inArray(n[0],o[e].months)+1;break;case"M":n=a(o[e].monthsShort).filter(f),m=a.inArray(n[0],o[e].monthsShort)+1}q[g]=m}var v,w;for(i=0;i<r.length;i++)(w=r[i])in q&&!isNaN(q[w])&&(v=new Date(b),s[w](v,q[w]),isNaN(v)||(b=v))}return b}},formatDate:function(b,c,d){if(!b)return"";"string"==typeof c&&(c=p.parseFormat(c));var e={d:b.getUTCDate(),D:o[d].daysShort[b.getUTCDay()],DD:o[d].days[b.getUTCDay()],m:b.getUTCMonth()+1,M:o[d].monthsShort[b.getUTCMonth()],MM:o[d].months[b.getUTCMonth()],yy:b.getUTCFullYear().toString().substring(2),yyyy:b.getUTCFullYear()};e.dd=(e.d<10?"0":"")+e.d,e.mm=(e.m<10?"0":"")+e.m,b=[];for(var f=a.extend([],c.separators),g=0,h=c.parts.length;g<=h;g++)f.length&&b.push(f.shift()),b.push(e[c.parts[g]]);return b.join("")},headTemplate:'<thead><tr><th class="prev">&laquo;</th><th colspan="5" class="cfdatepicker-switch"></th><th class="next">&raquo;</th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>'};p.template='<div class="cfdatepicker"><div class="cfdatepicker-days"><table class=" table-condensed">'+p.headTemplate+"<tbody></tbody>"+p.footTemplate+'</table></div><div class="cfdatepicker-months"><table class="table-condensed">'+p.headTemplate+p.contTemplate+p.footTemplate+'</table></div><div class="cfdatepicker-years"><table class="table-condensed">'+p.headTemplate+p.contTemplate+p.footTemplate+"</table></div></div>",a.fn.cfdatepicker.DPGlobal=p,a.fn.cfdatepicker.noConflict=function(){return a.fn.cfdatepicker=l,this},a(document).on("focus.cfdatepicker.data-api click.cfdatepicker.data-api",'[data-provide="cfdatepicker"]',function(b){var c=a(this);c.data("cfdatepicker")||(b.preventDefault(),c.cfdatepicker("show").on("show",function(){a(this).trigger("blur")}).on("hide",function(){a(this).attr("disabled",!1)}))})}(window.jQuery),jQuery(document).ready(function(a){jQuery(document).on("cf.add",function(){a("[data-inputmask]").inputmask()}),jQuery(document).trigger("cf.add")}),function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){function b(a,b){var c=Array.prototype.slice.call(arguments,2);return setTimeout(function(){return a.apply(null,c)},b)}function c(a,b){return b=b||100,function(){if(!a.debouncing){var c=Array.prototype.slice.apply(arguments);a.lastReturnVal=a.apply(window,c),a.debouncing=!0}return clearTimeout(a.debounceTimeout),a.debounceTimeout=setTimeout(function(){a.debouncing=!1},b),a.lastReturnVal}}function d(d,f){if(this.$window=a(window),this.$document=a(document),this.$element=a(d),this.options=a.extend({},h,f),this._defaults=h,this._name=e,this.startEvent=this.options.startEvent.join("."+e+" ")+"."+e,this.moveEvent=this.options.moveEvent.join("."+e+" ")+"."+e,this.endEvent=this.options.endEvent.join("."+e+" ")+"."+e,this.polyfill=this.options.polyfill,this.onInit=this.options.onInit,this.onSlide=this.options.onSlide,this.onSlideEnd=this.options.onSlideEnd,this.polyfill&&g)return!1;this.identifier="js-"+e+"-"+ +new Date,this.min=parseFloat(this.$element[0].getAttribute("min")||0),this.max=parseFloat(this.$element[0].getAttribute("max")||100),this.value=parseFloat(this.$element[0].value||this.min+(this.max-this.min)/2),this.step=parseFloat(this.$element[0].getAttribute("step")||1),this.$fill=a('<div class="'+this.options.fillClass+'" />'),this.$handle=a('<div class="'+this.options.handleClass+'" />'),this.$range=a('<div class="'+this.options.rangeClass+'" id="'+this.identifier+'" />').insertAfter(this.$element).prepend(this.$fill,this.$handle),this.$element.css({position:"absolute",width:"1px",height:"1px",overflow:"hidden",opacity:"0"}),this.handleDown=a.proxy(this.handleDown,this),this.handleMove=a.proxy(this.handleMove,this),this.handleEnd=a.proxy(this.handleEnd,this),this.init();var i=this;this.$window.on("resize."+e,c(function(){b(function(){i.update()},300)},20)),this.$document.on(this.startEvent,"#"+this.identifier+":not(."+this.options.disabledClass+")",this.handleDown),this.$element.on("change."+e,function(a,b){if(!b||b.origin!==e){var c=a.target.value,d=i.getPositionFromValue(c);i.setPosition(d)}})}var e="rangeslider",f=[],g=function(){var a=document.createElement("input");return a.setAttribute("type","range"),"text"!==a.type}(),h={polyfill:!0,rangeClass:"rangeslider",disabledClass:"rangeslider--disabled",fillClass:"rangeslider__fill",handleClass:"rangeslider__handle",startEvent:["mousedown","touchstart","pointerdown"],moveEvent:["mousemove","touchmove","pointermove"],endEvent:["mouseup","touchend","pointerup"]};d.prototype.init=function(){this.onInit&&"function"==typeof this.onInit&&this.onInit(),this.update()},d.prototype.update=function(){this.handleWidth=this.$handle[0].offsetWidth,this.rangeWidth=this.$range[0].offsetWidth,this.maxHandleX=this.rangeWidth-this.handleWidth,this.grabX=this.handleWidth/2,this.position=this.getPositionFromValue(this.value),this.$element[0].disabled?this.$range.addClass(this.options.disabledClass):this.$range.removeClass(this.options.disabledClass),this.setPosition(this.position)},d.prototype.handleDown=function(a){if(a.preventDefault(),this.$document.on(this.moveEvent,this.handleMove),this.$document.on(this.endEvent,this.handleEnd),!((" "+a.target.className+" ").replace(/[\n\t]/g," ").indexOf(this.options.handleClass)>-1)){var b=this.getRelativePosition(this.$range[0],a),c=this.getPositionFromNode(this.$handle[0])-this.getPositionFromNode(this.$range[0]);this.setPosition(b-this.grabX),b>=c&&b<c+this.handleWidth&&(this.grabX=b-c)}},d.prototype.handleMove=function(a){a.preventDefault();var b=this.getRelativePosition(this.$range[0],a);this.setPosition(b-this.grabX)},d.prototype.handleEnd=function(a){a.preventDefault(),this.$document.off(this.moveEvent,this.handleMove),this.$document.off(this.endEvent,this.handleEnd);var b=this.getRelativePosition(this.$range[0],a);this.onSlideEnd&&"function"==typeof this.onSlideEnd&&this.onSlideEnd(b-this.grabX,this.value)},d.prototype.cap=function(a,b,c){return a<b?b:a>c?c:a},d.prototype.setPosition=function(a){var b,c;b=this.getValueFromPosition(this.cap(a,0,this.maxHandleX))/this.step*this.step,c=this.getPositionFromValue(b),this.$fill[0].style.width=c+this.grabX+"px",this.$handle[0].style.left=c+"px",this.setValue(b),this.position=c,this.value=b,this.onSlide&&"function"==typeof this.onSlide&&this.onSlide(c,b)},d.prototype.getPositionFromNode=function(a){for(var b=0;null!==a;)b+=a.offsetLeft,a=a.offsetParent;return b},d.prototype.getRelativePosition=function(a,b){return(b.pageX||b.originalEvent.clientX||b.originalEvent.touches[0].clientX||b.currentPoint.x)-this.getPositionFromNode(a)},d.prototype.getPositionFromValue=function(a){var b;return b=(a-this.min)/(this.max-this.min),b*this.maxHandleX},d.prototype.getValueFromPosition=function(a){var b,c;return b=a/(this.maxHandleX||1),c=this.step*Math.ceil((b*(this.max-this.min)+this.min)/this.step),Number(c.toFixed(2))},d.prototype.setValue=function(a){a!==this.value&&this.$element.val(a).trigger("change",{origin:e})},d.prototype.destroy=function(){this.$document.off(this.startEvent,"#"+this.identifier,this.handleDown),this.$element.off("."+e).removeAttr("style").removeData("plugin_"+e),this.$range&&this.$range.length&&this.$range[0].parentNode.removeChild(this.$range[0]),f.splice(f.indexOf(this.$element[0]),1),f.length||this.$window.off("."+e)},a.fn[e]=function(b){return this.each(function(){var c=a(this),g=c.data("plugin_"+e);g||(c.data("plugin_"+e,g=new d(this,b)),f.push(this)),"string"==typeof b&&g[b]()})}}),function(a){"use strict";var b={init:function(c){return this.each(function(){this.self=a(this),b.destroy.call(this.self),this.opt=a.extend(!0,{},a.fn.raty.defaults,c),b._adjustCallback.call(this),b._adjustNumber.call(this),"img"!==this.opt.starType&&b._adjustStarType.call(this),b._adjustPath.call(this),b._createStars.call(this),this.opt.cancel&&b._createCancel.call(this),this.opt.precision&&b._adjustPrecision.call(this),b._createScore.call(this),b._apply.call(this,this.opt.score),b._target.call(this,this.opt.score),this.opt.readOnly?b._lock.call(this):(this.style.cursor="pointer",b._binds.call(this)),this.self.data("options",this.opt)})},_adjustCallback:function(){for(var a=["number","readOnly","score","scoreName"],b=0;b<a.length;b++)"function"==typeof this.opt[a[b]]&&(this.opt[a[b]]=this.opt[a[b]].call(this))},_adjustNumber:function(){this.opt.number=b._between(this.opt.number,1,this.opt.numberMax)},_adjustPath:function(){this.opt.path=this.opt.path||"",this.opt.path&&"/"!==this.opt.path.charAt(this.opt.path.length-1)&&(this.opt.path+="/")},_adjustPrecision:function(){this.opt.half=!0,this.opt.targetType="score"},_adjustStarType:function(){this.opt.path="";for(var a=["cancelOff","cancelOn","starHalf","starOff","starOn"],b=0;b<a.length;b++)this.opt[a[b]]=this.opt[a[b]].replace(".","-")},_apply:function(a){b._fill.call(this,a),a&&(a>0&&this.score.val(b._between(a,0,this.opt.number)),b._roundStars.call(this,a))},_between:function(a,b,c){return Math.min(Math.max(parseFloat(a),b),c)},_binds:function(){this.cancel&&(b._bindOverCancel.call(this),b._bindClickCancel.call(this),b._bindOutCancel.call(this)),b._bindOver.call(this),b._bindClick.call(this),b._bindOut.call(this)},_bindClick:function(){var b=this;b.stars.on("click.raty",function(c){var d=a(this);b.score.val(b.opt.half||b.opt.precision?b.self.data("score"):this.alt||d.data("alt")),b.opt.click&&b.opt.click.call(b,+b.score.val(),c)})},_bindClickCancel:function(){var a=this;a.cancel.on("click.raty",function(b){a.score.removeAttr("value"),a.opt.click&&a.opt.click.call(a,null,b)})},_bindOut:function(){var a=this;a.self.on("mouseleave.raty",function(c){var d=+a.score.val()||void 0;b._apply.call(a,d),b._target.call(a,d,c),a.opt.mouseout&&a.opt.mouseout.call(a,d,c)})},_bindOutCancel:function(){var b=this;b.cancel.on("mouseleave.raty",function(c){var d=a(this),e=b.opt.path+b.opt.cancelOff;if("img"===b.opt.starType)d.attr("src",e);else{var f=b.opt.path+b.opt.cancelOn;d.removeClass(f).addClass(e)}if(b.opt.mouseout){var g=+b.score.val()||void 0;b.opt.mouseout.call(b,g,c)}})},_bindOver:function(){var a=this,c=a.opt.half?"mousemove.raty":"mouseover.raty";a.stars.on(c,function(c){var d=b._getScoreByPosition.call(a,c,this);b._fill.call(a,d),a.opt.half&&(b._roundStars.call(a,d),a.self.data("score",d)),b._target.call(a,d,c),a.opt.mouseover&&a.opt.mouseover.call(a,d,c)})},_bindOverCancel:function(){var c=this;c.cancel.on("mouseover.raty",function(d){var e=c.opt.path+c.opt.cancelOn,f=a(this),g=c.opt.path+c.opt.starOff;if("img"===c.opt.starType)f.attr("src",e),c.stars.attr("src",g);else{c.stars.attr("class",g);var h=c.opt.path+c.opt.cancelOff;f.removeClass(h).addClass(e).css("color",c.opt.starColor)}b._target.call(c,null,d),c.opt.mouseover&&c.opt.mouseover.call(c,null)})},_buildScoreField:function(){return a("<input />",{name:this.opt.scoreName,type:"hidden"}).appendTo(this)},_createCancel:function(){var b=this.opt.path+this.opt.cancelOff,c=a("<"+this.opt.starType+" />",{title:this.opt.cancelHint,class:"raty-cancel"}).css("marginRight",this.opt.space?this.opt.spaceWidth+"px":"0");"img"===this.opt.starType?c.attr({src:b,alt:"x"}):c.attr("data-alt","x").addClass(b),"left"===this.opt.cancelPlace?this.self.prepend("&#160;").prepend(c):this.self.append("&#160;").append(c),this.cancel=c},_createScore:function(){var c=a(this.opt.targetScore);this.score=c.length?c:b._buildScoreField.call(this)},_createStars:function(){for(var c=1;c<=this.opt.number;c++){var d,e=this.opt.score&&this.opt.score>=c?"starOn":"starOff",f=b._getHint.call(this,c);e=this.opt.path+this.opt[e],d="img"!==this.opt.starType?{"data-alt":c,class:e}:{src:e,alt:c},d.title=f,a("<"+this.opt.starType+" />",d).css("marginRight",c<this.opt.number&&this.opt.space?this.opt.spaceWidth+"px":"0").appendTo(this),this.opt.space}this.stars=this.self.children(this.opt.starType)},_error:function(b){a(this).text(b),a.error(b)},_fill:function(a){for(var c=0,d=1;d<=this.stars.length;d++){var e,f=this.stars.eq(d-1),g=b._turnOn.call(this,d,a);if(this.opt.iconRange&&this.opt.iconRange.length>c){var h=this.opt.iconRange[c];e=b._getIconRange.call(this,h,g),d<=h.range&&("img"===this.opt.starType?f.attr("src",e):f.attr("class",e)),d===h.range&&c++}else e=this.opt.path+this.opt[g?"starOn":"starOff"],"img"===this.opt.starType?f.attr("src",e):f.attr("class",e),g?f.css("color",this.opt.starColor):f.css("color","")}},_getIconRange:function(a,b){return this.opt.path+(b?a.on||this.opt.starOn:a.off||this.opt.starOff)},_getScoreByPosition:function(c,d){var e=a(d),f=parseInt(d.alt||e.data("alt"),10);if(this.opt.half){var g=b._getSize.call(this),h=parseFloat((c.pageX-e.offset().left)/g);f=this.opt.precision?f-1+h:f-1+(h>.5?1:.5)}return f},_getSize:function(){var a;return a="img"===this.opt.starType?this.stars[0].width:parseFloat(this.stars.eq(0).css("font-size")),a||b._error.call(this,"Could not be possible get the icon size!"),a},_turnOn:function(a,b){return this.opt.single?a===b:a<=b},_getHint:function(a){var b=this.opt.hints[a-1];return""===b?"":b||a},_lock:function(){var a=parseInt(this.score.val(),10),c=a?b._getHint.call(this,a):this.opt.noRatedMsg;this.style.cursor="",this.title=c,this.score.prop("readonly",!0),this.stars.prop("title",c),this.cancel&&this.cancel.hide(),this.self.data("readonly",!0)},_roundStars:function(a){var b=(a%1).toFixed(2);if(b>this.opt.round.down){var c="starOn";this.opt.halfShow&&b<this.opt.round.up?c="starHalf":b<this.opt.round.full&&(c="starOff");var d=this.stars[Math.ceil(a)-1];"img"===this.opt.starType?d.src=this.opt.path+this.opt[c]:d.style.className=this.opt[c]}},_target:function(c,d){if(this.opt.target){var e=a(this.opt.target);e.length||b._error.call(this,"Target selector invalid or missing!");var f=d&&"mouseover"===d.type;if(void 0===c)c=this.opt.targetText;else if(null===c)c=f?this.opt.cancelHint:this.opt.targetText;else{"hint"===this.opt.targetType?c=b._getHint.call(this,Math.ceil(c)):this.opt.precision&&(c=parseFloat(c).toFixed(1));var g=d&&"mousemove"===d.type;f||g||this.opt.targetKeep||(c=this.opt.targetText)}c&&(c=this.opt.targetFormat.toString().replace("{score}",c)),e.is(":input")?e.val(c):e.html(c)}},_unlock:function(){this.style.cursor="pointer",this.removeAttribute("title"),this.score.removeAttr("readonly"),this.self.data("readonly",!1);for(var a=0;a<this.opt.number;a++)this.stars[a].title=b._getHint.call(this,a+1);this.cancel&&this.cancel.css("display","")},cancel:function(c){return this.each(function(){var d=a(this);!0!==d.data("readonly")&&(b[c?"click":"score"].call(d,null),this.score.removeAttr("value"))})},click:function(c){return this.each(function(){!0!==a(this).data("readonly")&&(b._apply.call(this,c),this.opt.click&&this.opt.click.call(this,c,a.Event("click")),b._target.call(this,c))})},destroy:function(){return this.each(function(){var b=a(this),c=b.data("raw");c?b.off(".raty").empty().css({cursor:c.style.cursor}).removeData("readonly"):b.data("raw",b.clone()[0])})},getScore:function(){var a,b=[];return this.each(function(){a=this.score.val(),b.push(a?+a:void 0)}),b.length>1?b:b[0]},move:function(c){return this.each(function(){var d=parseInt(c,10),e=a(this).data("options"),f=(+c).toFixed(1).split(".")[1];d>=e.number&&(d=e.number-1,f=10);var g=b._getSize.call(this),h=g/10,i=a(this.stars[d]),j=i.offset().left+h*parseInt(f,10),k=a.Event("mousemove",{pageX:j});i.trigger(k)})},readOnly:function(c){return this.each(function(){var d=a(this);d.data("readonly")!==c&&(c?(d.off(".raty").children("img").off(".raty"),b._lock.call(this)):(b._binds.call(this),b._unlock.call(this)),d.data("readonly",c))})},reload:function(){return b.set.call(this,{})},score:function(){var c=a(this);return arguments.length?b.setScore.apply(c,arguments):b.getScore.call(c)},set:function(b){return this.each(function(){var c=a(this),d=c.data("options"),e=a.extend({},d,b);c.raty(e)})},setScore:function(c){return this.each(function(){!0!==a(this).data("readonly")&&(b._apply.call(this,c),b._target.call(this,c))})}};a.fn.raty=function(c){return b[c]?b[c].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof c&&c?void a.error("Method "+c+" does not exist!"):b.init.apply(this,arguments)},a.fn.raty.defaults={cancel:!1,cancelHint:"Cancel this rating!",cancelOff:"raty-cancel-off",cancelOn:"raty-cancel-on",cancelPlace:"left",click:void 0,half:!1,halfShow:!0,hints:["1"],iconRange:void 0,mouseout:void 0,mouseover:void 0,noRatedMsg:"Not rated yet!",number:5,numberMax:20,path:void 0,precision:!1,readOnly:!1,round:{down:.25,full:.6,up:.76},score:void 0,scoreName:"score",single:!1,space:!0,spaceWidth:3,starColor:"#ff00aa",starHalf:"star-half.png",starOff:"raty-dot-off",starOn:"raty-dot-on",starType:"img",target:void 0,targetFormat:"{score}",targetKeep:!1,targetScore:void 0,targetText:"",targetType:"hint"}}(jQuery),jQuery(function(a){a("body").on("click",".cf-toggle-group-buttons a",function(){var b=a(this),c=b.closest(".caldera-config-field"),d=c.find('[data-ref="'+b.attr("id")+'"]');c.find(".btn").removeClass(b.data("active")).addClass(b.data("default")),b.addClass(b.data("active")).removeClass(b.data("default")),d.prop("checked",!0).trigger("change")})});var cf_jsfields_init,cf_presubmit;!function(a){cf_validate_form=function(b){return b.parsley({errorsWrapper:'<span class="help-block caldera_ajax_error_block"></span>',errorTemplate:"<span></span>",errorsContainer:function(a){return a.$element.closest(".form-group")}}).on("field:error",function(c){this.$element.closest(".form-group").addClass("has-error"),a(document).trigger("cf.validate.fieldError",{inst:c,form:b,el:this.$element})}).on("field:success",function(c){if("star"===this.$element.data("type")&&this.$element.prop("required")&&0==this.$element.val())return void(c.validationResult=!1);this.$element.closest(".form-group").removeClass("has-error"),a(document).trigger("cf.validate.fieldSuccess",{inst:c,form:b,el:this.$element})}).on("form:success",function(c){a(document).trigger("cf.validate.FormSuccess",{inst:c,form:b,el:this.$element})}).on("form:error",function(c){a(document).trigger("cf.validate.FormError",{inst:c,form:b,el:this.$element})})},cf_jsfields_init=function(){a(".init_field_type[data-type]").each(function(b,c){var d=a(c);"function"==typeof window[d.data("type")+"_init"]&&window[d.data("type")+"_init"](d.prop("id"),d[0])}),window.Parsley.on("field:validated",function(){setTimeout(function(){a(document).trigger("cf.error")},15)}),"undefined"==typeof resBaldrickTriggers&&a(".caldera_forms_form").length,a(document).trigger("cf.fieldsInit")},a("document").ready(function(){cf_jsfields_init()}),a(".caldera-form-page").length&&a(".caldera-form-page").on("keypress","[data-field]:not(textarea)",function(a){13===a.keyCode&&a.preventDefault()}),a(document).on("click",".cf_modal_button",function(b){b.preventDefault();var c=a(this);a(c.attr("href")).show()}),a(document).on("click",".caldera-front-modal-closer",function(b){b.preventDefault(),a(this).closest(".caldera-front-modal-container").hide()}),a(document).on("cf.add cf.enable cf.disable cf.pagenav",cf_jsfields_init),a(document).on("click","[data-page]",function(b){var c,d,e,f=a(this),g=f.closest(".caldera-form-page"),h=f.closest("form.caldera_forms_form"),i=(h.attr("id"),h.data("instance")),j=h.find(".caldera-form-page:visible").data("formpage"),k=g.data("formpage")?g.data("formpage"):f.data("page"),l=a('.breadcrumb[data-form="caldera_form_'+i+'"]'),m=!0,n=j;if(h.length){if(cf_validate_form(h).destroy(),e=h.find("[data-field]"),h.find(".has-error").removeClass("has-error"),"prev"!==f.data("page")&&k>=j){e=a("#caldera_form_"+i+' [data-formpage="'+j+'"] [data-field]');for(var o,p=0;p<e.length;p++)o=a(e[p]),o.hasClass("cf-multi-uploader")||o.hasClass("cf-multi-uploader-list")||!0!==o.parsley().isValid()&&(b.preventDefault(),m=!1);if(!0===m&&k>j)for(var q=k-1;q>=1;q--){e=a("#caldera_form_"+i+' [data-formpage="'+q+'"] [data-field]');for(var p=0;p<e.length;p++)o=a(e[p]),o.parsley().validate(),!0!==o.parsley().isValid({force:!0})&&(b.preventDefault(),m=!1,q>n&&(n=q))}}if(!1===m)return n!==j&&(a("#form_page_"+i+"_pg_"+j).hide().attr("aria-hidden","true").css("visibility","hidden"),a("#form_page_"+i+"_pg_"+n).show().attr("aria-hidden","false").css("visibility","visible")),cf_validate_form(h).validate(),!1;"next"===f.data("page")?(l&&l.find("li.active").removeClass("active").children().attr("aria-expanded","false"),c=h.find('.caldera-form-page[data-formpage="'+(k+1)+'"]'),c.length&&(g.hide().attr("aria-hidden","true").css("visibility","hidden"),c.show().attr("aria-hidden","false").css("visibility","visible"),l&&l.find('a[data-page="'+(k+1)+'"]').attr("aria-expanded","true").parent().addClass("active"))):"prev"===f.data("page")?(l&&l.find("li.active").removeClass("active").children().attr("aria-expanded","false"),d=h.find('.caldera-form-page[data-formpage="'+(k-1)+'"]'),d.length&&(g.hide().attr("aria-hidden","true").css("visibility","hidden"),d.show().attr("aria-hidden","false").css("visibility","visible"),l&&l.find('a[data-page="'+(k-1)+'"]').attr("aria-expanded","true").parent().addClass("active"))):f.data("pagenav")&&(b.preventDefault(),f.closest(".breadcrumb").find("li.active").removeClass("active").children().attr("aria-expanded","false"),a("#"+f.data("pagenav")+" .caldera-form-page").hide().attr("aria-hidden","true").css("visibility","hidden"),a("#"+f.data("pagenav")+'\t.caldera-form-page[data-formpage="'+f.data("page")+'"]').show().attr("aria-hidden","false").css("visibility","visible"),f.parent().addClass("active").children().attr("aria-expanded","true")),a("html, body").animate({scrollTop:h.offset().top-100},200),a(document).trigger("cf.pagenav")}});var b;a(".caldera-grid .breadcrumb").each(function(c,d){a(d).find("a[data-pagenav]").each(function(c,d){var e=a(d),f=e.data("pagenav");a("#"+f+' .caldera-form-page[data-formpage="'+e.data("page")+'"]').find(".has-error").length&&(e.parent().addClass("error"),void 0===b&&(e.trigger("click"),b=!0))})}),a(document).on("click",'form.caldera_forms_form [type="submit"]',function(b){var c=a(this),d=c.closest(".caldera_forms_form"),e=cf_validate_form(d);if(a(document).trigger("cf.form.submit",{e:b,$form:d}),e.validate())a(document).trigger("cf.form.validated",{e:b,$form:d}),e.destroy();else{if(a(".caldera-form-page").length){var f=c.parents(".caldera-form-page").data("formpage"),g=[],h=[];if(e.fields.forEach(function(a,b){if(!0!==a.validationResult){var c=a.$element.parents(".caldera-form-page");if(void 0!=c&&c.length&&a.$element.parents(".caldera-form-page").data("formpage")>f)return void h.push(a.$element.data("field"));g.push(a)}}),!g.length)return h.length&&d.append('<input type="hidden" name="_cf_future" value="'+h.toString()+'">'),void e.destroy()}b.preventDefault()}})}(jQuery),window.addEventListener("load",function(){!function(a){"use strict";if(window.CALDERA_FORMS={},"object"==typeof CF_API_DATA){var b,c,d={};a(".caldera_forms_form").each(function(e,f){b=a(f),c=b.data("form-id"),d[c]=new CalderaFormsResetNonce(c,CF_API_DATA,a),d[c].init()})}if("object"==typeof CFFIELD_CONFIG){var e,f,g,h,b,i,j,k,l=!1,m=!1;a(".caldera_forms_form").each(function(d,n){if(b=a(n),e=b.attr("id"),h=b.data("instance"),"object"==typeof CFFIELD_CONFIG[h]){k=a(document.getElementById(e)),m||(i=new CalderaFormsCrossOriginWarning(b,a,CFFIELD_CONFIG[h].error_strings),i.maybeWarn(),m=!0),!l&&CFFIELD_CONFIG[h].error_strings.hasOwnProperty("jquery_old")&&(j=new CalderaFormsJQueryWarning(b,a,CFFIELD_CONFIG[h].error_strings),j.maybeWarn(),l=!0),c=b.data("form-id"),g=CFFIELD_CONFIG[h].configs;var o=new CFState(c,a);o.init(CFFIELD_CONFIG[h].fields.defaults,CFFIELD_CONFIG[h].fields.calcDefaults),"object"!=typeof window.cfstate&&(window.cfstate={}),window.cfstate[e]=o,k.find("[data-sync]").each(function(){var b=a(this);b.data("unsync")||new CalderaFormsFieldSync(b,b.data("binds"),k,a,o)}),f=new Caldera_Forms_Field_Config(g,a(document.getElementById(e)),a,o),f.init(),a(document).trigger("cf.form.init",{idAttr:e,formId:c,state:o,fieldIds:CFFIELD_CONFIG[h].fields.hasOwnProperty("ids")?CFFIELD_CONFIG[h].fields.ids:[]})}})}}(jQuery)});
assets/build/js/caldera-modals.min.js CHANGED
@@ -1 +1 @@
1
- !function(a){var b=null,c={},d=[],e=[],f=a("html"),g=a("body"),h=a(window),i=function(){if(d.length||e.length){var a=d.length?d[d.length-1]:e[e.length-1],j=h.width(),k=h.height(),l=c[a].config.height,m=l,n=c[a].config.width,o=0,p=!1,q=!1;if(b&&f.addClass("has-caldera-modal"),o=(k-c[a].config.height)/2.2,o<0&&(o=0),l+2*c[a].config.padding>k&&b&&(l=k-2*c[a].config.padding,m="100%",b&&b.css({paddingTop:c[a].config.padding,paddingBottom:c[a].config.padding}),q=!0),n+2*c[a].config.padding>=j&&(n="100%",b&&b.css({paddingLeft:c[a].config.padding,paddingRight:c[a].config.padding}),q=!0),!0===q&&(j<=700&&j>600?(b&&(l=k-2*c[a].config.padding),n=j,m=l-2*c[a].config.padding,n="100%",o=0,b&&b.css({padding:c[a].config.padding})):j<=600&&(b&&(l=k),n=j,m="100%",o=0,b&&b.css({padding:0}))),b&&b.is(":hidden")&&(p=!0,b.show()),c[a].header&&(b&&b.show(),l-=c[a].header.outerHeight(),c[a].closer.css({padding:c[a].header.outerHeight()/2-.5}),c[a].title.css({paddingRight:c[a].closer.outerWidth()})),c[a].footer&&(b&&b.show(),l-=c[a].footer.outerHeight()),b&&!0===p&&(b.hide(),p=!1),l!=m&&c[a].body.css({height:l}),c[a].modal.css({width:n}),c[a].config.sticky&&c[a].config.minimized){var r={},s=c[a].title.outerHeight()-c[a].modal.outerHeight();c[a].config.sticky.indexOf("bottom")>-1?r["margin-bottom"]=s:c[a].config.sticky.indexOf("top")>-1&&(r["margin-top"]=s),c[a].modal.css(r),c[a].config.sticky.length>=3&&(g.css("margin-"+c[a].config.sticky[0],c[a].title.outerHeight()),q?c[a].modal.css(c[a].config.sticky[1],0):c[a].modal.css(c[a].config.sticky[1],parseFloat(c[a].config.sticky[2])))}return b&&(c[a].modal.css({marginTop:o,height:m}),setTimeout(function(){c[a].modal.addClass("caldera-animate")},10),b.fadeIn(c[a].config.speed)),c[a].resize=i,c}},j=function(e){var g=a(e).data("modal"),h=0,i={};if(e&&c[g].config.sticky)return c[g].config.minimized?(c[g].config.minimized=!1,h=0):(c[g].config.minimized=!0,h=c[g].title.outerHeight()-c[g].modal.outerHeight()),c[g].config.sticky.indexOf("bottom")>-1?i["margin-bottom"]=h:c[g].config.sticky.indexOf("top")>-1&&(i["margin-top"]=h),void c[g].modal.stop().animate(i,c[g].config.speed);var j;d.length&&(j=d.pop(),c[j].modal.hasClass("caldera-animate")&&!d.length?(c[j].modal.removeClass("caldera-animate"),setTimeout(function(){c[j].modal.remove(),delete c[j]},500)):b&&c[j].modal.hide(0,function(){a(this).remove(),delete c[j]})),d.length?c[d[d.length-1]].modal.show():(b&&b.fadeOut(250,function(){a(this).remove(),b=null}),f.removeClass("has-caldera-modal"))};a.calderaModal=function(f){var h=a.extend(!0,{element:"div",height:550,width:620,padding:12,speed:250},f);b||h.sticky||(b=a("<div>",{class:"caldera-backdrop"}),h.focus||b.on("click",function(a){a.target==this&&j()}),g.append(b),b.hide());var k=h.element,l=h.modal;if(d.length&&d[d.length-1]!==l&&c[d[d.length-1]].modal.hide(),void 0===c[l]?(h.sticky&&(h.sticky=h.sticky.split(" "),h.sticky.length<2&&(h.sticky=null),e.push(l)),c[l]={config:h,modal:a("<"+k+">",{id:l+"_calderaModal",tabIndex:-1,"ariaLabelled-by":l+"_calderaModalLable",class:"caldera-modal-wrap"+(h.sticky?" caldera-sticky-modal "+h.sticky[0]+"-"+h.sticky[1]:"")})},h.sticky||d.push(l)):(c[l].config=h,c[l].modal.empty()),h.animate&&b){var m=h.animate.split(" "),n=h.speed+"ms",o=h.animateEase?h.animateEase:"ease";1===m.length&&(m[1]=0),c[l].modal.css({transform:"translate("+m[0]+", "+m[1]+")","-web-kit-transition":"transform "+n+" "+o,"-moz-transition":"transform "+n+" "+o,transition:"transform "+n+" "+o})}if(c[l].body=a("<div>",{class:"caldera-modal-body",id:l+"_calderaModalBody"}),c[l].content=a("<div>",{class:"caldera-modal-content",id:l+"_calderaModalContent"}),c[l].content.css({margin:h.padding}),c[l].body.append(c[l].content).appendTo(c[l].modal),b?b.append(c[l].modal):c[l].modal.appendTo(a("body")),h.footer)if(c[l].footer=a("<div>",{class:"caldera-modal-footer",id:l+"_calderaModalFooter"}),c[l].footer.css({padding:h.padding}),c[l].footer.appendTo(c[l].modal),"function"==typeof window[h.footer])c[l].footer.append(window[h.footer](f,this));else if("string"==typeof h.footer)try{var p=a(h.footer);c[l].footer.html(p.html())}catch(a){c[l].footer.html(h.footer)}if(h.title){var q="prependTo";c[l].header=a("<div>",{class:"caldera-modal-title",id:l+"_calderaModalTitle"}),c[l].closer=a("<a>",{href:"#close",class:"caldera-modal-closer","data-dismiss":"modal","aria-hidden":"true",id:l+"_calderaModalCloser"}).html("&times;"),c[l].title=a("<h3>",{class:"modal-label",id:l+"_calderaModalLable"}),c[l].title.html(h.title).appendTo(c[l].header),c[l].title.css({padding:h.padding}),c[l].title.append(c[l].closer),c[l].config.sticky?(c[l].config.minimized&&!0!==c[l].config.minimized&&(setTimeout(function(){c[l].title.trigger("click")},parseInt(c[l].config.minimized)),c[l].config.minimized=!1),c[l].closer.hide(),c[l].title.addClass("caldera-modal-closer").data("modal",l).appendTo(c[l].header),c[l].config.sticky.indexOf("top")>-1&&(q="appendTo")):c[l].closer.data("modal",l).appendTo(c[l].header),c[l].header[q](c[l].modal)}if(c[l].modal.outerHeight(h.height),c[l].modal.outerWidth(h.width),h.content)if("function"==typeof h.content)c[l].content.append(h.content(f,c[l],this));else if("function"==typeof window[h.content])c[l].content.append(window[h.content](f,c[l],this));else if("string"==typeof h.content)try{var r=a(h.content);r.length?(c[l].content.append(r.detach()),r.show()):c[l].content.html(h.content)}catch(a){c[l].content.html(h.content)}return i(),c[l]},a.fn.calderaModal=function(b){return b||(b={}),b=a.extend({},this.data(),b),a.calderaModal(b)},window.addEventListener?(window.addEventListener("resize",i,!1),window.addEventListener("keypress",function(a){27===a.keyCode&&null!==b&&b.trigger("click")},!1)):window.attachEvent?window.attachEvent("onresize",i):window.onresize=i,a(document).on("click","[data-modal]:not(.caldera-modal-closer)",function(b){b.preventDefault(),a(this).calderaModal()}),a(window).load(function(){a("[data-modal][data-autoload]").each(function(){a(this).calderaModal()})}),a(document).on("click",".caldera-modal-closer",function(a){a.preventDefault(),j(this)})}(jQuery);
1
+ !function(a){var b=null,c={},d=[],e=[],f=a("html"),g=a("body"),h=a(window),i=function(){if(d.length||e.length){var a=d.length?d[d.length-1]:e[e.length-1],j=h.width(),k=h.height(),l=c[a].config.height,m=l,n=c[a].config.width,o=0,p=!1,q=!1;if(b&&f.addClass("has-caldera-modal"),o=(k-c[a].config.height)/2.2,o<0&&(o=0),l+2*c[a].config.padding>k&&b&&(l=k-2*c[a].config.padding,m="100%",b&&b.css({paddingTop:c[a].config.padding,paddingBottom:c[a].config.padding}),q=!0),n+2*c[a].config.padding>=j&&(n="100%",b&&b.css({paddingLeft:c[a].config.padding,paddingRight:c[a].config.padding}),q=!0),!0===q&&(j<=700&&j>600?(b&&(l=k-2*c[a].config.padding),n=j,m=l-2*c[a].config.padding,n="100%",o=0,b&&b.css({padding:c[a].config.padding})):j<=600&&(b&&(l=k),n=j,m="100%",o=0,b&&b.css({padding:0}))),b&&b.is(":hidden")&&(p=!0,b.show()),c[a].header&&(b&&b.show(),l-=c[a].header.outerHeight(),c[a].closer.css({padding:c[a].header.outerHeight()/2-.5}),c[a].title.css({paddingRight:c[a].closer.outerWidth()})),c[a].footer&&(b&&b.show(),l-=c[a].footer.outerHeight()),b&&!0===p&&(b.hide(),p=!1),l!=m&&c[a].body.css({height:l}),c[a].modal.css({width:n}),c[a].config.sticky&&c[a].config.minimized){var r={},s=c[a].title.outerHeight()-c[a].modal.outerHeight();c[a].config.sticky.indexOf("bottom")>-1?r["margin-bottom"]=s:c[a].config.sticky.indexOf("top")>-1&&(r["margin-top"]=s),c[a].modal.css(r),c[a].config.sticky.length>=3&&(g.css("margin-"+c[a].config.sticky[0],c[a].title.outerHeight()),q?c[a].modal.css(c[a].config.sticky[1],0):c[a].modal.css(c[a].config.sticky[1],parseFloat(c[a].config.sticky[2])))}return b&&(c[a].modal.css({marginTop:o,height:m}),setTimeout(function(){c[a].modal.addClass("caldera-animate")},10),b.fadeIn(c[a].config.speed)),c[a].resize=i,c}},j=function(e){var g=a(e).data("modal"),h=0,i={};if(e&&c[g].config.sticky)return c[g].config.minimized?(c[g].config.minimized=!1,h=0):(c[g].config.minimized=!0,h=c[g].title.outerHeight()-c[g].modal.outerHeight()),c[g].config.sticky.indexOf("bottom")>-1?i["margin-bottom"]=h:c[g].config.sticky.indexOf("top")>-1&&(i["margin-top"]=h),void c[g].modal.stop().animate(i,c[g].config.speed);var j;d.length&&(j=d.pop(),c[j].modal.hasClass("caldera-animate")&&!d.length?(c[j].modal.removeClass("caldera-animate"),setTimeout(function(){c[j].modal.remove(),delete c[j]},500)):b&&c[j].modal.hide(0,function(){a(this).remove(),delete c[j]})),d.length?c[d[d.length-1]].modal.show():(b&&b.fadeOut(250,function(){a(this).remove(),b=null}),f.removeClass("has-caldera-modal"))};a.calderaModal=function(f){var h=a.extend(!0,{element:"div",height:550,width:620,padding:12,speed:250},f);b||h.sticky||(b=a("<div>",{class:"caldera-backdrop"}),h.focus||b.on("click",function(a){a.target==this&&j()}),g.append(b),b.hide());var k=h.element,l=h.modal;if(d.length&&d[d.length-1]!==l&&c[d[d.length-1]].modal.hide(),void 0===c[l]?(h.sticky&&(h.sticky=h.sticky.split(" "),h.sticky.length<2&&(h.sticky=null),e.push(l)),c[l]={config:h,modal:a("<"+k+">",{id:l+"_calderaModal",tabIndex:-1,"ariaLabelled-by":l+"_calderaModalLable",class:"caldera-modal-wrap"+(h.sticky?" caldera-sticky-modal "+h.sticky[0]+"-"+h.sticky[1]:"")})},h.sticky||d.push(l)):(c[l].config=h,c[l].modal.empty()),h.animate&&b){var m=h.animate.split(" "),n=h.speed+"ms",o=h.animateEase?h.animateEase:"ease";1===m.length&&(m[1]=0),c[l].modal.css({transform:"translate("+m[0]+", "+m[1]+")","-web-kit-transition":"transform "+n+" "+o,"-moz-transition":"transform "+n+" "+o,transition:"transform "+n+" "+o})}if(c[l].body=a("<div>",{class:"caldera-modal-body",id:l+"_calderaModalBody"}),c[l].content=a("<div>",{class:"caldera-modal-content",id:l+"_calderaModalContent"}),c[l].content.css({margin:h.padding}),c[l].body.append(c[l].content).appendTo(c[l].modal),b?b.append(c[l].modal):c[l].modal.appendTo(a("body")),h.footer)if(c[l].footer=a("<div>",{class:"caldera-modal-footer",id:l+"_calderaModalFooter"}),c[l].footer.css({padding:h.padding}),c[l].footer.appendTo(c[l].modal),"function"==typeof window[h.footer])c[l].footer.append(window[h.footer](f,this));else if("string"==typeof h.footer)try{var p=a(h.footer);c[l].footer.html(p.html())}catch(a){c[l].footer.html(h.footer)}if(h.title){var q="prependTo";c[l].header=a("<div>",{class:"caldera-modal-title",id:l+"_calderaModalTitle"}),c[l].closer=a("<a>",{href:"#close",class:"caldera-modal-closer","data-dismiss":"modal","aria-hidden":"true",id:l+"_calderaModalCloser"}).html("&times;"),c[l].title=a("<h3>",{class:"modal-label",id:l+"_calderaModalLable"}),c[l].title.html(h.title).appendTo(c[l].header),c[l].title.css({padding:h.padding}),c[l].title.append(c[l].closer),c[l].config.sticky?(c[l].config.minimized&&!0!==c[l].config.minimized&&(setTimeout(function(){c[l].title.trigger("click")},parseInt(c[l].config.minimized)),c[l].config.minimized=!1),c[l].closer.hide(),c[l].title.addClass("caldera-modal-closer").data("modal",l).appendTo(c[l].header),c[l].config.sticky.indexOf("top")>-1&&(q="appendTo")):c[l].closer.data("modal",l).appendTo(c[l].header),c[l].header[q](c[l].modal)}if(c[l].modal.outerHeight(h.height),c[l].modal.outerWidth(h.width),h.content)if("function"==typeof h.content)c[l].content.append(h.content(f,c[l],this));else if("function"==typeof window[h.content])c[l].content.append(window[h.content](f,c[l],this));else if("string"==typeof h.content)try{var r=a(h.content);r.length?(c[l].content.append(r.detach()),r.show()):c[l].content.html(h.content)}catch(a){c[l].content.html(h.content)}return i(),c[l]},a.fn.calderaModal=function(b){return b||(b={}),b=a.extend({},this.data(),b),a.calderaModal(b)},window.addEventListener?(window.addEventListener("resize",i,!1),window.addEventListener("keypress",function(a){27===a.keyCode&&null!==b&&b.trigger("click")},!1)):window.attachEvent?window.attachEvent("onresize",i):window.onresize=i,a(document).on("click","[data-modal]:not(.caldera-modal-closer)",function(b){b.preventDefault(),a(this).calderaModal()}),a(window).load(function(){a("[data-modal][data-autoload]").each(function(){a(this).calderaModal()})}),a(document).on("click",".caldera-modal-closer",function(a){a.preventDefault(),j(this)})}(jQuery),function(a){var b=null,c={},d=[],e=[],f=a("html"),g=a("body"),h=a(window),i=function(){if(d.length||e.length){var a=d.length?d[d.length-1]:e[e.length-1],j=h.width(),k=h.height(),l=c[a].config.height,m=l,n=c[a].config.width,o=0,p=!1,q=!1;if(b&&f.addClass("has-caldera-modal"),o=(k-c[a].config.height)/2.2,0>o&&(o=0),l+2*c[a].config.padding>k&&b&&(l=k-2*c[a].config.padding,m="100%",b&&b.css({paddingTop:c[a].config.padding,paddingBottom:c[a].config.padding}),q=!0),n+2*c[a].config.padding>=j&&(n="100%",b&&b.css({paddingLeft:c[a].config.padding,paddingRight:c[a].config.padding}),q=!0),!0===q&&(700>=j&&j>600?(b&&(l=k-2*c[a].config.padding),n=j,m=l-2*c[a].config.padding,n="100%",o=0,b&&b.css({padding:c[a].config.padding})):600>=j&&(b&&(l=k),n=j,m="100%",o=0,b&&b.css({padding:0}))),b&&b.is(":hidden")&&(p=!0,b.show()),c[a].header&&(b&&b.show(),l-=c[a].header.outerHeight(),c[a].closer.css({padding:c[a].header.outerHeight()/2-.5}),c[a].title.css({paddingRight:c[a].closer.outerWidth()})),c[a].footer&&(b&&b.show(),l-=c[a].footer.outerHeight()),b&&!0===p&&(b.hide(),p=!1),l!=m&&c[a].body.css({height:l}),c[a].modal.css({width:n}),c[a].config.sticky&&c[a].config.minimized){var r={},s=c[a].title.outerHeight()-c[a].modal.outerHeight();c[a].config.sticky.indexOf("bottom")>-1?r["margin-bottom"]=s:c[a].config.sticky.indexOf("top")>-1&&(r["margin-top"]=s),c[a].modal.css(r),c[a].config.sticky.length>=3&&(g.css("margin-"+c[a].config.sticky[0],c[a].title.outerHeight()),q?c[a].modal.css(c[a].config.sticky[1],0):c[a].modal.css(c[a].config.sticky[1],parseFloat(c[a].config.sticky[2])))}return b&&(c[a].modal.css({marginTop:o,height:m}),setTimeout(function(){c[a].modal.addClass("caldera-animate")},10),b.fadeIn(c[a].config.speed)),c[a].resize=i,c}},j=function(e){var g=a(e).data("modal"),h=0,i={};if(e&&c[g].config.sticky)return c[g].config.minimized?(c[g].config.minimized=!1,h=0):(c[g].config.minimized=!0,h=c[g].title.outerHeight()-c[g].modal.outerHeight()),c[g].config.sticky.indexOf("bottom")>-1?i["margin-bottom"]=h:c[g].config.sticky.indexOf("top")>-1&&(i["margin-top"]=h),void c[g].modal.stop().animate(i,c[g].config.speed);var j;d.length&&(j=d.pop(),c[j].modal.hasClass("caldera-animate")&&!d.length?(c[j].modal.removeClass("caldera-animate"),setTimeout(function(){c[j].modal.remove(),delete c[j]},500)):b&&c[j].modal.hide(0,function(){a(this).remove(),delete c[j]})),d.length?c[d[d.length-1]].modal.show():(b&&b.fadeOut(250,function(){a(this).remove(),b=null}),f.removeClass("has-caldera-modal"))};a.calderaModal=function(f){var h=a.extend(!0,{element:"div",height:550,width:620,padding:12,speed:250},f);b||h.sticky||(b=a("<div>",{class:"caldera-backdrop"}),h.focus||b.on("click",function(a){a.target==this&&j()}),g.append(b),b.hide());var k=h.element,l=h.modal;if(d.length&&d[d.length-1]!==l&&c[d[d.length-1]].modal.hide(),void 0===c[l]?(h.sticky&&(h.sticky=h.sticky.split(" "),h.sticky.length<2&&(h.sticky=null),e.push(l)),c[l]={config:h,modal:a("<"+k+">",{id:l+"_calderaModal",tabIndex:-1,"ariaLabelled-by":l+"_calderaModalLable",class:"caldera-modal-wrap"+(h.sticky?" caldera-sticky-modal "+h.sticky[0]+"-"+h.sticky[1]:"")})},h.sticky||d.push(l)):(c[l].config=h,c[l].modal.empty()),h.animate&&b){var m=h.animate.split(" "),n=h.speed+"ms",o=h.animateEase?h.animateEase:"ease";1===m.length&&(m[1]=0),c[l].modal.css({transform:"translate("+m[0]+", "+m[1]+")","-web-kit-transition":"transform "+n+" "+o,"-moz-transition":"transform "+n+" "+o,transition:"transform "+n+" "+o})}if(c[l].body=a("<div>",{class:"caldera-modal-body",id:l+"_calderaModalBody"}),c[l].content=a("<div>",{class:"caldera-modal-content",id:l+"_calderaModalContent"}),c[l].content.css({margin:h.padding}),c[l].body.append(c[l].content).appendTo(c[l].modal),b?b.append(c[l].modal):c[l].modal.appendTo(a("body")),h.footer)if(c[l].footer=a("<div>",{class:"caldera-modal-footer",id:l+"_calderaModalFooter"}),c[l].footer.css({padding:h.padding}),c[l].footer.appendTo(c[l].modal),"function"==typeof window[h.footer])c[l].footer.append(window[h.footer](f,this));else if("string"==typeof h.footer)try{var p=a(h.footer);c[l].footer.html(p.html())}catch(a){c[l].footer.html(h.footer)}if(h.title){var q="prependTo";c[l].header=a("<div>",{class:"caldera-modal-title",id:l+"_calderaModalTitle"}),c[l].closer=a("<a>",{href:"#close",class:"caldera-modal-closer","data-dismiss":"modal","aria-hidden":"true",id:l+"_calderaModalCloser"}).html("&times;"),c[l].title=a("<h3>",{class:"modal-label",id:l+"_calderaModalLable"}),c[l].title.html(h.title).appendTo(c[l].header),c[l].title.css({padding:h.padding}),c[l].title.append(c[l].closer),c[l].config.sticky?(c[l].config.minimized&&!0!==c[l].config.minimized&&(setTimeout(function(){c[l].title.trigger("click")},parseInt(c[l].config.minimized)),c[l].config.minimized=!1),c[l].closer.hide(),c[l].title.addClass("caldera-modal-closer").data("modal",l).appendTo(c[l].header),c[l].config.sticky.indexOf("top")>-1&&(q="appendTo")):c[l].closer.data("modal",l).appendTo(c[l].header),c[l].header[q](c[l].modal)}if(c[l].modal.outerHeight(h.height),c[l].modal.outerWidth(h.width),h.content)if("function"==typeof h.content)c[l].content.append(h.content(f,c[l],this));else if("function"==typeof window[h.content])c[l].content.append(window[h.content](f,c[l],this));else if("string"==typeof h.content)try{var r=a(h.content);r.length?(c[l].content.append(r.detach()),r.show()):c[l].content.html(h.content)}catch(a){c[l].content.html(h.content)}return i(),c[l]},a.fn.calderaModal=function(b){return b||(b={}),b=a.extend({},this.data(),b),a.calderaModal(b)},window.addEventListener?(window.addEventListener("resize",i,!1),window.addEventListener("keypress",function(a){27===a.keyCode&&null!==b&&b.trigger("click")},!1)):window.attachEvent?window.attachEvent("onresize",i):window.onresize=i,a(document).on("click","[data-modal]:not(.caldera-modal-closer)",function(b){b.preventDefault(),a(this).calderaModal()}),a(window).load(function(){a("[data-modal][data-autoload]").each(function(){a(this).calderaModal()})}),a(document).on("click",".caldera-modal-closer",function(a){a.preventDefault(),j(this)})}(jQuery);
assets/build/js/conditionals.min.js CHANGED
@@ -1 +1 @@
1
- var calders_forms_check_conditions,calders_forms_init_conditions;!function(a){var b={};Array.prototype.indexOf||(Array.prototype.indexOf=function(a){var b=this.length>>>0,c=Number(arguments[1])||0;for(c=c<0?Math.ceil(c):Math.floor(c),c<0&&(c+=b);c<b;c++)if(c in this&&this[c]===a)return c;return-1}),cf_debounce=function(a,b,c){var d;return function(){var e=this,f=arguments,g=function(){d=null,c||a.apply(e,f)},h=c&&!d;clearTimeout(d),d=setTimeout(g,b),h&&a.apply(e,f)}},calders_forms_check_conditions=function(c){function d(a){if(b[a])return b[a]}if("undefined"!=typeof caldera_conditionals&&void 0!==caldera_conditionals[c]){var e=a(document.getElementById(c)),f=function(a){return"object"==typeof window.cfstate&&window.cfstate.hasOwnProperty(a)?window.cfstate[a]:null}(c);for(var g in caldera_conditionals[c]){if(jQuery("#conditional_"+g).length){var h=caldera_conditionals[c][g].type,i=caldera_conditionals[c][g].group,j=[];for(var k in i){var l={},m=i[k];for(var n in m){var o=e.find('[data-field="'+m[n].field+'"]'),p=[],q="function"==typeof m[n].value?m[n].value():m[n].value;if(void 0!==m[n].selectors)for(var r in m[n].selectors){var s=new RegExp(r,"g");q=q.replace(s,a(m[n].selectors[r]).val())}if(l[n]=!1,o.is(":radio,:checkbox"))o=o.filter(":checked");else if(o.is("div"))o=jQuery("<input>").val(o.html());else if(!o.length){var t=e.find('[data-calc-field="'+m[n].field+'"]');t.length&&(o=e.find('[data-calc-field="'+m[n].field+'"]'))}if(o.length)for(var u=0;u<o.length;u++)p.push(o[u].value);else p.push(m[n].field);switch(m[n].compare){case"is":p.length&&p.indexOf(q.toString())>=0&&(l[n]=!0);break;case"isnot":p.length&&p.indexOf(q)<0&&(l[n]=!0);break;case">":case"greater":l[n]=parseFloat(p.reduce(function(a,b){return a+b}))>parseFloat(q);break;case"<":case"smaller":l[n]=parseFloat(p.reduce(function(a,b){return a+b}))<parseFloat(q);break;case"startswith":for(var u=0;u<p.length;u++)p[u].toLowerCase().substr(0,q.toLowerCase().length)===q.toLowerCase()&&(l[n]=!0);break;case"endswith":for(var u=0;u<p.length;u++)p[u].toLowerCase().substr(p[u].toLowerCase().length-q.toLowerCase().length)===q.toLowerCase()&&(l[n]=!0);break;case"contains":for(var u=0;u<p.length;u++)p[u].toLowerCase().indexOf(q)>=0&&(l[n]=!0)}}istrue=!0;for(var v in l)if(!1===l[v]){istrue=!1;break}j.push(istrue)}var w,x=jQuery("#conditional-"+g+"-tmpl").html(),y=jQuery("#conditional_"+g),z=jQuery('[data-field="'+g+'"]');if(j.length&&j.indexOf(!0)>=0?"show"===h?w="show":"hide"===h?w="hide":"disable"===h&&(w="disable"):w="show"===h?"hide":"disable"===h?"enable":"show","show"===w)y.html().length||(y.html(x).trigger("cf.add",{field:g}),jQuery(document).trigger("cf.add",{field:g}),function(b,c){var e,f=d(b);if(void 0!=f)if("object"==typeof f)for(var g in f)!0===f[g]&&(e=a(document.getElementById(g)),e.prop("checked",!0));else e=a("#"+b),e.val(f);null!==c&&c.rebind(b)}(g,f));else if("hide"===w)y.html().length&&(!function(c,d){var e=a(document.getElementById(c));if(e.length){var f=e.val();f&&(b[c]=f)}else{var g;e=a("."+c),b[c]={},e.each(function(d,e){g=a(e),g.prop("checked")?b[c][g.attr("id")]=!0:b[c][g.attr("id")]=!1})}null!==d&&d.unbind(c)}(g,f),z.val("").empty().prop("checked",!1),y.empty().trigger("cf.remove",{field:g}),jQuery(document).trigger("cf.remove",{field:g}));else if("enable"===w||"disable"===w){var A=jQuery("#"+g);"enable"==w?y.html().length?A.prop("disabled",!1):(y.html(x).trigger("cf.add",{field:g}),jQuery(document).trigger("cf.add").trigger("cf.enable",{field:g}),A.prop("disabled",!1)):y.html().length?A.prop("disabled","disabled",{field:g}):(y.html(x).trigger("cf.remove"),jQuery(document).trigger("cf.remove",{field:g}).trigger("cf.disable",{field:g}),A.prop("disabled","disabled",{field:g}))}}}}},calders_forms_init_conditions=function(){jQuery(".caldera_forms_form").on("change keyup","[data-field]",cf_debounce(function(b){var c=a(this).closest(".caldera_forms_form").prop("id");calders_forms_check_conditions(c)},10))},"undefined"!=typeof caldera_conditionals&&(calders_forms_init_conditions(),jQuery(".caldera_forms_form").find("[data-field]").first().trigger("change"))}(jQuery);
1
+ var calders_forms_check_conditions,calders_forms_init_conditions;!function(a){var b={},c={};Array.prototype.indexOf||(Array.prototype.indexOf=function(a){var b=this.length>>>0,c=Number(arguments[1])||0;for(c=c<0?Math.ceil(c):Math.floor(c),c<0&&(c+=b);c<b;c++)if(c in this&&this[c]===a)return c;return-1}),cf_debounce=function(a,b,c){var d;return function(){var e=this,f=arguments,g=function(){d=null,c||a.apply(e,f)},h=c&&!d;clearTimeout(d),d=setTimeout(g,b),h&&a.apply(e,f)}},calders_forms_check_conditions=function(d){function e(a){if(b[a])return b[a]}if("undefined"!=typeof caldera_conditionals&&void 0!==caldera_conditionals[d]){var f=a(document.getElementById(d)),g=function(a){return"object"==typeof window.cfstate&&window.cfstate.hasOwnProperty(a)?window.cfstate[a]:null}(d);for(var h in caldera_conditionals[d]){if(jQuery("#conditional_"+h).length){var i=caldera_conditionals[d][h].type,j=caldera_conditionals[d][h].group,k=[];for(var l in j){var m={},n=j[l];for(var o in n){var p=f.find('[data-field="'+n[o].field+'"]'),q=[],r="function"==typeof n[o].value?n[o].value():n[o].value;if(void 0!==n[o].selectors)for(var s in n[o].selectors){var t=new RegExp(s,"g");r=r.replace(t,a(n[o].selectors[s]).val())}if(m[o]=!1,p.is(":radio,:checkbox"))p=p.filter(":checked");else if(p.is("div"))p=jQuery("<input>").val(p.html());else if(!p.length){var u=f.find('[data-calc-field="'+n[o].field+'"]');u.length&&(p=f.find('[data-calc-field="'+n[o].field+'"]'))}if(p.length)for(var v=0;v<p.length;v++)q.push(p[v].value);else q.push(n[o].field);switch(n[o].compare){case"is":q.length&&q.indexOf(r.toString())>=0&&(m[o]=!0);break;case"isnot":q.length&&q.indexOf(r)<0&&(m[o]=!0);break;case">":case"greater":m[o]=parseFloat(q.reduce(function(a,b){return a+b}))>parseFloat(r);break;case"<":case"smaller":m[o]=parseFloat(q.reduce(function(a,b){return a+b}))<parseFloat(r);break;case"startswith":for(var v=0;v<q.length;v++)q[v].toLowerCase().substr(0,r.toLowerCase().length)===r.toLowerCase()&&(m[o]=!0);break;case"endswith":for(var v=0;v<q.length;v++)q[v].toLowerCase().substr(q[v].toLowerCase().length-r.toLowerCase().length)===r.toLowerCase()&&(m[o]=!0);break;case"contains":for(var v=0;v<q.length;v++)q[v].toLowerCase().indexOf(r)>=0&&(m[o]=!0)}}istrue=!0;for(var w in m)if(!1===m[w]){istrue=!1;break}k.push(istrue)}var x,y=jQuery("#conditional-"+h+"-tmpl").html(),z=jQuery("#conditional_"+h),A=jQuery('[data-field="'+h+'"]');if(k.length&&k.indexOf(!0)>=0?"show"===i?x="show":"hide"===i?x="hide":"disable"===i&&(x="disable"):x="show"===i?"hide":"disable"===i?"enable":"show","show"===x)z.html().length||(z.html(y).trigger("cf.add",{field:h}),jQuery(document).trigger("cf.add",{field:h}),function(b,d){var g,h=e(b);if(void 0!=h)if("object"==typeof h)for(var i in h)!0===h[i]&&(g=a(document.getElementById(i)),g.prop("checked",!0));else g=a("#"+b),g.val(h);null!==d&&(d.rebind(b),void 0===g&&(g=a("#"+b)),c.hasOwnProperty(b)&&(g.attr("data-unsync","1"),g.removeAttr("data-sync"),g.removeAttr("data-binds")),void 0!==g&&g.data("sync")&&new CalderaFormsFieldSync(g,g.data("binds"),f,a,d))}(h,g));else if("hide"===x)z.html().length&&(!function(d,e){var f=a(document.getElementById(d));if(f.length){var g=f.val();g&&(b[d]=g)}else{var h;f=a("."+d),b[d]={},f.each(function(c,e){h=a(e),h.prop("checked")?b[d][h.attr("id")]=!0:b[d][h.attr("id")]=!1})}f.data("unsync")&&(c[d]=!0),null!==e&&e.unbind(d)}(h,g),A.val("").empty().prop("checked",!1),z.empty().trigger("cf.remove",{field:h}),jQuery(document).trigger("cf.remove",{field:h}));else if("enable"===x||"disable"===x){var B=jQuery("#"+h);"enable"==x?z.html().length?B.prop("disabled",!1):(z.html(y).trigger("cf.add",{field:h}),jQuery(document).trigger("cf.add").trigger("cf.enable",{field:h}),B.prop("disabled",!1)):z.html().length?B.prop("disabled","disabled",{field:h}):(z.html(y).trigger("cf.remove"),jQuery(document).trigger("cf.remove",{field:h}).trigger("cf.disable",{field:h}),B.prop("disabled","disabled",{field:h}))}}}}},calders_forms_init_conditions=function(){jQuery(".caldera_forms_form").on("change keyup","[data-field]",cf_debounce(function(b){var c=a(this).closest(".caldera_forms_form").prop("id");calders_forms_check_conditions(c)},10))},"undefined"!=typeof caldera_conditionals&&(calders_forms_init_conditions(),jQuery(".caldera_forms_form").find("[data-field]").first().trigger("change"))}(jQuery);var calders_forms_check_conditions,calders_forms_init_conditions;!function(a){Array.prototype.indexOf||(Array.prototype.indexOf=function(a){var b=this.length>>>0,c=Number(arguments[1])||0;for(0>(c=0>c?Math.ceil(c):Math.floor(c))&&(c+=b);b>c;c++)if(c in this&&this[c]===a)return c;return-1}),cf_debounce=function(a,b,c){var d;return function(){var e=this,f=arguments,g=function(){d=null,c||a.apply(e,f)},h=c&&!d;clearTimeout(d),d=setTimeout(g,b),h&&a.apply(e,f)}},calders_forms_check_conditions=function(b){if("undefined"!=typeof caldera_conditionals&&void 0!==caldera_conditionals[b]){var c=a("#"+b);for(var d in caldera_conditionals[b]){if(jQuery("#conditional_"+d).length){var e=caldera_conditionals[b][d].type,f=caldera_conditionals[b][d].group,g=[];for(var h in f){var i={},j=f[h];for(var k in j){var l=c.find('[data-field="'+j[k].field+'"]'),m=[],n="function"==typeof j[k].value?j[k].value():j[k].value;if(void 0!==j[k].selectors)for(var o in j[k].selectors){var p=new RegExp(o,"g");n=n.replace(p,a(j[k].selectors[o]).val())}if(i[k]=!1,l.is(":radio,:checkbox")?l=l.filter(":checked"):l.is("div")&&(l=jQuery("<input>").val(l.html())),l.length)for(var q=0;q<l.length;q++)m.push(l[q].value);else m.push(j[k].field);switch(j[k].compare){case"is":m.length&&m.indexOf(n.toString())>=0&&(i[k]=!0);break;case"isnot":m.length&&m.indexOf(n)<0&&(i[k]=!0);break;case">":case"greater":i[k]=parseFloat(m.reduce(function(a,b){return a+b}))>parseFloat(n);break;case"<":case"smaller":i[k]=parseFloat(m.reduce(function(a,b){return a+b}))<parseFloat(n);break;case"startswith":for(var q=0;q<m.length;q++)m[q].toLowerCase().substr(0,n.toLowerCase().length)===n.toLowerCase()&&(i[k]=!0);break;case"endswith":for(var q=0;q<m.length;q++)m[q].toLowerCase().substr(m[q].toLowerCase().length-n.toLowerCase().length)===n.toLowerCase()&&(i[k]=!0);break;case"contains":for(var q=0;q<m.length;q++)m[q].toLowerCase().indexOf(n)>=0&&(i[k]=!0)}}istrue=!0;for(var r in i)if(!1===i[r]){istrue=!1;break}g.push(istrue)}var s,t=jQuery("#conditional-"+d+"-tmpl").html(),u=jQuery("#conditional_"+d),v=jQuery('[data-field="'+d+'"]');g.length&&g.indexOf(!0)>=0?"show"===e?s="show":"hide"===e?s="hide":"disable"===e&&(s="disable"):s="show"===e?"hide":"disable"===e?"enable":"show","show"===s?u.html().length||(u.html(t).trigger("cf.add"),jQuery(document).trigger("cf.add")):"hide"===s?u.html().length&&(v.val("").empty().prop("checked",!1),u.empty().trigger("cf.remove"),jQuery(document).trigger("cf.remove")):"enable"===s?u.html().length?(v.prop("disabled",!1),jQuery("#"+d).prop("disabled",!1)):(u.html(t).trigger("cf.add"),jQuery(document).trigger("cf.add").trigger("cf.enable")):"disable"===s&&(u.html().length?(v.prop("disabled","disabled"),jQuery("#"+d).prop("disabled","disabled")):(u.html(t).trigger("cf.remove"),jQuery(document).trigger("cf.remove").trigger("cf.disable"),jQuery('[data-field="'+d+'"]').prop("disabled","disabled")))}}}},calders_forms_init_conditions=function(){jQuery(".caldera_forms_form").on("change keyup","[data-field]",cf_debounce(function(b){var c=a(this).closest(".caldera_forms_form").prop("id");calders_forms_check_conditions(c)},10))},"undefined"!=typeof caldera_conditionals&&(calders_forms_init_conditions(),jQuery(".caldera_forms_form").find("[data-field]").first().trigger("change"))}(jQuery);
assets/build/js/fields.min.js CHANGED
@@ -1,2 +1,5 @@
1
- function color_picker_init(){jQuery(".minicolor-picker").miniColors()}function toggle_button_init(a,b){var c=jQuery(b),d=c.find(".cf-toggle-group-radio:checked");d.length&&jQuery("#"+d.data("ref")).trigger("click")}jQuery&&function(a){a.extend(a.fn,{miniColors:function(b,c){var d=function(b,c,d){var e=s(b.val());e||(e="ffffff");var f=x(e),h=a('<span class="input-group-addon" style="background-color: #'+e+'" href="#"></span>');h.insertAfter(b),b.addClass("miniColors").data("original-maxlength",b.attr("maxlength")||null).data("original-autocomplete",b.attr("autocomplete")||null).data("letterCase",c.letterCase?c.letterCase:"uppercase").data("trigger",h).data("hsb",f).data("change",c.change?c.change:null).data("close",c.close?c.close:null).data("open",c.open?c.open:null).attr("maxlength",7).attr("autocomplete","off").val("#"+o(e,c.letterCase)).trigger("change"),c.readonly&&b.prop("readonly",!0),c.disabled&&g(b),h.on("click.miniColors",function(a){a.preventDefault(),""===b.val()&&b.val("#").trigger("change"),i(b)}),b.on("focus.miniColors",function(a){""===b.val()&&b.val("#").trigger("change"),i(b)}),b.on("blur.miniColors",function(a){var c=s(y(b.data("hsb")));b.val(c?"#"+o(c,b.data("letterCase")):"").trigger("change")}),b.on("keydown.miniColors",function(a){9===a.keyCode&&j(b)}),b.on("keyup.miniColors",function(a){n(b)}),b.on("paste.miniColors",function(a){setTimeout(function(){n(b)},5)})},e=function(b){j(),b=a(b),b.data("trigger").remove(),b.attr("autocomplete",b.data("original-autocomplete")).attr("maxlength",b.data("original-maxlength")).removeData().removeClass("miniColors").off(".miniColors"),a(document).off(".miniColors")},f=function(a){a.prop("disabled",!1).data("trigger").css("opacity",1)},g=function(a){j(a),a.prop("disabled",!0).data("trigger").css("opacity",.5)},i=function(b){if(b.prop("disabled"))return!1;j();var c=a('<div class="miniColors-selector"></div>');c.append('<div class="miniColors-colors" style="background-color: #FFF;"><div class="miniColors-colorPicker"><div class="miniColors-colorPicker-inner"></div></div>').append('<div class="miniColors-hues"><div class="miniColors-huePicker"></div></div>').css("display","none").addClass(b.attr("class")).removeClass("form-control");var d=b.data("hsb");c.find(".miniColors-colors").css("backgroundColor","#"+y({h:d.h,s:100,b:100}));var e=b.data("colorPosition");e||(e=p(d)),c.find(".miniColors-colorPicker").css("top",e.y+"px").css("left",e.x+"px");var f=b.data("huePosition");f||(f=q(d)),c.find(".miniColors-huePicker").css("top",f.y+"px"),b.data("selector",c).data("huePicker",c.find(".miniColors-huePicker")).data("colorPicker",c.find(".miniColors-colorPicker")).data("mousebutton",0),a("BODY").append(c);var g=b.data("trigger"),h=!b.is(":visible"),i=h?g.offset().top+g.outerHeight():b.offset().top+b.outerHeight(),m=h?g.offset().left:b.offset().left,n=c.outerWidth(),o=c.outerHeight(),r=g.outerWidth(),s=g.outerHeight(),u=a(window).height(),v=a(window).width(),w=a(window).scrollTop(),x=a(window).scrollLeft();i+o>u+w&&(i=i-o-s),m+n>v+x&&(m=m-n+r),c.css({top:i,left:m}).fadeIn(100),c.on("selectstart",function(){return!1}),(!a.browser.msie||a.browser.msie&&a.browser.version>=9)&&a(window).on("resize.miniColors",function(a){j(b)}),a(document).on("mousedown.miniColors touchstart.miniColors",function(c){b.data("mousebutton",1);var d=a(c.target).parents().andSelf();if(d.hasClass("miniColors-colors")&&(c.preventDefault(),b.data("moving","colors"),k(b,c)),d.hasClass("miniColors-hues")&&(c.preventDefault(),b.data("moving","hues"),l(b,c)),d.hasClass("miniColors-selector"))return void c.preventDefault();d.hasClass("miniColors")||j(b)}),a(document).on("mouseup.miniColors touchend.miniColors",function(a){a.preventDefault(),b.data("mousebutton",0).removeData("moving")}).on("mousemove.miniColors touchmove.miniColors",function(a){a.preventDefault(),1===b.data("mousebutton")&&("colors"===b.data("moving")&&k(b,a),"hues"===b.data("moving")&&l(b,a))}),b.data("open")&&b.data("open").call(b.get(0),"#"+y(d),t(d))},j=function(b){b||(b=a(".miniColors")),b.each(function(){var c=a(this).data("selector");a(this).removeData("selector"),a(c).fadeOut(100,function(){if(b.data("close")){var c=b.data("hsb"),d=y(c);b.data("close").call(b.get(0),"#"+d,t(c))}a(this).remove()})}),a(document).off(".miniColors")},k=function(a,b){var c=a.data("colorPicker");c.hide();var d={x:b.pageX,y:b.pageY};b.originalEvent.changedTouches&&(d.x=b.originalEvent.changedTouches[0].pageX,d.y=b.originalEvent.changedTouches[0].pageY),d.x=d.x-a.data("selector").find(".miniColors-colors").offset().left-5,d.y=d.y-a.data("selector").find(".miniColors-colors").offset().top-5,d.x<=-5&&(d.x=-5),d.x>=144&&(d.x=144),d.y<=-5&&(d.y=-5),d.y>=144&&(d.y=144),a.data("colorPosition",d),c.css("left",d.x).css("top",d.y).show();var e=Math.round(.67*(d.x+5));e<0&&(e=0),e>100&&(e=100);var f=100-Math.round(.67*(d.y+5));f<0&&(f=0),f>100&&(f=100);var g=a.data("hsb");g.s=e,g.b=f,m(a,g,!0)},l=function(a,b){var c=a.data("huePicker");c.hide();var d={y:b.pageY};b.originalEvent.changedTouches&&(d.y=b.originalEvent.changedTouches[0].pageY),d.y=d.y-a.data("selector").find(".miniColors-colors").offset().top-1,d.y<=-1&&(d.y=-1),d.y>=149&&(d.y=149),a.data("huePosition",d),c.css("top",d.y).show();var e=Math.round(2.4*(150-d.y-1));e<0&&(e=0),e>360&&(e=360);var f=a.data("hsb");f.h=e,m(a,f,!0)},m=function(a,b,c){a.data("hsb",b);var d=y(b);if(c&&a.val("#"+o(d,a.data("letterCase"))).trigger("change"),a.data("trigger").css("backgroundColor","#"+d),a.data("selector")&&a.data("selector").find(".miniColors-colors").css("backgroundColor","#"+y({h:b.h,s:100,b:100})),a.data("change")){if(d===a.data("lastChange"))return;a.data("change").call(a.get(0),"#"+d,t(b)),a.data("lastChange",d)}},n=function(b){b.val("#"+r(b.val())).trigger("change");var c=s(b.val());if(!c)return!1;var d=x(c),e=b.data("hsb");if(d.h===e.h&&d.s===e.s&&d.b===e.b)return!0;var f=p(d);a(b.data("colorPicker")).css("top",f.y+"px").css("left",f.x+"px"),b.data("colorPosition",f);var g=q(d);return a(b.data("huePicker")).css("top",g.y+"px"),b.data("huePosition",g),m(b,d),!0},o=function(a,b){return"lowercase"===b?a.toLowerCase():"uppercase"===b?a.toUpperCase():a},p=function(a){var b=Math.ceil(a.s/.67);b<0&&(b=0),b>150&&(b=150);var c=150-Math.ceil(a.b/.67);return c<0&&(c=0),c>150&&(c=150),{x:b-5,y:c-5}},q=function(a){var b=150-a.h/2.4;return b<0&&(h=0),b>150&&(h=150),{y:b-1}},r=function(a){return a.replace(/[^A-F0-9]/gi,"")},s=function(a){return(a=r(a))?(3===a.length&&(a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]),6===a.length?a:null):null},t=function(a){var b={},c=Math.round(a.h),d=Math.round(255*a.s/100),e=Math.round(255*a.b/100);if(0===d)b.r=b.g=b.b=e;else{var f=e,g=(255-d)*e/255,h=c%60*(f-g)/60;360===c&&(c=0),c<60?(b.r=f,b.b=g,b.g=g+h):c<120?(b.g=f,b.b=g,b.r=f-h):c<180?(b.g=f,b.r=g,b.b=g+h):c<240?(b.b=f,b.r=g,b.g=f-h):c<300?(b.b=f,b.g=g,b.r=g+h):c<360?(b.r=f,b.g=g,b.b=f-h):(b.r=0,b.g=0,b.b=0)}return{r:Math.round(b.r),g:Math.round(b.g),b:Math.round(b.b)}},u=function(b){var c=[b.r.toString(16),b.g.toString(16),b.b.toString(16)];return a.each(c,function(a,b){1===b.length&&(c[a]="0"+b)}),c.join("")},v=function(a){return a=parseInt(a.indexOf("#")>-1?a.substring(1):a,16),{r:a>>16,g:(65280&a)>>8,b:255&a}},w=function(a){var b={h:0,s:0,b:0},c=Math.min(a.r,a.g,a.b),d=Math.max(a.r,a.g,a.b),e=d-c;return b.b=d,b.s=0!==d?255*e/d:0,0!==b.s?a.r===d?b.h=(a.g-a.b)/e:a.g===d?b.h=2+(a.b-a.r)/e:b.h=4+(a.r-a.g)/e:b.h=-1,b.h*=60,b.h<0&&(b.h+=360),b.s*=100/255,b.b*=100/255,b},x=function(a){var b=w(v(a));return 0===b.s&&(b.h=360),b},y=function(a){return u(t(a))};switch(b){case"readonly":return a(this).each(function(){a(this).hasClass("miniColors")&&a(this).prop("readonly",c)}),a(this);case"disabled":return a(this).each(function(){a(this).hasClass("miniColors")&&(c?g(a(this)):f(a(this)))}),a(this);case"value":if(void 0===c){if(!a(this).hasClass("miniColors"))return;var z=a(this),A=s(z.val());return A?"#"+o(A,z.data("letterCase")):null}return a(this).each(function(){a(this).hasClass("miniColors")&&(a(this).val(c).trigger("change"),n(a(this)))}),a(this);case"destroy":return a(this).each(function(){a(this).hasClass("miniColors")&&e(a(this))}),a(this);default:return b||(b={}),a(this).each(function(){"input"===a(this)[0].tagName.toLowerCase()&&(a(this).data("trigger")||d(a(this),b))}),a(this)}}})}(jQuery),document.addEventListener("load",color_picker_init,!1),jQuery(document).ajaxComplete(function(){color_picker_init()}),function(a,b){function c(){return new Date(Date.UTC.apply(Date,arguments))}function d(){var a=new Date;return c(a.getFullYear(),a.getMonth(),a.getDate())}function e(a){return function(){return this[a].apply(this,arguments)}}function f(b,c){function d(a,b){return b.toLowerCase()}var e,f=a(b).data(),g={},h=new RegExp("^"+c.toLowerCase()+"([A-Z])");c=new RegExp("^"+c.toLowerCase());for(var i in f)c.test(i)&&(e=i.replace(h,d),g[e]=f[i]);return g}function g(b){var c={};if(o[b]||(b=b.split("-")[0],o[b])){var d=o[b];return a.each(n,function(a,b){b in d&&(c[b]=d[b])}),c}}var h=a(window),i=function(){var b={get:function(a){return this.slice(a)[0]},contains:function(a){for(var b=a&&a.valueOf(),c=0,d=this.length;c<d;c++)if(this[c].valueOf()===b)return c;return-1},remove:function(a){this.splice(a,1)},replace:function(b){b&&(a.isArray(b)||(b=[b]),this.clear(),this.push.apply(this,b))},clear:function(){this.splice(0)},copy:function(){var a=new i;return a.replace(this),a}};return function(){var c=[];return c.push.apply(c,arguments),a.extend(c,b),c}}(),j=function(b,c){this.dates=new i,this.viewDate=d(),this.focusDate=null,this._process_options(c),this.element=a(b),this.isInline=!1,this.isInput=this.element.is("input"),this.component=!!this.element.is(".date")&&this.element.find(".add-on, .input-group-addon, .btn"),this.hasInput=this.component&&this.element.find("input").length,this.component&&0===this.component.length&&(this.component=!1),this.picker=a(p.template),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("cfdatepicker-inline").appendTo(this.element):this.picker.addClass("cfdatepicker-dropdown dropdown-menu"),this.o.rtl&&this.picker.addClass("cfdatepicker-rtl"),this.viewMode=this.o.startView,this.o.calendarWeeks&&this.picker.find("tfoot th.today").attr("colspan",function(a,b){return parseInt(b)+1}),this._allow_update=!1,this.setStartDate(this._o.startDate),this.setEndDate(this._o.endDate),this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled),this.fillDow(),this.fillMonths(),this._allow_update=!0,this.update(),this.showMode(),this.isInline&&this.show()};j.prototype={constructor:j,_process_options:function(b){this._o=a.extend({},this._o,b);var c=this.o=a.extend({},this._o),d=c.language;switch(o[d]||(d=d.split("-")[0],o[d]||(d=m.language)),c.language=d,c.startView){case 2:case"decade":c.startView=2;break;case 1:case"year":c.startView=1;break;default:c.startView=0}switch(c.minViewMode){case 1:case"months":c.minViewMode=1;break;case 2:case"years":c.minViewMode=2;break;default:c.minViewMode=0}c.startView=Math.max(c.startView,c.minViewMode),!0!==c.multidate&&(c.multidate=Number(c.multidate)||!1,!1!==c.multidate?c.multidate=Math.max(0,c.multidate):c.multidate=1),c.multidateSeparator=String(c.multidateSeparator),c.weekStart%=7,c.weekEnd=(c.weekStart+6)%7;var e=p.parseFormat(c.format);c.startDate!==-1/0&&(c.startDate?c.startDate instanceof Date?c.startDate=this._local_to_utc(this._zero_time(c.startDate)):c.startDate=p.parseDate(c.startDate,e,c.language):c.startDate=-1/0),c.endDate!==1/0&&(c.endDate?c.endDate instanceof Date?c.endDate=this._local_to_utc(this._zero_time(c.endDate)):c.endDate=p.parseDate(c.endDate,e,c.language):c.endDate=1/0),c.daysOfWeekDisabled=c.daysOfWeekDisabled||[],a.isArray(c.daysOfWeekDisabled)||(c.daysOfWeekDisabled=c.daysOfWeekDisabled.split(/[,\s]*/)),c.daysOfWeekDisabled=a.map(c.daysOfWeekDisabled,function(a){return parseInt(a,10)});var f=String(c.orientation).toLowerCase().split(/\s+/g),g=c.orientation.toLowerCase();if(f=a.grep(f,function(a){return/^auto|left|right|top|bottom$/.test(a)}),c.orientation={x:"auto",y:"auto"},g&&"auto"!==g)if(1===f.length)switch(f[0]){case"top":case"bottom":c.orientation.y=f[0];break;case"left":case"right":c.orientation.x=f[0]}else g=a.grep(f,function(a){return/^left|right$/.test(a)}),c.orientation.x=g[0]||"auto",g=a.grep(f,function(a){return/^top|bottom$/.test(a)}),c.orientation.y=g[0]||"auto";else;},_events:[],_secondaryEvents:[],_applyEvents:function(a){for(var b,c,d,e=0;e<a.length;e++)b=a[e][0],2===a[e].length?(c=void 0,d=a[e][1]):3===a[e].length&&(c=a[e][1],d=a[e][2]),b.on(d,c)},_unapplyEvents:function(a){for(var b,c,d,e=0;e<a.length;e++)b=a[e][0],2===a[e].length?(d=void 0,c=a[e][1]):3===a[e].length&&(d=a[e][1],c=a[e][2]),b.off(c,d)},_buildEvents:function(){this.isInput?this._events=[[this.element,{focus:a.proxy(this.show,this),keyup:a.proxy(function(b){-1===a.inArray(b.keyCode,[27,37,39,38,40,32,13,9])&&this.update()},this),keydown:a.proxy(this.keydown,this)}]]:this.component&&this.hasInput?this._events=[[this.element.find("input"),{focus:a.proxy(this.show,this),keyup:a.proxy(function(b){-1===a.inArray(b.keyCode,[27,37,39,38,40,32,13,9])&&this.update()},this),keydown:a.proxy(this.keydown,this)}],[this.component,{click:a.proxy(this.show,this)}]]:this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:a.proxy(this.show,this)}]],this._events.push([this.element,"*",{blur:a.proxy(function(a){this._focused_from=a.target},this)}],[this.element,{blur:a.proxy(function(a){this._focused_from=a.target},this)}]),this._secondaryEvents=[[this.picker,{click:a.proxy(this.click,this)}],[a(window),{resize:a.proxy(this.place,this)}],[a(document),{"mousedown touchstart":a.proxy(function(a){this.element.is(a.target)||this.element.find(a.target).length||this.picker.is(a.target)||this.picker.find(a.target).length||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(b,c){var d=c||this.dates.get(-1),e=this._utc_to_local(d);this.element.trigger({type:b,date:e,dates:a.map(this.dates,this._utc_to_local),format:a.proxy(function(a,b){0===arguments.length?(a=this.dates.length-1,b=this.o.format):"string"==typeof a&&(b=a,a=this.dates.length-1),b=b||this.o.format;var c=this.dates.get(a);return p.formatDate(c,b,this.o.language)},this)})},show:function(){this.isInline||this.picker.appendTo("body"),this.picker.show(),this.place(),this._attachSecondaryEvents(),this._trigger("show")},hide:function(){this.isInline||this.picker.is(":visible")&&(this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.viewMode=this.o.startView,this.showMode(),this.o.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())&&this.setValue(),this._trigger("hide"))},remove:function(){this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().cfdatepicker,this.isInput||delete this.element.data().date},_utc_to_local:function(a){return a&&new Date(a.getTime()+6e4*a.getTimezoneOffset())},_local_to_utc:function(a){return a&&new Date(a.getTime()-6e4*a.getTimezoneOffset())},_zero_time:function(a){return a&&new Date(a.getFullYear(),a.getMonth(),a.getDate())},_zero_utc_time:function(a){return a&&new Date(Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()))},getDates:function(){return a.map(this.dates,this._utc_to_local)},getUTCDates:function(){return a.map(this.dates,function(a){return new Date(a)})},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){return new Date(this.dates.get(-1))},setDates:function(){var b=a.isArray(arguments[0])?arguments[0]:arguments;this.update.apply(this,b),this._trigger("changeDate"),this.setValue()},setUTCDates:function(){var b=a.isArray(arguments[0])?arguments[0]:arguments;this.update.apply(this,a.map(b,this._utc_to_local)),this._trigger("changeDate"),this.setValue()},setDate:e("setDates"),setUTCDate:e("setUTCDates"),setValue:function(){var a=this.getFormattedDate();this.isInput?this.element.val(a).change():this.component&&this.element.find("input").val(a).change()},getFormattedDate:function(b){void 0===b&&(b=this.o.format);var c=this.o.language;return a.map(this.dates,function(a){return p.formatDate(a,b,c)}).join(this.o.multidateSeparator)},setStartDate:function(a){this._process_options({startDate:a}),this.update(),this.updateNavArrows()},setEndDate:function(a){this._process_options({endDate:a}),this.update(),this.updateNavArrows()},setDaysOfWeekDisabled:function(a){this._process_options({daysOfWeekDisabled:a}),this.update(),this.updateNavArrows()},place:function(){if(!this.isInline){var b,c=this.picker.outerWidth(),d=this.picker.outerHeight(),e=h.width(),f=h.height(),g=h.scrollTop(),i=jQuery(this.element).data("form-id"),j=document.getElementById("modal-"+i+"-content");b=null!==j?1e4:parseInt(this.element.parents().filter(function(){return"auto"!==a(this).css("z-index")}).first().css("z-index"))+10;var k=this.component?this.component.parent().offset():this.element.offset(),l=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),m=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),n=k.left,o=k.top;this.picker.removeClass("cfdatepicker-orient-top cfdatepicker-orient-bottom cfdatepicker-orient-right cfdatepicker-orient-left"),"auto"!==this.o.orientation.x?(this.picker.addClass("cfdatepicker-orient-"+this.o.orientation.x),"right"===this.o.orientation.x&&(n-=c-m)):(this.picker.addClass("cfdatepicker-orient-left"),k.left<0?n-=k.left-10:k.left+c>e&&(n=e-c-10));var p,q,r=this.o.orientation.y;"auto"===r&&(p=-g+k.top-d,q=g+f-(k.top+l+d),r=Math.max(p,q)===q?"top":"bottom"),this.picker.addClass("cfdatepicker-orient-"+r),"top"===r?o+=l:o-=d+parseInt(this.picker.css("padding-top")),this.picker.css({top:o,left:n,zIndex:b})}},_allow_update:!0,update:function(){if(this._allow_update){var b=this.dates.copy(),c=[],d=!1;arguments.length?(a.each(arguments,a.proxy(function(a,b){b instanceof Date&&(b=this._local_to_utc(b)),c.push(b)},this)),d=!0):(c=this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val(),c=c&&this.o.multidate?c.split(this.o.multidateSeparator):[c],delete this.element.data().date),c=a.map(c,a.proxy(function(a){return p.parseDate(a,this.o.format,this.o.language)},this)),c=a.grep(c,a.proxy(function(a){return a<this.o.startDate||a>this.o.endDate||!a},this),!0),this.dates.replace(c),this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.viewDate>this.o.endDate&&(this.viewDate=new Date(this.o.endDate)),d?this.setValue():c.length&&String(b)!==String(this.dates)&&this._trigger("changeDate"),!this.dates.length&&b.length&&this._trigger("clearDate"),this.fill()}},fillDow:function(){var a=this.o.weekStart,b="<tr>";if(this.o.calendarWeeks){var c='<th class="cw">&nbsp;</th>';b+=c,this.picker.find(".cfdatepicker-days thead tr:first-child").prepend(c)}for(;a<this.o.weekStart+7;)b+='<th class="dow">'+o[this.o.language].daysMin[a++%7]+"</th>";b+="</tr>",this.picker.find(".cfdatepicker-days thead").append(b)},fillMonths:function(){for(var a="",b=0;b<12;)a+='<span class="month">'+o[this.o.language].monthsShort[b++]+"</span>";this.picker.find(".cfdatepicker-months td").html(a)},setRange:function(b){b&&b.length?this.range=a.map(b,function(a){return a.valueOf()}):delete this.range,this.fill()},getClassNames:function(b){var c=[],d=this.viewDate.getUTCFullYear(),e=this.viewDate.getUTCMonth(),f=new Date;return b.getUTCFullYear()<d||b.getUTCFullYear()===d&&b.getUTCMonth()<e?c.push("old"):(b.getUTCFullYear()>d||b.getUTCFullYear()===d&&b.getUTCMonth()>e)&&c.push("new"),this.focusDate&&b.valueOf()===this.focusDate.valueOf()&&c.push("focused"),this.o.todayHighlight&&b.getUTCFullYear()===f.getFullYear()&&b.getUTCMonth()===f.getMonth()&&b.getUTCDate()===f.getDate()&&c.push("today"),-1!==this.dates.contains(b)&&c.push("active"),(b.valueOf()<this.o.startDate||b.valueOf()>this.o.endDate||-1!==a.inArray(b.getUTCDay(),this.o.daysOfWeekDisabled))&&c.push("disabled"),this.range&&(b>this.range[0]&&b<this.range[this.range.length-1]&&c.push("range"),-1!==a.inArray(b.valueOf(),this.range)&&c.push("selected")),c},fill:function(){var b,d=new Date(this.viewDate),e=d.getUTCFullYear(),f=d.getUTCMonth(),g=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,h=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,i=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,j=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,k=o[this.o.language].today||o.en.today||"",l=o[this.o.language].clear||o.en.clear||"";this.picker.find(".cfdatepicker-days thead th.cfdatepicker-switch").text(o[this.o.language].months[f]+" "+e),this.picker.find("tfoot th.today").text(k).toggle(!1!==this.o.todayBtn),this.picker.find("tfoot th.clear").text(l).toggle(!1!==this.o.clearBtn),this.updateNavArrows(),this.fillMonths();var m=c(e,f-1,28),n=p.getDaysInMonth(m.getUTCFullYear(),m.getUTCMonth());m.setUTCDate(n),m.setUTCDate(n-(m.getUTCDay()-this.o.weekStart+7)%7);var q=new Date(m);q.setUTCDate(q.getUTCDate()+42),q=q.valueOf();for(var r,s=[];m.valueOf()<q;){if(m.getUTCDay()===this.o.weekStart&&(s.push("<tr>"),this.o.calendarWeeks)){var t=new Date(+m+(this.o.weekStart-m.getUTCDay()-7)%7*864e5),u=new Date(Number(t)+(11-t.getUTCDay())%7*864e5),v=new Date(Number(v=c(u.getUTCFullYear(),0,1))+(11-v.getUTCDay())%7*864e5),w=(u-v)/864e5/7+1;s.push('<td class="cw">'+w+"</td>")}if(r=this.getClassNames(m),r.push("day"),this.o.beforeShowDay!==a.noop){var x=this.o.beforeShowDay(this._utc_to_local(m));void 0===x?x={}:"boolean"==typeof x?x={enabled:x}:"string"==typeof x&&(x={classes:x}),!1===x.enabled&&r.push("disabled"),x.classes&&(r=r.concat(x.classes.split(/\s+/))),x.tooltip&&(b=x.tooltip)}r=a.unique(r),s.push('<td class="'+r.join(" ")+'"'+(b?' title="'+b+'"':"")+">"+m.getUTCDate()+"</td>"),m.getUTCDay()===this.o.weekEnd&&s.push("</tr>"),m.setUTCDate(m.getUTCDate()+1)}this.picker.find(".cfdatepicker-days tbody").empty().append(s.join(""));var y=this.picker.find(".cfdatepicker-months").find("th:eq(1)").text(e).end().find("span").removeClass("active");a.each(this.dates,function(a,b){b.getUTCFullYear()===e&&y.eq(b.getUTCMonth()).addClass("active")}),(e<g||e>i)&&y.addClass("disabled"),e===g&&y.slice(0,h).addClass("disabled"),e===i&&y.slice(j+1).addClass("disabled"),s="",e=10*parseInt(e/10,10);var z=this.picker.find(".cfdatepicker-years").find("th:eq(1)").text(e+"-"+(e+9)).end().find("td");e-=1;for(var A,B=a.map(this.dates,function(a){return a.getUTCFullYear()}),C=-1;C<11;C++)A=["year"],-1===C?A.push("old"):10===C&&A.push("new"),-1!==a.inArray(e,B)&&A.push("active"),(e<g||e>i)&&A.push("disabled"),s+='<span class="'+A.join(" ")+'">'+e+"</span>",e+=1;z.html(s)},updateNavArrows:function(){if(this._allow_update){var a=new Date(this.viewDate),b=a.getUTCFullYear(),c=a.getUTCMonth();switch(this.viewMode){case 0:this.o.startDate!==-1/0&&b<=this.o.startDate.getUTCFullYear()&&c<=this.o.startDate.getUTCMonth()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&b>=this.o.endDate.getUTCFullYear()&&c>=this.o.endDate.getUTCMonth()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 1:case 2:this.o.startDate!==-1/0&&b<=this.o.startDate.getUTCFullYear()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&b>=this.o.endDate.getUTCFullYear()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"})}}},click:function(b){b.preventDefault();var d,e,f,g=a(b.target).closest("span, td, th");if(1===g.length)switch(g[0].nodeName.toLowerCase()){case"th":switch(g[0].className){case"cfdatepicker-switch":this.showMode(1);break;case"prev":case"next":var h=p.modes[this.viewMode].navStep*("prev"===g[0].className?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,h),this._trigger("changeMonth",this.viewDate);break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,h),1===this.viewMode&&this._trigger("changeYear",this.viewDate)}this.fill();break;case"today":var i=new Date;i=c(i.getFullYear(),i.getMonth(),i.getDate(),0,0,0),this.showMode(-2);var j="linked"===this.o.todayBtn?null:"view";this._setDate(i,j);break;case"clear":var k;this.isInput?k=this.element:this.component&&(k=this.element.find("input")),k&&k.val("").change(),this.update(),this._trigger("changeDate"),this.o.autoclose&&this.hide()}break;case"span":g.is(".disabled")||(this.viewDate.setUTCDate(1),g.is(".month")?(f=1,e=g.parent().find("span").index(g),d=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(e),this._trigger("changeMonth",this.viewDate),1===this.o.minViewMode&&this._setDate(c(d,e,f))):(f=1,e=0,d=parseInt(g.text(),10)||0,this.viewDate.setUTCFullYear(d),this._trigger("changeYear",this.viewDate),2===this.o.minViewMode&&this._setDate(c(d,e,f))),this.showMode(-1),this.fill());break;case"td":g.is(".day")&&!g.is(".disabled")&&(f=parseInt(g.text(),10)||1,d=this.viewDate.getUTCFullYear(),e=this.viewDate.getUTCMonth(),g.is(".old")?0===e?(e=11,d-=1):e-=1:g.is(".new")&&(11===e?(e=0,d+=1):e+=1),this._setDate(c(d,e,f)))}this.picker.is(":visible")&&this._focused_from&&a(this._focused_from).focus(),delete this._focused_from},_toggle_multidate:function(a){var b=this.dates.contains(a);if(a?-1!==b?this.dates.remove(b):this.dates.push(a):this.dates.clear(),"number"==typeof this.o.multidate)for(;this.dates.length>this.o.multidate;)this.dates.remove(0)},_setDate:function(a,b){b&&"date"!==b||this._toggle_multidate(a&&new Date(a)),b&&"view"!==b||(this.viewDate=a&&new Date(a)),this.fill(),this.setValue(),this._trigger("changeDate");var c;this.isInput?c=this.element:this.component&&(c=this.element.find("input")),c&&c.change(),!this.o.autoclose||b&&"date"!==b||this.hide()},moveMonth:function(a,b){if(a){if(!b)return a;var c,d,e=new Date(a.valueOf()),f=e.getUTCDate(),g=e.getUTCMonth(),h=Math.abs(b);if(b=b>0?1:-1,1===h)d=-1===b?function(){return e.getUTCMonth()===g}:function(){return e.getUTCMonth()!==c},c=g+b,e.setUTCMonth(c),(c<0||c>11)&&(c=(c+12)%12);else{for(var i=0;i<h;i++)e=this.moveMonth(e,b);c=e.getUTCMonth(),e.setUTCDate(f),d=function(){return c!==e.getUTCMonth()}}for(;d();)e.setUTCDate(--f),e.setUTCMonth(c);return e}},moveYear:function(a,b){return this.moveMonth(a,12*b)},dateWithinRange:function(a){return a>=this.o.startDate&&a<=this.o.endDate},keydown:function(a){if(this.picker.is(":not(:visible)"))return void(27===a.keyCode&&this.show());var b,c,e,f=!1,g=this.focusDate||this.viewDate;switch(a.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),a.preventDefault();break;case 37:case 39:if(!this.o.keyboardNavigation)break;b=37===a.keyCode?-1:1,a.ctrlKey?(c=this.moveYear(this.dates.get(-1)||d(),b),e=this.moveYear(g,b),this._trigger("changeYear",this.viewDate)):a.shiftKey?(c=this.moveMonth(this.dates.get(-1)||d(),b),e=this.moveMonth(g,b),this._trigger("changeMonth",this.viewDate)):(c=new Date(this.dates.get(-1)||d()),c.setUTCDate(c.getUTCDate()+b),e=new Date(g),e.setUTCDate(g.getUTCDate()+b)),this.dateWithinRange(c)&&(this.focusDate=this.viewDate=e,this.setValue(),this.fill(),a.preventDefault());break;case 38:case 40:if(!this.o.keyboardNavigation)break;b=38===a.keyCode?-1:1,a.ctrlKey?(c=this.moveYear(this.dates.get(-1)||d(),b),e=this.moveYear(g,b),this._trigger("changeYear",this.viewDate)):a.shiftKey?(c=this.moveMonth(this.dates.get(-1)||d(),b),e=this.moveMonth(g,b),this._trigger("changeMonth",this.viewDate)):(c=new Date(this.dates.get(-1)||d()),c.setUTCDate(c.getUTCDate()+7*b),e=new Date(g),e.setUTCDate(g.getUTCDate()+7*b)),this.dateWithinRange(c)&&(this.focusDate=this.viewDate=e,this.setValue(),this.fill(),a.preventDefault());break;case 32:break;case 13:g=this.focusDate||this.dates.get(-1)||this.viewDate,this._toggle_multidate(g),f=!0,this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(a.preventDefault(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}if(f){this.dates.length?this._trigger("changeDate"):this._trigger("clearDate");var h;this.isInput?h=this.element:this.component&&(h=this.element.find("input")),h&&h.change()}},showMode:function(a){a&&(this.viewMode=Math.max(this.o.minViewMode,Math.min(2,this.viewMode+a))),this.picker.find(">div").hide().filter(".cfdatepicker-"+p.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()}};var k=function(b,c){this.element=a(b),this.inputs=a.map(c.inputs,function(a){return a.jquery?a[0]:a}),delete c.inputs,a(this.inputs).cfdatepicker(c).bind("changeDate",a.proxy(this.dateUpdated,this)),this.pickers=a.map(this.inputs,function(b){return a(b).data("cfdatepicker")}),this.updateDates()};k.prototype={updateDates:function(){this.dates=a.map(this.pickers,function(a){return a.getUTCDate()}),this.updateRanges()},updateRanges:function(){var b=a.map(this.dates,function(a){return a.valueOf()});a.each(this.pickers,function(a,c){c.setRange(b)})},dateUpdated:function(b){if(!this.updating){this.updating=!0;var c=a(b.target).data("cfdatepicker"),d=c.getUTCDate(),e=a.inArray(b.target,this.inputs),f=this.inputs.length;if(-1!==e){if(a.each(this.pickers,function(a,b){b.getUTCDate()||b.setUTCDate(d)}),d<this.dates[e])for(;e>=0&&d<this.dates[e];)this.pickers[e--].setUTCDate(d);else if(d>this.dates[e])for(;e<f&&d>this.dates[e];)this.pickers[e++].setUTCDate(d);this.updateDates(),delete this.updating}}},remove:function(){a.map(this.pickers,function(a){a.remove()}),delete this.element.data().cfdatepicker}};var l=a.fn.cfdatepicker;a.fn.cfdatepicker=function(b){var c=Array.apply(null,arguments);c.shift();var d;return this.each(function(){var e=a(this),h=e.data("cfdatepicker"),i="object"==typeof b&&b;if(!h){var l=f(this,"date"),n=a.extend({},m,l,i),o=g(n.language),p=a.extend({},m,o,l,i);if(e.is(".input-daterange")||p.inputs){var q={inputs:p.inputs||e.find("input").toArray()};e.data("cfdatepicker",h=new k(this,a.extend(p,q)))}else e.data("cfdatepicker",h=new j(this,p))}if("string"==typeof b&&"function"==typeof h[b]&&void 0!==(d=h[b].apply(h,c)))return!1}),void 0!==d?d:this};var m=a.fn.cfdatepicker.defaults={autoclose:!1,beforeShowDay:a.noop,calendarWeeks:!1,clearBtn:!1,daysOfWeekDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",keyboardNavigation:!0,language:"en",minViewMode:0,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-1/0,startView:0,todayBtn:!1,todayHighlight:!1,weekStart:0},n=a.fn.cfdatepicker.locale_opts=["format","rtl","weekStart"];a.fn.cfdatepicker.Constructor=j;var o=a.fn.cfdatepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear"}},p={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(a){return a%4==0&&a%100!=0||a%400==0},getDaysInMonth:function(a,b){return[31,p.isLeapYear(a)?29:28,31,30,31,30,31,31,30,31,30,31][b]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,
2
- nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(a){var b=a.replace(this.validParts,"\0").split("\0"),c=a.match(this.validParts);if(!b||!b.length||!c||0===c.length)throw new Error("Invalid date format.");return{separators:b,parts:c}},parseDate:function(b,d,e){function f(){var a=this.slice(0,l[i].length);return a===l[i].slice(0,a.length)}if(b){if(b instanceof Date)return b;"string"==typeof d&&(d=p.parseFormat(d));var g,h,i,k=/([\-+]\d+)([dmwy])/,l=b.match(/([\-+]\d+)([dmwy])/g);if(/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(b)){for(b=new Date,i=0;i<l.length;i++)switch(g=k.exec(l[i]),h=parseInt(g[1]),g[2]){case"d":b.setUTCDate(b.getUTCDate()+h);break;case"m":b=j.prototype.moveMonth.call(j.prototype,b,h);break;case"w":b.setUTCDate(b.getUTCDate()+7*h);break;case"y":b=j.prototype.moveYear.call(j.prototype,b,h)}return c(b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate(),0,0,0)}l=b&&b.match(this.nonpunctuation)||[],b=new Date;var m,n,q={},r=["yyyy","yy","M","MM","m","mm","d","dd"],s={yyyy:function(a,b){return a.setUTCFullYear(b)},yy:function(a,b){return a.setUTCFullYear(2e3+b)},m:function(a,b){if(isNaN(a))return a;for(b-=1;b<0;)b+=12;for(b%=12,a.setUTCMonth(b);a.getUTCMonth()!==b;)a.setUTCDate(a.getUTCDate()-1);return a},d:function(a,b){return a.setUTCDate(b)}};s.M=s.MM=s.mm=s.m,s.dd=s.d,b=c(b.getFullYear(),b.getMonth(),b.getDate(),0,0,0);var t=d.parts.slice();if(l.length!==t.length&&(t=a(t).filter(function(b,c){return-1!==a.inArray(c,r)}).toArray()),l.length===t.length){var u;for(i=0,u=t.length;i<u;i++){if(m=parseInt(l[i],10),g=t[i],isNaN(m))switch(g){case"MM":n=a(o[e].months).filter(f),m=a.inArray(n[0],o[e].months)+1;break;case"M":n=a(o[e].monthsShort).filter(f),m=a.inArray(n[0],o[e].monthsShort)+1}q[g]=m}var v,w;for(i=0;i<r.length;i++)(w=r[i])in q&&!isNaN(q[w])&&(v=new Date(b),s[w](v,q[w]),isNaN(v)||(b=v))}return b}},formatDate:function(b,c,d){if(!b)return"";"string"==typeof c&&(c=p.parseFormat(c));var e={d:b.getUTCDate(),D:o[d].daysShort[b.getUTCDay()],DD:o[d].days[b.getUTCDay()],m:b.getUTCMonth()+1,M:o[d].monthsShort[b.getUTCMonth()],MM:o[d].months[b.getUTCMonth()],yy:b.getUTCFullYear().toString().substring(2),yyyy:b.getUTCFullYear()};e.dd=(e.d<10?"0":"")+e.d,e.mm=(e.m<10?"0":"")+e.m,b=[];for(var f=a.extend([],c.separators),g=0,h=c.parts.length;g<=h;g++)f.length&&b.push(f.shift()),b.push(e[c.parts[g]]);return b.join("")},headTemplate:'<thead><tr><th class="prev">&laquo;</th><th colspan="5" class="cfdatepicker-switch"></th><th class="next">&raquo;</th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>'};p.template='<div class="cfdatepicker"><div class="cfdatepicker-days"><table class=" table-condensed">'+p.headTemplate+"<tbody></tbody>"+p.footTemplate+'</table></div><div class="cfdatepicker-months"><table class="table-condensed">'+p.headTemplate+p.contTemplate+p.footTemplate+'</table></div><div class="cfdatepicker-years"><table class="table-condensed">'+p.headTemplate+p.contTemplate+p.footTemplate+"</table></div></div>",a.fn.cfdatepicker.DPGlobal=p,a.fn.cfdatepicker.noConflict=function(){return a.fn.cfdatepicker=l,this},a(document).on("focus.cfdatepicker.data-api click.cfdatepicker.data-api",'[data-provide="cfdatepicker"]',function(b){var c=a(this);c.data("cfdatepicker")||(b.preventDefault(),c.cfdatepicker("show").on("show",function(){a(this).trigger("blur")}).on("hide",function(){a(this).attr("disabled",!1)}))})}(window.jQuery),jQuery(document).ready(function(a){jQuery(document).on("cf.add",function(){a("[data-inputmask]").inputmask()}),jQuery(document).trigger("cf.add")}),function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){function b(a,b){var c=Array.prototype.slice.call(arguments,2);return setTimeout(function(){return a.apply(null,c)},b)}function c(a,b){return b=b||100,function(){if(!a.debouncing){var c=Array.prototype.slice.apply(arguments);a.lastReturnVal=a.apply(window,c),a.debouncing=!0}return clearTimeout(a.debounceTimeout),a.debounceTimeout=setTimeout(function(){a.debouncing=!1},b),a.lastReturnVal}}function d(d,f){if(this.$window=a(window),this.$document=a(document),this.$element=a(d),this.options=a.extend({},h,f),this._defaults=h,this._name=e,this.startEvent=this.options.startEvent.join("."+e+" ")+"."+e,this.moveEvent=this.options.moveEvent.join("."+e+" ")+"."+e,this.endEvent=this.options.endEvent.join("."+e+" ")+"."+e,this.polyfill=this.options.polyfill,this.onInit=this.options.onInit,this.onSlide=this.options.onSlide,this.onSlideEnd=this.options.onSlideEnd,this.polyfill&&g)return!1;this.identifier="js-"+e+"-"+ +new Date,this.min=parseFloat(this.$element[0].getAttribute("min")||0),this.max=parseFloat(this.$element[0].getAttribute("max")||100),this.value=parseFloat(this.$element[0].value||this.min+(this.max-this.min)/2),this.step=parseFloat(this.$element[0].getAttribute("step")||1),this.$fill=a('<div class="'+this.options.fillClass+'" />'),this.$handle=a('<div class="'+this.options.handleClass+'" />'),this.$range=a('<div class="'+this.options.rangeClass+'" id="'+this.identifier+'" />').insertAfter(this.$element).prepend(this.$fill,this.$handle),this.$element.css({position:"absolute",width:"1px",height:"1px",overflow:"hidden",opacity:"0"}),this.handleDown=a.proxy(this.handleDown,this),this.handleMove=a.proxy(this.handleMove,this),this.handleEnd=a.proxy(this.handleEnd,this),this.init();var i=this;this.$window.on("resize."+e,c(function(){b(function(){i.update()},300)},20)),this.$document.on(this.startEvent,"#"+this.identifier+":not(."+this.options.disabledClass+")",this.handleDown),this.$element.on("change."+e,function(a,b){if(!b||b.origin!==e){var c=a.target.value,d=i.getPositionFromValue(c);i.setPosition(d)}})}var e="rangeslider",f=[],g=function(){var a=document.createElement("input");return a.setAttribute("type","range"),"text"!==a.type}(),h={polyfill:!0,rangeClass:"rangeslider",disabledClass:"rangeslider--disabled",fillClass:"rangeslider__fill",handleClass:"rangeslider__handle",startEvent:["mousedown","touchstart","pointerdown"],moveEvent:["mousemove","touchmove","pointermove"],endEvent:["mouseup","touchend","pointerup"]};d.prototype.init=function(){this.onInit&&"function"==typeof this.onInit&&this.onInit(),this.update()},d.prototype.update=function(){this.handleWidth=this.$handle[0].offsetWidth,this.rangeWidth=this.$range[0].offsetWidth,this.maxHandleX=this.rangeWidth-this.handleWidth,this.grabX=this.handleWidth/2,this.position=this.getPositionFromValue(this.value),this.$element[0].disabled?this.$range.addClass(this.options.disabledClass):this.$range.removeClass(this.options.disabledClass),this.setPosition(this.position)},d.prototype.handleDown=function(a){if(a.preventDefault(),this.$document.on(this.moveEvent,this.handleMove),this.$document.on(this.endEvent,this.handleEnd),!((" "+a.target.className+" ").replace(/[\n\t]/g," ").indexOf(this.options.handleClass)>-1)){var b=this.getRelativePosition(this.$range[0],a),c=this.getPositionFromNode(this.$handle[0])-this.getPositionFromNode(this.$range[0]);this.setPosition(b-this.grabX),b>=c&&b<c+this.handleWidth&&(this.grabX=b-c)}},d.prototype.handleMove=function(a){a.preventDefault();var b=this.getRelativePosition(this.$range[0],a);this.setPosition(b-this.grabX)},d.prototype.handleEnd=function(a){a.preventDefault(),this.$document.off(this.moveEvent,this.handleMove),this.$document.off(this.endEvent,this.handleEnd);var b=this.getRelativePosition(this.$range[0],a);this.onSlideEnd&&"function"==typeof this.onSlideEnd&&this.onSlideEnd(b-this.grabX,this.value)},d.prototype.cap=function(a,b,c){return a<b?b:a>c?c:a},d.prototype.setPosition=function(a){var b,c;b=this.getValueFromPosition(this.cap(a,0,this.maxHandleX))/this.step*this.step,c=this.getPositionFromValue(b),this.$fill[0].style.width=c+this.grabX+"px",this.$handle[0].style.left=c+"px",this.setValue(b),this.position=c,this.value=b,this.onSlide&&"function"==typeof this.onSlide&&this.onSlide(c,b)},d.prototype.getPositionFromNode=function(a){for(var b=0;null!==a;)b+=a.offsetLeft,a=a.offsetParent;return b},d.prototype.getRelativePosition=function(a,b){return(b.pageX||b.originalEvent.clientX||b.originalEvent.touches[0].clientX||b.currentPoint.x)-this.getPositionFromNode(a)},d.prototype.getPositionFromValue=function(a){var b;return b=(a-this.min)/(this.max-this.min),b*this.maxHandleX},d.prototype.getValueFromPosition=function(a){var b,c;return b=a/(this.maxHandleX||1),c=this.step*Math.ceil((b*(this.max-this.min)+this.min)/this.step),Number(c.toFixed(2))},d.prototype.setValue=function(a){a!==this.value&&this.$element.val(a).trigger("change",{origin:e})},d.prototype.destroy=function(){this.$document.off(this.startEvent,"#"+this.identifier,this.handleDown),this.$element.off("."+e).removeAttr("style").removeData("plugin_"+e),this.$range&&this.$range.length&&this.$range[0].parentNode.removeChild(this.$range[0]),f.splice(f.indexOf(this.$element[0]),1),f.length||this.$window.off("."+e)},a.fn[e]=function(b){return this.each(function(){var c=a(this),g=c.data("plugin_"+e);g||(c.data("plugin_"+e,g=new d(this,b)),f.push(this)),"string"==typeof b&&g[b]()})}}),function(a){"use strict";var b={init:function(c){return this.each(function(){this.self=a(this),b.destroy.call(this.self),this.opt=a.extend(!0,{},a.fn.raty.defaults,c),b._adjustCallback.call(this),b._adjustNumber.call(this),"img"!==this.opt.starType&&b._adjustStarType.call(this),b._adjustPath.call(this),b._createStars.call(this),this.opt.cancel&&b._createCancel.call(this),this.opt.precision&&b._adjustPrecision.call(this),b._createScore.call(this),b._apply.call(this,this.opt.score),b._target.call(this,this.opt.score),this.opt.readOnly?b._lock.call(this):(this.style.cursor="pointer",b._binds.call(this)),this.self.data("options",this.opt)})},_adjustCallback:function(){for(var a=["number","readOnly","score","scoreName"],b=0;b<a.length;b++)"function"==typeof this.opt[a[b]]&&(this.opt[a[b]]=this.opt[a[b]].call(this))},_adjustNumber:function(){this.opt.number=b._between(this.opt.number,1,this.opt.numberMax)},_adjustPath:function(){this.opt.path=this.opt.path||"",this.opt.path&&"/"!==this.opt.path.charAt(this.opt.path.length-1)&&(this.opt.path+="/")},_adjustPrecision:function(){this.opt.half=!0,this.opt.targetType="score"},_adjustStarType:function(){this.opt.path="";for(var a=["cancelOff","cancelOn","starHalf","starOff","starOn"],b=0;b<a.length;b++)this.opt[a[b]]=this.opt[a[b]].replace(".","-")},_apply:function(a){b._fill.call(this,a),a&&(a>0&&this.score.val(b._between(a,0,this.opt.number)),b._roundStars.call(this,a))},_between:function(a,b,c){return Math.min(Math.max(parseFloat(a),b),c)},_binds:function(){this.cancel&&(b._bindOverCancel.call(this),b._bindClickCancel.call(this),b._bindOutCancel.call(this)),b._bindOver.call(this),b._bindClick.call(this),b._bindOut.call(this)},_bindClick:function(){var b=this;b.stars.on("click.raty",function(c){var d=a(this);b.score.val(b.opt.half||b.opt.precision?b.self.data("score"):this.alt||d.data("alt")),b.opt.click&&b.opt.click.call(b,+b.score.val(),c)})},_bindClickCancel:function(){var a=this;a.cancel.on("click.raty",function(b){a.score.removeAttr("value"),a.opt.click&&a.opt.click.call(a,null,b)})},_bindOut:function(){var a=this;a.self.on("mouseleave.raty",function(c){var d=+a.score.val()||void 0;b._apply.call(a,d),b._target.call(a,d,c),a.opt.mouseout&&a.opt.mouseout.call(a,d,c)})},_bindOutCancel:function(){var b=this;b.cancel.on("mouseleave.raty",function(c){var d=a(this),e=b.opt.path+b.opt.cancelOff;if("img"===b.opt.starType)d.attr("src",e);else{var f=b.opt.path+b.opt.cancelOn;d.removeClass(f).addClass(e)}if(b.opt.mouseout){var g=+b.score.val()||void 0;b.opt.mouseout.call(b,g,c)}})},_bindOver:function(){var a=this,c=a.opt.half?"mousemove.raty":"mouseover.raty";a.stars.on(c,function(c){var d=b._getScoreByPosition.call(a,c,this);b._fill.call(a,d),a.opt.half&&(b._roundStars.call(a,d),a.self.data("score",d)),b._target.call(a,d,c),a.opt.mouseover&&a.opt.mouseover.call(a,d,c)})},_bindOverCancel:function(){var c=this;c.cancel.on("mouseover.raty",function(d){var e=c.opt.path+c.opt.cancelOn,f=a(this),g=c.opt.path+c.opt.starOff;if("img"===c.opt.starType)f.attr("src",e),c.stars.attr("src",g);else{c.stars.attr("class",g);var h=c.opt.path+c.opt.cancelOff;f.removeClass(h).addClass(e).css("color",c.opt.starColor)}b._target.call(c,null,d),c.opt.mouseover&&c.opt.mouseover.call(c,null)})},_buildScoreField:function(){return a("<input />",{name:this.opt.scoreName,type:"hidden"}).appendTo(this)},_createCancel:function(){var b=this.opt.path+this.opt.cancelOff,c=a("<"+this.opt.starType+" />",{title:this.opt.cancelHint,class:"raty-cancel"}).css("marginRight",this.opt.space?this.opt.spaceWidth+"px":"0");"img"===this.opt.starType?c.attr({src:b,alt:"x"}):c.attr("data-alt","x").addClass(b),"left"===this.opt.cancelPlace?this.self.prepend("&#160;").prepend(c):this.self.append("&#160;").append(c),this.cancel=c},_createScore:function(){var c=a(this.opt.targetScore);this.score=c.length?c:b._buildScoreField.call(this)},_createStars:function(){for(var c=1;c<=this.opt.number;c++){var d,e=this.opt.score&&this.opt.score>=c?"starOn":"starOff",f=b._getHint.call(this,c);e=this.opt.path+this.opt[e],d="img"!==this.opt.starType?{"data-alt":c,class:e}:{src:e,alt:c},d.title=f,a("<"+this.opt.starType+" />",d).css("marginRight",c<this.opt.number&&this.opt.space?this.opt.spaceWidth+"px":"0").appendTo(this),this.opt.space}this.stars=this.self.children(this.opt.starType)},_error:function(b){a(this).text(b),a.error(b)},_fill:function(a){for(var c=0,d=1;d<=this.stars.length;d++){var e,f=this.stars.eq(d-1),g=b._turnOn.call(this,d,a);if(this.opt.iconRange&&this.opt.iconRange.length>c){var h=this.opt.iconRange[c];e=b._getIconRange.call(this,h,g),d<=h.range&&("img"===this.opt.starType?f.attr("src",e):f.attr("class",e)),d===h.range&&c++}else e=this.opt.path+this.opt[g?"starOn":"starOff"],"img"===this.opt.starType?f.attr("src",e):f.attr("class",e),g?f.css("color",this.opt.starColor):f.css("color","")}},_getIconRange:function(a,b){return this.opt.path+(b?a.on||this.opt.starOn:a.off||this.opt.starOff)},_getScoreByPosition:function(c,d){var e=a(d),f=parseInt(d.alt||e.data("alt"),10);if(this.opt.half){var g=b._getSize.call(this),h=parseFloat((c.pageX-e.offset().left)/g);f=this.opt.precision?f-1+h:f-1+(h>.5?1:.5)}return f},_getSize:function(){var a;return a="img"===this.opt.starType?this.stars[0].width:parseFloat(this.stars.eq(0).css("font-size")),a||b._error.call(this,"Could not be possible get the icon size!"),a},_turnOn:function(a,b){return this.opt.single?a===b:a<=b},_getHint:function(a){var b=this.opt.hints[a-1];return""===b?"":b||a},_lock:function(){var a=parseInt(this.score.val(),10),c=a?b._getHint.call(this,a):this.opt.noRatedMsg;this.style.cursor="",this.title=c,this.score.prop("readonly",!0),this.stars.prop("title",c),this.cancel&&this.cancel.hide(),this.self.data("readonly",!0)},_roundStars:function(a){var b=(a%1).toFixed(2);if(b>this.opt.round.down){var c="starOn";this.opt.halfShow&&b<this.opt.round.up?c="starHalf":b<this.opt.round.full&&(c="starOff");var d=this.stars[Math.ceil(a)-1];"img"===this.opt.starType?d.src=this.opt.path+this.opt[c]:d.style.className=this.opt[c]}},_target:function(c,d){if(this.opt.target){var e=a(this.opt.target);e.length||b._error.call(this,"Target selector invalid or missing!");var f=d&&"mouseover"===d.type;if(void 0===c)c=this.opt.targetText;else if(null===c)c=f?this.opt.cancelHint:this.opt.targetText;else{"hint"===this.opt.targetType?c=b._getHint.call(this,Math.ceil(c)):this.opt.precision&&(c=parseFloat(c).toFixed(1));var g=d&&"mousemove"===d.type;f||g||this.opt.targetKeep||(c=this.opt.targetText)}c&&(c=this.opt.targetFormat.toString().replace("{score}",c)),e.is(":input")?e.val(c):e.html(c)}},_unlock:function(){this.style.cursor="pointer",this.removeAttribute("title"),this.score.removeAttr("readonly"),this.self.data("readonly",!1);for(var a=0;a<this.opt.number;a++)this.stars[a].title=b._getHint.call(this,a+1);this.cancel&&this.cancel.css("display","")},cancel:function(c){return this.each(function(){var d=a(this);!0!==d.data("readonly")&&(b[c?"click":"score"].call(d,null),this.score.removeAttr("value"))})},click:function(c){return this.each(function(){!0!==a(this).data("readonly")&&(b._apply.call(this,c),this.opt.click&&this.opt.click.call(this,c,a.Event("click")),b._target.call(this,c))})},destroy:function(){return this.each(function(){var b=a(this),c=b.data("raw");c?b.off(".raty").empty().css({cursor:c.style.cursor}).removeData("readonly"):b.data("raw",b.clone()[0])})},getScore:function(){var a,b=[];return this.each(function(){a=this.score.val(),b.push(a?+a:void 0)}),b.length>1?b:b[0]},move:function(c){return this.each(function(){var d=parseInt(c,10),e=a(this).data("options"),f=(+c).toFixed(1).split(".")[1];d>=e.number&&(d=e.number-1,f=10);var g=b._getSize.call(this),h=g/10,i=a(this.stars[d]),j=i.offset().left+h*parseInt(f,10),k=a.Event("mousemove",{pageX:j});i.trigger(k)})},readOnly:function(c){return this.each(function(){var d=a(this);d.data("readonly")!==c&&(c?(d.off(".raty").children("img").off(".raty"),b._lock.call(this)):(b._binds.call(this),b._unlock.call(this)),d.data("readonly",c))})},reload:function(){return b.set.call(this,{})},score:function(){var c=a(this);return arguments.length?b.setScore.apply(c,arguments):b.getScore.call(c)},set:function(b){return this.each(function(){var c=a(this),d=c.data("options"),e=a.extend({},d,b);c.raty(e)})},setScore:function(c){return this.each(function(){!0!==a(this).data("readonly")&&(b._apply.call(this,c),b._target.call(this,c))})}};a.fn.raty=function(c){return b[c]?b[c].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof c&&c?void a.error("Method "+c+" does not exist!"):b.init.apply(this,arguments)},a.fn.raty.defaults={cancel:!1,cancelHint:"Cancel this rating!",cancelOff:"raty-cancel-off",cancelOn:"raty-cancel-on",cancelPlace:"left",click:void 0,half:!1,halfShow:!0,hints:["1"],iconRange:void 0,mouseout:void 0,mouseover:void 0,noRatedMsg:"Not rated yet!",number:5,numberMax:20,path:void 0,precision:!1,readOnly:!1,round:{down:.25,full:.6,up:.76},score:void 0,scoreName:"score",single:!1,space:!0,spaceWidth:3,starColor:"#ff00aa",starHalf:"star-half.png",starOff:"raty-dot-off",starOn:"raty-dot-on",starType:"img",target:void 0,targetFormat:"{score}",targetKeep:!1,targetScore:void 0,targetText:"",targetType:"hint"}}(jQuery),jQuery(function(a){a("body").on("click",".cf-toggle-group-buttons a",function(){var b=a(this),c=b.closest(".caldera-config-field"),d=c.find('[data-ref="'+b.attr("id")+'"]');c.find(".btn").removeClass(b.data("active")).addClass(b.data("default")),b.addClass(b.data("active")).removeClass(b.data("default")),d.prop("checked",!0).trigger("change")})});
 
 
 
1
+ function color_picker_init(){jQuery(".minicolor-picker").miniColors()}function toggle_button_init(a,b){var c=jQuery(b),d=c.find(".cf-toggle-group-radio:checked");d.length&&jQuery("#"+d.data("ref")).trigger("click")}function color_picker_init(){jQuery(".minicolor-picker").miniColors()}function toggle_button_init(a,b){var c=jQuery(b),d=c.find(".cf-toggle-group-radio:checked");d.length&&jQuery("#"+d.data("ref")).trigger("click")}jQuery&&function(a){a.extend(a.fn,{miniColors:function(b,c){var d=function(b,c,d){var e=s(b.val());e||(e="ffffff");var f=x(e),h=a('<span class="input-group-addon" style="background-color: #'+e+'" href="#"></span>');h.insertAfter(b),b.addClass("miniColors").data("original-maxlength",b.attr("maxlength")||null).data("original-autocomplete",b.attr("autocomplete")||null).data("letterCase",c.letterCase?c.letterCase:"uppercase").data("trigger",h).data("hsb",f).data("change",c.change?c.change:null).data("close",c.close?c.close:null).data("open",c.open?c.open:null).attr("maxlength",7).attr("autocomplete","off").val("#"+o(e,c.letterCase)).trigger("change"),c.readonly&&b.prop("readonly",!0),c.disabled&&g(b),h.on("click.miniColors",function(a){a.preventDefault(),""===b.val()&&b.val("#").trigger("change"),i(b)}),b.on("focus.miniColors",function(a){""===b.val()&&b.val("#").trigger("change"),i(b)}),b.on("blur.miniColors",function(a){var c=s(y(b.data("hsb")));b.val(c?"#"+o(c,b.data("letterCase")):"").trigger("change")}),b.on("keydown.miniColors",function(a){9===a.keyCode&&j(b)}),b.on("keyup.miniColors",function(a){n(b)}),b.on("paste.miniColors",function(a){setTimeout(function(){n(b)},5)})},e=function(b){j(),b=a(b),b.data("trigger").remove(),b.attr("autocomplete",b.data("original-autocomplete")).attr("maxlength",b.data("original-maxlength")).removeData().removeClass("miniColors").off(".miniColors"),a(document).off(".miniColors")},f=function(a){a.prop("disabled",!1).data("trigger").css("opacity",1)},g=function(a){j(a),a.prop("disabled",!0).data("trigger").css("opacity",.5)},i=function(b){if(b.prop("disabled"))return!1;j();var c=a('<div class="miniColors-selector"></div>');c.append('<div class="miniColors-colors" style="background-color: #FFF;"><div class="miniColors-colorPicker"><div class="miniColors-colorPicker-inner"></div></div>').append('<div class="miniColors-hues"><div class="miniColors-huePicker"></div></div>').css("display","none").addClass(b.attr("class")).removeClass("form-control");var d=b.data("hsb");c.find(".miniColors-colors").css("backgroundColor","#"+y({h:d.h,s:100,b:100}));var e=b.data("colorPosition");e||(e=p(d)),c.find(".miniColors-colorPicker").css("top",e.y+"px").css("left",e.x+"px");var f=b.data("huePosition");f||(f=q(d)),c.find(".miniColors-huePicker").css("top",f.y+"px"),b.data("selector",c).data("huePicker",c.find(".miniColors-huePicker")).data("colorPicker",c.find(".miniColors-colorPicker")).data("mousebutton",0),a("BODY").append(c);var g=b.data("trigger"),h=!b.is(":visible"),i=h?g.offset().top+g.outerHeight():b.offset().top+b.outerHeight(),m=h?g.offset().left:b.offset().left,n=c.outerWidth(),o=c.outerHeight(),r=g.outerWidth(),s=g.outerHeight(),u=a(window).height(),v=a(window).width(),w=a(window).scrollTop(),x=a(window).scrollLeft();i+o>u+w&&(i=i-o-s),m+n>v+x&&(m=m-n+r),c.css({top:i,left:m}).fadeIn(100),c.on("selectstart",function(){return!1}),(!a.browser.msie||a.browser.msie&&a.browser.version>=9)&&a(window).on("resize.miniColors",function(a){j(b)}),a(document).on("mousedown.miniColors touchstart.miniColors",function(c){b.data("mousebutton",1);var d=a(c.target).parents().andSelf();if(d.hasClass("miniColors-colors")&&(c.preventDefault(),b.data("moving","colors"),k(b,c)),d.hasClass("miniColors-hues")&&(c.preventDefault(),b.data("moving","hues"),l(b,c)),d.hasClass("miniColors-selector"))return void c.preventDefault();d.hasClass("miniColors")||j(b)}),a(document).on("mouseup.miniColors touchend.miniColors",function(a){a.preventDefault(),b.data("mousebutton",0).removeData("moving")}).on("mousemove.miniColors touchmove.miniColors",function(a){a.preventDefault(),1===b.data("mousebutton")&&("colors"===b.data("moving")&&k(b,a),"hues"===b.data("moving")&&l(b,a))}),b.data("open")&&b.data("open").call(b.get(0),"#"+y(d),t(d))},j=function(b){b||(b=a(".miniColors")),b.each(function(){var c=a(this).data("selector");a(this).removeData("selector"),a(c).fadeOut(100,function(){if(b.data("close")){var c=b.data("hsb"),d=y(c);b.data("close").call(b.get(0),"#"+d,t(c))}a(this).remove()})}),a(document).off(".miniColors")},k=function(a,b){var c=a.data("colorPicker");c.hide();var d={x:b.pageX,y:b.pageY};b.originalEvent.changedTouches&&(d.x=b.originalEvent.changedTouches[0].pageX,d.y=b.originalEvent.changedTouches[0].pageY),d.x=d.x-a.data("selector").find(".miniColors-colors").offset().left-5,d.y=d.y-a.data("selector").find(".miniColors-colors").offset().top-5,d.x<=-5&&(d.x=-5),d.x>=144&&(d.x=144),d.y<=-5&&(d.y=-5),d.y>=144&&(d.y=144),a.data("colorPosition",d),c.css("left",d.x).css("top",d.y).show();var e=Math.round(.67*(d.x+5));e<0&&(e=0),e>100&&(e=100);var f=100-Math.round(.67*(d.y+5));f<0&&(f=0),f>100&&(f=100);var g=a.data("hsb");g.s=e,g.b=f,m(a,g,!0)},l=function(a,b){var c=a.data("huePicker");c.hide();var d={y:b.pageY};b.originalEvent.changedTouches&&(d.y=b.originalEvent.changedTouches[0].pageY),d.y=d.y-a.data("selector").find(".miniColors-colors").offset().top-1,d.y<=-1&&(d.y=-1),d.y>=149&&(d.y=149),a.data("huePosition",d),c.css("top",d.y).show();var e=Math.round(2.4*(150-d.y-1));e<0&&(e=0),e>360&&(e=360);var f=a.data("hsb");f.h=e,m(a,f,!0)},m=function(a,b,c){a.data("hsb",b);var d=y(b);if(c&&a.val("#"+o(d,a.data("letterCase"))).trigger("change"),a.data("trigger").css("backgroundColor","#"+d),a.data("selector")&&a.data("selector").find(".miniColors-colors").css("backgroundColor","#"+y({h:b.h,s:100,b:100})),a.data("change")){if(d===a.data("lastChange"))return;a.data("change").call(a.get(0),"#"+d,t(b)),a.data("lastChange",d)}},n=function(b){b.val("#"+r(b.val())).trigger("change");var c=s(b.val());if(!c)return!1;var d=x(c),e=b.data("hsb");if(d.h===e.h&&d.s===e.s&&d.b===e.b)return!0;var f=p(d);a(b.data("colorPicker")).css("top",f.y+"px").css("left",f.x+"px"),b.data("colorPosition",f);var g=q(d);return a(b.data("huePicker")).css("top",g.y+"px"),b.data("huePosition",g),m(b,d),!0},o=function(a,b){return"lowercase"===b?a.toLowerCase():"uppercase"===b?a.toUpperCase():a},p=function(a){var b=Math.ceil(a.s/.67);b<0&&(b=0),b>150&&(b=150);var c=150-Math.ceil(a.b/.67);return c<0&&(c=0),c>150&&(c=150),{x:b-5,y:c-5}},q=function(a){var b=150-a.h/2.4;return b<0&&(h=0),b>150&&(h=150),{y:b-1}},r=function(a){return a.replace(/[^A-F0-9]/gi,"")},s=function(a){return(a=r(a))?(3===a.length&&(a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]),6===a.length?a:null):null},t=function(a){var b={},c=Math.round(a.h),d=Math.round(255*a.s/100),e=Math.round(255*a.b/100);if(0===d)b.r=b.g=b.b=e;else{var f=e,g=(255-d)*e/255,h=c%60*(f-g)/60;360===c&&(c=0),c<60?(b.r=f,b.b=g,b.g=g+h):c<120?(b.g=f,b.b=g,b.r=f-h):c<180?(b.g=f,b.r=g,b.b=g+h):c<240?(b.b=f,b.r=g,b.g=f-h):c<300?(b.b=f,b.g=g,b.r=g+h):c<360?(b.r=f,b.g=g,b.b=f-h):(b.r=0,b.g=0,b.b=0)}return{r:Math.round(b.r),g:Math.round(b.g),b:Math.round(b.b)}},u=function(b){var c=[b.r.toString(16),b.g.toString(16),b.b.toString(16)];return a.each(c,function(a,b){1===b.length&&(c[a]="0"+b)}),c.join("")},v=function(a){return a=parseInt(a.indexOf("#")>-1?a.substring(1):a,16),{r:a>>16,g:(65280&a)>>8,b:255&a}},w=function(a){var b={h:0,s:0,b:0},c=Math.min(a.r,a.g,a.b),d=Math.max(a.r,a.g,a.b),e=d-c;return b.b=d,b.s=0!==d?255*e/d:0,0!==b.s?a.r===d?b.h=(a.g-a.b)/e:a.g===d?b.h=2+(a.b-a.r)/e:b.h=4+(a.r-a.g)/e:b.h=-1,b.h*=60,b.h<0&&(b.h+=360),b.s*=100/255,b.b*=100/255,b},x=function(a){var b=w(v(a));return 0===b.s&&(b.h=360),b},y=function(a){return u(t(a))};switch(b){case"readonly":return a(this).each(function(){a(this).hasClass("miniColors")&&a(this).prop("readonly",c)}),a(this);case"disabled":return a(this).each(function(){a(this).hasClass("miniColors")&&(c?g(a(this)):f(a(this)))}),a(this);case"value":if(void 0===c){if(!a(this).hasClass("miniColors"))return;var z=a(this),A=s(z.val());return A?"#"+o(A,z.data("letterCase")):null}return a(this).each(function(){a(this).hasClass("miniColors")&&(a(this).val(c).trigger("change"),n(a(this)))}),a(this);case"destroy":return a(this).each(function(){a(this).hasClass("miniColors")&&e(a(this))}),a(this);default:return b||(b={}),a(this).each(function(){"input"===a(this)[0].tagName.toLowerCase()&&(a(this).data("trigger")||d(a(this),b))}),a(this)}}})}(jQuery),document.addEventListener("load",color_picker_init,!1),jQuery(document).ajaxComplete(function(){color_picker_init()}),function(a,b){function c(){return new Date(Date.UTC.apply(Date,arguments))}function d(){var a=new Date;return c(a.getFullYear(),a.getMonth(),a.getDate())}function e(a){return function(){return this[a].apply(this,arguments)}}function f(b,c){function d(a,b){return b.toLowerCase()}var e,f=a(b).data(),g={},h=new RegExp("^"+c.toLowerCase()+"([A-Z])");c=new RegExp("^"+c.toLowerCase());for(var i in f)c.test(i)&&(e=i.replace(h,d),g[e]=f[i]);return g}function g(b){var c={};if(o[b]||(b=b.split("-")[0],o[b])){var d=o[b];return a.each(n,function(a,b){b in d&&(c[b]=d[b])}),c}}var h=a(window),i=function(){var b={get:function(a){return this.slice(a)[0]},contains:function(a){for(var b=a&&a.valueOf(),c=0,d=this.length;c<d;c++)if(this[c].valueOf()===b)return c;return-1},remove:function(a){this.splice(a,1)},replace:function(b){b&&(a.isArray(b)||(b=[b]),this.clear(),this.push.apply(this,b))},clear:function(){this.splice(0)},copy:function(){var a=new i;return a.replace(this),a}};return function(){var c=[];return c.push.apply(c,arguments),a.extend(c,b),c}}(),j=function(b,c){this.dates=new i,this.viewDate=d(),this.focusDate=null,this._process_options(c),this.element=a(b),this.isInline=!1,this.isInput=this.element.is("input"),this.component=!!this.element.is(".date")&&this.element.find(".add-on, .input-group-addon, .btn"),this.hasInput=this.component&&this.element.find("input").length,this.component&&0===this.component.length&&(this.component=!1),this.picker=a(p.template),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("cfdatepicker-inline").appendTo(this.element):this.picker.addClass("cfdatepicker-dropdown dropdown-menu"),this.o.rtl&&this.picker.addClass("cfdatepicker-rtl"),this.viewMode=this.o.startView,this.o.calendarWeeks&&this.picker.find("tfoot th.today").attr("colspan",function(a,b){return parseInt(b)+1}),this._allow_update=!1,this.setStartDate(this._o.startDate),this.setEndDate(this._o.endDate),this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled),this.fillDow(),this.fillMonths(),this._allow_update=!0,this.update(),this.showMode(),this.isInline&&this.show()};j.prototype={constructor:j,_process_options:function(b){this._o=a.extend({},this._o,b);var c=this.o=a.extend({},this._o),d=c.language;switch(o[d]||(d=d.split("-")[0],o[d]||(d=m.language)),c.language=d,c.startView){case 2:case"decade":c.startView=2;break;case 1:case"year":c.startView=1;break;default:c.startView=0}switch(c.minViewMode){case 1:case"months":c.minViewMode=1;break;case 2:case"years":c.minViewMode=2;break;default:c.minViewMode=0}c.startView=Math.max(c.startView,c.minViewMode),!0!==c.multidate&&(c.multidate=Number(c.multidate)||!1,!1!==c.multidate?c.multidate=Math.max(0,c.multidate):c.multidate=1),c.multidateSeparator=String(c.multidateSeparator),c.weekStart%=7,c.weekEnd=(c.weekStart+6)%7;var e=p.parseFormat(c.format);c.startDate!==-1/0&&(c.startDate?c.startDate instanceof Date?c.startDate=this._local_to_utc(this._zero_time(c.startDate)):c.startDate=p.parseDate(c.startDate,e,c.language):c.startDate=-1/0),c.endDate!==1/0&&(c.endDate?c.endDate instanceof Date?c.endDate=this._local_to_utc(this._zero_time(c.endDate)):c.endDate=p.parseDate(c.endDate,e,c.language):c.endDate=1/0),c.daysOfWeekDisabled=c.daysOfWeekDisabled||[],a.isArray(c.daysOfWeekDisabled)||(c.daysOfWeekDisabled=c.daysOfWeekDisabled.split(/[,\s]*/)),c.daysOfWeekDisabled=a.map(c.daysOfWeekDisabled,function(a){return parseInt(a,10)});var f=String(c.orientation).toLowerCase().split(/\s+/g),g=c.orientation.toLowerCase();if(f=a.grep(f,function(a){return/^auto|left|right|top|bottom$/.test(a)}),c.orientation={x:"auto",y:"auto"},g&&"auto"!==g)if(1===f.length)switch(f[0]){case"top":case"bottom":c.orientation.y=f[0];break;case"left":case"right":c.orientation.x=f[0]}else g=a.grep(f,function(a){return/^left|right$/.test(a)}),c.orientation.x=g[0]||"auto",g=a.grep(f,function(a){return/^top|bottom$/.test(a)}),c.orientation.y=g[0]||"auto";else;},_events:[],_secondaryEvents:[],_applyEvents:function(a){for(var b,c,d,e=0;e<a.length;e++)b=a[e][0],2===a[e].length?(c=void 0,d=a[e][1]):3===a[e].length&&(c=a[e][1],d=a[e][2]),b.on(d,c)},_unapplyEvents:function(a){for(var b,c,d,e=0;e<a.length;e++)b=a[e][0],2===a[e].length?(d=void 0,c=a[e][1]):3===a[e].length&&(d=a[e][1],c=a[e][2]),b.off(c,d)},_buildEvents:function(){this.isInput?this._events=[[this.element,{focus:a.proxy(this.show,this),keyup:a.proxy(function(b){-1===a.inArray(b.keyCode,[27,37,39,38,40,32,13,9])&&this.update()},this),keydown:a.proxy(this.keydown,this)}]]:this.component&&this.hasInput?this._events=[[this.element.find("input"),{focus:a.proxy(this.show,this),keyup:a.proxy(function(b){-1===a.inArray(b.keyCode,[27,37,39,38,40,32,13,9])&&this.update()},this),keydown:a.proxy(this.keydown,this)}],[this.component,{click:a.proxy(this.show,this)}]]:this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:a.proxy(this.show,this)}]],this._events.push([this.element,"*",{blur:a.proxy(function(a){this._focused_from=a.target},this)}],[this.element,{blur:a.proxy(function(a){this._focused_from=a.target},this)}]),this._secondaryEvents=[[this.picker,{click:a.proxy(this.click,this)}],[a(window),{resize:a.proxy(this.place,this)}],[a(document),{"mousedown touchstart":a.proxy(function(a){this.element.is(a.target)||this.element.find(a.target).length||this.picker.is(a.target)||this.picker.find(a.target).length||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(b,c){var d=c||this.dates.get(-1),e=this._utc_to_local(d);this.element.trigger({type:b,date:e,dates:a.map(this.dates,this._utc_to_local),format:a.proxy(function(a,b){0===arguments.length?(a=this.dates.length-1,b=this.o.format):"string"==typeof a&&(b=a,a=this.dates.length-1),b=b||this.o.format;var c=this.dates.get(a);return p.formatDate(c,b,this.o.language)},this)})},show:function(){this.isInline||this.picker.appendTo("body"),this.picker.show(),this.place(),this._attachSecondaryEvents(),this._trigger("show")},hide:function(){this.isInline||this.picker.is(":visible")&&(this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.viewMode=this.o.startView,this.showMode(),this.o.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())&&this.setValue(),this._trigger("hide"))},remove:function(){this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().cfdatepicker,this.isInput||delete this.element.data().date},_utc_to_local:function(a){return a&&new Date(a.getTime()+6e4*a.getTimezoneOffset())},_local_to_utc:function(a){return a&&new Date(a.getTime()-6e4*a.getTimezoneOffset())},_zero_time:function(a){return a&&new Date(a.getFullYear(),a.getMonth(),a.getDate())},_zero_utc_time:function(a){return a&&new Date(Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()))},getDates:function(){return a.map(this.dates,this._utc_to_local)},getUTCDates:function(){return a.map(this.dates,function(a){return new Date(a)})},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){return new Date(this.dates.get(-1))},setDates:function(){var b=a.isArray(arguments[0])?arguments[0]:arguments;this.update.apply(this,b),this._trigger("changeDate"),this.setValue()},setUTCDates:function(){var b=a.isArray(arguments[0])?arguments[0]:arguments;this.update.apply(this,a.map(b,this._utc_to_local)),this._trigger("changeDate"),this.setValue()},setDate:e("setDates"),setUTCDate:e("setUTCDates"),setValue:function(){var a=this.getFormattedDate();this.isInput?this.element.val(a).change():this.component&&this.element.find("input").val(a).change()},getFormattedDate:function(b){void 0===b&&(b=this.o.format);var c=this.o.language;return a.map(this.dates,function(a){return p.formatDate(a,b,c)}).join(this.o.multidateSeparator)},setStartDate:function(a){this._process_options({startDate:a}),this.update(),this.updateNavArrows()},setEndDate:function(a){this._process_options({endDate:a}),this.update(),this.updateNavArrows()},setDaysOfWeekDisabled:function(a){this._process_options({daysOfWeekDisabled:a}),this.update(),this.updateNavArrows()},place:function(){if(!this.isInline){var b,c=this.picker.outerWidth(),d=this.picker.outerHeight(),e=h.width(),f=h.height(),g=h.scrollTop(),i=jQuery(this.element).data("form-id"),j=document.getElementById("modal-"+i+"-content");b=null!==j?1e4:parseInt(this.element.parents().filter(function(){return"auto"!==a(this).css("z-index")}).first().css("z-index"))+10;var k=this.component?this.component.parent().offset():this.element.offset(),l=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),m=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),n=k.left,o=k.top;this.picker.removeClass("cfdatepicker-orient-top cfdatepicker-orient-bottom cfdatepicker-orient-right cfdatepicker-orient-left"),"auto"!==this.o.orientation.x?(this.picker.addClass("cfdatepicker-orient-"+this.o.orientation.x),"right"===this.o.orientation.x&&(n-=c-m)):(this.picker.addClass("cfdatepicker-orient-left"),k.left<0?n-=k.left-10:k.left+c>e&&(n=e-c-10));var p,q,r=this.o.orientation.y;"auto"===r&&(p=-g+k.top-d,q=g+f-(k.top+l+d),r=Math.max(p,q)===q?"top":"bottom"),this.picker.addClass("cfdatepicker-orient-"+r),"top"===r?o+=l:o-=d+parseInt(this.picker.css("padding-top")),this.picker.css({top:o,left:n,zIndex:b})}},_allow_update:!0,update:function(){if(this._allow_update){var b=this.dates.copy(),c=[],d=!1;arguments.length?(a.each(arguments,a.proxy(function(a,b){b instanceof Date&&(b=this._local_to_utc(b)),c.push(b)},this)),d=!0):(c=this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val(),c=c&&this.o.multidate?c.split(this.o.multidateSeparator):[c],delete this.element.data().date),c=a.map(c,a.proxy(function(a){return p.parseDate(a,this.o.format,this.o.language)},this)),c=a.grep(c,a.proxy(function(a){return a<this.o.startDate||a>this.o.endDate||!a},this),!0),this.dates.replace(c),this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.viewDate>this.o.endDate&&(this.viewDate=new Date(this.o.endDate)),d?this.setValue():c.length&&String(b)!==String(this.dates)&&this._trigger("changeDate"),!this.dates.length&&b.length&&this._trigger("clearDate"),this.fill()}},fillDow:function(){var a=this.o.weekStart,b="<tr>";if(this.o.calendarWeeks){var c='<th class="cw">&nbsp;</th>';b+=c,this.picker.find(".cfdatepicker-days thead tr:first-child").prepend(c)}for(;a<this.o.weekStart+7;)b+='<th class="dow">'+o[this.o.language].daysMin[a++%7]+"</th>";b+="</tr>",this.picker.find(".cfdatepicker-days thead").append(b)},fillMonths:function(){for(var a="",b=0;b<12;)a+='<span class="month">'+o[this.o.language].monthsShort[b++]+"</span>";this.picker.find(".cfdatepicker-months td").html(a)},setRange:function(b){b&&b.length?this.range=a.map(b,function(a){return a.valueOf()}):delete this.range,this.fill()},getClassNames:function(b){var c=[],d=this.viewDate.getUTCFullYear(),e=this.viewDate.getUTCMonth(),f=new Date;return b.getUTCFullYear()<d||b.getUTCFullYear()===d&&b.getUTCMonth()<e?c.push("old"):(b.getUTCFullYear()>d||b.getUTCFullYear()===d&&b.getUTCMonth()>e)&&c.push("new"),this.focusDate&&b.valueOf()===this.focusDate.valueOf()&&c.push("focused"),this.o.todayHighlight&&b.getUTCFullYear()===f.getFullYear()&&b.getUTCMonth()===f.getMonth()&&b.getUTCDate()===f.getDate()&&c.push("today"),-1!==this.dates.contains(b)&&c.push("active"),(b.valueOf()<this.o.startDate||b.valueOf()>this.o.endDate||-1!==a.inArray(b.getUTCDay(),this.o.daysOfWeekDisabled))&&c.push("disabled"),this.range&&(b>this.range[0]&&b<this.range[this.range.length-1]&&c.push("range"),-1!==a.inArray(b.valueOf(),this.range)&&c.push("selected")),c},fill:function(){var b,d=new Date(this.viewDate),e=d.getUTCFullYear(),f=d.getUTCMonth(),g=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,h=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,i=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,j=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,k=o[this.o.language].today||o.en.today||"",l=o[this.o.language].clear||o.en.clear||"";this.picker.find(".cfdatepicker-days thead th.cfdatepicker-switch").text(o[this.o.language].months[f]+" "+e),this.picker.find("tfoot th.today").text(k).toggle(!1!==this.o.todayBtn),this.picker.find("tfoot th.clear").text(l).toggle(!1!==this.o.clearBtn),this.updateNavArrows(),this.fillMonths();var m=c(e,f-1,28),n=p.getDaysInMonth(m.getUTCFullYear(),m.getUTCMonth());m.setUTCDate(n),m.setUTCDate(n-(m.getUTCDay()-this.o.weekStart+7)%7);var q=new Date(m);q.setUTCDate(q.getUTCDate()+42),q=q.valueOf();for(var r,s=[];m.valueOf()<q;){if(m.getUTCDay()===this.o.weekStart&&(s.push("<tr>"),this.o.calendarWeeks)){var t=new Date(+m+(this.o.weekStart-m.getUTCDay()-7)%7*864e5),u=new Date(Number(t)+(11-t.getUTCDay())%7*864e5),v=new Date(Number(v=c(u.getUTCFullYear(),0,1))+(11-v.getUTCDay())%7*864e5),w=(u-v)/864e5/7+1;s.push('<td class="cw">'+w+"</td>")}if(r=this.getClassNames(m),r.push("day"),this.o.beforeShowDay!==a.noop){var x=this.o.beforeShowDay(this._utc_to_local(m));void 0===x?x={}:"boolean"==typeof x?x={enabled:x}:"string"==typeof x&&(x={classes:x}),!1===x.enabled&&r.push("disabled"),x.classes&&(r=r.concat(x.classes.split(/\s+/))),x.tooltip&&(b=x.tooltip)}r=a.unique(r),s.push('<td class="'+r.join(" ")+'"'+(b?' title="'+b+'"':"")+">"+m.getUTCDate()+"</td>"),m.getUTCDay()===this.o.weekEnd&&s.push("</tr>"),m.setUTCDate(m.getUTCDate()+1)}this.picker.find(".cfdatepicker-days tbody").empty().append(s.join(""));var y=this.picker.find(".cfdatepicker-months").find("th:eq(1)").text(e).end().find("span").removeClass("active");a.each(this.dates,function(a,b){b.getUTCFullYear()===e&&y.eq(b.getUTCMonth()).addClass("active")}),(e<g||e>i)&&y.addClass("disabled"),e===g&&y.slice(0,h).addClass("disabled"),e===i&&y.slice(j+1).addClass("disabled"),s="",e=10*parseInt(e/10,10);var z=this.picker.find(".cfdatepicker-years").find("th:eq(1)").text(e+"-"+(e+9)).end().find("td");e-=1;for(var A,B=a.map(this.dates,function(a){return a.getUTCFullYear()}),C=-1;C<11;C++)A=["year"],-1===C?A.push("old"):10===C&&A.push("new"),-1!==a.inArray(e,B)&&A.push("active"),(e<g||e>i)&&A.push("disabled"),s+='<span class="'+A.join(" ")+'">'+e+"</span>",e+=1;z.html(s)},updateNavArrows:function(){if(this._allow_update){var a=new Date(this.viewDate),b=a.getUTCFullYear(),c=a.getUTCMonth();switch(this.viewMode){case 0:this.o.startDate!==-1/0&&b<=this.o.startDate.getUTCFullYear()&&c<=this.o.startDate.getUTCMonth()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&b>=this.o.endDate.getUTCFullYear()&&c>=this.o.endDate.getUTCMonth()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 1:case 2:this.o.startDate!==-1/0&&b<=this.o.startDate.getUTCFullYear()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&b>=this.o.endDate.getUTCFullYear()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"})}}},click:function(b){b.preventDefault();var d,e,f,g=a(b.target).closest("span, td, th");if(1===g.length)switch(g[0].nodeName.toLowerCase()){case"th":switch(g[0].className){case"cfdatepicker-switch":this.showMode(1);break;case"prev":case"next":var h=p.modes[this.viewMode].navStep*("prev"===g[0].className?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,h),this._trigger("changeMonth",this.viewDate);break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,h),1===this.viewMode&&this._trigger("changeYear",this.viewDate)}this.fill();break;case"today":var i=new Date;i=c(i.getFullYear(),i.getMonth(),i.getDate(),0,0,0),this.showMode(-2);var j="linked"===this.o.todayBtn?null:"view";this._setDate(i,j);break;case"clear":var k;this.isInput?k=this.element:this.component&&(k=this.element.find("input")),k&&k.val("").change(),this.update(),this._trigger("changeDate"),this.o.autoclose&&this.hide()}break;case"span":g.is(".disabled")||(this.viewDate.setUTCDate(1),g.is(".month")?(f=1,e=g.parent().find("span").index(g),d=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(e),this._trigger("changeMonth",this.viewDate),1===this.o.minViewMode&&this._setDate(c(d,e,f))):(f=1,e=0,d=parseInt(g.text(),10)||0,this.viewDate.setUTCFullYear(d),this._trigger("changeYear",this.viewDate),2===this.o.minViewMode&&this._setDate(c(d,e,f))),this.showMode(-1),this.fill());break;case"td":g.is(".day")&&!g.is(".disabled")&&(f=parseInt(g.text(),10)||1,d=this.viewDate.getUTCFullYear(),e=this.viewDate.getUTCMonth(),g.is(".old")?0===e?(e=11,d-=1):e-=1:g.is(".new")&&(11===e?(e=0,d+=1):e+=1),this._setDate(c(d,e,f)))}this.picker.is(":visible")&&this._focused_from&&a(this._focused_from).focus(),delete this._focused_from},_toggle_multidate:function(a){var b=this.dates.contains(a);if(a?-1!==b?this.dates.remove(b):this.dates.push(a):this.dates.clear(),"number"==typeof this.o.multidate)for(;this.dates.length>this.o.multidate;)this.dates.remove(0)},_setDate:function(a,b){b&&"date"!==b||this._toggle_multidate(a&&new Date(a)),b&&"view"!==b||(this.viewDate=a&&new Date(a)),this.fill(),this.setValue(),this._trigger("changeDate");var c;this.isInput?c=this.element:this.component&&(c=this.element.find("input")),c&&c.change(),!this.o.autoclose||b&&"date"!==b||this.hide()},moveMonth:function(a,b){if(a){if(!b)return a;var c,d,e=new Date(a.valueOf()),f=e.getUTCDate(),g=e.getUTCMonth(),h=Math.abs(b);if(b=b>0?1:-1,1===h)d=-1===b?function(){return e.getUTCMonth()===g}:function(){return e.getUTCMonth()!==c},c=g+b,e.setUTCMonth(c),(c<0||c>11)&&(c=(c+12)%12);else{for(var i=0;i<h;i++)e=this.moveMonth(e,b);c=e.getUTCMonth(),e.setUTCDate(f),d=function(){return c!==e.getUTCMonth()}}for(;d();)e.setUTCDate(--f),e.setUTCMonth(c);return e}},moveYear:function(a,b){return this.moveMonth(a,12*b)},dateWithinRange:function(a){return a>=this.o.startDate&&a<=this.o.endDate},keydown:function(a){if(this.picker.is(":not(:visible)"))return void(27===a.keyCode&&this.show());var b,c,e,f=!1,g=this.focusDate||this.viewDate;switch(a.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),a.preventDefault();break;case 37:case 39:if(!this.o.keyboardNavigation)break;b=37===a.keyCode?-1:1,a.ctrlKey?(c=this.moveYear(this.dates.get(-1)||d(),b),e=this.moveYear(g,b),this._trigger("changeYear",this.viewDate)):a.shiftKey?(c=this.moveMonth(this.dates.get(-1)||d(),b),e=this.moveMonth(g,b),this._trigger("changeMonth",this.viewDate)):(c=new Date(this.dates.get(-1)||d()),c.setUTCDate(c.getUTCDate()+b),e=new Date(g),e.setUTCDate(g.getUTCDate()+b)),this.dateWithinRange(c)&&(this.focusDate=this.viewDate=e,this.setValue(),this.fill(),a.preventDefault());break;case 38:case 40:if(!this.o.keyboardNavigation)break;b=38===a.keyCode?-1:1,a.ctrlKey?(c=this.moveYear(this.dates.get(-1)||d(),b),e=this.moveYear(g,b),this._trigger("changeYear",this.viewDate)):a.shiftKey?(c=this.moveMonth(this.dates.get(-1)||d(),b),e=this.moveMonth(g,b),this._trigger("changeMonth",this.viewDate)):(c=new Date(this.dates.get(-1)||d()),c.setUTCDate(c.getUTCDate()+7*b),e=new Date(g),e.setUTCDate(g.getUTCDate()+7*b)),this.dateWithinRange(c)&&(this.focusDate=this.viewDate=e,this.setValue(),this.fill(),a.preventDefault());break;case 32:break;case 13:g=this.focusDate||this.dates.get(-1)||this.viewDate,this._toggle_multidate(g),f=!0,this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(a.preventDefault(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}if(f){this.dates.length?this._trigger("changeDate"):this._trigger("clearDate");var h;this.isInput?h=this.element:this.component&&(h=this.element.find("input")),h&&h.change()}},showMode:function(a){a&&(this.viewMode=Math.max(this.o.minViewMode,Math.min(2,this.viewMode+a))),this.picker.find(">div").hide().filter(".cfdatepicker-"+p.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()}};var k=function(b,c){this.element=a(b),this.inputs=a.map(c.inputs,function(a){return a.jquery?a[0]:a}),delete c.inputs,a(this.inputs).cfdatepicker(c).bind("changeDate",a.proxy(this.dateUpdated,this)),this.pickers=a.map(this.inputs,function(b){return a(b).data("cfdatepicker")}),this.updateDates()};k.prototype={updateDates:function(){this.dates=a.map(this.pickers,function(a){return a.getUTCDate()}),this.updateRanges()},updateRanges:function(){var b=a.map(this.dates,function(a){return a.valueOf()});a.each(this.pickers,function(a,c){c.setRange(b)})},dateUpdated:function(b){if(!this.updating){this.updating=!0;var c=a(b.target).data("cfdatepicker"),d=c.getUTCDate(),e=a.inArray(b.target,this.inputs),f=this.inputs.length;if(-1!==e){if(a.each(this.pickers,function(a,b){b.getUTCDate()||b.setUTCDate(d)}),d<this.dates[e])for(;e>=0&&d<this.dates[e];)this.pickers[e--].setUTCDate(d);else if(d>this.dates[e])for(;e<f&&d>this.dates[e];)this.pickers[e++].setUTCDate(d);this.updateDates(),delete this.updating}}},remove:function(){a.map(this.pickers,function(a){a.remove()}),delete this.element.data().cfdatepicker}};var l=a.fn.cfdatepicker;a.fn.cfdatepicker=function(b){var c=Array.apply(null,arguments);c.shift();var d;return this.each(function(){var e=a(this),h=e.data("cfdatepicker"),i="object"==typeof b&&b;if(!h){var l=f(this,"date"),n=a.extend({},m,l,i),o=g(n.language),p=a.extend({},m,o,l,i);if(e.is(".input-daterange")||p.inputs){var q={inputs:p.inputs||e.find("input").toArray()};e.data("cfdatepicker",h=new k(this,a.extend(p,q)))}else e.data("cfdatepicker",h=new j(this,p))}if("string"==typeof b&&"function"==typeof h[b]&&void 0!==(d=h[b].apply(h,c)))return!1}),void 0!==d?d:this};var m=a.fn.cfdatepicker.defaults={autoclose:!1,beforeShowDay:a.noop,calendarWeeks:!1,clearBtn:!1,daysOfWeekDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",keyboardNavigation:!0,language:"en",minViewMode:0,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-1/0,startView:0,todayBtn:!1,todayHighlight:!1,weekStart:0},n=a.fn.cfdatepicker.locale_opts=["format","rtl","weekStart"];a.fn.cfdatepicker.Constructor=j;var o=a.fn.cfdatepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear"}},p={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(a){
2
+ return a%4==0&&a%100!=0||a%400==0},getDaysInMonth:function(a,b){return[31,p.isLeapYear(a)?29:28,31,30,31,30,31,31,30,31,30,31][b]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(a){var b=a.replace(this.validParts,"\0").split("\0"),c=a.match(this.validParts);if(!b||!b.length||!c||0===c.length)throw new Error("Invalid date format.");return{separators:b,parts:c}},parseDate:function(b,d,e){function f(){var a=this.slice(0,l[i].length);return a===l[i].slice(0,a.length)}if(b){if(b instanceof Date)return b;"string"==typeof d&&(d=p.parseFormat(d));var g,h,i,k=/([\-+]\d+)([dmwy])/,l=b.match(/([\-+]\d+)([dmwy])/g);if(/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(b)){for(b=new Date,i=0;i<l.length;i++)switch(g=k.exec(l[i]),h=parseInt(g[1]),g[2]){case"d":b.setUTCDate(b.getUTCDate()+h);break;case"m":b=j.prototype.moveMonth.call(j.prototype,b,h);break;case"w":b.setUTCDate(b.getUTCDate()+7*h);break;case"y":b=j.prototype.moveYear.call(j.prototype,b,h)}return c(b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate(),0,0,0)}l=b&&b.match(this.nonpunctuation)||[],b=new Date;var m,n,q={},r=["yyyy","yy","M","MM","m","mm","d","dd"],s={yyyy:function(a,b){return a.setUTCFullYear(b)},yy:function(a,b){return a.setUTCFullYear(2e3+b)},m:function(a,b){if(isNaN(a))return a;for(b-=1;b<0;)b+=12;for(b%=12,a.setUTCMonth(b);a.getUTCMonth()!==b;)a.setUTCDate(a.getUTCDate()-1);return a},d:function(a,b){return a.setUTCDate(b)}};s.M=s.MM=s.mm=s.m,s.dd=s.d,b=c(b.getFullYear(),b.getMonth(),b.getDate(),0,0,0);var t=d.parts.slice();if(l.length!==t.length&&(t=a(t).filter(function(b,c){return-1!==a.inArray(c,r)}).toArray()),l.length===t.length){var u;for(i=0,u=t.length;i<u;i++){if(m=parseInt(l[i],10),g=t[i],isNaN(m))switch(g){case"MM":n=a(o[e].months).filter(f),m=a.inArray(n[0],o[e].months)+1;break;case"M":n=a(o[e].monthsShort).filter(f),m=a.inArray(n[0],o[e].monthsShort)+1}q[g]=m}var v,w;for(i=0;i<r.length;i++)(w=r[i])in q&&!isNaN(q[w])&&(v=new Date(b),s[w](v,q[w]),isNaN(v)||(b=v))}return b}},formatDate:function(b,c,d){if(!b)return"";"string"==typeof c&&(c=p.parseFormat(c));var e={d:b.getUTCDate(),D:o[d].daysShort[b.getUTCDay()],DD:o[d].days[b.getUTCDay()],m:b.getUTCMonth()+1,M:o[d].monthsShort[b.getUTCMonth()],MM:o[d].months[b.getUTCMonth()],yy:b.getUTCFullYear().toString().substring(2),yyyy:b.getUTCFullYear()};e.dd=(e.d<10?"0":"")+e.d,e.mm=(e.m<10?"0":"")+e.m,b=[];for(var f=a.extend([],c.separators),g=0,h=c.parts.length;g<=h;g++)f.length&&b.push(f.shift()),b.push(e[c.parts[g]]);return b.join("")},headTemplate:'<thead><tr><th class="prev">&laquo;</th><th colspan="5" class="cfdatepicker-switch"></th><th class="next">&raquo;</th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>'};p.template='<div class="cfdatepicker"><div class="cfdatepicker-days"><table class=" table-condensed">'+p.headTemplate+"<tbody></tbody>"+p.footTemplate+'</table></div><div class="cfdatepicker-months"><table class="table-condensed">'+p.headTemplate+p.contTemplate+p.footTemplate+'</table></div><div class="cfdatepicker-years"><table class="table-condensed">'+p.headTemplate+p.contTemplate+p.footTemplate+"</table></div></div>",a.fn.cfdatepicker.DPGlobal=p,a.fn.cfdatepicker.noConflict=function(){return a.fn.cfdatepicker=l,this},a(document).on("focus.cfdatepicker.data-api click.cfdatepicker.data-api",'[data-provide="cfdatepicker"]',function(b){var c=a(this);c.data("cfdatepicker")||(b.preventDefault(),c.cfdatepicker("show").on("show",function(){a(this).trigger("blur")}).on("hide",function(){a(this).attr("disabled",!1)}))})}(window.jQuery),jQuery(document).ready(function(a){jQuery(document).on("cf.add",function(){a("[data-inputmask]").inputmask()}),jQuery(document).trigger("cf.add")}),function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){function b(a,b){var c=Array.prototype.slice.call(arguments,2);return setTimeout(function(){return a.apply(null,c)},b)}function c(a,b){return b=b||100,function(){if(!a.debouncing){var c=Array.prototype.slice.apply(arguments);a.lastReturnVal=a.apply(window,c),a.debouncing=!0}return clearTimeout(a.debounceTimeout),a.debounceTimeout=setTimeout(function(){a.debouncing=!1},b),a.lastReturnVal}}function d(d,f){if(this.$window=a(window),this.$document=a(document),this.$element=a(d),this.options=a.extend({},h,f),this._defaults=h,this._name=e,this.startEvent=this.options.startEvent.join("."+e+" ")+"."+e,this.moveEvent=this.options.moveEvent.join("."+e+" ")+"."+e,this.endEvent=this.options.endEvent.join("."+e+" ")+"."+e,this.polyfill=this.options.polyfill,this.onInit=this.options.onInit,this.onSlide=this.options.onSlide,this.onSlideEnd=this.options.onSlideEnd,this.polyfill&&g)return!1;this.identifier="js-"+e+"-"+ +new Date,this.min=parseFloat(this.$element[0].getAttribute("min")||0),this.max=parseFloat(this.$element[0].getAttribute("max")||100),this.value=parseFloat(this.$element[0].value||this.min+(this.max-this.min)/2),this.step=parseFloat(this.$element[0].getAttribute("step")||1),this.$fill=a('<div class="'+this.options.fillClass+'" />'),this.$handle=a('<div class="'+this.options.handleClass+'" />'),this.$range=a('<div class="'+this.options.rangeClass+'" id="'+this.identifier+'" />').insertAfter(this.$element).prepend(this.$fill,this.$handle),this.$element.css({position:"absolute",width:"1px",height:"1px",overflow:"hidden",opacity:"0"}),this.handleDown=a.proxy(this.handleDown,this),this.handleMove=a.proxy(this.handleMove,this),this.handleEnd=a.proxy(this.handleEnd,this),this.init();var i=this;this.$window.on("resize."+e,c(function(){b(function(){i.update()},300)},20)),this.$document.on(this.startEvent,"#"+this.identifier+":not(."+this.options.disabledClass+")",this.handleDown),this.$element.on("change."+e,function(a,b){if(!b||b.origin!==e){var c=a.target.value,d=i.getPositionFromValue(c);i.setPosition(d)}})}var e="rangeslider",f=[],g=function(){var a=document.createElement("input");return a.setAttribute("type","range"),"text"!==a.type}(),h={polyfill:!0,rangeClass:"rangeslider",disabledClass:"rangeslider--disabled",fillClass:"rangeslider__fill",handleClass:"rangeslider__handle",startEvent:["mousedown","touchstart","pointerdown"],moveEvent:["mousemove","touchmove","pointermove"],endEvent:["mouseup","touchend","pointerup"]};d.prototype.init=function(){this.onInit&&"function"==typeof this.onInit&&this.onInit(),this.update()},d.prototype.update=function(){this.handleWidth=this.$handle[0].offsetWidth,this.rangeWidth=this.$range[0].offsetWidth,this.maxHandleX=this.rangeWidth-this.handleWidth,this.grabX=this.handleWidth/2,this.position=this.getPositionFromValue(this.value),this.$element[0].disabled?this.$range.addClass(this.options.disabledClass):this.$range.removeClass(this.options.disabledClass),this.setPosition(this.position)},d.prototype.handleDown=function(a){if(a.preventDefault(),this.$document.on(this.moveEvent,this.handleMove),this.$document.on(this.endEvent,this.handleEnd),!((" "+a.target.className+" ").replace(/[\n\t]/g," ").indexOf(this.options.handleClass)>-1)){var b=this.getRelativePosition(this.$range[0],a),c=this.getPositionFromNode(this.$handle[0])-this.getPositionFromNode(this.$range[0]);this.setPosition(b-this.grabX),b>=c&&b<c+this.handleWidth&&(this.grabX=b-c)}},d.prototype.handleMove=function(a){a.preventDefault();var b=this.getRelativePosition(this.$range[0],a);this.setPosition(b-this.grabX)},d.prototype.handleEnd=function(a){a.preventDefault(),this.$document.off(this.moveEvent,this.handleMove),this.$document.off(this.endEvent,this.handleEnd);var b=this.getRelativePosition(this.$range[0],a);this.onSlideEnd&&"function"==typeof this.onSlideEnd&&this.onSlideEnd(b-this.grabX,this.value)},d.prototype.cap=function(a,b,c){return a<b?b:a>c?c:a},d.prototype.setPosition=function(a){var b,c;b=this.getValueFromPosition(this.cap(a,0,this.maxHandleX))/this.step*this.step,c=this.getPositionFromValue(b),this.$fill[0].style.width=c+this.grabX+"px",this.$handle[0].style.left=c+"px",this.setValue(b),this.position=c,this.value=b,this.onSlide&&"function"==typeof this.onSlide&&this.onSlide(c,b)},d.prototype.getPositionFromNode=function(a){for(var b=0;null!==a;)b+=a.offsetLeft,a=a.offsetParent;return b},d.prototype.getRelativePosition=function(a,b){return(b.pageX||b.originalEvent.clientX||b.originalEvent.touches[0].clientX||b.currentPoint.x)-this.getPositionFromNode(a)},d.prototype.getPositionFromValue=function(a){var b;return b=(a-this.min)/(this.max-this.min),b*this.maxHandleX},d.prototype.getValueFromPosition=function(a){var b,c;return b=a/(this.maxHandleX||1),c=this.step*Math.ceil((b*(this.max-this.min)+this.min)/this.step),Number(c.toFixed(2))},d.prototype.setValue=function(a){a!==this.value&&this.$element.val(a).trigger("change",{origin:e})},d.prototype.destroy=function(){this.$document.off(this.startEvent,"#"+this.identifier,this.handleDown),this.$element.off("."+e).removeAttr("style").removeData("plugin_"+e),this.$range&&this.$range.length&&this.$range[0].parentNode.removeChild(this.$range[0]),f.splice(f.indexOf(this.$element[0]),1),f.length||this.$window.off("."+e)},a.fn[e]=function(b){return this.each(function(){var c=a(this),g=c.data("plugin_"+e);g||(c.data("plugin_"+e,g=new d(this,b)),f.push(this)),"string"==typeof b&&g[b]()})}}),function(a){"use strict";var b={init:function(c){return this.each(function(){this.self=a(this),b.destroy.call(this.self),this.opt=a.extend(!0,{},a.fn.raty.defaults,c),b._adjustCallback.call(this),b._adjustNumber.call(this),"img"!==this.opt.starType&&b._adjustStarType.call(this),b._adjustPath.call(this),b._createStars.call(this),this.opt.cancel&&b._createCancel.call(this),this.opt.precision&&b._adjustPrecision.call(this),b._createScore.call(this),b._apply.call(this,this.opt.score),b._target.call(this,this.opt.score),this.opt.readOnly?b._lock.call(this):(this.style.cursor="pointer",b._binds.call(this)),this.self.data("options",this.opt)})},_adjustCallback:function(){for(var a=["number","readOnly","score","scoreName"],b=0;b<a.length;b++)"function"==typeof this.opt[a[b]]&&(this.opt[a[b]]=this.opt[a[b]].call(this))},_adjustNumber:function(){this.opt.number=b._between(this.opt.number,1,this.opt.numberMax)},_adjustPath:function(){this.opt.path=this.opt.path||"",this.opt.path&&"/"!==this.opt.path.charAt(this.opt.path.length-1)&&(this.opt.path+="/")},_adjustPrecision:function(){this.opt.half=!0,this.opt.targetType="score"},_adjustStarType:function(){this.opt.path="";for(var a=["cancelOff","cancelOn","starHalf","starOff","starOn"],b=0;b<a.length;b++)this.opt[a[b]]=this.opt[a[b]].replace(".","-")},_apply:function(a){b._fill.call(this,a),a&&(a>0&&this.score.val(b._between(a,0,this.opt.number)),b._roundStars.call(this,a))},_between:function(a,b,c){return Math.min(Math.max(parseFloat(a),b),c)},_binds:function(){this.cancel&&(b._bindOverCancel.call(this),b._bindClickCancel.call(this),b._bindOutCancel.call(this)),b._bindOver.call(this),b._bindClick.call(this),b._bindOut.call(this)},_bindClick:function(){var b=this;b.stars.on("click.raty",function(c){var d=a(this);b.score.val(b.opt.half||b.opt.precision?b.self.data("score"):this.alt||d.data("alt")),b.opt.click&&b.opt.click.call(b,+b.score.val(),c)})},_bindClickCancel:function(){var a=this;a.cancel.on("click.raty",function(b){a.score.removeAttr("value"),a.opt.click&&a.opt.click.call(a,null,b)})},_bindOut:function(){var a=this;a.self.on("mouseleave.raty",function(c){var d=+a.score.val()||void 0;b._apply.call(a,d),b._target.call(a,d,c),a.opt.mouseout&&a.opt.mouseout.call(a,d,c)})},_bindOutCancel:function(){var b=this;b.cancel.on("mouseleave.raty",function(c){var d=a(this),e=b.opt.path+b.opt.cancelOff;if("img"===b.opt.starType)d.attr("src",e);else{var f=b.opt.path+b.opt.cancelOn;d.removeClass(f).addClass(e)}if(b.opt.mouseout){var g=+b.score.val()||void 0;b.opt.mouseout.call(b,g,c)}})},_bindOver:function(){var a=this,c=a.opt.half?"mousemove.raty":"mouseover.raty";a.stars.on(c,function(c){var d=b._getScoreByPosition.call(a,c,this);b._fill.call(a,d),a.opt.half&&(b._roundStars.call(a,d),a.self.data("score",d)),b._target.call(a,d,c),a.opt.mouseover&&a.opt.mouseover.call(a,d,c)})},_bindOverCancel:function(){var c=this;c.cancel.on("mouseover.raty",function(d){var e=c.opt.path+c.opt.cancelOn,f=a(this),g=c.opt.path+c.opt.starOff;if("img"===c.opt.starType)f.attr("src",e),c.stars.attr("src",g);else{c.stars.attr("class",g);var h=c.opt.path+c.opt.cancelOff;f.removeClass(h).addClass(e).css("color",c.opt.starColor)}b._target.call(c,null,d),c.opt.mouseover&&c.opt.mouseover.call(c,null)})},_buildScoreField:function(){return a("<input />",{name:this.opt.scoreName,type:"hidden"}).appendTo(this)},_createCancel:function(){var b=this.opt.path+this.opt.cancelOff,c=a("<"+this.opt.starType+" />",{title:this.opt.cancelHint,class:"raty-cancel"}).css("marginRight",this.opt.space?this.opt.spaceWidth+"px":"0");"img"===this.opt.starType?c.attr({src:b,alt:"x"}):c.attr("data-alt","x").addClass(b),"left"===this.opt.cancelPlace?this.self.prepend("&#160;").prepend(c):this.self.append("&#160;").append(c),this.cancel=c},_createScore:function(){var c=a(this.opt.targetScore);this.score=c.length?c:b._buildScoreField.call(this)},_createStars:function(){for(var c=1;c<=this.opt.number;c++){var d,e=this.opt.score&&this.opt.score>=c?"starOn":"starOff",f=b._getHint.call(this,c);e=this.opt.path+this.opt[e],d="img"!==this.opt.starType?{"data-alt":c,class:e}:{src:e,alt:c},d.title=f,a("<"+this.opt.starType+" />",d).css("marginRight",c<this.opt.number&&this.opt.space?this.opt.spaceWidth+"px":"0").appendTo(this),this.opt.space}this.stars=this.self.children(this.opt.starType)},_error:function(b){a(this).text(b),a.error(b)},_fill:function(a){for(var c=0,d=1;d<=this.stars.length;d++){var e,f=this.stars.eq(d-1),g=b._turnOn.call(this,d,a);if(this.opt.iconRange&&this.opt.iconRange.length>c){var h=this.opt.iconRange[c];e=b._getIconRange.call(this,h,g),d<=h.range&&("img"===this.opt.starType?f.attr("src",e):f.attr("class",e)),d===h.range&&c++}else e=this.opt.path+this.opt[g?"starOn":"starOff"],"img"===this.opt.starType?f.attr("src",e):f.attr("class",e),g?f.css("color",this.opt.starColor):f.css("color","")}},_getIconRange:function(a,b){return this.opt.path+(b?a.on||this.opt.starOn:a.off||this.opt.starOff)},_getScoreByPosition:function(c,d){var e=a(d),f=parseInt(d.alt||e.data("alt"),10);if(this.opt.half){var g=b._getSize.call(this),h=parseFloat((c.pageX-e.offset().left)/g);f=this.opt.precision?f-1+h:f-1+(h>.5?1:.5)}return f},_getSize:function(){var a;return a="img"===this.opt.starType?this.stars[0].width:parseFloat(this.stars.eq(0).css("font-size")),a||b._error.call(this,"Could not be possible get the icon size!"),a},_turnOn:function(a,b){return this.opt.single?a===b:a<=b},_getHint:function(a){var b=this.opt.hints[a-1];return""===b?"":b||a},_lock:function(){var a=parseInt(this.score.val(),10),c=a?b._getHint.call(this,a):this.opt.noRatedMsg;this.style.cursor="",this.title=c,this.score.prop("readonly",!0),this.stars.prop("title",c),this.cancel&&this.cancel.hide(),this.self.data("readonly",!0)},_roundStars:function(a){var b=(a%1).toFixed(2);if(b>this.opt.round.down){var c="starOn";this.opt.halfShow&&b<this.opt.round.up?c="starHalf":b<this.opt.round.full&&(c="starOff");var d=this.stars[Math.ceil(a)-1];"img"===this.opt.starType?d.src=this.opt.path+this.opt[c]:d.style.className=this.opt[c]}},_target:function(c,d){if(this.opt.target){var e=a(this.opt.target);e.length||b._error.call(this,"Target selector invalid or missing!");var f=d&&"mouseover"===d.type;if(void 0===c)c=this.opt.targetText;else if(null===c)c=f?this.opt.cancelHint:this.opt.targetText;else{"hint"===this.opt.targetType?c=b._getHint.call(this,Math.ceil(c)):this.opt.precision&&(c=parseFloat(c).toFixed(1));var g=d&&"mousemove"===d.type;f||g||this.opt.targetKeep||(c=this.opt.targetText)}c&&(c=this.opt.targetFormat.toString().replace("{score}",c)),e.is(":input")?e.val(c):e.html(c)}},_unlock:function(){this.style.cursor="pointer",this.removeAttribute("title"),this.score.removeAttr("readonly"),this.self.data("readonly",!1);for(var a=0;a<this.opt.number;a++)this.stars[a].title=b._getHint.call(this,a+1);this.cancel&&this.cancel.css("display","")},cancel:function(c){return this.each(function(){var d=a(this);!0!==d.data("readonly")&&(b[c?"click":"score"].call(d,null),this.score.removeAttr("value"))})},click:function(c){return this.each(function(){!0!==a(this).data("readonly")&&(b._apply.call(this,c),this.opt.click&&this.opt.click.call(this,c,a.Event("click")),b._target.call(this,c))})},destroy:function(){return this.each(function(){var b=a(this),c=b.data("raw");c?b.off(".raty").empty().css({cursor:c.style.cursor}).removeData("readonly"):b.data("raw",b.clone()[0])})},getScore:function(){var a,b=[];return this.each(function(){a=this.score.val(),b.push(a?+a:void 0)}),b.length>1?b:b[0]},move:function(c){return this.each(function(){var d=parseInt(c,10),e=a(this).data("options"),f=(+c).toFixed(1).split(".")[1];d>=e.number&&(d=e.number-1,f=10);var g=b._getSize.call(this),h=g/10,i=a(this.stars[d]),j=i.offset().left+h*parseInt(f,10),k=a.Event("mousemove",{pageX:j});i.trigger(k)})},readOnly:function(c){return this.each(function(){var d=a(this);d.data("readonly")!==c&&(c?(d.off(".raty").children("img").off(".raty"),b._lock.call(this)):(b._binds.call(this),b._unlock.call(this)),d.data("readonly",c))})},reload:function(){return b.set.call(this,{})},score:function(){var c=a(this);return arguments.length?b.setScore.apply(c,arguments):b.getScore.call(c)},set:function(b){return this.each(function(){var c=a(this),d=c.data("options"),e=a.extend({},d,b);c.raty(e)})},setScore:function(c){return this.each(function(){!0!==a(this).data("readonly")&&(b._apply.call(this,c),b._target.call(this,c))})}};a.fn.raty=function(c){return b[c]?b[c].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof c&&c?void a.error("Method "+c+" does not exist!"):b.init.apply(this,arguments)},a.fn.raty.defaults={cancel:!1,cancelHint:"Cancel this rating!",cancelOff:"raty-cancel-off",cancelOn:"raty-cancel-on",cancelPlace:"left",click:void 0,half:!1,halfShow:!0,hints:["1"],iconRange:void 0,mouseout:void 0,mouseover:void 0,noRatedMsg:"Not rated yet!",number:5,numberMax:20,path:void 0,precision:!1,readOnly:!1,round:{down:.25,full:.6,up:.76},score:void 0,scoreName:"score",single:!1,space:!0,spaceWidth:3,starColor:"#ff00aa",starHalf:"star-half.png",starOff:"raty-dot-off",starOn:"raty-dot-on",starType:"img",target:void 0,targetFormat:"{score}",targetKeep:!1,targetScore:void 0,targetText:"",targetType:"hint"}}(jQuery),jQuery(function(a){a("body").on("click",".cf-toggle-group-buttons a",function(){var b=a(this),c=b.closest(".caldera-config-field"),d=c.find('[data-ref="'+b.attr("id")+'"]');c.find(".btn").removeClass(b.data("active")).addClass(b.data("default")),b.addClass(b.data("active")).removeClass(b.data("default")),d.prop("checked",!0).trigger("change")})}),jQuery&&function(a){a.extend(a.fn,{miniColors:function(b,c){var d=function(b,c,d){var e=s(b.val());e||(e="ffffff");var f=x(e),h=a('<span class="input-group-addon" style="background-color: #'+e+'" href="#"></span>');h.insertAfter(b),b.addClass("miniColors").data("original-maxlength",b.attr("maxlength")||null).data("original-autocomplete",b.attr("autocomplete")||null).data("letterCase",c.letterCase?c.letterCase:"uppercase").data("trigger",h).data("hsb",f).data("change",c.change?c.change:null).data("close",c.close?c.close:null).data("open",c.open?c.open:null).attr("maxlength",7).attr("autocomplete","off").val("#"+o(e,c.letterCase)).trigger("change"),c.readonly&&b.prop("readonly",!0),c.disabled&&g(b),h.on("click.miniColors",function(a){a.preventDefault(),""===b.val()&&b.val("#").trigger("change"),i(b)}),b.on("focus.miniColors",function(a){""===b.val()&&b.val("#").trigger("change"),i(b)}),b.on("blur.miniColors",function(a){var c=s(y(b.data("hsb")));b.val(c?"#"+o(c,b.data("letterCase")):"").trigger("change")}),b.on("keydown.miniColors",function(a){9===a.keyCode&&j(b)}),b.on("keyup.miniColors",function(a){n(b)}),b.on("paste.miniColors",function(a){setTimeout(function(){n(b)},5)})},e=function(b){j(),b=a(b),b.data("trigger").remove(),b.attr("autocomplete",b.data("original-autocomplete")).attr("maxlength",b.data("original-maxlength")).removeData().removeClass("miniColors").off(".miniColors"),a(document).off(".miniColors")},f=function(a){a.prop("disabled",!1).data("trigger").css("opacity",1)},g=function(a){j(a),a.prop("disabled",!0).data("trigger").css("opacity",.5)},i=function(b){if(b.prop("disabled"))return!1;j();var c=a('<div class="miniColors-selector"></div>');c.append('<div class="miniColors-colors" style="background-color: #FFF;"><div class="miniColors-colorPicker"><div class="miniColors-colorPicker-inner"></div></div>').append('<div class="miniColors-hues"><div class="miniColors-huePicker"></div></div>').css("display","none").addClass(b.attr("class")).removeClass("form-control");var d=b.data("hsb");c.find(".miniColors-colors").css("backgroundColor","#"+y({h:d.h,s:100,b:100}));var e=b.data("colorPosition");e||(e=p(d)),c.find(".miniColors-colorPicker").css("top",e.y+"px").css("left",e.x+"px");var f=b.data("huePosition");f||(f=q(d)),c.find(".miniColors-huePicker").css("top",f.y+"px"),b.data("selector",c).data("huePicker",c.find(".miniColors-huePicker")).data("colorPicker",c.find(".miniColors-colorPicker")).data("mousebutton",0),a("BODY").append(c);var g=b.data("trigger"),h=!b.is(":visible"),i=h?g.offset().top+g.outerHeight():b.offset().top+b.outerHeight(),m=h?g.offset().left:b.offset().left,n=c.outerWidth(),o=c.outerHeight(),r=g.outerWidth(),s=g.outerHeight(),u=a(window).height(),v=a(window).width(),w=a(window).scrollTop(),x=a(window).scrollLeft();i+o>u+w&&(i=i-o-s),m+n>v+x&&(m=m-n+r),c.css({top:i,left:m}).fadeIn(100),c.on("selectstart",function(){return!1}),(!a.browser.msie||a.browser.msie&&a.browser.version>=9)&&a(window).on("resize.miniColors",function(a){j(b)}),a(document).on("mousedown.miniColors touchstart.miniColors",function(c){b.data("mousebutton",1);var d=a(c.target).parents().andSelf();return d.hasClass("miniColors-colors")&&(c.preventDefault(),b.data("moving","colors"),k(b,c)),d.hasClass("miniColors-hues")&&(c.preventDefault(),b.data("moving","hues"),l(b,c)),d.hasClass("miniColors-selector")?void c.preventDefault():void(d.hasClass("miniColors")||j(b))}),a(document).on("mouseup.miniColors touchend.miniColors",function(a){a.preventDefault(),b.data("mousebutton",0).removeData("moving")}).on("mousemove.miniColors touchmove.miniColors",function(a){a.preventDefault(),1===b.data("mousebutton")&&("colors"===b.data("moving")&&k(b,a),"hues"===b.data("moving")&&l(b,a))}),b.data("open")&&b.data("open").call(b.get(0),"#"+y(d),t(d))},j=function(b){b||(b=a(".miniColors")),b.each(function(){var c=a(this).data("selector");a(this).removeData("selector"),a(c).fadeOut(100,function(){if(b.data("close")){var c=b.data("hsb"),d=y(c);b.data("close").call(b.get(0),"#"+d,t(c))}a(this).remove()})}),a(document).off(".miniColors")},k=function(a,b){var c=a.data("colorPicker");c.hide();var d={x:b.pageX,y:b.pageY};b.originalEvent.changedTouches&&(d.x=b.originalEvent.changedTouches[0].pageX,d.y=b.originalEvent.changedTouches[0].pageY),d.x=d.x-a.data("selector").find(".miniColors-colors").offset().left-5,d.y=d.y-a.data("selector").find(".miniColors-colors").offset().top-5,d.x<=-5&&(d.x=-5),d.x>=144&&(d.x=144),d.y<=-5&&(d.y=-5),d.y>=144&&(d.y=144),a.data("colorPosition",d),c.css("left",d.x).css("top",d.y).show();var e=Math.round(.67*(d.x+5));e<0&&(e=0),e>100&&(e=100);var f=100-Math.round(.67*(d.y+5));f<0&&(f=0),f>100&&(f=100);var g=a.data("hsb");g.s=e,g.b=f,m(a,g,!0)},l=function(a,b){var c=a.data("huePicker");c.hide();var d={y:b.pageY};b.originalEvent.changedTouches&&(d.y=b.originalEvent.changedTouches[0].pageY),d.y=d.y-a.data("selector").find(".miniColors-colors").offset().top-1,d.y<=-1&&(d.y=-1),d.y>=149&&(d.y=149),a.data("huePosition",d),c.css("top",d.y).show();var e=Math.round(2.4*(150-d.y-1));e<0&&(e=0),e>360&&(e=360);var f=a.data("hsb");f.h=e,m(a,f,!0)},m=function(a,b,c){a.data("hsb",b);var d=y(b);if(c&&a.val("#"+o(d,a.data("letterCase"))).trigger("change"),a.data("trigger").css("backgroundColor","#"+d),a.data("selector")&&a.data("selector").find(".miniColors-colors").css("backgroundColor","#"+y({h:b.h,s:100,b:100})),a.data("change")){if(d===a.data("lastChange"))return;a.data("change").call(a.get(0),"#"+d,t(b)),a.data("lastChange",d)}},n=function(b){b.val("#"+r(b.val())).trigger("change");var c=s(b.val());if(!c)return!1;var d=x(c),e=b.data("hsb");if(d.h===e.h&&d.s===e.s&&d.b===e.b)return!0;var f=p(d);a(b.data("colorPicker")).css("top",f.y+"px").css("left",f.x+"px"),b.data("colorPosition",f);var g=q(d);return a(b.data("huePicker")).css("top",g.y+"px"),b.data("huePosition",g),m(b,d),!0},o=function(a,b){return"lowercase"===b?a.toLowerCase():"uppercase"===b?a.toUpperCase():a},p=function(a){var b=Math.ceil(a.s/.67);b<0&&(b=0),b>150&&(b=150);var c=150-Math.ceil(a.b/.67);return c<0&&(c=0),c>150&&(c=150),{x:b-5,y:c-5}},q=function(a){var b=150-a.h/2.4;return b<0&&(h=0),b>150&&(h=150),{y:b-1}},r=function(a){return a.replace(/[^A-F0-9]/gi,"")},s=function(a){return(a=r(a))?(3===a.length&&(a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]),6===a.length?a:null):null},t=function(a){var b={},c=Math.round(a.h),d=Math.round(255*a.s/100),e=Math.round(255*a.b/100);if(0===d)b.r=b.g=b.b=e;else{var f=e,g=(255-d)*e/255,h=c%60*(f-g)/60;360===c&&(c=0),c<60?(b.r=f,b.b=g,b.g=g+h):c<120?(b.g=f,b.b=g,b.r=f-h):c<180?(b.g=f,b.r=g,b.b=g+h):c<240?(b.b=f,b.r=g,b.g=f-h):c<300?(b.b=f,b.g=g,b.r=g+h):c<360?(b.r=f,b.g=g,b.b=f-h):(b.r=0,b.g=0,b.b=0)}return{r:Math.round(b.r),g:Math.round(b.g),b:Math.round(b.b)}},u=function(b){var c=[b.r.toString(16),b.g.toString(16),b.b.toString(16)];return a.each(c,function(a,b){1===b.length&&(c[a]="0"+b)}),c.join("")},v=function(a){return a=parseInt(a.indexOf("#")>-1?a.substring(1):a,16),{r:a>>16,g:(65280&a)>>8,b:255&a}},w=function(a){var b={h:0,s:0,b:0},c=Math.min(a.r,a.g,a.b),d=Math.max(a.r,a.g,a.b),e=d-c;return b.b=d,b.s=0!==d?255*e/d:0,0!==b.s?a.r===d?b.h=(a.g-a.b)/e:a.g===d?b.h=2+(a.b-a.r)/e:b.h=4+(a.r-a.g)/e:b.h=-1,b.h*=60,b.h<0&&(b.h+=360),b.s*=100/255,b.b*=100/255,b},x=function(a){var b=w(v(a));return 0===b.s&&(b.h=360),b},y=function(a){return u(t(a))};switch(b){case"readonly":return a(this).each(function(){a(this).hasClass("miniColors")&&a(this).prop("readonly",c)}),a(this);case"disabled":return a(this).each(function(){a(this).hasClass("miniColors")&&(c?g(a(this)):f(a(this)))}),a(this);case"value":if(void 0===c){if(!a(this).hasClass("miniColors"))return;var z=a(this),A=s(z.val());return A?"#"+o(A,z.data("letterCase")):null}return a(this).each(function(){a(this).hasClass("miniColors")&&(a(this).val(c).trigger("change"),n(a(this)))}),a(this);case"destroy":return a(this).each(function(){a(this).hasClass("miniColors")&&e(a(this))}),a(this);default:return b||(b={}),a(this).each(function(){"input"===a(this)[0].tagName.toLowerCase()&&(a(this).data("trigger")||d(a(this),b))}),a(this)}}})}(jQuery),document.addEventListener("load",color_picker_init,!1),jQuery(document).ajaxComplete(function(){color_picker_init()}),function(a,b){function c(){return new Date(Date.UTC.apply(Date,arguments))}function d(){var a=new Date;return c(a.getFullYear(),a.getMonth(),a.getDate())}function e(a){return function(){return this[a].apply(this,arguments)}}function f(b,c){function d(a,b){return b.toLowerCase()}var e,f=a(b).data(),g={},h=new RegExp("^"+c.toLowerCase()+"([A-Z])");c=new RegExp("^"+c.toLowerCase());for(var i in f)c.test(i)&&(e=i.replace(h,d),g[e]=f[i]);return g}function g(b){var c={};if(o[b]||(b=b.split("-")[0],o[b])){var d=o[b];return a.each(n,function(a,b){b in d&&(c[b]=d[b])}),c}}var h=a(window),i=function(){var b={get:function(a){return this.slice(a)[0]},contains:function(a){for(var b=a&&a.valueOf(),c=0,d=this.length;c<d;c++)if(this[c].valueOf()===b)return c;return-1},remove:function(a){this.splice(a,1)},replace:function(b){b&&(a.isArray(b)||(b=[b]),this.clear(),this.push.apply(this,b))},clear:function(){this.splice(0)},copy:function(){var a=new i;return a.replace(this),a}};return function(){var c=[];return c.push.apply(c,arguments),a.extend(c,b),c}}(),j=function(b,c){this.dates=new i,this.viewDate=d(),this.focusDate=null,this._process_options(c),this.element=a(b),this.isInline=!1,this.isInput=this.element.is("input"),this.component=!!this.element.is(".date")&&this.element.find(".add-on, .input-group-addon, .btn"),this.hasInput=this.component&&this.element.find("input").length,this.component&&0===this.component.length&&(this.component=!1),this.picker=a(p.template),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("cfdatepicker-inline").appendTo(this.element):this.picker.addClass("cfdatepicker-dropdown dropdown-menu"),this.o.rtl&&this.picker.addClass("cfdatepicker-rtl"),this.viewMode=this.o.startView,this.o.calendarWeeks&&this.picker.find("tfoot th.today").attr("colspan",function(a,b){return parseInt(b)+1}),this._allow_update=!1,this.setStartDate(this._o.startDate),this.setEndDate(this._o.endDate),this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled),this.fillDow(),this.fillMonths(),this._allow_update=!0,this.update(),this.showMode(),this.isInline&&this.show()};j.prototype={constructor:j,_process_options:function(b){this._o=a.extend({},this._o,b);var c=this.o=a.extend({},this._o),d=c.language;switch(o[d]||(d=d.split("-")[0],o[d]||(d=m.language)),c.language=d,c.startView){case 2:case"decade":c.startView=2;break;case 1:case"year":c.startView=1;break;default:c.startView=0}switch(c.minViewMode){case 1:case"months":c.minViewMode=1;break;case 2:case"years":c.minViewMode=2;break;default:c.minViewMode=0}c.startView=Math.max(c.startView,c.minViewMode),!0!==c.multidate&&(c.multidate=Number(c.multidate)||!1,!1!==c.multidate?c.multidate=Math.max(0,c.multidate):c.multidate=1),c.multidateSeparator=String(c.multidateSeparator),c.weekStart%=7,c.weekEnd=(c.weekStart+6)%7;var e=p.parseFormat(c.format);c.startDate!==-1/0&&(c.startDate?c.startDate instanceof Date?c.startDate=this._local_to_utc(this._zero_time(c.startDate)):c.startDate=p.parseDate(c.startDate,e,c.language):c.startDate=-1/0),c.endDate!==1/0&&(c.endDate?c.endDate instanceof Date?c.endDate=this._local_to_utc(this._zero_time(c.endDate)):c.endDate=p.parseDate(c.endDate,e,c.language):c.endDate=1/0),c.daysOfWeekDisabled=c.daysOfWeekDisabled||[],a.isArray(c.daysOfWeekDisabled)||(c.daysOfWeekDisabled=c.daysOfWeekDisabled.split(/[,\s]*/)),c.daysOfWeekDisabled=a.map(c.daysOfWeekDisabled,function(a){return parseInt(a,10)});var f=String(c.orientation).toLowerCase().split(/\s+/g),g=c.orientation.toLowerCase();if(f=a.grep(f,function(a){return/^auto|left|right|top|bottom$/.test(a)}),c.orientation={x:"auto",y:"auto"},g&&"auto"!==g)if(1===f.length)switch(f[0]){case"top":case"bottom":c.orientation.y=f[0];break;case"left":case"right":c.orientation.x=f[0]}else g=a.grep(f,function(a){return/^left|right$/.test(a)}),c.orientation.x=g[0]||"auto",g=a.grep(f,function(a){return/^top|bottom$/.test(a)}),c.orientation.y=g[0]||"auto"},_events:[],_secondaryEvents:[],_applyEvents:function(a){for(var c,d,e,f=0;f<a.length;f++)c=a[f][0],2===a[f].length?(d=b,e=a[f][1]):3===a[f].length&&(d=a[f][1],e=a[f][2]),c.on(e,d)},_unapplyEvents:function(a){for(var c,d,e,f=0;f<a.length;f++)c=a[f][0],2===a[f].length?(e=b,d=a[f][1]):3===a[f].length&&(e=a[f][1],d=a[f][2]),c.off(d,e)},_buildEvents:function(){this.isInput?this._events=[[this.element,{focus:a.proxy(this.show,this),keyup:a.proxy(function(b){-1===a.inArray(b.keyCode,[27,37,39,38,40,32,13,9])&&this.update()},this),keydown:a.proxy(this.keydown,this)}]]:this.component&&this.hasInput?this._events=[[this.element.find("input"),{focus:a.proxy(this.show,this),keyup:a.proxy(function(b){-1===a.inArray(b.keyCode,[27,37,39,38,40,32,13,9])&&this.update()},this),
3
+ keydown:a.proxy(this.keydown,this)}],[this.component,{click:a.proxy(this.show,this)}]]:this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:a.proxy(this.show,this)}]],this._events.push([this.element,"*",{blur:a.proxy(function(a){this._focused_from=a.target},this)}],[this.element,{blur:a.proxy(function(a){this._focused_from=a.target},this)}]),this._secondaryEvents=[[this.picker,{click:a.proxy(this.click,this)}],[a(window),{resize:a.proxy(this.place,this)}],[a(document),{"mousedown touchstart":a.proxy(function(a){this.element.is(a.target)||this.element.find(a.target).length||this.picker.is(a.target)||this.picker.find(a.target).length||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(b,c){var d=c||this.dates.get(-1),e=this._utc_to_local(d);this.element.trigger({type:b,date:e,dates:a.map(this.dates,this._utc_to_local),format:a.proxy(function(a,b){0===arguments.length?(a=this.dates.length-1,b=this.o.format):"string"==typeof a&&(b=a,a=this.dates.length-1),b=b||this.o.format;var c=this.dates.get(a);return p.formatDate(c,b,this.o.language)},this)})},show:function(){this.isInline||this.picker.appendTo("body"),this.picker.show(),this.place(),this._attachSecondaryEvents(),this._trigger("show")},hide:function(){this.isInline||this.picker.is(":visible")&&(this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.viewMode=this.o.startView,this.showMode(),this.o.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())&&this.setValue(),this._trigger("hide"))},remove:function(){this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().cfdatepicker,this.isInput||delete this.element.data().date},_utc_to_local:function(a){return a&&new Date(a.getTime()+6e4*a.getTimezoneOffset())},_local_to_utc:function(a){return a&&new Date(a.getTime()-6e4*a.getTimezoneOffset())},_zero_time:function(a){return a&&new Date(a.getFullYear(),a.getMonth(),a.getDate())},_zero_utc_time:function(a){return a&&new Date(Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()))},getDates:function(){return a.map(this.dates,this._utc_to_local)},getUTCDates:function(){return a.map(this.dates,function(a){return new Date(a)})},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){return new Date(this.dates.get(-1))},setDates:function(){var b=a.isArray(arguments[0])?arguments[0]:arguments;this.update.apply(this,b),this._trigger("changeDate"),this.setValue()},setUTCDates:function(){var b=a.isArray(arguments[0])?arguments[0]:arguments;this.update.apply(this,a.map(b,this._utc_to_local)),this._trigger("changeDate"),this.setValue()},setDate:e("setDates"),setUTCDate:e("setUTCDates"),setValue:function(){var a=this.getFormattedDate();this.isInput?this.element.val(a).change():this.component&&this.element.find("input").val(a).change()},getFormattedDate:function(c){c===b&&(c=this.o.format);var d=this.o.language;return a.map(this.dates,function(a){return p.formatDate(a,c,d)}).join(this.o.multidateSeparator)},setStartDate:function(a){this._process_options({startDate:a}),this.update(),this.updateNavArrows()},setEndDate:function(a){this._process_options({endDate:a}),this.update(),this.updateNavArrows()},setDaysOfWeekDisabled:function(a){this._process_options({daysOfWeekDisabled:a}),this.update(),this.updateNavArrows()},place:function(){if(!this.isInline){var b,c=this.picker.outerWidth(),d=this.picker.outerHeight(),e=h.width(),f=h.height(),g=h.scrollTop(),i=jQuery(this.element).data("form-id");b=null!==document.getElementById("modal-"+i+"-content")?1e4:parseInt(this.element.parents().filter(function(){return"auto"!==a(this).css("z-index")}).first().css("z-index"))+10;var j=this.component?this.component.parent().offset():this.element.offset(),k=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),l=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),m=j.left,n=j.top;this.picker.removeClass("cfdatepicker-orient-top cfdatepicker-orient-bottom cfdatepicker-orient-right cfdatepicker-orient-left"),"auto"!==this.o.orientation.x?(this.picker.addClass("cfdatepicker-orient-"+this.o.orientation.x),"right"===this.o.orientation.x&&(m-=c-l)):(this.picker.addClass("cfdatepicker-orient-left"),j.left<0?m-=j.left-10:j.left+c>e&&(m=e-c-10));var o,p,q=this.o.orientation.y;"auto"===q&&(o=-g+j.top-d,p=g+f-(j.top+k+d),q=Math.max(o,p)===p?"top":"bottom"),this.picker.addClass("cfdatepicker-orient-"+q),"top"===q?n+=k:n-=d+parseInt(this.picker.css("padding-top")),this.picker.css({top:n,left:m,zIndex:b})}},_allow_update:!0,update:function(){if(this._allow_update){var b=this.dates.copy(),c=[],d=!1;arguments.length?(a.each(arguments,a.proxy(function(a,b){b instanceof Date&&(b=this._local_to_utc(b)),c.push(b)},this)),d=!0):(c=this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val(),c=c&&this.o.multidate?c.split(this.o.multidateSeparator):[c],delete this.element.data().date),c=a.map(c,a.proxy(function(a){return p.parseDate(a,this.o.format,this.o.language)},this)),c=a.grep(c,a.proxy(function(a){return a<this.o.startDate||a>this.o.endDate||!a},this),!0),this.dates.replace(c),this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.viewDate>this.o.endDate&&(this.viewDate=new Date(this.o.endDate)),d?this.setValue():c.length&&String(b)!==String(this.dates)&&this._trigger("changeDate"),!this.dates.length&&b.length&&this._trigger("clearDate"),this.fill()}},fillDow:function(){var a=this.o.weekStart,b="<tr>";if(this.o.calendarWeeks){var c='<th class="cw">&nbsp;</th>';b+=c,this.picker.find(".cfdatepicker-days thead tr:first-child").prepend(c)}for(;a<this.o.weekStart+7;)b+='<th class="dow">'+o[this.o.language].daysMin[a++%7]+"</th>";b+="</tr>",this.picker.find(".cfdatepicker-days thead").append(b)},fillMonths:function(){for(var a="",b=0;b<12;)a+='<span class="month">'+o[this.o.language].monthsShort[b++]+"</span>";this.picker.find(".cfdatepicker-months td").html(a)},setRange:function(b){b&&b.length?this.range=a.map(b,function(a){return a.valueOf()}):delete this.range,this.fill()},getClassNames:function(b){var c=[],d=this.viewDate.getUTCFullYear(),e=this.viewDate.getUTCMonth(),f=new Date;return b.getUTCFullYear()<d||b.getUTCFullYear()===d&&b.getUTCMonth()<e?c.push("old"):(b.getUTCFullYear()>d||b.getUTCFullYear()===d&&b.getUTCMonth()>e)&&c.push("new"),this.focusDate&&b.valueOf()===this.focusDate.valueOf()&&c.push("focused"),this.o.todayHighlight&&b.getUTCFullYear()===f.getFullYear()&&b.getUTCMonth()===f.getMonth()&&b.getUTCDate()===f.getDate()&&c.push("today"),-1!==this.dates.contains(b)&&c.push("active"),(b.valueOf()<this.o.startDate||b.valueOf()>this.o.endDate||-1!==a.inArray(b.getUTCDay(),this.o.daysOfWeekDisabled))&&c.push("disabled"),this.range&&(b>this.range[0]&&b<this.range[this.range.length-1]&&c.push("range"),-1!==a.inArray(b.valueOf(),this.range)&&c.push("selected")),c},fill:function(){var d,e=new Date(this.viewDate),f=e.getUTCFullYear(),g=e.getUTCMonth(),h=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,i=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,j=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,k=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,l=o[this.o.language].today||o.en.today||"",m=o[this.o.language].clear||o.en.clear||"";this.picker.find(".cfdatepicker-days thead th.cfdatepicker-switch").text(o[this.o.language].months[g]+" "+f),this.picker.find("tfoot th.today").text(l).toggle(!1!==this.o.todayBtn),this.picker.find("tfoot th.clear").text(m).toggle(!1!==this.o.clearBtn),this.updateNavArrows(),this.fillMonths();var n=c(f,g-1,28),q=p.getDaysInMonth(n.getUTCFullYear(),n.getUTCMonth());n.setUTCDate(q),n.setUTCDate(q-(n.getUTCDay()-this.o.weekStart+7)%7);var r=new Date(n);r.setUTCDate(r.getUTCDate()+42),r=r.valueOf();for(var s,t=[];n.valueOf()<r;){if(n.getUTCDay()===this.o.weekStart&&(t.push("<tr>"),this.o.calendarWeeks)){var u=new Date(+n+(this.o.weekStart-n.getUTCDay()-7)%7*864e5),v=new Date(Number(u)+(11-u.getUTCDay())%7*864e5),w=new Date(Number(w=c(v.getUTCFullYear(),0,1))+(11-w.getUTCDay())%7*864e5),x=(v-w)/864e5/7+1;t.push('<td class="cw">'+x+"</td>")}if(s=this.getClassNames(n),s.push("day"),this.o.beforeShowDay!==a.noop){var y=this.o.beforeShowDay(this._utc_to_local(n));y===b?y={}:"boolean"==typeof y?y={enabled:y}:"string"==typeof y&&(y={classes:y}),!1===y.enabled&&s.push("disabled"),y.classes&&(s=s.concat(y.classes.split(/\s+/))),y.tooltip&&(d=y.tooltip)}s=a.unique(s),t.push('<td class="'+s.join(" ")+'"'+(d?' title="'+d+'"':"")+">"+n.getUTCDate()+"</td>"),n.getUTCDay()===this.o.weekEnd&&t.push("</tr>"),n.setUTCDate(n.getUTCDate()+1)}this.picker.find(".cfdatepicker-days tbody").empty().append(t.join(""));var z=this.picker.find(".cfdatepicker-months").find("th:eq(1)").text(f).end().find("span").removeClass("active");a.each(this.dates,function(a,b){b.getUTCFullYear()===f&&z.eq(b.getUTCMonth()).addClass("active")}),(f<h||f>j)&&z.addClass("disabled"),f===h&&z.slice(0,i).addClass("disabled"),f===j&&z.slice(k+1).addClass("disabled"),t="",f=10*parseInt(f/10,10);var A=this.picker.find(".cfdatepicker-years").find("th:eq(1)").text(f+"-"+(f+9)).end().find("td");f-=1;for(var B,C=a.map(this.dates,function(a){return a.getUTCFullYear()}),D=-1;D<11;D++)B=["year"],-1===D?B.push("old"):10===D&&B.push("new"),-1!==a.inArray(f,C)&&B.push("active"),(f<h||f>j)&&B.push("disabled"),t+='<span class="'+B.join(" ")+'">'+f+"</span>",f+=1;A.html(t)},updateNavArrows:function(){if(this._allow_update){var a=new Date(this.viewDate),b=a.getUTCFullYear(),c=a.getUTCMonth();switch(this.viewMode){case 0:this.o.startDate!==-1/0&&b<=this.o.startDate.getUTCFullYear()&&c<=this.o.startDate.getUTCMonth()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&b>=this.o.endDate.getUTCFullYear()&&c>=this.o.endDate.getUTCMonth()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 1:case 2:this.o.startDate!==-1/0&&b<=this.o.startDate.getUTCFullYear()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&b>=this.o.endDate.getUTCFullYear()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"})}}},click:function(b){b.preventDefault();var d,e,f,g=a(b.target).closest("span, td, th");if(1===g.length)switch(g[0].nodeName.toLowerCase()){case"th":switch(g[0].className){case"cfdatepicker-switch":this.showMode(1);break;case"prev":case"next":var h=p.modes[this.viewMode].navStep*("prev"===g[0].className?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,h),this._trigger("changeMonth",this.viewDate);break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,h),1===this.viewMode&&this._trigger("changeYear",this.viewDate)}this.fill();break;case"today":var i=new Date;i=c(i.getFullYear(),i.getMonth(),i.getDate(),0,0,0),this.showMode(-2);var j="linked"===this.o.todayBtn?null:"view";this._setDate(i,j);break;case"clear":var k;this.isInput?k=this.element:this.component&&(k=this.element.find("input")),k&&k.val("").change(),this.update(),this._trigger("changeDate"),this.o.autoclose&&this.hide()}break;case"span":g.is(".disabled")||(this.viewDate.setUTCDate(1),g.is(".month")?(f=1,e=g.parent().find("span").index(g),d=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(e),this._trigger("changeMonth",this.viewDate),1===this.o.minViewMode&&this._setDate(c(d,e,f))):(f=1,e=0,d=parseInt(g.text(),10)||0,this.viewDate.setUTCFullYear(d),this._trigger("changeYear",this.viewDate),2===this.o.minViewMode&&this._setDate(c(d,e,f))),this.showMode(-1),this.fill());break;case"td":g.is(".day")&&!g.is(".disabled")&&(f=parseInt(g.text(),10)||1,d=this.viewDate.getUTCFullYear(),e=this.viewDate.getUTCMonth(),g.is(".old")?0===e?(e=11,d-=1):e-=1:g.is(".new")&&(11===e?(e=0,d+=1):e+=1),this._setDate(c(d,e,f)))}this.picker.is(":visible")&&this._focused_from&&a(this._focused_from).focus(),delete this._focused_from},_toggle_multidate:function(a){var b=this.dates.contains(a);if(a?-1!==b?this.dates.remove(b):this.dates.push(a):this.dates.clear(),"number"==typeof this.o.multidate)for(;this.dates.length>this.o.multidate;)this.dates.remove(0)},_setDate:function(a,b){b&&"date"!==b||this._toggle_multidate(a&&new Date(a)),b&&"view"!==b||(this.viewDate=a&&new Date(a)),this.fill(),this.setValue(),this._trigger("changeDate");var c;this.isInput?c=this.element:this.component&&(c=this.element.find("input")),c&&c.change(),!this.o.autoclose||b&&"date"!==b||this.hide()},moveMonth:function(a,c){if(!a)return b;if(!c)return a;var d,e,f=new Date(a.valueOf()),g=f.getUTCDate(),h=f.getUTCMonth(),i=Math.abs(c);if(c=c>0?1:-1,1===i)e=-1===c?function(){return f.getUTCMonth()===h}:function(){return f.getUTCMonth()!==d},d=h+c,f.setUTCMonth(d),(d<0||d>11)&&(d=(d+12)%12);else{for(var j=0;j<i;j++)f=this.moveMonth(f,c);d=f.getUTCMonth(),f.setUTCDate(g),e=function(){return d!==f.getUTCMonth()}}for(;e();)f.setUTCDate(--g),f.setUTCMonth(d);return f},moveYear:function(a,b){return this.moveMonth(a,12*b)},dateWithinRange:function(a){return a>=this.o.startDate&&a<=this.o.endDate},keydown:function(a){if(this.picker.is(":not(:visible)"))return void(27===a.keyCode&&this.show());var b,c,e,f=!1,g=this.focusDate||this.viewDate;switch(a.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),a.preventDefault();break;case 37:case 39:if(!this.o.keyboardNavigation)break;b=37===a.keyCode?-1:1,a.ctrlKey?(c=this.moveYear(this.dates.get(-1)||d(),b),e=this.moveYear(g,b),this._trigger("changeYear",this.viewDate)):a.shiftKey?(c=this.moveMonth(this.dates.get(-1)||d(),b),e=this.moveMonth(g,b),this._trigger("changeMonth",this.viewDate)):(c=new Date(this.dates.get(-1)||d()),c.setUTCDate(c.getUTCDate()+b),e=new Date(g),e.setUTCDate(g.getUTCDate()+b)),this.dateWithinRange(c)&&(this.focusDate=this.viewDate=e,this.setValue(),this.fill(),a.preventDefault());break;case 38:case 40:if(!this.o.keyboardNavigation)break;b=38===a.keyCode?-1:1,a.ctrlKey?(c=this.moveYear(this.dates.get(-1)||d(),b),e=this.moveYear(g,b),this._trigger("changeYear",this.viewDate)):a.shiftKey?(c=this.moveMonth(this.dates.get(-1)||d(),b),e=this.moveMonth(g,b),this._trigger("changeMonth",this.viewDate)):(c=new Date(this.dates.get(-1)||d()),c.setUTCDate(c.getUTCDate()+7*b),e=new Date(g),e.setUTCDate(g.getUTCDate()+7*b)),this.dateWithinRange(c)&&(this.focusDate=this.viewDate=e,this.setValue(),this.fill(),a.preventDefault());break;case 32:break;case 13:g=this.focusDate||this.dates.get(-1)||this.viewDate,this._toggle_multidate(g),f=!0,this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(a.preventDefault(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}if(f){this.dates.length?this._trigger("changeDate"):this._trigger("clearDate");var h;this.isInput?h=this.element:this.component&&(h=this.element.find("input")),h&&h.change()}},showMode:function(a){a&&(this.viewMode=Math.max(this.o.minViewMode,Math.min(2,this.viewMode+a))),this.picker.find(">div").hide().filter(".cfdatepicker-"+p.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()}};var k=function(b,c){this.element=a(b),this.inputs=a.map(c.inputs,function(a){return a.jquery?a[0]:a}),delete c.inputs,a(this.inputs).cfdatepicker(c).bind("changeDate",a.proxy(this.dateUpdated,this)),this.pickers=a.map(this.inputs,function(b){return a(b).data("cfdatepicker")}),this.updateDates()};k.prototype={updateDates:function(){this.dates=a.map(this.pickers,function(a){return a.getUTCDate()}),this.updateRanges()},updateRanges:function(){var b=a.map(this.dates,function(a){return a.valueOf()});a.each(this.pickers,function(a,c){c.setRange(b)})},dateUpdated:function(b){if(!this.updating){this.updating=!0;var c=a(b.target).data("cfdatepicker"),d=c.getUTCDate(),e=a.inArray(b.target,this.inputs),f=this.inputs.length;if(-1!==e){if(a.each(this.pickers,function(a,b){b.getUTCDate()||b.setUTCDate(d)}),d<this.dates[e])for(;e>=0&&d<this.dates[e];)this.pickers[e--].setUTCDate(d);else if(d>this.dates[e])for(;e<f&&d>this.dates[e];)this.pickers[e++].setUTCDate(d);this.updateDates(),delete this.updating}}},remove:function(){a.map(this.pickers,function(a){a.remove()}),delete this.element.data().cfdatepicker}};var l=a.fn.cfdatepicker;a.fn.cfdatepicker=function(c){var d=Array.apply(null,arguments);d.shift();var e;return this.each(function(){var h=a(this),i=h.data("cfdatepicker"),l="object"==typeof c&&c;if(!i){var n=f(this,"date"),o=a.extend({},m,n,l),p=g(o.language),q=a.extend({},m,p,n,l);if(h.is(".input-daterange")||q.inputs){var r={inputs:q.inputs||h.find("input").toArray()};h.data("cfdatepicker",i=new k(this,a.extend(q,r)))}else h.data("cfdatepicker",i=new j(this,q))}if("string"==typeof c&&"function"==typeof i[c]&&(e=i[c].apply(i,d))!==b)return!1}),e!==b?e:this};var m=a.fn.cfdatepicker.defaults={autoclose:!1,beforeShowDay:a.noop,calendarWeeks:!1,clearBtn:!1,daysOfWeekDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",keyboardNavigation:!0,language:"en",minViewMode:0,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-1/0,startView:0,todayBtn:!1,todayHighlight:!1,weekStart:0},n=a.fn.cfdatepicker.locale_opts=["format","rtl","weekStart"];a.fn.cfdatepicker.Constructor=j;var o=a.fn.cfdatepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear"}},p={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(a){return a%4==0&&a%100!=0||a%400==0},getDaysInMonth:function(a,b){return[31,p.isLeapYear(a)?29:28,31,30,31,30,31,31,30,31,30,31][b]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(a){var b=a.replace(this.validParts,"\0").split("\0"),c=a.match(this.validParts);if(!b||!b.length||!c||0===c.length)throw new Error("Invalid date format.");return{separators:b,parts:c}},parseDate:function(d,e,f){function g(){var a=this.slice(0,m[k].length);return a===m[k].slice(0,a.length)}if(!d)return b;if(d instanceof Date)return d;"string"==typeof e&&(e=p.parseFormat(e));var h,i,k,l=/([\-+]\d+)([dmwy])/,m=d.match(/([\-+]\d+)([dmwy])/g);if(/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(d)){for(d=new Date,k=0;k<m.length;k++)switch(h=l.exec(m[k]),i=parseInt(h[1]),h[2]){case"d":d.setUTCDate(d.getUTCDate()+i);break;case"m":d=j.prototype.moveMonth.call(j.prototype,d,i);break;case"w":d.setUTCDate(d.getUTCDate()+7*i);break;case"y":d=j.prototype.moveYear.call(j.prototype,d,i)}return c(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate(),0,0,0)}m=d&&d.match(this.nonpunctuation)||[],d=new Date;var n,q,r={},s=["yyyy","yy","M","MM","m","mm","d","dd"],t={yyyy:function(a,b){return a.setUTCFullYear(b)},yy:function(a,b){return a.setUTCFullYear(2e3+b)},m:function(a,b){if(isNaN(a))return a;for(b-=1;b<0;)b+=12;for(b%=12,a.setUTCMonth(b);a.getUTCMonth()!==b;)a.setUTCDate(a.getUTCDate()-1);return a},d:function(a,b){return a.setUTCDate(b)}};t.M=t.MM=t.mm=t.m,t.dd=t.d,d=c(d.getFullYear(),d.getMonth(),d.getDate(),0,0,0);var u=e.parts.slice();if(m.length!==u.length&&(u=a(u).filter(function(b,c){return-1!==a.inArray(c,s)}).toArray()),m.length===u.length){var v;for(k=0,v=u.length;k<v;k++){if(n=parseInt(m[k],10),h=u[k],isNaN(n))switch(h){case"MM":q=a(o[f].months).filter(g),n=a.inArray(q[0],o[f].months)+1;break;case"M":q=a(o[f].monthsShort).filter(g),n=a.inArray(q[0],o[f].monthsShort)+1}r[h]=n}var w,x;for(k=0;k<s.length;k++)(x=s[k])in r&&!isNaN(r[x])&&(w=new Date(d),t[x](w,r[x]),isNaN(w)||(d=w))}return d},formatDate:function(b,c,d){if(!b)return"";"string"==typeof c&&(c=p.parseFormat(c));var e={d:b.getUTCDate(),D:o[d].daysShort[b.getUTCDay()],DD:o[d].days[b.getUTCDay()],m:b.getUTCMonth()+1,M:o[d].monthsShort[b.getUTCMonth()],MM:o[d].months[b.getUTCMonth()],yy:b.getUTCFullYear().toString().substring(2),yyyy:b.getUTCFullYear()};e.dd=(e.d<10?"0":"")+e.d,e.mm=(e.m<10?"0":"")+e.m,b=[];for(var f=a.extend([],c.separators),g=0,h=c.parts.length;g<=h;g++)f.length&&b.push(f.shift()),b.push(e[c.parts[g]]);return b.join("")},headTemplate:'<thead><tr><th class="prev">&laquo;</th><th colspan="5" class="cfdatepicker-switch"></th><th class="next">&raquo;</th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>'};p.template='<div class="cfdatepicker"><div class="cfdatepicker-days"><table class=" table-condensed">'+p.headTemplate+"<tbody></tbody>"+p.footTemplate+'</table></div><div class="cfdatepicker-months"><table class="table-condensed">'+p.headTemplate+p.contTemplate+p.footTemplate+'</table></div><div class="cfdatepicker-years"><table class="table-condensed">'+p.headTemplate+p.contTemplate+p.footTemplate+"</table></div></div>",a.fn.cfdatepicker.DPGlobal=p,a.fn.cfdatepicker.noConflict=function(){return a.fn.cfdatepicker=l,this},a(document).on("focus.cfdatepicker.data-api click.cfdatepicker.data-api",'[data-provide="cfdatepicker"]',function(b){var c=a(this);c.data("cfdatepicker")||(b.preventDefault(),c.cfdatepicker("show").on("show",function(){a(this).trigger("blur")}).on("hide",function(){a(this).attr("disabled",!1)}))})}(window.jQuery),function(a){function b(a){var b=document.createElement("input"),c="on"+a,d=c in b;return d||(b.setAttribute(c,"return;"),d="function"==typeof b[c]),b=null,d}function c(a){var b="text"==a||"tel"==a;if(!b){var c=document.createElement("input");c.setAttribute("type",a),b="text"===c.type,c=null}return b}function d(b,c,e){var f=e.aliases[b];return!!f&&(f.alias&&d(f.alias,void 0,e),a.extend(!0,e,f),a.extend(!0,e,c),!0)}function e(b,c){function d(a){function c(a,b,c,d){this.matches=[],this.isGroup=a||!1,this.isOptional=b||!1,this.isQuantifier=c||!1,this.isAlternator=d||!1,this.quantifier={min:1,max:1}}function d(a,c,d){var e=b.definitions[c],f=0==a.matches.length;if(d=void 0!=d?d:a.matches.length,e&&!l){for(var g=e.prevalidator,h=g?g.length:0,i=1;i<e.cardinality;i++){var j=h>=i?g[i-1]:[],k=j.validator,m=j.cardinality;a.matches.splice(d++,0,{fn:k?"string"==typeof k?new RegExp(k):new function(){this.test=k}:new RegExp("."),cardinality:m||1,optionality:a.isOptional,newBlockMarker:f,casing:e.casing,def:e.definitionSymbol||c,placeholder:e.placeholder,mask:c})}a.matches.splice(d++,0,{fn:e.validator?"string"==typeof e.validator?new RegExp(e.validator):new function(){this.test=e.validator}:new RegExp("."),cardinality:e.cardinality,optionality:a.isOptional,newBlockMarker:f,casing:e.casing,def:e.definitionSymbol||c,placeholder:e.placeholder,mask:c})}else a.matches.splice(d++,0,{fn:null,cardinality:0,optionality:a.isOptional,newBlockMarker:f,casing:null,def:c,placeholder:void 0,mask:c}),l=!1}for(var e,f,g,h,i,j,k=/(?:[?*+]|\{[0-9\+\*]+(?:,[0-9\+\*]*)?\})\??|[^.?*+^${[]()|\\]+|./g,l=!1,m=new c,n=[],o=[];e=k.exec(a);)switch(f=e[0],f.charAt(0)){case b.optionalmarker.end:case b.groupmarker.end:if(g=n.pop(),n.length>0){if(h=n[n.length-1],h.matches.push(g),h.isAlternator){i=n.pop();for(var p=0;p<i.matches.length;p++)i.matches[p].isGroup=!1;n.length>0?(h=n[n.length-1],h.matches.push(i)):m.matches.push(i)}}else m.matches.push(g);break;case b.optionalmarker.start:n.push(new c(!1,!0));break;case b.groupmarker.start:n.push(new c(!0));break;case b.quantifiermarker.start:var q=new c(!1,!1,!0);f=f.replace(/[{}]/g,"");var r=f.split(","),s=isNaN(r[0])?r[0]:parseInt(r[0]),t=1==r.length?s:isNaN(r[1])?r[1]:parseInt(r[1]);if(("*"==t||"+"==t)&&(s="*"==t?0:1),q.quantifier={min:s,max:t},n.length>0){var u=n[n.length-1].matches;if(e=u.pop(),!e.isGroup){var v=new c(!0);v.matches.push(e),e=v}u.push(e),u.push(q)}else{if(e=m.matches.pop(),!e.isGroup){var v=new c(!0);v.matches.push(e),e=v}m.matches.push(e),m.matches.push(q)}break;case b.escapeChar:l=!0;break;case b.alternatormarker:n.length>0?(h=n[n.length-1],j=h.matches.pop()):j=m.matches.pop(),j.isAlternator?n.push(j):(i=new c(!1,!1,!1,!0),i.matches.push(j),n.push(i));break;default:if(n.length>0){if(h=n[n.length-1],h.matches.length>0&&(j=h.matches[h.matches.length-1],j.isGroup&&(j.isGroup=!1,d(j,b.groupmarker.start,0),d(j,b.groupmarker.end))),d(h,f),h.isAlternator){i=n.pop();for(var p=0;p<i.matches.length;p++)i.matches[p].isGroup=!1;n.length>0?(h=n[n.length-1],h.matches.push(i)):m.matches.push(i)}}else m.matches.length>0&&(j=m.matches[m.matches.length-1],j.isGroup&&(j.isGroup=!1,d(j,b.groupmarker.start,0),d(j,b.groupmarker.end))),d(m,f)}return m.matches.length>0&&(j=m.matches[m.matches.length-1],j.isGroup&&(j.isGroup=!1,d(j,b.groupmarker.start,0),d(j,b.groupmarker.end)),o.push(m)),o}function e(c,e){if(b.numericInput&&!0!==b.multi){c=c.split("").reverse();for(var f=0;f<c.length;f++)c[f]==b.optionalmarker.start?c[f]=b.optionalmarker.end:c[f]==b.optionalmarker.end?c[f]=b.optionalmarker.start:c[f]==b.groupmarker.start?c[f]=b.groupmarker.end:c[f]==b.groupmarker.end&&(c[f]=b.groupmarker.start);c=c.join("")}if(void 0!=c&&""!=c){if(1==c.length&&0==b.greedy&&0!=b.repeat&&(b.placeholder=""),b.repeat>0||"*"==b.repeat||"+"==b.repeat){var g="*"==b.repeat?0:"+"==b.repeat?1:b.repeat;c=b.groupmarker.start+c+b.groupmarker.end+b.quantifiermarker.start+g+","+b.repeat+b.quantifiermarker.end}return void 0==a.inputmask.masksCache[c]&&(a.inputmask.masksCache[c]={mask:c,maskToken:d(c),validPositions:{},_buffer:void 0,buffer:void 0,tests:{},metadata:e}),a.extend(!0,{},a.inputmask.masksCache[c])}}var f=void 0;if(a.isFunction(b.mask)&&(b.mask=b.mask.call(this,b)),a.isArray(b.mask))if(c)f=[],a.each(b.mask,function(b,c){f.push(void 0==c.mask||a.isFunction(c.mask)?e(c.toString(),c):e(c.mask.toString(),c))});else{b.keepStatic=void 0==b.keepStatic||b.keepStatic;var g="(";a.each(b.mask,function(b,c){g.length>1&&(g+=")|("),g+=void 0==c.mask||a.isFunction(c.mask)?c.toString():c.mask.toString()}),g+=")",f=e(g,b.mask)}else b.mask&&(f=void 0==b.mask.mask||a.isFunction(b.mask.mask)?e(b.mask.toString(),b.mask):e(b.mask.mask.toString(),b.mask));return f}function f(d,e,f){function h(a,b,c){b=b||0;var d,e,f,g=[],h=0;do{if(!0===a&&o().validPositions[h]){var i=o().validPositions[h];e=i.match,d=i.locator.slice(),g.push(!0===c?i.input:I(h,e))}else{if(b>h){f=w(h,d,h-1)[0]}else f=t(h,d,h-1);e=f.match,d=f.locator.slice(),g.push(I(h,e))}h++}while((void 0==ea||ea>h-1)&&null!=e.fn||null==e.fn&&""!=e.def||b>=h);return g.pop(),g}function o(){return e}function p(a){var b=o();b.buffer=void 0,b.tests={},!0!==a&&(b._buffer=void 0,b.validPositions={},b.p=0)}function q(a){var b=o(),c=-1,d=b.validPositions;void 0==a&&(a=-1);var e=c,f=c;for(var g in d){var h=parseInt(g);(-1==a||null!=d[h].match.fn)&&(a>h&&(e=h),h>=a&&(f=h))}return c=a-e>1||a>f?e:f}function r(b,c,d){if(f.insertMode&&void 0!=o().validPositions[b]&&void 0==d){var e,g=a.extend(!0,{},o().validPositions),h=q();for(e=b;h>=e;e++)delete o().validPositions[e];o().validPositions[b]=c;var i,j=!0;for(e=b;h>=e;e++){var k=g[e];if(void 0!=k){var l=o().validPositions;i=!f.keepStatic&&(void 0!=l[e+1]&&w(e+1,l[e].locator.slice(),e).length>1||l[e]&&void 0!=l[e].alternation)?e+1:E(e),j=v(i,k.match.def)?j&&!1!==B(i,k.input,!0,!0):null==k.match.fn}if(!j)break}if(!j)return o().validPositions=a.extend(!0,{},g),!1}else o().validPositions[b]=c;return!0}function s(a,b){var c,d=a;for(void 0!=o().validPositions[a]&&o().validPositions[a].input==f.radixPoint&&(b++,d++),c=d;b>c;c++)void 0==o().validPositions[c]||o().validPositions[c].input==f.radixPoint&&c!=q()||delete o().validPositions[c];for(c=b;c<=q();){var e=o().validPositions[c],g=o().validPositions[d];void 0!=e&&void 0==g?(v(d,e.match.def)&&!1!==B(d,e.input,!0)&&(delete o().validPositions[c],c++),d++):c++}var h=q();h>=a&&void 0!=o().validPositions[h]&&o().validPositions[h].input==f.radixPoint&&delete o().validPositions[h],p(!0)}function t(b,c,d){for(var e,g=w(b,c,d),h=q(),i=o().validPositions[h]||w(0)[0],j=void 0!=i.alternation?i.locator[i.alternation].split(","):[],k=0;k<g.length&&(e=g[k],!(f.greedy||e.match&&(!1===e.match.optionality||!1===e.match.newBlockMarker)&&!0!==e.match.optionalQuantifier&&(void 0==i.alternation||void 0!=e.locator[i.alternation]&&function(b,c,d){for(var e=!1,f=b.locator[c].toString().split(","),g=0;g<f.length;g++)if(-1!=a.inArray(f[g],d)){e=!0;break}return e}(e,i.alternation,j))));k++);return e}function u(a){return o().validPositions[a]?o().validPositions[a].match:w(a)[0].match}function v(a,b){for(var c=!1,d=w(a),e=0;e<d.length;e++)if(d[e].match&&d[e].match.def==b){c=!0;break}return c}function w(b,c,d){function e(c,d,g,i){function l(g,i,n){if(h>1e4)return alert("jquery.inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. "+o().mask),!0;if(h==b&&void 0==g.matches)return j.push({match:g,locator:i.reverse()}),!0;if(void 0!=g.matches){if(g.isGroup&&!0!==n){if(g=l(c.matches[m+1],i))return!0}else if(g.isOptional){var p=g;if(g=e(g,d,i,n)){var q=j[j.length-1].match,r=0==a.inArray(q,p.matches);r&&(k=!0),h=b}}else if(g.isAlternator){var s,t=g,u=[],v=j.slice(),w=i.length,x=d.length>0?d.shift():-1;if(-1==x||"string"==typeof x){var y,z=h,A=d.slice();"string"==typeof x&&(y=x.split(","));for(var B=0;B<t.matches.length;B++){j=[],g=l(t.matches[B],[B].concat(i),n)||g,s=j.slice(),h=z,j=[];for(var C=0;C<A.length;C++)d[C]=A[C];for(var D=0;D<s.length;D++)for(var E=s[D],F=0;F<u.length;F++){var G=u[F];if(E.match.mask==G.match.mask&&("string"!=typeof x||-1!=a.inArray(E.locator[w].toString(),y))){s.splice(D,1),G.locator[w]=G.locator[w]+","+E.locator[w],G.alternation=w;break}}u=u.concat(s)}"string"==typeof x&&(u=a.map(u,function(b,c){if(isFinite(c)){var d=b.locator[w].toString().split(",");b.locator[w]=void 0,b.alternation=void 0;for(var e=0;e<d.length;e++)-1!=a.inArray(d[e],y)&&(void 0!=b.locator[w]?(b.locator[w]+=",",b.alternation=w,b.locator[w]+=d[e]):b.locator[w]=parseInt(d[e]));if(void 0!=b.locator[w])return b}})),j=v.concat(u),k=!0}else g=l(t.matches[x],[x].concat(i),n);if(g)return!0}else if(g.isQuantifier&&!0!==n){var H=g;f.greedy=f.greedy&&isFinite(H.quantifier.max);for(var I=d.length>0&&!0!==n?d.shift():0;I<(isNaN(H.quantifier.max)?I+1:H.quantifier.max)&&b>=h;I++){var J=c.matches[a.inArray(H,c.matches)-1];if(g=l(J,[I].concat(i),!0)){var q=j[j.length-1].match;q.optionalQuantifier=I>H.quantifier.min-1;var r=0==a.inArray(q,J.matches);if(r){if(I>H.quantifier.min-1){k=!0,h=b;break}return!0}return!0}}}else if(g=e(g,d,i,n))return!0}else h++}for(var m=d.length>0?d.shift():0;m<c.matches.length;m++)if(!0!==c.matches[m].isQuantifier){var n=l(c.matches[m],[m].concat(g),i);if(n&&h==b)return n;if(h>b)break}}var g=o().maskToken,h=c?d:0,i=c||[0],j=[],k=!1;if(void 0==c){for(var l,m=b-1;void 0==(l=o().validPositions[m])&&m>-1;)m--;if(void 0!=l&&m>-1)h=m,i=l.locator.slice();else{for(m=b-1;void 0==(l=o().tests[m])&&m>-1;)m--;void 0!=l&&m>-1&&(h=m,i=l[0].locator.slice())}}for(var n=i.shift();n<g.length;n++){if(e(g[n],i,[n])&&h==b||h>b)break}
4
+ return(0==j.length||k)&&j.push({match:{fn:null,cardinality:0,optionality:!0,casing:null,def:""},locator:[]}),o().tests[b]=a.extend(!0,[],j),o().tests[b]}function x(){return void 0==o()._buffer&&(o()._buffer=h(!1,1)),o()._buffer}function y(){return void 0==o().buffer&&(o().buffer=h(!0,q(),!0)),o().buffer}function z(a,b){var c=y().slice();if(!0===a)p(),a=0,b=c.length;else for(var d=a;b>d;d++)delete o().validPositions[d],delete o().tests[d];for(var d=a;b>d;d++)c[d]!=f.skipOptionalPartCharacter&&B(d,c[d],!0,!0)}function A(a,b){switch(b.casing){case"upper":a=a.toUpperCase();break;case"lower":a=a.toLowerCase()}return a}function B(b,c,d,e){function g(b,c,d,e){var g=!1;return a.each(w(b),function(h,i){for(var j=i.match,k=c?1:0,l="",m=(y(),j.cardinality);m>k;m--)l+=G(b-(m-1));if(c&&(l+=c),!1!==(g=null!=j.fn?j.fn.test(l,o(),b,d,f):(c==j.def||c==f.skipOptionalPartCharacter)&&""!=j.def&&{c:j.def,pos:b})){var n=void 0!=g.c?g.c:c;n=n==f.skipOptionalPartCharacter&&null===j.fn?j.def:n;var t=b;if(void 0!=g.remove&&s(g.remove,g.remove+1),g.refreshFromBuffer){var u=g.refreshFromBuffer;if(d=!0,z(!0===u?u:u.start,u.end),void 0==g.pos&&void 0==g.c)return g.pos=q(),!1;if((t=void 0!=g.pos?g.pos:b)!=b)return g=a.extend(g,B(t,n,!0)),!1}else if(!0!==g&&void 0!=g.pos&&g.pos!=b&&(t=g.pos,z(b,t),t!=b))return g=a.extend(g,B(t,n,!0)),!1;return(1==g||void 0!=g.pos||void 0!=g.c)&&(h>0&&p(!0),r(t,a.extend({},i,{input:A(n,j)}),e)||(g=!1),!1)}}),g}d=!0===d;for(var h=y(),i=b-1;i>-1&&(!o().validPositions[i]||null!=o().validPositions[i].match.fn);i--)void 0==o().validPositions[i]&&(!C(i)||h[i]!=I(i))&&w(i).length>1&&g(i,h[i],!0);var j=b,k=!1;if(e&&j>=D()&&p(!0),j<D()&&(k=g(j,c,d,e),!d&&!1===k)){var l=o().validPositions[j];if(!l||null!=l.match.fn||l.match.def!=c&&c!=f.skipOptionalPartCharacter){if((f.insertMode||void 0==o().validPositions[E(j)])&&!C(j))for(var m=j+1,n=E(j);n>=m;m++)if(!1!==(k=g(m,c,d,e))){j=m;break}}else k={caret:E(j)}}return!1===k&&f.keepStatic&&R(h)&&(k=function(b,c,d,e){var g,h,i=a.extend(!0,{},o().validPositions);for(g=q();g>=0;g--)if(o().validPositions[g]&&void 0!=o().validPositions[g].alternation){h=o().validPositions[g].alternation;break}if(void 0!=h)for(var j in o().validPositions)if(parseInt(j)>parseInt(g)&&void 0===o().validPositions[j].alternation){for(var k=o().validPositions[j],l=k.locator[h],m=o().validPositions[g].locator[h].split(","),n=0;n<m.length;n++)if(l<m[n]){for(var r,s,t=j-1;t>=0;t--)if(void 0!=(r=o().validPositions[t])){s=r.locator[h],r.locator[h]=m[n];break}if(l!=r.locator[h]){for(var u=y().slice(),v=j;v<q()+1;v++)delete o().validPositions[v],delete o().tests[v];p(!0),f.keepStatic=!f.keepStatic;for(var v=j;v<u.length;v++)u[v]!=f.skipOptionalPartCharacter&&B(q()+1,u[v],!1,!0);r.locator[h]=s;var w=B(b,c,d,e);if(f.keepStatic=!f.keepStatic,w)return w;p(),o().validPositions=a.extend(!0,{},i)}}break}return!1}(b,c,d,e)),!0===k&&(k={pos:j}),k}function C(a){var b=u(a);return null!=b.fn&&b.fn}function D(){var a;if(ea=da.prop("maxLength"),-1==ea&&(ea=void 0),0==f.greedy){var b,c=q(),d=o().validPositions[c],e=void 0!=d?d.locator.slice():void 0;for(b=c+1;void 0==d||null!=d.match.fn||null==d.match.fn&&""!=d.match.def;b++)d=t(b,e,b-1),e=d.locator.slice();a=b}else a=y().length;return void 0==ea||ea>a?a:ea}function E(a){var b=D();if(a>=b)return b;for(var c=a;++c<b&&!C(c)&&(!0!==f.nojumps||f.nojumpsThreshold>c););return c}function F(a){var b=a;if(0>=b)return 0;for(;--b>0&&!C(b););return b}function G(a){return void 0==o().validPositions[a]?I(a):o().validPositions[a].input}function H(a,b,c){a._valueSet(b.join("")),void 0!=c&&O(a,c)}function I(b,c){c=c||u(b);var d=a.isFunction(c.placeholder)?c.placeholder.call(this,f):c.placeholder;return void 0!=d?d:null==c.fn?c.def:f.placeholder.charAt(b%f.placeholder.length)}function J(b,c,d,e,g){var h=void 0!=e?e.slice():L(b._valueGet()).split("");if(p(),c&&b._valueSet(""),a.each(h,function(c,e){if(!0===g){var f=q(),h=-1==f?c:E(f);-1==a.inArray(e,x().slice(f+1,h))&&Y.call(b,void 0,!0,e.charCodeAt(0),!1,d,d?c:o().p)}else Y.call(b,void 0,!0,e.charCodeAt(0),!1,d,d?c:o().p),d=d||c>0&&c>o().p}),c){var i=f.onKeyPress.call(this,void 0,y(),0,f);W(b,i),H(b,y(),a(b).is(":focus")?E(q(0)):void 0)}}function K(b){return a.inputmask.escapeRegex.call(this,b)}function L(a){return a.replace(new RegExp("("+K(x().join(""))+")*$"),"")}function M(b){if(b.data("_inputmask")&&!b.hasClass("hasDatepicker")){var c=[],d=o().validPositions;for(var e in d)d[e].match&&null!=d[e].match.fn&&c.push(d[e].input);var g=(fa?c.reverse():c).join(""),h=(fa?y().slice().reverse():y()).join("");return a.isFunction(f.onUnMask)&&(g=f.onUnMask.call(b,h,g,f)||g),g}return b[0]._valueGet()}function N(a){if(fa&&"number"==typeof a&&(!f.greedy||""!=f.placeholder)){a=y().length-a}return a}function O(b,c,d){var e,g=b.jquery&&b.length>0?b[0]:b;if("number"!=typeof c){var h=a(g).data("_inputmask");return!a(g).is(":visible")&&h&&void 0!=h.caret?(c=h.caret.begin,d=h.caret.end):g.setSelectionRange?(c=g.selectionStart,d=g.selectionEnd):document.selection&&document.selection.createRange&&(e=document.selection.createRange(),c=0-e.duplicate().moveStart("character",-1e5),d=c+e.text.length),c=N(c),d=N(d),{begin:c,end:d}}c=N(c),d=N(d),d="number"==typeof d?d:c;var h=a(g).data("_inputmask")||{};h.caret={begin:c,end:d},a(g).data("_inputmask",h),a(g).is(":visible")&&(g.scrollLeft=g.scrollWidth,0==f.insertMode&&c==d&&d++,g.setSelectionRange?(g.selectionStart=c,g.selectionEnd=d):g.createTextRange&&(e=g.createTextRange(),e.collapse(!0),e.moveEnd("character",d),e.moveStart("character",c),e.select()))}function P(b){var c,d,e=y(),f=e.length,g=q(),h={},i=o().validPositions[g],j=void 0!=i?i.locator.slice():void 0;for(c=g+1;c<e.length;c++)d=t(c,j,c-1),j=d.locator.slice(),h[c]=a.extend(!0,{},d);var k=i&&void 0!=i.alternation?i.locator[i.alternation].split(","):[];for(c=f-1;c>g&&(d=h[c].match,(d.optionality||d.optionalQuantifier||i&&void 0!=i.alternation&&void 0!=h[c].locator[i.alternation]&&-1!=a.inArray(h[c].locator[i.alternation].toString(),k))&&e[c]==I(c,d));c--)f--;return b?{l:f,def:h[f]?h[f].match:void 0}:f}function Q(a){for(var b=y(),c=b.slice(),d=P(),e=c.length-1;e>d&&!C(e);e--);c.splice(d,e+1-d),H(a,c)}function R(b){if(a.isFunction(f.isComplete))return f.isComplete.call(da,b,f);if("*"!=f.repeat){var c=!1,d=P(!0),e=F(d.l);if(q()==e&&(void 0==d.def||d.def.newBlockMarker||d.def.optionalQuantifier)){c=!0;for(var g=0;e>=g;g++){var h=C(g);if(h&&(void 0==b[g]||b[g]==I(g))||!h&&b[g]!=I(g)){c=!1;break}}}return c}}function S(a,b){return fa?a-b>1||a-b==1&&f.insertMode:b-a>1||b-a==1&&f.insertMode}function T(b){var c=a._data(b).events;a.each(c,function(b,c){a.each(c,function(a,b){if("inputmask"==b.namespace&&"setvalue"!=b.type){var c=b.handler;b.handler=function(a){return this.readOnly||this.disabled?void a.preventDefault:c.apply(this,arguments)}}})})}function U(b){function c(){var b=a(this),c=a(this).data("_inputmask");return c?c.opts.autoUnmask?b.inputmask("unmaskedvalue"):e.call(this)!=x().join("")?e.call(this):"":e.call(this)}function d(b){var c=a(this).data("_inputmask");c?(f.call(this,a.isFunction(c.opts.onBeforeMask)?c.opts.onBeforeMask.call(na,b,c.opts)||b:b),a(this).triggerHandler("setvalue.inputmask")):f.call(this,b)}var e,f;b._valueGet||(Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(b,"value"),document.__lookupGetter__&&b.__lookupGetter__("value")?(e=b.__lookupGetter__("value"),f=b.__lookupSetter__("value"),b.__defineGetter__("value",c),b.__defineSetter__("value",d)):(e=function(){return b.value},f=function(a){b.value=a},function(b){if(void 0==a.valHooks[b]||1!=a.valHooks[b].inputmaskpatch){var c=a.valHooks[b]&&a.valHooks[b].get?a.valHooks[b].get:function(a){return a.value},d=a.valHooks[b]&&a.valHooks[b].set?a.valHooks[b].set:function(a,b){return a.value=b,a};a.valHooks[b]={get:function(b){var d=a(b);if(d.data("_inputmask")){if(d.data("_inputmask").opts.autoUnmask)return d.inputmask("unmaskedvalue");var e=c(b),f=d.data("_inputmask"),g=f.maskset,h=g._buffer;return h=h?h.join(""):"",e!=h?e:""}return c(b)},set:function(b,c){var e,f=a(b),g=f.data("_inputmask");return g?(e=d(b,a.isFunction(g.opts.onBeforeMask)?g.opts.onBeforeMask.call(na,c,g.opts)||c:c),f.triggerHandler("setvalue.inputmask")):e=d(b,c),e},inputmaskpatch:!0}}}(b.type),function(b){a(b).bind("mouseenter.inputmask",function(){var b=a(this),c=this,d=c._valueGet();""!=d&&d!=y().join("")&&b.trigger("setvalue")});var c=a._data(b).events,d=c.mouseover;if(d){for(var e=d[d.length-1],f=d.length-1;f>0;f--)d[f]=d[f-1];d[0]=e}}(b)),b._valueGet=function(){return fa?e.call(this).split("").reverse().join(""):e.call(this)},b._valueSet=function(a){f.call(this,fa?a.split("").reverse().join(""):a)})}function V(b,c,d){if((f.numericInput||fa)&&(c==a.inputmask.keyCode.BACKSPACE?c=a.inputmask.keyCode.DELETE:c==a.inputmask.keyCode.DELETE&&(c=a.inputmask.keyCode.BACKSPACE),fa)){var e=d.end;d.end=d.begin,d.begin=e}c==a.inputmask.keyCode.BACKSPACE&&d.end-d.begin<=1?d.begin=F(d.begin):c==a.inputmask.keyCode.DELETE&&d.begin==d.end&&d.end++,s(d.begin,d.end),function(){if(f.keepStatic){p(!0);var a,c=[];for(a=q();a>=0;a--)if(o().validPositions[a]){if(void 0!=o().validPositions[a].alternation)break;c.push(o().validPositions[a].input),delete o().validPositions[a]}if(a>0)for(;c.length>0;)o().p=E(q()),Y.call(b,void 0,!0,c.pop().charCodeAt(0),!1,!1,o().p)}}();var g=q(d.begin);g<d.begin?(-1==g&&p(),o().p=E(g)):o().p=d.begin}function W(a,b,c){if(b&&b.refreshFromBuffer){var d=b.refreshFromBuffer;z(!0===d?d:d.start,d.end),p(!0),void 0!=c&&(H(a,y()),O(a,b.caret||c.begin,b.caret||c.end))}}function X(c){ga=!1;var d=this,e=a(d),g=c.keyCode,h=O(d);g==a.inputmask.keyCode.BACKSPACE||g==a.inputmask.keyCode.DELETE||i&&127==g||c.ctrlKey&&88==g&&!b("cut")?(c.preventDefault(),88==g&&(ca=y().join("")),V(d,g,h),H(d,y(),o().p),d._valueGet()==x().join("")&&e.trigger("cleared"),f.showTooltip&&e.prop("title",o().mask)):g==a.inputmask.keyCode.END||g==a.inputmask.keyCode.PAGE_DOWN?setTimeout(function(){var a=E(q());f.insertMode||a!=D()||c.shiftKey||a--,O(d,c.shiftKey?h.begin:a,a)},0):g==a.inputmask.keyCode.HOME&&!c.shiftKey||g==a.inputmask.keyCode.PAGE_UP?O(d,0,c.shiftKey?h.begin:0):g==a.inputmask.keyCode.ESCAPE||90==g&&c.ctrlKey?(J(d,!0,!1,ca.split("")),e.click()):g!=a.inputmask.keyCode.INSERT||c.shiftKey||c.ctrlKey?0!=f.insertMode||c.shiftKey||(g==a.inputmask.keyCode.RIGHT?setTimeout(function(){var a=O(d);O(d,a.begin)},0):g==a.inputmask.keyCode.LEFT&&setTimeout(function(){var a=O(d);O(d,fa?a.begin+1:a.begin-1)},0)):(f.insertMode=!f.insertMode,O(d,f.insertMode||h.begin!=D()?h.begin:h.begin-1));var j=O(d),k=f.onKeyDown.call(this,c,y(),j.begin,f);W(d,k,j),ia=-1!=a.inArray(g,f.ignorables)}function Y(b,c,d,e,g,h){if(void 0==d&&ga)return!1;ga=!0;var i=this,j=a(i);b=b||window.event;var d=c?d:b.which||b.charCode||b.keyCode;if(!(!0===c||b.ctrlKey&&b.altKey)&&(b.ctrlKey||b.metaKey||ia))return!0;if(d){!0!==c&&46==d&&0==b.shiftKey&&","==f.radixPoint&&(d=44);var k,l=c?{begin:h,end:h}:O(i),m=String.fromCharCode(d),n=S(l.begin,l.end);n&&(o().undoPositions=a.extend(!0,{},o().validPositions),V(i,a.inputmask.keyCode.DELETE,l),f.insertMode||(f.insertMode=!f.insertMode,r(l.begin,g),f.insertMode=!f.insertMode),n=!f.multi),o().writeOutBuffer=!0;var q=fa&&!n?l.end:l.begin,s=B(q,m,g);if(!1!==s){if(!0!==s&&(q=void 0!=s.pos?s.pos:q,m=void 0!=s.c?s.c:m),p(!0),void 0!=s.caret)k=s.caret;else{var t=o().validPositions;k=!f.keepStatic&&(void 0!=t[q+1]&&w(q+1,t[q].locator.slice(),q).length>1||void 0!=t[q].alternation)?q+1:E(q)}o().p=k}if(!1!==e){var u=this;if(setTimeout(function(){f.onKeyValidation.call(u,s,f)},0),o().writeOutBuffer&&!1!==s){var v=y();H(i,v,c?void 0:f.numericInput?F(k):k),!0!==c&&setTimeout(function(){!0===R(v)&&j.trigger("complete"),ha=!0,j.trigger("input")},0)}else n&&(o().buffer=void 0,o().validPositions=o().undoPositions)}else n&&(o().buffer=void 0,o().validPositions=o().undoPositions);if(f.showTooltip&&j.prop("title",o().mask),b&&1!=c){b.preventDefault();var x=O(i);W(i,f.onKeyPress.call(this,b,y(),x.begin,f),x)}}}function Z(b){var c=a(this),d=this,e=b.keyCode,g=y(),h=O(d);W(d,f.onKeyUp.call(this,b,g,h.begin,f),h),e==a.inputmask.keyCode.TAB&&f.showMaskOnFocus&&(c.hasClass("focus-inputmask")&&0==d._valueGet().length?(p(),g=y(),H(d,g),O(d,0),ca=y().join("")):(H(d,g),O(d,N(0),N(D()))))}function $(b){if(!0===ha&&"input"==b.type)return ha=!1,!0;var c=this,d=a(c),e=c._valueGet(),g=O(c);if("propertychange"==b.type&&c._valueGet().length<=D())return!0;"paste"==b.type&&(window.clipboardData&&window.clipboardData.getData?e=e.substr(0,g.begin)+window.clipboardData.getData("Text")+e.substr(g.end,e.length):b.originalEvent&&b.originalEvent.clipboardData&&b.originalEvent.clipboardData.getData&&(e=e.substr(0,g.begin)+b.originalEvent.clipboardData.getData("text/plain")+e.substr(g.end,e.length)));var h=a.isFunction(f.onBeforePaste)?f.onBeforePaste.call(c,e,f)||e:e;return J(c,!0,!1,fa?h.split("").reverse():h.split(""),!0),d.click(),!0===R(y())&&d.trigger("complete"),!1}function _(b){if(!0===ha&&"input"==b.type)return ha=!1,!0;var c=this,d=O(c),e=c._valueGet();e=e.replace(new RegExp("("+K(x().join(""))+")*"),""),d.begin>e.length&&(O(c,e.length),d=O(c)),y().length-e.length!=1||e.charAt(d.begin)==y()[d.begin]||e.charAt(d.begin+1)==y()[d.begin]||C(d.begin)||(b.keyCode=a.inputmask.keyCode.BACKSPACE,X.call(c,b)),b.preventDefault()}function aa(b){if(!0===ha&&"input"==b.type)return ha=!1,!0;var c=this,d=O(c),e=c._valueGet();O(c,d.begin-1);var g=a.Event("keypress");g.which=e.charCodeAt(d.begin-1),ga=!1,ia=!1,Y.call(c,g,void 0,void 0,!1);var h=o().p;H(c,y(),f.numericInput?F(h):h),b.preventDefault()}function ba(b){ha=!0;var c=this;return setTimeout(function(){O(c,O(c).begin-1);var d=a.Event("keypress");d.which=b.originalEvent.data.charCodeAt(0),ga=!1,ia=!1,Y.call(c,d,void 0,void 0,!1);var e=o().p;H(c,y(),f.numericInput?F(e):e)},0),!1}var ca,da,ea,fa=!1,ga=!1,ha=!1,ia=!1;if(void 0!=d)switch(d.action){case"isComplete":return da=a(d.el),e=da.data("_inputmask").maskset,f=da.data("_inputmask").opts,R(d.buffer);case"unmaskedvalue":return da=d.$input,e=da.data("_inputmask").maskset,f=da.data("_inputmask").opts,fa=d.$input.data("_inputmask").isRTL,M(d.$input);case"mask":ca=y().join(""),function(b){if(da=a(b),da.is(":input")&&c(da.attr("type"))){if(da.data("_inputmask",{maskset:e,opts:f,isRTL:!1}),f.showTooltip&&da.prop("title",o().mask),("rtl"==b.dir||f.rightAlign)&&da.css("text-align","right"),"rtl"==b.dir||f.numericInput){b.dir="ltr",da.removeAttr("dir");var d=da.data("_inputmask");d.isRTL=!0,da.data("_inputmask",d),fa=!0}da.unbind(".inputmask"),da.removeClass("focus-inputmask"),da.closest("form").bind("submit",function(){ca!=y().join("")&&da.change(),da[0]._valueGet&&da[0]._valueGet()==x().join("")&&da[0]._valueSet(""),f.autoUnmask&&f.removeMaskOnSubmit&&da.inputmask("remove")}).bind("reset",function(){setTimeout(function(){da.trigger("setvalue")},0)}),da.bind("mouseenter.inputmask",function(){var b=a(this),c=this;!b.hasClass("focus-inputmask")&&f.showMaskOnHover&&c._valueGet()!=y().join("")&&H(c,y())}).bind("blur.inputmask",function(){var b=a(this),c=this;if(b.data("_inputmask")){var d=c._valueGet(),e=y();b.removeClass("focus-inputmask"),ca!=y().join("")&&b.change(),f.clearMaskOnLostFocus&&""!=d&&(d==x().join("")?c._valueSet(""):Q(c)),!1===R(e)&&(b.trigger("incomplete"),f.clearIncomplete&&(p(),f.clearMaskOnLostFocus?c._valueSet(""):(e=x().slice(),H(c,e))))}}).bind("focus.inputmask",function(){var b=a(this),c=this,d=c._valueGet();f.showMaskOnFocus&&!b.hasClass("focus-inputmask")&&(!f.showMaskOnHover||f.showMaskOnHover&&""==d)&&c._valueGet()!=y().join("")&&H(c,y(),E(q())),b.addClass("focus-inputmask"),ca=y().join("")}).bind("mouseleave.inputmask",function(){var b=a(this),c=this;f.clearMaskOnLostFocus&&(b.hasClass("focus-inputmask")||c._valueGet()==b.attr("placeholder")||(c._valueGet()==x().join("")||""==c._valueGet()?c._valueSet(""):Q(c)))}).bind("click.inputmask",function(){var b=this;a(b).is(":focus")&&setTimeout(function(){var c=O(b);if(c.begin==c.end)if(f.radixFocus&&""!=f.radixPoint&&-1!=a.inArray(f.radixPoint,y())&&y().join("")==x().join(""))O(b,a.inArray(f.radixPoint,y()));else{var d=fa?N(c.begin):c.begin,e=E(q(d));e>d?O(b,C(d)?d:E(d)):O(b,e)}},0)}).bind("dblclick.inputmask",function(){var a=this;setTimeout(function(){O(a,0,E(q()))},0)}).bind(n+".inputmask dragdrop.inputmask drop.inputmask",$).bind("setvalue.inputmask",function(){var a=this;J(a,!0,!1,void 0,!0),ca=y().join(""),(f.clearMaskOnLostFocus||f.clearIncomplete)&&a._valueGet()==x().join("")&&a._valueSet("")}).bind("cut.inputmask",function(b){ha=!0;var c=this,d=a(c),e=O(c);V(c,a.inputmask.keyCode.DELETE,e),W(c,f.onKeyPress.call(this,b,y(),o().p,f),{begin:o().p,end:o().p}),c._valueGet()==x().join("")&&d.trigger("cleared"),f.showTooltip&&d.prop("title",o().mask)}).bind("complete.inputmask",f.oncomplete).bind("incomplete.inputmask",f.onincomplete).bind("cleared.inputmask",f.oncleared),da.bind("keydown.inputmask",X).bind("keypress.inputmask",Y).bind("keyup.inputmask",Z).bind("compositionupdate.inputmask",ba),"paste"!==n||g||da.bind("input.inputmask",aa),g&&da.bind("input.inputmask",$),(j||l||k||m)&&("input"==n&&da.unbind(n+".inputmask"),da.bind("input.inputmask",_)),U(b);J(b,!0,!1,(a.isFunction(f.onBeforeMask)?f.onBeforeMask.call(b,b._valueGet(),f)||b._valueGet():b._valueGet()).split(""),!0),ca=y().join("");var h;try{h=document.activeElement}catch(a){}!1===R(y())&&f.clearIncomplete&&p(),f.clearMaskOnLostFocus?y().join("")==x().join("")?b._valueSet(""):Q(b):H(b,y()),h===b&&(da.addClass("focus-inputmask"),O(b,E(q()))),T(b)}}(d.el);break;case"format":da=a({}),da.data("_inputmask",{maskset:e,opts:f,isRTL:f.numericInput}),f.numericInput&&(fa=!0);var ja=(a.isFunction(f.onBeforeMask)?f.onBeforeMask.call(da,d.value,f)||d.value:d.value).split("");return J(da,!1,!1,fa?ja.reverse():ja,!0),f.onKeyPress.call(this,void 0,y(),0,f),d.metadata?{value:fa?y().slice().reverse().join(""):y().join(""),metadata:da.inputmask("getmetadata")}:fa?y().slice().reverse().join(""):y().join("");case"isValid":da=a({}),da.data("_inputmask",{maskset:e,opts:f,isRTL:f.numericInput}),f.numericInput&&(fa=!0);var ja=d.value.split("");J(da,!1,!0,fa?ja.reverse():ja);for(var ka=y(),la=P(),ma=ka.length-1;ma>la&&!C(ma);ma--);return ka.splice(la,ma+1-la),R(ka)&&d.value==ka.join("");case"getemptymask":return da=a(d.el),e=da.data("_inputmask").maskset,f=da.data("_inputmask").opts,x();case"remove":var na=d.el;da=a(na),e=da.data("_inputmask").maskset,f=da.data("_inputmask").opts,na._valueSet(M(da)),da.unbind(".inputmask"),da.removeClass("focus-inputmask"),da.removeData("_inputmask");var oa;Object.getOwnPropertyDescriptor&&(oa=Object.getOwnPropertyDescriptor(na,"value")),oa&&oa.get?na._valueGet&&Object.defineProperty(na,"value",{get:na._valueGet,set:na._valueSet}):document.__lookupGetter__&&na.__lookupGetter__("value")&&na._valueGet&&(na.__defineGetter__("value",na._valueGet),na.__defineSetter__("value",na._valueSet));try{delete na._valueGet,delete na._valueSet}catch(a){na._valueGet=void 0,na._valueSet=void 0}break;case"getmetadata":if(da=a(d.el),e=da.data("_inputmask").maskset,f=da.data("_inputmask").opts,a.isArray(e.metadata)){for(var pa,qa=q(),ra=qa;ra>=0;ra--)if(o().validPositions[ra]&&void 0!=o().validPositions[ra].alternation){pa=o().validPositions[ra].alternation;break}return void 0!=pa?e.metadata[o().validPositions[qa].locator[pa]]:e.metadata[0]}return e.metadata}}if(void 0===a.fn.inputmask){var g="function"==typeof ScriptEngineMajorVersion?ScriptEngineMajorVersion():new Function("/*@cc_on return @_jscript_version; @*/")()>=10,h=navigator.userAgent,i=null!==h.match(new RegExp("iphone","i")),j=null!==h.match(new RegExp("android.*safari.*","i")),k=null!==h.match(new RegExp("android.*chrome.*","i")),l=null!==h.match(new RegExp("android.*firefox.*","i")),m=/Kindle/i.test(h)||/Silk/i.test(h)||/KFTT/i.test(h)||/KFOT/i.test(h)||/KFJWA/i.test(h)||/KFJWI/i.test(h)||/KFSOWI/i.test(h)||/KFTHWA/i.test(h)||/KFTHWI/i.test(h)||/KFAPWA/i.test(h)||/KFAPWI/i.test(h),n=b("paste")?"paste":b("input")?"input":"propertychange";a.inputmask={defaults:{placeholder:"_",optionalmarker:{start:"[",end:"]"},quantifiermarker:{start:"{",end:"}"},groupmarker:{start:"(",end:")"},alternatormarker:"|",escapeChar:"\\",mask:null,oncomplete:a.noop,onincomplete:a.noop,oncleared:a.noop,repeat:0,greedy:!0,autoUnmask:!1,removeMaskOnSubmit:!0,clearMaskOnLostFocus:!0,insertMode:!0,clearIncomplete:!1,aliases:{},alias:null,onKeyUp:a.noop,onKeyPress:a.noop,onKeyDown:a.noop,onBeforeMask:void 0,onBeforePaste:void 0,onUnMask:void 0,showMaskOnFocus:!0,showMaskOnHover:!0,onKeyValidation:a.noop,skipOptionalPartCharacter:" ",showTooltip:!1,numericInput:!1,rightAlign:!1,radixPoint:"",radixFocus:!1,nojumps:!1,nojumpsThreshold:0,keepStatic:void 0,definitions:{9:{validator:"[0-9]",cardinality:1,definitionSymbol:"*"},a:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",cardinality:1,definitionSymbol:"*"},"*":{validator:"[0-9A-Za-zА-яЁёÀ-ÿµ]",cardinality:1}},ignorables:[8,9,13,19,27,33,34,35,36,37,38,39,40,45,46,93,112,113,114,115,116,117,118,119,120,121,122,123],isComplete:void 0},keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91},masksCache:{},escapeRegex:function(a){var b=["/",".","*","+","?","|","(",")","[","]","{","}","\\"];return a.replace(new RegExp("(\\"+b.join("|\\")+")","gim"),"\\$1")},format:function(b,c,g){var h=a.extend(!0,{},a.inputmask.defaults,c);return d(h.alias,c,h),f({action:"format",value:b,metadata:g},e(h),h)},isValid:function(b,c){var g=a.extend(!0,{},a.inputmask.defaults,c);return d(g.alias,c,g),f({action:"isValid",value:b},e(g),g)}},a.fn.inputmask=function(b,c,g,h,i){function j(b,c,e){var f=a(b);f.data("inputmask-alias")&&d(f.data("inputmask-alias"),{},c);for(var g in c){var h=f.data("inputmask-"+g.toLowerCase());void 0!=h&&("mask"==g&&0==h.indexOf("[")?(c[g]=h.replace(/[\s[\]]/g,"").split("','"),c[g][0]=c[g][0].replace("'",""),c[g][c[g].length-1]=c[g][c[g].length-1].replace("'","")):c[g]="boolean"==typeof h?h:h.toString(),e&&(e[g]=c[g]))}return c}g=g||f,h=h||"_inputmask";var k,l=a.extend(!0,{},a.inputmask.defaults,c);if("string"==typeof b)switch(b){case"mask":return d(l.alias,c,l),k=e(l,g!==f),void 0==k?this:this.each(function(){g({action:"mask",el:this},a.extend(!0,{},k),j(this,l))});case"unmaskedvalue":var m=a(this);return m.data(h)?g({action:"unmaskedvalue",$input:m}):m.val();case"remove":return this.each(function(){a(this).data(h)&&g({action:"remove",el:this})});case"getemptymask":return this.data(h)?g({action:"getemptymask",el:this}):"";case"hasMaskedValue":return!!this.data(h)&&!this.data(h).opts.autoUnmask;case"isComplete":return!this.data(h)||g({action:"isComplete",buffer:this[0]._valueGet().split(""),el:this});case"getmetadata":return this.data(h)?g({action:"getmetadata",el:this}):void 0;case"_detectScope":return d(l.alias,c,l),void 0==i||d(i,c,l)||-1!=a.inArray(i,["mask","unmaskedvalue","remove","getemptymask","hasMaskedValue","isComplete","getmetadata","_detectScope"])||(l.mask=i),a.isFunction(l.mask)&&(l.mask=l.mask.call(this,l)),a.isArray(l.mask);default:return d(l.alias,c,l),d(b,c,l)||(l.mask=b),k=e(l,g!==f),void 0==k?this:this.each(function(){g({action:"mask",el:this},a.extend(!0,{},k),j(this,l))})}else{if("object"==typeof b)return l=a.extend(!0,{},a.inputmask.defaults,b),d(l.alias,b,l),k=e(l,g!==f),void 0==k?this:this.each(function(){g({action:"mask",el:this},a.extend(!0,{},k),j(this,l))});if(void 0==b)return this.each(function(){var b=a(this).attr("data-inputmask");if(b&&""!=b)try{b=b.replace(new RegExp("'","g"),'"');var e=a.parseJSON("{"+b+"}");a.extend(!0,e,c),l=a.extend(!0,{},a.inputmask.defaults,e),l=j(this,l),d(l.alias,e,l),l.alias=void 0,a(this).inputmask("mask",l,g)}catch(a){}if(a(this).attr("data-inputmask-mask")||a(this).attr("data-inputmask-alias")){l=a.extend(!0,{},a.inputmask.defaults,{});var f={};l=j(this,l,f),d(l.alias,f,l),l.alias=void 0,a(this).inputmask("mask",l,g)}})}}}a.fn.inputmask}(jQuery),function(a){a.extend(a.inputmask.defaults.definitions,{h:{validator:"[01][0-9]|2[0-3]",cardinality:2,prevalidator:[{validator:"[0-2]",cardinality:1}]},s:{validator:"[0-5][0-9]",cardinality:2,prevalidator:[{validator:"[0-5]",cardinality:1}]},d:{validator:"0[1-9]|[12][0-9]|3[01]",cardinality:2,prevalidator:[{validator:"[0-3]",cardinality:1}]},m:{validator:"0[1-9]|1[012]",cardinality:2,prevalidator:[{validator:"[01]",cardinality:1}]},y:{validator:"(19|20)\\d{2}",cardinality:4,prevalidator:[{validator:"[12]",cardinality:1},{validator:"(19|20)",cardinality:2},{validator:"(19|20)\\d",cardinality:3}]}}),a.extend(a.inputmask.defaults.aliases,{"dd/mm/yyyy":{mask:"1/2/y",placeholder:"dd/mm/yyyy",regex:{val1pre:new RegExp("[0-3]"),val1:new RegExp("0[1-9]|[12][0-9]|3[01]"),val2pre:function(b){var c=a.inputmask.escapeRegex.call(this,b);return new RegExp("((0[1-9]|[12][0-9]|3[01])"+c+"[01])")},val2:function(b){var c=a.inputmask.escapeRegex.call(this,b);return new RegExp("((0[1-9]|[12][0-9])"+c+"(0[1-9]|1[012]))|(30"+c+"(0[13-9]|1[012]))|(31"+c+"(0[13578]|1[02]))")}},leapday:"29/02/",separator:"/",yearrange:{minyear:1900,maxyear:2099},isInYearRange:function(a,b,c){if(isNaN(a))return!1;var d=parseInt(a.concat(b.toString().slice(a.length))),e=parseInt(a.concat(c.toString().slice(a.length)));return!isNaN(d)&&d>=b&&c>=d||!isNaN(e)&&e>=b&&c>=e},determinebaseyear:function(a,b,c){var d=(new Date).getFullYear();if(a>d)return a;if(d>b){for(var e=b.toString().slice(0,2),f=b.toString().slice(2,4);e+c>b;)e--;var g=e+f;return a>g?a:g}return d},onKeyUp:function(b){var c=a(this);if(b.ctrlKey&&b.keyCode==a.inputmask.keyCode.RIGHT){var d=new Date;c.val(d.getDate().toString()+(d.getMonth()+1).toString()+d.getFullYear().toString())}},definitions:{1:{validator:function(a,b,c,d,e){var f=e.regex.val1.test(a);return d||f||a.charAt(1)!=e.separator&&-1=="-./".indexOf(a.charAt(1))||!(f=e.regex.val1.test("0"+a.charAt(0)))?f:(b.buffer[c-1]="0",{refreshFromBuffer:{start:c-1,end:c},pos:c,c:a.charAt(0)})},cardinality:2,prevalidator:[{validator:function(a,b,c,d,e){isNaN(b.buffer[c+1])||(a+=b.buffer[c+1]);var f=1==a.length?e.regex.val1pre.test(a):e.regex.val1.test(a);return d||f||!(f=e.regex.val1.test("0"+a))?f:(b.buffer[c]="0",c++,{pos:c})},cardinality:1}]},2:{validator:function(a,b,c,d,e){var f=e.mask.indexOf("2")==e.mask.length-1?b.buffer.join("").substr(5,3):b.buffer.join("").substr(0,3);-1!=f.indexOf(e.placeholder[0])&&(f="01"+e.separator);var g=e.regex.val2(e.separator).test(f+a);if(!d&&!g&&(a.charAt(1)==e.separator||-1!="-./".indexOf(a.charAt(1)))&&(g=e.regex.val2(e.separator).test(f+"0"+a.charAt(0))))return b.buffer[c-1]="0",{refreshFromBuffer:{start:c-1,end:c},pos:c,c:a.charAt(0)};if(e.mask.indexOf("2")==e.mask.length-1&&g){if(b.buffer.join("").substr(4,4)+a!=e.leapday)return!0;var h=parseInt(b.buffer.join("").substr(0,4),10);return h%4==0&&(h%100!=0||h%400==0)}return g},cardinality:2,prevalidator:[{validator:function(a,b,c,d,e){isNaN(b.buffer[c+1])||(a+=b.buffer[c+1]);var f=e.mask.indexOf("2")==e.mask.length-1?b.buffer.join("").substr(5,3):b.buffer.join("").substr(0,3);-1!=f.indexOf(e.placeholder[0])&&(f="01"+e.separator);var g=1==a.length?e.regex.val2pre(e.separator).test(f+a):e.regex.val2(e.separator).test(f+a);return d||g||!(g=e.regex.val2(e.separator).test(f+"0"+a))?g:(b.buffer[c]="0",c++,{pos:c})},cardinality:1}]},y:{validator:function(a,b,c,d,e){if(e.isInYearRange(a,e.yearrange.minyear,e.yearrange.maxyear)){if(b.buffer.join("").substr(0,6)!=e.leapday)return!0;var f=parseInt(a,10);return f%4==0&&(f%100!=0||f%400==0)}return!1},cardinality:4,prevalidator:[{validator:function(a,b,c,d,e){var f=e.isInYearRange(a,e.yearrange.minyear,e.yearrange.maxyear);if(!d&&!f){var g=e.determinebaseyear(e.yearrange.minyear,e.yearrange.maxyear,a+"0").toString().slice(0,1);if(f=e.isInYearRange(g+a,e.yearrange.minyear,e.yearrange.maxyear))return b.buffer[c++]=g.charAt(0),{pos:c};if(g=e.determinebaseyear(e.yearrange.minyear,e.yearrange.maxyear,a+"0").toString().slice(0,2),f=e.isInYearRange(g+a,e.yearrange.minyear,e.yearrange.maxyear))return b.buffer[c++]=g.charAt(0),b.buffer[c++]=g.charAt(1),{pos:c}}return f},cardinality:1},{validator:function(a,b,c,d,e){var f=e.isInYearRange(a,e.yearrange.minyear,e.yearrange.maxyear);if(!d&&!f){var g=e.determinebaseyear(e.yearrange.minyear,e.yearrange.maxyear,a).toString().slice(0,2);if(f=e.isInYearRange(a[0]+g[1]+a[1],e.yearrange.minyear,e.yearrange.maxyear))return b.buffer[c++]=g.charAt(1),{pos:c};if(g=e.determinebaseyear(e.yearrange.minyear,e.yearrange.maxyear,a).toString().slice(0,2),e.isInYearRange(g+a,e.yearrange.minyear,e.yearrange.maxyear)){if(b.buffer.join("").substr(0,6)!=e.leapday)f=!0;else{var h=parseInt(a,10);f=h%4==0&&(h%100!=0||h%400==0)}}else f=!1;if(f)return b.buffer[c-1]=g.charAt(0),b.buffer[c++]=g.charAt(1),b.buffer[c++]=a.charAt(0),{refreshFromBuffer:{start:c-3,end:c},pos:c}}return f},cardinality:2},{validator:function(a,b,c,d,e){return e.isInYearRange(a,e.yearrange.minyear,e.yearrange.maxyear)},cardinality:3}]}},insertMode:!1,autoUnmask:!1},"mm/dd/yyyy":{placeholder:"mm/dd/yyyy",alias:"dd/mm/yyyy",regex:{val2pre:function(b){var c=a.inputmask.escapeRegex.call(this,b);return new RegExp("((0[13-9]|1[012])"+c+"[0-3])|(02"+c+"[0-2])")},val2:function(b){var c=a.inputmask.escapeRegex.call(this,b);return new RegExp("((0[1-9]|1[012])"+c+"(0[1-9]|[12][0-9]))|((0[13-9]|1[012])"+c+"30)|((0[13578]|1[02])"+c+"31)")},val1pre:new RegExp("[01]"),val1:new RegExp("0[1-9]|1[012]")},leapday:"02/29/",onKeyUp:function(b){var c=a(this);if(b.ctrlKey&&b.keyCode==a.inputmask.keyCode.RIGHT){var d=new Date;c.val((d.getMonth()+1).toString()+d.getDate().toString()+d.getFullYear().toString())}}},"yyyy/mm/dd":{mask:"y/1/2",placeholder:"yyyy/mm/dd",alias:"mm/dd/yyyy",leapday:"/02/29",onKeyUp:function(b){var c=a(this);if(b.ctrlKey&&b.keyCode==a.inputmask.keyCode.RIGHT){var d=new Date;c.val(d.getFullYear().toString()+(d.getMonth()+1).toString()+d.getDate().toString())}}},"dd.mm.yyyy":{mask:"1.2.y",placeholder:"dd.mm.yyyy",leapday:"29.02.",separator:".",alias:"dd/mm/yyyy"},"dd-mm-yyyy":{mask:"1-2-y",placeholder:"dd-mm-yyyy",leapday:"29-02-",separator:"-",alias:"dd/mm/yyyy"},"mm.dd.yyyy":{mask:"1.2.y",placeholder:"mm.dd.yyyy",leapday:"02.29.",separator:".",alias:"mm/dd/yyyy"},"mm-dd-yyyy":{mask:"1-2-y",placeholder:"mm-dd-yyyy",leapday:"02-29-",separator:"-",alias:"mm/dd/yyyy"},"yyyy.mm.dd":{mask:"y.1.2",placeholder:"yyyy.mm.dd",leapday:".02.29",separator:".",alias:"yyyy/mm/dd"},"yyyy-mm-dd":{mask:"y-1-2",placeholder:"yyyy-mm-dd",leapday:"-02-29",separator:"-",alias:"yyyy/mm/dd"},datetime:{mask:"1/2/y h:s",placeholder:"dd/mm/yyyy hh:mm",alias:"dd/mm/yyyy",regex:{hrspre:new RegExp("[012]"),hrs24:new RegExp("2[0-4]|1[3-9]"),hrs:new RegExp("[01][0-9]|2[0-4]"),ampm:new RegExp("^[a|p|A|P][m|M]"),mspre:new RegExp("[0-5]"),ms:new RegExp("[0-5][0-9]")},timeseparator:":",hourFormat:"24",definitions:{h:{validator:function(a,b,c,d,e){if("24"==e.hourFormat&&24==parseInt(a,10))return b.buffer[c-1]="0",b.buffer[c]="0",{refreshFromBuffer:{start:c-1,end:c},c:"0"};var f=e.regex.hrs.test(a);if(!d&&!f&&(a.charAt(1)==e.timeseparator||-1!="-.:".indexOf(a.charAt(1)))&&(f=e.regex.hrs.test("0"+a.charAt(0))))return b.buffer[c-1]="0",b.buffer[c]=a.charAt(0),c++,{refreshFromBuffer:{start:c-2,end:c},pos:c,c:e.timeseparator};if(f&&"24"!==e.hourFormat&&e.regex.hrs24.test(a)){var g=parseInt(a,10);return 24==g?(b.buffer[c+5]="a",b.buffer[c+6]="m"):(b.buffer[c+5]="p",b.buffer[c+6]="m"),g-=12,10>g?(b.buffer[c]=g.toString(),b.buffer[c-1]="0"):(b.buffer[c]=g.toString().charAt(1),b.buffer[c-1]=g.toString().charAt(0)),{refreshFromBuffer:{start:c-1,end:c+6},c:b.buffer[c]}}return f},cardinality:2,prevalidator:[{validator:function(a,b,c,d,e){var f=e.regex.hrspre.test(a);return d||f||!(f=e.regex.hrs.test("0"+a))?f:(b.buffer[c]="0",c++,{
5
+ pos:c})},cardinality:1}]},s:{validator:"[0-5][0-9]",cardinality:2,prevalidator:[{validator:function(a,b,c,d,e){var f=e.regex.mspre.test(a);return d||f||!(f=e.regex.ms.test("0"+a))?f:(b.buffer[c]="0",c++,{pos:c})},cardinality:1}]},t:{validator:function(a,b,c,d,e){return e.regex.ampm.test(a+"m")},casing:"lower",cardinality:1}},insertMode:!1,autoUnmask:!1},datetime12:{mask:"1/2/y h:s t\\m",placeholder:"dd/mm/yyyy hh:mm xm",alias:"datetime",hourFormat:"12"},"hh:mm t":{mask:"h:s t\\m",placeholder:"hh:mm xm",alias:"datetime",hourFormat:"12"},"h:s t":{mask:"h:s t\\m",placeholder:"hh:mm xm",alias:"datetime",hourFormat:"12"},"hh:mm:ss":{mask:"h:s:s",placeholder:"hh:mm:ss",alias:"datetime",autoUnmask:!1},"hh:mm":{mask:"h:s",placeholder:"hh:mm",alias:"datetime",autoUnmask:!1},date:{alias:"dd/mm/yyyy"},"mm/yyyy":{mask:"1/y",placeholder:"mm/yyyy",leapday:"donotuse",separator:"/",alias:"mm/dd/yyyy"}}),a.fn.inputmask}(jQuery),function(a){a.extend(a.inputmask.defaults.definitions,{A:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",cardinality:1,casing:"upper"},"#":{validator:"[0-9A-Za-zА-яЁёÀ-ÿµ]",cardinality:1,casing:"upper"}}),a.extend(a.inputmask.defaults.aliases,{url:{mask:"ir",placeholder:"",separator:"",defaultPrefix:"http://",regex:{urlpre1:new RegExp("[fh]"),urlpre2:new RegExp("(ft|ht)"),urlpre3:new RegExp("(ftp|htt)"),urlpre4:new RegExp("(ftp:|http|ftps)"),urlpre5:new RegExp("(ftp:/|ftps:|http:|https)"),urlpre6:new RegExp("(ftp://|ftps:/|http:/|https:)"),urlpre7:new RegExp("(ftp://|ftps://|http://|https:/)"),urlpre8:new RegExp("(ftp://|ftps://|http://|https://)")},definitions:{i:{validator:function(){return!0},cardinality:8,prevalidator:function(){for(var a=[],b=0;8>b;b++)a[b]=function(){var a=b;return{validator:function(b,c,d,e,f){if(f.regex["urlpre"+(a+1)]){var g,h=b;a+1-b.length>0&&(h=c.buffer.join("").substring(0,a+1-b.length)+""+h);var i=f.regex["urlpre"+(a+1)].test(h);if(!e&&!i){for(d-=a,g=0;g<f.defaultPrefix.length;g++)c.buffer[d]=f.defaultPrefix[g],d++;for(g=0;g<h.length-1;g++)c.buffer[d]=h[g],d++;return{pos:d}}return i}return!1},cardinality:a}}();return a}()},r:{validator:".",cardinality:50}},insertMode:!1,autoUnmask:!1},ip:{mask:"i[i[i]].i[i[i]].i[i[i]].i[i[i]]",definitions:{i:{validator:function(a,b,c){return c-1>-1&&"."!=b.buffer[c-1]?(a=b.buffer[c-1]+a,a=c-2>-1&&"."!=b.buffer[c-2]?b.buffer[c-2]+a:"0"+a):a="00"+a,new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]").test(a)},cardinality:1}}},email:{mask:"*{1,64}[.*{1,64}][.*{1,64}][.*{1,64}]@*{1,64}[.*{2,64}][.*{2,6}][.*{1,2}]",greedy:!1,onBeforePaste:function(a){return a=a.toLowerCase(),a.replace("mailto:","")},definitions:{"*":{validator:"[0-9A-Za-z!#$%&'*+/=?^_`{|}~-]",cardinality:1,casing:"lower"}}}}),a.fn.inputmask}(jQuery),function(a){a.extend(a.inputmask.defaults.aliases,{numeric:{mask:function(a){if(0!==a.repeat&&isNaN(a.integerDigits)&&(a.integerDigits=a.repeat),a.repeat=0,a.groupSeparator==a.radixPoint&&(a.groupSeparator="."==a.radixPoint?",":","==a.radixPoint?".":"")," "===a.groupSeparator&&(a.skipOptionalPartCharacter=void 0),a.autoGroup=a.autoGroup&&""!=a.groupSeparator,a.autoGroup&&isFinite(a.integerDigits)){var b=Math.floor(a.integerDigits/a.groupSize),c=a.integerDigits%a.groupSize;a.integerDigits+=0==c?b-1:b}a.definitions[";"]=a.definitions["~"];var d=a.prefix;return d+="[+]",d+="~{1,"+a.integerDigits+"}",void 0!=a.digits&&(isNaN(a.digits)||parseInt(a.digits)>0)&&(d+=a.digitsOptional?"["+(a.decimalProtect?":":a.radixPoint)+";{"+a.digits+"}]":(a.decimalProtect?":":a.radixPoint)+";{"+a.digits+"}"),d+=a.suffix},placeholder:"",greedy:!1,digits:"*",digitsOptional:!0,groupSeparator:"",radixPoint:".",radixFocus:!0,groupSize:3,autoGroup:!1,allowPlus:!0,allowMinus:!0,integerDigits:"+",prefix:"",suffix:"",rightAlign:!0,decimalProtect:!0,postFormat:function(b,c,d,e){var f=!1,g=b[c];if(""==e.groupSeparator||-1!=a.inArray(e.radixPoint,b)&&c>=a.inArray(e.radixPoint,b)||new RegExp("[-+]").test(g))return{pos:c};var h=b.slice();g==e.groupSeparator&&(h.splice(c--,1),g=h[c]),d?h[c]="?":h.splice(c,0,"?");var i=h.join("");if(e.autoGroup||d&&-1!=i.indexOf(e.groupSeparator)){var j=a.inputmask.escapeRegex.call(this,e.groupSeparator);f=0==i.indexOf(e.groupSeparator),i=i.replace(new RegExp(j,"g"),"");var k=i.split(e.radixPoint);if((i=k[0])!=e.prefix+"?0"&&i.length>=e.groupSize+e.prefix.length){f=!0;for(var l=new RegExp("([-+]?[\\d?]+)([\\d?]{"+e.groupSize+"})");l.test(i);)i=i.replace(l,"$1"+e.groupSeparator+"$2"),i=i.replace(e.groupSeparator+e.groupSeparator,e.groupSeparator)}k.length>1&&(i+=e.radixPoint+k[1])}b.length=i.length;for(var m=0,n=i.length;n>m;m++)b[m]=i.charAt(m);var o=a.inArray("?",b);return d?b[o]=g:b.splice(o,1),{pos:o,refreshFromBuffer:f}},onKeyDown:function(b,c,d,e){if(b.keyCode==a.inputmask.keyCode.TAB&&"0"!=e.placeholder.charAt(0)){var f=a.inArray(e.radixPoint,c);if(-1!=f&&isFinite(e.digits)){for(var g=1;g<=e.digits;g++)(void 0==c[f+g]||c[f+g]==e.placeholder.charAt(0))&&(c[f+g]="0");return{refreshFromBuffer:{start:++f,end:f+e.digits}}}}else if(e.autoGroup&&(b.keyCode==a.inputmask.keyCode.DELETE||b.keyCode==a.inputmask.keyCode.BACKSPACE)){var h=e.postFormat(c,d-1,!0,e);return h.caret=h.pos+1,h}},onKeyPress:function(a,b,c,d){if(d.autoGroup){var e=d.postFormat(b,c-1,!0,d);return e.caret=e.pos+1,e}},regex:{integerPart:function(){return new RegExp("[-+]?\\d+")},integerNPart:function(){return new RegExp("\\d+")}},signHandler:function(a,b,c,d,e){if(!d&&(e.allowMinus&&"-"===a||e.allowPlus&&"+"===a)){var f=b.join("").match(e.regex.integerPart(e));if(f&&f.length>0&&"0"!==f[f.index])return b[f.index]==("-"===a?"+":"-")?{pos:f.index,c:a,remove:f.index,caret:c}:b[f.index]==("-"===a?"-":"+")?{remove:f.index,caret:c-1}:{pos:f.index,c:a,caret:c+1}}return!1},radixHandler:function(b,c,d,e,f){if(!e&&b===f.radixPoint){var g=a.inArray(f.radixPoint,c.buffer),h=c.buffer.join("").match(f.regex.integerPart(f));if(-1!=g)return c.validPositions[g-1]?{caret:g+1}:{pos:h.index,c:h[0],caret:g+1}}return!1},leadingZeroHandler:function(b,c,d,e,f){var g=c.buffer.join("").match(f.regex.integerNPart(f)),h=a.inArray(f.radixPoint,c.buffer);if(g&&!e&&(-1==h||g.index<h))if(0==g[0].indexOf("0")&&d>=f.prefix.length){if(-1==h||h>=d&&void 0==c.validPositions[h])return c.buffer.splice(g.index,1),d=d>g.index?d-1:g.index,{pos:d,remove:g.index};if(d>g.index&&h>=d)return c.buffer.splice(g.index,1),d=d>g.index?d-1:g.index,{pos:d,remove:g.index}}else if("0"==b&&d<=g.index)return!1;return!0},definitions:{"~":{validator:function(b,c,d,e,f){var g=f.signHandler(b,c.buffer,d,e,f);if(!g&&!(g=f.radixHandler(b,c,d,e,f))&&!0===(g=e?new RegExp("[0-9"+a.inputmask.escapeRegex.call(this,f.groupSeparator)+"]").test(b):new RegExp("[0-9]").test(b))&&!0===(g=f.leadingZeroHandler(b,c,d,e,f))){var h=a.inArray(f.radixPoint,c.buffer);!1===f.digitsOptional&&d>h&&!e&&(g={pos:d,remove:d}),g={pos:d}}return g},cardinality:1,prevalidator:null},"+":{validator:function(a,b,c,d,e){var f=e.signHandler(a,b.buffer,c,d,e);return f||(f=e.allowMinus&&"-"==a||e.allowPlus&&"+"==a),f},cardinality:1,prevalidator:null,placeholder:""},":":{validator:function(b,c,d,e,f){var g=f.signHandler(b,c.buffer,d,e,f);if(!g){var h="["+a.inputmask.escapeRegex.call(this,f.radixPoint)+"]";(g=new RegExp(h).test(b))&&c.validPositions[d]&&c.validPositions[d].match.placeholder==f.radixPoint&&(g={pos:d,remove:d})}return g},cardinality:1,prevalidator:null,placeholder:function(a){return a.radixPoint}}},insertMode:!0,autoUnmask:!1,onUnMask:function(b,c,d){var e=b.replace(d.prefix,"");return e=e.replace(d.suffix,""),e=e.replace(new RegExp(a.inputmask.escapeRegex.call(this,d.groupSeparator),"g"),"")},isComplete:function(b,c){var d=b.join(""),e=b.slice();if(c.postFormat(e,0,!0,c),e.join("")!=d)return!1;var f=d.replace(c.prefix,"");return f=f.replace(c.suffix,""),f=f.replace(new RegExp(a.inputmask.escapeRegex.call(this,c.groupSeparator),"g"),""),f=f.replace(a.inputmask.escapeRegex.call(this,c.radixPoint),"."),isFinite(f)},onBeforeMask:function(b,c){if(isFinite(b))return b.toString().replace(".",c.radixPoint);var d=b.match(/,/g),e=b.match(/\./g);return e&&d?e.length>d.length?(b=b.replace(/\./g,""),b=b.replace(",",c.radixPoint)):d.length>e.length&&(b=b.replace(/,/g,""),b=b.replace(".",c.radixPoint)):b=b.replace(new RegExp(a.inputmask.escapeRegex.call(this,c.groupSeparator),"g"),""),b}},currency:{prefix:"$ ",groupSeparator:",",radixPoint:".",alias:"numeric",placeholder:"0",autoGroup:!0,digits:2,digitsOptional:!1,clearMaskOnLostFocus:!1,decimalProtect:!0},decimal:{alias:"numeric"},integer:{alias:"numeric",digits:"0"}}),a.fn.inputmask}(jQuery),function(a){a.extend(a.inputmask.defaults.aliases,{phone:{url:"phone-codes/phone-codes.js",maskInit:"+pp(pp)pppppppp",mask:function(b){b.definitions={p:{validator:function(){return!1},cardinality:1},"#":{validator:"[0-9]",cardinality:1}};var c=[];return a.ajax({url:b.url,async:!1,dataType:"json",success:function(a){c=a}}),c=c.sort(function(a,b){return(a.mask||a)<(b.mask||b)?-1:1}),c.splice(0,0,b.maskInit),c},nojumps:!0,nojumpsThreshold:1},phonebe:{alias:"phone",url:"phone-codes/phone-be.js",maskInit:"+32(pp)pppppppp",nojumpsThreshold:4}}),a.fn.inputmask}(jQuery),function(a){a.extend(a.inputmask.defaults.aliases,{Regex:{mask:"r",greedy:!1,repeat:"*",regex:null,regexTokens:null,tokenizer:/\[\^?]?(?:[^\\\]]+|\\[\S\s]?)*]?|\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\S\s]?)|\((?:\?[:=!]?)?|(?:[?*+]|\{[0-9]+(?:,[0-9]*)?\})\??|[^.?*+^${[()|\\]+|./g,quantifierFilter:/[0-9]+[^,]/,isComplete:function(a,b){return new RegExp(b.regex).test(a.join(""))},definitions:{r:{validator:function(b,c,d,e,f){function g(a,b){this.matches=[],this.isGroup=a||!1,this.isQuantifier=b||!1,this.quantifier={min:1,max:1},this.repeaterPart=void 0}function h(b,c){var d=!1;c&&(j+="(",l++);for(var e=0;e<b.matches.length;e++){var f=b.matches[e];if(1==f.isGroup)d=h(f,!0);else if(1==f.isQuantifier){var g=a.inArray(f,b.matches),i=b.matches[g-1],k=j;if(isNaN(f.quantifier.max)){for(;f.repeaterPart&&f.repeaterPart!=j&&f.repeaterPart.length>j.length&&!(d=h(i,!0)););d=d||h(i,!0),d&&(f.repeaterPart=j),j=k+f.quantifier.max}else{for(var n=0,o=f.quantifier.max-1;o>n&&!(d=h(i,!0));n++);j=k+"{"+f.quantifier.min+","+f.quantifier.max+"}"}}else if(void 0!=f.matches)for(var p=0;p<f.length&&!(d=h(f[p],c));p++);else{var q;if("["==f.charAt(0)){q=j,q+=f;for(var r=0;l>r;r++)q+=")";var s=new RegExp("^("+q+")$");d=s.test(m)}else for(var t=0,u=f.length;u>t;t++)if("\\"!=f.charAt(t)){q=j,q+=f.substr(0,t+1),q=q.replace(/\|$/,"");for(var r=0;l>r;r++)q+=")";var s=new RegExp("^("+q+")$");if(d=s.test(m))break}j+=f}if(d)break}return c&&(j+=")",l--),d}null==f.regexTokens&&function(){var a,b,c=new g,d=[];for(f.regexTokens=[];a=f.tokenizer.exec(f.regex);)switch(b=a[0],b.charAt(0)){case"(":d.push(new g(!0));break;case")":var e=d.pop();d.length>0?d[d.length-1].matches.push(e):c.matches.push(e);break;case"{":case"+":case"*":var h=new g(!1,!0);b=b.replace(/[{}]/g,"");var i=b.split(","),j=isNaN(i[0])?i[0]:parseInt(i[0]),k=1==i.length?j:isNaN(i[1])?i[1]:parseInt(i[1]);if(h.quantifier={min:j,max:k},d.length>0){var l=d[d.length-1].matches;if(a=l.pop(),!a.isGroup){var e=new g(!0);e.matches.push(a),a=e}l.push(a),l.push(h)}else{if(a=c.matches.pop(),!a.isGroup){var e=new g(!0);e.matches.push(a),a=e}c.matches.push(a),c.matches.push(h)}break;default:d.length>0?d[d.length-1].matches.push(b):c.matches.push(b)}c.matches.length>0&&f.regexTokens.push(c)}();var i=c.buffer.slice(),j="",k=!1,l=0;i.splice(d,0,b);for(var m=i.join(""),n=0;n<f.regexTokens.length;n++){var g=f.regexTokens[n];if(k=h(g,g.isGroup))break}return k},cardinality:1}}}}),a.fn.inputmask}(jQuery),jQuery(document).ready(function(a){jQuery(document).on("cf.add",function(){a("[data-inputmask]").inputmask()}),jQuery(document).trigger("cf.add")}),function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){function b(a,b){var c=Array.prototype.slice.call(arguments,2);return setTimeout(function(){return a.apply(null,c)},b)}function c(a,b){return b=b||100,function(){if(!a.debouncing){var c=Array.prototype.slice.apply(arguments);a.lastReturnVal=a.apply(window,c),a.debouncing=!0}return clearTimeout(a.debounceTimeout),a.debounceTimeout=setTimeout(function(){a.debouncing=!1},b),a.lastReturnVal}}function d(d,f){if(this.$window=a(window),this.$document=a(document),this.$element=a(d),this.options=a.extend({},h,f),this._defaults=h,this._name=e,this.startEvent=this.options.startEvent.join("."+e+" ")+"."+e,this.moveEvent=this.options.moveEvent.join("."+e+" ")+"."+e,this.endEvent=this.options.endEvent.join("."+e+" ")+"."+e,this.polyfill=this.options.polyfill,this.onInit=this.options.onInit,this.onSlide=this.options.onSlide,this.onSlideEnd=this.options.onSlideEnd,this.polyfill&&g)return!1;this.identifier="js-"+e+"-"+ +new Date,this.min=parseFloat(this.$element[0].getAttribute("min")||0),this.max=parseFloat(this.$element[0].getAttribute("max")||100),this.value=parseFloat(this.$element[0].value||this.min+(this.max-this.min)/2),this.step=parseFloat(this.$element[0].getAttribute("step")||1),this.$fill=a('<div class="'+this.options.fillClass+'" />'),this.$handle=a('<div class="'+this.options.handleClass+'" />'),this.$range=a('<div class="'+this.options.rangeClass+'" id="'+this.identifier+'" />').insertAfter(this.$element).prepend(this.$fill,this.$handle),this.$element.css({position:"absolute",width:"1px",height:"1px",overflow:"hidden",opacity:"0"}),this.handleDown=a.proxy(this.handleDown,this),this.handleMove=a.proxy(this.handleMove,this),this.handleEnd=a.proxy(this.handleEnd,this),this.init();var i=this;this.$window.on("resize."+e,c(function(){b(function(){i.update()},300)},20)),this.$document.on(this.startEvent,"#"+this.identifier+":not(."+this.options.disabledClass+")",this.handleDown),this.$element.on("change."+e,function(a,b){if(!b||b.origin!==e){var c=a.target.value,d=i.getPositionFromValue(c);i.setPosition(d)}})}var e="rangeslider",f=[],g=function(){var a=document.createElement("input");return a.setAttribute("type","range"),"text"!==a.type}(),h={polyfill:!0,rangeClass:"rangeslider",disabledClass:"rangeslider--disabled",fillClass:"rangeslider__fill",handleClass:"rangeslider__handle",startEvent:["mousedown","touchstart","pointerdown"],moveEvent:["mousemove","touchmove","pointermove"],endEvent:["mouseup","touchend","pointerup"]};d.prototype.init=function(){this.onInit&&"function"==typeof this.onInit&&this.onInit(),this.update()},d.prototype.update=function(){this.handleWidth=this.$handle[0].offsetWidth,this.rangeWidth=this.$range[0].offsetWidth,this.maxHandleX=this.rangeWidth-this.handleWidth,this.grabX=this.handleWidth/2,this.position=this.getPositionFromValue(this.value),this.$element[0].disabled?this.$range.addClass(this.options.disabledClass):this.$range.removeClass(this.options.disabledClass),this.setPosition(this.position)},d.prototype.handleDown=function(a){if(a.preventDefault(),this.$document.on(this.moveEvent,this.handleMove),this.$document.on(this.endEvent,this.handleEnd),!((" "+a.target.className+" ").replace(/[\n\t]/g," ").indexOf(this.options.handleClass)>-1)){var b=this.getRelativePosition(this.$range[0],a),c=this.getPositionFromNode(this.$handle[0])-this.getPositionFromNode(this.$range[0]);this.setPosition(b-this.grabX),b>=c&&b<c+this.handleWidth&&(this.grabX=b-c)}},d.prototype.handleMove=function(a){a.preventDefault();var b=this.getRelativePosition(this.$range[0],a);this.setPosition(b-this.grabX)},d.prototype.handleEnd=function(a){a.preventDefault(),this.$document.off(this.moveEvent,this.handleMove),this.$document.off(this.endEvent,this.handleEnd);var b=this.getRelativePosition(this.$range[0],a);this.onSlideEnd&&"function"==typeof this.onSlideEnd&&this.onSlideEnd(b-this.grabX,this.value)},d.prototype.cap=function(a,b,c){return a<b?b:a>c?c:a},d.prototype.setPosition=function(a){var b,c;b=this.getValueFromPosition(this.cap(a,0,this.maxHandleX))/this.step*this.step,c=this.getPositionFromValue(b),this.$fill[0].style.width=c+this.grabX+"px",this.$handle[0].style.left=c+"px",this.setValue(b),this.position=c,this.value=b,this.onSlide&&"function"==typeof this.onSlide&&this.onSlide(c,b)},d.prototype.getPositionFromNode=function(a){for(var b=0;null!==a;)b+=a.offsetLeft,a=a.offsetParent;return b},d.prototype.getRelativePosition=function(a,b){return(b.pageX||b.originalEvent.clientX||b.originalEvent.touches[0].clientX||b.currentPoint.x)-this.getPositionFromNode(a)},d.prototype.getPositionFromValue=function(a){var b;return b=(a-this.min)/(this.max-this.min),b*this.maxHandleX},d.prototype.getValueFromPosition=function(a){var b,c;return b=a/(this.maxHandleX||1),c=this.step*Math.ceil((b*(this.max-this.min)+this.min)/this.step),Number(c.toFixed(2))},d.prototype.setValue=function(a){a!==this.value&&this.$element.val(a).trigger("change",{origin:e})},d.prototype.destroy=function(){this.$document.off(this.startEvent,"#"+this.identifier,this.handleDown),this.$element.off("."+e).removeAttr("style").removeData("plugin_"+e),this.$range&&this.$range.length&&this.$range[0].parentNode.removeChild(this.$range[0]),f.splice(f.indexOf(this.$element[0]),1),f.length||this.$window.off("."+e)},a.fn[e]=function(b){return this.each(function(){var c=a(this),g=c.data("plugin_"+e);g||(c.data("plugin_"+e,g=new d(this,b)),f.push(this)),"string"==typeof b&&g[b]()})}}),function(a){"use strict";var b={init:function(c){return this.each(function(){this.self=a(this),b.destroy.call(this.self),this.opt=a.extend(!0,{},a.fn.raty.defaults,c),b._adjustCallback.call(this),b._adjustNumber.call(this),"img"!==this.opt.starType&&b._adjustStarType.call(this),b._adjustPath.call(this),b._createStars.call(this),this.opt.cancel&&b._createCancel.call(this),this.opt.precision&&b._adjustPrecision.call(this),b._createScore.call(this),b._apply.call(this,this.opt.score),b._target.call(this,this.opt.score),this.opt.readOnly?b._lock.call(this):(this.style.cursor="pointer",b._binds.call(this)),this.self.data("options",this.opt)})},_adjustCallback:function(){for(var a=["number","readOnly","score","scoreName"],b=0;b<a.length;b++)"function"==typeof this.opt[a[b]]&&(this.opt[a[b]]=this.opt[a[b]].call(this))},_adjustNumber:function(){this.opt.number=b._between(this.opt.number,1,this.opt.numberMax)},_adjustPath:function(){this.opt.path=this.opt.path||"",this.opt.path&&"/"!==this.opt.path.charAt(this.opt.path.length-1)&&(this.opt.path+="/")},_adjustPrecision:function(){this.opt.half=!0,this.opt.targetType="score"},_adjustStarType:function(){this.opt.path="";for(var a=["cancelOff","cancelOn","starHalf","starOff","starOn"],b=0;b<a.length;b++)this.opt[a[b]]=this.opt[a[b]].replace(".","-")},_apply:function(a){b._fill.call(this,a),a&&(a>0&&this.score.val(b._between(a,0,this.opt.number)),b._roundStars.call(this,a))},_between:function(a,b,c){return Math.min(Math.max(parseFloat(a),b),c)},_binds:function(){this.cancel&&(b._bindOverCancel.call(this),b._bindClickCancel.call(this),b._bindOutCancel.call(this)),b._bindOver.call(this),b._bindClick.call(this),b._bindOut.call(this)},_bindClick:function(){var b=this;b.stars.on("click.raty",function(c){var d=a(this);b.score.val(b.opt.half||b.opt.precision?b.self.data("score"):this.alt||d.data("alt")),b.opt.click&&b.opt.click.call(b,+b.score.val(),c)})},_bindClickCancel:function(){var a=this;a.cancel.on("click.raty",function(b){a.score.removeAttr("value"),a.opt.click&&a.opt.click.call(a,null,b)})},_bindOut:function(){var a=this;a.self.on("mouseleave.raty",function(c){var d=+a.score.val()||void 0;b._apply.call(a,d),b._target.call(a,d,c),a.opt.mouseout&&a.opt.mouseout.call(a,d,c)})},_bindOutCancel:function(){var b=this;b.cancel.on("mouseleave.raty",function(c){var d=a(this),e=b.opt.path+b.opt.cancelOff;if("img"===b.opt.starType)d.attr("src",e);else{var f=b.opt.path+b.opt.cancelOn;d.removeClass(f).addClass(e)}if(b.opt.mouseout){var g=+b.score.val()||void 0;b.opt.mouseout.call(b,g,c)}})},_bindOver:function(){var a=this,c=a.opt.half?"mousemove.raty":"mouseover.raty";a.stars.on(c,function(c){var d=b._getScoreByPosition.call(a,c,this);b._fill.call(a,d),a.opt.half&&(b._roundStars.call(a,d),a.self.data("score",d)),b._target.call(a,d,c),a.opt.mouseover&&a.opt.mouseover.call(a,d,c)})},_bindOverCancel:function(){var c=this;c.cancel.on("mouseover.raty",function(d){var e=c.opt.path+c.opt.cancelOn,f=a(this),g=c.opt.path+c.opt.starOff;if("img"===c.opt.starType)f.attr("src",e),c.stars.attr("src",g);else{c.stars.attr("class",g);var h=c.opt.path+c.opt.cancelOff;f.removeClass(h).addClass(e).css("color",c.opt.starColor)}b._target.call(c,null,d),c.opt.mouseover&&c.opt.mouseover.call(c,null)})},_buildScoreField:function(){return a("<input />",{name:this.opt.scoreName,type:"hidden"}).appendTo(this)},_createCancel:function(){var b=this.opt.path+this.opt.cancelOff,c=a("<"+this.opt.starType+" />",{title:this.opt.cancelHint,class:"raty-cancel"}).css("marginRight",this.opt.space?this.opt.spaceWidth+"px":"0");"img"===this.opt.starType?c.attr({src:b,alt:"x"}):c.attr("data-alt","x").addClass(b),"left"===this.opt.cancelPlace?this.self.prepend("&#160;").prepend(c):this.self.append("&#160;").append(c),this.cancel=c},_createScore:function(){var c=a(this.opt.targetScore);this.score=c.length?c:b._buildScoreField.call(this)},_createStars:function(){for(var c=1;c<=this.opt.number;c++){var d,e=this.opt.score&&this.opt.score>=c?"starOn":"starOff",f=b._getHint.call(this,c);e=this.opt.path+this.opt[e],d="img"!==this.opt.starType?{"data-alt":c,class:e}:{src:e,alt:c},d.title=f,a("<"+this.opt.starType+" />",d).css("marginRight",c<this.opt.number&&this.opt.space?this.opt.spaceWidth+"px":"0").appendTo(this),this.opt.space}this.stars=this.self.children(this.opt.starType)},_error:function(b){a(this).text(b),a.error(b)},_fill:function(a){for(var c=0,d=1;d<=this.stars.length;d++){var e,f=this.stars.eq(d-1),g=b._turnOn.call(this,d,a);if(this.opt.iconRange&&this.opt.iconRange.length>c){var h=this.opt.iconRange[c];e=b._getIconRange.call(this,h,g),d<=h.range&&("img"===this.opt.starType?f.attr("src",e):f.attr("class",e)),d===h.range&&c++}else e=this.opt.path+this.opt[g?"starOn":"starOff"],"img"===this.opt.starType?f.attr("src",e):f.attr("class",e),g?f.css("color",this.opt.starColor):f.css("color","")}},_getIconRange:function(a,b){return this.opt.path+(b?a.on||this.opt.starOn:a.off||this.opt.starOff)},_getScoreByPosition:function(c,d){var e=a(d),f=parseInt(d.alt||e.data("alt"),10);if(this.opt.half){var g=b._getSize.call(this),h=parseFloat((c.pageX-e.offset().left)/g);f=this.opt.precision?f-1+h:f-1+(h>.5?1:.5)}return f},_getSize:function(){var a;return a="img"===this.opt.starType?this.stars[0].width:parseFloat(this.stars.eq(0).css("font-size")),a||b._error.call(this,"Could not be possible get the icon size!"),a},_turnOn:function(a,b){return this.opt.single?a===b:a<=b},_getHint:function(a){var b=this.opt.hints[a-1];return""===b?"":b||a},_lock:function(){var a=parseInt(this.score.val(),10),c=a?b._getHint.call(this,a):this.opt.noRatedMsg;this.style.cursor="",this.title=c,this.score.prop("readonly",!0),this.stars.prop("title",c),this.cancel&&this.cancel.hide(),this.self.data("readonly",!0)},_roundStars:function(a){var b=(a%1).toFixed(2);if(b>this.opt.round.down){var c="starOn";this.opt.halfShow&&b<this.opt.round.up?c="starHalf":b<this.opt.round.full&&(c="starOff");var d=this.stars[Math.ceil(a)-1];"img"===this.opt.starType?d.src=this.opt.path+this.opt[c]:d.style.className=this.opt[c]}},_target:function(c,d){if(this.opt.target){var e=a(this.opt.target);e.length||b._error.call(this,"Target selector invalid or missing!");var f=d&&"mouseover"===d.type;if(void 0===c)c=this.opt.targetText;else if(null===c)c=f?this.opt.cancelHint:this.opt.targetText;else{"hint"===this.opt.targetType?c=b._getHint.call(this,Math.ceil(c)):this.opt.precision&&(c=parseFloat(c).toFixed(1));var g=d&&"mousemove"===d.type;f||g||this.opt.targetKeep||(c=this.opt.targetText)}c&&(c=this.opt.targetFormat.toString().replace("{score}",c)),e.is(":input")?e.val(c):e.html(c)}},_unlock:function(){this.style.cursor="pointer",this.removeAttribute("title"),this.score.removeAttr("readonly"),this.self.data("readonly",!1);for(var a=0;a<this.opt.number;a++)this.stars[a].title=b._getHint.call(this,a+1);this.cancel&&this.cancel.css("display","")},cancel:function(c){return this.each(function(){var d=a(this);!0!==d.data("readonly")&&(b[c?"click":"score"].call(d,null),this.score.removeAttr("value"))})},click:function(c){return this.each(function(){!0!==a(this).data("readonly")&&(b._apply.call(this,c),this.opt.click&&this.opt.click.call(this,c,a.Event("click")),b._target.call(this,c))})},destroy:function(){return this.each(function(){var b=a(this),c=b.data("raw");c?b.off(".raty").empty().css({cursor:c.style.cursor}).removeData("readonly"):b.data("raw",b.clone()[0])})},getScore:function(){var a,b=[];return this.each(function(){a=this.score.val(),b.push(a?+a:void 0)}),b.length>1?b:b[0]},move:function(c){return this.each(function(){var d=parseInt(c,10),e=a(this).data("options"),f=(+c).toFixed(1).split(".")[1];d>=e.number&&(d=e.number-1,f=10);var g=b._getSize.call(this),h=g/10,i=a(this.stars[d]),j=i.offset().left+h*parseInt(f,10),k=a.Event("mousemove",{pageX:j});i.trigger(k)})},readOnly:function(c){return this.each(function(){var d=a(this);d.data("readonly")!==c&&(c?(d.off(".raty").children("img").off(".raty"),b._lock.call(this)):(b._binds.call(this),b._unlock.call(this)),d.data("readonly",c))})},reload:function(){return b.set.call(this,{})},score:function(){var c=a(this);return arguments.length?b.setScore.apply(c,arguments):b.getScore.call(c)},set:function(b){return this.each(function(){var c=a(this),d=c.data("options"),e=a.extend({},d,b);c.raty(e)})},setScore:function(c){return this.each(function(){!0!==a(this).data("readonly")&&(b._apply.call(this,c),b._target.call(this,c))})}};a.fn.raty=function(c){return b[c]?b[c].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof c&&c?void a.error("Method "+c+" does not exist!"):b.init.apply(this,arguments)},a.fn.raty.defaults={cancel:!1,cancelHint:"Cancel this rating!",cancelOff:"raty-cancel-off",cancelOn:"raty-cancel-on",cancelPlace:"left",click:void 0,half:!1,halfShow:!0,hints:["1"],iconRange:void 0,mouseout:void 0,mouseover:void 0,noRatedMsg:"Not rated yet!",number:5,numberMax:20,path:void 0,precision:!1,readOnly:!1,round:{down:.25,full:.6,up:.76},score:void 0,scoreName:"score",single:!1,space:!0,spaceWidth:3,starColor:"#ff00aa",starHalf:"star-half.png",starOff:"raty-dot-off",starOn:"raty-dot-on",starType:"img",target:void 0,targetFormat:"{score}",targetKeep:!1,targetScore:void 0,targetText:"",targetType:"hint"}}(jQuery),jQuery(function(a){a("body").on("click",".cf-toggle-group-buttons a",function(){var b=a(this),c=b.closest(".caldera-config-field"),d=c.find('[data-ref="'+b.attr("id")+'"]');c.find(".btn").removeClass(b.data("active")).addClass(b.data("default")),b.addClass(b.data("active")).removeClass(b.data("default")),d.prop("checked",!0).trigger("change")})});
assets/build/js/formobject.min.js CHANGED
@@ -1 +1 @@
1
- !function(a){function b(b){if(b.data("form")){var c="/cf-api/"+b.data("form")+"/";b.data("entry")&&(c+=b.data("entry")+"/"),c+="?cf_instance="+(a(".caldera_forms_form."+b.data("form")).length+1),b.data("width")?b.css({width:b.data("width")}):b.css({width:!1}),a.get(c,function(c){a("#modal-"+b.data("form")+"-content").html(c),resBaldrickTriggers(),"undefined"!=typeof caldera_conditionals&&calders_forms_init_conditions()})}}if(a.fn.formJSON=function(){for(var b=a(this),c=b.find("[name]"),d={},e={},f=0;f<c.length;f++){var g=a(c[f]),h=g.prop("name").replace(/\]/gi,"").split("["),i=g.val(),j={};if(!g.is(":radio")&&!g.is(":checkbox")||g.is(":checked")){for(var k=h.length-1;k>=0;k--){var l=h[k];if(void 0===l&&(l=""),0===l.length&&(j=[],void 0===e[h[k-1]]?e[h[k-1]]=0:e[h[k-1]]+=1,l=e[h[k-1]]),k===h.length-1){if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if(isNaN(parseFloat(i))||parseFloat(i).toString()!==i)if("string"!=typeof i||"{"!==i.substr(0,1)&&"["!==i.substr(0,1)){if("object"==typeof i&&i.length&&g.is("select")){for(var m={},k=0;k<i.length;k++)m["n"+k]=i[k];i=m}}else try{i=JSON.parse(i)}catch(a){}else i=parseFloat(i);j[l]=i}else{var n=j;j={},j[l]=n}}a.extend(!0,d,j)}}return d},a(".caldera_forms_form").on("click",".cf-form-trigger",function(b){var c=a(this);form=c.closest("form.caldera_forms_form"),form_id=form.prop("id"),calderaforms=window[form_id],data=form.formJSON(),fields={},target=c.data("target");for(var d in calderaforms)fields[calderaforms[d].slug]=data[d];if("function"==typeof window[target])window[target](fields,b);else{try{var e=a(target)}catch(a){}if(e&&e.length){fields=JSON.stringify(fields);var f=["textarea","text","hidden"];e.each(function(b,c){this.type&&f.indexOf(this.type)>=0?a(this).val(fields).trigger("change"):this.innerHTML=fields})}else a.post(target,fields)}}),cfModals){var c=a("head"),d=a("body");for(var e in cfModals.style)a("#cf-"+e+"-styles-css").length||c.append('<link id="cf-'+e+'-styles-css" rel="stylesheet" type="text/css" href="'+cfModals.style[e]+'">');for(var f in cfModals.script)a('script[src^="'+cfModals.script[f]+'"]').length||null===cfModals.script[f]||d.append('<script src="'+cfModals.script[f]+'" type="text/javascript">');a(".caldera-forms-modal").each(function(){var c=a(this),d=c.data("form"),e="";c.data("entry")&&(e+='data-entry="'+c.data("entry")+'"'),c.data("width")&&(e+='data-width="'+c.data("width")+'"'),a("body").append('<div class="remodal" data-form="'+d+'" '+e+' data-remodal-id="modal-'+d+'" id="modal-'+d+'"><button data-remodal-action="close" class="remodal-close"></button><div class="modal-content" id="modal-'+d+'-content"><span class="caldera-grid cf_processing cf_modal"></span></div></div>'),b(a("#modal-"+d))}),a(document).on("opened",".remodal",function(){a(document).trigger("cf.modal",a(this))}),a(document).on("cf.submission",function(c,d){setTimeout(function(){var c=a('[data-remodal-id="modal-'+d.data.form_id+'"]').remodal();b(c.$modal),"opened"===c.getState()&&c.close()},1500)})}}(jQuery);
1
+ !function(a){function b(b){if(b.data("form")){var c="/cf-api/"+b.data("form")+"/";b.data("entry")&&(c+=b.data("entry")+"/"),c+="?cf_instance="+(a(".caldera_forms_form."+b.data("form")).length+1),b.data("width")?b.css({width:b.data("width")}):b.css({width:!1}),a.get(c,function(c){a("#modal-"+b.data("form")+"-content").html(c),resBaldrickTriggers(),"undefined"!=typeof caldera_conditionals&&calders_forms_init_conditions()})}}if(a.fn.formJSON=function(){for(var b=a(this),c=b.find("[name]"),d={},e={},f=0;f<c.length;f++){var g=a(c[f]),h=g.prop("name").replace(/\]/gi,"").split("["),i=g.val(),j={};if(!g.is(":radio")&&!g.is(":checkbox")||g.is(":checked")){for(var k=h.length-1;k>=0;k--){var l=h[k];if(void 0===l&&(l=""),0===l.length&&(j=[],void 0===e[h[k-1]]?e[h[k-1]]=0:e[h[k-1]]+=1,l=e[h[k-1]]),k===h.length-1){if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if(isNaN(parseFloat(i))||parseFloat(i).toString()!==i)if("string"!=typeof i||"{"!==i.substr(0,1)&&"["!==i.substr(0,1)){if("object"==typeof i&&i.length&&g.is("select")){for(var m={},k=0;k<i.length;k++)m["n"+k]=i[k];i=m}}else try{i=JSON.parse(i)}catch(a){}else i=parseFloat(i);j[l]=i}else{var n=j;j={},j[l]=n}}a.extend(!0,d,j)}}return d},a(".caldera_forms_form").on("click",".cf-form-trigger",function(b){var c=a(this);form=c.closest("form.caldera_forms_form"),form_id=form.prop("id"),calderaforms=window[form_id],data=form.formJSON(),fields={},target=c.data("target");for(var d in calderaforms)fields[calderaforms[d].slug]=data[d];if("function"==typeof window[target])window[target](fields,b);else{try{var e=a(target)}catch(a){}if(e&&e.length){fields=JSON.stringify(fields);var f=["textarea","text","hidden"];e.each(function(b,c){this.type&&f.indexOf(this.type)>=0?a(this).val(fields).trigger("change"):this.innerHTML=fields})}else a.post(target,fields)}}),cfModals){var c=a("head"),d=a("body");for(var e in cfModals.style)a("#cf-"+e+"-styles-css").length||c.append('<link id="cf-'+e+'-styles-css" rel="stylesheet" type="text/css" href="'+cfModals.style[e]+'">');for(var f in cfModals.script)a('script[src^="'+cfModals.script[f]+'"]').length||null===cfModals.script[f]||d.append('<script src="'+cfModals.script[f]+'" type="text/javascript">');a(".caldera-forms-modal").each(function(){var c=a(this),d=c.data("form"),e="";c.data("entry")&&(e+='data-entry="'+c.data("entry")+'"'),c.data("width")&&(e+='data-width="'+c.data("width")+'"'),a("body").append('<div class="remodal" data-form="'+d+'" '+e+' data-remodal-id="modal-'+d+'" id="modal-'+d+'"><button data-remodal-action="close" class="remodal-close"></button><div class="modal-content" id="modal-'+d+'-content"><span class="caldera-grid cf_processing cf_modal"></span></div></div>'),b(a("#modal-"+d))}),a(document).on("opened",".remodal",function(){a(document).trigger("cf.modal",a(this))}),a(document).on("cf.submission",function(c,d){setTimeout(function(){var c=a('[data-remodal-id="modal-'+d.data.form_id+'"]').remodal();b(c.$modal),"opened"===c.getState()&&c.close()},1500)})}}(jQuery),function(a){function b(b){if(b.data("form")){var c="/cf-api/"+b.data("form")+"/";b.data("entry")&&(c+=b.data("entry")+"/"),c+="?cf_instance="+(a(".caldera_forms_form."+b.data("form")).length+1),b.data("width")?b.css({width:b.data("width")}):b.css({width:!1}),a.get(c,function(c){a("#modal-"+b.data("form")+"-content").html(c),resBaldrickTriggers(),"undefined"!=typeof caldera_conditionals&&calders_forms_init_conditions()})}}if(a.fn.formJSON=function(){for(var b=a(this),c=b.find("[name]"),d={},e={},f=0;f<c.length;f++){var g=a(c[f]),h=g.prop("name").replace(/\]/gi,"").split("["),i=g.val(),j={};if(!g.is(":radio")&&!g.is(":checkbox")||g.is(":checked")){for(var k=h.length-1;k>=0;k--){var l=h[k];if(void 0===l&&(l=""),0===l.length&&(j=[],void 0===e[h[k-1]]?e[h[k-1]]=0:e[h[k-1]]+=1,l=e[h[k-1]]),k===h.length-1){if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if(isNaN(parseFloat(i))||parseFloat(i).toString()!==i)if("string"!=typeof i||"{"!==i.substr(0,1)&&"["!==i.substr(0,1)){if("object"==typeof i&&i.length&&g.is("select")){for(var m={},k=0;k<i.length;k++)m["n"+k]=i[k];i=m}}else try{i=JSON.parse(i)}catch(a){}else i=parseFloat(i);j[l]=i}else{var n=j;j={},j[l]=n}}a.extend(!0,d,j)}}return d},a(".caldera_forms_form").on("click",".cf-form-trigger",function(b){var c=a(this);form=c.closest("form.caldera_forms_form"),form_id=form.prop("id"),calderaforms=window[form_id],data=form.formJSON(),fields={},target=c.data("target");for(var d in calderaforms)fields[calderaforms[d].slug]=data[d];if("function"==typeof window[target])window[target](fields,b);else{try{var e=a(target)}catch(a){}if(e&&e.length){fields=JSON.stringify(fields);var f=["textarea","text","hidden"];e.each(function(b,c){this.type&&f.indexOf(this.type)>=0?a(this).val(fields).trigger("change"):this.innerHTML=fields})}else a.post(target,fields)}}),cfModals){var c=a("head"),d=a("body");for(var e in cfModals.style)a("#cf-"+e+"-styles-css").length||c.append('<link id="cf-'+e+'-styles-css" rel="stylesheet" type="text/css" href="'+cfModals.style[e]+'">');for(var f in cfModals.script)a('script[src^="'+cfModals.script[f]+'"]').length||null===cfModals.script[f]||d.append('<script src="'+cfModals.script[f]+'" type="text/javascript">');a(".caldera-forms-modal").each(function(){var c=a(this),d=c.data("form"),e="";c.data("entry")&&(e+='data-entry="'+c.data("entry")+'"'),c.data("width")&&(e+='data-width="'+c.data("width")+'"'),a("body").append('<div class="remodal" data-form="'+d+'" '+e+' data-remodal-id="modal-'+d+'" id="modal-'+d+'"><button data-remodal-action="close" class="remodal-close"></button><div class="modal-content" id="modal-'+d+'-content"><span class="caldera-grid cf_processing cf_modal"></span></div></div>'),b(a("#modal-"+d))}),a(document).on("opened",".remodal",function(){a(document).trigger("cf.modal",a(this))}),a(document).on("cf.submission",function(c,d){setTimeout(function(){var c=a('[data-remodal-id="modal-'+d.data.form_id+'"]').remodal();b(c.$modal),"opened"===c.getState()&&c.close()},1500)})}}(jQuery);
assets/build/js/frontend-script-init.min.js CHANGED
@@ -1 +1 @@
1
- function CalderaFormsFieldSync(a,b,c,d,e){for(var f=0;f<b.length;f++)d(document).on("keyup change blur mouseover","[data-field='"+b[f]+"']",function(){var b=a.data("sync");if(id=a.data("field"),reg=new RegExp("{{([^}]*?)}}","g"),template=b.match(reg),!a.data("unsync")&&void 0!=template&&template.length){for(var f=0;f<template.length;f++){for(var g=template[f].replace(/\}/g,"").replace(/\{/g,""),h=new RegExp(template[f],"g"),i=c.find("[data-field='"+g+"']"),j="",k=0;k<i.length;k++){var l=d(i[k]);(!l.is(":radio")&&!l.is(":checkbox")||l.is(":checked"))&&(j+=l.val())}b=b.replace(h,j)}e.mutateState(a.attr("id"),j),a.val(b)}}),d("[data-field='"+b[f]+"']").trigger("change")}function CalderaFormsResetNonce(a,b,c){function d(a){return(new Date).getTime()-36e3>a}function e(){c.ajax({url:b.rest.tokens.nonce,method:"POST",beforeSend:function(a){a.setRequestHeader("X-WP-Nonce",b.rest.nonce)},data:{form_id:a}}).success(function(a){f.val(a.nonce),f.data("nonce-time",(new Date).getTime())})}var f;this.init=function(){f=c("#"+b.nonce.field+"_"+a),d(f.data("nonce-time"))&&e()}}function caldera_forms_check_protocol(a){var b=window.location.protocol,c=document.createElement("a");return c.href=a,c.protocol===b}function CalderaFormsCrossOriginWarning(a,b,c){function d(){b(a.data("target")).append('<div class="alert alert-warning">'+c.mixed_protocol+"</div>")}this.maybeWarn=function(){if(a.find('[name="cfajax"]').length){caldera_forms_check_protocol(a.data("request"))||d()}}}function CalderaFormsJQueryWarning(a,b,c){function d(){b(a.data("target")).append('<div class="alert alert-warning">'+c.jquery_old+"</div>")}function e(a){var b=a.split(".");if(1==b[0]){if(12>b[2])return!0;if(4>b[2])return!0}return!1}this.maybeWarn=function(){var a=b.fn.jquery;"string"==typeof a&&"1.12.4"!=a&&e(a)&&d()}}var cf_jsfields_init,cf_presubmit;!function(a){cf_validate_form=function(b){return b.parsley({errorsWrapper:'<span class="help-block caldera_ajax_error_block"></span>',errorTemplate:"<span></span>",errorsContainer:function(a){return a.$element.closest(".form-group")}}).on("field:error",function(c){if("number"==this.$element.attr("type")&&0==this.$element.attr("min")){var d=this.$element.val();return void(0<=d&&(void 0==this.$element.attr("max")||d<=this.$element.attr("max"))&&(c.validationResult=!0))}this.$element.closest(".form-group").addClass("has-error"),a(document).trigger("cf.validate.fieldError",{inst:c,form:b,el:this.$element})}).on("field:success",function(c){if("star"===this.$element.data("type")&&this.$element.prop("required")&&0==this.$element.val())return void(c.validationResult=!1);this.$element.closest(".form-group").removeClass("has-error"),a(document).trigger("cf.validate.fieldSuccess",{inst:c,form:b,el:this.$element})}).on("form:success",function(c){a(document).trigger("cf.validate.FormSuccess",{inst:c,form:b,el:this.$element})}).on("form:error",function(c){a(document).trigger("cf.validate.FormError",{inst:c,form:b,el:this.$element})})},a(document).on("change keypress","[data-sync]",function(){a(this).data("unsync",!0)}),cf_jsfields_init=function(){a(".init_field_type[data-type]").each(function(b,c){var d=a(c);"function"==typeof window[d.data("type")+"_init"]&&window[d.data("type")+"_init"](d.prop("id"),d[0])}),window.Parsley.on("field:validated",function(){setTimeout(function(){a(document).trigger("cf.error")},15)}),"undefined"==typeof resBaldrickTriggers&&a(".caldera_forms_form").length,a(document).trigger("cf.fieldsInit")},a("document").ready(function(){cf_jsfields_init()}),a(".caldera-form-page").length&&a(".caldera-form-page").on("keypress","[data-field]:not(textarea)",function(a){13===a.keyCode&&a.preventDefault()}),a(document).on("click",".cf_modal_button",function(b){b.preventDefault();var c=a(this);a(c.attr("href")).show()}),a(document).on("click",".caldera-front-modal-closer",function(b){b.preventDefault(),a(this).closest(".caldera-front-modal-container").hide()}),a(document).on("cf.add cf.enable cf.disable cf.pagenav",cf_jsfields_init),a(document).on("click","[data-page]",function(b){var c,d,e,f=a(this),g=f.closest(".caldera-form-page"),h=f.closest("form.caldera_forms_form"),i=(h.attr("id"),h.data("instance")),j=h.find(".caldera-form-page:visible").data("formpage"),k=g.data("formpage")?g.data("formpage"):f.data("page"),l=a('.breadcrumb[data-form="caldera_form_'+i+'"]'),m=!0,n=j;if(h.length){if(cf_validate_form(h).destroy(),e=h.find("[data-field]"),h.find(".has-error").removeClass("has-error"),"prev"!==f.data("page")&&k>=j){e=a("#caldera_form_"+i+' [data-formpage="'+j+'"] [data-field]');for(var o,p,q,r=0;r<e.length;r++)o=a(e[r]),o.hasClass("cf-multi-uploader")||o.hasClass("cf-multi-uploader-list")||(q=o.parsley().validate(),((p=o.parsley().isValid({force:!0}))||!0!==q||"email"!==o.attr("type"))&&!0!==p&&(b.preventDefault(),m=!1));if(!0===m&&k>j)for(var s=k-1;s>=1;s--){e=a("#caldera_form_"+i+' [data-formpage="'+s+'"] [data-field]');for(var r=0;r<e.length;r++)o=a(e[r]),o.parsley().validate(),!0!==(p=o.parsley().isValid({force:!0}))&&(b.preventDefault(),m=!1,s>n&&(n=s))}}if(!1===m)return n!==j&&(a("#form_page_"+i+"_pg_"+j).hide().attr("aria-hidden","true").css("visibility","hidden"),a("#form_page_"+i+"_pg_"+n).show().attr("aria-hidden","false").css("visibility","visible")),cf_validate_form(h).validate(),!1;"next"===f.data("page")?(l&&l.find("li.active").removeClass("active").children().attr("aria-expanded","false"),c=h.find('.caldera-form-page[data-formpage="'+(k+1)+'"]'),c.length&&(g.hide().attr("aria-hidden","true").css("visibility","hidden"),c.show().attr("aria-hidden","false").css("visibility","visible"),l&&l.find('a[data-page="'+(k+1)+'"]').attr("aria-expanded","true").parent().addClass("active"))):"prev"===f.data("page")?(l&&l.find("li.active").removeClass("active").children().attr("aria-expanded","false"),d=h.find('.caldera-form-page[data-formpage="'+(k-1)+'"]'),d.length&&(g.hide().attr("aria-hidden","true").css("visibility","hidden"),d.show().attr("aria-hidden","false").css("visibility","visible"),l&&l.find('a[data-page="'+(k-1)+'"]').attr("aria-expanded","true").parent().addClass("active"))):f.data("pagenav")&&(b.preventDefault(),f.closest(".breadcrumb").find("li.active").removeClass("active").children().attr("aria-expanded","false"),a("#"+f.data("pagenav")+" .caldera-form-page").hide().attr("aria-hidden","true").css("visibility","hidden"),a("#"+f.data("pagenav")+'\t.caldera-form-page[data-formpage="'+f.data("page")+'"]').show().attr("aria-hidden","false").css("visibility","visible"),f.parent().addClass("active").children().attr("aria-expanded","true")),a("html, body").animate({scrollTop:h.offset().top-100},200),a(document).trigger("cf.pagenav")}});var b;a(".caldera-grid .breadcrumb").each(function(c,d){a(d).find("a[data-pagenav]").each(function(c,d){var e=a(d),f=e.data("pagenav");a("#"+f+' .caldera-form-page[data-formpage="'+e.data("page")+'"]').find(".has-error").length&&(e.parent().addClass("error"),void 0===b&&(e.trigger("click"),b=!0))})}),a(document).on("click",'form.caldera_forms_form [type="submit"]',function(b){var c=a(this),d=c.closest(".caldera_forms_form"),e=cf_validate_form(d);if(a(document).trigger("cf.form.submit",{e:b,$form:d}),e.validate())a(document).trigger("cf.form.validated",{e:b,$form:d}),e.destroy();else{if(a(".caldera-form-page").length){var f=c.parents(".caldera-form-page").data("formpage"),g=[],h=[];if(e.fields.forEach(function(a,b){if(!0!==a.validationResult){var c=a.$element.parents(".caldera-form-page");if(void 0!=c&&c.length&&a.$element.parents(".caldera-form-page").data("formpage")>f)return void h.push(a.$element.data("field"));g.push(a)}}),!g.length)return h.length&&d.append('<input type="hidden" name="_cf_future" value="'+h.toString()+'">'),void e.destroy()}b.preventDefault()}}),a(document).on("cf.form.submit",function(a,b){b.$form.find(".breadcrumb").hide().attr("aria-hidden",!0).css("visibility","hidden")})}(jQuery),window.addEventListener("load",function(){!function(a){"use strict";if(window.CALDERA_FORMS={},"object"==typeof CF_API_DATA){var b,c,d={};a(".caldera_forms_form").each(function(e,f){b=a(f),c=b.data("form-id"),d[c]=new CalderaFormsResetNonce(c,CF_API_DATA,a),d[c].init()})}if("object"==typeof CFFIELD_CONFIG){var e,f,g,h,b,i,j,k,l=!1,m=!1;a(".caldera_forms_form").each(function(d,n){if(b=a(n),e=b.attr("id"),h=b.data("instance"),"object"==typeof CFFIELD_CONFIG[h]){k=a(document.getElementById(e)),m||(i=new CalderaFormsCrossOriginWarning(b,a,CFFIELD_CONFIG[h].error_strings),i.maybeWarn(),m=!0),!l&&CFFIELD_CONFIG[h].error_strings.hasOwnProperty("jquery_old")&&(j=new CalderaFormsJQueryWarning(b,a,CFFIELD_CONFIG[h].error_strings),j.maybeWarn(),l=!0),c=b.data("form-id"),g=CFFIELD_CONFIG[h].configs;var o=new CFState(c,a);o.init(CFFIELD_CONFIG[h].fields.defaults,CFFIELD_CONFIG[h].fields.calcDefaults),"object"!=typeof window.cfstate&&(window.cfstate={}),window.cfstate[e]=o,k.find("[data-sync]").each(function(){var b=a(this);new CalderaFormsFieldSync(b,b.data("binds"),k,a,o)}),f=new Caldera_Forms_Field_Config(g,a(document.getElementById(e)),a,o),f.init(),a(document).trigger("cf.form.init",{idAttr:e,formId:c,state:o,fieldIds:CFFIELD_CONFIG[h].fields.hasOwnProperty("ids")?CFFIELD_CONFIG[h].fields.ids:[]})}})}}(jQuery)});
1
+ function CalderaFormsFieldSync(a,b,c,d,e){for(var f=0;f<b.length;f++)d(document).on("keyup change blur mouseover","[data-field='"+b[f]+"']",function(){if(a.data("sync")){var b=a.data("sync");if(id=a.data("field"),reg=new RegExp("{{([^}]*?)}}","g"),template=b.match(reg),!a.data("unsync")&&void 0!=template&&template.length){for(var f=0;f<template.length;f++){for(var g=template[f].replace(/\}/g,"").replace(/\{/g,""),h=new RegExp(template[f],"g"),i=c.find("[data-field='"+g+"']"),j="",k=0;k<i.length;k++){var l=d(i[k]);(!l.is(":radio")&&!l.is(":checkbox")||l.is(":checked"))&&(j+=l.val())}b=b.replace(h,j)}e.mutateState(a.attr("id"),j),a.val(b)}}}),d("[data-field='"+b[f]+"']").trigger("change"),a.on("keyup change",function(){a.attr("data-unsync","1"),a.removeAttr("data-sync"),a.removeAttr("data-binds")})}function CalderaFormsResetNonce(a,b,c){function d(a){return(new Date).getTime()-36e3>a}function e(){c.ajax({url:b.rest.tokens.nonce,method:"POST",beforeSend:function(a){a.setRequestHeader("X-WP-Nonce",b.rest.nonce)},data:{form_id:a}}).success(function(a){f.val(a.nonce),f.data("nonce-time",(new Date).getTime())})}var f;this.init=function(){f=c("#"+b.nonce.field+"_"+a),d(f.data("nonce-time"))&&e()}}function caldera_forms_check_protocol(a){var b=window.location.protocol,c=document.createElement("a");return c.href=a,c.protocol===b}function CalderaFormsCrossOriginWarning(a,b,c){function d(){b(a.data("target")).append('<div class="alert alert-warning">'+c.mixed_protocol+"</div>")}this.maybeWarn=function(){if(a.find('[name="cfajax"]').length){caldera_forms_check_protocol(a.data("request"))||d()}}}function CalderaFormsJQueryWarning(a,b,c){function d(){b(a.data("target")).append('<div class="alert alert-warning">'+c.jquery_old+"</div>")}function e(a){var b=a.split(".");if(1==b[0]){if(12>b[2])return!0;if(4>b[2])return!0}return!1}this.maybeWarn=function(){var a=b.fn.jquery;"string"==typeof a&&"1.12.4"!=a&&e(a)&&d()}}var cf_jsfields_init,cf_presubmit;!function(a){cf_validate_form=function(b){return b.parsley({errorsWrapper:'<span class="help-block caldera_ajax_error_block"></span>',errorTemplate:"<span></span>",errorsContainer:function(a){return a.$element.closest(".form-group")}}).on("field:error",function(c){this.$element.closest(".form-group").addClass("has-error"),a(document).trigger("cf.validate.fieldError",{inst:c,form:b,el:this.$element})}).on("field:success",function(c){if("star"===this.$element.data("type")&&this.$element.prop("required")&&0==this.$element.val())return void(c.validationResult=!1);this.$element.closest(".form-group").removeClass("has-error"),a(document).trigger("cf.validate.fieldSuccess",{inst:c,form:b,el:this.$element})}).on("form:success",function(c){a(document).trigger("cf.validate.FormSuccess",{inst:c,form:b,el:this.$element})}).on("form:error",function(c){a(document).trigger("cf.validate.FormError",{inst:c,form:b,el:this.$element})})},cf_jsfields_init=function(){a(".init_field_type[data-type]").each(function(b,c){var d=a(c);"function"==typeof window[d.data("type")+"_init"]&&window[d.data("type")+"_init"](d.prop("id"),d[0])}),window.Parsley.on("field:validated",function(){setTimeout(function(){a(document).trigger("cf.error")},15)}),"undefined"==typeof resBaldrickTriggers&&a(".caldera_forms_form").length,a(document).trigger("cf.fieldsInit")},a("document").ready(function(){cf_jsfields_init()}),a(".caldera-form-page").length&&a(".caldera-form-page").on("keypress","[data-field]:not(textarea)",function(a){13===a.keyCode&&a.preventDefault()}),a(document).on("click",".cf_modal_button",function(b){b.preventDefault();var c=a(this);a(c.attr("href")).show()}),a(document).on("click",".caldera-front-modal-closer",function(b){b.preventDefault(),a(this).closest(".caldera-front-modal-container").hide()}),a(document).on("cf.add cf.enable cf.disable cf.pagenav",cf_jsfields_init),a(document).on("click","[data-page]",function(b){var c,d,e,f=a(this),g=f.closest(".caldera-form-page"),h=f.closest("form.caldera_forms_form"),i=(h.attr("id"),h.data("instance")),j=h.find(".caldera-form-page:visible").data("formpage"),k=g.data("formpage")?g.data("formpage"):f.data("page"),l=a('.breadcrumb[data-form="caldera_form_'+i+'"]'),m=!0,n=j;if(h.length){if(cf_validate_form(h).destroy(),e=h.find("[data-field]"),h.find(".has-error").removeClass("has-error"),"prev"!==f.data("page")&&k>=j){e=a("#caldera_form_"+i+' [data-formpage="'+j+'"] [data-field]');for(var o,p=0;p<e.length;p++)o=a(e[p]),o.hasClass("cf-multi-uploader")||o.hasClass("cf-multi-uploader-list")||!0!==o.parsley().isValid()&&(b.preventDefault(),m=!1);if(!0===m&&k>j)for(var q=k-1;q>=1;q--){e=a("#caldera_form_"+i+' [data-formpage="'+q+'"] [data-field]');for(var p=0;p<e.length;p++)o=a(e[p]),o.parsley().validate(),!0!==o.parsley().isValid({force:!0})&&(b.preventDefault(),m=!1,q>n&&(n=q))}}if(!1===m)return n!==j&&(a("#form_page_"+i+"_pg_"+j).hide().attr("aria-hidden","true").css("visibility","hidden"),a("#form_page_"+i+"_pg_"+n).show().attr("aria-hidden","false").css("visibility","visible")),cf_validate_form(h).validate(),!1;"next"===f.data("page")?(l&&l.find("li.active").removeClass("active").children().attr("aria-expanded","false"),c=h.find('.caldera-form-page[data-formpage="'+(k+1)+'"]'),c.length&&(g.hide().attr("aria-hidden","true").css("visibility","hidden"),c.show().attr("aria-hidden","false").css("visibility","visible"),l&&l.find('a[data-page="'+(k+1)+'"]').attr("aria-expanded","true").parent().addClass("active"))):"prev"===f.data("page")?(l&&l.find("li.active").removeClass("active").children().attr("aria-expanded","false"),d=h.find('.caldera-form-page[data-formpage="'+(k-1)+'"]'),d.length&&(g.hide().attr("aria-hidden","true").css("visibility","hidden"),d.show().attr("aria-hidden","false").css("visibility","visible"),l&&l.find('a[data-page="'+(k-1)+'"]').attr("aria-expanded","true").parent().addClass("active"))):f.data("pagenav")&&(b.preventDefault(),f.closest(".breadcrumb").find("li.active").removeClass("active").children().attr("aria-expanded","false"),a("#"+f.data("pagenav")+" .caldera-form-page").hide().attr("aria-hidden","true").css("visibility","hidden"),a("#"+f.data("pagenav")+'\t.caldera-form-page[data-formpage="'+f.data("page")+'"]').show().attr("aria-hidden","false").css("visibility","visible"),f.parent().addClass("active").children().attr("aria-expanded","true")),a("html, body").animate({scrollTop:h.offset().top-100},200),a(document).trigger("cf.pagenav")}});var b;a(".caldera-grid .breadcrumb").each(function(c,d){a(d).find("a[data-pagenav]").each(function(c,d){var e=a(d),f=e.data("pagenav");a("#"+f+' .caldera-form-page[data-formpage="'+e.data("page")+'"]').find(".has-error").length&&(e.parent().addClass("error"),void 0===b&&(e.trigger("click"),b=!0))})}),a(document).on("click",'form.caldera_forms_form [type="submit"]',function(b){var c=a(this),d=c.closest(".caldera_forms_form"),e=cf_validate_form(d);if(a(document).trigger("cf.form.submit",{e:b,$form:d}),e.validate())a(document).trigger("cf.form.validated",{e:b,$form:d}),e.destroy();else{if(a(".caldera-form-page").length){var f=c.parents(".caldera-form-page").data("formpage"),g=[],h=[];if(e.fields.forEach(function(a,b){if(!0!==a.validationResult){var c=a.$element.parents(".caldera-form-page");if(void 0!=c&&c.length&&a.$element.parents(".caldera-form-page").data("formpage")>f)return void h.push(a.$element.data("field"));g.push(a)}}),!g.length)return h.length&&d.append('<input type="hidden" name="_cf_future" value="'+h.toString()+'">'),void e.destroy()}b.preventDefault()}})}(jQuery),window.addEventListener("load",function(){!function(a){"use strict";if(window.CALDERA_FORMS={},"object"==typeof CF_API_DATA){var b,c,d={};a(".caldera_forms_form").each(function(e,f){b=a(f),c=b.data("form-id"),d[c]=new CalderaFormsResetNonce(c,CF_API_DATA,a),d[c].init()})}if("object"==typeof CFFIELD_CONFIG){var e,f,g,h,b,i,j,k,l=!1,m=!1;a(".caldera_forms_form").each(function(d,n){if(b=a(n),e=b.attr("id"),h=b.data("instance"),"object"==typeof CFFIELD_CONFIG[h]){k=a(document.getElementById(e)),m||(i=new CalderaFormsCrossOriginWarning(b,a,CFFIELD_CONFIG[h].error_strings),i.maybeWarn(),m=!0),!l&&CFFIELD_CONFIG[h].error_strings.hasOwnProperty("jquery_old")&&(j=new CalderaFormsJQueryWarning(b,a,CFFIELD_CONFIG[h].error_strings),j.maybeWarn(),l=!0),c=b.data("form-id"),g=CFFIELD_CONFIG[h].configs;var o=new CFState(c,a);o.init(CFFIELD_CONFIG[h].fields.defaults,CFFIELD_CONFIG[h].fields.calcDefaults),"object"!=typeof window.cfstate&&(window.cfstate={}),window.cfstate[e]=o,k.find("[data-sync]").each(function(){var b=a(this);b.data("unsync")||new CalderaFormsFieldSync(b,b.data("binds"),k,a,o)}),f=new Caldera_Forms_Field_Config(g,a(document.getElementById(e)),a,o),f.init(),a(document).trigger("cf.form.init",{idAttr:e,formId:c,state:o,fieldIds:CFFIELD_CONFIG[h].fields.hasOwnProperty("ids")?CFFIELD_CONFIG[h].fields.ids:[]})}})}}(jQuery)});var cf_jsfields_init,cf_validate_form;!function(a){cf_validate_form=function(a){return a.parsley({errorsWrapper:'<span class="help-block caldera_ajax_error_block"></span>',errorTemplate:"<span></span>",errorsContainer:function(a){return a.$element.closest(".form-group")}}).on("field:error",function(){this.$element.closest(".form-group").addClass("has-error")}).on("field:success",function(){this.$element.closest(".form-group").removeClass("has-error")})},a("[data-sync]").each(function(){for(var b=a(this),c=b.data("binds"),d=b.closest("form"),e=0;e<c.length;e++)a(document).on("keyup change blur mouseover","[data-field='"+c[e]+"']",function(){var c=b.data("sync");if(id=a(this).data("field"),reg=new RegExp("{{([^}]*?)}}","g"),template=c.match(reg),!b.data("unsync")){for(var e=0;e<template.length;e++){for(var f=template[e].replace(/\}/g,"").replace(/\{/g,""),g=new RegExp(template[e],"g"),h=d.find("[data-field='"+f+"']"),i="",j=0;j<h.length;j++){var k=a(h[j]);(!k.is(":radio")&&!k.is(":checkbox")||k.is(":checked"))&&(i+=k.val())}c=c.replace(g,i)}b.val(c)}}),a("[data-field='"+c[e]+"']").trigger("change")}),a(document).on("change keypress","[data-sync]",function(){a(this).data("unsync",!0)}),cf_jsfields_init=function(){a(".init_field_type[data-type]").each(function(b,c){var d=a(c);"function"==typeof window[d.data("type")+"_init"]&&window[d.data("type")+"_init"](d.prop("id"),d[0])}),"undefined"!=typeof cfValidatorLocal&&window.Parsley.setLocale(cfValidatorLocal),"undefined"!=typeof cfModals&&void 0!==cfModals.config&&void 0!==cfModals.config.validator_lang&&window.Parsley.setLocale(cfModals.config.validator_lang),window.Parsley.on("field:validated",function(){setTimeout(function(){a(document).trigger("cf.error")},15)}),"undefined"==typeof resBaldrickTriggers&&a(".caldera_forms_form").length},a("document").ready(function(){cf_jsfields_init()}),a(".caldera-form-page").length&&a(".caldera-form-page").on("keypress","[data-field]:not(textarea)",function(a){13===a.keyCode&&a.preventDefault()}),a(document).on("click",".cf_modal_button",function(b){b.preventDefault();var c=a(this);a(c.attr("href")).show()}),a(document).on("click",".caldera-front-modal-closer",function(b){b.preventDefault(),a(this).closest(".caldera-front-modal-container").hide()}),a(document).on("cf.add cf.enable cf.disable cf.pagenav",cf_jsfields_init),a(document).on("click","[data-page]",function(b){var c,d,e,f=a(this),g=f.closest(".caldera-form-page"),h=f.closest("form.caldera_forms_form"),i=h.data("instance"),j=h.find(".caldera-form-page:visible").data("formpage"),k=g.data("formpage")?g.data("formpage"):f.data("page"),l=a('.breadcrumb[data-form="caldera_form_'+i+'"]'),m=!0,n={};if(h.length){if(cf_validate_form(h).destroy(),e=h.find("[data-field]"),h.find(".has-error").removeClass("has-error"),"prev"!==f.data("page")&&k>=j)for(var o=0;o<e.length;o++){var p=a(e[o]);if(p.is(":radio,:checkbox")){if(!p.hasClass("option-required")||!1===p.is(":visible"))continue;n[p.data("field")]||(n[p.data("field")]=[]),n[p.data("field")].push(p.prop("checked"))}else{if(p.prop("required")&&!1===p.is(":visible"))continue;if(p.prop("required")&&!0!==p.parsley().isValid()){if(p.is(":visible"))p.parsley().validate(),b.preventDefault();else{var q=parseFloat(p.closest(".caldera-form-page[data-formpage]").data("formpage"));q<parseFloat(k)&&h.find('[data-page="'+q+'"]').addClass("has-error")}m=!1}}}for(var r in n)n[r].indexOf(!0)<0?(a('[for="'+r+"_"+i+'"]').parent().addClass("has-error"),m=!1):a('[for="'+r+"_"+i+'"]').parent().removeClass("has-error");if(!1===m)return cf_validate_form(h).validate(),!1;"next"===f.data("page")?(l&&l.find("li.active").removeClass("active").children().attr("aria-expanded","false"),c=h.find('.caldera-form-page[data-formpage="'+(k+1)+'"]'),c.length&&(g.hide().attr("aria-hidden","true").css("visibility","hidden"),c.show().attr("aria-hidden","false").css("visibility","visible"),l&&l.find('a[data-page="'+(k+1)+'"]').attr("aria-expanded","true").parent().addClass("active"))):"prev"===f.data("page")?(l&&l.find("li.active").removeClass("active").children().attr("aria-expanded","false"),d=h.find('.caldera-form-page[data-formpage="'+(k-1)+'"]'),d.length&&(g.hide().attr("aria-hidden","true").css("visibility","hidden"),d.show().attr("aria-hidden","false").css("visibility","visible"),l&&l.find('a[data-page="'+(k-1)+'"]').attr("aria-expanded","true").parent().addClass("active"))):f.data("pagenav")&&(b.preventDefault(),f.closest(".breadcrumb").find("li.active").removeClass("active").children().attr("aria-expanded","false"),a("#"+f.data("pagenav")+" .caldera-form-page").hide().attr("aria-hidden","true").css("visibility","hidden"),a("#"+f.data("pagenav")+'\t.caldera-form-page[data-formpage="'+f.data("page")+'"]').show().attr("aria-hidden","false").css("visibility","visible"),f.parent().addClass("active").children().attr("aria-expanded","true")),a("html, body").animate({scrollTop:h.offset().top-100},200),a(document).trigger("cf.pagenav")}});var b;a(".caldera-grid .breadcrumb").each(function(c,d){a(d).find("a[data-pagenav]").each(function(c,d){var e=a(d),f=e.data("pagenav");a("#"+f+' .caldera-form-page[data-formpage="'+e.data("page")+'"]').find(".has-error").length&&(e.parent().addClass("error"),void 0===b&&(e.trigger("click"),b=!0))})}),a(document).on("click",'form.caldera_forms_form [type="submit"]',function(b){var c=a(this),d=c.closest(".caldera_forms_form"),e=cf_validate_form(d);e.validate()?e.destroy():b.preventDefault()})}(jQuery);
assets/build/js/i18n/et.js ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Validation errors messages for Parsley
2
+ // Load this after Parsley
3
+
4
+ Parsley.addMessages('et', {
5
+ defaultMessage: "See väärtus ei sobi.",
6
+ type: {
7
+ email: "See väärtus peab olema kehtiv email.",
8
+ url: "See väärtus peab olema kehtiv link.",
9
+ number: "See väärtus peab olema number.",
10
+ integer: "See väärtus peab olema täisarv.",
11
+ digits: "See väärtus peab olema number.",
12
+ alphanum: "See väärtus peab olema täht või number."
13
+ },
14
+ notblank: "See väärtus ei tohi olla tühi.",
15
+ required: "See väärtus on nõutud.",
16
+ pattern: "See väärtus ei sobi.",
17
+ min: "See väärtus peab olema suurem või võrdne %s.",
18
+ max: "See väärtus peab olema väiksem või võrdne %s.",
19
+ range: "See väärtus peab olema %s ja %s vahel.",
20
+ minlength: "See väärtus on liiga lühike. Peab olema vähemalt %s tähte.",
21
+ maxlength: "See väärtus ei tohi olla rohkem kui %s tähte.",
22
+ length: "See väärtuse pikkus ei sobi. Peab olema vahemikus %s - %s.",
23
+ mincheck: "Pead valima vähemalt %s valikut.",
24
+ maxcheck: "Maksimaalselt %s valikut.",
25
+ check: "Valik peab olema vahemikus %s ja %s .",
26
+ equalto: "See väärtus peab olema sama."
27
+ });
28
+
29
+ Parsley.setLocale('et');
assets/build/js/i18n/tk.js ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Validation errors messages for Parsley
2
+ // Load this after Parsley
3
+
4
+ Parsley.addMessages('tk', {
5
+ defaultMessage: "Bu maglumat nädogry.",
6
+ type: {
7
+ email: "Dogry e-poçta adresi ýazmaly.",
8
+ url: "Dogry web sahypa salgysy ýazmaly.",
9
+ number: "Dogry san ýazmaly.",
10
+ integer: "Dogry bitin san ýazmaly.",
11
+ digits: "San ýazmaly.",
12
+ alphanum: "San ýa-da harp ýazmaly."
13
+ },
14
+ notblank: "Bu ýeri boş goýmaly däl.",
15
+ required: "Bu ýeri doldurmak hökmany.",
16
+ pattern: "Bu maglumat nädogry.",
17
+ min: "Iň azyndan %s ýa-da ondan uly bolmaly.",
18
+ max: "Iň köp %s ýa-da ondan kiçi bolmaly.",
19
+ range: "Bu ýer %s we %s aralygynda san bolmaly.",
20
+ minlength: "Bu ýeriň uzynlygy iň azyndan %s harp ýa-da ondan köp bolmaly.",
21
+ maxlength: "Bu ýeriň uzynlygy iň köp %s harp ýa-da ondan az bolmaly.",
22
+ length: "Bu ýeriň uzynlygy %s we %s harp aralygynda bolmaly.",
23
+ mincheck: "Iň azyndan %s sanysyny saýlamaly.",
24
+ maxcheck: "Iň köp %s sanysyny saýlamaly.",
25
+ check: "Iň az %s, iň köp %s sanysyny saýlamaly.",
26
+ equalto: "Bu maglumat deň bolmaly."
27
+ });
28
+
29
+ Parsley.setLocale('tk');
assets/build/js/jquery.min.js CHANGED
@@ -1 +1,2 @@
1
- !function(a){if(!b){var b={},c={},d={_plugins:{},load:{},bind:{},event:function(a,b){return a},pre_filter:function(a){return a.data},filter:function(a){return a},target:function(a){if("string"==typeof a.params.success?"function"==typeof window[a.params.success]&&window[a.params.success](a):"function"==typeof a.params.success&&a.params.success(a),a.params.target)if(a.params.target.is("textarea,input")&&"object"==typeof a.data?a.params.target.val(JSON.stringify(a.data)).trigger("change"):a.params.target[a.params.targetInsert](a.data),"string"==typeof a.params.callback){if("function"==typeof window[a.params.callback])return window[a.params.callback](a)}else if("function"==typeof a.params.callback)return a.params.callback(a)},request_data:function(a){return a.data},request:function(d){if((d.params.trigger.data("cacheLocal")||d.params.trigger.data("cacheSession"))&&!d.params.trigger.data("cachePurge")){var e;if(d.params.trigger.data("cacheLocal")?e=d.params.trigger.data("cacheLocal"):d.params.trigger.data("cacheSession")&&(e=d.params.trigger.data("cacheSession")),"undefined"!=typeof b[e])return{data:b[e]};if("undefined"!=typeof Storage){var f;if(d.params.trigger.data("cacheLocal")?f=localStorage.getItem(e):d.params.trigger.data("cacheSession")&&(f=sessionStorage.getItem(e)),f){try{f=JSON.parse(f)}catch(a){f=f}return{data:f}}}}return c[d.params.trigger.prop("id")]&&c[d.params.trigger.prop("id")].abort(),c[d.params.trigger.prop("id")]=a.ajax(d.request),c[d.params.trigger.prop("id")]},request_complete:function(a){a.params.complete(a),a.params.loadElement.removeClass(a.params.loadClass),c[a.params.trigger.prop("id")]&&delete c[a.params.trigger.prop("id")]},request_error:function(a){a.params.error(a),a.params.complete(a.jqxhr,a.textStatus)},refresh:function(b,c){a(c.triggerClass).baldrick(c)}};a.fn.baldrick=function(b){var c=function(a,b,c){var d;for(var e in h.helpers._plugins)if("function"==typeof h.helpers._plugins[e][a]&&(d=h.helpers._plugins[e][a](b,h,c),"undefined"!=typeof d&&(b=d),b===!1))return!1;if("function"==typeof h.helpers[a]&&(d=h.helpers[a](b,h,c),"undefined"!=typeof d&&(b=d),!b))return!1;for(var f in h.helpers._plugins)if("function"==typeof h.helpers._plugins[f]["after_"+a]&&(d=h.helpers._plugins[f]["after_"+a](b,h,c),"undefined"!=typeof d&&(b=d),b===!1))return!1;return b},e=function(b){var c={},d=b.find("input,radio,checkbox,select,textarea,file"),e={};if(d.length){for(var f=0;f<d.length;f++)if(null!==d[f].getAttribute("name")){for(var g=a(d[f]),h=g.prop("name").replace(/\[/gi,":").replace(/\]/gi,""),i=h.split(":"),j=g.is(":checkbox,:radio")?g.filter(":checked").val():g.val(),k={},l=i.length-1;l>=0;l--){var m=i[l];if(0===m.length&&("undefined"==typeof e[i[l-1]]?e[i[l-1]]=0:e[i[l-1]]+=1,m=e[i[l-1]]),l===i.length-1)k[m]=j;else{var n=k;k={},k[m]=n}}a.extend(!0,c,k)}return c}},f=this.selector,g=this.not("._tisBound");g.addClass("_tisBound"),"undefined"!=typeof b&&"object"==typeof b.helper&&(d._plugins._params_helpers_=b.helper);var h=a.extend(!0,b,{helpers:d},{triggerClass:f}),i=function(){return!0},j={init:i,before:i,callback:!1,success:!1,complete:i,error:i};for(var k in j)"string"==typeof h[k]?j[k]="function"==typeof window[h[k]]?window[h[k]]:i:"function"==typeof h[k]&&(j[k]=h[k]);return g=c("bind",g),g===!1?this:c("ready",g.each(function(b){this.id||(this.id="baldrick_trigger_"+((new Date).getTime()+b));var d=a(this),f=d.data("event")?d.data("event"):h.event?h.event:d.is("form")?"submit":"click";return d.on(f,function(b){var d=a(c("event",this,b));if(d.data("for")){var i=a(d.data("for")),k=a.extend({},i.data(),d.data());return delete k.for,i.data(k),i.is("form")?(i.submit(),this):i.trigger(i.data("event")?i.data("event"):f)}if(d.is("form")&&!d.data("request")&&d.attr("action")&&d.data("request",d.attr("action")),d.is("a")&&!d.data("request")&&d.attr("href")&&(d.attr("href").indexOf("#")<0?d.data("request",d.attr("href")):d.data("href",d.attr("href"))),(d.data("before")&&"function"==typeof window[d.data("before")]?window[d.data("before")](this,b):j.before(this,b))===!1)return void a(h.triggerClass).baldrick(h);if((d.data("init")&&"function"==typeof window[d.data("init")]?window[d.data("init")](this,b):j.init(this,b))===!1)return void a(h.triggerClass).baldrick(h);var l={trigger:d,callback:d.data("callback")?"function"==typeof window[d.data("callback")]?window[d.data("callback")]:d.data("callback"):j.callback,success:d.data("success")?"function"==typeof window[d.data("success")]?window[d.data("success")]:d.data("success"):j.success,method:d.data("method")?d.data("method"):d.attr("method")?d.attr("method"):h.method?h.method:"GET",dataType:d.data("type")?d.data("type"):!!h.dataType&&h.dataType,timeout:d.data("timeout")?d.data("timeout"):12e4,target:d.data("target")?"_parent"===d.data("target")?d.parent():a("_self"===d.data("target")?d:d.data("target")):a(h.target?h.target:"<html>"),targetInsert:d.data("targetInsert")?"replace"===d.data("targetInsert")?"replaceWith":d.data("targetInsert"):h.targetInsert?"replace"===h.targetInsert?"replaceWith":h.targetInsert:"html",loadClass:d.data("loadClass")?d.data("loadClass"):h.loadClass?h.loadClass:"loading",activeClass:d.data("activeClass")?d.data("activeClass"):h.activeClass?h.activeClass:"active",activeElement:d.data("activeElement")?"_parent"===d.data("activeElement")?d.parent():a(d.data("activeElement")):h.activeElement?"_parent"===h.activeElement?d.parent():a(h.activeElement):d,cache:d.data("cache")?d.data("cache"):!!h.cache&&h.cache,complete:d.data("complete")&&"function"==typeof window[d.data("complete")]?window[d.data("complete")]:j.complete,error:d.data("error")&&"function"==typeof window[d.data("error")]?window[d.data("error")]:j.error,resultSelector:!1,event:f};if(l.url=d.data("request")?d.data("request"):h.request?h.request:l.callback,l.loadElement=d.data("loadElement")?"_parent"===d.data("loadElement")?d.parent():a(d.data("loadElement")):h.loadElement&&a(h.loadElement)?a(h.loadElement):l.target,l=c("params",l),l===!1)return!1;if(b.preventDefault(),"function"==typeof window[l.url]){var m=window[l.url](l,f);return m=c("pre_filter",{data:m,params:l}),m=c("filter",{data:m,rawData:m,params:l}),c("target",m),c("refresh",{params:l}),c("request_complete",{jqxhr:null,textStatus:"complete",request:u,params:l}),this}try{if(a(l.url).length)var m=a(l.url).is("input,select,radio,checkbox,file,textarea")?a(l.url).val():a(l.url).is("form")?e(a(l.url)):a(l.url).html()}catch(a){}if("undefined"!=typeof m){if("json"===l.dataType)try{m=JSON.parse(m)}catch(a){}m=c("pre_filter",{data:m,params:l}),m=c("filter",{data:m,rawData:m,params:l}),c("target",m),c("refresh",{params:l}),c("request_complete",{jqxhr:null,textStatus:"complete",request:u,params:l});return this}switch(typeof l.url){case"function":return l.url(this,b);case"boolean":case"object":return;case"string":if(l.url.indexOf(" ")>-1){var n=l.url.split(" ");l.url=n[0],l.resultSelector=n[1]}}d.data("group")?a('._tisBound[data-group="'+d.data("group")+'"]').each(function(){var b=a(this),c=b.data("activeElement")?"_parent"===b.data("activeElement")?b.parent():a(b.data("activeElement")):h.activeElement?"_parent"===h.activeElement?d.parent():a(h.activeElement):b;c.removeClass(b.data("activeClass")?b.data("activeClass"):h.activeClass?h.activeClass:l.activeClass)}):a("._tisBound:not([data-group])").each(function(){var b=a(this),c=b.data("activeElement")?"_parent"===b.data("activeElement")?b.parent():a(b.data("activeElement")):h.activeElement?"_parent"===h.activeElement?d.parent():a(h.activeElement):b;c.removeClass(b.data("activeClass")?b.data("activeClass"):h.activeClass?h.activeClass:l.activeClass)});l.activeElement.addClass(l.activeClass),l.loadElement.addClass(l.loadClass);var o;if("undefined"==typeof FormData||!d.is("input:file")&&"POST"!==l.method){var p=d.serializeArray(),q=l.trigger.data(),r=[];h.data&&(q=a.extend(h.data,q)),p.length&&(a.each(p,function(a,b){r.push(b)}),l.requestData=e(d)),l.data&&(q=a.extend(q,l.data)),o=q,l.requestData=a.extend(d.data(),l.requestData)}else{l.method="POST",l.contentType=!1,l.processData=!1,l.cache=!1,l.xhrFields={onprogress:function(a){a.lengthComputable}},o=d.is("form")?new FormData(d[0]):new FormData,d.is("input,select,textarea")&&d.data("_value",d.val());for(var s in l.trigger.data())o.append(s,l.trigger.data(s));if(l.data&&o.append("data",JSON.stringify(l.data)),d.is("input,select,textarea"))if(d.is("input:file"))if(d[0].files.length>1)for(var t=0;t<d[0].files.length;t++)o.append(d.prop("name"),d[0].files[t]);else o.append(d.prop("name"),d[0].files[0]);else d.is("input:checkbox")||d.is("input:radio")?d.prop("checked")&&o.append(d.prop("name"),d.val()):o.append(d.prop("name"),d.val())}var u={url:l.url,data:c("request_data",{data:o,params:l}),cache:l.cache,timeout:l.timeout,type:l.method,success:function(b,d,e){if(l.resultSelector)if("object"==typeof b){for(var f=l.resultSelector.replace(/\[/g,".").replace(/\]/g,"").split("."),g=b,h=0;h<f.length;h++)g=g[f[h]];b=g}else if("string"==typeof b){var i=a(l.resultSelector,a("<html>").html(b));1===i.length?b=a("<html>").html(i).html():(b=a("<html>"),i.each(function(){b.append(this)}),b=b.html())}var j=b;if(l.trigger.data("cacheLocal")||l.trigger.data("cacheSession")){var k;if(l.trigger.data("cacheLocal")?k=l.trigger.data("cacheLocal"):l.trigger.data("cacheSession")&&(k=l.trigger.data("cacheSession")),"undefined"!=typeof Storage)if(l.trigger.data("cacheLocal"))try{localStorage.setItem(k,e.responseText)}catch(a){console.log(a)}else if(l.trigger.data("cacheSession"))try{sessionStorage.setItem(k,e.responseText)}catch(a){console.log(a)}a(window).trigger("baldrick.cache",k)}b=c("pre_filter",{data:b,request:u,params:l,xhr:e}),b=c("filter",{data:b,rawData:j,request:u,params:l,xhr:e}),c("target",b)},complete:function(a,b){c("request_complete",{jqxhr:a,textStatus:b,request:u,params:l}),c("refresh",{jqxhr:a,textStatus:b,request:u,params:l}),d.data("once")&&d.off(f).removeClass("_tisBound")},error:function(a,b,d){c("request_error",{jqxhr:a,textStatus:b,error:d,request:u,params:l})}};if(l.dataType&&(u.dataType=l.dataType),"undefined"!=typeof l.contentType&&(u.contentType=l.contentType),"undefined"!=typeof l.processData&&(u.processData=l.processData),"undefined"!=typeof l.xhrFields&&(u.xhrFields=l.xhrFields),u=c("request_params",u,l),u===!1)return g;var v=c("request",{request:u,params:l});if(v.data){var m=v.data;c("target",c("filter",c("pre_filter",{data:m,request:u,params:l}))),c("request_complete",{jqxhr:!1,textStatus:!0,request:u,params:l}),c("refresh",{jqxhr:!1,textStatus:!0,request:u,params:l})}}),(d.data("autoload")||d.data("poll"))&&(d.data("delay")?setTimeout(function(a,b){return a.trigger(b)},d.data("delay"),d,f):d.trigger(f)),d.data("poll")&&(d.data("delay")?setTimeout(function(a,b){return setInterval(function(a,b){return a.trigger(b)},a.data("poll"),a,b)},d.data("delay")):setInterval(function(a,b){return a.trigger(b)},d.data("poll"),d,f)),this}))},a.fn.baldrick.cacheObject=function(a,c){b[a]=c},a.fn.baldrick.registerhelper=function(b,c,e){var f={};"object"==typeof c?(f[b]=c,d._plugins=a.extend(!0,f,d._plugins)):"string"==typeof c&&"string"==typeof b&&"function"==typeof e&&(f[c]={},f[c][b]=e,d._plugins=a.extend(!0,f,d._plugins))}}}(jQuery);
 
1
+ !function(a){if(!b){var b={},c={},d={_plugins:{},load:{},bind:{},event:function(a,b){return a},pre_filter:function(a){return a.data},filter:function(a){return a},target:function(a){if("string"==typeof a.params.success?"function"==typeof window[a.params.success]&&window[a.params.success](a):"function"==typeof a.params.success&&a.params.success(a),a.params.target)if(a.params.target.is("textarea,input")&&"object"==typeof a.data?a.params.target.val(JSON.stringify(a.data)).trigger("change"):a.params.target[a.params.targetInsert](a.data),"string"==typeof a.params.callback){if("function"==typeof window[a.params.callback])return window[a.params.callback](a)}else if("function"==typeof a.params.callback)return a.params.callback(a)},request_data:function(a){return a.data},request:function(d){if((d.params.trigger.data("cacheLocal")||d.params.trigger.data("cacheSession"))&&!d.params.trigger.data("cachePurge")){var e;if(d.params.trigger.data("cacheLocal")?e=d.params.trigger.data("cacheLocal"):d.params.trigger.data("cacheSession")&&(e=d.params.trigger.data("cacheSession")),void 0!==b[e])return{data:b[e]};if("undefined"!=typeof Storage){var f;if(d.params.trigger.data("cacheLocal")?f=localStorage.getItem(e):d.params.trigger.data("cacheSession")&&(f=sessionStorage.getItem(e)),f){try{f=JSON.parse(f)}catch(a){f=f}return{data:f}}}}return c[d.params.trigger.prop("id")]&&c[d.params.trigger.prop("id")].abort(),c[d.params.trigger.prop("id")]=a.ajax(d.request),c[d.params.trigger.prop("id")]},request_complete:function(a){a.params.complete(a),a.params.loadElement.removeClass(a.params.loadClass),c[a.params.trigger.prop("id")]&&delete c[a.params.trigger.prop("id")]},request_error:function(a){a.params.error(a),a.params.complete(a.jqxhr,a.textStatus)},refresh:function(b,c){a(c.triggerClass).baldrick(c)}};a.fn.baldrick=function(b){var c=function(a,b,c){var d;for(var e in h.helpers._plugins)if("function"==typeof h.helpers._plugins[e][a]&&(d=h.helpers._plugins[e][a](b,h,c),void 0!==d&&(b=d),!1===b))return!1;if("function"==typeof h.helpers[a]&&(d=h.helpers[a](b,h,c),void 0!==d&&(b=d),!b))return!1;for(var f in h.helpers._plugins)if("function"==typeof h.helpers._plugins[f]["after_"+a]&&(d=h.helpers._plugins[f]["after_"+a](b,h,c),void 0!==d&&(b=d),!1===b))return!1;return b},e=function(b){var c={},d=b.find("input,radio,checkbox,select,textarea,file"),e={};if(d.length){for(var f=0;f<d.length;f++)if(null!==d[f].getAttribute("name")){for(var g=a(d[f]),h=g.prop("name").replace(/\[/gi,":").replace(/\]/gi,""),i=h.split(":"),j=g.is(":checkbox,:radio")?g.filter(":checked").val():g.val(),k={},l=i.length-1;l>=0;l--){var m=i[l];if(0===m.length&&(void 0===e[i[l-1]]?e[i[l-1]]=0:e[i[l-1]]+=1,m=e[i[l-1]]),l===i.length-1)k[m]=j;else{var n=k;k={},k[m]=n}}a.extend(!0,c,k)}return c}},f=this.selector,g=this.not("._tisBound");g.addClass("_tisBound"),void 0!==b&&"object"==typeof b.helper&&(d._plugins._params_helpers_=b.helper);var h=a.extend(!0,b,{helpers:d},{triggerClass:f}),i=function(){return!0},j={init:i,before:i,callback:!1,success:!1,complete:i,error:i};for(var k in j)"string"==typeof h[k]?j[k]="function"==typeof window[h[k]]?window[h[k]]:i:"function"==typeof h[k]&&(j[k]=h[k]);return g=c("bind",g),!1===g?this:c("ready",g.each(function(b){this.id||(this.id="baldrick_trigger_"+((new Date).getTime()+b));var d=a(this),f=d.data("event")?d.data("event"):h.event?h.event:d.is("form")?"submit":"click";return d.on(f,function(b){var d=a(c("event",this,b));if(d.data("for")){var i=a(d.data("for")),k=a.extend({},i.data(),d.data());return delete k.for,i.data(k),i.is("form")?(i.submit(),this):i.trigger(i.data("event")?i.data("event"):f)}if(d.is("form")&&!d.data("request")&&d.attr("action")&&d.data("request",d.attr("action")),d.is("a")&&!d.data("request")&&d.attr("href")&&(d.attr("href").indexOf("#")<0?d.data("request",d.attr("href")):d.data("href",d.attr("href"))),!1===(d.data("before")&&"function"==typeof window[d.data("before")]?window[d.data("before")](this,b):j.before(this,b)))return void a(h.triggerClass).baldrick(h);if(!1===(d.data("init")&&"function"==typeof window[d.data("init")]?window[d.data("init")](this,b):j.init(this,b)))return void a(h.triggerClass).baldrick(h);var l={trigger:d,callback:d.data("callback")?"function"==typeof window[d.data("callback")]?window[d.data("callback")]:d.data("callback"):j.callback,success:d.data("success")?"function"==typeof window[d.data("success")]?window[d.data("success")]:d.data("success"):j.success,method:d.data("method")?d.data("method"):d.attr("method")?d.attr("method"):h.method?h.method:"GET",dataType:d.data("type")?d.data("type"):!!h.dataType&&h.dataType,timeout:d.data("timeout")?d.data("timeout"):12e4,target:d.data("target")?"_parent"===d.data("target")?d.parent():a("_self"===d.data("target")?d:d.data("target")):a(h.target?h.target:"<html>"),targetInsert:d.data("targetInsert")?"replace"===d.data("targetInsert")?"replaceWith":d.data("targetInsert"):h.targetInsert?"replace"===h.targetInsert?"replaceWith":h.targetInsert:"html",loadClass:d.data("loadClass")?d.data("loadClass"):h.loadClass?h.loadClass:"loading",activeClass:d.data("activeClass")?d.data("activeClass"):h.activeClass?h.activeClass:"active",activeElement:d.data("activeElement")?"_parent"===d.data("activeElement")?d.parent():a(d.data("activeElement")):h.activeElement?"_parent"===h.activeElement?d.parent():a(h.activeElement):d,cache:d.data("cache")?d.data("cache"):!!h.cache&&h.cache,complete:d.data("complete")&&"function"==typeof window[d.data("complete")]?window[d.data("complete")]:j.complete,error:d.data("error")&&"function"==typeof window[d.data("error")]?window[d.data("error")]:j.error,resultSelector:!1,event:f};if(l.url=d.data("request")?d.data("request"):h.request?h.request:l.callback,l.loadElement=d.data("loadElement")?"_parent"===d.data("loadElement")?d.parent():a(d.data("loadElement")):h.loadElement&&a(h.loadElement)?a(h.loadElement):l.target,!1===(l=c("params",l)))return!1;if(b.preventDefault(),"function"==typeof window[l.url]){var m=window[l.url](l,f);return m=c("pre_filter",{data:m,params:l}),m=c("filter",{data:m,rawData:m,params:l}),c("target",m),c("refresh",{params:l}),c("request_complete",{jqxhr:null,textStatus:"complete",request:u,params:l}),this}try{if(a(l.url).length)var m=a(l.url).is("input,select,radio,checkbox,file,textarea")?a(l.url).val():a(l.url).is("form")?e(a(l.url)):a(l.url).html()}catch(b){}if(void 0!==m){if("json"===l.dataType)try{m=JSON.parse(m)}catch(b){}m=c("pre_filter",{data:m,params:l}),m=c("filter",{data:m,rawData:m,params:l}),c("target",m),c("refresh",{params:l}),c("request_complete",{jqxhr:null,textStatus:"complete",request:u,params:l});return this}switch(typeof l.url){case"function":return l.url(this,b);case"boolean":case"object":return;case"string":if(l.url.indexOf(" ")>-1){var n=l.url.split(" ");l.url=n[0],l.resultSelector=n[1]}}d.data("group")?a('._tisBound[data-group="'+d.data("group")+'"]').each(function(){var b=a(this);(b.data("activeElement")?"_parent"===b.data("activeElement")?b.parent():a(b.data("activeElement")):h.activeElement?"_parent"===h.activeElement?d.parent():a(h.activeElement):b).removeClass(b.data("activeClass")?b.data("activeClass"):h.activeClass?h.activeClass:l.activeClass)}):a("._tisBound:not([data-group])").each(function(){var b=a(this);(b.data("activeElement")?"_parent"===b.data("activeElement")?b.parent():a(b.data("activeElement")):h.activeElement?"_parent"===h.activeElement?d.parent():a(h.activeElement):b).removeClass(b.data("activeClass")?b.data("activeClass"):h.activeClass?h.activeClass:l.activeClass)});l.activeElement.addClass(l.activeClass),l.loadElement.addClass(l.loadClass);var o;if("undefined"==typeof FormData||!d.is("input:file")&&"POST"!==l.method){var p=d.serializeArray(),q=l.trigger.data(),r=[];h.data&&(q=a.extend(h.data,q)),p.length&&(a.each(p,function(a,b){r.push(b)}),l.requestData=e(d)),l.data&&(q=a.extend(q,l.data)),o=q,l.requestData=a.extend(d.data(),l.requestData)}else{l.method="POST",l.contentType=!1,l.processData=!1,l.cache=!1,l.xhrFields={onprogress:function(a){a.lengthComputable}},o=d.is("form")?new FormData(d[0]):new FormData,d.is("input,select,textarea")&&d.data("_value",d.val());for(var s in l.trigger.data())o.append(s,l.trigger.data(s));if(l.data&&o.append("data",JSON.stringify(l.data)),d.is("input,select,textarea"))if(d.is("input:file"))if(d[0].files.length>1)for(var t=0;t<d[0].files.length;t++)o.append(d.prop("name"),d[0].files[t]);else o.append(d.prop("name"),d[0].files[0]);else d.is("input:checkbox")||d.is("input:radio")?d.prop("checked")&&o.append(d.prop("name"),d.val()):o.append(d.prop("name"),d.val())}var u={url:l.url,data:c("request_data",{data:o,params:l}),cache:l.cache,timeout:l.timeout,type:l.method,success:function(b,d,e){if(l.resultSelector)if("object"==typeof b){for(var f=l.resultSelector.replace(/\[/g,".").replace(/\]/g,"").split("."),g=b,h=0;h<f.length;h++)g=g[f[h]];b=g}else if("string"==typeof b){var i=a(l.resultSelector,a("<html>").html(b));1===i.length?b=a("<html>").html(i).html():(b=a("<html>"),i.each(function(){b.append(this)}),b=b.html())}var j=b;if(l.trigger.data("cacheLocal")||l.trigger.data("cacheSession")){var k;if(l.trigger.data("cacheLocal")?k=l.trigger.data("cacheLocal"):l.trigger.data("cacheSession")&&(k=l.trigger.data("cacheSession")),"undefined"!=typeof Storage)if(l.trigger.data("cacheLocal"))try{localStorage.setItem(k,e.responseText)}catch(a){console.log(a)}else if(l.trigger.data("cacheSession"))try{sessionStorage.setItem(k,e.responseText)}catch(a){console.log(a)}a(window).trigger("baldrick.cache",k)}b=c("pre_filter",{data:b,request:u,params:l,xhr:e}),b=c("filter",{data:b,rawData:j,request:u,params:l,xhr:e}),c("target",b)},complete:function(a,b){c("request_complete",{jqxhr:a,textStatus:b,request:u,params:l}),c("refresh",{jqxhr:a,textStatus:b,request:u,params:l}),d.data("once")&&d.off(f).removeClass("_tisBound")},error:function(a,b,d){c("request_error",{jqxhr:a,textStatus:b,error:d,request:u,params:l})}};if(l.dataType&&(u.dataType=l.dataType),void 0!==l.contentType&&(u.contentType=l.contentType),void 0!==l.processData&&(u.processData=l.processData),void 0!==l.xhrFields&&(u.xhrFields=l.xhrFields),!1===(u=c("request_params",u,l)))return g;var v=c("request",{request:u,params:l});if(v.data){var m=v.data;c("target",c("filter",c("pre_filter",{data:m,request:u,params:l}))),c("request_complete",{jqxhr:!1,textStatus:!0,request:u,params:l}),c("refresh",{jqxhr:!1,textStatus:!0,request:u,params:l})}}),(d.data("autoload")||d.data("poll"))&&(d.data("delay")?setTimeout(function(a,b){return a.trigger(b)},d.data("delay"),d,f):d.trigger(f)),d.data("poll")&&(d.data("delay")?setTimeout(function(a,b){return setInterval(function(a,b){return a.trigger(b)},a.data("poll"),a,b)},d.data("delay")):setInterval(function(a,b){return a.trigger(b)},d.data("poll"),d,f)),this}))},a.fn.baldrick.cacheObject=function(a,c){b[a]=c},a.fn.baldrick.registerhelper=function(b,c,e){var f={};"object"==typeof c?(f[b]=c,d._plugins=a.extend(!0,f,d._plugins)):"string"==typeof c&&"string"==typeof b&&"function"==typeof e&&(f[c]={},f[c][b]=e,d._plugins=a.extend(!0,f,d._plugins))}}}(jQuery),function(a){if(!b){var b={},c={},d={_plugins:{},load:{},bind:{},event:function(a,b){return a},pre_filter:function(a){return a.data},filter:function(a){return a},target:function(a){if("string"==typeof a.params.success?"function"==typeof window[a.params.success]&&window[a.params.success](a):"function"==typeof a.params.success&&a.params.success(a),a.params.target)if(a.params.target.is("textarea,input")&&"object"==typeof a.data?a.params.target.val(JSON.stringify(a.data)).trigger("change"):a.params.target[a.params.targetInsert](a.data),"string"==typeof a.params.callback){if("function"==typeof window[a.params.callback])return window[a.params.callback](a)}else if("function"==typeof a.params.callback)return a.params.callback(a)},request_data:function(a){return a.data},request:function(d){if((d.params.trigger.data("cacheLocal")||d.params.trigger.data("cacheSession"))&&!d.params.trigger.data("cachePurge")){var e;if(d.params.trigger.data("cacheLocal")?e=d.params.trigger.data("cacheLocal"):d.params.trigger.data("cacheSession")&&(e=d.params.trigger.data("cacheSession")),void 0!==b[e])return{data:b[e]};if("undefined"!=typeof Storage){var f;if(d.params.trigger.data("cacheLocal")?f=localStorage.getItem(e):d.params.trigger.data("cacheSession")&&(f=sessionStorage.getItem(e)),f){try{f=JSON.parse(f)}catch(a){f=f}return{data:f}}}}return c[d.params.trigger.prop("id")]&&c[d.params.trigger.prop("id")].abort(),c[d.params.trigger.prop("id")]=a.ajax(d.request),c[d.params.trigger.prop("id")]},request_complete:function(a){a.params.complete(a),a.params.loadElement.removeClass(a.params.loadClass),c[a.params.trigger.prop("id")]&&delete c[a.params.trigger.prop("id")]},request_error:function(a){a.params.error(a),a.params.complete(a.jqxhr,a.textStatus)},refresh:function(b,c){a(c.triggerClass).baldrick(c)}};a.fn.baldrick=function(b){var c=function(a,b,c){var d;for(var e in h.helpers._plugins)if("function"==typeof h.helpers._plugins[e][a]&&(d=h.helpers._plugins[e][a](b,h,c),void 0!==d&&(b=d),!1===b))return!1;if("function"==typeof h.helpers[a]&&(d=h.helpers[a](b,h,c),void 0!==d&&(b=d),!b))return!1;for(var f in h.helpers._plugins)if("function"==typeof h.helpers._plugins[f]["after_"+a]&&(d=h.helpers._plugins[f]["after_"+a](b,h,c),void 0!==d&&(b=d),!1===b))return!1;return b},e=function(b){var c={},d=b.find("input,radio,checkbox,select,textarea,file"),e={};if(d.length){for(var f=0;f<d.length;f++)if(null!==d[f].getAttribute("name")){for(var g=a(d[f]),h=g.prop("name").replace(/\[/gi,":").replace(/\]/gi,""),i=h.split(":"),j=g.is(":checkbox,:radio")?g.filter(":checked").val():g.val(),k={},l=i.length-1;l>=0;l--){var m=i[l];if(0===m.length&&(void 0===e[i[l-1]]?e[i[l-1]]=0:e[i[l-1]]+=1,m=e[i[l-1]]),l===i.length-1)k[m]=j;else{var n=k;k={},k[m]=n}}a.extend(!0,c,k)}return c}},f=this.selector,g=this.not("._tisBound");g.addClass("_tisBound"),void 0!==b&&"object"==typeof b.helper&&(d._plugins._params_helpers_=b.helper);var h=a.extend(!0,b,{helpers:d},{triggerClass:f}),i=function(){return!0},j={init:i,before:i,callback:!1,success:!1,complete:i,error:i};for(var k in j)"string"==typeof h[k]?j[k]="function"==typeof window[h[k]]?window[h[k]]:i:"function"==typeof h[k]&&(j[k]=h[k]);return g=c("bind",g),!1===g?this:c("ready",g.each(function(b){this.id||(this.id="baldrick_trigger_"+((new Date).getTime()+b));var d=a(this),f=d.data("event")?d.data("event"):h.event?h.event:d.is("form")?"submit":"click";return d.on(f,function(b){var d=a(c("event",this,b));if(d.data("for")){var i=a(d.data("for")),k=a.extend({},i.data(),d.data());return delete k.for,i.data(k),i.is("form")?(i.submit(),this):i.trigger(i.data("event")?i.data("event"):f)}if(d.is("form")&&!d.data("request")&&d.attr("action")&&d.data("request",d.attr("action")),d.is("a")&&!d.data("request")&&d.attr("href")&&(d.attr("href").indexOf("#")<0?d.data("request",d.attr("href")):d.data("href",d.attr("href"))),!1===(d.data("before")&&"function"==typeof window[d.data("before")]?window[d.data("before")](this,b):j.before(this,b)))return void a(h.triggerClass).baldrick(h);if(!1===(d.data("init")&&"function"==typeof window[d.data("init")]?window[d.data("init")](this,b):j.init(this,b)))return void a(h.triggerClass).baldrick(h);var l={trigger:d,callback:d.data("callback")?"function"==typeof window[d.data("callback")]?window[d.data("callback")]:d.data("callback"):j.callback,success:d.data("success")?"function"==typeof window[d.data("success")]?window[d.data("success")]:d.data("success"):j.success,method:d.data("method")?d.data("method"):d.attr("method")?d.attr("method"):h.method?h.method:"GET",dataType:d.data("type")?d.data("type"):!!h.dataType&&h.dataType,timeout:d.data("timeout")?d.data("timeout"):12e4,target:d.data("target")?"_parent"===d.data("target")?d.parent():a("_self"===d.data("target")?d:d.data("target")):a(h.target?h.target:"<html>"),targetInsert:d.data("targetInsert")?"replace"===d.data("targetInsert")?"replaceWith":d.data("targetInsert"):h.targetInsert?"replace"===h.targetInsert?"replaceWith":h.targetInsert:"html",loadClass:d.data("loadClass")?d.data("loadClass"):h.loadClass?h.loadClass:"loading",activeClass:d.data("activeClass")?d.data("activeClass"):h.activeClass?h.activeClass:"active",activeElement:d.data("activeElement")?"_parent"===d.data("activeElement")?d.parent():a(d.data("activeElement")):h.activeElement?"_parent"===h.activeElement?d.parent():a(h.activeElement):d,cache:d.data("cache")?d.data("cache"):!!h.cache&&h.cache,complete:d.data("complete")&&"function"==typeof window[d.data("complete")]?window[d.data("complete")]:j.complete,error:d.data("error")&&"function"==typeof window[d.data("error")]?window[d.data("error")]:j.error,resultSelector:!1,event:f};if(l.url=d.data("request")?d.data("request"):h.request?h.request:l.callback,l.loadElement=d.data("loadElement")?"_parent"===d.data("loadElement")?d.parent():a(d.data("loadElement")):h.loadElement&&a(h.loadElement)?a(h.loadElement):l.target,!1===(l=c("params",l)))return!1;if(b.preventDefault(),"function"==typeof window[l.url]){var m=window[l.url](l,f);return m=c("pre_filter",{data:m,params:l}),m=c("filter",{data:m,rawData:m,params:l}),c("target",m),c("refresh",{params:l}),c("request_complete",{jqxhr:null,textStatus:"complete",request:u,params:l}),this}try{if(a(l.url).length)var m=a(l.url).is("input,select,radio,checkbox,file,textarea")?a(l.url).val():a(l.url).is("form")?e(a(l.url)):a(l.url).html()}catch(b){}if(void 0!==m){if("json"===l.dataType)try{m=JSON.parse(m)}catch(b){}return m=c("pre_filter",{data:m,params:l}),m=c("filter",{data:m,rawData:m,params:l}),c("target",m),c("refresh",{params:l}),c("request_complete",{jqxhr:null,textStatus:"complete",request:u,params:l}),this}switch(typeof l.url){case"function":return l.url(this,b);case"boolean":case"object":return;case"string":if(l.url.indexOf(" ")>-1){var n=l.url.split(" ");l.url=n[0],l.resultSelector=n[1]}}d.data("group")?a('._tisBound[data-group="'+d.data("group")+'"]').each(function(){var b=a(this);(b.data("activeElement")?"_parent"===b.data("activeElement")?b.parent():a(b.data("activeElement")):h.activeElement?"_parent"===h.activeElement?d.parent():a(h.activeElement):b).removeClass(b.data("activeClass")?b.data("activeClass"):h.activeClass?h.activeClass:l.activeClass)}):a("._tisBound:not([data-group])").each(function(){var b=a(this);(b.data("activeElement")?"_parent"===b.data("activeElement")?b.parent():a(b.data("activeElement")):h.activeElement?"_parent"===h.activeElement?d.parent():a(h.activeElement):b).removeClass(b.data("activeClass")?b.data("activeClass"):h.activeClass?h.activeClass:l.activeClass)}),l.activeElement.addClass(l.activeClass),l.loadElement.addClass(l.loadClass);var o;if("undefined"==typeof FormData||!d.is("input:file")&&"POST"!==l.method){var p=d.serializeArray(),q=l.trigger.data(),r=[];h.data&&(q=a.extend(h.data,q)),p.length&&(a.each(p,function(a,b){r.push(b)}),l.requestData=e(d)),l.data&&(q=a.extend(q,l.data)),o=q,l.requestData=a.extend(d.data(),l.requestData)}else{l.method="POST",l.contentType=!1,l.processData=!1,l.cache=!1,l.xhrFields={onprogress:function(a){a.lengthComputable}},o=d.is("form")?new FormData(d[0]):new FormData,d.is("input,select,textarea")&&d.data("_value",d.val());for(var s in l.trigger.data())o.append(s,l.trigger.data(s));if(l.data&&o.append("data",JSON.stringify(l.data)),d.is("input,select,textarea"))if(d.is("input:file"))if(d[0].files.length>1)for(var t=0;t<d[0].files.length;t++)o.append(d.prop("name"),d[0].files[t]);else o.append(d.prop("name"),d[0].files[0]);else d.is("input:checkbox")||d.is("input:radio")?d.prop("checked")&&o.append(d.prop("name"),d.val()):o.append(d.prop("name"),d.val())}var u={url:l.url,data:c("request_data",{data:o,params:l}),cache:l.cache,timeout:l.timeout,type:l.method,success:function(b,d,e){if(l.resultSelector)if("object"==typeof b){for(var f=l.resultSelector.replace(/\[/g,".").replace(/\]/g,"").split("."),g=b,h=0;h<f.length;h++)g=g[f[h]];b=g}else if("string"==typeof b){var i=a(l.resultSelector,a("<html>").html(b));1===i.length?b=a("<html>").html(i).html():(b=a("<html>"),i.each(function(){b.append(this)}),b=b.html())}var j=b;if(l.trigger.data("cacheLocal")||l.trigger.data("cacheSession")){var k;if(l.trigger.data("cacheLocal")?k=l.trigger.data("cacheLocal"):l.trigger.data("cacheSession")&&(k=l.trigger.data("cacheSession")),"undefined"!=typeof Storage)if(l.trigger.data("cacheLocal"))try{localStorage.setItem(k,e.responseText)}catch(a){console.log(a)}else if(l.trigger.data("cacheSession"))try{sessionStorage.setItem(k,e.responseText)}catch(a){console.log(a)}a(window).trigger("baldrick.cache",k)}b=c("pre_filter",{data:b,request:u,params:l,xhr:e}),b=c("filter",{data:b,rawData:j,request:u,params:l,xhr:e}),c("target",b)},complete:function(a,b){c("request_complete",{jqxhr:a,textStatus:b,request:u,params:l}),c("refresh",{jqxhr:a,textStatus:b,request:u,params:l}),d.data("once")&&d.off(f).removeClass("_tisBound")},error:function(a,b,d){c("request_error",{jqxhr:a,textStatus:b,error:d,request:u,params:l})}};if(l.dataType&&(u.dataType=l.dataType),void 0!==l.contentType&&(u.contentType=l.contentType),void 0!==l.processData&&(u.processData=l.processData),void 0!==l.xhrFields&&(u.xhrFields=l.xhrFields),!1===(u=c("request_params",u,l)))return g;var v=c("request",{request:u,params:l});if(v.data){var m=v.data;c("target",c("filter",c("pre_filter",{data:m,request:u,params:l}))),c("request_complete",{jqxhr:!1,textStatus:!0,request:u,params:l}),c("refresh",{jqxhr:!1,textStatus:!0,request:u,params:l})}}),(d.data("autoload")||d.data("poll"))&&(d.data("delay")?setTimeout(function(a,b){return a.trigger(b)},d.data("delay"),d,f):d.trigger(f)),d.data("poll")&&(d.data("delay")?setTimeout(function(a,b){return setInterval(function(a,b){return a.trigger(b)},a.data("poll"),a,b)},d.data("delay")):setInterval(function(a,b){return a.trigger(b)},d.data("poll"),d,f)),this}))},a.fn.baldrick.cacheObject=function(a,c){b[a]=c},a.fn.baldrick.registerhelper=function(b,c,e){var f={};"object"==typeof c?(f[b]=c,d._plugins=a.extend(!0,f,d._plugins)):"string"==typeof c&&"string"==typeof b&&"function"==typeof e&&(f[c]={},f[c][b]=e,d._plugins=a.extend(!0,f,d._plugins))}}}(jQuery),function(a){"use strict";var b=a(window),c=function(b){if(b.valAttr("error-msg-container"))return a(b.valAttr("error-msg-container"));var c=b.parent();if(!c.hasClass("form-group")&&!c.closest("form").hasClass("form-horizontal")){var d=c.closest(".form-group");if(d.length)return d.eq(0)}return c},d=function(a,b){a.addClass(b.errorElementClass).removeClass("valid"),c(a).addClass(b.inputParentClassOnError).removeClass(b.inputParentClassOnSuccess),""!==b.borderColorOnError&&a.css("border-color",b.borderColorOnError)},e=function(b,d){b.each(function(){var b=a(this);f(b,"",d,d.errorMessagePosition),b.removeClass("valid").removeClass(d.errorElementClass).css("border-color",""),c(b).removeClass(d.inputParentClassOnError).removeClass(d.inputParentClassOnSuccess).find("."+d.errorMessageClass).remove()})},f=function(d,e,f,g){var h=document.getElementById(d.attr("name")+"_err_msg"),i=function(a){b.trigger("validationErrorDisplay",[d,a]),a.html(e)};if(h)i(a(h));else if("object"==typeof g){var j=!1;if(g.find("."+f.errorMessageClass).each(function(){return this.inputReferer==d[0]?(j=a(this),!1):void 0}),j)e?i(j):j.remove();else{var k=a('<div class="'+f.errorMessageClass+'"></div>');i(k),k[0].inputReferer=d[0],g.prepend(k)}}else{var l=c(d),k=l.find("."+f.errorMessageClass+".help-block");0==k.length&&(k=a("<span></span>").addClass("help-block").addClass(f.errorMessageClass),k.appendTo(l)),i(k)}},g=function(b,c,d,e){var f,g=e.errorMessageTemplate.messages.replace(/\{errorTitle\}/g,c),h=[];a.each(d,function(a,b){h.push(e.errorMessageTemplate.field.replace(/\{msg\}/g,b))}),g=g.replace(/\{fields\}/g,h.join("")),f=e.errorMessageTemplate.container.replace(/\{errorMessageClass\}/g,e.errorMessageClass),f=f.replace(/\{messages\}/g,g),b.children().eq(0).before(f)};a.fn.validateOnBlur=function(b,c){return this.find("*[data-validation]").bind("blur.validation",function(){a(this).validateInputOnBlur(b,c,!0,"blur")}),c.validateCheckboxRadioOnClick&&this.find("input[type=checkbox][data-validation],input[type=radio][data-validation]").bind("click.validation",function(){a(this).validateInputOnBlur(b,c,!0,"click")}),this},a.fn.validateOnEvent=function(b,c){return this.find("*[data-validation-event]").each(function(){var d=a(this),e=d.valAttr("event");e&&d.unbind(e+".validation").bind(e+".validation",function(){a(this).validateInputOnBlur(b,c,!0,e)})}),this},a.fn.showHelpOnFocus=function(b){return b||(b="data-validation-help"),this.find(".has-help-txt").valAttr("has-keyup-event",!1).removeClass("has-help-txt"),this.find("textarea,input").each(function(){var c=a(this),d="jquery_form_help_"+(c.attr("name")||"").replace(/(:|\.|\[|\])/g,""),e=c.attr(b);e&&c.addClass("has-help-txt").unbind("focus.help").bind("focus.help",function(){var b=c.parent().find("."+d);0==b.length&&(b=a("<span />").addClass(d).addClass("help").addClass("help-block").text(e).hide(),c.after(b)),b.fadeIn()}).unbind("blur.help").bind("blur.help",function(){a(this).parent().find("."+d).fadeOut("slow")})}),this},a.fn.validate=function(b,c,d){var e=a.extend({},a.formUtils.LANG,d||{});this.each(function(){var d=a(this),f=d.closest("form").get(0).validationConfig||{};d.one("validation",function(a,c){"function"==typeof b&&b(c,this,a)}),d.validateInputOnBlur(e,a.extend({},f,c||{}),!0)})},a.fn.willPostponeValidation=function(){return(this.valAttr("suggestion-nr")||this.valAttr("postpone")||this.hasClass("hasDatepicker"))&&!window.postponedValidation},a.fn.validateInputOnBlur=function(b,g,h,i){if(a.formUtils.eventType=i,this.willPostponeValidation()){var j=this,k=this.valAttr("postpone")||200;return window.postponedValidation=function(){j.validateInputOnBlur(b,g,h,i),window.postponedValidation=!1},setTimeout(function(){window.postponedValidation&&window.postponedValidation()},k),this}b=a.extend({},a.formUtils.LANG,b||{}),e(this,g);var l=this,m=l.closest("form"),n=(l.attr(g.validationRuleAttribute),a.formUtils.validateInput(l,b,g,m,i));return n.isValid?n.shouldChangeDisplay&&(l.addClass("valid"),c(l).addClass(g.inputParentClassOnSuccess)):n.isValid||(d(l,g),f(l,n.errorMsg,g,g.errorMessagePosition),h&&l.unbind("keyup.validation").bind("keyup.validation",function(){a(this).validateInputOnBlur(b,g,!1,"keyup")})),this},a.fn.valAttr=function(a,b){return void 0===b?this.attr("data-validation-"+a):!1===b||null===b?this.removeAttr("data-validation-"+a):(a.length>0&&(a="-"+a),this.attr("data-validation"+a,b))},a.fn.isValid=function(h,i,j){if(a.formUtils.isLoadingModules){var k=this;return setTimeout(function(){k.isValid(h,i,j)},200),null}i=a.extend({},a.formUtils.defaultConfig(),i||{}),h=a.extend({},a.formUtils.LANG,h||{}),j=!1!==j,a.formUtils.errorDisplayPreventedWhenHalted&&(delete a.formUtils.errorDisplayPreventedWhenHalted,j=!1),a.formUtils.isValidatingEntireForm=!0,a.formUtils.haltValidation=!1;var l=function(b,c){a.inArray(b,n)<0&&n.push(b),o.push(c),c.attr("current-error",b),j&&d(c,i)},m=[],n=[],o=[],p=this,q=function(b,c){return"submit"===c||"button"===c||"reset"==c||a.inArray(b,i.ignore||[])>-1};if(j&&(p.find("."+i.errorMessageClass+".alert").remove(),e(p.find("."+i.errorElementClass+",.valid"),i)),p.find("input,textarea,select").filter(':not([type="submit"],[type="button"])').each(function(){var b=a(this),d=b.attr("type"),e="radio"==d||"checkbox"==d,f=b.attr("name");if(!q(f,d)&&(!e||a.inArray(f,m)<0)){e&&m.push(f);var g=a.formUtils.validateInput(b,h,i,p,"submit");g.shouldChangeDisplay&&(g.isValid?g.isValid&&(b.valAttr("current-error",!1).addClass("valid"),c(b).addClass(i.inputParentClassOnSuccess)):l(g.errorMsg,b))}}),"function"==typeof i.onValidate){var r=i.onValidate(p);a.isArray(r)?a.each(r,function(a,b){l(b.message,b.element)}):r&&r.element&&r.message&&l(r.message,r.element)}return a.formUtils.isValidatingEntireForm=!1,!a.formUtils.haltValidation&&o.length>0?(j&&("top"===i.errorMessagePosition?g(p,h.errorTitle,n,i):"custom"===i.errorMessagePosition?"function"==typeof i.errorMessageCustom&&i.errorMessageCustom(p,h.errorTitle,n,i):a.each(o,function(a,b){f(b,b.attr("current-error"),i,i.errorMessagePosition)}),i.scrollToTopOnError&&b.scrollTop(p.offset().top-20)),!1):(!j&&a.formUtils.haltValidation&&(a.formUtils.errorDisplayPreventedWhenHalted=!0),!a.formUtils.haltValidation)},a.fn.validateForm=function(a,b){return window.console&&"function"==typeof window.console.warn&&window.console.warn("Use of deprecated function $.validateForm, use $.isValid instead"),this.isValid(a,b,!0)},a.fn.restrictLength=function(b){return new a.formUtils.lengthRestriction(this,b),this},a.fn.addSuggestions=function(b){var c=!1;return this.find("input").each(function(){var d=a(this);c=a.split(d.attr("data-suggestions")),c.length>0&&!d.hasClass("has-suggestions")&&(a.formUtils.suggest(d,c,b),d.addClass("has-suggestions"))}),this},a.split=function(b,c){if("function"!=typeof c){if(!b)return[];var d=[];return a.each(b.split(c||/[,|\-\s]\s*/g),function(b,c){c=a.trim(c),c.length&&d.push(c)}),d}b&&a.each(b.split(/[,|\-\s]\s*/g),function(b,d){return d=a.trim(d),d.length?c(d,b):void 0})},a.validate=function(c){var d=a.extend(a.formUtils.defaultConfig(),{form:"form",validateOnEvent:!1,validateOnBlur:!0,validateCheckboxRadioOnClick:!0,showHelpOnFocus:!0,addSuggestions:!0,modules:"",onModulesLoaded:null,language:!1,onSuccess:!1,onError:!1,onElementValidate:!1});if(c=a.extend(d,c||{}),c.lang&&"en"!=c.lang){var f="lang/"+c.lang+".js";c.modules+=c.modules.length?","+f:f}a(c.form).each(function(d,f){f.validationConfig=c;var g=a(f);b.trigger("formValidationSetup",[g,c]),g.find(".has-help-txt").unbind("focus.validation").unbind("blur.validation"),g.removeClass("has-validation-callback").unbind("submit.validation").unbind("reset.validation").find("input[data-validation],textarea[data-validation]").unbind("blur.validation"),g.bind("submit.validation",function(){var b=a(this);if(a.formUtils.haltValidation)return!1;if(a.formUtils.isLoadingModules)return setTimeout(function(){b.trigger("submit.validation")},200),!1;var d=b.isValid(c.language,c);return!a.formUtils.haltValidation&&(d&&"function"==typeof c.onSuccess?!1!==c.onSuccess(b)&&void 0:d||"function"!=typeof c.onError?d:(c.onError(b),!1))}).bind("reset.validation",function(){a(this).find("."+c.errorMessageClass+".alert").remove(),e(a(this).find("."+c.errorElementClass+",.valid"),c)}).addClass("has-validation-callback"),c.showHelpOnFocus&&g.showHelpOnFocus(),c.addSuggestions&&g.addSuggestions(),c.validateOnBlur&&(g.validateOnBlur(c.language,c),g.bind("html5ValidationAttrsFound",function(){g.validateOnBlur(c.language,c)})),c.validateOnEvent&&g.validateOnEvent(c.language,c)}),""!=c.modules&&a.formUtils.loadModules(c.modules,!1,function(){"function"==typeof c.onModulesLoaded&&c.onModulesLoaded(),b.trigger("validatorsLoaded",["string"==typeof c.form?a(c.form):c.form,c])})},a.formUtils={defaultConfig:function(){return{ignore:[],errorElementClass:"error",borderColorOnError:"#b94a48",errorMessageClass:"form-error",validationRuleAttribute:"data-validation",validationErrorMsgAttribute:"data-validation-error-msg",errorMessagePosition:"element",errorMessageTemplate:{container:'<div class="{errorMessageClass} alert alert-danger">{messages}</div>',messages:"<strong>{errorTitle}</strong><ul>{fields}</ul>",field:"<li>{msg}</li>"},errorMessageCustom:g,scrollToTopOnError:!0,dateFormat:"yyyy-mm-dd",addValidClassOnAll:!1,decimalSeparator:".",inputParentClassOnError:"has-error",inputParentClassOnSuccess:"has-success",validateHiddenInputs:!1}},validators:{},_events:{load:[],valid:[],invalid:[]},haltValidation:!1,isValidatingEntireForm:!1,addValidator:function(a){var b=0===a.name.indexOf("validate_")?a.name:"validate_"+a.name;void 0===a.validateOnKeyUp&&(a.validateOnKeyUp=!0),this.validators[b]=a},isLoadingModules:!1,loadedModules:{},loadModules:function(c,d,e){if(void 0===e&&(e=!0),
2
+ a.formUtils.isLoadingModules)return void setTimeout(function(){a.formUtils.loadModules(c,d,e)});var f=!1,g=function(c,d){var g=a.split(c),h=g.length,i=function(){0==--h&&(a.formUtils.isLoadingModules=!1,e&&f&&("function"==typeof e?e():b.trigger("validatorsLoaded")))};h>0&&(a.formUtils.isLoadingModules=!0);var j="?_="+(new Date).getTime(),k=document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0];a.each(g,function(b,c){if(c=a.trim(c),0==c.length)i();else{var e=d+c+(".js"==c.slice(-3)?"":".js"),g=document.createElement("SCRIPT");e in a.formUtils.loadedModules?i():(a.formUtils.loadedModules[e]=1,f=!0,g.type="text/javascript",g.onload=i,g.src=e+(".dev.js"==e.slice(-7)?j:""),g.onerror=function(){"console"in window&&window.console.log&&window.console.log("Unable to load form validation module "+e)},g.onreadystatechange=function(){("complete"==this.readyState||"loaded"==this.readyState)&&(i(),this.onload=null,this.onreadystatechange=null)},k.appendChild(g))}})};if(d)g(c,d);else{var h=function(){var b=!1;return a('script[src*="form-validator"]').each(function(){return b=this.src.substr(0,this.src.lastIndexOf("/"))+"/","/"==b&&(b=""),!1}),!1!==b&&(g(c,b),!0)};h()||a(h)}},validateInput:function(b,c,d,e,f){b.trigger("beforeValidation"),d=d||a.formUtils.defaultConfig(),c=c||a.formUtils.LANG;var g=b.val()||"",h={isValid:!0,shouldChangeDisplay:!0,errorMsg:""},i=b.valAttr("optional"),j=!1,k=!1,l=!1,m=b.valAttr("if-checked");if(b.attr("disabled")||!b.is(":visible")&&!d.validateHiddenInputs)return h.shouldChangeDisplay=!1,h;null!=m&&(j=!0,l=e.find('input[name="'+m+'"]'),l.prop("checked")&&(k=!0));var n=!g&&"number"==b[0].type;if(!g&&"true"===i&&!n||j&&!k)return h.shouldChangeDisplay=d.addValidClassOnAll,h;var o=b.attr(d.validationRuleAttribute),p=!0;return o?(a.split(o,function(h){0!==h.indexOf("validate_")&&(h="validate_"+h);var i=a.formUtils.validators[h];if(!i||"function"!=typeof i.validatorFunction)throw new Error('Using undefined validator "'+h+'"');"validate_checkbox_group"==h&&(b=e.find("[name='"+b.attr("name")+"']:eq(0)"));var j=null;return("keyup"!=f||i.validateOnKeyUp)&&(j=i.validatorFunction(g,b,d,c,e)),j?void 0:(p=null,null!==j&&((p=b.attr(d.validationErrorMsgAttribute+"-"+h.replace("validate_","")))||(p=b.attr(d.validationErrorMsgAttribute))||(p=c[i.errorMessageKey])||(p=i.errorMessage)),!1)}," "),"string"==typeof p?(b.trigger("validation",!1),h.errorMsg=p,h.isValid=!1,h.shouldChangeDisplay=!0):null===p?h.shouldChangeDisplay=d.addValidClassOnAll:(b.trigger("validation",!0),h.shouldChangeDisplay=!0),"function"==typeof d.onElementValidate&&null!==p&&d.onElementValidate(h.isValid,b,e,p),h):(h.shouldChangeDisplay=d.addValidClassOnAll,h)},parseDate:function(b,c){var d,e,f,g,h=c.replace(/[a-zA-Z]/gi,"").substring(0,1),i="^",j=c.split(h||null);if(a.each(j,function(a,b){i+=(a>0?"\\"+h:"")+"(\\d{"+b.length+"})"}),i+="$",null===(d=b.match(new RegExp(i))))return!1;var k=function(b,c,d){for(var e=0;e<c.length;e++)if(c[e].substring(0,1)===b)return a.formUtils.parseDateInt(d[e+1]);return-1};return f=k("m",j,d),e=k("d",j,d),g=k("y",j,d),!(2===f&&e>28&&(g%4!=0||g%100==0&&g%400!=0)||2===f&&e>29&&(g%4==0||g%100!=0&&g%400==0)||f>12||0===f)&&(!(this.isShortMonth(f)&&e>30||!this.isShortMonth(f)&&e>31||0===e)&&[g,f,e])},parseDateInt:function(a){return 0===a.indexOf("0")&&(a=a.replace("0","")),parseInt(a,10)},isShortMonth:function(a){return a%2==0&&7>a||a%2!=0&&a>7},lengthRestriction:function(b,c){var d=parseInt(c.text(),10),e=0,f=function(){var a=b.val().length;if(a>d){var f=b.scrollTop();b.val(b.val().substring(0,d)),b.scrollTop(f)}e=d-a,0>e&&(e=0),c.text(e)};a(b).bind("keydown keyup keypress focus blur",f).bind("cut paste",function(){setTimeout(f,100)}),a(document).bind("ready",f)},numericRangeCheck:function(b,c){var d=a.split(c),e=parseInt(c.substr(3),10);return 1==d.length&&-1==c.indexOf("min")&&-1==c.indexOf("max")&&(d=[c,c]),2==d.length&&(b<parseInt(d[0],10)||b>parseInt(d[1],10))?["out",d[0],d[1]]:0===c.indexOf("min")&&e>b?["min",e]:0===c.indexOf("max")&&b>e?["max",e]:["ok"]},_numSuggestionElements:0,_selectedSuggestion:null,_previousTypedVal:null,suggest:function(c,d,e){var f={css:{maxHeight:"150px",background:"#FFF",lineHeight:"150%",textDecoration:"underline",overflowX:"hidden",overflowY:"auto",border:"#CCC solid 1px",borderTop:"none",cursor:"pointer"},activeSuggestionCSS:{background:"#E9E9E9"}},g=function(a,b){var c=b.offset();a.css({width:b.outerWidth(),left:c.left+"px",top:c.top+b.outerHeight()+"px"})};e&&a.extend(f,e),f.css.position="absolute",f.css["z-index"]=9999,c.attr("autocomplete","off"),0===this._numSuggestionElements&&b.bind("resize",function(){a(".jquery-form-suggestions").each(function(){var b=a(this),c=b.attr("data-suggest-container");g(b,a(".suggestions-"+c).eq(0))})}),this._numSuggestionElements++;var h=function(b){var c=b.valAttr("suggestion-nr");a.formUtils._selectedSuggestion=null,a.formUtils._previousTypedVal=null,a(".jquery-form-suggestion-"+c).fadeOut("fast")};return c.data("suggestions",d).valAttr("suggestion-nr",this._numSuggestionElements).unbind("focus.suggest").bind("focus.suggest",function(){a(this).trigger("keyup"),a.formUtils._selectedSuggestion=null}).unbind("keyup.suggest").bind("keyup.suggest",function(){var b=a(this),d=[],e=a.trim(b.val()).toLocaleLowerCase();if(e!=a.formUtils._previousTypedVal){a.formUtils._previousTypedVal=e;var i=!1,j=b.valAttr("suggestion-nr"),k=a(".jquery-form-suggestion-"+j);if(k.scrollTop(0),""!=e){var l=e.length>2;a.each(b.data("suggestions"),function(a,b){var c=b.toLocaleLowerCase();return c==e?(d.push("<strong>"+b+"</strong>"),i=!0,!1):void((0===c.indexOf(e)||l&&c.indexOf(e)>-1)&&d.push(b.replace(new RegExp(e,"gi"),"<strong>$&</strong>")))})}i||0==d.length&&k.length>0?k.hide():d.length>0&&0==k.length?(k=a("<div></div>").css(f.css).appendTo("body"),c.addClass("suggestions-"+j),k.attr("data-suggest-container",j).addClass("jquery-form-suggestions").addClass("jquery-form-suggestion-"+j)):d.length>0&&!k.is(":visible")&&k.show(),d.length>0&&e.length!=d[0].length&&(g(k,b),k.html(""),a.each(d,function(c,d){a("<div></div>").append(d).css({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"5px"}).addClass("form-suggest-element").appendTo(k).click(function(){b.focus(),b.val(a(this).text()),h(b)})}))}}).unbind("keydown.validation").bind("keydown.validation",function(b){var c,d,e=b.keyCode?b.keyCode:b.which,g=a(this);if(13==e&&null!==a.formUtils._selectedSuggestion){if(c=g.valAttr("suggestion-nr"),d=a(".jquery-form-suggestion-"+c),d.length>0){var i=d.find("div").eq(a.formUtils._selectedSuggestion).text();g.val(i),h(g),b.preventDefault()}}else{c=g.valAttr("suggestion-nr"),d=a(".jquery-form-suggestion-"+c);var j=d.children();if(j.length>0&&a.inArray(e,[38,40])>-1){38==e?(null===a.formUtils._selectedSuggestion?a.formUtils._selectedSuggestion=j.length-1:a.formUtils._selectedSuggestion--,a.formUtils._selectedSuggestion<0&&(a.formUtils._selectedSuggestion=j.length-1)):40==e&&(null===a.formUtils._selectedSuggestion?a.formUtils._selectedSuggestion=0:a.formUtils._selectedSuggestion++,a.formUtils._selectedSuggestion>j.length-1&&(a.formUtils._selectedSuggestion=0));var k=d.innerHeight(),l=d.scrollTop(),m=d.children().eq(0).outerHeight(),n=m*a.formUtils._selectedSuggestion;return(l>n||n>l+k)&&d.scrollTop(n),j.removeClass("active-suggestion").css("background","none").eq(a.formUtils._selectedSuggestion).addClass("active-suggestion").css(f.activeSuggestionCSS),b.preventDefault(),!1}}}).unbind("blur.suggest").bind("blur.suggest",function(){h(a(this))}),c},LANG:{errorTitle:"Form submission failed!",requiredFields:"You have not answered all required fields",badTime:"You have not given a correct time",badEmail:"You have not given a correct e-mail address",badTelephone:"You have not given a correct phone number",badSecurityAnswer:"You have not given a correct answer to the security question",badDate:"You have not given a correct date",lengthBadStart:"The input value must be between ",lengthBadEnd:" characters",lengthTooLongStart:"The input value is longer than ",lengthTooShortStart:"The input value is shorter than ",notConfirmed:"Input values could not be confirmed",badDomain:"Incorrect domain value",badUrl:"The input value is not a correct URL",badCustomVal:"The input value is incorrect",andSpaces:" and spaces ",badInt:"The input value was not a correct number",badSecurityNumber:"Your social security number was incorrect",badUKVatAnswer:"Incorrect UK VAT Number",badStrength:"The password isn't strong enough",badNumberOfSelectedOptionsStart:"You have to choose at least ",badNumberOfSelectedOptionsEnd:" answers",badAlphaNumeric:"The input value can only contain alphanumeric characters ",badAlphaNumericExtra:" and ",wrongFileSize:"The file you are trying to upload is too large (max %s)",wrongFileType:"Only files of type %s is allowed",groupCheckedRangeStart:"Please choose between ",groupCheckedTooFewStart:"Please choose at least ",groupCheckedTooManyStart:"Please choose a maximum of ",groupCheckedEnd:" item(s)",badCreditCard:"The credit card number is not correct",badCVV:"The CVV number was not correct",wrongFileDim:"Incorrect image dimensions,",imageTooTall:"the image can not be taller than",imageTooWide:"the image can not be wider than",imageTooSmall:"the image was too small",min:"min",max:"max",imageRatioNotAccepted:"Image ratio is not be accepted",badBrazilTelephoneAnswer:"The phone number entered is invalid",badBrazilCEPAnswer:"The CEP entered is invalid",badBrazilCPFAnswer:"The CPF entered is invalid"}},a.formUtils.addValidator({name:"email",validatorFunction:function(b){var c=b.toLowerCase().split("@"),d=c[0],e=c[1];if(d&&e){if(0==d.indexOf('"')){var f=d.length;if(d=d.replace(/\"/g,""),d.length!=f-2)return!1}return a.formUtils.validators.validate_domain.validatorFunction(c[1])&&0!=d.indexOf(".")&&"."!=d.substring(d.length-1,d.length)&&-1==d.indexOf("..")&&!/[^\w\+\.\-\#\-\_\~\!\$\&\'\(\)\*\+\,\;\=\:]/.test(d)}return!1},errorMessage:"",errorMessageKey:"badEmail"}),a.formUtils.addValidator({name:"domain",validatorFunction:function(a){return a.length>0&&a.length<=253&&!/[^a-zA-Z0-9]/.test(a.slice(-2))&&!/[^a-zA-Z0-9]/.test(a.substr(0,1))&&!/[^a-zA-Z0-9\.\-]/.test(a)&&1==a.split("..").length&&a.split(".").length>1},errorMessage:"",errorMessageKey:"badDomain"}),a.formUtils.addValidator({name:"required",validatorFunction:function(b,c,d,e,f){switch(c.attr("type")){case"checkbox":return c.is(":checked");case"radio":return f.find('input[name="'+c.attr("name")+'"]').filter(":checked").length>0;default:return""!==a.trim(b)}},errorMessage:"",errorMessageKey:"requiredFields"}),a.formUtils.addValidator({name:"length",validatorFunction:function(b,c,d,e){var f=c.valAttr("length"),g=c.attr("type");if(void 0==f)return alert('Please add attribute "data-validation-length" to '+c[0].nodeName+" named "+c.attr("name")),!0;var h,i="file"==g&&void 0!==c.get(0).files?c.get(0).files.length:b.length,j=a.formUtils.numericRangeCheck(i,f);switch(j[0]){case"out":this.errorMessage=e.lengthBadStart+f+e.lengthBadEnd,h=!1;break;case"min":this.errorMessage=e.lengthTooShortStart+j[1]+e.lengthBadEnd,h=!1;break;case"max":this.errorMessage=e.lengthTooLongStart+j[1]+e.lengthBadEnd,h=!1;break;default:h=!0}return h},errorMessage:"",errorMessageKey:""}),a.formUtils.addValidator({name:"url",validatorFunction:function(b){if(/^(https?|ftp):\/\/((((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])(\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])(\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/(((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|\[|\]|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#(((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(b)){var c=b.split("://")[1],d=c.indexOf("/");return d>-1&&(c=c.substr(0,d)),a.formUtils.validators.validate_domain.validatorFunction(c)}return!1},errorMessage:"",errorMessageKey:"badUrl"}),a.formUtils.addValidator({name:"number",validatorFunction:function(a,b,c){if(""!==a){var d,e,f=b.valAttr("allowing")||"",g=b.valAttr("decimal-separator")||c.decimalSeparator,h=!1,i=b.valAttr("step")||"",j=!1;if(-1==f.indexOf("number")&&(f+=",number"),-1==f.indexOf("negative")&&0===a.indexOf("-"))return!1;if(f.indexOf("range")>-1&&(d=parseFloat(f.substring(f.indexOf("[")+1,f.indexOf(";"))),e=parseFloat(f.substring(f.indexOf(";")+1,f.indexOf("]"))),h=!0),""!=i&&(j=!0),","==g){if(a.indexOf(".")>-1)return!1;a=a.replace(",",".")}if(f.indexOf("number")>-1&&""===a.replace(/[0-9-]/g,"")&&(!h||a>=d&&e>=a)&&(!j||a%i==0))return!0;if(f.indexOf("float")>-1&&null!==a.match(new RegExp("^([0-9-]+)\\.([0-9]+)$"))&&(!h||a>=d&&e>=a)&&(!j||a%i==0))return!0}return!1},errorMessage:"",errorMessageKey:"badInt"}),a.formUtils.addValidator({name:"alphanumeric",validatorFunction:function(b,c,d,e){var f="^([a-zA-Z0-9",g="]+)$",h=c.valAttr("allowing"),i="";if(h){i=f+h+g;var j=h.replace(/\\/g,"");j.indexOf(" ")>-1&&(j=j.replace(" ",""),j+=e.andSpaces||a.formUtils.LANG.andSpaces),this.errorMessage=e.badAlphaNumeric+e.badAlphaNumericExtra+j}else i=f+g,this.errorMessage=e.badAlphaNumeric;return new RegExp(i).test(b)},errorMessage:"",errorMessageKey:""}),a.formUtils.addValidator({name:"custom",validatorFunction:function(a,b){return new RegExp(b.valAttr("regexp")).test(a)},errorMessage:"",errorMessageKey:"badCustomVal"}),a.formUtils.addValidator({name:"date",validatorFunction:function(b,c,d){var e=c.valAttr("format")||d.dateFormat||"yyyy-mm-dd";return!1!==a.formUtils.parseDate(b,e)},errorMessage:"",errorMessageKey:"badDate"}),a.formUtils.addValidator({name:"checkbox_group",validatorFunction:function(b,c,d,e,f){var g=!0,h=c.attr("name"),i=a("input[type=checkbox][name^='"+h+"']",f),j=i.filter(":checked").length,k=c.valAttr("qty");if(void 0==k){var l=c.get(0).nodeName;alert('Attribute "data-validation-qty" is missing from '+l+" named "+c.attr("name"))}var m=a.formUtils.numericRangeCheck(j,k);switch(m[0]){case"out":this.errorMessage=e.groupCheckedRangeStart+k+e.groupCheckedEnd,g=!1;break;case"min":this.errorMessage=e.groupCheckedTooFewStart+m[1]+e.groupCheckedEnd,g=!1;break;case"max":this.errorMessage=e.groupCheckedTooManyStart+m[1]+e.groupCheckedEnd,g=!1;break;default:g=!0}if(!g){var n=function(){i.unbind("click",n),i.filter("*[data-validation]").validateInputOnBlur(e,d,!1,"blur")};i.bind("click",n)}return g}})}(jQuery);
assets/build/js/parsley.min.js CHANGED
@@ -1,3 +1,3 @@
1
- function _toConsumableArray(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function _toConsumableArray(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}var _slice=Array.prototype.slice;!function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],b):a.parsley=b(a.jQuery)}(this,function(a){"use strict";function b(a,b){return a.parsleyAdaptedCallback||(a.parsleyAdaptedCallback=function(){var c=Array.prototype.slice.call(arguments,0);c.unshift(this),a.apply(b||G,c)}),a.parsleyAdaptedCallback}function c(a){return 0===a.lastIndexOf(I,0)?a.substr(I.length):a}function d(){var b=this,c=window||global;a.extend(this,{isNativeEvent:function(a){return a.originalEvent&&!1!==a.originalEvent.isTrusted},fakeInputEvent:function(c){b.isNativeEvent(c)&&a(c.target).trigger("input")},misbehaves:function(c){b.isNativeEvent(c)&&(b.behavesOk(c),a(document).on("change.inputevent",c.data.selector,b.fakeInputEvent),b.fakeInputEvent(c))},behavesOk:function(c){b.isNativeEvent(c)&&a(document).off("input.inputevent",c.data.selector,b.behavesOk).off("change.inputevent",c.data.selector,b.misbehaves)},install:function(){if(!c.inputEventPatched){c.inputEventPatched="0.0.3";for(var d=["select",'input[type="checkbox"]','input[type="radio"]','input[type="file"]'],e=0;e<d.length;e++){var f=d[e];a(document).on("input.inputevent",f,{selector:f},b.behavesOk).on("change.inputevent",f,{selector:f},b.misbehaves)}}},uninstall:function(){delete c.inputEventPatched,a(document).off(".inputevent")}})}var e=1,f={},g={attr:function(a,b,c){var d,e,f,g=new RegExp("^"+b,"i");if(void 0===c)c={};else for(d in c)c.hasOwnProperty(d)&&delete c[d];if(void 0===a||void 0===a[0])return c;for(f=a[0].attributes,d=f.length;d--;)(e=f[d])&&e.specified&&g.test(e.name)&&(c[this.camelize(e.name.slice(b.length))]=this.deserializeValue(e.value));return c},checkAttr:function(a,b,c){return a.is("["+b+c+"]")},setAttr:function(a,b,c,d){a[0].setAttribute(this.dasherize(b+c),String(d))},generateID:function(){return""+e++},deserializeValue:function(b){var c;try{return b?"true"==b||"false"!=b&&("null"==b?null:isNaN(c=Number(b))?/^[\[\{]/.test(b)?a.parseJSON(b):b:c):b}catch(a){return b}},camelize:function(a){return a.replace(/-+(.)?/g,function(a,b){return b?b.toUpperCase():""})},dasherize:function(a){return a.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()},warn:function(){var a;window.console&&"function"==typeof window.console.warn&&(a=window.console).warn.apply(a,arguments)},warnOnce:function(a){f[a]||(f[a]=!0,this.warn.apply(this,arguments))},_resetWarnings:function(){f={}},trimString:function(a){return a.replace(/^\s+|\s+$/g,"")},namespaceEvents:function(b,c){return b=this.trimString(b||"").split(/\s+/),b[0]?a.map(b,function(a){return a+"."+c}).join(" "):""},difference:function(b,c){var d=[];return a.each(b,function(a,b){-1==c.indexOf(b)&&d.push(b)}),d},all:function(b){return a.when.apply(a,_toConsumableArray(b).concat([42,42]))},objectCreate:Object.create||function(){var a=function(){};return function(b){if(arguments.length>1)throw Error("Second argument not supported");if("object"!=typeof b)throw TypeError("Argument must be an object");a.prototype=b;var c=new a;return a.prototype=null,c}}(),_SubmitSelector:'input[type="submit"], button:submit'},h=g,i={namespace:"data-parsley-",inputs:"input, textarea, select",excluded:"input[type=button], input[type=submit], input[type=reset], input[type=hidden]",priorityEnabled:!0,multiple:null,group:null,uiEnabled:!0,validationThreshold:3,focus:"first",trigger:!1,triggerAfterFailure:"input",errorClass:"parsley-error",successClass:"parsley-success",classHandler:function(a){},errorsContainer:function(a){},errorsWrapper:'<ul class="parsley-errors-list"></ul>',errorTemplate:"<li></li>"},j=function(){this.__id__=h.generateID()};j.prototype={asyncSupport:!0,_pipeAccordingToValidationResult:function(){var b=this,c=function(){var c=a.Deferred();return!0!==b.validationResult&&c.reject(),c.resolve().promise()};return[c,c]},actualizeOptions:function(){return h.attr(this.$element,this.options.namespace,this.domOptions),this.parent&&this.parent.actualizeOptions&&this.parent.actualizeOptions(),this},_resetOptions:function(a){this.domOptions=h.objectCreate(this.parent.options),this.options=h.objectCreate(this.domOptions);for(var b in a)a.hasOwnProperty(b)&&(this.options[b]=a[b]);this.actualizeOptions()},_listeners:null,on:function(a,b){return this._listeners=this._listeners||{},(this._listeners[a]=this._listeners[a]||[]).push(b),this},subscribe:function(b,c){a.listenTo(this,b.toLowerCase(),c)},off:function(a,b){var c=this._listeners&&this._listeners[a];if(c)if(b)for(var d=c.length;d--;)c[d]===b&&c.splice(d,1);else delete this._listeners[a];return this},unsubscribe:function(b,c){a.unsubscribeTo(this,b.toLowerCase())},trigger:function(a,b,c){b=b||this;var d,e=this._listeners&&this._listeners[a];if(e)for(var f=e.length;f--;)if(!1===(d=e[f].call(b,b,c)))return d;return!this.parent||this.parent.trigger(a,b,c)},asyncIsValid:function(a,b){return h.warnOnce("asyncIsValid is deprecated; please use whenValid instead"),this.whenValid({group:a,force:b})},_findRelated:function(){return this.options.multiple?this.parent.$element.find("["+this.options.namespace+'multiple="'+this.options.multiple+'"]'):this.$element}};var k={string:function(a){return a},integer:function(a){if(isNaN(a))throw'Requirement is not an integer: "'+a+'"';return parseInt(a,10)},number:function(a){if(isNaN(a))throw'Requirement is not a number: "'+a+'"';return parseFloat(a)},reference:function(b){var c=a(b);if(0===c.length)throw'No such reference: "'+b+'"';return c},boolean:function(a){return"false"!==a},object:function(a){return h.deserializeValue(a)},regexp:function(a){var b="";return/^\/.*\/(?:[gimy]*)$/.test(a)?(b=a.replace(/.*\/([gimy]*)$/,"$1"),a=a.replace(new RegExp("^/(.*?)/"+b+"$"),"$1")):a="^"+a+"$",new RegExp(a,b)}},l=function(a,b){var c=a.match(/^\s*\[(.*)\]\s*$/);if(!c)throw'Requirement is not an array: "'+a+'"';var d=c[1].split(",").map(h.trimString);if(d.length!==b)throw"Requirement has "+d.length+" values when "+b+" are needed";return d},m=function(a,b){var c=k[a||"string"];if(!c)throw'Unknown requirement specification: "'+a+'"';return c(b)},n=function(a,b,c){var d=null,e={};for(var f in a)if(f){var g=c(f);"string"==typeof g&&(g=m(a[f],g)),e[f]=g}else d=m(a[f],b);return[d,e]},o=function(b){a.extend(!0,this,b)};o.prototype={validate:function(b,c){if(this.fn)return arguments.length>3&&(c=[].slice.call(arguments,1,-1)),this.fn(b,c);if(a.isArray(b)){if(!this.validateMultiple)throw"Validator `"+this.name+"` does not handle multiple values";return this.validateMultiple.apply(this,arguments)}if(this.validateNumber)return!isNaN(b)&&(arguments[0]=parseFloat(arguments[0]),this.validateNumber.apply(this,arguments));if(this.validateString)return this.validateString.apply(this,arguments);throw"Validator `"+this.name+"` only handles multiple values"},parseRequirements:function(b,c){if("string"!=typeof b)return a.isArray(b)?b:[b];var d=this.requirementType;if(a.isArray(d)){for(var e=l(b,d.length),f=0;f<e.length;f++)e[f]=m(d[f],e[f]);return e}return a.isPlainObject(d)?n(d,b,c):[m(d,b)]},requirementType:"string",priority:2};var p=function(a,b){this.__class__="ParsleyValidatorRegistry",this.locale="en",this.init(a||{},b||{})},q={email:/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,number:/^-?(\d*\.)?\d+(e[-+]?\d+)?$/i,integer:/^-?\d+$/,digits:/^\d+$/,alphanum:/^\w+$/i,url:new RegExp("^(?:(?:https?|ftp)://)?(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:/\\S*)?$","i")};q.range=q.number;var r=function(a){var b=(""+a).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return b?Math.max(0,(b[1]?b[1].length:0)-(b[2]?+b[2]:0)):0};p.prototype={init:function(b,c){this.catalog=c,this.validators=a.extend({},this.validators);for(var d in b)this.addValidator(d,b[d].fn,b[d].priority);window.Parsley.trigger("parsley:validator:init")},setLocale:function(a){if(void 0===this.catalog[a])throw new Error(a+" is not available in the catalog");return this.locale=a,this},addCatalog:function(a,b,c){return"object"==typeof b&&(this.catalog[a]=b),!0===c?this.setLocale(a):this},addMessage:function(a,b,c){return void 0===this.catalog[a]&&(this.catalog[a]={}),this.catalog[a][b]=c,this},addMessages:function(a,b){for(var c in b)this.addMessage(a,c,b[c]);return this},addValidator:function(a,b,c){if(this.validators[a])h.warn('Validator "'+a+'" is already defined.');else if(i.hasOwnProperty(a))return void h.warn('"'+a+'" is a restricted keyword and is not a valid validator name.');return this._setValidator.apply(this,arguments)},updateValidator:function(a,b,c){return this.validators[a]?this._setValidator.apply(this,arguments):(h.warn('Validator "'+a+'" is not already defined.'),this.addValidator.apply(this,arguments))},removeValidator:function(a){return this.validators[a]||h.warn('Validator "'+a+'" is not defined.'),delete this.validators[a],this},_setValidator:function(a,b,c){"object"!=typeof b&&(b={fn:b,priority:c}),b.validate||(b=new o(b)),this.validators[a]=b;for(var d in b.messages||{})this.addMessage(d,a,b.messages[d]);return this},getErrorMessage:function(a){var b;if("type"===a.name){b=(this.catalog[this.locale][a.name]||{})[a.requirements]}else b=this.formatMessage(this.catalog[this.locale][a.name],a.requirements);return b||this.catalog[this.locale].defaultMessage||this.catalog.en.defaultMessage},formatMessage:function(a,b){if("object"==typeof b){for(var c in b)a=this.formatMessage(a,b[c]);return a}return"string"==typeof a?a.replace(/%s/i,b):""},validators:{notblank:{validateString:function(a){return/\S/.test(a)},priority:2},required:{validateMultiple:function(a){return a.length>0},validateString:function(a){return/\S/.test(a)},priority:512},type:{validateString:function(a,b){var c=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],d=c.step,e=void 0===d?"any":d,f=c.base,g=void 0===f?0:f,h=q[b];if(!h)throw new Error("validator type `"+b+"` is not supported");if(!h.test(a))return!1;if("number"===b&&!/^any$/i.test(e||"")){var i=Number(a),j=Math.max(r(e),r(g));if(r(i)>j)return!1;var k=function(a){return Math.round(a*Math.pow(10,j))};if((k(i)-k(g))%k(e)!=0)return!1}return!0},requirementType:{"":"string",step:"string",base:"number"},priority:256},pattern:{validateString:function(a,b){return b.test(a)},requirementType:"regexp",priority:64},minlength:{validateString:function(a,b){return a.length>=b},requirementType:"integer",priority:30},maxlength:{validateString:function(a,b){return a.length<=b},requirementType:"integer",priority:30},length:{validateString:function(a,b,c){return a.length>=b&&a.length<=c},requirementType:["integer","integer"],priority:30},mincheck:{validateMultiple:function(a,b){return a.length>=b},requirementType:"integer",priority:30},maxcheck:{validateMultiple:function(a,b){return a.length<=b},requirementType:"integer",priority:30},check:{validateMultiple:function(a,b,c){return a.length>=b&&a.length<=c},requirementType:["integer","integer"],priority:30},min:{validateNumber:function(a,b){return a>=b},requirementType:"number",priority:30},max:{validateNumber:function(a,b){return a<=b},requirementType:"number",priority:30},range:{validateNumber:function(a,b,c){return a>=b&&a<=c},requirementType:["number","number"],priority:30},equalto:{validateString:function(b,c){var d=a(c);return d.length?b===d.val():b===c},priority:256}}};var s={},t=function a(b,c,d){for(var e=[],f=[],g=0;g<b.length;g++){for(var h=!1,i=0;i<c.length;i++)if(b[g].assert.name===c[i].assert.name){h=!0;break}h?f.push(b[g]):e.push(b[g])}return{kept:f,added:e,removed:d?[]:a(c,b,!0).added}};s.Form={_actualizeTriggers:function(){var a=this;this.$element.on("submit.Parsley",function(b){a.onSubmitValidate(b)}),this.$element.on("click.Parsley",h._SubmitSelector,function(b){a.onSubmitButton(b)}),!1!==this.options.uiEnabled&&this.$element.attr("novalidate","")},focus:function(){if(this._focusedField=null,!0===this.validationResult||"none"===this.options.focus)return null;for(var a=0;a<this.fields.length;a++){var b=this.fields[a];if(!0!==b.validationResult&&b.validationResult.length>0&&void 0===b.options.noFocus&&(this._focusedField=b.$element,"first"===this.options.focus))break}return null===this._focusedField?null:this._focusedField.focus()},_destroyUI:function(){this.$element.off(".Parsley")}},s.Field={_reflowUI:function(){if(this._buildUI(),this._ui){var a=t(this.validationResult,this._ui.lastValidationResult);this._ui.lastValidationResult=this.validationResult,this._manageStatusClass(),this._manageErrorsMessages(a),this._actualizeTriggers(),!a.kept.length&&!a.added.length||this._failedOnce||(this._failedOnce=!0,this._actualizeTriggers())}},getErrorsMessages:function(){if(!0===this.validationResult)return[];for(var a=[],b=0;b<this.validationResult.length;b++)a.push(this.validationResult[b].errorMessage||this._getErrorMessage(this.validationResult[b].assert));return a},addError:function(a){var b=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],c=b.message,d=b.assert,e=b.updateClass,f=void 0===e||e;this._buildUI(),this._addError(a,{message:c,assert:d}),f&&this._errorClass()},updateError:function(a){var b=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],c=b.message,d=b.assert,e=b.updateClass,f=void 0===e||e;this._buildUI(),this._updateError(a,{message:c,assert:d}),f&&this._errorClass()},removeError:function(a){var b=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],c=b.updateClass,d=void 0===c||c;this._buildUI(),this._removeError(a),d&&this._manageStatusClass()},_manageStatusClass:function(){this.hasConstraints()&&this.needsValidation()&&!0===this.validationResult?this._successClass():this.validationResult.length>0?this._errorClass():this._resetClass()},_manageErrorsMessages:function(b){if(void 0===this.options.errorsMessagesDisabled){if(void 0!==this.options.errorMessage)return b.added.length||b.kept.length?(this._insertErrorWrapper(),0===this._ui.$errorsWrapper.find(".parsley-custom-error-message").length&&this._ui.$errorsWrapper.append(a(this.options.errorTemplate).addClass("parsley-custom-error-message")),this._ui.$errorsWrapper.addClass("filled").find(".parsley-custom-error-message").html(this.options.errorMessage)):this._ui.$errorsWrapper.removeClass("filled").find(".parsley-custom-error-message").remove();for(var c=0;c<b.removed.length;c++)this._removeError(b.removed[c].assert.name);for(c=0;c<b.added.length;c++)this._addError(b.added[c].assert.name,{message:b.added[c].errorMessage,assert:b.added[c].assert});for(c=0;c<b.kept.length;c++)this._updateError(b.kept[c].assert.name,{message:b.kept[c].errorMessage,assert:b.kept[c].assert})}},_addError:function(b,c){var d=c.message,e=c.assert;this._insertErrorWrapper(),this._ui.$errorsWrapper.addClass("filled").append(a(this.options.errorTemplate).addClass("parsley-"+b).html(d||this._getErrorMessage(e)))},_updateError:function(a,b){var c=b.message,d=b.assert;this._ui.$errorsWrapper.addClass("filled").find(".parsley-"+a).html(c||this._getErrorMessage(d))},_removeError:function(a){this._ui.$errorsWrapper.removeClass("filled").find(".parsley-"+a).remove()},_getErrorMessage:function(a){var b=a.name+"Message";return void 0!==this.options[b]?window.Parsley.formatMessage(this.options[b],a.requirements):window.Parsley.getErrorMessage(a)},_buildUI:function(){if(!this._ui&&!1!==this.options.uiEnabled){var b={};this.$element.attr(this.options.namespace+"id",this.__id__),b.$errorClassHandler=this._manageClassHandler(),b.errorsWrapperId="parsley-id-"+(this.options.multiple?"multiple-"+this.options.multiple:this.__id__),b.$errorsWrapper=a(this.options.errorsWrapper).attr("id",b.errorsWrapperId),b.lastValidationResult=[],b.validationInformationVisible=!1,this._ui=b}},_manageClassHandler:function(){if("string"==typeof this.options.classHandler&&a(this.options.classHandler).length)return a(this.options.classHandler);var b=this.options.classHandler.call(this,this);return void 0!==b&&b.length?b:this._inputHolder()},_inputHolder:function(){return!this.options.multiple||this.$element.is("select")?this.$element:this.$element.parent()},_insertErrorWrapper:function(){var b;if(0!==this._ui.$errorsWrapper.parent().length)return this._ui.$errorsWrapper.parent();if("string"==typeof this.options.errorsContainer){if(a(this.options.errorsContainer).length)return a(this.options.errorsContainer).append(this._ui.$errorsWrapper);h.warn("The errors container `"+this.options.errorsContainer+"` does not exist in DOM")}else"function"==typeof this.options.errorsContainer&&(b=this.options.errorsContainer.call(this,this));return void 0!==b&&b.length?b.append(this._ui.$errorsWrapper):this._inputHolder().after(this._ui.$errorsWrapper)},_actualizeTriggers:function(){var a,b=this,c=this._findRelated();c.off(".Parsley"),this._failedOnce?c.on(h.namespaceEvents(this.options.triggerAfterFailure,"Parsley"),function(){b._validateIfNeeded()}):(a=h.namespaceEvents(this.options.trigger,"Parsley"))&&c.on(a,function(a){b._validateIfNeeded(a)})},_validateIfNeeded:function(a){var b=this;a&&/key|input/.test(a.type)&&(!this._ui||!this._ui.validationInformationVisible)&&this.getValue().length<=this.options.validationThreshold||(this.options.debounce?(window.clearTimeout(this._debounced),this._debounced=window.setTimeout(function(){return b.validate()},this.options.debounce)):this.validate())},_resetUI:function(){this._failedOnce=!1,this._actualizeTriggers(),void 0!==this._ui&&(this._ui.$errorsWrapper.removeClass("filled").children().remove(),this._resetClass(),this._ui.lastValidationResult=[],this._ui.validationInformationVisible=!1)},_destroyUI:function(){this._resetUI(),void 0!==this._ui&&this._ui.$errorsWrapper.remove(),delete this._ui},_successClass:function(){this._ui.validationInformationVisible=!0,this._ui.$errorClassHandler.removeClass(this.options.errorClass).addClass(this.options.successClass)},_errorClass:function(){this._ui.validationInformationVisible=!0,this._ui.$errorClassHandler.removeClass(this.options.successClass).addClass(this.options.errorClass)},_resetClass:function(){this._ui.$errorClassHandler.removeClass(this.options.successClass).removeClass(this.options.errorClass)}};var u=function(b,c,d){this.__class__="ParsleyForm",this.$element=a(b),this.domOptions=c,this.options=d,this.parent=window.Parsley,this.fields=[],this.validationResult=null},v={pending:null,resolved:!0,rejected:!1};u.prototype={onSubmitValidate:function(a){var b=this;if(!0!==a.parsley){var c=this._$submitSource||this.$element.find(h._SubmitSelector).first();if(this._$submitSource=null,this.$element.find(".parsley-synthetic-submit-button").prop("disabled",!0),!c.is("[formnovalidate]")){var d=this.whenValidate({event:a});"resolved"===d.state()&&!1!==this._trigger("submit")||(a.stopImmediatePropagation(),a.preventDefault(),"pending"===d.state()&&d.done(function(){b._submit(c)}))}}},onSubmitButton:function(b){this._$submitSource=a(b.currentTarget)},_submit:function(b){if(!1!==this._trigger("submit")){if(b){var c=this.$element.find(".parsley-synthetic-submit-button").prop("disabled",!1);0===c.length&&(c=a('<input class="parsley-synthetic-submit-button" type="hidden">').appendTo(this.$element)),c.attr({name:b.attr("name"),value:b.attr("value")})}this.$element.trigger(a.extend(a.Event("submit"),{parsley:!0}))}},validate:function(b){if(arguments.length>=1&&!a.isPlainObject(b)){h.warnOnce("Calling validate on a parsley form without passing arguments as an object is deprecated.");var c=_slice.call(arguments);b={group:c[0],force:c[1],event:c[2]}}return v[this.whenValidate(b).state()]},whenValidate:function(){var b,c=this,d=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=d.group,f=d.force,g=d.event;this.submitEvent=g,g&&(this.submitEvent=a.extend({},g,{preventDefault:function(){h.warnOnce("Using `this.submitEvent.preventDefault()` is deprecated; instead, call `this.validationResult = false`"),c.validationResult=!1}})),this.validationResult=!0,this._trigger("validate"),this._refreshFields();var i=this._withoutReactualizingFormOptions(function(){return a.map(c.fields,function(a){return a.whenValidate({force:f,group:e})})});return(b=h.all(i).done(function(){c._trigger("success")}).fail(function(){c.validationResult=!1,c.focus(),c._trigger("error")}).always(function(){c._trigger("validated")})).pipe.apply(b,_toConsumableArray(this._pipeAccordingToValidationResult()))},isValid:function(b){if(arguments.length>=1&&!a.isPlainObject(b)){h.warnOnce("Calling isValid on a parsley form without passing arguments as an object is deprecated.");var c=_slice.call(arguments);b={group:c[0],force:c[1]}}return v[this.whenValid(b).state()]},whenValid:function(){var b=this,c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],d=c.group,e=c.force;this._refreshFields();var f=this._withoutReactualizingFormOptions(function(){return a.map(b.fields,function(a){return a.whenValid({group:d,force:e})})});return h.all(f)},reset:function(){for(var a=0;a<this.fields.length;a++)this.fields[a].reset();this._trigger("reset")},destroy:function(){this._destroyUI();for(var a=0;a<this.fields.length;a++)this.fields[a].destroy();this.$element.removeData("Parsley"),this._trigger("destroy")},_refreshFields:function(){return this.actualizeOptions()._bindFields()},_bindFields:function(){var b=this,c=this.fields;return this.fields=[],this.fieldsMappedById={},this._withoutReactualizingFormOptions(function(){b.$element.find(b.options.inputs).not(b.options.excluded).each(function(a,c){var d=new window.Parsley.Factory(c,{},b);if(("ParsleyField"===d.__class__||"ParsleyFieldMultiple"===d.__class__)&&!0!==d.options.excluded){var e=d.__class__+"-"+d.__id__;void 0===b.fieldsMappedById[e]&&(b.fieldsMappedById[e]=d,b.fields.push(d))}}),a.each(h.difference(c,b.fields),function(a,b){b.reset()})}),this},_withoutReactualizingFormOptions:function(a){var b=this.actualizeOptions;this.actualizeOptions=function(){return this};var c=a();return this.actualizeOptions=b,c},_trigger:function(a){return this.trigger("form:"+a)}};var w=function(b,c,d,e,f){var g=window.Parsley._validatorRegistry.validators[c],h=new o(g);a.extend(this,{validator:h,name:c,requirements:d,priority:e||b.options[c+"Priority"]||h.priority,isDomConstraint:!0===f}),this._parseRequirements(b.options)},x=function(a){return a[0].toUpperCase()+a.slice(1)};w.prototype={validate:function(a,b){var c;return(c=this.validator).validate.apply(c,[a].concat(_toConsumableArray(this.requirementList),[b]))},_parseRequirements:function(a){var b=this;this.requirementList=this.validator.parseRequirements(this.requirements,function(c){return a[b.name+x(c)]})}};var y=function(b,c,d,e){this.__class__="ParsleyField",this.$element=a(b),void 0!==e&&(this.parent=e),this.options=d,this.domOptions=c,this.constraints=[],this.constraintsByName={},this.validationResult=!0,this._bindConstraints()},z={pending:null,resolved:!0,rejected:!1};y.prototype={validate:function(b){arguments.length>=1&&!a.isPlainObject(b)&&(h.warnOnce("Calling validate on a parsley field without passing arguments as an object is deprecated."),b={options:b});var c=this.whenValidate(b);if(!c)return!0;switch(c.state()){case"pending":return null;case"resolved":return!0;case"rejected":return this.validationResult}},whenValidate:function(){var a,b=this,c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],d=c.force,e=c.group;if(this.refreshConstraints(),!e||this._isInGroup(e))return this.value=this.getValue(),this._trigger("validate"),(a=this.whenValid({force:d,value:this.value,_refreshed:!0}).always(function(){b._reflowUI()}).done(function(){b._trigger("success")}).fail(function(){b._trigger("error")}).always(function(){b._trigger("validated")})).pipe.apply(a,_toConsumableArray(this._pipeAccordingToValidationResult()))},hasConstraints:function(){return 0!==this.constraints.length},needsValidation:function(a){return void 0===a&&(a=this.getValue()),!(!a.length&&!this._isRequired()&&void 0===this.options.validateIfEmpty)},_isInGroup:function(b){return a.isArray(this.options.group)?-1!==a.inArray(b,this.options.group):this.options.group===b},isValid:function(b){if(arguments.length>=1&&!a.isPlainObject(b)){h.warnOnce("Calling isValid on a parsley field without passing arguments as an object is deprecated.");var c=_slice.call(arguments);b={force:c[0],value:c[1]}}var d=this.whenValid(b);return!d||z[d.state()]},whenValid:function(){var b=this,c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],d=c.force,e=void 0!==d&&d,f=c.value,g=c.group;if(c._refreshed||this.refreshConstraints(),!g||this._isInGroup(g)){if(this.validationResult=!0,!this.hasConstraints())return a.when();if(void 0!==f&&null!==f||(f=this.getValue()),!this.needsValidation(f)&&!0!==e)return a.when();var i=this._getGroupedConstraints(),j=[];return a.each(i,function(c,d){var e=h.all(a.map(d,function(a){return b._validateConstraint(f,a)}));if(j.push(e),"rejected"===e.state())return!1}),h.all(j)}},_validateConstraint:function(b,c){var d=this,e=c.validate(b,this);return!1===e&&(e=a.Deferred().reject()),h.all([e]).fail(function(a){d.validationResult instanceof Array||(d.validationResult=[]),d.validationResult.push({assert:c,errorMessage:"string"==typeof a&&a})})},getValue:function(){var a;return a="function"==typeof this.options.value?this.options.value(this):void 0!==this.options.value?this.options.value:this.$element.val(),void 0===a||null===a?"":this._handleWhitespace(a)},reset:function(){return this._resetUI(),this._trigger("reset")},destroy:function(){this._destroyUI(),this.$element.removeData("Parsley"),this.$element.removeData("ParsleyFieldMultiple"),this._trigger("destroy")},refreshConstraints:function(){return this.actualizeOptions()._bindConstraints()},addConstraint:function(a,b,c,d){if(window.Parsley._validatorRegistry.validators[a]){var e=new w(this,a,b,c,d);"undefined"!==this.constraintsByName[e.name]&&this.removeConstraint(e.name),this.constraints.push(e),this.constraintsByName[e.name]=e}return this},removeConstraint:function(a){for(var b=0;b<this.constraints.length;b++)if(a===this.constraints[b].name){this.constraints.splice(b,1);break}return delete this.constraintsByName[a],this},updateConstraint:function(a,b,c){return this.removeConstraint(a).addConstraint(a,b,c)},_bindConstraints:function(){for(var a=[],b={},c=0;c<this.constraints.length;c++)!1===this.constraints[c].isDomConstraint&&(a.push(this.constraints[c]),b[this.constraints[c].name]=this.constraints[c]);this.constraints=a,this.constraintsByName=b;for(var d in this.options)this.addConstraint(d,this.options[d],void 0,!0);return this._bindHtml5Constraints()},_bindHtml5Constraints:function(){this.$element.attr("required")&&this.addConstraint("required",!0,void 0,!0),"string"==typeof this.$element.attr("pattern")&&this.addConstraint("pattern",this.$element.attr("pattern"),void 0,!0),"date"!==this.$element.attr("type")&&void 0!==this.$element.attr("min")&&void 0!==this.$element.attr("max")?this.addConstraint("range",[this.$element.attr("min"),this.$element.attr("max")],void 0,!0):"date"!==this.$element.attr("type")&&void 0!==this.$element.attr("min")?this.addConstraint("min",this.$element.attr("min"),void 0,!0):"date"!==this.$element.attr("type")&&void 0!==this.$element.attr("max")&&this.addConstraint("max",this.$element.attr("max"),void 0,!0),void 0!==this.$element.attr("minlength")&&void 0!==this.$element.attr("maxlength")?this.addConstraint("length",[this.$element.attr("minlength"),this.$element.attr("maxlength")],void 0,!0):void 0!==this.$element.attr("minlength")?this.addConstraint("minlength",this.$element.attr("minlength"),void 0,!0):void 0!==this.$element.attr("maxlength")&&this.addConstraint("maxlength",this.$element.attr("maxlength"),void 0,!0);var a=this.$element.attr("type");return void 0===a?this:"number"===a?this.addConstraint("type",["number",{step:this.$element.attr("step")||"1",base:this.$element.attr("min")||this.$element.attr("value")}],void 0,!0):/^(email|url|range)$/i.test(a)?this.addConstraint("type",a,void 0,!0):this},_isRequired:function(){return void 0!==this.constraintsByName.required&&!1!==this.constraintsByName.required.requirements},_trigger:function(a){return this.trigger("field:"+a)},_handleWhitespace:function(a){return!0===this.options.trimValue&&h.warnOnce('data-parsley-trim-value="true" is deprecated, please use data-parsley-whitespace="trim"'),"squish"===this.options.whitespace&&(a=a.replace(/\s{2,}/g," ")),"trim"!==this.options.whitespace&&"squish"!==this.options.whitespace&&!0!==this.options.trimValue||(a=h.trimString(a)),a},_getGroupedConstraints:function(){if(!1===this.options.priorityEnabled)return[this.constraints];for(var a=[],b={},c=0;c<this.constraints.length;c++){var d=this.constraints[c].priority;b[d]||a.push(b[d]=[]),b[d].push(this.constraints[c])}return a.sort(function(a,b){return b[0].priority-a[0].priority}),a}};var A=y,B=function(){this.__class__="ParsleyFieldMultiple"};B.prototype={addElement:function(a){return this.$elements.push(a),this},refreshConstraints:function(){var b;if(this.constraints=[],this.$element.is("select"))return this.actualizeOptions()._bindConstraints(),this;for(var c=0;c<this.$elements.length;c++)if(a("html").has(this.$elements[c]).length){b=this.$elements[c].data("ParsleyFieldMultiple").refreshConstraints().constraints;for(var d=0;d<b.length;d++)this.addConstraint(b[d].name,b[d].requirements,b[d].priority,b[d].isDomConstraint)}else this.$elements.splice(c,1);return this},getValue:function(){if("function"==typeof this.options.value)return this.options.value(this);if(void 0!==this.options.value)return this.options.value;if(this.$element.is("input[type=radio]"))return this._findRelated().filter(":checked").val()||"";if(this.$element.is("input[type=checkbox]")){var b=[];return this._findRelated().filter(":checked").each(function(){b.push(a(this).val())}),b}return this.$element.is("select")&&null===this.$element.val()?[]:this.$element.val()},_init:function(){return this.$elements=[this.$element],this}};var C=function(b,c,d){this.$element=a(b);var e=this.$element.data("Parsley");if(e)return void 0!==d&&e.parent===window.Parsley&&(e.parent=d,e._resetOptions(e.options)),"object"==typeof c&&a.extend(e.options,c),e;if(!this.$element.length)throw new Error("You must bind Parsley on an existing element.");if(void 0!==d&&"ParsleyForm"!==d.__class__)throw new Error("Parent instance must be a ParsleyForm instance");return this.parent=d||window.Parsley,this.init(c)};C.prototype={init:function(a){return this.__class__="Parsley",this.__version__="2.6.5",this.__id__=h.generateID(),this._resetOptions(a),
2
- this.$element.is("form")||h.checkAttr(this.$element,this.options.namespace,"validate")&&!this.$element.is(this.options.inputs)?this.bind("parsleyForm"):this.isMultiple()?this.handleMultiple():this.bind("parsleyField")},isMultiple:function(){return this.$element.is("input[type=radio], input[type=checkbox]")||this.$element.is("select")&&void 0!==this.$element.attr("multiple")},handleMultiple:function(){var b,c,d=this;if(this.options.multiple||(void 0!==this.$element.attr("name")&&this.$element.attr("name").length?this.options.multiple=b=this.$element.attr("name"):void 0!==this.$element.attr("id")&&this.$element.attr("id").length&&(this.options.multiple=this.$element.attr("id"))),this.$element.is("select")&&void 0!==this.$element.attr("multiple"))return this.options.multiple=this.options.multiple||this.__id__,this.bind("parsleyFieldMultiple");if(!this.options.multiple)return h.warn("To be bound by Parsley, a radio, a checkbox and a multiple select input must have either a name or a multiple option.",this.$element),this;this.options.multiple=this.options.multiple.replace(/(:|\.|\[|\]|\{|\}|\$)/g,""),void 0!==b&&a('input[name="'+b+'"]').each(function(b,c){a(c).is("input[type=radio], input[type=checkbox]")&&a(c).attr(d.options.namespace+"multiple",d.options.multiple)});for(var e=this._findRelated(),f=0;f<e.length;f++)if(void 0!==(c=a(e.get(f)).data("Parsley"))){this.$element.data("ParsleyFieldMultiple")||c.addElement(this.$element);break}return this.bind("parsleyField",!0),c||this.bind("parsleyFieldMultiple")},bind:function(b,c){var d;switch(b){case"parsleyForm":d=a.extend(new u(this.$element,this.domOptions,this.options),new j,window.ParsleyExtend)._bindFields();break;case"parsleyField":d=a.extend(new A(this.$element,this.domOptions,this.options,this.parent),new j,window.ParsleyExtend);break;case"parsleyFieldMultiple":d=a.extend(new A(this.$element,this.domOptions,this.options,this.parent),new B,new j,window.ParsleyExtend)._init();break;default:throw new Error(b+"is not a supported Parsley type")}return this.options.multiple&&h.setAttr(this.$element,this.options.namespace,"multiple",this.options.multiple),void 0!==c?(this.$element.data("ParsleyFieldMultiple",d),d):(this.$element.data("Parsley",d),d._actualizeTriggers(),d._trigger("init"),d)}};var D=a.fn.jquery.split(".");if(parseInt(D[0])<=1&&parseInt(D[1])<8)throw"The loaded version of jQuery is too old. Please upgrade to 1.8.x or better.";D.forEach||h.warn("Parsley requires ES5 to run properly. Please include https://github.com/es-shims/es5-shim");var E=a.extend(new j,{$element:a(document),actualizeOptions:null,_resetOptions:null,Factory:C,version:"2.6.5"});a.extend(A.prototype,s.Field,j.prototype),a.extend(u.prototype,s.Form,j.prototype),a.extend(C.prototype,j.prototype),a.fn.parsley=a.fn.psly=function(b){if(this.length>1){var c=[];return this.each(function(){c.push(a(this).parsley(b))}),c}return a(this).length?new C(this,b):void h.warn("You must bind Parsley on an existing element.")},void 0===window.ParsleyExtend&&(window.ParsleyExtend={}),E.options=a.extend(h.objectCreate(i),window.ParsleyConfig),window.ParsleyConfig=E.options,window.Parsley=window.psly=E,window.ParsleyUtils=h;var F=window.Parsley._validatorRegistry=new p(window.ParsleyConfig.validators,window.ParsleyConfig.i18n);window.ParsleyValidator={},a.each("setLocale addCatalog addMessage addMessages getErrorMessage formatMessage addValidator updateValidator removeValidator".split(" "),function(b,c){window.Parsley[c]=a.proxy(F,c),window.ParsleyValidator[c]=function(){var a;return h.warnOnce("Accessing the method '"+c+"' through ParsleyValidator is deprecated. Simply call 'window.Parsley."+c+"(...)'"),(a=window.Parsley)[c].apply(a,arguments)}}),window.Parsley.UI=s,window.ParsleyUI={removeError:function(a,b,c){var d=!0!==c;return h.warnOnce("Accessing ParsleyUI is deprecated. Call 'removeError' on the instance directly. Please comment in issue 1073 as to your need to call this method."),a.removeError(b,{updateClass:d})},getErrorsMessages:function(a){return h.warnOnce("Accessing ParsleyUI is deprecated. Call 'getErrorsMessages' on the instance directly."),a.getErrorsMessages()}},a.each("addError updateError".split(" "),function(a,b){window.ParsleyUI[b]=function(a,c,d,e,f){var g=!0!==f;return h.warnOnce("Accessing ParsleyUI is deprecated. Call '"+b+"' on the instance directly. Please comment in issue 1073 as to your need to call this method."),a[b](c,{message:d,assert:e,updateClass:g})}}),!1!==window.ParsleyConfig.autoBind&&a(function(){a("[data-parsley-validate]").length&&a("[data-parsley-validate]").parsley()});var G=a({}),H=function(){h.warnOnce("Parsley's pubsub module is deprecated; use the 'on' and 'off' methods on parsley instances or window.Parsley")},I="parsley:";a.listen=function(a,d){var e;if(H(),"object"==typeof arguments[1]&&"function"==typeof arguments[2]&&(e=arguments[1],d=arguments[2]),"function"!=typeof d)throw new Error("Wrong parameters");window.Parsley.on(c(a),b(d,e))},a.listenTo=function(a,d,e){if(H(),!(a instanceof A||a instanceof u))throw new Error("Must give Parsley instance");if("string"!=typeof d||"function"!=typeof e)throw new Error("Wrong parameters");a.on(c(d),b(e))},a.unsubscribe=function(a,b){if(H(),"string"!=typeof a||"function"!=typeof b)throw new Error("Wrong arguments");window.Parsley.off(c(a),b.parsleyAdaptedCallback)},a.unsubscribeTo=function(a,b){if(H(),!(a instanceof A||a instanceof u))throw new Error("Must give Parsley instance");a.off(c(b))},a.unsubscribeAll=function(b){H(),window.Parsley.off(c(b)),a("form,input,textarea,select").each(function(){var d=a(this).data("Parsley");d&&d.off(c(b))})},a.emit=function(a,b){var d;H();var e=b instanceof A||b instanceof u,f=Array.prototype.slice.call(arguments,e?2:1);f.unshift(c(a)),e||(b=window.Parsley),(d=b).trigger.apply(d,_toConsumableArray(f))};return a.extend(!0,E,{asyncValidators:{default:{fn:function(a){return a.status>=200&&a.status<300},url:!1},reverse:{fn:function(a){return a.status<200||a.status>=300},url:!1}},addAsyncValidator:function(a,b,c,d){return E.asyncValidators[a]={fn:b,url:c||!1,options:d||{}},this}}),E.addValidator("remote",{requirementType:{"":"string",validator:"string",reverse:"boolean",options:"object"},validateString:function(b,c,d,e){var f,g,h={},i=d.validator||(!0===d.reverse?"reverse":"default");if(void 0===E.asyncValidators[i])throw new Error("Calling an undefined async validator: `"+i+"`");c=E.asyncValidators[i].url||c,c.indexOf("{value}")>-1?c=c.replace("{value}",encodeURIComponent(b)):h[e.$element.attr("name")||e.$element.attr("id")]=b;var j=a.extend(!0,d.options||{},E.asyncValidators[i].options);f=a.extend(!0,{},{url:c,data:h,type:"GET"},j),e.trigger("field:ajaxoptions",e,f),g=a.param(f),void 0===E._remoteCache&&(E._remoteCache={});var k=E._remoteCache[g]=E._remoteCache[g]||a.ajax(f),l=function(){var b=E.asyncValidators[i].fn.call(e,k,c,d);return b||(b=a.Deferred().reject()),a.when(b)};return k.then(l,l)},priority:-1}),E.on("form:submit",function(){E._remoteCache={}}),window.ParsleyExtend.addAsyncValidator=function(){return ParsleyUtils.warnOnce("Accessing the method `addAsyncValidator` through an instance is deprecated. Simply call `Parsley.addAsyncValidator(...)`"),E.addAsyncValidator.apply(E,arguments)},E.addMessages("en",{defaultMessage:"This value seems to be invalid.",type:{email:"This value should be a valid email.",url:"This value should be a valid url.",number:"This value should be a valid number.",integer:"This value should be a valid integer.",digits:"This value should be digits.",alphanum:"This value should be alphanumeric."},notblank:"This value should not be blank.",required:"This value is required.",pattern:"This value seems to be invalid.",min:"This value should be greater than or equal to %s.",max:"This value should be lower than or equal to %s.",range:"This value should be between %s and %s.",minlength:"This value is too short. It should have %s characters or more.",maxlength:"This value is too long. It should have %s characters or fewer.",length:"This value length is invalid. It should be between %s and %s characters long.",mincheck:"You must select at least %s choices.",maxcheck:"You must select %s choices or fewer.",check:"You must select between %s and %s choices.",equalto:"This value should be the same."}),E.setLocale("en"),(new d).install(),E});var _slice=Array.prototype.slice;!function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],b):a.parsley=b(a.jQuery)}(this,function(a){"use strict";function b(a,b){return a.parsleyAdaptedCallback||(a.parsleyAdaptedCallback=function(){var c=Array.prototype.slice.call(arguments,0);c.unshift(this),a.apply(b||G,c)}),a.parsleyAdaptedCallback}function c(a){return 0===a.lastIndexOf(I,0)?a.substr(I.length):a}function d(){var b=this,c=window||global;a.extend(this,{isNativeEvent:function(a){return a.originalEvent&&!1!==a.originalEvent.isTrusted},fakeInputEvent:function(c){b.isNativeEvent(c)&&a(c.target).trigger("input")},misbehaves:function(c){b.isNativeEvent(c)&&(b.behavesOk(c),a(document).on("change.inputevent",c.data.selector,b.fakeInputEvent),b.fakeInputEvent(c))},behavesOk:function(c){b.isNativeEvent(c)&&a(document).off("input.inputevent",c.data.selector,b.behavesOk).off("change.inputevent",c.data.selector,b.misbehaves)},install:function(){if(!c.inputEventPatched){c.inputEventPatched="0.0.3";for(var d=["select",'input[type="checkbox"]','input[type="radio"]','input[type="file"]'],e=0;e<d.length;e++){var f=d[e];a(document).on("input.inputevent",f,{selector:f},b.behavesOk).on("change.inputevent",f,{selector:f},b.misbehaves)}}},uninstall:function(){delete c.inputEventPatched,a(document).off(".inputevent")}})}var e=1,f={},g={attr:function(a,b,c){var d,e,f,g=new RegExp("^"+b,"i");if(void 0===c)c={};else for(d in c)c.hasOwnProperty(d)&&delete c[d];if(void 0===a||void 0===a[0])return c;for(f=a[0].attributes,d=f.length;d--;)(e=f[d])&&e.specified&&g.test(e.name)&&(c[this.camelize(e.name.slice(b.length))]=this.deserializeValue(e.value));return c},checkAttr:function(a,b,c){return a.is("["+b+c+"]")},setAttr:function(a,b,c,d){a[0].setAttribute(this.dasherize(b+c),String(d))},generateID:function(){return""+e++},deserializeValue:function(b){var c;try{return b?"true"==b||"false"!=b&&("null"==b?null:isNaN(c=Number(b))?/^[\[\{]/.test(b)?a.parseJSON(b):b:c):b}catch(a){return b}},camelize:function(a){return a.replace(/-+(.)?/g,function(a,b){return b?b.toUpperCase():""})},dasherize:function(a){return a.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()},warn:function(){var a;window.console&&"function"==typeof window.console.warn&&(a=window.console).warn.apply(a,arguments)},warnOnce:function(a){f[a]||(f[a]=!0,this.warn.apply(this,arguments))},_resetWarnings:function(){f={}},trimString:function(a){return a.replace(/^\s+|\s+$/g,"")},namespaceEvents:function(b,c){return b=this.trimString(b||"").split(/\s+/),b[0]?a.map(b,function(a){return a+"."+c}).join(" "):""},difference:function(b,c){var d=[];return a.each(b,function(a,b){-1==c.indexOf(b)&&d.push(b)}),d},all:function(b){return a.when.apply(a,_toConsumableArray(b).concat([42,42]))},objectCreate:Object.create||function(){var a=function(){};return function(b){if(arguments.length>1)throw Error("Second argument not supported");if("object"!=typeof b)throw TypeError("Argument must be an object");a.prototype=b;var c=new a;return a.prototype=null,c}}(),_SubmitSelector:'input[type="submit"], button:submit'},h=g,i={namespace:"data-parsley-",inputs:"input, textarea, select",excluded:"input[type=button], input[type=submit], input[type=reset], input[type=hidden]",priorityEnabled:!0,multiple:null,group:null,uiEnabled:!0,validationThreshold:3,focus:"first",trigger:!1,triggerAfterFailure:"input",errorClass:"parsley-error",successClass:"parsley-success",classHandler:function(a){},errorsContainer:function(a){},errorsWrapper:'<ul class="parsley-errors-list"></ul>',errorTemplate:"<li></li>"},j=function(){this.__id__=h.generateID()};j.prototype={asyncSupport:!0,_pipeAccordingToValidationResult:function(){var b=this,c=function(){var c=a.Deferred();return!0!==b.validationResult&&c.reject(),c.resolve().promise()};return[c,c]},actualizeOptions:function(){return h.attr(this.$element,this.options.namespace,this.domOptions),this.parent&&this.parent.actualizeOptions&&this.parent.actualizeOptions(),this},_resetOptions:function(a){this.domOptions=h.objectCreate(this.parent.options),this.options=h.objectCreate(this.domOptions);for(var b in a)a.hasOwnProperty(b)&&(this.options[b]=a[b]);this.actualizeOptions()},_listeners:null,on:function(a,b){return this._listeners=this._listeners||{},(this._listeners[a]=this._listeners[a]||[]).push(b),this},subscribe:function(b,c){a.listenTo(this,b.toLowerCase(),c)},off:function(a,b){var c=this._listeners&&this._listeners[a];if(c)if(b)for(var d=c.length;d--;)c[d]===b&&c.splice(d,1);else delete this._listeners[a];return this},unsubscribe:function(b,c){a.unsubscribeTo(this,b.toLowerCase())},trigger:function(a,b,c){b=b||this;var d,e=this._listeners&&this._listeners[a];if(e)for(var f=e.length;f--;)if(!1===(d=e[f].call(b,b,c)))return d;return!this.parent||this.parent.trigger(a,b,c)},asyncIsValid:function(a,b){return h.warnOnce("asyncIsValid is deprecated; please use whenValid instead"),this.whenValid({group:a,force:b})},_findRelated:function(){return this.options.multiple?this.parent.$element.find("["+this.options.namespace+'multiple="'+this.options.multiple+'"]'):this.$element}};var k={string:function(a){return a},integer:function(a){if(isNaN(a))throw'Requirement is not an integer: "'+a+'"';return parseInt(a,10)},number:function(a){if(isNaN(a))throw'Requirement is not a number: "'+a+'"';return parseFloat(a)},reference:function(b){var c=a(b);if(0===c.length)throw'No such reference: "'+b+'"';return c},boolean:function(a){return"false"!==a},object:function(a){return h.deserializeValue(a)},regexp:function(a){var b="";return/^\/.*\/(?:[gimy]*)$/.test(a)?(b=a.replace(/.*\/([gimy]*)$/,"$1"),a=a.replace(new RegExp("^/(.*?)/"+b+"$"),"$1")):a="^"+a+"$",new RegExp(a,b)}},l=function(a,b){var c=a.match(/^\s*\[(.*)\]\s*$/);if(!c)throw'Requirement is not an array: "'+a+'"';var d=c[1].split(",").map(h.trimString);if(d.length!==b)throw"Requirement has "+d.length+" values when "+b+" are needed";return d},m=function(a,b){var c=k[a||"string"];if(!c)throw'Unknown requirement specification: "'+a+'"';return c(b)},n=function(a,b,c){var d=null,e={};for(var f in a)if(f){var g=c(f);"string"==typeof g&&(g=m(a[f],g)),e[f]=g}else d=m(a[f],b);return[d,e]},o=function(b){a.extend(!0,this,b)};o.prototype={validate:function(b,c){if(this.fn)return arguments.length>3&&(c=[].slice.call(arguments,1,-1)),this.fn(b,c);if(a.isArray(b)){if(!this.validateMultiple)throw"Validator `"+this.name+"` does not handle multiple values";return this.validateMultiple.apply(this,arguments)}if(this.validateNumber)return!isNaN(b)&&(arguments[0]=parseFloat(arguments[0]),this.validateNumber.apply(this,arguments));if(this.validateString)return this.validateString.apply(this,arguments);throw"Validator `"+this.name+"` only handles multiple values"},parseRequirements:function(b,c){if("string"!=typeof b)return a.isArray(b)?b:[b];var d=this.requirementType;if(a.isArray(d)){for(var e=l(b,d.length),f=0;f<e.length;f++)e[f]=m(d[f],e[f]);return e}return a.isPlainObject(d)?n(d,b,c):[m(d,b)]},requirementType:"string",priority:2};var p=function(a,b){this.__class__="ParsleyValidatorRegistry",this.locale="en",this.init(a||{},b||{})},q={email:/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,number:/^-?(\d*\.)?\d+(e[-+]?\d+)?$/i,integer:/^-?\d+$/,digits:/^\d+$/,alphanum:/^\w+$/i,url:new RegExp("^(?:(?:https?|ftp)://)?(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:/\\S*)?$","i")};q.range=q.number;var r=function(a){var b=(""+a).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return b?Math.max(0,(b[1]?b[1].length:0)-(b[2]?+b[2]:0)):0};p.prototype={init:function(b,c){this.catalog=c,this.validators=a.extend({},this.validators);for(var d in b)this.addValidator(d,b[d].fn,b[d].priority);window.Parsley.trigger("parsley:validator:init")},setLocale:function(a){if(void 0===this.catalog[a])throw new Error(a+" is not available in the catalog");return this.locale=a,this},addCatalog:function(a,b,c){return"object"==typeof b&&(this.catalog[a]=b),!0===c?this.setLocale(a):this},addMessage:function(a,b,c){return void 0===this.catalog[a]&&(this.catalog[a]={}),this.catalog[a][b]=c,this},addMessages:function(a,b){for(var c in b)this.addMessage(a,c,b[c]);return this},addValidator:function(a,b,c){if(this.validators[a])h.warn('Validator "'+a+'" is already defined.');else if(i.hasOwnProperty(a))return void h.warn('"'+a+'" is a restricted keyword and is not a valid validator name.');return this._setValidator.apply(this,arguments)},updateValidator:function(a,b,c){return this.validators[a]?this._setValidator.apply(this,arguments):(h.warn('Validator "'+a+'" is not already defined.'),this.addValidator.apply(this,arguments))},removeValidator:function(a){return this.validators[a]||h.warn('Validator "'+a+'" is not defined.'),delete this.validators[a],this},_setValidator:function(a,b,c){"object"!=typeof b&&(b={fn:b,priority:c}),b.validate||(b=new o(b)),this.validators[a]=b;for(var d in b.messages||{})this.addMessage(d,a,b.messages[d]);return this},getErrorMessage:function(a){var b;if("type"===a.name){b=(this.catalog[this.locale][a.name]||{})[a.requirements]}else b=this.formatMessage(this.catalog[this.locale][a.name],a.requirements);return b||this.catalog[this.locale].defaultMessage||this.catalog.en.defaultMessage},formatMessage:function(a,b){if("object"==typeof b){for(var c in b)a=this.formatMessage(a,b[c]);return a}return"string"==typeof a?a.replace(/%s/i,b):""},validators:{notblank:{validateString:function(a){return/\S/.test(a)},priority:2},required:{validateMultiple:function(a){return a.length>0},validateString:function(a){return/\S/.test(a)},priority:512},type:{validateString:function(a,b){var c=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],d=c.step,e=void 0===d?"any":d,f=c.base,g=void 0===f?0:f,h=q[b];if(!h)throw new Error("validator type `"+b+"` is not supported");if(!h.test(a))return!1;if("number"===b&&!/^any$/i.test(e||"")){var i=Number(a),j=Math.max(r(e),r(g));if(r(i)>j)return!1;var k=function(a){return Math.round(a*Math.pow(10,j))};if((k(i)-k(g))%k(e)!=0)return!1}return!0},requirementType:{"":"string",step:"string",base:"number"},priority:256},pattern:{validateString:function(a,b){return b.test(a)},requirementType:"regexp",priority:64},minlength:{validateString:function(a,b){return a.length>=b},requirementType:"integer",priority:30},maxlength:{validateString:function(a,b){return a.length<=b},requirementType:"integer",priority:30},length:{validateString:function(a,b,c){return a.length>=b&&a.length<=c},requirementType:["integer","integer"],priority:30},mincheck:{validateMultiple:function(a,b){return a.length>=b},requirementType:"integer",priority:30},maxcheck:{validateMultiple:function(a,b){return a.length<=b},requirementType:"integer",priority:30},check:{validateMultiple:function(a,b,c){return a.length>=b&&a.length<=c},requirementType:["integer","integer"],priority:30},min:{validateNumber:function(a,b){return a>=b},requirementType:"number",priority:30},max:{validateNumber:function(a,b){return a<=b},requirementType:"number",priority:30},range:{validateNumber:function(a,b,c){return a>=b&&a<=c},requirementType:["number","number"],priority:30},equalto:{validateString:function(b,c){var d=a(c);return d.length?b===d.val():b===c},priority:256}}};var s={},t=function a(b,c,d){for(var e=[],f=[],g=0;g<b.length;g++){for(var h=!1,i=0;i<c.length;i++)if(b[g].assert.name===c[i].assert.name){h=!0;break}h?f.push(b[g]):e.push(b[g])}return{kept:f,added:e,removed:d?[]:a(c,b,!0).added}};s.Form={_actualizeTriggers:function(){var a=this;this.$element.on("submit.Parsley",function(b){a.onSubmitValidate(b)}),this.$element.on("click.Parsley",h._SubmitSelector,function(b){a.onSubmitButton(b)}),!1!==this.options.uiEnabled&&this.$element.attr("novalidate","")},focus:function(){if(this._focusedField=null,!0===this.validationResult||"none"===this.options.focus)return null;for(var a=0;a<this.fields.length;a++){var b=this.fields[a];if(!0!==b.validationResult&&b.validationResult.length>0&&void 0===b.options.noFocus&&(this._focusedField=b.$element,"first"===this.options.focus))break}return null===this._focusedField?null:this._focusedField.focus()},_destroyUI:function(){this.$element.off(".Parsley")}},s.Field={_reflowUI:function(){if(this._buildUI(),this._ui){var a=t(this.validationResult,this._ui.lastValidationResult);this._ui.lastValidationResult=this.validationResult,this._manageStatusClass(),this._manageErrorsMessages(a),this._actualizeTriggers(),!a.kept.length&&!a.added.length||this._failedOnce||(this._failedOnce=!0,this._actualizeTriggers())}},getErrorsMessages:function(){if(!0===this.validationResult)return[];for(var a=[],b=0;b<this.validationResult.length;b++)a.push(this.validationResult[b].errorMessage||this._getErrorMessage(this.validationResult[b].assert));return a},addError:function(a){var b=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],c=b.message,d=b.assert,e=b.updateClass,f=void 0===e||e;this._buildUI(),this._addError(a,{message:c,assert:d}),f&&this._errorClass()},updateError:function(a){var b=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],c=b.message,d=b.assert,e=b.updateClass,f=void 0===e||e;this._buildUI(),this._updateError(a,{message:c,assert:d}),f&&this._errorClass()},removeError:function(a){var b=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],c=b.updateClass,d=void 0===c||c;this._buildUI(),this._removeError(a),d&&this._manageStatusClass()},_manageStatusClass:function(){this.hasConstraints()&&this.needsValidation()&&!0===this.validationResult?this._successClass():this.validationResult.length>0?this._errorClass():this._resetClass()},_manageErrorsMessages:function(b){if(void 0===this.options.errorsMessagesDisabled){if(void 0!==this.options.errorMessage)return b.added.length||b.kept.length?(this._insertErrorWrapper(),0===this._ui.$errorsWrapper.find(".parsley-custom-error-message").length&&this._ui.$errorsWrapper.append(a(this.options.errorTemplate).addClass("parsley-custom-error-message")),this._ui.$errorsWrapper.addClass("filled").find(".parsley-custom-error-message").html(this.options.errorMessage)):this._ui.$errorsWrapper.removeClass("filled").find(".parsley-custom-error-message").remove();for(var c=0;c<b.removed.length;c++)this._removeError(b.removed[c].assert.name);for(c=0;c<b.added.length;c++)this._addError(b.added[c].assert.name,{message:b.added[c].errorMessage,assert:b.added[c].assert});for(c=0;c<b.kept.length;c++)this._updateError(b.kept[c].assert.name,{message:b.kept[c].errorMessage,assert:b.kept[c].assert})}},_addError:function(b,c){var d=c.message,e=c.assert;this._insertErrorWrapper(),this._ui.$errorsWrapper.addClass("filled").append(a(this.options.errorTemplate).addClass("parsley-"+b).html(d||this._getErrorMessage(e)))},_updateError:function(a,b){var c=b.message,d=b.assert;this._ui.$errorsWrapper.addClass("filled").find(".parsley-"+a).html(c||this._getErrorMessage(d))},_removeError:function(a){this._ui.$errorsWrapper.removeClass("filled").find(".parsley-"+a).remove()},_getErrorMessage:function(a){var b=a.name+"Message";return void 0!==this.options[b]?window.Parsley.formatMessage(this.options[b],a.requirements):window.Parsley.getErrorMessage(a)},_buildUI:function(){if(!this._ui&&!1!==this.options.uiEnabled){var b={};this.$element.attr(this.options.namespace+"id",this.__id__),b.$errorClassHandler=this._manageClassHandler(),b.errorsWrapperId="parsley-id-"+(this.options.multiple?"multiple-"+this.options.multiple:this.__id__),b.$errorsWrapper=a(this.options.errorsWrapper).attr("id",b.errorsWrapperId),b.lastValidationResult=[],b.validationInformationVisible=!1,this._ui=b}},_manageClassHandler:function(){if("string"==typeof this.options.classHandler&&a(this.options.classHandler).length)return a(this.options.classHandler);var b=this.options.classHandler.call(this,this);return void 0!==b&&b.length?b:this._inputHolder()},_inputHolder:function(){return!this.options.multiple||this.$element.is("select")?this.$element:this.$element.parent()},_insertErrorWrapper:function(){var b;if(0!==this._ui.$errorsWrapper.parent().length)return this._ui.$errorsWrapper.parent();if("string"==typeof this.options.errorsContainer){if(a(this.options.errorsContainer).length)return a(this.options.errorsContainer).append(this._ui.$errorsWrapper);h.warn("The errors container `"+this.options.errorsContainer+"` does not exist in DOM")}else"function"==typeof this.options.errorsContainer&&(b=this.options.errorsContainer.call(this,this));return void 0!==b&&b.length?b.append(this._ui.$errorsWrapper):this._inputHolder().after(this._ui.$errorsWrapper)},_actualizeTriggers:function(){var a,b=this,c=this._findRelated();c.off(".Parsley"),this._failedOnce?c.on(h.namespaceEvents(this.options.triggerAfterFailure,"Parsley"),function(){b._validateIfNeeded()}):(a=h.namespaceEvents(this.options.trigger,"Parsley"))&&c.on(a,function(a){b._validateIfNeeded(a)})},_validateIfNeeded:function(a){var b=this;a&&/key|input/.test(a.type)&&(!this._ui||!this._ui.validationInformationVisible)&&this.getValue().length<=this.options.validationThreshold||(this.options.debounce?(window.clearTimeout(this._debounced),this._debounced=window.setTimeout(function(){return b.validate()},this.options.debounce)):this.validate())},_resetUI:function(){this._failedOnce=!1,this._actualizeTriggers(),void 0!==this._ui&&(this._ui.$errorsWrapper.removeClass("filled").children().remove(),this._resetClass(),this._ui.lastValidationResult=[],this._ui.validationInformationVisible=!1)},_destroyUI:function(){this._resetUI(),void 0!==this._ui&&this._ui.$errorsWrapper.remove(),delete this._ui},_successClass:function(){this._ui.validationInformationVisible=!0,this._ui.$errorClassHandler.removeClass(this.options.errorClass).addClass(this.options.successClass)},_errorClass:function(){this._ui.validationInformationVisible=!0,this._ui.$errorClassHandler.removeClass(this.options.successClass).addClass(this.options.errorClass)},_resetClass:function(){this._ui.$errorClassHandler.removeClass(this.options.successClass).removeClass(this.options.errorClass)}};var u=function(b,c,d){this.__class__="ParsleyForm",this.$element=a(b),this.domOptions=c,this.options=d,this.parent=window.Parsley,this.fields=[],this.validationResult=null},v={pending:null,resolved:!0,rejected:!1};u.prototype={onSubmitValidate:function(a){var b=this;if(!0!==a.parsley){var c=this._$submitSource||this.$element.find(h._SubmitSelector).first();if(this._$submitSource=null,this.$element.find(".parsley-synthetic-submit-button").prop("disabled",!0),!c.is("[formnovalidate]")){var d=this.whenValidate({event:a});"resolved"===d.state()&&!1!==this._trigger("submit")||(a.stopImmediatePropagation(),a.preventDefault(),"pending"===d.state()&&d.done(function(){b._submit(c)}))}}},onSubmitButton:function(b){this._$submitSource=a(b.currentTarget)},_submit:function(b){if(!1!==this._trigger("submit")){if(b){var c=this.$element.find(".parsley-synthetic-submit-button").prop("disabled",!1);0===c.length&&(c=a('<input class="parsley-synthetic-submit-button" type="hidden">').appendTo(this.$element)),c.attr({name:b.attr("name"),value:b.attr("value")})}this.$element.trigger(a.extend(a.Event("submit"),{parsley:!0}))}},validate:function(b){if(arguments.length>=1&&!a.isPlainObject(b)){h.warnOnce("Calling validate on a parsley form without passing arguments as an object is deprecated.");var c=_slice.call(arguments);b={group:c[0],force:c[1],event:c[2]}}return v[this.whenValidate(b).state()]},whenValidate:function(){var b,c=this,d=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=d.group,f=d.force,g=d.event;this.submitEvent=g,g&&(this.submitEvent=a.extend({},g,{preventDefault:function(){h.warnOnce("Using `this.submitEvent.preventDefault()` is deprecated; instead, call `this.validationResult = false`"),c.validationResult=!1}})),this.validationResult=!0,this._trigger("validate"),this._refreshFields();var i=this._withoutReactualizingFormOptions(function(){return a.map(c.fields,function(a){return a.whenValidate({force:f,group:e})})});return(b=h.all(i).done(function(){c._trigger("success")}).fail(function(){c.validationResult=!1,c.focus(),c._trigger("error")}).always(function(){c._trigger("validated")})).pipe.apply(b,_toConsumableArray(this._pipeAccordingToValidationResult()))},isValid:function(b){if(arguments.length>=1&&!a.isPlainObject(b)){h.warnOnce("Calling isValid on a parsley form without passing arguments as an object is deprecated.");var c=_slice.call(arguments);b={group:c[0],force:c[1]}}return v[this.whenValid(b).state()]},whenValid:function(){var b=this,c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],d=c.group,e=c.force;this._refreshFields();var f=this._withoutReactualizingFormOptions(function(){return a.map(b.fields,function(a){return a.whenValid({group:d,force:e})})});return h.all(f)},reset:function(){for(var a=0;a<this.fields.length;a++)this.fields[a].reset();this._trigger("reset")},destroy:function(){this._destroyUI();for(var a=0;a<this.fields.length;a++)this.fields[a].destroy();this.$element.removeData("Parsley"),this._trigger("destroy")},_refreshFields:function(){return this.actualizeOptions()._bindFields()},_bindFields:function(){var b=this,c=this.fields;return this.fields=[],this.fieldsMappedById={},this._withoutReactualizingFormOptions(function(){b.$element.find(b.options.inputs).not(b.options.excluded).each(function(a,c){var d=new window.Parsley.Factory(c,{},b);if(("ParsleyField"===d.__class__||"ParsleyFieldMultiple"===d.__class__)&&!0!==d.options.excluded){var e=d.__class__+"-"+d.__id__;void 0===b.fieldsMappedById[e]&&(b.fieldsMappedById[e]=d,b.fields.push(d))}}),a.each(h.difference(c,b.fields),function(a,b){b.reset()})}),this},_withoutReactualizingFormOptions:function(a){var b=this.actualizeOptions;this.actualizeOptions=function(){return this};var c=a();return this.actualizeOptions=b,c},_trigger:function(a){return this.trigger("form:"+a)}};var w=function(b,c,d,e,f){var g=window.Parsley._validatorRegistry.validators[c],h=new o(g);a.extend(this,{validator:h,name:c,requirements:d,priority:e||b.options[c+"Priority"]||h.priority,isDomConstraint:!0===f}),this._parseRequirements(b.options)},x=function(a){return a[0].toUpperCase()+a.slice(1)};w.prototype={validate:function(a,b){var c;return(c=this.validator).validate.apply(c,[a].concat(_toConsumableArray(this.requirementList),[b]))},_parseRequirements:function(a){var b=this
3
- ;this.requirementList=this.validator.parseRequirements(this.requirements,function(c){return a[b.name+x(c)]})}};var y=function(b,c,d,e){this.__class__="ParsleyField",this.$element=a(b),void 0!==e&&(this.parent=e),this.options=d,this.domOptions=c,this.constraints=[],this.constraintsByName={},this.validationResult=!0,this._bindConstraints()},z={pending:null,resolved:!0,rejected:!1};y.prototype={validate:function(b){arguments.length>=1&&!a.isPlainObject(b)&&(h.warnOnce("Calling validate on a parsley field without passing arguments as an object is deprecated."),b={options:b});var c=this.whenValidate(b);if(!c)return!0;switch(c.state()){case"pending":return null;case"resolved":return!0;case"rejected":return this.validationResult}},whenValidate:function(){var a,b=this,c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],d=c.force,e=c.group;if(this.refreshConstraints(),!e||this._isInGroup(e))return this.value=this.getValue(),this._trigger("validate"),(a=this.whenValid({force:d,value:this.value,_refreshed:!0}).always(function(){b._reflowUI()}).done(function(){b._trigger("success")}).fail(function(){b._trigger("error")}).always(function(){b._trigger("validated")})).pipe.apply(a,_toConsumableArray(this._pipeAccordingToValidationResult()))},hasConstraints:function(){return 0!==this.constraints.length},needsValidation:function(a){return void 0===a&&(a=this.getValue()),!(!a.length&&!this._isRequired()&&void 0===this.options.validateIfEmpty)},_isInGroup:function(b){return a.isArray(this.options.group)?-1!==a.inArray(b,this.options.group):this.options.group===b},isValid:function(b){if(arguments.length>=1&&!a.isPlainObject(b)){h.warnOnce("Calling isValid on a parsley field without passing arguments as an object is deprecated.");var c=_slice.call(arguments);b={force:c[0],value:c[1]}}var d=this.whenValid(b);return!d||z[d.state()]},whenValid:function(){var b=this,c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],d=c.force,e=void 0!==d&&d,f=c.value,g=c.group;if(c._refreshed||this.refreshConstraints(),!g||this._isInGroup(g)){if(this.validationResult=!0,!this.hasConstraints())return a.when();if(void 0!==f&&null!==f||(f=this.getValue()),!this.needsValidation(f)&&!0!==e)return a.when();var i=this._getGroupedConstraints(),j=[];return a.each(i,function(c,d){var e=h.all(a.map(d,function(a){return b._validateConstraint(f,a)}));if(j.push(e),"rejected"===e.state())return!1}),h.all(j)}},_validateConstraint:function(b,c){var d=this,e=c.validate(b,this);return!1===e&&(e=a.Deferred().reject()),h.all([e]).fail(function(a){d.validationResult instanceof Array||(d.validationResult=[]),d.validationResult.push({assert:c,errorMessage:"string"==typeof a&&a})})},getValue:function(){var a;return a="function"==typeof this.options.value?this.options.value(this):void 0!==this.options.value?this.options.value:this.$element.val(),void 0===a||null===a?"":this._handleWhitespace(a)},reset:function(){return this._resetUI(),this._trigger("reset")},destroy:function(){this._destroyUI(),this.$element.removeData("Parsley"),this.$element.removeData("ParsleyFieldMultiple"),this._trigger("destroy")},refreshConstraints:function(){return this.actualizeOptions()._bindConstraints()},addConstraint:function(a,b,c,d){if(window.Parsley._validatorRegistry.validators[a]){var e=new w(this,a,b,c,d);"undefined"!==this.constraintsByName[e.name]&&this.removeConstraint(e.name),this.constraints.push(e),this.constraintsByName[e.name]=e}return this},removeConstraint:function(a){for(var b=0;b<this.constraints.length;b++)if(a===this.constraints[b].name){this.constraints.splice(b,1);break}return delete this.constraintsByName[a],this},updateConstraint:function(a,b,c){return this.removeConstraint(a).addConstraint(a,b,c)},_bindConstraints:function(){for(var a=[],b={},c=0;c<this.constraints.length;c++)!1===this.constraints[c].isDomConstraint&&(a.push(this.constraints[c]),b[this.constraints[c].name]=this.constraints[c]);this.constraints=a,this.constraintsByName=b;for(var d in this.options)this.addConstraint(d,this.options[d],void 0,!0);return this._bindHtml5Constraints()},_bindHtml5Constraints:function(){this.$element.attr("required")&&this.addConstraint("required",!0,void 0,!0),"string"==typeof this.$element.attr("pattern")&&this.addConstraint("pattern",this.$element.attr("pattern"),void 0,!0),"date"!==this.$element.attr("type")&&void 0!==this.$element.attr("min")&&void 0!==this.$element.attr("max")?this.addConstraint("range",[this.$element.attr("min"),this.$element.attr("max")],void 0,!0):"date"!==this.$element.attr("type")&&void 0!==this.$element.attr("min")?this.addConstraint("min",this.$element.attr("min"),void 0,!0):"date"!==this.$element.attr("type")&&void 0!==this.$element.attr("max")&&this.addConstraint("max",this.$element.attr("max"),void 0,!0),void 0!==this.$element.attr("minlength")&&void 0!==this.$element.attr("maxlength")?this.addConstraint("length",[this.$element.attr("minlength"),this.$element.attr("maxlength")],void 0,!0):void 0!==this.$element.attr("minlength")?this.addConstraint("minlength",this.$element.attr("minlength"),void 0,!0):void 0!==this.$element.attr("maxlength")&&this.addConstraint("maxlength",this.$element.attr("maxlength"),void 0,!0);var a=this.$element.attr("type");return void 0===a?this:"number"===a?this.addConstraint("type",["number",{step:this.$element.attr("step")||"1",base:this.$element.attr("min")||this.$element.attr("value")}],void 0,!0):/^(email|url|range)$/i.test(a)?this.addConstraint("type",a,void 0,!0):this},_isRequired:function(){return void 0!==this.constraintsByName.required&&!1!==this.constraintsByName.required.requirements},_trigger:function(a){return this.trigger("field:"+a)},_handleWhitespace:function(a){return!0===this.options.trimValue&&h.warnOnce('data-parsley-trim-value="true" is deprecated, please use data-parsley-whitespace="trim"'),"squish"===this.options.whitespace&&(a=a.replace(/\s{2,}/g," ")),"trim"!==this.options.whitespace&&"squish"!==this.options.whitespace&&!0!==this.options.trimValue||(a=h.trimString(a)),a},_getGroupedConstraints:function(){if(!1===this.options.priorityEnabled)return[this.constraints];for(var a=[],b={},c=0;c<this.constraints.length;c++){var d=this.constraints[c].priority;b[d]||a.push(b[d]=[]),b[d].push(this.constraints[c])}return a.sort(function(a,b){return b[0].priority-a[0].priority}),a}};var A=y,B=function(){this.__class__="ParsleyFieldMultiple"};B.prototype={addElement:function(a){return this.$elements.push(a),this},refreshConstraints:function(){var b;if(this.constraints=[],this.$element.is("select"))return this.actualizeOptions()._bindConstraints(),this;for(var c=0;c<this.$elements.length;c++)if(a("html").has(this.$elements[c]).length){b=this.$elements[c].data("ParsleyFieldMultiple").refreshConstraints().constraints;for(var d=0;d<b.length;d++)this.addConstraint(b[d].name,b[d].requirements,b[d].priority,b[d].isDomConstraint)}else this.$elements.splice(c,1);return this},getValue:function(){if("function"==typeof this.options.value)return this.options.value(this);if(void 0!==this.options.value)return this.options.value;if(this.$element.is("input[type=radio]"))return this._findRelated().filter(":checked").val()||"";if(this.$element.is("input[type=checkbox]")){var b=[];return this._findRelated().filter(":checked").each(function(){b.push(a(this).val())}),b}return this.$element.is("select")&&null===this.$element.val()?[]:this.$element.val()},_init:function(){return this.$elements=[this.$element],this}};var C=function(b,c,d){this.$element=a(b);var e=this.$element.data("Parsley");if(e)return void 0!==d&&e.parent===window.Parsley&&(e.parent=d,e._resetOptions(e.options)),"object"==typeof c&&a.extend(e.options,c),e;if(!this.$element.length)throw new Error("You must bind Parsley on an existing element.");if(void 0!==d&&"ParsleyForm"!==d.__class__)throw new Error("Parent instance must be a ParsleyForm instance");return this.parent=d||window.Parsley,this.init(c)};C.prototype={init:function(a){return this.__class__="Parsley",this.__version__="2.6.5",this.__id__=h.generateID(),this._resetOptions(a),this.$element.is("form")||h.checkAttr(this.$element,this.options.namespace,"validate")&&!this.$element.is(this.options.inputs)?this.bind("parsleyForm"):this.isMultiple()?this.handleMultiple():this.bind("parsleyField")},isMultiple:function(){return this.$element.is("input[type=radio], input[type=checkbox]")||this.$element.is("select")&&void 0!==this.$element.attr("multiple")},handleMultiple:function(){var b,c,d=this;if(this.options.multiple||(void 0!==this.$element.attr("name")&&this.$element.attr("name").length?this.options.multiple=b=this.$element.attr("name"):void 0!==this.$element.attr("id")&&this.$element.attr("id").length&&(this.options.multiple=this.$element.attr("id"))),this.$element.is("select")&&void 0!==this.$element.attr("multiple"))return this.options.multiple=this.options.multiple||this.__id__,this.bind("parsleyFieldMultiple");if(!this.options.multiple)return h.warn("To be bound by Parsley, a radio, a checkbox and a multiple select input must have either a name or a multiple option.",this.$element),this;this.options.multiple=this.options.multiple.replace(/(:|\.|\[|\]|\{|\}|\$)/g,""),void 0!==b&&a('input[name="'+b+'"]').each(function(b,c){a(c).is("input[type=radio], input[type=checkbox]")&&a(c).attr(d.options.namespace+"multiple",d.options.multiple)});for(var e=this._findRelated(),f=0;f<e.length;f++)if(void 0!==(c=a(e.get(f)).data("Parsley"))){this.$element.data("ParsleyFieldMultiple")||c.addElement(this.$element);break}return this.bind("parsleyField",!0),c||this.bind("parsleyFieldMultiple")},bind:function(b,c){var d;switch(b){case"parsleyForm":d=a.extend(new u(this.$element,this.domOptions,this.options),new j,window.ParsleyExtend)._bindFields();break;case"parsleyField":d=a.extend(new A(this.$element,this.domOptions,this.options,this.parent),new j,window.ParsleyExtend);break;case"parsleyFieldMultiple":d=a.extend(new A(this.$element,this.domOptions,this.options,this.parent),new B,new j,window.ParsleyExtend)._init();break;default:throw new Error(b+"is not a supported Parsley type")}return this.options.multiple&&h.setAttr(this.$element,this.options.namespace,"multiple",this.options.multiple),void 0!==c?(this.$element.data("ParsleyFieldMultiple",d),d):(this.$element.data("Parsley",d),d._actualizeTriggers(),d._trigger("init"),d)}};var D=a.fn.jquery.split(".");if(parseInt(D[0])<=1&&parseInt(D[1])<8)throw"The loaded version of jQuery is too old. Please upgrade to 1.8.x or better.";D.forEach||h.warn("Parsley requires ES5 to run properly. Please include https://github.com/es-shims/es5-shim");var E=a.extend(new j,{$element:a(document),actualizeOptions:null,_resetOptions:null,Factory:C,version:"2.6.5"});a.extend(A.prototype,s.Field,j.prototype),a.extend(u.prototype,s.Form,j.prototype),a.extend(C.prototype,j.prototype),a.fn.parsley=a.fn.psly=function(b){if(this.length>1){var c=[];return this.each(function(){c.push(a(this).parsley(b))}),c}return a(this).length?new C(this,b):void h.warn("You must bind Parsley on an existing element.")},void 0===window.ParsleyExtend&&(window.ParsleyExtend={}),E.options=a.extend(h.objectCreate(i),window.ParsleyConfig),window.ParsleyConfig=E.options,window.Parsley=window.psly=E,window.ParsleyUtils=h;var F=window.Parsley._validatorRegistry=new p(window.ParsleyConfig.validators,window.ParsleyConfig.i18n);window.ParsleyValidator={},a.each("setLocale addCatalog addMessage addMessages getErrorMessage formatMessage addValidator updateValidator removeValidator".split(" "),function(b,c){window.Parsley[c]=a.proxy(F,c),window.ParsleyValidator[c]=function(){var a;return h.warnOnce("Accessing the method '"+c+"' through ParsleyValidator is deprecated. Simply call 'window.Parsley."+c+"(...)'"),(a=window.Parsley)[c].apply(a,arguments)}}),window.Parsley.UI=s,window.ParsleyUI={removeError:function(a,b,c){var d=!0!==c;return h.warnOnce("Accessing ParsleyUI is deprecated. Call 'removeError' on the instance directly. Please comment in issue 1073 as to your need to call this method."),a.removeError(b,{updateClass:d})},getErrorsMessages:function(a){return h.warnOnce("Accessing ParsleyUI is deprecated. Call 'getErrorsMessages' on the instance directly."),a.getErrorsMessages()}},a.each("addError updateError".split(" "),function(a,b){window.ParsleyUI[b]=function(a,c,d,e,f){var g=!0!==f;return h.warnOnce("Accessing ParsleyUI is deprecated. Call '"+b+"' on the instance directly. Please comment in issue 1073 as to your need to call this method."),a[b](c,{message:d,assert:e,updateClass:g})}}),!1!==window.ParsleyConfig.autoBind&&a(function(){a("[data-parsley-validate]").length&&a("[data-parsley-validate]").parsley()});var G=a({}),H=function(){h.warnOnce("Parsley's pubsub module is deprecated; use the 'on' and 'off' methods on parsley instances or window.Parsley")},I="parsley:";a.listen=function(a,d){var e;if(H(),"object"==typeof arguments[1]&&"function"==typeof arguments[2]&&(e=arguments[1],d=arguments[2]),"function"!=typeof d)throw new Error("Wrong parameters");window.Parsley.on(c(a),b(d,e))},a.listenTo=function(a,d,e){if(H(),!(a instanceof A||a instanceof u))throw new Error("Must give Parsley instance");if("string"!=typeof d||"function"!=typeof e)throw new Error("Wrong parameters");a.on(c(d),b(e))},a.unsubscribe=function(a,b){if(H(),"string"!=typeof a||"function"!=typeof b)throw new Error("Wrong arguments");window.Parsley.off(c(a),b.parsleyAdaptedCallback)},a.unsubscribeTo=function(a,b){if(H(),!(a instanceof A||a instanceof u))throw new Error("Must give Parsley instance");a.off(c(b))},a.unsubscribeAll=function(b){H(),window.Parsley.off(c(b)),a("form,input,textarea,select").each(function(){var d=a(this).data("Parsley");d&&d.off(c(b))})},a.emit=function(a,b){var d;H();var e=b instanceof A||b instanceof u,f=Array.prototype.slice.call(arguments,e?2:1);f.unshift(c(a)),e||(b=window.Parsley),(d=b).trigger.apply(d,_toConsumableArray(f))};return a.extend(!0,E,{asyncValidators:{default:{fn:function(a){return a.status>=200&&a.status<300},url:!1},reverse:{fn:function(a){return a.status<200||a.status>=300},url:!1}},addAsyncValidator:function(a,b,c,d){return E.asyncValidators[a]={fn:b,url:c||!1,options:d||{}},this}}),E.addValidator("remote",{requirementType:{"":"string",validator:"string",reverse:"boolean",options:"object"},validateString:function(b,c,d,e){var f,g,h={},i=d.validator||(!0===d.reverse?"reverse":"default");if(void 0===E.asyncValidators[i])throw new Error("Calling an undefined async validator: `"+i+"`");c=E.asyncValidators[i].url||c,c.indexOf("{value}")>-1?c=c.replace("{value}",encodeURIComponent(b)):h[e.$element.attr("name")||e.$element.attr("id")]=b;var j=a.extend(!0,d.options||{},E.asyncValidators[i].options);f=a.extend(!0,{},{url:c,data:h,type:"GET"},j),e.trigger("field:ajaxoptions",e,f),g=a.param(f),void 0===E._remoteCache&&(E._remoteCache={});var k=E._remoteCache[g]=E._remoteCache[g]||a.ajax(f),l=function(){var b=E.asyncValidators[i].fn.call(e,k,c,d);return b||(b=a.Deferred().reject()),a.when(b)};return k.then(l,l)},priority:-1}),E.on("form:submit",function(){E._remoteCache={}}),window.ParsleyExtend.addAsyncValidator=function(){return ParsleyUtils.warnOnce("Accessing the method `addAsyncValidator` through an instance is deprecated. Simply call `Parsley.addAsyncValidator(...)`"),E.addAsyncValidator.apply(E,arguments)},E.addMessages("en",{defaultMessage:"This value seems to be invalid.",type:{email:"This value should be a valid email.",url:"This value should be a valid url.",number:"This value should be a valid number.",integer:"This value should be a valid integer.",digits:"This value should be digits.",alphanum:"This value should be alphanumeric."},notblank:"This value should not be blank.",required:"This value is required.",pattern:"This value seems to be invalid.",min:"This value should be greater than or equal to %s.",max:"This value should be lower than or equal to %s.",range:"This value should be between %s and %s.",minlength:"This value is too short. It should have %s characters or more.",maxlength:"This value is too long. It should have %s characters or fewer.",length:"This value length is invalid. It should be between %s and %s characters long.",mincheck:"You must select at least %s choices.",maxcheck:"You must select %s choices or fewer.",check:"You must select between %s and %s choices.",equalto:"This value should be the same."}),E.setLocale("en"),(new d).install(),E}),jQuery(document).ready(function(a){window.Parsley.on("field:error",function(){this.$element.attr("aria-describedby",this._ui.errorsWrapperId).attr("aria-invalid","true"),this._ui.$errorsWrapper.attr("aria-live","polite")}),window.Parsley.on("field:success",function(){this.$element.attr("aria-invalid")&&this.$element.removeAttr("aria-invalid")})});
1
+ function _toConsumableArray(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function _toConsumableArray(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}var _slice=Array.prototype.slice,_slicedToArray=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(a){e=!0,f=a}finally{try{!d&&h.return&&h.return()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_extends=Object.assign||function(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(a[d]=c[d])}return a};!function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],b):a.parsley=b(a.jQuery)}(this,function(a){"use strict";function b(a,b){return a.parsleyAdaptedCallback||(a.parsleyAdaptedCallback=function(){var c=Array.prototype.slice.call(arguments,0);c.unshift(this),a.apply(b||G,c)}),a.parsleyAdaptedCallback}function c(a){return 0===a.lastIndexOf(I,0)?a.substr(I.length):a}function d(){var b=this,c=window||global;_extends(this,{isNativeEvent:function(a){return a.originalEvent&&!1!==a.originalEvent.isTrusted},fakeInputEvent:function(c){b.isNativeEvent(c)&&a(c.target).trigger("input")},misbehaves:function(c){b.isNativeEvent(c)&&(b.behavesOk(c),a(document).on("change.inputevent",c.data.selector,b.fakeInputEvent),b.fakeInputEvent(c))},behavesOk:function(c){b.isNativeEvent(c)&&a(document).off("input.inputevent",c.data.selector,b.behavesOk).off("change.inputevent",c.data.selector,b.misbehaves)},install:function(){if(!c.inputEventPatched){c.inputEventPatched="0.0.3";for(var d=["select",'input[type="checkbox"]','input[type="radio"]','input[type="file"]'],e=0;e<d.length;e++){var f=d[e];a(document).on("input.inputevent",f,{selector:f},b.behavesOk).on("change.inputevent",f,{selector:f},b.misbehaves)}}},uninstall:function(){delete c.inputEventPatched,a(document).off(".inputevent")}})}var e=1,f={},g={attr:function(a,b,c){var d,e,f,g=new RegExp("^"+b,"i");if(void 0===c)c={};else for(d in c)c.hasOwnProperty(d)&&delete c[d];if(!a)return c;for(f=a.attributes,d=f.length;d--;)(e=f[d])&&e.specified&&g.test(e.name)&&(c[this.camelize(e.name.slice(b.length))]=this.deserializeValue(e.value));return c},checkAttr:function(a,b,c){return a.hasAttribute(b+c)},setAttr:function(a,b,c,d){a.setAttribute(this.dasherize(b+c),String(d))},getType:function(a){return a.getAttribute("type")||"text"},generateID:function(){return""+e++},deserializeValue:function(a){var b;try{return a?"true"==a||"false"!=a&&("null"==a?null:isNaN(b=Number(a))?/^[\[\{]/.test(a)?JSON.parse(a):a:b):a}catch(b){return a}},camelize:function(a){return a.replace(/-+(.)?/g,function(a,b){return b?b.toUpperCase():""})},dasherize:function(a){return a.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()},warn:function(){var a;window.console&&"function"==typeof window.console.warn&&(a=window.console).warn.apply(a,arguments)},warnOnce:function(a){f[a]||(f[a]=!0,this.warn.apply(this,arguments))},_resetWarnings:function(){f={}},trimString:function(a){return a.replace(/^\s+|\s+$/g,"")},parse:{date:function(a){var b=a.match(/^(\d{4,})-(\d\d)-(\d\d)$/);if(!b)return null;var c=b.map(function(a){return parseInt(a,10)}),d=_slicedToArray(c,4),e=(d[0],d[1]),f=d[2],g=d[3],h=new Date(e,f-1,g);return h.getFullYear()!==e||h.getMonth()+1!==f||h.getDate()!==g?null:h},string:function(a){return a},integer:function(a){return isNaN(a)?null:parseInt(a,10)},number:function(a){if(isNaN(a))throw null;return parseFloat(a)},boolean:function(a){return!/^\s*false\s*$/i.test(a)},object:function(a){return g.deserializeValue(a)},regexp:function(a){var b="";return/^\/.*\/(?:[gimy]*)$/.test(a)?(b=a.replace(/.*\/([gimy]*)$/,"$1"),a=a.replace(new RegExp("^/(.*?)/"+b+"$"),"$1")):a="^"+a+"$",new RegExp(a,b)}},parseRequirement:function(a,b){var c=this.parse[a||"string"];if(!c)throw'Unknown requirement specification: "'+a+'"';var d=c(b);if(null===d)throw"Requirement is not a "+a+': "'+b+'"';return d},namespaceEvents:function(b,c){return b=this.trimString(b||"").split(/\s+/),b[0]?a.map(b,function(a){return a+"."+c}).join(" "):""},difference:function(b,c){var d=[];return a.each(b,function(a,b){-1==c.indexOf(b)&&d.push(b)}),d},all:function(b){return a.when.apply(a,_toConsumableArray(b).concat([42,42]))},objectCreate:Object.create||function(){var a=function(){};return function(b){if(arguments.length>1)throw Error("Second argument not supported");if("object"!=typeof b)throw TypeError("Argument must be an object");a.prototype=b;var c=new a;return a.prototype=null,c}}(),_SubmitSelector:'input[type="submit"], button:submit'},h={namespace:"data-parsley-",inputs:"input, textarea, select",excluded:"input[type=button], input[type=submit], input[type=reset], input[type=hidden]",priorityEnabled:!0,multiple:null,group:null,uiEnabled:!0,validationThreshold:3,focus:"first",trigger:!1,triggerAfterFailure:"input",errorClass:"parsley-error",successClass:"parsley-success",classHandler:function(a){},errorsContainer:function(a){},errorsWrapper:'<ul class="parsley-errors-list"></ul>',errorTemplate:"<li></li>"},i=function(){this.__id__=g.generateID()};i.prototype={asyncSupport:!0,_pipeAccordingToValidationResult:function(){var b=this,c=function(){var c=a.Deferred();return!0!==b.validationResult&&c.reject(),c.resolve().promise()};return[c,c]},actualizeOptions:function(){return g.attr(this.element,this.options.namespace,this.domOptions),this.parent&&this.parent.actualizeOptions&&this.parent.actualizeOptions(),this},_resetOptions:function(a){this.domOptions=g.objectCreate(this.parent.options),this.options=g.objectCreate(this.domOptions);for(var b in a)a.hasOwnProperty(b)&&(this.options[b]=a[b]);this.actualizeOptions()},_listeners:null,on:function(a,b){return this._listeners=this._listeners||{},(this._listeners[a]=this._listeners[a]||[]).push(b),this},subscribe:function(b,c){a.listenTo(this,b.toLowerCase(),c)},off:function(a,b){var c=this._listeners&&this._listeners[a];if(c)if(b)for(var d=c.length;d--;)c[d]===b&&c.splice(d,1);else delete this._listeners[a];return this},unsubscribe:function(b,c){a.unsubscribeTo(this,b.toLowerCase())},trigger:function(a,b,c){b=b||this;var d,e=this._listeners&&this._listeners[a];if(e)for(var f=e.length;f--;)if(!1===(d=e[f].call(b,b,c)))return d;return!this.parent||this.parent.trigger(a,b,c)},asyncIsValid:function(a,b){return g.warnOnce("asyncIsValid is deprecated; please use whenValid instead"),this.whenValid({group:a,force:b})},_findRelated:function(){return this.options.multiple?a(this.parent.element.querySelectorAll("["+this.options.namespace+'multiple="'+this.options.multiple+'"]')):this.$element}};var j=function(a,b){var c=a.match(/^\s*\[(.*)\]\s*$/);if(!c)throw'Requirement is not an array: "'+a+'"';var d=c[1].split(",").map(g.trimString);if(d.length!==b)throw"Requirement has "+d.length+" values when "+b+" are needed";return d},k=function(a,b,c){var d=null,e={};for(var f in a)if(f){var h=c(f);"string"==typeof h&&(h=g.parseRequirement(a[f],h)),e[f]=h}else d=g.parseRequirement(a[f],b);return[d,e]},l=function(b){a.extend(!0,this,b)};l.prototype={validate:function(a,b){if(this.fn)return arguments.length>3&&(b=[].slice.call(arguments,1,-1)),this.fn(a,b);if(Array.isArray(a)){if(!this.validateMultiple)throw"Validator `"+this.name+"` does not handle multiple values";return this.validateMultiple.apply(this,arguments)}var c=arguments[arguments.length-1];if(this.validateDate&&c._isDateInput())return arguments[0]=g.parse.date(arguments[0]),null!==arguments[0]&&this.validateDate.apply(this,arguments);if(this.validateNumber)return!isNaN(a)&&(arguments[0]=parseFloat(arguments[0]),this.validateNumber.apply(this,arguments));if(this.validateString)return this.validateString.apply(this,arguments);throw"Validator `"+this.name+"` only handles multiple values"},parseRequirements:function(b,c){if("string"!=typeof b)return Array.isArray(b)?b:[b];var d=this.requirementType;if(Array.isArray(d)){for(var e=j(b,d.length),f=0;f<e.length;f++)e[f]=g.parseRequirement(d[f],e[f]);return e}return a.isPlainObject(d)?k(d,b,c):[g.parseRequirement(d,b)]},requirementType:"string",priority:2};var m=function(a,b){this.__class__="ValidatorRegistry",this.locale="en",this.init(a||{},b||{})},n={email:/^((([a-zA-Z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-zA-Z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/,number:/^-?(\d*\.)?\d+(e[-+]?\d+)?$/i,integer:/^-?\d+$/,digits:/^\d+$/,alphanum:/^\w+$/i,date:{test:function(a){return null!==g.parse.date(a)}},url:new RegExp("^(?:(?:https?|ftp)://)?(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-zA-Z\\u00a1-\\uffff0-9]-*)*[a-zA-Z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-zA-Z\\u00a1-\\uffff0-9]-*)*[a-zA-Z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-zA-Z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:/\\S*)?$")};n.range=n.number;var o=function(a){var b=(""+a).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return b?Math.max(0,(b[1]?b[1].length:0)-(b[2]?+b[2]:0)):0},p=function(a,b){return b.map(g.parse[a])},q=function(a,b){return function(c){for(var d=arguments.length,e=Array(d>1?d-1:0),f=1;f<d;f++)e[f-1]=arguments[f];return e.pop(),b.apply(void 0,[c].concat(_toConsumableArray(p(a,e))))}},r=function(a){return{validateDate:q("date",a),validateNumber:q("number",a),requirementType:a.length<=2?"string":["string","string"],priority:30}};m.prototype={init:function(a,b){this.catalog=b,this.validators=_extends({},this.validators);for(var c in a)this.addValidator(c,a[c].fn,a[c].priority);window.Parsley.trigger("parsley:validator:init")},setLocale:function(a){if(void 0===this.catalog[a])throw new Error(a+" is not available in the catalog");return this.locale=a,this},addCatalog:function(a,b,c){return"object"==typeof b&&(this.catalog[a]=b),!0===c?this.setLocale(a):this},addMessage:function(a,b,c){return void 0===this.catalog[a]&&(this.catalog[a]={}),this.catalog[a][b]=c,this},addMessages:function(a,b){for(var c in b)this.addMessage(a,c,b[c]);return this},addValidator:function(a,b,c){if(this.validators[a])g.warn('Validator "'+a+'" is already defined.');else if(h.hasOwnProperty(a))return void g.warn('"'+a+'" is a restricted keyword and is not a valid validator name.');return this._setValidator.apply(this,arguments)},hasValidator:function(a){return!!this.validators[a]},updateValidator:function(a,b,c){return this.validators[a]?this._setValidator.apply(this,arguments):(g.warn('Validator "'+a+'" is not already defined.'),this.addValidator.apply(this,arguments))},removeValidator:function(a){return this.validators[a]||g.warn('Validator "'+a+'" is not defined.'),delete this.validators[a],this},_setValidator:function(a,b,c){"object"!=typeof b&&(b={fn:b,priority:c}),b.validate||(b=new l(b)),this.validators[a]=b;for(var d in b.messages||{})this.addMessage(d,a,b.messages[d]);return this},getErrorMessage:function(a){var b;if("type"===a.name){b=(this.catalog[this.locale][a.name]||{})[a.requirements]}else b=this.formatMessage(this.catalog[this.locale][a.name],a.requirements);return b||this.catalog[this.locale].defaultMessage||this.catalog.en.defaultMessage},formatMessage:function(a,b){if("object"==typeof b){for(var c in b)a=this.formatMessage(a,b[c]);return a}return"string"==typeof a?a.replace(/%s/i,b):""},validators:{notblank:{validateString:function(a){return/\S/.test(a)},priority:2},required:{validateMultiple:function(a){return a.length>0},validateString:function(a){return/\S/.test(a)},priority:512},type:{validateString:function(a,b){var c=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],d=c.step,e=void 0===d?"any":d,f=c.base,g=void 0===f?0:f,h=n[b];if(!h)throw new Error("validator type `"+b+"` is not supported");if(!h.test(a))return!1;if("number"===b&&!/^any$/i.test(e||"")){var i=Number(a),j=Math.max(o(e),o(g));if(o(i)>j)return!1;var k=function(a){return Math.round(a*Math.pow(10,j))};if((k(i)-k(g))%k(e)!=0)return!1}return!0},requirementType:{"":"string",step:"string",base:"number"},priority:256},pattern:{validateString:function(a,b){return b.test(a)},requirementType:"regexp",priority:64},minlength:{validateString:function(a,b){return a.length>=b},requirementType:"integer",priority:30},maxlength:{validateString:function(a,b){return a.length<=b},requirementType:"integer",priority:30},length:{validateString:function(a,b,c){return a.length>=b&&a.length<=c},requirementType:["integer","integer"],priority:30},mincheck:{validateMultiple:function(a,b){return a.length>=b},requirementType:"integer",priority:30},maxcheck:{validateMultiple:function(a,b){return a.length<=b},requirementType:"integer",priority:30},check:{validateMultiple:function(a,b,c){return a.length>=b&&a.length<=c},requirementType:["integer","integer"],priority:30},min:r(function(a,b){return a>=b}),max:r(function(a,b){return a<=b}),range:r(function(a,b,c){return a>=b&&a<=c}),equalto:{validateString:function(b,c){var d=a(c);return d.length?b===d.val():b===c},priority:256}}};var s={},t=function a(b,c,d){for(var e=[],f=[],g=0;g<b.length;g++){for(var h=!1,i=0;i<c.length;i++)if(b[g].assert.name===c[i].assert.name){h=!0;break}h?f.push(b[g]):e.push(b[g])}return{kept:f,added:e,removed:d?[]:a(c,b,!0).added}};s.Form={_actualizeTriggers:function(){var a=this;this.$element.on("submit.Parsley",function(b){a.onSubmitValidate(b)}),this.$element.on("click.Parsley",g._SubmitSelector,function(b){a.onSubmitButton(b)}),!1!==this.options.uiEnabled&&this.element.setAttribute("novalidate","")},focus:function(){if(this._focusedField=null,!0===this.validationResult||"none"===this.options.focus)return null;for(var a=0;a<this.fields.length;a++){var b=this.fields[a];if(!0!==b.validationResult&&b.validationResult.length>0&&void 0===b.options.noFocus&&(this._focusedField=b.$element,"first"===this.options.focus))break}return null===this._focusedField?null:this._focusedField.focus()},_destroyUI:function(){this.$element.off(".Parsley")}},s.Field={_reflowUI:function(){if(this._buildUI(),this._ui){var a=t(this.validationResult,this._ui.lastValidationResult);this._ui.lastValidationResult=this.validationResult,this._manageStatusClass(),this._manageErrorsMessages(a),this._actualizeTriggers(),!a.kept.length&&!a.added.length||this._failedOnce||(this._failedOnce=!0,this._actualizeTriggers())}},getErrorsMessages:function(){if(!0===this.validationResult)return[];for(var a=[],b=0;b<this.validationResult.length;b++)a.push(this.validationResult[b].errorMessage||this._getErrorMessage(this.validationResult[b].assert));return a},addError:function(a){var b=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],c=b.message,d=b.assert,e=b.updateClass,f=void 0===e||e;this._buildUI(),this._addError(a,{message:c,assert:d}),f&&this._errorClass()},updateError:function(a){var b=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],c=b.message,d=b.assert,e=b.updateClass,f=void 0===e||e;this._buildUI(),this._updateError(a,{message:c,assert:d}),f&&this._errorClass()},removeError:function(a){var b=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],c=b.updateClass,d=void 0===c||c;this._buildUI(),this._removeError(a),d&&this._manageStatusClass()},_manageStatusClass:function(){this.hasConstraints()&&this.needsValidation()&&!0===this.validationResult?this._successClass():this.validationResult.length>0?this._errorClass():this._resetClass()},_manageErrorsMessages:function(b){if(void 0===this.options.errorsMessagesDisabled){if(void 0!==this.options.errorMessage)return b.added.length||b.kept.length?(this._insertErrorWrapper(),0===this._ui.$errorsWrapper.find(".parsley-custom-error-message").length&&this._ui.$errorsWrapper.append(a(this.options.errorTemplate).addClass("parsley-custom-error-message")),this._ui.$errorsWrapper.addClass("filled").find(".parsley-custom-error-message").html(this.options.errorMessage)):this._ui.$errorsWrapper.removeClass("filled").find(".parsley-custom-error-message").remove();for(var c=0;c<b.removed.length;c++)this._removeError(b.removed[c].assert.name);for(c=0;c<b.added.length;c++)this._addError(b.added[c].assert.name,{message:b.added[c].errorMessage,assert:b.added[c].assert});for(c=0;c<b.kept.length;c++)this._updateError(b.kept[c].assert.name,{message:b.kept[c].errorMessage,assert:b.kept[c].assert})}},_addError:function(b,c){var d=c.message,e=c.assert;this._insertErrorWrapper(),this._ui.$errorClassHandler.attr("aria-describedby",this._ui.errorsWrapperId),this._ui.$errorsWrapper.addClass("filled").append(a(this.options.errorTemplate).addClass("parsley-"+b).html(d||this._getErrorMessage(e)))},_updateError:function(a,b){var c=b.message,d=b.assert;this._ui.$errorsWrapper.addClass("filled").find(".parsley-"+a).html(c||this._getErrorMessage(d))},_removeError:function(a){this._ui.$errorClassHandler.removeAttr("aria-describedby"),this._ui.$errorsWrapper.removeClass("filled").find(".parsley-"+a).remove()},_getErrorMessage:function(a){var b=a.name+"Message";return void 0!==this.options[b]?window.Parsley.formatMessage(this.options[b],a.requirements):window.Parsley.getErrorMessage(a)},_buildUI:function(){if(!this._ui&&!1!==this.options.uiEnabled){var b={};this.element.setAttribute(this.options.namespace+"id",this.__id__),b.$errorClassHandler=this._manageClassHandler(),b.errorsWrapperId="parsley-id-"+(this.options.multiple?"multiple-"+this.options.multiple:this.__id__),b.$errorsWrapper=a(this.options.errorsWrapper).attr("id",b.errorsWrapperId),b.lastValidationResult=[],b.validationInformationVisible=!1,this._ui=b}},_manageClassHandler:function(){if("string"==typeof this.options.classHandler&&a(this.options.classHandler).length)return a(this.options.classHandler);var b=this.options.classHandler;if("string"==typeof this.options.classHandler&&"function"==typeof window[this.options.classHandler]&&(b=window[this.options.classHandler]),"function"==typeof b){var c=b.call(this,this);if(void 0!==c&&c.length)return c}else{if("object"==typeof b&&b instanceof jQuery&&b.length)return b;b&&g.warn("The class handler `"+b+"` does not exist in DOM nor as a global JS function")}return this._inputHolder()},_inputHolder:function(){return this.options.multiple&&"SELECT"!==this.element.nodeName?this.$element.parent():this.$element},_insertErrorWrapper:function(){var b=this.options.errorsContainer;if(0!==this._ui.$errorsWrapper.parent().length)return this._ui.$errorsWrapper.parent();if("string"==typeof b){if(a(b).length)return a(b).append(this._ui.$errorsWrapper);"function"==typeof window[b]?b=window[b]:g.warn("The errors container `"+b+"` does not exist in DOM nor as a global JS function")}return"function"==typeof b&&(b=b.call(this,this)),"object"==typeof b&&b.length?b.append(this._ui.$errorsWrapper):this._inputHolder().after(this._ui.$errorsWrapper)},_actualizeTriggers:function(){var a,b=this,c=this._findRelated();c.off(".Parsley"),this._failedOnce?c.on(g.namespaceEvents(this.options.triggerAfterFailure,"Parsley"),function(){b._validateIfNeeded()}):(a=g.namespaceEvents(this.options.trigger,"Parsley"))&&c.on(a,function(a){b._validateIfNeeded(a)})},_validateIfNeeded:function(a){var b=this;a&&/key|input/.test(a.type)&&(!this._ui||!this._ui.validationInformationVisible)&&this.getValue().length<=this.options.validationThreshold||(this.options.debounce?(window.clearTimeout(this._debounced),this._debounced=window.setTimeout(function(){return b.validate()},this.options.debounce)):this.validate())},_resetUI:function(){this._failedOnce=!1,this._actualizeTriggers(),void 0!==this._ui&&(this._ui.$errorsWrapper.removeClass("filled").children().remove(),this._resetClass(),this._ui.lastValidationResult=[],this._ui.validationInformationVisible=!1)},_destroyUI:function(){this._resetUI(),void 0!==this._ui&&this._ui.$errorsWrapper.remove(),delete this._ui},_successClass:function(){this._ui.validationInformationVisible=!0,this._ui.$errorClassHandler.removeClass(this.options.errorClass).addClass(this.options.successClass)},_errorClass:function(){this._ui.validationInformationVisible=!0,this._ui.$errorClassHandler.removeClass(this.options.successClass).addClass(this.options.errorClass)},_resetClass:function(){this._ui.$errorClassHandler.removeClass(this.options.successClass).removeClass(this.options.errorClass)}};var u=function(b,c,d){this.__class__="Form",this.element=b,this.$element=a(b),this.domOptions=c,this.options=d,this.parent=window.Parsley,this.fields=[],this.validationResult=null},v={pending:null,resolved:!0,rejected:!1};u.prototype={onSubmitValidate:function(a){var b=this;if(!0!==a.parsley){var c=this._submitSource||this.$element.find(g._SubmitSelector)[0];if(this._submitSource=null,this.$element.find(".parsley-synthetic-submit-button").prop("disabled",!0),!c||null===c.getAttribute("formnovalidate")){window.Parsley._remoteCache={};var d=this.whenValidate({event:a});"resolved"===d.state()&&!1!==this._trigger("submit")||(a.stopImmediatePropagation(),a.preventDefault(),"pending"===d.state()&&d.done(function(){b._submit(c)}))}}},onSubmitButton:function(a){this._submitSource=a.currentTarget},_submit:function(b){if(!1!==this._trigger("submit")){if(b){var c=this.$element.find(".parsley-synthetic-submit-button").prop("disabled",!1);0===c.length&&(c=a('<input class="parsley-synthetic-submit-button" type="hidden">').appendTo(this.$element)),c.attr({name:b.getAttribute("name"),value:b.getAttribute("value")})}this.$element.trigger(_extends(a.Event("submit"),{parsley:!0}))}},validate:function(b){if(arguments.length>=1&&!a.isPlainObject(b)){g.warnOnce("Calling validate on a parsley form without passing arguments as an object is deprecated.");var c=_slice.call(arguments);b={group:c[0],force:c[1],event:c[2]}}return v[this.whenValidate(b).state()]},whenValidate:function(){var b,c=this,d=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=d.group,f=d.force,h=d.event;this.submitEvent=h,h&&(this.submitEvent=_extends({},h,{preventDefault:function(){g.warnOnce("Using `this.submitEvent.preventDefault()` is deprecated; instead, call `this.validationResult = false`"),c.validationResult=!1}})),this.validationResult=!0,this._trigger("validate"),this._refreshFields();var i=this._withoutReactualizingFormOptions(function(){return a.map(c.fields,function(a){return a.whenValidate({force:f,group:e})})});return(b=g.all(i).done(function(){c._trigger("success")}).fail(function(){c.validationResult=!1,c.focus(),c._trigger("error")}).always(function(){c._trigger("validated")})).pipe.apply(b,_toConsumableArray(this._pipeAccordingToValidationResult()))},isValid:function(b){if(arguments.length>=1&&!a.isPlainObject(b)){g.warnOnce("Calling isValid on a parsley form without passing arguments as an object is deprecated.");var c=_slice.call(arguments);b={group:c[0],force:c[1]}}return v[this.whenValid(b).state()]},whenValid:function(){var b=this,c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],d=c.group,e=c.force;this._refreshFields();var f=this._withoutReactualizingFormOptions(function(){return a.map(b.fields,function(a){return a.whenValid({group:d,force:e})})});return g.all(f)},refresh:function(){return this._refreshFields(),this},reset:function(){for(var a=0;a<this.fields.length;a++)this.fields[a].reset();this._trigger("reset")},destroy:function(){this._destroyUI();for(var a=0;a<this.fields.length;a++)this.fields[a].destroy();this.$element.removeData("Parsley"),this._trigger("destroy")},_refreshFields:function(){return this.actualizeOptions()._bindFields()},_bindFields:function(){var b=this,c=this.fields;return this.fields=[],this.fieldsMappedById={},this._withoutReactualizingFormOptions(function(){b.$element.find(b.options.inputs).not(b.options.excluded).each(function(a,c){var d=new window.Parsley.Factory(c,{},b);if(("Field"===d.__class__||"FieldMultiple"===d.__class__)&&!0!==d.options.excluded){var e=d.__class__+"-"+d.__id__;void 0===b.fieldsMappedById[e]&&(b.fieldsMappedById[e]=d,b.fields.push(d))}}),a.each(g.difference(c,b.fields),function(a,b){b.reset()})}),this},_withoutReactualizingFormOptions:function(a){var b=this.actualizeOptions;this.actualizeOptions=function(){return this};var c=a();return this.actualizeOptions=b,c},_trigger:function(a){return this.trigger("form:"+a)}};var w=function(a,b,c,d,e){var f=window.Parsley._validatorRegistry.validators[b],g=new l(f);d=d||a.options[b+"Priority"]||g.priority,e=!0===e,_extends(this,{validator:g,name:b,requirements:c,priority:d,isDomConstraint:e}),this._parseRequirements(a.options)},x=function(a){return a[0].toUpperCase()+a.slice(1)};w.prototype={validate:function(a,b){var c;return(c=this.validator).validate.apply(c,[a].concat(_toConsumableArray(this.requirementList),[b]))},_parseRequirements:function(a){var b=this;this.requirementList=this.validator.parseRequirements(this.requirements,function(c){return a[b.name+x(c)]})}};var y=function(b,c,d,e){this.__class__="Field",this.element=b,this.$element=a(b),void 0!==e&&(this.parent=e),this.options=d,this.domOptions=c,this.constraints=[],this.constraintsByName={},this.validationResult=!0,this._bindConstraints()},z={pending:null,resolved:!0,rejected:!1};y.prototype={validate:function(b){arguments.length>=1&&!a.isPlainObject(b)&&(g.warnOnce("Calling validate on a parsley field without passing arguments as an object is deprecated."),b={options:b});var c=this.whenValidate(b);if(!c)return!0;switch(c.state()){case"pending":return null;case"resolved":return!0;case"rejected":return this.validationResult}},whenValidate:function(){var a,b=this,c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],d=c.force,e=c.group;if(this.refresh(),!e||this._isInGroup(e))return this.value=this.getValue(),this._trigger("validate"),(a=this.whenValid({force:d,value:this.value,_refreshed:!0}).always(function(){b._reflowUI()}).done(function(){b._trigger("success")}).fail(function(){b._trigger("error")}).always(function(){b._trigger("validated")})).pipe.apply(a,_toConsumableArray(this._pipeAccordingToValidationResult()))},hasConstraints:function(){return 0!==this.constraints.length},needsValidation:function(a){return void 0===a&&(a=this.getValue()),!(!a.length&&!this._isRequired()&&void 0===this.options.validateIfEmpty)},_isInGroup:function(b){return Array.isArray(this.options.group)?-1!==a.inArray(b,this.options.group):this.options.group===b},isValid:function(b){if(arguments.length>=1&&!a.isPlainObject(b)){g.warnOnce("Calling isValid on a parsley field without passing arguments as an object is deprecated.");var c=_slice.call(arguments);b={force:c[0],value:c[1]}}var d=this.whenValid(b);return!d||z[d.state()]},whenValid:function(){var b=this,c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],d=c.force,e=void 0!==d&&d,f=c.value,h=c.group;if(c._refreshed||this.refresh(),!h||this._isInGroup(h)){if(this.validationResult=!0,!this.hasConstraints())return a.when();if(void 0!==f&&null!==f||(f=this.getValue()),!this.needsValidation(f)&&!0!==e)return a.when();var i=this._getGroupedConstraints(),j=[];return a.each(i,function(c,d){var e=g.all(a.map(d,function(a){return b._validateConstraint(f,a)}));if(j.push(e),"rejected"===e.state())return!1}),g.all(j)}},_validateConstraint:function(b,c){var d=this,e=c.validate(b,this);return!1===e&&(e=a.Deferred().reject()),g.all([e]).fail(function(a){d.validationResult instanceof Array||(d.validationResult=[]),d.validationResult.push({assert:c,errorMessage:"string"==typeof a&&a})})},getValue:function(){var a;return a="function"==typeof this.options.value?this.options.value(this):void 0!==this.options.value?this.options.value:this.$element.val(),void 0===a||null===a?"":this._handleWhitespace(a)},reset:function(){return this._resetUI(),this._trigger("reset")},destroy:function(){this._destroyUI(),this.$element.removeData("Parsley"),this.$element.removeData("FieldMultiple"),this._trigger("destroy")},refresh:function(){return this._refreshConstraints(),this},_refreshConstraints:function(){return this.actualizeOptions()._bindConstraints()},refreshConstraints:function(){return g.warnOnce("Parsley's refreshConstraints is deprecated. Please use refresh"),this.refresh()},addConstraint:function(a,b,c,d){if(window.Parsley._validatorRegistry.validators[a]){var e=new w(this,a,b,c,d);"undefined"!==this.constraintsByName[e.name]&&this.removeConstraint(e.name),this.constraints.push(e),this.constraintsByName[e.name]=e}return this},removeConstraint:function(a){for(var b=0;b<this.constraints.length;b++)if(a===this.constraints[b].name){this.constraints.splice(b,1);break}return delete this.constraintsByName[a],this},updateConstraint:function(a,b,c){return this.removeConstraint(a).addConstraint(a,b,c)},_bindConstraints:function(){for(var a=[],b={},c=0;c<this.constraints.length;c++)!1===this.constraints[c].isDomConstraint&&(a.push(this.constraints[c]),b[this.constraints[c].name]=this.constraints[c]);this.constraints=a,this.constraintsByName=b;for(var d in this.options)this.addConstraint(d,this.options[d],void 0,!0);return this._bindHtml5Constraints()},_bindHtml5Constraints:function(){null!==this.element.getAttribute("required")&&this.addConstraint("required",!0,void 0,!0),null!==this.element.getAttribute("pattern")&&this.addConstraint("pattern",this.element.getAttribute("pattern"),void 0,!0);var a=this.element.getAttribute("min"),b=this.element.getAttribute("max");null!==a&&null!==b?this.addConstraint("range",[a,b],void 0,!0):null!==a?this.addConstraint("min",a,void 0,!0):null!==b&&this.addConstraint("max",b,void 0,!0),null!==this.element.getAttribute("minlength")&&null!==this.element.getAttribute("maxlength")?this.addConstraint("length",[this.element.getAttribute("minlength"),this.element.getAttribute("maxlength")],void 0,!0):null!==this.element.getAttribute("minlength")?this.addConstraint("minlength",this.element.getAttribute("minlength"),void 0,!0):null!==this.element.getAttribute("maxlength")&&this.addConstraint("maxlength",this.element.getAttribute("maxlength"),void 0,!0);var c=g.getType(this.element);return"number"===c?this.addConstraint("type",["number",{step:this.element.getAttribute("step")||"1",base:a||this.element.getAttribute("value")}],void 0,!0):/^(email|url|range|date)$/i.test(c)?this.addConstraint("type",c,void 0,!0):this},_isRequired:function(){return void 0!==this.constraintsByName.required&&!1!==this.constraintsByName.required.requirements},_trigger:function(a){return this.trigger("field:"+a)},_handleWhitespace:function(a){return!0===this.options.trimValue&&g.warnOnce('data-parsley-trim-value="true" is deprecated, please use data-parsley-whitespace="trim"'),"squish"===this.options.whitespace&&(a=a.replace(/\s{2,}/g," ")),"trim"!==this.options.whitespace&&"squish"!==this.options.whitespace&&!0!==this.options.trimValue||(a=g.trimString(a)),a},_isDateInput:function(){var a=this.constraintsByName.type;return a&&"date"===a.requirements},_getGroupedConstraints:function(){
2
+ if(!1===this.options.priorityEnabled)return[this.constraints];for(var a=[],b={},c=0;c<this.constraints.length;c++){var d=this.constraints[c].priority;b[d]||a.push(b[d]=[]),b[d].push(this.constraints[c])}return a.sort(function(a,b){return b[0].priority-a[0].priority}),a}};var A=y,B=function(){this.__class__="FieldMultiple"};B.prototype={addElement:function(a){return this.$elements.push(a),this},_refreshConstraints:function(){var b;if(this.constraints=[],"SELECT"===this.element.nodeName)return this.actualizeOptions()._bindConstraints(),this;for(var c=0;c<this.$elements.length;c++)if(a("html").has(this.$elements[c]).length){b=this.$elements[c].data("FieldMultiple")._refreshConstraints().constraints;for(var d=0;d<b.length;d++)this.addConstraint(b[d].name,b[d].requirements,b[d].priority,b[d].isDomConstraint)}else this.$elements.splice(c,1);return this},getValue:function(){if("function"==typeof this.options.value)return this.options.value(this);if(void 0!==this.options.value)return this.options.value;if("INPUT"===this.element.nodeName){var b=g.getType(this.element);if("radio"===b)return this._findRelated().filter(":checked").val()||"";if("checkbox"===b){var c=[];return this._findRelated().filter(":checked").each(function(){c.push(a(this).val())}),c}}return"SELECT"===this.element.nodeName&&null===this.$element.val()?[]:this.$element.val()},_init:function(){return this.$elements=[this.$element],this}};var C=function(b,c,d){this.element=b,this.$element=a(b);var e=this.$element.data("Parsley");if(e)return void 0!==d&&e.parent===window.Parsley&&(e.parent=d,e._resetOptions(e.options)),"object"==typeof c&&_extends(e.options,c),e;if(!this.$element.length)throw new Error("You must bind Parsley on an existing element.");if(void 0!==d&&"Form"!==d.__class__)throw new Error("Parent instance must be a Form instance");return this.parent=d||window.Parsley,this.init(c)};C.prototype={init:function(a){return this.__class__="Parsley",this.__version__="2.8.1",this.__id__=g.generateID(),this._resetOptions(a),"FORM"===this.element.nodeName||g.checkAttr(this.element,this.options.namespace,"validate")&&!this.$element.is(this.options.inputs)?this.bind("parsleyForm"):this.isMultiple()?this.handleMultiple():this.bind("parsleyField")},isMultiple:function(){var a=g.getType(this.element);return"radio"===a||"checkbox"===a||"SELECT"===this.element.nodeName&&null!==this.element.getAttribute("multiple")},handleMultiple:function(){var b,c,d=this;if(this.options.multiple=this.options.multiple||(b=this.element.getAttribute("name"))||this.element.getAttribute("id"),"SELECT"===this.element.nodeName&&null!==this.element.getAttribute("multiple"))return this.options.multiple=this.options.multiple||this.__id__,this.bind("parsleyFieldMultiple");if(!this.options.multiple)return g.warn("To be bound by Parsley, a radio, a checkbox and a multiple select input must have either a name or a multiple option.",this.$element),this;this.options.multiple=this.options.multiple.replace(/(:|\.|\[|\]|\{|\}|\$)/g,""),b&&a('input[name="'+b+'"]').each(function(a,b){var c=g.getType(b);"radio"!==c&&"checkbox"!==c||b.setAttribute(d.options.namespace+"multiple",d.options.multiple)});for(var e=this._findRelated(),f=0;f<e.length;f++)if(void 0!==(c=a(e.get(f)).data("Parsley"))){this.$element.data("FieldMultiple")||c.addElement(this.$element);break}return this.bind("parsleyField",!0),c||this.bind("parsleyFieldMultiple")},bind:function(b,c){var d;switch(b){case"parsleyForm":d=a.extend(new u(this.element,this.domOptions,this.options),new i,window.ParsleyExtend)._bindFields();break;case"parsleyField":d=a.extend(new A(this.element,this.domOptions,this.options,this.parent),new i,window.ParsleyExtend);break;case"parsleyFieldMultiple":d=a.extend(new A(this.element,this.domOptions,this.options,this.parent),new B,new i,window.ParsleyExtend)._init();break;default:throw new Error(b+"is not a supported Parsley type")}return this.options.multiple&&g.setAttr(this.element,this.options.namespace,"multiple",this.options.multiple),void 0!==c?(this.$element.data("FieldMultiple",d),d):(this.$element.data("Parsley",d),d._actualizeTriggers(),d._trigger("init"),d)}};var D=a.fn.jquery.split(".");if(parseInt(D[0])<=1&&parseInt(D[1])<8)throw"The loaded version of jQuery is too old. Please upgrade to 1.8.x or better.";D.forEach||g.warn("Parsley requires ES5 to run properly. Please include https://github.com/es-shims/es5-shim");var E=_extends(new i,{element:document,$element:a(document),actualizeOptions:null,_resetOptions:null,Factory:C,version:"2.8.1"});_extends(A.prototype,s.Field,i.prototype),_extends(u.prototype,s.Form,i.prototype),_extends(C.prototype,i.prototype),a.fn.parsley=a.fn.psly=function(b){if(this.length>1){var c=[];return this.each(function(){c.push(a(this).parsley(b))}),c}if(0!=this.length)return new C(this[0],b)},void 0===window.ParsleyExtend&&(window.ParsleyExtend={}),E.options=_extends(g.objectCreate(h),window.ParsleyConfig),window.ParsleyConfig=E.options,window.Parsley=window.psly=E,E.Utils=g,window.ParsleyUtils={},a.each(g,function(a,b){"function"==typeof b&&(window.ParsleyUtils[a]=function(){return g.warnOnce("Accessing `window.ParsleyUtils` is deprecated. Use `window.Parsley.Utils` instead."),g[a].apply(g,arguments)})});var F=window.Parsley._validatorRegistry=new m(window.ParsleyConfig.validators,window.ParsleyConfig.i18n);window.ParsleyValidator={},a.each("setLocale addCatalog addMessage addMessages getErrorMessage formatMessage addValidator updateValidator removeValidator hasValidator".split(" "),function(a,b){window.Parsley[b]=function(){return F[b].apply(F,arguments)},window.ParsleyValidator[b]=function(){var a;return g.warnOnce("Accessing the method '"+b+"' through Validator is deprecated. Simply call 'window.Parsley."+b+"(...)'"),(a=window.Parsley)[b].apply(a,arguments)}}),window.Parsley.UI=s,window.ParsleyUI={removeError:function(a,b,c){var d=!0!==c;return g.warnOnce("Accessing UI is deprecated. Call 'removeError' on the instance directly. Please comment in issue 1073 as to your need to call this method."),a.removeError(b,{updateClass:d})},getErrorsMessages:function(a){return g.warnOnce("Accessing UI is deprecated. Call 'getErrorsMessages' on the instance directly."),a.getErrorsMessages()}},a.each("addError updateError".split(" "),function(a,b){window.ParsleyUI[b]=function(a,c,d,e,f){var h=!0!==f;return g.warnOnce("Accessing UI is deprecated. Call '"+b+"' on the instance directly. Please comment in issue 1073 as to your need to call this method."),a[b](c,{message:d,assert:e,updateClass:h})}}),!1!==window.ParsleyConfig.autoBind&&a(function(){a("[data-parsley-validate]").length&&a("[data-parsley-validate]").parsley()});var G=a({}),H=function(){g.warnOnce("Parsley's pubsub module is deprecated; use the 'on' and 'off' methods on parsley instances or window.Parsley")},I="parsley:";a.listen=function(a,d){var e;if(H(),"object"==typeof arguments[1]&&"function"==typeof arguments[2]&&(e=arguments[1],d=arguments[2]),"function"!=typeof d)throw new Error("Wrong parameters");window.Parsley.on(c(a),b(d,e))},a.listenTo=function(a,d,e){if(H(),!(a instanceof A||a instanceof u))throw new Error("Must give Parsley instance");if("string"!=typeof d||"function"!=typeof e)throw new Error("Wrong parameters");a.on(c(d),b(e))},a.unsubscribe=function(a,b){if(H(),"string"!=typeof a||"function"!=typeof b)throw new Error("Wrong arguments");window.Parsley.off(c(a),b.parsleyAdaptedCallback)},a.unsubscribeTo=function(a,b){if(H(),!(a instanceof A||a instanceof u))throw new Error("Must give Parsley instance");a.off(c(b))},a.unsubscribeAll=function(b){H(),window.Parsley.off(c(b)),a("form,input,textarea,select").each(function(){var d=a(this).data("Parsley");d&&d.off(c(b))})},a.emit=function(a,b){var d;H();var e=b instanceof A||b instanceof u,f=Array.prototype.slice.call(arguments,e?2:1);f.unshift(c(a)),e||(b=window.Parsley),(d=b).trigger.apply(d,_toConsumableArray(f))};return a.extend(!0,E,{asyncValidators:{default:{fn:function(a){return a.status>=200&&a.status<300},url:!1},reverse:{fn:function(a){return a.status<200||a.status>=300},url:!1}},addAsyncValidator:function(a,b,c,d){return E.asyncValidators[a]={fn:b,url:c||!1,options:d||{}},this}}),E.addValidator("remote",{requirementType:{"":"string",validator:"string",reverse:"boolean",options:"object"},validateString:function(b,c,d,e){var f,g,h={},i=d.validator||(!0===d.reverse?"reverse":"default");if(void 0===E.asyncValidators[i])throw new Error("Calling an undefined async validator: `"+i+"`");c=E.asyncValidators[i].url||c,c.indexOf("{value}")>-1?c=c.replace("{value}",encodeURIComponent(b)):h[e.element.getAttribute("name")||e.element.getAttribute("id")]=b;var j=a.extend(!0,d.options||{},E.asyncValidators[i].options);f=a.extend(!0,{},{url:c,data:h,type:"GET"},j),e.trigger("field:ajaxoptions",e,f),g=a.param(f),void 0===E._remoteCache&&(E._remoteCache={});var k=E._remoteCache[g]=E._remoteCache[g]||a.ajax(f),l=function(){var b=E.asyncValidators[i].fn.call(e,k,c,d);return b||(b=a.Deferred().reject()),a.when(b)};return k.then(l,l)},priority:-1}),E.on("form:submit",function(){E._remoteCache={}}),i.prototype.addAsyncValidator=function(){return g.warnOnce("Accessing the method `addAsyncValidator` through an instance is deprecated. Simply call `Parsley.addAsyncValidator(...)`"),E.addAsyncValidator.apply(E,arguments)},E.addMessages("en",{defaultMessage:"This value seems to be invalid.",type:{email:"This value should be a valid email.",url:"This value should be a valid url.",number:"This value should be a valid number.",integer:"This value should be a valid integer.",digits:"This value should be digits.",alphanum:"This value should be alphanumeric."},notblank:"This value should not be blank.",required:"This value is required.",pattern:"This value seems to be invalid.",min:"This value should be greater than or equal to %s.",max:"This value should be lower than or equal to %s.",range:"This value should be between %s and %s.",minlength:"This value is too short. It should have %s characters or more.",maxlength:"This value is too long. It should have %s characters or fewer.",length:"This value length is invalid. It should be between %s and %s characters long.",mincheck:"You must select at least %s choices.",maxcheck:"You must select %s choices or fewer.",check:"You must select between %s and %s choices.",equalto:"This value should be the same."}),E.setLocale("en"),(new d).install(),E});var _slice=Array.prototype.slice,_slicedToArray=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(a){e=!0,f=a}finally{try{!d&&h.return&&h.return()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_extends=Object.assign||function(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(a[d]=c[d])}return a};!function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],b):a.parsley=b(a.jQuery)}(this,function(a){"use strict";function b(a,b){return a.parsleyAdaptedCallback||(a.parsleyAdaptedCallback=function(){var c=Array.prototype.slice.call(arguments,0);c.unshift(this),a.apply(b||G,c)}),a.parsleyAdaptedCallback}function c(a){return 0===a.lastIndexOf(I,0)?a.substr(I.length):a}function d(){var b=this,c=window||global;_extends(this,{isNativeEvent:function(a){return a.originalEvent&&!1!==a.originalEvent.isTrusted},fakeInputEvent:function(c){b.isNativeEvent(c)&&a(c.target).trigger("input")},misbehaves:function(c){b.isNativeEvent(c)&&(b.behavesOk(c),a(document).on("change.inputevent",c.data.selector,b.fakeInputEvent),b.fakeInputEvent(c))},behavesOk:function(c){b.isNativeEvent(c)&&a(document).off("input.inputevent",c.data.selector,b.behavesOk).off("change.inputevent",c.data.selector,b.misbehaves)},install:function(){if(!c.inputEventPatched){c.inputEventPatched="0.0.3";for(var d=["select",'input[type="checkbox"]','input[type="radio"]','input[type="file"]'],e=0;e<d.length;e++){var f=d[e];a(document).on("input.inputevent",f,{selector:f},b.behavesOk).on("change.inputevent",f,{selector:f},b.misbehaves)}}},uninstall:function(){delete c.inputEventPatched,a(document).off(".inputevent")}})}var e=1,f={},g={attr:function(a,b,c){var d,e,f,g=new RegExp("^"+b,"i");if(void 0===c)c={};else for(d in c)c.hasOwnProperty(d)&&delete c[d];if(!a)return c;for(f=a.attributes,d=f.length;d--;)(e=f[d])&&e.specified&&g.test(e.name)&&(c[this.camelize(e.name.slice(b.length))]=this.deserializeValue(e.value));return c},checkAttr:function(a,b,c){return a.hasAttribute(b+c)},setAttr:function(a,b,c,d){a.setAttribute(this.dasherize(b+c),String(d))},getType:function(a){return a.getAttribute("type")||"text"},generateID:function(){return""+e++},deserializeValue:function(a){var b;try{return a?"true"==a||"false"!=a&&("null"==a?null:isNaN(b=Number(a))?/^[\[\{]/.test(a)?JSON.parse(a):a:b):a}catch(b){return a}},camelize:function(a){return a.replace(/-+(.)?/g,function(a,b){return b?b.toUpperCase():""})},dasherize:function(a){return a.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()},warn:function(){var a;window.console&&"function"==typeof window.console.warn&&(a=window.console).warn.apply(a,arguments)},warnOnce:function(a){f[a]||(f[a]=!0,this.warn.apply(this,arguments))},_resetWarnings:function(){f={}},trimString:function(a){return a.replace(/^\s+|\s+$/g,"")},parse:{date:function(a){var b=a.match(/^(\d{4,})-(\d\d)-(\d\d)$/);if(!b)return null;var c=b.map(function(a){return parseInt(a,10)}),d=_slicedToArray(c,4),e=(d[0],d[1]),f=d[2],g=d[3],h=new Date(e,f-1,g);return h.getFullYear()!==e||h.getMonth()+1!==f||h.getDate()!==g?null:h},string:function(a){return a},integer:function(a){return isNaN(a)?null:parseInt(a,10)},number:function(a){if(isNaN(a))throw null;return parseFloat(a)},boolean:function(a){return!/^\s*false\s*$/i.test(a)},object:function(a){return g.deserializeValue(a)},regexp:function(a){var b="";return/^\/.*\/(?:[gimy]*)$/.test(a)?(b=a.replace(/.*\/([gimy]*)$/,"$1"),a=a.replace(new RegExp("^/(.*?)/"+b+"$"),"$1")):a="^"+a+"$",new RegExp(a,b)}},parseRequirement:function(a,b){var c=this.parse[a||"string"];if(!c)throw'Unknown requirement specification: "'+a+'"';var d=c(b);if(null===d)throw"Requirement is not a "+a+': "'+b+'"';return d},namespaceEvents:function(b,c){return b=this.trimString(b||"").split(/\s+/),b[0]?a.map(b,function(a){return a+"."+c}).join(" "):""},difference:function(b,c){var d=[];return a.each(b,function(a,b){-1==c.indexOf(b)&&d.push(b)}),d},all:function(b){return a.when.apply(a,_toConsumableArray(b).concat([42,42]))},objectCreate:Object.create||function(){var a=function(){};return function(b){if(arguments.length>1)throw Error("Second argument not supported");if("object"!=typeof b)throw TypeError("Argument must be an object");a.prototype=b;var c=new a;return a.prototype=null,c}}(),_SubmitSelector:'input[type="submit"], button:submit'},h={namespace:"data-parsley-",inputs:"input, textarea, select",excluded:"input[type=button], input[type=submit], input[type=reset], input[type=hidden]",priorityEnabled:!0,multiple:null,group:null,uiEnabled:!0,validationThreshold:3,focus:"first",trigger:!1,triggerAfterFailure:"input",errorClass:"parsley-error",successClass:"parsley-success",classHandler:function(a){},errorsContainer:function(a){},errorsWrapper:'<ul class="parsley-errors-list"></ul>',errorTemplate:"<li></li>"},i=function(){this.__id__=g.generateID()};i.prototype={asyncSupport:!0,_pipeAccordingToValidationResult:function(){var b=this,c=function(){var c=a.Deferred();return!0!==b.validationResult&&c.reject(),c.resolve().promise()};return[c,c]},actualizeOptions:function(){return g.attr(this.element,this.options.namespace,this.domOptions),this.parent&&this.parent.actualizeOptions&&this.parent.actualizeOptions(),this},_resetOptions:function(a){this.domOptions=g.objectCreate(this.parent.options),this.options=g.objectCreate(this.domOptions);for(var b in a)a.hasOwnProperty(b)&&(this.options[b]=a[b]);this.actualizeOptions()},_listeners:null,on:function(a,b){return this._listeners=this._listeners||{},(this._listeners[a]=this._listeners[a]||[]).push(b),this},subscribe:function(b,c){a.listenTo(this,b.toLowerCase(),c)},off:function(a,b){var c=this._listeners&&this._listeners[a];if(c)if(b)for(var d=c.length;d--;)c[d]===b&&c.splice(d,1);else delete this._listeners[a];return this},unsubscribe:function(b,c){a.unsubscribeTo(this,b.toLowerCase())},trigger:function(a,b,c){b=b||this;var d,e=this._listeners&&this._listeners[a];if(e)for(var f=e.length;f--;)if(!1===(d=e[f].call(b,b,c)))return d;return!this.parent||this.parent.trigger(a,b,c)},asyncIsValid:function(a,b){return g.warnOnce("asyncIsValid is deprecated; please use whenValid instead"),this.whenValid({group:a,force:b})},_findRelated:function(){return this.options.multiple?a(this.parent.element.querySelectorAll("["+this.options.namespace+'multiple="'+this.options.multiple+'"]')):this.$element}};var j=function(a,b){var c=a.match(/^\s*\[(.*)\]\s*$/);if(!c)throw'Requirement is not an array: "'+a+'"';var d=c[1].split(",").map(g.trimString);if(d.length!==b)throw"Requirement has "+d.length+" values when "+b+" are needed";return d},k=function(a,b,c){var d=null,e={};for(var f in a)if(f){var h=c(f);"string"==typeof h&&(h=g.parseRequirement(a[f],h)),e[f]=h}else d=g.parseRequirement(a[f],b);return[d,e]},l=function(b){a.extend(!0,this,b)};l.prototype={validate:function(a,b){if(this.fn)return arguments.length>3&&(b=[].slice.call(arguments,1,-1)),this.fn(a,b);if(Array.isArray(a)){if(!this.validateMultiple)throw"Validator `"+this.name+"` does not handle multiple values";return this.validateMultiple.apply(this,arguments)}var c=arguments[arguments.length-1];if(this.validateDate&&c._isDateInput())return arguments[0]=g.parse.date(arguments[0]),null!==arguments[0]&&this.validateDate.apply(this,arguments);if(this.validateNumber)return!isNaN(a)&&(arguments[0]=parseFloat(arguments[0]),this.validateNumber.apply(this,arguments));if(this.validateString)return this.validateString.apply(this,arguments);throw"Validator `"+this.name+"` only handles multiple values"},parseRequirements:function(b,c){if("string"!=typeof b)return Array.isArray(b)?b:[b];var d=this.requirementType;if(Array.isArray(d)){for(var e=j(b,d.length),f=0;f<e.length;f++)e[f]=g.parseRequirement(d[f],e[f]);return e}return a.isPlainObject(d)?k(d,b,c):[g.parseRequirement(d,b)]},requirementType:"string",priority:2};var m=function(a,b){this.__class__="ValidatorRegistry",this.locale="en",this.init(a||{},b||{})},n={email:/^((([a-zA-Z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-zA-Z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/,number:/^-?(\d*\.)?\d+(e[-+]?\d+)?$/i,integer:/^-?\d+$/,digits:/^\d+$/,alphanum:/^\w+$/i,date:{test:function(a){return null!==g.parse.date(a)}},url:new RegExp("^(?:(?:https?|ftp)://)?(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-zA-Z\\u00a1-\\uffff0-9]-*)*[a-zA-Z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-zA-Z\\u00a1-\\uffff0-9]-*)*[a-zA-Z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-zA-Z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:/\\S*)?$")};n.range=n.number;var o=function(a){var b=(""+a).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return b?Math.max(0,(b[1]?b[1].length:0)-(b[2]?+b[2]:0)):0},p=function(a,b){return b.map(g.parse[a])},q=function(a,b){return function(c){for(var d=arguments.length,e=Array(d>1?d-1:0),f=1;f<d;f++)e[f-1]=arguments[f];return e.pop(),b.apply(void 0,[c].concat(_toConsumableArray(p(a,e))))}},r=function(a){return{validateDate:q("date",a),validateNumber:q("number",a),requirementType:a.length<=2?"string":["string","string"],priority:30}};m.prototype={init:function(a,b){this.catalog=b,this.validators=_extends({},this.validators);for(var c in a)this.addValidator(c,a[c].fn,a[c].priority);window.Parsley.trigger("parsley:validator:init")},setLocale:function(a){if(void 0===this.catalog[a])throw new Error(a+" is not available in the catalog");return this.locale=a,this},addCatalog:function(a,b,c){return"object"==typeof b&&(this.catalog[a]=b),!0===c?this.setLocale(a):this},addMessage:function(a,b,c){return void 0===this.catalog[a]&&(this.catalog[a]={}),this.catalog[a][b]=c,this},addMessages:function(a,b){for(var c in b)this.addMessage(a,c,b[c]);return this},addValidator:function(a,b,c){if(this.validators[a])g.warn('Validator "'+a+'" is already defined.');else if(h.hasOwnProperty(a))return void g.warn('"'+a+'" is a restricted keyword and is not a valid validator name.');return this._setValidator.apply(this,arguments)},hasValidator:function(a){return!!this.validators[a]},updateValidator:function(a,b,c){return this.validators[a]?this._setValidator.apply(this,arguments):(g.warn('Validator "'+a+'" is not already defined.'),this.addValidator.apply(this,arguments))},removeValidator:function(a){return this.validators[a]||g.warn('Validator "'+a+'" is not defined.'),delete this.validators[a],this},_setValidator:function(a,b,c){"object"!=typeof b&&(b={fn:b,priority:c}),b.validate||(b=new l(b)),this.validators[a]=b;for(var d in b.messages||{})this.addMessage(d,a,b.messages[d]);return this},getErrorMessage:function(a){var b;if("type"===a.name){b=(this.catalog[this.locale][a.name]||{})[a.requirements]}else b=this.formatMessage(this.catalog[this.locale][a.name],a.requirements);return b||this.catalog[this.locale].defaultMessage||this.catalog.en.defaultMessage},formatMessage:function(a,b){if("object"==typeof b){for(var c in b)a=this.formatMessage(a,b[c]);return a}return"string"==typeof a?a.replace(/%s/i,b):""},validators:{notblank:{validateString:function(a){return/\S/.test(a)},priority:2},required:{validateMultiple:function(a){return a.length>0},validateString:function(a){return/\S/.test(a)},priority:512},type:{validateString:function(a,b){var c=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],d=c.step,e=void 0===d?"any":d,f=c.base,g=void 0===f?0:f,h=n[b];if(!h)throw new Error("validator type `"+b+"` is not supported");if(!h.test(a))return!1;if("number"===b&&!/^any$/i.test(e||"")){var i=Number(a),j=Math.max(o(e),o(g));if(o(i)>j)return!1;var k=function(a){return Math.round(a*Math.pow(10,j))};if((k(i)-k(g))%k(e)!=0)return!1}return!0},requirementType:{"":"string",step:"string",base:"number"},priority:256},pattern:{validateString:function(a,b){return b.test(a)},requirementType:"regexp",priority:64},minlength:{validateString:function(a,b){return a.length>=b},requirementType:"integer",priority:30},maxlength:{validateString:function(a,b){return a.length<=b},requirementType:"integer",priority:30},length:{validateString:function(a,b,c){return a.length>=b&&a.length<=c},requirementType:["integer","integer"],priority:30},mincheck:{validateMultiple:function(a,b){return a.length>=b},requirementType:"integer",priority:30},maxcheck:{validateMultiple:function(a,b){return a.length<=b},requirementType:"integer",priority:30},check:{validateMultiple:function(a,b,c){return a.length>=b&&a.length<=c},requirementType:["integer","integer"],priority:30},min:r(function(a,b){return a>=b}),max:r(function(a,b){return a<=b}),range:r(function(a,b,c){return a>=b&&a<=c}),equalto:{validateString:function(b,c){var d=a(c);return d.length?b===d.val():b===c},priority:256}}};var s={},t=function a(b,c,d){for(var e=[],f=[],g=0;g<b.length;g++){for(var h=!1,i=0;i<c.length;i++)if(b[g].assert.name===c[i].assert.name){h=!0;break}h?f.push(b[g]):e.push(b[g])}return{kept:f,added:e,removed:d?[]:a(c,b,!0).added}};s.Form={_actualizeTriggers:function(){var a=this;this.$element.on("submit.Parsley",function(b){a.onSubmitValidate(b)}),this.$element.on("click.Parsley",g._SubmitSelector,function(b){a.onSubmitButton(b)}),!1!==this.options.uiEnabled&&this.element.setAttribute("novalidate","")},focus:function(){if(this._focusedField=null,!0===this.validationResult||"none"===this.options.focus)return null;for(var a=0;a<this.fields.length;a++){var b=this.fields[a];if(!0!==b.validationResult&&b.validationResult.length>0&&void 0===b.options.noFocus&&(this._focusedField=b.$element,"first"===this.options.focus))break}return null===this._focusedField?null:this._focusedField.focus()},_destroyUI:function(){this.$element.off(".Parsley")}},s.Field={_reflowUI:function(){if(this._buildUI(),this._ui){var a=t(this.validationResult,this._ui.lastValidationResult);this._ui.lastValidationResult=this.validationResult,this._manageStatusClass(),this._manageErrorsMessages(a),this._actualizeTriggers(),!a.kept.length&&!a.added.length||this._failedOnce||(this._failedOnce=!0,this._actualizeTriggers())}},getErrorsMessages:function(){if(!0===this.validationResult)return[];for(var a=[],b=0;b<this.validationResult.length;b++)a.push(this.validationResult[b].errorMessage||this._getErrorMessage(this.validationResult[b].assert));return a},addError:function(a){var b=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],c=b.message,d=b.assert,e=b.updateClass,f=void 0===e||e;this._buildUI(),this._addError(a,{message:c,assert:d}),f&&this._errorClass()},updateError:function(a){var b=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],c=b.message,d=b.assert,e=b.updateClass,f=void 0===e||e;this._buildUI(),this._updateError(a,{message:c,assert:d}),f&&this._errorClass()},removeError:function(a){var b=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],c=b.updateClass,d=void 0===c||c;this._buildUI(),this._removeError(a),d&&this._manageStatusClass()},_manageStatusClass:function(){this.hasConstraints()&&this.needsValidation()&&!0===this.validationResult?this._successClass():this.validationResult.length>0?this._errorClass():this._resetClass()},_manageErrorsMessages:function(b){if(void 0===this.options.errorsMessagesDisabled){if(void 0!==this.options.errorMessage)return b.added.length||b.kept.length?(this._insertErrorWrapper(),0===this._ui.$errorsWrapper.find(".parsley-custom-error-message").length&&this._ui.$errorsWrapper.append(a(this.options.errorTemplate).addClass("parsley-custom-error-message")),this._ui.$errorsWrapper.addClass("filled").find(".parsley-custom-error-message").html(this.options.errorMessage)):this._ui.$errorsWrapper.removeClass("filled").find(".parsley-custom-error-message").remove();for(var c=0;c<b.removed.length;c++)this._removeError(b.removed[c].assert.name);for(c=0;c<b.added.length;c++)this._addError(b.added[c].assert.name,{message:b.added[c].errorMessage,assert:b.added[c].assert});for(c=0;c<b.kept.length;c++)this._updateError(b.kept[c].assert.name,{message:b.kept[c].errorMessage,assert:b.kept[c].assert})}},_addError:function(b,c){var d=c.message,e=c.assert;this._insertErrorWrapper(),this._ui.$errorClassHandler.attr("aria-describedby",this._ui.errorsWrapperId),this._ui.$errorsWrapper.addClass("filled").append(a(this.options.errorTemplate).addClass("parsley-"+b).html(d||this._getErrorMessage(e)))},_updateError:function(a,b){var c=b.message,d=b.assert;this._ui.$errorsWrapper.addClass("filled").find(".parsley-"+a).html(c||this._getErrorMessage(d))},_removeError:function(a){this._ui.$errorClassHandler.removeAttr("aria-describedby"),this._ui.$errorsWrapper.removeClass("filled").find(".parsley-"+a).remove()},_getErrorMessage:function(a){var b=a.name+"Message";return void 0!==this.options[b]?window.Parsley.formatMessage(this.options[b],a.requirements):window.Parsley.getErrorMessage(a)},_buildUI:function(){if(!this._ui&&!1!==this.options.uiEnabled){var b={};this.element.setAttribute(this.options.namespace+"id",this.__id__),b.$errorClassHandler=this._manageClassHandler(),b.errorsWrapperId="parsley-id-"+(this.options.multiple?"multiple-"+this.options.multiple:this.__id__),b.$errorsWrapper=a(this.options.errorsWrapper).attr("id",b.errorsWrapperId),b.lastValidationResult=[],b.validationInformationVisible=!1,this._ui=b}},_manageClassHandler:function(){if("string"==typeof this.options.classHandler&&a(this.options.classHandler).length)return a(this.options.classHandler);var b=this.options.classHandler;if("string"==typeof this.options.classHandler&&"function"==typeof window[this.options.classHandler]&&(b=window[this.options.classHandler]),"function"==typeof b){var c=b.call(this,this);if(void 0!==c&&c.length)return c}else{if("object"==typeof b&&b instanceof jQuery&&b.length)return b;b&&g.warn("The class handler `"+b+"` does not exist in DOM nor as a global JS function")}return this._inputHolder()},_inputHolder:function(){return this.options.multiple&&"SELECT"!==this.element.nodeName?this.$element.parent():this.$element},_insertErrorWrapper:function(){var b=this.options.errorsContainer;if(0!==this._ui.$errorsWrapper.parent().length)return this._ui.$errorsWrapper.parent();if("string"==typeof b){if(a(b).length)return a(b).append(this._ui.$errorsWrapper);"function"==typeof window[b]?b=window[b]:g.warn("The errors container `"+b+"` does not exist in DOM nor as a global JS function")}return"function"==typeof b&&(b=b.call(this,this)),"object"==typeof b&&b.length?b.append(this._ui.$errorsWrapper):this._inputHolder().after(this._ui.$errorsWrapper)},_actualizeTriggers:function(){var a,b=this,c=this._findRelated();c.off(".Parsley"),this._failedOnce?c.on(g.namespaceEvents(this.options.triggerAfterFailure,"Parsley"),function(){b._validateIfNeeded()}):(a=g.namespaceEvents(this.options.trigger,"Parsley"))&&c.on(a,function(a){b._validateIfNeeded(a)})},_validateIfNeeded:function(a){var b=this;a&&/key|input/.test(a.type)&&(!this._ui||!this._ui.validationInformationVisible)&&this.getValue().length<=this.options.validationThreshold||(this.options.debounce?(window.clearTimeout(this._debounced),this._debounced=window.setTimeout(function(){return b.validate()},this.options.debounce)):this.validate())},_resetUI:function(){this._failedOnce=!1,this._actualizeTriggers(),void 0!==this._ui&&(this._ui.$errorsWrapper.removeClass("filled").children().remove(),this._resetClass(),this._ui.lastValidationResult=[],this._ui.validationInformationVisible=!1)},_destroyUI:function(){this._resetUI(),void 0!==this._ui&&this._ui.$errorsWrapper.remove(),delete this._ui},_successClass:function(){this._ui.validationInformationVisible=!0,this._ui.$errorClassHandler.removeClass(this.options.errorClass).addClass(this.options.successClass)},_errorClass:function(){this._ui.validationInformationVisible=!0,this._ui.$errorClassHandler.removeClass(this.options.successClass).addClass(this.options.errorClass)},_resetClass:function(){this._ui.$errorClassHandler.removeClass(this.options.successClass).removeClass(this.options.errorClass)}};var u=function(b,c,d){this.__class__="Form",this.element=b,this.$element=a(b),this.domOptions=c,this.options=d,this.parent=window.Parsley,this.fields=[],this.validationResult=null},v={pending:null,resolved:!0,rejected:!1};u.prototype={onSubmitValidate:function(a){var b=this;if(!0!==a.parsley){var c=this._submitSource||this.$element.find(g._SubmitSelector)[0];if(this._submitSource=null,
3
+ this.$element.find(".parsley-synthetic-submit-button").prop("disabled",!0),!c||null===c.getAttribute("formnovalidate")){window.Parsley._remoteCache={};var d=this.whenValidate({event:a});"resolved"===d.state()&&!1!==this._trigger("submit")||(a.stopImmediatePropagation(),a.preventDefault(),"pending"===d.state()&&d.done(function(){b._submit(c)}))}}},onSubmitButton:function(a){this._submitSource=a.currentTarget},_submit:function(b){if(!1!==this._trigger("submit")){if(b){var c=this.$element.find(".parsley-synthetic-submit-button").prop("disabled",!1);0===c.length&&(c=a('<input class="parsley-synthetic-submit-button" type="hidden">').appendTo(this.$element)),c.attr({name:b.getAttribute("name"),value:b.getAttribute("value")})}this.$element.trigger(_extends(a.Event("submit"),{parsley:!0}))}},validate:function(b){if(arguments.length>=1&&!a.isPlainObject(b)){g.warnOnce("Calling validate on a parsley form without passing arguments as an object is deprecated.");var c=_slice.call(arguments);b={group:c[0],force:c[1],event:c[2]}}return v[this.whenValidate(b).state()]},whenValidate:function(){var b,c=this,d=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=d.group,f=d.force,h=d.event;this.submitEvent=h,h&&(this.submitEvent=_extends({},h,{preventDefault:function(){g.warnOnce("Using `this.submitEvent.preventDefault()` is deprecated; instead, call `this.validationResult = false`"),c.validationResult=!1}})),this.validationResult=!0,this._trigger("validate"),this._refreshFields();var i=this._withoutReactualizingFormOptions(function(){return a.map(c.fields,function(a){return a.whenValidate({force:f,group:e})})});return(b=g.all(i).done(function(){c._trigger("success")}).fail(function(){c.validationResult=!1,c.focus(),c._trigger("error")}).always(function(){c._trigger("validated")})).pipe.apply(b,_toConsumableArray(this._pipeAccordingToValidationResult()))},isValid:function(b){if(arguments.length>=1&&!a.isPlainObject(b)){g.warnOnce("Calling isValid on a parsley form without passing arguments as an object is deprecated.");var c=_slice.call(arguments);b={group:c[0],force:c[1]}}return v[this.whenValid(b).state()]},whenValid:function(){var b=this,c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],d=c.group,e=c.force;this._refreshFields();var f=this._withoutReactualizingFormOptions(function(){return a.map(b.fields,function(a){return a.whenValid({group:d,force:e})})});return g.all(f)},refresh:function(){return this._refreshFields(),this},reset:function(){for(var a=0;a<this.fields.length;a++)this.fields[a].reset();this._trigger("reset")},destroy:function(){this._destroyUI();for(var a=0;a<this.fields.length;a++)this.fields[a].destroy();this.$element.removeData("Parsley"),this._trigger("destroy")},_refreshFields:function(){return this.actualizeOptions()._bindFields()},_bindFields:function(){var b=this,c=this.fields;return this.fields=[],this.fieldsMappedById={},this._withoutReactualizingFormOptions(function(){b.$element.find(b.options.inputs).not(b.options.excluded).each(function(a,c){var d=new window.Parsley.Factory(c,{},b);if(("Field"===d.__class__||"FieldMultiple"===d.__class__)&&!0!==d.options.excluded){var e=d.__class__+"-"+d.__id__;void 0===b.fieldsMappedById[e]&&(b.fieldsMappedById[e]=d,b.fields.push(d))}}),a.each(g.difference(c,b.fields),function(a,b){b.reset()})}),this},_withoutReactualizingFormOptions:function(a){var b=this.actualizeOptions;this.actualizeOptions=function(){return this};var c=a();return this.actualizeOptions=b,c},_trigger:function(a){return this.trigger("form:"+a)}};var w=function(a,b,c,d,e){var f=window.Parsley._validatorRegistry.validators[b],g=new l(f);d=d||a.options[b+"Priority"]||g.priority,e=!0===e,_extends(this,{validator:g,name:b,requirements:c,priority:d,isDomConstraint:e}),this._parseRequirements(a.options)},x=function(a){return a[0].toUpperCase()+a.slice(1)};w.prototype={validate:function(a,b){var c;return(c=this.validator).validate.apply(c,[a].concat(_toConsumableArray(this.requirementList),[b]))},_parseRequirements:function(a){var b=this;this.requirementList=this.validator.parseRequirements(this.requirements,function(c){return a[b.name+x(c)]})}};var y=function(b,c,d,e){this.__class__="Field",this.element=b,this.$element=a(b),void 0!==e&&(this.parent=e),this.options=d,this.domOptions=c,this.constraints=[],this.constraintsByName={},this.validationResult=!0,this._bindConstraints()},z={pending:null,resolved:!0,rejected:!1};y.prototype={validate:function(b){arguments.length>=1&&!a.isPlainObject(b)&&(g.warnOnce("Calling validate on a parsley field without passing arguments as an object is deprecated."),b={options:b});var c=this.whenValidate(b);if(!c)return!0;switch(c.state()){case"pending":return null;case"resolved":return!0;case"rejected":return this.validationResult}},whenValidate:function(){var a,b=this,c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],d=c.force,e=c.group;if(this.refresh(),!e||this._isInGroup(e))return this.value=this.getValue(),this._trigger("validate"),(a=this.whenValid({force:d,value:this.value,_refreshed:!0}).always(function(){b._reflowUI()}).done(function(){b._trigger("success")}).fail(function(){b._trigger("error")}).always(function(){b._trigger("validated")})).pipe.apply(a,_toConsumableArray(this._pipeAccordingToValidationResult()))},hasConstraints:function(){return 0!==this.constraints.length},needsValidation:function(a){return void 0===a&&(a=this.getValue()),!(!a.length&&!this._isRequired()&&void 0===this.options.validateIfEmpty)},_isInGroup:function(b){return Array.isArray(this.options.group)?-1!==a.inArray(b,this.options.group):this.options.group===b},isValid:function(b){if(arguments.length>=1&&!a.isPlainObject(b)){g.warnOnce("Calling isValid on a parsley field without passing arguments as an object is deprecated.");var c=_slice.call(arguments);b={force:c[0],value:c[1]}}var d=this.whenValid(b);return!d||z[d.state()]},whenValid:function(){var b=this,c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],d=c.force,e=void 0!==d&&d,f=c.value,h=c.group;if(c._refreshed||this.refresh(),!h||this._isInGroup(h)){if(this.validationResult=!0,!this.hasConstraints())return a.when();if(void 0!==f&&null!==f||(f=this.getValue()),!this.needsValidation(f)&&!0!==e)return a.when();var i=this._getGroupedConstraints(),j=[];return a.each(i,function(c,d){var e=g.all(a.map(d,function(a){return b._validateConstraint(f,a)}));if(j.push(e),"rejected"===e.state())return!1}),g.all(j)}},_validateConstraint:function(b,c){var d=this,e=c.validate(b,this);return!1===e&&(e=a.Deferred().reject()),g.all([e]).fail(function(a){d.validationResult instanceof Array||(d.validationResult=[]),d.validationResult.push({assert:c,errorMessage:"string"==typeof a&&a})})},getValue:function(){var a;return a="function"==typeof this.options.value?this.options.value(this):void 0!==this.options.value?this.options.value:this.$element.val(),void 0===a||null===a?"":this._handleWhitespace(a)},reset:function(){return this._resetUI(),this._trigger("reset")},destroy:function(){this._destroyUI(),this.$element.removeData("Parsley"),this.$element.removeData("FieldMultiple"),this._trigger("destroy")},refresh:function(){return this._refreshConstraints(),this},_refreshConstraints:function(){return this.actualizeOptions()._bindConstraints()},refreshConstraints:function(){return g.warnOnce("Parsley's refreshConstraints is deprecated. Please use refresh"),this.refresh()},addConstraint:function(a,b,c,d){if(window.Parsley._validatorRegistry.validators[a]){var e=new w(this,a,b,c,d);"undefined"!==this.constraintsByName[e.name]&&this.removeConstraint(e.name),this.constraints.push(e),this.constraintsByName[e.name]=e}return this},removeConstraint:function(a){for(var b=0;b<this.constraints.length;b++)if(a===this.constraints[b].name){this.constraints.splice(b,1);break}return delete this.constraintsByName[a],this},updateConstraint:function(a,b,c){return this.removeConstraint(a).addConstraint(a,b,c)},_bindConstraints:function(){for(var a=[],b={},c=0;c<this.constraints.length;c++)!1===this.constraints[c].isDomConstraint&&(a.push(this.constraints[c]),b[this.constraints[c].name]=this.constraints[c]);this.constraints=a,this.constraintsByName=b;for(var d in this.options)this.addConstraint(d,this.options[d],void 0,!0);return this._bindHtml5Constraints()},_bindHtml5Constraints:function(){null!==this.element.getAttribute("required")&&this.addConstraint("required",!0,void 0,!0),null!==this.element.getAttribute("pattern")&&this.addConstraint("pattern",this.element.getAttribute("pattern"),void 0,!0);var a=this.element.getAttribute("min"),b=this.element.getAttribute("max");null!==a&&null!==b?this.addConstraint("range",[a,b],void 0,!0):null!==a?this.addConstraint("min",a,void 0,!0):null!==b&&this.addConstraint("max",b,void 0,!0),null!==this.element.getAttribute("minlength")&&null!==this.element.getAttribute("maxlength")?this.addConstraint("length",[this.element.getAttribute("minlength"),this.element.getAttribute("maxlength")],void 0,!0):null!==this.element.getAttribute("minlength")?this.addConstraint("minlength",this.element.getAttribute("minlength"),void 0,!0):null!==this.element.getAttribute("maxlength")&&this.addConstraint("maxlength",this.element.getAttribute("maxlength"),void 0,!0);var c=g.getType(this.element);return"number"===c?this.addConstraint("type",["number",{step:this.element.getAttribute("step")||"1",base:a||this.element.getAttribute("value")}],void 0,!0):/^(email|url|range|date)$/i.test(c)?this.addConstraint("type",c,void 0,!0):this},_isRequired:function(){return void 0!==this.constraintsByName.required&&!1!==this.constraintsByName.required.requirements},_trigger:function(a){return this.trigger("field:"+a)},_handleWhitespace:function(a){return!0===this.options.trimValue&&g.warnOnce('data-parsley-trim-value="true" is deprecated, please use data-parsley-whitespace="trim"'),"squish"===this.options.whitespace&&(a=a.replace(/\s{2,}/g," ")),"trim"!==this.options.whitespace&&"squish"!==this.options.whitespace&&!0!==this.options.trimValue||(a=g.trimString(a)),a},_isDateInput:function(){var a=this.constraintsByName.type;return a&&"date"===a.requirements},_getGroupedConstraints:function(){if(!1===this.options.priorityEnabled)return[this.constraints];for(var a=[],b={},c=0;c<this.constraints.length;c++){var d=this.constraints[c].priority;b[d]||a.push(b[d]=[]),b[d].push(this.constraints[c])}return a.sort(function(a,b){return b[0].priority-a[0].priority}),a}};var A=y,B=function(){this.__class__="FieldMultiple"};B.prototype={addElement:function(a){return this.$elements.push(a),this},_refreshConstraints:function(){var b;if(this.constraints=[],"SELECT"===this.element.nodeName)return this.actualizeOptions()._bindConstraints(),this;for(var c=0;c<this.$elements.length;c++)if(a("html").has(this.$elements[c]).length){b=this.$elements[c].data("FieldMultiple")._refreshConstraints().constraints;for(var d=0;d<b.length;d++)this.addConstraint(b[d].name,b[d].requirements,b[d].priority,b[d].isDomConstraint)}else this.$elements.splice(c,1);return this},getValue:function(){if("function"==typeof this.options.value)return this.options.value(this);if(void 0!==this.options.value)return this.options.value;if("INPUT"===this.element.nodeName){var b=g.getType(this.element);if("radio"===b)return this._findRelated().filter(":checked").val()||"";if("checkbox"===b){var c=[];return this._findRelated().filter(":checked").each(function(){c.push(a(this).val())}),c}}return"SELECT"===this.element.nodeName&&null===this.$element.val()?[]:this.$element.val()},_init:function(){return this.$elements=[this.$element],this}};var C=function(b,c,d){this.element=b,this.$element=a(b);var e=this.$element.data("Parsley");if(e)return void 0!==d&&e.parent===window.Parsley&&(e.parent=d,e._resetOptions(e.options)),"object"==typeof c&&_extends(e.options,c),e;if(!this.$element.length)throw new Error("You must bind Parsley on an existing element.");if(void 0!==d&&"Form"!==d.__class__)throw new Error("Parent instance must be a Form instance");return this.parent=d||window.Parsley,this.init(c)};C.prototype={init:function(a){return this.__class__="Parsley",this.__version__="2.8.1",this.__id__=g.generateID(),this._resetOptions(a),"FORM"===this.element.nodeName||g.checkAttr(this.element,this.options.namespace,"validate")&&!this.$element.is(this.options.inputs)?this.bind("parsleyForm"):this.isMultiple()?this.handleMultiple():this.bind("parsleyField")},isMultiple:function(){var a=g.getType(this.element);return"radio"===a||"checkbox"===a||"SELECT"===this.element.nodeName&&null!==this.element.getAttribute("multiple")},handleMultiple:function(){var b,c,d=this;if(this.options.multiple=this.options.multiple||(b=this.element.getAttribute("name"))||this.element.getAttribute("id"),"SELECT"===this.element.nodeName&&null!==this.element.getAttribute("multiple"))return this.options.multiple=this.options.multiple||this.__id__,this.bind("parsleyFieldMultiple");if(!this.options.multiple)return g.warn("To be bound by Parsley, a radio, a checkbox and a multiple select input must have either a name or a multiple option.",this.$element),this;this.options.multiple=this.options.multiple.replace(/(:|\.|\[|\]|\{|\}|\$)/g,""),b&&a('input[name="'+b+'"]').each(function(a,b){var c=g.getType(b);"radio"!==c&&"checkbox"!==c||b.setAttribute(d.options.namespace+"multiple",d.options.multiple)});for(var e=this._findRelated(),f=0;f<e.length;f++)if(void 0!==(c=a(e.get(f)).data("Parsley"))){this.$element.data("FieldMultiple")||c.addElement(this.$element);break}return this.bind("parsleyField",!0),c||this.bind("parsleyFieldMultiple")},bind:function(b,c){var d;switch(b){case"parsleyForm":d=a.extend(new u(this.element,this.domOptions,this.options),new i,window.ParsleyExtend)._bindFields();break;case"parsleyField":d=a.extend(new A(this.element,this.domOptions,this.options,this.parent),new i,window.ParsleyExtend);break;case"parsleyFieldMultiple":d=a.extend(new A(this.element,this.domOptions,this.options,this.parent),new B,new i,window.ParsleyExtend)._init();break;default:throw new Error(b+"is not a supported Parsley type")}return this.options.multiple&&g.setAttr(this.element,this.options.namespace,"multiple",this.options.multiple),void 0!==c?(this.$element.data("FieldMultiple",d),d):(this.$element.data("Parsley",d),d._actualizeTriggers(),d._trigger("init"),d)}};var D=a.fn.jquery.split(".");if(parseInt(D[0])<=1&&parseInt(D[1])<8)throw"The loaded version of jQuery is too old. Please upgrade to 1.8.x or better.";D.forEach||g.warn("Parsley requires ES5 to run properly. Please include https://github.com/es-shims/es5-shim");var E=_extends(new i,{element:document,$element:a(document),actualizeOptions:null,_resetOptions:null,Factory:C,version:"2.8.1"});_extends(A.prototype,s.Field,i.prototype),_extends(u.prototype,s.Form,i.prototype),_extends(C.prototype,i.prototype),a.fn.parsley=a.fn.psly=function(b){if(this.length>1){var c=[];return this.each(function(){c.push(a(this).parsley(b))}),c}if(0!=this.length)return new C(this[0],b)},void 0===window.ParsleyExtend&&(window.ParsleyExtend={}),E.options=_extends(g.objectCreate(h),window.ParsleyConfig),window.ParsleyConfig=E.options,window.Parsley=window.psly=E,E.Utils=g,window.ParsleyUtils={},a.each(g,function(a,b){"function"==typeof b&&(window.ParsleyUtils[a]=function(){return g.warnOnce("Accessing `window.ParsleyUtils` is deprecated. Use `window.Parsley.Utils` instead."),g[a].apply(g,arguments)})});var F=window.Parsley._validatorRegistry=new m(window.ParsleyConfig.validators,window.ParsleyConfig.i18n);window.ParsleyValidator={},a.each("setLocale addCatalog addMessage addMessages getErrorMessage formatMessage addValidator updateValidator removeValidator hasValidator".split(" "),function(a,b){window.Parsley[b]=function(){return F[b].apply(F,arguments)},window.ParsleyValidator[b]=function(){var a;return g.warnOnce("Accessing the method '"+b+"' through Validator is deprecated. Simply call 'window.Parsley."+b+"(...)'"),(a=window.Parsley)[b].apply(a,arguments)}}),window.Parsley.UI=s,window.ParsleyUI={removeError:function(a,b,c){var d=!0!==c;return g.warnOnce("Accessing UI is deprecated. Call 'removeError' on the instance directly. Please comment in issue 1073 as to your need to call this method."),a.removeError(b,{updateClass:d})},getErrorsMessages:function(a){return g.warnOnce("Accessing UI is deprecated. Call 'getErrorsMessages' on the instance directly."),a.getErrorsMessages()}},a.each("addError updateError".split(" "),function(a,b){window.ParsleyUI[b]=function(a,c,d,e,f){var h=!0!==f;return g.warnOnce("Accessing UI is deprecated. Call '"+b+"' on the instance directly. Please comment in issue 1073 as to your need to call this method."),a[b](c,{message:d,assert:e,updateClass:h})}}),!1!==window.ParsleyConfig.autoBind&&a(function(){a("[data-parsley-validate]").length&&a("[data-parsley-validate]").parsley()});var G=a({}),H=function(){g.warnOnce("Parsley's pubsub module is deprecated; use the 'on' and 'off' methods on parsley instances or window.Parsley")},I="parsley:";a.listen=function(a,d){var e;if(H(),"object"==typeof arguments[1]&&"function"==typeof arguments[2]&&(e=arguments[1],d=arguments[2]),"function"!=typeof d)throw new Error("Wrong parameters");window.Parsley.on(c(a),b(d,e))},a.listenTo=function(a,d,e){if(H(),!(a instanceof A||a instanceof u))throw new Error("Must give Parsley instance");if("string"!=typeof d||"function"!=typeof e)throw new Error("Wrong parameters");a.on(c(d),b(e))},a.unsubscribe=function(a,b){if(H(),"string"!=typeof a||"function"!=typeof b)throw new Error("Wrong arguments");window.Parsley.off(c(a),b.parsleyAdaptedCallback)},a.unsubscribeTo=function(a,b){if(H(),!(a instanceof A||a instanceof u))throw new Error("Must give Parsley instance");a.off(c(b))},a.unsubscribeAll=function(b){H(),window.Parsley.off(c(b)),a("form,input,textarea,select").each(function(){var d=a(this).data("Parsley");d&&d.off(c(b))})},a.emit=function(a,b){var d;H();var e=b instanceof A||b instanceof u,f=Array.prototype.slice.call(arguments,e?2:1);f.unshift(c(a)),e||(b=window.Parsley),(d=b).trigger.apply(d,_toConsumableArray(f))};return a.extend(!0,E,{asyncValidators:{default:{fn:function(a){return a.status>=200&&a.status<300},url:!1},reverse:{fn:function(a){return a.status<200||a.status>=300},url:!1}},addAsyncValidator:function(a,b,c,d){return E.asyncValidators[a]={fn:b,url:c||!1,options:d||{}},this}}),E.addValidator("remote",{requirementType:{"":"string",validator:"string",reverse:"boolean",options:"object"},validateString:function(b,c,d,e){var f,g,h={},i=d.validator||(!0===d.reverse?"reverse":"default");if(void 0===E.asyncValidators[i])throw new Error("Calling an undefined async validator: `"+i+"`");c=E.asyncValidators[i].url||c,c.indexOf("{value}")>-1?c=c.replace("{value}",encodeURIComponent(b)):h[e.element.getAttribute("name")||e.element.getAttribute("id")]=b;var j=a.extend(!0,d.options||{},E.asyncValidators[i].options);f=a.extend(!0,{},{url:c,data:h,type:"GET"},j),e.trigger("field:ajaxoptions",e,f),g=a.param(f),void 0===E._remoteCache&&(E._remoteCache={});var k=E._remoteCache[g]=E._remoteCache[g]||a.ajax(f),l=function(){var b=E.asyncValidators[i].fn.call(e,k,c,d);return b||(b=a.Deferred().reject()),a.when(b)};return k.then(l,l)},priority:-1}),E.on("form:submit",function(){E._remoteCache={}}),i.prototype.addAsyncValidator=function(){return g.warnOnce("Accessing the method `addAsyncValidator` through an instance is deprecated. Simply call `Parsley.addAsyncValidator(...)`"),E.addAsyncValidator.apply(E,arguments)},E.addMessages("en",{defaultMessage:"This value seems to be invalid.",type:{email:"This va