From 3940edc59129529ad55155644dadd0d3a932ea72 Mon Sep 17 00:00:00 2001 From: Jon Gilkison Date: Fri, 22 Sep 2017 18:12:46 +0700 Subject: [PATCH] Production asset build --- public/css/ilab-media-tools.min.css | 3 +-- public/css/ilab-media-tools.min.css.map | 1 - public/css/ilab-media-tools.settings.min.css | 3 +-- public/css/ilab-media-tools.settings.min.css.map | 1 - public/css/ilab-media-upload.min.css | 3 +-- public/css/ilab-media-upload.min.css.map | 1 - public/css/ilab-modal.min.css | 3 +-- public/css/ilab-modal.min.css.map | 1 - public/js/ilab-media-tools.js | 3 +-- public/js/ilab-media-tools.js.map | 1 - public/js/ilab-media-upload-google.js | 3 +-- public/js/ilab-media-upload-google.js.map | 1 - public/js/ilab-media-upload-s3.js | 3 +-- public/js/ilab-media-upload-s3.js.map | 1 - public/js/ilab-media-upload.js | 3 +-- public/js/ilab-media-upload.js.map | 1 - public/js/ilab-modal.js | 3 +-- public/js/ilab-modal.js.map | 1 - 18 files changed, 9 insertions(+), 27 deletions(-) delete mode 100644 public/css/ilab-media-tools.min.css.map delete mode 100644 public/css/ilab-media-tools.settings.min.css.map delete mode 100644 public/css/ilab-media-upload.min.css.map delete mode 100644 public/css/ilab-modal.min.css.map delete mode 100644 public/js/ilab-media-tools.js.map delete mode 100644 public/js/ilab-media-upload-google.js.map delete mode 100644 public/js/ilab-media-upload-s3.js.map delete mode 100644 public/js/ilab-media-upload.js.map delete mode 100644 public/js/ilab-modal.js.map diff --git a/public/css/ilab-media-tools.min.css b/public/css/ilab-media-tools.min.css index bfea9c82..110b8124 100644 --- a/public/css/ilab-media-tools.min.css +++ b/public/css/ilab-media-tools.min.css @@ -6,5 +6,4 @@ * Released under the MIT license * * Date: 2016-06-08T12:14:46.286Z - */.cropper-container{font-size:0;line-height:0;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;direction:ltr!important;-ms-touch-action:none;touch-action:none;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none}.cropper-container img{display:block;width:100%;min-width:0!important;max-width:none!important;height:100%;min-height:0!important;max-height:none!important;image-orientation:0deg!important}.cropper-canvas,.cropper-crop-box,.cropper-drag-box,.cropper-modal,.cropper-wrap-box{position:absolute;top:0;right:0;bottom:0;left:0}.cropper-wrap-box{overflow:hidden}.cropper-drag-box{opacity:0;background-color:#fff;filter:alpha(opacity=0)}.cropper-modal{opacity:.5;background-color:#000;filter:alpha(opacity=50)}.cropper-view-box{display:block;overflow:hidden;width:100%;height:100%;outline:1px solid #39f;outline-color:rgba(51,153,255,.75)}.cropper-dashed{position:absolute;display:block;opacity:.5;border:0 dashed #eee;filter:alpha(opacity=50)}.cropper-dashed.dashed-h{top:33.33333%;left:0;width:100%;height:33.33333%;border-top-width:1px;border-bottom-width:1px}.cropper-dashed.dashed-v{top:0;left:33.33333%;width:33.33333%;height:100%;border-right-width:1px;border-left-width:1px}.cropper-center{position:absolute;top:50%;left:50%;display:block;width:0;height:0;opacity:.75;filter:alpha(opacity=75)}.cropper-center:after,.cropper-center:before{position:absolute;display:block;content:" ";background-color:#eee}.cropper-center:before{top:0;left:-3px;width:7px;height:1px}.cropper-center:after{top:-3px;left:0;width:1px;height:7px}.cropper-face,.cropper-line,.cropper-point{position:absolute;display:block;width:100%;height:100%;opacity:.1;filter:alpha(opacity=10)}.cropper-face{top:0;left:0;background-color:#fff}.cropper-line{background-color:#39f}.cropper-line.line-e{top:0;right:-3px;width:5px;cursor:e-resize}.cropper-line.line-n{top:-3px;left:0;height:5px;cursor:n-resize}.cropper-line.line-w{top:0;left:-3px;width:5px;cursor:w-resize}.cropper-line.line-s{bottom:-3px;left:0;height:5px;cursor:s-resize}.cropper-point{width:5px;height:5px;opacity:.75;background-color:#39f;filter:alpha(opacity=75)}.cropper-point.point-e{top:50%;right:-3px;margin-top:-3px;cursor:e-resize}.cropper-point.point-n{top:-3px;left:50%;margin-left:-3px;cursor:n-resize}.cropper-point.point-w{top:50%;left:-3px;margin-top:-3px;cursor:w-resize}.cropper-point.point-s{bottom:-3px;left:50%;margin-left:-3px;cursor:s-resize}.cropper-point.point-ne{top:-3px;right:-3px;cursor:ne-resize}.cropper-point.point-nw{top:-3px;left:-3px;cursor:nw-resize}.cropper-point.point-sw{bottom:-3px;left:-3px;cursor:sw-resize}.cropper-point.point-se{right:-3px;bottom:-3px;width:20px;height:20px;cursor:se-resize;opacity:1;filter:alpha(opacity=100)}.cropper-point.point-se:before{position:absolute;right:-50%;bottom:-50%;display:block;width:200%;height:200%;content:" ";opacity:0;background-color:#39f;filter:alpha(opacity=0)}@media (min-width:768px){.cropper-point.point-se{width:15px;height:15px}}@media (min-width:992px){.cropper-point.point-se{width:10px;height:10px}}@media (min-width:1200px){.cropper-point.point-se{width:5px;height:5px;opacity:.75;filter:alpha(opacity=75)}}.cropper-invisible{opacity:0;filter:alpha(opacity=0)}.cropper-bg{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC")}.cropper-hide{position:absolute;display:block;width:0;height:0}.cropper-hidden{display:none!important}.cropper-move{cursor:move}.cropper-crop{cursor:crosshair}.cropper-disabled .cropper-drag-box,.cropper-disabled .cropper-face,.cropper-disabled .cropper-line,.cropper-disabled .cropper-point{cursor:not-allowed}.imgix-preview-image{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);max-width:100%;max-height:100%;display:block}.imgix-parameters-container{position:absolute;left:0;right:0;top:0;bottom:0;padding-right:20px;padding-left:10px;margin-right:4px;margin-left:10px;margin-top:10px;margin-bottom:0!important;overflow:scroll;padding-bottom:0!important}.imgix-parameters-container select{font-size:12px}.imgix-parameters-container::-webkit-scrollbar{-webkit-appearance:none;width:7px}.imgix-parameters-container::-webkit-scrollbar-thumb{border-radius:4px;background-color:rgba(0,0,0,.5)}.imgix-parameters-container h4{margin:0 -15px 15px -20px;font-size:10px;text-transform:uppercase;color:#999;background-color:#ddd;padding:5px;padding-left:20px}.imgix-parameter{padding:0!important;margin:0!important;margin-bottom:15px!important;border-bottom:1px solid rgba(0,0,0,.125)}.imgix-parameter:first-child{margin-top:15px!important}.imgix-parameter:last-child{border-bottom:0 none;margin-bottom:30px!important}.imgix-param-title{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:baseline;-ms-flex-align:baseline;align-items:baseline;margin-bottom:0}.imgix-param-title .wp-picker-input-wrap{display:none}.imgix-param-title-colortype{-webkit-box-align:center!important;-ms-flex-align:center!important;align-items:center!important}.imgix-param-title-left,.imgix-param-title-right{-webkit-box-flex:1;-ms-flex:1 50%;flex:1 50%}.imgix-param-title-right{padding-left:40px;text-align:right;position:relative}.imgix-param-title-right .wp-picker-container{position:relative}.imgix-param-title-right .wp-picker-holder{position:absolute;right:0;top:20px;z-index:1000}.imgix-param-title-right .wp-color-result{margin:0 0 8px;height:20px}.imgix-param-title-right .wp-color-result:after{line-height:20px;font-size:10px}.imgix-param-title-right .iris-picker{box-shadow:0 0 8px rgba(0,0,0,.5)}.imgix-param-title-right h3{text-align:right}.imgix-param-blend-mode h3,.imgix-param-title h3{margin-top:0;font-size:11px;text-transform:uppercase;color:#666}.imgix-media-param-title .imgix-param-title-left{-webkit-box-flex:2;-ms-flex:2 80%;flex:2 80%}.imgix-media-param-title .imgix-param-title-right{-webkit-box-flex:1;-ms-flex:1 20%;flex:1 20%}.imgix-media-param-title .imgix-param-title-right a{text-align:center!important}.imgix-param-blend-mode{margin-top:15px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:baseline;-ms-flex-align:baseline;align-items:baseline}.imgix-param-blend-mode h3{-webkit-box-flex:1;-ms-flex:1 50%;flex:1 50%}.imgix-param-blend-mode select{-webkit-box-flex:2;-ms-flex:2 100%;flex:2 100%}.imgix-parameter input[type=range]{display:block;width:100%;-webkit-appearance:none;margin:0 0 10px;background:none;padding:0!important}.imgix-parameter input[type=range]:focus{outline:none}.imgix-parameter input[type=range]:focus::-webkit-slider-runnable-track{background:#fff}.imgix-parameter input[type=range]::-webkit-slider-runnable-track{width:100%;height:5px;cursor:pointer;animate:.2s;box-shadow:inset 1px 1px 2px 0 rgba(0,0,0,.25);background:#d4cfd4;border-radius:4px;border:0 solid #000101}.imgix-parameter input[type=range]::-webkit-slider-thumb{border:1px solid rgba(0,0,0,.25);box-shadow:inset 0 2px 2px 0 hsla(0,0%,100%,.5);height:17px;width:17px;border-radius:9px;background:#dcdcdc;cursor:pointer;-webkit-appearance:none;margin-top:-6px}.imgix-parameter input[type=range]::-moz-range-track{width:100%;height:5px;cursor:pointer;animate:.2s;box-shadow:inset 1px 1px 2px 0 rgba(0,0,0,.25);background:#d4cfd4;border-radius:4px;border:0 solid #000101}.imgix-parameter input[type=range]::-moz-range-thumb{border:1px solid rgba(0,0,0,.25);box-shadow:inset 0 2px 2px 0 hsla(0,0%,100%,.5);height:17px;width:17px;border-radius:9px;background:#dcdcdc;cursor:pointer;-webkit-appearance:none;margin-top:-6px}.imgix-parameter a.imgix-param-reset{font-size:11px;display:block;width:100%;text-align:right;font-style:italic;margin-bottom:10px;text-decoration:none}.imgix-parameter a.imgix-param-reset,.imgix-parameter a:focus{outline:none!important;border:0 none!important}.imgix-media-preview{position:relative;padding:0!important;margin:0!important;padding-bottom:100%!important;background-image:url(../img/ilab-imgix-edit-bg.png);width:100%}.imgix-media-preview img{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);max-width:100%;max-height:100%;display:block}.imgix-media-preview-inner{position:absolute;left:0;right:0;bottom:0;top:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.imgix-alignment-container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:row;-ms-flex:row;flex:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:distribute;justify-content:space-around;-webkit-box-align:baseline;-ms-flex-align:baseline;align-items:baseline;padding:0 35px}.imgix-alignment-button{background-color:#ddd;display:block;width:60px;height:60px;margin:5px;text-decoration:none;border-radius:4px;border:1px solid #888;box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.15)!important}.selected-alignment{background-color:#bbb;box-shadow:inset 1px 1px 1px rgba(0,0,0,.25),0 1px 0 rgba(0,0,0,.15)!important}.imgix-pill-enhance{background-image:url(../img/ilab-imgix-magic-wand-black.png);background-repeat:no-repeat;background-position:12px 8px;padding-left:40px;background-size:20px 20px}.imgix-pill-enhance.pill-selected{background-image:url(../img/ilab-imgix-magic-wand-white.png)}.imgix-pill-redeye{background-image:url(../img/ilab-imgix-red-eye-black.png);background-repeat:no-repeat;background-position:12px 8px;padding-left:40px;background-size:20px 20px}.imgix-pill-redeye.pill-selected{background-image:url(../img/ilab-imgix-red-eye-white.png)}.imgix-preset-make-default-container{min-height:30px}.imgix-preset-container,.imgix-preset-make-default-container{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex}.imgix-preset-container.is-hidden,.imgix-preset-make-default-container.is-hidden{display:none}.imgix-param-label{font-style:italic}.imgix-label-editor{position:absolute;right:-4px;top:0;width:40px;font-size:11px;padding:1px;text-align:right}.ilab-crop-preview{overflow:hidden}.ilab-crop-now-wrapper{margin-top:12px}.ilabc-cropper{max-width:100%;max-height:100%}.ilabm-sidebar-content-cropper{-webkit-box-orient:vertical!important;-webkit-box-direction:normal!important;-ms-flex-direction:column!important;flex-direction:column!important;padding:10px;overflow:scroll}.ilabm-sidebar-content-cropper h3{margin-top:0;font-size:11px;text-transform:uppercase;color:#888;font-weight:700}.cropper-dashed.dashed-h{top:38.4615385%;height:23.076923%}.cropper-dashed.dashed-v{left:38.4615385%;width:23.076923%}.ilabc-current-crop-container{background-image:url(../img/ilab-imgix-edit-bg.png);text-align:center;margin-bottom:15px}.ilab-current-crop-img{padding:0!important;margin:0!important;margin-bottom:-4px!important;max-width:100%;height:auto} -/*# sourceMappingURL=ilab-media-tools.min.css.map */ + */.cropper-container{font-size:0;line-height:0;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;direction:ltr!important;-ms-touch-action:none;touch-action:none;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none}.cropper-container img{display:block;width:100%;min-width:0!important;max-width:none!important;height:100%;min-height:0!important;max-height:none!important;image-orientation:0deg!important}.cropper-canvas,.cropper-crop-box,.cropper-drag-box,.cropper-modal,.cropper-wrap-box{position:absolute;top:0;right:0;bottom:0;left:0}.cropper-wrap-box{overflow:hidden}.cropper-drag-box{opacity:0;background-color:#fff;filter:alpha(opacity=0)}.cropper-modal{opacity:.5;background-color:#000;filter:alpha(opacity=50)}.cropper-view-box{display:block;overflow:hidden;width:100%;height:100%;outline:1px solid #39f;outline-color:rgba(51,153,255,.75)}.cropper-dashed{position:absolute;display:block;opacity:.5;border:0 dashed #eee;filter:alpha(opacity=50)}.cropper-dashed.dashed-h{top:33.33333%;left:0;width:100%;height:33.33333%;border-top-width:1px;border-bottom-width:1px}.cropper-dashed.dashed-v{top:0;left:33.33333%;width:33.33333%;height:100%;border-right-width:1px;border-left-width:1px}.cropper-center{position:absolute;top:50%;left:50%;display:block;width:0;height:0;opacity:.75;filter:alpha(opacity=75)}.cropper-center:after,.cropper-center:before{position:absolute;display:block;content:" ";background-color:#eee}.cropper-center:before{top:0;left:-3px;width:7px;height:1px}.cropper-center:after{top:-3px;left:0;width:1px;height:7px}.cropper-face,.cropper-line,.cropper-point{position:absolute;display:block;width:100%;height:100%;opacity:.1;filter:alpha(opacity=10)}.cropper-face{top:0;left:0;background-color:#fff}.cropper-line{background-color:#39f}.cropper-line.line-e{top:0;right:-3px;width:5px;cursor:e-resize}.cropper-line.line-n{top:-3px;left:0;height:5px;cursor:n-resize}.cropper-line.line-w{top:0;left:-3px;width:5px;cursor:w-resize}.cropper-line.line-s{bottom:-3px;left:0;height:5px;cursor:s-resize}.cropper-point{width:5px;height:5px;opacity:.75;background-color:#39f;filter:alpha(opacity=75)}.cropper-point.point-e{top:50%;right:-3px;margin-top:-3px;cursor:e-resize}.cropper-point.point-n{top:-3px;left:50%;margin-left:-3px;cursor:n-resize}.cropper-point.point-w{top:50%;left:-3px;margin-top:-3px;cursor:w-resize}.cropper-point.point-s{bottom:-3px;left:50%;margin-left:-3px;cursor:s-resize}.cropper-point.point-ne{top:-3px;right:-3px;cursor:ne-resize}.cropper-point.point-nw{top:-3px;left:-3px;cursor:nw-resize}.cropper-point.point-sw{bottom:-3px;left:-3px;cursor:sw-resize}.cropper-point.point-se{right:-3px;bottom:-3px;width:20px;height:20px;cursor:se-resize;opacity:1;filter:alpha(opacity=100)}.cropper-point.point-se:before{position:absolute;right:-50%;bottom:-50%;display:block;width:200%;height:200%;content:" ";opacity:0;background-color:#39f;filter:alpha(opacity=0)}@media (min-width:768px){.cropper-point.point-se{width:15px;height:15px}}@media (min-width:992px){.cropper-point.point-se{width:10px;height:10px}}@media (min-width:1200px){.cropper-point.point-se{width:5px;height:5px;opacity:.75;filter:alpha(opacity=75)}}.cropper-invisible{opacity:0;filter:alpha(opacity=0)}.cropper-bg{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC")}.cropper-hide{position:absolute;display:block;width:0;height:0}.cropper-hidden{display:none!important}.cropper-move{cursor:move}.cropper-crop{cursor:crosshair}.cropper-disabled .cropper-drag-box,.cropper-disabled .cropper-face,.cropper-disabled .cropper-line,.cropper-disabled .cropper-point{cursor:not-allowed}.imgix-preview-image{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);max-width:100%;max-height:100%;display:block}.imgix-parameters-container{position:absolute;left:0;right:0;top:0;bottom:0;padding-right:20px;padding-left:10px;margin-right:4px;margin-left:10px;margin-top:10px;margin-bottom:0!important;overflow:scroll;padding-bottom:0!important}.imgix-parameters-container select{font-size:12px}.imgix-parameters-container::-webkit-scrollbar{-webkit-appearance:none;width:7px}.imgix-parameters-container::-webkit-scrollbar-thumb{border-radius:4px;background-color:rgba(0,0,0,.5)}.imgix-parameters-container h4{margin:0 -15px 15px -20px;font-size:10px;text-transform:uppercase;color:#999;background-color:#ddd;padding:5px;padding-left:20px}.imgix-parameter{padding:0!important;margin:0!important;margin-bottom:15px!important;border-bottom:1px solid rgba(0,0,0,.125)}.imgix-parameter:first-child{margin-top:15px!important}.imgix-parameter:last-child{border-bottom:0 none;margin-bottom:30px!important}.imgix-param-title{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:baseline;-ms-flex-align:baseline;align-items:baseline;margin-bottom:0}.imgix-param-title .wp-picker-input-wrap{display:none}.imgix-param-title-colortype{-webkit-box-align:center!important;-ms-flex-align:center!important;align-items:center!important}.imgix-param-title-left,.imgix-param-title-right{-webkit-box-flex:1;-ms-flex:1 50%;flex:1 50%}.imgix-param-title-right{padding-left:40px;text-align:right;position:relative}.imgix-param-title-right .wp-picker-container{position:relative}.imgix-param-title-right .wp-picker-holder{position:absolute;right:0;top:20px;z-index:1000}.imgix-param-title-right .wp-color-result{margin:0 0 8px;height:20px}.imgix-param-title-right .wp-color-result:after{line-height:20px;font-size:10px}.imgix-param-title-right .iris-picker{box-shadow:0 0 8px rgba(0,0,0,.5)}.imgix-param-title-right h3{text-align:right}.imgix-param-blend-mode h3,.imgix-param-title h3{margin-top:0;font-size:11px;text-transform:uppercase;color:#666}.imgix-media-param-title .imgix-param-title-left{-webkit-box-flex:2;-ms-flex:2 80%;flex:2 80%}.imgix-media-param-title .imgix-param-title-right{-webkit-box-flex:1;-ms-flex:1 20%;flex:1 20%}.imgix-media-param-title .imgix-param-title-right a{text-align:center!important}.imgix-param-blend-mode{margin-top:15px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:baseline;-ms-flex-align:baseline;align-items:baseline}.imgix-param-blend-mode h3{-webkit-box-flex:1;-ms-flex:1 50%;flex:1 50%}.imgix-param-blend-mode select{-webkit-box-flex:2;-ms-flex:2 100%;flex:2 100%}.imgix-parameter input[type=range]{display:block;width:100%;-webkit-appearance:none;margin:0 0 10px;background:none;padding:0!important}.imgix-parameter input[type=range]:focus{outline:none}.imgix-parameter input[type=range]:focus::-webkit-slider-runnable-track{background:#fff}.imgix-parameter input[type=range]::-webkit-slider-runnable-track{width:100%;height:5px;cursor:pointer;animate:.2s;box-shadow:inset 1px 1px 2px 0 rgba(0,0,0,.25);background:#d4cfd4;border-radius:4px;border:0 solid #000101}.imgix-parameter input[type=range]::-webkit-slider-thumb{border:1px solid rgba(0,0,0,.25);box-shadow:inset 0 2px 2px 0 hsla(0,0%,100%,.5);height:17px;width:17px;border-radius:9px;background:#dcdcdc;cursor:pointer;-webkit-appearance:none;margin-top:-6px}.imgix-parameter input[type=range]::-moz-range-track{width:100%;height:5px;cursor:pointer;animate:.2s;box-shadow:inset 1px 1px 2px 0 rgba(0,0,0,.25);background:#d4cfd4;border-radius:4px;border:0 solid #000101}.imgix-parameter input[type=range]::-moz-range-thumb{border:1px solid rgba(0,0,0,.25);box-shadow:inset 0 2px 2px 0 hsla(0,0%,100%,.5);height:17px;width:17px;border-radius:9px;background:#dcdcdc;cursor:pointer;-webkit-appearance:none;margin-top:-6px}.imgix-parameter a.imgix-param-reset{font-size:11px;display:block;width:100%;text-align:right;font-style:italic;margin-bottom:10px;text-decoration:none}.imgix-parameter a.imgix-param-reset,.imgix-parameter a:focus{outline:none!important;border:0 none!important}.imgix-media-preview{position:relative;padding:0!important;margin:0!important;padding-bottom:100%!important;background-image:url(../img/ilab-imgix-edit-bg.png);width:100%}.imgix-media-preview img{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);max-width:100%;max-height:100%;display:block}.imgix-media-preview-inner{position:absolute;left:0;right:0;bottom:0;top:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.imgix-alignment-container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:row;-ms-flex:row;flex:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:distribute;justify-content:space-around;-webkit-box-align:baseline;-ms-flex-align:baseline;align-items:baseline;padding:0 35px}.imgix-alignment-button{background-color:#ddd;display:block;width:60px;height:60px;margin:5px;text-decoration:none;border-radius:4px;border:1px solid #888;box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.15)!important}.selected-alignment{background-color:#bbb;box-shadow:inset 1px 1px 1px rgba(0,0,0,.25),0 1px 0 rgba(0,0,0,.15)!important}.imgix-pill-enhance{background-image:url(../img/ilab-imgix-magic-wand-black.png);background-repeat:no-repeat;background-position:12px 8px;padding-left:40px;background-size:20px 20px}.imgix-pill-enhance.pill-selected{background-image:url(../img/ilab-imgix-magic-wand-white.png)}.imgix-pill-redeye{background-image:url(../img/ilab-imgix-red-eye-black.png);background-repeat:no-repeat;background-position:12px 8px;padding-left:40px;background-size:20px 20px}.imgix-pill-redeye.pill-selected{background-image:url(../img/ilab-imgix-red-eye-white.png)}.imgix-preset-make-default-container{min-height:30px}.imgix-preset-container,.imgix-preset-make-default-container{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex}.imgix-preset-container.is-hidden,.imgix-preset-make-default-container.is-hidden{display:none}.imgix-param-label{font-style:italic}.imgix-label-editor{position:absolute;right:-4px;top:0;width:40px;font-size:11px;padding:1px;text-align:right}.ilab-crop-preview{overflow:hidden}.ilab-crop-now-wrapper{margin-top:12px}.ilabc-cropper{max-width:100%;max-height:100%}.ilabm-sidebar-content-cropper{-webkit-box-orient:vertical!important;-webkit-box-direction:normal!important;-ms-flex-direction:column!important;flex-direction:column!important;padding:10px;overflow:scroll}.ilabm-sidebar-content-cropper h3{margin-top:0;font-size:11px;text-transform:uppercase;color:#888;font-weight:700}.cropper-dashed.dashed-h{top:38.4615385%;height:23.076923%}.cropper-dashed.dashed-v{left:38.4615385%;width:23.076923%}.ilabc-current-crop-container{background-image:url(../img/ilab-imgix-edit-bg.png);text-align:center;margin-bottom:15px}.ilab-current-crop-img{padding:0!important;margin:0!important;margin-bottom:-4px!important;max-width:100%;height:auto} \ No newline at end of file diff --git a/public/css/ilab-media-tools.min.css.map b/public/css/ilab-media-tools.min.css.map deleted file mode 100644 index f15a8221..00000000 --- a/public/css/ilab-media-tools.min.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../vendor/cropper/dist/cropper.css","../styles/tools/ilab-imgix.scss","../styles/tools/ilab-crop.scss"],"names":[],"mappings":"AAAA;;;;;;;;GAQA,AACA,mBACA,YAAA,AACA,cAAA,AAEA,kBAAA,AAEA,yBAAA,AACA,sBAAA,AACA,qBAAA,AACA,iBAAA,AAEA,wBAAA,AACA,sBAAA,AACA,kBAAA,AACA,wCAAA,AACA,0BAAA,CACA,AAEA,uBACA,cAAA,AAEA,WAAA,AACA,sBAAA,AACA,yBAAA,AACA,YAAA,AACA,uBAAA,AACA,0BAAA,AAEA,gCAAA,CACA,AAEA,qFAKA,kBAAA,AACA,MAAA,AACA,QAAA,AACA,SAAA,AACA,MAAA,CACA,AAEA,kBACA,eAAA,CACA,AAEA,kBACA,UAAA,AACA,sBAAA,AAEA,uBAAA,CACA,AAEA,eACA,WAAA,AACA,sBAAA,AAEA,wBAAA,CACA,AAEA,kBACA,cAAA,AACA,gBAAA,AAEA,WAAA,AACA,YAAA,AAEA,uBAAA,AACA,kCAAA,CACA,AAEA,gBACA,kBAAA,AAEA,cAAA,AAEA,WAAA,AACA,qBAAA,AAEA,wBAAA,CACA,AAEA,yBACA,cAAA,AACA,OAAA,AAEA,WAAA,AACA,iBAAA,AAEA,qBAAA,AACA,uBAAA,CACA,AAEA,yBACA,MAAA,AACA,eAAA,AAEA,gBAAA,AACA,YAAA,AAEA,uBAAA,AACA,qBAAA,CACA,AAEA,gBACA,kBAAA,AACA,QAAA,AACA,SAAA,AAEA,cAAA,AAEA,QAAA,AACA,SAAA,AAEA,YAAA,AAEA,wBAAA,CACA,AAEA,6CAEA,kBAAA,AAEA,cAAA,AAEA,YAAA,AAEA,qBAAA,CACA,AAEA,uBACA,MAAA,AACA,UAAA,AAEA,UAAA,AACA,UAAA,CACA,AAEA,sBACA,SAAA,AACA,OAAA,AAEA,UAAA,AACA,UAAA,CACA,AAEA,2CAGA,kBAAA,AAEA,cAAA,AAEA,WAAA,AACA,YAAA,AAEA,WAAA,AAEA,wBAAA,CACA,AAEA,cACA,MAAA,AACA,OAAA,AAEA,qBAAA,CACA,AAEA,cACA,qBAAA,CACA,AAEA,qBACA,MAAA,AACA,WAAA,AAEA,UAAA,AAEA,eAAA,CACA,AAEA,qBACA,SAAA,AACA,OAAA,AAEA,WAAA,AAEA,eAAA,CACA,AAEA,qBACA,MAAA,AACA,UAAA,AAEA,UAAA,AAEA,eAAA,CACA,AAEA,qBACA,YAAA,AACA,OAAA,AAEA,WAAA,AAEA,eAAA,CACA,AAEA,eACA,UAAA,AACA,WAAA,AAEA,YAAA,AACA,sBAAA,AAEA,wBAAA,CACA,AAEA,uBACA,QAAA,AACA,WAAA,AAEA,gBAAA,AAEA,eAAA,CACA,AAEA,uBACA,SAAA,AACA,SAAA,AAEA,iBAAA,AAEA,eAAA,CACA,AAEA,uBACA,QAAA,AACA,UAAA,AAEA,gBAAA,AAEA,eAAA,CACA,AAEA,uBACA,YAAA,AACA,SAAA,AAEA,iBAAA,AAEA,eAAA,CACA,AAEA,wBACA,SAAA,AACA,WAAA,AAEA,gBAAA,CACA,AAEA,wBACA,SAAA,AACA,UAAA,AAEA,gBAAA,CACA,AAEA,wBACA,YAAA,AACA,UAAA,AAEA,gBAAA,CACA,AAEA,wBACA,WAAA,AACA,YAAA,AAEA,WAAA,AACA,YAAA,AAEA,iBAAA,AAEA,UAAA,AAEA,yBAAA,CACA,AAEA,+BACA,kBAAA,AACA,WAAA,AACA,YAAA,AAEA,cAAA,AAEA,WAAA,AACA,YAAA,AAEA,YAAA,AAEA,UAAA,AACA,sBAAA,AAEA,uBAAA,CACA,AAEA,yBACA,wBACA,WAAA,AACA,WAAA,CACA,CACA,AAEA,yBACA,wBACA,WAAA,AACA,WAAA,CACA,CACA,AAEA,0BACA,wBACA,UAAA,AACA,WAAA,AAEA,YAAA,AAEA,wBAAA,CACA,CACA,AAEA,mBACA,UAAA,AAEA,uBAAA,CACA,AAEA,YACA,8QAAA,CACA,AAEA,cACA,kBAAA,AAEA,cAAA,AAEA,QAAA,AACA,QAAA,CACA,AAEA,gBACA,sBAAA,CACA,AAEA,cACA,WAAA,CACA,AAEA,cACA,gBAAA,CACA,AAEA,qIAIA,kBAAA,CACA,AC1XA,qBACE,kBAAmB,AACnB,QAAS,AACT,SAAU,AACV,uCAA4B,AAC5B,+BAAoB,AACpB,eAAgB,AAChB,gBAAiB,AACjB,aAAe,CAChB,AAED,4BACE,kBAAmB,AACnB,OAAS,AAAE,QAAU,AAAE,MAAQ,AAAE,SAAY,AAC7C,mBAAoB,AACpB,kBAAkB,AAClB,iBAAkB,AAClB,iBAAkB,AAClB,gBAAiB,AACjB,0BAA8B,AAC9B,gBAAiB,AACjB,0BAAgC,CA4BjC,AAtCD,mCAaI,cAAgB,CACjB,AAdH,+CAiBI,wBAAyB,AACzB,SAAW,CACZ,AAnBH,qDAsBI,kBAAmB,AACnB,+BAAsB,CACvB,AAxBH,+BA2BI,0BAAkB,AAIlB,eAAgB,AAChB,yBAA0B,AAC1B,WAAY,AACZ,sBAAuB,AACvB,YAAa,AACb,iBAAmB,CACpB,AAGH,iBACE,oBAAuB,AACvB,mBAAsB,AACtB,6BAA+B,AAC/B,wCAA6B,CAW9B,AAfD,6BAOI,yBAA2B,CAC5B,AARH,4BAWI,qBAAwB,AACxB,4BAA+B,CAChC,AAIH,mBACE,oBAAc,AAAd,oBAAc,AAAd,aAAc,AACd,2BAAsB,AAAtB,wBAAsB,AAAtB,qBAAsB,AACtB,eAAmB,CAKpB,AARD,yCAMI,YAAc,CACf,AAGH,6BACE,mCAA+B,AAA/B,gCAA+B,AAA/B,4BAA+B,CAChC,AAMD,iDAHE,mBAAY,AAAZ,eAAY,AAAZ,UAAY,CAGd,AAkCC,yBAhCC,kBAAmB,AACnB,iBAAiB,AACjB,iBAAmB,CA8BpB,AAlCD,8CAOI,iBAAmB,CACpB,AARH,2CAWI,kBAAmB,AACnB,QAAW,AACX,SAAU,AACV,YAAc,CACf,AAfH,0CAkBI,eAAsB,AACtB,WAAa,CAMd,AAzBH,gDAsBM,iBAAiB,AACjB,cAAe,CAChB,AAxBL,sCA4BI,iCAA4B,CAC7B,AA7BH,4BAgCI,gBAAkB,CACnB,AAGH,iDACE,aAAe,AACf,eAAgB,AAChB,yBAA0B,AAC1B,UAAY,CACb,AAED,iDAEI,mBAAY,AAAZ,eAAY,AAAZ,UAAY,CACb,AAHH,kDAMI,mBAAY,AAAZ,eAAY,AAAZ,UAAY,CAIb,AAVH,oDAQM,2BAA8B,CAC/B,AAIL,wBACE,gBAAiB,AACjB,oBAAc,AAAd,oBAAc,AAAd,aAAc,AACd,2BAAsB,AAAtB,wBAAsB,AAAtB,oBAAsB,CASvB,AAZD,2BAMI,mBAAY,AAAZ,eAAY,AAAZ,UAAY,CACb,AAPH,+BAUI,mBAAa,AAAb,gBAAa,AAAb,WAAa,CACd,AAGH,mCAEI,cAAe,AACf,WAAY,AACZ,wBAAyB,AACzB,gBAAmB,AACnB,gBAAiB,AACjB,mBAAwB,CAuDzB,AA9DH,yCAUM,YAAc,CAKf,AAfL,wEAaQ,eAAoB,CACrB,AAdP,kEAkBM,WAAY,AACZ,WAAY,AACZ,eAAgB,AAChB,YAAc,AACd,+CAAsC,AACtC,mBAAoB,AACpB,kBAAmB,AACnB,sBAA0B,CAC3B,AA1BL,yDA6BM,iCAAsB,AACtB,gDAAsC,AACtC,YAAa,AACb,WAAY,AACZ,kBAAmB,AACnB,mBAAoB,AACpB,eAAgB,AAChB,wBAAyB,AACzB,eAAiB,CAClB,AAtCL,qDAyCM,WAAY,AACZ,WAAY,AACZ,eAAgB,AAChB,YAAc,AACd,+CAAsC,AACtC,mBAAoB,AACpB,kBAAmB,AACnB,sBAA0B,CAC3B,AAjDL,qDAoDM,iCAAsB,AACtB,gDAAsC,AACtC,YAAa,AACb,WAAY,AACZ,kBAAmB,AACnB,mBAAoB,AACpB,eAAgB,AAChB,wBAAyB,AACzB,eAAiB,CAClB,AA7DL,qCAiEI,eAAgB,AAChB,cAAc,AACd,WAAY,AACZ,iBAAiB,AACjB,kBAAmB,AACnB,mBAAoB,AAGpB,oBAAsB,CACvB,AA1EH,8DAuEI,uBAAyB,AACzB,uBAA2B,CAO5B,AAGH,qBACE,kBAAkB,AAClB,oBAAuB,AACvB,mBAAuB,AACvB,8BAA+B,AAC/B,oDAAoD,AACpD,UAAW,CAWZ,AAjBD,yBASI,kBAAmB,AACnB,QAAS,AACT,SAAU,AACV,uCAAmB,AAAnB,+BAAmB,AACnB,eAAgB,AAChB,gBAAiB,AACjB,aAAe,CAChB,AAGH,2BACE,kBAAkB,AAClB,OAAS,AAAE,QAAU,AAAE,SAAW,AAAE,MAAQ,AAC5C,oBAAc,AAAd,oBAAc,AAAd,aAAc,AACd,yBAAoB,AAApB,sBAAoB,AAApB,mBAAoB,AACpB,wBAAwB,AAAxB,qBAAwB,AAAxB,sBAAwB,CACzB,AAED,2BACE,oBAAc,AAAd,oBAAc,AAAd,aAAc,AACd,qBAAU,AAAV,aAAU,AAAV,SAAU,AACV,mBAAgB,AAAhB,eAAgB,AAChB,yBAA8B,AAA9B,6BAA8B,AAC9B,2BAAsB,AAAtB,wBAAsB,AAAtB,qBAAsB,AACtB,cAAiB,CAClB,AAED,wBACE,sBAAuB,AACvB,cAAe,AACf,WAAY,AACZ,YAAa,AACb,WAAgB,AAChB,qBAAqB,AACrB,kBAAmB,AACnB,sBAAsB,AAEtB,+DAAyE,CAC1E,AAED,oBACE,sBAAuB,AACvB,8EAAsF,CACvF,AACD,oBACE,6DAA6D,AAC7D,4BAA6B,AAC7B,6BAA8B,AAC9B,kBAAmB,AACnB,yBAA2B,CAC5B,AAED,kCACE,4DAA6D,CAC9D,AAED,mBACE,0DAA0D,AAC1D,4BAA6B,AAC7B,6BAA8B,AAC9B,kBAAmB,AACnB,yBAA2B,CAC5B,AAED,iCACE,yDAA0D,CAC3D,AAED,qCAGE,eAAgB,CACjB,AAED,6DALE,yBAAoB,AAApB,sBAAoB,AAApB,mBAAoB,AACpB,oBAAc,AAAd,oBAAc,AAAd,YAAc,CAOf,AAED,iFACE,YAAc,CACf,AAGD,mBAEE,iBAAkB,CACnB,AAED,oBACE,kBAAmB,AACnB,WAAY,AACZ,MAAS,AACT,WAAY,AACZ,eAAgB,AAChB,YAAa,AACb,gBAAkB,CACnB,ACxVD,mBACE,eAAiB,CAClB,AAED,uBACE,eAAiB,CAClB,AAED,eACE,eAAgB,AAChB,eAAiB,CAClB,AAED,+BACE,sCAAkC,AAAlC,uCAAkC,AAAlC,oCAAkC,AAAlC,gCAAkC,AAClC,aAA6B,AAE7B,eAAgB,CASjB,AAbD,kCAOI,aAAe,AACf,eAAgB,AAChB,yBAA0B,AAC1B,WAAY,AACZ,eAAkB,CACnB,AAGH,yBACE,gBAAiB,AACjB,iBAAmB,CACpB,AAED,yBACE,iBAAkB,AAClB,gBAAkB,CACnB,AAED,8BACE,oDAAoD,AACpD,kBAAkB,AAClB,kBAAoB,CACrB,AAED,uBACE,oBAAuB,AACvB,mBAAsB,AACtB,6BAA8B,AAC9B,eAAe,AACf,WAAY,CACb","file":"ilab-media-tools.min.css","sourcesContent":["/*!\n * Cropper v2.3.2\n * https://github.com/fengyuanchen/cropper\n *\n * Copyright (c) 2014-2016 Fengyuan Chen and contributors\n * Released under the MIT license\n *\n * Date: 2016-06-08T12:14:46.286Z\n */\n.cropper-container {\n font-size: 0;\n line-height: 0;\n\n position: relative;\n\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n\n direction: ltr !important;\n -ms-touch-action: none;\n touch-action: none;\n -webkit-tap-highlight-color: transparent;\n -webkit-touch-callout: none;\n}\n\n.cropper-container img {\n display: block;\n\n width: 100%;\n min-width: 0 !important;\n max-width: none !important;\n height: 100%;\n min-height: 0 !important;\n max-height: none !important;\n\n image-orientation: 0deg !important;\n}\n\n.cropper-wrap-box,\n.cropper-canvas,\n.cropper-drag-box,\n.cropper-crop-box,\n.cropper-modal {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n}\n\n.cropper-wrap-box {\n overflow: hidden;\n}\n\n.cropper-drag-box {\n opacity: 0;\n background-color: #fff;\n\n filter: alpha(opacity=0);\n}\n\n.cropper-modal {\n opacity: .5;\n background-color: #000;\n\n filter: alpha(opacity=50);\n}\n\n.cropper-view-box {\n display: block;\n overflow: hidden;\n\n width: 100%;\n height: 100%;\n\n outline: 1px solid #39f;\n outline-color: rgba(51, 153, 255, .75);\n}\n\n.cropper-dashed {\n position: absolute;\n\n display: block;\n\n opacity: .5;\n border: 0 dashed #eee;\n\n filter: alpha(opacity=50);\n}\n\n.cropper-dashed.dashed-h {\n top: 33.33333%;\n left: 0;\n\n width: 100%;\n height: 33.33333%;\n\n border-top-width: 1px;\n border-bottom-width: 1px;\n}\n\n.cropper-dashed.dashed-v {\n top: 0;\n left: 33.33333%;\n\n width: 33.33333%;\n height: 100%;\n\n border-right-width: 1px;\n border-left-width: 1px;\n}\n\n.cropper-center {\n position: absolute;\n top: 50%;\n left: 50%;\n\n display: block;\n\n width: 0;\n height: 0;\n\n opacity: .75;\n\n filter: alpha(opacity=75);\n}\n\n.cropper-center:before,\n.cropper-center:after {\n position: absolute;\n\n display: block;\n\n content: ' ';\n\n background-color: #eee;\n}\n\n.cropper-center:before {\n top: 0;\n left: -3px;\n\n width: 7px;\n height: 1px;\n}\n\n.cropper-center:after {\n top: -3px;\n left: 0;\n\n width: 1px;\n height: 7px;\n}\n\n.cropper-face,\n.cropper-line,\n.cropper-point {\n position: absolute;\n\n display: block;\n\n width: 100%;\n height: 100%;\n\n opacity: .1;\n\n filter: alpha(opacity=10);\n}\n\n.cropper-face {\n top: 0;\n left: 0;\n\n background-color: #fff;\n}\n\n.cropper-line {\n background-color: #39f;\n}\n\n.cropper-line.line-e {\n top: 0;\n right: -3px;\n\n width: 5px;\n\n cursor: e-resize;\n}\n\n.cropper-line.line-n {\n top: -3px;\n left: 0;\n\n height: 5px;\n\n cursor: n-resize;\n}\n\n.cropper-line.line-w {\n top: 0;\n left: -3px;\n\n width: 5px;\n\n cursor: w-resize;\n}\n\n.cropper-line.line-s {\n bottom: -3px;\n left: 0;\n\n height: 5px;\n\n cursor: s-resize;\n}\n\n.cropper-point {\n width: 5px;\n height: 5px;\n\n opacity: .75;\n background-color: #39f;\n\n filter: alpha(opacity=75);\n}\n\n.cropper-point.point-e {\n top: 50%;\n right: -3px;\n\n margin-top: -3px;\n\n cursor: e-resize;\n}\n\n.cropper-point.point-n {\n top: -3px;\n left: 50%;\n\n margin-left: -3px;\n\n cursor: n-resize;\n}\n\n.cropper-point.point-w {\n top: 50%;\n left: -3px;\n\n margin-top: -3px;\n\n cursor: w-resize;\n}\n\n.cropper-point.point-s {\n bottom: -3px;\n left: 50%;\n\n margin-left: -3px;\n\n cursor: s-resize;\n}\n\n.cropper-point.point-ne {\n top: -3px;\n right: -3px;\n\n cursor: ne-resize;\n}\n\n.cropper-point.point-nw {\n top: -3px;\n left: -3px;\n\n cursor: nw-resize;\n}\n\n.cropper-point.point-sw {\n bottom: -3px;\n left: -3px;\n\n cursor: sw-resize;\n}\n\n.cropper-point.point-se {\n right: -3px;\n bottom: -3px;\n\n width: 20px;\n height: 20px;\n\n cursor: se-resize;\n\n opacity: 1;\n\n filter: alpha(opacity=100);\n}\n\n.cropper-point.point-se:before {\n position: absolute;\n right: -50%;\n bottom: -50%;\n\n display: block;\n\n width: 200%;\n height: 200%;\n\n content: ' ';\n\n opacity: 0;\n background-color: #39f;\n\n filter: alpha(opacity=0);\n}\n\n@media (min-width: 768px) {\n .cropper-point.point-se {\n width: 15px;\n height: 15px;\n }\n}\n\n@media (min-width: 992px) {\n .cropper-point.point-se {\n width: 10px;\n height: 10px;\n }\n}\n\n@media (min-width: 1200px) {\n .cropper-point.point-se {\n width: 5px;\n height: 5px;\n\n opacity: .75;\n\n filter: alpha(opacity=75);\n }\n}\n\n.cropper-invisible {\n opacity: 0;\n\n filter: alpha(opacity=0);\n}\n\n.cropper-bg {\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC');\n}\n\n.cropper-hide {\n position: absolute;\n\n display: block;\n\n width: 0;\n height: 0;\n}\n\n.cropper-hidden {\n display: none !important;\n}\n\n.cropper-move {\n cursor: move;\n}\n\n.cropper-crop {\n cursor: crosshair;\n}\n\n.cropper-disabled .cropper-drag-box,\n.cropper-disabled .cropper-face,\n.cropper-disabled .cropper-line,\n.cropper-disabled .cropper-point {\n cursor: not-allowed;\n}\n",".imgix-preview-image {\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%,-50%);\n transform: translate(-50%, -50%);\n max-width: 100%;\n max-height: 100%;\n display: block;\n}\n\n.imgix-parameters-container {\n position: absolute;\n left:0px; right:0px; top:0px; bottom: 0px;\n padding-right: 20px;\n padding-left:10px;\n margin-right: 4px;\n margin-left: 10px;\n margin-top: 10px;\n margin-bottom: 0px !important;\n overflow: scroll;\n padding-bottom: 0px !important;\n\n select {\n font-size: 12px;\n }\n\n &::-webkit-scrollbar {\n -webkit-appearance: none;\n width: 7px;\n }\n\n &::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background-color: rgba(0,0,0,.5);\n }\n\n h4 {\n margin-left:-20px;\n margin-right:-15px;\n margin-bottom:15px;\n margin-top: 0px;\n font-size: 10px;\n text-transform: uppercase;\n color: #999;\n background-color: #ddd;\n padding: 5px;\n padding-left: 20px;\n }\n}\n\n.imgix-parameter {\n padding:0px !important;\n margin:0px !important;\n margin-bottom: 15px !important;\n border-bottom: 1px solid rgba(0,0,0,0.125);\n\n &:first-child {\n margin-top:15px !important;\n }\n\n &:last-child {\n border-bottom: 0px none;\n margin-bottom: 30px !important;\n }\n\n}\n\n.imgix-param-title {\n display: flex;\n align-items: baseline;\n margin-bottom: 0px;\n\n .wp-picker-input-wrap {\n display: none;\n }\n}\n\n.imgix-param-title-colortype {\n align-items: center !important;\n}\n\n.imgix-param-title-left {\n flex: 1 50%;\n}\n\n.imgix-param-title-right {\n flex: 1 50%;\n padding-left: 40px;\n text-align:right;\n position: relative;\n\n .wp-picker-container {\n position: relative;\n }\n\n .wp-picker-holder {\n position: absolute;\n right: 0px;\n top: 20px;\n z-index: 1000;\n }\n\n .wp-color-result {\n margin: 0 0px 8px 0px;\n height: 20px;\n\n &::after {\n line-height:20px;\n font-size:10px;\n }\n }\n\n .iris-picker {\n box-shadow: 0px 0px 8px rgba(0,0,0,0.5);\n }\n\n h3 {\n text-align: right;\n }\n}\n\n.imgix-param-title h3, .imgix-param-blend-mode h3 {\n margin-top:0px;\n font-size: 11px;\n text-transform: uppercase;\n color: #666;\n}\n\n.imgix-media-param-title {\n .imgix-param-title-left {\n flex: 2 80%;\n }\n\n .imgix-param-title-right {\n flex: 1 20%;\n a {\n text-align: center !important;\n }\n }\n}\n\n.imgix-param-blend-mode {\n margin-top: 15px;\n display: flex;\n align-items: baseline;\n\n h3 {\n flex: 1 50%;\n }\n\n select {\n flex: 2 100%;\n }\n}\n\n.imgix-parameter {\n input[type=range] {\n display: block;\n width: 100%;\n -webkit-appearance: none;\n margin: 0 0 10px 0;\n background: none;\n padding: 0px !important;\n\n &:focus {\n outline: none;\n\n &::-webkit-slider-runnable-track {\n background: #FFFFFF;\n }\n }\n\n &::-webkit-slider-runnable-track {\n width: 100%;\n height: 5px;\n cursor: pointer;\n animate: 0.2s;\n box-shadow: inset 1px 1px 2px 0px rgba(0, 0, 0, 0.25);\n background: #d4cfd4;\n border-radius: 4px;\n border: 0px solid #000101;\n }\n\n &::-webkit-slider-thumb {\n border: 1px solid rgba(0, 0, 0, 0.25);\n box-shadow: inset 0px 2px 2px 0px rgba(255, 255, 255, 0.5);\n height: 17px;\n width: 17px;\n border-radius: 9px;\n background: #dcdcdc;\n cursor: pointer;\n -webkit-appearance: none;\n margin-top: -6px;\n }\n\n &::-moz-range-track {\n width: 100%;\n height: 5px;\n cursor: pointer;\n animate: 0.2s;\n box-shadow: inset 1px 1px 2px 0px rgba(0,0,0,0.25);\n background: #d4cfd4;\n border-radius: 4px;\n border: 0px solid #000101;\n }\n\n &::-moz-range-thumb {\n border: 1px solid rgba(0,0,0,0.25);\n box-shadow: inset 0px 2px 2px 0px rgba(255,255,255,0.5);\n height: 17px;\n width: 17px;\n border-radius: 9px;\n background: #dcdcdc;\n cursor: pointer;\n -webkit-appearance: none;\n margin-top: -6px;\n }\n }\n\n a.imgix-param-reset {\n font-size: 11px;\n display:block;\n width: 100%;\n text-align:right;\n font-style: italic;\n margin-bottom: 10px;\n outline: none !important;\n border:0px none !important;\n text-decoration: none;\n }\n\n a:focus {\n outline: none !important;\n border:0px none !important;\n }\n}\n\n.imgix-media-preview {\n position:relative;\n padding:0px !important;\n margin: 0px !important;\n padding-bottom:100% !important;\n background-image: url(../img/ilab-imgix-edit-bg.png);\n width:100%;\n\n img {\n position: absolute;\n top: 50%;\n left: 50%;\n transform:translate(-50%, -50%);\n max-width: 100%;\n max-height: 100%;\n display: block;\n }\n}\n\n.imgix-media-preview-inner {\n position:absolute;\n left:0px; right:0px; bottom:0px; top:0px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.imgix-alignment-container {\n display: flex;\n flex: row;\n flex-wrap: wrap;\n justify-content: space-around;\n align-items: baseline;\n padding:0px 35px;\n}\n\n.imgix-alignment-button {\n background-color: #ddd;\n display: block;\n width: 60px;\n height: 60px;\n margin: 5px 5px;\n text-decoration:none;\n border-radius: 4px;\n border:1px solid #888;\n\n box-shadow: inset 0 1px 0 #FFFFFF, 0 1px 0 rgba(0, 0, 0, 0.15) !important;\n}\n\n.selected-alignment {\n background-color: #bbb;\n box-shadow: inset 1px 1px 1px rgba(0,0,0,0.25), 0 1px 0 rgba(0, 0, 0, 0.15) !important;\n}\n.imgix-pill-enhance {\n background-image: url(../img/ilab-imgix-magic-wand-black.png);\n background-repeat: no-repeat;\n background-position: 12px 8px;\n padding-left: 40px;\n background-size: 20px 20px;\n}\n\n.imgix-pill-enhance.pill-selected {\n background-image: url(../img/ilab-imgix-magic-wand-white.png);\n}\n\n.imgix-pill-redeye {\n background-image: url(../img/ilab-imgix-red-eye-black.png);\n background-repeat: no-repeat;\n background-position: 12px 8px;\n padding-left: 40px;\n background-size: 20px 20px;\n}\n\n.imgix-pill-redeye.pill-selected {\n background-image: url(../img/ilab-imgix-red-eye-white.png);\n}\n\n.imgix-preset-make-default-container {\n align-items: center;\n display: flex;\n min-height:30px;\n}\n\n.imgix-preset-container {\n align-items: center;\n display: flex;\n}\n\n.imgix-preset-container.is-hidden, .imgix-preset-make-default-container.is-hidden {\n display: none;\n}\n\n\n.imgix-param-label\n{\n font-style:italic;\n}\n\n.imgix-label-editor {\n position: absolute;\n right: -4px;\n top: 0px;\n width: 40px;\n font-size: 11px;\n padding: 1px;\n text-align: right;\n}\n",".ilab-crop-preview {\n overflow: hidden;\n}\n\n.ilab-crop-now-wrapper {\n margin-top: 12px;\n}\n\n.ilabc-cropper {\n max-width: 100%;\n max-height: 100%;\n}\n\n.ilabm-sidebar-content-cropper {\n flex-direction: column !important;\n padding: 10px 10px 10px 10px;\n\n overflow:scroll;\n\n h3 {\n margin-top:0px;\n font-size: 11px;\n text-transform: uppercase;\n color: #888;\n font-weight: bold;\n }\n}\n\n.cropper-dashed.dashed-h {\n top: 38.4615385%;\n height: 23.076923%;\n}\n\n.cropper-dashed.dashed-v {\n left: 38.4615385%;\n width: 23.076923%;\n}\n\n.ilabc-current-crop-container {\n background-image: url(../img/ilab-imgix-edit-bg.png);\n text-align:center;\n margin-bottom: 15px;\n}\n\n.ilab-current-crop-img {\n padding:0px !important;\n margin:0px !important;\n margin-bottom:-4px !important;\n max-width:100%;\n height:auto;\n}"],"sourceRoot":"css/"} \ No newline at end of file diff --git a/public/css/ilab-media-tools.settings.min.css b/public/css/ilab-media-tools.settings.min.css index 7daf2ade..14d3381c 100644 --- a/public/css/ilab-media-tools.settings.min.css +++ b/public/css/ilab-media-tools.settings.min.css @@ -1,2 +1 @@ -.ic-Super-toggle__label{box-sizing:border-box;margin:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ic-Form-group.ic-Form-group--horizontal .ic-Super-toggle__label{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ic-Super-toggle__input{opacity:0;position:absolute;top:0;left:0}.ic-Super-toggle__input:checked~label .ic-Super-toggle-switch:after{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.ic-Super-toggle__input:checked~label .ic-Super-toggle__disabled-msg:before{content:attr(data-checked)}.ic-Super-toggle__input[disabled]~label .ic-Super-toggle__disabled-msg{display:block}.ic-Super-toggle__input[disabled]~label .ic-Super-toggle-switch,.ic-Super-toggle__input[disabled]~label [class^=ic-Super-toggle-option-]{display:none}.ic-Super-toggle-switch{transition:background .1s,border-color .1s;display:inline-block;position:relative;line-height:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-clip:padding-box}.ic-Super-toggle-switch:after{transition:all .1s ease-in-out;content:"";position:absolute;top:0;left:0;-webkit-transform:translateZ(0);transform:translateZ(0);border-radius:100%;box-shadow:0 3px 6px rgba(0,0,0,.3);background-image:url(https://cl.ly/320m31452k2X/handle.svg);background-position:50% 50%;background-repeat:no-repeat;background-size:20px}.ic-Super-toggle__disabled-msg{display:none}.ic-Super-toggle__disabled-msg:before{content:attr(data-unchecked);font-style:italic;opacity:.8}[class^=ic-Super-toggle-option-]{transition:all .2s ease-out;-webkit-box-flex:0;-ms-flex:0 0 50%;flex:0 0 50%;text-align:center;position:relative;z-index:1;text-transform:uppercase;font-weight:700;line-height:1;speak:none;box-sizing:border-box}.ic-Super-toggle__screenreader{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute}.ic-Super-toggle--on-off{display:inline-block;vertical-align:middle}.ic-Super-toggle--on-off .ic-Super-toggle__input:focus~label .ic-Super-toggle-switch:after{box-shadow:inset 0 0 0 1px #fff,inset 0 0 0 3px #5b6c79,0 3px 6px rgba(0,0,0,.3)}.ic-Super-toggle--on-off .ic-Super-toggle__input:checked~label .ic-Super-toggle-switch{background:#008a14;border-color:#008a14}.ic-Super-toggle--on-off .ic-Super-toggle__input:checked~label .ic-Super-toggle-option-LEFT{color:#fff}.ic-Super-toggle--on-off .ic-Super-toggle__input:checked~label .ic-Super-toggle-option-LEFT .ic-Super-toggle__svg>*{fill:#fff}.ic-Super-toggle--on-off .ic-Super-toggle__input:checked~label .ic-Super-toggle-option-RIGHT{color:#fff}.ic-Super-toggle--on-off .ic-Super-toggle__input:checked~label .ic-Super-toggle-option-RIGHT .ic-Super-toggle__svg>*{fill:#fff}.ic-Super-toggle--on-off .ic-Super-toggle__input:checked:focus~label .ic-Super-toggle-switch:after{box-shadow:inset 0 0 0 1px #fff,inset 0 0 0 3px #008a14,0 3px 6px rgba(0,0,0,.3)}.ic-Super-toggle--on-off .ic-Super-toggle-switch{width:60px;height:30px;background:#5b6c79;border:2px solid #5b6c79;border-radius:17px}.ic-Form-group.ic-Form-group--horizontal .ic-Super-toggle--on-off .ic-Super-toggle-switch{-webkit-box-flex:0;-ms-flex:0 0 60px;flex:0 0 60px}.ic-Super-toggle--on-off .ic-Super-toggle-switch:after{background-color:#fff;width:30px;height:30px}.ic-Super-toggle--on-off .ic-Super-toggle-option-LEFT{color:#fff}.ic-Super-toggle--on-off .ic-Super-toggle-option-LEFT .ic-Super-toggle__svg>*{fill:#fff}.ic-Super-toggle--on-off .ic-Super-toggle-option-RIGHT{color:#fff}.ic-Super-toggle--on-off .ic-Super-toggle-option-RIGHT .ic-Super-toggle__svg>*{fill:#fff}.ic-Super-toggle--on-off .ic-Super-toggle__svg{max-width:15px;max-height:15px}.ic-Super-toggle--on-off [class^=ic-Super-toggle-option-]{transition-delay:.1s}.ic-Super-toggle--on-off .ic-Super-toggle-option-LEFT{-webkit-transform:scale(.1);transform:scale(.1);opacity:0}.ic-Super-toggle--on-off .ic-Super-toggle-option-RIGHT,.ic-Super-toggle--on-off .ic-Super-toggle__input:checked~label .ic-Super-toggle-option-LEFT{-webkit-transform:scale(1);transform:scale(1);opacity:1}.ic-Super-toggle--on-off .ic-Super-toggle__input:checked~label .ic-Super-toggle-option-RIGHT{-webkit-transform:scale(.1);transform:scale(.1);opacity:0}.ic-Super-toggle--ui-switch{display:inline-block;vertical-align:middle}.ic-Super-toggle--ui-switch .ic-Super-toggle__input:focus~label .ic-Super-toggle-switch:after{box-shadow:inset 0 0 0 1px #fff,inset 0 0 0 3px #5b6c79,0 3px 6px rgba(0,0,0,.3)}.ic-Super-toggle--ui-switch .ic-Super-toggle__input:checked~label .ic-Super-toggle-switch{background:#5b6c79;border-color:#5b6c79}.ic-Super-toggle--ui-switch .ic-Super-toggle__input:checked~label .ic-Super-toggle-option-LEFT{color:#888}.ic-Super-toggle--ui-switch .ic-Super-toggle__input:checked~label .ic-Super-toggle-option-LEFT .ic-Super-toggle__svg>*{fill:#888}.ic-Super-toggle--ui-switch .ic-Super-toggle__input:checked~label .ic-Super-toggle-option-RIGHT{color:#08c}.ic-Super-toggle--ui-switch .ic-Super-toggle__input:checked~label .ic-Super-toggle-option-RIGHT .ic-Super-toggle__svg>*{fill:#08c}.ic-Super-toggle--ui-switch .ic-Super-toggle__input:checked:focus~label .ic-Super-toggle-switch:after{box-shadow:inset 0 0 0 1px #fff,inset 0 0 0 3px #5b6c79,0 3px 6px rgba(0,0,0,.3)}.ic-Super-toggle--ui-switch .ic-Super-toggle-switch{width:60px;height:30px;background:#5b6c79;border:2px solid #5b6c79;border-radius:17px}.ic-Form-group.ic-Form-group--horizontal .ic-Super-toggle--ui-switch .ic-Super-toggle-switch{-webkit-box-flex:0;-ms-flex:0 0 60px;flex:0 0 60px}.ic-Super-toggle--ui-switch .ic-Super-toggle-switch:after{background-color:#fff;width:30px;height:30px}.ic-Super-toggle--ui-switch .ic-Super-toggle-option-LEFT{color:#08c}.ic-Super-toggle--ui-switch .ic-Super-toggle-option-LEFT .ic-Super-toggle__svg>*{fill:#08c}.ic-Super-toggle--ui-switch .ic-Super-toggle-option-RIGHT{color:#888}.ic-Super-toggle--ui-switch .ic-Super-toggle-option-RIGHT .ic-Super-toggle__svg>*{fill:#888}.ic-Super-toggle--ui-switch .ic-Super-toggle__svg{max-width:15px;max-height:15px}.ic-Super-toggle--ui-switch .ic-Super-toggle__label{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ic-Super-toggle--ui-switch .ic-Super-toggle-switch{display:block}.ic-Super-toggle--ui-switch [class^=ic-Super-toggle-option-]{-webkit-box-flex:0;-ms-flex:none;flex:none;min-width:24px}.ic-Super-toggle--ui-switch .ic-Super-toggle-option-LEFT{text-align:left;-webkit-transform:scale(1.1);transform:scale(1.1)}.ic-Super-toggle--ui-switch .ic-Super-toggle-option-RIGHT{text-align:right;-webkit-transform:scale(.9);transform:scale(.9)}.ic-Super-toggle--ui-switch .ic-Super-toggle__input:checked~label .ic-Super-toggle-option-LEFT{-webkit-transform:scale(.9);transform:scale(.9)}.ic-Super-toggle--ui-switch .ic-Super-toggle__input:checked~label .ic-Super-toggle-option-RIGHT{-webkit-transform:scale(1.1);transform:scale(1.1)} -/*# sourceMappingURL=ilab-media-tools.settings.min.css.map */ +.ic-Super-toggle__label{box-sizing:border-box;margin:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ic-Form-group.ic-Form-group--horizontal .ic-Super-toggle__label{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ic-Super-toggle__input{opacity:0;position:absolute;top:0;left:0}.ic-Super-toggle__input:checked~label .ic-Super-toggle-switch:after{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.ic-Super-toggle__input:checked~label .ic-Super-toggle__disabled-msg:before{content:attr(data-checked)}.ic-Super-toggle__input[disabled]~label .ic-Super-toggle__disabled-msg{display:block}.ic-Super-toggle__input[disabled]~label .ic-Super-toggle-switch,.ic-Super-toggle__input[disabled]~label [class^=ic-Super-toggle-option-]{display:none}.ic-Super-toggle-switch{transition:background .1s,border-color .1s;display:inline-block;position:relative;line-height:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-clip:padding-box}.ic-Super-toggle-switch:after{transition:all .1s ease-in-out;content:"";position:absolute;top:0;left:0;-webkit-transform:translateZ(0);transform:translateZ(0);border-radius:100%;box-shadow:0 3px 6px rgba(0,0,0,.3);background-image:url(https://cl.ly/320m31452k2X/handle.svg);background-position:50% 50%;background-repeat:no-repeat;background-size:20px}.ic-Super-toggle__disabled-msg{display:none}.ic-Super-toggle__disabled-msg:before{content:attr(data-unchecked);font-style:italic;opacity:.8}[class^=ic-Super-toggle-option-]{transition:all .2s ease-out;-webkit-box-flex:0;-ms-flex:0 0 50%;flex:0 0 50%;text-align:center;position:relative;z-index:1;text-transform:uppercase;font-weight:700;line-height:1;speak:none;box-sizing:border-box}.ic-Super-toggle__screenreader{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute}.ic-Super-toggle--on-off{display:inline-block;vertical-align:middle}.ic-Super-toggle--on-off .ic-Super-toggle__input:focus~label .ic-Super-toggle-switch:after{box-shadow:inset 0 0 0 1px #fff,inset 0 0 0 3px #5b6c79,0 3px 6px rgba(0,0,0,.3)}.ic-Super-toggle--on-off .ic-Super-toggle__input:checked~label .ic-Super-toggle-switch{background:#008a14;border-color:#008a14}.ic-Super-toggle--on-off .ic-Super-toggle__input:checked~label .ic-Super-toggle-option-LEFT{color:#fff}.ic-Super-toggle--on-off .ic-Super-toggle__input:checked~label .ic-Super-toggle-option-LEFT .ic-Super-toggle__svg>*{fill:#fff}.ic-Super-toggle--on-off .ic-Super-toggle__input:checked~label .ic-Super-toggle-option-RIGHT{color:#fff}.ic-Super-toggle--on-off .ic-Super-toggle__input:checked~label .ic-Super-toggle-option-RIGHT .ic-Super-toggle__svg>*{fill:#fff}.ic-Super-toggle--on-off .ic-Super-toggle__input:checked:focus~label .ic-Super-toggle-switch:after{box-shadow:inset 0 0 0 1px #fff,inset 0 0 0 3px #008a14,0 3px 6px rgba(0,0,0,.3)}.ic-Super-toggle--on-off .ic-Super-toggle-switch{width:60px;height:30px;background:#5b6c79;border:2px solid #5b6c79;border-radius:17px}.ic-Form-group.ic-Form-group--horizontal .ic-Super-toggle--on-off .ic-Super-toggle-switch{-webkit-box-flex:0;-ms-flex:0 0 60px;flex:0 0 60px}.ic-Super-toggle--on-off .ic-Super-toggle-switch:after{background-color:#fff;width:30px;height:30px}.ic-Super-toggle--on-off .ic-Super-toggle-option-LEFT{color:#fff}.ic-Super-toggle--on-off .ic-Super-toggle-option-LEFT .ic-Super-toggle__svg>*{fill:#fff}.ic-Super-toggle--on-off .ic-Super-toggle-option-RIGHT{color:#fff}.ic-Super-toggle--on-off .ic-Super-toggle-option-RIGHT .ic-Super-toggle__svg>*{fill:#fff}.ic-Super-toggle--on-off .ic-Super-toggle__svg{max-width:15px;max-height:15px}.ic-Super-toggle--on-off [class^=ic-Super-toggle-option-]{transition-delay:.1s}.ic-Super-toggle--on-off .ic-Super-toggle-option-LEFT{-webkit-transform:scale(.1);transform:scale(.1);opacity:0}.ic-Super-toggle--on-off .ic-Super-toggle-option-RIGHT,.ic-Super-toggle--on-off .ic-Super-toggle__input:checked~label .ic-Super-toggle-option-LEFT{-webkit-transform:scale(1);transform:scale(1);opacity:1}.ic-Super-toggle--on-off .ic-Super-toggle__input:checked~label .ic-Super-toggle-option-RIGHT{-webkit-transform:scale(.1);transform:scale(.1);opacity:0}.ic-Super-toggle--ui-switch{display:inline-block;vertical-align:middle}.ic-Super-toggle--ui-switch .ic-Super-toggle__input:focus~label .ic-Super-toggle-switch:after{box-shadow:inset 0 0 0 1px #fff,inset 0 0 0 3px #5b6c79,0 3px 6px rgba(0,0,0,.3)}.ic-Super-toggle--ui-switch .ic-Super-toggle__input:checked~label .ic-Super-toggle-switch{background:#5b6c79;border-color:#5b6c79}.ic-Super-toggle--ui-switch .ic-Super-toggle__input:checked~label .ic-Super-toggle-option-LEFT{color:#888}.ic-Super-toggle--ui-switch .ic-Super-toggle__input:checked~label .ic-Super-toggle-option-LEFT .ic-Super-toggle__svg>*{fill:#888}.ic-Super-toggle--ui-switch .ic-Super-toggle__input:checked~label .ic-Super-toggle-option-RIGHT{color:#08c}.ic-Super-toggle--ui-switch .ic-Super-toggle__input:checked~label .ic-Super-toggle-option-RIGHT .ic-Super-toggle__svg>*{fill:#08c}.ic-Super-toggle--ui-switch .ic-Super-toggle__input:checked:focus~label .ic-Super-toggle-switch:after{box-shadow:inset 0 0 0 1px #fff,inset 0 0 0 3px #5b6c79,0 3px 6px rgba(0,0,0,.3)}.ic-Super-toggle--ui-switch .ic-Super-toggle-switch{width:60px;height:30px;background:#5b6c79;border:2px solid #5b6c79;border-radius:17px}.ic-Form-group.ic-Form-group--horizontal .ic-Super-toggle--ui-switch .ic-Super-toggle-switch{-webkit-box-flex:0;-ms-flex:0 0 60px;flex:0 0 60px}.ic-Super-toggle--ui-switch .ic-Super-toggle-switch:after{background-color:#fff;width:30px;height:30px}.ic-Super-toggle--ui-switch .ic-Super-toggle-option-LEFT{color:#08c}.ic-Super-toggle--ui-switch .ic-Super-toggle-option-LEFT .ic-Super-toggle__svg>*{fill:#08c}.ic-Super-toggle--ui-switch .ic-Super-toggle-option-RIGHT{color:#888}.ic-Super-toggle--ui-switch .ic-Super-toggle-option-RIGHT .ic-Super-toggle__svg>*{fill:#888}.ic-Super-toggle--ui-switch .ic-Super-toggle__svg{max-width:15px;max-height:15px}.ic-Super-toggle--ui-switch .ic-Super-toggle__label{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ic-Super-toggle--ui-switch .ic-Super-toggle-switch{display:block}.ic-Super-toggle--ui-switch [class^=ic-Super-toggle-option-]{-webkit-box-flex:0;-ms-flex:none;flex:none;min-width:24px}.ic-Super-toggle--ui-switch .ic-Super-toggle-option-LEFT{text-align:left;-webkit-transform:scale(1.1);transform:scale(1.1)}.ic-Super-toggle--ui-switch .ic-Super-toggle-option-RIGHT{text-align:right;-webkit-transform:scale(.9);transform:scale(.9)}.ic-Super-toggle--ui-switch .ic-Super-toggle__input:checked~label .ic-Super-toggle-option-LEFT{-webkit-transform:scale(.9);transform:scale(.9)}.ic-Super-toggle--ui-switch .ic-Super-toggle__input:checked~label .ic-Super-toggle-option-RIGHT{-webkit-transform:scale(1.1);transform:scale(1.1)} \ No newline at end of file diff --git a/public/css/ilab-media-tools.settings.min.css.map b/public/css/ilab-media-tools.settings.min.css.map deleted file mode 100644 index 12a208f5..00000000 --- a/public/css/ilab-media-tools.settings.min.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../styles/ilab-settings.scss","ilab-media-tools.settings.min.css"],"names":[],"mappings":"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","file":"ilab-media-tools.settings.min.css","sourcesContent":["// Toggle Stolen from: https://codepen.io/personable/pen/ZGKjwe\n// Chris Hart\n@mixin super-toggle-designer (\n $toggle-width: 60px,\n $toggle-color-switch: white,\n $toggle-background-OFF: #5b6c79,\n $toggle-background-ON: #008a14,\n $toggle-color-left-unchecked: white,\n $toggle-color-left-checked: white,\n $toggle-color-right-unchecked: white,\n $toggle-color-right-checked: white\n) {\n\n display: inline-block;\n vertical-align: middle;\n\n .ic-Super-toggle__input {\n &:focus ~ label {\n .ic-Super-toggle-switch::after {\n box-shadow:\n inset 0 0 0 1px $toggle-color-switch,\n inset 0 0 0 3px $toggle-background-OFF,\n 0 3px 6px rgba(black, 0.3);\n }\n }\n &:checked ~ label {\n .ic-Super-toggle-switch {\n background: $toggle-background-ON;\n border-color: $toggle-background-ON;\n }\n .ic-Super-toggle-option-LEFT {\n color: $toggle-color-left-checked;\n .ic-Super-toggle__svg > * {\n fill: $toggle-color-left-checked;\n }\n }\n .ic-Super-toggle-option-RIGHT {\n color: $toggle-color-right-checked;\n .ic-Super-toggle__svg > * {\n fill: $toggle-color-right-checked;\n }\n }\n }\n &:checked {\n &:focus ~ label {\n .ic-Super-toggle-switch::after {\n box-shadow:\n inset 0 0 0 1px $toggle-color-switch,\n inset 0 0 0 3px $toggle-background-ON,\n 0 3px 6px rgba(black, 0.3);\n }\n }\n }\n }\n\n .ic-Super-toggle-switch {\n width: $toggle-width; height: $toggle-width/2;\n background: $toggle-background-OFF;\n border: 2px solid $toggle-background-OFF;\n border-radius: ($toggle-width/4) + 2;\n .ic-Form-group.ic-Form-group--horizontal & {\n flex: 0 0 $toggle-width;\n }\n &:after {\n background-color: $toggle-color-switch;\n width: $toggle-width/2; height: $toggle-width/2;\n }\n }\n\n .ic-Super-toggle-option-LEFT {\n color: $toggle-color-left-unchecked;\n .ic-Super-toggle__svg > * { fill: $toggle-color-left-unchecked; }\n }\n\n .ic-Super-toggle-option-RIGHT {\n color: $toggle-color-right-unchecked;\n .ic-Super-toggle__svg > * { fill: $toggle-color-right-unchecked; }\n }\n\n .ic-Super-toggle__svg {\n max-width: $toggle-width/4;\n max-height: $toggle-width/4;\n }\n}\n\n.ic-Super-toggle__label {\n box-sizing: border-box;\n margin: 0;\n user-select: none;\n .ic-Form-group.ic-Form-group--horizontal & {\n display: inline-flex;\n align-items: center;\n }\n}\n\n.ic-Super-toggle__input {\n opacity: 0;\n position: absolute;\n top: 0; left: 0;\n &:checked {\n ~ label {\n .ic-Super-toggle-switch {\n &:after { transform: translate3d(100%,0,0); }\n }\n .ic-Super-toggle__disabled-msg {\n &:before { content: attr(data-checked); }\n }\n }\n }\n &[disabled] {\n ~ label {\n .ic-Super-toggle__disabled-msg { display: block; }\n .ic-Super-toggle-switch,\n [class^=\"ic-Super-toggle-option-\"] { display: none; }\n }\n }\n}\n\n.ic-Super-toggle-switch {\n transition: background 0.1s, border-color 0.1s;\n display: inline-block;\n position: relative;\n line-height: 1;\n display: flex;\n align-items: center;\n background-clip: padding-box;\n &::after {\n transition: all 0.1s ease-in-out;\n content: \"\";\n position: absolute;\n top: 0; left: 0;\n transform: translate3d(0,0,0);\n border-radius: 100%;\n box-shadow: 0 3px 6px rgba(black, 0.3);\n background-image: url(\"https://cl.ly/320m31452k2X/handle.svg\");\n background-position: 50% 50%;\n background-repeat: no-repeat;\n background-size: 20px;\n }\n}\n\n.ic-Super-toggle__disabled-msg {\n display: none;\n &:before {\n content: attr(data-unchecked);\n font-style: italic;\n opacity: 0.8;\n }\n}\n\n[class^=\"ic-Super-toggle-option-\"] {\n transition: all 0.2s ease-out;\n flex: 0 0 50%;\n text-align: center;\n position: relative;\n z-index: 1;\n text-transform: uppercase;\n font-weight: bold;\n line-height: 1;\n speak: none;\n box-sizing: border-box;\n}\n\n// Screenreader class from HTML5 Boilerplate's .visuallyhidden\n.ic-Super-toggle__screenreader {\n border: 0;\n clip: rect(0 0 0 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n}\n\n\n.ic-Super-toggle--on-off {\n @include super-toggle-designer;\n [class^=\"ic-Super-toggle-option-\"] { transition-delay: 0.1s; }\n .ic-Super-toggle-option-LEFT {\n transform: scale(0.1);\n opacity: 0;\n }\n .ic-Super-toggle-option-RIGHT {\n transform: scale(1);\n opacity: 1;\n }\n .ic-Super-toggle__input:checked ~ label {\n .ic-Super-toggle-option-LEFT {\n transform: scale(1);\n opacity: 1;\n }\n .ic-Super-toggle-option-RIGHT {\n transform: scale(0.1);\n opacity: 0;\n }\n }\n\n}\n\n.ic-Super-toggle--ui-switch {\n @include super-toggle-designer(\n 60px, // width\n white, // switch bg color\n #5b6c79, // background color when checkbox is unchecked\n #5b6c79, // background color when checkbox is checked\n #08c, // left unchecked\n #888, // left checked\n #888, // right unchecked\n #08c // right checked\n );\n .ic-Super-toggle__label {\n display: inline-flex;\n align-items: center;\n }\n .ic-Super-toggle-switch {\n display: block;\n }\n [class^=\"ic-Super-toggle-option-\"] {\n flex: none;\n min-width: 24px;\n }\n .ic-Super-toggle-option-LEFT {\n text-align: left;\n transform: scale(1.1);\n }\n .ic-Super-toggle-option-RIGHT {\n text-align: right;\n transform: scale(0.9);\n }\n .ic-Super-toggle__input:checked ~ label {\n .ic-Super-toggle-option-LEFT {\n transform: scale(0.9);\n }\n .ic-Super-toggle-option-RIGHT {\n transform: scale(1.1);\n }\n }\n}",".ic-Super-toggle__label {\n box-sizing: border-box;\n margin: 0;\n user-select: none; }\n .ic-Form-group.ic-Form-group--horizontal .ic-Super-toggle__label {\n display: inline-flex;\n align-items: center; }\n\n.ic-Super-toggle__input {\n opacity: 0;\n position: absolute;\n top: 0;\n left: 0; }\n .ic-Super-toggle__input:checked ~ label .ic-Super-toggle-switch:after {\n transform: translate3d(100%, 0, 0); }\n .ic-Super-toggle__input:checked ~ label .ic-Super-toggle__disabled-msg:before {\n content: attr(data-checked); }\n .ic-Super-toggle__input[disabled] ~ label .ic-Super-toggle__disabled-msg {\n display: block; }\n .ic-Super-toggle__input[disabled] ~ label .ic-Super-toggle-switch,\n .ic-Super-toggle__input[disabled] ~ label [class^=\"ic-Super-toggle-option-\"] {\n display: none; }\n\n.ic-Super-toggle-switch {\n transition: background 0.1s, border-color 0.1s;\n display: inline-block;\n position: relative;\n line-height: 1;\n display: flex;\n align-items: center;\n background-clip: padding-box; }\n .ic-Super-toggle-switch::after {\n transition: all 0.1s ease-in-out;\n content: \"\";\n position: absolute;\n top: 0;\n left: 0;\n transform: translate3d(0, 0, 0);\n border-radius: 100%;\n box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);\n background-image: url(\"https://cl.ly/320m31452k2X/handle.svg\");\n background-position: 50% 50%;\n background-repeat: no-repeat;\n background-size: 20px; }\n\n.ic-Super-toggle__disabled-msg {\n display: none; }\n .ic-Super-toggle__disabled-msg:before {\n content: attr(data-unchecked);\n font-style: italic;\n opacity: 0.8; }\n\n[class^=\"ic-Super-toggle-option-\"] {\n transition: all 0.2s ease-out;\n flex: 0 0 50%;\n text-align: center;\n position: relative;\n z-index: 1;\n text-transform: uppercase;\n font-weight: bold;\n line-height: 1;\n speak: none;\n box-sizing: border-box; }\n\n.ic-Super-toggle__screenreader {\n border: 0;\n clip: rect(0 0 0 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute; }\n\n.ic-Super-toggle--on-off {\n display: inline-block;\n vertical-align: middle; }\n .ic-Super-toggle--on-off .ic-Super-toggle__input:focus ~ label .ic-Super-toggle-switch::after {\n box-shadow: inset 0 0 0 1px white, inset 0 0 0 3px #5b6c79, 0 3px 6px rgba(0, 0, 0, 0.3); }\n .ic-Super-toggle--on-off .ic-Super-toggle__input:checked ~ label .ic-Super-toggle-switch {\n background: #008a14;\n border-color: #008a14; }\n .ic-Super-toggle--on-off .ic-Super-toggle__input:checked ~ label .ic-Super-toggle-option-LEFT {\n color: white; }\n .ic-Super-toggle--on-off .ic-Super-toggle__input:checked ~ label .ic-Super-toggle-option-LEFT .ic-Super-toggle__svg > * {\n fill: white; }\n .ic-Super-toggle--on-off .ic-Super-toggle__input:checked ~ label .ic-Super-toggle-option-RIGHT {\n color: white; }\n .ic-Super-toggle--on-off .ic-Super-toggle__input:checked ~ label .ic-Super-toggle-option-RIGHT .ic-Super-toggle__svg > * {\n fill: white; }\n .ic-Super-toggle--on-off .ic-Super-toggle__input:checked:focus ~ label .ic-Super-toggle-switch::after {\n box-shadow: inset 0 0 0 1px white, inset 0 0 0 3px #008a14, 0 3px 6px rgba(0, 0, 0, 0.3); }\n .ic-Super-toggle--on-off .ic-Super-toggle-switch {\n width: 60px;\n height: 30px;\n background: #5b6c79;\n border: 2px solid #5b6c79;\n border-radius: 17px; }\n .ic-Form-group.ic-Form-group--horizontal .ic-Super-toggle--on-off .ic-Super-toggle-switch {\n flex: 0 0 60px; }\n .ic-Super-toggle--on-off .ic-Super-toggle-switch:after {\n background-color: white;\n width: 30px;\n height: 30px; }\n .ic-Super-toggle--on-off .ic-Super-toggle-option-LEFT {\n color: white; }\n .ic-Super-toggle--on-off .ic-Super-toggle-option-LEFT .ic-Super-toggle__svg > * {\n fill: white; }\n .ic-Super-toggle--on-off .ic-Super-toggle-option-RIGHT {\n color: white; }\n .ic-Super-toggle--on-off .ic-Super-toggle-option-RIGHT .ic-Super-toggle__svg > * {\n fill: white; }\n .ic-Super-toggle--on-off .ic-Super-toggle__svg {\n max-width: 15px;\n max-height: 15px; }\n .ic-Super-toggle--on-off [class^=\"ic-Super-toggle-option-\"] {\n transition-delay: 0.1s; }\n .ic-Super-toggle--on-off .ic-Super-toggle-option-LEFT {\n transform: scale(0.1);\n opacity: 0; }\n .ic-Super-toggle--on-off .ic-Super-toggle-option-RIGHT {\n transform: scale(1);\n opacity: 1; }\n .ic-Super-toggle--on-off .ic-Super-toggle__input:checked ~ label .ic-Super-toggle-option-LEFT {\n transform: scale(1);\n opacity: 1; }\n .ic-Super-toggle--on-off .ic-Super-toggle__input:checked ~ label .ic-Super-toggle-option-RIGHT {\n transform: scale(0.1);\n opacity: 0; }\n\n.ic-Super-toggle--ui-switch {\n display: inline-block;\n vertical-align: middle; }\n .ic-Super-toggle--ui-switch .ic-Super-toggle__input:focus ~ label .ic-Super-toggle-switch::after {\n box-shadow: inset 0 0 0 1px white, inset 0 0 0 3px #5b6c79, 0 3px 6px rgba(0, 0, 0, 0.3); }\n .ic-Super-toggle--ui-switch .ic-Super-toggle__input:checked ~ label .ic-Super-toggle-switch {\n background: #5b6c79;\n border-color: #5b6c79; }\n .ic-Super-toggle--ui-switch .ic-Super-toggle__input:checked ~ label .ic-Super-toggle-option-LEFT {\n color: #888; }\n .ic-Super-toggle--ui-switch .ic-Super-toggle__input:checked ~ label .ic-Super-toggle-option-LEFT .ic-Super-toggle__svg > * {\n fill: #888; }\n .ic-Super-toggle--ui-switch .ic-Super-toggle__input:checked ~ label .ic-Super-toggle-option-RIGHT {\n color: #08c; }\n .ic-Super-toggle--ui-switch .ic-Super-toggle__input:checked ~ label .ic-Super-toggle-option-RIGHT .ic-Super-toggle__svg > * {\n fill: #08c; }\n .ic-Super-toggle--ui-switch .ic-Super-toggle__input:checked:focus ~ label .ic-Super-toggle-switch::after {\n box-shadow: inset 0 0 0 1px white, inset 0 0 0 3px #5b6c79, 0 3px 6px rgba(0, 0, 0, 0.3); }\n .ic-Super-toggle--ui-switch .ic-Super-toggle-switch {\n width: 60px;\n height: 30px;\n background: #5b6c79;\n border: 2px solid #5b6c79;\n border-radius: 17px; }\n .ic-Form-group.ic-Form-group--horizontal .ic-Super-toggle--ui-switch .ic-Super-toggle-switch {\n flex: 0 0 60px; }\n .ic-Super-toggle--ui-switch .ic-Super-toggle-switch:after {\n background-color: white;\n width: 30px;\n height: 30px; }\n .ic-Super-toggle--ui-switch .ic-Super-toggle-option-LEFT {\n color: #08c; }\n .ic-Super-toggle--ui-switch .ic-Super-toggle-option-LEFT .ic-Super-toggle__svg > * {\n fill: #08c; }\n .ic-Super-toggle--ui-switch .ic-Super-toggle-option-RIGHT {\n color: #888; }\n .ic-Super-toggle--ui-switch .ic-Super-toggle-option-RIGHT .ic-Super-toggle__svg > * {\n fill: #888; }\n .ic-Super-toggle--ui-switch .ic-Super-toggle__svg {\n max-width: 15px;\n max-height: 15px; }\n .ic-Super-toggle--ui-switch .ic-Super-toggle__label {\n display: inline-flex;\n align-items: center; }\n .ic-Super-toggle--ui-switch .ic-Super-toggle-switch {\n display: block; }\n .ic-Super-toggle--ui-switch [class^=\"ic-Super-toggle-option-\"] {\n flex: none;\n min-width: 24px; }\n .ic-Super-toggle--ui-switch .ic-Super-toggle-option-LEFT {\n text-align: left;\n transform: scale(1.1); }\n .ic-Super-toggle--ui-switch .ic-Super-toggle-option-RIGHT {\n text-align: right;\n transform: scale(0.9); }\n .ic-Super-toggle--ui-switch .ic-Super-toggle__input:checked ~ label .ic-Super-toggle-option-LEFT {\n transform: scale(0.9); }\n .ic-Super-toggle--ui-switch .ic-Super-toggle__input:checked ~ label .ic-Super-toggle-option-RIGHT {\n transform: scale(1.1); }\n"],"sourceRoot":"css/"} \ No newline at end of file diff --git a/public/css/ilab-media-upload.min.css b/public/css/ilab-media-upload.min.css index f9eff2b1..2e53f331 100644 --- a/public/css/ilab-media-upload.min.css +++ b/public/css/ilab-media-upload.min.css @@ -1,2 +1 @@ -#ilab-video-upload-target{position:relative;padding:30px;border:4px dashed #e0e0e0;background-color:#fafafa;margin:20px 0;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;min-height:128px;cursor:pointer;transition:border .5s ease-out}#ilab-video-upload-target.drag-inside{border:4px solid #70a9dd;background-color:#bcd3e2}.ilab-upload-item{position:relative;min-width:128px;min-height:128px;max-width:128px;max-height:128px;width:128px;height:128px;background-color:#eaeaea;margin:10px;border-radius:0;border:1px solid #ddd;overflow:hidden;transition:opacity .5s ease-out,left .3s ease-out,top .3s ease-out,width .3s ease-out,height .3s ease-out,-webkit-transform .3s ease-out;transition:opacity .5s ease-out,left .3s ease-out,top .3s ease-out,width .3s ease-out,height .3s ease-out,transform .3s ease-out;transition:opacity .5s ease-out,left .3s ease-out,top .3s ease-out,width .3s ease-out,height .3s ease-out,transform .3s ease-out,-webkit-transform .3s ease-out;background-repeat:no-repeat;background-position:50%}.ilab-upload-item.upload-error{background-color:#eabab3;border:1px solid #bb6a6b}.ilab-upload-item.ilab-upload-selected{box-shadow:0 0 0 2px #fff,0 0 0 5px #0073aa}.ilab-upload-cell-image{background-image:url(../img/ilab-icon-image.svg);background-size:60px}.ilab-upload-cell-video{background-image:url(../img/ilab-icon-video.svg);background-size:60px}.ilab-upload-cell-doc{background-image:url(../img/ilab-icon-document.svg);background-size:45px}.no-mouse{cursor:default!important}.ilab-upload-item-background{position:absolute;left:-5px;top:-5px;right:-5px;bottom:-5px;background-repeat:no-repeat;background-size:cover;background-position:50%;transition:opacity .5s}.ilab-upload-status-container{position:absolute;left:0;top:0;right:0;bottom:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ilab-upload-status{color:#fff;font-weight:700;font-size:1em;text-shadow:0 0 3px #000}.ilab-upload-progress{width:80%;max-width:80%;height:9px;overflow:hidden;position:relative;margin-top:10px;border-radius:9px;background-color:hsla(0,0%,100%,.66)}.ilab-upload-progress-track{background-color:#0085ba;position:absolute;left:0;top:0;bottom:0;transition:width .125s ease-out}.ilab-upload-directions{position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);font-size:2em;opacity:.5}.ilab-loader-container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;position:absolute;left:0;top:0;right:0;bottom:0;transition:opacity .5s}.ilab-loader,.ilab-loader:after{border-radius:50%;width:24px;height:24px}.ilab-loader{font-size:5px;text-indent:-9999em;border-top:1.1em solid hsla(0,0%,100%,.2);border-right:1.1em solid hsla(0,0%,100%,.2);border-bottom:1.1em solid hsla(0,0%,100%,.2);border-left:1.1em solid #fff;-webkit-animation:load8 1.1s infinite linear;animation:load8 1.1s infinite linear}@-webkit-keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.ilab-upload-footer{padding-right:10px;position:absolute;left:0;right:0;border-top:1px solid #ddd;bottom:0;height:52px;background-color:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:#fcfcfc;visibility:hidden}#ilab-attachment-info{position:absolute;right:-300px;top:0;bottom:54px;width:267px;transition:right .33s ease-out}.ilab-upload-insert-mode{position:relative;background-color:#fff}.ilab-upload-insert-mode div.wrap{position:absolute;left:0;top:0;right:0;bottom:52px;margin:0;padding:0 20px;overflow:auto;transition:right .33s ease-out}.ilab-upload-insert-mode div.wrap h2:first-of-type{display:none}.ilab-upload-insert-mode .ilab-upload-footer{visibility:visible}.ilab-item-selected div.wrap{right:300px}.ilab-item-selected #ilab-attachment-info{right:0} -/*# sourceMappingURL=ilab-media-upload.min.css.map */ +#ilab-video-upload-target{position:relative;padding:30px;border:4px dashed #e0e0e0;background-color:#fafafa;margin:20px 0;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;min-height:128px;cursor:pointer;transition:border .5s ease-out}#ilab-video-upload-target.drag-inside{border:4px solid #70a9dd;background-color:#bcd3e2}.ilab-upload-item{position:relative;min-width:128px;min-height:128px;max-width:128px;max-height:128px;width:128px;height:128px;background-color:#eaeaea;margin:10px;border-radius:0;border:1px solid #ddd;overflow:hidden;transition:opacity .5s ease-out,left .3s ease-out,top .3s ease-out,width .3s ease-out,height .3s ease-out,-webkit-transform .3s ease-out;transition:opacity .5s ease-out,left .3s ease-out,top .3s ease-out,width .3s ease-out,height .3s ease-out,transform .3s ease-out;transition:opacity .5s ease-out,left .3s ease-out,top .3s ease-out,width .3s ease-out,height .3s ease-out,transform .3s ease-out,-webkit-transform .3s ease-out;background-repeat:no-repeat;background-position:50%}.ilab-upload-item.upload-error{background-color:#eabab3;border:1px solid #bb6a6b}.ilab-upload-item.ilab-upload-selected{box-shadow:0 0 0 2px #fff,0 0 0 5px #0073aa}.ilab-upload-cell-image{background-image:url(../img/ilab-icon-image.svg);background-size:60px}.ilab-upload-cell-video{background-image:url(../img/ilab-icon-video.svg);background-size:60px}.ilab-upload-cell-doc{background-image:url(../img/ilab-icon-document.svg);background-size:45px}.no-mouse{cursor:default!important}.ilab-upload-item-background{position:absolute;left:-5px;top:-5px;right:-5px;bottom:-5px;background-repeat:no-repeat;background-size:cover;background-position:50%;transition:opacity .5s}.ilab-upload-status-container{position:absolute;left:0;top:0;right:0;bottom:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ilab-upload-status{color:#fff;font-weight:700;font-size:1em;text-shadow:0 0 3px #000}.ilab-upload-progress{width:80%;max-width:80%;height:9px;overflow:hidden;position:relative;margin-top:10px;border-radius:9px;background-color:hsla(0,0%,100%,.66)}.ilab-upload-progress-track{background-color:#0085ba;position:absolute;left:0;top:0;bottom:0;transition:width .125s ease-out}.ilab-upload-directions{position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);font-size:2em;opacity:.5}.ilab-loader-container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;position:absolute;left:0;top:0;right:0;bottom:0;transition:opacity .5s}.ilab-loader,.ilab-loader:after{border-radius:50%;width:24px;height:24px}.ilab-loader{font-size:5px;text-indent:-9999em;border-top:1.1em solid hsla(0,0%,100%,.2);border-right:1.1em solid hsla(0,0%,100%,.2);border-bottom:1.1em solid hsla(0,0%,100%,.2);border-left:1.1em solid #fff;-webkit-animation:load8 1.1s infinite linear;animation:load8 1.1s infinite linear}@-webkit-keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.ilab-upload-footer{padding-right:10px;position:absolute;left:0;right:0;border-top:1px solid #ddd;bottom:0;height:52px;background-color:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:#fcfcfc;visibility:hidden}#ilab-attachment-info{position:absolute;right:-300px;top:0;bottom:54px;width:267px;transition:right .33s ease-out}.ilab-upload-insert-mode{position:relative;background-color:#fff}.ilab-upload-insert-mode div.wrap{position:absolute;left:0;top:0;right:0;bottom:52px;margin:0;padding:0 20px;overflow:auto;transition:right .33s ease-out}.ilab-upload-insert-mode div.wrap h2:first-of-type{display:none}.ilab-upload-insert-mode .ilab-upload-footer{visibility:visible}.ilab-item-selected div.wrap{right:300px}.ilab-item-selected #ilab-attachment-info{right:0} \ No newline at end of file diff --git a/public/css/ilab-media-upload.min.css.map b/public/css/ilab-media-upload.min.css.map deleted file mode 100644 index fb5d8732..00000000 --- a/public/css/ilab-media-upload.min.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../styles/ilab-media-upload.scss"],"names":[],"mappings":"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","file":"ilab-media-upload.min.css","sourcesContent":["\n#ilab-video-upload-target {\n position: relative;\n padding: 30px;\n border: 4px dashed #e0e0e0;\n background-color: #fafafa;\n margin: 20px 0;\n display: flex;\n flex-wrap: wrap;\n min-height: 128px;\n cursor: pointer;\n transition: border 0.5s ease-out;\n\n &.drag-inside {\n border: 4px solid #70a9dd;\n background-color: #bcd3e2;\n }\n}\n\n.ilab-upload-item {\n position: relative;\n min-width: 128px;\n min-height: 128px;\n max-width: 128px;\n max-height: 128px;\n width: 128px;\n height: 128px;\n background-color: #eaeaea;\n margin: 10px;\n border-radius: 0px;\n border: 1px solid #ddd;\n overflow: hidden;\n transition: opacity 0.5s ease-out, left 0.3s ease-out, top 0.3s ease-out, width 0.3s ease-out, height 0.3s ease-out, transform 0.3s ease-out;\n\n background-repeat: no-repeat;\n background-position: center center;\n\n\n &.upload-error {\n background-color: #eabab3;\n border: 1px solid #bb6a6b;\n }\n\n &.ilab-upload-selected {\n box-shadow: 0 0 0 2px #fff, 0 0 0 5px #0073aa;\n }\n}\n\n.ilab-upload-cell-image {\n background-image: url(../img/ilab-icon-image.svg);\n background-size: 60px;\n}\n\n.ilab-upload-cell-video {\n background-image: url(../img/ilab-icon-video.svg);\n background-size: 60px;\n}\n\n.ilab-upload-cell-doc {\n background-image: url(../img/ilab-icon-document.svg);\n background-size: 45px;\n}\n\n.no-mouse {\n cursor: default !important;\n}\n\n.ilab-upload-item-background {\n position: absolute;\n left: -5px;\n top: -5px;\n right: -5px;\n bottom: -5px;\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center center;\n transition: opacity 0.5s;\n}\n\n.ilab-upload-status-container {\n position: absolute;\n left: 0px;\n top: 0px;\n right: 0px;\n bottom: 0px;\n\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n}\n\n.ilab-upload-status {\n color: white;\n font-weight: bold;\n font-size: 1em;\n text-shadow: 0px 0px 3px rgba(0, 0, 0, 1);\n}\n\n.ilab-upload-progress {\n width: 80%;\n max-width: 80%;\n height: 9px;\n overflow: hidden;\n position: relative;\n margin-top: 10px;\n border-radius: 9px;\n background-color: rgba(255,255,255,0.66);\n}\n\n.ilab-upload-progress-track {\n background-color: #0085ba;\n position: absolute;\n left: 0px;\n top: 0px;\n bottom: 0px;\n transition: width 0.125s ease-out;\n}\n\n.ilab-upload-directions {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n font-size: 2em;\n opacity: 0.5;\n}\n\n.ilab-loader-container {\n display: flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n left: 0px; top: 0px; right: 0px; bottom: 0px;\n transition: opacity 0.5s;\n}\n\n.ilab-loader,\n.ilab-loader:after {\n border-radius: 50%;\n width: 24px;\n height: 24px;\n}\n.ilab-loader {\n font-size: 5px;\n text-indent: -9999em;\n border-top: 1.1em solid rgba(255, 255, 255, 0.2);\n border-right: 1.1em solid rgba(255, 255, 255, 0.2);\n border-bottom: 1.1em solid rgba(255, 255, 255, 0.2);\n border-left: 1.1em solid #ffffff;\n -webkit-animation: load8 1.1s infinite linear;\n animation: load8 1.1s infinite linear;\n}\n@-webkit-keyframes load8 {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n@keyframes load8 {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n.ilab-upload-footer {\n padding-right: 10px;\n position: absolute;\n left: 0px; right: 0px;\n border-top: 1px solid #ddd;\n bottom: 0px; height: 52px;\n background-color: white;\n display: flex;\n justify-content: flex-end;\n align-items: center;\n background-color: rgb(252,252,252);\n visibility: hidden;\n}\n\n#ilab-attachment-info {\n position: absolute;\n right: -300px; top:0px; bottom: 54px;\n width: 267px;\n transition: right 0.33s ease-out;\n}\n\n.ilab-upload-insert-mode {\n position: relative;\n background-color: white;\n\n div.wrap {\n position: absolute;\n left:0px; top:0px; right:0px; bottom: 52px;\n margin: 0px;\n padding: 0px 20px;\n overflow: auto;\n transition: right 0.33s ease-out;\n\n #ilab-video-upload-target {\n }\n\n h2:first-of-type {\n display: none;\n }\n\n }\n\n .ilab-upload-footer {\n visibility: visible;\n }\n}\n\n.ilab-item-selected {\n div.wrap {\n right: 300px;\n }\n\n #ilab-attachment-info {\n right: 0px;\n }\n\n}"],"sourceRoot":"css/"} \ No newline at end of file diff --git a/public/css/ilab-modal.min.css b/public/css/ilab-modal.min.css index 8a036279..a6306b6d 100644 --- a/public/css/ilab-modal.min.css +++ b/public/css/ilab-modal.min.css @@ -1,2 +1 @@ -.ilabm-backdrop{position:fixed;display:block;background-color:rgba(0,0,0,.66);left:0;top:0;right:0;bottom:0;z-index:160000!important}.ilabm-container{z-index:160000!important;background-color:#fcfcfc;position:absolute;left:30px;top:30px;right:30px;bottom:30px;border-radius:0;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.ilabm-container,.ilabm-titlebar{display:-webkit-box;display:-ms-flexbox;display:flex}.ilabm-titlebar{border-bottom:1px solid #ddd;min-height:50px;max-height:50px;box-shadow:0 0 4px rgba(0,0,0,.15)}.ilabm-titlebar h1{-webkit-box-flex:2;-ms-flex:2 100%;flex:2 100%;display:block;margin:0;padding:0 16px;font-size:22px;line-height:50px}.ilabm-titlebar a{display:block;max-width:50px;min-width:50px;border-left:1px solid #ddd}.ilabm-window-area{-ms-flex:2 100%;flex:2 100%;-webkit-box-orient:horizontal;-ms-flex-direction:row;flex-direction:row}.ilabm-window-area,.ilabm-window-area-content{-webkit-box-flex:2;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-direction:normal}.ilabm-window-area-content{background-color:#fff;-ms-flex:2 100%;flex:2 100%;-webkit-box-orient:vertical;-ms-flex-direction:column;flex-direction:column}.ilabm-editor-container{-webkit-box-flex:2;-ms-flex:2 100%;flex:2 100%;position:relative}.ilabm-editor-area{position:absolute;left:0;top:0;right:0;bottom:0;background-image:url(../img/ilab-imgix-edit-bg.png);display:block;margin:10px}.ilabm-sidebar{min-width:350px;max-width:350px;background-color:#f3f3f3;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;border-left:3px solid #ddd}.ilabm-sidebar,.ilabm-sidebar-content{display:-webkit-box;display:-ms-flexbox;display:flex}.ilabm-sidebar-content{position:relative;-webkit-box-flex:2;-ms-flex:2 100%;flex:2 100%}.ilabm-sidebar-tabs{background:#ddd;display:-webkit-box;display:-ms-flexbox;display:flex;min-height:36px;max-height:36px}.ilabm-sidebar-tabs .ilabm-sidebar-tab{min-width:40px;white-space:nowrap;text-align:center;margin-top:3px;background-color:#ccc;line-height:30px;padding:0 15px;margin-right:3px;font-size:11px;text-transform:uppercase;color:#888;font-weight:700;cursor:pointer!important}.ilabm-sidebar-tabs .active-tab{background-color:#f3f3f3;color:#777}.ilabm-sidebar-actions{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;background-color:#fff;border-top:1px solid #eee;padding:11px}.ilabm-sidebar-actions a{display:block;margin-left:10px!important}a.button-reset{background:#a00!important;border-color:#700!important;color:#fff!important;box-shadow:inset 0 1px 0 #d00,0 1px 0 rgba(0,0,0,.15)!important}.ilabm-editor-tabs{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;border-bottom:1px solid #ddd;background:#ddd}.ilabm-editor-tabs .ilabm-editor-tab{white-space:nowrap;min-width:50px;text-align:center;min-height:32px;max-height:33px;margin-top:3px;background-color:#ccc;line-height:31px;padding:0 15px;margin-right:3px;font-size:11px;text-transform:uppercase;color:#888;font-weight:700;cursor:pointer!important}.ilabm-editor-tabs .active-tab{background:#fff;margin-bottom:-1px;margin-top:2px;border-right:1px solid #ddd;border-left:1px solid #ddd;border-top:1px solid #ddd}.ilabm-editor-tabs .ilabm-tabs-select-label{margin-top:3px;line-height:32px;padding:0 5px 0 15px;margin-right:3px;font-size:11px;text-transform:uppercase;color:#888;font-weight:700;cursor:pointer!important}.ilabm-editor-tabs .ilabm-tabs-select{margin-top:4px;line-height:32px;font-size:11px}.ilabm-status-container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex:1;flex:1;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.ilabm-status-container .is-hidden{display:none}.ilabm-status-container .spinner{margin:0 8px 0 0}.ilabm-status-label{font-size:13px}.ilabm-pillbox{padding:10px 0 20px;text-align:center;margin-bottom:10px!important}.ilabm-pillbox .ilabm-pill{white-space:nowrap;line-height:30px;font-size:10px;padding:10px 14px 10px 35px;background-color:#eaeaea;text-transform:uppercase;font-weight:700;color:#444;text-decoration:none;border-radius:8px;margin:3px}.ilabm-pillbox .pill-selected{background-color:#ccc;box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);color:#fff}.ilabm-preview-wait-modal{position:absolute;box-shadow:0 0 10px 1px rgba(0,0,0,.75);text-align:center;padding:20px 40px;border-radius:10px;background-color:hsla(0,0%,100%,.66);left:50%;top:50%;margin-left:-60px;margin-top:-32px}.ilabm-preview-wait-modal h3{text-transform:uppercase;font-size:13px}.ilabm-preview-wait-modal span.spinner{float:none!important}.ilabm-bottom-bar{font-size:12px!important;padding:0 10px 10px;display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;-webkit-box-align:center;-ms-flex-align:center;align-items:center;min-height:20px}.ilabm-bottom-bar .ilabm-bottom-bar-seperator{position:relative;width:1px;height:20px;background-color:#ccc;margin:0 10px 0 20px!important}.ilabm-bottom-bar a,.ilabm-bottom-bar select{margin-left:10px!important}.ilabm-bottom-bar select{font-size:13px!important;min-width:140px}.ilabm-bottom-bar label{font-size:13px!important}.is-hidden{display:none}.ilabm-modal-close{top:0;right:0;cursor:pointer;color:#777;background-color:transparent;height:50px;width:50px;position:absolute;text-align:center;border:0;border-left:1px solid #ddd;transition:color .1s ease-in-out,background .1s ease-in-out;text-decoration:none;z-index:1000;box-sizing:content-box;transition-property:border,background,color;transition-duration:.05s;transition-timing-function:ease-in-out}.ilabm-modal-icon{background-repeat:no-repeat;display:block;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ilabm-modal-icon:before{content:"\f335";font:normal 22px/1 dashicons;vertical-align:middle;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#666} -/*# sourceMappingURL=ilab-modal.min.css.map */ +.ilabm-backdrop{position:fixed;display:block;background-color:rgba(0,0,0,.66);left:0;top:0;right:0;bottom:0;z-index:160000!important}.ilabm-container{z-index:160000!important;background-color:#fcfcfc;position:absolute;left:30px;top:30px;right:30px;bottom:30px;border-radius:0;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.ilabm-container,.ilabm-titlebar{display:-webkit-box;display:-ms-flexbox;display:flex}.ilabm-titlebar{border-bottom:1px solid #ddd;min-height:50px;max-height:50px;box-shadow:0 0 4px rgba(0,0,0,.15)}.ilabm-titlebar h1{-webkit-box-flex:2;-ms-flex:2 100%;flex:2 100%;display:block;margin:0;padding:0 16px;font-size:22px;line-height:50px}.ilabm-titlebar a{display:block;max-width:50px;min-width:50px;border-left:1px solid #ddd}.ilabm-window-area{-ms-flex:2 100%;flex:2 100%;-webkit-box-orient:horizontal;-ms-flex-direction:row;flex-direction:row}.ilabm-window-area,.ilabm-window-area-content{-webkit-box-flex:2;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-direction:normal}.ilabm-window-area-content{background-color:#fff;-ms-flex:2 100%;flex:2 100%;-webkit-box-orient:vertical;-ms-flex-direction:column;flex-direction:column}.ilabm-editor-container{-webkit-box-flex:2;-ms-flex:2 100%;flex:2 100%;position:relative}.ilabm-editor-area{position:absolute;left:0;top:0;right:0;bottom:0;background-image:url(../img/ilab-imgix-edit-bg.png);display:block;margin:10px}.ilabm-sidebar{min-width:350px;max-width:350px;background-color:#f3f3f3;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;border-left:3px solid #ddd}.ilabm-sidebar,.ilabm-sidebar-content{display:-webkit-box;display:-ms-flexbox;display:flex}.ilabm-sidebar-content{position:relative;-webkit-box-flex:2;-ms-flex:2 100%;flex:2 100%}.ilabm-sidebar-tabs{background:#ddd;display:-webkit-box;display:-ms-flexbox;display:flex;min-height:36px;max-height:36px}.ilabm-sidebar-tabs .ilabm-sidebar-tab{min-width:40px;white-space:nowrap;text-align:center;margin-top:3px;background-color:#ccc;line-height:30px;padding:0 15px;margin-right:3px;font-size:11px;text-transform:uppercase;color:#888;font-weight:700;cursor:pointer!important}.ilabm-sidebar-tabs .active-tab{background-color:#f3f3f3;color:#777}.ilabm-sidebar-actions{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;background-color:#fff;border-top:1px solid #eee;padding:11px}.ilabm-sidebar-actions a{display:block;margin-left:10px!important}a.button-reset{background:#a00!important;border-color:#700!important;color:#fff!important;box-shadow:inset 0 1px 0 #d00,0 1px 0 rgba(0,0,0,.15)!important}.ilabm-editor-tabs{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;border-bottom:1px solid #ddd;background:#ddd}.ilabm-editor-tabs .ilabm-editor-tab{white-space:nowrap;min-width:50px;text-align:center;min-height:32px;max-height:33px;margin-top:3px;background-color:#ccc;line-height:31px;padding:0 15px;margin-right:3px;font-size:11px;text-transform:uppercase;color:#888;font-weight:700;cursor:pointer!important}.ilabm-editor-tabs .active-tab{background:#fff;margin-bottom:-1px;margin-top:2px;border-right:1px solid #ddd;border-left:1px solid #ddd;border-top:1px solid #ddd}.ilabm-editor-tabs .ilabm-tabs-select-label{margin-top:3px;line-height:32px;padding:0 5px 0 15px;margin-right:3px;font-size:11px;text-transform:uppercase;color:#888;font-weight:700;cursor:pointer!important}.ilabm-editor-tabs .ilabm-tabs-select{margin-top:4px;line-height:32px;font-size:11px}.ilabm-status-container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex:1;flex:1;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.ilabm-status-container .is-hidden{display:none}.ilabm-status-container .spinner{margin:0 8px 0 0}.ilabm-status-label{font-size:13px}.ilabm-pillbox{padding:10px 0 20px;text-align:center;margin-bottom:10px!important}.ilabm-pillbox .ilabm-pill{white-space:nowrap;line-height:30px;font-size:10px;padding:10px 14px 10px 35px;background-color:#eaeaea;text-transform:uppercase;font-weight:700;color:#444;text-decoration:none;border-radius:8px;margin:3px}.ilabm-pillbox .pill-selected{background-color:#ccc;box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);color:#fff}.ilabm-preview-wait-modal{position:absolute;box-shadow:0 0 10px 1px rgba(0,0,0,.75);text-align:center;padding:20px 40px;border-radius:10px;background-color:hsla(0,0%,100%,.66);left:50%;top:50%;margin-left:-60px;margin-top:-32px}.ilabm-preview-wait-modal h3{text-transform:uppercase;font-size:13px}.ilabm-preview-wait-modal span.spinner{float:none!important}.ilabm-bottom-bar{font-size:12px!important;padding:0 10px 10px;display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;-webkit-box-align:center;-ms-flex-align:center;align-items:center;min-height:20px}.ilabm-bottom-bar .ilabm-bottom-bar-seperator{position:relative;width:1px;height:20px;background-color:#ccc;margin:0 10px 0 20px!important}.ilabm-bottom-bar a,.ilabm-bottom-bar select{margin-left:10px!important}.ilabm-bottom-bar select{font-size:13px!important;min-width:140px}.ilabm-bottom-bar label{font-size:13px!important}.is-hidden{display:none}.ilabm-modal-close{top:0;right:0;cursor:pointer;color:#777;background-color:transparent;height:50px;width:50px;position:absolute;text-align:center;border:0;border-left:1px solid #ddd;transition:color .1s ease-in-out,background .1s ease-in-out;text-decoration:none;z-index:1000;box-sizing:content-box;transition-property:border,background,color;transition-duration:.05s;transition-timing-function:ease-in-out}.ilabm-modal-icon{background-repeat:no-repeat;display:block;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ilabm-modal-icon:before{content:"\f335";font:normal 22px/1 dashicons;vertical-align:middle;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#666} \ No newline at end of file diff --git a/public/css/ilab-modal.min.css.map b/public/css/ilab-modal.min.css.map deleted file mode 100644 index 7845f140..00000000 --- a/public/css/ilab-modal.min.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../styles/ilab-modal.scss"],"names":[],"mappings":"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","file":"ilab-modal.min.css","sourcesContent":[".ilabm-backdrop {\n position: fixed;\n display: block;\n background-color:rgba(0,0,0,0.66);\n left:0px; top:0px; right:0px; bottom:0px;\n z-index: 160000 !important;\n}\n\n.ilabm-container {\n z-index: 160000 !important;\n background-color: rgb(252, 252, 252);\n position: absolute;\n left: 30px;\n top: 30px;\n right: 30px;\n bottom: 30px;\n border-radius: 0px;\n\n display: flex;\n flex-direction: column;\n}\n\n.ilabm-titlebar {\n border-bottom: 1px solid #ddd;\n min-height: 50px;\n max-height: 50px;\n box-shadow: 0px 0px 4px rgba(0,0,0,0.15);\n\n display: flex;\n\n h1 {\n flex: 2 100%;\n display:block;\n margin: 0px;\n padding: 0px 16px;\n font-size: 22px;\n line-height: 50px;\n }\n\n a {\n display: block;\n max-width: 50px;\n min-width: 50px;\n border-left: 1px solid #ddd;\n }\n}\n\n.ilabm-window-area {\n flex: 2 100%;\n display: flex;\n flex-direction: row;\n}\n\n.ilabm-window-area-content {\n background-color: #fff;\n flex: 2 100%;\n display: flex;\n flex-direction: column;\n}\n\n.ilabm-editor-container {\n flex: 2 100%;\n position: relative;\n}\n\n.ilabm-editor-area {\n position: absolute;\n left: 0px;\n top: 0px;\n right: 0px;\n bottom: 0px;\n background-image: url(../img/ilab-imgix-edit-bg.png);\n display: block;\n margin: 10px;\n}\n\n.ilabm-sidebar {\n min-width: 350px;\n max-width: 350px;\n background-color: rgb(243, 243, 243);\n display: flex;\n flex-direction: column;\n border-left:3px solid #ddd;\n}\n\n.ilabm-sidebar-content {\n position: relative;\n display: flex;\n flex: 2 100%;\n}\n\n.ilabm-sidebar-tabs {\n background: #ddd;\n display: flex;\n min-height: 36px;\n max-height: 36px;\n\n .ilabm-sidebar-tab {\n min-width:40px;\n white-space: nowrap;\n text-align:center;\n margin-top: 3px;\n background-color: #ccc;\n line-height: 30px;\n padding: 0px 15px;\n margin-right: 3px;\n font-size: 11px;\n text-transform: uppercase;\n color: #888;\n font-weight: bold;\n cursor: pointer !important;\n }\n\n .active-tab {\n background-color: rgb(243, 243, 243);\n color: #777;\n }\n}\n\n.ilabm-sidebar-actions {\n display: flex;\n justify-content: flex-end;\n background-color: white;\n border-top: 1px solid #eee;\n padding: 11px;\n\n a {\n display: block;\n margin-left: 10px !important;\n }\n}\n\na.button-reset {\n background: #AA0000 !important;\n border-color: #770000 !important;\n color: white !important;\n box-shadow: inset 0 1px 0 #DD0000, 0 1px 0 rgba(0, 0, 0, 0.15) !important;\n}\n\n.ilabm-editor-tabs {\n display: flex;\n flex-direction: row;\n border-bottom: 1px solid #ddd;\n background: #ddd;\n\n .ilabm-editor-tab {\n white-space: nowrap;\n min-width: 50px;\n text-align: center;\n min-height: 32px;\n max-height: 33px;\n margin-top: 3px;\n background-color: #ccc;\n line-height: 31px;\n padding: 0px 15px;\n margin-right: 3px;\n font-size: 11px;\n text-transform: uppercase;\n color: #888;\n font-weight: bold;\n cursor: pointer !important;\n }\n\n .active-tab {\n background: white;\n margin-bottom:-1px;\n margin-top: 2px;\n border-right:1px solid #ddd;\n border-left:1px solid #ddd;\n border-top:1px solid #ddd;\n }\n\n .ilabm-tabs-select-label {\n margin-top: 3px;\n line-height: 32px;\n padding: 0px 5px 0px 15px;\n margin-right: 3px;\n font-size: 11px;\n text-transform: uppercase;\n color: #888;\n font-weight: bold;\n cursor: pointer !important;\n }\n\n .ilabm-tabs-select {\n margin-top: 4px;\n line-height: 32px;\n font-size: 11px;\n }\n}\n\n\n\n\n.ilabm-status-container {\n display: flex;\n flex: 1;\n justify-content: flex-start;\n\n .is-hidden {\n display: none;\n }\n\n .spinner {\n margin:0px 8px 0px 0px;\n }\n}\n\n.ilabm-status-label {\n font-size: 13px;\n}\n\n.ilabm-pillbox {\n padding: 10px 0px 20px 0px;\n text-align: center;\n margin-bottom: 10px !important;\n\n .ilabm-pill {\n white-space: nowrap;\n line-height:30px;\n font-size: 10px;\n padding: 10px 14px 10px 35px;\n background-color: #eaeaea;\n text-transform: uppercase;\n font-weight: bold;\n color: #444;\n text-decoration: none;\n border-radius: 8px;\n margin:3px;\n }\n\n .pill-selected {\n background-color: #ccc;\n box-shadow: inset 1px 1px 1px rgba(0,0,0,0.25);\n color: white;\n }\n}\n\n\n.ilabm-preview-wait-modal {\n position:absolute;\n box-shadow: 0px 0px 10px 1px rgba(0,0,0,0.75);\n text-align:center;\n padding: 20px 40px;\n border-radius: 10px;\n background-color: rgba(255,255,255,0.66);\n left:50%;\n top:50%;\n margin-left:-60px;\n margin-top:-32px;\n\n h3 {\n text-transform: uppercase;\n font-size: 13px;\n }\n\n span.spinner {\n float: none !important;\n }\n}\n\n.ilabm-bottom-bar {\n font-size: 12px !important;\n padding: 0px 10px 10px 10px;\n display: flex !important;\n justify-content: flex-end;\n align-items: center;\n min-height: 20px;\n\n .ilabm-bottom-bar-seperator {\n position: relative;\n width:1px;\n height:20px;\n background-color: #ccc;\n margin: 0px 10px 0px 20px !important;\n }\n\n a {\n margin-left: 10px !important;\n }\n\n select {\n font-size: 13px !important;\n min-width: 140px;\n margin-left: 10px !important;\n }\n\n label {\n font-size: 13px !important;\n }\n}\n\n.is-hidden {\n display:none;\n}\n\n.ilabm-modal-close {\n top: 0;\n right: 0;\n cursor: pointer;\n color: #777;\n background-color: transparent;\n height: 50px;\n width: 50px;\n position: absolute;\n text-align: center;\n border: 0;\n border-left: 1px solid #ddd;\n transition: color .1s ease-in-out, background .1s ease-in-out;\n text-decoration: none;\n z-index: 1000;\n box-sizing: content-box;\n transition-property: border, background, color;\n transition-duration: .05s;\n transition-timing-function: ease-in-out;\n}\n\n.ilabm-modal-icon {\n background-repeat: no-repeat;\n display: block;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%,-50%);\n}\n\n.ilabm-modal-icon:before {\n content: '\\f335';\n font: normal 22px/1 'dashicons';\n vertical-align: middle;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n color: #666;\n}"],"sourceRoot":"css/"} \ No newline at end of file diff --git a/public/js/ilab-media-tools.js b/public/js/ilab-media-tools.js index 005e048a..d13dbd7d 100644 --- a/public/js/ilab-media-tools.js +++ b/public/js/ilab-media-tools.js @@ -1,2 +1 @@ -(function(e){'function'==typeof define&&define.amd?define(['jquery'],e):'object'==typeof exports?e(require('jquery')):e(jQuery)})(function(t){'use strict';function e(e){return'number'==typeof e&&!isNaN(e)}function i(e){return'undefined'==typeof e}function a(t,i){var a=[];return e(i)&&a.push(i),a.slice.apply(t,a)}function o(e,t){var i=a(arguments,2);return function(){return e.apply(t,i.concat(a(arguments)))}}function r(e){var t=e.match(/^(https?:)\/\/([^\:\/\?#]+):?(\d*)/i);return t&&(t[1]!==C.protocol||t[2]!==C.hostname||t[3]!==C.port)}function n(e){var t='timestamp='+new Date().getTime();return e+(-1===e.indexOf('?')?'?':'&')+t}function s(e){return e?' crossOrigin="'+e+'"':''}function d(e,t){var i;return e.naturalWidth&&!me?t(e.naturalWidth,e.naturalHeight):void(i=document.createElement('img'),i.onload=function(){t(this.width,this.height)},i.src=e.src)}function l(t){var i=[],a=t.rotate,o=t.scaleX,r=t.scaleY;return e(o)&&e(r)&&i.push('scale('+o+','+r+')'),e(a)&&i.push('rotate('+a+'deg)'),i.length?i.join(' '):'none'}function p(e,t){var i,a,o=xe(e.degree)%180,r=(90')[0],d=s.getContext('2d'),l=0,c=0,h=a.naturalWidth,g=a.naturalHeight,m=a.rotate,u=a.scaleX,f=a.scaleY,v=e(u)&&e(f)&&(1!==u||1!==f),w=e(m)&&0!==m,b=w||v,C=h*xe(u||1),y=g*xe(f||1);return v&&(o=C/2,r=y/2),w&&(n=p({width:C,height:y,degree:m}),C=n.width,y=n.height,o=C/2,r=y/2),s.width=C,s.height=y,b&&(l=-h/2,c=-g/2,d.save(),d.translate(o,r)),v&&d.scale(u,f),w&&d.rotate(m*x/180),d.drawImage(i,Be(l),Be(c),Be(h),Be(g)),b&&d.restore(),s}function h(e){var i=e.length,a=0,o=0;return i&&(t.each(e,function(e,t){a+=t.pageX,o+=t.pageY}),a/=i,o/=i),{pageX:a,pageY:o}}function g(e,t,a){var o,i='';for(o=t,a+=t;o')[0].getContext),me=y&&/(Macintosh|iPhone|iPod|iPad).*AppleWebKit/i.test(y.userAgent),ue=Number,fe=Math.min,ve=Math.max,xe=Math.abs,we=Math.sin,be=Math.cos,Ce=Math.sqrt,ye=Math.round,Be=Math.floor,De=String.fromCharCode;v.prototype={constructor:v,init:function(){var e,t=this.$element;if(t.is('img')){if(this.isImg=!0,this.originalUrl=e=t.attr('src'),!e)return;e=t.prop('src')}else t.is('canvas')&&ge&&(e=t[0].toDataURL());this.load(e)},trigger:function(i,a){var o=t.Event(i,a);return this.$element.trigger(o),o},load:function(e){var i,a,o=this.options,s=this.$element;if(e)return(s.one(U,o.build),!this.trigger(U).isDefaultPrevented())?(this.url=e,this.image={},!o.checkOrientation||!B)?this.clone():(i=t.proxy(this.read,this),K.test(e)?Q.test(e)?i(u(e)):this.clone():void(a=new XMLHttpRequest,a.onerror=a.onabort=t.proxy(function(){this.clone()},this),a.onload=function(){i(this.response)},o.checkCrossOrigin&&r(e)&&s.prop('crossOrigin')&&(e=n(e)),a.open('get',e),a.responseType='arraybuffer',a.send())):void 0},read:function(e){var t,i,a,o=this.options,r=m(e),n=this.image;1'),this.isImg?o[0].complete?this.start():o.one(H,t.proxy(this.start,this)):i.one(H,t.proxy(this.start,this)).one(R,t.proxy(this.stop,this)).addClass(_).insertAfter(o)},start:function(){var e=this.$element,i=this.$clone;this.isImg||(i.off(R,this.stop),e=i),d(e[0],t.proxy(function(e,i){t.extend(this.image,{naturalWidth:e,naturalHeight:i,aspectRatio:e/i}),this.isLoaded=!0,this.build()},this))},stop:function(){this.$clone.remove(),this.$clone=null},build:function(){var e,i,a,o=this.options,r=this.$element,n=this.$clone;this.isLoaded&&(this.isBuilt&&this.unbuild(),this.$container=r.parent(),this.$cropper=e=t(v.TEMPLATE),this.$canvas=e.find('.cropper-canvas').append(n),this.$dragBox=e.find('.cropper-drag-box'),this.$cropBox=i=e.find('.cropper-crop-box'),this.$viewBox=e.find('.cropper-view-box'),this.$face=a=i.find('.cropper-face'),r.addClass(I).after(e),!this.isImg&&n.removeClass(_),this.initPreview(),this.bind(),o.aspectRatio=ve(0,o.aspectRatio)||NaN,o.viewMode=ve(0,fe(3,ye(o.viewMode)))||0,o.autoCrop?(this.isCropped=!0,o.modal&&this.$dragBox.addClass($)):i.addClass(I),!o.guides&&i.find('.cropper-dashed').addClass(I),!o.center&&i.find('.cropper-center').addClass(I),o.cropBoxMovable&&a.addClass(L).data(ee,le),!o.highlight&&a.addClass('cropper-invisible'),o.background&&e.addClass('cropper-bg'),!o.cropBoxResizable&&i.find('.cropper-line, .cropper-point').addClass(I),this.setDragMode(o.dragMode),this.render(),this.isBuilt=!0,this.setData(o.data),r.one(A,o.built),setTimeout(t.proxy(function(){this.trigger(A),this.trigger(N,this.getData()),this.isCompleted=!0},this),0))},unbuild:function(){this.isBuilt&&(this.isBuilt=!1,this.isCompleted=!1,this.initialImage=null,this.initialCanvas=null,this.initialCropBox=null,this.container=null,this.canvas=null,this.cropBox=null,this.unbind(),this.resetPreview(),this.$preview=null,this.$viewBox=null,this.$cropBox=null,this.$dragBox=null,this.$canvas=null,this.$container=null,this.$cropper.remove(),this.$cropper=null)},render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.isCropped&&this.renderCropBox()},initContainer:function(){var e=this.options,t=this.$element,i=this.$container,a=this.$cropper;a.addClass(I),t.removeClass(I),a.css(this.container={width:ve(i.width(),ue(e.minContainerWidth)||200),height:ve(i.height(),ue(e.minContainerHeight)||100)}),t.addClass(I),a.removeClass(I)},initCanvas:function(){var e,i=this.options.viewMode,a=this.container,o=a.width,r=a.height,n=this.image,s=n.naturalWidth,d=n.naturalHeight,l=90===xe(n.rotate),p=l?d:s,c=l?s:d,h=p/c,g=o,m=r;r*h>o?3===i?g=r*h:m=o/h:3===i?m=o/h:g=r*h,e={naturalWidth:p,naturalHeight:c,aspectRatio:h,width:g,height:m},e.oldLeft=e.left=(o-g)/2,e.oldTop=e.top=(r-m)/2,this.canvas=e,this.isLimited=1===i||2===i,this.limitCanvas(!0,!0),this.initialImage=t.extend({},n),this.initialCanvas=t.extend({},e)},limitCanvas:function(e,t){var i,a,o,r,n=this.options,s=n.viewMode,d=this.container,l=d.width,p=d.height,c=this.canvas,h=c.aspectRatio,g=this.cropBox,m=this.isCropped&&g;e&&(i=ue(n.minCanvasWidth)||0,a=ue(n.minCanvasHeight)||0,s&&(1i?i=a*h:a=i/h)):i?i=ve(i,m?g.width:0):a?a=ve(a,m?g.height:0):m&&(i=g.width,a=g.height,a*h>i?i=a*h:a=i/h)),i&&a?a*h>i?a=i/h:i=a*h:i?a=i/h:a&&(i=a*h),c.minWidth=i,c.minHeight=a,c.maxWidth=Infinity,c.maxHeight=Infinity),t&&(s?(o=l-c.width,r=p-c.height,c.minLeft=fe(0,o),c.minTop=fe(0,r),c.maxLeft=ve(0,o),c.maxTop=ve(0,r),m&&this.isLimited&&(c.minLeft=fe(g.left,g.left+g.width-c.width),c.minTop=fe(g.top,g.top+g.height-c.height),c.maxLeft=g.left,c.maxTop=g.top,2===s&&(c.width>=l&&(c.minLeft=fe(0,o),c.maxLeft=ve(0,o)),c.height>=p&&(c.minTop=fe(0,r),c.maxTop=ve(0,r))))):(c.minLeft=-c.width,c.minTop=-c.height,c.maxLeft=l,c.maxTop=p))},renderCanvas:function(e){var t,i,a=this.canvas,o=this.image,r=o.rotate,n=o.naturalWidth,s=o.naturalHeight;this.isRotated&&(this.isRotated=!1,i=p({width:o.width,height:o.height,degree:r}),t=i.width/i.height,t!==a.aspectRatio&&(a.left-=(i.width-a.width)/2,a.top-=(i.height-a.height)/2,a.width=i.width,a.height=i.height,a.aspectRatio=t,a.naturalWidth=n,a.naturalHeight=s,r%180&&(i=p({width:n,height:s,degree:r}),a.naturalWidth=i.width,a.naturalHeight=i.height),this.limitCanvas(!0,!1))),(a.width>a.maxWidth||a.widtha.maxHeight||a.heighti.width?r.height=r.width/a:r.width=r.height*a),this.cropBox=r,this.limitCropBox(!0,!0),r.width=fe(ve(r.width,r.minWidth),r.maxWidth),r.height=fe(ve(r.height,r.minHeight),r.maxHeight),r.width=ve(r.minWidth,r.width*o),r.height=ve(r.minHeight,r.height*o),r.oldLeft=r.left=i.left+(i.width-r.width)/2,r.oldTop=r.top=i.top+(i.height-r.height)/2,this.initialCropBox=t.extend({},r)},limitCropBox:function(e,t){var i,a,o,r,n=this.options,s=n.aspectRatio,d=this.container,l=d.width,p=d.height,c=this.canvas,h=this.cropBox,g=this.isLimited;e&&(i=ue(n.minCropBoxWidth)||0,a=ue(n.minCropBoxHeight)||0,i=fe(i,l),a=fe(a,p),o=fe(l,g?c.width:l),r=fe(p,g?c.height:p),s&&(i&&a?a*s>i?a=i/s:i=a*s:i?a=i/s:a&&(i=a*s),r*s>o?r=o/s:o=r*s),h.minWidth=fe(i,o),h.minHeight=fe(a,r),h.maxWidth=o,h.maxHeight=r),t&&(g?(h.minLeft=ve(0,c.left),h.minTop=ve(0,c.top),h.maxLeft=fe(l,c.left+c.width)-h.width,h.maxTop=fe(p,c.top+c.height)-h.height):(h.minLeft=0,h.minTop=0,h.maxLeft=l-h.width,h.maxTop=p-h.height))},renderCropBox:function(){var e=this.options,t=this.container,i=t.width,a=t.height,o=this.cropBox;(o.width>o.maxWidth||o.widtho.maxHeight||o.height'),this.$viewBox.html(e),this.$preview.each(function(){var e=t(this);e.data(G,{width:e.width(),height:e.height(),html:e.html()}),e.html('')})},resetPreview:function(){this.$preview.each(function(){var e=t(this),i=e.data(G);e.css({width:i.width,height:i.height}).html(i.html).removeData(G)})},preview:function(){var e=this.image,i=this.canvas,a=this.cropBox,o=a.width,r=a.height,n=e.width,s=e.height,d=a.left-i.left-e.left,p=a.top-i.top-e.top;!this.isCropped||this.isDisabled||(this.$clone2.css({width:n,height:s,marginLeft:-d,marginTop:-p,transform:l(e)}),this.$preview.each(function(){var i=t(this),a=i.data(G),c=a.width,h=a.height,g=c,m=h,u=1;o&&(u=c/o,m=r*u),r&&m>h&&(u=h/r,g=o*u,m=h),i.css({width:g,height:m}).find('img').css({width:n*u,height:s*u,marginLeft:-d*u,marginTop:-p*u,transform:l(e)})}))},bind:function(){var e=this.options,i=this.$element,a=this.$cropper;t.isFunction(e.cropstart)&&i.on(V,e.cropstart),t.isFunction(e.cropmove)&&i.on(j,e.cropmove),t.isFunction(e.cropend)&&i.on(F,e.cropend),t.isFunction(e.crop)&&i.on(N,e.crop),t.isFunction(e.zoom)&&i.on(Z,e.zoom),a.on(W,t.proxy(this.cropStart,this)),e.zoomable&&e.zoomOnWheel&&a.on(X,t.proxy(this.wheel,this)),e.toggleDragModeOnDblclick&&a.on(M,t.proxy(this.dblclick,this)),b.on(z,this._cropMove=o(this.cropMove,this)).on(Y,this._cropEnd=o(this.cropEnd,this)),e.responsive&&w.on(E,this._resize=o(this.resize,this))},unbind:function(){var e=this.options,i=this.$element,a=this.$cropper;t.isFunction(e.cropstart)&&i.off(V,e.cropstart),t.isFunction(e.cropmove)&&i.off(j,e.cropmove),t.isFunction(e.cropend)&&i.off(F,e.cropend),t.isFunction(e.crop)&&i.off(N,e.crop),t.isFunction(e.zoom)&&i.off(Z,e.zoom),a.off(W,this.cropStart),e.zoomable&&e.zoomOnWheel&&a.off(X,this.wheel),e.toggleDragModeOnDblclick&&a.off(M,this.dblclick),b.off(z,this._cropMove).off(Y,this._cropEnd),e.responsive&&w.off(E,this._resize)},resize:function(){var e,a,o,i=this.options.restore,r=this.$container,n=this.container;this.isDisabled||!n||(o=r.width()/n.width,(1!==o||r.height()!==n.height)&&(i&&(e=this.getCanvasData(),a=this.getCropBoxData()),this.render(),i&&(this.setCanvasData(t.each(e,function(t,i){e[t]=i*o})),this.setCropBoxData(t.each(a,function(e,t){a[e]=t*o})))))},dblclick:function(){this.isDisabled||(this.$dragBox.hasClass(T)?this.setDragMode(ce):this.setDragMode(pe))},wheel:function(i){var a=i.originalEvent||i,e=ue(this.options.wheelZoomRatio)||0.1,o=1;this.isDisabled||(i.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout(t.proxy(function(){this.wheeling=!1},this),50),a.deltaY?o=0=x||r&&(g<=v||u>=w))){b=!1;break}p+=a.x,r&&(c=p/r,g-=a.Y/2),0>p&&(n=ie,p=0);break;case oe:if(0>=a.y&&(g<=v||r&&(h<=f||m>=x))){b=!1;break}c-=a.y,g+=a.y,r&&(p=c*r,h+=a.X/2),0>c&&(n=ae,c=0);break;case ie:if(0>=a.x&&(h<=f||r&&(g<=v||u>=w))){b=!1;break}p-=a.x,h+=a.x,r&&(c=p/r,g+=a.Y/2),0>p&&(n=te,p=0);break;case ae:if(0<=a.y&&(u>=w||r&&(h<=f||m>=x))){b=!1;break}c+=a.y,r&&(p=c*r,h-=a.X/2),0>c&&(n=oe,c=0);break;case se:if(r){if(0>=a.y&&(g<=v||m>=x)){b=!1;break}c-=a.y,g+=a.y,p=c*r}else 0<=a.x?m=a.y&&g<=v&&(b=!1):p+=a.x,0>=a.y?g>v&&(c-=a.y,g+=a.y):(c-=a.y,g+=a.y);0>p&&0>c?(n=ne,c=0,p=0):0>p?(n=de,p=0):0>c&&(n=re,c=0);break;case de:if(r){if(0>=a.y&&(g<=v||h<=f)){b=!1;break}c-=a.y,g+=a.y,p=c*r,h+=a.X}else 0>=a.x?h>f?(p-=a.x,h+=a.x):0>=a.y&&g<=v&&(b=!1):(p-=a.x,h+=a.x),0>=a.y?g>v&&(c-=a.y,g+=a.y):(c-=a.y,g+=a.y);0>p&&0>c?(n=re,c=0,p=0):0>p?(n=se,p=0):0>c&&(n=ne,c=0);break;case ne:if(r){if(0>=a.x&&(h<=f||u>=w)){b=!1;break}p-=a.x,h+=a.x,c=p/r}else 0>=a.x?h>f?(p-=a.x,h+=a.x):0<=a.y&&u>=w&&(b=!1):(p-=a.x,h+=a.x),0<=a.y?up&&0>c?(n=se,c=0,p=0):0>p?(n=re,p=0):0>c&&(n=de,c=0);break;case re:if(r){if(0<=a.x&&(m>=x||u>=w)){b=!1;break}p+=a.x,c=p/r}else 0<=a.x?m=w&&(b=!1):p+=a.x,0<=a.y?up&&0>c?(n=de,c=0,p=0):0>p?(n=ne,p=0):0>c&&(n=se,c=0);break;case ce:this.move(a.x,a.y),b=!1;break;case he:this.zoom(function(e,t,i,a){var o=Ce(e*e+t*t),r=Ce(i*i+a*a);return(r-o)/o}(xe(this.startX-this.startX2),xe(this.startY-this.startY2),xe(this.endX-this.endX2),xe(this.endY-this.endY2)),t),this.startX2=this.endX2,this.startY2=this.endY2,b=!1;break;case pe:if(!a.x||!a.y){b=!1;break}i=this.$cropper.offset(),h=this.startX-i.left,g=this.startY-i.top,p=l.minWidth,c=l.minHeight,0a.x&&(h-=p,n=0a.y&&(g-=c),this.isCropped||(this.$cropBox.removeClass(I),this.isCropped=!0,this.isLimited&&this.limitCropBox(!0,!0));}b&&(l.width=p,l.height=c,l.left=h,l.top=g,this.action=n,this.renderCropBox()),this.startX=this.endX,this.startY=this.endY},crop:function(){!this.isBuilt||this.isDisabled||(!this.isCropped&&(this.isCropped=!0,this.limitCropBox(!0,!0),this.options.modal&&this.$dragBox.addClass($),this.$cropBox.removeClass(I)),this.setCropBoxData(this.initialCropBox))},reset:function(){!this.isBuilt||this.isDisabled||(this.image=t.extend({},this.initialImage),this.canvas=t.extend({},this.initialCanvas),this.cropBox=t.extend({},this.initialCropBox),this.renderCanvas(),this.isCropped&&this.renderCropBox())},clear:function(){!this.isCropped||this.isDisabled||(t.extend(this.cropBox,{left:0,top:0,width:0,height:0}),this.isCropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),this.$dragBox.removeClass($),this.$cropBox.addClass(I))},replace:function(e,t){!this.isDisabled&&e&&(this.isImg&&this.$element.attr('src',e),t?(this.url=e,this.$clone.attr('src',e),this.isBuilt&&this.$preview.find('img').add(this.$clone2).attr('src',e)):(this.isImg&&(this.isReplaced=!0),this.options.data=null,this.load(e)))},enable:function(){this.isBuilt&&(this.isDisabled=!1,this.$cropper.removeClass(O))},disable:function(){this.isBuilt&&(this.isDisabled=!0,this.$cropper.addClass(O))},destroy:function(){var e=this.$element;this.isLoaded?(this.isImg&&this.isReplaced&&e.attr('src',this.originalUrl),this.unbuild(),e.removeClass(I)):this.isImg?e.off(H,this.start):this.$clone&&this.$clone.remove(),e.removeData(P)},move:function(e,t){var a=this.canvas;this.moveTo(i(e)?e:a.left+ue(e),i(t)?t:a.top+ue(t))},moveTo:function(t,a){var o=this.canvas,r=!1;i(a)&&(a=t),t=ue(t),a=ue(a),this.isBuilt&&!this.isDisabled&&this.options.movable&&(e(t)&&(o.left=t,r=!0),e(a)&&(o.top=a,r=!0),r&&this.renderCanvas(!0))},zoom:function(e,t){var i=this.canvas;e=ue(e),e=0>e?1/(1-e):1+e,this.zoomTo(i.width*e/i.naturalWidth,t)},zoomTo:function(e,t){var i,a,o,r,n,s=this.options,d=this.canvas,l=d.width,p=d.height,c=d.naturalWidth,g=d.naturalHeight;if(e=ue(e),0<=e&&this.isBuilt&&!this.isDisabled&&s.zoomable){if(a=c*e,o=g*e,t&&(i=t.originalEvent),this.trigger(Z,{originalEvent:i,oldRatio:l/c,ratio:a/c}).isDefaultPrevented())return;i?(r=this.$cropper.offset(),n=i.touches?h(i.touches):{pageX:t.pageX||i.pageX||0,pageY:t.pageY||i.pageY||0},d.left-=(a-l)*((n.pageX-r.left-d.left)/l),d.top-=(o-p)*((n.pageY-r.top-d.top)/p)):(d.left-=(a-l)/2,d.top-=(o-p)/2),d.width=a,d.height=o,this.renderCanvas(!0)}},rotate:function(e){this.rotateTo((this.image.rotate||0)+ue(e))},rotateTo:function(t){t=ue(t),e(t)&&this.isBuilt&&!this.isDisabled&&this.options.rotatable&&(this.image.rotate=t%360,this.isRotated=!0,this.renderCanvas(!0))},scale:function(t,a){var o=this.image,r=!1;i(a)&&(a=t),t=ue(t),a=ue(a),this.isBuilt&&!this.isDisabled&&this.options.scalable&&(e(t)&&(o.scaleX=t,r=!0),e(a)&&(o.scaleY=a,r=!0),r&&this.renderImage(!0))},scaleX:function(t){var i=this.image.scaleY;this.scale(t,e(i)?i:1)},scaleY:function(t){var i=this.image.scaleX;this.scale(e(i)?i:1,t)},getData:function(e){var a,o,i=this.options,r=this.image,n=this.canvas,s=this.cropBox;return this.isBuilt&&this.isCropped?(o={x:s.left-n.left,y:s.top-n.top,width:s.width,height:s.height},a=r.width/r.naturalWidth,t.each(o,function(t,i){i/=a,o[t]=e?ye(i):i})):o={x:0,y:0,width:0,height:0},i.rotatable&&(o.rotate=r.rotate||0),i.scalable&&(o.scaleX=r.scaleX||1,o.scaleY=r.scaleY||1),o},setData:function(i){var a,o,r,n=this.options,s=this.image,d=this.canvas,l={};t.isFunction(i)&&(i=i.call(this.element)),this.isBuilt&&!this.isDisabled&&t.isPlainObject(i)&&(n.rotatable&&e(i.rotate)&&i.rotate!==s.rotate&&(s.rotate=i.rotate,this.isRotated=a=!0),n.scalable&&(e(i.scaleX)&&i.scaleX!==s.scaleX&&(s.scaleX=i.scaleX,o=!0),e(i.scaleY)&&i.scaleY!==s.scaleY&&(s.scaleY=i.scaleY,o=!0)),a?this.renderCanvas():o&&this.renderImage(),r=s.width/s.naturalWidth,e(i.x)&&(l.left=i.x*r+d.left),e(i.y)&&(l.top=i.y*r+d.top),e(i.width)&&(l.width=i.width*r),e(i.height)&&(l.height=i.height*r),this.setCropBoxData(l))},getContainerData:function(){return this.isBuilt?this.container:{}},getImageData:function(){return this.isLoaded?this.image:{}},getCanvasData:function(){var e=this.canvas,a={};return this.isBuilt&&t.each(['left','top','width','height','naturalWidth','naturalHeight'],function(t,i){a[i]=e[i]}),a},setCanvasData:function(i){var a=this.canvas,o=a.aspectRatio;t.isFunction(i)&&(i=i.call(this.$element)),this.isBuilt&&!this.isDisabled&&t.isPlainObject(i)&&(e(i.left)&&(a.left=i.left),e(i.top)&&(a.top=i.top),e(i.width)?(a.width=i.width,a.height=i.width/o):e(i.height)&&(a.height=i.height,a.width=i.height*o),this.renderCanvas(!0))},getCropBoxData:function(){var e,t=this.cropBox;return this.isBuilt&&this.isCropped&&(e={left:t.left,top:t.top,width:t.width,height:t.height}),e||{}},setCropBoxData:function(i){var a,o,r=this.cropBox,n=this.options.aspectRatio;t.isFunction(i)&&(i=i.call(this.$element)),this.isBuilt&&this.isCropped&&!this.isDisabled&&t.isPlainObject(i)&&(e(i.left)&&(r.left=i.left),e(i.top)&&(r.top=i.top),e(i.width)&&(a=!0,r.width=i.width),e(i.height)&&(o=!0,r.height=i.height),n&&(a?r.height=r.width/n:o&&(r.width=r.height*n)),this.renderCropBox())},getCroppedCanvas:function(e){var i,a,o,r,n,s,d,l,p,h,g;if(this.isBuilt&&ge)return this.isCropped?(t.isPlainObject(e)||(e={}),g=this.getData(),i=g.width,a=g.height,l=i/a,t.isPlainObject(e)&&(n=e.width,s=e.height,n?(s=n/l,d=n/i):s&&(n=s*l,d=s/a)),o=Be(n||i),r=Be(s||a),p=t('')[0],p.width=o,p.height=r,h=p.getContext('2d'),e.fillColor&&(h.fillStyle=e.fillColor,h.fillRect(0,0,o,r)),h.drawImage.apply(h,function(){var e,t,o,r,n,s,l=c(this.$clone[0],this.image),p=l.width,h=l.height,m=this.canvas,u=[l],f=g.x+m.naturalWidth*(xe(g.scaleX||1)-1)/2,v=g.y+m.naturalHeight*(xe(g.scaleY||1)-1)/2;return f<=-i||f>p?f=e=o=n=0:0>=f?(o=-f,f=0,e=n=fe(p,i+f)):f<=p&&(o=0,e=n=fe(i,p-f)),0>=e||v<=-a||v>h?v=t=r=s=0:0>=v?(r=-v,v=0,t=s=fe(h,a+v)):v<=h&&(r=0,t=s=fe(a,h-v)),u.push(Be(f),Be(v),Be(e),Be(t)),d&&(o*=d,r*=d,n*=d,s*=d),0
',v.other=t.fn.cropper,t.fn.cropper=function(e){var o,r=a(arguments,1);return this.each(function(){var i,a,n=t(this),s=n.data(P);if(!s){if(/destroy/.test(e))return;i=t.extend({},n.data(),t.isPlainObject(e)&&e),n.data(P,s=new v(this,i))}'string'==typeof e&&t.isFunction(a=s[e])&&(o=a.apply(s,r))}),i(o)?this:o},t.fn.cropper.Constructor=v,t.fn.cropper.setDefaults=v.setDefaults,t.fn.cropper.noConflict=function(){return t.fn.cropper=v.other,this}});var ILabCrop=function(e,t){this.settings=t,this.modalContainer=e('#ilabm-container-'+t.modal_id),this.cropper=this.modalContainer.find('.ilabc-cropper'),this.cropperData={},this.modal_id=t.modal_id;var i,a=this,o=!1;this.modalContainer.find('.ilabm-editor-tabs').ilabTabs({currentValue:this.settings.size,tabSelected:function(e){ILabModal.loadURL(e.data('url'),!0,function(e){a.bindUI(e)})}}),e(window).resize(function(){o||(data=a.cropper.cropper('getData'),a.settings.prev_crop_x=data.x,a.settings.prev_crop_y=data.y,a.settings.prev_crop_width=data.width,a.settings.prev_crop_height=data.height),o=!0,a.updatePreviewWidth(),clearTimeout(i),i=setTimeout(a._resized,250)}),this.modalContainer.find('.ilabc-button-crop').on('click',function(t){return t.preventDefault(),a.crop(),!1}),this._resized=function(){a.bindUI(a.settings),o=!1},this.updatePreviewWidth=function(){var e=this.modalContainer.find('.ilab-crop-preview-title').width();this.modalContainer.find('.ilab-crop-preview').css({height:e/a.settings.aspect_ratio+'px',width:e+'px'})},this.bindUI=function(e){this.settings=e,this.cropper.cropper('destroy'),this.cropper.off('built.cropper'),e.hasOwnProperty('cropped_src')&&null!==e.cropped_src&&this.modalContainer.find('.ilab-current-crop-img').attr('src',e.cropped_src),e.hasOwnProperty('size_title')&&null!==e.size_title&&this.modalContainer.find('.ilabc-crop-size-title').text('Current '+e.size_title+' ('+e.min_width+' x '+e.min_height+')'),'undefined'!=typeof e.aspect_ratio&&(this.updatePreviewWidth(),'undefined'!=typeof e.prev_crop_x&&null!==e.prev_crop_x&&(this.cropperData={x:e.prev_crop_x,y:e.prev_crop_y,width:e.prev_crop_width,height:e.prev_crop_height}),this.cropper.on('built.cropper',function(){a.updatePreviewWidth()}).on('crop.cropper',function(){}).cropper({viewMode:1,aspectRatio:e.aspect_ratio,minWidth:e.min_width,minHeight:e.min_height,modal:!0,zoomable:!1,mouseWheelZoom:!1,dragCrop:!1,autoCropArea:1,movable:!1,data:this.cropperData,checkImageOrigin:!1,checkCrossOrigin:!1,responsive:!0,preview:'#ilabm-container-'+this.modal_id+' .ilab-crop-preview'}))},this.crop=function(){var e=this;this.displayStatus('Saving crop ...');var t=this.cropper.cropper('getData');t.action='ilab_perform_crop',t.post=this.settings.image_id,t.size=this.settings.size,jQuery.post(ajaxurl,t,function(t){'ok'==t.status?(e.modalContainer.find('.ilab-current-crop-img').one('load',function(){e.hideStatus()}),e.modalContainer.find('.ilab-current-crop-img').attr('src',t.src)):e.hideStatus()})},this.displayStatus=function(e){a.modalContainer.find('.ilabm-status-label').text(e),a.modalContainer.find('.ilabm-status-container').removeClass('is-hidden')},this.hideStatus=function(){a.modalContainer.find('.ilabm-status-container').addClass('is-hidden')},this.bindUI(t)},ImgixComponents=function(){return{utilities:{byteToHex:function(e){var t=['0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'];return t[15&e>>4]+t[15&e]}}}}();(function(e){e.fn.imgixLabel=function(t){var i=e.extend({},t);return this.each(function(){var t,a=e(this),o=0,r=e('');a.parent().append(r),r.on('keydown',function(t){if(27==t.keyCode)r.off('blur'),r.off('input'),r.addClass('is-hidden'),i.hasOwnProperty('changed')&&i.changed(o),a.text(o);else if(13==t.keyCode){r.off('blur'),r.off('input');var e=parseInt(r.val());r.addClass('is-hidden'),i.hasOwnProperty('changed')&&i.changed(e),a.text(e)}else if(38==t.keyCode){var e=parseInt(r.val());e++,r.val(e),i.hasOwnProperty('changed')&&i.changed(e),a.text(e)}else if(40==t.keyCode){var e=parseInt(r.val());e--,r.val(e),i.hasOwnProperty('changed')&&i.changed(e),a.text(e)}else return!!(57>t.keyCode)||90t.keyCode||109==t.keyCode||!!t.metaKey||(t.preventDefault(),!1)}),a.on('click',function(n){return n.preventDefault(),r.on('input',function(){var e=parseInt(r.val());i.hasOwnProperty('changed')&&(clearTimeout(t),t=setTimeout(function(){i.changed(e)},500)),a.text(e)}),r.on('blur',function(){var e=parseInt(r.val());r.addClass('is-hidden'),i.hasOwnProperty('changed')&&i.changed(e),a.text(e)}),o=i.hasOwnProperty('currentValue')?i.currentValue():0,r.val(o),r.removeClass('is-hidden'),r.select(),r.focus(),!1})})}})(jQuery),function(){ImgixComponents.ImgixSlider=function(e,t){this.delegate=e,this.container=t,this.valueLabel=t.find('.imgix-param-title-right > h3'),this.slider=t.find('.imgix-param'),this.resetButton=t.find('.imgix-param-reset'),this.defaultValue=t.data('default-value'),this.param=t.data('param');var i=this;this.container.find('.imgix-param-label').imgixLabel({currentValue:function(){return i.slider.val()},changed:function(e){e==i.slider.val()||(i.slider.val(e),i.slider.hide().show(0),i.delegate.preview())}}),this.resetButton.on('click',function(){i.reset()}),this.slider.on('input',function(){i.valueLabel.text(i.slider.val())}),this.slider.on('change',function(){i.valueLabel.text(i.slider.val()),i.delegate.preview()})},ImgixComponents.ImgixSlider.prototype.destroy=function(){this.slider.off('input'),this.slider.off('change'),this.resetButton.off('click')},ImgixComponents.ImgixSlider.prototype.reset=function(e){var t;t=e&&e.hasOwnProperty(this.param)?e[this.param]:this.defaultValue,this.valueLabel.text(t),this.slider.val(t),this.slider.hide().show(0),this.delegate.preview()},ImgixComponents.ImgixSlider.prototype.saveValue=function(e){return this.slider.val()!=this.defaultValue&&(e[this.param]=this.slider.val()),e}}(jQuery),function(){var e=Math.round;ImgixComponents.ImgixColor=function(e,t){this.delegate=e,this.container=t,this.colorPicker=t.find('.imgix-param-color'),this.alphaSlider=t.find('.imgix-param-alpha'),this.type=t.data('param-type'),this.resetButton=t.find('.imgix-param-reset'),this.param=t.data('param'),this.defaultValue=t.data('default-value');var i=this;if('blend-color'==this.type){this.blendParam=t.data('blend-param'),this.blendSelect=t.find('.imgix-param-blend');var a=t.data('blend-value');this.blendSelect.val(a),this.blendSelect.on('change',function(){i.delegate.preview()})}this.colorPicker.wpColorPicker({palettes:!1,change:function(){i.delegate.preview()}}),this.alphaSlider.on('change',function(){i.delegate.preview()}),this.resetButton.on('click',function(){i.reset()})},ImgixComponents.ImgixColor.prototype.destroy=function(){this.alphaSlider.off('change'),'blend-color'==this.type&&this.blendSelect.off('change'),this.resetButton.off('click')},ImgixComponents.ImgixColor.prototype.reset=function(t){var i,a='none';if(void 0!==t&&t.hasOwnProperty(this.blendParam)&&(a=t[this.blendParam]),i=void 0!==t&&t.hasOwnProperty(this.param)?t[this.param]:this.defaultValue,i=i.replace('#',''),8==i.length){var o=100*(parseInt('0x'+i.substring(0,2))/255);i=i.substring(2),this.alphaSlider.val(e(o)),this.alphaSlider.hide().show(0)}else this.alphaSlider.val(0),this.alphaSlider.hide().show(0);this.colorPicker.val('#'+i),this.colorPicker.wpColorPicker('color','#'+i),'blend-color'==this.type&&this.blendSelect.val(a),this.delegate.preview()},ImgixComponents.ImgixColor.prototype.saveValue=function(t){return 0').attr('value','0').text('None')),a.presetSelect.append(e('').attr('value',t).text(a.delegate.settings.presets[t].title))}),a.presetContainer.removeClass('is-hidden'),a.presetSelect.val(a.delegate.settings.currentPreset))},this.clearSelected=function(){a.presetSelect.val(0),a.presetDefaultCheckbox.prop('checked',!1)},this.setCurrentPreset=function(e,t){t?a.presetDefaultCheckbox.prop('checked',!0):a.presetDefaultCheckbox.prop('checked',!1),a.presetSelect.val(e)},this.newPreset=function(){var e=prompt('New preset name');if(null!=e){a.delegate.displayStatus('Saving preset ...');var t={};t.name=e,a.presetDefaultCheckbox.is(':checked')&&(t.make_default=1),a.delegate.postAjax('ilab_imgix_new_preset',t,function(e){a.delegate.hideStatus(),'ok'==e.status&&(a.delegate.settings.currentPreset=e.currentPreset,a.delegate.settings.presets=e.presets,a.init())})}},this.savePreset=function(){if(null!=a.presetSelect.val()){a.delegate.displayStatus('Saving preset ...');var e={};e.key=a.presetSelect.val(),a.presetDefaultCheckbox.is(':checked')&&(e.make_default=1),a.delegate.postAjax('ilab_imgix_save_preset',e,function(){a.delegate.hideStatus()})}},this.deletePreset=function(){if(null!=a.presetSelect.val()&&confirm('Are you sure you want to delete this preset?')){a.delegate.displayStatus('Delete preset ...');var e={};e.key=a.presetSelect.val(),a.delegate.postAjax('ilab_imgix_delete_preset',e,function(e){a.delegate.hideStatus(),'ok'==e.status&&(a.delegate.settings.currentPreset=e.currentPreset,a.delegate.settings.presets=e.presets,a.init(),a.delegate.bindUI(e))})}},this.init()};(function(e){e.fn.ilabSidebarTabs=function(t){var i=e.extend({},t),a=!1;return this.find('.ilabm-sidebar-tab').each(function(){var t=e(this),o=i.container.find('.'+t.data('target'));a||(t.addClass('active-tab'),o.removeClass('is-hidden'),a=!0),t.on('click',function(a){return a.preventDefault(),i.container.find('.ilabm-sidebar-tab').each(function(){var t=e(this),a=i.container.find('.'+t.data('target'));t.removeClass('active-tab'),a.addClass('is-hidden')}),t.addClass('active-tab'),o.removeClass('is-hidden'),!1})})}})(jQuery);var ILabImageEdit=function(e,t){function i(){a.displayStatus('Building preview ...'),a.waitModal.removeClass('is-hidden'),a.postAjax('ilab_imgix_preview',{},function(e){if('ok'==e.status){var t=e.src==a.previewImage.attr('src'),i=!1;a.previewImage.on('load',function(){i=!0,a.waitModal.addClass('is-hidden'),a.hideStatus()}),a.previewImage.on('error',function(){i=!0,a.waitModal.addClass('is-hidden'),a.hideStatus()}),a.previewImage.attr('src',e.src),t&&setTimeout(function(){i||(a.waitModal.addClass('is-hidden'),a.hideStatus())},3e3)}else a.waitModal.addClass('is-hidden'),a.hideStatus()})}this.previewTimeout=null,this.previewsSuspended=!1,this.parameters=[];var a=this;this.settings=t,this.modalContainer=e('#ilabm-container-'+t.modal_id),this.waitModal=this.modalContainer.find('.ilabm-preview-wait-modal'),this.previewImage=this.modalContainer.find('.imgix-preview-image'),this.presets=new ILabImgixPresets(e,this,this.modalContainer),this.modalContainer.find('.imgix-button-reset-all').on('click',function(){a.resetAll()}),this.modalContainer.find('.imgix-button-save-adjustments').on('click',function(){a.apply()}),this.modalContainer.find('.imgix-parameter').each(function(){var t=e(this),i=t.data('param-type');'slider'==i?a.parameters.push(new ImgixComponents.ImgixSlider(a,t)):'color'==i||'blend-color'==i?a.parameters.push(new ImgixComponents.ImgixColor(a,t)):'pillbox'==i?a.parameters.push(new ImgixComponents.ImgixPillbox(a,t)):'media-chooser'==i?a.parameters.push(new ImgixComponents.ImgixMediaChooser(a,t)):'alignment'==i&&a.parameters.push(new ImgixComponents.ImgixAlignment(a,t))}),this.modalContainer.on('click','.imgix-pill',function(){var t=e(this).data('param'),i=a.modalContainer.find('#imgix-param-'+t);1==i.val()?(i.val(0),e(this).removeClass('pill-selected')):(i.val(1),e(this).addClass('pill-selected')),a.preview()}),this.modalContainer.find('.ilabm-editor-tabs').ilabTabs({currentValue:a.settings.size,tabSelected:function(e){ILabModal.loadURL(e.data('url'),!0,function(e){a.bindUI(e)})}}),this.modalContainer.find('.ilabm-sidebar-tabs').ilabSidebarTabs({delegate:this,container:this.modalContainer}),this.postAjax=function(t,i,o){var r={};a.parameters.forEach(function(e){r=e.saveValue(r)}),i.image_id=a.settings.image_id,i.action=t,i.size=a.settings.size,i.settings=r,e.post(ajaxurl,i,o)},this.preview=function(){a.previewsSuspended||(ILabModal.makeDirty(),clearTimeout(a.previewTimeout),a.previewTimeout=setTimeout(i,500))},this.bindUI=function(e){if(e.hasOwnProperty('currentPreset')&&null!=e.currentPreset&&''!=e.currentPreset){var t=a.settings.presets[e.currentPreset];a.presets.setCurrentPreset(e.currentPreset,t.default_for==e.size)}else a.presets.clearSelected();a.previewsSuspended=!0,a.settings.size=e.size,a.settings.settings=e.settings;var i=function(){a.previewImage.off('load',i),a.parameters.forEach(function(t){t.reset(e.settings)}),a.previewsSuspended=!1,ILabModal.makeClean()};e.src?(a.previewImage.on('load',i),a.previewImage.attr('src',e.src)):i()},this.bindPreset=function(e){a.previewsSuspended=!0,a.settings.settings=e.settings,a.previewImage.off('load'),a.parameters.forEach(function(e){e.reset(a.settings.settings)}),a.previewsSuspended=!1,a.preview()},this.apply=function(){a.displayStatus('Saving adjustments ...'),a.postAjax('ilab_imgix_save',{},function(){a.hideStatus(),ILabModal.makeClean()})},this.resetAll=function(){a.parameters.forEach(function(e){e.reset()})},this.displayStatus=function(e){a.modalContainer.find('.ilabm-status-label').text(e),a.modalContainer.find('.ilabm-status-container').removeClass('is-hidden')},this.hideStatus=function(){a.modalContainer.find('.ilabm-status-container').addClass('is-hidden')}}; -//# sourceMappingURL=ilab-media-tools.js.map +(function(e){'function'==typeof define&&define.amd?define(['jquery'],e):'object'==typeof exports?e(require('jquery')):e(jQuery)})(function(t){'use strict';function e(e){return'number'==typeof e&&!isNaN(e)}function i(e){return'undefined'==typeof e}function a(t,i){var a=[];return e(i)&&a.push(i),a.slice.apply(t,a)}function o(e,t){var i=a(arguments,2);return function(){return e.apply(t,i.concat(a(arguments)))}}function r(e){var t=e.match(/^(https?:)\/\/([^\:\/\?#]+):?(\d*)/i);return t&&(t[1]!==C.protocol||t[2]!==C.hostname||t[3]!==C.port)}function n(e){var t='timestamp='+new Date().getTime();return e+(-1===e.indexOf('?')?'?':'&')+t}function s(e){return e?' crossOrigin="'+e+'"':''}function d(e,t){var i;return e.naturalWidth&&!me?t(e.naturalWidth,e.naturalHeight):void(i=document.createElement('img'),i.onload=function(){t(this.width,this.height)},i.src=e.src)}function l(t){var i=[],a=t.rotate,o=t.scaleX,r=t.scaleY;return e(o)&&e(r)&&i.push('scale('+o+','+r+')'),e(a)&&i.push('rotate('+a+'deg)'),i.length?i.join(' '):'none'}function p(e,t){var i,a,o=xe(e.degree)%180,r=(90')[0],d=s.getContext('2d'),l=0,c=0,h=a.naturalWidth,g=a.naturalHeight,m=a.rotate,u=a.scaleX,f=a.scaleY,v=e(u)&&e(f)&&(1!==u||1!==f),w=e(m)&&0!==m,b=w||v,C=h*xe(u||1),y=g*xe(f||1);return v&&(o=C/2,r=y/2),w&&(n=p({width:C,height:y,degree:m}),C=n.width,y=n.height,o=C/2,r=y/2),s.width=C,s.height=y,b&&(l=-h/2,c=-g/2,d.save(),d.translate(o,r)),v&&d.scale(u,f),w&&d.rotate(m*x/180),d.drawImage(i,Be(l),Be(c),Be(h),Be(g)),b&&d.restore(),s}function h(e){var i=e.length,a=0,o=0;return i&&(t.each(e,function(e,t){a+=t.pageX,o+=t.pageY}),a/=i,o/=i),{pageX:a,pageY:o}}function g(e,t,a){var o,i='';for(o=t,a+=t;o')[0].getContext),me=y&&/(Macintosh|iPhone|iPod|iPad).*AppleWebKit/i.test(y.userAgent),ue=Number,fe=Math.min,ve=Math.max,xe=Math.abs,we=Math.sin,be=Math.cos,Ce=Math.sqrt,ye=Math.round,Be=Math.floor,De=String.fromCharCode;v.prototype={constructor:v,init:function(){var e,t=this.$element;if(t.is('img')){if(this.isImg=!0,this.originalUrl=e=t.attr('src'),!e)return;e=t.prop('src')}else t.is('canvas')&&ge&&(e=t[0].toDataURL());this.load(e)},trigger:function(i,a){var o=t.Event(i,a);return this.$element.trigger(o),o},load:function(e){var i,a,o=this.options,s=this.$element;if(e)return(s.one(U,o.build),!this.trigger(U).isDefaultPrevented())?(this.url=e,this.image={},!o.checkOrientation||!B)?this.clone():(i=t.proxy(this.read,this),K.test(e)?Q.test(e)?i(u(e)):this.clone():void(a=new XMLHttpRequest,a.onerror=a.onabort=t.proxy(function(){this.clone()},this),a.onload=function(){i(this.response)},o.checkCrossOrigin&&r(e)&&s.prop('crossOrigin')&&(e=n(e)),a.open('get',e),a.responseType='arraybuffer',a.send())):void 0},read:function(e){var t,i,a,o=this.options,r=m(e),n=this.image;1'),this.isImg?o[0].complete?this.start():o.one(H,t.proxy(this.start,this)):i.one(H,t.proxy(this.start,this)).one(R,t.proxy(this.stop,this)).addClass(_).insertAfter(o)},start:function(){var e=this.$element,i=this.$clone;this.isImg||(i.off(R,this.stop),e=i),d(e[0],t.proxy(function(e,i){t.extend(this.image,{naturalWidth:e,naturalHeight:i,aspectRatio:e/i}),this.isLoaded=!0,this.build()},this))},stop:function(){this.$clone.remove(),this.$clone=null},build:function(){var e,i,a,o=this.options,r=this.$element,n=this.$clone;this.isLoaded&&(this.isBuilt&&this.unbuild(),this.$container=r.parent(),this.$cropper=e=t(v.TEMPLATE),this.$canvas=e.find('.cropper-canvas').append(n),this.$dragBox=e.find('.cropper-drag-box'),this.$cropBox=i=e.find('.cropper-crop-box'),this.$viewBox=e.find('.cropper-view-box'),this.$face=a=i.find('.cropper-face'),r.addClass(I).after(e),!this.isImg&&n.removeClass(_),this.initPreview(),this.bind(),o.aspectRatio=ve(0,o.aspectRatio)||NaN,o.viewMode=ve(0,fe(3,ye(o.viewMode)))||0,o.autoCrop?(this.isCropped=!0,o.modal&&this.$dragBox.addClass($)):i.addClass(I),!o.guides&&i.find('.cropper-dashed').addClass(I),!o.center&&i.find('.cropper-center').addClass(I),o.cropBoxMovable&&a.addClass(L).data(ee,le),!o.highlight&&a.addClass('cropper-invisible'),o.background&&e.addClass('cropper-bg'),!o.cropBoxResizable&&i.find('.cropper-line, .cropper-point').addClass(I),this.setDragMode(o.dragMode),this.render(),this.isBuilt=!0,this.setData(o.data),r.one(A,o.built),setTimeout(t.proxy(function(){this.trigger(A),this.trigger(N,this.getData()),this.isCompleted=!0},this),0))},unbuild:function(){this.isBuilt&&(this.isBuilt=!1,this.isCompleted=!1,this.initialImage=null,this.initialCanvas=null,this.initialCropBox=null,this.container=null,this.canvas=null,this.cropBox=null,this.unbind(),this.resetPreview(),this.$preview=null,this.$viewBox=null,this.$cropBox=null,this.$dragBox=null,this.$canvas=null,this.$container=null,this.$cropper.remove(),this.$cropper=null)},render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.isCropped&&this.renderCropBox()},initContainer:function(){var e=this.options,t=this.$element,i=this.$container,a=this.$cropper;a.addClass(I),t.removeClass(I),a.css(this.container={width:ve(i.width(),ue(e.minContainerWidth)||200),height:ve(i.height(),ue(e.minContainerHeight)||100)}),t.addClass(I),a.removeClass(I)},initCanvas:function(){var e,i=this.options.viewMode,a=this.container,o=a.width,r=a.height,n=this.image,s=n.naturalWidth,d=n.naturalHeight,l=90===xe(n.rotate),p=l?d:s,c=l?s:d,h=p/c,g=o,m=r;r*h>o?3===i?g=r*h:m=o/h:3===i?m=o/h:g=r*h,e={naturalWidth:p,naturalHeight:c,aspectRatio:h,width:g,height:m},e.oldLeft=e.left=(o-g)/2,e.oldTop=e.top=(r-m)/2,this.canvas=e,this.isLimited=1===i||2===i,this.limitCanvas(!0,!0),this.initialImage=t.extend({},n),this.initialCanvas=t.extend({},e)},limitCanvas:function(e,t){var i,a,o,r,n=this.options,s=n.viewMode,d=this.container,l=d.width,p=d.height,c=this.canvas,h=c.aspectRatio,g=this.cropBox,m=this.isCropped&&g;e&&(i=ue(n.minCanvasWidth)||0,a=ue(n.minCanvasHeight)||0,s&&(1i?i=a*h:a=i/h)):i?i=ve(i,m?g.width:0):a?a=ve(a,m?g.height:0):m&&(i=g.width,a=g.height,a*h>i?i=a*h:a=i/h)),i&&a?a*h>i?a=i/h:i=a*h:i?a=i/h:a&&(i=a*h),c.minWidth=i,c.minHeight=a,c.maxWidth=Infinity,c.maxHeight=Infinity),t&&(s?(o=l-c.width,r=p-c.height,c.minLeft=fe(0,o),c.minTop=fe(0,r),c.maxLeft=ve(0,o),c.maxTop=ve(0,r),m&&this.isLimited&&(c.minLeft=fe(g.left,g.left+g.width-c.width),c.minTop=fe(g.top,g.top+g.height-c.height),c.maxLeft=g.left,c.maxTop=g.top,2===s&&(c.width>=l&&(c.minLeft=fe(0,o),c.maxLeft=ve(0,o)),c.height>=p&&(c.minTop=fe(0,r),c.maxTop=ve(0,r))))):(c.minLeft=-c.width,c.minTop=-c.height,c.maxLeft=l,c.maxTop=p))},renderCanvas:function(e){var t,i,a=this.canvas,o=this.image,r=o.rotate,n=o.naturalWidth,s=o.naturalHeight;this.isRotated&&(this.isRotated=!1,i=p({width:o.width,height:o.height,degree:r}),t=i.width/i.height,t!==a.aspectRatio&&(a.left-=(i.width-a.width)/2,a.top-=(i.height-a.height)/2,a.width=i.width,a.height=i.height,a.aspectRatio=t,a.naturalWidth=n,a.naturalHeight=s,r%180&&(i=p({width:n,height:s,degree:r}),a.naturalWidth=i.width,a.naturalHeight=i.height),this.limitCanvas(!0,!1))),(a.width>a.maxWidth||a.widtha.maxHeight||a.heighti.width?r.height=r.width/a:r.width=r.height*a),this.cropBox=r,this.limitCropBox(!0,!0),r.width=fe(ve(r.width,r.minWidth),r.maxWidth),r.height=fe(ve(r.height,r.minHeight),r.maxHeight),r.width=ve(r.minWidth,r.width*o),r.height=ve(r.minHeight,r.height*o),r.oldLeft=r.left=i.left+(i.width-r.width)/2,r.oldTop=r.top=i.top+(i.height-r.height)/2,this.initialCropBox=t.extend({},r)},limitCropBox:function(e,t){var i,a,o,r,n=this.options,s=n.aspectRatio,d=this.container,l=d.width,p=d.height,c=this.canvas,h=this.cropBox,g=this.isLimited;e&&(i=ue(n.minCropBoxWidth)||0,a=ue(n.minCropBoxHeight)||0,i=fe(i,l),a=fe(a,p),o=fe(l,g?c.width:l),r=fe(p,g?c.height:p),s&&(i&&a?a*s>i?a=i/s:i=a*s:i?a=i/s:a&&(i=a*s),r*s>o?r=o/s:o=r*s),h.minWidth=fe(i,o),h.minHeight=fe(a,r),h.maxWidth=o,h.maxHeight=r),t&&(g?(h.minLeft=ve(0,c.left),h.minTop=ve(0,c.top),h.maxLeft=fe(l,c.left+c.width)-h.width,h.maxTop=fe(p,c.top+c.height)-h.height):(h.minLeft=0,h.minTop=0,h.maxLeft=l-h.width,h.maxTop=p-h.height))},renderCropBox:function(){var e=this.options,t=this.container,i=t.width,a=t.height,o=this.cropBox;(o.width>o.maxWidth||o.widtho.maxHeight||o.height'),this.$viewBox.html(e),this.$preview.each(function(){var e=t(this);e.data(G,{width:e.width(),height:e.height(),html:e.html()}),e.html('')})},resetPreview:function(){this.$preview.each(function(){var e=t(this),i=e.data(G);e.css({width:i.width,height:i.height}).html(i.html).removeData(G)})},preview:function(){var e=this.image,i=this.canvas,a=this.cropBox,o=a.width,r=a.height,n=e.width,s=e.height,d=a.left-i.left-e.left,p=a.top-i.top-e.top;!this.isCropped||this.isDisabled||(this.$clone2.css({width:n,height:s,marginLeft:-d,marginTop:-p,transform:l(e)}),this.$preview.each(function(){var i=t(this),a=i.data(G),c=a.width,h=a.height,g=c,m=h,u=1;o&&(u=c/o,m=r*u),r&&m>h&&(u=h/r,g=o*u,m=h),i.css({width:g,height:m}).find('img').css({width:n*u,height:s*u,marginLeft:-d*u,marginTop:-p*u,transform:l(e)})}))},bind:function(){var e=this.options,i=this.$element,a=this.$cropper;t.isFunction(e.cropstart)&&i.on(V,e.cropstart),t.isFunction(e.cropmove)&&i.on(j,e.cropmove),t.isFunction(e.cropend)&&i.on(F,e.cropend),t.isFunction(e.crop)&&i.on(N,e.crop),t.isFunction(e.zoom)&&i.on(Z,e.zoom),a.on(W,t.proxy(this.cropStart,this)),e.zoomable&&e.zoomOnWheel&&a.on(X,t.proxy(this.wheel,this)),e.toggleDragModeOnDblclick&&a.on(M,t.proxy(this.dblclick,this)),b.on(z,this._cropMove=o(this.cropMove,this)).on(Y,this._cropEnd=o(this.cropEnd,this)),e.responsive&&w.on(E,this._resize=o(this.resize,this))},unbind:function(){var e=this.options,i=this.$element,a=this.$cropper;t.isFunction(e.cropstart)&&i.off(V,e.cropstart),t.isFunction(e.cropmove)&&i.off(j,e.cropmove),t.isFunction(e.cropend)&&i.off(F,e.cropend),t.isFunction(e.crop)&&i.off(N,e.crop),t.isFunction(e.zoom)&&i.off(Z,e.zoom),a.off(W,this.cropStart),e.zoomable&&e.zoomOnWheel&&a.off(X,this.wheel),e.toggleDragModeOnDblclick&&a.off(M,this.dblclick),b.off(z,this._cropMove).off(Y,this._cropEnd),e.responsive&&w.off(E,this._resize)},resize:function(){var e,a,o,i=this.options.restore,r=this.$container,n=this.container;this.isDisabled||!n||(o=r.width()/n.width,(1!==o||r.height()!==n.height)&&(i&&(e=this.getCanvasData(),a=this.getCropBoxData()),this.render(),i&&(this.setCanvasData(t.each(e,function(t,i){e[t]=i*o})),this.setCropBoxData(t.each(a,function(e,t){a[e]=t*o})))))},dblclick:function(){this.isDisabled||(this.$dragBox.hasClass(T)?this.setDragMode(ce):this.setDragMode(pe))},wheel:function(i){var a=i.originalEvent||i,e=ue(this.options.wheelZoomRatio)||0.1,o=1;this.isDisabled||(i.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout(t.proxy(function(){this.wheeling=!1},this),50),a.deltaY?o=0=x||r&&(g<=v||u>=w))){b=!1;break}p+=a.x,r&&(c=p/r,g-=a.Y/2),0>p&&(n=ie,p=0);break;case oe:if(0>=a.y&&(g<=v||r&&(h<=f||m>=x))){b=!1;break}c-=a.y,g+=a.y,r&&(p=c*r,h+=a.X/2),0>c&&(n=ae,c=0);break;case ie:if(0>=a.x&&(h<=f||r&&(g<=v||u>=w))){b=!1;break}p-=a.x,h+=a.x,r&&(c=p/r,g+=a.Y/2),0>p&&(n=te,p=0);break;case ae:if(0<=a.y&&(u>=w||r&&(h<=f||m>=x))){b=!1;break}c+=a.y,r&&(p=c*r,h-=a.X/2),0>c&&(n=oe,c=0);break;case se:if(r){if(0>=a.y&&(g<=v||m>=x)){b=!1;break}c-=a.y,g+=a.y,p=c*r}else 0<=a.x?m=a.y&&g<=v&&(b=!1):p+=a.x,0>=a.y?g>v&&(c-=a.y,g+=a.y):(c-=a.y,g+=a.y);0>p&&0>c?(n=ne,c=0,p=0):0>p?(n=de,p=0):0>c&&(n=re,c=0);break;case de:if(r){if(0>=a.y&&(g<=v||h<=f)){b=!1;break}c-=a.y,g+=a.y,p=c*r,h+=a.X}else 0>=a.x?h>f?(p-=a.x,h+=a.x):0>=a.y&&g<=v&&(b=!1):(p-=a.x,h+=a.x),0>=a.y?g>v&&(c-=a.y,g+=a.y):(c-=a.y,g+=a.y);0>p&&0>c?(n=re,c=0,p=0):0>p?(n=se,p=0):0>c&&(n=ne,c=0);break;case ne:if(r){if(0>=a.x&&(h<=f||u>=w)){b=!1;break}p-=a.x,h+=a.x,c=p/r}else 0>=a.x?h>f?(p-=a.x,h+=a.x):0<=a.y&&u>=w&&(b=!1):(p-=a.x,h+=a.x),0<=a.y?up&&0>c?(n=se,c=0,p=0):0>p?(n=re,p=0):0>c&&(n=de,c=0);break;case re:if(r){if(0<=a.x&&(m>=x||u>=w)){b=!1;break}p+=a.x,c=p/r}else 0<=a.x?m=w&&(b=!1):p+=a.x,0<=a.y?up&&0>c?(n=de,c=0,p=0):0>p?(n=ne,p=0):0>c&&(n=se,c=0);break;case ce:this.move(a.x,a.y),b=!1;break;case he:this.zoom(function(e,t,i,a){var o=Ce(e*e+t*t),r=Ce(i*i+a*a);return(r-o)/o}(xe(this.startX-this.startX2),xe(this.startY-this.startY2),xe(this.endX-this.endX2),xe(this.endY-this.endY2)),t),this.startX2=this.endX2,this.startY2=this.endY2,b=!1;break;case pe:if(!a.x||!a.y){b=!1;break}i=this.$cropper.offset(),h=this.startX-i.left,g=this.startY-i.top,p=l.minWidth,c=l.minHeight,0a.x&&(h-=p,n=0a.y&&(g-=c),this.isCropped||(this.$cropBox.removeClass(I),this.isCropped=!0,this.isLimited&&this.limitCropBox(!0,!0));}b&&(l.width=p,l.height=c,l.left=h,l.top=g,this.action=n,this.renderCropBox()),this.startX=this.endX,this.startY=this.endY},crop:function(){!this.isBuilt||this.isDisabled||(!this.isCropped&&(this.isCropped=!0,this.limitCropBox(!0,!0),this.options.modal&&this.$dragBox.addClass($),this.$cropBox.removeClass(I)),this.setCropBoxData(this.initialCropBox))},reset:function(){!this.isBuilt||this.isDisabled||(this.image=t.extend({},this.initialImage),this.canvas=t.extend({},this.initialCanvas),this.cropBox=t.extend({},this.initialCropBox),this.renderCanvas(),this.isCropped&&this.renderCropBox())},clear:function(){!this.isCropped||this.isDisabled||(t.extend(this.cropBox,{left:0,top:0,width:0,height:0}),this.isCropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),this.$dragBox.removeClass($),this.$cropBox.addClass(I))},replace:function(e,t){!this.isDisabled&&e&&(this.isImg&&this.$element.attr('src',e),t?(this.url=e,this.$clone.attr('src',e),this.isBuilt&&this.$preview.find('img').add(this.$clone2).attr('src',e)):(this.isImg&&(this.isReplaced=!0),this.options.data=null,this.load(e)))},enable:function(){this.isBuilt&&(this.isDisabled=!1,this.$cropper.removeClass(O))},disable:function(){this.isBuilt&&(this.isDisabled=!0,this.$cropper.addClass(O))},destroy:function(){var e=this.$element;this.isLoaded?(this.isImg&&this.isReplaced&&e.attr('src',this.originalUrl),this.unbuild(),e.removeClass(I)):this.isImg?e.off(H,this.start):this.$clone&&this.$clone.remove(),e.removeData(P)},move:function(e,t){var a=this.canvas;this.moveTo(i(e)?e:a.left+ue(e),i(t)?t:a.top+ue(t))},moveTo:function(t,a){var o=this.canvas,r=!1;i(a)&&(a=t),t=ue(t),a=ue(a),this.isBuilt&&!this.isDisabled&&this.options.movable&&(e(t)&&(o.left=t,r=!0),e(a)&&(o.top=a,r=!0),r&&this.renderCanvas(!0))},zoom:function(e,t){var i=this.canvas;e=ue(e),e=0>e?1/(1-e):1+e,this.zoomTo(i.width*e/i.naturalWidth,t)},zoomTo:function(e,t){var i,a,o,r,n,s=this.options,d=this.canvas,l=d.width,p=d.height,c=d.naturalWidth,g=d.naturalHeight;if(e=ue(e),0<=e&&this.isBuilt&&!this.isDisabled&&s.zoomable){if(a=c*e,o=g*e,t&&(i=t.originalEvent),this.trigger(Z,{originalEvent:i,oldRatio:l/c,ratio:a/c}).isDefaultPrevented())return;i?(r=this.$cropper.offset(),n=i.touches?h(i.touches):{pageX:t.pageX||i.pageX||0,pageY:t.pageY||i.pageY||0},d.left-=(a-l)*((n.pageX-r.left-d.left)/l),d.top-=(o-p)*((n.pageY-r.top-d.top)/p)):(d.left-=(a-l)/2,d.top-=(o-p)/2),d.width=a,d.height=o,this.renderCanvas(!0)}},rotate:function(e){this.rotateTo((this.image.rotate||0)+ue(e))},rotateTo:function(t){t=ue(t),e(t)&&this.isBuilt&&!this.isDisabled&&this.options.rotatable&&(this.image.rotate=t%360,this.isRotated=!0,this.renderCanvas(!0))},scale:function(t,a){var o=this.image,r=!1;i(a)&&(a=t),t=ue(t),a=ue(a),this.isBuilt&&!this.isDisabled&&this.options.scalable&&(e(t)&&(o.scaleX=t,r=!0),e(a)&&(o.scaleY=a,r=!0),r&&this.renderImage(!0))},scaleX:function(t){var i=this.image.scaleY;this.scale(t,e(i)?i:1)},scaleY:function(t){var i=this.image.scaleX;this.scale(e(i)?i:1,t)},getData:function(e){var a,o,i=this.options,r=this.image,n=this.canvas,s=this.cropBox;return this.isBuilt&&this.isCropped?(o={x:s.left-n.left,y:s.top-n.top,width:s.width,height:s.height},a=r.width/r.naturalWidth,t.each(o,function(t,i){i/=a,o[t]=e?ye(i):i})):o={x:0,y:0,width:0,height:0},i.rotatable&&(o.rotate=r.rotate||0),i.scalable&&(o.scaleX=r.scaleX||1,o.scaleY=r.scaleY||1),o},setData:function(i){var a,o,r,n=this.options,s=this.image,d=this.canvas,l={};t.isFunction(i)&&(i=i.call(this.element)),this.isBuilt&&!this.isDisabled&&t.isPlainObject(i)&&(n.rotatable&&e(i.rotate)&&i.rotate!==s.rotate&&(s.rotate=i.rotate,this.isRotated=a=!0),n.scalable&&(e(i.scaleX)&&i.scaleX!==s.scaleX&&(s.scaleX=i.scaleX,o=!0),e(i.scaleY)&&i.scaleY!==s.scaleY&&(s.scaleY=i.scaleY,o=!0)),a?this.renderCanvas():o&&this.renderImage(),r=s.width/s.naturalWidth,e(i.x)&&(l.left=i.x*r+d.left),e(i.y)&&(l.top=i.y*r+d.top),e(i.width)&&(l.width=i.width*r),e(i.height)&&(l.height=i.height*r),this.setCropBoxData(l))},getContainerData:function(){return this.isBuilt?this.container:{}},getImageData:function(){return this.isLoaded?this.image:{}},getCanvasData:function(){var e=this.canvas,a={};return this.isBuilt&&t.each(['left','top','width','height','naturalWidth','naturalHeight'],function(t,i){a[i]=e[i]}),a},setCanvasData:function(i){var a=this.canvas,o=a.aspectRatio;t.isFunction(i)&&(i=i.call(this.$element)),this.isBuilt&&!this.isDisabled&&t.isPlainObject(i)&&(e(i.left)&&(a.left=i.left),e(i.top)&&(a.top=i.top),e(i.width)?(a.width=i.width,a.height=i.width/o):e(i.height)&&(a.height=i.height,a.width=i.height*o),this.renderCanvas(!0))},getCropBoxData:function(){var e,t=this.cropBox;return this.isBuilt&&this.isCropped&&(e={left:t.left,top:t.top,width:t.width,height:t.height}),e||{}},setCropBoxData:function(i){var a,o,r=this.cropBox,n=this.options.aspectRatio;t.isFunction(i)&&(i=i.call(this.$element)),this.isBuilt&&this.isCropped&&!this.isDisabled&&t.isPlainObject(i)&&(e(i.left)&&(r.left=i.left),e(i.top)&&(r.top=i.top),e(i.width)&&(a=!0,r.width=i.width),e(i.height)&&(o=!0,r.height=i.height),n&&(a?r.height=r.width/n:o&&(r.width=r.height*n)),this.renderCropBox())},getCroppedCanvas:function(e){var i,a,o,r,n,s,d,l,p,h,g;if(this.isBuilt&&ge)return this.isCropped?(t.isPlainObject(e)||(e={}),g=this.getData(),i=g.width,a=g.height,l=i/a,t.isPlainObject(e)&&(n=e.width,s=e.height,n?(s=n/l,d=n/i):s&&(n=s*l,d=s/a)),o=Be(n||i),r=Be(s||a),p=t('')[0],p.width=o,p.height=r,h=p.getContext('2d'),e.fillColor&&(h.fillStyle=e.fillColor,h.fillRect(0,0,o,r)),h.drawImage.apply(h,function(){var e,t,o,r,n,s,l=c(this.$clone[0],this.image),p=l.width,h=l.height,m=this.canvas,u=[l],f=g.x+m.naturalWidth*(xe(g.scaleX||1)-1)/2,v=g.y+m.naturalHeight*(xe(g.scaleY||1)-1)/2;return f<=-i||f>p?f=e=o=n=0:0>=f?(o=-f,f=0,e=n=fe(p,i+f)):f<=p&&(o=0,e=n=fe(i,p-f)),0>=e||v<=-a||v>h?v=t=r=s=0:0>=v?(r=-v,v=0,t=s=fe(h,a+v)):v<=h&&(r=0,t=s=fe(a,h-v)),u.push(Be(f),Be(v),Be(e),Be(t)),d&&(o*=d,r*=d,n*=d,s*=d),0
',v.other=t.fn.cropper,t.fn.cropper=function(e){var o,r=a(arguments,1);return this.each(function(){var i,a,n=t(this),s=n.data(P);if(!s){if(/destroy/.test(e))return;i=t.extend({},n.data(),t.isPlainObject(e)&&e),n.data(P,s=new v(this,i))}'string'==typeof e&&t.isFunction(a=s[e])&&(o=a.apply(s,r))}),i(o)?this:o},t.fn.cropper.Constructor=v,t.fn.cropper.setDefaults=v.setDefaults,t.fn.cropper.noConflict=function(){return t.fn.cropper=v.other,this}});var ILabCrop=function(e,t){this.settings=t,this.modalContainer=e('#ilabm-container-'+t.modal_id),this.cropper=this.modalContainer.find('.ilabc-cropper'),this.cropperData={},this.modal_id=t.modal_id;var i,a=this,o=!1;this.modalContainer.find('.ilabm-editor-tabs').ilabTabs({currentValue:this.settings.size,tabSelected:function(e){ILabModal.loadURL(e.data('url'),!0,function(e){a.bindUI(e)})}}),e(window).resize(function(){o||(data=a.cropper.cropper('getData'),a.settings.prev_crop_x=data.x,a.settings.prev_crop_y=data.y,a.settings.prev_crop_width=data.width,a.settings.prev_crop_height=data.height),o=!0,a.updatePreviewWidth(),clearTimeout(i),i=setTimeout(a._resized,250)}),this.modalContainer.find('.ilabc-button-crop').on('click',function(t){return t.preventDefault(),a.crop(),!1}),this._resized=function(){a.bindUI(a.settings),o=!1},this.updatePreviewWidth=function(){var e=this.modalContainer.find('.ilab-crop-preview-title').width();this.modalContainer.find('.ilab-crop-preview').css({height:e/a.settings.aspect_ratio+'px',width:e+'px'})},this.bindUI=function(e){this.settings=e,this.cropper.cropper('destroy'),this.cropper.off('built.cropper'),e.hasOwnProperty('cropped_src')&&null!==e.cropped_src&&this.modalContainer.find('.ilab-current-crop-img').attr('src',e.cropped_src),e.hasOwnProperty('size_title')&&null!==e.size_title&&this.modalContainer.find('.ilabc-crop-size-title').text('Current '+e.size_title+' ('+e.min_width+' x '+e.min_height+')'),'undefined'!=typeof e.aspect_ratio&&(this.updatePreviewWidth(),'undefined'!=typeof e.prev_crop_x&&null!==e.prev_crop_x&&(this.cropperData={x:e.prev_crop_x,y:e.prev_crop_y,width:e.prev_crop_width,height:e.prev_crop_height}),this.cropper.on('built.cropper',function(){a.updatePreviewWidth()}).on('crop.cropper',function(){}).cropper({viewMode:1,aspectRatio:e.aspect_ratio,minWidth:e.min_width,minHeight:e.min_height,modal:!0,zoomable:!1,mouseWheelZoom:!1,dragCrop:!1,autoCropArea:1,movable:!1,data:this.cropperData,checkImageOrigin:!1,checkCrossOrigin:!1,responsive:!0,preview:'#ilabm-container-'+this.modal_id+' .ilab-crop-preview'}))},this.crop=function(){var e=this;this.displayStatus('Saving crop ...');var t=this.cropper.cropper('getData');t.action='ilab_perform_crop',t.post=this.settings.image_id,t.size=this.settings.size,jQuery.post(ajaxurl,t,function(t){'ok'==t.status?(e.modalContainer.find('.ilab-current-crop-img').one('load',function(){e.hideStatus()}),e.modalContainer.find('.ilab-current-crop-img').attr('src',t.src)):e.hideStatus()})},this.displayStatus=function(e){a.modalContainer.find('.ilabm-status-label').text(e),a.modalContainer.find('.ilabm-status-container').removeClass('is-hidden')},this.hideStatus=function(){a.modalContainer.find('.ilabm-status-container').addClass('is-hidden')},this.bindUI(t)},ImgixComponents=function(){return{utilities:{byteToHex:function(e){var t=['0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'];return t[15&e>>4]+t[15&e]}}}}();(function(e){e.fn.imgixLabel=function(t){var i=e.extend({},t);return this.each(function(){var t,a=e(this),o=0,r=e('');a.parent().append(r),r.on('keydown',function(t){if(27==t.keyCode)r.off('blur'),r.off('input'),r.addClass('is-hidden'),i.hasOwnProperty('changed')&&i.changed(o),a.text(o);else if(13==t.keyCode){r.off('blur'),r.off('input');var e=parseInt(r.val());r.addClass('is-hidden'),i.hasOwnProperty('changed')&&i.changed(e),a.text(e)}else if(38==t.keyCode){var e=parseInt(r.val());e++,r.val(e),i.hasOwnProperty('changed')&&i.changed(e),a.text(e)}else if(40==t.keyCode){var e=parseInt(r.val());e--,r.val(e),i.hasOwnProperty('changed')&&i.changed(e),a.text(e)}else return!!(57>t.keyCode)||90t.keyCode||109==t.keyCode||!!t.metaKey||(t.preventDefault(),!1)}),a.on('click',function(n){return n.preventDefault(),r.on('input',function(){var e=parseInt(r.val());i.hasOwnProperty('changed')&&(clearTimeout(t),t=setTimeout(function(){i.changed(e)},500)),a.text(e)}),r.on('blur',function(){var e=parseInt(r.val());r.addClass('is-hidden'),i.hasOwnProperty('changed')&&i.changed(e),a.text(e)}),o=i.hasOwnProperty('currentValue')?i.currentValue():0,r.val(o),r.removeClass('is-hidden'),r.select(),r.focus(),!1})})}})(jQuery),function(){ImgixComponents.ImgixSlider=function(e,t){this.delegate=e,this.container=t,this.valueLabel=t.find('.imgix-param-title-right > h3'),this.slider=t.find('.imgix-param'),this.resetButton=t.find('.imgix-param-reset'),this.defaultValue=t.data('default-value'),this.param=t.data('param');var i=this;this.container.find('.imgix-param-label').imgixLabel({currentValue:function(){return i.slider.val()},changed:function(e){e==i.slider.val()||(i.slider.val(e),i.slider.hide().show(0),i.delegate.preview())}}),this.resetButton.on('click',function(){i.reset()}),this.slider.on('input',function(){i.valueLabel.text(i.slider.val())}),this.slider.on('change',function(){i.valueLabel.text(i.slider.val()),i.delegate.preview()})},ImgixComponents.ImgixSlider.prototype.destroy=function(){this.slider.off('input'),this.slider.off('change'),this.resetButton.off('click')},ImgixComponents.ImgixSlider.prototype.reset=function(e){var t;t=e&&e.hasOwnProperty(this.param)?e[this.param]:this.defaultValue,this.valueLabel.text(t),this.slider.val(t),this.slider.hide().show(0),this.delegate.preview()},ImgixComponents.ImgixSlider.prototype.saveValue=function(e){return this.slider.val()!=this.defaultValue&&(e[this.param]=this.slider.val()),e}}(jQuery),function(){var e=Math.round;ImgixComponents.ImgixColor=function(e,t){this.delegate=e,this.container=t,this.colorPicker=t.find('.imgix-param-color'),this.alphaSlider=t.find('.imgix-param-alpha'),this.type=t.data('param-type'),this.resetButton=t.find('.imgix-param-reset'),this.param=t.data('param'),this.defaultValue=t.data('default-value');var i=this;if('blend-color'==this.type){this.blendParam=t.data('blend-param'),this.blendSelect=t.find('.imgix-param-blend');var a=t.data('blend-value');this.blendSelect.val(a),this.blendSelect.on('change',function(){i.delegate.preview()})}this.colorPicker.wpColorPicker({palettes:!1,change:function(){i.delegate.preview()}}),this.alphaSlider.on('change',function(){i.delegate.preview()}),this.resetButton.on('click',function(){i.reset()})},ImgixComponents.ImgixColor.prototype.destroy=function(){this.alphaSlider.off('change'),'blend-color'==this.type&&this.blendSelect.off('change'),this.resetButton.off('click')},ImgixComponents.ImgixColor.prototype.reset=function(t){var i,a='none';if(void 0!==t&&t.hasOwnProperty(this.blendParam)&&(a=t[this.blendParam]),i=void 0!==t&&t.hasOwnProperty(this.param)?t[this.param]:this.defaultValue,i=i.replace('#',''),8==i.length){var o=100*(parseInt('0x'+i.substring(0,2))/255);i=i.substring(2),this.alphaSlider.val(e(o)),this.alphaSlider.hide().show(0)}else this.alphaSlider.val(0),this.alphaSlider.hide().show(0);this.colorPicker.val('#'+i),this.colorPicker.wpColorPicker('color','#'+i),'blend-color'==this.type&&this.blendSelect.val(a),this.delegate.preview()},ImgixComponents.ImgixColor.prototype.saveValue=function(t){return 0').attr('value','0').text('None')),a.presetSelect.append(e('').attr('value',t).text(a.delegate.settings.presets[t].title))}),a.presetContainer.removeClass('is-hidden'),a.presetSelect.val(a.delegate.settings.currentPreset))},this.clearSelected=function(){a.presetSelect.val(0),a.presetDefaultCheckbox.prop('checked',!1)},this.setCurrentPreset=function(e,t){t?a.presetDefaultCheckbox.prop('checked',!0):a.presetDefaultCheckbox.prop('checked',!1),a.presetSelect.val(e)},this.newPreset=function(){var e=prompt('New preset name');if(null!=e){a.delegate.displayStatus('Saving preset ...');var t={};t.name=e,a.presetDefaultCheckbox.is(':checked')&&(t.make_default=1),a.delegate.postAjax('ilab_imgix_new_preset',t,function(e){a.delegate.hideStatus(),'ok'==e.status&&(a.delegate.settings.currentPreset=e.currentPreset,a.delegate.settings.presets=e.presets,a.init())})}},this.savePreset=function(){if(null!=a.presetSelect.val()){a.delegate.displayStatus('Saving preset ...');var e={};e.key=a.presetSelect.val(),a.presetDefaultCheckbox.is(':checked')&&(e.make_default=1),a.delegate.postAjax('ilab_imgix_save_preset',e,function(){a.delegate.hideStatus()})}},this.deletePreset=function(){if(null!=a.presetSelect.val()&&confirm('Are you sure you want to delete this preset?')){a.delegate.displayStatus('Delete preset ...');var e={};e.key=a.presetSelect.val(),a.delegate.postAjax('ilab_imgix_delete_preset',e,function(e){a.delegate.hideStatus(),'ok'==e.status&&(a.delegate.settings.currentPreset=e.currentPreset,a.delegate.settings.presets=e.presets,a.init(),a.delegate.bindUI(e))})}},this.init()};(function(e){e.fn.ilabSidebarTabs=function(t){var i=e.extend({},t),a=!1;return this.find('.ilabm-sidebar-tab').each(function(){var t=e(this),o=i.container.find('.'+t.data('target'));a||(t.addClass('active-tab'),o.removeClass('is-hidden'),a=!0),t.on('click',function(a){return a.preventDefault(),i.container.find('.ilabm-sidebar-tab').each(function(){var t=e(this),a=i.container.find('.'+t.data('target'));t.removeClass('active-tab'),a.addClass('is-hidden')}),t.addClass('active-tab'),o.removeClass('is-hidden'),!1})})}})(jQuery);var ILabImageEdit=function(e,t){function i(){a.displayStatus('Building preview ...'),a.waitModal.removeClass('is-hidden'),a.postAjax('ilab_imgix_preview',{},function(e){if('ok'==e.status){var t=e.src==a.previewImage.attr('src'),i=!1;a.previewImage.on('load',function(){i=!0,a.waitModal.addClass('is-hidden'),a.hideStatus()}),a.previewImage.on('error',function(){i=!0,a.waitModal.addClass('is-hidden'),a.hideStatus()}),a.previewImage.attr('src',e.src),t&&setTimeout(function(){i||(a.waitModal.addClass('is-hidden'),a.hideStatus())},3e3)}else a.waitModal.addClass('is-hidden'),a.hideStatus()})}this.previewTimeout=null,this.previewsSuspended=!1,this.parameters=[];var a=this;this.settings=t,this.modalContainer=e('#ilabm-container-'+t.modal_id),this.waitModal=this.modalContainer.find('.ilabm-preview-wait-modal'),this.previewImage=this.modalContainer.find('.imgix-preview-image'),this.presets=new ILabImgixPresets(e,this,this.modalContainer),this.modalContainer.find('.imgix-button-reset-all').on('click',function(){a.resetAll()}),this.modalContainer.find('.imgix-button-save-adjustments').on('click',function(){a.apply()}),this.modalContainer.find('.imgix-parameter').each(function(){var t=e(this),i=t.data('param-type');'slider'==i?a.parameters.push(new ImgixComponents.ImgixSlider(a,t)):'color'==i||'blend-color'==i?a.parameters.push(new ImgixComponents.ImgixColor(a,t)):'pillbox'==i?a.parameters.push(new ImgixComponents.ImgixPillbox(a,t)):'media-chooser'==i?a.parameters.push(new ImgixComponents.ImgixMediaChooser(a,t)):'alignment'==i&&a.parameters.push(new ImgixComponents.ImgixAlignment(a,t))}),this.modalContainer.on('click','.imgix-pill',function(){var t=e(this).data('param'),i=a.modalContainer.find('#imgix-param-'+t);1==i.val()?(i.val(0),e(this).removeClass('pill-selected')):(i.val(1),e(this).addClass('pill-selected')),a.preview()}),this.modalContainer.find('.ilabm-editor-tabs').ilabTabs({currentValue:a.settings.size,tabSelected:function(e){ILabModal.loadURL(e.data('url'),!0,function(e){a.bindUI(e)})}}),this.modalContainer.find('.ilabm-sidebar-tabs').ilabSidebarTabs({delegate:this,container:this.modalContainer}),this.postAjax=function(t,i,o){var r={};a.parameters.forEach(function(e){r=e.saveValue(r)}),i.image_id=a.settings.image_id,i.action=t,i.size=a.settings.size,i.settings=r,e.post(ajaxurl,i,o)},this.preview=function(){a.previewsSuspended||(ILabModal.makeDirty(),clearTimeout(a.previewTimeout),a.previewTimeout=setTimeout(i,500))},this.bindUI=function(e){if(e.hasOwnProperty('currentPreset')&&null!=e.currentPreset&&''!=e.currentPreset){var t=a.settings.presets[e.currentPreset];a.presets.setCurrentPreset(e.currentPreset,t.default_for==e.size)}else a.presets.clearSelected();a.previewsSuspended=!0,a.settings.size=e.size,a.settings.settings=e.settings;var i=function(){a.previewImage.off('load',i),a.parameters.forEach(function(t){t.reset(e.settings)}),a.previewsSuspended=!1,ILabModal.makeClean()};e.src?(a.previewImage.on('load',i),a.previewImage.attr('src',e.src)):i()},this.bindPreset=function(e){a.previewsSuspended=!0,a.settings.settings=e.settings,a.previewImage.off('load'),a.parameters.forEach(function(e){e.reset(a.settings.settings)}),a.previewsSuspended=!1,a.preview()},this.apply=function(){a.displayStatus('Saving adjustments ...'),a.postAjax('ilab_imgix_save',{},function(){a.hideStatus(),ILabModal.makeClean()})},this.resetAll=function(){a.parameters.forEach(function(e){e.reset()})},this.displayStatus=function(e){a.modalContainer.find('.ilabm-status-label').text(e),a.modalContainer.find('.ilabm-status-container').removeClass('is-hidden')},this.hideStatus=function(){a.modalContainer.find('.ilabm-status-container').addClass('is-hidden')}}; \ No newline at end of file diff --git a/public/js/ilab-media-tools.js.map b/public/js/ilab-media-tools.js.map deleted file mode 100644 index 12044b7b..00000000 --- a/public/js/ilab-media-tools.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../vendor/cropper/dist/cropper.js","ilab-crop.js","components/imgix-component.js","components/imgix-label.js","components/imgix-slider.js","components/imgix-color.js","components/imgix-alignment.js","components/imgix-media-chooser.js","components/imgix-pillbox.js","ilab-imgix-presets.js","ilab-sidebar-tabs.js","ilab-imgix.js"],"names":[],"mappings":"AAUA,YACA,mCACA,AACA,IACA,qBACA,AACA,mCACA,AACA,AACA,aACA,AACA,qBACA,AACA,CACA,AACA,AACA,0BAmFA,4BACA,QACA,AACA,cACA,OACA,qBACA,AACA,gBACA,IACA,AACA,AACA,YACA,SACA,AACA,AACA,gBACA,UACA,AACA,AACA,gBACA,mBACA,AACA,oBACA,6BACA,YACA,CACA,AACA,cACA,eACA,AACA,6CACA,cACA,mBACA,mBACA,AACA,KACA,AACA,cACA,+BACA,AACA,4CACA,MACA,AACA,cACA,iCACA,EACA,AACA,gBACA,IACA,AACA,AACA,0BACA,uBACA,AACA,AACA,AACA,6CACA,AACA,0BACA,mBACA,OACA,AACA,UACA,IACA,AACA,cACA,IACA,UACA,WACA,WACA,AACA,AACA,oBACA,8BACA,AACA,AACA,KACA,yBACA,AACA,AACA,6BACA,MACA,AACA,gBACA,IAQA,GACA,AACA,AACA,iBAVA,uBACA,MACA,QACA,UACA,UACA,WACA,6BAQA,OACA,AACA,AACA,YANA,UACA,AACA,KAKA,CACA,QACA,AACA,SACA,AACA,gBACA,IAeA,GACA,EACA,AACA,AACA,kBAlBA,kBACA,QACA,IACA,MACA,iBACA,kBACA,WACA,WACA,6BACA,eACA,QACA,eACA,aACA,GAiDA,eA3CA,MACA,AACA,AACA,AACA,WACA,CACA,QACA,SACA,AACA,AACA,eACA,UACA,WACA,MACA,AACA,AACA,KACA,UACA,AACA,AACA,kBACA,OACA,AACA,IACA,SACA,AACA,AACA,AACA,AACA,qBACA,AACA,AACA,AACA,2BACA,AACA,AACA,qCACA,AACA,AACA,YACA,AACA,AACA,WAEA,AACA,cACA,SACA,SACA,IACA,AACA,AACA,mCACA,MACA,WACA,KACA,AACA,GACA,KACA,AACA,AACA,MACA,CACA,QACA,AACA,QACA,AACA,kBACA,IAEA,AACA,KAFA,oBAGA,YACA,AACA,AACA,aACA,QACA,AACA,cACA,IAGA,GACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,AACA,AACA,IAbA,aACA,mCAaA,0BACA,AACA,OACA,+CACA,CACA,IACA,KACA,AACA,CACA,GACA,AACA,AACA,AACA,CAoBA,WAnBA,MACA,AACA,GACA,wBACA,eACA,AACA,cACA,+BACA,uBACA,AACA,KACA,SACA,AACA,AACA,AACA,AACA,AACA,AACA,kBAEA,AACA,uBACA,gBACA,AACA,yBACA,AACA,AACA,IACA,AACA,AACA,MACA,AACA,AACA,AACA,iCACA,AACA,AACA,KACA,KACA,AACA,AACA,AACA,CACA,QACA,AACA,cACA,IAMA,AACA,iBANA,MACA,YACA,SACA,WACA,qBAGA,WACA,AACA,AACA,cACA,QACA,AACA,AACA,cACA,IAIA,AACA,KAJA,aACA,SACA,eAGA,UACA,AACA,AACA,sCACA,IACA,AACA,gBACA,eACA,2CACA,0BACA,iBACA,gBACA,oBACA,kBACA,kBACA,mBACA,mBACA,kBACA,iBACA,0BACA,eACA,kBACA,UACA,MACA,AACA,mBA3ZA,YACA,mBACA,kBACA,mBACA,qBACA,oBACA,kBACA,AACA,AACA,OACA,AACA,AACA,YACA,kBACA,iBACA,mBAEA,iBACA,iBACA,qBAIA,mDACA,kDACA,qFACA,oCACA,aACA,YACA,aACA,cACA,aACA,aACA,iBACA,gBACA,eACA,YACA,AACA,AACA,YACA,2CACA,YACA,6BACA,AACA,AACA,iCACA,aACA,AACA,AACA,YACA,OACA,OACA,OACA,OACA,QACA,QACA,QACA,QACA,SACA,UACA,UACA,wCAIA,sEACA,AACA,AACA,cACA,eACA,YACA,YACA,YACA,YACA,YACA,aACA,cACA,AACA,AACA,gBACA,AACA,yBA2UA,CACA,AACA,6BACA,IAEA,AACA,UAFA,wBAGA,SACA,AACA,AACA,mCACA,AACA,AACA,OACA,GACA,AACA,AACA,AACA,gBACA,iBACA,uBACA,AACA,AACA,kBACA,OACA,AACA,AACA,uBACA,SACA,AACA,WAGA,qBAFA,AACA,YAEA,AACA,kBACA,IAGA,GACA,AACA,SAJA,eACA,SAIA,AACA,AACA,AACA,AACA,sBACA,AACA,wBACA,AACA,AACA,AACA,4BACA,WACA,AACA,8BACA,SACA,AACA,AACA,6BACA,AACA,AACA,QACA,UACA,UACA,WACA,AACA,AACA,kBACA,AACA,sDACA,MACA,SACA,AACA,yBACA,QACA,SACA,AACA,mCACA,mBACA,AACA,AACA,aACA,wBACA,gBACA,eACA,AACA,kBACA,IAIA,GACA,EACA,AACA,SANA,UACA,YACA,MAKA,eACA,AACA,AACA,AACA,AACA,KACA,SACA,AACA,AACA,AACA,EACA,SACA,AACA,AACA,AACA,IACA,SACA,AACA,AACA,AACA,EACA,SACA,MACA,AACA,AACA,AACA,GACA,QACA,AACA,AACA,AACA,GACA,SACA,MACA,AACA,AACA,AACA,GACA,SACA,AACA,AACA,AACA,AACA,aACA,cACA,AACA,AACA,YACA,aACA,WACA,AACA,AACA,eACA,OACA,AACA,kBACA,IAKA,GACA,AACA,SANA,eACA,gBACA,MACA,uBAIA,gBACA,AACA,AACA,iBACA,AACA,OACA,AACA,AACA,cACA,AACA,AACA,AACA,YACA,mBACA,6DACA,AACA,WACA,WACA,cACA,AACA,mCACA,AACA,AACA,OACA,2BACA,+BACA,OACA,YACA,AACA,cACA,AACA,kBACA,YACA,gBACA,AACA,YACA,qBACA,MACA,AACA,AACA,iCACA,qBACA,CACA,eACA,4BACA,AACA,AACA,WACA,iBACA,SACA,MACA,AACA,iBACA,aACA,qBACA,IACA,AACA,kBACA,IAIA,GACA,EACA,AACA,SANA,eACA,gBACA,YAKA,AACA,AACA,AACA,AACA,gBACA,cACA,AACA,AACA,AACA,4BACA,6BACA,iDACA,+BACA,4CACA,0CACA,yCACA,AACA,AACA,+BACA,AACA,AACA,eACA,SACA,AACA,AACA,oBACA,mBACA,AACA,0CACA,2CACA,AACA,IACA,eACA,AACA,eACA,qBACA,AACA,AACA,eACA,AACA,AACA,eACA,kCACA,AACA,AACA,eACA,kCACA,AACA,AACA,cACA,8BACA,AACA,AACA,eACA,aACA,AACA,AACA,SAvqBA,uBAwqBA,cACA,AACA,AACA,SAvqBA,AACA,AACA,iBAsqBA,0DACA,AACA,AACA,+BACA,eACA,cACA,0BACA,gBACA,AACA,AACA,oCACA,MACA,+BACA,gBACA,sBACA,GACA,AACA,oBACA,MACA,AACA,AACA,AACA,eACA,gBACA,iCACA,AACA,AACA,wBACA,yBACA,oBACA,iBACA,AACA,AACA,kBACA,UACA,AACA,cACA,6BACA,AACA,mBACA,mBACA,mBACA,kBACA,qBACA,AACA,mBACA,uBACA,KACA,AACA,mBACA,MACA,qBACA,kBACA,AACA,mBACA,AACA,oBACA,gBACA,AACA,eACA,AACA,0BACA,YACA,eACA,gBACA,kBACA,AACA,WACA,cACA,AACA,oCACA,6CACA,oDACA,AACA,AACA,SACA,cACA,cACA,AACA,AACA,uBACA,IAcA,AACA,kBAdA,gBACA,cACA,UACA,cACA,UACA,iBACA,gBACA,oBACA,QACA,QACA,IACA,IACA,IAGA,MACA,QACA,AACA,MACA,AACA,AACA,IACA,QACA,AACA,MACA,AACA,AACA,AACA,MACA,CACA,eACA,gBACA,cACA,QACA,AACA,AACA,iCACA,uBACA,AACA,OACA,+BACA,WACA,uCACA,kCACA,YACA,AACA,2BACA,IAUA,GACA,EACA,EACA,AACA,AACA,SAdA,YACA,gBACA,cACA,UACA,cACA,WACA,mBACA,eACA,yCAOA,2BACA,AACA,AACA,MACA,OACA,UACA,AACA,QACA,QACA,QACA,AACA,MACA,AACA,AACA,AACA,AACA,yBACA,AACA,uBACA,AACA,WACA,UACA,AACA,OACA,QACA,AACA,MACA,AACA,AACA,AACA,AACA,AACA,MACA,KACA,QACA,AACA,MACA,AACA,AACA,QACA,AACA,UACA,AACA,AACA,OACA,aACA,uBACA,qBACA,AACA,AACA,AACA,AACA,uBACA,YACA,AACA,oBACA,iBACA,kBACA,iBACA,AACA,aACA,sBACA,KACA,sBACA,AACA,gBACA,KACA,qBACA,AACA,oBACA,gBACA,AACA,IACA,UACA,wBACA,kBACA,AACA,AACA,QACA,wBACA,iBACA,AACA,AACA,AACA,AACA,uBACA,kBACA,SACA,YACA,AACA,AACA,UACA,AACA,0BACA,IAMA,GACA,AACA,SAPA,cACA,UACA,WACA,iBACA,mBAIA,iBACA,AACA,AACA,iBACA,SACA,eACA,OACA,AACA,AACA,uBACA,AACA,aACA,wCACA,6BACA,YACA,iBACA,SACA,gBACA,iBACA,AACA,AACA,kBACA,UACA,CACA,QACA,SACA,AACA,AACA,4BACA,wBACA,AACA,AACA,aACA,AACA,AACA,AACA,oDACA,qBACA,AACA,AACA,2CACA,qBACA,AACA,AACA,4CACA,iDACA,AACA,gBACA,AACA,8DACA,gDACA,AACA,yBACA,SACA,eACA,cACA,WACA,AACA,AACA,WACA,AACA,mCACA,gBACA,AACA,AACA,AACA,4BACA,AACA,QACA,AACA,yBACA,IAGA,AACA,UAHA,cACA,QAGA,aACA,SACA,eACA,gBACA,qBACA,AACA,AACA,AACA,+BACA,SACA,eACA,8BACA,0BACA,GACA,SACA,eACA,YACA,MACA,AACA,AACA,oBACA,SACA,eACA,oBACA,iBACA,cACA,AACA,AACA,AACA,eACA,AACA,QACA,AACA,wBACA,YACA,eACA,WACA,kCACA,MACA,SACA,eACA,AACA,AACA,AACA,yBACA,iBACA,AACA,kBACA,AACA,AACA,AACA,eACA,eACA,AACA,AACA,wDACA,iDACA,AACA,AACA,mCACA,mCACA,oDACA,2CACA,AACA,wBACA,YACA,AACA,4BACA,IASA,GACA,EACA,EACA,AACA,AACA,SAbA,YACA,mBACA,cACA,UACA,cACA,cACA,eACA,uCAOA,4BACA,AACA,AACA,IACA,UACA,mBACA,oBACA,AACA,AACA,cACA,KACA,QACA,AACA,MACA,AACA,AACA,QACA,AACA,UACA,AACA,AACA,KACA,QACA,AACA,MACA,AACA,AACA,AACA,AACA,gBACA,oBACA,UACA,aACA,AACA,AACA,AACA,AACA,qCACA,sBACA,sCACA,sCACA,AACA,mBACA,WACA,gBACA,mBACA,AACA,AACA,QACA,AACA,0BACA,YACA,eACA,cACA,UACA,cACA,AACA,uCACA,qBACA,AACA,AACA,2CACA,qBACA,AACA,AACA,4CACA,iDACA,AACA,gBACA,AACA,+DACA,gDACA,AACA,qBACA,AACA,AACA,kDACA,AACA,AACA,oCACA,SACA,eACA,cACA,WACA,AACA,AACA,2BACA,gBACA,AACA,AACA,wBACA,iBACA,AACA,QACA,AACA,mBACA,MACA,AACA,eACA,iCACA,AACA,UACA,AACA,wBACA,IAGA,AACA,YAHA,0CACA,iCAGA,8CACA,oBACA,qCACA,SACA,AACA,AACA,eACA,SACA,iBACA,gBACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,WACA,cACA,AACA,AACA,AACA,AACA,AACA,+LACA,EACA,AACA,yBACA,8BACA,SACA,UACA,AACA,cACA,SACA,eACA,sBACA,aACA,EACA,AACA,oBACA,YACA,aACA,cACA,YACA,UACA,WACA,UACA,yBACA,qBACA,AACA,0BACA,AACA,AACA,AACA,8BACA,CACA,QACA,oBACA,aACA,aACA,AACA,AACA,oCACA,SACA,UACA,YACA,UACA,OACA,IACA,MACA,AACA,AACA,QACA,MACA,AACA,AACA,QACA,QACA,MACA,IACA,AACA,AACA,WACA,CACA,QACA,2BACA,OACA,WACA,eACA,eACA,eACA,AACA,MACA,GACA,AACA,iBACA,YACA,eACA,gBACA,AACA,wBACA,qBACA,AACA,AACA,0BACA,oBACA,AACA,AACA,yBACA,mBACA,AACA,AACA,wBACA,gBACA,AACA,AACA,qBACA,gBACA,AACA,AACA,oCACA,AACA,qBACA,uCACA,AACA,AACA,SACA,uDACA,AACA,AACA,OACA,sCACA,yCACA,AACA,SACA,8CACA,AACA,MACA,AACA,mBACA,YACA,eACA,gBACA,AACA,wBACA,sBACA,AACA,AACA,0BACA,qBACA,AACA,AACA,yBACA,oBACA,AACA,AACA,wBACA,iBACA,AACA,AACA,qBACA,iBACA,AACA,AACA,mBACA,AACA,yBACA,0BACA,AACA,AACA,SACA,uCACA,AACA,AACA,UACA,aACA,sBACA,AACA,YACA,yBACA,AACA,QACA,AACA,mBACA,IAIA,GACA,EACA,AACA,AACA,iBAPA,eACA,kBACA,2BAMA,AACA,AACA,AACA,mBACA,AACA,AACA,6BACA,AACA,qBACA,uBACA,AACA,AACA,uBACA,AACA,AACA,sDACA,MACA,GACA,8CACA,MACA,GACA,AACA,AACA,MACA,AACA,qBACA,MACA,AACA,AACA,AACA,2BACA,iBACA,AACA,qBACA,AACA,gBACA,AACA,mBACA,SACA,oDACA,MACA,AACA,OACA,AACA,AACA,AACA,eACA,AACA,AACA,sBACA,AACA,AACA,AACA,gBACA,AACA,yCACA,MACA,mBACA,AACA,MACA,uBACA,IACA,2BACA,MACA,yBACA,AACA,AACA,aACA,SACA,AACA,uBACA,IAKA,GACA,AACA,SANA,YACA,qBACA,QACA,aAIA,AACA,AACA,AACA,iBACA,QACA,AACA,OACA,kCACA,UACA,kBACA,qBACA,MACA,AACA,SACA,AACA,AACA,AACA,YACA,EACA,AACA,qBACA,AACA,mBACA,mBACA,CACA,gBACA,WACA,qBACA,AACA,AACA,SACA,AACA,sBACA,cACA,AACA,AACA,AACA,sCACA,gCACA,AACA,MACA,cACA,0BACA,AACA,YACA,EACA,AACA,sBACA,IAMA,AACA,UANA,YACA,qBACA,QACA,WACA,gBAGA,AACA,AACA,AACA,iBACA,QACA,AACA,OACA,kCACA,UACA,gBACA,mBACA,AACA,UACA,AACA,AACA,AACA,YACA,EACA,AACA,MACA,mBACA,CACA,gBACA,WACA,qBACA,AACA,AACA,SACA,AACA,yCACA,8BACA,AACA,sCACA,KACA,EACA,AACA,qBACA,SACA,qBACA,AACA,YACA,AACA,AACA,AACA,AACA,kBACA,AACA,sBACA,gBACA,qEACA,AACA,AACA,oBACA,AACA,kBACA,CACA,gBACA,AACA,AACA,WACA,AACA,sBACA,IAkBA,GACA,AACA,AACA,SApBA,YACA,mBACA,cACA,iBACA,cACA,YACA,UACA,WACA,SACA,MACA,MACA,MACA,IACA,MACA,UACA,OACA,KA0BA,AACA,OAtBA,mBACA,AACA,AACA,QACA,gBACA,YACA,+BACA,+BACA,AACA,AACA,WACA,kBACA,wBACA,AACA,AACA,AACA,kBACA,UACA,AACA,AACA,QAGA,aACA,OACA,EACA,AACA,AACA,MACA,0BACA,iBACA,AACA,CACA,KACA,KACA,AACA,MACA,AACA,AACA,QACA,WACA,AACA,AACA,GACA,MACA,OACA,AACA,AACA,GACA,AACA,MACA,0BACA,iBACA,AACA,CACA,KACA,KACA,AACA,MACA,OACA,AACA,AACA,QACA,WACA,AACA,AACA,GACA,MACA,OACA,AACA,AACA,GACA,AACA,MACA,0BACA,iBACA,AACA,CACA,KACA,KACA,AACA,MACA,OACA,AACA,AACA,QACA,WACA,AACA,AACA,GACA,MACA,OACA,AACA,AACA,GACA,AACA,MACA,0BACA,iBACA,AACA,CACA,KACA,KACA,AACA,MACA,AACA,AACA,QACA,WACA,AACA,AACA,GACA,MACA,OACA,AACA,AACA,GACA,AACA,MACA,aACA,yBACA,CACA,KACA,KACA,AACA,MACA,OACA,IACA,GACA,KACA,QACA,SACA,UACA,OACA,AACA,AACA,WACA,AACA,AACA,EACA,OACA,WACA,OACA,AACA,AACA,SACA,OACA,AACA,AACA,AACA,QACA,KACA,OACA,IACA,GACA,KACA,OACA,GACA,MACA,OACA,AACA,AACA,GACA,AACA,MACA,aACA,yBACA,CACA,KACA,KACA,AACA,MACA,OACA,IACA,SACA,CACA,KACA,QACA,UACA,OACA,WACA,OACA,AACA,AACA,YACA,OACA,AACA,AACA,GACA,OACA,WACA,OACA,AACA,AACA,SACA,OACA,AACA,AACA,AACA,QACA,KACA,OACA,IACA,GACA,KACA,OACA,GACA,MACA,OACA,AACA,AACA,GACA,AACA,MACA,aACA,yBACA,CACA,KACA,KACA,AACA,MACA,OACA,IACA,GACA,KACA,QACA,UACA,OACA,WACA,OACA,AACA,AACA,YACA,OACA,AACA,AACA,GACA,OACA,WACA,AACA,AACA,QACA,AACA,AACA,AACA,OACA,KACA,OACA,IACA,GACA,KACA,OACA,GACA,MACA,OACA,AACA,AACA,GACA,AACA,MACA,aACA,yBACA,CACA,KACA,KACA,AACA,MACA,IACA,GACA,KACA,QACA,SACA,UACA,OACA,AACA,AACA,WACA,AACA,AACA,EACA,OACA,WACA,AACA,AACA,QACA,AACA,AACA,AACA,OACA,KACA,OACA,IACA,GACA,KACA,OACA,GACA,MACA,OACA,AACA,AACA,GACA,AACA,AACA,MACA,wBACA,GACA,KACA,AACA,AACA,MACA,mCACA,cACA,cACA,AACA,YACA,MACA,sBACA,6BACA,2BACA,yBACA,AACA,6BACA,wBACA,MACA,KACA,AACA,AACA,MACA,sBACA,CACA,KACA,KACA,AACA,iBACA,yBACA,qBACA,QACA,aACA,AACA,UACA,QACA,YACA,QACA,OACA,AACA,AACA,aACA,QACA,AACA,AACA,AACA,WACA,0BACA,oBACA,AACA,kBACA,gBACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,4BACA,UACA,WACA,SACA,WACA,AACA,cACA,AACA,AACA,AACA,kCACA,sBACA,IACA,AACA,AACA,iBACA,qBACA,AACA,AACA,AACA,mBACA,iBACA,kBACA,AACA,iCACA,qBACA,AACA,AACA,0BACA,AACA,AACA,yCACA,gBACA,AACA,AACA,kBACA,qBACA,AACA,AACA,AACA,yCACA,2CACA,6CACA,AACA,qBACA,AACA,oBACA,gBACA,AACA,gBACA,AACA,AACA,kBACA,uBACA,AACA,AACA,AACA,mCACA,MACA,MACA,QACA,SACA,AACA,AACA,SACA,kBACA,AACA,qBACA,AACA,AACA,wBACA,AACA,6BACA,6BACA,YACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,uBACA,OACA,qBACA,0BACA,AACA,AACA,AACA,iBACA,uBACA,AACA,cACA,0DACA,AACA,AACA,gBACA,aACA,AACA,AACA,AACA,iCACA,UACA,AACA,AACA,SACA,AACA,AACA,mBACA,MACA,eACA,4BACA,AACA,eACA,AACA,AACA,oBACA,MACA,eACA,4BACA,AACA,YACA,AACA,AACA,oBACA,YACA,AACA,cACA,2BACA,8BACA,AACA,AACA,kBACA,YACA,AACA,qBACA,mBACA,YACA,oBACA,AACA,AACA,AACA,WACA,aACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,oBACA,YACA,AACA,YACA,qBACA,mBACA,AACA,MACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,sBACA,YACA,OACA,AACA,AACA,KACA,OACA,AACA,AACA,OACA,QACA,AACA,mDACA,UACA,SACA,OACA,AACA,AACA,MACA,SACA,MACA,AACA,AACA,AACA,cACA,AACA,AACA,iBACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,oBACA,YACA,AACA,SACA,AACA,QACA,OACA,AACA,KACA,AACA,AACA,4BACA,eACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,sBACA,IAOA,GACA,EACA,EACA,EACA,AACA,SAXA,eACA,WACA,UACA,WACA,iBACA,mBAOA,AACA,uDACA,MACA,MACA,AACA,AACA,YACA,AACA,AACA,8BACA,CACA,yBACA,UACA,MACA,qBACA,AACA,AACA,AACA,0BACA,kCACA,yBACA,0BACA,AACA,AACA,AACA,YACA,wBACA,AACA,iBACA,uBACA,AACA,AACA,AACA,AACA,wBACA,eACA,AACA,AACA,KACA,UACA,cACA,gBACA,CACA,AACA,AACA,AACA,AACA,AACA,AACA,oBACA,sCACA,MACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,sBACA,GACA,AACA,yDACA,gCACA,SACA,kBACA,AACA,iBACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,qBACA,YACA,MACA,AACA,AACA,KACA,OACA,AACA,AACA,OACA,QACA,AACA,mDACA,WACA,SACA,SACA,AACA,AACA,MACA,SACA,SACA,AACA,AACA,AACA,cACA,AACA,AACA,gBACA,AACA,AACA,AACA,AACA,AACA,AACA,oBACA,kBACA,AACA,2BACA,EACA,AACA,AACA,AACA,AACA,AACA,AACA,oBACA,kBACA,AACA,yBACA,IACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,qBACA,IAKA,GACA,AACA,SANA,eACA,aACA,cACA,QAqCA,0BAjCA,aACA,YACA,eACA,YACA,eACA,AACA,AACA,oBACA,AACA,mCACA,AACA,aACA,OACA,AACA,AACA,MACA,GACA,IACA,QACA,SACA,AACA,AACA,AACA,KACA,+BACA,AACA,AACA,KACA,8BACA,qBACA,AACA,AACA,IAEA,AACA,AACA,AACA,AACA,AACA,AACA,qBACA,IAKA,GACA,EACA,AACA,SAPA,eACA,aACA,OACA,OAKA,8BACA,AACA,AACA,4CACA,qBACA,qCACA,oBACA,sBACA,AACA,AACA,AACA,QACA,qCACA,oBACA,OACA,AACA,AACA,gCACA,oBACA,OACA,AACA,AACA,AACA,AACA,cACA,AACA,uBACA,AACA,AACA,0BACA,AACA,iBACA,oBACA,AACA,AACA,UACA,mBACA,AACA,AACA,SACA,mBACA,AACA,AACA,aACA,qBACA,AACA,AACA,eACA,AACA,kBACA,AACA,AACA,AACA,AACA,AACA,AACA,6BACA,0BACA,YACA,AACA,AACA,AACA,AACA,AACA,AACA,yBACA,2BACA,QACA,AACA,AACA,AACA,AACA,AACA,AACA,0BACA,YACA,OACA,AACA,KAcA,YAbA,WACA,AACA,AACA,AACA,AACA,AACA,AACA,iFACA,MACA,IACA,AACA,AACA,IAEA,AACA,AACA,AACA,AACA,AACA,AACA,2BACA,YACA,WACA,AACA,cACA,8BACA,AACA,AACA,6CACA,uBACA,iBACA,AACA,AACA,UACA,eACA,AACA,AACA,SACA,kBACA,iBACA,aACA,qBACA,iBACA,AACA,AACA,eACA,AACA,iBACA,AACA,AACA,AACA,AACA,AACA,AACA,2BACA,IAEA,AACA,UAFA,kCAGA,cACA,QACA,WACA,YACA,eACA,AACA,AACA,AACA,SACA,KACA,AACA,AACA,AACA,AACA,AACA,AACA,4BACA,IAGA,GACA,AACA,SAJA,uBACA,cAIA,8BACA,AACA,AACA,6DACA,AACA,uBACA,iBACA,AACA,AACA,UACA,eACA,AACA,AACA,SACA,SACA,eACA,AACA,AACA,WACA,UACA,gBACA,AACA,AACA,AACA,AACA,yBACA,AACA,sBACA,AACA,AACA,AACA,gBACA,AACA,gBACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,8BACA,IACA,GACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,AACA,UACA,AACA,AACA,AACA,wBACA,aAIA,mBACA,AACA,AACA,aACA,cACA,UACA,SACA,AACA,MACA,uBACA,UACA,AACA,AACA,YACA,MACA,AACA,WACA,MACA,AACA,AACA,AACA,AACA,WACA,WACA,AACA,sBACA,KACA,UACA,wBACA,AACA,QACA,0BACA,uBACA,AACA,AACA,AACA,sCACA,IAUA,GACA,AACA,AACA,EACA,EACA,EACA,EACA,AACA,0BAjBA,WACA,UACA,cACA,SACA,AACA,AACA,6CACA,4CACA,EAgDA,cAtCA,YACA,EACA,QACA,KACA,WACA,MACA,SACA,WACA,AACA,AACA,mBACA,YACA,EACA,QACA,KACA,WACA,MACA,SACA,WACA,AACA,AACA,AACA,+BACA,AACA,AACA,AACA,WACA,KACA,KACA,KACA,AACA,AACA,AACA,WACA,8BACA,AACA,AACA,eAEA,AACA,AACA,gCApGA,AACA,AACA,MAmGA,AACA,AACA,AACA,AACA,AACA,AACA,4BACA,YACA,AACA,yBACA,AACA,AACA,8BACA,AACA,SACA,eACA,AACA,mBACA,gBACA,AACA,AACA,AACA,iBACA,AACA,AACA,AACA,AACA,AACA,AACA,yBACA,IAEA,GACA,AACA,SAHA,6BAIA,eACA,oBACA,SACA,AACA,OAhqFA,AACA,AACA,YA+pFA,SACA,WACA,iBACA,AACA,oBACA,AACA,AACA,qBACA,MACA,WACA,iBACA,AACA,AACA,iBACA,AACA,AACA,cACA,AACA,AACA,UACA,AACA,AACA,WACA,AACA,AACA,mBACA,AACA,AACA,SACA,AACA,AACA,aACA,AACA,AACA,GACA,AACA,AACA,cACA,AACA,AACA,WACA,AACA,AACA,oBACA,AACA,AACA,oBACA,AACA,AACA,SACA,AACA,AACA,UACA,AACA,AACA,UACA,AACA,AACA,aACA,AACA,AACA,cACA,AACA,AACA,yBACA,AACA,AACA,IACA,AACA,AACA,WACA,AACA,AACA,aACA,AACA,AACA,YACA,AACA,AACA,YACA,AACA,AACA,eACA,AACA,AACA,8BACA,AACA,AACA,IACA,AACA,AACA,kBACA,AACA,AACA,oBACA,AACA,AACA,2CACA,kBACA,kBACA,mBACA,oBACA,uBACA,AACA,AACA,UACA,WACA,eACA,cACA,aACA,UACA,UACA,AACA,AACA,+BACA,YACA,WACA,AACA,IACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,slCACA,AACA,AACA,gCACA,IAEA,AACA,iBAFA,8BAGA,IAGA,GACA,AACA,MAJA,UACA,cAIA,cACA,QACA,AACA,AACA,gCACA,sCACA,QACA,AACA,oCACA,YACA,AACA,WACA,AACA,QACA,MACA,AACA,eACA,yCACA,AACA,AACA,8CACA,uBACA,MACA,IACA,AACA,CACA,ACr7FA,AACA,AACA,AACA,GACA,0BACA,MACA,uDACA,gDACA,uBACA,+BACA,AACA,YAEA,KADA,KAEA,AACA,6DACA,4BACA,4BACA,+CACA,GACA,SACA,EACA,AACA,AACA,+BACA,AACA,AACA,4BACA,uCACA,8BACA,kCACA,uCACA,AACA,AACA,QACA,OACA,qBACA,wCACA,IACA,AACA,AACA,wEACA,CAGA,SAFA,mBACA,SAEA,AACA,2BACA,YACA,UACA,IACA,AACA,oCACA,4DACA,2DACA,kCACA,aACA,AACA,MACA,AACA,yBACA,MACA,AACA,gCACA,4BACA,AACA,kDACA,AACA,sFACA,AACA,AACA,6CACA,AACA,yIACA,AACA,AACA,KACA,AACA,0CACA,AACA,wDACA,wCACA,KACA,gBACA,oBACA,yBACA,AACA,AACA,AACA,6DACA,GACA,mDACA,AACA,YACA,UACA,gBACA,wBACA,sBACA,WACA,SACA,YACA,kBACA,yBACA,EACA,qBACA,YACA,oBACA,oBACA,wDACA,AACA,AACA,wBACA,AACA,sBACA,OACA,AACA,wBACA,AACA,8CACA,oBACA,yCACA,8BACA,sCACA,CACA,qFACA,GACA,YACA,gEACA,AACA,AACA,QACA,YACA,EACA,AACA,gCACA,8CACA,qEACA,YACA,AACA,4BACA,2DACA,YACA,AACA,OACA,SACA,ACjJA,AACA,AACA,AACA,AACA,4BACA,OAMA,WACA,CACA,AACA,AACA,qBATA,IACA,yFACA,KACA,AACA,GCVA,gBACA,AACA,4BACA,SACA,AACA,wCACA,IAGA,AACA,OAHA,AACA,QAGA,AACA,MACA,yFACA,AACA,oCACA,IACA,oBACA,cACA,AACA,oBACA,8BACA,cACA,AACA,aACA,AACA,8BACA,OACA,cACA,AACA,0BACA,kBACA,8BACA,cACA,AACA,aACA,OACA,uBACA,kBACA,OACA,MACA,wBACA,cACA,aACA,OACA,uBACA,kBACA,OACA,MACA,wBACA,cACA,aACA,AACA,OACA,AACA,eACA,AACA,6BACA,AACA,eACA,AACA,oBACA,AACA,AACA,YACA,AACA,AACA,oBACA,AACA,2BACA,CA+BA,SA9BA,AACA,wCACA,kBACA,wBACA,AACA,aACA,uCACA,GACA,YACA,AACA,AACA,QACA,OACA,AACA,yBACA,kBACA,kBACA,8BACA,cACA,AACA,aACA,OACA,AACA,uDACA,IACA,qBACA,eACA,WACA,AACA,UAEA,EACA,EACA,AACA,IACA,AC1GA,AACA,kBACA,6BACA,aACA,MACA,gBACA,mCACA,oDACA,wCACA,AACA,+CACA,mCACA,AACA,eACA,AACA,0DACA,wBACA,iBACA,KACA,qBACA,aACA,AACA,AACA,iBACA,4BACA,cACA,UACA,AACA,AACA,0CACA,GACA,OACA,AACA,oCACA,4BACA,MACA,AACA,qCACA,4BACA,kBACA,SACA,EACA,AACA,0DACA,iBACA,yBACA,+BACA,QACA,AACA,yDACA,IACA,AACA,8BACA,cACA,AACA,YACA,AACA,6BACA,oBACA,+BACA,AACA,iBACA,SACA,AACA,6DACA,CAIA,+BAHA,yCACA,AACA,QAEA,AACA,GACA,ACxEA,kBACA,AACA,YAwEA,iCAvEA,aACA,MACA,gBACA,oCACA,8CACA,uCACA,sCACA,wCACA,kCACA,AACA,uBACA,AACA,iCACA,wBACA,uCACA,AACA,mCACA,gCACA,AACA,8CACA,YACA,SACA,EACA,AACA,gCACA,CACA,6BACA,YACA,SACA,AACA,AACA,2CACA,YACA,SACA,AACA,yCACA,GACA,OACA,EACA,AACA,yDACA,sBACA,UACA,+CACA,AACA,+BACA,QACA,AACA,wDACA,IAEA,AACA,KAFA,4CAGA,AACA,uBACA,AACA,AACA,iDACA,AACA,cACA,AACA,AACA,YACA,AACA,6BACA,IACA,YACA,4CACA,mBACA,AACA,2DAEA,EACA,2BACA,gCACA,AACA,AACA,wBACA,8CACA,AACA,OACA,2CACA,AACA,AACA,qBACA,SACA,AACA,4DACA,CAWA,MAVA,sKACA,AACA,IACA,0BACA,qEACA,AACA,AACA,AACA,AACA,SAEA,AACA,GACA,ACzGA,mBACA,AACA,gCACA,aACA,MACA,gBACA,uCACA,wCACA,+CACA,mCACA,AACA,eACA,AACA,2CACA,GACA,OACA,AACA,0DACA,SACA,iEACA,qBACA,qBACA,AACA,cACA,kDACA,2BACA,SACA,EACA,AACA,6DACA,sBACA,4DACA,QACA,AACA,4DACA,IACA,AACA,8BACA,cACA,AACA,YACA,AACA,aACA,eACA,AACA,4EACA,SACA,aACA,6BACA,AACA,oCACA,qBACA,AACA,uBACA,qBACA,SACA,AACA,gEACA,CAIA,uCAHA,iDACA,AACA,QAEA,GACA,AChEA,kBACA,AACA,mCACA,aACA,MACA,gBACA,gCACA,mDACA,yCACA,+CACA,AACA,+CACA,mCACA,AACA,gCACA,OACA,0BACA,MACA,AACA,oBACA,AACA,AACA,oBACA,AACA,2CACA,GACA,OACA,AACA,uCACA,wDACA,qCACA,oCACA,AACA,gBACA,SACA,AACA,2CACA,CAGA,SAFA,4BACA,SAEA,AACA,EACA,AACA,gEACA,uBACA,2BACA,+BACA,QACA,AACA,+DACA,IACA,AACA,4BACA,AACA,iBACA,uBACA,AACA,AACA,4BACA,AACA,mCACA,AACA,6CACA,AACA,AACA,AACA,kEACA,0CACA,AACA,AACA,2CACA,SACA,AACA,mEACA,uBACA,AACA,MAIA,UAHA,eACA,AACA,WAEA,AACA,GACA,ACpFA,AACA,mBACA,8BACA,aACA,MACA,gBACA,8BACA,kDACA,yBACA,oBACA,AACA,gBACA,AACA,iCACA,SACA,eACA,wDACA,+BACA,CAgBA,SAfA,AACA,iBACA,AACA,sCACA,cACA,AACA,AACA,AACA,mCACA,iBACA,AACA,AACA,6BACA,AACA,YAEA,EACA,EACA,AACA,2DACA,kBACA,QACA,AACA,0DACA,6BACA,qBACA,gBACA,AACA,SACA,oDACA,iBACA,EACA,AACA,mCACA,2BACA,AACA,AACA,0BACA,iBACA,8CACA,gBACA,EACA,AACA,eACA,SACA,AACA,8DACA,IACA,AACA,QACA,KASA,mDARA,CACA,wBACA,OACA,AACA,GACA,kCACA,AACA,OAEA,AACA,GACA,ACjFA,AACA,AACA,AACA,QACA,oCACA,AACA,MACA,iCACA,2DACA,2DACA,0EACA,AACA,oCACA,AACA,0CACA,IACA,AACA,sBAGA,AACA,AACA,kBAJA,6CACA,+DAIA,0CACA,mCACA,AACA,yBACA,aACA,AACA,wEACA,GACA,WACA,AACA,yEACA,GACA,YACA,AACA,2EACA,GACA,cACA,AACA,uBACA,+BACA,AACA,SACA,AACA,8EACA,AACA,AACA,AACA,0EACA,yBACA,kCACA,UACA,AACA,iCACA,0BACA,+CACA,OACA,AACA,iCACA,oDACA,AACA,eACA,AACA,+BACA,oBACA,gCACA,aACA,AACA,qCACA,AACA,gCACA,AACA,2CACA,AACA,6BACA,MACA,AACA,2BACA,cACA,sBACA,QACA,0BACA,AACA,wBACA,MACA,oCACA,6BACA,AACA,4DACA,YACA,aACA,AACA,qDACA,4CACA,AACA,UACA,AACA,OACA,EACA,CACA,AACA,4BACA,IACA,AACA,AACA,qDACA,AACA,wBACA,2BACA,iCACA,6BACA,AACA,4DACA,YACA,YACA,GACA,AACA,8BACA,IACA,AACA,AACA,oCACA,AACA,AACA,0EACA,AACA,wBACA,2BACA,AACA,kEACA,YACA,aACA,AACA,qDACA,4CACA,AACA,UACA,AACA,kBACA,AACA,UACA,GACA,AACA,OACA,MClJA,cACA,AACA,iCACA,SACA,AACA,aACA,2DACA,SACA,oCACA,AACA,AACA,AACA,0BACA,4BACA,AACA,aACA,AACA,AACA,8BACA,CAcA,SAbA,AACA,uEACA,SACA,oCACA,AACA,yBACA,yBACA,YACA,AACA,cACA,4BACA,AACA,eAEA,EACA,EACA,AACA,IACA,ACtCA,AACA,AACA,AACA,QACA,+BACA,aA6FA,iBACA,AACA,gDACA,AACA,2DACA,IACA,eACA,kCACA,OACA,AACA,wCACA,CACA,0BACA,eACA,YACA,AACA,uCACA,CACA,0BACA,eACA,YACA,AACA,+BACA,AACA,AACA,6BACA,AACA,0BACA,eACA,AACA,aACA,AACA,MACA,AACA,AACA,2BACA,eACA,AACA,YACA,EACA,AACA,AACA,AACA,AACA,qBAxIA,UACA,0BACA,AACA,oBACA,AACA,UACA,AACA,uDACA,kDACA,wEACA,AACA,sEACA,AACA,yFACA,GACA,UACA,mFACA,GACA,OACA,AACA,+DACA,SACA,eACA,cACA,kDACA,8BACA,uDACA,iBACA,mDACA,mBACA,yDACA,wBACA,sDACA,oBACA,AACA,0DACA,oBACA,iCACA,mBACA,AACA,kBACA,uBACA,AACA,AACA,AACA,yBACA,oBACA,AACA,AACA,oBACA,SACA,AACA,2DACA,yBACA,4BACA,+CACA,GACA,SACA,EACA,AACA,AACA,oEACA,UACA,oBACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,8CACA,IACA,sCACA,KACA,YACA,AACA,yBACA,SACA,6BACA,KACA,AACA,oBACA,YACA,AACA,AACA,AACA,AACA,AACA,yBA8CA,GACA,AACA,AACA,8BACA,AACA,2BACA,8CACA,KACA,AACA,AACA,AACA,AACA,AACA,yBACA,kFACA,4BACA,2EACA,KACA,AACA,gBACA,AACA,kBACA,uCACA,2BACA,AACA,yBACA,oBACA,0CACA,WACA,SACA,AACA,KACA,+BACA,WACA,AACA,IACA,AACA,uBACA,sCACA,AACA,AACA,MACA,GACA,AACA,6BACA,GACA,2CACA,AACA,4BACA,wCACA,oBACA,SACA,AACA,KACA,uBACA,SACA,AACA,AACA,uBACA,iBACA,AACA,oEACA,GACA,uBACA,WACA,EACA,AACA,AACA,AACA,AACA,0BACA,iCACA,GACA,OACA,EACA,AACA,gCACA,8CACA,qEACA,YACA,AACA,4BACA,2DACA,YACA,CACA,AACA","file":"ilab-media-tools.js","sourcesContent":["/*!\n * Cropper v2.3.2\n * https://github.com/fengyuanchen/cropper\n *\n * Copyright (c) 2014-2016 Fengyuan Chen and contributors\n * Released under the MIT license\n *\n * Date: 2016-06-08T12:14:46.286Z\n */\n\n(function (factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as anonymous module.\n define(['jquery'], factory);\n } else if (typeof exports === 'object') {\n // Node / CommonJS\n factory(require('jquery'));\n } else {\n // Browser globals.\n factory(jQuery);\n }\n})(function ($) {\n\n 'use strict';\n\n // Globals\n var $window = $(window);\n var $document = $(document);\n var location = window.location;\n var navigator = window.navigator;\n var ArrayBuffer = window.ArrayBuffer;\n var Uint8Array = window.Uint8Array;\n var DataView = window.DataView;\n var btoa = window.btoa;\n\n // Constants\n var NAMESPACE = 'cropper';\n\n // Classes\n var CLASS_MODAL = 'cropper-modal';\n var CLASS_HIDE = 'cropper-hide';\n var CLASS_HIDDEN = 'cropper-hidden';\n var CLASS_INVISIBLE = 'cropper-invisible';\n var CLASS_MOVE = 'cropper-move';\n var CLASS_CROP = 'cropper-crop';\n var CLASS_DISABLED = 'cropper-disabled';\n var CLASS_BG = 'cropper-bg';\n\n // Events\n var EVENT_MOUSE_DOWN = 'mousedown touchstart pointerdown MSPointerDown';\n var EVENT_MOUSE_MOVE = 'mousemove touchmove pointermove MSPointerMove';\n var EVENT_MOUSE_UP = 'mouseup touchend touchcancel pointerup pointercancel MSPointerUp MSPointerCancel';\n var EVENT_WHEEL = 'wheel mousewheel DOMMouseScroll';\n var EVENT_DBLCLICK = 'dblclick';\n var EVENT_LOAD = 'load.' + NAMESPACE;\n var EVENT_ERROR = 'error.' + NAMESPACE;\n var EVENT_RESIZE = 'resize.' + NAMESPACE; // Bind to window with namespace\n var EVENT_BUILD = 'build.' + NAMESPACE;\n var EVENT_BUILT = 'built.' + NAMESPACE;\n var EVENT_CROP_START = 'cropstart.' + NAMESPACE;\n var EVENT_CROP_MOVE = 'cropmove.' + NAMESPACE;\n var EVENT_CROP_END = 'cropend.' + NAMESPACE;\n var EVENT_CROP = 'crop.' + NAMESPACE;\n var EVENT_ZOOM = 'zoom.' + NAMESPACE;\n\n // RegExps\n var REGEXP_ACTIONS = /e|w|s|n|se|sw|ne|nw|all|crop|move|zoom/;\n var REGEXP_DATA_URL = /^data\\:/;\n var REGEXP_DATA_URL_HEAD = /^data\\:([^\\;]+)\\;base64,/;\n var REGEXP_DATA_URL_JPEG = /^data\\:image\\/jpeg.*;base64,/;\n\n // Data keys\n var DATA_PREVIEW = 'preview';\n var DATA_ACTION = 'action';\n\n // Actions\n var ACTION_EAST = 'e';\n var ACTION_WEST = 'w';\n var ACTION_SOUTH = 's';\n var ACTION_NORTH = 'n';\n var ACTION_SOUTH_EAST = 'se';\n var ACTION_SOUTH_WEST = 'sw';\n var ACTION_NORTH_EAST = 'ne';\n var ACTION_NORTH_WEST = 'nw';\n var ACTION_ALL = 'all';\n var ACTION_CROP = 'crop';\n var ACTION_MOVE = 'move';\n var ACTION_ZOOM = 'zoom';\n var ACTION_NONE = 'none';\n\n // Supports\n var SUPPORT_CANVAS = $.isFunction($('')[0].getContext);\n var IS_SAFARI_OR_UIWEBVIEW = navigator && /(Macintosh|iPhone|iPod|iPad).*AppleWebKit/i.test(navigator.userAgent);\n\n // Maths\n var num = Number;\n var min = Math.min;\n var max = Math.max;\n var abs = Math.abs;\n var sin = Math.sin;\n var cos = Math.cos;\n var sqrt = Math.sqrt;\n var round = Math.round;\n var floor = Math.floor;\n\n // Utilities\n var fromCharCode = String.fromCharCode;\n\n function isNumber(n) {\n return typeof n === 'number' && !isNaN(n);\n }\n\n function isUndefined(n) {\n return typeof n === 'undefined';\n }\n\n function toArray(obj, offset) {\n var args = [];\n\n // This is necessary for IE8\n if (isNumber(offset)) {\n args.push(offset);\n }\n\n return args.slice.apply(obj, args);\n }\n\n // Custom proxy to avoid jQuery's guid\n function proxy(fn, context) {\n var args = toArray(arguments, 2);\n\n return function () {\n return fn.apply(context, args.concat(toArray(arguments)));\n };\n }\n\n function isCrossOriginURL(url) {\n var parts = url.match(/^(https?:)\\/\\/([^\\:\\/\\?#]+):?(\\d*)/i);\n\n return parts && (\n parts[1] !== location.protocol ||\n parts[2] !== location.hostname ||\n parts[3] !== location.port\n );\n }\n\n function addTimestamp(url) {\n var timestamp = 'timestamp=' + (new Date()).getTime();\n\n return (url + (url.indexOf('?') === -1 ? '?' : '&') + timestamp);\n }\n\n function getCrossOrigin(crossOrigin) {\n return crossOrigin ? ' crossOrigin=\"' + crossOrigin + '\"' : '';\n }\n\n function getImageSize(image, callback) {\n var newImage;\n\n // Modern browsers (ignore Safari, #120 & #509)\n if (image.naturalWidth && !IS_SAFARI_OR_UIWEBVIEW) {\n return callback(image.naturalWidth, image.naturalHeight);\n }\n\n // IE8: Don't use `new Image()` here (#319)\n newImage = document.createElement('img');\n\n newImage.onload = function () {\n callback(this.width, this.height);\n };\n\n newImage.src = image.src;\n }\n\n function getTransform(options) {\n var transforms = [];\n var rotate = options.rotate;\n var scaleX = options.scaleX;\n var scaleY = options.scaleY;\n\n // Scale should come first before rotate (#633)\n if (isNumber(scaleX) && isNumber(scaleY)) {\n transforms.push('scale(' + scaleX + ',' + scaleY + ')');\n }\n\n if (isNumber(rotate)) {\n transforms.push('rotate(' + rotate + 'deg)');\n }\n\n return transforms.length ? transforms.join(' ') : 'none';\n }\n\n function getRotatedSizes(data, isReversed) {\n var deg = abs(data.degree) % 180;\n var arc = (deg > 90 ? (180 - deg) : deg) * Math.PI / 180;\n var sinArc = sin(arc);\n var cosArc = cos(arc);\n var width = data.width;\n var height = data.height;\n var aspectRatio = data.aspectRatio;\n var newWidth;\n var newHeight;\n\n if (!isReversed) {\n newWidth = width * cosArc + height * sinArc;\n newHeight = width * sinArc + height * cosArc;\n } else {\n newWidth = width / (cosArc + sinArc / aspectRatio);\n newHeight = newWidth / aspectRatio;\n }\n\n return {\n width: newWidth,\n height: newHeight\n };\n }\n\n function getSourceCanvas(image, data) {\n var canvas = $('')[0];\n var context = canvas.getContext('2d');\n var dstX = 0;\n var dstY = 0;\n var dstWidth = data.naturalWidth;\n var dstHeight = data.naturalHeight;\n var rotate = data.rotate;\n var scaleX = data.scaleX;\n var scaleY = data.scaleY;\n var scalable = isNumber(scaleX) && isNumber(scaleY) && (scaleX !== 1 || scaleY !== 1);\n var rotatable = isNumber(rotate) && rotate !== 0;\n var advanced = rotatable || scalable;\n var canvasWidth = dstWidth * abs(scaleX || 1);\n var canvasHeight = dstHeight * abs(scaleY || 1);\n var translateX;\n var translateY;\n var rotated;\n\n if (scalable) {\n translateX = canvasWidth / 2;\n translateY = canvasHeight / 2;\n }\n\n if (rotatable) {\n rotated = getRotatedSizes({\n width: canvasWidth,\n height: canvasHeight,\n degree: rotate\n });\n\n canvasWidth = rotated.width;\n canvasHeight = rotated.height;\n translateX = canvasWidth / 2;\n translateY = canvasHeight / 2;\n }\n\n canvas.width = canvasWidth;\n canvas.height = canvasHeight;\n\n if (advanced) {\n dstX = -dstWidth / 2;\n dstY = -dstHeight / 2;\n\n context.save();\n context.translate(translateX, translateY);\n }\n\n // Scale should come first before rotate (#633, #709)\n if (scalable) {\n context.scale(scaleX, scaleY);\n }\n\n if (rotatable) {\n context.rotate(rotate * Math.PI / 180);\n }\n\n context.drawImage(image, floor(dstX), floor(dstY), floor(dstWidth), floor(dstHeight));\n\n if (advanced) {\n context.restore();\n }\n\n return canvas;\n }\n\n function getTouchesCenter(touches) {\n var length = touches.length;\n var pageX = 0;\n var pageY = 0;\n\n if (length) {\n $.each(touches, function (i, touch) {\n pageX += touch.pageX;\n pageY += touch.pageY;\n });\n\n pageX /= length;\n pageY /= length;\n }\n\n return {\n pageX: pageX,\n pageY: pageY\n };\n }\n\n function getStringFromCharCode(dataView, start, length) {\n var str = '';\n var i;\n\n for (i = start, length += start; i < length; i++) {\n str += fromCharCode(dataView.getUint8(i));\n }\n\n return str;\n }\n\n function getOrientation(arrayBuffer) {\n var dataView = new DataView(arrayBuffer);\n var length = dataView.byteLength;\n var orientation;\n var exifIDCode;\n var tiffOffset;\n var firstIFDOffset;\n var littleEndian;\n var endianness;\n var app1Start;\n var ifdStart;\n var offset;\n var i;\n\n // Only handle JPEG image (start by 0xFFD8)\n if (dataView.getUint8(0) === 0xFF && dataView.getUint8(1) === 0xD8) {\n offset = 2;\n\n while (offset < length) {\n if (dataView.getUint8(offset) === 0xFF && dataView.getUint8(offset + 1) === 0xE1) {\n app1Start = offset;\n break;\n }\n\n offset++;\n }\n }\n\n if (app1Start) {\n exifIDCode = app1Start + 4;\n tiffOffset = app1Start + 10;\n\n if (getStringFromCharCode(dataView, exifIDCode, 4) === 'Exif') {\n endianness = dataView.getUint16(tiffOffset);\n littleEndian = endianness === 0x4949;\n\n if (littleEndian || endianness === 0x4D4D /* bigEndian */) {\n if (dataView.getUint16(tiffOffset + 2, littleEndian) === 0x002A) {\n firstIFDOffset = dataView.getUint32(tiffOffset + 4, littleEndian);\n\n if (firstIFDOffset >= 0x00000008) {\n ifdStart = tiffOffset + firstIFDOffset;\n }\n }\n }\n }\n }\n\n if (ifdStart) {\n length = dataView.getUint16(ifdStart, littleEndian);\n\n for (i = 0; i < length; i++) {\n offset = ifdStart + i * 12 + 2;\n\n if (dataView.getUint16(offset, littleEndian) === 0x0112 /* Orientation */) {\n\n // 8 is the offset of the current tag's value\n offset += 8;\n\n // Get the original orientation value\n orientation = dataView.getUint16(offset, littleEndian);\n\n // Override the orientation with its default value for Safari (#120)\n if (IS_SAFARI_OR_UIWEBVIEW) {\n dataView.setUint16(offset, 1, littleEndian);\n }\n\n break;\n }\n }\n }\n\n return orientation;\n }\n\n function dataURLToArrayBuffer(dataURL) {\n var base64 = dataURL.replace(REGEXP_DATA_URL_HEAD, '');\n var binary = atob(base64);\n var length = binary.length;\n var arrayBuffer = new ArrayBuffer(length);\n var dataView = new Uint8Array(arrayBuffer);\n var i;\n\n for (i = 0; i < length; i++) {\n dataView[i] = binary.charCodeAt(i);\n }\n\n return arrayBuffer;\n }\n\n // Only available for JPEG image\n function arrayBufferToDataURL(arrayBuffer) {\n var dataView = new Uint8Array(arrayBuffer);\n var length = dataView.length;\n var base64 = '';\n var i;\n\n for (i = 0; i < length; i++) {\n base64 += fromCharCode(dataView[i]);\n }\n\n return 'data:image/jpeg;base64,' + btoa(base64);\n }\n\n function Cropper(element, options) {\n this.$element = $(element);\n this.options = $.extend({}, Cropper.DEFAULTS, $.isPlainObject(options) && options);\n this.isLoaded = false;\n this.isBuilt = false;\n this.isCompleted = false;\n this.isRotated = false;\n this.isCropped = false;\n this.isDisabled = false;\n this.isReplaced = false;\n this.isLimited = false;\n this.wheeling = false;\n this.isImg = false;\n this.originalUrl = '';\n this.canvas = null;\n this.cropBox = null;\n this.init();\n }\n\n Cropper.prototype = {\n constructor: Cropper,\n\n init: function () {\n var $this = this.$element;\n var url;\n\n if ($this.is('img')) {\n this.isImg = true;\n\n // Should use `$.fn.attr` here. e.g.: \"img/picture.jpg\"\n this.originalUrl = url = $this.attr('src');\n\n // Stop when it's a blank image\n if (!url) {\n return;\n }\n\n // Should use `$.fn.prop` here. e.g.: \"http://example.com/img/picture.jpg\"\n url = $this.prop('src');\n } else if ($this.is('canvas') && SUPPORT_CANVAS) {\n url = $this[0].toDataURL();\n }\n\n this.load(url);\n },\n\n // A shortcut for triggering custom events\n trigger: function (type, data) {\n var e = $.Event(type, data);\n\n this.$element.trigger(e);\n\n return e;\n },\n\n load: function (url) {\n var options = this.options;\n var $this = this.$element;\n var read;\n var xhr;\n\n if (!url) {\n return;\n }\n\n // Trigger build event first\n $this.one(EVENT_BUILD, options.build);\n\n if (this.trigger(EVENT_BUILD).isDefaultPrevented()) {\n return;\n }\n\n this.url = url;\n this.image = {};\n\n if (!options.checkOrientation || !ArrayBuffer) {\n return this.clone();\n }\n\n read = $.proxy(this.read, this);\n\n // XMLHttpRequest disallows to open a Data URL in some browsers like IE11 and Safari\n if (REGEXP_DATA_URL.test(url)) {\n return REGEXP_DATA_URL_JPEG.test(url) ?\n read(dataURLToArrayBuffer(url)) :\n this.clone();\n }\n\n xhr = new XMLHttpRequest();\n\n xhr.onerror = xhr.onabort = $.proxy(function () {\n this.clone();\n }, this);\n\n xhr.onload = function () {\n read(this.response);\n };\n\n if (options.checkCrossOrigin && isCrossOriginURL(url) && $this.prop('crossOrigin')) {\n url = addTimestamp(url);\n }\n\n xhr.open('get', url);\n xhr.responseType = 'arraybuffer';\n xhr.send();\n },\n\n read: function (arrayBuffer) {\n var options = this.options;\n var orientation = getOrientation(arrayBuffer);\n var image = this.image;\n var rotate;\n var scaleX;\n var scaleY;\n\n if (orientation > 1) {\n this.url = arrayBufferToDataURL(arrayBuffer);\n\n switch (orientation) {\n\n // flip horizontal\n case 2:\n scaleX = -1;\n break;\n\n // rotate left 180°\n case 3:\n rotate = -180;\n break;\n\n // flip vertical\n case 4:\n scaleY = -1;\n break;\n\n // flip vertical + rotate right 90°\n case 5:\n rotate = 90;\n scaleY = -1;\n break;\n\n // rotate right 90°\n case 6:\n rotate = 90;\n break;\n\n // flip horizontal + rotate right 90°\n case 7:\n rotate = 90;\n scaleX = -1;\n break;\n\n // rotate left 90°\n case 8:\n rotate = -90;\n break;\n }\n }\n\n if (options.rotatable) {\n image.rotate = rotate;\n }\n\n if (options.scalable) {\n image.scaleX = scaleX;\n image.scaleY = scaleY;\n }\n\n this.clone();\n },\n\n clone: function () {\n var options = this.options;\n var $this = this.$element;\n var url = this.url;\n var crossOrigin = '';\n var crossOriginUrl;\n var $clone;\n\n if (options.checkCrossOrigin && isCrossOriginURL(url)) {\n crossOrigin = $this.prop('crossOrigin');\n\n if (crossOrigin) {\n crossOriginUrl = url;\n } else {\n crossOrigin = 'anonymous';\n\n // Bust cache (#148) when there is not a \"crossOrigin\" property\n crossOriginUrl = addTimestamp(url);\n }\n }\n\n this.crossOrigin = crossOrigin;\n this.crossOriginUrl = crossOriginUrl;\n this.$clone = $clone = $('');\n\n if (this.isImg) {\n if ($this[0].complete) {\n this.start();\n } else {\n $this.one(EVENT_LOAD, $.proxy(this.start, this));\n }\n } else {\n $clone.\n one(EVENT_LOAD, $.proxy(this.start, this)).\n one(EVENT_ERROR, $.proxy(this.stop, this)).\n addClass(CLASS_HIDE).\n insertAfter($this);\n }\n },\n\n start: function () {\n var $image = this.$element;\n var $clone = this.$clone;\n\n if (!this.isImg) {\n $clone.off(EVENT_ERROR, this.stop);\n $image = $clone;\n }\n\n getImageSize($image[0], $.proxy(function (naturalWidth, naturalHeight) {\n $.extend(this.image, {\n naturalWidth: naturalWidth,\n naturalHeight: naturalHeight,\n aspectRatio: naturalWidth / naturalHeight\n });\n\n this.isLoaded = true;\n this.build();\n }, this));\n },\n\n stop: function () {\n this.$clone.remove();\n this.$clone = null;\n },\n\n build: function () {\n var options = this.options;\n var $this = this.$element;\n var $clone = this.$clone;\n var $cropper;\n var $cropBox;\n var $face;\n\n if (!this.isLoaded) {\n return;\n }\n\n // Unbuild first when replace\n if (this.isBuilt) {\n this.unbuild();\n }\n\n // Create cropper elements\n this.$container = $this.parent();\n this.$cropper = $cropper = $(Cropper.TEMPLATE);\n this.$canvas = $cropper.find('.cropper-canvas').append($clone);\n this.$dragBox = $cropper.find('.cropper-drag-box');\n this.$cropBox = $cropBox = $cropper.find('.cropper-crop-box');\n this.$viewBox = $cropper.find('.cropper-view-box');\n this.$face = $face = $cropBox.find('.cropper-face');\n\n // Hide the original image\n $this.addClass(CLASS_HIDDEN).after($cropper);\n\n // Show the clone image if is hidden\n if (!this.isImg) {\n $clone.removeClass(CLASS_HIDE);\n }\n\n this.initPreview();\n this.bind();\n\n options.aspectRatio = max(0, options.aspectRatio) || NaN;\n options.viewMode = max(0, min(3, round(options.viewMode))) || 0;\n\n if (options.autoCrop) {\n this.isCropped = true;\n\n if (options.modal) {\n this.$dragBox.addClass(CLASS_MODAL);\n }\n } else {\n $cropBox.addClass(CLASS_HIDDEN);\n }\n\n if (!options.guides) {\n $cropBox.find('.cropper-dashed').addClass(CLASS_HIDDEN);\n }\n\n if (!options.center) {\n $cropBox.find('.cropper-center').addClass(CLASS_HIDDEN);\n }\n\n if (options.cropBoxMovable) {\n $face.addClass(CLASS_MOVE).data(DATA_ACTION, ACTION_ALL);\n }\n\n if (!options.highlight) {\n $face.addClass(CLASS_INVISIBLE);\n }\n\n if (options.background) {\n $cropper.addClass(CLASS_BG);\n }\n\n if (!options.cropBoxResizable) {\n $cropBox.find('.cropper-line, .cropper-point').addClass(CLASS_HIDDEN);\n }\n\n this.setDragMode(options.dragMode);\n this.render();\n this.isBuilt = true;\n this.setData(options.data);\n $this.one(EVENT_BUILT, options.built);\n\n // Trigger the built event asynchronously to keep `data('cropper')` is defined\n setTimeout($.proxy(function () {\n this.trigger(EVENT_BUILT);\n this.trigger(EVENT_CROP, this.getData());\n this.isCompleted = true;\n }, this), 0);\n },\n\n unbuild: function () {\n if (!this.isBuilt) {\n return;\n }\n\n this.isBuilt = false;\n this.isCompleted = false;\n this.initialImage = null;\n\n // Clear `initialCanvas` is necessary when replace\n this.initialCanvas = null;\n this.initialCropBox = null;\n this.container = null;\n this.canvas = null;\n\n // Clear `cropBox` is necessary when replace\n this.cropBox = null;\n this.unbind();\n\n this.resetPreview();\n this.$preview = null;\n\n this.$viewBox = null;\n this.$cropBox = null;\n this.$dragBox = null;\n this.$canvas = null;\n this.$container = null;\n\n this.$cropper.remove();\n this.$cropper = null;\n },\n\n render: function () {\n this.initContainer();\n this.initCanvas();\n this.initCropBox();\n\n this.renderCanvas();\n\n if (this.isCropped) {\n this.renderCropBox();\n }\n },\n\n initContainer: function () {\n var options = this.options;\n var $this = this.$element;\n var $container = this.$container;\n var $cropper = this.$cropper;\n\n $cropper.addClass(CLASS_HIDDEN);\n $this.removeClass(CLASS_HIDDEN);\n\n $cropper.css((this.container = {\n width: max($container.width(), num(options.minContainerWidth) || 200),\n height: max($container.height(), num(options.minContainerHeight) || 100)\n }));\n\n $this.addClass(CLASS_HIDDEN);\n $cropper.removeClass(CLASS_HIDDEN);\n },\n\n // Canvas (image wrapper)\n initCanvas: function () {\n var viewMode = this.options.viewMode;\n var container = this.container;\n var containerWidth = container.width;\n var containerHeight = container.height;\n var image = this.image;\n var imageNaturalWidth = image.naturalWidth;\n var imageNaturalHeight = image.naturalHeight;\n var is90Degree = abs(image.rotate) === 90;\n var naturalWidth = is90Degree ? imageNaturalHeight : imageNaturalWidth;\n var naturalHeight = is90Degree ? imageNaturalWidth : imageNaturalHeight;\n var aspectRatio = naturalWidth / naturalHeight;\n var canvasWidth = containerWidth;\n var canvasHeight = containerHeight;\n var canvas;\n\n if (containerHeight * aspectRatio > containerWidth) {\n if (viewMode === 3) {\n canvasWidth = containerHeight * aspectRatio;\n } else {\n canvasHeight = containerWidth / aspectRatio;\n }\n } else {\n if (viewMode === 3) {\n canvasHeight = containerWidth / aspectRatio;\n } else {\n canvasWidth = containerHeight * aspectRatio;\n }\n }\n\n canvas = {\n naturalWidth: naturalWidth,\n naturalHeight: naturalHeight,\n aspectRatio: aspectRatio,\n width: canvasWidth,\n height: canvasHeight\n };\n\n canvas.oldLeft = canvas.left = (containerWidth - canvasWidth) / 2;\n canvas.oldTop = canvas.top = (containerHeight - canvasHeight) / 2;\n\n this.canvas = canvas;\n this.isLimited = (viewMode === 1 || viewMode === 2);\n this.limitCanvas(true, true);\n this.initialImage = $.extend({}, image);\n this.initialCanvas = $.extend({}, canvas);\n },\n\n limitCanvas: function (isSizeLimited, isPositionLimited) {\n var options = this.options;\n var viewMode = options.viewMode;\n var container = this.container;\n var containerWidth = container.width;\n var containerHeight = container.height;\n var canvas = this.canvas;\n var aspectRatio = canvas.aspectRatio;\n var cropBox = this.cropBox;\n var isCropped = this.isCropped && cropBox;\n var minCanvasWidth;\n var minCanvasHeight;\n var newCanvasLeft;\n var newCanvasTop;\n\n if (isSizeLimited) {\n minCanvasWidth = num(options.minCanvasWidth) || 0;\n minCanvasHeight = num(options.minCanvasHeight) || 0;\n\n if (viewMode) {\n if (viewMode > 1) {\n minCanvasWidth = max(minCanvasWidth, containerWidth);\n minCanvasHeight = max(minCanvasHeight, containerHeight);\n\n if (viewMode === 3) {\n if (minCanvasHeight * aspectRatio > minCanvasWidth) {\n minCanvasWidth = minCanvasHeight * aspectRatio;\n } else {\n minCanvasHeight = minCanvasWidth / aspectRatio;\n }\n }\n } else {\n if (minCanvasWidth) {\n minCanvasWidth = max(minCanvasWidth, isCropped ? cropBox.width : 0);\n } else if (minCanvasHeight) {\n minCanvasHeight = max(minCanvasHeight, isCropped ? cropBox.height : 0);\n } else if (isCropped) {\n minCanvasWidth = cropBox.width;\n minCanvasHeight = cropBox.height;\n\n if (minCanvasHeight * aspectRatio > minCanvasWidth) {\n minCanvasWidth = minCanvasHeight * aspectRatio;\n } else {\n minCanvasHeight = minCanvasWidth / aspectRatio;\n }\n }\n }\n }\n\n if (minCanvasWidth && minCanvasHeight) {\n if (minCanvasHeight * aspectRatio > minCanvasWidth) {\n minCanvasHeight = minCanvasWidth / aspectRatio;\n } else {\n minCanvasWidth = minCanvasHeight * aspectRatio;\n }\n } else if (minCanvasWidth) {\n minCanvasHeight = minCanvasWidth / aspectRatio;\n } else if (minCanvasHeight) {\n minCanvasWidth = minCanvasHeight * aspectRatio;\n }\n\n canvas.minWidth = minCanvasWidth;\n canvas.minHeight = minCanvasHeight;\n canvas.maxWidth = Infinity;\n canvas.maxHeight = Infinity;\n }\n\n if (isPositionLimited) {\n if (viewMode) {\n newCanvasLeft = containerWidth - canvas.width;\n newCanvasTop = containerHeight - canvas.height;\n\n canvas.minLeft = min(0, newCanvasLeft);\n canvas.minTop = min(0, newCanvasTop);\n canvas.maxLeft = max(0, newCanvasLeft);\n canvas.maxTop = max(0, newCanvasTop);\n\n if (isCropped && this.isLimited) {\n canvas.minLeft = min(\n cropBox.left,\n cropBox.left + cropBox.width - canvas.width\n );\n canvas.minTop = min(\n cropBox.top,\n cropBox.top + cropBox.height - canvas.height\n );\n canvas.maxLeft = cropBox.left;\n canvas.maxTop = cropBox.top;\n\n if (viewMode === 2) {\n if (canvas.width >= containerWidth) {\n canvas.minLeft = min(0, newCanvasLeft);\n canvas.maxLeft = max(0, newCanvasLeft);\n }\n\n if (canvas.height >= containerHeight) {\n canvas.minTop = min(0, newCanvasTop);\n canvas.maxTop = max(0, newCanvasTop);\n }\n }\n }\n } else {\n canvas.minLeft = -canvas.width;\n canvas.minTop = -canvas.height;\n canvas.maxLeft = containerWidth;\n canvas.maxTop = containerHeight;\n }\n }\n },\n\n renderCanvas: function (isChanged) {\n var canvas = this.canvas;\n var image = this.image;\n var rotate = image.rotate;\n var naturalWidth = image.naturalWidth;\n var naturalHeight = image.naturalHeight;\n var aspectRatio;\n var rotated;\n\n if (this.isRotated) {\n this.isRotated = false;\n\n // Computes rotated sizes with image sizes\n rotated = getRotatedSizes({\n width: image.width,\n height: image.height,\n degree: rotate\n });\n\n aspectRatio = rotated.width / rotated.height;\n\n if (aspectRatio !== canvas.aspectRatio) {\n canvas.left -= (rotated.width - canvas.width) / 2;\n canvas.top -= (rotated.height - canvas.height) / 2;\n canvas.width = rotated.width;\n canvas.height = rotated.height;\n canvas.aspectRatio = aspectRatio;\n canvas.naturalWidth = naturalWidth;\n canvas.naturalHeight = naturalHeight;\n\n // Computes rotated sizes with natural image sizes\n if (rotate % 180) {\n rotated = getRotatedSizes({\n width: naturalWidth,\n height: naturalHeight,\n degree: rotate\n });\n\n canvas.naturalWidth = rotated.width;\n canvas.naturalHeight = rotated.height;\n }\n\n this.limitCanvas(true, false);\n }\n }\n\n if (canvas.width > canvas.maxWidth || canvas.width < canvas.minWidth) {\n canvas.left = canvas.oldLeft;\n }\n\n if (canvas.height > canvas.maxHeight || canvas.height < canvas.minHeight) {\n canvas.top = canvas.oldTop;\n }\n\n canvas.width = min(max(canvas.width, canvas.minWidth), canvas.maxWidth);\n canvas.height = min(max(canvas.height, canvas.minHeight), canvas.maxHeight);\n\n this.limitCanvas(false, true);\n\n canvas.oldLeft = canvas.left = min(max(canvas.left, canvas.minLeft), canvas.maxLeft);\n canvas.oldTop = canvas.top = min(max(canvas.top, canvas.minTop), canvas.maxTop);\n\n this.$canvas.css({\n width: canvas.width,\n height: canvas.height,\n left: canvas.left,\n top: canvas.top\n });\n\n this.renderImage();\n\n if (this.isCropped && this.isLimited) {\n this.limitCropBox(true, true);\n }\n\n if (isChanged) {\n this.output();\n }\n },\n\n renderImage: function (isChanged) {\n var canvas = this.canvas;\n var image = this.image;\n var reversed;\n\n if (image.rotate) {\n reversed = getRotatedSizes({\n width: canvas.width,\n height: canvas.height,\n degree: image.rotate,\n aspectRatio: image.aspectRatio\n }, true);\n }\n\n $.extend(image, reversed ? {\n width: reversed.width,\n height: reversed.height,\n left: (canvas.width - reversed.width) / 2,\n top: (canvas.height - reversed.height) / 2\n } : {\n width: canvas.width,\n height: canvas.height,\n left: 0,\n top: 0\n });\n\n this.$clone.css({\n width: image.width,\n height: image.height,\n marginLeft: image.left,\n marginTop: image.top,\n transform: getTransform(image)\n });\n\n if (isChanged) {\n this.output();\n }\n },\n\n initCropBox: function () {\n var options = this.options;\n var canvas = this.canvas;\n var aspectRatio = options.aspectRatio;\n var autoCropArea = num(options.autoCropArea) || 0.8;\n var cropBox = {\n width: canvas.width,\n height: canvas.height\n };\n\n if (aspectRatio) {\n if (canvas.height * aspectRatio > canvas.width) {\n cropBox.height = cropBox.width / aspectRatio;\n } else {\n cropBox.width = cropBox.height * aspectRatio;\n }\n }\n\n this.cropBox = cropBox;\n this.limitCropBox(true, true);\n\n // Initialize auto crop area\n cropBox.width = min(max(cropBox.width, cropBox.minWidth), cropBox.maxWidth);\n cropBox.height = min(max(cropBox.height, cropBox.minHeight), cropBox.maxHeight);\n\n // The width of auto crop area must large than \"minWidth\", and the height too. (#164)\n cropBox.width = max(cropBox.minWidth, cropBox.width * autoCropArea);\n cropBox.height = max(cropBox.minHeight, cropBox.height * autoCropArea);\n cropBox.oldLeft = cropBox.left = canvas.left + (canvas.width - cropBox.width) / 2;\n cropBox.oldTop = cropBox.top = canvas.top + (canvas.height - cropBox.height) / 2;\n\n this.initialCropBox = $.extend({}, cropBox);\n },\n\n limitCropBox: function (isSizeLimited, isPositionLimited) {\n var options = this.options;\n var aspectRatio = options.aspectRatio;\n var container = this.container;\n var containerWidth = container.width;\n var containerHeight = container.height;\n var canvas = this.canvas;\n var cropBox = this.cropBox;\n var isLimited = this.isLimited;\n var minCropBoxWidth;\n var minCropBoxHeight;\n var maxCropBoxWidth;\n var maxCropBoxHeight;\n\n if (isSizeLimited) {\n minCropBoxWidth = num(options.minCropBoxWidth) || 0;\n minCropBoxHeight = num(options.minCropBoxHeight) || 0;\n\n // The min/maxCropBoxWidth/Height must be less than containerWidth/Height\n minCropBoxWidth = min(minCropBoxWidth, containerWidth);\n minCropBoxHeight = min(minCropBoxHeight, containerHeight);\n maxCropBoxWidth = min(containerWidth, isLimited ? canvas.width : containerWidth);\n maxCropBoxHeight = min(containerHeight, isLimited ? canvas.height : containerHeight);\n\n if (aspectRatio) {\n if (minCropBoxWidth && minCropBoxHeight) {\n if (minCropBoxHeight * aspectRatio > minCropBoxWidth) {\n minCropBoxHeight = minCropBoxWidth / aspectRatio;\n } else {\n minCropBoxWidth = minCropBoxHeight * aspectRatio;\n }\n } else if (minCropBoxWidth) {\n minCropBoxHeight = minCropBoxWidth / aspectRatio;\n } else if (minCropBoxHeight) {\n minCropBoxWidth = minCropBoxHeight * aspectRatio;\n }\n\n if (maxCropBoxHeight * aspectRatio > maxCropBoxWidth) {\n maxCropBoxHeight = maxCropBoxWidth / aspectRatio;\n } else {\n maxCropBoxWidth = maxCropBoxHeight * aspectRatio;\n }\n }\n\n // The minWidth/Height must be less than maxWidth/Height\n cropBox.minWidth = min(minCropBoxWidth, maxCropBoxWidth);\n cropBox.minHeight = min(minCropBoxHeight, maxCropBoxHeight);\n cropBox.maxWidth = maxCropBoxWidth;\n cropBox.maxHeight = maxCropBoxHeight;\n }\n\n if (isPositionLimited) {\n if (isLimited) {\n cropBox.minLeft = max(0, canvas.left);\n cropBox.minTop = max(0, canvas.top);\n cropBox.maxLeft = min(containerWidth, canvas.left + canvas.width) - cropBox.width;\n cropBox.maxTop = min(containerHeight, canvas.top + canvas.height) - cropBox.height;\n } else {\n cropBox.minLeft = 0;\n cropBox.minTop = 0;\n cropBox.maxLeft = containerWidth - cropBox.width;\n cropBox.maxTop = containerHeight - cropBox.height;\n }\n }\n },\n\n renderCropBox: function () {\n var options = this.options;\n var container = this.container;\n var containerWidth = container.width;\n var containerHeight = container.height;\n var cropBox = this.cropBox;\n\n if (cropBox.width > cropBox.maxWidth || cropBox.width < cropBox.minWidth) {\n cropBox.left = cropBox.oldLeft;\n }\n\n if (cropBox.height > cropBox.maxHeight || cropBox.height < cropBox.minHeight) {\n cropBox.top = cropBox.oldTop;\n }\n\n cropBox.width = min(max(cropBox.width, cropBox.minWidth), cropBox.maxWidth);\n cropBox.height = min(max(cropBox.height, cropBox.minHeight), cropBox.maxHeight);\n\n this.limitCropBox(false, true);\n\n cropBox.oldLeft = cropBox.left = min(max(cropBox.left, cropBox.minLeft), cropBox.maxLeft);\n cropBox.oldTop = cropBox.top = min(max(cropBox.top, cropBox.minTop), cropBox.maxTop);\n\n if (options.movable && options.cropBoxMovable) {\n\n // Turn to move the canvas when the crop box is equal to the container\n this.$face.data(DATA_ACTION, (cropBox.width === containerWidth && cropBox.height === containerHeight) ? ACTION_MOVE : ACTION_ALL);\n }\n\n this.$cropBox.css({\n width: cropBox.width,\n height: cropBox.height,\n left: cropBox.left,\n top: cropBox.top\n });\n\n if (this.isCropped && this.isLimited) {\n this.limitCanvas(true, true);\n }\n\n if (!this.isDisabled) {\n this.output();\n }\n },\n\n output: function () {\n this.preview();\n\n if (this.isCompleted) {\n this.trigger(EVENT_CROP, this.getData());\n }\n },\n\n initPreview: function () {\n var crossOrigin = getCrossOrigin(this.crossOrigin);\n var url = crossOrigin ? this.crossOriginUrl : this.url;\n var $clone2;\n\n this.$preview = $(this.options.preview);\n this.$clone2 = $clone2 = $('');\n this.$viewBox.html($clone2);\n this.$preview.each(function () {\n var $this = $(this);\n\n // Save the original size for recover\n $this.data(DATA_PREVIEW, {\n width: $this.width(),\n height: $this.height(),\n html: $this.html()\n });\n\n /**\n * Override img element styles\n * Add `display:block` to avoid margin top issue\n * (Occur only when margin-top <= -height)\n */\n $this.html(\n ''\n );\n });\n },\n\n resetPreview: function () {\n this.$preview.each(function () {\n var $this = $(this);\n var data = $this.data(DATA_PREVIEW);\n\n $this.css({\n width: data.width,\n height: data.height\n }).html(data.html).removeData(DATA_PREVIEW);\n });\n },\n\n preview: function () {\n var image = this.image;\n var canvas = this.canvas;\n var cropBox = this.cropBox;\n var cropBoxWidth = cropBox.width;\n var cropBoxHeight = cropBox.height;\n var width = image.width;\n var height = image.height;\n var left = cropBox.left - canvas.left - image.left;\n var top = cropBox.top - canvas.top - image.top;\n\n if (!this.isCropped || this.isDisabled) {\n return;\n }\n\n this.$clone2.css({\n width: width,\n height: height,\n marginLeft: -left,\n marginTop: -top,\n transform: getTransform(image)\n });\n\n this.$preview.each(function () {\n var $this = $(this);\n var data = $this.data(DATA_PREVIEW);\n var originalWidth = data.width;\n var originalHeight = data.height;\n var newWidth = originalWidth;\n var newHeight = originalHeight;\n var ratio = 1;\n\n if (cropBoxWidth) {\n ratio = originalWidth / cropBoxWidth;\n newHeight = cropBoxHeight * ratio;\n }\n\n if (cropBoxHeight && newHeight > originalHeight) {\n ratio = originalHeight / cropBoxHeight;\n newWidth = cropBoxWidth * ratio;\n newHeight = originalHeight;\n }\n\n $this.css({\n width: newWidth,\n height: newHeight\n }).find('img').css({\n width: width * ratio,\n height: height * ratio,\n marginLeft: -left * ratio,\n marginTop: -top * ratio,\n transform: getTransform(image)\n });\n });\n },\n\n bind: function () {\n var options = this.options;\n var $this = this.$element;\n var $cropper = this.$cropper;\n\n if ($.isFunction(options.cropstart)) {\n $this.on(EVENT_CROP_START, options.cropstart);\n }\n\n if ($.isFunction(options.cropmove)) {\n $this.on(EVENT_CROP_MOVE, options.cropmove);\n }\n\n if ($.isFunction(options.cropend)) {\n $this.on(EVENT_CROP_END, options.cropend);\n }\n\n if ($.isFunction(options.crop)) {\n $this.on(EVENT_CROP, options.crop);\n }\n\n if ($.isFunction(options.zoom)) {\n $this.on(EVENT_ZOOM, options.zoom);\n }\n\n $cropper.on(EVENT_MOUSE_DOWN, $.proxy(this.cropStart, this));\n\n if (options.zoomable && options.zoomOnWheel) {\n $cropper.on(EVENT_WHEEL, $.proxy(this.wheel, this));\n }\n\n if (options.toggleDragModeOnDblclick) {\n $cropper.on(EVENT_DBLCLICK, $.proxy(this.dblclick, this));\n }\n\n $document.\n on(EVENT_MOUSE_MOVE, (this._cropMove = proxy(this.cropMove, this))).\n on(EVENT_MOUSE_UP, (this._cropEnd = proxy(this.cropEnd, this)));\n\n if (options.responsive) {\n $window.on(EVENT_RESIZE, (this._resize = proxy(this.resize, this)));\n }\n },\n\n unbind: function () {\n var options = this.options;\n var $this = this.$element;\n var $cropper = this.$cropper;\n\n if ($.isFunction(options.cropstart)) {\n $this.off(EVENT_CROP_START, options.cropstart);\n }\n\n if ($.isFunction(options.cropmove)) {\n $this.off(EVENT_CROP_MOVE, options.cropmove);\n }\n\n if ($.isFunction(options.cropend)) {\n $this.off(EVENT_CROP_END, options.cropend);\n }\n\n if ($.isFunction(options.crop)) {\n $this.off(EVENT_CROP, options.crop);\n }\n\n if ($.isFunction(options.zoom)) {\n $this.off(EVENT_ZOOM, options.zoom);\n }\n\n $cropper.off(EVENT_MOUSE_DOWN, this.cropStart);\n\n if (options.zoomable && options.zoomOnWheel) {\n $cropper.off(EVENT_WHEEL, this.wheel);\n }\n\n if (options.toggleDragModeOnDblclick) {\n $cropper.off(EVENT_DBLCLICK, this.dblclick);\n }\n\n $document.\n off(EVENT_MOUSE_MOVE, this._cropMove).\n off(EVENT_MOUSE_UP, this._cropEnd);\n\n if (options.responsive) {\n $window.off(EVENT_RESIZE, this._resize);\n }\n },\n\n resize: function () {\n var restore = this.options.restore;\n var $container = this.$container;\n var container = this.container;\n var canvasData;\n var cropBoxData;\n var ratio;\n\n // Check `container` is necessary for IE8\n if (this.isDisabled || !container) {\n return;\n }\n\n ratio = $container.width() / container.width;\n\n // Resize when width changed or height changed\n if (ratio !== 1 || $container.height() !== container.height) {\n if (restore) {\n canvasData = this.getCanvasData();\n cropBoxData = this.getCropBoxData();\n }\n\n this.render();\n\n if (restore) {\n this.setCanvasData($.each(canvasData, function (i, n) {\n canvasData[i] = n * ratio;\n }));\n this.setCropBoxData($.each(cropBoxData, function (i, n) {\n cropBoxData[i] = n * ratio;\n }));\n }\n }\n },\n\n dblclick: function () {\n if (this.isDisabled) {\n return;\n }\n\n if (this.$dragBox.hasClass(CLASS_CROP)) {\n this.setDragMode(ACTION_MOVE);\n } else {\n this.setDragMode(ACTION_CROP);\n }\n },\n\n wheel: function (event) {\n var e = event.originalEvent || event;\n var ratio = num(this.options.wheelZoomRatio) || 0.1;\n var delta = 1;\n\n if (this.isDisabled) {\n return;\n }\n\n event.preventDefault();\n\n // Limit wheel speed to prevent zoom too fast\n if (this.wheeling) {\n return;\n }\n\n this.wheeling = true;\n\n setTimeout($.proxy(function () {\n this.wheeling = false;\n }, this), 50);\n\n if (e.deltaY) {\n delta = e.deltaY > 0 ? 1 : -1;\n } else if (e.wheelDelta) {\n delta = -e.wheelDelta / 120;\n } else if (e.detail) {\n delta = e.detail > 0 ? 1 : -1;\n }\n\n this.zoom(-delta * ratio, event);\n },\n\n cropStart: function (event) {\n var options = this.options;\n var originalEvent = event.originalEvent;\n var touches = originalEvent && originalEvent.touches;\n var e = event;\n var touchesLength;\n var action;\n\n if (this.isDisabled) {\n return;\n }\n\n if (touches) {\n touchesLength = touches.length;\n\n if (touchesLength > 1) {\n if (options.zoomable && options.zoomOnTouch && touchesLength === 2) {\n e = touches[1];\n this.startX2 = e.pageX;\n this.startY2 = e.pageY;\n action = ACTION_ZOOM;\n } else {\n return;\n }\n }\n\n e = touches[0];\n }\n\n action = action || $(e.target).data(DATA_ACTION);\n\n if (REGEXP_ACTIONS.test(action)) {\n if (this.trigger(EVENT_CROP_START, {\n originalEvent: originalEvent,\n action: action\n }).isDefaultPrevented()) {\n return;\n }\n\n event.preventDefault();\n\n this.action = action;\n this.cropping = false;\n\n // IE8 has `event.pageX/Y`, but not `event.originalEvent.pageX/Y`\n // IE10 has `event.originalEvent.pageX/Y`, but not `event.pageX/Y`\n this.startX = e.pageX || originalEvent && originalEvent.pageX;\n this.startY = e.pageY || originalEvent && originalEvent.pageY;\n\n if (action === ACTION_CROP) {\n this.cropping = true;\n this.$dragBox.addClass(CLASS_MODAL);\n }\n }\n },\n\n cropMove: function (event) {\n var options = this.options;\n var originalEvent = event.originalEvent;\n var touches = originalEvent && originalEvent.touches;\n var e = event;\n var action = this.action;\n var touchesLength;\n\n if (this.isDisabled) {\n return;\n }\n\n if (touches) {\n touchesLength = touches.length;\n\n if (touchesLength > 1) {\n if (options.zoomable && options.zoomOnTouch && touchesLength === 2) {\n e = touches[1];\n this.endX2 = e.pageX;\n this.endY2 = e.pageY;\n } else {\n return;\n }\n }\n\n e = touches[0];\n }\n\n if (action) {\n if (this.trigger(EVENT_CROP_MOVE, {\n originalEvent: originalEvent,\n action: action\n }).isDefaultPrevented()) {\n return;\n }\n\n event.preventDefault();\n\n this.endX = e.pageX || originalEvent && originalEvent.pageX;\n this.endY = e.pageY || originalEvent && originalEvent.pageY;\n\n this.change(e.shiftKey, action === ACTION_ZOOM ? event : null);\n }\n },\n\n cropEnd: function (event) {\n var originalEvent = event.originalEvent;\n var action = this.action;\n\n if (this.isDisabled) {\n return;\n }\n\n if (action) {\n event.preventDefault();\n\n if (this.cropping) {\n this.cropping = false;\n this.$dragBox.toggleClass(CLASS_MODAL, this.isCropped && this.options.modal);\n }\n\n this.action = '';\n\n this.trigger(EVENT_CROP_END, {\n originalEvent: originalEvent,\n action: action\n });\n }\n },\n\n change: function (shiftKey, event) {\n var options = this.options;\n var aspectRatio = options.aspectRatio;\n var action = this.action;\n var container = this.container;\n var canvas = this.canvas;\n var cropBox = this.cropBox;\n var width = cropBox.width;\n var height = cropBox.height;\n var left = cropBox.left;\n var top = cropBox.top;\n var right = left + width;\n var bottom = top + height;\n var minLeft = 0;\n var minTop = 0;\n var maxWidth = container.width;\n var maxHeight = container.height;\n var renderable = true;\n var offset;\n var range;\n\n // Locking aspect ratio in \"free mode\" by holding shift key (#259)\n if (!aspectRatio && shiftKey) {\n aspectRatio = width && height ? width / height : 1;\n }\n\n if (this.isLimited) {\n minLeft = cropBox.minLeft;\n minTop = cropBox.minTop;\n maxWidth = minLeft + min(container.width, canvas.left + canvas.width);\n maxHeight = minTop + min(container.height, canvas.top + canvas.height);\n }\n\n range = {\n x: this.endX - this.startX,\n y: this.endY - this.startY\n };\n\n if (aspectRatio) {\n range.X = range.y * aspectRatio;\n range.Y = range.x / aspectRatio;\n }\n\n switch (action) {\n // Move crop box\n case ACTION_ALL:\n left += range.x;\n top += range.y;\n break;\n\n // Resize crop box\n case ACTION_EAST:\n if (range.x >= 0 && (right >= maxWidth || aspectRatio &&\n (top <= minTop || bottom >= maxHeight))) {\n\n renderable = false;\n break;\n }\n\n width += range.x;\n\n if (aspectRatio) {\n height = width / aspectRatio;\n top -= range.Y / 2;\n }\n\n if (width < 0) {\n action = ACTION_WEST;\n width = 0;\n }\n\n break;\n\n case ACTION_NORTH:\n if (range.y <= 0 && (top <= minTop || aspectRatio &&\n (left <= minLeft || right >= maxWidth))) {\n\n renderable = false;\n break;\n }\n\n height -= range.y;\n top += range.y;\n\n if (aspectRatio) {\n width = height * aspectRatio;\n left += range.X / 2;\n }\n\n if (height < 0) {\n action = ACTION_SOUTH;\n height = 0;\n }\n\n break;\n\n case ACTION_WEST:\n if (range.x <= 0 && (left <= minLeft || aspectRatio &&\n (top <= minTop || bottom >= maxHeight))) {\n\n renderable = false;\n break;\n }\n\n width -= range.x;\n left += range.x;\n\n if (aspectRatio) {\n height = width / aspectRatio;\n top += range.Y / 2;\n }\n\n if (width < 0) {\n action = ACTION_EAST;\n width = 0;\n }\n\n break;\n\n case ACTION_SOUTH:\n if (range.y >= 0 && (bottom >= maxHeight || aspectRatio &&\n (left <= minLeft || right >= maxWidth))) {\n\n renderable = false;\n break;\n }\n\n height += range.y;\n\n if (aspectRatio) {\n width = height * aspectRatio;\n left -= range.X / 2;\n }\n\n if (height < 0) {\n action = ACTION_NORTH;\n height = 0;\n }\n\n break;\n\n case ACTION_NORTH_EAST:\n if (aspectRatio) {\n if (range.y <= 0 && (top <= minTop || right >= maxWidth)) {\n renderable = false;\n break;\n }\n\n height -= range.y;\n top += range.y;\n width = height * aspectRatio;\n } else {\n if (range.x >= 0) {\n if (right < maxWidth) {\n width += range.x;\n } else if (range.y <= 0 && top <= minTop) {\n renderable = false;\n }\n } else {\n width += range.x;\n }\n\n if (range.y <= 0) {\n if (top > minTop) {\n height -= range.y;\n top += range.y;\n }\n } else {\n height -= range.y;\n top += range.y;\n }\n }\n\n if (width < 0 && height < 0) {\n action = ACTION_SOUTH_WEST;\n height = 0;\n width = 0;\n } else if (width < 0) {\n action = ACTION_NORTH_WEST;\n width = 0;\n } else if (height < 0) {\n action = ACTION_SOUTH_EAST;\n height = 0;\n }\n\n break;\n\n case ACTION_NORTH_WEST:\n if (aspectRatio) {\n if (range.y <= 0 && (top <= minTop || left <= minLeft)) {\n renderable = false;\n break;\n }\n\n height -= range.y;\n top += range.y;\n width = height * aspectRatio;\n left += range.X;\n } else {\n if (range.x <= 0) {\n if (left > minLeft) {\n width -= range.x;\n left += range.x;\n } else if (range.y <= 0 && top <= minTop) {\n renderable = false;\n }\n } else {\n width -= range.x;\n left += range.x;\n }\n\n if (range.y <= 0) {\n if (top > minTop) {\n height -= range.y;\n top += range.y;\n }\n } else {\n height -= range.y;\n top += range.y;\n }\n }\n\n if (width < 0 && height < 0) {\n action = ACTION_SOUTH_EAST;\n height = 0;\n width = 0;\n } else if (width < 0) {\n action = ACTION_NORTH_EAST;\n width = 0;\n } else if (height < 0) {\n action = ACTION_SOUTH_WEST;\n height = 0;\n }\n\n break;\n\n case ACTION_SOUTH_WEST:\n if (aspectRatio) {\n if (range.x <= 0 && (left <= minLeft || bottom >= maxHeight)) {\n renderable = false;\n break;\n }\n\n width -= range.x;\n left += range.x;\n height = width / aspectRatio;\n } else {\n if (range.x <= 0) {\n if (left > minLeft) {\n width -= range.x;\n left += range.x;\n } else if (range.y >= 0 && bottom >= maxHeight) {\n renderable = false;\n }\n } else {\n width -= range.x;\n left += range.x;\n }\n\n if (range.y >= 0) {\n if (bottom < maxHeight) {\n height += range.y;\n }\n } else {\n height += range.y;\n }\n }\n\n if (width < 0 && height < 0) {\n action = ACTION_NORTH_EAST;\n height = 0;\n width = 0;\n } else if (width < 0) {\n action = ACTION_SOUTH_EAST;\n width = 0;\n } else if (height < 0) {\n action = ACTION_NORTH_WEST;\n height = 0;\n }\n\n break;\n\n case ACTION_SOUTH_EAST:\n if (aspectRatio) {\n if (range.x >= 0 && (right >= maxWidth || bottom >= maxHeight)) {\n renderable = false;\n break;\n }\n\n width += range.x;\n height = width / aspectRatio;\n } else {\n if (range.x >= 0) {\n if (right < maxWidth) {\n width += range.x;\n } else if (range.y >= 0 && bottom >= maxHeight) {\n renderable = false;\n }\n } else {\n width += range.x;\n }\n\n if (range.y >= 0) {\n if (bottom < maxHeight) {\n height += range.y;\n }\n } else {\n height += range.y;\n }\n }\n\n if (width < 0 && height < 0) {\n action = ACTION_NORTH_WEST;\n height = 0;\n width = 0;\n } else if (width < 0) {\n action = ACTION_SOUTH_WEST;\n width = 0;\n } else if (height < 0) {\n action = ACTION_NORTH_EAST;\n height = 0;\n }\n\n break;\n\n // Move canvas\n case ACTION_MOVE:\n this.move(range.x, range.y);\n renderable = false;\n break;\n\n // Zoom canvas\n case ACTION_ZOOM:\n this.zoom((function (x1, y1, x2, y2) {\n var z1 = sqrt(x1 * x1 + y1 * y1);\n var z2 = sqrt(x2 * x2 + y2 * y2);\n\n return (z2 - z1) / z1;\n })(\n abs(this.startX - this.startX2),\n abs(this.startY - this.startY2),\n abs(this.endX - this.endX2),\n abs(this.endY - this.endY2)\n ), event);\n this.startX2 = this.endX2;\n this.startY2 = this.endY2;\n renderable = false;\n break;\n\n // Create crop box\n case ACTION_CROP:\n if (!range.x || !range.y) {\n renderable = false;\n break;\n }\n\n offset = this.$cropper.offset();\n left = this.startX - offset.left;\n top = this.startY - offset.top;\n width = cropBox.minWidth;\n height = cropBox.minHeight;\n\n if (range.x > 0) {\n action = range.y > 0 ? ACTION_SOUTH_EAST : ACTION_NORTH_EAST;\n } else if (range.x < 0) {\n left -= width;\n action = range.y > 0 ? ACTION_SOUTH_WEST : ACTION_NORTH_WEST;\n }\n\n if (range.y < 0) {\n top -= height;\n }\n\n // Show the crop box if is hidden\n if (!this.isCropped) {\n this.$cropBox.removeClass(CLASS_HIDDEN);\n this.isCropped = true;\n\n if (this.isLimited) {\n this.limitCropBox(true, true);\n }\n }\n\n break;\n\n // No default\n }\n\n if (renderable) {\n cropBox.width = width;\n cropBox.height = height;\n cropBox.left = left;\n cropBox.top = top;\n this.action = action;\n\n this.renderCropBox();\n }\n\n // Override\n this.startX = this.endX;\n this.startY = this.endY;\n },\n\n // Show the crop box manually\n crop: function () {\n if (!this.isBuilt || this.isDisabled) {\n return;\n }\n\n if (!this.isCropped) {\n this.isCropped = true;\n this.limitCropBox(true, true);\n\n if (this.options.modal) {\n this.$dragBox.addClass(CLASS_MODAL);\n }\n\n this.$cropBox.removeClass(CLASS_HIDDEN);\n }\n\n this.setCropBoxData(this.initialCropBox);\n },\n\n // Reset the image and crop box to their initial states\n reset: function () {\n if (!this.isBuilt || this.isDisabled) {\n return;\n }\n\n this.image = $.extend({}, this.initialImage);\n this.canvas = $.extend({}, this.initialCanvas);\n this.cropBox = $.extend({}, this.initialCropBox);\n\n this.renderCanvas();\n\n if (this.isCropped) {\n this.renderCropBox();\n }\n },\n\n // Clear the crop box\n clear: function () {\n if (!this.isCropped || this.isDisabled) {\n return;\n }\n\n $.extend(this.cropBox, {\n left: 0,\n top: 0,\n width: 0,\n height: 0\n });\n\n this.isCropped = false;\n this.renderCropBox();\n\n this.limitCanvas(true, true);\n\n // Render canvas after crop box rendered\n this.renderCanvas();\n\n this.$dragBox.removeClass(CLASS_MODAL);\n this.$cropBox.addClass(CLASS_HIDDEN);\n },\n\n /**\n * Replace the image's src and rebuild the cropper\n *\n * @param {String} url\n * @param {Boolean} onlyColorChanged (optional)\n */\n replace: function (url, onlyColorChanged) {\n if (!this.isDisabled && url) {\n if (this.isImg) {\n this.$element.attr('src', url);\n }\n\n if (onlyColorChanged) {\n this.url = url;\n this.$clone.attr('src', url);\n\n if (this.isBuilt) {\n this.$preview.find('img').add(this.$clone2).attr('src', url);\n }\n } else {\n if (this.isImg) {\n this.isReplaced = true;\n }\n\n // Clear previous data\n this.options.data = null;\n this.load(url);\n }\n }\n },\n\n // Enable (unfreeze) the cropper\n enable: function () {\n if (this.isBuilt) {\n this.isDisabled = false;\n this.$cropper.removeClass(CLASS_DISABLED);\n }\n },\n\n // Disable (freeze) the cropper\n disable: function () {\n if (this.isBuilt) {\n this.isDisabled = true;\n this.$cropper.addClass(CLASS_DISABLED);\n }\n },\n\n // Destroy the cropper and remove the instance from the image\n destroy: function () {\n var $this = this.$element;\n\n if (this.isLoaded) {\n if (this.isImg && this.isReplaced) {\n $this.attr('src', this.originalUrl);\n }\n\n this.unbuild();\n $this.removeClass(CLASS_HIDDEN);\n } else {\n if (this.isImg) {\n $this.off(EVENT_LOAD, this.start);\n } else if (this.$clone) {\n this.$clone.remove();\n }\n }\n\n $this.removeData(NAMESPACE);\n },\n\n /**\n * Move the canvas with relative offsets\n *\n * @param {Number} offsetX\n * @param {Number} offsetY (optional)\n */\n move: function (offsetX, offsetY) {\n var canvas = this.canvas;\n\n this.moveTo(\n isUndefined(offsetX) ? offsetX : canvas.left + num(offsetX),\n isUndefined(offsetY) ? offsetY : canvas.top + num(offsetY)\n );\n },\n\n /**\n * Move the canvas to an absolute point\n *\n * @param {Number} x\n * @param {Number} y (optional)\n */\n moveTo: function (x, y) {\n var canvas = this.canvas;\n var isChanged = false;\n\n // If \"y\" is not present, its default value is \"x\"\n if (isUndefined(y)) {\n y = x;\n }\n\n x = num(x);\n y = num(y);\n\n if (this.isBuilt && !this.isDisabled && this.options.movable) {\n if (isNumber(x)) {\n canvas.left = x;\n isChanged = true;\n }\n\n if (isNumber(y)) {\n canvas.top = y;\n isChanged = true;\n }\n\n if (isChanged) {\n this.renderCanvas(true);\n }\n }\n },\n\n /**\n * Zoom the canvas with a relative ratio\n *\n * @param {Number} ratio\n * @param {jQuery Event} _event (private)\n */\n zoom: function (ratio, _event) {\n var canvas = this.canvas;\n\n ratio = num(ratio);\n\n if (ratio < 0) {\n ratio = 1 / (1 - ratio);\n } else {\n ratio = 1 + ratio;\n }\n\n this.zoomTo(canvas.width * ratio / canvas.naturalWidth, _event);\n },\n\n /**\n * Zoom the canvas to an absolute ratio\n *\n * @param {Number} ratio\n * @param {jQuery Event} _event (private)\n */\n zoomTo: function (ratio, _event) {\n var options = this.options;\n var canvas = this.canvas;\n var width = canvas.width;\n var height = canvas.height;\n var naturalWidth = canvas.naturalWidth;\n var naturalHeight = canvas.naturalHeight;\n var originalEvent;\n var newWidth;\n var newHeight;\n var offset;\n var center;\n\n ratio = num(ratio);\n\n if (ratio >= 0 && this.isBuilt && !this.isDisabled && options.zoomable) {\n newWidth = naturalWidth * ratio;\n newHeight = naturalHeight * ratio;\n\n if (_event) {\n originalEvent = _event.originalEvent;\n }\n\n if (this.trigger(EVENT_ZOOM, {\n originalEvent: originalEvent,\n oldRatio: width / naturalWidth,\n ratio: newWidth / naturalWidth\n }).isDefaultPrevented()) {\n return;\n }\n\n if (originalEvent) {\n offset = this.$cropper.offset();\n center = originalEvent.touches ? getTouchesCenter(originalEvent.touches) : {\n pageX: _event.pageX || originalEvent.pageX || 0,\n pageY: _event.pageY || originalEvent.pageY || 0\n };\n\n // Zoom from the triggering point of the event\n canvas.left -= (newWidth - width) * (\n ((center.pageX - offset.left) - canvas.left) / width\n );\n canvas.top -= (newHeight - height) * (\n ((center.pageY - offset.top) - canvas.top) / height\n );\n } else {\n\n // Zoom from the center of the canvas\n canvas.left -= (newWidth - width) / 2;\n canvas.top -= (newHeight - height) / 2;\n }\n\n canvas.width = newWidth;\n canvas.height = newHeight;\n this.renderCanvas(true);\n }\n },\n\n /**\n * Rotate the canvas with a relative degree\n *\n * @param {Number} degree\n */\n rotate: function (degree) {\n this.rotateTo((this.image.rotate || 0) + num(degree));\n },\n\n /**\n * Rotate the canvas to an absolute degree\n * https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function#rotate()\n *\n * @param {Number} degree\n */\n rotateTo: function (degree) {\n degree = num(degree);\n\n if (isNumber(degree) && this.isBuilt && !this.isDisabled && this.options.rotatable) {\n this.image.rotate = degree % 360;\n this.isRotated = true;\n this.renderCanvas(true);\n }\n },\n\n /**\n * Scale the image\n * https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function#scale()\n *\n * @param {Number} scaleX\n * @param {Number} scaleY (optional)\n */\n scale: function (scaleX, scaleY) {\n var image = this.image;\n var isChanged = false;\n\n // If \"scaleY\" is not present, its default value is \"scaleX\"\n if (isUndefined(scaleY)) {\n scaleY = scaleX;\n }\n\n scaleX = num(scaleX);\n scaleY = num(scaleY);\n\n if (this.isBuilt && !this.isDisabled && this.options.scalable) {\n if (isNumber(scaleX)) {\n image.scaleX = scaleX;\n isChanged = true;\n }\n\n if (isNumber(scaleY)) {\n image.scaleY = scaleY;\n isChanged = true;\n }\n\n if (isChanged) {\n this.renderImage(true);\n }\n }\n },\n\n /**\n * Scale the abscissa of the image\n *\n * @param {Number} scaleX\n */\n scaleX: function (scaleX) {\n var scaleY = this.image.scaleY;\n\n this.scale(scaleX, isNumber(scaleY) ? scaleY : 1);\n },\n\n /**\n * Scale the ordinate of the image\n *\n * @param {Number} scaleY\n */\n scaleY: function (scaleY) {\n var scaleX = this.image.scaleX;\n\n this.scale(isNumber(scaleX) ? scaleX : 1, scaleY);\n },\n\n /**\n * Get the cropped area position and size data (base on the original image)\n *\n * @param {Boolean} isRounded (optional)\n * @return {Object} data\n */\n getData: function (isRounded) {\n var options = this.options;\n var image = this.image;\n var canvas = this.canvas;\n var cropBox = this.cropBox;\n var ratio;\n var data;\n\n if (this.isBuilt && this.isCropped) {\n data = {\n x: cropBox.left - canvas.left,\n y: cropBox.top - canvas.top,\n width: cropBox.width,\n height: cropBox.height\n };\n\n ratio = image.width / image.naturalWidth;\n\n $.each(data, function (i, n) {\n n = n / ratio;\n data[i] = isRounded ? round(n) : n;\n });\n\n } else {\n data = {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n };\n }\n\n if (options.rotatable) {\n data.rotate = image.rotate || 0;\n }\n\n if (options.scalable) {\n data.scaleX = image.scaleX || 1;\n data.scaleY = image.scaleY || 1;\n }\n\n return data;\n },\n\n /**\n * Set the cropped area position and size with new data\n *\n * @param {Object} data\n */\n setData: function (data) {\n var options = this.options;\n var image = this.image;\n var canvas = this.canvas;\n var cropBoxData = {};\n var isRotated;\n var isScaled;\n var ratio;\n\n if ($.isFunction(data)) {\n data = data.call(this.element);\n }\n\n if (this.isBuilt && !this.isDisabled && $.isPlainObject(data)) {\n if (options.rotatable) {\n if (isNumber(data.rotate) && data.rotate !== image.rotate) {\n image.rotate = data.rotate;\n this.isRotated = isRotated = true;\n }\n }\n\n if (options.scalable) {\n if (isNumber(data.scaleX) && data.scaleX !== image.scaleX) {\n image.scaleX = data.scaleX;\n isScaled = true;\n }\n\n if (isNumber(data.scaleY) && data.scaleY !== image.scaleY) {\n image.scaleY = data.scaleY;\n isScaled = true;\n }\n }\n\n if (isRotated) {\n this.renderCanvas();\n } else if (isScaled) {\n this.renderImage();\n }\n\n ratio = image.width / image.naturalWidth;\n\n if (isNumber(data.x)) {\n cropBoxData.left = data.x * ratio + canvas.left;\n }\n\n if (isNumber(data.y)) {\n cropBoxData.top = data.y * ratio + canvas.top;\n }\n\n if (isNumber(data.width)) {\n cropBoxData.width = data.width * ratio;\n }\n\n if (isNumber(data.height)) {\n cropBoxData.height = data.height * ratio;\n }\n\n this.setCropBoxData(cropBoxData);\n }\n },\n\n /**\n * Get the container size data\n *\n * @return {Object} data\n */\n getContainerData: function () {\n return this.isBuilt ? this.container : {};\n },\n\n /**\n * Get the image position and size data\n *\n * @return {Object} data\n */\n getImageData: function () {\n return this.isLoaded ? this.image : {};\n },\n\n /**\n * Get the canvas position and size data\n *\n * @return {Object} data\n */\n getCanvasData: function () {\n var canvas = this.canvas;\n var data = {};\n\n if (this.isBuilt) {\n $.each([\n 'left',\n 'top',\n 'width',\n 'height',\n 'naturalWidth',\n 'naturalHeight'\n ], function (i, n) {\n data[n] = canvas[n];\n });\n }\n\n return data;\n },\n\n /**\n * Set the canvas position and size with new data\n *\n * @param {Object} data\n */\n setCanvasData: function (data) {\n var canvas = this.canvas;\n var aspectRatio = canvas.aspectRatio;\n\n if ($.isFunction(data)) {\n data = data.call(this.$element);\n }\n\n if (this.isBuilt && !this.isDisabled && $.isPlainObject(data)) {\n if (isNumber(data.left)) {\n canvas.left = data.left;\n }\n\n if (isNumber(data.top)) {\n canvas.top = data.top;\n }\n\n if (isNumber(data.width)) {\n canvas.width = data.width;\n canvas.height = data.width / aspectRatio;\n } else if (isNumber(data.height)) {\n canvas.height = data.height;\n canvas.width = data.height * aspectRatio;\n }\n\n this.renderCanvas(true);\n }\n },\n\n /**\n * Get the crop box position and size data\n *\n * @return {Object} data\n */\n getCropBoxData: function () {\n var cropBox = this.cropBox;\n var data;\n\n if (this.isBuilt && this.isCropped) {\n data = {\n left: cropBox.left,\n top: cropBox.top,\n width: cropBox.width,\n height: cropBox.height\n };\n }\n\n return data || {};\n },\n\n /**\n * Set the crop box position and size with new data\n *\n * @param {Object} data\n */\n setCropBoxData: function (data) {\n var cropBox = this.cropBox;\n var aspectRatio = this.options.aspectRatio;\n var isWidthChanged;\n var isHeightChanged;\n\n if ($.isFunction(data)) {\n data = data.call(this.$element);\n }\n\n if (this.isBuilt && this.isCropped && !this.isDisabled && $.isPlainObject(data)) {\n\n if (isNumber(data.left)) {\n cropBox.left = data.left;\n }\n\n if (isNumber(data.top)) {\n cropBox.top = data.top;\n }\n\n if (isNumber(data.width)) {\n isWidthChanged = true;\n cropBox.width = data.width;\n }\n\n if (isNumber(data.height)) {\n isHeightChanged = true;\n cropBox.height = data.height;\n }\n\n if (aspectRatio) {\n if (isWidthChanged) {\n cropBox.height = cropBox.width / aspectRatio;\n } else if (isHeightChanged) {\n cropBox.width = cropBox.height * aspectRatio;\n }\n }\n\n this.renderCropBox();\n }\n },\n\n /**\n * Get a canvas drawn the cropped image\n *\n * @param {Object} options (optional)\n * @return {HTMLCanvasElement} canvas\n */\n getCroppedCanvas: function (options) {\n var originalWidth;\n var originalHeight;\n var canvasWidth;\n var canvasHeight;\n var scaledWidth;\n var scaledHeight;\n var scaledRatio;\n var aspectRatio;\n var canvas;\n var context;\n var data;\n\n if (!this.isBuilt || !SUPPORT_CANVAS) {\n return;\n }\n\n if (!this.isCropped) {\n return getSourceCanvas(this.$clone[0], this.image);\n }\n\n if (!$.isPlainObject(options)) {\n options = {};\n }\n\n data = this.getData();\n originalWidth = data.width;\n originalHeight = data.height;\n aspectRatio = originalWidth / originalHeight;\n\n if ($.isPlainObject(options)) {\n scaledWidth = options.width;\n scaledHeight = options.height;\n\n if (scaledWidth) {\n scaledHeight = scaledWidth / aspectRatio;\n scaledRatio = scaledWidth / originalWidth;\n } else if (scaledHeight) {\n scaledWidth = scaledHeight * aspectRatio;\n scaledRatio = scaledHeight / originalHeight;\n }\n }\n\n // The canvas element will use `Math.floor` on a float number, so floor first\n canvasWidth = floor(scaledWidth || originalWidth);\n canvasHeight = floor(scaledHeight || originalHeight);\n\n canvas = $('')[0];\n canvas.width = canvasWidth;\n canvas.height = canvasHeight;\n context = canvas.getContext('2d');\n\n if (options.fillColor) {\n context.fillStyle = options.fillColor;\n context.fillRect(0, 0, canvasWidth, canvasHeight);\n }\n\n // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.drawImage\n context.drawImage.apply(context, (function () {\n var source = getSourceCanvas(this.$clone[0], this.image);\n var sourceWidth = source.width;\n var sourceHeight = source.height;\n var canvas = this.canvas;\n var params = [source];\n\n // Source canvas\n var srcX = data.x + canvas.naturalWidth * (abs(data.scaleX || 1) - 1) / 2;\n var srcY = data.y + canvas.naturalHeight * (abs(data.scaleY || 1) - 1) / 2;\n var srcWidth;\n var srcHeight;\n\n // Destination canvas\n var dstX;\n var dstY;\n var dstWidth;\n var dstHeight;\n\n if (srcX <= -originalWidth || srcX > sourceWidth) {\n srcX = srcWidth = dstX = dstWidth = 0;\n } else if (srcX <= 0) {\n dstX = -srcX;\n srcX = 0;\n srcWidth = dstWidth = min(sourceWidth, originalWidth + srcX);\n } else if (srcX <= sourceWidth) {\n dstX = 0;\n srcWidth = dstWidth = min(originalWidth, sourceWidth - srcX);\n }\n\n if (srcWidth <= 0 || srcY <= -originalHeight || srcY > sourceHeight) {\n srcY = srcHeight = dstY = dstHeight = 0;\n } else if (srcY <= 0) {\n dstY = -srcY;\n srcY = 0;\n srcHeight = dstHeight = min(sourceHeight, originalHeight + srcY);\n } else if (srcY <= sourceHeight) {\n dstY = 0;\n srcHeight = dstHeight = min(originalHeight, sourceHeight - srcY);\n }\n\n // All the numerical parameters should be integer for `drawImage` (#476)\n params.push(floor(srcX), floor(srcY), floor(srcWidth), floor(srcHeight));\n\n // Scale destination sizes\n if (scaledRatio) {\n dstX *= scaledRatio;\n dstY *= scaledRatio;\n dstWidth *= scaledRatio;\n dstHeight *= scaledRatio;\n }\n\n // Avoid \"IndexSizeError\" in IE and Firefox\n if (dstWidth > 0 && dstHeight > 0) {\n params.push(floor(dstX), floor(dstY), floor(dstWidth), floor(dstHeight));\n }\n\n return params;\n }).call(this));\n\n return canvas;\n },\n\n /**\n * Change the aspect ratio of the crop box\n *\n * @param {Number} aspectRatio\n */\n setAspectRatio: function (aspectRatio) {\n var options = this.options;\n\n if (!this.isDisabled && !isUndefined(aspectRatio)) {\n\n // 0 -> NaN\n options.aspectRatio = max(0, aspectRatio) || NaN;\n\n if (this.isBuilt) {\n this.initCropBox();\n\n if (this.isCropped) {\n this.renderCropBox();\n }\n }\n }\n },\n\n /**\n * Change the drag mode\n *\n * @param {String} mode (optional)\n */\n setDragMode: function (mode) {\n var options = this.options;\n var croppable;\n var movable;\n\n if (this.isLoaded && !this.isDisabled) {\n croppable = mode === ACTION_CROP;\n movable = options.movable && mode === ACTION_MOVE;\n mode = (croppable || movable) ? mode : ACTION_NONE;\n\n this.$dragBox.\n data(DATA_ACTION, mode).\n toggleClass(CLASS_CROP, croppable).\n toggleClass(CLASS_MOVE, movable);\n\n if (!options.cropBoxMovable) {\n\n // Sync drag mode to crop box when it is not movable(#300)\n this.$face.\n data(DATA_ACTION, mode).\n toggleClass(CLASS_CROP, croppable).\n toggleClass(CLASS_MOVE, movable);\n }\n }\n }\n };\n\n Cropper.DEFAULTS = {\n\n // Define the view mode of the cropper\n viewMode: 0, // 0, 1, 2, 3\n\n // Define the dragging mode of the cropper\n dragMode: 'crop', // 'crop', 'move' or 'none'\n\n // Define the aspect ratio of the crop box\n aspectRatio: NaN,\n\n // An object with the previous cropping result data\n data: null,\n\n // A jQuery selector for adding extra containers to preview\n preview: '',\n\n // Re-render the cropper when resize the window\n responsive: true,\n\n // Restore the cropped area after resize the window\n restore: true,\n\n // Check if the current image is a cross-origin image\n checkCrossOrigin: true,\n\n // Check the current image's Exif Orientation information\n checkOrientation: true,\n\n // Show the black modal\n modal: true,\n\n // Show the dashed lines for guiding\n guides: true,\n\n // Show the center indicator for guiding\n center: true,\n\n // Show the white modal to highlight the crop box\n highlight: true,\n\n // Show the grid background\n background: true,\n\n // Enable to crop the image automatically when initialize\n autoCrop: true,\n\n // Define the percentage of automatic cropping area when initializes\n autoCropArea: 0.8,\n\n // Enable to move the image\n movable: true,\n\n // Enable to rotate the image\n rotatable: true,\n\n // Enable to scale the image\n scalable: true,\n\n // Enable to zoom the image\n zoomable: true,\n\n // Enable to zoom the image by dragging touch\n zoomOnTouch: true,\n\n // Enable to zoom the image by wheeling mouse\n zoomOnWheel: true,\n\n // Define zoom ratio when zoom the image by wheeling mouse\n wheelZoomRatio: 0.1,\n\n // Enable to move the crop box\n cropBoxMovable: true,\n\n // Enable to resize the crop box\n cropBoxResizable: true,\n\n // Toggle drag mode between \"crop\" and \"move\" when click twice on the cropper\n toggleDragModeOnDblclick: true,\n\n // Size limitation\n minCanvasWidth: 0,\n minCanvasHeight: 0,\n minCropBoxWidth: 0,\n minCropBoxHeight: 0,\n minContainerWidth: 200,\n minContainerHeight: 100,\n\n // Shortcuts of events\n build: null,\n built: null,\n cropstart: null,\n cropmove: null,\n cropend: null,\n crop: null,\n zoom: null\n };\n\n Cropper.setDefaults = function (options) {\n $.extend(Cropper.DEFAULTS, options);\n };\n\n Cropper.TEMPLATE = (\n '
' +\n '
' +\n '
' +\n '
' +\n '
' +\n '
' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '
' +\n '
'\n );\n\n // Save the other cropper\n Cropper.other = $.fn.cropper;\n\n // Register as jQuery plugin\n $.fn.cropper = function (option) {\n var args = toArray(arguments, 1);\n var result;\n\n this.each(function () {\n var $this = $(this);\n var data = $this.data(NAMESPACE);\n var options;\n var fn;\n\n if (!data) {\n if (/destroy/.test(option)) {\n return;\n }\n\n options = $.extend({}, $this.data(), $.isPlainObject(option) && option);\n $this.data(NAMESPACE, (data = new Cropper(this, options)));\n }\n\n if (typeof option === 'string' && $.isFunction(fn = data[option])) {\n result = fn.apply(data, args);\n }\n });\n\n return isUndefined(result) ? this : result;\n };\n\n $.fn.cropper.Constructor = Cropper;\n $.fn.cropper.setDefaults = Cropper.setDefaults;\n\n // No conflict\n $.fn.cropper.noConflict = function () {\n $.fn.cropper = Cropper.other;\n return this;\n };\n\n});\n","/**\n * Created by jong on 7/29/15.\n */\n\nvar ILabCrop=function($,settings){\n this.settings=settings;\n this.modalContainer=$('#ilabm-container-'+settings.modal_id);\n this.cropper=this.modalContainer.find('.ilabc-cropper');\n this.cropperData={};\n this.modal_id=settings.modal_id;\n\n var cropRef=this;\n var resizeTimerId;\n var isResizing=false;\n\n this.modalContainer.find('.ilabm-editor-tabs').ilabTabs({\n currentValue: this.settings.size,\n tabSelected:function(tab){\n ILabModal.loadURL(tab.data('url'),true,function(response){\n cropRef.bindUI(response);\n });\n }\n });\n\n $(window).resize(function() {\n if (!isResizing)\n {\n data=cropRef.cropper.cropper('getData');\n cropRef.settings.prev_crop_x=data.x;\n cropRef.settings.prev_crop_y=data.y;\n cropRef.settings.prev_crop_width=data.width;\n cropRef.settings.prev_crop_height=data.height;\n }\n\n isResizing=true;\n cropRef.updatePreviewWidth();\n clearTimeout(resizeTimerId);\n resizeTimerId = setTimeout(cropRef._resized, 250);\n });\n\n\n this.modalContainer.find('.ilabc-button-crop').on('click',function(e){\n e.preventDefault();\n cropRef.crop();\n return false;\n });\n\n this._resized=function(){\n cropRef.bindUI(cropRef.settings);\n isResizing=false;\n };\n\n this.updatePreviewWidth=function() {\n var width = this.modalContainer.find('.ilab-crop-preview-title').width();\n this.modalContainer.find('.ilab-crop-preview').css({\n 'height' : (width / cropRef.settings.aspect_ratio) + 'px',\n 'width' : width + 'px'\n });\n };\n\n this.bindUI=function(settings){\n this.settings=settings;\n\n this.cropper.cropper('destroy');\n this.cropper.off('built.cropper');\n\n if (settings.hasOwnProperty('cropped_src') && settings.cropped_src !== null)\n {\n this.modalContainer.find('.ilab-current-crop-img').attr('src',settings.cropped_src);\n }\n\n if (settings.hasOwnProperty('size_title') && (settings.size_title !== null))\n {\n this.modalContainer.find('.ilabc-crop-size-title').text(\"Current \"+settings.size_title+\" (\"+settings.min_width+\" x \"+settings.min_height+\")\");\n }\n\n if (typeof settings.aspect_ratio !== 'undefined')\n {\n this.updatePreviewWidth();\n\n if ((typeof settings.prev_crop_x !== 'undefined') && (settings.prev_crop_x !== null)) {\n this.cropperData = {\n x : settings.prev_crop_x,\n y : settings.prev_crop_y,\n width : settings.prev_crop_width,\n height : settings.prev_crop_height\n };\n }\n\n this.cropper.on('built.cropper',function(){\n cropRef.updatePreviewWidth();\n }).on('crop.cropper',function(e){\n //console.log(e.x, e.y, e.width, e.height);\n }).cropper({\n viewMode: 1,\n aspectRatio : settings.aspect_ratio,\n minWidth : settings.min_width,\n minHeight : settings.min_height,\n modal : true,\n zoomable: false,\n mouseWheelZoom: false,\n dragCrop: false,\n autoCropArea: 1,\n movable: false,\n data : this.cropperData,\n checkImageOrigin: false,\n checkCrossOrigin: false,\n responsive: true,\n preview: '#ilabm-container-'+this.modal_id+' .ilab-crop-preview'\n });\n }\n };\n\n this.crop=function(){\n var cropRef=this;\n\n this.displayStatus('Saving crop ...');\n\n var data = this.cropper.cropper('getData');\n data['action'] = 'ilab_perform_crop';\n data['post'] = this.settings.image_id;\n data['size'] = this.settings.size;\n jQuery.post(ajaxurl, data, function(response) {\n if (response.status=='ok') {\n cropRef.modalContainer.find('.ilab-current-crop-img').one('load',function(){\n cropRef.hideStatus();\n });\n cropRef.modalContainer.find('.ilab-current-crop-img').attr('src', response.src);\n }\n else\n cropRef.hideStatus();\n });\n };\n\n this.displayStatus=function(message){\n cropRef.modalContainer.find('.ilabm-status-label').text(message);\n cropRef.modalContainer.find('.ilabm-status-container').removeClass('is-hidden');\n };\n\n this.hideStatus=function(){\n cropRef.modalContainer.find('.ilabm-status-container').addClass('is-hidden');\n };\n\n this.bindUI(settings);\n};\n","/**\n * Created by jong on 8/8/15.\n */\n\nvar ImgixComponents=(function(){\n var byteToHex=function(byte) {\n var hexChar = [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\",\"8\", \"9\", \"A\", \"B\", \"C\", \"D\", \"E\", \"F\"];\n return hexChar[(byte >> 4) & 0x0f] + hexChar[byte & 0x0f];\n };\n\n return {\n utilities: {\n byteToHex:byteToHex\n }\n };\n})();","(function($){\n\n $.fn.imgixLabel=function(options){\n var settings= $.extend({},options);\n\n return this.each(function(){\n var label=$(this);\n\n var changeTimerId;\n\n var currentVal=0;\n\n var textInput=$('');\n label.parent().append(textInput);\n\n textInput.on('keydown',function(e){\n if (e.keyCode==27) {\n textInput.off('blur');\n textInput.off('input');\n\n textInput.addClass('is-hidden');\n if (settings.hasOwnProperty('changed'))\n settings.changed(currentVal);\n\n label.text(currentVal);\n }\n else if (e.keyCode==13) {\n textInput.off('blur');\n textInput.off('input');\n\n var val=parseInt(textInput.val());\n textInput.addClass('is-hidden');\n if (settings.hasOwnProperty('changed'))\n settings.changed(val);\n\n label.text(val);\n }\n else if (e.keyCode==38) {\n var val=parseInt(textInput.val());\n val++;\n textInput.val(val);\n if (settings.hasOwnProperty('changed'))\n settings.changed(val);\n label.text(val);\n }\n else if (e.keyCode==40) {\n var val=parseInt(textInput.val());\n val--;\n textInput.val(val);\n if (settings.hasOwnProperty('changed'))\n settings.changed(val);\n label.text(val);\n\n }\n else {\n if (e.keyCode<57)\n return true;\n else if ((e.keyCode>90) && (e.keyCode<105))\n return true;\n else if (e.keyCode==109)\n return true;\n else if (e.metaKey)\n return true;\n\n e.preventDefault();\n return false;\n }\n });\n\n label.on('click',function(e){\n e.preventDefault();\n\n textInput.on('input',function(){\n var val=parseInt(textInput.val());\n if (settings.hasOwnProperty('changed'))\n {\n clearTimeout(changeTimerId);\n changeTimerId = setTimeout(function(){\n settings.changed(val);\n }, 500);\n }\n\n label.text(val);\n });\n\n textInput.on('blur',function(){\n var val=parseInt(textInput.val());\n textInput.addClass('is-hidden');\n if (settings.hasOwnProperty('changed'))\n settings.changed(val);\n\n label.text(val);\n });\n\n currentVal=(settings.hasOwnProperty('currentValue')) ? settings.currentValue() : 0;\n textInput.val(currentVal);\n textInput.removeClass('is-hidden');\n textInput.select();\n textInput.focus();\n\n return false;\n });\n });\n };\n\n}(jQuery));\n","\n(function($){\n ImgixComponents.ImgixSlider=function(delegate, container)\n {\n this.delegate=delegate;\n this.container=container;\n this.valueLabel=container.find('.imgix-param-title-right > h3');\n this.slider=container.find('.imgix-param');\n this.resetButton=container.find('.imgix-param-reset');\n\n this.defaultValue=container.data('default-value');\n this.param=container.data('param');\n\n var sliderRef=this;\n\n this.container.find('.imgix-param-label').imgixLabel({\n currentValue:function(){\n return sliderRef.slider.val();\n },\n changed:function(newVal){\n if (newVal==sliderRef.slider.val())\n return;\n\n sliderRef.slider.val(newVal);\n sliderRef.slider.hide().show(0);\n sliderRef.delegate.preview();\n }\n });\n\n this.resetButton.on('click',function(){\n sliderRef.reset();\n });\n\n this.slider.on('input',function(){\n sliderRef.valueLabel.text(sliderRef.slider.val());\n });\n\n this.slider.on('change',function(){\n sliderRef.valueLabel.text(sliderRef.slider.val());\n sliderRef.delegate.preview();\n });\n };\n\n ImgixComponents.ImgixSlider.prototype.destroy=function() {\n this.slider.off('input');\n this.slider.off('change');\n this.resetButton.off('click');\n };\n\n ImgixComponents.ImgixSlider.prototype.reset=function(data) {\n var val;\n\n if (data && data.hasOwnProperty(this.param))\n val=data[this.param];\n else\n val=this.defaultValue;\n\n this.valueLabel.text(val);\n this.slider.val(val);\n this.slider.hide().show(0);\n\n this.delegate.preview();\n };\n\n ImgixComponents.ImgixSlider.prototype.saveValue=function(data) {\n if (this.slider.val()!=this.defaultValue)\n data[this.param]=this.slider.val();\n\n return data;\n };\n\n}(jQuery));\n","(function($){\n\n ImgixComponents.ImgixColor=function(delegate, container)\n {\n this.delegate=delegate;\n this.container=container;\n this.colorPicker=container.find('.imgix-param-color');\n this.alphaSlider=container.find('.imgix-param-alpha');\n this.type=container.data('param-type');\n this.resetButton=container.find('.imgix-param-reset');\n this.param=container.data('param');\n this.defaultValue=container.data('default-value');\n\n var colorPickerRef=this;\n\n if (this.type=='blend-color') {\n this.blendParam=container.data('blend-param');\n this.blendSelect = container.find('.imgix-param-blend');\n\n var currentBlend=container.data('blend-value');\n this.blendSelect.val(currentBlend);\n\n this.blendSelect.on('change',function(){\n colorPickerRef.delegate.preview();\n });\n }\n\n this.colorPicker.wpColorPicker({\n palettes: false,\n change: function(event, ui) {\n colorPickerRef.delegate.preview();\n }\n });\n\n this.alphaSlider.on('change',function(){\n colorPickerRef.delegate.preview();\n });\n\n this.resetButton.on('click',function(){\n colorPickerRef.reset();\n });\n };\n\n ImgixComponents.ImgixColor.prototype.destroy=function() {\n this.alphaSlider.off('change');\n if (this.type=='blend-color') {\n this.blendSelect.off('change');\n }\n this.resetButton.off('click');\n };\n\n ImgixComponents.ImgixColor.prototype.reset=function(data) {\n var blend='none';\n var val;\n\n if ((data !== undefined) && data.hasOwnProperty(this.blendParam))\n {\n blend=data[this.blendParam];\n }\n\n if ((data !== undefined) && data.hasOwnProperty(this.param))\n {\n val=data[this.param];\n }\n else\n val=this.defaultValue;\n\n val=val.replace('#','');\n if (val.length==8)\n {\n var alpha=(parseInt('0x'+val.substring(0,2))/255.0)*100.0;\n val=val.substring(2);\n\n this.alphaSlider.val(Math.round(alpha));\n this.alphaSlider.hide().show(0);\n } else {\n this.alphaSlider.val(0);\n this.alphaSlider.hide().show(0);\n }\n\n this.colorPicker.val('#'+val);\n this.colorPicker.wpColorPicker('color', '#'+val);\n\n if (this.type=='blend-color') {\n this.blendSelect.val(blend);\n }\n\n this.delegate.preview();\n };\n\n ImgixComponents.ImgixColor.prototype.saveValue=function(data) {\n if (this.alphaSlider.val()>0) {\n data[this.param] = '#' + ImgixComponents.utilities.byteToHex(Math.round((parseFloat(this.alphaSlider.val()) / 100.0) * 255.0)) + this.colorPicker.val().replace('#', '');\n\n if (this.type == 'blend-color') {\n if (this.blendSelect.val()!='none') {\n data[this.blendParam] = this.blendSelect.val();\n }\n }\n }\n\n return data;\n };\n\n}(jQuery));\n","(function($){\n\n ImgixComponents.ImgixAlignment=function(delegate, container)\n {\n this.delegate=delegate;\n this.container=container;\n this.alignmentParam=container.find('.imgix-param');\n this.resetButton=container.find('.imgix-param-reset');\n this.defaultValue=container.data('default-value');\n this.param=container.data('param');\n\n var alignmentRef=this;\n\n this.resetButton.on('click',function(){\n alignmentRef.reset();\n });\n\n container.find('.imgix-alignment-button').on('click',function(){\n var button=$(this);\n alignmentRef.container.find('.imgix-alignment-button').each(function(){\n $(this).removeClass('selected-alignment');\n });\n\n button.addClass('selected-alignment');\n alignmentRef.alignmentParam.val(button.data('param-value'));\n alignmentRef.delegate.preview();\n });\n };\n\n ImgixComponents.ImgixAlignment.prototype.destroy=function() {\n this.resetButton.off('click');\n this.container.find('.imgix-alignment-button').off('click');\n };\n\n ImgixComponents.ImgixAlignment.prototype.reset=function(data) {\n var val;\n\n if (data && data.hasOwnProperty(this.param))\n val=data[this.param];\n else\n val=this.defaultValue;\n\n if (val=='')\n val=this.defaultValue;\n\n this.container.find('.imgix-alignment-button').each(function(){\n var button=$(this);\n if (button.data('param-value')==val)\n button.addClass('selected-alignment');\n else\n button.removeClass('selected-alignment');\n });\n\n this.alignmentParam.val(val);\n this.delegate.preview();\n };\n\n ImgixComponents.ImgixAlignment.prototype.saveValue=function(data) {\n if (this.alignmentParam.val()!=this.defaultValue)\n data[this.param]=this.alignmentParam.val();\n\n return data;\n };\n}(jQuery));\n","(function($){\n\n ImgixComponents.ImgixMediaChooser=function(delegate, container)\n {\n this.delegate=delegate;\n this.container=container;\n this.preview=container.find('.imgix-media-preview img');\n this.mediaInput=container.find('.imgix-param');\n this.selectButton=container.find('.imgix-media-button');\n this.resetButton=container.find('.imgix-param-reset');\n\n this.defaultValue=container.data('default-value');\n this.param=container.data('param');\n\n this.uploader=wp.media({\n title: 'Select Watermark',\n button: {\n text: 'Select Watermark'\n },\n multiple: false\n });\n\n var mediaRef=this;\n\n this.resetButton.on('click',function(){\n mediaRef.reset();\n });\n\n this.uploader.on('select', function() {\n attachment = mediaRef.uploader.state().get('selection').first().toJSON();\n mediaRef.mediaInput.val(attachment.id);\n mediaRef.preview.attr('src',attachment.url);\n\n mediaRef.delegate.preview();\n });\n\n this.selectButton.on('click',function(e){\n e.preventDefault();\n mediaRef.uploader.open();\n return false;\n });\n\n };\n\n ImgixComponents.ImgixMediaChooser.prototype.destroy=function() {\n this.selectButton.off('click');\n this.uploader.off('select');\n this.resetButton.off('click');\n };\n\n ImgixComponents.ImgixMediaChooser.prototype.reset=function(data) {\n var val;\n\n if (data && data.hasOwnProperty(this.param))\n {\n val=data[this.param];\n this.mediaInput.val(val);\n }\n else\n this.mediaInput.val('');\n\n if (data && data.hasOwnProperty(this.param+'_url'))\n {\n this.preview.attr('src',data[this.param+'_url']);\n }\n else\n {\n this.preview.removeAttr('src').replaceWith(this.preview.clone());\n this.preview=this.container.find('.imgix-media-preview img');\n }\n\n this.delegate.preview();\n };\n\n ImgixComponents.ImgixMediaChooser.prototype.saveValue=function(data) {\n var val=this.mediaInput.val();\n\n if (val && val!='')\n data[this.param]=val;\n\n return data;\n };\n\n}(jQuery));\n","\n(function($){\n ImgixComponents.ImgixPillbox=function(delegate, container)\n {\n this.delegate=delegate;\n this.container=container;\n this.param=container.data('param');\n this.values=container.data('param-values').split(',');\n this.buttons=container.find('.ilabm-pill');\n this.inputs={};\n\n var pillboxRef=this;\n\n this.buttons.each(function(){\n var button=$(this);\n var valueName=button.data('param');\n pillboxRef.inputs[valueName]=pillboxRef.container.find(\"input[name='\"+valueName+\"']\");\n button.on('click',function(e){\n e.preventDefault();\n\n if (pillboxRef.inputs[valueName].val()==0)\n {\n pillboxRef.inputs[valueName].val(1);\n button.addClass('pill-selected');\n }\n else\n {\n pillboxRef.inputs[valueName].val(0);\n button.removeClass('pill-selected');\n }\n\n pillboxRef.delegate.preview();\n\n return false;\n });\n });\n };\n\n ImgixComponents.ImgixPillbox.prototype.destroy=function() {\n this.buttons.off('click');\n };\n\n ImgixComponents.ImgixPillbox.prototype.reset=function(data) {\n this.buttons.each(function(){\n $(this).removeClass('pill-selected');\n });\n\n var pillboxRef=this;\n Object.keys(this.inputs).forEach(function(key,index){\n pillboxRef.inputs[key].val(0);\n });\n\n if (data && data.hasOwnProperty(this.param)) {\n var val = data[this.param].split(',');\n\n\n val.forEach(function (key, index) {\n pillboxRef.inputs[key].val(1);\n pillboxRef.container.find('imgix-pill-' + key).addClass('pill-selected');\n });\n }\n\n this.delegate.preview();\n };\n\n ImgixComponents.ImgixPillbox.prototype.saveValue=function(data) {\n var vals=[];\n\n var pillboxRef=this;\n Object.keys(this.inputs).forEach(function(key,index){\n if (pillboxRef.inputs[key].val()==1)\n vals.push(key);\n });\n\n if (vals.length>0)\n data[this.param]=vals.join(',');\n\n return data;\n };\n\n}(jQuery));\n","/**\n * Created by jong on 8/9/15.\n */\n\nvar ILabImgixPresets=function($,delegate,container) {\n\n this.delegate=delegate;\n this.container=container.find('.ilabm-bottom-bar');\n this.presetSelect=this.container.find('.imgix-presets');\n this.presetContainer=this.container.find('.imgix-preset-container');\n this.presetDefaultCheckbox=this.container.find('.imgix-preset-make-default');\n\n var self=this;\n\n self.presetSelect.on('change',function(){\n if (self.presetSelect.val==0)\n {\n self.delegate.resetAll();\n self.presetDefaultCheckbox.prop('checked',false);\n return;\n }\n\n var preset=self.delegate.settings.presets[self.presetSelect.val()];\n if (preset.default_for==self.delegate.settings.size)\n self.presetDefaultCheckbox.prop('checked',true);\n\n self.delegate.bindPreset(preset);\n });\n\n this.container.find('.imgix-new-preset-button').on('click',function(){\n self.newPreset();\n });\n\n this.container.find('.imgix-save-preset-button').on('click',function(){\n self.savePreset();\n });\n\n this.container.find('.imgix-delete-preset-button').on('click',function(){\n self.deletePreset();\n });\n\n this.init=function() {\n self.presetSelect.find('option').remove();\n\n if (Object.keys(self.delegate.settings.presets).length==0)\n {\n self.presetContainer.addClass('is-hidden');\n }\n else\n {\n Object.keys(self.delegate.settings.presets).forEach(function(key,index) {\n self.presetSelect.append($('')\n .attr(\"value\",'0')\n .text('None'));\n\n self.presetSelect.append($('')\n .attr(\"value\",key)\n .text(self.delegate.settings.presets[key].title));\n });\n\n self.presetContainer.removeClass('is-hidden');\n self.presetSelect.val(self.delegate.settings.currentPreset);\n }\n };\n\n this.clearSelected=function(){\n self.presetSelect.val(0);\n self.presetDefaultCheckbox.prop('checked',false);\n };\n\n this.setCurrentPreset=function(preset, is_default){\n if (is_default)\n self.presetDefaultCheckbox.prop('checked',true);\n else\n self.presetDefaultCheckbox.prop('checked',false);\n\n self.presetSelect.val(preset);\n };\n\n this.newPreset=function(){\n var name=prompt(\"New preset name\");\n if (name!=null)\n {\n self.delegate.displayStatus('Saving preset ...');\n\n var data={};\n data['name']=name;\n if (self.presetDefaultCheckbox.is(':checked'))\n data['make_default']=1;\n\n self.delegate.postAjax('ilab_imgix_new_preset', data, function(response) {\n self.delegate.hideStatus();\n if (response.status=='ok')\n {\n self.delegate.settings.currentPreset=response.currentPreset;\n self.delegate.settings.presets=response.presets;\n\n self.init();\n }\n });\n }\n };\n\n this.savePreset=function(){\n if (self.presetSelect.val()==null)\n return;\n\n self.delegate.displayStatus('Saving preset ...');\n\n var data={};\n data['key']=self.presetSelect.val();\n if (self.presetDefaultCheckbox.is(':checked'))\n data['make_default']=1;\n\n self.delegate.postAjax('ilab_imgix_save_preset', data, function(response) {\n self.delegate.hideStatus();\n });\n };\n\n this.deletePreset=function(){\n if (self.presetSelect.val()==null)\n return;\n\n if (!confirm(\"Are you sure you want to delete this preset?\"))\n return;\n\n self.delegate.displayStatus('Delete preset ...');\n\n var data={};\n data['key']=self.presetSelect.val();\n\n self.delegate.postAjax('ilab_imgix_delete_preset', data, function(response) {\n self.delegate.hideStatus();\n if (response.status=='ok')\n {\n self.delegate.settings.currentPreset=response.currentPreset;\n self.delegate.settings.presets=response.presets;\n\n self.init();\n\n self.delegate.bindUI(response);\n }\n });\n };\n\n this.init();\n};","(function($){\n\n $.fn.ilabSidebarTabs=function(options){\n var settings= $.extend({},options);\n\n var firstTab=false;\n return this.find('.ilabm-sidebar-tab').each(function(){\n var tab=$(this);\n var target=settings.container.find('.'+tab.data('target'));\n\n if (!firstTab)\n {\n tab.addClass('active-tab');\n target.removeClass('is-hidden');\n\n firstTab=true;\n }\n\n tab.on('click',function(e){\n e.preventDefault();\n\n settings.container.find(\".ilabm-sidebar-tab\").each(function() {\n var otherTab = $(this);\n var tabTarget = settings.container.find('.' + otherTab.data('target'));\n\n otherTab.removeClass('active-tab');\n tabTarget.addClass('is-hidden');\n });\n\n tab.addClass('active-tab');\n target.removeClass('is-hidden');\n\n return false;\n });\n });\n };\n\n}(jQuery));\n","/**\n * Image Editing Module\n */\n\nvar ILabImageEdit=function($, settings){\n this.previewTimeout=null;\n this.previewsSuspended=false;\n this.parameters=[];\n\n var self=this;\n\n this.settings=settings;\n\n this.modalContainer=$('#ilabm-container-'+settings.modal_id);\n this.waitModal=this.modalContainer.find('.ilabm-preview-wait-modal');\n this.previewImage=this.modalContainer.find('.imgix-preview-image');\n\n this.presets=new ILabImgixPresets($,this,this.modalContainer);\n\n this.modalContainer.find('.imgix-button-reset-all').on('click',function(){\n self.resetAll();\n });\n this.modalContainer.find('.imgix-button-save-adjustments').on('click',function(){\n self.apply();\n });\n\n this.modalContainer.find('.imgix-parameter').each(function(){\n var container=$(this);\n var type=container.data('param-type');\n if (type=='slider')\n self.parameters.push(new ImgixComponents.ImgixSlider(self,container));\n else if ((type=='color') || (type=='blend-color'))\n self.parameters.push(new ImgixComponents.ImgixColor(self,container));\n else if (type=='pillbox')\n self.parameters.push(new ImgixComponents.ImgixPillbox(self,container));\n else if (type=='media-chooser')\n self.parameters.push(new ImgixComponents.ImgixMediaChooser(self,container));\n else if (type=='alignment')\n self.parameters.push(new ImgixComponents.ImgixAlignment(self,container));\n });\n\n this.modalContainer.on('click','.imgix-pill',function(){\n var paramName=$(this).data('param');\n var param=self.modalContainer.find('#imgix-param-'+paramName);\n if (param.val()==1)\n {\n param.val(0);\n $(this).removeClass('pill-selected');\n }\n else\n {\n param.val(1);\n $(this).addClass('pill-selected');\n }\n\n self.preview();\n });\n\n this.modalContainer.find('.ilabm-editor-tabs').ilabTabs({\n currentValue: self.settings.size,\n tabSelected:function(tab){\n ILabModal.loadURL(tab.data('url'),true,function(response){\n self.bindUI(response);\n });\n }\n });\n\n this.modalContainer.find(\".ilabm-sidebar-tabs\").ilabSidebarTabs({\n delegate: this,\n container: this.modalContainer\n });\n\n /**\n * Performs the wordpress ajax post\n * @param action\n * @param data\n * @param callback\n * @private\n */\n this.postAjax=function(action,data,callback){\n var postData={};\n self.parameters.forEach(function(value,index){\n postData=value.saveValue(postData);\n });\n\n data['image_id'] = self.settings.image_id;\n data['action'] = action;\n data['size'] = self.settings.size;\n data['settings']=postData;\n\n $.post(ajaxurl, data, callback);\n }\n\n /**\n * Performs the actual request for a preview to be generated\n * @private\n */\n function _preview(){\n self.displayStatus('Building preview ...');\n\n self.waitModal.removeClass('is-hidden');\n\n self.postAjax('ilab_imgix_preview',{},function(response) {\n if (response.status=='ok')\n {\n var sameSrc = (response.src == self.previewImage.attr('src'));\n var didLoad = false;\n\n self.previewImage.on('load',function(){\n didLoad = true;\n self.waitModal.addClass('is-hidden');\n self.hideStatus();\n });\n\n self.previewImage.on('error', function(){\n didLoad = true;\n self.waitModal.addClass('is-hidden');\n self.hideStatus();\n });\n\n self.previewImage.attr('src',response.src);\n\n if (sameSrc) {\n setTimeout(function(){\n if (!didLoad) {\n self.waitModal.addClass('is-hidden');\n self.hideStatus();\n }\n }, 3000);\n }\n }\n else\n {\n self.waitModal.addClass('is-hidden');\n self.hideStatus();\n }\n });\n }\n\n /**\n * Requests a preview to be generated.\n */\n this.preview=function(){\n if (self.previewsSuspended)\n return;\n\n ILabModal.makeDirty();\n\n clearTimeout(self.previewTimeout);\n self.previewTimeout=setTimeout(_preview,500);\n };\n\n /**\n * Binds the UI to the json response when selecting a tab or changing a preset\n * @param data\n */\n this.bindUI=function(data){\n if (data.hasOwnProperty('currentPreset') && (data.currentPreset!=null) && (data.currentPreset!='')) {\n var p=self.settings.presets[data.currentPreset];\n self.presets.setCurrentPreset(data.currentPreset,(p.default_for==data.size));\n }\n else\n self.presets.clearSelected();\n\n self.previewsSuspended=true;\n self.settings.size=data.size;\n self.settings.settings=data.settings;\n\n var rebind=function(){\n self.previewImage.off('load',rebind);\n self.parameters.forEach(function(value,index){\n value.reset(data.settings);\n });\n\n self.previewsSuspended=false;\n ILabModal.makeClean();\n };\n\n if (data.src)\n {\n self.previewImage.on('load',rebind);\n self.previewImage.attr('src',data.src);\n }\n else\n rebind();\n };\n\n this.bindPreset=function(preset){\n self.previewsSuspended=true;\n self.settings.settings=preset.settings;\n\n self.previewImage.off('load');\n self.parameters.forEach(function(value,index){\n value.reset(self.settings.settings);\n });\n\n self.previewsSuspended=false;\n self.preview();\n };\n\n\n this.apply=function(){\n self.displayStatus('Saving adjustments ...');\n\n self.postAjax('ilab_imgix_save', {}, function(response) {\n self.hideStatus();\n ILabModal.makeClean();\n });\n };\n\n /**\n * Reset all of the values\n */\n this.resetAll=function(){\n self.parameters.forEach(function(value,index){\n value.reset();\n });\n };\n\n this.displayStatus=function(message){\n self.modalContainer.find('.ilabm-status-label').text(message);\n self.modalContainer.find('.ilabm-status-container').removeClass('is-hidden');\n };\n\n this.hideStatus=function(){\n self.modalContainer.find('.ilabm-status-container').addClass('is-hidden');\n };\n};\n\n"],"sourceRoot":"js/"} \ No newline at end of file diff --git a/public/js/ilab-media-upload-google.js b/public/js/ilab-media-upload-google.js index 2c9b0de7..e2a6d367 100644 --- a/public/js/ilab-media-upload-google.js +++ b/public/js/ilab-media-upload-google.js @@ -1,2 +1 @@ -var ilabMediaGoogleUploader=function(a,b,c){this.start=function(){var d=c.type;'application/x-photoshop'==d&&(d='image/psd');var e={action:'ilab_upload_prepare',filename:c.name,type:d};a.post(ajaxurl,e,function(d){if('ready'==d.status){b.updateStatusText('Uploading ...');var e=d.key,f=d.acl;a.ajax({url:d.url,method:'POST',headers:{"x-goog-resumable":'start',"Content-Type":c.type},success:function(d,f,g){var h=g.getResponseHeader('location');a.ajax({url:h,method:'PUT',processData:!1,crossDomain:!0,data:c,contentType:c.type,xhr:function(){var c=a.ajaxSettings.xhr();return c.upload.onprogress=function(a){b.updateProgress(a.loaded/a.total)},c},success:function(){a.post(ajaxurl,{action:'ilab_upload_import_cloud_file',key:e},function(a){b.itemUploaded('success'==a.status,a)})},error:function(){b.itemUploadError()}})},error:function(){b.itemUploadError()}})}else b.itemUploadError()})}};ilabMediaUploadItem.prototype.storageUploader=ilabMediaGoogleUploader; -//# sourceMappingURL=ilab-media-upload-google.js.map +var ilabMediaGoogleUploader=function(a,b,c){this.start=function(){var d=c.type;'application/x-photoshop'==d&&(d='image/psd');var e={action:'ilab_upload_prepare',filename:c.name,type:d};a.post(ajaxurl,e,function(d){if('ready'==d.status){b.updateStatusText('Uploading ...');var e=d.key,f=d.acl;a.ajax({url:d.url,method:'POST',headers:{"x-goog-resumable":'start',"Content-Type":c.type},success:function(d,f,g){var h=g.getResponseHeader('location');a.ajax({url:h,method:'PUT',processData:!1,crossDomain:!0,data:c,contentType:c.type,xhr:function(){var c=a.ajaxSettings.xhr();return c.upload.onprogress=function(a){b.updateProgress(a.loaded/a.total)},c},success:function(){a.post(ajaxurl,{action:'ilab_upload_import_cloud_file',key:e},function(a){b.itemUploaded('success'==a.status,a)})},error:function(){b.itemUploadError()}})},error:function(){b.itemUploadError()}})}else b.itemUploadError()})}};ilabMediaUploadItem.prototype.storageUploader=ilabMediaGoogleUploader; \ No newline at end of file diff --git a/public/js/ilab-media-upload-google.js.map b/public/js/ilab-media-upload-google.js.map deleted file mode 100644 index 479655f6..00000000 --- a/public/js/ilab-media-upload-google.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["ilab-media-upload-google.js"],"names":[],"mappings":"AAAA,2CACA,sBACA,SACA,KACA,iCACA,AACA,AACA,mBACA,QACA,iCACA,KACA,AACA,AACA,oCACA,sBACA,oBACA,AACA,yBACA,QACA,AACA,WACA,OACA,WACA,eACA,oBACA,AACA,yBACA,AACA,6BACA,2BACA,AACA,mBACA,CACA,aACA,MACA,eACA,eACA,qBACA,mBACA,sBACA,MAIA,sCAHA,6BACA,MACA,GAEA,oBACA,gBACA,QACA,gCACA,AACA,AACA,kBACA,gBACA,sBACA,EACA,kBACA,GACA,iBACA,AACA,GACA,kBACA,GACA,iBACA,AACA,GACA,QACA,AACA,iBACA,AACA,EACA,CACA,EACA","file":"ilab-media-upload-google.js","sourcesContent":["var ilabMediaGoogleUploader = function($, item, file) {\n this.start = function() {\n var mimeType = file.type;\n if (mimeType == 'application/x-photoshop') {\n mimeType = 'image/psd';\n }\n\n var data = {\n \"action\": \"ilab_upload_prepare\",\n \"filename\": file.name,\n \"type\": mimeType\n };\n\n $.post(ajaxurl, data, function(response){\n if (response.status == 'ready') {\n item.updateStatusText('Uploading ...');\n\n var key = response.key;\n var acl = response.acl;\n\n $.ajax({\n url: response.url,\n method: 'POST',\n headers: {\n \"x-goog-resumable\": \"start\",\n // \"x-goog-acl\": acl,\n \"Content-Type\": file.type\n },\n success: function(response, status, xhr) {\n var location = xhr.getResponseHeader('location');\n\n $.ajax({\n url: location,\n method: 'PUT',\n processData: false,\n crossDomain: true,\n data:file,\n contentType: file.type,\n xhr: function() {\n var xhr = $.ajaxSettings.xhr();\n xhr.upload.onprogress = function (e) {\n item.updateProgress(e.loaded / e.total);\n };\n return xhr;\n },\n success: function(successResponse) {\n var importData = {\n \"action\": \"ilab_upload_import_cloud_file\",\n \"key\": key\n };\n\n $.post(ajaxurl, importData, function(importResponse) {\n item.itemUploaded((importResponse.status == 'success'), importResponse);\n });\n },\n error: function(response) {\n item.itemUploadError();\n }\n });\n },\n error: function(response) {\n item.itemUploadError();\n }\n });\n } else {\n item.itemUploadError();\n }\n });\n\n }\n};\n\nilabMediaUploadItem.prototype.storageUploader = ilabMediaGoogleUploader;"],"sourceRoot":"js/"} \ No newline at end of file diff --git a/public/js/ilab-media-upload-s3.js b/public/js/ilab-media-upload-s3.js index 6748254c..7247eef7 100644 --- a/public/js/ilab-media-upload-s3.js +++ b/public/js/ilab-media-upload-s3.js @@ -1,2 +1 @@ -var ilabMediaS3Uploader=function(a,b,c){this.start=function(){var d=c.type;'application/x-photoshop'==d&&(d='image/psd');var e={action:'ilab_upload_prepare',filename:c.name,type:d};a.post(ajaxurl,e,function(e){if('ready'==e.status){b.updateStatusText('Uploading ...');var f=new FormData;_.each(Object.keys(e.formData),function(a){'key'!=a&&f.append(a,e.formData[a])}),null!=e.cacheControl&&0 0)) {\n data.append('Cache-Control', response.cacheControl);\n }\n\n if (response.expires != null) {\n data.append('Expires', response.expires);\n }\n\n data.append('Content-Type', mimeType);\n data.append('acl',response.acl);\n data.append('key',response.key);\n data.append('file',file);\n\n\n $.ajax({\n url: response.url,\n method: 'POST',\n contentType: false,\n processData: false,\n data:data,\n xhr: function() {\n var xhr = $.ajaxSettings.xhr();\n xhr.upload.onprogress = function (e) {\n item.updateProgress(e.loaded / e.total);\n };\n return xhr;\n },\n success: function(successResponse) {\n var importData = {\n \"action\": \"ilab_upload_import_cloud_file\",\n \"key\": response.key\n };\n\n $.post(ajaxurl, importData, function(importResponse) {\n item.itemUploaded((importResponse.status == 'success'), importResponse);\n });\n },\n error: function(response) {\n item.itemUploadError();\n }\n })\n } else {\n item.itemUploadError();\n }\n });\n\n }\n};\n\nilabMediaUploadItem.prototype.storageUploader = ilabMediaS3Uploader;"],"sourceRoot":"js/"} \ No newline at end of file diff --git a/public/js/ilab-media-upload.js b/public/js/ilab-media-upload.js index 30cf78f2..ca276d86 100644 --- a/public/js/ilab-media-upload.js +++ b/public/js/ilab-media-upload.js @@ -1,2 +1 @@ -var ilabAttachmentInfo=function(a,b,c){var d=this;this.info=a(b.attachmentTemplate(c)),this.data=c,this.attachmentTitle=this.info.find('input[name="attachment-title"]'),this.attachmentCaption=this.info.find('textarea[name="attachment-caption"]'),this.attachmentAlt=this.info.find('input[name="attachment-alt"]'),this.attachmentDescription=this.info.find('textarea[name="attachment-description"]'),this.attachmentAlign=this.info.find('select[name="attachment-align"]'),this.attachmentLinkURL=this.info.find('input[name="attachment-link-url"]'),this.attachmentSize=this.info.find('select[name="attachment-size"]'),this.attachmentLinkType=this.info.find('select[name="attachment-link-type"]'),this.saveToken=null;var e=function(){var b={action:'save-attachment',id:d.data.id,nonce:d.data.nonces.update,post_id:window.parent.wp.media.model.settings.post.id,"changes[title]":d.attachmentTitle.val(),"changes[caption]":d.attachmentCaption.val(),"changes[alt]":d.attachmentAlt.val(),"changes[description]":d.attachmentDescription.val()};a.post(ajaxurl,b,function(){})};this.save=function(){clearTimeout(d.saveToken),d.saveToken=setTimeout(e,1e3)};var f=function(){d.save()};this.attachmentTitle.on('change',f),this.attachmentCaption.on('change',f),this.attachmentAlt.on('change',f),this.attachmentDescription.on('change',f),this.attachmentLinkType.on('change',function(){var a=d.attachmentLinkType.val();'none'==a?(d.attachmentLinkURL.css({display:'display'}),d.attachmentLinkURL.val('')):'file'==a?(d.attachmentLinkURL.prop('readonly','readonly'),d.attachmentLinkURL.css({display:''}),d.attachmentLinkURL.val(d.data.url)):'post'==a?(d.attachmentLinkURL.prop('readonly','readonly'),d.attachmentLinkURL.css({display:''}),d.attachmentLinkURL.val(d.data.link)):'custom'==a&&(d.attachmentLinkURL.prop('readonly',null),d.attachmentLinkURL.css({display:''}),d.attachmentLinkURL.val(''))}),this.insert=function(){var b={action:'send-attachment-to-editor',"attachment[id]":d.data.id,nonce:window.parent.wp.media.view.settings.nonce.sendToEditor,post_id:window.parent.wp.media.model.settings.post.id,"attachment[post_content]":d.attachmentDescription.val(),"attachment[post_excerpt]":d.attachmentCaption.val(),"attachment[image_alt]":d.attachmentAlt.val(),"attachment[image-size]":d.attachmentSize.val(),"attachment[align]":d.attachmentAlign.val(),"attachment[url]":d.attachmentLinkURL.val(),html:''};a.post(ajaxurl,b,function(a){a.hasOwnProperty('data')&&window.parent.send_to_editor(a.data)})},this.attachmentLinkURL.css({display:'none'}),b.attachmentContainer.empty(),b.attachmentContainer.append(this.info)},ilabMediaUploadItem=function(a,b,c){var d=this;this.cell=a(b.uploadItemTemplate()),this.background=this.cell.find('.ilab-upload-item-background'),this.status=this.cell.find('.ilab-upload-status'),this.progress=this.cell.find('.ilab-upload-progress'),this.progressTrack=this.cell.find('.ilab-upload-progress-track'),this.status.text('Waiting ...'),this.progressTrack.css({width:'0%'}),this.cell.css({opacity:0}),this.cell.addClass('no-mouse'),this.state='waiting',this.postId=null,this.loader=this.cell.find('.ilab-loader-container'),0==c.type.indexOf('image/')&&c.size<15728640?this.background.css({opacity:0.33,"background-image":'url('+URL.createObjectURL(c)+')'}):0==c.type.indexOf('image/')?this.cell.addClass('ilab-upload-cell-image'):0==c.type.indexOf('video/')?this.cell.addClass('ilab-upload-cell-video'):'application/x-photoshop'==c.type?this.cell.addClass('ilab-upload-cell-image'):this.cell.addClass('ilab-upload-cell-doc'),this.deselect=function(){this.cell.removeClass('ilab-upload-selected')},this.updateProgress=function(a){this.progressTrack.css({width:Math.floor(100*a)+'%'})},this.itemUploaded=function(a,c){if(a){if(this.progress.css({display:'none'}),this.status.css({display:'none'}),this.background.css({opacity:''}),this.state='ready',this.postId=c.data.id,c.data.thumb){this.loader.css({opacity:1});var d=new Image;d.onload=function(){this.background.css({"background-image":'url('+c.data.thumb+')'}),this.loader.css({opacity:0})}.bind(this),d.src=c.data.thumb}this.cell.removeClass('no-mouse')}else this.progress.css({display:'none'}),this.status.text('Error.'),this.cell.addClass('upload-error');b.uploadFinished(this)},this.itemUploadError=function(){d.progress.css({display:'none'}),d.status.text('Error uploading.'),b.uploadFinished(d)},this.updateStatusText=function(){this.status.text('Uploading ...')},this.startUpload=function(){var b=new this.storageUploader(a,this,c);b.start()},b.uploadTarget.append(this.cell),setTimeout(function(){d.cell.css({opacity:''})},1e3/30),this.cell.on('click',function(a){if('ready'==d.state)if(b.settings.insertMode)d.cell.addClass('ilab-upload-selected'),b.uploadSelected(d);else{var c=window.open('post.php?post='+d.postId+'&action=edit','_blank');c.focus()}return a.preventDefault(),!1})},ilabMediaUploader=function(a,b){var c=this;this.insertButton=a('#ilab-insert-button'),this.settings=b,this.uploadTarget=a('#ilab-video-upload-target'),this.attachmentContainer=a('#ilab-attachment-info'),this.uploadDirections=this.uploadTarget.find('.ilab-upload-directions'),this.uploadItemTemplate=wp.template('ilab-upload-cell'),this.attachmentTemplate=wp.template('ilab-attachment-info'),this.hiddenFileInput=a(''),this.waitingQueue=[],this.uploadingQueue=[],this.watchToken=null,this.currentSelection=null,this.attachmentInfo=null,this.watchQueue=function(){if(5>c.uploadingQueue.length&&0'),this.waitingQueue=[],this.uploadingQueue=[],this.watchToken=null,this.currentSelection=null,this.attachmentInfo=null,this.watchQueue=function(){if(5>c.uploadingQueue.length&&0');\n\n this.waitingQueue = [];\n this.uploadingQueue = [];\n\n this.watchToken = null;\n\n this.currentSelection = null;\n this.attachmentInfo = null;\n\n this.watchQueue = function() {\n if ((self.uploadingQueue.length < 5) && (self.waitingQueue.length>0)) {\n var currentQ = 5 - self.uploadingQueue.length;\n for(var i=0; i 0) {\n var up = self.waitingQueue.shift();\n\n self.uploadingQueue.push(up);\n up.startUpload();\n }\n }\n }\n\n self.watchToken = setTimeout(self.watchQueue, 500);\n };\n\n this.uploadSelected = function(upload) {\n if (self.currentSelection == upload) {\n return;\n }\n\n self.insertButton.prop('disabled', true);\n if (self.currentSelection) {\n self.currentSelection.deselect();\n }\n\n self.currentSelection = upload;\n\n var data = {\n \"action\": \"ilab_upload_attachment_info\",\n \"postId\": upload.postId\n };\n\n $.post(ajaxurl, data, function(response){\n $('body').addClass('ilab-item-selected');\n self.attachmentInfo = new ilabAttachmentInfo($, self, response);\n self.insertButton.prop('disabled', false);\n });\n };\n\n this.uploadFinished = function(upload) {\n var idx = self.uploadingQueue.indexOf(upload);\n if (idx > -1) {\n self.uploadingQueue.splice(idx, 1);\n }\n\n clearTimeout(self.watchToken);\n self.watchQueue();\n };\n\n this.addFile = function(file) {\n if (file.type=='') {\n return false;\n }\n\n var mimeType = file.type;\n\n\n if (mimeType == 'application/x-photoshop') {\n mimeType = 'image/psd';\n }\n\n if (settings.allowedMimes.indexOf(mimeType) == -1) {\n return false;\n }\n\n var mimeTypeParts = mimeType.split('/');\n var type = mimeTypeParts[0];\n var subType = mimeTypeParts[1];\n\n if (type == 'image') {\n if (!settings.imgixEnabled) {\n return false;\n }\n\n if (['jpeg','gif','png'].indexOf(subType) == -1) {\n if (!settings.extrasEnabled) {\n return false;\n }\n\n if (['psd','tiff','bmp'].indexOf(subType) == -1) {\n return false;\n }\n }\n } else if (type == 'video') {\n if (!settings.videoEnabled) {\n return false;\n }\n } else {\n if (!settings.docsEnabled) {\n return false;\n }\n }\n\n self.waitingQueue.push(new ilabMediaUploadItem($, self, file));\n };\n\n this.uploadTarget.on('dragenter dragover', function(e){\n self.uploadTarget.addClass('drag-inside');\n e.stopPropagation();\n e.preventDefault();\n });\n\n this.uploadTarget.on('dragleave drageexit', function(e){\n self.uploadTarget.removeClass('drag-inside');\n e.stopPropagation();\n e.preventDefault();\n });\n\n this.uploadTarget.on('drop', function(e){\n self.uploadTarget.removeClass('drag-inside');\n self.uploadDirections.css({display: 'none'});\n e.preventDefault();\n var files = e.originalEvent.dataTransfer.files;\n _.each(files, self.addFile);\n });\n\n this.uploadTarget.on('click', function(e){\n self.hiddenFileInput.click();\n });\n\n this.hiddenFileInput.on('change', function(e){\n self.uploadDirections.css({display: 'none'});\n for(var i=0; ie.width()-350?(g.show(),h.show(),i.hide()):(g.hide(),h.hide(),i.show())};a(window).on('resize',q),q()})}})(jQuery);var ILabModal=function(){var a=!1;return{cancel:function(){jQuery('.ilabm-backdrop').remove()},makeDirty:function(){a=!0},isDirty:function(){return a},makeClean:function(){a=!1},loadURL:function(b,c,d){return a&&!confirm('You\'ve made changes, continuing will lose them.\n\nContinue?')?!1:void(a=!1,jQuery.get(b,function(a){c?d(a):jQuery('body').append(a)}))}}}();jQuery(document).ready(function(a){a(document).on('click','a.ilab-thickbox',function(b){b.preventDefault();var c=a(this),d=c.hasClass('ilab-thickbox-partial');return ILabModal.loadURL(c.attr('href'),d,null),!1})}); -//# sourceMappingURL=ilab-modal.js.map +(function(a){a.fn.ilabTabs=function(b){var c=a.extend({},b),d=null;return this.each(function(){for(var b=a(this),e=b,f=b.parent();;){if(f.hasClass('ilabm-container')){e=f;break}if(f=f.parent(),!f)break}var g=b.find('.ilabm-tabs-select-label'),h=b.find('.ilabm-tabs-select'),i=b.find('.ilabm-editor-tab'),j=0,k=null,l=0,m=0,n=0,o=0,p=function(a,b){var c=d||(d=document.createElement('canvas')),e=c.getContext('2d');e.font=b;var f=e.measureText(a);return f.width};i.each(function(){var b=a(this);null==k&&(k=b.css('font'),l=parseInt(b.css('margin-left')),m=parseInt(b.css('margin-right')),n=parseInt(b.css('padding-left')),o=parseInt(b.css('padding-right'))),tabWidth=p(b.text(),k)+l+m+n+o+15,j+=tabWidth}),g&&c.hasOwnProperty('label')&&g.text(c.label),i.removeClass('active-tab'),i.on('click',function(b){b.preventDefault(),i.removeClass('active-tab');var d=a(this);return d.addClass('active-tab'),h&&h.val(d.data('value')),c.currentValue=d.data('value'),c.hasOwnProperty('tabSelected')&&c.tabSelected(d),!1}),h&&h.on('change',function(){i.removeClass('active-tab'),i.each(function(){var b=a(this);b.data('value')==h.val()&&b.addClass('active-tab')});var b=h.find(':selected');c.hasOwnProperty('tabSelected')&&c.tabSelected(b)}),c.hasOwnProperty('currentValue')&&(h&&h.val(c.currentValue),i.each(function(){var b=a(this);b.data('value')==c.currentValue&&b.addClass('active-tab')}));var q=function(){j>e.width()-350?(g.show(),h.show(),i.hide()):(g.hide(),h.hide(),i.show())};a(window).on('resize',q),q()})}})(jQuery);var ILabModal=function(){var a=!1;return{cancel:function(){jQuery('.ilabm-backdrop').remove()},makeDirty:function(){a=!0},isDirty:function(){return a},makeClean:function(){a=!1},loadURL:function(b,c,d){return a&&!confirm('You\'ve made changes, continuing will lose them.\n\nContinue?')?!1:void(a=!1,jQuery.get(b,function(a){c?d(a):jQuery('body').append(a)}))}}}();jQuery(document).ready(function(a){a(document).on('click','a.ilab-thickbox',function(b){b.preventDefault();var c=a(this),d=c.hasClass('ilab-thickbox-partial');return ILabModal.loadURL(c.attr('href'),d,null),!1})}); \ No newline at end of file diff --git a/public/js/ilab-modal.js.map b/public/js/ilab-modal.js.map deleted file mode 100644 index 265e9793..00000000 --- a/public/js/ilab-modal.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["ilab-modal-tabs.js"],"names":[],"mappings":"YACA,AACA,0BACA,SACA,eACA,AACA,gCACA,aACA,MACA,AACA,QACA,WACA,kCACA,CACA,IACA,KACA,AACA,QACA,SACA,GACA,AACA,KACA,AACA,cACA,qCACA,+BACA,AACA,uBACA,uBACA,AACA,iBACA,AACA,AACA,oCACA,0BACA,QACA,eACA,wBACA,KACA,AACA,mBACA,SACA,MACA,kBACA,yBACA,iCACA,kCACA,kCACA,AACA,AACA,kDACA,MACA,QACA,AACA,uBACA,mBACA,AACA,qBACA,sCACA,GACA,AACA,+BACA,sBACA,MAWA,kBAVA,AACA,AACA,8BACA,AACA,gCACA,AACA,0BACA,kBACA,AACA,iBAEA,AACA,AACA,AACA,8BACA,eACA,+BACA,SACA,yBACA,kBACA,aACA,gBACA,8BACA,kBACA,cACA,AACA,AACA,oBACA,AACA,AACA,6BACA,AACA,+BACA,SACA,yBACA,yBACA,aACA,AACA,AACA,oBACA,aACA,OACA,SACA,SACA,AACA,AACA,WACA,SACA,SACA,AACA,OACA,AACA,eACA,YACA,GACA,EACA,AACA,IACA,AA1HA,AACA,AACA,AACA,QACA,wBACA,IACA,AACA,AACA,YAsCA,CACA,iBAtCA,2BACA,QACA,AACA,EAoCA,oBAnCA,CACA,IACA,AACA,EAiCA,kBAhCA,CACA,QACA,AACA,EA8BA,oBA7BA,CACA,IACA,AACA,EA2BA,AACA,uBA3BA,AACA,AACA,oBACA,AACA,AACA,AACA,yEACA,AACA,6BACA,AACA,GACA,AACA,AACA,AACA,AACA,oBACA,AACA,SACA,GACA,AACA,EAQA,IACA,kCACA,qDACA,GACA,yBACA,mBACA,AACA,yBAGA,0CAFA,AACA,QAEA","file":"ilab-modal.js","sourcesContent":["(function($){\n\n $.fn.ilabTabs=function(options){\n var settings= $.extend({},options);\n var sizeCanvas=null;\n\n return this.each(function(){\n var container=$(this);\n var windowContainer = container;\n\n var parentContainer = container.parent();\n while(true) {\n if (parentContainer.hasClass('ilabm-container')) {\n windowContainer = parentContainer;\n break;\n }\n\n parentContainer = parentContainer.parent();\n if (!parentContainer) {\n break;\n }\n }\n\n var label=container.find('.ilabm-tabs-select-label');\n var select=container.find('.ilabm-tabs-select');\n var tabs=container.find('.ilabm-editor-tab');\n\n var minWidth=0;\n var tabFont=null,tabMarginLeft=0,tabMarginRight=0,tabPaddingLeft=0,tabPaddingRight=0;\n\n var getTextWidth=function(text, font) {\n // re-use canvas object for better performance\n\n var canvas = sizeCanvas || (sizeCanvas = document.createElement(\"canvas\"));\n var context = canvas.getContext(\"2d\");\n context.font = font;\n var metrics = context.measureText(text);\n return metrics.width;\n };\n\n tabs.each(function(){\n var tab=$(this);\n if (tabFont===null) {\n tabFont = tab.css('font');\n tabMarginLeft=parseInt(tab.css('margin-left'));\n tabMarginRight=parseInt(tab.css('margin-right'));\n tabPaddingLeft=parseInt(tab.css('padding-left'));\n tabPaddingRight=parseInt(tab.css('padding-right'));\n }\n\n tabWidth=getTextWidth(tab.text(),tabFont)+tabMarginLeft+tabMarginRight+tabPaddingLeft+tabPaddingRight+15;\n minWidth+=tabWidth;\n });\n\n if (label && settings.hasOwnProperty('label'))\n label.text(settings.label);\n\n tabs.removeClass('active-tab');\n tabs.on('click',function(e){\n e.preventDefault();\n\n tabs.removeClass('active-tab');\n var tab=$(this);\n tab.addClass('active-tab');\n\n if (select)\n select.val(tab.data('value'));\n\n settings.currentValue=tab.data('value');\n\n if (settings.hasOwnProperty('tabSelected'))\n settings.tabSelected(tab);\n\n return false;\n });\n\n if (select)\n {\n select.on('change',function(){\n tabs.removeClass('active-tab');\n tabs.each(function(){\n var tab=$(this);\n if (tab.data('value')==select.val())\n tab.addClass('active-tab');\n });\n var option=select.find(\":selected\");\n if (settings.hasOwnProperty('tabSelected'))\n settings.tabSelected(option);\n });\n }\n\n if (settings.hasOwnProperty('currentValue'))\n {\n if (select)\n select.val(settings.currentValue);\n\n tabs.each(function(){\n var tab=$(this);\n if (tab.data('value')==settings.currentValue)\n tab.addClass('active-tab');\n });\n }\n\n var checkOverflow=function(){\n if (minWidth > (windowContainer.width() - 350)) {\n label.show();\n select.show();\n tabs.hide();\n }\n else {\n label.hide();\n select.hide();\n tabs.show();\n }\n };\n\n $(window).on('resize',checkOverflow);\n checkOverflow();\n });\n };\n\n}(jQuery));\n"],"sourceRoot":"js/"} \ No newline at end of file